From 449d322827431b3addd9588f64ff080b91709595 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Jan 2021 17:29:54 +0100 Subject: [PATCH 0001/1367] Version 5.0.1, Revision 19378, Hash 1749195f5 MODIFIED * config/version/version.m4 configure bse/.objects bse/K_Haydock.F bse/K_diago_driver.F bse/K_diago_response_functions.F bse/K_solvers.F io/io_BSS_diago.F modules/mod_BS_solvers.F modules/mod_interfaces.F NEW * bse/K_diago_left_residuals.F bse/K_diago_overlap_matrix.F bse/K_diago_right_residuals.F DELETED * bse/K_diago_kerr_residual.F bse/K_diago_magnons_residual.F bse/K_diago_non_hermitian_residuals.F Changes: - [yambo] Working on simplification of diagonalization driver to deal with general residuals, i.e. with general response functions Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +- configure | 22 +-- src/bse/.objects | 4 +- src/bse/K_Haydock.F | 4 +- src/bse/K_diago_driver.F | 61 +++++-- src/bse/K_diago_kerr_residual.F | 76 --------- src/bse/K_diago_left_residuals.F | 127 ++++++++++++++ src/bse/K_diago_magnons_residual.F | 193 ---------------------- src/bse/K_diago_non_hermitian_residuals.F | 156 ----------------- src/bse/K_diago_overlap_matrix.F | 51 ++++++ src/bse/K_diago_response_functions.F | 31 +++- src/bse/K_diago_right_residuals.F | 94 +++++++++++ src/bse/K_solvers.F | 9 +- src/io/io_BSS_diago.F | 11 +- src/modules/mod_BS_solvers.F | 4 +- src/modules/mod_interfaces.F | 17 +- 16 files changed, 395 insertions(+), 471 deletions(-) delete mode 100644 src/bse/K_diago_kerr_residual.F create mode 100644 src/bse/K_diago_left_residuals.F delete mode 100644 src/bse/K_diago_magnons_residual.F delete mode 100644 src/bse/K_diago_non_hermitian_residuals.F create mode 100644 src/bse/K_diago_overlap_matrix.F create mode 100644 src/bse/K_diago_right_residuals.F diff --git a/config/version/version.m4 b/config/version/version.m4 index 2acf8616b4..19dae160e0 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19377 h.46ff12cdf, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19378 h.1749195f5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19377" -SHASH="46ff12cdf" +SREVISION="19378" +SHASH="1749195f5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 6095d3ca45..66b5f2e2ce 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19377 h.46ff12cdf. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19378 h.1749195f5. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19377 h.46ff12cdf' -PACKAGE_STRING='Yambo 5.0.1 r.19377 h.46ff12cdf' +PACKAGE_VERSION='5.0.1 r.19378 h.1749195f5' +PACKAGE_STRING='Yambo 5.0.1 r.19378 h.1749195f5' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19377 h.46ff12cdf to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19378 h.1749195f5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19377 h.46ff12cdf:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19378 h.1749195f5:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19377 h.46ff12cdf +Yambo configure 5.0.1 r.19378 h.1749195f5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19377 h.46ff12cdf, which was +It was created by Yambo $as_me 5.0.1 r.19378 h.1749195f5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19377" -SHASH="46ff12cdf" +SREVISION="19378" +SHASH="1749195f5" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19377 h.46ff12cdf, which was +This file was extended by Yambo $as_me 5.0.1 r.19378 h.1749195f5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19377 h.46ff12cdf +Yambo config.status 5.0.1 r.19378 h.1749195f5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/.objects b/src/bse/.objects index 2f4007345d..aed2c3753d 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -13,8 +13,8 @@ objs = K_blocks.o K_driver.o K_IP.o K_Transitions_setup.o K_WF_phases.o \ K_solvers.o K_Haydock.o K_Haydock_response.o K_screened_interaction.o \ K_inversion_do_it_full.o EPS_via_perturbative_inversion.o \ K_inversion_driver.o K_diagonal.o K_inversion_Lo.o K_inversion_restart.o K_inversion_engine.o \ - K_diago_driver.o K_diago_non_hermitian_residuals.o K_diago_hermitian_residuals.o \ + K_diago_driver.o K_diago_left_residuals.o K_diago_right_residuals.o K_diago_overlap_matrix.o \ K_diago_perturbative.o K_diago_response_functions.o K_eps_interpolate.o \ K_output_file.o K_multiply_by_V.o K_dot_product.o K_components_folded_in_serial_arrays.o \ - K_stored_in_a_big_matrix.o K_observables.o K_diago_kerr_residual.o K_diago_magnons_residual.o \ + K_stored_in_a_big_matrix.o K_observables.o \ PL_diago_residual.o PL_via_perturbative_inversion.o $(SLEPC_objects) $(SLK_objects) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index ae8a4329ba..8d6ba7aeb0 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -219,6 +219,7 @@ subroutine K_Haydock(iq,W,mode) if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle if (trim(mode)=="abs") V0(i_g)%fragment = BS_T_grp(i_g)%dipoles_opt(1,:,1) if (trim(mode)=="kerr") V0(i_g)%fragment = BS_T_grp(i_g)%dipoles_opt(2,:,1) + if (trim(mode)=="dichroism") V0(i_g)%fragment = BS_T_grp(i_g)%dipoles_dic(1,:,1) if (trim(mode)=="magnons") V0(i_g)%fragment = BS_T_grp(i_g)%dipoles_mag(1,:,1) V0(i_g)%fragment = V0(i_g)%fragment*sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP)) if(velocity_correction) V_tmp(i_g)%fragment = V0(i_g)%fragment/BS_T_grp(i_g)%E @@ -238,7 +239,8 @@ subroutine K_Haydock(iq,W,mode) ! do i_g=1,BS_nT_grps if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle - if (trim(mode)=="kerr") W0(i_g)%fragment = BS_T_grp(i_g)%dipoles_opt(1,:,1) + if (trim(mode)=="kerr") W0(i_g)%fragment = BS_T_grp(i_g)%dipoles_opt(1,:,1) + if (trim(mode)=="dichroism") W0(i_g)%fragment = BS_T_grp(i_g)%dipoles_dic(1,:,1) W0(i_g)%fragment = W0(i_g)%fragment*(sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP))) if(velocity_correction) V_tmp(i_g)%fragment = W0(i_g)%fragment/BS_T_grp(i_g)%E enddo diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 9d905ed974..ff21a9906b 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -30,16 +30,16 @@ subroutine K_diago_driver(iq,W,X_static) use pars, ONLY:SP use stderr, ONLY:intc use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& -& BS_mat_res_ares_dim,l_BS_optics !,BS_Blocks_symmetrize_K,& +& BS_mat_res_ares_dim,l_BS_optics,l_BS_dichroism !,BS_Blocks_symmetrize_K,& use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,& & BSS_write_eig_2_db,BSS_eh_W,BS_mat,BSS_n_eig,BS_E use X_m, ONLY:X_t - use electrons, ONLY:n_sp_pol + use electrons, ONLY:n_sp_pol,n_spinor use frequency, ONLY:w_samp use com, ONLY:isec use LIVE_t, ONLY:live_timing use linear_algebra, ONLY:DIAGO - use interfaces, ONLY:K_diago_response_functions,LINEAR_ALGEBRA_driver + use interfaces, ONLY:K_diago_response_functions,K_diago_left_residuals,LINEAR_ALGEBRA_driver use IO_m, ONLY:io_control,REP,VERIFY,OP_WR_CL,OP_RD_CL use parser_m, ONLY:parser use timing_m, ONLY:timing @@ -106,6 +106,7 @@ subroutine K_diago_driver(iq,W,X_static) real(SP), pointer :: BS_R_PL(:,:) => null() ! complex(SP),pointer :: BS_R_right_kerr(:) => null() + complex(SP),pointer :: BS_R_right_dich(:) => null() ! complex(SP),pointer :: BS_R_left_magn(:,:) => null() complex(SP),pointer :: BS_R_right_magn(:,:) => null() @@ -158,7 +159,7 @@ subroutine K_diago_driver(iq,W,X_static) !======================== call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! K_is_not_hermitian=BS_K_coupling.or.(allocated(BSS_eh_W).and..not.BSS_perturbative_width) ! @@ -249,20 +250,47 @@ subroutine K_diago_driver(iq,W,X_static) ! Construct the residuals of epsilon !==================================== if (K_is_not_hermitian) then + ! + ! Right residuals + if(l_BS_optics ) call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right, BS_V_right) + if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) + if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_V_right) + if(l_BS_magnons) then + call K_diago_right_residuals("mag1",i_BS_mat,BS_E,BS_R_right_magn(1,:),BS_V_right) + if(n_spinor==2) call K_diago_right_residuals("mag2",i_BS_mat,BS_E,BS_R_right_magn(2,:),BS_V_right) + endif ! call K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) ! - if(l_BS_optics ) call K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) - if(l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_V_right,BS_R_right_kerr) - if(l_BS_magnons) call K_diago_non_herm_magnons_residual(BS_R_left_magn,BS_R_right_magn,BS_V_left,BS_V_right,BS_overlap) - if(l_BS_photolum)call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) + ! Left residuals + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & + & call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) + if(l_BS_magnons) then + call K_diago_left_residuals("magn1",i_BS_mat,BS_E,BS_R_left_magn(1,:),BS_V_left,BS_overlap) + if(n_spinor==2) call K_diago_left_residuals("magn2",i_BS_mat,BS_E,BS_R_left_magn(2,:),BS_V_left,BS_overlap) + endif + ! + ! DS: this also should be changed according to the general structure + if(l_BS_photolum) call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) ! else ! - if(l_BS_optics) call K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) - if(l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_mat,BS_R_right_kerr) - if(l_BS_magnons) call K_diago_herm_magnons_residual(i_BS_mat,BS_R_left_magn,BS_R_right_magn) - if(l_BS_photolum)call PL_diago_residual(BS_mat,BS_mat,BS_R_PL,K_is_not_hermitian) + ! Right residuals + if(l_BS_optics ) call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right, BS_mat) + if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) + if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_mat) + if(l_BS_magnons) then + call K_diago_right_residuals("mag1",i_BS_mat,BS_E,BS_R_right_magn(1,:),BS_mat) + if(n_spinor==2) call K_diago_right_residuals("mag2",i_BS_mat,BS_E,BS_R_right_magn(2,:),BS_mat) + endif + ! + ! Left residuals + if(l_BS_optics) BS_R_left=conjg(BS_R_right) + if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) + if(l_BS_kerr.or.l_BS_dichroism) call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left,BS_V_left) + ! + ! DS: this also should be changed according to the general structure + if(l_BS_photolum) call PL_diago_residual(BS_mat,BS_mat,BS_R_PL,K_is_not_hermitian) ! endif ! @@ -290,7 +318,7 @@ subroutine K_diago_driver(iq,W,X_static) ! Now I calculate epsilon !========================= call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! Diagonalization DB (OUT) !========================== @@ -298,7 +326,7 @@ subroutine K_diago_driver(iq,W,X_static) ! call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! endif ! @@ -343,6 +371,9 @@ subroutine local_alloc(what) if (l_BS_kerr) then YAMBO_ALLOC_P(BS_R_right_kerr,(BSS_n_eig)) endif + if (l_BS_dichroism) then + YAMBO_ALLOC_P(BS_R_right_dich,(BSS_n_eig)) + endif if (l_BS_magnons) then YAMBO_ALLOC_P(BS_R_left_magn,(2,BSS_n_eig)) YAMBO_ALLOC_P(BS_R_right_magn,(2,BSS_n_eig)) @@ -389,6 +420,7 @@ subroutine local_free() YAMBO_FREE_P(BS_R_right) YAMBO_FREE_P(BS_R_left) YAMBO_FREE_P(BS_R_right_kerr) + YAMBO_FREE_P(BS_R_right_dich) YAMBO_FREE_P(BS_R_right_magn) YAMBO_FREE_P(BS_R_left_magn) YAMBO_FREE_P(BS_R_PL) @@ -415,6 +447,7 @@ subroutine K_slepc_resize_variables() if(associated(BS_R_right)) call BSS_resize(BS_R_right) ! if(associated(BS_R_right_kerr)) call BSS_resize(BS_R_right_kerr) + if(associated(BS_R_right_dich)) call BSS_resize(BS_R_right_dich) if(associated(BS_R_left_magn) ) call BSS_resize(BS_R_left_magn) if(associated(BS_R_right_magn)) call BSS_resize(BS_R_right_magn) if(associated(BS_R_PL) ) call BSS_resize(BS_R_PL) diff --git a/src/bse/K_diago_kerr_residual.F b/src/bse/K_diago_kerr_residual.F deleted file mode 100644 index c60c0d1a17..0000000000 --- a/src/bse/K_diago_kerr_residual.F +++ /dev/null @@ -1,76 +0,0 @@ -! -! Copyright (C) 2000-2020 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine K_diago_kerr_residual(BS_E,BS_V_right,BS_R_right_kerr) - ! - ! BS_R_right_kerr(i)= - ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) - ! - use pars, ONLY:SP,cZERO,cI - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use LIVE_t, ONLY:live_timing - use X_m, ONLY:global_gauge - use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_n_eig,BSS_dipoles_opt - use BS, ONLY:BS_K_dim,BS_H_dim - ! - implicit none - ! - complex(SP),intent(in) :: BS_E(BSS_n_eig) - complex(SP),intent(in) :: BS_V_right(BS_H_dim,BSS_n_eig) - complex(SP),intent(out) :: BS_R_right_kerr(BSS_n_eig) - ! - ! Workspace - ! - type(PP_indexes) ::px - integer ::i1 - ! - complex(SP) :: tmp_res(BS_H_dim) - ! - call PP_indexes_reset(px) - call PARALLEL_index(px,(/BSS_n_eig/)) - ! - BS_R_right_kerr=cZERO - ! - call live_timing('KERR residuals ',px%n_of_elements(myid+1)) - ! - forall(i1=1:BS_K_dim(1)) tmp_res(i1) = conjg(BSS_dipoles_opt(2,i1))*sqrt(cmplx(BSS_eh_f(i1),kind=SP)) - forall(i1=BS_K_dim(1)+1:BS_H_dim) tmp_res(i1) = conjg(BSS_dipoles_opt(2,i1))*sqrt(cmplx(BSS_eh_f(i1),kind=SP)) - if (allocated(BSS_eh_Z) ) tmp_res=tmp_res*sqrt(BSS_eh_Z) - if (trim(global_gauge)=="velocity") tmp_res=tmp_res/BSS_eh_E - ! - do i1=1,BSS_n_eig - if (.not.px%element_1D(i1)) cycle - ! - BS_R_right_kerr(i1)=V_dot_V_omp(BS_H_dim,tmp_res,BS_V_right(:,i1)) - if (trim(global_gauge)=="velocity") BS_R_right_kerr(i1)=BS_R_right_kerr(i1)*BS_E(i1) - ! - call live_timing(steps=1) - enddo - call PP_redux_wait(BS_R_right_kerr) - call live_timing - ! - call PP_indexes_reset(px) - ! -end subroutine K_diago_kerr_residual diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F new file mode 100644 index 0000000000..4339011358 --- /dev/null +++ b/src/bse/K_diago_left_residuals.F @@ -0,0 +1,127 @@ +! +! Copyright (C) 2000-2020 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM, MG, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) + ! + ! The left eigenvector u(j) of A satisfies + ! u(j)**H * A = lambda(j) * u(j)**H + ! where u(j)**H denotes the conjugate transpose of u(j). + ! + ! Remember: 1/(w-H)= \sum_ij |i right>^{-1) null() + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + if (.not.present(BS_overlap)) scheme="hermitian" + if ( present(BS_overlap)) scheme="non-hermitian" + ! + velocity_correction=trim(mode)=="abs".or.trim(mode)=="kerr".and.trim(global_gauge)=="velocity" + ! + if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) + if ( BS_K_coupling) res_range=(/1,BS_H_dim/) + ! + allocate(tmp_res(res_range(1):res_range(2))) + n_res=res_range(2)-res_range(1)+1 + ! + if (trim(scheme)=="hermitian") BS_R_tmp => BS_R_left + if (trim(scheme)=="non-hermitian") then + allocate(BS_R_tmp(BSS_n_eig)) + endif + ! + ! [1] BS_R_tmp(i)= + ! = conjg( BS_V_left(k,i))*BSS_dipoles(k)*R_k + BS_R_tmp=cZERO + ! + call live_timing('EPS L residuals',px%n_of_elements(myid+1)) + ! + if(trim(mode)=="opti") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + ! + tmp_res = tmp_res*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) + if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) + if (velocity_correction) tmp_res=tmp_res/BSS_eh_E(res_range(1):res_range(2)) + ! + do i1=1,BSS_n_eig + ! + if (.not.px%element_1D(i1)) cycle + ! + BS_R_tmp(i1)=Vstar_dot_V_omp(n_res,BS_V_left(:,i1),tmp_res) + if (velocity_correction) BS_R_tmp(i1)=BS_R_tmp(i1)*BS_E(i1) + ! + call live_timing(steps=1) + ! + enddo + call PP_redux_wait(BS_R_tmp) + ! + call live_timing() + ! + if (trim(scheme)=="hermitian") return + ! + ! [2] BS_R_left(i)=BS_overlap(i,j)BS_R_tmp(j) + ! + BS_R_left=cZERO + ! + call live_timing('EPS L x overlap',px%n_of_elements(myid+1)) + do i1=1,BSS_n_eig + if (.not.px%element_1D(i1)) cycle + ! + BS_R_left(i1)=V_dot_V_omp(BSS_n_eig,BS_overlap(i1,:),BS_R_tmp) + ! + call live_timing(steps=1) + enddo + call PP_redux_wait(BS_R_left) + call live_timing + ! + call PP_indexes_reset(px) + ! +end subroutine K_diago_left_residuals diff --git a/src/bse/K_diago_magnons_residual.F b/src/bse/K_diago_magnons_residual.F deleted file mode 100644 index cf7284f4ff..0000000000 --- a/src/bse/K_diago_magnons_residual.F +++ /dev/null @@ -1,193 +0,0 @@ -! -! Copyright (C) 2000-2020 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine K_diago_herm_magnons_residual(i_BS_mat,BS_R_left,BS_R_right) - ! - ! Resonant Residuals - !==================== - ! BS_R_right(i) = \sum_k = - ! \sum_k BS_mat(k,i) x conjg( BSS_dipoles(k) ) - ! BS_R_left(i) = conjg( BS_R_right(i) ) - ! - use pars, ONLY:SP,cZERO - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset - use LIVE_t, ONLY:live_timing - use BS_solvers, ONLY:BSS_eh_Z,BSS_eh_f,BS_mat,BSS_n_eig,BSS_add_antiresonant - use BS, ONLY:BS_K_dim,BS_K_coupling,BS_res_ares_dim,l_BS_ares_asymm - use MAGNONS, ONLY:BSS_dipoles_magn - ! - implicit none - ! - integer, intent(in) :: i_BS_mat - complex(SP),intent(out) :: BS_R_left(2,BSS_n_eig),BS_R_right(2,BSS_n_eig) - ! - ! Workspace - ! - type(PP_indexes) ::px - integer ::i_lambda,i_range(2) - complex(SP) ::tmp_res_R(BS_K_dim(i_BS_mat),2),tmp_res_A(BS_K_dim(i_BS_mat),2) - ! - call PP_indexes_reset(px) - call PARALLEL_index(px,(/BSS_n_eig/)) - ! - i_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) - ! - BS_R_left =cZERO - BS_R_right=cZERO - ! - call live_timing('MAG residuals',px%n_of_elements(myid+1)) - ! - tmp_res_R(:,1) = BSS_dipoles_magn(1,i_range(1):i_range(2))*sqrt(cmplx(BSS_eh_f(i_range(1):i_range(2)),kind=SP)) - tmp_res_R(:,2) = BSS_dipoles_magn(2,i_range(1):i_range(2))*sqrt(cmplx(BSS_eh_f(i_range(1):i_range(2)),kind=SP)) - if (allocated(BSS_eh_Z)) then - tmp_res_R(:,1)=tmp_res_R(:,1)*sqrt(BSS_eh_Z(i_range(1):i_range(2))) - tmp_res_R(:,2)=tmp_res_R(:,2)*sqrt(BSS_eh_Z(i_range(1):i_range(2))) - endif - ! - do i_lambda=1,BSS_n_eig - ! - if (.not.px%element_1D(i_lambda)) cycle - ! - BS_R_left(1,i_lambda) =V_dot_V_omp(BS_K_dim(i_BS_mat),tmp_res_R(:,1),conjg(BS_mat(:,i_lambda))) - BS_R_left(2,i_lambda) =V_dot_V_omp(BS_K_dim(i_BS_mat),tmp_res_R(:,2),conjg(BS_mat(:,i_lambda))) - BS_R_right(:,i_lambda)=conjg(BS_R_left(:,i_lambda)) - ! - call live_timing(steps=1) - ! - enddo - ! - call live_timing() - ! - call PP_redux_wait(BS_R_left) - call PP_redux_wait(BS_R_right) - ! - call PP_indexes_reset(px) - ! -end subroutine K_diago_herm_magnons_residual -! -! -subroutine K_diago_non_herm_magnons_residual(BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) - ! - use pars, ONLY:SP,cZERO,cI - use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset - use LIVE_t, ONLY:live_timing - use BS_solvers, ONLY:BSS_eh_Z,BSS_eh_f,BSS_n_eig - use BS, ONLY:BS_K_dim,BS_H_dim - use MAGNONS, ONLY:BSS_dipoles_magn - ! - implicit none - ! - complex(SP),intent(out) :: BS_R_left(2,BSS_n_eig),BS_R_right(2,BSS_n_eig) - complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) - complex(SP),intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) - ! - ! Workspace - ! - type(PP_indexes) ::px - integer ::i_lambda - complex(SP) ::tmp_res(BS_H_dim,2) - complex(SP) ::BS_R_tmp(2,BSS_n_eig) - ! - call PP_indexes_reset(px) - call PARALLEL_index(px,(/BSS_n_eig/)) - ! - ! [1] BS_R_right(i)= - ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) - ! - BS_R_right=cZERO - ! - call live_timing('MAG R residuals',px%n_of_elements(myid+1)) - ! - tmp_res(:,1) = conjg(BSS_dipoles_magn(1,:))*sqrt(cmplx(BSS_eh_f(:),kind=SP)) - tmp_res(:,2) = conjg(BSS_dipoles_magn(2,:))*sqrt(cmplx(BSS_eh_f(:),kind=SP)) - ! - if (allocated(BSS_eh_Z)) then - tmp_res(:,1)=tmp_res(:,1)*sqrt(BSS_eh_Z(:)) - tmp_res(:,2)=tmp_res(:,2)*sqrt(BSS_eh_Z(:)) - endif - ! - do i_lambda=1,BSS_n_eig - if (.not.px%element_1D(i_lambda)) cycle - ! - BS_R_right(1,i_lambda)=V_dot_V_omp(BS_H_dim,tmp_res(:,1),BS_V_right(:,i_lambda)) - BS_R_right(2,i_lambda)=V_dot_V_omp(BS_H_dim,tmp_res(:,2),BS_V_right(:,i_lambda)) - ! - call live_timing(steps=1) - enddo - call PP_redux_wait(BS_R_right) - call live_timing - ! - ! [2] BS_R_tmp(i)= - ! = conjg( BS_V_left(k,i))*BSS_dipoles(k)*R_k - ! - BS_R_tmp=cZERO - ! - call live_timing('MAG L residuals',px%n_of_elements(myid+1)) - ! - tmp_res(:,1) = BSS_dipoles_magn(1,:) *sqrt(cmplx(BSS_eh_f(:),kind=SP)) - tmp_res(:,2) = BSS_dipoles_magn(2,:) *sqrt(cmplx(BSS_eh_f(:),kind=SP)) - ! - if (allocated(BSS_eh_Z)) then - tmp_res(:,1)=tmp_res(:,1)*sqrt(BSS_eh_Z(:)) - tmp_res(:,2)=tmp_res(:,2)*sqrt(BSS_eh_Z(:)) - endif - ! - do i_lambda=1,BSS_n_eig - ! - if (.not.px%element_1D(i_lambda)) cycle - ! - BS_R_tmp(1,i_lambda)=Vstar_dot_V_omp(BS_H_dim,BS_V_left(:,i_lambda),tmp_res(:,1)) - BS_R_tmp(2,i_lambda)=Vstar_dot_V_omp(BS_H_dim,BS_V_left(:,i_lambda),tmp_res(:,2)) - ! - call live_timing(steps=1) - ! - enddo - call PP_redux_wait(BS_R_tmp) - ! - call live_timing() - ! - ! [3] BS_R_left(i)=BS_overlap(i,j)BS_R_tmp(j) - ! - BS_R_left=cZERO - ! - call live_timing('MAG L x overlap',px%n_of_elements(myid+1)) - ! - do i_lambda=1,BSS_n_eig - ! - if (.not.px%element_1D(i_lambda)) cycle - ! - BS_R_left(1,i_lambda)=V_dot_V_omp(BSS_n_eig,BS_overlap(i_lambda,:),BS_R_tmp(1,:)) - BS_R_left(2,i_lambda)=V_dot_V_omp(BSS_n_eig,BS_overlap(i_lambda,:),BS_R_tmp(2,:)) - ! - call live_timing(steps=1) - enddo - call PP_redux_wait(BS_R_left) - call live_timing - ! - call PP_indexes_reset(px) - ! -end subroutine K_diago_non_herm_magnons_residual diff --git a/src/bse/K_diago_non_hermitian_residuals.F b/src/bse/K_diago_non_hermitian_residuals.F deleted file mode 100644 index 436d0df7dd..0000000000 --- a/src/bse/K_diago_non_hermitian_residuals.F +++ /dev/null @@ -1,156 +0,0 @@ -! -! Copyright (C) 2000-2020 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM, MG, DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) - ! - ! The right eigenvector v(j) of A satisfies - ! A * v(j) = lambda(j) * v(j) - ! where lambda(j) is its eigenvalue. - ! - ! The left eigenvector u(j) of A satisfies - ! u(j)**H * A = lambda(j) * u(j)**H - ! where u(j)**H denotes the conjugate transpose of u(j). - ! - ! Remember: 1/(w-H)= \sum_ij |i right>^{-1) - ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) - ! - BS_R_right=cZERO - ! - call live_timing('EPS R residuals',px%n_of_elements(myid+1)) - ! - tmp_res = conjg(BSS_dipoles_opt(1,:))*sqrt(cmplx(BSS_eh_f,kind=SP)) - ! - if (allocated(BSS_eh_Z) ) tmp_res=tmp_res*sqrt(BSS_eh_Z) - if (trim(global_gauge)=="velocity") tmp_res=tmp_res/BSS_eh_E - ! - do i1=1,BSS_n_eig - if (.not.px%element_1D(i1)) cycle - ! - BS_R_right(i1)=V_dot_V_omp(BS_H_dim,tmp_res,BS_V_right(:,i1)) - if (trim(global_gauge)=="velocity") BS_R_right(i1)=BS_R_right(i1)*BS_E(i1) - ! - call live_timing(steps=1) - enddo - call PP_redux_wait(BS_R_right) - call live_timing - ! - ! [2] BS_R_tmp(i)= - ! = conjg( BS_V_left(k,i))*BSS_dipoles(k)*R_k - ! - BS_R_tmp=cZERO - ! - call live_timing('EPS L residuals',px%n_of_elements(myid+1)) - ! - tmp_res = BSS_dipoles_opt(1,:)*sqrt(cmplx(BSS_eh_f,kind=SP)) - ! - do i1=1,BSS_n_eig - ! - if (.not.px%element_1D(i1)) cycle - ! - BS_R_tmp(i1)=Vstar_dot_V_omp(BS_H_dim,BS_V_left(:,i1),tmp_res) - if (trim(global_gauge)=="velocity") BS_R_tmp(i1)=BS_R_tmp(i1)*BS_E(i1) - ! - call live_timing(steps=1) - ! - enddo - call PP_redux_wait(BS_R_tmp) - ! - call live_timing() - ! - ! [3] BS_R_left(i)=BS_overlap(i,j)BS_R_tmp(j) - ! - BS_R_left=cZERO - ! - call live_timing('EPS L x overlap',px%n_of_elements(myid+1)) - do i1=1,BSS_n_eig - if (.not.px%element_1D(i1)) cycle - ! - BS_R_left(i1)=V_dot_V_omp(BSS_n_eig,BS_overlap(i1,:),BS_R_tmp) - ! - call live_timing(steps=1) - enddo - call PP_redux_wait(BS_R_left) - call live_timing - ! - call PP_indexes_reset(px) - ! -end subroutine K_diago_non_hermitian_residuals -! -! -subroutine K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) - ! - use pars, ONLY:SP,cZERO,cONE - use wrapper_omp, ONLY:M_by_M_omp - use interfaces, ONLY:LINEAR_ALGEBRA_driver - use LIVE_t, ONLY:live_timing - use linear_algebra, ONLY:INV - use BS, ONLY:BS_H_dim - use BS_solvers, ONLY:BSS_n_eig - ! - implicit none - ! - complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) - complex(SP),intent(out) :: BS_overlap(BSS_n_eig,BSS_n_eig) - ! - ! BS_overlap(i,j)=sum_k conjg(BS_V_left(k,i))*BS_V_right(k,j) - ! - BS_overlap=cZERO - ! - call live_timing('BSK overlap mat',1) - ! - call M_by_M_omp('c','n',BSS_n_eig,BSS_n_eig,BS_H_dim,cONE,BS_V_left,BS_H_dim,BS_V_right,BS_H_dim,cZERO,BS_overlap,BSS_n_eig) - ! - call LINEAR_ALGEBRA_driver(INV,M=BS_overlap) - call live_timing(steps=1) - call live_timing() - ! -end subroutine K_diago_overlap_matrix diff --git a/src/bse/K_diago_overlap_matrix.F b/src/bse/K_diago_overlap_matrix.F new file mode 100644 index 0000000000..d697371978 --- /dev/null +++ b/src/bse/K_diago_overlap_matrix.F @@ -0,0 +1,51 @@ +! +! Copyright (C) 2000-2020 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM, MG, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) + ! + use pars, ONLY:SP,cZERO,cONE + use wrapper_omp, ONLY:M_by_M_omp + use interfaces, ONLY:LINEAR_ALGEBRA_driver + use LIVE_t, ONLY:live_timing + use linear_algebra, ONLY:INV + use BS, ONLY:BS_H_dim + use BS_solvers, ONLY:BSS_n_eig + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) + complex(SP),intent(out) :: BS_overlap(BSS_n_eig,BSS_n_eig) + ! + ! BS_overlap(i,j)=sum_k conjg(BS_V_left(k,i))*BS_V_right(k,j) + ! + BS_overlap=cZERO + ! + call live_timing('BSK overlap mat',1) + ! + call M_by_M_omp('c','n',BSS_n_eig,BSS_n_eig,BS_H_dim,cONE,BS_V_left,BS_H_dim,BS_V_right,BS_H_dim,cZERO,BS_overlap,BSS_n_eig) + ! + call LINEAR_ALGEBRA_driver(INV,M=BS_overlap) + call live_timing(steps=1) + call live_timing() + ! +end subroutine K_diago_overlap_matrix diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index d2737a3232..a5ecddd3d9 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] ! @@ -39,7 +39,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS use units, ONLY:HA2EV use vec_operate, ONLY:degeneration_finder,sort use BS_solvers, ONLY:B_Hall - use X_m, ONLY:Epsilon_ij,X_magnons + use X_m, ONLY:Epsilon_ij,X_magnons,X_dichroism use PHOTOLUM, ONLY:PL,PL_prefactor use BS, ONLY:l_BS_kerr,l_BS_anomalous_Hall,l_BS_magnons,l_BS_photolum,l_BS_dichroism ! @@ -51,7 +51,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS complex(SP), pointer, intent(in) :: BS_R_left(:),BS_R_right(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_right_kerr(:) + complex(SP), pointer, intent(in) :: BS_R_right_kerr(:),BS_R_right_dich(:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) ! ! Work space @@ -65,7 +65,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS real(SP), allocatable :: vtmpR(:) complex(SP), allocatable :: BS_E_sorted_tmp(:,:) integer, allocatable :: sort_indx(:),first_exc(:),n_of_exc(:) - complex(SP) :: gauge_factor,res_kerr,res_magn(2) + complex(SP) :: gauge_factor,res_kerr,res_dich,res_magn(2) ! n_SOC=1 ares_fac=(-1)**(i_BS_mat-1) @@ -99,7 +99,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if (l_BS_kerr.and.l_BS_anomalous_Hall) then if (trim(global_gauge)=='length' ) gauge_factor=cONE if (trim(global_gauge)=='velocity') gauge_factor=BS_E(i1) - B_Hall(2)=B_Hall(2)+ BS_R_left(i1)*BS_R_right_kerr(i1) / gauge_factor **2._SP + B_Hall(2)=B_Hall(2)+ BS_R_left(i1)*BS_R_right_kerr(i1) / gauge_factor **2 endif ! if ( BS_perturbative_SOC) EXC_E(:)=BS_E(i1)+BS_E_SOC_corr(:,i1) @@ -146,6 +146,19 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS Epsilon_ij(:,2)=Epsilon_ij(:,2)+conjg(res_kerr)/(W%p(:)+conjg(EXC_E(i_pert_SOC))) endif endif + ! + if(l_BS_dichroism) then + res_dich=BS_R_left(i1)*BS_R_right_dich(i1)*ares_fac + if(l_BS_esort.and.i_BS_mat==1) then + BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_dich + nVAR=nVAR+1 + endif + X_dichroism(:,2)=X_dichroism(:,2)-res_dich/(W%p(:)-EXC_E(i_pert_SOC)) + if (BSS_add_antiresonant.and.BS_mat_res_ares_dim==1) then + X_dichroism(:,2)=X_dichroism(:,2)+conjg(res_dich)/(W%p(:)+conjg(EXC_E(i_pert_SOC))) + endif + endif + ! if(l_BS_magnons) then res_magn(:)=BS_R_left_magn(:,i1)*BS_R_right_magn(:,i1)*ares_fac if(l_BS_esort.and.i_BS_mat==1) then @@ -159,6 +172,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS X_magnons(:,2,2)=X_magnons(:,2,2)+conjg(res_magn(1))/(W%p(:)+conjg(EXC_E(i_pert_SOC))) endif endif + ! if(l_BS_photolum) then PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi if (BSS_add_antiresonant.and.BS_mat_res_ares_dim==1) then @@ -224,6 +238,10 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if(l_BS_anomalous_Hall) call PP_redux_wait(B_Hall(2)) endif ! + if(l_BS_dichroism) then + call PP_redux_wait(X_dichroism(:,2)) + endif + ! if(l_BS_magnons) then call PP_redux_wait(X_magnons(:,:,2)) endif @@ -267,6 +285,9 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS ! endif ! + ! Factors to be fixed + if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*Co_factor/(4._SP*pi) + ! if (l_BS_magnons) X_magnons(:,:,2)=X_magnons(:,:,2)*Co_factor/(4._SP*pi) ! end subroutine K_diago_response_functions diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F new file mode 100644 index 0000000000..33ed2ed170 --- /dev/null +++ b/src/bse/K_diago_right_residuals.F @@ -0,0 +1,94 @@ +! +! Copyright (C) 2000-2020 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) + ! + ! BS_R_right_XX(i)= + ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) + ! + use pars, ONLY:SP,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use X_m, ONLY:global_gauge + use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_n_eig,BSS_dipoles_opt + use BS, ONLY:BS_K_dim,BS_H_dim,BS_K_coupling + use MAGNONS, ONLY:BSS_dipoles_magn + use DICHROISM, ONLY:BSS_dipoles_dich + ! + implicit none + ! + character(*),intent(in) :: mode + integer, intent(in) :: i_BS_mat + complex(SP), intent(in) :: BS_E(BSS_n_eig) + complex(SP), intent(in) :: BS_V_right(BS_H_dim,BSS_n_eig) + complex(SP), intent(out) :: BS_R_right(BSS_n_eig) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i1,n_res,res_range(2) + logical ::velocity_correction + ! + complex(SP),allocatable :: tmp_res(:) + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + BS_R_right=cZERO + velocity_correction=trim(mode)=="abs".or.trim(mode)=="kerr".and.trim(global_gauge)=="velocity" + ! + if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) + if ( BS_K_coupling) res_range=(/1,BS_H_dim/) + ! + allocate(tmp_res(res_range(1):res_range(2))) + n_res=res_range(2)-res_range(1)+1 + ! + call live_timing(trim(mode)//' residuals ',px%n_of_elements(myid+1)) + ! + if(trim(mode)=="abs") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="kerr") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dich") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + ! + tmp_res = conjg(tmp_res)*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) + if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) + if (velocity_correction) tmp_res=tmp_res/BSS_eh_E(res_range(1):res_range(2)) + ! + do i1=1,BSS_n_eig + if (.not.px%element_1D(i1)) cycle + ! + BS_R_right(i1)=V_dot_V_omp(n_res,tmp_res,BS_V_right(:,i1)) + if (velocity_correction) BS_R_right(i1)=BS_R_right(i1)*BS_E(i1) + ! + call live_timing(steps=1) + enddo + call PP_redux_wait(BS_R_right) + call live_timing + ! + call PP_indexes_reset(px) + deallocate(tmp_res) + ! +end subroutine K_diago_right_residuals diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 9f486e4330..61d03294fe 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -34,7 +34,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use BS_solvers, ONLY:run_Slepc #endif use BS, ONLY:BS_not_const_eh_f,BSE_mode,BS_K_has_been_calculated_loaded,& - & BS_blks_free,l_BS_jdos,l_BS_abs + & BS_blks_free,l_BS_jdos,l_BS_abs,l_BS_dichroism use parallel_m, ONLY:master_cpu,CPU_structure use IO_m, ONLY:IO_and_Messaging_switch use linear_algebra, ONLY:INV,DIAGO @@ -140,9 +140,10 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! A possible alternative could be to use the algorithm with Cf ! from both the left and the right hand side to get from a single Haydock loop ! - if(l_BS_abs) call K_Haydock(iq,W_bss,"abs") - if(l_BS_kerr) call K_Haydock(iq,W_bss,"kerr") - if(l_BS_magnons) call K_Haydock(iq,W_bss,"magnons") + if(l_BS_abs) call K_Haydock(iq,W_bss,"abs") + if(l_BS_kerr) call K_Haydock(iq,W_bss,"kerr") + if(l_BS_magnons) call K_Haydock(iq,W_bss,"magnons") + if(l_BS_dichroism) call K_Haydock(iq,W_bss,"dichroism") ! endif ! diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 101de2c0af..f85548c102 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& -& bsL_magn,bsR_magn,bsR_kerr,bsR_pl) +& bsL_magn,bsR_magn,bsR_kerr,bsR_dich,bsR_pl) ! use pars, ONLY:SP,schlen,IP use stderr, ONLY:intc @@ -41,7 +41,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) , optional :: bsE(:) real(SP) ,pointer, optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer, optional :: bsR_kerr(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer, optional :: bsR_kerr(:),bsR_dich(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) ! ! Work Space ! @@ -136,6 +136,13 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& endif endif ! + if(present(bsR_dich)) then + if(associated(bsR_dich)) then + call io_bulk(ID,'BS_DICH_Residuals',VAR_SZ=(/2,BSS_n_eig/)) + call io_bulk(ID,C1=bsR_dich) + endif + endif + ! if(present(bsR_pl)) then if(associated(bsR_pl)) then call io_bulk(ID,'BS_PL_Residuals',VAR_SZ=(/2,BSS_n_eig/)) diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 95ae894695..6b31ef4b59 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -163,7 +163,7 @@ integer function variables_BS(ID,iq,local_desc,CLOSE_the_menu,X) end function ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& - & bsL_magn,bsR_magn,bsR_kerr,bsR_pl) + & bsL_magn,bsR_magn,bsR_kerr,bsR_dich,bsR_pl) use pars, ONLY:SP use X_m, ONLY:X_t implicit none @@ -171,7 +171,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) ,optional :: bsE(:) real(SP), pointer,optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer,optional :: bsR_kerr(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer,optional :: bsR_kerr(:),bsR_dich(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) end function ! integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn,Vnp1) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index bcbe8ed3dd..cc0af4ce58 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -192,7 +192,7 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) end subroutine ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP use frequency, ONLY:w_samp @@ -202,10 +202,23 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS complex(SP), pointer, intent(in) :: BS_R_left(:),BS_R_right(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_right_kerr(:) + complex(SP), pointer, intent(in) :: BS_R_right_kerr(:),BS_R_right_dich(:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine ! + subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) + use BS, ONLY:BS_H_dim + use BS_solvers, ONLY:BSS_n_eig + use pars, ONLY:SP + implicit none + character(*),intent(in) :: mode + integer, intent(in) :: i_BS_mat + complex(SP), intent(in) :: BS_E(BSS_n_eig) + complex(SP),target, intent(out) :: BS_R_left(BSS_n_eig) + complex(SP), intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig) + complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) + end subroutine K_diago_left_residuals + ! subroutine QP_DBs_merge(N,DBs,plan,N_qp,qp,OP,PRE_FAC,FILES) use pars, ONLY:SP use QP_m, ONLY:QP_t From bf264bcf3a281eb77f9158e3611446bd3d3bda92 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Jan 2021 17:30:33 +0100 Subject: [PATCH 0002/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 36 ++++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 16f50616d3..b4b082e003 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19381 h.ff14d8ad9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19387 h.d2f12644c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19381" -SHASH="ff14d8ad9" +SREVISION="19387" +SHASH="d2f12644c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index e9af92a4e8..1214772d83 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19381 h.ff14d8ad9. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19387 h.d2f12644c. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19381 h.ff14d8ad9' -PACKAGE_STRING='Yambo 5.0.1 r.19381 h.ff14d8ad9' +PACKAGE_VERSION='5.0.1 r.19387 h.d2f12644c' +PACKAGE_STRING='Yambo 5.0.1 r.19387 h.d2f12644c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -848,6 +848,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1014,6 +1015,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1266,6 +1268,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1403,7 +1414,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1516,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19381 h.ff14d8ad9 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19387 h.d2f12644c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1556,6 +1567,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1581,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19381 h.ff14d8ad9:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19387 h.d2f12644c:";; esac cat <<\_ACEOF @@ -1785,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19381 h.ff14d8ad9 +Yambo configure 5.0.1 r.19387 h.d2f12644c generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2464,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19381 h.ff14d8ad9, which was +It was created by Yambo $as_me 5.0.1 r.19387 h.d2f12644c, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2815,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19381" -SHASH="ff14d8ad9" +SREVISION="19387" +SHASH="d2f12644c" @@ -14827,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19381 h.ff14d8ad9, which was +This file was extended by Yambo $as_me 5.0.1 r.19387 h.d2f12644c, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14889,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19381 h.ff14d8ad9 +Yambo config.status 5.0.1 r.19387 h.d2f12644c configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 7711b139e7d5492bd3b48b871fdbc6f81aeb2d20 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Jan 2021 20:43:00 +0100 Subject: [PATCH 0003/1367] Version 5.0.1, Revision 19388, Hash bf264bcf3 MODIFIED * config/version/version.m4 configure bse/K_diago_driver.F bse/K_diago_left_residuals.F bse/K_diago_right_residuals.F Bugs: - Fixed bug in definition of velocity gauge logical Changes: - Some small improvements Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_diago_driver.F | 21 ++++++++++----------- src/bse/K_diago_left_residuals.F | 18 +++++++++--------- src/bse/K_diago_right_residuals.F | 14 +++++++------- 5 files changed, 40 insertions(+), 41 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index b4b082e003..3a5edff104 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19387 h.d2f12644c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19388 h.bf264bcf3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19387" -SHASH="d2f12644c" +SREVISION="19388" +SHASH="bf264bcf3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 1214772d83..9c1b64952f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19387 h.d2f12644c. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19388 h.bf264bcf3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19387 h.d2f12644c' -PACKAGE_STRING='Yambo 5.0.1 r.19387 h.d2f12644c' +PACKAGE_VERSION='5.0.1 r.19388 h.bf264bcf3' +PACKAGE_STRING='Yambo 5.0.1 r.19388 h.bf264bcf3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19387 h.d2f12644c to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19388 h.bf264bcf3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19387 h.d2f12644c:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19388 h.bf264bcf3:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19387 h.d2f12644c +Yambo configure 5.0.1 r.19388 h.bf264bcf3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19387 h.d2f12644c, which was +It was created by Yambo $as_me 5.0.1 r.19388 h.bf264bcf3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19387" -SHASH="d2f12644c" +SREVISION="19388" +SHASH="bf264bcf3" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19387 h.d2f12644c, which was +This file was extended by Yambo $as_me 5.0.1 r.19388 h.bf264bcf3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19387 h.d2f12644c +Yambo config.status 5.0.1 r.19388 h.bf264bcf3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index e950559f10..854d950759 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -230,20 +230,19 @@ subroutine K_diago_driver(iq,W,X_static) if(l_slepc) call MATRIX_slepc(slepc_mat,l_target_energy,BSS_n_eig,BS_mat,E_real=BS_E_real) #endif ! - BS_E=cmplx(BS_E_real,0._SP,SP) + BS_E=cmplx(BS_E_real,0._SP,kind=SP) ! endif ! #if defined _SLEPC && !defined _SLEPC_OFF ! - ! BSS_n_eig could be lowered by MATRIX_slepc - if (Input_n_eig>BSS_n_eig) then - call K_slepc_resize_variables() + if (l_slepc) then + ! BSS_n_eig could be lowered by MATRIX_slepc + if (Input_n_eig>BSS_n_eig) call K_slepc_resize_variables() + ! Destroy the matrix + call MatDestroy(slepc_mat,ierr) endif ! - ! Destroy the matrix - !============================ - if(l_slepc) call MatDestroy(slepc_mat,ierr) #endif ! if(l_diago) call live_timing( ) @@ -277,7 +276,8 @@ subroutine K_diago_driver(iq,W,X_static) else ! ! Right residuals - if(l_BS_optics ) call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right, BS_mat) + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & + & call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right, BS_mat) if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_mat) if(l_BS_magnons) then @@ -286,9 +286,8 @@ subroutine K_diago_driver(iq,W,X_static) endif ! ! Left residuals - if(l_BS_optics) BS_R_left=conjg(BS_R_right) - if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) - if(l_BS_kerr.or.l_BS_dichroism) call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left,BS_V_left) + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) BS_R_left=conjg(BS_R_right) + if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) ! ! DS: this also should be changed according to the general structure if(l_BS_photolum) call PL_diago_residual(BS_mat,BS_mat,BS_R_PL,K_is_not_hermitian) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index 4339011358..b8b4998f6f 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -51,7 +51,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over ! Workspace ! type(PP_indexes) :: px - integer :: i1,n_res,res_range(2) + integer :: i_lambda,n_res,res_range(2) logical :: velocity_correction character(13) :: scheme ! @@ -64,7 +64,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over if (.not.present(BS_overlap)) scheme="hermitian" if ( present(BS_overlap)) scheme="non-hermitian" ! - velocity_correction=trim(mode)=="abs".or.trim(mode)=="kerr".and.trim(global_gauge)=="velocity" + velocity_correction=trim(mode)=="opti".and.trim(global_gauge)=="velocity" ! if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) if ( BS_K_coupling) res_range=(/1,BS_H_dim/) @@ -91,12 +91,12 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) if (velocity_correction) tmp_res=tmp_res/BSS_eh_E(res_range(1):res_range(2)) ! - do i1=1,BSS_n_eig + do i_lambda=1,BSS_n_eig ! - if (.not.px%element_1D(i1)) cycle + if (.not.px%element_1D(i_lambda)) cycle ! - BS_R_tmp(i1)=Vstar_dot_V_omp(n_res,BS_V_left(:,i1),tmp_res) - if (velocity_correction) BS_R_tmp(i1)=BS_R_tmp(i1)*BS_E(i1) + BS_R_tmp(i_lambda)=Vstar_dot_V_omp(n_res,BS_V_left(:,i_lambda),tmp_res) + if (velocity_correction) BS_R_tmp(i_lambda)=BS_R_tmp(i_lambda)*BS_E(i_lambda) ! call live_timing(steps=1) ! @@ -112,10 +112,10 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over BS_R_left=cZERO ! call live_timing('EPS L x overlap',px%n_of_elements(myid+1)) - do i1=1,BSS_n_eig - if (.not.px%element_1D(i1)) cycle + do i_lambda=1,BSS_n_eig + if (.not.px%element_1D(i_lambda)) cycle ! - BS_R_left(i1)=V_dot_V_omp(BSS_n_eig,BS_overlap(i1,:),BS_R_tmp) + BS_R_left(i_lambda)=V_dot_V_omp(BSS_n_eig,BS_overlap(i_lambda,:),BS_R_tmp) ! call live_timing(steps=1) enddo diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index 33ed2ed170..ea9348f820 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -42,13 +42,13 @@ subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) character(*),intent(in) :: mode integer, intent(in) :: i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) - complex(SP), intent(in) :: BS_V_right(BS_H_dim,BSS_n_eig) complex(SP), intent(out) :: BS_R_right(BSS_n_eig) + complex(SP), intent(in) :: BS_V_right(BS_H_dim,BSS_n_eig) ! ! Workspace ! type(PP_indexes) ::px - integer ::i1,n_res,res_range(2) + integer ::i_lambda,n_res,res_range(2) logical ::velocity_correction ! complex(SP),allocatable :: tmp_res(:) @@ -57,7 +57,7 @@ subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) call PARALLEL_index(px,(/BSS_n_eig/)) ! BS_R_right=cZERO - velocity_correction=trim(mode)=="abs".or.trim(mode)=="kerr".and.trim(global_gauge)=="velocity" + velocity_correction=(trim(mode)=="abs".or.trim(mode)=="kerr").and.trim(global_gauge)=="velocity" ! if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) if ( BS_K_coupling) res_range=(/1,BS_H_dim/) @@ -77,11 +77,11 @@ subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) if (velocity_correction) tmp_res=tmp_res/BSS_eh_E(res_range(1):res_range(2)) ! - do i1=1,BSS_n_eig - if (.not.px%element_1D(i1)) cycle + do i_lambda=1,BSS_n_eig + if (.not.px%element_1D(i_lambda)) cycle ! - BS_R_right(i1)=V_dot_V_omp(n_res,tmp_res,BS_V_right(:,i1)) - if (velocity_correction) BS_R_right(i1)=BS_R_right(i1)*BS_E(i1) + BS_R_right(i_lambda)=V_dot_V_omp(n_res,tmp_res,BS_V_right(:,i_lambda)) + if (velocity_correction) BS_R_right(i_lambda)=BS_R_right(i_lambda)*BS_E(i_lambda) ! call live_timing(steps=1) enddo From fc045e8235319a835093f991f8175fd1eedbc0d5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Jan 2021 23:01:17 +0100 Subject: [PATCH 0004/1367] Version 5.0.1, Revision 19389, Hash 7711b139e MODIFIED * config/version/version.m4 configure bse/K_diago_driver.F bse/K_diago_left_residuals.F Bugs: - [yambo] Fixed definition of BS_R_left_magn Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_diago_driver.F | 4 ++-- src/bse/K_diago_left_residuals.F | 6 ++---- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 3a5edff104..936b35c2d6 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19388 h.bf264bcf3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19389 h.7711b139e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19388" -SHASH="bf264bcf3" +SREVISION="19389" +SHASH="7711b139e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 9c1b64952f..16da1638f5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19388 h.bf264bcf3. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19389 h.7711b139e. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19388 h.bf264bcf3' -PACKAGE_STRING='Yambo 5.0.1 r.19388 h.bf264bcf3' +PACKAGE_VERSION='5.0.1 r.19389 h.7711b139e' +PACKAGE_STRING='Yambo 5.0.1 r.19389 h.7711b139e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19388 h.bf264bcf3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19389 h.7711b139e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19388 h.bf264bcf3:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19389 h.7711b139e:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19388 h.bf264bcf3 +Yambo configure 5.0.1 r.19389 h.7711b139e generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19388 h.bf264bcf3, which was +It was created by Yambo $as_me 5.0.1 r.19389 h.7711b139e, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19388" -SHASH="bf264bcf3" +SREVISION="19389" +SHASH="7711b139e" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19388 h.bf264bcf3, which was +This file was extended by Yambo $as_me 5.0.1 r.19389 h.7711b139e, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19388 h.bf264bcf3 +Yambo config.status 5.0.1 r.19389 h.7711b139e configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 854d950759..5e98a2c346 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -266,8 +266,8 @@ subroutine K_diago_driver(iq,W,X_static) if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & & call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) if(l_BS_magnons) then - call K_diago_left_residuals("magn1",i_BS_mat,BS_E,BS_R_left_magn(1,:),BS_V_left,BS_overlap) - if(n_spinor==2) call K_diago_left_residuals("magn2",i_BS_mat,BS_E,BS_R_left_magn(2,:),BS_V_left,BS_overlap) + call K_diago_left_residuals("mag1",i_BS_mat,BS_E,BS_R_left_magn(1,:),BS_V_left,BS_overlap) + if(n_spinor==2) call K_diago_left_residuals("mag2",i_BS_mat,BS_E,BS_R_left_magn(2,:),BS_V_left,BS_overlap) endif ! ! DS: this also should be changed according to the general structure diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index b8b4998f6f..7da4e75bc0 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -64,7 +64,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over if (.not.present(BS_overlap)) scheme="hermitian" if ( present(BS_overlap)) scheme="non-hermitian" ! - velocity_correction=trim(mode)=="opti".and.trim(global_gauge)=="velocity" + velocity_correction=(trim(mode)=="opti").and.(trim(global_gauge)=="velocity") ! if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) if ( BS_K_coupling) res_range=(/1,BS_H_dim/) @@ -73,9 +73,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over n_res=res_range(2)-res_range(1)+1 ! if (trim(scheme)=="hermitian") BS_R_tmp => BS_R_left - if (trim(scheme)=="non-hermitian") then - allocate(BS_R_tmp(BSS_n_eig)) - endif + if (trim(scheme)=="non-hermitian") allocate(BS_R_tmp(BSS_n_eig)) ! ! [1] BS_R_tmp(i)= ! = conjg( BS_V_left(k,i))*BSS_dipoles(k)*R_k From b39bfe67762efc60e3f8064aef88f07eb552eb7c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Jan 2021 23:20:45 +0100 Subject: [PATCH 0005/1367] Version 5.0.1, Revision 19390, Hash fc045e823 MODIFIED * config/version/version.m4 configure bse/K_diago_driver.F bse/K_diago_left_residuals.F bse/K_diago_right_residuals.F modules/mod_interfaces.F Bugs: - [yambo] Left and right residuals need to use assumed size arrays for magnons with n_sp_pol=1 Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_diago_driver.F | 5 +++-- src/bse/K_diago_left_residuals.F | 4 ++-- src/bse/K_diago_right_residuals.F | 4 ++-- src/modules/mod_interfaces.F | 16 +++++++++++++--- 6 files changed, 34 insertions(+), 23 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 936b35c2d6..f36dd1ea9f 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19389 h.7711b139e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19390 h.fc045e823, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19389" -SHASH="7711b139e" +SREVISION="19390" +SHASH="fc045e823" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 16da1638f5..f8282784d5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19389 h.7711b139e. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19390 h.fc045e823. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19389 h.7711b139e' -PACKAGE_STRING='Yambo 5.0.1 r.19389 h.7711b139e' +PACKAGE_VERSION='5.0.1 r.19390 h.fc045e823' +PACKAGE_STRING='Yambo 5.0.1 r.19390 h.fc045e823' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19389 h.7711b139e to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19390 h.fc045e823 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19389 h.7711b139e:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19390 h.fc045e823:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19389 h.7711b139e +Yambo configure 5.0.1 r.19390 h.fc045e823 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19389 h.7711b139e, which was +It was created by Yambo $as_me 5.0.1 r.19390 h.fc045e823, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19389" -SHASH="7711b139e" +SREVISION="19390" +SHASH="fc045e823" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19389 h.7711b139e, which was +This file was extended by Yambo $as_me 5.0.1 r.19390 h.fc045e823, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19389 h.7711b139e +Yambo config.status 5.0.1 r.19390 h.fc045e823 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 5e98a2c346..b20980d02e 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -39,7 +39,8 @@ subroutine K_diago_driver(iq,W,X_static) use com, ONLY:isec use LIVE_t, ONLY:live_timing use linear_algebra, ONLY:DIAGO - use interfaces, ONLY:K_diago_response_functions,K_diago_left_residuals,LINEAR_ALGEBRA_driver + use interfaces, ONLY:K_diago_response_functions,LINEAR_ALGEBRA_driver,& + & K_diago_left_residuals,K_diago_right_residuals use IO_m, ONLY:io_control,REP,VERIFY,OP_WR_CL,OP_RD_CL use parser_m, ONLY:parser use timing_m, ONLY:timing @@ -59,7 +60,7 @@ subroutine K_diago_driver(iq,W,X_static) use slepcepsdef use petscmatdef ! - use BS_solvers, ONLY:BSS_slepc_matrix,BSS_slepc_double_grp,Slepc_v,BS_HAYVEC_free + use BS_solvers, ONLY:BSS_slepc_matrix,Slepc_v,BS_HAYVEC_free #endif use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_photolum use MAGNONS, ONLY:BSS_MAGN_free diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index 7da4e75bc0..fd07a54bb5 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) +subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) ! ! The left eigenvector u(j) of A satisfies ! u(j)**H * A = lambda(j) * u(j)**H @@ -45,7 +45,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over integer, intent(in) :: i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) complex(SP),target, intent(out) :: BS_R_left(BSS_n_eig) - complex(SP), intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig) + complex(SP), intent(in) :: BS_V_left(:,:) complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) ! ! Workspace diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index ea9348f820..07590a579a 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) +subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) ! ! BS_R_right_XX(i)= ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) @@ -43,7 +43,7 @@ subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) integer, intent(in) :: i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) complex(SP), intent(out) :: BS_R_right(BSS_n_eig) - complex(SP), intent(in) :: BS_V_right(BS_H_dim,BSS_n_eig) + complex(SP), intent(in) :: BS_V_right(:,:) ! ! Workspace ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index cc0af4ce58..2776594786 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -206,8 +206,18 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine ! - subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) - use BS, ONLY:BS_H_dim + subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) + use BS_solvers, ONLY:BSS_n_eig + use pars, ONLY:SP + implicit none + character(*),intent(in) :: mode + integer, intent(in) :: i_BS_mat + complex(SP), intent(in) :: BS_E(BSS_n_eig) + complex(SP), intent(out) :: BS_R_right(BSS_n_eig) + complex(SP), intent(in) :: BS_V_right(:,:) + end subroutine K_diago_right_residuals + ! + subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP implicit none @@ -215,7 +225,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over integer, intent(in) :: i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) complex(SP),target, intent(out) :: BS_R_left(BSS_n_eig) - complex(SP), intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig) + complex(SP), intent(in) :: BS_V_left(:,:) complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) end subroutine K_diago_left_residuals ! From d4083a8032b9f526b5a4f70cb9fade17216e6bb4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Jan 2021 23:29:28 +0100 Subject: [PATCH 0006/1367] Version 5.0.1, Revision 19391, Hash b39bfe677 MODIFIED * config/version/version.m4 configure bse/K_diago_driver.F bse/K_diago_response_functions.F modules/mod_interfaces.F Changes: - [yambo] Variables renaming Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++--- configure | 22 +++++++++--------- src/bse/K_diago_driver.F | 34 ++++++++++++++-------------- src/bse/K_diago_response_functions.F | 12 +++++----- src/modules/mod_interfaces.F | 4 ++-- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index f36dd1ea9f..c8cbf79be1 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19390 h.fc045e823, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19391 h.b39bfe677, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19390" -SHASH="fc045e823" +SREVISION="19391" +SHASH="b39bfe677" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index f8282784d5..ec001ef432 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19390 h.fc045e823. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19391 h.b39bfe677. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19390 h.fc045e823' -PACKAGE_STRING='Yambo 5.0.1 r.19390 h.fc045e823' +PACKAGE_VERSION='5.0.1 r.19391 h.b39bfe677' +PACKAGE_STRING='Yambo 5.0.1 r.19391 h.b39bfe677' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19390 h.fc045e823 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19391 h.b39bfe677 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19390 h.fc045e823:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19391 h.b39bfe677:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19390 h.fc045e823 +Yambo configure 5.0.1 r.19391 h.b39bfe677 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19390 h.fc045e823, which was +It was created by Yambo $as_me 5.0.1 r.19391 h.b39bfe677, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19390" -SHASH="fc045e823" +SREVISION="19391" +SHASH="b39bfe677" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19390 h.fc045e823, which was +This file was extended by Yambo $as_me 5.0.1 r.19391 h.b39bfe677, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19390 h.fc045e823 +Yambo config.status 5.0.1 r.19391 h.b39bfe677 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index b20980d02e..bff85b24b0 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -101,8 +101,8 @@ subroutine K_diago_driver(iq,W,X_static) ! Residuals, different for each response function !================================================= ! - complex(SP),pointer :: BS_R_left(:) => null() - complex(SP),pointer :: BS_R_right(:) => null() + complex(SP),pointer :: BS_R_left_abs(:) => null() + complex(SP),pointer :: BS_R_right_abs(:) => null() ! real(SP), pointer :: BS_R_PL(:,:) => null() ! @@ -160,7 +160,7 @@ subroutine K_diago_driver(iq,W,X_static) ! Diagonalization DB (IN) !======================== call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) - io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& + io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! K_is_not_hermitian=BS_K_coupling.or.(allocated(BSS_eh_W).and..not.BSS_perturbative_width) @@ -253,7 +253,7 @@ subroutine K_diago_driver(iq,W,X_static) if (K_is_not_hermitian) then ! ! Right residuals - if(l_BS_optics ) call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right, BS_V_right) + if(l_BS_optics ) call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_V_right) if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_V_right) if(l_BS_magnons) then @@ -265,7 +265,7 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Left residuals if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & - & call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) + & call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left_abs,BS_V_left,BS_overlap) if(l_BS_magnons) then call K_diago_left_residuals("mag1",i_BS_mat,BS_E,BS_R_left_magn(1,:),BS_V_left,BS_overlap) if(n_spinor==2) call K_diago_left_residuals("mag2",i_BS_mat,BS_E,BS_R_left_magn(2,:),BS_V_left,BS_overlap) @@ -278,7 +278,7 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Right residuals if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & - & call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right, BS_mat) + & call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_mat) if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_mat) if(l_BS_magnons) then @@ -287,7 +287,7 @@ subroutine K_diago_driver(iq,W,X_static) endif ! ! Left residuals - if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) BS_R_left=conjg(BS_R_right) + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) BS_R_left_abs =conjg(BS_R_right_abs) if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) ! ! DS: this also should be changed according to the general structure @@ -316,9 +316,9 @@ subroutine K_diago_driver(iq,W,X_static) ! endif ! - ! Now I calculate epsilon - !========================= - call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& + ! Now I calculate the physical quantities + !========================================= + call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! Diagonalization DB (OUT) @@ -326,7 +326,7 @@ subroutine K_diago_driver(iq,W,X_static) if (io_err/=0) then ! call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) - io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& + io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! endif @@ -366,8 +366,8 @@ subroutine local_alloc(what) YAMBO_ALLOC_P(BS_E_SOC_corr,(2/n_sp_pol,BSS_n_eig)) endif if (l_BS_optics) then - YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) - YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_left_abs,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_right_abs,(BSS_n_eig)) endif if (l_BS_kerr) then YAMBO_ALLOC_P(BS_R_right_kerr,(BSS_n_eig)) @@ -417,8 +417,8 @@ subroutine local_free() YAMBO_FREE(BS_V_left) YAMBO_FREE_P(BS_overlap) YAMBO_FREE_P(BS_E_SOC_corr) - YAMBO_FREE_P(BS_R_right) - YAMBO_FREE_P(BS_R_left) + YAMBO_FREE_P(BS_R_right_abs) + YAMBO_FREE_P(BS_R_left_abs) YAMBO_FREE_P(BS_R_right_kerr) YAMBO_FREE_P(BS_R_right_dich) YAMBO_FREE_P(BS_R_right_magn) @@ -443,8 +443,8 @@ subroutine K_slepc_resize_variables() if(allocated(BS_corrections)) call BSS_resize(BS_corrections) if(associated(BS_E_SOC_corr)) call BSS_resize(BS_E_SOC_corr) ! - if(associated(BS_R_left) ) call BSS_resize(BS_R_left) - if(associated(BS_R_right)) call BSS_resize(BS_R_right) + if(associated(BS_R_left_abs) ) call BSS_resize(BS_R_left_abs) + if(associated(BS_R_right_abs)) call BSS_resize(BS_R_right_abs) ! if(associated(BS_R_right_kerr)) call BSS_resize(BS_R_right_kerr) if(associated(BS_R_right_dich)) call BSS_resize(BS_R_right_dich) diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index a5ecddd3d9..8b900baa41 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& +subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] @@ -48,7 +48,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS type(w_samp),intent(in) :: W integer, intent(in) :: iq,i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) - complex(SP), pointer, intent(in) :: BS_R_left(:),BS_R_right(:) + complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) complex(SP), pointer, intent(in) :: BS_R_right_kerr(:),BS_R_right_dich(:) @@ -99,7 +99,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if (l_BS_kerr.and.l_BS_anomalous_Hall) then if (trim(global_gauge)=='length' ) gauge_factor=cONE if (trim(global_gauge)=='velocity') gauge_factor=BS_E(i1) - B_Hall(2)=B_Hall(2)+ BS_R_left(i1)*BS_R_right_kerr(i1) / gauge_factor **2 + B_Hall(2)=B_Hall(2)+ BS_R_left_abs(i1)*BS_R_right_kerr(i1) / gauge_factor **2 endif ! if ( BS_perturbative_SOC) EXC_E(:)=BS_E(i1)+BS_E_SOC_corr(:,i1) @@ -121,7 +121,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif ! if(l_BS_abs) then - res_abs=BS_R_left(i1)*BS_R_right(i1)*ares_fac + res_abs=BS_R_left_abs(i1)*BS_R_right_abs(i1)*ares_fac if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_abs nVAR=nVAR+1 @@ -136,7 +136,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif ! if(l_BS_kerr) then - res_kerr=BS_R_left(i1)*BS_R_right_kerr(i1)*ares_fac + res_kerr=BS_R_left_abs(i1)*BS_R_right_kerr(i1)*ares_fac if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_kerr nVAR=nVAR+1 @@ -148,7 +148,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif ! if(l_BS_dichroism) then - res_dich=BS_R_left(i1)*BS_R_right_dich(i1)*ares_fac + res_dich=BS_R_left_abs(i1)*BS_R_right_dich(i1)*ares_fac if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_dich nVAR=nVAR+1 diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 2776594786..4475a5492e 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -191,7 +191,7 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) integer , optional :: E_k_ind(n_sp_pol,2) ! k->k' of the indirect gap end subroutine ! - subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& + subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP @@ -199,7 +199,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS type(w_samp),intent(in) :: W integer, intent(in) :: iq,i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) - complex(SP), pointer, intent(in) :: BS_R_left(:),BS_R_right(:) + complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) complex(SP), pointer, intent(in) :: BS_R_right_kerr(:),BS_R_right_dich(:) From 5814a8ab3120f9231e2817c153c5d16da29f1dc6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 15 Jan 2021 11:24:44 +0100 Subject: [PATCH 0007/1367] Version 5.0.1, Revision 19408, Hash 346abf18c MODIFIED * config/version/version.m4 configure Changes: - configure updated Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 04cbee13fb..0d180e964a 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19400 h.d4083a803, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19408 h.346abf18c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19400" -SHASH="d4083a803" +SREVISION="19408" +SHASH="346abf18c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 8f42bbda5e..3962294493 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19392 h.2f1c06292. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19408 h.346abf18c. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19392 h.2f1c06292' -PACKAGE_STRING='Yambo 5.0.1 r.19392 h.2f1c06292' +PACKAGE_VERSION='5.0.1 r.19408 h.346abf18c' +PACKAGE_STRING='Yambo 5.0.1 r.19408 h.346abf18c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19392 h.2f1c06292 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19408 h.346abf18c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19392 h.2f1c06292:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19408 h.346abf18c:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19392 h.2f1c06292 +Yambo configure 5.0.1 r.19408 h.346abf18c generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19392 h.2f1c06292, which was +It was created by Yambo $as_me 5.0.1 r.19408 h.346abf18c, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19392" -SHASH="2f1c06292" +SREVISION="19408" +SHASH="346abf18c" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19392 h.2f1c06292, which was +This file was extended by Yambo $as_me 5.0.1 r.19408 h.346abf18c, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19392 h.2f1c06292 +Yambo config.status 5.0.1 r.19408 h.346abf18c configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From ef160a015a4e003b3c7a149b8fcce6319bfb3114 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 15 Jan 2021 13:26:51 +0100 Subject: [PATCH 0008/1367] Version 5.0.1, Revision 19409, Hash 5814a8ab3 MODIFIED * config/version/version.m4 configure bse/K_Haydock.F bse/K_Haydock_response.F bse/K_diago_response_functions.F Changes: - [yambo] Fixed pre-factors for dichroism Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_Haydock.F | 3 ++- src/bse/K_Haydock_response.F | 8 +++++++- src/bse/K_diago_response_functions.F | 7 ++++--- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 0d180e964a..eae93f2aa3 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19408 h.346abf18c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19409 h.5814a8ab3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19408" -SHASH="346abf18c" +SREVISION="19409" +SHASH="5814a8ab3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 3962294493..6dd4babc6e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19408 h.346abf18c. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19409 h.5814a8ab3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19408 h.346abf18c' -PACKAGE_STRING='Yambo 5.0.1 r.19408 h.346abf18c' +PACKAGE_VERSION='5.0.1 r.19409 h.5814a8ab3' +PACKAGE_STRING='Yambo 5.0.1 r.19409 h.5814a8ab3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19408 h.346abf18c to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19409 h.5814a8ab3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19408 h.346abf18c:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19409 h.5814a8ab3:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19408 h.346abf18c +Yambo configure 5.0.1 r.19409 h.5814a8ab3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19408 h.346abf18c, which was +It was created by Yambo $as_me 5.0.1 r.19409 h.5814a8ab3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19408" -SHASH="346abf18c" +SREVISION="19409" +SHASH="5814a8ab3" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19408 h.346abf18c, which was +This file was extended by Yambo $as_me 5.0.1 r.19409 h.5814a8ab3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19408 h.346abf18c +Yambo config.status 5.0.1 r.19409 h.5814a8ab3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 8d6ba7aeb0..f4559e2b6a 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -24,6 +24,7 @@ subroutine K_Haydock(iq,W,mode) ! use pars, ONLY:SP,schlen,cI,cZERO,cONE,pi use functions, ONLY:NAN + use R_lattice, ONLY:q0_def_norm use X_m, ONLY:global_gauge use wrapper_omp, ONLY:V_by_V_plus_V_omp use frequency, ONLY:w_samp @@ -240,7 +241,7 @@ subroutine K_Haydock(iq,W,mode) do i_g=1,BS_nT_grps if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle if (trim(mode)=="kerr") W0(i_g)%fragment = BS_T_grp(i_g)%dipoles_opt(1,:,1) - if (trim(mode)=="dichroism") W0(i_g)%fragment = BS_T_grp(i_g)%dipoles_dic(1,:,1) + if (trim(mode)=="dichroism") W0(i_g)%fragment = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm W0(i_g)%fragment = W0(i_g)%fragment*(sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP))) if(velocity_correction) V_tmp(i_g)%fragment = W0(i_g)%fragment/BS_T_grp(i_g)%E enddo diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index 2da36d3b8d..0cb601ee66 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -23,8 +23,9 @@ subroutine K_Haydock_response(iq,it,Cf_size,mode,scheme,W,Af,Bf,Cf,reached_threshold) ! use pars, ONLY:SP,schlen,cI,cZERO,cONE,pi + use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Epsilon_ii,Joint_DOS,X_drude_term,global_gauge,skip_cond_sum_rule, & -& X_magnons,Epsilon_ij +& X_magnons,X_dichroism,Epsilon_ij use R_lattice, ONLY:bare_qpg use frequency, ONLY:w_samp use BS, ONLY:BSE_mode,l_BS_anomalous_Hall @@ -236,6 +237,8 @@ subroutine K_Haydock_response(iq,it,Cf_size,mode,scheme,W,Af,Bf,Cf,reached_thres Epsilon_ij(iw,i_eps(:))= -X_o(1:2,1) case("magnons") X_magnons(iw,1,i_eps(:))=-X_o(1:2,1)*Co/(4._SP*pi) + case("dichroism") + X_dichroism(iw,i_eps(:))=-X_o(1:2,1)*Co/(4._SP*pi)*(-1/SPEED_OF_LIGHT) end select ! enddo @@ -281,6 +284,9 @@ subroutine K_Haydock_response(iq,it,Cf_size,mode,scheme,W,Af,Bf,Cf,reached_thres case("magnons") sums=(X_magnons(iw,1,2)+X_magnons(iw,1,4))/2._SP diff= X_magnons(iw,1,2)-X_magnons(iw,1,4) + case("dichroism") + sums=(X_dichroism(iw,2)+X_dichroism(iw,4))/2._SP + diff= X_dichroism(iw,2)-X_dichroism(iw,4) end select ! update_thresh = abs(real(sums))>0._SP .and. abs(aimag(sums))>0._SP diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 8b900baa41..405fbd156c 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -27,6 +27,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] ! use pars, ONLY:cZERO,cONE,SP,pi,rZERO + use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Epsilon_ii,Joint_DOS,BS_E_sorted,X_drude_term,global_gauge,skip_cond_sum_rule use electrons, ONLY:n_sp_pol use frequency, ONLY:w_samp @@ -35,7 +36,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ use LIVE_t, ONLY:live_timing use BS, ONLY:BS_perturbative_SOC,BS_mat_res_ares_dim,l_BS_abs,l_BS_jdos,l_BS_esort use BS_solvers, ONLY:BSS_n_eig,BSS_add_antiresonant,Co_factor,diam_term_exact,BSS_eels_to_eps - use R_lattice, ONLY:bare_qpg + use R_lattice, ONLY:bare_qpg,q0_def_norm use units, ONLY:HA2EV use vec_operate, ONLY:degeneration_finder,sort use BS_solvers, ONLY:B_Hall @@ -148,7 +149,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ endif ! if(l_BS_dichroism) then - res_dich=BS_R_left_abs(i1)*BS_R_right_dich(i1)*ares_fac + res_dich=BS_R_left_abs(i1)*BS_R_right_dich(i1)*ares_fac/q0_def_norm if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_dich nVAR=nVAR+1 @@ -286,7 +287,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ endif ! ! Factors to be fixed - if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*Co_factor/(4._SP*pi) + if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*(-1/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) ! if (l_BS_magnons) X_magnons(:,:,2)=X_magnons(:,:,2)*Co_factor/(4._SP*pi) ! From 650b836b055e82af0d925320ba31a6824516165a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 15 Jan 2021 14:45:31 +0100 Subject: [PATCH 0009/1367] Version 5.0.1, Revision 19410, Hash ef160a015 MODIFIED * config/version/version.m4 configure bse/K_components_folded_in_serial_arrays.F Bugs: - [yambo] Fixed small bug in dichroism with diago Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++--- configure | 22 +++++++++---------- .../K_components_folded_in_serial_arrays.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index eae93f2aa3..906f92930e 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19409 h.5814a8ab3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19410 h.ef160a015, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19409" -SHASH="5814a8ab3" +SREVISION="19410" +SHASH="ef160a015" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 6dd4babc6e..d44cb30c4f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19409 h.5814a8ab3. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19410 h.ef160a015. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19409 h.5814a8ab3' -PACKAGE_STRING='Yambo 5.0.1 r.19409 h.5814a8ab3' +PACKAGE_VERSION='5.0.1 r.19410 h.ef160a015' +PACKAGE_STRING='Yambo 5.0.1 r.19410 h.ef160a015' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19409 h.5814a8ab3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19410 h.ef160a015 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19409 h.5814a8ab3:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19410 h.ef160a015:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19409 h.5814a8ab3 +Yambo configure 5.0.1 r.19410 h.ef160a015 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19409 h.5814a8ab3, which was +It was created by Yambo $as_me 5.0.1 r.19410 h.ef160a015, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19409" -SHASH="5814a8ab3" +SREVISION="19410" +SHASH="ef160a015" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19409 h.5814a8ab3, which was +This file was extended by Yambo $as_me 5.0.1 r.19410 h.ef160a015, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19409 h.5814a8ab3 +Yambo config.status 5.0.1 r.19410 h.ef160a015 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index ea9456f803..1d11e59a9b 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -121,7 +121,7 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_magnons) BSS_dipoles_magn(:,H_pos)=BS_T_grp(i_g)%dipoles_mag(:,i_Tr,i_res_ares_solver) ! - if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_c,i_res_ares_solver) + if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) ! if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:) ! From 9387047a322779be0851c4e57b78e6ce7a357372 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 21 Jan 2021 14:19:38 +0100 Subject: [PATCH 0010/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 6f48881355..44ab2b53a3 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19413 h.0d20cb0, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19426 h.56dbdb584, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19413" -SHASH="0d20cb0" +SREVISION="19426" +SHASH="56dbdb584" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 86736276e2..98eeb4559f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19413 h.0d20cb0. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19426 h.56dbdb584. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19413 h.0d20cb0' -PACKAGE_STRING='Yambo 5.0.1 r.19413 h.0d20cb0' +PACKAGE_VERSION='5.0.1 r.19426 h.56dbdb584' +PACKAGE_STRING='Yambo 5.0.1 r.19426 h.56dbdb584' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19413 h.0d20cb0 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19426 h.56dbdb584 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19413 h.0d20cb0:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19426 h.56dbdb584:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19413 h.0d20cb0 +Yambo configure 5.0.1 r.19426 h.56dbdb584 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19413 h.0d20cb0, which was +It was created by Yambo $as_me 5.0.1 r.19426 h.56dbdb584, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19413" -SHASH="0d20cb0" +SREVISION="19426" +SHASH="56dbdb584" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19413 h.0d20cb0, which was +This file was extended by Yambo $as_me 5.0.1 r.19426 h.56dbdb584, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19413 h.0d20cb0 +Yambo config.status 5.0.1 r.19426 h.56dbdb584 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 2a26a03a039958bf66af606bf4eacdc9be463334 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 5 Feb 2021 15:27:36 +0100 Subject: [PATCH 0011/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index ee562f9edf..93e9790f55 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19458 h.e8859890f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19473 h.2274591df, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19458" -SHASH="e8859890f" +SREVISION="19473" +SHASH="2274591df" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index aefe125804..2a6f5a5e83 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19458 h.e8859890f. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19473 h.2274591df. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19458 h.e8859890f' -PACKAGE_STRING='Yambo 5.0.0 r.19458 h.e8859890f' +PACKAGE_VERSION='5.0.0 r.19473 h.2274591df' +PACKAGE_STRING='Yambo 5.0.0 r.19473 h.2274591df' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19458 h.e8859890f to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19473 h.2274591df to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19458 h.e8859890f:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19473 h.2274591df:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19458 h.e8859890f +Yambo configure 5.0.0 r.19473 h.2274591df generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19458 h.e8859890f, which was +It was created by Yambo $as_me 5.0.0 r.19473 h.2274591df, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19458" -SHASH="e8859890f" +SREVISION="19473" +SHASH="2274591df" @@ -14839,7 +14839,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19458 h.e8859890f, which was +This file was extended by Yambo $as_me 5.0.0 r.19473 h.2274591df, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14901,7 +14901,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19458 h.e8859890f +Yambo config.status 5.0.0 r.19473 h.2274591df configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 84b070a1965c19556d70697b23844986f0722d9c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 24 Feb 2021 12:41:59 +0100 Subject: [PATCH 0012/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 61ed4f938f..2b6dae3bcc 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19475 h.598400703, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19506 h.4d6b06ef0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19475" -SHASH="598400703" +SREVISION="19506" +SHASH="4d6b06ef0" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 50d2db79ed..7d80b69435 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19475 h.598400703. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19506 h.4d6b06ef0. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19475 h.598400703' -PACKAGE_STRING='Yambo 5.0.0 r.19475 h.598400703' +PACKAGE_VERSION='5.0.0 r.19506 h.4d6b06ef0' +PACKAGE_STRING='Yambo 5.0.0 r.19506 h.4d6b06ef0' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19475 h.598400703 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19506 h.4d6b06ef0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19475 h.598400703:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19506 h.4d6b06ef0:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19475 h.598400703 +Yambo configure 5.0.0 r.19506 h.4d6b06ef0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19475 h.598400703, which was +It was created by Yambo $as_me 5.0.0 r.19506 h.4d6b06ef0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19475" -SHASH="598400703" +SREVISION="19506" +SHASH="4d6b06ef0" @@ -14846,7 +14846,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19475 h.598400703, which was +This file was extended by Yambo $as_me 5.0.0 r.19506 h.4d6b06ef0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14908,7 +14908,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19475 h.598400703 +Yambo config.status 5.0.0 r.19506 h.4d6b06ef0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 1a477a4cfd09c673ea07278fa05d9d375169b47c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 24 Feb 2021 17:21:05 +0100 Subject: [PATCH 0013/1367] Version 5.0.0, Revision 19507, Hash 84b070a MODIFIED * modified: modified: modified: modified: Bugs: - [yambo] Workaround for issue #428 Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/xc_functionals/XC_eval_lda_kernel.F | 4 +++- src/xc_functionals/XC_libxc_driver.F | 8 +++++++- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 2b6dae3bcc..dd04e7f9d5 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19506 h.4d6b06ef0, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19507 h.84b070a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19506" -SHASH="4d6b06ef0" +SREVISION="19507" +SHASH="84b070a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 7d80b69435..e9a478208a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19506 h.4d6b06ef0. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19507 h.84b070a. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19506 h.4d6b06ef0' -PACKAGE_STRING='Yambo 5.0.0 r.19506 h.4d6b06ef0' +PACKAGE_VERSION='5.0.0 r.19507 h.84b070a' +PACKAGE_STRING='Yambo 5.0.0 r.19507 h.84b070a' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19506 h.4d6b06ef0 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19507 h.84b070a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19506 h.4d6b06ef0:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19507 h.84b070a:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19506 h.4d6b06ef0 +Yambo configure 5.0.0 r.19507 h.84b070a generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19506 h.4d6b06ef0, which was +It was created by Yambo $as_me 5.0.0 r.19507 h.84b070a, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19506" -SHASH="4d6b06ef0" +SREVISION="19507" +SHASH="84b070a" @@ -14846,7 +14846,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19506 h.4d6b06ef0, which was +This file was extended by Yambo $as_me 5.0.0 r.19507 h.84b070a, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14908,7 +14908,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19506 h.4d6b06ef0 +Yambo config.status 5.0.0 r.19507 h.84b070a configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/xc_functionals/XC_eval_lda_kernel.F b/src/xc_functionals/XC_eval_lda_kernel.F index 217d8d10f3..de2323f3a4 100644 --- a/src/xc_functionals/XC_eval_lda_kernel.F +++ b/src/xc_functionals/XC_eval_lda_kernel.F @@ -38,7 +38,9 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) real(SP):: one_over_magn,mod_mag ! if (n_spin==1) then - forall(ifft=1:fft_size) F_xc(ifft,1,1) = F_xc(ifft,1,1) + real(v2rho2(1,ifft),SP) + do ifft=1,fft_size + F_xc(ifft,1,1) = real(v2rho2(1,ifft),SP) + enddo endif ! if (n_sp_pol==2) then diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 309dc6ab44..8fd59a7255 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -151,7 +151,12 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) endif endif ! - forall(i1=1:fft_size,i2=1:n_spin) spin_rho_DP(i2,i1)=spin_rho_SP(i1,i2)*real(fft_size,DP)/real(DL_vol,DP) + do i1=1,fft_size + do i2=1,n_spin + spin_rho_DP(i2,i1)=real(spin_rho_SP(i1,i2),DP)*real(fft_size,DP)/real(DL_vol,DP) + if (spin_rho_DP(i2,i1)<1.E-10_DP) spin_rho_DP(i2,i1)=0._DP + enddo + enddo ! !============================= ! Electronic density gradient @@ -206,6 +211,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) do is2 = is1,n_spin is_xc = xc_spin_map1(is1,is2) sigma(is_xc,i1) = real(V_dot_V(3,drho(i1,is1,:),drho(i1,is2,:)),DP) + !if(sigma(is_xc,i1)<1.E-10_DP) sigma(is_xc,i1)= 0._DP end do end do end do From 6c9faf0a76074f208147bee1ca199af5b93ee2f9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 4 Mar 2021 16:28:55 +0100 Subject: [PATCH 0014/1367] Version 5.0.0, Revision 19508, Hash 1a477a4cf MODIFIED * config/version/version.m4 configure bse/K.F common/eval_G_minus_G.F hamiltonian/WF_and_dipole_dimensions.F modules/mod_R_lattice.F Changes: - [yambo] Defined G_m_G_maxval Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K.F | 6 +++--- src/common/eval_G_minus_G.F | 12 ++++++++++-- src/hamiltonian/WF_and_dipole_dimensions.F | 4 ++-- src/modules/mod_R_lattice.F | 1 + 6 files changed, 30 insertions(+), 21 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index dd04e7f9d5..32d1d7a8e8 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19507 h.84b070a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19508 h.1a477a4cf, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19507" -SHASH="84b070a" +SREVISION="19508" +SHASH="1a477a4cf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index e9a478208a..396423819f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19507 h.84b070a. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19508 h.1a477a4cf. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19507 h.84b070a' -PACKAGE_STRING='Yambo 5.0.0 r.19507 h.84b070a' +PACKAGE_VERSION='5.0.0 r.19508 h.1a477a4cf' +PACKAGE_STRING='Yambo 5.0.0 r.19508 h.1a477a4cf' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19507 h.84b070a to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19508 h.1a477a4cf to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1593,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19507 h.84b070a:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19508 h.1a477a4cf:";; esac cat <<\_ACEOF @@ -1797,7 +1797,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19507 h.84b070a +Yambo configure 5.0.0 r.19508 h.1a477a4cf generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2476,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19507 h.84b070a, which was +It was created by Yambo $as_me 5.0.0 r.19508 h.1a477a4cf, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2827,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19507" -SHASH="84b070a" +SREVISION="19508" +SHASH="1a477a4cf" @@ -14846,7 +14846,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19507 h.84b070a, which was +This file was extended by Yambo $as_me 5.0.0 r.19508 h.1a477a4cf, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14908,7 +14908,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19507 h.84b070a +Yambo config.status 5.0.0 r.19508 h.1a477a4cf configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K.F b/src/bse/K.F index 2184c86b8e..20baa35097 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -34,7 +34,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) use FFT_m, ONLY:fft_size use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab - use R_lattice, ONLY:G_m_G,qindx_B,bz_samp,qindx_X,ng_closed + use R_lattice, ONLY:G_m_G_maxval,qindx_B,bz_samp,qindx_X,ng_closed use com, ONLY:msg use stderr, ONLY:intc use LIVE_t, ONLY:live_timing @@ -165,12 +165,12 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) call msg('s','[TDDFT] ALDA Fxc cutoff is forced by symmetry to be ',FXC_n_g_corr) endif - O_ng=maxval(G_m_G) + O_ng=G_m_G_maxval O_ng_shift=max(BS_n_g_fxc,O_ng_shift) endif ! if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then - O_ng=maxval(G_m_G) + O_ng=G_m_G_maxval call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") if(iq/=1) O_ng_shift=max(maxval(qindx_B(:,:,2)),O_ng_shift) endif diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 51382366c8..d6a7b0b563 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -34,7 +34,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) use vec_operate, ONLY:iku_v_norm use parallel_m, ONLY:yMPI_comm,PP_indexes,PP_indexes_reset,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index,PARALLEL_live_message - use R_lattice, ONLY:G_m_G,g_vec,ng_in_shell,n_g_shells,E_of_shell + use R_lattice, ONLY:G_m_G,g_vec,ng_in_shell,n_g_shells,E_of_shell,G_m_G_maxval #ifdef _CUDA use R_lattice, ONLY:G_m_G_d #endif @@ -50,6 +50,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) integer :: iG_shell,iGo_shell,iG_shell_0,iG_shell_max,iG_,iGo_,iG_alloc,iGo_alloc real(SP):: E_iG, E_iGo, E_max real(SP):: v1(3) + integer, allocatable :: G_m_G_maxval_tmp(:) real(SP), allocatable :: E_G_m_G(:,:) type(PP_indexes) :: PAR_IND_G ! @@ -162,6 +163,9 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! YAMBO_ALLOC(G_m_G,(iG_,iGo_)) G_m_G=0 + YAMBO_ALLOC(G_m_G_maxval_tmp,(iGo_)) + G_m_G_maxval_tmp=0 + G_m_G_maxval=0 ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ @@ -175,11 +179,15 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! v1(:)=g_vec(i1,:)-g_vec(i2,:) G_m_G(i1,i2)=G_index(v1,.false.) + G_m_G_maxval_tmp(i2)=max(G_m_G_maxval_tmp(i2),G_m_G(i1,i2)) ! enddo enddo !$omp end parallel do - ! + ! + G_m_G_maxval=maxval(G_m_G_maxval_tmp) + YAMBO_FREE(G_m_G_maxval_tmp) + ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) ! call PP_indexes_reset(PAR_IND_G) diff --git a/src/hamiltonian/WF_and_dipole_dimensions.F b/src/hamiltonian/WF_and_dipole_dimensions.F index 83fe281f6f..792ef7ab67 100644 --- a/src/hamiltonian/WF_and_dipole_dimensions.F +++ b/src/hamiltonian/WF_and_dipole_dimensions.F @@ -29,7 +29,7 @@ subroutine WF_and_dipole_dimensions(X,Xk) use X_m, ONLY:X_t use wave_func, ONLY:wf_ng use QP_m, ONLY:QP_ng_Sx,QP_ng_SH,QP_ng_Vxc,QP_n_G_bands,COHSEX_use_empties - use R_lattice, ONLY:qindx_S,G_m_G,k_map,bz_samp + use R_lattice, ONLY:qindx_S,G_m_G_maxval,k_map,bz_samp use interfaces, ONLY:eval_G_minus_G use hamiltonian, ONLY:H_ref_bands,WF_Go_indx,WF_G_max,l_sc_XC_is_local #if defined _RT || defined _NL @@ -71,7 +71,7 @@ subroutine WF_and_dipole_dimensions(X,Xk) ! X(2)%ng=eval_G_minus_G(X(2)%ng,0) ! - WF_G_max=max(QP_ng_Sx,maxval(G_m_G)) + WF_G_max=max(QP_ng_Sx,G_m_G_maxval) if (l_real_time.and..not.(l_sc_exx.or.l_sc_srpa)) WF_G_max=wf_ng ! ! [07/07/2016] Modified these two lines to avoid the annoying QP_n_G_bands in the input. diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 5aea9a353f..d16f6670b5 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -130,6 +130,7 @@ module R_lattice ! RL lattice ! integer :: n_g_shells,ng_vec,ng_closed + integer :: G_m_G_maxval integer ,allocatable :: ng_in_shell(:) integer ,allocatable :: g_rot(:,:) integer ,allocatable :: G_m_G(:,:) From 7fe95c26d12afb7ecaea42f3d14b0d71d8f2529f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 19 Mar 2021 09:24:19 +0100 Subject: [PATCH 0015/1367] Version 5.0.0, Revision 19717, Hash 4c0efd8f6 MODIFIED * config/version/version.m4 configure bse/.objects RENAMED * bse/K.F -> bse/K_kernel.F Changes: - K.F renamed K_kernel.F Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/.objects | 2 +- src/bse/{K.F => K_kernel.F} | 0 4 files changed, 15 insertions(+), 15 deletions(-) rename src/bse/{K.F => K_kernel.F} (100%) diff --git a/config/version/version.m4 b/config/version/version.m4 index 7c42e4e6f8..5b63388f0f 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19676 h.d6e412b9d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19717 h.4c0efd8f6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19676" -SHASH="d6e412b9d" +SREVISION="19717" +SHASH="4c0efd8f6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 6bc18fc67f..6acdfc2430 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19676 h.d6e412b9d. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19717 h.4c0efd8f6. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19676 h.d6e412b9d' -PACKAGE_STRING='Yambo 5.0.0 r.19676 h.d6e412b9d' +PACKAGE_VERSION='5.0.0 r.19717 h.4c0efd8f6' +PACKAGE_STRING='Yambo 5.0.0 r.19717 h.4c0efd8f6' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1530,7 +1530,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19676 h.d6e412b9d to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19717 h.4c0efd8f6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1596,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19676 h.d6e412b9d:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19717 h.4c0efd8f6:";; esac cat <<\_ACEOF @@ -1801,7 +1801,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19676 h.d6e412b9d +Yambo configure 5.0.0 r.19717 h.4c0efd8f6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19676 h.d6e412b9d, which was +It was created by Yambo $as_me 5.0.0 r.19717 h.4c0efd8f6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2831,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19676" -SHASH="d6e412b9d" +SREVISION="19717" +SHASH="4c0efd8f6" @@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19676 h.d6e412b9d, which was +This file was extended by Yambo $as_me 5.0.0 r.19717 h.4c0efd8f6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14972,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19676 h.d6e412b9d +Yambo config.status 5.0.0 r.19717 h.4c0efd8f6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/.objects b/src/bse/.objects index 8a2d435867..2c1f1c7c0d 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -9,7 +9,7 @@ PARIO_objects = K_compress.o SLK_objects = K_inversion_do_it_SLK.o #endif objs = K_blocks.o K_driver.o K_IP.o K_Transitions_setup.o K_WF_phases.o \ - K.o $(PARIO_objects) K_correlation_collisions.o K_exchange_collisions.o K_correlation_kernel.o K_exchange_kernel.o \ + K_kernel.o $(PARIO_objects) K_correlation_collisions.o K_exchange_collisions.o K_correlation_kernel.o K_exchange_kernel.o \ K_restart.o K_solvers.o K_Haydock.o K_Haydock_response.o K_screened_interaction.o \ K_inversion_do_it_full.o EPS_via_perturbative_inversion.o \ K_inversion_driver.o K_diagonal.o K_inversion_Lo.o K_inversion_restart.o K_inversion_engine.o \ diff --git a/src/bse/K.F b/src/bse/K_kernel.F similarity index 100% rename from src/bse/K.F rename to src/bse/K_kernel.F From d36b4f0ddaa3d7a0574030b68cea64cec69fdd22 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 19 Mar 2021 10:17:09 +0100 Subject: [PATCH 0016/1367] Version 5.0.0, Revision 19718, Hash 7fe95c26d MODIFIED * config/version/version.m4 configure include/headers/common/yambo_bse.h bse/K_correlation_collisions.F bse/K_driver.F bse/K_kernel.F Changes: - [yambo] Calculation of BSE kernel split in two steps Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +- configure | 22 +-- include/headers/common/yambo_bse.h | 12 +- src/bse/K_correlation_collisions.F | 6 +- src/bse/K_driver.F | 2 +- src/bse/K_kernel.F | 209 ++++++++++++++++------------- 6 files changed, 141 insertions(+), 116 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 5b63388f0f..7d9b62849c 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19717 h.4c0efd8f6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19718 h.7fe95c26d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19717" -SHASH="4c0efd8f6" +SREVISION="19718" +SHASH="7fe95c26d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 6acdfc2430..45f7ac521a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19717 h.4c0efd8f6. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19718 h.7fe95c26d. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19717 h.4c0efd8f6' -PACKAGE_STRING='Yambo 5.0.0 r.19717 h.4c0efd8f6' +PACKAGE_VERSION='5.0.0 r.19718 h.7fe95c26d' +PACKAGE_STRING='Yambo 5.0.0 r.19718 h.7fe95c26d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1530,7 +1530,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19717 h.4c0efd8f6 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19718 h.7fe95c26d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1596,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19717 h.4c0efd8f6:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19718 h.7fe95c26d:";; esac cat <<\_ACEOF @@ -1801,7 +1801,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19717 h.4c0efd8f6 +Yambo configure 5.0.0 r.19718 h.7fe95c26d generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19717 h.4c0efd8f6, which was +It was created by Yambo $as_me 5.0.0 r.19718 h.7fe95c26d, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2831,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19717" -SHASH="4c0efd8f6" +SREVISION="19718" +SHASH="7fe95c26d" @@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19717 h.4c0efd8f6, which was +This file was extended by Yambo $as_me 5.0.0 r.19718 h.7fe95c26d, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14972,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19717 h.4c0efd8f6 +Yambo config.status 5.0.0 r.19718 h.7fe95c26d configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/headers/common/yambo_bse.h b/include/headers/common/yambo_bse.h index cc597f8ac5..16be817e4a 100644 --- a/include/headers/common/yambo_bse.h +++ b/include/headers/common/yambo_bse.h @@ -27,7 +27,7 @@ #define OMP_LAST_DEF #define OMP_LAST1 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA.and.iHxc==2) then NEWLINE \ i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) NEWLINE \ if (i_k_bz_mem==0) then NEWLINE \ !$omp critical NEWLINE \ @@ -44,7 +44,7 @@ endif NEWLINE #define OMP_LAST2 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA.and.iHxc==2) then NEWLINE \ i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) NEWLINE \ if (i_kmq_bz_mem==0) then NEWLINE \ !$omp critical NEWLINE \ @@ -67,7 +67,7 @@ integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & NEWLINE \ & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last NEWLINE #define OMP_LAST1 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA.and.iHxc==2) then NEWLINE \ i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) NEWLINE \ if (i_p_bz_last/=i_p_bz.or.i_k_bz_last/=i_k_bz) then NEWLINE \ i_p_bz_last=i_p_bz NEWLINE \ @@ -93,7 +93,7 @@ integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & NEWLINE \ endif NEWLINE #define OMP_LAST2 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and..not.BS_K_is_ALDA.and.iHxc==2) then NEWLINE \ i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) NEWLINE \ if (i_pmq_bz_last/=i_pmq_bz.or.i_kmq_bz_last/=i_kmq_bz) then NEWLINE \ i_pmq_bz_last=i_pmq_bz NEWLINE \ @@ -154,7 +154,7 @@ integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& NEWLINE \ i_kmq_s =Xk%sstar(i_kmq_bz,2) NEWLINE \ i_pmq_s =Xk%sstar(i_pmq_bz,2) NEWLINE \ NEWLINE \ - if (BS_res_K_corr) then NEWLINE \ + if (BS_res_K_corr.and.iHxc==2) then NEWLINE \ i_kmq_t=BS_blk(i_block)%kp_table(1,i_kmq) NEWLINE \ i_pmq_t=BS_blk(i_block)%kp_table(2,i_pmq) NEWLINE \ endif NEWLINE \ @@ -182,7 +182,7 @@ integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& NEWLINE \ NEWLINE \ OMP_LAST2 \ NEWLINE \ - if (BS_K_is_ALDA) then NEWLINE \ + if (BS_K_is_ALDA.and.iHxc==1) then NEWLINE \ is_k = (/i_c_k,i_k,i_k_s,i_k_sp_pol_c/) NEWLINE \ os_k = (/i_v_k,i_kmq,i_kmq_s,i_k_sp_pol_v/) NEWLINE \ is_p = (/i_c_p,i_p,i_p_s,i_p_sp_pol_c/) NEWLINE \ diff --git a/src/bse/K_correlation_collisions.F b/src/bse/K_correlation_collisions.F index 4a9f18e62c..fdb96fa5f9 100644 --- a/src/bse/K_correlation_collisions.F +++ b/src/bse/K_correlation_collisions.F @@ -62,13 +62,15 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) ! Work Space ! DEFINE_BSK_COMMON_INDEXES - integer :: i_s_star,i_s_mq_star,i_s_collision,N_kmq,N_pmq + integer :: i_s_star,i_s_mq_star,i_s_collision,N_kmq,N_pmq,iHxc character(1):: mode_now ! logical, allocatable :: O_todo_table(:,:,:,:,:,:) integer, external :: qindx_B_init,qindx_B_close ! - if (.not.BS_res_K_corr) return + if (.not.BS_res_K_corr) return + ! + iHxc=2 ! call timing('T_space CORR Osc.',OPR='start') ! diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 99ed350146..24e7907154 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -308,7 +308,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! ! 2. The KERNEL ! ================ - if (.not.l_rpa_IP) call K(iq,Ken,Xk,q,X_static_pp,Xw,W_bss) + if (.not.l_rpa_IP) call K_kernel(iq,Ken,Xk,q,X_static_pp,Xw,W_bss) ! ! 3. The SOLVER ! ================= diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 02fef4267b..7b6d55166c 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) +subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! K = <2V-W> for n_spin=1 ! @@ -83,10 +83,10 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! ... Kernel loop ! DEFINE_BSK_COMMON_INDEXES - integer :: i_block,O_ng_shift,& + integer :: i_block,O_ng_shift,O_ng_exch,iHxc,& & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& & bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4),i_andrea - complex(SP):: Co,H_x,H_c + complex(SP):: Co,H_x,H_c,BS_mat_tmp complex(SP):: sqrt_f_itk,sqrt_f_itp real(SP), allocatable :: BS_max_val_CPU(:) ! @@ -162,34 +162,33 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! Oscillators Setup !=================== O_ng=1 - O_ng_shift=maxval(qindx_X(iq,:,2)) + O_ng_exch =maxval(qindx_X(iq,:,2)) + O_ng_shift=O_ng_exch ! if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then O_ng=G_m_G_maxval - call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") + ! call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") ! Hybrid functional. ! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered - if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") + ! if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) endif ! if (BS_K_is_ALDA) then - O_ng=BS_n_g_fxc ! This is manually set for now ALDA_cut_scheme="lower_Gmax" if (BS_n_g_fxc/=ng_closed .and. trim(ALDA_cut_scheme)=="lower_GmGp") then if (BS_n_g_fxc/= eval_G_minus_G(BS_n_g_fxc,0) ) then - BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) + BS_n_g_fxc = G_m_G_maxval call msg('s','[TDDFT] ALDA Fxc cutoff is forced by symmetry to be ',FXC_n_g_corr) endif - O_ng=G_m_G_maxval - O_ng_shift=max(BS_n_g_fxc,O_ng_shift) + O_ng_exch=max(BS_n_g_fxc,O_ng_exch) endif endif ! if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) then O_ng=G_m_G_maxval - call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") + ! call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) endif ! @@ -244,34 +243,6 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) section_title='-BSK' if (l_bs_fxc) section_title='-BSK->Fxc' ! - call WF_load(WF,max(O_ng,BS_n_g_exch),O_ng_shift,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) - ! - ! Wave Functions Phases - !======================= - call K_WF_phases(Xk) - ! - ! Spatial Inversion Test - !======================== - call WF_spatial_inversion(Ken,Xk) - ! - ! ALDA - !====== - if (BS_K_is_ALDA) then - YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - if(n_spin>1) then - YAMBO_ALLOC(magn,(fft_size,3)) - endif - call XC_potential_driver(Ken,Xk,WF_KIND,WF_xc_functional,2) - if(n_spin>1) then - YAMBO_FREE(magn) - endif - if ( BS_n_g_fxc/=ng_closed) then - FXC_n_g_corr=BS_n_g_fxc - call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) - call msg('s','[BSE] Fxc components ',BS_n_g_fxc) - endif - endif - ! ! DB identifier !=============== BS_identifier=pickup_a_random(10000._SP) @@ -298,6 +269,41 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) call io_control(ACTION=OP_WR,COM=REP,SEC=(/1/),ID=ID) io_BS_err=io_BS(iq,X,ID) #endif + ! + ! This loop is on the exchange and correlation of the BSE + ! iHxc=1 --> K_H + ! iHxc=2 --> K_xc + ! + do iHxc=1,2 + ! + if (iHxc==1) call WF_load(WF,max(BS_n_g_exch,BS_n_g_fxc),O_ng_exch,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) + if (iHxc==2) call WF_load(WF, O_ng, O_ng_shift,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) + ! + ! Wave Functions Phases + !======================= + if (iHxc==2) call K_WF_phases(Xk) + ! + ! Spatial Inversion Test + !======================== + if (iHxc==1) call WF_spatial_inversion(Ken,Xk) + ! + ! ALDA + !====== + if (BS_K_is_ALDA.and.iHxc==1) then + YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) + if(n_spin>1) then + YAMBO_ALLOC(magn,(fft_size,3)) + endif + call XC_potential_driver(Ken,Xk,WF_KIND,WF_xc_functional,2) + if(n_spin>1) then + YAMBO_FREE(magn) + endif + if ( BS_n_g_fxc/=ng_closed) then + FXC_n_g_corr=BS_n_g_fxc + call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + call msg('s','[BSE] Fxc components ',BS_n_g_fxc) + endif + endif ! ! Timing !======== @@ -313,7 +319,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) BS_blk_done=.false. ! #ifdef _PAR_IO - if (l_BSE_restart) then + if (l_BSE_restart.and.iHxc==1) then ! if(m_steps>0) call live_timing("Loading partial kernel",m_steps) ! @@ -360,6 +366,9 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) if (.not.l_bs_fxc) section_title='Kernel' if ( l_bs_fxc) section_title='Kernel->Fxc' ! + if (iHxc==1) section_title=trim(section_title)//' exchange' + if (iHxc==2) section_title=trim(section_title)//' correlat' + ! if(m_steps>0) call live_timing(trim(section_title),m_steps) ! !------------------ @@ -371,7 +380,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! if (BS_blk_done(i_block)) then #if defined _PAR_IO - if(l_partial_kernel_loaded) then + if(l_partial_kernel_loaded.and.iHxc==2) then call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") endif @@ -393,15 +402,16 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! ! Exchange oscillators !---------------------- - ! - call K_exchange_collisions(iq,Xk,i_Tgrp_k) ! - if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p) + if(iHxc==1) then + call K_exchange_collisions(iq,Xk,i_Tgrp_k) + if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p) + endif ! ! Exchange oscillators !---------------------- ! - call K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) + if(iHxc==2) call K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) ! ! Transition Loops !------------------ @@ -437,7 +447,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) FILL_BSK_COMMON_INDEXES FILL_BSK_KERNEL_INDEXES ! - if (BS_res_K_corr.or.BS_cpl_K_corr) then + if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==2) then ! if (iq_W_bz/=iq_W_bz_mq.or.iq_W/=iq_W_mq.or.iq_W_s/=iq_W_s_mq) call error("Wrong transferred momentum") ! @@ -459,14 +469,14 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !=================================== ! ! Exchange - if (BS_res_K_exchange) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & -& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + if (BS_res_K_exchange.and.iHxc==1) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & +& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') + if (BS_K_is_ALDA .and.iHxc==1) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') ! ! Correlations - if (BS_res_K_corr) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (BS_res_K_corr .and.iHxc==2) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_c_p,i_kmq_s,i_kp_mq_s,i_v_k,i_v_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) @@ -477,33 +487,36 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !============================= ! ! Exchange - if (BS_cpl_K_exchange) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & - & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + if (BS_cpl_K_exchange.and.iHxc==1) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & + & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') + if (BS_K_is_ALDA .and.iHxc==1) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') ! ! Correlations - if (BS_cpl_K_corr) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (BS_cpl_K_corr .and.iHxc==2) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_v_p,i_kmq_s,i_kp_mq_s,i_v_k,i_c_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_v,i_k_sp_pol_v,i_p_sp_pol_c, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) ! end select ! - if (l_tddft.and.WF_exx_fraction>0._SP) H_c=H_c*WF_exx_fraction + if (l_tddft.and.WF_exx_fraction>0._SP.and.iHxc==2) H_c=H_c*WF_exx_fraction ! sqrt_f_itk=sqrt(cmplx(BS_T_grp(i_Tgrp_k)%f(i_Tk),kind=SP)) sqrt_f_itp=sqrt(cmplx(BS_T_grp(i_Tgrp_p)%f(i_Tp),kind=SP)) ! if (l_BS_ares_asymm) then - BS_blk(i_block)%mat(i_Tk,i_Tp)= sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp + BS_mat_tmp = sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp else - if (BS_blk(i_block)%mode=="R") BS_blk(i_block)%mat(i_Tk,i_Tp)= sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp - if (BS_blk(i_block)%mode=="C") BS_blk(i_block)%mat(i_Tk,i_Tp)= cI*sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp + if (BS_blk(i_block)%mode=="R") BS_mat_tmp = sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp + if (BS_blk(i_block)%mode=="C") BS_mat_tmp = cI*sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp endif ! - BS_blk(i_block)%done(i_Tk,i_Tp)="t" + if (iHxc==1) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp + if (iHxc==2) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp + ! + if (iHxc==2) BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! enddo ! i_Tk enddo ! i_Tp @@ -512,27 +525,62 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !$omp end parallel #endif ! - if(BS_K_cutoff>0._SP) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) - ! - call BS_oscillators_free(0,i_block) + if(BS_K_cutoff>0._SP.and.iHxc==2) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! - if(l_BSE_minimize_memory) then + if(l_BSE_minimize_memory.and.iHxc==1) then call BS_oscillators_free(i_Tgrp_p,0) call BS_oscillators_free(i_Tgrp_k,0) endif ! + if(iHxc==2) call BS_oscillators_free(0,i_block) + ! + if(iHxc==2) then #if defined _PAR_IO - call io_control(ACTION=WR,ID=ID) - call io_BS_PAR_block(iq,i_block,ID,"full") + call io_control(ACTION=WR,ID=ID) + call io_BS_PAR_block(iq,i_block,ID,"full") #else - call io_control(ACTION=WR,COM=REP,SEC=(/i_block+1/),ID=ID) - io_BS_err=io_BS(iq,X,ID) + call io_control(ACTION=WR,COM=REP,SEC=(/i_block+1/),ID=ID) + io_BS_err=io_BS(iq,X,ID) #endif + endif ! call live_timing(steps=i_steps) ! enddo block_loop ! + if (n_steps>0) call live_timing( ) + ! + ! GLOBAL CLEANING + !================= + ! + if(iHxc==1) then + ! + call BS_oscillators_free(BS_nT_grps,0) + ! + if (l_bs_fxc) then + YAMBO_FREE(F_xc_gspace) + YAMBO_FREE(FXC_K_diagonal) + else if (BS_K_is_ALDA) then + YAMBO_FREE(F_xc) + endif + ! + endif + ! + if(iHxc==2) then + ! + if (BS_res_K_corr.or.BS_cpl_K_corr) then + YAMBO_FREE(WF_phase) + endif + ! + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) qindx_tmp=qindx_B_close(qindx_ID) + YAMBO_FREE(BS_W) + ! + endif + ! + call WF_free(WF) + ! + enddo ! iHxc loop + ! #if defined _PAR_IO if(BS_K_cutoff>0._SP) then call PP_redux_wait(BS_max_val_CPU) @@ -548,32 +596,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) call io_control(ACTION=WR_CL,COM=REP,SEC=(/n_BS_blks+2/),ID=ID) io_BS_err=io_BS(iq,X,ID) #endif - ! - if (n_steps>0) call live_timing( ) - ! - ! GLOBAL CLEANING - !================= - ! - call BS_oscillators_free(BS_nT_grps,0) - ! - if (BS_res_K_corr.or.BS_cpl_K_corr) then - YAMBO_FREE(WF_phase) - endif - ! - if (l_bs_fxc) then - ! - YAMBO_FREE(F_xc_gspace) - YAMBO_FREE(FXC_K_diagonal) - ! - else if (BS_K_is_ALDA) then - YAMBO_FREE(F_xc) - endif - ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) qindx_tmp=qindx_B_close(qindx_ID) - ! - YAMBO_FREE(BS_W) - call WF_free(WF) ! call timing('X T_space Kernel',OPR='stop') ! -end subroutine K +end subroutine K_kernel From 374f3f638899420be266570e5078121a378f7a75 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 19 Mar 2021 10:19:51 +0100 Subject: [PATCH 0017/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +- configure | 151 +++++++++++++++++++++++++++----------- 2 files changed, 110 insertions(+), 47 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index b9def08b7e..7adc3c2938 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19570 h.9a7e3c433, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19725 h.a50e1b91d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19570" -SHASH="9a7e3c433" +SREVISION="19725" +SHASH="a50e1b91d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index e8332bdc2d..ddbea67379 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19570 h.9a7e3c433. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19725 h.a50e1b91d. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19570 h.9a7e3c433' -PACKAGE_STRING='Yambo 5.0.0 r.19570 h.9a7e3c433' +PACKAGE_VERSION='5.0.0 r.19725 h.a50e1b91d' +PACKAGE_STRING='Yambo 5.0.0 r.19725 h.a50e1b91d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -687,10 +687,12 @@ compile_netcdf def_netcdf hdf5 netcdf -HDF5_VER +IO_LIB_VER HDF5_OPT HDF5_INCS HDF5_LIBS +PNETCDF_INCS +PNETCDF_LIBS NETCDFF_INCS NETCDFF_LIBS NETCDF_VER @@ -930,6 +932,7 @@ with_hdf5_path with_hdf5_libdir with_hdf5_includedir enable_netcdf_classic +enable_netcdf_par_io enable_netcdf_v3 enable_hdf5_compression enable_hdf5_par_io @@ -1527,7 +1530,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19570 h.9a7e3c433 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19725 h.a50e1b91d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1593,7 +1596,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19570 h.9a7e3c433:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19725 h.a50e1b91d:";; esac cat <<\_ACEOF @@ -1628,6 +1631,7 @@ Optional Features: SLEPC. Default is no --enable-par-linalg Use parallel linear algebra. Default is no --enable-netcdf-classic Switch to OLD NetCDF classic. Default is no. + --enable-netcdf-par-io Activate the NETCDF parallel io. Default is no. --enable-netcdf-v3 Switch to OLD NETCD v3 format. Default is no. --enable-hdf5-compression Activate the HDF5 data compression. Default is no. @@ -1797,7 +1801,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19570 h.9a7e3c433 +Yambo configure 5.0.0 r.19725 h.a50e1b91d generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2476,7 +2480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19570 h.9a7e3c433, which was +It was created by Yambo $as_me 5.0.0 r.19725 h.a50e1b91d, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2827,8 +2831,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19570" -SHASH="9a7e3c433" +SREVISION="19725" +SHASH="a50e1b91d" @@ -12462,6 +12466,14 @@ if test "${enable_netcdf_classic+set}" = set; then : enableval=$enable_netcdf_classic; fi +# +# NETCDF PAR IO +# +# Check whether --enable-netcdf_par_io was given. +if test "${enable_netcdf_par_io+set}" = set; then : + enableval=$enable_netcdf_par_io; +fi + # # HDF5 support # @@ -12512,7 +12524,7 @@ def_netcdf="" NETCDF_OPT="--enable-netcdf-4" NETCDF_VER="v4" HDF5_OPT="--disable-parallel"; -HDF5_VER="serial"; +IO_LIB_VER="serial"; # # Other libs # @@ -12823,11 +12835,13 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # global options # # -if test x"$enable_netcdf_classic" = "xyes" ; then enable_hdf5=no ; fi -if test x"$enable_netcdf_v3" = "xyes" ; then enable_hdf5=no ; fi -if test x"$enable_hdf5_par_io" = "xyes" ; then enable_hdf5=yes ; fi +if test x"$enable_netcdf_classic" = "xyes" ; then enable_hdf5=no ; fi +if test x"$enable_netcdf_v3" = "xyes" ; then enable_hdf5=no ; fi +if test x"$enable_netcdf_par_io" = "xyes" ; then enable_pnetcdf=yes ; enable_hdf5=no ; fi +if test x"$enable_hdf5_par_io" = "xyes" ; then enable_hdf5=yes ; fi # -if test x"$enable_hdf5_par_io" = "xyes" ; then HDF5_VER="parallel"; fi +if test x"$enable_hdf5_par_io" = "xyes" ; then IO_LIB_VER="parallel"; fi +if test x"$enable_netcdf_par_io" = "xyes" ; then IO_LIB_VER="parallel"; fi # # # @@ -12848,15 +12862,23 @@ $as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; try_netcdf_incdir="$with_netcdf_path/include" ; try_netcdff_libdir="$with_netcdf_path/lib" ; try_netcdff_incdir="$with_netcdf_path/include" ; + try_pnetcdf_libdir="$with_netcdf_path/lib" ; + try_pnetcdf_incdir="$with_netcdf_path/include" ; fi if test -d "$with_netcdff_path" ; then try_netcdff_libdir="$with_netcdff_path/lib" ; try_netcdff_incdir="$with_netcdff_path/include" ; fi + if test -d "$with_pnetcdf_path" ; then + try_pnetcdf_libdir="$with_pnetcdf_path/lib" ; + try_pnetcdf_incdir="$with_pnetcdf_path/include" ; + fi # + if test -d "$with_pnetcdf_libdir" ; then try_pnetcdf_libdir="$with_pnetcdf_libdir" ; fi if test -d "$with_netcdf_libdir" ; then try_netcdf_libdir="$with_netcdf_libdir" ; fi if test -d "$with_netcdf_includedir" ; then try_netcdf_incdir="$with_netcdf_includedir" ; fi # + if test -d "$with_pnetcdf_libdir" ; then try_pnetcdf_libdir="$with_pnetcdf_libdir" ; fi if test -d "$with_netcdff_libdir" ; then try_netcdff_libdir="$with_netcdff_libdir" ; fi if test -d "$with_netcdff_includedir" ; then try_netcdff_incdir="$with_netcdff_includedir" ; fi # @@ -12869,11 +12891,21 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu # + if test -d "$try_pnetcdf_incdir" ; then + try_PNETCDF_INCS="$IFLAG$try_pnetcdf_incdir" ; + fi try_NETCDF_INCS="$IFLAG$try_netcdf_incdir" ; if test -d "$try_netcdff_incdir" ; then try_NETCDFF_INCS="$IFLAG$try_netcdff_incdir" ; fi # + if test x"$enable_pnetcdf" = "xyes"; then + if test -r $try_pnetcdf_libdir/libpnetcdf.a ; then + try_PNETCDF_LIBS="-L$try_pnetcdf_libdir -lpnetcdf" ; + elif test -r $try_netcdf_libdir/libpnetcdf.a ; then + try_PNETCDF_LIBS="-L$try_netcdf_libdir -lpnetcdf" ; + fi + fi try_NETCDF_LIBS="-L$try_netcdf_libdir -lnetcdf" ; if test -r $try_netcdff_libdir/libnetcdff.a ; then try_NETCDFF_LIBS="-L$try_netcdff_libdir -lnetcdff" ; @@ -12889,9 +12921,11 @@ elif test x"$with_netcdf_libs" != "x" ; then $as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi + if test -d "$with_pnetcdf_includedir" ; then try_PNETCDF_INCS="$IFLAG$with_pnetcdf_includedir" ; fi netcdf="yes"; try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; + try_PNETCDF_LIBS="$with_pnetcdf_libs" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # @@ -12908,8 +12942,8 @@ if test x"$enable_hdf5" = "xno"; then save_fcflags="$FCFLAGS" ; save_libs="$LIBS" ; # - FCFLAGS="$try_NETCDFF_INCS $try_NETCDF_INCS $save_fcflags"; - LIBS="$try_NETCDFF_LIBS $try_NETCDF_LIBS $save_libs"; + FCFLAGS="$try_NETCDFF_INCS $try_NETCDF_INCS $try_PNETCDF_INCS $save_fcflags"; + LIBS="$try_NETCDFF_LIBS $try_NETCDF_LIBS $try_PNETCDF_LIBS $save_libs"; # cat > conftest.$ac_ext <<_ACEOF program main @@ -12935,6 +12969,8 @@ $as_echo "yes" >&6; } ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; + PNETCDF_INCS="$try_PNETCDF_INCS" ; + PNETCDF_LIBS="$try_PNETCDF_LIBS" ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; @@ -12953,32 +12989,53 @@ $as_echo_n "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # - NETCDF_OPT="--disable-netcdf-4" - NETCDF_VER="v3" + if test x"$enable_pnetcdf" = "xyes"; then + NETCDF_OPT="--enable-pnetcdf --disable-netcdf-4 --enable-cdf5" + NETCDF_VER="v3" + IO_LIB_VER="parallel"; + else + NETCDF_OPT="--disable-netcdf-4" + NETCDF_VER="v3" + IO_LIB_VER="serial"; + fi # # the following may change if we use a different version # of the netcdf lib # # - NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${HDF5_VER}" + NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" # NETCDF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdf.a" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; NETCDFF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; + PNETCDF_LIBS="${NETCDF_HDF5_PATH}/lib/libpnetcdf.a" ; + PNETCDF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # if test "$use_libm" = "yes"; then NETCDF_LIBS="$NETCDF_LIBS -lm" ; fi if test "$use_libcurl" = "yes"; then NETCDF_LIBS="$NETCDF_LIBS -lcurl"; fi # netcdf=yes - if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then - compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 + if test x"$enable_pnecdf" = "xyes"; then + if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PATH}/lib/libpnetcdf.a"; then + compile_netcdf="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 $as_echo "already compiled" >&6; } ; + else + compile_netcdf="yes" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; + fi else - compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 + if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then + compile_netcdf="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; + else + compile_netcdf="yes" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 $as_echo "to be compiled" >&6; } ; + fi fi # fi @@ -13034,7 +13091,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # LIBS="$try_HDF5_LIBS" # - #if test "$HDF5_VER" = "serial" ; then + #if test "$IO_LIB_VER" = "serial" ; then cat > conftest.$ac_ext <<_ACEOF program main @@ -13067,9 +13124,9 @@ rm -f core conftest.err conftest.$ac_objext \ # call h5close_f(error) # ]),[hdf5_par=yes], [hdf5_par=no]); ## - #if test "$HDF5_VER" = "parallel" ; then hdf5="$hdf5_par" ; fi - #if test "$HDF5_VER" = "serial" ; then - # if test "x$hdf5_par" = "xyes" ; then HDF5_VER="parallel" ; fi + #if test "$IO_LIB_VER" = "parallel" ; then hdf5="$hdf5_par" ; fi + #if test "$IO_LIB_VER" = "serial" ; then + # if test "x$hdf5_par" = "xyes" ; then IO_LIB_VER="parallel" ; fi #fi; # netcdf=$hdf5; @@ -13080,11 +13137,11 @@ rm -f core conftest.err conftest.$ac_objext \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - #if test $HDF5_VER = "parallel"; then AC_MSG_RESULT([yes - parallel lib found]) ; fi - #if test $HDF5_VER = "serial"; then AC_MSG_RESULT([yes - serial lib found]) ; fi + #if test $IO_LIB_VER = "parallel"; then AC_MSG_RESULT([yes - parallel lib found]) ; fi + #if test $IO_LIB_VER = "serial"; then AC_MSG_RESULT([yes - serial lib found]) ; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; - HDF5_VER="unknown" + IO_LIB_VER="unknown" fi # FCFLAGS="$save_fcflags" ; @@ -13102,7 +13159,7 @@ $as_echo_n "checking for internal NETCDF+HDF5 library... " >&6; }; NETCDF_OPT="--enable-netcdf-4"; NETCDF_VER="v4"; # - NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${HDF5_VER}" ; + NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # HDF5_LIBS="${NETCDF_HDF5_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a" ; @@ -13122,9 +13179,9 @@ $as_echo_n "checking for internal NETCDF+HDF5 library... " >&6; }; { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 $as_echo "already compiled" >&6; } ; # - elif test "$HDF5_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # - HDF5_VER="parallel"; + IO_LIB_VER="parallel"; HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; @@ -13139,8 +13196,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; compile_netcdf="yes"; compile_hdf5="yes" ; # - if test "$HDF5_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi - if test "$HDF5_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi + if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi + if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 $as_echo "to be compiled" >&6; } ; @@ -13161,9 +13218,9 @@ fi # if test x"$hdf5" = "xyes"; then def_netcdf="-D_HDF5_LIB"; - #if test "$HDF5_VER" = "serial" || test "$HDF5_VER" = "unknown" ; then + #if test "$IO_LIB_VER" = "serial" || test "$IO_LIB_VER" = "unknown" ; then # def_netcdf="-D_HDF5_LIB"; - #elif test "$HDF5_VER" = "parallel"; then + #elif test "$IO_LIB_VER" = "parallel"; then # def_netcdf="-D_HDF5_PARLIB"; #fi fi @@ -13193,6 +13250,9 @@ fi if test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" && test x"$enable_hdf5" = "xyes" && test x"$enable_hdf5_par_io" = "xyes" ; then def_netcdf="${def_netcdf} -D_PAR_IO"; enable_hdf5_compression="no"; +elif test x"$netcdf" = "xyes" && test x"$enable_pnetcdf" = "xyes" ; then + def_netcdf="${def_netcdf} -D_PAR_IO"; + enable_hdf5_compression="no"; elif test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" && test x"$enable_hdf5" = "xyes" && test x"$enable_hdf5_compression" = "xyes" ; then def_netcdf="${def_netcdf} -D_HDF5_COMPRESSION"; fi @@ -13215,6 +13275,8 @@ fi + + # ============================================================================ @@ -13616,7 +13678,7 @@ fi PW_VER="no-hdf5-support" PW_CPP= # -#if test x"$hdf5" = "xyes" && test "$HDF5_VER" = "parallel"; then +#if test x"$hdf5" = "xyes" && test "$IO_LIB_VER" = "parallel"; then if test x"$hdf5" = "xyes" && test x"$enable_hdf5_p2y_support" != "xno"; then PW_VER="hdf5-support" PW_CPP="-D_P2Y_QEXSD_HDF5" @@ -14202,6 +14264,7 @@ else fi NETCDF_info="(NETCDF with large files support)" if test "$enable_netcdf_classic" = "yes"; then NETCDF_info="(NETCDF large files support disabled)"; fi +if test "$enable_netcdf_par_io" = "yes"; then NETCDF_info="(NETCDF with parallel I/O and large files support)"; fi # HDF5_str=" - " if test "$hdf5" = "yes" ; then @@ -14214,7 +14277,7 @@ if test "$hdf5" = "yes" ; then if test "$enable_netcdf_hdf5" = "no" ; then HDF5_info="(No HDF5-IO format)" ; fi if test "$enable_netcdf_hdf5" = "yes" ; then HDF5_info="(HDF5-IO format"; - if test "$HDF5_VER" = "parallel" ; then HDF5_info="${HDF5_info}, parallel_lib " ; fi + if test "$IO_LIB_VER" = "parallel" ; then HDF5_info="${HDF5_info}, parallel_lib " ; fi if test "$enable_hdf5_par_io" = "yes"; then HDF5_info="${HDF5_info}, parallel IO" ; fi if test "$enable_hdf5_compression" = "yes"; then HDF5_info="${HDF5_info}, with data compression)" ; @@ -14847,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19570 h.9a7e3c433, which was +This file was extended by Yambo $as_me 5.0.0 r.19725 h.a50e1b91d, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14909,7 +14972,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19570 h.9a7e3c433 +Yambo config.status 5.0.0 r.19725 h.a50e1b91d configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -15764,7 +15827,7 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_pa # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; - BIN_NETCDF=$extlibs_path/${FCKIND}/${FC}/${NETCDF_VER}/${HDF5_VER}/bin/* ; + BIN_NETCDF=$extlibs_path/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}/bin/* ; BIN_SLEPC=$extlibs_path/${FCKIND}/${FC}/${build_precision}/bin/* ; for file in $BIN_LIBRARIES $BIN_NETCDF $BIN_SLEPC; do if test -f $file; then From fda97bc5135f7597ab46ff0682b1cbf38424ec00 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 19 Mar 2021 14:26:24 +0100 Subject: [PATCH 0018/1367] Version 5.0.0, Revision 19726, Hash 374f3f638 MODIFIED * config/version/version.m4 configure bse/K_driver.F bse/K_kernel.F Bugs: - [yambo] Fixed issue with ALDA Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_driver.F | 4 ++-- src/bse/K_kernel.F | 37 +++++++++++++++++++++++++------------ 4 files changed, 41 insertions(+), 28 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 7adc3c2938..21821b7f01 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19725 h.a50e1b91d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19726 h.374f3f638, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19725" -SHASH="a50e1b91d" +SREVISION="19726" +SHASH="374f3f638" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index ddbea67379..4279356d3c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19725 h.a50e1b91d. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19726 h.374f3f638. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19725 h.a50e1b91d' -PACKAGE_STRING='Yambo 5.0.0 r.19725 h.a50e1b91d' +PACKAGE_VERSION='5.0.0 r.19726 h.374f3f638' +PACKAGE_STRING='Yambo 5.0.0 r.19726 h.374f3f638' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1530,7 +1530,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19725 h.a50e1b91d to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19726 h.374f3f638 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1596,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19725 h.a50e1b91d:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19726 h.374f3f638:";; esac cat <<\_ACEOF @@ -1801,7 +1801,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19725 h.a50e1b91d +Yambo configure 5.0.0 r.19726 h.374f3f638 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19725 h.a50e1b91d, which was +It was created by Yambo $as_me 5.0.0 r.19726 h.374f3f638, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2831,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19725" -SHASH="a50e1b91d" +SREVISION="19726" +SHASH="374f3f638" @@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19725 h.a50e1b91d, which was +This file was extended by Yambo $as_me 5.0.0 r.19726 h.374f3f638, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14972,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19725 h.a50e1b91d +Yambo config.status 5.0.0 r.19726 h.374f3f638 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 24e7907154..f1973d41be 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -210,7 +210,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! Compute qindx_B_max ! ===================== ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) then + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then ! ! Here I need the distribution over k call PARALLEL_SETUP_K_scheme("K") @@ -251,7 +251,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) !=================== call K_observables("ALLOC",W_bss) ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) then + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then ! ! W/X RL size setup looking at the max index of G-G' ! ========= diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 7b6d55166c..cf025b6fc7 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -26,7 +26,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! K = <2V-W> for n_spin=1 ! use pars, ONLY:SP,schlen,pi,cZERO,cI - use stderr, ONLY:intc use LOGO, ONLY:pickup_a_random use drivers, ONLY:l_bs_fxc,l_bss,l_tddft use frequency, ONLY:w_samp @@ -83,7 +82,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ... Kernel loop ! DEFINE_BSK_COMMON_INDEXES - integer :: i_block,O_ng_shift,O_ng_exch,iHxc,& + integer :: i_block,O_ng_shift,O_ng_exch,iHxc,NG(2),& & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& & bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4),i_andrea complex(SP):: Co,H_x,H_c,BS_mat_tmp @@ -169,8 +168,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) O_ng=G_m_G_maxval ! call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") ! Hybrid functional. + ! < WARNIGN: 2021/03/19 + ! The following can be safely removed with the new implementation + ! However it is kept for internal consistency. Otherwise the output of many BSE tests could change ! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered - ! if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") + if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") + ! WARNING > if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) endif ! @@ -186,9 +189,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif endif ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) then + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then O_ng=G_m_G_maxval - ! call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") + ! < WARNIGN: 2021/03/19 + ! The following can be safely removed with the new implementation + ! However it is kept for internal consistency. Otherwise the output of many BSE tests could change + call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") + ! WARNING > if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) endif ! @@ -196,7 +203,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if( l_BSE_kernel_complete ) return ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) qindx_tmp=qindx_B_init(qindx_ID) + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) qindx_tmp=qindx_B_init(qindx_ID) ! ! Screened interaction !====================== @@ -240,9 +247,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) bands_to_load=BS_bands if (BS_K_is_ALDA) bands_to_load=(/1,BS_bands(2)/) ! - section_title='-BSK' - if (l_bs_fxc) section_title='-BSK->Fxc' - ! ! DB identifier !=============== BS_identifier=pickup_a_random(10000._SP) @@ -276,8 +280,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! do iHxc=1,2 ! - if (iHxc==1) call WF_load(WF,max(BS_n_g_exch,BS_n_g_fxc),O_ng_exch,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) - if (iHxc==2) call WF_load(WF, O_ng, O_ng_shift,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) + section_title='-BSK-'//trim(intc(iHxc)) + if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) + ! + if (iHxc==1) NG=(/max(BS_n_g_exch,BS_n_g_fxc),O_ng_exch/) + ! < WARNIGN: 2021/03/19 + ! The following can be safely changed to the commente line + ! However it is kept for internal consistency. Otherwise the output of many BSE tests could change + !if (iHxc==2) NG=(/ O_ng, O_ng_shift/) + if (iHxc==2) NG(2)=O_ng_shift + ! WARNING > + call WF_load(WF,NG(1),NG(2),bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) ! ! Wave Functions Phases !======================= @@ -572,7 +585,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(WF_phase) endif ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.(l_bs_fxc.or.BS_K_is_ALDA)) qindx_tmp=qindx_B_close(qindx_ID) + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) qindx_tmp=qindx_B_close(qindx_ID) YAMBO_FREE(BS_W) ! endif From 28e3eb039c6c747ad610371dbc2b7fd5a1cf0e83 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 19 Mar 2021 14:43:36 +0100 Subject: [PATCH 0019/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 64aaab8996..f4342702cf 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19727 h.fda97bc51, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19733 h.c840dbd96, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19727" -SHASH="fda97bc51" +SREVISION="19733" +SHASH="c840dbd96" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 7c3c6109ea..d9a91a1171 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19727 h.fda97bc51. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19733 h.c840dbd96. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19727 h.fda97bc51' -PACKAGE_STRING='Yambo 5.0.0 r.19727 h.fda97bc51' +PACKAGE_VERSION='5.0.0 r.19733 h.c840dbd96' +PACKAGE_STRING='Yambo 5.0.0 r.19733 h.c840dbd96' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1530,7 +1530,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19727 h.fda97bc51 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19733 h.c840dbd96 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1596,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19727 h.fda97bc51:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19733 h.c840dbd96:";; esac cat <<\_ACEOF @@ -1801,7 +1801,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19727 h.fda97bc51 +Yambo configure 5.0.0 r.19733 h.c840dbd96 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19727 h.fda97bc51, which was +It was created by Yambo $as_me 5.0.0 r.19733 h.c840dbd96, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2831,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19727" -SHASH="fda97bc51" +SREVISION="19733" +SHASH="c840dbd96" @@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19727 h.fda97bc51, which was +This file was extended by Yambo $as_me 5.0.0 r.19733 h.c840dbd96, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14972,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19727 h.fda97bc51 +Yambo config.status 5.0.0 r.19733 h.c840dbd96 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From e4067b5e44641df72c0ca911186627f28a41f1a2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 19 Mar 2021 14:54:05 +0100 Subject: [PATCH 0020/1367] Version 5.0.0, Revision 19734, Hash 28e3eb039 MODIFIED * config/version/version.m4 configure bse/K_kernel.F Changes: - [yambo] Warning moved to comments Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_kernel.F | 18 +++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index f4342702cf..e50cbfd76d 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19733 h.c840dbd96, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19734 h.28e3eb039, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19733" -SHASH="c840dbd96" +SREVISION="19734" +SHASH="28e3eb039" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d9a91a1171..d73ae9c0c7 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19733 h.c840dbd96. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19734 h.28e3eb039. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19733 h.c840dbd96' -PACKAGE_STRING='Yambo 5.0.0 r.19733 h.c840dbd96' +PACKAGE_VERSION='5.0.0 r.19734 h.28e3eb039' +PACKAGE_STRING='Yambo 5.0.0 r.19734 h.28e3eb039' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1530,7 +1530,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19733 h.c840dbd96 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19734 h.28e3eb039 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1596,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19733 h.c840dbd96:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19734 h.28e3eb039:";; esac cat <<\_ACEOF @@ -1801,7 +1801,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19733 h.c840dbd96 +Yambo configure 5.0.0 r.19734 h.28e3eb039 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2480,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19733 h.c840dbd96, which was +It was created by Yambo $as_me 5.0.0 r.19734 h.28e3eb039, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2831,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19733" -SHASH="c840dbd96" +SREVISION="19734" +SHASH="28e3eb039" @@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19733 h.c840dbd96, which was +This file was extended by Yambo $as_me 5.0.0 r.19734 h.28e3eb039, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14972,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19733 h.c840dbd96 +Yambo config.status 5.0.0 r.19734 h.28e3eb039 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 0cbc689162..76ec3f6851 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -168,11 +168,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) O_ng=G_m_G_maxval ! < WARNIGN: 2021/03/19 ! The following can be safely removed with the new implementation - ! However it is kept for internal consistency. Otherwise the output of many BSE tests could change - ! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered - call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") - ! Hybrid functional. - if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") + ! However it maybe needed for internal consistency. Otherwise the output of many BSE tests could change + !! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered + !call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") + !! Hybrid functional. + !if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") ! WARNING > if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) endif @@ -275,10 +275,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (iHxc==1) NG=(/max(BS_n_g_exch,BS_n_g_fxc),O_ng_exch/) ! < WARNIGN: 2021/03/19 - ! The following can be safely changed to the commente line - ! However it is kept for internal consistency. Otherwise the output of many BSE tests could change - !if (iHxc==2) NG=(/ O_ng, O_ng_shift/) - if (iHxc==2) NG(2)=O_ng_shift + ! The following has been changed to the commente line + ! However the commented line maybe needed for internal consistency. Otherwise the output of many BSE tests could change + if (iHxc==2) NG=(/ O_ng, O_ng_shift/) + !if (iHxc==2) NG(2)=O_ng_shift ! WARNING > call WF_load(WF,NG(1),NG(2),bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) ! From bd411f0d41da8674fa88162584e02635408c65ae Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 20 Mar 2021 01:17:41 +0100 Subject: [PATCH 0021/1367] Version 5.0.0, Revision 19735, Hash e4067b5e4 MODIFIED * config/m4/acx_report.m4 config/m4/yambo_specific.m4 config/mk/defs.mk.in config/report.in config/version/version.m4 configure dipoles/DIPOLE_overlaps.F dipoles/DIPOLE_p_matrix_elements.F dipoles/DIPOLE_spin_magnetization.F dipoles/DIPOLE_x_real_space.F hamiltonian/MAG_A_phase.F hamiltonian/MAG_Hamiltonian.F hamiltonian/Pseudo_Hamiltonian.F hamiltonian/V_real_space_to_H.F hamiltonian/Vgrad_real_space_to_H.F modules/mod_wave_func.F modules/mod_wrapper.F modules/mod_wrapper_omp.F nloptics/NL_build_valence_bands.F qp/XCo_local.F wf_and_fft/WF_alloc.F wf_and_fft/WF_apply_symm.F wf_and_fft/WF_free.F wf_and_fft/WF_load.F wf_and_fft/WF_spatial_inversion.F wf_and_fft/WF_symm.F xc_functionals/el_density_and_current.F xc_functionals/el_density_matrix.F xc_functionals/el_magnetization.F xc_functionals/el_magnetization_matrix.F ypp/electrons/electrons_magn_factors.F NEW * include/headers/common/yambo_wfs.h Changes: - [yambo] Created version for molecules. It is activated via compilation option --enable-mol Patch sent by: Davide Sangalli --- config/m4/acx_report.m4 | 4 ++ config/m4/yambo_specific.m4 | 9 +++ config/mk/defs.mk.in | 2 +- config/report.in | 1 + config/version/version.m4 | 6 +- configure | 44 +++++++++++---- include/headers/common/yambo_wfs.h | 38 +++++++++++++ src/dipoles/DIPOLE_overlaps.F | 2 +- src/dipoles/DIPOLE_p_matrix_elements.F | 4 +- src/dipoles/DIPOLE_spin_magnetization.F | 24 ++++---- src/dipoles/DIPOLE_x_real_space.F | 4 +- src/hamiltonian/MAG_A_phase.F | 4 +- src/hamiltonian/MAG_Hamiltonian.F | 6 +- src/hamiltonian/Pseudo_Hamiltonian.F | 2 +- src/hamiltonian/V_real_space_to_H.F | 4 +- src/hamiltonian/Vgrad_real_space_to_H.F | 2 +- src/modules/mod_wave_func.F | 25 ++++++++- src/modules/mod_wrapper.F | 59 ++++++-------------- src/modules/mod_wrapper_omp.F | 42 ++++---------- src/nloptics/NL_build_valence_bands.F | 2 +- src/qp/XCo_local.F | 14 ++--- src/wf_and_fft/WF_alloc.F | 25 ++++++--- src/wf_and_fft/WF_apply_symm.F | 10 +++- src/wf_and_fft/WF_free.F | 16 ++++-- src/wf_and_fft/WF_load.F | 31 +++++++--- src/wf_and_fft/WF_spatial_inversion.F | 8 ++- src/wf_and_fft/WF_symm.F | 12 ++-- src/xc_functionals/el_density_and_current.F | 8 +-- src/xc_functionals/el_density_matrix.F | 4 +- src/xc_functionals/el_magnetization.F | 16 +++--- src/xc_functionals/el_magnetization_matrix.F | 26 ++++----- ypp/electrons/electrons_magn_factors.F | 16 +++--- 32 files changed, 279 insertions(+), 191 deletions(-) create mode 100644 include/headers/common/yambo_wfs.h diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index 7c1fa438db..de0660d112 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -29,6 +29,9 @@ AC_DEFUN([ACX_REPORT], DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -196,6 +199,7 @@ if test "$mpibuild" = "yes" ; then fi # AC_SUBST(DP_check) +AC_SUBST(MOL_check) AC_SUBST(KEEP_OBJS_check) AC_SUBST(TIME_profile_check) AC_SUBST(MEM_profile_check) diff --git a/config/m4/yambo_specific.m4 b/config/m4/yambo_specific.m4 index 7ae4201eb2..d1db4509cf 100644 --- a/config/m4/yambo_specific.m4 +++ b/config/m4/yambo_specific.m4 @@ -71,6 +71,15 @@ AC_SUBST(def_dp) AC_SUBST(build_precision) # # ============================================================================ +# VERSION for molecules +AC_ARG_ENABLE(mol, AC_HELP_STRING([--enable-mol], [Molecules build. Default is no.])) +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi +AC_SUBST(enable_mol) +AC_SUBST(def_mol) +# +# ============================================================================ # # Time Profiling (mod_timing) # diff --git a/config/mk/defs.mk.in b/config/mk/defs.mk.in index c149da9b48..c9e01f5c2a 100644 --- a/config/mk/defs.mk.in +++ b/config/mk/defs.mk.in @@ -5,7 +5,7 @@ netcdf = @def_netcdf@ scalapack = @def_scalapack@ slepc = @def_slepc@ fft = @def_fft@ -xcpp = @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_memory_profile@ @def_uspp@ @def_cuda@ @def_yaml@ +xcpp = @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_memory_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_mol@ p2ycpp = @PW_CPP@ keep_objs = @enable_keep_objects@ do_blacs = @compile_blacs@ diff --git a/config/report.in b/config/report.in index 9394cd7d62..92630b89b5 100644 --- a/config/report.in +++ b/config/report.in @@ -14,6 +14,7 @@ # [EDITOR] @editor@ # [ MAKE ] @MAKE@ # +# [@MOL_check@] Version for isolated systems # [@DP_check@] Double precision # [@KEEP_OBJS_check@] Keep object files # [@TIME_profile_check@] Run-Time timing profile diff --git a/config/version/version.m4 b/config/version/version.m4 index e50cbfd76d..2337081f65 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19734 h.28e3eb039, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19735 h.e4067b5e4, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19734" -SHASH="28e3eb039" +SREVISION="19735" +SHASH="e4067b5e4" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d73ae9c0c7..c2a1b82d6d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19734 h.28e3eb039. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19735 h.e4067b5e4. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19734 h.28e3eb039' -PACKAGE_STRING='Yambo 5.0.0 r.19734 h.28e3eb039' +PACKAGE_VERSION='5.0.0 r.19735 h.e4067b5e4' +PACKAGE_STRING='Yambo 5.0.0 r.19735 h.e4067b5e4' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -818,6 +819,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -878,6 +881,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1530,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19734 h.28e3eb039 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19735 h.e4067b5e4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19734 h.28e3eb039:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19735 h.e4067b5e4:";; esac cat <<\_ACEOF @@ -1609,6 +1613,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1801,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19734 h.28e3eb039 +Yambo configure 5.0.0 r.19735 h.e4067b5e4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19734 h.28e3eb039, which was +It was created by Yambo $as_me 5.0.0 r.19735 h.e4067b5e4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19734" -SHASH="28e3eb039" +SREVISION="19735" +SHASH="e4067b5e4" @@ -2976,6 +2981,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14200,6 +14218,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14370,6 +14391,7 @@ fi + # @@ -14910,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19734 h.28e3eb039, which was +This file was extended by Yambo $as_me 5.0.0 r.19735 h.e4067b5e4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19734 h.28e3eb039 +Yambo config.status 5.0.0 r.19735 h.e4067b5e4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/headers/common/yambo_wfs.h b/include/headers/common/yambo_wfs.h new file mode 100644 index 0000000000..6bc6f41fcc --- /dev/null +++ b/include/headers/common/yambo_wfs.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2000-2020 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): DS + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + + +#ifdef _MOL +# define wfconjg(x) x +#else +# define wfconjg(x) conjg(x) +#endif + + +#ifdef _MOL +# define wfaimag(x) x +#else +# define wfaimag(x) aimag(x) +#endif + diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index a9c082ca64..389b73f157 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -148,7 +148,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & - & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) + & Vstar_dot_V(wf_ng_overlaps*n_spinor,(/WF_ik(:,:,ib,i_sp_pol)/),(/WF_ikp(:,:,ibp,i_sp_pol)/)) enddo ! ibp enddo ! ib ! diff --git a/src/dipoles/DIPOLE_p_matrix_elements.F b/src/dipoles/DIPOLE_p_matrix_elements.F index 5984d538d6..86c251c423 100644 --- a/src/dipoles/DIPOLE_p_matrix_elements.F +++ b/src/dipoles/DIPOLE_p_matrix_elements.F @@ -158,7 +158,7 @@ subroutine DIPOLE_p_matrix_elements(Xk,iv_wf,ic_wf,ik,rho,rho_spinor,P2,l_eval_P ! else ! - rho(i1)=Vstar_dot_V_omp(wf_ng*n_spinor,wf_grad(:,:),WF%c(:,:,ic_wf)) + rho(i1)=Vstar_dot_V_omp(wf_ng*n_spinor,(/wf_grad(:,:)/),(/WF%c(:,:,ic_wf)/)) ! endif ! @@ -176,7 +176,7 @@ subroutine DIPOLE_p_matrix_elements(Xk,iv_wf,ic_wf,ik,rho,rho_spinor,P2,l_eval_P enddo enddo !$omp end parallel do - P2=Vstar_dot_V_omp(wf_ng*n_spinor,wf_der_sq(:,:),WF%c(:,:,ic_wf)) + P2=Vstar_dot_V_omp(wf_ng*n_spinor,(/wf_der_sq(:,:)/),(/WF%c(:,:,ic_wf)/)) endif #endif ! diff --git a/src/dipoles/DIPOLE_spin_magnetization.F b/src/dipoles/DIPOLE_spin_magnetization.F index cd581431ef..0c29041783 100644 --- a/src/dipoles/DIPOLE_spin_magnetization.F +++ b/src/dipoles/DIPOLE_spin_magnetization.F @@ -96,35 +96,35 @@ subroutine Dipole_spin_magnetization(Xen,Xk,dip) ! ! mx ! - DIP_spin(1,ic,iv,ik_mem,2)= Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(1)),WF%c(:,1,ic_wf(2))) - DIP_spin(1,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(2)),WF%c(:,1,ic_wf(1))) + DIP_spin(1,ic,iv,ik_mem,2)= Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(1)),WF%r(:,1,ic_wf(2))) + DIP_spin(1,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(2)),WF%r(:,1,ic_wf(1))) ! ! my ! - DIP_spin(2,ic,iv,ik_mem,2)=-cI*Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(1)),WF%c(:,1,ic_wf(2))) - DIP_spin(2,ic,iv,ik_mem,1)=+cI*Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(2)),WF%c(:,1,ic_wf(1))) + DIP_spin(2,ic,iv,ik_mem,2)=-cI*Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(1)),WF%r(:,1,ic_wf(2))) + DIP_spin(2,ic,iv,ik_mem,1)=+cI*Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(2)),WF%r(:,1,ic_wf(1))) ! ! mz ! - DIP_spin(3,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(1)),WF%c(:,1,ic_wf(1))) - DIP_spin(3,ic,iv,ik_mem,2)= -Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(2)),WF%c(:,1,ic_wf(2))) + DIP_spin(3,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(1)),WF%r(:,1,ic_wf(1))) + DIP_spin(3,ic,iv,ik_mem,2)= -Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(2)),WF%r(:,1,ic_wf(2))) ! elseif (n_spinor==2) then ! ! mx ! - DIP_spin(1,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(1)),WF%c(:,2,ic_wf(1))) & - & +Vstar_dot_V(fft_size,WF%c(:,2,iv_wf(1)),WF%c(:,1,ic_wf(1))) + DIP_spin(1,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(1)),WF%r(:,2,ic_wf(1))) & + & +Vstar_dot_V(fft_size,WF%r(:,2,iv_wf(1)),WF%r(:,1,ic_wf(1))) ! ! my ! - DIP_spin(2,ic,iv,ik_mem,1)=-cI*Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(1)),WF%c(:,2,ic_wf(1))) & - & +cI*Vstar_dot_V(fft_size,WF%c(:,2,iv_wf(1)),WF%c(:,1,ic_wf(1))) + DIP_spin(2,ic,iv,ik_mem,1)=-cI*Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(1)),WF%r(:,2,ic_wf(1))) & + & +cI*Vstar_dot_V(fft_size,WF%r(:,2,iv_wf(1)),WF%r(:,1,ic_wf(1))) ! ! mz ! - DIP_spin(3,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%c(:,1,iv_wf(1)),WF%c(:,1,ic_wf(1))) & - & -Vstar_dot_V(fft_size,WF%c(:,2,iv_wf(1)),WF%c(:,2,ic_wf(1))) + DIP_spin(3,ic,iv,ik_mem,1)= Vstar_dot_V(fft_size,WF%r(:,1,iv_wf(1)),WF%r(:,1,ic_wf(1))) & + & -Vstar_dot_V(fft_size,WF%r(:,2,iv_wf(1)),WF%r(:,2,ic_wf(1))) ! endif ! diff --git a/src/dipoles/DIPOLE_x_real_space.F b/src/dipoles/DIPOLE_x_real_space.F index b0198992e1..6b14bdb37a 100644 --- a/src/dipoles/DIPOLE_x_real_space.F +++ b/src/dipoles/DIPOLE_x_real_space.F @@ -108,8 +108,8 @@ subroutine DIPOLE_x_real_space(Xen,Xk,Dip,idir_todo) if(.not.idir_todo(idir)) cycle ! DIP_tmp(idir,ic,iv) = DIP_tmp(idir,ic,iv) + & -& Vstar_dot_V_omp(fft_size,WF%c(1:fft_size,i_spinor,iv_wf), & -& x_cc(1:fft_size,idir,1)*WF%c(1:fft_size,i_spinor,ic_wf) ) +& Vstar_dot_V_omp(fft_size,WF%r(1:fft_size,i_spinor,iv_wf), & +& x_cc(1:fft_size,idir,1)*WF%r(1:fft_size,i_spinor,ic_wf) ) ! enddo enddo diff --git a/src/hamiltonian/MAG_A_phase.F b/src/hamiltonian/MAG_A_phase.F index 2117283d08..2885aa034e 100644 --- a/src/hamiltonian/MAG_A_phase.F +++ b/src/hamiltonian/MAG_A_phase.F @@ -57,8 +57,8 @@ subroutine MAG_A_phase() call WF_load(WF,0,1,(/ib_ref,ib_ref/),(/ik_ref,ik_ref/),(/is_ref,is_ref/),title='-MAG_GAUGE',impose_free_and_alloc=.TRUE.) ! iwf=WF%index(ib_ref,ik_ref,is_ref) - wf_r2(:)=r2_cyl(:)*WF%c(:,is_ref,iwf) - r2_ref=real(Vstar_dot_V(fft_size,WF%c(:,is_ref,iwf),wf_r2)) + wf_r2(:)=r2_cyl(:)*WF%r(:,1,iwf) + r2_ref=real(Vstar_dot_V(fft_size,WF%r(:,1,iwf),wf_r2)) ! n_loops=int(r2_ref*Bz/(2*SPEED_OF_LIGHT)+0.5) ! diff --git a/src/hamiltonian/MAG_Hamiltonian.F b/src/hamiltonian/MAG_Hamiltonian.F index b7e4ee674a..8ecb0481bc 100644 --- a/src/hamiltonian/MAG_Hamiltonian.F +++ b/src/hamiltonian/MAG_Hamiltonian.F @@ -190,16 +190,16 @@ subroutine MAG_Hamiltonian() if(H_magn_x_on) H_tmp(:,j_spinor,j_spinor)= H_paramagn_x(:)*wf_x(:,j_spinor,ip_wf) if(H_magn_y_on) H_tmp(:,j_spinor,j_spinor)= H_tmp(:,j_spinor,j_spinor)+H_paramagn_y(:)*wf_y(:,j_spinor,ip_wf) if(H_magn_z_on) H_tmp(:,j_spinor,j_spinor)= H_tmp(:,j_spinor,j_spinor)+H_paramagn_z(:)*wf_z(:,j_spinor,ip_wf) - H_tmp(:,j_spinor,j_spinor)=H_tmp(:,j_spinor,j_spinor)+H_diamagn(:)*WF%c(:,j_spinor,ip_wf) + H_tmp(:,j_spinor,j_spinor)=H_tmp(:,j_spinor,j_spinor)+H_diamagn(:)*WF%r(:,j_spinor,ip_wf) endif ! do i_spinor=1,n_spinor ! if (MAG_pauli) H_tmp(:,i_spinor,j_spinor)= H_tmp(:,i_spinor,j_spinor) & - & +H_pauli(:,i_spinor,j_spinor,i_sp_pol)*WF%c(:,j_spinor,ip_wf) + & +H_pauli(:,i_spinor,j_spinor,i_sp_pol)*WF%r(:,j_spinor,ip_wf) ! Hzero(ib,ibp,ik,i_sp_pol)= Hzero(ib,ibp,ik,i_sp_pol)+& -& Vstar_dot_V(fft_size,WF%c(:,i_spinor,i_wf),H_tmp(:,i_spinor,j_spinor)) +& Vstar_dot_V(fft_size,cmplx(WF%r(:,i_spinor,i_wf),kind=SP),H_tmp(:,i_spinor,j_spinor)) ! enddo ! diff --git a/src/hamiltonian/Pseudo_Hamiltonian.F b/src/hamiltonian/Pseudo_Hamiltonian.F index d3e9d60104..84e84fd814 100644 --- a/src/hamiltonian/Pseudo_Hamiltonian.F +++ b/src/hamiltonian/Pseudo_Hamiltonian.F @@ -154,7 +154,7 @@ subroutine Pseudo_Hamiltonian(Xk,Xen,l_equilibrium) ! iwf=WF%index(ib,ik,i_sp_pol) ! - kbv_ks_space(ib)=V_dot_V(fft_size*n_spinor,WF%c(:,:,iwf),kbv_gauged) + kbv_ks_space(ib)=V_dot_V(fft_size*n_spinor,(/WF%r(:,:,iwf)/),(/kbv_gauged(:,:)/)) ! #if defined _SC if (l_sc_magnetic) then diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index c9d8a88877..843fac9ce6 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -128,11 +128,11 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) i_spin=i_sp_pol+i_spinor-1 do j_spinor=1,n_spinor j_spin=i_sp_pol+j_spinor-1 - c_ws(:,i_spinor)=c_ws(:,i_spinor)+V_mat(:,i_spin,j_spin)*WF%c(:,j_spinor,i_wfp) + c_ws(:,i_spinor)=c_ws(:,i_spinor)+V_mat(:,i_spin,j_spin)*WF%r(:,j_spinor,i_wfp) enddo enddo ! - H(ib,ibp) = H(ib,ibp)+Vstar_dot_V_omp(fft_size*n_spinor,WF%c(:,:,i_wf),c_ws(:,:)) + H(ib,ibp) = H(ib,ibp)+Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,i_wf),kind=SP)/),c_ws(:,:)) ! if(ib==ibp) H(ib,ib) =real(H(ib,ib),SP) if(ib/=ibp) H(ibp,ib)=conjg(H(ib,ibp)) diff --git a/src/hamiltonian/Vgrad_real_space_to_H.F b/src/hamiltonian/Vgrad_real_space_to_H.F index 28ef1bf9d0..8760c370cf 100644 --- a/src/hamiltonian/Vgrad_real_space_to_H.F +++ b/src/hamiltonian/Vgrad_real_space_to_H.F @@ -79,7 +79,7 @@ subroutine Vgrad_real_space_to_H(ik,H,WF,V_grad) enddo ! i_wf = WF%index(ib,ik,1) - H(ib,ibp) = 0.25_SP*Vstar_dot_V(fft_size*n_spinor,WF%c(:,:,i_wf),c_ws(:,:)) + H(ib,ibp) = 0.25_SP*Vstar_dot_V(fft_size*n_spinor,(/cmplx(WF%r(:,:,i_wf),kind=SP)/),(/c_ws(:,:)/)) ! if(ib==ibp) H(ib,ib) = real(H(ib,ib ),SP) if(ib/=ibp) H(ibp,ib)=conjg(H(ib,ibp) ) diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 637cd04d3b..581321b51d 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -34,10 +34,20 @@ module wave_func integer :: sp_pol(2) ! sp_pol_range integer :: N ! states character(1) :: space +#if defined _MOL + real(SP), allocatable :: r(:,:,:) +#else + complex(SP), allocatable :: r(:,:,:) +#endif complex(SP), allocatable :: c(:,:,:) integer , allocatable :: index(:,:,:) logical , allocatable :: state(:,:,:) logical :: to_load = .TRUE. +#if defined _MOL + real(SP), allocatable DEV_ATTR :: r_d(:,:,:) +#else + complex(SP), allocatable DEV_ATTR :: r_d(:,:,:) +#endif complex(SP), allocatable DEV_ATTR :: c_d(:,:,:) end type WAVEs ! @@ -130,7 +140,6 @@ function WF_symm_gpu(ifft,isc) subroutine WF_copy(WF_in,WF_out) use electrons, ONLY: n_spinor type(WAVEs):: WF_in,WF_out - YAMBO_ALLOC(WF_out%c,(size(WF_in%c(:,1,1)),n_spinor,WF_in%N)) YAMBO_ALLOC(WF_out%index,(WF_in%b(1):WF_in%b(2),WF_in%k(1):WF_in%k(2),WF_in%sp_pol(1):WF_in%sp_pol(2))) WF_out%b = WF_in%b WF_out%k = WF_in%k @@ -138,11 +147,21 @@ subroutine WF_copy(WF_in,WF_out) WF_out%N = WF_in%N WF_out%space = WF_in%space WF_out%to_load= WF_in%to_load - WF_out%c = WF_in%c WF_out%index = WF_in%index ! + if (allocated(WF_in%c)) then + YAMBO_ALLOC(WF_out%c,(size(WF_in%c(:,1,1)),n_spinor,WF_in%N)) + WF_out%c = WF_in%c + endif if (allocated(WF_in%c_d)) then - YAMBO_ALLOC_SOURCE(WF_out%c_d,WF_in%c) + YAMBO_ALLOC_SOURCE(WF_out%c_d,WF_in%c) + endif + if (allocated(WF_in%r)) then + YAMBO_ALLOC(WF_out%r,(size(WF_in%r(:,1,1)),n_spinor,WF_in%N)) + WF_out%r = WF_in%r + endif + if (allocated(WF_in%r_d)) then + YAMBO_ALLOC_SOURCE(WF_out%r_d,WF_in%r) endif end subroutine ! diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 930a28b847..552c46b2c0 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -66,9 +66,9 @@ module wrapper end interface ! interface Vstar_dot_V - module procedure Vstar_dot_V_c1_cpu, Vstar_dot_V_c2_cpu + module procedure Vstar_dot_V_c1_cpu,V_dot_V_r1_cpu #ifdef _CUDA - module procedure Vstar_dot_V_c1_gpu, Vstar_dot_V_c2_gpu + module procedure Vstar_dot_V_c1_gpu,V_dot_V_r1_gpu #endif end interface ! @@ -80,9 +80,9 @@ module wrapper end interface ! interface V_dot_V - module procedure V_dot_V_r1_cpu, V_dot_V_c1_cpu, V_dot_V_c2_cpu + module procedure V_dot_V_r1_cpu, V_dot_V_c1_cpu #ifdef _CUDA - module procedure V_dot_V_c1_gpu + module procedure V_dot_V_r1_gpu, V_dot_V_c1_gpu #endif end interface ! @@ -318,19 +318,6 @@ complex(SP) function Vstar_dot_V_c1_cpu(N,CX,CY) #endif end function Vstar_dot_V_c1_cpu ! - complex(SP) function Vstar_dot_V_c2_cpu(N,CX,CY) - implicit none - integer, intent(in) :: N - complex(SP),intent(in) :: CX(:,:),CY(:,:) -#if defined _DOUBLE - complex(SP)::zdotc - Vstar_dot_V_c2_cpu=ZDOTC(N,CX,1,CY,1) -#else - complex(SP)::cdotc - Vstar_dot_V_c2_cpu=CDOTC(N,CX,1,CY,1) -#endif - end function Vstar_dot_V_c2_cpu - ! #ifdef _CUDA complex(SP) function Vstar_dot_V_c1_gpu(N,CX,CY) implicit none @@ -344,18 +331,6 @@ complex(SP) function Vstar_dot_V_c1_gpu(N,CX,CY) #endif end function Vstar_dot_V_c1_gpu ! - complex(SP) function Vstar_dot_V_c2_gpu(N,CX,CY) - implicit none - integer, intent(in) :: N - complex(SP), device, intent(in) :: CX(:,:),CY(:,:) - ! -#if defined _DOUBLE - Vstar_dot_V_c2_gpu=cublasZdotc(N,CX,1,CY,1) -#else - Vstar_dot_V_c2_gpu=cublasCdotc(N,CX,1,CY,1) -#endif - end function Vstar_dot_V_c2_gpu - ! #endif ! !============== @@ -407,31 +382,33 @@ real(SP) function V_dot_V_r1_cpu(N,CX,CY) #endif end function V_dot_V_r1_cpu ! - complex(SP) function V_dot_V_c1_cpu(N,CX,CY) +#ifdef _CUDA + complex(SP) function V_dot_V_r1_gpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + real(SP), device, intent(in) :: CX(*),CY(*) #if defined _DOUBLE - complex(SP)::zdotu - V_dot_V_c1_cpu=ZDOTU(N,CX,1,CY,1) + real(SP)::ddot + V_dot_V_r1_gpu=cublasDDOT(N,CX,1,CY,1) #else - complex(SP)::cdotu - V_dot_V_c1_cpu=CDOTU(N,CX,1,CY,1) + real(SP)::sdot + V_dot_V_r1_gpu=cublasSDOT(N,CX,1,CY,1) +#endif + end function V_dot_V_c1_gpu #endif - end function V_dot_V_c1_cpu ! - complex(SP) function V_dot_V_c2_cpu(N,CX,CY) + complex(SP) function V_dot_V_c1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(:,:),CY(:,:) + complex(SP),intent(in) :: CX(*),CY(*) #if defined _DOUBLE complex(SP)::zdotu - V_dot_V_c2_cpu=ZDOTU(N,CX,1,CY,1) + V_dot_V_c1_cpu=ZDOTU(N,CX,1,CY,1) #else complex(SP)::cdotu - V_dot_V_c2_cpu=CDOTU(N,CX,1,CY,1) + V_dot_V_c1_cpu=CDOTU(N,CX,1,CY,1) #endif - end function V_dot_V_c2_cpu + end function V_dot_V_c1_cpu ! #ifdef _CUDA complex(SP) function V_dot_V_c1_gpu(N,CX,CY) diff --git a/src/modules/mod_wrapper_omp.F b/src/modules/mod_wrapper_omp.F index 20bdcc467a..f226ae1380 100644 --- a/src/modules/mod_wrapper_omp.F +++ b/src/modules/mod_wrapper_omp.F @@ -52,7 +52,11 @@ module wrapper_omp end interface ! interface V_dot_V_omp - module procedure V_dot_V_r1_omp, V_dot_V_c1_omp, V_dot_V_c2_omp + module procedure V_dot_V_r1_omp, V_dot_V_c1_omp + end interface + ! + interface Vstar_dot_V_omp + module procedure V_dot_V_r1_omp, Vstar_dot_V_c1_omp end interface ! public :: V_copy_omp @@ -291,7 +295,7 @@ end subroutine V_copy_omp ! DOT PRODUCTS !============== ! - complex(SP) function Vstar_dot_V_omp(N,CX,CY) + complex(SP) function Vstar_dot_V_c1_omp(N,CX,CY) integer, intent(in) :: N complex(SP),intent(in) :: CX(*),CY(*) ! @@ -305,15 +309,15 @@ complex(SP) function Vstar_dot_V_omp(N,CX,CY) ctmp=ctmp +conjg(CX(i))*CY(i) enddo !$omp end parallel do - Vstar_dot_V_omp=ctmp + Vstar_dot_V_c1_omp=ctmp else - Vstar_dot_V_omp=Vstar_dot_V(N,CX,CY) + Vstar_dot_V_c1_omp=Vstar_dot_V(N,CX,CY) endif #else - Vstar_dot_V_omp=Vstar_dot_V(N,CX,CY) + Vstar_dot_V_c1_omp=Vstar_dot_V(N,CX,CY) #endif ! - end function Vstar_dot_V_omp + end function Vstar_dot_V_c1_omp ! real(SP) function V_dot_V_r1_omp(N,CX,CY) integer, intent(in) :: N @@ -362,30 +366,4 @@ complex(SP) function V_dot_V_c1_omp(N,CX,CY) ! end function V_dot_V_c1_omp ! - complex(SP) function V_dot_V_c2_omp(N,CX,CY) - integer, intent(in) :: N - complex(SP),intent(in) :: CX(:,:),CY(:,:) - ! -#if defined _OPENMP_INT_LINALG - integer :: i,j - complex(SP) :: ctmp - if (n_threads_now>1) then - ctmp=0.0_SP - !$omp parallel do default(shared), private(i), reduction(+:ctmp), collapse(2) - do j=1,N/size(CX,1) - do i=1,size(CX,1) - ctmp=ctmp +CX(i,j)*CY(i,j) - enddo - enddo - !$omp end parallel do - V_dot_V_c2_omp=ctmp - else - V_dot_V_c2_omp=V_dot_V(N,CX,CY) - endif -#else - V_dot_V_c2_omp=V_dot_V(N,CX,CY) -#endif - ! - end function V_dot_V_c2_omp - ! end module diff --git a/src/nloptics/NL_build_valence_bands.F b/src/nloptics/NL_build_valence_bands.F index 02ac5d7413..2577971202 100644 --- a/src/nloptics/NL_build_valence_bands.F +++ b/src/nloptics/NL_build_valence_bands.F @@ -58,7 +58,7 @@ subroutine NL_build_valence_bands(en,V_input,VAL_BANDS,lowest_band) !$omp parallel do default(shared), private(i_v,i_spinor) do i_v=1,en%nbf do i_spinor=1,n_spinor - Val_bands(:,i_v,ik_mem,is)=Val_bands(:,i_v,ik_mem,is)+V_input(ib,i_v,ik,is)*WF%c(:,i_spinor,i_wf) + Val_bands(:,i_v,ik_mem,is)=Val_bands(:,i_v,ik_mem,is)+V_input(ib,i_v,ik,is)*WF%r(:,i_spinor,i_wf) enddo enddo !$omp end parallel do diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index e558b96cb6..182914b191 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -163,11 +163,11 @@ subroutine XCo_local(E,Xk) ! !$omp parallel do default(shared), private(ifft) do ifft=1,fft_size - c_ws(ifft,1)=V_xc(ifft,1)*WF%c(ifft,1,iwfp) + c_ws(ifft,1)=V_xc(ifft,1)*WF%r(ifft,1,iwfp) enddo !$omp end parallel do ! - QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,WF%c(:,:,iwf),c_ws) + QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,iwf),kind=SP)/),(/c_ws(:,:)/)) ! if (pp_is_uspp) then call PP_vloc_augment(QP_Vxc(i1),V_xc,ik,ib,ibp) @@ -218,9 +218,9 @@ subroutine XCo_local(E,Xk) iwf =WF%index(ib,ik,i_sp_pol) iwfp=WF%index(ibp,ik,i_sp_pol) ! - c_ws(:,1)=V_xc_mat(:,i_sp_pol,i_sp_pol)*WF%c(:,1,iwfp) + c_ws(:,1)=V_xc_mat(:,i_sp_pol,i_sp_pol)*WF%r(:,1,iwfp) ! - QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,WF%c(:,:,iwf),c_ws) + QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,iwf),kind=SP)/),(/c_ws(:,:)/)) ! if (pp_is_uspp) then call error('[PPs] USPP: nspin=2 and n_spinor=1 not implemented') @@ -231,10 +231,10 @@ subroutine XCo_local(E,Xk) iwf=WF%index(ib,ik,1) iwfp=WF%index(ibp,ik,1) ! - c_ws(:,1)=V_xc_mat(:,1,1)*WF%c(:,1,iwfp)+V_xc_mat(:,1,2)*WF%c(:,2,iwfp) - c_ws(:,2)=V_xc_mat(:,2,1)*WF%c(:,2,iwfp)+V_xc_mat(:,2,2)*WF%c(:,2,iwfp) + c_ws(:,1)=V_xc_mat(:,1,1)*WF%r(:,1,iwfp)+V_xc_mat(:,1,2)*WF%r(:,2,iwfp) + c_ws(:,2)=V_xc_mat(:,2,1)*WF%r(:,2,iwfp)+V_xc_mat(:,2,2)*WF%r(:,2,iwfp) ! - QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,WF%c(:,:,iwf),c_ws) + QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,iwf),kind=SP)/),(/c_ws(:,:)/)) ! if (pp_is_uspp) then call error('[PPs] USPP: nspin=2 and n_spinor>1 not implemented') diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index b96a2a5927..6362bcffc0 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -60,23 +60,30 @@ subroutine WF_alloc(WF) ! endif ! + call PARALLEL_live_message("Wave-Function states",LOADED=WF%N,TOTAL=N_total) + ! if (WF%space=='R') wf_grid_size=fft_size if (WF%space=='G') wf_grid_size=wf_ng if (WF%space=='C') wf_grid_size=wf_ncx if (WF%space=='B') wf_grid_size=wf_ncx ! - YAMBO_ALLOC(WF%c,(wf_grid_size,n_spinor,WF%N)) - if (have_cuda) then - YAMBO_ALLOC_MOLD(WF%c_d,WF%c) + if (WF%space=='R') then + YAMBO_ALLOC(WF%r,(wf_grid_size,n_spinor,WF%N)) + WF%r=cZERO + if (have_cuda) then + YAMBO_ALLOC_MOLD(WF%r_d,WF%r) + WF%r_d=cZERO + endif + else + YAMBO_ALLOC(WF%c,(wf_grid_size,n_spinor,WF%N)) + WF%c=cZERO + if (have_cuda) then + YAMBO_ALLOC_MOLD(WF%c_d,WF%c) + WF%c_d=cZERO + endif endif ! - call PARALLEL_live_message("Wave-Function states",LOADED=WF%N,TOTAL=N_total) - ! YAMBO_ALLOC(WF%index,(WF%b(2),WF%k(2),WF%sp_pol(2))) - ! - WF%c=cZERO - if (have_cuda) WF%c_d=cZERO - ! WF%index=0 ! end subroutine diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 0223584581..c50ee39816 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -39,7 +39,11 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) integer, intent(in) :: isc(4) complex(SP), intent(out) DEV_ATTR :: WF_symm(fft_size,n_spinor) ! +#if defined _MOL + real(SP), pointer DEV_ATTR :: WF_p(:,:,:) +#else complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) +#endif integer :: i_wf integer :: ifft,isymm @@ -51,12 +55,12 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) & ' ID'//trim(intc(myid))) #endif ! - WF_p => DEV_VAR(WF%c) + WF_p => DEV_VAR(WF%r) isymm = isc(3) ! if(isc(3)==idt_index) then ! - call dev_memcpy(WF_symm,DEV_VAR(WF%c)(:,:,i_wf)) + call dev_memcpy(WF_symm,cmplx(DEV_VAR(WF%r)(:,:,i_wf),kind=SP)) ! endif ! @@ -68,7 +72,7 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) !$omp parallel do default(shared), private(ifft) #endif do ifft = 1, fft_size - WF_symm(ifft,1)=WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf) + WF_symm(ifft,1)=cmplx(WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf),kind=SP) enddo ! endif diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index 21050c8841..df58400b43 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -44,13 +44,21 @@ subroutine WF_free(WF,keep_fft) ! if (have_cuda) then if (.not. ( allocated(WF%c) .eqv. allocated(WF%c_d) ) ) & -& call error("[WF] inconsistent alloc of GPU wfcs") +& call error("[WF] inconsistent alloc of GPU wfcs in G/C sapce") + if (.not. ( allocated(WF%r) .eqv. allocated(WF%r_d) ) ) & +& call error("[WF] inconsistent alloc of GPU wfcs in R sapce") endif ! - if (.not.allocated(WF%c)) return + if (.not.(allocated(WF%c).or.allocated(WF%r))) return ! - YAMBO_FREE(WF%c) - YAMBO_FREE(WF%c_d) + if (allocated(WF%c)) then + YAMBO_FREE(WF%c) + YAMBO_FREE(WF%c_d) + endif + if (allocated(WF%r)) then + YAMBO_FREE(WF%r) + YAMBO_FREE(WF%r_d) + endif YAMBO_FREE(WF%state) YAMBO_FREE(WF%index) ! diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 818c71f7a8..fdd7a79c8b 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -25,7 +25,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! ! Load and (eventually) FFTs the wavefunctions ! - use pars, ONLY:SP,DP,schlen + use pars, ONLY:SP,DP,schlen,cZERO use com, ONLY:msg,core_io_path,fat_log use vec_operate, ONLY:c2a use stderr, ONLY:intc @@ -69,7 +69,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load character(schlen)::wf_title integer ::i_sp_pol,ikibz,ifrag,ib_grp,ib_to_load,ib,ib1,ib2,i_spinor,ic,ig,igfft,& & iG_max,iG_bounds_loaded(2),iGo_max,sp_pol_to_load_(2),wf_grid_size,& -& npwk +& npwk,N real(SP) ::mndp,mxdp,xk(3) complex(SP) ::c logical ::loaded_bounds_ok,free_and_alloc,buffer_is_ok,clean_up_states,force_WFo_ @@ -79,7 +79,11 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! complex(DP), allocatable DEV_ATTR :: wf_DP_d(:) complex(SP), allocatable DEV_ATTR :: wf_disk_d(:,:,:) - complex(SP), pointer DEV_ATTR :: wfc_d(:,:,:) +#if defined _MOL + real(SP), pointer DEV_ATTR :: wfr_d(:,:,:) +#else + complex(SP), pointer DEV_ATTR :: wfr_d(:,:,:) +#endif integer :: WFN ! ! I/O @@ -268,7 +272,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! if (have_cuda) then YAMBO_ALLOC(wf_DP_d,(wf_grid_size)) - wfc_d => WF%c_d + wfr_d => WF%r_d WFN = WF%N endif ! @@ -405,7 +409,11 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load WFN = WF%N !$cuf kernel do(1) do ic=1,wf_grid_size - wfc_d(ic,i_spinor,WFN)=cmplx(wf_DP_d(ic),kind=SP)*fft_norm +#if defined _MOL + wfr_d(ic,i_spinor,WFN)= real(wf_DP_d(ic),kind=SP)*fft_norm +#else + wfr_d(ic,i_spinor,WFN)=cmplx(wf_DP_d(ic),kind=SP)*fft_norm +#endif enddo ! enddo ! i_spinor @@ -442,7 +450,11 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! call fft_3d(wf_DP,fft_dim,+2) #endif - WF%c(:,i_spinor,WF%N)=cmplx(wf_DP(:),kind=SP)*fft_norm +#if defined _MOL + WF%r(:,i_spinor,WF%N)=real(wf_DP(:),kind=SP)*fft_norm +#else + WF%r(:,i_spinor,WF%N)=cmplx(wf_DP(:),kind=SP)*fft_norm +#endif ! enddo ! i_spinor #ifdef _CUDA @@ -464,7 +476,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! call msg('rns', '[WF] Copying WF data from GPU device') if(WF%space=='R') then - WF%c = WF%c_d + WF%r = WF%r_d else WF%c_d = WF%c endif @@ -565,7 +577,10 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! if ( WF%index(ib1,1,1)==0 .or. WF%index(ib2,1,1)==0 ) cycle ! - c=Vstar_dot_V( size(WF%c(:,:,WF%index(1,1,1))), WF%c(:,:,WF%index(ib1,1,1) ) , WF%c(:,:,WF%index(ib2,1,1)) ) + c=cZERO + N=size(WF%r(:,:,WF%index(1,1,1))) + if (WF%space=='R') c=Vstar_dot_V( N, (/WF%r(:,:,WF%index(ib1,1,1) )/) , (/WF%r(:,:,WF%index(ib2,1,1))/) ) + if (WF%space/='R') c=Vstar_dot_V( N, (/WF%c(:,:,WF%index(ib1,1,1) )/) , (/WF%c(:,:,WF%index(ib2,1,1))/) ) ! if (abs(c)>mxdp) mxdp=abs(c) if (abs(c) + ! type(levels) ::en type(bz_samp)::Xk ! @@ -56,7 +58,7 @@ subroutine WF_spatial_inversion(en,Xk) ! ! WF procedure ! - if (.not.allocated(WF%c).or.WF%space/='R') return + if (.not.allocated(WF%r).or.WF%space/='R') return ! ! When using wf's the space inv is tested using the first ! nsym/(i_time_rev+1) and all the nsym. If there is not @@ -77,7 +79,7 @@ subroutine WF_spatial_inversion(en,Xk) ! #if !defined _OPENMP ! - forall(i1=1:fft_size) cv(i1)=conjg(WF%c(i1,i_spinor,1))*WF%c(i1,i_spinor,1) + forall(i1=1:fft_size) cv(i1)=wfconjg(cmplx(WF%r(i1,i_spinor,1),kind=SP))*WF%r(i1,i_spinor,1) mv(1)=sum(rho_nsi(:)*cv(:)) mv(2)=sum(rho_si(:)*cv(:)) ! @@ -86,7 +88,7 @@ subroutine WF_spatial_inversion(en,Xk) !$omp parallel do default(shared), private(i1,i_spinor), reduction(+:mv) do i_spinor=1,n_spinor do i1=1,fft_size - cv(i1)=conjg(WF%c(i1,i_spinor,1))*WF%c(i1,i_spinor,1) + cv(i1)=wfconjg(WF%r(i1,i_spinor,1))*WF%r(i1,i_spinor,1) mv(1)=mv(1) +rho_nsi(i1)*cv(i1) mv(2)=mv(2) +rho_si(i1) *cv(i1) enddo diff --git a/src/wf_and_fft/WF_symm.F b/src/wf_and_fft/WF_symm.F index 3b900ede51..45a088da18 100644 --- a/src/wf_and_fft/WF_symm.F +++ b/src/wf_and_fft/WF_symm.F @@ -41,17 +41,17 @@ function WF_symm(ifft,isc) i_wf=WF%index(isc(1),isc(2),isc(4)) ! if(isc(3)==idt_index) then - WF_symm(:)=WF%c(ifft,:,i_wf) + WF_symm(:)=WF%r(ifft,:,i_wf) return endif ! - if(n_spinor==1) WF_symm(1)=WF%c(fft_rot_r(ifft,isc(3)),1,i_wf) + if(n_spinor==1) WF_symm(1)=cmplx(WF%r(fft_rot_r(ifft,isc(3)),1,i_wf),kind=SP) ! if (n_spinor==2) then - WF_symm(1)=spin_sop(1,1,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),1,i_wf)+ & -& spin_sop(1,2,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),2,i_wf) - WF_symm(2)=spin_sop(2,1,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),1,i_wf)+ & -& spin_sop(2,2,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),2,i_wf) + WF_symm(1)=spin_sop(1,1,isc(3))*WF%r(fft_rot_r(ifft,isc(3)),1,i_wf)+ & +& spin_sop(1,2,isc(3))*WF%r(fft_rot_r(ifft,isc(3)),2,i_wf) + WF_symm(2)=spin_sop(2,1,isc(3))*WF%r(fft_rot_r(ifft,isc(3)),1,i_wf)+ & +& spin_sop(2,2,isc(3))*WF%r(fft_rot_r(ifft,isc(3)),2,i_wf) endif ! if(isc(3)>nsym/(i_time_rev+1)) WF_symm=conjg(WF_symm) diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 0ff3b8735b..b5bf918d5b 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -160,7 +160,7 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) ! if (l_rho) then do i_spinor=1,n_spinor - rho_no_sym(:)=rho_no_sym(:)+f_occ*k%weights(ik)*abs(WF%c(:,i_spinor,i_wf))**2 + rho_no_sym(:)=rho_no_sym(:)+f_occ*k%weights(ik)*abs(WF%r(:,i_spinor,i_wf))**2 enddo ! ! uspp becsum @@ -175,12 +175,12 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) !DEBUG> !if (l_J) then ! ! - ! call eval_Gradient(WF%c(:,:,i_wf),WF_der,n_spinor,"wave") - ! ! + ! call eval_Gradient(WF%r(:,:,i_wf),WF_der,n_spinor,"wave") + ! ! ! do i_dir=1,3 ! do i_spinor=1,n_spinor ! do i_r=1,fft_size - ! J_no_sym(i_r,i_dir)=J_no_sym(i_r,i_dir)+E%f(ib,ik,i_sp_pol)*k%weights(ik)*aimag(WF%c(i_r,i_spinor,i_wf)*WF_der(i_r,i_spinor,i_dir)) + ! J_no_sym(i_r,i_dir)=J_no_sym(i_r,i_dir)+E%f(ib,ik,i_sp_pol)*k%weights(ik)*aimag(WF%r(i_r,i_spinor,i_wf)*WF_der(i_r,i_spinor,i_dir)) ! enddo ! enddo ! enddo diff --git a/src/xc_functionals/el_density_matrix.F b/src/xc_functionals/el_density_matrix.F index f16e7a709c..276b3f01b7 100644 --- a/src/xc_functionals/el_density_matrix.F +++ b/src/xc_functionals/el_density_matrix.F @@ -75,7 +75,7 @@ subroutine el_density_matrix(G_lesser,en,Xk,rho,lowest_band) ! i_wf1=WF_tmp%index(ib1,ik,i_sp_pol) do i_spinor=1,n_spinor - rho_no_sym(:)=rho_no_sym(:)+real(f_occ*Xk%weights(ik)*abs(WF_tmp%c(:,i_spinor,i_wf1))**2) + rho_no_sym(:)=rho_no_sym(:)+real(f_occ*Xk%weights(ik)*abs(WF_tmp%r(:,i_spinor,i_wf1))**2) enddo ! enddo @@ -114,7 +114,7 @@ subroutine el_density_matrix(G_lesser,en,Xk,rho,lowest_band) i_wf1=WF%index(ib1,ik,i_sp_pol) i_wf2=WF%index(ib2,ik,i_sp_pol) do i_spinor=1,n_spinor - rho_no_sym(:)=rho_no_sym(:)+real(f_occ*WF%c(:,i_spinor,i_wf1)*conjg(WF%c(:,i_spinor,i_wf2)),SP) + rho_no_sym(:)=rho_no_sym(:)+real(f_occ*WF%r(:,i_spinor,i_wf1)*conjg(WF%r(:,i_spinor,i_wf2)),SP) enddo ! enddo diff --git a/src/xc_functionals/el_magnetization.F b/src/xc_functionals/el_magnetization.F index 8cd12fcf27..225f8f4e2a 100644 --- a/src/xc_functionals/el_magnetization.F +++ b/src/xc_functionals/el_magnetization.F @@ -47,6 +47,8 @@ subroutine el_magnetization(en,Xk,magn) ! implicit none ! +#include + ! type(levels), intent(in ) ::en type(bz_samp),intent(in ) ::Xk real(SP), intent(out) ::magn(fft_size,3) @@ -92,7 +94,7 @@ subroutine el_magnetization(en,Xk,magn) ! ! mz ! - cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*f_occ*real(conjg(WF%c(:,1,i_wf))*WF%c(:,1,i_wf)) + cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*f_occ*real(wfconjg(WF%r(:,1,i_wf))*WF%r(:,1,i_wf)) ! else if(n_spinor==2) then ! @@ -100,20 +102,20 @@ subroutine el_magnetization(en,Xk,magn) ! mx ! cv(:,1)=cv(:,1)+Xk%weights(ik)*f_occ*(& -& +real(conjg(WF%c(:,1,i_wf))*WF%c(:,2,i_wf))& -& +real(conjg(WF%c(:,2,i_wf))*WF%c(:,1,i_wf)) ) +& +real(wfconjg(WF%r(:,1,i_wf))*WF%r(:,2,i_wf))& +& +real(wfconjg(WF%r(:,2,i_wf))*WF%r(:,1,i_wf)) ) ! ! my ! cv(:,2)=cv(:,2)+Xk%weights(ik)*f_occ*(& -& +aimag(conjg(WF%c(:,1,i_wf))*WF%c(:,2,i_wf))& -& -aimag(conjg(WF%c(:,2,i_wf))*WF%c(:,1,i_wf)) ) +& +wfaimag(wfconjg(WF%r(:,1,i_wf))*WF%r(:,2,i_wf))& +& -wfaimag(wfconjg(WF%r(:,2,i_wf))*WF%r(:,1,i_wf)) ) ! ! mz ! cv(:,3)=cv(:,3)+Xk%weights(ik)*f_occ*(& -& +real(conjg(WF%c(:,1,i_wf))*WF%c(:,1,i_wf))& -& -real(conjg(WF%c(:,2,i_wf))*WF%c(:,2,i_wf)) ) +& +real(wfconjg(WF%r(:,1,i_wf))*WF%r(:,1,i_wf))& +& -real(wfconjg(WF%r(:,2,i_wf))*WF%r(:,2,i_wf)) ) ! endif ! diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index f98729d6be..bcc4c33a58 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -88,27 +88,27 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! ! mz ! - cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*real(f_occ)*real(conjg(WF_tmp%c(:,1,i_wf1))*WF_tmp%c(:,1,i_wf1)) + cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*real(f_occ)*real(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1)) ! else if(n_spinor==2) then ! ! mx ! cv(:,1)=cv(:,1)+Xk%weights(ik)*real(f_occ)*(& -& +real(conjg(WF_tmp%c(:,1,i_wf1))*WF_tmp%c(:,2,i_wf1))& -& +real(conjg(WF_tmp%c(:,2,i_wf1))*WF_tmp%c(:,1,i_wf1)) ) +& +real(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,2,i_wf1))& +& +real(conjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,1,i_wf1)) ) ! ! my ! cv(:,2)=cv(:,2)+Xk%weights(ik)*real(f_occ)*(& -& +aimag(conjg(WF_tmp%c(:,1,i_wf1))*WF_tmp%c(:,2,i_wf1))& -& -aimag(conjg(WF_tmp%c(:,2,i_wf1))*WF_tmp%c(:,1,i_wf1)) ) +& +aimag(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,2,i_wf1))& +& -aimag(conjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,1,i_wf1)) ) ! ! mz ! cv(:,3)=cv(:,3)+Xk%weights(ik)*real(f_occ)*(& -& +real(conjg(WF_tmp%c(:,1,i_wf1))*WF_tmp%c(:,1,i_wf1))& -& -real(conjg(WF_tmp%c(:,2,i_wf1))*WF_tmp%c(:,2,i_wf1)) ) +& +real(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1))& +& -real(conjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,2,i_wf1)) ) ! endif ! @@ -152,20 +152,20 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! mx ! cv(:,1)=cv(:,1)+(& -& real(f_occ*conjg(WF%c(:,1,i_wf1))*WF%c(:,2,i_wf2))& -& +real(f_occ*conjg(WF%c(:,2,i_wf1))*WF%c(:,1,i_wf2)) ) +& real(f_occ*conjg(WF%r(:,1,i_wf1))*WF%r(:,2,i_wf2))& +& +real(f_occ*conjg(WF%r(:,2,i_wf1))*WF%r(:,1,i_wf2)) ) ! ! my ! cv(:,2)=cv(:,2)+(& -& aimag(f_occ*conjg(WF%c(:,1,i_wf1))*WF%c(:,2,i_wf2))& -& -aimag(f_occ*conjg(WF%c(:,2,i_wf1))*WF%c(:,1,i_wf2)) ) +& aimag(f_occ*conjg(WF%r(:,1,i_wf1))*WF%r(:,2,i_wf2))& +& -aimag(f_occ*conjg(WF%r(:,2,i_wf1))*WF%r(:,1,i_wf2)) ) ! ! mz ! cv(:,3)=cv(:,3)+(& -& real(f_occ*conjg(WF%c(:,1,i_wf1))*WF%c(:,1,i_wf2))& -& -real(f_occ*conjg(WF%c(:,2,i_wf1))*WF%c(:,2,i_wf2)) ) +& real(f_occ*conjg(WF%r(:,1,i_wf1))*WF%r(:,1,i_wf2))& +& -real(f_occ*conjg(WF%r(:,2,i_wf1))*WF%r(:,2,i_wf2)) ) endif ! enddo diff --git a/ypp/electrons/electrons_magn_factors.F b/ypp/electrons/electrons_magn_factors.F index e9465509d6..ab254d1821 100644 --- a/ypp/electrons/electrons_magn_factors.F +++ b/ypp/electrons/electrons_magn_factors.F @@ -34,12 +34,14 @@ subroutine electrons_magn_factors(kpts,bands,magn_factors) ! implicit none ! +#include + ! integer, intent(in) :: kpts(2),bands(2) real(SP), intent(out) :: magn_factors(bands(1):bands(2),kpts(1):kpts(2),3) ! ! Work Space ! - integer :: ik,ib,i_wf(2) + integer :: ik,ib,i_wf type(PP_indexes) :: px ! call PP_indexes_reset(px) @@ -56,14 +58,14 @@ subroutine electrons_magn_factors(kpts,bands,magn_factors) if( .not. px%element_2D(ik-kpts(1)+1,ib-bands(1)+1) ) cycle i_wf=WF%index(ib,ik,1) ! x - magn_factors(ib,ik,1)=real(Vstar_dot_V_omp( fft_size, WF%c(:, 1,i_wf), WF%c(:,2,i_wf) ),SP) & -& +real(Vstar_dot_V_omp( fft_size, WF%c(:, 2,i_wf), WF%c(:,1,i_wf) ),SP) + magn_factors(ib,ik,1)=real(Vstar_dot_V_omp( fft_size, WF%r(:,1,i_wf), WF%r(:,2,i_wf) ),SP) & +& +real(Vstar_dot_V_omp( fft_size, WF%r(:,2,i_wf), WF%r(:,1,i_wf) ),SP) ! y - magn_factors(ib,ik,2)=aimag(Vstar_dot_V_omp( fft_size, WF%c(:,1,i_wf), WF%c(:,2,i_wf) )) & -& -aimag(Vstar_dot_V_omp( fft_size, WF%c(:,2,i_wf), WF%c(:,1,i_wf) )) + magn_factors(ib,ik,2)=wfaimag(Vstar_dot_V_omp( fft_size, WF%r(:,1,i_wf), WF%r(:,2,i_wf) )) & +& -wfaimag(Vstar_dot_V_omp( fft_size, WF%r(:,2,i_wf), WF%r(:,1,i_wf) )) ! z - magn_factors(ib,ik,3)=real(Vstar_dot_V_omp( fft_size, WF%c(:,1,i_wf), WF%c(:,1,i_wf) ),SP) & -& -real(Vstar_dot_V_omp( fft_size, WF%c(:,2,i_wf), WF%c(:,2,i_wf) ),SP) + magn_factors(ib,ik,3)=real(Vstar_dot_V_omp( fft_size, WF%r(:,1,i_wf), WF%r(:,1,i_wf) ),SP) & +& -real(Vstar_dot_V_omp( fft_size, WF%r(:,2,i_wf), WF%r(:,2,i_wf) ),SP) ! call live_timing(steps=1) enddo From 3eb3284170dccba10d14b039ca5fc333beb3441b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 20 Mar 2021 13:03:40 +0100 Subject: [PATCH 0022/1367] Version 5.0.0, Revision 19736, Hash bd411f0d4 MODIFIED * config/version/version.m4 configure include/headers/common/yambo_wfs.h modules/mod_wave_func.F wf_and_fft/WF_apply_symm.F wf_and_fft/WF_load.F Changes: - [yambo] Simplification of definition of WFs for gamma only case Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- include/headers/common/yambo_wfs.h | 16 +++++++++++++--- src/modules/mod_wave_func.F | 25 +++++++++---------------- src/wf_and_fft/WF_apply_symm.F | 6 +----- src/wf_and_fft/WF_load.F | 20 +++++--------------- 6 files changed, 42 insertions(+), 53 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 2337081f65..2a21aba6af 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19735 h.e4067b5e4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19736 h.bd411f0d4, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19735" -SHASH="e4067b5e4" +SREVISION="19736" +SHASH="bd411f0d4" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index c2a1b82d6d..26f70d7e71 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19735 h.e4067b5e4. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19736 h.bd411f0d4. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19735 h.e4067b5e4' -PACKAGE_STRING='Yambo 5.0.0 r.19735 h.e4067b5e4' +PACKAGE_VERSION='5.0.0 r.19736 h.bd411f0d4' +PACKAGE_STRING='Yambo 5.0.0 r.19736 h.bd411f0d4' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19735 h.e4067b5e4 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19736 h.bd411f0d4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19735 h.e4067b5e4:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19736 h.bd411f0d4:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19735 h.e4067b5e4 +Yambo configure 5.0.0 r.19736 h.bd411f0d4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19735 h.e4067b5e4, which was +It was created by Yambo $as_me 5.0.0 r.19736 h.bd411f0d4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19735" -SHASH="e4067b5e4" +SREVISION="19736" +SHASH="bd411f0d4" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19735 h.e4067b5e4, which was +This file was extended by Yambo $as_me 5.0.0 r.19736 h.bd411f0d4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19735 h.e4067b5e4 +Yambo config.status 5.0.0 r.19736 h.bd411f0d4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/headers/common/yambo_wfs.h b/include/headers/common/yambo_wfs.h index 6bc6f41fcc..ea36a1c09a 100644 --- a/include/headers/common/yambo_wfs.h +++ b/include/headers/common/yambo_wfs.h @@ -22,17 +22,27 @@ MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. */ +#ifdef _MOL +# define WF_RSPACE real +#else +# define WF_RSPACE complex +#endif + #ifdef _MOL -# define wfconjg(x) x +# define wfconjg(x) x #else # define wfconjg(x) conjg(x) #endif - #ifdef _MOL -# define wfaimag(x) x +# define wfaimag(x) x #else # define wfaimag(x) aimag(x) #endif +#ifdef _MOL +# define wfcmplx(x,y) real(x,y) +#else +# define wfcmplx(x,y) cmplx(x,y) +#endif diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 581321b51d..c5721332d4 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2020 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS AF ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -27,6 +27,7 @@ module wave_func ! #include #include +#include ! type WAVEs integer :: b(2) ! band range @@ -34,21 +35,13 @@ module wave_func integer :: sp_pol(2) ! sp_pol_range integer :: N ! states character(1) :: space -#if defined _MOL - real(SP), allocatable :: r(:,:,:) -#else - complex(SP), allocatable :: r(:,:,:) -#endif - complex(SP), allocatable :: c(:,:,:) - integer , allocatable :: index(:,:,:) - logical , allocatable :: state(:,:,:) - logical :: to_load = .TRUE. -#if defined _MOL - real(SP), allocatable DEV_ATTR :: r_d(:,:,:) -#else - complex(SP), allocatable DEV_ATTR :: r_d(:,:,:) -#endif - complex(SP), allocatable DEV_ATTR :: c_d(:,:,:) + WF_RSPACE(SP), allocatable :: r(:,:,:) + complex(SP), allocatable :: c(:,:,:) + integer , allocatable :: index(:,:,:) + logical , allocatable :: state(:,:,:) + logical :: to_load = .TRUE. + WF_RSPACE(SP), allocatable DEV_ATTR :: r_d(:,:,:) + complex(SP), allocatable DEV_ATTR :: c_d(:,:,:) end type WAVEs ! ! Buffered WFs diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index c50ee39816..28288b2653 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -39,11 +39,7 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) integer, intent(in) :: isc(4) complex(SP), intent(out) DEV_ATTR :: WF_symm(fft_size,n_spinor) ! -#if defined _MOL - real(SP), pointer DEV_ATTR :: WF_p(:,:,:) -#else - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) -#endif + WF_RSPACE(SP), pointer DEV_ATTR :: WF_p(:,:,:) integer :: i_wf integer :: ifft,isymm diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index fdd7a79c8b..b21bdb1ba3 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -52,6 +52,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! #include #include +#include ! integer :: iG_in,iGo_max_in,bands_to_load(2),kpts_to_load(2) type(WAVEs), target :: WF @@ -79,11 +80,8 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! complex(DP), allocatable DEV_ATTR :: wf_DP_d(:) complex(SP), allocatable DEV_ATTR :: wf_disk_d(:,:,:) -#if defined _MOL - real(SP), pointer DEV_ATTR :: wfr_d(:,:,:) -#else - complex(SP), pointer DEV_ATTR :: wfr_d(:,:,:) -#endif + WF_RSPACE(SP), pointer DEV_ATTR :: wfr_d(:,:,:) + ! integer :: WFN ! ! I/O @@ -409,11 +407,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load WFN = WF%N !$cuf kernel do(1) do ic=1,wf_grid_size -#if defined _MOL - wfr_d(ic,i_spinor,WFN)= real(wf_DP_d(ic),kind=SP)*fft_norm -#else - wfr_d(ic,i_spinor,WFN)=cmplx(wf_DP_d(ic),kind=SP)*fft_norm -#endif + wfr_d(ic,i_spinor,WFN)=wfcmplx(wf_DP_d(ic),kind=SP)*fft_norm enddo ! enddo ! i_spinor @@ -450,11 +444,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! call fft_3d(wf_DP,fft_dim,+2) #endif -#if defined _MOL - WF%r(:,i_spinor,WF%N)=real(wf_DP(:),kind=SP)*fft_norm -#else - WF%r(:,i_spinor,WF%N)=cmplx(wf_DP(:),kind=SP)*fft_norm -#endif + WF%r(:,i_spinor,WF%N)=wfcmplx(wf_DP(:),kind=SP)*fft_norm ! enddo ! i_spinor #ifdef _CUDA From 78df48d0a51375209db0c0e42b64e6abb0554665 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 21 Mar 2021 17:10:13 +0100 Subject: [PATCH 0023/1367] Version 5.0.0, Revision 19737, Hash 3eb328417 MODIFIED * config/version/version.m4 configure dipoles/DIPOLE_overlaps.F dipoles/DIPOLE_p_matrix_elements.F hamiltonian/MAG_A_phase.F hamiltonian/Pseudo_Hamiltonian.F hamiltonian/V_real_space_to_H.F hamiltonian/Vgrad_real_space_to_H.F modules/mod_wrapper.F modules/mod_wrapper_omp.F qp/XCo_local.F sc/OEP_app_inversion.F sc/V_Mean_Potential.F wf_and_fft/WF_apply_symm.F wf_and_fft/WF_load.F xc_functionals/el_density_matrix.F xc_functionals/el_magnetization_matrix.F ypp/bits/WF_map_perturbative_SOC.F ypp/electrons/electrons_WFs.F ypp/electrons/electrons_angular_momentum.F ypp/electrons/electrons_position.F ypp/electrons/electrons_spin_factors.F Bugs: - Fixed compilation of yambo_ph / yamob_sc / yambo_rt Changes: - mod_wrapper and mod_wrapper_omp changed according to what discussed in issue #445 Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +- configure | 22 +-- src/dipoles/DIPOLE_overlaps.F | 2 +- src/dipoles/DIPOLE_p_matrix_elements.F | 4 +- src/hamiltonian/MAG_A_phase.F | 2 +- src/hamiltonian/Pseudo_Hamiltonian.F | 2 +- src/hamiltonian/V_real_space_to_H.F | 2 +- src/hamiltonian/Vgrad_real_space_to_H.F | 2 +- src/modules/mod_wrapper.F | 136 +++++++++++++++++-- src/modules/mod_wrapper_omp.F | 62 ++++++++- src/qp/XCo_local.F | 6 +- src/sc/OEP_app_inversion.F | 14 +- src/sc/V_Mean_Potential.F | 10 +- src/wf_and_fft/WF_apply_symm.F | 2 + src/wf_and_fft/WF_load.F | 4 +- src/xc_functionals/el_density_matrix.F | 4 +- src/xc_functionals/el_magnetization_matrix.F | 28 ++-- ypp/bits/WF_map_perturbative_SOC.F | 3 +- ypp/electrons/electrons_WFs.F | 7 +- ypp/electrons/electrons_angular_momentum.F | 10 +- ypp/electrons/electrons_position.F | 40 +++--- ypp/electrons/electrons_spin_factors.F | 8 +- 22 files changed, 274 insertions(+), 102 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 2a21aba6af..53254c5e94 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19736 h.bd411f0d4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19737 h.3eb328417, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19736" -SHASH="bd411f0d4" +SREVISION="19737" +SHASH="3eb328417" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 26f70d7e71..9d6c046f46 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19736 h.bd411f0d4. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19737 h.3eb328417. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19736 h.bd411f0d4' -PACKAGE_STRING='Yambo 5.0.0 r.19736 h.bd411f0d4' +PACKAGE_VERSION='5.0.0 r.19737 h.3eb328417' +PACKAGE_STRING='Yambo 5.0.0 r.19737 h.3eb328417' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19736 h.bd411f0d4 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19737 h.3eb328417 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19736 h.bd411f0d4:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19737 h.3eb328417:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19736 h.bd411f0d4 +Yambo configure 5.0.0 r.19737 h.3eb328417 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19736 h.bd411f0d4, which was +It was created by Yambo $as_me 5.0.0 r.19737 h.3eb328417, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19736" -SHASH="bd411f0d4" +SREVISION="19737" +SHASH="3eb328417" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19736 h.bd411f0d4, which was +This file was extended by Yambo $as_me 5.0.0 r.19737 h.3eb328417, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19736 h.bd411f0d4 +Yambo config.status 5.0.0 r.19737 h.3eb328417 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 389b73f157..8227f2945f 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -148,7 +148,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & - & Vstar_dot_V(wf_ng_overlaps*n_spinor,(/WF_ik(:,:,ib,i_sp_pol)/),(/WF_ikp(:,:,ibp,i_sp_pol)/)) + & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) enddo ! ibp enddo ! ib ! diff --git a/src/dipoles/DIPOLE_p_matrix_elements.F b/src/dipoles/DIPOLE_p_matrix_elements.F index 86c251c423..5984d538d6 100644 --- a/src/dipoles/DIPOLE_p_matrix_elements.F +++ b/src/dipoles/DIPOLE_p_matrix_elements.F @@ -158,7 +158,7 @@ subroutine DIPOLE_p_matrix_elements(Xk,iv_wf,ic_wf,ik,rho,rho_spinor,P2,l_eval_P ! else ! - rho(i1)=Vstar_dot_V_omp(wf_ng*n_spinor,(/wf_grad(:,:)/),(/WF%c(:,:,ic_wf)/)) + rho(i1)=Vstar_dot_V_omp(wf_ng*n_spinor,wf_grad(:,:),WF%c(:,:,ic_wf)) ! endif ! @@ -176,7 +176,7 @@ subroutine DIPOLE_p_matrix_elements(Xk,iv_wf,ic_wf,ik,rho,rho_spinor,P2,l_eval_P enddo enddo !$omp end parallel do - P2=Vstar_dot_V_omp(wf_ng*n_spinor,(/wf_der_sq(:,:)/),(/WF%c(:,:,ic_wf)/)) + P2=Vstar_dot_V_omp(wf_ng*n_spinor,wf_der_sq(:,:),WF%c(:,:,ic_wf)) endif #endif ! diff --git a/src/hamiltonian/MAG_A_phase.F b/src/hamiltonian/MAG_A_phase.F index 2885aa034e..44cd72db24 100644 --- a/src/hamiltonian/MAG_A_phase.F +++ b/src/hamiltonian/MAG_A_phase.F @@ -58,7 +58,7 @@ subroutine MAG_A_phase() ! iwf=WF%index(ib_ref,ik_ref,is_ref) wf_r2(:)=r2_cyl(:)*WF%r(:,1,iwf) - r2_ref=real(Vstar_dot_V(fft_size,WF%r(:,1,iwf),wf_r2)) + r2_ref=real(Vstar_dot_V(fft_size,cmplx(WF%r(:,1,iwf),kind=SP),wf_r2)) ! n_loops=int(r2_ref*Bz/(2*SPEED_OF_LIGHT)+0.5) ! diff --git a/src/hamiltonian/Pseudo_Hamiltonian.F b/src/hamiltonian/Pseudo_Hamiltonian.F index 84e84fd814..6a2b6aa031 100644 --- a/src/hamiltonian/Pseudo_Hamiltonian.F +++ b/src/hamiltonian/Pseudo_Hamiltonian.F @@ -154,7 +154,7 @@ subroutine Pseudo_Hamiltonian(Xk,Xen,l_equilibrium) ! iwf=WF%index(ib,ik,i_sp_pol) ! - kbv_ks_space(ib)=V_dot_V(fft_size*n_spinor,(/WF%r(:,:,iwf)/),(/kbv_gauged(:,:)/)) + kbv_ks_space(ib)=V_dot_V(fft_size*n_spinor,cmplx(WF%r(:,:,iwf),kind=SP),kbv_gauged(:,:)) ! #if defined _SC if (l_sc_magnetic) then diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index 843fac9ce6..663a5f13dd 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -132,7 +132,7 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) enddo enddo ! - H(ib,ibp) = H(ib,ibp)+Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,i_wf),kind=SP)/),c_ws(:,:)) + H(ib,ibp) = H(ib,ibp)+Vstar_dot_V_omp(fft_size*n_spinor,cmplx(WF%r(:,:,i_wf),kind=SP),c_ws(:,:)) ! if(ib==ibp) H(ib,ib) =real(H(ib,ib),SP) if(ib/=ibp) H(ibp,ib)=conjg(H(ib,ibp)) diff --git a/src/hamiltonian/Vgrad_real_space_to_H.F b/src/hamiltonian/Vgrad_real_space_to_H.F index 8760c370cf..83cf6b8d0c 100644 --- a/src/hamiltonian/Vgrad_real_space_to_H.F +++ b/src/hamiltonian/Vgrad_real_space_to_H.F @@ -79,7 +79,7 @@ subroutine Vgrad_real_space_to_H(ik,H,WF,V_grad) enddo ! i_wf = WF%index(ib,ik,1) - H(ib,ibp) = 0.25_SP*Vstar_dot_V(fft_size*n_spinor,(/cmplx(WF%r(:,:,i_wf),kind=SP)/),(/c_ws(:,:)/)) + H(ib,ibp) = 0.25_SP*Vstar_dot_V(fft_size*n_spinor,cmplx(WF%r(:,:,i_wf),kind=SP),c_ws(:,:)) ! if(ib==ibp) H(ib,ib) = real(H(ib,ib ),SP) if(ib/=ibp) H(ibp,ib)=conjg(H(ib,ibp) ) diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 552c46b2c0..9ff84baed0 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -29,7 +29,8 @@ module wrapper ! TRANSA = 'T' or 't', op( A ) = A'. ! TRANSA = 'C' or 'c', op( A ) = conjg( A' ). ! - use pars, ONLY:SP,cI + use pars, ONLY:SP,cI + use iso_c_binding, ONLY:C_LOC,C_F_POINTER #ifdef _CUDA use cublas #endif @@ -66,9 +67,9 @@ module wrapper end interface ! interface Vstar_dot_V - module procedure Vstar_dot_V_c1_cpu,V_dot_V_r1_cpu + module procedure Vstar_dot_V_c1_cpu,Vstar_dot_V_c2_cpu,V_dot_V_r1_cpu,V_dot_V_r2_cpu #ifdef _CUDA - module procedure Vstar_dot_V_c1_gpu,V_dot_V_r1_gpu + module procedure Vstar_dot_V_c1_gpu,Vstar_dot_V_c2_gpu,V_dot_V_r1_gpu,V_dot_V_r2_gpu #endif end interface ! @@ -80,9 +81,9 @@ module wrapper end interface ! interface V_dot_V - module procedure V_dot_V_r1_cpu, V_dot_V_c1_cpu + module procedure V_dot_V_r1_cpu,V_dot_V_r2_cpu,V_dot_V_c1_cpu,V_dot_V_c2_cpu #ifdef _CUDA - module procedure V_dot_V_r1_gpu, V_dot_V_c1_gpu + module procedure V_dot_V_r1_gpu,V_dot_V_r2_gpu,V_dot_V_c1_gpu,V_dot_V_c2_gpu #endif end interface ! @@ -308,7 +309,7 @@ end subroutine V_copy complex(SP) function Vstar_dot_V_c1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) #if defined _DOUBLE complex(SP)::zdotc Vstar_dot_V_c1_cpu=ZDOTC(N,CX,1,CY,1) @@ -318,11 +319,30 @@ complex(SP) function Vstar_dot_V_c1_cpu(N,CX,CY) #endif end function Vstar_dot_V_c1_cpu ! + complex(SP) function Vstar_dot_V_c2_cpu(N,CX,CY) + implicit none + integer, intent(in) :: N + complex(SP),target,intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + complex(SP)::zdotc +#else + complex(SP)::cdotc +#endif + real(SP),pointer :: CX1D(:),CY1D(:) + call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + Vstar_dot_V_c2_cpu=ZDOTC(N,CX1D,1,CY1D,1) +#else + Vstar_dot_V_c2_cpu=CDOTC(N,CX1D,1,CY1D,1) +#endif + end function Vstar_dot_V_c2_cpu + ! #ifdef _CUDA complex(SP) function Vstar_dot_V_c1_gpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP), device, intent(in) :: CX(*),CY(*) + complex(SP), device, intent(in) :: CX(:),CY(:) ! #if defined _DOUBLE Vstar_dot_V_c1_gpu=cublasZdotc(N,CX,1,CY,1) @@ -331,6 +351,20 @@ complex(SP) function Vstar_dot_V_c1_gpu(N,CX,CY) #endif end function Vstar_dot_V_c1_gpu ! + complex(SP) function Vstar_dot_V_c2_gpu(N,CX,CY) + implicit none + integer, intent(in) :: N + complex(SP), device, target, intent(in) :: CX(:,:),CY(:,:) + ! + real(SP),pointer :: CX1D(:),CY1D(:) + call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + Vstar_dot_V_c2_gpu=cublasZdotc(N,CX1D,1,CY1D,1) +#else + Vstar_dot_V_c2_gpu=cublasCdotc(N,CX1D,1,CY1D,1) +#endif + end function Vstar_dot_V_c2_gpu #endif ! !============== @@ -372,7 +406,7 @@ end function Vstar_dot_VV_c1_gpu real(SP) function V_dot_V_r1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - real(SP),intent(in) :: CX(*),CY(*) + real(SP),intent(in) :: CX(:),CY(:) #if defined _DOUBLE real(SP)::ddot V_dot_V_r1_cpu=DDOT(N,CX,1,CY,1) @@ -382,11 +416,30 @@ real(SP) function V_dot_V_r1_cpu(N,CX,CY) #endif end function V_dot_V_r1_cpu ! + real(SP) function V_dot_V_r2_cpu(N,CX,CY) + implicit none + integer, intent(in) :: N + real(SP),target,intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + real(SP)::ddot +#else + real(SP)::sdot +#endif + real(SP),pointer :: CX1D(:),CY1D(:) + call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_r2_cpu=DDOT(N,CX1D,1,CY1D,1) +#else + V_dot_V_r2_cpu=SDOT(N,CX1D,1,CY1D,1) +#endif + end function V_dot_V_r2_cpu + ! #ifdef _CUDA - complex(SP) function V_dot_V_r1_gpu(N,CX,CY) + real(SP) function V_dot_V_r1_gpu(N,CX,CY) implicit none integer, intent(in) :: N - real(SP), device, intent(in) :: CX(*),CY(*) + real(SP), device, intent(in) :: CX(:),CY(:) #if defined _DOUBLE real(SP)::ddot V_dot_V_r1_gpu=cublasDDOT(N,CX,1,CY,1) @@ -394,13 +447,32 @@ complex(SP) function V_dot_V_r1_gpu(N,CX,CY) real(SP)::sdot V_dot_V_r1_gpu=cublasSDOT(N,CX,1,CY,1) #endif - end function V_dot_V_c1_gpu + end function V_dot_V_r1_gpu + ! + real(SP) function V_dot_V_r2_gpu(N,CX,CY) + implicit none + integer, intent(in) :: N + real(SP), device, target, intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + real(SP)::ddot +#else + real(SP)::sdot +#endif + real(SP),pointer :: CX1D(:),CY1D(:) + call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_r2_gpu=cublasDDOT(N,CX1D,1,CY1D,1) +#else + V_dot_V_r2_gpu=cublasSDOT(N,CX1D,1,CY1D,1) +#endif + end function V_dot_V_r2_gpu #endif ! complex(SP) function V_dot_V_c1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) #if defined _DOUBLE complex(SP)::zdotu V_dot_V_c1_cpu=ZDOTU(N,CX,1,CY,1) @@ -410,11 +482,30 @@ complex(SP) function V_dot_V_c1_cpu(N,CX,CY) #endif end function V_dot_V_c1_cpu ! + complex(SP) function V_dot_V_c2_cpu(N,CX,CY) + implicit none + integer, intent(in) :: N + complex(SP),target,intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + complex(SP)::zdotu +#else + complex(SP)::cdotu +#endif + complex(SP),pointer :: CX1D(:),CY1D(:) + call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_c2_cpu=ZDOTU(N,CX1D,1,CY1D,1) +#else + V_dot_V_c2_cpu=CDOTU(N,CX1D,1,CY1D,1) +#endif + end function V_dot_V_c2_cpu + ! #ifdef _CUDA complex(SP) function V_dot_V_c1_gpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP), device, intent(in) :: CX(*),CY(*) + complex(SP), device, intent(in) :: CX(:),CY(:) #if defined _DOUBLE complex(SP)::zdotu V_dot_V_c1_gpu=cublasZDOTU(N,CX,1,CY,1) @@ -423,6 +514,25 @@ complex(SP) function V_dot_V_c1_gpu(N,CX,CY) V_dot_V_c1_gpu=cublasCDOTU(N,CX,1,CY,1) #endif end function V_dot_V_c1_gpu + ! + complex(SP) function V_dot_V_c2_gpu(N,CX,CY) + implicit none + integer, intent(in) :: N + complex(SP), device, target, intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + complex(SP)::zdotu +#else + complex(SP)::cdotu +#endif + complex(SP),pointer :: CX1D(:),CY1D(:) + call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_c2_gpu=cublasZDOTU(N,CX1D,1,CY1D,1) +#else + V_dot_V_c2_gpu=cublasCDOTU(N,CX1D,1,CY1D,1) +#endif + end function V_dot_V_c2_gpu #endif ! !============== diff --git a/src/modules/mod_wrapper_omp.F b/src/modules/mod_wrapper_omp.F index f226ae1380..9303ebc3d5 100644 --- a/src/modules/mod_wrapper_omp.F +++ b/src/modules/mod_wrapper_omp.F @@ -52,11 +52,11 @@ module wrapper_omp end interface ! interface V_dot_V_omp - module procedure V_dot_V_r1_omp, V_dot_V_c1_omp + module procedure V_dot_V_r1_omp, V_dot_V_c1_omp, V_dot_V_c2_omp end interface ! interface Vstar_dot_V_omp - module procedure V_dot_V_r1_omp, Vstar_dot_V_c1_omp + module procedure V_dot_V_r1_omp, Vstar_dot_V_c1_omp, Vstar_dot_V_c2_omp end interface ! public :: V_copy_omp @@ -297,7 +297,7 @@ end subroutine V_copy_omp ! complex(SP) function Vstar_dot_V_c1_omp(N,CX,CY) integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) ! #if defined _OPENMP_INT_LINALG integer :: i @@ -319,9 +319,35 @@ complex(SP) function Vstar_dot_V_c1_omp(N,CX,CY) ! end function Vstar_dot_V_c1_omp ! + complex(SP) function Vstar_dot_V_c2_omp(N,CX,CY) + integer, intent(in) :: N + complex(SP),intent(in) :: CX(:,:),CY(:,:) + ! +#if defined _OPENMP_INT_LINALG + integer :: i,j + complex(SP) :: ctmp + if (n_threads_now>1) then + ctmp=0.0_SP + !$omp parallel do default(shared), private(i), reduction(+:ctmp), collapse(2) + do j=1,N/size(CX,1) + do i=1,size(CX,1) + ctmp=ctmp +conjg(CX(i,j))*CY(i,j) + enddo + enddo + !$omp end parallel do + Vstar_dot_V_c2_omp=ctmp + else + Vstar_dot_V_c2_omp=Vstar_dot_V(N,CX,CY) + endif +#else + Vstar_dot_V_c2_omp=Vstar_dot_V(N,CX,CY) +#endif + ! + end function Vstar_dot_V_c2_omp + ! real(SP) function V_dot_V_r1_omp(N,CX,CY) integer, intent(in) :: N - real(SP),intent(in) :: CX(*),CY(*) + real(SP),intent(in) :: CX(:),CY(:) ! #if defined _OPENMP_INT_LINALG integer :: i @@ -344,7 +370,7 @@ end function V_dot_V_r1_omp ! complex(SP) function V_dot_V_c1_omp(N,CX,CY) integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) ! #if defined _OPENMP_INT_LINALG integer :: i @@ -366,4 +392,30 @@ complex(SP) function V_dot_V_c1_omp(N,CX,CY) ! end function V_dot_V_c1_omp ! + complex(SP) function V_dot_V_c2_omp(N,CX,CY) + integer, intent(in) :: N + complex(SP),intent(in) :: CX(:,:),CY(:,:) + ! +#if defined _OPENMP_INT_LINALG + integer :: i,j + complex(SP) :: ctmp + if (n_threads_now>1) then + ctmp=0.0_SP + !$omp parallel do default(shared), private(i), reduction(+:ctmp), collapse(2) + do j=1,N/size(CX,1) + do i=1,size(CX,1) + ctmp=ctmp +CX(i,j)*CY(i,j) + enddo + enddo + !$omp end parallel do + V_dot_V_c2_omp=ctmp + else + V_dot_V_c2_omp=V_dot_V(N,CX,CY) + endif +#else + V_dot_V_c2_omp=V_dot_V(N,CX,CY) +#endif + ! + end function V_dot_V_c2_omp + ! end module diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index 182914b191..35c47eca79 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -167,7 +167,7 @@ subroutine XCo_local(E,Xk) enddo !$omp end parallel do ! - QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,iwf),kind=SP)/),(/c_ws(:,:)/)) + QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,cmplx(WF%r(:,:,iwf),kind=SP),c_ws(:,:)) ! if (pp_is_uspp) then call PP_vloc_augment(QP_Vxc(i1),V_xc,ik,ib,ibp) @@ -220,7 +220,7 @@ subroutine XCo_local(E,Xk) ! c_ws(:,1)=V_xc_mat(:,i_sp_pol,i_sp_pol)*WF%r(:,1,iwfp) ! - QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,iwf),kind=SP)/),(/c_ws(:,:)/)) + QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,cmplx(WF%r(:,:,iwf),kind=SP),c_ws(:,:)) ! if (pp_is_uspp) then call error('[PPs] USPP: nspin=2 and n_spinor=1 not implemented') @@ -234,7 +234,7 @@ subroutine XCo_local(E,Xk) c_ws(:,1)=V_xc_mat(:,1,1)*WF%r(:,1,iwfp)+V_xc_mat(:,1,2)*WF%r(:,2,iwfp) c_ws(:,2)=V_xc_mat(:,2,1)*WF%r(:,2,iwfp)+V_xc_mat(:,2,2)*WF%r(:,2,iwfp) ! - QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,(/cmplx(WF%r(:,:,iwf),kind=SP)/),(/c_ws(:,:)/)) + QP_Vxc(i1)=Vstar_dot_V_omp(fft_size*n_spinor,cmplx(WF%r(:,:,iwf),kind=SP),c_ws(:,:)) ! if (pp_is_uspp) then call error('[PPs] USPP: nspin=2 and n_spinor>1 not implemented') diff --git a/src/sc/OEP_app_inversion.F b/src/sc/OEP_app_inversion.F index 71d6913643..e338353f28 100644 --- a/src/sc/OEP_app_inversion.F +++ b/src/sc/OEP_app_inversion.F @@ -55,6 +55,8 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) ! I/O ! #include +#include + ! real(SP), intent(out):: Vkli(fft_size) real(SP), intent(in) :: Vslt(fft_size),rho(fft_size) complex(SP), intent(in) :: U(nkibz,n_met_bands,fft_size) @@ -63,7 +65,7 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) ! ! Work Space ! - integer :: i1,ik,iv1,iv2,is,ig1,ig2,ifft,offt + integer :: i1,ik,iv1,iv2,is,ig1,ig2,i_wf,o_wf real(SP) :: EWeight, Prefactor complex(SP), allocatable :: rhotw_sum(:),rhotw_sum_TR(:),rho_xc(:),& & Vkli_RL(:),Ko(:,:),rhotw_prd(:,:),rhotw_rs(:) @@ -125,13 +127,13 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) if (l_oep_EWeight) EWeight = E%E(iv1,ik,1)+ E%E_Fermi do iv2 = 1, iv1!E%nbf if (l_oep_kli.and.(iv2.ne.iv1)) cycle - ifft=WF%index(iv1,ik,1) - offt=WF%index(iv2,ik,1) + i_wf=WF%index(iv1,ik,1) + o_wf=WF%index(iv2,ik,1) rhotw_sum = (0._SP,0._SP) rhotw_sum_TR = (0._SP,0._SP) Prefactor = 1.0_SP if (iv1.ne.iv2) Prefactor = 2.0_SP - SigmaXC = dot_product(WF%c(:,1,ifft),U(ik,iv2,:)) + SigmaXC = dot_product(WF%r(:,1,i_wf),U(ik,iv2,:)) do i1 = 1,k%nstar(ik) is = k%star(ik,i1) l_is_TR = is>nsym/(i_time_rev+1) @@ -140,8 +142,8 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) isc%qs = (/1,1,1/) call scatter_Bamp(isc) ! - !rhotw_ds(:)=conjg(WF%c(fft_rot_r(:,is),1,ifft))*WF%c(fft_rot_r(:,is),1,offt)/EWeight - rhotw_ds(:)=WF%c(fft_rot_r(:,is),1,ifft)*conjg(WF%c(fft_rot_r(:,is),1,offt))/EWeight + !rhotw_ds(:)=conjg(WF%r(fft_rot_r(:,is),1,i_wf))*WF%r(fft_rot_r(:,is),1,o_wf)/EWeight + rhotw_ds(:)=WF%r(fft_rot_r(:,is),1,i_wf)*wfconjg(WF%r(fft_rot_r(:,is),1,o_wf))/EWeight ! rhotw_ds = rhotw_ds/(rho*real(fft_size,SP)) rhotw_rs = cZERO diff --git a/src/sc/V_Mean_Potential.F b/src/sc/V_Mean_Potential.F index 5bd3c6a6b0..a3ecb45b42 100644 --- a/src/sc/V_Mean_Potential.F +++ b/src/sc/V_Mean_Potential.F @@ -44,7 +44,7 @@ subroutine V_mean_potential(ik,i_sp_pol,WFo) ! ! Work Space ! - integer :: ib,ifft,ir,ibp + integer :: ib,i_wf,ir,ibp complex(SP):: Sigma_times_R(SC_bands(1):SC_bands(2),SC_bands(1):SC_bands(2)) ! Sigma_Times_R=cZERO @@ -72,16 +72,16 @@ subroutine V_mean_potential(ik,i_sp_pol,WFo) ! do ibp=SC_bands(1),SC_bands(2) ! - ifft=WFo%index(ibp,ik,1) + i_wf=WFo%index(ibp,ik,1) ! - V_mean(:,ib)=V_mean(:,ib)+WFo%c(:,1,ifft)*Sigma_times_R(ibp,ib) + V_mean(:,ib)=V_mean(:,ib)+WFo%r(:,1,i_wf)*Sigma_times_R(ibp,ib) ! enddo ! - ifft=WFo%index(ib,ik,1) + i_wf=WFo%index(ib,ik,1) ! do ir=1,fft_size - V_mean(ir,ib)=V_mean(ir,ib)/WFo%c(ir,1,ifft) + V_mean(ir,ib)=V_mean(ir,ib)/WFo%r(ir,1,i_wf) enddo ! enddo diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 28288b2653..2f417a2b5b 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -34,6 +34,8 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) use D_lattice, ONLY:nsym,DEV_VAR(spin_sop),i_time_rev,idt_index use deviceXlib_m ! +#include + ! implicit none ! integer, intent(in) :: isc(4) diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index b21bdb1ba3..35a921bc39 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -569,8 +569,8 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! c=cZERO N=size(WF%r(:,:,WF%index(1,1,1))) - if (WF%space=='R') c=Vstar_dot_V( N, (/WF%r(:,:,WF%index(ib1,1,1) )/) , (/WF%r(:,:,WF%index(ib2,1,1))/) ) - if (WF%space/='R') c=Vstar_dot_V( N, (/WF%c(:,:,WF%index(ib1,1,1) )/) , (/WF%c(:,:,WF%index(ib2,1,1))/) ) + if (WF%space=='R') c=Vstar_dot_V( N, WF%r(:,:,WF%index(ib1,1,1) ) , WF%r(:,:,WF%index(ib2,1,1)) ) + if (WF%space/='R') c=Vstar_dot_V( N, WF%c(:,:,WF%index(ib1,1,1) ) , WF%c(:,:,WF%index(ib2,1,1)) ) ! if (abs(c)>mxdp) mxdp=abs(c) if (abs(c) + ! type(bz_samp), intent(in) :: Xk complex(SP), intent(in) :: G_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) integer, intent(in) :: lowest_band @@ -114,7 +116,7 @@ subroutine el_density_matrix(G_lesser,en,Xk,rho,lowest_band) i_wf1=WF%index(ib1,ik,i_sp_pol) i_wf2=WF%index(ib2,ik,i_sp_pol) do i_spinor=1,n_spinor - rho_no_sym(:)=rho_no_sym(:)+real(f_occ*WF%r(:,i_spinor,i_wf1)*conjg(WF%r(:,i_spinor,i_wf2)),SP) + rho_no_sym(:)=rho_no_sym(:)+real(f_occ*WF%r(:,i_spinor,i_wf1)*wfconjg(WF%r(:,i_spinor,i_wf2)),SP) enddo ! enddo diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index bcc4c33a58..c9f2d9ee04 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -47,6 +47,8 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! implicit none ! +#include + ! type(bz_samp), intent(in) :: Xk complex(SP), intent(in) :: G_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) integer, intent(in) :: lowest_band @@ -88,27 +90,27 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! ! mz ! - cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*real(f_occ)*real(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1)) + cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*real(f_occ)*real(wfconjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1)) ! else if(n_spinor==2) then ! ! mx ! cv(:,1)=cv(:,1)+Xk%weights(ik)*real(f_occ)*(& -& +real(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,2,i_wf1))& -& +real(conjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,1,i_wf1)) ) +& +real(wfconjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,2,i_wf1))& +& +real(wfconjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,1,i_wf1)) ) ! ! my ! cv(:,2)=cv(:,2)+Xk%weights(ik)*real(f_occ)*(& -& +aimag(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,2,i_wf1))& -& -aimag(conjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,1,i_wf1)) ) +& +wfaimag(wfconjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,2,i_wf1))& +& -wfaimag(wfconjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,1,i_wf1)) ) ! ! mz ! cv(:,3)=cv(:,3)+Xk%weights(ik)*real(f_occ)*(& -& +real(conjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1))& -& -real(conjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,2,i_wf1)) ) +& +real(wfconjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1))& +& -real(wfconjg(WF_tmp%r(:,2,i_wf1))*WF_tmp%r(:,2,i_wf1)) ) ! endif ! @@ -152,20 +154,20 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! mx ! cv(:,1)=cv(:,1)+(& -& real(f_occ*conjg(WF%r(:,1,i_wf1))*WF%r(:,2,i_wf2))& -& +real(f_occ*conjg(WF%r(:,2,i_wf1))*WF%r(:,1,i_wf2)) ) +& real(f_occ*wfconjg(WF%r(:,1,i_wf1))*WF%r(:,2,i_wf2))& +& +real(f_occ*wfconjg(WF%r(:,2,i_wf1))*WF%r(:,1,i_wf2)) ) ! ! my ! cv(:,2)=cv(:,2)+(& -& aimag(f_occ*conjg(WF%r(:,1,i_wf1))*WF%r(:,2,i_wf2))& -& -aimag(f_occ*conjg(WF%r(:,2,i_wf1))*WF%r(:,1,i_wf2)) ) +& wfaimag(f_occ*wfconjg(WF%r(:,1,i_wf1))*WF%r(:,2,i_wf2))& +& -wfaimag(f_occ*wfconjg(WF%r(:,2,i_wf1))*WF%r(:,1,i_wf2)) ) ! ! mz ! cv(:,3)=cv(:,3)+(& -& real(f_occ*conjg(WF%r(:,1,i_wf1))*WF%r(:,1,i_wf2))& -& -real(f_occ*conjg(WF%r(:,2,i_wf1))*WF%r(:,2,i_wf2)) ) +& real(f_occ*wfconjg(WF%r(:,1,i_wf1))*WF%r(:,1,i_wf2))& +& -real(f_occ*wfconjg(WF%r(:,2,i_wf1))*WF%r(:,2,i_wf2)) ) endif ! enddo diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index b31bb3b909..1b32178dd7 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -42,6 +42,7 @@ subroutine WF_map_perturbative_SOC(kpt,En) use interfaces, ONLY:io_DB1_selective_scan ! #include +#include ! type(bz_samp), intent(in) :: kpt type(levels), intent(inout) :: En @@ -261,7 +262,7 @@ subroutine WF_map_perturbative_SOC(kpt,En) ! if (n_sp_pol==2 .and. i_spinor/=i_sp_pol) cycle ! - sq2=sq2+abs(dot_product(WF_SOC_rot(:,i_spinor),WF%c(:,1,i_wf )))**2 + sq2=sq2+abs(dot_product(WF_SOC_rot(:,i_spinor),WF%r(:,1,i_wf )))**2 ! enddo ! diff --git a/ypp/electrons/electrons_WFs.F b/ypp/electrons/electrons_WFs.F index 92e91bba43..f129cec7b1 100644 --- a/ypp/electrons/electrons_WFs.F +++ b/ypp/electrons/electrons_WFs.F @@ -52,6 +52,7 @@ subroutine electrons_WFs(Xen) #endif ! #include +#include ! type(levels) ::Xen ! @@ -172,7 +173,7 @@ subroutine electrons_WFs(Xen) ! i_wf=WF%index(ib,ik,1) ! - forall(ir=1:fft_size) v2plot_c(ir)=v2plot_c(ir)+WF%c(ir,1,i_wf) + forall(ir=1:fft_size) v2plot_c(ir)=v2plot_c(ir)+WF%r(ir,1,i_wf) ! else ! @@ -284,8 +285,8 @@ subroutine electrons_WFs(Xen) #if defined _YPP_SC if (.not.l_mean_potential) then #endif - forall(ir=1:fft_size) v2plot(ir)=real( WF%c(ir,1,i_wf)*conjg( WF%c(ir,1,i_wf) ) ) - if (n_spinor==2) forall(ir=1:fft_size) v2plot(ir)=v2plot(ir) + real( WF%c(ir,2,i_wf)*conjg( WF%c(ir,2,i_wf) ) ) + forall(ir=1:fft_size) v2plot(ir)=real( WF%r(ir,1,i_wf)*wfconjg( WF%r(ir,1,i_wf) ), kind=SP ) + if (n_spinor==2) forall(ir=1:fft_size) v2plot(ir)=v2plot(ir) + real( WF%r(ir,2,i_wf)*wfconjg( WF%r(ir,2,i_wf) ),kind=SP ) #if defined _YPP_SC endif #endif diff --git a/ypp/electrons/electrons_angular_momentum.F b/ypp/electrons/electrons_angular_momentum.F index f0b62efa5a..1a7b82e2d2 100644 --- a/ypp/electrons/electrons_angular_momentum.F +++ b/ypp/electrons/electrons_angular_momentum.F @@ -170,17 +170,17 @@ subroutine electrons_angular_momentum(nkpt_angular,nband_angular) ! Mi = [r x (p + 1/c*A)]_i = Li +1/c*(r x A)_i for i=x,y,z ! These are the mechanicals momenta and are gauge independent if(angular_dir(1)) M_tmp(1,:)=L_tmp(1,:)+1./SPEED_OF_LIGHT*(x_cc(:,2,1)*A_magn_z(:)- & -& x_cc(:,3,1)*A_magn_y(:))*WF%c(:,1,ifft) +& x_cc(:,3,1)*A_magn_y(:))*WF%r(:,1,ifft) if(angular_dir(2)) M_tmp(2,:)=L_tmp(2,:)+1./SPEED_OF_LIGHT*(x_cc(:,3,1)*A_magn_x(:)- & -& x_cc(:,1,1)*A_magn_z(:))*WF%c(:,1,ifft) +& x_cc(:,1,1)*A_magn_z(:))*WF%r(:,1,ifft) if(angular_dir(3)) M_tmp(3,:)=L_tmp(3,:)+1./SPEED_OF_LIGHT*(x_cc(:,1,1)*A_magn_y(:)- & -& x_cc(:,2,1)*A_magn_x(:))*WF%c(:,1,ifft) +& x_cc(:,2,1)*A_magn_x(:))*WF%r(:,1,ifft) endif ! do i1=1,3 if(.not.angular_dir(i1)) cycle - L(i1) = Vstar_dot_V(fft_size,WF%c(:,1,ifft),L_tmp(i1,:)) - if(MAG_landau) M(i1) = Vstar_dot_V(fft_size,WF%c(:,1,ifft),M_tmp(i1,:)) + L(i1) = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,ifft),kind=SP),L_tmp(i1,:)) + if(MAG_landau) M(i1) = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,ifft),kind=SP),M_tmp(i1,:)) L_tot(i1,ik)=L_tot(i1,ik)+L(i1) if(MAG_landau) M_tot(i1,ik)=M_tot(i1,ik)+M(i1) enddo diff --git a/ypp/electrons/electrons_position.F b/ypp/electrons/electrons_position.F index 9eef823d14..35460a203f 100644 --- a/ypp/electrons/electrons_position.F +++ b/ypp/electrons/electrons_position.F @@ -54,7 +54,7 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) logical :: l_3d,l_2d ! ! Dummyes - integer :: ifft,ib,ik,i_spin + integer :: i_wf,ib,ik,i_spin character(schlen) :: titles(6) real(SP) :: tmp_var,x_zero(3) complex(SP),allocatable :: wf_tmp_2d(:,:,:),rperp_tmp_2d(:,:,:),rperp_med_2d(:,:,:) @@ -114,7 +114,7 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) ! do i_spin=1,n_sp_pol do ib=nband_pos(1),nband_pos(2) - ifft=WF%index(ib,ik,i_spin) + i_wf=WF%index(ib,ik,i_spin) if(i_spin==2) cycle ! ! ******************************* @@ -124,8 +124,8 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) ! 1) 3D if(l_3d) then do i1=1,3 - x_tmp(:,i1)=x_cc(:,i1,1)**power*WF%c(:,1,ifft) - x_med(i1) = Vstar_dot_V(fft_size,WF%c(:,1,ifft),x_tmp(:,i1)) + x_tmp(:,i1)=x_cc(:,i1,1)**power*WF%r(:,1,i_wf) + x_med(i1) = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP),x_tmp(:,i1)) x_med(i1) = x_med(i1)**(1._SP/power) enddo ! @@ -143,14 +143,14 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) if (l_3d) then do ir=1,fft_size tmp_var=sqrt((x_cc(ir,1,1)**2+x_cc(ir,2,1)**2)) - rperp_tmp(ir)=tmp_var**power*WF%c(ir,1,ifft) - z_tmp(ir)=x_cc(ir,3,1)**power*WF%c(ir,1,ifft) - if ( x_cc(ir,1,1)> 0 ) phi_tmp(ir)=(0.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%c(ir,1,ifft) - if ( x_cc(ir,1,1)< 0 ) phi_tmp(ir)=(1.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%c(ir,1,ifft) + rperp_tmp(ir)=tmp_var**power*WF%r(ir,1,i_wf) + z_tmp(ir)=x_cc(ir,3,1)**power*WF%r(ir,1,i_wf) + if ( x_cc(ir,1,1)> 0 ) phi_tmp(ir)=(0.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%r(ir,1,i_wf) + if ( x_cc(ir,1,1)< 0 ) phi_tmp(ir)=(1.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%r(ir,1,i_wf) enddo - rperp_med = Vstar_dot_V(fft_size,WF%c(:,1,ifft),rperp_tmp(:)) - z_med = Vstar_dot_V(fft_size,WF%c(:,1,ifft), z_tmp(:)) - phi_med = Vstar_dot_V(fft_size,WF%c(:,1,ifft), phi_tmp(:)) + rperp_med = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP),rperp_tmp(:)) + z_med = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP), z_tmp(:)) + phi_med = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP), phi_tmp(:)) rperp_med = rperp_med**(1./power) z_med = z_med**(1./power) AB_dev = (1.-6.41**2*rperp_med**(-2)) ! 5.92 (8,0) 6.41 (5,5) 10.36 (14,0) @@ -160,8 +160,8 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) endif ! 2) 2D if(l_2d) then - wf_tmp_2d(:,:,:)=reshape(WF%c(:,1,ifft),(/fft_dim(1),fft_dim(2),fft_dim(3)/)) - rperp_tmp_2d(:,:,:)=reshape(sqrt((x_cc(:,1,1)**2+x_cc(:,2,1)**2))**power*WF%c(:,1,ifft),& + wf_tmp_2d(:,:,:)=reshape(WF%r(:,1,i_wf),(/fft_dim(1),fft_dim(2),fft_dim(3)/)) + rperp_tmp_2d(:,:,:)=reshape(sqrt((x_cc(:,1,1)**2+x_cc(:,2,1)**2))**power*WF%r(:,1,i_wf),& & (/fft_dim(1),fft_dim(2),fft_dim(3)/)) rperp_med=(0.,0.) do ir3 = 0, fft_dim(3)-1 ! z @@ -181,15 +181,15 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) if(l_spherical) then do ir=1,fft_size tmp_var=sqrt((x_cc(ir,1,1)**2+x_cc(ir,2,1)**2+x_cc(ir,3,1)**2)) - r_tmp(ir)=tmp_var**power*WF%c(ir,1,ifft) + r_tmp(ir)=tmp_var**power*WF%r(ir,1,i_wf) tmp_var=sqrt(x_cc(ir,1,1)**2+x_cc(ir,2,1)**2) - theta_tmp(ir)=atan(x_cc(ir,3,1)/tmp_var)*WF%c(ir,1,ifft) - if ( x_cc(ir,1,1)> 0 ) psi_tmp(ir)=(0.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%c(ir,1,ifft) - if ( x_cc(ir,1,1)< 0 ) psi_tmp(ir)=(1.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%c(ir,1,ifft) + theta_tmp(ir)=atan(x_cc(ir,3,1)/tmp_var)*WF%r(ir,1,i_wf) + if ( x_cc(ir,1,1)> 0 ) psi_tmp(ir)=(0.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%r(ir,1,i_wf) + if ( x_cc(ir,1,1)< 0 ) psi_tmp(ir)=(1.5*pi+atan(x_cc(ir,2,1)/x_cc(ir,1,1)))*WF%r(ir,1,i_wf) enddo - r_med = Vstar_dot_V(fft_size,WF%c(:,1,ifft),rperp_tmp(:)) - theta_med = Vstar_dot_V(fft_size,WF%c(:,1,ifft),theta_tmp(:)) - psi_med = Vstar_dot_V(fft_size,WF%c(:,1,ifft), psi_tmp(:)) + r_med = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP),rperp_tmp(:)) + theta_med = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP),theta_tmp(:)) + psi_med = Vstar_dot_V(fft_size,cmplx(WF%r(:,1,i_wf),kind=SP), psi_tmp(:)) r_med=r_med**(1./power) endif ! diff --git a/ypp/electrons/electrons_spin_factors.F b/ypp/electrons/electrons_spin_factors.F index b56886f78a..03d877816d 100644 --- a/ypp/electrons/electrons_spin_factors.F +++ b/ypp/electrons/electrons_spin_factors.F @@ -56,8 +56,8 @@ subroutine electrons_spin_factors(kpts,bands,spin_factors) call WF_load(WF,0,1,(/ib_ref,ib_ref/),(/ik_ref,ik_ref/),title='-Spinor Factor',impose_free_and_alloc=.TRUE.) ! i_wf=WF%index(ib_ref,ik_ref,1) - v(1)=real(Vstar_dot_V_omp( fft_size, WF%c(:,1,i_wf ), WF%c(:,1,i_wf) ),SP) - v(2)=real(Vstar_dot_V_omp( fft_size, WF%c(:,2,i_wf ), WF%c(:,2,i_wf) ),SP) + v(1)=real(Vstar_dot_V_omp( fft_size, WF%r(:,1,i_wf ), WF%r(:,1,i_wf) ),SP) + v(2)=real(Vstar_dot_V_omp( fft_size, WF%r(:,2,i_wf ), WF%r(:,2,i_wf) ),SP) ! call WF_free(WF) ! @@ -85,8 +85,8 @@ subroutine electrons_spin_factors(kpts,bands,spin_factors) do ib=bands(1),bands(2) if( .not. px%element_2D(ik-kpts(1)+1,ib-bands(1)+1) ) cycle i_wf=WF%index(ib,ik,1) - v(1)=real(Vstar_dot_V_omp( fft_size, WF%c(:,1,i_wf), WF%c(:,1,i_wf) ),SP) - v(2)=real(Vstar_dot_V_omp( fft_size, WF%c(:,2,i_wf), WF%c(:,2,i_wf) ),SP) + v(1)=real(Vstar_dot_V_omp( fft_size, WF%r(:,1,i_wf), WF%r(:,1,i_wf) ),SP) + v(2)=real(Vstar_dot_V_omp( fft_size, WF%r(:,2,i_wf), WF%r(:,2,i_wf) ),SP) spin_factors(ib,ik,1)=abs(dot_product(v,ref_dir(:,1))) spin_factors(ib,ik,2)=abs(dot_product(v,ref_dir(:,2))) call live_timing(steps=1) From d369fa7203fe8f287d34e3a1b214bba5f83f520b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 22 Mar 2021 09:45:01 +0100 Subject: [PATCH 0024/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index c0d55bf36a..1d20e9b13b 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19705 h.789284bf1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19742 h.262c32f03, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19705" -SHASH="789284bf1" +SREVISION="19742" +SHASH="262c32f03" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 7d235e4620..9845330c1b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19705 h.789284bf1. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19742 h.262c32f03. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19705 h.789284bf1' -PACKAGE_STRING='Yambo 5.0.0 r.19705 h.789284bf1' +PACKAGE_VERSION='5.0.0 r.19742 h.262c32f03' +PACKAGE_STRING='Yambo 5.0.0 r.19742 h.262c32f03' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -818,6 +819,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -878,6 +881,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1530,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19705 h.789284bf1 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19742 h.262c32f03 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19705 h.789284bf1:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19742 h.262c32f03:";; esac cat <<\_ACEOF @@ -1609,6 +1613,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1801,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19705 h.789284bf1 +Yambo configure 5.0.0 r.19742 h.262c32f03 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19705 h.789284bf1, which was +It was created by Yambo $as_me 5.0.0 r.19742 h.262c32f03, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19705" -SHASH="789284bf1" +SREVISION="19742" +SHASH="262c32f03" @@ -2976,6 +2981,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14200,6 +14218,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14370,6 +14391,7 @@ fi + # @@ -14910,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19705 h.789284bf1, which was +This file was extended by Yambo $as_me 5.0.0 r.19742 h.262c32f03, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19705 h.789284bf1 +Yambo config.status 5.0.0 r.19742 h.262c32f03 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From b5ea36e572aaee1f66656a19da0ec461b460cf46 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 22 Mar 2021 23:59:32 +0100 Subject: [PATCH 0025/1367] Version 5.0.0, Revision 19743, Hash d369fa720 MODIFIED * config/version/version.m4 configure bse/K_kernel.F Changes: - [yambo] Cutoff on wavefunctions is always controlled by cutoff on exchange Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/bse/K_kernel.F | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 1d20e9b13b..dccba5e936 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19742 h.262c32f03, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19744 h.d369fa720, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19742" -SHASH="262c32f03" +SREVISION="19744" +SHASH="d369fa720" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 9845330c1b..341c81a4d8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19742 h.262c32f03. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19744 h.d369fa720. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19742 h.262c32f03' -PACKAGE_STRING='Yambo 5.0.0 r.19742 h.262c32f03' +PACKAGE_VERSION='5.0.0 r.19744 h.d369fa720' +PACKAGE_STRING='Yambo 5.0.0 r.19744 h.d369fa720' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19742 h.262c32f03 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19744 h.d369fa720 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19742 h.262c32f03:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19744 h.d369fa720:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19742 h.262c32f03 +Yambo configure 5.0.0 r.19744 h.d369fa720 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19742 h.262c32f03, which was +It was created by Yambo $as_me 5.0.0 r.19744 h.d369fa720, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19742" -SHASH="262c32f03" +SREVISION="19744" +SHASH="d369fa720" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19742 h.262c32f03, which was +This file was extended by Yambo $as_me 5.0.0 r.19744 h.d369fa720, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19742 h.262c32f03 +Yambo config.status 5.0.0 r.19744 h.d369fa720 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 76ec3f6851..3bf6009877 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -273,11 +273,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) section_title='-BSK-'//trim(intc(iHxc)) if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) ! - if (iHxc==1) NG=(/max(BS_n_g_exch,BS_n_g_fxc),O_ng_exch/) + if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) ! < WARNIGN: 2021/03/19 ! The following has been changed to the commente line ! However the commented line maybe needed for internal consistency. Otherwise the output of many BSE tests could change - if (iHxc==2) NG=(/ O_ng, O_ng_shift/) + if (iHxc==2) NG=(/O_ng,O_ng_shift/) !if (iHxc==2) NG(2)=O_ng_shift ! WARNING > call WF_load(WF,NG(1),NG(2),bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) From f80d910077e687361f6c806e03c6915b3e425326 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 23 Mar 2021 13:18:04 +0100 Subject: [PATCH 0026/1367] Version 5.0.0, Revision 19744, Hash b5ea36e57 MODIFIED * config/version/version.m4 configure include/headers/common/yambo_bse.h bse/K_correlation_collisions.F bse/K_kernel.F Changes: - [yambo] Exchange and TDDFT split into two different parts of the iHxc BSE kernel loop Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++-- configure | 22 ++++++------ include/headers/common/yambo_bse.h | 12 +++---- src/bse/K_correlation_collisions.F | 2 +- src/bse/K_kernel.F | 57 ++++++++++++++++-------------- 5 files changed, 52 insertions(+), 47 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index dccba5e936..a2add0473a 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19744 h.d369fa720, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19745 h.b5ea36e57, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19744" -SHASH="d369fa720" +SREVISION="19745" +SHASH="b5ea36e57" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 341c81a4d8..d4cf5d8401 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19744 h.d369fa720. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19745 h.b5ea36e57. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19744 h.d369fa720' -PACKAGE_STRING='Yambo 5.0.0 r.19744 h.d369fa720' +PACKAGE_VERSION='5.0.0 r.19745 h.b5ea36e57' +PACKAGE_STRING='Yambo 5.0.0 r.19745 h.b5ea36e57' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19744 h.d369fa720 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19745 h.b5ea36e57 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19744 h.d369fa720:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19745 h.b5ea36e57:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19744 h.d369fa720 +Yambo configure 5.0.0 r.19745 h.b5ea36e57 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19744 h.d369fa720, which was +It was created by Yambo $as_me 5.0.0 r.19745 h.b5ea36e57, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19744" -SHASH="d369fa720" +SREVISION="19745" +SHASH="b5ea36e57" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19744 h.d369fa720, which was +This file was extended by Yambo $as_me 5.0.0 r.19745 h.b5ea36e57, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19744 h.d369fa720 +Yambo config.status 5.0.0 r.19745 h.b5ea36e57 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/headers/common/yambo_bse.h b/include/headers/common/yambo_bse.h index 1466d923e6..bbeb5ae915 100644 --- a/include/headers/common/yambo_bse.h +++ b/include/headers/common/yambo_bse.h @@ -27,7 +27,7 @@ #define OMP_LAST_DEF #define OMP_LAST1 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==2) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then NEWLINE \ i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) NEWLINE \ if (i_k_bz_mem==0) then NEWLINE \ !$omp critical NEWLINE \ @@ -44,7 +44,7 @@ endif NEWLINE #define OMP_LAST2 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==2) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then NEWLINE \ i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) NEWLINE \ if (i_kmq_bz_mem==0) then NEWLINE \ !$omp critical NEWLINE \ @@ -67,7 +67,7 @@ integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & NEWLINE \ & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last NEWLINE #define OMP_LAST1 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==2) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then NEWLINE \ i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) NEWLINE \ if (i_p_bz_last/=i_p_bz.or.i_k_bz_last/=i_k_bz) then NEWLINE \ i_p_bz_last=i_p_bz NEWLINE \ @@ -93,7 +93,7 @@ integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & NEWLINE \ endif NEWLINE #define OMP_LAST2 \ - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==2) then NEWLINE \ + if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then NEWLINE \ i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) NEWLINE \ if (i_pmq_bz_last/=i_pmq_bz.or.i_kmq_bz_last/=i_kmq_bz) then NEWLINE \ i_pmq_bz_last=i_pmq_bz NEWLINE \ @@ -154,7 +154,7 @@ integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& NEWLINE \ i_kmq_s =Xk%sstar(i_kmq_bz,2) NEWLINE \ i_pmq_s =Xk%sstar(i_pmq_bz,2) NEWLINE \ NEWLINE \ - if (BS_res_K_corr.and.iHxc==2) then NEWLINE \ + if (BS_res_K_corr.and.iHxc==3) then NEWLINE \ i_kmq_t=BS_blk(i_block)%kp_table(1,i_kmq) NEWLINE \ i_pmq_t=BS_blk(i_block)%kp_table(2,i_pmq) NEWLINE \ endif NEWLINE \ @@ -182,7 +182,7 @@ integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& NEWLINE \ NEWLINE \ OMP_LAST2 \ NEWLINE \ - if (BS_K_is_ALDA.and.iHxc==1) then NEWLINE \ + if (BS_K_is_ALDA.and.iHxc==2) then NEWLINE \ is_k = (/i_c_k,i_k,i_k_s,i_k_sp_pol_c/) NEWLINE \ os_k = (/i_v_k,i_kmq,i_kmq_s,i_k_sp_pol_v/) NEWLINE \ is_p = (/i_c_p,i_p,i_p_s,i_p_sp_pol_c/) NEWLINE \ diff --git a/src/bse/K_correlation_collisions.F b/src/bse/K_correlation_collisions.F index fdb96fa5f9..8b37a8579e 100644 --- a/src/bse/K_correlation_collisions.F +++ b/src/bse/K_correlation_collisions.F @@ -70,7 +70,7 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) ! if (.not.BS_res_K_corr) return ! - iHxc=2 + iHxc=3 ! call timing('T_space CORR Osc.',OPR='start') ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 3bf6009877..2fe4bf411a 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -265,26 +265,30 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) #endif ! ! This loop is on the exchange and correlation of the BSE - ! iHxc=1 --> K_H - ! iHxc=2 --> K_xc + ! iHxc=1 --> K_H=v + ! iHxc=2 --> K_TDDFT=fxc + ! iHxc=3 --> K_c=W ! - do iHxc=1,2 + do iHxc=1,3 + ! + if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle ! section_title='-BSK-'//trim(intc(iHxc)) if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) ! if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) + if (iHxc==2) NG=(/BS_n_g_fxc, 1/) ! < WARNIGN: 2021/03/19 ! The following has been changed to the commente line ! However the commented line maybe needed for internal consistency. Otherwise the output of many BSE tests could change - if (iHxc==2) NG=(/O_ng,O_ng_shift/) - !if (iHxc==2) NG(2)=O_ng_shift + if (iHxc==3) NG=(/O_ng,O_ng_shift/) + !if (iHxc==3) NG(2)=O_ng_shift ! WARNING > call WF_load(WF,NG(1),NG(2),bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) ! ! Wave Functions Phases !======================= - if (iHxc==2) call K_WF_phases(Xk) + if (iHxc==3) call K_WF_phases(Xk) ! ! Spatial Inversion Test !======================== @@ -292,7 +296,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! ALDA !====== - if (BS_K_is_ALDA.and.iHxc==1) then + if (iHxc==2) then YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) @@ -369,8 +373,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (.not.l_bs_fxc) section_title='Kernel' if ( l_bs_fxc) section_title='Kernel->Fxc' ! - if (iHxc==1) section_title=trim(section_title)//' exchange' - if (iHxc==2) section_title=trim(section_title)//' correlat' + if (iHxc==1) section_title=trim(section_title)//' exch' + if (iHxc==2) section_title=trim(section_title)//' tddft' + if (iHxc==3) section_title=trim(section_title)//' corr' ! if(m_steps>0) call live_timing(trim(section_title),m_steps) ! @@ -383,7 +388,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (BS_blk_done(i_block)) then #if defined _PAR_IO - if(l_partial_kernel_loaded.and.iHxc==2) then + if(l_partial_kernel_loaded.and.iHxc==3) then call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") endif @@ -414,7 +419,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- ! - if(iHxc==2) call K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) + if(iHxc==3) call K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) ! ! Transition Loops !------------------ @@ -450,7 +455,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) FILL_BSK_COMMON_INDEXES FILL_BSK_KERNEL_INDEXES ! - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==2) then + if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then ! if (iq_W_bz/=iq_W_bz_mq.or.iq_W/=iq_W_mq.or.iq_W_s/=iq_W_s_mq) call error("Wrong transferred momentum") ! @@ -476,10 +481,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA .and.iHxc==1) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') + if (BS_K_is_ALDA .and.iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') ! ! Correlations - if (BS_res_K_corr .and.iHxc==2) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (BS_res_K_corr .and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_c_p,i_kmq_s,i_kp_mq_s,i_v_k,i_v_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) @@ -494,17 +499,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA .and.iHxc==1) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') + if (BS_K_is_ALDA .and.iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') ! ! Correlations - if (BS_cpl_K_corr .and.iHxc==2) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (BS_cpl_K_corr .and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_v_p,i_kmq_s,i_kp_mq_s,i_v_k,i_c_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_v,i_k_sp_pol_v,i_p_sp_pol_c, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) ! end select ! - if (l_tddft.and.WF_exx_fraction>0._SP.and.iHxc==2) H_c=H_c*WF_exx_fraction + if (l_tddft.and.WF_exx_fraction>0._SP.and.iHxc==3) H_c=H_c*WF_exx_fraction ! sqrt_f_itk=sqrt(cmplx(BS_T_grp(i_Tgrp_k)%f(i_Tk),kind=SP)) sqrt_f_itp=sqrt(cmplx(BS_T_grp(i_Tgrp_p)%f(i_Tp),kind=SP)) @@ -517,9 +522,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif ! if (iHxc==1) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp - if (iHxc==2) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp + if (iHxc>=2) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp ! - if (iHxc==2) BS_blk(i_block)%done(i_Tk,i_Tp)="t" + if (iHxc==3) BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! enddo ! i_Tk enddo ! i_Tp @@ -528,16 +533,16 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !$omp end parallel #endif ! - if(BS_K_cutoff>0._SP.and.iHxc==2) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) + if(BS_K_cutoff>0._SP.and.iHxc==3) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! if(l_BSE_minimize_memory.and.iHxc==1) then call BS_oscillators_free(i_Tgrp_p,0) call BS_oscillators_free(i_Tgrp_k,0) endif ! - if(iHxc==2) call BS_oscillators_free(0,i_block) + if(iHxc==3) call BS_oscillators_free(0,i_block) ! - if(iHxc==2) then + if(iHxc==3) then #if defined _PAR_IO call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") @@ -556,9 +561,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! GLOBAL CLEANING !================= ! - if(iHxc==1) then - ! - call BS_oscillators_free(BS_nT_grps,0) + if(iHxc==1) call BS_oscillators_free(BS_nT_grps,0) + ! + if(iHxc==2) then ! if (l_bs_fxc) then YAMBO_FREE(F_xc_gspace) @@ -569,7 +574,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if(iHxc==2) then + if(iHxc==3) then ! if (BS_res_K_corr.or.BS_cpl_K_corr) then YAMBO_FREE(WF_phase) From 03148eb7c60dbe1e756f865f1ec86a79c44eeba8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 23 Mar 2021 22:17:10 +0100 Subject: [PATCH 0027/1367] Version 5.0.0, Revision 19745, Hash f80d91007 MODIFIED * config/version/version.m4 configure bse/K_kernel.F modules/mod_interfaces.F modules/mod_wave_func.F tddft/TDDFT_ALDA_R_space.F wf_and_fft/WF_alloc.F wf_and_fft/WF_apply_symm.F wf_and_fft/WF_load.F wf_and_fft/fft_setup.F xc_functionals/el_density_and_current.F Changes: - [yambo] rho_map implemeted to reduce size of WFs allocated in memory for TDDFT in real space Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +-- configure | 22 ++++----- src/bse/K_kernel.F | 55 ++++++++++++--------- src/modules/mod_interfaces.F | 3 +- src/modules/mod_wave_func.F | 6 +++ src/tddft/TDDFT_ALDA_R_space.F | 30 +++++------ src/wf_and_fft/WF_alloc.F | 5 +- src/wf_and_fft/WF_apply_symm.F | 34 +++++++------ src/wf_and_fft/WF_load.F | 5 +- src/wf_and_fft/fft_setup.F | 3 +- src/xc_functionals/el_density_and_current.F | 47 +++++++++++++----- 11 files changed, 130 insertions(+), 86 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index a2add0473a..7e1ac89997 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19745 h.b5ea36e57, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19746 h.f80d91007, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19745" -SHASH="b5ea36e57" +SREVISION="19746" +SHASH="f80d91007" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d4cf5d8401..f3a0bb94dc 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19745 h.b5ea36e57. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19746 h.f80d91007. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19745 h.b5ea36e57' -PACKAGE_STRING='Yambo 5.0.0 r.19745 h.b5ea36e57' +PACKAGE_VERSION='5.0.0 r.19746 h.f80d91007' +PACKAGE_STRING='Yambo 5.0.0 r.19746 h.f80d91007' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19745 h.b5ea36e57 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19746 h.f80d91007 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19745 h.b5ea36e57:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19746 h.f80d91007:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19745 h.b5ea36e57 +Yambo configure 5.0.0 r.19746 h.f80d91007 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19745 h.b5ea36e57, which was +It was created by Yambo $as_me 5.0.0 r.19746 h.f80d91007, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19745" -SHASH="b5ea36e57" +SREVISION="19746" +SHASH="f80d91007" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19745 h.b5ea36e57, which was +This file was extended by Yambo $as_me 5.0.0 r.19746 h.f80d91007, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19745 h.b5ea36e57 +Yambo config.status 5.0.0 r.19746 h.f80d91007 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 2fe4bf411a..c8aaad52f5 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -39,6 +39,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use stderr, ONLY:intc use LIVE_t, ONLY:live_timing use X_m, ONLY:X_t + use interfaces, ONLY:el_density_and_current use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& & BS_res_K_exchange,BS_Block_size,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& @@ -56,10 +57,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc use xc_functionals,ONLY:F_xc,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind,WF_exx_fraction - use wave_func, ONLY:WF + use wave_func, ONLY:WF,rho_map_size,rho_map use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing - use parallel_m, ONLY:myid,ncpu,PAR_K_scheme + use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,master_cpu use parallel_int, ONLY:PP_redux_wait use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free @@ -84,10 +85,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) DEFINE_BSK_COMMON_INDEXES integer :: i_block,O_ng_shift,O_ng_exch,iHxc,NG(2),& & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& -& bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4),i_andrea +& is_k(4),os_k(4),is_p(4),os_p(4),i_andrea complex(SP):: Co,H_x,H_c,BS_mat_tmp complex(SP):: sqrt_f_itk,sqrt_f_itp - real(SP), allocatable :: BS_max_val_CPU(:) + real(SP), allocatable :: BS_max_val_CPU(:),rho(:) ! complex(SP), external ::TDDFT_ALDA_R_space complex(SP), external ::K_correlation_kernel @@ -232,11 +233,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - ! Wave Functions - !================ - bands_to_load=BS_bands - if (BS_K_is_ALDA) bands_to_load=(/1,BS_bands(2)/) - ! ! DB identifier !=============== BS_identifier=pickup_a_random(10000._SP) @@ -284,19 +280,18 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==3) NG=(/O_ng,O_ng_shift/) !if (iHxc==3) NG(2)=O_ng_shift ! WARNING > - call WF_load(WF,NG(1),NG(2),bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) - ! - ! Wave Functions Phases - !======================= - if (iHxc==3) call K_WF_phases(Xk) - ! - ! Spatial Inversion Test - !======================== - if (iHxc==1) call WF_spatial_inversion(Ken,Xk) ! ! ALDA !====== if (iHxc==2) then + ! + ! This part could be done just by the master bypassing the PAR_IND_WF_linear ... + ! + rho_map_size=0 + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="TDDFT") + YAMBO_ALLOC(rho,(fft_size)) + call el_density_and_current(Ken,Xk,rho=rho,compute_rho_map=.true.) + YAMBO_FREE(rho) YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) @@ -305,13 +300,24 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if(n_spin>1) then YAMBO_FREE(magn) endif - if ( BS_n_g_fxc/=ng_closed) then - FXC_n_g_corr=BS_n_g_fxc - call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) - call msg('s','[BSE] Fxc components ',BS_n_g_fxc) - endif + call WF_free(WF) + !if ( BS_n_g_fxc/=ng_closed) then + ! FXC_n_g_corr=BS_n_g_fxc + ! call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + ! call msg('s','[BSE] Fxc components ',BS_n_g_fxc) + !endif endif ! + call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title)) + ! + ! Wave Functions Phases + !======================= + if (iHxc==3) call K_WF_phases(Xk) + ! + ! Spatial Inversion Test + !======================== + if (iHxc==1) call WF_spatial_inversion(Ken,Xk) + ! ! Timing !======== ! @@ -323,7 +329,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! First load previously computed matrix elements. !================================================= ! - BS_blk_done=.false. + if(iHxc==1) BS_blk_done=.false. ! #ifdef _PAR_IO if (l_BSE_restart.and.iHxc==1) then @@ -565,6 +571,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if(iHxc==2) then ! + deallocate(rho_map) if (l_bs_fxc) then YAMBO_FREE(F_xc_gspace) YAMBO_FREE(FXC_K_diagonal) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 983c249351..c9351c18d0 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -110,7 +110,7 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,M,M_slk,M_bse,B,B_slk,C,C_slk,V_ ! end subroutine ! - subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) + subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion,compute_rho_map) use pars, ONLY:SP use electrons, ONLY:levels use R_lattice, ONLY:bz_samp @@ -121,6 +121,7 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) real(SP), optional ::J(fft_size,3) integer, optional, intent(in) ::bands(2) logical, optional, intent(in) ::force_spatial_inversion + logical, optional, intent(in) ::compute_rho_map end subroutine el_density_and_current ! subroutine el_density_of_states(Xk,Xen,dos_E,DOS_broadening,DOS_bands,dos_value,& diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index c5721332d4..fa1b87bbe8 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -89,6 +89,12 @@ module wave_func ! integer, allocatable:: wf_nc_k(:) ! + ! Tho map to reduce fft_size + ! + real(SP) :: rho_map_thresh + integer :: rho_map_size + integer, allocatable:: rho_map(:) + ! ! Table correspondance G-vec <-> Components: G_ic = wf_igk(ic,ik) ! integer, allocatable:: wf_igk(:,:) diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index 25115fcd79..ff1ab3b08f 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -39,6 +39,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! use pars, ONLY:SP,pi,cZERO use FFT_m, ONLY:fft_size + use wave_func, ONLY:rho_map_size,rho_map use xc_functionals, ONLY:F_xc_mat use BS, ONLY:l_BS_magnons use wrapper_omp, ONLY:V_dot_V_omp @@ -55,11 +56,11 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! ! Work Space ! - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw - complex(SP) :: rhotwr1(fft_size*n_spinor*n_spinor) - complex(SP) :: rhotwr2(fft_size*n_spinor*n_spinor) - complex(SP) :: WF_symm1(fft_size,n_spinor) - complex(SP) :: WF_symm2(fft_size,n_spinor) + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,irho + complex(SP) :: rhotwr1(rho_map_size*n_spinor*n_spinor) + complex(SP) :: rhotwr2(rho_map_size*n_spinor*n_spinor) + complex(SP) :: WF_symm1(rho_map_size,n_spinor) + complex(SP) :: WF_symm2(rho_map_size,n_spinor) ! call timing('T_space ALDA scatt.',OPR='start') ! @@ -77,9 +78,9 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) if(n_spinor==2) then do i_spinor=1,n_spinor do j_spinor=1,n_spinor - do ifft=1,fft_size - irhotw=ifft+(i_spinor-1)*fft_size+(j_spinor-1)*n_spinor*fft_size - rhotwr1(irhotw)=conjg(WF_symm1(ifft,i_spinor))*WF_symm2(ifft,j_spinor) + do irho=1,rho_map_size + irhotw=irho+(i_spinor-1)*rho_map_size+(j_spinor-1)*n_spinor*rho_map_size + rhotwr1(irhotw)=conjg(WF_symm1(irho,i_spinor))*WF_symm2(irho,j_spinor) enddo enddo enddo @@ -93,9 +94,9 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) call WF_apply_symm(osp,WF_symm1) endif ! - if( n_spin==1 ) rhotwr2(:)=F_xc_mat(:,1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if( n_spin==1 ) rhotwr2(:)=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) ! - if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(:,is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(rho_map(:),is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) ! if(n_spinor==2) then rhotwr2=cZERO @@ -103,10 +104,11 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) do j_spinor=1,n_spinor do ip_spinor=1,n_spinor do jp_spinor=1,n_spinor - do ifft=1,fft_size - irhotw=ifft+(i_spinor-1)*fft_size+(j_spinor-1)*n_spinor*fft_size + do irho=1,rho_map_size + ifft=rho_map(irho) + irhotw=irho+(i_spinor-1)*fft_size+(j_spinor-1)*n_spinor*fft_size rhotwr2(irhotw)=rhotwr2(irhotw)+& - & F_xc_mat(ifft,i_spinor,j_spinor,ip_spinor,jp_spinor)*WF_symm1(ifft,ip_spinor)*conjg(WF_symm2(ifft,jp_spinor)) + & F_xc_mat(ifft,i_spinor,j_spinor,ip_spinor,jp_spinor)*WF_symm1(irho,ip_spinor)*conjg(WF_symm2(irho,jp_spinor)) enddo enddo enddo @@ -116,7 +118,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! ! SUM !===== - TDDFT_ALDA_R_space=V_dot_V_omp(fft_size*n_spinor*n_spinor,rhotwr1,rhotwr2) + TDDFT_ALDA_R_space=V_dot_V_omp(rho_map_size*n_spinor*n_spinor,rhotwr1,rhotwr2) ! ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K ! X = fft_size*spin_occ/DL_vol/Nq diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index 6362bcffc0..e293dc3484 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -24,8 +24,7 @@ subroutine WF_alloc(WF) ! use pars, ONLY:cZERO - use wave_func, ONLY:WAVEs,states_to_load,wf_ng,wf_ncx - use FFT_m, ONLY:fft_size + use wave_func, ONLY:WAVEs,states_to_load,wf_ng,wf_ncx,rho_map_size use electrons, ONLY:n_spinor use parallel_int, ONLY:PARALLEL_live_message use cuda_m, ONLY:have_cuda @@ -62,7 +61,7 @@ subroutine WF_alloc(WF) ! call PARALLEL_live_message("Wave-Function states",LOADED=WF%N,TOTAL=N_total) ! - if (WF%space=='R') wf_grid_size=fft_size + if (WF%space=='R') wf_grid_size=rho_map_size if (WF%space=='G') wf_grid_size=wf_ng if (WF%space=='C') wf_grid_size=wf_ncx if (WF%space=='B') wf_grid_size=wf_ncx diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 2f417a2b5b..5b9184f02d 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -26,7 +26,7 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) ! INCLUDED in: WF_apply_symm_incl.F ! use pars, ONLY:SP - use wave_func, ONLY:WF + use wave_func, ONLY:WF,rho_map_size,rho_map use FFT_m, ONLY:DEV_VAR(fft_rot_r),fft_size use stderr, ONLY:intc use parallel_m, ONLY:myid @@ -39,12 +39,12 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) implicit none ! integer, intent(in) :: isc(4) - complex(SP), intent(out) DEV_ATTR :: WF_symm(fft_size,n_spinor) + complex(SP), intent(out) DEV_ATTR :: WF_symm(rho_map_size,n_spinor) ! WF_RSPACE(SP), pointer DEV_ATTR :: WF_p(:,:,:) integer :: i_wf - integer :: ifft,isymm - + integer :: ifft,ifftp,isymm + ! i_wf=WF%index(isc(1),isc(2),isc(4)) ! #if defined _MPI @@ -57,36 +57,39 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) isymm = isc(3) ! if(isc(3)==idt_index) then - ! call dev_memcpy(WF_symm,cmplx(DEV_VAR(WF%r)(:,:,i_wf),kind=SP)) - ! + return endif ! + if (allocated(rho_map)) call error(" rho map procedure not implemented with symmetries") + ! if(n_spinor==1) then ! #ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> + !$cuf kernel do(1) <<<*,*>>> #else - !$omp parallel do default(shared), private(ifft) + !$omp parallel do default(shared), private(ifft,ifftp) #endif do ifft = 1, fft_size - WF_symm(ifft,1)=cmplx(WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf),kind=SP) + ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) + WF_symm(ifft,1)=cmplx(WF_p(ifftp,1,i_wf),kind=SP) enddo ! endif ! if (n_spinor==2) then ! -#ifdef _CUDA_LOC +#ifdef _CUDA_LOC !$cuf kernel do(1) <<<*,*>>> #else - !$omp parallel do default(shared), private(ifft) + !$omp parallel do default(shared), private(ifft,ifftp) #endif do ifft = 1, fft_size - WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf)+ & - DEV_VAR(spin_sop)(1,2,isymm)*WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),2,i_wf) - WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),1,i_wf)+ & - DEV_VAR(spin_sop)(2,2,isymm)*WF_p(DEV_VAR(fft_rot_r)(ifft,isymm),2,i_wf) + ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) + WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ifftp,1,i_wf)+ & + DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ifftp,2,i_wf) + WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ifftp,1,i_wf)+ & + DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ifftp,2,i_wf) enddo ! endif @@ -96,4 +99,3 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) if(isc(3)>nsym/(i_time_rev+1)) call dev_conjg(WF_symm) ! end subroutine DEV_SUB_ALT(WF_apply_symm) - diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 35a921bc39..26348c4c4d 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -34,7 +34,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load use interfaces, ONLY:WF_free use FFT_m, ONLY:fft_dim_loaded,fft_dim,fft_norm,fft_g_table,fft_size,& & fftw_plan,cufft_plan,fft_g_table_d - use wave_func, ONLY:wf_nc_k,wf_igk,wf_igk_d,WF_buffer,& + use wave_func, ONLY:wf_nc_k,wf_igk,wf_igk_d,WF_buffer,rho_map,& & wf_ng,wf_norm_test,wf_ncx,io_WF,wf_b_indx,& & wf_nb_io,wf_nb_to_load,wf_nb_io_groups,WAVEs,states_to_load use IO_int, ONLY:io_control,IO_and_Messaging_switch @@ -444,7 +444,8 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! call fft_3d(wf_DP,fft_dim,+2) #endif - WF%r(:,i_spinor,WF%N)=wfcmplx(wf_DP(:),kind=SP)*fft_norm + if( allocated(rho_map)) WF%r(:,i_spinor,WF%N)=wfcmplx(wf_DP(rho_map(:)),kind=SP)*fft_norm + if(.not.allocated(rho_map)) WF%r(:,i_spinor,WF%N)=wfcmplx(wf_DP(:) ,kind=SP)*fft_norm ! enddo ! i_spinor #ifdef _CUDA diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index b46f4915b3..0abf545d81 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -34,7 +34,7 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) #if defined _FFTQE use fft_base, ONLY:dffts #endif - use wave_func, ONLY:wf_ng + use wave_func, ONLY:wf_ng,rho_map_size,rho_map use timing_m, ONLY:timing use cuda_m, ONLY:have_cuda use deviceXlib_m, ONLY:dev_memcpy,dev_memset @@ -187,6 +187,7 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) i4=1 cycle endif + if(.not.allocated(rho_map)) rho_map_size=fft_size ! YAMBO_FREE(fft_rot_r) YAMBO_ALLOC(fft_rot_r,(fft_size,nsym)) diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index b5bf918d5b..fe3509da3f 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) +subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion,compute_rho_map) ! ! Electronic density (and current). ! @@ -46,15 +46,15 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) ! use pars, ONLY:SP,DP use com, ONLY:msg - use stderr, ONLY:real2ch + use stderr, ONLY:real2ch,intc use electrons, ONLY:levels,n_spinor,n_sp_pol use R_lattice, ONLY:bz_samp,b - use D_lattice, ONLY:nsym,i_time_rev,mag_syms + use D_lattice, ONLY:nsym,i_time_rev,mag_syms,DL_vol use FFT_m, ONLY:fft_size,fft_dim,fft_rot_r,fft_rot_r_inv,fft_g_table #if defined _FFTW use FFT_m, ONLY:fftw_plan #endif - use wave_func, ONLY:WF + use wave_func, ONLY:WF,rho_map,rho_map_thresh,rho_map_size use parallel_m, ONLY:PAR_IND_WF_linear,PAR_COM_density use parallel_int, ONLY:PP_redux_wait use pseudo, ONLY:pp_is_uspp,qe_pseudo_alloc,becp @@ -76,18 +76,19 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) real(SP), optional ::rho(fft_size) integer, optional, intent(in) ::bands(2) logical, optional, intent(in) ::force_spatial_inversion + logical, optional, intent(in) ::compute_rho_map ! ! Work Space ! #if defined _YPP_RT integer :: ik_RT #endif - integer :: ib,ik,i_sp_pol,i_spinor,rho_syms,i_symm,i_wf,bands_range(2) !,i_r,i_dir - integer :: ig + integer :: ib,ik,i_sp_pol,i_spinor,rho_syms,i_symm,i_wf,bands_range(2),ifft !,i_r,i_dir + integer :: ig,rho_map_tmp(fft_size) real(SP) :: f_occ,rho_no_sym(fft_size) !,J_no_sym(fft_size,3) real(SP) :: raux complex(DP), allocatable :: rhog_aug_DP(:,:), wf_DP(:), aux_DP(:) - logical :: warn_done,l_si,l_rho !,l_J + logical :: warn_done,l_si,l_rho,l_rho_map !,l_J ! #if defined _RT call timing('el_density',OPR='start') @@ -98,7 +99,9 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) l_rho =present(rho) !l_J =present(J) l_si =.false. - if (present(force_spatial_inversion)) l_si=force_spatial_inversion + l_rho_map =.false. + if (present(force_spatial_inversion)) l_si =force_spatial_inversion + if (present(compute_rho_map) ) l_rho_map=compute_rho_map ! if (l_rho) then rho =0._SP @@ -159,9 +162,15 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) ! ! if (l_rho) then - do i_spinor=1,n_spinor - rho_no_sym(:)=rho_no_sym(:)+f_occ*k%weights(ik)*abs(WF%r(:,i_spinor,i_wf))**2 - enddo + if (allocated(rho_map)) then + do i_spinor=1,n_spinor + rho_no_sym(rho_map(:))=rho_no_sym(rho_map(:))+f_occ*k%weights(ik)*abs(WF%r(:,i_spinor,i_wf))**2 + enddo + else + do i_spinor=1,n_spinor + rho_no_sym(:)=rho_no_sym(:)+f_occ*k%weights(ik)*abs(WF%r(:,i_spinor,i_wf))**2 + enddo + endif ! ! uspp becsum ! @@ -251,6 +260,22 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion) endif endif ! + if(l_rho_map) then + ! + rho_map_thresh=1.E-6_SP + rho_map_size=0 + do ifft=1,fft_size + if(rho(ifft)*real(fft_size,SP)/real(DL_vol,SP) Date: Tue, 23 Mar 2021 23:58:06 +0100 Subject: [PATCH 0028/1367] Version 5.0.0, Revision 19746, Hash 03148eb7c MODIFIED * config/version/version.m4 configure bse/K_kernel.F tddft/TDDFT_ALDA_R_space.F wf_and_fft/WF_alloc.F wf_and_fft/WF_load.F xc_functionals/el_density_and_current.F Bugs: - [yambo] Fixed few bugs in the new implementation Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 ++++++++++----------- src/bse/K_kernel.F | 2 +- src/tddft/TDDFT_ALDA_R_space.F | 2 +- src/wf_and_fft/WF_alloc.F | 7 ++++--- src/wf_and_fft/WF_load.F | 15 ++++++++++---- src/xc_functionals/el_density_and_current.F | 2 +- 7 files changed, 32 insertions(+), 24 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 7e1ac89997..b6afb5ce2e 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19746 h.f80d91007, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19747 h.03148eb7c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19746" -SHASH="f80d91007" +SREVISION="19747" +SHASH="03148eb7c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index f3a0bb94dc..81ecb3d1a3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19746 h.f80d91007. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19747 h.03148eb7c. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19746 h.f80d91007' -PACKAGE_STRING='Yambo 5.0.0 r.19746 h.f80d91007' +PACKAGE_VERSION='5.0.0 r.19747 h.03148eb7c' +PACKAGE_STRING='Yambo 5.0.0 r.19747 h.03148eb7c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19746 h.f80d91007 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19747 h.03148eb7c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19746 h.f80d91007:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19747 h.03148eb7c:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19746 h.f80d91007 +Yambo configure 5.0.0 r.19747 h.03148eb7c generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19746 h.f80d91007, which was +It was created by Yambo $as_me 5.0.0 r.19747 h.03148eb7c, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19746" -SHASH="f80d91007" +SREVISION="19747" +SHASH="03148eb7c" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19746 h.f80d91007, which was +This file was extended by Yambo $as_me 5.0.0 r.19747 h.03148eb7c, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19746 h.f80d91007 +Yambo config.status 5.0.0 r.19747 h.03148eb7c configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index c8aaad52f5..3132b16e09 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -288,7 +288,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! This part could be done just by the master bypassing the PAR_IND_WF_linear ... ! rho_map_size=0 - call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="TDDFT") + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") YAMBO_ALLOC(rho,(fft_size)) call el_density_and_current(Ken,Xk,rho=rho,compute_rho_map=.true.) YAMBO_FREE(rho) diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index ff1ab3b08f..45ad8d223c 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -106,7 +106,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) do jp_spinor=1,n_spinor do irho=1,rho_map_size ifft=rho_map(irho) - irhotw=irho+(i_spinor-1)*fft_size+(j_spinor-1)*n_spinor*fft_size + irhotw=irho+(i_spinor-1)*rho_map_size+(j_spinor-1)*n_spinor*rho_map_size rhotwr2(irhotw)=rhotwr2(irhotw)+& & F_xc_mat(ifft,i_spinor,j_spinor,ip_spinor,jp_spinor)*WF_symm1(irho,ip_spinor)*conjg(WF_symm2(irho,jp_spinor)) enddo diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index e293dc3484..a438f1a551 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -23,13 +23,14 @@ ! subroutine WF_alloc(WF) ! - use pars, ONLY:cZERO + use pars, ONLY:cZERO,SP use wave_func, ONLY:WAVEs,states_to_load,wf_ng,wf_ncx,rho_map_size use electrons, ONLY:n_spinor use parallel_int, ONLY:PARALLEL_live_message use cuda_m, ONLY:have_cuda ! #include +#include ! type(WAVEs) :: WF ! @@ -68,10 +69,10 @@ subroutine WF_alloc(WF) ! if (WF%space=='R') then YAMBO_ALLOC(WF%r,(wf_grid_size,n_spinor,WF%N)) - WF%r=cZERO + WF%r=wfcmplx(cZERO,kind=SP) if (have_cuda) then YAMBO_ALLOC_MOLD(WF%r_d,WF%r) - WF%r_d=cZERO + WF%r_d=wfcmplx(cZERO,kind=SP) endif else YAMBO_ALLOC(WF%c,(wf_grid_size,n_spinor,WF%N)) diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 26348c4c4d..f33adb54b5 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -405,10 +405,17 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load call fft_3d_cuda(wf_DP_d,fft_dim,+1,cufft_plan) ! WFN = WF%N - !$cuf kernel do(1) - do ic=1,wf_grid_size - wfr_d(ic,i_spinor,WFN)=wfcmplx(wf_DP_d(ic),kind=SP)*fft_norm - enddo + if(allocated(rho_map)) then + !$cuf kernel do(1) + do ic=1,rho_map_size + wfr_d(ic,i_spinor,WFN)=wfcmplx(wf_DP_d(rho_map(ic)),kind=SP)*fft_norm + enddo + else + !$cuf kernel do(1) + do ic=1,fft_size + wfr_d(ic,i_spinor,WFN)=wfcmplx(wf_DP_d(ic),kind=SP)*fft_norm + enddo + endif ! enddo ! i_spinor ! diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index fe3509da3f..2422dcc0cc 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -162,7 +162,7 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion,comput ! ! if (l_rho) then - if (allocated(rho_map)) then + if (size(WF%r(:,i_spinor,i_wf)) Date: Wed, 24 Mar 2021 09:48:24 +0100 Subject: [PATCH 0029/1367] Version 5.0.0, Revision 19747, Hash 656520631 MODIFIED * config/version/version.m4 configure bse/K_components_folded_in_serial_arrays.F Changes: - [yambo] Small change in live timing message Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++--- configure | 22 +++++++++---------- .../K_components_folded_in_serial_arrays.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index b6afb5ce2e..659c35036e 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19747 h.03148eb7c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19748 h.656520631, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19747" -SHASH="03148eb7c" +SREVISION="19748" +SHASH="656520631" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 81ecb3d1a3..1fe707ca5e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19747 h.03148eb7c. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19748 h.656520631. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19747 h.03148eb7c' -PACKAGE_STRING='Yambo 5.0.0 r.19747 h.03148eb7c' +PACKAGE_VERSION='5.0.0 r.19748 h.656520631' +PACKAGE_STRING='Yambo 5.0.0 r.19748 h.656520631' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19747 h.03148eb7c to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19748 h.656520631 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19747 h.03148eb7c:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19748 h.656520631:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19747 h.03148eb7c +Yambo configure 5.0.0 r.19748 h.656520631 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19747 h.03148eb7c, which was +It was created by Yambo $as_me 5.0.0 r.19748 h.656520631, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19747" -SHASH="03148eb7c" +SREVISION="19748" +SHASH="656520631" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19747 h.03148eb7c, which was +This file was extended by Yambo $as_me 5.0.0 r.19748 h.656520631, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19747 h.03148eb7c +Yambo config.status 5.0.0 r.19748 h.656520631 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 9166558439..048655812d 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -70,7 +70,7 @@ subroutine K_components_folded_in_serial_arrays(iq) call BSS_DICH_alloc( ) call BSS_PL_alloc( ) ! - if(BS_nT_grps>0) call live_timing("Folding BSE Kernel",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) + if(BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) ! BS_res_ares_dim_solver=1 if(BS_res_ares_dim==1.and.BS_K_coupling) BS_res_ares_dim_solver=2 From 2f0f80a0d9bc3288b298b1d2b25f92cbef55270f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 27 Mar 2021 18:08:52 +0100 Subject: [PATCH 0030/1367] Version 5.0.0, Revision 19748, Hash 271ac3744 MODIFIED * config/version/version.m4 configure dipoles/DIPOLE_x_real_space.F hamiltonian/Pseudo_KB_FFT.F wf_and_fft/load_cc.F ypp/bits/WF_map_perturbative_SOC.F Changes: - [yambo] load_cc now works also with FCC cells Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++-- configure | 22 +++++++-------- src/dipoles/DIPOLE_x_real_space.F | 5 +--- src/hamiltonian/Pseudo_KB_FFT.F | 1 + src/wf_and_fft/load_cc.F | 44 ++++++++++-------------------- ypp/bits/WF_map_perturbative_SOC.F | 2 +- 6 files changed, 32 insertions(+), 48 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 659c35036e..e70dceaa0a 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.0 r.19748 h.656520631, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.0 r.19749 h.271ac3744, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19748" -SHASH="656520631" +SREVISION="19749" +SHASH="271ac3744" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 1fe707ca5e..f20a23442e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19748 h.656520631. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.0 r.19749 h.271ac3744. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.0 r.19748 h.656520631' -PACKAGE_STRING='Yambo 5.0.0 r.19748 h.656520631' +PACKAGE_VERSION='5.0.0 r.19749 h.271ac3744' +PACKAGE_STRING='Yambo 5.0.0 r.19749 h.271ac3744' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.0 r.19748 h.656520631 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.0 r.19749 h.271ac3744 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.0 r.19748 h.656520631:";; + short | recursive ) echo "Configuration of Yambo 5.0.0 r.19749 h.271ac3744:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.0 r.19748 h.656520631 +Yambo configure 5.0.0 r.19749 h.271ac3744 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.0 r.19748 h.656520631, which was +It was created by Yambo $as_me 5.0.0 r.19749 h.271ac3744, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="0" -SREVISION="19748" -SHASH="656520631" +SREVISION="19749" +SHASH="271ac3744" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.0 r.19748 h.656520631, which was +This file was extended by Yambo $as_me 5.0.0 r.19749 h.271ac3744, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.0 r.19748 h.656520631 +Yambo config.status 5.0.0 r.19749 h.271ac3744 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/dipoles/DIPOLE_x_real_space.F b/src/dipoles/DIPOLE_x_real_space.F index 6b14bdb37a..ccb77bf2b0 100644 --- a/src/dipoles/DIPOLE_x_real_space.F +++ b/src/dipoles/DIPOLE_x_real_space.F @@ -59,10 +59,7 @@ subroutine DIPOLE_x_real_space(Xen,Xk,Dip,idir_todo) ! YAMBO_ALLOC(x_cc,(fft_size,3,1)) ! - x_center(1)=molecule_position(1)*a(1,1) - x_center(2)=molecule_position(2)*a(2,2) - x_center(3)=molecule_position(3)*a(3,3) - call load_cc(.false.,x_center,1) + call load_cc(.false.,molecule_position,1) ! n_LT_steps=n_sp_pol*PAR_IND_DIPk_ibz%n_of_elements(PAR_IND_DIPk_ibz_ID+1)*& & PAR_IND_VAL_BANDS_DIP%n_of_elements(PAR_IND_VAL_BANDS_DIP_ID+1)*& diff --git a/src/hamiltonian/Pseudo_KB_FFT.F b/src/hamiltonian/Pseudo_KB_FFT.F index 5fee7c7af6..b35c8732ff 100644 --- a/src/hamiltonian/Pseudo_KB_FFT.F +++ b/src/hamiltonian/Pseudo_KB_FFT.F @@ -68,6 +68,7 @@ subroutine Pseudo_KB_FFT(kbv,kbv_real_space,kpt) ! #if defined _RT if(l_real_time) then + call error("call to load cc to be fixed") call load_cc(.false.,atom_pos(:,ia,is),i_atom) k_dot_x(:)=(kpt(1)*x_cc(:,1,i_atom)+kpt(2)*x_cc(:,2,i_atom)+kpt(3)*x_cc(:,3,i_atom)) kpt_factor(:) =cmplx( cos(k_dot_x(:)),sin(k_dot_x(:)) ) diff --git a/src/wf_and_fft/load_cc.F b/src/wf_and_fft/load_cc.F index 85c69f16eb..46f7dc1129 100644 --- a/src/wf_and_fft/load_cc.F +++ b/src/wf_and_fft/load_cc.F @@ -28,10 +28,6 @@ subroutine load_cc(manage_zero,x_zero_point,n_coord) ! - true --> if(x<10*epsilon(1._SP)) x=sing(x)*10*epsilon(1._SP) ! useful in case one needs to compute 1/x^apha ! - ! center_cc, - ! - false,i.e. x_zero_point=(0.5,0.5,0.5) --> the saw-like jump is at the border of the supercell - ! - true ,i.e. x_zero_point=( 0 , 0 , 0 ) --> the saw-like jump is at the center of the supercell - ! use pars, ONLY:SP use FFT_m, ONLY:fft_dim use D_lattice, ONLY:x_cc,a @@ -46,43 +42,33 @@ subroutine load_cc(manage_zero,x_zero_point,n_coord) ! ! work space ! - real(SP) :: tmp_border(3),tmp_x(3),rir1,rir2,rir3,x_jump(3) + real(SP) :: rir(3),rir_saw(3),x_jump(3) integer :: ir,ir1,ir2,ir3,i_dir ! - x_jump=(/a(1,1)/2._SP,a(2,2)/2._SP,a(3,3)/2._SP/)+x_zero_point + x_jump(1)=0.5_SP+x_zero_point(1) + x_jump(2)=0.5_SP+x_zero_point(2) + x_jump(3)=0.5_SP+x_zero_point(3) ! do ir1 = 0, fft_dim(1)-1 ! x - rir1=real(ir1,SP)/real(fft_dim(1),SP) + rir(1)=real(ir1,SP)/real(fft_dim(1),SP) do ir2 = 0, fft_dim(2)-1 ! y - rir2=real(ir2,SP)/real(fft_dim(2),SP) + rir(2)=real(ir2,SP)/real(fft_dim(2),SP) do ir3 = 0, fft_dim(3)-1 ! z - rir3=real(ir3,SP)/real(fft_dim(3),SP) + rir(3)=real(ir3,SP)/real(fft_dim(3),SP) ! ir = 1 + ir1 + ir2*fft_dim(1) + ir3*fft_dim(1)*fft_dim(2) ! - ! Definition: x_i=a1_i+a_2i+a3_i i=x,y,z in cartesian coordinates - tmp_x(:) = a(1,:)*rir1 + a(2,:)*rir2 + a(3,:)*rir3 - ! - ! Correctly compute x1, x2 and x3 with respect to cartesian axis - ! They are saw-like and the jumps are always at the axis parallel to the vectors - ! which defines the supercell and which cross at the center of the supercell - ! If center_cc is specified the saw-like jump is in the middle of the super-cell - ! - tmp_border(1)= x_jump(1) +a(2,1)*rir2 +a(3,1)*rir3 - tmp_border(2)=a(1,2)*rir1 + x_jump(2) +a(3,2)*rir3 - tmp_border(3)=a(1,3)*rir1 +a(2,3)*rir2 + x_jump(3) - ! - x_cc(ir,:,n_coord)=tmp_x(:) - ! - ! 2018/03/01 - !============ - ! DS warning: this implment must be changed for the cases a(i,j)<0 - ! do i_dir=1,3 - if (tmp_x(i_dir)> tmp_border(i_dir) ) x_cc(ir,:,n_coord)=x_cc(ir,:,n_coord)-a(i_dir,:) - !if (tmp_x(i_dir)<=(tmp_border(i_dir)-a(i_dir,i_dir))) x_cc(ir,:,n_coord)=x_cc(ir,:,n_coord)+a(i_dir,:) + rir(i_dir) = rir(i_dir)-x_jump(i_dir) + rir(i_dir) = rir(i_dir)-floor(rir(i_dir))-0.5_SP enddo ! + !write(*,*) ir,rir,rir_saw + ! + x_cc(ir,1,n_coord) = a(1,1)*rir(1) + a(2,1)*rir(2) + a(3,1)*rir(3) + x_cc(ir,2,n_coord) = a(1,2)*rir(1) + a(2,2)*rir(2) + a(3,2)*rir(3) + x_cc(ir,3,n_coord) = a(1,3)*rir(1) + a(2,3)*rir(2) + a(3,3)*rir(3) + ! if(.not.manage_zero) cycle ! do i_dir=1,3 diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index 1b32178dd7..2c70d1d561 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -152,7 +152,7 @@ subroutine WF_map_perturbative_SOC(kpt,En) ! YAMBO_ALLOC(x_cc,(fft_size,3,1)) ! - call load_cc(.false.,(/a(1,1)/2._SP,a(2,2)/2._SP,a(3,3)/2._SP/),1) + call load_cc(.false.,(/0.5_SP,0.5_SP,0.5_SP/),1) ! 1 continue ! From 4e9cc140d4f95b87342a5c1e992e5ebfab1a363f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 27 Mar 2021 18:09:41 +0100 Subject: [PATCH 0031/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 5d77890731..be912763af 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19704 h.a0c611d0c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19776 h.16736d792, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19704" -SHASH="a0c611d0c" +SREVISION="19776" +SHASH="16736d792" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 57efbf65b7..b5ad26f832 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19704 h.a0c611d0c. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19776 h.16736d792. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19704 h.a0c611d0c' -PACKAGE_STRING='Yambo 5.0.1 r.19704 h.a0c611d0c' +PACKAGE_VERSION='5.0.1 r.19776 h.16736d792' +PACKAGE_STRING='Yambo 5.0.1 r.19776 h.16736d792' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -818,6 +819,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -878,6 +881,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1530,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19704 h.a0c611d0c to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19776 h.16736d792 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19704 h.a0c611d0c:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19776 h.16736d792:";; esac cat <<\_ACEOF @@ -1609,6 +1613,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1801,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19704 h.a0c611d0c +Yambo configure 5.0.1 r.19776 h.16736d792 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19704 h.a0c611d0c, which was +It was created by Yambo $as_me 5.0.1 r.19776 h.16736d792, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19704" -SHASH="a0c611d0c" +SREVISION="19776" +SHASH="16736d792" @@ -2976,6 +2981,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14200,6 +14218,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14370,6 +14391,7 @@ fi + # @@ -14910,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19704 h.a0c611d0c, which was +This file was extended by Yambo $as_me 5.0.1 r.19776 h.16736d792, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14972,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19704 h.a0c611d0c +Yambo config.status 5.0.1 r.19776 h.16736d792 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From cf1cd44ba9bf4413b1d8473748373805615d621a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 28 Mar 2021 15:27:12 +0200 Subject: [PATCH 0032/1367] Version 5.0.1, Revision 19777, Hash 4e9cc140d MODIFIED * config/version/version.m4 configure wf_and_fft/load_cc.F Changes: - load_cc implementation refined Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++-- configure | 22 ++++++------- src/wf_and_fft/load_cc.F | 66 ++++++++++++++++++++++++++------------- 3 files changed, 58 insertions(+), 36 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index be912763af..191952efbb 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19776 h.16736d792, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19777 h.4e9cc140d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19776" -SHASH="16736d792" +SREVISION="19777" +SHASH="4e9cc140d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index b5ad26f832..a6e0799831 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19776 h.16736d792. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19777 h.4e9cc140d. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19776 h.16736d792' -PACKAGE_STRING='Yambo 5.0.1 r.19776 h.16736d792' +PACKAGE_VERSION='5.0.1 r.19777 h.4e9cc140d' +PACKAGE_STRING='Yambo 5.0.1 r.19777 h.4e9cc140d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19776 h.16736d792 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19777 h.4e9cc140d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19776 h.16736d792:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19777 h.4e9cc140d:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19776 h.16736d792 +Yambo configure 5.0.1 r.19777 h.4e9cc140d generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19776 h.16736d792, which was +It was created by Yambo $as_me 5.0.1 r.19777 h.4e9cc140d, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19776" -SHASH="16736d792" +SREVISION="19777" +SHASH="4e9cc140d" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19776 h.16736d792, which was +This file was extended by Yambo $as_me 5.0.1 r.19777 h.4e9cc140d, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19776 h.16736d792 +Yambo config.status 5.0.1 r.19777 h.4e9cc140d configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/wf_and_fft/load_cc.F b/src/wf_and_fft/load_cc.F index 46f7dc1129..3060713ee9 100644 --- a/src/wf_and_fft/load_cc.F +++ b/src/wf_and_fft/load_cc.F @@ -36,46 +36,43 @@ subroutine load_cc(manage_zero,x_zero_point,n_coord) ! ! input variable ! - logical :: manage_zero - real(SP) :: x_zero_point(3) - integer :: n_coord + logical, intent(in) :: manage_zero + real(SP), intent(in) :: x_zero_point(3) + integer, intent(in) :: n_coord + ! + real(SP), external :: saw ! ! work space ! - real(SP) :: rir(3),rir_saw(3),x_jump(3) + real(SP) :: rir(3),rir_saw(3),x_jump(3),width integer :: ir,ir1,ir2,ir3,i_dir ! - x_jump(1)=0.5_SP+x_zero_point(1) - x_jump(2)=0.5_SP+x_zero_point(2) - x_jump(3)=0.5_SP+x_zero_point(3) + x_jump=x_zero_point-floor(x_zero_point)+0.5_SP + x_jump=x_jump-floor(x_jump) + ! + width=1.E-3_SP ! - do ir1 = 0, fft_dim(1)-1 ! x - rir(1)=real(ir1,SP)/real(fft_dim(1),SP) + do ir3 = 0, fft_dim(3)-1 ! z + rir(3)=real(ir3,SP)/real(fft_dim(3),SP) do ir2 = 0, fft_dim(2)-1 ! y rir(2)=real(ir2,SP)/real(fft_dim(2),SP) - do ir3 = 0, fft_dim(3)-1 ! z - rir(3)=real(ir3,SP)/real(fft_dim(3),SP) + do ir1 = 0, fft_dim(1)-1 ! x + rir(1)=real(ir1,SP)/real(fft_dim(1),SP) ! ir = 1 + ir1 + ir2*fft_dim(1) + ir3*fft_dim(1)*fft_dim(2) ! do i_dir=1,3 - rir(i_dir) = rir(i_dir)-x_jump(i_dir) - rir(i_dir) = rir(i_dir)-floor(rir(i_dir))-0.5_SP + rir_saw(i_dir)=saw(x_jump(i_dir),width,rir(i_dir)) enddo ! - !write(*,*) ir,rir,rir_saw - ! - x_cc(ir,1,n_coord) = a(1,1)*rir(1) + a(2,1)*rir(2) + a(3,1)*rir(3) - x_cc(ir,2,n_coord) = a(1,2)*rir(1) + a(2,2)*rir(2) + a(3,2)*rir(3) - x_cc(ir,3,n_coord) = a(1,3)*rir(1) + a(2,3)*rir(2) + a(3,3)*rir(3) + x_cc(ir,:,n_coord) = a(1,:)*rir_saw(1) + a(2,:)*rir_saw(2) + a(3,:)*rir_saw(3) ! if(.not.manage_zero) cycle ! do i_dir=1,3 - if(abs(x_cc(ir,i_dir,n_coord))<10*epsilon(1._SP)) then - if(x_cc(ir,i_dir,n_coord)>=0._SP) x_cc(ir,i_dir,n_coord)= 10*epsilon(1._SP) - if(x_cc(ir,i_dir,n_coord)< 0._SP) x_cc(ir,i_dir,n_coord)=-10*epsilon(1._SP) - endif + if(abs(x_cc(ir,i_dir,n_coord))>=10*epsilon(1._SP)) cycle + if(x_cc(ir,i_dir,n_coord)>=0._SP) x_cc(ir,i_dir,n_coord)= 10*epsilon(1._SP) + if(x_cc(ir,i_dir,n_coord)< 0._SP) x_cc(ir,i_dir,n_coord)=-10*epsilon(1._SP) enddo ! enddo @@ -83,3 +80,28 @@ subroutine load_cc(manage_zero,x_zero_point,n_coord) enddo ! end subroutine +! +! +pure function saw( x_jump, width, x ) result ( sawout ) + ! + ! Adapted from QE, extfield.f90 + ! + use pars, ONLY:SP + ! + implicit none + ! + real(SP),intent(in) :: x_jump, width, x + ! + real(SP) :: sawout, x_shifted,x_centered + ! + x_shifted = x - x_jump + x_centered = x_shifted - floor(x_shifted) + ! + if (x_centered <= width) THEN + sawout = (0.5_SP - x_centered/width) * (1._SP-width) + else + ! I would use: sawout = x_centered - 0.5_SP * ( 1.0_SP + width ) + sawout = (-0.5_SP + (x_centered-width)/(1._SP-width)) * (1._SP-width) + endif + ! +end function saw From 93dde03ba0f9450d2b6c56db538e3da9330b5152 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 31 Mar 2021 17:19:24 +0200 Subject: [PATCH 0033/1367] Version 5.0.1, Revision 19778, Hash cf1cd44ba MODIFIED * config/version/version.m4 configure xc_functionals/el_density_and_current.F Changes: - Space removed Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 ++++++++++----------- src/xc_functionals/el_density_and_current.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 191952efbb..eea9c7be47 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19777 h.4e9cc140d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19778 h.cf1cd44ba, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19777" -SHASH="4e9cc140d" +SREVISION="19778" +SHASH="cf1cd44ba" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index a6e0799831..9e7c8fe266 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19777 h.4e9cc140d. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19778 h.cf1cd44ba. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19777 h.4e9cc140d' -PACKAGE_STRING='Yambo 5.0.1 r.19777 h.4e9cc140d' +PACKAGE_VERSION='5.0.1 r.19778 h.cf1cd44ba' +PACKAGE_STRING='Yambo 5.0.1 r.19778 h.cf1cd44ba' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19777 h.4e9cc140d to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19778 h.cf1cd44ba to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19777 h.4e9cc140d:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19778 h.cf1cd44ba:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19777 h.4e9cc140d +Yambo configure 5.0.1 r.19778 h.cf1cd44ba generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19777 h.4e9cc140d, which was +It was created by Yambo $as_me 5.0.1 r.19778 h.cf1cd44ba, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19777" -SHASH="4e9cc140d" +SREVISION="19778" +SHASH="cf1cd44ba" @@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19777 h.4e9cc140d, which was +This file was extended by Yambo $as_me 5.0.1 r.19778 h.cf1cd44ba, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14994,7 +14994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19777 h.4e9cc140d +Yambo config.status 5.0.1 r.19778 h.cf1cd44ba configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 2422dcc0cc..8472a20f45 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -270,7 +270,7 @@ subroutine el_density_and_current(E,k,rho,J,bands,force_spatial_inversion,comput rho_map_tmp(rho_map_size)=ifft enddo ! - call msg('s','[FFT] Instead of full fft_size '//trim(intc(fft_size))//' using rho_map_size '//trim(intc(rho_map_size))) + call msg('s','[FFT] Instead of full fft_size '//trim(intc(fft_size))//' using rho_map_size '//trim(intc(rho_map_size))) allocate(rho_map(rho_map_size)) rho_map=rho_map_tmp(:rho_map_size) ! From 96e88e22581710a75812a6b44c7f5fcd49eb85d6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 3 Apr 2021 00:09:57 +0200 Subject: [PATCH 0034/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index ff1cd44950..dd20fc6fcf 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19779 h.93dde03ba, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19788 h.488a2b1fc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19779" -SHASH="93dde03ba" +SREVISION="19788" +SHASH="488a2b1fc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d882eb6ce7..fb5989b033 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19779 h.93dde03ba. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19788 h.488a2b1fc. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19779 h.93dde03ba' -PACKAGE_STRING='Yambo 5.0.1 r.19779 h.93dde03ba' +PACKAGE_VERSION='5.0.1 r.19788 h.488a2b1fc' +PACKAGE_STRING='Yambo 5.0.1 r.19788 h.488a2b1fc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -818,6 +819,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -878,6 +881,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1530,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19779 h.93dde03ba to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19788 h.488a2b1fc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19779 h.93dde03ba:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19788 h.488a2b1fc:";; esac cat <<\_ACEOF @@ -1609,6 +1613,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1801,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19779 h.93dde03ba +Yambo configure 5.0.1 r.19788 h.488a2b1fc generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19779 h.93dde03ba, which was +It was created by Yambo $as_me 5.0.1 r.19788 h.488a2b1fc, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19779" -SHASH="93dde03ba" +SREVISION="19788" +SHASH="488a2b1fc" @@ -2976,6 +2981,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14198,6 +14216,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14368,6 +14389,7 @@ fi + # @@ -14908,7 +14930,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19779 h.93dde03ba, which was +This file was extended by Yambo $as_me 5.0.1 r.19788 h.488a2b1fc, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14970,7 +14992,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19779 h.93dde03ba +Yambo config.status 5.0.1 r.19788 h.488a2b1fc configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 7dd5a0ff45c3e8cee6272dd119156eddb83a1ed3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 3 Apr 2021 10:39:31 +0200 Subject: [PATCH 0035/1367] Version 5.0.1, Revision 19789, Hash 96e88e225 MODIFIED * config/version/version.m4 configure interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F xc_functionals/el_density_and_current.F Changes: - [yambo] Value of rho_map_thresh for TDDFT calculations can be controlled via input file New input variable is RhoMapThresh Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 ++++++++++----------- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 3 ++- src/modules/SET_defaults.F | 3 ++- src/xc_functionals/el_density_and_current.F | 1 - 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index dd20fc6fcf..11affd69ae 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19788 h.488a2b1fc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19789 h.96e88e225, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19788" -SHASH="488a2b1fc" +SREVISION="19789" +SHASH="96e88e225" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index fb5989b033..580b38162a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19788 h.488a2b1fc. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19789 h.96e88e225. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19788 h.488a2b1fc' -PACKAGE_STRING='Yambo 5.0.1 r.19788 h.488a2b1fc' +PACKAGE_VERSION='5.0.1 r.19789 h.96e88e225' +PACKAGE_STRING='Yambo 5.0.1 r.19789 h.96e88e225' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19788 h.488a2b1fc to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19789 h.96e88e225 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19788 h.488a2b1fc:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19789 h.96e88e225:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19788 h.488a2b1fc +Yambo configure 5.0.1 r.19789 h.96e88e225 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19788 h.488a2b1fc, which was +It was created by Yambo $as_me 5.0.1 r.19789 h.96e88e225, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19788" -SHASH="488a2b1fc" +SREVISION="19789" +SHASH="96e88e225" @@ -14930,7 +14930,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19788 h.488a2b1fc, which was +This file was extended by Yambo $as_me 5.0.1 r.19789 h.96e88e225, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14992,7 +14992,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19788 h.488a2b1fc +Yambo config.status 5.0.1 r.19789 h.96e88e225 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 801c63bef7..ebf88a6d8e 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -428,7 +428,7 @@ subroutine INIT_activate() ! endif ! - if(l_alda_fxc.and.any((/l_em1s,l_em1d,l_acfdt,l_ppa,l_cohsex,l_gw0/)) ) call initactivate(1,'FxcGRLc') + if(l_alda_fxc.and.any((/l_em1s,l_em1d,l_acfdt,l_ppa,l_cohsex,l_gw0/)) ) call initactivate(1,'FxcGRLc RhoMapThresh') if( l_lrc_fxc.and.any((/l_em1s,l_em1d,l_acfdt,l_ppa,l_cohsex,l_gw0/)) ) call initactivate(1,'LRC_alpha LRC_beta') ! ! El-Ph: Frohlich Hamiltonian diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 45faf47374..d026402386 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -42,7 +42,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & QP_G_er,QP_G_dr,QP_Sc_steps,GWo_iterations,GW_iterations,& & QP_dSc_delta,QP_G_Zoom_treshold,GF_energy_range_mode use LIVE_t, ONLY:nhash - use wave_func, ONLY:wf_ng + use wave_func, ONLY:wf_ng,rho_map_thresh use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,& & bz_samp,RIM_ng,RIM_epsm1,RIM_id_epsm1_reference,& @@ -293,6 +293,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]',BS_n_g_W,G_unit) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) call it(defs,'BSENGfxc','[BSK] Fxc components', BS_n_g_fxc,G_unit,verb_level=V_resp) + call it(defs,'RhoMapThresh','[BSK] Density cutoff for integrals region',rho_map_thresh,verb_level=V_resp) call it(defs,'BSEEhEny','[BSK] Electron-hole energy range',BS_eh_en,E_unit,verb_level=V_resp) call it(defs,'BSKCut', '[BSK] Cutoff on the BSE Kernel, 0=full 1=none',BS_K_cutoff,verb_level=V_resp) call it(defs,'BSKIOmode','[BSK] ("1D_linear"/"2D_standard")',BSK_IO_mode,verb_level=V_resp) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index ebb050357b..7cc6f43a0f 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -62,7 +62,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & more_io_path,core_io_path,com_path,repfile,grid_paths,fat_log use stderr, ONLY:win_size,tty_size,logfile,set_real_printed_length,log_as_a_file use LIVE_t, ONLY:log_line_to_dump,log_line,nhash,ct - use wave_func, ONLY:wf_ng,wf_norm_test,wf_nb_io,wf_nb_io_groups,WF,WF_buffer,WF_buffered_IO + use wave_func, ONLY:wf_ng,wf_norm_test,wf_nb_io,wf_nb_io_groups,WF,WF_buffer,WF_buffered_IO,rho_map_thresh use FFT_m, ONLY:fft_dim_loaded,fft_size,fft_dim,fft_multiplier use IO_m, ONLY:io_reset,max_io_units,serial_number,frag_WF use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,& @@ -331,6 +331,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) wf_norm_test=.TRUE. wf_nb_io=0 wf_nb_io_groups=1 + rho_map_thresh=1.E-7 ! !FFT ! diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 9711535769..611e3a2d60 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -293,7 +293,6 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! if(l_rho_map) then ! - rho_map_thresh=1.E-6_SP rho_map_size=0 do ifft=1,fft_size if(rho(ifft)*real(fft_size,SP)/real(DL_vol,SP) Date: Mon, 5 Apr 2021 21:40:17 +0200 Subject: [PATCH 0036/1367] Version 5.0.1, Revision 19790, Hash 7dd5a0ff4 MODIFIED * config/version/version.m4 configure common/eval_Gradient.F xc_functionals/el_density_and_current.F Bugs: - [yambo] Fixed interplay between new implementation of drho for GGA and real WFs Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +-- configure | 22 ++++---- src/common/eval_Gradient.F | 12 +++-- src/xc_functionals/el_density_and_current.F | 58 +++++++++++++-------- 4 files changed, 56 insertions(+), 42 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 11affd69ae..bffa94c998 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19789 h.96e88e225, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19790 h.7dd5a0ff4, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19789" -SHASH="96e88e225" +SREVISION="19790" +SHASH="7dd5a0ff4" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 580b38162a..463f3e8172 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19789 h.96e88e225. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19790 h.7dd5a0ff4. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19789 h.96e88e225' -PACKAGE_STRING='Yambo 5.0.1 r.19789 h.96e88e225' +PACKAGE_VERSION='5.0.1 r.19790 h.7dd5a0ff4' +PACKAGE_STRING='Yambo 5.0.1 r.19790 h.7dd5a0ff4' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19789 h.96e88e225 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19790 h.7dd5a0ff4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19789 h.96e88e225:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19790 h.7dd5a0ff4:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19789 h.96e88e225 +Yambo configure 5.0.1 r.19790 h.7dd5a0ff4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19789 h.96e88e225, which was +It was created by Yambo $as_me 5.0.1 r.19790 h.7dd5a0ff4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19789" -SHASH="96e88e225" +SREVISION="19790" +SHASH="7dd5a0ff4" @@ -14930,7 +14930,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19789 h.96e88e225, which was +This file was extended by Yambo $as_me 5.0.1 r.19790 h.7dd5a0ff4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14992,7 +14992,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19789 h.96e88e225 +Yambo config.status 5.0.1 r.19790 h.7dd5a0ff4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 800d9f6d8a..73c7b606a7 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -37,13 +37,13 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) use FFT_m, ONLY:fftw_plan #endif use R_lattice, ONLY:g_vec,ng_vec - use wave_func, ONLY:wf_ng + use wave_func, ONLY:wf_ng,rho_map,rho_map_size ! #include ! integer, intent(in) ::spinor_size - complex(SP), intent(in) ::f(fft_size,spinor_size) - complex(SP), intent(out)::f_gradient(fft_size,spinor_size,3) + complex(SP), intent(in) ::f(rho_map_size,spinor_size) + complex(SP), intent(out)::f_gradient(rho_map_size,spinor_size,3) character(len=*), intent(in) ::f_type ! "wave", "density" or "potential" ! ! Work Space @@ -70,7 +70,8 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) ! do i_spinor=1,spinor_size ! - Vr=cmplx(f(:,i_spinor),kind=DP) + if(rho_map_size< fft_size) Vr(rho_map(:))=cmplx(f(:,i_spinor),kind=DP) + if(rho_map_size==fft_size) Vr( : )=cmplx(f(:,i_spinor),kind=DP) ! #if defined _FFTW call dfftw_destroy_plan(fftw_plan) @@ -92,7 +93,8 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) #else call fft_3d(Vr,fft_dim,1) #endif - f_gradient(:,i_spinor,ic) = cmplx(Vr(:),kind=SP) + if(rho_map_size< fft_size) f_gradient(:,i_spinor,ic) = cmplx(Vr(rho_map(:)),kind=SP) + if(rho_map_size< fft_size) f_gradient(:,i_spinor,ic) = cmplx(Vr( : ),kind=SP) enddo ! enddo diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 611e3a2d60..963c426c0e 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -57,7 +57,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c use wave_func, ONLY:WF,rho_map,rho_map_thresh,rho_map_size use parallel_m, ONLY:PAR_IND_WF_linear,PAR_COM_density use parallel_int, ONLY:PP_redux_wait - use pseudo, ONLY:pp_is_uspp,qe_pseudo_alloc,becp + use pseudo, ONLY:pp_is_uspp,qe_pseudo_alloc,becp,pp_has_nlcc use qe_pseudo_m, ONLY:qe_omega=>omega,qe_ngm=>ngm, becsum #if defined _RT use drivers, ONLY:l_real_time @@ -112,14 +112,15 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c endif ! if (l_drho) then - call warning(" USPP corrections to rho gradient not implemented") - YAMBO_ALLOC(WF_der,(fft_size,n_spinor,3)) + if(pp_is_uspp) call warning(" USPP corrections to rho gradient not implemented") + if(pp_has_nlcc) call warning(" NLCC corrections to rho gradient not implemented") + YAMBO_ALLOC(WF_der,(rho_map_size,n_spinor,3)) rho =0._SP rho_no_sym=0._SP endif ! if (l_J) then - YAMBO_ALLOC(WF_der,(fft_size,n_spinor,3)) + YAMBO_ALLOC(WF_der,(rho_map_size,n_spinor,3)) call error(" Calculation of current is implemented but not tested") J =0._SP J_no_sym =0._SP @@ -174,36 +175,40 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! ! if (l_rho) then - if (size(WF%r(:,i_spinor,i_wf)) Date: Mon, 5 Apr 2021 22:44:34 +0200 Subject: [PATCH 0037/1367] Version 5.0.1, Revision 19791, Hash 6c209f2cc MODIFIED * config/version/version.m4 configure bse/K_kernel.F common/eval_Gradient.F modules/SET_defaults.F xc_functionals/XC_libxc_driver.F xc_functionals/el_density_and_current.F Bugs: - [yambo] Few more bugs left from previous commit Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 ++++++++++----------- src/bse/K_kernel.F | 17 ++++++++++------ src/common/eval_Gradient.F | 2 +- src/modules/SET_defaults.F | 6 +++++- src/xc_functionals/XC_libxc_driver.F | 1 - src/xc_functionals/el_density_and_current.F | 8 ++++---- 7 files changed, 35 insertions(+), 27 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index bffa94c998..50feaa7721 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19790 h.7dd5a0ff4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19791 h.6c209f2cc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19790" -SHASH="7dd5a0ff4" +SREVISION="19791" +SHASH="6c209f2cc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 463f3e8172..29115f336b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19790 h.7dd5a0ff4. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19791 h.6c209f2cc. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19790 h.7dd5a0ff4' -PACKAGE_STRING='Yambo 5.0.1 r.19790 h.7dd5a0ff4' +PACKAGE_VERSION='5.0.1 r.19791 h.6c209f2cc' +PACKAGE_STRING='Yambo 5.0.1 r.19791 h.6c209f2cc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1534,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19790 h.7dd5a0ff4 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19791 h.6c209f2cc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1600,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19790 h.7dd5a0ff4:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19791 h.6c209f2cc:";; esac cat <<\_ACEOF @@ -1806,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19790 h.7dd5a0ff4 +Yambo configure 5.0.1 r.19791 h.6c209f2cc generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19790 h.7dd5a0ff4, which was +It was created by Yambo $as_me 5.0.1 r.19791 h.6c209f2cc, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19790" -SHASH="7dd5a0ff4" +SREVISION="19791" +SHASH="6c209f2cc" @@ -14930,7 +14930,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19790 h.7dd5a0ff4, which was +This file was extended by Yambo $as_me 5.0.1 r.19791 h.6c209f2cc, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14992,7 +14992,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19790 h.7dd5a0ff4 +Yambo config.status 5.0.1 r.19791 h.6c209f2cc configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index feea109e5c..b15087c5f9 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -57,7 +57,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc use xc_functionals,ONLY:F_xc,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind,WF_exx_fraction - use wave_func, ONLY:WF,rho_map_size,rho_map + use wave_func, ONLY:WF,rho_map,rho_map_thresh use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,master_cpu @@ -289,11 +289,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! This part could be done just by the master bypassing the PAR_IND_WF_linear ... ! - rho_map_size=0 + if(rho_map_thresh>0._SP) then + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") + YAMBO_ALLOC(rho,(fft_size)) + call el_density_and_current(Ken,Xk,rho=rho,compute_rho_map=.true.) + YAMBO_FREE(rho) + call WF_free(WF) + endif + ! call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") - YAMBO_ALLOC(rho,(fft_size)) - call el_density_and_current(Ken,Xk,rho=rho,compute_rho_map=.true.) - YAMBO_FREE(rho) YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) @@ -573,7 +577,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if(iHxc==2) then ! - deallocate(rho_map) + if(rho_map_thresh>0._SP) deallocate(rho_map) + ! if (l_bs_fxc) then YAMBO_FREE(F_xc_gspace) YAMBO_FREE(FXC_K_diagonal) diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 73c7b606a7..15e7c1c1be 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -94,7 +94,7 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) call fft_3d(Vr,fft_dim,1) #endif if(rho_map_size< fft_size) f_gradient(:,i_spinor,ic) = cmplx(Vr(rho_map(:)),kind=SP) - if(rho_map_size< fft_size) f_gradient(:,i_spinor,ic) = cmplx(Vr( : ),kind=SP) + if(rho_map_size==fft_size) f_gradient(:,i_spinor,ic) = cmplx(Vr( : ),kind=SP) enddo ! enddo diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 7cc6f43a0f..43946e0118 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -331,7 +331,11 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) wf_norm_test=.TRUE. wf_nb_io=0 wf_nb_io_groups=1 - rho_map_thresh=1.E-7 +#if defined _MOL + rho_map_thresh=1.E-7_SP +#else + rho_map_thresh=0._SP +#endif ! !FFT ! diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 42948d83c5..52b13fcdcd 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -228,7 +228,6 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) end do end do ! - ! endif ! !=========================== diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 963c426c0e..a74dd79a84 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -115,8 +115,8 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c if(pp_is_uspp) call warning(" USPP corrections to rho gradient not implemented") if(pp_has_nlcc) call warning(" NLCC corrections to rho gradient not implemented") YAMBO_ALLOC(WF_der,(rho_map_size,n_spinor,3)) - rho =0._SP - rho_no_sym=0._SP + drho =0._SP + drho_no_sym=0._SP endif ! if (l_J) then @@ -194,7 +194,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! if (l_drho) then ! - call eval_Gradient(WF%r(:,:,i_wf),WF_der,n_spinor,"wave") + call eval_Gradient(cmplx(WF%r(:,:,i_wf),kind=SP),WF_der,n_spinor,"wave") ! do i_dir=1,3 do i_spinor=1,n_spinor @@ -216,7 +216,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! if (l_J) then ! - call eval_Gradient(WF%r(:,:,i_wf),WF_der,n_spinor,"wave") + call eval_Gradient(cmplx(WF%r(:,:,i_wf)),WF_der,n_spinor,"wave") ! do i_dir=1,3 do i_spinor=1,n_spinor From 2bb22189a1d2458d58727afc5787f67b7c9779a2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 9 Apr 2021 12:47:57 +0200 Subject: [PATCH 0038/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 ++--- configure | 50 +++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 87c0f97cde..ffc96a887b 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.0.1 r.19792 h.b4e0aa547, yambo@yambo-code.org) +AC_INIT(Yambo, 5.0.1 r.19815 h.e5a7d5fbd, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19792" -SHASH="b4e0aa547" +SREVISION="19815" +SHASH="e5a7d5fbd" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index aa98c153b9..a695eda248 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19792 h.b4e0aa547. +# Generated by GNU Autoconf 2.69 for Yambo 5.0.1 r.19815 h.e5a7d5fbd. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.0.1 r.19792 h.b4e0aa547' -PACKAGE_STRING='Yambo 5.0.1 r.19792 h.b4e0aa547' +PACKAGE_VERSION='5.0.1 r.19815 h.e5a7d5fbd' +PACKAGE_STRING='Yambo 5.0.1 r.19815 h.e5a7d5fbd' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -818,6 +819,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -878,6 +881,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1530,7 +1534,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.0.1 r.19792 h.b4e0aa547 to adapt to many kinds of systems. +\`configure' configures Yambo 5.0.1 r.19815 h.e5a7d5fbd to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1596,7 +1600,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.0.1 r.19792 h.b4e0aa547:";; + short | recursive ) echo "Configuration of Yambo 5.0.1 r.19815 h.e5a7d5fbd:";; esac cat <<\_ACEOF @@ -1609,6 +1613,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1801,7 +1806,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.0.1 r.19792 h.b4e0aa547 +Yambo configure 5.0.1 r.19815 h.e5a7d5fbd generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2480,7 +2485,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.0.1 r.19792 h.b4e0aa547, which was +It was created by Yambo $as_me 5.0.1 r.19815 h.e5a7d5fbd, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2831,8 +2836,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="0" SPATCHLEVEL="1" -SREVISION="19792" -SHASH="b4e0aa547" +SREVISION="19815" +SHASH="e5a7d5fbd" @@ -2976,6 +2981,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14113,10 +14131,8 @@ fi if test x"$acx_libxc_ok" = xno; then have_configured="no" internal_libxc="yes" - # version y2.0.3 - #LIBXC_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib -lxc" - # version 2.2.3 is used - LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" + # version 5.1.3 is used + LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a"; then compile_libxc="no" @@ -14212,6 +14228,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14382,6 +14401,7 @@ fi + # @@ -14922,7 +14942,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.0.1 r.19792 h.b4e0aa547, which was +This file was extended by Yambo $as_me 5.0.1 r.19815 h.e5a7d5fbd, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14984,7 +15004,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.0.1 r.19792 h.b4e0aa547 +Yambo config.status 5.0.1 r.19815 h.e5a7d5fbd configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From ad583e805aa81876974cfe720a4e6db7fc490bef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 May 2021 18:31:23 +0200 Subject: [PATCH 0039/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 ++--- configure | 50 +++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index f27a936d20..4de5c29b78 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.19795 h.fb885af5d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.19888 h.d3ddb0bb3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="19795" -SHASH="fb885af5d" +SREVISION="19888" +SHASH="d3ddb0bb3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d16e492287..c6f882e788 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.19795 h.fb885af5d. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.19888 h.d3ddb0bb3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.19795 h.fb885af5d' -PACKAGE_STRING='Yambo 5.1.0 r.19795 h.fb885af5d' +PACKAGE_VERSION='5.1.0 r.19888 h.d3ddb0bb3' +PACKAGE_STRING='Yambo 5.1.0 r.19888 h.d3ddb0bb3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -820,6 +821,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -880,6 +883,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1532,7 +1536,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.19795 h.fb885af5d to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.19888 h.d3ddb0bb3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1598,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.19795 h.fb885af5d:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.19888 h.d3ddb0bb3:";; esac cat <<\_ACEOF @@ -1611,6 +1615,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1803,7 +1808,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.19795 h.fb885af5d +Yambo configure 5.1.0 r.19888 h.d3ddb0bb3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2482,7 +2487,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.19795 h.fb885af5d, which was +It was created by Yambo $as_me 5.1.0 r.19888 h.d3ddb0bb3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2833,8 +2838,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="19795" -SHASH="fb885af5d" +SREVISION="19888" +SHASH="d3ddb0bb3" @@ -2978,6 +2983,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14122,10 +14140,8 @@ fi if test x"$acx_libxc_ok" = xno; then have_configured="no" internal_libxc="yes" - # version y2.0.3 - #LIBXC_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib -lxc" - # version 2.2.3 is used - LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" + # version 5.1.3 is used + LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a"; then compile_libxc="no" @@ -14221,6 +14237,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14391,6 +14410,7 @@ fi + # @@ -14931,7 +14951,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.19795 h.fb885af5d, which was +This file was extended by Yambo $as_me 5.1.0 r.19888 h.d3ddb0bb3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14993,7 +15013,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.19795 h.fb885af5d +Yambo config.status 5.1.0 r.19888 h.d3ddb0bb3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From d67b649c612e8960d1b48da989d09e98e4fee8e7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 8 Jun 2021 16:53:52 +0200 Subject: [PATCH 0040/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 ++-- configure | 64 +++++++++++++++++++++++++++++---------- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index b7b52da5d3..ded9b404ca 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.19986 h.ad583e805, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20080 h.50b6eb4c3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="19986" -SHASH="ad583e805" +SREVISION="20080" +SHASH="50b6eb4c3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 7f6cfc6690..933da90170 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.19986 h.ad583e805. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20080 h.50b6eb4c3. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.19986 h.ad583e805' -PACKAGE_STRING='Yambo 5.1.0 r.19986 h.ad583e805' +PACKAGE_VERSION='5.1.0 r.20080 h.50b6eb4c3' +PACKAGE_STRING='Yambo 5.1.0 r.20080 h.50b6eb4c3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -820,6 +821,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -852,6 +855,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -879,6 +883,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1019,6 +1024,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1271,6 +1277,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1408,7 +1423,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1521,7 +1536,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.19986 h.ad583e805 to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20080 h.50b6eb4c3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1561,6 +1576,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1586,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.19986 h.ad583e805:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20080 h.50b6eb4c3:";; esac cat <<\_ACEOF @@ -1599,6 +1615,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1791,7 +1808,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.19986 h.ad583e805 +Yambo configure 5.1.0 r.20080 h.50b6eb4c3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2470,7 +2487,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.19986 h.ad583e805, which was +It was created by Yambo $as_me 5.1.0 r.20080 h.50b6eb4c3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2821,8 +2838,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="19986" -SHASH="ad583e805" +SREVISION="20080" +SHASH="50b6eb4c3" @@ -2966,6 +2983,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14155,10 +14185,8 @@ fi if test x"$acx_libxc_ok" = xno; then have_configured="no" internal_libxc="yes" - # version y2.0.3 - #LIBXC_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib -lxc" - # version 2.2.3 is used - LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" + # version 5.1.3 is used + LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a"; then compile_libxc="no" @@ -14254,6 +14282,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14424,6 +14455,7 @@ fi + # @@ -14964,7 +14996,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.19986 h.ad583e805, which was +This file was extended by Yambo $as_me 5.1.0 r.20080 h.50b6eb4c3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15026,7 +15058,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.19986 h.ad583e805 +Yambo config.status 5.1.0 r.20080 h.50b6eb4c3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 78c9de6337933d9bcf4c1d8762fea52ae6b2f529 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 25 Jun 2021 17:26:06 +0200 Subject: [PATCH 0041/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index ebfea132ce..268a8fa02a 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.20158 h.d67b649c6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20219 h.469216b9d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20158" -SHASH="d67b649c6" +SREVISION="20219" +SHASH="469216b9d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index c7203e0424..1c3bd61d98 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20158 h.d67b649c6. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20219 h.469216b9d. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.20158 h.d67b649c6' -PACKAGE_STRING='Yambo 5.1.0 r.20158 h.d67b649c6' +PACKAGE_VERSION='5.1.0 r.20219 h.469216b9d' +PACKAGE_STRING='Yambo 5.1.0 r.20219 h.469216b9d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -820,6 +821,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -880,6 +883,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1532,7 +1536,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.20158 h.d67b649c6 to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20219 h.469216b9d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1598,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.20158 h.d67b649c6:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20219 h.469216b9d:";; esac cat <<\_ACEOF @@ -1611,6 +1615,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1803,7 +1808,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.20158 h.d67b649c6 +Yambo configure 5.1.0 r.20219 h.469216b9d generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2482,7 +2487,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.20158 h.d67b649c6, which was +It was created by Yambo $as_me 5.1.0 r.20219 h.469216b9d, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2833,8 +2838,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20158" -SHASH="d67b649c6" +SREVISION="20219" +SHASH="469216b9d" @@ -2978,6 +2983,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14248,6 +14266,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14418,6 +14439,7 @@ fi + # @@ -14958,7 +14980,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.20158 h.d67b649c6, which was +This file was extended by Yambo $as_me 5.1.0 r.20219 h.469216b9d, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15020,7 +15042,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.20158 h.d67b649c6 +Yambo config.status 5.1.0 r.20219 h.469216b9d configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 3d8bd8897b835c4ee095e34c68aae482f689b1dc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 25 Jun 2021 17:42:02 +0200 Subject: [PATCH 0042/1367] Version 5.1.0, Revision 20220, Hash 78c9de633 MODIFIED * config/version/version.m4 configure lib/yambo bse/K_diago_response_functions.F bse/K_kernel.F Bugs: - Few fixes after merge Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +-- configure | 22 ++++---- lib/yambo | 2 +- src/bse/K_diago_response_functions.F | 2 +- src/bse/K_kernel.F | 78 ++++++---------------------- 5 files changed, 31 insertions(+), 79 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 268a8fa02a..0f981efd2c 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.20219 h.469216b9d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20220 h.78c9de633, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20219" -SHASH="469216b9d" +SREVISION="20220" +SHASH="78c9de633" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 1c3bd61d98..b4b0e27173 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20219 h.469216b9d. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20220 h.78c9de633. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.20219 h.469216b9d' -PACKAGE_STRING='Yambo 5.1.0 r.20219 h.469216b9d' +PACKAGE_VERSION='5.1.0 r.20220 h.78c9de633' +PACKAGE_STRING='Yambo 5.1.0 r.20220 h.78c9de633' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1536,7 +1536,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.20219 h.469216b9d to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20220 h.78c9de633 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1602,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.20219 h.469216b9d:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20220 h.78c9de633:";; esac cat <<\_ACEOF @@ -1808,7 +1808,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.20219 h.469216b9d +Yambo configure 5.1.0 r.20220 h.78c9de633 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2487,7 +2487,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.20219 h.469216b9d, which was +It was created by Yambo $as_me 5.1.0 r.20220 h.78c9de633, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2838,8 +2838,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20219" -SHASH="469216b9d" +SREVISION="20220" +SHASH="78c9de633" @@ -14980,7 +14980,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.20219 h.469216b9d, which was +This file was extended by Yambo $as_me 5.1.0 r.20220 h.78c9de633, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15042,7 +15042,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.20219 h.469216b9d +Yambo config.status 5.1.0 r.20220 h.78c9de633 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/lib/yambo b/lib/yambo index 19e174c241..c6bc91dc90 160000 --- a/lib/yambo +++ b/lib/yambo @@ -1 +1 @@ -Subproject commit 19e174c241f016c87f4dfc5d3291746213177995 +Subproject commit c6bc91dc9082c3dd86a9bb46a43cef361768f408 diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 4104d09400..673dcd4b0d 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -34,7 +34,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use parallel_m, ONLY:myid,PP_indexes,PP_indexes_reset use LIVE_t, ONLY:live_timing - use BS, ONLY:BS_perturbative_SOC,BS_res_ares_n_mat,l_BS_abs,l_BS_jdos,l_BS_esort + use BS, ONLY:BS_perturbative_SOC,BS_res_ares_n_mat,l_BS_abs,l_BS_jdos,l_BS_esort,& & BS_K_anti_resonant,l_BS_ares_from_res,BS_K_coupling use BS_solvers, ONLY:BSS_n_eig,Co_factor,diam_term_exact,BSS_eels_to_eps use R_lattice, ONLY:bare_qpg,q0_def_norm diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 4ab754c94b..ca259b3a4e 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -90,11 +90,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last ! -<<<<<<< HEAD:src/bse/K_kernel.F integer :: i_block,O_ng_shift,O_ng_exch,iHxc,NG(2),& -======= - integer :: i_block,O_ng_shift,NG,& ->>>>>>> devel-tddft:src/bse/K.F & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& & bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4) complex(SP):: Co,H_x,H_c,BS_mat_tmp @@ -243,53 +239,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! -<<<<<<< HEAD:src/bse/K_kernel.F -======= - ! Wave Functions - !================ - bands_to_load=BS_bands - if (BS_K_is_ALDA) bands_to_load=(/1,BS_bands(2)/) - ! - section_title='-BSK' - if (l_bs_fxc) section_title='-BSK->Fxc' - ! - NG=max(O_ng,BS_n_g_exch) - if (BS_K_is_ALDA) NG=max(NG,BS_n_g_fxc) - ! - call WF_load(WF,NG,O_ng_shift,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) - ! - ! Wave Functions Phases - !======================= - call K_WF_phases(Xk) - ! - ! Spatial Inversion Test - !======================== - call WF_spatial_inversion(Ken,Xk) - ! - ! ALDA - !====== - if (BS_K_is_ALDA) then - YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - YAMBO_ALLOC(V_xc,(fft_size,n_spin)) - V_xc=0._SP - if(n_spin>1) then - YAMBO_ALLOC(magn,(fft_size,3)) - endif - call XC_potential_driver(Ken,Xk,WF_kind,WF_xc_functional,2) - YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) - call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) - YAMBO_FREE(F_xc) - YAMBO_FREE(V_xc) - if(n_spin>1) then - YAMBO_FREE(magn) - endif - if (trim(ALDA_cut_scheme)=="lower_Gmax") then - call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) - call msg('s','[BSE] Fxc components ',BS_n_g_fxc) - endif - endif - ! ->>>>>>> devel-tddft:src/bse/K.F ! DB identifier !=============== BS_identifier=pickup_a_random(10000._SP) @@ -353,20 +302,28 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif ! call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") + ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) endif - call XC_potential_driver(Ken,Xk,WF_KIND,WF_xc_functional,2) + call XC_potential_driver(Ken,Xk,WF_kind,WF_xc_functional,2) + YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) + call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) + YAMBO_FREE(F_xc) + YAMBO_FREE(V_xc) if(n_spin>1) then YAMBO_FREE(magn) endif + ! call WF_free(WF) - !if ( BS_n_g_fxc/=ng_closed) then - ! FXC_n_g_corr=BS_n_g_fxc - ! call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) - ! call msg('s','[BSE] Fxc components ',BS_n_g_fxc) - !endif + ! + if (trim(ALDA_cut_scheme)=="lower_Gmax") then + call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + call msg('s','[BSE] Fxc components ',BS_n_g_fxc) + endif endif ! call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title)) @@ -682,17 +639,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) sqrt_f_itk=sqrt(cmplx(BS_T_grp(i_Tgrp_k)%f(i_Tk),kind=SP)) sqrt_f_itp=sqrt(cmplx(BS_T_grp(i_Tgrp_p)%f(i_Tp),kind=SP)) ! -<<<<<<< HEAD:src/bse/K_kernel.F - if (l_BS_ares_asymm) then + if (.not.l_BS_ares_from_res) then BS_mat_tmp = sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp else if (BS_blk(i_block)%mode=="R") BS_mat_tmp = sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp if (BS_blk(i_block)%mode=="C") BS_mat_tmp = cI*sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp endif -======= - BS_blk(i_block)%mat(i_Tk,i_Tp)=sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp - if (BS_blk(i_block)%mode=="C") BS_blk(i_block)%mat(i_Tk,i_Tp)= cI*BS_blk(i_block)%mat(i_Tk,i_Tp) ->>>>>>> devel-tddft:src/bse/K.F ! if (iHxc==1) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp if (iHxc>=2) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp From 1c5d19783c2a9b5de35908b4dd441ff4f17490a2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 12 Jul 2021 11:57:28 +0200 Subject: [PATCH 0043/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index fd6dc13161..4ff3a7aa0d 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.20233 h.3d8bd8897, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20297 h.bddd96b10, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20233" -SHASH="3d8bd8897" +SREVISION="20297" +SHASH="bddd96b10" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d0354845de..119ff38ff3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20233 h.3d8bd8897. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20297 h.bddd96b10. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.20233 h.3d8bd8897' -PACKAGE_STRING='Yambo 5.1.0 r.20233 h.3d8bd8897' +PACKAGE_VERSION='5.1.0 r.20297 h.bddd96b10' +PACKAGE_STRING='Yambo 5.1.0 r.20297 h.bddd96b10' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -820,6 +821,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -880,6 +883,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1532,7 +1536,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.20233 h.3d8bd8897 to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20297 h.bddd96b10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1598,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.20233 h.3d8bd8897:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20297 h.bddd96b10:";; esac cat <<\_ACEOF @@ -1611,6 +1615,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1803,7 +1808,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.20233 h.3d8bd8897 +Yambo configure 5.1.0 r.20297 h.bddd96b10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2482,7 +2487,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.20233 h.3d8bd8897, which was +It was created by Yambo $as_me 5.1.0 r.20297 h.bddd96b10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2833,8 +2838,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20233" -SHASH="3d8bd8897" +SREVISION="20297" +SHASH="bddd96b10" @@ -2978,6 +2983,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14248,6 +14266,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14418,6 +14439,7 @@ fi + # @@ -14958,7 +14980,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.20233 h.3d8bd8897, which was +This file was extended by Yambo $as_me 5.1.0 r.20297 h.bddd96b10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15020,7 +15042,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.20233 h.3d8bd8897 +Yambo config.status 5.1.0 r.20297 h.bddd96b10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 01431e43218855b92f5cf6e2ce339862cc18c7cc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 21 Jul 2021 22:26:37 +0200 Subject: [PATCH 0044/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index d0773b4ac9..b57f832d10 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.20225 h.928d14e39, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20300 h.6fc42e733, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20225" -SHASH="928d14e39" +SREVISION="20300" +SHASH="6fc42e733" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 107409dcec..3ace321b06 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20225 h.928d14e39. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20300 h.6fc42e733. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.20225 h.928d14e39' -PACKAGE_STRING='Yambo 5.1.0 r.20225 h.928d14e39' +PACKAGE_VERSION='5.1.0 r.20300 h.6fc42e733' +PACKAGE_STRING='Yambo 5.1.0 r.20300 h.6fc42e733' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -820,6 +821,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -880,6 +883,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1532,7 +1536,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.20225 h.928d14e39 to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20300 h.6fc42e733 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1598,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.20225 h.928d14e39:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20300 h.6fc42e733:";; esac cat <<\_ACEOF @@ -1611,6 +1615,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1803,7 +1808,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.20225 h.928d14e39 +Yambo configure 5.1.0 r.20300 h.6fc42e733 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2482,7 +2487,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.20225 h.928d14e39, which was +It was created by Yambo $as_me 5.1.0 r.20300 h.6fc42e733, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2833,8 +2838,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20225" -SHASH="928d14e39" +SREVISION="20300" +SHASH="6fc42e733" @@ -2978,6 +2983,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14248,6 +14266,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14418,6 +14439,7 @@ fi + # @@ -14958,7 +14980,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.20225 h.928d14e39, which was +This file was extended by Yambo $as_me 5.1.0 r.20300 h.6fc42e733, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15020,7 +15042,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.20225 h.928d14e39 +Yambo config.status 5.1.0 r.20300 h.6fc42e733 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 0ce2e5eb2ec6a0162dbb2a65301dc1f1fe8cab7b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 31 Aug 2021 12:57:14 +0200 Subject: [PATCH 0045/1367] Automatic commit: configure regenerated after merge --- config/version/version.m4 | 6 +++--- configure | 44 +++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 6f13586ede..2ebe5158f8 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.20252 h.05c832c8f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20322 h.fbb2a68ec, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20252" -SHASH="05c832c8f" +SREVISION="20322" +SHASH="fbb2a68ec" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index d3b05f8640..f801bd4c55 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20252 h.05c832c8f. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20322 h.fbb2a68ec. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.20252 h.05c832c8f' -PACKAGE_STRING='Yambo 5.1.0 r.20252 h.05c832c8f' +PACKAGE_VERSION='5.1.0 r.20322 h.fbb2a68ec' +PACKAGE_STRING='Yambo 5.1.0 r.20322 h.fbb2a68ec' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -823,6 +824,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -883,6 +886,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1535,7 +1539,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.20252 h.05c832c8f to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20322 h.fbb2a68ec to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1601,7 +1605,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.20252 h.05c832c8f:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20322 h.fbb2a68ec:";; esac cat <<\_ACEOF @@ -1614,6 +1618,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1806,7 +1811,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.20252 h.05c832c8f +Yambo configure 5.1.0 r.20322 h.fbb2a68ec generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2485,7 +2490,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.20252 h.05c832c8f, which was +It was created by Yambo $as_me 5.1.0 r.20322 h.fbb2a68ec, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2836,8 +2841,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20252" -SHASH="05c832c8f" +SREVISION="20322" +SHASH="fbb2a68ec" @@ -2981,6 +2986,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14418,6 +14436,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14588,6 +14609,7 @@ fi + # @@ -15128,7 +15150,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.20252 h.05c832c8f, which was +This file was extended by Yambo $as_me 5.1.0 r.20322 h.fbb2a68ec, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15190,7 +15212,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.20252 h.05c832c8f +Yambo config.status 5.1.0 r.20322 h.fbb2a68ec configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" From 4c79d75119fd3ebeff9dfce97dd78a7e5a331b25 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 31 Aug 2021 13:00:35 +0200 Subject: [PATCH 0046/1367] Version 5.1.0, Revision 20323, Hash 0ce2e5eb2 MODIFIED * config/version/version.m4 configure dipoles/DIPOLE_driver.F NEW * (new Bugs: - [yambo] Added check on orbital dipoles for dichrism in the kind of dipoles computed Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 +++--- configure | 22 +++++++++++----------- src/dipoles/DIPOLE_driver.F | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 2ebe5158f8..77d785297e 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.20322 h.fbb2a68ec, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.20323 h.0ce2e5eb2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20322" -SHASH="fbb2a68ec" +SREVISION="20323" +SHASH="0ce2e5eb2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index f801bd4c55..5586b35282 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20322 h.fbb2a68ec. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.20323 h.0ce2e5eb2. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.20322 h.fbb2a68ec' -PACKAGE_STRING='Yambo 5.1.0 r.20322 h.fbb2a68ec' +PACKAGE_VERSION='5.1.0 r.20323 h.0ce2e5eb2' +PACKAGE_STRING='Yambo 5.1.0 r.20323 h.0ce2e5eb2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1539,7 +1539,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.20322 h.fbb2a68ec to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.20323 h.0ce2e5eb2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1605,7 +1605,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.20322 h.fbb2a68ec:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.20323 h.0ce2e5eb2:";; esac cat <<\_ACEOF @@ -1811,7 +1811,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.20322 h.fbb2a68ec +Yambo configure 5.1.0 r.20323 h.0ce2e5eb2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2490,7 +2490,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.20322 h.fbb2a68ec, which was +It was created by Yambo $as_me 5.1.0 r.20323 h.0ce2e5eb2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2841,8 +2841,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="20322" -SHASH="fbb2a68ec" +SREVISION="20323" +SHASH="0ce2e5eb2" @@ -15150,7 +15150,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.20322 h.fbb2a68ec, which was +This file was extended by Yambo $as_me 5.1.0 r.20323 h.0ce2e5eb2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15212,7 +15212,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.20322 h.fbb2a68ec +Yambo config.status 5.1.0 r.20323 h.0ce2e5eb2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index c16c1c4845..07ab104a68 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -141,6 +141,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) if (compute_P2_dipoles) Dip%computed=trim(Dip%computed)//' P2' if (compute_Spin_dipoles) Dip%computed=trim(Dip%computed)//' Spin' if (compute_Orb_dipoles) Dip%computed=trim(Dip%computed)//' Orb' + if (l_BS_dichroism) Dip%computed=trim(Dip%computed)//' OrbCD' ! if (use_covariant_approach) eval_OVERLAPS=.true. ! From aefdb48be7bbc923d80a46b38b97c1143720f77c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 23 Sep 2021 12:23:37 +0200 Subject: [PATCH 0047/1367] Automatic commit: configure regenerated after merge --- configure | 22 ++++++++++++++++++++++ include/driver/version.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 7cecd5e34d..19a0effee9 100755 --- a/configure +++ b/configure @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -824,6 +825,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -884,6 +887,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1616,6 +1620,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3036,6 +3041,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14510,6 +14528,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14680,6 +14701,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index 5310fbc273..6de51c7c98 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20363 -#define YAMBO_HASH "4c79d7511" +#define YAMBO_REVISION 20436 +#define YAMBO_HASH "d33a59974" From d35864121914a38d624cf95f2200a214924338a8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 12 Nov 2021 19:01:33 +0100 Subject: [PATCH 0048/1367] Version 5.1.0, Revision 20564, Hash 1f64b1a70 MODIFIED * include/driver/version.h bse/K_kernel.F Changes: - [yambo] Few changes to K_kernel imported from devel-magnons Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1820c6fa44..968eec3ef0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20490 -#define YAMBO_HASH "aefdb48be" +#define YAMBO_REVISION 20564 +#define YAMBO_HASH "1f64b1a70" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 154d20e89f..a45a91be3d 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -29,7 +29,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use LOGO, ONLY:pickup_a_random use drivers, ONLY:l_bs_fxc,l_tddft,l_RIM_W use frequency, ONLY:w_samp - use electrons, ONLY:levels,spin_occ,spin,n_spin + use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor use FFT_m, ONLY:fft_size use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab @@ -41,6 +41,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use LIVE_t, ONLY:live_timing use X_m, ONLY:X_t use interfaces, ONLY:el_density_and_current + use QP_m, ONLY:QP_ng_Vxc use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& & BS_res_K_exchange,BS_Block_size,BS_q,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& @@ -49,7 +50,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_oscillators_free,WF_phase,n_BS_blks,BS_blk,BS_T_grp,& & BS_nT_grps,BS_blks_free,l_BS_ares_from_res,& & l_BSE_minimize_memory,l_BSE_restart,l_BSE_kernel_complete,& -& BS_perturbative_SOC,BS_K_cutoff,BS_max_val +& BS_perturbative_SOC,BS_K_cutoff,BS_max_val,l_BS_magnons use collision_el, ONLY:elemental_collision_free use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR,RD,WR_CL,OP_APP,deliver_IO_error_message,WR @@ -183,7 +184,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered !call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") !! Hybrid functional. - !if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") + !if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"fxc") ! WARNING > if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) endif @@ -312,9 +313,20 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") ! + if (trim(ALDA_cut_scheme)=="lower_Gmax") then + call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + call msg('s','[BSE] Fxc components ',BS_n_g_fxc) + endif YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - YAMBO_ALLOC(V_xc,(fft_size,n_spin)) - V_xc=0._SP + if(l_BS_magnons.and.n_spinor==2) then + ! In principle here there is a factor 4 between thei energy cutoff on the potential and the one of the kernel + ! The following line, or something similar, should be used here and before + !QP_nG=G_index_energy_factor(BS_n_g_fxc,0.25_SP) + ! However in practice the one on the kernel is never set 4 the potential, i.e. 16 times the one onf the WFs + QP_ng_Vxc=BS_n_g_fxc + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP + endif if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) endif @@ -322,17 +334,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) YAMBO_FREE(F_xc) - YAMBO_FREE(V_xc) + if(l_BS_magnons.and.n_spinor==2) then + YAMBO_FREE(V_xc) + endif if(n_spin>1) then YAMBO_FREE(magn) endif ! call WF_free(WF) ! - if (trim(ALDA_cut_scheme)=="lower_Gmax") then - call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) - call msg('s','[BSE] Fxc components ',BS_n_g_fxc) - endif endif ! call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title)) @@ -705,6 +715,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(F_xc_gspace) YAMBO_FREE(FXC_K_diagonal) else if (BS_K_is_ALDA) then + YAMBO_FREE(V_xc) YAMBO_FREE(F_xc) YAMBO_FREE(F_xc_mat) endif From e53c33a3cfd1bcc7ba608dab9682b440cd4a8169 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 13 Nov 2021 01:43:21 +0100 Subject: [PATCH 0049/1367] Version 5.1.0, Revision 20565, Hash d35864121 MODIFIED * include/driver/version.h bse/K_kernel.F modules/mod_interfaces.F tddft/TDDFT_ALDA_R_space.F wf_and_fft/WF_free.F Changes: - [yambo] Saving feew changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 16 +++++++++------- src/modules/mod_interfaces.F | 3 ++- src/tddft/TDDFT_ALDA_R_space.F | 16 ++++++++++++---- src/wf_and_fft/WF_free.F | 10 +++++++++- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 968eec3ef0..c0afee0173 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20564 -#define YAMBO_HASH "1f64b1a70" +#define YAMBO_REVISION 20565 +#define YAMBO_HASH "d35864121" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index a45a91be3d..c5bb08d2c7 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -29,7 +29,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use LOGO, ONLY:pickup_a_random use drivers, ONLY:l_bs_fxc,l_tddft,l_RIM_W use frequency, ONLY:w_samp - use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor + use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_sp_pol use FFT_m, ONLY:fft_size use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab @@ -283,6 +283,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! do iHxc=1,3 ! + if(l_BS_magnons.and.n_sp_pol==2.and.iHxc==1) cycle + ! if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle ! section_title='-BSK-'//trim(intc(iHxc)) @@ -304,14 +306,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! This part could be done just by the master bypassing the PAR_IND_WF_linear ... ! if(rho_map_thresh>0._SP) then - call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) YAMBO_ALLOC(rho,(fft_size)) call el_density_and_current(Ken,Xk,rho=rho,compute_rho_map=.true.) YAMBO_FREE(rho) - call WF_free(WF) + call WF_free(WF,keep_states_to_load=.true.) endif ! - call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT") + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) ! if (trim(ALDA_cut_scheme)=="lower_Gmax") then call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) @@ -341,11 +343,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(magn) endif ! - call WF_free(WF) + call WF_free(WF,keep_states_to_load=.true.) ! endif ! - call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title)) + call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) ! ! Wave Functions Phases !======================= @@ -733,7 +735,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - call WF_free(WF) + call WF_free(WF,keep_states_to_load=iHxc<3) ! enddo ! iHxc loop ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index d7b13cd627..d439a8f2ef 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -182,10 +182,11 @@ subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,& logical, optional, intent(in) :: quiet end subroutine ! - subroutine WF_free(WF,keep_fft) + subroutine WF_free(WF,keep_fft,keep_states_to_load) use wave_func, ONLY:WAVEs type(WAVEs) :: WF logical ,optional :: keep_fft + logical ,optional :: keep_states_to_load end subroutine ! subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index 3ad3835e28..9cd1328fb0 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -56,6 +56,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! ! Work Space ! + logical :: l_use_rho_map integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,irho complex(SP) :: rhotwr1(rho_map_size*n_spinor*n_spinor) complex(SP) :: rhotwr2(rho_map_size*n_spinor*n_spinor) @@ -73,6 +74,8 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) call WF_apply_symm(is,WF_symm1) call WF_apply_symm(os,WF_symm2) ! + l_use_rho_map=allocated(rho_map) + ! if(n_spinor==1) rhotwr1(:)=conjg(WF_symm1(:,1))*WF_symm2(:,1) ! if(n_spinor==2) then @@ -94,9 +97,13 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) call WF_apply_symm(osp,WF_symm1) endif ! - if( n_spin==1 ) rhotwr2(:)=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) - ! - if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(rho_map(:),is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if (l_use_rho_map) then + if( n_spin==1 ) rhotwr2(:)=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(rho_map(:),is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + else + if( n_spin==1 ) rhotwr2(:)=F_xc_mat(:,1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(:,is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + endif ! if(n_spinor==2) then rhotwr2=cZERO @@ -105,7 +112,8 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) do ip_spinor=1,n_spinor do jp_spinor=1,n_spinor do irho=1,rho_map_size - ifft=rho_map(irho) + if( l_use_rho_map) ifft=rho_map(irho) + if(.not.l_use_rho_map) ifft= irho irhotw=irho+(i_spinor-1)*rho_map_size+(j_spinor-1)*n_spinor*rho_map_size rhotwr2(irhotw)=rhotwr2(irhotw)+& & F_xc_mat(ifft,i_spinor,j_spinor,ip_spinor,jp_spinor)*WF_symm1(irho,ip_spinor)*conjg(WF_symm2(irho,jp_spinor)) diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index 963e2f6d8f..93f057123f 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine WF_free(WF,keep_fft) +subroutine WF_free(WF,keep_fft,keep_states_to_load) ! use wave_func, ONLY:WAVEs use pseudo, ONLY:pp_is_uspp,PP_uspp_free @@ -31,14 +31,19 @@ subroutine WF_free(WF,keep_fft) ! type(WAVEs) :: WF logical, optional :: keep_fft + logical, optional :: keep_states_to_load ! ! Work-space ! logical :: keep_fft_ + logical :: keep_states_to_load_ ! keep_fft_=.false. if (present(keep_fft)) keep_fft_=keep_fft ! + keep_states_to_load_=.false. + if (present(keep_states_to_load)) keep_states_to_load_=keep_states_to_load + ! ! USPP if (pp_is_uspp) call PP_uspp_free() ! @@ -68,6 +73,9 @@ subroutine WF_free(WF,keep_fft) WF%b=0 WF%sp_pol=0 WF%space=' ' + ! + if (keep_states_to_load_) return + ! WF%to_load=.TRUE. ! end subroutine From 210c4caab0e5dbab0617e45ba7dcc132e36c0829 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 13 Nov 2021 15:50:13 +0100 Subject: [PATCH 0050/1367] Version 5.1.0, Revision 20566, Hash e53c33a3c MODIFIED * include/driver/version.h bse/K_correlation_collisions.F bse/K_kernel.F Bugs: - [yambo] Fixed bug introduced with last commit Additions: - Changes: - Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_correlation_collisions.F | 4 +--- src/bse/K_kernel.F | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c0afee0173..0ad7af3d94 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20565 -#define YAMBO_HASH "d35864121" +#define YAMBO_REVISION 20566 +#define YAMBO_HASH "e53c33a3c" diff --git a/src/bse/K_correlation_collisions.F b/src/bse/K_correlation_collisions.F index 2f1ab0c654..eea5a81262 100644 --- a/src/bse/K_correlation_collisions.F +++ b/src/bse/K_correlation_collisions.F @@ -71,15 +71,13 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last ! - integer :: i_s_star,i_s_mq_star,i_s_collision,N_kmq,N_pmq,iHxc + integer :: i_s_star,i_s_mq_star,i_s_collision,N_kmq,N_pmq character(1):: mode_now ! logical, allocatable :: O_todo_table(:,:,:,:,:,:) ! if (.not.BS_res_K_corr) return ! - iHxc=3 - ! call timing('T_space CORR Osc.',OPR='start') ! ! Every block is at k (ibz) fixed diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index c5bb08d2c7..c2e0bca4e9 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -283,6 +283,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! do iHxc=1,3 ! + if(iHxc==1) BS_blk_done=.false. + ! if(l_BS_magnons.and.n_sp_pol==2.and.iHxc==1) cycle ! if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle @@ -368,8 +370,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! First load previously computed matrix elements. !================================================= ! - if(iHxc==1) BS_blk_done=.false. - ! #ifdef _PAR_IO if (l_BSE_restart.and.iHxc==1) then ! From 01be82a70508c13c44990644fdc3738073cb0919 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 13 Nov 2021 16:08:27 +0100 Subject: [PATCH 0051/1367] Version 5.1.0, Revision 20567, Hash 210c4caab MODIFIED * include/driver/version.h bse/K_kernel.F xc_functionals/Build_F_xc_mat.F xc_functionals/XC_eval_lda_kernel.F xc_functionals/XC_libxc_driver.F Changes: - [yambo] Added GGA contribution to magnons Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 6 ++---- src/xc_functionals/Build_F_xc_mat.F | 20 ++++++++++++++++---- src/xc_functionals/XC_eval_lda_kernel.F | 16 ++-------------- src/xc_functionals/XC_libxc_driver.F | 4 ++-- 5 files changed, 24 insertions(+), 26 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0ad7af3d94..ccf39366b9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20566 -#define YAMBO_HASH "e53c33a3c" +#define YAMBO_REVISION 20567 +#define YAMBO_HASH "210c4caab" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index c2e0bca4e9..74def19c86 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -322,7 +322,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call msg('s','[BSE] Fxc components ',BS_n_g_fxc) endif YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - if(l_BS_magnons.and.n_spinor==2) then + if(l_BS_magnons) then ! In principle here there is a factor 4 between thei energy cutoff on the potential and the one of the kernel ! The following line, or something similar, should be used here and before !QP_nG=G_index_energy_factor(BS_n_g_fxc,0.25_SP) @@ -338,7 +338,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) YAMBO_FREE(F_xc) - if(l_BS_magnons.and.n_spinor==2) then + if(l_BS_magnons) then YAMBO_FREE(V_xc) endif if(n_spin>1) then @@ -717,8 +717,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(F_xc_gspace) YAMBO_FREE(FXC_K_diagonal) else if (BS_K_is_ALDA) then - YAMBO_FREE(V_xc) - YAMBO_FREE(F_xc) YAMBO_FREE(F_xc_mat) endif ! diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index b2cf334166..720d5fd542 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -75,15 +75,27 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) else if (n_sp_pol==2) then ! if (.not.l_BS_magnons) then + ! F_xc_mat(:,1,1,1,1)= F_xc(:,1,1) F_xc_mat(:,1,1,2,2)= F_xc(:,1,2) F_xc_mat(:,2,2,1,1)= F_xc(:,2,1) F_xc_mat(:,2,2,2,2)= F_xc(:,2,2) + ! else - F_xc_mat(:,1,2,1,2)= F_xc(:,2,1) ! This is zero - F_xc_mat(:,1,2,2,1)= F_xc(:,1,1) - F_xc_mat(:,2,1,1,2)= F_xc(:,2,2) - F_xc_mat(:,2,1,2,1)= F_xc(:,1,1) ! This is zero + ! + Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP + ! + do ifft=1,fft_size + mod_mag=abs(magn(ifft,3)) + if(mod_mag==0._SP) magn_inv(ifft)=0._SP + if(mod_mag/=0._SP) magn_inv(ifft)=1._SP/mod_mag + enddo + ! + F_xc_mat(:,1,2,1,2)= cZERO + F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv + F_xc_mat(:,2,1,1,2)= 2*Vxc_mag*magn_inv + F_xc_mat(:,2,1,2,1)= cZERO + ! endif ! else if (n_spinor==2) then diff --git a/src/xc_functionals/XC_eval_lda_kernel.F b/src/xc_functionals/XC_eval_lda_kernel.F index 812e48eba5..017f268c7d 100644 --- a/src/xc_functionals/XC_eval_lda_kernel.F +++ b/src/xc_functionals/XC_eval_lda_kernel.F @@ -23,7 +23,7 @@ ! subroutine XC_eval_lda_kernel(v1rho,v2rho2) ! - use pars, ONLY:SP,DP + use pars, ONLY:SP,DP,cZERO use xc_functionals, ONLY:F_xc,magn,xc_spin,xc_spin_map1 use electrons, ONLY:n_spin,n_spinor,n_sp_pol use FFT_m, ONLY:fft_size @@ -54,19 +54,7 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) enddo else ! Magnons Fxc - do ifft=1,fft_size - mod_mag=abs(magn(ifft,3))*real(fft_size,SP)/DL_vol - if(mod_mag< 1.E-8_SP) one_over_magn=0._SP - if(mod_mag>=1.E-8_SP) one_over_magn=1._SP/mod_mag - ! Here 1,1 means -+ and 22 +- - ! This happens because in the yambo convention the left indexes "v sigma_v, c sigma_c, k" are inverted - ! with respect to the standard convention, i.e. "c sigma_c, v sigma_v, k" - ! As a result f_\up\dn,\dn\up is in yambo f_\dn\up,\dn\up and so on - F_xc(ifft,1,1) = F_xc(ifft,1,1) + real(v1rho(1,ifft)-v1rho(2,ifft),SP)*one_over_magn - F_xc(ifft,2,2) = F_xc(ifft,2,2) + real(v1rho(1,ifft)-v1rho(2,ifft),SP)*one_over_magn - enddo - ! Here 2,1 means -- and 12 ++ (or viceversa, to be checked) - F_xc(:,2,1)=F_xc(:,1,2) + F_xc(:,2,1)=cZERO endif endif ! diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index e9bd85a53d..b950673bd2 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -271,7 +271,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) case(2) if( l_BS_magnons) then call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) - if(n_spinor==2) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) ! Yambo internal for Kxc @@ -299,7 +299,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if( l_BS_magnons) then call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) ! Yambo internal for V_xc - if(n_spinor==2) call XC_eval_gga_potential(v1rho,v1sigma,drho) + call XC_eval_gga_potential(v1rho,v1sigma,drho) endif call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) ! Yambo internal for Kxc From e6d017554fcdb0619f49d8abc310da8c8fcb9667 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 13 Nov 2021 16:13:02 +0100 Subject: [PATCH 0052/1367] Version 5.1.0, Revision 20568, Hash 01be82a70 MODIFIED * include/driver/version.h xc_functionals/XC_libxc_driver.F Changes: - Small improvement. I do not go through the Fxc evaluation if not needed for magnons and n_sp_pol=2 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/xc_functionals/XC_libxc_driver.F | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ccf39366b9..7c13b4d34c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20567 -#define YAMBO_HASH "210c4caab" +#define YAMBO_REVISION 20568 +#define YAMBO_HASH "01be82a70" diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index b950673bd2..887617a4e3 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -273,9 +273,11 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) - ! Yambo internal for Kxc - call XC_eval_lda_kernel(v1rho,v2rho2) + if( (.not.l_BS_magnons) .or. n_spinor==2) then + call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) + ! Yambo internal for Kxc + call XC_eval_lda_kernel(v1rho,v2rho2) + endif end select elseif (fnctl(ixc)%family==XC_FAMILY_GGA.or.fnctl(ixc)%family==XC_FAMILY_HYB_GGA) then !GAUPBE short range x-energy and potentials part @@ -301,9 +303,11 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! Yambo internal for V_xc call XC_eval_gga_potential(v1rho,v1sigma,drho) endif - call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) - ! Yambo internal for Kxc - call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) + if( (.not.l_BS_magnons) .or. n_spinor==2) then + call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) + ! Yambo internal for Kxc + call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) + endif end select end if call xc_f03_func_end(fnctl(ixc)%conf) From cf6b1cdae60d1360552edc9eaea4a097cbdf9529 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Nov 2021 11:57:37 +0100 Subject: [PATCH 0053/1367] Version 5.1.0, Revision 20569, Hash e6d017554 MODIFIED * include/driver/version.h tddft/TDDFT_ALDA_R_space.F xc_functionals/Build_F_xc_mat.F xc_functionals/XC_eval_lda_kernel.F Bugs: - [yambo] Fixed again convention for magnons Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/tddft/TDDFT_ALDA_R_space.F | 15 ++++++++++++--- src/xc_functionals/Build_F_xc_mat.F | 5 +++-- src/xc_functionals/XC_eval_lda_kernel.F | 11 ++++++++++- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7c13b4d34c..8027d1843a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20568 -#define YAMBO_HASH "01be82a70" +#define YAMBO_REVISION 20569 +#define YAMBO_HASH "e6d017554" diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index 9cd1328fb0..52b748abf3 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -57,7 +57,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! Work Space ! logical :: l_use_rho_map - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,irho + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,irho,is_yambo,os_yambo complex(SP) :: rhotwr1(rho_map_size*n_spinor*n_spinor) complex(SP) :: rhotwr2(rho_map_size*n_spinor*n_spinor) complex(SP) :: WF_symm1(rho_map_size,n_spinor) @@ -76,6 +76,15 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! l_use_rho_map=allocated(rho_map) ! + ! This takes into account the different conventions between the definition of the spin indexes + ! between yambo and the derivation of fxc in spin space for magnons + ! This happens because in the yambo convention the left indexes "v sigma_v, c sigma_c, k" are inverted + ! with respect to the standard convention, i.e. "c sigma_c, v sigma_v, k" + ! As a result f_\up\dn,\dn\up is in yambo f_\dn\up,\dn\up and so on + is_yambo=os(4) + os_yambo=is(4) + ! To check/fix the spinorial version + ! if(n_spinor==1) rhotwr1(:)=conjg(WF_symm1(:,1))*WF_symm2(:,1) ! if(n_spinor==2) then @@ -99,10 +108,10 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! if (l_use_rho_map) then if( n_spin==1 ) rhotwr2(:)=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) - if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(rho_map(:),is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(rho_map(:),is_yambo,os_yambo,isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) else if( n_spin==1 ) rhotwr2(:)=F_xc_mat(:,1,1,1,1)*WF_symm1(:,1)*conjg(WF_symm2(:,1)) - if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(:,is(4),os(4),isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) + if(n_sp_pol==2) rhotwr2(:)=F_xc_mat(:,is_yambo,os_yambo,isp(4),osp(4))*WF_symm1(:,1)*conjg(WF_symm2(:,1)) endif ! if(n_spinor==2) then diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index 720d5fd542..fa9d43f85c 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -27,6 +27,7 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) use BS, ONLY:l_BS_magnons use FFT_m, ONLY:fft_size use electrons, ONLY:n_spin,n_spinor,n_sp_pol + use D_lattice, ONLY:DL_vol use xc_functionals, ONLY:magn use vec_operate, ONLY:v_norm ! @@ -122,8 +123,8 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! F_xc_mat(:,1,2,1,2) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)-cI*magn_versor(:,2))**2 ! (mag) F_xc_mat(:,1,2,2,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)**2+magn_versor(:,2)**2)+2*Vxc_mag*magn_inv ! (mag) - F_xc_mat(:,2,1,2,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)**2+magn_versor(:,2)**2)+2*Vxc_mag*magn_inv ! (mag) - F_xc_mat(:,2,2,1,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)+cI*magn_versor(:,2))**2 ! (mag) + F_xc_mat(:,2,1,1,2) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)**2+magn_versor(:,2)**2)+2*Vxc_mag*magn_inv ! (mag) + F_xc_mat(:,2,1,2,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)+cI*magn_versor(:,2))**2 ! (mag) ! ! TO DO !! ! diff --git a/src/xc_functionals/XC_eval_lda_kernel.F b/src/xc_functionals/XC_eval_lda_kernel.F index 017f268c7d..c611c7fa1b 100644 --- a/src/xc_functionals/XC_eval_lda_kernel.F +++ b/src/xc_functionals/XC_eval_lda_kernel.F @@ -54,7 +54,16 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) enddo else ! Magnons Fxc - F_xc(:,2,1)=cZERO + do ifft=1,fft_size + mod_mag=abs(magn(ifft,3))*real(fft_size,SP)/DL_vol + if(mod_mag< 1.E-8_SP) one_over_magn=0._SP + if(mod_mag>=1.E-8_SP) one_over_magn=1._SP/mod_mag + ! Here 1,2 means -+ and 21 +- (or viceversa, to be checked) + F_xc(ifft,1,2) = F_xc(ifft,1,2) + real(v1rho(1,ifft)-v1rho(2,ifft),SP)*one_over_magn + F_xc(ifft,2,1) = F_xc(ifft,2,1) + real(v1rho(1,ifft)-v1rho(2,ifft),SP)*one_over_magn + enddo + ! Here 1,1 means -- and 22 ++ (or viceversa, to be checked) + F_xc(:,2,2)=F_xc(:,1,1) endif endif ! From 18b3e40519c9014e4c208df1184d60cff74cf439 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Nov 2021 21:57:26 +0100 Subject: [PATCH 0054/1367] Version 5.1.0, Revision 20570, Hash cf6b1cdae MODIFIED * include/driver/version.h tddft/TDDFT_ALDA_R_space.F Bugs: - [yambo] Fix for spinorial case Additions: - Changes: - Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/tddft/TDDFT_ALDA_R_space.F | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8027d1843a..a5957bba27 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20569 -#define YAMBO_HASH "e6d017554" +#define YAMBO_REVISION 20570 +#define YAMBO_HASH "cf6b1cdae" diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index 52b748abf3..9af9e80274 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -57,7 +57,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) ! Work Space ! logical :: l_use_rho_map - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,irho,is_yambo,os_yambo + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,irho,is_yambo,os_yambo,i_spinor_y,j_spinor_y complex(SP) :: rhotwr1(rho_map_size*n_spinor*n_spinor) complex(SP) :: rhotwr2(rho_map_size*n_spinor*n_spinor) complex(SP) :: WF_symm1(rho_map_size,n_spinor) @@ -118,6 +118,8 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) rhotwr2=cZERO do i_spinor=1,n_spinor do j_spinor=1,n_spinor + i_spinor_y=j_spinor + j_spinor_y=i_spinor do ip_spinor=1,n_spinor do jp_spinor=1,n_spinor do irho=1,rho_map_size @@ -125,7 +127,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,mode) if(.not.l_use_rho_map) ifft= irho irhotw=irho+(i_spinor-1)*rho_map_size+(j_spinor-1)*n_spinor*rho_map_size rhotwr2(irhotw)=rhotwr2(irhotw)+& - & F_xc_mat(ifft,i_spinor,j_spinor,ip_spinor,jp_spinor)*WF_symm1(irho,ip_spinor)*conjg(WF_symm2(irho,jp_spinor)) + & F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)*WF_symm1(irho,ip_spinor)*conjg(WF_symm2(irho,jp_spinor)) enddo enddo enddo From 42d3e0978181422d54a07af617eb1a92ad5665dd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Nov 2021 22:59:24 +0100 Subject: [PATCH 0055/1367] Version 5.1.0, Revision 20571, Hash 18b3e4051 MODIFIED * include/driver/version.h bse/K_kernel.F Changes: - [yambo] If corr kernel is not computed WFs are not loaded for iHxc=3 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 35 +++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a5957bba27..9a12941cc7 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20570 -#define YAMBO_HASH "cf6b1cdae" +#define YAMBO_REVISION 20571 +#define YAMBO_HASH "18b3e4051" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 74def19c86..9c68f9e04e 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -104,9 +104,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external ::K_correlation_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! - ! Oscillators - ! - logical :: load_O_X + logical :: load_O_X,l_bs_corr,l_load_WFs ! ! I/O ! @@ -176,7 +174,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) O_ng_exch =maxval(qindx_X(iq,:,2)) O_ng_shift=O_ng_exch ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then + l_bs_corr=any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc + ! + if (l_bs_corr) then O_ng=G_m_G_maxval ! < WARNIGN: 2021/03/19 ! The following can be safely removed with the new implementation @@ -202,7 +202,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if( l_BSE_kernel_complete ) return ! io_QINDX_err=0 - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag) + if (l_bs_corr) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag) if(io_QINDX_err/=0) call error('Error reading qindx_B database ') ! ! Screened interaction @@ -215,7 +215,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (l_RIM_W) call interpolate_W(X,Xw,q,'BSE') ! io_X_err=0 - if (BS_res_K_corr) call K_screened_interaction(X,Xw,q,io_X_err) + if (l_bs_corr) call K_screened_interaction(X,Xw,q,io_X_err) ! if (io_X_err<0) then call deliver_IO_error_message(io_X_err,'PP/Em1s') @@ -283,9 +283,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! do iHxc=1,3 ! - if(iHxc==1) BS_blk_done=.false. + if (iHxc==1) BS_blk_done=.false. ! - if(l_BS_magnons.and.n_sp_pol==2.and.iHxc==1) cycle + if (l_BS_magnons.and.n_sp_pol==2.and.iHxc==1) cycle ! if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle ! @@ -301,6 +301,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !if (iHxc==3) NG(2)=O_ng_shift ! WARNING > ! + l_load_WFs= iHxc==1 .or. iHxc==2 .or. (iHxc==3.and.l_bs_corr) + ! ! ALDA !====== if (iHxc==2) then @@ -349,11 +351,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) + if (l_load_WFs) call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) ! ! Wave Functions Phases !======================= - if (iHxc==3) call K_WF_phases(Xk) + if (iHxc==3.and.l_bs_corr) call K_WF_phases(Xk) ! ! Spatial Inversion Test !======================== @@ -421,6 +423,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==1) section_title=trim(section_title)//' exch' if (iHxc==2) section_title=trim(section_title)//' tddft' if (iHxc==3) section_title=trim(section_title)//' corr' + if (.not.l_load_WFs) section_title='Final I/O' ! if(m_steps>0) call live_timing(trim(section_title),m_steps) ! @@ -464,7 +467,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- ! - if(iHxc==3) call K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) + if(iHxc==3.and.l_bs_corr) call K_correlation_collisions(iq,i_block,qindx_ID,Xk,q) ! ! Transition Loops !------------------ @@ -521,7 +524,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) i_kmq_s =Xk%sstar(i_kmq_bz,2) i_pmq_s =Xk%sstar(i_pmq_bz,2) ! - if (BS_res_K_corr.and.iHxc==3) then + if (iHxc==3.and.l_bs_corr) then i_kmq_t=BS_blk(i_block)%kp_table(1,i_kmq) i_pmq_t=BS_blk(i_block)%kp_table(2,i_pmq) endif @@ -529,7 +532,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) i_kmq_s_m1 = sop_inv(i_kmq_s) i_kp_mq_s = sop_tab(i_kmq_s_m1,i_pmq_s) ! - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then + if (iHxc==3.and.l_bs_corr) then i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) if (i_p_bz_last/=i_p_bz.or.i_k_bz_last/=i_k_bz) then i_p_bz_last=i_p_bz @@ -569,7 +572,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ig_kmq = qindx_X(iq,i_k_bz,2) ig_pmq = qindx_X(iq,i_p_bz,2) ! - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then + if (iHxc==3.and.l_bs_corr) then i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) if (i_pmq_bz_last/=i_pmq_bz.or.i_kmq_bz_last/=i_kmq_bz) then i_pmq_bz_last=i_pmq_bz @@ -601,7 +604,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) os_p = (/i_v_p,i_pmq,i_pmq_s,i_p_sp_pol_v/) endif ! - if ((BS_res_K_corr.or.BS_cpl_K_corr).and.iHxc==3) then + if (iHxc==3.and.l_bs_corr) then ! if (iq_W_bz/=iq_W_bz_mq.or.iq_W/=iq_W_mq.or.iq_W_s/=iq_W_s_mq) call error("Wrong transferred momentum") ! @@ -733,7 +736,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - call WF_free(WF,keep_states_to_load=iHxc<3) + if (l_load_WFs) call WF_free(WF,keep_states_to_load=iHxc<3) ! enddo ! iHxc loop ! From 744f16bc70dab58044ede255328b427490462169 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Nov 2021 23:50:13 +0100 Subject: [PATCH 0056/1367] Version 5.1.0, Revision 20572, Hash 42d3e0978 MODIFIED * include/driver/version.h bse/K_kernel.F xc_functionals/Build_F_xc_mat.F xc_functionals/XC_eval_gga_potential.F xc_functionals/XC_libxc_driver.F Bugs: - [yambo] Fixed some issues with numerical noise in calculations of mangons Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- src/bse/K_kernel.F | 4 +-- src/xc_functionals/Build_F_xc_mat.F | 30 ++++++++++++++-------- src/xc_functionals/XC_eval_gga_potential.F | 2 +- src/xc_functionals/XC_libxc_driver.F | 16 ++++++++---- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9a12941cc7..9c73e083fa 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20571 -#define YAMBO_HASH "18b3e4051" +#define YAMBO_REVISION 20572 +#define YAMBO_HASH "42d3e0978" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 9c68f9e04e..33526eb3b0 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -630,7 +630,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA .and.iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') + if (BS_K_is_ALDA .and.iHxc==2) H_x=TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') ! ! Correlations if (BS_res_K_corr .and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & @@ -648,7 +648,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA .and.iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') + if (BS_K_is_ALDA .and.iHxc==2) H_x=TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') ! ! Correlations if (BS_cpl_K_corr .and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index fa9d43f85c..d7c8912375 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -84,18 +84,26 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! else ! - Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP + ! The following is in principle ok + ! In practice, due to numerical noise, it gives wrong results + ! + !Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP + !! + !do ifft=1,fft_size + ! mod_mag=abs(magn(ifft,3)) + ! if(mod_mag==0._SP) magn_inv(ifft)=0._SP + ! if(mod_mag/=0._SP) magn_inv(ifft)=1._SP/mod_mag + !enddo + !! + !F_xc_mat(:,1,2,1,2)= cZERO + !F_xc_mat(:,1,2,2,1)= F_xc(:,1,2) !2*Vxc_mag*magn_inv + !F_xc_mat(:,2,1,1,2)= F_xc(:,2,1) !2*Vxc_mag*magn_inv + !F_xc_mat(:,2,1,2,1)= cZERO ! - do ifft=1,fft_size - mod_mag=abs(magn(ifft,3)) - if(mod_mag==0._SP) magn_inv(ifft)=0._SP - if(mod_mag/=0._SP) magn_inv(ifft)=1._SP/mod_mag - enddo - ! - F_xc_mat(:,1,2,1,2)= cZERO - F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv - F_xc_mat(:,2,1,1,2)= 2*Vxc_mag*magn_inv - F_xc_mat(:,2,1,2,1)= cZERO + F_xc_mat(:,1,2,1,2)= F_xc(:,1,1) + F_xc_mat(:,1,2,2,1)= F_xc(:,1,2) + F_xc_mat(:,2,1,1,2)= F_xc(:,2,1) + F_xc_mat(:,2,1,2,1)= F_xc(:,2,2) ! endif ! diff --git a/src/xc_functionals/XC_eval_gga_potential.F b/src/xc_functionals/XC_eval_gga_potential.F index 9698746844..a878b48239 100644 --- a/src/xc_functionals/XC_eval_gga_potential.F +++ b/src/xc_functionals/XC_eval_gga_potential.F @@ -105,7 +105,7 @@ subroutine XC_eval_gga_potential(v1rho,v1sigma,drho) ! ! 2: sum up with the other partial derivative (and in case the other xc component) ! - V_xc(:,is1) = V_xc(:,is1) + real(v1rho(is1,:),SP) + Gv_drho(:) + V_xc(:,is1) = V_xc(:,is1) + real(v1rho(is1,:),SP)+ Gv_drho(:) ! enddo ! diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 887617a4e3..420c8e0ef7 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -159,7 +159,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) do i1=1,fft_size do i2=1,n_spin spin_rho_DP(i2,i1)=real(spin_rho_SP(i1,i2),DP)*real(fft_size,DP)/real(DL_vol,DP) - if (spin_rho_DP(i2,i1)<1.E-10_DP) spin_rho_DP(i2,i1)=0._DP + ! This was needed for absorption using old libxc + ! Keeping it with magnons gives numberical noise + !if (spin_rho_DP(i2,i1)<1.E-10_DP) spin_rho_DP(i2,i1)=0._DP enddo enddo ! @@ -273,11 +275,13 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - if( (.not.l_BS_magnons) .or. n_spinor==2) then + ! I could avoid this, however I need it due to numerical noise + ! See also comment in Build_F_xc_mat + !if( (.not.l_BS_magnons) .or. n_spinor==2) then call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) ! Yambo internal for Kxc call XC_eval_lda_kernel(v1rho,v2rho2) - endif + !endif end select elseif (fnctl(ixc)%family==XC_FAMILY_GGA.or.fnctl(ixc)%family==XC_FAMILY_HYB_GGA) then !GAUPBE short range x-energy and potentials part @@ -303,11 +307,13 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! Yambo internal for V_xc call XC_eval_gga_potential(v1rho,v1sigma,drho) endif - if( (.not.l_BS_magnons) .or. n_spinor==2) then + ! I could avoid this, however I need it due to numerical noise + ! See also comment in Build_F_xc_mat + !if( (.not.l_BS_magnons) .or. n_spinor==2) then call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) ! Yambo internal for Kxc call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) - endif + !endif end select end if call xc_f03_func_end(fnctl(ixc)%conf) From 9b2cfb778be6f4ec039393da126c237928038e29 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 23 Nov 2021 09:59:18 +0100 Subject: [PATCH 0057/1367] Version 5.1.0, Revision 20489, Hash f69d83d76 MODIFIED * include/driver/version.h dipoles/DIPOLE_build_covariants.F dipoles/DIPOLE_driver.F dipoles/DIPOLE_overlaps.F interface/INIT_load.F modules/mod_DIPOLES.F Additions: -Improved input for NL Changes: -DIPOLE_overlaps separated from DIPOLE_build_covariant Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_covariants.F | 12 +----------- src/dipoles/DIPOLE_driver.F | 7 +++++-- src/dipoles/DIPOLE_overlaps.F | 12 ++++++++++-- src/interface/INIT_load.F | 16 ++++++++++++---- src/modules/mod_DIPOLES.F | 1 + 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4eccf7d901..841c85295b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20475 -#define YAMBO_HASH "9b099404b" +#define YAMBO_REVISION 20489 +#define YAMBO_HASH "f69d83d76" diff --git a/src/dipoles/DIPOLE_build_covariants.F b/src/dipoles/DIPOLE_build_covariants.F index 24d28e4414..3391408c46 100644 --- a/src/dipoles/DIPOLE_build_covariants.F +++ b/src/dipoles/DIPOLE_build_covariants.F @@ -29,7 +29,7 @@ subroutine DIPOLE_build_covariants(Xen,Xk,Dip) use pars, ONLY:SP,cI,cZERO,pi use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,DIP_alloc,DIP_S,DIP_iR,DIP_v + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v use R_lattice, ONLY:bz_samp,k_map use vec_operate, ONLY:k_periodic_idx use matrix_operate, ONLY:hermitian @@ -69,16 +69,6 @@ subroutine DIPOLE_build_covariants(Xen,Xk,Dip) call parser('EvPolarization' ,l_eval_polarization) call parser('FrSndOrd' ,l_force_SndOrd) ! - if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) - if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) - ! - ! Notice that DIP_S is defined in the BZ - ! - call DIP_alloc('DIP_S',(/Dip%ib(2),Dip%ib(2),6,PAR_DIPk_nbz/)) - DIP_S=cZERO - ! - call DIPOLE_overlaps(Xk,Dip) - ! idir_not_done(:)= (k_map%max_kdir(:)==1) ! if(any(idir_not_done)) call warning(' Covariant Dipoles not in 3d. Assuming non periodic system.') diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index c16c1c4845..ddaae22275 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -45,7 +45,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp use DIPOLES, ONLY:DIP_alloc,DIPOLE_t,DIP_iR,use_covariant_approach,use_real_space_approach,& -& Vnl_commutator_warning,use_g_space_approach,& +& Vnl_commutator_warning,use_g_space_approach,use_der_k,& & use_shifted_grids_approach,DIP_P,DIP_v,DIP_S,eval_OVERLAPS,& & compute_P2_dipoles,compute_Orb_dipoles,compute_Spin_dipoles use IO_int, ONLY:IO_and_Messaging_switch @@ -108,6 +108,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) use_real_space_approach = trim(Dip%approach)=='R-space x' use_covariant_approach = trim(Dip%approach)=='Covariant' use_shifted_grids_approach = trim(Dip%approach)=='Shifted grids' + use_der_k = trim(Dip%approach)=='derk' ! compute_P2_dipoles = index(Dip%computed,"P2") /=0 compute_Spin_dipoles = index(Dip%computed,"Spin")/=0 @@ -181,7 +182,9 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! if (use_shifted_grids_approach) call DIPOLE_shifted_grids(Xen,Xk,Dip) ! - if (use_covariant_approach) call DIPOLE_build_covariants(Xen,Xk,Dip) + if (use_covariant_approach.or.use_der_k) call DIPOLE_overlaps(Xk,Dip) + ! + if (use_covariant_approach) call DIPOLE_build_covariants(Xen,Xk,Dip) ! if (use_real_space_approach) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) ! diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index b043bfd1c6..3505c34365 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -28,13 +28,13 @@ subroutine DIPOLE_overlaps(Xk,Dip) use R_lattice, ONLY:k_map,bz_samp,WF_shifts,G_m_G use wave_func, ONLY:WF use vec_operate, ONLY:k_periodic_idx - use DIPOLES, ONLY:DIPOLE_t,DIP_S + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_alloc use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & -& PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX +& PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX,PAR_DIPk_nbz use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute use interfaces, ONLY:WF_shift_kpoint,WF_symm_kpoint,eval_G_minus_G,WF_load,WF_free use timing_m, ONLY:timing @@ -59,6 +59,14 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call timing("DIPOLE_overlaps",OPR="start") ! + if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) + if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) + ! + ! Notice that DIP_S is defined in the BZ + ! + call DIP_alloc('DIP_S',(/Dip%ib(2),Dip%ib(2),6,PAR_DIPk_nbz/)) + DIP_S=cZERO + ! call k_find_smallest_g0(g0_idx,g0_length) iG0=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 3a088559d0..504397822d 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -416,7 +416,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'TwoAlpha', '[RT] C_nk ~ alpha*Gamma_nk^2 ',two_alpha,Verb_level=V_real_time) call it(defs,'GrKind', '[RT] G-ret kind: Lorentzian (QP)/ Hyperbolic QP_secant (HS)',Gr_kind,Verb_level=V_real_time) - call it(defs,'RADLifeTime','[RT] Radiative life-time',RAD_LifeTime,unit=Time_unit(1),Verb_level=V_real_time) + call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative Yambo sets it equal to Phase_LifeTime in NL)', & +& RAD_LifeTime,unit=Time_unit(1)) call it(defs,'RADmagnific','[RT] Radiative life-time magnification',RAD_magnification,Verb_level=V_real_time) call it(defs,'PhLifeTime', '[RT] Constant Dephasing Time',Phase_LifeTime,unit=Time_unit(1)) call it(defs,'DephEThresh', '[RT] Threshold on the energy difference between two states to dephase them',& @@ -532,8 +533,13 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ExtF_Int', '[NL ExtF] Field Intensity',Efield(1)%intensity,unit=I_unit ,verb_level=V_nl_optics) call it(defs,'ExtF_Width', '[NL ExtF] Field Width',Efield(1)%width,unit=Time_unit(1),verb_level=V_nl_optics) call it(defs,'ExtF_kind', '[NL ExtF] Kind(SIN|SOFTSIN|RES|ANTIRES|GAUSS|DELTA|QSSIN)',Efield(1)%ef_name) - call it(defs,'ExtF_Tstart', '[NL ExtF] Initial Time',Efield(1)%t_initial,unit=Time_unit(1), & -& verb_level=V_nl_optics) + call it(defs,'ExtF_Tstart', '[NL ExtF] Initial Time',Efield(1)%t_initial,unit=Time_unit(1)) + call it(defs,'ExtF2_Dir', '[NL ExtF] Field Versor',Efield(2)%versor) + call it(defs,'ExtF2_Int', '[NL ExtF] Field Intensity',Efield(2)%intensity,unit=I_unit) + call it(defs,'ExtF2_Freq', '[NL ExtF] Field Frequency',Efield(2)%frequency,unit=E_unit) + call it(defs,'ExtF2_Width', '[NL ExtF] Field Width',Efield(2)%width,unit=Time_unit(1)) + call it(defs,'ExtF2_kind', '[NL ExtF] Kind(SIN|SOFTSIN|RES|ANTIRES|GAUSS|DELTA|QSSIN)',Efield(2)%ef_name) + call it(defs,'ExtF2_Tstart', '[NL ExtF] Initial Time',Efield(2)%t_initial,unit=Time_unit(1)) call it(defs,'NLSampleWF', '[NL] Sample the WFs (sampling NL order)',n_order,verb_level=V_nl_optics) ! #endif @@ -541,6 +547,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _SC call it(defs,'ExtF_Dir', '[NL ExtF] Versor',Efield(1)%versor) call it(defs,'ExtF_Int', '[NL ExtF] Intensity',Efield(1)%intensity,unit=I_unit) + call it(defs,'ExtF2_Dir', '[NL ExtF] Versor',Efield(2)%versor,verb_level=V_nl_optics) + call it(defs,'ExtF2_Int', '[NL ExtF] Intensity',Efield(2)%intensity,unit=I_unit,verb_level=V_nl_optics) call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_sc) #endif ! @@ -625,7 +633,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'DipQpts', '[DIP] Qpts range for dipoles',Dip%iq,verb_level=V_resp) call it(defs,'DipoleEtresh', '[DIP] Treshold in the definition of R=P/deltaE',Dip%Energy_treshold,& & verb_level=V_resp,unit=E_unit) - call it(defs,'DipApproach', '[DIP] [G-space v/R-space x/Covariant/Shifted grids]',Dip%approach,verb_level=V_resp) + call it(defs,'DipApproach', '[DIP] [G-space v/R-space x/Covariant/Shifted grids/derk]',Dip%approach,verb_level=V_resp) call it(defs,'DipComputed', '[DIP] [default R P V; extra P2 Spin Orb]',Dip%computed,verb_level=V_resp) call it(defs,'ShiftedPaths', '[DIP] Shifted grids paths (separated by a space)',grid_paths,verb_level=V_resp) call it('f',defs,'DipPDirect', '[DIP] Directly compute also when using other approaches for dipoles',verb_level=V_resp) diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index 8a70f13a45..21aac45a48 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -33,6 +33,7 @@ module DIPOLES ! logical :: use_covariant_approach logical :: use_shifted_grids_approach + logical :: use_der_k logical :: use_g_space_approach logical :: use_real_space_approach logical :: compute_P2_dipoles From 3f7eac01bdb4a372c6b32f1d677a82f17120eebe Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 23 Nov 2021 15:11:59 +0100 Subject: [PATCH 0058/1367] Version 5.1.0, Revision 20490, Hash 9b2cfb778 MODIFIED * include/driver/version.h interface/INIT_load.F Bugs: -Error in input file Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_load.F | 14 +++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 841c85295b..71191278c6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20489 -#define YAMBO_HASH "f69d83d76" +#define YAMBO_REVISION 20490 +#define YAMBO_HASH "9b2cfb778" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 504397822d..0729e9cd6e 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -416,8 +416,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'TwoAlpha', '[RT] C_nk ~ alpha*Gamma_nk^2 ',two_alpha,Verb_level=V_real_time) call it(defs,'GrKind', '[RT] G-ret kind: Lorentzian (QP)/ Hyperbolic QP_secant (HS)',Gr_kind,Verb_level=V_real_time) - call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative Yambo sets it equal to Phase_LifeTime in NL)', & -& RAD_LifeTime,unit=Time_unit(1)) + call it(defs,'RADLifeTime','[RT] Radiative life-time',RAD_LifeTime,unit=Time_unit(1),Verb_level=V_real_time) call it(defs,'RADmagnific','[RT] Radiative life-time magnification',RAD_magnification,Verb_level=V_real_time) call it(defs,'PhLifeTime', '[RT] Constant Dephasing Time',Phase_LifeTime,unit=Time_unit(1)) call it(defs,'DephEThresh', '[RT] Threshold on the energy difference between two states to dephase them',& @@ -533,13 +532,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ExtF_Int', '[NL ExtF] Field Intensity',Efield(1)%intensity,unit=I_unit ,verb_level=V_nl_optics) call it(defs,'ExtF_Width', '[NL ExtF] Field Width',Efield(1)%width,unit=Time_unit(1),verb_level=V_nl_optics) call it(defs,'ExtF_kind', '[NL ExtF] Kind(SIN|SOFTSIN|RES|ANTIRES|GAUSS|DELTA|QSSIN)',Efield(1)%ef_name) - call it(defs,'ExtF_Tstart', '[NL ExtF] Initial Time',Efield(1)%t_initial,unit=Time_unit(1)) - call it(defs,'ExtF2_Dir', '[NL ExtF] Field Versor',Efield(2)%versor) - call it(defs,'ExtF2_Int', '[NL ExtF] Field Intensity',Efield(2)%intensity,unit=I_unit) - call it(defs,'ExtF2_Freq', '[NL ExtF] Field Frequency',Efield(2)%frequency,unit=E_unit) - call it(defs,'ExtF2_Width', '[NL ExtF] Field Width',Efield(2)%width,unit=Time_unit(1)) - call it(defs,'ExtF2_kind', '[NL ExtF] Kind(SIN|SOFTSIN|RES|ANTIRES|GAUSS|DELTA|QSSIN)',Efield(2)%ef_name) - call it(defs,'ExtF2_Tstart', '[NL ExtF] Initial Time',Efield(2)%t_initial,unit=Time_unit(1)) + call it(defs,'ExtF_Tstart', '[NL ExtF] Initial Time',Efield(1)%t_initial,unit=Time_unit(1), & +& verb_level=V_nl_optics) call it(defs,'NLSampleWF', '[NL] Sample the WFs (sampling NL order)',n_order,verb_level=V_nl_optics) ! #endif @@ -547,8 +541,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _SC call it(defs,'ExtF_Dir', '[NL ExtF] Versor',Efield(1)%versor) call it(defs,'ExtF_Int', '[NL ExtF] Intensity',Efield(1)%intensity,unit=I_unit) - call it(defs,'ExtF2_Dir', '[NL ExtF] Versor',Efield(2)%versor,verb_level=V_nl_optics) - call it(defs,'ExtF2_Int', '[NL ExtF] Intensity',Efield(2)%intensity,unit=I_unit,verb_level=V_nl_optics) call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_sc) #endif ! From b3a1e126ecaca3d7ae0669b1b84af4b0a55b4584 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 23 Nov 2021 15:17:44 +0100 Subject: [PATCH 0059/1367] Version 5.1.0, Revision 20491, Hash 3f7eac01b MODIFIED * include/driver/version.h dipoles/.objects NEW * dipoles/DIPOLE_build_derk.F Additions: -New way to do dipoles Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/dipoles/.objects | 2 +- src/dipoles/DIPOLE_build_derk.F | 81 +++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 src/dipoles/DIPOLE_build_derk.F diff --git a/include/driver/version.h b/include/driver/version.h index 71191278c6..f4cf087b3a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20490 -#define YAMBO_HASH "9b2cfb778" +#define YAMBO_REVISION 20491 +#define YAMBO_HASH "3f7eac01b" diff --git a/src/dipoles/.objects b/src/dipoles/.objects index c5efe3306c..d0e0936d2f 100644 --- a/src/dipoles/.objects +++ b/src/dipoles/.objects @@ -12,4 +12,4 @@ objs = Build_Overlaps_Det_EQ.o $(SC_objects) $(MAGN_objects) $(NL_objects) \ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_build_covariants.o DIPOLE_x_real_space.o DIPOLE_spin_magnetization.o \ DIPOLE_kb_abinit_def_dim.o DIPOLE_kb_abinit_comp.o DIPOLE_kb_sum.o DIPOLE_kb_Ylm.o DIPOLE_dimensions.o \ DIPOLE_kb_pwscf_def_dim.o DIPOLE_kb_pwscf_comp.o DIPOLE_kb_init.o DIPOLE_p_matrix_elements.o DIPOLE_overlaps.o \ - DIPOLE_transverse.o DIPOLE_shifted_grids.o DIPOLE_check_shifted_grids.o + DIPOLE_transverse.o DIPOLE_shifted_grids.o DIPOLE_check_shifted_grids.o DIPOLE_build_derk.o diff --git a/src/dipoles/DIPOLE_build_derk.F b/src/dipoles/DIPOLE_build_derk.F new file mode 100644 index 0000000000..fcbe254edf --- /dev/null +++ b/src/dipoles/DIPOLE_build_derk.F @@ -0,0 +1,81 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): MG, CA, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine DIPOLE_build_derk(Xen,Xk,Dip) + ! + ! Build the dipole as k-derivative using + ! the overlaps to contruct local rotation matrices + ! see Phys. Rev. B 76, 035213 (2007) and Phys. Rev. Research 2, 013357 (2020) + ! + use pars, ONLY:SP,cI,cZERO,pi + use LIVE_t, ONLY:live_timing + use electrons, ONLY:levels,n_sp_pol + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v + use R_lattice, ONLY:bz_samp,k_map + use vec_operate, ONLY:k_periodic_idx + use matrix_operate, ONLY:hermitian + use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& +& PAR_DIPk_nbz,PAR_IND_CON_BANDS_DIP, PAR_IND_VAL_BANDS_DIP + use com, ONLY:msg + use D_lattice, ONLY:a + use parser_m, ONLY:parser + use timing_m, ONLY:timing + + ! + implicit none + ! + type(levels), intent(in) :: Xen + type(bz_samp), intent(inout) :: Xk + type(DIPOLE_t), intent(inout) :: Dip + ! + ! Work Space + ! + logical :: idir_not_done(3) + logical :: l_eval_polarization,l_force_SndOrd + integer :: ik,iv,ic,ic_min,iv_max,i_sp_pol,ikm1,id_red,idir,idx(3),ikbz,ik_mem + integer :: istep,max_step + ! + call timing("DIPOLE_buil_derk",OPR="start") + ! + if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. + ! + idir_not_done(:)= (k_map%max_kdir(:)==1) + ! + if(any(idir_not_done)) call warning(' Der-k Dipoles not in 3d. Assuming non periodic system.') + ! + if(any(k_map%max_kdir(:)>=6.and..not.l_force_SndOrd)) & + & call msg('rs','Using forth order approximation for der-k dipoles') + ! + call live_timing('Der-k Dipoles',PAR_IND_DIPk_ibz%n_of_elements(PAR_IND_DIPk_ibz_ID+1)*n_sp_pol) + ! + ! Notice that DIP_iR/DIP_v are defined only in the IBZ + ! while the overlaps are in the BZ + ! + call live_timing() + ! + if(any(idir_not_done)) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) + ! + call timing("DIPOLE_buil_derk",OPR="stop") + return + ! +end subroutine DIPOLE_build_derk From 94d4022feb58e6517b1b91db11adb4381ac4030b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 23 Nov 2021 17:00:10 +0100 Subject: [PATCH 0060/1367] Version 5.1.0, Revision 20492, Hash b3a1e126e MODIFIED * include/driver/version.h dipoles/DIPOLE_build_derk.F linear_algebra/.objects linear_algebra/LINEAR_ALGEBRA_driver.F RENAMED * linear_algebra/SERIAL_SVD_inversion.F -> linear_algebra/SERIAL_SVD.F Additions: -Added the possibility to generate unitary matrices from SVD Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/dipoles/DIPOLE_build_derk.F | 21 +++++++-- src/linear_algebra/.objects | 2 +- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 4 +- .../{SERIAL_SVD_inversion.F => SERIAL_SVD.F} | 44 ++++++++++++------- 5 files changed, 51 insertions(+), 24 deletions(-) rename src/linear_algebra/{SERIAL_SVD_inversion.F => SERIAL_SVD.F} (72%) diff --git a/include/driver/version.h b/include/driver/version.h index f4cf087b3a..9966e75489 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20491 -#define YAMBO_HASH "3f7eac01b" +#define YAMBO_REVISION 20492 +#define YAMBO_HASH "b3a1e126e" diff --git a/src/dipoles/DIPOLE_build_derk.F b/src/dipoles/DIPOLE_build_derk.F index fcbe254edf..af6b7c41b2 100644 --- a/src/dipoles/DIPOLE_build_derk.F +++ b/src/dipoles/DIPOLE_build_derk.F @@ -35,7 +35,8 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) use vec_operate, ONLY:k_periodic_idx use matrix_operate, ONLY:hermitian use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& -& PAR_DIPk_nbz,PAR_IND_CON_BANDS_DIP, PAR_IND_VAL_BANDS_DIP +& PAR_DIPk_nbz,PAR_IND_CON_BANDS_DIP, PAR_IND_VAL_BANDS_DIP, & +& PAR_IND_DIPk_bz,PAR_DIPk_bz_index,PAR_IND_DIPk_bz_ID use com, ONLY:msg use D_lattice, ONLY:a use parser_m, ONLY:parser @@ -66,13 +67,27 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) if(any(k_map%max_kdir(:)>=6.and..not.l_force_SndOrd)) & & call msg('rs','Using forth order approximation for der-k dipoles') ! - call live_timing('Der-k Dipoles',PAR_IND_DIPk_ibz%n_of_elements(PAR_IND_DIPk_ibz_ID+1)*n_sp_pol) - ! ! Notice that DIP_iR/DIP_v are defined only in the IBZ ! while the overlaps are in the BZ ! + call live_timing("Build Rotation Matrices:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) + ! + do i_sp_pol=1,n_sp_pol + ! + do ikbz=1,Xk%nbz + ! + if(.not.PAR_IND_DIPk_bz%element_1D(ikbz)) cycle + ! + call live_timing(steps=1) + ! + enddo ! BZ loop + ! + enddo ! i_sp_pol + ! call live_timing() ! + ! Build non-periodic directions if necessary + ! if(any(idir_not_done)) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) ! call timing("DIPOLE_buil_derk",OPR="stop") diff --git a/src/linear_algebra/.objects b/src/linear_algebra/.objects index cf2ad4a03c..8712b0340e 100644 --- a/src/linear_algebra/.objects +++ b/src/linear_algebra/.objects @@ -6,5 +6,5 @@ SLK_objs = SLK_test.o SLK_ORTHO_group.o SLK_ORTHO_init.o SLK_setup.o PARALLEL_in #if defined _SLEPC && !defined _NL SLEPC_objs = MATRIX_slepc.o #endif -objs = LINEAR_ALGEBRA_driver.o SERIAL_SVD_inversion.o SERIAL_inversion.o SERIAL_diagonalization.o \ +objs = LINEAR_ALGEBRA_driver.o SERIAL_SVD.o SERIAL_inversion.o SERIAL_diagonalization.o \ SERIAL_HERMITIAN_diagonalization.o SERIAL_lin_system.o $(SLK_objs) $(SLEPC_objs) diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index 2eaf5ebc14..226bfb9baf 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -217,9 +217,9 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& ! if (idriver==SVD_INV) then if (present(M_slk)) then - call SERIAL_SVD_inversion(N,M_slk%blc(:,:,M_slk%I),SVD_digits) + call SERIAL_SVD(N,M_slk%blc(:,:,M_slk%I),'inv',SVD_digits) else - call SERIAL_SVD_inversion(N,M,SVD_digits) + call SERIAL_SVD(N,M,'inv',SVD_digits) endif endif ! diff --git a/src/linear_algebra/SERIAL_SVD_inversion.F b/src/linear_algebra/SERIAL_SVD.F similarity index 72% rename from src/linear_algebra/SERIAL_SVD_inversion.F rename to src/linear_algebra/SERIAL_SVD.F index 33af6a266d..064c7c4006 100644 --- a/src/linear_algebra/SERIAL_SVD_inversion.F +++ b/src/linear_algebra/SERIAL_SVD.F @@ -21,25 +21,26 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine SERIAL_SVD_inversion(n,M,SVD_digits) +subroutine SERIAL_SVD(n,M,mode,SVD_digits) ! - use pars, ONLY:SP,cZERO + use pars, ONLY:SP,cZERO,cONE use wrapper, ONLY:M_by_M use linear_algebra, ONLY:LINEAR_ALGEBRA_error,SV_decomposition,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing #include ! - integer :: n - complex(SP) :: M(n,n) - integer :: SVD_digits + integer, intent(in) :: n + complex(SP), intent(inout) :: M(n,n) + integer, intent(in) :: SVD_digits + character(3),intent(in) :: mode ! !ws integer :: i_loop real(SP) :: SV_min type(LALGEBRA_WS) :: WS ! - call timing('SERIAL_SVD_inversion',OPR='start') + call timing('SERIAL_SVD',OPR='start') ! YAMBO_ALLOC(WS%v_real,(5*n)) YAMBO_ALLOC(WS%vp_real,(n)) @@ -58,20 +59,31 @@ subroutine SERIAL_SVD_inversion(n,M,SVD_digits) ! if(WS%i_fail/=0) call LINEAR_ALGEBRA_error('GESVD (SVD)','failed') ! - SV_min=10._SP**(-SVD_digits) - ! - do i_loop=1,n - if (abs(WS%vp_real(i_loop)) Date: Tue, 23 Nov 2021 17:11:27 +0100 Subject: [PATCH 0061/1367] Version 5.1.0, Revision 20493, Hash 94d4022fe MODIFIED * include/driver/version.h dipoles/DIPOLE_build_derk.F modules/mod_DIPOLES.F Additions: -Work in progress Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_derk.F | 24 +++++++++++++++++++++--- src/modules/mod_DIPOLES.F | 8 ++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9966e75489..ee84089b14 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20492 -#define YAMBO_HASH "b3a1e126e" +#define YAMBO_REVISION 20493 +#define YAMBO_HASH "94d4022fe" diff --git a/src/dipoles/DIPOLE_build_derk.F b/src/dipoles/DIPOLE_build_derk.F index af6b7c41b2..7ee1db6a73 100644 --- a/src/dipoles/DIPOLE_build_derk.F +++ b/src/dipoles/DIPOLE_build_derk.F @@ -30,7 +30,7 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) use pars, ONLY:SP,cI,cZERO,pi use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,DIP_U,DIP_alloc use R_lattice, ONLY:bz_samp,k_map use vec_operate, ONLY:k_periodic_idx use matrix_operate, ONLY:hermitian @@ -52,8 +52,7 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) ! Work Space ! logical :: idir_not_done(3) - logical :: l_eval_polarization,l_force_SndOrd - integer :: ik,iv,ic,ic_min,iv_max,i_sp_pol,ikm1,id_red,idir,idx(3),ikbz,ik_mem + integer :: ikbz,i_sp_pol,id integer :: istep,max_step ! call timing("DIPOLE_buil_derk",OPR="start") @@ -72,16 +71,35 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) ! call live_timing("Build Rotation Matrices:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) ! + call DIP_alloc('DIP_U',(/Dip%ib(2),Dip%ib(2),6,PAR_DIPk_nbz/)) + DIP_U=DIP_S + call DIP_free('DIP_S') + ! do i_sp_pol=1,n_sp_pol ! do ikbz=1,Xk%nbz ! if(.not.PAR_IND_DIPk_bz%element_1D(ikbz)) cycle ! + do id=1,3 ! Loop on the three crystal directions in the BZ + ! + if(k_map%max_kdir(id)==1) cycle ! Non-periodic direction, skip calculation + ! + max_step=1 ! Only the first neighbor + if(k_map%max_kdir(id)>=6) max_step=2 ! First and second neighbors + ! + do istep=1,max_step + call SERIAL_SVD(Dip%ib(2),DIP_U(:,:,id+(istep-1)*3,ikbz,i_sp_pol),'uni',0) + enddo + ! + enddo + ! call live_timing(steps=1) ! enddo ! BZ loop ! + call PP_redux_wait(DIP_S(:,:,:,:,i_sp_pol),COMM=PAR_COM_DIPk_ibz_INDEX%COMM) + ! enddo ! i_sp_pol ! call live_timing() diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index 21aac45a48..4fd1a16d5d 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -56,6 +56,7 @@ module DIPOLES complex(SP), allocatable :: DIP_P(:,:,:,:,:) complex(SP), allocatable :: DIP_v(:,:,:,:,:) complex(SP), allocatable :: DIP_S(:,:,:,:,:) + complex(SP), allocatable :: DIP_U(:,:,:,:,:) complex(SP), allocatable :: DIP_orbital(:,:,:,:,:,:) complex(SP), allocatable :: DIP_spin(:,:,:,:,:) complex(SP), allocatable :: DIP_P_spinor(:,:,:,:,:,:) @@ -113,6 +114,10 @@ subroutine DIP_alloc(what,d) if (allocated(DIP_S)) return YAMBO_ALLOC(DIP_S,(d(1),d(2),d(3),d(4),n_sp_pol)) DIP_S=cZERO + case('DIP_U') + if (allocated(DIP_U)) return + YAMBO_ALLOC(DIP_U,(d(1),d(2),d(3),d(4),n_sp_pol)) + DIP_U=cZERO case('DIP_orbital') if (allocated(DIP_orbital)) return YAMBO_ALLOC(DIP_orbital,(d(1),d(2):d(3),d(4):d(5),d(6),n_sp_pol,d(7))) @@ -144,6 +149,9 @@ subroutine DIP_alloc(what,d) case('DIP_S') if (.not.allocated(DIP_S)) return YAMBO_FREE(DIP_S) + case('DIP_U') + if (.not.allocated(DIP_U)) return + YAMBO_FREE(DIP_U) case('DIP_orbital') if (.not.allocated(DIP_orbital)) return YAMBO_FREE(DIP_orbital) From fce7a116d3b07d9bb986fa46371f18c355fae180 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Nov 2021 10:22:09 +0100 Subject: [PATCH 0062/1367] Version 5.1.0, Revision 20494, Hash d9ca232fe MODIFIED * include/driver/version.h dipoles/.objects dipoles/DIPOLE_build_covariants.F dipoles/DIPOLE_driver.F modules/mod_DIPOLES.F RENAMED * dipoles/DIPOLE_build_derk.F -> dipoles/DIPOLE_build_der_k.F Additions: -Reorganization der-k dipoles Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/dipoles/.objects | 2 +- src/dipoles/DIPOLE_build_covariants.F | 5 ++-- ...POLE_build_derk.F => DIPOLE_build_der_k.F} | 27 ++++++++++--------- src/dipoles/DIPOLE_driver.F | 12 ++++++--- src/modules/mod_DIPOLES.F | 9 +------ 6 files changed, 29 insertions(+), 30 deletions(-) rename src/dipoles/{DIPOLE_build_derk.F => DIPOLE_build_der_k.F} (85%) diff --git a/include/driver/version.h b/include/driver/version.h index ee84089b14..76c5df77df 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20493 -#define YAMBO_HASH "94d4022fe" +#define YAMBO_REVISION 20494 +#define YAMBO_HASH "d9ca232fe" diff --git a/src/dipoles/.objects b/src/dipoles/.objects index d0e0936d2f..9cd50e7ca0 100644 --- a/src/dipoles/.objects +++ b/src/dipoles/.objects @@ -12,4 +12,4 @@ objs = Build_Overlaps_Det_EQ.o $(SC_objects) $(MAGN_objects) $(NL_objects) \ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_build_covariants.o DIPOLE_x_real_space.o DIPOLE_spin_magnetization.o \ DIPOLE_kb_abinit_def_dim.o DIPOLE_kb_abinit_comp.o DIPOLE_kb_sum.o DIPOLE_kb_Ylm.o DIPOLE_dimensions.o \ DIPOLE_kb_pwscf_def_dim.o DIPOLE_kb_pwscf_comp.o DIPOLE_kb_init.o DIPOLE_p_matrix_elements.o DIPOLE_overlaps.o \ - DIPOLE_transverse.o DIPOLE_shifted_grids.o DIPOLE_check_shifted_grids.o DIPOLE_build_derk.o + DIPOLE_transverse.o DIPOLE_shifted_grids.o DIPOLE_check_shifted_grids.o DIPOLE_build_der_k.o diff --git a/src/dipoles/DIPOLE_build_covariants.F b/src/dipoles/DIPOLE_build_covariants.F index 3391408c46..edf874d24e 100644 --- a/src/dipoles/DIPOLE_build_covariants.F +++ b/src/dipoles/DIPOLE_build_covariants.F @@ -29,7 +29,7 @@ subroutine DIPOLE_build_covariants(Xen,Xk,Dip) use pars, ONLY:SP,cI,cZERO,pi use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,l_force_SndOrd use R_lattice, ONLY:bz_samp,k_map use vec_operate, ONLY:k_periodic_idx use matrix_operate, ONLY:hermitian @@ -50,7 +50,7 @@ subroutine DIPOLE_build_covariants(Xen,Xk,Dip) ! Work Space ! logical :: idir_not_done(3) - logical :: l_eval_polarization,l_force_SndOrd + logical :: l_eval_polarization integer :: ik,iv,ic,ic_min,iv_max,i_sp_pol,ikm1,id_red,idir,idx(3),ikbz,ik_mem integer :: istep,max_step real(SP) :: Ev_m_Ec_KS @@ -67,7 +67,6 @@ subroutine DIPOLE_build_covariants(Xen,Xk,Dip) if (any(Xen%nbf/=Xen%nbm)) call error(' Covariant dipoles not implemented for metals') ! call parser('EvPolarization' ,l_eval_polarization) - call parser('FrSndOrd' ,l_force_SndOrd) ! idir_not_done(:)= (k_map%max_kdir(:)==1) ! diff --git a/src/dipoles/DIPOLE_build_derk.F b/src/dipoles/DIPOLE_build_der_k.F similarity index 85% rename from src/dipoles/DIPOLE_build_derk.F rename to src/dipoles/DIPOLE_build_der_k.F index 7ee1db6a73..ccab8a5ba8 100644 --- a/src/dipoles/DIPOLE_build_derk.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine DIPOLE_build_derk(Xen,Xk,Dip) +subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! ! Build the dipole as k-derivative using ! the overlaps to contruct local rotation matrices @@ -30,21 +30,21 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) use pars, ONLY:SP,cI,cZERO,pi use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,DIP_U,DIP_alloc + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,DIP_alloc,l_force_SndOrd use R_lattice, ONLY:bz_samp,k_map use vec_operate, ONLY:k_periodic_idx use matrix_operate, ONLY:hermitian use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& & PAR_DIPk_nbz,PAR_IND_CON_BANDS_DIP, PAR_IND_VAL_BANDS_DIP, & -& PAR_IND_DIPk_bz,PAR_DIPk_bz_index,PAR_IND_DIPk_bz_ID +& PAR_IND_DIPk_bz,PAR_DIPk_bz_index,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_INDEX + use parallel_int, ONLY:PP_redux_wait use com, ONLY:msg use D_lattice, ONLY:a use parser_m, ONLY:parser use timing_m, ONLY:timing - - ! - implicit none ! +#include + type(levels), intent(in) :: Xen type(bz_samp), intent(inout) :: Xk type(DIPOLE_t), intent(inout) :: Dip @@ -54,6 +54,7 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) logical :: idir_not_done(3) integer :: ikbz,i_sp_pol,id integer :: istep,max_step + complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:) ! call timing("DIPOLE_buil_derk",OPR="start") ! @@ -71,9 +72,8 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) ! call live_timing("Build Rotation Matrices:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) ! - call DIP_alloc('DIP_U',(/Dip%ib(2),Dip%ib(2),6,PAR_DIPk_nbz/)) - DIP_U=DIP_S - call DIP_free('DIP_S') + YAMBO_ALLOC(U_l,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),2)) ! do i_sp_pol=1,n_sp_pol ! @@ -86,10 +86,10 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) if(k_map%max_kdir(id)==1) cycle ! Non-periodic direction, skip calculation ! max_step=1 ! Only the first neighbor - if(k_map%max_kdir(id)>=6) max_step=2 ! First and second neighbors + if(k_map%max_kdir(id)>=6.and..not.l_force_SndOrd) max_step=2 ! do istep=1,max_step - call SERIAL_SVD(Dip%ib(2),DIP_U(:,:,id+(istep-1)*3,ikbz,i_sp_pol),'uni',0) +! call SERIAL_SVD(Dip%ib(2),DIP_U(:,:,id+(istep-1)*3,ikbz,i_sp_pol),'uni',0) enddo ! enddo @@ -104,6 +104,9 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) ! call live_timing() ! + YAMBO_FREE(U_l) + YAMBO_FREE(U_r) + ! ! Build non-periodic directions if necessary ! if(any(idir_not_done)) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) @@ -111,4 +114,4 @@ subroutine DIPOLE_build_derk(Xen,Xk,Dip) call timing("DIPOLE_buil_derk",OPR="stop") return ! -end subroutine DIPOLE_build_derk +end subroutine DIPOLE_build_der_k diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index ddaae22275..fe81a66e60 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -45,7 +45,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp use DIPOLES, ONLY:DIP_alloc,DIPOLE_t,DIP_iR,use_covariant_approach,use_real_space_approach,& -& Vnl_commutator_warning,use_g_space_approach,use_der_k,& +& Vnl_commutator_warning,use_g_space_approach,use_der_k,l_force_SndOrd,& & use_shifted_grids_approach,DIP_P,DIP_v,DIP_S,eval_OVERLAPS,& & compute_P2_dipoles,compute_Orb_dipoles,compute_Spin_dipoles use IO_int, ONLY:IO_and_Messaging_switch @@ -130,6 +130,8 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) endif ! call parser('PDirect' ,Dip%force_v_g_space) + call parser('FrSndOrd' ,l_force_SndOrd) ! force second order numerical derivatives for testing purposes + ! #if defined _SC || defined _RT || defined _NL Dip%force_v_g_space=Dip%force_v_g_space.or.l_sc_run.or.l_real_time.or.l_nl_optics #endif @@ -143,7 +145,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) if (compute_Spin_dipoles) Dip%computed=trim(Dip%computed)//' Spin' if (compute_Orb_dipoles) Dip%computed=trim(Dip%computed)//' Orb' ! - if (use_covariant_approach) eval_OVERLAPS=.true. + if (use_covariant_approach.or.use_der_k) eval_OVERLAPS=.true. ! ! Dipole dimensions to be fixed ! @@ -182,9 +184,11 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! if (use_shifted_grids_approach) call DIPOLE_shifted_grids(Xen,Xk,Dip) ! - if (use_covariant_approach.or.use_der_k) call DIPOLE_overlaps(Xk,Dip) + if (eval_OVERLAPS) call DIPOLE_overlaps(Xk,Dip) + ! + if (use_covariant_approach) call DIPOLE_build_covariants(Xen,Xk,Dip) ! - if (use_covariant_approach) call DIPOLE_build_covariants(Xen,Xk,Dip) + if (use_der_k) call DIPOLE_build_der_k(Xen,Xk,Dip) ! if (use_real_space_approach) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) ! diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index 4fd1a16d5d..61d4842813 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -45,6 +45,7 @@ module DIPOLES ! integer :: num_shifted_grids logical :: eval_OVERLAPS + logical :: l_force_SndOrd ! ! Descriptor ! @@ -56,7 +57,6 @@ module DIPOLES complex(SP), allocatable :: DIP_P(:,:,:,:,:) complex(SP), allocatable :: DIP_v(:,:,:,:,:) complex(SP), allocatable :: DIP_S(:,:,:,:,:) - complex(SP), allocatable :: DIP_U(:,:,:,:,:) complex(SP), allocatable :: DIP_orbital(:,:,:,:,:,:) complex(SP), allocatable :: DIP_spin(:,:,:,:,:) complex(SP), allocatable :: DIP_P_spinor(:,:,:,:,:,:) @@ -114,10 +114,6 @@ subroutine DIP_alloc(what,d) if (allocated(DIP_S)) return YAMBO_ALLOC(DIP_S,(d(1),d(2),d(3),d(4),n_sp_pol)) DIP_S=cZERO - case('DIP_U') - if (allocated(DIP_U)) return - YAMBO_ALLOC(DIP_U,(d(1),d(2),d(3),d(4),n_sp_pol)) - DIP_U=cZERO case('DIP_orbital') if (allocated(DIP_orbital)) return YAMBO_ALLOC(DIP_orbital,(d(1),d(2):d(3),d(4):d(5),d(6),n_sp_pol,d(7))) @@ -149,9 +145,6 @@ subroutine DIP_alloc(what,d) case('DIP_S') if (.not.allocated(DIP_S)) return YAMBO_FREE(DIP_S) - case('DIP_U') - if (.not.allocated(DIP_U)) return - YAMBO_FREE(DIP_U) case('DIP_orbital') if (.not.allocated(DIP_orbital)) return YAMBO_FREE(DIP_orbital) From 05a2b7adb1615bded1d7907cb6490c071139faad Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Nov 2021 23:10:17 +0100 Subject: [PATCH 0063/1367] Version 5.1.0, Revision 20495, Hash fce7a116d MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F Bugs: -The code compiles Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/dipoles/DIPOLE_build_der_k.F | 85 +++++++++++++++++++++++++++----- 2 files changed, 75 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 76c5df77df..39b59b9a17 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20494 -#define YAMBO_HASH "d9ca232fe" +#define YAMBO_REVISION 20495 +#define YAMBO_HASH "fce7a116d" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index ccab8a5ba8..279464f003 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -52,9 +52,9 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! Work Space ! logical :: idir_not_done(3) - integer :: ikbz,i_sp_pol,id - integer :: istep,max_step - complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:) + integer :: ik,i_sp_pol,id_red,idx(3),idir,ic,ik_mem,ikbz,iv + integer :: istep,max_step,ikm1 + complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:) ! call timing("DIPOLE_buil_derk",OPR="start") ! @@ -74,31 +74,90 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! YAMBO_ALLOC(U_l,(Dip%ib(2),Dip%ib(2),2)) YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) + ! + U_l =cZERO + U_r =cZERO + Der_k_cart=cZERO + Der_k_red =cZERO ! do i_sp_pol=1,n_sp_pol ! - do ikbz=1,Xk%nbz + do ik=1,Xk%nibz + ! + if (.not.PAR_IND_DIPk_ibz%element_1D(ik)) cycle ! - if(.not.PAR_IND_DIPk_bz%element_1D(ikbz)) cycle + ik_mem=PAR_DIPk_ibz_index(ik) ! - do id=1,3 ! Loop on the three crystal directions in the BZ + ikbz=Xk%k_table(ik,1) + ! + do id_red=1,3 ! Loop on the three crystal directions in the BZ ! - if(k_map%max_kdir(id)==1) cycle ! Non-periodic direction, skip calculation + if(k_map%max_kdir(id_red)==1) cycle ! Non-periodic direction, skip calculation ! max_step=1 ! Only the first neighbor - if(k_map%max_kdir(id)>=6.and..not.l_force_SndOrd) max_step=2 + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 ! do istep=1,max_step -! call SERIAL_SVD(Dip%ib(2),DIP_U(:,:,id+(istep-1)*3,ikbz,i_sp_pol),'uni',0) + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)-istep + idx=k_periodic_idx(idx,k_map) + ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + U_r(:,:,istep)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) + U_l(:,:,istep)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) + ! + call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) + call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) + ! + Der_k_red(:,:,istep)=matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep)))- & +& -matmul(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) + Der_k_red(:,:,istep)=cI*Der_k_red(:,:,istep)*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + ! enddo ! + ! Transform in cartesian coordinates + ! + if(max_step==1) then + ! + ! First order formula D(dk) + ! Eq. 96 of PRB 63, 155107(2001) + ! + do idir=1,3 + enddo + Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(Der_k_red(:,:,1))*a(id_red,idir) + ! + else + ! + ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 + ! Eq. 97 of PRB 63, 155107(2001) + ! + do idir=1,3 + Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(4._SP*Der_k_red(:,:,1)-Der_k_red(:,:,2))/3._SP*a(id_red,idir) + enddo + ! + endif + ! + enddo ! id_red loop on crystal directions + ! + !====== + ! + !====== + do iv=Dip%ib(1),Dip%ib_lim(1) + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv)) cycle + do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) + if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle + do idir=1,3 + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(Der_k_cart(ic,iv,idir)+conjg(Der_k_cart(iv,ic,idir)))/cI + enddo + enddo enddo ! call live_timing(steps=1) ! - enddo ! BZ loop - ! - call PP_redux_wait(DIP_S(:,:,:,:,i_sp_pol),COMM=PAR_COM_DIPk_ibz_INDEX%COMM) + enddo ! ik iiBZ loop ! enddo ! i_sp_pol ! @@ -106,6 +165,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! YAMBO_FREE(U_l) YAMBO_FREE(U_r) + YAMBO_FREE(Der_k_red) + YAMBO_FREE(Der_k_cart) ! ! Build non-periodic directions if necessary ! From 1fd4aa0458abdee630d9799044b50c525145ee52 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 25 Nov 2021 14:26:27 +0100 Subject: [PATCH 0064/1367] Version 5.1.0, Revision 20496, Hash 05a2b7adb MODIFIED * include/driver/version.h io/io_ELPH.F modules/mod_ELPH.F ypp/el-ph/ELPH_databases.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Additions: -Added possibility to skip DW terms Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/io/io_ELPH.F | 21 ++++++++++++++++----- src/modules/mod_ELPH.F | 1 + ypp/el-ph/ELPH_databases.F | 7 ++++++- ypp/interface/INIT_load_ypp.F | 1 + ypp/interface/INIT_ypp.F | 2 +- 6 files changed, 27 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 39b59b9a17..6f37359840 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20495 -#define YAMBO_HASH "fce7a116d" +#define YAMBO_REVISION 20496 +#define YAMBO_HASH "05a2b7adb" diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index 111e574f71..b96a694b5b 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -30,7 +30,7 @@ integer function io_ELPH(ID,what) & io_variable_elemental,io_bulk,io_header,def_variable_elemental use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,elph_nk_bz,ELPH_desc,& & QP_PH_n_G_bands,PH_W_debye,elph_nQ,PH_kpt_bz,l_GKKP_hosts_bare_dV,& -& elph_use_q_grid,PH_qpt,elph_nQ_used,GKKP,GKKP_bare,& +& elph_use_q_grid,PH_qpt,elph_nQ_used,GKKP,GKKP_bare,l_GKKP_DW,& & gsqF_fan,gsqF_dw ,gsqF_ca_corr ,gsqF_life_bose ,gsqF_life_f,& & PH_pol_vector,elph_Ham_bands,elph_branches,GKKP,elph_grids_are_expanded use stderr, ONLY:intc @@ -96,6 +96,7 @@ integer function io_ELPH(ID,what) ! if (.not.ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",6,SP,0) if ( ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",7,SP,0) + if ( ver_is_gt_or_eq(ID,revision=20495)) call def_variable_elemental(ID,"PARS",8,SP,0) call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Q points",I0=elph_nQ,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[avail]",DESCRIPTOR=ELPH_desc) @@ -108,6 +109,12 @@ integer function io_ELPH(ID,what) call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) endif + if (ver_is_gt_or_eq(ID,revision=20495)) then + call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller interaction",L0=l_GKKP_DW, & +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + else + l_GKKP_DW=.TRUE. + endif if (l_gFsq) then call def_variable_elemental(ID,"QP_nb_nk_n_states",3,SP,0) call io_variable_elemental(ID,I0=QP_nb) @@ -241,10 +248,14 @@ integer function io_ELPH(ID,what) ! endif ! - ! ELPH_DW - ! - call io_bulk(ID_frag,VAR="ELPH_DW_Q"//trim(intc(iq)),VAR_SZ=(/ph_modes,elph_nb,elph_nb,nkbz/)) - call io_bulk(ID_frag,R4=GKKP%dVr(:,:,:,:,1)) + if(l_GKKP_DW) then + ! + ! ELPH_DW + ! + call io_bulk(ID_frag,VAR="ELPH_DW_Q"//trim(intc(iq)),VAR_SZ=(/ph_modes,elph_nb,elph_nb,nkbz/)) + call io_bulk(ID_frag,R4=GKKP%dVr(:,:,:,:,1)) + ! + endif ! 1 call io_fragment_disconnect(ID,ID_frag) ! diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 44ad4807f4..4d20d817f8 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -130,6 +130,7 @@ module ELPH logical :: l_GKKP_hosts_bare_dV=.FALSE. logical :: l_GKKP_DB_exists=.FALSE. logical :: l_GKKP_expanded_DB_exists=.FALSE. + logical :: l_GKKP_DW=.TRUE. character(schlen) :: gkkp_db ! Database type for el-ph calculation (gkkp | expanded | genFroh ) ! contains diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index f19509f9f6..196f822ac9 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -28,7 +28,7 @@ subroutine ELPH_databases(k,E,q) use stderr, ONLY:intc use electrons, ONLY:levels use interfaces, ONLY:ELPH_alloc - use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,& + use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,l_GKKP_DW,& & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,l_GKKP_hosts_bare_dV use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab @@ -55,6 +55,7 @@ subroutine ELPH_databases(k,E,q) character(schlen) ::what integer, external ::ELPH_databases_IO_elemental,io_ELPH,io_QINDX,qindx_B_init logical, external ::file_exists + logical ::l_no_store_dw real(SP) ::v(3) type(GKKP_me) ::GKKP_save,GKKP_bare_save ! @@ -64,8 +65,11 @@ subroutine ELPH_databases(k,E,q) !================= call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) call parser('GkkpExpand',l_gkkp_expand) + call parser('GkkpNoDW',l_no_store_dw) call parser('UseQindxB',l_use_qindxB) ! + if(l_no_store_dw) l_GKKP_DW=.FALSE. + ! if(l_gkkp_expand) then ! ! Setup parallelization to load qindx_B @@ -222,6 +226,7 @@ subroutine ELPH_databases(k,E,q) call msg('s',':: Branches :',DB_ph_modes) call msg('s',':: Uniform sampling :',elph_use_q_grid) call msg('s',':: Symmetry expanded :',l_gkkp_expand) + call msg('s',':: El-Ph contains DW :',l_GKKP_DW) if(l_gkkp_expand) call msg('s',':: Use qindx_B to expand gkkp :',l_use_qindxB) call msg('s',':: Debye Energy :',PH_W_debye*HA2EV*1000.,"[meV]") ! diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index d314eecd15..abd3841ff6 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -308,6 +308,7 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'TestPHDGrid','Test double-grid: set all values of the fine grid equal to the couse ones') call it('f',defs,'GkkpReadBare','Read the bare gkkp') call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') + call it('f',defs,'GkkpNoDW','Do not store the DW part (for testing purposes)') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') ! #endif diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 151171085f..1a3a05214f 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -706,7 +706,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) endif ! #if defined _YPP_ELPH - if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand UseQindxB") + if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpNoDW UseQindxB") if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") if (l_gkkp_plot) call initactivate(1,"Degen_Step cooOut") From 28c429d71424201e8864c6c23f817bdfab77058d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 25 Nov 2021 14:27:33 +0100 Subject: [PATCH 0065/1367] Version 5.1.0, Revision 20497, Hash 1fd4aa045 MODIFIED * include/driver/version.h el-ph/ELPH_GreenF.F Additions: -Possibility to skip DW term Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/ELPH_GreenF.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6f37359840..bb0d7f346e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20496 -#define YAMBO_HASH "05a2b7adb" +#define YAMBO_REVISION 20497 +#define YAMBO_HASH "1fd4aa045" diff --git a/src/el-ph/ELPH_GreenF.F b/src/el-ph/ELPH_GreenF.F index f4a0a87f9e..009fee654c 100644 --- a/src/el-ph/ELPH_GreenF.F +++ b/src/el-ph/ELPH_GreenF.F @@ -46,7 +46,7 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ use ELPH, ONLY:gsqF_fan,gsqF_dw,gsqF_ca_corr,gsqF_life_bose,gsqF_life_f,GKKP,& & gsqF_energy_steps,gsqF_dw,eval_G_using_KK,elph_use_q_grid,PH_freqs,& & FAN_deltaE_treshold,DW_deltaE_treshold,PH_freqs_sq,use_PH_DbGd, & -& elph_grids_are_expanded +& elph_grids_are_expanded,l_GKKP_DW use QP_m, ONLY:QP_table,QP_time_order_sign use R_lattice, ONLY:bz_samp use functions, ONLY:Fermi_fnc_derivative @@ -173,7 +173,7 @@ subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_ delta_E_at_gamma=GKKP%E_kpq(1)%E(ib,ik_bz,1) -GKKP%E_kpq(1)%E(ob,ik_bz,1) endif ! - eval_DW=(.not.abs(delta_E_at_gamma) Date: Thu, 25 Nov 2021 15:17:48 +0100 Subject: [PATCH 0066/1367] Version 5.1.0, Revision 20498, Hash 28c429d71 MODIFIED * include/driver/version.h dipoles/DIPOLE_driver.F Bugs: -Fixed derk flag in dipoles Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_driver.F | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index bb0d7f346e..b0dc1f64c3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20497 -#define YAMBO_HASH "1fd4aa045" +#define YAMBO_REVISION 20498 +#define YAMBO_HASH "28c429d71" diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index fe81a66e60..dba4da4b20 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -123,7 +123,8 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) #endif compute_Spin_dipoles = compute_Spin_dipoles .or. (l_BS_magnons .and. n_spin>1) ! - if(.not.any((/use_g_space_approach,use_real_space_approach,use_covariant_approach,use_shifted_grids_approach/))) then + if(.not.any((/use_g_space_approach,use_real_space_approach, & +& use_der_k,use_covariant_approach,use_shifted_grids_approach/))) then call warning(' Dipoles approach defined in input not recognised. Reverting to G-space v') use_g_space_approach = .true. Dip%approach='G-space v' From d866ef6b418722b5f6750c089364a7415bd2886f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 26 Nov 2021 16:47:28 +0100 Subject: [PATCH 0067/1367] Version 5.1.0, Revision 20499, Hash f360c6daa MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F interface/INIT.F Additions: -Some progress but still not working well Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 11 ++++++----- src/interface/INIT.F | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b0dc1f64c3..2667038577 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 20498 -#define YAMBO_HASH "28c429d71" +#define YAMBO_REVISION 20499 +#define YAMBO_HASH "f360c6daa" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 279464f003..0e02333409 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -74,7 +74,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! YAMBO_ALLOC(U_l,(Dip%ib(2),Dip%ib(2),2)) YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),2)) - YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) ! U_l =cZERO @@ -97,7 +97,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) if(k_map%max_kdir(id_red)==1) cycle ! Non-periodic direction, skip calculation ! max_step=1 ! Only the first neighbor - if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 +! if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 ! do istep=1,max_step ! @@ -112,8 +112,9 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) ! - Der_k_red(:,:,istep)=matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep)))- & -& -matmul(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) + Der_k_red(:,:,istep)= matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) + ! Der_k_red(:,:,istep)=cI*Der_k_red(:,:,istep)*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) ! enddo @@ -126,8 +127,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! Eq. 96 of PRB 63, 155107(2001) ! do idir=1,3 - enddo Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(Der_k_red(:,:,1))*a(id_red,idir) + enddo ! else ! diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 7649db4dd0..2bf4925363 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -440,7 +440,7 @@ subroutine before_infile_write_setup #endif #if defined _PHEL PH_Q=(/1,elph_nQ/) - QP_G_er=(/0.,PH_W_debye/) + QP_G_er=(/0._SP,PH_W_debye/) #endif if (l_gw0.and.l_elel_corr) call initactivate(1,'HF_and_locXC') ! From 2b91c36ce9846b02d595412f3a321a1cc584a6e6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 4 Jan 2022 10:30:20 +0100 Subject: [PATCH 0068/1367] Version 5.1.0, Revision 21207, Hash e1bb4a0ac MODIFIED * include/driver/version.h hamiltonian/WF_and_dipole_dimensions.F Bugs: - [yambo_sc] Fixed unsolved conflict from previous merge Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/hamiltonian/WF_and_dipole_dimensions.F | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e4639934d6..e6f05d6b7c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21122 -#define YAMBO_HASH "744f16bc7" +#define YAMBO_REVISION 21207 +#define YAMBO_HASH "e1bb4a0ac" diff --git a/src/hamiltonian/WF_and_dipole_dimensions.F b/src/hamiltonian/WF_and_dipole_dimensions.F index 44c5edce25..897704f24f 100644 --- a/src/hamiltonian/WF_and_dipole_dimensions.F +++ b/src/hamiltonian/WF_and_dipole_dimensions.F @@ -29,11 +29,7 @@ subroutine WF_and_dipole_dimensions(X,Xk) use X_m, ONLY:X_t use wave_func, ONLY:wf_ng use QP_m, ONLY:QP_ng_Sx,QP_ng_SH,QP_ng_Vxc,QP_n_G_bands,COHSEX_use_empties -<<<<<<< HEAD - use R_lattice, ONLY:qindx_S,G_m_G_maxval,k_map,bz_samp -======= - use R_lattice, ONLY:qindx_S,G_m_G,bz_samp ->>>>>>> bug-fixes + use R_lattice, ONLY:qindx_S,G_m_G_maxval,bz_samp use interfaces, ONLY:eval_G_minus_G use hamiltonian, ONLY:H_ref_bands,WF_Go_indx,WF_G_max,l_sc_XC_is_local #if defined _RT || defined _NL From 3d2119f7638f59ed14e75a42e7fe86c2ccfdad88 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Jan 2022 10:43:47 +0100 Subject: [PATCH 0069/1367] Version 5.1.0, Revision 21208, Hash 2b91c36ce MODIFIED * include/driver/version.h bse/K_kernel.F Changes: - [yambo] Saving local changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e6f05d6b7c..3f49d98974 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21207 -#define YAMBO_HASH "e1bb4a0ac" +#define YAMBO_REVISION 21208 +#define YAMBO_HASH "2b91c36ce" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 33526eb3b0..75487d821e 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -725,15 +725,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if(iHxc==3) then - ! - if (BS_res_K_corr.or.BS_cpl_K_corr) then - YAMBO_FREE(WF_phase) - endif - ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) + if(iHxc==3.and.l_bs_corr) then + YAMBO_FREE(WF_phase) + qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) YAMBO_FREE(BS_W) - ! endif ! if (l_load_WFs) call WF_free(WF,keep_states_to_load=iHxc<3) From 49bbad7fff7dfa0287a2d1914e371df8bcd84eab Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Jan 2022 10:44:08 +0100 Subject: [PATCH 0070/1367] Automatic commit: configure regenerated after merge --- configure | 22 ++++++++++++++++++++++ include/driver/version.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 029198672e..fda92844a8 100755 --- a/configure +++ b/configure @@ -649,6 +649,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -824,6 +825,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -884,6 +887,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1616,6 +1620,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3065,6 +3070,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14706,6 +14724,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14876,6 +14897,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index 473c61f0d4..74a9e12354 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21128 -#define YAMBO_HASH "c8bb0e2bd" +#define YAMBO_REVISION 21219 +#define YAMBO_HASH "97358c12a" From a13c1496285d3caaf52d9da2a93e0c5ebfcb17a9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Jan 2022 15:00:39 +0100 Subject: [PATCH 0071/1367] Version 5.1.0, Revision 21220, Hash 49bbad7ff MODIFIED * include/driver/version.h sc/SC_driver.F wf_and_fft/WF_load.F wf_and_fft/WF_rotate.F NEW * (new Bugs: - [yambo_sc] Fixed WF_rotate Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/sc/SC_driver.F | 6 +++--- src/wf_and_fft/WF_load.F | 2 +- src/wf_and_fft/WF_rotate.F | 42 +++++++++++++++++++++++++++----------- 4 files changed, 36 insertions(+), 18 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 74a9e12354..c495a34314 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21219 -#define YAMBO_HASH "97358c12a" +#define YAMBO_REVISION 21220 +#define YAMBO_HASH "49bbad7ff" diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index 5c310500f8..f2864367c8 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -234,7 +234,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) IO_ACT=manage_action(RD_CL_IF_END,i_frag,1,QP_nk*n_sp_pol) call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/1+i_frag/),ID=ID(2)) io_WF=io_SC_components('WF',E,ID(2)) - call WF_rotate(ik,i_sp_pol,WFo,fft_size) + call WF_rotate(ik,i_sp_pol,WFo,fft_size,"R") enddo enddo ! @@ -468,7 +468,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! New wave functions !==================== ! - call WF_rotate(ik,i_sp_pol,WFo,fft_size) + call WF_rotate(ik,i_sp_pol,WFo,fft_size,"R") ! if (l_NSC_shot) call live_timing(steps=1) ! @@ -541,7 +541,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) call WF_load(WF,WF_G_max,WF_Go_indx,SC_bands,(/1,nkibz/),title='-SC',force_WFo=.true.) ! do ik=1,QP_nk - call WF_rotate(ik,i_sp_pol,WFo,fft_size) + call WF_rotate(ik,i_sp_pol,WFo,fft_size,"R") enddo ! endif diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 17e7df6f37..5c30105b2b 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -542,7 +542,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load if (WF%space=='G') wf_grid_size=wf_ng do i_sp_pol=WF%sp_pol(1),WF%sp_pol(2) do ikibz=WF%k(1),WF%k(2) - call WF_rotate(ikibz,i_sp_pol,WF,wf_grid_size) + call WF_rotate(ikibz,i_sp_pol,WF,wf_grid_size,WF%space) enddo enddo ! diff --git a/src/wf_and_fft/WF_rotate.F b/src/wf_and_fft/WF_rotate.F index 72d8703783..66ea358bf6 100644 --- a/src/wf_and_fft/WF_rotate.F +++ b/src/wf_and_fft/WF_rotate.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) +subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size,space) ! ! = ! @@ -39,8 +39,9 @@ subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) ! implicit none ! - integer :: i_sp_pol,ik,wf_size - type(WAVEs) :: WFo + integer, intent(in) :: i_sp_pol,ik,wf_size + type(WAVEs), intent(inout) :: WFo + character(1), intent(in) :: space ! ! Work Space ! @@ -57,7 +58,8 @@ subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) do ibp = H_ref_bands(1),H_ref_bands(2) i_wfp = WFo%index(ibp,ik,i_sp_pol) if (i_wfp==0) cycle - WS_wf(:,:,ib)=WS_wf(:,:,ib)+H_rotation(ibp,ib,ik,i_sp_pol)*WFo%c(:,:,i_wfp) + if (space=="G") WS_wf(:,:,ib)=WS_wf(:,:,ib)+H_rotation(ibp,ib,ik,i_sp_pol)*WFo%c(:,:,i_wfp) + if (space=="R") WS_wf(:,:,ib)=WS_wf(:,:,ib)+H_rotation(ibp,ib,ik,i_sp_pol)*WFo%r(:,:,i_wfp) end do ! enddo @@ -67,15 +69,31 @@ subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) i_wf = WFo%index(ib,ik,i_sp_pol) if (i_wf==0) cycle ! - !$omp parallel do default(shared), private(i_c,i_spinor) - do i_spinor=1,n_spinor - do i_c=1,wf_size - WF%c(i_c,i_spinor,i_wf)=WS_wf(i_c,i_spinor,ib) + if (space=="G") then + ! + !$omp parallel do default(shared), private(i_c,i_spinor) + do i_spinor=1,n_spinor + do i_c=1,wf_size + WF%c(i_c,i_spinor,i_wf)=WS_wf(i_c,i_spinor,ib) + enddo enddo - enddo - !$omp end parallel do - ! - if (have_cuda) WF%c_d(:,:,i_wf) = WF%c(:,:,i_wf) + !$omp end parallel do + ! + if (have_cuda) WF%c_d(:,:,i_wf) = WF%c(:,:,i_wf) + ! + else if(space=="R") then + ! + !$omp parallel do default(shared), private(i_c,i_spinor) + do i_spinor=1,n_spinor + do i_c=1,wf_size + WF%r(i_c,i_spinor,i_wf)=WS_wf(i_c,i_spinor,ib) + enddo + enddo + !$omp end parallel do + ! + if (have_cuda) WF%r_d(:,:,i_wf) = WF%r(:,:,i_wf) + ! + endif ! enddo ! From 06bb5b2bc3ca6a35f69e0ffd526ba443b4156486 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Jan 2022 15:21:14 +0100 Subject: [PATCH 0072/1367] Version 5.1.0, Revision 21221, Hash a13c14962 MODIFIED * include/driver/version.h modules/mod_wrapper.F real_time_control/RT_average_operator.F NEW * (new Bugs: - [yambo] mod_wrapper restored to version similar to the develop - [yambo_rt] Fixed indeces into definition of Hk in RT_average_operator to call wrapper with contiguous argument Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/modules/mod_wrapper.F | 66 ++++++++++----------- src/real_time_control/RT_average_operator.F | 22 +++---- 3 files changed, 45 insertions(+), 47 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c495a34314..20a8d71121 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21220 -#define YAMBO_HASH "49bbad7ff" +#define YAMBO_REVISION 21221 +#define YAMBO_HASH "a13c14962" diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 7455f03abe..8eaa6cc7bc 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -30,6 +30,10 @@ module wrapper ! TRANSA = 'C' or 'c', op( A ) = conjg( A' ). ! use pars, ONLY:SP,cI + ! + ! Implementation based on C_F_POINTER assumes that variables are contiguous, + ! which may not be the case + ! use iso_c_binding, ONLY:C_LOC,C_F_POINTER #ifdef _CUDA use cublas @@ -386,19 +390,13 @@ end function Vstar_dot_V_c1_cpu complex(SP) function Vstar_dot_V_c2_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),target,intent(in) :: CX(:,:),CY(:,:) + complex(SP),target,contiguous,intent(in) :: CX(:,:),CY(:,:) #if defined _DOUBLE complex(SP)::zdotc + Vstar_dot_V_c2_cpu=ZDOTC(N,CX,1,CY,1) #else complex(SP)::cdotc -#endif - real(SP),pointer :: CX1D(:),CY1D(:) - call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) - call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) -#if defined _DOUBLE - Vstar_dot_V_c2_cpu=ZDOTC(N,CX1D,1,CY1D,1) -#else - Vstar_dot_V_c2_cpu=CDOTC(N,CX1D,1,CY1D,1) + Vstar_dot_V_c2_cpu=CDOTC(N,CX,1,CY,1) #endif end function Vstar_dot_V_c2_cpu ! @@ -419,14 +417,14 @@ complex(SP) function Vstar_dot_V_c2_gpu(N,CX,CY) implicit none integer, intent(in) :: N complex(SP), device, target, intent(in) :: CX(:,:),CY(:,:) + !real(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) ! - real(SP),pointer :: CX1D(:),CY1D(:) - call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) - call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) #if defined _DOUBLE - Vstar_dot_V_c2_gpu=cublasZdotc(N,CX1D,1,CY1D,1) + Vstar_dot_V_c2_gpu=cublasZdotc(N,CX,1,CY,1) #else - Vstar_dot_V_c2_gpu=cublasCdotc(N,CX1D,1,CY1D,1) + Vstar_dot_V_c2_gpu=cublasCdotc(N,CX,1,CY,1) #endif end function Vstar_dot_V_c2_gpu #endif @@ -489,13 +487,13 @@ real(SP) function V_dot_V_r2_cpu(N,CX,CY) #else real(SP)::sdot #endif - real(SP),pointer :: CX1D(:),CY1D(:) - call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) - call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) + !real(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) #if defined _DOUBLE - V_dot_V_r2_cpu=DDOT(N,CX1D,1,CY1D,1) + V_dot_V_r2_cpu=DDOT(N,CX,1,CY,1) #else - V_dot_V_r2_cpu=SDOT(N,CX1D,1,CY1D,1) + V_dot_V_r2_cpu=SDOT(N,CX,1,CY,1) #endif end function V_dot_V_r2_cpu ! @@ -522,13 +520,13 @@ real(SP) function V_dot_V_r2_gpu(N,CX,CY) #else real(SP)::sdot #endif - real(SP),pointer :: CX1D(:),CY1D(:) - call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) - call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) + !real(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) #if defined _DOUBLE - V_dot_V_r2_gpu=cublasDDOT(N,CX1D,1,CY1D,1) + V_dot_V_r2_gpu=cublasDDOT(N,CX,1,CY,1) #else - V_dot_V_r2_gpu=cublasSDOT(N,CX1D,1,CY1D,1) + V_dot_V_r2_gpu=cublasSDOT(N,CX,1,CY,1) #endif end function V_dot_V_r2_gpu #endif @@ -555,13 +553,13 @@ complex(SP) function V_dot_V_c2_cpu(N,CX,CY) #else complex(SP)::cdotu #endif - complex(SP),pointer :: CX1D(:),CY1D(:) - call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) - call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) + !complex(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) #if defined _DOUBLE - V_dot_V_c2_cpu=ZDOTU(N,CX1D,1,CY1D,1) + V_dot_V_c2_cpu=ZDOTU(N,CX,1,CY,1) #else - V_dot_V_c2_cpu=CDOTU(N,CX1D,1,CY1D,1) + V_dot_V_c2_cpu=CDOTU(N,CX,1,CY,1) #endif end function V_dot_V_c2_cpu ! @@ -588,13 +586,13 @@ complex(SP) function V_dot_V_c2_gpu(N,CX,CY) #else complex(SP)::cdotu #endif - complex(SP),pointer :: CX1D(:),CY1D(:) - call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) - call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) + !complex(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) #if defined _DOUBLE - V_dot_V_c2_gpu=cublasZDOTU(N,CX1D,1,CY1D,1) + V_dot_V_c2_gpu=cublasZDOTU(N,CX,1,CY,1) #else - V_dot_V_c2_gpu=cublasCDOTU(N,CX1D,1,CY1D,1) + V_dot_V_c2_gpu=cublasCDOTU(N,CX,1,CY,1) #endif end function V_dot_V_c2_gpu #endif diff --git a/src/real_time_control/RT_average_operator.F b/src/real_time_control/RT_average_operator.F index b7beeb512d..54526243b9 100644 --- a/src/real_time_control/RT_average_operator.F +++ b/src/real_time_control/RT_average_operator.F @@ -60,7 +60,7 @@ subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& ! integer :: ib,ibp,ik,RT_bands2,ik_ibz,i_sp_pol,iE_fg,i_cmp real(SP) :: deltaE,deltaE_fg - complex(SP) :: Hk(N_V,RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)),VALUE_tmp(N_V), & + complex(SP) :: Hk(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),N_V),VALUE_tmp(N_V), & & Hk_tmp(RT_bands(2),RT_bands(2)), & & Hk_vec_tmp(N_V,RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) logical :: l_DbGd_energy,l_DbGd_dipole @@ -97,33 +97,33 @@ subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& if(l_DbGd_energy.and.RTibz%k_range(ik_ibz,1)/=ik) then iE_fg=RTibz%E_map(ik) do ib=RT_bands(1),RT_bands(2) - Hk(1,ib,ib)=Hk_tmp(ib,ib)-en%E(ib,ik_ibz,i_sp_pol)+en%FG%E(ib,iE_fg,i_sp_pol) + Hk(ib,ib,1)=Hk_tmp(ib,ib)-en%E(ib,ik_ibz,i_sp_pol)+en%FG%E(ib,iE_fg,i_sp_pol) do ibp=ib+1,RT_bands(2) - Hk(1,ib,ibp)=Hk_tmp(ib,ibp) - Hk(1,ibp,ib)=Hk_tmp(ibp,ib) + Hk(ib,ibp,1)=Hk_tmp(ib,ibp) + Hk(ibp,ib,1)=Hk_tmp(ibp,ib) enddo enddo else if(l_DbGd_dipole.and.RTibz%k_range(ik_ibz,1)/=ik) then iE_fg=RTibz%E_map(ik) do ib=RT_bands(1),RT_bands(2) - Hk(i_cmp,ib,ib)=Hk_vec_tmp(i_cmp,ib,ib) + Hk(ib,ib,i_cmp)=Hk_vec_tmp(i_cmp,ib,ib) do ibp=ib+1,RT_bands(2) deltaE =en%E(ib,ik_ibz,i_sp_pol) -en%E(ibp,ik_ibz,i_sp_pol) deltaE_fg=en%FG%E(ib,iE_fg,i_sp_pol)-en%FG%E(ibp,iE_fg,i_sp_pol) if(abs(deltaE)>1.E-5 .and. abs(deltaE_Fg)>1.E-5) then - Hk(i_cmp,ib,ibp)=Hk_vec_tmp(i_cmp,ib,ibp)*deltaE/deltaE_fg - Hk(i_cmp,ibp,ib)=Hk_vec_tmp(i_cmp,ibp,ib)*deltaE/deltaE_fg + Hk(ib,ibp,i_cmp)=Hk_vec_tmp(i_cmp,ib,ibp)*deltaE/deltaE_fg + Hk(ibp,ib,i_cmp)=Hk_vec_tmp(i_cmp,ibp,ib)*deltaE/deltaE_fg else - Hk(i_cmp,ibp,ib)=Hk_vec_tmp(i_cmp,ibp,ib) + Hk(ibp,ib,i_cmp)=Hk_vec_tmp(i_cmp,ibp,ib) endif enddo enddo else - if(N_V==1) Hk(1,:,:) =Hk_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - if(N_V> 1) Hk(i_cmp,:,:)=Hk_vec_tmp(i_cmp,:,:) + if(N_V==1) Hk(:,:,1) =Hk_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + if(N_V> 1) Hk(:,:,i_cmp)=Hk_vec_tmp(i_cmp,:,:) endif ! - VALUE_tmp(i_cmp)=VALUE_tmp(i_cmp)-cI*Vstar_dot_V_omp(RT_bands2,Hk(i_cmp,:,:),G(:,:,ik))*RTibz%weights(ik) + VALUE_tmp(i_cmp)=VALUE_tmp(i_cmp)-cI*Vstar_dot_V_omp(RT_bands2,Hk(:,:,i_cmp),G(:,:,ik))*RTibz%weights(ik) ! enddo ! From a50fb1b70de167c485c0483528642d06962910ca Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 14 Jan 2022 09:13:20 +0100 Subject: [PATCH 0073/1367] Version 5.1.0, Revision 21222, Hash 06bb5b2bc MODIFIED * include/driver/version.h ypp/bits/WF_map_perturbative_SOC.F Bugs: - [ypp] Fixed small bug Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/bits/WF_map_perturbative_SOC.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 20a8d71121..7e24a1167b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21221 -#define YAMBO_HASH "a13c14962" +#define YAMBO_REVISION 21222 +#define YAMBO_HASH "06bb5b2bc" diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index d7374e8613..70b3e8a445 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -209,10 +209,10 @@ subroutine WF_map_perturbative_SOC(kpt,En) if(i_symm>1) then do i_fft=1,fft_size i_fft_rot=fft_rot_r(i_fft,i_symm) - WF_SOC_rot(i_fft,:)=matmul( spin_sop(:,:,i_symm), WF_SOC%c(i_fft_rot,:,i_wf_SOC) ) + WF_SOC_rot(i_fft,:)=matmul( spin_sop(:,:,i_symm), WF_SOC%r(i_fft_rot,:,i_wf_SOC) ) enddo else - WF_SOC_rot=WF_SOC%c(:,:,i_wf_SOC) + WF_SOC_rot=WF_SOC%r(:,:,i_wf_SOC) endif ! do i_fft=1,fft_size From e6c3050b349972c88eb3a586ccca76032ff0725e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 14 Jan 2022 09:35:28 +0100 Subject: [PATCH 0074/1367] Version 5.1.0, Revision 21223, Hash a50fb1b70 MODIFIED * include/driver/version.h bse/K_kernel.F Bugs: - [yambo] Fixed small bug with BSE and omp Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7e24a1167b..1e49fac64d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21222 -#define YAMBO_HASH "06bb5b2bc" +#define YAMBO_REVISION 21223 +#define YAMBO_HASH "a50fb1b70" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 75487d821e..9869967792 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -482,7 +482,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !$omp & ig_W,iq_W,iq_W_s,iq_W_bz,iq_W_bz_mq,ig_W_mq,iq_W_mq,iq_W_s_mq,H_x,H_c, & !$omp & i_p_bz_last,i_k_bz_last,i_pmq_bz_last,i_kmq_bz_last, & !$omp & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last, & - !$omp & i_k_bz_mem,i_kmq_bz_mem,qindx_tmp ) + !$omp & i_k_bz_mem,i_kmq_bz_mem,qindx_tmp,BS_mat_tmp ) #endif ! call OPENMP_update(master_thread) From 431534667d105fce2457244a4f851186343eaf41 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Jan 2022 16:12:31 +0100 Subject: [PATCH 0075/1367] Version 5.1.0, Revision 21144, Hash 03151bffa MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F Bugs: - [yambo] Fixed der_k initialization Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 473c61f0d4..d2272d26c9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21128 -#define YAMBO_HASH "c8bb0e2bd" +#define YAMBO_REVISION 21144 +#define YAMBO_HASH "03151bffa" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 0e02333409..2619dc675f 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -77,11 +77,6 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) ! - U_l =cZERO - U_r =cZERO - Der_k_cart=cZERO - Der_k_red =cZERO - ! do i_sp_pol=1,n_sp_pol ! do ik=1,Xk%nibz @@ -92,6 +87,12 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! ikbz=Xk%k_table(ik,1) ! + U_l =cZERO + U_r =cZERO + ! + Der_k_cart=cZERO + Der_k_red =cZERO + ! do id_red=1,3 ! Loop on the three crystal directions in the BZ ! if(k_map%max_kdir(id_red)==1) cycle ! Non-periodic direction, skip calculation @@ -115,7 +116,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) Der_k_red(:,:,istep)= matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & & -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) ! - Der_k_red(:,:,istep)=cI*Der_k_red(:,:,istep)*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) ! enddo ! @@ -124,7 +125,6 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) if(max_step==1) then ! ! First order formula D(dk) - ! Eq. 96 of PRB 63, 155107(2001) ! do idir=1,3 Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(Der_k_red(:,:,1))*a(id_red,idir) @@ -133,7 +133,6 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) else ! ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 - ! Eq. 97 of PRB 63, 155107(2001) ! do idir=1,3 Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(4._SP*Der_k_red(:,:,1)-Der_k_red(:,:,2))/3._SP*a(id_red,idir) From c6ee5197a36b82e54983e166de25c351d83e5914 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Jan 2022 16:33:08 +0100 Subject: [PATCH 0076/1367] Version 5.1.0, Revision 21145, Hash 431534667 MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F Changes: - [yambo] New dipoles implementation: changed definition as sum over left and right derivative Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d2272d26c9..ba2801d6df 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21144 -#define YAMBO_HASH "03151bffa" +#define YAMBO_REVISION 21145 +#define YAMBO_HASH "431534667" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 2619dc675f..1602241c62 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -113,7 +113,9 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) ! - Der_k_red(:,:,istep)= matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & + Der_k_red(:,:,istep)= matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)),hermitian(U_r(:,:,istep))) & +& +matmul(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) & & -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) ! Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) From 4f60c70f78435a7f4fcb8f7a31881648202c5452 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Jan 2022 17:38:41 +0100 Subject: [PATCH 0077/1367] Version 5.1.0, Revision 21146, Hash c6ee519 MODIFIED * modified: modified: NEW * lib/yambo Bugs: - [yambo] Fixed overlaps IO in new dipoles implemntation Patch sent by: Davide Sangalli --- src/dipoles/DIPOLE_IO.F | 8 ++++---- src/dipoles/DIPOLE_build_der_k.F | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 4fae968ef3..1c1d2e9bb7 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -30,7 +30,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,DIP_v,use_covariant_approach + use DIPOLES, ONLY:DIPOLE_t,DIP_v,use_covariant_approach,use_der_k use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,VERIFY,DUMP,REP,OP_WR_CL,OP_WR,OP_RD_CL,& & OP_IF_START_APP_CL_IF_END,OP_IF_START_RD_CL_IF_END @@ -80,8 +80,8 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) write_header = (master_cpu.and.writing) read_header = .not.write_header ! - write_header_ovlp =write_header.and.use_covariant_approach - read_header_ovlp = read_header.and.use_covariant_approach + write_header_ovlp =write_header.and.(use_covariant_approach.or.use_der_k) + read_header_ovlp = read_header.and.(use_covariant_approach.or.use_der_k) ! if(write_header) then call msg('s','[DIP] Writing dipoles header ') @@ -169,7 +169,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) endif #endif ! - if(use_covariant_approach) then + if(use_covariant_approach.or.use_der_k) then #if defined _PAR_IO if ( (PAR_K_scheme%COM_ibz_A2A%CPU_id==0.and.writing).or.reading ) then IO_ACT_NOW=manage_action(IO_ACTION,0,0,2) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 1602241c62..0d88354335 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -113,12 +113,19 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) ! - Der_k_red(:,:,istep)= matmul(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)),hermitian(U_r(:,:,istep))) & -& +matmul(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) + !r+l + Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) & +& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) & +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)), U_l(:,:,istep) ) + !r +! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & +!& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) + !l +! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) & +!& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)), U_l(:,:,istep) ) ! - Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP ! enddo ! From f79f7ef66c7e775e500962b91b657d99c416ba23 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Jan 2022 22:58:38 +0100 Subject: [PATCH 0078/1367] Version 5.1.0, Revision 21147, Hash 4f60c70f7 MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F dipoles/DIPOLE_driver.F linear_algebra/SERIAL_SVD.F modules/mod_DIPOLES.F parallel/PARALLEL_global_DIPOLES.F Changes: - [yambo] Working on new dipoles implementation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 23 +++++++++++++++++------ src/dipoles/DIPOLE_driver.F | 11 ++++++----- src/linear_algebra/SERIAL_SVD.F | 2 +- src/modules/mod_DIPOLES.F | 2 +- src/parallel/PARALLEL_global_DIPOLES.F | 4 ++-- 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ba2801d6df..8b48faa646 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21145 -#define YAMBO_HASH "431534667" +#define YAMBO_REVISION 21147 +#define YAMBO_HASH "4f60c70f7" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 0d88354335..20bbccdbd9 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -98,7 +98,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) if(k_map%max_kdir(id_red)==1) cycle ! Non-periodic direction, skip calculation ! max_step=1 ! Only the first neighbor -! if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 ! do istep=1,max_step ! @@ -107,23 +107,34 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) idx=k_periodic_idx(idx,k_map) ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! + !write(*,*) ikbz,ikm1 + !write(*,*) DIP_S(13:14,13:14,id_red+(istep-1)*3,ikbz,i_sp_pol) + !write(*,*) DIP_S(13:14,13:14,id_red+(istep-1)*3,ikm1,i_sp_pol) + ! U_r(:,:,istep)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) U_l(:,:,istep)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) ! + !write(*,*) U_r(13:14,13:14,istep) + !write(*,*) U_l(13:14,13:14,istep) + ! !r+l Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & & -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) & -& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)), U_l(:,:,istep) ) +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) & +& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep) ) + ! + !l +! Der_k_red(:,:,istep)=-matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) & +!& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep) ) +! write(*,*) Der_k_red(13:14,13:14,istep) + ! !r ! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & !& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) - !l -! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol), hermitian(U_l(:,:,istep))) & -!& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)), U_l(:,:,istep) ) +! write(*,*) Der_k_red(13:14,13:14,istep) ! Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP ! diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index 9cc8836e86..c5a3b3c155 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -46,7 +46,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) use R_lattice, ONLY:bz_samp use DIPOLES, ONLY:DIP_alloc,DIPOLE_t,DIP_iR,use_covariant_approach,use_real_space_approach,& & Vnl_commutator_warning,use_g_space_approach,use_der_k,l_force_SndOrd,& -& use_shifted_grids_approach,DIP_P,DIP_v,DIP_S,eval_OVERLAPS,& +& use_shifted_grids_approach,DIP_P,DIP_v,DIP_S,compute_overlaps,& & compute_P2_dipoles,compute_Orb_dipoles,compute_Spin_dipoles use IO_int, ONLY:IO_and_Messaging_switch use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_nibz,PAR_COM_DIPk_ibz_A2A,& @@ -146,7 +146,8 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) if (compute_Spin_dipoles) Dip%computed=trim(Dip%computed)//' Spin' if (compute_Orb_dipoles) Dip%computed=trim(Dip%computed)//' Orb' ! - if (use_covariant_approach.or.use_der_k) eval_OVERLAPS=.true. + compute_overlaps=.false. + if (use_covariant_approach.or.use_der_k) compute_overlaps=.true. ! ! Dipole dimensions to be fixed ! @@ -185,7 +186,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! if (use_shifted_grids_approach) call DIPOLE_shifted_grids(Xen,Xk,Dip) ! - if (eval_OVERLAPS) call DIPOLE_overlaps(Xk,Dip) + if (compute_overlaps) call DIPOLE_overlaps(Xk,Dip) ! if (use_covariant_approach) call DIPOLE_build_covariants(Xen,Xk,Dip) ! @@ -250,7 +251,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) call DIP_alloc('DIP_iR') call DIP_alloc('DIP_P') call DIP_alloc('DIP_v') - if (use_covariant_approach) call DIP_alloc('DIP_S') + if (compute_overlaps) call DIP_alloc('DIP_S') if (compute_P2_dipoles) call DIP_alloc('P_square') if (compute_Orb_dipoles) call DIP_alloc('DIP_orbital') if (compute_Spin_dipoles) call DIP_alloc('DIP_spin') @@ -298,7 +299,7 @@ subroutine DIPOLES_alloc() DIP_orbital=cZERO endif ! - if(use_covariant_approach) then + if(compute_overlaps) then call DIP_alloc('DIP_S',(/Dip%ib(2),Dip%ib(2),6,Xk%nbz/)) DIP_S=cZERO endif diff --git a/src/linear_algebra/SERIAL_SVD.F b/src/linear_algebra/SERIAL_SVD.F index 064c7c4006..8262a37b94 100644 --- a/src/linear_algebra/SERIAL_SVD.F +++ b/src/linear_algebra/SERIAL_SVD.F @@ -32,8 +32,8 @@ subroutine SERIAL_SVD(n,M,mode,SVD_digits) ! integer, intent(in) :: n complex(SP), intent(inout) :: M(n,n) - integer, intent(in) :: SVD_digits character(3),intent(in) :: mode + integer, intent(in) :: SVD_digits ! !ws integer :: i_loop diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index d4b625fd65..01a4a11d86 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -44,7 +44,7 @@ module DIPOLES ! other ! integer :: num_shifted_grids - logical :: eval_OVERLAPS + logical :: compute_overlaps logical :: l_force_SndOrd ! ! Descriptor diff --git a/src/parallel/PARALLEL_global_DIPOLES.F b/src/parallel/PARALLEL_global_DIPOLES.F index 5923b7b00d..6b8a6158f2 100644 --- a/src/parallel/PARALLEL_global_DIPOLES.F +++ b/src/parallel/PARALLEL_global_DIPOLES.F @@ -46,7 +46,7 @@ subroutine PARALLEL_global_DIPOLES(E,Xk,q,ENVIRONMENT) use parallel_m, ONLY:PAR_IND_DIPk_bz_ID,PAR_IND_DIPk_ibz_ID,PAR_IND_OVLPk_ibz_ID,& & PAR_IND_CON_BANDS_DIP_ID,PAR_IND_VAL_BANDS_DIP_ID,& & PAR_IND_CON_BANDS_OVLP_ID,PAR_IND_VAL_BANDS_OVLP_ID - use DIPOLES, ONLY:eval_OVERLAPS + use DIPOLES, ONLY:compute_overlaps use parallel_m, ONLY:PAR_Q_bz_range,PAR_IND_Q_bz ! implicit none @@ -112,7 +112,7 @@ subroutine PARALLEL_global_DIPOLES(E,Xk,q,ENVIRONMENT) & TOTAL=PAR_n_v_bands(2)-PAR_n_v_bands(1)+1,& & NCPU=PAR_COM_VAL_INDEX_DIP%n_CPU) ! - if (eval_OVERLAPS) then + if (compute_overlaps) then ! ! Add the neighboars k-points ! From 243145a2119f8b4ce2c0382994ca878edf235b3e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Jan 2022 00:06:21 +0100 Subject: [PATCH 0079/1367] Version 5.1.0, Revision 21148, Hash f79f7ef66 MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F Changes: - [yambo] Working on new dipoles. Saving work done up to now Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/dipoles/DIPOLE_build_der_k.F | 92 ++++++++++++++++++++++++++++---- 2 files changed, 85 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8b48faa646..f6f895b1a8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21147 -#define YAMBO_HASH "4f60c70f7" +#define YAMBO_REVISION 21148 +#define YAMBO_HASH "f79f7ef66" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 20bbccdbd9..9cf74ea7bc 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -28,11 +28,12 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! see Phys. Rev. B 76, 035213 (2007) and Phys. Rev. Research 2, 013357 (2020) ! use pars, ONLY:SP,cI,cZERO,pi + use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,DIP_alloc,l_force_SndOrd use R_lattice, ONLY:bz_samp,k_map - use vec_operate, ONLY:k_periodic_idx + use vec_operate, ONLY:k_periodic_idx,degeneration_finder use matrix_operate, ONLY:hermitian use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& & PAR_DIPk_nbz,PAR_IND_CON_BANDS_DIP, PAR_IND_VAL_BANDS_DIP, & @@ -53,9 +54,13 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! logical :: idir_not_done(3) integer :: ik,i_sp_pol,id_red,idx(3),idir,ic,ik_mem,ikbz,iv - integer :: istep,max_step,ikm1 + integer :: istep,max_step,ikm1,ikp1 complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:) ! + logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) + integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k + real(SP) :: deg_thresh + ! call timing("DIPOLE_buil_derk",OPR="start") ! if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. @@ -77,6 +82,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) ! + deg_thresh=0.005/HA2EV + ! do i_sp_pol=1,n_sp_pol ! do ik=1,Xk%nibz @@ -87,6 +94,20 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! ikbz=Xk%k_table(ik,1) ! + call degeneration_finder(Xen%E(1:Dip%ib(2),ik,i_sp_pol),Dip%ib(2),& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp_k + do ib=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + do ibp=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + deg_table_k(ib,ibp)=.true. + deg_table_k(ibp,ib)=.true. + enddo + !deg_table_k(ib,ib)=.false. + enddo + enddo + ! U_l =cZERO U_r =cZERO ! @@ -101,42 +122,94 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 ! do istep=1,max_step + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)+istep + idx=k_periodic_idx(idx,k_map) + ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + call degeneration_finder(Xen%E(1:Dip%ib(2),Xk%sstar(ikp1,1),i_sp_pol),Dip%ib(2),& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_kp=.false. + do i_grp=1,n_deg_grp_k + do ib=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + do ibp=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + deg_table_kp(ib,ibp)=.true. + deg_table_kp(ibp,ib)=.true. + enddo + enddo + enddo ! idx=k_map%k_map_inv(ikbz,:) idx(id_red)=idx(id_red)-istep idx=k_periodic_idx(idx,k_map) ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! - !write(*,*) ikbz,ikm1 - !write(*,*) DIP_S(13:14,13:14,id_red+(istep-1)*3,ikbz,i_sp_pol) - !write(*,*) DIP_S(13:14,13:14,id_red+(istep-1)*3,ikm1,i_sp_pol) + call degeneration_finder(Xen%E(1:Dip%ib(2),Xk%sstar(ikm1,1),i_sp_pol),Dip%ib(2),& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_km=.false. + do i_grp=1,n_deg_grp_k + do ib=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + do ibp=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + deg_table_km(ib,ibp)=.true. + deg_table_km(ibp,ib)=.true. + enddo + enddo + enddo + ! + write(*,*) ikbz,ikm1 + write(*,*) "S1= ",DIP_S(13:14,13:14,id_red+(istep-1)*3,ikbz,i_sp_pol) + write(*,*) "S2= ",DIP_S(13:14,13:14,id_red+(istep-1)*3,ikm1,i_sp_pol) ! U_r(:,:,istep)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) U_l(:,:,istep)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) + ! + do ib=1,Dip%ib(2) + do ibp=1,Dip%ib(2) + if(deg_table_k(ibp,ib).or.deg_table_kp(ibp,ib)) cycle + U_r(ib,ibp,istep)=cZERO + enddo + enddo + ! + do ib=1,Dip%ib(2) + do ibp=1,Dip%ib(2) + if(deg_table_k(ibp,ib).or.deg_table_km(ibp,ib)) cycle + U_l(ib,ibp,istep)=cZERO + enddo + enddo ! call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) ! - !write(*,*) U_r(13:14,13:14,istep) - !write(*,*) U_l(13:14,13:14,istep) + write(*,*) "Ur= ",U_r(13:14,13:14,istep) + write(*,*) "Ul= ",U_l(13:14,13:14,istep) ! !r+l Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & & -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) & & -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) & -& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep) ) +& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep)) +!& +matmul(hermitian(U_l(:,:,istep)),hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol))) & +!& -matmul( U_l(:,:,istep) , DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ) ! !l ! Der_k_red(:,:,istep)=-matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) & !& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep) ) ! write(*,*) Der_k_red(13:14,13:14,istep) + ! + !l' +!& Der_k_red(:,:,istep)=+matmul(hermitian(U_l(:,:,istep)),hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol))) & +!& -matmul( U_l(:,:,istep) , DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ) ! !r ! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & !& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) -! write(*,*) Der_k_red(13:14,13:14,istep) + write(*,*) Der_k_red(13:14,13:14,istep) ! Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP + write(*,*) "Derk= ",Der_k_red(13:14,13:14,istep) ! enddo ! @@ -149,6 +222,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) do idir=1,3 Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(Der_k_red(:,:,1))*a(id_red,idir) enddo + write(*,*) "Derk_c= ",Der_k_cart(13:14,13:14,1) ! else ! From 46a536cb23b07eae4af8cde5b7a79b38feeb2af2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Jan 2022 09:56:19 +0100 Subject: [PATCH 0080/1367] Version 5.1.0, Revision 21149, Hash 243145a21 MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F Bugs: - [yambo] Restored to orginal implementation which was correct Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 27 +++++---------------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f6f895b1a8..19674dc840 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21148 -#define YAMBO_HASH "f79f7ef66" +#define YAMBO_REVISION 21149 +#define YAMBO_HASH "243145a21" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 9cf74ea7bc..269b6da1d8 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -55,7 +55,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) logical :: idir_not_done(3) integer :: ik,i_sp_pol,id_red,idx(3),idir,ic,ik_mem,ikbz,iv integer :: istep,max_step,ikm1,ikp1 - complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:) + complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:),Der_k_tmp(:,:) ! logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k @@ -81,6 +81,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),2)) YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(Der_k_tmp,(Dip%ib(2),Dip%ib(2))) ! deg_thresh=0.005/HA2EV ! @@ -186,27 +187,9 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) write(*,*) "Ur= ",U_r(13:14,13:14,istep) write(*,*) "Ul= ",U_l(13:14,13:14,istep) ! - !r+l - Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) & -& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep)) -!& +matmul(hermitian(U_l(:,:,istep)),hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol))) & -!& -matmul( U_l(:,:,istep) , DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ) ! - !l -! Der_k_red(:,:,istep)=-matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep))) & -!& +matmul( DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) , U_l(:,:,istep) ) -! write(*,*) Der_k_red(13:14,13:14,istep) - ! - !l' -!& Der_k_red(:,:,istep)=+matmul(hermitian(U_l(:,:,istep)),hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol))) & -!& -matmul( U_l(:,:,istep) , DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ) - ! - !r -! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep))) & -!& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)), U_r(:,:,istep) ) - write(*,*) Der_k_red(13:14,13:14,istep) + Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep)) ) & +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep)) ) ! Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP write(*,*) "Derk= ",Der_k_red(13:14,13:14,istep) @@ -222,7 +205,6 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) do idir=1,3 Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(Der_k_red(:,:,1))*a(id_red,idir) enddo - write(*,*) "Derk_c= ",Der_k_cart(13:14,13:14,1) ! else ! @@ -261,6 +243,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) YAMBO_FREE(U_r) YAMBO_FREE(Der_k_red) YAMBO_FREE(Der_k_cart) + YAMBO_FREE(Der_k_tmp) ! ! Build non-periodic directions if necessary ! From 5e85f81d0a053382c8f768dafc681ffcc6302752 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Jan 2022 16:55:53 +0100 Subject: [PATCH 0081/1367] Version 5.1.0, Revision 21150, Hash 46a536cb2 MODIFIED * include/driver/version.h dipoles/DIPOLE_build_der_k.F Changes: - [yambo] Code cleaning Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 31 ++++++++++++++----------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 19674dc840..4397d49032 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21149 -#define YAMBO_HASH "243145a21" +#define YAMBO_REVISION 21150 +#define YAMBO_HASH "46a536cb2" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 269b6da1d8..2b7b52c5b8 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -27,7 +27,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! the overlaps to contruct local rotation matrices ! see Phys. Rev. B 76, 035213 (2007) and Phys. Rev. Research 2, 013357 (2020) ! - use pars, ONLY:SP,cI,cZERO,pi + use pars, ONLY:SP,cI,cZERO,pi,cONE use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol @@ -55,7 +55,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) logical :: idir_not_done(3) integer :: ik,i_sp_pol,id_red,idx(3),idir,ic,ik_mem,ikbz,iv integer :: istep,max_step,ikm1,ikp1 - complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:),Der_k_tmp(:,:) + complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:),delta(:,:) ! logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k @@ -81,7 +81,12 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),2)) YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) - YAMBO_ALLOC(Der_k_tmp,(Dip%ib(2),Dip%ib(2))) + YAMBO_ALLOC(delta,(Dip%ib(2),Dip%ib(2))) + ! + delta=cZERO + do ib=1,Dip%ib(2) + delta(ib,ib)=cONE + enddo ! deg_thresh=0.005/HA2EV ! @@ -105,7 +110,6 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) deg_table_k(ib,ibp)=.true. deg_table_k(ibp,ib)=.true. enddo - !deg_table_k(ib,ib)=.false. enddo enddo ! @@ -160,10 +164,6 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) enddo enddo ! - write(*,*) ikbz,ikm1 - write(*,*) "S1= ",DIP_S(13:14,13:14,id_red+(istep-1)*3,ikbz,i_sp_pol) - write(*,*) "S2= ",DIP_S(13:14,13:14,id_red+(istep-1)*3,ikm1,i_sp_pol) - ! U_r(:,:,istep)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) U_l(:,:,istep)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! @@ -184,15 +184,12 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) ! - write(*,*) "Ur= ",U_r(13:14,13:14,istep) - write(*,*) "Ul= ",U_l(13:14,13:14,istep) - ! - ! - Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol), hermitian(U_r(:,:,istep)) ) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep)) ) + Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) ,hermitian(U_r(:,:,istep)) ) & +& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep)) ) +!& +matmul( U_l(:,:,istep), DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ) & +!& -2*delta(:,:) ! - Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP - write(*,*) "Derk= ",Der_k_red(13:14,13:14,istep) + Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) ! enddo ! @@ -243,7 +240,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) YAMBO_FREE(U_r) YAMBO_FREE(Der_k_red) YAMBO_FREE(Der_k_cart) - YAMBO_FREE(Der_k_tmp) + YAMBO_FREE(delta) ! ! Build non-periodic directions if necessary ! From 1e45f2e2c6c591d6fef18aaeb00b38be3201e152 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Jan 2022 22:17:27 +0100 Subject: [PATCH 0082/1367] Version 5.1.0, Revision 21245, Hash 95d14f08c MODIFIED * include/driver/version.h bse/K_Haydock_response.F bse/K_diago_response_functions.F Bugs: - [yambo] Fixed cI factor in dichroism implementation beyond IP Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_Haydock_response.F | 4 ++-- src/bse/K_diago_response_functions.F | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 167d92bc11..13ea13d27b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21151 -#define YAMBO_HASH "cbe495906" +#define YAMBO_REVISION 21245 +#define YAMBO_HASH "95d14f08c" diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index 0d8ac22749..6d3324582d 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -22,7 +22,7 @@ ! subroutine K_Haydock_response(iq,it,Cf_size,mode,scheme,W,Af,Bf,Cf,reached_threshold) ! - use pars, ONLY:SP,cZERO,cONE,pi + use pars, ONLY:SP,cZERO,cONE,cI,pi use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Epsilon_ii,Joint_DOS,X_drude_term,global_gauge,skip_cond_sum_rule, & & X_magnons,X_dichroism,Epsilon_ij @@ -237,7 +237,7 @@ subroutine K_Haydock_response(iq,it,Cf_size,mode,scheme,W,Af,Bf,Cf,reached_thres case("magnons") X_magnons(iw,1,i_eps(:))=-X_o(1:2,1)*Co/(4._SP*pi) case("dichroism") - X_dichroism(iw,i_eps(:))=-X_o(1:2,1)*Co/(4._SP*pi)*(-1/SPEED_OF_LIGHT) + X_dichroism(iw,i_eps(:))=-X_o(1:2,1)*Co/(4._SP*pi)*(cI/SPEED_OF_LIGHT) end select ! enddo diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index b2de810535..ac656dadf1 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -26,7 +26,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ ! ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] ! - use pars, ONLY:cZERO,cONE,SP,pi + use pars, ONLY:cZERO,cONE,cI,SP,pi use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Epsilon_ii,Joint_DOS,BS_E_sorted,X_drude_term,global_gauge,skip_cond_sum_rule use electrons, ONLY:n_sp_pol @@ -292,7 +292,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ endif ! ! Factors to be fixed - if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*(-1/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) + if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*(cI/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) ! if (l_BS_magnons) X_magnons(:,:,2)=X_magnons(:,:,2)*Co_factor/(4._SP*pi) ! From 1d88c78994a3f65f15e69588de53d276f5a027c2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Jan 2022 13:00:02 +0100 Subject: [PATCH 0083/1367] Version 5.1.0, Revision 21151, Hash 5e85f81d0 MODIFIED * include/driver/version.h dipoles/DIPOLE_overlaps.F modules/mod_interfaces.F setup/setup.F wf_and_fft/WF_shift_kpoint.F wf_and_fft/WF_symm_kpoint.F Changes: - [yambo] Changes imported from devel-wfs-fix-gauge improved implementation of DIPOLE_overlaps for case n_sp_pol=2 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/dipoles/DIPOLE_overlaps.F | 32 ++++++---------- src/modules/mod_interfaces.F | 26 ++++++------- src/setup/setup.F | 9 +---- src/wf_and_fft/WF_shift_kpoint.F | 20 +++++----- src/wf_and_fft/WF_symm_kpoint.F | 65 +++++++++++++++----------------- 6 files changed, 68 insertions(+), 88 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4397d49032..a14ced2f14 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21150 -#define YAMBO_HASH "46a536cb2" +#define YAMBO_REVISION 21151 +#define YAMBO_HASH "5e85f81d0" diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 3505c34365..802698d813 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -28,13 +28,13 @@ subroutine DIPOLE_overlaps(Xk,Dip) use R_lattice, ONLY:k_map,bz_samp,WF_shifts,G_m_G use wave_func, ONLY:WF use vec_operate, ONLY:k_periodic_idx - use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_alloc + use DIPOLES, ONLY:DIPOLE_t,DIP_S use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & -& PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX,PAR_DIPk_nbz +& PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute use interfaces, ONLY:WF_shift_kpoint,WF_symm_kpoint,eval_G_minus_G,WF_load,WF_free use timing_m, ONLY:timing @@ -51,7 +51,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) integer :: iG0,ng_tmp,wf_ng_save,wf_ng_1st_BZ_save integer :: id,idx_kp(3),idx_k(3),shift(3),g0_idx(3,2) real(SP) :: g0_length(3) - complex(SP), allocatable :: WF_symm(:,:,:,:),WF_shifted(:,:,:,:),WF_ik(:,:,:,:),WF_ikp(:,:,:,:) + complex(SP), allocatable :: WF_symm(:,:,:),WF_shifted(:,:,:),WF_ik(:,:,:),WF_ikp(:,:,:) #ifdef _CUDA attributes(device):: WF_symm,WF_shifted,WF_ik,WF_ikp #endif @@ -59,14 +59,6 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call timing("DIPOLE_overlaps",OPR="start") ! - if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) - if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) - ! - ! Notice that DIP_S is defined in the BZ - ! - call DIP_alloc('DIP_S',(/Dip%ib(2),Dip%ib(2),6,PAR_DIPk_nbz/)) - DIP_S=cZERO - ! call k_find_smallest_g0(g0_idx,g0_length) iG0=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) ! @@ -94,10 +86,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/1,Xk%nibz/),space='G',title='-Oscillators/G space/Overlaps') ! - YAMBO_ALLOC(WF_symm,(wf_ng_1st_BZ,n_spinor,Dip%ib(2),n_sp_pol)) - YAMBO_ALLOC(WF_shifted,(wf_ng_overlaps,n_spinor,Dip%ib(2),n_sp_pol)) - YAMBO_ALLOC(WF_ik, (wf_ng_overlaps,n_spinor,Dip%ib(2),n_sp_pol)) - YAMBO_ALLOC(WF_ikp, (wf_ng_overlaps,n_spinor,Dip%ib(2),n_sp_pol)) + YAMBO_ALLOC(WF_symm, (wf_ng_1st_BZ, n_spinor,Dip%ib(2))) + YAMBO_ALLOC(WF_shifted,(wf_ng_overlaps,n_spinor,Dip%ib(2))) + YAMBO_ALLOC(WF_ik, (wf_ng_overlaps,n_spinor,Dip%ib(2))) + YAMBO_ALLOC(WF_ikp, (wf_ng_overlaps,n_spinor,Dip%ib(2))) ! DIP_S=cZERO ! @@ -114,9 +106,9 @@ subroutine DIPOLE_overlaps(Xk,Dip) ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) ! - call WF_symm_kpoint((/1,Dip%ib(2)/),ikbz,Xk,WF_symm) + call WF_symm_kpoint((/1,Dip%ib(2)/),ikbz,i_sp_pol,Xk,WF_symm) ! - call WF_shift_kpoint((/1,Dip%ib(2)/),ikbz,WF_shifts(ikbz,:),Xk,WF_symm,WF_ik) + call WF_shift_kpoint((/1,Dip%ib(2)/),ikbz,i_sp_pol,WF_shifts(ikbz,:),Xk,WF_symm,WF_ik) ! do id=1,3 ! Loop on the three crystal directions in the BZ ! @@ -140,7 +132,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) ikp = Xk%sstar(ikbzp,1) isp = Xk%sstar(ikbzp,2) ! - call WF_symm_kpoint((/1,Dip%ib(2)/),ikbzp,Xk,WF_symm) + call WF_symm_kpoint((/1,Dip%ib(2)/),ikbzp,i_sp_pol,Xk,WF_symm) ! ! Shift the wave-function by a G-vector if the neighbor is out of the BZ (USE_shifed_wf=.true.) shift=WF_shifts(ikbzp,:) @@ -149,14 +141,14 @@ subroutine DIPOLE_overlaps(Xk,Dip) if(WF_shifts(ikbzp,id)==0) shift(id)=1 if(WF_shifts(ikbzp,id)==2) shift(id)=0 endif - call WF_shift_kpoint((/1,Dip%ib(2)/),ikbzp,shift,Xk,WF_symm,WF_ikp) + call WF_shift_kpoint((/1,Dip%ib(2)/),ikbzp,i_sp_pol,shift,Xk,WF_symm,WF_ikp) ! do ib=1,Dip%ib(2) if(.not.PAR_IND_VAL_BANDS_OVLP%element_1D(ib)) cycle do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & - & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) + & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib),WF_ikp(:,:,ibp)) enddo ! ibp enddo ! ib ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 54a38f7272..43ba60c1be 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -277,42 +277,42 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) ! interface WF_shift_kpoint ! - subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_out) + subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,i_sp_pol,wf_shift,Xk,WF_k_in,WF_k_out) use pars, ONLY:SP - use electrons, ONLY:n_spinor,n_sp_pol + use electrons, ONLY:n_spinor use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps use R_lattice, ONLY:bz_samp - integer, intent(in) :: wf_shift(3),ikbz,b_to_shift(2) + integer, intent(in) :: wf_shift(3),ikbz,i_sp_pol,b_to_shift(2) type(bz_samp), intent(in) :: Xk complex(SP), intent(in) DEV_ATTR :: & -& WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) +& WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2)) complex(SP), intent(out) DEV_ATTR :: & -& WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) +& WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2)) end subroutine end interface ! interface WF_symm_kpoint ! - subroutine WF_symm_kpoint_cpu(b_to_load,ikbz,Xk,WF_k_out) + subroutine WF_symm_kpoint_cpu(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) use pars, ONLY:SP use R_lattice, ONLY:bz_samp use wave_func, ONLY:wf_ng_1st_BZ - use electrons, ONLY:n_spinor,n_sp_pol - integer, intent(in) :: ikbz,b_to_load(2) + use electrons, ONLY:n_spinor + integer, intent(in) :: ikbz,i_sp_pol,b_to_load(2) type(bz_samp), intent(in) :: Xk - complex(SP), intent(out) :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2),n_sp_pol) + complex(SP), intent(out) :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2)) end subroutine WF_symm_kpoint_cpu ! #ifdef _CUDA - subroutine WF_symm_kpoint_gpu(b_to_load,ikbz,Xk,WF_k_out) + subroutine WF_symm_kpoint_gpu(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) use pars, ONLY:SP use R_lattice, ONLY:bz_samp use wave_func, ONLY:wf_ng_1st_BZ - use electrons, ONLY:n_spinor,n_sp_pol - integer, intent(in) :: ikbz,b_to_load(2) + use electrons, ONLY:n_spinor + integer, intent(in) :: ikbz,i_sp_pol,b_to_load(2) type(bz_samp), intent(in) :: Xk complex(SP), intent(out) DEV_ATTR :: & -& WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2),n_sp_pol) +& WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2)) end subroutine WF_symm_kpoint_gpu #endif end interface diff --git a/src/setup/setup.F b/src/setup/setup.F index 1b1aecb40d..43d7e0bdda 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -35,7 +35,7 @@ subroutine setup(en,Xen,Ken,k,Xk) & inv_index,atoms_string,load_PT_elements,n_atoms_species,Z_species,& & n_atomic_species,PT_elements,non_periodic_directions,lattice,& & symmetry_group_table,mag_syms,idt_index,symmetry_equiv_atoms - use R_lattice, ONLY:RL_vol,b,n_g_shells,ng_in_shell,Xk_grid_new_mapping,FineGd_desc,& + use R_lattice, ONLY:RL_vol,b,n_g_shells,ng_in_shell,Xk_grid_new_mapping,FineGd_desc,g_rot,& & rl_sop,bz_samp,g_vec,E_of_shell,ng_closed,bz_samp_duplicate_Fg,MAX_kpts_to_report use com, ONLY:msg,fat_log use stderr, ONLY:intc @@ -282,12 +282,7 @@ subroutine setup(en,Xen,Ken,k,Xk) enddo if (n_to_print ! -subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_out) +subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,i_sp_pol,wf_shift,Xk,WF_k_in,WF_k_out) ! use pars, ONLY:SP,cZERO - use electrons, ONLY:n_spinor,n_sp_pol + use electrons, ONLY:n_spinor use R_lattice, ONLY:G_m_G,G_m_G_d,k_map,bz_samp use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps use deviceXlib_m, ONLY:dev_memcpy ! implicit none ! - integer, intent(in) :: wf_shift(3),ikbz,b_to_shift(2) + integer, intent(in) :: wf_shift(3),ikbz,i_sp_pol,b_to_shift(2) type(bz_samp), intent(in) :: Xk - complex(SP), intent(in) DEV_ATTR :: WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) - complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) + complex(SP), intent(in) DEV_ATTR :: WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2)) + complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2)) ! ! Work space ! integer :: id,ik,is - complex(SP) DEV_ATTR :: WF_tmp(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) + complex(SP) DEV_ATTR :: WF_tmp(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2)) integer :: ig,igp,i_b_ref integer :: g0_idx(3,2),g0_idx_val - integer :: i_spinor,i_b,i_sp_pol + integer :: i_spinor,i_b ! ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -65,19 +65,17 @@ subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k #if defined _CUDA !$cuf kernel do(4) <<<*,*>>> #endif - do i_sp_pol=1,n_sp_pol do i_b=b_to_shift(1),b_to_shift(2) do i_spinor=1,n_spinor do ig=1,wf_ng_1st_BZ ! - if(WF_tmp(ig,1,i_b_ref,1)==cZERO) cycle + if(WF_tmp(ig,1,i_b_ref)==cZERO) cycle igp=DEV_VAR(G_m_G)(ig,g0_idx_val) - WF_k_out(igp,i_spinor,i_b,i_sp_pol)=WF_tmp(ig,i_spinor,i_b,i_sp_pol) + WF_k_out(igp,i_spinor,i_b)=WF_tmp(ig,i_spinor,i_b) ! enddo enddo enddo - enddo ! else call dev_memcpy(WF_k_out,WF_tmp) diff --git a/src/wf_and_fft/WF_symm_kpoint.F b/src/wf_and_fft/WF_symm_kpoint.F index cbbfacc6d6..d4beb0222f 100644 --- a/src/wf_and_fft/WF_symm_kpoint.F +++ b/src/wf_and_fft/WF_symm_kpoint.F @@ -21,12 +21,12 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) +subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) ! ! INCLUDED in: WF_symm_kpoint_incl.F ! use pars, ONLY:SP,cZERO - use electrons, ONLY:n_sp_pol,n_spinor + use electrons, ONLY:n_spinor use wave_func, ONLY:WF,wf_ng,wf_ng_1st_BZ use R_lattice, ONLY:bz_samp,DEV_VAR(g_rot) use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),i_time_rev,nsym @@ -34,14 +34,14 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! implicit none ! - integer, intent(in) :: ikbz,b_to_load(2) + integer, intent(in) :: ikbz,i_sp_pol,b_to_load(2) type(bz_samp), intent(in) :: Xk - complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2),n_sp_pol) + complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2)) ! ! Work space ! complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) - integer :: ik,is,i_sp_pol,ib,iwf + integer :: ik,is,ib,iwf integer :: i_g,i_spinor ! ik = Xk%sstar(ikbz,1) @@ -52,47 +52,43 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! if(is==idt_index) then ! - do i_sp_pol=1,n_sp_pol - do ib=b_to_load(1),b_to_load(2) - ! - iwf=WF%index(ib,ik,i_sp_pol) - call dev_memcpy(WF_k_out(:,:,ib,i_sp_pol),DEV_VAR(WF%c)(:,:,iwf)) - ! - enddo + do ib=b_to_load(1),b_to_load(2) + ! + iwf=WF%index(ib,ik,i_sp_pol) + call dev_memcpy(WF_k_out(:wf_ng,:,ib),DEV_VAR(WF%c)(:,:,iwf)) + ! enddo ! else ! - do i_sp_pol=1,n_sp_pol - do ib=b_to_load(1),b_to_load(2) - ! - iwf=WF%index(ib,ik,i_sp_pol) + do ib=b_to_load(1),b_to_load(2) + ! + iwf=WF%index(ib,ik,i_sp_pol) + ! + if (n_spinor==1) then ! - if (n_spinor==1) then - ! #ifdef _CUDA_LOC - !$cuf kernel do(2) <<<*,*>>> + !$cuf kernel do(2) <<<*,*>>> #endif - do i_spinor=1,n_spinor - do i_g=1,wf_ng - WF_k_out(DEV_VAR(g_rot)(i_g,is),i_spinor,ib,i_sp_pol)=WF_p(i_g,i_spinor,iwf) - enddo - enddo - ! - else - ! + do i_spinor=1,n_spinor + do i_g=1,wf_ng + WF_k_out(DEV_VAR(g_rot)(i_g,is),i_spinor,ib)=WF_p(i_g,i_spinor,iwf) + enddo + enddo + ! + else + ! #ifdef _CUDA_LOC !$cuf kernel do(1) <<<*,*>>> #endif - do i_g=1,wf_ng - WF_k_out(DEV_VAR(g_rot)(i_g,is),1,ib,i_sp_pol)=DEV_VAR(spin_sop)(1,1,is)*WF_p(i_g,1,iwf)+ & + do i_g=1,wf_ng + WF_k_out(DEV_VAR(g_rot)(i_g,is),1,ib)=DEV_VAR(spin_sop)(1,1,is)*WF_p(i_g,1,iwf)+ & & DEV_VAR(spin_sop)(1,2,is)*WF_p(i_g,2,iwf) - WF_k_out(DEV_VAR(g_rot)(i_g,is),2,ib,i_sp_pol)=DEV_VAR(spin_sop)(2,1,is)*WF_p(i_g,1,iwf)+ & + WF_k_out(DEV_VAR(g_rot)(i_g,is),2,ib)=DEV_VAR(spin_sop)(2,1,is)*WF_p(i_g,1,iwf)+ & & DEV_VAR(spin_sop)(2,2,is)*WF_p(i_g,2,iwf) - enddo - endif - ! - enddo + enddo + endif + ! enddo ! if(is>nsym/(1+i_time_rev)) call dev_conjg(WF_k_out) @@ -100,4 +96,3 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) endif ! end subroutine DEV_SUB_ALT(WF_symm_kpoint) - From eb26c75fca1e4dc8e2af3e74e900eb80c28d1530 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Jan 2022 13:17:33 +0100 Subject: [PATCH 0084/1367] Version 5.1.0, Revision 21152, Hash 1d88c7899 MODIFIED * include/driver/version.h setup/setup.F Bugs: - [yambo] small bug introduced in setup fixed Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/setup/setup.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a14ced2f14..090edef057 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21151 -#define YAMBO_HASH "5e85f81d0" +#define YAMBO_REVISION 21152 +#define YAMBO_HASH "1d88c7899" diff --git a/src/setup/setup.F b/src/setup/setup.F index 43d7e0bdda..a689e80cb7 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -282,7 +282,7 @@ subroutine setup(en,Xen,Ken,k,Xk) enddo if (n_to_print Date: Tue, 25 Jan 2022 13:24:31 +0100 Subject: [PATCH 0085/1367] Version 5.1.0, Revision 21153, Hash eb26c75fc MODIFIED * include/driver/version.h dipoles/DIPOLE_overlaps.F Bugs: - [yambo] Fixed wrong merging of DIPOLE_overlaps Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_overlaps.F | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 090edef057..9322a9a7e1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21152 -#define YAMBO_HASH "1d88c7899" +#define YAMBO_REVISION 21153 +#define YAMBO_HASH "eb26c75fc" diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 802698d813..80acb5481b 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -28,13 +28,13 @@ subroutine DIPOLE_overlaps(Xk,Dip) use R_lattice, ONLY:k_map,bz_samp,WF_shifts,G_m_G use wave_func, ONLY:WF use vec_operate, ONLY:k_periodic_idx - use DIPOLES, ONLY:DIPOLE_t,DIP_S + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_alloc use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & -& PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX +& PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX,PAR_DIPk_nbz use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute use interfaces, ONLY:WF_shift_kpoint,WF_symm_kpoint,eval_G_minus_G,WF_load,WF_free use timing_m, ONLY:timing @@ -59,6 +59,15 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call timing("DIPOLE_overlaps",OPR="start") ! + if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) + if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) + ! + ! Notice that DIP_S is defined in the BZ + ! + call DIP_alloc('DIP_S',(/Dip%ib(2),Dip%ib(2),6,PAR_DIPk_nbz/)) + DIP_S=cZERO + ! + ! call k_find_smallest_g0(g0_idx,g0_length) iG0=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) ! @@ -148,7 +157,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & - & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib),WF_ikp(:,:,ibp)) + & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib),WF_ikp(:,:,ibp)) enddo ! ibp enddo ! ib ! From acda0252c20f03cb8fc9b8138612c82e33b127cd Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Jan 2022 11:14:47 +0100 Subject: [PATCH 0086/1367] Version 5.1.0, Revision 21132, Hash 34684ea60 MODIFIED * include/driver/version.h driver/options_projects.c Additions: -New flag for the Exciton-phonon self-energy Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/driver/options_projects.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 473c61f0d4..a013ee0ee6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21128 -#define YAMBO_HASH "c8bb0e2bd" +#define YAMBO_REVISION 21132 +#define YAMBO_HASH "34684ea60" diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index 09b1c377a1..1331b75fab 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -86,6 +86,12 @@ void options_projects(struct options_struct options[],int *i_opt) options[*i_opt].bin="yambo_ph"; options[*i_opt].yambo_string="ElPhHam"; options[*i_opt].section=desc; + *i_opt=*i_opt+1; + options[*i_opt].short_desc="Exction-phonon Self-Energy"; + options[*i_opt].long_opt="excph"; + options[*i_opt].bin="yambo_ph"; + options[*i_opt].yambo_string="ExcPhSE"; + options[*i_opt].section=desc; desc="Real-Time"; *i_opt=*i_opt+1; From dca01be044607abae27b645566ce2219828411cd Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Jan 2022 11:47:44 +0100 Subject: [PATCH 0087/1367] Version 5.1.0, Revision 21133, Hash acda0252c MODIFIED * interface/INIT.F interface/INIT_activate.F interface/INIT_load.F interface/INIT_read_command_line.F modules/.objects modules/SET_defaults.F modules/mod_drivers.F NEW * modules/mod_EXCPH.F Additions: -New input file Patch sent by: Claudio Attaccalite --- src/interface/INIT.F | 4 +- src/interface/INIT_activate.F | 6 ++- src/interface/INIT_load.F | 8 ++++ src/interface/INIT_read_command_line.F | 2 +- src/modules/.objects | 2 +- src/modules/SET_defaults.F | 8 ++++ src/modules/mod_EXCPH.F | 58 ++++++++++++++++++++++++++ src/modules/mod_drivers.F | 2 + 8 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 src/modules/mod_EXCPH.F diff --git a/src/interface/INIT.F b/src/interface/INIT.F index e49ed7b527..a740c06e44 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -33,7 +33,7 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) & l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hartree,l_tddft,list_dbs,l_td_hf,l_setup,l_sc_run,l_rim,& & l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,& & l_elph_Hamiltonian,l_elph_scatt,l_elphoton_corr,l_elphoton_scatt,l_em1d,l_eval_collisions,& -& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_scatt,l_phel_corr +& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_scatt,l_phel_corr,l_EXCPH_Sigma #if defined _SCALAPACK use drivers, ONLY:l_slk_test #endif @@ -372,6 +372,8 @@ subroutine logicalson l_phel_corr=runlevel_is_on('ph_el_corr') endif l_elel_corr=runlevel_is_on('el_el_corr') + l_EXCPH_Sigma=runlevel_is_on('ExPhSE') + #endif #if defined _QED l_elel_corr =runlevel_is_on('el_el_corr') diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index e6c889697b..5712283352 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -31,7 +31,8 @@ subroutine INIT_activate() & l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hf,l_setup,l_sc_run,l_rim,& & l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,& & l_elph_Hamiltonian,l_elph_scatt,l_elphoton_corr,l_elphoton_scatt,l_em1d,l_eval_collisions,& -& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_corr,l_nl_p_and_p +& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_corr,l_nl_p_and_p, & +& l_EXCPH_gkkp,l_EXCPH_Sigma #if defined _SC || defined _RT use hamiltonian, ONLY:H_potential #endif @@ -437,6 +438,9 @@ subroutine INIT_activate() call initactivate(-1,'WRgFsq NewtDchk GDamping ExtendOut OnMassShell') endif ! + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LinPath LoutPath FANdEtresh') + if (l_EXCPH_Sigma) call initactivate(1, 'GEnSteps GEnRnge GDmRnge') + ! #endif ! endif diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index e6275c3e55..63bfcb64d0 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,6 +108,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lin_path,Lout_path #endif #if defined _OPENMP use openmp, ONLY:n_threads_X,n_threads_SE,n_threads_RT,n_threads_DIP,n_threads_K,n_threads_NL @@ -169,6 +170,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _ELPH call it('r',defs,'el_ph_corr', '[R] Electron-Phonon Correlation') + call it('r',defs,'ExcPhSigma', '[R][EXCPH] Exciton-Phonon Self-Energy') + call it('r',defs,'ExcitonGkkp', '[R][EXCPH] Exciton-Phonon Matrix Elelements') #endif #if defined _PHEL call it('r',defs,'ph_el_corr', '[R] Phonon-Electron Correlation') @@ -653,6 +656,11 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'DWdEtresh', '[ELPH] Energy treshold for DW denominator',DW_deltaE_treshold,verb_level=V_ph,unit=E_unit) call it(defs,'GkkpDB', '[ELPH] GKKP database (gkkp | gkkp_expanded | genFroh )',gkkp_db,verb_level=V_ph) ! + call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) + call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) + call it(defs,'LinPath', '[EXCPH] Path of the incoming L',Lin_path) + call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lin_path) + ! ! GPL_EXCLUDE_START ! call it(defs,'ElPhHBRnge','[ELPH] Hamiltonian bands range',elph_Ham_bands) diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index 98b1f13ba2..e6ad285528 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -25,7 +25,7 @@ subroutine INIT_read_command_line(rstr,init_) ! use pars, ONLY:schlen use drivers, ONLY:infile_editing,l_bse,l_alda_fxc,l_chi,l_elel_corr,l_nl_p_and_p,& -& l_elel_scatt,l_elph_corr,l_elph_scatt,l_elphoton_corr,& +& l_elel_scatt,l_elph_corr,l_elph_scatt,l_elphoton_corr,l_EXCPH_gkkp,l_EXCPH_Sigma, & & l_elphoton_scatt,l_em1s,l_em1d,l_ppa,l_phel_scatt,l_phel_corr,l_dipoles use BS, ONLY:BSK_mode use BS_solvers, ONLY:BSS_mode diff --git a/src/modules/.objects b/src/modules/.objects index 8312c3bb23..3136f48cb8 100644 --- a/src/modules/.objects +++ b/src/modules/.objects @@ -20,7 +20,7 @@ NL_objects = mod_fields.o mod_electric.o mod_nl_optics.o mod_NL_interfaces objs = mod_pars.o mod_stderr.o mod_parallel.o mod_parallel_interface.o \ mod_com_interfcs.o mod_descriptors.o mod_com.o mod_IO.o mod_IO_interfaces.o #else -ELPH_objects = mod_ELPH.o mod_PHEL.o +ELPH_objects = mod_ELPH.o mod_PHEL.o mod_EXCPH.o DEV_objects = mod_cusolverdn_y.o mod_cuda.o objs = mod_pars.o mod_units.o mod_lexical_sort.o mod_stderr.o mod_memory.o mod_openmp.o mod_parallel.o mod_parallel_interface.o mod_matrix.o mod_SLK.o \ mod_linear_algebra.o mod_wrapper.o mod_wrapper_omp.o mod_drivers.o mod_FFT.o\ diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 776461c156..1cda864e23 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -84,6 +84,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -531,6 +532,13 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) EkplusQ_mode='interp' ! E(k+q) energies (interp | dftp ) gkkp_db='gkkp' ! gkkp_db ( gkkp | gkkp_expanded | genFroh ) ! + ! EXC-PH + ! + Lin_path ='none' + Lout_path='none' + EXCPH_states=(/1,1/) + EXCPH_sum=(/1,1/) + ! #endif ! #if defined _SC || defined _RT || defined _QED || defined _NL diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F new file mode 100644 index 0000000000..e70661fd31 --- /dev/null +++ b/src/modules/mod_EXCPH.F @@ -0,0 +1,58 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +module EXCPH + ! + use pars, ONLY:SP,schlen,lchlen + ! + ! Exciton-Phonon + !================ + ! + ! ... GKKP & EXC-PH Interaction + complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) + real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) + integer :: EXCPH_states(2) + integer :: EXCPH_sum(2) + character(schlen) :: EXCPH_kind + ! + ! L_in and L_out paths + ! + character(lchlen) :: Lin_path + character(lchlen) :: Lout_path + ! + ! ... Sigma + complex(SP), allocatable :: BS_Sat_E(:,:,:) + complex(SP), allocatable :: BS_Sat_E_PH_abs(:,:,:) + real(SP), allocatable :: BS_Sat_WEIGHT(:,:,:) + real(SP), allocatable :: BS_Sat_WEIGHT_PH_abs(:,:,:) + real(SP), allocatable :: EXCPH_Renorm(:) + real(SP), allocatable :: EXCPH_Renorm_PH_abs(:) + complex(SP), allocatable :: BS_EXCPH_E(:) + real(SP), allocatable :: ph_EXCPH_E(:) + complex(SP), allocatable :: BS_mat_gamma(:,:) + complex(SP), allocatable :: BS_E_gamma(:) + integer, allocatable :: BSS_eh_table_gamma(:,:) + complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) + complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) + ! +end module EXCPH diff --git a/src/modules/mod_drivers.F b/src/modules/mod_drivers.F index e3c6051cfc..d5572c4090 100644 --- a/src/modules/mod_drivers.F +++ b/src/modules/mod_drivers.F @@ -66,6 +66,8 @@ module drivers ! Electron-Phonon specific flags ! logical :: l_elph_Hamiltonian =.FALSE. + logical :: l_EXCPH_Sigma =.FALSE. + logical :: l_EXCPH_gkkp =.FALSE. ! ! Real Axis non SC Self-energies ! From 63746cc4358697d16be5a2fdf1f9eb21aa93c977 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 28 Jan 2022 00:24:13 +0100 Subject: [PATCH 0088/1367] Version 5.1.0, Revision 21154, Hash 259b7c8 MODIFIED * modified: src/bse/K_IP.F src/bse/K_Transition_check.F src/dipoles/DIPOLE_IO.F src/dipoles/DIPOLE_dimensions.F src/dipoles/DIPOLE_shifted_grids.F src/dipoles/DIPOLE_transverse.F src/interface/INIT_load.F src/modules/mod_DIPOLES.F src/parallel/PARALLEL_global_indexes.F src/pol_function/X_irredux_residuals.F NEW * lib/yambo Bugs: - [yambo] tresh renamed thresh Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_IP.F | 2 +- src/bse/K_Transition_check.F | 2 +- src/dipoles/DIPOLE_IO.F | 4 ++-- src/dipoles/DIPOLE_dimensions.F | 2 +- src/dipoles/DIPOLE_shifted_grids.F | 4 ++-- src/dipoles/DIPOLE_transverse.F | 10 +++++----- src/interface/INIT_load.F | 2 +- src/modules/mod_DIPOLES.F | 12 ++++++------ src/parallel/PARALLEL_global_indexes.F | 2 +- src/pol_function/X_irredux_residuals.F | 4 ++-- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9322a9a7e1..c491c32366 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21153 -#define YAMBO_HASH "eb26c75fc" +#define YAMBO_REVISION 21154 +#define YAMBO_HASH "259b7c8" diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 8873ecdd22..a46adb0b7f 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -215,7 +215,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif ! - if ( abs(real(E_plus_W0)) < Dip%Energy_treshold .and. iq==1 .and. dip_r ) then + if ( abs(real(E_plus_W0)) < Dip%Energy_threshold .and. iq==1 .and. dip_r ) then res_abs =0._SP res_kerr=0._SP res_PL =0._SP diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 175db8b989..eac136663b 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -57,7 +57,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! ! Small energy transitions. Dipoles in length gauge are not defined if ((.not.l_BS_magnons).and.iq==1) then - if ( abs(Eo_eh) < Dip%Energy_treshold .and. trim(global_gauge)=="length") K_Transition_check=.FALSE. + if ( abs(Eo_eh) < Dip%Energy_threshold .and. trim(global_gauge)=="length") K_Transition_check=.FALSE. endif ! Null energy transitions are always removed if ( abs(E_eh) == 0._SP ) K_Transition_check=.FALSE. diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 1c1d2e9bb7..8e905249bb 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -263,8 +263,8 @@ subroutine fix_velocity(Dip,dir) den=Ev_m_Ec_QP endif ! - if (abs(den)<=Dip%Energy_treshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=cZERO - if (abs(den)> Dip%Energy_treshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=DIP_v(:,ic,iv,ik_mem,i_sp_pol)*(num/den) + if (abs(den)<=Dip%Energy_threshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=cZERO + if (abs(den)> Dip%Energy_threshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=DIP_v(:,ic,iv,ik_mem,i_sp_pol)*(num/den) ! enddo enddo diff --git a/src/dipoles/DIPOLE_dimensions.F b/src/dipoles/DIPOLE_dimensions.F index 2d1d7fb8f8..a3e68d0322 100644 --- a/src/dipoles/DIPOLE_dimensions.F +++ b/src/dipoles/DIPOLE_dimensions.F @@ -60,7 +60,7 @@ subroutine DIPOLE_dimensions(Xen,Dip,bands,q0) ! ! Set up band limits ! - if (Dip%bands_ordered.or.Dip%Energy_treshold<0._SP) then + if (Dip%bands_ordered.or.Dip%Energy_threshold<0._SP) then Dip%ib_lim(1)=maxval(Xen%nbm) Dip%ib_lim(2)=minval(Xen%nbf)+1 if (l_X_terminator) Dip%ib_lim(2)=Dip%ib(1) diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 03fe0e60b3..9211269208 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -229,7 +229,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) ! - if (abs(Ev_m_Ec_KS)<=Dip%Energy_treshold .or. iv==ic) then + if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold .or. iv==ic) then call live_timing(steps=1) cycle endif @@ -283,7 +283,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) do ic=ic_min,Dip%ib(2) Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) - if (abs(Ev_m_Ec_KS)<=Dip%Energy_treshold .or. iv==ic) cycle + if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold .or. iv==ic) cycle DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS enddo endif diff --git a/src/dipoles/DIPOLE_transverse.F b/src/dipoles/DIPOLE_transverse.F index ab467e75a4..48a4de2085 100644 --- a/src/dipoles/DIPOLE_transverse.F +++ b/src/dipoles/DIPOLE_transverse.F @@ -63,7 +63,7 @@ subroutine Dipole_transverse(Xen,Xk,Dip) complex(SP), allocatable :: kbv(:,:,:,:) complex(SP), allocatable DEV_ATTR :: kbv_d(:,:,:,:) complex(SP) :: rho_spinor(3,n_spinor,n_spinor),rho(3),P2 - real(SP) :: Ev_m_Ev_KS,Dipole_Energy_treshold + real(SP) :: Ev_m_Ev_KS,Dipole_Energy_threshold ! !I/O and external functions ! @@ -241,8 +241,8 @@ subroutine Dipole_transverse(Xen,Xk,Dip) ! define a different thr for val-val transitions ! used for XTerm (here Ev_m_Ev_KS may become very large) ! - Dipole_Energy_treshold=Dip%Energy_treshold - if(l_X_terminator.and.ic<=Dip%ib_lim(1)) Dipole_Energy_treshold=Dip%Energy_treshold_vv + Dipole_Energy_threshold=Dip%Energy_threshold + if(l_X_terminator.and.ic<=Dip%ib_lim(1)) Dipole_Energy_threshold=Dip%Energy_threshold_vv ! !===== ! @@ -274,8 +274,8 @@ subroutine Dipole_transverse(Xen,Xk,Dip) if (.not.allocated(Xen%Eo)) Ev_m_Ev_KS=Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) if ( allocated(Xen%Eo)) Ev_m_Ev_KS=Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) ! - if (abs(Ev_m_Ev_KS)> Dipole_Energy_treshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=rho/Ev_m_Ev_KS - if (abs(Ev_m_Ev_KS)<=Dipole_Energy_treshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=cZERO + if (abs(Ev_m_Ev_KS)> Dipole_Energy_threshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=rho/Ev_m_Ev_KS + if (abs(Ev_m_Ev_KS)<=Dipole_Energy_threshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=cZERO ! endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 2cfd6734e7..a7e3119319 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -630,7 +630,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'DipBands', '[DIP] Bands range for dipoles',Dip%ib,verb_level=V_resp) call it(defs,'DipQpts', '[DIP] Qpts range for dipoles',Dip%iq,verb_level=V_resp) - call it(defs,'DipoleEtresh', '[DIP] Treshold in the definition of R=P/deltaE',Dip%Energy_treshold,& + call it(defs,'DipoleEtresh', '[DIP] Treshold in the definition of R=P/deltaE',Dip%Energy_threshold,& & verb_level=V_resp,unit=E_unit) call it(defs,'DipApproach', '[DIP] [G-space v/R-space x/Covariant/Shifted grids/derk]',Dip%approach,verb_level=V_resp) call it(defs,'DipComputed', '[DIP] [default R P V; extra P2 Spin Orb]',Dip%computed,verb_level=V_resp) diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index 01a4a11d86..1d16911eda 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -71,8 +71,8 @@ module DIPOLES integer :: ng real(SP) :: ehe(2) real(SP) :: q0(3) - real(SP) :: Energy_treshold - real(SP) :: Energy_treshold_vv + real(SP) :: Energy_threshold + real(SP) :: Energy_threshold_vv logical :: v_eff logical :: Vnl_included logical :: bands_ordered @@ -172,8 +172,8 @@ subroutine DIPOLES_duplicate(Dip_in,Dip_out) Dip_out%ng = Dip_in%ng Dip_out%ehe = Dip_in%ehe Dip_out%q0 = Dip_in%q0 - Dip_out%Energy_treshold = Dip_in%Energy_treshold - Dip_out%Energy_treshold_vv = Dip_in%Energy_treshold_vv + Dip_out%Energy_threshold = Dip_in%Energy_threshold + Dip_out%Energy_threshold_vv = Dip_in%Energy_threshold_vv Dip_out%v_eff = Dip_in%v_eff Dip_out%Vnl_included = Dip_in%Vnl_included Dip_out%bands_ordered = Dip_in%bands_ordered @@ -192,8 +192,8 @@ subroutine DIPOLES_reset(Dip) Dip%ng=0 Dip%ehe=(/-1._SP,-1._SP/)/HA2EV Dip%q0=(/1._SP,0._SP,0._SP/) - Dip%Energy_treshold=1.E-5_SP/HA2EV - Dip%Energy_treshold_vv=1.E+5_SP/HA2EV + Dip%Energy_threshold=1.E-5_SP/HA2EV + Dip%Energy_threshold_vv=1.E+5_SP/HA2EV Dip%v_eff=.false. Dip%Vnl_included=.false. Dip%bands_ordered=.true. diff --git a/src/parallel/PARALLEL_global_indexes.F b/src/parallel/PARALLEL_global_indexes.F index faa1b0367c..19434f647c 100644 --- a/src/parallel/PARALLEL_global_indexes.F +++ b/src/parallel/PARALLEL_global_indexes.F @@ -131,7 +131,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre Do_dip_limits=.not.Dip_limits_pre_defined endif if (Do_dip_limits) then - if (Dip%bands_ordered.or.Dip%Energy_treshold<0._SP) then + if (Dip%bands_ordered.or.Dip%Energy_threshold<0._SP) then Dip%ib_lim(1)=maxval(E%nbm) Dip%ib_lim(2)=minval(E%nbf)+1 if (l_X_terminator) Dip%ib_lim(2)=Dip%ib(1) diff --git a/src/pol_function/X_irredux_residuals.F b/src/pol_function/X_irredux_residuals.F index 1e88072339..d1a9f18cce 100644 --- a/src/pol_function/X_irredux_residuals.F +++ b/src/pol_function/X_irredux_residuals.F @@ -122,7 +122,7 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt) ! Z_eh_occ = Xen%f(iv,ikp,i_spin)*(spin_occ-Xen%f(ic,ik,i_spin))/spin_occ/real(Xk%nbz,SP)/DL_vol*real(Z_) ! - if (iq==1.and.abs(coarse_grid_Pt(i_cg)) Date: Fri, 28 Jan 2022 00:26:06 +0100 Subject: [PATCH 0089/1367] Version 5.1.0, Revision 21155, Hash 63746cc MODIFIED * modified: src/dipoles/DIPOLE_build_der_k.F src/linear_algebra/SERIAL_SVD.F NEW * lib/yambo Bugs: - [yambo] Fixed derk approach to dipoles (although it slightly underestimate the absorption intensity) Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 26 ++++++++++++++++++++++---- src/linear_algebra/SERIAL_SVD.F | 6 ++++-- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c491c32366..7d8b130706 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21154 -#define YAMBO_HASH "259b7c8" +#define YAMBO_REVISION 21155 +#define YAMBO_HASH "63746cc" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 2b7b52c5b8..b2ffea20bf 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -88,7 +88,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) delta(ib,ib)=cONE enddo ! - deg_thresh=0.005/HA2EV + Dip%Energy_threshold=max(Dip%Energy_threshold,0.001/HA2EV) + deg_thresh=Dip%Energy_threshold ! do i_sp_pol=1,n_sp_pol ! @@ -186,10 +187,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) ,hermitian(U_r(:,:,istep)) ) & & -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep)) ) -!& +matmul( U_l(:,:,istep), DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ) & -!& -2*delta(:,:) ! - Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP ! enddo ! @@ -228,6 +227,25 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) enddo enddo ! + !===== + ! + !===== + if(.not.Dip%force_v_g_space) then + do iv=Dip%ib(1),Dip%ib_lim(1) + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv)) cycle + do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) + if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle + Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) + if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) + do idir=1,3 + DIP_v(idir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS + enddo + ! + enddo + enddo + ! + endif + ! call live_timing(steps=1) ! enddo ! ik iiBZ loop diff --git a/src/linear_algebra/SERIAL_SVD.F b/src/linear_algebra/SERIAL_SVD.F index 8262a37b94..6830e0b242 100644 --- a/src/linear_algebra/SERIAL_SVD.F +++ b/src/linear_algebra/SERIAL_SVD.F @@ -71,17 +71,19 @@ subroutine SERIAL_SVD(n,M,mode,SVD_digits) endif enddo ! + call M_by_M('c','c',n,WS%m1_cmplx,WS%m2_cmplx,M) + ! elseif(index(mode,'uni')/=0) then ! ! Transform in a unitary matrix ! U= M1*I*M2 ! + call M_by_M('n','n',n,WS%m2_cmplx,WS%m1_cmplx,M) + ! else call error('Error SVD mode ') endif ! - call M_by_M('c','c',n,WS%m1_cmplx,WS%m2_cmplx,M) - ! call LINEAR_ALGEBRA_WS_reset(WS) ! call timing('SERIAL_SVD',OPR='stop') From 1d12e3cd225b77ac42a5b8d42c6f484e844edd40 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 28 Jan 2022 11:01:24 +0100 Subject: [PATCH 0090/1367] Version 5.1.0, Revision 21134, Hash dca01be04 MODIFIED * include/driver/version.h driver/options_projects.c interface/INIT.F interface/INIT_activate.F interface/INIT_load.F Additions: -Fixed input file Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/driver/options_projects.c | 2 +- src/interface/INIT.F | 8 +++++--- src/interface/INIT_activate.F | 8 +++++--- src/interface/INIT_load.F | 3 +-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a013ee0ee6..037760c272 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21132 -#define YAMBO_HASH "34684ea60" +#define YAMBO_REVISION 21134 +#define YAMBO_HASH "dca01be04" diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index 1331b75fab..ee668e862a 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -90,7 +90,7 @@ void options_projects(struct options_struct options[],int *i_opt) options[*i_opt].short_desc="Exction-phonon Self-Energy"; options[*i_opt].long_opt="excph"; options[*i_opt].bin="yambo_ph"; - options[*i_opt].yambo_string="ExcPhSE"; + options[*i_opt].yambo_string="ExcPhSigma"; options[*i_opt].section=desc; desc="Real-Time"; diff --git a/src/interface/INIT.F b/src/interface/INIT.F index a740c06e44..6f09de4236 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -31,7 +31,7 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) ! use drivers, ONLY:infile_editing,l_em1s,l_acfdt,l_HF_and_locXC,l_col_cut,l_alda_fxc,l_bs_fxc,l_optics,l_bse,l_bss,& & l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hartree,l_tddft,list_dbs,l_td_hf,l_setup,l_sc_run,l_rim,& -& l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,& +& l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,l_EXCPH_gkkp,& & l_elph_Hamiltonian,l_elph_scatt,l_elphoton_corr,l_elphoton_scatt,l_em1d,l_eval_collisions,& & l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_scatt,l_phel_corr,l_EXCPH_Sigma #if defined _SCALAPACK @@ -366,14 +366,15 @@ subroutine logicalson endif ! l_elph_Hamiltonian=runlevel_is_on('ElPhHam').and.io_ELPH_err(1)==0 + l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma').and.io_ELPH_err(1)==0 else l_elph_corr=runlevel_is_on('el_ph_corr') l_elph_Hamiltonian=runlevel_is_on('ElPhHam') + l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma') l_phel_corr=runlevel_is_on('ph_el_corr') endif l_elel_corr=runlevel_is_on('el_el_corr') - l_EXCPH_Sigma=runlevel_is_on('ExPhSE') - + l_EXCPH_gkkp=runlevel_is_on('ExcGkkp') #endif #if defined _QED l_elel_corr =runlevel_is_on('el_el_corr') @@ -440,6 +441,7 @@ subroutine before_infile_write_setup if (.not.any((/l_elel_corr,l_elph_corr,l_elphoton_corr,l_phel_corr/))) l_elel_corr=.true. #if defined _ELPH elph_nQ_used=elph_nQ + if(l_EXCPH_Sigma) call initactivate(1,'ExcGkkp') #endif #if defined _PHEL PH_Q=(/1,elph_nQ/) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 5712283352..2a0044de1a 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -438,9 +438,6 @@ subroutine INIT_activate() call initactivate(-1,'WRgFsq NewtDchk GDamping ExtendOut OnMassShell') endif ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LinPath LoutPath FANdEtresh') - if (l_EXCPH_Sigma) call initactivate(1, 'GEnSteps GEnRnge GDmRnge') - ! #endif ! endif @@ -456,6 +453,11 @@ subroutine INIT_activate() call initactivate(1,'ElPhHBRnge ElPhModes ElPhHKpt GDamping REStresh') endif ! + ! Exciton-phonon Self-energy + ! + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LinPath LoutPath FANdEtresh') + if (l_EXCPH_Sigma) call initactivate(1,'GEnSteps GEnRnge GDmRnge') + ! #endif ! #if defined _SC || defined _RT diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 63bfcb64d0..8bf4e6b9bf 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -170,8 +170,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _ELPH call it('r',defs,'el_ph_corr', '[R] Electron-Phonon Correlation') - call it('r',defs,'ExcPhSigma', '[R][EXCPH] Exciton-Phonon Self-Energy') - call it('r',defs,'ExcitonGkkp', '[R][EXCPH] Exciton-Phonon Matrix Elelements') + call it('r',defs,'ExcGkkp', '[R][EXCPH] Exciton-Phonon Matrix Elelements') #endif #if defined _PHEL call it('r',defs,'ph_el_corr', '[R] Phonon-Electron Correlation') From 511ed3f62d692c2184c3cd27334678a7e873800d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 28 Jan 2022 13:20:12 +0100 Subject: [PATCH 0091/1367] Version 5.1.0, Revision 21135, Hash 1d12e3cd2 MODIFIED * driver/yambo.F include/driver/version.h el-ph/.objects el-ph/ELPH_Sigma_c.F modules/mod_drivers.F RENAMED * el-ph/ELPH_GreenF.F -> el-ph/ELPH_Sigma_c_engine.F Changes: -Better name for the ELPH Sigma_c engine from A. Marini Patch sent by: Claudio Attaccalite --- driver/yambo.F | 17 ++++++++++++++++- include/driver/version.h | 4 ++-- src/el-ph/.objects | 2 +- src/el-ph/ELPH_Sigma_c.F | 2 +- .../{ELPH_GreenF.F => ELPH_Sigma_c_engine.F} | 2 +- src/modules/mod_drivers.F | 3 +++ 6 files changed, 24 insertions(+), 6 deletions(-) rename src/el-ph/{ELPH_GreenF.F => ELPH_Sigma_c_engine.F} (98%) diff --git a/driver/yambo.F b/driver/yambo.F index ad4040faec..d0b756b133 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -31,7 +31,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! / / Y88b / Y888b 888__/ `88_-~ ! use drivers, ONLY:l_HF_and_locXC,l_sc_run,l_eval_collisions,l_real_time,& -& l_optics,l_chi,l_em1s,l_ppa,l_bss,l_bse,l_em1d,& +& l_optics,l_chi,l_em1s,l_ppa,l_bss,l_bse,l_em1d,l_EXCPH_gkkp,l_EXCPH_Sigma,& & l_gw0,l_life,l_acfdt,l_dipoles,l_nl_optics,l_elel_corr,l_phel_corr #if defined _SCALAPACK use drivers, ONLY:l_slk_test @@ -234,6 +234,21 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if (driver_now) call K_driver(Xen,Ken,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip) if (driver_now) call mem_manager_report ! + ! EXCITON-PHONON MATRIX ELEMENTS + ! ============================== + driver_now=l_EXC_gkkp + if (driver_now) call + ! + ! EXCITON-PHONON MATRIX ELEMENTS + ! ============================== + driver_now=l_EXCPH_gkkp + if (driver_now) call + ! +! driver_now=l_EXCPH_Sigma +! if (driver_now) call + ! + ! + ! ! ACFDT !======= ! diff --git a/include/driver/version.h b/include/driver/version.h index 037760c272..5a6a3c7328 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21134 -#define YAMBO_HASH "dca01be04" +#define YAMBO_REVISION 21135 +#define YAMBO_HASH "1d12e3cd2" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 2337fb9cb3..fd12981d58 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o \ - ELPH_gsqF_to_Sigma.o ELPH_GreenF.o En_k_plus_q_interpolate.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index e11870a925..5596410cb4 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -398,7 +398,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) ! ! ELPH_GreenF evaluate real and imaginary part of the electron-phonon self-energy ! - call ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_W(i_qp),q_weight(iq_bz)) + call ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_W(i_qp),q_weight(iq_bz)) ! enddo ! diff --git a/src/el-ph/ELPH_GreenF.F b/src/el-ph/ELPH_Sigma_c_engine.F similarity index 98% rename from src/el-ph/ELPH_GreenF.F rename to src/el-ph/ELPH_Sigma_c_engine.F index f4a0a87f9e..e282475bb2 100644 --- a/src/el-ph/ELPH_GreenF.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -37,7 +37,7 @@ !! @param[out] gsqF_life_bose Imaginary part Fan self-energy Bose part !! @param[out] gsqF_life_f Imaginary part Fan self-energy Fermi part ! -subroutine ELPH_GreenF(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_W,q_weight) +subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en,k,q,Sc_W,q_weight) ! use pars, ONLY:SP,pi,cZERO use units, ONLY:HA2THZ,HA2EV diff --git a/src/modules/mod_drivers.F b/src/modules/mod_drivers.F index d5572c4090..38e3627073 100644 --- a/src/modules/mod_drivers.F +++ b/src/modules/mod_drivers.F @@ -66,6 +66,9 @@ module drivers ! Electron-Phonon specific flags ! logical :: l_elph_Hamiltonian =.FALSE. + ! + ! Exciton-phonon specific flags + ! logical :: l_EXCPH_Sigma =.FALSE. logical :: l_EXCPH_gkkp =.FALSE. ! From 3e981ecc022ab923585efdce8ebdc3720fd58e72 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 28 Jan 2022 13:53:34 +0100 Subject: [PATCH 0092/1367] Version 5.1.0, Revision 21136, Hash 511ed3f62 MODIFIED * driver/yambo.F include/driver/version.h Bugs: -Fixed compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 10 +++++----- include/driver/version.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index d0b756b133..7e55844bab 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -236,13 +236,13 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! ! EXCITON-PHONON MATRIX ELEMENTS ! ============================== - driver_now=l_EXC_gkkp - if (driver_now) call + driver_now=l_EXCPH_gkkp + !if (driver_now) call ! - ! EXCITON-PHONON MATRIX ELEMENTS + ! EXCITON-PHONON Self-Energy ! ============================== - driver_now=l_EXCPH_gkkp - if (driver_now) call +! driver_now=l_EXCPH_gkkp +! if (driver_now) call ! ! driver_now=l_EXCPH_Sigma ! if (driver_now) call diff --git a/include/driver/version.h b/include/driver/version.h index 5a6a3c7328..ef0c848831 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21135 -#define YAMBO_HASH "1d12e3cd2" +#define YAMBO_REVISION 21136 +#define YAMBO_HASH "511ed3f62" From c040ba3d8c3f988e750307d7b7883432cebe94d6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 28 Jan 2022 16:42:24 +0100 Subject: [PATCH 0093/1367] Version 5.1.0, Revision 21137, Hash 3e981ecc0 MODIFIED * driver/yambo.F include/driver/version.h interface/INIT_activate.F interface/INIT_load.F NEW * el-ph/EXCPH_gkkp_eval.F Bugs: - Additions: -Work in progress Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 +- src/el-ph/EXCPH_gkkp_eval.F | 479 ++++++++++++++++++++++++++++++++++ src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 5 +- 5 files changed, 485 insertions(+), 7 deletions(-) create mode 100644 src/el-ph/EXCPH_gkkp_eval.F diff --git a/driver/yambo.F b/driver/yambo.F index 7e55844bab..d46863e49f 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -237,7 +237,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! EXCITON-PHONON MATRIX ELEMENTS ! ============================== driver_now=l_EXCPH_gkkp - !if (driver_now) call +! if (driver_now) call ! ! EXCITON-PHONON Self-Energy ! ============================== diff --git a/include/driver/version.h b/include/driver/version.h index ef0c848831..3dc848e243 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21136 -#define YAMBO_HASH "511ed3f62" +#define YAMBO_REVISION 21137 +#define YAMBO_HASH "3e981ecc0" diff --git a/src/el-ph/EXCPH_gkkp_eval.F b/src/el-ph/EXCPH_gkkp_eval.F new file mode 100644 index 0000000000..4e5f3d1d89 --- /dev/null +++ b/src/el-ph/EXCPH_gkkp_eval.F @@ -0,0 +1,479 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! --- Theory --- +! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! - FP +! +subroutine EXCPH_Gkkp_eval(iq,E,k,q,X) + ! + use pars, ONLY:SP,cZERO + use drivers, ONLY:l_EXCPH_Sigma + use electrons, ONLY:levels,n_sp_pol + use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab + use R_lattice, ONLY:nqibz,bz_samp,qindx_B_load + use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message + use IO_int, ONLY:io_control + use X_m, ONLY:X_t + use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat + use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP + use EXCPH, ONLY:BS_mat_gamma,BSS_eh_table_gamma,EXCPH_Gkkp,EXCPH_Gkkp_sq,& +& EXCPH_states,EXCPH_sum,EXCPH_kind + use LIVE_t, ONLY:live_timing +#include + ! + type(levels) ::E + type(bz_samp) ::k,q + type(X_t) ::X + ! + ! Work Space + ! + integer :: iq,ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,il,i_H,i_Hp,i_alpha,& +& iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz,STATES(2),SUM(2) + integer, save :: ID_gkkp + real(SP) :: ph_E,elph_gkkp_sq + complex(SP),allocatable :: BS_E(:),A_rot(:,:),Xi(:,:,:) + integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) + integer, external :: io_ELPH,io_EXCPH_gkkp + integer, external ::qindx_B_init,qindx_B_close + integer :: qindx_tmp(2),qindx_ID,qindx_ID_frag + ! + if (i_time_rev/=0) then + call warning("Excitonic Gkkp: Spatial inversion not detected and Time-Reversal symmetry not implemented") + !return + endif + if (BS_res_ares_n_mat/=1) then + call warning("Excitonic Gkkp: anti-resonant part not implemented") + return + endif + ! + call section('-','Excitonic Gkkp m.e.') + !====================================== + ! + ! LIMITATIONS: + ! [1] The matrix elements can only be computed with all symmetries turned off + ! until the proper rules for expansion of phonon and exciton eigenstates are + ! figured out and implemented. + ! + ! Headers ... + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_BS) + io_err=io_BSS_diago(iq,1,ID_BS,X,bsE=BS_E) + ! + if (.not.BSS_write_eig_2_db) call error("BSS diago DB does not contain the eigenstates") + ! + ! pre-allocs... + ! + YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) + YAMBO_ALLOC(A_rot,(BS_H_dim,BSS_n_eig)) + YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) + YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) + ! + STATES=EXCPH_states + SUM =EXCPH_sum + ! + if ((STATES(2).GT.BS_H_dim).or.(SUM(2).GT.BS_H_dim)) then + call error("Number of exc. states in the excphon coupling must <= than the size of the exc. Hamiltonian") + endif + ! + YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),SUM(1):SUM(2),STATES(1):STATES(2))) + YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),SUM(1):SUM(2),STATES(1):STATES(2))) + YAMBO_ALLOC(Xi,(BS_H_dim,SUM(1):SUM(2),2)) + ! + Xi=cZERO + EXCPH_Gkkp=cZERO + EXCPH_Gkkp_sq=0 + k_plus_q_table = 0 + BSS_eh_table = 0 + BSS_eh_table_m1 = 0 + ! + if (iq==1) then + YAMBO_ALLOC(BS_mat_gamma,(BS_H_dim,STATES(1):STATES(2))) + YAMBO_ALLOC(BSS_eh_table_gamma,(STATES(1):STATES(2),3+n_sp_pol-1)) + endif + ! + ! Eigenstates/values ... + ! + call read_according_to_scattering_type() + ! + ! k_plus_q_table + ! + ! For each K_bz,Q_bz k_plus_q_table(ik_bz,iq_bz)=ip_bz with + ! + ! K_bz+Q_bz=P_bz + ! + qindx_tmp=qindx_B_init(qindx_ID,qindx_ID_frag) + !do ik_bz=1,10 + ! qindx_tmp=qindx_B_load(ik_bz,ik_bz+500,qindx_ID) + ! write(*,*) ik_bz, qindx_tmp + !enddo + !stop + write(*,*) 'start of k+q loop' + ! + !write(*,*) 'qindx_ID', qindx_ID + !qindx_tmp=qindx_B_init(qindx_ID) + ! + write(*,*) 'qindx_B_init done' + do ik_bz=1,k%nbz + IQ_bz_loop: do iq_bz=1,q%nbz + do ip_bz=1,k%nbz + qindx_tmp=qindx_B_load(ip_bz,ik_bz,qindx_ID_frag) + if (qindx_tmp(1)==iq_bz) then + k_plus_q_table(ik_bz,iq_bz)=ip_bz + cycle IQ_bz_loop + endif + enddo + enddo IQ_bz_loop + enddo + !write(*,*) 'OMP loop is done' + !write(*,*) qindx_ID + qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) + ! + ! BSS_eh_table_m1 + ! + do i_H=1,BS_H_dim + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + ! + BSS_eh_table_m1(ik_bz,iv,ic)=i_H + ! + enddo + ! + call live_timing('Excitonic Gkkp',q%nstar(iq)*(elph_branches(2)-elph_branches(1)+1)) + ! + ! Headers ... + ! + if (iq==1) then + call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + !io_err=io_ELPH(ID_gkkp,'gkkp') + call deliver_IO_error_message(io_err,"GKKP") + if (io_err/=0) call error('El-Ph database not found') + ! + ! EXCPHON database is written here only if the self-energy will not be computed + if (.not.l_EXCPH_Sigma) then + call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_Gkkp) + io_err=io_EXCPH_gkkp(ID_exc_Gkkp,'excitonic_Gkkp') + endif + ! + endif + ! + ! + ! Loop scheme: + ! i_l ->i_beta ->i_star [load gkkp] ->i_H + ! ->ivp [Calculate Xi(1)] + ! ->icp [Calculate Xi(2)] + ! ->i_alpha ->i_H [Calculate Gkkp] + ! + do il=elph_branches(1),elph_branches(2) + ! + do i_beta=SUM(1),SUM(2) + ! + do i_star=1,q%nstar(iq) + ! + iq_s=q%star(iq,i_star) + ! + iq_bz = q%k_table(iq, iq_s) + if (iq_bz/=1) then + call warning("Exit because you are not Gamma") + return + endif + ! + ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > + ! + ! with k and q in the BZ + ! + call io_control(ACTION=RD_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + !io_err=io_ELPH(ID_gkkp,'gkkp') + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) + ! + if (abs(ph_E) Date: Fri, 28 Jan 2022 16:52:11 +0100 Subject: [PATCH 0094/1367] Version 5.1.0, Revision 21138, Hash c040ba3d8 MODIFIED * driver/yambo.F include/driver/version.h el-ph/.objects modules/mod_EXCPH.F NEW * el-ph/EXCPH_gkkp_driver.F Additions: -Starting again the driver Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 +-- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_gkkp_driver.F | 54 +++++++++++++++++++++++++++++++++++ src/modules/mod_EXCPH.F | 6 ++-- 5 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 src/el-ph/EXCPH_gkkp_driver.F diff --git a/driver/yambo.F b/driver/yambo.F index d46863e49f..bbc0b76e56 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -237,7 +237,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! EXCITON-PHONON MATRIX ELEMENTS ! ============================== driver_now=l_EXCPH_gkkp -! if (driver_now) call + if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) ! ! EXCITON-PHONON Self-Energy ! ============================== diff --git a/include/driver/version.h b/include/driver/version.h index 3dc848e243..65f5da5563 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21137 -#define YAMBO_HASH "3e981ecc0" +#define YAMBO_REVISION 21139 +#define YAMBO_HASH "c040ba3d8" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index fd12981d58..b1b34a73f1 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F new file mode 100644 index 0000000000..1260508c7a --- /dev/null +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -0,0 +1,54 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! --- Theory --- +! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! - FP +! +subroutine EXCPH_gkkp_driver(E,k,q,X) + ! + use pars, ONLY:SP,cZERO,rZERO + use electrons, ONLY:levels,n_sp_pol + use R_lattice, ONLY:bz_samp + use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message + use IO_int, ONLY:io_control + use X_m, ONLY:X_t + use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat + use ELPH, ONLY:ph_freqs_sq,elph_branches + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& +& EXCPH_states,EXCPH_sum,EXCPH_kind + use LIVE_t, ONLY:live_timing + ! +#include + ! + type(levels) ::E + type(bz_samp) ::k,q + type(X_t) ::X + ! + ! Work Space + ! + call section('-','Excitonic Gkkp matrix elements') + !====================================== + ! +end subroutine diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index e70661fd31..c3fba84ef3 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -49,9 +49,9 @@ module EXCPH real(SP), allocatable :: EXCPH_Renorm_PH_abs(:) complex(SP), allocatable :: BS_EXCPH_E(:) real(SP), allocatable :: ph_EXCPH_E(:) - complex(SP), allocatable :: BS_mat_gamma(:,:) - complex(SP), allocatable :: BS_E_gamma(:) - integer, allocatable :: BSS_eh_table_gamma(:,:) + complex(SP), allocatable :: BS_mat_in(:,:) + complex(SP), allocatable :: BS_E_in(:) + integer, allocatable :: BSS_eh_table_in(:,:) complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) ! From 8cff909e6d54d89b1f0f04c9758160c58f7f558f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 28 Jan 2022 17:21:40 +0100 Subject: [PATCH 0095/1367] Version 5.1.0, Revision 21156, Hash 6ab7d3e MODIFIED * modified: modified: NEW * lib/yambo Bugs: - [yambo] Fixed compilation after last commit Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7d8b130706..ea1999d31f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21155 -#define YAMBO_HASH "63746cc" +#define YAMBO_REVISION 21156 +#define YAMBO_HASH "6ab7d3e" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index b2ffea20bf..b71f100ef3 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -59,7 +59,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) ! logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k - real(SP) :: deg_thresh + real(SP) :: Ev_m_Ec_KS,deg_thresh ! call timing("DIPOLE_buil_derk",OPR="start") ! From 14aee082eba953c4bc3e1bb23c32e9ff5cce51c2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 12:14:23 +0100 Subject: [PATCH 0096/1367] Version 5.1.0, Revision 21139, Hash 75b32ea60 MODIFIED * driver/yambo.F interface/INIT.F Bugs: -Fixed input generation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 8 ++++---- src/interface/INIT.F | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index bbc0b76e56..c19f4367ac 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -236,17 +236,17 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! ! EXCITON-PHONON MATRIX ELEMENTS ! ============================== +#if defined _ELPH driver_now=l_EXCPH_gkkp if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) +#endif ! ! EXCITON-PHONON Self-Energy ! ============================== +#if defined _ELPH ! driver_now=l_EXCPH_gkkp ! if (driver_now) call - ! -! driver_now=l_EXCPH_Sigma -! if (driver_now) call - ! +#endif ! ! ! ACFDT diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 6f09de4236..31faefc1c0 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -366,7 +366,7 @@ subroutine logicalson endif ! l_elph_Hamiltonian=runlevel_is_on('ElPhHam').and.io_ELPH_err(1)==0 - l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma').and.io_ELPH_err(1)==0 + l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma').and.io_ELPH_err(2)==0 else l_elph_corr=runlevel_is_on('el_ph_corr') l_elph_Hamiltonian=runlevel_is_on('ElPhHam') From 031105916e3d257471c4b82db3be137a89210a81 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 12:30:46 +0100 Subject: [PATCH 0097/1367] Version 5.1.0, Revision 21140, Hash 14aee082e MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F Bugs: -Fixed section Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 65f5da5563..8441c5301c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21139 -#define YAMBO_HASH "c040ba3d8" +#define YAMBO_REVISION 21140 +#define YAMBO_HASH "75b32ea60" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 1260508c7a..f52c2390bb 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -39,6 +39,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& & EXCPH_states,EXCPH_sum,EXCPH_kind use LIVE_t, ONLY:live_timing + use timing_m, ONLY:timing ! #include ! @@ -48,7 +49,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Work Space ! - call section('-','Excitonic Gkkp matrix elements') + call timing('EXCPH_gkkp',OPR='start') + ! + call section('*','Excitonic gkkp') !====================================== ! + call timing('EXCPH_gkkp',OPR='stop') + ! + return + ! end subroutine From 25189e453272ef391ea57da5e61bdbdebbebf192 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 15:15:25 +0100 Subject: [PATCH 0098/1367] Version 5.1.0, Revision 21141, Hash 031105916 MODIFIED * include/driver/version.h el-ph/.objects el-ph/EXCPH_gkkp_driver.F NEW * el-ph/EXCPH_load_L.F Additions: -Fixed BSE IO Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_gkkp_driver.F | 44 +++++++++++++++-- src/el-ph/EXCPH_load_L.F | 89 +++++++++++++++++++++++++++++++++++ 4 files changed, 131 insertions(+), 8 deletions(-) create mode 100644 src/el-ph/EXCPH_load_L.F diff --git a/include/driver/version.h b/include/driver/version.h index 8441c5301c..a8185c5c8e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21140 -#define YAMBO_HASH "75b32ea60" +#define YAMBO_REVISION 21141 +#define YAMBO_HASH "14aee082e" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index b1b34a73f1..89a734bb87 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index f52c2390bb..04761ea7c9 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -27,19 +27,19 @@ ! subroutine EXCPH_gkkp_driver(E,k,q,X) ! - use pars, ONLY:SP,cZERO,rZERO + use pars, ONLY:SP,cZERO,rZERO,schlen use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp - use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message - use IO_int, ONLY:io_control use X_m, ONLY:X_t - use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig + use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim use ELPH, ONLY:ph_freqs_sq,elph_branches use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& & EXCPH_states,EXCPH_sum,EXCPH_kind use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing + use stderr, ONLY:intc + use com, ONLY:msg ! #include ! @@ -49,13 +49,47 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Work Space ! + integer :: ID_BS,io_err + complex(SP),allocatable :: BS_E(:),A_rot(:,:),Xi(:,:,:) + integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) + ! call timing('EXCPH_gkkp',OPR='start') ! call section('*','Excitonic gkkp') !====================================== ! + call EXCPH_load_L(1,X,'check','Lin') ! At present the Lin can be only gamma iq=1 + ! + call k_build_up_BZ_tables(k) + call k_build_up_BZ_tables(q) + ! + call BSE_alloc() + ! + call EXCPH_load_L(1,X,'load','Lin') + ! + BS_mat_in=BS_mat(:,EXCPH_states(1):EXCPH_states(2)) + BSS_eh_table_in=BSS_eh_table(EXCPH_states(1):EXCPH_states(2),:) + ! call timing('EXCPH_gkkp',OPR='stop') ! return ! + contains + ! + subroutine BSE_alloc() + ! + ! pre-allocs... + ! + YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) + YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) + YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) + ! + BS_mat=cZERO + k_plus_q_table = 0 + BSS_eh_table = 0 + BSS_eh_table_m1 = 0 + ! + end subroutine BSE_alloc + ! end subroutine diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F new file mode 100644 index 0000000000..709913eaa4 --- /dev/null +++ b/src/el-ph/EXCPH_load_L.F @@ -0,0 +1,89 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! --- Theory --- +! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! - FP +! +subroutine EXCPH_load_L(iq_bse,X,what,Ltype) + ! + use pars, ONLY:lchlen + use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db,BSS_n_eig + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message + use R_lattice, ONLY:bz_samp + use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& +& EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path + use IO_int, ONLY:io_control + use stderr, ONLY:intc + use X_m, ONLY:X_t + use com, ONLY:jobstr,msg + ! +#include + ! + type(X_t) ::X + type(bz_samp) ::k,q + integer, intent(in) :: iq_bse + character(*) :: what,Ltype + ! + ! Work space + ! + integer :: ID_BS,io_err + character(lchlen) :: jobstr_save + ! + if(index(what,'check')>0) then + ! + if(index(Ltype,'Lout')>0.and.Lout_path/='none') then + jobstr_save=jobstr + jobstr =trim(Lout_path) + endif + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_BS) + io_err=io_BSS_diago(iq_bse,1,ID_BS,X) + if(io_err/=0) call error(" Error loading "//trim(Ltype)) + ! + if(index(Ltype,'Lout')>0.and.Lout_path/='none') then + jobstr =jobstr_save + endif + ! + if (BS_res_ares_n_mat/=1) call error("Excitonic Gkkp: anti-resonant part not implemented") + ! + if(.not.BSS_write_eig_2_db) call error("BSS diago DB does not contain the eigenstates") + ! + BS_H_dim=BS_K_dim(1) + ! + if(EXCPH_states(2)>BSS_n_eig) call error("Number of exc. states in the excphon coupling must <= number of BSE eigenstates") + ! + if(EXCPH_sum(2)>BS_H_dim) call error("Number of virtual exc. states in the excphon coupling must <= than the size of the exc. Hamiltonian") + ! + if(iq_bse==1) call msg('rs','Found '//trim(Ltype)//' with dimension: '//trim(intc(BSS_n_eig))//' x '//trim(intc(BS_H_dim))) + ! + elseif(index(what,'load')>0) then + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2,3/),ID=ID_BS) + io_err=io_BSS_diago(iq_bse,1,ID_BS,X) + if(io_err/=0) call error(" Error loading the Lin ") + ! + endif + ! +end subroutine EXCPH_load_L From ae4cc26ee32f64cf5e22ece2d8830bf6ce969fb2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 15:34:42 +0100 Subject: [PATCH 0099/1367] Version 5.1.0, Revision 21142, Hash 25189e453 MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F Additions: -All tables fixed Changes: - aPatch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/el-ph/EXCPH_gkkp_driver.F | 70 +++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a8185c5c8e..42987e7df2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21141 -#define YAMBO_HASH "14aee082e" +#define YAMBO_REVISION 21142 +#define YAMBO_HASH "031105916" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 04761ea7c9..6110523a80 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -29,7 +29,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! use pars, ONLY:SP,cZERO,rZERO,schlen use electrons, ONLY:levels,n_sp_pol - use R_lattice, ONLY:bz_samp + use R_lattice, ONLY:bz_samp,qindx_B_load use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim @@ -38,7 +38,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) & EXCPH_states,EXCPH_sum,EXCPH_kind use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing - use stderr, ONLY:intc use com, ONLY:msg ! #include @@ -49,8 +48,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Work Space ! - integer :: ID_BS,io_err - complex(SP),allocatable :: BS_E(:),A_rot(:,:),Xi(:,:,:) + complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) ! call timing('EXCPH_gkkp',OPR='start') @@ -67,9 +65,23 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call EXCPH_load_L(1,X,'load','Lin') ! + ! Save the Lin in BS_mat_in + ! BS_mat_in=BS_mat(:,EXCPH_states(1):EXCPH_states(2)) BSS_eh_table_in=BSS_eh_table(EXCPH_states(1):EXCPH_states(2),:) ! + ! Alloage EXCPH_gkkp + ! + call EXCPH_gkkp_alloc() + ! + ! K plus q table + ! + call build_k_plus_q_table() + ! + ! BSS_eh_table_m1 + ! + call build_inverse_eh_table() + ! call timing('EXCPH_gkkp',OPR='stop') ! return @@ -92,4 +104,54 @@ subroutine BSE_alloc() ! end subroutine BSE_alloc ! + subroutine EXCPH_gkkp_alloc() + YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(Xi,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2),2)) + end subroutine EXCPH_gkkp_alloc + ! + subroutine build_k_plus_q_table() + ! + integer, external ::qindx_B_init,qindx_B_close + integer :: qindx_ID,qindx_ID_frag,qindx_tmp(2) + integer :: ik_bz,iq_bz,ip_bz + ! + call live_timing('K plus q table',k%nbz) + qindx_tmp=qindx_B_init(qindx_ID,qindx_ID_frag) + do ik_bz=1,k%nbz + call live_timing(steps=1) + IQ_bz_loop: do iq_bz=1,q%nbz + do ip_bz=1,k%nbz + qindx_tmp=qindx_B_load(ip_bz,ik_bz,qindx_ID_frag) + if (qindx_tmp(1)==iq_bz) then + k_plus_q_table(ik_bz,iq_bz)=ip_bz + cycle IQ_bz_loop + endif + enddo + enddo IQ_bz_loop + enddo + qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) + call live_timing( ) + ! + end subroutine build_k_plus_q_table + ! + subroutine build_inverse_eh_table() + ! + integer :: iv,ic,i_H,ik_bz + ! + call live_timing('BSE inverse eh-table',BS_H_dim) + do i_H=1,BS_H_dim + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + ! + BSS_eh_table_m1(ik_bz,iv,ic)=i_H + call live_timing(steps=1) + ! + enddo + call live_timing( ) + ! + end subroutine build_inverse_eh_table + ! end subroutine From db2a6ab82997371437eafd1924bec0cc4446ddcb Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 16:30:01 +0100 Subject: [PATCH 0100/1367] Version 5.1.0, Revision 21143, Hash ae4cc26ee MODIFIED * include/driver/version.h el-ph/.objects el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_gkkp_eval.F io/.objects modules/mod_EXCPH.F NEW * io/io_EXCPH_gkkp.F Additions: -It compiles Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_gkkp_driver.F | 37 ++- src/el-ph/EXCPH_gkkp_eval.F | 443 ++++++---------------------------- src/io/.objects | 2 +- src/io/io_EXCPH_gkkp.F | 201 +++++++++++++++ src/modules/mod_EXCPH.F | 6 + 7 files changed, 322 insertions(+), 373 deletions(-) create mode 100644 src/io/io_EXCPH_gkkp.F diff --git a/include/driver/version.h b/include/driver/version.h index 42987e7df2..406589d8e8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21142 -#define YAMBO_HASH "031105916" +#define YAMBO_REVISION 21143 +#define YAMBO_HASH "25189e453" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 89a734bb87..7b7571889c 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o \ +EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o #endif #if defined _RT || defined _PHEL diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 6110523a80..3f1c405e01 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -34,8 +34,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim use ELPH, ONLY:ph_freqs_sq,elph_branches + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message + use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& -& EXCPH_states,EXCPH_sum,EXCPH_kind +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -48,8 +50,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Work Space ! - complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) - integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) + integer, external :: io_ELPH,io_EXCPH_gkkp + integer :: ID_gkkp,ID_exc_gkkp,io_err + integer :: il,iq ! call timing('EXCPH_gkkp',OPR='start') ! @@ -81,6 +84,34 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! BSS_eh_table_m1 ! call build_inverse_eh_table() + ! + ! Load gkkp + ! + call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + call deliver_IO_error_message(io_err,"GKKP") + if (io_err/=0) call error('El-Ph database not found') + ! + ! Write headers + ! + call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_Gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'excitonic_Gkkp') + ! + ! Main q-loop + ! + call live_timing('Excitonic Gkkp',q%nibz*(elph_branches(2)-elph_branches(1)+1)) + do iq=1,q%nibz + do il=elph_branches(1),elph_branches(2) + call live_timing(steps=1) + enddo + ! + ! I/O + !===== + call io_control(ACTION=OP_APP_CL,SEC=(/iq+1/),ID=ID_exc_Gkkp) + io_err=io_EXCPH_gkkp(ID_exc_Gkkp,'excitonic_Gkkp') + ! + enddo + call live_timing( ) ! call timing('EXCPH_gkkp',OPR='stop') ! diff --git a/src/el-ph/EXCPH_gkkp_eval.F b/src/el-ph/EXCPH_gkkp_eval.F index 4e5f3d1d89..67c1def66f 100644 --- a/src/el-ph/EXCPH_gkkp_eval.F +++ b/src/el-ph/EXCPH_gkkp_eval.F @@ -25,7 +25,7 @@ ! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. ! - FP ! -subroutine EXCPH_Gkkp_eval(iq,E,k,q,X) +subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X) ! use pars, ONLY:SP,cZERO use drivers, ONLY:l_EXCPH_Sigma @@ -38,150 +38,22 @@ subroutine EXCPH_Gkkp_eval(iq,E,k,q,X) use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP - use EXCPH, ONLY:BS_mat_gamma,BSS_eh_table_gamma,EXCPH_Gkkp,EXCPH_Gkkp_sq,& -& EXCPH_states,EXCPH_sum,EXCPH_kind - use LIVE_t, ONLY:live_timing + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,Xi,& +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table #include ! type(levels) ::E type(bz_samp) ::k,q type(X_t) ::X + integer, intent(in) :: iq,il ! ! Work Space ! - integer :: iq,ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,il,i_H,i_Hp,i_alpha,& -& iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz,STATES(2),SUM(2) + integer :: ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,i_H,i_Hp,i_alpha,& +& iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz integer, save :: ID_gkkp real(SP) :: ph_E,elph_gkkp_sq - complex(SP),allocatable :: BS_E(:),A_rot(:,:),Xi(:,:,:) - integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) - integer, external :: io_ELPH,io_EXCPH_gkkp - integer, external ::qindx_B_init,qindx_B_close - integer :: qindx_tmp(2),qindx_ID,qindx_ID_frag - ! - if (i_time_rev/=0) then - call warning("Excitonic Gkkp: Spatial inversion not detected and Time-Reversal symmetry not implemented") - !return - endif - if (BS_res_ares_n_mat/=1) then - call warning("Excitonic Gkkp: anti-resonant part not implemented") - return - endif - ! - call section('-','Excitonic Gkkp m.e.') - !====================================== - ! - ! LIMITATIONS: - ! [1] The matrix elements can only be computed with all symmetries turned off - ! until the proper rules for expansion of phonon and exciton eigenstates are - ! figured out and implemented. - ! - ! Headers ... - ! - call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_BS) - io_err=io_BSS_diago(iq,1,ID_BS,X,bsE=BS_E) - ! - if (.not.BSS_write_eig_2_db) call error("BSS diago DB does not contain the eigenstates") - ! - ! pre-allocs... - ! - YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) - YAMBO_ALLOC(A_rot,(BS_H_dim,BSS_n_eig)) - YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) - YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) - YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) - ! - STATES=EXCPH_states - SUM =EXCPH_sum - ! - if ((STATES(2).GT.BS_H_dim).or.(SUM(2).GT.BS_H_dim)) then - call error("Number of exc. states in the excphon coupling must <= than the size of the exc. Hamiltonian") - endif - ! - YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),SUM(1):SUM(2),STATES(1):STATES(2))) - YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),SUM(1):SUM(2),STATES(1):STATES(2))) - YAMBO_ALLOC(Xi,(BS_H_dim,SUM(1):SUM(2),2)) - ! - Xi=cZERO - EXCPH_Gkkp=cZERO - EXCPH_Gkkp_sq=0 - k_plus_q_table = 0 - BSS_eh_table = 0 - BSS_eh_table_m1 = 0 - ! - if (iq==1) then - YAMBO_ALLOC(BS_mat_gamma,(BS_H_dim,STATES(1):STATES(2))) - YAMBO_ALLOC(BSS_eh_table_gamma,(STATES(1):STATES(2),3+n_sp_pol-1)) - endif - ! - ! Eigenstates/values ... - ! - call read_according_to_scattering_type() - ! - ! k_plus_q_table - ! - ! For each K_bz,Q_bz k_plus_q_table(ik_bz,iq_bz)=ip_bz with - ! - ! K_bz+Q_bz=P_bz - ! - qindx_tmp=qindx_B_init(qindx_ID,qindx_ID_frag) - !do ik_bz=1,10 - ! qindx_tmp=qindx_B_load(ik_bz,ik_bz+500,qindx_ID) - ! write(*,*) ik_bz, qindx_tmp - !enddo - !stop - write(*,*) 'start of k+q loop' - ! - !write(*,*) 'qindx_ID', qindx_ID - !qindx_tmp=qindx_B_init(qindx_ID) - ! - write(*,*) 'qindx_B_init done' - do ik_bz=1,k%nbz - IQ_bz_loop: do iq_bz=1,q%nbz - do ip_bz=1,k%nbz - qindx_tmp=qindx_B_load(ip_bz,ik_bz,qindx_ID_frag) - if (qindx_tmp(1)==iq_bz) then - k_plus_q_table(ik_bz,iq_bz)=ip_bz - cycle IQ_bz_loop - endif - enddo - enddo IQ_bz_loop - enddo - !write(*,*) 'OMP loop is done' - !write(*,*) qindx_ID - qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) - ! - ! BSS_eh_table_m1 - ! - do i_H=1,BS_H_dim - ! - ik_bz = BSS_eh_table(i_H,1) - iv = BSS_eh_table(i_H,2) - ic = BSS_eh_table(i_H,3) - ! - BSS_eh_table_m1(ik_bz,iv,ic)=i_H - ! - enddo - ! - call live_timing('Excitonic Gkkp',q%nstar(iq)*(elph_branches(2)-elph_branches(1)+1)) - ! - ! Headers ... - ! - if (iq==1) then - call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. - !io_err=io_ELPH(ID_gkkp,'gkkp') - call deliver_IO_error_message(io_err,"GKKP") - if (io_err/=0) call error('El-Ph database not found') - ! - ! EXCPHON database is written here only if the self-energy will not be computed - if (.not.l_EXCPH_Sigma) then - call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_Gkkp) - io_err=io_EXCPH_gkkp(ID_exc_Gkkp,'excitonic_Gkkp') - endif - ! - endif - ! + integer, external :: io_ELPH ! ! Loop scheme: ! i_l ->i_beta ->i_star [load gkkp] ->i_H @@ -189,143 +61,98 @@ subroutine EXCPH_Gkkp_eval(iq,E,k,q,X) ! ->icp [Calculate Xi(2)] ! ->i_alpha ->i_H [Calculate Gkkp] ! - do il=elph_branches(1),elph_branches(2) + do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! - do i_beta=SUM(1),SUM(2) + do i_star=1,q%nstar(iq) ! - do i_star=1,q%nstar(iq) - ! - iq_s=q%star(iq,i_star) - ! - iq_bz = q%k_table(iq, iq_s) - if (iq_bz/=1) then - call warning("Exit because you are not Gamma") - return - endif + iq_s=q%star(iq,i_star) + ! + iq_bz = q%k_table(iq, iq_s) + ! + ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > + ! + ! with k and q in the BZ + ! + call io_control(ACTION=RD_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) + ! + if (abs(ph_E) + ! K = (ik_bz,iv,ic) ! - ! with k and q in the BZ + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) ! - call io_control(ACTION=RD_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. - !io_err=io_ELPH(ID_gkkp,'gkkp') + ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz ! - ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) + ip_bz = elemental_scattering(iq_s,ik_bz) ! - if (abs(ph_E) + ! + integer ::ID + character(*) ::what + ! + !Work Space + ! + integer ::iq,ierr,VAR_size(4),VAR_size_sq(3),scat_type,ID_frag + real(SP) ::v(3) + character(schlen) ::db_name,VAR_name,dim_names(4),dim_names_sq(3) + logical ::l_exc_SE + ! + call timing('io_EXCPH_gkkp',OPR='start') + ! + ID_frag=0 + ! + ! DB name + ! + db_name='excph_Gkkp' + ! + if (index(what,'excitonic_SE')>0) l_exc_SE = .true. + ! + io_EXCPH_gkkp=io_connect(desc=trim(db_name),type=2,ID=ID) + if (io_EXCPH_gkkp/=0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + scat_type = kind_to_integers(EXCPH_kind) + ! + io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) + ! + call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + ! + call io_elemental(ID,& +& VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) + ! + call io_elemental(ID,& +& VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"=="/)) + ! + call io_elemental(ID,& +& VAR=" Exciton sum (scattered):",I1=EXCPH_sum,CHECK=.true.,OP=(/"=="/)) + ! + call io_elemental(ID,& +& VAR=" Scattering type [1=TT,2=LT,3=TL,4=LL]:",I0=scat_type,CHECK=.true.,OP=(/"=="/)) + ! + ! + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) + ! + io_EXCPH_gkkp=io_status(ID) + if (io_EXCPH_gkkp/=0) goto 1 + ! + call io_bulk(ID,VAR="PH_BRANCHES",VAR_SZ=(/2/)) + call io_bulk(ID,I1=elph_branches) + ! + call io_bulk(ID,VAR="EXCITON_STATES",VAR_SZ=(/2/)) + call io_bulk(ID,I1=EXCPH_states) + ! + call io_bulk(ID,VAR="EXCITON_SUM",VAR_SZ=(/2/)) + call io_bulk(ID,I1=EXCPH_sum) + ! + call io_bulk(ID,VAR="SCATTERING_TYPE",VAR_SZ=(/1/)) + call io_bulk(ID,I0=scat_type) + ! + if (l_exc_SE) then + ! + call io_bulk(ID,VAR="BS_initial_states_E",VAR_SZ=(/2,EXCPH_states(2)/)) + call io_bulk(ID,C1=BS_E_in) + ! + endif + ! + endif + ! + iq=maxval(io_sec(ID,:))-1 + if (iq<=0) goto 1 + ! + ! Fragmentation + ! + call io_fragment(ID,ID_frag,i_fragment=iq,ierr=ierr) + if (ierr<0.and.read_is_on(ID)) goto 1 + ! + ! When the DB is fragmented I allow a partial reading checking + ! if the fragment exists or not. + ! If the fragment does not exist (ierr<0) I return an error code + ! + if (ierr<0.and.read_is_on(ID)) then + io_EXCPH_gkkp=-1 + goto 1 + endif + ! + ! Manage RD_CL_IF_END + ! + if (io_action(ID)==RD_CL_IF_END.and.iq==nqibz) io_action(ID)=RD_CL + ! + ! Excitonic Gkkp (and SE) fragments + !========================= + ! + VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) + VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=EXCPH_Gkkp) + ! + VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) + VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=EXCPH_Gkkp_sq) + ! + if (l_exc_SE) then + ! + VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) + ! + VAR_name="EXCITON_SATELLITE_ENERGY_phonon_absorption_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_phonon_absorption_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) + ! + VAR_name="PHONON_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/VAR_size(2)/),SP,(/dim_names(2)/)) + call io_variable_bulk(ID_frag,1,R1=ph_EXCPH_E) + ! + VAR_name="EXCITON_BS_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/VAR_size(1),VAR_size(3)/),SP,(/dim_names(1),dim_names(3)/)) + call io_variable_bulk(ID_frag,1,C1=BS_EXCPH_E) + ! + endif + ! +1 call io_fragment_disconnect(ID,ID_frag) + ! + call io_disconnect(ID=ID) + ! + call timing('io_EXCPH_gkkp',OPR='stop') + ! + contains + integer function kind_to_integers(SCATTERING_TYPE) + ! + integer :: l2int + character(schlen), intent(in) :: SCATTERING_TYPE + ! + if (trim(SCATTERING_TYPE)=='TT') l2int=1 + ! + if (trim(SCATTERING_TYPE)=='LT') l2int=2 + ! + if (trim(SCATTERING_TYPE)=='TL') l2int=3 + ! + if (trim(SCATTERING_TYPE)=='LL') l2int=4 + ! + if (trim(SCATTERING_TYPE)=='IL') l2int=5 + ! + if (trim(SCATTERING_TYPE)=='IT') l2int=6 + ! + kind_to_integers=l2int + ! + end function + ! +end function diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index c3fba84ef3..38a7d9aa4d 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -40,7 +40,13 @@ module EXCPH character(lchlen) :: Lin_path character(lchlen) :: Lout_path ! + ! ExcPH gkkp + ! + complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) + integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) + ! ! ... Sigma + ! complex(SP), allocatable :: BS_Sat_E(:,:,:) complex(SP), allocatable :: BS_Sat_E_PH_abs(:,:,:) real(SP), allocatable :: BS_Sat_WEIGHT(:,:,:) From edb5061b4db2bf9e2120bfdd7c95b34e555e0596 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 16:47:58 +0100 Subject: [PATCH 0101/1367] Version 5.1.0, Revision 21144, Hash db2a6ab82 MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_load_L.F Additions: -Fixed loading of the Lout matrices Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 9 +++++++++ src/el-ph/EXCPH_load_L.F | 24 ++++++++++++------------ 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 406589d8e8..33cb352991 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21143 -#define YAMBO_HASH "25189e453" +#define YAMBO_REVISION 21144 +#define YAMBO_HASH "ae4cc26ee" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 3f1c405e01..ac9ced722d 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -97,10 +97,19 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_Gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'excitonic_Gkkp') ! + ! Check if Lout is present + ! + call EXCPH_load_L(1,X,'check','Lout') + ! ! Main q-loop ! call live_timing('Excitonic Gkkp',q%nibz*(elph_branches(2)-elph_branches(1)+1)) + ! do iq=1,q%nibz + ! + if(iq>1) call EXCPH_load_L(iq,X,'check','Lout') + call EXCPH_load_L(iq,X,'load','Lout') + ! do il=elph_branches(1),elph_branches(2) call live_timing(steps=1) enddo diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index 709913eaa4..40e3288da4 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -51,20 +51,16 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) integer :: ID_BS,io_err character(lchlen) :: jobstr_save ! + if(index(Ltype,'Lout')>0.and.Lout_path/='none') then + jobstr_save=jobstr + jobstr =trim(Lout_path) + endif + ! if(index(what,'check')>0) then - ! - if(index(Ltype,'Lout')>0.and.Lout_path/='none') then - jobstr_save=jobstr - jobstr =trim(Lout_path) - endif ! call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_BS) io_err=io_BSS_diago(iq_bse,1,ID_BS,X) - if(io_err/=0) call error(" Error loading "//trim(Ltype)) - ! - if(index(Ltype,'Lout')>0.and.Lout_path/='none') then - jobstr =jobstr_save - endif + if(io_err/=0) call error(" Error checking "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! if (BS_res_ares_n_mat/=1) call error("Excitonic Gkkp: anti-resonant part not implemented") ! @@ -74,7 +70,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! if(EXCPH_states(2)>BSS_n_eig) call error("Number of exc. states in the excphon coupling must <= number of BSE eigenstates") ! - if(EXCPH_sum(2)>BS_H_dim) call error("Number of virtual exc. states in the excphon coupling must <= than the size of the exc. Hamiltonian") + if(EXCPH_sum(2)>BS_H_dim) call error("Number of virtual exc. states in the excphon coupling must <= size of the exc. Hamiltonian") ! if(iq_bse==1) call msg('rs','Found '//trim(Ltype)//' with dimension: '//trim(intc(BSS_n_eig))//' x '//trim(intc(BS_H_dim))) ! @@ -82,8 +78,12 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2,3/),ID=ID_BS) io_err=io_BSS_diago(iq_bse,1,ID_BS,X) - if(io_err/=0) call error(" Error loading the Lin ") + if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! endif ! + if(index(Ltype,'Lout')>0.and.Lout_path/='none') then + jobstr =jobstr_save + endif + ! end subroutine EXCPH_load_L From 51d28f79e34583cb56ea237ba6a28c39a4b40735 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 17:39:11 +0100 Subject: [PATCH 0102/1367] Version 5.1.0, Revision 21145, Hash edb5061b4 MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_gkkp_eval.F Additions: -It works.... checks in progress Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 16 +++++++++++----- src/el-ph/EXCPH_gkkp_eval.F | 15 ++++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 33cb352991..26d20c265d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21144 -#define YAMBO_HASH "ae4cc26ee" +#define YAMBO_REVISION 21145 +#define YAMBO_HASH "db2a6ab82" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index ac9ced722d..a7f16e5a90 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -36,7 +36,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use ELPH, ONLY:ph_freqs_sq,elph_branches use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use IO_int, ONLY:io_control - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing @@ -85,7 +85,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call build_inverse_eh_table() ! - ! Load gkkp + ! Check if gkkp_expanded is present ! call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. @@ -94,7 +94,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Write headers ! - call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_Gkkp) + call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'excitonic_Gkkp') ! ! Check if Lout is present @@ -110,14 +110,20 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) if(iq>1) call EXCPH_load_L(iq,X,'check','Lout') call EXCPH_load_L(iq,X,'load','Lout') ! + EXCPH_gkkp =cZERO + EXCPH_gkkp_sq=rZERO + ! do il=elph_branches(1),elph_branches(2) + ! + call EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) call live_timing(steps=1) + ! enddo ! ! I/O !===== - call io_control(ACTION=OP_APP_CL,SEC=(/iq+1/),ID=ID_exc_Gkkp) - io_err=io_EXCPH_gkkp(ID_exc_Gkkp,'excitonic_Gkkp') + call io_control(ACTION=OP_APP_CL,SEC=(/iq+1/),ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'excitonic_Gkkp') ! enddo call live_timing( ) diff --git a/src/el-ph/EXCPH_gkkp_eval.F b/src/el-ph/EXCPH_gkkp_eval.F index 67c1def66f..b4277cadac 100644 --- a/src/el-ph/EXCPH_gkkp_eval.F +++ b/src/el-ph/EXCPH_gkkp_eval.F @@ -25,9 +25,9 @@ ! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. ! - FP ! -subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X) +subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! - use pars, ONLY:SP,cZERO + use pars, ONLY:SP,cZERO,rZERO use drivers, ONLY:l_EXCPH_Sigma use electrons, ONLY:levels,n_sp_pol use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab @@ -38,20 +38,20 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X) use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,Xi,& + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table #include ! type(levels) ::E type(bz_samp) ::k,q type(X_t) ::X - integer, intent(in) :: iq,il + integer, intent(in) :: iq,il + integer, intent(inout) :: ID_gkkp ! ! Work Space ! integer :: ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,i_H,i_Hp,i_alpha,& & iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz - integer, save :: ID_gkkp real(SP) :: ph_E,elph_gkkp_sq integer, external :: io_ELPH ! @@ -75,6 +75,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X) ! call io_control(ACTION=RD_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + if(io_err/=0) call error(" Error reading gkkp_expanded") ! ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) ! @@ -99,7 +100,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X) ! i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) ! - elph_gkkp_sq=GKKP%dVc(il,iv,ivp,ik_bz,1)/sqrt(2.*ph_E) + elph_gkkp_sq=GKKP%dVc(il,iv,ivp,ik_bz,1)/sqrt(2._SP*ph_E) ! if (i_Hp/=0) then Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) @@ -120,7 +121,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X) ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) ! - elph_gkkp_sq=GKKP%dVc(il,icp,ic,ip_bz,1)/sqrt(2.*ph_E) + elph_gkkp_sq=GKKP%dVc(il,icp,ic,ip_bz,1)/sqrt(2._SP*ph_E) ! if (i_Hp/=0) then Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) From 6a99871f10843321cef42792a6ce1052af89f9a6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 18:18:53 +0100 Subject: [PATCH 0103/1367] Version 5.1.0, Revision 21146, Hash 51d28f79e MODIFIED * include/driver/version.h io/io_EXCPH_gkkp.F Bugs: -Small fixes Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/io/io_EXCPH_gkkp.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 26d20c265d..d8da961102 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21145 -#define YAMBO_HASH "db2a6ab82" +#define YAMBO_REVISION 21146 +#define YAMBO_HASH "edb5061b4" diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index c996819bc9..e784afddaf 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -52,7 +52,7 @@ integer function io_EXCPH_gkkp(ID,what) ! ! DB name ! - db_name='excph_Gkkp' + db_name='excph_gkkp' ! if (index(what,'excitonic_SE')>0) l_exc_SE = .true. ! From 97a4a59e06b8cf678afed25f85ff83b3e0e797c3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 18:24:34 +0100 Subject: [PATCH 0104/1367] Version 5.1.0, Revision 21147, Hash 6a99871f1 MODIFIED * include/driver/version.h Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d8da961102..d7b4a28eda 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21146 -#define YAMBO_HASH "edb5061b4" +#define YAMBO_REVISION 21147 +#define YAMBO_HASH "51d28f79e" From aede7525615380998e4f38b3abcc04f078ec42d0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 18:34:50 +0100 Subject: [PATCH 0105/1367] Version 5.1.0, Revision 21148, Hash 97a4a59e0 MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_eval.F Additions: -Small improvements Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_eval.F | 22 ++++------------------ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d7b4a28eda..4b87cba1ac 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21147 -#define YAMBO_HASH "51d28f79e" +#define YAMBO_REVISION 21148 +#define YAMBO_HASH "6a99871f1" diff --git a/src/el-ph/EXCPH_gkkp_eval.F b/src/el-ph/EXCPH_gkkp_eval.F index b4277cadac..cf81481b1e 100644 --- a/src/el-ph/EXCPH_gkkp_eval.F +++ b/src/el-ph/EXCPH_gkkp_eval.F @@ -60,6 +60,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! ->ivp [Calculate Xi(1)] ! ->icp [Calculate Xi(2)] ! ->i_alpha ->i_H [Calculate Gkkp] + Xi=cZERO ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! @@ -152,7 +153,9 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! enddo !Loop i_beta ! - call compute_squared_couplings() + ! Compute the squared couplings + ! + EXCPH_Gkkp_sq(il,:,:)=EXCPH_Gkkp(il,:,:)*conjg(EXCPH_Gkkp(il,:,:)) ! contains ! @@ -171,21 +174,4 @@ integer function elemental_scattering(i_q_SYM,i_k_BZ) ! end function ! - subroutine compute_squared_couplings() - ! - integer :: i_alpha,i_beta - ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - ! - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - ! - EXCPH_Gkkp_sq(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)+& -& EXCPH_Gkkp(il,i_beta,i_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) - ! - enddo - ! - enddo - ! - end subroutine - ! end subroutine From 6cd60f992097666ff52e7cc12d9879337e250f86 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 22:33:41 +0100 Subject: [PATCH 0106/1367] Version 5.1.0, Revision 21149, Hash aede75256 MODIFIED * include/driver/version.h bse/K_driver.F bse/K_driver_init.F bse/K_exchange_collisions.F el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_load_L.F interface/INIT_load.F io/io_EXCPH_gkkp.F io/variables_BS.F io/variables_BS_PAR.F modules/mod_EXCPH.F NEW * io/io_EXCPH_SE.F Additions: -Added Ltilde to the BSE -The name full change in Lfull -Added L_kind_in and L_kind_out type in the gkkp scattering Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/bse/K_driver.F | 4 +- src/bse/K_driver_init.F | 22 +++- src/bse/K_exchange_collisions.F | 8 +- src/el-ph/EXCPH_gkkp_driver.F | 6 +- src/el-ph/EXCPH_load_L.F | 13 ++- src/interface/INIT_load.F | 2 +- src/io/io_EXCPH_SE.F | 201 ++++++++++++++++++++++++++++++++ src/io/io_EXCPH_gkkp.F | 81 ++----------- src/io/variables_BS.F | 7 +- src/io/variables_BS_PAR.F | 8 +- src/modules/mod_EXCPH.F | 5 + 12 files changed, 271 insertions(+), 90 deletions(-) create mode 100644 src/io/io_EXCPH_SE.F diff --git a/include/driver/version.h b/include/driver/version.h index 4b87cba1ac..86b364f760 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21148 -#define YAMBO_HASH "6a99871f1" +#define YAMBO_REVISION 21149 +#define YAMBO_HASH "97a4a59e0" diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 886f8620d4..850b1006de 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -82,6 +82,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) global_gauge="length" endif ! + call msg('s','[BSE] Response kind is ',trim(L_kind)) + ! ! Energy points !=============== call W_reset(W_bss) @@ -146,7 +148,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! If the Coulomb cutoff is used and the system is 1D or 2D eps and eels are different at finite q if (l_col_cut.and.(l_1D.or.l_2D)) then if(iq==1) BSS_eels_to_eps=.false. - if(iq/=1) BSS_eels_to_eps=trim(L_kind)=="full" + if(iq/=1) BSS_eels_to_eps=trim(L_kind)=="Lfull" endif ! ! BSS output arrays diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 132b352595..55b002157a 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -61,10 +61,13 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! ! L_kind check !============== - if (trim(L_kind)/="Lbar".and.trim(L_kind)/="full") call error('set Lkind = Lbar or full ') + if (trim(L_kind(1:1))/='L') L_kind="L"//trim(L_kind) + if (trim(L_kind)/="Lbar".and.trim(L_kind)/="Lfull".and.trim(L_kind)/="Ltilde") then + call error('set Lkind = Lbar or Lfull or Ltilde ') + endif ! - if (trim(L_kind)=="full".and.(STRING_match(BSE_mode,'causal').or.STRING_match(BSE_mode,'retarded'))) then - call warning(' Lkind=full with retarded leads to bad epsilon. Use either resonant or coupling. Setting resonant. ') + if (trim(L_kind)=="Lfull".and.(STRING_match(BSE_mode,'causal').or.STRING_match(BSE_mode,'retarded'))) then + call warning(' Lkind=Lfull with retarded leads to bad epsilon. Use either resonant or coupling. Setting resonant. ') BSE_mode="resonant" endif ! @@ -149,6 +152,19 @@ subroutine K_driver_init(what,iq,Ken,Xk) call parser('FxcRetarded',FXC_is_retarded) endif endif + ! + ! Remove exchange if computing the irreducible response + if (trim(L_kind)=="Ltilde") then + BS_res_K_exchange=.FALSE. + BS_cpl_K_exchange=.FALSE. + endif +#if defined _PHEL + ! [EXCPH]: Allow code to go back to different Lkind calculations after Ltilde + if ((trim(L_kind)/="Ltilde").and.(.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.)) then + BS_res_K_exchange=.TRUE. + BS_cpl_K_exchange=BS_res_K_exchange + endif +#endif ! ! CORE Logicals !=============== diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index da3c40b063..44c15565d5 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -101,8 +101,8 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) ! ! G==0 term ! - if(trim(L_kind)=="full") BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=BS_T_grp(i_T_grp)%dipoles_opt(1,i_T_el,1) - if(trim(L_kind)=="Lbar") BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=cZERO + if(trim(L_kind)=="Lfull") BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=BS_T_grp(i_T_grp)%dipoles_opt(1,i_T_el,1) + if(trim(L_kind)=="Lbar") BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=cZERO ! ! G/=0 terms ! @@ -167,8 +167,8 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) call DEV_SUB(scatter_Bamp)(K_EXCH_collision) ! BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=cZERO - if(trim(L_kind)=="full") i_g0=1 - if(trim(L_kind)=="Lbar") i_g0=2 + if(trim(L_kind)=="Lfull") i_g0=1 + if(trim(L_kind)=="Lbar") i_g0=2 ! #ifdef _CUDA call dev_memcpy(BS_T_grp(i_T_grp)%O_x_d(:,i_T_el),K_EXCH_collision%rhotw_d, range1=(/i_g0,BS_n_g_exch/)) diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index a7f16e5a90..7cbf215810 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -36,7 +36,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use ELPH, ONLY:ph_freqs_sq,elph_branches use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use IO_int, ONLY:io_control - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,& + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,L_kind_in,L_kind_out,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing @@ -95,7 +95,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Write headers ! call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'excitonic_Gkkp') + io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! ! Check if Lout is present ! @@ -123,7 +123,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! I/O !===== call io_control(ACTION=OP_APP_CL,SEC=(/iq+1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'excitonic_Gkkp') + io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! enddo call live_timing( ) diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index 40e3288da4..f8a0b7b9e3 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -33,7 +33,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) use R_lattice, ONLY:bz_samp use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path +& EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path,L_kind_in,L_kind_out use IO_int, ONLY:io_control use stderr, ONLY:intc use X_m, ONLY:X_t @@ -72,7 +72,16 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! if(EXCPH_sum(2)>BS_H_dim) call error("Number of virtual exc. states in the excphon coupling must <= size of the exc. Hamiltonian") ! - if(iq_bse==1) call msg('rs','Found '//trim(Ltype)//' with dimension: '//trim(intc(BSS_n_eig))//' x '//trim(intc(BS_H_dim))) + if(iq_bse==1) then + call msg('rs','Found '//trim(Ltype)//' with dimension: '//trim(intc(BSS_n_eig))//' x '//trim(intc(BS_H_dim))) + if(index(Ltype,'Lout')>0) then + L_kind_out=L_kind + call msg('rs','L kind out'//trim(L_kind_out)) + elseif(index(Ltype,'Lin')>0) then + call msg('rs','L kind in'//trim(L_kind_in)) + L_kind_in =L_kind + endif + endif ! elseif(index(what,'load')>0) then ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 7dbb268c38..d3de91817c 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -294,7 +294,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! BSE/BSK ! call it(defs,'BSEmod', '[BSE] resonant/retarded/coupling',BSE_mode,case="a") - call it(defs,'Lkind', '[BSE] Lbar (default) / full',L_kind,verb_level=V_resp) + call it(defs,'Lkind', '[BSE] Lbar (default) / Lfull / Ltilde ',L_kind,verb_level=V_resp) call it(defs,'BSEBands','[BSK] Bands range',BS_bands) call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]',BS_n_g_W,G_unit) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) diff --git a/src/io/io_EXCPH_SE.F b/src/io/io_EXCPH_SE.F new file mode 100644 index 0000000000..cfc0d5a6f4 --- /dev/null +++ b/src/io/io_EXCPH_SE.F @@ -0,0 +1,201 @@ +! +! Copyright (C) 2000-2019 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +integer function io_EXCPH_SE(ID,what) + ! + use pars, ONLY:SP,schlen + use IO_m, ONLY:io_sec,read_is_on,RD_CL,RD_CL_IF_END,io_action,frag_ELPH,io_status + use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& +& def_variable_bulk,io_variable_bulk,io_fragment + use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& +& BS_E_in,BS_Sat_E,BS_Sat_WEIGHT,BS_EXCPH_E,ph_EXCPH_E,& +& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs + use ELPH, ONLY:ph_modes,elph_branches + use stderr, ONLY:intc + use R_lattice, ONLY:nqibz + use timing_m, ONLY:timing +#include + ! + integer ::ID + character(*) ::what + ! + !Work Space + ! + integer ::iq,ierr,VAR_size(4),VAR_size_sq(3),scat_type,ID_frag + real(SP) ::v(3) + character(schlen) ::db_name,VAR_name,dim_names(4),dim_names_sq(3) + logical ::l_exc_SE + ! + call timing('io_EXCPH_gkkp',OPR='start') + ! + ID_frag=0 + ! + ! DB name + ! + db_name='excph_gkkp' + ! + if (index(what,'excitonic_SE')>0) l_exc_SE = .true. + ! + io_EXCPH_gkkp=io_connect(desc=trim(db_name),type=2,ID=ID) + if (io_EXCPH_gkkp/=0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + scat_type = kind_to_integers(EXCPH_kind) + ! + io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) + ! + call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + ! + call io_elemental(ID,& +& VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) + ! + call io_elemental(ID,& +& VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"=="/)) + ! + call io_elemental(ID,& +& VAR=" Exciton sum (scattered):",I1=EXCPH_sum,CHECK=.true.,OP=(/"=="/)) + ! + call io_elemental(ID,& +& VAR=" Scattering type [1=TT,2=LT,3=TL,4=LL]:",I0=scat_type,CHECK=.true.,OP=(/"=="/)) + ! + ! + call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) + ! + io_EXCPH_gkkp=io_status(ID) + if (io_EXCPH_gkkp/=0) goto 1 + ! + call io_bulk(ID,VAR="PH_BRANCHES",VAR_SZ=(/2/)) + call io_bulk(ID,I1=elph_branches) + ! + call io_bulk(ID,VAR="EXCITON_STATES",VAR_SZ=(/2/)) + call io_bulk(ID,I1=EXCPH_states) + ! + call io_bulk(ID,VAR="EXCITON_SUM",VAR_SZ=(/2/)) + call io_bulk(ID,I1=EXCPH_sum) + ! + call io_bulk(ID,VAR="SCATTERING_TYPE",VAR_SZ=(/1/)) + call io_bulk(ID,I0=scat_type) + ! + if (l_exc_SE) then + ! + call io_bulk(ID,VAR="BS_initial_states_E",VAR_SZ=(/2,EXCPH_states(2)/)) + call io_bulk(ID,C1=BS_E_in) + ! + endif + ! + endif + ! + iq=maxval(io_sec(ID,:))-1 + if (iq<=0) goto 1 + ! + ! Fragmentation + ! + call io_fragment(ID,ID_frag,i_fragment=iq,ierr=ierr) + if (ierr<0.and.read_is_on(ID)) goto 1 + ! + ! When the DB is fragmented I allow a partial reading checking + ! if the fragment exists or not. + ! If the fragment does not exist (ierr<0) I return an error code + ! + if (ierr<0.and.read_is_on(ID)) then + io_EXCPH_gkkp=-1 + goto 1 + endif + ! + ! Manage RD_CL_IF_END + ! + if (io_action(ID)==RD_CL_IF_END.and.iq==nqibz) io_action(ID)=RD_CL + ! + ! Excitonic Gkkp (and SE) fragments + !========================= + ! + VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) + VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=EXCPH_Gkkp) + ! + VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) + VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=EXCPH_Gkkp_sq) + ! + if (l_exc_SE) then + ! + VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) + ! + VAR_name="EXCITON_SATELLITE_ENERGY_phonon_absorption_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_phonon_absorption_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) + ! + VAR_name="PHONON_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/VAR_size(2)/),SP,(/dim_names(2)/)) + call io_variable_bulk(ID_frag,1,R1=ph_EXCPH_E) + ! + VAR_name="EXCITON_BS_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/VAR_size(1),VAR_size(3)/),SP,(/dim_names(1),dim_names(3)/)) + call io_variable_bulk(ID_frag,1,C1=BS_EXCPH_E) + ! + endif + ! +1 call io_fragment_disconnect(ID,ID_frag) + ! + call io_disconnect(ID=ID) + ! + call timing('io_EXCPH_gkkp',OPR='stop') + ! + contains + integer function kind_to_integers(SCATTERING_TYPE) + ! + integer :: l2int + character(schlen), intent(in) :: SCATTERING_TYPE + ! + if (trim(SCATTERING_TYPE)=='TT') l2int=1 + ! + if (trim(SCATTERING_TYPE)=='LT') l2int=2 + ! + if (trim(SCATTERING_TYPE)=='TL') l2int=3 + ! + if (trim(SCATTERING_TYPE)=='LL') l2int=4 + ! + if (trim(SCATTERING_TYPE)=='IL') l2int=5 + ! + if (trim(SCATTERING_TYPE)=='IT') l2int=6 + ! + kind_to_integers=l2int + ! + end function + ! +end function diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index e784afddaf..2997f79511 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -integer function io_EXCPH_gkkp(ID,what) +integer function io_EXCPH_gkkp(ID) ! use pars, ONLY:SP,schlen use IO_m, ONLY:io_sec,read_is_on,RD_CL,RD_CL_IF_END,io_action,frag_ELPH,io_status @@ -29,7 +29,8 @@ integer function io_EXCPH_gkkp(ID,what) & def_variable_bulk,io_variable_bulk,io_fragment use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& & BS_E_in,BS_Sat_E,BS_Sat_WEIGHT,BS_EXCPH_E,ph_EXCPH_E,& -& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs +& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,L_kind_in,L_kind_out + use IO_int, ONLY:io_variable_elemental,def_variable_elemental use ELPH, ONLY:ph_modes,elph_branches use stderr, ONLY:intc use R_lattice, ONLY:nqibz @@ -37,14 +38,12 @@ integer function io_EXCPH_gkkp(ID,what) #include ! integer ::ID - character(*) ::what ! !Work Space ! - integer ::iq,ierr,VAR_size(4),VAR_size_sq(3),scat_type,ID_frag + integer ::iq,ierr,VAR_size(4),VAR_size_sq(3),ID_frag real(SP) ::v(3) character(schlen) ::db_name,VAR_name,dim_names(4),dim_names_sq(3) - logical ::l_exc_SE ! call timing('io_EXCPH_gkkp',OPR='start') ! @@ -54,18 +53,14 @@ integer function io_EXCPH_gkkp(ID,what) ! db_name='excph_gkkp' ! - if (index(what,'excitonic_SE')>0) l_exc_SE = .true. - ! io_EXCPH_gkkp=io_connect(desc=trim(db_name),type=2,ID=ID) if (io_EXCPH_gkkp/=0) goto 1 ! if (any((/io_sec(ID,:)==1/))) then - ! - scat_type = kind_to_integers(EXCPH_kind) ! io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) ! - call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + call io_elemental(ID,VAR="PARS",VAR_SZ=5,MENU=0) ! call io_elemental(ID,& & VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) @@ -75,10 +70,6 @@ integer function io_EXCPH_gkkp(ID,what) ! call io_elemental(ID,& & VAR=" Exciton sum (scattered):",I1=EXCPH_sum,CHECK=.true.,OP=(/"=="/)) - ! - call io_elemental(ID,& -& VAR=" Scattering type [1=TT,2=LT,3=TL,4=LL]:",I0=scat_type,CHECK=.true.,OP=(/"=="/)) - ! ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) ! @@ -94,15 +85,11 @@ integer function io_EXCPH_gkkp(ID,what) call io_bulk(ID,VAR="EXCITON_SUM",VAR_SZ=(/2/)) call io_bulk(ID,I1=EXCPH_sum) ! - call io_bulk(ID,VAR="SCATTERING_TYPE",VAR_SZ=(/1/)) - call io_bulk(ID,I0=scat_type) + call def_variable_elemental(ID,"L_kind_in",1,0,0) + call io_variable_elemental(ID,VAR="[K] L_kind in",CH0=L_kind_in,CHECK=.true.,OP=(/"=="/)) ! - if (l_exc_SE) then - ! - call io_bulk(ID,VAR="BS_initial_states_E",VAR_SZ=(/2,EXCPH_states(2)/)) - call io_bulk(ID,C1=BS_E_in) - ! - endif + call def_variable_elemental(ID,"L_kind_out",1,0,0) + call io_variable_elemental(ID,VAR="[K] L_kind out",CH0=L_kind_in,CHECK=.true.,OP=(/"=="/)) ! endif ! @@ -142,60 +129,10 @@ integer function io_EXCPH_gkkp(ID,what) call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) call io_variable_bulk(ID_frag,1,R3=EXCPH_Gkkp_sq) ! - if (l_exc_SE) then - ! - VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) - ! - VAR_name="EXCITON_SATELLITE_ENERGY_phonon_absorption_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) - ! - VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) - ! - VAR_name="EXCITON_SATELLITE_WEIGHT_phonon_absorption_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) - ! - VAR_name="PHONON_ENERGY_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,(/VAR_size(2)/),SP,(/dim_names(2)/)) - call io_variable_bulk(ID_frag,1,R1=ph_EXCPH_E) - ! - VAR_name="EXCITON_BS_ENERGY_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,(/VAR_size(1),VAR_size(3)/),SP,(/dim_names(1),dim_names(3)/)) - call io_variable_bulk(ID_frag,1,C1=BS_EXCPH_E) - ! - endif - ! 1 call io_fragment_disconnect(ID,ID_frag) ! call io_disconnect(ID=ID) ! call timing('io_EXCPH_gkkp',OPR='stop') ! - contains - integer function kind_to_integers(SCATTERING_TYPE) - ! - integer :: l2int - character(schlen), intent(in) :: SCATTERING_TYPE - ! - if (trim(SCATTERING_TYPE)=='TT') l2int=1 - ! - if (trim(SCATTERING_TYPE)=='LT') l2int=2 - ! - if (trim(SCATTERING_TYPE)=='TL') l2int=3 - ! - if (trim(SCATTERING_TYPE)=='LL') l2int=4 - ! - if (trim(SCATTERING_TYPE)=='IL') l2int=5 - ! - if (trim(SCATTERING_TYPE)=='IT') l2int=6 - ! - kind_to_integers=l2int - ! - end function - ! end function diff --git a/src/io/variables_BS.F b/src/io/variables_BS.F index 022af17418..4795a53c0f 100644 --- a/src/io/variables_BS.F +++ b/src/io/variables_BS.F @@ -28,7 +28,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) use drivers, ONLY:l_td_hf use X_m, ONLY:X_t use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts,cut_geometry - use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,& + use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,L_kind,& & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& & BS_K_is_ALDA,BS_cpl_K_exchange,& @@ -104,6 +104,11 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & VAR="[K] E/h energy range",TERMINATOR="[eV]",R1=BS_eh_en,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) call io_variable_elemental(ID,& & VAR="[K] Coupling range",TERMINATOR="[o/o]",R1=BS_eh_win,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) + ! + if(ver_is_gt_or_eq(ID,revision=21261)) then + call def_variable_elemental(ID,"L_kind",1,0,0) + call io_variable_elemental(ID,VAR='[K] L kind',CH0=L_kind,CHECK=.true.,DESCRIPTOR=desc) + endif ! ! Interaction ! diff --git a/src/io/variables_BS_PAR.F b/src/io/variables_BS_PAR.F index 2f75e7ac78..47f46f4370 100644 --- a/src/io/variables_BS_PAR.F +++ b/src/io/variables_BS_PAR.F @@ -28,7 +28,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) use drivers, ONLY:l_td_hf use X_m, ONLY:X_t use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts,cut_geometry - use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,& + use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,L_kind,& & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& & BS_K_is_ALDA,BS_cpl_K_exchange,& @@ -37,6 +37,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) use IO_int, ONLY:def_variable_elemental,io_variable_elemental use descriptors, ONLY:IO_desc,IO_desc_reset use parallel_m, ONLY:master_cpu + use IO_int, ONLY:ver_is_gt_or_eq #if defined _PAR_IO use BS, ONLY:BSK_IO_mode #endif @@ -122,6 +123,11 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call def_variable_elemental(ID,"CPL_RANGE",2,SP,0) call io_variable_elemental(ID,& & VAR="[K] Coupling range",TERMINATOR="[o/o]",R1=BS_eh_win,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) + ! + if(ver_is_gt_or_eq(ID,revision=21261)) then + call def_variable_elemental(ID,"L_kind",1,0,0) + call io_variable_elemental(ID,VAR='[K] L kind',CH0=L_kind,CHECK=.true.,DESCRIPTOR=desc) + endif ! ! Interaction ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 38a7d9aa4d..225f68ff4e 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -40,6 +40,11 @@ module EXCPH character(lchlen) :: Lin_path character(lchlen) :: Lout_path ! + ! L types + ! + character(schlen) :: L_kind_in + character(schlen) :: L_kind_out + ! ! ExcPH gkkp ! complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) From 32df6f3c12b9544a5bbdee8128ec125b39f6f562 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 30 Jan 2022 22:37:17 +0100 Subject: [PATCH 0107/1367] Version 5.1.0, Revision 21150, Hash 6cd60f992 MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_load_L.F Bugs: - Additions: -Fixed Lkind in and out output Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 2 +- src/el-ph/EXCPH_load_L.F | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 86b364f760..e342ce26b3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21149 -#define YAMBO_HASH "97a4a59e0" +#define YAMBO_REVISION 21150 +#define YAMBO_HASH "aede75256" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 7cbf215810..5c1e792b07 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -36,7 +36,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use ELPH, ONLY:ph_freqs_sq,elph_branches use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use IO_int, ONLY:io_control - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,L_kind_in,L_kind_out,& + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index f8a0b7b9e3..ca6ab374d9 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -76,10 +76,10 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) call msg('rs','Found '//trim(Ltype)//' with dimension: '//trim(intc(BSS_n_eig))//' x '//trim(intc(BS_H_dim))) if(index(Ltype,'Lout')>0) then L_kind_out=L_kind - call msg('rs','L kind out'//trim(L_kind_out)) + call msg('rs','L kind out: '//trim(L_kind_out)) elseif(index(Ltype,'Lin')>0) then - call msg('rs','L kind in'//trim(L_kind_in)) L_kind_in =L_kind + call msg('rs','L kind in: '//trim(L_kind_in)) endif endif ! From 3070e146ffc86119d2978e0fbcbc03948d2042ef Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 31 Jan 2022 11:34:52 +0100 Subject: [PATCH 0108/1367] Version 5.1.0, Revision 21151, Hash 32df6f3c1 MODIFIED * include/driver/version.h interface/INIT.F Bugs: - Additions: -Better generation input file Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e342ce26b3..0f918b9609 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21150 -#define YAMBO_HASH "aede75256" +#define YAMBO_REVISION 21151 +#define YAMBO_HASH "32df6f3c1" diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 31faefc1c0..4281497d5d 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -366,7 +366,7 @@ subroutine logicalson endif ! l_elph_Hamiltonian=runlevel_is_on('ElPhHam').and.io_ELPH_err(1)==0 - l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma').and.io_ELPH_err(2)==0 + l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma') else l_elph_corr=runlevel_is_on('el_ph_corr') l_elph_Hamiltonian=runlevel_is_on('ElPhHam') From 07b4e623fc9ca171bf8d38f56b53f05f56da77b3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 31 Jan 2022 13:38:41 +0100 Subject: [PATCH 0109/1367] Version 5.1.0, Revision 21157, Hash 8cff909 MODIFIED * modified: src/dipoles/DIPOLE_build_der_k.F NEW * lib/yambo Changes: - [yambo] Small improvement to implementation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ea1999d31f..899733d291 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21156 -#define YAMBO_HASH "6ab7d3e" +#define YAMBO_REVISION 21157 +#define YAMBO_HASH "8cff909" diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index b71f100ef3..5175a96040 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -165,28 +165,34 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) enddo enddo ! - U_r(:,:,istep)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) - U_l(:,:,istep)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) + U_r(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) + U_l(:,:,1)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) + ! + U_r(:,:,2)=U_r(:,:,1) + U_l(:,:,2)=U_l(:,:,1) ! do ib=1,Dip%ib(2) do ibp=1,Dip%ib(2) if(deg_table_k(ibp,ib).or.deg_table_kp(ibp,ib)) cycle - U_r(ib,ibp,istep)=cZERO + U_r(ib,ibp,2)=cZERO enddo enddo ! do ib=1,Dip%ib(2) do ibp=1,Dip%ib(2) if(deg_table_k(ibp,ib).or.deg_table_km(ibp,ib)) cycle - U_l(ib,ibp,istep)=cZERO + U_l(ib,ibp,2)=cZERO enddo enddo + ! + !U_r(:,:,1)=U_r(:,:,2) !-U_r(:,:,2) + !U_l(:,:,1)=U_l(:,:,2) !-U_l(:,:,2) ! - call SERIAL_SVD(Dip%ib(2),U_r(:,:,istep),'uni',0) - call SERIAL_SVD(Dip%ib(2),U_l(:,:,istep),'uni',0) + call SERIAL_SVD(Dip%ib(2),U_r(:,:,2),'uni',0) + call SERIAL_SVD(Dip%ib(2),U_l(:,:,2),'uni',0) ! - Der_k_red(:,:,istep)=+matmul( DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) ,hermitian(U_r(:,:,istep)) ) & -& -matmul(hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)),hermitian(U_l(:,:,istep)) ) + Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,2)) ) & +& -matmul(U_l(:,:,1),hermitian(U_l(:,:,2)) ) ! Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP ! From 7770542ce219f0957d139b26d48ea0f47641a6c9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 31 Jan 2022 16:19:24 +0100 Subject: [PATCH 0110/1367] Version 5.1.0, Revision 21152, Hash 3070e146f MODIFIED * el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_gkkp_eval.F Bugs: -Fixed GKKP I/O Patch sent by: Claudio Attaccalite --- src/el-ph/EXCPH_gkkp_driver.F | 6 ++-- src/el-ph/EXCPH_gkkp_eval.F | 52 +++++++++++++++++++---------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 5c1e792b07..2c2019d5a1 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -33,8 +33,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim - use ELPH, ONLY:ph_freqs_sq,elph_branches - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message + use ELPH, ONLY:elph_branches + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message,REP use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi @@ -87,7 +87,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Check if gkkp_expanded is present ! - call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),ID=ID_gkkp) + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. call deliver_IO_error_message(io_err,"GKKP") if (io_err/=0) call error('El-Ph database not found') diff --git a/src/el-ph/EXCPH_gkkp_eval.F b/src/el-ph/EXCPH_gkkp_eval.F index cf81481b1e..4e79376027 100644 --- a/src/el-ph/EXCPH_gkkp_eval.F +++ b/src/el-ph/EXCPH_gkkp_eval.F @@ -33,7 +33,8 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab use R_lattice, ONLY:nqibz,bz_samp,qindx_B_load use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & +& deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat @@ -51,7 +52,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! Work Space ! integer :: ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,i_H,i_Hp,i_alpha,& -& iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz +& iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT real(SP) :: ph_E,elph_gkkp_sq integer, external :: io_ELPH ! @@ -62,25 +63,28 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! ->i_alpha ->i_H [Calculate Gkkp] Xi=cZERO ! - do i_beta=EXCPH_sum(1),EXCPH_sum(2) + do i_star=1,q%nstar(iq) ! - do i_star=1,q%nstar(iq) - ! - iq_s=q%star(iq,i_star) - ! - iq_bz = q%k_table(iq, iq_s) - ! - ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > - ! - ! with k and q in the BZ - ! - call io_control(ACTION=RD_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. - if(io_err/=0) call error(" Error reading gkkp_expanded") - ! - ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) - ! - if (abs(ph_E) + ! + ! with k and q in the BZ + ! + IO_ACT=manage_action(RD,iq_bz,1,q%nbz) + if(il==elph_branches(2).and.i_star==q%nstar(iq)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + ! + call io_control(ACTION=IO_ACT,SEC=(/iq_bz+1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + if(io_err/=0) call error(" Error reading gkkp_expanded") + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) + ! + if (ph_E Date: Tue, 1 Feb 2022 13:32:46 +0100 Subject: [PATCH 0111/1367] Version 5.1.0, Revision 21153, Hash 7770542ce MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F io/io_EXCPH_gkkp.F Additions: -Fixed reading EXCPH_gkkp Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 14 +++++++++++--- src/io/io_EXCPH_gkkp.F | 10 ++++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0f918b9609..a2eba19df3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21151 -#define YAMBO_HASH "32df6f3c1" +#define YAMBO_REVISION 21153 +#define YAMBO_HASH "7770542ce" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 2c2019d5a1..8a0ebf69d2 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -34,7 +34,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim use ELPH, ONLY:elph_branches - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message,REP + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & +& REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi @@ -54,11 +55,18 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) integer :: ID_gkkp,ID_exc_gkkp,io_err integer :: il,iq ! - call timing('EXCPH_gkkp',OPR='start') - ! call section('*','Excitonic gkkp') !====================================== ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp) + ! + if(io_err==0) return + ! + if(io_err/=0) call warning("[EXCPH] Exc-ph matrix elements not correct or missing. To be computed") + ! + call timing('EXCPH_gkkp',OPR='start') + ! call EXCPH_load_L(1,X,'check','Lin') ! At present the Lin can be only gamma iq=1 ! call k_build_up_BZ_tables(k) diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index 2997f79511..4254750570 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -35,6 +35,7 @@ integer function io_EXCPH_gkkp(ID) use stderr, ONLY:intc use R_lattice, ONLY:nqibz use timing_m, ONLY:timing + ! #include ! integer ::ID @@ -117,17 +118,22 @@ integer function io_EXCPH_gkkp(ID) ! Excitonic Gkkp (and SE) fragments !========================= ! + if (read_is_on(ID).and..not.allocated(EXCPH_gkkp)) then + YAMBO_ALLOC(EXCPH_gkkp,(ph_modes,EXCPH_sum(2),EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_gkkp_sq,(ph_modes,EXCPH_sum(2),EXCPH_states(2))) + endif + ! VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=EXCPH_Gkkp) + call io_variable_bulk(ID_frag,1,C3=EXCPH_gkkp) ! VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=EXCPH_Gkkp_sq) + call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) ! 1 call io_fragment_disconnect(ID,ID_frag) ! From 0fa2278d5e8ef4e38f851680cfc4821eb90e2854 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 1 Feb 2022 13:47:21 +0100 Subject: [PATCH 0112/1367] Version 5.1.0, Revision 21154, Hash 100c190a4 MODIFIED * include/driver/version.h el-ph/.objects NEW * el-ph/EXCPH_renorm_factors.F Additions: -Exciton-phonon renormalization factors Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_renorm_factors.F | 50 ++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 src/el-ph/EXCPH_renorm_factors.F diff --git a/include/driver/version.h b/include/driver/version.h index a2eba19df3..cedf6f3241 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21153 -#define YAMBO_HASH "7770542ce" +#define YAMBO_REVISION 21154 +#define YAMBO_HASH "100c190a4" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 7b7571889c..6d988ab80b 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ +EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o EXCPH_renorm_factors.o \ ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o #endif #if defined _RT || defined _PHEL diff --git a/src/el-ph/EXCPH_renorm_factors.F b/src/el-ph/EXCPH_renorm_factors.F new file mode 100644 index 0000000000..58b951fc10 --- /dev/null +++ b/src/el-ph/EXCPH_renorm_factors.F @@ -0,0 +1,50 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! --- Theory --- +! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! - FP +! +subroutine EXCPH_renorm_factors(E,k,q,X) + ! + use pars, ONLY:SP,cZERO,rZERO,schlen + use electrons, ONLY:levels,n_sp_pol + use R_lattice, ONLY:bz_samp + use X_m, ONLY:X_t + use timing_m, ONLY:timing + use com, ONLY:msg + ! +#include + ! + type(levels) ::E + type(bz_samp) ::k,q + type(X_t) ::X + ! + call section('*','Exciton-phonon renormalization factors(R)') + !====================================== + ! + call timing('EXCPH_Rfact',OPR='start') + ! + call timing('EXCPH_Rfact',OPR='stop') + ! +end subroutine From 6b398165a2412b44d7840e7a01d5f94aba61832f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 2 Feb 2022 11:06:18 +0100 Subject: [PATCH 0113/1367] Version 5.1.0, Revision 21155, Hash 0fa2278d5 MODIFIED * include/driver/version.h el-ph/.objects el-ph/EXCPH_renorm_factors.F Bugs: -Cleaning Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_renorm_factors.F | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index cedf6f3241..9ae0a99b10 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21154 -#define YAMBO_HASH "100c190a4" +#define YAMBO_REVISION 21155 +#define YAMBO_HASH "0fa2278d5" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 6d988ab80b..7b7571889c 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o EXCPH_renorm_factors.o \ +EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o #endif #if defined _RT || defined _PHEL diff --git a/src/el-ph/EXCPH_renorm_factors.F b/src/el-ph/EXCPH_renorm_factors.F index 58b951fc10..5089415e25 100644 --- a/src/el-ph/EXCPH_renorm_factors.F +++ b/src/el-ph/EXCPH_renorm_factors.F @@ -21,9 +21,9 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -! --- Theory --- -! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. -! - FP +! Calculate renormalization factors R +! +! R_{a,l} = \sum_{q,b } | G(q)_{a,n} |^2/(E_a - E_b -\Omega_{q,l} ) ! subroutine EXCPH_renorm_factors(E,k,q,X) ! From f06782cb10d64f5519e5d3b83dceb26ab06527a5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 7 Feb 2022 12:21:14 +0100 Subject: [PATCH 0114/1367] Version 5.1.0, Revision 21184, Hash ddae33c79 MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_load_L.F interface/INIT_activate.F io/io_EXCPH_gkkp.F Bugs: -Fixed EXC-PH gkkp IO Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 14 ++++++++++---- src/el-ph/EXCPH_load_L.F | 6 ++++-- src/interface/INIT_activate.F | 1 - src/io/io_EXCPH_gkkp.F | 13 +++++++++---- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 85655e6247..f830a2bb41 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21155 -#define YAMBO_HASH "a5836d7b3" +#define YAMBO_REVISION 21184 +#define YAMBO_HASH "ddae33c79" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 8a0ebf69d2..9a287656b2 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -58,11 +58,18 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call section('*','Excitonic gkkp') !====================================== ! + ! Check if Lout and Lin are present + ! and read their kind + ! + call EXCPH_load_L(1,X,'check','Lout') + call EXCPH_load_L(1,X,'check','Lin') + ! + ! Check if exciton-phonon matrix elements have been already calculated + ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! if(io_err==0) return - ! if(io_err/=0) call warning("[EXCPH] Exc-ph matrix elements not correct or missing. To be computed") ! call timing('EXCPH_gkkp',OPR='start') @@ -98,6 +105,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. call deliver_IO_error_message(io_err,"GKKP") + ! if (io_err/=0) call error('El-Ph database not found') ! ! Write headers @@ -105,9 +113,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! - ! Check if Lout is present - ! - call EXCPH_load_L(1,X,'check','Lout') ! ! Main q-loop ! @@ -134,6 +139,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! enddo + ! call live_timing( ) ! call timing('EXCPH_gkkp',OPR='stop') diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index ca6ab374d9..e4a419cb98 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -68,9 +68,11 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! BS_H_dim=BS_K_dim(1) ! - if(EXCPH_states(2)>BSS_n_eig) call error("Number of exc. states in the excphon coupling must <= number of BSE eigenstates") + if(EXCPH_states(2)>BSS_n_eig) & +& call error("Number of exc. states in the excphon coupling must <= number of BSE eigenstates") ! - if(EXCPH_sum(2)>BS_H_dim) call error("Number of virtual exc. states in the excphon coupling must <= size of the exc. Hamiltonian") + if(EXCPH_sum(2)>BS_H_dim) & +& call error("Number of virtual exc. states in the excphon coupling must <= size of the exc. Hamiltonian") ! if(iq_bse==1) then call msg('rs','Found '//trim(Ltype)//' with dimension: '//trim(intc(BSS_n_eig))//' x '//trim(intc(BS_H_dim))) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index a70b7e939a..495af86df9 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -456,7 +456,6 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh') - if (l_EXCPH_Sigma) call initactivate(1,'GEnSteps GEnRnge GDmRnge') ! #endif ! diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index 4254750570..ef2fb43669 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -49,6 +49,7 @@ integer function io_EXCPH_gkkp(ID) call timing('io_EXCPH_gkkp',OPR='start') ! ID_frag=0 + io_EXCPH_gkkp=0 ! ! DB name ! @@ -61,16 +62,16 @@ integer function io_EXCPH_gkkp(ID) ! io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) ! - call io_elemental(ID,VAR="PARS",VAR_SZ=5,MENU=0) + call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) ! call io_elemental(ID,& -& VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) +& VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"==","=="/)) ! call io_elemental(ID,& -& VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"=="/)) +& VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"==","=="/)) ! call io_elemental(ID,& -& VAR=" Exciton sum (scattered):",I1=EXCPH_sum,CHECK=.true.,OP=(/"=="/)) +& VAR=" Exciton sum (scattered):",I1=EXCPH_sum,CHECK=.true.,OP=(/"==","=="/)) ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) ! @@ -94,6 +95,8 @@ integer function io_EXCPH_gkkp(ID) ! endif ! + io_EXCPH_gkkp=io_status(ID) + ! iq=maxval(io_sec(ID,:))-1 if (iq<=0) goto 1 ! @@ -135,6 +138,8 @@ integer function io_EXCPH_gkkp(ID) call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) ! + io_EXCPH_gkkp=io_status(ID) + ! 1 call io_fragment_disconnect(ID,ID_frag) ! call io_disconnect(ID=ID) From 024206b905c6d3e2dde2a851831b3e0071fc7ca8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 7 Feb 2022 13:47:02 +0100 Subject: [PATCH 0115/1367] Version 5.1.0, Revision 21185, Hash f06782cb1 MODIFIED * driver/yambo.F include/driver/version.h el-ph/.objects RENAMED * el-ph/EXCPH_renorm_factors.F -> el-ph/EXCPH_Sigma.F Additions: -Exciton-phonon self-energy Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 4 ++-- include/driver/version.h | 4 ++-- src/el-ph/.objects | 2 +- .../{EXCPH_renorm_factors.F => EXCPH_Sigma.F} | 17 ++++++++--------- 4 files changed, 13 insertions(+), 14 deletions(-) rename src/el-ph/{EXCPH_renorm_factors.F => EXCPH_Sigma.F} (81%) diff --git a/driver/yambo.F b/driver/yambo.F index c19f4367ac..4434ddf6e4 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -244,8 +244,8 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! EXCITON-PHONON Self-Energy ! ============================== #if defined _ELPH -! driver_now=l_EXCPH_gkkp -! if (driver_now) call + driver_now=l_EXCPH_Sigma + if (driver_now) call EXCPH_Sigma(Ken,Xk,q,X(i_X_kind)) #endif ! ! diff --git a/include/driver/version.h b/include/driver/version.h index f830a2bb41..bb44f1f9fc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21184 -#define YAMBO_HASH "ddae33c79" +#define YAMBO_REVISION 21185 +#define YAMBO_HASH "f06782cb1" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 7b7571889c..1298dabf7b 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_Sigma.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_renorm_factors.F b/src/el-ph/EXCPH_Sigma.F similarity index 81% rename from src/el-ph/EXCPH_renorm_factors.F rename to src/el-ph/EXCPH_Sigma.F index 5089415e25..6ec926903f 100644 --- a/src/el-ph/EXCPH_renorm_factors.F +++ b/src/el-ph/EXCPH_Sigma.F @@ -21,16 +21,17 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -! Calculate renormalization factors R +! --- Theory --- +! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! - FP ! -! R_{a,l} = \sum_{q,b } | G(q)_{a,n} |^2/(E_a - E_b -\Omega_{q,l} ) -! -subroutine EXCPH_renorm_factors(E,k,q,X) +subroutine EXCPH_Sigma(E,k,q,X) ! use pars, ONLY:SP,cZERO,rZERO,schlen use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp use X_m, ONLY:X_t + use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg ! @@ -40,11 +41,9 @@ subroutine EXCPH_renorm_factors(E,k,q,X) type(bz_samp) ::k,q type(X_t) ::X ! - call section('*','Exciton-phonon renormalization factors(R)') - !====================================== - ! - call timing('EXCPH_Rfact',OPR='start') + ! Work Space ! - call timing('EXCPH_Rfact',OPR='stop') + call section('*','Exciton-phonon self-energy') + !====================================== ! end subroutine From 7729f88421164f9d6c784c12b38bdff899447cf2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 7 Feb 2022 14:39:01 +0100 Subject: [PATCH 0116/1367] Version 5.1.0, Revision 21186, Hash 024206b90 MODIFIED * driver/yambo.F include/driver/version.h driver/options_projects.c interface/INIT.F interface/INIT_activate.F interface/INIT_check_databases.F interface/INIT_load.F interface/INIT_read_command_line.F modules/SET_defaults.F modules/mod_EXCPH.F modules/mod_drivers.F Additions: -Fixed input file Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 15 ++++++--------- include/driver/version.h | 4 ++-- src/driver/options_projects.c | 7 +++++-- src/interface/INIT.F | 14 +++++++++----- src/interface/INIT_activate.F | 5 +++-- src/interface/INIT_check_databases.F | 4 +++- src/interface/INIT_load.F | 14 ++++++++++++-- src/interface/INIT_read_command_line.F | 17 +++++++++++++++-- src/modules/SET_defaults.F | 3 ++- src/modules/mod_EXCPH.F | 4 ++++ src/modules/mod_drivers.F | 2 ++ 11 files changed, 63 insertions(+), 26 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 4434ddf6e4..26ed69fdb4 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -31,7 +31,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! / / Y88b / Y888b 888__/ `88_-~ ! use drivers, ONLY:l_HF_and_locXC,l_sc_run,l_eval_collisions,l_real_time,& -& l_optics,l_chi,l_em1s,l_ppa,l_bss,l_bse,l_em1d,l_EXCPH_gkkp,l_EXCPH_Sigma,& +& l_optics,l_chi,l_em1s,l_ppa,l_bss,l_bse,l_em1d,l_EXCPH_gkkp,l_EXCPH_optics,l_EXCPH_lifetime,& & l_gw0,l_life,l_acfdt,l_dipoles,l_nl_optics,l_elel_corr,l_phel_corr #if defined _SCALAPACK use drivers, ONLY:l_slk_test @@ -234,18 +234,15 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if (driver_now) call K_driver(Xen,Ken,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip) if (driver_now) call mem_manager_report ! - ! EXCITON-PHONON MATRIX ELEMENTS - ! ============================== + ! EXCITON-PHONON + ! =============== #if defined _ELPH driver_now=l_EXCPH_gkkp if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) -#endif ! - ! EXCITON-PHONON Self-Energy - ! ============================== -#if defined _ELPH - driver_now=l_EXCPH_Sigma - if (driver_now) call EXCPH_Sigma(Ken,Xk,q,X(i_X_kind)) + if(l_EXCPH_lifetime) call error("Not implemented yet") + if(l_EXCPH_optics) call error("Not implemented yet") + ! #endif ! ! diff --git a/include/driver/version.h b/include/driver/version.h index bb44f1f9fc..b71a35c062 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21185 -#define YAMBO_HASH "f06782cb1" +#define YAMBO_REVISION 21186 +#define YAMBO_HASH "024206b90" diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index 03e77d0e7c..82abf96c2d 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -88,10 +88,13 @@ void options_projects(struct options_struct options[],int *i_opt) options[*i_opt].yambo_string="ElPhHam"; options[*i_opt].section=desc; *i_opt=*i_opt+1; - options[*i_opt].short_desc="Exction-phonon Self-Energy"; + options[*i_opt].short_desc="Exction-phonon"; + options[*i_opt].long_desc[0]="=(o)ptical spectra,(l)ife times"; options[*i_opt].long_opt="excph"; + options[*i_opt].char_var=1; + options[*i_opt].short_opt='m'; options[*i_opt].bin="yambo_ph"; - options[*i_opt].yambo_string="ExcPhSigma"; + options[*i_opt].yambo_string="excph"; options[*i_opt].section=desc; desc="Real-Time"; diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 4281497d5d..9a272c8c96 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -33,7 +33,8 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) & l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hartree,l_tddft,list_dbs,l_td_hf,l_setup,l_sc_run,l_rim,& & l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,l_EXCPH_gkkp,& & l_elph_Hamiltonian,l_elph_scatt,l_elphoton_corr,l_elphoton_scatt,l_em1d,l_eval_collisions,& -& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_scatt,l_phel_corr,l_EXCPH_Sigma +& l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_scatt,l_phel_corr, & +& l_EXCPH_optics,l_EXCPH_lifetime #if defined _SCALAPACK use drivers, ONLY:l_slk_test #endif @@ -366,15 +367,16 @@ subroutine logicalson endif ! l_elph_Hamiltonian=runlevel_is_on('ElPhHam').and.io_ELPH_err(1)==0 - l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma') + l_EXCPH_optics =runlevel_is_on('ExcPhOptics') + l_EXCPH_lifetime =runlevel_is_on('ExcPhLifeT') else l_elph_corr=runlevel_is_on('el_ph_corr') l_elph_Hamiltonian=runlevel_is_on('ElPhHam') - l_EXCPH_Sigma=runlevel_is_on('ExcPhSigma') l_phel_corr=runlevel_is_on('ph_el_corr') + l_EXCPH_optics =runlevel_is_on('ExcPhOptics') + l_EXCPH_lifetime =runlevel_is_on('ExcPhLifeT') endif l_elel_corr=runlevel_is_on('el_el_corr') - l_EXCPH_gkkp=runlevel_is_on('ExcGkkp') #endif #if defined _QED l_elel_corr =runlevel_is_on('el_el_corr') @@ -441,7 +443,9 @@ subroutine before_infile_write_setup if (.not.any((/l_elel_corr,l_elph_corr,l_elphoton_corr,l_phel_corr/))) l_elel_corr=.true. #if defined _ELPH elph_nQ_used=elph_nQ - if(l_EXCPH_Sigma) call initactivate(1,'ExcGkkp') + if(l_EXCPH_optics.or.l_EXCPH_lifetime) call initactivate(1,'ExcGkkp') + if(l_EXCPH_optics) call initactivate(1,'ExcPhOptics') + if(l_EXCPH_lifetime) call initactivate(1,'ExcPhLifeT') #endif #if defined _PHEL PH_Q=(/1,elph_nQ/) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 495af86df9..676f87ecd8 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -32,7 +32,7 @@ subroutine INIT_activate() & l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,& & l_elph_Hamiltonian,l_elph_scatt,l_elphoton_corr,l_elphoton_scatt,l_em1d,l_eval_collisions,& & l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_corr,l_nl_p_and_p, & -& l_EXCPH_gkkp,l_EXCPH_Sigma +& l_EXCPH_gkkp,l_EXCPH_optics #if defined _SC || defined _RT use hamiltonian, ONLY:H_potential #endif @@ -455,7 +455,8 @@ subroutine INIT_activate() ! ! Exciton-phonon Self-energy ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh') + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh') + if (l_EXCPH_optics) call initactivate(1,'BoseTemp EXCTemp PlotLum DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') ! #endif ! diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 126162d1b4..398737a389 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -90,7 +90,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I integer, external :: io_SC_components,io_RT_components #endif #if defined _ELPH - integer, external :: io_ELPH + integer, external :: io_ELPH,io_EXCPH_gkkp #endif ! ! BASICAL DATABASES @@ -261,6 +261,8 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I io_ELPH_err(1)=io_ELPH(io_ID,'gkkp') call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=io_ID) io_ELPH_err(2)=io_ELPH(io_ID,'gkkp_expanded') + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) + io_err=io_EXCPH_gkkp(io_ID) #endif ! ! RT diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index d3de91817c..e24fc6421d 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,EXC_Temp #endif #if defined _OPENMP use openmp, ONLY:n_threads_X,n_threads_SE,n_threads_RT,n_threads_DIP,n_threads_K,n_threads_NL @@ -170,7 +170,9 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _ELPH call it('r',defs,'el_ph_corr', '[R] Electron-Phonon Correlation') - call it('r',defs,'ExcGkkp', '[R][EXCPH] Exciton-Phonon Matrix Elelements') + call it('r',defs,'ExcGkkp', '[R][EXCPH] Exciton-Phonon Matrix Elelements') + call it('r',defs,'ExcPhOptics', '[R][EXCPH] Exciton-Phonon Optics') + call it('r',defs,'ExcPhLifeT', '[R][EXCPH] Exciton-Phonon Life-Times') #endif #if defined _PHEL call it('r',defs,'ph_el_corr', '[R] Phonon-Electron Correlation') @@ -209,7 +211,11 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'Nelectro','Electrons number',nel,verb_level=V_general) call it(defs,'ElecTemp','Electronic Temperature',Tel,T_unit,verb_level=V_general) call it(defs,'OccTresh','Occupation treshold (metallic bands)',filled_tresh,verb_level=V_general) +#if defined _ELPH + call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit) +#else call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit,verb_level=V_general) +#endif call it(defs,'BoseCut', '[BOSE] Finite T Bose function cutoff',bose_E_cut,verb_level=V_general) #if defined _ELPH call it('f',defs,'BSEscatt', '[KPT] Compute extended k/q scatering',verb_level=V_kpt) @@ -658,6 +664,10 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) + call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',EXC_Temp,T_unit) + call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') + call it('f',defs,'DBGSigmaOnly', '[EXCPH] Double-grid only for Sigma') + call it('f',defs,'PlotLum', '[EXCPH] Plot luminescence spectra') ! ! GPL_EXCLUDE_START ! diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index e6ad285528..7a6710e69e 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -24,8 +24,8 @@ subroutine INIT_read_command_line(rstr,init_) ! use pars, ONLY:schlen - use drivers, ONLY:infile_editing,l_bse,l_alda_fxc,l_chi,l_elel_corr,l_nl_p_and_p,& -& l_elel_scatt,l_elph_corr,l_elph_scatt,l_elphoton_corr,l_EXCPH_gkkp,l_EXCPH_Sigma, & + use drivers, ONLY:infile_editing,l_bse,l_alda_fxc,l_chi,l_elel_corr,l_nl_p_and_p,l_EXCPH_lifetime,l_EXCPH_optics,& +& l_elel_scatt,l_elph_corr,l_elph_scatt,l_elphoton_corr,l_EXCPH_gkkp,& & l_elphoton_scatt,l_em1s,l_em1d,l_ppa,l_phel_scatt,l_phel_corr,l_dipoles use BS, ONLY:BSK_mode use BS_solvers, ONLY:BSS_mode @@ -409,6 +409,19 @@ subroutine INIT_read_command_line(rstr,init_) endif #endif ! +#if defined _ELPH + ! + ! Exciton-phonon + ! + if ( trim(rstr_piece(i1)) == 'excph' ) then + ! + if ( trim(rstr_piece(i1+1)) == 'o' ) call initactivate(1,'ExcPhOptics') + if ( trim(rstr_piece(i1+1)) == 'l' ) call initactivate(1,'ExcPhLifeT') + ! + endif + ! +#endif + #if defined _NL ! ! NL diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 37c3ca9aa3..9b2c18064a 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -84,7 +84,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,EXC_Temp #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -538,6 +538,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Lout_path='none' EXCPH_states=(/1,1/) EXCPH_sum=(/1,1/) + EXC_Temp=0._SP ! #endif ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 225f68ff4e..a9b19d62d5 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -66,4 +66,8 @@ module EXCPH complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) ! + ! Luminescence + ! + real(SP) :: Exc_temp + ! end module EXCPH diff --git a/src/modules/mod_drivers.F b/src/modules/mod_drivers.F index 38e3627073..1b2e712354 100644 --- a/src/modules/mod_drivers.F +++ b/src/modules/mod_drivers.F @@ -71,6 +71,8 @@ module drivers ! logical :: l_EXCPH_Sigma =.FALSE. logical :: l_EXCPH_gkkp =.FALSE. + logical :: l_EXCPH_optics =.FALSE. + logical :: l_EXCPH_lifetime =.FALSE. ! ! Real Axis non SC Self-energies ! From 6f0a60768aad01cd8ab511495ca0c6561f9a6e95 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 7 Feb 2022 15:13:20 +0100 Subject: [PATCH 0117/1367] Version 5.1.0, Revision 21187, Hash 7729f8842 MODIFIED * driver/yambo.F include/driver/version.h el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_load_L.F interface/INIT.F interface/INIT_read_command_line.F modules/mod_EXCPH.F Changes: -Fixed inputs Patch sent by: Claudio Attaccalite --- driver/yambo.F | 7 +++-- include/driver/version.h | 4 +-- src/el-ph/EXCPH_gkkp_driver.F | 39 ++++++++++++++++++++++---- src/el-ph/EXCPH_load_L.F | 4 +-- src/interface/INIT.F | 7 ++++- src/interface/INIT_read_command_line.F | 1 + src/modules/mod_EXCPH.F | 10 +++---- 7 files changed, 54 insertions(+), 18 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 26ed69fdb4..3ad5f8447a 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -240,8 +240,11 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d driver_now=l_EXCPH_gkkp if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) ! - if(l_EXCPH_lifetime) call error("Not implemented yet") - if(l_EXCPH_optics) call error("Not implemented yet") + driver_now=l_EXCPH_optics + if(driver_now) call error("Not implemented yet") + ! + driver_now=l_EXCPH_lifetime + if(driver_now) call error("Not implemented yet") ! #endif ! diff --git a/include/driver/version.h b/include/driver/version.h index b71a35c062..bc718656b9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21186 -#define YAMBO_HASH "024206b90" +#define YAMBO_REVISION 21187 +#define YAMBO_HASH "7729f8842" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 9a287656b2..e0bc359a48 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -37,7 +37,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,& + use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing @@ -83,11 +83,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call EXCPH_load_L(1,X,'load','Lin') ! - ! Save the Lin in BS_mat_in - ! - BS_mat_in=BS_mat(:,EXCPH_states(1):EXCPH_states(2)) - BSS_eh_table_in=BSS_eh_table(EXCPH_states(1):EXCPH_states(2),:) - ! ! Alloage EXCPH_gkkp ! call EXCPH_gkkp_alloc() @@ -100,6 +95,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call build_inverse_eh_table() ! + ! Save the Lin in information + ! + BS_mat_in =BS_mat(:,EXCPH_states(1):EXCPH_states(2)) + BSS_eh_table_in =BSS_eh_table(EXCPH_states(1):EXCPH_states(2),:) + BSS_eh_table_m1_in=BSS_eh_table_m1 + BS_E_in =BS_E + ! ! Check if gkkp_expanded is present ! call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) @@ -155,15 +157,40 @@ subroutine BSE_alloc() YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + YAMBO_ALLOC(BS_E,(BSS_n_eig)) YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) ! + YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) + YAMBO_ALLOC(BS_mat_in,(BS_H_dim,BSS_n_eig)) + YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) + YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + ! BS_mat=cZERO + BS_E=cZERO + ! k_plus_q_table = 0 BSS_eh_table = 0 BSS_eh_table_m1 = 0 ! + BS_mat_in=cZERO + BS_E_in =cZERO + BSS_eh_table_in = 0 + BSS_eh_table_m1_in = 0 + ! end subroutine BSE_alloc ! + subroutine BSE_free + YAMBO_FREE(BS_mat) + YAMBO_FREE(BSS_eh_table) + YAMBO_FREE(BSS_eh_table_m1) + YAMBO_FREE(BS_E_in) + YAMBO_FREE(BS_mat_in) + YAMBO_FREE(BSS_eh_table_in) + YAMBO_FREE(BSS_eh_table_m1_in) + YAMBO_FREE(BS_E) + YAMBO_FREE(k_plus_q_table) + end subroutine BSE_free + ! subroutine EXCPH_gkkp_alloc() YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index e4a419cb98..a7daf7ad33 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -32,7 +32,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use R_lattice, ONLY:bz_samp use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_Gkkp,EXCPH_Gkkp_sq,& + use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,BS_E,& & EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path,L_kind_in,L_kind_out use IO_int, ONLY:io_control use stderr, ONLY:intc @@ -88,7 +88,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) elseif(index(what,'load')>0) then ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2,3/),ID=ID_BS) - io_err=io_BSS_diago(iq_bse,1,ID_BS,X) + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! endif diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 9a272c8c96..9f80d112a8 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -369,12 +369,14 @@ subroutine logicalson l_elph_Hamiltonian=runlevel_is_on('ElPhHam').and.io_ELPH_err(1)==0 l_EXCPH_optics =runlevel_is_on('ExcPhOptics') l_EXCPH_lifetime =runlevel_is_on('ExcPhLifeT') + l_EXCPH_gkkp =runlevel_is_on('ExcGkkp') else l_elph_corr=runlevel_is_on('el_ph_corr') l_elph_Hamiltonian=runlevel_is_on('ElPhHam') l_phel_corr=runlevel_is_on('ph_el_corr') l_EXCPH_optics =runlevel_is_on('ExcPhOptics') l_EXCPH_lifetime =runlevel_is_on('ExcPhLifeT') + l_EXCPH_gkkp =runlevel_is_on('ExcGkkp') endif l_elel_corr=runlevel_is_on('el_el_corr') #endif @@ -443,7 +445,10 @@ subroutine before_infile_write_setup if (.not.any((/l_elel_corr,l_elph_corr,l_elphoton_corr,l_phel_corr/))) l_elel_corr=.true. #if defined _ELPH elph_nQ_used=elph_nQ - if(l_EXCPH_optics.or.l_EXCPH_lifetime) call initactivate(1,'ExcGkkp') + if(l_EXCPH_optics.or.l_EXCPH_lifetime) then + l_EXCPH_gkkp=.true. + call initactivate(1,'ExcGkkp') + endif if(l_EXCPH_optics) call initactivate(1,'ExcPhOptics') if(l_EXCPH_lifetime) call initactivate(1,'ExcPhLifeT') #endif diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index 7a6710e69e..3ea6755140 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -415,6 +415,7 @@ subroutine INIT_read_command_line(rstr,init_) ! if ( trim(rstr_piece(i1)) == 'excph' ) then ! + call initactivate(1,'ExcGkkp') if ( trim(rstr_piece(i1+1)) == 'o' ) call initactivate(1,'ExcPhOptics') if ( trim(rstr_piece(i1+1)) == 'l' ) call initactivate(1,'ExcPhLifeT') ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index a9b19d62d5..2e731b5f2b 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -47,8 +47,11 @@ module EXCPH ! ! ExcPH gkkp ! - complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) - integer, allocatable :: BSS_eh_table_m1(:,:,:),k_plus_q_table(:,:) + complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) + integer, allocatable :: BSS_eh_table_m1(:,:,:),BSS_eh_table_m1_in(:,:,:),k_plus_q_table(:,:) + complex(SP), allocatable :: BS_E_in(:),BS_E(:) + complex(SP), allocatable :: BS_mat_in(:,:) + integer, allocatable :: BSS_eh_table_in(:,:) ! ! ... Sigma ! @@ -60,9 +63,6 @@ module EXCPH real(SP), allocatable :: EXCPH_Renorm_PH_abs(:) complex(SP), allocatable :: BS_EXCPH_E(:) real(SP), allocatable :: ph_EXCPH_E(:) - complex(SP), allocatable :: BS_mat_in(:,:) - complex(SP), allocatable :: BS_E_in(:) - integer, allocatable :: BSS_eh_table_in(:,:) complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) ! From 6329a94a66a508c832e1529c336c12684a6008ee Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 7 Feb 2022 16:41:15 +0100 Subject: [PATCH 0118/1367] Version 5.1.0, Revision 21188, Hash 6f0a60768 MODIFIED * include/driver/version.h el-ph/.objects el-ph/EXCPH_gkkp_driver.F io/io_EXCPH_gkkp.F modules/mod_EXCPH.F NEW * el-ph/EXCPH_eval_sat.F Additions: -Added all quantities for self-energy and spectra Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/el-ph/.objects | 3 +- src/el-ph/EXCPH_eval_sat.F | 67 +++++++++++++++++++++++++++++++++++ src/el-ph/EXCPH_gkkp_driver.F | 29 ++++++++++----- src/io/io_EXCPH_gkkp.F | 25 ++++++++++--- src/modules/mod_EXCPH.F | 54 +++++++++++++++++++++++++++- 6 files changed, 165 insertions(+), 17 deletions(-) create mode 100644 src/el-ph/EXCPH_eval_sat.F diff --git a/include/driver/version.h b/include/driver/version.h index bc718656b9..25d8acdb17 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21187 -#define YAMBO_HASH "7729f8842" +#define YAMBO_REVISION 21188 +#define YAMBO_HASH "6f0a60768" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 1298dabf7b..1a803edddb 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,7 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_Sigma.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ + EXCPH_Sigma.o EXCPH_eval_sat.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_eval_sat.F b/src/el-ph/EXCPH_eval_sat.F new file mode 100644 index 0000000000..6e5e125f50 --- /dev/null +++ b/src/el-ph/EXCPH_eval_sat.F @@ -0,0 +1,67 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! +subroutine EXCPH_eval_sat(iq,il,q) + ! + use pars, ONLY:SP,cZERO,rZERO + use R_lattice, ONLY:bz_samp + use ELPH, ONLY:PH_freqs_sq + use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & +& EXCPH_Renorm,EXCPH_Renorm_PH_abs,BS_E,BS_E_in,EXCPH_Gkkp_sq, & +& EXCPH_sum,EXCPH_states + ! +#include + ! + integer, intent(in) :: iq,il + type(bz_samp), intent(in) :: q + ! + ! Work space + ! + real(SP) :: ph_E + integer :: i_start,iq_bz + integer :: i_alpha,i_beta + ! + iq_bz = q%k_table(iq, 1) + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) + ! + ! Calculate satellites weights and renormalization factors without double-grid + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + BS_Sat_E (il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)+ph_E + BS_Sat_E_PH_abs(il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)-ph_E + ! + BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E(il,i_beta,i_alpha))**2 + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 + ! + EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)/real(q%nbz,SP) + EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/real(q%nbz,SP) + ! + enddo + enddo + ! +end subroutine diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index e0bc359a48..77e10a29f3 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -38,7 +38,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) & REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,EXCPH_Renorm_PH_abs, & +& EXCPH_Renorm,BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free, & +& EXCPH_gkkp_alloc,EXCPH_gkkp_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -115,6 +117,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! + call Sat_alloc() ! ! Main q-loop ! @@ -125,12 +128,20 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) if(iq>1) call EXCPH_load_L(iq,X,'check','Lout') call EXCPH_load_L(iq,X,'load','Lout') ! - EXCPH_gkkp =cZERO - EXCPH_gkkp_sq=rZERO + EXCPH_gkkp =cZERO + EXCPH_gkkp_sq =rZERO + ! + BS_Sat_E =rZERO + BS_Sat_E_PH_abs =rZERO + BS_Sat_WEIGHT =rZERO + BS_Sat_WEIGHT_PH_abs=rZERO ! do il=elph_branches(1),elph_branches(2) ! call EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) + ! + call EXCPH_eval_sat(iq,il,q) + ! call live_timing(steps=1) ! enddo @@ -143,6 +154,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) enddo ! call live_timing( ) + ! + call BSE_free() + call EXCPH_gkkp_free() + call Sat_free() ! call timing('EXCPH_gkkp',OPR='stop') ! @@ -151,6 +166,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) contains ! subroutine BSE_alloc() + implicit none ! ! pre-allocs... ! @@ -180,6 +196,7 @@ subroutine BSE_alloc() end subroutine BSE_alloc ! subroutine BSE_free + implicit none YAMBO_FREE(BS_mat) YAMBO_FREE(BSS_eh_table) YAMBO_FREE(BSS_eh_table_m1) @@ -191,12 +208,6 @@ subroutine BSE_free YAMBO_FREE(k_plus_q_table) end subroutine BSE_free ! - subroutine EXCPH_gkkp_alloc() - YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(Xi,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2),2)) - end subroutine EXCPH_gkkp_alloc - ! subroutine build_k_plus_q_table() ! integer, external ::qindx_B_init,qindx_B_close diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index ef2fb43669..bd7bc78773 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -29,7 +29,8 @@ integer function io_EXCPH_gkkp(ID) & def_variable_bulk,io_variable_bulk,io_fragment use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& & BS_E_in,BS_Sat_E,BS_Sat_WEIGHT,BS_EXCPH_E,ph_EXCPH_E,& -& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,L_kind_in,L_kind_out +& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,L_kind_in,L_kind_out,Sat_alloc, & +& EXCPH_gkkp_alloc use IO_int, ONLY:io_variable_elemental,def_variable_elemental use ELPH, ONLY:ph_modes,elph_branches use stderr, ONLY:intc @@ -121,9 +122,9 @@ integer function io_EXCPH_gkkp(ID) ! Excitonic Gkkp (and SE) fragments !========================= ! - if (read_is_on(ID).and..not.allocated(EXCPH_gkkp)) then - YAMBO_ALLOC(EXCPH_gkkp,(ph_modes,EXCPH_sum(2),EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_gkkp_sq,(ph_modes,EXCPH_sum(2),EXCPH_states(2))) + if (read_is_on(ID)) then + if(.not.allocated(EXCPH_gkkp)) call EXCPH_gkkp_alloc() + if(.not.allocated(BS_Sat_E)) call Sat_alloc() endif ! VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) @@ -138,6 +139,22 @@ integer function io_EXCPH_gkkp(ID) call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) ! + VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) + ! + VAR_name="EXCITON_SATELLITE_ENERGY_ph_abs_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_ph_abs_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) + ! io_EXCPH_gkkp=io_status(ID) ! 1 call io_fragment_disconnect(ID,ID_frag) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 2e731b5f2b..c11da9cae8 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -23,12 +23,18 @@ ! module EXCPH ! - use pars, ONLY:SP,schlen,lchlen + use pars, ONLY:SP,schlen,lchlen,cZERO,rZERO + use BS_solvers, ONLY:BSS_n_eig + use BS, ONLY:BS_H_dim + use ELPH, ONLY:elph_branches + ! +#include ! ! Exciton-Phonon !================ ! ! ... GKKP & EXC-PH Interaction + ! complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: EXCPH_states(2) @@ -70,4 +76,50 @@ module EXCPH ! real(SP) :: Exc_temp ! + contains + ! + subroutine Sat_alloc() + implicit none + YAMBO_ALLOC(BS_Sat_E,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_E_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_WEIGHT,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_WEIGHT_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(1):EXCPH_states(2))) + ! + EXCPH_Renorm =rZERO + EXCPH_Renorm_PH_abs =rZERO + EXCPH_gkkp =cZERO + EXCPH_gkkp_sq =rZERO + BS_Sat_E =rZERO + BS_Sat_E_PH_abs =rZERO + BS_Sat_WEIGHT =rZERO + BS_Sat_WEIGHT_PH_abs=rZERO + ! + end subroutine Sat_alloc + ! + subroutine Sat_free() + implicit none + YAMBO_FREE(BS_Sat_E) + YAMBO_FREE(BS_Sat_E_PH_abs) + YAMBO_FREE(BS_Sat_WEIGHT) + YAMBO_FREE(BS_Sat_WEIGHT_PH_abs) + YAMBO_FREE(EXCPH_Renorm) + YAMBO_FREE(EXCPH_Renorm_PH_abs) + end subroutine Sat_free + ! + subroutine EXCPH_gkkp_alloc() + implicit none + YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(Xi,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2),2)) + end subroutine EXCPH_gkkp_alloc + ! + subroutine EXCPH_gkkp_free + implicit none + YAMBO_FREE(EXCPH_Gkkp) + YAMBO_FREE(EXCPH_Gkkp) + YAMBO_FREE(Xi) + end subroutine EXCPH_gkkp_free + ! end module EXCPH From f5bd20f8eb0edfe9766eef7ca9792f0f3eb0471b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 7 Feb 2022 17:19:22 +0100 Subject: [PATCH 0119/1367] Version 5.1.0, Revision 21158, Hash 07b4e623f MODIFIED * include/driver/version.h dipoles/DIPOLE_shifted_grids.F Changes: - [yambo] Added energy derivative term to the diagonal dipoles v obtained from the shifted grids Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/dipoles/DIPOLE_shifted_grids.F | 104 ++++++++++++++++------------- 2 files changed, 61 insertions(+), 47 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 899733d291..2eb9b85b16 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21157 -#define YAMBO_HASH "8cff909" +#define YAMBO_REVISION 21158 +#define YAMBO_HASH "07b4e623f" diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 9211269208..728fd87850 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -75,8 +75,8 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! character(schlen) :: grid_paths_vector(3) logical :: idir_not_done(3) - integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,iv_sh,iq,n_LT_steps,& -& i_spin,i_spinor,i_sp_pol,ir,grid_order(3),ic_min + integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,in_d,iq,n_LT_steps,& +& i_spinor,i_sp_pol,ir,grid_order(3),ic_min integer :: first_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_of_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_deg_grp complex(SP) :: rho,DIP_rotate(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& & DIP_tmp(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)) @@ -84,7 +84,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! !ioDB1 shifted grids ! - type(levels) :: E_shift + type(levels) :: E_shift(3) type(bz_samp) :: Xk_shift type(WAVEs) :: WF_shifted ! @@ -124,9 +124,11 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! call msg('s','loading info from '//trim(grid_paths_vector(iq))//' ') ! - io_err(iq)=io_DB1_selective_scan('all',trim(grid_paths_vector(iq)),E_shift,Xk_shift) + io_err(iq)=io_DB1_selective_scan('all',trim(grid_paths_vector(iq)),E_shift(iq),Xk_shift) call set_parms(grid='shifted',command=' define') ! + E_shift(iq)%E=E_shift(iq)%E-Xen%E_Fermi + ! if (io_err(iq)/=0) call error(' Shifted grid not found in folder "'//trim(grid_paths_vector(iq))//'" ') ! if (nkibz_save/=nkibz_shifted) & @@ -176,7 +178,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) wf_ng_eff = min(wf_ng_save,wf_ng_shifted) ! call degeneration_finder(Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),Dip%ib_lim(1)-Dip%ib(1)+1,& - & first_el,n_of_el,n_deg_grp,0.0001/HA2EV,Include_single_values=.true.) + & first_el,n_of_el,n_deg_grp,Dip%Energy_threshold,Include_single_values=.true.) ! ! Notice that here I sum over the shifted subspace, assuming that it has equal or less degeneracies than the non shifted subspace ! @@ -184,11 +186,11 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) DIP_rotate=cZERO ! do i_grp=1,n_deg_grp - do iv_sh=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 ! - if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv_sh)) cycle + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(in_d)) cycle ! - iv_wf_sh=WF_shifted%index(iv_sh,ik,i_sp_pol) + iv_wf_sh=WF_shifted%index(in_d,ik,i_sp_pol) ! if (iv_wf_sh==0) call error(" Error in parallel wf_shifted distribution (Dipole iv)") ! @@ -207,18 +209,18 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) rho = Vstar_dot_V(wf_ng_eff,DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh), & & DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,iv_wf)) ! - if(abs(rho)>1.E-3) DIP_rotate(iv_sh,iv)=DIP_rotate(iv_sh,iv)+conjg(rho) + if(abs(rho)>1.E-3) DIP_rotate(in_d,iv)=DIP_rotate(in_d,iv)+conjg(rho) ! enddo ! enddo ! - iv=iv_sh + iv=in_d ! ! loop over conduction ! - ic_min=max(iv_sh,Dip%ib_lim(2)) - if (l_X_terminator) ic_min=iv_sh + ic_min=max(in_d,Dip%ib_lim(2)) + if (l_X_terminator) ic_min=in_d ! do ic=ic_min,Dip%ib(2) ! @@ -226,14 +228,6 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! rho=cZERO ! - Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) - if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) - ! - if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold .or. iv==ic) then - call live_timing(steps=1) - cycle - endif - ! ic_wf=WF%index(ic,ik,i_sp_pol) ! if (ic_wf==0) call error(" Error in parallel wf distribution (Dipole ic)") @@ -241,18 +235,16 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! rho = < v,k+q | c,k > ! do i_spinor=1,n_spinor - ! rho = rho + Vstar_dot_V(wf_ng_eff,DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh), & & DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,ic_wf)) - ! enddo ! - DIP_tmp(ic,iv_sh)=rho/q0_shift_norm + DIP_tmp(ic,in_d)=rho/q0_shift_norm ! call live_timing(steps=1) ! enddo ! ic - enddo ! iv_sh in i_grp + enddo ! in_d in i_grp enddo ! i_grp ! do i_grp=1,n_deg_grp @@ -263,30 +255,52 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! ! DEBUG < !rho=cZERO - !do iv_sh=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - ! rho=rho+abs(DIP_rotate(iv_sh,iv))**2 + !do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + ! rho=rho+abs(DIP_rotate(in_d,iv))**2 !enddo - !write(*,*) i_sp_pol,ik,iq,iv,rho + !ic=(first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1))-(first_el(i_grp)+Dip%ib(1)) + !if (abs(ic)<=0) write(*,*) i_sp_pol,ik,iq,iv,ic+1,abs(rho) + !if (abs(ic)> 0) write(*,*) i_sp_pol,ik,iq,iv,ic+1,abs(rho)," OK " ! DEBUG > ! - !====== - ! - !====== - do iv_sh=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - DIP_iR(ir,:,iv,ik_mem,i_sp_pol)=DIP_iR(ir,:,iv,ik_mem,i_sp_pol)+DIP_tmp(:,iv_sh)*DIP_rotate(iv_sh,iv) - enddo - ! - !===== - ! - !===== - if(.not.Dip%force_v_g_space) then - do ic=ic_min,Dip%ib(2) - Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) - if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) - if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold .or. iv==ic) cycle + do ic=ic_min,Dip%ib(2) + ! + !====== + ! + !====== + Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) + if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) + ! + if (abs(Ev_m_Ec_KS)>Dip%Energy_threshold) then + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)+DIP_tmp(ic,in_d)*DIP_rotate(in_d,iv) + enddo + else + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol) & + & +(DIP_tmp(ic,in_d)*DIP_rotate(in_d,iv)-conjg(DIP_rotate(in_d,ic)*DIP_tmp(iv,in_d)))/2._SP + enddo + endif + ! + !===== + ! + !===== + if(.not.Dip%force_v_g_space) then DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS - enddo - endif + if (iv==ic) then + DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm + endif + ! All the diagonal dipoles are identical to the case where the evaluation is directly done in G-space + ! The only exception are the degenerate subspaces which in G-space have an extra contribution + ! To check if something on the line below here can give that + !if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold) then + ! DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + ! & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm*abs(DIP_rotate(ic,iv))**2 + !endif + endif + ! + enddo ! enddo enddo @@ -320,7 +334,7 @@ subroutine DB1_reset() ! not rewritten. ! core_io_path = core_io_path_save - io_err(1)=io_DB1_selective_scan('all',trim(core_io_path),E_shift,Xk_shift) + io_err(1)=io_DB1_selective_scan('all',trim(core_io_path),E_shift(1),Xk_shift) ! call set_parms(grid=' local', command=' reset') ! From 12dd2823599a65b227a8ea8435378ce0b7ff3252 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 7 Feb 2022 17:39:12 +0100 Subject: [PATCH 0120/1367] Version 5.1.0, Revision 21159, Hash f5bd20f8e MODIFIED * include/driver/version.h dipoles/DIPOLE_shifted_grids.F Changes: - Variable names made consistent with the notes - Changed definition of DIP_iR in degenerate sub-spaces Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_shifted_grids.F | 25 ++++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2eb9b85b16..e72320e172 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21158 -#define YAMBO_HASH "07b4e623f" +#define YAMBO_REVISION 21159 +#define YAMBO_HASH "f5bd20f8e" diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 728fd87850..a8935b5eb6 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -78,8 +78,8 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,in_d,iq,n_LT_steps,& & i_spinor,i_sp_pol,ir,grid_order(3),ic_min integer :: first_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_of_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_deg_grp - complex(SP) :: rho,DIP_rotate(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& -& DIP_tmp(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)) + complex(SP) :: rho,DIP_O(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& +& DIP_S(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)),DIP_D real(SP) :: Ev_m_Ec_KS,q_mod(3) ! !ioDB1 shifted grids @@ -182,8 +182,8 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! ! Notice that here I sum over the shifted subspace, assuming that it has equal or less degeneracies than the non shifted subspace ! - DIP_tmp=cZERO - DIP_rotate=cZERO + DIP_S=cZERO + DIP_O=cZERO ! do i_grp=1,n_deg_grp do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 @@ -202,14 +202,14 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! if (iv_wf==0) call error(" Error in parallel wf distribution (Dipole iv)") ! - ! DIP_rotate = < v,k+q | v,k > + ! DIP_O = < n,k+q | n,k > between connected bands only ! do i_spinor=1,n_spinor ! rho = Vstar_dot_V(wf_ng_eff,DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh), & & DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,iv_wf)) ! - if(abs(rho)>1.E-3) DIP_rotate(in_d,iv)=DIP_rotate(in_d,iv)+conjg(rho) + if(abs(rho)>1.E-3) DIP_O(in_d,iv)=DIP_O(in_d,iv)+conjg(rho) ! enddo ! @@ -239,7 +239,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) & DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,ic_wf)) enddo ! - DIP_tmp(ic,in_d)=rho/q0_shift_norm + DIP_S(ic,in_d)=rho/q0_shift_norm ! call live_timing(steps=1) ! @@ -256,7 +256,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! DEBUG < !rho=cZERO !do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - ! rho=rho+abs(DIP_rotate(in_d,iv))**2 + ! rho=rho+abs(DIP_O(in_d,iv))**2 !enddo !ic=(first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1))-(first_el(i_grp)+Dip%ib(1)) !if (abs(ic)<=0) write(*,*) i_sp_pol,ik,iq,iv,ic+1,abs(rho) @@ -273,12 +273,15 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! if (abs(Ev_m_Ec_KS)>Dip%Energy_threshold) then do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)+DIP_tmp(ic,in_d)*DIP_rotate(in_d,iv) + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)+DIP_S(ic,in_d)*DIP_O(in_d,iv) enddo else + ! This part needs to be fixed do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + DIP_D(1)=DIP_S(ic,in_d)-DIP_O(ic,in_d) + DIP_D(2)=DIP_S(iv,in_d)-DIP_O(iv,in_d) DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol) & - & +(DIP_tmp(ic,in_d)*DIP_rotate(in_d,iv)-conjg(DIP_rotate(in_d,ic)*DIP_tmp(iv,in_d)))/2._SP + & +(DIP_D(1)*DIP_O(in_d,iv)-conjg(DIP_O(in_d,ic)*DIP_D(2)))/2._SP enddo endif ! @@ -296,7 +299,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! To check if something on the line below here can give that !if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold) then ! DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& - ! & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm*abs(DIP_rotate(ic,iv))**2 + ! & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm*abs(DIP_O(ic,iv))**2 !endif endif ! From df08fff131219bcaf3214225343d6b1e8c9e28f5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 8 Feb 2022 11:17:04 +0100 Subject: [PATCH 0121/1367] Version 5.1.0, Revision 21189, Hash 6329a94a6 MODIFIED * el-ph/EXCPH_gkkp_driver.F Bugs: - Additions: -Added report on exciton-phonon gkkp Changes: - Patch sent by: Claudio Attaccalite --- src/el-ph/EXCPH_gkkp_driver.F | 83 +++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 9 deletions(-) diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 77e10a29f3..48fe299137 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2021 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM FP +! Authors (see AUTHORS file for details): AM FP AC ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -21,9 +21,21 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -! --- Theory --- -! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. -! - FP +!> @brief Calculate exciton-phonon matrix elements and satellites renormalizations +!! +!! @param[in] E quasi-particle index +!! @param[in] k q-index in the BZ +!! @param[in] q q-index in distributed array +!! @param[in] X phonon-branch index +!! +!! @param[out] EXCPH_gkkp Exciton-phonon matrix elements +!! @param[out] EXCPH_gkkp_sq Exciton-phonon matrix elements squared +!! @param[out] EXCPH_Renorm Excitonn renormalization factor R +!! @param[out] EXCPH_Renorm_PH_abs Excitonn renormalization factor R_PH_abs for absorbed phonons +!! @param[out] BS_Sat_E Satellite energy differences +!! @param[out] BS_Sat_E_PH_abs Satellite energy differences for absorbed phonons +!! @param[out] BS_Sat_WEIGHT Satellite weight +!! @param[out] BS_Sat_WEIGHT_PH_abs Satellite weight for absorbed phonons ! subroutine EXCPH_gkkp_driver(E,k,q,X) ! @@ -38,8 +50,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) & REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,EXCPH_Renorm_PH_abs, & -& EXCPH_Renorm,BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free, & +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi, & +& BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing @@ -54,8 +66,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Work Space ! integer, external :: io_ELPH,io_EXCPH_gkkp - integer :: ID_gkkp,ID_exc_gkkp,io_err - integer :: il,iq + integer :: ID_gkkp,ID_exc_gkkp,io_err + integer :: il,iq,i1 + real(SP), allocatable :: max_Sat_weight(:) + integer, allocatable :: max_Sat_pos(:,:) ! call section('*','Excitonic gkkp') !====================================== @@ -88,6 +102,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Alloage EXCPH_gkkp ! call EXCPH_gkkp_alloc() + YAMBO_ALLOC(max_Sat_weight,(EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(max_Sat_pos,(EXCPH_states(1):EXCPH_states(2),3)) + max_Sat_weight=rZERO + max_Sat_pos =0 ! ! K plus q table ! @@ -146,6 +164,16 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! enddo ! + ! Find the maximum weight of the satellites + ! + do i1=EXCPH_states(1),EXCPH_states(2) + if(max_Sat_weight(i1) Date: Tue, 8 Feb 2022 15:01:22 +0100 Subject: [PATCH 0122/1367] Version 5.1.0, Revision 21190, Hash df08fff13 MODIFIED * driver/yambo.F include/driver/version.h el-ph/.objects ypp/symmetries/symmetries_driver.F NEW * el-ph/EXCPH_X_phass.F el-ph/EXCPH_optics.F Additions: -Added Exciton-phonon optics Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 +- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_X_phass.F | 29 +++++++++ src/el-ph/EXCPH_optics.F | 99 ++++++++++++++++++++++++++++++ ypp/symmetries/symmetries_driver.F | 31 +++++++++- 6 files changed, 162 insertions(+), 5 deletions(-) create mode 100644 src/el-ph/EXCPH_X_phass.F create mode 100644 src/el-ph/EXCPH_optics.F diff --git a/driver/yambo.F b/driver/yambo.F index 3ad5f8447a..613d02331b 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -241,7 +241,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) ! driver_now=l_EXCPH_optics - if(driver_now) call error("Not implemented yet") + if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) ! driver_now=l_EXCPH_lifetime if(driver_now) call error("Not implemented yet") diff --git a/include/driver/version.h b/include/driver/version.h index 25d8acdb17..db17c8c4b4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21188 -#define YAMBO_HASH "6f0a60768" +#define YAMBO_REVISION 21189 +#define YAMBO_HASH "6329a94a6" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 1a803edddb..4e16449832 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,7 +1,7 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ - EXCPH_Sigma.o EXCPH_eval_sat.o + EXCPH_Sigma.o EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.F #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F new file mode 100644 index 0000000000..16091340ed --- /dev/null +++ b/src/el-ph/EXCPH_X_phass.F @@ -0,0 +1,29 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate phonon-assisted absorption and emission (see PRL 122, 187401 ) +!! +subroutine EXCPH_X_phass() + ! + ! +end subroutine EXCPH_X_phass diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F new file mode 100644 index 0000000000..190faa486c --- /dev/null +++ b/src/el-ph/EXCPH_optics.F @@ -0,0 +1,99 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate phonon-assisted absorption and emission (see PRL 122, 187401 ) +!! +subroutine EXCPH_optics(E,k,q,X,wv) + ! + use units, ONLY:HA2EV + use pars, ONLY:SP,cZERO,rZERO,schlen + use electrons, ONLY:levels,n_sp_pol + use R_lattice, ONLY:bz_samp + use X_m, ONLY:X_t + use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers, & +& X_write_q_plus_G + use parser_m, ONLY:parser + use com, ONLY:msg,of_open_close + use EXCPH, ONLY:EXCPH_sum,EXCPH_states + use frequency, ONLY:w_samp + ! +#include + ! + type(levels) ::E + type(bz_samp) ::k,q + type(X_t) ::X + type(w_samp) :: wv + ! + ! Work space + ! + logical :: l_eval_pl + complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) + real(SP) :: output_data(5) + integer :: iw,n_output + ! + call parser('PlotLum', l_eval_pl) + ! + call X_setup_file_names(1,'bse ','phass',' ') + ! + call of_open_close(eps_file_name,'ot') + if(l_eval_pl) call of_open_close(pl_file_name,'ot') + ! + call X_write_q_plus_G(1,(/0.0,0.0,0.0/)) + ! + call msg('o eps_q pl_q','# EXCITON PHONON') + call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) + call msg('o eps_q pl_q','# EXciton sum :',EXCPH_sum,INDENT=0) + ! + n_output=5 + ! + do iw=1,wv%n_freqs + ! + ! Eps + ! + output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2)),& +& aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1))/) + call msg('o eps_q','',output_data(:n_output),INDENT=-2,USE_TABS=.true.) + ! + if(l_eval_pl) then + ! + ! Luminescence + ! + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),& +& aimag(PL_ii(iw,1)),real(PL_ii(iw,1))/) + call msg('o pl_q','',output_data(:n_output),INDENT=-2,USE_TABS=.true.) + ! + endif + ! + enddo + ! + ! Clsoe files + ! + call of_open_close(eps_file_name) + YAMBO_FREE(Epsilon_ii) + if(l_eval_pl) then + call of_open_close(pl_file_name) + YAMBO_FREE(PL_ii) + endif + call FREQUENCIES_reset(wv,"all") + ! +end subroutine diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index bce90c09b5..616581dd45 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -23,7 +23,7 @@ ! subroutine symmetries_driver(E,Xk) ! - use pars, ONLY:SP + use pars, ONLY:SP,lchlen use xc_functionals, ONLY:magn use electrons, ONLY:levels,Spin_magn,n_spinor use FFT_m, ONLY:fft_size @@ -54,6 +54,10 @@ subroutine symmetries_driver(E,Xk) ! integer :: action_kind,old_nkpt ! +#if defined _YPP_ELPH + character(lchlen) :: filename,infile,outfile +#endif + ! if (core_io_path==more_io_path) more_io_path=trim(core_io_path)//"/FixSymm" ! call parser('KeepKGrid',l_keep_k_grid) @@ -138,6 +142,31 @@ subroutine symmetries_driver(E,Xk) ! Rotate atomic projections call fix_ATOMPROJs(E,Xk,Xk_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_contains_TR,action_kind) ! +#if defined _YPP_PH + ! + ! Copy gkkp_expanded if presents + ! + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + ! + if(io_err==0) then + ! + call msg('s','Gkkp dbs found, they will be copied in the new folder') + ! + filename ='ndb.elph_gkkp_expanded' + if (trim(jobstr)/='') then + infile =trim(jobstr)//"/"//trim(filename) + else + infile='SAVE/'//trim(filename) + endif + ! + outfile="./"//trim(more_io_path)//"/FixSymm/SAVE/"//trim(filename) + call cp_file(trim(infile),trim(outfile),io_err) + ! + endif + ! +#endif + ! ! CLEAN !======= call bz_samp_reset(Xk_save) From 25125d36159a25da233aa8850c78d11a0026347d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 8 Feb 2022 15:48:59 +0100 Subject: [PATCH 0123/1367] Version 5.1.0, Revision 21191, Hash 576aa24af MODIFIED * include/driver/version.h el-ph/.objects el-ph/EXCPH_X_phass.F el-ph/EXCPH_optics.F DELETED * el-ph/EXCPH_Sigma.F Changes: -Work in progress Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_Sigma.F | 49 --------------------------------------- src/el-ph/EXCPH_X_phass.F | 36 ++++++++++++++++++++++++---- src/el-ph/EXCPH_optics.F | 40 ++++++++++++++------------------ 5 files changed, 52 insertions(+), 79 deletions(-) delete mode 100644 src/el-ph/EXCPH_Sigma.F diff --git a/include/driver/version.h b/include/driver/version.h index db17c8c4b4..d301010123 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21189 -#define YAMBO_HASH "6329a94a6" +#define YAMBO_REVISION 21190 +#define YAMBO_HASH "df08fff13" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 4e16449832..0e57ac21cf 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,7 +1,7 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ - EXCPH_Sigma.o EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.F + EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_Sigma.F b/src/el-ph/EXCPH_Sigma.F deleted file mode 100644 index 6ec926903f..0000000000 --- a/src/el-ph/EXCPH_Sigma.F +++ /dev/null @@ -1,49 +0,0 @@ -! -! Copyright (C) 2000-2021 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM FP -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -! --- Theory --- -! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. -! - FP -! -subroutine EXCPH_Sigma(E,k,q,X) - ! - use pars, ONLY:SP,cZERO,rZERO,schlen - use electrons, ONLY:levels,n_sp_pol - use R_lattice, ONLY:bz_samp - use X_m, ONLY:X_t - use LIVE_t, ONLY:live_timing - use timing_m, ONLY:timing - use com, ONLY:msg - ! -#include - ! - type(levels) ::E - type(bz_samp) ::k,q - type(X_t) ::X - ! - ! Work Space - ! - call section('*','Exciton-phonon self-energy') - !====================================== - ! -end subroutine diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 16091340ed..a782c528b2 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2021 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM FP AC +! Authors (see AUTHORS file for details): AC ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -21,9 +21,35 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -!> @brief Calculate phonon-assisted absorption and emission (see PRL 122, 187401 ) +!> @brief Calculate X(w) including ph-assisted transitions !! -subroutine EXCPH_X_phass() - ! - ! +subroutine EXCPH_X_phass(Epsilon_ii,PL_ii,wv) + ! + use frequency, ONLY:w_samp + use pars, ONLY:SP,cZERO + use functions, ONLY:Lorentzian_func + ! +#include + ! + complex(SP), intent(out) :: Epsilon_ii(wv%n_freq,1),PL_ii(wv%n_freq,2) + type(bz_samp),intent(in) :: wv + ! + ! Work space + ! + complex(SP) :: pole,W + complex(SP), external :: Lorentzian_FT + ! + Epsilon_ii=cZERO + PL_ii =cZERO + ! + do iw=1,Xw%n_freqs + ! + W=wv%p(iw) + pole=0.0 + ! + Epsilon_ii(iw)=Epsilon_ii(iw) + Lorentzian_FT(W,pole,'r') + PL_ii(iw,1) = + PL_ii(iw,2) = + enddo + ! end subroutine EXCPH_X_phass diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 190faa486c..3bac91106e 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -46,17 +46,16 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Work space ! - logical :: l_eval_pl - complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) + complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:) real(SP) :: output_data(5) - integer :: iw,n_output + integer :: iw ! - call parser('PlotLum', l_eval_pl) + call section('*','EXCPH-Optics') ! call X_setup_file_names(1,'bse ','phass',' ') ! call of_open_close(eps_file_name,'ot') - if(l_eval_pl) call of_open_close(pl_file_name,'ot') + call of_open_close(pl_file_name,'ot') ! call X_write_q_plus_G(1,(/0.0,0.0,0.0/)) ! @@ -64,36 +63,33 @@ subroutine EXCPH_optics(E,k,q,X,wv) call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) call msg('o eps_q pl_q','# EXciton sum :',EXCPH_sum,INDENT=0) ! - n_output=5 + ! Calculate X(w) include phonon assisted transitions + ! + call EXCPH_X_phass(Epsilon_ii,PL_ii,wv) ! do iw=1,wv%n_freqs + ! ! ! Eps ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2)),& -& aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1))/) - call msg('o eps_q','',output_data(:n_output),INDENT=-2,USE_TABS=.true.) + output_data(1:3)=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw)),real(Epsilon_ii(iw))/) + call msg('o eps_q','',output_data(:3),INDENT=-2,USE_TABS=.true.) + ! + ! Luminescence ! - if(l_eval_pl) then - ! - ! Luminescence - ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),& + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),& & aimag(PL_ii(iw,1)),real(PL_ii(iw,1))/) - call msg('o pl_q','',output_data(:n_output),INDENT=-2,USE_TABS=.true.) - ! - endif + ! + call msg('o pl_q','',output_data(:5),INDENT=-2,USE_TABS=.true.) ! enddo ! ! Clsoe files ! - call of_open_close(eps_file_name) YAMBO_FREE(Epsilon_ii) - if(l_eval_pl) then - call of_open_close(pl_file_name) - YAMBO_FREE(PL_ii) - endif + YAMBO_FREE(PL_ii) + call of_open_close(eps_file_name) + call of_open_close(pl_file_name) call FREQUENCIES_reset(wv,"all") ! end subroutine From f0880bd38a27d20d7500c2b79fb83b86827be2b2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 8 Feb 2022 23:02:15 +0100 Subject: [PATCH 0124/1367] Version 5.1.0, Revision 21192, Hash 25125d361 MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_optics.F Bugs: - Additions: -Added formula for stellites Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/el-ph/EXCPH_X_phass.F | 87 ++++++++++++++++++++++++++------------- src/el-ph/EXCPH_optics.F | 1 - 3 files changed, 61 insertions(+), 31 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d301010123..49af5fb9d9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21190 -#define YAMBO_HASH "df08fff13" +#define YAMBO_REVISION 21191 +#define YAMBO_HASH "576aa24af" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index a782c528b2..6e782de178 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -23,33 +23,64 @@ ! !> @brief Calculate X(w) including ph-assisted transitions !! -subroutine EXCPH_X_phass(Epsilon_ii,PL_ii,wv) - ! - use frequency, ONLY:w_samp - use pars, ONLY:SP,cZERO - use functions, ONLY:Lorentzian_func - ! +subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii) + ! + use frequency, ONLY:w_samp + use pars, ONLY:SP,cZERO + use functions, ONLY:Lorentzian_func + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY + use IO_int, ONLY:io_control + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm + use ELPH, ONLY:elph_branches + ! #include - ! - complex(SP), intent(out) :: Epsilon_ii(wv%n_freq,1),PL_ii(wv%n_freq,2) - type(bz_samp),intent(in) :: wv - ! - ! Work space - ! - complex(SP) :: pole,W - complex(SP), external :: Lorentzian_FT - ! - Epsilon_ii=cZERO - PL_ii =cZERO - ! - do iw=1,Xw%n_freqs - ! - W=wv%p(iw) - pole=0.0 - ! - Epsilon_ii(iw)=Epsilon_ii(iw) + Lorentzian_FT(W,pole,'r') - PL_ii(iw,1) = - PL_ii(iw,2) = - enddo - ! + ! + type(w_samp), intent(in) :: wv + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,1),PL_ii(wv%n_freqs,2) + ! + ! Work space + ! + complex(SP) :: pole,W,Satellites_alpha + complex(SP), external :: Lorentzian_FT + integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp + integer, external :: io_EXCPH_gkkp + ! + Epsilon_ii=cZERO + PL_ii =cZERO + ! + ! + ! Load the Exciton-phonon elements + ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp) + if(io_err/=0) call error("Error loading the gkkp matrix elements!! ") + ! + do iw=1,wv%n_freqs + ! + W=wv%p(iw) + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + !pole=BS_E(i_alpha) + ! + ! Main peak + ! + Epsilon_ii(iw,1)=Epsilon_ii(iw,1) + (1._SP-EXCPH_Renorm(i_alpha))*Lorentzian_FT(W,pole,'r') + ! + ! Satellites + ! + Satellites_alpha=cZERO + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + do il=elph_branches(1),elph_branches(2) +! pole=BS_Sat_E(il,i_beta,i_alpha) + Satellites_alpha=Satellites_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)*Lorentzian_FT(W,pole,'r') + enddo + enddo + ! + Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+EXCPH_Renorm(i_alpha)*Satellites_alpha + ! + enddo + ! + enddo + ! end subroutine EXCPH_X_phass diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 3bac91106e..1ac9c70a8e 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -68,7 +68,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) call EXCPH_X_phass(Epsilon_ii,PL_ii,wv) ! do iw=1,wv%n_freqs - ! ! ! Eps ! From 7e49c7031a8f00f4799e2402ec8e061738efc25e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 9 Feb 2022 15:48:58 +0100 Subject: [PATCH 0125/1367] Version 5.1.0, Revision 21193, Hash f0880bd38 MODIFIED * include/driver/version.h common/FREQUENCIES_damping.F el-ph/EXCPH_X_phass.F el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_load_L.F el-ph/EXCPH_optics.F interface/INIT_load.F io/io_EXCPH_gkkp.F modules/SET_defaults.F modules/mod_D_lattice.F modules/mod_EXCPH.F modules/mod_functions.F Additions: -Added check on symmetries, store satellites info separated frequency setup Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/common/FREQUENCIES_damping.F | 6 +- src/el-ph/EXCPH_X_phass.F | 117 ++++++++++++++++++++++++------- src/el-ph/EXCPH_gkkp_driver.F | 11 ++- src/el-ph/EXCPH_load_L.F | 6 ++ src/el-ph/EXCPH_optics.F | 26 +++++-- src/interface/INIT_load.F | 5 +- src/io/io_EXCPH_gkkp.F | 87 ++++++++++++++--------- src/modules/SET_defaults.F | 6 +- src/modules/mod_D_lattice.F | 1 + src/modules/mod_EXCPH.F | 5 +- src/modules/mod_functions.F | 4 +- 12 files changed, 197 insertions(+), 81 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 49af5fb9d9..77e53cd08b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21191 -#define YAMBO_HASH "576aa24af" +#define YAMBO_REVISION 21192 +#define YAMBO_HASH "25125d361" diff --git a/src/common/FREQUENCIES_damping.F b/src/common/FREQUENCIES_damping.F index e0f5079347..239bd5e14c 100644 --- a/src/common/FREQUENCIES_damping.F +++ b/src/common/FREQUENCIES_damping.F @@ -27,12 +27,14 @@ function FREQUENCIES_damping(W,E) use frequency, ONLY:w_samp implicit none ! - real(SP) :: FREQUENCIES_damping,E,beta + real(SP) :: FREQUENCIES_damping + real(SP), intent(in) :: E type(w_samp) :: W ! ! Work Space ! - real(SP):: e1,e2,d1,d2,E_ + real(SP) :: e1,e2,d1,d2,E_ + real(SP) :: beta ! e1=W%er(1) e2=W%er(2) diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 6e782de178..02f8c7facc 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -23,37 +23,51 @@ ! !> @brief Calculate X(w) including ph-assisted transitions !! -subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii) +subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) ! use frequency, ONLY:w_samp use pars, ONLY:SP,cZERO + use units, ONLY:HA2EV use functions, ONLY:Lorentzian_func use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm - use ELPH, ONLY:elph_branches + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,& +& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs + use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold + use com, ONLY:msg + use R_lattice, ONLY:bz_samp + use functions, ONLY:boltzman_f,bose_f ! #include ! - type(w_samp), intent(in) :: wv - complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,1),PL_ii(wv%n_freqs,2) + type(w_samp), intent(in) :: wv + type(bz_samp), intent(in) :: q + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,1),PL_ii(wv%n_freqs,2) ! ! Work space ! - complex(SP) :: pole,W,Satellites_alpha + complex(SP) :: pole,W,Satells_alpha,Satells_alpha_PL complex(SP), external :: Lorentzian_FT - integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp - integer, external :: io_EXCPH_gkkp + real(SP) :: min_E,exc_E + integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp + integer, external :: io_EXCPH_gkkp,io_ELPH + real(SP) :: bose_factor,PH_E ! - Epsilon_ii=cZERO - PL_ii =cZERO + min_E=minval(BS_all_E(1,:)) + call msg('rs','Minimum excitonic energy : ',min_E*HA2EV,' eV ') + ! + ! Load the Exciton-phonon elements and phonon energies + ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! - ! Load the Exciton-phonon elements + Epsilon_ii=cZERO + PL_ii =cZERO ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp) - if(io_err/=0) call error("Error loading the gkkp matrix elements!! ") + ! The term without satellites ! do iw=1,wv%n_freqs ! @@ -61,23 +75,74 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! - !pole=BS_E(i_alpha) - ! - ! Main peak - ! + exc_E=BS_all_E(i_alpha,1)-min_E + pole =BS_all_E(i_alpha,1) Epsilon_ii(iw,1)=Epsilon_ii(iw,1) + (1._SP-EXCPH_Renorm(i_alpha))*Lorentzian_FT(W,pole,'r') + PL_ii(iw,1) =PL_ii(iw,1) + (1._SP-EXCPH_Renorm(i_alpha))*Lorentzian_FT(W,pole,'r')*boltzman_f(exc_E) ! - ! Satellites + enddo + ! + enddo + ! + ! The satellites + ! + do iq=1,q%nibz + ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') + ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + ! + do iw=1,wv%n_freqs ! - Satellites_alpha=cZERO - do i_beta=EXCPH_sum(1),EXCPH_sum(2) + W=wv%p(iw) + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + ! Satellites for the alpha exciton + ! + Satells_alpha =cZERO + Satells_alpha_PL=cZERO + ! do il=elph_branches(1),elph_branches(2) -! pole=BS_Sat_E(il,i_beta,i_alpha) - Satellites_alpha=Satellites_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)*Lorentzian_FT(W,pole,'r') + ! + ph_E=sqrt(PH_freqs_sq(iq,il)) + ! + if(ph_E0) then + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2/),ID=ID_BS) + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) + if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) + ! elseif(index(what,'load')>0) then ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2,3/),ID=ID_BS) diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 1ac9c70a8e..4d8ab00c49 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -34,8 +34,9 @@ subroutine EXCPH_optics(E,k,q,X,wv) & X_write_q_plus_G use parser_m, ONLY:parser use com, ONLY:msg,of_open_close - use EXCPH, ONLY:EXCPH_sum,EXCPH_states - use frequency, ONLY:w_samp + use BS_Solvers, ONLY:BSS_n_eig + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E + use frequency, ONLY:w_samp ! #include ! @@ -48,7 +49,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:) real(SP) :: output_data(5) - integer :: iw + integer :: iw,iq ! call section('*','EXCPH-Optics') ! @@ -63,9 +64,24 @@ subroutine EXCPH_optics(E,k,q,X,wv) call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) call msg('o eps_q pl_q','# EXciton sum :',EXCPH_sum,INDENT=0) ! + ! Load excitonic energies + ! + if(L_kind_in/=L_kind_out) & +& call warning(' Lkind_in /= Lkind_out this can generate inconsistencies in the luminescence and double-grid! ') + ! + call EXCPH_load_L(1,X,'check','Lout') + ! + YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) + do iq=1,q%nibz + call EXCPH_load_L(iq,X,'eivenvalues','Lout') + BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + enddo + ! ! Calculate X(w) include phonon assisted transitions ! - call EXCPH_X_phass(Epsilon_ii,PL_ii,wv) + call FREQUENCIES_setup(wv) + call EXCPH_X_phass(Epsilon_ii,PL_ii,wv,q) ! do iw=1,wv%n_freqs ! @@ -87,6 +103,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! YAMBO_FREE(Epsilon_ii) YAMBO_FREE(PL_ii) + YAMBO_FREE(BS_E) + YAMBO_FREE(BS_all_E) call of_open_close(eps_file_name) call of_open_close(pl_file_name) call FREQUENCIES_reset(wv,"all") diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index e24fc6421d..55fbcfb166 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,EXC_Temp + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path + use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP use openmp, ONLY:n_threads_X,n_threads_SE,n_threads_RT,n_threads_DIP,n_threads_K,n_threads_NL @@ -664,7 +665,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) - call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',EXC_Temp,T_unit) + call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') call it('f',defs,'DBGSigmaOnly', '[EXCPH] Double-grid only for Sigma') call it('f',defs,'PlotLum', '[EXCPH] Plot luminescence spectra') diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index bd7bc78773..f617a4604f 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -integer function io_EXCPH_gkkp(ID) +integer function io_EXCPH_gkkp(ID,what) ! use pars, ONLY:SP,schlen use IO_m, ONLY:io_sec,read_is_on,RD_CL,RD_CL_IF_END,io_action,frag_ELPH,io_status @@ -40,15 +40,26 @@ integer function io_EXCPH_gkkp(ID) #include ! integer ::ID + character(*) ::what ! !Work Space ! - integer ::iq,ierr,VAR_size(4),VAR_size_sq(3),ID_frag - real(SP) ::v(3) - character(schlen) ::db_name,VAR_name,dim_names(4),dim_names_sq(3) + integer :: iq,ierr,VAR_size(4),VAR_size_sq(3),ID_frag + character(schlen) :: db_name,VAR_name,dim_names(4),dim_names_sq(3) + logical :: l_excph_gkkp,l_excph_satellites ! call timing('io_EXCPH_gkkp',OPR='start') ! + l_excph_gkkp =.FALSE. + l_excph_satellites=.FALSE. + ! + if (index(what,'gkkp')>0) l_excph_gkkp =.TRUE. + if (index(what,'satellites')>0) l_excph_satellites=.TRUE. + if (index(what,'all')>0) then + l_excph_gkkp=.TRUE. + l_excph_satellites=.TRUE. + endif + ! ID_frag=0 io_EXCPH_gkkp=0 ! @@ -101,6 +112,8 @@ integer function io_EXCPH_gkkp(ID) iq=maxval(io_sec(ID,:))-1 if (iq<=0) goto 1 ! + if(.not.l_excph_gkkp.and..not.l_excph_satellites) goto 1 + ! ! Fragmentation ! call io_fragment(ID,ID_frag,i_fragment=iq,ierr=ierr) @@ -123,37 +136,45 @@ integer function io_EXCPH_gkkp(ID) !========================= ! if (read_is_on(ID)) then - if(.not.allocated(EXCPH_gkkp)) call EXCPH_gkkp_alloc() - if(.not.allocated(BS_Sat_E)) call Sat_alloc() + if(.not.allocated(EXCPH_gkkp).and.l_excph_gkkp ) call EXCPH_gkkp_alloc() + if(.not.allocated(BS_Sat_E) .and.l_excph_satellites) call Sat_alloc() + endif + ! + if(l_excph_gkkp) then + ! + VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) + VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=EXCPH_gkkp) + ! + VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) + VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) + ! endif ! - VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) - VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) - dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=EXCPH_gkkp) - ! - VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) - VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) - dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) - ! - VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) - ! - VAR_name="EXCITON_SATELLITE_ENERGY_ph_abs_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) - ! - VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) - ! - VAR_name="EXCITON_SATELLITE_WEIGHT_ph_abs_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) + if(l_excph_satellites) then + ! + VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) + ! + VAR_name="EXCITON_SATELLITE_ENERGY_ph_abs_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) + ! + VAR_name="EXCITON_SATELLITE_WEIGHT_ph_abs_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) + ! + endif ! io_EXCPH_gkkp=io_status(ID) ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 9b2c18064a..d437ca484c 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -50,7 +50,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use functions, ONLY:bose_E_cut use D_lattice, ONLY:i_space_inv,inv_index,n_atoms_species_max,n_atomic_species,mag_syms,& & input_Tel_is_negative,non_periodic_directions,lattice,Bose_Temp, & -& molecule_position +& molecule_position,Boltz_Temp use pseudo, ONLY:pp_n_l_times_proj_max,pp_kbv_dim use R_lattice, ONLY:n_g_shells,ng_closed,bse_scattering,coll_scattering,& & Xk_grid_is_uniform,RIM_id_epsm1_reference,RIM_epsm1,& @@ -84,7 +84,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,EXC_Temp + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -268,6 +268,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) molecule_position=0._SP lattice='Unknown' Bose_Temp=-1./HA2EV + Boltz_Temp=0._SP ! ! R_lattice ! @@ -538,7 +539,6 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Lout_path='none' EXCPH_states=(/1,1/) EXCPH_sum=(/1,1/) - EXC_Temp=0._SP ! #endif ! diff --git a/src/modules/mod_D_lattice.F b/src/modules/mod_D_lattice.F index 53e0ed67dd..870edad23e 100644 --- a/src/modules/mod_D_lattice.F +++ b/src/modules/mod_D_lattice.F @@ -41,6 +41,7 @@ module D_lattice real(SP) :: T_elecs real(SP) :: T_holes real(SP) :: Bose_Temp + real(SP) :: Boltz_Temp real(SP) :: input_GS_Tel logical :: input_Tel_is_negative ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index c11da9cae8..7bf6d57215 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -56,6 +56,7 @@ module EXCPH complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) integer, allocatable :: BSS_eh_table_m1(:,:,:),BSS_eh_table_m1_in(:,:,:),k_plus_q_table(:,:) complex(SP), allocatable :: BS_E_in(:),BS_E(:) + real(SP), allocatable :: BS_all_E(:,:) complex(SP), allocatable :: BS_mat_in(:,:) integer, allocatable :: BSS_eh_table_in(:,:) ! @@ -72,10 +73,6 @@ module EXCPH complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) ! - ! Luminescence - ! - real(SP) :: Exc_temp - ! contains ! subroutine Sat_alloc() diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index b274549ca7..80d209bcc7 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -214,11 +214,11 @@ pure function bose_decay(E) ! pure function boltzman_f(Eb) ! - use D_lattice, ONLY:Bose_Temp + use D_lattice, ONLY:Boltz_Temp real(SP), intent(in):: Eb real(SP) :: boltzman_f ! - boltzman_f=exp(-Eb/Bose_Temp) + boltzman_f=exp(-Eb/Boltz_Temp) ! end function From 146dab93259755435612dfd8e2584e89938a3d49 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 9 Feb 2022 16:38:31 +0100 Subject: [PATCH 0126/1367] Version 5.1.0, Revision 21194, Hash 7e49c7031 MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_load_L.F el-ph/EXCPH_optics.F interface/INIT_check_databases.F Bugs: -Fixed renormalization factors Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/el-ph/EXCPH_X_phass.F | 88 +++++++++++++++++++--------- src/el-ph/EXCPH_load_L.F | 2 + src/el-ph/EXCPH_optics.F | 49 ++++++++++------ src/interface/INIT_check_databases.F | 2 +- 5 files changed, 95 insertions(+), 50 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 77e53cd08b..d02c25989f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21192 -#define YAMBO_HASH "25125d361" +#define YAMBO_REVISION 21193 +#define YAMBO_HASH "f0880bd38" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 02f8c7facc..1c82148383 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -23,16 +23,16 @@ ! !> @brief Calculate X(w) including ph-assisted transitions !! -subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) +subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! use frequency, ONLY:w_samp - use pars, ONLY:SP,cZERO + use pars, ONLY:SP,cZERO,rZERO use units, ONLY:HA2EV use functions, ONLY:Lorentzian_func use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,& -& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs +& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold use com, ONLY:msg use R_lattice, ONLY:bz_samp @@ -42,7 +42,7 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) ! type(w_samp), intent(in) :: wv type(bz_samp), intent(in) :: q - complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,1),PL_ii(wv%n_freqs,2) + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs),PL_ii(wv%n_freqs) ! ! Work space ! @@ -64,25 +64,10 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! - Epsilon_ii=cZERO - PL_ii =cZERO - ! - ! The term without satellites - ! - do iw=1,wv%n_freqs - ! - W=wv%p(iw) - ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - ! - exc_E=BS_all_E(i_alpha,1)-min_E - pole =BS_all_E(i_alpha,1) - Epsilon_ii(iw,1)=Epsilon_ii(iw,1) + (1._SP-EXCPH_Renorm(i_alpha))*Lorentzian_FT(W,pole,'r') - PL_ii(iw,1) =PL_ii(iw,1) + (1._SP-EXCPH_Renorm(i_alpha))*Lorentzian_FT(W,pole,'r')*boltzman_f(exc_E) - ! - enddo - ! - enddo + Epsilon_ii =cZERO + PL_ii =cZERO + EXCPH_Renorm =rZERO + EXCPH_Renorm_PH_abs=rZERO ! ! The satellites ! @@ -94,6 +79,17 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! + do il=elph_branches(1),elph_branches(2) + ph_E=sqrt(PH_freqs_sq(iq,il)) + bose_factor=bose_f(PH_E) + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) + EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+bose_factor) + EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*bose_factor + end forall + enddo + enddo + ! do iw=1,wv%n_freqs ! W=wv%p(iw) @@ -119,17 +115,25 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) ! exc_E=BS_all_E(i_beta,1)-min_E ! - ! Phonon emission - ! pole=BS_Sat_E(il,i_beta,i_alpha) + ! + ! Phonon emission in absorption + ! Satells_alpha =Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)*Lorentzian_FT(W,pole,'r')*(1._SP+bose_factor) + ! + ! Phonon emission in luminescence + ! Satells_alpha_PL=Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha) & & *Lorentzian_FT(W,pole,'r')*bose_factor*boltzman_f(exc_E) - ! - ! Phonon absorption ! pole=BS_Sat_E_PH_abs(il,i_beta,i_alpha) + ! + ! Phonon absorption in absorption + ! Satells_alpha =Satells_alpha +BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*Lorentzian_FT(W,pole,'r')*bose_factor + ! + ! Phonon absorption in luminescence + ! Satells_alpha_PL=Satells_alpha_PL+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) & & *Lorentzian_FT(W,pole,'r')*(1._SP+bose_factor)*boltzman_f(exc_E) ! @@ -139,8 +143,8 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) ! ! Add the satellites to the dielectric constant and luminescence ! - Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Satells_alpha - PL_ii(iw,1)=PL_ii(iw,1) +Satells_alpha_PL + Epsilon_ii(iw)=Epsilon_ii(iw)+Satells_alpha + PL_ii(iw) =PL_ii(iw) +Satells_alpha_PL ! enddo ! @@ -148,4 +152,30 @@ subroutine EXCPH_X_phass(wv,Epsilon_ii,PL_ii,q) ! enddo ! + EXCPH_Renorm = EXCPH_Renorm/real(q%nbz,SP) + EXCPH_Renorm_PH_abs= EXCPH_Renorm_PH_abs/real(q%nbz,SP) + ! + ! The term without satellites + ! + do iw=1,wv%n_freqs + ! + W=wv%p(iw) + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + pole =BS_E_in(i_alpha) + Epsilon_ii(iw)=Epsilon_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*Lorentzian_FT(W,pole,'r') + ! + ! The pole of luminescence cannot be the BS_E_in + ! otherwise we are inconsistend with the Boltzman function (to be discussed) + ! + exc_E=BS_all_E(i_alpha,1)-min_E + pole =BS_all_E(i_alpha,1) + PL_ii(iw) =PL_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*Lorentzian_FT(W,pole,'r') & + & *boltzman_f(exc_E) + ! + enddo + ! + enddo + ! end subroutine EXCPH_X_phass diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index 0bbee54735..e3d2584a35 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -97,6 +97,8 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! + else + call error(" Wrong call to the EXCPH_load_L function! ") endif ! if(index(Ltype,'Lout')>0.and.Lout_path/='none') then diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 4d8ab00c49..4358a5c081 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -30,12 +30,12 @@ subroutine EXCPH_optics(E,k,q,X,wv) use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp use X_m, ONLY:X_t - use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers, & -& X_write_q_plus_G + use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use BS_Solvers, ONLY:BSS_n_eig - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & +& EXCPH_Renorm,EXCPH_Renorm_PH_abs use frequency, ONLY:w_samp ! #include @@ -47,8 +47,9 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Work space ! - complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:) - real(SP) :: output_data(5) + complex(SP), allocatable :: PL_ii(:),Epsilon_ii(:) + integer, parameter :: n_output=3 + real(SP) :: output_data(n_output) integer :: iw,iq ! call section('*','EXCPH-Optics') @@ -58,8 +59,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) call of_open_close(eps_file_name,'ot') call of_open_close(pl_file_name,'ot') ! - call X_write_q_plus_G(1,(/0.0,0.0,0.0/)) - ! call msg('o eps_q pl_q','# EXCITON PHONON') call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) call msg('o eps_q pl_q','# EXciton sum :',EXCPH_sum,INDENT=0) @@ -67,44 +66,58 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! Load excitonic energies ! if(L_kind_in/=L_kind_out) & -& call warning(' Lkind_in /= Lkind_out this can generate inconsistencies in the luminescence and double-grid! ') +& call warning(' Lkind_in /= Lkind_out this can generate inconsistencies in the luminescence! ') ! call EXCPH_load_L(1,X,'check','Lout') - ! + ! + ! Allocations + ! YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) + YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) + ! + call EXCPH_load_L(1,X,'eigenvalues','Lin') + BS_E_in(:)=BS_E(:) + ! do iq=1,q%nibz - call EXCPH_load_L(iq,X,'eivenvalues','Lout') + call EXCPH_load_L(iq,X,'eigenvalues','Lout') BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! ! Calculate X(w) include phonon assisted transitions ! call FREQUENCIES_setup(wv) - call EXCPH_X_phass(Epsilon_ii,PL_ii,wv,q) + YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs)) + YAMBO_ALLOC(PL_ii,(wv%n_freqs)) + call EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! do iw=1,wv%n_freqs ! ! Eps ! - output_data(1:3)=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw)),real(Epsilon_ii(iw))/) - call msg('o eps_q','',output_data(:3),INDENT=-2,USE_TABS=.true.) + output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw)),real(Epsilon_ii(iw))/) + call msg('o eps_q','',output_data,INDENT=-2,USE_TABS=.true.) ! ! Luminescence ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),& -& aimag(PL_ii(iw,1)),real(PL_ii(iw,1))/) - ! - call msg('o pl_q','',output_data(:5),INDENT=-2,USE_TABS=.true.) + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw)),real(PL_ii(iw))/) + call msg('o pl_q','',output_data,INDENT=-2,USE_TABS=.true.) ! enddo ! - ! Clsoe files + ! Deallocations ! YAMBO_FREE(Epsilon_ii) YAMBO_FREE(PL_ii) YAMBO_FREE(BS_E) YAMBO_FREE(BS_all_E) + YAMBO_FREE(EXCPH_Renorm) + YAMBO_FREE(EXCPH_Renorm_PH_abs) + ! + ! Clsoe files + ! call of_open_close(eps_file_name) call of_open_close(pl_file_name) call FREQUENCIES_reset(wv,"all") diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 398737a389..ca18958c47 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -262,7 +262,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=io_ID) io_ELPH_err(2)=io_ELPH(io_ID,'gkkp_expanded') call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) - io_err=io_EXCPH_gkkp(io_ID) + io_err=io_EXCPH_gkkp(io_ID,'gkkp') #endif ! ! RT From 6223e344f7ab18caef5f384a6a12be782c6279ef Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 9 Feb 2022 16:50:29 +0100 Subject: [PATCH 0127/1367] Version 5.1.0, Revision 21195, Hash 146dab932 MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_optics.F modules/mod_EXCPH.F Additions: -The code produces a result... wrong Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_phass.F | 11 ++++++++++- src/el-ph/EXCPH_gkkp_driver.F | 10 +++++++++- src/el-ph/EXCPH_optics.F | 7 +------ src/modules/mod_EXCPH.F | 10 ++-------- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d02c25989f..6637445530 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21193 -#define YAMBO_HASH "f0880bd38" +#define YAMBO_REVISION 21194 +#define YAMBO_HASH "7e49c7031" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 1c82148383..74c29f67e6 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -32,7 +32,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,& -& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs +& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold use com, ONLY:msg use R_lattice, ONLY:bz_samp @@ -64,6 +64,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! + YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) + ! Epsilon_ii =cZERO PL_ii =cZERO EXCPH_Renorm =rZERO @@ -178,4 +181,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! enddo ! + ! Free + ! + call Sat_free() + YAMBO_FREE(EXCPH_Renorm) + YAMBO_FREE(EXCPH_Renorm_PH_abs) + ! end subroutine EXCPH_X_phass diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 68786d51a7..aa1823a16e 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -52,7 +52,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi, & & BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -109,6 +109,11 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_gkkp_alloc() YAMBO_ALLOC(max_Sat_weight,(EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(max_Sat_pos,(EXCPH_states(1):EXCPH_states(2),3)) + YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) + ! + EXCPH_Renorm =rZERO + EXCPH_Renorm_PH_abs=rZERO max_Sat_weight=rZERO max_Sat_pos =0 ! @@ -195,6 +200,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call EXCPH_gkkp_report() YAMBO_FREE(max_Sat_weight) + YAMBO_FREE(max_Sat_pos) + YAMBO_FREE(EXCPH_Renorm) + YAMBO_FREE(EXCPH_Renorm_PH_abs) ! call Sat_free() ! diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 4358a5c081..821ae9ab0f 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -34,8 +34,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use BS_Solvers, ONLY:BSS_n_eig - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& EXCPH_Renorm,EXCPH_Renorm_PH_abs + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in use frequency, ONLY:w_samp ! #include @@ -75,8 +74,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_ALLOC(BS_E,(BSS_n_eig)) YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) - YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) ! call EXCPH_load_L(1,X,'eigenvalues','Lin') BS_E_in(:)=BS_E(:) @@ -113,8 +110,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_FREE(PL_ii) YAMBO_FREE(BS_E) YAMBO_FREE(BS_all_E) - YAMBO_FREE(EXCPH_Renorm) - YAMBO_FREE(EXCPH_Renorm_PH_abs) ! ! Clsoe files ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 7bf6d57215..2d46625cc7 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -81,13 +81,7 @@ subroutine Sat_alloc() YAMBO_ALLOC(BS_Sat_E_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(BS_Sat_WEIGHT,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(BS_Sat_WEIGHT_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(1):EXCPH_states(2))) ! - EXCPH_Renorm =rZERO - EXCPH_Renorm_PH_abs =rZERO - EXCPH_gkkp =cZERO - EXCPH_gkkp_sq =rZERO BS_Sat_E =rZERO BS_Sat_E_PH_abs =rZERO BS_Sat_WEIGHT =rZERO @@ -101,8 +95,6 @@ subroutine Sat_free() YAMBO_FREE(BS_Sat_E_PH_abs) YAMBO_FREE(BS_Sat_WEIGHT) YAMBO_FREE(BS_Sat_WEIGHT_PH_abs) - YAMBO_FREE(EXCPH_Renorm) - YAMBO_FREE(EXCPH_Renorm_PH_abs) end subroutine Sat_free ! subroutine EXCPH_gkkp_alloc() @@ -110,6 +102,8 @@ subroutine EXCPH_gkkp_alloc() YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(Xi,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2),2)) + EXCPH_gkkp =cZERO + EXCPH_gkkp_sq =rZERO end subroutine EXCPH_gkkp_alloc ! subroutine EXCPH_gkkp_free From cbff29ed84619400004a9ef9dcce310fb8998ee0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 9 Feb 2022 16:59:46 +0100 Subject: [PATCH 0128/1367] Version 5.1.0, Revision 21196, Hash 6223e344f MODIFIED * include/driver/version.h el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_optics.F Bugs: - Additions: -More comments Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_gkkp_driver.F | 1 + src/el-ph/EXCPH_optics.F | 9 ++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6637445530..aac905f279 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21194 -#define YAMBO_HASH "7e49c7031" +#define YAMBO_REVISION 21195 +#define YAMBO_HASH "146dab932" diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index aa1823a16e..09752ca937 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -86,6 +86,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_load_L(1,X,'check','Lin') ! ! Check if exciton-phonon matrix elements have been already calculated + ! and are consistent with the Lin and Lout specified in input ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 821ae9ab0f..ba27c8c8b7 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -76,18 +76,21 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) ! call EXCPH_load_L(1,X,'eigenvalues','Lin') - BS_E_in(:)=BS_E(:) + BS_E_in(:)=BS_E(:) ! L_in can be different from L_out ! do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! - ! Calculate X(w) include phonon assisted transitions + ! Frequencies and damping setup ! call FREQUENCIES_setup(wv) YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs)) YAMBO_ALLOC(PL_ii,(wv%n_freqs)) + ! + ! Calculate X(w) include phonon assisted transitions + ! call EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! do iw=1,wv%n_freqs @@ -110,11 +113,11 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_FREE(PL_ii) YAMBO_FREE(BS_E) YAMBO_FREE(BS_all_E) + call FREQUENCIES_reset(wv,"all") ! ! Clsoe files ! call of_open_close(eps_file_name) call of_open_close(pl_file_name) - call FREQUENCIES_reset(wv,"all") ! end subroutine From 59288bdb96905c67a48490b3a64a1404a6ff921e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 9 Feb 2022 22:10:11 +0100 Subject: [PATCH 0129/1367] Version 5.1.0, Revision 21197, Hash cbff29ed8 MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F Additions: -Simplified EXCPH_X_phass Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_phass.F | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index aac905f279..03d21b5d05 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21195 -#define YAMBO_HASH "146dab932" +#define YAMBO_REVISION 21196 +#define YAMBO_HASH "6223e344f" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 74c29f67e6..a4a9763454 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -28,7 +28,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use frequency, ONLY:w_samp use pars, ONLY:SP,cZERO,rZERO use units, ONLY:HA2EV - use functions, ONLY:Lorentzian_func use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,& @@ -47,7 +46,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Work space ! complex(SP) :: pole,W,Satells_alpha,Satells_alpha_PL - complex(SP), external :: Lorentzian_FT real(SP) :: min_E,exc_E integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp integer, external :: io_EXCPH_gkkp,io_ELPH @@ -122,23 +120,22 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Phonon emission in absorption ! - Satells_alpha =Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)*Lorentzian_FT(W,pole,'r')*(1._SP+bose_factor) + Satells_alpha =Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor) ! ! Phonon emission in luminescence ! - Satells_alpha_PL=Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha) & -& *Lorentzian_FT(W,pole,'r')*bose_factor*boltzman_f(exc_E) + Satells_alpha_PL=Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzman_f(exc_E) ! pole=BS_Sat_E_PH_abs(il,i_beta,i_alpha) ! ! Phonon absorption in absorption ! - Satells_alpha =Satells_alpha +BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*Lorentzian_FT(W,pole,'r')*bose_factor + Satells_alpha =Satells_alpha +BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*bose_factor ! ! Phonon absorption in luminescence ! Satells_alpha_PL=Satells_alpha_PL+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) & -& *Lorentzian_FT(W,pole,'r')*(1._SP+bose_factor)*boltzman_f(exc_E) +& /(W-pole)*(1._SP+bose_factor)*boltzman_f(exc_E) ! enddo ! @@ -167,20 +164,22 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_alpha=EXCPH_states(1),EXCPH_states(2) ! pole =BS_E_in(i_alpha) - Epsilon_ii(iw)=Epsilon_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*Lorentzian_FT(W,pole,'r') + Epsilon_ii(iw)=Epsilon_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) ! ! The pole of luminescence cannot be the BS_E_in ! otherwise we are inconsistend with the Boltzman function (to be discussed) ! exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) - PL_ii(iw) =PL_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*Lorentzian_FT(W,pole,'r') & + PL_ii(iw) =PL_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) & & *boltzman_f(exc_E) ! enddo ! enddo ! + Epsilon_ii(:)=1._SP+Epsilon_ii(:) + ! ! Free ! call Sat_free() From 4ba7a02aa7571b6632058f58cb5e3531b5cddb6b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 9 Feb 2022 22:35:48 +0100 Subject: [PATCH 0130/1367] Version 5.1.0, Revision 21198, Hash 59288bdb9 MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_optics.F Additions: -Epsilon plot works Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_phass.F | 19 ++++++++++++++----- src/el-ph/EXCPH_gkkp_driver.F | 4 ++-- src/el-ph/EXCPH_optics.F | 13 +++++++------ 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 03d21b5d05..1d9241fd6d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21196 -#define YAMBO_HASH "6223e344f" +#define YAMBO_REVISION 21197 +#define YAMBO_HASH "cbff29ed8" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index a4a9763454..292aaeb564 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -36,12 +36,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use com, ONLY:msg use R_lattice, ONLY:bz_samp use functions, ONLY:boltzman_f,bose_f + use LIVE_t, ONLY:live_timing ! #include ! type(w_samp), intent(in) :: wv type(bz_samp), intent(in) :: q - complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs),PL_ii(wv%n_freqs) + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs) ! ! Work space ! @@ -72,6 +73,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! The satellites ! + call live_timing('Satellites',q%nibz) + ! do iq=1,q%nibz ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_exc_gkkp) @@ -143,15 +146,19 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Add the satellites to the dielectric constant and luminescence ! - Epsilon_ii(iw)=Epsilon_ii(iw)+Satells_alpha - PL_ii(iw) =PL_ii(iw) +Satells_alpha_PL + Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Satells_alpha + PL_ii(iw) =PL_ii(iw) +Satells_alpha_PL ! enddo ! enddo ! + call live_timing(steps=1) + ! enddo ! + call live_timing( ) + ! EXCPH_Renorm = EXCPH_Renorm/real(q%nbz,SP) EXCPH_Renorm_PH_abs= EXCPH_Renorm_PH_abs/real(q%nbz,SP) ! @@ -164,7 +171,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_alpha=EXCPH_states(1),EXCPH_states(2) ! pole =BS_E_in(i_alpha) - Epsilon_ii(iw)=Epsilon_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) + Epsilon_ii(iw,:)=Epsilon_ii(iw,:) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) ! ! The pole of luminescence cannot be the BS_E_in ! otherwise we are inconsistend with the Boltzman function (to be discussed) @@ -178,7 +185,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! enddo ! - Epsilon_ii(:)=1._SP+Epsilon_ii(:) + ! Eps(w)=1._SP - X(w) + ! + Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) ! ! Free ! diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index 09752ca937..b39056d7f3 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -303,7 +303,7 @@ end subroutine build_inverse_eh_table subroutine EXCPH_gkkp_report() use stderr, ONLY:intc use EXCPH, ONLY:EXCPH_Renorm_PH_abs,EXCPH_Renorm - use units, ONLY:HA2CMm1 + use units, ONLY:HA2EV use ELPH, ONLY:ph_freqs_sq implicit none ! @@ -325,7 +325,7 @@ subroutine EXCPH_gkkp_report() write(message,*) 'Exciton '//trim(intc(i1))//': max(W_sat)=',max_Sat_weight(i1) call msg('sr',message) write(message,*) ' for iq = '//intc(max_Sat_pos(i1,1))//' il = '//intc(max_Sat_pos(i1,2))//' ib = ' & -& //intc(max_Sat_pos(i1,3)),' w(iq,il) = ',ph_E*HA2CMm1,'cm^-1' +& //intc(max_Sat_pos(i1,3)),' w(iq,il) = ',ph_E*HA2EV*1000._SP,'meV' call msg('sr',message) enddo ! diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index ba27c8c8b7..3a6ab8b786 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -46,8 +46,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Work space ! - complex(SP), allocatable :: PL_ii(:),Epsilon_ii(:) - integer, parameter :: n_output=3 + complex(SP), allocatable :: PL_ii(:),Epsilon_ii(:,:) + integer, parameter :: n_output=5 real(SP) :: output_data(n_output) integer :: iw,iq ! @@ -86,7 +86,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! Frequencies and damping setup ! call FREQUENCIES_setup(wv) - YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs)) + YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs,2)) YAMBO_ALLOC(PL_ii,(wv%n_freqs)) ! ! Calculate X(w) include phonon assisted transitions @@ -97,13 +97,14 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Eps ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw)),real(Epsilon_ii(iw))/) + output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1)), & +& aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2))/) call msg('o eps_q','',output_data,INDENT=-2,USE_TABS=.true.) ! ! Luminescence ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw)),real(PL_ii(iw))/) - call msg('o pl_q','',output_data,INDENT=-2,USE_TABS=.true.) + output_data(1:3)=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw)),real(PL_ii(iw))/) + call msg('o pl_q','',output_data(1:3),INDENT=-2,USE_TABS=.true.) ! enddo ! From a463fc3aa82a1995861ace49af8d9d727cc2d7dd Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 10 Feb 2022 15:37:04 +0100 Subject: [PATCH 0131/1367] Version 5.1.0, Revision 21199, Hash 4ba7a02aa MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_optics.F modules/mod_functions.F Bugs: - Additions: -Fixed boltzman function Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_phass.F | 39 ++++++++++++++++++++++------------- src/el-ph/EXCPH_gkkp_driver.F | 2 +- src/el-ph/EXCPH_optics.F | 9 ++++---- src/modules/mod_functions.F | 12 +++++++++-- 5 files changed, 43 insertions(+), 23 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1d9241fd6d..fa5699b4dc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21197 -#define YAMBO_HASH "cbff29ed8" +#define YAMBO_REVISION 21199 +#define YAMBO_HASH "4ba7a02aa" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 292aaeb564..21dff3ab82 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -37,23 +37,25 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use R_lattice, ONLY:bz_samp use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing + use stderr, ONLY:intc ! #include ! type(w_samp), intent(in) :: wv type(bz_samp), intent(in) :: q - complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs) + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs,2) ! ! Work space ! complex(SP) :: pole,W,Satells_alpha,Satells_alpha_PL - real(SP) :: min_E,exc_E - integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp + real(SP) :: min_E,exc_E,E_alpha + integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer, external :: io_EXCPH_gkkp,io_ELPH real(SP) :: bose_factor,PH_E ! - min_E=minval(BS_all_E(1,:)) - call msg('rs','Minimum excitonic energy : ',min_E*HA2EV,' eV ') + min_E =minval(BS_all_E(1,:)) + min_pos=minloc(BS_all_E(1,:)) + call msg('rs','Minimum excitonic energy : ',min_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) ! ! Load the Exciton-phonon elements and phonon energies ! @@ -115,11 +117,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! bose_factor=bose_f(PH_E) ! + E_alpha=BS_E_in(i_alpha) + ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! exc_E=BS_all_E(i_beta,1)-min_E ! - pole=BS_Sat_E(il,i_beta,i_alpha) + pole=E_alpha+BS_Sat_E(il,i_beta,i_alpha) ! ! Phonon emission in absorption ! @@ -127,9 +131,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Phonon emission in luminescence ! - Satells_alpha_PL=Satells_alpha+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzman_f(exc_E) + Satells_alpha_PL=Satells_alpha_PL+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzman_f(exc_E) ! - pole=BS_Sat_E_PH_abs(il,i_beta,i_alpha) + pole=E_alpha+BS_Sat_E_PH_abs(il,i_beta,i_alpha) ! ! Phonon absorption in absorption ! @@ -147,7 +151,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Add the satellites to the dielectric constant and luminescence ! Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Satells_alpha - PL_ii(iw) =PL_ii(iw) +Satells_alpha_PL + PL_ii(iw,1) =PL_ii(iw,1) +Satells_alpha_PL ! enddo ! @@ -162,6 +166,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) EXCPH_Renorm = EXCPH_Renorm/real(q%nbz,SP) EXCPH_Renorm_PH_abs= EXCPH_Renorm_PH_abs/real(q%nbz,SP) ! + call msg('sr','Renormalization factors at finite temperature:') + do i_alpha=EXCPH_states(1),EXCPH_states(2) + call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm,EXCPH_Renorm_PH_abs/)) + enddo + ! ! The term without satellites ! do iw=1,wv%n_freqs @@ -171,15 +180,16 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_alpha=EXCPH_states(1),EXCPH_states(2) ! pole =BS_E_in(i_alpha) - Epsilon_ii(iw,:)=Epsilon_ii(iw,:) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) + Epsilon_ii(iw,:)=Epsilon_ii(iw,:)+(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) ! - ! The pole of luminescence cannot be the BS_E_in - ! otherwise we are inconsistend with the Boltzman function (to be discussed) + ! The pole of luminescence should be the pole of BS_E_in + ! but I think this is not consistent with the Boltzman weight, I use always Lout. Point to be discussed ! exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) - PL_ii(iw) =PL_ii(iw) + (1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) & - & *boltzman_f(exc_E) + PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) & +& *boltzman_f(exc_E) + write(*,*) i_alpha,'aaaaaaa',exc_E,boltzman_f(exc_E) ! enddo ! @@ -188,6 +198,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Eps(w)=1._SP - X(w) ! Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) + PL_ii=-PL_ii ! I miss a minus sign ! ! Free ! diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/el-ph/EXCPH_gkkp_driver.F index b39056d7f3..d4377f98bc 100644 --- a/src/el-ph/EXCPH_gkkp_driver.F +++ b/src/el-ph/EXCPH_gkkp_driver.F @@ -318,7 +318,7 @@ subroutine EXCPH_gkkp_report() write(message,*) 'Exciton '//trim(intc(i1))//': R =',EXCPH_Renorm(i1),' R_abs =',EXCPH_Renorm_PH_abs(i1) call msg('sr',message) enddo - call msg('sr',' Max satellite weight: ') + call msg('sr',' Max satellite weight (without Bose factor): ') do i1=EXCPH_states(1),EXCPH_states(2) iq_bz = q%k_table(max_Sat_pos(i1,1), 1) ph_E=sqrt(abs(ph_freqs_sq(iq_bz,max_Sat_pos(i1,2)))) diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 3a6ab8b786..d733706056 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -46,7 +46,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Work space ! - complex(SP), allocatable :: PL_ii(:),Epsilon_ii(:,:) + complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=5 real(SP) :: output_data(n_output) integer :: iw,iq @@ -87,7 +87,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! call FREQUENCIES_setup(wv) YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs,2)) - YAMBO_ALLOC(PL_ii,(wv%n_freqs)) + YAMBO_ALLOC(PL_ii,(wv%n_freqs,2)) ! ! Calculate X(w) include phonon assisted transitions ! @@ -103,8 +103,9 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Luminescence ! - output_data(1:3)=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw)),real(PL_ii(iw))/) - call msg('o pl_q','',output_data(1:3),INDENT=-2,USE_TABS=.true.) + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & +& aimag(PL_ii(iw,2)),real(PL_ii(iw,2))/) + call msg('o pl_q','',output_data,INDENT=-2,USE_TABS=.true.) ! enddo ! diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index 80d209bcc7..c2c3ca87ce 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -212,13 +212,21 @@ pure function bose_decay(E) ! Boltzman function !---------------- ! - pure function boltzman_f(Eb) + function boltzman_f(Eb) ! use D_lattice, ONLY:Boltz_Temp real(SP), intent(in):: Eb real(SP) :: boltzman_f ! - boltzman_f=exp(-Eb/Boltz_Temp) + if(abs(Eb)>epsilon(1.).and.abs(Boltz_Temp)>epsilon(1.)) then + boltzman_f=exp(-Eb/Boltz_Temp) ! Normal case + elseif(abs(Eb)>epsilon(1.).and.abs(Boltz_Temp)<=epsilon(1.)) then + boltzman_f=0._SP ! Case E>0 but T=0 + elseif(abs(Eb)0 T->0 + elseif(abs(Eb)epsilon(1.)) then + boltzman_f=1._SP ! Case E=0 T->0 + endif ! end function From 814f29bc5c909a9387366b1dfb2dc677f3951057 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 10 Feb 2022 16:12:25 +0100 Subject: [PATCH 0132/1367] Version 5.1.1, Revision 21223, Hash 294a828ba MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_gkkp_driver.F Additions: -Fixed boltzman factors Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_phass.F | 7 +++++-- src/el-ph/EXCPH_gkkp_driver.F | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3c5b68b49a..ffb51d0637 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21181 -#define YAMBO_HASH "4394c0edc" +#define YAMBO_REVISION 21223 +#define YAMBO_HASH "294a828ba" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 21dff3ab82..4a60a408f4 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -86,14 +86,18 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! do il=elph_branches(1),elph_branches(2) + ! ph_E=sqrt(PH_freqs_sq(iq,il)) bose_factor=bose_f(PH_E) + if(ph_E Date: Thu, 10 Feb 2022 17:05:45 +0100 Subject: [PATCH 0133/1367] Version 5.1.1, Revision 21224, Hash 814f29bc5 MODIFIED * include/driver/version.h el-ph/EXCPH_X_phass.F el-ph/EXCPH_load_L.F el-ph/EXCPH_optics.F modules/mod_EXCPH.F Bugs: -Fixed different bugs Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_phass.F | 18 +++++++++--------- src/el-ph/EXCPH_load_L.F | 29 ++++++++++++++++++++++------- src/el-ph/EXCPH_optics.F | 31 +++++++++++++++++++++++++------ src/modules/mod_EXCPH.F | 6 ++++-- 5 files changed, 62 insertions(+), 26 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ffb51d0637..39d6e993e3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21223 -#define YAMBO_HASH "294a828ba" +#define YAMBO_REVISION 21224 +#define YAMBO_HASH "814f29bc5" diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index 4a60a408f4..b35935295b 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -30,7 +30,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,& + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& & BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold use com, ONLY:msg @@ -154,8 +154,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Add the satellites to the dielectric constant and luminescence ! - Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Satells_alpha - PL_ii(iw,1) =PL_ii(iw,1) +Satells_alpha_PL + Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Satells_alpha *BS_R(i_alpha) + PL_ii(iw,1) =PL_ii(iw,1) +Satells_alpha_PL*BS_R(i_alpha) ! enddo ! @@ -172,7 +172,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call msg('sr','Renormalization factors at finite temperature:') do i_alpha=EXCPH_states(1),EXCPH_states(2) - call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm,EXCPH_Renorm_PH_abs/)) + call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm(i_alpha),EXCPH_Renorm_PH_abs(i_alpha)/)) enddo ! ! The term without satellites @@ -184,24 +184,24 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_alpha=EXCPH_states(1),EXCPH_states(2) ! pole =BS_E_in(i_alpha) - Epsilon_ii(iw,:)=Epsilon_ii(iw,:)+(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) + Epsilon_ii(iw,:)=Epsilon_ii(iw,:)+(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha)/(W-pole) ! ! The pole of luminescence should be the pole of BS_E_in ! but I think this is not consistent with the Boltzman weight, I use always Lout. Point to be discussed ! exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) - PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))/(W-pole) & -& *boltzman_f(exc_E) + PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha) & +& /(W-pole)*boltzman_f(exc_E) ! enddo ! enddo ! - ! Eps(w)=1._SP - X(w) + ! Eps(w)=1._SP - X(w) in agreement with definition in src/bse/ ! Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) - PL_ii=-PL_ii ! I miss a minus sign + PL_ii =-PL_ii ! ! Free ! diff --git a/src/el-ph/EXCPH_load_L.F b/src/el-ph/EXCPH_load_L.F index e3d2584a35..91e1fa17eb 100644 --- a/src/el-ph/EXCPH_load_L.F +++ b/src/el-ph/EXCPH_load_L.F @@ -28,12 +28,11 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! use pars, ONLY:lchlen - use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db,BSS_n_eig + use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BSS_free,BSS_write_eig_2_db,BSS_n_eig use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use R_lattice, ONLY:bz_samp - use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim - use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,BS_E,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path,L_kind_in,L_kind_out + use BS, ONLY:BS_H_dim,L_kind,BS_res_ares_n_mat,BS_K_dim + use EXCPH, ONLY:BS_E,BS_R_left,BS_R_right,EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path,L_kind_in,L_kind_out use IO_int, ONLY:io_control use stderr, ONLY:intc use X_m, ONLY:X_t @@ -50,12 +49,16 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! integer :: ID_BS,io_err character(lchlen) :: jobstr_save + logical :: l_read_residuals ! if(index(Ltype,'Lout')>0.and.Lout_path/='none') then jobstr_save=jobstr jobstr =trim(Lout_path) endif ! + l_read_residuals=.FALSE. + if(index(what,'residuals')>0) l_read_residuals=.TRUE. + ! if(index(what,'check')>0) then ! call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_BS) @@ -86,15 +89,27 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) endif ! elseif(index(what,'eigenvalues')>0) then - ! + ! + ! Read eigenvalues and optionally residuals + ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2/),ID=ID_BS) - io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) + if(l_read_residuals) then + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E,bsRr=BS_R_right,bsRl=BS_R_left) + else + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) + endif if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! elseif(index(what,'load')>0) then ! + ! Read BSE eigenvectors and eigenvalues and optionally residuals + ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2,3/),ID=ID_BS) - io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) + if(l_read_residuals) then + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E,bsRr=BS_R_right,bsRl=BS_R_left) + else + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) + endif if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! else diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index d733706056..3b3d4c060b 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -26,15 +26,16 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! use units, ONLY:HA2EV - use pars, ONLY:SP,cZERO,rZERO,schlen - use electrons, ONLY:levels,n_sp_pol - use R_lattice, ONLY:bz_samp + use pars, ONLY:SP,cZERO,rZERO,schlen,pi + use electrons, ONLY:levels,n_sp_pol,spin_occ + use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use X_m, ONLY:X_t use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use BS_Solvers, ONLY:BSS_n_eig - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & +& BS_R_left,BS_R_right,BS_R use frequency, ONLY:w_samp ! #include @@ -49,7 +50,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=5 real(SP) :: output_data(n_output) - integer :: iw,iq + integer :: iw,iq,i_alpha ! call section('*','EXCPH-Optics') ! @@ -72,10 +73,15 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! Allocations ! YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) + YAMBO_ALLOC(BS_R,(BSS_n_eig)) YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) ! - call EXCPH_load_L(1,X,'eigenvalues','Lin') + ! Load excitonic energies and residuals + ! + call EXCPH_load_L(1,X,'eigenvalues residuals','Lin') BS_E_in(:)=BS_E(:) ! L_in can be different from L_out ! do iq=1,q%nibz @@ -83,6 +89,16 @@ subroutine EXCPH_optics(E,k,q,X,wv) BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! + ! Calculate the residual + ! + BS_R=rZERO + do i_alpha=EXCPH_states(1),EXCPH_states(2) + BS_R(i_alpha)=abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)) + enddo + ! + ! This formula can be wrong in presence of the 2D-cutoff + BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + ! ! Frequencies and damping setup ! call FREQUENCIES_setup(wv) @@ -115,6 +131,9 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_FREE(PL_ii) YAMBO_FREE(BS_E) YAMBO_FREE(BS_all_E) + YAMBO_FREE_P(BS_R_left) + YAMBO_FREE_P(BS_R_right) + YAMBO_FREE(BS_R) call FREQUENCIES_reset(wv,"all") ! ! Clsoe files diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 2d46625cc7..5deb5e6b98 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -53,12 +53,14 @@ module EXCPH ! ! ExcPH gkkp ! - complex(SP),allocatable :: A_rot(:,:),Xi(:,:,:) - integer, allocatable :: BSS_eh_table_m1(:,:,:),BSS_eh_table_m1_in(:,:,:),k_plus_q_table(:,:) + complex(SP), allocatable :: A_rot(:,:),Xi(:,:,:) + integer, allocatable :: BSS_eh_table_m1(:,:,:),BSS_eh_table_m1_in(:,:,:),k_plus_q_table(:,:) complex(SP), allocatable :: BS_E_in(:),BS_E(:) real(SP), allocatable :: BS_all_E(:,:) complex(SP), allocatable :: BS_mat_in(:,:) integer, allocatable :: BSS_eh_table_in(:,:) + complex, pointer :: BS_R_left(:),BS_R_right(:) + real(SP), allocatable :: BS_R(:) ! ! ... Sigma ! From d506ad5f8caf4070a18837ac2b80dbcf3fb41c84 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 10 Feb 2022 22:54:22 +0100 Subject: [PATCH 0134/1367] Version 5.1.1, Revision 21225, Hash 7479a1167 MODIFIED * el-ph/EXCPH_optics.F Additions: -Better output Changes: - Patch sent by: Claudio Attaccalite --- src/el-ph/EXCPH_optics.F | 119 +++++++++++++++++++++++++++++---------- 1 file changed, 88 insertions(+), 31 deletions(-) diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index 3b3d4c060b..ba6ac984ef 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -30,12 +30,16 @@ subroutine EXCPH_optics(E,k,q,X,wv) use electrons, ONLY:levels,n_sp_pol,spin_occ use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use X_m, ONLY:X_t + use IO_int, ONLY:io_control + use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,OP_WR,WR,WR_CL,& +& OP_WR_CL,OP_APP_CL,DUMP use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use BS_Solvers, ONLY:BSS_n_eig use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & & BS_R_left,BS_R_right,BS_R + use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd use frequency, ONLY:w_samp ! #include @@ -49,20 +53,12 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=5 - real(SP) :: output_data(n_output) - integer :: iw,iq,i_alpha + real(SP) :: output_data(n_output) + integer :: iw,iq,i_alpha,ID_DG,io_err + integer, external :: io_Double_Grid ! call section('*','EXCPH-Optics') ! - call X_setup_file_names(1,'bse ','phass',' ') - ! - call of_open_close(eps_file_name,'ot') - call of_open_close(pl_file_name,'ot') - ! - call msg('o eps_q pl_q','# EXCITON PHONON') - call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) - call msg('o eps_q pl_q','# EXciton sum :',EXCPH_sum,INDENT=0) - ! ! Load excitonic energies ! if(L_kind_in/=L_kind_out) & @@ -109,22 +105,45 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! call EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! - do iw=1,wv%n_freqs - ! - ! Eps - ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1)), & -& aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2))/) - call msg('o eps_q','',output_data,INDENT=-2,USE_TABS=.true.) - ! - ! Luminescence - ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & -& aimag(PL_ii(iw,2)),real(PL_ii(iw,2))/) - call msg('o pl_q','',output_data,INDENT=-2,USE_TABS=.true.) - ! - enddo + call X_setup_file_names(1,'bse ','phass',' ') ! + call print_output() + ! + ! **** DOUBLE GRID PART ***** + ! + ! Fill the PH_freqs array + ! This structure will contains the phonon frequencies and the + ! double-grid phonon frequencies calculated with matdyn.x + ! + PH_freqs%nk=q%nibz + PH_freqs%nb=ph_modes + YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) + ! + ! Check if double-grid is present and use it + ! + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) + io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') + ! + if(io_err==0) then + ! + use_PH_DbGd=.TRUE. + ! + call msg('sr','Using PH-double-grid ') + ! + ! Calculate X(w) using Double-Grid + ! +! call EXCPH_X_dbgrid_phass(wv,q,PH_freqs,Epsilon_ii,PL_ii) + ! + ! New output files for the double-grid calculations + ! + call X_setup_file_names(1,'bse ','phass','DbGd') + ! + ! Write output on file + ! + call print_output() + ! + endif + ! ! Deallocations ! YAMBO_FREE(Epsilon_ii) @@ -136,9 +155,47 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_FREE(BS_R) call FREQUENCIES_reset(wv,"all") ! - ! Clsoe files - ! - call of_open_close(eps_file_name) - call of_open_close(pl_file_name) - ! + contains + ! + subroutine print_output() + use X_output, ONLY:X_write_messages_before_headers,X_write_q_plus_G + implicit none + ! + call of_open_close(eps_file_name,'ot') + call of_open_close(pl_file_name,'ot') + ! + call X_write_messages_before_headers(1,.FALSE.,.FALSE.,'r ') + ! + call X_write_q_plus_G(1,(/0.0,0.0,0.0/),1) + ! + call msg('o eps_q pl_q','# EXCITON PHONON') + call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) + call msg('o eps_q pl_q','# EXciton sum :',EXCPH_sum,INDENT=0) + call msg('o eps_q pl_q','#') + ! + ! Write output on file + ! + do iw=1,wv%n_freqs + ! + ! Eps + ! + output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1)), & +& aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2))/) + call msg('o eps_q','',output_data,INDENT=-2,USE_TABS=.true.) + ! + ! Luminescence + ! + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & +& aimag(PL_ii(iw,2)),real(PL_ii(iw,2))/) + call msg('o pl_q','',output_data,INDENT=-2,USE_TABS=.true.) + ! + enddo + ! + ! Close files + ! + call of_open_close(eps_file_name) + call of_open_close(pl_file_name) + ! + end subroutine print_output + ! end subroutine From e6e82176c82c6f419bebcb039b843ebbca91a547 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 13 Feb 2022 15:23:26 +0100 Subject: [PATCH 0135/1367] Version 5.1.1, Revision 21226, Hash d506ad5f8 MODIFIED * include/driver/version.h el-ph/.objects el-ph/EXCPH_optics.F NEW * el-ph/EXCPH_X_dbgrid_phass.F Additions: -Double-grid subroutine Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/.objects | 2 +- src/el-ph/EXCPH_X_dbgrid_phass.F | 37 ++++++++++++++++++++++++++++++++ src/el-ph/EXCPH_optics.F | 3 ++- 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 src/el-ph/EXCPH_X_dbgrid_phass.F diff --git a/include/driver/version.h b/include/driver/version.h index 39d6e993e3..a878f79f07 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21224 -#define YAMBO_HASH "814f29bc5" +#define YAMBO_REVISION 21225 +#define YAMBO_HASH "7479a1167" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 0e57ac21cf..cc319eb777 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,7 +1,7 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ - EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o + EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o EXCPH_X_dbgrid_phass.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/EXCPH_X_dbgrid_phass.F b/src/el-ph/EXCPH_X_dbgrid_phass.F new file mode 100644 index 0000000000..2e8844528d --- /dev/null +++ b/src/el-ph/EXCPH_X_dbgrid_phass.F @@ -0,0 +1,37 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate X(w) including ph-assisted transitions +!! +subroutine EXCPH_X_dbgrid_phass(wv,q,PH_freqs,Epsilon_ii,PL_ii) + ! + use frequency, ONLY:w_samp + use R_lattice, ONLY:bz_samp + ! +#include + ! + type(w_samp), intent(in) :: wv + type(bz_samp), intent(in) :: q,PH_freqs + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs,2) + ! +end subroutine EXCPH_X_dbgrid_phass diff --git a/src/el-ph/EXCPH_optics.F b/src/el-ph/EXCPH_optics.F index ba6ac984ef..d918ed65fd 100644 --- a/src/el-ph/EXCPH_optics.F +++ b/src/el-ph/EXCPH_optics.F @@ -120,6 +120,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) ! ! Check if double-grid is present and use it + ! load the double-grid phonon energies in PH_freqs ! call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') @@ -132,7 +133,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Calculate X(w) using Double-Grid ! -! call EXCPH_X_dbgrid_phass(wv,q,PH_freqs,Epsilon_ii,PL_ii) + call EXCPH_X_dbgrid_phass(wv,q,PH_freqs,Epsilon_ii,PL_ii) ! ! New output files for the double-grid calculations ! From c34c5296914753bbc988ba5057c0bb8060def838 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 13 Feb 2022 15:29:35 +0100 Subject: [PATCH 0136/1367] Version 5.1.1, Revision 21227, Hash e6e82176c MODIFIED * include/driver/version.h el-ph/EXCPH_X_dbgrid_phass.F el-ph/EXCPH_X_phass.F Additions: -Added comments Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/EXCPH_X_dbgrid_phass.F | 12 +++++++++++- src/el-ph/EXCPH_X_phass.F | 14 +++++++++++++- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a878f79f07..1beab7ab50 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21225 -#define YAMBO_HASH "7479a1167" +#define YAMBO_REVISION 21226 +#define YAMBO_HASH "d506ad5f8" diff --git a/src/el-ph/EXCPH_X_dbgrid_phass.F b/src/el-ph/EXCPH_X_dbgrid_phass.F index 2e8844528d..29c94d35cd 100644 --- a/src/el-ph/EXCPH_X_dbgrid_phass.F +++ b/src/el-ph/EXCPH_X_dbgrid_phass.F @@ -21,12 +21,22 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -!> @brief Calculate X(w) including ph-assisted transitions +!> @brief Calculate X(w) including ph-assisted transitions and double-grid +! +! @param[in] wv frequencies range +! @param[in] EXCPH_gkkp read from file +! @param[in] PH_E read from file +! @param[in] Bose_Temp Bose temperature for phonons +! @param[in] Boltz_Temp Boltz temperature for excitons +! +! @param[out] Epsilon_ii Phonon-assisted dielectric constant +! @param[out] PL_ii Phonon-assisted luminescence !! subroutine EXCPH_X_dbgrid_phass(wv,q,PH_freqs,Epsilon_ii,PL_ii) ! use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp + use pars, ONLY:SP,cZERO,rZERO ! #include ! diff --git a/src/el-ph/EXCPH_X_phass.F b/src/el-ph/EXCPH_X_phass.F index b35935295b..77acd556bd 100644 --- a/src/el-ph/EXCPH_X_phass.F +++ b/src/el-ph/EXCPH_X_phass.F @@ -21,8 +21,20 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! +! This subroutine is a simple version do not use double-grid +! neigther better integrations at gamma +! !> @brief Calculate X(w) including ph-assisted transitions -!! +! +! @param[in] wv frequencies range +! @param[in] EXCPH_gkkp read from file +! @param[in] PH_E read from file +! @param[in] Bose_Temp Bose temperature for phonons +! @param[in] Boltz_Temp Boltz temperature for excitons +! +! @param[out] Epsilon_ii Phonon-assisted dielectric constant +! @param[out] PL_ii Phonon-assisted luminescence +! subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! use frequency, ONLY:w_samp From 67fedf6b270bf9778f13cb3e6f9a978cfc3fa3ae Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 13 Feb 2022 17:52:13 +0100 Subject: [PATCH 0137/1367] Version 5.1.1, Revision 21228, Hash c34c52969 MODIFIED * config/mk/global/libraries.mk include/driver/version.h el-ph/.objects NEW * exc-ph/.objects RENAMED * el-ph/EXCPH_X_dbgrid_phass.F -> exc-ph/EXCPH_X_dbgrid_phass.F el-ph/EXCPH_X_phass.F -> exc-ph/EXCPH_X_phass.F el-ph/EXCPH_eval_sat.F -> exc-ph/EXCPH_eval_sat.F el-ph/EXCPH_gkkp_driver.F -> exc-ph/EXCPH_gkkp_driver.F el-ph/EXCPH_gkkp_eval.F -> exc-ph/EXCPH_gkkp_eval.F el-ph/EXCPH_load_L.F -> exc-ph/EXCPH_load_L.F el-ph/EXCPH_optics.F -> exc-ph/EXCPH_optics.F Bugs: - Additions: -New folder for the exciton-phonon coupling Changes: - Patch sent by: Claudio Attaccalite --- config/mk/global/libraries.mk | 8 ++++---- include/driver/version.h | 4 ++-- src/el-ph/.objects | 5 ++--- src/exc-ph/.objects | 5 +++++ src/{el-ph => exc-ph}/EXCPH_X_dbgrid_phass.F | 0 src/{el-ph => exc-ph}/EXCPH_X_phass.F | 0 src/{el-ph => exc-ph}/EXCPH_eval_sat.F | 0 src/{el-ph => exc-ph}/EXCPH_gkkp_driver.F | 0 src/{el-ph => exc-ph}/EXCPH_gkkp_eval.F | 0 src/{el-ph => exc-ph}/EXCPH_load_L.F | 0 src/{el-ph => exc-ph}/EXCPH_optics.F | 0 11 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 src/exc-ph/.objects rename src/{el-ph => exc-ph}/EXCPH_X_dbgrid_phass.F (100%) rename src/{el-ph => exc-ph}/EXCPH_X_phass.F (100%) rename src/{el-ph => exc-ph}/EXCPH_eval_sat.F (100%) rename src/{el-ph => exc-ph}/EXCPH_gkkp_driver.F (100%) rename src/{el-ph => exc-ph}/EXCPH_gkkp_eval.F (100%) rename src/{el-ph => exc-ph}/EXCPH_load_L.F (100%) rename src/{el-ph => exc-ph}/EXCPH_optics.F (100%) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index f99fc2f82a..5f17178b74 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -20,8 +20,8 @@ BASIC_LIBS_LD= tools memory communicate modules matrices linear_algebra bz_ops p MAIN_LIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse MAIN_LIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse -PJ_PHLIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function el-ph qp acfdt bse real_time_initialize ph-el -PJ_PHLIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function el-ph qp acfdt bse real_time_initialize ph-el +PJ_PHLIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function el-ph exc-ph qp acfdt bse real_time_initialize ph-el +PJ_PHLIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function el-ph exc-ph qp acfdt bse real_time_initialize ph-el PJ_SCLIBS = $(MAIN_LIBS) collisions hamiltonian sc PJ_SCLIBS_LD = $(MAIN_LIBS_LD) hamiltonian collisions sc @@ -67,8 +67,8 @@ YPP_BASIC_LIBS = modules interface qp plotting k-points symmetries bits elec YPP_BASIC_LIBS_LD = modules interface qp plotting k-points symmetries bits electrons dipoles YPP_LIBS = $(YPP_BASIC_LIBS) excitons YPP_LIBS_LD = $(YPP_BASIC_LIBS_LD) excitons -YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph excitons -YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph excitons +YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph exc-ph excitons +YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph exc-ph excitons YPPRT_LIBS = $(YPP_BASIC_LIBS) el-ph real_time excitons YPPRT_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph real_time excitons # diff --git a/include/driver/version.h b/include/driver/version.h index 1beab7ab50..8c5aac5ed5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21226 -#define YAMBO_HASH "d506ad5f8" +#define YAMBO_REVISION 21227 +#define YAMBO_HASH "e6e82176c" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index cc319eb777..e5358a7ed9 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,7 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o EXCPH_gkkp_eval.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ - EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o EXCPH_X_dbgrid_phass.o +EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o \ + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects new file mode 100644 index 0000000000..92dab4328c --- /dev/null +++ b/src/exc-ph/.objects @@ -0,0 +1,5 @@ +#if defined _ELPH && !defined _YPP_ELPH +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ + EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o EXCPH_X_dbgrid_phass.o +#endif +objs = ${EQ_objs} diff --git a/src/el-ph/EXCPH_X_dbgrid_phass.F b/src/exc-ph/EXCPH_X_dbgrid_phass.F similarity index 100% rename from src/el-ph/EXCPH_X_dbgrid_phass.F rename to src/exc-ph/EXCPH_X_dbgrid_phass.F diff --git a/src/el-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F similarity index 100% rename from src/el-ph/EXCPH_X_phass.F rename to src/exc-ph/EXCPH_X_phass.F diff --git a/src/el-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F similarity index 100% rename from src/el-ph/EXCPH_eval_sat.F rename to src/exc-ph/EXCPH_eval_sat.F diff --git a/src/el-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F similarity index 100% rename from src/el-ph/EXCPH_gkkp_driver.F rename to src/exc-ph/EXCPH_gkkp_driver.F diff --git a/src/el-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F similarity index 100% rename from src/el-ph/EXCPH_gkkp_eval.F rename to src/exc-ph/EXCPH_gkkp_eval.F diff --git a/src/el-ph/EXCPH_load_L.F b/src/exc-ph/EXCPH_load_L.F similarity index 100% rename from src/el-ph/EXCPH_load_L.F rename to src/exc-ph/EXCPH_load_L.F diff --git a/src/el-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F similarity index 100% rename from src/el-ph/EXCPH_optics.F rename to src/exc-ph/EXCPH_optics.F From 3dbc6fd39107fdeb14dc51fd50960e57b29804ee Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 13 Feb 2022 18:34:33 +0100 Subject: [PATCH 0138/1367] Version 5.1.1, Revision 21229, Hash 67fedf6b2 MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F modules/mod_EXCPH.F NEW * exc-ph/Satellite_Simple.F DELETED * exc-ph/EXCPH_X_dbgrid_phass.F Additions: -Reorgalizzation Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_X_dbgrid_phass.F | 47 ---------------- src/exc-ph/EXCPH_X_phass.F | 58 +++++--------------- src/exc-ph/EXCPH_optics.F | 2 +- src/exc-ph/Satellite_Simple.F | 90 +++++++++++++++++++++++++++++++ src/modules/mod_EXCPH.F | 4 ++ 7 files changed, 112 insertions(+), 95 deletions(-) delete mode 100644 src/exc-ph/EXCPH_X_dbgrid_phass.F create mode 100644 src/exc-ph/Satellite_Simple.F diff --git a/include/driver/version.h b/include/driver/version.h index 8c5aac5ed5..1f9bd6d3ef 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21227 -#define YAMBO_HASH "e6e82176c" +#define YAMBO_REVISION 21228 +#define YAMBO_HASH "c34c52969" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 92dab4328c..580de65761 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ - EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o EXCPH_X_dbgrid_phass.o + EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_dbgrid_phass.F b/src/exc-ph/EXCPH_X_dbgrid_phass.F deleted file mode 100644 index 29c94d35cd..0000000000 --- a/src/exc-ph/EXCPH_X_dbgrid_phass.F +++ /dev/null @@ -1,47 +0,0 @@ -! -! Copyright (C) 2000-2021 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AC -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -!> @brief Calculate X(w) including ph-assisted transitions and double-grid -! -! @param[in] wv frequencies range -! @param[in] EXCPH_gkkp read from file -! @param[in] PH_E read from file -! @param[in] Bose_Temp Bose temperature for phonons -! @param[in] Boltz_Temp Boltz temperature for excitons -! -! @param[out] Epsilon_ii Phonon-assisted dielectric constant -! @param[out] PL_ii Phonon-assisted luminescence -!! -subroutine EXCPH_X_dbgrid_phass(wv,q,PH_freqs,Epsilon_ii,PL_ii) - ! - use frequency, ONLY:w_samp - use R_lattice, ONLY:bz_samp - use pars, ONLY:SP,cZERO,rZERO - ! -#include - ! - type(w_samp), intent(in) :: wv - type(bz_samp), intent(in) :: q,PH_freqs - complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs,2) - ! -end subroutine EXCPH_X_dbgrid_phass diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 77acd556bd..9483364a0f 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -42,9 +42,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_E,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& -& BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free - use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& +& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E + use ELPH, ONLY:elph_branches,use_PH_DbGd use com, ONLY:msg use R_lattice, ONLY:bz_samp use functions, ONLY:boltzman_f,bose_f @@ -65,9 +65,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer, external :: io_EXCPH_gkkp,io_ELPH real(SP) :: bose_factor,PH_E ! - min_E =minval(BS_all_E(1,:)) - min_pos=minloc(BS_all_E(1,:)) - call msg('rs','Minimum excitonic energy : ',min_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) + min_EXC_E=minval(BS_all_E(1,:)) + min_pos =minloc(BS_all_E(1,:)) + call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) ! ! Load the Exciton-phonon elements and phonon energies ! @@ -120,45 +120,15 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Satellites for the alpha exciton ! - Satells_alpha =cZERO - Satells_alpha_PL=cZERO - ! do il=elph_branches(1),elph_branches(2) - ! - ph_E=sqrt(PH_freqs_sq(iq,il)) - ! - if(ph_E @brief Calculate the phonon-assisted satellite for absorption and emission +! +! @param[in] iq q-point +! @param[in] il phonon branch +! @param[in] i_alpha incoming exciton +! @param[in] i_beta outgoing exciton +! @param[in] W photon energy and damping factor +! +! @param[out] Sat_absorption Satellite in absorption +! @param[out] Sat_emission Satellite in emission +!! +subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) + ! + use frequency, ONLY:w_samp + use R_lattice, ONLY:bz_samp + use pars, ONLY:SP,cZERO,rZERO + use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in + use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold + ! +#include + ! + integer intent(in) :: il,iq,i_alpha,i_beta + complex(SP), intent(in) :: W + complex(SP), intent(out) :: Sat_absorption, Sat_emission + ! + ! Work Space + ! + real(SP) :: PH_E,bose_factor,E_alpha,boltz_factor + ! + Sat_absorption=cZERO + Sat_emission =cZERO + ! + ph_E=sqrt(PH_freqs_sq(iq,il)) + ! + if(ph_E Date: Tue, 15 Feb 2022 15:18:12 +0100 Subject: [PATCH 0139/1367] Automatic commit: configure regenerated after merge From 55b02438c398b6e693113cfae41c79c692d0454f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Feb 2022 16:23:49 +0100 Subject: [PATCH 0140/1367] Version 5.1.1, Revision 21239, Hash f042dd7bf MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F exc-ph/Satellite_Simple.F interface/INIT_activate.F Bugs: - Additions: -Fixed compilation Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 4 +- src/exc-ph/EXCPH_X_phass.F | 78 +++++++++++++++++++++++++---------- src/exc-ph/EXCPH_optics.F | 48 +++++++++------------ src/exc-ph/Satellite_Simple.F | 18 ++++---- src/interface/INIT_activate.F | 2 +- 6 files changed, 92 insertions(+), 62 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1f9bd6d3ef..afe9bcf858 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21228 -#define YAMBO_HASH "c34c52969" +#define YAMBO_REVISION 21238 +#define YAMBO_HASH "4af668d0f" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 580de65761..1a00602deb 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ - EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ + EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 9483364a0f..dd47110830 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -44,7 +44,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E - use ELPH, ONLY:elph_branches,use_PH_DbGd + use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches + use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& +& INTERPOLATE_is_quiet use com, ONLY:msg use R_lattice, ONLY:bz_samp use functions, ONLY:boltzman_f,bose_f @@ -59,10 +61,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Work space ! - complex(SP) :: pole,W,Satells_alpha,Satells_alpha_PL + complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss real(SP) :: min_E,exc_E,E_alpha integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer, external :: io_EXCPH_gkkp,io_ELPH + integer :: ID_E_kpq,ID_E_kpq_obj,ID_DG + integer, external :: io_EXCPH_gkkp,io_ELPH,io_Double_Grid real(SP) :: bose_factor,PH_E ! min_EXC_E=minval(BS_all_E(1,:)) @@ -80,13 +83,25 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) ! + if(use_PH_DbGd) then + ! + call msg('sr','EXC_E(k+q) calculated using a smooth Fourier interpolation') + INTERPOLATE_is_serial=.TRUE. + INTERPOLATE_is_quiet =.TRUE. + INTERP_shell_factor =E_kpq_sh_fact + call INTERPOLATION_BZ_setup(q) + INTERP_obj(ID_E_kpq_obj)%what="EXC_E(k+q)" + call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_E_kpq,ID_obj=ID_E_kpq_obj) + ! + endif + ! + ! The satellites + ! Epsilon_ii =cZERO PL_ii =cZERO EXCPH_Renorm =rZERO EXCPH_Renorm_PH_abs=rZERO ! - ! The satellites - ! call live_timing('Satellites',q%nibz) ! do iq=1,q%nibz @@ -97,20 +112,14 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! - do il=elph_branches(1),elph_branches(2) - ! - ph_E=sqrt(PH_freqs_sq(iq,il)) - bose_factor=bose_f(PH_E) - if(ph_E @brief Calculate the phonon-assisted satellite for absorption and emission +! using double-grid ! ! @param[in] iq q-point ! @param[in] il phonon branch @@ -37,18 +38,21 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp use pars, ONLY:SP,cZERO,rZERO - use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in + use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in, & +& min_EXC_E use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold + use functions, ONLY:bose_f,boltzman_f ! #include ! - integer intent(in) :: il,iq,i_alpha,i_beta + integer, intent(in) :: il,iq,i_alpha,i_beta complex(SP), intent(in) :: W complex(SP), intent(out) :: Sat_absorption, Sat_emission ! ! Work Space ! - real(SP) :: PH_E,bose_factor,E_alpha,boltz_factor + real(SP) :: PH_E,bose_factor,E_alpha,boltzm_factor + complex(SP) :: pole ! Sat_absorption=cZERO Sat_emission =cZERO @@ -65,7 +69,7 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Boltzman factor for the luminescence ! - boltz_factor=boltzman_f(BS_all_E(i_beta,iq)-min_EXC_E) + boltzm_factor=boltzman_f(BS_all_E(i_beta,iq)-min_EXC_E) ! pole=E_alpha+BS_Sat_E(il,i_beta,i_alpha) ! @@ -75,7 +79,7 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Phonon emission in luminescence ! - Sat_emissions=Sat_emission+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzman_f(exc_E) + Sat_emission=Sat_emission+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor ! pole=E_alpha+BS_Sat_E_PH_abs(il,i_beta,i_alpha) ! @@ -85,6 +89,6 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Phonon absorption in luminescence ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzman_f(exc_E) + Sat_emission=Sat_emission+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! -end subroutine Satellite_Simple +end subroutine Satellite_Simple diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index dc07f73ba2..58d3d78e4d 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -456,7 +456,7 @@ subroutine INIT_activate() ! ! Exciton-phonon Self-energy ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh') + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') if (l_EXCPH_optics) call initactivate(1,'BoseTemp EXCTemp PlotLum DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') ! #endif From 2ceafef986dfb8e1da4d93939f34f78ae04d371c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Feb 2022 16:24:16 +0100 Subject: [PATCH 0141/1367] Version 5.1.1, Revision 21240, Hash 55b02438c MODIFIED * include/driver/version.h NEW * exc-ph/Satellite_DbGrid.F Additions: -Forgot file Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/Satellite_DbGrid.F | 94 +++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 src/exc-ph/Satellite_DbGrid.F diff --git a/include/driver/version.h b/include/driver/version.h index afe9bcf858..886808c79a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21238 -#define YAMBO_HASH "4af668d0f" +#define YAMBO_REVISION 21239 +#define YAMBO_HASH "f042dd7bf" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F new file mode 100644 index 0000000000..538f126ea4 --- /dev/null +++ b/src/exc-ph/Satellite_DbGrid.F @@ -0,0 +1,94 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate the phonon-assisted satellite for absorption and emission +! using double-grid +! +! @param[in] iq q-point +! @param[in] il phonon branch +! @param[in] i_alpha incoming exciton +! @param[in] i_beta outgoing exciton +! @param[in] W photon energy and damping factor +! +! @param[out] Sat_absorption Satellite in absorption +! @param[out] Sat_emission Satellite in emission +!! +subroutine Satellite_DbGrid(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) + ! + use frequency, ONLY:w_samp + use R_lattice, ONLY:bz_samp + use pars, ONLY:SP,cZERO,rZERO + use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in, & +& min_EXC_E + use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold + use functions, ONLY:bose_f,boltzman_f + ! +#include + ! + integer, intent(in) :: il,iq,i_alpha,i_beta + complex(SP), intent(in) :: W + complex(SP), intent(out) :: Sat_absorption, Sat_emission + ! + ! Work Space + ! + real(SP) :: PH_E,bose_factor,E_alpha,boltzm_factor + complex(SP) :: pole + ! + Sat_absorption=cZERO + Sat_emission =cZERO + ! + ph_E=sqrt(PH_freqs_sq(iq,il)) + ! + if(ph_E Date: Tue, 15 Feb 2022 16:50:05 +0100 Subject: [PATCH 0142/1367] Version 5.1.1, Revision 21241, Hash 2ceafef98 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Work in progress Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 886808c79a..822cad42ee 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21239 -#define YAMBO_HASH "f042dd7bf" +#define YAMBO_REVISION 21240 +#define YAMBO_HASH "55b02438c" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index dd47110830..0f2c4cc802 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -92,6 +92,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call INTERPOLATION_BZ_setup(q) INTERP_obj(ID_E_kpq_obj)%what="EXC_E(k+q)" call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_E_kpq,ID_obj=ID_E_kpq_obj) + EXC_DbGd%nb=EXCPH_states(2) + EXC_DbGd%nk=q%FGbz%N + YAMBO_ALLOC(EXC_DbGd%E,(EXC_DbGd%nb,EXC_DbGd%nk,1)) + call INTERPOLATION_BZ(K=k_plus_q,NK=EXC_DbGd%nk,ID=ID_E_kpq,E=E_kpq) ! endif ! @@ -115,11 +119,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Add the contribution of q-point transition to the renormalization factors ! for all excionts i_alpha ! - if(use_PH_DbGd) then -! call Eval_Renorm_Factor(iq) - else - call Eval_Renorm_Factor(iq) - endif + call Eval_Renorm_Factor(iq) ! do iw=1,wv%n_freqs ! From 49e895a015187a705a81ffd5c903ef5177c05592 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Feb 2022 16:55:30 +0100 Subject: [PATCH 0143/1367] Version 5.1.1, Revision 21242, Hash 8f0d89999 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F modules/mod_EXCPH.F Additions: -More stuff Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 11 +++++++---- src/modules/mod_EXCPH.F | 5 +++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 822cad42ee..6f886ba5e4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21240 -#define YAMBO_HASH "55b02438c" +#define YAMBO_REVISION 21241 +#define YAMBO_HASH "2ceafef98" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 0f2c4cc802..60aed9ee81 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -42,7 +42,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& @@ -68,8 +68,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer, external :: io_EXCPH_gkkp,io_ELPH,io_Double_Grid real(SP) :: bose_factor,PH_E ! - min_EXC_E=minval(BS_all_E(1,:)) min_pos =minloc(BS_all_E(1,:)) + min_EXC_E=minval(BS_all_E(1,:)) call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) ! ! Load the Exciton-phonon elements and phonon energies @@ -91,11 +91,14 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) INTERP_shell_factor =E_kpq_sh_fact call INTERPOLATION_BZ_setup(q) INTERP_obj(ID_E_kpq_obj)%what="EXC_E(k+q)" - call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_E_kpq,ID_obj=ID_E_kpq_obj) + call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_EXC,ID_obj=ID_EXC_obj) EXC_DbGd%nb=EXCPH_states(2) EXC_DbGd%nk=q%FGbz%N YAMBO_ALLOC(EXC_DbGd%E,(EXC_DbGd%nb,EXC_DbGd%nk,1)) - call INTERPOLATION_BZ(K=k_plus_q,NK=EXC_DbGd%nk,ID=ID_E_kpq,E=E_kpq) + call INTERPOLATION_BZ(K=k_plus_q,NK=EXC_DbGd%nk,ID=ID_E_kpq,E=EXC_DbGd) + ! + min_EXC_E_DbGd=minval(EXC_DbGd%E(1,:,1)) + call msg('rs','Minimum excitonic energy with DbGrid: ',min_EXC_E_DbGd*HA2EV,' eV') ! endif ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 77308d408c..1e764cd152 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -79,6 +79,11 @@ module EXCPH ! real(SP) :: min_EXC_E ! + ! Double-grid + ! + integer :: ID_EXC,ID_EXC_odj + real(SP) :: min_EXC_E_DbGd + ! contains ! subroutine Sat_alloc() From 60db13d9a1b9e02c6206b20812918fc405271ce7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 17 Feb 2022 16:07:50 +0100 Subject: [PATCH 0144/1367] Version 5.1.1, Revision 21243, Hash 49e895a01 MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Additions: -Fixed setup double-grid Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_X_phass.F | 40 ++++++++++++++--------- src/exc-ph/EXCPH_optics.F | 66 +++++++++++++++++++++----------------- src/modules/mod_EXCPH.F | 3 +- 5 files changed, 66 insertions(+), 49 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6f886ba5e4..571591049a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21241 -#define YAMBO_HASH "2ceafef98" +#define YAMBO_REVISION 21242 +#define YAMBO_HASH "8f0d89999" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 1a00602deb..555a70ddb9 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 60aed9ee81..d7085b7f5c 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -38,17 +38,18 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! use frequency, ONLY:w_samp - use pars, ONLY:SP,cZERO,rZERO + use vec_operate, ONLY:c2a + use pars, ONLY:SP,cZERO,rZERO,schlen use units, ONLY:HA2EV use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,& -& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E +& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& -& INTERPOLATE_is_quiet +& INTERPOLATE_is_quiet,INTERPOLATION_BZ use com, ONLY:msg - use R_lattice, ONLY:bz_samp + use R_lattice, ONLY:bz_samp,bz_samp_reset use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc @@ -61,12 +62,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Work space ! - complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E,E_alpha - integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: ID_E_kpq,ID_E_kpq_obj,ID_DG - integer, external :: io_EXCPH_gkkp,io_ELPH,io_Double_Grid - real(SP) :: bose_factor,PH_E + complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss + real(SP) :: min_E,exc_E,E_alpha,bose_factor,PH_E,v(3) + type(bz_samp) :: q_DbGd + integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) + integer :: ID_E_kpq,ID_E_kpq_obj,ID_DG,min_pos_E_DbGd(1) + integer, external :: io_EXCPH_gkkp,io_ELPH + character(schlen) :: q_point ! min_pos =minloc(BS_all_E(1,:)) min_EXC_E=minval(BS_all_E(1,:)) @@ -92,13 +94,21 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call INTERPOLATION_BZ_setup(q) INTERP_obj(ID_E_kpq_obj)%what="EXC_E(k+q)" call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_EXC,ID_obj=ID_EXC_obj) - EXC_DbGd%nb=EXCPH_states(2) - EXC_DbGd%nk=q%FGbz%N - YAMBO_ALLOC(EXC_DbGd%E,(EXC_DbGd%nb,EXC_DbGd%nk,1)) - call INTERPOLATION_BZ(K=k_plus_q,NK=EXC_DbGd%nk,ID=ID_E_kpq,E=EXC_DbGd) ! - min_EXC_E_DbGd=minval(EXC_DbGd%E(1,:,1)) + call bz_samp_reset(q_DbGd) + q_DbGd%nibz=q%FGbz%N + YAMBO_ALLOC(q_DbGd%pt,(q_DbGd%nibz,3)) + q_DbGd%pt=q%FGbz%pt + ! + YAMBO_ALLOC(EXC_E_DbGd,(EXCPH_states(2),q%FGbz%N)) + call INTERPOLATION_BZ(K=q_DbGd,NK=q%FGbz%N,ID=ID_E_kpq,R1D=EXC_E_DbGd) + ! + min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) + min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) + call c2a(v_in=q_DbGd%pt(min_pos_E_DbGd,:),v_out=v,mode="ki2a") call msg('rs','Minimum excitonic energy with DbGrid: ',min_EXC_E_DbGd*HA2EV,' eV') + write(q_point,'(3f12.6,a)') v(:),' [rlu] ' + call msg('rs','Minimum q-point in the DbGrid : '//q_point) ! endif ! diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 98907dceba..f2a96e8df3 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -30,9 +30,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) use electrons, ONLY:levels,n_sp_pol,spin_occ use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use X_m, ONLY:X_t - use IO_int, ONLY:io_control - use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,OP_WR,WR,WR_CL,& -& OP_WR_CL,OP_APP_CL,DUMP use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers use parser_m, ONLY:parser use com, ONLY:msg,of_open_close @@ -54,8 +51,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=5 real(SP) :: output_data(n_output) - integer :: iw,iq,i_alpha,ID_DG,io_err - integer, external :: io_Double_Grid + integer :: iw,iq,i_alpha,ID_DG character(schlen) :: dbgd_string ! call section('*','EXCPH-Optics') @@ -96,33 +92,10 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! This formula can be wrong in presence of the 2D-cutoff BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 ! - ! **** DOUBLE GRID PART ***** - ! - ! Fill the PH_freqs array - ! This structure will contains the phonon frequencies and the - ! double-grid phonon frequencies calculated with matdyn.x - ! - PH_freqs%nk=q%nibz - PH_freqs%nb=ph_modes - YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) - ! - ! Check if double-grid is present and use it - ! load the double-grid phonon energies in PH_freqs - ! - call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) - io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') - ! - dbgd_string='' - if(io_err==0) then - ! - use_PH_DbGd=.TRUE. - call msg('sr','Using PH-double-grid ') - dbgd_string='DbGd' - ! - endif + ! Turn on double-grid if presents + call DoubleGrid_setup() ! ! Frequencies and damping setup - ! call FREQUENCIES_setup(wv) YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs,2)) YAMBO_ALLOC(PL_ii,(wv%n_freqs,2)) @@ -189,4 +162,37 @@ subroutine print_output() ! end subroutine print_output ! + subroutine DoubleGrid_setup() + use IO_int, ONLY:io_control + use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP + implicit none + ! + integer, external :: io_Double_Grid + integer :: io_err + ! + ! Fill the PH_freqs array + ! This structure will contains the phonon frequencies and the + ! double-grid phonon frequencies calculated with matdyn.x + ! + PH_freqs%nk=q%nibz + PH_freqs%nb=ph_modes + YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) + ! + ! Check if double-grid is present and use it + ! load the double-grid phonon energies in PH_freqs + ! + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) + io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') + ! + dbgd_string='' + if(io_err==0) then + ! + use_PH_DbGd=.TRUE. + call msg('sr','Using PH-double-grid ') + dbgd_string='DbGd' + ! + endif + ! + end subroutine DoubleGrid_setup + ! end subroutine diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 1e764cd152..fd23dcac61 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -81,8 +81,9 @@ module EXCPH ! ! Double-grid ! - integer :: ID_EXC,ID_EXC_odj + integer :: ID_EXC,ID_EXC_obj real(SP) :: min_EXC_E_DbGd + real(SP), allocatable :: EXC_E_DbGd(:,:) ! contains ! From 3a2246458890a8530849350a0e808fd36746816d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 17 Feb 2022 16:40:24 +0100 Subject: [PATCH 0145/1367] Version 5.1.1, Revision 21244, Hash 60db13d9a MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/Satellite_DbGrid.F Bugs: - Additions: -Code done, I just miss the new weights Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_X_phass.F | 2 +- src/exc-ph/Satellite_DbGrid.F | 99 +++++++++++++++++++++-------------- 3 files changed, 64 insertions(+), 41 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 571591049a..b896612f94 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21242 -#define YAMBO_HASH "8f0d89999" +#define YAMBO_REVISION 21243 +#define YAMBO_HASH "49e895a01" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index d7085b7f5c..8c7da34bfd 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -150,7 +150,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! if(use_PH_DbGd) then - call Satellite_DbGrid(iq,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_DbGrid(iq,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) else call Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) endif diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 538f126ea4..93589624af 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -33,62 +33,85 @@ ! @param[out] Sat_absorption Satellite in absorption ! @param[out] Sat_emission Satellite in emission !! -subroutine Satellite_DbGrid(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) +subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emission) ! use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp use pars, ONLY:SP,cZERO,rZERO - use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in, & -& min_EXC_E - use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold + use EXCPH, ONLY:BS_Sat_WEIGHT,BS_all_E,BS_Sat_WEIGHT_PH_abs,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd + use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold use functions, ONLY:bose_f,boltzman_f ! #include ! - integer, intent(in) :: il,iq,i_alpha,i_beta + integer, intent(in) :: il,iq_bz,i_alpha,i_beta complex(SP), intent(in) :: W complex(SP), intent(out) :: Sat_absorption, Sat_emission + type(bz_samp), intent(in) :: q ! ! Work Space ! - real(SP) :: PH_E,bose_factor,E_alpha,boltzm_factor + real(SP) :: PH_E,bose_factor,E_alpha,boltzm_factor,weight_dbg,E_beta + complex(SP) :: BS_Sat_E_DbGd,BS_Sat_E_DbGd_PH_abs + integer :: nq_around,iq_fg,iE_fg complex(SP) :: pole ! Sat_absorption=cZERO Sat_emission =cZERO ! - ph_E=sqrt(PH_freqs_sq(iq,il)) - ! - if(ph_E Date: Thu, 17 Feb 2022 16:42:14 +0100 Subject: [PATCH 0146/1367] Version 5.1.1, Revision 21245, Hash 3a2246458 MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F modules/mod_EXCPH.F Bugs: - Additions: -Start working on weights Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_DbGrid.F | 10 +++++----- src/modules/mod_EXCPH.F | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b896612f94..5774a0f1f0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21243 -#define YAMBO_HASH "49e895a01" +#define YAMBO_REVISION 21244 +#define YAMBO_HASH "60db13d9a" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 93589624af..10a624a149 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -38,7 +38,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp use pars, ONLY:SP,cZERO,rZERO - use EXCPH, ONLY:BS_Sat_WEIGHT,BS_all_E,BS_Sat_WEIGHT_PH_abs,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd + use EXCPH, ONLY:BS_Sat_WEIGHT_DbG,BS_all_E,BS_Sat_WEIGHT_DbG_PH_abs,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold use functions, ONLY:bose_f,boltzman_f ! @@ -91,21 +91,21 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! ! Phonon emission in absorption ! - Sat_absorption=Sat_absorption+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor) + Sat_absorption=Sat_absorption+BS_Sat_WEIGHT_DbGd(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor) ! ! Phonon emission in luminescence ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor + Sat_emission=Sat_emission+BS_Sat_WEIGHT_DbGd(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor ! pole=E_alpha+BS_Sat_E_DbGd_PH_abs ! ! Phonon absorption in absorption ! - Sat_absorption=Sat_absorption+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*bose_factor + Sat_absorption=Sat_absorption+BS_Sat_WEIGHT_DbGd_PH_abs(il,i_beta,i_alpha)/(W-pole)*bose_factor ! ! Phonon absorption in luminescence ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor + Sat_emission=Sat_emission+BS_Sat_WEIGHT_DbGd_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! enddo ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index fd23dcac61..24f2e04ddd 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -68,6 +68,8 @@ module EXCPH complex(SP), allocatable :: BS_Sat_E_PH_abs(:,:,:) real(SP), allocatable :: BS_Sat_WEIGHT(:,:,:) real(SP), allocatable :: BS_Sat_WEIGHT_PH_abs(:,:,:) + real(SP), allocatable :: BS_Sat_WEIGHT_DbGd(:,:,:) + real(SP), allocatable :: BS_Sat_WEIGHT__DbGd_PH_abs(:,:,:) real(SP), allocatable :: EXCPH_Renorm(:) real(SP), allocatable :: EXCPH_Renorm_PH_abs(:) complex(SP), allocatable :: BS_EXCPH_E(:) From 0607a847b7797d75ae32834cf71b62c4de926a21 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 17 Feb 2022 18:08:24 +0100 Subject: [PATCH 0147/1367] Version 5.1.1, Revision 21246, Hash 34960b520 MODIFIED * include/driver/version.h exc-ph/EXCPH_eval_sat.F exc-ph/Satellite_DbGrid.F modules/mod_EXCPH.F Additions: -Fixed calculation BS_Sat for acustic phonons Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_eval_sat.F | 8 ++++++-- src/exc-ph/Satellite_DbGrid.F | 3 ++- src/modules/mod_EXCPH.F | 2 -- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5774a0f1f0..a0cc7ced3c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21244 -#define YAMBO_HASH "60db13d9a" +#define YAMBO_REVISION 21245 +#define YAMBO_HASH "3a2246458" diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 6e5e125f50..cc28862c54 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -26,7 +26,7 @@ subroutine EXCPH_eval_sat(iq,il,q) ! use pars, ONLY:SP,cZERO,rZERO use R_lattice, ONLY:bz_samp - use ELPH, ONLY:PH_freqs_sq + use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & & EXCPH_Renorm,EXCPH_Renorm_PH_abs,BS_E,BS_E_in,EXCPH_Gkkp_sq, & & EXCPH_sum,EXCPH_states @@ -43,9 +43,11 @@ subroutine EXCPH_eval_sat(iq,il,q) integer :: i_alpha,i_beta ! iq_bz = q%k_table(iq, 1) - ! ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) ! + BS_Sat_WEIGHT =rZERO + BS_Sat_WEIGHT_PH_abs=rZERO + ! ! Calculate satellites weights and renormalization factors without double-grid ! do i_alpha=EXCPH_states(1),EXCPH_states(2) @@ -55,6 +57,8 @@ subroutine EXCPH_eval_sat(iq,il,q) BS_Sat_E (il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)+ph_E BS_Sat_E_PH_abs(il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)-ph_E ! + if(i_alpha==i_beta.and.ph_E Date: Thu, 17 Feb 2022 18:27:37 +0100 Subject: [PATCH 0148/1367] Version 5.1.1, Revision 21247, Hash 0607a847b MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F Bugs: - Additions: -Better conditions on satellites energies Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 17 +++++++++++++++-- src/exc-ph/EXCPH_eval_sat.F | 2 +- src/exc-ph/Satellite_DbGrid.F | 4 +--- src/exc-ph/Satellite_Simple.F | 5 ----- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a0cc7ced3c..f3a0a4eb6d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21245 -#define YAMBO_HASH "3a2246458" +#define YAMBO_REVISION 21246 +#define YAMBO_HASH "34960b520" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 8c7da34bfd..ab892e020d 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -69,6 +69,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer :: ID_E_kpq,ID_E_kpq_obj,ID_DG,min_pos_E_DbGd(1) integer, external :: io_EXCPH_gkkp,io_ELPH character(schlen) :: q_point + logical :: l_DbGd_Sigma_Only + ! + call parser('DBGSigmaOnly',l_DbGd_Sigma_Only) ! min_pos =minloc(BS_all_E(1,:)) min_EXC_E=minval(BS_all_E(1,:)) @@ -132,6 +135,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Add the contribution of q-point transition to the renormalization factors ! for all excionts i_alpha ! + if(use_PH_DbGd.and..not.l_DbGd_Sigma_Only) then + call Eval_Sat_Weights_DbGd(iq) + else + BS_Sat_WEIGHT_DbGd =BS_Sat_WEIGHT + BS_Sat_WEIGHT_DbGd_PH_abs=BS_Sat_WEIGHT_PH_abs + endif + ! call Eval_Renorm_Factor(iq) ! do iw=1,wv%n_freqs @@ -217,6 +227,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) YAMBO_FREE(EXCPH_Renorm_PH_abs) ! contains + ! + subroutine Eval_Sat_Weights_DbGd(iq) + implicit none + end subroutine + ! subroutine Eval_Renorm_Factor(iq_in) use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq @@ -225,9 +240,7 @@ subroutine Eval_Renorm_Factor(iq_in) ! do il=elph_branches(1),elph_branches(2) ! - ph_E=sqrt(PH_freqs_sq(iq_in,il)) bose_factor=bose_f(PH_E) - if(ph_E @@ -68,8 +68,6 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid ! - if(ph_E @@ -57,10 +56,6 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) Sat_absorption=cZERO Sat_emission =cZERO ! - ph_E=sqrt(PH_freqs_sq(iq,il)) - ! - if(ph_E Date: Thu, 17 Feb 2022 18:50:05 +0100 Subject: [PATCH 0149/1367] Version 5.1.1, Revision 21248, Hash a37450348 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F Bugs: - Additions: -More stuff Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 26 ++++++++++++++++++++---- src/exc-ph/EXCPH_optics.F | 37 ++++++++++++++++++++++++++--------- src/exc-ph/Satellite_DbGrid.F | 3 ++- 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f3a0a4eb6d..0ababbef64 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21246 -#define YAMBO_HASH "34960b520" +#define YAMBO_REVISION 21247 +#define YAMBO_HASH "0607a847b" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index ab892e020d..ee0cc9c0c9 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -142,7 +142,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) BS_Sat_WEIGHT_DbGd_PH_abs=BS_Sat_WEIGHT_PH_abs endif ! - call Eval_Renorm_Factor(iq) + call Eval_Renorm_Factor() ! do iw=1,wv%n_freqs ! @@ -228,15 +228,33 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! contains ! - subroutine Eval_Sat_Weights_DbGd(iq) + subroutine Eval_Sat_Weights_DbGd() implicit none + ! + nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz + weight_dbg=1._SP/real(nq_around,SP) ! Total weight of the Db-grid points including the iq_bz + ! + E_alpha =BS_E_in(i_alpha) + ! + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ! + ! Excitonic energies in the double-grid + ! + E_beta =EXC_E_DbGd(i_beta,iq_fg) + ! + ! TO BE CONTINUED + ! + enddo + ! end subroutine ! - subroutine Eval_Renorm_Factor(iq_in) + subroutine Eval_Renorm_Factor() use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq implicit none - integer, intent(in) :: iq_in ! do il=elph_branches(1),elph_branches(2) ! diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index f2a96e8df3..c2cae548ca 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -108,15 +108,10 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! call print_output() ! - ! ! Deallocations - ! - YAMBO_FREE(Epsilon_ii) - YAMBO_FREE(PL_ii) - YAMBO_FREE(BS_E) - YAMBO_FREE(BS_all_E) - YAMBO_FREE_P(BS_R_left) - YAMBO_FREE_P(BS_R_right) - YAMBO_FREE(BS_R) + ! Deallocations + ! + call Free_EXCPH() + ! call FREQUENCIES_reset(wv,"all") ! contains @@ -191,8 +186,32 @@ subroutine DoubleGrid_setup() call msg('sr','Using PH-double-grid ') dbgd_string='DbGd' ! + YAMBO_ALLOC(BS_Sat_WEIGHT_DbGd,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_WEIGHT_DbGd_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + ! + BS_Sat_WEIGHT_DbGd =rZERO + BS_Sat_WEIGHT_DbGd_PH_abs=rZERO + ! endif ! end subroutine DoubleGrid_setup ! + subroutine FREE_EXCPH() + implicit none + ! + YAMBO_FREE(Epsilon_ii) + YAMBO_FREE(PL_ii) + YAMBO_FREE(BS_E) + YAMBO_FREE(BS_all_E) + YAMBO_FREE_P(BS_R_left) + YAMBO_FREE_P(BS_R_right) + YAMBO_FREE(BS_R) + ! + if(use_PH_DbGd) then + YAMBO_FREE(BS_Sat_WEIGHT_DbGd) + YAMBO_FREE(BS_Sat_WEIGHT_DbGd_PH_abs) + endif + ! + end subroutine FREE_EXCPH + ! end subroutine diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index f27e8ee204..0fb237a2c8 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -63,6 +63,8 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz weight_dbg=1._SP/real(nq_around,SP) ! Total weight of the Db-grid points including the iq_bz ! + E_alpha =BS_E_in(i_alpha) + ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ @@ -75,7 +77,6 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! Excitonic energies in the double-grid ! E_beta =EXC_E_DbGd(i_beta,iq_fg) - E_alpha =BS_E_in(i_alpha) ! ! Boltzman factor for the luminescence ! From 207ca288d0f7ccd925dceb600702b7cd8271ffea Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 18 Feb 2022 09:38:40 +0100 Subject: [PATCH 0150/1367] Version 5.1.1, Revision 21249, Hash 293e3399d MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Additions: -Fixing bug Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 2 +- src/exc-ph/EXCPH_optics.F | 16 ++++++++-------- src/modules/mod_EXCPH.F | 2 ++ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0ababbef64..628c365429 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21247 -#define YAMBO_HASH "0607a847b" +#define YAMBO_REVISION 21248 +#define YAMBO_HASH "a37450348" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index ee0cc9c0c9..d973dd7378 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -45,7 +45,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd - use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches + use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches,PH_freqs use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& & INTERPOLATE_is_quiet,INTERPOLATION_BZ use com, ONLY:msg diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index c2cae548ca..5e3ced87ed 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -35,8 +35,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) use com, ONLY:msg,of_open_close use BS_Solvers, ONLY:BSS_n_eig use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R - use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd +& BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs + use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches use frequency, ONLY:w_samp ! #include @@ -186,11 +186,11 @@ subroutine DoubleGrid_setup() call msg('sr','Using PH-double-grid ') dbgd_string='DbGd' ! - YAMBO_ALLOC(BS_Sat_WEIGHT_DbGd,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(BS_Sat_WEIGHT_DbGd_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_W_DG,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) ! - BS_Sat_WEIGHT_DbGd =rZERO - BS_Sat_WEIGHT_DbGd_PH_abs=rZERO + BS_Sat_W_DG =rZERO + BS_Sat_W_DG_PH_abs=rZERO ! endif ! @@ -208,8 +208,8 @@ subroutine FREE_EXCPH() YAMBO_FREE(BS_R) ! if(use_PH_DbGd) then - YAMBO_FREE(BS_Sat_WEIGHT_DbGd) - YAMBO_FREE(BS_Sat_WEIGHT_DbGd_PH_abs) + YAMBO_FREE(BS_Sat_W_DG) + YAMBO_FREE(BS_Sat_W_DG_PH_abs) endif ! end subroutine FREE_EXCPH diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index fd23dcac61..fa59c42cdc 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -84,6 +84,8 @@ module EXCPH integer :: ID_EXC,ID_EXC_obj real(SP) :: min_EXC_E_DbGd real(SP), allocatable :: EXC_E_DbGd(:,:) + real(SP), allocatable :: BS_Sat_W_DG(:,:,:) + real(SP), allocatable :: BS_Sat_W_DG_PH_abs(:,:,:) ! contains ! From c89939dea351bff9c077fbe3571d1d68496e2f0a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 18 Feb 2022 12:34:28 +0100 Subject: [PATCH 0151/1367] Version 5.1.1, Revision 21250, Hash 207ca288d MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F modules/mod_EXCPH.F Additions: -Final verion... debuggin in progress Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_X_phass.F | 117 ++++++++++++++++++++++++---------- src/exc-ph/Satellite_DbGrid.F | 10 +-- src/exc-ph/Satellite_Simple.F | 4 +- src/modules/mod_EXCPH.F | 8 +-- 5 files changed, 96 insertions(+), 47 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 628c365429..4b3e1ca051 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21248 -#define YAMBO_HASH "a37450348" +#define YAMBO_REVISION 21249 +#define YAMBO_HASH "293e3399d" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index d973dd7378..4068405387 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -43,9 +43,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,& -& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd - use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches,PH_freqs + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,BS_Sat_W_DG,& +& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & +& BS_Sat_W_DG_PH_abs + use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches,PH_freqs,FAN_deltaE_treshold use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& & INTERPOLATE_is_quiet,INTERPOLATION_BZ use com, ONLY:msg @@ -53,6 +54,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc + use parser_m, ONLY:parser ! #include ! @@ -65,7 +67,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss real(SP) :: min_E,exc_E,E_alpha,bose_factor,PH_E,v(3) type(bz_samp) :: q_DbGd - integer :: i_alpha,i_beta,il,iq,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) + integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer :: ID_E_kpq,ID_E_kpq_obj,ID_DG,min_pos_E_DbGd(1) integer, external :: io_EXCPH_gkkp,io_ELPH character(schlen) :: q_point @@ -75,6 +77,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! min_pos =minloc(BS_all_E(1,:)) min_EXC_E=minval(BS_all_E(1,:)) + ! call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) ! ! Load the Exciton-phonon elements and phonon energies @@ -124,22 +127,22 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call live_timing('Satellites',q%nibz) ! - do iq=1,q%nibz + do iq_bz=1,q%nbz ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_exc_gkkp) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq/),MODE=DUMP,ID=ID_gkkp) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! ! Add the contribution of q-point transition to the renormalization factors ! for all excionts i_alpha ! if(use_PH_DbGd.and..not.l_DbGd_Sigma_Only) then - call Eval_Sat_Weights_DbGd(iq) + call Eval_Sat_Weights_DbGd() else - BS_Sat_WEIGHT_DbGd =BS_Sat_WEIGHT - BS_Sat_WEIGHT_DbGd_PH_abs=BS_Sat_WEIGHT_PH_abs + BS_Sat_W_DG =BS_Sat_WEIGHT + BS_Sat_W_DG_PH_abs=BS_Sat_WEIGHT_PH_abs endif ! call Eval_Renorm_Factor() @@ -160,9 +163,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! if(use_PH_DbGd) then - call Satellite_DbGrid(iq,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) else - call Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) endif ! enddo @@ -229,45 +232,89 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) contains ! subroutine Eval_Sat_Weights_DbGd() + use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs implicit none ! + real(SP) :: E_beta,weight_dbg,W_det,W_PH_abs_det,bose_factor + integer :: iE_fg,iq_fg,nq_around + ! nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz weight_dbg=1._SP/real(nq_around,SP) ! Total weight of the Db-grid points including the iq_bz ! - E_alpha =BS_E_in(i_alpha) - ! - do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) - ! - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid - ! - ! Excitonic energies in the double-grid - ! - E_beta =EXC_E_DbGd(i_beta,iq_fg) + do i_alpha=EXCPH_states(1),EXCPH_states(2) ! - ! TO BE CONTINUED + E_alpha =BS_E_in(i_alpha) ! + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + do il=elph_branches(1),elph_branches(2) + ! + W_det =rZERO + W_PH_abs_det=rZERO + ! + ! Sum on the double-grid + ! + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + bose_factor=bose_f(PH_E) + ! + ! Excitonic energies in the double-grid + ! + E_beta =EXC_E_DbGd(i_beta,iq_fg) + ! + if(abs(E_beta-BS_E_in(i_alpha)+ph_E)>FAN_deltaE_treshold) & +& W_det=W_det+(bose_factor+1._SP)/abs(E_beta-BS_E_in(i_alpha)+ph_E)**2 + if(abs(E_beta-BS_E_in(i_alpha)-ph_E)>FAN_deltaE_treshold) & + W_PH_abs_det=W_PH_abs_det+bose_factor/abs(E_beta-BS_E_in(i_alpha)-ph_E)**2 + ! + enddo + ! + W_det =W_det/weight_dbg + W_PH_abs_det=W_PH_abs_det/weight_dbg + ! + BS_Sat_W_DG(il,i_beta,i_alpha) =BS_Sat_WEIGHT(il,i_beta,i_alpha) & + & *abs(BS_Sat_E(il,i_beta,i_alpha))**2*W_det + BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha)=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) & +& *abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2*W_PH_abs_det + enddo + enddo enddo ! end subroutine - ! subroutine Eval_Renorm_Factor() - use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq + use ELPH, ONLY:elph_branches,PH_freqs_sq implicit none + real(SP), pointer :: BS_S_W(:,:,:),BS_S_W_PH_abs(:,:,:) ! - do il=elph_branches(1),elph_branches(2) - ! - bose_factor=bose_f(PH_E) - ! - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) - EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+bose_factor) - EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*bose_factor - end forall + if(use_PH_DbGd) then + ! + ! In the double-grid case the bose factor is included in the weights + ! + do il=elph_branches(1),elph_branches(2) + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) + EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_W_DG(il,i_beta,i_alpha) + EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha) + end forall + enddo + enddo + else + ! + do il=elph_branches(1),elph_branches(2) + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + bose_factor=bose_f(PH_E) + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) + EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+bose_factor) + EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*bose_factor + end forall + enddo enddo ! - enddo + endif ! end subroutine ! diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 0fb237a2c8..2c78f0d87d 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -39,7 +39,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss use R_lattice, ONLY:bz_samp use pars, ONLY:SP,cZERO,rZERO use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd, & -& BS_Sat_WEIGHT_DbGd,BS_Sat_WEIGHT_DbGd_PH_abs +& BS_Sat_W_DG,BS_Sat_W_DG_PH_abs use ELPH, ONLY:PH_freqs use functions, ONLY:bose_f,boltzman_f ! @@ -91,21 +91,21 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! ! Phonon emission in absorption ! - Sat_absorption=Sat_absorption+BS_Sat_WEIGHT_DbGd(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor) + Sat_absorption=Sat_absorption+BS_Sat_W_DG(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor) ! ! Phonon emission in luminescence ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT_DbGd(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor + Sat_emission =Sat_emission +BS_Sat_W_DG(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor ! pole=E_alpha+BS_Sat_E_DbGd_PH_abs ! ! Phonon absorption in absorption ! - Sat_absorption=Sat_absorption+BS_Sat_WEIGHT_DbGd_PH_abs(il,i_beta,i_alpha)/(W-pole)*bose_factor + Sat_absorption=Sat_absorption+BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha)/(W-pole)*bose_factor ! ! Phonon absorption in luminescence ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT_DbGd_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor + Sat_emission=Sat_emission +BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! enddo ! diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index 9e30a7c97c..b85bec00e0 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -41,6 +41,7 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in, & & min_EXC_E use functions, ONLY:bose_f,boltzman_f + use ELPH, ONLY:PH_freqs_sq ! #include ! @@ -58,7 +59,8 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Bose function for the phonons ! - bose_factor=bose_f(PH_E) + ph_E=sqrt(abs(PH_freqs_sq(iq,il))) + bose_factor=bose_f(ph_E) ! E_alpha=BS_E_in(i_alpha) ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index fa59c42cdc..a2463cbbbc 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -66,8 +66,8 @@ module EXCPH ! complex(SP), allocatable :: BS_Sat_E(:,:,:) complex(SP), allocatable :: BS_Sat_E_PH_abs(:,:,:) - real(SP), allocatable :: BS_Sat_WEIGHT(:,:,:) - real(SP), allocatable :: BS_Sat_WEIGHT_PH_abs(:,:,:) + real(SP), target, allocatable :: BS_Sat_WEIGHT(:,:,:) + real(SP), target, allocatable :: BS_Sat_WEIGHT_PH_abs(:,:,:) real(SP), allocatable :: EXCPH_Renorm(:) real(SP), allocatable :: EXCPH_Renorm_PH_abs(:) complex(SP), allocatable :: BS_EXCPH_E(:) @@ -84,8 +84,8 @@ module EXCPH integer :: ID_EXC,ID_EXC_obj real(SP) :: min_EXC_E_DbGd real(SP), allocatable :: EXC_E_DbGd(:,:) - real(SP), allocatable :: BS_Sat_W_DG(:,:,:) - real(SP), allocatable :: BS_Sat_W_DG_PH_abs(:,:,:) + real(SP), target, allocatable :: BS_Sat_W_DG(:,:,:) + real(SP), target, allocatable :: BS_Sat_W_DG_PH_abs(:,:,:) ! contains ! From 5c1e4ead855800bb65ab9bf71746af266c084059 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 20 Feb 2022 22:31:13 +0100 Subject: [PATCH 0152/1367] Version 5.1.1, Revision 21251, Hash c89939dea MODIFIED * include/driver/version.h ypp/symmetries/symmetries_driver.F Additions: -Fix gkkp_expanded copy Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/symmetries/symmetries_driver.F | 32 ++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4b3e1ca051..a918049edf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21249 -#define YAMBO_HASH "293e3399d" +#define YAMBO_REVISION 21250 +#define YAMBO_HASH "207ca288d" diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index 616581dd45..9c318df806 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -55,7 +55,7 @@ subroutine symmetries_driver(E,Xk) integer :: action_kind,old_nkpt ! #if defined _YPP_ELPH - character(lchlen) :: filename,infile,outfile + character(lchlen) :: filename,infile,outfile,in_path #endif ! if (core_io_path==more_io_path) more_io_path=trim(core_io_path)//"/FixSymm" @@ -147,21 +147,37 @@ subroutine symmetries_driver(E,Xk) ! Copy gkkp_expanded if presents ! call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! if(io_err==0) then ! call msg('s','Gkkp dbs found, they will be copied in the new folder') ! - filename ='ndb.elph_gkkp_expanded' - if (trim(jobstr)/='') then - infile =trim(jobstr)//"/"//trim(filename) + if (trim(jobstr)/='') then + in_path =trim(jobstr)//"/" else - infile='SAVE/'//trim(filename) + in_path='SAVE/' endif ! - outfile="./"//trim(more_io_path)//"/FixSymm/SAVE/"//trim(filename) - call cp_file(trim(infile),trim(outfile),io_err) + call live_timing('Copying gkkp files',nqbz+1) + ! + do iq=0,nqbz + ! + if(iq==0) then + filename ='ndb.elph_gkkp_expanded' + else + filename ='ndb.elph_gkkp_expanded_fragment_'//trim(intc(iq)) + endif + infile=in_path//trim(filename) + ! + outfile="./"//trim(more_io_path)//"/FixSymm/SAVE/"//trim(filename) + call cp_file(trim(infile),trim(outfile),io_err) + ! + call live_timing(steps=1) + ! + enddo + ! + call live_timing() ! endif ! From 2734327ab334cf3f7aa6addcfa21430d56d4383f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 20 Feb 2022 22:58:46 +0100 Subject: [PATCH 0153/1367] Version 5.1.1, Revision 21251, Hash c89939dea MODIFIED * config/mk/global/libraries.mk ypp/symmetries/symmetries_driver.F Additions: -Fixed the copy of the gkkp_expanded databases Patch sent by: Claudio Attaccalite --- config/mk/global/libraries.mk | 4 +-- ypp/symmetries/symmetries_driver.F | 47 +++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 5f17178b74..a963cd6c84 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -67,8 +67,8 @@ YPP_BASIC_LIBS = modules interface qp plotting k-points symmetries bits elec YPP_BASIC_LIBS_LD = modules interface qp plotting k-points symmetries bits electrons dipoles YPP_LIBS = $(YPP_BASIC_LIBS) excitons YPP_LIBS_LD = $(YPP_BASIC_LIBS_LD) excitons -YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph exc-ph excitons -YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph exc-ph excitons +YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph excitons +YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph excitons YPPRT_LIBS = $(YPP_BASIC_LIBS) el-ph real_time excitons YPPRT_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph real_time excitons # diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index 616581dd45..4e7d62094a 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -27,13 +27,14 @@ subroutine symmetries_driver(E,Xk) use xc_functionals, ONLY:magn use electrons, ONLY:levels,Spin_magn,n_spinor use FFT_m, ONLY:fft_size - use IO_m, ONLY:rm_file - use IO_int, ONLY:ver_is_gt_or_eq - use com, ONLY:msg,core_io_path,more_io_path - use R_lattice, ONLY:bz_samp,ng_closed,ng_vec,bz_samp_reset,bz_samp_duplicate + use IO_m, ONLY:rm_file,cp_file,OP_RD_CL,REP + use IO_int, ONLY:ver_is_gt_or_eq,io_control + use com, ONLY:msg,core_io_path,more_io_path,jobstr + use R_lattice, ONLY:bz_samp,ng_closed,ng_vec,bz_samp_reset,bz_samp_duplicate,nqbz use D_lattice, ONLY:nsym,atom_mass,atoms_map,n_atoms_species_max,n_atomic_species use wave_func, ONLY:wf_ng,WF use stderr, ONLY:intc + use LIVE_t, ONLY:live_timing use interfaces, ONLY:WF_load,WF_free,el_magnetization use parser_m, ONLY:parser ! @@ -55,7 +56,9 @@ subroutine symmetries_driver(E,Xk) integer :: action_kind,old_nkpt ! #if defined _YPP_ELPH - character(lchlen) :: filename,infile,outfile + character(lchlen) :: filename,infile,outfile,in_path + integer, external :: io_ELPH + integer :: iq,ID_gkkp,io_err #endif ! if (core_io_path==more_io_path) more_io_path=trim(core_io_path)//"/FixSymm" @@ -142,26 +145,42 @@ subroutine symmetries_driver(E,Xk) ! Rotate atomic projections call fix_ATOMPROJs(E,Xk,Xk_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_contains_TR,action_kind) ! -#if defined _YPP_PH +#if defined _YPP_ELPH ! ! Copy gkkp_expanded if presents ! - call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! if(io_err==0) then ! call msg('s','Gkkp dbs found, they will be copied in the new folder') ! - filename ='ndb.elph_gkkp_expanded' - if (trim(jobstr)/='') then - infile =trim(jobstr)//"/"//trim(filename) + if (trim(jobstr)/='') then + in_path =trim(jobstr)//"/" else - infile='SAVE/'//trim(filename) + in_path='SAVE/' endif ! - outfile="./"//trim(more_io_path)//"/FixSymm/SAVE/"//trim(filename) - call cp_file(trim(infile),trim(outfile),io_err) + call live_timing('Copying gkkp files',nqbz+1) + ! + do iq=0,nqbz + ! + if(iq==0) then + filename ='ndb.elph_gkkp_expanded' + else + filename ='ndb.elph_gkkp_expanded_fragment_'//trim(intc(iq)) + endif + infile=in_path//trim(filename) + ! + outfile="./"//trim(more_io_path)//"/FixSymm/SAVE/"//trim(filename) + call cp_file(trim(infile),trim(outfile),io_err) + ! + call live_timing(steps=1) + ! + enddo + ! + call live_timing() ! endif ! From 59f7217e2942a4a1fd3cc91276d4a22dd3263489 Mon Sep 17 00:00:00 2001 From: attacc Date: Mon, 21 Feb 2022 11:50:15 +0100 Subject: [PATCH 0154/1367] Version 5.1.1, Revision 21254, Hash e065b76 MODIFIED * modified: modified: Bugs: -Fixed removing symmetries with gkkp_expanded DbS Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- ypp/symmetries/symmetries_driver.F | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a918049edf..5d92857d07 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21250 -#define YAMBO_HASH "207ca288d" +#define YAMBO_REVISION 21254 +#define YAMBO_HASH "e065b76" diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index 4e7d62094a..4d35add688 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -27,7 +27,7 @@ subroutine symmetries_driver(E,Xk) use xc_functionals, ONLY:magn use electrons, ONLY:levels,Spin_magn,n_spinor use FFT_m, ONLY:fft_size - use IO_m, ONLY:rm_file,cp_file,OP_RD_CL,REP + use IO_m, ONLY:rm_file,cp_file,OP_RD_CL,NONE,DUMP use IO_int, ONLY:ver_is_gt_or_eq,io_control use com, ONLY:msg,core_io_path,more_io_path,jobstr use R_lattice, ONLY:bz_samp,ng_closed,ng_vec,bz_samp_reset,bz_samp_duplicate,nqbz @@ -149,13 +149,13 @@ subroutine symmetries_driver(E,Xk) ! ! Copy gkkp_expanded if presents ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),ID=ID_gkkp) + call section('=',"GKKP-databases") + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! if(io_err==0) then ! - call msg('s','Gkkp dbs found, they will be copied in the new folder') - ! if (trim(jobstr)/='') then in_path =trim(jobstr)//"/" else @@ -171,10 +171,11 @@ subroutine symmetries_driver(E,Xk) else filename ='ndb.elph_gkkp_expanded_fragment_'//trim(intc(iq)) endif - infile=in_path//trim(filename) + infile=trim(in_path)//trim(filename) ! - outfile="./"//trim(more_io_path)//"/FixSymm/SAVE/"//trim(filename) + outfile="./"//trim(more_io_path)//"/SAVE/"//trim(filename) call cp_file(trim(infile),trim(outfile),io_err) + if(io_err/=0) call error(' Error copying the gkkp_expanded files') ! call live_timing(steps=1) ! @@ -182,6 +183,8 @@ subroutine symmetries_driver(E,Xk) ! call live_timing() ! + else + call msg('s','Electron-phonon DBs not present') endif ! #endif From 3eb6ce8a0ec53599701f88307a3ec12dc647aea2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 21 Feb 2022 15:15:56 +0100 Subject: [PATCH 0155/1367] Version 5.1.1, Revision 21254, Hash e065b7662 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F Bugs: - Additions: - Changes: -work in progress Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_X_phass.F | 52 +++++++++++++++++++++---------------- src/exc-ph/EXCPH_eval_sat.F | 3 +++ 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a918049edf..31ade707e7 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21250 -#define YAMBO_HASH "207ca288d" +#define YAMBO_REVISION 21254 +#define YAMBO_HASH "e065b7662" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 4068405387..f39d5e2bdf 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -165,7 +165,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) if(use_PH_DbGd) then call Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) else - call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) endif ! enddo @@ -288,33 +288,41 @@ subroutine Eval_Renorm_Factor() use ELPH, ONLY:elph_branches,PH_freqs_sq implicit none real(SP), pointer :: BS_S_W(:,:,:),BS_S_W_PH_abs(:,:,:) - ! + real(SP) :: one_plus_bose_f,bose_factor + ! if(use_PH_DbGd) then - ! - ! In the double-grid case the bose factor is included in the weights - ! - do il=elph_branches(1),elph_branches(2) - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) - EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_W_DG(il,i_beta,i_alpha) - EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha) - end forall - enddo - enddo + BS_S_W =>BS_Sat_W_DG + BS_S_W_PH_abs=>BS_Sat_W_DG_PH_abs else - ! - do il=elph_branches(1),elph_branches(2) + BS_S_W =>BS_Sat_WEIGHT + BS_S_W_PH_abs=>BS_Sat_WEIGHT_PH_abs + endif + ! + do il=elph_branches(1),elph_branches(2) + ! + if(.not.use_PH_DbGd) then ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) bose_factor=bose_f(PH_E) - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) - EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+bose_factor) - EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*bose_factor - end forall - enddo + one_plus_bose_f=1._SP+bose_factor + else + ! + ! In the double-grid case the bose factor is included in the weights + ! + bose_factor=1._SP + one_plus_bose_f=1._SP + ! + endif + ! + if(iq_bz==1) then + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) + EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_S_W(il,i_beta,i_alpha)*one_plus_bose_f + EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_S_W_PH_abs(il,i_beta,i_alpha)*bose_factor + end forall enddo + endif ! - endif + enddo ! end subroutine ! diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index e81e5afb26..a295cd5921 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -62,8 +62,11 @@ subroutine EXCPH_eval_sat(iq,il,q) BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E(il,i_beta,i_alpha))**2 BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! + if(iq==1) then + write(*,*) 'inside ',i_alpha,i_beta,il EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)/real(q%nbz,SP) EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/real(q%nbz,SP) + endif ! enddo enddo From ba4ad21d45863d4ac05765cc50de93b3ea906ed7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 21 Feb 2022 16:17:06 +0100 Subject: [PATCH 0156/1367] Automatic commit: configure regenerated after merge --- configure | 22 ++++++++++++++++++++++ include/driver/version.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 98f9838c1f..fad3205f8b 100755 --- a/configure +++ b/configure @@ -650,6 +650,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +MOL_check DP_check CUDA_FLAGS def_cuda @@ -826,6 +827,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_mol +enable_mol build_precision def_dp enable_dp @@ -886,6 +889,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_mol enable_time_profile enable_uspp enable_memory_profile @@ -1618,6 +1622,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-mol Molecules build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3067,6 +3072,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for molecules +# Check whether --enable-mol was given. +if test "${enable_mol+set}" = set; then : + enableval=$enable_mol; +fi + +def_mol="" +if test x"$enable_mol" = "x"; then enable_mol="no"; fi +if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi + + # # ============================================================================ # @@ -14725,6 +14743,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +MOL_check="-" +if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14896,6 +14917,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index bb9c8c83b8..98a83ccf4a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21284 -#define YAMBO_HASH "8274339fb" +#define YAMBO_REVISION 21296 +#define YAMBO_HASH "9d9f03e38" From edb99b25900080b17799f18c5e556c92a17a206f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 21 Feb 2022 16:40:19 +0100 Subject: [PATCH 0157/1367] Version 5.1.1, Revision 21297, Hash ba4ad21d4 MODIFIED * include/driver/version.h xc_functionals/XC_libxc_driver.F NEW * (new Bugs: - [yambo] Fixed bug in new Fxc implementation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/xc_functionals/XC_libxc_driver.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 98a83ccf4a..092b4cd8d6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21296 -#define YAMBO_HASH "9d9f03e38" +#define YAMBO_REVISION 21297 +#define YAMBO_HASH "ba4ad21d4" diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index a9036fcaff..29b8f43a45 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -352,7 +352,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if (l_Fxc_from_Vxc.and.ORDER==2) then do ifft=1,fft_size if (abs(spin_rho_DP(1,ifft)) Date: Mon, 21 Feb 2022 16:43:21 +0100 Subject: [PATCH 0158/1367] Version 5.1.1, Revision 21257, Hash e3e9a4d MODIFIED * modified: modified: modified: modified: Bugs: -Fixed bug in excph_gkkp IO Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_X_phass.F | 8 ++--- src/exc-ph/EXCPH_eval_sat.F | 54 ++++++++++++++++------------------ src/exc-ph/EXCPH_gkkp_driver.F | 11 ++++--- 4 files changed, 38 insertions(+), 39 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5d92857d07..ffbf2108ed 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21254 -#define YAMBO_HASH "e065b76" +#define YAMBO_REVISION 21257 +#define YAMBO_HASH "e3e9a4d" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index f39d5e2bdf..e17b5b7051 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -313,14 +313,12 @@ subroutine Eval_Renorm_Factor() ! endif ! - if(iq_bz==1) then - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - forall(i_alpha=EXCPH_states(1):EXCPH_states(2)) + do i_alpha=EXCPH_states(1),EXCPH_states(2) + do i_beta=EXCPH_sum(1),EXCPH_sum(2) EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_S_W(il,i_beta,i_alpha)*one_plus_bose_f EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_S_W_PH_abs(il,i_beta,i_alpha)*bose_factor - end forall + enddo enddo - endif ! enddo ! diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index a295cd5921..9a6725f28d 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -22,53 +22,51 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! ! -subroutine EXCPH_eval_sat(iq,il,q) +subroutine EXCPH_eval_sat(iq,q) ! use pars, ONLY:SP,cZERO,rZERO use R_lattice, ONLY:bz_samp - use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold + use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & & EXCPH_Renorm,EXCPH_Renorm_PH_abs,BS_E,BS_E_in,EXCPH_Gkkp_sq, & & EXCPH_sum,EXCPH_states ! #include ! - integer, intent(in) :: iq,il + integer, intent(in) :: iq type(bz_samp), intent(in) :: q ! ! Work space ! + integer :: i_alpha,i_beta,il,iq_bz real(SP) :: ph_E - integer :: i_start,iq_bz - integer :: i_alpha,i_beta - ! - iq_bz = q%k_table(iq, 1) - ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) - ! - BS_Sat_WEIGHT =rZERO - BS_Sat_WEIGHT_PH_abs=rZERO ! ! Calculate satellites weights and renormalization factors without double-grid ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) + iq_bz = q%k_table(iq, 1) + ! + do il=elph_branches(1),elph_branches(2) + ! + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + if(ph_E1) call EXCPH_load_L(iq,X,'check','Lout') @@ -169,12 +170,14 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! - call EXCPH_eval_sat(iq,il,q) - ! call live_timing(steps=1) ! enddo ! + ! Add the WEIGHTs factor to calculate the renormalization factors + ! + call EXCPH_eval_sat(iq,q) + ! ! Find the maximum weight of the satellites ! do i1=EXCPH_states(1),EXCPH_states(2) From cad4725bf96f2c3b928e1d7a64e6d53c728af5f8 Mon Sep 17 00:00:00 2001 From: attacc Date: Mon, 21 Feb 2022 17:36:28 +0100 Subject: [PATCH 0159/1367] Version 5.1.1, Revision 21258, Hash a31ae2d MODIFIED * modified: modified: modified: modified: Bugs: -Fixed boltzman for degenerate excitons Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 2 ++ src/exc-ph/Satellite_Simple.F | 5 ++++- src/modules/mod_functions.F | 12 ++++++++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ffbf2108ed..d70d3334b3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21257 -#define YAMBO_HASH "e3e9a4d" +#define YAMBO_REVISION 21258 +#define YAMBO_HASH "a31ae2d" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index e17b5b7051..9445dec2be 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -84,9 +84,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') + if(io_err/=0) call error('excph_gkkp databases not found!') ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + if(io_err/=0) call error('gkkp_expanded databases not found!') ! YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index b85bec00e0..b85b2b2094 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -41,7 +41,8 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in, & & min_EXC_E use functions, ONLY:bose_f,boltzman_f - use ELPH, ONLY:PH_freqs_sq + use units, ONLY:HA2CMm1 + use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold ! #include ! @@ -60,6 +61,8 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! Bose function for the phonons ! ph_E=sqrt(abs(PH_freqs_sq(iq,il))) + if(ph_Eepsilon(1.).and.abs(Boltz_Temp)>epsilon(1.)) then + real(SP) :: E_small=0.002/HA2EV ! Threashold for degenerate excitons + real(SP) :: T_small=1._SP/HA2KEL + ! + if(abs(Eb)>E_small.and.abs(Boltz_Temp)>T_small) then boltzman_f=exp(-Eb/Boltz_Temp) ! Normal case - elseif(abs(Eb)>epsilon(1.).and.abs(Boltz_Temp)<=epsilon(1.)) then + elseif(abs(Eb)>E_small.and.abs(Boltz_Temp)<=T_small) then boltzman_f=0._SP ! Case E>0 but T=0 - elseif(abs(Eb)0 T->0 - elseif(abs(Eb)epsilon(1.)) then + elseif(abs(Eb)T_small) then boltzman_f=1._SP ! Case E=0 T->0 endif ! From 070ce56e24c61b57df04068a899f2accf5e6d087 Mon Sep 17 00:00:00 2001 From: attacc Date: Mon, 21 Feb 2022 17:59:23 +0100 Subject: [PATCH 0160/1367] Version 5.1.1, Revision 21259, Hash cad4725 MODIFIED * modified: modified: Bugs: -Better condition for small phonon energies Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d70d3334b3..8d85756b25 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21258 -#define YAMBO_HASH "a31ae2d" +#define YAMBO_REVISION 21259 +#define YAMBO_HASH "cad4725" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 9445dec2be..005446ab46 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -40,7 +40,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use frequency, ONLY:w_samp use vec_operate, ONLY:c2a use pars, ONLY:SP,cZERO,rZERO,schlen - use units, ONLY:HA2EV + use units, ONLY:HA2EV,HA2CMm1 use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,BS_Sat_W_DG,& @@ -79,6 +79,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) min_EXC_E=minval(BS_all_E(1,:)) ! call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) + call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') ! ! Load the Exciton-phonon elements and phonon energies ! @@ -303,9 +304,13 @@ subroutine Eval_Renorm_Factor() do il=elph_branches(1),elph_branches(2) ! if(.not.use_PH_DbGd) then + ! ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + if(ph_E Date: Mon, 21 Feb 2022 23:26:39 +0100 Subject: [PATCH 0161/1367] Version 5.1.1, Revision 21260, Hash 070ce56e2 MODIFIED * driver/yambo.F exc-ph/.objects NEW * exc-ph/EXCPH_lifetime.F Additions: -Added new subroutine for lifetime Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 3 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_lifetime.F | 111 ++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 src/exc-ph/EXCPH_lifetime.F diff --git a/driver/yambo.F b/driver/yambo.F index 613d02331b..27e9f106ab 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -244,8 +244,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) ! driver_now=l_EXCPH_lifetime - if(driver_now) call error("Not implemented yet") - ! + if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind)) #endif ! ! diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 555a70ddb9..0e6fb2f707 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o \ +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F new file mode 100644 index 0000000000..a4fefb372d --- /dev/null +++ b/src/exc-ph/EXCPH_lifetime.F @@ -0,0 +1,111 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate exciton non-radiative life-time induced by phonon-scattering +!! +subroutine EXCPH_lifetime(E,k,q,X) + ! + use units, ONLY:HA2EV + use pars, ONLY:SP,cZERO,rZERO,schlen,pi + use electrons, ONLY:levels,n_sp_pol,spin_occ + use R_lattice, ONLY:bz_samp + use parser_m, ONLY:parser + use com, ONLY:msg,of_open_close + use BS_Solvers, ONLY:BSS_n_eig + use X_m, ONLY:X_t + use IO_int, ONLY:io_control + use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in + use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches + ! +#include + ! + type(levels) ::E + type(bz_samp) ::k,q + type(X_t) ::X + ! + ! Work space + ! + integer, external :: io_Double_Grid + integer :: io_err,iq,ID_DG + ! + call section('*','EXCPH-LifTime') + ! + ! Load excitonic energies + ! + call EXCPH_load_L(1,X,'check','Lout') + ! + ! Allocations + ! + YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) + YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) + ! + ! Load excitonic energies + ! + call EXCPH_load_L(1,X,'eigenvalues','Lin') + BS_E_in(:)=BS_E(:) ! L_in can be different from L_out + ! + do iq=1,q%nibz + call EXCPH_load_L(iq,X,'eigenvalues','Lout') + BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + enddo + ! + ! Turn on double-grid if presents + ! + ! Fill the PH_freqs array + ! This structure will contains the phonon frequencies and the + ! double-grid phonon frequencies calculated with matdyn.x + ! + PH_freqs%nk=q%nibz + PH_freqs%nb=ph_modes + YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) + ! + ! Check if double-grid is present and use it + ! load the double-grid phonon energies in PH_freqs + ! + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) + io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') + ! + if(io_err==0) then + ! + use_PH_DbGd=.TRUE. + call msg('sr','Using PH-double-grid ') + ! + endif + ! + ! Deallocations + ! + call Free_EXCPH() + ! + contains + ! + subroutine FREE_EXCPH() + implicit none + ! + YAMBO_FREE(BS_E) + YAMBO_FREE(BS_all_E) + ! + end subroutine FREE_EXCPH + ! +end subroutine From ccfb9145760e65a30a4cf43175749f3dfed71495 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 21 Feb 2022 23:32:22 +0100 Subject: [PATCH 0162/1367] Version 5.1.1, Revision 21261, Hash 5fee240ce MODIFIED * include/driver/version.h interface/INIT_activate.F Bugs: - Additions: -Life Time flags Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8d85756b25..948a90a211 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21259 -#define YAMBO_HASH "cad4725" +#define YAMBO_REVISION 21260 +#define YAMBO_HASH "070ce56e2" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 58d3d78e4d..177a562a3c 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,9 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_optics) call initactivate(1,'BoseTemp EXCTemp PlotLum DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') + if (l_EXCPH_lifeT.or.l_EXCPH_optics) call initactivate(1,'BoseTemp DiagExcph') + if (l_EXCPH_optics) call initactivate(1,'EXCTemp PlotLum DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') +! if (l_EXCPH_lifeT) call initactivate(1,'BoseTemp EXCTemp PlotLum DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') ! #endif ! From 443e77a13b66786fa39810021cbdac14128403c6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 21 Feb 2022 23:44:29 +0100 Subject: [PATCH 0163/1367] Version 5.1.1, Revision 21262, Hash ccfb91457 MODIFIED * include/driver/version.h interface/INIT_activate.F interface/INIT_read_command_line.F Additions: -Added life-times Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 9 ++++----- src/interface/INIT_read_command_line.F | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 948a90a211..0bd66a65af 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21260 -#define YAMBO_HASH "070ce56e2" +#define YAMBO_REVISION 21261 +#define YAMBO_HASH "5fee240ce" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 177a562a3c..e1874b0883 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -32,7 +32,7 @@ subroutine INIT_activate() & l_real_time,l_ppa,l_lrc_fxc,l_gw0,l_elel_corr,l_elel_scatt,l_elph_corr,l_td_sex,& & l_elph_Hamiltonian,l_elph_scatt,l_elphoton_corr,l_elphoton_scatt,l_em1d,l_eval_collisions,& & l_sc_magnetic,l_sc_electric,l_dipoles,l_pf_fxc,l_nl_optics,l_phel_corr,l_nl_p_and_p, & -& l_EXCPH_gkkp,l_EXCPH_optics +& l_EXCPH_gkkp,l_EXCPH_optics,l_EXCPH_lifetime #if defined _SC || defined _RT use hamiltonian, ONLY:H_potential #endif @@ -456,10 +456,9 @@ subroutine INIT_activate() ! ! Exciton-phonon Self-energy ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifeT.or.l_EXCPH_optics) call initactivate(1,'BoseTemp DiagExcph') - if (l_EXCPH_optics) call initactivate(1,'EXCTemp PlotLum DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') -! if (l_EXCPH_lifeT) call initactivate(1,'BoseTemp EXCTemp PlotLum DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp DiagExcph DmRngeXd') + if (l_EXCPH_optics) call initactivate(1,'BoseTemp EXCTemp PlotLum DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') ! #endif ! diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index 3ea6755140..be5b1a0bc3 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -24,8 +24,8 @@ subroutine INIT_read_command_line(rstr,init_) ! use pars, ONLY:schlen - use drivers, ONLY:infile_editing,l_bse,l_alda_fxc,l_chi,l_elel_corr,l_nl_p_and_p,l_EXCPH_lifetime,l_EXCPH_optics,& -& l_elel_scatt,l_elph_corr,l_elph_scatt,l_elphoton_corr,l_EXCPH_gkkp,& + use drivers, ONLY:infile_editing,l_bse,l_alda_fxc,l_chi,l_elel_corr,l_nl_p_and_p,& +& l_elel_scatt,l_elph_corr,l_elph_scatt,l_elphoton_corr,& & l_elphoton_scatt,l_em1s,l_em1d,l_ppa,l_phel_scatt,l_phel_corr,l_dipoles use BS, ONLY:BSK_mode use BS_solvers, ONLY:BSS_mode From 37dba1206ee484c5574fa7a321c34a0e2fc6e245 Mon Sep 17 00:00:00 2001 From: attacc Date: Tue, 22 Feb 2022 10:09:04 +0100 Subject: [PATCH 0164/1367] Version 5.1.1, Revision 21263, Hash 443e77a MODIFIED * modified: modified: Bugs: -Fixed INTERP_OBJ initialization Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0bd66a65af..588f09fced 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21261 -#define YAMBO_HASH "5fee240ce" +#define YAMBO_REVISION 21263 +#define YAMBO_HASH "443e77a" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 005446ab46..b835f6c97c 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -100,6 +100,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) INTERPOLATE_is_serial=.TRUE. INTERPOLATE_is_quiet =.TRUE. INTERP_shell_factor =E_kpq_sh_fact + ID_EXC_obj=1 call INTERPOLATION_BZ_setup(q) INTERP_obj(ID_E_kpq_obj)%what="EXC_E(k+q)" call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_EXC,ID_obj=ID_EXC_obj) From c879a9b9ed852e1aba419b7b1b52be6a901d186f Mon Sep 17 00:00:00 2001 From: attacc Date: Tue, 22 Feb 2022 10:14:11 +0100 Subject: [PATCH 0165/1367] Version 5.1.1, Revision 21264, Hash 37dba12 MODIFIED * modified: modified: Bugs: -Fixed ID_EXC index Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 588f09fced..d708d24559 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21263 -#define YAMBO_HASH "443e77a" +#define YAMBO_REVISION 21264 +#define YAMBO_HASH "37dba12" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index b835f6c97c..24b30b429e 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -68,7 +68,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) real(SP) :: min_E,exc_E,E_alpha,bose_factor,PH_E,v(3) type(bz_samp) :: q_DbGd integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: ID_E_kpq,ID_E_kpq_obj,ID_DG,min_pos_E_DbGd(1) + integer :: ID_DG,min_pos_E_DbGd(1) integer, external :: io_EXCPH_gkkp,io_ELPH character(schlen) :: q_point logical :: l_DbGd_Sigma_Only @@ -101,8 +101,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) INTERPOLATE_is_quiet =.TRUE. INTERP_shell_factor =E_kpq_sh_fact ID_EXC_obj=1 + ID_EXC =1 call INTERPOLATION_BZ_setup(q) - INTERP_obj(ID_E_kpq_obj)%what="EXC_E(k+q)" + INTERP_obj(ID_EXC_obj)%what="EXC_E(k+q)" call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_EXC,ID_obj=ID_EXC_obj) ! call bz_samp_reset(q_DbGd) @@ -111,7 +112,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) q_DbGd%pt=q%FGbz%pt ! YAMBO_ALLOC(EXC_E_DbGd,(EXCPH_states(2),q%FGbz%N)) - call INTERPOLATION_BZ(K=q_DbGd,NK=q%FGbz%N,ID=ID_E_kpq,R1D=EXC_E_DbGd) + call INTERPOLATION_BZ(K=q_DbGd,NK=q%FGbz%N,ID=ID_EXC,R1D=EXC_E_DbGd) ! min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) From 25c1c447e0851aef4e1b5bb171878897af4860f5 Mon Sep 17 00:00:00 2001 From: attacc Date: Tue, 22 Feb 2022 10:38:30 +0100 Subject: [PATCH 0166/1367] Version 5.1.1, Revision 21265, Hash c879a9b MODIFIED * modified: modified: modified: Bugs: -Fixing bugs Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 10 +++++----- src/io/io_ELPH.F | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d708d24559..f6e2ab1a69 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21264 -#define YAMBO_HASH "37dba12" +#define YAMBO_REVISION 21265 +#define YAMBO_HASH "c879a9b" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 24b30b429e..392d06f259 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -83,11 +83,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Load the Exciton-phonon elements and phonon energies ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') if(io_err/=0) call error('excph_gkkp databases not found!') ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! @@ -120,7 +120,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call msg('rs','Minimum excitonic energy with DbGrid: ',min_EXC_E_DbGd*HA2EV,' eV') write(q_point,'(3f12.6,a)') v(:),' [rlu] ' call msg('rs','Minimum q-point in the DbGrid : '//q_point) - ! + ! endif ! ! The satellites @@ -134,10 +134,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! do iq_bz=1,q%nbz ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_gkkp) + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! ! Add the contribution of q-point transition to the renormalization factors diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index 111e574f71..f4f2fddd93 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -199,6 +199,7 @@ integer function io_ELPH(ID,what) ! Allocation ! if (read_is_on(ID)) then + write(*,*) 'passo qui ',l_no_matrix_elements,iq if (.not.l_no_matrix_elements) then call ELPH_alloc("LEVELS dV DW",GKKP=GKKP) if (l_GKKP_hosts_bare_dV) call ELPH_alloc("dV_bare",GKKP=GKKP_bare) From b69149e26f5fea0532a68140d7b498f98dabc184 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 22 Feb 2022 12:59:39 +0100 Subject: [PATCH 0167/1367] Version 5.1.1, Revision 21266, Hash 25c1c447e MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F interface/INIT_activate.F interface/INIT_load.F io/io_ELPH.F Bugs: - Additions: -Removed plotlum flag Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_X_phass.F | 59 +++++++++++++++++++++++++---------- src/exc-ph/EXCPH_optics.F | 2 ++ src/exc-ph/Satellite_DbGrid.F | 5 +-- src/exc-ph/Satellite_Simple.F | 44 +++++++++++++++++++------- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 - src/io/io_ELPH.F | 1 - 8 files changed, 81 insertions(+), 37 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f6e2ab1a69..52b612278f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21265 -#define YAMBO_HASH "c879a9b" +#define YAMBO_REVISION 21266 +#define YAMBO_HASH "25c1c447e" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 392d06f259..3b25b3c8c5 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -58,17 +58,17 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! #include ! - type(w_samp), intent(in) :: wv type(bz_samp), intent(in) :: q + type(w_samp), intent(in) :: wv complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs,2) ! ! Work space ! complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E,E_alpha,bose_factor,PH_E,v(3) + real(SP) :: min_E,exc_E,E_alpha,PH_E,v(3) type(bz_samp) :: q_DbGd integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: ID_DG,min_pos_E_DbGd(1) + integer :: min_pos_E_DbGd(1) integer, external :: io_EXCPH_gkkp,io_ELPH character(schlen) :: q_point logical :: l_DbGd_Sigma_Only @@ -104,20 +104,20 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ID_EXC =1 call INTERPOLATION_BZ_setup(q) INTERP_obj(ID_EXC_obj)%what="EXC_E(k+q)" - call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,ID=ID_EXC,ID_obj=ID_EXC_obj) + call INTERPOLATION_coefficients(R1D=BS_all_E(:EXCPH_sum(2),:),k=q,NK=q%nibz,ID=ID_EXC,ID_obj=ID_EXC_obj) ! call bz_samp_reset(q_DbGd) q_DbGd%nibz=q%FGbz%N YAMBO_ALLOC(q_DbGd%pt,(q_DbGd%nibz,3)) q_DbGd%pt=q%FGbz%pt ! - YAMBO_ALLOC(EXC_E_DbGd,(EXCPH_states(2),q%FGbz%N)) - call INTERPOLATION_BZ(K=q_DbGd,NK=q%FGbz%N,ID=ID_EXC,R1D=EXC_E_DbGd) + YAMBO_ALLOC(EXC_E_DbGd,(EXCPH_sum(2),q_DbGd%nibz)) + call INTERPOLATION_BZ(K=q_DbGd,NK=q_DbGd%nibz,ID=ID_EXC,R1D=EXC_E_DbGd) ! min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) call c2a(v_in=q_DbGd%pt(min_pos_E_DbGd,:),v_out=v,mode="ki2a") - call msg('rs','Minimum excitonic energy with DbGrid: ',min_EXC_E_DbGd*HA2EV,' eV') + call msg('rs','Minimum exctonic energy with DbGd: ',min_EXC_E_DbGd*HA2EV,'eV') write(q_point,'(3f12.6,a)') v(:),' [rlu] ' call msg('rs','Minimum q-point in the DbGrid : '//q_point) ! @@ -166,11 +166,17 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do il=elph_branches(1),elph_branches(2) ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + ! Calcualte the Satellite on the course q-grid + ! + call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) ! if(use_PH_DbGd) then + ! + ! Add all q-point of the fine grid + ! call Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) - else - call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) + ! endif ! enddo @@ -202,6 +208,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! The term without satellites ! + min_E=min_EXC_E + if(use_PH_DbGd) min_E=min_EXC_E_DbGd + ! do iw=1,wv%n_freqs ! W=wv%p(iw) @@ -214,7 +223,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! The pole of luminescence should be the pole of BS_E_in ! but I think this is not consistent with the Boltzman weight, I use always Lout. Point to be discussed ! - exc_E=BS_all_E(i_alpha,1)-min_EXC_E + exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) @@ -238,6 +247,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! subroutine Eval_Sat_Weights_DbGd() use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs + use ELPH, ONLY:PH_freqs_sq implicit none ! real(SP) :: E_beta,weight_dbg,W_det,W_PH_abs_det,bose_factor @@ -261,18 +271,33 @@ subroutine Eval_Sat_Weights_DbGd() ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid - bose_factor=bose_f(PH_E) + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! + ! the first point correspond to the point in the course grid + ! + ph_E =sqrt(abs(PH_freqs_sq(iq_bz,il))) + ! + ! if iq==1 + ! I read ph-energies calculated with matdyn.x + ! that includes the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + ! + else + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + endif ! + bose_factor=bose_f(PH_E) + ! ! Excitonic energies in the double-grid ! E_beta =EXC_E_DbGd(i_beta,iq_fg) ! - if(abs(E_beta-BS_E_in(i_alpha)+ph_E)>FAN_deltaE_treshold) & -& W_det=W_det+(bose_factor+1._SP)/abs(E_beta-BS_E_in(i_alpha)+ph_E)**2 - if(abs(E_beta-BS_E_in(i_alpha)-ph_E)>FAN_deltaE_treshold) & - W_PH_abs_det=W_PH_abs_det+bose_factor/abs(E_beta-BS_E_in(i_alpha)-ph_E)**2 + if(ph_E ! @@ -52,15 +53,36 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Work Space ! - real(SP) :: PH_E,bose_factor,E_alpha,boltzm_factor - complex(SP) :: pole - ! + real(SP) :: PH_E,bose_factor,boltzm_factor + complex(SP) :: pole,E_alpha + real(SP), pointer :: BS_S_W(:,:,:),BS_S_W_PH_abs(:,:,:) + real(SP) :: min_E + ! + if(use_PH_DbGd) then + BS_S_W =>BS_Sat_W_DG + BS_S_W_PH_abs=>BS_Sat_W_DG_PH_abs + min_E =min_EXC_E_DbGd + else + BS_S_W =>BS_Sat_WEIGHT + BS_S_W_PH_abs=>BS_Sat_WEIGHT_PH_abs + min_E =min_EXC_E + endif + ! Sat_absorption=cZERO Sat_emission =cZERO ! ! Bose function for the phonons ! - ph_E=sqrt(abs(PH_freqs_sq(iq,il))) + if(use_PH_DbGd.and.iq==1) then + ! + ! Use the phonon-energies calculated with matdyn.x that include + ! LO-TO splitting and acustic sum rule + ! + ph_E=PH_freqs%E(iq,il,1) + else + ph_E=sqrt(abs(PH_freqs_sq(iq,il))) + endif + ! if(ph_E Date: Tue, 22 Feb 2022 14:50:49 +0100 Subject: [PATCH 0168/1367] Version 5.1.1, Revision 21267, Hash b69149e26 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/Satellite_DbGrid.F Bugs: -Fixed bug in DbGd weights Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 8 ++++---- src/exc-ph/Satellite_DbGrid.F | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 52b612278f..66c188e6f9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21266 -#define YAMBO_HASH "25c1c447e" +#define YAMBO_REVISION 21267 +#define YAMBO_HASH "b69149e26" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 3b25b3c8c5..6d2ec97e8c 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -253,8 +253,8 @@ subroutine Eval_Sat_Weights_DbGd() real(SP) :: E_beta,weight_dbg,W_det,W_PH_abs_det,bose_factor integer :: iE_fg,iq_fg,nq_around ! - nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz - weight_dbg=1._SP/real(nq_around,SP) ! Total weight of the Db-grid points including the iq_bz + nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1) ! Number of fine q-points around iq_bz + weight_dbg=1._SP/real(nq_around+1._SP,SP) ! Total weight of the Db-grid points including the iq_bz ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! @@ -301,8 +301,8 @@ subroutine Eval_Sat_Weights_DbGd() ! enddo ! - W_det =W_det/weight_dbg - W_PH_abs_det=W_PH_abs_det/weight_dbg + W_det =W_det*weight_dbg + W_PH_abs_det=W_PH_abs_det*weight_dbg ! BS_Sat_W_DG(il,i_beta,i_alpha) =BS_Sat_WEIGHT(il,i_beta,i_alpha) & & *abs(BS_Sat_E(il,i_beta,i_alpha))**2*W_det diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index d29b23e0fa..a69a60db11 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -57,8 +57,8 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss integer :: nq_around,iq_fg,iE_fg complex(SP) :: pole ! - nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz - weight_dbg=1._SP/real(nq_around,SP) ! Total weight of the Db-grid points including the iq_bz + nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1) ! Number of fine q-points around iq_bz + weight_dbg=1._SP/real(nq_around+1._SP,SP) ! Total weight of the Db-grid points including the iq_bz ! E_alpha =BS_E_in(i_alpha) ! @@ -108,7 +108,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! ! Average on the q%FGbz points around iq_bz ! - Sat_emission =Sat_emission/weight_dbg - Sat_absorption=Sat_absorption/weight_dbg + Sat_emission =Sat_emission*weight_dbg + Sat_absorption=Sat_absorption*weight_dbg ! end subroutine Satellite_DbGrid From 21235ad817d1b1ccc3e88998b3a3cd967fcb70e9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 22 Feb 2022 14:55:04 +0100 Subject: [PATCH 0169/1367] Version 5.1.1, Revision 21268, Hash 6f38835ed MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -Fixed bug in exciton-phonon satellites Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 66c188e6f9..a92f784ce4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21267 -#define YAMBO_HASH "b69149e26" +#define YAMBO_REVISION 21268 +#define YAMBO_HASH "6f38835ed" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 6d2ec97e8c..5baf039730 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -179,15 +179,15 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! endif ! + ! Add the satellites to the dielectric constant and luminescence + ! + Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs *BS_R(i_alpha) + PL_ii(iw,1) =PL_ii(iw,1) +Sat_alpha_emiss*BS_R(i_alpha) + ! enddo ! enddo ! - ! Add the satellites to the dielectric constant and luminescence - ! - Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs *BS_R(i_alpha) - PL_ii(iw,1) =PL_ii(iw,1) +Sat_alpha_emiss*BS_R(i_alpha) - ! enddo ! enddo From 94e15f6a41e08005eeb8fd4708187c21430a990b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 22 Feb 2022 18:04:12 +0100 Subject: [PATCH 0170/1367] Version 5.1.1, Revision 21298, Hash edb99b259 MODIFIED * include/driver/version.h lib/yambo bse/K_kernel.F Bugs: - [yambo] workaround for small bug (section name becomes too long) Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- lib/yambo | 2 +- src/bse/K_kernel.F | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 092b4cd8d6..18e944271e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21297 -#define YAMBO_HASH "ba4ad21d4" +#define YAMBO_REVISION 21298 +#define YAMBO_HASH "edb99b259" diff --git a/lib/yambo b/lib/yambo index 5d74d64757..33fa12b140 160000 --- a/lib/yambo +++ b/lib/yambo @@ -1 +1 @@ -Subproject commit 5d74d64757dbad577a3e30d0617461c83f8f80ac +Subproject commit 33fa12b140d04e7e8037217d92ba061f3bb36768 diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 3613c305ef..9b82118242 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -152,9 +152,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (BS_res_K_corr.or.BS_res_K_exchange) section_title=trim(section_title)//")" ! if (BS_cpl_K_corr.or.BS_cpl_K_exchange) section_title=trim(section_title)//" (Coupling" - if (BS_K_is_ALDA.and.BS_cpl_K_exchange) section_title=trim(section_title)//" ALDA" - if (BS_cpl_K_corr ) section_title=trim(section_title)//" CORRRELATION" - if (BS_cpl_K_exchange) section_title=trim(section_title)//" EXCHANGE" + !if (BS_K_is_ALDA.and.BS_cpl_K_exchange) section_title=trim(section_title)//" ALDA" + !if (BS_cpl_K_corr ) section_title=trim(section_title)//" CORRRELATION" + !if (BS_cpl_K_exchange) section_title=trim(section_title)//" EXCHANGE" if (BS_cpl_K_corr.or.BS_cpl_K_exchange) section_title=trim(section_title)//")" ! endif From 1f044dbf9fef3a660b51f59b01af2e8f5f70b338 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 22 Feb 2022 20:52:38 +0100 Subject: [PATCH 0171/1367] Version 5.1.1, Revision 21269, Hash 21235ad81 MODIFIED * exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F modules/mod_EXCPH.F Bugs: -Rewritten double-grid to be checked Additions: - Changes: - Patch sent by: Claudio Attaccalite --- src/exc-ph/EXCPH_X_phass.F | 102 ++++++++++++++++++---------------- src/exc-ph/EXCPH_optics.F | 9 +-- src/exc-ph/Satellite_DbGrid.F | 29 +++++----- src/exc-ph/Satellite_Simple.F | 4 +- src/modules/mod_EXCPH.F | 4 +- 5 files changed, 78 insertions(+), 70 deletions(-) diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 5baf039730..66d8b178b4 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -72,6 +72,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer, external :: io_EXCPH_gkkp,io_ELPH character(schlen) :: q_point logical :: l_DbGd_Sigma_Only + integer :: iq_fg,iq_idx ! call parser('DBGSigmaOnly',l_DbGd_Sigma_Only) ! @@ -146,8 +147,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) if(use_PH_DbGd.and..not.l_DbGd_Sigma_Only) then call Eval_Sat_Weights_DbGd() else - BS_Sat_W_DG =BS_Sat_WEIGHT - BS_Sat_W_DG_PH_abs=BS_Sat_WEIGHT_PH_abs + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 + BS_Sat_W_DG(:,:,:,iq_idx)=BS_Sat_WEIGHT + BS_Sat_W_DG_PH_abs(:,:,:,iq_idx)=BS_Sat_WEIGHT_PH_abs + enddo endif ! call Eval_Renorm_Factor() @@ -250,11 +254,11 @@ subroutine Eval_Sat_Weights_DbGd() use ELPH, ONLY:PH_freqs_sq implicit none ! - real(SP) :: E_beta,weight_dbg,W_det,W_PH_abs_det,bose_factor - integer :: iE_fg,iq_fg,nq_around + real(SP) :: E_beta,bose_factor,EXC_gkkp_sq + integer :: iE_fg,iq_fg,iq_idx ! - nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1) ! Number of fine q-points around iq_bz - weight_dbg=1._SP/real(nq_around+1._SP,SP) ! Total weight of the Db-grid points including the iq_bz + BS_Sat_W_DG =rZERO + BS_Sat_W_DG_PH_abs=rZERO ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! @@ -264,18 +268,19 @@ subroutine Eval_Sat_Weights_DbGd() ! do il=elph_branches(1),elph_branches(2) ! - W_det =rZERO - W_PH_abs_det=rZERO - ! - ! Sum on the double-grid + ! calculate for all point of the double-grid + ! + EXC_gkkp_sq=BS_Sat_WEIGHT(il,i_beta,i_alpha)*abs(BS_Sat_E(il,i_beta,i_alpha)) ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 ! if(iq_fg==q%FGbz%k_range(iq_bz,1)) then ! ! the first point correspond to the point in the course grid ! - ph_E =sqrt(abs(PH_freqs_sq(iq_bz,il))) + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) ! ! if iq==1 ! I read ph-energies calculated with matdyn.x @@ -296,65 +301,68 @@ subroutine Eval_Sat_Weights_DbGd() ! if(ph_EBS_Sat_W_DG - BS_S_W_PH_abs=>BS_Sat_W_DG_PH_abs - else - BS_S_W =>BS_Sat_WEIGHT - BS_S_W_PH_abs=>BS_Sat_WEIGHT_PH_abs - endif ! - do il=elph_branches(1),elph_branches(2) + integer :: iq_idx,iq_fg,nq_around + real(SP) :: N_bose,weight_dbgd + ! + if(.not.use_PH_DbGd) then ! - if(.not.use_PH_DbGd) then + do il=elph_branches(1),elph_branches(2) ! ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ! if(ph_EBS_Sat_W_DG - BS_S_W_PH_abs=>BS_Sat_W_DG_PH_abs + BS_S_W =>BS_Sat_W_DG(:,:,:,1) + BS_S_W_PH_abs=>BS_Sat_W_DG_PH_abs(:,:,:,1) min_E =min_EXC_E_DbGd else BS_S_W =>BS_Sat_WEIGHT diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index a2463cbbbc..e6643074ac 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -84,8 +84,8 @@ module EXCPH integer :: ID_EXC,ID_EXC_obj real(SP) :: min_EXC_E_DbGd real(SP), allocatable :: EXC_E_DbGd(:,:) - real(SP), target, allocatable :: BS_Sat_W_DG(:,:,:) - real(SP), target, allocatable :: BS_Sat_W_DG_PH_abs(:,:,:) + real(SP), target, allocatable :: BS_Sat_W_DG(:,:,:,:) + real(SP), target, allocatable :: BS_Sat_W_DG_PH_abs(:,:,:,:) ! contains ! From 4d249bddc5dbfff491a7ca2dce8069331e2ef139 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 22 Feb 2022 21:29:14 +0100 Subject: [PATCH 0172/1367] Just expanded some comments --- src/exc-ph/Satellite_Simple.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index 77a2c727e7..f733368cbb 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -95,21 +95,21 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! pole=E_alpha+BS_Sat_E(il,i_beta,i_alpha) ! - ! Phonon emission in absorption + ! Phonon emission in absorption [photon absorption / phonon emission] ! Sat_absorption=Sat_absorption+BS_S_W(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor) ! - ! Phonon emission in luminescence + ! Phonon absorption in luminescence [photon emission / phonon absorption] ! Sat_emission=Sat_emission+BS_S_W(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor ! pole=E_alpha+BS_Sat_E_PH_abs(il,i_beta,i_alpha) ! - ! Phonon absorption in absorption + ! Phonon absorption in absorption [photon absorption / phonon absorption] ! Sat_absorption=Sat_absorption+BS_S_W_PH_abs(il,i_beta,i_alpha)/(W-pole)*bose_factor ! - ! Phonon absorption in luminescence + ! Phonon emission in luminescence [photon emission / phonon emission] ! Sat_emission=Sat_emission+BS_S_W_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! From d5ee686bf11de87378ba7a1b80bc1ea22bd685ab Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 22 Feb 2022 23:06:47 +0100 Subject: [PATCH 0173/1367] Version 5.1.1, Revision 21270, Hash 1f044dbf9 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F Changes: -Rewritten the double-grid according to the notes Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_X_phass.F | 44 ++++++++++++++------ src/exc-ph/Satellite_DbGrid.F | 78 +++++++++++++++++++++++++++++++---- src/exc-ph/Satellite_Simple.F | 38 ++++------------- 4 files changed, 112 insertions(+), 52 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a92f784ce4..6fa3e1560a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21268 -#define YAMBO_HASH "6f38835ed" +#define YAMBO_REVISION 21269 +#define YAMBO_HASH "21235ad81" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 66d8b178b4..20f370b7a1 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -164,20 +164,19 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Satellites for the alpha exciton ! - Sat_alpha_abs =cZERO - Sat_alpha_emiss=cZERO - ! do il=elph_branches(1),elph_branches(2) ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! - ! Calcualte the Satellite on the course q-grid - ! - call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) - ! - if(use_PH_DbGd) then + if(.not.use_PH_DbGd) then ! - ! Add all q-point of the fine grid + ! Calcualte the Satellite on the course q-grid + ! + call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) + ! + else + ! + ! Use the double-grid to average denominators ! call Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) ! @@ -316,7 +315,7 @@ subroutine Eval_Renorm_Factor() use ELPH, ONLY:elph_branches,PH_freqs_sq implicit none ! - integer :: iq_idx,iq_fg,nq_around + integer :: iq_idx,iq_fg,iE_fg,nq_around real(SP) :: N_bose,weight_dbgd ! if(.not.use_PH_DbGd) then @@ -348,13 +347,34 @@ subroutine Eval_Renorm_Factor() weight_dbgd=1._SP/real(nq_around+1._SP,SP) ! Total weight of the DbGd including the iq_bz ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! + ! the first point correspond to the point in the course grid + ! + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ! + ! if iq==1 + ! I read ph-energies calculated with matdyn.x + ! that includes the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + ! + else + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + endif ! iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 ! + if(ph_E @@ -52,7 +52,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! ! Work Space ! - real(SP) :: PH_E,E_alpha,boltzm_factor,weight_dbgd,E_beta + real(SP) :: PH_E,E_alpha,boltzm_factor,weight_dbgd,E_beta,BS_ave_W,BS_ave_W_PH_abs,bose_factor complex(SP) :: BS_Sat_E_DbGd,BS_Sat_E_DbGd_PH_abs integer :: nq_around,iq_fg,iE_fg,iq_idx complex(SP) :: pole @@ -60,13 +60,73 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1) ! Number of fine q-points around iq_bz weight_dbgd=1._SP/real(nq_around+1._SP,SP) ! Total weight of the Db-grid points including the iq_bz ! + ! Calculate the Satellite Weight + ! + BS_ave_W=rZERO + BS_ave_W_PH_abs=rZERO + ! + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! + ! the first point correspond to the point in the course grid + ! + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ! + ! if iq==1 + ! I read ph-energies calculated with matdyn.x + ! that includes the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + else + ! + ! Double-grid energies + ! + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ! + endif + ! + iq_idx =iq_fg-q%FGbz%k_range(iq_bz,1)+1 + ! + BS_ave_W =BS_ave_W+BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) + BS_ave_W_PH_abs=BS_ave_W_PH_abs+BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx) + ! + enddo + ! + BS_ave_W =BS_ave_W*weight_dbgd + BS_ave_W_PH_abs=BS_ave_W_PH_abs*weight_dbgd + ! + Sat_absorption=cZERO + Sat_emission =cZERO + ! E_alpha =BS_E_in(i_alpha) ! do iq_fg=q%FGbz%k_range(iq_bz,1)+1,q%FGbz%k_range(iq_bz,2),1 ! - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid - iq_idx =iq_fg-q%FGbz%k_range(iq_bz,1)+1 + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! + ! the first point correspond to the point in the course grid + ! + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ! + ! if iq==1 + ! I read ph-energies calculated with matdyn.x + ! that includes the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + else + ! + ! Double-grid energies + ! + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ! + endif + ! + if(ph_E ! @@ -55,33 +55,13 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! real(SP) :: PH_E,bose_factor,boltzm_factor complex(SP) :: pole,E_alpha - real(SP), pointer :: BS_S_W(:,:,:),BS_S_W_PH_abs(:,:,:) - real(SP) :: min_E - ! - if(use_PH_DbGd) then - BS_S_W =>BS_Sat_W_DG(:,:,:,1) - BS_S_W_PH_abs=>BS_Sat_W_DG_PH_abs(:,:,:,1) - min_E =min_EXC_E_DbGd - else - BS_S_W =>BS_Sat_WEIGHT - BS_S_W_PH_abs=>BS_Sat_WEIGHT_PH_abs - min_E =min_EXC_E - endif - ! + ! Sat_absorption=cZERO Sat_emission =cZERO ! ! Bose function for the phonons ! - if(use_PH_DbGd.and.iq==1) then - ! - ! Use the phonon-energies calculated with matdyn.x that include - ! LO-TO splitting and acustic sum rule - ! - ph_E=PH_freqs%E(iq,il,1) - else - ph_E=sqrt(abs(PH_freqs_sq(iq,il))) - endif + ph_E=sqrt(abs(PH_freqs_sq(iq,il))) ! if(ph_E Date: Tue, 22 Feb 2022 23:26:38 +0100 Subject: [PATCH 0174/1367] Automatic commit: configure regenerated after merge From 6749b44479d3f2ef8bb9b7c9c2bb2b200301e77c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 10:03:20 +0100 Subject: [PATCH 0175/1367] More stuff Version 5.1.1, Revision 21275, Hash 9653cef6d MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_gkkp_driver.F exc-ph/Satellite_DbGrid.F NEW * exc-ph/get_ph_E_DbGd.F Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_X_phass.F | 62 ++++++++++------------------- src/exc-ph/EXCPH_gkkp_driver.F | 2 +- src/exc-ph/Satellite_DbGrid.F | 52 ++++++------------------- src/exc-ph/get_ph_E_DbGd.F | 71 ++++++++++++++++++++++++++++++++++ 6 files changed, 107 insertions(+), 86 deletions(-) create mode 100644 src/exc-ph/get_ph_E_DbGd.F diff --git a/include/driver/version.h b/include/driver/version.h index 6fa3e1560a..f86352427b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21269 -#define YAMBO_HASH "21235ad81" +#define YAMBO_REVISION 21274 +#define YAMBO_HASH "f343e98d3" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 0e6fb2f707..3a3a0c6791 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o get_ph_E_DbGd.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 20f370b7a1..b4fe53d6c9 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -146,7 +146,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! if(use_PH_DbGd.and..not.l_DbGd_Sigma_Only) then call Eval_Sat_Weights_DbGd() - else + elseif(use_PH_DbGd.and.l_DbGd_Sigma_Only) then do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 BS_Sat_W_DG(:,:,:,iq_idx)=BS_Sat_WEIGHT @@ -254,7 +254,8 @@ subroutine Eval_Sat_Weights_DbGd() implicit none ! real(SP) :: E_beta,bose_factor,EXC_gkkp_sq - integer :: iE_fg,iq_fg,iq_idx + integer :: iq_fg,iq_idx + real(SP), external :: get_ph_E_DbGd ! BS_Sat_W_DG =rZERO BS_Sat_W_DG_PH_abs=rZERO @@ -273,24 +274,9 @@ subroutine Eval_Sat_Weights_DbGd() ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! - iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 + ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) ! - if(iq_fg==q%FGbz%k_range(iq_bz,1)) then - ! - ! the first point correspond to the point in the course grid - ! - ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) - ! - ! if iq==1 - ! I read ph-energies calculated with matdyn.x - ! that includes the LO-TO splitting and the acustic sum rule - ! - if(iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) - ! - else - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid - endif + iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 ! bose_factor=bose_f(PH_E) ! @@ -300,8 +286,11 @@ subroutine Eval_Sat_Weights_DbGd() ! if(ph_EFAN_deltaE_treshold) & +& BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) =EXC_gkkp_sq/abs(E_beta-E_alpha+ph_E)**2 + ! + if(abs(E_beta-E_alpha-ph_E)>FAN_deltaE_treshold) & +& BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx)=EXC_gkkp_sq/abs(E_beta-E_alpha-ph_E)**2 ! enddo ! @@ -315,8 +304,9 @@ subroutine Eval_Renorm_Factor() use ELPH, ONLY:elph_branches,PH_freqs_sq implicit none ! - integer :: iq_idx,iq_fg,iE_fg,nq_around + integer :: iq_idx,iq_fg,nq_around real(SP) :: N_bose,weight_dbgd + real(SP), external :: get_ph_E_DbGd ! if(.not.use_PH_DbGd) then ! @@ -348,33 +338,21 @@ subroutine Eval_Renorm_Factor() ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! - if(iq_fg==q%FGbz%k_range(iq_bz,1)) then - ! - ! the first point correspond to the point in the course grid - ! - ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) - ! - ! if iq==1 - ! I read ph-energies calculated with matdyn.x - ! that includes the LO-TO splitting and the acustic sum rule - ! - if(iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) - ! - else - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid - endif - ! + ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 ! if(ph_E @brief Return phonon energy in the double-grid +! +! @param[in] q momenutm sampling +! @param[in] il branch index +! @param[in] iq_fg index in the fine grid +! @param[in] iq_bz index in the BZ of the course grid +! +! @param[out] ph_E phonon-energy +! +function get_ph_E_DbGd(il,iq_fg,iq_bz,q) + ! + use pars, ONLY:SP + use R_lattice, ONLY:bz_samp + use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq + ! +#include + ! + integer, intent(in) :: il,iq_bz,iq_fg + type(bz_samp), intent(in) :: q + ! + ! work space + ! + integer :: iE_fg + real(SP) :: get_ph_E_DbGd + ! + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! + ! the first point correspond to the point in the course grid + ! + get_ph_E_DbGd=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ! + ! if iq==1 + ! I read ph-energies calculated with matdyn.x + ! that includes the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) get_ph_E_DbGd=PH_freqs%FG%E(1,il,1) + ! + else + ! + ! Double-grid energies + ! + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + get_ph_E_DbGd =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ! + endif + ! +end function get_ph_E_DbGd + From 3fb19854671a9c3be1468105b875dfaf1d44e2cb Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 10:22:20 +0100 Subject: [PATCH 0176/1367] Version 5.1.1, Revision 21276, Hash 6749b4447 MODIFIED * driver/yambo.F include/driver/version.h exc-ph/EXCPH_lifetime.F Additions: -Fixed call to the lifetime Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 27e9f106ab..fd0d867a4f 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -244,7 +244,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) ! driver_now=l_EXCPH_lifetime - if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind)) + if(driver_now) call EXCPH_lifetime(Ken,Xk,q,X(i_X_kind)) #endif ! ! diff --git a/include/driver/version.h b/include/driver/version.h index f86352427b..a42a0d2cd9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21274 -#define YAMBO_HASH "f343e98d3" +#define YAMBO_REVISION 21275 +#define YAMBO_HASH "9653cef6d" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index a4fefb372d..b1b363828d 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -94,6 +94,8 @@ subroutine EXCPH_lifetime(E,k,q,X) ! endif ! + call error(' This part is not coded yet!!') + ! ! Deallocations ! call Free_EXCPH() From b0b7d5b164bfbb1fa359c2e5ca9056537d3f3a55 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 23 Feb 2022 12:42:54 +0100 Subject: [PATCH 0177/1367] Modified EXCPH renormalisation factors for PL --- src/exc-ph/EXCPH_X_phass.F | 44 +++++++++++++++++++++++++++++--------- src/modules/mod_EXCPH.F | 2 ++ 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index b4fe53d6c9..efe11bdd38 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -45,7 +45,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,BS_Sat_W_DG,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & -& BS_Sat_W_DG_PH_abs +& BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches,PH_freqs,FAN_deltaE_treshold use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& & INTERPOLATE_is_quiet,INTERPOLATION_BZ @@ -94,6 +94,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PL,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PL_PH_abs,(EXCPH_states(2))) ! if(use_PH_DbGd) then ! @@ -126,10 +128,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! The satellites ! - Epsilon_ii =cZERO - PL_ii =cZERO - EXCPH_Renorm =rZERO - EXCPH_Renorm_PH_abs=rZERO + Epsilon_ii =cZERO + PL_ii =cZERO + EXCPH_Renorm =rZERO + EXCPH_Renorm_PH_abs =rZERO + ! Locally defined variable for RS-PL renorm. factor + EXCPH_Renorm_PL =rZERO + EXCPH_Renorm_PL_PH_abs=rZERO ! call live_timing('Satellites',q%nibz) ! @@ -223,12 +228,14 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) pole =BS_E_in(i_alpha) Epsilon_ii(iw,:)=Epsilon_ii(iw,:)+(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha)/(W-pole) ! - ! The pole of luminescence should be the pole of BS_E_in - ! but I think this is not consistent with the Boltzman weight, I use always Lout. Point to be discussed + ! [CA] The pole of luminescence should be the pole of BS_E_in + ! but I think this is not consistent with the Boltzman weight, I use always Lout. + ! [FP] Luminescence in RS (detailed balance) assumption requires Lin=Lout. + ! Maybe put a check/logical enforcing this for PL? ! exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) - PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha) & + PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo @@ -245,6 +252,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call Sat_free() YAMBO_FREE(EXCPH_Renorm) YAMBO_FREE(EXCPH_Renorm_PH_abs) + YAMBO_FREE(EXCPH_Renorm_PL) + YAMBO_FREE(EXCPH_Renorm_PL_PH_abs) ! contains ! @@ -320,8 +329,23 @@ subroutine Eval_Renorm_Factor() ! do i_alpha=EXCPH_states(1),EXCPH_states(2) do i_beta=EXCPH_sum(1),EXCPH_sum(2) - EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+N_bose) - EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*N_bose + ! + ! Phonon emission in absorption [photon absorption / phonon emission] + ! + EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+N_bose) + ! + ! Phonon absorption in luminescence [photon emission / phonon absorption] + ! + EXCPH_Renorm_PL_PH_abs(i_alpha) = EXCPH_Renorm_PL_PH_abs(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*N_bose + ! + ! Phonon absorption in absorption [photon absorption / phonon absorption] + ! + EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*N_bose + ! + ! Phonon emission in luminescence [photon emission / phonon emission] + ! + EXCPH_Renorm_PL_abs(i_alpha) = EXCPH_Renorm_PL_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*(1._SP+N_bose) + ! enddo enddo ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index e6643074ac..b32ae36110 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -70,6 +70,8 @@ module EXCPH real(SP), target, allocatable :: BS_Sat_WEIGHT_PH_abs(:,:,:) real(SP), allocatable :: EXCPH_Renorm(:) real(SP), allocatable :: EXCPH_Renorm_PH_abs(:) + real(SP), allocatable :: EXCPH_Renorm_PL(:) + real(SP), allocatable :: EXCPH_Renorm_PL_PH_abs(:) complex(SP), allocatable :: BS_EXCPH_E(:) real(SP), allocatable :: ph_EXCPH_E(:) complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) From 0feb23c8669315ae8a74067af5ea84a2f0fc6e9b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 14:21:10 +0100 Subject: [PATCH 0178/1367] Version 5.1.1, Revision 21278, Hash b0b7d5b16 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Bugs: - Additions: -Better allocation/deallocations Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 2 +- src/exc-ph/EXCPH_lifetime.F | 46 ++++--------------------------------- src/exc-ph/EXCPH_optics.F | 35 ++++++++-------------------- src/modules/mod_EXCPH.F | 23 +++++++++++++++++++ 5 files changed, 40 insertions(+), 70 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a42a0d2cd9..70a87d59a7 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21275 -#define YAMBO_HASH "9653cef6d" +#define YAMBO_REVISION 21276 +#define YAMBO_HASH "6749b4447" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index efe11bdd38..b711a52df3 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -344,7 +344,7 @@ subroutine Eval_Renorm_Factor() ! ! Phonon emission in luminescence [photon emission / phonon emission] ! - EXCPH_Renorm_PL_abs(i_alpha) = EXCPH_Renorm_PL_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*(1._SP+N_bose) + EXCPH_Renorm_PL(i_alpha) = EXCPH_Renorm_PL(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*(1._SP+N_bose) ! enddo enddo diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index b1b363828d..964e7a14d6 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -35,7 +35,8 @@ subroutine EXCPH_lifetime(E,k,q,X) use X_m, ONLY:X_t use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & +& alloc_EXC,free_EXC use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches ! #include @@ -57,9 +58,7 @@ subroutine EXCPH_lifetime(E,k,q,X) ! ! Allocations ! - YAMBO_ALLOC(BS_E,(BSS_n_eig)) - YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) - YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) + call alloc_EXC(q) ! ! Load excitonic energies ! @@ -71,43 +70,8 @@ subroutine EXCPH_lifetime(E,k,q,X) BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! - ! Turn on double-grid if presents - ! - ! Fill the PH_freqs array - ! This structure will contains the phonon frequencies and the - ! double-grid phonon frequencies calculated with matdyn.x - ! - PH_freqs%nk=q%nibz - PH_freqs%nb=ph_modes - YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) - ! - ! Check if double-grid is present and use it - ! load the double-grid phonon energies in PH_freqs - ! - call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) - io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') - ! - if(io_err==0) then - ! - use_PH_DbGd=.TRUE. - call msg('sr','Using PH-double-grid ') - ! - endif - ! - call error(' This part is not coded yet!!') - ! ! Deallocations ! - call Free_EXCPH() - ! - contains - ! - subroutine FREE_EXCPH() - implicit none - ! - YAMBO_FREE(BS_E) - YAMBO_FREE(BS_all_E) - ! - end subroutine FREE_EXCPH - ! + call free_EXC() + ! end subroutine diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 39c9031c30..d3fe9c5061 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -35,7 +35,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) use com, ONLY:msg,of_open_close use BS_Solvers, ONLY:BSS_n_eig use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs +& BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,free_EXC,alloc_EXC use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches use frequency, ONLY:w_samp ! @@ -65,12 +65,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Allocations ! - YAMBO_ALLOC(BS_E,(BSS_n_eig)) - YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) - YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) - YAMBO_ALLOC(BS_R,(BSS_n_eig)) - YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) - YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) + call alloc_EXC(q) ! ! Load excitonic energies and residuals ! @@ -110,7 +105,13 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Deallocations ! - call Free_EXCPH() + call free_EXC() + YAMBO_FREE(Epsilon_ii) + YAMBO_FREE(PL_ii) + if(use_PH_DbGd) then + YAMBO_FREE(BS_Sat_W_DG) + YAMBO_FREE(BS_Sat_W_DG_PH_abs) + endif ! call FREQUENCIES_reset(wv,"all") ! @@ -199,22 +200,4 @@ subroutine DoubleGrid_setup() ! end subroutine DoubleGrid_setup ! - subroutine FREE_EXCPH() - implicit none - ! - YAMBO_FREE(Epsilon_ii) - YAMBO_FREE(PL_ii) - YAMBO_FREE(BS_E) - YAMBO_FREE(BS_all_E) - YAMBO_FREE_P(BS_R_left) - YAMBO_FREE_P(BS_R_right) - YAMBO_FREE(BS_R) - ! - if(use_PH_DbGd) then - YAMBO_FREE(BS_Sat_W_DG) - YAMBO_FREE(BS_Sat_W_DG_PH_abs) - endif - ! - end subroutine FREE_EXCPH - ! end subroutine diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index b32ae36110..8a6ddadb67 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -129,4 +129,27 @@ subroutine EXCPH_gkkp_free YAMBO_FREE(Xi) end subroutine EXCPH_gkkp_free ! + subroutine free_EXC() + implicit none + ! + YAMBO_FREE(BS_E) + YAMBO_FREE(BS_all_E) + YAMBO_FREE_P(BS_R_left) + YAMBO_FREE_P(BS_R_right) + YAMBO_FREE(BS_R) + ! + end subroutine free_EXC + ! + subroutine alloc_EXC(q) + use R_lattice, ONLY:bz_samp + implicit none + type(bz_samp) ::q + YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) + YAMBO_ALLOC(BS_R,(BSS_n_eig)) + YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) + YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) + end subroutine alloc_EXC + ! end module EXCPH From 22e66c61cd39cb848bfb9feeb46ec8ef902c9826 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 14:36:54 +0100 Subject: [PATCH 0179/1367] Version 5.1.1, Revision 21279, Hash 0feb23c86 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Additions: -More stuff Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 43 ++++++++++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 70a87d59a7..3ceff9a435 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21276 -#define YAMBO_HASH "6749b4447" +#define YAMBO_REVISION 21278 +#define YAMBO_HASH "b0b7d5b16" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 964e7a14d6..23caeafe39 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -47,8 +47,9 @@ subroutine EXCPH_lifetime(E,k,q,X) ! ! Work space ! - integer, external :: io_Double_Grid - integer :: io_err,iq,ID_DG + integer :: ID_exc_gkkp,ID_gkkp,io_err + integer, external :: io_EXCPH_gkkp,io_ELPH + integer :: iq_bz,i_alpha,i_beta,il ! call section('*','EXCPH-LifTime') ! @@ -65,9 +66,41 @@ subroutine EXCPH_lifetime(E,k,q,X) call EXCPH_load_L(1,X,'eigenvalues','Lin') BS_E_in(:)=BS_E(:) ! L_in can be different from L_out ! - do iq=1,q%nibz - call EXCPH_load_L(iq,X,'eigenvalues','Lout') - BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + do iq_bz=1,q%nibz + call EXCPH_load_L(iq_bz,X,'eigenvalues','Lout') + BS_all_E(:,iq_bz)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + enddo + ! + ! Load the Exciton-phonon elements and phonon energies + ! + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') + if(io_err/=0) call error('excph_gkkp databases not found!') + ! + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + if(io_err/=0) call error('gkkp_expanded databases not found!') + ! + ! Calculate the life-times + ! + do iq_bz=1,q%nbz + ! + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + do il=elph_branches(1),elph_branches(2) + ! + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + ! + enddo + ! + enddo + ! + enddo + ! enddo ! ! Deallocations From 73467c699cec85c3f6b14dc6403f90dacfdadf81 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 23 Feb 2022 15:27:34 +0100 Subject: [PATCH 0180/1367] Changed allocation of Renorm part and added PL fix to double grid --- src/exc-ph/EXCPH_X_phass.F | 33 ++++++++++++++------------------- src/exc-ph/EXCPH_gkkp_driver.F | 11 +++-------- src/modules/mod_EXCPH.F | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index b711a52df3..29e92ece75 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -45,7 +45,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,BS_Sat_W_DG,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & -& BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs +& BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches,PH_freqs,FAN_deltaE_treshold use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& & INTERPOLATE_is_quiet,INTERPOLATION_BZ @@ -92,11 +92,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! - YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm_PL,(EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm_PL_PH_abs,(EXCPH_states(2))) - ! if(use_PH_DbGd) then ! call msg('sr','EXC_E(k+q) calculated using a smooth Fourier interpolation') @@ -128,13 +123,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! The satellites ! + call Renorm_alloc() + ! Epsilon_ii =cZERO PL_ii =cZERO - EXCPH_Renorm =rZERO - EXCPH_Renorm_PH_abs =rZERO - ! Locally defined variable for RS-PL renorm. factor - EXCPH_Renorm_PL =rZERO - EXCPH_Renorm_PL_PH_abs=rZERO ! call live_timing('Satellites',q%nibz) ! @@ -250,10 +242,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Free ! call Sat_free() - YAMBO_FREE(EXCPH_Renorm) - YAMBO_FREE(EXCPH_Renorm_PH_abs) - YAMBO_FREE(EXCPH_Renorm_PL) - YAMBO_FREE(EXCPH_Renorm_PL_PH_abs) + call Renorm_free() ! contains ! @@ -373,10 +362,16 @@ subroutine Eval_Renorm_Factor() ! ! BS_Sat_W_DG = Gkk^2/(E_a-E_b-w)^2 ! - EXCPH_Renorm(i_alpha) =EXCPH_Renorm(i_alpha) +BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) & - & *(1._SP+N_bose)*weight_dbgd - EXCPH_Renorm_PH_abs(i_alpha)=EXCPH_Renorm_PH_abs(i_alpha)+BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx) & - & *N_bose*weight_dbgd + ! See above no-DG case for physical interpretation of factors + ! + EXCPH_Renorm(i_alpha) =EXCPH_Renorm(i_alpha) +BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) & +& *(1._SP+N_bose)*weight_dbgd + EXCPH_Renorm_PH_abs(i_alpha) =EXCPH_Renorm_PH_abs(i_alpha) +BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx) & +& *N_bose*weight_dbgd + EXCPH_Renorm_PL(i_alpha) =EXCPH_Renorm_PL(i_alpha) +BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx) & +& *(1._SP+N_bose)*weight_dbgd + EXCPH_Renorm_PL_PH_abs(i_alpha)=EXCPH_Renorm_PL_PH_abs(i_alpha)+BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) & +& *N_bose*weight_dbgd ! enddo ! diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 5207e1283f..b6260e5d3f 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -52,7 +52,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi, & & BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -110,8 +110,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_gkkp_alloc() YAMBO_ALLOC(max_Sat_weight,(EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(max_Sat_pos,(EXCPH_states(1):EXCPH_states(2),3)) - YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) ! max_Sat_weight=rZERO max_Sat_pos =0 @@ -145,14 +143,12 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') ! call Sat_alloc() + call Renorm_alloc() ! ! Main q-loop ! call live_timing('Excitonic Gkkp',q%nibz*(elph_branches(2)-elph_branches(1)+1)) ! - EXCPH_Renorm =rZERO - EXCPH_Renorm_PH_abs=rZERO - ! do iq=1,q%nibz ! if(iq>1) call EXCPH_load_L(iq,X,'check','Lout') @@ -205,10 +201,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_gkkp_report() YAMBO_FREE(max_Sat_weight) YAMBO_FREE(max_Sat_pos) - YAMBO_FREE(EXCPH_Renorm) - YAMBO_FREE(EXCPH_Renorm_PH_abs) ! call Sat_free() + call Renorm_free() ! call timing('EXCPH_gkkp',OPR='stop') ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 8a6ddadb67..fec5db9753 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -113,6 +113,28 @@ subroutine Sat_free() YAMBO_FREE(BS_Sat_WEIGHT_PH_abs) end subroutine Sat_free ! + subroutine Renorm_alloc() + implicit none + YAMBO_ALLOC(EXCPH_Renorm,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PH_abs,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PL,(EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Renorm_PL_PH_abs,(EXCPH_states(2))) + ! + EXCPH_Renorm =rZERO + EXCPH_Renorm_PH_abs=rZERO + EXCPH_Renorm_PL =rZERO + EXCPH_Renorm_PL_PH_abs=rZERO + ! + end subroutine Renorm_alloc + ! + subroutine Renorm_free() + implicit none + YAMBO_FREE(EXCPH_Renorm) + YAMBO_FREE(EXCPH_Renorm_PH_abs) + YAMBO_FREE(EXCPH_Renorm_PL) + YAMBO_FREE(EXCPH_Renorm_PL_PH_abs) + end subroutine Renorm_free + ! subroutine EXCPH_gkkp_alloc() implicit none YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) From bad4838242617a8e84616a3dad37cfc720aae7d5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 18:33:11 +0100 Subject: [PATCH 0181/1367] Version 5.1.1, Revision 21281, Hash 73467c699 MODIFIED * driver/yambo.F include/driver/version.h exc-ph/EXCPH_lifetime.F modules/mod_EXCPH.F Additions: -Playing with excitonic lifetimes Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_lifetime.F | 68 +++++++++++++++++++++++++++++++++---- src/modules/mod_EXCPH.F | 4 +++ 4 files changed, 69 insertions(+), 9 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index fd0d867a4f..27a30da1be 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -244,7 +244,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) ! driver_now=l_EXCPH_lifetime - if(driver_now) call EXCPH_lifetime(Ken,Xk,q,X(i_X_kind)) + if(driver_now) call EXCPH_lifetime(Ken,Xk,q,X(i_X_kind),Xw(3)) #endif ! ! diff --git a/include/driver/version.h b/include/driver/version.h index 3ceff9a435..abe9f9c3eb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21278 -#define YAMBO_HASH "b0b7d5b16" +#define YAMBO_REVISION 21279 +#define YAMBO_HASH "0feb23c86" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 23caeafe39..84aa21f6ce 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -23,9 +23,9 @@ ! !> @brief Calculate exciton non-radiative life-time induced by phonon-scattering !! -subroutine EXCPH_lifetime(E,k,q,X) +subroutine EXCPH_lifetime(E,k,q,X,wv) ! - use units, ONLY:HA2EV + use units, ONLY:HA2EV,HA2CMm1 use pars, ONLY:SP,cZERO,rZERO,schlen,pi use electrons, ONLY:levels,n_sp_pol,spin_occ use R_lattice, ONLY:bz_samp @@ -36,20 +36,24 @@ subroutine EXCPH_lifetime(E,k,q,X) use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& alloc_EXC,free_EXC - use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches +& alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq + use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches,FAN_deltaE_treshold + use frequency, ONLY:w_samp + use stderr, ONLY:intc ! #include ! type(levels) ::E type(bz_samp) ::k,q type(X_t) ::X + type(w_samp) :: wv ! ! Work space ! integer :: ID_exc_gkkp,ID_gkkp,io_err integer, external :: io_EXCPH_gkkp,io_ELPH integer :: iq_bz,i_alpha,i_beta,il + integer :: min_pos(1) ! call section('*','EXCPH-LifTime') ! @@ -81,8 +85,20 @@ subroutine EXCPH_lifetime(E,k,q,X) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! + ! Info on excitons + ! + min_pos =minloc(BS_all_E(1,:)) + min_EXC_E=minval(BS_all_E(1,:)) + ! + call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) + call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') + call msg('rs','Self-energy broadening : ',wv%dr(1)*HA2EV/1000._SP,'meV') + ! ! Calculate the life-times ! + YAMBO_ALLOC(EXC_LifeTime,(EXCPH_states(1):EXCPH_states(2))) + EXC_LifeTime=rZERO + ! do iq_bz=1,q%nbz ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) @@ -90,10 +106,11 @@ subroutine EXCPH_lifetime(E,k,q,X) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! - do il=elph_branches(1),elph_branches(2) + do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! - do i_beta=EXCPH_sum(1),EXCPH_sum(2) + do il=elph_branches(1),elph_branches(2) ! + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*Simple_pole() ! enddo ! @@ -103,8 +120,47 @@ subroutine EXCPH_lifetime(E,k,q,X) ! enddo ! + EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz) + ! + ! Output + ! + call msg('rs','Exciton lifetimes:') + do i_alpha=EXCPH_states(1),EXCPH_states(2) + call msg('rs','Exciton '//intc(i_alpha)//' lifetime: ',EXC_LifeTime(i_alpha)*HA2EV/1000._SP,'meV') + enddo + ! ! Deallocations ! + YAMBO_FREE(EXC_LifeTime) call free_EXC() ! + contains + ! + function Simple_pole() + use EXCPH, ONLY:min_EXC_E,EXCPH_Gkkp_sq + use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq + use functions, ONLY:bose_f,boltzman_f,Lorentzian_func + implicit none + ! + real(SP) :: Simple_pole + real(SP) :: E_alpha,E_beta + real(SP) :: ph_E,N_bose,F_boltz + ! + Simple_pole=rZERO + ! + E_alpha=real(BS_E_in(i_alpha),SP) + E_beta =BS_all_E(i_beta,iq_bz) + ! + ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + if(ph_E Date: Wed, 23 Feb 2022 22:35:37 +0100 Subject: [PATCH 0182/1367] Version 5.1.1, Revision 21282, Hash bad483824 MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F Additions: -Double-grid everywhere Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/.objects | 3 +- src/exc-ph/EXCPH_X_phass.F | 47 ++++----------------------- src/exc-ph/EXCPH_lifetime.F | 57 +++++++++++++++++++++++++++++---- src/exc-ph/EXCPH_optics.F | 63 +++++++++---------------------------- 5 files changed, 76 insertions(+), 98 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index abe9f9c3eb..5d2162ad95 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21279 -#define YAMBO_HASH "0feb23c86" +#define YAMBO_REVISION 21281 +#define YAMBO_HASH "73467c699" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 3a3a0c6791..4213b4374f 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o get_ph_E_DbGd.o \ - EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o + EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ + EXCPH_double_grid_setup.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 29e92ece75..38dc683b3f 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -43,12 +43,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV,HA2CMm1 use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,ID_EXC,ID_EXC_obj,BS_Sat_W_DG,& + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,BS_Sat_W_DG,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & & BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free - use ELPH, ONLY:use_PH_DbGd,E_kpq_sh_fact,elph_branches,PH_freqs,FAN_deltaE_treshold - use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& -& INTERPOLATE_is_quiet,INTERPOLATION_BZ + use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset use functions, ONLY:boltzman_f,bose_f @@ -65,14 +63,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Work space ! complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E,E_alpha,PH_E,v(3) - type(bz_samp) :: q_DbGd + real(SP) :: min_E,exc_E,E_alpha,PH_E integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: min_pos_E_DbGd(1) - integer, external :: io_EXCPH_gkkp,io_ELPH - character(schlen) :: q_point - logical :: l_DbGd_Sigma_Only + logical :: l_DbGd_Sigma_Only integer :: iq_fg,iq_idx + integer, external :: io_EXCPH_gkkp,io_ELPH ! call parser('DBGSigmaOnly',l_DbGd_Sigma_Only) ! @@ -92,35 +87,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! - if(use_PH_DbGd) then - ! - call msg('sr','EXC_E(k+q) calculated using a smooth Fourier interpolation') - INTERPOLATE_is_serial=.TRUE. - INTERPOLATE_is_quiet =.TRUE. - INTERP_shell_factor =E_kpq_sh_fact - ID_EXC_obj=1 - ID_EXC =1 - call INTERPOLATION_BZ_setup(q) - INTERP_obj(ID_EXC_obj)%what="EXC_E(k+q)" - call INTERPOLATION_coefficients(R1D=BS_all_E(:EXCPH_sum(2),:),k=q,NK=q%nibz,ID=ID_EXC,ID_obj=ID_EXC_obj) - ! - call bz_samp_reset(q_DbGd) - q_DbGd%nibz=q%FGbz%N - YAMBO_ALLOC(q_DbGd%pt,(q_DbGd%nibz,3)) - q_DbGd%pt=q%FGbz%pt - ! - YAMBO_ALLOC(EXC_E_DbGd,(EXCPH_sum(2),q_DbGd%nibz)) - call INTERPOLATION_BZ(K=q_DbGd,NK=q_DbGd%nibz,ID=ID_EXC,R1D=EXC_E_DbGd) - ! - min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) - min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) - call c2a(v_in=q_DbGd%pt(min_pos_E_DbGd,:),v_out=v,mode="ki2a") - call msg('rs','Minimum exctonic energy with DbGd: ',min_EXC_E_DbGd*HA2EV,'eV') - write(q_point,'(3f12.6,a)') v(:),' [rlu] ' - call msg('rs','Minimum q-point in the DbGrid : '//q_point) - ! - endif - ! ! The satellites ! call Renorm_alloc() @@ -247,8 +213,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) contains ! subroutine Eval_Sat_Weights_DbGd() - use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs - use ELPH, ONLY:PH_freqs_sq + use EXCPH, ONLY:BS_Sat_E implicit none ! real(SP) :: E_beta,bose_factor,EXC_gkkp_sq diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 84aa21f6ce..f03bd5a085 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -27,17 +27,16 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) ! use units, ONLY:HA2EV,HA2CMm1 use pars, ONLY:SP,cZERO,rZERO,schlen,pi - use electrons, ONLY:levels,n_sp_pol,spin_occ + use electrons, ONLY:levels use R_lattice, ONLY:bz_samp use parser_m, ONLY:parser use com, ONLY:msg,of_open_close - use BS_Solvers, ONLY:BSS_n_eig use X_m, ONLY:X_t use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in, & & alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq - use ELPH, ONLY:PH_freqs,ph_modes,use_PH_DbGd,elph_branches,FAN_deltaE_treshold + use ELPH, ONLY:PH_freqs,use_PH_DbGd,elph_branches,FAN_deltaE_treshold use frequency, ONLY:w_samp use stderr, ONLY:intc ! @@ -94,6 +93,9 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') call msg('rs','Self-energy broadening : ',wv%dr(1)*HA2EV/1000._SP,'meV') ! + ! Turn on double-grid if presents + call EXCPH_double_grid_setup(q) + ! ! Calculate the life-times ! YAMBO_ALLOC(EXC_LifeTime,(EXCPH_states(1):EXCPH_states(2))) @@ -110,7 +112,11 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) ! do il=elph_branches(1),elph_branches(2) ! - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*Simple_pole() + if(use_PH_DbGd) then + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*DbGrid_pole() + else + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*Simple_pole() + endif ! enddo ! @@ -137,7 +143,7 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) contains ! function Simple_pole() - use EXCPH, ONLY:min_EXC_E,EXCPH_Gkkp_sq + use EXCPH, ONLY:min_EXC_E use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq use functions, ONLY:bose_f,boltzman_f,Lorentzian_func implicit none @@ -163,4 +169,43 @@ function Simple_pole() ! end function Simple_Pole ! + function DbGrid_pole() + use EXCPH, ONLY:min_EXC_E_DbGd,EXC_E_DbGd + use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq + use functions, ONLY:bose_f,boltzman_f,Lorentzian_func + implicit none + ! + real(SP) :: DbGrid_pole + real(SP) :: E_alpha,E_beta + real(SP) :: ph_E,N_bose,F_boltz + integer :: nq_around,iq_fg + real(SP) :: weight_dbgd + real(SP), external :: get_ph_E_DbGd + ! + DbGrid_pole=rZERO + ! + E_alpha=real(BS_E_in(i_alpha),SP) + ! + nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1) + weight_dbgd=1._SP/real(nq_around+1._SP,SP) + ! + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) + if(ph_E @@ -51,7 +50,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=5 real(SP) :: output_data(n_output) - integer :: iw,iq,i_alpha,ID_DG + integer :: iw,iq,i_alpha,max_filling character(schlen) :: dbgd_string ! call section('*','EXCPH-Optics') @@ -81,14 +80,24 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! BS_R=rZERO do i_alpha=EXCPH_states(1),EXCPH_states(2) - BS_R(i_alpha)=abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)) + BS_R(i_alpha)=real(abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)),SP) enddo ! ! This formula can be wrong in presence of the 2D-cutoff BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 ! ! Turn on double-grid if presents - call DoubleGrid_setup() + call EXCPH_double_grid_setup(q) + ! + dbgd_string='' + if(use_PH_DbGd) then + dbgd_string='DbGd' + max_filling=maxval(q%FGbz%N_mapped)+1 ! max number of tilde q around each q-point include the q itself + YAMBO_ALLOC(BS_Sat_W_DG,(elph_branches(2),EXCPH_sum(2),EXCPH_states(2),max_filling)) + YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(elph_branches(2),EXCPH_sum(2),EXCPH_states(2),max_filling)) + BS_Sat_W_DG =rZERO + BS_Sat_W_DG_PH_abs=rZERO + endif ! ! Frequencies and damping setup call FREQUENCIES_setup(wv) @@ -158,46 +167,4 @@ subroutine print_output() ! end subroutine print_output ! - subroutine DoubleGrid_setup() - use IO_int, ONLY:io_control - use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP - implicit none - ! - integer, external :: io_Double_Grid - integer :: io_err,max_filling - ! - ! Fill the PH_freqs array - ! This structure will contains the phonon frequencies and the - ! double-grid phonon frequencies calculated with matdyn.x - ! - PH_freqs%nk=q%nibz - PH_freqs%nb=ph_modes - YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) - ! - ! Check if double-grid is present and use it - ! load the double-grid phonon energies in PH_freqs - ! - call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) - io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') - ! - dbgd_string='' - if(io_err==0) then - ! - use_PH_DbGd=.TRUE. - call msg('sr','Using PH-double-grid ') - dbgd_string='DbGd' - ! - max_filling=maxval(q%FGbz%N_mapped)+1 ! max number of tilde q around each q-point include the q itself - YAMBO_ALLOC(BS_Sat_W_DG,(elph_branches(2),EXCPH_sum(2),EXCPH_states(2),max_filling)) - YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(elph_branches(2),EXCPH_sum(2),EXCPH_states(2),max_filling)) - ! - BS_Sat_W_DG =rZERO - BS_Sat_W_DG_PH_abs=rZERO - ! - call msg('rs','Double grid number of q-points ',q%FGbz%N) - ! - endif - ! - end subroutine DoubleGrid_setup - ! end subroutine From 78d857a187f9e14a65f764e319340cea1e1ad077 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 22:36:03 +0100 Subject: [PATCH 0183/1367] Version 5.1.1, Revision 21283, Hash 451a3566d MODIFIED * include/driver/version.h NEW * exc-ph/EXCPH_double_grid_setup.F Additions: -Double-grid in a separated setup Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_double_grid_setup.F | 99 ++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 src/exc-ph/EXCPH_double_grid_setup.F diff --git a/include/driver/version.h b/include/driver/version.h index 5d2162ad95..4c22b8d42b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21281 -#define YAMBO_HASH "73467c699" +#define YAMBO_REVISION 21282 +#define YAMBO_HASH "bad483824" diff --git a/src/exc-ph/EXCPH_double_grid_setup.F b/src/exc-ph/EXCPH_double_grid_setup.F new file mode 100644 index 0000000000..70a30c6951 --- /dev/null +++ b/src/exc-ph/EXCPH_double_grid_setup.F @@ -0,0 +1,99 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate phonon-assisted absorption and emission (see PRL 122, 187401 ) +! +subroutine EXCPH_double_grid_setup(q) + ! + use pars, ONLY:schlen,SP + use vec_operate, ONLY:c2a + use units, ONLY:HA2EV + use R_lattice, ONLY:bz_samp,bz_samp_reset + use IO_int, ONLY:io_control + use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP + use ELPH, ONLY:PH_freqs,use_PH_DbGd,ph_modes,E_kpq_sh_fact + use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& +& INTERPOLATE_is_quiet,INTERPOLATION_BZ + use EXCPH, ONLY:min_EXC_E_DbGd,ID_EXC,ID_EXC_obj,EXC_E_DbGd,EXCPH_sum,BS_all_E + use com, ONLY:msg + ! +#include + ! + type(bz_samp), intent(in) :: q + ! + ! Work space + ! + type(bz_samp) :: q_DbGd + integer :: io_err,ID_DG + integer :: min_pos_E_DbGd(1) + real(SP) :: v(3) + character(schlen) :: q_point + integer, external :: io_Double_Grid + ! + ! Fill the PH_freqs array + ! This structure will contains the phonon frequencies and the + ! double-grid phonon frequencies calculated with matdyn.x + ! + PH_freqs%nk=q%nibz + PH_freqs%nb=ph_modes + YAMBO_ALLOC(PH_freqs%E,(q%nibz,ph_modes,1)) + ! + ! Check if double-grid is present and use it + ! load the double-grid phonon energies in PH_freqs + ! + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1,2/),ID=ID_DG) + io_err=io_Double_Grid(PH_freqs,q,ID_DG,'phonons') + ! + if(io_err/=0) return + ! + use_PH_DbGd=.TRUE. + ! + call msg('sr','Using PH-double-grid ') + call msg('rs','Double grid number of q-points ',q%FGbz%N) + ! + call msg('sr','EXC_E(k+q) calculated using a smooth Fourier interpolation') + INTERPOLATE_is_serial=.TRUE. + INTERPOLATE_is_quiet =.TRUE. + INTERP_shell_factor =E_kpq_sh_fact + ID_EXC_obj=1 + ID_EXC =1 + call INTERPOLATION_BZ_setup(q) + INTERP_obj(ID_EXC_obj)%what="EXC_E(k+q)" + call INTERPOLATION_coefficients(R1D=BS_all_E(:EXCPH_sum(2),:),k=q,NK=q%nibz,ID=ID_EXC,ID_obj=ID_EXC_obj) + ! + call bz_samp_reset(q_DbGd) + q_DbGd%nibz=q%FGbz%N + YAMBO_ALLOC(q_DbGd%pt,(q_DbGd%nibz,3)) + q_DbGd%pt=q%FGbz%pt + ! + YAMBO_ALLOC(EXC_E_DbGd,(EXCPH_sum(2),q_DbGd%nibz)) + call INTERPOLATION_BZ(K=q_DbGd,NK=q_DbGd%nibz,ID=ID_EXC,R1D=EXC_E_DbGd) + ! + min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) + min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) + call c2a(v_in=q_DbGd%pt(min_pos_E_DbGd,:),v_out=v,mode="ki2a") + call msg('rs','Minimum exctonic energy with DbGd: ',min_EXC_E_DbGd*HA2EV,'eV') + write(q_point,'(3f12.6,a)') v(:),' [rlu] ' + call msg('rs','Minimum q-point in the DbGrid : '//q_point) + ! +end subroutine From f2d8d60d7123ff9dd49c9df48f4b604f57d8fa89 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 22:53:28 +0100 Subject: [PATCH 0184/1367] Version 5.1.1, Revision 21284, Hash 78d857a18 MODIFIED * include/driver/version.h exc-ph/get_ph_E_DbGd.F ypp/k-points/k_map_fine_to_coarse_init.F Changes: -First point of the PH-double grid should be always Gamma Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/get_ph_E_DbGd.F | 2 +- ypp/k-points/k_map_fine_to_coarse_init.F | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4c22b8d42b..a6145d24c4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21282 -#define YAMBO_HASH "bad483824" +#define YAMBO_REVISION 21283 +#define YAMBO_HASH "451a3566d" diff --git a/src/exc-ph/get_ph_E_DbGd.F b/src/exc-ph/get_ph_E_DbGd.F index 67d47d8a39..2f163f39b2 100644 --- a/src/exc-ph/get_ph_E_DbGd.F +++ b/src/exc-ph/get_ph_E_DbGd.F @@ -63,7 +63,7 @@ function get_ph_E_DbGd(il,iq_fg,iq_bz,q) ! Double-grid energies ! iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - get_ph_E_DbGd =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + get_ph_E_DbGd =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid ! endif ! diff --git a/ypp/k-points/k_map_fine_to_coarse_init.F b/ypp/k-points/k_map_fine_to_coarse_init.F index bf1adaa609..eb811947d8 100644 --- a/ypp/k-points/k_map_fine_to_coarse_init.F +++ b/ypp/k-points/k_map_fine_to_coarse_init.F @@ -39,7 +39,7 @@ subroutine k_map_fine_to_coarse_init(Xk,Xen,FineGd_k,FineGd_is_expanded,PH_grid) #if defined _YPP_ELPH use YPP_ELPH, ONLY:ph_modes_file,ph_freqs_file,ELPH_databases_IO_freqs,ELPH_databases_IO_modes use stderr, ONLY:STRING_same - use vec_operate, ONLY:c2a + use vec_operate, ONLY:c2a,v_is_zero #endif ! #include @@ -175,6 +175,9 @@ subroutine k_map_fine_to_coarse_init(Xk,Xen,FineGd_k,FineGd_is_expanded,PH_grid) call c2a(v_in=FineGd_io_k(1)%pt(i_q,:),mode="kc2i") enddo ! + if(.not.v_is_zero(FineGd_io_k(1)%pt(1,:))) & + & call error("The first point of the PH double-grid should be Gamma") + ! #endif ! l_skip_check=.TRUE. From eedfcb33d2631912928786edb96c46405e3718d5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 23 Feb 2022 22:57:24 +0100 Subject: [PATCH 0185/1367] Version 5.1.1, Revision 21285, Hash f2d8d60d7 MODIFIED * include/driver/version.h el-ph/ELPH_Sigma_c_engine.F Additions: -In the electron-phonon self-energy is the PH-dbgrid is present phonons are gamma are always read from there, in such a way to have LO-TO splitting and acustic sum rule Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/ELPH_Sigma_c_engine.F | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a6145d24c4..505ed62721 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21283 -#define YAMBO_HASH "451a3566d" +#define YAMBO_REVISION 21284 +#define YAMBO_HASH "78d857a18" diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index e282475bb2..83324a1386 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -98,6 +98,11 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en ! ph_E=sqrt(abs(PH_freqs_sq(iq_ibz,il))) ! + ! If there is the double-grid I read the gamma phonons from there + ! because they include the LO-TO splitting and the acustic sum rule + ! + if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + ! ! Skip modes @ Gamma (1st point is always gamma, either with random ! or uniform grids, as it is needed to evaluate the DW factor) ! @@ -231,6 +236,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en if (eval_DW) then ! ph_E=sqrt(abs(PH_freqs_sq(iq_ibz,il))) + if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) ! do iq_idx=1,GKKP%E_dg_kpq(1)%nq_around ! Numbere of q-points around Gamma ! From abb6c4ef8b49f4514e58b1962e253174cb59a732 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 24 Feb 2022 09:06:13 +0100 Subject: [PATCH 0186/1367] Version 5.1.1, Revision 21286, Hash eedfcb33d MODIFIED * include/driver/version.h modules/mod_EXCPH.F Bugs: -Bug in deallocation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/modules/mod_EXCPH.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 505ed62721..07fcd6c1f5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21284 -#define YAMBO_HASH "78d857a18" +#define YAMBO_REVISION 21286 +#define YAMBO_HASH "eedfcb33d" diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index fd17096471..7be53c8fef 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -151,7 +151,7 @@ end subroutine EXCPH_gkkp_alloc subroutine EXCPH_gkkp_free implicit none YAMBO_FREE(EXCPH_Gkkp) - YAMBO_FREE(EXCPH_Gkkp) + YAMBO_FREE(EXCPH_Gkkp_sq) YAMBO_FREE(Xi) end subroutine EXCPH_gkkp_free ! From aa979bacbbfab0dbd69e5e829071f3dcc1c70fc4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 24 Feb 2022 09:21:02 +0100 Subject: [PATCH 0187/1367] Version 5.1.1, Revision 21287, Hash abb6c4ef8 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F Bugs: -Fixed EXC_Gkkp IO Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 +++--- src/exc-ph/EXCPH_lifetime.F | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 07fcd6c1f5..1bc106ee58 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21286 -#define YAMBO_HASH "eedfcb33d" +#define YAMBO_REVISION 21287 +#define YAMBO_HASH "abb6c4ef8" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index b6260e5d3f..fcb9dfd147 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -47,7 +47,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim use ELPH, ONLY:elph_branches use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & -& REP,VERIFY,WR_CL +& REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi, & @@ -139,7 +139,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Write headers ! - call io_control(ACTION=OP_WR_CL,SEC=(/1/),ID=ID_exc_gkkp) + call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') ! call Sat_alloc() @@ -186,7 +186,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! I/O !===== - call io_control(ACTION=OP_APP_CL,SEC=(/iq+1/),ID=ID_exc_gkkp) + call io_control(ACTION=WR_CL_IF_END,SEC=(/iq+1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') ! enddo diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index f03bd5a085..200c0e6a51 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -106,6 +106,9 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') ! + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) From 3e5d828172de76d25153b0ae2bb0810c257e6a5d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 24 Feb 2022 12:17:50 +0100 Subject: [PATCH 0188/1367] Version 5.1.1, Revision 21288, Hash aa979bacb MODIFIED * interface/INIT_activate.F Bugs: -Forgot variable in input Additions: - Changes: - Patch sent by: Claudio Attaccalite --- src/interface/INIT_activate.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 1a2a01560c..d9ce07ac44 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp DiagExcph DmRngeXd') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp EXCTemp DiagExcph DmRngeXd') if (l_EXCPH_optics) call initactivate(1,'BoseTemp EXCTemp DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') ! #endif From c8d78f74cfebea6ebcfb55e587ae7df2043000ea Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 24 Feb 2022 12:18:55 +0100 Subject: [PATCH 0189/1367] Version 5.1.1, Revision 21289, Hash 3e5d82817 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: - Additions: -More error messages Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1bc106ee58..f025b5d454 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21287 -#define YAMBO_HASH "abb6c4ef8" +#define YAMBO_REVISION 21288 +#define YAMBO_HASH "aa979bacb" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 200c0e6a51..b816793fce 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -105,9 +105,11 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') + if(io_err/=0) call error('excph_gkkp databases not found!') ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + if(io_err/=0) call error('gkkp_expanded databases not found!') ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! From c0bba1a433ead5e2aea5a42183d1af97d9e5a1e6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 25 Feb 2022 09:26:37 +0100 Subject: [PATCH 0190/1367] Version 5.1.1, Revision 21290, Hash c8d78f74c MODIFIED * include/driver/version.h el-ph/.objects el-ph/ELPH_Sigma_c_engine.F exc-ph/.objects RENAMED * exc-ph/get_ph_E_DbGd.F -> el-ph/get_ph_E_DbGd.F Additions: -Restyle eletron-phonon self-energy with DbGd Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/.objects | 2 +- src/el-ph/ELPH_Sigma_c_engine.F | 6 +++--- src/{exc-ph => el-ph}/get_ph_E_DbGd.F | 0 src/exc-ph/.objects | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/{exc-ph => el-ph}/get_ph_E_DbGd.F (100%) diff --git a/include/driver/version.h b/include/driver/version.h index f025b5d454..b18856af07 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21288 -#define YAMBO_HASH "aa979bacb" +#define YAMBO_REVISION 21290 +#define YAMBO_HASH "c8d78f74c" diff --git a/src/el-ph/.objects b/src/el-ph/.objects index e5358a7ed9..8c92211a68 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o get_ph_E_DbGd.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index 83324a1386..12fdf5e8e7 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -66,11 +66,12 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en ! Work Space ! integer :: iw - integer :: ik,ik_bz,ib,iE_fg,iq_fg,ik_plus_q_dg,ic,nq_around,iq_idx + integer :: ik,ik_bz,ib,iq_fg,ik_plus_q_dg,ic,nq_around,iq_idx complex(SP) :: delta_E real(SP) :: delta_E_at_gamma,f_occ,E_kpq real(SP) :: one_minus_2f_occ,gsqF_damping,ph_E real(SP) :: weight_dbg,ph_E_dbg,q_dbg_weight,DW_weight + real(SP), external :: get_ph_E_DbGd ! logical :: eval_DW ! @@ -206,8 +207,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en do iq_fg=q%FGbz%k_range(iq_bz,1)+1,q%FGbz%k_range(iq_bz,2),1 ! iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1) - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ph_E =get_ph_E_DbGd(il,iq_fg,iq_bz,q) ! w(q_db) phonon energy in the D-Grid ! E_kpq =GKKP%E_dg_kpq(iq_bz)%E_kpq(ob,ik,1,iq_idx) ! E(k+q_dg) q_db in the D-Grid f_occ =GKKP%E_dg_kpq(iq_bz)%f_kpq(ob,ik,1,iq_idx)/spin_occ diff --git a/src/exc-ph/get_ph_E_DbGd.F b/src/el-ph/get_ph_E_DbGd.F similarity index 100% rename from src/exc-ph/get_ph_E_DbGd.F rename to src/el-ph/get_ph_E_DbGd.F diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 4213b4374f..9c56a413e6 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o get_ph_E_DbGd.o \ +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ EXCPH_double_grid_setup.o #endif From 33f1aed38bac40eb0c0d310fad76b35d318e10a0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 25 Feb 2022 10:15:00 +0100 Subject: [PATCH 0191/1367] Version 5.1.1, Revision 21291, Hash c0bba1a43 MODIFIED * driver/yambo.F include/driver/version.h Bugs: -Fixed compilation of the RT project Additions: - Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 27a30da1be..0315d1fb66 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -236,7 +236,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! ! EXCITON-PHONON ! =============== -#if defined _ELPH +#if defined _ELPH && !defined _RT driver_now=l_EXCPH_gkkp if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) ! diff --git a/include/driver/version.h b/include/driver/version.h index b18856af07..0b52529ebf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21290 -#define YAMBO_HASH "c8d78f74c" +#define YAMBO_REVISION 21291 +#define YAMBO_HASH "c0bba1a43" From c77f0dc94fcb3571f25581dd2555724d1c509f59 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 25 Feb 2022 12:06:42 +0100 Subject: [PATCH 0192/1367] Version 5.1.1, Revision 21292, Hash 33f1aed38 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: - Additions: -Fixed output of Exciton LifeTimes Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_lifetime.F | 49 ++++++++++++++++++++++++++++++++----- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0b52529ebf..c5efa793d9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21291 -#define YAMBO_HASH "c0bba1a43" +#define YAMBO_REVISION 21292 +#define YAMBO_HASH "33f1aed38" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index b816793fce..9bef22754b 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -91,7 +91,7 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) ! call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') - call msg('rs','Self-energy broadening : ',wv%dr(1)*HA2EV/1000._SP,'meV') + call msg('rs','Self-energy broadening : ',wv%dr(1)*HA2EV*1000._SP,'meV') ! ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) @@ -133,12 +133,9 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz) ! - ! Output + ! Print output and write on file ! - call msg('rs','Exciton lifetimes:') - do i_alpha=EXCPH_states(1),EXCPH_states(2) - call msg('rs','Exciton '//intc(i_alpha)//' lifetime: ',EXC_LifeTime(i_alpha)*HA2EV/1000._SP,'meV') - enddo + call print_and_write() ! ! Deallocations ! @@ -213,4 +210,44 @@ function DbGrid_pole() ! end function DbGrid_pole ! + subroutine print_and_write() + use pars, ONLY:schlen + use OUTPUT_simple, ONLY:OUTPUT_add_column + use stderr, ONLY:real2ch,intc,log2ch + ! + implicit none + ! + character(schlen) :: what='exc_QP' + ! + call OUTPUT_add_column(what,action="reset") + call OUTPUT_add_column(what,action="open") + call OUTPUT_add_column(what,ORDER=(/"Eo"/)) + call OUTPUT_add_column(what,ORDER=(/"Width [me"/)) + ! + call msg('rs','Exciton lifetimes:') + ! + call msg('o '//what,'#') + call msg('o '//what,'# === Exciton LifeTimes === ') + call msg('o '//what,'#') + call msg('o '//what,'# Exciton Sum : '//trim(intc(EXCPH_sum(1)))//' - '//trim(intc(EXCPH_sum(2)))) + call msg('o '//what,'# Exciton States : '//trim(intc(EXCPH_states(1)))//' - '//trim(intc(EXCPH_states(2)))) + call msg('o '//what,'# Self-Energy broadening :'//trim(real2ch(wv%dr(1)*HA2EV*1000._SP))//' meV') + call msg('o '//what,'# FAN treshold :'//trim(real2ch(FAN_deltaE_treshold*HA2EV*1000._SP))//' meV') + call msg('o '//what,'# PH Doble-Grid : '//log2ch(use_PH_DbGd)) + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + call OUTPUT_add_column(what,TITLES=(/"Band "/),I_VALUES=(/i_alpha/)) + call OUTPUT_add_column(what,TITLES=(/"E"/),R_VALUES=(/real(BS_E_in(i_alpha))/),UNIT="eV") + call OUTPUT_add_column(what,TITLES=(/"Width"/),R_VALUES=(/EXC_LifeTime(i_alpha)/),UNIT="meV") + call OUTPUT_add_column(what,action="write") + ! + call msg('rs','Exciton ['//trim(intc(i_alpha))//'] Lifetime: ',EXC_LifeTime(i_alpha)*HA2EV*1000._SP,'meV') + ! + enddo + ! + call OUTPUT_add_column(what,action="close") + ! + end subroutine + ! end subroutine From e60d8bd4f7f2db448834ba04aa8e7e37c2e7a7b8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 25 Feb 2022 14:25:05 +0100 Subject: [PATCH 0193/1367] Version 5.1.1, Revision 21293, Hash c77f0dc94 MODIFIED * include/driver/version.h modules/mod_EXCPH.F Bugs: -Fixed bug in allocation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/modules/mod_EXCPH.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c5efa793d9..1ec8446cfd 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21292 -#define YAMBO_HASH "33f1aed38" +#define YAMBO_REVISION 21293 +#define YAMBO_HASH "c77f0dc94" diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 7be53c8fef..1ba4ab5b5d 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -59,7 +59,7 @@ module EXCPH real(SP), allocatable :: BS_all_E(:,:) complex(SP), allocatable :: BS_mat_in(:,:) integer, allocatable :: BSS_eh_table_in(:,:) - complex, pointer :: BS_R_left(:),BS_R_right(:) + complex(SP), pointer :: BS_R_left(:),BS_R_right(:) real(SP), allocatable :: BS_R(:) ! ! ... Sigma From 030411069bcff36b98a5e3ce7bfa3593e77ef6c7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 26 Feb 2022 23:52:43 +0100 Subject: [PATCH 0194/1367] Version 5.1.1, Revision 21294, Hash e60d8bd4f MODIFIED * include/driver/version.h el-ph/ELPH_Sigma_c_engine.F Bugs: -Fixed bug in ELPH_Sigma_c_engine introduced reading DB-Grid energies at q=0 Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/el-ph/ELPH_Sigma_c_engine.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1ec8446cfd..66e5aec849 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21293 -#define YAMBO_HASH "c77f0dc94" +#define YAMBO_REVISION 21294 +#define YAMBO_HASH "e60d8bd4f" diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index 12fdf5e8e7..4cf10633c6 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -102,7 +102,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en ! If there is the double-grid I read the gamma phonons from there ! because they include the LO-TO splitting and the acustic sum rule ! - if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(il,1,1) ! ! Skip modes @ Gamma (1st point is always gamma, either with random ! or uniform grids, as it is needed to evaluate the DW factor) @@ -236,7 +236,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en if (eval_DW) then ! ph_E=sqrt(abs(PH_freqs_sq(iq_ibz,il))) - if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(il,1,1) ! do iq_idx=1,GKKP%E_dg_kpq(1)%nq_around ! Numbere of q-points around Gamma ! From 2be8e92e5f13bae36e96220d75d92a947a2e316c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 27 Feb 2022 20:23:48 +0100 Subject: [PATCH 0195/1367] Version 5.1.1, Revision 21294, Hash e60d8bd4f MODIFIED * el-ph/ELPH_Sigma_c_engine.F exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F interface/INIT_activate.F interface/INIT_load.F io/io_EXCPH_gkkp.F modules/mod_EXCPH.F Bugs: - Additions: -Added possibility to set phonon mode range Changes: - Patch sent by: Claudio Attaccalite --- src/el-ph/ELPH_Sigma_c_engine.F | 2 +- src/exc-ph/EXCPH_X_phass.F | 27 ++++++++++++++++++--------- src/exc-ph/EXCPH_eval_sat.F | 8 ++++---- src/exc-ph/EXCPH_gkkp_driver.F | 14 +++++++++----- src/exc-ph/EXCPH_lifetime.F | 3 +++ src/exc-ph/EXCPH_optics.F | 7 +++---- src/interface/INIT_activate.F | 4 ++-- src/interface/INIT_load.F | 2 +- src/io/io_EXCPH_gkkp.F | 10 ++-------- src/modules/mod_EXCPH.F | 14 +++++++------- 10 files changed, 50 insertions(+), 41 deletions(-) diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index 12fdf5e8e7..ba90954015 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -236,7 +236,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en if (eval_DW) then ! ph_E=sqrt(abs(PH_freqs_sq(iq_ibz,il))) - if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) + ! if(use_PH_DbGd.and.iq_bz==1) ph_E=PH_freqs%FG%E(1,il,1) ! do iq_idx=1,GKKP%E_dg_kpq(1)%nq_around ! Numbere of q-points around Gamma ! diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 38dc683b3f..0c6a90e381 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -46,7 +46,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,BS_Sat_W_DG,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & & BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free - use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold + use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,ph_modes use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset use functions, ONLY:boltzman_f,bose_f @@ -65,11 +65,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss real(SP) :: min_E,exc_E,E_alpha,PH_E integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - logical :: l_DbGd_Sigma_Only + logical :: l_DbGd_WEIGHTs integer :: iq_fg,iq_idx + integer :: elph_branches_save(2) integer, external :: io_EXCPH_gkkp,io_ELPH ! - call parser('DBGSigmaOnly',l_DbGd_Sigma_Only) + call parser('DbGdWEIGHTs',l_DbGd_WEIGHTs) ! min_pos =minloc(BS_all_E(1,:)) min_EXC_E=minval(BS_all_E(1,:)) @@ -83,9 +84,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') if(io_err/=0) call error('excph_gkkp databases not found!') ! + elph_branches_save=elph_branches call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') + elph_branches=elph_branches_save ! ! The satellites ! @@ -107,9 +110,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Add the contribution of q-point transition to the renormalization factors ! for all excionts i_alpha ! - if(use_PH_DbGd.and..not.l_DbGd_Sigma_Only) then + if(use_PH_DbGd.and.l_DbGd_WEIGHTs) then call Eval_Sat_Weights_DbGd() - elseif(use_PH_DbGd.and.l_DbGd_Sigma_Only) then + elseif(use_PH_DbGd.and..not.l_DbGd_WEIGHTs) then do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 BS_Sat_W_DG(:,:,:,iq_idx)=BS_Sat_WEIGHT @@ -164,13 +167,19 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call live_timing( ) ! - EXCPH_Renorm = EXCPH_Renorm/real(q%nbz,SP) - EXCPH_Renorm_PH_abs= EXCPH_Renorm_PH_abs/real(q%nbz,SP) + EXCPH_Renorm = EXCPH_Renorm/real(q%nbz,SP) + EXCPH_Renorm_PH_abs = EXCPH_Renorm_PH_abs/real(q%nbz,SP) + EXCPH_Renorm_PL = EXCPH_Renorm_PL/real(q%nbz,SP) + EXCPH_Renorm_PL_PH_abs= EXCPH_Renorm_PL_PH_abs/real(q%nbz,SP) ! - call msg('sr','Renormalization factors at finite temperature:') + call msg('sr','Renormalization factors at finite temperature [Absorption]:') do i_alpha=EXCPH_states(1),EXCPH_states(2) call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm(i_alpha),EXCPH_Renorm_PH_abs(i_alpha)/)) enddo + call msg('sr','Renormalization factors at finite temperature [Emission]:') + do i_alpha=EXCPH_states(1),EXCPH_states(2) + call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm_PL(i_alpha),EXCPH_Renorm_PL_PH_abs(i_alpha)/)) + enddo ! ! The term without satellites ! @@ -298,7 +307,7 @@ subroutine Eval_Renorm_Factor() ! ! Phonon emission in luminescence [photon emission / phonon emission] ! - EXCPH_Renorm_PL(i_alpha) = EXCPH_Renorm_PL(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*(1._SP+N_bose) + EXCPH_Renorm_PL(i_alpha) = EXCPH_Renorm_PL(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*(1._SP+N_bose) ! enddo enddo diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 9a6725f28d..505d3ed3d8 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -56,10 +56,10 @@ subroutine EXCPH_eval_sat(iq,q) BS_Sat_E (il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)+ph_E BS_Sat_E_PH_abs(il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)-ph_E ! - if(abs(BS_Sat_E(il,i_beta,i_alpha))FAN_deltaE_treshold) & +& BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E(il,i_beta,i_alpha))**2 + if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>FAN_deltaE_treshold) & +& BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)/real(q%nbz,SP) EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/real(q%nbz,SP) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index fcb9dfd147..4347aaea15 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -45,7 +45,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim - use ELPH, ONLY:elph_branches + use ELPH, ONLY:ph_modes,elph_branches use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control @@ -67,7 +67,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! integer, external :: io_ELPH,io_EXCPH_gkkp integer :: ID_gkkp,ID_exc_gkkp,io_err - integer :: il,iq,i1 + integer :: il,iq,i1,elph_branches_save(2) real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) ! @@ -131,10 +131,14 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Check if gkkp_expanded is present ! - call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID_gkkp) + elph_branches_save =elph_branches + ! + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. call deliver_IO_error_message(io_err,"GKKP") ! + elph_branches =elph_branches_save + ! if (io_err/=0) call error('El-Ph database not found') ! ! Write headers @@ -147,7 +151,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Main q-loop ! - call live_timing('Excitonic Gkkp',q%nibz*(elph_branches(2)-elph_branches(1)+1)) + call live_timing('Excitonic Gkkp',q%nibz*ph_modes) ! do iq=1,q%nibz ! @@ -162,7 +166,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) BS_Sat_WEIGHT =rZERO BS_Sat_WEIGHT_PH_abs=rZERO ! - do il=elph_branches(1),elph_branches(2) + do il=1,ph_modes ! call EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 9bef22754b..6c0929c274 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -52,6 +52,7 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) integer :: ID_exc_gkkp,ID_gkkp,io_err integer, external :: io_EXCPH_gkkp,io_ELPH integer :: iq_bz,i_alpha,i_beta,il + integer :: elph_branches_save(2) integer :: min_pos(1) ! call section('*','EXCPH-LifTime') @@ -80,8 +81,10 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') if(io_err/=0) call error('excph_gkkp databases not found!') ! + elph_branches_save = elph_branches call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + elph_branches = elph_branches_save if(io_err/=0) call error('gkkp_expanded databases not found!') ! ! Info on excitons diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index d321431fc2..ff073cdc34 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -31,11 +31,10 @@ subroutine EXCPH_optics(E,k,q,X,wv) use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use X_m, ONLY:X_t use X_output, ONLY:eps_file_name,pl_file_name,X_setup_file_names,X_write_messages_before_headers - use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & & BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,free_EXC,alloc_EXC - use ELPH, ONLY:use_PH_DbGd,elph_branches + use ELPH, ONLY:use_PH_DbGd,ph_modes use frequency, ONLY:w_samp ! #include @@ -93,8 +92,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) if(use_PH_DbGd) then dbgd_string='DbGd' max_filling=maxval(q%FGbz%N_mapped)+1 ! max number of tilde q around each q-point include the q itself - YAMBO_ALLOC(BS_Sat_W_DG,(elph_branches(2),EXCPH_sum(2),EXCPH_states(2),max_filling)) - YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(elph_branches(2),EXCPH_sum(2),EXCPH_states(2),max_filling)) + YAMBO_ALLOC(BS_Sat_W_DG,(ph_modes,EXCPH_sum(2),EXCPH_states(2),max_filling)) + YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(ph_modes,EXCPH_sum(2),EXCPH_states(2),max_filling)) BS_Sat_W_DG =rZERO BS_Sat_W_DG_PH_abs=rZERO endif diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index d9ce07ac44..8d810b5f2e 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,8 +457,8 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp EXCTemp DiagExcph DmRngeXd') - if (l_EXCPH_optics) call initactivate(1,'BoseTemp EXCTemp DiagExcph DBGSigmaOnly EnRngeXd DmRngeXd ETStpsXd') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DmRngeXd') + if (l_EXCPH_optics) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DbGdWEIGHTs EnRngeXd DmRngeXd ETStpsXd') ! #endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index ed5373c17e..4537f8f4b3 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -670,7 +670,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') - call it('f',defs,'DBGSigmaOnly', '[EXCPH] Double-grid only for Sigma') + call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid for satellite weights and renormalization too') ! ! GPL_EXCLUDE_START ! diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index f617a4604f..a4293c8e59 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -32,7 +32,7 @@ integer function io_EXCPH_gkkp(ID,what) & BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,L_kind_in,L_kind_out,Sat_alloc, & & EXCPH_gkkp_alloc use IO_int, ONLY:io_variable_elemental,def_variable_elemental - use ELPH, ONLY:ph_modes,elph_branches + use ELPH, ONLY:ph_modes use stderr, ONLY:intc use R_lattice, ONLY:nqibz use timing_m, ONLY:timing @@ -74,10 +74,7 @@ integer function io_EXCPH_gkkp(ID,what) ! io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) ! - call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) - ! - call io_elemental(ID,& -& VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"==","=="/)) + call io_elemental(ID,VAR="PARS",VAR_SZ=4,MENU=0) ! call io_elemental(ID,& & VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"==","=="/)) @@ -90,9 +87,6 @@ integer function io_EXCPH_gkkp(ID,what) io_EXCPH_gkkp=io_status(ID) if (io_EXCPH_gkkp/=0) goto 1 ! - call io_bulk(ID,VAR="PH_BRANCHES",VAR_SZ=(/2/)) - call io_bulk(ID,I1=elph_branches) - ! call io_bulk(ID,VAR="EXCITON_STATES",VAR_SZ=(/2/)) call io_bulk(ID,I1=EXCPH_states) ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 1ba4ab5b5d..b738eb09e8 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -26,7 +26,7 @@ module EXCPH use pars, ONLY:SP,schlen,lchlen,cZERO,rZERO use BS_solvers, ONLY:BSS_n_eig use BS, ONLY:BS_H_dim - use ELPH, ONLY:elph_branches + use ELPH, ONLY:ph_modes ! #include ! @@ -97,10 +97,10 @@ module EXCPH ! subroutine Sat_alloc() implicit none - YAMBO_ALLOC(BS_Sat_E,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(BS_Sat_E_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(BS_Sat_WEIGHT,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(BS_Sat_WEIGHT_PH_abs,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_E,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_E_PH_abs,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_WEIGHT,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BS_Sat_WEIGHT_PH_abs,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) ! BS_Sat_E =rZERO BS_Sat_E_PH_abs =rZERO @@ -141,8 +141,8 @@ end subroutine Renorm_free ! subroutine EXCPH_gkkp_alloc() implicit none - YAMBO_ALLOC(EXCPH_Gkkp,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(EXCPH_Gkkp_sq,(elph_branches(1):elph_branches(2),EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Gkkp,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(EXCPH_Gkkp_sq,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(Xi,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2),2)) EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO From 86ec002c6d06a60c2e21809f68cd1254dc4ee66b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 27 Feb 2022 20:26:17 +0100 Subject: [PATCH 0196/1367] Version 5.1.1, Revision 21297, Hash e2a2371c6 MODIFIED * include/driver/version.h Bugs: - Additions: -Fixed conflit and bug Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 66e5aec849..5a3db725af 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21294 -#define YAMBO_HASH "e60d8bd4f" +#define YAMBO_REVISION 21297 +#define YAMBO_HASH "e2a2371c6" From 782386fa0331d553b0526d3aa3cb85bec63e7ff2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 27 Feb 2022 20:33:47 +0100 Subject: [PATCH 0197/1367] Version 5.1.1, Revision 21298, Hash 86ec002c6 MODIFIED * include/driver/version.h Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5a3db725af..12e40a4716 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21297 +#define YAMBO_REVISION 21298 #define YAMBO_HASH "e2a2371c6" From 5221e824cb9e6fe12c1abd5d6986bf48e8386a63 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 27 Feb 2022 22:42:13 +0100 Subject: [PATCH 0198/1367] Version 5.1.1, Revision 21299, Hash 782386fa0 MODIFIED * driver/yambo.F include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_lifetime.F interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F modules/mod_EXCPH.F Additions: -Introduce L broadening parameters for the life-time Changes: - Patch sent by: Claudio Attaccalite --- driver/yambo.F | 2 +- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 3 +-- src/exc-ph/EXCPH_lifetime.F | 17 ++++++++--------- src/interface/INIT_activate.F | 5 +++-- src/interface/INIT_load.F | 5 +++-- src/modules/SET_defaults.F | 5 +++-- src/modules/mod_EXCPH.F | 1 + 8 files changed, 22 insertions(+), 20 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 0315d1fb66..0dbc91ab87 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -244,7 +244,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) ! driver_now=l_EXCPH_lifetime - if(driver_now) call EXCPH_lifetime(Ken,Xk,q,X(i_X_kind),Xw(3)) + if(driver_now) call EXCPH_lifetime(Ken,Xk,q,X(i_X_kind)) #endif ! ! diff --git a/include/driver/version.h b/include/driver/version.h index 12e40a4716..bf488ba7e9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21298 -#define YAMBO_HASH "e2a2371c6" +#define YAMBO_REVISION 21299 +#define YAMBO_HASH "86ec002c6" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 0c6a90e381..0a370d7bdd 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -256,7 +256,7 @@ subroutine Eval_Sat_Weights_DbGd() ! E_beta =EXC_E_DbGd(i_beta,iq_fg) ! - if(ph_EFAN_deltaE_treshold) & & BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) =EXC_gkkp_sq/abs(E_beta-E_alpha+ph_E)**2 @@ -285,7 +285,6 @@ subroutine Eval_Renorm_Factor() do il=elph_branches(1),elph_branches(2) ! ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) - ! if(ph_E @brief Calculate exciton non-radiative life-time induced by phonon-scattering !! -subroutine EXCPH_lifetime(E,k,q,X,wv) +subroutine EXCPH_lifetime(E,k,q,X) ! use units, ONLY:HA2EV,HA2CMm1 use pars, ONLY:SP,cZERO,rZERO,schlen,pi @@ -34,7 +34,7 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) use X_m, ONLY:X_t use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in, & + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping, & & alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq use ELPH, ONLY:PH_freqs,use_PH_DbGd,elph_branches,FAN_deltaE_treshold use frequency, ONLY:w_samp @@ -45,7 +45,6 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) type(levels) ::E type(bz_samp) ::k,q type(X_t) ::X - type(w_samp) :: wv ! ! Work space ! @@ -94,7 +93,7 @@ subroutine EXCPH_lifetime(E,k,q,X,wv) ! call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') - call msg('rs','Self-energy broadening : ',wv%dr(1)*HA2EV*1000._SP,'meV') + call msg('rs','Self-energy broadening : ',L_damping*HA2EV*1000._SP,'meV') ! ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) @@ -169,8 +168,8 @@ function Simple_pole() ! F_boltz=boltzman_f(E_beta-min_EXC_E) ! Bose function? Boltzman function? ! - Simple_pole=(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,wv%dr(1)) & -& +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,wv%dr(1)) + Simple_pole=(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,L_damping) & +& +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! end function Simple_Pole ! @@ -204,8 +203,8 @@ function DbGrid_pole() E_beta=EXC_E_DbGd(i_beta,iq_fg) F_boltz=boltzman_f(E_beta-min_EXC_E_DbGd) ! Bose function? Boltzman function? ! - DbGrid_pole=DbGrid_pole+(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,wv%dr(1)) & -& +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,wv%dr(1)) + DbGrid_pole=DbGrid_pole+(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,L_damping) & +& +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! enddo ! @@ -234,7 +233,7 @@ subroutine print_and_write() call msg('o '//what,'#') call msg('o '//what,'# Exciton Sum : '//trim(intc(EXCPH_sum(1)))//' - '//trim(intc(EXCPH_sum(2)))) call msg('o '//what,'# Exciton States : '//trim(intc(EXCPH_states(1)))//' - '//trim(intc(EXCPH_states(2)))) - call msg('o '//what,'# Self-Energy broadening :'//trim(real2ch(wv%dr(1)*HA2EV*1000._SP))//' meV') + call msg('o '//what,'# Self-Energy broadening :'//trim(real2ch(L_damping*HA2EV*1000._SP))//' meV') call msg('o '//what,'# FAN treshold :'//trim(real2ch(FAN_deltaE_treshold*HA2EV*1000._SP))//' meV') call msg('o '//what,'# PH Doble-Grid : '//log2ch(use_PH_DbGd)) ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 8d810b5f2e..618195c98b 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,8 +457,9 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DmRngeXd') - if (l_EXCPH_optics) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DbGdWEIGHTs EnRngeXd DmRngeXd ETStpsXd') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph LDamping') + if (l_EXCPH_optics) & +& call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DbGdWEIGHTs EnRngeXd DmRngeXd ETStpsXd') ! #endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 4537f8f4b3..fe1bada1da 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP @@ -670,7 +670,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') - call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid for satellite weights and renormalization too') + call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') + call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) ! ! GPL_EXCLUDE_START ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index d437ca484c..4956674fe9 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -24,7 +24,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! use debug, ONLY:dbg - use pars, ONLY:SP,cZERO + use pars, ONLY:SP,cZERO,rZERO use C_driver, ONLY:code_branch use units, ONLY:HA2EV,FS2AUT,kWCMm22AU use LOGO, ONLY:ID_logo,ID_logo_stderr @@ -84,7 +84,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -539,6 +539,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Lout_path='none' EXCPH_states=(/1,1/) EXCPH_sum=(/1,1/) + L_damping=0.0005/HA2EV ! set to 0.5 meV ! #endif ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index b738eb09e8..46af7652aa 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -76,6 +76,7 @@ module EXCPH real(SP), allocatable :: ph_EXCPH_E(:) complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) + real(SP) :: L_damping ! ! Minimum excitonic energy ! From 83b9d11343ad42759c6af26fd3219060fb9ae98b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Feb 2022 14:54:04 +0100 Subject: [PATCH 0199/1367] Version 5.1.1, Revision 21300, Hash 5221e824c MODIFIED * include/driver/version.h bse/K_dipoles.F bse/K_driver.F bse/K_driver_init.F bse/K_exchange_collisions.F Bugs: -Fixed bug with Lfull and full names in the BSE Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/bse/K_dipoles.F | 2 +- src/bse/K_driver.F | 4 +++- src/bse/K_driver_init.F | 10 ++++------ src/bse/K_exchange_collisions.F | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index bf488ba7e9..811d2da224 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21299 -#define YAMBO_HASH "86ec002c6" +#define YAMBO_REVISION 21300 +#define YAMBO_HASH "5221e824c" diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 72157c2640..d1d9bd3a3a 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -225,7 +225,7 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) ! call live_timing() ! - if (trim(L_kind)=="full") then + if (index(L_kind,"full")>0) then do i_T_g=1,BS_nT_grps if (.not.allocated(BS_T_grp(i_T_g)%dipoles_opt) ) then YAMBO_ALLOC(BS_T_grp(i_T_g)%dipoles_opt,(BS_dip_size,BS_T_grp(i_T_g)%size,2/BS_n_eh_spaces)) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 850b1006de..16c373a045 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -82,6 +82,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) global_gauge="length" endif ! + L_kind=trim(L_kind) + if (L_kind(1:1)/='L') L_kind="L"//L_kind call msg('s','[BSE] Response kind is ',trim(L_kind)) ! ! Energy points @@ -148,7 +150,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! If the Coulomb cutoff is used and the system is 1D or 2D eps and eels are different at finite q if (l_col_cut.and.(l_1D.or.l_2D)) then if(iq==1) BSS_eels_to_eps=.false. - if(iq/=1) BSS_eels_to_eps=trim(L_kind)=="Lfull" + if(iq/=1) BSS_eels_to_eps=(index(L_kind,"full")>0) endif ! ! BSS output arrays diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 55b002157a..a74777df74 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -61,12 +61,10 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! ! L_kind check !============== - if (trim(L_kind(1:1))/='L') L_kind="L"//trim(L_kind) - if (trim(L_kind)/="Lbar".and.trim(L_kind)/="Lfull".and.trim(L_kind)/="Ltilde") then - call error('set Lkind = Lbar or Lfull or Ltilde ') - endif + if (index(L_kind,"Lbar")==0.and.index(L_kind,"full")==0.and.index(L_kind,"Ltilde")==0) & +& call error('set Lkind = Lbar or Lfull or Ltilde') ! - if (trim(L_kind)=="Lfull".and.(STRING_match(BSE_mode,'causal').or.STRING_match(BSE_mode,'retarded'))) then + if (index(L_kind,"full")>0.and.(STRING_match(BSE_mode,'causal').or.STRING_match(BSE_mode,'retarded'))) then call warning(' Lkind=Lfull with retarded leads to bad epsilon. Use either resonant or coupling. Setting resonant. ') BSE_mode="resonant" endif @@ -154,7 +152,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) endif ! ! Remove exchange if computing the irreducible response - if (trim(L_kind)=="Ltilde") then + if (index(L_kind,"Ltilde")>0) then BS_res_K_exchange=.FALSE. BS_cpl_K_exchange=.FALSE. endif diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index 44c15565d5..07bd5bab17 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -101,8 +101,8 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) ! ! G==0 term ! - if(trim(L_kind)=="Lfull") BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=BS_T_grp(i_T_grp)%dipoles_opt(1,i_T_el,1) - if(trim(L_kind)=="Lbar") BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=cZERO + if(index(L_kind,"full")>0) BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=BS_T_grp(i_T_grp)%dipoles_opt(1,i_T_el,1) + if(index(L_kind,"Lbar")>0) BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=cZERO ! ! G/=0 terms ! @@ -167,8 +167,8 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) call DEV_SUB(scatter_Bamp)(K_EXCH_collision) ! BS_T_grp(i_T_grp)%DEV_VAR(O_x)(1,i_T_el)=cZERO - if(trim(L_kind)=="Lfull") i_g0=1 - if(trim(L_kind)=="Lbar") i_g0=2 + if(index(L_kind,"full")>0) i_g0=1 + if(index(L_kind,"Lbar")>0) i_g0=2 ! #ifdef _CUDA call dev_memcpy(BS_T_grp(i_T_grp)%O_x_d(:,i_T_el),K_EXCH_collision%rhotw_d, range1=(/i_g0,BS_n_g_exch/)) From 6a971198e7782b7003126d7e027fb9b5e7d7b0f8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Feb 2022 15:09:42 +0100 Subject: [PATCH 0200/1367] Version 5.1.1, Revision 21301, Hash 83b9d1134 MODIFIED * include/driver/version.h bse/K_driver.F bse/K_driver_init.F Bugs: -Fixed again bug in Lfull and full Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/bse/K_driver.F | 3 +-- src/bse/K_driver_init.F | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 811d2da224..d6dd6143d4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21300 -#define YAMBO_HASH "5221e824c" +#define YAMBO_REVISION 21301 +#define YAMBO_HASH "83b9d1134" diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 16c373a045..ba96d75c69 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -82,8 +82,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) global_gauge="length" endif ! - L_kind=trim(L_kind) - if (L_kind(1:1)/='L') L_kind="L"//L_kind + if (index(L_kind,'L')==0) L_kind="L"//trim(L_kind) call msg('s','[BSE] Response kind is ',trim(L_kind)) ! ! Energy points diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index a74777df74..70609a8638 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -104,7 +104,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! Need to convert eels to epsilon ? (part A, part B in K_driver) !================================================================ ! If the Coulomb cutoff is not used (ie the system is 3D) eps/=eps^-1 - if (.not.l_col_cut) BSS_eels_to_eps=trim(L_kind)=="full" + if (.not.l_col_cut) BSS_eels_to_eps=(index(L_kind,"full")>0) ! If the Coulomb cutoff is used and the system is 0D eps= eps^-1=1 since vbar=0 if ( l_col_cut.and.l_0D) BSS_eels_to_eps=.false. ! If the Coulomb cutoff is used and the system is 1D or 2D it depends on the q-point (see part B) @@ -158,7 +158,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) endif #if defined _PHEL ! [EXCPH]: Allow code to go back to different Lkind calculations after Ltilde - if ((trim(L_kind)/="Ltilde").and.(.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.)) then + if (index(L_kind,"Ltilde")==0).and.(.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.)) then BS_res_K_exchange=.TRUE. BS_cpl_K_exchange=BS_res_K_exchange endif From 629d7b74c7c322167c7ee7f0a5601fe9267c3723 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Feb 2022 15:18:00 +0100 Subject: [PATCH 0201/1367] Fixed compilation yambo_rt --- src/bse/K_driver_init.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 70609a8638..3f88759697 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -158,7 +158,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) endif #if defined _PHEL ! [EXCPH]: Allow code to go back to different Lkind calculations after Ltilde - if (index(L_kind,"Ltilde")==0).and.(.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.)) then + if (index(L_kind,"Ltilde")==0.and.(.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.)) then BS_res_K_exchange=.TRUE. BS_cpl_K_exchange=BS_res_K_exchange endif From 773d4d1cd82df183ddbffd554db1e745eac956a6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 1 Mar 2022 12:31:24 +0100 Subject: [PATCH 0202/1367] Version 5.1.1, Revision 21303, Hash 629d7b74c MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Bugs: -Fixed Binx io Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 25 ++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d6dd6143d4..b46db1eb2e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21301 -#define YAMBO_HASH "83b9d1134" +#define YAMBO_REVISION 21303 +#define YAMBO_HASH "629d7b74c" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 4347aaea15..63fdab649f 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -260,12 +260,31 @@ end subroutine BSE_free ! subroutine build_k_plus_q_table() ! - integer, external ::qindx_B_init,qindx_B_close - integer :: qindx_ID,qindx_ID_frag,qindx_tmp(2) + use parallel_int, ONLY:PARALLEL_global_indexes + use R_lattice, ONLY:bse_scattering + ! + integer, external ::qindx_B_init,qindx_B_close,io_QINDX + integer :: qindx_ID,qindx_ID_frag,qindx_tmp(2),ID,io_err integer :: ik_bz,iq_bz,ip_bz ! + if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') + ! + call PARALLEL_global_indexes(E,k,q,"BZ_Indexes") + call PARALLEL_SETUP_K_scheme("BZINDX") + ! + ! here qindx_B is allocated + ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,5/),ID=ID) + io_err=io_QINDX(k,q,ID) + if (io_err/=0) then + call msg('s',"Missing k/q scattering database") + call error("Please run a setup with the BSEscatt flag activated") + endif + ! + io_err=qindx_B_init(qindx_ID,qindx_ID_frag) + if(io_err/=0) call error("Error reading qindx_B") + ! call live_timing('K plus q table',k%nbz) - qindx_tmp=qindx_B_init(qindx_ID,qindx_ID_frag) do ik_bz=1,k%nbz call live_timing(steps=1) IQ_bz_loop: do iq_bz=1,q%nbz From 173b39dc89c17f7b12ca6cda6dc5267213d63fa3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 1 Mar 2022 12:40:34 +0100 Subject: [PATCH 0203/1367] Version 5.1.1, Revision 21304, Hash 773d4d1cd MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Changes: -Fixed name of the excitonic lifetime file Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b46db1eb2e..e756b2158f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21303 -#define YAMBO_HASH "629d7b74c" +#define YAMBO_REVISION 21304 +#define YAMBO_HASH "773d4d1cd" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index f7b3df2189..618740304a 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -219,7 +219,7 @@ subroutine print_and_write() ! implicit none ! - character(schlen) :: what='exc_QP' + character(schlen) :: what='QP' ! call OUTPUT_add_column(what,action="reset") call OUTPUT_add_column(what,action="open") From 217f6a62a286b201fa7cff987df7615dd11c0d66 Mon Sep 17 00:00:00 2001 From: attacc Date: Fri, 4 Mar 2022 16:53:48 +0100 Subject: [PATCH 0204/1367] Version 5.1.1, Revision 21305, Hash 173b39d MODIFIED * modified: modified: modified: Bugs: -Small spelling in a comment Additions: - Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- src/el-ph/ELPH_Sigma_c.F | 2 +- src/el-ph/ELPH_Sigma_c_engine.F | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e756b2158f..fc0bad1ef3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21304 -#define YAMBO_HASH "773d4d1cd" +#define YAMBO_REVISION 21305 +#define YAMBO_HASH "173b39d" diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index 5596410cb4..121cc8e688 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -416,7 +416,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) ! ! Debye energy ! - call msg('nr','[Ph] Debye energy ',(/PH_W_debye*HA2EV,PH_W_debye*HA2THZ/),"[ev/ThZ]") + call msg('nrs','[Ph] Debye energy ',(/PH_W_debye*HA2EV,PH_W_debye*HA2THZ/),"[ev/ThZ]") ! ! Here I use the Cardona-Allen g^2 F functions to evaluate their integrated value. ! I also calculate the full frequency dependent self-energy diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index 4cf10633c6..fbdba4be84 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -32,7 +32,7 @@ !! @param[in] elph_gkkp_sq electron-phonon matrix elements squares !! !! @param[out] gsqF_fan Fan self-energy, real-part -!! @param[out] gsqF_dw Debye-Waller sefl-energy +!! @param[out] gsqF_dw Debye-Waller self-energy !! @param[out] gsqF_ca_corr Additional term in Fan self-energy for metals [A. Marini] !! @param[out] gsqF_life_bose Imaginary part Fan self-energy Bose part !! @param[out] gsqF_life_f Imaginary part Fan self-energy Fermi part From a1c3037f1b1af5da92472573dcdde07dcf21f445 Mon Sep 17 00:00:00 2001 From: attacc Date: Fri, 4 Mar 2022 16:56:14 +0100 Subject: [PATCH 0205/1367] Version 5.1.1, Revision 21306, Hash 217f6a6 MODIFIED * modified: modified: Additions: -Additional check in the GKKP k-expansion Changes: - Patch sent by: attacc --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fc0bad1ef3..5ecf4fb48e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21305 -#define YAMBO_HASH "173b39d" +#define YAMBO_REVISION 21306 +#define YAMBO_HASH "217f6a6" diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index d3f6701514..374266e523 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -72,6 +72,8 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag enddo enddo ! + if(any(local_K_found==.FALSE.)) call error('Error expanding GKKP please check if force_symmorphic=.true. ') + ! endif ! if (.not.mode=="Q") return From 40f361d5284702beaea828da562ee343ec6a96cb Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 7 Mar 2022 09:13:48 +0100 Subject: [PATCH 0206/1367] Version 5.1.1, Revision 21307, Hash a1c3037f1 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases_IO_gkkp_expand.F Bugs: -Fixed compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5ecf4fb48e..6de983c31d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21306 -#define YAMBO_HASH "217f6a6" +#define YAMBO_REVISION 21307 +#define YAMBO_HASH "a1c3037f1" diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index 374266e523..cb06ddf09e 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -72,7 +72,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag enddo enddo ! - if(any(local_K_found==.FALSE.)) call error('Error expanding GKKP please check if force_symmorphic=.true. ') + if(any(local_K_found.eqv..FALSE.)) call error('Error expanding GKKP please check if force_symmorphic=.true. ') ! endif ! From 3f1e3b9c4093a92fd5787c1c3d46c7ff7b25e2be Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Mar 2022 10:10:16 +0100 Subject: [PATCH 0207/1367] Version 5.1.1, Revision 21310, Hash 52c2d906c MODIFIED * config/m4/acx_report.m4 config/m4/yambo_specific.m4 config/mk/global/defs.mk.in config/report.in configure include/driver/version.h include/headers/common/yambo_wfs.h modules/SET_defaults.F Changes: - def_mol renamed def_gamma_only Patch sent by: Davide Sangalli --- config/m4/acx_report.m4 | 6 +++--- config/m4/yambo_specific.m4 | 14 +++++++------- config/mk/global/defs.mk.in | 2 +- config/report.in | 6 +++--- configure | 28 ++++++++++++++-------------- include/driver/version.h | 4 ++-- include/headers/common/yambo_wfs.h | 8 ++++---- src/modules/SET_defaults.F | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index 0d67d62fb2..30be4ecaa8 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -29,8 +29,8 @@ AC_DEFUN([ACX_REPORT], DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # -MOL_check="-" -if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi # KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi @@ -200,7 +200,7 @@ if test "$mpibuild" = "yes" ; then fi # AC_SUBST(DP_check) -AC_SUBST(MOL_check) +AC_SUBST(GAMMA_ONLY_check) AC_SUBST(KEEP_OBJS_check) AC_SUBST(TIME_profile_check) AC_SUBST(MEM_profile_check) diff --git a/config/m4/yambo_specific.m4 b/config/m4/yambo_specific.m4 index e003f0fc80..2965c50cdb 100644 --- a/config/m4/yambo_specific.m4 +++ b/config/m4/yambo_specific.m4 @@ -71,13 +71,13 @@ AC_SUBST(def_dp) AC_SUBST(build_precision) # # ============================================================================ -# VERSION for molecules -AC_ARG_ENABLE(mol, AC_HELP_STRING([--enable-mol], [Molecules build. Default is no.])) -def_mol="" -if test x"$enable_mol" = "x"; then enable_mol="no"; fi -if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi -AC_SUBST(enable_mol) -AC_SUBST(def_mol) +# VERSION for gamma only case +AC_ARG_ENABLE(gamma_only, AC_HELP_STRING([--enable-gamma-only], [Gamma only build. Default is no.])) +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi +AC_SUBST(enable_gamma_only) +AC_SUBST(def_gamma_only) # # ============================================================================ # diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index cbb5436839..1189e6acde 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -29,7 +29,7 @@ netcdf = @def_netcdf@ scalapack = @def_scalapack@ slepc = @def_slepc@ fft = @def_fft@ -xcpp = @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_memory_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_mol@ +xcpp = @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_memory_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_gamma_only@ p2ycpp = @PW_CPP@ keep_objs = @enable_keep_objects@ do_blacs = @compile_blacs@ diff --git a/config/report.in b/config/report.in index ddaac24129..c26e165f28 100644 --- a/config/report.in +++ b/config/report.in @@ -14,7 +14,7 @@ # [EDITOR] @editor@ # [ MAKE ] @MAKE@ # -# [@MOL_check@] Version for isolated systems +# [@GAMMA_ONLY_check@] Gamma-only version of the code # [@DP_check@] Double precision # [@KEEP_OBJS_check@] Keep object files # [@TIME_profile_check@] Run-Time timing profile @@ -74,8 +74,8 @@ # FC kind = @FCKIND@ @FCVERSION@ # MPI kind= @MPIKIND@ # -# [ CPP ] @CPP@ @CPPFLAGS_yambo@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @PW_CPP@ -# [ FPP ] @FPP@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ +# [ CPP ] @CPP@ @CPPFLAGS_yambo@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_gamma_only@ @PW_CPP@ +# [ FPP ] @FPP@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_gamma_only@ # [ CC ] @CC@ @CFLAGS@ # [ FC ] @FC@ @FCFLAGS@ @OPENMPLIBS@ @CUDA_FLAGS@ # [ FCUF] @FCUFLAGS@ @CUDA_FLAGS@ diff --git a/configure b/configure index fad3205f8b..9db2b970e3 100755 --- a/configure +++ b/configure @@ -650,7 +650,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check -MOL_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -827,8 +827,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile -def_mol -enable_mol +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -889,7 +889,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp -enable_mol +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1622,7 +1622,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. - --enable-mol Molecules build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3074,15 +3074,15 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double # # ============================================================================ -# VERSION for molecules -# Check whether --enable-mol was given. -if test "${enable_mol+set}" = set; then : - enableval=$enable_mol; +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test "${enable_gamma_only+set}" = set; then : + enableval=$enable_gamma_only; fi -def_mol="" -if test x"$enable_mol" = "x"; then enable_mol="no"; fi -if test x"$enable_mol" = "xyes"; then def_mol="-D_MOL"; fi +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi # @@ -14743,8 +14743,8 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # -MOL_check="-" -if test "$enable_mol" = "yes" ; then MOL_check="X"; fi +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi # KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi diff --git a/include/driver/version.h b/include/driver/version.h index bed2f0a70f..231fb77fac 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21197 -#define YAMBO_HASH "7827583eb" +#define YAMBO_REVISION 21310 +#define YAMBO_HASH "52c2d906c" diff --git a/include/headers/common/yambo_wfs.h b/include/headers/common/yambo_wfs.h index ea36a1c09a..d7fe0ef20d 100644 --- a/include/headers/common/yambo_wfs.h +++ b/include/headers/common/yambo_wfs.h @@ -22,26 +22,26 @@ MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. */ -#ifdef _MOL +#ifdef _GAMMA_ONLY # define WF_RSPACE real #else # define WF_RSPACE complex #endif -#ifdef _MOL +#ifdef _GAMMA_ONLY # define wfconjg(x) x #else # define wfconjg(x) conjg(x) #endif -#ifdef _MOL +#ifdef _GAMMA_ONLY # define wfaimag(x) x #else # define wfaimag(x) aimag(x) #endif -#ifdef _MOL +#ifdef _GAMMA_ONLY # define wfcmplx(x,y) real(x,y) #else # define wfcmplx(x,y) cmplx(x,y) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index ef8ba40d09..c05b50d0b2 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -336,7 +336,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) wf_norm_test=.TRUE. wf_nb_io=0 wf_nb_io_groups=1 -#if defined _MOL +#if defined _GAMMA_ONLY rho_map_thresh=1.E-7_SP #else rho_map_thresh=0._SP From 395546a64cdae533eb50c5bef6216c2e8f7c3229 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Mar 2022 11:57:55 +0100 Subject: [PATCH 0208/1367] Version 5.1.1, Revision 21352, Hash 7f17f2f83 MODIFIED * configure include/driver/version.h Bugs: - [configure] Fixed after merge with bug-fixes Patch sent by: Davide Sangalli --- configure | 36 +++++++++++++++++++++++++++++++++++- include/driver/version.h | 4 ++-- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 1610ca1a65..238555c2be 100755 --- a/configure +++ b/configure @@ -650,6 +650,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -826,6 +827,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -858,6 +861,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -885,6 +889,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1026,6 +1031,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1278,6 +1284,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1415,7 +1430,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1568,6 +1583,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1606,6 +1622,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3055,6 +3072,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test "${enable_gamma_only+set}" = set; then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -14717,6 +14747,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14888,6 +14921,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index 0f584ea3b1..600aac6343 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21227 -#define YAMBO_HASH "2a8427486" +#define YAMBO_REVISION 21352 +#define YAMBO_HASH "7f17f2f83" From 6214b84caa0055f0b2916701d647d72aeba8ba10 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Mar 2022 12:18:20 +0100 Subject: [PATCH 0209/1367] Version 5.1.1, Revision 21188, Hash a2289340d MODIFIED * include/driver/version.h bse/K_Transitions_setup.F interface/INIT_activate.F interface/INIT_load.F modules/mod_BS.F Changes: - [yambo] First optimization for semicore excitons coded Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_Transitions_setup.F | 12 ++++++++++-- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 4 +++- src/modules/mod_BS.F | 1 + 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3c5b68b49a..ff3ed1fedd 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21181 -#define YAMBO_HASH "4394c0edc" +#define YAMBO_REVISION 21188 +#define YAMBO_HASH "a2289340d" diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 1f38099742..d7f9b145b0 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -49,10 +49,11 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) use pars, ONLY:SP use stderr, ONLY:intc use com, ONLY:isec + use parser_m, ONLY:parser use BS_solvers, ONLY:BSS_mode ! mode ="T" use BS, ONLY:T_group,BS_bands,BS_T_grp,BS_nT_grps,BS_n_eh_spaces,& -& BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC +& BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,BS_core_bands ! mode ="K" use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & & l_BS_ares_from_res,BS_n_eh_spaces,BS_res_ares_n_mat @@ -80,7 +81,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! character(1) :: sec real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL - logical :: l_trans_in_group,l_grp_to_grp + logical :: l_trans_in_group,l_grp_to_grp,l_core_only integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2,isp1,isp2, & & i_T_now,i_T_group_now,i_T_group_last,i_T_group_start,i_g,n_loops,i_loop,i_T_in_the_grp,i_res_ares,& & BS_nT_at_k_tmp(Xk%nibz*2),V_bands(2),C_bands(2) @@ -114,6 +115,13 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! V_bands=(/BS_bands(1),maxval(Ken%nbm)/) C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) + ! + call parser('BSECoreBands', l_core_only) + if (l_core_only) then + if (BS_core_bands(1)V_bands(2)) call error(" BSECoreBands range must fit in BSEbands range") + V_bands=(/BS_core_bands(1),BS_core_bands(2)/) + endif + ! #if defined _RT ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. if (l_rt_carriers_in_use.and.EQ_Transitions) then diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 033d0f1b8e..ec25bc5288 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -263,7 +263,7 @@ subroutine INIT_activate() ! call initactivate(1,'DrudeWBS Reflectivity') call initactivate(1,'BoseCut ShiftedPaths') - call initactivate(1,'BSEQptR BSEBands BSKCut BSKIOmode BSEEhEny BSehWind NoDiagSC') + call initactivate(1,'BSEQptR BSEBands BSECoreBands BSKCut BSKIOmode BSEEhEny BSehWind NoDiagSC') ! #if defined _RT call initactivate(1,'RTOccMode ForceEqTrans') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 6ffb2255f3..64598a0583 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -48,7 +48,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,& & bz_samp,RIM_ng,RIM_epsm1,RIM_id_epsm1_reference,& & RIM_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff - use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,& + use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_core_bands,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,& & BSS_dr,BSS_er,BSS_q0,BSS_damp_reference,BSS_inversion_mode,& @@ -294,6 +294,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSEmod', '[BSE] resonant/retarded/coupling',BSE_mode,case="a") call it(defs,'Lkind', '[BSE] Lbar (default) / full',L_kind,verb_level=V_resp) call it(defs,'BSEBands','[BSK] Bands range',BS_bands) + call it(defs,'BSECoreBands','[BSK] Bands range for Core Hole. If set higher energy bands are ignored in the hole channel',& +& BS_core_bands,verb_level=V_resp) call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]',BS_n_g_W,G_unit) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) call it(defs,'BSENGfxc','[BSK] Fxc components', BS_n_g_fxc,G_unit,verb_level=V_resp) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index d3adef43b5..89ff405bdd 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -71,6 +71,7 @@ module BS integer :: BS_IO_dim(2,4) integer :: MAX_BSK_LIN_size integer :: BS_bands(2) + integer :: BS_core_bands(2) integer :: BS_q(2) integer :: BS_identifier integer(IPL) :: BS_lin_size_compressed From 937058311fc07a1c18dab79b716b94e65a74b976 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Mar 2022 12:59:48 +0100 Subject: [PATCH 0210/1367] Version 5.1.1, Revision 21200, Hash 29acd4a04 MODIFIED * include/driver/version.h bse/K_Transitions_setup.F modules/mod_BS.F Changes: - [yambo] Working on code for BSE - XUV implementation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_Transitions_setup.F | 9 +++++---- src/modules/mod_BS.F | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index bed2f0a70f..d3fd3fb4b6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21197 -#define YAMBO_HASH "7827583eb" +#define YAMBO_REVISION 21200 +#define YAMBO_HASH "29acd4a04" diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index d7f9b145b0..9f8f110b87 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -53,7 +53,8 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) use BS_solvers, ONLY:BSS_mode ! mode ="T" use BS, ONLY:T_group,BS_bands,BS_T_grp,BS_nT_grps,BS_n_eh_spaces,& -& BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,BS_core_bands +& BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,& +& BS_core_bands,l_BS_core_hole ! mode ="K" use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & & l_BS_ares_from_res,BS_n_eh_spaces,BS_res_ares_n_mat @@ -81,7 +82,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! character(1) :: sec real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL - logical :: l_trans_in_group,l_grp_to_grp,l_core_only + logical :: l_trans_in_group,l_grp_to_grp integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2,isp1,isp2, & & i_T_now,i_T_group_now,i_T_group_last,i_T_group_start,i_g,n_loops,i_loop,i_T_in_the_grp,i_res_ares,& & BS_nT_at_k_tmp(Xk%nibz*2),V_bands(2),C_bands(2) @@ -116,8 +117,8 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) V_bands=(/BS_bands(1),maxval(Ken%nbm)/) C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) ! - call parser('BSECoreBands', l_core_only) - if (l_core_only) then + call parser('BSECoreBands', l_BS_core_hole) + if (l_BS_core_hole) then if (BS_core_bands(1)V_bands(2)) call error(" BSECoreBands range must fit in BSEbands range") V_bands=(/BS_core_bands(1),BS_core_bands(2)/) endif diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 89ff405bdd..02ed18adaf 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -53,6 +53,7 @@ module BS ! ! Kind of response function !=========================== + logical :: l_BS_core_hole logical :: l_BS_jdos logical :: l_BS_trace logical :: l_BS_abs From 07a48f940d1a424834e0542ff0aa86bec76772a5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Mar 2022 18:49:36 +0100 Subject: [PATCH 0211/1367] Version 5.1.1, Revision 21353, Hash 395546a64 MODIFIED * include/driver/version.h dipoles/DIPOLE_kb_abinit_comp.F dipoles/DIPOLE_kb_abinit_def_dim.F dipoles/DIPOLE_kb_pwscf_comp.F dipoles/DIPOLE_kb_pwscf_def_dim.F dipoles/DIPOLE_kb_sum.F dipoles/DIPOLE_transverse.F modules/mod_pseudo.F Changes: - [yambo] New version implemented to calculate [x,Vnl] term in dipoles using much less memory Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/dipoles/DIPOLE_kb_abinit_comp.F | 38 ++++++++++------- src/dipoles/DIPOLE_kb_abinit_def_dim.F | 8 +++- src/dipoles/DIPOLE_kb_pwscf_comp.F | 41 ++++++++++-------- src/dipoles/DIPOLE_kb_pwscf_def_dim.F | 8 +++- src/dipoles/DIPOLE_kb_sum.F | 13 +++--- src/dipoles/DIPOLE_transverse.F | 57 ++++++++++++++++---------- src/modules/mod_pseudo.F | 1 + 8 files changed, 104 insertions(+), 66 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 600aac6343..dcc1d1b8ae 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21352 -#define YAMBO_HASH "7f17f2f83" +#define YAMBO_REVISION 21353 +#define YAMBO_HASH "395546a64" diff --git a/src/dipoles/DIPOLE_kb_abinit_comp.F b/src/dipoles/DIPOLE_kb_abinit_comp.F index b887b42676..7ef3fbb8b4 100644 --- a/src/dipoles/DIPOLE_kb_abinit_comp.F +++ b/src/dipoles/DIPOLE_kb_abinit_comp.F @@ -25,22 +25,24 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine Dipole_kb_abinit_comp(ik,i_sp_pol,Xk,kbv) +subroutine Dipole_kb_abinit_comp(npp,npp_tab,ia,is,ik,i_sp_pol,Xk,kbv) ! use pars, ONLY:SP,pi,cZERO use electrons, ONLY:n_spinor use R_lattice, ONLY:b,g_vec,bz_samp use vec_operate, ONLY:v_norm,c2a use wave_func, ONLY:wf_ng,wf_ncx,wf_nc_k,wf_igk - use D_lattice, ONLY:n_atomic_species,atom_pos,n_atoms_species - use pseudo, ONLY:pp_kbv_dim,pp_kbv_dim_yambo,pp_n_l_times_proj_max,pp_kbs,& + use D_lattice, ONLY:atom_pos + use pseudo, ONLY:pp_n_l_times_proj_max,pp_kbs,pp_kbv_dim_atom,& & pp_kb,pp_kbd,pp_table,pp_kbv_table,pp_n_l_max ! implicit none ! - type(bz_samp) :: Xk - complex(SP) :: kbv(wf_ncx,n_spinor,4,pp_kbv_dim_yambo) - integer :: ik,i_sp_pol + type(bz_samp), intent(in) :: Xk + complex(SP), intent(out) :: kbv(wf_ncx,n_spinor,4,pp_kbv_dim_atom) + integer, intent(in) :: ia,is,ik,i_sp_pol + integer, intent(out) :: npp + integer, intent(inout) :: npp_tab ! ! Work Space ! @@ -48,7 +50,7 @@ subroutine Dipole_kb_abinit_comp(ik,i_sp_pol,Xk,kbv) complex(SP) :: kb_Ylm(4) real(SP) :: Ygrad(2,3) ! - integer :: ic,ig,i1,i2,is,ia,pp_spin + integer :: ic,ig,i1,i1_tab,i2,pp_spin integer :: im,il,i_pp complex(SP) :: e_iGR real(SP) :: KpG_cc(3),G_cc(3) @@ -65,8 +67,9 @@ subroutine Dipole_kb_abinit_comp(ik,i_sp_pol,Xk,kbv) if(KpG_norm<1.E-5) cycle call DIPOLE_kb_Ylm(Ylm,dYlm,Ygrad,pp_n_l_max,KpG_cc) i1=0 - do is = 1,n_atomic_species - do ia = 1,n_atoms_species(is) + i1_tab=npp_tab + + G_dot_Rat = dot_product(G_cc,atom_pos(:,ia,is)) e_iGR = cmplx(cos(G_dot_Rat),sin(G_dot_Rat)) do i_pp=1,pp_n_l_times_proj_max @@ -84,23 +87,28 @@ subroutine Dipole_kb_abinit_comp(ik,i_sp_pol,Xk,kbv) kb_Ylm(1)=Ylm(il,im) kb_Ylm(2:4)=dYlm(1,il,im)*Ygrad(1,:)+dYlm(2,il,im)*Ygrad(2,:) ! - i1=i1+1 - i2=pp_kbv_table(i1) + i1_tab=i1_tab+1 + i2=pp_kbv_table(i1_tab) ! if(i2==0) cycle ! - kbv(ic,1,1 ,i2)=kb_Ylm(1)*pp_kbs(is,i_pp)*pp_kb(ic,is,i_pp,i_sp_pol)*e_iGR*sf - kbv(ic,1,2:4,i2)=(kb_Ylm(1)*KpG_cc(:)/KpG_norm*pp_kbd(ic,is,i_pp,i_sp_pol)+ & + i1=i1+1 + ! + kbv(ic,1,1 ,i1)=kb_Ylm(1)*pp_kbs(is,i_pp)*pp_kb(ic,is,i_pp,i_sp_pol)*e_iGR*sf + kbv(ic,1,2:4,i1)=(kb_Ylm(1)*KpG_cc(:)/KpG_norm*pp_kbd(ic,is,i_pp,i_sp_pol)+ & & kb_Ylm(2:4)*pp_kb(ic,is,i_pp,i_sp_pol))*e_iGR*sf ! enddo enddo - enddo - enddo + + enddo ! if (n_spinor==2) kbv(:,2,:,:)=kbv(:,1,:,:) ! + npp=i1 + npp_tab=i1_tab + ! !kbv=conjg(kbv) ! To be checked if I need this for Kerr ! return diff --git a/src/dipoles/DIPOLE_kb_abinit_def_dim.F b/src/dipoles/DIPOLE_kb_abinit_def_dim.F index 99fd9726de..1064daaa93 100644 --- a/src/dipoles/DIPOLE_kb_abinit_def_dim.F +++ b/src/dipoles/DIPOLE_kb_abinit_def_dim.F @@ -36,7 +36,7 @@ subroutine Dipole_kb_abinit_def_dim() use wave_func, ONLY:wf_ncx use D_lattice, ONLY:n_atomic_species,n_atoms_species use pseudo, ONLY:pp_kbv_dim,pp_kbv_dim_yambo,pp_n_l_times_proj_max,pp_kbs,& -& pp_kb,pp_kbd,pp_table,pp_kbv_table +& pp_kb,pp_kbd,pp_table,pp_kbv_table,pp_kbv_dim_atom ! implicit none ! @@ -44,7 +44,7 @@ subroutine Dipole_kb_abinit_def_dim() ! complex(SP) :: tmp_var(wf_ncx,2),check(2) ! - integer :: i1,i2,is,ia,pp_spin + integer :: i1,i2,i3,is,ia,pp_spin integer :: im,il,i_pp ! allocate(pp_kbv_table(pp_kbv_dim)) @@ -52,9 +52,11 @@ subroutine Dipole_kb_abinit_def_dim() ! i1=0 i2=0 + pp_kbv_dim_atom=0 ! do is = 1,n_atomic_species do ia = 1,n_atoms_species(is) + i3=0 do i_pp=1,pp_n_l_times_proj_max ! il = pp_table(1,is,i_pp) @@ -67,6 +69,7 @@ subroutine Dipole_kb_abinit_def_dim() ! i1=i1+1 i2=i2+1 + i3=i3+1 ! tmp_var(:,1)= pp_kbs(is,i_pp)*pp_kb(:wf_ncx,is,i_pp,1) tmp_var(:,2)= pp_kbd(:wf_ncx,is,i_pp,1)+pp_kb(:wf_ncx,is,i_pp,1) @@ -83,6 +86,7 @@ subroutine Dipole_kb_abinit_def_dim() ! enddo enddo + pp_kbv_dim_atom=max(pp_kbv_dim_atom,i3) enddo enddo ! diff --git a/src/dipoles/DIPOLE_kb_pwscf_comp.F b/src/dipoles/DIPOLE_kb_pwscf_comp.F index 6ca4564b73..2ff84ba278 100644 --- a/src/dipoles/DIPOLE_kb_pwscf_comp.F +++ b/src/dipoles/DIPOLE_kb_pwscf_comp.F @@ -25,23 +25,25 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine DIPOLE_kb_pwscf_comp(ik,Xk,kbv) +subroutine DIPOLE_kb_pwscf_comp(npp,npp_tab,ia,is,ik,Xk,kbv) ! use pars, ONLY:SP,pi,cZERO use electrons, ONLY:n_spinor use R_lattice, ONLY:b,g_vec,bz_samp use vec_operate, ONLY:v_norm,c2a use wave_func, ONLY:wf_ng,wf_ncx,wf_igk,wf_nc_k - use D_lattice, ONLY:n_atomic_species,atom_pos,n_atoms_species + use D_lattice, ONLY:atom_pos use pseudo, ONLY:pp_n_l_max,pp_n_l_times_proj_max,pp_table, & -& pp_kbs,pp_kb,pp_kbd,pp_kbv_dim,pp_kbv_dim_yambo, & -& pp_factor,pp_kbv_table +& pp_kbs,pp_kb,pp_kbd,pp_factor,pp_kbv_table,& +& pp_kbv_dim_atom ! implicit none ! - type(bz_samp) :: Xk - complex(SP) :: kbv(wf_ncx,n_spinor,4,pp_kbv_dim_yambo) - integer :: ik,i_spinor + type(bz_samp), intent(in) :: Xk + complex(SP), intent(out) :: kbv(wf_ncx,n_spinor,4,pp_kbv_dim_atom) + integer, intent(in) :: ia,is,ik + integer, intent(out) :: npp + integer, intent(inout) :: npp_tab ! ! Work Space ! @@ -49,7 +51,7 @@ subroutine DIPOLE_kb_pwscf_comp(ik,Xk,kbv) complex(SP) :: kb_Ylm(4) real(SP) :: Ygrad(2,3) ! - integer :: ic,ig,i1,i2,is,ia + integer :: ic,ig,i1,i1_tab,i2,i_spinor integer :: im,il,i_pp,j2p1 complex(SP) :: e_iGR real(SP) :: KpG_cc(3),G_cc(3) @@ -66,8 +68,8 @@ subroutine DIPOLE_kb_pwscf_comp(ik,Xk,kbv) if(KpG_norm<1.E-5) cycle call DIPOLE_kb_Ylm(Ylm,dYlm,Ygrad,pp_n_l_max,KpG_cc) i1=0 - do is = 1,n_atomic_species - do ia = 1,n_atoms_species(is) + i1_tab=npp_tab + G_dot_Rat = dot_product(G_cc,atom_pos(:,ia,is)) e_iGR = cmplx(cos(G_dot_Rat),sin(G_dot_Rat)) do i_pp=1,pp_n_l_times_proj_max @@ -81,27 +83,32 @@ subroutine DIPOLE_kb_pwscf_comp(ik,Xk,kbv) kb_Ylm(1)=Ylm(il,im) ! To be checked why kb_Ylm(2:4)=dYlm(1,il,im)*Ygrad(1,:)+dYlm(2,il,im)*Ygrad(2,:) ! I need conjg here and kb_Ylm=conjg(kb_Ylm) ! not in abinit - ! - i1=i1+1 - i2=pp_kbv_table(i1) + ! + i1_tab=i1_tab+1 + i2=pp_kbv_table(i1_tab) ! if(i2==0) cycle ! + i1=i1+1 + ! do i_spinor=1,n_spinor ! sf=pp_factor(im,il,j2p1,is,i_spinor) ! - kbv(ic,i_spinor, 1 ,i2)= kb_Ylm(1)*pp_kb(ic,is,i_pp,1)*pp_kbs(is,i_pp)*e_iGR*sf - kbv(ic,i_spinor,2:4,i2)=(kb_Ylm(1)*KpG_cc(:)/KpG_norm*pp_kbd(ic,is,i_pp,1) + & + kbv(ic,i_spinor, 1 ,i1)= kb_Ylm(1)*pp_kb(ic,is,i_pp,1)*pp_kbs(is,i_pp)*e_iGR*sf + kbv(ic,i_spinor,2:4,i1)=(kb_Ylm(1)*KpG_cc(:)/KpG_norm*pp_kbd(ic,is,i_pp,1) + & & kb_Ylm(2:4)*pp_kb(ic,is,i_pp,1) )*e_iGR*sf ! enddo enddo enddo - enddo - enddo + + enddo ! + npp=i1 + npp_tab=i1_tab + ! !kbv=conjg(kbv) ! To be checked if I need this for Kerr ! return diff --git a/src/dipoles/DIPOLE_kb_pwscf_def_dim.F b/src/dipoles/DIPOLE_kb_pwscf_def_dim.F index 97ea4fa00f..9d0d2a8d6a 100644 --- a/src/dipoles/DIPOLE_kb_pwscf_def_dim.F +++ b/src/dipoles/DIPOLE_kb_pwscf_def_dim.F @@ -32,7 +32,7 @@ subroutine Dipole_kb_pwscf_def_dim() use R_lattice, ONLY:b use wave_func, ONLY:wf_ncx,wf_nc_k use D_lattice, ONLY:n_atomic_species,n_atoms_species - use pseudo, ONLY:pp_n_l_times_proj_max,pp_table, & + use pseudo, ONLY:pp_n_l_times_proj_max,pp_table,pp_kbv_dim_atom, & & pp_kbs,pp_kb,pp_kbd,pp_kbv_dim,pp_kbv_dim_yambo, & & pp_kbv_table ! @@ -42,7 +42,7 @@ subroutine Dipole_kb_pwscf_def_dim() ! complex(SP) :: tmp_var(wf_ncx,n_spinor,2),check(2) ! - integer :: ic,i2,i1,is,ia,i_spinor + integer :: ic,i2,i1,i3,is,ia,i_spinor integer :: im,il,i_pp,j2p1 ! allocate(pp_kbv_table(pp_kbv_dim)) @@ -50,9 +50,11 @@ subroutine Dipole_kb_pwscf_def_dim() ! i1=0 i2=0 + pp_kbv_dim_atom=0 ! do is = 1,n_atomic_species do ia = 1,n_atoms_species(is) + i3=0 do i_pp=1,pp_n_l_times_proj_max ! il = pp_table(1,is,i_pp) @@ -63,6 +65,7 @@ subroutine Dipole_kb_pwscf_def_dim() ! i1=i1+1 i2=i2+1 + i3=i3+1 ! do i_spinor=1,n_spinor do ic=1,wf_nc_k(1) @@ -83,6 +86,7 @@ subroutine Dipole_kb_pwscf_def_dim() ! enddo enddo + pp_kbv_dim_atom=max(pp_kbv_dim_atom,i3) enddo enddo ! diff --git a/src/dipoles/DIPOLE_kb_sum.F b/src/dipoles/DIPOLE_kb_sum.F index 452e81ebed..2e3bedd50c 100644 --- a/src/dipoles/DIPOLE_kb_sum.F +++ b/src/dipoles/DIPOLE_kb_sum.F @@ -25,12 +25,11 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine DIPOLE_kb_project(ncomp,WF_ib,kbv,XX) +subroutine DIPOLE_kb_project(pp_range,npp,ncomp,WF_ib,kbv,XX) ! use pars, ONLY:SP,cONE,cZERO use wrapper, ONLY:M_by_M use electrons, ONLY:n_spinor - use pseudo, ONLY:pp_kbv_dim_yambo use deviceXlib_m, ONLY:dev_memcpy use iso_c_binding, ONLY:C_F_POINTER #if defined _CUDA @@ -43,17 +42,17 @@ subroutine DIPOLE_kb_project(ncomp,WF_ib,kbv,XX) ! implicit none ! - integer, intent(in) :: ncomp - complex(SP) DEV_ATTR, intent(in) :: WF_ib(ncomp,n_spinor) - complex(SP) DEV_ATTR, target, intent(in) :: kbv(ncomp,n_spinor,4,pp_kbv_dim_yambo) - complex(SP) DEV_ATTR, target, intent(out) :: XX(n_spinor,n_spinor,4,pp_kbv_dim_yambo) + integer, intent(in) :: pp_range(2),npp,ncomp + complex(SP) DEV_ATTR, intent(in) :: WF_ib(ncomp,n_spinor) + complex(SP) DEV_ATTR, target, intent(in) :: kbv(ncomp,n_spinor,4,npp) + complex(SP) DEV_ATTR, target, intent(out) :: XX(n_spinor,n_spinor,4,pp_range(1):pp_range(1)) ! ! Work Space ! integer :: dim_flat complex(SP) DEV_ATTR, pointer :: kbv_p(:,:),XX_p(:,:) ! - dim_flat=n_spinor*4*pp_kbv_dim_yambo + dim_flat=n_spinor*4*npp ! #if defined _CUDA call C_F_POINTER(C_DEVLOC(kbv), kbv_p, (/ncomp,dim_flat/) ) diff --git a/src/dipoles/DIPOLE_transverse.F b/src/dipoles/DIPOLE_transverse.F index b0f727c6fa..b947927aaa 100644 --- a/src/dipoles/DIPOLE_transverse.F +++ b/src/dipoles/DIPOLE_transverse.F @@ -32,7 +32,8 @@ subroutine Dipole_transverse(Xen,Xk,Dip) use electrons, ONLY:levels,n_spinor,n_sp_pol,spin_string use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& & PAR_IND_VAL_BANDS_DIP,PAR_IND_CON_BANDS_DIP - use pseudo, ONLY:PP_free,pp_table,pp_n_l_comp,pp_kbv_dim_yambo,pp_kbv_table,pp_factor + use pseudo, ONLY:PP_free,pp_table,pp_n_l_comp,pp_kbv_dim_yambo,pp_kbv_table,pp_factor,pp_kbv_dim_atom,pp_kbv_dim + use D_lattice, ONLY:n_atomic_species,n_atoms_species use R_lattice, ONLY:bz_samp use R_lattice, ONLY:g_vec_d,g_vec use DIPOLES, ONLY:DIPOLE_t,DIP_iR,P_square,DIP_P,DIP_v,DIP_P_spinor,use_g_space_approach,& @@ -59,7 +60,7 @@ subroutine Dipole_transverse(Xen,Xk,Dip) logical :: l_eval_DIP_iR,l_eval_DIP_V,l_eval_DIP_P2,l_use_comm,l_check logical, allocatable :: element_1D_spin(:) integer :: ik,ic_wf,iv_wf,i_wf,ic,iv,ib,ifrag,nc,& -& i_sp_pol,n_LT_steps,ik_mem,ic_min +& i_sp_pol,n_LT_steps,ik_mem,ic_min,is,ia,pp_range(2),npp,npp_tab complex(SP), allocatable :: kbv(:,:,:,:) complex(SP), allocatable DEV_ATTR :: kbv_d(:,:,:,:) complex(SP), allocatable DEV_ATTR :: XX(:,:,:,:,:) @@ -112,9 +113,9 @@ subroutine Dipole_transverse(Xen,Xk,Dip) ! if(l_use_comm) then YAMBO_ALLOC(XX,(n_spinor,n_spinor,4,pp_kbv_dim_yambo,Dip%ib(1):Dip%ib(2))) - YAMBO_ALLOC(kbv,(wf_ncx,n_spinor,4,pp_kbv_dim_yambo)) + YAMBO_ALLOC(kbv,(wf_ncx,n_spinor,4,pp_kbv_dim_atom)) if (have_cuda) then - YAMBO_ALLOC(kbv_d,(wf_ncx,n_spinor,4,pp_kbv_dim_yambo)) + YAMBO_ALLOC(kbv_d,(wf_ncx,n_spinor,4,pp_kbv_dim_atom)) kbv_d=cZERO endif endif @@ -182,24 +183,38 @@ subroutine Dipole_transverse(Xen,Xk,Dip) ! if (l_use_comm) then ! - if (io_KB_abinit_err==0) call DIPOLE_kb_abinit_comp(ik,i_sp_pol,Xk,kbv) - if (io_KB_pwscf_err ==0) call DIPOLE_kb_pwscf_comp(ik,Xk,kbv) - ! - if (have_cuda) call dev_memcpy(kbv_d,kbv) - ! - !nc=wf_nc_k(ik) - nc=wf_ncx + npp_tab=0 + pp_range(2)=0 XX=cZERO - do ib=Dip%ib(1),Dip%ib(2) - if( ib<=Dip%ib_lim(1) ) then - l_check= .not.(PAR_IND_VAL_BANDS_DIP%element_1D(ib).or.PAR_IND_CON_BANDS_DIP%element_1D(ib)) - else - l_check= .not.PAR_IND_CON_BANDS_DIP%element_1D(ib) - endif - if ( l_check ) cycle - i_wf=WF%index(ib,ik,i_sp_pol) - !call DIPOLE_kb_project(nc,DEV_VAR(WF%c)(:nc,:,i_wf),DEV_VAR(kbv)(:nc,:,:,:),XX(:,:,:,:,ib)) - call DIPOLE_kb_project(nc,DEV_VAR(WF%c)(:,:,i_wf),DEV_VAR(kbv),XX(:,:,:,:,ib)) + do is = 1,n_atomic_species + do ia = 1,n_atoms_species(is) + ! + pp_range(1)=pp_range(2)+1 + ! + if (io_KB_abinit_err==0) call DIPOLE_kb_abinit_comp(npp,npp_tab,ia,is,ik,i_sp_pol,Xk,kbv) + if (io_KB_pwscf_err ==0) call DIPOLE_kb_pwscf_comp(npp,npp_tab,ia,is,ik,Xk,kbv) + ! + if (npp==0) cycle + ! + pp_range(2)=pp_range(1)+npp-1 + ! + if (have_cuda) call dev_memcpy(kbv_d,kbv) + ! + !nc=wf_nc_k(ik) + nc=wf_ncx + do ib=Dip%ib(1),Dip%ib(2) + if( ib<=Dip%ib_lim(1) ) then + l_check= .not.(PAR_IND_VAL_BANDS_DIP%element_1D(ib).or.PAR_IND_CON_BANDS_DIP%element_1D(ib)) + else + l_check= .not.PAR_IND_CON_BANDS_DIP%element_1D(ib) + endif + if ( l_check ) cycle + i_wf=WF%index(ib,ik,i_sp_pol) + !call DIPOLE_kb_project(pp_range,npp,nc,DEV_VAR(WF%c)(:nc,:,i_wf),DEV_VAR(kbv)(:nc,:,:,:),XX(:,:,:,:,ib)) + call DIPOLE_kb_project(pp_range,npp,nc,DEV_VAR(WF%c)(:,:,i_wf),DEV_VAR(kbv(:,:,:,:npp)),XX(:,:,:,pp_range(1):pp_range(2),ib)) + enddo + ! + enddo enddo ! endif diff --git a/src/modules/mod_pseudo.F b/src/modules/mod_pseudo.F index 4a92916d1d..076f962a09 100644 --- a/src/modules/mod_pseudo.F +++ b/src/modules/mod_pseudo.F @@ -42,6 +42,7 @@ module pseudo integer :: pp_kbv_dim integer :: pp_kbv_dim_yambo + integer :: pp_kbv_dim_atom integer, allocatable:: pp_kbv_table(:) integer, allocatable:: pp_table(:,:,:) ! (3,n_atomic_species,pp_n_l_times_proj_max) From a26036562c09db391a8d4338e0ca15f3cd3fed83 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 17 Mar 2022 11:35:09 +0100 Subject: [PATCH 0212/1367] Version 5.1.1, Revision 21354, Hash 07a48f940 MODIFIED * include/driver/version.h bse/K_IP.F bse/K_dipoles.F bse/K_driver_init.F modules/mod_BS.F modules/mod_vec_operate.F Changes: - [yambo] in kerr mode both the xy and the yx geometries can be selected - [yambo] in kerr mode the asymmetric component only can be computed (xy-yx), IP only - [yambo] added cheks on the kerr geometries Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_IP.F | 8 +++++--- src/bse/K_dipoles.F | 22 ++++++++++++++++++---- src/bse/K_driver_init.F | 5 +++-- src/modules/mod_BS.F | 1 + src/modules/mod_vec_operate.F | 12 +++++++++--- 6 files changed, 38 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index dcc1d1b8ae..86f1f59e0b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21353 -#define YAMBO_HASH "395546a64" +#define YAMBO_REVISION 21354 +#define YAMBO_HASH "07a48f940" diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 6967461d9d..6f4c81c143 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -37,7 +37,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) & skip_cond_sum_rule,l_drude,X_magnons,Epsilon_ij,X_dichroism use BS_solvers, ONLY:Co_factor,diam_term_exact,BSS_Wd use BS, ONLY:BS_T_grp,BS_nT_grps,BS_perturbative_SOC,& -& BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_K_dim,& +& BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_K_dim,l_BS_kerr_asymm,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & BS_K_anti_resonant,l_BS_ares_from_res use parallel_int, ONLY:PP_redux_wait @@ -160,10 +160,10 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Residuals DIP_cv * DIP_vc ! if(l_BS_abs) then - res_abs=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 + res_abs=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) if(l_BS_trace) then do i_dip=2,BS_dip_size - res_abs=res_abs+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 + res_abs=res_abs+BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)) enddo res_abs=res_abs/real(BS_dip_size,SP) endif @@ -173,6 +173,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_kerr) then res_kerr=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)) + if(l_BS_kerr_asymm) res_kerr=(res_kerr- & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) )/2._SP res_kerr=res_kerr*Z_eh*E_eh*f_eh if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_kerr,vtmpC) endif diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 72157c2640..021da6f0f1 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -36,7 +36,7 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) use DIPOLES, ONLY:DIPOLE_t,DIP_alloc,DIP_rotated use BS_solvers, ONLY:BSS_Vnl_included use BS, ONLY:BS_T_grp,BS_K_coupling,BS_nT_grps,L_kind,BS_bands,& -& BS_dip_size,l_BS_trace,BS_n_eh_spaces,& +& BS_dip_size,l_BS_trace,BS_n_eh_spaces,l_BS_kerr_asymm,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & BSE_dipole_geometry,BS_field_direction,l_BS_ares_from_res use parallel_int, ONLY:PP_redux_wait @@ -55,6 +55,7 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) ! ! Work space ! + logical ::geometry_ok integer ::ik_bz,ok_bz,ik,ok,isymm,osymm,iGo,iv,ic,i_sp_pol_c,i_sp_pol_v,i_T_g,i_T,& & io_err,i_res_ares,i_dip complex(SP) ::DIP_Splus,DIP_Smins,DIP_projected(BS_dip_size),DIP_expanded(3) @@ -93,14 +94,27 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) BS_field_direction(:,2)=(/0._SP,1._SP,0._SP/) BS_field_direction(:,3)=(/0._SP,0._SP,1._SP/) - else if (trim(BSE_dipole_geometry)/='none'.and.l_BS_kerr) then + endif + ! + if (l_BS_kerr) then + geometry_ok=( trim(BSE_dipole_geometry)=='xy'.or.trim(BSE_dipole_geometry)=='xz'.or.trim(BSE_dipole_geometry)=='yz' ) & + & .or. ( trim(BSE_dipole_geometry)=='yx'.or.trim(BSE_dipole_geometry)=='zx'.or.trim(BSE_dipole_geometry)=='zy' ) + if(geometry_ok) then + if (BSE_dipole_geometry(1:1)=='x') BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) + if (BSE_dipole_geometry(1:1)=='y') BS_field_direction(:,1)=(/0._SP,1._SP,0._SP/) + if (BSE_dipole_geometry(1:1)=='z') BS_field_direction(:,1)=(/0._SP,0._SP,1._SP/) + else + call warning(" No or wrong kerr geometry specified in input file. Assuming xy") + BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) + BSE_dipole_geometry="xy" + endif call v_rotate(trim(BSE_dipole_geometry),-pi/2._SP,BS_field_direction(:,1),v_out=BS_field_direction(:,2)) endif ! + if (trim(global_gauge)=='length' ) BS_field_direction=BS_field_direction*q0_def_norm + ! endif ! - if (trim(global_gauge)=='length' ) BS_field_direction=BS_field_direction*q0_def_norm - ! call live_timing('BSE dipoles',PAR_BS_nT_col_grps) ! do i_T_g=1,BS_nT_grps diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index ef66dc99a7..d913d94493 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -31,7 +31,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use BS_solvers, ONLY:BSS_eels_to_eps,BSS_mode,BSS_slepc_matrix,BSS_uses_DbGd,& & BSS_slepc_double_grp use BS, ONLY:L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& -& l_BS_anomalous_Hall,BS_perturbative_SOC,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& +& l_BS_anomalous_Hall,BS_perturbative_SOC,l_BS_abs,l_BS_kerr_asymm,l_BS_jdos,l_BS_trace,BSE_prop,& & l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,l_BS_optics,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& & BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant @@ -203,7 +203,8 @@ subroutine K_driver_init(what,iq,Ken,Xk) call warning(" n_sp_pol=2 and magnons requested. Spin flip BSE only is computed") endif if (l_BS_kerr) then - call parser('AnHall',l_BS_anomalous_Hall) + l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') + l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') BS_dip_size=2 l_BS_abs=.TRUE. endif diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index d3adef43b5..691b92e739 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -57,6 +57,7 @@ module BS logical :: l_BS_trace logical :: l_BS_abs logical :: l_BS_kerr + logical :: l_BS_kerr_asymm logical :: l_BS_photolum logical :: l_BS_magnons logical :: l_BS_dichroism diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 63807042bd..16e66189a6 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -183,11 +183,17 @@ subroutine v_rotate(plane,t,v_in,v_out) ! select case(plane) case('xy') - M=reshape((/cos(t),-sin(t),rZERO,sin(t),cos(t),rZERO,rZERO,rZERO,rONE/),(/3,3/)) + M=reshape((/cos(t),-sin(t),rZERO, sin(t),cos(t),rZERO,rZERO,rZERO,rONE/),(/3,3/)) + case('yx') + M=reshape((/cos(t), sin(t),rZERO,-sin(t),cos(t),rZERO,rZERO,rZERO,rONE/),(/3,3/)) case('xz') - M=reshape((/cos(t),rZERO,-sin(t),sin(t),rZERO,cos(t),rZERO,rONE,rZERO/),(/3,3/)) + M=reshape((/cos(t),rZERO,-sin(t), sin(t),rZERO,cos(t),rZERO,rONE,rZERO/),(/3,3/)) + case('zx') + M=reshape((/cos(t),rZERO, sin(t),-sin(t),rZERO,cos(t),rZERO,rONE,rZERO/),(/3,3/)) case('yz') - M=reshape((/rZERO,cos(t),-sin(t),rZERO,sin(t),cos(t),rONE,rZERO,rZERO/),(/3,3/)) + M=reshape((/rZERO,cos(t),-sin(t),rZERO, sin(t),cos(t),rONE,rZERO,rZERO/),(/3,3/)) + case('zy') + M=reshape((/rZERO,cos(t), sin(t),rZERO,-sin(t),cos(t),rONE,rZERO,rZERO/),(/3,3/)) end select ! v_loc=matmul(M,v_in) From c1ee45c1b4fc50eb17ab677b026a2c0387037fc4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 17 Mar 2022 11:41:46 +0100 Subject: [PATCH 0213/1367] Version 5.1.1, Revision 21355, Hash a26036562 MODIFIED * include/driver/version.h bse/K_IP.F bse/K_driver_init.F Changes: - [yambo] In case the asymmetric geometry is used the absorption is (+)/2._SP Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_IP.F | 2 ++ src/bse/K_driver_init.F | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 86f1f59e0b..34468d64c1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21354 -#define YAMBO_HASH "07a48f940" +#define YAMBO_REVISION 21355 +#define YAMBO_HASH "a26036562" diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 6f4c81c143..f481bd5762 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -161,6 +161,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if(l_BS_abs) then res_abs=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + if(l_BS_kerr_asymm) res_abs=(res_abs+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)) )/2._SP if(l_BS_trace) then do i_dip=2,BS_dip_size res_abs=res_abs+BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index d913d94493..1ccd8d08fa 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -208,7 +208,10 @@ subroutine K_driver_init(what,iq,Ken,Xk) BS_dip_size=2 l_BS_abs=.TRUE. endif - if (l_BS_photolum) l_BS_trace = .false. + if ((l_BS_photolum.or.l_BS_kerr).and.l_BS_trace) then + call warning(" Trace not compatible with kerr or pl. Switching it off") + l_BS_trace = .false. + endif if (l_BS_trace ) BS_dip_size = 3 ! l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum From 53cde434a124156135221fea298a3d25da0aab7a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Mar 2022 14:27:41 +0100 Subject: [PATCH 0214/1367] Version 5.1.1, Revision 21246, Hash bea5a9b38 MODIFIED * include/driver/version.h bse/K_Transitions_setup.F interface/INIT_activate.F interface/INIT_load.F modules/mod_BS.F Changes: - [yambo] Now both hole in valence and Electron in conduction can be fixed Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_Transitions_setup.F | 16 ++++++++++++---- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 6 ++++-- src/modules/mod_BS.F | 5 +++-- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0f584ea3b1..5b524bc5eb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21227 -#define YAMBO_HASH "2a8427486" +#define YAMBO_REVISION 21246 +#define YAMBO_HASH "bea5a9b38" diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 9f8f110b87..1a7750227f 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -54,7 +54,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! mode ="T" use BS, ONLY:T_group,BS_bands,BS_T_grp,BS_nT_grps,BS_n_eh_spaces,& & BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,& -& BS_core_bands,l_BS_core_hole +& BS_core_bands,l_BS_fix_holes,l_BS_fix_elecs ! mode ="K" use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & & l_BS_ares_from_res,BS_n_eh_spaces,BS_res_ares_n_mat @@ -117,12 +117,20 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) V_bands=(/BS_bands(1),maxval(Ken%nbm)/) C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) ! - call parser('BSECoreBands', l_BS_core_hole) - if (l_BS_core_hole) then - if (BS_core_bands(1)V_bands(2)) call error(" BSECoreBands range must fit in BSEbands range") + call parser('BSEHoleBands', l_BS_fix_holes) + call parser('BSEElecBands', l_BS_fix_elecs) + if (l_BS_fix_holes.and.all(BS_core_bands(1:2)/=0)) then + if (BS_core_bands(1)V_bands(2)) & + & call error(" BSECoreBands range must fit in BSEbands range for holes") V_bands=(/BS_core_bands(1),BS_core_bands(2)/) endif ! + if (l_BS_fix_elecs.and.all(BS_core_bands(3:4)/=0)) then + if (BS_core_bands(3)C_bands(2)) & + & call error(" BSECoreBands range must fit in BSEbands range for elecs") + C_bands=(/BS_core_bands(3),BS_core_bands(4)/) + endif + ! #if defined _RT ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. if (l_rt_carriers_in_use.and.EQ_Transitions) then diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index ec25bc5288..6b7e90c2d5 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -263,7 +263,7 @@ subroutine INIT_activate() ! call initactivate(1,'DrudeWBS Reflectivity') call initactivate(1,'BoseCut ShiftedPaths') - call initactivate(1,'BSEQptR BSEBands BSECoreBands BSKCut BSKIOmode BSEEhEny BSehWind NoDiagSC') + call initactivate(1,'BSEQptR BSEBands BSEHoleBands BSEElecBands BSKCut BSKIOmode BSEEhEny BSehWind NoDiagSC') ! #if defined _RT call initactivate(1,'RTOccMode ForceEqTrans') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 64598a0583..473c721f3a 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -294,8 +294,10 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSEmod', '[BSE] resonant/retarded/coupling',BSE_mode,case="a") call it(defs,'Lkind', '[BSE] Lbar (default) / full',L_kind,verb_level=V_resp) call it(defs,'BSEBands','[BSK] Bands range',BS_bands) - call it(defs,'BSECoreBands','[BSK] Bands range for Core Hole. If set higher energy bands are ignored in the hole channel',& -& BS_core_bands,verb_level=V_resp) + call it(defs,'BSEHoleBands','[BSK] Bands range for Hole. If set, other bands are ignored in the hole channel',& +& BS_core_bands(1:2),verb_level=V_resp) + call it(defs,'BSEElecBands','[BSK] Bands range for Electrons. If set other bands are ignored in the electrons channel',& +& BS_core_bands(3:4),verb_level=V_resp) call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]',BS_n_g_W,G_unit) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) call it(defs,'BSENGfxc','[BSK] Fxc components', BS_n_g_fxc,G_unit,verb_level=V_resp) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 02ed18adaf..8c5c2fd5a1 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -53,7 +53,8 @@ module BS ! ! Kind of response function !=========================== - logical :: l_BS_core_hole + logical :: l_BS_fix_holes + logical :: l_BS_fix_elecs logical :: l_BS_jdos logical :: l_BS_trace logical :: l_BS_abs @@ -72,7 +73,7 @@ module BS integer :: BS_IO_dim(2,4) integer :: MAX_BSK_LIN_size integer :: BS_bands(2) - integer :: BS_core_bands(2) + integer :: BS_core_bands(4) integer :: BS_q(2) integer :: BS_identifier integer(IPL) :: BS_lin_size_compressed From 011f7066a8c782b777db7fc12ca9d15a14b7073a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 30 Mar 2022 17:22:35 +0200 Subject: [PATCH 0215/1367] Version 5.1.1, Revision 21359, Hash ef8e92f9d MODIFIED * include/driver/version.h bse/K_IP.F bse/K_diago_driver.F bse/K_diago_response_functions.F bse/K_diago_right_residuals.F bse/K_dipoles.F bse/K_driver.F bse/K_driver_init.F interface/INIT.F interface/INIT_activate.F interface/INIT_load.F io/io_BSS_diago.F modules/SET_defaults.F modules/mod_BS.F modules/mod_BS_solvers.F modules/mod_interfaces.F Changes: - Working on dichroism for oriented samples Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- src/bse/K_IP.F | 35 ++++++++++--------- src/bse/K_diago_driver.F | 51 +++++++++++++++++++--------- src/bse/K_diago_response_functions.F | 11 +++--- src/bse/K_diago_right_residuals.F | 7 ++-- src/bse/K_dipoles.F | 32 ++++++----------- src/bse/K_driver.F | 12 +++++-- src/bse/K_driver_init.F | 4 +-- src/interface/INIT.F | 4 --- src/interface/INIT_activate.F | 6 ++-- src/interface/INIT_load.F | 8 ++--- src/io/io_BSS_diago.F | 8 ++--- src/modules/SET_defaults.F | 7 ++-- src/modules/mod_BS.F | 1 - src/modules/mod_BS_solvers.F | 6 ++-- src/modules/mod_interfaces.F | 4 +-- 16 files changed, 111 insertions(+), 89 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 34468d64c1..1c61712c48 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21355 -#define YAMBO_HASH "a26036562" +#define YAMBO_REVISION 21359 +#define YAMBO_HASH "ef8e92f9d" diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index f481bd5762..15cdc02890 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -37,7 +37,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) & skip_cond_sum_rule,l_drude,X_magnons,Epsilon_ij,X_dichroism use BS_solvers, ONLY:Co_factor,diam_term_exact,BSS_Wd use BS, ONLY:BS_T_grp,BS_nT_grps,BS_perturbative_SOC,& -& BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_K_dim,l_BS_kerr_asymm,& +& l_BS_jdos,l_BS_esort,l_BS_trace,BS_K_dim,l_BS_kerr_asymm,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & BS_K_anti_resonant,l_BS_ares_from_res use parallel_int, ONLY:PP_redux_wait @@ -60,7 +60,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Work space ! - integer ::iv,ic,i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR(2),i_dip + integer ::i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR(2) real(SP) ::f_eh,f_eh_PL,res_PL logical ::dip_v,dip_r complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),& @@ -161,13 +161,14 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if(l_BS_abs) then res_abs=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) - if(l_BS_kerr_asymm) res_abs=(res_abs+ & - & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)) )/2._SP + if(l_BS_kerr_asymm) then + res_abs=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)))/2._SP + endif if(l_BS_trace) then - do i_dip=2,BS_dip_size - res_abs=res_abs+BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)) - enddo - res_abs=res_abs/real(BS_dip_size,SP) + res_abs=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)))/3._SP endif res_abs=res_abs*f_eh*Z_eh*E_eh if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_abs,vtmpC) @@ -175,8 +176,10 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_kerr) then res_kerr=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)) - if(l_BS_kerr_asymm) res_kerr=(res_kerr- & - & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) )/2._SP + if(l_BS_kerr_asymm) then + res_kerr=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1))- & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)))/2._SP + endif res_kerr=res_kerr*Z_eh*E_eh*f_eh if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_kerr,vtmpC) endif @@ -193,13 +196,13 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Dichroism ! if(l_BS_dichroism) then - res_dich=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1)) + res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1)))/2._SP if(l_BS_trace) then - do i_dip=2,BS_dip_size - ! x*L = DIP_x*DIP_orbital; - res_dich=res_dich+BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(i_dip,i_T,1)) - enddo - res_dich=res_dich/real(BS_dip_size,SP) + ! x*L = DIP_x*DIP_orbital; + res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP endif res_dich=res_dich*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_dich,vtmpC) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 9b0ec0c3c3..a3dcc4c1c5 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -65,7 +65,7 @@ subroutine K_diago_driver(iq,W,X_static) ! use BS_solvers, ONLY:BSS_slepc_matrix,Slepc_v,BS_HAYVEC_free #endif - use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_photolum + use BS, ONLY:l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free ! @@ -77,7 +77,7 @@ subroutine K_diago_driver(iq,W,X_static) ! Work Space ! integer :: i_BS_mat,Input_n_eig - logical :: K_is_not_hermitian,l_diago,l_slepc,l_target_energy + logical :: K_is_not_hermitian,l_diago,l_slepc,l_target_energy,l_dip_more character(1) :: sec character(5) :: Solver ! @@ -109,8 +109,9 @@ subroutine K_diago_driver(iq,W,X_static) ! real(SP), pointer :: BS_R_PL(:,:) => null() ! + complex(SP),pointer :: BS_R_left_kerr(:) => null() complex(SP),pointer :: BS_R_right_kerr(:) => null() - complex(SP),pointer :: BS_R_right_dich(:) => null() + complex(SP),pointer :: BS_R_right_dich(:,:) => null() ! complex(SP),pointer :: BS_R_left_magn(:,:) => null() complex(SP),pointer :: BS_R_right_magn(:,:) => null() @@ -164,7 +165,7 @@ subroutine K_diago_driver(iq,W,X_static) !======================== call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! K_is_not_hermitian=BS_K_coupling.or.(allocated(BSS_eh_W).and..not.BSS_perturbative_width) ! @@ -251,14 +252,21 @@ subroutine K_diago_driver(iq,W,X_static) ! if(l_diago) call live_timing( ) ! + l_dip_more=l_BS_kerr.or.l_BS_dichroism + ! ! Construct the residuals of epsilon !==================================== if (K_is_not_hermitian) then ! ! Right residuals - if(l_BS_optics ) call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_V_right) - if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) - if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_V_right) + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then + call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_V_right) + if(l_dip_more) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) + endif + if(l_BS_dichroism) then + call K_diago_right_residuals("dic1",i_BS_mat,BS_E,BS_R_right_dich(:,1),BS_V_right) + call K_diago_right_residuals("dic2",i_BS_mat,BS_E,BS_R_right_dich(:,2),BS_V_right) + endif if(l_BS_magnons) then call K_diago_right_residuals("mag1",i_BS_mat,BS_E,BS_R_right_magn(1,:),BS_V_right) if(n_spinor==2) call K_diago_right_residuals("mag2",i_BS_mat,BS_E,BS_R_right_magn(2,:),BS_V_right) @@ -267,8 +275,10 @@ subroutine K_diago_driver(iq,W,X_static) call K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) ! ! Left residuals - if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & - & call K_diago_left_residuals("opti",i_BS_mat,BS_E,BS_R_left_abs,BS_V_left,BS_overlap) + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then + call K_diago_left_residuals("opt1",i_BS_mat,BS_E,BS_R_left_abs, BS_V_left,BS_overlap) + if(l_dip_more) call K_diago_left_residuals("opt2",i_BS_mat,BS_E,BS_R_left_kerr,BS_V_left,BS_overlap) + endif if(l_BS_magnons) then call K_diago_left_residuals("mag1",i_BS_mat,BS_E,BS_R_left_magn(1,:),BS_V_left,BS_overlap) if(n_spinor==2) call K_diago_left_residuals("mag2",i_BS_mat,BS_E,BS_R_left_magn(2,:),BS_V_left,BS_overlap) @@ -280,10 +290,14 @@ subroutine K_diago_driver(iq,W,X_static) else ! ! Right residuals - if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) & - & call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_mat) - if(l_BS_kerr ) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) - if(l_BS_dichroism) call K_diago_right_residuals("dich",i_BS_mat,BS_E,BS_R_right_dich,BS_mat) + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then + call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_mat) + if(l_dip_more) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) + endif + if(l_BS_dichroism) then + call K_diago_right_residuals("dic1",i_BS_mat,BS_E,BS_R_right_dich(:,1),BS_mat) + call K_diago_right_residuals("dic2",i_BS_mat,BS_E,BS_R_right_dich(:,2),BS_mat) + endif if(l_BS_magnons) then call K_diago_right_residuals("mag1",i_BS_mat,BS_E,BS_R_right_magn(1,:),BS_mat) if(n_spinor==2) call K_diago_right_residuals("mag2",i_BS_mat,BS_E,BS_R_right_magn(2,:),BS_mat) @@ -322,7 +336,7 @@ subroutine K_diago_driver(iq,W,X_static) ! Now I calculate the physical quantities !========================================= call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! Diagonalization DB (OUT) !========================== @@ -330,7 +344,7 @@ subroutine K_diago_driver(iq,W,X_static) ! call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! endif ! @@ -375,8 +389,11 @@ subroutine local_alloc(what) if (l_BS_kerr) then YAMBO_ALLOC_P(BS_R_right_kerr,(BSS_n_eig)) endif + if (l_BS_kerr_asymm.or.l_BS_dichroism) then + YAMBO_ALLOC_P(BS_R_left_kerr,(BSS_n_eig)) + endif if (l_BS_dichroism) then - YAMBO_ALLOC_P(BS_R_right_dich,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_right_dich,(BSS_n_eig,2)) endif if (l_BS_magnons) then YAMBO_ALLOC_P(BS_R_left_magn,(2,BSS_n_eig)) @@ -423,6 +440,7 @@ subroutine local_free() YAMBO_FREE_P(BS_R_right_abs) YAMBO_FREE_P(BS_R_left_abs) YAMBO_FREE_P(BS_R_right_kerr) + YAMBO_FREE_P(BS_R_left_kerr) YAMBO_FREE_P(BS_R_right_dich) YAMBO_FREE_P(BS_R_right_magn) YAMBO_FREE_P(BS_R_left_magn) @@ -449,6 +467,7 @@ subroutine K_slepc_resize_variables() if(associated(BS_R_left_abs) ) call BSS_resize(BS_R_left_abs) if(associated(BS_R_right_abs)) call BSS_resize(BS_R_right_abs) ! + if(associated(BS_R_left_kerr) ) call BSS_resize(BS_R_left_kerr) if(associated(BS_R_right_kerr)) call BSS_resize(BS_R_right_kerr) if(associated(BS_R_right_dich)) call BSS_resize(BS_R_right_dich) if(associated(BS_R_left_magn) ) call BSS_resize(BS_R_left_magn) diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index ac656dadf1..ecaa5c4731 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] ! @@ -43,7 +43,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ use BS_solvers, ONLY:B_Hall use X_m, ONLY:Epsilon_ij,X_magnons,X_dichroism use PHOTOLUM, ONLY:PL,PL_prefactor - use BS, ONLY:l_BS_kerr,l_BS_anomalous_Hall,l_BS_magnons,l_BS_photolum,l_BS_dichroism + use BS, ONLY:l_BS_kerr,l_BS_kerr_asymm,l_BS_anomalous_Hall,l_BS_magnons,l_BS_photolum,l_BS_dichroism ! implicit none ! @@ -53,7 +53,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_right_kerr(:),BS_R_right_dich(:) + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) ! ! Work space @@ -141,6 +141,9 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ ! if(l_BS_kerr) then res_kerr=BS_R_left_abs(i1)*BS_R_right_kerr(i1)*ares_fac + if(l_BS_kerr_asymm) then + res_kerr=(BS_R_left_abs(i1)*BS_R_right_kerr(i1)-BS_R_left_kerr(i1)*BS_R_right_abs(i1))*ares_fac/2._SP + endif if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_kerr nVAR=nVAR+1 @@ -152,7 +155,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ endif ! if(l_BS_dichroism) then - res_dich=BS_R_left_abs(i1)*BS_R_right_dich(i1)*ares_fac/q0_def_norm + res_dich=(BS_R_left_abs(i1)*BS_R_right_dich(i1,1)+BS_R_left_kerr(i1)*BS_R_right_dich(i1,2))*ares_fac/q0_def_norm/2._SP if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_dich nVAR=nVAR+1 diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index 07590a579a..466a55e11d 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -67,9 +67,10 @@ subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) ! call live_timing(trim(mode)//' residuals ',px%n_of_elements(myid+1)) ! - if(trim(mode)=="abs") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) - if(trim(mode)=="kerr") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) - if(trim(mode)=="dich") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) ! diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 021da6f0f1..a660625301 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -34,17 +34,17 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) use electrons, ONLY:levels,spin use X_m, ONLY:global_gauge use DIPOLES, ONLY:DIPOLE_t,DIP_alloc,DIP_rotated - use BS_solvers, ONLY:BSS_Vnl_included + use BS_solvers, ONLY:BSS_Vnl_included,BSS_Q_dir,BSS_E_dir use BS, ONLY:BS_T_grp,BS_K_coupling,BS_nT_grps,L_kind,BS_bands,& -& BS_dip_size,l_BS_trace,BS_n_eh_spaces,l_BS_kerr_asymm,& +& BS_dip_size,l_BS_trace,BS_n_eh_spaces,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BSE_dipole_geometry,BS_field_direction,l_BS_ares_from_res +& BS_field_direction,l_BS_ares_from_res use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& & PAR_COM_Xk_ibz_INDEX use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use timing_m, ONLY:timing - use vec_operate, ONLY:v_rotate + use vec_operate, ONLY:cross_product ! #include ! @@ -88,29 +88,19 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) ! ! Directions for the external field ! - BS_field_direction(:,1)=Dip%q0/v_norm(Dip%q0) + BS_field_direction(:,1)=BSS_E_dir + BS_field_direction(:,2)=cross_product(BSS_Q_dir,BSS_E_dir) + BS_field_direction(:,3)=BSS_Q_dir ! - if (l_BS_trace) then + geometry_ok=abs(dot_product(BSS_E_dir,BSS_Q_dir))<1.E-5_SP + ! + if ( l_BS_trace .and. .not. geometry_ok ) then + call warning(" Propagation direction not ortogonal to field direction. Setting z for field propagation and x-y for direction") BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) BS_field_direction(:,2)=(/0._SP,1._SP,0._SP/) BS_field_direction(:,3)=(/0._SP,0._SP,1._SP/) endif ! - if (l_BS_kerr) then - geometry_ok=( trim(BSE_dipole_geometry)=='xy'.or.trim(BSE_dipole_geometry)=='xz'.or.trim(BSE_dipole_geometry)=='yz' ) & - & .or. ( trim(BSE_dipole_geometry)=='yx'.or.trim(BSE_dipole_geometry)=='zx'.or.trim(BSE_dipole_geometry)=='zy' ) - if(geometry_ok) then - if (BSE_dipole_geometry(1:1)=='x') BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) - if (BSE_dipole_geometry(1:1)=='y') BS_field_direction(:,1)=(/0._SP,1._SP,0._SP/) - if (BSE_dipole_geometry(1:1)=='z') BS_field_direction(:,1)=(/0._SP,0._SP,1._SP/) - else - call warning(" No or wrong kerr geometry specified in input file. Assuming xy") - BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) - BSE_dipole_geometry="xy" - endif - call v_rotate(trim(BSE_dipole_geometry),-pi/2._SP,BS_field_direction(:,1),v_out=BS_field_direction(:,2)) - endif - ! if (trim(global_gauge)=='length' ) BS_field_direction=BS_field_direction*q0_def_norm ! endif diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index d41a85842a..1c58d28c3a 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -32,7 +32,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use DIPOLES, ONLY:DIPOLE_t use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,REP - use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_eels_to_eps + use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_eels_to_eps,& +& BSS_Q_dir,BSS_E_dir use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_K_is_ALDA,BS_cpl_K_corr,& & BS_Blocks_and_Transitions_free,BSqpts,L_kind,l_BS_photolum use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded @@ -40,7 +41,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme use parallel_int, ONLY:PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:eval_G_minus_G - use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free + use vec_operate, ONLY:v_norm + use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free,q0_def_norm use D_lattice, ONLY:l_1D,l_2D ! #include @@ -82,6 +84,12 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) global_gauge="length" endif ! + ! q0 renormalization and field direction + ! + BSS_E_dir(:) = BSS_E_dir(:)/v_norm(BSS_E_dir) + BSS_Q_dir(:) = BSS_Q_dir(:)/v_norm(BSS_Q_dir) + BSS_q0(:) = BSS_E_dir(:)*q0_def_norm + ! ! Energy points !=============== call W_reset(W_bss) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 1ccd8d08fa..a76e6ca69a 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -195,6 +195,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! How to treat dipoles... !------------------------ l_BS_trace = STRING_match(BSE_prop,'trace') + l_BS_kerr_asymm= STRING_match(BSE_prop,'asymm') .and. l_BS_kerr ! if (l_BS_magnons.and.n_sp_pol==2) then l_BS_abs = .false. @@ -204,7 +205,6 @@ subroutine K_driver_init(what,iq,Ken,Xk) endif if (l_BS_kerr) then l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') - l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') BS_dip_size=2 l_BS_abs=.TRUE. endif @@ -212,7 +212,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) call warning(" Trace not compatible with kerr or pl. Switching it off") l_BS_trace = .false. endif - if (l_BS_trace ) BS_dip_size = 3 + if (l_BS_trace.or.l_BS_dichroism) BS_dip_size = 3 ! l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum ! diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 949ce2da05..9ddb956b22 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -507,10 +507,6 @@ subroutine before_infile_write_setup end subroutine before_infile_write_setup ! subroutine varsetup2 - ! - ! q0 renormalization - ! - BSS_q0(:) = BSS_q0(:)*q0_def_norm/v_norm( BSS_q0) ! if (len_trim(BSE_mode)==0 ) BSE_mode="retarded" if (STRING_same(trim(BSE_mode),"causal") ) BSE_mode="retarded" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 9fad0f7700..f5fca216c1 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -236,7 +236,7 @@ subroutine INIT_activate() ! Special case: The BSE equation is used to build up the BSE_Fxc kernel. if (l_bs_fxc) then call initactivate(1,'FxcGRLc FxcSVdig FxcRetarded FxcMEStps') - call initactivate(1,'BLongDir BEnRange BDmRange BEnSteps') + call initactivate(1,'EFieldDir QPropDir BEnRange BDmRange BEnSteps') endif ! endif @@ -258,7 +258,7 @@ subroutine INIT_activate() call initactivate(1,'EvPolarization FrSndOrd') #endif ! - call initactivate(1,'BSEprop BSEdips') + call initactivate(1,'BSEprop') call initactivate(1,'PL_weights') ! call initactivate(1,'DrudeWBS Reflectivity') @@ -275,7 +275,7 @@ subroutine INIT_activate() ! if (l_optics.and.l_bse.and.l_bss.or.(l_bse.and.l_rpa_IP)) then ! - call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps BLongDir') + call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps EFieldDir QPropDir') ! ! Special case: the BSE_Fxc kernel has been constructed ! Thus I move to g-space to solve the Dyson equation diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index b291957c10..6e79c7c277 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -49,9 +49,9 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & bz_samp,RIM_ng,RIM_epsm1,RIM_id_epsm1_reference,& & RIM_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,& -& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry +& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,L_kind,BS_K_cutoff,BSK_IO_mode use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,& -& BSS_dr,BSS_er,BSS_q0,BSS_damp_reference,BSS_inversion_mode,& +& BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& & BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig,Haydock_iterMAX #if defined _SLEPC && !defined _NL use BS_solvers, ONLY:BSS_slepc_target_E,BSS_slepc_extraction,BSS_slepc_ncv,BSS_slepc_tol,BSS_slepc_maxit,& @@ -308,11 +308,11 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'MetDamp' , '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/magn/dich/photolum/esrt',BSE_prop) - call it(defs,'BSEdips', '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',& & K_INV_EPS%PERT_FULL_ratio) - call it(defs,'BLongDir', '[BSS] [cc] Electric Field',BSS_q0) + call it(defs,'EfieldDir', '[BSS] [cc] Electric Field versor',BSS_E_dir) + call it(defs,'QPropDir', '[BSS] [cc] Propagation versor Field',BSS_Q_dir,verb_level=V_resp) call it(defs,'BEnRange', '[BSS] Energy range',BSS_er,E_unit) call it(defs,'BDmRange', '[BSS] Damping range',BSS_dr,E_unit) call it(defs,'BSHayTrs', '[BSS] Relative [o/o] Haydock threshold. Strict(>0)/Average(<0)',Haydock_threshold) diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index bbb0bf1271..c0b032a090 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& -& bsL_magn,bsR_magn,bsR_kerr,bsR_dich,bsR_pl) +& bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_pl) ! use pars, ONLY:SP,schlen,IP use stderr, ONLY:intc @@ -41,7 +41,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) , optional :: bsE(:) real(SP) ,pointer, optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer, optional :: bsR_kerr(:),bsR_dich(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) ! ! Work Space ! @@ -145,8 +145,8 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! if(present(bsR_dich)) then if(associated(bsR_dich)) then - call io_bulk(ID,'BS_DICH_Residuals',VAR_SZ=(/2,BSS_n_eig/)) - call io_bulk(ID,C1=bsR_dich) + call io_bulk(ID,'BS_DICH_Residuals',VAR_SZ=(/2,BSS_n_eig,2/)) + call io_bulk(ID,C2=bsR_dich) endif endif ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index c05b50d0b2..2b99976048 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -65,8 +65,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use wave_func, ONLY:wf_ng,wf_norm_test,wf_nb_io,wf_nb_io_groups,WF,WF_buffer,WF_buffered_IO,rho_map_thresh use FFT_m, ONLY:fft_dim_loaded,fft_size,fft_dim,fft_multiplier use IO_m, ONLY:io_reset,max_io_units,serial_number,frag_WF - use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,& -& BSS_q0,Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,& + use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,BSS_E_dir,BSS_Q_dir,& +& Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,& & BSS_damp_reference,BSS_Vnl_included,BSS_uses_GreenF,BSS_inversion_mode,& & BSS_perturbative_width,K_INV_EPS,K_INV_PL use descriptors,ONLY:IO_desc_reset @@ -461,7 +461,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) BSS_inversion_mode='pf' BSS_er=(/0._SP,10._SP/)/HA2EV BSS_dr=0.1_SP/HA2EV - BSS_q0=(/1._SP,0._SP,0._SP/) + BSS_E_dir=(/1._SP,0._SP,0._SP/) + BSS_Q_dir=(/0._SP,0._SP,1._SP/) BSS_uses_DbGd=.FALSE. BSS_damp_reference=0._SP BS_K_is_ALDA=.FALSE. diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 691b92e739..74f4a42c3a 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -47,7 +47,6 @@ module BS character(schlen) :: L_kind character(schlen) :: BSE_mode character(schlen) :: BSE_prop - character(schlen) :: BSE_dipole_geometry="none" character(schlen) :: BSK_mode character(schlen) :: BSK_IO_mode ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 4a95417d5c..2b8ee0c12c 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -74,6 +74,8 @@ module BS_solvers real(SP) :: BSS_dr(2) real(SP) :: BSS_damp_reference real(SP) :: BSS_q0(3) + real(SP) :: BSS_E_dir(3) + real(SP) :: BSS_Q_dir(3) logical :: BSS_uses_DbGd logical :: BSS_Vnl_included logical :: BSS_uses_GreenF @@ -163,7 +165,7 @@ integer function variables_BS(ID,iq,local_desc,CLOSE_the_menu,X) end function ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& - & bsL_magn,bsR_magn,bsR_kerr,bsR_dich,bsR_pl) + & bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_pl) use pars, ONLY:SP use X_m, ONLY:X_t implicit none @@ -171,7 +173,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) ,optional :: bsE(:) real(SP), pointer,optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer,optional :: bsR_kerr(:),bsR_dich(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) end function ! integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn,Vnp1) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index a286f6264c..9fa13c7844 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -216,7 +216,7 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) end subroutine ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP use frequency, ONLY:w_samp @@ -226,7 +226,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_right_kerr(:),BS_R_right_dich(:) + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine ! From 280ead0c03cc2b2d51375585391aaaa3bbda19af Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 31 Mar 2022 13:47:20 +0200 Subject: [PATCH 0216/1367] Version 5.1.1, Revision 21360, Hash 011f7066a MODIFIED * include/driver/version.h bse/K_diago_driver.F bse/K_diago_left_residuals.F bse/K_diago_right_residuals.F interface/INIT_activate.F interface/INIT_load.F Bugs: - [yambo] Fixed few issues introduced in the last commit Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_diago_driver.F | 16 ++++++++-------- src/bse/K_diago_left_residuals.F | 8 ++++++-- src/bse/K_diago_right_residuals.F | 2 +- src/interface/INIT_activate.F | 6 ++++-- src/interface/INIT_load.F | 3 ++- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1c61712c48..b1fe758989 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21359 -#define YAMBO_HASH "ef8e92f9d" +#define YAMBO_REVISION 21360 +#define YAMBO_HASH "011f7066a" diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index a3dcc4c1c5..3e909b6ec0 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -65,7 +65,7 @@ subroutine K_diago_driver(iq,W,X_static) ! use BS_solvers, ONLY:BSS_slepc_matrix,Slepc_v,BS_HAYVEC_free #endif - use BS, ONLY:l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum + use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_photolum use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free ! @@ -125,6 +125,8 @@ subroutine K_diago_driver(iq,W,X_static) #if defined _SLEPC && !defined _NL l_slepc = index(BSS_mode,'s')/=0 #endif + ! + l_dip_more=l_BS_kerr.or.l_BS_dichroism ! if(l_diago) Solver="Diago" #if defined _SLEPC && !defined _NL @@ -252,16 +254,14 @@ subroutine K_diago_driver(iq,W,X_static) ! if(l_diago) call live_timing( ) ! - l_dip_more=l_BS_kerr.or.l_BS_dichroism - ! ! Construct the residuals of epsilon !==================================== if (K_is_not_hermitian) then ! ! Right residuals if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then - call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_V_right) - if(l_dip_more) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) + call K_diago_right_residuals("opt1",i_BS_mat,BS_E,BS_R_right_abs, BS_V_right) + if(l_dip_more) call K_diago_right_residuals("opt2",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) endif if(l_BS_dichroism) then call K_diago_right_residuals("dic1",i_BS_mat,BS_E,BS_R_right_dich(:,1),BS_V_right) @@ -291,8 +291,8 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Right residuals if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then - call K_diago_right_residuals("abs", i_BS_mat,BS_E,BS_R_right_abs, BS_mat) - if(l_dip_more) call K_diago_right_residuals("kerr",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) + call K_diago_right_residuals("opt1", i_BS_mat,BS_E,BS_R_right_abs, BS_mat) + if(l_dip_more) call K_diago_right_residuals("opt2",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) endif if(l_BS_dichroism) then call K_diago_right_residuals("dic1",i_BS_mat,BS_E,BS_R_right_dich(:,1),BS_mat) @@ -389,7 +389,7 @@ subroutine local_alloc(what) if (l_BS_kerr) then YAMBO_ALLOC_P(BS_R_right_kerr,(BSS_n_eig)) endif - if (l_BS_kerr_asymm.or.l_BS_dichroism) then + if (l_dip_more) then YAMBO_ALLOC_P(BS_R_left_kerr,(BSS_n_eig)) endif if (l_BS_dichroism) then diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index fd07a54bb5..25e1772eac 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -38,6 +38,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_n_eig use MAGNONS, ONLY:BSS_dipoles_magn + use DICHROISM, ONLY:BSS_dipoles_dich ! implicit none ! @@ -64,7 +65,7 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over if (.not.present(BS_overlap)) scheme="hermitian" if ( present(BS_overlap)) scheme="non-hermitian" ! - velocity_correction=(trim(mode)=="opti").and.(trim(global_gauge)=="velocity") + velocity_correction=(index(mode,"opt")>0).and.(trim(global_gauge)=="velocity") ! if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) if ( BS_K_coupling) res_range=(/1,BS_H_dim/) @@ -81,7 +82,10 @@ subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_over ! call live_timing('EPS L residuals',px%n_of_elements(myid+1)) ! - if(trim(mode)=="opti") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) ! diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index 466a55e11d..1175753b43 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -57,7 +57,7 @@ subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) call PARALLEL_index(px,(/BSS_n_eig/)) ! BS_R_right=cZERO - velocity_correction=(trim(mode)=="abs".or.trim(mode)=="kerr").and.trim(global_gauge)=="velocity" + velocity_correction=(index(mode,"opt")>0).and.(trim(global_gauge)=="velocity") ! if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) if ( BS_K_coupling) res_range=(/1,BS_H_dim/) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index f5fca216c1..93e64f6f60 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -236,7 +236,8 @@ subroutine INIT_activate() ! Special case: The BSE equation is used to build up the BSE_Fxc kernel. if (l_bs_fxc) then call initactivate(1,'FxcGRLc FxcSVdig FxcRetarded FxcMEStps') - call initactivate(1,'EFieldDir QPropDir BEnRange BDmRange BEnSteps') + call initactivate(1,'BLongDir QPropDir BEnRange BDmRange BEnSteps') + !call initactivate(1,'EFieldDir QPropDir BEnRange BDmRange BEnSteps') endif ! endif @@ -275,7 +276,8 @@ subroutine INIT_activate() ! if (l_optics.and.l_bse.and.l_bss.or.(l_bse.and.l_rpa_IP)) then ! - call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps EFieldDir QPropDir') + call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps BLongDir QPropDir') + !call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps EFieldDir QPropDir') ! ! Special case: the BSE_Fxc kernel has been constructed ! Thus I move to g-space to solve the Dyson equation diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 6e79c7c277..19b88be58b 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -311,7 +311,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',& & K_INV_EPS%PERT_FULL_ratio) - call it(defs,'EfieldDir', '[BSS] [cc] Electric Field versor',BSS_E_dir) + call it(defs,'BLongDir', '[BSS] [cc] Electric Field versor',BSS_E_dir) + !call it(defs,'EFieldDir', '[BSS] [cc] Electric Field versor',BSS_E_dir) call it(defs,'QPropDir', '[BSS] [cc] Propagation versor Field',BSS_Q_dir,verb_level=V_resp) call it(defs,'BEnRange', '[BSS] Energy range',BSS_er,E_unit) call it(defs,'BDmRange', '[BSS] Damping range',BSS_dr,E_unit) From 80ca4c2383061e37747a31ea630ed9e465dbaa7f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 3 Apr 2022 22:49:45 +0200 Subject: [PATCH 0217/1367] Version 5.1.1, Revision 21361, Hash 280ead0c0 MODIFIED * include/driver/version.h dipoles/.objects dipoles/DIPOLE_driver.F io/io_DIPOLES.F modules/SET_defaults.F modules/mod_DIPOLES.F RENAMED * dipoles/DIPOLE_orb_magn_forCD.F -> dipoles/DIPOLE_orbital_magnetization_cd.F dipoles/DIPOLE_orbital_magnetization.F -> dipoles/DIPOLE_orbital_magnetization_rt.F Changes: - [yambo] Playing with orbital dipoles (cd approach vs rt approach) Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/dipoles/.objects | 5 +-- src/dipoles/DIPOLE_driver.F | 44 +++++++++---------- ...CD.F => DIPOLE_orbital_magnetization_cd.F} | 8 ++-- ...on.F => DIPOLE_orbital_magnetization_rt.F} | 20 +++++---- src/io/io_DIPOLES.F | 35 +++++++-------- src/modules/SET_defaults.F | 5 ++- src/modules/mod_DIPOLES.F | 3 +- 8 files changed, 62 insertions(+), 62 deletions(-) rename src/dipoles/{DIPOLE_orb_magn_forCD.F => DIPOLE_orbital_magnetization_cd.F} (96%) rename src/dipoles/{DIPOLE_orbital_magnetization.F => DIPOLE_orbital_magnetization_rt.F} (83%) diff --git a/include/driver/version.h b/include/driver/version.h index b1fe758989..d5d31ce4a2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21360 -#define YAMBO_HASH "011f7066a" +#define YAMBO_REVISION 21361 +#define YAMBO_HASH "280ead0c0" diff --git a/src/dipoles/.objects b/src/dipoles/.objects index c5efe3306c..f1998a15b3 100644 --- a/src/dipoles/.objects +++ b/src/dipoles/.objects @@ -1,7 +1,4 @@ -MAGN_objects = DIPOLE_orb_magn_forCD.o -#if defined _RT -MAGN_objects = DIPOLE_orbital_magnetization.o -#endif +MAGN_objects = DIPOLE_orbital_magnetization_cd.o DIPOLE_orbital_magnetization_rt.o #if defined _SC SC_objects = DIPOLE_SC_rotate.o #endif diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index 8a19db013f..0af60c99f9 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -47,7 +47,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) use DIPOLES, ONLY:DIP_alloc,DIPOLE_t,DIP_iR,use_covariant_approach,use_real_space_approach,& & Vnl_commutator_warning,use_g_space_approach,& & use_shifted_grids_approach,DIP_P,DIP_v,DIP_S,eval_OVERLAPS,& -& compute_P2_dipoles,compute_Orb_dipoles,compute_Spin_dipoles +& compute_P2_dipoles,compute_Orb_rt_dipoles,compute_Orb_cd_dipoles,compute_Spin_dipoles use IO_int, ONLY:IO_and_Messaging_switch use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_nibz,PAR_COM_DIPk_ibz_A2A,& & PAR_IND_CON_BANDS_DIP,PAR_IND_VAL_BANDS_DIP @@ -117,15 +117,17 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! compute_P2_dipoles = index(Dip%computed,"P2") /=0 compute_Spin_dipoles = index(Dip%computed,"Spin")/=0 - compute_Orb_dipoles = index(Dip%computed,"Orb") /=0 + compute_Orb_rt_dipoles = index(Dip%computed,"OrbRT") /=0 + compute_Orb_cd_dipoles = index(Dip%computed,"OrbCD") /=0 #if defined _SC compute_P2_dipoles = compute_P2_dipoles .or. l_sc_run #endif #if defined _RT compute_P2_dipoles = compute_P2_dipoles .or. l_real_time compute_Spin_dipoles = compute_Spin_dipoles .or. (l_real_time .and. n_spin>1) - compute_Orb_dipoles = compute_Orb_dipoles .or. (l_real_time .and. n_spin>1) + compute_Orb_rt_dipoles = compute_Orb_rt_dipoles .or. ((l_real_time .and. n_spin>1) .and. (.not. compute_Orb_cd_dipoles)) #endif + compute_Orb_cd_dipoles = compute_Orb_cd_dipoles .or. (l_BS_dichroism .and. (.not. compute_Orb_rt_dipoles)) compute_Spin_dipoles = compute_Spin_dipoles .or. (l_BS_magnons .and. n_spin>1) ! if(.not.any((/use_g_space_approach,use_real_space_approach,use_covariant_approach,use_shifted_grids_approach/))) then @@ -144,10 +146,10 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) idir_not_done =.true. ! Dip%computed='R V P' - if (compute_P2_dipoles) Dip%computed=trim(Dip%computed)//' P2' - if (compute_Spin_dipoles) Dip%computed=trim(Dip%computed)//' Spin' - if (compute_Orb_dipoles) Dip%computed=trim(Dip%computed)//' Orb' - if (l_BS_dichroism) Dip%computed=trim(Dip%computed)//' OrbCD' + if (compute_P2_dipoles) Dip%computed=trim(Dip%computed)//' P2' + if (compute_Spin_dipoles) Dip%computed=trim(Dip%computed)//' Spin' + if (compute_Orb_rt_dipoles) Dip%computed=trim(Dip%computed)//' OrbRT' + if (compute_Orb_rt_dipoles) Dip%computed=trim(Dip%computed)//' OrbCD' ! if (use_covariant_approach) eval_OVERLAPS=.true. ! @@ -198,11 +200,9 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! call DIPOLES_ppredux_and_symmetrize() ! -#if defined _RT - if (compute_Orb_dipoles) call DIPOLE_orbital_magnetization(Xen,Xk,Dip) -#else - if (l_BS_dichroism) call DIPOLE_orb_magn_forCD(Xen,Xk,Dip) -#endif + if (compute_orb_rt_dipoles) call DIPOLE_orbital_magnetization_rt(Xen,Xk,Dip) + ! + if (compute_orb_cd_dipoles) call DIPOLE_orbital_magnetization_cd(Xen,Xk,Dip) ! call DIPOLES_ppredux_and_symmetrize_orbt() ! @@ -251,13 +251,12 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) call DIP_alloc('DIP_v') if (use_covariant_approach) call DIP_alloc('DIP_S') if (compute_P2_dipoles) call DIP_alloc('P_square') - if (compute_Orb_dipoles) call DIP_alloc('DIP_orbital') + if (compute_Orb_rt_dipoles) call DIP_alloc('DIP_orbital') + if (compute_Orb_cd_dipoles) call DIP_alloc('DIP_orbital') if (compute_Spin_dipoles) call DIP_alloc('DIP_spin') #if defined _RT if (compute_Spin_dipoles.and.n_spinor==2) call DIP_alloc('DIP_P_spinor') #endif - ! - if(l_BS_dichroism) call DIP_alloc('DIP_orbital') ! contains ! @@ -270,10 +269,14 @@ subroutine DIPOLES_alloc() DIP_P=cZERO DIP_v=cZERO ! - if (compute_Orb_dipoles) then + if (compute_Orb_rt_dipoles) then call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_DIPk_nibz,2/)) DIP_orbital=cZERO endif + if (compute_Orb_cd_dipoles) then + call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_DIPk_nibz,1/)) + DIP_orbital=cZERO + endif if (compute_Spin_dipoles) then call DIP_alloc('DIP_spin',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_DIPk_nibz/)) DIP_spin=cZERO @@ -291,11 +294,6 @@ subroutine DIPOLES_alloc() P_square=cZERO endif #endif - ! - if (l_BS_dichroism) then - call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_DIPk_nibz,1/)) - DIP_orbital=cZERO - endif ! if(use_covariant_approach) then call DIP_alloc('DIP_S',(/Dip%ib(2),Dip%ib(2),6,Xk%nbz/)) @@ -400,8 +398,8 @@ subroutine DIPOLES_ppredux_and_symmetrize_orbt() integer :: ic,iv,i_sp_pol,ik,ik_mem,i_dips,n_dips ! n_dips=0 - if (compute_Orb_dipoles) n_dips=2 - if (l_BS_dichroism) n_dips=1 + if (compute_Orb_rt_dipoles) n_dips=2 + if (compute_Orb_cd_dipoles) n_dips=1 ! do i_dips=1,n_dips do i_sp_pol=1,n_sp_pol diff --git a/src/dipoles/DIPOLE_orb_magn_forCD.F b/src/dipoles/DIPOLE_orbital_magnetization_cd.F similarity index 96% rename from src/dipoles/DIPOLE_orb_magn_forCD.F rename to src/dipoles/DIPOLE_orbital_magnetization_cd.F index 60502c18a9..b23a7175d8 100644 --- a/src/dipoles/DIPOLE_orb_magn_forCD.F +++ b/src/dipoles/DIPOLE_orbital_magnetization_cd.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine Dipole_orb_magn_forCD(Xen,Xk,Dip) +subroutine Dipole_orbital_magnetization_cd(Xen,Xk,Dip) ! ! This routine returns ! @@ -51,7 +51,7 @@ subroutine Dipole_orb_magn_forCD(Xen,Xk,Dip) & PAR_IND_VAL_BANDS_DIP%n_of_elements(PAR_IND_VAL_BANDS_DIP_ID+1)*& & PAR_IND_CON_BANDS_DIP%n_of_elements(PAR_IND_CON_BANDS_DIP_ID+1) ! - if (n_LT_steps>0) call live_timing('Dipoles: orbital magnetization',n_LT_steps) + if (n_LT_steps>0) call live_timing('Dipoles: orbital magnetization(cd)',n_LT_steps) ! ! Main loop over k in IBZ ! @@ -76,7 +76,7 @@ subroutine Dipole_orb_magn_forCD(Xen,Xk,Dip) do ib=Dip%ib(1),Dip%ib(2) ! DIP_x_loc(:)=-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol) - + ! DIP_v_loc(:)=DIP_v(:,ic,ib,ik_mem,i_sp_pol) ! DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)=DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)+ & @@ -99,4 +99,4 @@ subroutine Dipole_orb_magn_forCD(Xen,Xk,Dip) ! call live_timing() ! -end subroutine Dipole_orb_magn_forCD +end subroutine Dipole_orbital_magnetization_cd diff --git a/src/dipoles/DIPOLE_orbital_magnetization.F b/src/dipoles/DIPOLE_orbital_magnetization_rt.F similarity index 83% rename from src/dipoles/DIPOLE_orbital_magnetization.F rename to src/dipoles/DIPOLE_orbital_magnetization_rt.F index b666ecefd3..0d0f23600d 100644 --- a/src/dipoles/DIPOLE_orbital_magnetization.F +++ b/src/dipoles/DIPOLE_orbital_magnetization_rt.F @@ -21,9 +21,10 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine Dipole_orbital_magnetization(Xen,Xk,Dip) +subroutine Dipole_orbital_magnetization_rt(Xen,Xk,Dip) ! ! This routine returns + ! Using PRB 74, 024408 (2006) ! use pars, ONLY:SP,cI use LIVE_t, ONLY:live_timing @@ -52,7 +53,7 @@ subroutine Dipole_orbital_magnetization(Xen,Xk,Dip) & PAR_IND_VAL_BANDS_DIP%n_of_elements(PAR_IND_VAL_BANDS_DIP_ID+1)*& & PAR_IND_CON_BANDS_DIP%n_of_elements(PAR_IND_CON_BANDS_DIP_ID+1) ! - if (n_LT_steps>0) call live_timing('Dipoles: orbital magnetization',n_LT_steps) + if (n_LT_steps>0) call live_timing('Dipoles: orbital magnetization(rt)',n_LT_steps) ! ! Main loop over k in IBZ ! @@ -85,12 +86,15 @@ subroutine Dipole_orbital_magnetization(Xen,Xk,Dip) Eb=Xen%E(ib,ik,i_sp_pol) if (allocated(Xen%Eo)) Eb=Xen%Eo(ib,ik,i_sp_pol) ! - if (iv< ib) DIP_pos(:,1)=conjg(-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol)) - if (iv>=ib) DIP_pos(:,1)= -cI*DIP_iR(:,iv,ib,ik_mem,i_sp_pol) - if (ic< ib) DIP_pos(:,2)=conjg(-cI*DIP_iR(:,ib,ic,ik_mem,i_sp_pol)) - if (ic>=ib) DIP_pos(:,2)= -cI*DIP_iR(:,ic,ib,ik_mem,i_sp_pol) + !if (iv< ib) DIP_pos(:,1)=conjg(-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol)) + !if (iv>=ib) DIP_pos(:,1)= -cI*DIP_iR(:,iv,ib,ik_mem,i_sp_pol) + !if (ic< ib) DIP_pos(:,2)=conjg(-cI*DIP_iR(:,ib,ic,ik_mem,i_sp_pol)) + !if (ic>=ib) DIP_pos(:,2)= -cI*DIP_iR(:,ic,ib,ik_mem,i_sp_pol) + DIP_pos(:,1)= -cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol) + DIP_pos(:,2)= -cI*DIP_iR(:,ic,ib,ik_mem,i_sp_pol) ! - DIP_tmp=-cI*cross_product(DIP_pos(:,1),DIP_pos(:,2)) + !DIP_tmp=-cI*cross_product(DIP_pos(:,1),DIP_pos(:,2)) + DIP_tmp=cI*cross_product(DIP_pos(:,1),DIP_pos(:,2)) ! ! Local part ! @@ -113,4 +117,4 @@ subroutine Dipole_orbital_magnetization(Xen,Xk,Dip) ! call live_timing() ! -end subroutine Dipole_orbital_magnetization +end subroutine Dipole_orbital_magnetization_rt diff --git a/src/io/io_DIPOLES.F b/src/io/io_DIPOLES.F index 404a76e3c6..25b7cbb4a0 100644 --- a/src/io/io_DIPOLES.F +++ b/src/io/io_DIPOLES.F @@ -31,7 +31,7 @@ integer function io_DIPOLES(Dip,ID) & IO_NOT_ALLOWED,frag_DIP use IO_int, ONLY:io_connect,io_disconnect,io_bulk,io_header,io_fragment use DIPOLES, ONLY:DIP_spin,DIP_orbital,& -& compute_Orb_dipoles,compute_Spin_dipoles +& compute_Orb_rt_dipoles,compute_Orb_cd_dipoles,compute_Spin_dipoles use electrons, ONLY:n_spinor #if defined _RT use DIPOLES, ONLY:DIP_P_spinor @@ -39,7 +39,6 @@ integer function io_DIPOLES(Dip,ID) #if defined _SC || defined _RT use DIPOLES, ONLY:P_square,compute_P2_dipoles #endif - use BS, ONLY:l_BS_dichroism use parallel_m, ONLY:PAR_K_scheme use timing_m, ONLY:timing ! @@ -119,8 +118,10 @@ integer function io_DIPOLES(Dip,ID) call DIP_alloc('DIP_P' ,(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) call DIP_alloc('DIP_v' ,(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) ! - if (compute_Orb_dipoles) & + if (compute_Orb_rt_dipoles) & & call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz,2/)) + if (compute_Orb_cd_dipoles) & + & call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz,1/)) if (compute_Spin_dipoles) & & call DIP_alloc('DIP_spin',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) #if defined _RT @@ -130,9 +131,6 @@ integer function io_DIPOLES(Dip,ID) #if defined _SC || defined _RT if (compute_P2_dipoles) call DIP_alloc('P_square',(/Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) #endif - if(l_BS_dichroism) then - call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz,1/)) - endif ! endif ! @@ -158,7 +156,13 @@ integer function io_DIPOLES(Dip,ID) call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=DIP_size) call io_bulk(ID_frag,C3=DIP_v(:,:,:,ik_mem,i_sp_pol),IPOS=DIP_ipos) ! - if (compute_Orb_dipoles) then + if (compute_Orb_rt_dipoles) then + ! + ! Orbital magnetization + ! + write (VAR_name,'(3(a,i4.4))') 'DIP_orbital_k_',ik,'_spin_',i_sp_pol + call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=DIP_size) + call io_bulk(ID_frag,C3=DIP_orbital(:,:,:,ik_mem,i_sp_pol,1),IPOS=DIP_ipos) ! ! Itinerant magnetization ! @@ -166,11 +170,15 @@ integer function io_DIPOLES(Dip,ID) call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=DIP_size) call io_bulk(ID_frag,C3=DIP_orbital(:,:,:,ik_mem,i_sp_pol,2),IPOS=DIP_ipos) ! + endif + ! + if (compute_Orb_cd_dipoles) then + ! ! Orbital magnetization - ! + ! write (VAR_name,'(3(a,i4.4))') 'DIP_orbital_k_',ik,'_spin_',i_sp_pol call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=DIP_size) - call io_bulk(ID_frag,C3=DIP_orbital(:,:,:,ik_mem,i_sp_pol,1),IPOS=DIP_ipos) + call io_bulk(ID_frag,C3=DIP_orbital(:,:,:,ik_mem,i_sp_pol,1),IPOS=DIP_ipos) ! endif ! @@ -211,15 +219,6 @@ integer function io_DIPOLES(Dip,ID) ! endif #endif - ! -if (l_BS_dichroism) then - ! - ! Orbital magnetization - ! - write (VAR_name,'(3(a,i4.4))') 'DIP_orbital_k_',ik,'_spin_',i_sp_pol - call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=DIP_size) - call io_bulk(ID_frag,C3=DIP_orbital(:,:,:,ik_mem,i_sp_pol,1),IPOS=DIP_ipos) - endif ! call io_fragment_disconnect(ID,ID_frag) ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 2b99976048..1ec3ad6517 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -37,7 +37,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & Chi_linalg_mode,X_use_lin_sys,X_use_gpu,X_DbGd_percentual use DIPOLES, ONLY:use_covariant_approach,use_real_space_approach,& & Vnl_commutator_warning,use_shifted_grids_approach,use_g_space_approach,& -& compute_P2_dipoles,compute_Spin_dipoles,compute_Orb_dipoles +& compute_P2_dipoles,compute_Spin_dipoles,compute_Orb_rt_dipoles,compute_Orb_cd_dipoles use QP_m, ONLY:QP_dSc_steps,QP_n_W_freqs,QP_G_Zoom_treshold,& & QP_dSc_test,QP_solver,QP_G_damp,QP_dSc_delta,& & QP_cg_percent,QP_n_states,SC_E_threshold, & @@ -369,7 +369,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use_g_space_approach = .TRUE. compute_P2_dipoles = .FALSE. compute_Spin_dipoles = .FALSE. - compute_Orb_dipoles = .FALSE. + compute_Orb_rt_dipoles = .FALSE. + compute_Orb_cd_dipoles = .FALSE. use_X_DbGd=.FALSE. X_DbGd_percentual=-1. eps_2_alpha=1._SP diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index a3fe2a62fe..42d0930545 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -37,7 +37,8 @@ module DIPOLES logical :: use_real_space_approach logical :: compute_P2_dipoles logical :: compute_Spin_dipoles - logical :: compute_Orb_dipoles + logical :: compute_Orb_rt_dipoles + logical :: compute_Orb_cd_dipoles logical :: Vnl_commutator_warning ! ! other From 7863b1f3e5988df577567f1285d7f6925a9d577b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 7 Apr 2022 02:25:00 +0200 Subject: [PATCH 0218/1367] Version 5.1.1, Revision 21366, Hash 028d31e1c MODIFIED * include/driver/version.h bz_ops/bz_samp_indexes.F exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F Changes: - [yambo_ph] Saving work done up to now Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- src/bz_ops/bz_samp_indexes.F | 14 ++++----- src/exc-ph/EXCPH_eval_sat.F | 7 ++--- src/exc-ph/EXCPH_gkkp_driver.F | 54 ++++++++++++++++++---------------- src/exc-ph/EXCPH_gkkp_eval.F | 29 ++++++++++-------- src/exc-ph/EXCPH_lifetime.F | 22 +++++++++----- 6 files changed, 72 insertions(+), 58 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3f256e81af..1c246aaaac 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,5 +25,5 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21307 -#define YAMBO_HASH "a1c3037f1" +#define YAMBO_REVISION 21366 +#define YAMBO_HASH "028d31e1c" diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 3514cbea6a..1754c9ec50 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -43,7 +43,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! qindx_C(ikbz,iqbz,2)=iGo ! use pars, ONLY:SP,lchlen,zero_dfl - use drivers, ONLY:l_bse,l_elel_scatt,l_setup + use drivers, ONLY:l_bse,l_elel_scatt,l_setup,l_EXCPH_gkkp use com, ONLY:msg,fat_log use parallel_m, ONLY:PAR_K_scheme,master_cpu,PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index @@ -93,8 +93,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! .... which GRIDS? X_scattering =index(k_GRIDS_string,"X")>0 sigma_scattering=index(k_GRIDS_string,"S")>0 - bse_scattering =l_bse .and. (BS_res_K_corr.or.BS_cpl_K_corr) - coll_scattering =l_elel_scatt + bse_scattering =(l_bse .and. (BS_res_K_corr.or.BS_cpl_K_corr)) + coll_scattering =(l_elel_scatt.or.l_EXCPH_gkkp) #if defined _ELPH call parser('BSEscatt',bse_setup_scatt) if (.not.bse_scattering ) bse_scattering =elph_use_q_grid.or.bse_setup_scatt.or.trim(q_source)=="Electron-Phonon databases" @@ -103,10 +103,10 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! ... User defined call parser('K_grids', user_grids) if (user_grids) then - if (index(k_GRIDS_string,"B")==0.and.bse_scattering ) bse_scattering=.FALSE. - if (index(k_GRIDS_string,"C")==0.and.coll_scattering ) coll_scattering=.FALSE. - if (index(k_GRIDS_string,"X")==0.and.X_scattering ) X_scattering=.FALSE. - if (index(k_GRIDS_string,"S")==0.and.sigma_scattering) sigma_scattering=.FALSE. + bse_scattering = index(k_GRIDS_string,"B")/=0 + coll_scattering = index(k_GRIDS_string,"C")/=0 + X_scattering = index(k_GRIDS_string,"X")/=0 + sigma_scattering= index(k_GRIDS_string,"S")/=0 if (len_trim(k_GRIDS_string)==0) k_GRIDS_string="none" call k_GRIDS_update( ) endif diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 505d3ed3d8..d473e10d2d 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -38,16 +38,15 @@ subroutine EXCPH_eval_sat(iq,q) ! ! Work space ! - integer :: i_alpha,i_beta,il,iq_bz + integer :: i_alpha,i_beta,il real(SP) :: ph_E ! ! Calculate satellites weights and renormalization factors without double-grid ! - iq_bz = q%k_table(iq, 1) - ! do il=elph_branches(1),elph_branches(2) ! - ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + !ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ph_E=sqrt(abs(PH_freqs_sq(iq,il))) if(ph_E ! type(levels) ::E @@ -51,6 +51,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! ! Work Space ! + logical :: t_rev integer :: ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,i_H,i_Hp,i_alpha,& & iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT real(SP) :: ph_E,elph_gkkp_sq @@ -66,6 +67,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) do i_star=1,q%nstar(iq) ! iq_s=q%star(iq,i_star) + t_rev= (iq_s>nsym/(i_time_rev+1)) ! iq_bz = q%k_table(iq, iq_s) ! @@ -94,7 +96,8 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) ! - ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz + ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz + ! = R_iq_s^-1 ik_bz ! ip_bz = elemental_scattering(iq_s,ik_bz) ! @@ -107,15 +110,16 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! elph_gkkp_sq=GKKP%dVc(il,iv,ivp,ik_bz,1)/sqrt(2._SP*ph_E) ! - if (i_Hp/=0) then - Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - endif + if (i_Hp==0) cycle + ! + if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) ! enddo ! - ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz + ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz ! - ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz + ik_plus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz ! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! @@ -128,9 +132,10 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! elph_gkkp_sq=GKKP%dVc(il,icp,ic,ip_bz,1)/sqrt(2._SP*ph_E) ! - if (i_Hp/=0) then - Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - endif + if (i_Hp==0) cycle + ! + if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) ! enddo ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 618740304a..a7c6759ad2 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -50,12 +50,15 @@ subroutine EXCPH_lifetime(E,k,q,X) ! integer :: ID_exc_gkkp,ID_gkkp,io_err integer, external :: io_EXCPH_gkkp,io_ELPH - integer :: iq_bz,i_alpha,i_beta,il + integer :: iq,iq_s,iq_bz,i_alpha,i_beta,il,i_star integer :: elph_branches_save(2) integer :: min_pos(1) ! call section('*','EXCPH-LifTime') ! + call k_build_up_BZ_tables(k) + call k_build_up_BZ_tables(q) + ! ! Load excitonic energies ! call EXCPH_load_L(1,X,'check','Lout') @@ -69,9 +72,9 @@ subroutine EXCPH_lifetime(E,k,q,X) call EXCPH_load_L(1,X,'eigenvalues','Lin') BS_E_in(:)=BS_E(:) ! L_in can be different from L_out ! - do iq_bz=1,q%nibz - call EXCPH_load_L(iq_bz,X,'eigenvalues','Lout') - BS_all_E(:,iq_bz)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + do iq=1,q%nibz + call EXCPH_load_L(iq,X,'eigenvalues','Lout') + BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! ! Load the Exciton-phonon elements and phonon energies @@ -103,7 +106,11 @@ subroutine EXCPH_lifetime(E,k,q,X) YAMBO_ALLOC(EXC_LifeTime,(EXCPH_states(1):EXCPH_states(2))) EXC_LifeTime=rZERO ! - do iq_bz=1,q%nbz + do iq=1,q%nibz + do i_star=1,q%nstar(iq) + ! + iq_s=q%star(iq,i_star) + iq_bz = q%k_table(iq, iq_s) ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') @@ -132,6 +139,7 @@ subroutine EXCPH_lifetime(E,k,q,X) enddo ! enddo + enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz) ! @@ -159,9 +167,9 @@ function Simple_pole() Simple_pole=rZERO ! E_alpha=real(BS_E_in(i_alpha),SP) - E_beta =BS_all_E(i_beta,iq_bz) + E_beta =BS_all_E(i_beta,iq) ! - ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) + ph_E=sqrt(abs(PH_freqs_sq(iq,il))) if(ph_E Date: Thu, 7 Apr 2022 10:13:01 +0200 Subject: [PATCH 0219/1367] Version 5.1.1, Revision 21367, Hash 7863b1f3e MODIFIED * include/driver/version.h exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F io/io_ELPH.F io/io_EXCPH_gkkp.F Changes: - [yambo_ph] Working on excph with symmetries Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_eval_sat.F | 1 - src/exc-ph/EXCPH_gkkp_driver.F | 38 +++++++++++++++++----------------- src/exc-ph/EXCPH_gkkp_eval.F | 20 +++++++++--------- src/io/io_ELPH.F | 1 + src/io/io_EXCPH_gkkp.F | 4 ++-- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1c246aaaac..88a2ccec4f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,5 +25,5 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21366 -#define YAMBO_HASH "028d31e1c" +#define YAMBO_REVISION 21367 +#define YAMBO_HASH "7863b1f3e" diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index d473e10d2d..efe488d3b1 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -45,7 +45,6 @@ subroutine EXCPH_eval_sat(iq,q) ! do il=elph_branches(1),elph_branches(2) ! - !ph_E=sqrt(abs(PH_freqs_sq(iq_bz,il))) ph_E=sqrt(abs(PH_freqs_sq(iq,il))) if(ph_E1) call EXCPH_load_L(iq,X,'check','Lout') call EXCPH_load_L(iq,X,'load','Lout') ! - EXCPH_gkkp =cZERO - EXCPH_gkkp_sq =rZERO - ! - do il=1,ph_modes + do i_star=1,q%nstar(iq) ! - call EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) + iq_s=q%star(iq,i_star) + iq_bz = q%k_table(iq, iq_s) ! - call live_timing(steps=1) + EXCPH_gkkp =cZERO + EXCPH_gkkp_sq =rZERO ! - enddo - ! - ! Add the WEIGHTs factor to calculate the renormalization factors - ! - do i_star=1,q%nstar(iq) + do il=1,ph_modes + ! + call EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) + ! + call live_timing(steps=1) + ! + enddo + ! + ! Add the WEIGHTs factor to calculate the renormalization factors ! BS_Sat_E =rZERO BS_Sat_E_PH_abs =rZERO BS_Sat_WEIGHT =rZERO BS_Sat_WEIGHT_PH_abs=rZERO ! - iq_s=q%star(iq,i_star) - iq_bz = q%k_table(iq, iq_s) - ! call EXCPH_eval_sat(iq_bz,q) ! ! Find the maximum weight of the satellites @@ -188,13 +188,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) endif enddo ! + ! I/O + !===== + call io_control(ACTION=WR_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') + ! enddo ! - ! I/O - !===== - call io_control(ACTION=WR_CL_IF_END,SEC=(/iq+1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') - ! enddo ! call live_timing( ) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index cca3b7e502..6a2c43a6b1 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -25,7 +25,7 @@ ! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. ! - FP ! -subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) +subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO use drivers, ONLY:l_EXCPH_Sigma @@ -46,14 +46,14 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) type(levels) ::E type(bz_samp) ::k,q type(X_t) ::X - integer, intent(in) :: iq,il + integer, intent(in) :: iq,iq_s,iq_bz,il integer, intent(inout) :: ID_gkkp ! ! Work Space ! logical :: t_rev - integer :: ID_BS,ID_exc_Gkkp,io_err,i_star,iq_bz,i_H,i_Hp,i_alpha,& -& iv,ic,ik_bz,ivp,icp,iq_s,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT + integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,& +& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT real(SP) :: ph_E,elph_gkkp_sq integer, external :: io_ELPH ! @@ -64,19 +64,19 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! ->i_alpha ->i_H [Calculate Gkkp] Xi=cZERO ! - do i_star=1,q%nstar(iq) + !do i_star=1,q%nstar(iq) ! - iq_s=q%star(iq,i_star) + !iq_s=q%star(iq,i_star) t_rev= (iq_s>nsym/(i_time_rev+1)) ! - iq_bz = q%k_table(iq, iq_s) + !iq_bz = q%k_table(iq, iq_s) ! ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > ! ! with k and q in the BZ ! IO_ACT=manage_action(RD,iq_bz,1,q%nbz) - if(il==elph_branches(2).and.i_star==q%nstar(iq)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) ! call io_control(ACTION=IO_ACT,SEC=(/iq_bz+1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. @@ -84,7 +84,7 @@ subroutine EXCPH_gkkp_eval(iq,il,E,k,q,X,ID_gkkp) ! ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) ! - if (ph_E ! @@ -38,14 +39,16 @@ subroutine EXCPH_eval_sat(iq,q) ! ! Work space ! - integer :: i_alpha,i_beta,il + integer :: i_alpha,i_beta,il,iq_db real(SP) :: ph_E ! ! Calculate satellites weights and renormalization factors without double-grid ! do il=elph_branches(1),elph_branches(2) ! - ph_E=sqrt(abs(PH_freqs_sq(iq,il))) + iq_db=iq + if(nsym==1) iq_db=DB_Q_map(iq) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_E ! @@ -52,7 +52,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! Work Space ! logical :: t_rev - integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,& + integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,& & iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT real(SP) :: ph_E,elph_gkkp_sq integer, external :: io_ELPH @@ -75,14 +75,17 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! ! with k and q in the BZ ! - IO_ACT=manage_action(RD,iq_bz,1,q%nbz) - if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + iq_db=iq_bz + if(nsym==1) iq_db=DB_Q_map(iq_bz) + IO_ACT=manage_action(RD,iq_db,1,q%nbz) + if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_db,1,q%nbz) ! - call io_control(ACTION=IO_ACT,SEC=(/iq_bz+1/),ID=ID_gkkp) + + call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. if(io_err/=0) call error(" Error reading gkkp_expanded") ! - ph_E=sqrt(abs(ph_freqs_sq(iq_bz,il))) + ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) ! if (ph_E Date: Fri, 8 Apr 2022 15:53:54 +0200 Subject: [PATCH 0221/1367] Version 5.1.1, Revision 21248, Hash 8a9b1a2cc MODIFIED * include/driver/version.h bse/EPS_via_perturbative_inversion.F bse/K_diago_driver.F bse/K_diagonal.F bse/K_driver_init.F bse/K_inversion_Lo.F bse/K_inversion_driver.F bse/K_inversion_engine.F bse/K_output_file.F bse/PL_diago_residual.F bse/PL_via_perturbative_inversion.F Bugs: - [yambo_rt] recovering PL Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/EPS_via_perturbative_inversion.F | 12 ++++++------ src/bse/K_diago_driver.F | 5 ----- src/bse/K_diagonal.F | 15 ++++++++++----- src/bse/K_driver_init.F | 6 +++++- src/bse/K_inversion_Lo.F | 6 +++--- src/bse/K_inversion_driver.F | 9 ++++----- src/bse/K_inversion_engine.F | 20 ++++++++++---------- src/bse/K_output_file.F | 6 +++--- src/bse/PL_diago_residual.F | 18 +++++++++--------- src/bse/PL_via_perturbative_inversion.F | 24 ++++++++++++------------ 11 files changed, 64 insertions(+), 61 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c374c4a08e..d11efb6f6f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21246 -#define YAMBO_HASH "b5e3bd40e" +#define YAMBO_REVISION 21248 +#define YAMBO_HASH "8a9b1a2cc" diff --git a/src/bse/EPS_via_perturbative_inversion.F b/src/bse/EPS_via_perturbative_inversion.F index d6698dcb8e..31dd99e0fc 100644 --- a/src/bse/EPS_via_perturbative_inversion.F +++ b/src/bse/EPS_via_perturbative_inversion.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -integer function EPS_via_perturbative_inversion(n,m,n_loop,D,C,f,Lo) +integer function EPS_via_perturbative_inversion(n,m,D,C,f,Lo) ! ! Here I wante to calculate ! @@ -49,7 +49,7 @@ integer function EPS_via_perturbative_inversion(n,m,n_loop,D,C,f,Lo) ! implicit none ! - integer, intent(in) ::n,m,n_loop + integer, intent(in) ::n,m complex(SP),intent(in) ::C,D(n),Lo(n,m) complex(SP),intent(out) ::f ! @@ -65,7 +65,7 @@ integer function EPS_via_perturbative_inversion(n,m,n_loop,D,C,f,Lo) ! R_x_D_nm1(:,1)=Lo(:,1)*D(:) fo=C*Vstar_dot_V_omp(n,D,R_x_D_nm1(:,1)) - if(n_loop==2) then + if(m==2) then R_x_D_nm1(:,2)=Lo(:,2)*conjg(D(:)) fo=fo+C*V_dot_V_omp(n,D,R_x_D_nm1(:,2)) endif @@ -83,17 +83,17 @@ integer function EPS_via_perturbative_inversion(n,m,n_loop,D,C,f,Lo) ! if (.not.K_slk%kind=="SLK") then call M_by_V_omp('n',n,BS_mat,R_x_D_nm1(:,1),R_x_D_n(:,1)) - if (n_loop==2) call M_by_V_omp('n',n,conjg(BS_mat),R_x_D_nm1(:,2),R_x_D_n(:,2)) + if (m==2) call M_by_V_omp('n',n,conjg(BS_mat),R_x_D_nm1(:,2),R_x_D_n(:,2)) else #if defined _SCALAPACK call PARALLEL_M_by_V('n',n,K_slk,R_x_D_nm1(:,1),R_x_D_n(:,1)) - if (n_loop==2) call PARALLEL_M_by_V('C',n,K_slk,R_x_D_nm1(:,2),R_x_D_n(:,2)) + if (m==2) call PARALLEL_M_by_V('C',n,K_slk,R_x_D_nm1(:,2),R_x_D_n(:,2)) #endif endif ! R_x_D_n(:,1)=Lo(:,1)*R_x_D_n(:,1) delta_f=C*Vstar_dot_V_omp(n,D,R_x_D_n(1:n,1)) - if (n_loop==2) then + if (m==2) then R_x_D_n(:,2)=Lo(:,2)*R_x_D_n(:,2) delta_f=delta_f+C*V_dot_V_omp(n,D,R_x_D_n(:,2)) endif diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index a04c217b61..860202eee1 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -65,8 +65,6 @@ subroutine K_diago_driver(iq,W,X_static) use BS_solvers, ONLY:BSS_slepc_matrix,Slepc_v,BS_HAYVEC_free #endif use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_photolum - use MAGNONS, ONLY:BSS_MAGN_free - use PHOTOLUM, ONLY:BSS_PL_free ! #include ! @@ -321,9 +319,6 @@ subroutine K_diago_driver(iq,W,X_static) #if defined _SLEPC && !defined _NL if(l_slepc) call K_slepc_local_free() #endif - ! - call BSS_PL_free( ) - call BSS_MAGN_free( ) ! call timing(trim(Solver)//' Solver',OPR='stop') ! diff --git a/src/bse/K_diagonal.F b/src/bse/K_diagonal.F index 1199838f9f..11a4b93466 100644 --- a/src/bse/K_diagonal.F +++ b/src/bse/K_diagonal.F @@ -26,7 +26,7 @@ subroutine K_diagonal(iq,what) use pars, ONLY:SP,cZERO,cI use parser_m, ONLY:parser use BS_solvers, ONLY:BS_mat,BSS_eh_f,BSS_eh_E,K_diago_in_BS_mat,BSS_eh_W,BS_diagonal,K_slk - use BS, ONLY:BS_K_dim,BSE_mode,BS_H_dim + use BS, ONLY:BS_K_dim,BSE_mode,BS_H_dim,BS_n_eh_spaces use SLK_m, ONLY:SLK_POOL use parallel_int, ONLY:PP_redux_wait ! @@ -129,17 +129,22 @@ subroutine K_diagonal(iq,what) ! if (.not.K_diago_in_BS_mat) then ! - YAMBO_ALLOC(BS_diagonal,(BS_K_dim(1))) - BS_diagonal=cZERO + if (BS_n_eh_spaces==1) then + YAMBO_ALLOC(BS_diagonal,(BS_K_dim(1))) + BS_diagonal=cZERO + else + YAMBO_ALLOC(BS_diagonal,(BS_H_dim)) + BS_diagonal=cZERO + endif ! if (rows(1)<=rows(2)) then do i_r=rows(1),rows(2) ! if (K_slk%kind=="SLK") then - if (.not.cpl(i_r).and.SLK_POOL%ID==0) BS_diagonal(i_r)=K_slk%blc(i_r,i_r,1) + if ( ((.not.cpl(i_r)).or.BS_n_eh_spaces==1).and.SLK_POOL%ID==0) BS_diagonal(i_r)=K_slk%blc(i_r,i_r,1) K_slk%blc(i_r,i_r,1)=cZERO else - if (.not.cpl(i_r)) BS_diagonal(i_r)=BS_mat(i_r,i_r) + if ( ((.not.cpl(i_r)).or.BS_n_eh_spaces==1).and.SLK_POOL%ID==0) BS_diagonal(i_r)=BS_mat(i_r,i_r) BS_mat(i_r,i_r)=cZERO endif enddo diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index ef66dc99a7..2b1048bdb8 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -28,6 +28,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode use stderr, ONLY:STRING_match + use X_m, ONLY:global_gauge use BS_solvers, ONLY:BSS_eels_to_eps,BSS_mode,BSS_slepc_matrix,BSS_uses_DbGd,& & BSS_slepc_double_grp use BS, ONLY:L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& @@ -207,7 +208,10 @@ subroutine K_driver_init(what,iq,Ken,Xk) BS_dip_size=2 l_BS_abs=.TRUE. endif - if (l_BS_photolum) l_BS_trace = .false. + if (l_BS_photolum) then + l_BS_trace = .true. + global_gauge="velocity" + endif if (l_BS_trace ) BS_dip_size = 3 ! l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index d19e41b17f..5a5345d92b 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) +subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) ! use pars, ONLY:SP,cZERO,cI,pi,rZERO,schlen use R_lattice, ONLY:bz_samp,bare_qpg @@ -49,7 +49,7 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) type(w_samp), intent(inout) :: W type(levels), intent(in) :: E type(bz_samp), intent(in) :: k - integer, intent(in) :: iq,Lo_dim,Lo_n_loop + integer, intent(in) :: iq,Lo_dim complex(SP), intent(out) :: Lo(BS_H_dim,W%n_freqs,Lo_dim) ! ! Work Space @@ -172,7 +172,7 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) if (BS_K_anti_resonant) then call X_GreenF_analytical(iq,transition,W,E,k,SF(:,2),"Ra","eh",.TRUE.,.FALSE.) endif - Lo(i_Lo_trans,:,i_Lo+Lo_n_loop)=BSS_PL_f(i_res)/BSS_eh_f(i_res)**2*aimag(W%p(1))/pi + Lo(i_Lo_trans,:,i_Lo)=BSS_PL_f(i_res)/BSS_eh_f(i_res)**2*aimag(W%p(1))/pi endif ! else diff --git a/src/bse/K_inversion_driver.F b/src/bse/K_inversion_driver.F index 34379e2056..06bc0e2768 100644 --- a/src/bse/K_inversion_driver.F +++ b/src/bse/K_inversion_driver.F @@ -79,7 +79,7 @@ subroutine K_inversion_driver(iq,W,E,k,q) ! ! I/O ! - integer :: i_err,ID,Lo_dim,Lo_n_loop + integer :: i_err,ID,Lo_dim integer, external :: io_BSS_invert ! call timing('Inversion Solver',OPR='start') @@ -167,7 +167,6 @@ subroutine K_inversion_driver(iq,W,E,k,q) !=========================================================================== Lo_dim=1 if (BS_K_anti_resonant.and.l_BS_ares_from_res) Lo_dim=2 - Lo_n_loop=Lo_dim ! ! In the PL case we need, in addition to the standard GF, also some additional L_k^(r)(w) A_k(w) L_k^(a)(w), where ! L^(a/r) are deduced from the standard components. @@ -179,7 +178,7 @@ subroutine K_inversion_driver(iq,W,E,k,q) ! YAMBO_ALLOC(Lo,(BS_H_dim,W%n_freqs,Lo_dim)) ! - call K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) + call K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) ! ! Initialize the output file !============================ @@ -197,7 +196,7 @@ subroutine K_inversion_driver(iq,W,E,k,q) & TOTAL=W%n_freqs,NCPU=PAR_COM_SLK_INDEX_local%n_CPU) call live_timing('Perturbative inversion ',PAR_IND_freqs%n_of_elements(PAR_IND_FREQ_ID)) ! - call K_inversion_engine("any",1,W%n_freqs,iq,PAR_IND_freqs,W,Lo,Lo_dim,Lo_n_loop,.FALSE.) + call K_inversion_engine("any",1,W%n_freqs,iq,PAR_IND_freqs,W,Lo,Lo_dim,.FALSE.) ! call PP_redux_wait(K_INV_EPS%err,COMM=PAR_COM_SLK_INDEX_local%COMM) call PP_redux_wait(Epsilon_ii(:,2),COMM=PAR_COM_SLK_INDEX_local%COMM) @@ -308,7 +307,7 @@ subroutine do_it_FULL(TYP) ! iw=TYP%iw_full(i1) ! - call K_inversion_engine(TYP%what,iw,1,iq,PAR_IND_freqs,W,Lo,Lo_dim,Lo_n_loop,.TRUE.) + call K_inversion_engine(TYP%what,iw,1,iq,PAR_IND_freqs,W,Lo,Lo_dim,.TRUE.) ! call live_timing(steps=1) ! diff --git a/src/bse/K_inversion_engine.F b/src/bse/K_inversion_engine.F index bd59057a5d..707e41f9f2 100644 --- a/src/bse/K_inversion_engine.F +++ b/src/bse/K_inversion_engine.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,Lo_n_loop,do_it_full) +subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,do_it_full) ! use pars, ONLY:SP,cZERO use parallel_m, ONLY:PP_indexes @@ -38,7 +38,7 @@ subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,Lo_n_loop, #include ! character(3) :: what - integer :: iw_2start,iw_2do,iq,Lo_dim,Lo_n_loop + integer :: iw_2start,iw_2do,iq,Lo_dim type(PP_indexes) :: px type(w_samp) :: W complex(SP) :: Lo(BS_H_dim,W%n_freqs,Lo_dim) @@ -77,20 +77,20 @@ subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,Lo_n_loop, endif ! if (K_INV_EPS%err(iw)/=0) then - K_INV_EPS%err(iw)=EPS_via_perturbative_inversion(BS_H_dim,Lo_dim,Lo_n_loop,BSS_dipoles_opt(1,:),gauge_factor,& + K_INV_EPS%err(iw)=EPS_via_perturbative_inversion(BS_H_dim,Lo_dim,BSS_dipoles_opt(1,:),gauge_factor,& & Epsilon_ii(iw,2),Lo(:,iw,:)) endif ! if(l_BS_photolum) then if (K_INV_PL%err(iw)/=0) then - K_INV_PL%err(iw)=PL_via_perturbative_inversion(BS_H_dim,Lo_dim,Lo_n_loop,BSS_dipoles_PL,PL_prefactor,& + K_INV_PL%err(iw)=PL_via_perturbative_inversion(BS_H_dim,Lo_dim,BSS_dipoles_PL,PL_prefactor,& & PL(iw,2),Lo(:,iw,:)) endif endif ! else ! - do i_L=1,Lo_n_loop + do i_L=1,Lo_dim ! if (i_L==1) Gr="r" if (i_L==2) Gr="a" @@ -134,15 +134,15 @@ subroutine PL_compose(i_L_) do i_c=1,3 if (K_slk%kind=="SLK") then #if defined _SCALAPACK - if(i_L_==1) call PARALLEL_M_by_V('c',BS_H_dim,K_inv_slk,BSS_dipoles_PL(:,i_c),V) - if(i_L_==2) call PARALLEL_M_by_V('n',BS_H_dim,K_inv_slk,conjg(BSS_dipoles_PL(:,i_c)),V) + if(i_L_==1) call PARALLEL_M_by_V('c',BS_H_dim,K_inv_slk,BSS_dipoles_PL(i_c,:),V) + if(i_L_==2) call PARALLEL_M_by_V('n',BS_H_dim,K_inv_slk,conjg(BSS_dipoles_PL(i_c,:)),V) #endif else - if(i_L_==1) call M_by_V('c',BS_H_dim,Mm1,BSS_dipoles_PL(:,i_c),V) - if(i_L_==2) call M_by_V('n',BS_H_dim,Mm1,conjg(BSS_dipoles_PL(:,i_c)),V) + if(i_L_==1) call M_by_V('c',BS_H_dim,Mm1,BSS_dipoles_PL(i_c,:),V) + if(i_L_==2) call M_by_V('n',BS_H_dim,Mm1,conjg(BSS_dipoles_PL(i_c,:)),V) endif do i_cv=1,BS_H_dim - Vp(i_cv)=V(i_cv)*Lo(i_cv,iw,i_L_+Lo_n_loop) + Vp(i_cv)=V(i_cv)*Lo(i_cv,iw,i_L_) enddo PL(iw,2)=PL(iw,2)+PL_prefactor*Vstar_dot_V(BS_H_dim,V,Vp) enddo diff --git a/src/bse/K_output_file.F b/src/bse/K_output_file.F index 327b768359..d61c846fbf 100644 --- a/src/bse/K_output_file.F +++ b/src/bse/K_output_file.F @@ -88,7 +88,7 @@ subroutine K_output_file(iq,mode) l_magn_out =l_BS_magnons .and.((.not.l_Haydock).or.index(mode,"magn")>0).and.(.not.l_Inversion) l_kerr_out =l_BS_kerr .and.((.not.l_Haydock).or.index(mode,"kerr")>0) l_dich_out =l_BS_dichroism.and.((.not.l_Haydock).or.index(mode,"dich")>0).and.(.not.l_Inversion) - l_phot_out =l_BS_photolum .and.l_Inversion + l_phot_out =l_BS_photolum .and.(l_Inversion.or.l_IP) ! l_print_col4=l_Haydock.or.(l_Inversion.and..not.K_diago_in_BS_mat) ! @@ -416,8 +416,8 @@ subroutine K_output_file(iq,mode) ! ! PL: 2 (int) 3 (non int) ! - if ( l_IP) n_output_data=2 ; output_data(1:2)=(/real(PL(iw,1))*HA2EV,PL(iw,3)/) - if (.not.l_IP) n_output_data=3 ; output_data(1:3)=(/real(PL(iw,1))*HA2EV,PL(iw,2),PL(iw,3)/) + if ( l_IP) then ; n_output_data=2 ; output_data(1:2)=(/PL(iw,1)*HA2EV,PL(iw,3)/) ; endif + if (.not.l_IP) then ; n_output_data=3 ; output_data(1:3)=(/PL(iw,1)*HA2EV,PL(iw,2),PL(iw,3)/) ; endif call msg("o pl_",'',output_data(:n_output_data),INDENT=-2,USE_TABS=.TRUE.) ! enddo diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index ddb9fbcbc9..78ff1f1e53 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -45,7 +45,7 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! type(PP_indexes) ::px integer ::i_l,i_c,i_K,i_lr,i_ll - complex(SP) ::P_x_fZ(2,BS_H_dim,3),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& & R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) ! ! Parallel indexes @@ -76,12 +76,12 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! do i_c=1,3 do i_K=1,BS_K_dim(1) - P_x_fZ(1,i_K,i_c)=conjg(BSS_dipoles_PL(i_K,i_c))*sqrt(BSS_eh_f(i_K)) - P_x_fZ(2,i_K,i_c)= BSS_dipoles_PL(i_K,i_c) *sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) enddo do i_K=BS_K_dim(1)+1,BS_H_dim - P_x_fZ(1,i_K,i_c)=cI*conjg(BSS_dipoles_PL(i_K,i_c))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) - P_x_fZ(2,i_K,i_c)=cI* BSS_dipoles_PL(i_K,i_c) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) enddo enddo ! @@ -108,11 +108,11 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i ! - Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(1,:,i_c),BS_V_right(:,i_lr)) + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) ! ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) ! - Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(2,:,i_c)) + Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) ! enddo ! @@ -130,7 +130,7 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ !==================== ! do i_c=1,3 - P_x_fZ(1,:,i_c)=BSS_dipoles_PL(:,i_c)*sqrt(BSS_eh_f(:)) + P_x_fZ(:,i_c,1)=BSS_dipoles_PL(i_c,:)*sqrt(BSS_eh_f(:)) enddo ! do i_l=1,BS_K_dim(1) @@ -151,7 +151,7 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i ! - Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(:,i_l),P_x_fZ(1,:,i_c)) + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) ! enddo ! diff --git a/src/bse/PL_via_perturbative_inversion.F b/src/bse/PL_via_perturbative_inversion.F index 63913cf94d..643514a7f6 100644 --- a/src/bse/PL_via_perturbative_inversion.F +++ b/src/bse/PL_via_perturbative_inversion.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -integer function PL_via_perturbative_inversion(n,Lo_dim,n_loop,D,C,f,Lo) +integer function PL_via_perturbative_inversion(n,Lo_dim,D,C,f,Lo) ! use pars, ONLY:SP,rZERO use wrapper_omp, ONLY:Vstar_dot_V_omp,M_by_V_omp @@ -29,16 +29,16 @@ integer function PL_via_perturbative_inversion(n,Lo_dim,n_loop,D,C,f,Lo) ! implicit none ! - integer, intent(in) ::n,Lo_dim,n_loop + integer, intent(in) ::n,Lo_dim real(SP), intent(in) ::C - complex(SP),intent(in) ::D(n,3),Lo(n,Lo_dim) + complex(SP),intent(in) ::D(3,N),Lo(n,Lo_dim) real(SP) ,intent(out) ::f ! ! Work Space ! integer ::BSS_inv_iter_max=51 integer ::it,ic - complex(SP) ::R_x_D_nm1(n,n_loop,3),R_x_D_n(n,n_loop,3),WK(n),CUMULATIVE(n,n_loop,3) + complex(SP) ::R_x_D_nm1(n,Lo_dim,3),R_x_D_n(n,Lo_dim,3),WK(n),CUMULATIVE(n,Lo_dim,3) real(SP) ::f_previous,fo,delta_f ! PL_via_perturbative_inversion=0 @@ -48,12 +48,12 @@ integer function PL_via_perturbative_inversion(n,Lo_dim,n_loop,D,C,f,Lo) fo=rZERO ! do ic=1,3 - R_x_D_nm1(:,1,ic)=conjg(Lo(:,1))*D(:,ic) - WK=Lo(:,1+n_loop)*R_x_D_nm1(:,1,ic) + R_x_D_nm1(:,1,ic)=conjg(Lo(:,1))*D(ic,:) + WK=Lo(:,1)*R_x_D_nm1(:,1,ic) fo=fo+C*Vstar_dot_V_omp(n,R_x_D_nm1(:,1,ic),WK) - if(n_loop==2) then - R_x_D_nm1(:,2,ic)=Lo(:,2)*conjg(D(:,ic)) - WK=Lo(:,2+n_loop)*R_x_D_nm1(:,2,ic) + if(Lo_dim==2) then + R_x_D_nm1(:,2,ic)=Lo(:,2)*conjg(D(ic,:)) + WK=Lo(:,2)*R_x_D_nm1(:,2,ic) fo=fo+C*Vstar_dot_V_omp(n,R_x_D_nm1(:,2,ic),WK) endif enddo @@ -78,10 +78,10 @@ integer function PL_via_perturbative_inversion(n,Lo_dim,n_loop,D,C,f,Lo) call M_by_V_omp('n',n,BS_mat,R_x_D_nm1(:,1,ic),R_x_D_n(:,1,ic)) endif CUMULATIVE(:,1,ic)=CUMULATIVE(:,1,ic)+conjg(Lo(:,1))*R_x_D_n(:,1,ic) - WK=Lo(:,1+n_loop)*CUMULATIVE(:,1,ic) + WK=Lo(:,1)*CUMULATIVE(:,1,ic) f=f+C*Vstar_dot_V_omp(n,CUMULATIVE(:,1,ic),WK) ! - if (n_loop==2) then + if (Lo_dim==2) then if (K_slk%kind=="SLK") then #if defined _SCALAPACK call PARALLEL_M_by_V('n',n,K_slk,R_x_D_nm1(:,2,ic),R_x_D_n(:,2,ic)) @@ -90,7 +90,7 @@ integer function PL_via_perturbative_inversion(n,Lo_dim,n_loop,D,C,f,Lo) call M_by_V_omp('n',n,BS_mat,R_x_D_nm1(:,2,ic),R_x_D_n(:,2,ic)) endif CUMULATIVE(:,2,ic)=CUMULATIVE(:,2,ic)+Lo(:,2)*R_x_D_n(:,2,ic) - WK=Lo(:,2+n_loop)*CUMULATIVE(:,2,ic) + WK=Lo(:,2)*CUMULATIVE(:,2,ic) f=f+C*Vstar_dot_V_omp(n,CUMULATIVE(:,2,ic),WK) ! endif From 2d72da18e90f4cc4f37028fdafeed577af46ba8e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 8 Apr 2022 18:35:25 +0200 Subject: [PATCH 0222/1367] Version 5.1.1, Revision 21249, Hash 7c7f0889f MODIFIED * include/driver/version.h bse/K_diago_hermitian_residuals.F bse/K_diago_non_hermitian_residuals.F bse/K_diago_response_functions.F Changes: - Added few comments Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_diago_hermitian_residuals.F | 1 + src/bse/K_diago_non_hermitian_residuals.F | 3 ++- src/bse/K_diago_response_functions.F | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d11efb6f6f..7641f3ba16 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21248 -#define YAMBO_HASH "8a9b1a2cc" +#define YAMBO_REVISION 21250 +#define YAMBO_HASH "7c7f0889f" diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F index 26573ca51f..6269c6b2cd 100644 --- a/src/bse/K_diago_hermitian_residuals.F +++ b/src/bse/K_diago_hermitian_residuals.F @@ -61,6 +61,7 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) ! tmp_res = BSS_dipoles_opt(1,i_range(1):i_range(2))*sqrt(cmplx(BSS_eh_f(i_range(1):i_range(2)),kind=SP)) ! + ! DS. Note. Velocity gauge fixing does not work if neq occupations are loaded. Not sure why. if (trim(global_gauge)=="velocity") tmp_res =tmp_res/BSS_eh_E(i_range(1):i_range(2)) if (allocated(BSS_eh_Z)) tmp_res =tmp_res*sqrt(BSS_eh_Z(i_range(1):i_range(2))) ! diff --git a/src/bse/K_diago_non_hermitian_residuals.F b/src/bse/K_diago_non_hermitian_residuals.F index edc632b6e2..b5f22e6c99 100644 --- a/src/bse/K_diago_non_hermitian_residuals.F +++ b/src/bse/K_diago_non_hermitian_residuals.F @@ -69,8 +69,9 @@ subroutine K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,B ! tmp_res = conjg(BSS_dipoles_opt(1,:))*sqrt(cmplx(BSS_eh_f,kind=SP)) ! - if (allocated(BSS_eh_Z) ) tmp_res=tmp_res*sqrt(BSS_eh_Z) + ! DS. Note. Velocity gauge fixing does not work if neq occupations are loaded. Not sure why. if (trim(global_gauge)=="velocity") tmp_res=tmp_res/BSS_eh_E + if (allocated(BSS_eh_Z) ) tmp_res=tmp_res*sqrt(BSS_eh_Z) ! do i1=1,BSS_n_eig if (.not.px%element_1D(i1)) cycle diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index b7f9a5267e..cfe125750f 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -136,6 +136,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS ! if(trim(global_gauge)=='length') para_term_w0=para_term_w0+res_abs*EXC_E(i_pert_SOC)/bare_qpg(1,1)**2 if(trim(global_gauge)=='velocity') para_term_w0=para_term_w0+res_abs/EXC_E(i_pert_SOC) + ! endif ! if(l_BS_kerr) then @@ -235,6 +236,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS ! if(l_BS_abs) then if (trim(global_gauge)=='velocity') then + ! DS. Note. The sum rule imposition does not work if neq occupations are loaded. Not sure why. if ( skip_cond_sum_rule) diam_term_used=diam_term_exact if (.not.skip_cond_sum_rule) diam_term_used=para_term_w0 endif From fedd9aea590b29ab83e0cb180b7153d6a926c7b8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 11 Apr 2022 01:16:46 +0200 Subject: [PATCH 0223/1367] Version 5.1.1, Revision 21369, Hash c49e7acc7 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F exc-ph/Satellite_Simple.F modules/mod_EXCPH.F Changes: - Addded DS to authors names Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 6 ++---- src/exc-ph/EXCPH_eval_sat.F | 3 +-- src/exc-ph/EXCPH_gkkp_driver.F | 14 +++++++++----- src/exc-ph/EXCPH_gkkp_eval.F | 12 ++---------- src/exc-ph/EXCPH_lifetime.F | 3 +-- src/exc-ph/Satellite_Simple.F | 3 +-- src/modules/mod_EXCPH.F | 12 +++++++----- 8 files changed, 25 insertions(+), 32 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 08f5acf9ea..ed069efafb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,5 +25,5 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21368 -#define YAMBO_HASH "5915bfd6f" +#define YAMBO_REVISION 21369 +#define YAMBO_HASH "c49e7acc7" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 041125dfd0..3278263bf6 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -105,8 +105,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') ! - iq_db=iq_bz - if(nsym==1) iq_db=DB_Q_map(iq_bz) + iq_db=DB_Q_map(iq_bz) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! @@ -287,8 +286,7 @@ subroutine Eval_Renorm_Factor() ! do il=elph_branches(1),elph_branches(2) ! - iq_db=iq_bz - if(nsym==1) iq_db=DB_Q_map(iq_bz) + iq_db=DB_Q_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_Ei_alpha ->i_H [Calculate Gkkp] Xi=cZERO ! - !do i_star=1,q%nstar(iq) ! - !iq_s=q%star(iq,i_star) t_rev= (iq_s>nsym/(i_time_rev+1)) ! - !iq_bz = q%k_table(iq, iq_s) - ! ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > ! ! with k and q in the BZ ! - iq_db=iq_bz - if(nsym==1) iq_db=DB_Q_map(iq_bz) + iq_db=DB_Q_map(iq_bz) IO_ACT=manage_action(RD,iq_db,1,q%nbz) if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_db,1,q%nbz) ! - call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. if(io_err/=0) call error(" Error reading gkkp_expanded") @@ -162,8 +156,6 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) Xi=cZERO ! enddo !Loop i_beta - ! - !enddo !Loop i_star ! ! Compute the squared couplings ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 74bf1b81c0..a50acd94ab 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -117,8 +117,7 @@ subroutine EXCPH_lifetime(E,k,q,X) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') if(io_err/=0) call error('excph_gkkp databases not found!') ! - iq_db=iq_bz - if(nsym==1) iq_db=DB_Q_map(iq_bz) + iq_db=DB_Q_map(iq_bz) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index c897e8a535..b4afacc2d9 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -63,8 +63,7 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Bose function for the phonons ! - iq_db=iq - if(nsym==1) iq_db=DB_Q_map(iq) + iq_db=DB_Q_map(iq) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) ! if(ph_E Date: Mon, 11 Apr 2022 01:36:17 +0200 Subject: [PATCH 0224/1367] Version 5.1.1, Revision 21370, Hash fedd9aea5 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: - [yambo_ph] Fixed index for phonon frequency in exc-ph lifetimes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ed069efafb..578cae91f9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,5 +25,5 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21369 -#define YAMBO_HASH "c49e7acc7" +#define YAMBO_REVISION 21370 +#define YAMBO_HASH "fedd9aea5" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index a50acd94ab..16a1ce87a4 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -172,8 +172,7 @@ function Simple_pole() E_alpha=real(BS_E_in(i_alpha),SP) E_beta =BS_all_E(i_beta,iq) ! - iq_db=iq - if(nsym==1) iq_db=DB_Q_map(iq) + iq_db=DB_Q_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_E Date: Mon, 11 Apr 2022 18:29:35 +0200 Subject: [PATCH 0225/1367] Version 5.1.1, Revision 21250, Hash 2d72da18e MODIFIED * include/driver/version.h dipoles/DIPOLE_IO.F Changes: - [yambo] Missing dipoles database moved from warning to simple message Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_IO.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7641f3ba16..499c79e619 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21250 -#define YAMBO_HASH "7c7f0889f" +#define YAMBO_REVISION 21251 +#define YAMBO_HASH "2d72da18e" diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 4fae968ef3..b89524ee50 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -127,7 +127,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) if((i_count==max_count).and.io_err/=0) then if(writing) call error(" [DIP] Header not found while writing dipoles ") if(reading) call error(" [DIP] Header not found while reading dipoles ") - if( check) call warning("[DIP] Database not correct or missing. To be computed") + if( check) call msg("s","[DIP] Database not correct or missing. To be computed ") return endif enddo From 8bd4c773f8f03a447b7cf9011a168c0805170165 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Apr 2022 15:58:13 +0200 Subject: [PATCH 0226/1367] Version 5.1.1, Revision 21251, Hash 2c82185bd MODIFIED * include/driver/version.h bse/K_output_file.F modules/mod_PHOTOLUM.F Bugs: - [yambo] Two small fixes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_output_file.F | 2 +- src/modules/mod_PHOTOLUM.F | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 499c79e619..eb837d9f7a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21251 -#define YAMBO_HASH "2d72da18e" +#define YAMBO_REVISION 21252 +#define YAMBO_HASH "2c82185bd" diff --git a/src/bse/K_output_file.F b/src/bse/K_output_file.F index d61c846fbf..e1b937972a 100644 --- a/src/bse/K_output_file.F +++ b/src/bse/K_output_file.F @@ -88,7 +88,7 @@ subroutine K_output_file(iq,mode) l_magn_out =l_BS_magnons .and.((.not.l_Haydock).or.index(mode,"magn")>0).and.(.not.l_Inversion) l_kerr_out =l_BS_kerr .and.((.not.l_Haydock).or.index(mode,"kerr")>0) l_dich_out =l_BS_dichroism.and.((.not.l_Haydock).or.index(mode,"dich")>0).and.(.not.l_Inversion) - l_phot_out =l_BS_photolum .and.(l_Inversion.or.l_IP) + l_phot_out =l_BS_photolum .and.(l_Diago.or.l_Inversion.or.l_IP) ! l_print_col4=l_Haydock.or.(l_Inversion.and..not.K_diago_in_BS_mat) ! diff --git a/src/modules/mod_PHOTOLUM.F b/src/modules/mod_PHOTOLUM.F index edfa329e85..1547fde51c 100644 --- a/src/modules/mod_PHOTOLUM.F +++ b/src/modules/mod_PHOTOLUM.F @@ -73,7 +73,7 @@ subroutine BSS_PL_alloc( ) BSS_dipoles_PL = cZERO f_PL_dim=BS_H_dim if(BS_H_dim==BS_K_dim(1)) f_PL_dim=2*BS_K_dim(1) - YAMBO_ALLOC(BSS_PL_f,(BS_H_dim)) + YAMBO_ALLOC(BSS_PL_f,(f_PL_dim)) BSS_PL_f = rZERO end subroutine ! From 9d1fe631ef9e921e4a3260753c77c266fceb1eff Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 13 Apr 2022 18:28:44 +0200 Subject: [PATCH 0227/1367] Added some output variables to EXCPH_gkkp --- src/exc-ph/EXCPH_gkkp_driver.F | 30 +++++++++++++++++++++++++++++- src/io/io_EXCPH_gkkp.F | 23 +++++++++++++++++++---- src/modules/mod_EXCPH.F | 1 + 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 76e4623a3f..635825f11d 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -51,7 +51,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map, & +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & & BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free,DB_Q_map, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free use LIVE_t, ONLY:live_timing @@ -156,6 +156,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call Sat_alloc() call Renorm_alloc() ! + ! Get q-point coordinates in the q-BZ + YAMBO_ALLOC(EXCPH_q,(q%nbz,3)) + call get_excph_q_momenta() + ! ! Main q-loop ! call live_timing('Excitonic Gkkp',q%nibz*ph_modes) @@ -220,6 +224,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_gkkp_report() YAMBO_FREE(max_Sat_weight) YAMBO_FREE(max_Sat_pos) + YAMBO_FREE(EXCPH_q) ! call Sat_free() call Renorm_free() @@ -273,6 +278,29 @@ subroutine BSE_free !AMBO_FREE(k_plus_q_table) end subroutine BSE_free ! + subroutine get_excph_q_momenta() + ! + integer iq,i_star,iq_s,iq_bz + ! + YAMBO_ALLOC(q%ptbz,(q%nbz,3)) + ! + call k_ibz2bz(q,"i",.false.) + ! + do iq=1,q%nibz + ! + do i_star=1,q%nstar(iq) + ! + iq_s=q%star(iq,i_star) + iq_bz = q%k_table(iq, iq_s) + ! + EXCPH_q(iq_bz,:) = q%ptbz(iq_bz,:) + ! + enddo + enddo + ! + YAMBO_FREE(q%ptbz) + end subroutine get_excph_q_momenta + ! subroutine build_k_plus_q_table() ! use parallel_int, ONLY:PARALLEL_global_indexes diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index 01fe567154..c0068afaef 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -28,7 +28,7 @@ integer function io_EXCPH_gkkp(ID,what) use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& & def_variable_bulk,io_variable_bulk,io_fragment use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& -& BS_E_in,BS_Sat_E,BS_Sat_WEIGHT,BS_EXCPH_E,ph_EXCPH_E,& +& BS_E_in,BS_Sat_E,BS_Sat_WEIGHT,BS_EXCPH_E,ph_EXCPH_E,EXCPH_q,& & BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,L_kind_in,L_kind_out,Sat_alloc, & & EXCPH_gkkp_alloc use IO_int, ONLY:io_variable_elemental,def_variable_elemental @@ -74,13 +74,19 @@ integer function io_EXCPH_gkkp(ID,what) ! io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) ! - call io_elemental(ID,VAR="PARS",VAR_SZ=4,MENU=0) + call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + ! + call io_elemental(ID,& +& VAR=" Number of qpoints (BZ) :",I0=nqbz,CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,& & VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"==","=="/)) ! call io_elemental(ID,& -& VAR=" Exciton sum (scattered):",I1=EXCPH_sum,CHECK=.true.,OP=(/"==","=="/)) +& VAR=" Exciton sum (scattered) :",I1=EXCPH_sum,CHECK=.true.,OP=(/"==","=="/)) + ! + call io_elemental(ID,& +& VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) ! @@ -93,11 +99,14 @@ integer function io_EXCPH_gkkp(ID,what) call io_bulk(ID,VAR="EXCITON_SUM",VAR_SZ=(/2/)) call io_bulk(ID,I1=EXCPH_sum) ! + call io_bulk(ID,VAR="PHONON_MODES",VAR_SZ=(/1/)) + call io_bulk(ID,I0=ph_modes) + ! call def_variable_elemental(ID,"L_kind_in",1,0,0) call io_variable_elemental(ID,VAR="[K] L_kind in",CH0=L_kind_in,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(ID,"L_kind_out",1,0,0) - call io_variable_elemental(ID,VAR="[K] L_kind out",CH0=L_kind_in,CHECK=.true.,OP=(/"=="/)) + call io_variable_elemental(ID,VAR="[K] L_kind out",CH0=L_kind_out,CHECK=.true.,OP=(/"=="/)) ! endif ! @@ -135,6 +144,12 @@ integer function io_EXCPH_gkkp(ID,what) endif ! if(l_excph_gkkp) then + ! + if (.not. read_is_on(ID)) then + VAR_name="EXCPH_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/3/),SP) + call io_variable_bulk(ID_frag,1,R1=EXCPH_q(iq,:)) + endif ! VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index ca1169d425..f7dc2e66da 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -39,6 +39,7 @@ module EXCPH real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: EXCPH_states(2) integer :: EXCPH_sum(2) + real(SP), allocatable :: EXCPH_q(:,:) character(schlen) :: EXCPH_kind ! ! L_in and L_out paths From 75badfcf410eaf8855927d4ef6a3512220761e2b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 14 Apr 2022 13:08:41 +0200 Subject: [PATCH 0228/1367] Automatic commit: configure regenerated after merge --- configure | 22 ++++++++++++++++++++++ include/driver/version.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 66d6735edd..059eda6cba 100755 --- a/configure +++ b/configure @@ -651,6 +651,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -827,6 +828,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -887,6 +890,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1619,6 +1623,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3068,6 +3073,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test "${enable_gamma_only+set}" = set; then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -14743,6 +14761,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14924,6 +14945,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index d8def8cece..4a59aba2bc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21256 -#define YAMBO_HASH "73463bb" +#define YAMBO_REVISION 21392 +#define YAMBO_HASH "a5181a5df" From 383ae2702a59057c072b52447bca52f24c1ba363 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 14 Apr 2022 18:09:47 +0200 Subject: [PATCH 0229/1367] Added k+-q debug function in excph driver --- src/exc-ph/EXCPH_gkkp_driver.F | 38 +++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 635825f11d..65544ac7b0 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -214,6 +214,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! enddo ! + ! [FP] DEBUG + !call compare_qindxC_table() + ! [FP] END DEBUG + ! call live_timing( ) ! call BSE_free() @@ -312,7 +316,9 @@ subroutine build_k_plus_q_table() ! if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') ! - call PARALLEL_global_indexes(E,k,q,"BZ_Indexes") + ! [FP] I comment the line below otherwise the code crashes. + ! [FP] Serial support only for this function. Currently only used for debugging anyway. + !call PARALLEL_global_indexes(E,k,q,"BZ_Indexes") call PARALLEL_SETUP_K_scheme("BZINDX") ! ! here qindx_B is allocated @@ -364,6 +370,36 @@ subroutine build_inverse_eh_table() ! end subroutine build_inverse_eh_table ! + subroutine compare_qindxC_table() + ! + ! [FP] DEBUG FUNCTION (to be removed?) + ! + use R_lattice, ONLY:qindx_C + ! + integer :: ik_plus_iq_C, ik_plus_iq_tbl, ik_bz + integer :: iq,i_star,iq_s,iq_bz + ! + call build_k_plus_q_table() + do iq=1,q%nibz + ! + do i_star=1,q%nstar(iq) + ! + iq_s=q%star(iq,i_star) + iq_bz = q%k_table(iq, iq_s) + ! + do ik_bz=1, k%nbz + ! + ik_plus_iq_C = qindx_C(ik_bz,iq_bz,1) + ik_plus_iq_tbl = k_plus_q_table(ik_bz,iq_bz) + write (*,*) ik_plus_iq_C-ik_plus_iq_tbl + ! + enddo + ! + enddo + enddo + ! + end subroutine compare_qindxC_table + ! subroutine EXCPH_gkkp_report() use stderr, ONLY:intc use EXCPH, ONLY:EXCPH_Renorm_PH_abs,EXCPH_Renorm From 64d44a2f8c024fc0d21ec6870ba6fe332bceea48 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 17 Apr 2022 23:25:33 +0200 Subject: [PATCH 0230/1367] Version 5.1.1, Revision 21391, Hash f919e7ece MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F Bugs: - [yambo_ph] Restored and fixed k_plus_q_table Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 41 ++++++++++++++++------------------ src/exc-ph/EXCPH_gkkp_eval.F | 14 +++++++----- src/exc-ph/EXCPH_lifetime.F | 9 +++++++- 4 files changed, 38 insertions(+), 30 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index acf570917c..7b04d95b6c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21258 -#define YAMBO_HASH "96dceba85" +#define YAMBO_REVISION 21391 +#define YAMBO_HASH "f919e7ece" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 65544ac7b0..2c05f533d0 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -41,7 +41,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! use pars, ONLY:SP,cZERO,rZERO,schlen use electrons, ONLY:levels,n_sp_pol - use R_lattice, ONLY:bz_samp,qindx_B_load + use R_lattice, ONLY:bz_samp,qindx_B !_load use D_lattice, ONLY:nsym use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig @@ -125,7 +125,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! K plus q table ! - !call build_k_plus_q_table() + call build_k_plus_q_table() ! ! BSS_eh_table_m1 ! @@ -215,7 +215,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) enddo ! ! [FP] DEBUG - !call compare_qindxC_table() + ! call compare_qindxC_table() ! [FP] END DEBUG ! call live_timing( ) @@ -248,7 +248,7 @@ subroutine BSE_alloc() YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) YAMBO_ALLOC(BS_E,(BSS_n_eig)) - !AMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) + YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) ! YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_mat_in,(BS_H_dim,BSS_n_eig)) @@ -258,7 +258,7 @@ subroutine BSE_alloc() BS_mat=cZERO BS_E=cZERO ! - !k_plus_q_table = 0 + k_plus_q_table = 0 BSS_eh_table = 0 BSS_eh_table_m1 = 0 ! @@ -279,7 +279,7 @@ subroutine BSE_free YAMBO_FREE(BSS_eh_table_in) YAMBO_FREE(BSS_eh_table_m1_in) YAMBO_FREE(BS_E) - !AMBO_FREE(k_plus_q_table) + YAMBO_FREE(k_plus_q_table) end subroutine BSE_free ! subroutine get_excph_q_momenta() @@ -310,43 +310,36 @@ subroutine build_k_plus_q_table() use parallel_int, ONLY:PARALLEL_global_indexes use R_lattice, ONLY:bse_scattering ! - integer, external ::qindx_B_init,qindx_B_close,io_QINDX - integer :: qindx_ID,qindx_ID_frag,qindx_tmp(2),ID,io_err + !integer, external ::qindx_B_init,qindx_B_close,io_QINDX + !integer :: qindx_ID,qindx_ID_frag,qindx_tmp(2),ID,io_err + integer, external ::io_QINDX + integer :: ID,io_err integer :: ik_bz,iq_bz,ip_bz ! if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') ! - ! [FP] I comment the line below otherwise the code crashes. - ! [FP] Serial support only for this function. Currently only used for debugging anyway. - !call PARALLEL_global_indexes(E,k,q,"BZ_Indexes") - call PARALLEL_SETUP_K_scheme("BZINDX") + call PARALLEL_SETUP_K_scheme("Kdef") ! ! here qindx_B is allocated - ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,5/),ID=ID) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) io_err=io_QINDX(k,q,ID) if (io_err/=0) then call msg('s',"Missing k/q scattering database") call error("Please run a setup with the BSEscatt flag activated") endif ! - io_err=qindx_B_init(qindx_ID,qindx_ID_frag) - if(io_err/=0) call error("Error reading qindx_B") - ! call live_timing('K plus q table',k%nbz) do ik_bz=1,k%nbz call live_timing(steps=1) IQ_bz_loop: do iq_bz=1,q%nbz do ip_bz=1,k%nbz - qindx_tmp=qindx_B_load(ip_bz,ik_bz,qindx_ID_frag) - if (qindx_tmp(1)==iq_bz) then + if (qindx_B(ik_bz,ip_bz,1)==iq_bz) then k_plus_q_table(ik_bz,iq_bz)=ip_bz cycle IQ_bz_loop endif enddo enddo IQ_bz_loop enddo - qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) call live_timing( ) ! end subroutine build_k_plus_q_table @@ -379,7 +372,9 @@ subroutine compare_qindxC_table() integer :: ik_plus_iq_C, ik_plus_iq_tbl, ik_bz integer :: iq,i_star,iq_s,iq_bz ! - call build_k_plus_q_table() + !call build_k_plus_q_table() + call k_ibz2bz(q,"i",.false.) + call k_ibz2bz(k,"i",.false.) do iq=1,q%nibz ! do i_star=1,q%nstar(iq) @@ -391,7 +386,9 @@ subroutine compare_qindxC_table() ! ik_plus_iq_C = qindx_C(ik_bz,iq_bz,1) ik_plus_iq_tbl = k_plus_q_table(ik_bz,iq_bz) - write (*,*) ik_plus_iq_C-ik_plus_iq_tbl + write(*,*) k%ptbz(ik_bz,:),q%ptbz(iq_bz,:) + write(*,*) k%ptbz(ik_plus_iq_C,:),ik_plus_iq_C + write(*,*) k%ptbz(ik_plus_iq_tbl,:),ik_plus_iq_tbl ! enddo ! diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index c818e9c65e..4d0af15b47 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -31,7 +31,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) use drivers, ONLY:l_EXCPH_Sigma use electrons, ONLY:levels,n_sp_pol use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev - use R_lattice, ONLY:nqibz,bz_samp,qindx_C + use R_lattice, ONLY:nqibz,bz_samp!,qindx_C use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD @@ -40,7 +40,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1!,k_plus_q_table +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table #include ! type(levels) ::E @@ -93,8 +93,11 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) ! - ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz - ! = R_iq_s^-1 ik_bz + ! DS note: I think here the choice is not unique + ! given a ik_bz there maybe multiple ik_s which send ik_ibz --> ik_bz + ! + ! ip_bz = R_iq_s^-1 ik_bz + ! = R_iq_s^-1 R_ik_s ik_ibz ! ip_bz = elemental_scattering(iq_s,ik_bz) ! @@ -116,7 +119,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz ! - ik_plus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz + !ik_plus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz + ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz ! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 16a1ce87a4..22d1091abe 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -76,6 +76,7 @@ subroutine EXCPH_lifetime(E,k,q,X) do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + !write(*,*) iq,BS_all_E(:,iq) enddo ! ! Load the Exciton-phonon elements and phonon energies @@ -132,6 +133,10 @@ subroutine EXCPH_lifetime(E,k,q,X) EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*DbGrid_pole() else EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*Simple_pole() + ! DS Debug < + ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+Simple_pole() + ! write(*,*) i_alpha,EXC_LifeTime(i_alpha) + ! Ds Debug > endif ! enddo @@ -143,7 +148,7 @@ subroutine EXCPH_lifetime(E,k,q,X) enddo enddo ! - EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz) + EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! @@ -183,6 +188,8 @@ function Simple_pole() Simple_pole=(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,L_damping) & & +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! + !write(*,*) E_alpha,E_beta,ph_E,Simple_pole + ! end function Simple_Pole ! function DbGrid_pole() From 09d183a9a0bdadc19ce7baa3a7f13491fcfcd94e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 18 Apr 2022 14:23:55 +0200 Subject: [PATCH 0231/1367] Version 5.1.1, Revision 21392, Hash 64d44a2f8 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F interface/INIT_activate.F interface/INIT_load.F ypp/el-ph/ELPH_databases.F Bugs: -Fixed bug with qindx_S on my pc Additions: -New flag NoMatrxEl for testing purpose Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 19 +++++++++++++------ src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + ypp/el-ph/ELPH_databases.F | 14 ++++++++------ 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7b04d95b6c..2ec4195692 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21391 -#define YAMBO_HASH "f919e7ece" +#define YAMBO_REVISION 21392 +#define YAMBO_HASH "64d44a2f8" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 22d1091abe..2c884c0d1f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -49,11 +49,15 @@ subroutine EXCPH_lifetime(E,k,q,X) ! ! Work space ! - integer :: ID_exc_gkkp,ID_gkkp,io_err + integer :: ID_exc_gkkp,ID_gkkp,io_err integer, external :: io_EXCPH_gkkp,io_ELPH - integer :: iq,iq_s,iq_bz,i_alpha,i_beta,il,i_star,iq_db - integer :: elph_branches_save(2) - integer :: min_pos(1) + integer :: iq,iq_s,iq_bz,i_alpha,i_beta,il,i_star,iq_db + integer :: elph_branches_save(2) + integer :: min_pos(1) + logical :: l_no_matrix_elements + real(SP) :: ExcPhM + ! + call parser('NoMatrxEl',l_no_matrix_elements) ! call section('*','EXCPH-LifTime') ! @@ -128,11 +132,14 @@ subroutine EXCPH_lifetime(E,k,q,X) do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! do il=elph_branches(1),elph_branches(2) + ! + ExcPhM=EXCPH_Gkkp_sq(il,i_beta,i_alpha) + if(l_no_matrix_elements) ExcPhM=1._SP ! if(use_PH_DbGd) then - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*DbGrid_pole() + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*DbGrid_pole() else - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+EXCPH_Gkkp_sq(il,i_beta,i_alpha)*Simple_pole() + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() ! DS Debug < ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+Simple_pole() ! write(*,*) i_alpha,EXC_LifeTime(i_alpha) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 618195c98b..1fa48f0e86 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph LDamping') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph NoMatrxEl LDamping') if (l_EXCPH_optics) & & call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DbGdWEIGHTs EnRngeXd DmRngeXd ETStpsXd') ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index fe1bada1da..05c05b3bf1 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -670,6 +670,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') + call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) ! diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 3a0a2888f6..a5e0a23111 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -32,7 +32,7 @@ subroutine ELPH_databases(k,E,q) & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,l_GKKP_hosts_bare_dV use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab - use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering + use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering,qindx_S use parser_m, ONLY:parser use vec_operate, ONLY:v_is_zero use zeros, ONLY:k_iku_zero @@ -93,11 +93,13 @@ subroutine ELPH_databases(k,E,q) ! else ! otherwise qindx_S is allocated - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) - if (io_err(1)/=0) then - call msg('s',"Missing k/q scattering database") - call error("Please (re)run the setup") + if(.not.allocated(qindx_S)) then + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) + io_err(1)=io_QINDX(k,q,ID) + if (io_err(1)/=0) then + call msg('s',"Missing k/q scattering database") + call error("Please (re)run the setup") + endif endif endif ! From 7fb6907d7f0dd041ccf68f11527aa20e4e41aa51 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 18 Apr 2022 14:54:05 +0200 Subject: [PATCH 0232/1367] Version 5.1.1, Revision 21393, Hash 09d183a9a MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: -Fixed bug in q-index with symmetries for lifetimes Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2ec4195692..61624bdb6e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21392 -#define YAMBO_HASH "64d44a2f8" +#define YAMBO_REVISION 21393 +#define YAMBO_HASH "09d183a9a" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 2c884c0d1f..eac8eb06e8 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -182,7 +182,7 @@ function Simple_pole() Simple_pole=rZERO ! E_alpha=real(BS_E_in(i_alpha),SP) - E_beta =BS_all_E(i_beta,iq) + E_beta =BS_all_E(i_beta,iq_bz) ! iq_db=DB_Q_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) From 7a2c10c7663a308c928019d05e4e6965c2af4f31 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 18 Apr 2022 15:19:57 +0200 Subject: [PATCH 0233/1367] Version 5.1.1, Revision 21394, Hash 7fb6907d7 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: -Fixed previous commit Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 61624bdb6e..968cb79586 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21393 -#define YAMBO_HASH "09d183a9a" +#define YAMBO_REVISION 21394 +#define YAMBO_HASH "7fb6907d7" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index eac8eb06e8..2c884c0d1f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -182,7 +182,7 @@ function Simple_pole() Simple_pole=rZERO ! E_alpha=real(BS_E_in(i_alpha),SP) - E_beta =BS_all_E(i_beta,iq_bz) + E_beta =BS_all_E(i_beta,iq) ! iq_db=DB_Q_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) From 78c3ed8b57d5da4379f37eb2a8dced456fdb654a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 18 Apr 2022 15:51:55 +0200 Subject: [PATCH 0234/1367] Version 5.1.1, Revision 21395, Hash 7a2c10c76 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F modules/mod_EXCPH.F Changes: -Cleaning and removing comments Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 3 +++ src/exc-ph/EXCPH_lifetime.F | 7 ++++++- src/modules/mod_EXCPH.F | 2 -- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 968cb79586..f45e6279bf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 1 -#define YAMBO_REVISION 21394 -#define YAMBO_HASH "7fb6907d7" +#define YAMBO_REVISION 21395 +#define YAMBO_HASH "7a2c10c76" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 2c05f533d0..f5a560e650 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -290,12 +290,15 @@ subroutine get_excph_q_momenta() ! call k_ibz2bz(q,"i",.false.) ! +! write(*,*) +! write(*,*) 'Excitoni q-list in the BZ ' do iq=1,q%nibz ! do i_star=1,q%nstar(iq) ! iq_s=q%star(iq,i_star) iq_bz = q%k_table(iq, iq_s) +! write(*,*) iq_bz,q%ptbz(iq_bz,:) ! EXCPH_q(iq_bz,:) = q%ptbz(iq_bz,:) ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 2c884c0d1f..b4dbb2ce41 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -64,6 +64,8 @@ subroutine EXCPH_lifetime(E,k,q,X) call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) ! + call k_ibz2bz(q,"i",.false.) + ! ! Load excitonic energies ! call EXCPH_load_L(1,X,'check','Lout') @@ -104,6 +106,8 @@ subroutine EXCPH_lifetime(E,k,q,X) call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') call msg('rs','Self-energy broadening : ',L_damping*HA2EV*1000._SP,'meV') ! +! write(*,*) +! write(*,*) ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) ! @@ -172,6 +176,7 @@ function Simple_pole() use EXCPH, ONLY:min_EXC_E,DB_Q_map use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq use functions, ONLY:bose_f,boltzman_f,Lorentzian_func + use units, ONLY:HA2EV implicit none ! real(SP) :: Simple_pole @@ -195,7 +200,7 @@ function Simple_pole() Simple_pole=(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,L_damping) & & +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! - !write(*,*) E_alpha,E_beta,ph_E,Simple_pole +! write(*,*) E_beta*HA2EV,ph_E*HA2EV,q%ptbz(iq_bz,:) ! end function Simple_Pole ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index f7dc2e66da..bf3ee36e25 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -193,7 +193,6 @@ subroutine build_Q_map(q) type(bz_samp) ::q ! integer :: iq,idb - logical :: re_ordered ! YAMBO_ALLOC(DB_Q_map,(q%nbz)) ! @@ -209,7 +208,6 @@ subroutine build_Q_map(q) enddo if(any(DB_Q_map==0)) call error("Q-point not found in gkkp_expanded DBs") ! - re_ordered=.FALSE. do iq=1,q%nbz if(DB_Q_map(iq)/=iq) then call warning('Q-points in Yambo and gkkp_expanded DBs have a different order !') From fc6953f7faba25eb3b723e789d963596a7d2cfa6 Mon Sep 17 00:00:00 2001 From: Pedro Melo Date: Tue, 19 Apr 2022 12:51:58 +0200 Subject: [PATCH 0235/1367] Fixed bug in allocation of dipoes in src/modules/mod_BS_solvers.F. Added extra real(SP) in src/xc_functionals/XC_libxc_driver.F to bipass mismatch error. Found bug in src/bse/PL_diago_residual.F with array dimension mismatch. Still working it out. --- .../K_components_folded_in_serial_arrays.F | 3 ++- src/bse/PL_diago_residual.F | 11 +++++++++-- src/modules/mod_BS_solvers.F | 4 ++-- src/xc_functionals/XC_libxc_driver.F | 19 +++++++++++-------- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 0b4e5b09af..a9626b4446 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -33,7 +33,8 @@ subroutine K_components_folded_in_serial_arrays(iq) use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& & BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_W,BSS_eh_Z,BSS_alloc use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& -& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_photolum +& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& +& BS_dip_size,BS_H_dim use timing_m, ONLY:timing use LIVE_t, ONLY:live_timing use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 78ff1f1e53..4078421276 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -31,7 +31,7 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use BS, ONLY:BS_H_dim,BS_K_dim - use BS_solvers, ONLY:BSS_eh_f + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f ! implicit none @@ -65,6 +65,8 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! Live-Timing ! call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig ! ! Non-Hermitian residual !======================== @@ -133,13 +135,18 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ P_x_fZ(:,i_c,1)=BSS_dipoles_PL(i_c,:)*sqrt(BSS_eh_f(:)) enddo ! + write(*,*) 'BS_K_dim(1)', BS_K_dim(1) + write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) + write(*,*) 'shape(BS_V_right)', shape(BS_V_right) + write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) + ! do i_l=1,BS_K_dim(1) ! if (.not.px%element_1D(i_l)) cycle ! ! R_over_R_x_A = R<_j/R_j A^l_j ! - R_over_R_x_A(1,:) = BSS_PL_f(1:BS_K_dim(1)) *BS_V_right(:,i_l)/BSS_eh_f(:) + R_over_R_x_A(1,1:BS_K_dim(1)) = BSS_PL_f(1:BS_K_dim(1)) *BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) R_over_R_x_A(2,:) = BSS_PL_f(BS_K_dim(1)+1:)*BS_V_right(:,i_l)/BSS_eh_f(:) ! ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 75a62b4d36..79f9f4a6f0 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -310,7 +310,7 @@ end subroutine resizeC22p subroutine BSS_alloc( ) use pars, ONLY:IP,cZERO,rZERO use electrons, ONLY:n_sp_pol - use BS, ONLY:BS_dip_size,l_BS_abs,l_BS_kerr,l_BS_dichroism + use BS, ONLY:BS_dip_size,l_BS_optics integer :: i_g,i_size logical :: W_is_allocated,Z_is_allocated,E_SOC_is_allocated YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,5)) @@ -319,7 +319,7 @@ subroutine BSS_alloc( ) BSS_eh_table = 0 BSS_eh_E = rZERO BSS_eh_f = rZERO - if (l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism) then + if (l_BS_optics) then YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) BSS_dipoles_opt = cZERO endif diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index fc14a6c0a5..473604f91b 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -66,6 +66,8 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) real(SP) :: local_exx_fraction real(DP) :: exsr ! + integer(SP) :: size_IPL_s + ! ! XC routines arrays ! real(SP) :: spin_rho_SP(fft_size,n_spin),rho(fft_size) @@ -253,23 +255,24 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) end if ! size_IPL=int(fft_size,kind=IPL) + size_IPL_s = size_IPL ! do ixc = 1,2 if (fnctl(ixc)%id == 0) cycle if (fnctl(ixc)%family==XC_FAMILY_LDA) then select case(ORDER) case(0) - call xc_f03_lda_exc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), tmp_exc(1)) + call xc_f03_lda_exc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), tmp_exc(1)) E_xc = E_xc + real(tmp_exc,SP) case(1) - call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) + call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), v1rho(1,1)) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) case(2) if( l_BS_magnons) then - call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) + call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), v1rho(1,1)) if(n_spinor==2) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) + call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), v2rho2(1,1)) ! Yambo internal for Kxc call XC_eval_lda_kernel(v1rho,v2rho2) end select @@ -278,10 +281,10 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if(FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) call XC_eval_pbegaux(spin_rho_DP(1,1), sigma(1,1), exsr,vx1(1,1),vx2(1,1)) select case(ORDER) case(0) - call xc_f03_gga_exc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), tmp_exc(1)) + call xc_f03_gga_exc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), tmp_exc(1)) E_xc = E_xc + real(tmp_exc,SP) case(1) - call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) + call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR.and.ixc==1) then !GAUPBE short energy part of the x potential,factor 2 in vx2 for !consistency qith QE @@ -293,11 +296,11 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) case(2) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) call error(' Fxc not coded for GAU-PBEP') if( l_BS_magnons) then - call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) + call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) ! Yambo internal for V_xc if(n_spinor==2) call XC_eval_gga_potential(v1rho,v1sigma,drho) endif - call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) + call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) ! Yambo internal for Kxc call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) end select From df9d9af7910a53ee639ec3f9d5ac9e901e14c116 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 20 Apr 2022 19:21:00 +0200 Subject: [PATCH 0236/1367] Swapped t_rev-induced conjugates in EXCPH_gkkp_eval --- src/exc-ph/EXCPH_gkkp_eval.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 4d0af15b47..0e4b3773a4 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -112,8 +112,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! if (i_Hp==0) cycle ! - if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) + if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) + if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) ! enddo ! @@ -135,8 +135,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! if (i_Hp==0) cycle ! - if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) + if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) + if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) ! enddo ! From bc0103971f3640ac7f91c61758889b3c122852d4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Apr 2022 23:04:13 +0200 Subject: [PATCH 0237/1367] Version 5.1.0, Revision 21401, Hash d5f16d048 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Changes: - [yambo_ph] debugging lines improved Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index bd511a5d6e..e85790fdda 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21260 -#define YAMBO_HASH "42fad75f2" +#define YAMBO_REVISION 21401 +#define YAMBO_HASH "d5f16d048" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index b4dbb2ce41..56c27d42c9 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -145,9 +145,8 @@ subroutine EXCPH_lifetime(E,k,q,X) else EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() ! DS Debug < - ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+Simple_pole() - ! write(*,*) i_alpha,EXC_LifeTime(i_alpha) - ! Ds Debug > + ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) + ! DS Debug > endif ! enddo @@ -200,7 +199,9 @@ function Simple_pole() Simple_pole=(1._SP+N_bose+F_boltz)*Lorentzian_func(E_alpha-E_beta-ph_E,L_damping) & & +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! -! write(*,*) E_beta*HA2EV,ph_E*HA2EV,q%ptbz(iq_bz,:) + ! DEBUG < + ! write(200+i_alpha,*) E_alpha*HA2EV,E_beta*HA2EV,ph_E*HA2EV + ! DEBUG > ! end function Simple_Pole ! From f1577f1033853b44cf2fd0f810b18e0f31b378df Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Apr 2022 23:36:27 +0200 Subject: [PATCH 0238/1367] Version 5.1.0, Revision 21397, Hash 04cd0f44a MODIFIED * configure include/driver/version.h Changes: - [yambo] configure regenerated after merge Patch sent by: Davide Sangalli --- configure | 22 ++++++++++++++++++++++ include/driver/version.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 784b143a0a..f9afc20e34 100755 --- a/configure +++ b/configure @@ -651,6 +651,7 @@ MPI_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -827,6 +828,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -887,6 +890,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1619,6 +1623,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3068,6 +3073,19 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test "${enable_gamma_only+set}" = set; then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -14743,6 +14761,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -14924,6 +14945,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index bd511a5d6e..8069a9c5a5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21260 -#define YAMBO_HASH "42fad75f2" +#define YAMBO_REVISION 21397 +#define YAMBO_HASH "04cd0f44a" From 52d453a887fa2b04d974308b407e208144f5c65f Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 21 Apr 2022 10:29:46 +0200 Subject: [PATCH 0239/1367] Reverted previous t_rev commit --- src/exc-ph/EXCPH_gkkp_eval.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 0e4b3773a4..4d0af15b47 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -112,8 +112,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! if (i_Hp==0) cycle ! - if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) ! enddo ! @@ -135,8 +135,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! if (i_Hp==0) cycle ! - if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) ! enddo ! From fc0e49b62980fb5140434eac5c9d62516497936c Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 21 Apr 2022 18:47:44 +0200 Subject: [PATCH 0240/1367] Excluded self-scattering in EXCPH_linewidths --- src/exc-ph/EXCPH_lifetime.F | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 56c27d42c9..4fcae19870 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -192,6 +192,10 @@ function Simple_pole() ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_E Date: Sat, 23 Apr 2022 10:08:32 +0200 Subject: [PATCH 0241/1367] Version 5.1.0, Revision 21404, Hash fc0e49b62 MODIFIED * include/driver/version.h el-ph/ELPH_databases_grids_map.F exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F exc-ph/Satellite_Simple.F Bugs: - [yambo_ph] Fixed k-points mapping Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/el-ph/ELPH_databases_grids_map.F | 10 +++++++--- src/exc-ph/EXCPH_X_phass.F | 8 +++++--- src/exc-ph/EXCPH_eval_sat.F | 5 +++-- src/exc-ph/EXCPH_gkkp_driver.F | 12 ++++++++++-- src/exc-ph/EXCPH_gkkp_eval.F | 16 ++++++++++------ src/exc-ph/EXCPH_lifetime.F | 10 ++++++---- src/exc-ph/Satellite_Simple.F | 5 +++-- 8 files changed, 46 insertions(+), 24 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e85790fdda..8740b1bd20 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21401 -#define YAMBO_HASH "d5f16d048" +#define YAMBO_REVISION 21404 +#define YAMBO_HASH "fc0e49b62" diff --git a/src/el-ph/ELPH_databases_grids_map.F b/src/el-ph/ELPH_databases_grids_map.F index b7d24671af..33ceea104e 100644 --- a/src/el-ph/ELPH_databases_grids_map.F +++ b/src/el-ph/ELPH_databases_grids_map.F @@ -65,8 +65,12 @@ subroutine ELPH_databases_grids_map(k,q) call k_ibz2bz(q,'i',.false.) do i1=1,elph_nQ do i2=1,elph_nQ - if (l_GKKP_expanded_DB_exists) call c2a(v_in=q%ptbz(i1,:)+PH_qpt(i2,:),v_out=v,mode="ki2a") - if (l_GKKP_DB_exists) call c2a(v_in=q%pt(i1,:)+PH_qpt(i2,:),v_out=v,mode="ki2a") + call c2a(v_in=q%ptbz(i1,:)-PH_qpt(i2,:),v_out=v,mode="ki2a") + ! DS comment 2022/04/23: + ! - these if are useless, if l_GKKP_DB_exists the code exits before (see return) + ! - why the -q here? This is already fixed by DB_Q_map. The Q_io_map should use +q. See again standard case above. + !if (l_GKKP_expanded_DB_exists) call c2a(v_in=q%ptbz(i1,:)+PH_qpt(i2,:),v_out=v,mode="ki2a") + !if (l_GKKP_DB_exists) call c2a(v_in=q%pt(i1,:)+PH_qpt(i2,:),v_out=v,mode="ki2a") if (rlu_v_is_zero(v,zero_=k_rlu_zero)) Q_io_map(i1)=i2 enddo enddo @@ -83,7 +87,7 @@ subroutine ELPH_databases_grids_map(k,q) if (rlu_v_is_zero(v,zero_=k_rlu_zero)) K_io_map(i1)=i2 enddo enddo - call k_ibz2bz(k,'i',.false.) + call k_ibz2bz(k,'d',.false.) if (any(K_io_map==0)) call error('K-points do not match') ! end subroutine diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 3278263bf6..b92dc4caee 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -46,7 +46,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,BS_Sat_W_DG,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & & BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,DB_Q_map - use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,ph_modes + use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,ph_modes,Q_io_map use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset use D_lattice, ONLY:nsym @@ -105,7 +105,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') ! - iq_db=DB_Q_map(iq_bz) + !iq_db=DB_Q_map(iq_bz) + iq_db=Q_io_map(iq_bz) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! @@ -286,7 +287,8 @@ subroutine Eval_Renorm_Factor() ! do il=elph_branches(1),elph_branches(2) ! - iq_db=DB_Q_map(iq_bz) + !iq_db=DB_Q_map(iq_bz) + iq_db=Q_io_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_E @@ -52,7 +52,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! Work Space ! logical :: t_rev - integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,& + integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,ip_db,& & iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT real(SP) :: ph_E,elph_gkkp_sq integer, external :: io_ELPH @@ -71,9 +71,11 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! ! with k and q in the BZ ! - iq_db=DB_Q_map(iq_bz) + !iq_db=DB_Q_map(iq_bz) + iq_db=Q_io_map(iq_bz) + !write(*,*) iq_bz,iq_db,DB_Q_map(iq_bz) IO_ACT=manage_action(RD,iq_db,1,q%nbz) - if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_db,1,q%nbz) + if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) ! call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. @@ -108,7 +110,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) ! - elph_gkkp_sq=GKKP%dVc(il,iv,ivp,ik_bz,1)/sqrt(2._SP*ph_E) + ik_db=K_io_map(ik_bz) + elph_gkkp_sq=GKKP%dVc(il,iv,ivp,ik_db,1)/sqrt(2._SP*ph_E) ! if (i_Hp==0) cycle ! @@ -131,7 +134,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) ! - elph_gkkp_sq=GKKP%dVc(il,icp,ic,ip_bz,1)/sqrt(2._SP*ph_E) + ip_db=K_io_map(ip_bz) + elph_gkkp_sq=GKKP%dVc(il,icp,ic,ip_db,1)/sqrt(2._SP*ph_E) ! if (i_Hp==0) cycle ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 4fcae19870..8032041e82 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -37,7 +37,7 @@ subroutine EXCPH_lifetime(E,k,q,X) use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping, & & alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map - use ELPH, ONLY:PH_freqs,use_PH_DbGd,elph_branches,FAN_deltaE_treshold + use ELPH, ONLY:PH_freqs,use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use frequency, ONLY:w_samp use stderr, ONLY:intc ! @@ -126,7 +126,8 @@ subroutine EXCPH_lifetime(E,k,q,X) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'gkkp') if(io_err/=0) call error('excph_gkkp databases not found!') ! - iq_db=DB_Q_map(iq_bz) + !iq_db=DB_Q_map(iq_bz) + iq_db=Q_io_map(iq_bz) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') @@ -173,7 +174,7 @@ subroutine EXCPH_lifetime(E,k,q,X) ! function Simple_pole() use EXCPH, ONLY:min_EXC_E,DB_Q_map - use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq + use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs_sq,Q_io_map use functions, ONLY:bose_f,boltzman_f,Lorentzian_func use units, ONLY:HA2EV implicit none @@ -188,7 +189,8 @@ function Simple_pole() E_alpha=real(BS_E_in(i_alpha),SP) E_beta =BS_all_E(i_beta,iq) ! - iq_db=DB_Q_map(iq_bz) + !iq_db=DB_Q_map(iq_bz) + iq_db=Q_io_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_E ! @@ -63,7 +63,8 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Bose function for the phonons ! - iq_db=DB_Q_map(iq) + !iq_db=DB_Q_map(iq) + iq_db=Q_io_map(iq) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) ! if(ph_E Date: Sat, 23 Apr 2022 14:26:47 +0200 Subject: [PATCH 0242/1367] Version 5.1.0, Revision 21405, Hash d95634710 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F Bugs: - [ypp_ph] qindx_S replaced with qindx_C Fix for issue #608 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases.F | 10 +++++----- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 13 ++++++++----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8740b1bd20..39211e5a82 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21404 -#define YAMBO_HASH "fc0e49b62" +#define YAMBO_REVISION 21405 +#define YAMBO_HASH "d95634710" diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index a5e0a23111..6260eeef8d 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -32,7 +32,7 @@ subroutine ELPH_databases(k,E,q) & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,l_GKKP_hosts_bare_dV use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab - use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering,qindx_S + use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering,qindx_C use parser_m, ONLY:parser use vec_operate, ONLY:v_is_zero use zeros, ONLY:k_iku_zero @@ -92,13 +92,13 @@ subroutine ELPH_databases(k,E,q) if(io_err(2)/=0) call error("Error reading qindx_B") ! else - ! otherwise qindx_S is allocated - if(.not.allocated(qindx_S)) then - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) + ! otherwise qindx_C is allocated + if(.not.allocated(qindx_C)) then + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) io_err(1)=io_QINDX(k,q,ID) if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") - call error("Please (re)run the setup") + call error('Please (re)run the setup K_grids="C"') endif endif endif diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index ffc2e28c30..99b58404fc 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -26,7 +26,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag use pars, ONLY:SP use units, ONLY:HA2EV use electrons, ONLY:levels - use R_lattice, ONLY:bz_samp,qindx_B,qindx_B_load,qindx_S + use R_lattice, ONLY:bz_samp,qindx_B,qindx_B_load,qindx_C use interfaces, ONLY:ELPH_alloc use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_tab use ELPH, ONLY:elph_nb,GKKP_me,PH_qpt @@ -99,6 +99,8 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag qindx_tmp=qindx_B_load(ok_bz,ik_bz,qindx_ID_frag) iq_bz=qindx_tmp(1) ! + ! q_bz = ki_bz - ko_bz + ! if (iq_bz==iq) then ok=k%sstar(ok_bz,1) os=k%sstar(ok_bz,2) @@ -108,9 +110,10 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag ! else ! - ! Use qindx_S + ! Use qindx_S: q_bz = ki_ibz - ko_bz + ! Use qindx_C: q_bz = ki_bz - ko_bz ! - ok_bz=qindx_S(ik,iq,1) + ok_bz=qindx_C(ik_bz,iq,1) ok=k%sstar(ok_bz,1) os=k%sstar(ok_bz,2) ! @@ -182,9 +185,9 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag ! else ! - ! Use qindx_S + ! Use qindx_C ! - ok_bz=qindx_S(ik,iq,1) + ok_bz=qindx_C(ik_bz,iq,1) ok=k%sstar(ok_bz,1) os=k%sstar(ok_bz,2) ! From af6aa0c9d39465cc00d05f16ed70432db1a207cf Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Apr 2022 23:08:42 +0200 Subject: [PATCH 0243/1367] Version 5.1.0, Revision 21406, Hash 55d5dd731 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F Bugs: - [yambo_ph] Fixed compilation in double precision Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 39211e5a82..4d922c1b0e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21405 -#define YAMBO_HASH "d95634710" +#define YAMBO_REVISION 21406 +#define YAMBO_HASH "55d5dd731" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index ff073cdc34..16f589dfa6 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -134,7 +134,7 @@ subroutine print_output() ! call X_write_messages_before_headers(1,.FALSE.,.FALSE.,'r ') ! - call X_write_q_plus_G(1,(/0.0,0.0,0.0/),1) + call X_write_q_plus_G(1,(/0._SP,0._SP,0._SP/),1) ! call msg('o eps_q pl_q','# EXCITON PHONON') call msg('o eps_q pl_q','# Exciton_states :',EXCPH_states,INDENT=0) From 19b1d69a76fe90af3f8062a73ea54bbe216d888d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Apr 2022 23:37:50 +0200 Subject: [PATCH 0244/1367] Version 5.1.0, Revision 21407, Hash af6aa0c9d MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F Changes: - [yambo_ph] Few small changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 10 +++++++--- src/exc-ph/EXCPH_gkkp_eval.F | 4 ++++ src/exc-ph/EXCPH_lifetime.F | 7 +++++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4d922c1b0e..a18ea0c203 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21406 -#define YAMBO_HASH "55d5dd731" +#define YAMBO_REVISION 21407 +#define YAMBO_HASH "af6aa0c9d" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 45b233eae0..de19432efc 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -94,6 +94,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call ELPH_databases_grids_map(k,q) call k_ibz2bz(q,"i",.false.) call build_Q_map(q) + call k_ibz2bz(q,"d",.false.) endif ! ! Check if exciton-phonon matrix elements have been already calculated @@ -164,6 +165,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Main q-loop ! + !call k_ibz2bz(k,"i",.false.) call live_timing('Excitonic Gkkp',q%nibz*ph_modes) ! do iq=1,q%nibz @@ -289,8 +291,6 @@ subroutine get_excph_q_momenta() ! integer iq,i_star,iq_s,iq_bz ! - YAMBO_ALLOC(q%ptbz,(q%nbz,3)) - ! call k_ibz2bz(q,"i",.false.) ! ! write(*,*) @@ -308,7 +308,8 @@ subroutine get_excph_q_momenta() enddo enddo ! - YAMBO_FREE(q%ptbz) + call k_ibz2bz(q,"d",.false.) + ! end subroutine get_excph_q_momenta ! subroutine build_k_plus_q_table() @@ -406,6 +407,9 @@ subroutine compare_qindxC_table() enddo enddo ! + call k_ibz2bz(q,"d",.false.) + call k_ibz2bz(k,"d",.false.) + ! end subroutine compare_qindxC_table ! subroutine EXCPH_gkkp_report() diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index ce79ae7c70..f99f71f111 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -86,6 +86,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) if (ph_E Date: Mon, 25 Apr 2022 22:03:51 +0200 Subject: [PATCH 0245/1367] Version 5.1.0, Revision 21408, Hash 19b1d69a7 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval.F Bugs: - [yambo_ph] Fixed wrong momentum index Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a18ea0c203..23f6c6da89 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21407 -#define YAMBO_HASH "af6aa0c9d" +#define YAMBO_REVISION 21408 +#define YAMBO_HASH "19b1d69a7" diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index f99f71f111..37b2365505 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -52,7 +52,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! Work Space ! logical :: t_rev - integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,ip_db,& + integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& & iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT real(SP) :: ph_E,elph_gkkp_sq integer, external :: io_ELPH @@ -138,8 +138,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) ! - ip_db=K_io_map(ip_bz) - elph_gkkp_sq=GKKP%dVc(il,icp,ic,ip_db,1)/sqrt(2._SP*ph_E) + ik_db=K_io_map(ik_plus_iq_bz) + elph_gkkp_sq=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) ! if (i_Hp==0) cycle ! From 5a533c7e64d837e0b14aec0fd145ea6d75318c1b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 26 Apr 2022 16:37:05 +0200 Subject: [PATCH 0246/1367] Version 5.1.0, Revision 21409, Hash 128aa88d0 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval.F Bugs: - [yambo_ph] elph_gkkp renamed (removed _sq) and changed from real to complex Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval.F | 31 +++++++++++++++++++------------ 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 23f6c6da89..6dbec18019 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21408 -#define YAMBO_HASH "19b1d69a7" +#define YAMBO_REVISION 21409 +#define YAMBO_HASH "128aa88d0" diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 37b2365505..ab6687bb68 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -31,7 +31,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) use drivers, ONLY:l_EXCPH_Sigma use electrons, ONLY:levels,n_sp_pol use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev - use R_lattice, ONLY:nqibz,bz_samp!,qindx_C + use R_lattice, ONLY:nqibz,bz_samp,qindx_C use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD @@ -53,8 +53,9 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! logical :: t_rev integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& -& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT - real(SP) :: ph_E,elph_gkkp_sq +& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT + real(SP) :: ph_E + complex(SP) :: elph_gkkp integer, external :: io_ELPH ! ! Loop scheme: @@ -97,6 +98,10 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) ! + ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz + ! + ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz + ! ! DS note: I think here the choice is not unique ! given a ik_bz there maybe multiple ik_s which send ik_ibz --> ik_bz ! @@ -113,22 +118,23 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) ! ik_db=K_io_map(ik_bz) - elph_gkkp_sq=GKKP%dVc(il,iv,ivp,ik_db,1)/sqrt(2._SP*ph_E) + !ik_db=K_io_map(ik_minus_iq_bz) + elph_gkkp=GKKP%dVc(il,iv,ivp,ik_db,1)/sqrt(2._SP*ph_E) + ! + !ik_db=K_io_map(ik_bz) + !write(*,*) elph_gkkp,conjg(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) ! if (i_Hp==0) cycle ! !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) ! - if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,i_beta,1)=Xi(i_H,i_beta,1)+elph_gkkp* BS_mat(i_Hp,i_beta) ! enddo ! ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz ! - !ik_plus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz - ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz - ! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! ! 2=UP @@ -139,12 +145,13 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) ! ik_db=K_io_map(ik_plus_iq_bz) - elph_gkkp_sq=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) + !ik_db=K_io_map(ik_bz) + elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) ! if (i_Hp==0) cycle ! - if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp_sq* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,i_beta,2)=Xi(i_H,i_beta,2)+elph_gkkp* BS_mat(i_Hp,i_beta) ! enddo ! From a7876a79c6b4862dd11bcd6559cca222e7b3064d Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 27 Apr 2022 16:10:37 +0200 Subject: [PATCH 0247/1367] Cleanup of some unused variables --- src/exc-ph/EXCPH_gkkp_driver.F | 2 +- src/exc-ph/EXCPH_gkkp_eval.F | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index de19432efc..8d92ed5736 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -183,7 +183,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! do il=1,ph_modes ! - call EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) + call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! call live_timing(steps=1) ! diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index ab6687bb68..8035e159b9 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -25,34 +25,33 @@ ! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. ! - FP ! -subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) +subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO - use drivers, ONLY:l_EXCPH_Sigma - use electrons, ONLY:levels,n_sp_pol + !use electrons, ONLY:levels use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev - use R_lattice, ONLY:nqibz,bz_samp,qindx_C - use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BS_mat,BSS_eh_table,BSS_free,BSS_write_eig_2_db + use R_lattice, ONLY:bz_samp,qindx_C + use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control - use X_m, ONLY:X_t - use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat + !use X_m, ONLY:X_t + use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table + use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& +& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table #include ! - type(levels) ::E + !type(levels) ::E type(bz_samp) ::k,q - type(X_t) ::X - integer, intent(in) :: iq,iq_s,iq_bz,il + !type(X_t) ::X + integer, intent(in) :: iq_s,iq_bz,il!,iq integer, intent(inout) :: ID_gkkp ! ! Work Space ! logical :: t_rev - integer :: ID_BS,ID_exc_Gkkp,io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& + integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& & iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT real(SP) :: ph_E complex(SP) :: elph_gkkp @@ -120,6 +119,9 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ik_db=K_io_map(ik_bz) !ik_db=K_io_map(ik_minus_iq_bz) elph_gkkp=GKKP%dVc(il,iv,ivp,ik_db,1)/sqrt(2._SP*ph_E) + ! [FP] DEBUG> + !elph_gkkp=cmplx(1._SP,0._SP) + ! [FP] DEBUG< ! !ik_db=K_io_map(ik_bz) !write(*,*) elph_gkkp,conjg(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) @@ -147,6 +149,9 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ik_db=K_io_map(ik_plus_iq_bz) !ik_db=K_io_map(ik_bz) elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) + ! [FP] DEBUG> + !elph_gkkp=cmplx(1._SP,0._SP) + ! [FP] DEBUG< ! if (i_Hp==0) cycle ! @@ -179,7 +184,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! Compute the squared couplings ! forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) - EXCPH_Gkkp_sq(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) + !EXCPH_Gkkp_sq(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) + EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 end forall ! contains From 8c10337afb5475906af8dac6efeeda086c6dcd9a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 27 Apr 2022 16:15:36 +0200 Subject: [PATCH 0248/1367] Version 5.1.0, Revision 21410, Hash 5a533c7e6 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F modules/mod_EXCPH.F Changes: - Added options to control constant elph in contruction of exc-ph matrix elements Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_gkkp_eval.F | 54 ++++++++++++++++++++++-------------- src/exc-ph/EXCPH_lifetime.F | 9 ++++-- src/modules/mod_EXCPH.F | 7 +++-- 4 files changed, 45 insertions(+), 29 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6dbec18019..2a4d635d09 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21409 -#define YAMBO_HASH "128aa88d0" +#define YAMBO_REVISION 21410 +#define YAMBO_HASH "5a533c7e6" diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index ab6687bb68..d3dbf82db7 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -27,7 +27,7 @@ ! subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! - use pars, ONLY:SP,cZERO,rZERO + use pars, ONLY:SP,cZERO,rZERO,cONE use drivers, ONLY:l_EXCPH_Sigma use electrons, ONLY:levels,n_sp_pol use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev @@ -40,7 +40,8 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table +& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,& +& l_const_elph,l_abs_elph #include ! type(levels) ::E @@ -65,8 +66,11 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! ->i_alpha ->i_H [Calculate Gkkp] Xi=cZERO ! - ! - t_rev= (iq_s>nsym/(i_time_rev+1)) + elph_gkkp=cONE + ! + t_rev= (iq_s>nsym/(i_time_rev+1)) + ! + if (.not.l_const_elph) then ! ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > ! @@ -86,7 +90,11 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! if (ph_E endif ! @@ -209,7 +212,7 @@ function Simple_pole() & +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! ! DEBUG < - ! write(200+i_alpha,*) E_alpha*HA2EV,E_beta*HA2EV,ph_E*HA2EV + write(200+i_alpha,*) E_alpha*HA2EV,E_beta*HA2EV,ph_E*HA2EV ! DEBUG > ! end function Simple_Pole diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index bf3ee36e25..a9b7b1cb1c 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -35,6 +35,7 @@ module EXCPH ! ! ... GKKP & EXC-PH Interaction ! + logical :: l_const_elph,l_abs_elph complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: EXCPH_states(2) @@ -53,8 +54,8 @@ module EXCPH character(schlen) :: L_kind_out ! ! ExcPH gkkp - ! - complex(SP), allocatable :: A_rot(:,:),Xi(:,:,:) + ! + complex(SP), allocatable :: A_rot(:,:),Xi(:,:) integer, allocatable :: BSS_eh_table_m1(:,:,:),BSS_eh_table_m1_in(:,:,:),k_plus_q_table(:,:) complex(SP), allocatable :: BS_E_in(:),BS_E(:) real(SP), allocatable :: BS_all_E(:,:) @@ -149,7 +150,7 @@ subroutine EXCPH_gkkp_alloc() implicit none YAMBO_ALLOC(EXCPH_Gkkp,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Gkkp_sq,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(Xi,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2),2)) + YAMBO_ALLOC(Xi,(BS_H_dim,2)) EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO end subroutine EXCPH_gkkp_alloc From 3b278aa9a83e215daa34862867a5e544066e65ef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 27 Apr 2022 16:20:46 +0200 Subject: [PATCH 0249/1367] Version 5.1.0, Revision 21411, Hash 8c10337af MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Changes: - [yabmo_ph] commented debug lines Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2a4d635d09..5905eb3a13 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21410 -#define YAMBO_HASH "5a533c7e6" +#define YAMBO_REVISION 21411 +#define YAMBO_HASH "8c10337af" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 1fb0bcbc73..971baf324c 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -150,7 +150,7 @@ subroutine EXCPH_lifetime(E,k,q,X) else EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() ! DS Debug < - write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) + ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) ! DS Debug > endif ! @@ -212,7 +212,7 @@ function Simple_pole() & +(N_bose-F_boltz)*Lorentzian_func(E_alpha-E_beta+ph_E,L_damping) ! ! DEBUG < - write(200+i_alpha,*) E_alpha*HA2EV,E_beta*HA2EV,ph_E*HA2EV + ! write(200+i_alpha,*) E_alpha*HA2EV,E_beta*HA2EV,ph_E*HA2EV ! DEBUG > ! end function Simple_Pole From f8f0ab248335643e4bcdbe039341300579fddef3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 27 Apr 2022 16:41:01 +0200 Subject: [PATCH 0250/1367] Version 5.1.0, Revision 21412, Hash 3b278aa9a MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_lifetime.F Bugs: - [yambo_ph] Fixed control of constant elph matrix elements Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 +++++- src/exc-ph/EXCPH_gkkp_eval.F | 4 +--- src/exc-ph/EXCPH_lifetime.F | 7 +------ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5905eb3a13..4395412ae0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21411 -#define YAMBO_HASH "8c10337af" +#define YAMBO_REVISION 21412 +#define YAMBO_HASH "3b278aa9a" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index de19432efc..51a25dd040 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -43,6 +43,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp,qindx_B !_load use D_lattice, ONLY:nsym + use parser_m, ONLY:parser use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim @@ -53,7 +54,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & & BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free,DB_Q_map, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free,& +& l_const_elph,l_abs_elph use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -81,6 +83,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_load_L(1,X,'check','Lout') call EXCPH_load_L(1,X,'check','Lin') ! + call parser('ConstElph',l_const_elph) + call parser('AbsElph', l_abs_elph) ! ! Build Q_map elph_branches_save =elph_branches diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index d3dbf82db7..8d516f54e6 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -42,6 +42,7 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,& & l_const_elph,l_abs_elph + ! #include ! type(levels) ::E @@ -70,7 +71,6 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! t_rev= (iq_s>nsym/(i_time_rev+1)) ! - if (.not.l_const_elph) then ! ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > ! @@ -90,8 +90,6 @@ subroutine EXCPH_gkkp_eval(iq,iq_s,iq_bz,il,E,k,q,X,ID_gkkp) ! if (ph_E Date: Wed, 27 Apr 2022 17:37:51 +0200 Subject: [PATCH 0251/1367] Version 5.1.0, Revision 21415, Hash e7bbccebf MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Bugs: - [yambo_ph] Small fix Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a98b521022..7471556fdb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21413 -#define YAMBO_HASH "f8f0ab248" +#define YAMBO_REVISION 21415 +#define YAMBO_HASH "e7bbccebf" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 9cac63d0ee..2ee97f270f 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -141,7 +141,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Save the Lin in information ! BS_mat_in =BS_mat(:,EXCPH_states(1):EXCPH_states(2)) - BSS_eh_table_in =BSS_eh_table(EXCPH_states(1):EXCPH_states(2),:) + BSS_eh_table_in =BSS_eh_table BSS_eh_table_m1_in=BSS_eh_table_m1 BS_E_in =BS_E ! @@ -260,7 +260,7 @@ subroutine BSE_alloc() YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) ! YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) - YAMBO_ALLOC(BS_mat_in,(BS_H_dim,BSS_n_eig)) + YAMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) ! From f46401f5b2fc7d7473b4add1a889164168c1930d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 27 Apr 2022 23:35:28 +0200 Subject: [PATCH 0252/1367] Version 5.1.0, Revision 21416, Hash 61ffb3c88 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F modules/mod_EXCPH.F Changes: - [yambo_ph] Coded sum over degenerate space for excph lifetimes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 23 ++++++++++++++++------- src/modules/mod_EXCPH.F | 4 +++- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7471556fdb..dfdac9e62e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21415 -#define YAMBO_HASH "e7bbccebf" +#define YAMBO_REVISION 21416 +#define YAMBO_HASH "61ffb3c88" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 8e00fd3aa0..35d2c97d73 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -35,9 +35,10 @@ subroutine EXCPH_lifetime(E,k,q,X) use X_m, ONLY:X_t use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping, & + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & & alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map use ELPH, ONLY:PH_freqs,use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map + use vec_operate, ONLY:degeneration_finder use frequency, ONLY:w_samp use stderr, ONLY:intc ! @@ -51,9 +52,9 @@ subroutine EXCPH_lifetime(E,k,q,X) ! integer :: ID_exc_gkkp,ID_gkkp,io_err integer, external :: io_EXCPH_gkkp,io_ELPH - integer :: iq,iq_s,iq_bz,i_alpha,i_beta,il,i_star,iq_db + integer :: iq,iq_s,iq_bz,i_alpha,j_alpha,i_beta,il,i_star,iq_db,igrp integer :: elph_branches_save(2) - integer :: min_pos(1) + integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_no_matrix_elements,l_keep_deg real(SP) :: ExcPhM ! @@ -78,7 +79,10 @@ subroutine EXCPH_lifetime(E,k,q,X) ! Load excitonic energies ! call EXCPH_load_L(1,X,'eigenvalues','Lin') - BS_E_in(:)=BS_E(:) ! L_in can be different from L_out + BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out + ! + call degeneration_finder(real(BS_E_in),n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& + & 0.001/HA2EV,Include_single_values=.true.) ! do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') @@ -131,7 +135,10 @@ subroutine EXCPH_lifetime(E,k,q,X) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) + do igrp=1,n_deg_grp + j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 + do i_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1,first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 + !do i_alpha=EXCPH_states(1),EXCPH_states(2) ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! @@ -141,9 +148,9 @@ subroutine EXCPH_lifetime(E,k,q,X) if(l_no_matrix_elements) ExcPhM=1._SP ! if(use_PH_DbGd) then - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*DbGrid_pole() + EXC_LifeTime(j_alpha)=EXC_LifeTime(j_alpha)+ExcPhM*DbGrid_pole() else - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() + EXC_LifeTime(j_alpha)=EXC_LifeTime(j_alpha)+ExcPhM*Simple_pole() ! DS Debug < ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) ! DS Debug > @@ -154,6 +161,8 @@ subroutine EXCPH_lifetime(E,k,q,X) enddo ! enddo + EXC_LifeTime(j_alpha:i_alpha-1)=EXC_LifeTime(j_alpha) + enddo ! enddo enddo diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index a9b7b1cb1c..3da5786cdd 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -38,6 +38,7 @@ module EXCPH logical :: l_const_elph,l_abs_elph complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) + integer :: n_exc_in integer :: EXCPH_states(2) integer :: EXCPH_sum(2) real(SP), allocatable :: EXCPH_q(:,:) @@ -148,6 +149,7 @@ end subroutine Renorm_free ! subroutine EXCPH_gkkp_alloc() implicit none + n_exc_in=EXCPH_states(2)-EXCPH_states(1)+1 YAMBO_ALLOC(EXCPH_Gkkp,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Gkkp_sq,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(Xi,(BS_H_dim,2)) @@ -181,7 +183,7 @@ subroutine alloc_EXC(q) YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) YAMBO_ALLOC(BS_R,(BSS_n_eig)) - YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) + YAMBO_ALLOC(BS_E_in,(EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) end subroutine alloc_EXC ! From b9b165108921559f0321c88e3082a69a7708456d Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 28 Apr 2022 09:54:50 +0200 Subject: [PATCH 0253/1367] Added l_keep_deg to double grid case in EXCPH_linewidths.F --- src/exc-ph/EXCPH_lifetime.F | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 35d2c97d73..aabe64638d 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -250,7 +250,8 @@ function DbGrid_pole() ! ! Remove degenerate states E(alpha,iq_in)=E(beta,iq_fg(iq_in)) [currently iq_in=1] ! - if(iq==1.and.abs(E_alpha-E_beta) Date: Thu, 28 Apr 2022 10:03:20 +0200 Subject: [PATCH 0254/1367] Version 5.1.0, Revision 21417, Hash f46401f5b MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Changes: - [yamob_ph] Averaging procedure over lifetimes moved into separated lines. This way it can be easely removed in the future / commented Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 28 ++++++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index dfdac9e62e..c520c72650 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21416 -#define YAMBO_HASH "61ffb3c88" +#define YAMBO_REVISION 21417 +#define YAMBO_HASH "f46401f5b" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 35d2c97d73..b560ee9e16 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -56,7 +56,7 @@ subroutine EXCPH_lifetime(E,k,q,X) integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_no_matrix_elements,l_keep_deg - real(SP) :: ExcPhM + real(SP) :: ExcPhM,EXC_life_average ! call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) @@ -81,9 +81,6 @@ subroutine EXCPH_lifetime(E,k,q,X) call EXCPH_load_L(1,X,'eigenvalues','Lin') BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out ! - call degeneration_finder(real(BS_E_in),n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& - & 0.001/HA2EV,Include_single_values=.true.) - ! do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real @@ -135,10 +132,7 @@ subroutine EXCPH_lifetime(E,k,q,X) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! - do igrp=1,n_deg_grp - j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 - do i_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1,first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 - !do i_alpha=EXCPH_states(1),EXCPH_states(2) + do i_alpha=EXCPH_states(1),EXCPH_states(2) ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! @@ -148,9 +142,9 @@ subroutine EXCPH_lifetime(E,k,q,X) if(l_no_matrix_elements) ExcPhM=1._SP ! if(use_PH_DbGd) then - EXC_LifeTime(j_alpha)=EXC_LifeTime(j_alpha)+ExcPhM*DbGrid_pole() + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*DbGrid_pole() else - EXC_LifeTime(j_alpha)=EXC_LifeTime(j_alpha)+ExcPhM*Simple_pole() + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() ! DS Debug < ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) ! DS Debug > @@ -161,12 +155,22 @@ subroutine EXCPH_lifetime(E,k,q,X) enddo ! enddo - EXC_LifeTime(j_alpha:i_alpha-1)=EXC_LifeTime(j_alpha) - enddo ! enddo enddo ! + ! Perform average + ! + call degeneration_finder(real(BS_E_in),n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& + & 0.001/HA2EV,Include_single_values=.true.) + ! + do igrp=1,n_deg_grp + j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 + i_alpha=first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 + EXC_life_average=sum(EXC_LifeTime(j_alpha:i_alpha))/real(n_of_exc_grp(igrp),SP) + EXC_LifeTime(j_alpha:i_alpha)=EXC_life_average + enddo + ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file From 2f429af2adf8eaaf5a0339e0868af4f782647b1b Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 28 Apr 2022 10:05:31 +0200 Subject: [PATCH 0255/1367] Cleanup --- driver/yambo.F | 2 +- src/exc-ph/EXCPH_lifetime.F | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 0dbc91ab87..ac7222db68 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -244,7 +244,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) ! driver_now=l_EXCPH_lifetime - if(driver_now) call EXCPH_lifetime(Ken,Xk,q,X(i_X_kind)) + if(driver_now) call EXCPH_lifetime(Xk,q,X(i_X_kind)) #endif ! ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index aabe64638d..784165e50d 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -23,13 +23,12 @@ ! !> @brief Calculate exciton non-radiative life-time induced by phonon-scattering !! -subroutine EXCPH_lifetime(E,k,q,X) +subroutine EXCPH_lifetime(k,q,X) ! use units, ONLY:HA2EV,HA2CMm1 use pars, ONLY:SP,cZERO,rZERO,schlen,pi use electrons, ONLY:levels use R_lattice, ONLY:bz_samp - use D_lattice, ONLY:nsym use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use X_m, ONLY:X_t @@ -37,7 +36,7 @@ subroutine EXCPH_lifetime(E,k,q,X) use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & & alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map - use ELPH, ONLY:PH_freqs,use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map + use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use vec_operate, ONLY:degeneration_finder use frequency, ONLY:w_samp use stderr, ONLY:intc @@ -205,7 +204,7 @@ function Simple_pole() ! Remove degenerate states E(alpha,iq_in)=E(beta,iq_in) [currently iq_in=1] ! if(iq==1.and.abs(E_alpha-E_beta) Date: Thu, 28 Apr 2022 10:09:11 +0200 Subject: [PATCH 0256/1367] Removed self-interaction in double grid part as well --- src/exc-ph/EXCPH_lifetime.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 528c4b60f9..5945968819 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -208,7 +208,6 @@ function Simple_pole() ! Remove degenerate states E(alpha,iq_in)=E(beta,iq_in) [currently iq_in=1] ! if(iq==1.and.abs(E_alpha-E_beta) Date: Thu, 28 Apr 2022 11:15:57 +0200 Subject: [PATCH 0257/1367] Version 5.1.0, Revision 21421, Hash 0be0e2fae MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval.F Changes: - [yambo_ph] added check on BS_eh_table at different q Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval.F | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c520c72650..894d18d97c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21417 -#define YAMBO_HASH "f46401f5b" +#define YAMBO_REVISION 21421 +#define YAMBO_HASH "0be0e2fae" diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 7dd27ed726..d63fd48a6b 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -40,7 +40,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& -& l_const_elph,l_abs_elph +& l_const_elph,l_abs_elph,BSS_eh_table_in ! #include ! @@ -54,7 +54,8 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! logical :: t_rev integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& -& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT +& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT, & +& iv_in,ic_in,ik_bz_in real(SP) :: ph_E complex(SP) :: elph_gkkp integer, external :: io_ELPH @@ -174,6 +175,22 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) do i_alpha=EXCPH_states(1),EXCPH_states(2) ! do i_H=1,BS_H_dim + ! + ! K = (ik_bz,iv,ic) + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + ! + ! K_in = (ik_bz,iv,ic) + ! + ik_bz_in = BSS_eh_table_in(i_H,1) + iv_in = BSS_eh_table_in(i_H,2) + ic_in = BSS_eh_table_in(i_H,3) + ! + if (ik_bz /= ik_bz_in) call error(" Wrong k correspondence") + if (iv /= iv_in ) call error(" Wrong iv correspondence") + if (ic /= ic_in ) call error(" Wrong ic correspondence") ! ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate ! From ca2190b8a01ed5015750d7e24740facc8423b24f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 28 Apr 2022 17:55:31 +0200 Subject: [PATCH 0258/1367] Version 5.1.0, Revision 21424, Hash be389e61a MODIFIED * include/driver/version.h interface/INIT_load.F ypp/el-ph/ELPH_databases.F Additions: -Added an error message if qindx_C is not present in the Db Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_load.F | 2 +- ypp/el-ph/ELPH_databases.F | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 894d18d97c..84b8ca288b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21421 -#define YAMBO_HASH "0be0e2fae" +#define YAMBO_REVISION 21424 +#define YAMBO_HASH "be389e61a" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 05c05b3bf1..b0eb672a36 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -671,7 +671,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') - call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') + call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization',verb_level=V_ph) call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) ! ! GPL_EXCLUDE_START diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 6260eeef8d..00a39e4371 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -32,7 +32,7 @@ subroutine ELPH_databases(k,E,q) & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,l_GKKP_hosts_bare_dV use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab - use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering,qindx_C + use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering,qindx_C,coll_scattering use parser_m, ONLY:parser use vec_operate, ONLY:v_is_zero use zeros, ONLY:k_iku_zero @@ -94,6 +94,7 @@ subroutine ELPH_databases(k,E,q) else ! otherwise qindx_C is allocated if(.not.allocated(qindx_C)) then + if(coll_scattering.eqv.FALSE.) call error('Please run again the setup with: K_grids= "X B C S" ') call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) io_err(1)=io_QINDX(k,q,ID) if (io_err(1)/=0) then From e3311a3022a54572b043bbc1aca36d17ba4043f6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 28 Apr 2022 17:59:46 +0200 Subject: [PATCH 0259/1367] Version 5.1.0, Revision 21425, Hash ca2190b8a MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases.F Bugs: -Small typos Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 84b8ca288b..881e51a70d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21424 -#define YAMBO_HASH "be389e61a" +#define YAMBO_REVISION 21425 +#define YAMBO_HASH "ca2190b8a" diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 00a39e4371..e87c17ab64 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -94,7 +94,7 @@ subroutine ELPH_databases(k,E,q) else ! otherwise qindx_C is allocated if(.not.allocated(qindx_C)) then - if(coll_scattering.eqv.FALSE.) call error('Please run again the setup with: K_grids= "X B C S" ') + if(coll_scattering.eqv..FALSE.) call error('Please run again the setup with: K_grids= "X B C S" ') call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) io_err(1)=io_QINDX(k,q,ID) if (io_err(1)/=0) then From f5ab7223a80e2e86927d42af2194b36dbdbaf3ef Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 28 Apr 2022 23:23:13 +0200 Subject: [PATCH 0260/1367] Version 5.1.0, Revision 21426, Hash e3311a302 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F modules/mod_EXCPH.F Bugs: -When EXCPH_lifetime.F was called with excph_gkkp databases n_exc_in was not defined at the beginning of the function, but used to define other variables Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 +++++- src/exc-ph/EXCPH_lifetime.F | 4 ++-- src/modules/mod_EXCPH.F | 1 - 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 881e51a70d..f1ffee2309 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21425 -#define YAMBO_HASH "ca2190b8a" +#define YAMBO_REVISION 21426 +#define YAMBO_HASH "e3311a302" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 2ee97f270f..70321104e9 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -55,7 +55,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & & BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free,DB_Q_map, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free,& -& l_const_elph,l_abs_elph +& l_const_elph,l_abs_elph,n_exc_in use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -77,6 +77,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call section('*','Excitonic gkkp') !====================================== ! + ! Define n_exc_in + ! + n_exc_in=EXCPH_states(2)-EXCPH_states(1)+1 + ! ! Check if Lout and Lin are present ! and read their kind ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 5945968819..8235f54d7e 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -160,8 +160,8 @@ subroutine EXCPH_lifetime(k,q,X) ! ! Perform average ! - call degeneration_finder(real(BS_E_in),n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& - & 0.001/HA2EV,Include_single_values=.true.) + call degeneration_finder(real(BS_E_in(EXCPH_states(1):EXCPH_states(2))),n_exc_in,first_exc_grp, & + & n_of_exc_grp,n_deg_grp,0.001/HA2EV,Include_single_values=.true.) ! do igrp=1,n_deg_grp j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 3da5786cdd..d18ccbb32e 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -149,7 +149,6 @@ end subroutine Renorm_free ! subroutine EXCPH_gkkp_alloc() implicit none - n_exc_in=EXCPH_states(2)-EXCPH_states(1)+1 YAMBO_ALLOC(EXCPH_Gkkp,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(EXCPH_Gkkp_sq,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(Xi,(BS_H_dim,2)) From 8b1b4150275bf95ce244e55273b39b7429e02bde Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 29 Apr 2022 11:56:52 +0200 Subject: [PATCH 0261/1367] Version 5.1.0, Revision 21427, Hash f5ab7223a MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: - Additions: - Changes: -Better cutoff for the diverging denominators Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f1ffee2309..4cff165397 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21426 -#define YAMBO_HASH "e3311a302" +#define YAMBO_REVISION 21427 +#define YAMBO_HASH "f5ab7223a" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 8235f54d7e..05310f2df6 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -200,15 +200,17 @@ function Simple_pole() E_alpha=real(BS_E_in(i_alpha),SP) E_beta =BS_all_E(i_beta,iq) ! - !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) + ! if(ph_E Date: Fri, 6 May 2022 09:53:59 +0200 Subject: [PATCH 0262/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4cff165397..5524c8c51a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21427 -#define YAMBO_HASH "f5ab7223a" +#define YAMBO_REVISION 21475 +#define YAMBO_HASH "261659317" From 359b4fbd9bcb21f2f845e287ce68b55803515b28 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 6 May 2022 11:27:37 +0200 Subject: [PATCH 0263/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 048b4fe800..697f9b027a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21266 -#define YAMBO_HASH "8b62a760e" +#define YAMBO_REVISION 21484 +#define YAMBO_HASH "529743d7f" From 83afc4bed4f73f581ee5f646f32b5f1a6fe460ef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 6 May 2022 14:20:59 +0200 Subject: [PATCH 0264/1367] Version 5.1.0, Revision 21485, Hash 359b4fbd9 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F Bugs: - [yambo_ph] Fixed case in which elph_branches(2) < ph_modes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 +++--- src/exc-ph/EXCPH_gkkp_eval.F | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 697f9b027a..1156e79932 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21484 -#define YAMBO_HASH "529743d7f" +#define YAMBO_REVISION 21485 +#define YAMBO_HASH "359b4fbd9" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 70321104e9..a4096e9dd2 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -47,7 +47,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim - use ELPH, ONLY:ph_modes,elph_branches,Q_io_map,l_GKKP_expanded_DB_exists + use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control @@ -174,7 +174,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Main q-loop ! !call k_ibz2bz(k,"i",.false.) - call live_timing('Excitonic Gkkp',q%nibz*ph_modes) + call live_timing('Excitonic Gkkp',q%nbz*(elph_branches(2)-elph_branches(1)+1)) ! do iq=1,q%nibz ! @@ -189,7 +189,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO ! - do il=1,ph_modes + do il=elph_branches(1),elph_branches(2) ! call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index d63fd48a6b..a1b7c07f59 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -76,10 +76,8 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! with k and q in the BZ ! - !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) - !write(*,*) iq_bz,iq_db,DB_Q_map(iq_bz) - IO_ACT=manage_action(RD,iq_db,1,q%nbz) + IO_ACT=RD if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) ! call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) From 705caef77a675431f1e1089846bfc781309be9e7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 6 May 2022 14:55:06 +0200 Subject: [PATCH 0265/1367] Version 5.1.0, Revision 21428, Hash 8b1b41502 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F Bugs: - [yambo_ph] Imported fixes from devel-excph-clean-fix-q Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 +++--- src/exc-ph/EXCPH_gkkp_eval.F | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4cff165397..434886e0ff 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21427 -#define YAMBO_HASH "f5ab7223a" +#define YAMBO_REVISION 21428 +#define YAMBO_HASH "8b1b41502" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 70321104e9..a4096e9dd2 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -47,7 +47,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,L_kind,BS_res_ares_n_mat,BS_K_dim - use ELPH, ONLY:ph_modes,elph_branches,Q_io_map,l_GKKP_expanded_DB_exists + use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control @@ -174,7 +174,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Main q-loop ! !call k_ibz2bz(k,"i",.false.) - call live_timing('Excitonic Gkkp',q%nibz*ph_modes) + call live_timing('Excitonic Gkkp',q%nbz*(elph_branches(2)-elph_branches(1)+1)) ! do iq=1,q%nibz ! @@ -189,7 +189,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO ! - do il=1,ph_modes + do il=elph_branches(1),elph_branches(2) ! call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index d63fd48a6b..a1b7c07f59 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -76,10 +76,8 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! with k and q in the BZ ! - !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) - !write(*,*) iq_bz,iq_db,DB_Q_map(iq_bz) - IO_ACT=manage_action(RD,iq_db,1,q%nbz) + IO_ACT=RD if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) ! call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) From 4f5b3ab6386b5f164d08559048032a3a94de4d2d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 10 May 2022 09:52:55 +0200 Subject: [PATCH 0266/1367] Version 5.1.0, Revision 21499, Hash b4f289c25 MODIFIED * include/driver/version.h lib/yambo io/io_DIPOLES_PAR.F Bugs: - [yambo] Fixed compilation with parallel I/O Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- lib/yambo | 2 +- src/io/io_DIPOLES_PAR.F | 19 ++++++++++++++++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d77de756f7..e92c3b02c7 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21398 -#define YAMBO_HASH "f1577f103" +#define YAMBO_REVISION 21499 +#define YAMBO_HASH "b4f289c25" diff --git a/lib/yambo b/lib/yambo index 33fa12b140..03036573a8 160000 --- a/lib/yambo +++ b/lib/yambo @@ -1 +1 @@ -Subproject commit 33fa12b140d04e7e8037217d92ba061f3bb36768 +Subproject commit 03036573a8f8e2df332ae632ac51964118c3f792 diff --git a/src/io/io_DIPOLES_PAR.F b/src/io/io_DIPOLES_PAR.F index 079691c22c..f48e9cdf8c 100644 --- a/src/io/io_DIPOLES_PAR.F +++ b/src/io/io_DIPOLES_PAR.F @@ -31,7 +31,7 @@ integer function io_DIPOLES(Dip,ID) & nf90_sync,write_is_on,io_unit,netcdf_call use IO_int, ONLY:io_connect,io_disconnect,io_variable_bulk,def_variable_bulk,io_header use DIPOLES, ONLY:DIP_spin,DIP_orbital, & -& compute_Orb_dipoles,compute_Spin_dipoles +& compute_Orb_rt_dipoles,compute_Orb_cd_dipoles,compute_Spin_dipoles use electrons, ONLY:n_spinor #if defined _RT use DIPOLES, ONLY:DIP_P_spinor @@ -133,8 +133,10 @@ integer function io_DIPOLES(Dip,ID) call DIP_alloc('DIP_P' ,(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) call DIP_alloc('DIP_v' ,(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) ! - if (compute_Orb_dipoles) & + if (compute_Orb_rt_dipoles) & & call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz,2/)) + if (compute_Orb_cd_dipoles) & + & call DIP_alloc('DIP_orbital',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz,1/)) if (compute_Spin_dipoles) & & call DIP_alloc('DIP_spin',(/3,Dip%ib_lim(2),Dip%ib(2),Dip%ib(1),Dip%ib_lim(1),PAR_K_scheme%nibz/)) #if defined _RT @@ -171,7 +173,7 @@ integer function io_DIPOLES(Dip,ID) if (i_fragment< 1) call def_variable_bulk(ID,trim(VAR_name),VAR_ID,DIP_size,SP,par_io_kind='independent') if (i_fragment>=1) call io_variable_bulk(ID,VAR_ID,C5=DIP_v(:,:,:,ik_mem:ik_mem,i_sp_pol:i_sp_pol),IPOS=DIP_ipos) ! - if (compute_Orb_dipoles) then + if (compute_Orb_rt_dipoles) then ! ! Itinerant magnetization ! @@ -189,6 +191,17 @@ integer function io_DIPOLES(Dip,ID) ! endif ! + if (compute_Orb_cd_dipoles) then + ! + ! Orbital magnetization + ! + VAR_ID=5 + VAR_name='DIP_orbital' + if (i_fragment< 1) call def_variable_bulk(ID,trim(VAR_name),VAR_ID,DIP_size,SP,par_io_kind='independent') + if (i_fragment>=1) call io_variable_bulk(ID,VAR_ID,C5=DIP_orbital(:,:,:,ik_mem:ik_mem,i_sp_pol:i_sp_pol,1),IPOS=DIP_ipos) + ! + endif + ! if (compute_Spin_dipoles) then ! ! Spin magntization From f163a38d7374c9c33563be8266eaade37a3fb2bb Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 10 May 2022 17:05:26 +0200 Subject: [PATCH 0267/1367] Fixed few bugs related to q-symmetry in EXCPH_optics --- src/exc-ph/EXCPH_X_phass.F | 2 +- src/exc-ph/EXCPH_optics.F | 2 +- src/exc-ph/Satellite_Simple.F | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index b92dc4caee..d72fc71a07 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -141,7 +141,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Calcualte the Satellite on the course q-grid ! - call Satellite_Simple(iq_bz,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) ! else ! diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 16f589dfa6..5716d3bdf6 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -68,7 +68,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! Load excitonic energies and residuals ! call EXCPH_load_L(1,X,'eigenvalues residuals','Lin') - BS_E_in(:)=BS_E(:) ! L_in can be different from L_out + BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out ! do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index be081eb542..f30e0b74c0 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -33,7 +33,7 @@ ! @param[out] Sat_absorption Satellite in absorption ! @param[out] Sat_emission Satellite in emission !! -subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) +subroutine Satellite_Simple(iq,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! use frequency, ONLY:w_samp use units, ONLY:HA2CMm1 @@ -51,12 +51,13 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) integer, intent(in) :: il,iq,i_alpha,i_beta complex(SP), intent(in) :: W complex(SP), intent(out) :: Sat_absorption, Sat_emission + type(bz_samp) :: q ! ! Work Space ! real(SP) :: PH_E,bose_factor,boltzm_factor complex(SP) :: pole,E_alpha - integer :: iq_db + integer :: iq_db,iq_ibz ! Sat_absorption=cZERO Sat_emission =cZERO @@ -75,7 +76,8 @@ subroutine Satellite_Simple(iq,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! ! Boltzman factor for the luminescence ! - boltzm_factor=boltzman_f(BS_all_E(i_beta,iq)-min_EXC_E) + iq_ibz = q%sstar(iq,1) + boltzm_factor=boltzman_f(BS_all_E(i_beta,iq_ibz)-min_EXC_E) ! pole=E_alpha+BS_Sat_E(il,i_beta,i_alpha) ! From ae0c906c813689af03c8fb9da6b6a0919db7ecf3 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 10 May 2022 20:02:05 +0200 Subject: [PATCH 0268/1367] Added 1/Nq normalization to satellite weights when computing X_phass --- src/exc-ph/EXCPH_X_phass.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index d72fc71a07..33ce80d50a 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -153,8 +153,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Add the satellites to the dielectric constant and luminescence ! - Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs *BS_R(i_alpha) - PL_ii(iw,1) =PL_ii(iw,1) +Sat_alpha_emiss*BS_R(i_alpha) + Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,1) =PL_ii(iw,1)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) ! enddo ! From 062391b3b703f7e9f6d5b90440d1a48a08b69fbe Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 14 May 2022 10:07:13 +0200 Subject: [PATCH 0269/1367] Version 5.1.0, Revision 21431, Hash ae0c906c8 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval.F modules/mod_EXCPH.F Changes: - [yambo_ph] Added extra ebug option for excph Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 3 ++- src/exc-ph/EXCPH_gkkp_eval.F | 19 +++++++++++++------ src/modules/mod_EXCPH.F | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 434886e0ff..76b3887519 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21428 -#define YAMBO_HASH "8b1b41502" +#define YAMBO_REVISION 21431 +#define YAMBO_HASH "ae0c906c8" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index a4096e9dd2..0e4b74af3f 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -55,7 +55,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) & EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & & BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free,DB_Q_map, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free,& -& l_const_elph,l_abs_elph,n_exc_in +& l_const_elph,l_abs_elph,l_abs_exc,n_exc_in use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -89,6 +89,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call parser('ConstElph',l_const_elph) call parser('AbsElph', l_abs_elph) + call parser('AbsExc', l_abs_exc) ! ! Build Q_map elph_branches_save =elph_branches diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index a1b7c07f59..316d6ad18d 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -40,7 +40,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,DB_Q_map,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& -& l_const_elph,l_abs_elph,BSS_eh_table_in +& l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in ! #include ! @@ -135,8 +135,12 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) ! - if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat(i_Hp,i_beta) + if (l_abs_exc) then + Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) + else + if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat(i_Hp,i_beta) + endif ! enddo ! @@ -159,9 +163,12 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) !ik_db=K_io_map(ik_bz) !elph_gkkp=GKKP%dVc(il,ic,icp,ik_db,1)/sqrt(2._SP*ph_E) endif - ! - if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat(i_Hp,i_beta) + if (l_abs_exc) then + Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) + else + if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat(i_Hp,i_beta) + endif ! enddo ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index d18ccbb32e..bb57e0cfd2 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -35,7 +35,7 @@ module EXCPH ! ! ... GKKP & EXC-PH Interaction ! - logical :: l_const_elph,l_abs_elph + logical :: l_const_elph,l_abs_elph,l_abs_exc complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: n_exc_in From 71868c87b96053849c1ae9a82c9ab74451317ba8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 14 May 2022 18:11:56 +0200 Subject: [PATCH 0270/1367] Version 5.1.0, Revision 21432, Hash 062391b3b MODIFIED * include/driver/version.h lib/yambo exc-ph/EXCPH_gkkp_driver.F Bugs: -Fixed bug #617 on RIM and BSE databases in EXCPH Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- lib/yambo | 2 +- src/exc-ph/EXCPH_gkkp_driver.F | 12 ++++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 76b3887519..c919fb44c6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21431 -#define YAMBO_HASH "ae0c906c8" +#define YAMBO_REVISION 21432 +#define YAMBO_HASH "062391b3b" diff --git a/lib/yambo b/lib/yambo index 33fa12b140..7e00b2cd49 160000 --- a/lib/yambo +++ b/lib/yambo @@ -1 +1 @@ -Subproject commit 33fa12b140d04e7e8037217d92ba061f3bb36768 +Subproject commit 7e00b2cd49bacd4640d60c490a7d86b33eb01380 diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 0e4b74af3f..8b57298df2 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -59,6 +59,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg + use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts ! #include ! @@ -68,8 +69,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Work Space ! - integer, external :: io_ELPH,io_EXCPH_gkkp - integer :: ID_gkkp,ID_exc_gkkp,io_err + integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM + integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID integer :: il,iq,i1,i_star,iq_bz,iq_s,iq_db,elph_branches_save(2) real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) @@ -84,6 +85,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Check if Lout and Lin are present ! and read their kind ! + ! Load RIM if present + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) + io_err=io_RIM(io_ID) + ! + if(io_err==0) call msg('sr','RIM found and loaded') + ! call EXCPH_load_L(1,X,'check','Lout') call EXCPH_load_L(1,X,'check','Lin') ! From ae4a46c771abe8c694ba719b07c8be0d1fe6b7ad Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 16 May 2022 13:19:23 +0200 Subject: [PATCH 0271/1367] Version 5.1.0, Revision 21433, Hash 71868c87b MODIFIED * config/m4/hdf5_f90.m4 configure include/driver/version.h Bugs: -Fixed bug in HDF5 configuration Additions: - Changes: - Patch sent by: Claudio Attaccalite --- config/m4/hdf5_f90.m4 | 175 +++++++++++++++++++++----------- configure | 209 +++++++++++++++++++++++++++------------ include/driver/version.h | 4 +- 3 files changed, 263 insertions(+), 125 deletions(-) diff --git a/config/m4/hdf5_f90.m4 b/config/m4/hdf5_f90.m4 index fafc42303b..2adfdf40cd 100644 --- a/config/m4/hdf5_f90.m4 +++ b/config/m4/hdf5_f90.m4 @@ -1,11 +1,10 @@ # - # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2021 the YAMBO team +# Copyright (C) 2000-2022 the YAMBO team # http://www.yambo-code.org # -# Authors (see AUTHORS file for details): AM, AF, DS +# Authors (see AUTHORS file for details): AM, AF, DS, CA # # This file is distributed under the terms of the GNU # General Public License. You can redistribute it and/or @@ -40,10 +39,10 @@ AC_ARG_WITH(hdf5_includedir,AC_HELP_STRING([--with-hdf5-includedir=], AC_ARG_ENABLE(hdf5_compression,AC_HELP_STRING([--enable-hdf5-compression], [Activate the HDF5 data compression. Default is no.])) # -# HDF5 SER IO +# HDF5 PAR IO # AC_ARG_ENABLE(hdf5_par_io,AC_HELP_STRING([--enable-hdf5-par-io], - [Enable to the HDF5 par I/O. Default is yes]),,enable_hdf5_par_io="yes") + [Enable the HDF5 parallel I/O. Default is yes]),,enable_hdf5_par_io="yes") # # HDF5 FOR P2Y (also requires parallel HDF5) # @@ -55,8 +54,13 @@ internal_hdf5="no" NETCDF_VER="v4" # if test "$mpibuild" = "yes" ; then - HDF5_OPT="--enable-parallel"; - IO_LIB_VER="parallel"; + if test x"$enable_hdf5_par_io" = "xno" ; then + HDF5_OPT="--disable-parallel"; + IO_LIB_VER="serial"; + else + HDF5_OPT="--enable-parallel"; + IO_LIB_VER="parallel"; + fi else HDF5_OPT="--disable-parallel"; IO_LIB_VER="serial"; @@ -89,11 +93,6 @@ if test x"$enable_hdf5_par_io" = "xno" ; then IO_LIB_VER="serial"; fi hdf5="no" # if test x"$enable_hdf5" = "xyes"; then - # - if test -d "$with_hdf5_libdir" ; then AC_MSG_CHECKING([for HDF5 in $with_hdf5_libdir]) ; - elif test -d "$with_hdf5_path" ; then AC_MSG_CHECKING([for HDF5 in $with_hdf5_path]) ; - elif test x"$with_hdf5_libs" != "x" ; then AC_MSG_CHECKING([for HDF5 using $with_hdf5_libs]) ; - fi # AC_LANG([Fortran]) # @@ -106,32 +105,110 @@ if test x"$enable_hdf5" = "xyes"; then if test -d "$with_hdf5_libdir" ; then try_hdf5_libdir=$with_hdf5_libdir ; fi if test -d "$with_hdf5_includedir" ; then try_hdf5_incdir=$with_hdf5_includedir ; fi # - if test x"$with_hdf5_libs" != "x" ; then try_HDF5_LIBS="$with_hdf5_libs" ; fi - # - if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi - # - if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi - # - save_libs="$LIBS" ; - save_fcflags="$FCFLAGS" ; - # - FCFLAGS="$try_HDF5_INCS $save_fcflags" ; - # - if test "$use_libz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lz" ; fi - if test "$use_libsz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lsz" ; fi - if test "$use_libm" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lm" ; fi - if test "$use_libdl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -ldl" ; fi - if test "$use_libcurl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lcurl"; fi - # - LIBS="$try_HDF5_LIBS" - # - AC_LINK_IFELSE(AC_LANG_PROGRAM([], [ - use hdf5 - implicit none - integer error - call h5open_f(error) - call h5close_f(error) - ]),[hdf5=yes], [hdf5=no]); + if test x"$with_hdf5_libs" != "x" ; then + # + AC_MSG_CHECKING([for HDF5 using $with_hdf5_libs]) ; + try_HDF5_LIBS="$with_hdf5_libs" ; + if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi + # + save_libs="$LIBS" ; + save_fcflags="$FCFLAGS" ; + # + FCFLAGS="$try_HDF5_INCS $save_fcflags" ; + LIBS="$try_HDF5_LIBS" ; + # + AC_LINK_IFELSE(AC_LANG_PROGRAM([], [ + use hdf5 + implicit none + integer error + call h5open_f(error) + call h5close_f(error) + ]),[hdf5=yes], [hdf5=no]); + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # + else + # + # Automatic detection of hdf5 libs copied from QE + # + AC_MSG_CHECKING([for HDF5 using h5pfc/h5fc system compilers]) ; + # + if test -e $with_hdf5_path/bin/h5pfc; then + h5pfc=$with_hdf5_path/bin/h5pfc; + elif command -v h5pfc > /dev/null; then + h5pfc=$(command -v h5pfc) + fi + # + if test -e $with_hdf5_path/bin/h5fc ; then + h5fc=$with_hdf5_path/bin/h5fc; + elif command -v h5fc > /dev/null; then + h5fc=$(command -v h5fc) + fi + # + if test -e $h5pfc; then + try_HDF5_LIBS=`$h5pfc -show | awk -F'-L' '{@S|@1=""; for (i=2; i<=NF;i++) @S|@i="-L"@S|@i; print @S|@0}'` + try_hdf5_incdir=`$h5pfc -show | awk -F'-I' '{print @S|@2}' | awk '{print @S|@1}'` + IO_LIB_VER="parallel"; + elif test -e $h5fc; then + try_HDF5_LIBS=`$h5fc -show | awk -F'-L' '{@S|@1=""; for (i=2; i<=NF;i++) @S|@i="-L"@S|@i; print @S|@0}'` + try_hdf5_incdir=`$h5fc -show | awk -F'-I' '{print @S|@2}' | awk '{print @S|@1}'` + IO_LIB_VER="serial"; + enable_hdf5_par_io="no"; + fi + # + try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; + # + save_libs="$LIBS" ; + save_fcflags="$FCFLAGS" ; + # + FCFLAGS="$try_HDF5_INCS $save_fcflags" ; + LIBS="$try_HDF5_LIBS" ; + # + AC_LINK_IFELSE(AC_LANG_PROGRAM([], [ + use hdf5 + implicit none + integer error + call h5open_f(error) + call h5close_f(error) + ]),[hdf5=yes], [hdf5=no]); + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # + if test "x$hdf5" = xno; then + AC_MSG_RESULT([no]) ; + AC_MSG_CHECKING([for HDF5 using automatic library list]) ; + if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi + if test "$use_libz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lz" ; fi + if test "$use_libsz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lsz" ; fi + if test "$use_libm" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lm" ; fi + if test "$use_libdl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -ldl" ; fi + if test "$use_libcurl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lcurl"; fi + if test x"$try_hdf5_incdir" == "x" ; then + if test -d "$with_hdf5_path/include/" ; then $try_hdf5_incdir="$with_hdf5_path/include/"; fi + fi + # + try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; + # + save_libs="$LIBS" ; + save_fcflags="$FCFLAGS" ; + # + FCFLAGS="$try_HDF5_INCS $save_fcflags" ; + LIBS="$try_HDF5_LIBS" ; + # + AC_LINK_IFELSE(AC_LANG_PROGRAM([], [ + use hdf5 + implicit none + integer error + call h5open_f(error) + call h5close_f(error) + ]),[hdf5=yes], [hdf5=no]); + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + fi + fi # if test "x$hdf5" = xyes; then HDF5_LIBS="$try_HDF5_LIBS" ; @@ -148,10 +225,8 @@ if test x"$enable_hdf5" = "xyes"; then IO_LIB_VER="unknown" fi # - FCFLAGS="$save_fcflags" ; - LIBS="$save_libs" ; - # if test "x$hdf5" = xno; then + AC_MSG_RESULT([no]) ; if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then AC_MSG_RESULT([no]) ; fi # AC_MSG_CHECKING([for internal HDF5 library]); @@ -224,22 +299,6 @@ elif test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" ; then # fi # -# NETCDF-HDF5 PAR IO or HDF5-DATA COMPRESSION (the two are exclusive) -# -if test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" && test x"$enable_hdf5" = "xyes" && test x"$enable_hdf5_par_io" = "xyes" ; then - def_netcdf="${def_netcdf} -D_PAR_IO"; - enable_hdf5_compression="no"; - parallel_io="X"; -elif test x"$netcdf" = "xyes" && test x"$enable_pnetcdf" = "xyes" ; then - def_netcdf="${def_netcdf} -D_PAR_IO"; - compile_pnetcdf=${compile_netcdf}; - enable_hdf5_compression="no"; - parallel_io="X"; -elif test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" && test x"$enable_hdf5" = "xyes" && test x"$enable_hdf5_compression" = "xyes" ; then - def_netcdf="${def_netcdf} -D_HDF5_COMPRESSION"; - parallel_io="COMPRESS-HDF5"; -fi -# AC_SUBST(HDF5_LIBS) AC_SUBST(HDF5_INCS) AC_SUBST(HDF5_OPT) @@ -247,8 +306,6 @@ AC_SUBST(IO_LIB_VER) AC_SUBST(netcdf) AC_SUBST(hdf5) AC_SUBST(def_netcdf) -AC_SUBST(compile_netcdf) -AC_SUBST(compile_pnetcdf) AC_SUBST(compile_hdf5) AC_SUBST(internal_netcdf) AC_SUBST(internal_hdf5) diff --git a/configure b/configure index 784b143a0a..eb50427d42 100755 --- a/configure +++ b/configure @@ -685,6 +685,8 @@ enable_netcdf_par_io enable_netcdf_v3 enable_netcdf_classic parallel_io +compile_pnetcdf +compile_netcdf PNETCDF_INCS PNETCDF_LIBS NETCDFF_INCS @@ -697,8 +699,6 @@ enable_hdf5_p2y_support internal_hdf5 internal_netcdf compile_hdf5 -compile_pnetcdf -compile_netcdf def_netcdf hdf5 netcdf @@ -1642,7 +1642,7 @@ Optional Features: --enable-par-linalg Use parallel linear algebra. Default is no --enable-hdf5-compression Activate the HDF5 data compression. Default is no. - --enable-hdf5-par-io Enable to the HDF5 par I/O. Default is yes + --enable-hdf5-par-io Enable the HDF5 parallel I/O. Default is yes --enable-hdf5-p2y-support Activate HDF5 support in p2y. Default is no unless parallel HDF5 libs are linked. @@ -9689,13 +9689,12 @@ url_ydb=https://github.com/yambo-code/ydb.git # - # from http://www.arsc.edu/support/news/HPCnews/HPCnews249.shtml # -# Copyright (C) 2000-2021 the YAMBO team +# Copyright (C) 2000-2022 the YAMBO team # http://www.yambo-code.org # -# Authors (see AUTHORS file for details): AM, AF, DS +# Authors (see AUTHORS file for details): AM, AF, DS, CA # # This file is distributed under the terms of the GNU # General Public License. You can redistribute it and/or @@ -9945,7 +9944,7 @@ fi cd lib/yambo YDRI_VERSION="1" -YDRI_SUBVERSION="0" +YDRI_SUBVERSION="1" YDRI_PATCHLEVEL="0" @@ -12801,7 +12800,7 @@ if test "${enable_hdf5_compression+set}" = set; then : fi # -# HDF5 SER IO +# HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. if test "${enable_hdf5_par_io+set}" = set; then : @@ -12824,8 +12823,13 @@ internal_hdf5="no" NETCDF_VER="v4" # if test "$mpibuild" = "yes" ; then - HDF5_OPT="--enable-parallel"; - IO_LIB_VER="parallel"; + if test x"$enable_hdf5_par_io" = "xno" ; then + HDF5_OPT="--disable-parallel"; + IO_LIB_VER="serial"; + else + HDF5_OPT="--enable-parallel"; + IO_LIB_VER="parallel"; + fi else HDF5_OPT="--disable-parallel"; IO_LIB_VER="serial"; @@ -13154,14 +13158,6 @@ if test x"$enable_hdf5_par_io" = "xno" ; then IO_LIB_VER="serial"; fi hdf5="no" # if test x"$enable_hdf5" = "xyes"; then - # - if test -d "$with_hdf5_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 in $with_hdf5_libdir" >&5 -$as_echo_n "checking for HDF5 in $with_hdf5_libdir... " >&6; } ; - elif test -d "$with_hdf5_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 in $with_hdf5_path" >&5 -$as_echo_n "checking for HDF5 in $with_hdf5_path... " >&6; } ; - elif test x"$with_hdf5_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 -$as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; - fi # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -13178,33 +13174,132 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -d "$with_hdf5_libdir" ; then try_hdf5_libdir=$with_hdf5_libdir ; fi if test -d "$with_hdf5_includedir" ; then try_hdf5_incdir=$with_hdf5_includedir ; fi # - if test x"$with_hdf5_libs" != "x" ; then try_HDF5_LIBS="$with_hdf5_libs" ; fi - # - if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi - # - if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi - # - save_libs="$LIBS" ; - save_fcflags="$FCFLAGS" ; - # - FCFLAGS="$try_HDF5_INCS $save_fcflags" ; - # - if test "$use_libz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lz" ; fi - if test "$use_libsz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lsz" ; fi - if test "$use_libm" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lm" ; fi - if test "$use_libdl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -ldl" ; fi - if test "$use_libcurl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lcurl"; fi - # - LIBS="$try_HDF5_LIBS" - # - cat > conftest.$ac_ext <<_ACEOF + if test x"$with_hdf5_libs" != "x" ; then + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 +$as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; + try_HDF5_LIBS="$with_hdf5_libs" ; + if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi + # + save_libs="$LIBS" ; + save_fcflags="$FCFLAGS" ; + # + FCFLAGS="$try_HDF5_INCS $save_fcflags" ; + LIBS="$try_HDF5_LIBS" ; + # + cat > conftest.$ac_ext <<_ACEOF + program main + + use hdf5 + implicit none + integer error + call h5open_f(error) + call h5close_f(error) + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + hdf5=yes +else + hdf5=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext; + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # + else + # + # Automatic detection of hdf5 libs copied from QE + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + # + if test -e $with_hdf5_path/bin/h5pfc; then + h5pfc=$with_hdf5_path/bin/h5pfc; + elif command -v h5pfc > /dev/null; then + h5pfc=$(command -v h5pfc) + fi + # + if test -e $with_hdf5_path/bin/h5fc ; then + h5fc=$with_hdf5_path/bin/h5fc; + elif command -v h5fc > /dev/null; then + h5fc=$(command -v h5fc) + fi + # + if test -e $h5pfc; then + try_HDF5_LIBS=`$h5pfc -show | awk -F'-L' '{$1=""; for (i=2; i<=NF;i++) $i="-L"$i; print $0}'` + try_hdf5_incdir=`$h5pfc -show | awk -F'-I' '{print $2}' | awk '{print $1}'` + IO_LIB_VER="parallel"; + elif test -e $h5fc; then + try_HDF5_LIBS=`$h5fc -show | awk -F'-L' '{$1=""; for (i=2; i<=NF;i++) $i="-L"$i; print $0}'` + try_hdf5_incdir=`$h5fc -show | awk -F'-I' '{print $2}' | awk '{print $1}'` + IO_LIB_VER="serial"; + enable_hdf5_par_io="no"; + fi + # + try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; + # + save_libs="$LIBS" ; + save_fcflags="$FCFLAGS" ; + # + FCFLAGS="$try_HDF5_INCS $save_fcflags" ; + LIBS="$try_HDF5_LIBS" ; + # + cat > conftest.$ac_ext <<_ACEOF + program main + + use hdf5 + implicit none + integer error + call h5open_f(error) + call h5close_f(error) + + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + hdf5=yes +else + hdf5=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext; + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # + if test "x$hdf5" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; + if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi + if test "$use_libz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lz" ; fi + if test "$use_libsz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lsz" ; fi + if test "$use_libm" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lm" ; fi + if test "$use_libdl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -ldl" ; fi + if test "$use_libcurl" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lcurl"; fi + if test x"$try_hdf5_incdir" == "x" ; then + if test -d "$with_hdf5_path/include/" ; then $try_hdf5_incdir="$with_hdf5_path/include/"; fi + fi + # + try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; + # + save_libs="$LIBS" ; + save_fcflags="$FCFLAGS" ; + # + FCFLAGS="$try_HDF5_INCS $save_fcflags" ; + LIBS="$try_HDF5_LIBS" ; + # + cat > conftest.$ac_ext <<_ACEOF program main - use hdf5 - implicit none - integer error - call h5open_f(error) - call h5close_f(error) + use hdf5 + implicit none + integer error + call h5open_f(error) + call h5close_f(error) end _ACEOF @@ -13215,6 +13310,11 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + fi + fi # if test "x$hdf5" = xyes; then HDF5_LIBS="$try_HDF5_LIBS" ; @@ -13233,10 +13333,9 @@ $as_echo "yes - serial lib found" >&6; } ; IO_LIB_VER="unknown" fi # - FCFLAGS="$save_fcflags" ; - LIBS="$save_libs" ; - # if test "x$hdf5" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi # @@ -13314,24 +13413,6 @@ elif test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" ; then # fi # -# NETCDF-HDF5 PAR IO or HDF5-DATA COMPRESSION (the two are exclusive) -# -if test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" && test x"$enable_hdf5" = "xyes" && test x"$enable_hdf5_par_io" = "xyes" ; then - def_netcdf="${def_netcdf} -D_PAR_IO"; - enable_hdf5_compression="no"; - parallel_io="X"; -elif test x"$netcdf" = "xyes" && test x"$enable_pnetcdf" = "xyes" ; then - def_netcdf="${def_netcdf} -D_PAR_IO"; - compile_pnetcdf=${compile_netcdf}; - enable_hdf5_compression="no"; - parallel_io="X"; -elif test x"$netcdf" = "xyes" && test x"$hdf5" = "xyes" && test x"$enable_hdf5" = "xyes" && test x"$enable_hdf5_compression" = "xyes" ; then - def_netcdf="${def_netcdf} -D_HDF5_COMPRESSION"; - parallel_io="COMPRESS-HDF5"; -fi -# - - diff --git a/include/driver/version.h b/include/driver/version.h index c919fb44c6..b5805f1e57 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21432 -#define YAMBO_HASH "062391b3b" +#define YAMBO_REVISION 21433 +#define YAMBO_HASH "71868c87b" From f369d1e4905248f4bb991c506418e1a664c45cf6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 16 May 2022 15:05:43 +0200 Subject: [PATCH 0272/1367] Version 5.1.0, Revision 21725, Hash 7ca90fc4d MODIFIED * config/m4/hdf5_f90.m4 config/m4/netcdf_f90.m4 config/version/version.m4 configure include/driver/version.h Bugs: -Fixed HDF5 configuration (from the bug-fixes) Patch sent by: Claudio Attaccalite --- config/m4/hdf5_f90.m4 | 18 ++++++++++++++---- config/m4/netcdf_f90.m4 | 2 +- config/version/version.m4 | 6 +++--- configure | 40 ++++++++++++++++++++++++--------------- include/driver/version.h | 4 ++-- 5 files changed, 45 insertions(+), 25 deletions(-) diff --git a/config/m4/hdf5_f90.m4 b/config/m4/hdf5_f90.m4 index 2adfdf40cd..28889d1096 100644 --- a/config/m4/hdf5_f90.m4 +++ b/config/m4/hdf5_f90.m4 @@ -178,8 +178,18 @@ if test x"$enable_hdf5" = "xyes"; then # if test "x$hdf5" = xno; then AC_MSG_RESULT([no]) ; - AC_MSG_CHECKING([for HDF5 using automatic library list]) ; - if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi + AC_MSG_CHECKING([for HDF5 using automatic library list]) ; + # + # re-define lib and inc dirs + # + if test -d "$with_hdf5_path" ; then + try_hdf5_libdir=$with_hdf5_path/lib + try_hdf5_incdir=$with_hdf5_path/include + fi + if test -d "$with_hdf5_libdir" ; then try_hdf5_libdir=$with_hdf5_libdir ; fi + if test -d "$with_hdf5_includedir" ; then try_hdf5_incdir=$with_hdf5_includedir ; fi + # + if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi if test "$use_libz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lz" ; fi if test "$use_libsz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lsz" ; fi if test "$use_libm" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lm" ; fi @@ -237,7 +247,7 @@ if test x"$enable_hdf5" = "xyes"; then NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # - HDF5_LIBS="${NETCDF_HDF5_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="${NETCDF_HDF5_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # hdf5=yes ; @@ -250,7 +260,7 @@ if test x"$enable_hdf5" = "xyes"; then elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # IO_LIB_VER="parallel"; - HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; AC_MSG_RESULT([already compiled (using parallel version)]) ; # diff --git a/config/m4/netcdf_f90.m4 b/config/m4/netcdf_f90.m4 index a3f9479e0d..c1d8aa561f 100644 --- a/config/m4/netcdf_f90.m4 +++ b/config/m4/netcdf_f90.m4 @@ -325,7 +325,7 @@ if test x"$enable_hdf5" = "xyes"; then elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # IO_LIB_VER="parallel"; - HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; diff --git a/config/version/version.m4 b/config/version/version.m4 index dc9272a213..3d10dc7fd1 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21550 h.0e957677a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21551 h.ae4a46c77, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21550" -SHASH="0e957677a" +SREVISION="21551" +SHASH="ae4a46c77" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/configure b/configure index 7667c7128e..84cf2027fe 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.21550 h.0e957677a. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.21558 h.2b6c4b0bf. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.21550 h.0e957677a' -PACKAGE_STRING='Yambo 5.1.0 r.21550 h.0e957677a' +PACKAGE_VERSION='5.1.0 r.21558 h.2b6c4b0bf' +PACKAGE_STRING='Yambo 5.1.0 r.21558 h.2b6c4b0bf' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1543,7 +1543,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.21550 h.0e957677a to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.21558 h.2b6c4b0bf to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1609,7 +1609,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.21550 h.0e957677a:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.21558 h.2b6c4b0bf:";; esac cat <<\_ACEOF @@ -1816,7 +1816,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.21550 h.0e957677a +Yambo configure 5.1.0 r.21558 h.2b6c4b0bf generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2495,7 +2495,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.21550 h.0e957677a, which was +It was created by Yambo $as_me 5.1.0 r.21558 h.2b6c4b0bf, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2846,8 +2846,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21550" -SHASH="0e957677a" +SREVISION="21558" +SHASH="2b6c4b0bf" @@ -13305,7 +13305,17 @@ rm -f core conftest.err conftest.$ac_objext \ $as_echo "no" >&6; } ; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 $as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; - if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi + # + # re-define lib and inc dirs + # + if test -d "$with_hdf5_path" ; then + try_hdf5_libdir=$with_hdf5_path/lib + try_hdf5_incdir=$with_hdf5_path/include + fi + if test -d "$with_hdf5_libdir" ; then try_hdf5_libdir=$with_hdf5_libdir ; fi + if test -d "$with_hdf5_includedir" ; then try_hdf5_incdir=$with_hdf5_includedir ; fi + # + if test -d "$try_hdf5_libdir" ; then try_HDF5_LIBS="-L$try_hdf5_libdir -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; fi if test "$use_libz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lz" ; fi if test "$use_libsz" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lsz" ; fi if test "$use_libm" = "yes"; then try_HDF5_LIBS="$try_HDF5_LIBS -lm" ; fi @@ -13379,7 +13389,7 @@ $as_echo_n "checking for internal HDF5 library... " >&6; }; NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # - HDF5_LIBS="${NETCDF_HDF5_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="${NETCDF_HDF5_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # hdf5=yes ; @@ -13393,7 +13403,7 @@ $as_echo "already compiled" >&6; } ; elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # IO_LIB_VER="parallel"; - HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 $as_echo "already compiled (using parallel version)" >&6; } ; @@ -13850,7 +13860,7 @@ $as_echo "already compiled" >&6; } ; elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # IO_LIB_VER="parallel"; - HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; @@ -15601,7 +15611,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.21550 h.0e957677a, which was +This file was extended by Yambo $as_me 5.1.0 r.21558 h.2b6c4b0bf, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15663,7 +15673,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.21550 h.0e957677a +Yambo config.status 5.1.0 r.21558 h.2b6c4b0bf configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/include/driver/version.h b/include/driver/version.h index 67a92f9560..47bcd6ef19 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21551 -#define YAMBO_HASH "ae4a46c77" +#define YAMBO_REVISION 21725 +#define YAMBO_HASH "7ca90fc4d" From 97bf0d27ec87e4378171dbd69163ba7680009663 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 10:38:03 +0200 Subject: [PATCH 0273/1367] Version 5.1.0, Revision 21726, Hash f369d1e49 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Bugs: -BSqpts was not allocated, fixed Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 47bcd6ef19..6f16113966 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21725 -#define YAMBO_HASH "7ca90fc4d" +#define YAMBO_REVISION 21726 +#define YAMBO_HASH "f369d1e49" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 791f86b080..3d80202e14 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -46,7 +46,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use parser_m, ONLY:parser use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig - use BS, ONLY:BS_H_dim,BS_bands,BS_res_ares_n_mat,BS_K_dim + use BS, ONLY:BS_H_dim,BS_bands,BS_res_ares_n_mat,BS_K_dim,BSqpts use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END @@ -271,6 +271,7 @@ subroutine BSE_alloc() YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) YAMBO_ALLOC(BS_E,(BSS_n_eig)) YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) + YAMBO_ALLOC(BSqpts,(3,q%nibz)) ! YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) @@ -302,6 +303,7 @@ subroutine BSE_free YAMBO_FREE(BSS_eh_table_m1_in) YAMBO_FREE(BS_E) YAMBO_FREE(k_plus_q_table) + YAMBO_FREE(BSqpts) end subroutine BSE_free ! subroutine get_excph_q_momenta() From d2cc03e080779339c2a34d7b3db1d250fe252700 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 10:40:27 +0200 Subject: [PATCH 0274/1367] Version 5.1.0, Revision 21727, Hash 97bf0d27e MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F Bugs: -Fixed output due to merging Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6f16113966..6af85078f9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21726 -#define YAMBO_HASH "f369d1e49" +#define YAMBO_REVISION 21727 +#define YAMBO_HASH "97bf0d27e" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 4320658f90..b8032202cd 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -153,13 +153,13 @@ subroutine print_output() ! output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1)), & & aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2))/) - call msg('o eps_ph','',output_data,INDENT=-2,USE_TABS=.true.) + call msg('o eps_bse','',output_data,INDENT=-2,USE_TABS=.true.) ! ! Luminescence ! output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & & aimag(PL_ii(iw,2)),real(PL_ii(iw,2))/) - call msg('o pl_ph','',output_data,INDENT=-2,USE_TABS=.true.) + call msg('o pl_bse','',output_data,INDENT=-2,USE_TABS=.true.) ! enddo ! From 775ec43cb517a886181a16c9dd0110498e353148 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 11:06:28 +0200 Subject: [PATCH 0275/1367] Version 5.1.0, Revision 21728, Hash d2cc03e08 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Better message Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6af85078f9..81e33dfc53 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21727 -#define YAMBO_HASH "97bf0d27e" +#define YAMBO_REVISION 21728 +#define YAMBO_HASH "d2cc03e08" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 33ce80d50a..6b829ef45d 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -189,6 +189,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) min_E=min_EXC_E if(use_PH_DbGd) min_E=min_EXC_E_DbGd ! + call live_timing('Epsilon',wv%n_freqs) do iw=1,wv%n_freqs ! W=wv%p(iw) @@ -210,8 +211,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! enddo ! + call live_timing(steps=1) + ! enddo ! + call live_timing( ) + ! ! Eps(w)=1._SP - X(w) in agreement with definition in src/bse/ ! Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) From 64861512f111be0860c098dee295bb0768256e70 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 11:14:37 +0200 Subject: [PATCH 0276/1367] Version 5.1.0, Revision 21729, Hash 775ec43cb MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F Bugs: -Fixed output files Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 81e33dfc53..db02928ff9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21728 -#define YAMBO_HASH "d2cc03e08" +#define YAMBO_REVISION 21729 +#define YAMBO_HASH "775ec43cb" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index b8032202cd..28784e7692 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -140,10 +140,15 @@ subroutine print_output() ! ! call X_write_q_plus_G(1,(/0._SP,0._SP,0._SP/),1) ! - call msg('o eps_ph pl_ph','# EXCITON PHONON') - call msg('o eps_ph pl_ph','# Exciton_states :',EXCPH_states,INDENT=0) - call msg('o eps_ph pl_ph','# EXciton sum :',EXCPH_sum,INDENT=0) - call msg('o eps_ph pl_ph','#') + call msg('o eps_bse pl_bse','# EXCITON PHONON') + call msg('o eps_bse pl_bse','# Exciton_states :',EXCPH_states,INDENT=0) + call msg('o eps_bse pl_bse','# EXciton sum :',EXCPH_sum,INDENT=0) + call msg('o eps_bse pl_bse','#') + call msg('o eps_bse','# E[1] [eV] Im(eps_ph)' & + //' Re(eps_bse) Im(eps) Re(eps)') + call msg('o pl_ph' ,'# E[1] [eV] Im(pl_ph) ' & + //' Re(pl_bse) Im(pl) Re(pl)') + call msg('o eps_bse pl_bse','#') ! ! Write output on file ! From 3be34c2b5d624b447a86b84334a1e948c2043d07 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 11:16:11 +0200 Subject: [PATCH 0277/1367] Version 5.1.0, Revision 21730, Hash 64861512f MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Better output message Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index db02928ff9..aa8f276bb9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21729 -#define YAMBO_HASH "775ec43cb" +#define YAMBO_REVISION 21730 +#define YAMBO_HASH "64861512f" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 6b829ef45d..1cede6aff4 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -176,10 +176,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) EXCPH_Renorm_PL_PH_abs= EXCPH_Renorm_PL_PH_abs/real(q%nbz,SP) ! call msg('sr','Renormalization factors at finite temperature [Absorption]:') + call msg('sr','[ph-emission] [ph-absorption]') do i_alpha=EXCPH_states(1),EXCPH_states(2) call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm(i_alpha),EXCPH_Renorm_PH_abs(i_alpha)/)) enddo call msg('sr','Renormalization factors at finite temperature [Emission]:') + call msg('sr','[ph-emission] [ph-absorption]') do i_alpha=EXCPH_states(1),EXCPH_states(2) call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm_PL(i_alpha),EXCPH_Renorm_PL_PH_abs(i_alpha)/)) enddo From 60bbe17d78ef134bbf5a9c8dfc129d7295c6cbde Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 11:21:10 +0200 Subject: [PATCH 0278/1367] Version 5.1.0, Revision 21731, Hash 3be34c2b5 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Better IO Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index aa8f276bb9..7ae7bfcca6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21730 -#define YAMBO_HASH "64861512f" +#define YAMBO_REVISION 21731 +#define YAMBO_HASH "3be34c2b5" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 1cede6aff4..bfd8bad72d 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -176,14 +176,14 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) EXCPH_Renorm_PL_PH_abs= EXCPH_Renorm_PL_PH_abs/real(q%nbz,SP) ! call msg('sr','Renormalization factors at finite temperature [Absorption]:') - call msg('sr','[ph-emission] [ph-absorption]') + call msg('sr',' [ph-emission] [ph-absorption]') do i_alpha=EXCPH_states(1),EXCPH_states(2) - call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm(i_alpha),EXCPH_Renorm_PH_abs(i_alpha)/)) + call msg('sr','Exciton '//trim(intc(i_alpha))//': ',(/EXCPH_Renorm(i_alpha),EXCPH_Renorm_PH_abs(i_alpha)/)) enddo call msg('sr','Renormalization factors at finite temperature [Emission]:') - call msg('sr','[ph-emission] [ph-absorption]') + call msg('sr',' [ph-emission] [ph-absorption]') do i_alpha=EXCPH_states(1),EXCPH_states(2) - call msg('sr','Exciton '//intc(i_alpha)//': ',(/EXCPH_Renorm_PL(i_alpha),EXCPH_Renorm_PL_PH_abs(i_alpha)/)) + call msg('sr','Exciton '//trim(intc(i_alpha))//': ',(/EXCPH_Renorm_PL(i_alpha),EXCPH_Renorm_PL_PH_abs(i_alpha)/)) enddo ! ! The term without satellites From c9e1bfb26a2e3b4c8b6d8edc57731efd61623316 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 18 May 2022 22:18:19 +0200 Subject: [PATCH 0279/1367] Version 5.1.0, Revision 21732, Hash 60bbe17d7 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F interface/INIT_activate.F interface/INIT_load.F modules/mod_EXCPH.F Additions: -New flag to check Double-grid DbGdPHonly Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 7 ++----- src/exc-ph/EXCPH_optics.F | 16 +++++++++++++++- src/exc-ph/Satellite_DbGrid.F | 19 ++++++++++++++----- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 2 +- src/modules/mod_EXCPH.F | 5 +++++ 7 files changed, 40 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7ae7bfcca6..89dfb6cfc2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21731 -#define YAMBO_HASH "3be34c2b5" +#define YAMBO_REVISION 21732 +#define YAMBO_HASH "60bbe17d7" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index bfd8bad72d..2451960045 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -45,7 +45,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,BS_Sat_W_DG,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & -& BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,DB_Q_map +& BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,DB_Q_map, & +& l_DbGd_WEIGHTs use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,ph_modes,Q_io_map use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset @@ -53,7 +54,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc - use parser_m, ONLY:parser ! #include ! @@ -66,13 +66,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss real(SP) :: min_E,exc_E,E_alpha,PH_E integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - logical :: l_DbGd_WEIGHTs integer :: iq_fg,iq_idx,iq_db integer :: elph_branches_save(2) integer, external :: io_EXCPH_gkkp,io_ELPH ! - call parser('DbGdWEIGHTs',l_DbGd_WEIGHTs) - ! min_pos =minloc(BS_all_E(1,:)) min_EXC_E=minval(BS_all_E(1,:)) ! diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 28784e7692..7d6b5f0d2c 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -32,9 +32,11 @@ subroutine EXCPH_optics(E,k,q,X,wv) use X_m, ONLY:X_t use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,free_EXC,alloc_EXC +& BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,free_EXC,alloc_EXC, & +& l_DbGd_PH_only,l_DbGd_WEIGHTs use ELPH, ONLY:use_PH_DbGd,ph_modes use frequency, ONLY:w_samp + use parser_m, ONLY:parser ! #include ! @@ -88,6 +90,9 @@ subroutine EXCPH_optics(E,k,q,X,wv) call EXCPH_double_grid_setup(q) ! dbgd_string='' + ! + call msg('rs','Double-grid :',use_PH_DbGd) + ! if(use_PH_DbGd) then dbgd_string='DbGd' max_filling=maxval(q%FGbz%N_mapped)+1 ! max number of tilde q around each q-point include the q itself @@ -95,6 +100,15 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(ph_modes,EXCPH_sum(2),EXCPH_states(2),max_filling)) BS_Sat_W_DG =rZERO BS_Sat_W_DG_PH_abs=rZERO + ! + ! Check double-grid flags + ! + call parser('DbGdWEIGHTs',l_DbGd_WEIGHTs) + call parser('DbGdOnlyPh', l_DbGd_PH_only) + ! + call msg('rs','Double-grid for satellites :',l_DbGd_WEIGHTs) + call msg('rs','Double-grid only for phonons :',l_DbGd_PH_only) + ! endif ! ! Frequencies and damping setup diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 030e55505f..3a05ee93ad 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -38,8 +38,8 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp use pars, ONLY:SP,cZERO,rZERO - use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd, & -& BS_Sat_W_DG,BS_Sat_W_DG_PH_abs + use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,BS_Sat_E, & +& BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,l_DbGd_PH_only,BS_Sat_E_PH_abs use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq use functions, ONLY:bose_f,boltzman_f ! @@ -109,9 +109,18 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss boltzm_factor=boltzman_f(E_beta-min_EXC_E_DbGd) ! ! Evaluate BS_Sat energies in the double-grid - ! - BS_Sat_E_DbGd =E_beta-BS_E_in(i_alpha)+ph_E - BS_Sat_E_DbGd_PH_abs=E_beta-BS_E_in(i_alpha)-ph_E + ! + if(l_DbGd_PH_only) then + ! + BS_Sat_E_DbGd =BS_Sat_E(il,i_beta,i_alpha) + BS_Sat_E_DbGd_PH_abs=BS_Sat_E_PH_abs(il,i_beta,i_alpha) + ! + else + ! + BS_Sat_E_DbGd =E_beta-BS_E_in(i_alpha)+ph_E + BS_Sat_E_DbGd_PH_abs=E_beta-BS_E_in(i_alpha)-ph_E + ! + endif ! pole=E_alpha+BS_Sat_E_DbGd ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 3395dfe66a..9ee91c3a60 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph NoMatrxEl LDamping') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DbGdOnlyPh NoMatrxEl LDamping') if (l_EXCPH_optics) & & call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DbGdWEIGHTs EnRngeXd DmRngeXd ETStpsXd') ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 3448bfd73f..2a6e5553bf 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -669,7 +669,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) - call it('f',defs,'DiagExcph' , '[EXCPH] Use only Diagonal Exciton-phonon matrix elements') + call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization',verb_level=V_ph) call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index bb57e0cfd2..f2dc4a08de 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -101,6 +101,11 @@ module EXCPH ! integer, allocatable :: DB_Q_map(:) ! + ! Control flags + ! + logical :: l_DbGd_WEIGHTs ! Double-Grid for Satellite weights + logical :: l_DbGd_PH_only ! Double-Grid only for phonon energies + ! contains ! subroutine Sat_alloc() From 563e0c7a71d6d43aaa6cdcc39efabbe40c508b93 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 12:11:11 +0200 Subject: [PATCH 0280/1367] Version 5.1.0, Revision 21733, Hash c9e1bfb26 MODIFIED * config/version/version.m4 include/driver/version.h interface/INIT_activate.F interface/INIT_load.F Additions: -Fixed flag positions in input Changes: - Patch sent by: Claudio Attaccalite --- config/version/version.m4 | 6 +++--- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 4 ++-- src/interface/INIT_load.F | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index 3d10dc7fd1..ddf3a87fed 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21551 h.ae4a46c77, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21725 h.7ca90fc4d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21551" -SHASH="ae4a46c77" +SREVISION="21725" +SHASH="7ca90fc4d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/include/driver/version.h b/include/driver/version.h index 89dfb6cfc2..31e433be6b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21732 -#define YAMBO_HASH "60bbe17d7" +#define YAMBO_REVISION 21733 +#define YAMBO_HASH "c9e1bfb26" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 9ee91c3a60..b01a87d1b0 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,9 +457,9 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp DbGdOnlyPh NoMatrxEl LDamping') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl LDamping') if (l_EXCPH_optics) & -& call initactivate(1,'BoseTemp ElPhModes EXCTemp DiagExcph DbGdWEIGHTs EnRngeXd DmRngeXd ETStpsXd') +& call initactivate(1,'BoseTemp ElPhModes EXCTemp DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') ! #endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 2a6e5553bf..4fc9342046 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -671,7 +671,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') - call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization',verb_level=V_ph) + call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) ! ! GPL_EXCLUDE_START From 3f22e70a459d6f6b8fb58f6dc381f6f7a687ffa2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 12:56:09 +0200 Subject: [PATCH 0281/1367] Version 5.1.0, Revision 21734, Hash 563e0c7a7 MODIFIED * include/driver/version.h Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 31e433be6b..4d73075390 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21733 -#define YAMBO_HASH "c9e1bfb26" +#define YAMBO_REVISION 21735 +#define YAMBO_HASH "563e0c7a7" From 3ee4e41ccdf4f6b1b0a5d38868da911dff212180 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 12:56:17 +0200 Subject: [PATCH 0282/1367] Version 5.1.0, Revision 21735, Hash 3f22e70a4 MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F Bugs: -Fixed possible bug with Db-Grid thanks to Pierre and Davide Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_DbGrid.F | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4d73075390..750f9ffdc8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21735 -#define YAMBO_HASH "563e0c7a7" +#define YAMBO_REVISION 21736 +#define YAMBO_HASH "3f22e70a4" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 3a05ee93ad..1573447182 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -54,7 +54,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! real(SP) :: PH_E,E_alpha,boltzm_factor,weight_dbgd,E_beta,BS_ave_W,BS_ave_W_PH_abs,bose_factor complex(SP) :: BS_Sat_E_DbGd,BS_Sat_E_DbGd_PH_abs - integer :: nq_around,iq_fg,iq_idx + integer :: nq_around,iq_fg,iq_idx,iE_fg, complex(SP) :: pole real(SP), external :: get_ph_E_DbGd ! @@ -94,7 +94,8 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! do iq_fg=q%FGbz%k_range(iq_bz,1)+1,q%FGbz%k_range(iq_bz,2),1 ! - ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) + iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + get_ph_E_DbGd =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid ! if(ph_E Date: Thu, 19 May 2022 13:25:35 +0200 Subject: [PATCH 0283/1367] Version 5.1.0, Revision 21736, Hash 3ee4e41cc MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F Changes: -iq index changed in iq_bz to the more clear Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/Satellite_DbGrid.F | 70 ++++++++++++++++------------------- src/exc-ph/Satellite_Simple.F | 12 +++--- 3 files changed, 40 insertions(+), 46 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 750f9ffdc8..86f7d99530 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21736 -#define YAMBO_HASH "3f22e70a4" +#define YAMBO_REVISION 21737 +#define YAMBO_HASH "3ee4e41cc" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 1573447182..2d6465573b 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -38,8 +38,9 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp use pars, ONLY:SP,cZERO,rZERO - use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,BS_Sat_E, & -& BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,l_DbGd_PH_only,BS_Sat_E_PH_abs + use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,BS_Sat_E,l_DbGd_WEIGHTs, & +& BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,l_DbGd_PH_only,BS_Sat_E_PH_abs, & + BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq use functions, ONLY:bose_f,boltzman_f ! @@ -54,60 +55,53 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! real(SP) :: PH_E,E_alpha,boltzm_factor,weight_dbgd,E_beta,BS_ave_W,BS_ave_W_PH_abs,bose_factor complex(SP) :: BS_Sat_E_DbGd,BS_Sat_E_DbGd_PH_abs - integer :: nq_around,iq_fg,iq_idx,iE_fg, + integer :: nq_around,iq_fg,iq_idx,iE_fg,iq_ibz complex(SP) :: pole real(SP), external :: get_ph_E_DbGd ! - nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1) ! Number of fine q-points around iq_bz - weight_dbgd=1._SP/real(nq_around+1._SP,SP) ! Total weight of the Db-grid points including the iq_bz + nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz + weight_dbgd=1._SP/real(nq_around,SP) ! ! Calculate the Satellite Weight ! - BS_ave_W=rZERO - BS_ave_W_PH_abs=rZERO - ! - ! Calculate - ! - ! BS_ave_W=\sum_{\tilde q } | G |/(E_a-E_b +- w_q) - ! - do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) - ! - iq_idx =iq_fg-q%FGbz%k_range(iq_bz,1)+1 - ! - BS_ave_W =BS_ave_W+BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) - BS_ave_W_PH_abs=BS_ave_W_PH_abs+BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx) - ! - enddo - ! - ! Multiply for 1/N_{\tilde q} - ! - BS_ave_W =BS_ave_W*weight_dbgd - BS_ave_W_PH_abs=BS_ave_W_PH_abs*weight_dbgd - ! - BS_ave_W=BS_ave_W**2 - BS_ave_W_PH_abs=BS_ave_W_PH_abs**2 + if(l_DbGd_WEIGHTs) then + call error('Implementation to be checked ') + else + BS_ave_W =BS_Sat_WEIGHT(il,i_beta,i_alpha) + BS_ave_W_PH_abs=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) + endif ! Sat_absorption=cZERO Sat_emission =cZERO ! E_alpha =BS_E_in(i_alpha) ! - do iq_fg=q%FGbz%k_range(iq_bz,1)+1,q%FGbz%k_range(iq_bz,2),1 + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2),1 ! - iE_fg =q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - get_ph_E_DbGd =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid ! if(ph_E @brief Calculate the phonon-assisted satellite for absorption and emission ! using double-grid ! -! @param[in] iq q-point +! @param[in] iq_bz q-point in the BZ ! @param[in] il phonon branch ! @param[in] i_alpha incoming exciton ! @param[in] i_beta outgoing exciton @@ -33,7 +33,7 @@ ! @param[out] Sat_absorption Satellite in absorption ! @param[out] Sat_emission Satellite in emission !! -subroutine Satellite_Simple(iq,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) +subroutine Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission) ! use frequency, ONLY:w_samp use units, ONLY:HA2CMm1 @@ -48,7 +48,7 @@ subroutine Satellite_Simple(iq,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission ! #include ! - integer, intent(in) :: il,iq,i_alpha,i_beta + integer, intent(in) :: il,iq_bz,i_alpha,i_beta complex(SP), intent(in) :: W complex(SP), intent(out) :: Sat_absorption, Sat_emission type(bz_samp) :: q @@ -64,8 +64,8 @@ subroutine Satellite_Simple(iq,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emission ! ! Bose function for the phonons ! - !iq_db=DB_Q_map(iq) - iq_db=Q_io_map(iq) + !iq_db=DB_Q_map(iq_bz) + iq_db=Q_io_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) ! if(ph_E Date: Thu, 19 May 2022 14:02:39 +0200 Subject: [PATCH 0284/1367] Version 5.1.0, Revision 21737, Hash da5d5b5e0 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F Changes: -Changed output filename with DbGrid Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 4 ++++ src/exc-ph/Satellite_DbGrid.F | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 86f7d99530..51049fa5f5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21737 -#define YAMBO_HASH "3ee4e41cc" +#define YAMBO_REVISION 21738 +#define YAMBO_HASH "da5d5b5e0" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 7d6b5f0d2c..c753c2d57f 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -146,6 +146,10 @@ subroutine print_output() ! eps_file_name='eps_bse_ph_ass' pl_file_name ='pl_bse_ph_ass' + if(use_PH_DbGd) then + eps_file_name='eps_bse_ph_ass_dbgd' + pl_file_name ='pl_bse_ph_ass_dbgd' + endif ! call of_open_close(eps_file_name,'ot') call of_open_close(pl_file_name,'ot') diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 2d6465573b..82d7d19b3a 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -40,7 +40,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss use pars, ONLY:SP,cZERO,rZERO use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,BS_Sat_E,l_DbGd_WEIGHTs, & & BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,l_DbGd_PH_only,BS_Sat_E_PH_abs, & - BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs + BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,min_EXC_E use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq use functions, ONLY:bose_f,boltzman_f ! @@ -87,7 +87,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! if(l_DbGd_PH_only) then ! - iq_ibz = q%sstar(iq,1) + iq_ibz = q%sstar(iq_bz,1) E_beta =BS_all_E(i_beta,iq_ibz) ! boltzm_factor=boltzman_f(E_beta-min_EXC_E) From 3b73dee01cde8d8e36a051c0f9159f8ced71782b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 14:06:04 +0200 Subject: [PATCH 0285/1367] Version 5.1.0, Revision 21738, Hash 81c575ac9 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F exc-ph/Satellite_DbGrid.F Bugs: -Fixed DbGrid in exciton lifetimes Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 8 +++++--- src/exc-ph/Satellite_DbGrid.F | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 51049fa5f5..9c787a4256 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21738 -#define YAMBO_HASH "da5d5b5e0" +#define YAMBO_REVISION 21739 +#define YAMBO_HASH "81c575ac9" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index d24ed98ec3..596b2a5bc6 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -227,14 +227,14 @@ end function Simple_Pole ! function DbGrid_pole() use EXCPH, ONLY:min_EXC_E_DbGd,EXC_E_DbGd - use ELPH, ONLY:FAN_deltaE_treshold + use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs use functions, ONLY:bose_f,boltzman_f,Lorentzian_func implicit none ! real(SP) :: DbGrid_pole real(SP) :: E_alpha,E_beta real(SP) :: ph_E,N_bose,F_boltz - integer :: nq_around,iq_fg + integer :: nq_around,iq_fg,iE_fg real(SP) :: weight_dbgd real(SP), external :: get_ph_E_DbGd ! @@ -247,7 +247,9 @@ function DbGrid_pole() ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! - ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) + iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ! if(ph_E @brief Calculate the phonon-assisted satellite for absorption and emission ! using double-grid ! -! @param[in] iq q-point +! @param[in] iq_bz q-point ! @param[in] il phonon branch ! @param[in] i_alpha incoming exciton ! @param[in] i_beta outgoing exciton From c2b14bac522f27deaf3e25aace2ef85dedce4542 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 15:10:16 +0200 Subject: [PATCH 0286/1367] Version 5.1.0, Revision 21739, Hash 3b73dee01 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_double_grid_setup.F exc-ph/EXCPH_lifetime.F exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F Bugs: -Fixed bug with first point of the DB-grid Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 6 +++--- src/exc-ph/EXCPH_double_grid_setup.F | 2 +- src/exc-ph/EXCPH_lifetime.F | 17 +++++++++++++--- src/exc-ph/Satellite_DbGrid.F | 29 ++++++++++++++++++++++------ src/exc-ph/Satellite_Simple.F | 2 ++ 6 files changed, 45 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9c787a4256..1eed5ae5d0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21739 -#define YAMBO_HASH "81c575ac9" +#define YAMBO_REVISION 21740 +#define YAMBO_HASH "3b73dee01" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 2451960045..b590be7184 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -138,13 +138,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Calcualte the Satellite on the course q-grid ! - call Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W, Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) ! else ! ! Use the double-grid to average denominators ! - call Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_alpha_abs,Sat_alpha_emiss) + call Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_alpha_abs,Sat_alpha_emiss) ! endif ! @@ -287,7 +287,7 @@ subroutine Eval_Renorm_Factor() real(SP) :: N_bose,weight_dbgd real(SP), external :: get_ph_E_DbGd ! - if(.not.use_PH_DbGd) then + if(.not.use_PH_DbGd.or..not.l_DbGd_WEIGHTs) then ! do il=elph_branches(1),elph_branches(2) ! diff --git a/src/exc-ph/EXCPH_double_grid_setup.F b/src/exc-ph/EXCPH_double_grid_setup.F index 70a30c6951..553a3eba99 100644 --- a/src/exc-ph/EXCPH_double_grid_setup.F +++ b/src/exc-ph/EXCPH_double_grid_setup.F @@ -92,7 +92,7 @@ subroutine EXCPH_double_grid_setup(q) min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) call c2a(v_in=q_DbGd%pt(min_pos_E_DbGd,:),v_out=v,mode="ki2a") - call msg('rs','Minimum exctonic energy with DbGd: ',min_EXC_E_DbGd*HA2EV,'eV') + call msg('rs','Minimum excitonic energy with DbGd: ',min_EXC_E_DbGd*HA2EV,'eV') write(q_point,'(3f12.6,a)') v(:),' [rlu] ' call msg('rs','Minimum q-point in the DbGrid : '//q_point) ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 596b2a5bc6..d8bce4cc59 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -227,7 +227,7 @@ end function Simple_Pole ! function DbGrid_pole() use EXCPH, ONLY:min_EXC_E_DbGd,EXC_E_DbGd - use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs + use ELPH, ONLY:FAN_deltaE_treshold,PH_freqs,PH_freqs_sq,Q_io_map use functions, ONLY:bose_f,boltzman_f,Lorentzian_func implicit none ! @@ -247,8 +247,19 @@ function DbGrid_pole() ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! - iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + iq_db=Q_io_map(iq_bz) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) + ! + ! If there is the double-grid I read the gamma phonons from there + ! because they include the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(il,1,1) + ! + else + iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + endif ! if(ph_E @@ -55,7 +55,7 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! real(SP) :: PH_E,E_alpha,boltzm_factor,weight_dbgd,E_beta,BS_ave_W,BS_ave_W_PH_abs,bose_factor complex(SP) :: BS_Sat_E_DbGd,BS_Sat_E_DbGd_PH_abs - integer :: nq_around,iq_fg,iq_idx,iE_fg,iq_ibz + integer :: nq_around,iq_fg,iq_idx,iE_fg,iq_ibz,iq_db complex(SP) :: pole real(SP), external :: get_ph_E_DbGd ! @@ -78,8 +78,20 @@ subroutine Satellite_DbGrid(iq_bz,il,i_alpha,i_beta,W,q,Sat_absorption,Sat_emiss ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2),1 ! - iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! + iq_db=Q_io_map(iq_bz) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) + ! + ! If there is the double-grid I read the gamma phonons from there + ! because they include the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(il,1,1) + ! + else + iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + endif ! if(ph_E Date: Thu, 19 May 2022 15:25:33 +0200 Subject: [PATCH 0287/1367] Version 5.1.0, Revision 21740, Hash c2b14bac5 MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F exc-ph/Satellite_Simple.F modules/mod_functions.F Bugs: -Fixed Boltzman function -Fixed bug in the Db-Grid Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_DbGrid.F | 2 -- src/exc-ph/Satellite_Simple.F | 2 -- src/modules/mod_functions.F | 8 +++----- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1eed5ae5d0..9907f8cac6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21740 -#define YAMBO_HASH "3b73dee01" +#define YAMBO_REVISION 21741 +#define YAMBO_HASH "c2b14bac5" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index d08831ec8f..6a76a93dc3 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -134,8 +134,6 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! pole=E_alpha+BS_Sat_E_DbGd ! - write(100,*) i_alpha,il,iq_bz,boltzm_factor,bose_factor,ph_E - ! ! Bose factor already included in BS_Sat_W_DG and BS_Sat_W_DG_PH_abs ! ! Phonon emission in absorption diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index 2d02806a03..586f81dbdf 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -99,6 +99,4 @@ subroutine Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! Sat_emission=Sat_emission+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! - write(99,*) i_alpha,il,iq_bz,boltzm_factor,bose_factor,ph_E - ! end subroutine Satellite_Simple diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index a18c4c1312..375b2cc826 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -219,17 +219,15 @@ function boltzman_f(Eb) real(SP), intent(in):: Eb real(SP) :: boltzman_f ! - real(SP) :: E_small=0.002/HA2EV ! Threashold for degenerate excitons + real(SP) :: E_small=0.005/HA2EV ! Threashold for degenerate excitons real(SP) :: T_small=1._SP/HA2KEL ! if(abs(Eb)>E_small.and.abs(Boltz_Temp)>T_small) then boltzman_f=exp(-Eb/Boltz_Temp) ! Normal case elseif(abs(Eb)>E_small.and.abs(Boltz_Temp)<=T_small) then boltzman_f=0._SP ! Case E>0 but T=0 - elseif(abs(Eb)0 T->0 - elseif(abs(Eb)T_small) then - boltzman_f=1._SP ! Case E=0 T->0 + elseif(abs(Eb) Date: Thu, 19 May 2022 15:37:26 +0200 Subject: [PATCH 0288/1367] Version 5.1.0, Revision 21741, Hash 88d606122 MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F Bugs: -Fixed bug with the flag DbGdOnlyPh Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_DbGrid.F | 13 ++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9907f8cac6..b48918391c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21741 -#define YAMBO_HASH "c2b14bac5" +#define YAMBO_REVISION 21742 +#define YAMBO_HASH "88d606122" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 6a76a93dc3..5088fd9a00 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -120,17 +120,8 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! ! Evaluate BS_Sat energies in the double-grid ! - if(l_DbGd_PH_only) then - ! - BS_Sat_E_DbGd =BS_Sat_E(il,i_beta,i_alpha) - BS_Sat_E_DbGd_PH_abs=BS_Sat_E_PH_abs(il,i_beta,i_alpha) - ! - else - ! - BS_Sat_E_DbGd =E_beta-BS_E_in(i_alpha)+ph_E - BS_Sat_E_DbGd_PH_abs=E_beta-BS_E_in(i_alpha)-ph_E - ! - endif + BS_Sat_E_DbGd =E_beta-BS_E_in(i_alpha)+ph_E + BS_Sat_E_DbGd_PH_abs=E_beta-BS_E_in(i_alpha)-ph_E ! pole=E_alpha+BS_Sat_E_DbGd ! From 1d9c0d132d0c7f7950d8713c0c8fdc477a9a5eca Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 16:13:02 +0200 Subject: [PATCH 0289/1367] Version 5.1.0, Revision 21742, Hash ffc5ce33d MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F modules/mod_EXCPH.F Additions: -Better output Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 8 +++++--- src/exc-ph/EXCPH_lifetime.F | 4 ++-- src/exc-ph/EXCPH_optics.F | 22 ++++++++++++++-------- src/exc-ph/Satellite_DbGrid.F | 8 +++++++- src/modules/mod_EXCPH.F | 1 + 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b48918391c..7b35b71e76 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21742 -#define YAMBO_HASH "88d606122" +#define YAMBO_REVISION 21743 +#define YAMBO_HASH "ffc5ce33d" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index b590be7184..132dc71fb2 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -59,7 +59,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! type(bz_samp), intent(in) :: q type(w_samp), intent(in) :: wv - complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,2),PL_ii(wv%n_freqs,2) + complex(SP), intent(out) :: Epsilon_ii(wv%n_freqs,3),PL_ii(wv%n_freqs,3) ! ! Work space ! @@ -152,6 +152,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) PL_ii(iw,1) =PL_ii(iw,1)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + Epsilon_ii(iw,3)=Epsilon_ii(iw,3)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,3) =PL_ii(iw,3)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) ! enddo ! @@ -196,7 +198,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do i_alpha=EXCPH_states(1),EXCPH_states(2) ! pole =BS_E_in(i_alpha) - Epsilon_ii(iw,:)=Epsilon_ii(iw,:)+(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha)/(W-pole) + Epsilon_ii(iw,1:2)=Epsilon_ii(iw,1:2)+(1._SP-EXCPH_Renorm(i_alpha)-EXCPH_Renorm_PH_abs(i_alpha))*BS_R(i_alpha)/(W-pole) ! ! [CA] The pole of luminescence should be the pole of BS_E_in ! but I think this is not consistent with the Boltzman weight, I use always Lout. @@ -205,7 +207,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) - PL_ii(iw,:) =PL_ii(iw,:) +(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & + PL_ii(iw,1:2) =PL_ii(iw,1:2) +(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index d8bce4cc59..71ab57981a 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -35,7 +35,7 @@ subroutine EXCPH_lifetime(k,q,X) use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & -& alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map +& alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use vec_operate, ONLY:degeneration_finder use frequency, ONLY:w_samp @@ -54,7 +54,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: iq,iq_s,iq_bz,i_alpha,j_alpha,i_beta,il,i_star,iq_db,igrp integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp - logical :: l_no_matrix_elements,l_keep_deg + logical :: l_keep_deg real(SP) :: ExcPhM,EXC_life_average ! call parser('NoMatrxEl',l_no_matrix_elements) diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index c753c2d57f..4d0e073ffb 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -33,7 +33,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & & BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,free_EXC,alloc_EXC, & -& l_DbGd_PH_only,l_DbGd_WEIGHTs +& l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements use ELPH, ONLY:use_PH_DbGd,ph_modes use frequency, ONLY:w_samp use parser_m, ONLY:parser @@ -48,7 +48,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! Work space ! complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) - integer, parameter :: n_output=5 + integer, parameter :: n_output=7 real(SP) :: output_data(n_output) integer :: iw,iq,i_alpha,max_filling character(schlen) :: dbgd_string @@ -86,6 +86,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! This formula can be wrong in presence of the 2D-cutoff BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 ! + call parser('NoMatrxEl',l_no_matrix_elements) + ! ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) ! @@ -113,8 +115,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Frequencies and damping setup call FREQUENCIES_setup(wv) - YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs,2)) - YAMBO_ALLOC(PL_ii,(wv%n_freqs,2)) + YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs,3)) + YAMBO_ALLOC(PL_ii,(wv%n_freqs,3)) ! ! Calculate X(w) include phonon assisted transitions ! @@ -161,11 +163,15 @@ subroutine print_output() call msg('o eps_bse pl_bse','# EXCITON PHONON') call msg('o eps_bse pl_bse','# Exciton_states :',EXCPH_states,INDENT=0) call msg('o eps_bse pl_bse','# EXciton sum :',EXCPH_sum,INDENT=0) + if(use_PH_DbGd) then + call msg('o eps_bse pl_bse','# Double-grid for satellites :',l_DbGd_WEIGHTs,INDENT=0) + call msg('o eps_bse pl_bse','# Double-grid only for phonons :',l_DbGd_PH_only,INDENT=0) + endif call msg('o eps_bse pl_bse','#') call msg('o eps_bse','# E[1] [eV] Im(eps_ph)' & - //' Re(eps_bse) Im(eps) Re(eps)') + //' Re(eps_bse) Im(eps) Re(eps) Re(eps_sat) Im(pl_sat)') call msg('o pl_ph' ,'# E[1] [eV] Im(pl_ph) ' & - //' Re(pl_bse) Im(pl) Re(pl)') + //' Re(pl_bse) Im(pl) Re(pl) Re(pl_sat) Im(pl_sat)') call msg('o eps_bse pl_bse','#') ! ! Write output on file @@ -175,13 +181,13 @@ subroutine print_output() ! Eps ! output_data=(/real(wv%p(iw))*HA2EV,aimag(Epsilon_ii(iw,1)),real(Epsilon_ii(iw,1)), & -& aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2))/) +& aimag(Epsilon_ii(iw,2)),real(Epsilon_ii(iw,2)),aimag(Epsilon_ii(iw,3)),real(Epsilon_ii(iw,3))/) call msg('o eps_bse','',output_data,INDENT=-2,USE_TABS=.true.) ! ! Luminescence ! output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & -& aimag(PL_ii(iw,2)),real(PL_ii(iw,2))/) +& aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),aimag(PL_ii(iw,3)),real(PL_ii(iw,3))/) call msg('o pl_bse','',output_data,INDENT=-2,USE_TABS=.true.) ! enddo diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 5088fd9a00..3c539d70ae 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -37,10 +37,11 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp + use units, ONLY:HA2EV use pars, ONLY:SP,cZERO,rZERO use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,BS_Sat_E,l_DbGd_WEIGHTs, & & BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,l_DbGd_PH_only,BS_Sat_E_PH_abs, & - BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,min_EXC_E + BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,min_EXC_E,l_no_matrix_elements use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq,Q_io_map use functions, ONLY:bose_f,boltzman_f ! @@ -71,6 +72,11 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss BS_ave_W_PH_abs=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) endif ! + if(l_no_matrix_elements) then + BS_ave_W =1._SP + BS_ave_W_PH_abs=1._SP + endif + ! Sat_absorption=cZERO Sat_emission =cZERO ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index f2dc4a08de..d3f7a1d4ff 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -105,6 +105,7 @@ module EXCPH ! logical :: l_DbGd_WEIGHTs ! Double-Grid for Satellite weights logical :: l_DbGd_PH_only ! Double-Grid only for phonon energies + logical :: l_no_matrix_elements ! Set EXC-PH matrix elements to 1 (in lifetime and satellites) ! contains ! From 3cebf7199e25ff5ff00332aa1acc3d15da1212f9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 19 May 2022 16:40:03 +0200 Subject: [PATCH 0290/1367] Version 5.1.0, Revision 21743, Hash 1d9c0d132 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F Bugs: -Not working version Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7b35b71e76..ccc1b96a35 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21743 -#define YAMBO_HASH "ffc5ce33d" +#define YAMBO_REVISION 21744 +#define YAMBO_HASH "1d9c0d132" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 4d0e073ffb..f64a5b410b 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -50,6 +50,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=7 real(SP) :: output_data(n_output) + character(schlen) :: headers(n_output) integer :: iw,iq,i_alpha,max_filling character(schlen) :: dbgd_string ! @@ -168,10 +169,12 @@ subroutine print_output() call msg('o eps_bse pl_bse','# Double-grid only for phonons :',l_DbGd_PH_only,INDENT=0) endif call msg('o eps_bse pl_bse','#') - call msg('o eps_bse','# E[1] [eV] Im(eps_ph)' & - //' Re(eps_bse) Im(eps) Re(eps) Re(eps_sat) Im(pl_sat)') - call msg('o pl_ph' ,'# E[1] [eV] Im(pl_ph) ' & - //' Re(pl_bse) Im(pl) Re(pl) Re(pl_sat) Im(pl_sat)') + headers(1)='E[eV]' + headers(2:n_output)=(/'Im(eps_ph )','Re(eps_ph )','Im(eps_nos)','Re(eps_nos)','Re(eps_sat)','Im(eps_sat)'/) + call msg('o eps_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) + ! + headers(2:n_output)=(/'Im(pl_ph )','Re(pl_ph )','Im(pl_nos)','Re(pl_nos)','Re(pl_sat)','Im(pl_sat)'/) + call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) call msg('o eps_bse pl_bse','#') ! ! Write output on file From 0cf1e2df10e0bbc9a6e11809849d41541db46166 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 24 May 2022 12:49:23 +0200 Subject: [PATCH 0291/1367] Better explanation of elemental_scattering and some temp debugging --- src/exc-ph/EXCPH_gkkp_eval.F | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 316d6ad18d..df83e6dde8 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -59,6 +59,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) real(SP) :: ph_E complex(SP) :: elph_gkkp integer, external :: io_ELPH + !complex(SP) :: aux_phase_1,aux_phase_2 ! ! Loop scheme: ! i_l ->i_beta ->i_star [load gkkp] ->i_H @@ -199,8 +200,11 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate ! + !aux_phase_1 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,1)), REAL(Xi(i_H,1)) ) ) + !aux_phase_2 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,2)), REAL(Xi(i_H,2)) ) ) + ! EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2)) +& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) ! enddo enddo @@ -217,6 +221,16 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) contains ! integer function elemental_scattering(i_q_SYM,i_k_BZ) + ! + ! This is done because the BSE is solved for q in IBZ and k in BZ. + ! However the EXCPH matrix elements are for k in BZ and q in BZ. + ! + ! Therefore, I have the exc. weight (q |cRk vRk-q) + ! but I don't have the exc. weight (Sq |cRk vRk-Sq). + ! + ! Yet, I know that (Sq |cRk vRk-Sq) = (q |c{S^-1R}k v{S^-1R}k-q). + ! + ! Therefore, in this subroutine I look for p = {S^-1 R}k ! integer i_q_SYM,i_k_BZ,i_k_IBZ,i_k_SYM ! From de4e8438c027afebd353a388280b8ffd83c68c9a Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 25 May 2022 12:27:19 +0200 Subject: [PATCH 0292/1367] Just added debug line to prink kpoints --- src/exc-ph/EXCPH_gkkp_driver.F | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 3d80202e14..e473e6e064 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -74,6 +74,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) integer :: il,iq,i1,i_star,iq_bz,iq_s,iq_db,elph_branches_save(2) real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) + ! Debug + !integer :: ik + !open(1, file='K_grid_bz.dat') ! call section('*','Excitonic gkkp') !====================================== @@ -143,6 +146,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) max_Sat_weight=rZERO max_Sat_pos =0 ! + ! Debug + !call k_ibz2bz(k,"i",.false.) + !do ik=1,k%nbz + !! write (1,*) k%ptbz(ik,:) + !enddo + !close(1) + ! ! K plus q table ! call build_k_plus_q_table() From 2c31b3fe447abc2880ce3d0491c1588a0836973e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 25 May 2022 23:00:13 +0200 Subject: [PATCH 0293/1367] Version 5.1.0, Revision 21746, Hash de4e8438c MODIFIED * include/driver/version.h ypp/symmetries/k_build_map.F ypp/symmetries/symmetries_driver.F Changes: - [ypp] Addressing issue #628 No significant changes found Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/symmetries/k_build_map.F | 26 ++++++++++++++++++++------ ypp/symmetries/symmetries_driver.F | 2 -- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ccc1b96a35..a48bbd27af 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21744 -#define YAMBO_HASH "1d9c0d132" +#define YAMBO_REVISION 21746 +#define YAMBO_HASH "de4e8438c" diff --git a/ypp/symmetries/k_build_map.F b/ypp/symmetries/k_build_map.F index bffbe229fd..fb74809064 100644 --- a/ypp/symmetries/k_build_map.F +++ b/ypp/symmetries/k_build_map.F @@ -24,8 +24,8 @@ subroutine k_build_map(k,k_save,kpoints_map,action_kind) ! use pars, ONLY:SP - use zeros, ONLY:k_rlu_zero - use vec_operate, ONLY:rlu_v_is_zero,c2a + use zeros, ONLY:k_rlu_zero,k_iku_zero + use vec_operate, ONLY:rlu_v_is_zero,c2a,v_is_zero use R_lattice, ONLY:bz_samp ! implicit none @@ -54,15 +54,27 @@ subroutine k_build_map(k,k_save,kpoints_map,action_kind) if(action_kind==2) nk=k_save%nibz ! kpoints_map=0 + if(action_kind==2) kpoints_map(2, : )=-1 + ! do ik=1,k%nibz - do ik_save=1,k_save%nbz + do ik_save=1,nk if(action_kind==1) v1=k_save%ptbz(ik_save,:) if(action_kind==2) v1=k_save%pt(ik_save,:) ! - call c2a(v_in=v1,mode='ki2a') - call c2a(v_in=k%pt(ik,:),v_out=v2,mode='ki2a') + ! DEBUG < + !call c2a(v_in=v1,mode='ki2a') + !call c2a(v_in=k%pt(ik,:),v_out=v2,mode='ki2a') + ! DEBUG > + v2=k%pt(ik,:) + ! + ! 2022/05/25 DS: If we have problems with the following procedure, + ! It means that we need to use the procedure in between DEBUG + ! commands and track the Go shifts ! - if (rlu_v_is_zero(v2-v1,zero_=k_rlu_zero)) then + ! DEBUG < + !if (rlu_v_is_zero(v2-v1,zero_=k_rlu_zero)) then + ! DEBUG > + if ( v_is_zero(v1-v2,k_iku_zero) ) then if(action_kind==1) kpoints_map(:, ik ) = k_save%sstar(ik_save,:) if(action_kind==2) kpoints_map(1, ik ) = ik_save exit @@ -70,6 +82,8 @@ subroutine k_build_map(k,k_save,kpoints_map,action_kind) enddo enddo ! + if ( any(kpoints_map==0) ) call error(" kpoints map is not complete") + ! if(action_kind==2) return ! ! swap ik and i1 to sort diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index b9626f18b4..e2b29be7b5 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -90,8 +90,6 @@ subroutine symmetries_driver(E,Xk) ! ! Expansion of default k-points call k_ibz2bz(Xk,'i',.false.) - YAMBO_FREE(Xk%pt) - call k_reduce(Xk,.false.) ! call fix_symmetries(old_nsym,old_dl_sop,old_sop_inv,S_contains_TR,action_kind) ! From 50bb8349a18616351d71f60046709042e2a5c2ad Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 26 May 2022 11:21:57 +0200 Subject: [PATCH 0294/1367] Version 5.1.0, Revision 21552, Hash 5fb82b2b5 MODIFIED * include/driver/version.h a2y/a2y_db1.F int_modules/mod_com2y.F modules/mod_D_lattice.F modules/mod_matrix_operate.F Changes: - [a2y] Now kptopt is checked by a2y. In case kptopt = 3 symmetries are not used - [a2y] Correct handling of magnetic symmetries for a2y implemented Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_db1.F | 33 ++++++++++++++++++++++++++---- interfaces/int_modules/mod_com2y.F | 23 +++++++++------------ src/modules/mod_D_lattice.F | 6 +++--- src/modules/mod_matrix_operate.F | 7 +++++++ 5 files changed, 51 insertions(+), 22 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a173249297..8b8019265f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21550 -#define YAMBO_HASH "0e957677a" +#define YAMBO_REVISION 21552 +#define YAMBO_HASH "5fb82b2b5" diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 4a510034c4..1d20c67246 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -114,17 +114,20 @@ subroutine a2y_db1(en,k,ncid) ! subroutine import_geometry_group use vec_operate, only : cross_product + use matrix_operate, only : m3det_i use R_lattice, only : b use D_lattice, only : nsym, i_time_rev, i_space_inv, dl_sop, & & DL_vol, a, alat, & & n_atomic_species,n_atoms_species,atoms_map, & & n_atoms_species_max,atom_pos, n_atoms, Z_species - use mod_com2y, only : symmetries_check_and_load, alat_mult_factor + use mod_com2y, only : symmetries_check_and_load, alat_mult_factor,force_noSYMM + ! implicit none + ! logical :: l_identity, l_inversion real(SP) :: lsop(3,3), cp(3) - integer :: a_nsym, a_species - integer, allocatable :: asop(:,:,:) + integer :: a_nsym, a_species, kptopt, det_s + integer, allocatable :: asop(:,:,:),symafm(:),trev(:) character(3), allocatable :: atom_species_names(:) integer, allocatable, target :: atom_species_(:) real(SP), allocatable, target :: reduced_atom_positions_(:,:) @@ -209,6 +212,12 @@ subroutine import_geometry_group ! ! Symmetry ! + varid = netcdf_inquire_varid(ncid, "kptopt") + netcdf_error = nf90_get_var(ncid, varid, kptopt) + call netcdf_check(ncid,netcdf_error,varid) + ! + force_noSYMM= ( kptopt==3 ) + netcdf_error = nf90_inq_dimid(ncid, "number_of_symmetry_operations", dimid) netcdf_error = nf90_inquire_dimension(ncid, dimid, len = a_nsym) @@ -217,7 +226,23 @@ subroutine import_geometry_group netcdf_error = nf90_get_var(ncid, varid, asop) call netcdf_check(ncid,netcdf_error,varid) - call symmetries_check_and_load(asop,a_nsym) + YAMBO_ALLOC( symafm, (a_nsym) ) + varid = netcdf_inquire_varid(ncid, "symafm") + netcdf_error = nf90_get_var(ncid, varid, symafm) + call netcdf_check(ncid,netcdf_error,varid) + + if (any(symafm==-1)) then + YAMBO_ALLOC( trev, (a_nsym) ) + trev=-99 + do is=1,a_nsym + det_s=m3det_i(asop(:,:,is)) + if (symafm(is)*det_s==-1) trev(is)=1 + if (symafm(is)*det_s== 1) trev(is)=0 + enddo + if (any(trev==-99)) call error(" some symmetry has determinant different from 1 or -1") + endif + + call symmetries_check_and_load(asop,a_nsym,trevsym=any(trev==-1),t_rev=trev) return end subroutine import_geometry_group diff --git a/interfaces/int_modules/mod_com2y.F b/interfaces/int_modules/mod_com2y.F index 7e3549398a..c886e9512a 100644 --- a/interfaces/int_modules/mod_com2y.F +++ b/interfaces/int_modules/mod_com2y.F @@ -95,19 +95,16 @@ subroutine symmetries_check_and_load(int_sop,nsym_,trevsym,t_rev) ! mag_syms=.false. inv_index=-1 - if(present(t_rev).and.present(trevsym)) then - i_time_rev=0 - if(trevsym) i_time_rev=1 - if(any(t_rev(:)==1)) then - mag_syms=.true. - i_time_rev=1 - endif - double_symmetries=.not.mag_syms - else - i_time_rev=1 - if(l_spin_orbit.and.n_spin_den==4) i_time_rev=0 - double_symmetries=(i_time_rev==1) + ! + i_time_rev=1 + if (present(trevsym)) then + if( trevsym) i_time_rev=1 + if(.not.trevsym) i_time_rev=0 endif + if(any(t_rev(:)==1)) mag_syms=.true. + ! + double_symmetries=.not.mag_syms + if (mag_syms) i_time_rev=1 ! ! Space Invertion (possible only for v >= 3.0.4) ! @@ -210,8 +207,8 @@ subroutine symmetries_check_and_load(int_sop,nsym_,trevsym,t_rev) is_spatial=0 is_trev=0 do is=1,nsym_ + ! I need to reorder the symmetries if(mag_syms) then - ! PWscf: I need to reorder the symmetries if(t_rev(is)==0) then is_spatial=is_spatial+1 is_yambo=is_spatial diff --git a/src/modules/mod_D_lattice.F b/src/modules/mod_D_lattice.F index 5f645090a8..1d7e14f7a4 100644 --- a/src/modules/mod_D_lattice.F +++ b/src/modules/mod_D_lattice.F @@ -128,15 +128,15 @@ subroutine symmetry_group_table(msg_where) m=matmul(dl_sop(:,:,i1),dl_sop(:,:,i2)) do i3=1,nsym if (all(abs(m-dl_sop(:,:,i3))<=1.E-5)) then - if (sop_tab(i1,i2)/=0) call error('[SYMs] check the input symmetries!') + if (sop_tab(i1,i2)/=0) call error('[SYMs] Two sym pairs lead to the same symmetry') sop_tab(i1,i2)=i3 if (sop_tab(i1,i2)==1) sop_inv(i1)=i2 endif enddo - if (sop_tab(i1,i2)==0) call error('[SYMs] check the input symmetries!') + if (sop_tab(i1,i2)==0) call error('[SYMs] Sop tab is not complete') enddo enddo - if (any(sop_inv==0)) call error('[SYMs] check the input symmetries!') + if (any(sop_inv==0)) call error('[SYMs] Sop inv missing for some symmetries') call msg(msg_where,'Group table correct ',.true.) ! if (have_cuda) then diff --git a/src/modules/mod_matrix_operate.F b/src/modules/mod_matrix_operate.F index 56a424aa5d..35229508d9 100644 --- a/src/modules/mod_matrix_operate.F +++ b/src/modules/mod_matrix_operate.F @@ -220,6 +220,13 @@ function m3det_c(m) complex(SP) :: m(3,3),m3det_c m3det_c = m(1,1)*( m(2,2)*m(3,3) - m(2,3)*m(3,2) ) & & -m(1,2)*( m(2,1)*m(3,3) - m(2,3)*m(3,1) ) + & +& m(1,3)*( m(2,1)*m(3,2) - m(2,2)*m(3,1) ) + end function + ! + function m3det_i(m) + integer :: m(3,3),m3det_i + m3det_i = m(1,1)*( m(2,2)*m(3,3) - m(2,3)*m(3,2) ) & +& -m(1,2)*( m(2,1)*m(3,3) - m(2,3)*m(3,1) ) + & & m(1,3)*( m(2,1)*m(3,2) - m(2,2)*m(3,1) ) end function ! From 79fd6db140a854bc1116ce56f5d9e7b573338b77 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 26 May 2022 17:36:44 +0200 Subject: [PATCH 0295/1367] Version 5.1.0, Revision 21553, Hash 50bb8349a MODIFIED * config/mk/global/actions/compile_interfaces.mk include/driver/version.h a2y/.objects a2y/a2y.F a2y/a2y_db1.F io/io_ELPH.F io/variables_ELPH.F modules/mod_ELPH.F NEW * a2y/a2y_gkkp.F Changes: - [a2y] working on interface for gkkp Patch sent by: Davide Sangalli --- .../mk/global/actions/compile_interfaces.mk | 4 +- include/driver/version.h | 4 +- interfaces/a2y/.objects | 2 +- interfaces/a2y/a2y.F | 88 +++++++-- interfaces/a2y/a2y_db1.F | 6 +- interfaces/a2y/a2y_gkkp.F | 179 ++++++++++++++++++ src/io/io_ELPH.F | 14 +- src/io/variables_ELPH.F | 20 +- src/modules/mod_ELPH.F | 3 +- 9 files changed, 280 insertions(+), 40 deletions(-) create mode 100644 interfaces/a2y/a2y_gkkp.F diff --git a/config/mk/global/actions/compile_interfaces.mk b/config/mk/global/actions/compile_interfaces.mk index e5c9fea4ae..5c30056b6b 100644 --- a/config/mk/global/actions/compile_interfaces.mk +++ b/config/mk/global/actions/compile_interfaces.mk @@ -1,9 +1,9 @@ # # Variable definitions # -I_PRECMP= +I_PRECMP=-D_ELPH ifneq (,$(findstring p2y,$(MAKECMDGOALS))) - I_PRECMP=$(p2ycpp) + I_PRECMP+=$(p2ycpp) endif # GOALS=a2y c2y diff --git a/include/driver/version.h b/include/driver/version.h index 8b8019265f..dedc063b25 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21552 -#define YAMBO_HASH "5fb82b2b5" +#define YAMBO_REVISION 21553 +#define YAMBO_HASH "50bb8349a" diff --git a/interfaces/a2y/.objects b/interfaces/a2y/.objects index 532c609d6a..af9bf0d8f1 100644 --- a/interfaces/a2y/.objects +++ b/interfaces/a2y/.objects @@ -1 +1 @@ -objs = netcdf_data.o a2y.o a2y_db1.o a2y_wf.o a2y_kb_pp.o +objs = netcdf_data.o a2y.o a2y_db1.o a2y_wf.o a2y_kb_pp.o a2y_gkkp.o diff --git a/interfaces/a2y/a2y.F b/interfaces/a2y/a2y.F index df15320be0..fdbb5deff7 100644 --- a/interfaces/a2y/a2y.F +++ b/interfaces/a2y/a2y.F @@ -25,8 +25,9 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! use netcdf use netcdf_data + use stderr, ONLY: STRING_remove use vec_operate, ONLY: sort - use pars, ONLY: SP,cZERO + use pars, ONLY: SP,lchlen,cZERO use LOGO, ONLY: pickup_a_random use com, ONLY: msg,core_io_path use it_m, ONLY: nrnlvls,rnlvls,rstatus @@ -37,9 +38,10 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use R_lattice, ONLY: bz_samp,bz_samp_reset,nkibz use wave_func, ONLY: wf_ncx,io_WF,wf_nb_io_groups,wf_nb_io,wf_igk,wf_nc_k use IO_int, ONLY: io_control,IO_and_Messaging_switch - use IO_m, ONLY: OP_WR_CL,NONE,OP_APP_CL,serial_number + use IO_m, ONLY: OP_WR,WR,WR_CL,OP_WR_CL,NONE,OP_APP_CL,serial_number use mod_com2y, ONLY: interface_presets, force_noWFs use mod_wf2y, ONLY: WF_splitter + use elph, ONLY: elph_nQ ! implicit none integer, intent(in) :: lnstr,iind,iod,ijs,np,pid,icd @@ -54,15 +56,16 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir type(levels) :: en type(bz_samp) :: k ! - integer :: ID,io_err,i_sp_pol,ik,ifrag,ib_grp - integer, external :: io_DB1, io_KB_abinit + integer :: ID,io_err,i_sp_pol,ik,iq,ifrag,ib_grp + integer, external :: io_DB1, io_KB_abinit, io_ELPH + character(lchlen) :: wf_file,gkkp_file complex(SP), allocatable :: wf_disk(:,:,:) ! logical, external :: file_exists ! ! Work Space ! - integer :: ncid, netcdf_error + integer :: ncid_wf, ncid_gkkp, grpid_gkkp, netcdf_error ! ! Presets !========= @@ -116,32 +119,34 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! call msg('s','Checking input file ...') ! - if (index(trim(inf),'KSS')/=0) then + wf_file=trim(inf) + ! + if (index(trim(wf_file),'KSS')/=0) then NETCDF_kind='KSS' - else if (index(trim(inf),'WFK')/=0) then + else if (index(trim(wf_file),'WFK')/=0) then NETCDF_kind='WFK' + gkkp_file=STRING_remove(wf_file,"WFK",replace="GKKP") else call msg('ln','File kind not supported! Use either KSS or WFK filename.') end if ! - call msg('s','NETCDF file ',trim(inf)) + call msg('s','DBs path set to ',trim(core_io_path)) ! - if(.not.file_exists(trim(inf))) then - call msg('ln','File not found! Specify -F filename.') + if(.not.file_exists(trim(wf_file))) then + call msg('ln','File '//trim(wf_file)//' found! Specify -F filename.') return endif ! - call msg('s','DBs path set to ',trim(core_io_path)) - ! ! Open ETSF file for reading ! - netcdf_error = nf90_open(path = trim(inf), mode = NF90_NOWRITE, ncid = ncid) - call netcdf_check(ncid,netcdf_error, 0) + call msg('s','NETCDF Wave-functions file ',trim(wf_file)) + netcdf_error = nf90_open(path = trim(wf_file), mode = NF90_NOWRITE, ncid = ncid_wf) + call netcdf_check(ncid_wf,netcdf_error, 0) ! ! DB1 !========================================== ! - call a2y_db1(en,k,ncid) + call a2y_db1(en,k,ncid_wf) ! if (force_noWFs) then ! @@ -152,6 +157,7 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir io_err=io_DB1(en,k,ID) call msg('ln','done ==') return + ! endif ! call WF_splitter() @@ -180,7 +186,7 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! ! Read from the etsf-nc file ! - call a2y_wf(wf_disk,i_sp_pol,ik,ib_grp,ncid) + call a2y_wf(wf_disk,i_sp_pol,ik,ib_grp,ncid_wf) ! ! Write to the YAMBO WF database ! @@ -188,9 +194,9 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir if (ifrag> 1.or. ib_grp> 1) call io_control(ACTION=OP_APP_CL,COM=NONE,SEC=(/ifrag+1,ib_grp/),ID=ID) io_err=io_WF(ID,wf_disk) ! - if(trim(NETCDF_kind)=='KSS') call a2y_kb_pp(ik,ncid) + if(trim(NETCDF_kind)=='KSS') call a2y_kb_pp(ik,ncid_wf) if( pp_n_l_times_proj_max/=-1 ) then - if(trim(NETCDF_kind)=='WFK') call a2y_kb_pp_wfk(ik,ncid) + if(trim(NETCDF_kind)=='WFK') call a2y_kb_pp_wfk(ik,ncid_wf) if (n_atoms_species_max>0.and.ib_grp==1) then if (ifrag==1) call io_control(ACTION=OP_WR_CL,COM=NONE,SEC=(/1,2/),ID=ID) if (ifrag> 1) call io_control(ACTION=OP_APP_CL,COM=NONE,SEC=(/ifrag+1/),ID=ID) @@ -220,10 +226,52 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir call msg('s',' == Writing DB1 ...') call io_control(ACTION=OP_WR_CL,COM=NONE,SEC=(/1,2/),ID=ID) io_err=io_DB1(en,k,ID) - call msg('ln','done ==') + call msg('l','done ==') ! ! Close file ! - netcdf_error = nf90_close(ncid) + netcdf_error = nf90_close(ncid_wf) + ! + if(file_exists(trim(gkkp_file))) then + ! + call msg('s','NETCDF Gkkp file ',trim(gkkp_file)) + netcdf_error = nf90_open(path = trim(gkkp_file), mode = NF90_NOWRITE, ncid = ncid_gkkp) + call netcdf_check(ncid_gkkp,netcdf_error, 0) + ! + call msg('s',' == Writing DB3 (gkkp) ...') + ! + do i_sp_pol=1,n_sp_pol + ! + write(*,*) "GKKP header read" + call a2y_gkkp_header(i_sp_pol,ncid_gkkp,grpid_gkkp) + write(*,*) "GKKP header done" + ! + write(*,*) "GKKP header write" + call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID) + io_err=io_ELPH(ID,'gkkp') + write(*,*) "GKKP header done" + ! + do iq=1,elph_nQ + ! + ! Read from the etsf-nc file + ! + call a2y_gkkp(iq,i_sp_pol,ncid_gkkp,grpid_gkkp) + ! + ifrag=iq+elph_nQ*(i_sp_pol-1) + if(ifrag + ! + integer, intent(in) :: i_sp_pol,ncid + integer, intent(out) :: grpid + ! + ! Work Space + ! + integer :: varid,nk_gkkp,nq_gkkp,netcdf_error + ! + l_GKKP_hosts_bare_dV=.false. + l_GKKP_hosts_DW =.false. + elph_use_q_grid =.true. + ! + netcdf_error = nf90_inq_grp_ncid(ncid, "gkk_spin"//trim(intc(i_sp_pol)), grpid) + ! + netcdf_error = nf90_inq_varid(grpid, "nb", varid) + netcdf_error = nf90_get_var(grpid, varid, elph_nb) + ! + netcdf_error = nf90_inq_varid(grpid, "natom3", varid) + netcdf_error = nf90_get_var(grpid, varid, ph_modes) + ! + netcdf_error = nf90_inq_varid(grpid, "glob_nk", varid) + netcdf_error = nf90_get_var(grpid, varid, elph_nk_bz) + ! + netcdf_error = nf90_inq_varid(grpid, "glob_nq", varid) + netcdf_error = nf90_get_var(grpid, varid, elph_nQ) + ! + ! K-points + ! + call msg('s','ELPH K-points mesh (BZ) ...') + call import_kpoints_group() + call msg('l','done') + ! + ! Q-points + ! + call msg('s','ELPH Q-points mesh (IBZ) ...') + call import_qpoints_group() + call msg('l','done') + ! + call ELPH_alloc("PHONONS dV") + ! + contains + ! + ! This is a duplication, to be fixed + ! + ! K-points (convert to new units) + !=========================================================== + subroutine import_kpoints_group() + use pars, only : pi + use R_lattice, only : b + use D_lattice, only : alat + implicit none + integer :: ik + real(SP), allocatable :: reduced_coordinates_of_kpoints(:,:) + ! + allocate(reduced_coordinates_of_kpoints(3, elph_nk_bz)) + ! + varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_kpoints") + netcdf_error = nf90_get_var(ncid, varid, reduced_coordinates_of_kpoints) + call netcdf_check(ncid,netcdf_error,varid) + ! + YAMBO_ALLOC(PH_kpt_bz,(elph_nk_bz,3)) + do ik = 1,elph_nk_bz + PH_kpt_bz(ik,:)=matmul(transpose(b),reduced_coordinates_of_kpoints(:,ik))*alat(:)/2.0_SP/pi + enddo + ! + deallocate(reduced_coordinates_of_kpoints) + ! + ! Here I will have to load the k-points symmetries, etc ... + ! + end subroutine import_kpoints_group + ! + ! + ! Q-points (convert to new units) + !=========================================================== + subroutine import_qpoints_group() + use pars, only : pi + use R_lattice, only : b + use D_lattice, only : alat + implicit none + integer :: iq + real(SP), allocatable :: reduced_coordinates_of_qpoints(:,:) + ! + allocate(reduced_coordinates_of_qpoints(3, elph_nQ)) + ! + !varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_qpoints") + !netcdf_error = nf90_get_var(ncid, varid, reduced_coordinates_of_qpoints) + !call netcdf_check(ncid,netcdf_error,varid) + ! + YAMBO_ALLOC(PH_qpt,(elph_nQ,3)) + !do iq = 1,elph_nQ + ! PH_kpt_bz(iq,:)=matmul(transpose(b),reduced_coordinates_of_qpoints(:,iq))*alat(:)/2.0_SP/pi + !enddo + PH_kpt_bz=0._SP + ! + deallocate(reduced_coordinates_of_qpoints) + ! + end subroutine import_qpoints_group + ! +end subroutine a2y_gkkp_header +! +! +subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) + ! + ! Reads and returns g_kkp matrix elements for each q point + ! + use netcdf + use netcdf_data + use pars, ONLY: DP,SP + use elph, ONLY: GKKP,elph_nb,ph_modes,elph_nQ,elph_nk_bz + ! +#include + ! + integer, intent(in) :: iq,i_sp_pol,ncid,grpid + ! + ! Workspace + ! + integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6) + real(DP), allocatable :: gkkp_abinit(:,:,:,:,:,:) + ! + ! (natom3, glob_nk, nb, glob_nq, nb, cplex) + ! + allocate(gkkp_abinit(2,elph_nb,1,elph_nb,elph_nk_bz,ph_modes)) + !AMBO_ALLOC(gkkp_abinit,(2,elph_nb,elph_nb,ph_modes,elph_nQ)) + ! + ipos =(/1,1,iq,1,1,1/) + isize=(/2,elph_nb,1,elph_nb,elph_nk_bz,ph_modes/) + ! + netcdf_error = nf90_inq_varid(grpid, "vars", varid) + netcdf_error = nf90_get_var(grpid, varid, gkkp_abinit, ipos, isize) + ! + !call ELPH_alloc("dV") + ! + ! (/2,ph_modes,elph_nb,elph_nb,nkbz/) + ! + do ik=1,elph_nk_bz + do i_modes=1,ph_modes + GKKP%dVc(i_modes,:,:,ik,1)=cmplx(gkkp_abinit(1,:,1,:,i_modes,ik),gkkp_abinit(2,:,1,:,ik,i_modes),kind=SP) + !GKKP%dVc(i_modes,:,:,ik,1)=cmplx(gkkp_abinit(1,:,1,:,i_modes,ik),gkkp_abinit(2,:,1,:,i_modes,ik),kind=SP) + enddo + enddo + ! + deallocate(gkkp_abinit) + ! +end subroutine a2y_gkkp diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index 895573bf32..d6102f5403 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -27,7 +27,7 @@ integer function io_ELPH(ID,what) use IO_m, ONLY:io_sec,read_is_on,frag_ELPH use IO_int, ONLY:io_connect,io_disconnect,io_fragment,& & io_bulk,io_header - use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,& + use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & PH_pol_vector,GKKP,elph_grids_are_expanded,GKKP,GKKP_bare use stderr, ONLY:intc use interfaces, ONLY:ELPH_alloc @@ -140,10 +140,14 @@ integer function io_ELPH(ID,what) ! endif ! - ! ELPH_DW - ! - call io_bulk(ID_frag,VAR="ELPH_DW_Q"//trim(intc(iq)),VAR_SZ=(/ph_modes,elph_nb,elph_nb,nkbz/)) - call io_bulk(ID_frag,R4=GKKP%dVr(:,:,:,:,1)) + if (l_GKKP_hosts_DW) then + ! + ! ELPH_DW + ! + call io_bulk(ID_frag,VAR="ELPH_DW_Q"//trim(intc(iq)),VAR_SZ=(/ph_modes,elph_nb,elph_nb,nkbz/)) + call io_bulk(ID_frag,R4=GKKP%dVr(:,:,:,:,1)) + ! + endif ! 1 call io_fragment_disconnect(ID,ID_frag) ! diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 40f822aebf..e4fe862778 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -27,7 +27,7 @@ integer function variables_ELPH(ID,what) use IO_m, ONLY:io_status,read_is_on,write_is_on,io_mode,DUMP,IO_INCOMPATIBLE_VAR use IO_int, ONLY:ver_is_gt_or_eq,io_variable_elemental,io_bulk,def_variable_elemental use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,elph_nk_bz,ELPH_desc,elph_grids_are_expanded, & -& QP_PH_n_G_bands,PH_W_debye,elph_nQ,PH_kpt_bz,l_GKKP_hosts_bare_dV,& +& QP_PH_n_G_bands,PH_W_debye,elph_nQ,PH_kpt_bz,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & elph_use_q_grid,PH_qpt,elph_nQ_used,PH_pol_vector,elph_Ham_bands,elph_branches use interfaces, ONLY:ELPH_alloc use R_lattice, ONLY:nkbz,nqibz,q_pt @@ -43,7 +43,7 @@ integer function variables_ELPH(ID,what) ! !Work Space ! - integer ::iq + integer ::iq,NVAR logical ::l_gFsq,l_gkkp real(SP) ::v(3) ! @@ -56,8 +56,10 @@ integer function variables_ELPH(ID,what) ! call IO_desc_reset(ELPH_desc) ! - if (.not.ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",6,SP,0) - if ( ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",7,SP,0) + NVAR=6 + if (ver_is_gt_or_eq(ID,revision=18920)) NVAR=7 + if (ver_is_gt_or_eq(ID,revision=21565)) NVAR=8 + call def_variable_elemental(ID,"PARS",NVAR,SP,0) call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Q points",I0=elph_nQ,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[avail]",DESCRIPTOR=ELPH_desc) @@ -70,6 +72,12 @@ integer function variables_ELPH(ID,what) call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) endif + if (ver_is_gt_or_eq(ID,revision=21565)) then + call io_variable_elemental(ID,VAR="[ELPH] Debay-Waller",L0=l_GKKP_hosts_DW,& +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + else + l_GKKP_hosts_DW=.true. + endif if (l_gFsq) then call def_variable_elemental(ID,"QP_nb_nk_n_states",3,SP,0) call io_variable_elemental(ID,I0=QP_nb) @@ -105,11 +113,9 @@ integer function variables_ELPH(ID,what) enddo endif ! - if (elph_grids_are_expanded) then - ! + if (ver_is_gt_or_eq(ID,revision=21565).or.elph_grids_are_expanded) then call io_bulk(ID,VAR="PH_K",VAR_SZ=(/nkbz,3/) ) call io_bulk(ID,R2=PH_kpt_bz(:,:)) - ! endif ! variables_ELPH=io_status(ID) diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 5532cfbc07..0a9cc1f5e4 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -128,7 +128,8 @@ module ELPH ! ! Databases logical :: l_GKKP_hosts_bare_dV=.FALSE. - logical :: l_GKKP_DB_exists=.FALSE. + logical :: l_GKKP_hosts_DW =.TRUE. + logical :: l_GKKP_DB_exists =.FALSE. logical :: l_GKKP_expanded_DB_exists=.FALSE. character(schlen) :: gkkp_db ! Database type for el-ph calculation (gkkp | expanded | genFroh ) ! From a3f5839eda50ab9b4f58ff68701a3457135016ef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 27 May 2022 17:09:58 +0200 Subject: [PATCH 0296/1367] Version 5.1.0, Revision 21554, Hash 79fd6db14 MODIFIED * include/driver/version.h a2y/a2y.F a2y/a2y_gkkp.F allocations/ELPH_alloc.F io/variables_ELPH.F Changes: - [a2y] GKKP converter working. Still to be finalized Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- interfaces/a2y/a2y.F | 14 ++-- interfaces/a2y/a2y_gkkp.F | 157 +++++++++++++++++++++++++---------- src/allocations/ELPH_alloc.F | 1 + src/io/variables_ELPH.F | 7 +- 5 files changed, 125 insertions(+), 58 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index dedc063b25..c8018d80bf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21553 -#define YAMBO_HASH "50bb8349a" +#define YAMBO_REVISION 21554 +#define YAMBO_HASH "79fd6db14" diff --git a/interfaces/a2y/a2y.F b/interfaces/a2y/a2y.F index fdbb5deff7..d483d07fcd 100644 --- a/interfaces/a2y/a2y.F +++ b/interfaces/a2y/a2y.F @@ -29,7 +29,7 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use vec_operate, ONLY: sort use pars, ONLY: SP,lchlen,cZERO use LOGO, ONLY: pickup_a_random - use com, ONLY: msg,core_io_path + use com, ONLY: msg,core_io_path,jobstr use it_m, ONLY: nrnlvls,rnlvls,rstatus use parallel_m, ONLY: ncpu,myid use electrons, ONLY: levels,E_reset,n_spinor,n_sp_pol @@ -233,23 +233,21 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir netcdf_error = nf90_close(ncid_wf) ! if(file_exists(trim(gkkp_file))) then + ! + jobstr="GKKP_abinit" ! call msg('s','NETCDF Gkkp file ',trim(gkkp_file)) netcdf_error = nf90_open(path = trim(gkkp_file), mode = NF90_NOWRITE, ncid = ncid_gkkp) call netcdf_check(ncid_gkkp,netcdf_error, 0) ! - call msg('s',' == Writing DB3 (gkkp) ...') - ! do i_sp_pol=1,n_sp_pol ! - write(*,*) "GKKP header read" call a2y_gkkp_header(i_sp_pol,ncid_gkkp,grpid_gkkp) - write(*,*) "GKKP header done" ! - write(*,*) "GKKP header write" + call msg('s',' == Writing DB3 (gkkp) ...') + ! call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID) io_err=io_ELPH(ID,'gkkp') - write(*,*) "GKKP header done" ! do iq=1,elph_nQ ! @@ -272,6 +270,6 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! endif ! - call msg('l','') + call msg('ln',' ') ! end function diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index d28e334cb1..1cc53866c3 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -28,9 +28,12 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) use pars, ONLY:DP,SP,cZERO use stderr, ONLY:intc use com, ONLY:msg + use interfaces, ONLY:ELPH_alloc + use R_lattice, ONLY:nkibz,nkbz,nqibz,nqbz,k_pt + use D_lattice, ONLY:n_atoms use ELPH, ONLY:ph_modes,elph_nb,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & elph_nQ,elph_nk_bz,elph_grids_are_expanded,elph_use_q_grid,& -& PH_qpt,PH_kpt_bz +& PH_qpt,PH_kpt_bz,GKKP,PH_freqs_sq ! #include ! @@ -45,19 +48,28 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) l_GKKP_hosts_DW =.false. elph_use_q_grid =.true. ! - netcdf_error = nf90_inq_grp_ncid(ncid, "gkk_spin"//trim(intc(i_sp_pol)), grpid) + ! global dimensions + ! TODO: add checks vs WFK file ! - netcdf_error = nf90_inq_varid(grpid, "nb", varid) - netcdf_error = nf90_get_var(grpid, varid, elph_nb) + !n_atoms = netcdf_get_dimension(ncid, "natom") + ph_modes = netcdf_get_dimension(ncid, "natom3") + ! + nkibz = netcdf_get_dimension(ncid, "gstore_nkibz") + nkbz = netcdf_get_dimension(ncid, "gstore_nkbz" ) + nqibz = netcdf_get_dimension(ncid, "gstore_nqibz") + nqbz = netcdf_get_dimension(ncid, "gstore_nqbz" ) ! - netcdf_error = nf90_inq_varid(grpid, "natom3", varid) - netcdf_error = nf90_get_var(grpid, varid, ph_modes) + ! dimensions specific of gkk_spin group ! - netcdf_error = nf90_inq_varid(grpid, "glob_nk", varid) - netcdf_error = nf90_get_var(grpid, varid, elph_nk_bz) + netcdf_error = nf90_inq_grp_ncid(ncid, "gqk_spin"//trim(intc(i_sp_pol)), grpid) ! - netcdf_error = nf90_inq_varid(grpid, "glob_nq", varid) - netcdf_error = nf90_get_var(grpid, varid, elph_nQ) + elph_nb = netcdf_get_dimension(grpid, "nb") + elph_nk_bz = netcdf_get_dimension(grpid, "glob_nk") + elph_nQ = netcdf_get_dimension(grpid, "glob_nq") + ! + call msg('s','ELPH dims',(/elph_nb,ph_modes,elph_nk_bz,elph_nQ/)) + ! + call ELPH_alloc("PHONONS dV LEVELS",GKKP=GKKP) ! ! K-points ! @@ -71,7 +83,7 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) call import_qpoints_group() call msg('l','done') ! - call ELPH_alloc("PHONONS dV") + call import_ph_frequencies() ! contains ! @@ -85,63 +97,101 @@ subroutine import_kpoints_group() use D_lattice, only : alat implicit none integer :: ik - real(SP), allocatable :: reduced_coordinates_of_kpoints(:,:) + real(DP), allocatable :: gstore_kbz(:,:) ! - allocate(reduced_coordinates_of_kpoints(3, elph_nk_bz)) + allocate(gstore_kbz(3, elph_nk_bz)) ! - varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_kpoints") - netcdf_error = nf90_get_var(ncid, varid, reduced_coordinates_of_kpoints) + varid = netcdf_inquire_varid(ncid, "gstore_kbz") + netcdf_error = nf90_get_var(ncid, varid, gstore_kbz) call netcdf_check(ncid,netcdf_error,varid) ! - YAMBO_ALLOC(PH_kpt_bz,(elph_nk_bz,3)) do ik = 1,elph_nk_bz - PH_kpt_bz(ik,:)=matmul(transpose(b),reduced_coordinates_of_kpoints(:,ik))*alat(:)/2.0_SP/pi + PH_kpt_bz(ik,:)=matmul(transpose(b),gstore_kbz(:,ik))*alat(:)/2.0_SP/pi + enddo + ! + deallocate(gstore_kbz) + ! + allocate(gstore_kbz(3, nkibz)) + ! + varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_kpoints") + netcdf_error = nf90_get_var(ncid, varid, gstore_kbz) + call netcdf_check(ncid,netcdf_error,varid) + ! + allocate(k_pt(nkibz,3) ) + do ik = 1,nkibz + k_pt(ik,:)=matmul(transpose(b),gstore_kbz(:,ik))*alat(:)/2.0_SP/pi enddo ! - deallocate(reduced_coordinates_of_kpoints) + deallocate(gstore_kbz) ! ! Here I will have to load the k-points symmetries, etc ... ! end subroutine import_kpoints_group ! - ! ! Q-points (convert to new units) - !=========================================================== + !================================= subroutine import_qpoints_group() use pars, only : pi use R_lattice, only : b use D_lattice, only : alat implicit none integer :: iq - real(SP), allocatable :: reduced_coordinates_of_qpoints(:,:) + real(DP), allocatable :: gstore_qibz(:,:) ! - allocate(reduced_coordinates_of_qpoints(3, elph_nQ)) + allocate(gstore_qibz(3, elph_nQ)) ! - !varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_qpoints") - !netcdf_error = nf90_get_var(ncid, varid, reduced_coordinates_of_qpoints) - !call netcdf_check(ncid,netcdf_error,varid) + varid = netcdf_inquire_varid(ncid, "gstore_qibz") + netcdf_error = nf90_get_var(ncid, varid, gstore_qibz) + call netcdf_check(ncid,netcdf_error,varid) ! - YAMBO_ALLOC(PH_qpt,(elph_nQ,3)) - !do iq = 1,elph_nQ - ! PH_kpt_bz(iq,:)=matmul(transpose(b),reduced_coordinates_of_qpoints(:,iq))*alat(:)/2.0_SP/pi - !enddo - PH_kpt_bz=0._SP + do iq = 1,elph_nQ + PH_qpt(iq,:)=matmul(transpose(b),gstore_qibz(:,iq))*alat(:)/2.0_SP/pi + enddo ! - deallocate(reduced_coordinates_of_qpoints) + deallocate(gstore_qibz) ! end subroutine import_qpoints_group ! + ! PH_frequencies + !================= + subroutine import_ph_frequencies() + use pars, only : pi + use R_lattice, only : b + use D_lattice, only : alat + implicit none + integer :: iq + real(DP), allocatable :: phfreqs_ibz(:,:) + ! + allocate(phfreqs_ibz(ph_modes,elph_nQ)) + ! + varid = netcdf_inquire_varid(ncid, "phfreqs_ibz") + netcdf_error = nf90_get_var(ncid, varid, phfreqs_ibz) + call netcdf_check(ncid,netcdf_error,varid) + ! + do iq = 1,elph_nQ + PH_freqs_sq(iq,:)=real(phfreqs_ibz(:,iq),SP)**2 + enddo + ! + deallocate(phfreqs_ibz) + ! + end subroutine import_ph_frequencies + ! end subroutine a2y_gkkp_header -! -! + ! + ! TO FIX + ! call io_bulk(ID_frag,VAR="E_K_PLUS_Q"//trim(intc(iq)),VAR_SZ=(/elph_nb,nkbz,1/) ) + ! call io_bulk(ID_frag,R3=GKKP%E_kpq(iq)%E) + ! + ! subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! ! Reads and returns g_kkp matrix elements for each q point ! use netcdf use netcdf_data + use D_lattice, ONLY: n_atoms use pars, ONLY: DP,SP - use elph, ONLY: GKKP,elph_nb,ph_modes,elph_nQ,elph_nk_bz + use elph, ONLY: GKKP,elph_nb,ph_modes,elph_nQ,elph_nk_bz,PH_pol_vector ! #include ! @@ -149,19 +199,19 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! ! Workspace ! - integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6) - real(DP), allocatable :: gkkp_abinit(:,:,:,:,:,:) + integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6),i_atom,xyz + real(DP), allocatable :: gstore_abinit(:,:,:,:,:,:),phdispl_cart_ibz(:,:,:,:,:) ! ! (natom3, glob_nk, nb, glob_nq, nb, cplex) ! - allocate(gkkp_abinit(2,elph_nb,1,elph_nb,elph_nk_bz,ph_modes)) - !AMBO_ALLOC(gkkp_abinit,(2,elph_nb,elph_nb,ph_modes,elph_nQ)) + allocate(gstore_abinit(2,elph_nb,elph_nb,ph_modes,elph_nk_bz,1)) + !AMBO_ALLOC(gstore_abinit,(2,elph_nb,elph_nb,ph_modes,elph_nQ)) ! - ipos =(/1,1,iq,1,1,1/) - isize=(/2,elph_nb,1,elph_nb,elph_nk_bz,ph_modes/) + ipos =(/1,1,1,1,1,iq/) + isize=(/2,elph_nb,elph_nb,ph_modes,elph_nk_bz,1/) ! - netcdf_error = nf90_inq_varid(grpid, "vars", varid) - netcdf_error = nf90_get_var(grpid, varid, gkkp_abinit, ipos, isize) + varid = netcdf_inquire_varid(grpid, "gvals") + netcdf_error = nf90_get_var(grpid, varid, gstore_abinit, ipos, isize) ! !call ELPH_alloc("dV") ! @@ -169,11 +219,28 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! do ik=1,elph_nk_bz do i_modes=1,ph_modes - GKKP%dVc(i_modes,:,:,ik,1)=cmplx(gkkp_abinit(1,:,1,:,i_modes,ik),gkkp_abinit(2,:,1,:,ik,i_modes),kind=SP) - !GKKP%dVc(i_modes,:,:,ik,1)=cmplx(gkkp_abinit(1,:,1,:,i_modes,ik),gkkp_abinit(2,:,1,:,i_modes,ik),kind=SP) + GKKP%dVc(i_modes,:,:,ik,1)=cmplx(gstore_abinit(1,:,:,i_modes,ik,1),gstore_abinit(2,:,:,i_modes,ik,1),kind=SP) enddo enddo ! - deallocate(gkkp_abinit) + deallocate(gstore_abinit) + ! + ! Polarization vectors + ! + allocate(phdispl_cart_ibz(2,3,n_atoms,ph_modes,1)) + ! + ipos(1:5) =(/1,1,1,1,iq/) + isize(1:5)=(/2,3,n_atoms,ph_modes,1/) + ! + varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") + netcdf_error = nf90_get_var(ncid, varid, phdispl_cart_ibz, ipos(1:5), isize(1:5)) + ! + do xyz=1,3 + do i_atom=1,n_atoms + PH_pol_vector(:,i_atom,xyz,iq)=cmplx(phdispl_cart_ibz(1,xyz,i_atom,:,1),phdispl_cart_ibz(2,xyz,i_atom,:,1),kind=SP) + enddo + enddo + ! + deallocate(phdispl_cart_ibz) ! end subroutine a2y_gkkp diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index f201957f67..35ec504578 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -91,6 +91,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) do iq=1,elph_nQ YAMBO_ALLOC(GKKP%E_kpq(iq)%E,(elph_nb,nkbz,1)) YAMBO_ALLOC(GKKP%E_kpq(iq)%f,(elph_nb,nkbz,1)) + GKKP%E_kpq(iq)%E=0._SP enddo endif case ('DGRID') diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index e4fe862778..5847e7251b 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -58,8 +58,9 @@ integer function variables_ELPH(ID,what) ! NVAR=6 if (ver_is_gt_or_eq(ID,revision=18920)) NVAR=7 - if (ver_is_gt_or_eq(ID,revision=21565)) NVAR=8 + if (ver_is_gt_or_eq(ID,revision=21550)) NVAR=8 call def_variable_elemental(ID,"PARS",NVAR,SP,0) + ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Q points",I0=elph_nQ,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[avail]",DESCRIPTOR=ELPH_desc) @@ -72,7 +73,7 @@ integer function variables_ELPH(ID,what) call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) endif - if (ver_is_gt_or_eq(ID,revision=21565)) then + if (ver_is_gt_or_eq(ID,revision=21550)) then call io_variable_elemental(ID,VAR="[ELPH] Debay-Waller",L0=l_GKKP_hosts_DW,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) else @@ -113,7 +114,7 @@ integer function variables_ELPH(ID,what) enddo endif ! - if (ver_is_gt_or_eq(ID,revision=21565).or.elph_grids_are_expanded) then + if (ver_is_gt_or_eq(ID,revision=21550).or.elph_grids_are_expanded) then call io_bulk(ID,VAR="PH_K",VAR_SZ=(/nkbz,3/) ) call io_bulk(ID,R2=PH_kpt_bz(:,:)) endif From 8c875b750131ab1ae3605dd684a3180d62c1ea2d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 31 May 2022 10:50:11 +0200 Subject: [PATCH 0297/1367] Version 5.1.0, Revision 21747, Hash 2c31b3fe4 MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F NEW * exc-ph/EXCPH_eval_renorm.F Additions: -Code symplification Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_X_phass.F | 97 ++-------------------------------- src/exc-ph/EXCPH_eval_renorm.F | 90 +++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 95 deletions(-) create mode 100644 src/exc-ph/EXCPH_eval_renorm.F diff --git a/include/driver/version.h b/include/driver/version.h index a48bbd27af..22497707ee 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21746 -#define YAMBO_HASH "de4e8438c" +#define YAMBO_REVISION 21747 +#define YAMBO_HASH "2c31b3fe4" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 9c56a413e6..cac422c732 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ - EXCPH_double_grid_setup.o + EXCPH_double_grid_setup.o EXCPH_eval_renorm.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 132dc71fb2..8172606e5b 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -94,6 +94,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Epsilon_ii =cZERO PL_ii =cZERO + EXCPH_Renorm =rZERO + EXCPH_Renorm_PH_abs =rZERO + EXCPH_Renorm_PL =rZERO + EXCPH_Renorm_PL_PH_abs=rZERO ! call live_timing('Satellites',q%nibz) ! @@ -120,7 +124,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) enddo endif ! - call Eval_Renorm_Factor() + call EXCPH_eval_renorm(iq_bz,q,EXCPH_Renorm,EXCPH_Renorm_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs) ! do iw=1,wv%n_freqs ! @@ -169,11 +173,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call live_timing( ) ! - EXCPH_Renorm = EXCPH_Renorm/real(q%nbz,SP) - EXCPH_Renorm_PH_abs = EXCPH_Renorm_PH_abs/real(q%nbz,SP) - EXCPH_Renorm_PL = EXCPH_Renorm_PL/real(q%nbz,SP) - EXCPH_Renorm_PL_PH_abs= EXCPH_Renorm_PL_PH_abs/real(q%nbz,SP) - ! call msg('sr','Renormalization factors at finite temperature [Absorption]:') call msg('sr',' [ph-emission] [ph-absorption]') do i_alpha=EXCPH_states(1),EXCPH_states(2) @@ -280,91 +279,5 @@ subroutine Eval_Sat_Weights_DbGd() enddo ! i_alpha ! end subroutine - ! - subroutine Eval_Renorm_Factor() - use ELPH, ONLY:elph_branches,PH_freqs_sq - implicit none - ! - integer :: iq_idx,iq_fg,nq_around,iq_db - real(SP) :: N_bose,weight_dbgd - real(SP), external :: get_ph_E_DbGd - ! - if(.not.use_PH_DbGd.or..not.l_DbGd_WEIGHTs) then - ! - do il=elph_branches(1),elph_branches(2) - ! - !iq_db=DB_Q_map(iq_bz) - iq_db=Q_io_map(iq_bz) - ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) - if(ph_E @brief This subroutine add the contribution of the iq satellites +! to the renormalization factor R and R_PH_abs +! +! @param[in] iq_bz iq_bz index +! @param[in] q bz sampling +! +! @param[out] R renormalization factor +! @param[out] R_PH_abs renormalization factor for phonon-absorption +! @param[out] R_PL luminescence renormalization factor +! @param[out] R_PL_PH_abs luminescence renormalization factor for phonon-absorption + +! +subroutine EXCPH_eval_renorm(iq_bz,q,R,R_PH_abs,R_PL,R_PL_PH_abs) + ! + use pars, ONLY:SP,cZERO,rZERO + use R_lattice, ONLY:bz_samp + use functions, ONLY:bose_f + use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map + use EXCPH, ONLY:BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,EXCPH_sum,EXCPH_states,DB_Q_map + ! +#include + ! + integer, intent(in) :: iq_bz + type(bz_samp), intent(in) :: q + real(SP), intent(inout) :: R(EXCPH_states(2)), R_PH_abs(EXCPH_states(2)) + real(SP), intent(inout) :: R_PL(EXCPH_states(2)),R_PL_PH_abs(EXCPH_states(2)) + ! + ! Work space + ! + integer :: i_alpha,i_beta,il,iq_db + real(SP) :: ph_E,N_bose + ! + ! Add the contribution of the iq statellites to the renormalization factors + ! + do il=elph_branches(1),elph_branches(2) + ! + iq_db=Q_io_map(iq_bz) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) + if(ph_E Date: Tue, 31 May 2022 10:52:44 +0200 Subject: [PATCH 0298/1367] Version 5.1.0, Revision 21748, Hash 8c875b750 MODIFIED * include/driver/version.h exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F Additions: -Removed duplicated code Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_eval_sat.F | 7 +------ src/exc-ph/EXCPH_gkkp_driver.F | 6 ------ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 22497707ee..5724e476e8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21747 -#define YAMBO_HASH "2c31b3fe4" +#define YAMBO_REVISION 21748 +#define YAMBO_HASH "8c875b750" diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 21ba5bdb36..dfe956686b 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -29,8 +29,7 @@ subroutine EXCPH_eval_sat(iq,q) use D_lattice, ONLY:nsym use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & -& EXCPH_Renorm,EXCPH_Renorm_PH_abs,BS_E,BS_E_in,EXCPH_Gkkp_sq, & -& EXCPH_sum,EXCPH_states,DB_Q_map +& BS_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map ! #include ! @@ -46,7 +45,6 @@ subroutine EXCPH_eval_sat(iq,q) ! do il=elph_branches(1),elph_branches(2) ! - !iq_db=DB_Q_map(iq) iq_db=Q_io_map(iq) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_EFAN_deltaE_treshold) & & BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! - EXCPH_Renorm(i_alpha) = EXCPH_Renorm(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)/real(q%nbz,SP) - EXCPH_Renorm_PH_abs(i_alpha) = EXCPH_Renorm_PH_abs(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/real(q%nbz,SP) - ! enddo enddo ! diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index e473e6e064..0220ec00fd 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -443,7 +443,6 @@ end subroutine compare_qindxC_table ! subroutine EXCPH_gkkp_report() use stderr, ONLY:intc - use EXCPH, ONLY:EXCPH_Renorm_PH_abs,EXCPH_Renorm use units, ONLY:HA2EV use ELPH, ONLY:ph_freqs_sq implicit none @@ -454,11 +453,6 @@ subroutine EXCPH_gkkp_report() real(SP) :: ph_E integer :: iq_bz ! - call msg('sr',' Excitons renormalizations (without Bose factor): ') - do i1=EXCPH_states(1),EXCPH_states(2) - write(message,*) 'Exciton '//trim(intc(i1))//': R =',EXCPH_Renorm(i1),' R_abs =',EXCPH_Renorm_PH_abs(i1) - call msg('sr',message) - enddo call msg('sr',' Max satellite weight: ') do i1=EXCPH_states(1),EXCPH_states(2) iq_bz = max_Sat_pos(i1,1) ! q%k_table(max_Sat_pos(i1,1), 1) From 8d3358f5ae6ebc8d7a855f1b67649402465f7260 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 31 May 2022 10:58:28 +0200 Subject: [PATCH 0299/1367] Version 5.1.0, Revision 21749, Hash fc0e4fd3d MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Additions: -More information of divergente satellites Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5724e476e8..e7187af6b0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21748 -#define YAMBO_HASH "8c875b750" +#define YAMBO_REVISION 21749 +#define YAMBO_HASH "fc0e4fd3d" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 0220ec00fd..00184593fa 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -74,6 +74,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) integer :: il,iq,i1,i_star,iq_bz,iq_s,iq_db,elph_branches_save(2) real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) + real(SP), allocatable :: max_Sat_weight_PH_abs(:) + integer, allocatable :: max_Sat_pos_PH_abs(:,:) ! Debug !integer :: ik !open(1, file='K_grid_bz.dat') @@ -142,9 +144,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call EXCPH_gkkp_alloc() YAMBO_ALLOC(max_Sat_weight,(EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(max_Sat_pos,(EXCPH_states(1):EXCPH_states(2),3)) + YAMBO_ALLOC(max_Sat_weight_PH_abs,(EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(max_Sat_pos_PH_abs,(EXCPH_states(1):EXCPH_states(2),3)) ! max_Sat_weight=rZERO max_Sat_pos =0 + max_Sat_weight_PH_abs=rZERO + max_Sat_pos_PH_abs =0 ! ! Debug !call k_ibz2bz(k,"i",.false.) @@ -235,6 +241,11 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) max_Sat_pos(i1,1) =iq_db max_Sat_pos(i1,2:3) =maxloc(abs(BS_Sat_WEIGHT(:,:,i1))) endif + if(max_Sat_weight_PH_abs(i1) Date: Tue, 31 May 2022 13:44:16 +0200 Subject: [PATCH 0300/1367] Version 5.1.0, Revision 21750, Hash 8d3358f5a MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_eval_sat.F interface/INIT_activate.F NEW * exc-ph/EXCPH_eval_sat_DbGrid.F Additions: -Renormalization of satellite weights with double-grid Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_eval_sat.F | 6 +- src/exc-ph/EXCPH_eval_sat_DbGrid.F | 90 ++++++++++++++++++++++++++++++ src/interface/INIT_activate.F | 4 +- 5 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 src/exc-ph/EXCPH_eval_sat_DbGrid.F diff --git a/include/driver/version.h b/include/driver/version.h index e7187af6b0..9a5298594b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21749 -#define YAMBO_HASH "fc0e4fd3d" +#define YAMBO_REVISION 21750 +#define YAMBO_HASH "8d3358f5a" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index cac422c732..badf9e88e4 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ - EXCPH_double_grid_setup.o EXCPH_eval_renorm.o + EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_eval_sat_DbGrid.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index dfe956686b..847d831679 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! ! -subroutine EXCPH_eval_sat(iq,q) +subroutine EXCPH_eval_sat(iq_bz,q) ! use pars, ONLY:SP,cZERO,rZERO use R_lattice, ONLY:bz_samp @@ -33,7 +33,7 @@ subroutine EXCPH_eval_sat(iq,q) ! #include ! - integer, intent(in) :: iq + integer, intent(in) :: iq_bz type(bz_samp), intent(in) :: q ! ! Work space @@ -45,7 +45,7 @@ subroutine EXCPH_eval_sat(iq,q) ! do il=elph_branches(1),elph_branches(2) ! - iq_db=Q_io_map(iq) + iq_db=Q_io_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) if(ph_E + ! + integer, intent(in) :: iq_bz + type(bz_samp), intent(in) :: q + ! + ! Work space + ! + integer :: i_alpha,i_beta,il,iq_db,iq_fg,nq_around,iq_idx + real(SP) :: ph_E,weight_DbGd,E_alpha,E_beta + complex(SP) :: W_DG,W_DG_PH_abs + real(SP), external :: get_ph_E_DbGd + ! + nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz + weight_dbgd=1._SP/real(nq_around,SP) + ! + ! Calculate satellites weights and renormalization factors without double-grid + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + E_alpha =BS_E_in(i_alpha) + ! + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + do il=elph_branches(1),elph_branches(2) + ! + W_DG=cZERO + W_DG_PH_abs=cZERO + ! + ! Renormalize satellite weight with double-grid + ! + do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! + ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) + ! + iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 + ! + ! Excitonic energies in the double-grid + ! + E_beta =EXC_E_DbGd(i_beta,iq_fg) + ! + W_DG =W_DG + 1._SP/(E_beta-E_alpha+ph_E+cI*L_damping) + W_DG_PH_abs=W_DG_PH_abs + 1._SP/(E_beta-E_alpha-ph_E+cI*L_damping) + ! + enddo + ! + W_DG =W_DG *weight_dbgd* abs(BS_Sat_E(il,i_beta,i_alpha)) + W_DG_PH_abs=W_DG_PH_abs*weight_dbgd*abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha)) + ! + BS_Sat_WEIGHT(il,i_beta,i_alpha) =BS_Sat_WEIGHT(il,i_beta,i_alpha) *abs(W_DG)**2 + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*abs(W_DG_PH_abs)**2 + ! + enddo ! il + enddo ! i_beta + enddo ! i_alpha + ! +end subroutine diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index b01a87d1b0..7b88dba234 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -456,8 +456,8 @@ subroutine INIT_activate() ! ! Exciton-phonon Self-energy ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl LDamping') + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact LDamping') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) & & call initactivate(1,'BoseTemp ElPhModes EXCTemp DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') ! From e561d30832cfa2f037fdbac0f5c159198c4870c1 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 31 May 2022 21:24:52 +0200 Subject: [PATCH 0301/1367] Version 5.1.0, Revision 21751, Hash 380be32a5 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F io/io_EXCPH_gkkp.F Changes: -Satellites are calculated only in optics and not stored on file Removed duplicated code Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_X_phass.F | 67 ++-------------------- src/exc-ph/EXCPH_eval_sat.F | 10 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 101 +++++++++++++-------------------- src/exc-ph/EXCPH_lifetime.F | 4 +- src/exc-ph/EXCPH_optics.F | 5 +- src/io/io_EXCPH_gkkp.F | 78 ++++++------------------- 7 files changed, 76 insertions(+), 193 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9a5298594b..71f9b6e59d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21750 -#define YAMBO_HASH "8d3358f5a" +#define YAMBO_REVISION 21751 +#define YAMBO_HASH "380be32a5" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 8172606e5b..8905c7f163 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -79,7 +79,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Load the Exciton-phonon elements and phonon energies ! call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') + io_err=io_EXCPH_gkkp(ID_exc_gkkp) if(io_err/=0) call error('excph_gkkp databases not found!') ! elph_branches_save=elph_branches @@ -104,7 +104,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do iq_bz=1,q%nbz ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'satellites') + io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) @@ -115,15 +115,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! for all excionts i_alpha ! if(use_PH_DbGd.and.l_DbGd_WEIGHTs) then - call Eval_Sat_Weights_DbGd() - elseif(use_PH_DbGd.and..not.l_DbGd_WEIGHTs) then - do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) - iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 - BS_Sat_W_DG(:,:,:,iq_idx)=BS_Sat_WEIGHT - BS_Sat_W_DG_PH_abs(:,:,:,iq_idx)=BS_Sat_WEIGHT_PH_abs - enddo + ! call Eval_Sat_Weights_DbGd() endif ! + call EXCPH_eval_sat(iq_bz,q,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs) + ! call EXCPH_eval_renorm(iq_bz,q,EXCPH_Renorm,EXCPH_Renorm_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs) ! do iw=1,wv%n_freqs @@ -227,57 +223,4 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call Sat_free() call Renorm_free() ! - contains - ! - subroutine Eval_Sat_Weights_DbGd() - use EXCPH, ONLY:BS_Sat_E - implicit none - ! - real(SP) :: E_beta,bose_factor,EXC_gkkp_sq - integer :: iq_fg,iq_idx - real(SP), external :: get_ph_E_DbGd - ! - BS_Sat_W_DG =rZERO - BS_Sat_W_DG_PH_abs=rZERO - ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - ! - E_alpha =BS_E_in(i_alpha) - ! - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - ! - do il=elph_branches(1),elph_branches(2) - ! - ! calculate for all point of the double-grid - ! - EXC_gkkp_sq=BS_Sat_WEIGHT(il,i_beta,i_alpha)*abs(BS_Sat_E(il,i_beta,i_alpha)) - ! - do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) - ! - ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) - ! - iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 - ! - bose_factor=bose_f(PH_E) - ! - ! Excitonic energies in the double-grid - ! - E_beta =EXC_E_DbGd(i_beta,iq_fg) - ! - if(ph_EFAN_deltaE_treshold) & -& BS_Sat_W_DG(il,i_beta,i_alpha,iq_idx) =EXC_gkkp_sq/abs(E_beta-E_alpha+ph_E)**2 - ! - if(abs(E_beta-E_alpha-ph_E)>FAN_deltaE_treshold) & -& BS_Sat_W_DG_PH_abs(il,i_beta,i_alpha,iq_idx)=EXC_gkkp_sq/abs(E_beta-E_alpha-ph_E)**2 - ! - enddo - ! - enddo ! il - enddo ! i_beta - enddo ! i_alpha - ! - end subroutine - ! end subroutine EXCPH_X_phass diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 847d831679..6b399fcaf9 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -29,7 +29,7 @@ subroutine EXCPH_eval_sat(iq_bz,q) use D_lattice, ONLY:nsym use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & -& BS_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map +& BS_all_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map ! #include ! @@ -38,11 +38,13 @@ subroutine EXCPH_eval_sat(iq_bz,q) ! ! Work space ! - integer :: i_alpha,i_beta,il,iq_db + integer :: i_alpha,i_beta,il,iq_db,iq_ibz real(SP) :: ph_E ! ! Calculate satellites weights and renormalization factors without double-grid ! + iq_ibz=q%sstar(iq_bz,1) + ! do il=elph_branches(1),elph_branches(2) ! iq_db=Q_io_map(iq_bz) @@ -52,8 +54,8 @@ subroutine EXCPH_eval_sat(iq_bz,q) do i_alpha=EXCPH_states(1),EXCPH_states(2) do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! - BS_Sat_E (il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)+ph_E - BS_Sat_E_PH_abs(il,i_beta,i_alpha)=BS_E(i_beta)-BS_E_in(i_alpha)-ph_E + BS_Sat_E (il,i_beta,i_alpha)=BS_all_E(i_beta,iq_ibz)-BS_E_in(i_alpha)+ph_E + BS_Sat_E_PH_abs(il,i_beta,i_alpha)=BS_all_E(i_beta,iq_ibz)-BS_E_in(i_alpha)-ph_E ! if(abs(BS_Sat_E(il,i_beta,i_alpha))>FAN_deltaE_treshold) & & BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E(il,i_beta,i_alpha))**2 diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 00184593fa..6e82305846 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -30,36 +30,26 @@ !! !! @param[out] EXCPH_gkkp Exciton-phonon matrix elements !! @param[out] EXCPH_gkkp_sq Exciton-phonon matrix elements squared -!! @param[out] EXCPH_Renorm Excitonn renormalization factor R -!! @param[out] EXCPH_Renorm_PH_abs Excitonn renormalization factor R_PH_abs for absorbed phonons -!! @param[out] BS_Sat_E Satellite energy differences -!! @param[out] BS_Sat_E_PH_abs Satellite energy differences for absorbed phonons -!! @param[out] BS_Sat_WEIGHT Satellite weight -!! @param[out] BS_Sat_WEIGHT_PH_abs Satellite weight for absorbed phonons ! subroutine EXCPH_gkkp_driver(E,k,q,X) ! use pars, ONLY:SP,cZERO,rZERO,schlen use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp,qindx_B !_load - use D_lattice, ONLY:nsym use parser_m, ONLY:parser use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig - use BS, ONLY:BS_H_dim,BS_bands,BS_res_ares_n_mat,BS_K_dim,BSqpts + use BS, ONLY:BS_H_dim,BS_bands,BS_K_dim,BSqpts use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& -& EXCPH_states,EXCPH_sum,EXCPH_kind,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & -& BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,Sat_alloc,Sat_free,DB_Q_map, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free,EXCPH_Renorm,EXCPH_Renorm_PH_abs,Renorm_alloc,Renorm_free,& -& l_const_elph,l_abs_elph,l_abs_exc,n_exc_in +& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg - use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts ! #include ! @@ -71,7 +61,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID - integer :: il,iq,i1,i_star,iq_bz,iq_s,iq_db,elph_branches_save(2) + integer :: il,iq_bz,iq,i1,i_star,iq_s,iq_db,elph_branches_save(2) real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) real(SP), allocatable :: max_Sat_weight_PH_abs(:) @@ -189,9 +179,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') ! - call Sat_alloc() - call Renorm_alloc() - ! ! Get q-point coordinates in the q-BZ YAMBO_ALLOC(EXCPH_q,(q%nbz,3)) call get_excph_q_momenta() @@ -224,34 +211,27 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Add the WEIGHTs factor to calculate the renormalization factors ! - BS_Sat_E =rZERO - BS_Sat_E_PH_abs =rZERO - BS_Sat_WEIGHT =rZERO - BS_Sat_WEIGHT_PH_abs=rZERO - ! - !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) - call EXCPH_eval_sat(iq_bz,q) ! ! Find the maximum weight of the satellites ! - do i1=EXCPH_states(1),EXCPH_states(2) - if(max_Sat_weight(i1) ! integer ::ID - character(*) ::what ! !Work Space ! integer :: iq,ierr,VAR_size(4),VAR_size_sq(3),ID_frag character(schlen) :: db_name,VAR_name,dim_names(4),dim_names_sq(3) - logical :: l_excph_gkkp,l_excph_satellites ! call timing('io_EXCPH_gkkp',OPR='start') ! - l_excph_gkkp =.FALSE. - l_excph_satellites=.FALSE. - ! - if (index(what,'gkkp')>0) l_excph_gkkp =.TRUE. - if (index(what,'satellites')>0) l_excph_satellites=.TRUE. - if (index(what,'all')>0) then - l_excph_gkkp=.TRUE. - l_excph_satellites=.TRUE. - endif - ! ID_frag=0 io_EXCPH_gkkp=0 ! @@ -115,8 +102,6 @@ integer function io_EXCPH_gkkp(ID,what) iq=maxval(io_sec(ID,:))-1 if (iq<=0) goto 1 ! - if(.not.l_excph_gkkp.and..not.l_excph_satellites) goto 1 - ! ! Fragmentation ! call io_fragment(ID,ID_frag,i_fragment=iq,ierr=ierr) @@ -138,52 +123,25 @@ integer function io_EXCPH_gkkp(ID,what) ! Excitonic Gkkp (and SE) fragments !========================= ! - if (read_is_on(ID)) then - if(.not.allocated(EXCPH_gkkp).and.l_excph_gkkp ) call EXCPH_gkkp_alloc() - if(.not.allocated(BS_Sat_E) .and.l_excph_satellites) call Sat_alloc() - endif + if (read_is_on(ID).and..not.allocated(EXCPH_gkkp)) call EXCPH_gkkp_alloc() ! - if(l_excph_gkkp) then - ! - if (.not. read_is_on(ID)) then - VAR_name="EXCPH_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,(/3/),SP) - call io_variable_bulk(ID_frag,1,R1=EXCPH_q(iq,:)) - endif - ! - VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) - VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) - dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=EXCPH_gkkp) - ! - VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) - VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) - dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) - ! + if (.not. read_is_on(ID)) then + VAR_name="EXCPH_Q"//trim(intc(iq)) + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/3/),SP) + call io_variable_bulk(ID_frag,1,R1=EXCPH_q(iq,:)) endif ! - if(l_excph_satellites) then - ! - VAR_name="EXCITON_SATELLITE_ENERGY_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=BS_Sat_E) - ! - VAR_name="EXCITON_SATELLITE_ENERGY_ph_abs_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) - call io_variable_bulk(ID_frag,1,C3=BS_Sat_E_PH_abs) - ! - VAR_name="EXCITON_SATELLITE_WEIGHT_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT) - ! - VAR_name="EXCITON_SATELLITE_WEIGHT_ph_abs_Q"//trim(intc(iq)) - call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) - call io_variable_bulk(ID_frag,1,R3=BS_Sat_WEIGHT_PH_abs) - ! - endif + VAR_name="EXCITON_PH_GKKP_Q"//trim(intc(iq)) + VAR_size=(/2,ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names = [character(schlen) :: 'complex','PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size,SP,dim_names) + call io_variable_bulk(ID_frag,1,C3=EXCPH_gkkp) + ! + VAR_name="EXCITON_PH_GKKP_SQUARED_Q"//trim(intc(iq)) + VAR_size_sq=(/ph_modes,EXCPH_sum(2),EXCPH_states(2)/) + dim_names_sq = [character(schlen) :: 'PH_modes','N_exc_sum','N_exc_states'] + call def_variable_bulk(ID_frag,trim(VAR_name),1,VAR_size_sq,SP,dim_names_sq) + call io_variable_bulk(ID_frag,1,R3=EXCPH_gkkp_sq) ! io_EXCPH_gkkp=io_status(ID) ! From 13f9cdb9f862f032055482d14001acdd01fb67b5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 31 May 2022 21:26:32 +0200 Subject: [PATCH 0302/1367] Version 5.1.0, Revision 21752, Hash e561d3083 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Small fix Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 71f9b6e59d..29694d9cdc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21751 -#define YAMBO_HASH "380be32a5" +#define YAMBO_REVISION 21752 +#define YAMBO_HASH "e561d3083" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 8905c7f163..a0873a0c18 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -118,7 +118,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call Eval_Sat_Weights_DbGd() endif ! - call EXCPH_eval_sat(iq_bz,q,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs) + call EXCPH_eval_sat(iq_bz,q) ! call EXCPH_eval_renorm(iq_bz,q,EXCPH_Renorm,EXCPH_Renorm_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs) ! From a362082b2cfba67c5deedf66e5133d01310b4113 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 31 May 2022 21:42:44 +0200 Subject: [PATCH 0303/1367] Version 5.1.0, Revision 21753, Hash 13f9cdb9f MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_gkkp_eval.F Changes: -Satellite reports moved in optics Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_X_phass.F | 93 ++++++++++++++++++++++++++++++++++-- src/exc-ph/EXCPH_gkkp_eval.F | 2 +- 3 files changed, 91 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 29694d9cdc..2c9ccd6856 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21752 -#define YAMBO_HASH "e561d3083" +#define YAMBO_REVISION 21753 +#define YAMBO_HASH "13f9cdb9f" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index a0873a0c18..5474fe731a 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -68,6 +68,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer :: iq_fg,iq_idx,iq_db integer :: elph_branches_save(2) + ! + real(SP), allocatable :: max_Sat_weight(:) + integer, allocatable :: max_Sat_pos(:,:) + real(SP), allocatable :: max_Sat_weight_PH_abs(:) + integer, allocatable :: max_Sat_pos_PH_abs(:,:) + ! integer, external :: io_EXCPH_gkkp,io_ELPH ! min_pos =minloc(BS_all_E(1,:)) @@ -88,7 +94,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) if(io_err/=0) call error('gkkp_expanded databases not found!') elph_branches=elph_branches_save ! - ! The satellites + ! Renormalization factors ! call Renorm_alloc() ! @@ -99,6 +105,18 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) EXCPH_Renorm_PL =rZERO EXCPH_Renorm_PL_PH_abs=rZERO ! + ! Max and min satellites Energies + ! + YAMBO_ALLOC(max_Sat_weight,(EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(max_Sat_pos,(EXCPH_states(1):EXCPH_states(2),3)) + YAMBO_ALLOC(max_Sat_weight_PH_abs,(EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(max_Sat_pos_PH_abs,(EXCPH_states(1):EXCPH_states(2),3)) + ! + max_Sat_weight=rZERO + max_Sat_pos =0 + max_Sat_weight_PH_abs=rZERO + max_Sat_pos_PH_abs =0 + ! call live_timing('Satellites',q%nibz) ! do iq_bz=1,q%nbz @@ -114,11 +132,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Add the contribution of q-point transition to the renormalization factors ! for all excionts i_alpha ! - if(use_PH_DbGd.and.l_DbGd_WEIGHTs) then - ! call Eval_Sat_Weights_DbGd() - endif + call EXCPH_eval_sat(iq_bz,q) ! - call EXCPH_eval_sat(iq_bz,q) + !if(use_PH_DbGd.and.l_DbGd_WEIGHTs) call Eval_Sat_Weights_DbGd() + ! + call Find_Max_Sat() ! call EXCPH_eval_renorm(iq_bz,q,EXCPH_Renorm,EXCPH_Renorm_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs) ! @@ -169,6 +187,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call live_timing( ) ! + call Sat_report() + ! call msg('sr','Renormalization factors at finite temperature [Absorption]:') call msg('sr',' [ph-emission] [ph-absorption]') do i_alpha=EXCPH_states(1),EXCPH_states(2) @@ -223,4 +243,67 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call Sat_free() call Renorm_free() ! + contains + ! + subroutine Find_Max_Sat() + implicit none + ! + ! Work Space + ! + integer :: i1 + ! + ! Find the maximum weight of the satellites + ! + do i1=EXCPH_states(1),EXCPH_states(2) + if(max_Sat_weight(i1) Date: Tue, 31 May 2022 21:52:25 +0200 Subject: [PATCH 0304/1367] Version 5.1.0, Revision 21754, Hash a362082b2 MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_gkkp_driver.F RENAMED * exc-ph/EXCPH_eval_sat_DbGrid.F -> exc-ph/EXCPH_ave_sat_DbGrid.F Changes: -Code cleaning Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_X_phass.F | 17 ++--- ...al_sat_DbGrid.F => EXCPH_ave_sat_DbGrid.F} | 2 +- src/exc-ph/EXCPH_gkkp_driver.F | 73 +------------------ 5 files changed, 15 insertions(+), 83 deletions(-) rename src/exc-ph/{EXCPH_eval_sat_DbGrid.F => EXCPH_ave_sat_DbGrid.F} (98%) diff --git a/include/driver/version.h b/include/driver/version.h index 2c9ccd6856..d0123111b9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21753 -#define YAMBO_HASH "13f9cdb9f" +#define YAMBO_REVISION 21754 +#define YAMBO_HASH "a362082b2" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index badf9e88e4..8b556040b4 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ - EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_eval_sat_DbGrid.o + EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 5474fe731a..2293830099 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -28,7 +28,6 @@ ! ! @param[in] wv frequencies range ! @param[in] EXCPH_gkkp read from file -! @param[in] PH_E read from file ! @param[in] Bose_Temp Bose temperature for phonons ! @param[in] Boltz_Temp Boltz temperature for excitons ! @@ -43,14 +42,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV,HA2CMm1 use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,BS_Sat_W_DG,& -& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,EXC_E_DbGd,min_EXC_E_DbGd, & -& BS_Sat_W_DG_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,DB_Q_map, & -& l_DbGd_WEIGHTs - use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,ph_modes,Q_io_map + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& +& BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,min_EXC_E_DbGd, & +& EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,l_DbGd_WEIGHTs + use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset - use D_lattice, ONLY:nsym use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc @@ -64,9 +61,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Work space ! complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E,E_alpha,PH_E + real(SP) :: min_E,exc_E integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: iq_fg,iq_idx,iq_db + integer :: iq_db integer :: elph_branches_save(2) ! real(SP), allocatable :: max_Sat_weight(:) @@ -134,7 +131,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call EXCPH_eval_sat(iq_bz,q) ! - !if(use_PH_DbGd.and.l_DbGd_WEIGHTs) call Eval_Sat_Weights_DbGd() + if(use_PH_DbGd.and.l_DbGd_WEIGHTs) call EXCPH_ave_sat_DbGrid(iq_bz,q) ! call Find_Max_Sat() ! diff --git a/src/exc-ph/EXCPH_eval_sat_DbGrid.F b/src/exc-ph/EXCPH_ave_sat_DbGrid.F similarity index 98% rename from src/exc-ph/EXCPH_eval_sat_DbGrid.F rename to src/exc-ph/EXCPH_ave_sat_DbGrid.F index 75e14f3921..be84ed8e31 100644 --- a/src/exc-ph/EXCPH_eval_sat_DbGrid.F +++ b/src/exc-ph/EXCPH_ave_sat_DbGrid.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! ! -subroutine EXCPH_eval_sat_DbGrid(iq_bz,q) +subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! use pars, ONLY:SP,cZERO,rZERO,cI use R_lattice, ONLY:bz_samp diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 6e82305846..9f8cf497c9 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -39,13 +39,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use parser_m, ONLY:parser use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig - use BS, ONLY:BS_H_dim,BS_bands,BS_K_dim,BSqpts + use BS, ONLY:BS_H_dim,BS_bands,BSqpts use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& -& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,Xi,build_Q_map,EXCPH_q, & +& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing @@ -61,11 +61,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID - integer :: il,iq_bz,iq,i1,i_star,iq_s,iq_db,elph_branches_save(2) - real(SP), allocatable :: max_Sat_weight(:) - integer, allocatable :: max_Sat_pos(:,:) - real(SP), allocatable :: max_Sat_weight_PH_abs(:) - integer, allocatable :: max_Sat_pos_PH_abs(:,:) + integer :: il,iq_bz,iq,i_star,iq_s,iq_db,elph_branches_save(2) ! Debug !integer :: ik !open(1, file='K_grid_bz.dat') @@ -132,15 +128,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Alloage EXCPH_gkkp ! call EXCPH_gkkp_alloc() - YAMBO_ALLOC(max_Sat_weight,(EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(max_Sat_pos,(EXCPH_states(1):EXCPH_states(2),3)) - YAMBO_ALLOC(max_Sat_weight_PH_abs,(EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(max_Sat_pos_PH_abs,(EXCPH_states(1):EXCPH_states(2),3)) - ! - max_Sat_weight=rZERO - max_Sat_pos =0 - max_Sat_weight_PH_abs=rZERO - max_Sat_pos_PH_abs =0 ! ! Debug !call k_ibz2bz(k,"i",.false.) @@ -213,20 +200,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! iq_db=Q_io_map(iq_bz) ! - ! Find the maximum weight of the satellites - ! -! do i1=EXCPH_states(1),EXCPH_states(2) -! if(max_Sat_weight(i1) Date: Tue, 31 May 2022 21:57:22 +0200 Subject: [PATCH 0305/1367] Version 5.1.0, Revision 21755, Hash c1208244a MODIFIED * include/driver/version.h exc-ph/EXCPH_ave_sat_DbGrid.F exc-ph/EXCPH_eval_renorm.F Bugs: -Fixed bug with double-grid indexes in Satellites Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_ave_sat_DbGrid.F | 22 ++++++++++++++++------ src/exc-ph/EXCPH_eval_renorm.F | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d0123111b9..d5fd9a1307 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21754 -#define YAMBO_HASH "a362082b2" +#define YAMBO_REVISION 21755 +#define YAMBO_HASH "c1208244a" diff --git a/src/exc-ph/EXCPH_ave_sat_DbGrid.F b/src/exc-ph/EXCPH_ave_sat_DbGrid.F index be84ed8e31..ede2ce1b34 100644 --- a/src/exc-ph/EXCPH_ave_sat_DbGrid.F +++ b/src/exc-ph/EXCPH_ave_sat_DbGrid.F @@ -26,11 +26,9 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! use pars, ONLY:SP,cZERO,rZERO,cI use R_lattice, ONLY:bz_samp - use D_lattice, ONLY:nsym - use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map + use ELPH, ONLY:elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs,PH_freqs_sq use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & -& BS_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map, & -& L_damping,EXC_E_DbGd +& BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,L_damping,EXC_E_DbGd ! #include ! @@ -39,7 +37,7 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! ! Work space ! - integer :: i_alpha,i_beta,il,iq_db,iq_fg,nq_around,iq_idx + integer :: i_alpha,i_beta,il,iq_db,iE_fg,iq_fg,nq_around,iq_idx real(SP) :: ph_E,weight_DbGd,E_alpha,E_beta complex(SP) :: W_DG,W_DG_PH_abs real(SP), external :: get_ph_E_DbGd @@ -64,7 +62,19 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! - ph_E=get_ph_E_DbGd(il,iq_fg,iq_bz,q) + if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + iq_db=Q_io_map(iq_bz) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) + ! + ! If there is the double-grid I read the gamma phonons from there + ! because they include the LO-TO splitting and the acustic sum rule + ! + if(iq_bz==1) ph_E=PH_freqs%FG%E(il,1,1) + ! + else + iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + endif ! iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 ! diff --git a/src/exc-ph/EXCPH_eval_renorm.F b/src/exc-ph/EXCPH_eval_renorm.F index 01cad7d5ea..ac1dd17f9e 100644 --- a/src/exc-ph/EXCPH_eval_renorm.F +++ b/src/exc-ph/EXCPH_eval_renorm.F @@ -39,7 +39,7 @@ subroutine EXCPH_eval_renorm(iq_bz,q,R,R_PH_abs,R_PL,R_PL_PH_abs) use R_lattice, ONLY:bz_samp use functions, ONLY:bose_f use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map - use EXCPH, ONLY:BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,EXCPH_sum,EXCPH_states,DB_Q_map + use EXCPH, ONLY:BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,EXCPH_sum,EXCPH_states ! #include ! From 2bf6fd47890cdaccea158bbe3193b2ca3902ed8e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Jun 2022 09:45:19 +0200 Subject: [PATCH 0306/1367] Version 5.1.0, Revision 21583, Hash a89433aed MODIFIED * include/driver/version.h io/io_ELPH.F Bugs: - [yambo_ph] fixed bug introduced with merge Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_ELPH.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d8a24f6425..4f609afeb5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21551 -#define YAMBO_HASH "f200b4c8d" +#define YAMBO_REVISION 21583 +#define YAMBO_HASH "a89433aed" diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index acaf30811e..b4d2f74d58 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -27,7 +27,7 @@ integer function io_ELPH(ID,what) use IO_m, ONLY:io_sec,read_is_on,frag_ELPH use IO_int, ONLY:io_connect,io_disconnect,io_fragment,& & io_bulk,io_header - use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& + use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,l_GKKP_DW,& & PH_pol_vector,GKKP,elph_grids_are_expanded,GKKP,GKKP_bare use stderr, ONLY:intc use interfaces, ONLY:ELPH_alloc From 79dca7891f88926c0869d6d7732f80f3a511cc7a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 1 Jun 2022 10:02:34 +0200 Subject: [PATCH 0307/1367] Version 5.1.0, Revision 21756, Hash bbc698789 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_ave_sat_DbGrid.F exc-ph/Satellite_DbGrid.F Additions: -Fixed double-grid for Satellites weights Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 1 - src/exc-ph/EXCPH_ave_sat_DbGrid.F | 4 +--- src/exc-ph/Satellite_DbGrid.F | 17 +++++------------ 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d5fd9a1307..c920b1af04 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21755 -#define YAMBO_HASH "c1208244a" +#define YAMBO_REVISION 21756 +#define YAMBO_HASH "bbc698789" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 2293830099..f9a3c44c68 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -121,7 +121,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! - !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') diff --git a/src/exc-ph/EXCPH_ave_sat_DbGrid.F b/src/exc-ph/EXCPH_ave_sat_DbGrid.F index ede2ce1b34..e5cc90f17a 100644 --- a/src/exc-ph/EXCPH_ave_sat_DbGrid.F +++ b/src/exc-ph/EXCPH_ave_sat_DbGrid.F @@ -37,7 +37,7 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! ! Work space ! - integer :: i_alpha,i_beta,il,iq_db,iE_fg,iq_fg,nq_around,iq_idx + integer :: i_alpha,i_beta,il,iq_db,iE_fg,iq_fg,nq_around real(SP) :: ph_E,weight_DbGd,E_alpha,E_beta complex(SP) :: W_DG,W_DG_PH_abs real(SP), external :: get_ph_E_DbGd @@ -76,8 +76,6 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid endif ! - iq_idx=iq_fg-q%FGbz%k_range(iq_bz,1)+1 - ! ! Excitonic energies in the double-grid ! E_beta =EXC_E_DbGd(i_beta,iq_fg) diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 3c539d70ae..0e43a24d5d 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2021 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AC +! Authors (see AUTHORS file for details): AC FP ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -39,8 +39,7 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss use R_lattice, ONLY:bz_samp use units, ONLY:HA2EV use pars, ONLY:SP,cZERO,rZERO - use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,BS_Sat_E,l_DbGd_WEIGHTs, & -& BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,l_DbGd_PH_only,BS_Sat_E_PH_abs, & + use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,l_DbGd_PH_only,BS_Sat_E_PH_abs, & BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,min_EXC_E,l_no_matrix_elements use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq,Q_io_map use functions, ONLY:bose_f,boltzman_f @@ -56,21 +55,15 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! real(SP) :: PH_E,E_alpha,boltzm_factor,weight_dbgd,E_beta,BS_ave_W,BS_ave_W_PH_abs,bose_factor complex(SP) :: BS_Sat_E_DbGd,BS_Sat_E_DbGd_PH_abs - integer :: nq_around,iq_fg,iq_idx,iE_fg,iq_ibz,iq_db + integer :: nq_around,iq_fg,iE_fg,iq_ibz,iq_db complex(SP) :: pole real(SP), external :: get_ph_E_DbGd ! nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz weight_dbgd=1._SP/real(nq_around,SP) ! - ! Calculate the Satellite Weight - ! - if(l_DbGd_WEIGHTs) then - call error('Implementation to be checked ') - else - BS_ave_W =BS_Sat_WEIGHT(il,i_beta,i_alpha) - BS_ave_W_PH_abs=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) - endif + BS_ave_W =BS_Sat_WEIGHT(il,i_beta,i_alpha) + BS_ave_W_PH_abs=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) ! if(l_no_matrix_elements) then BS_ave_W =1._SP From 53c51dffd5bf8a5967d12a98d4e35b3755b2c915 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 1 Jun 2022 11:08:37 +0200 Subject: [PATCH 0308/1367] Version 5.1.0, Revision 21757, Hash 79dca7891 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Added w**3 factor for the luminescence without satellites Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c920b1af04..79519a7790 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21756 -#define YAMBO_HASH "bbc698789" +#define YAMBO_REVISION 21757 +#define YAMBO_HASH "79dca7891" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index f9a3c44c68..85f128269d 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -218,7 +218,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! exc_E=BS_all_E(i_alpha,1)-min_E pole =BS_all_E(i_alpha,1) - PL_ii(iw,1:2) =PL_ii(iw,1:2) +(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & + PL_ii(iw,1:2) =PL_ii(iw,1:2) + W**3*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo @@ -232,7 +232,6 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Eps(w)=1._SP - X(w) in agreement with definition in src/bse/ ! Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) - PL_ii =-PL_ii ! ! Free ! @@ -286,6 +285,8 @@ subroutine Sat_report() write(message,*) ' for iq = '//intc(max_Sat_pos(i1,1))//' il = '//intc(max_Sat_pos(i1,2))//' ib = ' & & //intc(max_Sat_pos(i1,3)),' w(iq,il) = ',ph_E*HA2EV*1000._SP,'meV' call msg('sr',message) + write(message,*) ' E(in) = ',real(BS_E_in(i1))*HA2EV, ' E(out)= ',BS_all_E(max_Sat_pos(i1,3),max_Sat_pos(i1,1))*HA2EV + call msg('sr',message) enddo ! call msg('sr',' Max satellite weight (phonon absorption): ') @@ -296,7 +297,9 @@ subroutine Sat_report() call msg('sr',message) write(message,*) ' for iq = '//intc(max_Sat_pos_PH_abs(i1,1))//' il = '//intc(max_Sat_pos_PH_abs(i1,2))//' ib = ' & & //intc(max_Sat_pos_PH_abs(i1,3)),' w(iq,il) = ',ph_E*HA2EV*1000._SP,'meV' - call msg('sr',message) + call msg('sr',message) + write(message,*) ' E(in) = ',real(BS_E_in(i1))*HA2EV, ' E(out)= ',BS_all_E(max_Sat_pos(i1,3),max_Sat_pos(i1,1))*HA2EV + call msg('sr',message) enddo ! end subroutine Sat_report From c7b8e507febe7922dfb9ae209c962a8244f2a3cc Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 1 Jun 2022 12:46:05 +0200 Subject: [PATCH 0309/1367] Version 5.1.0, Revision 21758, Hash 53c51dffd MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_renorm.F exc-ph/Satellite_Simple.F Changes: -Changed renormalization factor for luminescence (to be checked again) Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 10 ++++++---- src/exc-ph/EXCPH_eval_renorm.F | 4 ++-- src/exc-ph/Satellite_Simple.F | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 79519a7790..19fa80f06c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21757 -#define YAMBO_HASH "79dca7891" +#define YAMBO_REVISION 21758 +#define YAMBO_HASH "53c51dffd" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 85f128269d..fb901ab7b8 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -165,8 +165,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Add the satellites to the dielectric constant and luminescence ! Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) - PL_ii(iw,1) =PL_ii(iw,1)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) Epsilon_ii(iw,3)=Epsilon_ii(iw,3)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) + ! + PL_ii(iw,1) =PL_ii(iw,1)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) PL_ii(iw,3) =PL_ii(iw,3)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) ! enddo @@ -216,9 +217,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! [FP] Luminescence in RS (detailed balance) assumption requires Lin=Lout. ! Maybe put a check/logical enforcing this for PL? ! - exc_E=BS_all_E(i_alpha,1)-min_E - pole =BS_all_E(i_alpha,1) - PL_ii(iw,1:2) =PL_ii(iw,1:2) + W**3*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & + exc_E=BS_E_in(i_alpha)-min_E + pole =BS_E_in(i_alpha) + PL_ii(iw,1:2) =PL_ii(iw,1:2) + (1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo @@ -232,6 +233,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Eps(w)=1._SP - X(w) in agreement with definition in src/bse/ ! Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) + PL_ii =-PL_ii ! ! Free ! diff --git a/src/exc-ph/EXCPH_eval_renorm.F b/src/exc-ph/EXCPH_eval_renorm.F index ac1dd17f9e..975f4335e4 100644 --- a/src/exc-ph/EXCPH_eval_renorm.F +++ b/src/exc-ph/EXCPH_eval_renorm.F @@ -72,7 +72,7 @@ subroutine EXCPH_eval_renorm(iq_bz,q,R,R_PH_abs,R_PL,R_PL_PH_abs) ! ! Phonon absorption in luminescence [photon emission / phonon absorption] ! - R_PL_PH_abs(i_alpha) = R_PL_PH_abs(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*N_bose/real(q%nbz,SP) + R_PL_PH_abs(i_alpha) = R_PL_PH_abs(i_alpha) + BS_Sat_WEIGHT(il,i_beta,i_alpha)*(1._SP+N_bose)/real(q%nbz,SP) ! ! Phonon absorption in absorption [photon absorption / phonon absorption] ! @@ -80,7 +80,7 @@ subroutine EXCPH_eval_renorm(iq_bz,q,R,R_PH_abs,R_PL,R_PL_PH_abs) ! ! Phonon emission in luminescence [photon emission / phonon emission] ! - R_PL(i_alpha) = R_PL(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*(1._SP+N_bose)/real(q%nbz,SP) + R_PL(i_alpha) = R_PL(i_alpha) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*N_bose/real(q%nbz,SP) ! enddo enddo diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index 586f81dbdf..43559776c3 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -87,7 +87,7 @@ subroutine Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! ! Phonon absorption in luminescence [photon emission / phonon absorption] ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor + Sat_emission=Sat_emission +BS_Sat_WEIGHT(il,i_beta,i_alpha)/(W-pole)*bose_factor*boltzm_factor ! pole=E_alpha+BS_Sat_E_PH_abs(il,i_beta,i_alpha) ! @@ -97,6 +97,6 @@ subroutine Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! ! Phonon emission in luminescence [photon emission / phonon emission] ! - Sat_emission=Sat_emission+BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor + Sat_emission=Sat_emission +BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! end subroutine Satellite_Simple From c26ad4fc2a889c074f670437fc63671a97dc33ac Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 1 Jun 2022 12:49:33 +0200 Subject: [PATCH 0310/1367] Version 5.1.0, Revision 21759, Hash c7b8e507f MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Added w factor in front of luminescence Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 19fa80f06c..678ac3ec76 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21758 -#define YAMBO_HASH "53c51dffd" +#define YAMBO_REVISION 21759 +#define YAMBO_HASH "c7b8e507f" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index fb901ab7b8..8e32289a6f 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -233,7 +233,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Eps(w)=1._SP - X(w) in agreement with definition in src/bse/ ! Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) - PL_ii =-PL_ii + ! + do iw=1,wv%n_freqs + W=wv%p(iw) + PL_ii(iw,:)=-W*PL_ii(iw,:) + enddo ! ! Free ! From 01c2fcd7cb9dc3930179681990bb313e0fa5ed31 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 1 Jun 2022 13:31:47 +0200 Subject: [PATCH 0311/1367] Version 5.1.0, Revision 21760, Hash c26ad4fc2 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: - Additions: -Added W*(W-ph_E)**2 factor in the luminescence Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 678ac3ec76..54976b7bb6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21759 -#define YAMBO_HASH "c7b8e507f" +#define YAMBO_REVISION 21761 +#define YAMBO_HASH "c26ad4fc2" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 8e32289a6f..d166027b2a 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -45,7 +45,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,min_EXC_E_DbGd, & & EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,l_DbGd_WEIGHTs - use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map + use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs_sq use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset use functions, ONLY:boltzman_f,bose_f @@ -61,7 +61,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Work space ! complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E + real(SP) :: min_E,exc_E,PH_E integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer :: iq_db integer :: elph_branches_save(2) @@ -145,6 +145,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Satellites for the alpha exciton ! do il=elph_branches(1),elph_branches(2) + ! + iq_db=Q_io_map(iq_bz) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! @@ -167,8 +170,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) Epsilon_ii(iw,3)=Epsilon_ii(iw,3)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) ! - PL_ii(iw,1) =PL_ii(iw,1)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) - PL_ii(iw,3) =PL_ii(iw,3)+Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,1) =PL_ii(iw,1)+(W-2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,3) =PL_ii(iw,3)+(W-2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) ! enddo ! @@ -219,7 +222,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! exc_E=BS_E_in(i_alpha)-min_E pole =BS_E_in(i_alpha) - PL_ii(iw,1:2) =PL_ii(iw,1:2) + (1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & + PL_ii(iw,1:2) =PL_ii(iw,1:2) + W**2*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo From d4e10249d4e5ee79156776e54c7210d29b5f3e02 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Jun 2022 15:24:38 +0200 Subject: [PATCH 0312/1367] Version 5.1.0, Revision 21552, Hash 5fb82b2b5 MODIFIED * config/mk/global/functions/todo.mk include/driver/version.h Bugs: - [yambo_nl] Compilation precision check does not clean everyting if aso yambo is compiled in double precision Patch sent by: Davide Sangalli --- config/mk/global/functions/todo.mk | 6 +++++- include/driver/version.h | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/mk/global/functions/todo.mk b/config/mk/global/functions/todo.mk index 6830819d50..cb5b9cf963 100644 --- a/config/mk/global/functions/todo.mk +++ b/config/mk/global/functions/todo.mk @@ -6,9 +6,11 @@ define todo_lib endef define todo_precision $(ECHO) "\t[$@] Compilation Precision check";\ - if echo $(1) | grep -q DOUBLE ; then \ + if echo $(1)" "$(xcpp) | grep -q DOUBLE ; then \ + $(ECHO) "\t to compile in DOUBLE";\ if [ ! -f $(compdir)/config/stamps_and_lists/compilation_objects_in_DOUBLE_precision.stamp ]; then \ if [ -f $(compdir)/config/stamps_and_lists/compilation_objects_in_SINGLE_precision.stamp ]; then \ + $(ECHO) "\t cleaning compiled in SINGLE";\ $(MAKE) $(MAKEFLAGS) clean what="int-libs"; \ $(MAKE) $(MAKEFLAGS) clean what="driver"; \ $(MAKE) $(MAKEFLAGS) clean what="ypp"; \ @@ -18,8 +20,10 @@ define todo_precision touch $(compdir)/config/stamps_and_lists/compilation_objects_in_DOUBLE_precision.stamp; \ fi; \ else \ + $(ECHO) "\t to compile in SINGLE";\ if [ ! -f $(compdir)/config/stamps_and_lists/compilation_objects_in_SINGLE_precision.stamp ]; then \ if [ -f $(compdir)/config/stamps_and_lists/compilation_objects_in_DOUBLE_precision.stamp ]; then \ + $(ECHO) "\t cleaning compiled in DOUBLE";\ $(MAKE) $(MAKEFLAGS) clean what="int-libs"; \ $(MAKE) $(MAKEFLAGS) clean what="driver"; \ $(MAKE) $(MAKEFLAGS) clean what="ypp"; \ diff --git a/include/driver/version.h b/include/driver/version.h index a173249297..8b8019265f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21550 -#define YAMBO_HASH "0e957677a" +#define YAMBO_REVISION 21552 +#define YAMBO_HASH "5fb82b2b5" From 649f0e607b4d124932963c73a0fa0a985ec8c6b3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Jun 2022 17:14:41 +0200 Subject: [PATCH 0313/1367] Version 5.1.0, Revision 21553, Hash d4e10249d MODIFIED * config/version/version.m4 include/driver/version.h interface/INIT_activate.F modules/SET_logicals.F nloptics/NL_driver.F nloptics/NL_initialize.F nloptics/NL_output.F nloptics/NL_start_and_restart.F Changes: - [yambo_nl] NL simulation in pump and probe mode uses RT output machinery Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++-- include/driver/version.h | 4 +-- src/interface/INIT_activate.F | 1 + src/modules/SET_logicals.F | 5 ++++ src/nloptics/NL_driver.F | 43 ++++++++++++++++++++++++----- src/nloptics/NL_initialize.F | 16 +++++------ src/nloptics/NL_output.F | 16 +++++------ src/nloptics/NL_start_and_restart.F | 24 +++++++++++++++- 8 files changed, 85 insertions(+), 30 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index dc9272a213..f5cc97d690 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21550 h.0e957677a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21552 h.5fb82b2b5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21550" -SHASH="0e957677a" +SREVISION="21552" +SHASH="5fb82b2b5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/include/driver/version.h b/include/driver/version.h index 8b8019265f..26b82d7189 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21552 -#define YAMBO_HASH "5fb82b2b5" +#define YAMBO_REVISION 21553 +#define YAMBO_HASH "d4e10249d" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 51e4420182..c4be4a4a58 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -550,6 +550,7 @@ subroutine INIT_activate() if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps') + if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd EvalCurrent InducedField FrPolPerdic') call initactivate(1,'Gauge RADLifeTime HARRLvcs EXXRLvcs') call init_QP_ctl_switch('G') diff --git a/src/modules/SET_logicals.F b/src/modules/SET_logicals.F index 169dfd1419..fc68536d0b 100644 --- a/src/modules/SET_logicals.F +++ b/src/modules/SET_logicals.F @@ -77,6 +77,11 @@ subroutine SET_logicals() io_SC =.TRUE. io_BS_K =.TRUE. ! +#if defined _NL + io_CARRIERs =.FALSE. + io_GF =.FALSE. +#endif + ! ch_piece=' ' call STRING_split(DBs_IO_control_string,ch_piece) ! diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 1247dc82fc..1572c86aff 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -43,7 +43,7 @@ subroutine NL_driver(E,X,k,q,Dip) & NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P,l_pump_and_probe, & & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,freqs_done,n_freqs_todo,l_eval_CURRENT,& & HF,SEX,NL_bands,NL_nbands,WF_sample,V_bands_t,NL_alloc_k_distributed - use real_time, ONLY:RT_step,NE_steps,NE_i_time,RT_nbands,RT_bands,eval_DFT + use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands,eval_DFT,RT_P,RT_ind_J use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz @@ -64,7 +64,7 @@ subroutine NL_driver(E,X,k,q,Dip) ! integer :: i_f,i1,i_sp_pol,N_sample_size,wf_ng_save,io_err logical :: l_dynamics_is_over - real(SP) :: Time + real(SP) :: OBSERVABLES(25) ! ! In Non-Linear NL_bands always equal to RT_bands ! ============================================== @@ -192,9 +192,21 @@ subroutine NL_driver(E,X,k,q,Dip) ! ===================================== if(n_freqs_todo==0) return ! + if (l_pump_and_probe) then + ! + ! Initialize output files + !========================== + call RT_output_INIT( ) + ! + call RT_output_and_IO_driver('open',E,k,OBSERVABLES) + ! + else + ! ! Initialize IO ! ================== call NL_databases_IO(0,'write') + ! + endif ! ! Start-Up & Timing !=================== @@ -229,10 +241,9 @@ subroutine NL_driver(E,X,k,q,Dip) do while(.not.l_dynamics_is_over) ! NE_i_time=NE_i_time+1 + NE_time=real(NE_i_time-1,SP)*RT_step ! - Time=real(NE_i_time-1,SP)*RT_step - ! - call NL_Hamiltonian(E,k,q,X(1),Time,NE_i_time,V_bands) + call NL_Hamiltonian(E,k,q,X(1),NE_time,NE_i_time,V_bands) ! ! I evaluate current after the Hamiltonian because I need ! time-dependent overlaps Sm1_plus, and Sm1_mins @@ -241,6 +252,18 @@ subroutine NL_driver(E,X,k,q,Dip) call NL_current(k,E,V_bands,NL_J) NL_J=NL_J-NL_initial_J endif + ! + if (l_pump_and_probe) then + ! + RT_P =real(NL_P(1:3),SP) + RT_ind_J=real(NL_J(1:3),SP) + ! + ! Write DBs and output + !===================== + call RT_output_and_IO_driver('write',E,k,OBSERVABLES) + ! + else + ! ! ! Store Variables ! @@ -248,8 +271,10 @@ subroutine NL_driver(E,X,k,q,Dip) E_ext_t(NE_i_time,:)=E_ext E_tot_t(NE_i_time,:)=E_tot E_ks_t (NE_i_time,:)=E_ks + ! + endif ! - call NL_output(NE_i_time,i_f) + call NL_output(NE_i_time,i_f) ! call NL_Integrator(E,k,q,X(1),Integrator,NE_i_time,V_bands) ! @@ -259,7 +284,11 @@ subroutine NL_driver(E,X,k,q,Dip) ! enddo ! - call NL_databases_IO(i_f,'write') + if (l_pump_and_probe) then + call RT_output_and_IO_driver('close',E,k,OBSERVABLES) + else + call NL_databases_IO(i_f,'write') + endif ! if(stop_now(.false.)) exit ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index f9a05dc8cb..ce20e3fd07 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -36,7 +36,7 @@ subroutine NL_initialize(E,k) use fields, ONLY:Efield,Efield_strength,n_ext_fields,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime - use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t + use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity, & @@ -320,14 +320,12 @@ subroutine NL_initialize(E,k) ! frequencies is supported ! RT_dyn_step=RT_step - OBS_RT_IO_t%INTERVAL_time =RT_step - OBS_RT_IO_t%INTERVAL_time_INPUT=RT_step - call SETUP_RT_IO_type(OBS_RT_IO_t,who="OBS",what="INIT") - YAMBO_ALLOC(OBS_RT_IO_t%Time,(NE_steps)) - do NE_i_time=1,NE_steps - Time=real(NE_i_time-1,SP)*RT_step - OBS_RT_IO_t%Time(NE_i_time)=Time - enddo + ! + ! I/O steps + !=========== + call RT_IO_type_time_steps("INIT") + ! + call RT_control_alloc("all") ! ! WFs sampling ! ========================= diff --git a/src/nloptics/NL_output.F b/src/nloptics/NL_output.F index be69eaff7a..4a4a57ec2b 100644 --- a/src/nloptics/NL_output.F +++ b/src/nloptics/NL_output.F @@ -45,26 +45,26 @@ subroutine NL_output(i_time,i_freq) ! if(NL_verbosity==VERB_LOW) return ! - file_name(1)='external_potential_F'//intc(i_freq) - file_name(2)='polarization_F'//intc(i_freq) - file_name(3)='e_total_F'//intc(i_freq) - file_name(4)='current_F'//intc(i_freq) + file_name(1)='NL_ext_pot_F'//intc(i_freq) + file_name(2)='NL_pol_F'//intc(i_freq) + file_name(3)='NL_Etot_F'//intc(i_freq) + file_name(4)='NL_curr_F'//intc(i_freq) ! n_files=1 - short_file_name(n_files)='external_potential' + short_file_name(n_files)='NL_ext_pot' n_headings(n_files)=10 ! n_files=n_files+1 - short_file_name(n_files)='polarization' + short_file_name(n_files)='NL_pol' n_headings(n_files)=7 ! n_files=n_files+1 - short_file_name(n_files)='e_total' + short_file_name(n_files)='NL_Etot' n_headings(n_files)=4 ! if(l_eval_CURRENT) then n_files=n_files+1 - short_file_name(n_files)='current' + short_file_name(n_files)='NL_curr' n_headings(n_files)=7 endif ! diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index 2a7aef3859..a3e88393d0 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -49,7 +49,7 @@ subroutine NL_start_and_restart(E,k,Dip) use parallel_m, ONLY:master_cpu use nl_optics, ONLY:Correlation,IPA,E_full,full_rho,V_bands,TDDFT,n_freqs_todo,NL_LRC_alpha,NL_bands, & & V_xc_0,NL_initial_P,l_use_DIPOLES,n_frequencies,freqs_done,JGM,E_xc_0,I_relax,l_use_DIPOLES, & -& VAL_BANDS,l_eval_CURRENT,NL_initial_J,NL_P +& VAL_BANDS,l_eval_CURRENT,NL_initial_J,NL_P,l_pump_and_probe use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,NONE,file_is_present,VERIFY use parallel_int, ONLY:PP_redux_wait @@ -65,6 +65,7 @@ subroutine NL_start_and_restart(E,k,Dip) ! ! Working space ! + logical :: RESTART integer :: i1,ib,i_f,i_sp_pol integer :: ID,io_NonLinear integer, external::io_NL @@ -186,5 +187,26 @@ subroutine NL_start_and_restart(E,k,Dip) n_freqs_todo=n_frequencies-count(freqs_done) if(n_freqs_todo/=n_frequencies) call msg('s','RESTART, remaining frequencies ',n_freqs_todo) ! + if (l_pump_and_probe.and.RESTART) then + ! + call RT_IO_type_time_steps("RESTART") + !! + !call msg( 'nr','---RESTART report---') + !! + !call msg('s','[RESTART] Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") + !call msg('r','Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") + !call msg('r','Time reached ',real(NE_i_time-1)*RT_step*AUT2FS,"[fs]") + !call msg('r','Time step ',RT_dyn_step*AUT2FS,"[fs]") + !! + !call msg('r', 'dT Update Interval ',NE_time_step_update_jump*AUT2FS,"[fs]") + !call msg('r', 'Lifetimes inter/intr times ',RT_life_extrap_times*AUT2FS,"[fs]") + !call msg('r', 'T cache step of J,P,M ',CACHE_OBS_INTERVAL_time*AUT2FS,"[fs]") + !call msg('r', 'T between I/O of J,P,M ',OBS_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + !call msg('r', ' I/O of carriers ',CARR_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + !call msg('r', ' I/O of WFs ',Gless_RESTART_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + !call msg('r', ' outputs ',OUTPUT_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + ! + endif + ! end subroutine NL_start_and_restart From 9b14d9ca6c52b32524dc3d4fd8f512d74cb45304 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Jun 2022 23:38:57 +0200 Subject: [PATCH 0314/1367] Version 5.1.0, Revision 21554, Hash 649f0e607 MODIFIED * config/version/version.m4 include/driver/version.h modules/mod_nl_optics.F nloptics/.objects nloptics/NL_Hamiltonian.F nloptics/NL_driver.F NEW * nloptics/NL_carriers_number.F Changes: - [yambo_nl] Carriers are now computed. There is an unbalance to be checked Patch sent by: Davide Sangalli --- config/version/version.m4 | 6 ++-- include/driver/version.h | 4 +-- src/modules/mod_nl_optics.F | 17 ++++++---- src/nloptics/.objects | 3 +- src/nloptics/NL_Hamiltonian.F | 10 +++--- src/nloptics/NL_carriers_number.F | 55 +++++++++++++++++++++++++++++++ src/nloptics/NL_driver.F | 7 +++- 7 files changed, 83 insertions(+), 19 deletions(-) create mode 100644 src/nloptics/NL_carriers_number.F diff --git a/config/version/version.m4 b/config/version/version.m4 index f5cc97d690..bae66b6921 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21552 h.5fb82b2b5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21553 h.d4e10249d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21552" -SHASH="5fb82b2b5" +SREVISION="21553" +SHASH="d4e10249d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/include/driver/version.h b/include/driver/version.h index 26b82d7189..24c66677c8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21553 -#define YAMBO_HASH "d4e10249d" +#define YAMBO_REVISION 21554 +#define YAMBO_HASH "649f0e607" diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index af1b3dd88a..6aec312f53 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -26,7 +26,7 @@ module nl_optics use descriptors, ONLY:IO_desc use pars, ONLY:SP,schlen,lchlen use electrons, ONLY:levels - use real_time, ONLY:NE_steps + use real_time, ONLY:NE_steps,dG_lesser ! #include ! @@ -77,9 +77,6 @@ module nl_optics ! real(SP), allocatable :: full_rho(:) ! density of all bands from 1:SC_bands(2) ! - ! Density matrix - complex(SP), allocatable :: dG(:,:,:) - ! ! Integrator Variables ! integer, parameter :: EULER = 1 @@ -196,10 +193,13 @@ subroutine NL_alloc(en) ! if(Correlation==TDDFT.or.Correlation==JGM) then YAMBO_ALLOC(V_xc_0,(fft_size,n_spin)) - endif + endif + ! + if(l_use_Hxc_collisions.or.l_pump_and_probe) then + YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,1)) + endif ! if(l_use_Hxc_collisions) then - YAMBO_ALLOC(dG,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk)) YAMBO_ALLOC(RT_Vnl_xc,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol)) endif ! @@ -275,8 +275,11 @@ subroutine NL_free YAMBO_FREE(E_ks_t) YAMBO_FREE(V_bands_t) ! + if(l_use_Hxc_collisions.or.l_pump_and_probe) then + YAMBO_FREE(dG_lesser) + endif + ! if(l_use_Hxc_collisions) then - YAMBO_FREE(dG) YAMBO_FREE(RT_Vnl_xc) endif ! diff --git a/src/nloptics/.objects b/src/nloptics/.objects index 4a007c248b..4eee2fa152 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -1,4 +1,5 @@ objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL_Integrator.o NL_damping.o \ NL_Hamiltonian.o NL_output.o DIP_polarization.o NL_average_operator.o EXC_macroscopic_JGM.o \ NL_databases_IO.o NL_damping.o NL_build_dG_lesser.o NL_build_valence_bands.o EXP_step.o \ - NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o + NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o \ + NL_carriers_number.o diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 32528e896b..0fcbea6973 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -37,12 +37,12 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) use X_m, ONLY:global_gauge,X_t use fields, ONLY:A_ext,A_tot,Efield use real_time, ONLY:eval_DFT,eval_HARTREE,l_RT_induced_Field,rho_reference,& -& Ho_plus_Sigma,RT_Vnl_xc,RT_nbands +& Ho_plus_Sigma,RT_Vnl_xc,RT_nbands,dG_lesser use wave_func, ONLY:WF use xc_functionals, ONLY:V_xc,XC_potential_driver use nl_optics, ONLY:Correlation,V_xc_0,full_rho,IPA,E_full,LRC,JGM,LRCW,l_use_DIPOLES,NL_LRC_alpha, & -& NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,dG,eval_dG, & -& NL_bands,VAL_BANDS,NL_P +& NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,eval_dG, & +& NL_bands,VAL_BANDS,NL_P,l_pump_and_probe use global_XC, ONLY:WF_xc_functional,WF_kind use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index use wrapper_omp, ONLY:M_plus_alpha_M_omp @@ -173,8 +173,8 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Evaluate the G_lesser if using TD-SEX or TD-HF and than add COLLISIONS ! ====================================================== - if(eval_dG) call NL_build_dG_lesser(E,V_bands,dG) - if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG) + if(eval_dG.or.l_pump_and_probe) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,1)) + if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG_lesser(:,:,:,1)) ! ! Build the Hamiltonian ! ===================== diff --git a/src/nloptics/NL_carriers_number.F b/src/nloptics/NL_carriers_number.F new file mode 100644 index 0000000000..b328653668 --- /dev/null +++ b/src/nloptics/NL_carriers_number.F @@ -0,0 +1,55 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine NL_carriers_number(en,k,Ncarr) + ! + use pars, ONLY:SP + use R_lattice, ONLY:bz_samp + use electrons, ONLY:levels + use nl_optics, ONLY:NL_bands + use real_time, ONLY:dG_lesser + ! + implicit none + ! + type(levels), intent(in) :: en + type(bz_samp), intent(in) :: k + real(SP), intent(out):: Ncarr(3) + ! + ! Workspace + ! + integer :: ib,ik + ! + ! Electrons and holes number + ! + Ncarr = 0._SP + ! + do ik=1,en%nk + do ib=NL_bands(1),NL_bands(2) + if ( en%E(ib,ik,1)<=0._SP ) Ncarr(2)=Ncarr(2)-aimag(dG_lesser(ib,ib,ik,1))*k%weights(ik) + if ( en%E(ib,ik,1)> 0._SP ) Ncarr(3)=Ncarr(3)+aimag(dG_lesser(ib,ib,ik,1))*k%weights(ik) + enddo + enddo + ! + Ncarr(1)=Ncarr(2)-Ncarr(3) + ! +end subroutine NL_carriers_number diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 1572c86aff..76e328256b 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -43,7 +43,8 @@ subroutine NL_driver(E,X,k,q,Dip) & NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P,l_pump_and_probe, & & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,freqs_done,n_freqs_todo,l_eval_CURRENT,& & HF,SEX,NL_bands,NL_nbands,WF_sample,V_bands_t,NL_alloc_k_distributed - use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands,eval_DFT,RT_P,RT_ind_J + use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands,eval_DFT,RT_P,RT_ind_J,& +& dG_lesser use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz @@ -258,6 +259,10 @@ subroutine NL_driver(E,X,k,q,Dip) RT_P =real(NL_P(1:3),SP) RT_ind_J=real(NL_J(1:3),SP) ! + ! Carriers number + !================ + call NL_carriers_number(E,k,OBSERVABLES(1:3)) + ! ! Write DBs and output !===================== call RT_output_and_IO_driver('write',E,k,OBSERVABLES) From 39c9c743203e2f12fafa2d8f7df81e2a9eb71b23 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Jun 2022 23:49:33 +0200 Subject: [PATCH 0315/1367] Version 5.1.0, Revision 21555, Hash 9b14d9ca6 MODIFIED * include/driver/version.h nloptics/NL_initialize.F Changes: - [yambo_nl] Fixed output of external field Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/nloptics/NL_initialize.F | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 24c66677c8..3e4dca94b8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21554 -#define YAMBO_HASH "649f0e607" +#define YAMBO_REVISION 21555 +#define YAMBO_HASH "9b14d9ca6" diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index ce20e3fd07..8c7cb5fe7c 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -36,7 +36,7 @@ subroutine NL_initialize(E,k) use fields, ONLY:Efield,Efield_strength,n_ext_fields,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime - use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free + use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity, & @@ -155,6 +155,7 @@ subroutine NL_initialize(E,k) ! if((Efield(1)%ef_name/='none').and.Efield(2)%ef_name/='none') then l_pump_and_probe=.true. + l_NE_with_fields=.true. call msg('sr','[NL] Pump and probe configuration: verbosity set to high') if(n_frequencies/=1) call error("NLEnSteps /=1 not compatible with Pump and Probe!!! ") NL_verbosity=VERB_HIGH From f88b112f3c93dd9c7c8b080cc6566fd69ca5e12e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 2 Jun 2022 10:13:52 +0200 Subject: [PATCH 0316/1367] Version 5.1.0, Revision 21761, Hash 01c2fcd7c MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F Bugs: -Bug in Double-grid wrong bose factor Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_DbGrid.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 54976b7bb6..06e2be7bba 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21761 -#define YAMBO_HASH "c26ad4fc2" +#define YAMBO_REVISION 21762 +#define YAMBO_HASH "01c2fcd7c" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 0e43a24d5d..3f1db6dc06 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -132,7 +132,7 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! ! Phonon emission in luminescence ! - Sat_emission =Sat_emission +BS_ave_W/(W-pole)*boltzm_factor*boltzm_factor + Sat_emission =Sat_emission +BS_ave_W/(W-pole)*bose_factor*boltzm_factor ! pole=E_alpha+BS_Sat_E_DbGd_PH_abs ! @@ -142,7 +142,7 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! ! Phonon absorption in luminescence ! - Sat_emission=Sat_emission +BS_ave_W_PH_abs/(W-pole)*boltzm_factor*(1._SP+bose_factor) + Sat_emission=Sat_emission +BS_ave_W_PH_abs/(W-pole)*(1._SP+bose_factor)*boltzm_factor ! enddo ! From 1edac2efca216a56ac015179d3b9235cb2fdde4d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 3 Jun 2022 16:38:37 +0200 Subject: [PATCH 0317/1367] Version 5.1.0, Revision 21762, Hash f88b112f3 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F Bugs: -Fixed report of max satellites Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 20 ++++++++++++-------- src/exc-ph/EXCPH_eval_sat.F | 11 ++++++++--- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 06e2be7bba..33d3952936 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21762 -#define YAMBO_HASH "01c2fcd7c" +#define YAMBO_REVISION 21763 +#define YAMBO_HASH "f88b112f3" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index d166027b2a..4399692e3d 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -261,12 +261,12 @@ subroutine Find_Max_Sat() do i1=EXCPH_states(1),EXCPH_states(2) if(max_Sat_weight(i1)FAN_deltaE_treshold) & if(abs(BS_Sat_E(il,i_beta,i_alpha))>FAN_deltaE_treshold) & & BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E(il,i_beta,i_alpha))**2 if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>FAN_deltaE_treshold) & +! if(abs(E_alpha-E_beta)>FAN_deltaE_treshold) & & BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! enddo From e9f8122bf69a423675e3cb65404d02782e857046 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 3 Jun 2022 16:59:02 +0200 Subject: [PATCH 0318/1367] Version 5.1.0, Revision 21763, Hash 1edac2efc MODIFIED * include/driver/version.h exc-ph/EXCPH_eval_sat.F exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Additions: -Added the possibility of calculations without matrix elements -Code cleaning Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_eval_sat.F | 14 ++++++++------ src/exc-ph/EXCPH_optics.F | 11 ++--------- src/modules/mod_EXCPH.F | 2 -- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 33d3952936..ce7bd3abcb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21763 -#define YAMBO_HASH "f88b112f3" +#define YAMBO_REVISION 21764 +#define YAMBO_HASH "1edac2efc" diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index ce452d76b2..4918af785f 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -29,7 +29,8 @@ subroutine EXCPH_eval_sat(iq_bz,q) use D_lattice, ONLY:nsym use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & -& BS_all_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map +& BS_all_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map, & +& l_no_matrix_elements ! #include ! @@ -39,7 +40,7 @@ subroutine EXCPH_eval_sat(iq_bz,q) ! Work space ! integer :: i_alpha,i_beta,il,iq_db,iq_ibz - real(SP) :: ph_E,E_alpha,E_beta + real(SP) :: ph_E,E_alpha,E_beta,EXCPH_gkkp ! ! Calculate satellites weights and renormalization factors without double-grid ! @@ -60,12 +61,13 @@ subroutine EXCPH_eval_sat(iq_bz,q) BS_Sat_E (il,i_beta,i_alpha)=E_beta-E_alpha+ph_E BS_Sat_E_PH_abs(il,i_beta,i_alpha)=E_beta-E_alpha-ph_E ! -! if(abs(E_alpha-E_beta)>FAN_deltaE_treshold) & + EXCPH_gkkp=EXCPH_Gkkp_sq(il,i_beta,i_alpha) + if(l_no_matrix_elements) EXCPH_gkkp=1._SP + ! if(abs(BS_Sat_E(il,i_beta,i_alpha))>FAN_deltaE_treshold) & -& BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E(il,i_beta,i_alpha))**2 +& BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_gkkp/abs(BS_Sat_E(il,i_beta,i_alpha))**2 if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>FAN_deltaE_treshold) & -! if(abs(E_alpha-E_beta)>FAN_deltaE_treshold) & -& BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_Gkkp_sq(il,i_beta,i_alpha)/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 +& BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_gkkp/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! enddo enddo diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 681aaa17df..5b84fd4f41 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -32,7 +32,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) use X_m, ONLY:X_t use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R,BS_Sat_W_DG,BS_Sat_W_DG_PH_abs,free_EXC,alloc_EXC, & +& BS_R_left,BS_R_right,BS_R,free_EXC,alloc_EXC, & & l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free use ELPH, ONLY:use_PH_DbGd,ph_modes use frequency, ONLY:w_samp @@ -90,6 +90,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 ! call parser('NoMatrxEl',l_no_matrix_elements) + if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') ! ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) @@ -101,10 +102,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) if(use_PH_DbGd) then dbgd_string='DbGd' max_filling=maxval(q%FGbz%N_mapped)+1 ! max number of tilde q around each q-point include the q itself - YAMBO_ALLOC(BS_Sat_W_DG,(ph_modes,EXCPH_sum(2),EXCPH_states(2),max_filling)) - YAMBO_ALLOC(BS_Sat_W_DG_PH_abs,(ph_modes,EXCPH_sum(2),EXCPH_states(2),max_filling)) - BS_Sat_W_DG =rZERO - BS_Sat_W_DG_PH_abs=rZERO ! ! Check double-grid flags ! @@ -135,10 +132,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) call Sat_free() YAMBO_FREE(Epsilon_ii) YAMBO_FREE(PL_ii) - if(use_PH_DbGd) then - YAMBO_FREE(BS_Sat_W_DG) - YAMBO_FREE(BS_Sat_W_DG_PH_abs) - endif ! call FREQUENCIES_reset(wv,"all") ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index d3f7a1d4ff..09b3e734fc 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -90,8 +90,6 @@ module EXCPH integer :: ID_EXC,ID_EXC_obj real(SP) :: min_EXC_E_DbGd real(SP), allocatable :: EXC_E_DbGd(:,:) - real(SP), target, allocatable :: BS_Sat_W_DG(:,:,:,:) - real(SP), target, allocatable :: BS_Sat_W_DG_PH_abs(:,:,:,:) ! ! Life Times ! From 698ae42822080ff5374ff9764b7c94c3cd7d771d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 3 Jun 2022 17:23:25 +0200 Subject: [PATCH 0319/1367] Version 5.1.0, Revision 21764, Hash e9f8122bf MODIFIED * include/driver/version.h interface/INIT_load.F Changes: -FAN threashold moved out of verbosity Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_load.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ce7bd3abcb..48061daba2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21764 -#define YAMBO_HASH "1edac2efc" +#define YAMBO_REVISION 21765 +#define YAMBO_HASH "e9f8122bf" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 4fc9342046..8e86c8a422 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -661,7 +661,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH call it(defs,'GphBRnge', '[ELPH] G[W] bands range',QP_PH_n_G_bands) call it(defs,'ElPhModes', '[ELPH] Phonon modes included',elph_branches) - call it(defs,'FANdEtresh','[ELPH] Energy treshold for Fan denominator',FAN_deltaE_treshold,verb_level=V_ph,unit=E_unit) + call it(defs,'FANdEtresh','[ELPH] Energy treshold for Fan denominator',FAN_deltaE_treshold,unit=E_unit) call it(defs,'DWdEtresh', '[ELPH] Energy treshold for DW denominator',DW_deltaE_treshold,verb_level=V_ph,unit=E_unit) call it(defs,'GkkpDB', '[ELPH] GKKP database (gkkp | gkkp_expanded | genFroh )',gkkp_db,verb_level=V_ph) ! From 48c095a36d38530c0f0bdc4c8a8a775f22b68e74 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 6 Jun 2022 17:41:41 +0200 Subject: [PATCH 0320/1367] Version 5.1.0, Revision 21556, Hash 39c9c7432 MODIFIED * include/driver/version.h io/.objects io/io_RT_components.F io/io_RT_components_TIME_points.F modules/SET_defaults.F modules/SET_logicals.F modules/mod_IO.F modules/mod_RT_control.F modules/mod_nl_optics.F real_time_control/RT_databases_IO.F NEW * io/io_RT_components_V_bands.F Changes: - [yambo_nl] I/O of V_bands implemented Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/io/.objects | 2 +- src/io/io_RT_components.F | 10 ++- src/io/io_RT_components_TIME_points.F | 6 +- src/io/io_RT_components_V_bands.F | 86 +++++++++++++++++++++++++ src/modules/SET_defaults.F | 3 +- src/modules/SET_logicals.F | 6 +- src/modules/mod_IO.F | 1 + src/modules/mod_RT_control.F | 40 ++++++++---- src/modules/mod_nl_optics.F | 2 +- src/real_time_control/RT_databases_IO.F | 58 +++++++++++++++-- 11 files changed, 190 insertions(+), 28 deletions(-) create mode 100644 src/io/io_RT_components_V_bands.F diff --git a/include/driver/version.h b/include/driver/version.h index 3e4dca94b8..292be3ac1b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21555 -#define YAMBO_HASH "9b14d9ca6" +#define YAMBO_REVISION 21556 +#define YAMBO_HASH "39c9c7432" diff --git a/src/io/.objects b/src/io/.objects index aff74a8293..5a746813b6 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -3,7 +3,7 @@ SC_objects = load_SC_components.o io_SC_components.o variables_SC.o io_KB_real_s #endif #if defined _RT RT_objects = io_RT_components.o io_RT_components_G_lesser.o io_RT_components_header.o io_RT_components_OBS.o \ - io_RT_components_Reference.o io_RT_components_TIME_points.o \ + io_RT_components_V_bands.o io_RT_components_Reference.o io_RT_components_TIME_points.o \ variables_RT_static.o variables_RT_dynamic.o io_KB_real_space.o #endif #if defined _NL diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index ae7d9a8b5c..ed26219777 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -71,7 +71,7 @@ integer function io_RT_components(what,ID) use IO_m, ONLY:io_sec,read_is_on,write_is_on,io_file use real_time, ONLY:NE_i_time,RT_step,RT_dyn_step,RT_carriers,RT_nbands,G_MEM_steps use RT_control, ONLY:RT_carriers_object,CARR_RT_IO_t,Gless_RESTART_RT_IO_t,OBS_RT_IO_t,CACHE_OBS_steps_now,& -& CACHE_OBS_steps,RT_DB_file_name,Gless_RT_IO_t,& +& Vbands_RT_IO_t,CACHE_OBS_steps,RT_DB_file_name,Gless_RT_IO_t,SAVE_Vb_history,& & RT_DB_name,RT_define_the_IO_DB_identifier,RT_do_IO,RT_current_DB_identifier,RT_return_db_ID #if defined _PAR_IO #endif @@ -115,7 +115,7 @@ integer function io_RT_components(what,ID) ! ! ACTION !======== - if (RT_do_IO("ANY_G")) then + if (RT_do_IO("ANY_G").or.RT_do_IO("ANY_Vb")) then io_RT_components=io_connect(desc="RT_"//trim(RT_DB_name(RT_current_DB_identifier)),type=db_kind,ID=ID) if (io_RT_components/=0) goto 1 else @@ -166,6 +166,8 @@ integer function io_RT_components(what,ID) if (io_RT_components/=0) goto 1 endif ! + if (RT_do_IO("V_bands")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,SAVE_Vb_history,Vbands_RT_IO_t) + ! if (RT_do_IO("G_lesser")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,.TRUE.,Gless_RT_IO_t) ! if (RT_do_IO("G_lesser_RESTART")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,.FALSE.,Gless_RESTART_RT_IO_t) @@ -208,6 +210,10 @@ integer function io_RT_components(what,ID) !======================= if (RT_do_IO("ANY_G")) call io_RT_components_G_lesser(ID_frag,T_size) ! + ! Vbands + !======== + if (RT_do_IO("ANY_Vb")) call io_RT_components_V_bands(ID_frag,T_size) + ! ! Carrier components !==================== if (RT_do_IO("carriers")) then diff --git a/src/io/io_RT_components_TIME_points.F b/src/io/io_RT_components_TIME_points.F index 23e9724973..67c62f945b 100644 --- a/src/io/io_RT_components_TIME_points.F +++ b/src/io/io_RT_components_TIME_points.F @@ -82,12 +82,14 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti ! IPOS=TYP%N-VAR_SZ+1 IO_LIM=(/TYP%N-VAR_SZ+1,TYP%N/) - if(TYP%first_IO(2).or.RT_do_IO("ANY_G").or.read_is_on(ID)) then + if(TYP%first_IO(2).or.RT_do_IO("ANY_G").or.RT_do_IO("ANY_Vb").or.read_is_on(ID)) then dim_name="IO_TIME_n_points" if (UNLIMITED_time) then call def_variable_bulk(ID,"IO_TIME_points",3,(/NF90_UNLIMITED/),SP,dim_name,silent=.true.,par_io_kind="collective") - else + else if (RT_do_IO("ANY_G")) then call def_variable_bulk(ID,"IO_TIME_points",3,(/G_MEM_steps/), SP,dim_name,silent=.true.,par_io_kind="collective") + else if (RT_do_IO("ANY_Vb")) then + call def_variable_bulk(ID,"IO_TIME_points",3,(/1/), SP,dim_name,silent=.true.,par_io_kind="collective") endif endif ! diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F new file mode 100644 index 0000000000..e8e2acf78c --- /dev/null +++ b/src/io/io_RT_components_V_bands.F @@ -0,0 +1,86 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine io_RT_components_V_bands(ID,T_size) + ! + use pars, ONLY:SP,schlen + use drivers, ONLY:l_nl_p_and_p + use R_lattice, ONLY:nkibz + use stderr, ONLY:intc + use iso_c_binding, ONLY:C_LOC,C_F_POINTER + use IO_int, ONLY:def_variable_bulk,io_variable_bulk + use IO_m, ONLY:io_sec,io_unit,netcdf_call,nf90_sync + use electrons, ONLY:n_sp_pol,n_full_bands + use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,RT_do_IO + use real_time, ONLY:RT_bands,RT_nbands,NE_i_time!,RT_dyn_step,RT_step + use nl_optics, ONLY:V_bands + use netcdf, ONLY:NF90_UNLIMITED + use QP_m, ONLY:QP_nk + ! + implicit none + ! + integer, intent(in) :: ID,T_size + ! + logical :: l_H_rot,l_H_sig,l_H_EQ + integer :: ib,i_sp_pol,i_mem,i_mem_sorted,VAR_SZ(6),IPOS(6),& +& PAR_G_k_range_ibz(2),k_range(2),ip,TMP_VAR_SZ + character(schlen) :: dim_names(6) + complex(SP),pointer :: tmp_link(:,:,:,:,:) + ! + ! Setup + !======= + ! + ! Variables SIZE and strings... + !------------------------------- + VAR_SZ(1:5)=(/2,RT_bands(2),maxval(n_full_bands),QP_nk,n_sp_pol/) + dim_names(1:5) =[character(schlen) :: 'complex', 'NL_bands','nb_full','QP_nk','n_sp_pol'] + IPOS(1:5)=1 + ! + VAR_SZ(6) = 1 + if (RT_do_IO("V_bands_K_section")) VAR_SZ(6) = NF90_UNLIMITED + dim_names(6) ='V_bands_IO_time_step' + IPOS(6)=Vbands_RT_IO_t%N + ! + ! Sizes... + !---------- + !ik = maxval(io_sec(ID,:))-2 + !k_range =(/1,QP_nk/) + !G_IO_steps =Vbands_RT_IO_t%INTERVAL_steps/nint(RT_dyn_step/RT_step) + ! + ! Variable Definitions... + !------------------------- + if( NE_i_time==NE_i_start_time.or..not.l_nl_p_and_p) then + !call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) + call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,silent=.true.) + endif + ! + ! Variable I/O... + !----------------- + call C_F_POINTER(C_LOC(V_bands),tmp_link,VAR_SZ(2:6)) + call io_variable_bulk(ID,4,C5=tmp_link,IPOS=IPOS) + nullify(tmp_link) + ! + ! In case of frequent I/O this gives a significant slowdown of the simulation + ! if (G_IO_steps>=10) call netcdf_call(nf90_sync(io_unit(ID)),ID) + ! +end subroutine io_RT_components_V_bands diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 9a36421e6c..0361d80b28 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -104,7 +104,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & RT_headings,YPP_append,Gr_desc,TIME_STEP_desc,RT_desc use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t,SAVE_G_history,RT_ctl_db,& & CACHE_OBS_last_point,CACHE_OBS_INTERVAL_time,CACHE_OBS_INTERVAL_time_INPUT, & -& CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found +& CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history use RT_lifetimes,ONLY:RT_life_extrap_times use real_time, ONLY:RT_step,NE_steps,NE_time,Integrator_name,RT_deph_range,& & Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,& @@ -658,6 +658,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) OUTPUT_RT_IO_t%INTERVAL_time_INPUT =5._SP*FS2AUT Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =1._SP*FS2AUT SAVE_G_history=.FALSE. + SAVE_Vb_history=.FALSE. RT_NAN_found =.FALSE. ! ! RT_output diff --git a/src/modules/SET_logicals.F b/src/modules/SET_logicals.F index fc68536d0b..a5948aed77 100644 --- a/src/modules/SET_logicals.F +++ b/src/modules/SET_logicals.F @@ -29,7 +29,7 @@ subroutine SET_logicals() use com, ONLY:write_to_of,write_to_report,fat_log use IO_m, ONLY:IO_write,IO_read,DBs_IO_control_string,DBs_FRAG_control_string, & & io_DIP,io_RESPONSE,io_HF,io_COLLs,io_GF,io_OBSERVABLES,io_CARRIERs,io_SC,io_BS_K,io_SCREEN, & -& frag_DIP,frag_RESPONSE,frag_HF,frag_SC,frag_DG, & +& frag_DIP,frag_RESPONSE,frag_HF,frag_SC,frag_DG,io_V_bands, & & frag_BS_K,frag_SCREEN,frag_QINDX,frag_ELPH,frag_RT use stderr, ONLY:write_to_log,write_fragments_IO_log,STRING_split,write_to_log_default use LIVE_t, ONLY:live_timing_is_on @@ -72,6 +72,7 @@ subroutine SET_logicals() io_HF =.TRUE. io_COLLs =.TRUE. io_GF =.TRUE. + io_V_bands =.FALSE. io_OBSERVABLES =.TRUE. io_CARRIERs =.TRUE. io_SC =.TRUE. @@ -80,6 +81,8 @@ subroutine SET_logicals() #if defined _NL io_CARRIERs =.FALSE. io_GF =.FALSE. + io_V_bands =.TRUE. + io_OBSERVABLES =.TRUE. #endif ! ch_piece=' ' @@ -93,6 +96,7 @@ subroutine SET_logicals() if (str_check(5,(/"COLLS","COLLs","colls","ALL ","all "/),& & ch_piece(i_ch)) ) io_COLLs =.FALSE. if (str_check(4,(/"GF ","gf ","ALL","all"/),ch_piece(i_ch)) ) io_GF =.FALSE. + if (str_check(4,(/"Vb ","vb ","ALL","all"/),ch_piece(i_ch)) ) io_V_bands =.FALSE. if (str_check(4,(/"J ","j ","ALL","all"/),ch_piece(i_ch)) ) io_OBSERVABLES =.FALSE. ! Back Compatibility if (str_check(4,(/"OBS","obs","ALL","all"/),ch_piece(i_ch)) ) io_OBSERVABLES =.FALSE. if (str_check(5,(/"CARRIERs","carriers","CARRIERS","ALL ","all "/),& diff --git a/src/modules/mod_IO.F b/src/modules/mod_IO.F index ed4b22aa03..2f54b62ea6 100644 --- a/src/modules/mod_IO.F +++ b/src/modules/mod_IO.F @@ -53,6 +53,7 @@ module IO_m logical :: io_OBSERVABLES logical :: io_CARRIERs logical :: io_GF + logical :: io_V_bands logical :: io_SC logical :: io_BS_K logical :: io_SCREEN diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index 7556a94593..c219e345fe 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -35,7 +35,7 @@ module RT_control integer :: CACHE_OBS_steps integer :: CACHE_OBS_steps_now ! - integer,parameter :: N_RT_databases=11 + integer,parameter :: N_RT_databases=13 integer :: RT_DB_ID(N_RT_databases)= 0 integer :: RT_current_DB_identifier ! \in [1,...] pointing to the DB under I/O character(lchlen) :: RT_DB_file_name(N_RT_databases) = " " @@ -45,12 +45,14 @@ module RT_control "none ",& "OBSERVABLES ",& "G_lesser_RESTART ",& - "G_lesser ",& + "G_lesser_RESTART_K_section",& "carriers ",& "THETA ",& "REFERENCE ",& - "G_lesser_RESTART_K_section",& - "G_lesser_K_section "/) + "G_lesser ",& + "G_lesser_K_section ",& + "V_bands ",& + "V_bands_K_section "/) integer :: NE_i_start_time = 1 ! restart point integer :: last_it_evaluated = 0 ! When RT_dynamics_jumps are non zero this is ! ! the last evaluated point @@ -75,9 +77,11 @@ module RT_control type(RT_IO_t),save :: OUTPUT_RT_IO_t type(RT_IO_t),save :: Gless_RESTART_RT_IO_t type(RT_IO_t),save :: Gless_RT_IO_t + type(RT_IO_t),save :: Vbands_RT_IO_t ! ! G_lesser I/O logical :: SAVE_G_history + logical :: SAVE_Vb_history ! ! J, P and M (spin) cache ! @@ -148,12 +152,14 @@ integer function RT_return_db_ID(what) if (what=="M") RT_return_db_ID=4 if (what=="OBSERVABLES") RT_return_db_ID=4 if (what=="G_lesser_RESTART") RT_return_db_ID=5 - if (what=="G_lesser") RT_return_db_ID=6 + if (what=="G_lesser_RESTART_K_section") RT_return_db_ID=6 if (what=="carriers") RT_return_db_ID=7 if (what=="THETA") RT_return_db_ID=8 if (what=="REFERENCE") RT_return_db_ID=9 - if (what=="G_lesser_RESTART_K_section") RT_return_db_ID=10 + if (what=="G_lesser") RT_return_db_ID=10 if (what=="G_lesser_K_section") RT_return_db_ID=11 + if (what=="V_bands") RT_return_db_ID=12 + if (what=="V_bands_K_section") RT_return_db_ID=13 end function ! logical function RT_do_IO(what) @@ -172,18 +178,21 @@ logical function RT_do_IO(what) if (what=="REFERENCE".and.RT_current_DB_identifier==9) RT_do_IO=.TRUE. ! if (what=="DYN_VARS".and.(RT_current_DB_identifier>=4.and.RT_current_DB_identifier<=8)) RT_do_IO=.TRUE. - if (what=="DYN_VARS".and.(RT_current_DB_identifier==10.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. + if (what=="DYN_VARS".and.(RT_current_DB_identifier>=10) ) RT_do_IO=.TRUE. if (what=="K_SECTION".and.(RT_current_DB_identifier==5.or.RT_current_DB_identifier==6& -& .or.RT_current_DB_identifier==8.or.RT_current_DB_identifier==10& -& .or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. +& .or.RT_current_DB_identifier==8.or.RT_current_DB_identifier>=10)) RT_do_IO=.TRUE. ! if (what=="ANY_G".and.(RT_current_DB_identifier==5.or.RT_current_DB_identifier==6)) RT_do_IO=.TRUE. if (what=="ANY_G".and.(RT_current_DB_identifier==10.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. if (what=="G_lesser_RESTART".and.RT_current_DB_identifier==5) RT_do_IO=.TRUE. - if (what=="G_lesser".and. RT_current_DB_identifier==6) RT_do_IO=.TRUE. - if (what=="G_lesser_RESTART_K_section".and.RT_current_DB_identifier==10) RT_do_IO=.TRUE. + if (what=="G_lesser_RESTART_K_section".and.RT_current_DB_identifier==6) RT_do_IO=.TRUE. + if (what=="G_lesser".and. RT_current_DB_identifier==10) RT_do_IO=.TRUE. if (what=="G_lesser_K_section".and. RT_current_DB_identifier==11) RT_do_IO=.TRUE. ! + if (what=="ANY_Vb".and.(RT_current_DB_identifier==12.or.RT_current_DB_identifier==13)) RT_do_IO=.TRUE. + if (what=="V_bands".and. RT_current_DB_identifier==12) RT_do_IO=.TRUE. + if (what=="V_bands_K_section".and. RT_current_DB_identifier==13) RT_do_IO=.TRUE. + ! end function ! subroutine RT_define_the_IO_DB_identifier(what) @@ -193,12 +202,14 @@ subroutine RT_define_the_IO_DB_identifier(what) (what=="M" .or.what=="OBSERVABLES") .or. & (what=="D" .or.what=="OBSERVABLES") ) RT_current_DB_identifier=4 if (what=="G_lesser_RESTART") RT_current_DB_identifier=5 - if (what=="G_lesser") RT_current_DB_identifier=6 + if (what=="G_lesser_RESTART_K_section") RT_current_DB_identifier=6 if (what=="carriers") RT_current_DB_identifier=7 if (what=="THETA") RT_current_DB_identifier=8 if (what=="REFERENCE") RT_current_DB_identifier=9 - if (what=="G_lesser_RESTART_K_section") RT_current_DB_identifier=10 + if (what=="G_lesser") RT_current_DB_identifier=10 if (what=="G_lesser_K_section") RT_current_DB_identifier=11 + if (what=="V_bands") RT_current_DB_identifier=12 + if (what=="V_bands_K_section") RT_current_DB_identifier=13 end subroutine ! subroutine RT_control_alloc(what) @@ -246,6 +257,9 @@ subroutine RT_control_alloc(what) Gless_RT_IO_t%Time=rZERO endif ! + YAMBO_ALLOC(Vbands_RT_IO_t%Time,(NE_steps)) + Vbands_RT_IO_t%Time=rZERO + ! endif ! end subroutine RT_control_alloc diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 6aec312f53..2c8a7d2709 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -70,7 +70,7 @@ module nl_optics ! WFs and Density ! ! Bands in terms of Kohn-Sham orbitals - complex(SP), allocatable :: V_bands(:,:,:,:) ! time-dependent valence bands + complex(SP), allocatable, target :: V_bands(:,:,:,:) ! time-dependent valence bands ! ! Time-dependent Valence bands in real-space complex(SP), allocatable :: VAL_BANDS(:,:,:,:) diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index a7509735d9..4049bba698 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -24,24 +24,24 @@ subroutine RT_databases_IO(E,DO_IT) ! use electrons, ONLY:n_spin,levels - use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,& + use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,Vbands_RT_IO_t,& & Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_steps_now,CACHE_OBS_steps, & & SAVE_G_history,NE_i_start_time,CACHE_OBS_last_point,Gless_RT_IO_t,RT_DB_ID,& -& RT_return_db_ID,RT_DB_name +& RT_return_db_ID,RT_DB_name,SAVE_Vb_history #if defined _ELPH_ITERATIVE use RT_lifetimes, ONLY:l_RT_iterative_ELPH_lifetimes #endif use real_time, ONLY:NE_i_time,NE_steps,RT_nk,RT_ind_J,RT_P,RT_spin_magn,RT_orbt_magn,& & l_NE_with_fields,RT_step,RT_dyn_step,NE_time,RT_carriers,G_MEM_steps use IO_int, ONLY:io_control,IO_and_Messaging_switch - use IO_m, ONLY:manage_action,NONE,io_GF,io_CARRIERs,io_OBSERVABLES,OP_APP_CL,OP_WR_CL,& + use IO_m, ONLY:manage_action,NONE,io_GF,io_CARRIERs,io_OBSERVABLES,io_V_bands,OP_APP_CL,OP_WR_CL,& & OP_IF_START_APP_CL_IF_END,WR_CL_IF_END,OP_APP,WR_CL,WR,OP_APP,OP_WR use parallel_m, ONLY:PAR_G_k_range,myid,HEAD_k_cpu use parallel_int, ONLY:PP_redux_wait,PP_bcast use timing_m, ONLY:timing use fields, ONLY:A_tot #if defined _PAR_IO - use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX + use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,master_cpu #else use real_time, ONLY:RTibz use parallel_m, ONLY:PAR_IND_Xk_ibz,ncpu,myid @@ -60,7 +60,7 @@ subroutine RT_databases_IO(E,DO_IT) ! ! ... G_lesser ! - integer :: ik,G_IO_steps,io_G,i_cpu,i_G_db,i_G_k_db,i_G_RES_db,i_G_RES_k_db + integer :: ik,G_IO_steps,io_G,io_Vb,i_cpu,i_G_db,i_G_k_db,i_G_RES_db,i_G_RES_k_db,idb_Vb,idb_Vb_k ! call timing('RT databases IO',OPR='start') ! @@ -263,8 +263,56 @@ subroutine RT_databases_IO(E,DO_IT) ! endif ! +#if defined _NL + ! + ! V_bands + !==================== + if (io_V_bands) then + ! +#if !defined _PAR_IO + call error(" Vbands restart not coded for serial I/O") +#endif + ! + idb_Vb =RT_return_db_ID("V_bands") + idb_Vb_k =RT_return_db_ID("V_bands_K_section") + ! + ! Serial SECTION 1 + ! + if(NE_i_time==NE_i_start_time) then + if (NE_i_time==1) IO_ACT=OP_WR_CL + if (NE_i_time> 1) IO_ACT=OP_APP_CL + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/1/),ID=RT_DB_ID(idb_Vb)) + io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb)) + endif + ! + if (RT_do_it('Vb').or.DO_IT) then + ! + Vbands_RT_IO_t%N=1 + if (SAVE_Vb_history) Vbands_RT_IO_t%N=Vbands_RT_IO_t%N+1 + Vbands_RT_IO_t%Time(Vbands_RT_IO_t%N)=NE_time + ! + IO_ACT=manage_action(OP_IF_START_APP_CL_IF_END,NE_i_time,NE_i_start_time,NE_steps) + ! + ! SERIAL SECTION 2 + ! + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/2/),ID=RT_DB_ID(idb_Vb)) + io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb)) + ! + ! (PARALLEL) k-SECTION 3 + ! + !call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k),COMM=PAR_COM_Xk_ibz_INDEX,DO_IT=HEAD_k_CPU) + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k),DO_IT=master_cpu) + io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb_k)) + ! + endif + ! + endif + ! +#endif + ! if (RT_do_it('OBS').or.DO_IT ) call PP_bcast( OBS_RT_IO_t%last_point,0) if (RT_do_it('CARR').or.DO_IT) call PP_bcast(CARR_RT_IO_t%last_point,0) + if (RT_do_it('Vb').or.DO_IT) call PP_bcast(Vbands_RT_IO_t%last_point,0) if (RT_do_it('G').or.DO_IT) call PP_bcast(Gless_RESTART_RT_IO_t%last_point,0) if (RT_do_it('G').or.DO_IT) call PP_bcast(Gless_RT_IO_t%last_point,0) ! From ecdf03c6c7210bc273c9ebc534a377fc661ef6f7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 6 Jun 2022 17:46:57 +0200 Subject: [PATCH 0321/1367] Version 5.1.0, Revision 21557, Hash 48c095a36 MODIFIED * include/driver/version.h io/.objects ph-el/PHEL_from_GF_to_quasiphonons.F Bugs: - [yambo_rt] Fixed compilation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/.objects | 4 ++-- src/ph-el/PHEL_from_GF_to_quasiphonons.F | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 292be3ac1b..90fe8321a5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21556 -#define YAMBO_HASH "39c9c7432" +#define YAMBO_REVISION 21557 +#define YAMBO_HASH "48c095a36" diff --git a/src/io/.objects b/src/io/.objects index 5a746813b6..2dd524efc6 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -3,11 +3,11 @@ SC_objects = load_SC_components.o io_SC_components.o variables_SC.o io_KB_real_s #endif #if defined _RT RT_objects = io_RT_components.o io_RT_components_G_lesser.o io_RT_components_header.o io_RT_components_OBS.o \ - io_RT_components_V_bands.o io_RT_components_Reference.o io_RT_components_TIME_points.o \ + io_RT_components_Reference.o io_RT_components_TIME_points.o \ variables_RT_static.o variables_RT_dynamic.o io_KB_real_space.o #endif #if defined _NL -NL_objects = variables_NL.o io_NL.o +NL_objects = variables_NL.o io_NL.o io_RT_components_V_bands.o #endif #if defined _ELPH ELPH_objects = variables_ELPH.o io_ELPH.o io_gFsq.o diff --git a/src/ph-el/PHEL_from_GF_to_quasiphonons.F b/src/ph-el/PHEL_from_GF_to_quasiphonons.F index da3b991dee..1b8e4eab56 100644 --- a/src/ph-el/PHEL_from_GF_to_quasiphonons.F +++ b/src/ph-el/PHEL_from_GF_to_quasiphonons.F @@ -112,7 +112,7 @@ subroutine PHEL_from_GF_to_quasiphonons(il,iq,ph_freq,QPH) do iw=1,QPH%N_D_freqs W=real( QPH%W(iw) ) + cI*0.1_SP/1000._SP/HA2EV if (trim(QPH%what)=="FULL") then - QPH%D(iw)=D_from_PI(cmplx(ph_freq),PHEL_qp%PI(il,iq,iw)-PI_ref,W) + QPH%D(iw)=D_from_PI(cmplx(ph_freq,kind=SP),PHEL_qp%PI(il,iq,iw)-PI_ref,W) else if (.not.trim(QPH%what)=="DDFPT)") then QPH%D(iw)=D_from_POLE_and_GAMMA(QPH%Pole,QPH%Gamma,QPH%Residual,W) endif From ff3284da5288dbb7a56e0e4ead6c592063814605 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 6 Jun 2022 18:06:51 +0200 Subject: [PATCH 0322/1367] Version 5.1.0, Revision 21558, Hash ecdf03c6c MODIFIED * include/driver/version.h interface/INIT_load.F modules/SET_defaults.F real_time_control/RT_do_it.F real_time_propagation/RT_IO_type_time_steps.F Bugs: - [yambo_nl] Fixed control of Vbands IO time Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_load.F | 7 ++++++- src/modules/SET_defaults.F | 3 ++- src/real_time_control/RT_do_it.F | 6 +++++- src/real_time_propagation/RT_IO_type_time_steps.F | 3 ++- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 90fe8321a5..f9f2abad21 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21557 -#define YAMBO_HASH "48c095a36" +#define YAMBO_REVISION 21558 +#define YAMBO_HASH "ecdf03c6c" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index c26f1ef35e..128c6ad06f 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -80,7 +80,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _RT use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t, & -& CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t +& CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t,Vbands_RT_IO_t use stderr, ONLY:intc use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem use RT_lifetimes, ONLY:RT_life_extrap_times_INPUT @@ -444,11 +444,16 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'Integrator', '[RT] Integrator. Use keywords space separated ( "EULER/EXPn/INV" "SIMPLE/RK2/RK4/HEUN" "RWA") ',& & Integrator_name) ! +#if defined _NL + IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Vbands_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/) +#elif defined _RT IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/) +#endif call it(defs,'IOtime', '[RT] Time between two consecutive I/O (CARRIERs - GF - OUTPUT)',IO_times,unit=Time_unit(1)) CARR_RT_IO_t%INTERVAL_time_INPUT =IO_times(1) Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) Gless_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) + Vbands_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) OUTPUT_RT_IO_t%INTERVAL_time_INPUT =IO_times(3) ! IO_times(1:2)=(/CACHE_OBS_INTERVAL_time_INPUT,OBS_RT_IO_t%INTERVAL_time_INPUT/) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 0361d80b28..790cdefed7 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -103,7 +103,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use RT_output_m,ONLY:n_RT_headings,N_RT_o_files,RT_o_file_long,RT_o_file_short,RT_o_file_is_open,& & RT_headings,YPP_append,Gr_desc,TIME_STEP_desc,RT_desc use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t,SAVE_G_history,RT_ctl_db,& -& CACHE_OBS_last_point,CACHE_OBS_INTERVAL_time,CACHE_OBS_INTERVAL_time_INPUT, & +& Vbands_RT_IO_t,CACHE_OBS_last_point,CACHE_OBS_INTERVAL_time,CACHE_OBS_INTERVAL_time_INPUT, & & CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history use RT_lifetimes,ONLY:RT_life_extrap_times use real_time, ONLY:RT_step,NE_steps,NE_time,Integrator_name,RT_deph_range,& @@ -657,6 +657,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) CARR_RT_IO_t%INTERVAL_time_INPUT =2._SP*FS2AUT OUTPUT_RT_IO_t%INTERVAL_time_INPUT =5._SP*FS2AUT Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =1._SP*FS2AUT + Vbands_RT_IO_t%INTERVAL_time_INPUT =1._SP*FS2AUT SAVE_G_history=.FALSE. SAVE_Vb_history=.FALSE. RT_NAN_found =.FALSE. diff --git a/src/real_time_control/RT_do_it.F b/src/real_time_control/RT_do_it.F index b6ae0a3201..b3b7cdcaf2 100644 --- a/src/real_time_control/RT_do_it.F +++ b/src/real_time_control/RT_do_it.F @@ -23,7 +23,7 @@ ! logical function RT_do_it(what) ! - use RT_control, ONLY:OBS_RT_IO_t,Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_INTERVAL_time,& + use RT_control, ONLY:OBS_RT_IO_t,Gless_RESTART_RT_IO_t,Vbands_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_INTERVAL_time,& & CACHE_OBS_last_point,OUTPUT_RT_IO_t,NE_i_start_time,STOP_the_dynamics_NOW use real_time, ONLY:NE_i_time,RT_step,NE_time_step_update_jump,NE_time_step_update_last_point use parser_m, ONLY:parser @@ -59,6 +59,10 @@ logical function RT_do_it(what) INTERVAL_steps=Gless_RESTART_RT_IO_t%INTERVAL_steps last_point =Gless_RESTART_RT_IO_t%last_point endif + if (what=="Vb") then + INTERVAL_steps=Vbands_RT_IO_t%INTERVAL_steps + last_point =Vbands_RT_IO_t%last_point + endif if (what=="OBS_cache") then INTERVAL_steps=nint(CACHE_OBS_INTERVAL_time/RT_step) last_point =CACHE_OBS_last_point diff --git a/src/real_time_propagation/RT_IO_type_time_steps.F b/src/real_time_propagation/RT_IO_type_time_steps.F index 406134773f..6b4e82bf0e 100644 --- a/src/real_time_propagation/RT_IO_type_time_steps.F +++ b/src/real_time_propagation/RT_IO_type_time_steps.F @@ -27,7 +27,7 @@ subroutine RT_IO_type_time_steps(what) use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,RT_IO_t,Gless_RESTART_RT_IO_t,OUTPUT_RT_IO_t,& & SETUP_RT_IO_type,CACHE_OBS_INTERVAL_time_INPUT,TIME_adjust,& & CACHE_OBS_INTERVAL_time,CACHE_OBS_steps,RT_control_free,& -& RT_control_alloc,Gless_RT_IO_t,SAVE_G_history +& RT_control_alloc,Vbands_RT_IO_T,Gless_RT_IO_t,SAVE_G_history ! implicit none ! @@ -38,6 +38,7 @@ subroutine RT_IO_type_time_steps(what) call SETUP_RT_IO_type(CARR_RT_IO_t,who="CARR",what=what) call SETUP_RT_IO_type(OUTPUT_RT_IO_t,who="OUTPUT",what=what) call SETUP_RT_IO_type(Gless_RESTART_RT_IO_t,who="GF",what=what) + call SETUP_RT_IO_type(Vbands_RT_IO_t,who="Vb",what=what) call SETUP_RT_IO_type(OBS_RT_IO_t,who="OBS",what=what) if (SAVE_G_history) call SETUP_RT_IO_type(Gless_RT_IO_t,who="GF_history",what=what) ! From a7d0b76ab2fe365c8ceaba9f3714e7e0203dfe06 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 7 Jun 2022 11:10:05 +0200 Subject: [PATCH 0323/1367] Version 5.1.0, Revision 21559, Hash ff3284da5 MODIFIED * include/driver/version.h interface/INIT_activate.F interface/INIT_load.F io/io_RT_components_V_bands.F nloptics/NL_initialize.F real_time_control/RT_databases_IO.F real_time_control/RT_do_it.F Bugs: - [yambo_nl] Fixed wrong I/O Additions: - Changes: - [yambo_nl] Fixed SAVE_Vb_history mode Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + src/io/io_RT_components_V_bands.F | 5 +++-- src/nloptics/NL_initialize.F | 4 +++- src/real_time_control/RT_databases_IO.F | 8 ++++---- src/real_time_control/RT_do_it.F | 2 +- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f9f2abad21..d5c941ee56 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21558 -#define YAMBO_HASH "ecdf03c6c" +#define YAMBO_REVISION 21559 +#define YAMBO_HASH "ff3284da5" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index c4be4a4a58..a6bb048d12 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -550,7 +550,7 @@ subroutine INIT_activate() if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps') - if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime') + if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd EvalCurrent InducedField FrPolPerdic') call initactivate(1,'Gauge RADLifeTime HARRLvcs EXXRLvcs') call init_QP_ctl_switch('G') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 128c6ad06f..701a125487 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -533,6 +533,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'UseDipoles','[NL] Use Covariant Dipoles (just for test purpose)',verb_level=V_nl_optics) call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_nl_optics) call it('f',defs,'EvalCurrent','[NL] Evaluate the current') + call it('f',defs,'SaveVbhistory', '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics) ! call it(defs,'NLSampleWF', '[NL] Sample the WFs (sampling NL order)',n_order,verb_level=V_nl_optics) ! diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F index e8e2acf78c..4c7f0bce0e 100644 --- a/src/io/io_RT_components_V_bands.F +++ b/src/io/io_RT_components_V_bands.F @@ -31,7 +31,7 @@ subroutine io_RT_components_V_bands(ID,T_size) use IO_int, ONLY:def_variable_bulk,io_variable_bulk use IO_m, ONLY:io_sec,io_unit,netcdf_call,nf90_sync use electrons, ONLY:n_sp_pol,n_full_bands - use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,RT_do_IO + use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,SAVE_Vb_history use real_time, ONLY:RT_bands,RT_nbands,NE_i_time!,RT_dyn_step,RT_step use nl_optics, ONLY:V_bands use netcdf, ONLY:NF90_UNLIMITED @@ -57,7 +57,6 @@ subroutine io_RT_components_V_bands(ID,T_size) IPOS(1:5)=1 ! VAR_SZ(6) = 1 - if (RT_do_IO("V_bands_K_section")) VAR_SZ(6) = NF90_UNLIMITED dim_names(6) ='V_bands_IO_time_step' IPOS(6)=Vbands_RT_IO_t%N ! @@ -70,8 +69,10 @@ subroutine io_RT_components_V_bands(ID,T_size) ! Variable Definitions... !------------------------- if( NE_i_time==NE_i_start_time.or..not.l_nl_p_and_p) then + if (SAVE_Vb_history) VAR_SZ(6) = NF90_UNLIMITED !call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,silent=.true.) + VAR_SZ(6) = 1 endif ! ! Variable I/O... diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 8c7cb5fe7c..0fd5e1585b 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -36,7 +36,8 @@ subroutine NL_initialize(E,k) use fields, ONLY:Efield,Efield_strength,n_ext_fields,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime - use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields + use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& +& SAVE_Vb_history use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity, & @@ -62,6 +63,7 @@ subroutine NL_initialize(E,k) call parser('InducedField' , l_RT_induced_field) call parser('EvalCurrent' , l_eval_CURRENT) call parser('FrPolPerdic' , l_P_periodic) + call parser('SaveVbhistory', SAVE_Vb_history) ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index 4049bba698..97550bd298 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -287,8 +287,8 @@ subroutine RT_databases_IO(E,DO_IT) ! if (RT_do_it('Vb').or.DO_IT) then ! - Vbands_RT_IO_t%N=1 - if (SAVE_Vb_history) Vbands_RT_IO_t%N=Vbands_RT_IO_t%N+1 + if (.not.SAVE_Vb_history) Vbands_RT_IO_t%N=1 + if ( SAVE_Vb_history) Vbands_RT_IO_t%N=Vbands_RT_IO_t%N+1 Vbands_RT_IO_t%Time(Vbands_RT_IO_t%N)=NE_time ! IO_ACT=manage_action(OP_IF_START_APP_CL_IF_END,NE_i_time,NE_i_start_time,NE_steps) @@ -301,8 +301,8 @@ subroutine RT_databases_IO(E,DO_IT) ! (PARALLEL) k-SECTION 3 ! !call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k),COMM=PAR_COM_Xk_ibz_INDEX,DO_IT=HEAD_k_CPU) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k),DO_IT=master_cpu) - io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb_k)) + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k)) + io_Vb=io_RT_components("V_bands_K_section",RT_DB_ID(idb_Vb_k)) ! endif ! diff --git a/src/real_time_control/RT_do_it.F b/src/real_time_control/RT_do_it.F index b3b7cdcaf2..34f5851368 100644 --- a/src/real_time_control/RT_do_it.F +++ b/src/real_time_control/RT_do_it.F @@ -80,7 +80,7 @@ logical function RT_do_it(what) ! ! Do we STOP now ? !================== - if (what=="G".and.RT_do_it) then + if ((what=="G".or.what=="Vb").and.RT_do_it) then call it_reset(0) call parser('STOP_NOW',STOP_the_dynamics_NOW) endif From 5f08fcc26c3713f3032e5f594959459f38b2ff35 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 7 Jun 2022 12:37:33 +0200 Subject: [PATCH 0324/1367] Version 5.1.0, Revision 21560, Hash a7d0b76ab MODIFIED * include/driver/version.h io/io_RT_components_V_bands.F modules/mod_RT_control.F nloptics/NL_driver.F nloptics/NL_start_and_restart.F real_time_initialize/RT_start_and_restart.F Changes: - [yambo_nl] First version of restart working Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/io/io_RT_components_V_bands.F | 15 +- src/modules/mod_RT_control.F | 1 + src/nloptics/NL_driver.F | 33 +++-- src/nloptics/NL_start_and_restart.F | 139 +++++++++++++----- .../RT_start_and_restart.F | 2 +- 6 files changed, 129 insertions(+), 65 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d5c941ee56..54289a9525 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21559 -#define YAMBO_HASH "ff3284da5" +#define YAMBO_REVISION 21560 +#define YAMBO_HASH "a7d0b76ab" diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F index 4c7f0bce0e..c11b1f4e14 100644 --- a/src/io/io_RT_components_V_bands.F +++ b/src/io/io_RT_components_V_bands.F @@ -25,14 +25,11 @@ subroutine io_RT_components_V_bands(ID,T_size) ! use pars, ONLY:SP,schlen use drivers, ONLY:l_nl_p_and_p - use R_lattice, ONLY:nkibz - use stderr, ONLY:intc use iso_c_binding, ONLY:C_LOC,C_F_POINTER use IO_int, ONLY:def_variable_bulk,io_variable_bulk - use IO_m, ONLY:io_sec,io_unit,netcdf_call,nf90_sync use electrons, ONLY:n_sp_pol,n_full_bands use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,SAVE_Vb_history - use real_time, ONLY:RT_bands,RT_nbands,NE_i_time!,RT_dyn_step,RT_step + use real_time, ONLY:RT_bands,NE_i_time!,RT_dyn_step,RT_step use nl_optics, ONLY:V_bands use netcdf, ONLY:NF90_UNLIMITED use QP_m, ONLY:QP_nk @@ -41,9 +38,7 @@ subroutine io_RT_components_V_bands(ID,T_size) ! integer, intent(in) :: ID,T_size ! - logical :: l_H_rot,l_H_sig,l_H_EQ - integer :: ib,i_sp_pol,i_mem,i_mem_sorted,VAR_SZ(6),IPOS(6),& -& PAR_G_k_range_ibz(2),k_range(2),ip,TMP_VAR_SZ + integer :: VAR_SZ(6),IPOS(6) character(schlen) :: dim_names(6) complex(SP),pointer :: tmp_link(:,:,:,:,:) ! @@ -56,7 +51,7 @@ subroutine io_RT_components_V_bands(ID,T_size) dim_names(1:5) =[character(schlen) :: 'complex', 'NL_bands','nb_full','QP_nk','n_sp_pol'] IPOS(1:5)=1 ! - VAR_SZ(6) = 1 + VAR_SZ(6) = T_size dim_names(6) ='V_bands_IO_time_step' IPOS(6)=Vbands_RT_IO_t%N ! @@ -68,11 +63,11 @@ subroutine io_RT_components_V_bands(ID,T_size) ! ! Variable Definitions... !------------------------- - if( NE_i_time==NE_i_start_time.or..not.l_nl_p_and_p) then + if( NE_i_time==NE_i_start_time .or. .not.l_nl_p_and_p) then if (SAVE_Vb_history) VAR_SZ(6) = NF90_UNLIMITED !call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,silent=.true.) - VAR_SZ(6) = 1 + VAR_SZ(6) = T_size endif ! ! Variable I/O... diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index c219e345fe..cd740dfa22 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -279,6 +279,7 @@ subroutine RT_control_free(what) YAMBO_FREE(OBS_RT_IO_t%Time) YAMBO_FREE(CARR_RT_IO_t%Time) YAMBO_FREE(Gless_RESTART_RT_IO_t%Time) + YAMBO_FREE(Vbands_RT_IO_t%Time) endif ! end subroutine RT_control_free diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 76e328256b..59a4b2118b 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -222,13 +222,17 @@ subroutine NL_driver(E,X,k,q,Dip) cycle endif ! - ! Re-initialization - ! ================ - V_bands=cZERO - do i_sp_pol=1,n_sp_pol - forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE - enddo - if(WF_sample%ison) V_bands_t = cZERO + if (.not.l_pump_and_probe) then + ! + ! Re-initialization + ! ================ + V_bands=cZERO + do i_sp_pol=1,n_sp_pol + forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE + enddo + if(WF_sample%ison) V_bands_t = cZERO + ! + endif ! ! Efield ! ================ @@ -236,7 +240,7 @@ subroutine NL_driver(E,X,k,q,Dip) ! l_dynamics_is_over=.false. ! - NE_i_time=0 + if(.not.l_pump_and_probe) NE_i_time=0 N_sample_size=0 ! do while(.not.l_dynamics_is_over) @@ -269,13 +273,12 @@ subroutine NL_driver(E,X,k,q,Dip) ! else ! - ! - ! Store Variables - ! - NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) - E_ext_t(NE_i_time,:)=E_ext - E_tot_t(NE_i_time,:)=E_tot - E_ks_t (NE_i_time,:)=E_ks + ! Store Variables + ! + NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) + E_ext_t(NE_i_time,:)=E_ext + E_tot_t(NE_i_time,:)=E_tot + E_ks_t (NE_i_time,:)=E_ks ! endif ! diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index a3e88393d0..ea22376d43 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -33,10 +33,14 @@ subroutine NL_start_and_restart(E,k,Dip) ! [4] Initialize the bare Hartree and XC ! [5] Initialize the fields ! - use pars, ONLY:cZERO,rZERO,cONE + use pars, ONLY:cZERO,rZERO,cONE,SP use com, ONLY:msg + use units, ONLY:AUT2FS use electrons, ONLY:levels,n_sp_pol - use real_time, ONLY:rho_reference + use real_time, ONLY:rho_reference,RT_time_status,NE_i_time,RT_step,RT_dyn_step,NE_steps + use RT_control, ONLY:Vbands_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,CACHE_OBS_INTERVAL_time,& +& N_RT_databases,NE_i_start_time,RT_return_db_ID,RT_DB_ID,RT_DB_name,& +& RT_control_alloc,RT_control_free use R_lattice, ONLY:bz_samp use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t @@ -51,7 +55,7 @@ subroutine NL_start_and_restart(E,k,Dip) & V_xc_0,NL_initial_P,l_use_DIPOLES,n_frequencies,freqs_done,JGM,E_xc_0,I_relax,l_use_DIPOLES, & & VAL_BANDS,l_eval_CURRENT,NL_initial_J,NL_P,l_pump_and_probe use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,NONE,file_is_present,VERIFY + use IO_m, ONLY:OP_RD_CL,NONE,file_is_present,VERIFY,DUMP,REP use parallel_int, ONLY:PP_redux_wait use stderr, ONLY:intc use collision_ext, ONLY:COLLISIONS_have_HARTREE @@ -66,9 +70,9 @@ subroutine NL_start_and_restart(E,k,Dip) ! Working space ! logical :: RESTART - integer :: i1,ib,i_f,i_sp_pol - integer :: ID,io_NonLinear - integer, external::io_NL + integer :: i1,ib,i_f,i_sp_pol,i_db + integer :: ID,io_NonLinear,COM_MODE,io_err(N_RT_databases) + integer, external :: io_NL,io_RT_components ! ! ! Initialize the Gf and potentials @@ -163,48 +167,109 @@ subroutine NL_start_and_restart(E,k,Dip) call msg('r ',' Initial =<[Hloc,r]> ',real(NL_initial_J(4:6))) endif ! - ! Restart - ! ==================================== + n_freqs_todo=n_frequencies YAMBO_ALLOC(freqs_done,(n_frequencies)) - ! freqs_done=.false. + RESTART=.FALSE. ! - if(master_cpu) then - ! - call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=VERIFY,ID=ID) - io_NonLinear=io_NL("Nonlinear",ID) - ! - if(io_NonLinear==0) then - do i_f=1,n_frequencies - if(file_is_present('Nonlinear_fragment_'//intc(i_f))) freqs_done(i_f)=.true. - enddo - endif - ! - endif - ! - call PP_redux_wait(freqs_done,imode=3) + ! Restart + ! ==================================== ! - n_freqs_todo=n_frequencies-count(freqs_done) - if(n_freqs_todo/=n_frequencies) call msg('s','RESTART, remaining frequencies ',n_freqs_todo) + if (.not.l_pump_and_probe) then + ! + if(master_cpu) then + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=VERIFY,ID=ID) + io_NonLinear=io_NL("Nonlinear",ID) + ! + if(io_NonLinear==0) then + do i_f=1,n_frequencies + if(file_is_present('Nonlinear_fragment_'//intc(i_f))) freqs_done(i_f)=.true. + enddo + endif + ! + call PP_redux_wait(freqs_done,imode=3) + ! + endif + ! + n_freqs_todo=n_frequencies-count(freqs_done) + if(n_freqs_todo/=n_frequencies) call msg('s','RESTART, remaining frequencies ',n_freqs_todo) + ! + else + ! + NE_i_time=0 + ! + call msg('s','Checking for RESTART in pump and probe mode ') + ! + ! Perform a first I/O to check which DBs are present. + !===================================================== + do i_db=1,N_RT_databases + COM_MODE=NONE + if (i_db==RT_return_db_ID("V_bands_K_section")) cycle + if (i_db==RT_return_db_ID("V_bands")) COM_MODE=REP + write(*,*) i_db + call io_control(ACTION=OP_RD_CL,COM=COM_MODE,SEC=(/1/),MODE=VERIFY,ID=RT_DB_ID(i_db)) + io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) + enddo + ! + ! To restart I need: + ! + ! 1. The Vbands -> wave-functions + ! 2. The OBSERVABLES -> RT_IO_t + ! + RESTART = io_err(RT_return_db_ID("V_bands"))==0.and.io_err(RT_return_db_ID("OBSERVABLES"))==0 + ! + endif ! if (l_pump_and_probe.and.RESTART) then + ! + call msg('s','RESTART in pump and probe mode ') + ! + do i_db=1,N_RT_databases + call RT_RESTART_database_copy( trim(RT_DB_name(i_db)) ) + enddo + ! + call PP_redux_wait() + ! + do i_db=1,N_RT_databases + if (i_db==RT_return_db_ID("V_bands_K_section")) cycle + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2/),MODE=DUMP,ID=RT_DB_ID(i_db)) + io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) + enddo + ! + NE_i_start_time=NE_i_time + ! + call RT_control_free("all") + call RT_control_alloc("all") + ! + YAMBO_FREE(RT_TIME_status) + ! + ! I use G_lesser(:,:,:) to reconstruct everything + ! Note that the databases must be loaded at the RESTART time (NE_time) + ! + i_db=RT_return_db_ID("V_bands_K_section") + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),MODE=DUMP,ID=RT_DB_ID(i_db)) + io_err(i_db)=io_RT_components('V_bands_K_section',RT_DB_ID(i_db)) ! call RT_IO_type_time_steps("RESTART") - !! - !call msg( 'nr','---RESTART report---') - !! - !call msg('s','[RESTART] Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") - !call msg('r','Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") - !call msg('r','Time reached ',real(NE_i_time-1)*RT_step*AUT2FS,"[fs]") - !call msg('r','Time step ',RT_dyn_step*AUT2FS,"[fs]") - !! + ! + call msg( 'nr','---RESTART report---') + ! + call msg('s','[RESTART] Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") + call msg('r','Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") + call msg('r','Time reached ',real(NE_i_time-1)*RT_step*AUT2FS,"[fs]") + call msg('r','Time step ',RT_dyn_step*AUT2FS,"[fs]") + ! !call msg('r', 'dT Update Interval ',NE_time_step_update_jump*AUT2FS,"[fs]") !call msg('r', 'Lifetimes inter/intr times ',RT_life_extrap_times*AUT2FS,"[fs]") - !call msg('r', 'T cache step of J,P,M ',CACHE_OBS_INTERVAL_time*AUT2FS,"[fs]") - !call msg('r', 'T between I/O of J,P,M ',OBS_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + call msg('r', 'T cache step of J,P,M ',CACHE_OBS_INTERVAL_time*AUT2FS,"[fs]") + call msg('r', 'T between I/O of J,P,M ',OBS_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") !call msg('r', ' I/O of carriers ',CARR_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") - !call msg('r', ' I/O of WFs ',Gless_RESTART_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") - !call msg('r', ' outputs ',OUTPUT_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + call msg('r', ' I/O of WFs ',Vbands_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + call msg('r', ' outputs ',OUTPUT_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + ! + NE_i_time=NE_i_time-1 ! endif ! diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 3ae65858ea..666fee67fc 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -132,7 +132,7 @@ subroutine RT_start_and_restart(E,k,q) ! Perform a first I/O to check which DBs are present. !===================================================== RESTART=.FALSE. - do i_db=1,N_RT_databases + do i_db=1,N_RT_databases-2 COM_MODE=NONE if (i_db==RT_return_db_ID("G_lesser_RESTART_K_section").or.i_db==RT_return_db_ID("G_lesser_K_section")) cycle if (i_db==RT_return_db_ID("G_lesser_RESTART")) COM_MODE=REP From 47b12772b61c9e1a67d307f94a42c8393f4ae28f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 7 Jun 2022 17:50:22 +0200 Subject: [PATCH 0325/1367] Version 5.1.0, Revision 21561, Hash 5f08fcc26 MODIFIED * include/driver/version.h interface/INIT_load.F io/variables_NL.F modules/SET_defaults.F modules/mod_nl_optics.F nloptics/NL_driver.F nloptics/NL_initialize.F Changes: -Removed all WF_sampling subroutines from NL, now the V_bands are stored using real_time_control subroutines Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/interface/INIT_load.F | 6 +-- src/io/variables_NL.F | 20 +-------- src/modules/SET_defaults.F | 3 +- src/modules/mod_nl_optics.F | 80 ------------------------------------ src/nloptics/NL_driver.F | 3 +- src/nloptics/NL_initialize.F | 17 +------- 7 files changed, 9 insertions(+), 124 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 54289a9525..3d24d2e98e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21560 -#define YAMBO_HASH "a7d0b76ab" +#define YAMBO_REVISION 21561 +#define YAMBO_HASH "5f08fcc26" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 701a125487..4a2c54f981 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -97,7 +97,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _NL use nl_optics, ONLY:NL_bands,NL_damping,NL_correlation,NL_er,n_frequencies,NL_LRC_alpha, & -& NL_verb_name,n_order +& NL_verb_name #endif #if defined _NL | defined _SC use fields, ONLY:Efield @@ -449,7 +449,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #elif defined _RT IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/) #endif - call it(defs,'IOtime', '[RT] Time between two consecutive I/O (CARRIERs - GF - OUTPUT)',IO_times,unit=Time_unit(1)) + call it(defs,'IOtime', '[RT] Time between two consecutive I/O (CARRIERs - GF/WF - OUTPUT)',IO_times,unit=Time_unit(1)) CARR_RT_IO_t%INTERVAL_time_INPUT =IO_times(1) Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) Gless_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) @@ -535,8 +535,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'EvalCurrent','[NL] Evaluate the current') call it('f',defs,'SaveVbhistory', '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics) ! - call it(defs,'NLSampleWF', '[NL] Sample the WFs (sampling NL order)',n_order,verb_level=V_nl_optics) - ! #endif ! #if defined _RT || defined _NL diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 98cc7be580..988eb6cbbb 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -25,7 +25,7 @@ integer function variables_NL(ID) ! use units, ONLY:AUT2FS, HA2EV, AU2KWCMm2 use nl_optics, ONLY:NL_damping,l_use_DIPOLES,NL_correlation,NL_er,NL_correlation,n_frequencies, & -& WF_sample_ondisk,n_order,NL_desc +& NL_desc use QP_m, ONLY:QP_ng_SH,QP_ng_Sx use real_time, ONLY:Integrator_name,NE_steps,RT_step,l_RT_induced_field,RT_bands,RAD_LifeTime use electrons, ONLY:n_sp_pol @@ -74,24 +74,6 @@ integer function variables_NL(ID) call io_elemental(ID,VAR="[NL] Radiative Life-Time",R0=RAD_LifeTime,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=NL_desc) call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) ! - ! WF SAMPLING - ! - if (ver_is_gt_or_eq(ID,revision=15726)) then !THIS NEEDS TO BE UPDATED IN CASE ENTERS INTO A DISTRO - call io_elemental(ID,VAR="WF_SAMPLE",VAR_SZ=2+n_sp_pol,MENU=0) - call io_elemental(ID,VAR="[NL] WF sample order ",I0=n_order,CHECK=.true.,OP=(/"=="/), & - & DESCRIPTOR=NL_desc) - if (n_sp_pol==1) then - call io_elemental(ID,VAR="[NL] WF sample valence ",I0=WF_sample_ondisk%n_val(1),CHECK=.true.,OP=(/"=="/), & - & DESCRIPTOR=NL_desc) - else - call io_elemental(ID,VAR="[NL] WF sample valence ",I1=WF_sample_ondisk%n_val,CHECK=.true.,OP=(/"==","=="/), & - & DESCRIPTOR=NL_desc) - endif - call io_elemental(ID,VAR="[NL] WF sample kpoints ",I0=WF_sample_ondisk%n_k,CHECK=.true.,OP=(/"=="/), & - & DESCRIPTOR=NL_desc) - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - end if - ! ! INTEGRATOR ! call io_elemental(ID,VAR="INTEGRATOR",CH0="",VAR_SZ=1,MENU=0) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 790cdefed7..f3ecfe77e7 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -120,7 +120,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #endif #if defined _NL use nl_optics, ONLY:NL_correlation,NL_er,n_frequencies,NL_damping,NL_LRC_alpha, & -& NL_verb_name,NL_bands,n_order,NL_desc +& NL_verb_name,NL_bands,NL_desc use fields, ONLY:Efield,Efield_reset #endif #if defined _SC @@ -686,7 +686,6 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) NL_correlation="IPA" NL_er =(/0.2_SP,8._SP/)/HA2EV n_frequencies =1 - n_order = 0 NL_damping =0.2_SP/HA2EV NL_LRC_alpha =0._SP ! diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 2c8a7d2709..c506de9dbb 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -133,20 +133,6 @@ module nl_optics ! integer, parameter :: DephMult=4 ! - ! Wavefunction sampling - ! - type NLsampleWF - integer :: n_order ! Sampling NL order - integer :: n_size ! Size of sampling - integer :: n_val(2) ! Number of valence per spin channel - integer :: n_k ! Number of kpoints - logical :: ison ! WF sample logical switch - integer, allocatable :: indx_T(:) ! indexes of time sampling - end type NLsampleWF - ! - integer :: n_order - type(NLsampleWF) :: WF_sample, WF_sample_ondisk - ! ! Databases input/output ! integer :: ID(3) @@ -216,8 +202,6 @@ subroutine NL_alloc(en) YAMBO_ALLOC(E_ext_t,(NE_steps,3)) YAMBO_ALLOC(E_ks_t,(NE_steps,3)) ! - call NL_ALLOC_WF_sample(WF_sample,NL_bands(2),n_sp_pol) - ! end subroutine NL_alloc ! subroutine NL_alloc_k_distributed(en) @@ -295,68 +279,4 @@ real function Alpha_ED(en,omega) Alpha_ED = NL_LRC_alpha + beta*omega**2 end function ! - subroutine NL_set_WF_sample(W,n,Tstep,Trange,v,k) - ! - type(NLsampleWF),intent(out) :: W - integer ,intent(in) :: n - real(SP) ,intent(in) :: Tstep - real(SP) ,intent(in) :: Trange(2) - integer ,optional :: v(2),k - ! ws: - integer :: i_t,i_t_start,i_deltaT - ! - W%ison = .false. - if (n > 0) then - W%ison = .true. - W%n_order = min(n,7) - W%n_size = 2*W%n_order + 1 - if (present(v)) W%n_val = v - if (present(k)) W%n_k = k - YAMBO_ALLOC(W%indx_T,(W%n_size)) - i_t_start = nint(Trange(1)/Tstep)+1 - i_deltaT=nint((Trange(2)-Trange(1))/Tstep)/W%n_size - forall(i_t=0:W%n_size-1) W%indx_T(1+i_t) = i_t_start + i_t*i_deltaT - end if - ! - end subroutine NL_set_WF_sample - ! - subroutine NL_COPY_WF_sample(W1,W2) - ! - type(NLsampleWF),intent(in) :: W1 - type(NLsampleWF),intent(out) :: W2 - ! - W2%ison = W1%ison - if (W1%ison) then - W2%n_order = W1%n_order - W2%n_size = W1%n_size - W2%n_val = W1%n_val - W2%n_k = W1%n_k - YAMBO_ALLOC(W2%indx_T,(W2%n_size)) - W2%indx_T(:) = W1%indx_T(:) - end if - ! - end subroutine NL_COPY_WF_sample - ! - subroutine NL_INIT_WF_sample(W) - ! - type(NLsampleWF),intent(inout) :: W - ! - W%ison = .false. - W%n_order = 0 - W%n_size = 0 - W%n_val = 0 - W%n_k = 0 - ! - end subroutine NL_INIT_WF_sample - ! - subroutine NL_ALLOC_WF_sample(W,nb,ns) - ! - type(NLsampleWF),intent(in) :: W - integer, intent(in) :: nb,ns - ! - if (W%ison) then - YAMBO_ALLOC(V_bands_t,(W%n_size,nb,maxval(W%n_val),W%n_k,ns)) - endif - end subroutine NL_ALLOC_WF_sample - ! end module diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 59a4b2118b..0501ac5176 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -42,7 +42,7 @@ subroutine NL_driver(E,X,k,q,Dip) use nl_optics, ONLY:n_frequencies,Correlation,IPA,NL_alloc,NL_free,V_bands,eval_dG,NL_J,NL_initial_J, & & NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P,l_pump_and_probe, & & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,freqs_done,n_freqs_todo,l_eval_CURRENT,& -& HF,SEX,NL_bands,NL_nbands,WF_sample,V_bands_t,NL_alloc_k_distributed +& HF,SEX,NL_bands,NL_nbands,V_bands_t,NL_alloc_k_distributed use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands,eval_DFT,RT_P,RT_ind_J,& & dG_lesser use IO_m, ONLY:io_COLLs @@ -230,7 +230,6 @@ subroutine NL_driver(E,X,k,q,Dip) do i_sp_pol=1,n_sp_pol forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE enddo - if(WF_sample%ison) V_bands_t = cZERO ! endif ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 0fd5e1585b..4d4dd09c7a 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -41,7 +41,7 @@ subroutine NL_initialize(E,k) use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity, & -& n_order,WF_sample,NL_set_WF_sample,NL_INIT_WF_sample,l_eval_CURRENT,l_pump_and_probe,DephMult +& l_eval_CURRENT,l_pump_and_probe,DephMult use electric, ONLY:l_force_SndOrd,l_P_periodic use parser_m, ONLY:parser use stderr, ONLY:intc @@ -53,7 +53,7 @@ subroutine NL_initialize(E,k) ! ! Working space ! - real(SP) :: Time, WF_sample_range(2),W_0,T_0,sigma + real(SP) :: Time, W_0,T_0,sigma integer :: i1 ! ! Parser @@ -330,18 +330,6 @@ subroutine NL_initialize(E,k) ! call RT_control_alloc("all") ! - ! WFs sampling - ! ========================= - ! - call NL_INIT_WF_sample(WF_sample) - WF_sample_range = (/OBS_RT_IO_t%Time(NE_steps) - EtoT(E=NL_er(1))+5._SP*RT_step,OBS_RT_IO_t%Time(NE_steps)/) - call NL_set_WF_sample(WF_sample,n_order,RT_step,WF_sample_range,v=E%nbf,k=k%nibz) - if (Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') WF_sample%ison = .false. - if (n_order > 0) then - if (WF_sample%ison.eqv..false.) call warning('WF sampling switched off (only available with SOFTSIN/SIN field') - if (WF_sample%n_order < n_order) call warning('WF sampling analysis order set to the maximum of 7') - end if - ! ! LOG ! === ! @@ -370,6 +358,5 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Force Snd Order Dipoles ',l_force_SndOrd) call msg( 'r', 'Evaluate Current ',l_eval_CURRENT) call msg( 'r', 'Enforce periodic pol. ',l_P_periodic) - call msg( 'r', 'WF sampling ',WF_sample%ison) ! end subroutine NL_initialize From 3e08bf1865f25b3b303efe870f1ee61f934fec9f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 8 Jun 2022 12:41:59 +0200 Subject: [PATCH 0326/1367] Version 5.1.0, Revision 21562, Hash 47b12772b MODIFIED * include/driver/version.h io/io_RT_components_V_bands.F nloptics/NL_start_and_restart.F Changes: - [yambo_nl] Vbands written only for active NL_bands Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_RT_components_V_bands.F | 37 ++++++++++++++--------------- src/nloptics/NL_start_and_restart.F | 1 - 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3d24d2e98e..c04e2378c3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21561 -#define YAMBO_HASH "5f08fcc26" +#define YAMBO_REVISION 21562 +#define YAMBO_HASH "47b12772b" diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F index c11b1f4e14..d499ad9cf8 100644 --- a/src/io/io_RT_components_V_bands.F +++ b/src/io/io_RT_components_V_bands.F @@ -26,10 +26,11 @@ subroutine io_RT_components_V_bands(ID,T_size) use pars, ONLY:SP,schlen use drivers, ONLY:l_nl_p_and_p use iso_c_binding, ONLY:C_LOC,C_F_POINTER + use IO_m, ONLY:read_is_on,write_is_on use IO_int, ONLY:def_variable_bulk,io_variable_bulk use electrons, ONLY:n_sp_pol,n_full_bands use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,SAVE_Vb_history - use real_time, ONLY:RT_bands,NE_i_time!,RT_dyn_step,RT_step + use real_time, ONLY:RT_bands,RT_nbands,NE_i_time!,RT_dyn_step,RT_step use nl_optics, ONLY:V_bands use netcdf, ONLY:NF90_UNLIMITED use QP_m, ONLY:QP_nk @@ -38,28 +39,24 @@ subroutine io_RT_components_V_bands(ID,T_size) ! integer, intent(in) :: ID,T_size ! - integer :: VAR_SZ(6),IPOS(6) + integer :: VAR_SZ(6),IPOS(6),nbf character(schlen) :: dim_names(6) - complex(SP),pointer :: tmp_link(:,:,:,:,:) + !complex(SP),pointer :: tmp_link(:,:,:,:,:) + complex(SP) :: tmp_var(RT_nbands,maxval(n_full_bands),QP_nk,n_sp_pol,1) ! ! Setup !======= ! - ! Variables SIZE and strings... - !------------------------------- - VAR_SZ(1:5)=(/2,RT_bands(2),maxval(n_full_bands),QP_nk,n_sp_pol/) - dim_names(1:5) =[character(schlen) :: 'complex', 'NL_bands','nb_full','QP_nk','n_sp_pol'] + ! Variables SIZE and names... + !---------------------------- + nbf=maxval(n_full_bands) + VAR_SZ(1:5)=(/2,RT_nbands,nbf,QP_nk,n_sp_pol/) + dim_names(1:5) =[character(schlen) :: 'complex', 'RT_nbands','nb_full','QP_nk','n_sp_pol'] IPOS(1:5)=1 ! VAR_SZ(6) = T_size dim_names(6) ='V_bands_IO_time_step' - IPOS(6)=Vbands_RT_IO_t%N - ! - ! Sizes... - !---------- - !ik = maxval(io_sec(ID,:))-2 - !k_range =(/1,QP_nk/) - !G_IO_steps =Vbands_RT_IO_t%INTERVAL_steps/nint(RT_dyn_step/RT_step) + IPOS(6) = Vbands_RT_IO_t%N ! ! Variable Definitions... !------------------------- @@ -72,11 +69,13 @@ subroutine io_RT_components_V_bands(ID,T_size) ! ! Variable I/O... !----------------- - call C_F_POINTER(C_LOC(V_bands),tmp_link,VAR_SZ(2:6)) - call io_variable_bulk(ID,4,C5=tmp_link,IPOS=IPOS) - nullify(tmp_link) + ! This does not work since the variable is not contiguous + !call C_F_POINTER(C_LOC(V_bands(RT_bands(1):RT_bands(2),1:nbf,1:QP_nk,1:n_sp_pol)),tmp_link,VAR_SZ(2:6)) + !call io_variable_bulk(ID,4,C5=tmp_link,IPOS=IPOS) + !nullify(tmp_link) ! - ! In case of frequent I/O this gives a significant slowdown of the simulation - ! if (G_IO_steps>=10) call netcdf_call(nf90_sync(io_unit(ID)),ID) + if (write_is_on(ID)) tmp_var(:,:,:,:,1) = V_bands(RT_bands(1):RT_bands(2),1:nbf,1:QP_nk,1:n_sp_pol) + call io_variable_bulk(ID,4,C5=tmp_var,IPOS=IPOS) + if (read_is_on(ID)) V_bands(RT_bands(1):RT_bands(2),1:nbf,1:QP_nk,1:n_sp_pol) = tmp_var(:,:,:,:,1) ! end subroutine io_RT_components_V_bands diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index ea22376d43..e26ff263d4 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -207,7 +207,6 @@ subroutine NL_start_and_restart(E,k,Dip) COM_MODE=NONE if (i_db==RT_return_db_ID("V_bands_K_section")) cycle if (i_db==RT_return_db_ID("V_bands")) COM_MODE=REP - write(*,*) i_db call io_control(ACTION=OP_RD_CL,COM=COM_MODE,SEC=(/1/),MODE=VERIFY,ID=RT_DB_ID(i_db)) io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) enddo From f79622f56f0d8f551e2ab605cde5b684f003fff0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 8 Jun 2022 14:21:00 +0200 Subject: [PATCH 0327/1367] Version 5.1.0, Revision 21765, Hash 698ae4282 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -Wrong factor in luminescence fixed Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 48061daba2..83026503d6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21765 -#define YAMBO_HASH "e9f8122bf" +#define YAMBO_REVISION 21766 +#define YAMBO_HASH "698ae4282" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 4399692e3d..43fb5a6b78 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -170,8 +170,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) Epsilon_ii(iw,3)=Epsilon_ii(iw,3)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) ! - PL_ii(iw,1) =PL_ii(iw,1)+(W-2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) - PL_ii(iw,3) =PL_ii(iw,3)+(W-2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,1) =PL_ii(iw,1)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,3) =PL_ii(iw,3)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) ! enddo ! @@ -222,7 +222,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! exc_E=BS_E_in(i_alpha)-min_E pole =BS_E_in(i_alpha) - PL_ii(iw,1:2) =PL_ii(iw,1:2) + W**2*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & + PL_ii(iw,1:2) =PL_ii(iw,1:2) + W*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo From fd735c22d80617fbe1224a33920d4a521721210f Mon Sep 17 00:00:00 2001 From: Pedro Melo Date: Thu, 9 Jun 2022 10:58:08 +0200 Subject: [PATCH 0328/1367] Fixed issue in PL diago residuals where different dimensions were being used for writting the BSE resonant and anti-resonant parts of the Kernel. --- src/bse/K_Transition_check.F | 9 ++++++- .../K_components_folded_in_serial_arrays.F | 1 + src/bse/PL_diago_residual.F | 26 +++++++++++++------ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 175db8b989..28b66160e9 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -87,10 +87,17 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! #if defined _RT if (l_rt_carriers_in_use.and.allocated(Ken%fo)) then + ! + write(*,*) 'EQ_Transitions', EQ_Transitions + write(*,*) 'NEQ_Kernel', NEQ_Kernel + write(*,*) 'NEQ_Residuals', NEQ_Residuals ! if ( EQ_Transitions) f_eh_REF=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ if (.not.EQ_Transitions) f_eh_REF=(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ - if ( NEQ_Kernel ) f_eh =(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ + if ( NEQ_Kernel ) then + f_eh =(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ + write(*,*)'checking f_eh', f_eh, Ken%f (iv,ikp,i_sp_v), Ken%f (ic,ik ,i_sp_c), iv, ic, ik, i_sp_c + endif if (.not.NEQ_Kernel ) f_eh =(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ if ( NEQ_Residuals ) f_eh_RES=(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ if (.not.NEQ_Residuals ) f_eh_RES=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index a9626b4446..9f032fd17c 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -107,6 +107,7 @@ subroutine K_components_folded_in_serial_arrays(iq) BSS_eh_table(H_pos,:)=(/i_k_bz,i_v,i_c,i_sp_c,i_sp_v/) ! BSS_eh_E(H_pos)=BS_T_grp(i_g)%E(i_Tr)*ares_fac + write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%Z)) BSS_eh_Z(H_pos)=BS_T_grp(i_g)%Z(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%W)) BSS_eh_W(H_pos)=BS_T_grp(i_g)%W(i_Tr)*ares_fac diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 4078421276..ad6df3fadc 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -44,9 +44,9 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! Workspace ! type(PP_indexes) ::px - integer ::i_l,i_c,i_K,i_lr,i_ll + integer ::i_l,i_c,i_K,i_lr,i_ll, ik complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& -& R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) +& R_over_R_x_A(2,BS_K_dim(1)),B(BS_H_dim) ! ! Parallel indexes ! @@ -140,25 +140,34 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ write(*,*) 'shape(BS_V_right)', shape(BS_V_right) write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) ! - do i_l=1,BS_K_dim(1) + do i_l=1,2!BS_K_dim(1) ! if (.not.px%element_1D(i_l)) cycle ! ! R_over_R_x_A = R<_j/R_j A^l_j ! - R_over_R_x_A(1,1:BS_K_dim(1)) = BSS_PL_f(1:BS_K_dim(1)) *BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) - R_over_R_x_A(2,:) = BSS_PL_f(BS_K_dim(1)+1:)*BS_V_right(:,i_l)/BSS_eh_f(:) + if (i_l == 1) write(*,*) 'BSS_PL_f', dot_product(BSS_PL_f(1:BS_K_dim(1)),BSS_PL_f(1:BS_K_dim(1))) + if (i_l == 1) write(*,*) 'BS_V_right', dot_product(BS_V_right(1:BS_K_dim(1),1),BS_V_right(1:BS_K_dim(1),1)) + if (i_l == 1) write(*,*) 'BSS_eh_f', dot_product(BSS_eh_f(1:BS_K_dim(1)),BSS_eh_f(1:BS_K_dim(1))) ! + do ik=1,BS_K_dim(1) + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + write(*,*) ik, R_over_R_x_A(1,ik), BSS_PL_f(ik),BS_V_right(ik,i_l),BSS_eh_f(ik) + enddo +! R_over_R_x_A(1,1:BS_K_dim(1)) = BSS_PL_f(1:BS_K_dim(1))*BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) + R_over_R_x_A(2,1:BS_K_dim(1)) = BSS_PL_f(BS_K_dim(1)+1:)*BS_V_right(BS_K_dim(1)+1:,i_l)/BSS_eh_f(BS_K_dim(1)+1:) + ! + if (i_l == 1) write(*,*) 'R_over_R_x_A(1,1)', R_over_R_x_A(1,1) ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j ! - adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(:,i_l)),R_over_R_x_A(1,:)) - adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(:,i_l)),R_over_R_x_A(2,:)) + adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)),R_over_R_x_A(1,1:BS_K_dim(1))) + adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(BS_K_dim(1)+1:,i_l)),R_over_R_x_A(2,BS_K_dim(1)+1:)) ! do i_c=1,3 ! ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i ! - Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_H_dim,BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) ! enddo ! @@ -167,6 +176,7 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! BS_R_PL(:,i_l)=dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:) ! + if (i_l == 1) write(*,*) BS_R_PL(:,i_l) call live_timing(steps=1) ! enddo From 1a97e7609c695a0009eda118df6df0a264de7c41 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 9 Jun 2022 11:15:18 +0200 Subject: [PATCH 0329/1367] Version 5.1.0, Revision 21792, Hash f41d48d7d MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -Wrong timing in satellites log Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 709da740ca..24b9c32b8f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21574 -#define YAMBO_HASH "08ac288ff" +#define YAMBO_REVISION 21792 +#define YAMBO_HASH "f41d48d7d" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 43fb5a6b78..4fc51d14ba 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -114,7 +114,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) max_Sat_weight_PH_abs=rZERO max_Sat_pos_PH_abs =0 ! - call live_timing('Satellites',q%nibz) + call live_timing('Satellites',q%nbz) ! do iq_bz=1,q%nbz ! From e28a0a09cd8fa132523ca988cf2ce1a0b1208b71 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 9 Jun 2022 12:18:06 +0200 Subject: [PATCH 0330/1367] Version 5.1.0, Revision 21793, Hash 1a97e7609 MODIFIED * config/version/version.m4 include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -Satellites calculation parallelized Changes: - Patch sent by: Claudio Attaccalite --- config/version/version.m4 | 6 +++--- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 26 +++++++++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index ea3fbcfcae..f4bdadae00 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21574 h.08ac288ff, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21792 h.f41d48d7d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21574" -SHASH="08ac288ff" +SREVISION="21792" +SHASH="f41d48d7d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/include/driver/version.h b/include/driver/version.h index 24b9c32b8f..80f550ba6f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21792 -#define YAMBO_HASH "f41d48d7d" +#define YAMBO_REVISION 21793 +#define YAMBO_HASH "1a97e7609" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 4fc51d14ba..43a160349d 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -46,6 +46,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,min_EXC_E_DbGd, & & EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,l_DbGd_WEIGHTs use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs_sq + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset use functions, ONLY:boltzman_f,bose_f @@ -65,6 +67,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer :: iq_db integer :: elph_branches_save(2) + type(PP_indexes)::px ! real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) @@ -114,7 +117,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) max_Sat_weight_PH_abs=rZERO max_Sat_pos_PH_abs =0 ! - call live_timing('Satellites',q%nbz) + call PP_indexes_reset(px) + call PARALLEL_index(px,(/wv%n_freqs/)) + ! + call live_timing('Satellites',px%n_of_elements(myid+1)*q%nbz) ! do iq_bz=1,q%nbz ! @@ -137,6 +143,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call EXCPH_eval_renorm(iq_bz,q,EXCPH_Renorm,EXCPH_Renorm_PH_abs,EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs) ! do iw=1,wv%n_freqs + ! + if (.not.px%element_1D(iw)) cycle ! W=wv%p(iw) ! @@ -179,10 +187,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! enddo ! + call live_timing(steps=1) + ! enddo ! - call live_timing(steps=1) - ! enddo ! call live_timing( ) @@ -207,6 +215,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call live_timing('Epsilon',wv%n_freqs) do iw=1,wv%n_freqs + ! + if (.not.px%element_1D(iw)) cycle ! W=wv%p(iw) ! @@ -222,7 +232,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! exc_E=BS_E_in(i_alpha)-min_E pole =BS_E_in(i_alpha) - PL_ii(iw,1:2) =PL_ii(iw,1:2) + W*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & + PL_ii(iw,1:2) =PL_ii(iw,1:2) + W**3*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & & /(W-pole)*boltzman_f(exc_E) ! enddo @@ -233,17 +243,23 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call live_timing( ) ! + ! ! Eps(w)=1._SP - X(w) in agreement with definition in src/bse/ ! - Epsilon_ii(:,:)=1._SP-Epsilon_ii(:,:) ! do iw=1,wv%n_freqs + if (.not.px%element_1D(iw)) cycle W=wv%p(iw) + Epsilon_ii(iw,:)=1._SP-Epsilon_ii(iw,:) PL_ii(iw,:)=-W*PL_ii(iw,:) enddo ! + call PP_redux_wait(Epsilon_ii) + call PP_redux_wait(PL_ii) + ! ! Free ! + call PP_indexes_reset(px) call Sat_free() call Renorm_free() ! From b5f9df9cbaffe8443d913cf81070b7dafee885bb Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 9 Jun 2022 13:36:21 +0200 Subject: [PATCH 0331/1367] Version 5.1.0, Revision 21794, Hash e28a0a09c MODIFIED * config/version/version.m4 include/driver/version.h exc-ph/EXCPH_ave_sat_DbGrid.F Additions: -Improve double-grid for Weights Changes: - Patch sent by: Claudio Attaccalite --- config/version/version.m4 | 6 +++--- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_ave_sat_DbGrid.F | 34 +++++++++++++++++++++---------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index f4bdadae00..ce43faa049 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21792 h.f41d48d7d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21793 h.1a97e7609, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21792" -SHASH="f41d48d7d" +SREVISION="21793" +SHASH="1a97e7609" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/include/driver/version.h b/include/driver/version.h index 80f550ba6f..4cc7023aab 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21793 -#define YAMBO_HASH "1a97e7609" +#define YAMBO_REVISION 21794 +#define YAMBO_HASH "e28a0a09c" diff --git a/src/exc-ph/EXCPH_ave_sat_DbGrid.F b/src/exc-ph/EXCPH_ave_sat_DbGrid.F index e5cc90f17a..f4a1d366ac 100644 --- a/src/exc-ph/EXCPH_ave_sat_DbGrid.F +++ b/src/exc-ph/EXCPH_ave_sat_DbGrid.F @@ -38,13 +38,10 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! Work space ! integer :: i_alpha,i_beta,il,iq_db,iE_fg,iq_fg,nq_around - real(SP) :: ph_E,weight_DbGd,E_alpha,E_beta + real(SP) :: ph_E,weight_dbgd,weight_dbgd_PH_abs,E_alpha,E_beta complex(SP) :: W_DG,W_DG_PH_abs real(SP), external :: get_ph_E_DbGd ! - nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz - weight_dbgd=1._SP/real(nq_around,SP) - ! ! Calculate satellites weights and renormalization factors without double-grid ! do i_alpha=EXCPH_states(1),EXCPH_states(2) @@ -58,11 +55,15 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) W_DG=cZERO W_DG_PH_abs=cZERO ! + weight_dbgd =rZERO + weight_dbgd_PH_abs =rZERO + ! ! Renormalize satellite weight with double-grid - ! + ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) ! if(iq_fg==q%FGbz%k_range(iq_bz,1)) then + ! iq_db=Q_io_map(iq_bz) ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) ! @@ -80,16 +81,27 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! E_beta =EXC_E_DbGd(i_beta,iq_fg) ! - W_DG =W_DG + 1._SP/(E_beta-E_alpha+ph_E+cI*L_damping) - W_DG_PH_abs=W_DG_PH_abs + 1._SP/(E_beta-E_alpha-ph_E+cI*L_damping) + if(abs(E_beta-E_alpha+ph_E)>FAN_deltaE_treshold) then + W_DG =W_DG + 1._SP/(E_beta-E_alpha+ph_E+cI*L_damping) + weight_dbgd =weight_dbgd+1._SP + endif + ! + if(abs(E_beta-E_alpha-ph_E)>FAN_deltaE_treshold) then + W_DG_PH_abs =W_DG_PH_abs + 1._SP/(E_beta-E_alpha-ph_E+cI*L_damping) + weight_dbgd_PH_abs =weight_dbgd_PH_abs+1._SP + endif ! enddo ! - W_DG =W_DG *weight_dbgd* abs(BS_Sat_E(il,i_beta,i_alpha)) - W_DG_PH_abs=W_DG_PH_abs*weight_dbgd*abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha)) + if(weight_dbgd/=rZERO) then + W_DG =W_DG *1._SP/weight_dbgd *abs(BS_Sat_E(il,i_beta,i_alpha)) + BS_Sat_WEIGHT(il,i_beta,i_alpha) =BS_Sat_WEIGHT(il,i_beta,i_alpha) *abs(W_DG)**2 + endif ! - BS_Sat_WEIGHT(il,i_beta,i_alpha) =BS_Sat_WEIGHT(il,i_beta,i_alpha) *abs(W_DG)**2 - BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*abs(W_DG_PH_abs)**2 + if(weight_dbgd_PH_abs/=rZERO) then + W_DG_PH_abs=W_DG_PH_abs*1._SP/weight_dbgd_PH_abs*abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha)) + BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)*abs(W_DG_PH_abs)**2 + endif ! enddo ! il enddo ! i_beta From e8256ef96d87b03a965f141526ad5700c096373b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 9 Jun 2022 14:26:50 +0200 Subject: [PATCH 0332/1367] Version 5.1.0, Revision 21607, Hash 5af9671e5 MODIFIED * include/driver/version.h bse/K_Transition_check.F bse/K_driver_init.F bse/K_inversion_driver.F dipoles/DIPOLE_IO.F output/K_OUTPUT.F output/X_OUTPUT_driver.F Bugs: - [yambo_rt] Few fixes after merge Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_Transition_check.F | 13 ++++--------- src/bse/K_driver_init.F | 1 + src/bse/K_inversion_driver.F | 4 ++-- src/dipoles/DIPOLE_IO.F | 1 + src/output/K_OUTPUT.F | 22 ++++++++++++++++++++-- src/output/X_OUTPUT_driver.F | 4 ++-- 7 files changed, 32 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 54d2322136..ed1ed9d739 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21605 -#define YAMBO_HASH "1dac7da57" +#define YAMBO_REVISION 21607 +#define YAMBO_HASH "5af9671e5" diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 69b466a880..6f74d43e5b 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -28,7 +28,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& use X_m, ONLY:global_gauge use DIPOLES, ONLY:DIPOLE_t use electrons, ONLY:levels,n_sp_pol,filled_tresh,spin_occ - use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,l_BS_magnons + use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,l_BS_magnons,l_BS_photolum #if defined _RT use drivers, ONLY:l_rt_carriers_in_use use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,EQ_NoOcc @@ -87,17 +87,10 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! #if defined _RT if (l_rt_carriers_in_use.and.allocated(Ken%fo)) then - ! - write(*,*) 'EQ_Transitions', EQ_Transitions - write(*,*) 'NEQ_Kernel', NEQ_Kernel - write(*,*) 'NEQ_Residuals', NEQ_Residuals ! if ( EQ_Transitions) f_eh_REF=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ if (.not.EQ_Transitions) f_eh_REF=(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ - if ( NEQ_Kernel ) then - f_eh =(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ - write(*,*)'checking f_eh', f_eh, Ken%f (iv,ikp,i_sp_v), Ken%f (ic,ik ,i_sp_c), iv, ic, ik, i_sp_c - endif + if ( NEQ_Kernel ) f_eh =(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ if (.not.NEQ_Kernel ) f_eh =(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ if ( NEQ_Residuals ) f_eh_RES=(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ if (.not.NEQ_Residuals ) f_eh_RES=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ @@ -136,6 +129,8 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! However they contribute to the JDOS. We need to take only the E>0 component, ! since the E<0 component is then accounted for by the anti-resonant part if ( f_eh_REF==0._SP .and. E_eh*(-1._SP)**(i_res_ares-1)<0._SP ) K_Transition_check=.FALSE. + ! f_eh=0 transitions give issue in PL. Removed in this case + if (l_BS_photolum .and. f_eh_REF==0._SP) K_Transition_check=.FALSE. ! #if defined _RT ! diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 77f4262204..7eac643ea0 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -27,6 +27,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use electrons, ONLY:levels,n_sp_pol use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode + use stderr, ONLY:STRING_match,STRING_same use BS_solvers, ONLY:BSS_eels_to_eps,BSS_mode,BSS_slepc_matrix,BSS_uses_DbGd,& & BSS_slepc_double_grp use BS, ONLY:BSE_L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& diff --git a/src/bse/K_inversion_driver.F b/src/bse/K_inversion_driver.F index 0d29d7f0a5..afaf563691 100644 --- a/src/bse/K_inversion_driver.F +++ b/src/bse/K_inversion_driver.F @@ -212,7 +212,7 @@ subroutine K_inversion_driver(iq,W,E,k,q) ! K_INV_EPS%spectra(:,1)=Epsilon_ii(:,2) if (l_BS_photolum) then - K_INV_PL%spectra(:,1)=PL(:,2) + K_INV_PL%spectra(:,1)=cmplx(PL(:,2),0._SP,kind=SP) ! call io_control(ACTION=OP_WR_CL,COM=NONE,SEC=(/1,2,3,4/),ID=ID) i_err=io_BSS_invert(iq,W,ID) @@ -264,7 +264,7 @@ subroutine K_inversion_driver(iq,W,E,k,q) ! I/O [after full inversion] !===== K_INV_EPS%spectra(:,1)=Epsilon_ii(:,2) - if (l_BS_photolum) K_INV_PL%spectra(:,1)=PL(:,2) + if (l_BS_photolum) K_INV_PL%spectra(:,1)=cmplx(PL(:,2),0._SP,kind=SP) ! if (l_BS_photolum) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2,3,4/),ID=ID) diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 47c131aee0..db22849e59 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -26,6 +26,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) use pars, ONLY:SP,cI,cZERO use parser_m, ONLY:parser use stderr, ONLY:intc + use com, ONLY:msg use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp use electrons, ONLY:levels,n_sp_pol diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 7e29b540fc..a3a2639532 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -224,8 +224,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! PHOTOLUMINESCENCE !-------------------- if (X_do_obs("PL")) then - spectra=PL - call ELEMENTAL_dump("PL",spectra) + call ELEMENTAL_dump_real("PL",PL(:,2:3)) endif ! if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) @@ -253,4 +252,23 @@ subroutine ELEMENTAL_dump(OBS_local,F) enddo end subroutine ! + subroutine ELEMENTAL_dump_real(OBS_local,F) + character(*) :: OBS_local + integer :: iw,I + real(SP) :: F(BSS_n_freqs,3) + real(SP) :: data(4) + do iw=1,BSS_n_freqs + data(1 )=real(W%p(iw)) + do I=1,3 + data(I+1)=F(iw,I) + enddo + if (STRING_match(WHAT,"IP")) then + call X_OUTPUT_driver("WRITE "//OBS_local,data=(/data(1),data(3)/)) + else + if (.not.l_last_col) call X_OUTPUT_driver("WRITE "//OBS_local,data=data(:3)) + if ( l_last_col) call X_OUTPUT_driver("WRITE "//OBS_local,data=data(:4)) + endif + enddo + end subroutine + ! end subroutine diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index ece5143300..4a7a999b6f 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -134,9 +134,9 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) enddo endif if (X_do_obs("PL")) then - X_obs(4)%N_columns=3 + X_obs(4)%N_columns=4 X_obs(4)%COL_header(1) = 'E' - X_obs(4)%COL_header(2:3) = (/'PL ','PL_o'/) + X_obs(4)%COL_header(2:4) = (/"PL ","PL_o","PL' "/) endif ! ! ... pre-formatted From 7514c5634b8686839b93ed636a3bc50a964bc3ab Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 9 Jun 2022 14:27:24 +0200 Subject: [PATCH 0333/1367] Version 5.1.0, Revision 21608, Hash e8256ef96 MODIFIED * include/driver/version.h xc_functionals/XC_libxc_driver.F Changes: - [yambo] XC_libxc_driver reverted to bug-fixes version Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/xc_functionals/XC_libxc_driver.F | 19 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ed1ed9d739..d177b010f6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21607 -#define YAMBO_HASH "5af9671e5" +#define YAMBO_REVISION 21608 +#define YAMBO_HASH "e8256ef96" diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 0aeaa70f93..f6c17abe94 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -66,8 +66,6 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) real(SP) :: local_exx_fraction real(DP) :: exsr ! - integer(SP) :: size_IPL_s - ! ! XC routines arrays ! real(SP) :: spin_rho_SP(fft_size,n_spin),rho(fft_size) @@ -255,24 +253,23 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) end if ! size_IPL=int(fft_size,kind=IPL) - size_IPL_s = size_IPL ! do ixc = 1,2 if (fnctl(ixc)%id == 0) cycle if (fnctl(ixc)%family==XC_FAMILY_LDA) then select case(ORDER) case(0) - call xc_f03_lda_exc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), tmp_exc(1)) + call xc_f03_lda_exc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), tmp_exc(1)) E_xc = E_xc + real(tmp_exc,SP) case(1) - call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), v1rho(1,1)) + call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) case(2) if( l_BS_magnons) then - call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), v1rho(1,1)) + call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) if(n_spinor==2) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), v2rho2(1,1)) + call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) ! Yambo internal for Kxc call XC_eval_lda_kernel(v1rho,v2rho2) end select @@ -281,10 +278,10 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if(FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) call XC_eval_pbegaux(spin_rho_DP(1,1), sigma(1,1), exsr,vx1(1,1),vx2(1,1)) select case(ORDER) case(0) - call xc_f03_gga_exc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), tmp_exc(1)) + call xc_f03_gga_exc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), tmp_exc(1)) E_xc = E_xc + real(tmp_exc,SP) case(1) - call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) + call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR.and.ixc==1) then !GAUPBE short energy part of the x potential,factor 2 in vx2 for !consistency qith QE @@ -296,11 +293,11 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) case(2) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) call error(' Fxc not coded for GAU-PBEP') if( l_BS_magnons) then - call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) + call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) ! Yambo internal for V_xc if(n_spinor==2) call XC_eval_gga_potential(v1rho,v1sigma,drho) endif - call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL_s, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) + call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) ! Yambo internal for Kxc call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) end select From bbe289ee60a5232c895d78f09e6489d4dd831675 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 9 Jun 2022 16:47:38 +0200 Subject: [PATCH 0334/1367] Version 5.1.0, Revision 21795, Hash b5f9df9cb MODIFIED * include/driver/version.h exc-ph/Satellite_DbGrid.F Changes: -Better check to the weight in the DB-grid but not change in the result Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_DbGrid.F | 24 +++++++++++++++++++----- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4cc7023aab..fde352e6b5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21794 -#define YAMBO_HASH "e28a0a09c" +#define YAMBO_REVISION 21795 +#define YAMBO_HASH "b5f9df9cb" diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 3f1db6dc06..17619fb6be 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -59,8 +59,6 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss complex(SP) :: pole real(SP), external :: get_ph_E_DbGd ! - nq_around =q%FGbz%k_range(iq_bz,2)-q%FGbz%k_range(iq_bz,1)+1 ! Number of fine q-points around iq_bz - weight_dbgd=1._SP/real(nq_around,SP) ! BS_ave_W =BS_Sat_WEIGHT(il,i_beta,i_alpha) BS_ave_W_PH_abs=BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha) @@ -75,6 +73,8 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! E_alpha =BS_E_in(i_alpha) ! + weight_dbgd=rZERO + ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2),1 ! if(iq_fg==q%FGbz%k_range(iq_bz,1)) then @@ -94,6 +94,8 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! if(ph_E Date: Thu, 9 Jun 2022 18:24:42 +0200 Subject: [PATCH 0335/1367] Version 5.1.0, Revision 21612, Hash ccfaa289f MODIFIED * include/driver/version.h io/io_RT_components.F io/variables_RT_static.F ypp/real_time/RT_X_response.F Changes: - [ypp_rt] Fixed, so that it can work on top of the DB produced by yambo_nl - [ypp_rt] It prints the polarization with pump and probe, the one with pump only and also the difference Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_RT_components.F | 4 ++++ src/io/variables_RT_static.F | 20 +++++++++++--------- ypp/real_time/RT_X_response.F | 19 +++++++++++++++---- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 783d72a413..795bf7520e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21599 -#define YAMBO_HASH "ab3f3d73b" +#define YAMBO_REVISION 21612 +#define YAMBO_HASH "ccfaa289f" diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index ed26219777..c888913bc4 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -210,10 +210,14 @@ integer function io_RT_components(what,ID) !======================= if (RT_do_IO("ANY_G")) call io_RT_components_G_lesser(ID_frag,T_size) ! +#if defined _NL + ! ! Vbands !======== if (RT_do_IO("ANY_Vb")) call io_RT_components_V_bands(ID_frag,T_size) ! +#endif + ! ! Carrier components !==================== if (RT_do_IO("carriers")) then diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index c0b0f770c5..20ba6604e9 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -72,15 +72,17 @@ integer function variables_RT_static(ID) ! ELPH_vars ! #if defined _ELPH - call def_variable_elemental(ID,VAR="ELPH_vars",VAR_SZ=5,VAR_KIND=IP+100,MENU=0) - call io_variable_elemental(ID,L0=l_elph_scatt,& -& VAR=" [E-P] Electron-phonon", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) - call io_variable_elemental(ID,L0=l_RT_iterative_ELPH_lifetimes,& -& VAR=" [E-P] Iterative time evolution ", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) - call io_variable_elemental(ID, & -& VAR=" [E-P] Branches",I1=elph_branches,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=RT_desc) - call io_variable_elemental(ID, & -& VAR=" [E-P] GF`s Memory steps",I0=G_MEM_steps,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + if (.not. (read_is_on(ID) .and. .not.variable_exist(ID,"ELPH_vars")) ) then + call def_variable_elemental(ID,VAR="ELPH_vars",VAR_SZ=5,VAR_KIND=IP+100,MENU=0) + call io_variable_elemental(ID,L0=l_elph_scatt,& +& VAR=" [E-P] Electron-phonon", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + call io_variable_elemental(ID,L0=l_RT_iterative_ELPH_lifetimes,& +& VAR=" [E-P] Iterative time evolution ", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + call io_variable_elemental(ID, & +& VAR=" [E-P] Branches",I1=elph_branches,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=RT_desc) + call io_variable_elemental(ID, & +& VAR=" [E-P] GF`s Memory steps",I0=G_MEM_steps,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + endif #endif ! ! E-E_vars diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 50c7b4d059..282bd83741 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -74,8 +74,8 @@ subroutine RT_X_response(en,k,q) !-------------------------------------------------- ! Database ! - allocate(Pol(N_pumps+N_probes)) - allocate(Curr(N_pumps+N_probes)) + allocate(Pol(N_pumps+N_probes+1)) + allocate(Curr(N_pumps+N_probes+1)) ! call IO_temporary_jobdir_and_strings("ALL","SAVE") ! @@ -83,8 +83,13 @@ subroutine RT_X_response(en,k,q) Pol(1)%title ="polarization" Curr(1)%title="current" else - Pol(1)%title ="probe-polarization" - Curr(1)%title="probe-current" + ! + ! Here the assumption is that + ! - run 1 contains both the pump(s) and the probe. Probe is Field1 + ! - run 2 contains only the pump(s) + ! + Pol(1)%title ="pump-probe-polarization" + Curr(1)%title="pump-probe-current" Pol(2)%title ="pump-polarization" Curr(2)%title="pump-current" if (.not.STRING_same(Pump_path,"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Pump_path) @@ -106,6 +111,12 @@ subroutine RT_X_response(en,k,q) if (N_pumps>0) then call RT_OBSERVABLES_damp_and_write(Pol(2),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(2),RT_conf,l_skip_OBS_IO) + Pol(3)%title ="probe-polarization" + Curr(3)%title="probe-current" + Pol(3)%F_t =Pol(1)%F_t -Pol(2)%F_t + Curr(3)%F_t=Curr(1)%F_t-Curr(2)%F_t + call RT_OBSERVABLES_damp_and_write(Pol(3),RT_conf,l_skip_OBS_IO) + call RT_OBSERVABLES_damp_and_write(Curr(3),RT_conf,l_skip_OBS_IO) endif ! if ( l_RT_pol ) then From cb39cba1bc855daa7a9b7e105d4d31ef2450956b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 10 Jun 2022 09:40:56 +0200 Subject: [PATCH 0336/1367] Version 5.1.0, Revision 21613, Hash ddf7e56 MODIFIED * ypp/real_time/RT_time_configuration_setup.F NEW * Bugs: - [ypp_rt] Fixed issue with time range Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/real_time/RT_time_configuration_setup.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 795bf7520e..3d975a7d23 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21612 -#define YAMBO_HASH "ccfaa289f" +#define YAMBO_REVISION 21613 +#define YAMBO_HASH "ddf7e56" diff --git a/ypp/real_time/RT_time_configuration_setup.F b/ypp/real_time/RT_time_configuration_setup.F index 5e8c7487b7..626d06aa52 100644 --- a/ypp/real_time/RT_time_configuration_setup.F +++ b/ypp/real_time/RT_time_configuration_setup.F @@ -161,14 +161,14 @@ subroutine RT_time_configuration_setup(what,GENERAL_RT_IO_t) ! else RT_conf%T_n_steps=1 - YAMBO_ALLOC(RT_time,(RT_conf%T_n_steps)) + YAMBO_ALLOC(RT_time,(1)) RT_time=0._SP RT_conf%delta_T=0._SP endif else - RT_conf%T_n_steps = GENERAL_RT_IO_t%N + RT_conf%T_n_steps = RT_conf%T_n_range(2)-RT_conf%T_n_range(1)+1 YAMBO_ALLOC(RT_time,(RT_conf%T_n_steps)) - RT_time=GENERAL_RT_IO_t%Time + RT_time=GENERAL_RT_IO_t%Time(RT_conf%T_n_range(1):RT_conf%T_n_range(2)) RT_conf%delta_T = STEP endif ! From 30f8607a79e497c50a4d7086321aaef611d53835 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 10 Jun 2022 10:35:11 +0200 Subject: [PATCH 0337/1367] Version 5.1.0, Revision 21613, Hash ddf7e569b MODIFIED * include/driver/version.h io/io_RT_components.F modules/mod_RT_control.F nloptics/NL_start_and_restart.F real_time_control/RT_RESTART_database_copy.F real_time_initialize/RT_start_and_restart.F Bugs: - [yambo_rt / yambo_nl] Fixed restart in case more_io_path is set - [yambo_rt / yambo_nl] Fixed restart for _K_section files Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_RT_components.F | 2 +- src/modules/mod_RT_control.F | 2 ++ src/nloptics/NL_start_and_restart.F | 3 +-- src/real_time_control/RT_RESTART_database_copy.F | 8 ++++---- src/real_time_initialize/RT_start_and_restart.F | 3 +-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 795bf7520e..74e8d83667 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21612 -#define YAMBO_HASH "ccfaa289f" +#define YAMBO_REVISION 21613 +#define YAMBO_HASH "ddf7e569b" diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index c888913bc4..696452d51a 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -129,7 +129,7 @@ integer function io_RT_components(what,ID) ! ! 1st SECTION !============= - if (any((/io_sec(ID,:)==1/))) then + if (any((/io_sec(ID,:)==1/)).and..not.RT_do_IO("ANY_K_section")) then ! call io_RT_components_header(ID,what,loading_carr_before_neq,io_RT_components) if (io_RT_components/=0) goto 1 diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index cd740dfa22..80099a0c27 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -184,12 +184,14 @@ logical function RT_do_IO(what) ! if (what=="ANY_G".and.(RT_current_DB_identifier==5.or.RT_current_DB_identifier==6)) RT_do_IO=.TRUE. if (what=="ANY_G".and.(RT_current_DB_identifier==10.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. + if (what=="ANY_K_section".and.(RT_current_DB_identifier==6.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. if (what=="G_lesser_RESTART".and.RT_current_DB_identifier==5) RT_do_IO=.TRUE. if (what=="G_lesser_RESTART_K_section".and.RT_current_DB_identifier==6) RT_do_IO=.TRUE. if (what=="G_lesser".and. RT_current_DB_identifier==10) RT_do_IO=.TRUE. if (what=="G_lesser_K_section".and. RT_current_DB_identifier==11) RT_do_IO=.TRUE. ! if (what=="ANY_Vb".and.(RT_current_DB_identifier==12.or.RT_current_DB_identifier==13)) RT_do_IO=.TRUE. + if (what=="ANY_K_section".and. RT_current_DB_identifier==13) RT_do_IO=.TRUE. if (what=="V_bands".and. RT_current_DB_identifier==12) RT_do_IO=.TRUE. if (what=="V_bands_K_section".and. RT_current_DB_identifier==13) RT_do_IO=.TRUE. ! diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index e26ff263d4..b5b5bd1ace 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -205,8 +205,7 @@ subroutine NL_start_and_restart(E,k,Dip) !===================================================== do i_db=1,N_RT_databases COM_MODE=NONE - if (i_db==RT_return_db_ID("V_bands_K_section")) cycle - if (i_db==RT_return_db_ID("V_bands")) COM_MODE=REP + if (i_db==RT_return_db_ID("ANY_Vb")) COM_MODE=REP call io_control(ACTION=OP_RD_CL,COM=COM_MODE,SEC=(/1/),MODE=VERIFY,ID=RT_DB_ID(i_db)) io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) enddo diff --git a/src/real_time_control/RT_RESTART_database_copy.F b/src/real_time_control/RT_RESTART_database_copy.F index 2695dcb98f..804fb17bef 100644 --- a/src/real_time_control/RT_RESTART_database_copy.F +++ b/src/real_time_control/RT_RESTART_database_copy.F @@ -27,7 +27,7 @@ subroutine RT_RESTART_database_copy(db) use IO_m, ONLY:cp_file,mk_dir use RT_control, ONLY:RT_DB_file_name use stderr, ONLY:n_max_jobstr,STRING_split - use com, ONLY:jobdir,jobstr + use com, ONLY:jobdir,jobstr,more_io_path use parallel_m, ONLY:master_cpu ! implicit none @@ -56,11 +56,11 @@ subroutine RT_RESTART_database_copy(db) ! call STRING_split(trim(db_to_cp),components,"/",n_non_empty_strings=n_s) ! - if (len_trim(jobdir)>0) destination=trim(jobdir)//"/"//trim(jobstr)//"/"//trim(components(n_s)) - if (len_trim(jobdir)==0) destination= trim(jobstr)//"/"//trim(components(n_s)) + if (len_trim(jobdir)>0) destination=trim(more_io_path)//trim(jobdir)//"/"//trim(jobstr)//"/"//trim(components(n_s)) + if (len_trim(jobdir)==0) destination=trim(more_io_path) //"/"//trim(jobstr)//"/"//trim(components(n_s)) ! if (.not.file_exists(trim(destination))) then - call mk_dir(trim(jobdir)//"/"//trim(jobstr)) + call mk_dir(trim(more_io_path)//"/"//trim(jobdir)//"/"//trim(jobstr)) call cp_file(trim(db_to_cp),trim(destination),i_err) endif ! diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 666fee67fc..5db0a0b9db 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -134,8 +134,7 @@ subroutine RT_start_and_restart(E,k,q) RESTART=.FALSE. do i_db=1,N_RT_databases-2 COM_MODE=NONE - if (i_db==RT_return_db_ID("G_lesser_RESTART_K_section").or.i_db==RT_return_db_ID("G_lesser_K_section")) cycle - if (i_db==RT_return_db_ID("G_lesser_RESTART")) COM_MODE=REP + if (i_db==RT_return_db_ID("ANY_G")) COM_MODE=REP call io_control(ACTION=OP_RD_CL,COM=COM_MODE,SEC=(/1/),MODE=VERIFY,ID=RT_DB_ID(i_db)) io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) enddo From 99887cf9c6ecdf196e837ee81db341a345611cc6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 11 Jun 2022 16:21:12 +0200 Subject: [PATCH 0338/1367] Version 5.1.0, Revision 21616, Hash 9b9ea15 MODIFIED * src/nloptics/NL_initialize.F src/real_time_initialize/RT_initialize.F Bugs: - [yambo_rt/yambo_nl] initial time cannot be zero, otherwise FFT of field is not correct Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/nloptics/NL_initialize.F | 4 +++- src/real_time_initialize/RT_initialize.F | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 74e8d83667..1ce554a437 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21613 -#define YAMBO_HASH "ddf7e569b" +#define YAMBO_REVISION 21616 +#define YAMBO_HASH "9b9ea15" diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 4b581dcae5..5f7aba2165 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -147,7 +147,9 @@ subroutine NL_initialize(E,k) ! Efield(i1)%versor =normalize_v(Efield(i1)%versor) Efield(i1)%amplitude =Efield_strength(Efield(i1)%intensity,'AU') - Efield(i1)%t_initial_indx=nint(Efield(i1)%t_initial/RT_step)+1 + ! t_initial_indx cannot be 1, a previouss time step is always needed + ! see definition of "step_case" in function "theta_function" in src/modules/mod_functions.F + Efield(i1)%t_initial_indx=max(nint(Efield(i1)%t_initial/RT_step)+1,2) Efield(i1)%t_initial =real(Efield(i1)%t_initial_indx-1)*RT_step Efield(i1)%ef_pol ="linear" ! diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index b7f288e7a4..f82317c8fc 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -263,9 +263,9 @@ subroutine RT_initialize(E,k,q) ! Efield(i1)%versor =normalize_v(Efield(i1)%versor) Efield(i1)%amplitude=Efield_strength(Efield(i1)%intensity,'AU') - ! + ! t_initial_indx cannot be 1, a previouss time step is always needed + ! see definition of "step_case" in function "theta_function" in src/modules/mod_functions.F Efield(i1)%t_initial_indx=max(nint(Efield(i1)%t_initial/RT_step)+1,2) - ! Efield(i1)%t_initial=real(Efield(i1)%t_initial_indx-1)*RT_step ! call Check_symmetries(Efield(i1)%versor,"electric") From 5b9ac68d89aaf7017e0e891f31efb9d3cad14df7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 20 Jun 2022 14:11:49 +0200 Subject: [PATCH 0339/1367] Version 5.1.0, Revision 21617, Hash 99887cf9c MODIFIED * include/driver/version.h nloptics/NL_initialize.F Bugs: - [yambo_nl] Fixed definition of OBS_RT_IO_t%Time when not in pump and probe mode Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/nloptics/NL_initialize.F | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1ce554a437..540cd0d2c6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21616 -#define YAMBO_HASH "9b9ea15" +#define YAMBO_REVISION 21617 +#define YAMBO_HASH "99887cf9c" diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 5f7aba2165..a36896971a 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -333,6 +333,13 @@ subroutine NL_initialize(E,k) ! call RT_control_alloc("all") ! + if(.not.l_pump_and_probe) then + do NE_i_time=1,NE_steps + Time=real(NE_i_time-1,SP)*RT_step + OBS_RT_IO_t%Time(NE_i_time)=Time + enddo + endif + ! ! LOG ! === ! From be059dff2e9cfeb71de68538c54915f64004bffd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 Jun 2022 10:47:07 +0200 Subject: [PATCH 0340/1367] Version 5.1.0, Revision 21618, Hash 5b9ac68d8 MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F Bugs: - [yambo_sc/yambo_rt] When HF collisions are computed, N_gvecs_C is always zero Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/collisions/COLLISIONS_HXC.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 540cd0d2c6..0cae9ddab1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21617 -#define YAMBO_HASH "99887cf9c" +#define YAMBO_REVISION 21618 +#define YAMBO_HASH "5b9ac68d8" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 78c9778741..6129243fa9 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -120,9 +120,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) N_g_vecs_C =0 iGo_max =maxval(qindx_S(:,:,2)) ! - if(COLLISIONS_HXC_local ) N_g_vecs_H = QP_ng_SH - if(COLLISIONS_HXC_MB ) N_g_vecs_X = QP_ng_Sx - if(COLLISIONS_HXC_MB .or.l_use_COH_collisions) N_g_vecs_C = QP_ng_Sc + if (COLLISIONS_HXC_local) N_g_vecs_H = QP_ng_SH + if (COLLISIONS_HXC_MB ) N_g_vecs_X = QP_ng_Sx + if (l_compute_screening ) N_g_vecs_C = QP_ng_Sc ! call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_H,"SH") call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_X,"SF") From 26d674eb517df27361a6d2b908597f6d6ce2a3bf Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 25 Jun 2022 18:29:36 +0200 Subject: [PATCH 0341/1367] Version 5.1.0, Revision 21796, Hash bbe289ee6 MODIFIED * include/driver/version.h ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Additions: -Added new flag to expand only k-points in the Gkkp Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/interface/INIT_load_ypp.F | 1 + ypp/interface/INIT_ypp.F | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fde352e6b5..01cf03deae 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21795 -#define YAMBO_HASH "b5f9df9cb" +#define YAMBO_REVISION 21796 +#define YAMBO_HASH "bbe289ee6" diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 3da4bad599..cff61be8dd 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -318,6 +318,7 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'TestPHDGrid','Test double-grid: set all values of the fine grid equal to the couse ones') call it('f',defs,'GkkpReadBare','Read the bare gkkp') call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') + call it('f',defs,'GkkpExpOnlyK','Expand only k-points and not the q-points (that should be already in BZ)') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') ! #endif diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 4dfffa612b..f277b38b26 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -716,7 +716,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) endif ! #if defined _YPP_ELPH - if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand UseQindxB") + if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpExpOnlyK UseQindxB") if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") if (l_gkkp_plot) call initactivate(1,"Degen_Step cooOut") From ddde579746284747dcb74b29cf6dfd734b850aff Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 26 Jun 2022 11:38:27 +0200 Subject: [PATCH 0342/1367] Version 5.1.0, Revision 21828, Hash d2c9d7439 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases.F ypp/modules/mod_YPP_ELPH.F Additions: -New expansion only in k... test in progress Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases.F | 37 +++++++++++++++++++++++++++++++------ ypp/modules/mod_YPP_ELPH.F | 1 + 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2c390f9694..c6dd4eedc4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21796 -#define YAMBO_HASH "bbe289e" +#define YAMBO_REVISION 21828 +#define YAMBO_HASH "d2c9d7439" diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 854de98856..d54a0a4976 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -32,13 +32,14 @@ subroutine ELPH_databases(k,E,q) & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,l_GKKP_hosts_bare_dV use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab - use R_lattice, ONLY:bz_samp,qindx_B,nqibz,bse_scattering,qindx_C,coll_scattering + use R_lattice, ONLY:bz_samp,qindx_B,nqbz,nqibz,bse_scattering,qindx_C,coll_scattering use parser_m, ONLY:parser use vec_operate, ONLY:v_is_zero use zeros, ONLY:k_iku_zero use YPP_ELPH, ONLY:ELPH_DB_alloc,ELPH_DB_free,DB_kind,DB_nq,DB_ph_K_sym_table,DB_nb,& & ph_freqs_file,ph_modes_file,use_ext_ph_freqs,use_ext_ph_modes,DB_ph_modes,& -& DB_PH_pol_vec,DB_Q_map,DB_ph_freq_sq,DB_PH_qpt,DB_nk,l_gkkp_expand,l_use_qindxB +& DB_PH_pol_vec,DB_Q_map,DB_ph_freq_sq,DB_PH_qpt,DB_nk,l_gkkp_expand,l_use_qindxB, & +& l_gkkp_expand_only_k use LIVE_t, ONLY:live_timing use IO_int, ONLY:io_control use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL @@ -52,7 +53,7 @@ subroutine ELPH_databases(k,E,q) ! Work Space... ! integer ::io_err(3),iq,ik,is,idb,i_star,iq_bz,ID,qindx_ID,qindx_ID_frag - character(schlen) ::what + character(schlen) ::what,db_name integer, external ::ELPH_databases_IO_elemental,io_ELPH,io_QINDX,qindx_B_init logical, external ::file_exists real(SP) ::v(3) @@ -64,9 +65,10 @@ subroutine ELPH_databases(k,E,q) !================= call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) call parser('GkkpExpand',l_gkkp_expand) + call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('UseQindxB',l_use_qindxB) ! - if(l_gkkp_expand) then + if(l_gkkp_expand.or.l_gkkp_expand_only_k) then ! ! Setup parallelization to load qindx_B ! ====================================== @@ -213,6 +215,24 @@ subroutine ELPH_databases(k,E,q) elph_use_q_grid=.FALSE. if(DB_nq==nqibz.and.all(DB_Q_map/=0)) elph_use_q_grid=.TRUE. ! + ! If l_gkkp_expand_only_k I suppose the q-grid is in the BZ + ! + if(l_gkkp_expand_only_k) then + DB_Q_map=0 + do idb=1,DB_nq + do iq=1,nqbz + v=DB_PH_qpt(idb,:) + if (v_is_zero(v+q%ptbz(iq,:),zero_=k_iku_zero)) DB_Q_map(idb)=iq + enddo + enddo + ! + elph_use_q_grid=.FALSE. + if(DB_nq==nqbz.and.all(DB_Q_map/=0)) elph_use_q_grid=.TRUE. + ! + if(.not.elph_use_q_grid) call error('Expand only-k works only with uniform q-grids in the BZ') + ! + endif + ! if (.not.elph_use_q_grid) then if (DB_Q_map(1)/=1) call error("First qpt must be Gamma.") do idb=1,DB_nq @@ -246,6 +266,7 @@ subroutine ELPH_databases(k,E,q) call msg('s',':: Bands :',DB_nb) call msg('s',':: Branches :',DB_ph_modes) call msg('s',':: Uniform sampling :',elph_use_q_grid) + if(l_gkkp_expand_only_k) call msg('s',':: Q-points in the BZ :',l_gkkp_expand_only_k) call msg('s',':: Symmetry expanded :',l_gkkp_expand) if(l_gkkp_expand) call msg('s',':: Use qindx_B to expand gkkp :',l_use_qindxB) call msg('s',':: Debye Energy :',PH_W_debye*HA2EV*1000.,"[meV]") @@ -285,6 +306,10 @@ subroutine ELPH_databases(k,E,q) !... GKKP call live_timing('ELPH databases: transfer and I/O',DB_nq) call section("*","== Q-points list in Yambo (iku units) ==") + ! + db_name='gkkp' + if(l_gkkp_expand.or.l_gkkp_expand_only_k) db_name='gkkp_expanded' + ! do idb=1,DB_nq ! if(elph_use_q_grid) then @@ -322,13 +347,13 @@ subroutine ELPH_databases(k,E,q) endif if (iq_bz==1) call io_control(ACTION=OP_APP_CL,SEC=(/1,2/),ID=ID) if (iq_bz> 1) call io_control(ACTION=OP_APP_CL,SEC=(/iq_bz+1/),ID=ID) - io_err(3)=io_ELPH(ID,'gkkp_expanded') + io_err(3)=io_ELPH(ID,db_name) call msg('r','',PH_qpt(iq_bz,:),USE_TABS=.TRUE.) enddo else if (iq==1) call io_control(ACTION=OP_APP_CL,SEC=(/1,2/),ID=ID) if (iq> 1) call io_control(ACTION=OP_APP_CL,SEC=(/iq+1/),ID=ID) - io_err(3)=io_ELPH(ID,'gkkp') + io_err(3)=io_ELPH(ID,db_name) call msg('r','',PH_qpt(iq,:),USE_TABS=.TRUE.) endif ! diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index d256e8f894..460dfc32e7 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -34,6 +34,7 @@ module YPP_ELPH logical :: l_atomic_amplitude logical :: l_ph_ass_dos logical :: l_gkkp_expand + logical :: l_gkkp_expand_only_k integer :: elph_steps real(SP):: elph_gamma_broad real(SP):: ph_broad From 433670cd111f04be20e96fb72926c59703f60767 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 27 Jun 2022 17:47:09 +0200 Subject: [PATCH 0343/1367] Version 5.1.0, Revision 21619, Hash be059dff2 MODIFIED * include/driver/version.h bz_ops/k_map_nearest_by_dir.F Additions: -Possiblity to use shifted grids turned on again (not silicon case where there are mutiple shifts) Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/bz_ops/k_map_nearest_by_dir.F | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0cae9ddab1..27b6cd9aed 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21618 -#define YAMBO_HASH "5b9ac68d8" +#define YAMBO_REVISION 21619 +#define YAMBO_HASH "be059dff2" diff --git a/src/bz_ops/k_map_nearest_by_dir.F b/src/bz_ops/k_map_nearest_by_dir.F index afb639327e..f06248148e 100644 --- a/src/bz_ops/k_map_nearest_by_dir.F +++ b/src/bz_ops/k_map_nearest_by_dir.F @@ -83,7 +83,6 @@ subroutine k_map_nearest_by_dir(Xk,k_map) if(dshift>zero_dfl) then write(dump_ch,'(a,3f12.6)') " Shifted grid: ",k_shift call msg("sr",dump_ch) - call error(' Shifted grids not implemented yet in covariant dipoles ') else k_shift=0._SP endif From 5f834080636bc19ff6238c4dab9c396958ac0720 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 27 Jun 2022 17:53:16 +0200 Subject: [PATCH 0344/1367] Version 5.1.0, Revision 21620, Hash 433670cd1 MODIFIED * include/driver/version.h bz_ops/k_map_nearest_by_dir.F Additions: -Better message Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/bz_ops/k_map_nearest_by_dir.F | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 27b6cd9aed..b6571e424e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21619 -#define YAMBO_HASH "be059dff2" +#define YAMBO_REVISION 21620 +#define YAMBO_HASH "433670cd1" diff --git a/src/bz_ops/k_map_nearest_by_dir.F b/src/bz_ops/k_map_nearest_by_dir.F index f06248148e..b88e102a78 100644 --- a/src/bz_ops/k_map_nearest_by_dir.F +++ b/src/bz_ops/k_map_nearest_by_dir.F @@ -83,6 +83,7 @@ subroutine k_map_nearest_by_dir(Xk,k_map) if(dshift>zero_dfl) then write(dump_ch,'(a,3f12.6)') " Shifted grid: ",k_shift call msg("sr",dump_ch) + call warning('Yambo_nl works only with a single-shift k-point grid! ') else k_shift=0._SP endif From 2872528b5d89fb3c711a30a9f7e3f6acee2656e8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 27 Jun 2022 18:34:27 +0200 Subject: [PATCH 0345/1367] Version 5.1.0, Revision 21621, Hash 5f8340806 MODIFIED * include/driver/version.h collisions/.objects modules/mod_collision_ext.F Additions: -Added long-range SEX collisions Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/collisions/.objects | 5 +++-- src/modules/mod_collision_ext.F | 6 ++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b6571e424e..10aec23ea4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21620 -#define YAMBO_HASH "433670cd1" +#define YAMBO_REVISION 21621 +#define YAMBO_HASH "5f8340806" diff --git a/src/collisions/.objects b/src/collisions/.objects index a0790d237b..56e635b031 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -3,7 +3,7 @@ RT_objs = NL_objs = SC_objs = #if defined _QED -QED_objs=SCATTERING_GW_kinematics.o SCATTERING_QED_transverse_matrix.o COLLISIONS_momentum.o +QED_objs=SCATTERING_GW_kinematics.o SCATTERING_QED_transverse_matrix.o COLLISIONS_momentum.o #endif #if defined _SC SC_objs = COLLISIONS_compose_sc.o @@ -18,4 +18,5 @@ objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ PLASMA_build_up.o PLASMA_tables_and_dimensions.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ - COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) + COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o Build_LSEX_collisions.o \ + $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index e57b07a6bb..a5b638ec5c 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -105,6 +105,12 @@ module collision_ext type(COLLISIONS_element), allocatable :: HXC_COLL_element(:) type(COLLISIONS_element), allocatable :: P_COLL_element(:) ! + ! On the fly long-range SEX (LSEX) collisions + ! ==================================== + integer :: ng_oscll ! number of G-vectors in the Oscillators + complex(SP), allocatable :: W(:,:,:) ! screened interaction + complex(SP), allocatable :: OSCLL(:,:,:,:,:) ! Oscillators + ! contains ! subroutine COLLISIONS_naming( H_SE_kind , what ) From 5c99ea631b7f04309fc7d6669800dfd59e7ecb7a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Jun 2022 11:08:30 +0200 Subject: [PATCH 0346/1367] Version 5.1.0, Revision 21622, Hash 2872528b5 MODIFIED * include/driver/version.h collisions/.objects Bugs: -Fixed compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/collisions/.objects | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 10aec23ea4..551421e0d4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21621 -#define YAMBO_HASH "5f8340806" +#define YAMBO_REVISION 21622 +#define YAMBO_HASH "2872528b5" diff --git a/src/collisions/.objects b/src/collisions/.objects index 56e635b031..6cc99e576f 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -18,5 +18,5 @@ objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ PLASMA_build_up.o PLASMA_tables_and_dimensions.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ - COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o Build_LSEX_collisions.o \ + COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o \ $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) From 282b66be6296fdcc1dc363d32d1c5adcfc9999c5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Jun 2022 11:24:05 +0200 Subject: [PATCH 0347/1367] Version 5.1.0, Revision 21623, Hash 5c99ea631 MODIFIED * include/driver/version.h nloptics/NL_driver.F Additions: -Restore NL io in the pump and probe case Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/nloptics/NL_driver.F | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 551421e0d4..63a1251e43 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21622 -#define YAMBO_HASH "2872528b5" +#define YAMBO_REVISION 21623 +#define YAMBO_HASH "5c99ea631" diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 0501ac5176..6d61f667aa 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -201,13 +201,11 @@ subroutine NL_driver(E,X,k,q,Dip) ! call RT_output_and_IO_driver('open',E,k,OBSERVABLES) ! - else + endif ! ! Initialize IO ! ================== call NL_databases_IO(0,'write') - ! - endif ! ! Start-Up & Timing !=================== @@ -293,10 +291,10 @@ subroutine NL_driver(E,X,k,q,Dip) ! if (l_pump_and_probe) then call RT_output_and_IO_driver('close',E,k,OBSERVABLES) - else - call NL_databases_IO(i_f,'write') endif ! + call NL_databases_IO(i_f,'write') + ! if(stop_now(.false.)) exit ! enddo From 83f396057eab0bce6adfce1b22aad2572bead699 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Jun 2022 14:14:46 +0200 Subject: [PATCH 0348/1367] Version 5.1.0, Revision 21624, Hash 282b66be6 MODIFIED * include/driver/version.h interface/INIT_activate.F nloptics/NL_databases_IO.F nloptics/NL_driver.F nloptics/NL_initialize.F Bugs: -Fixed input generation for linear optics Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 9 +++++---- src/nloptics/NL_databases_IO.F | 2 +- src/nloptics/NL_driver.F | 20 ++++++++++---------- src/nloptics/NL_initialize.F | 14 +++++++------- 5 files changed, 25 insertions(+), 24 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 63a1251e43..d841436c8f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21623 -#define YAMBO_HASH "5c99ea631" +#define YAMBO_REVISION 21624 +#define YAMBO_HASH "282b66be6" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index a6bb048d12..d236b30327 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -554,12 +554,13 @@ subroutine INIT_activate() call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd EvalCurrent InducedField FrPolPerdic') call initactivate(1,'Gauge RADLifeTime HARRLvcs EXXRLvcs') call init_QP_ctl_switch('G') + ! + do i1=1,n_ext_fields + call Afield_activate(i1) + enddo + ! endif ! - do i1=1,n_ext_fields - call Afield_activate(i1) - enddo - ! #endif ! #if defined _SC diff --git a/src/nloptics/NL_databases_IO.F b/src/nloptics/NL_databases_IO.F index b085fddab6..621eef089c 100644 --- a/src/nloptics/NL_databases_IO.F +++ b/src/nloptics/NL_databases_IO.F @@ -25,7 +25,7 @@ subroutine NL_databases_IO(i_f,read_or_write) ! use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR_CL,VERIFY,OP_APP_CL,OP_RD_CL - use nl_optics, ONLY:ID + use nl_optics, ONLY:ID,NL_P_t use parallel_m, ONLY:master_cpu ! implicit none diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 6d61f667aa..761f8ad82a 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -45,6 +45,7 @@ subroutine NL_driver(E,X,k,q,Dip) & HF,SEX,NL_bands,NL_nbands,V_bands_t,NL_alloc_k_distributed use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands,eval_DFT,RT_P,RT_ind_J,& & dG_lesser + use RT_control, ONLY:OBS_RT_IO_t use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz @@ -65,7 +66,7 @@ subroutine NL_driver(E,X,k,q,Dip) ! integer :: i_f,i1,i_sp_pol,N_sample_size,wf_ng_save,io_err logical :: l_dynamics_is_over - real(SP) :: OBSERVABLES(25) + real(SP) :: OBSERVABLES(25),Time ! ! In Non-Linear NL_bands always equal to RT_bands ! ============================================== @@ -268,17 +269,16 @@ subroutine NL_driver(E,X,k,q,Dip) !===================== call RT_output_and_IO_driver('write',E,k,OBSERVABLES) ! - else - ! - ! Store Variables - ! - NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) - E_ext_t(NE_i_time,:)=E_ext - E_tot_t(NE_i_time,:)=E_tot - E_ks_t (NE_i_time,:)=E_ks - ! endif ! + ! Store Variables + ! + NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) + E_ext_t(NE_i_time,:)=E_ext + E_tot_t(NE_i_time,:)=E_tot + E_ks_t (NE_i_time,:)=E_ks + ! + ! call NL_output(NE_i_time,i_f) ! call NL_Integrator(E,k,q,X(1),Integrator,NE_i_time,V_bands) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index a36896971a..55e0de10f8 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -160,7 +160,7 @@ subroutine NL_initialize(E,k) if(((Efield(1)%ef_name/='none').and.Efield(2)%ef_name/='none').or.n_frequencies==1) then l_pump_and_probe=.true. l_NE_with_fields=.true. - call msg('sl','[NL] Variables NLEnSteps and NLEnRange are ignored ') + call msg('s','[NL] Variables NLEnSteps and NLEnRange are ignored ') call msg('sr','[NL] Pump and probe configuration: verbosity set to high') if(n_frequencies/=1) call error("NLEnSteps /=1 not compatible with Pump and Probe ") NL_verbosity=VERB_HIGH @@ -333,12 +333,12 @@ subroutine NL_initialize(E,k) ! call RT_control_alloc("all") ! - if(.not.l_pump_and_probe) then - do NE_i_time=1,NE_steps - Time=real(NE_i_time-1,SP)*RT_step - OBS_RT_IO_t%Time(NE_i_time)=Time - enddo - endif +! if(.not.l_pump_and_probe) then + do NE_i_time=1,NE_steps + Time=real(NE_i_time-1,SP)*RT_step + OBS_RT_IO_t%Time(NE_i_time)=Time + enddo + !endif ! ! LOG ! === From 702a9a59031c14fad10761610e6c20dc01a557d8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Jun 2022 15:44:58 +0200 Subject: [PATCH 0349/1367] Version 5.1.0, Revision 21829, Hash ddde57974 MODIFIED * include/driver/version.h bz_ops/bz_samp_indexes.F Changes: -BSE scattering always true in yambo_ph Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/bz_ops/bz_samp_indexes.F | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c6dd4eedc4..64ed9daf85 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21828 -#define YAMBO_HASH "d2c9d7439" +#define YAMBO_REVISION 21829 +#define YAMBO_HASH "ddde57974" diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 031ce755fb..20097bfbff 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -98,7 +98,9 @@ subroutine bz_samp_indexes(en,k,Xk,q) coll_scattering =(l_elel_scatt.or.l_EXCPH_gkkp) #if defined _ELPH call parser('BSEscatt',bse_setup_scatt) - if (.not.bse_scattering ) bse_scattering =elph_use_q_grid.or.bse_setup_scatt.or.trim(q_source)=="Electron-Phonon databases" + call warning(' BSE scattering equal to TRUE') +! if (.not.bse_scattering ) bse_scattering =elph_use_q_grid.or.bse_setup_scatt.or.trim(q_source)=="Electron-Phonon databases" + bse_scattering=.TRUE. #endif ! ! ... User defined From ca10914ccb9bb8d398f8f40acc172950c8a5d7ab Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Jun 2022 15:46:49 +0200 Subject: [PATCH 0350/1367] Version 5.1.0, Revision 21830, Hash 702a9a590 MODIFIED * include/driver/version.h bz_ops/bz_samp_indexes.F Changes: -Also COLL scattering always true in yambo_ph Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/bz_ops/bz_samp_indexes.F | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 64ed9daf85..a659d34ae8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21829 -#define YAMBO_HASH "ddde57974" +#define YAMBO_REVISION 21830 +#define YAMBO_HASH "702a9a590" diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 20097bfbff..9a6fac7ca4 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -98,9 +98,10 @@ subroutine bz_samp_indexes(en,k,Xk,q) coll_scattering =(l_elel_scatt.or.l_EXCPH_gkkp) #if defined _ELPH call parser('BSEscatt',bse_setup_scatt) - call warning(' BSE scattering equal to TRUE') + call warning(' BSE and CALL scattering equal to TRUE') ! if (.not.bse_scattering ) bse_scattering =elph_use_q_grid.or.bse_setup_scatt.or.trim(q_source)=="Electron-Phonon databases" bse_scattering=.TRUE. + coll_scattering=.TRUE. #endif ! ! ... User defined From a7b30844f54098c087d6872a5047aefd16277fc6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 30 Jun 2022 09:56:38 +0200 Subject: [PATCH 0351/1367] Version 5.1.0, Revision 21831, Hash ca10914cc MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases.F Additions: -Additional error message Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases.F | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a659d34ae8..a0b679a52c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21830 -#define YAMBO_HASH "702a9a590" +#define YAMBO_REVISION 21831 +#define YAMBO_HASH "ca10914cc" diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index d54a0a4976..19054cb7be 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -67,6 +67,9 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpExpand',l_gkkp_expand) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('UseQindxB',l_use_qindxB) + ! + if(l_gkkp_expand.and.l_gkkp_expand_only_k) & +& call error(' Both flags "GkkpExpand" and "GkkpExpOnlyK" cannot be present at the same moment! ') ! if(l_gkkp_expand.or.l_gkkp_expand_only_k) then ! From a7cd2196acee41908ea0577ee3387cfd6cc4ea26 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 30 Jun 2022 11:05:59 +0200 Subject: [PATCH 0352/1367] Version 5.1.0, Revision 21625, Hash 83f396057 MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F collisions/COLLISIONS_NEQ_GW_static.F modules/mod_collision_el.F qp/QP_ppa_cohsex.F qp/QP_real_axis.F sc/OEP_ApplySigmaCSX.F Changes: - [yambo] Checking bse vs td-hsex Added debug lines and some cleaning of the code Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/collisions/COLLISIONS_HXC.F | 50 +++++++++-------------- src/collisions/COLLISIONS_NEQ_GW_static.F | 10 +---- src/modules/mod_collision_el.F | 1 + src/qp/QP_ppa_cohsex.F | 1 - src/qp/QP_real_axis.F | 1 - src/sc/OEP_ApplySigmaCSX.F | 8 ++-- 7 files changed, 29 insertions(+), 46 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d841436c8f..8d7eef7311 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21624 -#define YAMBO_HASH "282b66be6" +#define YAMBO_REVISION 21625 +#define YAMBO_HASH "83f396057" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 6129243fa9..b57521a2b2 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -48,9 +48,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) use IO_int, ONLY:io_control,IO_and_Messaging_switch use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,io_COLLs use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t - use interfaces, ONLY:WF_load + use interfaces, ONLY:WF_load,eval_G_minus_G use wave_func, ONLY:WF,WF_buffer,WF_buffered_IO - use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G + use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G,G_m_G use hamiltonian, ONLY:B_mat_index use fft_m, ONLY:fft_size ! @@ -65,7 +65,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! integer :: i_coll,first_coll,last_coll,ig1,ig2,iqbz,iqibz,alloc_err,iqs,iGo_max,NG_max,NG_XC,LOCAL_COMM(2),& & i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,& -& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,bands_to_load(2),n_colls +& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,bands_to_load(2),n_colls,n_GmG logical :: l_HXC_collisions,eval_coll,l_compute_screening ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H @@ -133,6 +133,18 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) NG_max=maxval((/N_g_vecs_H,N_g_vecs_X,N_g_vecs_C/)) NG_XC =max(N_g_vecs_X,N_g_vecs_C) ! + ! DEBUG < + ! 2022/06/30 DS: This is a check for consistency with BSE + ! - In the BSE case the elemental collisions are always computed with iqs=1 and iqG=1 + ! and later there are symmetry operations with G_m_G which require to increase the O_ng (i.e. NG_XC) + ! - In the RT/SC collisions case the symmetries and the Go shifts are directly handled by scatter Gamp + ! via fft_g_table. So it is not needed to increase NG_XC + !if (COLLISIONS_HXC_MB) then + ! n_GmG=eval_G_minus_G(NG_XC,iGo_max) + ! NG_XC=maxval(G_m_G) + !endif + ! DEBUG > + ! call msg('s', '['//trim(H_potential)//'] Plane waves (H,X,C) ',(/N_g_vecs_H,N_g_vecs_X,N_g_vecs_C/)) ! ! WFs @@ -148,14 +160,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) call WF_load(WF,NG_max,iGo_max,bands_to_load,(/1,k%nibz/),title='-'//trim(H_potential)//' Collisions') ! if (COLLISIONS_HXC_local) then - ! - iscp_H%qs =1 - iscp_H%iqref=0 - iscp_H%ngrho=N_g_vecs_H - ! - isc_H%qs =1 - isc_H%iqref =0 - isc_H%ngrho =N_g_vecs_H ! call elemental_collision_alloc(isc_H ,NG=N_g_vecs_H,NG_GAMP=(/N_g_vecs_H, 1 /),TITLE='HARTREE') call elemental_collision_alloc(iscp_H,NG=N_g_vecs_H, TITLE='HARTREE') @@ -164,14 +168,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! endif ! - iscp_XC%qs =1 - iscp_XC%iqref=0 - iscp_XC%ngrho=NG_XC - ! - isc_XC%qs =1 - isc_XC%iqref =0 - isc_XC%ngrho =NG_XC - ! call elemental_collision_alloc(iscp_XC,NG=NG_XC,NG_GAMP=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) ! if (l_compute_screening) then @@ -312,6 +308,8 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) i_sp = COH_collisions%state(i_coll,4) endif ! + i_k_s = 1 + ! if( l_HXC_collisions ) HXC_COLL_element(1)%v3_c=cZERO if( l_use_COH_collisions ) COH_COLL_element(1)%v3_c=cZERO ! @@ -391,8 +389,6 @@ subroutine compute_loc_HXC_collisions() ! call scatter_Gamp(isc_H,'x') ! - i_k_s = 1 - ! isc_H%is =(/i_n,i_k,i_k_s,i_sp/) isc_H%os =(/i_m,i_k,i_k_s,i_sp/) ! @@ -528,27 +524,21 @@ subroutine compute_MBPT_XC_collisions() iqibz =q%sstar(iqbz,1) iqs =q%sstar(iqbz,2) ! - isc_XC%qs =(/0,iqibz,iqs/) - iscp_XC%qs =(/0,iqibz,iqs/) - ! - i_k_s = 1 - ! i_kmq_bz =qindx_S(i_k,iqbz,1) i_kmq_G0 =qindx_S(i_k,iqbz,2) ! i_kmq = k%sstar(i_kmq_bz,1) i_kmq_s = k%sstar(i_kmq_bz,2) ! + isc_XC%qs =(/i_kmq_G0,iqibz,iqs/) isc_XC%is =(/i_n,i_k, i_k_s, i_sp/) isc_XC%os =(/0 ,i_kmq,i_kmq_s,i_sp/) ! + iscp_XC%qs =(/i_kmq_G0,iqibz,iqs/) iscp_XC%is =(/i_m,i_k, i_k_s, i_sp/) iscp_XC%os =(/0, i_kmq,i_kmq_s,i_sp/) ! - isc_XC%qs(1) =i_kmq_G0 - iscp_XC%qs(1)=i_kmq_G0 - ! - if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') + if (iqibz/=iscp_XC%iqref) call scatter_Gamp(iscp_XC,'x') ! if( iqibz/=isc_XC%iqref .and. l_compute_screening) then ! diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index 51e31ce411..72c37e9e97 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -80,12 +80,6 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) call k_build_up_BZ_tables(q) call k_expand(k) ! - ! Dimensions... - ! - isc%iqref =0 - isc%ngrho =X%ng - iscp%ngrho=X%ng - ! ! WFs... ! call WF_load(WF,isc%ngrho,maxval(qindx_S(:,:,2)),COLL_bands,(/1,k%nibz/),title='-SC') @@ -109,8 +103,8 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) YAMBO_ALLOC(EM1s,(X%ng,X%ng)) ! - call elemental_collision_alloc(isc, NG=isc%ngrho,NG_GAMP=(/X%ng,X%ng/),TITLE="NEQ_GW") - call elemental_collision_alloc(iscp,NG=isc%ngrho,TITLE="NEQ_GW") + call elemental_collision_alloc(isc, NG=X%ng,NG_GAMP=(/X%ng,X%ng/),TITLE="NEQ_GW") + call elemental_collision_alloc(iscp,NG=X%ng,TITLE="NEQ_GW") ! ! Parallel Indexes & LIVE-TIMING STEPS ! diff --git a/src/modules/mod_collision_el.F b/src/modules/mod_collision_el.F index b427f93260..88572abfc8 100644 --- a/src/modules/mod_collision_el.F +++ b/src/modules/mod_collision_el.F @@ -153,6 +153,7 @@ subroutine elemental_collision_alloc(ggw,NG,NG_GAMP,GRADIENT,TITLE) ! endif ggw%ngrho=NG + ggw%iqref=0 endif if (present(NG_GAMP)) then if (all((/NG_GAMP>0/))) then diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 517a480a90..d232d1a0ca 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -194,7 +194,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Elemental Collisions !====================== - isc%iqref=0 call elemental_collision_alloc(isc,NG=isc%ngrho,NG_GAMP=(/X%ng,X%ng/),TITLE="GW") call elemental_collision_alloc(iscp,NG=isc%ngrho,TITLE="GW") ! diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index b0e2886713..c8805b2aec 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -283,7 +283,6 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) call elemental_collision_alloc(scattering_prime,NG=X%ng,TITLE="GW") ! QP_Sc=cZERO - scattering_main%iqref=0 ! ! Main Loop !=========== diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 6eb355b527..e2538845fb 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -82,10 +82,6 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) call elemental_collision_free(isc) call PP_indexes_reset(px) ! - isc%ngrho=maxval(G_m_G) - isc%iqref=0 - ! - ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) io_err=io_X(X,Xw,ID) if (io_err<0) call error('Incomplete and/or broken static diel. fun. database') @@ -94,6 +90,10 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) YAMBO_ALLOC(PPaR_ws,(X%ng,X%ng)) YAMBO_ALLOC(PPaR,(X%ng,X%ng)) ! + ! 2022/06/30 DS: + ! should it be NG=maxval(G_m_G)? In the old version of the code, + ! isc%ngrho=maxval(G_m_G) + ! was set few lines before. However the call to elemental owrites it call elemental_collision_alloc(isc,TITLE="OEP_SigmaCSX",NG=X%ng,NG_GAMP=(/X%ng,X%ng/)) YAMBO_ALLOC(local_u,(fft_size)) YAMBO_ALLOC(u,(X%ng)) From 62c542a6236ee051aebc602b6202d81b88c75e44 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 9 Jul 2022 18:11:47 +0200 Subject: [PATCH 0353/1367] Version 5.1.0, Revision 21626, Hash a7cd2196a MODIFIED * include/driver/version.h collisions/.objects NEW * collisions/Build_LSEX_collisions.F collisions/compose_LSEX_nl.F Additions: -Added missing files Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/.objects | 1 + src/collisions/Build_LSEX_collisions.F | 80 +++++++++++++++++ src/collisions/compose_LSEX_nl.F | 114 +++++++++++++++++++++++++ 4 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 src/collisions/Build_LSEX_collisions.F create mode 100644 src/collisions/compose_LSEX_nl.F diff --git a/include/driver/version.h b/include/driver/version.h index 8d7eef7311..efb3651e64 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21625 -#define YAMBO_HASH "83f396057" +#define YAMBO_REVISION 21626 +#define YAMBO_HASH "a7cd2196a" diff --git a/src/collisions/.objects b/src/collisions/.objects index 6cc99e576f..f62b3f4397 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -19,4 +19,5 @@ objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o \ + Build_LSEX_collisions.o \ $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F new file mode 100644 index 0000000000..db4b851cdf --- /dev/null +++ b/src/collisions/Build_LSEX_collisions.F @@ -0,0 +1,80 @@ +! +! Copyright (C) 2000-2015 the LUMEN team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine Build_LSEX_collisions(k,q,i_qp,COLL) + ! + ! This subroutine calculate the long-range part of the Screened exchange + ! + use electrons, ONLY:n_sp_pol + use pars, ONLY:SP,cI,cZERO + use collision_ext, ONLY:OSCLL,W,ng_oscll,COLL_bands + use QP_m, ONLY:QP_table,QP_nk,QP_n_states + use R_lattice, ONLY:bz_samp,qindx_S + ! + implicit none + ! + type(bz_samp), intent(in) :: k,q + integer, intent(in) :: i_qp + ! + ! Work Space + ! + integer :: i_mp ! self-energy external indexes + integer :: i_np,iqbz,i_kmq ! self-energy internal indexes + integer :: ig1,ig2 + integer :: i_n,i_m + integer :: i_k + ! + ! Collisions output + ! + complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + ! + ! Coll indexes + ! + i_n=QP_table(i_qp,1) + i_m=QP_table(i_qp,2) + i_k=QP_table(i_qp,3) + ! + ! Build Collisions from the Oscillators + ! + do i_mp=COLL_bands(1),COLL_bands(2) + do i_np=COLL_bands(1),COLL_bands(2) + ! + COLL(i_np,i_mp,:)=cZERO + ! + do iqbz=1,q%nbz + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + ! + ! Build Collision on the fly + ! + do ig1=1,ng_oscll + do ig2=1,ng_oscll + COLL(i_np,i_mp,i_kmq)=COLL(i_np,i_mp,i_kmq)+OSCLL(i_n,i_np,i_k,iqbz,ig2) & +& *conjg(OSCLL(i_m,i_mp,i_k,iqbz,ig1))*W(iqbz,ig2,ig1) + enddo + enddo + ! + enddo + enddo + enddo + ! +end subroutine Build_LSEX_collisions diff --git a/src/collisions/compose_LSEX_nl.F b/src/collisions/compose_LSEX_nl.F new file mode 100644 index 0000000000..0a90670975 --- /dev/null +++ b/src/collisions/compose_LSEX_nl.F @@ -0,0 +1,114 @@ +! +! Copyright (C) 2015-2017 the LUMEN team +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine compose_LSEX_nl(V_bands,Hk,k,q,E,i_k) + ! + ! This subroutine calculate the long-range part of the Screened exchange + ! + use electrons, ONLY:n_sp_pol,levels,spin_occ + use pars, ONLY:SP,cI,cZERO,cONE + use FFT_m, ONLY:fft_size + use collision_ext, ONLY:COLL_bands,OSCLL,W,ng_oscll !,Sigma_SEX_EQ + use nl_optics, ONLY:NL_bands + use QP_m, ONLY:QP_nk + use R_lattice, ONLY:bz_samp,qindx_S + use wrapper, ONLY:V_dot_V + use wrapper_omp, ONLY:V_dot_V_omp + use parallel_m, ONLY:PAR_Xk_ibz_index + ! + implicit none + ! + complex(SP), intent(inout) :: Hk(COLL_bands(2),COLL_bands(2),n_sp_pol) + integer, intent(in) :: i_k + type(bz_samp), intent(in) :: k,q + type(levels), intent(in) :: E + complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf,QP_nk,n_sp_pol) + ! + ! Work Space + ! + integer :: i_m,i_mp ! self-energy external indexes + integer :: i_n,i_np,iqbz,i_kmq ! self-energy internal indexes + integer :: ig1,ig2,i1,ik_mem,iv + ! + complex(SP) :: OSCLL_val(COLL_bands(1):COLL_bands(2),E%nbf,ng_oscll,q%nbz) + complex(SP) :: V_kmq(COLL_bands(1):COLL_bands(2),E%nbf,q%nbz) + complex(SP) :: val_sum(q%nbz,ng_oscll,ng_oscll) + ! + ! + ! Build Oscillators in term of valence bands + ! + ik_mem=PAR_Xk_ibz_index(i_k) + ! +!$omp parallel do default(shared), private(iqbz,i_kmq) + do iqbz=1,q%nbz + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + V_kmq(:,:,iqbz) = V_bands(COLL_bands(1):,:,i_kmq,1) + enddo +!$omp end parallel do + ! +!$omp parallel do default(shared), private(iv) + do iv=1,E%nbf + forall(iqbz=1:q%nbz,i_n=COLL_bands(1):COLL_bands(2),ig1=1:ng_oscll) + OSCLL_val(i_n,iv,ig1,iqbz)=sum(OSCLL(i_n,COLL_bands(1):COLL_bands(2),ik_mem,iqbz,ig1)*& +& V_kmq(COLL_bands(1):COLL_bands(2),iv,iqbz)) + end forall + enddo +!$omp end parallel do + ! +!$omp parallel do default(shared), private(i1) + do i1=COLL_bands(1),COLL_bands(2) +! Hk(:,i1,:)=Hk(:,i1,:)-Sigma_SEX_EQ(:,i1,:,ik_mem) + enddo +!$omp end parallel do + ! + ! Long-range SEX + ! + ! Evaluate Sigma_SEX(i_m,i_n,i_k) + ! + do i_n=NL_bands(1),NL_bands(2) + do i_m=i_n,NL_bands(2) + ! +!$omp parallel do default(shared), private(ig1,ig2,iqbz) + do iqbz=1,q%nbz + forall(ig1=1:ng_oscll,ig2=1:ng_oscll) + val_sum(iqbz,ig1,ig2)=sum(OSCLL_val(i_n,:,ig1,iqbz)*conjg(OSCLL_val(i_m,:,ig2,iqbz))) ! sum of valence bands + end forall + enddo +!$omp end parallel do + ! + Hk(i_n,i_m,1)=Hk(i_n,i_m,1)+spin_occ*V_dot_V_omp(ng_oscll**2*q%nbz,W(1,1,1),val_sum(1,1,1)) + ! + enddo + enddo + ! + ! Symmetrization + ! +!$omp parallel do default(shared), private(i_n,i_m) + do i_n=NL_bands(1),NL_bands(2) + Hk(i_n,i_n,:)=real(Hk(i_n,i_n,:),SP) + do i_m=1,i_n-1 + Hk(i_n,i_m,:)=conjg(Hk(i_m,i_n,:)) + enddo + enddo +!$omp end parallel do + ! +end subroutine compose_LSEX_nl From bf36dc9b7fe893b9e32101f7a4f71fb50dcadb29 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 9 Jul 2022 18:19:10 +0200 Subject: [PATCH 0354/1367] Version 5.1.0, Revision 21627, Hash 62c542a62 MODIFIED * include/driver/version.h interface/INIT_read_command_line.F io/variables_NL.F nloptics/NL_initialize.F Additions: -Number of external fields increased to 3 for the CARS Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_read_command_line.F | 2 +- src/io/variables_NL.F | 3 +-- src/nloptics/NL_initialize.F | 17 ++++++++++------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index efb3651e64..c976364414 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21626 -#define YAMBO_HASH "a7cd2196a" +#define YAMBO_REVISION 21627 +#define YAMBO_HASH "62c542a62" diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index a4d8a0e5bc..0354fd4948 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -420,7 +420,7 @@ subroutine INIT_read_command_line(rstr,init_) ! if ( trim(rstr_piece(i1+1)) == 'n' ) n_ext_fields=1 if ( trim(rstr_piece(i1+1)) == 'p' ) then - n_ext_fields=2 + n_ext_fields=3 l_nl_p_and_p=.TRUE. endif ! diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 988eb6cbbb..87b91aaea0 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -30,8 +30,7 @@ integer function variables_NL(ID) use real_time, ONLY:Integrator_name,NE_steps,RT_step,l_RT_induced_field,RT_bands,RAD_LifeTime use electrons, ONLY:n_sp_pol use electric, ONLY:l_force_SndOrd - use fields, ONLY:n_ext_fields - use fields, ONLY:Efield + use fields, ONLY:n_ext_fields,Efield use IO_m, ONLY:io_status use IO_int, ONLY:io_elemental,ver_is_gt_or_eq use descriptors, ONLY:IO_desc_reset diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 55e0de10f8..3956b868d3 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -54,7 +54,7 @@ subroutine NL_initialize(E,k) ! Working space ! real(SP) :: Time, W_0,T_0,sigma - integer :: i1 + integer :: i1,n_active_fields ! ! Parser ! ============ @@ -123,7 +123,8 @@ subroutine NL_initialize(E,k) ! ! This part of the code works with only one field ! - n_ext_fields=2 + n_ext_fields=3 + n_active_fields=0 ! do i1=1,n_ext_fields ! @@ -155,22 +156,24 @@ subroutine NL_initialize(E,k) ! call Check_symmetries(Efield(i1)%versor,"electric") ! + n_active_fields=n_active_fields+1 + ! enddo ! - if(((Efield(1)%ef_name/='none').and.Efield(2)%ef_name/='none').or.n_frequencies==1) then + if(n_active_fields==0) call error('Not valid external field present!') + ! + if(n_active_fields>1.or.n_frequencies==1) then l_pump_and_probe=.true. l_NE_with_fields=.true. call msg('s','[NL] Variables NLEnSteps and NLEnRange are ignored ') call msg('sr','[NL] Pump and probe configuration: verbosity set to high') if(n_frequencies/=1) call error("NLEnSteps /=1 not compatible with Pump and Probe ") NL_verbosity=VERB_HIGH - elseif((Efield(1)%ef_name/='none').and.Efield(2)%ef_name=='none') then + elseif((Efield(1)%ef_name/='none').and.all(Efield(2:3)%ef_name=='none')) then call msg('sr','[NL] Non-linear optics configuration') - else - call error(" Please set at least one external field") endif ! - if(Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') & + if(.not.l_pump_and_probe.and.Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') & call warning(' Non-linear optics properties can be obtained with SOFTSIN/SIN fields only') ! ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) From 690fc39616e29d7a1f906eeb8e53cb1102f5950a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Jul 2022 16:12:03 +0200 Subject: [PATCH 0355/1367] Version 5.1.0, Revision 21628, Hash bf36dc9b7 MODIFIED * include/driver/version.h collisions/.objects NEW * collisions/LSEX_potential.F Additions: -New subroutine to build the LSEX potential Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/.objects | 4 +- src/collisions/LSEX_potential.F | 129 ++++++++++++++++++++++++++++++++ 3 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 src/collisions/LSEX_potential.F diff --git a/include/driver/version.h b/include/driver/version.h index c976364414..d2a2b24e6f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21627 -#define YAMBO_HASH "62c542a62" +#define YAMBO_REVISION 21628 +#define YAMBO_HASH "bf36dc9b7" diff --git a/src/collisions/.objects b/src/collisions/.objects index f62b3f4397..15cd86bdc5 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -14,10 +14,10 @@ RT_objs = COLLISIONS_compose_rt.o #if defined _NL NL_objs = COLLISIONS_compose_nl.o #endif +LSEX_objs = Build_LSEX_collisions.o LSEX_potential.o objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ PLASMA_build_up.o PLASMA_tables_and_dimensions.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o \ - Build_LSEX_collisions.o \ - $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) + $(LSEX_objs) $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F new file mode 100644 index 0000000000..72ef6f58b1 --- /dev/null +++ b/src/collisions/LSEX_potential.F @@ -0,0 +1,129 @@ +! +! Copyright (C) 2000-2017 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine LSEX_potential(q,X,Xw) + ! + ! Construct the screeend potential W(G=G'=0,q) + ! + use nl_optics, ONLY:NL_bands,Correlation,SEX + use collision_ext, ONLY:W + use LIVE_t, ONLY:live_timing + use pars, ONLY:SP,cZERO,pi + use frequency, ONLY:w_samp,W_reset + use R_lattice, ONLY:bz_samp,qindx_S + use D_lattice, ONLY:DL_vol + use electrons, ONLY:levels,spin_occ + use collision_el, ONLY:elemental_collision,elemental_collision_free, & +& elemental_collision_alloc + use X_m, ONLY:X_mat,X_ALLOC_elemental,X_t + use IO_int, ONLY:io_control + use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,RD_CL,OP_RD,RD_CL_IF_END + use matrix_operate, ONLY:hermitian + use stderr, ONLY:intc + use parallel_int, ONLY:PP_redux_wait + ! + implicit none + ! + type(bz_samp), intent(in) :: q + type(w_samp) :: Xw + type(X_t) :: X + ! + ! Work Space + ! + integer :: iqbz,iqibz,iqs,io_err,ID,ig1,ig2 + integer, external :: io_X + type(elemental_collision) :: isc + ! + call PP_redux_wait() + ! + isc%iqref =0 + isc%ngrho =X%ng ! only G=1 is required for local-SEX + ! + call elemental_collision_free(isc) + call elemental_collision_alloc(isc,NG=X%ng,NG_GAMP=(/X%ng,X%ng/),TITLE="Wlr") + ! + call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) + ! + call live_timing('[NL] W potential :',q%nbz) + ! + if(Correlation==SEX) then + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) + io_err=io_X(X,Xw,ID) + if (io_err<0) call error('Incomplete and/or broken tatic diel. fun. database') + endif + ! + do iqbz=1,q%nbz + ! + W(iqbz,:,:)=cZERO + ! + isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) + iqibz=isc%qs(2) + iqs =isc%qs(3) + ! + isc%iqref=-1 + call scatter_Gamp(isc,'x') + ! + ! The bare exchange v + ! + do ig1=1,X%ng + W(iqbz,ig1,ig1)=-4._SP/spin_occ*pi*isc%gamp(ig1,ig1) + enddo + ! + if(Correlation==SEX) then + ! + isc%iqref=-1 + call scatter_Gamp(isc,'c') + ! + if (iqbz ==1) then + call io_control(ACTION=OP_RD,COM=NONE, SEC=(/1,2,2*iqibz+1/),ID=ID) + elseif (q%nbz==1) then + call io_control(ACTION=OP_RD_CL,COM=NONE, SEC=(/1,2,3/),ID=ID) + elseif (iqbz> 1) then + call io_control(ACTION=RD_CL_IF_END,COM=NONE,SEC=(/2*iqibz,2*iqibz+1/),ID=ID) + endif + io_err=io_X(X,Xw,ID) + ! + if(io_err<0) call error(" Error loading em1s iq="//intc(iqbz)) + ! + ! Screened part of the exchange \tilde W = W - v + ! +!$omp parallel do default(shared), private(ig1,ig2) + do ig1=1,X%ng + do ig2=1,X%ng + W(iqbz,ig1,ig2)=W(iqbz,ig1,ig2)-4._SP/spin_occ*pi*X_mat(ig1,ig2,1)*isc%gamp(ig1,ig2) + enddo + enddo +!$omp end parallel do + ! + endif + ! + call live_timing(steps=1) + ! + enddo + ! + call live_timing() + ! + call elemental_collision_free(isc) + call X_alloc('X') + ! +end subroutine LSEX_potential From d1af24b145059bb3bade2b59973b94cbbb00c77a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Jul 2022 16:52:23 +0200 Subject: [PATCH 0356/1367] Version 5.1.0, Revision 21629, Hash 690fc3961 MODIFIED * include/driver/version.h collisions/Build_LSEX_collisions.F collisions/LSEX_potential.F io/.objects io_serial/.objects modules/mod_collision_ext.F NEW * io/io_OSCLL.F Additions: -New file for Oscillators IO Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/Build_LSEX_collisions.F | 2 +- src/collisions/LSEX_potential.F | 2 +- src/io/.objects | 6 +- src/io/io_OSCLL.F | 140 +++++++++++++++++++++++++ src/io_serial/.objects | 3 +- src/modules/mod_collision_ext.F | 1 + 7 files changed, 152 insertions(+), 6 deletions(-) create mode 100644 src/io/io_OSCLL.F diff --git a/include/driver/version.h b/include/driver/version.h index d2a2b24e6f..40191e9eec 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21628 -#define YAMBO_HASH "bf36dc9b7" +#define YAMBO_REVISION 21629 +#define YAMBO_HASH "690fc3961" diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F index db4b851cdf..9bfacf148c 100644 --- a/src/collisions/Build_LSEX_collisions.F +++ b/src/collisions/Build_LSEX_collisions.F @@ -1,5 +1,5 @@ ! -! Copyright (C) 2000-2015 the LUMEN team +! Copyright (C) 2000-2022 the LUMEN team ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): CA diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index 72ef6f58b1..e2e672d6f3 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -1,5 +1,5 @@ ! -! Copyright (C) 2000-2017 the YAMBO team +! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): CA diff --git a/src/io/.objects b/src/io/.objects index 2dd524efc6..3c87057645 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -15,6 +15,10 @@ ELPH_objects = variables_ELPH.o io_ELPH.o io_gFsq.o #if defined _PHEL PHEL_objects = io_PH.o #endif +COLL_objects = +#if defined _SC || _RT +COLL_objects = io_OSCLL.o +#endif objs = ver_is_gt_or_eq.o \ io_Vnl.o io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ @@ -26,4 +30,4 @@ objs = ver_is_gt_or_eq.o \ io_header.o io_Double_Grid.o \ io_COL_CUT.o io_DB1_selective_scan.o variables_X.o variables_DIPOLES.o \ io_out_of_date.o \ - $(SC_objects) $(RT_objects) $(NL_objects) + $(SC_objects) $(RT_objects) $(NL_objects) $(COLL_objects) diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F new file mode 100644 index 0000000000..75449960d2 --- /dev/null +++ b/src/io/io_OSCLL.F @@ -0,0 +1,140 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +integer function io_OSCLL(q,ID) + ! + use pars, ONLY:SP,schlen + use electrons, ONLY:levels + use matrix_operate,ONLY:mat_c2r,mat_r2c + use R_lattice, ONLY:nXkibz,bz_samp + use QP_m, ONLY:QP_nk + use IO_int, ONLY:io_connect,io_disconnect,io_header,io_fragment, & +& io_elemental,def_variable_bulk,io_variable_bulk + use IO_m, ONLY:io_sec,frag_DIP,read_is_on,write_is_on,io_extension,& +& RD_CL_IF_END,RD_CL,io_action,IO_NOT_ALLOWED,io_DIP, & +& io_status + use collision_ext, ONLY:COLL_bands,OSCLL,OSCLL_k,ng_oscll + use parallel_m, ONLY:PAR_Xk_ibz_index,PAR_Xk_nibz,myid +#if defined _TIMING + use timing_m, ONLY:timing +#endif + ! +#include + ! + integer ::ID + type(bz_samp), intent(in) :: q + ! + ! Work Space + ! + integer :: ik,ik_mem,i_fragment,i_sp_pol,iqbz,ig,ib,COLL_nbands,ID_frag + character(schlen) :: VAR_name + real(SP),allocatable :: disk_data(:,:,:) + ! +#if defined _TIMING + call timing('io_OSCLL',OPR='start') +#endif + ! + ID_frag=0 + ! + io_extension(ID)='OSCLL' + ! + io_OSCLL=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID) + if (io_OSCLL/=0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + io_OSCLL=io_header(ID,R_LATT=.true.,WF=.true.,IMPOSE_SN=.true.) + if (io_OSCLL/=0) goto 1 + ! + ! Variable for the Oscillators + ! + call io_elemental(ID,VAR="OSCLLPARS",VAR_SZ=3,MENU=0) + call io_elemental(ID,VAR="[NL] RL vectors in oscillators :",I0=ng_oscll,CHECK=.true.,OP=(/"<="/)) + call io_elemental(ID,VAR="[NL] OSCLL band range :",I1=COLL_bands,CHECK=.true.,OP=(/"==","=="/)) + call io_elemental(ID,VAR="",VAR_SZ=0) + ! + io_OSCLL=io_status(ID) + if (io_OSCLL/=0) goto 1 + ! + endif + ! + i_fragment=maxval(io_sec(ID,:))-1 + ! + if(i_fragment<=nXkibz) then + i_sp_pol=1 + ik=i_fragment + else + i_sp_pol=2 + ik=i_fragment-nXkibz + endif + ! + if (ik==0) goto 1 + ! + ik_mem=PAR_Xk_ibz_index(ik) + ! + COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 + YAMBO_ALLOC(disk_data,(COLL_nbands,q%nbz,2)) + ! + if (read_is_on(ID)) then + if(.not.allocated(OSCLL)) then + YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,q%nbz,ng_oscll)) + call mem_est("OSCLL",(/size(OSCLL)/),(/2*SP/)) + endif + endif + ! + ! Fragmentation + ! + call io_fragment(ID,ID_frag,i_fragment=i_fragment) + ! + ! Manage RD_CL_IF_END + ! + if (io_action(ID)==RD_CL_IF_END.and.ik==nXkibz) io_action(ID)=RD_CL + ! + do ib=COLL_bands(1),COLL_bands(2) + do ig=1,ng_oscll + ! + if (write_is_on(ID)) call mat_c2r(OSCLL_k(ib,:,:,ig),disk_data) + ! + write (VAR_name,'(3(a,i4.4))') 'OSCLL_',ik,'_ib_',ib,'_ig_',ig + call def_variable_bulk(ID_frag,trim(VAR_name),1,shape(disk_data),SP) + call io_variable_bulk(ID_frag,1,R3=disk_data) + ! + io_OSCLL=io_status(ID) + if (io_OSCLL/=0) goto 1 + ! + if (read_is_on(ID)) call mat_r2c(disk_data,OSCLL(ib,:,ik_mem,:,ig)) + ! + enddo + enddo + ! + YAMBO_FREE(disk_data) + ! +1 call io_fragment_disconnect(ID,ID_frag) + ! + call io_disconnect(ID=ID) + ! +#if defined _TIMING + call timing('io_OSCLL',OPR='stop') +#endif + ! +end function diff --git a/src/io_serial/.objects b/src/io_serial/.objects index a43913ec15..6b18a8d628 100644 --- a/src/io_serial/.objects +++ b/src/io_serial/.objects @@ -1,4 +1,5 @@ +COLL_objects = #if defined _SC || _RT || _QED -COLL_objects = io_COLLISIONS.o +COLL_objects = io_COLLISIONS.o #endif objs = io_BS.o io_DIPOLES.o variables_BS.o io_Overlaps.o $(COLL_objects) diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index a5b638ec5c..b183c478b7 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -110,6 +110,7 @@ module collision_ext integer :: ng_oscll ! number of G-vectors in the Oscillators complex(SP), allocatable :: W(:,:,:) ! screened interaction complex(SP), allocatable :: OSCLL(:,:,:,:,:) ! Oscillators + complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in k, just for the evaluation ! contains ! From ec456d25ef3e4ddfeed24a5c9640030e4606ea7f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Jul 2022 18:21:28 +0200 Subject: [PATCH 0357/1367] Version 5.1.0, Revision 21630, Hash d1af24b14 MODIFIED * include/driver/version.h collisions/.objects collisions/Build_LSEX_collisions.F collisions/LSEX_potential.F NEW * collisions/OSCLL_eval.F Additions: -Added function to evaluate oscillators Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/.objects | 2 +- src/collisions/Build_LSEX_collisions.F | 2 +- src/collisions/LSEX_potential.F | 2 +- src/collisions/OSCLL_eval.F | 164 +++++++++++++++++++++++++ 5 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 src/collisions/OSCLL_eval.F diff --git a/include/driver/version.h b/include/driver/version.h index 40191e9eec..931799c6a2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21629 -#define YAMBO_HASH "690fc3961" +#define YAMBO_REVISION 21630 +#define YAMBO_HASH "d1af24b14" diff --git a/src/collisions/.objects b/src/collisions/.objects index 15cd86bdc5..fdee9a00a0 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -14,7 +14,7 @@ RT_objs = COLLISIONS_compose_rt.o #if defined _NL NL_objs = COLLISIONS_compose_nl.o #endif -LSEX_objs = Build_LSEX_collisions.o LSEX_potential.o +LSEX_objs = Build_LSEX_collisions.o LSEX_potential.o OSCLL_eval.o OSCLL_load.o objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ PLASMA_build_up.o PLASMA_tables_and_dimensions.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F index 9bfacf148c..1ad77f8366 100644 --- a/src/collisions/Build_LSEX_collisions.F +++ b/src/collisions/Build_LSEX_collisions.F @@ -31,7 +31,7 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) use QP_m, ONLY:QP_table,QP_nk,QP_n_states use R_lattice, ONLY:bz_samp,qindx_S ! - implicit none +#include ! type(bz_samp), intent(in) :: k,q integer, intent(in) :: i_qp diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index e2e672d6f3..7061da60bd 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -42,7 +42,7 @@ subroutine LSEX_potential(q,X,Xw) use stderr, ONLY:intc use parallel_int, ONLY:PP_redux_wait ! - implicit none +#include ! type(bz_samp), intent(in) :: q type(w_samp) :: Xw diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F new file mode 100644 index 0000000000..737817b482 --- /dev/null +++ b/src/collisions/OSCLL_eval.F @@ -0,0 +1,164 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OSCLL_eval(q,k,en) + ! + ! Evaluate oscillators for the Local-SEX + ! + use LIVE_t, ONLY:live_timing + use pars, ONLY:SP,cZERO + use R_lattice, ONLY:bz_samp,qindx_S + use electrons, ONLY:levels + use wave_func, ONLY:WF,wf_ng + use interfaces, ONLY:WF_load + use QP_m, ONLY:QP_nk + use collision_el, ONLY:elemental_collision,elemental_collision_free, & +& elemental_collision_alloc + use collision_ext, ONLY:COLL_bands,W,OSCLL_k,ng_oscll + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID + use FFT_m, ONLY:fft_size + use IO_int, ONLY:io_control,IO_and_Messaging_switch + use IO_m, ONLY:OP_RD_CL,VERIFY,REP,OP_WR_CL + use com, ONLY:msg + use parallel_int, ONLY:PP_redux_wait + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,master_cpu,myid,PAR_IND_G_b, & +& PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX + ! +#include + ! + type(bz_samp), intent(in) :: q,k + type(levels), intent(in) :: en + ! + ! Work Space + ! + type(elemental_collision) :: isc + integer :: i_k,i_m,i_n,i_q,iqbz,i_kmq_G0,iqs,i_kmq,i_kmq_s,i_k_s,ik_mem + integer :: i_k_sp,i_kmq_sp,iqibz,ig,i_np,i_mp,io,ic,i_sp_pol,ib_idx + integer :: ID,io_err,iGo_max + integer :: COLL_nbands + integer, external :: io_OSCLL + ! + call PP_redux_wait() + ! + i_sp_pol=1 + ! + call IO_and_Messaging_switch("SAVE") + call IO_and_Messaging_switch("+io_in",CONDITION=.TRUE.) + ! + call msg('s','[OSC] Checking oscillators header ') + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + ! + if(io_err==0) return + ! + call PP_redux_wait() + ! + ! Oscillators not found, recalculated them + ! + if(master_cpu) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + endif + ! + iGo_max=maxval(qindx_S(:,:,2)) + call WF_load(WF,wf_ng,iGo_max,(/1,COLL_bands(2)/),(/1,k%nibz/),space='R',title='-OSC') + ! + call elemental_collision_free(isc) + ! + isc%iqref =0 + isc%ngrho =ng_oscll ! only G=1 is required for local-SEX + ! + call elemental_collision_alloc(isc,NG=isc%ngrho,TITLE="OSCLL") + ! + call live_timing('[OSC] Oscillators :',PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1)) + ! + call IO_and_Messaging_switch("SAVE") + call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_Xk_ibz_A2A%CPU_id==0) + ! + YAMBO_ALLOC(OSCLL_k,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),q%nbz,ng_oscll)) + ! + COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 + ! + do i_k=1,QP_nk + ! + if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle + ! + ik_mem=PAR_Xk_ibz_index(i_k) + ! + OSCLL_k=cZERO + ! + do i_n=COLL_bands(1),COLL_bands(2) + do i_m=COLL_bands(1),COLL_bands(2) + ! + ib_idx=i_m-COLL_bands(1)+1+(i_n-COLL_bands(1))*COLL_nbands + ! + if (.not.PAR_IND_G_b%element_1D(ib_idx)) cycle + ! + do iqbz=1,q%nbz + ! + i_kmq_G0 =qindx_S(i_k,iqbz,2) + iqibz =q%sstar(iqbz,1) + iqs =q%sstar(iqbz,2) + isc%qs =(/i_kmq_G0,iqibz,iqs/) + ! + i_k_s=1 + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + i_kmq_s = k%sstar(qindx_S(i_k,iqbz,1),2) + ! + ! Spin-Polarization not supported!! + ! + i_k_sp = 1 + i_kmq_sp= 1 + ! + ! + isc%is =(/i_n,i_k,i_k_s,i_k_sp/) + isc%os =(/i_m,i_kmq,i_kmq_s,i_kmq_sp/) + call scatter_Bamp(isc) + OSCLL_k(i_n,i_m,iqbz,:)=isc%rhotw(:ng_oscll) + ! + enddo + ! + enddo + enddo + ! + call PP_redux_wait(OSCLL_k(:,:,:,:),COMM=PAR_COM_G_b_INDEX%COMM) + ! + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1+i_k+(i_sp_pol-1)*k%nibz/),ID=ID) + io_err=io_OSCLL(q,ID) + ! + call live_timing(steps=1) + ! + enddo + ! + call IO_and_Messaging_switch("RESTORE") + ! + call live_timing() + ! + YAMBO_FREE(OSCLL_k) + ! + call elemental_collision_free(isc) + call WF_free(WF) + ! + call PP_redux_wait() + ! +end subroutine OSCLL_eval From 99fe89a071f7cd004f3c67f4952541c1cee2e651 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Jul 2022 18:22:05 +0200 Subject: [PATCH 0358/1367] Version 5.1.0, Revision 21631, Hash ec456d25e MODIFIED * include/driver/version.h NEW * collisions/OSCLL_load.F Additions: -Added function to load oscillators Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/OSCLL_load.F | 76 +++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 src/collisions/OSCLL_load.F diff --git a/include/driver/version.h b/include/driver/version.h index 931799c6a2..d6cba97bea 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21630 -#define YAMBO_HASH "d1af24b14" +#define YAMBO_REVISION 21631 +#define YAMBO_HASH "ec456d25e" diff --git a/src/collisions/OSCLL_load.F b/src/collisions/OSCLL_load.F new file mode 100644 index 0000000000..eaa0c99b46 --- /dev/null +++ b/src/collisions/OSCLL_load.F @@ -0,0 +1,76 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OSCLL_load(q,k) + ! + ! Evaluate oscillators for the Local-SEX + ! + use LIVE_t, ONLY:live_timing + use R_lattice, ONLY:bz_samp + use QP_m, ONLY:QP_nk + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID,myid,PAR_COM_Xk_ibz_INDEX,master_cpu + use parallel_int, ONLY:PP_redux_wait + use IO_m, ONLY:OP_RD,RD_CL_IF_END,VERIFY,REP + use IO_int, ONLY:io_control,IO_and_Messaging_switch + use com, ONLY:msg + ! +#include + ! + type(bz_samp), intent(in) :: q,k + ! + ! Work Space + ! + integer :: i_k,i_sp_pol + integer :: ID,io_err + integer, external :: io_OSCLL + ! + call PP_redux_wait(COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! + i_sp_pol=1 + ! + call IO_and_Messaging_switch("SAVE") + call IO_and_Messaging_switch("+io_in",CONDITION=.TRUE.) + ! + call msg('s','[OSC] Checking oscillators header ') + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + ! + ! Load Oscillators + ! + call live_timing('[OSC] Load Oscillators :',PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1)) + ! + do i_k=1,QP_nk + if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+i_k+(i_sp_pol-1)*k%nibz/),ID=ID) + io_err=io_OSCLL(q,ID) + if(io_err/=0) call error("Error reading Oscillators!! ") + call live_timing(steps=1) + enddo + call live_timing() + ! + call PP_redux_wait(COMM=PAR_COM_Xk_ibz_INDEX%COMM) + call IO_and_Messaging_switch("RESTORE") + ! + call msg('rs','[OSC] Oscillators loaded') + ! +end subroutine OSCLL_load From 3d06111dc6b091ad80c44f711a022a8c6235061b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Jul 2022 18:33:54 +0200 Subject: [PATCH 0359/1367] Version 5.1.0, Revision 21632, Hash 99fe89a07 MODIFIED * include/driver/version.h collisions/OSCLL_eval.F Bugs: -Fixed call to scatterBamp Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/collisions/OSCLL_eval.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d6cba97bea..34b0934b95 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21631 -#define YAMBO_HASH "ec456d25e" +#define YAMBO_REVISION 21632 +#define YAMBO_HASH "99fe89a07" diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F index 737817b482..9c5c73eaef 100644 --- a/src/collisions/OSCLL_eval.F +++ b/src/collisions/OSCLL_eval.F @@ -133,7 +133,7 @@ subroutine OSCLL_eval(q,k,en) ! isc%is =(/i_n,i_k,i_k_s,i_k_sp/) isc%os =(/i_m,i_kmq,i_kmq_s,i_kmq_sp/) - call scatter_Bamp(isc) + call DEV_SUB(scatter_Bamp)(isc) OSCLL_k(i_n,i_m,iqbz,:)=isc%rhotw(:ng_oscll) ! enddo From d62a30127d442010826f04ce3253768a6a3e833b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 12 Jul 2022 08:28:07 +0200 Subject: [PATCH 0360/1367] Version 5.1.0, Revision 21633, Hash 3d06111dc MODIFIED * include/driver/version.h collisions/LSEX_potential.F interface/INIT_load.F modules/mod_nl_optics.F Additions: -New flag for LSEX collisions Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/collisions/LSEX_potential.F | 6 +++--- src/interface/INIT_load.F | 2 +- src/modules/mod_nl_optics.F | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 34b0934b95..56770a2763 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21632 -#define YAMBO_HASH "99fe89a07" +#define YAMBO_REVISION 21633 +#define YAMBO_HASH "3d06111dc" diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index 7061da60bd..e15f17b522 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -25,7 +25,7 @@ subroutine LSEX_potential(q,X,Xw) ! ! Construct the screeend potential W(G=G'=0,q) ! - use nl_optics, ONLY:NL_bands,Correlation,SEX + use nl_optics, ONLY:NL_bands,Correlation,LSEX use collision_ext, ONLY:W use LIVE_t, ONLY:live_timing use pars, ONLY:SP,cZERO,pi @@ -66,7 +66,7 @@ subroutine LSEX_potential(q,X,Xw) ! call live_timing('[NL] W potential :',q%nbz) ! - if(Correlation==SEX) then + if(Correlation==LSEX) then call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) io_err=io_X(X,Xw,ID) if (io_err<0) call error('Incomplete and/or broken tatic diel. fun. database') @@ -89,7 +89,7 @@ subroutine LSEX_potential(q,X,Xw) W(iqbz,ig1,ig1)=-4._SP/spin_occ*pi*isc%gamp(ig1,ig1) enddo ! - if(Correlation==SEX) then + if(Correlation==LSEX) then ! isc%iqref=-1 call scatter_Gamp(isc,'c') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 4391aabbf4..691dfc69b6 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -525,7 +525,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'NLstep', '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics) call it(defs,'NLtime', '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1)) call it(defs,'NLintegrator', '[NL] Integrator ("EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")',Integrator_name) - call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX") ',NL_correlation) + call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX/LSEX") ',NL_correlation) call it(defs,'NLLrcAlpha', '[NL] Long Range Correction',NL_LRC_alpha) call it(defs,'NLDamping', '[NL] Damping (or dephasing)',NL_damping,unit=E_unit) call it(defs,'NLEnRange', '[NL] Energy range',NL_er,E_unit) diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index c506de9dbb..529c7c0be0 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -112,6 +112,7 @@ module nl_optics integer, parameter :: LRCW = 6 integer, parameter :: HF = 7 integer, parameter :: SEX = 8 + integer, parameter :: LSEX = 9 ! logical :: eval_COLLISIONS logical :: eval_dG From ccc8167c4ed0dc9b51a2dad913466870ade8912a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 12 Jul 2022 08:49:31 +0200 Subject: [PATCH 0361/1367] Version 5.1.0, Revision 21634, Hash d62a30127 MODIFIED * include/driver/version.h collisions/OSCLL_eval.F collisions/compose_LSEX_nl.F nloptics/.objects NEW * nloptics/NL_test_collisions.F Additions: -Added subroutine for the collisions test Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/OSCLL_eval.F | 1 + src/collisions/compose_LSEX_nl.F | 2 +- src/nloptics/.objects | 2 +- src/nloptics/NL_test_collisions.F | 87 +++++++++++++++++++++++++++++++ 5 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 src/nloptics/NL_test_collisions.F diff --git a/include/driver/version.h b/include/driver/version.h index 56770a2763..880e168202 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21633 -#define YAMBO_HASH "3d06111dc" +#define YAMBO_REVISION 21634 +#define YAMBO_HASH "d62a30127" diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F index 9c5c73eaef..1046fe1b09 100644 --- a/src/collisions/OSCLL_eval.F +++ b/src/collisions/OSCLL_eval.F @@ -44,6 +44,7 @@ subroutine OSCLL_eval(q,k,en) use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,master_cpu,myid,PAR_IND_G_b, & & PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX ! +#include #include ! type(bz_samp), intent(in) :: q,k diff --git a/src/collisions/compose_LSEX_nl.F b/src/collisions/compose_LSEX_nl.F index 0a90670975..d1bc5fa06c 100644 --- a/src/collisions/compose_LSEX_nl.F +++ b/src/collisions/compose_LSEX_nl.F @@ -1,5 +1,5 @@ ! -! Copyright (C) 2015-2017 the LUMEN team +! Copyright (C) 2015-2022 the Yambo team ! ! Authors (see AUTHORS file for details): CA ! diff --git a/src/nloptics/.objects b/src/nloptics/.objects index 4eee2fa152..c36b112313 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -2,4 +2,4 @@ objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL NL_Hamiltonian.o NL_output.o DIP_polarization.o NL_average_operator.o EXC_macroscopic_JGM.o \ NL_databases_IO.o NL_damping.o NL_build_dG_lesser.o NL_build_valence_bands.o EXP_step.o \ NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o \ - NL_carriers_number.o + NL_carriers_number.o NL_test_collisions.o diff --git a/src/nloptics/NL_test_collisions.F b/src/nloptics/NL_test_collisions.F new file mode 100644 index 0000000000..b422d41722 --- /dev/null +++ b/src/nloptics/NL_test_collisions.F @@ -0,0 +1,87 @@ +! +! Copyright (C) 2000-2022 the Yambo team +! +! Authors (see AUTHORS file for details): MG CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine NL_test_collisions(k,q) + ! + ! Test-collisions built on the fly vs collisions stored in memory + ! + use pars, ONLY:cZERO,SP + use R_lattice, ONLY:bz_samp,qindx_S + use collision_ext, ONLY:COLL_bands +! use collision, ONLY:Fock_collisions,SEX_collisions,nFock_collisions,nSEX_collisions + use QP_m, ONLY:QP_table,QP_nk,QP_n_states + use com, ONLY:msg + ! + implicit none + ! + type(bz_samp), intent(in) :: k,q + ! + integer :: i_kmq,i_qp,ib,ibp + integer :: ic1,ic2 + complex(SP) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + complex(SP) :: COLL_OSCLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + ! + real(SP) :: max_diff,diff + ! + call msg('s','* * * * Collisions Test * * * * ') + ! + max_diff=0._SP + ! + do i_qp=1,QP_n_states + ! + COLL=cZERO + ! + call Build_LSEX_collisions(k,q,i_qp,COLL_OSCLL) + ! + ic1=1 + ic2=1 + ! + do i_kmq=1,QP_nk + ! + do ibp=COLL_bands(1),COLL_bands(2) + do ib=COLL_bands(1),COLL_bands(2) +! if (nFock_collisions>0) then +! if (Fock_collisions(i_qp)%table(ib,ibp,i_kmq)/=0) then +! COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+Fock_collisions(i_qp)%v_c(ic1) +!! ic1=ic1+1 +!! endif +! endif +!!! if (nSEX_collisions>0) then +! if (SEX_collisions(i_qp)%table(ib,ibp,i_kmq)/=0) then +! COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+SEX_collisions(i_qp)%v_c(ic2) +!! ic2=ic2+1 +!! endif +! endif + ! + diff=abs(COLL(ib,ibp,i_kmq)-COLL_OSCLL(ib,ibp,i_kmq)) + if(max_diff<=diff) max_diff=diff + ! + enddo + enddo + ! + enddo + ! + enddo + ! + call msg('sr','Max error in collisions : ',max_diff) + ! +end subroutine NL_test_collisions From 697132abcf1b5c93373a0e53baca010f341747ad Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 12 Jul 2022 14:59:13 +0200 Subject: [PATCH 0362/1367] Version 5.1.0, Revision 21635, Hash ccc8167c4 MODIFIED * include/driver/version.h interface/INIT_load.F io/.objects modules/mod_collision_ext.F modules/mod_nl_optics.F nloptics/.objects DELETED * collisions/Build_LSEX_collisions.F collisions/LSEX_potential.F collisions/OSCLL_eval.F collisions/OSCLL_load.F collisions/compose_LSEX_nl.F io/io_OSCLL.F nloptics/NL_test_collisions.F Changes: -Removed LSEX collisions, moved to a separate branch Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/collisions/Build_LSEX_collisions.F | 80 ------------ src/collisions/LSEX_potential.F | 129 ------------------- src/collisions/OSCLL_eval.F | 165 ------------------------- src/collisions/OSCLL_load.F | 76 ------------ src/collisions/compose_LSEX_nl.F | 114 ----------------- src/interface/INIT_load.F | 2 +- src/io/.objects | 6 +- src/io/io_OSCLL.F | 140 --------------------- src/modules/mod_collision_ext.F | 7 -- src/modules/mod_nl_optics.F | 1 - src/nloptics/.objects | 2 +- src/nloptics/NL_test_collisions.F | 87 ------------- 13 files changed, 5 insertions(+), 808 deletions(-) delete mode 100644 src/collisions/Build_LSEX_collisions.F delete mode 100644 src/collisions/LSEX_potential.F delete mode 100644 src/collisions/OSCLL_eval.F delete mode 100644 src/collisions/OSCLL_load.F delete mode 100644 src/collisions/compose_LSEX_nl.F delete mode 100644 src/io/io_OSCLL.F delete mode 100644 src/nloptics/NL_test_collisions.F diff --git a/include/driver/version.h b/include/driver/version.h index 880e168202..264b95d5a0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21634 -#define YAMBO_HASH "d62a30127" +#define YAMBO_REVISION 21635 +#define YAMBO_HASH "ccc8167c4" diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F deleted file mode 100644 index 1ad77f8366..0000000000 --- a/src/collisions/Build_LSEX_collisions.F +++ /dev/null @@ -1,80 +0,0 @@ -! -! Copyright (C) 2000-2022 the LUMEN team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine Build_LSEX_collisions(k,q,i_qp,COLL) - ! - ! This subroutine calculate the long-range part of the Screened exchange - ! - use electrons, ONLY:n_sp_pol - use pars, ONLY:SP,cI,cZERO - use collision_ext, ONLY:OSCLL,W,ng_oscll,COLL_bands - use QP_m, ONLY:QP_table,QP_nk,QP_n_states - use R_lattice, ONLY:bz_samp,qindx_S - ! -#include - ! - type(bz_samp), intent(in) :: k,q - integer, intent(in) :: i_qp - ! - ! Work Space - ! - integer :: i_mp ! self-energy external indexes - integer :: i_np,iqbz,i_kmq ! self-energy internal indexes - integer :: ig1,ig2 - integer :: i_n,i_m - integer :: i_k - ! - ! Collisions output - ! - complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) - ! - ! Coll indexes - ! - i_n=QP_table(i_qp,1) - i_m=QP_table(i_qp,2) - i_k=QP_table(i_qp,3) - ! - ! Build Collisions from the Oscillators - ! - do i_mp=COLL_bands(1),COLL_bands(2) - do i_np=COLL_bands(1),COLL_bands(2) - ! - COLL(i_np,i_mp,:)=cZERO - ! - do iqbz=1,q%nbz - i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) - ! - ! Build Collision on the fly - ! - do ig1=1,ng_oscll - do ig2=1,ng_oscll - COLL(i_np,i_mp,i_kmq)=COLL(i_np,i_mp,i_kmq)+OSCLL(i_n,i_np,i_k,iqbz,ig2) & -& *conjg(OSCLL(i_m,i_mp,i_k,iqbz,ig1))*W(iqbz,ig2,ig1) - enddo - enddo - ! - enddo - enddo - enddo - ! -end subroutine Build_LSEX_collisions diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F deleted file mode 100644 index e15f17b522..0000000000 --- a/src/collisions/LSEX_potential.F +++ /dev/null @@ -1,129 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine LSEX_potential(q,X,Xw) - ! - ! Construct the screeend potential W(G=G'=0,q) - ! - use nl_optics, ONLY:NL_bands,Correlation,LSEX - use collision_ext, ONLY:W - use LIVE_t, ONLY:live_timing - use pars, ONLY:SP,cZERO,pi - use frequency, ONLY:w_samp,W_reset - use R_lattice, ONLY:bz_samp,qindx_S - use D_lattice, ONLY:DL_vol - use electrons, ONLY:levels,spin_occ - use collision_el, ONLY:elemental_collision,elemental_collision_free, & -& elemental_collision_alloc - use X_m, ONLY:X_mat,X_ALLOC_elemental,X_t - use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,RD_CL,OP_RD,RD_CL_IF_END - use matrix_operate, ONLY:hermitian - use stderr, ONLY:intc - use parallel_int, ONLY:PP_redux_wait - ! -#include - ! - type(bz_samp), intent(in) :: q - type(w_samp) :: Xw - type(X_t) :: X - ! - ! Work Space - ! - integer :: iqbz,iqibz,iqs,io_err,ID,ig1,ig2 - integer, external :: io_X - type(elemental_collision) :: isc - ! - call PP_redux_wait() - ! - isc%iqref =0 - isc%ngrho =X%ng ! only G=1 is required for local-SEX - ! - call elemental_collision_free(isc) - call elemental_collision_alloc(isc,NG=X%ng,NG_GAMP=(/X%ng,X%ng/),TITLE="Wlr") - ! - call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) - ! - call live_timing('[NL] W potential :',q%nbz) - ! - if(Correlation==LSEX) then - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) - io_err=io_X(X,Xw,ID) - if (io_err<0) call error('Incomplete and/or broken tatic diel. fun. database') - endif - ! - do iqbz=1,q%nbz - ! - W(iqbz,:,:)=cZERO - ! - isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) - iqibz=isc%qs(2) - iqs =isc%qs(3) - ! - isc%iqref=-1 - call scatter_Gamp(isc,'x') - ! - ! The bare exchange v - ! - do ig1=1,X%ng - W(iqbz,ig1,ig1)=-4._SP/spin_occ*pi*isc%gamp(ig1,ig1) - enddo - ! - if(Correlation==LSEX) then - ! - isc%iqref=-1 - call scatter_Gamp(isc,'c') - ! - if (iqbz ==1) then - call io_control(ACTION=OP_RD,COM=NONE, SEC=(/1,2,2*iqibz+1/),ID=ID) - elseif (q%nbz==1) then - call io_control(ACTION=OP_RD_CL,COM=NONE, SEC=(/1,2,3/),ID=ID) - elseif (iqbz> 1) then - call io_control(ACTION=RD_CL_IF_END,COM=NONE,SEC=(/2*iqibz,2*iqibz+1/),ID=ID) - endif - io_err=io_X(X,Xw,ID) - ! - if(io_err<0) call error(" Error loading em1s iq="//intc(iqbz)) - ! - ! Screened part of the exchange \tilde W = W - v - ! -!$omp parallel do default(shared), private(ig1,ig2) - do ig1=1,X%ng - do ig2=1,X%ng - W(iqbz,ig1,ig2)=W(iqbz,ig1,ig2)-4._SP/spin_occ*pi*X_mat(ig1,ig2,1)*isc%gamp(ig1,ig2) - enddo - enddo -!$omp end parallel do - ! - endif - ! - call live_timing(steps=1) - ! - enddo - ! - call live_timing() - ! - call elemental_collision_free(isc) - call X_alloc('X') - ! -end subroutine LSEX_potential diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F deleted file mode 100644 index 1046fe1b09..0000000000 --- a/src/collisions/OSCLL_eval.F +++ /dev/null @@ -1,165 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine OSCLL_eval(q,k,en) - ! - ! Evaluate oscillators for the Local-SEX - ! - use LIVE_t, ONLY:live_timing - use pars, ONLY:SP,cZERO - use R_lattice, ONLY:bz_samp,qindx_S - use electrons, ONLY:levels - use wave_func, ONLY:WF,wf_ng - use interfaces, ONLY:WF_load - use QP_m, ONLY:QP_nk - use collision_el, ONLY:elemental_collision,elemental_collision_free, & -& elemental_collision_alloc - use collision_ext, ONLY:COLL_bands,W,OSCLL_k,ng_oscll - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID - use FFT_m, ONLY:fft_size - use IO_int, ONLY:io_control,IO_and_Messaging_switch - use IO_m, ONLY:OP_RD_CL,VERIFY,REP,OP_WR_CL - use com, ONLY:msg - use parallel_int, ONLY:PP_redux_wait - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,master_cpu,myid,PAR_IND_G_b, & -& PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX - ! -#include -#include - ! - type(bz_samp), intent(in) :: q,k - type(levels), intent(in) :: en - ! - ! Work Space - ! - type(elemental_collision) :: isc - integer :: i_k,i_m,i_n,i_q,iqbz,i_kmq_G0,iqs,i_kmq,i_kmq_s,i_k_s,ik_mem - integer :: i_k_sp,i_kmq_sp,iqibz,ig,i_np,i_mp,io,ic,i_sp_pol,ib_idx - integer :: ID,io_err,iGo_max - integer :: COLL_nbands - integer, external :: io_OSCLL - ! - call PP_redux_wait() - ! - i_sp_pol=1 - ! - call IO_and_Messaging_switch("SAVE") - call IO_and_Messaging_switch("+io_in",CONDITION=.TRUE.) - ! - call msg('s','[OSC] Checking oscillators header ') - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - io_err=io_OSCLL(q,ID) - ! - if(io_err==0) return - ! - call PP_redux_wait() - ! - ! Oscillators not found, recalculated them - ! - if(master_cpu) then - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - io_err=io_OSCLL(q,ID) - endif - ! - iGo_max=maxval(qindx_S(:,:,2)) - call WF_load(WF,wf_ng,iGo_max,(/1,COLL_bands(2)/),(/1,k%nibz/),space='R',title='-OSC') - ! - call elemental_collision_free(isc) - ! - isc%iqref =0 - isc%ngrho =ng_oscll ! only G=1 is required for local-SEX - ! - call elemental_collision_alloc(isc,NG=isc%ngrho,TITLE="OSCLL") - ! - call live_timing('[OSC] Oscillators :',PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1)) - ! - call IO_and_Messaging_switch("SAVE") - call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_Xk_ibz_A2A%CPU_id==0) - ! - YAMBO_ALLOC(OSCLL_k,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),q%nbz,ng_oscll)) - ! - COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 - ! - do i_k=1,QP_nk - ! - if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle - ! - ik_mem=PAR_Xk_ibz_index(i_k) - ! - OSCLL_k=cZERO - ! - do i_n=COLL_bands(1),COLL_bands(2) - do i_m=COLL_bands(1),COLL_bands(2) - ! - ib_idx=i_m-COLL_bands(1)+1+(i_n-COLL_bands(1))*COLL_nbands - ! - if (.not.PAR_IND_G_b%element_1D(ib_idx)) cycle - ! - do iqbz=1,q%nbz - ! - i_kmq_G0 =qindx_S(i_k,iqbz,2) - iqibz =q%sstar(iqbz,1) - iqs =q%sstar(iqbz,2) - isc%qs =(/i_kmq_G0,iqibz,iqs/) - ! - i_k_s=1 - i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) - i_kmq_s = k%sstar(qindx_S(i_k,iqbz,1),2) - ! - ! Spin-Polarization not supported!! - ! - i_k_sp = 1 - i_kmq_sp= 1 - ! - ! - isc%is =(/i_n,i_k,i_k_s,i_k_sp/) - isc%os =(/i_m,i_kmq,i_kmq_s,i_kmq_sp/) - call DEV_SUB(scatter_Bamp)(isc) - OSCLL_k(i_n,i_m,iqbz,:)=isc%rhotw(:ng_oscll) - ! - enddo - ! - enddo - enddo - ! - call PP_redux_wait(OSCLL_k(:,:,:,:),COMM=PAR_COM_G_b_INDEX%COMM) - ! - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1+i_k+(i_sp_pol-1)*k%nibz/),ID=ID) - io_err=io_OSCLL(q,ID) - ! - call live_timing(steps=1) - ! - enddo - ! - call IO_and_Messaging_switch("RESTORE") - ! - call live_timing() - ! - YAMBO_FREE(OSCLL_k) - ! - call elemental_collision_free(isc) - call WF_free(WF) - ! - call PP_redux_wait() - ! -end subroutine OSCLL_eval diff --git a/src/collisions/OSCLL_load.F b/src/collisions/OSCLL_load.F deleted file mode 100644 index eaa0c99b46..0000000000 --- a/src/collisions/OSCLL_load.F +++ /dev/null @@ -1,76 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine OSCLL_load(q,k) - ! - ! Evaluate oscillators for the Local-SEX - ! - use LIVE_t, ONLY:live_timing - use R_lattice, ONLY:bz_samp - use QP_m, ONLY:QP_nk - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID,myid,PAR_COM_Xk_ibz_INDEX,master_cpu - use parallel_int, ONLY:PP_redux_wait - use IO_m, ONLY:OP_RD,RD_CL_IF_END,VERIFY,REP - use IO_int, ONLY:io_control,IO_and_Messaging_switch - use com, ONLY:msg - ! -#include - ! - type(bz_samp), intent(in) :: q,k - ! - ! Work Space - ! - integer :: i_k,i_sp_pol - integer :: ID,io_err - integer, external :: io_OSCLL - ! - call PP_redux_wait(COMM=PAR_COM_Xk_ibz_INDEX%COMM) - ! - i_sp_pol=1 - ! - call IO_and_Messaging_switch("SAVE") - call IO_and_Messaging_switch("+io_in",CONDITION=.TRUE.) - ! - call msg('s','[OSC] Checking oscillators header ') - call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - io_err=io_OSCLL(q,ID) - ! - ! Load Oscillators - ! - call live_timing('[OSC] Load Oscillators :',PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1)) - ! - do i_k=1,QP_nk - if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+i_k+(i_sp_pol-1)*k%nibz/),ID=ID) - io_err=io_OSCLL(q,ID) - if(io_err/=0) call error("Error reading Oscillators!! ") - call live_timing(steps=1) - enddo - call live_timing() - ! - call PP_redux_wait(COMM=PAR_COM_Xk_ibz_INDEX%COMM) - call IO_and_Messaging_switch("RESTORE") - ! - call msg('rs','[OSC] Oscillators loaded') - ! -end subroutine OSCLL_load diff --git a/src/collisions/compose_LSEX_nl.F b/src/collisions/compose_LSEX_nl.F deleted file mode 100644 index d1bc5fa06c..0000000000 --- a/src/collisions/compose_LSEX_nl.F +++ /dev/null @@ -1,114 +0,0 @@ -! -! Copyright (C) 2015-2022 the Yambo team -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine compose_LSEX_nl(V_bands,Hk,k,q,E,i_k) - ! - ! This subroutine calculate the long-range part of the Screened exchange - ! - use electrons, ONLY:n_sp_pol,levels,spin_occ - use pars, ONLY:SP,cI,cZERO,cONE - use FFT_m, ONLY:fft_size - use collision_ext, ONLY:COLL_bands,OSCLL,W,ng_oscll !,Sigma_SEX_EQ - use nl_optics, ONLY:NL_bands - use QP_m, ONLY:QP_nk - use R_lattice, ONLY:bz_samp,qindx_S - use wrapper, ONLY:V_dot_V - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_m, ONLY:PAR_Xk_ibz_index - ! - implicit none - ! - complex(SP), intent(inout) :: Hk(COLL_bands(2),COLL_bands(2),n_sp_pol) - integer, intent(in) :: i_k - type(bz_samp), intent(in) :: k,q - type(levels), intent(in) :: E - complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf,QP_nk,n_sp_pol) - ! - ! Work Space - ! - integer :: i_m,i_mp ! self-energy external indexes - integer :: i_n,i_np,iqbz,i_kmq ! self-energy internal indexes - integer :: ig1,ig2,i1,ik_mem,iv - ! - complex(SP) :: OSCLL_val(COLL_bands(1):COLL_bands(2),E%nbf,ng_oscll,q%nbz) - complex(SP) :: V_kmq(COLL_bands(1):COLL_bands(2),E%nbf,q%nbz) - complex(SP) :: val_sum(q%nbz,ng_oscll,ng_oscll) - ! - ! - ! Build Oscillators in term of valence bands - ! - ik_mem=PAR_Xk_ibz_index(i_k) - ! -!$omp parallel do default(shared), private(iqbz,i_kmq) - do iqbz=1,q%nbz - i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) - V_kmq(:,:,iqbz) = V_bands(COLL_bands(1):,:,i_kmq,1) - enddo -!$omp end parallel do - ! -!$omp parallel do default(shared), private(iv) - do iv=1,E%nbf - forall(iqbz=1:q%nbz,i_n=COLL_bands(1):COLL_bands(2),ig1=1:ng_oscll) - OSCLL_val(i_n,iv,ig1,iqbz)=sum(OSCLL(i_n,COLL_bands(1):COLL_bands(2),ik_mem,iqbz,ig1)*& -& V_kmq(COLL_bands(1):COLL_bands(2),iv,iqbz)) - end forall - enddo -!$omp end parallel do - ! -!$omp parallel do default(shared), private(i1) - do i1=COLL_bands(1),COLL_bands(2) -! Hk(:,i1,:)=Hk(:,i1,:)-Sigma_SEX_EQ(:,i1,:,ik_mem) - enddo -!$omp end parallel do - ! - ! Long-range SEX - ! - ! Evaluate Sigma_SEX(i_m,i_n,i_k) - ! - do i_n=NL_bands(1),NL_bands(2) - do i_m=i_n,NL_bands(2) - ! -!$omp parallel do default(shared), private(ig1,ig2,iqbz) - do iqbz=1,q%nbz - forall(ig1=1:ng_oscll,ig2=1:ng_oscll) - val_sum(iqbz,ig1,ig2)=sum(OSCLL_val(i_n,:,ig1,iqbz)*conjg(OSCLL_val(i_m,:,ig2,iqbz))) ! sum of valence bands - end forall - enddo -!$omp end parallel do - ! - Hk(i_n,i_m,1)=Hk(i_n,i_m,1)+spin_occ*V_dot_V_omp(ng_oscll**2*q%nbz,W(1,1,1),val_sum(1,1,1)) - ! - enddo - enddo - ! - ! Symmetrization - ! -!$omp parallel do default(shared), private(i_n,i_m) - do i_n=NL_bands(1),NL_bands(2) - Hk(i_n,i_n,:)=real(Hk(i_n,i_n,:),SP) - do i_m=1,i_n-1 - Hk(i_n,i_m,:)=conjg(Hk(i_m,i_n,:)) - enddo - enddo -!$omp end parallel do - ! -end subroutine compose_LSEX_nl diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 691dfc69b6..4391aabbf4 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -525,7 +525,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'NLstep', '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics) call it(defs,'NLtime', '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1)) call it(defs,'NLintegrator', '[NL] Integrator ("EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")',Integrator_name) - call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX/LSEX") ',NL_correlation) + call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX") ',NL_correlation) call it(defs,'NLLrcAlpha', '[NL] Long Range Correction',NL_LRC_alpha) call it(defs,'NLDamping', '[NL] Damping (or dephasing)',NL_damping,unit=E_unit) call it(defs,'NLEnRange', '[NL] Energy range',NL_er,E_unit) diff --git a/src/io/.objects b/src/io/.objects index 3c87057645..e4e9a0572a 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -15,10 +15,6 @@ ELPH_objects = variables_ELPH.o io_ELPH.o io_gFsq.o #if defined _PHEL PHEL_objects = io_PH.o #endif -COLL_objects = -#if defined _SC || _RT -COLL_objects = io_OSCLL.o -#endif objs = ver_is_gt_or_eq.o \ io_Vnl.o io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ @@ -30,4 +26,4 @@ objs = ver_is_gt_or_eq.o \ io_header.o io_Double_Grid.o \ io_COL_CUT.o io_DB1_selective_scan.o variables_X.o variables_DIPOLES.o \ io_out_of_date.o \ - $(SC_objects) $(RT_objects) $(NL_objects) $(COLL_objects) + $(SC_objects) $(RT_objects) $(NL_objects) diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F deleted file mode 100644 index 75449960d2..0000000000 --- a/src/io/io_OSCLL.F +++ /dev/null @@ -1,140 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -integer function io_OSCLL(q,ID) - ! - use pars, ONLY:SP,schlen - use electrons, ONLY:levels - use matrix_operate,ONLY:mat_c2r,mat_r2c - use R_lattice, ONLY:nXkibz,bz_samp - use QP_m, ONLY:QP_nk - use IO_int, ONLY:io_connect,io_disconnect,io_header,io_fragment, & -& io_elemental,def_variable_bulk,io_variable_bulk - use IO_m, ONLY:io_sec,frag_DIP,read_is_on,write_is_on,io_extension,& -& RD_CL_IF_END,RD_CL,io_action,IO_NOT_ALLOWED,io_DIP, & -& io_status - use collision_ext, ONLY:COLL_bands,OSCLL,OSCLL_k,ng_oscll - use parallel_m, ONLY:PAR_Xk_ibz_index,PAR_Xk_nibz,myid -#if defined _TIMING - use timing_m, ONLY:timing -#endif - ! -#include - ! - integer ::ID - type(bz_samp), intent(in) :: q - ! - ! Work Space - ! - integer :: ik,ik_mem,i_fragment,i_sp_pol,iqbz,ig,ib,COLL_nbands,ID_frag - character(schlen) :: VAR_name - real(SP),allocatable :: disk_data(:,:,:) - ! -#if defined _TIMING - call timing('io_OSCLL',OPR='start') -#endif - ! - ID_frag=0 - ! - io_extension(ID)='OSCLL' - ! - io_OSCLL=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID) - if (io_OSCLL/=0) goto 1 - ! - if (any((/io_sec(ID,:)==1/))) then - ! - io_OSCLL=io_header(ID,R_LATT=.true.,WF=.true.,IMPOSE_SN=.true.) - if (io_OSCLL/=0) goto 1 - ! - ! Variable for the Oscillators - ! - call io_elemental(ID,VAR="OSCLLPARS",VAR_SZ=3,MENU=0) - call io_elemental(ID,VAR="[NL] RL vectors in oscillators :",I0=ng_oscll,CHECK=.true.,OP=(/"<="/)) - call io_elemental(ID,VAR="[NL] OSCLL band range :",I1=COLL_bands,CHECK=.true.,OP=(/"==","=="/)) - call io_elemental(ID,VAR="",VAR_SZ=0) - ! - io_OSCLL=io_status(ID) - if (io_OSCLL/=0) goto 1 - ! - endif - ! - i_fragment=maxval(io_sec(ID,:))-1 - ! - if(i_fragment<=nXkibz) then - i_sp_pol=1 - ik=i_fragment - else - i_sp_pol=2 - ik=i_fragment-nXkibz - endif - ! - if (ik==0) goto 1 - ! - ik_mem=PAR_Xk_ibz_index(ik) - ! - COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 - YAMBO_ALLOC(disk_data,(COLL_nbands,q%nbz,2)) - ! - if (read_is_on(ID)) then - if(.not.allocated(OSCLL)) then - YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,q%nbz,ng_oscll)) - call mem_est("OSCLL",(/size(OSCLL)/),(/2*SP/)) - endif - endif - ! - ! Fragmentation - ! - call io_fragment(ID,ID_frag,i_fragment=i_fragment) - ! - ! Manage RD_CL_IF_END - ! - if (io_action(ID)==RD_CL_IF_END.and.ik==nXkibz) io_action(ID)=RD_CL - ! - do ib=COLL_bands(1),COLL_bands(2) - do ig=1,ng_oscll - ! - if (write_is_on(ID)) call mat_c2r(OSCLL_k(ib,:,:,ig),disk_data) - ! - write (VAR_name,'(3(a,i4.4))') 'OSCLL_',ik,'_ib_',ib,'_ig_',ig - call def_variable_bulk(ID_frag,trim(VAR_name),1,shape(disk_data),SP) - call io_variable_bulk(ID_frag,1,R3=disk_data) - ! - io_OSCLL=io_status(ID) - if (io_OSCLL/=0) goto 1 - ! - if (read_is_on(ID)) call mat_r2c(disk_data,OSCLL(ib,:,ik_mem,:,ig)) - ! - enddo - enddo - ! - YAMBO_FREE(disk_data) - ! -1 call io_fragment_disconnect(ID,ID_frag) - ! - call io_disconnect(ID=ID) - ! -#if defined _TIMING - call timing('io_OSCLL',OPR='stop') -#endif - ! -end function diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index b183c478b7..e57b07a6bb 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -105,13 +105,6 @@ module collision_ext type(COLLISIONS_element), allocatable :: HXC_COLL_element(:) type(COLLISIONS_element), allocatable :: P_COLL_element(:) ! - ! On the fly long-range SEX (LSEX) collisions - ! ==================================== - integer :: ng_oscll ! number of G-vectors in the Oscillators - complex(SP), allocatable :: W(:,:,:) ! screened interaction - complex(SP), allocatable :: OSCLL(:,:,:,:,:) ! Oscillators - complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in k, just for the evaluation - ! contains ! subroutine COLLISIONS_naming( H_SE_kind , what ) diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 529c7c0be0..c506de9dbb 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -112,7 +112,6 @@ module nl_optics integer, parameter :: LRCW = 6 integer, parameter :: HF = 7 integer, parameter :: SEX = 8 - integer, parameter :: LSEX = 9 ! logical :: eval_COLLISIONS logical :: eval_dG diff --git a/src/nloptics/.objects b/src/nloptics/.objects index c36b112313..f396329801 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -2,4 +2,4 @@ objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL NL_Hamiltonian.o NL_output.o DIP_polarization.o NL_average_operator.o EXC_macroscopic_JGM.o \ NL_databases_IO.o NL_damping.o NL_build_dG_lesser.o NL_build_valence_bands.o EXP_step.o \ NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o \ - NL_carriers_number.o NL_test_collisions.o + NL_carriers_number.o diff --git a/src/nloptics/NL_test_collisions.F b/src/nloptics/NL_test_collisions.F deleted file mode 100644 index b422d41722..0000000000 --- a/src/nloptics/NL_test_collisions.F +++ /dev/null @@ -1,87 +0,0 @@ -! -! Copyright (C) 2000-2022 the Yambo team -! -! Authors (see AUTHORS file for details): MG CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine NL_test_collisions(k,q) - ! - ! Test-collisions built on the fly vs collisions stored in memory - ! - use pars, ONLY:cZERO,SP - use R_lattice, ONLY:bz_samp,qindx_S - use collision_ext, ONLY:COLL_bands -! use collision, ONLY:Fock_collisions,SEX_collisions,nFock_collisions,nSEX_collisions - use QP_m, ONLY:QP_table,QP_nk,QP_n_states - use com, ONLY:msg - ! - implicit none - ! - type(bz_samp), intent(in) :: k,q - ! - integer :: i_kmq,i_qp,ib,ibp - integer :: ic1,ic2 - complex(SP) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) - complex(SP) :: COLL_OSCLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) - ! - real(SP) :: max_diff,diff - ! - call msg('s','* * * * Collisions Test * * * * ') - ! - max_diff=0._SP - ! - do i_qp=1,QP_n_states - ! - COLL=cZERO - ! - call Build_LSEX_collisions(k,q,i_qp,COLL_OSCLL) - ! - ic1=1 - ic2=1 - ! - do i_kmq=1,QP_nk - ! - do ibp=COLL_bands(1),COLL_bands(2) - do ib=COLL_bands(1),COLL_bands(2) -! if (nFock_collisions>0) then -! if (Fock_collisions(i_qp)%table(ib,ibp,i_kmq)/=0) then -! COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+Fock_collisions(i_qp)%v_c(ic1) -!! ic1=ic1+1 -!! endif -! endif -!!! if (nSEX_collisions>0) then -! if (SEX_collisions(i_qp)%table(ib,ibp,i_kmq)/=0) then -! COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+SEX_collisions(i_qp)%v_c(ic2) -!! ic2=ic2+1 -!! endif -! endif - ! - diff=abs(COLL(ib,ibp,i_kmq)-COLL_OSCLL(ib,ibp,i_kmq)) - if(max_diff<=diff) max_diff=diff - ! - enddo - enddo - ! - enddo - ! - enddo - ! - call msg('sr','Max error in collisions : ',max_diff) - ! -end subroutine NL_test_collisions From fdbd5637cea3abcffc5d2d2e07859e0043f4e3ed Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 12 Jul 2022 15:07:49 +0200 Subject: [PATCH 0363/1367] Version 5.1.0, Revision 21636, Hash 697132abc MODIFIED * include/driver/version.h collisions/.objects Bugs: -Fixed objects Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/collisions/.objects | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 264b95d5a0..8c3e6ad572 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21635 -#define YAMBO_HASH "ccc8167c4" +#define YAMBO_REVISION 21636 +#define YAMBO_HASH "697132abc" diff --git a/src/collisions/.objects b/src/collisions/.objects index fdee9a00a0..6cc99e576f 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -14,10 +14,9 @@ RT_objs = COLLISIONS_compose_rt.o #if defined _NL NL_objs = COLLISIONS_compose_nl.o #endif -LSEX_objs = Build_LSEX_collisions.o LSEX_potential.o OSCLL_eval.o OSCLL_load.o objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ PLASMA_build_up.o PLASMA_tables_and_dimensions.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o \ - $(LSEX_objs) $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) + $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) From 9dd1b5c7c021debd754d095bf7493976abfd3e15 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 19 Jul 2022 23:40:26 +0200 Subject: [PATCH 0364/1367] Version 5.1.0, Revision 21619, Hash be059dff2 MODIFIED * include/driver/version.h io/io_NL.F nloptics/NL_driver.F Changes: - [yambo_nl] Restored printing of ndb.NL Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_NL.F | 32 +++++++++++++++++++++----------- src/nloptics/NL_driver.F | 24 ++++++++++-------------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0cae9ddab1..27b6cd9aed 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21618 -#define YAMBO_HASH "5b9ac68d8" +#define YAMBO_REVISION 21619 +#define YAMBO_HASH "be059dff2" diff --git a/src/io/io_NL.F b/src/io/io_NL.F index e54e30c16b..dca9632faa 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -23,11 +23,11 @@ ! integer function io_NL(what,ID) ! - use pars, ONLY:schlen + use pars, ONLY:SP,schlen use units, ONLY:HA2EV, AU2KWCMm2, AUT2FS use nl_optics, ONLY:E_tot_t,E_ext_t,E_ks_t,NL_P_t, & -& n_frequencies - use real_time, ONLY:NE_steps +& n_frequencies,l_pump_and_probe + use real_time, ONLY:NE_steps,RT_step use RT_control, ONLY:OBS_RT_IO_t use fields, ONLY:Efield use IO_m, ONLY:io_sec,read_is_on,write_is_on,io_extension @@ -49,7 +49,8 @@ integer function io_NL(what,ID) ! integer :: i_fragment,ID_frag character(schlen) :: VAR_name - integer :: i_Prb + integer :: i_Prb,i_time,N_IO,last_point_IO + real(SP) :: Time_IO(NE_steps) ! #if defined _TIMING call timing('io_NL',OPR='start') @@ -74,18 +75,27 @@ integer function io_NL(what,ID) ! Time variable (just for compatibility reasons) ! if(write_is_on(ID)) then - OBS_RT_IO_t%N =NE_steps - OBS_RT_IO_t%last_point=NE_steps + N_IO =NE_steps + last_point_IO=NE_steps + do i_time=1,NE_steps + Time_IO(i_time)=real(i_time-1,SP)*RT_step + enddo endif ! call io_elemental(ID,VAR="IO_TIME_N_points",VAR_SZ=1,MENU=0) - call io_elemental(ID,I0=OBS_RT_IO_t%N) + call io_elemental(ID,I0=N_IO) call io_elemental(ID,VAR="IO_TIME_LAST_POINT",VAR_SZ=1,MENU=0) - call io_elemental(ID,I0=OBS_RT_IO_t%last_point) + call io_elemental(ID,I0=last_point_IO) call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - if(read_is_on(ID).and..not.allocated(OBS_RT_IO_t%Time)) allocate(OBS_RT_IO_t%Time(NE_steps)) - call io_bulk(ID,VAR="IO_TIME_points",VAR_SZ=(/OBS_RT_IO_t%N/)) - call io_bulk(ID,R1=OBS_RT_IO_t%Time) + call io_bulk(ID,VAR="IO_TIME_points",VAR_SZ=(/N_IO/)) + call io_bulk(ID,R1=Time_IO) + ! + if(read_is_on(ID)) then + OBS_RT_IO_t%N =N_IO + OBS_RT_IO_t%last_point=last_point_IO + if(.not.allocated(OBS_RT_IO_t%Time)) allocate(OBS_RT_IO_t%Time(NE_steps)) + OBS_RT_IO_t%Time=Time_IO + endif ! if (io_NL/=0) goto 1 ! diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 0501ac5176..95a53748d4 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -201,13 +201,11 @@ subroutine NL_driver(E,X,k,q,Dip) ! call RT_output_and_IO_driver('open',E,k,OBSERVABLES) ! - else + endif ! ! Initialize IO ! ================== call NL_databases_IO(0,'write') - ! - endif ! ! Start-Up & Timing !=================== @@ -270,17 +268,15 @@ subroutine NL_driver(E,X,k,q,Dip) !===================== call RT_output_and_IO_driver('write',E,k,OBSERVABLES) ! - else - ! - ! Store Variables - ! - NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) - E_ext_t(NE_i_time,:)=E_ext - E_tot_t(NE_i_time,:)=E_tot - E_ks_t (NE_i_time,:)=E_ks - ! endif ! + ! Store Variables + ! + NL_P_t (NE_i_time,:)=real(NL_P(1:3),SP) + E_ext_t(NE_i_time,:)=E_ext + E_tot_t(NE_i_time,:)=E_tot + E_ks_t (NE_i_time,:)=E_ks + ! call NL_output(NE_i_time,i_f) ! call NL_Integrator(E,k,q,X(1),Integrator,NE_i_time,V_bands) @@ -293,10 +289,10 @@ subroutine NL_driver(E,X,k,q,Dip) ! if (l_pump_and_probe) then call RT_output_and_IO_driver('close',E,k,OBSERVABLES) - else - call NL_databases_IO(i_f,'write') endif ! + call NL_databases_IO(i_f,'write') + ! if(stop_now(.false.)) exit ! enddo From f9cebb56763b97d8c2d6ec7ae8e5538937eda271 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Jul 2022 11:33:10 +0200 Subject: [PATCH 0365/1367] Version 5.1.0, Revision 21616, Hash ede5d863d MODIFIED * include/driver/version.h collisions/COLLISIONS_linearize_and_IO.F Changes: - [yambo_rt/yambo_nl] If collisions are not written to disk, there is no need to store in memory values which are neglected Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/collisions/COLLISIONS_linearize_and_IO.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index bfde003290..dd8a44db72 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21616 -#define YAMBO_HASH "75e827f67" +#define YAMBO_REVISION 21617 +#define YAMBO_HASH "ede5d863d" diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index 208530ea98..b1174173fa 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -100,7 +100,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C store_it=abs(COLL_element(1)%v3_c(i1,i2,i3))>=COLLISIONS_max*COLLISIONS_cutoff .or. COLLISIONS_cutoff<0.0 endif #if defined _PAR_IO - if (.not.store_it) then + if ((.not.store_it).and.io_COLLs) then COLL_element(1)%v3_c(i1,i2,i3)=cZERO store_it=.true. endif From ddb4c315d3ce26a3bac6966db69d91a01f2b7277 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Jul 2022 17:31:36 +0200 Subject: [PATCH 0366/1367] Version 5.1.0, Revision 21617, Hash f9cebb567 MODIFIED * include/driver/version.h bse/K_restart.F bse/K_stored_in_a_big_matrix.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F io/io_BSS_diago.F io_parallel/io_BS_PAR_block.F io_parallel/io_COLLISIONS.F modules/mod_BS.F modules/mod_BS_solvers.F Changes: - [yambo_rt/yambo_nl] Implementation of collisions loaded from BSE kernel almost ready Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K_restart.F | 6 +- src/bse/K_stored_in_a_big_matrix.F | 4 +- src/collisions/COLLISIONS_HXC.F | 223 ++++++++++++++++++++--------- src/collisions/COLLISIONS_eval.F | 108 +++++++++++++- src/io/io_BSS_diago.F | 6 +- src/io_parallel/io_BS_PAR_block.F | 2 +- src/io_parallel/io_COLLISIONS.F | 4 +- src/modules/mod_BS.F | 28 ++-- src/modules/mod_BS_solvers.F | 1 + 10 files changed, 291 insertions(+), 95 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index dd8a44db72..2479c957af 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21617 -#define YAMBO_HASH "ede5d863d" +#define YAMBO_REVISION 21618 +#define YAMBO_HASH "f9cebb567" diff --git a/src/bse/K_restart.F b/src/bse/K_restart.F index 1956db12fc..03bf6d8521 100644 --- a/src/bse/K_restart.F +++ b/src/bse/K_restart.F @@ -27,7 +27,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) use LIVE_t, ONLY:live_timing use com, ONLY:msg use X_m, ONLY:X_t - use drivers, ONLY:l_bs_fxc,l_bss + use drivers, ONLY:l_bs_fxc,l_bss,l_eval_collisions use BS, ONLY:l_BSE_restart,l_BSE_kernel_complete,& & BS_K_cutoff,BS_K_cutoff_done,n_BS_blks use IO_int, ONLY:io_control @@ -95,7 +95,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) enddo endif ! - if(l_BSE_kernel_complete.and.l_bss.and.io_BS_err==0) then + if(l_BSE_kernel_complete.and.(l_bss.or.l_eval_collisions).and.io_BS_err==0) then if(trim(IO_mode)=="full") then timing_string="Loading full BSE kernel" ID_now=ID @@ -167,7 +167,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1/),ID=ID) io_BS_err=io_BS(iq,X,ID) ! - if (io_BS_err==0.and.l_bss) then + if (io_BS_err==0.and.(l_bss.or.l_eval_collisions)) then if(n_BS_blks>0) call live_timing("Loading BSE kernel",n_BS_blks) call io_control(ACTION=OP_RD,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID) io_BS_err=io_BS(iq,X,ID) diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 1c05947fd7..2f9a255856 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -103,7 +103,7 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) endif case("C") BS_mat(H_pos(1) ,H_pos(2)+BS_K_dim(1))= Mij - ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-HErmitian + ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1) )=-conjg(Mij) if (l_BS_ares_from_res) then ! The coupling block and the anti-coupling block are symmetric @@ -121,7 +121,7 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) endif case("Q") BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )= Mij - ! Coupling from anti-coupling: the whole BSE matrix is Pseudo-HErmitian + ! Coupling from anti-coupling: the whole BSE matrix is Pseudo-Hermitian BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))=-conjg(Mij) end select ! diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 78c9778741..dded31229d 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) +subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) ! ! HXC collisions ! @@ -29,7 +29,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) use pars, ONLY:SP,pi,cZERO use com, ONLY:msg use frequency, ONLY:w_samp - use electrons, ONLY:levels,spin_occ,spin,n_spin + use electrons, ONLY:levels,spin_occ,spin,n_spin,n_full_bands,n_met_bands use LIVE_t, ONLY:live_timing use hamiltonian, ONLY:H_potential use D_lattice, ONLY:DL_vol,sop_inv @@ -42,7 +42,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_HXC_local,COLLISIONS_HXC_MB,& & COLL_bands,HXC_COLL_element,HXC_collisions,COH_COLL_element,COH_collisions,& -& COLLISIONS_HXC_use_TDDFT,LAST_COLL_sync,PAR_COLL_min +& COLLISIONS_HXC_use_TDDFT,LAST_COLL_sync,PAR_COLL_min,COLLISIONS_CV_only use timing_m, ONLY:timing use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc use IO_int, ONLY:io_control,IO_and_Messaging_switch @@ -60,6 +60,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) type(bz_samp) ::k,q,Xk type(X_t) ::X type(w_samp) ::Xw + integer, intent(in) ::IO_BS_err ! ! Work Space ! @@ -98,7 +99,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) call k_build_up_BZ_tables(q) call k_expand(k) ! - if (l_compute_screening) then + if (l_compute_screening.and.IO_BS_err/=0) then ! ! Plasmon-Pole/Static interaction DB I/O ! @@ -143,75 +144,83 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) bands_to_load(2)=max(COLL_bands(2),maxval(E%nbm)) endif ! - if (WF_buffered_IO) call WF_load(WF_buffer,0,1,bands_to_load,(/1,k%nibz/),space='B',title='-BUFFER') - ! - call WF_load(WF,NG_max,iGo_max,bands_to_load,(/1,k%nibz/),title='-'//trim(H_potential)//' Collisions') - ! - if (COLLISIONS_HXC_local) then - ! - iscp_H%qs =1 - iscp_H%iqref=0 - iscp_H%ngrho=N_g_vecs_H - ! - isc_H%qs =1 - isc_H%iqref =0 - isc_H%ngrho =N_g_vecs_H + if (IO_BS_err/=0) then ! - call elemental_collision_alloc(isc_H ,NG=N_g_vecs_H,NG_GAMP=(/N_g_vecs_H, 1 /),TITLE='HARTREE') - call elemental_collision_alloc(iscp_H,NG=N_g_vecs_H, TITLE='HARTREE') + if (WF_buffered_IO) call WF_load(WF_buffer,0,1,bands_to_load,(/1,k%nibz/),space='B',title='-BUFFER') + call WF_load(WF,NG_max,iGo_max,bands_to_load,(/1,k%nibz/),title='-'//trim(H_potential)//' Collisions') ! - YAMBO_ALLOC(rhotw_tmp,(N_g_vecs_H)) + if (COLLISIONS_HXC_local) then + ! + iscp_H%qs =1 + iscp_H%iqref=0 + iscp_H%ngrho=N_g_vecs_H + ! + isc_H%qs =1 + isc_H%iqref =0 + isc_H%ngrho =N_g_vecs_H + ! + call elemental_collision_alloc(isc_H ,NG=N_g_vecs_H,NG_GAMP=(/N_g_vecs_H, 1 /),TITLE='HARTREE') + call elemental_collision_alloc(iscp_H,NG=N_g_vecs_H, TITLE='HARTREE') + ! + YAMBO_ALLOC(rhotw_tmp,(N_g_vecs_H)) + ! + endif ! - endif - ! - iscp_XC%qs =1 - iscp_XC%iqref=0 - iscp_XC%ngrho=NG_XC - ! - isc_XC%qs =1 - isc_XC%iqref =0 - isc_XC%ngrho =NG_XC - ! - call elemental_collision_alloc(iscp_XC,NG=NG_XC,NG_GAMP=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) - ! - if (l_compute_screening) then + iscp_XC%qs =1 + iscp_XC%iqref=0 + iscp_XC%ngrho=NG_XC ! - ! Test the spatial Inversion - ! - call WF_spatial_inversion(E,Xk) + isc_XC%qs =1 + isc_XC%iqref =0 + isc_XC%ngrho =NG_XC ! - ! Allocation (EM1S can be bigger than N_g_vecs_C) + call elemental_collision_alloc(iscp_XC,NG=NG_XC,NG_GAMP=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) ! - call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) - YAMBO_ALLOC(EM1s,(N_g_vecs_C,N_g_vecs_C)) + if (l_compute_screening) then + ! + ! Test the spatial Inversion + ! + call WF_spatial_inversion(E,Xk) + ! + ! Allocation (EM1S can be bigger than N_g_vecs_C) + ! + call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) + YAMBO_ALLOC(EM1s,(N_g_vecs_C,N_g_vecs_C)) + ! + call elemental_collision_alloc(isc_XC, NG=NG_XC,NG_GAMP=(/N_g_vecs_C,N_g_vecs_C/),TITLE=trim(H_potential)) + ! + else + ! + call elemental_collision_alloc(isc_XC, NG=NG_XC, TITLE=trim(H_potential)) + ! + endif ! - call elemental_collision_alloc(isc_XC, NG=NG_XC,NG_GAMP=(/N_g_vecs_C,N_g_vecs_C/),TITLE=trim(H_potential)) + Co=1._SP + if (COLLISIONS_HXC_use_TDDFT) then + Co=4._SP*pi/DL_vol/real(q%nbz,SP) + YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP + if(n_spin>1) then + YAMBO_ALLOC(magn,(fft_size,3)) + endif + call XC_potential_driver(E,K,WF_kind,WF_xc_functional,2) + YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) + call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) + YAMBO_FREE(F_xc) + YAMBO_FREE(V_xc) + if(n_spin>1) then + YAMBO_FREE(magn) + endif + endif ! else ! - call elemental_collision_alloc(isc_XC, NG=NG_XC, TITLE=trim(H_potential)) + call k_build_up_BZ_tables(Xk) + ! to add here or somewhere else checks on the consistency of the parameters ... ! endif ! - Co=1._SP - if (COLLISIONS_HXC_use_TDDFT) then - Co=4._SP*pi/DL_vol/real(q%nbz,SP) - YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - YAMBO_ALLOC(V_xc,(fft_size,n_spin)) - V_xc=0._SP - if(n_spin>1) then - YAMBO_ALLOC(magn,(fft_size,3)) - endif - call XC_potential_driver(E,K,WF_kind,WF_xc_functional,2) - YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) - call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) - YAMBO_FREE(F_xc) - YAMBO_FREE(V_xc) - if(n_spin>1) then - YAMBO_FREE(magn) - endif - endif - ! n_colls=max(HXC_collisions%N,COH_collisions%N) ! ! Parallel Indexes & LIVE-TIMING STEPS @@ -317,11 +326,15 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! ! HARTREE collisions ! - if ( COLLISIONS_HXC_local ) call compute_loc_HXC_collisions() - ! - ! XC collisions within MBPT - ! - if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions() + if (IO_BS_err==0) then + ! HXC collisions from BSE kernel + call map_BSE_to_HXC_collisions() + else + ! Hartree collisions + if ( COLLISIONS_HXC_local ) call compute_Hartree_collisions() + ! XC collisions within MBPT + if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions() + endif ! if(l_HXC_collisions) then call PP_redux_wait(HXC_COLL_element(1)%v3_c,COMM=LOCAL_COMM(1)) @@ -371,7 +384,75 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! contains ! - subroutine compute_loc_HXC_collisions() + subroutine map_BSE_to_HXC_collisions() + ! + ! Yambo uses the BSE matrix with the square root of the occupations + ! The real time collisions must be constructed with the standard form + ! This requires a cI factor in the coupling terms + ! + use electrons, ONLY:spin_occ + use pars, ONLY:cI + use BS, ONLY:BS_blk,BS_K_dim + use BS_solvers, ONLY:BSS_eh_table_m1 + ! + complex(SP) :: M_ij + integer :: i_BSE,j_BSE + ! + do i_p=1,Xk%nibz + do i_mp=COLL_bands(1),COLL_bands(2) + do i_np=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle + ! + i_BSE=BSS_eh_table_m1(Xk%k_table(i_k,1),i_m,i_n,i_sp,i_sp) + j_BSE=BSS_eh_table_m1(Xk%k_table(i_p,1),i_mp,i_np,i_sp,i_sp) + ! + if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then + ! + ! Resonant block + if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1) + ! Resonant is hermitian + if(j_BSE< i_BSE) M_ij= conjg(BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1)) + ! + else if(i_BSE<=BS_K_dim(1) .and. j_BSE>BS_K_dim(1)) then + ! + ! Coupling block + j_BSE=j_BSE-BS_K_dim(1) + if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1)*cI + ! Coupling is symmetric + if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1)*cI + ! + else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then + ! + ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian + i_BSE=i_BSE-BS_K_dim(1) + if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*cI + ! anti-Coupling is symmetric + if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*cI + ! + else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then + ! + ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian + i_BSE=i_BSE-BS_K_dim(1) + j_BSE=j_BSE-BS_K_dim(1) + if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1)) + ! anti-resonant is hermitian + if(j_BSE< i_BSE) M_ij= -BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1) + ! + endif + ! + ! The occupation factor here is already contained in the density matrix (?) + ! + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=M_ij/spin_occ + ! + enddo + enddo + enddo + ! + end subroutine map_BSE_to_HXC_collisions + ! + subroutine compute_Hartree_collisions() ! ! Scattering geometry !===================== _ \ _ @@ -408,7 +489,10 @@ subroutine compute_loc_HXC_collisions() if (k%sstar(i_p_bz,2)/=1) cycle ! do i_mp=COLL_bands(1),COLL_bands(2) - do i_np=i_mp,COLL_bands(2) + do i_np=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle ! if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle @@ -496,7 +580,7 @@ subroutine compute_loc_HXC_collisions() ! enddo ! - end subroutine compute_loc_HXC_collisions + end subroutine compute_Hartree_collisions ! subroutine compute_MBPT_XC_collisions() ! @@ -588,6 +672,9 @@ subroutine compute_MBPT_XC_collisions() call scatter_Bamp(iscp_XC) ! do i_np=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle ! ! COLLISIONS(n,n',qp_n_states) = \sum_{G,G',q} ( rho(m,n,G,q,k) x EM1s(G ,G') x rho*(m',n',G',q,k) /|q+G|/|q+G'| ) ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index aaea3ec647..9327b8104f 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -49,10 +49,11 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,& & COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming use X_m, ONLY:X_t + use BS_solvers, ONLY:io_BSS_diago use plasma, ONLY:EH_gas use frequency, ONLY:w_samp use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL_IF_END,VERIFY,REP,io_COLLs,manage_action + use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,io_COLLs,manage_action use parallel_m, ONLY:PAR_IND_G_k,PAR_IND_Bp_mat,PAR_IND_Plasma use parallel_int, ONLY:PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:WF_free @@ -67,9 +68,12 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! ! WorkSpace ! - integer :: ID,IO_err,IO_ACT + logical :: l_collisions_from_bse,l_tmp + integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_tmp character(20) :: PAR_ch,FREE_ch ! + integer, external :: io_BS_header + ! call timing('COLLISIONS_eval',OPR='start') ! call section('*','Extended collisions') @@ -139,9 +143,32 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) if(l_use_Hxc_collisions) call CHECK_and_ALLOC(HXC_collisions) if(l_use_COH_collisions) call CHECK_and_ALLOC(COH_collisions) ! + if (l_use_Hxc_collisions) then + ! + ! Check if I can use the BSE kernel for the collisions + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,ID=ID_tmp) + IO_err_BS=io_BS_header(1,X(2),ID_tmp,"full") + ! + if (IO_err_BS==0) then + call set_BS_blks() + call K_restart(1,X(2),ID_tmp,ID_tmp,ID_tmp,l_tmp) + endif + ! + ! I need the BSS_eh_table + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_tmp) + IO_err_BS=io_BSS_diago(1,1,ID_tmp,X(2)) + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID_tmp) + IO_err_BS=io_BSS_diago(1,1,ID_tmp,X(2)) + call build_inverse_eh_table() + ! + endif + ! if (IO_err/=0) then ! - call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2)) + call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2),IO_err_BS) ! ! COHSEX clean !-------------- @@ -302,6 +329,77 @@ subroutine CHECK_and_ALLOC(COLL) endif endif ! - end subroutine + end subroutine CHECK_and_ALLOC ! -end subroutine +end subroutine COLLISIONS_eval +! +! +subroutine set_BS_blks() + ! + use pars, ONLY:cZERO + use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode + use BS_solvers, ONLY:BSS_eh_table + ! +#include + ! + integer :: i_block + ! + BS_res_ares_n_mat=1 + n_BS_blks=BS_K_dim(1)*2 + n_BS_blks_min=n_BS_blks + ! + allocate(BS_blk(n_BS_blks)) + BS_blk(:)%size(1)=1 + ! + do i_block=1,BS_K_dim(1) + BS_blk(i_block)%size(2)=BS_K_dim(1)-i_block+1 + BS_blk(i_block)%coordinate(:)=i_block + BS_blk(i_block)%mode="R" + enddo + do i_block=BS_K_dim(1)+1,2*BS_K_dim(1) + BS_blk(i_block)%size(2)=2*BS_K_dim(1)-i_block+1 + BS_blk(i_block)%coordinate(:)=i_block-BS_K_dim(1) + BS_blk(i_block)%mode="C" + enddo + ! + do i_block=1,n_BS_blks + YAMBO_ALLOC(BS_blk(i_block)%mat,(BS_blk(i_block)%size(1),BS_blk(i_block)%size(2))) + allocate(BS_blk(i_block)%done(BS_blk(i_block)%size(1),BS_blk(i_block)%size(2))) + BS_blk(i_block)%mat=cZERO + BS_blk(i_block)%done(:,:)="f" + enddo + ! + allocate(BSS_eh_table(n_BS_blks,5)) + ! +end subroutine set_BS_blks +! +! +subroutine build_inverse_eh_table() + ! + use electrons, ONLY:n_sp_pol + use R_lattice, ONLY:nXkbz + use BS, ONLY:BS_bands,BS_K_dim + use BS_solvers, ONLY:BSS_eh_table,BSS_eh_table_m1 + ! + implicit none + ! + integer :: i_H,ik_bz,iv,ic,i_sp_c,i_sp_v + ! + allocate(BSS_eh_table_m1(nXkbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) + !call live_timing('BSE inverse eh-table',BS_H_dim) + do i_H=1,2*BS_K_dim(1) + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + i_sp_c = BSS_eh_table(i_H,4) + i_sp_v = BSS_eh_table(i_H,5) + ! + if (i_H<=BS_K_dim(1)) BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H + if (i_H> BS_K_dim(1)) BSS_eh_table_m1(ik_bz,ic,iv,i_sp_c,i_sp_v)=i_H + !call live_timing(steps=1) + ! + enddo + !call live_timing( ) + ! +end subroutine build_inverse_eh_table diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 321efe5a7e..0dd7db9b6b 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -163,11 +163,13 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! ! BS_eh_table ! - call io_bulk(ID,'BS_TABLE',VAR_SZ=(/BS_K_dim(1),5/)) - call io_bulk(ID,I2=BSS_eh_table(:BS_K_dim(1),:)) + call io_bulk(ID,'BS_TABLE',VAR_SZ=shape(BSS_eh_table)) + call io_bulk(ID,I2=BSS_eh_table) ! ! Eigenstates (resonant only matrix) ! + if ( read_is_on(ID) .and. .not.allocated(BS_mat) ) goto 1 + ! call io_bulk(ID,'BS_EIGENSTATES',VAR_SZ=(/2,BS_H_dim,BSS_n_eig/)) call io_bulk(ID,C2=BS_mat,IPOS=(/1,1,1/)) ! diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index 8749b0d242..6afb1ac37c 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -206,7 +206,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) stat = nf90_sync(io_unit(ID)) call netcdf_call(stat,ID) endif - ! + ! call timing('io_BS',OPR='stop') ! end subroutine diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 9de4351d5a..1c4ba0771b 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -102,9 +102,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) endif endif ! - ! This should be used for restart like in BSE ... - ! if(BS_blk(i_block)%mat(i1,i2)==YAMBO_CMPLX_NO_FILL) cycle - ! BS_blk(i_block)%done(i1,i2)='t' + ! Here I could set it to "t" only when COLL_element%v_c/=0 or COLL_element%v_r/=0 ? if(io3.and.read_is_on(ID)) COLL_element%table='t' ! endif diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 70698f4696..ab63f3f815 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -90,17 +90,27 @@ module BS ! Resonant/Antiresonant handling !================================ ! - ! The BS kernel, in general, is composed of two resonant (K_r,R and K_c,R) and two anti-resonant (K_r,A and K_c,A) - ! blocks. + ! The the "standard" convention for the BSE kernel is + ! + ! | K_R(q) K_C(q) | | K_R(q) K_C(q) | + ! K = | | = | | (1a) + ! | K_Q(q) K_A(q) | | -K_C^\dag(-q) -K_R^\dag(-q) | + ! + ! Here we use the one with the square root of the occupation factors + ! The BS kernel, in general, is composed of resonant K_R, couplnig K_C, anti-resonant K_A and anti-coupling K_Q) blocks. + ! + ! | K_R(q) cI*Kt_C(q) | | K_R(q) cI*Kt_C(q) | + ! Kt = | | = | | (1b) + ! | cI*Kt_Q(q) K_A(q) | | -[cI*Kt_C(-q)]^\dag -K_R^\dag(-q) | + ! + ! with ! - ! | K_r,R(q) cI*K_c,R(q) | - ! K = | | (1) - ! | cI*K_c,A(q) K_r,A^*(q) | ! ! In general we have ! - ! K_c,A(q) = - (K_c,R(-q))^* (2) - ! K_r,A(q) = - (K_r,R(-q))^* (3) + ! K_Q(q) = -K_C(-q)^\dag (2a) + ! Kt_Q(q) = Kt_C(-q)^\dag (2b) [ This means cI*Kt_Q(q) = -[cI*K_C(-q)]^* ] + ! K_A(q) = -K_R(-q)^\dag (3) ! ! But in some cases (2) and (3) do not hold ! @@ -118,8 +128,8 @@ module BS ! ! In addition ! - ! --> no coupling = 2 BSE matrices (K_r,R(q) and K_r,A^*(q)) --> BS_res_ares_n_mat=2 - ! --> coupling = 1 BSE matrix with all 4 blocks in (1) --> BS_res_ares_n_mat=1 + ! --> no coupling = 2 BSE matrices (K_R(q) and K_A^*(q)) --> BS_res_ares_n_mat=2 + ! --> coupling = 1 BSE matrix with all 4 blocks in (1) --> BS_res_ares_n_mat=1 ! ! Summary !========= diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 9c80397c1b..eb941ebdb8 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -140,6 +140,7 @@ module BS_solvers ! Solvers (Temporary (LARGE) arrays to be used in solvers ONLY) !========= integer , allocatable :: BSS_eh_table(:,:) + integer , allocatable :: BSS_eh_table_m1(:,:,:,:,:) real(SP) , allocatable :: BSS_eh_E(:) real(SP) , allocatable :: BSS_eh_f(:) real(SP) , allocatable :: BSS_eh_W(:) From a22580cfdc6ee7d5087fabfdc65dcd3b0389c224 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Jul 2022 22:54:31 +0200 Subject: [PATCH 0367/1367] Version 5.1.0, Revision 21618, Hash ddb4c315d MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F Changes: - [yambo_rt] Collisions constructed loading BSE kernel now work properly Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/collisions/COLLISIONS_HXC.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2479c957af..192519f3ee 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21618 -#define YAMBO_HASH "f9cebb567" +#define YAMBO_REVISION 21619 +#define YAMBO_HASH "ddb4c315d" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index dded31229d..02b82620b4 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -444,7 +444,7 @@ subroutine map_BSE_to_HXC_collisions() ! ! The occupation factor here is already contained in the density matrix (?) ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=M_ij/spin_occ + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=-M_ij/spin_occ ! enddo enddo @@ -489,7 +489,7 @@ subroutine compute_Hartree_collisions() if (k%sstar(i_p_bz,2)/=1) cycle ! do i_mp=COLL_bands(1),COLL_bands(2) - do i_np=COLL_bands(1),COLL_bands(2) + do i_np=i_mp,COLL_bands(2) ! if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle From 9a9b26e221db81e115b08150a1b0e0b2e4b622f1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 21 Jul 2022 16:23:50 +0200 Subject: [PATCH 0368/1367] Version 5.1.0, Revision 21619, Hash a22580cfd MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F collisions/COLLISIONS_alloc_and_free.F collisions/COLLISIONS_compose_nl.F collisions/COLLISIONS_compose_rt.F collisions/COLLISIONS_compose_sc.F collisions/COLLISIONS_eval.F collisions/COLLISIONS_linearize_and_IO.F io_parallel/io_COLLISIONS.F modules/mod_collision_ext.F parallel/PARALLEL_collisions.F Changes: - [yambo_rt/yambo_nl] Collisions_cv_only further improved (reduced both memory and disk usage) - [yambo_rt/yambo_nl] The extened collisions are divided in two kinds - COLLISIONS_group - COLLISIONS_element In generic procedures sometimes the name COLL was used for the first kind, sometimes for the second I tried to replace as much as possible the generic COLL with COLL_grp or COLL_element Collisions in the modules are instead called HXC_collisions and HXC_COLL_element It would be better to rename HXC_collisions --> HXC_COLL_grp to further improve code readability Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/collisions/COLLISIONS_HXC.F | 2 +- src/collisions/COLLISIONS_alloc_and_free.F | 89 +++++++++++--------- src/collisions/COLLISIONS_compose_nl.F | 8 +- src/collisions/COLLISIONS_compose_rt.F | 7 +- src/collisions/COLLISIONS_compose_sc.F | 4 +- src/collisions/COLLISIONS_eval.F | 32 +++---- src/collisions/COLLISIONS_linearize_and_IO.F | 46 +++++----- src/io_parallel/io_COLLISIONS.F | 42 +++++---- src/modules/mod_collision_ext.F | 2 +- src/parallel/PARALLEL_collisions.F | 42 ++++----- 11 files changed, 154 insertions(+), 124 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 192519f3ee..e403384608 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21619 -#define YAMBO_HASH "ddb4c315d" +#define YAMBO_REVISION 21620 +#define YAMBO_HASH "a22580cfd" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 02b82620b4..7ff291226a 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -319,7 +319,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) i_m = COH_collisions%state(i_coll,2) i_k = COH_collisions%state(i_coll,3) i_sp = COH_collisions%state(i_coll,4) - endif + endif ! if( l_HXC_collisions ) HXC_COLL_element(1)%v3_c=cZERO if( l_use_COH_collisions ) COH_COLL_element(1)%v3_c=cZERO diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 36e10492f4..9ddb0b71bd 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -26,9 +26,10 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use pars, ONLY:cZERO,rZERO use plasma, ONLY:N_plasma_poles_global use R_lattice, ONLY:nqbz,nkibz + use electrons, ONLY:n_met_bands,n_full_bands use parallel_m, ONLY:PAR_nPlasma,PAR_nQ_bz use collision_ext, ONLY:COLLISIONS_element,COH_COLL_element,HXC_COLL_element,GW_NEQ_COLL_element,& -& COLL_bands,& +& COLL_bands,COLLISIONS_CV_only,& & GW_NEQ_collisions,COH_collisions,HXC_collisions,P_collisions,COLLISIONS_group #if defined _QED use QP_m, ONLY:QP_QED_ng @@ -42,7 +43,7 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! ! Work Space ! - integer :: D(3,2),COLL_range(2),J,K,mem_size(5),size_ + integer :: D(3,4),COLL_range(2),J,K,mem_size(5),size_ logical :: l_COH,l_HXC,l_GW_NEQ,l_v3,l_v1,l_table,l_all,l_alloc,& & l_clean,l_collision,l_distribute,l_Momentum,l_complex,l_real ! @@ -84,10 +85,12 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) l_clean =index(actions,"clean")>0 l_distribute=index(actions,"distribute")>0 ! + D=0 + ! if (l_COH) then - D(1,:)=COLL_bands - D(2,:)=COLL_bands - D(3,:)=(/1,nkibz/) + D(1,1:2)=COLL_bands + D(2,1:2)=COLL_bands + D(3,1:2)=(/1,nkibz/) if (l_collision.and.l_alloc) then allocate(COH_COLL_element(size_)) COH_COLL_element%N=size_ @@ -102,9 +105,13 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) endif ! if (l_HXC) then - D(1,:)=COLL_bands - D(2,:)=COLL_bands - D(3,:)=(/1,nkibz/) + D(1,1:2)=COLL_bands + D(2,1:2)=COLL_bands + D(3,1:2)=(/1,nkibz/) + if (COLLISIONS_CV_only) then + D(1:2,3)=maxval(n_met_bands) + D(1:2,4)=minval(n_full_bands) + endif if (l_collision.and.l_alloc) then allocate(HXC_COLL_element(size_)) HXC_COLL_element%N=size_ @@ -121,9 +128,9 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) #if defined _QED ! if (l_Momentum) then - D(1,:)=(/1,QP_QED_ng/) - D(2,:)=COLL_bands - D(3,:)=(/1,nqbz/) + D(1,1:2)=(/1,QP_QED_ng/) + D(2,1:2)=COLL_bands + D(3,1:2)=(/1,nqbz/) if (l_collision.and.l_alloc) then allocate(P_COLL_element(size_)) P_COLL_element%N=size_ @@ -140,12 +147,12 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) #endif ! if (l_GW_NEQ) then - D(1,:)=(/1,N_plasma_poles_global/) - D(2,:)=(/1,1/) - D(3,:)=(/1,nqbz/) + D(1,1:2)=(/1,N_plasma_poles_global/) + D(2,1:2)=(/1,1/) + D(3,1:2)=(/1,nqbz/) if (l_distribute.and.(l_v3.or.l_table)) then - D(1,:)=(/1,PAR_nPlasma/) - D(3,:)=(/1,PAR_nQ_bz/) + D(1,1:2)=(/1,PAR_nPlasma/) + D(3,1:2)=(/1,PAR_nQ_bz/) endif if (l_collision.and.l_alloc) then allocate(GW_NEQ_COLL_element(size_)) @@ -162,9 +169,9 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! contains ! - subroutine local_alloc_and_free(COLL,COLL_grp) + subroutine local_alloc_and_free(COLL_element,COLL_grp) type(COLLISIONS_group) :: COLL_grp - type(COLLISIONS_element) :: COLL(COLL_grp%N) + type(COLLISIONS_element) :: COLL_element(COLL_grp%N) if(COLL_grp%N==0) return mem_size=0 do J=COLL_range(1),COLL_range(2) @@ -173,54 +180,54 @@ subroutine local_alloc_and_free(COLL,COLL_grp) ! allocated. This is because J runs on the parallel components and not on the real ones. ! do K=1,COLL_grp%N - if (COLL_grp%PAR_map(K)==J) COLL(J)%I=K + if (COLL_grp%PAR_map(K)==J) COLL_element(J)%I=K enddo ! if (l_alloc.and.(l_v3.or.l_all)) then if(l_real) then - YAMBO_ALLOC(COLL(J)%v3_r,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - COLL(J)%v3_r=rZERO - mem_size(1)=mem_size(1)+size(COLL(J)%v3_r) + YAMBO_ALLOC(COLL_element(J)%v3_r,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + COLL_element(J)%v3_r=rZERO + mem_size(1)=mem_size(1)+size(COLL_element(J)%v3_r) endif if(l_complex) then - YAMBO_ALLOC(COLL(J)%v3_c,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - COLL(J)%v3_c=cZERO - mem_size(2)=mem_size(2)+size(COLL(J)%v3_c) + YAMBO_ALLOC(COLL_element(J)%v3_c,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + COLL_element(J)%v3_c=cZERO + mem_size(2)=mem_size(2)+size(COLL_element(J)%v3_c) endif COLL_grp%D=D endif if (l_clean.and.(l_v3.or.l_all)) then - if (l_real .and.allocated(COLL(J)%v3_r)) then - YAMBO_FREE(COLL(J)%v3_r) + if (l_real .and.allocated(COLL_element(J)%v3_r)) then + YAMBO_FREE(COLL_element(J)%v3_r) endif - if (l_complex.and.allocated(COLL(J)%v3_c)) then - YAMBO_FREE(COLL(J)%v3_c) + if (l_complex.and.allocated(COLL_element(J)%v3_c)) then + YAMBO_FREE(COLL_element(J)%v3_c) endif endif if (l_alloc.and.(l_v1.or.l_all)) then if(l_real) then - YAMBO_ALLOC(COLL(J)%v_r,(COLL(J)%N)) - COLL(J)%v_r=rZERO - mem_size(3)=mem_size(3)+size(COLL(J)%v_r) + YAMBO_ALLOC(COLL_element(J)%v_r,(COLL_element(J)%N)) + COLL_element(J)%v_r=rZERO + mem_size(3)=mem_size(3)+size(COLL_element(J)%v_r) endif if(l_complex) then - YAMBO_ALLOC(COLL(J)%v_c,(COLL(J)%N)) - COLL(J)%v_c=cZERO - mem_size(4)=mem_size(4)+size(COLL(J)%v_c) + YAMBO_ALLOC(COLL_element(J)%v_c,(COLL_element(J)%N)) + COLL_element(J)%v_c=cZERO + mem_size(4)=mem_size(4)+size(COLL_element(J)%v_c) endif endif if (l_clean.and.(l_v1.or.l_all)) then - YAMBO_FREE(COLL(J)%v_c) - YAMBO_FREE(COLL(J)%v_r) + YAMBO_FREE(COLL_element(J)%v_c) + YAMBO_FREE(COLL_element(J)%v_r) endif if (l_alloc.and.(l_table.or.l_all)) then - YAMBO_ALLOC(COLL(J)%table,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - COLL(J)%table='f' + YAMBO_ALLOC(COLL_element(J)%table,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + COLL_element(J)%table='f' COLL_grp%D=D - mem_size(5)=mem_size(5)+size(COLL(J)%table) + mem_size(5)=mem_size(5)+size(COLL_element(J)%table) endif if (l_clean.and.(l_table.or.l_all)) then - YAMBO_FREE(COLL(J)%table) + YAMBO_FREE(COLL_element(J)%table) endif enddo ! diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 281b3d1c45..a77eefdf10 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -27,9 +27,8 @@ subroutine COLLISIONS_compose_nl(G_in) ! use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree!l_sc_hf,l_sc_cohsex,l_sc_exx - use collision_ext, ONLY:HXC_COLL_element,COLL_bands,& -& HXC_collisions - use electrons, ONLY:spin + use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only + use electrons, ONLY:spin,n_met_bands,n_full_bands use R_lattice, ONLY:nXkibz use parallel_m, ONLY:HEAD_QP_cpu,PAR_COM_Xk_ibz_INDEX use parallel_int, ONLY:PP_redux_wait @@ -73,6 +72,9 @@ subroutine COLLISIONS_compose_nl(G_in) ! do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp> maxval(n_met_bands) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle ! if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") then RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin) & diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 6680c5c87c..040f760c56 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -27,8 +27,8 @@ subroutine COLLISIONS_compose_rt(dG_in) ! use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree - use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions - use electrons, ONLY:spin + use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only + use electrons, ONLY:spin,n_met_bands,n_full_bands use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_COM_Q_INDEX,& @@ -100,6 +100,9 @@ subroutine COLLISIONS_compose_rt(dG_in) ! do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp> maxval(n_met_bands) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle ! if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle ! diff --git a/src/collisions/COLLISIONS_compose_sc.F b/src/collisions/COLLISIONS_compose_sc.F index ad37aa191d..27e75787bc 100644 --- a/src/collisions/COLLISIONS_compose_sc.F +++ b/src/collisions/COLLISIONS_compose_sc.F @@ -29,7 +29,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree use QP_m, ONLY:QP_nk,QP_nb,QP_n_states,QP_Sc,QP_Vnl_xc use collision_ext, ONLY:COH_COLL_element,HXC_COLL_element,COLL_bands,HXC_collisions,& -& COH_collisions,COLLISIONS_have_HARTREE +& COH_collisions,COLLISIONS_have_HARTREE,COLLISIONS_CV_only use parallel_m, ONLY:PAR_IND_QP,HEAD_b_cpu,PAR_IND_G_k use parallel_int, ONLY:PP_redux_wait use timing_m, ONLY:timing @@ -53,6 +53,8 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! if (.not.allocated(QP_Vnl_xc)) allocate(QP_Vnl_xc(QP_n_states)) ! + if (COLLISIONS_CV_only) call error(" cannot use cv only collisions in yambo_sc") + ! l_sex =l_sc_sex.or.l_sc_fock.or.(l_sc_hartree.and.COLLISIONS_have_HARTREE) QP_Vnl_xc=cZERO ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 9327b8104f..fde7096dd0 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -273,7 +273,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! contains ! - subroutine CHECK_and_ALLOC(COLL) + subroutine CHECK_and_ALLOC(COLL_grp) ! #include ! @@ -286,27 +286,27 @@ subroutine CHECK_and_ALLOC(COLL) ! integer :: i_coll ! - type(COLLISIONS_group) :: COLL + type(COLLISIONS_group) :: COLL_grp ! IO_err=-1 ! if (io_COLLs) then - COLL%IO_status=-1 + COLL_grp%IO_status=-1 call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - IO_err=io_COLLs_header(ID,COLL) + IO_err=io_COLLs_header(ID,COLL_grp) #if defined _PAR_IO call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) - io_err=io_COLLISIONS(ID,COLL) + io_err=io_COLLISIONS(ID,COLL_grp) if(io_err==0) then call warning(" Restarting from previous database") - do i_coll=1,COLL%N - IO_ACT=manage_action(RD_CL_IF_END,i_coll,1,COLL%N) + do i_coll=1,COLL_grp%N + IO_ACT=manage_action(RD_CL_IF_END,i_coll,1,COLL_grp%N) call io_control(ACTION=IO_ACT,COM=REP,SEC=(/4/),ID=ID) - io_err=io_COLLISIONS(ID,COLL,i_coll=i_coll) + io_err=io_COLLISIONS(ID,COLL_grp,i_coll=i_coll) enddo endif #endif - if (any(COLL%IO_status/=1)) IO_err=-1 + if (any(COLL_grp%IO_status/=1)) IO_err=-1 endif ! ! In case io_Colls is /=0 all CPU have to sincronize before starting @@ -317,15 +317,15 @@ subroutine CHECK_and_ALLOC(COLL) if (IO_err==0) return ! if (io_COLLs) then - call COLLISIONS_alloc_and_free(trim(COLL%name),"collision","alloc",1) - call COLLISIONS_alloc_and_free(trim(COLL%name),"v3 table","alloc",1) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"collision","alloc",1) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"v3 table","alloc",1) else - call COLLISIONS_alloc_and_free(trim(COLL%name),"collision","alloc",0) - if (COLL%kind==QP_SE_GW_NEQ.or.COLL%kind==QP_SE_GW_QED) then - call COLLISIONS_alloc_and_free(trim(COLL%name),"v3","alloc distribute",0) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"collision","alloc",0) + if (COLL_grp%kind==QP_SE_GW_NEQ.or.COLL_grp%kind==QP_SE_GW_QED) then + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"v3","alloc distribute",0) else - call COLLISIONS_alloc_and_free(trim(COLL%name),"v3","alloc",1) - call COLLISIONS_alloc_and_free(trim(COLL%name),"table","alloc",0) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"v3","alloc",1) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"table","alloc",0) endif endif ! diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index b1174173fa..860d559139 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -21,12 +21,13 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,COLL_ID,COMM) +subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_element,COLL_ID,COMM) ! use pars, ONLY:SP,cZERO use parallel_m, ONLY:master_cpu,yMPI_comm use parallel_int, ONLY:PP_redux_wait - use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_cutoff,COLLISIONS_group + use electrons, ONLY:n_met_bands,n_full_bands + use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_cutoff,COLLISIONS_group,COLLISIONS_CV_only use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_APP_CL,OP_WR_CL,OP_APP,WR,WR_CL,io_COLLs use COLL_interfaces, ONLY:io_COLLISIONS @@ -40,8 +41,8 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C integer, intent(in) :: i_coll,last_coll type(yMPI_comm), intent(in) :: COMM integer, intent(inout) :: COLL_ID - type(COLLISIONS_group), intent(inout) :: COLL - type(COLLISIONS_element), intent(inout) :: COLL_element(COLL%N) + type(COLLISIONS_group), intent(inout) :: COLL_grp + type(COLLISIONS_element), intent(inout) :: COLL_element(COLL_grp%N) ! ! Work Space ! @@ -57,11 +58,11 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C if(io_COLLs) then if(master_cpu) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),ID=COLL_ID) - io_err=io_COLLs_header(COLL_ID,COLL) + io_err=io_COLLs_header(COLL_ID,COLL_grp) endif #if defined _PAR_IO call io_control(ACTION=OP_APP,COM=REP,SEC=(/1,2/),ID=COLL_ID,COMM=COMM,DO_IT=.TRUE.) - io_err=io_COLLISIONS(COLL_ID,COLL,COLL_element=COLL_element(1),i_coll=i_coll) + io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) #endif endif call PP_redux_wait() @@ -76,7 +77,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C l_QED_P = index(what,"Momentum")>0 ! i_ref=1 - if (.not.io_COLLs) i_ref=COLL%PAR_map(i_coll) + if (.not.io_COLLs) i_ref=COLL_grp%PAR_map(i_coll) ! ! Reference value for the reduction of the tiny elements of COHSEX/HF collision ! integrals. @@ -90,9 +91,12 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C ! ic=0 ! - do i3=COLL%D(3,1),COLL%D(3,2) - do i2=COLL%D(2,1),COLL%D(2,2) - do i1=COLL%D(1,1),COLL%D(1,2) + do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik + do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 + do i1=COLL_grp%D(1,1),COLL_grp%D(1,2) ! ib2 + ! + if ( COLLISIONS_CV_only .and. (i1> maxval(n_met_bands) .and. i2> maxval(n_met_bands) ) ) cycle + if ( COLLISIONS_CV_only .and. (i1<=minval(n_full_bands) .and. i2<=minval(n_full_bands)) ) cycle ! ! In the COHSEX/HF case a cutoff can be applied ! @@ -106,15 +110,15 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C endif #endif ! - if (store_it) then - ic=ic+1 - if (i_cycle==2) then - ! - COLL_element(i_ref)%table(i1,i2,i3)='t' - if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3) - if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3) - ! - endif + if (.not.store_it) cycle + ic=ic+1 + ! + if (i_cycle==2) then + ! + COLL_element(i_ref)%table(i1,i2,i3)='t' + if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3) + if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3) + ! endif ! enddo @@ -134,14 +138,14 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C #else call io_control(ACTION=OP_APP_CL,SEC=(/2,3/),ID=COLL_ID) #endif - io_err=io_COLLISIONS(COLL_ID,COLL,COLL_element=COLL_element(1),i_coll=i_coll) + io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) ! call COLLISIONS_alloc_and_free(what,"v1","clean",1) ! #if defined _PAR_IO if(i_coll==last_coll) then call io_control(ACTION=WR_CL,SEC=(/5/),ID=COLL_ID) - io_err=io_COLLISIONS(COLL_ID,COLL,COLL_element=COLL_element(1),i_coll=i_coll) + io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) endif #endif ! diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 1c4ba0771b..ccf36c5520 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -21,11 +21,12 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) +integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) ! use pars, ONLY:schlen,IP,SP use iso_c_binding, ONLY:C_LOC,C_F_POINTER - use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,LAST_COLL_sync,PAR_COLL_min + use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,LAST_COLL_sync,PAR_COLL_min,& +& COLLISIONS_CV_only use IO_m, ONLY:io_sec,io_status,IO_OUTDATED_DB,read_is_on,IO_mode,io_unit,& & VERIFY,io_extension,write_is_on,nf90_sync,netcdf_call use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq,io_fragment, & @@ -40,7 +41,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) #include ! integer, intent(inout) ::ID - type(COLLISIONS_group) ::COLL + type(COLLISIONS_group) ::COLL_grp type(COLLISIONS_element),optional, target :: COLL_element integer, intent(in) ,optional :: i_coll_ ! @@ -49,7 +50,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! character(1) :: TMP_VAR(1) character(schlen) :: db_name - integer :: i_coll,stat + integer :: i_coll,stat,N(3) logical :: def1,def2,io2,io3,io4,file_sync ! call timing('io_COLLISIONS',OPR='start') @@ -60,7 +61,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) if (present(COLL_element)) i_coll=COLL_element%I if (present(i_coll_)) i_coll=i_coll_ ! - call COLLISIONS_dbname(COLL%kind,db_name) + call COLLISIONS_dbname(COLL_grp%kind,db_name) ! io_COLLISIONS=io_connect(desc=trim(db_name),type=2,ID=ID) ! @@ -75,7 +76,18 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! if (def1) then call def_variable_bulk(ID,'N_COLLISIONS_STATES',1,(/1/),IP+100,par_io_kind='independent') - if (write_is_on(ID)) COLL_element%N=(COLL%D(3,2)-COLL%D(3,1)+1)*(COLL%D(2,2)-COLL%D(2,1)+1)*(COLL%D(1,2)-COLL%D(1,1)+1) + if (write_is_on(ID)) then + if (COLLISIONS_CV_only) then + N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk + N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nc + N(3)=COLL_grp%D(2,4)-COLL_grp%D(2,1)+1 ! Nv + else + N(1)=COLL_grp%D(3,2)-COLL_grp%D(3,1)+1 + N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1)+1 + N(3)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 + endif + COLL_element%N=N(1)*N(2)*N(3) + endif endif ! if (io2 .and. (write_is_on(ID).or.read_is_on(ID))) then @@ -84,19 +96,19 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! if (io3.or.def2) then ! - if(COLL%kind==QP_SE_GW_NEQ.or.COLL%kind==QP_SE_GW_QED) then + if(COLL_grp%kind==QP_SE_GW_NEQ.or.COLL_grp%kind==QP_SE_GW_QED) then ! Real collisions - if(def2) call def_variable_bulk(ID,'COLLISIONS_v',2,(/COLL_element%N,COLL%N/),SP,par_io_kind='independent') + if(def2) call def_variable_bulk(ID,'COLLISIONS_v',2,(/COLL_element%N,COLL_grp%N/),SP,par_io_kind='independent') if(io3 ) then - call C_F_POINTER(C_LOC(COLL_element%v_r),tmp_link_real,(/COLL_element%N,1/)) + call C_F_POINTER(C_LOC(COLL_element%v_r(:COLL_element%N)),tmp_link_real,(/COLL_element%N,1/)) call io_variable_bulk(ID,2,R2=tmp_link_real,IPOS=(/1,i_coll/)) nullify(tmp_link_real) endif else ! Complex collisions - if(def2) call def_variable_bulk(ID,'COLLISIONS_v',2,(/2,COLL_element%N,COLL%N/),SP,par_io_kind='independent') + if(def2) call def_variable_bulk(ID,'COLLISIONS_v',2,(/2,COLL_element%N,COLL_grp%N/),SP,par_io_kind='independent') if(io3 ) then - call C_F_POINTER(C_LOC(COLL_element%v_c),tmp_link_complex,(/COLL_element%N,1/)) + call C_F_POINTER(C_LOC(COLL_element%v_c(:COLL_element%N)),tmp_link_complex,(/COLL_element%N,1/)) call io_variable_bulk(ID,2,C2=tmp_link_complex,IPOS=(/1,1,i_coll/)) nullify(tmp_link_complex) endif @@ -107,17 +119,17 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! endif ! - if (def1) call def_variable_bulk(ID,'COLLISIONS_DONE',3,(/COLL%N/),0,par_io_kind='independent') + if (def1) call def_variable_bulk(ID,'COLLISIONS_DONE',3,(/COLL_grp%N/),0,par_io_kind='independent') ! if (io4) then if (write_is_on(ID)) then - COLL%IO_status(i_coll)=1 + COLL_grp%IO_status(i_coll)=1 TMP_VAR="t" endif call io_variable_bulk(ID,3,CH1=TMP_VAR(1:1),IPOS=[i_coll]) if (read_is_on(ID)) then - COLL%IO_status(i_coll)=-1 - if(TMP_VAR(1)=="t") COLL%IO_status(i_coll)=1 + COLL_grp%IO_status(i_coll)=-1 + if(TMP_VAR(1)=="t") COLL_grp%IO_status(i_coll)=1 endif endif ! diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index e57b07a6bb..6a6504428f 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -73,7 +73,7 @@ module collision_ext end type ! type COLLISIONS_group - integer :: D(3,2)=0 ! Dimension (v3 of corresponding COLLISIONS_element) + integer :: D(3,4)=0 ! Dimension (v3 of corresponding COLLISIONS_element) character(schlen) :: name="none" integer :: kind=0 integer :: N=0 ! # of collisions (dimension of linked COLLISIONS_element) diff --git a/src/parallel/PARALLEL_collisions.F b/src/parallel/PARALLEL_collisions.F index d0b0d0c21b..1d7f65f646 100644 --- a/src/parallel/PARALLEL_collisions.F +++ b/src/parallel/PARALLEL_collisions.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine PARALLEL_collisions( k, COLL ) +subroutine PARALLEL_collisions( k, COLL_grp ) ! ! SC !==== @@ -153,31 +153,31 @@ subroutine PARALLEL_collisions( k, COLL ) #include ! type(bz_samp) :: k - type(COLLISIONS_group) :: COLL + type(COLLISIONS_group) :: COLL_grp ! ! Work Space ! integer :: i_coll,i_k,ib1,ib2,NC_tot,i_q,i_p,i_p_bz ! - if ( COLL%N == 0 ) return + if ( COLL_grp%N == 0 ) return ! - YAMBO_ALLOC(COLL%PAR_map,(COLL%N)) - YAMBO_ALLOC(COLL%PAR_IND%element_1D,(COLL%N)) + YAMBO_ALLOC(COLL_grp%PAR_map,(COLL_grp%N)) + YAMBO_ALLOC(COLL_grp%PAR_IND%element_1D,(COLL_grp%N)) ! if (.not.allocated(PAR_IND_G_k%element_1D).and.l_eval_collisions ) then YAMBO_ALLOC(PAR_IND_G_k%element_1D,(k%nibz)) PAR_IND_G_k%element_1D=.FALSE. endif - COLL%PAR_IND%element_1D=.FALSE. - COLL%PAR_N=0 - COLL%PAR_map=0 + COLL_grp%PAR_IND%element_1D=.FALSE. + COLL_grp%PAR_N=0 + COLL_grp%PAR_map=0 NC_tot=0 ! - do i_coll=1,COLL%N + do i_coll=1,COLL_grp%N ! - ib1 = COLL%state(i_coll,1) - ib2 = COLL%state(i_coll,2) - i_k = COLL%state(i_coll,3) + ib1 = COLL_grp%state(i_coll,1) + ib2 = COLL_grp%state(i_coll,2) + i_k = COLL_grp%state(i_coll,3) NC_tot=NC_tot+1 ! if (l_par_RT) then @@ -194,9 +194,9 @@ subroutine PARALLEL_collisions( k, COLL ) if (.not.PAR_IND_QP%element_1D(i_coll)) cycle endif ! - COLL%PAR_N=COLL%PAR_N+1 - COLL%PAR_map(i_coll)=COLL%PAR_N - COLL%PAR_IND%element_1D(i_coll)=.TRUE. + COLL_grp%PAR_N=COLL_grp%PAR_N+1 + COLL_grp%PAR_map(i_coll)=COLL_grp%PAR_N + COLL_grp%PAR_IND%element_1D(i_coll)=.TRUE. ! if (l_eval_collisions) then ! @@ -219,22 +219,22 @@ subroutine PARALLEL_collisions( k, COLL ) ! enddo ! - call PARALLEL_live_message(trim(COLL%name)//" Number of Collisions",LOADED=COLL%PAR_N,TOTAL=NC_tot) + call PARALLEL_live_message(trim(COLL_grp%name)//" Number of Collisions",LOADED=COLL_grp%PAR_N,TOTAL=NC_tot) ! - call PARALLEL_check_phase_space(COLL%PAR_N,MSG=trim(COLL%name)//" COLLISIONS") + call PARALLEL_check_phase_space(COLL_grp%PAR_N,MSG=trim(COLL_grp%name)//" COLLISIONS") ! end subroutine PARALLEL_collisions ! ! -subroutine PARALLEL_collisions_reset(COLL) +subroutine PARALLEL_collisions_reset(COLL_grp) ! use collision_ext, ONLY:COLLISIONS_group ! #include ! - type(COLLISIONS_group), intent(inout) :: COLL + type(COLLISIONS_group), intent(inout) :: COLL_grp ! - YAMBO_FREE(COLL%PAR_map) - YAMBO_FREE(COLL%PAR_IND%element_1D) + YAMBO_FREE(COLL_grp%PAR_map) + YAMBO_FREE(COLL_grp%PAR_IND%element_1D) ! end subroutine PARALLEL_collisions_reset From 6b296cd78186786db8333a7acbf54cc33129ec41 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 22 Jul 2022 12:24:45 +0200 Subject: [PATCH 0369/1367] Version 5.1.0, Revision 21620, Hash 9a9b26e22 MODIFIED * include/driver/version.h bse/K.F bse/K_blocks.F collisions/COLLISIONS_eval.F io/io_BSS_diago.F io_parallel/io_BS_PAR_block.F io_parallel/io_BS_PAR_init.F linear_algebra/MATRIX_slepc.F modules/mod_BS.F Changes: - [yambo] Fixed cI factor in cooupling part of BSE in full mode - [yambo] ndb.BS_PAR now contains also a table which returns ikbz,iv,ic,ispc,ispv indexes from the transitions index - [yambo_rt/yambo_nl] Collisions constructed from BSE now load all relevant variables from the ndb.BS_PAR file (ndb.BS_diago not needed anymore) Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K.F | 7 +++- src/bse/K_blocks.F | 6 ++- src/collisions/COLLISIONS_eval.F | 64 ++++++++++++++----------------- src/io/io_BSS_diago.F | 6 +-- src/io_parallel/io_BS_PAR_block.F | 33 ++++++++++------ src/io_parallel/io_BS_PAR_init.F | 25 ++++++++---- src/linear_algebra/MATRIX_slepc.F | 8 ++-- src/modules/mod_BS.F | 2 + 9 files changed, 87 insertions(+), 68 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e403384608..8742c7cded 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21620 -#define YAMBO_HASH "a22580cfd" +#define YAMBO_REVISION 21621 +#define YAMBO_HASH "9a9b26e22" diff --git a/src/bse/K.F b/src/bse/K.F index 2c7de0d44d..5f1351649b 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -452,7 +452,8 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& - & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + ! if (H_pos(1)>H_pos(2)) cycle ! i_k_bz = BS_T_grp(i_Tgrp_k)%table(i_Tk,1) @@ -613,10 +614,12 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) sqrt_f_itp=sqrt(cmplx(BS_T_grp(i_Tgrp_p)%f(i_Tp),kind=SP)) ! BS_blk(i_block)%mat(i_Tk,i_Tp)=sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp - if (BS_blk(i_block)%mode=="C") BS_blk(i_block)%mat(i_Tk,i_Tp)= cI*BS_blk(i_block)%mat(i_Tk,i_Tp) + if (mode_now=="C") BS_blk(i_block)%mat(i_Tk,i_Tp)= cI*BS_blk(i_block)%mat(i_Tk,i_Tp) ! BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! + if (H_pos(1)==H_pos(2)) BS_blk(i_block)%table(:,i_Tk)=(/i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v/) + ! enddo ! i_Tk enddo ! i_Tp #if defined _OPENMP && ! defined _CUDA diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index 3878c99e9d..9235a0e2d9 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -149,7 +149,11 @@ subroutine K_blocks( ) YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) BS_blk(iB)%mat=cZERO - bs_blk(iB)%done(:,:)="f" + bs_blk(iB)%done="f" + if (BS_blk(iB)%coordinate(1)==BS_blk(iB)%coordinate(2)) then + allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) + bs_blk(iB)%table=0 + endif enddo ! ! Live Timing Blocks diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index fde7096dd0..be162c9ec5 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -49,7 +49,6 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,& & COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming use X_m, ONLY:X_t - use BS_solvers, ONLY:io_BSS_diago use plasma, ONLY:EH_gas use frequency, ONLY:w_samp use IO_int, ONLY:io_control @@ -153,17 +152,9 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) if (IO_err_BS==0) then call set_BS_blks() call K_restart(1,X(2),ID_tmp,ID_tmp,ID_tmp,l_tmp) + call build_inverse_eh_table() endif ! - ! I need the BSS_eh_table - ! - call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID_tmp) - IO_err_BS=io_BSS_diago(1,1,ID_tmp,X(2)) - ! - call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID_tmp) - IO_err_BS=io_BSS_diago(1,1,ID_tmp,X(2)) - call build_inverse_eh_table() - ! endif ! if (IO_err/=0) then @@ -338,11 +329,10 @@ subroutine set_BS_blks() ! use pars, ONLY:cZERO use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode - use BS_solvers, ONLY:BSS_eh_table ! #include ! - integer :: i_block + integer :: iB ! BS_res_ares_n_mat=1 n_BS_blks=BS_K_dim(1)*2 @@ -351,26 +341,28 @@ subroutine set_BS_blks() allocate(BS_blk(n_BS_blks)) BS_blk(:)%size(1)=1 ! - do i_block=1,BS_K_dim(1) - BS_blk(i_block)%size(2)=BS_K_dim(1)-i_block+1 - BS_blk(i_block)%coordinate(:)=i_block - BS_blk(i_block)%mode="R" + do iB=1,BS_K_dim(1) + BS_blk(iB)%size(2)=BS_K_dim(1)-iB+1 + BS_blk(iB)%coordinate(:)=iB + BS_blk(iB)%mode="R" enddo - do i_block=BS_K_dim(1)+1,2*BS_K_dim(1) - BS_blk(i_block)%size(2)=2*BS_K_dim(1)-i_block+1 - BS_blk(i_block)%coordinate(:)=i_block-BS_K_dim(1) - BS_blk(i_block)%mode="C" + do iB=BS_K_dim(1)+1,2*BS_K_dim(1) + BS_blk(iB)%size(2)=2*BS_K_dim(1)-iB+1 + BS_blk(iB)%coordinate(:)=iB-BS_K_dim(1) + BS_blk(iB)%mode="C" enddo ! - do i_block=1,n_BS_blks - YAMBO_ALLOC(BS_blk(i_block)%mat,(BS_blk(i_block)%size(1),BS_blk(i_block)%size(2))) - allocate(BS_blk(i_block)%done(BS_blk(i_block)%size(1),BS_blk(i_block)%size(2))) - BS_blk(i_block)%mat=cZERO - BS_blk(i_block)%done(:,:)="f" + do iB=1,n_BS_blks + YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + BS_blk(iB)%mat=cZERO + BS_blk(iB)%done(:,:)="f" + if (BS_blk(iB)%coordinate(1)==BS_blk(iB)%coordinate(2)) then + allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) + bs_blk(iB)%table=0 + endif enddo ! - allocate(BSS_eh_table(n_BS_blks,5)) - ! end subroutine set_BS_blks ! ! @@ -378,8 +370,8 @@ subroutine build_inverse_eh_table() ! use electrons, ONLY:n_sp_pol use R_lattice, ONLY:nXkbz - use BS, ONLY:BS_bands,BS_K_dim - use BS_solvers, ONLY:BSS_eh_table,BSS_eh_table_m1 + use BS, ONLY:BS_bands,BS_K_dim,BS_blk + use BS_solvers, ONLY:BSS_eh_table_m1 ! implicit none ! @@ -387,16 +379,16 @@ subroutine build_inverse_eh_table() ! allocate(BSS_eh_table_m1(nXkbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) !call live_timing('BSE inverse eh-table',BS_H_dim) + do i_H=1,2*BS_K_dim(1) ! - ik_bz = BSS_eh_table(i_H,1) - iv = BSS_eh_table(i_H,2) - ic = BSS_eh_table(i_H,3) - i_sp_c = BSS_eh_table(i_H,4) - i_sp_v = BSS_eh_table(i_H,5) + ik_bz = BS_blk(i_H)%table(1,1) + iv = BS_blk(i_H)%table(2,1) + ic = BS_blk(i_H)%table(3,1) + i_sp_c = BS_blk(i_H)%table(4,1) + i_sp_v = BS_blk(i_H)%table(5,1) ! - if (i_H<=BS_K_dim(1)) BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H - if (i_H> BS_K_dim(1)) BSS_eh_table_m1(ik_bz,ic,iv,i_sp_c,i_sp_v)=i_H + BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H !call live_timing(steps=1) ! enddo diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 0dd7db9b6b..321efe5a7e 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -163,13 +163,11 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! ! BS_eh_table ! - call io_bulk(ID,'BS_TABLE',VAR_SZ=shape(BSS_eh_table)) - call io_bulk(ID,I2=BSS_eh_table) + call io_bulk(ID,'BS_TABLE',VAR_SZ=(/BS_K_dim(1),5/)) + call io_bulk(ID,I2=BSS_eh_table(:BS_K_dim(1),:)) ! ! Eigenstates (resonant only matrix) ! - if ( read_is_on(ID) .and. .not.allocated(BS_mat) ) goto 1 - ! call io_bulk(ID,'BS_EIGENSTATES',VAR_SZ=(/2,BS_H_dim,BSS_n_eig/)) call io_bulk(ID,C2=BS_mat,IPOS=(/1,1,1/)) ! diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index 6afb1ac37c..af28d6994b 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -29,9 +29,10 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! For each block only the upper triangular part is written ! Each block has a status variables indicating if the matrix element was already calculated ! - use pars, ONLY:IP,IPL,SP,schlen + use pars, ONLY:IP,IPL,SP,schlen,max_io_vars_open + use iso_c_binding, ONLY:C_LOC,C_F_POINTER use stderr, ONLY:STRING_remove - use BS, ONLY:BS_blk,BSK_IO_mode,MAX_BSK_LIN_size,n_BS_blks_min + use BS, ONLY:BS_blk,BSK_IO_mode,MAX_BSK_LIN_size,n_BS_blks_min,BS_K_dim use timing_m, ONLY:timing use IO_m, ONLY:io_unit,netcdf_call,nf90_sync,& & write_is_on,read_is_on,io_BS_K,YAMBO_CMPLX_NO_FILL @@ -45,9 +46,12 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! ! Work Space ! + integer, parameter :: n_max_tot_vars=6 ! see io_BS_PAR_init + ! character(schlen) :: BSK_IO_local logical :: lwrite(3),file_sync - integer :: x1,x2,VAR_IDs(2),stat,ID_now(2) + integer, pointer :: tmp_link(:,:) + integer :: x1,x2,VAR_IDs(2),ID_table,stat,ID_now(2) integer :: n2,i1,i2,idx1,idx2,imax,i_rep(2),ilast integer(IPL) :: idx ! @@ -59,6 +63,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! ! Get the type of block that we want to write ! + ID_table=max_io_vars_open select case(BS_blk(i_block)%mode) case("R") VAR_IDs=(/1,2/) @@ -132,8 +137,8 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! if(idx1+int(imax,IPL)-1<=MAX_BSK_LIN_size) then ! Block is all in one variable - ID_now(1)=VAR_IDs(2)+(i_rep(1)-1)*8 - ID_now(2)=VAR_IDs(1)+(i_rep(1)-1)*8 + ID_now(1)=VAR_IDs(2)+(i_rep(1)-1)*n_max_tot_vars + ID_now(2)=VAR_IDs(1)+(i_rep(1)-1)*n_max_tot_vars if(lwrite(1)) call io_variable_bulk(ID,ID_now(1), CH1=BS_blk(i_block)%done(:imax,i2), IPOS=[ idx1] ) if(lwrite(2)) call io_variable_bulk(ID,ID_now(2), C1=BS_blk(i_block)%mat(:imax,i2), IPOS=[1,idx1] ) if(lwrite(3)) call io_variable_bulk(ID,ID_now(2), C1=TMP_IO_VAR, IPOS=[1,idx1] ) @@ -141,20 +146,20 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! Block is split ilast=MAX_BSK_LIN_size-idx1+1 if(lwrite(1)) then - ID_now(1)=VAR_IDs(2)+(i_rep(1)-1)*8 - ID_now(2)=VAR_IDs(2)+(i_rep(2)-1)*8 + ID_now(1)=VAR_IDs(2)+(i_rep(1)-1)*n_max_tot_vars + ID_now(2)=VAR_IDs(2)+(i_rep(2)-1)*n_max_tot_vars call io_variable_bulk(ID,ID_now(1), CH1=BS_blk(i_block)%done(:ilast,i2), IPOS=[ idx1] ) call io_variable_bulk(ID,ID_now(2), CH1=BS_blk(i_block)%done(ilast+1:imax,i2), IPOS=[ 1] ) endif if(lwrite(2)) then - ID_now(1)=VAR_IDs(1)+(i_rep(1)-1)*8 - ID_now(2)=VAR_IDs(1)+(i_rep(2)-1)*8 + ID_now(1)=VAR_IDs(1)+(i_rep(1)-1)*n_max_tot_vars + ID_now(2)=VAR_IDs(1)+(i_rep(2)-1)*n_max_tot_vars call io_variable_bulk(ID,ID_now(1), C1=BS_blk(i_block)%mat(:ilast,i2), IPOS=[1,idx1] ) call io_variable_bulk(ID,ID_now(2), C1=BS_blk(i_block)%mat(ilast+1:imax,i2), IPOS=[1, 1] ) endif if(lwrite(3)) then - ID_now(1)=VAR_IDs(1)+(i_rep(1)-1)*8 - ID_now(2)=VAR_IDs(1)+(i_rep(2)-1)*8 + ID_now(1)=VAR_IDs(1)+(i_rep(1)-1)*n_max_tot_vars + ID_now(2)=VAR_IDs(1)+(i_rep(2)-1)*n_max_tot_vars call io_variable_bulk(ID,ID_now(1), C1=TMP_IO_VAR(:ilast), IPOS=[1,idx1] ) call io_variable_bulk(ID,ID_now(2), C1=TMP_IO_VAR(ilast+1:imax), IPOS=[1, 1] ) endif @@ -196,6 +201,12 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) enddo enddo endif + if (x1==x2) then + if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) + call C_F_POINTER(C_LOC(BS_blk(i_block)%table),tmp_link,(/5,BS_blk(i_block)%size(1)/)) + call io_variable_bulk(ID, ID_table, I2=tmp_link, IPOS=(/1,x1/) ) + nullify(tmp_link) + endif ! end select ! diff --git a/src/io_parallel/io_BS_PAR_init.F b/src/io_parallel/io_BS_PAR_init.F index f732184905..02fa06ba08 100644 --- a/src/io_parallel/io_BS_PAR_init.F +++ b/src/io_parallel/io_BS_PAR_init.F @@ -26,7 +26,7 @@ integer function io_BS_PAR_init(iq,ID,mode) use stderr, ONLY:intc,real2ch,STRING_remove use com, ONLY:msg use pars, ONLY:IP,IPL,SP,schlen,lchlen,max_io_vars_open - use BS, ONLY:BS_K_dim,BS_IO_dim,BS_K_coupling,l_BSE_kernel_complete,& + use BS, ONLY:BS_K_dim,BS_H_dim,BS_IO_dim,BS_K_coupling,l_BSE_kernel_complete,& & BSK_IO_mode,MAX_BSK_LIN_size,BS_lin_size_compressed,BS_K_cutoff, & & BS_res_ares_n_mat,l_BS_ares_from_res,BS_n_eh_spaces use IO_m, ONLY:io_BS_K,io_file,write_is_on,read_is_on @@ -39,11 +39,15 @@ integer function io_BS_PAR_init(iq,ID,mode) ! ! Workspace ! - character(schlen) :: db_name,ch_tmp,dim_names(3,3),BSK_IO_local - character(lchlen) :: ch(8,max_io_vars_open) - logical :: def_var, io_var - integer(IPL) :: BS_lin_size - integer :: n_vars, i1,i2, i_rep,i_var, BSK_n_dims,n_replica + integer, parameter :: n_max_vars=3 ! maximum number is 3 modes (R,C,A) + integer, parameter :: n_kind_vars=2 ! mat, done + integer, parameter :: n_max_tot_vars=6 ! maximum number is n_max_vars times 2 kinds + ! + character(schlen) :: db_name,ch_tmp,dim_names(3,n_max_vars),BSK_IO_local + character(lchlen) :: ch(n_max_vars,max_io_vars_open-1) + logical :: def_var, io_var + integer(IPL) :: BS_lin_size + integer :: n_vars,i1,i2,i_rep,i_var, BSK_n_dims,n_replica ! io_BS_PAR_init=-1 ! @@ -161,12 +165,17 @@ integer function io_BS_PAR_init(iq,ID,mode) BS_IO_dim(1,i_var)=BS_IO_dim(2,i_var) endif if(trim(mode)=="full" .or. trim(mode)=="compressed_mat") & -& call def_variable_bulk(ID,trim(ch(i_var,i_rep)), 1+(i_var-1)*2+(i_rep-1)*8,& +& call def_variable_bulk(ID,trim(ch(i_var,i_rep)), 1+(i_var-1)*n_kind_vars+(i_rep-1)*n_max_tot_vars,& & [2,BS_IO_dim(1:BSK_n_dims,i_var)],SP,dim_names(1:BSK_n_dims+1,i_var),par_io_kind='independent') if( trim(mode)=="compressed_head") & -& call def_variable_bulk(ID,trim(ch(i_var,i_rep))//"_DONE",2+(i_var-1)*2+(i_rep-1)*8,& +& call def_variable_bulk(ID,trim(ch(i_var,i_rep))//"_DONE",2+(i_var-1)*n_kind_vars+(i_rep-1)*n_max_tot_vars,& & BS_IO_dim(1:BSK_n_dims,i_var) , 0,dim_names(2:BSK_n_dims+1,i_var),par_io_kind='independent') enddo enddo ! + if(trim(mode)=="full" .or. trim(mode)=="compressed_mat") then + dim_names(1:2,1)=[character(schlen) :: "n_transition_variables","BS_H_dim"] + call def_variable_bulk(ID,"BS_TABLE",max_io_vars_open,[5,BS_H_dim],SP,dim_names(1:2,1),par_io_kind='independent') + endif + ! end function io_BS_PAR_init diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index d1f405d54b..84c442c68d 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -243,10 +243,6 @@ subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cm call msg( 'sr', '[SLEPC] Stopping condition tolerance ', real(tol,SP) ) call msg( 'sr', '[SLEPC] Stopping condition max iterations ', int(maxit) ) - !Set monitor - call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) - ! - ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! Solve the eigensystem ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -258,6 +254,10 @@ subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cm call msg( 'sr', '[SLEPC] Max. subspace size of solver [NCV]', int(ncv) ) call msg( 'sr', '[SLEPC] Max. allowed dim [MPD]', int(mpd) ) + !Set monitor + call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) + ! + ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! Display solution and clean up ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index ab63f3f815..4531ebf033 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -244,6 +244,7 @@ module BS !-------------- complex(SP), allocatable :: mat(:,:) character, allocatable :: done(:,:) + integer, allocatable :: table(:,:) ! ! Oscillators... ! @@ -398,6 +399,7 @@ subroutine BS_blks_free(i_BS_mat) if(.not.allocated(BS_blk(iB)%mat)) cycle YAMBO_FREE(BS_blk(iB)%mat) deallocate(BS_blk(iB)%done) + if(allocated(BS_blk(iB)%table)) deallocate(BS_blk(iB)%table) enddo end subroutine ! From 5f280b7fbeb9136bfbab591f711c38199ac445ca Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 22 Jul 2022 12:32:54 +0200 Subject: [PATCH 0370/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8742c7cded..62d623f02b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21621 -#define YAMBO_HASH "9a9b26e22" +#define YAMBO_REVISION 21664 +#define YAMBO_HASH "dfb9ccc3d" From d7c437a07b28e9a195bd42e4b4e1b8e69b595f87 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 22 Jul 2022 15:04:05 +0200 Subject: [PATCH 0371/1367] Version 5.1.0, Revision 21621, Hash 6b296cd78 MODIFIED * include/driver/version.h bse/K.F bse/K_driver.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F interface/INIT_check_databases.F io/io_BSS_diago.F io_parallel/variables_BS.F io_parallel/variables_BS_more.F io_serial/variables_BS.F modules/mod_BS.F output/K_OUTPUT.F ypp/excitons/excitons_amplitudes.F ypp/excitons/excitons_read.F ypp/excitons/excitons_sort_and_report.F Changes: - [yambo] File ndb.BS_PAR now contains also the k-points. This is used in the collisions run to match the indexes of the k-points Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K.F | 5 ++- src/bse/K_driver.F | 20 ++++++--- src/collisions/COLLISIONS_HXC.F | 12 +++--- src/collisions/COLLISIONS_eval.F | 57 +++++++++++++++++++++---- src/interface/INIT_check_databases.F | 6 +-- src/io/io_BSS_diago.F | 4 +- src/io_parallel/variables_BS.F | 12 ++---- src/io_parallel/variables_BS_more.F | 12 +++++- src/io_serial/variables_BS.F | 4 +- src/modules/mod_BS.F | 4 +- src/output/K_OUTPUT.F | 6 +-- ypp/excitons/excitons_amplitudes.F | 4 +- ypp/excitons/excitons_read.F | 6 +-- ypp/excitons/excitons_sort_and_report.F | 4 +- 15 files changed, 110 insertions(+), 50 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8742c7cded..3ac36e20fd 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21621 -#define YAMBO_HASH "9a9b26e22" +#define YAMBO_REVISION 21622 +#define YAMBO_HASH "6b296cd78" diff --git a/src/bse/K.F b/src/bse/K.F index 5f1351649b..f1a1479f1f 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -618,7 +618,10 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! - if (H_pos(1)==H_pos(2)) BS_blk(i_block)%table(:,i_Tk)=(/i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v/) + if (H_pos(1)==H_pos(2)) then + if (.not.mode_now=="C") BS_blk(i_block)%table(:,i_Tk)=(/i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v/) + if ( mode_now=="C") BS_blk(i_block)%table(:,i_Tk)=(/i_p_bz,i_c_p,i_v_p,i_p_sp_pol_c,i_p_sp_pol_v/) + endif ! enddo ! i_Tk enddo ! i_Tp diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 8a617cd741..309d8add82 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -34,7 +34,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use IO_m, ONLY:OP_RD_CL,REP use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_eels_to_eps,BSS_uses_DbGd use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_cpl_K_corr,& -& BS_Blocks_and_Transitions_free,BSqpts,l_BS_photolum +& BS_Blocks_and_Transitions_free,BS_qpt,BS_kpt_bz,l_BS_photolum use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded use drivers, ONLY:l_rpa_IP,l_bs_fxc,l_bss use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme,PARALLEL_default_mode @@ -59,7 +59,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! I/O ! integer, allocatable :: qindx_B_max_CPU(:) - integer :: io_err,ID + integer :: io_err,ID,ik integer, external :: io_QINDX ! call section('*','Bethe Salpeter Equation driver') @@ -137,9 +137,16 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! endif ! + call k_ibz2bz(Xk,'i',.false.) + YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) + do ik=1,Xk%nbz + BS_kpt_bz(:,ik)=Xk%ptbz(ik,:) + enddo + call k_ibz2bz(Xk,'d',.false.) + ! ! Tranferred momentum !====================== - YAMBO_ALLOC(BSqpts,(3,BS_q(1):BS_q(2))) + YAMBO_ALLOC(BS_qpt,(3,BS_q(1):BS_q(2))) ! do iq=BS_q(1),BS_q(2) ! @@ -147,8 +154,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) !=========================================== call X_OUTPUT_driver("DEF INIT") ! - if (iq==1) BSqpts(:,iq) = BSS_q0 - if (iq/=1) BSqpts(:,iq) = q%pt(iq,:) + if (iq==1) BS_qpt(:,iq) = BSS_q0 + if (iq/=1) BS_qpt(:,iq) = q%pt(iq,:) ! call K_driver_init("loop-init",iq,Ken,Xk) ! @@ -264,7 +271,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) !... Parallel distribution reset call PARALLEL_global_indexes(Ken,Xk,q,"Response_T_space",X=X_oscillators,RESET=.TRUE.) ! - YAMBO_FREE(BSqpts) + YAMBO_FREE(BS_qpt) + YAMBO_FREE(BS_kpt_bz) call qindx_free('B') ! end subroutine diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 7ff291226a..1b7e833678 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -216,7 +216,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) ! else ! - call k_build_up_BZ_tables(Xk) ! to add here or somewhere else checks on the consistency of the parameters ... ! endif @@ -392,11 +391,11 @@ subroutine map_BSE_to_HXC_collisions() ! use electrons, ONLY:spin_occ use pars, ONLY:cI - use BS, ONLY:BS_blk,BS_K_dim + use BS, ONLY:BS_blk,BS_K_dim,BS_K_io_map use BS_solvers, ONLY:BSS_eh_table_m1 ! complex(SP) :: M_ij - integer :: i_BSE,j_BSE + integer :: i_BSE,j_BSE,i_k_bz,i_p_bz ! do i_p=1,Xk%nibz do i_mp=COLL_bands(1),COLL_bands(2) @@ -405,8 +404,11 @@ subroutine map_BSE_to_HXC_collisions() if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle ! - i_BSE=BSS_eh_table_m1(Xk%k_table(i_k,1),i_m,i_n,i_sp,i_sp) - j_BSE=BSS_eh_table_m1(Xk%k_table(i_p,1),i_mp,i_np,i_sp,i_sp) + i_k_bz=BS_K_io_map(k%k_table(i_k,1)) + i_p_bz=BS_K_io_map(k%k_table(i_p,1)) + ! + i_BSE=BSS_eh_table_m1(i_k_bz,i_m,i_n,i_sp,i_sp) + j_BSE=BSS_eh_table_m1(i_p_bz,i_mp,i_np,i_sp,i_sp) ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index be162c9ec5..73e56a77ff 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -150,9 +150,10 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) IO_err_BS=io_BS_header(1,X(2),ID_tmp,"full") ! if (IO_err_BS==0) then - call set_BS_blks() + call set_BS_blks(Xk) call K_restart(1,X(2),ID_tmp,ID_tmp,ID_tmp,l_tmp) - call build_inverse_eh_table() + call build_inverse_BS_eh_table(Xk) + call build_BS_kpt_map(Xk) endif ! endif @@ -325,12 +326,15 @@ end subroutine CHECK_and_ALLOC end subroutine COLLISIONS_eval ! ! -subroutine set_BS_blks() +subroutine set_BS_blks(Xk) ! use pars, ONLY:cZERO - use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode + use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode,BS_kpt_bz + use R_lattice, ONLY:bz_samp ! #include + ! + type(bz_samp), intent(in) :: Xk ! integer :: iB ! @@ -363,21 +367,26 @@ subroutine set_BS_blks() endif enddo ! + YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) + ! end subroutine set_BS_blks ! ! -subroutine build_inverse_eh_table() +subroutine build_inverse_BS_eh_table(Xk) ! use electrons, ONLY:n_sp_pol - use R_lattice, ONLY:nXkbz + use R_lattice, ONLY:bz_samp use BS, ONLY:BS_bands,BS_K_dim,BS_blk use BS_solvers, ONLY:BSS_eh_table_m1 ! implicit none ! + type(bz_samp), intent(in) :: Xk + ! integer :: i_H,ik_bz,iv,ic,i_sp_c,i_sp_v ! - allocate(BSS_eh_table_m1(nXkbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) + allocate(BSS_eh_table_m1(Xk%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) + BSS_eh_table_m1=0 !call live_timing('BSE inverse eh-table',BS_H_dim) do i_H=1,2*BS_K_dim(1) @@ -394,4 +403,36 @@ subroutine build_inverse_eh_table() enddo !call live_timing( ) ! -end subroutine build_inverse_eh_table +end subroutine build_inverse_BS_eh_table +! +! +subroutine build_BS_kpt_map(Xk) + ! + use pars, ONLY:SP + use BS, ONLY:BS_K_io_map,BS_kpt_bz + use R_lattice, ONLY:bz_samp + use vec_operate, ONLY:v_is_zero,rlu_v_is_zero,c2a + use zeros, ONLY:k_rlu_zero + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + ! + integer :: ik1,ik2 + real(SP) :: tmp_kpt(3) + ! + allocate(BS_K_io_map(Xk%nbz)) + BS_K_io_map=0 + ! + call k_ibz2bz(Xk,'i',.false.) + do ik1=1,Xk%nbz + do ik2=1,Xk%nbz + call c2a(v_in=Xk%ptbz(ik1,:)-BS_kpt_bz(:,ik2),v_out=tmp_kpt,mode="ki2a") + if (.not.rlu_v_is_zero(tmp_kpt,zero_=k_rlu_zero)) cycle + BS_K_io_map(ik1)=ik2 + exit + enddo + enddo + call k_ibz2bz(Xk,'d',.false.) + ! +end subroutine build_BS_kpt_map diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index f41219e756..dd491d7c13 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -31,7 +31,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t use frequency, ONLY:w_samp - use BS, ONLY:BS_n_g_exch,BS_n_g_fxc,BS_q,BSqpts + use BS, ONLY:BS_n_g_exch,BS_n_g_fxc,BS_q,BS_qpt use R_lattice, ONLY:ng_closed,nqibz,bz_samp use QP_m, ONLY:QP_t,QP_ng_Sx,QP_ng_Sc,QP_ng_SH,QP_ng_Vxc use wave_func, ONLY:io_WF @@ -240,7 +240,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! ! if (nqibz>0) then - YAMBO_ALLOC(BSqpts,(3,nqibz)) + YAMBO_ALLOC(BS_qpt,(3,nqibz)) do i_io=1,nqibz call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=io_ID) # if defined _PAR_IO @@ -249,7 +249,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I io_BS_err=io_BS(i_io,Xbsk,io_ID) #endif enddo - YAMBO_FREE(BSqpts) + YAMBO_FREE(BS_qpt) else call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=io_ID) # if defined _PAR_IO diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 321efe5a7e..c04b62c7c3 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -26,7 +26,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! use pars, ONLY:SP,schlen,IP use stderr, ONLY:intc - use BS, ONLY:BS_K_dim,BS_H_dim,BSqpts,BS_perturbative_SOC,BS_res_ares_n_mat + use BS, ONLY:BS_K_dim,BS_H_dim,BS_qpt,BS_perturbative_SOC,BS_res_ares_n_mat use BS_solvers, ONLY:BSS_q0,BSS_write_eig_2_db,BSS_eh_table,BS_mat,variables_BS,BSS_n_eig,BSS_desc use X_m, ONLY:X_t use descriptors, ONLY:IO_desc,IO_desc_reset,IO_desc_duplicate @@ -74,7 +74,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& call io_elemental(ID,VAR="[BSS] Eigenstates included",L0=BSS_write_eig_2_db,CHECK=.true.,OP=(/"=="/)) if(iq==1) then call io_elemental(ID,VAR="[BSS] Field direction",R1=BSS_q0,CHECK=.true.,OP=(/"==","==","=="/)) - if (allocated(BSqpts)) BSqpts(:,iq)=BSS_q0 + if (allocated(BS_qpt)) BS_qpt(:,iq)=BSS_q0 endif call io_elemental(ID,VAR="[BSS] Eigenstates computed ",I0=BSS_n_eig,CHECK=.true.,OP=(/"=="/)) call io_elemental(ID,VAR="[BSS] Number of BSE matrices ",I0=BS_res_ares_n_mat,CHECK=.true.,OP=(/"=="/)) diff --git a/src/io_parallel/variables_BS.F b/src/io_parallel/variables_BS.F index 7de7d083af..2876f43ae3 100644 --- a/src/io_parallel/variables_BS.F +++ b/src/io_parallel/variables_BS.F @@ -32,7 +32,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& & BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& -& BS_cpl_K_corr,BSqpts,BS_perturbative_SOC +& BS_cpl_K_corr,BS_qpt,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:def_variable_elemental,io_variable_elemental,ver_is_gt_or_eq use descriptors, ONLY:IO_desc,IO_desc_reset @@ -60,9 +60,9 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call io_variable_elemental(ID,VAR="[K] Identifier",I0=BS_identifier,DESCRIPTOR=desc) ! if(iq>1) then - call def_variable_elemental(ID,"Q-point",3,SP,0) - call io_variable_elemental(ID,VAR="[K] Q-point",& -& R1=BSqpts(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) + call def_variable_elemental(ID,"BS_Q",3,SP,0) + call io_variable_elemental(ID,VAR="[K] BS Q-point",& +& R1=BS_qpt(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) endif ! call def_variable_elemental(ID,"Dimension",1,IP+100,0) @@ -192,8 +192,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! endif ! -#if defined _PAR_IO - ! ! Check if BSE kernel is written in triangular form ! if (write_is_on(ID).or.variable_exist(ID,"BSE_KERNEL_IO_MODE")) then @@ -203,8 +201,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) BSK_IO_mode="2D_standard" endif ! -#endif - ! if (ver_is_gt_or_eq(ID,revision=20415)) then call def_variable_elemental(ID,"X_kind",1,0,0) call io_variable_elemental(ID,VAR="[X] Response Kind",CH0=BSE_L_kind,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) diff --git a/src/io_parallel/variables_BS_more.F b/src/io_parallel/variables_BS_more.F index db4d7ce206..e7375b75f9 100644 --- a/src/io_parallel/variables_BS_more.F +++ b/src/io_parallel/variables_BS_more.F @@ -24,7 +24,7 @@ integer function variables_BS_more(ID,mode) ! use pars, ONLY:IP,SP,LP,schlen - use BS, ONLY:BS_K_cutoff,BS_K_cutoff_done,BS_max_val,l_BSE_kernel_complete + use BS, ONLY:BS_K_cutoff,BS_K_cutoff_done,BS_max_val,l_BSE_kernel_complete,BS_kpt_bz use IO_m, ONLY:nf90_sync,io_unit,write_is_on,read_is_on,& & variable_exist,NF90_unlimited,netcdf_dim_size use IO_int, ONLY:def_variable_elemental,io_variable_elemental,& @@ -39,7 +39,7 @@ integer function variables_BS_more(ID,mode) integer :: N_cutoff,stat logical :: io_var real(SP) :: BS_K_cutoff_IO(1) - character(schlen) :: kernel_dim_name(1) + character(schlen) :: kernel_dim_name(1),kpt_dim_names(2) ! variables_BS_more=0 ! @@ -72,6 +72,14 @@ integer function variables_BS_more(ID,mode) endif endif ! + if(write_is_on(ID)) io_var=trim(mode)=="start" + if( read_is_on(ID)) io_var=trim(mode)=="start".and.variable_exist(ID,"BS_K_BZ") + if (io_var) then + kpt_dim_names=[character(schlen) :: "xyz","n_kpt_bz"] + call def_variable_bulk(ID,"BS_K_BZ",2,shape(BS_kpt_bz),SP,kpt_dim_names) + call io_variable_bulk(ID,2,R2=BS_kpt_bz) + endif + ! if(write_is_on(ID)) stat = nf90_sync(io_unit(ID)) ! variables_BS_more=io_status(ID) diff --git a/src/io_serial/variables_BS.F b/src/io_serial/variables_BS.F index cd7e4476a2..f58fbe9aba 100644 --- a/src/io_serial/variables_BS.F +++ b/src/io_serial/variables_BS.F @@ -32,7 +32,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& & BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& -& BS_cpl_K_corr,BSqpts,BS_perturbative_SOC +& BS_cpl_K_corr,BS_qpt,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:ver_is_gt_or_eq,def_variable_elemental,io_variable_elemental use descriptors, ONLY:IO_desc,IO_desc_reset @@ -63,7 +63,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call io_variable_elemental(ID,VAR="[K] Identifier",I0=BS_identifier,DESCRIPTOR=desc) if (iq>1) then call io_variable_elemental(ID,VAR="[K] Q-point",& -& R1=BSqpts(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) +& R1=BS_qpt(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) endif call io_variable_elemental(ID,VAR="[K] Dimension",I0=BS_K_dim(1),CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) call io_variable_elemental(ID,VAR="[K] Bands",I1=BS_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 4531ebf033..d0c866895d 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -85,7 +85,9 @@ module BS real(SP):: BS_max_val real(SP):: BS_K_cutoff real(SP),allocatable :: BS_K_cutoff_done(:) - real(SP),allocatable :: BSqpts(:,:) + real(SP),allocatable :: BS_qpt(:,:) + real(SP),allocatable :: BS_kpt_bz(:,:) + integer,allocatable :: BS_K_io_map(:) ! ! Resonant/Antiresonant handling !================================ diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 7e29b540fc..c1a2bb5cf3 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -27,7 +27,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use drivers, ONLY:l_col_cut use frequency, ONLY:w_samp use BS_solvers, ONLY:BSS_desc,BSS_uses_GreenF,BSS_Vnl_included,BSS_n_freqs,K_diago_in_BS_mat,A_drude,B_Hall - use BS, ONLY:BSE_mode,BS_K_is_ALDA,BSqpts,BS_field_direction,BS_dip_size,BS_H_dim,BS_K_coupling + use BS, ONLY:BSE_mode,BS_K_is_ALDA,BS_qpt,BS_field_direction,BS_dip_size,BS_H_dim,BS_K_coupling use stderr, ONLY:STRING_match use X_m, ONLY:Epsilon_ii,eps_2_alpha,EPS_2_eels,X_OUTPUT_driver,Epsilon_ij,X_obs_onoff,& & X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,X_magnons @@ -76,8 +76,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) if (STRING_match(WHAT,"override")) call X_OUTPUT_driver("override "//OBS) ! if (STRING_match(WHAT,"open").or.STRING_match(WHAT,"override")) then - if (BS_dip_size==1) call X_OUTPUT_messages(iq,Q_plus_G=BSqpts(:,iq),ig=1) - if (BS_dip_size==2) call X_OUTPUT_messages(iq,Q_plus_G=BSqpts(:,iq),ig=1,Qprime=BS_field_direction(:,2)) + if (BS_dip_size==1) call X_OUTPUT_messages(iq,Q_plus_G=BS_qpt(:,iq),ig=1) + if (BS_dip_size==2) call X_OUTPUT_messages(iq,Q_plus_G=BS_qpt(:,iq),ig=1,Qprime=BS_field_direction(:,2)) ! if ( trim(BSE_mode)=='resonant' ) ordering='r' if (.not.trim(BSE_mode)=='resonant' ) ordering='R' diff --git a/ypp/excitons/excitons_amplitudes.F b/ypp/excitons/excitons_amplitudes.F index 6c3586dae8..feee00305c 100644 --- a/ypp/excitons/excitons_amplitudes.F +++ b/ypp/excitons/excitons_amplitudes.F @@ -33,7 +33,7 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) & DIPs_direction,l_dipoles,BSiq use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_desc,BSS_n_eig use DIPOLES, ONLY:DIP_rotated,DIP_alloc,DIPOLES_reset - use BS, ONLY:BS_H_dim,BS_bands,BSqpts + use BS, ONLY:BS_H_dim,BS_bands,BS_qpt use com, ONLY:msg use vec_operate, ONLY:sort,v_norm use interfaces, ONLY:DESC_write @@ -74,7 +74,7 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) ! ... IO call DIPOLE_IO(Xk,Xen,DIPs,'read ',io_err,'DIP') ! - DIPs_direction=BSqpts(:,BSiq)/v_norm(BSqpts(:,BSiq)) + DIPs_direction=BS_qpt(:,BSiq)/v_norm(BS_qpt(:,BSiq)) ! endif ! diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index a7ac1557fa..b7a2ad7944 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -32,7 +32,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) use IO_int, ONLY:io_control,io_disconnect use IO_m, ONLY:OP_RD_CL,DUMP,NONE,REP,VERIFY use BS_solvers, ONLY:BSS_eh_table,BSS_write_eig_2_db,io_BSS_diago,BS_mat,BSS_n_eig - use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BSqpts + use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BS_qpt use YPPm, ONLY:BS_R_left,BS_R_right,BS_E,BS_E_SOC_corr,BS_R_PL,BS_R_kerr,Xbsk ! #include @@ -68,7 +68,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) io_err=io_E_SOC_map(en,k,io_ID) endif ! - YAMBO_ALLOC(BSqpts,(3,iq)) + YAMBO_ALLOC(BS_qpt,(3,iq)) ! ! X type. Also used in PARALLEL setup ! @@ -159,7 +159,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) YAMBO_FREE(BS_E) YAMBO_FREE(BSS_eh_table) YAMBO_FREE(BS_mat) - YAMBO_FREE(BSqpts) + YAMBO_FREE(BS_qpt) if(associated(BS_E_SOC_corr)) then YAMBO_FREE_P(BS_E_SOC_corr) endif diff --git a/ypp/excitons/excitons_sort_and_report.F b/ypp/excitons/excitons_sort_and_report.F index 7ff9389367..cd3701cdd5 100644 --- a/ypp/excitons/excitons_sort_and_report.F +++ b/ypp/excitons/excitons_sort_and_report.F @@ -27,7 +27,7 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) use units, ONLY:HA2EV use electrons, ONLY:spin_occ,spin,n_sp_pol,n_spinor use stderr, ONLY:intc - use BS, ONLY:BSqpts + use BS, ONLY:BS_qpt use BS_solvers, ONLY:BSS_desc,BSS_n_eig use com, ONLY:msg,of_open_close use R_lattice, ONLY:d3k_factor,q0_def_norm @@ -126,7 +126,7 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) Residuals(:) = real(BS_R(:)*conjg(BS_R(:)),SP) if (write_widths) Residuals(:) = abs(BS_R(:)) if(iq==1) q_norm=q0_def_norm**2 - if(iq> 1) q_norm=iku_v_norm(BSqpts(:,iq))**2 + if(iq> 1) q_norm=iku_v_norm(BS_qpt(:,iq))**2 Residuals(:) = Residuals(:)*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/q_norm*HA2EV ! if (trim(R_normalize)=='yes') then From 0c3dfd6598eb1b6e1f7abc7e9429b09eeba9fb52 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Jul 2022 09:11:40 +0200 Subject: [PATCH 0372/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3ac36e20fd..9f220b61a5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21622 -#define YAMBO_HASH "6b296cd78" +#define YAMBO_REVISION 21667 +#define YAMBO_HASH "9f92a4833" From 7d90df86e515976ade7c5c2ea5de507f0285e61b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Jul 2022 22:20:07 +0200 Subject: [PATCH 0373/1367] Version 5.1.0, Revision 21622, Hash d7c437a07 MODIFIED * include/driver/version.h io_parallel/io_BS_PAR_block.F io_parallel/io_BS_PAR_init.F Changes: - [yambo] 1D_linear I/O mode for BSE now works also with coupling Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io_parallel/io_BS_PAR_block.F | 17 +++++++++-------- src/io_parallel/io_BS_PAR_init.F | 9 +++++++++ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3ac36e20fd..efffb9732a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21622 -#define YAMBO_HASH "6b296cd78" +#define YAMBO_REVISION 21623 +#define YAMBO_HASH "d7c437a07" diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index af28d6994b..1f19cdcab2 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -112,8 +112,8 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) i_rep(1)=1+int((idx-int(1,IPL))/int(MAX_BSK_LIN_size,IPL),IP) ! if idx+imax > MAX_BSK_LIN_size switch to the next variable i_rep(2)=1+int((idx+int(imax-2,IPL))/int(MAX_BSK_LIN_size,IPL),IP) - ! I need both the previous two because a block can be written - ! part on linear variable, part on the next + ! I need both because a block can be written + ! part on a variable, part on the next ! idx1= int(idx-int(MAX_BSK_LIN_size,IPL)*int(i_rep(1)-1,IPL),IP) ! @@ -201,15 +201,16 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) enddo enddo endif - if (x1==x2) then - if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) - call C_F_POINTER(C_LOC(BS_blk(i_block)%table),tmp_link,(/5,BS_blk(i_block)%size(1)/)) - call io_variable_bulk(ID, ID_table, I2=tmp_link, IPOS=(/1,x1/) ) - nullify(tmp_link) - endif ! end select ! + if (x1==x2) then + if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) + call C_F_POINTER(C_LOC(BS_blk(i_block)%table),tmp_link,(/5,BS_blk(i_block)%size(1)/)) + call io_variable_bulk(ID, ID_table, I2=tmp_link, IPOS=(/1,x1/) ) + nullify(tmp_link) + endif + ! ! nf90_sync is performed up to n_BS_blks_min and at steps of 5% of BSE kernel file_sync= i_block<=n_BS_blks_min .and. mod(i_block,max(1,n_BS_blks_min/20))==0 .and. index(BSK_IO_mode,"norestart")==0 ! diff --git a/src/io_parallel/io_BS_PAR_init.F b/src/io_parallel/io_BS_PAR_init.F index 02fa06ba08..ddb6b50a95 100644 --- a/src/io_parallel/io_BS_PAR_init.F +++ b/src/io_parallel/io_BS_PAR_init.F @@ -109,10 +109,18 @@ integer function io_BS_PAR_init(iq,ID,mode) if(trim(BSK_IO_local)=="1D_linear" .or. trim(BSK_IO_local)=="compressed_head" ) then dim_names(2:3,1)=[ 'BS_K_linearized1', 'BS_K_linearized2' ] BS_LIN_size=int(BS_K_dim(1),kind=IPL)*int(BS_K_dim(1)+1,kind=IPL)/int(2,kind=IPL) + if(BS_n_eh_spaces==2) then + call error(" 1D_linear / compressed IO not available with full mode") + else if (BS_K_coupling) then + dim_names(2:3,2) = dim_names(2:3,1) + endif endif if(trim(BSK_IO_local)=="compressed_mat") then dim_names(2:3,1)=[ 'BS_K_compressed1', 'BS_K_compressed2' ] BS_LIN_size=BS_lin_size_compressed + if(BS_n_eh_spaces==2.or.BS_K_coupling) then + call error(" compressed IO not available with full mode or with coupling") + endif endif ! if(trim(BSK_IO_local)=="1D_linear" ) ch_tmp="_LINEARIZED" @@ -131,6 +139,7 @@ integer function io_BS_PAR_init(iq,ID,mode) BS_LIN_size=BS_LIN_size-int(MAX_BSK_LIN_size,IPL)*int(n_replica-1,IPL) ! BS_IO_dim(2,1)=int(BS_LIN_size,IP) + if (BS_K_coupling) BS_IO_dim(:,2)=BS_IO_dim(:,1) ! case("2D_standard") ! From 8646259b0853d1a4a68f080dfa4c7f2dfe8bc508 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Jul 2022 22:25:02 +0200 Subject: [PATCH 0374/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index efffb9732a..8f2eaf8bd2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21623 -#define YAMBO_HASH "d7c437a07" +#define YAMBO_REVISION 21670 +#define YAMBO_HASH "96750c737" From ccc12594df7b0beb6af5819a6d543ec0d513fba8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Jul 2022 23:22:11 +0200 Subject: [PATCH 0375/1367] Version 5.1.0, Revision 21623, Hash 7d90df86e MODIFIED * include/driver/version.h io_parallel/io_BS_header.F Bugs: - [yambo_rt] Fixed generation of collisions from ndb.BS_PAR file generated with all symmetries Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io_parallel/io_BS_header.F | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index efffb9732a..caafc8b7cf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21623 -#define YAMBO_HASH "d7c437a07" +#define YAMBO_REVISION 21624 +#define YAMBO_HASH "7d90df86e" diff --git a/src/io_parallel/io_BS_header.F b/src/io_parallel/io_BS_header.F index 5d94a34883..5973fa9adf 100644 --- a/src/io_parallel/io_BS_header.F +++ b/src/io_parallel/io_BS_header.F @@ -27,6 +27,7 @@ integer function io_BS_header(iq,X,ID,mode) ! use parallel_int, ONLY:PP_redux_wait use com, ONLY:msg + use drivers, ONLY:l_eval_collisions use pars, ONLY:schlen,lchlen use stderr, ONLY:intc use X_m, ONLY:X_t @@ -80,13 +81,13 @@ integer function io_BS_header(iq,X,ID,mode) if (trim(mode)=="connect") return ! ! Check if the file already contains data and it is consistent - ! DS: warning. This is potentially dangerous since all MPI tasts are all writing - ! both the header and the variables - ! I cannot put here if(master_cpu) because I need all MPI_tasks to - ! go through the definition of the variables (see similar issue in io_X.F) ! - io_BS_header=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.true.,& + if (l_eval_collisions) then + io_BS_header=io_header(ID,R_LATT=.true.,WF=.true.,CUTOFF=.true.) + else + io_BS_header=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.true.,& & IMPOSE_SN=.true.,XC_KIND="K_WF force Xs",CUTOFF=.true.,FRAG=frag_BS_K) + endif ! io_BS_header=variables_BS(ID,iq,local_desc,.TRUE.,X=X) ! From f36dd580484a9a6b7e6ea312b1c0431544c75b3a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 23 Jul 2022 23:23:29 +0200 Subject: [PATCH 0376/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index caafc8b7cf..2d85417acc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21624 -#define YAMBO_HASH "7d90df86e" +#define YAMBO_REVISION 21673 +#define YAMBO_HASH "48e445e7b" From 021ec0fca41cbdbe416a8278adbabc44ff8fb1e4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 25 Jul 2022 22:05:01 +0200 Subject: [PATCH 0377/1367] Version 5.1.0, Revision 21624, Hash ccc12594d MODIFIED * include/driver/version.h linear_algebra/MATRIX_slepc.F Changes: - [yambo] Matrix Slepc reverted to previous version Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/linear_algebra/MATRIX_slepc.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index caafc8b7cf..f37117abef 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21624 -#define YAMBO_HASH "7d90df86e" +#define YAMBO_REVISION 21625 +#define YAMBO_HASH "ccc12594d" diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index 84c442c68d..748d63ae81 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -243,6 +243,9 @@ subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cm call msg( 'sr', '[SLEPC] Stopping condition tolerance ', real(tol,SP) ) call msg( 'sr', '[SLEPC] Stopping condition max iterations ', int(maxit) ) + !Set monitor + call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) + ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! Solve the eigensystem ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -253,9 +256,6 @@ subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cm call msg( 'sr', '[SLEPC] Number of eigenvalues [NEV]', int(nev) ) call msg( 'sr', '[SLEPC] Max. subspace size of solver [NCV]', int(ncv) ) call msg( 'sr', '[SLEPC] Max. allowed dim [MPD]', int(mpd) ) - - !Set monitor - call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) ! ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 092d89929023bc7b280b2a53ba7e81a2ce18da4a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 26 Jul 2022 18:19:03 +0200 Subject: [PATCH 0378/1367] Version 5.1.0, Revision 21625, Hash 021ec0fca MODIFIED * include/driver/version.h bse/K_driver_init.F collisions/COLLISIONS_HXC.F ph-el/PHEL_from_GF_to_quasiphonons.F wf_and_fft/scatter_Bamp.F Bugs: - [yambo_rt] Fixed compilation in DP - [yambo_rt/yambo_nl] Fixed definition of collisions from BSE Results do not change but implementation is more rigorous Changes: - Addeed some comments on present procedure to generate collisions Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- src/bse/K_driver_init.F | 2 ++ src/collisions/COLLISIONS_HXC.F | 34 +++++++++++++++--------- src/ph-el/PHEL_from_GF_to_quasiphonons.F | 2 +- src/wf_and_fft/scatter_Bamp.F | 2 +- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f37117abef..1c8776b49e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21625 -#define YAMBO_HASH "ccc12594d" +#define YAMBO_REVISION 21626 +#define YAMBO_HASH "021ec0fca" diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 7eac643ea0..6f927ed27b 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -192,6 +192,8 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! Slepc are not (yet) able to deal with a pseudo-hermitian algorithm ! call parser('ImposeSymm',l_flag) + ! The following could be avoided, by promoting l_slepc_special to a module logical, + ! and using it in K_multiply_by_V (and K_multiply_by_V_traspose) if (l_slepc_special.and..not.l_flag) l_BS_ares_from_res=.FALSE. BSS_slepc_double_grp=l_BS_ares_from_res.and.l_slepc_special ! diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 1b7e833678..484872ee68 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -388,6 +388,8 @@ subroutine map_BSE_to_HXC_collisions() ! Yambo uses the BSE matrix with the square root of the occupations ! The real time collisions must be constructed with the standard form ! This requires a cI factor in the coupling terms + ! Moreover, since the occupation factors are contained in the density matrix, + ! there is a -1 factor for "C", "Q" and "A" ! use electrons, ONLY:spin_occ use pars, ONLY:cI @@ -421,32 +423,32 @@ subroutine map_BSE_to_HXC_collisions() ! ! Coupling block j_BSE=j_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1)*cI + if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1)*(-cI) ! Coupling is symmetric - if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1)*cI + if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1)*(-cI) ! else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*cI + if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*(-cI) ! anti-Coupling is symmetric - if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*cI + if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*(-cI) ! else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then ! ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) j_BSE=j_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1)) + if(j_BSE>=i_BSE) M_ij= conjg(BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1)) ! anti-resonant is hermitian - if(j_BSE< i_BSE) M_ij= -BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1) + if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1) ! endif ! - ! The occupation factor here is already contained in the density matrix (?) + ! The occupation factor here is already contained in the density matrix ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=-M_ij/spin_occ + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)= M_ij/spin_occ ! enddo enddo @@ -454,6 +456,7 @@ subroutine map_BSE_to_HXC_collisions() ! end subroutine map_BSE_to_HXC_collisions ! + ! subroutine compute_Hartree_collisions() ! ! Scattering geometry @@ -596,7 +599,7 @@ subroutine compute_MBPT_XC_collisions() ! / / \ ! / \ ! / G_{np,mp} \ - ! (i_n,i_k,1)-->--.---------->----------.---->----(i_m,i_k,1) + ! (i_n,i_k,1)-->--.-- ----->----- --.---->----(i_m,i_k,1) ! (i_kmq,i_kmq_s) ! ! @@ -631,10 +634,12 @@ subroutine compute_MBPT_XC_collisions() iscp_XC%is =(/i_m,i_k, i_k_s, i_sp/) iscp_XC%os =(/0, i_kmq,i_kmq_s,i_sp/) ! - isc_XC%qs(1) =i_kmq_G0 - iscp_XC%qs(1)=i_kmq_G0 + ! These are used in the wrong way since they are used to construct + ! M_{k,k+q}(q)=M_{k,p+G}(q) in place of M_{k,p}(q-G) + isc_XC%qs(1) =1 !i_kmq_G0 + iscp_XC%qs(1)=1 !i_kmq_G0 ! - if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') + if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') ! if( iqibz/=isc_XC%iqref .and. l_compute_screening) then ! @@ -674,6 +679,7 @@ subroutine compute_MBPT_XC_collisions() call scatter_Bamp(iscp_XC) ! do i_np=COLL_bands(1),COLL_bands(2) + ! ! if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle @@ -699,6 +705,10 @@ subroutine compute_MBPT_XC_collisions() !$omp end parallel do endif ! + ! DEBUG < + !write(201,*) i_n,i_m,i_k,i_np,i_mp,i_kmq,iqbz,iqibz,i_kmq_G0,isc_XC%rhotw(1),iscp_XC%gamp(1,1),conjg(iscp_XC%rhotw(1)) + ! DEBUG > + ! pre_factor2=cZERO if(index(H_potential,"COH")>0.or.index(H_potential,"SEX")>0) then !$omp parallel do default(shared), private(ig1,ig2), reduction(+:pre_factor2) diff --git a/src/ph-el/PHEL_from_GF_to_quasiphonons.F b/src/ph-el/PHEL_from_GF_to_quasiphonons.F index da3b991dee..1b8e4eab56 100644 --- a/src/ph-el/PHEL_from_GF_to_quasiphonons.F +++ b/src/ph-el/PHEL_from_GF_to_quasiphonons.F @@ -112,7 +112,7 @@ subroutine PHEL_from_GF_to_quasiphonons(il,iq,ph_freq,QPH) do iw=1,QPH%N_D_freqs W=real( QPH%W(iw) ) + cI*0.1_SP/1000._SP/HA2EV if (trim(QPH%what)=="FULL") then - QPH%D(iw)=D_from_PI(cmplx(ph_freq),PHEL_qp%PI(il,iq,iw)-PI_ref,W) + QPH%D(iw)=D_from_PI(cmplx(ph_freq,kind=SP),PHEL_qp%PI(il,iq,iw)-PI_ref,W) else if (.not.trim(QPH%what)=="DDFPT)") then QPH%D(iw)=D_from_POLE_and_GAMMA(QPH%Pole,QPH%Gamma,QPH%Residual,W) endif diff --git a/src/wf_and_fft/scatter_Bamp.F b/src/wf_and_fft/scatter_Bamp.F index ecf23f4138..18fd81d7aa 100644 --- a/src/wf_and_fft/scatter_Bamp.F +++ b/src/wf_and_fft/scatter_Bamp.F @@ -23,7 +23,7 @@ ! subroutine DEV_SUB(scatter_Bamp)(isc) ! - ! rhotw(G)= + ! rhotw(G)= ! ! is(3)=(ib,ik,is,i_sp) --<--:--<-- os(3)=(ob,ok,os,o_sp) ! : From 215ab37e7adde945251f5e6c4eef049de4a4d0ea Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 28 Jul 2022 10:47:34 +0200 Subject: [PATCH 0379/1367] Version 5.1.0, Revision 21674, Hash f36dd58 MODIFIED * src/collisions/COLLISIONS_compose_rt.F NEW * Changes: - [yambo_rt] Small improvements in collisions compose Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/collisions/COLLISIONS_compose_rt.F | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2d85417acc..e99872bca3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21673 -#define YAMBO_HASH "48e445e7b" +#define YAMBO_REVISION 21674 +#define YAMBO_HASH "f36dd58" diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 040f760c56..10a3c868e2 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -31,7 +31,7 @@ subroutine COLLISIONS_compose_rt(dG_in) use electrons, ONLY:spin,n_met_bands,n_full_bands use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait - use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_COM_Q_INDEX,& + use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_A2A,& & PAR_IND_Xk_ibz,PAR_IND_Bp_mat,PAR_G_k_range use hamiltonian, ONLY:B_mat_index use real_time, ONLY:RTibz,RT_Vnl_xc,RT_bands @@ -48,7 +48,7 @@ subroutine COLLISIONS_compose_rt(dG_in) ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return ! - call timing('COLLISIONS (compose)',OPR='start') + call timing('COLLISIONS (G average)',OPR='start') ! G_avg=cZERO ! @@ -67,7 +67,7 @@ subroutine COLLISIONS_compose_rt(dG_in) ! enddo ! - call timing('COLLISIONS (compose)',OPR='stop') + call timing('COLLISIONS (G average)',OPR='stop') ! call timing('COLLISIONS (redux)',OPR='start') ! @@ -120,14 +120,18 @@ subroutine COLLISIONS_compose_rt(dG_in) ! enddo ! - ! All 2 All - !=========== + call timing('COLLISIONS (compose)',OPR='stop') + ! + call timing('COLLISIONS (redux)',OPR='start') ! - call PP_redux_wait(RT_Vnl_xc) + ! Redux over bands + !================== + call PP_redux_wait(RT_Vnl_xc,COMM=PAR_COM_Xk_ibz_A2A%COMM) ! ! Symmetrization !================ do i_k=1,nXkibz + if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle do i_n=COLL_bands(1),COLL_bands(2) RT_Vnl_xc(i_n,i_n,i_k,:)= real(RT_Vnl_xc(i_n,i_n,i_k,:)) do i_m=i_n+1,COLL_bands(2) @@ -136,6 +140,10 @@ subroutine COLLISIONS_compose_rt(dG_in) enddo enddo ! - call timing('COLLISIONS (compose)',OPR='stop') + ! Redux over kpts (is this needed?) + !==================================== + !call PP_redux_wait(RT_Vnl_xc,COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! + call timing('COLLISIONS (redux)',OPR='stop') ! end subroutine COLLISIONS_compose_rt From 91ab479fa09fc9377dce84b83c8a41c4b37dd09b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 28 Jul 2022 19:04:03 +0200 Subject: [PATCH 0380/1367] Version 5.1.0, Revision 21675, Hash 215ab37 MODIFIED * src/collisions/COLLISIONS_compose_rt.F src/modules/mod_real_time.F src/real_time_control/RT_alloc.F src/real_time_control/RT_free.F src/real_time_hamiltonian/RT_Hamiltonian.F Bugs: - [yambo_rt] Fix for issue #648 Changes: - [yambo_rt] COLLISION_compose_rt splot into 2 subroutines Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/collisions/COLLISIONS_compose_rt.F | 103 +++++++++++++-------- src/modules/mod_real_time.F | 1 + src/real_time_control/RT_alloc.F | 6 +- src/real_time_control/RT_free.F | 3 +- src/real_time_hamiltonian/RT_Hamiltonian.F | 6 +- 6 files changed, 77 insertions(+), 46 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e99872bca3..3a3a4bf504 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21674 -#define YAMBO_HASH "f36dd58" +#define YAMBO_REVISION 21675 +#define YAMBO_HASH "215ab37" diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 10a3c868e2..8df6aa21d9 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine COLLISIONS_compose_rt(dG_in) +subroutine COLLISIONS_compose_rt(dG_avg) ! ! HF/SEX(state) = - (0.,1.) * \sum_{n,n',q} COLLISIONS(n,n',q,state) x G_lesser(n,n',k-q) ! @@ -31,52 +31,35 @@ subroutine COLLISIONS_compose_rt(dG_in) use electrons, ONLY:spin,n_met_bands,n_full_bands use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait - use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_A2A,& -& PAR_IND_Xk_ibz,PAR_IND_Bp_mat,PAR_G_k_range + use parallel_m, ONLY:PAR_COM_Xk_ibz_A2A,PAR_IND_Xk_ibz,PAR_IND_Bp_mat use hamiltonian, ONLY:B_mat_index - use real_time, ONLY:RTibz,RT_Vnl_xc,RT_bands + use real_time, ONLY:RT_Vnl_xc,RT_bands use timing_m, ONLY:timing ! implicit none ! - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) ! ! Work Space ! - integer :: i_coll,i_comp,i_coll_mem,i_spin,i_n,i_m,i_kmq,ib,ibp,i_k,i_k_RT - complex(SP) :: G_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + integer :: i_coll,i_comp,i_coll_mem,i_spin,i_n,i_m,i_kmq,ib,ibp,i_k + logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2)) ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return ! - call timing('COLLISIONS (G average)',OPR='start') + call timing('COLLISIONS (compose)',OPR='start') ! - G_avg=cZERO + do_collisions=.false. ! - do i_k=1,nXkibz - ! - if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle - ! - do i_k_RT=RTibz%k_range(i_k,1),RTibz%k_range(i_k,2) - G_avg(:,:,i_k)=G_avg(:,:,i_k)+dG_in(:,:,i_k_RT) + do ibp=COLL_bands(1),COLL_bands(2) + do ib=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp>maxval(n_met_bands) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if (.not.PAR_IND_Bp_mat%element_1D( B_mat_index(ib,ibp,COLL_bands) ) ) cycle + do_collisions(ib,ibp)=.true. enddo - ! - ! The 1/real(RT_k_FT%N_mapped(i_k),SP) factor is needed here because I'm integrating - ! over kmq. With the DbGd the size of the integrating factor has to be reduced - ! - G_avg(:,:,i_k)=G_avg(:,:,i_k)/real(RTibz%N_mapped(i_k),SP)/real(PAR_COM_Q_INDEX%n_CPU) - ! enddo ! - call timing('COLLISIONS (G average)',OPR='stop') - ! - call timing('COLLISIONS (redux)',OPR='start') - ! - call PP_redux_wait(G_avg,COMM=PAR_COM_Xk_ibz_INDEX%COMM) - ! - call timing('COLLISIONS (redux)',OPR='stop') - ! - call timing('COLLISIONS (compose)',OPR='start') - ! RT_Vnl_xc=cZERO ! do i_coll=1,HXC_collisions%N @@ -101,17 +84,14 @@ subroutine COLLISIONS_compose_rt(dG_in) do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp> maxval(n_met_bands) ) ) cycle - if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if (.not.do_collisions(ib,ibp)) cycle ! if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle ! i_comp=i_comp+1 ! - if (.not.PAR_IND_Bp_mat%element_1D( B_mat_index(ib,ibp,COLL_bands) ) ) cycle - ! RT_Vnl_xc(i_n,i_m,i_k,i_spin)=RT_Vnl_xc(i_n,i_m,i_k,i_spin) & -& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*G_avg(ib,ibp,i_kmq) +& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*dG_avg(ib,ibp,i_kmq) ! enddo enddo @@ -122,7 +102,7 @@ subroutine COLLISIONS_compose_rt(dG_in) ! call timing('COLLISIONS (compose)',OPR='stop') ! - call timing('COLLISIONS (redux)',OPR='start') + call timing('COLLISIONS (sym-red)',OPR='start') ! ! Redux over bands !================== @@ -144,6 +124,53 @@ subroutine COLLISIONS_compose_rt(dG_in) !==================================== !call PP_redux_wait(RT_Vnl_xc,COMM=PAR_COM_Xk_ibz_INDEX%COMM) ! - call timing('COLLISIONS (redux)',OPR='stop') + call timing('COLLISIONS (sym-red)',OPR='stop') ! end subroutine COLLISIONS_compose_rt +! +! +subroutine Build_dG_avg(dG_in,dG_avg) + ! + use pars, ONLY:SP,cZERO + use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree + use R_lattice, ONLY:nXkibz + use parallel_int, ONLY:PP_redux_wait + use parallel_m, ONLY:PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz,PAR_G_k_range + use real_time, ONLY:RTibz,RT_bands + use timing_m, ONLY:timing + ! + implicit none + ! + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(out) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + ! + ! Work Space + ! + integer :: i_k,i_k_RT + ! + if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return + ! + call timing('COLLISIONS (G average)',OPR='start') + ! + dG_avg=cZERO + ! + do i_k=1,nXkibz + ! + if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle + ! + do i_k_RT=RTibz%k_range(i_k,1),RTibz%k_range(i_k,2) + dG_avg(:,:,i_k)=dG_avg(:,:,i_k)+dG_in(:,:,i_k_RT) + enddo + ! + ! The 1/real(RT_k_FT%N_mapped(i_k),SP) factor is needed here because I'm integrating + ! over kmq. With the DbGd the size of the integrating factor has to be reduced + ! + dG_avg(:,:,i_k)=dG_avg(:,:,i_k)/real(RTibz%N_mapped(i_k),SP)/real(PAR_COM_Q_INDEX%n_CPU) + ! + enddo + ! + call PP_redux_wait(dG_avg,COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! + call timing('COLLISIONS (G average)',OPR='stop') + ! +end subroutine Build_dG_avg diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index d9b8b6c1f8..467106e0af 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -200,6 +200,7 @@ module real_time !----- complex(SP), allocatable :: G_lesser(:,:,:,:) ! Band, Band, K, Time complex(SP), allocatable :: dG_lesser(:,:,:,:) + complex(SP), allocatable :: dG_avg(:,:,:) complex(SP), allocatable :: G_lesser_reference(:,:,:) ! Band, Band, K complex(SP), allocatable :: I1_matrix(:,:) ! diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index 71c170a436..22f22b2a69 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -39,7 +39,7 @@ subroutine RT_alloc(en,what) & Ho_plus_Sigma,H_EQ,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& & dG_lesser,G_lesser,MEM_pointer,G_MEM_steps,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,RT_bands,RT_nk,l_RT_is_WFfree,l_RT_rotate_DM,& -& l_velocity_gauge_corr +& l_velocity_gauge_corr,dG_avg ! #include ! @@ -88,7 +88,9 @@ subroutine RT_alloc(en,what) ! if(l_use_Hxc_collisions) then YAMBO_ALLOC(RT_Vnl_xc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) - RT_Vnl_xc=(0._SP,0._SP) + RT_Vnl_xc=cZERO + YAMBO_ALLOC(dG_avg,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz)) + dG_avg=cZERO endif ! YAMBO_ALLOC(HARTREE0,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) diff --git a/src/real_time_control/RT_free.F b/src/real_time_control/RT_free.F index c9aa1498f0..c3359cf195 100644 --- a/src/real_time_control/RT_free.F +++ b/src/real_time_control/RT_free.F @@ -31,7 +31,7 @@ subroutine RT_free( ) use ELPH, ONLY:Q_io_map,GKKP_ep_sq,GKKP_pe_sq use hamiltonian, ONLY:H_free use xc_functionals, ONLY:E_xc - use real_time, ONLY:DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,& + use real_time, ONLY:DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,dG_avg,& & Ho_plus_Sigma,H_EQ,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& & dG_lesser,G_lesser,MEM_pointer,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,& @@ -70,6 +70,7 @@ subroutine RT_free( ) YAMBO_FREE(H_EQ) YAMBO_FREE(H_pseudo_eq) YAMBO_FREE(RT_Vnl_xc) + YAMBO_FREE(dG_avg) ! YAMBO_FREE(HARTREE0) YAMBO_FREE(XC0) diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 4df9e43ba0..77afee3d00 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -60,8 +60,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) use real_time, ONLY:Ho_plus_Sigma,l_NE_with_fields,REF_V_xc_sc, & & rho_reference,magn_reference,RT_Vnl_xc,H_EQ, & & l_RT_RWA,eval_HARTREE,eval_DFT,RTibz,RT_potential, & -& RT_bands,RT_nbands, & -& l_update_SOC,l_velocity_gauge_corr +& RT_bands,RT_nbands,dG_avg,l_update_SOC,l_velocity_gauge_corr use fields, ONLY:gauge_field use wave_func, ONLY:WF use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_A2A,PAR_G_k_range @@ -182,7 +181,8 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) !====================================================== if (l_use_Hxc_collisions) then ! - call COLLISIONS_compose_rt(dG_in) + call Build_dG_avg(dG_in,dG_avg) + call COLLISIONS_compose_rt(dG_avg) ! ! Add RT_Vnl_xc to Ho_plus_Sigma !--------------------------------- From 3989ea0d707d8a3b8ea228575f5a2adc398233f4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 29 Jul 2022 11:00:22 +0200 Subject: [PATCH 0381/1367] Version 5.1.0, Revision 21626, Hash 092d89929 MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F collisions/COLLISIONS_linearize_and_IO.F wf_and_fft/scatter_Bamp.F Changes: - Comments and debug lines. To be fixed in the future Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/collisions/COLLISIONS_HXC.F | 12 ++++-- src/collisions/COLLISIONS_eval.F | 39 +++++++++++++++++++- src/collisions/COLLISIONS_linearize_and_IO.F | 11 ++++++ src/wf_and_fft/scatter_Bamp.F | 2 +- 5 files changed, 61 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1c8776b49e..bde21c28fe 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21626 -#define YAMBO_HASH "021ec0fca" +#define YAMBO_REVISION 21627 +#define YAMBO_HASH "092d89929" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 484872ee68..eb0ea52923 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -634,10 +634,16 @@ subroutine compute_MBPT_XC_collisions() iscp_XC%is =(/i_m,i_k, i_k_s, i_sp/) iscp_XC%os =(/0, i_kmq,i_kmq_s,i_sp/) ! + ! DS 2022/07/29 ! These are used in the wrong way since they are used to construct - ! M_{k,k+q}(q)=M_{k,p+G}(q) in place of M_{k,p}(q-G) - isc_XC%qs(1) =1 !i_kmq_G0 - iscp_XC%qs(1)=1 !i_kmq_G0 + ! M_{k,k+q}=M_{k,p+G} in place of M_{k,p} + ! Setting these to 1 should give M_{k,p}. At least I get hermitian collisions. + ! However the G shift needs to be accounted for somehow in (?) + ! a. gamp + ! b. X_mat + ! + isc_XC%qs(1) =i_kmq_G0 + iscp_XC%qs(1)=i_kmq_G0 ! if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 73e56a77ff..c619a6ca5b 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -372,6 +372,42 @@ subroutine set_BS_blks(Xk) end subroutine set_BS_blks ! ! +subroutine set_BS_blks_global(Xk) + ! + use pars, ONLY:cZERO + use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode,BS_kpt_bz + use R_lattice, ONLY:bz_samp + ! +#include + ! + type(bz_samp), intent(in) :: Xk + ! + integer :: iB + ! + BS_res_ares_n_mat=1 + n_BS_blks=2 + n_BS_blks_min=n_BS_blks + ! + allocate(BS_blk(n_BS_blks)) + BS_blk(1)%mode="R" + BS_blk(2)%mode="C" + ! + do iB=1,n_BS_blks + BS_blk(iB)%size(:)=BS_K_dim(1) + BS_blk(iB)%coordinate(:)=1 + YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + BS_blk(iB)%mat=cZERO + BS_blk(iB)%done(:,:)="f" + allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) + BS_blk(iB)%table=0 + enddo + ! + YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) + ! +end subroutine set_BS_blks_global +! +! subroutine build_inverse_BS_eh_table(Xk) ! use electrons, ONLY:n_sp_pol @@ -388,7 +424,7 @@ subroutine build_inverse_BS_eh_table(Xk) allocate(BSS_eh_table_m1(Xk%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) BSS_eh_table_m1=0 !call live_timing('BSE inverse eh-table',BS_H_dim) - + ! do i_H=1,2*BS_K_dim(1) ! ik_bz = BS_blk(i_H)%table(1,1) @@ -398,6 +434,7 @@ subroutine build_inverse_BS_eh_table(Xk) i_sp_v = BS_blk(i_H)%table(5,1) ! BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H + ! !call live_timing(steps=1) ! enddo diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index 860d559139..1465b11446 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -49,6 +49,9 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme integer :: ic,i1,i2,i3,i_cycle,io_err,i_ref logical :: store_it,l_HXC,l_GW_NEQ,l_QED_P,l_COH real(SP) :: COLLISIONS_max + ! DEBUG < + !complex(SP) :: Mij + ! DEBUG > ! #if defined _PAR_IO integer, external :: io_COLLs_header @@ -119,6 +122,14 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3) if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3) ! + ! DEBUG < + !Mij=COLL_element(1)%v3_c(i1,i2,i3) + !if (abs( real(Mij))<1.e-10) Mij=cmplx(0._SP,aimag(Mij),kind=SP) + !if (abs(aimag(Mij))<1.e-10) Mij=cmplx(real(Mij),0._SP,kind=SP) + !! + !write(100,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,real(Mij),aimag(Mij) + ! DEBUG > + ! endif ! enddo diff --git a/src/wf_and_fft/scatter_Bamp.F b/src/wf_and_fft/scatter_Bamp.F index 18fd81d7aa..ecf23f4138 100644 --- a/src/wf_and_fft/scatter_Bamp.F +++ b/src/wf_and_fft/scatter_Bamp.F @@ -23,7 +23,7 @@ ! subroutine DEV_SUB(scatter_Bamp)(isc) ! - ! rhotw(G)= + ! rhotw(G)= ! ! is(3)=(ib,ik,is,i_sp) --<--:--<-- os(3)=(ob,ok,os,o_sp) ! : From 2c9faf4b3666d6af52b230d764371d534467eb56 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 29 Jul 2022 11:00:51 +0200 Subject: [PATCH 0382/1367] Version 5.1.0, Revision 21627, Hash 3989ea0d7 MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F qp/QP_ppa_cohsex.F qp/XCo_Hartree_Fock.F Changes: - [yambo] Added comments in the three subroutines COLLISIONS_HXC, QP_ppa_cohsex and XCo_Hartree_Fock related to iGo shift and to issue #640 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/collisions/COLLISIONS_HXC.F | 7 +- src/qp/QP_ppa_cohsex.F | 109 +++++++++++++++++--------------- src/qp/XCo_Hartree_Fock.F | 22 ++++--- 4 files changed, 80 insertions(+), 62 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index bde21c28fe..e41a62c666 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21627 -#define YAMBO_HASH "092d89929" +#define YAMBO_REVISION 21629 +#define YAMBO_HASH "16d8d4c92" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index eb0ea52923..66acb61b8e 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -637,8 +637,11 @@ subroutine compute_MBPT_XC_collisions() ! DS 2022/07/29 ! These are used in the wrong way since they are used to construct ! M_{k,k+q}=M_{k,p+G} in place of M_{k,p} - ! Setting these to 1 should give M_{k,p}. At least I get hermitian collisions. - ! However the G shift needs to be accounted for somehow in (?) + ! Setting i_kmq_G=1 (i.e. G=0) should give M_{k,p}. + ! Doing so I get hermitian collisions but with a -1 compared to the ones from BSE. To verify the results. + ! In the subrtouine QP_ppa_cohsex and XCo_Hartree_Fock, this index is not used. See comments there. + ! + ! Should the G shift needs to be accounted for somehow in (?) ! a. gamp ! b. X_mat ! diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 517a480a90..4950190ad2 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -36,7 +36,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & l_rt_carriers_in_use,l_RIM_W use parallel_int, ONLY:PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_index,& & PARALLEL_WF_distribute - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,& + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,PAR_COM_QP_A2A,& & PAR_IND_Q_ibz,PAR_IND_Q_ibz_ID,PAR_IND_QP_ID,& & PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc @@ -57,7 +57,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use matrix_operate,ONLY:mat_transpose use timing_m, ONLY:timing #if defined _SC - use parallel_m, ONLY:PAR_COM_QP_A2A use SC, ONLY:it_now,it_to_start #endif use deviceXlib_m, ONLY:dev_memcpy @@ -80,12 +79,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Work Space ! - integer ::i_qp,i_w,iqbz,iqibz,ib,ig1,ig2,alloc_err,iqs,iscs_save(2,4),& -& i_qp_to_start,iq_to_start,is,iq_mem,X_range(2),io_err,ID,IO_ACT,timing_steps + integer ::i_qp,i_w,iqbz,iqibz,ib,i_v,i_c,i_k,i_kmq,i_kmq_bz,i_kmq_s, & +& ig1,ig2,iqs,i_qp_to_start,iq_to_start,is,iq_mem,i_sp_pol, & +& alloc_err,iscs_save(2,4),X_range(2),io_err,ID,IO_ACT,timing_steps complex(SP), allocatable ::W_(:),dc(:),eet_factor(:,:) type(elemental_collision),target ::isc,iscp character(schlen)::ch,SECTION_name,W_name - logical ::X_is_TR_rotated,l_X_ALLOC_elemental,l_RIM_W_g + logical ::X_is_TR_rotated,l_X_ALLOC_elemental,l_RIM_W_g,fill_QP_sc real(SP) ::eet_cutoff0(n_sp_pol),E_kmq,f_kmq,eet_cutoff1(n_sp_pol),PPA_E complex(SP) ::PPA_R,local_rhotw(X%ng),pre_factor complex(DP) ::dp_dummy,ctmp @@ -163,27 +163,25 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! WF distributed & load !======================= ! - if ( .not.l_sc_run ) call PARALLEL_global_indexes(E,k,q,"Self_Energy") + if ( .not.l_sc_run ) then + call PARALLEL_global_indexes(E,k,q,"Self_Energy") + call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_G_b,CLEAN_UP=.TRUE.) + call PARALLEL_WF_distribute(QP_index=PAR_IND_QP) + call PARALLEL_WF_index( ) + endif + ! + if(.not.l_sc_run) ch='-GW' + if( l_sc_run) ch='-SC' ! ! Redefine iq_to_start to be CPU-dependent ! do iqbz=1,q%nbz - if (PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) then + iqibz=q%sstar(iqbz,1) + if (PAR_IND_Q_ibz%element_1D(iqibz)) then iq_to_start=iqbz exit endif enddo - ! - if( .not.l_sc_run ) then - call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_G_b,CLEAN_UP=.TRUE.) - call PARALLEL_WF_distribute(QP_index=PAR_IND_QP) - call PARALLEL_WF_index( ) - endif - ! - ch='-GW' -#if defined _SC - if(l_sc_run) ch='-SC' -#endif ! ! wf and collisions dimension !----------------------------- @@ -225,15 +223,15 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif endif ! - call PP_redux_wait + call PP_redux_wait() ! timing_steps=PAR_IND_QP%n_of_elements(PAR_IND_QP_ID+1)*& & PAR_IND_Q_ibz%n_of_elements(PAR_IND_Q_ibz_ID+1)*& & count( PAR_IND_G_b%element_1D(QP_n_G_bands(1):QP_n_G_bands(2)) ) ! - ch=trim(SECTION_name) + if (.not.l_sc_run) ch=trim(SECTION_name) #if defined _SC - if (l_sc_run) ch=trim(SECTION_name)//'@it'//trim(intc(it_now)) + if ( l_sc_run) ch=trim(SECTION_name)//'@it'//trim(intc(it_now)) #endif call live_timing(trim(ch),timing_steps) ! @@ -244,11 +242,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! Q_loop: do iqbz=iq_to_start,q%nbz ! - if (.not.PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) cycle + iqs =q%sstar(iqbz,2) + iqibz=q%sstar(iqbz,1) + ! + if (.not.PAR_IND_Q_ibz%element_1D(iqibz)) cycle ! - isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) - iqibz=isc%qs(2) - iqs =isc%qs(3) + isc%qs(2:)=(/iqibz,iqs/) ! if (iqibz/=isc%iqref) then ! @@ -346,6 +345,20 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (i_qp==QP_n_states) i_qp_to_start=1 ! + i_v=QP_table(i_qp,1) + i_c=QP_table(i_qp,2) + i_k=QP_table(i_qp,3) + i_sp_pol=spin(QP_table(i_qp,:)) + ! + ! Note DS 2022/07/29 : i_kmq_Go is not used. + ! This is related to issue with HSEX collisions in real-time. + ! See comment in COLLISIONS_HXC and in XCo_Hartree_Fock + !i_kmq_Go=qindx_S(i_k,iqbz,2) + i_kmq_bz=qindx_S(i_k,iqbz,1) + ! + i_kmq =k%sstar(i_kmq_bz,1) + i_kmq_s=k%sstar(i_kmq_bz,2) + ! !#if defined _SC ! ! ! ! In OEP only vc matrix elements so ... no cc' no vv' @@ -354,11 +367,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (l_sc_srpa.and.(QP_table(i_qp,1)>E%nbf.or.QP_table(i_qp,2)<=E%nbf)) cycle !#endif ! - isc%is=(/QP_table(i_qp,1),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) - isc%os(2:)=(/k%sstar(qindx_S(isc%is(2),iqbz,1),:),spin(QP_table(i_qp,:))/) - isc%qs(1)=qindx_S(QP_table(i_qp,3),iqbz,2) + isc%is=(/i_v,i_k, 1, i_sp_pol/) + isc%os=(/0, i_kmq,i_kmq_s,i_sp_pol/) + isc%qs(1)=i_kmq_s ! - iscp%is=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + iscp%is=(/i_c,i_k,1,i_sp_pol/) iscp%qs=isc%qs ! dc=cZERO @@ -366,12 +379,15 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! COH (using completeness relation) ! if (((l_sc_srpa.or.l_sc_coh.or.l_cohsex).and..not.COHSEX_use_empties).or.l_GW_terminator) then + ! + ! Why this is inside a iq loop if nothing depends on q ?? ! iscs_save(1,: )=isc%os iscs_save(2,:3)=isc%qs - isc%os=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + ! + isc%os=(/i_c,i_k,1,i_sp_pol/) isc%qs=(/1,1,1/) - + ! call DEV_SUB(scatter_Bamp)(isc) if (have_cuda) call dev_memcpy(isc%rhotw,isc%rhotw_d) ! @@ -433,15 +449,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! in cases where no band loops are done (like here). In _SC instead ! it is needed for a different purpose. This is why I use PAR_COM_QP_A2A%CPU_id in this case. ! -#if defined _SC - if (l_sc_run) then - if (PAR_COM_QP_A2A%CPU_id==0) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) - else -#endif - if (HEAD_QP_cpu) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) -#if defined _SC - endif -#endif + if ( l_sc_run) fill_QP_Sc=PAR_COM_QP_A2A%CPU_id==0 + if (.not.l_sc_run) fill_QP_Sc=HEAD_QP_cpu + ! + if (fill_QP_Sc) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) ! dc=cZERO ! @@ -456,7 +467,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (.not.PAR_IND_G_b%element_1D(ib)) cycle ! - if (q%sstar(iqbz,2)==1) call live_timing(steps=1) + if (iqs==1) call live_timing(steps=1) ! isc%os(1)=ib ! @@ -488,8 +499,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! forall (i_w=1:QP_dSc_steps) W_(i_w)=qp%E(i_qp)+real(i_w-1,SP)*QP_dSc_delta+cI*QP_G_damp ! - E_kmq=E%E(isc%os(1),isc%os(2),isc%os(4)) - f_kmq=E%f(isc%os(1),isc%os(2),isc%os(4)) + E_kmq=E%E(ib,i_kmq,i_sp_pol) + f_kmq=E%f(ib,i_kmq,i_sp_pol) ! #ifdef _CUDA Xng = X%ng @@ -609,7 +620,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! SEX ! - if (l_sc_sex.or.l_cohsex) dc(1)=-4._SP/spin_occ*pi*pre_factor*e%f(isc%os(1),isc%os(2),isc%os(4)) + if (l_sc_sex.or.l_cohsex) dc(1)=-4._SP/spin_occ*pi*pre_factor*e%f(ib,i_kmq,i_sp_pol) ! ! COH (when no empties are used the COH part is indeed calculated above) ! @@ -639,7 +650,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) PPA_R=-X_mat(ig1,ig2,X_range(1))/2._SP*PPA_E*isc%gamp(ig1,ig2) ! dp_dummy=dp_dummy +cmplx(4._SP/spin_occ*pi*PPA_R*eet_factor(ig1,ig2)* & -& QP_ppa_EET_terminator(W_(i_w),E,isc%is,PPA_E,ig1,ig2,isc%qs(2),& +& QP_ppa_EET_terminator(W_(i_w),E,isc%is,PPA_E,ig1,ig2,iqs,& & eet_cutoff0(1),eet_cutoff1(1)),kind=DP) ! enddo @@ -667,10 +678,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_FREE(eet_factor) endif endif - l_X_ALLOC_elemental=.true. -#if defined _SC - l_X_ALLOC_elemental=l_sc_run.and.io_RESPONSE -#endif + if(.not.l_sc_run) l_X_ALLOC_elemental=.true. + if( l_sc_run) l_X_ALLOC_elemental=io_RESPONSE if(l_X_ALLOC_elemental) call X_ALLOC_elemental('X') ! call timing('GW(ppa)',OPR='stop') @@ -689,7 +698,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! AM, Sept 2019. The COH potential seems to break (in some case of a large amount) the ! energy degenerations. ! - if (.not.l_sc_run.and..not.l_rt_carriers_in_use.and.l_QP_symmetrize) then + if (.not.l_sc_run.and.(.not.l_rt_carriers_in_use).and.l_QP_symmetrize) then do i_w=1,QP_dSc_steps if (i_w==1) call QP_states_simmetrize(E,what="COHSEX Sc",V_complex=QP_Sc(:,1),warn_me=.TRUE.) if (i_w> 1) call QP_states_simmetrize(E,V_complex=QP_Sc(:,i_w)) diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index f1259a593b..8f66620ddf 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -69,7 +69,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! !QP list ! - integer :: ik,ikp,iGp,i_sp_pol + integer :: ik,ikp,ikp_s,ikp_bz,i_sp_pol ! ! Resets & basis setup @@ -155,7 +155,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) #if !defined _CUDA ! !!! num_threads(n_outthr) !$omp parallel default(shared), & - !$omp private(isc,iscp,local_rhotw,iq,iq_ibz,is_ibz,ikp,iGp,jb), reduction(+:DP_sx) + !$omp private(isc,iscp,local_rhotw,iq,iq_ibz,is_ibz,ikp,ikp_s,ikp_bz,jb), reduction(+:DP_sx) #endif ! call OPENMP_update(master_thread) @@ -202,14 +202,20 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! m =QP_table(i_qp,2) ! k =QP_table(i_qp,3) ! - ikp=k%sstar(qindx_S(ik,iq,1),1) - iGp=k%sstar(qindx_S(ik,iq,1),2) + ! Note DS 2022/07/29 : i_kp_Go is not used. + ! This is related to issue with HSEX collisions in real-time. + ! See comments in COLLISIONS_HXC and in QP_ppa_cohsex + !i_kp_Go=qindx_S(i_k,iqbz,2) + ikp_bz=qindx_S(ik,iq,1) ! - isc%is =(/ib, ik , 1 ,i_sp_pol/) - isc%os(2:)=(/ ikp,iGp,i_sp_pol/) - iscp%is=(/ibp,ik , 1 ,i_sp_pol/) + ikp =k%sstar(ikp_bz,1) + ikp_s=k%sstar(ikp_bz,2) ! - isc%qs(1)=qindx_S(ik,iq,2) + isc%is =(/ib, ik , 1 ,i_sp_pol/) + isc%os(2:)=(/ ikp,ikp_s,i_sp_pol/) + iscp%is=(/ibp,ik , 1 ,i_sp_pol/) + ! + isc%qs(1)=ikp_bz iscp%qs=isc%qs ! if (pp_is_uspp) then From f03174696bba97214476fe52e66049e726b88a65 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 29 Jul 2022 11:24:22 +0200 Subject: [PATCH 0383/1367] Automatic commit: configure regenerated after merge --- configure | 7792 +++++++++++++++++++++----------------- include/driver/version.h | 4 +- 2 files changed, 4330 insertions(+), 3466 deletions(-) diff --git a/configure b/configure index fd25a7f648..e55c823bf4 100755 --- a/configure +++ b/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.21574 h.08ac288ff. +# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21574 h.08ac288ff. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,42 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -230,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -255,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -311,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -325,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -334,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -373,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -390,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -413,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -442,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -486,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -500,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -513,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -589,40 +619,36 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir MPI_info @@ -771,6 +797,7 @@ FFLAGS F77 FPP CPPFLAGS_yambo +CPP IFLAG FCLIBS OPENMPLIBS @@ -799,6 +826,9 @@ AR MAKE ifGNUmake hostname +SIZEOF_INT_P +SET_MAKE +LIBOBJS host_os host_vendor host_cpu @@ -807,15 +837,9 @@ build_os build_vendor build_cpu build -SIZEOF_INT_P -SET_MAKE -LIBOBJS ALLOCA Y_BRANCH GIT_CHECK -EGREP -GREP -CPP OBJEXT EXEEXT ac_ct_CC @@ -982,10 +1006,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP FC FCFLAGS UFLAGS +CPP FPP F77 FFLAGS @@ -1060,8 +1084,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1102,9 +1124,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1128,9 +1150,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1341,9 +1363,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1357,9 +1379,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1403,9 +1425,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1421,7 +1443,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1485,7 +1507,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1741,10 +1763,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags + CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1771,9 +1793,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1801,7 +1823,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1809,7 +1832,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1819,9 +1842,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Yambo configure 5.1.0 r.21574 h.08ac288ff -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1838,14 +1861,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1853,14 +1876,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1870,176 +1894,6 @@ fi } # ac_fn_c_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------- ## -## Report this to yambo@yambo-code.org ## -## ----------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2047,26 +1901,28 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2078,16 +1934,17 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (ac_aggr.$3) @@ -2096,14 +1953,15 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2112,18 +1970,19 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2135,17 +1994,18 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2153,12 +2013,13 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2166,18 +2027,19 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2188,14 +2050,14 @@ $as_echo "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2203,17 +2065,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2228,72 +2091,48 @@ fi } # ac_fn_c_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#undef $2 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func +} # ac_fn_c_try_run # ac_fn_fc_try_compile LINENO # --------------------------- @@ -2301,14 +2140,14 @@ $as_echo "$ac_res" >&6; } ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2316,14 +2155,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2339,14 +2179,14 @@ fi ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2354,17 +2194,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2379,20 +2220,58 @@ fi } # ac_fn_fc_try_link +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2400,14 +2279,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2423,14 +2303,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2438,17 +2318,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2463,44 +2344,136 @@ fi } # ac_fn_f77_try_link +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ + +#include +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Yambo $as_me 5.1.0 r.21574 h.08ac288ff, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2533,8 +2506,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2569,7 +2546,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2604,11 +2581,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2619,8 +2598,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2644,7 +2623,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2652,14 +2631,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2667,15 +2646,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2683,8 +2662,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2698,63 +2677,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2764,153 +2728,541 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -SVERSION="5" -SSUBVERSION="1" -SPATCHLEVEL="0" -SREVISION="21574" -SHASH="08ac288ff" +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; -# -CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` -if ! test -d $CURRENT_DIR ; then - as_fn_error $? "Make cannot work using paths which include spaces" "$LINENO" 5 -fi -# -compdir=`echo "$PWD"` -# +struct incomplete_array +{ + int datasize; + double data[]; +}; -if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi -if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi -# -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -fi +struct named_init { + int number; + const wchar_t *name; + double average; +}; -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +typedef const char *ccp; +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); -# -# YAMBO SPECIFIC -# -# -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): DS AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/config" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +SVERSION="5" +SSUBVERSION="1" +SPATCHLEVEL="0" +SREVISION="21574" +SHASH="08ac288ff" + + + + + + +# +CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` +if ! test -d $CURRENT_DIR ; then + as_fn_error $? "Make cannot work using paths which include spaces" "$LINENO" 5 +fi +# +compdir=`echo "$PWD"` +# + +if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi +if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi +# + + +# +# YAMBO SPECIFIC +# +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): DS AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; # either version 2, or (at your option) any later version. # # This program is distributed in the hope that it will @@ -2988,9 +3340,10 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test "${with_extlibs_path+set}" = set; then : +if test ${with_extlibs_path+y} +then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else +else $as_nop extlibs_path="${PWD}/lib/external" fi @@ -3001,7 +3354,8 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test "${enable_keep_objects+set}" = set; then : +if test ${enable_keep_objects+y} +then : enableval=$enable_keep_objects; fi @@ -3012,7 +3366,8 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test "${enable_keep_src+set}" = set; then : +if test ${enable_keep_src+y} +then : enableval=$enable_keep_src; fi @@ -3023,7 +3378,8 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test "${enable_keep_extlibs+set}" = set; then : +if test ${enable_keep_extlibs+y} +then : enableval=$enable_keep_extlibs; fi @@ -3041,7 +3397,8 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test "${enable_dp+set}" = set; then : +if test ${enable_dp+y} +then : enableval=$enable_dp; fi @@ -3057,7 +3414,8 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test "${enable_time_profile+set}" = set; then : +if test ${enable_time_profile+y} +then : enableval=$enable_time_profile; fi @@ -3073,7 +3431,8 @@ fi # USPP # # Check whether --enable-uspp was given. -if test "${enable_uspp+set}" = set; then : +if test ${enable_uspp+y} +then : enableval=$enable_uspp; fi @@ -3090,7 +3449,8 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test "${enable_memory_profile+set}" = set; then : +if test ${enable_memory_profile+y} +then : enableval=$enable_memory_profile; fi @@ -3106,7 +3466,8 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test "${enable_msgs_comps+set}" = set; then : +if test ${enable_msgs_comps+y} +then : enableval=$enable_msgs_comps; fi @@ -3123,9 +3484,10 @@ fi # # Check whether --with-editor was given. -if test "${with_editor+set}" = set; then : +if test ${with_editor+y} +then : withval=$with_editor; -else +else $as_nop with_editor="vim vi pico" fi @@ -3133,11 +3495,12 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_editor+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_editor+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3145,11 +3508,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3160,11 +3527,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -$as_echo "$editor" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +printf "%s\n" "$editor" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3179,9 +3546,10 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test "${with_echo+set}" = set; then : +if test ${with_echo+y} +then : withval=$with_echo; -else +else $as_nop with_echo="echo" fi @@ -3194,6 +3562,15 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3202,11 +3579,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3214,11 +3592,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3229,11 +3611,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3242,11 +3624,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3254,11 +3637,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3269,11 +3656,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3281,8 +3668,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3295,11 +3682,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3307,11 +3695,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3322,11 +3714,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3335,11 +3727,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3348,15 +3741,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3372,18 +3769,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3394,11 +3791,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3406,11 +3804,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3421,11 +3823,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3438,11 +3840,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3450,11 +3853,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3465,11 +3872,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3481,8 +3888,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3490,44 +3897,148 @@ esac fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } done + done +IFS=$as_save_IFS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ ; return 0; @@ -3538,9 +4049,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3561,11 +4072,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3582,7 +4094,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3598,44 +4110,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3649,15 +4163,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3666,7 +4180,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3678,8 +4192,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3687,10 +4201,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3698,39 +4212,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3744,11 +4259,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3757,31 +4273,32 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3791,29 +4308,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3822,57 +4343,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3887,515 +4411,198 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +$ac_c_conftest_c11_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$ac_c_conftest_c99_program _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg fi -rm -f conftest.err conftest.i conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - +rm -f conftest.$ac_ext +CC=$ac_save_CC fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi done -ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes; then : + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : have_malloc_h=1 -else +else $as_nop have_malloc_h=0 fi - CFLAGS=$SAVE if test "$have_malloc_h" -ne 0 then ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include " -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : - $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes +then : + printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h fi @@ -4832,11 +5039,12 @@ esac Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT_CHECK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT_CHECK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -4844,11 +5052,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4859,11 +5071,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -$as_echo "$GIT_CHECK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +printf "%s\n" "$GIT_CHECK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4875,42 +5087,60 @@ fi # # Checks for library functions. # ============================================================================ -for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -4918,52 +5148,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_working_alloca_h=yes -else +else $as_nop ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER # include # define alloca _alloca # else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif +# ifdef __cplusplus +extern "C" # endif +void *alloca (size_t); # endif #endif int -main () +main (void) { char *p = (char *) alloca (1); if (p) return 0; @@ -4971,20 +5201,22 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_alloca_works=yes -else +else $as_nop ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } +fi if test $ac_cv_func_alloca_works = yes; then -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -4994,58 +5226,19 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h - done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_c_stack_direction=0 -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5066,9 +5259,10 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_c_stack_direction=1 -else +else $as_nop ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5076,25 +5270,24 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -5107,7 +5300,7 @@ main () /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5135,7 +5328,7 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5151,47 +5344,50 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5208,45 +5404,118 @@ _ACEOF ;; esac -for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if ${ac_cv_func_malloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +printf %s "checking for GNU libc compatible malloc... " >&6; } +if test ${ac_cv_func_malloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif +#include int -main () +main (void) { -return ! malloc (0); +void *p = malloc (0); + int result = !p; + free (p); + return result; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_malloc_0_nonnull=yes -else +else $as_nop ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5254,14 +5523,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes +then : -$as_echo "#define HAVE_MALLOC 1" >>confdefs.h +printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h -else - $as_echo "#define HAVE_MALLOC 0" >>confdefs.h +else $as_nop + printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5270,50 +5540,47 @@ else esac -$as_echo "#define malloc rpl_malloc" >>confdefs.h - -fi - - -for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF +printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if ${ac_cv_func_realloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +printf %s "checking for GNU libc compatible realloc... " >&6; } +if test ${ac_cv_func_realloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif +#include int -main () +main (void) { -return ! realloc (0, 0); +void *p = realloc (0, 0); + int result = !p; + free (p); + return result; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_realloc_0_nonnull=yes -else +else $as_nop ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5321,14 +5588,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes +then : -$as_echo "#define HAVE_REALLOC 1" >>confdefs.h +printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h -else - $as_echo "#define HAVE_REALLOC 0" >>confdefs.h +else $as_nop + printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5337,34 +5605,42 @@ else esac -$as_echo "#define realloc rpl_realloc" >>confdefs.h +printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h fi -if ${ac_cv_func_setvbuf_reversed+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${ac_cv_func_setvbuf_reversed+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_func_setvbuf_reversed=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +printf %s "checking whether lstat correctly handles trailing slash... " >&6; } +if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - ac_cv_func_lstat_dereferences_slashed_symlink=no -else + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5375,9 +5651,10 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else +else $as_nop ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5392,14 +5669,12 @@ fi rm -f conftest.sym conftest.file fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF +printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5411,19 +5686,21 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -$as_echo_n "checking whether stat accepts an empty string... " >&6; } -if ${ac_cv_func_stat_empty_string_bug+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +printf %s "checking whether stat accepts an empty string... " >&6; } +if test ${ac_cv_func_stat_empty_string_bug+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_func_stat_empty_string_bug=yes -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5431,9 +5708,10 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_stat_empty_string_bug=no -else +else $as_nop ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5441,8 +5719,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5451,19 +5729,18 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 -_ACEOF +printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5479,20 +5756,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -$as_echo_n "checking for the size of a pointer... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +printf %s "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5518,12 +5795,10 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -cat >>confdefs.h <<_ACEOF -#define POINTER_SIZE ${ac_pointersize} -_ACEOF +printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -$as_echo "${ac_pointersize} bytes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +printf "%s\n" "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5539,11 +5814,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5551,11 +5827,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5566,11 +5846,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5579,11 +5859,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5591,11 +5872,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5606,11 +5891,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5618,8 +5903,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5632,11 +5917,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5644,11 +5930,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5659,11 +5949,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5672,11 +5962,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5685,15 +5976,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5709,18 +6004,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5731,11 +6026,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5743,11 +6039,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5758,11 +6058,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5775,11 +6075,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5787,11 +6088,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5802,11 +6107,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5818,34 +6123,138 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -5855,20 +6264,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -5878,29 +6288,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -5909,57 +6323,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -5974,94 +6391,144 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -6071,87 +6538,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu # -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - hostname=`uname -n` # ============================================================================ # GNU Make MAKE="make" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -$as_echo_n "checking for GNU make... " >&6; } -if ${_cv_gnu_make_command+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +printf %s "checking for GNU make... " >&6; } +if test ${_cv_gnu_make_command+y} +then : + printf %s "(cached) " >&6 +else $as_nop _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; @@ -6162,14 +6560,14 @@ else done ; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -$as_echo "$_cv_gnu_make_command" >&6; } ; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +printf "%s\n" "$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -$as_echo "\"Not found\"" >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +printf "%s\n" "\"Not found\"" >&6; }; fi @@ -6191,11 +6589,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6203,11 +6602,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6218,11 +6621,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6231,11 +6634,12 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6243,11 +6647,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6258,11 +6666,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6270,8 +6678,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6289,7 +6697,8 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test "${enable_options_check+set}" = set; then : +if test ${enable_options_check+y} +then : enableval=$enable_options_check; fi @@ -6313,11 +6722,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6325,11 +6735,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6340,11 +6754,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +printf "%s\n" "$FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6357,11 +6771,12 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6369,11 +6784,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6384,11 +6803,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +printf "%s\n" "$ac_ct_FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6400,8 +6819,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6410,7 +6829,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6420,7 +6839,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6430,7 +6849,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6439,11 +6858,12 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 +printf %s "checking whether the compiler supports GNU Fortran... " >&6; } +if test ${ac_cv_fc_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6452,43 +6872,48 @@ else end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} +ac_test_FCFLAGS=${FCFLAGS+y} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +printf %s "checking whether $FC accepts -g... " >&6; } +if test ${ac_cv_prog_fc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_g=yes -else +else $as_nop ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +printf "%s\n" "$ac_cv_prog_fc_g" >&6; } +if test $ac_test_FCFLAGS; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6522,8 +6947,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -$as_echo_n "checking if the current OS is supported... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +printf %s "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6557,31 +6982,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -$as_echo "$as_me: Platform <${host}> is not supported." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -$as_echo "$as_me: providing either a list of compilers and options or" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -$as_echo "$as_me: a guest account on this machine." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +printf "%s\n" "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -6597,7 +7022,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test "${with_f90ext+set}" = set; then : +if test ${with_f90ext+y} +then : withval=$with_f90ext; fi @@ -6609,11 +7035,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +printf %s "checking for Fortran flag to compile .f90 files... " >&6; } +if test ${ac_cv_fc_srcext_f90+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6629,17 +7056,18 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -6665,11 +7093,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } -if ${ac_cv_fc_srcext_f+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +printf %s "checking for Fortran flag to compile .f files... " >&6; } +if test ${ac_cv_fc_srcext_f+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6685,17 +7114,18 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -$as_echo "$ac_cv_fc_srcext_f" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -6786,10 +7216,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -$as_echo_n "checking for $FC kind and version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +printf %s "checking for $FC kind and version... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -6806,7 +7236,8 @@ $as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test "${enable_debug_flags+set}" = set; then : +if test ${enable_debug_flags+y} +then : enableval=$enable_debug_flags; fi @@ -7192,35 +7623,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -$as_echo_n "checking for specific $FC flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +printf %s "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -$as_echo "$FCFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +printf "%s\n" "$FCFLAGS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -$as_echo "(User-defined) $FCFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +printf "%s\n" "(User-defined) $FCFLAGS" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -$as_echo_n "checking for specific Open-MP flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -$as_echo "$OMPFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +printf %s "checking for specific Open-MP flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +printf "%s\n" "$OMPFLAGS" >&6; } # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -$as_echo_n "checking for specific $CC flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -$as_echo "$CFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +printf %s "checking for specific $CC flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +printf "%s\n" "$CFLAGS" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -$as_echo_n "checking for specific unoptimized flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +printf %s "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -$as_echo "$FCUFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +printf "%s\n" "$FCUFLAGS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -$as_echo "(User-defined) $UFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +printf "%s\n" "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7231,10 +7662,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -$as_echo_n "checking for specific NETCDF flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -$as_echo "$NETCDFFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +printf %s "checking for specific NETCDF flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +printf "%s\n" "$NETCDFFLAGS" >&6; } # @@ -7256,7 +7687,8 @@ FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" # OpenMP # # Check whether --enable-open-mp was given. -if test "${enable_open_mp+set}" = set; then : +if test ${enable_open_mp+y} +then : enableval=$enable_open_mp; fi @@ -7278,17 +7710,19 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +printf %s "checking how to get verbose linking output from $FC... " >&6; } +if test ${ac_cv_prog_fc_v+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7306,13 +7740,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 +printf "%s\n" "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7379,23 +7813,24 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +printf "%s\n" "$ac_cv_prog_fc_v" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +printf %s "checking for Fortran libraries of $FC... " >&6; } +if test ${ac_cv_fc_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7414,13 +7849,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 +printf "%s\n" "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7497,9 +7932,10 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -7512,9 +7948,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -7529,9 +7966,24 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) + # Ignore this library only on Windows-like systems. case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + cygwin* | msys* ) ;; + *) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue +then : + +else $as_nop + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi ;; esac ;; @@ -7549,7 +8001,7 @@ fi esac ;; -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -7558,9 +8010,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -7575,15 +8028,17 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; + -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -7595,7 +8050,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -7610,8 +8065,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +printf "%s\n" "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -7626,11 +8081,12 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +printf %s "checking for dummy main to link with Fortran libraries... " >&6; } +if test ${ac_cv_fc_dummy_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -7653,19 +8109,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=none -else +else $as_nop ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -7682,17 +8139,18 @@ rm -f core conftest.err conftest.$ac_objext \ #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi @@ -7705,25 +8163,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : +if test "$FC_DUMMY_MAIN" != unknown +then : if test $FC_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF +printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -7738,11 +8195,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +printf %s "checking for Fortran name-mangling scheme... " >&6; } +if test ${ac_cv_fc_mangling+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -7751,7 +8209,8 @@ else return end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -7772,9 +8231,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -7785,17 +8241,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done done @@ -7830,9 +8287,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -7843,17 +8297,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -7883,17 +8338,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +printf "%s\n" "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7916,7 +8371,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -7931,10 +8387,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -7945,7 +8402,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7953,7 +8410,8 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -7968,10 +8426,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -7982,12 +8441,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -$as_echo "$msg" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +printf %s "checking for external C routine (test) naming scheme... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +printf "%s\n" "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7995,48 +8454,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8095,11 +8554,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } -if ${ac_cv_fc_freeform+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } +if test ${ac_cv_fc_freeform+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8114,17 +8574,18 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -$as_echo "$ac_cv_fc_freeform" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +printf "%s\n" "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8149,11 +8610,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } -if ${ax_cv_f90_modflag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +printf %s "checking fortran 90 modules inclusion flag... " >&6; } +if test ${ax_cv_f90_modflag+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8176,10 +8638,11 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do @@ -8195,17 +8658,160 @@ for ax_flag in "-I" "-M" "-p"; do end program conftest_program _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ax_cv_f90_modflag="$ax_flag" +if ac_fn_fc_try_compile "$LINENO" +then : + ax_cv_f90_modflag="$ax_flag" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + FCFLAGS="$ax_save_FCFLAGS" + fi +done +rm -fr tmpdir_$i +if test "$ax_cv_f90_modflag" = "not found" ; then + as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +printf "%s\n" "$ax_cv_f90_modflag" >&6; } +IFLAG="$ax_cv_f90_modflag" +if test -z "$IFLAG" ; then IFLAG="-I" ; fi + +# +# ============================================================================ +# CPP check & flags +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - FCFLAGS="$ax_save_FCFLAGS" - fi +rm -f conftest.err conftest.i conftest.$ac_ext + done -rm -fr tmpdir_$i -if test "$ax_cv_f90_modflag" = "not found" ; then - as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8213,15 +8819,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -$as_echo "$ax_cv_f90_modflag" >&6; } -IFLAG="$ax_cv_f90_modflag" -if test -z "$IFLAG" ; then IFLAG="-I" ; fi - -# -# ============================================================================ -# CPP check & flags # case "${CPP}" in @@ -8270,8 +8867,8 @@ case "${CPP}" in esac # # -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} # # TESTS #======= @@ -8288,8 +8885,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -$as_echo_n "checking if C precompiler works on C source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +printf %s "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8301,14 +8898,15 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : acx_C_ok=yes -else +else $as_nop CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -$as_echo "$acx_C_ok" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +printf "%s\n" "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -8356,8 +8954,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -8366,8 +8964,8 @@ $as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -$as_echo_n "checking if FC precompiler works on FC source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +printf %s "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -8394,8 +8992,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -$as_echo "$acx_FC_ok" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +printf "%s\n" "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -8424,11 +9022,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_F77+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -8436,11 +9035,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8451,11 +9054,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +printf "%s\n" "$F77" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8468,11 +9071,12 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_F77+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -8480,11 +9084,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8495,11 +9103,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +printf "%s\n" "$ac_ct_F77" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8511,8 +9119,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -8521,7 +9129,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -8531,7 +9139,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -8541,7 +9149,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -8550,11 +9158,12 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if ${ac_cv_f77_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 +printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } +if test ${ac_cv_f77_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -8563,43 +9172,48 @@ else end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} +ac_test_FFLAGS=${FFLAGS+y} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if ${ac_cv_prog_f77_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +printf %s "checking whether $F77 accepts -g... " >&6; } +if test ${ac_cv_prog_f77_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_cv_prog_f77_g=yes -else +else $as_nop ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +printf "%s\n" "$ac_cv_prog_f77_g" >&6; } +if test $ac_test_FFLAGS; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -8625,23 +9239,24 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO" +then : + acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8709,7 +9324,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test "${enable_mpi+set}" = set; then : +if test ${enable_mpi+y} +then : enableval=$enable_mpi; fi @@ -8740,11 +9356,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIFC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIFC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -8752,11 +9369,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8767,11 +9388,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -$as_echo "$MPIFC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +printf "%s\n" "$MPIFC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8780,12 +9401,13 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -$as_echo_n "checking for $MPIFC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +printf %s "checking for $MPIFC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -8795,20 +9417,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIFC_test=$MPIFC -else +else $as_nop for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIFC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIFC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -8816,11 +9440,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8831,11 +9459,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -$as_echo "$MPIFC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +printf "%s\n" "$MPIFC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8851,22 +9479,23 @@ fi if test "$acx_mpi_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +printf %s "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_mpi_ok="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -8886,10 +9515,11 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -$as_echo_n "checking for a working mpif.h... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +printf %s "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8900,21 +9530,23 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -$as_echo_n "checking for a working mpi.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +printf %s "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8925,20 +9557,22 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -$as_echo_n "checking for a working mpi module... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +printf %s "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8949,14 +9583,15 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi # # @@ -8968,12 +9603,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9004,12 +9639,13 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -$as_echo_n "checking for $MPIF77... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +printf %s "checking for $MPIF77... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9019,20 +9655,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIF77_test=$MPIF77 -else +else $as_nop for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9040,11 +9678,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9055,11 +9697,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9070,12 +9712,13 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -$as_echo_n "checking for $MPIFC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +printf %s "checking for $MPIFC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9085,20 +9728,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIF77_test=$MPIFC -else +else $as_nop for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9106,11 +9751,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9121,11 +9770,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9140,11 +9789,12 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9152,11 +9802,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9167,11 +9821,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9185,22 +9839,23 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +printf %s "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO"; then : +if ac_fn_f77_try_link "$LINENO" +then : ac_mpi_ok="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -9236,12 +9891,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9277,11 +9932,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPICC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPICC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9289,11 +9945,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9304,11 +9964,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -$as_echo "$MPICC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +printf "%s\n" "$MPICC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9317,12 +9977,13 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -$as_echo_n "checking for $MPICC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +printf %s "checking for $MPICC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -9332,24 +9993,26 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else +else $as_nop for ac_prog in $MPICC mpipgicc mpiicc mpicc hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPICC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPICC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9357,11 +10020,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9372,11 +10039,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -$as_echo "$MPICC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +printf "%s\n" "$MPICC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9393,7 +10060,8 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes; then : +if test "x$ac_cv_func_MPI_Init" = xyes +then : acx_mpi_ok="yes" fi @@ -9408,8 +10076,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -$as_echo_n "checking for a working mpi.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +printf %s "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9422,21 +10090,22 @@ $as_echo_n "checking for a working mpi.h... " >&6; } #endif #endif int -main () +main (void) { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; };acx_mpi_ok="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -9461,12 +10130,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9505,10 +10174,10 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -$as_echo_n "checking for MPI version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -$as_echo "$MPIKIND" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +printf %s "checking for MPI version... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +printf "%s\n" "$MPIKIND" >&6; } # @@ -9528,25 +10197,29 @@ fi # Check whether --with-mpi_libs was given. -if test "${with_mpi_libs+set}" = set; then : +if test ${with_mpi_libs+y} +then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test "${with_mpi_path+set}" = set; then : +if test ${with_mpi_path+y} +then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test "${with_mpi_libdir+set}" = set; then : +if test ${with_mpi_libdir+y} +then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test "${with_mpi_includedir+set}" = set; then : +if test ${with_mpi_includedir+y} +then : withval=$with_mpi_includedir; fi @@ -9622,12 +10295,13 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -9637,11 +10311,12 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : mpif_found_tmp="yes" -else +else $as_nop mpif_found_tmp="no" fi @@ -9936,9 +10611,10 @@ DRIVER_INCS="-I$PWD/lib/yambo/driver/include/ -I$PWD/include/driver" # # Check whether --with-yambo-libs-branch was given. -if test "${with_yambo_libs_branch+set}" = set; then : +if test ${with_yambo_libs_branch+y} +then : withval=$with_yambo_libs_branch; -else +else $as_nop with_yambo_libs_branch=none fi @@ -9952,7 +10628,8 @@ fi # # Check whether --enable-ydb was given. -if test "${enable_ydb+set}" = set; then : +if test ${enable_ydb+y} +then : enableval=$enable_ydb; fi @@ -9966,11 +10643,12 @@ if test "x$enable_ydb" = "xyes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -9978,11 +10656,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9993,11 +10675,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -$as_echo "$GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +printf "%s\n" "$GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -10006,11 +10688,12 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10018,11 +10701,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10033,11 +10720,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -$as_echo "$ac_ct_GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +printf "%s\n" "$ac_ct_GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10045,8 +10732,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10058,14 +10745,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -$as_echo_n "checking YDB from $url_ydb... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +printf %s "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10075,8 +10762,8 @@ $as_echo_n "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10090,17 +10777,19 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } -if ${ac_cv_prog_f77_v+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +printf %s "checking how to get verbose linking output from $F77... " >&6; } +if test ${ac_cv_prog_f77_v+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10118,13 +10807,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_f77_v_output" >&5 +printf "%s\n" "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10191,23 +10880,24 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -$as_echo "$ac_cv_prog_f77_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } -if ${ac_cv_f77_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +printf "%s\n" "$ac_cv_prog_f77_v" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +printf %s "checking for Fortran 77 libraries of $F77... " >&6; } +if test ${ac_cv_f77_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10226,13 +10916,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_f77_v_output" >&5 +printf "%s\n" "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10309,9 +10999,10 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -10324,9 +11015,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" @@ -10341,9 +11033,24 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) + # Ignore this library only on Windows-like systems. case $host_os in - *cygwin*) ;; - *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + cygwin* | msys* ) ;; + *) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue +then : + +else $as_nop + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi ;; esac ;; @@ -10361,7 +11068,7 @@ fi esac ;; -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -10370,9 +11077,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -10387,15 +11095,17 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; + -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -10407,7 +11117,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_f77_v_output" | + ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -10422,8 +11132,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -$as_echo "$ac_cv_f77_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +printf "%s\n" "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -10439,17 +11149,20 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test "${with_blas_libs+set}" = set; then : +if test ${with_blas_libs+y} +then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test "${enable_int_linalg+set}" = set; then : +if test ${enable_int_linalg+y} +then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test "${enable_openmp_int_linalg+set}" = set; then : +if test ${enable_openmp_int_linalg+y} +then : enableval=$enable_openmp_int_linalg; fi @@ -10457,7 +11170,8 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test "${with_blas_libs+set}" = set; then : +if test ${with_blas_libs+y} +then : withval=$with_blas_libs; fi @@ -10482,22 +11196,23 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_blas_ok=yes -else +else $as_nop BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -$as_echo "$acx_blas_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +printf "%s\n" "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -10506,9 +11221,10 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : acx_blas_ok=yes fi @@ -10517,11 +11233,12 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } -if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +printf %s "checking for ATL_xerbla in -latlas... " >&6; } +if test ${ac_cv_lib_atlas_ATL_xerbla+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10529,24 +11246,27 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_atlas_ATL_xerbla=yes -else +else $as_nop ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : - as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +printf %s "checking for $caxpy in -lf77blas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10554,24 +11274,27 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } -if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +printf %s "checking for cblas_daxpy in -lcblas... " >&6; } +if test ${ac_cv_lib_cblas_cblas_daxpy+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10579,18 +11302,20 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_cblas_cblas_daxpy=yes -else +else $as_nop ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes +then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -10603,12 +11328,13 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10616,25 +11342,28 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +printf %s "checking for $daxpy in -ldaxpy... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10642,25 +11371,28 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +printf %s "checking for $caxpy in -lcaxpy... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10668,19 +11400,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -10692,12 +11426,13 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -$as_echo_n "checking for $caxpy in -lcxml... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +printf %s "checking for $caxpy in -lcxml... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10705,19 +11440,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -10725,12 +11462,13 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -$as_echo_n "checking for $caxpy in -ldxml... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +printf %s "checking for $caxpy in -ldxml... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10738,19 +11476,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -10759,11 +11499,12 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -$as_echo_n "checking for acosp in -lsunmath... " >&6; } -if ${ac_cv_lib_sunmath_acosp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +printf %s "checking for acosp in -lsunmath... " >&6; } +if test ${ac_cv_lib_sunmath_acosp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10771,24 +11512,27 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_sunmath_acosp=yes -else +else $as_nop ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : - as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +printf %s "checking for $caxpy in -lsunperf... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10796,19 +11540,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -10820,12 +11566,13 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -$as_echo_n "checking for $caxpy in -lscs... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +printf %s "checking for $caxpy in -lscs... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10833,19 +11580,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -10853,12 +11602,13 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10866,19 +11616,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -10886,12 +11638,13 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10899,25 +11652,28 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -$as_echo_n "checking for $caxpy in -lessl... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +printf %s "checking for $caxpy in -lessl... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10925,19 +11681,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -10953,12 +11711,13 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10966,30 +11725,33 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +printf %s "checking for $caxpy in -lmkl_gf... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10997,19 +11759,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11021,12 +11785,13 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11034,30 +11799,33 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +printf %s "checking for $caxpy in -lmkl_intel... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11065,19 +11833,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11088,12 +11858,13 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11101,19 +11872,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11124,7 +11897,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -$as_echo "#define HAVE_BLAS 1" >>confdefs.h +printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11134,12 +11907,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11176,11 +11949,12 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if ${ac_cv_f77_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if test ${ac_cv_f77_dummy_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -11211,19 +11985,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=none -else +else $as_nop ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -11248,17 +12023,18 @@ rm -f core conftest.err conftest.$ac_objext \ #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi @@ -11271,25 +12047,24 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -$as_echo "$ac_cv_f77_dummy_main" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown; then : +if test "$F77_DUMMY_MAIN" != unknown +then : if test $F77_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define F77_DUMMY_MAIN $F77_DUMMY_MAIN -_ACEOF +printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -11303,11 +12078,12 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } -if ${ac_cv_f77_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } +if test ${ac_cv_f77_mangling+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -11316,7 +12092,8 @@ else return end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -11337,9 +12114,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11358,17 +12132,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done done @@ -11403,9 +12178,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11424,17 +12196,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -11464,17 +12237,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -$as_echo "$ac_cv_f77_mangling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +printf "%s\n" "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -11488,7 +12261,8 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test "${with_lapack_libs+set}" = set; then : +if test ${with_lapack_libs+y} +then : withval=$with_lapack_libs; fi @@ -11514,22 +12288,23 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_lapack_ok=yes -else +else $as_nop LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -$as_echo "$acx_lapack_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +printf "%s\n" "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -11539,9 +12314,10 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : acx_lapack_ok=yes fi @@ -11552,12 +12328,13 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -$as_echo_n "checking for $cheev in -l$lapack... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +printf %s "checking for $cheev in -l$lapack... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11565,19 +12342,21 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -11609,22 +12388,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_dlaran_ok=yes -else +else $as_nop acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -$as_echo "$acx_dlaran_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +printf "%s\n" "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -11632,7 +12412,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -$as_echo "#define HAVE_LAPACK 1" >>confdefs.h +printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -11642,12 +12422,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -11670,52 +12450,60 @@ fi # Check whether --with-fft_libs was given. -if test "${with_fft_libs+set}" = set; then : +if test ${with_fft_libs+y} +then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test "${with_fft_path+set}" = set; then : +if test ${with_fft_path+y} +then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test "${with_fft_libdir+set}" = set; then : +if test ${with_fft_libdir+y} +then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test "${with_fft_includedir+set}" = set; then : +if test ${with_fft_includedir+y} +then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test "${enable_internal_fftqe+set}" = set; then : +if test ${enable_internal_fftqe+y} +then : enableval=$enable_internal_fftqe; -else +else $as_nop enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test "${enable_internal_fftsg+set}" = set; then : +if test ${enable_internal_fftsg+y} +then : enableval=$enable_internal_fftsg; -else +else $as_nop enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test "${enable_3d_fft+set}" = set; then : +if test ${enable_3d_fft+y} +then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test "${with_fftsg_fac+set}" = set; then : +if test ${with_fftsg_fac+y} +then : withval=$with_fftsg_fac; fi @@ -11740,10 +12528,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -11759,16 +12547,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +printf %s "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } fi # # check for FFTW @@ -11831,22 +12619,24 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_FFTW="yes"; -else +else $as_nop HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_FFTW_OMP="yes"; -else +else $as_nop HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -11858,18 +12648,18 @@ rm -f core conftest.err conftest.$ac_objext \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -$as_echo "FFTW3" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +printf "%s\n" "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -$as_echo "FFTW3_OMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +printf "%s\n" "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -$as_echo "FFTW ($desc) " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +printf "%s\n" "FFTW ($desc) " >&6; } fi else def_fft="" @@ -11884,8 +12674,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -11895,8 +12685,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -$as_echo "FFTW no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +printf "%s\n" "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -11906,30 +12696,31 @@ $as_echo "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -$as_echo_n "checking for dcft in $LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +printf %s "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_ESSL=yes -else +else $as_nop HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -$as_echo "$HAVE_ESSL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +printf "%s\n" "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -11941,8 +12732,8 @@ $as_echo_n "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -$as_echo "ESSL FFT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +printf "%s\n" "ESSL FFT" >&6; } fi fi # @@ -11951,8 +12742,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -11989,8 +12780,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -$as_echo "Internal FFTQE (FFTW2)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12016,8 +12807,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -$as_echo "FFTSG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +printf "%s\n" "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12038,8 +12829,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -$as_echo "Internal FFTW3" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +printf "%s\n" "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12053,48 +12844,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12103,7 +12894,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - $as_echo "#define _FFTQE 1" >>confdefs.h + printf "%s\n" "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12125,69 +12916,80 @@ fi # # Check whether --enable-slepc_linalg was given. -if test "${enable_slepc_linalg+set}" = set; then : +if test ${enable_slepc_linalg+y} +then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test "${with_slepc_libs+set}" = set; then : +if test ${with_slepc_libs+y} +then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test "${with_slepc_incs+set}" = set; then : +if test ${with_slepc_incs+y} +then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test "${with_slepc_path+set}" = set; then : +if test ${with_slepc_path+y} +then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test "${with_slepc_libdir+set}" = set; then : +if test ${with_slepc_libdir+y} +then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test "${with_slepc_includedir+set}" = set; then : +if test ${with_slepc_includedir+y} +then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test "${with_petsc_libs+set}" = set; then : +if test ${with_petsc_libs+y} +then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test "${with_petsc_incs+set}" = set; then : +if test ${with_petsc_incs+y} +then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test "${with_petsc_path+set}" = set; then : +if test ${with_petsc_path+y} +then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test "${with_petsc_libdir+set}" = set; then : +if test ${with_petsc_libdir+y} +then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test "${with_petsc_includedir+set}" = set; then : +if test ${with_petsc_includedir+y} +then : withval=$with_petsc_includedir; fi @@ -12211,11 +13013,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12224,9 +13027,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -12245,27 +13045,29 @@ char dlopen (); #endif #endif int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : use_libdl="yes"; -else +else $as_nop use_libdl="no"; fi @@ -12300,12 +13102,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -12348,23 +13150,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : petsc=yes -else +else $as_nop petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # fi # @@ -12377,8 +13180,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -$as_echo_n "checking for internal Petsc library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +printf %s "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # @@ -12390,12 +13193,12 @@ $as_echo_n "checking for internal Petsc library... " >&6; } petsc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; then compile_petsc="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_petsc="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi # fi @@ -12422,12 +13225,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -12466,24 +13269,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : slepc=yes -else +else $as_nop slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # fi # @@ -12497,8 +13301,8 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -$as_echo_n "checking for internal Slepc library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +printf %s "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # @@ -12508,12 +13312,12 @@ $as_echo_n "checking for internal Slepc library... " >&6; } slepc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; then compile_slepc="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_slepc="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -12537,19 +13341,22 @@ fi # Check whether --enable-par_linalg was given. -if test "${enable_par_linalg+set}" = set; then : +if test ${enable_par_linalg+y} +then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test "${with_blacs_libs+set}" = set; then : +if test ${with_blacs_libs+y} +then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test "${with_scalapack_libs+set}" = set; then : +if test ${with_scalapack_libs+y} +then : withval=$with_scalapack_libs; fi @@ -12631,22 +13438,23 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : enable_blacs="yes" -else +else $as_nop enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -$as_echo "$enable_blacs" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +printf "%s\n" "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -12661,22 +13469,23 @@ $as_echo "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : enable_scalapack="yes" -else +else $as_nop enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -$as_echo "$enable_scalapack" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +printf "%s\n" "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -12750,25 +13559,29 @@ LIBS="$reset_LIBS" # # Check whether --with-hdf5_libs was given. -if test "${with_hdf5_libs+set}" = set; then : +if test ${with_hdf5_libs+y} +then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test "${with_hdf5_path+set}" = set; then : +if test ${with_hdf5_path+y} +then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test "${with_hdf5_libdir+set}" = set; then : +if test ${with_hdf5_libdir+y} +then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test "${with_hdf5_includedir+set}" = set; then : +if test ${with_hdf5_includedir+y} +then : withval=$with_hdf5_includedir; fi @@ -12776,7 +13589,8 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test "${enable_hdf5_compression+set}" = set; then : +if test ${enable_hdf5_compression+y} +then : enableval=$enable_hdf5_compression; fi @@ -12784,9 +13598,10 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test "${enable_hdf5_par_io+set}" = set; then : +if test ${enable_hdf5_par_io+y} +then : enableval=$enable_hdf5_par_io; -else +else $as_nop enable_hdf5_par_io="yes" fi @@ -12794,7 +13609,8 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test "${enable_hdf5_p2y_support+set}" = set; then : +if test ${enable_hdf5_p2y_support+y} +then : enableval=$enable_hdf5_p2y_support; fi @@ -12825,12 +13641,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -$as_echo_n "checking for deflate in -lz ... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +printf %s "checking for deflate in -lz ... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12839,9 +13656,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -12860,36 +13674,39 @@ char deflate (); #endif #endif int -main () +main (void) { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : use_libz="yes"; -else +else $as_nop use_libz="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -$as_echo_n "checking for deflate in -lsz... " >&6; } -if ${ac_cv_lib_sz_deflate+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +printf %s "checking for deflate in -lsz... " >&6; } +if test ${ac_cv_lib_sz_deflate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12898,9 +13715,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -12919,35 +13733,38 @@ char deflate (); #endif #endif int -main () +main (void) { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_sz_deflate=yes -else +else $as_nop ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -$as_echo "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes +then : use_libsz="yes"; -else +else $as_nop use_libsz="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12956,9 +13773,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -12977,35 +13791,38 @@ char dlopen (); #endif #endif int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : use_libdl="yes"; -else +else $as_nop use_libdl="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -$as_echo_n "checking for curl_version in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_version+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +printf %s "checking for curl_version in -lcurl... " >&6; } +if test ${ac_cv_lib_curl_curl_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13014,9 +13831,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13035,35 +13849,38 @@ char curl_version (); #endif #endif int -main () +main (void) { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_curl_curl_version=yes -else +else $as_nop ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -$as_echo "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes +then : use_libcurl="yes"; -else +else $as_nop use_libcurl="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +printf %s "checking for cos in -lm... " >&6; } +if test ${ac_cv_lib_m_cos+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13072,9 +13889,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -13093,27 +13907,29 @@ char cos (); #endif #endif int -main () +main (void) { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_m_cos=yes -else +else $as_nop ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +printf "%s\n" "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes +then : use_libm="yes"; -else +else $as_nop use_libm="no"; fi @@ -13157,8 +13973,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # if test x"$with_hdf5_libs" != "x" ; then # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 -$as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 +printf %s "checking for HDF5 using $with_hdf5_libs... " >&6; } ; try_HDF5_LIBS="$with_hdf5_libs" ; if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi # @@ -13179,12 +13995,13 @@ $as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13194,8 +14011,8 @@ rm -f core conftest.err conftest.$ac_objext \ # # Automatic detection of hdf5 libs copied from QE # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -13241,22 +14058,23 @@ $as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +printf %s "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -13296,12 +14114,13 @@ $as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13313,13 +14132,13 @@ rm -f core conftest.err conftest.$ac_objext \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -$as_echo "yes - parallel lib found" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +printf "%s\n" "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -$as_echo "yes - serial lib found" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +printf "%s\n" "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -13327,13 +14146,13 @@ $as_echo "yes - serial lib found" >&6; } ; fi # if test "x$hdf5" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -$as_echo_n "checking for internal HDF5 library... " >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +printf %s "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -13349,8 +14168,8 @@ $as_echo_n "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -13358,8 +14177,8 @@ $as_echo "already compiled" >&6; } ; IO_LIB_VER="parallel"; HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -$as_echo "already compiled (using parallel version)" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +printf "%s\n" "already compiled (using parallel version)" >&6; } ; # else # @@ -13368,8 +14187,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; # fi # @@ -13426,50 +14245,58 @@ fi # Check whether --with-netcdf_libs was given. -if test "${with_netcdf_libs+set}" = set; then : +if test ${with_netcdf_libs+y} +then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test "${with_netcdf_path+set}" = set; then : +if test ${with_netcdf_path+y} +then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test "${with_netcdf_libdir+set}" = set; then : +if test ${with_netcdf_libdir+y} +then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test "${with_netcdf_includedir+set}" = set; then : +if test ${with_netcdf_includedir+y} +then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test "${with_netcdff_libs+set}" = set; then : +if test ${with_netcdff_libs+y} +then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test "${with_netcdff_path+set}" = set; then : +if test ${with_netcdff_path+y} +then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test "${with_netcdff_libdir+set}" = set; then : +if test ${with_netcdff_libdir+y} +then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test "${with_netcdff_includedir+set}" = set; then : +if test ${with_netcdff_includedir+y} +then : withval=$with_netcdff_includedir; fi @@ -13477,7 +14304,8 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test "${enable_netcdf_classic+set}" = set; then : +if test ${enable_netcdf_classic+y} +then : enableval=$enable_netcdf_classic; fi @@ -13485,7 +14313,8 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test "${enable_netcdf_par_io+set}" = set; then : +if test ${enable_netcdf_par_io+y} +then : enableval=$enable_netcdf_par_io; fi @@ -13493,7 +14322,8 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test "${enable_netcdf_v3+set}" = set; then : +if test ${enable_netcdf_v3+y} +then : enableval=$enable_netcdf_v3; fi @@ -13501,7 +14331,8 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test "${enable_hdf5_compression+set}" = set; then : +if test ${enable_hdf5_compression+y} +then : enableval=$enable_hdf5_compression; fi @@ -13509,7 +14340,8 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test "${enable_netcdf_output+set}" = set; then : +if test ${enable_netcdf_output+y} +then : enableval=$enable_netcdf_output; fi @@ -13547,10 +14379,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -13613,8 +14445,8 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi if test -d "$with_pnetcdf_includedir" ; then try_PNETCDF_INCS="$IFLAG$with_pnetcdf_includedir" ; fi @@ -13622,8 +14454,8 @@ $as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; try_PNETCDF_LIBS="$with_pnetcdf_libs" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # fi # @@ -13648,16 +14480,17 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : netcdf=yes -else +else $as_nop netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; @@ -13665,8 +14498,8 @@ $as_echo "yes" >&6; } ; PNETCDF_INCS="$try_PNETCDF_INCS" ; PNETCDF_LIBS="$try_PNETCDF_LIBS" ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -13677,8 +14510,8 @@ $as_echo "no" >&6; } ; # # internal netcdf # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -$as_echo_n "checking for internal NetCDF library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +printf %s "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -13712,22 +14545,22 @@ $as_echo_n "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PATH}/lib/libpnetcdf.a"; then compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi fi # @@ -13762,12 +14595,13 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : netcdf=yes -else +else $as_nop netcdf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -13775,8 +14609,8 @@ rm -f core conftest.err conftest.$ac_objext \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; # fi # @@ -13784,11 +14618,11 @@ $as_echo "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -$as_echo_n "checking for internal NETCDF library... " >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +printf %s "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -13807,8 +14641,8 @@ $as_echo_n "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -13818,8 +14652,8 @@ $as_echo "already compiled" >&6; } ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -$as_echo "already compiled (using parallel version)" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +printf "%s\n" "already compiled (using parallel version)" >&6; } ; # else # @@ -13828,8 +14662,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; # fi # @@ -13921,32 +14755,37 @@ fi # Check whether --enable-yaml_output was given. -if test "${enable_yaml_output+set}" = set; then : +if test ${enable_yaml_output+y} +then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test "${with_yaml_libs+set}" = set; then : +if test ${with_yaml_libs+y} +then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test "${with_yaml_libdir+set}" = set; then : +if test ${with_yaml_libdir+y} +then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test "${with_yaml_libdir+set}" = set; then : +if test ${with_yaml_libdir+y} +then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test "${with_yaml_includedir+set}" = set; then : +if test ${with_yaml_includedir+y} +then : withval=$with_yaml_includedir; fi @@ -13955,25 +14794,29 @@ fi # Check whether --with-futile_libs was given. -if test "${with_futile_libs+set}" = set; then : +if test ${with_futile_libs+y} +then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test "${with_futile_libdir+set}" = set; then : +if test ${with_futile_libdir+y} +then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test "${with_futile_libdir+set}" = set; then : +if test ${with_futile_libdir+y} +then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test "${with_futile_includedir+set}" = set; then : +if test ${with_futile_includedir+y} +then : withval=$with_futile_includedir; fi @@ -13996,10 +14839,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14018,55 +14861,55 @@ $as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -$as_echo_n "checking for internal YAML library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +printf %s "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } else compile_yaml="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -$as_echo_n "checking for YAML library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +printf %s "checking for YAML library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -14090,10 +14933,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -14112,55 +14955,55 @@ $as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -$as_echo_n "checking for internal FUTILE library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +printf %s "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } else compile_futile="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -$as_echo_n "checking for FUTILE library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +printf %s "checking for FUTILE library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -14186,33 +15029,38 @@ fi # Check whether --enable-iotk was given. -if test "${enable_iotk+set}" = set; then : +if test ${enable_iotk+y} +then : enableval=$enable_iotk; -else +else $as_nop enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test "${with_iotk_libs+set}" = set; then : +if test ${with_iotk_libs+y} +then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test "${with_iotk_path+set}" = set; then : +if test ${with_iotk_path+y} +then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test "${with_iotk_libdir+set}" = set; then : +if test ${with_iotk_libdir+y} +then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test "${with_iotk_includedir+set}" = set; then : +if test ${with_iotk_includedir+y} +then : withval=$with_iotk_includedir; fi @@ -14233,10 +15081,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -14256,38 +15104,38 @@ $as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir_src" IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" IOTK_LIBS="$try_iotk_libdir/libiotk.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -$as_echo_n "checking for internal IOTK library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +printf %s "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" @@ -14295,21 +15143,21 @@ $as_echo_n "checking for internal IOTK library... " >&6; } if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -$as_echo_n "checking for IOTK library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +printf %s "checking for IOTK library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # PW_VER="no-hdf5-support" @@ -14337,33 +15185,38 @@ fi # Check whether --enable-etsf_io was given. -if test "${enable_etsf_io+set}" = set; then : +if test ${enable_etsf_io+y} +then : enableval=$enable_etsf_io; -else +else $as_nop enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test "${with_etsf_io_libs+set}" = set; then : +if test ${with_etsf_io_libs+y} +then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test "${with_etsf_io_path+set}" = set; then : +if test ${with_etsf_io_path+y} +then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test "${with_etsf_io_libdir+set}" = set; then : +if test ${with_etsf_io_libdir+y} +then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test "${with_etsf_io_includedir+set}" = set; then : +if test ${with_etsf_io_includedir+y} +then : withval=$with_etsf_io_includedir; fi @@ -14390,10 +15243,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -14412,50 +15265,50 @@ $as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else # # internal ETSF_IO # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -$as_echo_n "checking for internal ETSF_IO Library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +printf %s "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -$as_echo "found already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +printf "%s\n" "found already compiled" >&6; } else compile_etsf="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } fi fi # else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -$as_echo_n "checking for ETSF_IO Library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +printf %s "checking for ETSF_IO Library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # @@ -14473,25 +15326,29 @@ compile_libxc=yes # Check whether --with-libxc_libs was given. -if test "${with_libxc_libs+set}" = set; then : +if test ${with_libxc_libs+y} +then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test "${with_libxc_path+set}" = set; then : +if test ${with_libxc_path+y} +then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test "${with_libxc_libdir+set}" = set; then : +if test ${with_libxc_libdir+y} +then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test "${with_libxc_includedir+set}" = set; then : +if test ${with_libxc_includedir+y} +then : withval=$with_libxc_includedir; fi @@ -14512,8 +15369,8 @@ LIBXC_INCS="$IFLAG$libxc_incdir" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -$as_echo_n "checking for libxc... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +printf %s "checking for libxc... " >&6; } testprog=" program main @@ -14533,10 +15390,11 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14547,10 +15405,11 @@ if test x"$acx_libxc_ok" = xno && test ! -z "$with_libxc_libs" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14561,10 +15420,11 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14575,10 +15435,11 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14654,66 +15515,71 @@ if test x"$acx_libxc_ok" = xyes; then cat > conftest.$ac_ext <<_ACEOF $testprog_11 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=110, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_12 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_20 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=200, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_203 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=203, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_21 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=210, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_4x _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=400, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_5x _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=5, acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -cat >>confdefs.h <<_ACEOF -#define LIBXC_VERSION $acx_libxc_version -_ACEOF +printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi if test x"$acx_libxc_ok" = xyes; then @@ -14721,7 +15587,7 @@ if test x"$acx_libxc_ok" = xyes; then internal_libxc=no # -$as_echo "#define HAVE_LIBXC 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h fi @@ -14733,12 +15599,12 @@ if test x"$acx_libxc_ok" = xno; then LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } else compile_libxc="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } fi fi @@ -14754,13 +15620,15 @@ LIBS="$acx_libxc_save_LIBS" # # Check whether --enable-cuda was given. -if test "${enable_cuda+set}" = set; then : +if test ${enable_cuda+y} +then : enableval=$enable_cuda; fi # # Check whether --enable-nvtx was given. -if test "${enable_nvtx+set}" = set; then : +if test ${enable_nvtx+y} +then : enableval=$enable_nvtx; fi @@ -14786,41 +15654,41 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" # cc60 for Pascal cards (eg P100) # cc70 for Volta cards (eg V100) # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 -$as_echo_n "checking for CUDA support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 +printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -$as_echo "$CUDA_FLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -$as_echo "$CUDA_FLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +printf "%s\n" "$CUDA_FLAGS" >&6; } fi # if test x"$enable_cuda" = "x" -o x"$enable_cuda" = "xno" ; then enable_nvtx=no def_cuda="" CUDA_FLAGS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 -$as_echo_n "checking for NVTX support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 +printf %s "checking for NVTX support... " >&6; } if ! test x"$enable_nvtx" = "xno" ; then if test x"$enable_nvtx" = "xyes" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -lnvToolsExt" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif ! test x"$enable_nvtx" = "x" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi # @@ -15087,8 +15955,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -15118,15 +15986,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -15140,8 +16008,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -15158,7 +16026,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -15174,8 +16042,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -15198,14 +16066,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -15215,46 +16085,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -15263,13 +16133,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -15278,8 +16141,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -15291,30 +16158,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -15327,13 +16174,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -15360,18 +16208,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -15383,12 +16233,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -15419,7 +16270,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -15441,6 +16292,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -15454,6 +16309,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -15495,7 +16356,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -15504,7 +16365,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -15567,7 +16428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Yambo $as_me 5.1.0 r.21574 h.08ac288ff, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15625,14 +16486,16 @@ $config_headers Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ Yambo config.status 5.1.0 r.21574 h.08ac288ff -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15669,15 +16532,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -15685,7 +16548,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -15694,7 +16557,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -15722,7 +16585,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -15736,7 +16599,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -15776,8 +16639,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -16113,7 +16976,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -16121,17 +16984,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -16148,7 +17011,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16172,9 +17035,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -16227,8 +17090,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -16270,9 +17133,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -16288,20 +17151,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -16342,8 +17205,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -16501,3 +17364,4 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi + diff --git a/include/driver/version.h b/include/driver/version.h index 5b8960cdd2..54f3d9b61e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21676 -#define YAMBO_HASH "91ab479fa" +#define YAMBO_REVISION 21682 +#define YAMBO_HASH "9a239e9ce" From d3c1b5382c3aca9a0111488744fc322fc648bddf Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 2 Aug 2022 16:01:33 +0200 Subject: [PATCH 0384/1367] Version 5.1.0, Revision 21628, Hash 2c9faf4b3 MODIFIED * include/driver/version.h bse/K.F bse/K_correlation_collisions.F bse/K_stored_in_a_big_matrix.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F io_parallel/io_BS_PAR_block.F modules/mod_BS.F parallel/PARALLEL_global_Response_T_transitions.F Changes: - [yambo] Added the option to compute the full BSE kernel, without imposing hemiticity within the blocks Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K.F | 5 +- src/bse/K_correlation_collisions.F | 10 +- src/bse/K_stored_in_a_big_matrix.F | 56 +++++++--- src/collisions/COLLISIONS_HXC.F | 105 ++++++++++++------ src/collisions/COLLISIONS_eval.F | 33 +++--- src/io_parallel/io_BS_PAR_block.F | 2 +- src/modules/mod_BS.F | 1 + .../PARALLEL_global_Response_T_transitions.F | 4 +- 9 files changed, 143 insertions(+), 77 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e41a62c666..d6fd4f8639 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21629 -#define YAMBO_HASH "16d8d4c92" +#define YAMBO_REVISION 21630 +#define YAMBO_HASH "2c9faf4b3" diff --git a/src/bse/K.F b/src/bse/K.F index f1a1479f1f..ba032e88a3 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -42,7 +42,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) use LIVE_t, ONLY:live_timing use X_m, ONLY:X_t use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& -& BS_res_K_exchange,BS_Block_size,& +& BS_res_K_exchange,BS_Block_size,l_BSE_kernel_full,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& & BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& @@ -454,7 +454,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! i_k_bz = BS_T_grp(i_Tgrp_k)%table(i_Tk,1) i_p_bz = BS_T_grp(i_Tgrp_p)%table(i_Tp,1) @@ -518,7 +518,6 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) i_k_sp_pol_v=BS_T_grp(i_Tgrp_k)%table(i_Tk,5) i_p_sp_pol_v=BS_T_grp(i_Tgrp_p)%table(i_Tp,5) ! - ! ig_kmq = qindx_X(iq,i_k_bz,2) ig_pmq = qindx_X(iq,i_p_bz,2) ! diff --git a/src/bse/K_correlation_collisions.F b/src/bse/K_correlation_collisions.F index 93aeaa9789..075b798d71 100644 --- a/src/bse/K_correlation_collisions.F +++ b/src/bse/K_correlation_collisions.F @@ -44,7 +44,7 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& & BS_oscillators_alloc,K_CORR_collision,BS_T_grp,& -& BS_K_dim,l_BS_ares_from_res +& BS_K_dim,l_BS_ares_from_res,l_BSE_kernel_full use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc use openmp, ONLY:OPENMP_update,master_thread @@ -147,7 +147,7 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & @@ -182,7 +182,7 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & @@ -240,7 +240,7 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & @@ -282,7 +282,7 @@ subroutine K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 2f9a255856..eadcdf8017 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -26,10 +26,27 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! Here I fill the kernel (coupling included) in an entire BIG matrix to be ! used for diagonalization and/or invertion ! + ! Below how the matrix is computed + ! - coupling (c) and anti-coupling (q) blocks are computed only if coupling is requested + ! - in case 2 the diagonal terms of coupling and anti-coupling are both computed, although this is not needed + ! - cases 3 and 4 are for debugging purposes only + ! + ! Case 1 Case 2 Case 3 Case 4 + ! l_BS_ares_from_res=.true. l_BS_ares_from_res=.false. l_BS_ares_from_res=.true. l_BS_ares_from_res=.false. + ! l_BS_ares_from_res=.false. l_BSE_matrix_full=.false. l_BSE_matrix_full=.true. l_BSE_matrix_full=.true. + ! coupling block is a square coupling block maybe rectangular coupling block is a square coupling block maybe rectangular + ! + ! (r r r c c c) (r r r c c) (r r r c c c) (r r r c c) + ! (- r r - c c) (- r r - c) (r r r c c c) (r r r c c) + ! (- - r - - c) (- - r - -) (r r r c c c) (r r r c c) + ! (- - - - - -) (q q q a a) (- - - - - -) (q q q a a) + ! (- - - - - -) (- q q - a) (- - - - - -) (q q q a a) + ! (- - - - - -) (- - - - - -) + ! use pars, ONLY:SP,cI,cZERO,cONE use parallel_int, ONLY:PP_redux_wait use BS, ONLY:BS_K_coupling,n_BS_blks,BS_res_ares_n_mat,& -& l_BS_ares_from_res,BS_blks_free +& l_BS_ares_from_res,BS_blks_free,l_BSE_kernel_full use BS_solvers, ONLY:BS_mat,BS_blk,BS_H_dim,BS_K_dim,& & BSS_perturbative_width,run_inversion,run_Haydock,& & BSS_eh_E,BSS_eh_W @@ -64,6 +81,7 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! H_shift=0 if(BS_blk(i_B)%mode=="C") H_shift(2)=BS_K_dim(1) + if(BS_blk(i_B)%mode=="Q") H_shift(1)=BS_K_dim(1) if(BS_blk(i_B)%mode=="A") H_shift(:)=BS_K_dim(1) ! do i_r=1,BS_blk(i_B)%size(1) @@ -74,10 +92,8 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! H_pos(2)=BS_blk(i_B)%coordinate(2)+i_c-1 ! - ! Then the upper triangle of each block and direct symmetrization - ! - if (H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle - if (l_BS_ares_from_res.and.H_pos(1)>H_pos(2)) cycle + ! The upper triangle only of each block + if (H_pos(1)>H_pos(2) .and. .not.l_BSE_kernel_full) cycle ! Mij=BS_blk(i_B)%mat(i_r,i_c) ! @@ -94,35 +110,47 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) case("R") BS_mat(H_pos(1) ,H_pos(2) )= Mij ! The resonant block is hermitial - BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) if (l_BS_ares_from_res.and.BS_K_coupling) then ! The anti-resonant block is A=-R* BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2)+BS_K_dim(1))=-conjg(Mij) ! The anti-resonant block is hermitian - BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= -Mij + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= -Mij endif case("C") BS_mat(H_pos(1) ,H_pos(2)+BS_K_dim(1))= Mij ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian - BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1) )=-conjg(Mij) + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1) )=-conjg(Mij) + ! In case l_BS_ares_from_res=.false. the coupling an anti-couling + ! bocks maybe rectangular and I cannot symmetrize them if (l_BS_ares_from_res) then ! The coupling block and the anti-coupling block are symmetric BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))= Mij - BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )=-conjg(Mij) + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )=-conjg(Mij) endif case("A") - ! The anti-resonant block is hermitial if(BS_res_ares_n_mat==1) then + ! Case with coupling BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2)+BS_K_dim(1))= Mij - BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= conjg(Mij) + ! The anti-resonant block is hermitial + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= conjg(Mij) else + ! Case without coupling, there are two BS_mat BS_mat(H_pos(1) ,H_pos(2) )= Mij - BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) + ! The anti-resonant block is hermitial + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) endif case("Q") BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )= Mij - ! Coupling from anti-coupling: the whole BSE matrix is Pseudo-Hermitian - BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))=-conjg(Mij) + ! Coupling from anti-coupling: the whole BSE matrix is Pseudo-HErmitian + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))=-conjg(Mij) end select ! enddo diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 66acb61b8e..544dddd7f2 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -48,9 +48,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) use IO_int, ONLY:io_control,IO_and_Messaging_switch use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,io_COLLs use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t - use interfaces, ONLY:WF_load + use interfaces, ONLY:WF_load,eval_G_minus_G use wave_func, ONLY:WF,WF_buffer,WF_buffered_IO - use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G + use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G,G_m_G use hamiltonian, ONLY:B_mat_index use fft_m, ONLY:fft_size ! @@ -66,7 +66,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) ! integer :: i_coll,first_coll,last_coll,ig1,ig2,iqbz,iqibz,alloc_err,iqs,iGo_max,NG_max,NG_XC,LOCAL_COMM(2),& & i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,& -& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,bands_to_load(2),n_colls +& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,bands_to_load(2),n_colls,n_GmG logical :: l_HXC_collisions,eval_coll,l_compute_screening ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H @@ -121,9 +121,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) N_g_vecs_C =0 iGo_max =maxval(qindx_S(:,:,2)) ! - if(COLLISIONS_HXC_local ) N_g_vecs_H = QP_ng_SH - if(COLLISIONS_HXC_MB ) N_g_vecs_X = QP_ng_Sx - if(COLLISIONS_HXC_MB .or.l_use_COH_collisions) N_g_vecs_C = QP_ng_Sc + if (COLLISIONS_HXC_local) N_g_vecs_H = QP_ng_SH + if (COLLISIONS_HXC_MB ) N_g_vecs_X = QP_ng_Sx + if (l_compute_screening ) N_g_vecs_C = QP_ng_Sc ! call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_H,"SH") call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_X,"SF") @@ -393,7 +393,7 @@ subroutine map_BSE_to_HXC_collisions() ! use electrons, ONLY:spin_occ use pars, ONLY:cI - use BS, ONLY:BS_blk,BS_K_dim,BS_K_io_map + use BS, ONLY:BS_blk,BS_K_dim,BS_K_io_map,l_BSE_kernel_full use BS_solvers, ONLY:BSS_eh_table_m1 ! complex(SP) :: M_ij @@ -409,44 +409,65 @@ subroutine map_BSE_to_HXC_collisions() i_k_bz=BS_K_io_map(k%k_table(i_k,1)) i_p_bz=BS_K_io_map(k%k_table(i_p,1)) ! + ! To double check if the indexes need to be inverted in the table ... i_BSE=BSS_eh_table_m1(i_k_bz,i_m,i_n,i_sp,i_sp) j_BSE=BSS_eh_table_m1(i_p_bz,i_mp,i_np,i_sp,i_sp) ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! - ! Resonant block - if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1) - ! Resonant is hermitian - if(j_BSE< i_BSE) M_ij= conjg(BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1)) + if (l_BSE_kernel_full) then + ! Resonant block + M_ij= BS_blk(i_BSE)%mat(1,j_BSE) + else + ! Resonant block + if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1) + ! Resonant is hermitian + if(j_BSE< i_BSE) M_ij= conjg(BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1)) + endif ! else if(i_BSE<=BS_K_dim(1) .and. j_BSE>BS_K_dim(1)) then ! - ! Coupling block j_BSE=j_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1)*(-cI) - ! Coupling is symmetric - if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1)*(-cI) + if (l_BSE_kernel_full) then + ! Coupling block + M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE)*(-cI) + else + ! Coupling block + if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1)*(-cI) + ! Coupling is symmetric + if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1)*(-cI) + endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! - ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*(-cI) - ! anti-Coupling is symmetric - if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*(-cI) + if (l_BSE_kernel_full) then + ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian + M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE))*(-cI) + else + ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian + if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*(-cI) + ! anti-Coupling is symmetric + if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*(-cI) + endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then ! - ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) j_BSE=j_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij= conjg(BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1)) - ! anti-resonant is hermitian - if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1) + if (l_BSE_kernel_full) then + ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian + M_ij= conjg(BS_blk(j_BSE)%mat(1,i_BSE)) + else + ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian + if(j_BSE>=i_BSE) M_ij= conjg(BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1)) + ! anti-resonant is hermitian + if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1) + endif ! endif ! - ! The occupation factor here is already contained in the density matrix + ! The occupation factor is already contained in the density matrix ! HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)= M_ij/spin_occ ! @@ -460,9 +481,9 @@ end subroutine map_BSE_to_HXC_collisions subroutine compute_Hartree_collisions() ! ! Scattering geometry - !===================== _ \ _ - ! / / \ - ! G_p{np,mp} | | (i_p,i_p_s) + !===================== _ \ _ + ! / / \ + ! G_p{np,mp} | | (i_p,i_p_s) ! \_ _ _/ ! | ! | W(q=0) @@ -635,15 +656,22 @@ subroutine compute_MBPT_XC_collisions() iscp_XC%os =(/0, i_kmq,i_kmq_s,i_sp/) ! ! DS 2022/07/29 - ! These are used in the wrong way since they are used to construct - ! M_{k,k+q}=M_{k,p+G} in place of M_{k,p} - ! Setting i_kmq_G=1 (i.e. G=0) should give M_{k,p}. - ! Doing so I get hermitian collisions but with a -1 compared to the ones from BSE. To verify the results. - ! In the subrtouine QP_ppa_cohsex and XCo_Hartree_Fock, this index is not used. See comments there. + ! The G shifts "i_kmq_G0" are need to construct M_{k,p}. + ! Without them the matrix M_{k,k+q}=M_{k,p+G} would be obtained + ! The same procedure is applyed in the BSE subroutines. + ! + ! However, for some reason, I get a non hermitian matrix, i.e. K_{nmk,n'm'k'} /= K^*_{n'm'k',nmk} + ! due to a "-1" factor in the real part of some matrix elements + ! This issue was never seen in the BSE, since the hermiticity is imposed there. + ! However, implementing the option to compute the full BSE blocks, i.e. without imposing + ! the hermiticity, the issue is there as well. + ! + ! Setting i_kmq_G0=1 (i.e. G=0) is even worse. + ! Again consistent results are obtained between BSE and collisions ! - ! Should the G shift needs to be accounted for somehow in (?) - ! a. gamp - ! b. X_mat + ! In the subrtouine QP_ppa_cohsex and XCo_Hartree_Fock. + ! There the difference M_{k,k+q} vs M_{k,p} maybe non crucial, since + ! the matrix is multiplied by a quantity (the occupaitons) which are invariant under G0 shift ! isc_XC%qs(1) =i_kmq_G0 iscp_XC%qs(1)=i_kmq_G0 @@ -709,13 +737,16 @@ subroutine compute_MBPT_XC_collisions() if(index(H_potential,"FOCK")>0.or.index(H_potential,"SEX")>0) then !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor1) do ig1=1,N_g_vecs_X - pre_factor1=pre_factor1+isc_XC%rhotw(ig1)*iscp_XC%gamp(ig1,1)*conjg(iscp_XC%rhotw(ig1)) + ig2=ig1 !G_m_G(ig1,minus_G(i_kmq_G0)) + pre_factor1=pre_factor1+isc_XC%rhotw(ig2)*iscp_XC%gamp(ig2,1)*conjg(iscp_XC%rhotw(ig2)) enddo !$omp end parallel do endif ! ! DEBUG < - !write(201,*) i_n,i_m,i_k,i_np,i_mp,i_kmq,iqbz,iqibz,i_kmq_G0,isc_XC%rhotw(1),iscp_XC%gamp(1,1),conjg(iscp_XC%rhotw(1)) + !if ( (i_n==5 .and. i_m==9 .and. i_k==2 .and. i_np==5 .and. i_mp==10 .and. i_kmq==1) .or. & + !& (i_n==5 .and. i_m==10 .and. i_k==1 .and. i_np==5 .and. i_mp==9 .and. i_kmq==2) ) & + !& write(201,*) i_n,i_m,i_k,i_np,i_mp,i_kmq,iqbz,iqibz,i_kmq_G0,isc_XC%rhotw(1),iscp_XC%gamp(1,1),conjg(iscp_XC%rhotw(1)) ! DEBUG > ! pre_factor2=cZERO diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index c619a6ca5b..9c247bfc3f 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -329,7 +329,8 @@ end subroutine COLLISIONS_eval subroutine set_BS_blks(Xk) ! use pars, ONLY:cZERO - use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode,BS_kpt_bz + use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat, & +& BSK_IO_mode,BS_kpt_bz,l_BSE_kernel_full use R_lattice, ONLY:bz_samp ! #include @@ -346,25 +347,31 @@ subroutine set_BS_blks(Xk) BS_blk(:)%size(1)=1 ! do iB=1,BS_K_dim(1) - BS_blk(iB)%size(2)=BS_K_dim(1)-iB+1 - BS_blk(iB)%coordinate(:)=iB - BS_blk(iB)%mode="R" - enddo - do iB=BS_K_dim(1)+1,2*BS_K_dim(1) - BS_blk(iB)%size(2)=2*BS_K_dim(1)-iB+1 - BS_blk(iB)%coordinate(:)=iB-BS_K_dim(1) - BS_blk(iB)%mode="C" + BS_blk(iB )%coordinate(1)=iB + BS_blk(iB+BS_K_dim(1))%coordinate(1)=iB + BS_blk(iB )%mode="R" + BS_blk(iB+BS_K_dim(1))%mode="C" enddo ! + if (l_BSE_kernel_full) then + BS_blk(:)%size(2)=BS_K_dim(1) + BS_blk(:)%coordinate(2)=1 + else + do iB=1,BS_K_dim(1) + BS_blk(iB )%size(2)=BS_K_dim(1)-iB+1 + BS_blk(iB+BS_K_dim(1))%size(2)=BS_K_dim(1)-iB+1 + BS_blk(iB )%coordinate(2)=iB + BS_blk(iB+BS_K_dim(1))%coordinate(2)=iB + enddo + endif + ! do iB=1,n_BS_blks YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) BS_blk(iB)%mat=cZERO BS_blk(iB)%done(:,:)="f" - if (BS_blk(iB)%coordinate(1)==BS_blk(iB)%coordinate(2)) then - allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) - bs_blk(iB)%table=0 - endif + allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) + bs_blk(iB)%table=0 enddo ! YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index 1f19cdcab2..6fbb52662a 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -204,7 +204,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! end select ! - if (x1==x2) then + if (x1==x2.or.BS_blk(i_block)%size(2)==BS_K_dim(1)) then if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) call C_F_POINTER(C_LOC(BS_blk(i_block)%table),tmp_link,(/5,BS_blk(i_block)%size(1)/)) call io_variable_bulk(ID, ID_table, I2=tmp_link, IPOS=(/1,x1/) ) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index d0c866895d..a5297d78fc 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -32,6 +32,7 @@ module BS !==================== logical :: l_BSE_minimize_memory logical :: l_BSE_kernel_complete + logical :: l_BSE_kernel_full=.TRUE. logical :: l_BSE_restart logical :: BS_W_is_diagonal=.FALSE. logical :: BS_K_coupling=.FALSE. diff --git a/src/parallel/PARALLEL_global_Response_T_transitions.F b/src/parallel/PARALLEL_global_Response_T_transitions.F index 85d5c9292c..f872ee00ff 100644 --- a/src/parallel/PARALLEL_global_Response_T_transitions.F +++ b/src/parallel/PARALLEL_global_Response_T_transitions.F @@ -24,7 +24,7 @@ subroutine PARALLEL_global_Response_T_transitions(Xk) ! use R_lattice, ONLY:bz_samp,nXkibz - use BS, ONLY:BS_nT_at_k,BS_nT_grps,BS_n_eh_spaces + use BS, ONLY:BS_nT_at_k,BS_nT_grps,BS_n_eh_spaces,l_BSE_kernel_full use IO_int, ONLY:IO_and_Messaging_switch use parallel_int, ONLY:PARALLEL_index,PARALLEL_live_message use parallel_m, ONLY:PAR_n_c_bands,PAR_n_v_bands,PP_indexes_reset,master_cpu @@ -86,7 +86,7 @@ subroutine PARALLEL_global_Response_T_transitions(Xk) call PP_indexes_reset(PAR_IND_T_ordered) ! call PARALLEL_index(PAR_IND_T_ordered,(/BS_nT_grps,BS_nT_grps/),COMM=PAR_COM_T_INDEX,& -& MASK=PAR_IND_T_groups%element_1D,ORDERED=.TRUE.,NO_EMPTIES=.FALSE.) +& MASK=PAR_IND_T_groups%element_1D,ORDERED=.not.l_BSE_kernel_full,NO_EMPTIES=.FALSE.) ! call PARALLEL_live_message("(e/h)->(e/h)' Transitions (ordered)",ENVIRONMENT="Response_T_space",& & LOADED=PAR_IND_T_ordered%n_of_elements(PAR_COM_T_INDEX%CPU_id+1),& From 17a705e0e0f9669b5cfcd5df5bce64adb6d7db93 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 3 Aug 2022 23:34:38 +0200 Subject: [PATCH 0385/1367] Version 5.1.0, Revision 21629, Hash d3c1b5382 MODIFIED * include/driver/version.h collisions/COLLISIONS_HXC.F collisions/COLLISIONS_linearize_and_IO.F Bugs: - [yambo_rt] Working on issue #640 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/collisions/COLLISIONS_HXC.F | 53 +++++++++++++------- src/collisions/COLLISIONS_linearize_and_IO.F | 12 ++++- 3 files changed, 47 insertions(+), 22 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d6fd4f8639..2dba7b69a6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21630 -#define YAMBO_HASH "2c9faf4b3" +#define YAMBO_REVISION 21631 +#define YAMBO_HASH "d3c1b5382" diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 544dddd7f2..3809e56ebd 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -134,6 +134,11 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) NG_max=maxval((/N_g_vecs_H,N_g_vecs_X,N_g_vecs_C/)) NG_XC =max(N_g_vecs_X,N_g_vecs_C) ! + if (COLLISIONS_HXC_MB) then + n_GmG=eval_G_minus_G(NG_XC,iGo_max) + NG_XC=maxval(G_m_G) + endif + ! call msg('s', '['//trim(H_potential)//'] Plane waves (H,X,C) ',(/N_g_vecs_H,N_g_vecs_X,N_g_vecs_C/)) ! ! WFs @@ -174,7 +179,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) isc_XC%iqref =0 isc_XC%ngrho =NG_XC ! - call elemental_collision_alloc(iscp_XC,NG=NG_XC,NG_GAMP=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) + call elemental_collision_alloc(iscp_XC,NG=NG_XC,NG_GAMP=(/NG_XC, 1 /),TITLE=trim(H_potential)) ! if (l_compute_screening) then ! @@ -387,9 +392,17 @@ subroutine map_BSE_to_HXC_collisions() ! ! Yambo uses the BSE matrix with the square root of the occupations ! The real time collisions must be constructed with the standard form - ! This requires a cI factor in the coupling terms + ! This requires a cI factor in the coupling terms. ! Moreover, since the occupation factors are contained in the density matrix, - ! there is a -1 factor for "C", "Q" and "A" + ! there is a -1 factor for "Q" and "A" + ! + ! The excitonic matrix contains the occupations and it is pseudo-hermitian. + ! R iC R iC + ! -(iC)* -R* = iC* -R* + ! + ! The collisions do not contain the occupations and the matrix is hermitian. + ! R C + ! C* R* ! use electrons, ONLY:spin_occ use pars, ONLY:cI @@ -410,8 +423,8 @@ subroutine map_BSE_to_HXC_collisions() i_p_bz=BS_K_io_map(k%k_table(i_p,1)) ! ! To double check if the indexes need to be inverted in the table ... - i_BSE=BSS_eh_table_m1(i_k_bz,i_m,i_n,i_sp,i_sp) - j_BSE=BSS_eh_table_m1(i_p_bz,i_mp,i_np,i_sp,i_sp) + i_BSE=BSS_eh_table_m1(i_k_bz,i_n,i_m,i_sp,i_sp) + j_BSE=BSS_eh_table_m1(i_p_bz,i_np,i_mp,i_sp,i_sp) ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! @@ -443,12 +456,12 @@ subroutine map_BSE_to_HXC_collisions() i_BSE=i_BSE-BS_K_dim(1) if (l_BSE_kernel_full) then ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian - M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE))*(-cI) + M_ij= conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE))*(-cI) else ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian - if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*(-cI) + if(j_BSE>=i_BSE) M_ij= conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*(-cI) ! anti-Coupling is symmetric - if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*(-cI) + if(j_BSE< i_BSE) M_ij= conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*(-cI) endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then @@ -565,7 +578,7 @@ subroutine compute_Hartree_collisions() enddo endif ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=4._SP*pi*conjg(pre_factor1)+Co*pre_factor2 ! call live_timing(steps=1) ! @@ -657,17 +670,17 @@ subroutine compute_MBPT_XC_collisions() ! ! DS 2022/07/29 ! The G shifts "i_kmq_G0" are need to construct M_{k,p}. - ! Without them the matrix M_{k,k+q}=M_{k,p+G} would be obtained ! The same procedure is applyed in the BSE subroutines. ! ! However, for some reason, I get a non hermitian matrix, i.e. K_{nmk,n'm'k'} /= K^*_{n'm'k',nmk} - ! due to a "-1" factor in the real part of some matrix elements + ! due to a "-1" factor in the real part of some matrix elements. ! This issue was never seen in the BSE, since the hermiticity is imposed there. ! However, implementing the option to compute the full BSE blocks, i.e. without imposing ! the hermiticity, the issue is there as well. ! - ! Setting i_kmq_G0=1 (i.e. G=0) is even worse. - ! Again consistent results are obtained between BSE and collisions + ! Without them the matrix M_{k,k+q}=M_{k,p+G} would be obtained + ! Indeed setting i_kmq_G0=1 (i.e. G=0) the results are very bad. + ! Both in the BSE and in the collisions, i.e. the matrix is not at all hermitian. ! ! In the subrtouine QP_ppa_cohsex and XCo_Hartree_Fock. ! There the difference M_{k,k+q} vs M_{k,p} maybe non crucial, since @@ -676,7 +689,7 @@ subroutine compute_MBPT_XC_collisions() isc_XC%qs(1) =i_kmq_G0 iscp_XC%qs(1)=i_kmq_G0 ! - if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') + if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') ! if( iqibz/=isc_XC%iqref .and. l_compute_screening) then ! @@ -727,7 +740,7 @@ subroutine compute_MBPT_XC_collisions() ! isc_XC%os(1)=i_np ! - if (any(isc_XC%is/=iscp_XC%is).or.any(isc_XC%os/=iscp_XC%os)) then + if (any(isc_XC%is/=iscp_XC%is).or.any(isc_XC%os/=iscp_XC%os).or.any(isc_XC%qs/=iscp_XC%qs)) then call scatter_Bamp(isc_XC) else isc_XC%rhotw=iscp_XC%rhotw @@ -737,16 +750,18 @@ subroutine compute_MBPT_XC_collisions() if(index(H_potential,"FOCK")>0.or.index(H_potential,"SEX")>0) then !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor1) do ig1=1,N_g_vecs_X - ig2=ig1 !G_m_G(ig1,minus_G(i_kmq_G0)) - pre_factor1=pre_factor1+isc_XC%rhotw(ig2)*iscp_XC%gamp(ig2,1)*conjg(iscp_XC%rhotw(ig2)) + ig2=G_m_G(ig1,minus_G(i_kmq_G0)) + pre_factor1=pre_factor1+conjg(isc_XC%rhotw(ig2))*iscp_XC%gamp(ig2,1)*iscp_XC%rhotw(ig2) enddo !$omp end parallel do endif ! ! DEBUG < + !ig2=G_m_G(1,minus_G(i_kmq_G0)) !if ( (i_n==5 .and. i_m==9 .and. i_k==2 .and. i_np==5 .and. i_mp==10 .and. i_kmq==1) .or. & !& (i_n==5 .and. i_m==10 .and. i_k==1 .and. i_np==5 .and. i_mp==9 .and. i_kmq==2) ) & - !& write(201,*) i_n,i_m,i_k,i_np,i_mp,i_kmq,iqbz,iqibz,i_kmq_G0,isc_XC%rhotw(1),iscp_XC%gamp(1,1),conjg(iscp_XC%rhotw(1)) + !& write(201,*) i_n,i_m,i_k,i_np,i_mp,i_kmq,iqbz,iqibz,i_kmq_G0, & + !& conjg(isc_XC%rhotw(ig2)),iscp_XC%gamp(ig2,1),iscp_XC%rhotw(ig2) ! DEBUG > ! pre_factor2=cZERO @@ -754,7 +769,7 @@ subroutine compute_MBPT_XC_collisions() !$omp parallel do default(shared), private(ig1,ig2), reduction(+:pre_factor2) do ig1=1,N_g_vecs_C do ig2=1,N_g_vecs_C - pre_factor2=pre_factor2+isc_XC%rhotw(ig2)*EM1s(ig2,ig1)*conjg(iscp_XC%rhotw(ig1)) + pre_factor2=pre_factor2+conjg(isc_XC%rhotw(ig2))*EM1s(ig2,ig1)*conjg(iscp_XC%rhotw(ig1)) enddo enddo !$omp end parallel do diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index 1465b11446..11b58b9b9f 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -50,6 +50,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme logical :: store_it,l_HXC,l_GW_NEQ,l_QED_P,l_COH real(SP) :: COLLISIONS_max ! DEBUG < + !character(1):: str !complex(SP) :: Mij ! DEBUG > ! @@ -126,8 +127,17 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme !Mij=COLL_element(1)%v3_c(i1,i2,i3) !if (abs( real(Mij))<1.e-10) Mij=cmplx(0._SP,aimag(Mij),kind=SP) !if (abs(aimag(Mij))<1.e-10) Mij=cmplx(real(Mij),0._SP,kind=SP) + !str="N" + !if (COLL_grp%state(i_coll,1)COLL_grp%state(i_coll,2) .and. i1i2 ) str="C" + !if (COLL_grp%state(i_coll,1)>COLL_grp%state(i_coll,2) .and. i1>i2 ) str="A" !! - !write(100,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,real(Mij),aimag(Mij) + ! write(100,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) + !if (str=="R") write(101,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) + !if (str=="C") write(102,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) + !if (str=="Q") write(103,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) + !if (str=="A") write(104,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) ! DEBUG > ! endif From 2a15116ea339d996a96f9404a3ac681035f0248e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 5 Aug 2022 15:45:30 +0200 Subject: [PATCH 0386/1367] Version 5.1.0, Revision 21834, Hash b63bf74a4 MODIFIED * include/driver/version.h interface/INIT_load.F modules/mod_EXCPH.F Additions: -Added exciton dipole Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_load.F | 3 ++- src/modules/mod_EXCPH.F | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a0b679a52c..01878ff3dd 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21831 -#define YAMBO_HASH "ca10914cc" +#define YAMBO_REVISION 21834 +#define YAMBO_HASH "b63bf74a4" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 5a88b3bcbf..11a978e3dd 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0 use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP @@ -669,6 +669,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) + call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 09b3e734fc..9f001c1733 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -43,6 +43,7 @@ module EXCPH integer :: EXCPH_sum(2) real(SP), allocatable :: EXCPH_q(:,:) character(schlen) :: EXCPH_kind + real(SP) :: EXC_q0(3) ! ! L_in and L_out paths ! From 39128b5adda8e3226011227c67bfb510c65c3eb3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 5 Aug 2022 15:47:27 +0200 Subject: [PATCH 0387/1367] Version 5.1.0, Revision 21835, Hash 2a15116ea MODIFIED * include/driver/version.h interface/INIT_activate.F Additions: -Dipole in input Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 01878ff3dd..f4fd64e490 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21834 -#define YAMBO_HASH "b63bf74a4" +#define YAMBO_REVISION 21835 +#define YAMBO_HASH "2a15116ea" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 12e30e7664..543d3b39ff 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) & -& call initactivate(1,'BoseTemp ElPhModes EXCTemp DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') +& call initactivate(1,'BoseTemp ElPhModes EXCTemp EXCLongDr DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') ! #endif ! From 37f81cf9ecf8032bcbdfc008d7789cb9af7697da Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 5 Aug 2022 16:38:54 +0200 Subject: [PATCH 0388/1367] Version 5.1.0, Revision 21836, Hash 39128b5ad MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_optics.F NEW * exc-ph/EXC_dipole.F Additions: -Dipole calculated in a separate subroutine Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_optics.F | 14 ++++------- src/exc-ph/EXC_dipole.F | 49 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 src/exc-ph/EXC_dipole.F diff --git a/include/driver/version.h b/include/driver/version.h index f4fd64e490..85ad153631 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21835 -#define YAMBO_HASH "2a15116ea" +#define YAMBO_REVISION 21836 +#define YAMBO_HASH "39128b5ad" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 8b556040b4..2b30ad7b1b 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o \ +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o #endif diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 5b84fd4f41..c65a5e4e0f 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -26,8 +26,8 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! use units, ONLY:HA2EV - use pars, ONLY:SP,cZERO,rZERO,schlen,pi - use electrons, ONLY:levels,spin_occ + use pars, ONLY:SP,cZERO,schlen + use electrons, ONLY:levels use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use X_m, ONLY:X_t use com, ONLY:msg,of_open_close @@ -79,15 +79,9 @@ subroutine EXCPH_optics(E,k,q,X,wv) BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! - ! Calculate the residual + ! Calculate excitonic dipole ! - BS_R=rZERO - do i_alpha=EXCPH_states(1),EXCPH_states(2) - BS_R(i_alpha)=real(abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)),SP) - enddo - ! - ! This formula can be wrong in presence of the 2D-cutoff - BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + call EXC_dip() ! call parser('NoMatrxEl',l_no_matrix_elements) if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F new file mode 100644 index 0000000000..7589ff1ffe --- /dev/null +++ b/src/exc-ph/EXC_dipole.F @@ -0,0 +1,49 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!> @brief Calculate exciton-dipole +!! +subroutine EXC_dip() + ! + use pars, ONLY:pi,SP,rZERO + use R_lattice, ONLY:d3k_factor,bare_qpg + use electrons, ONLY:spin_occ + use EXCPH, ONLY:BS_R_left,BS_R_right,BS_R,EXCPH_states + ! +#include + ! + ! Work Space + ! + integer :: i_alpha + ! + ! Calculate the residual + ! + BS_R=rZERO + do i_alpha=EXCPH_states(1),EXCPH_states(2) + BS_R(i_alpha)=real(abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)),SP) + enddo + ! + ! This formula can be wrong in presence of the 2D-cutoff + BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + ! +end subroutine From cd3599399c3a58c04af58e8754f7f7071f31c7d0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 5 Aug 2022 16:55:54 +0200 Subject: [PATCH 0389/1367] Version 5.1.0, Revision 21837, Hash 37f81cf9e MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F modules/SET_defaults.F Additions: -Added possibility to redefine the dipole of the BSE Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 30 +++++++++++++++++++++--------- src/modules/SET_defaults.F | 3 ++- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 85ad153631..c0455d773f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21836 -#define YAMBO_HASH "39128b5ad" +#define YAMBO_REVISION 21837 +#define YAMBO_HASH "37f81cf9e" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 7589ff1ffe..a549ee04a1 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -26,9 +26,11 @@ subroutine EXC_dip() ! use pars, ONLY:pi,SP,rZERO + use com, ONLY:msg use R_lattice, ONLY:d3k_factor,bare_qpg use electrons, ONLY:spin_occ - use EXCPH, ONLY:BS_R_left,BS_R_right,BS_R,EXCPH_states + use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states + use vec_operate, ONLY:v_norm ! #include ! @@ -36,14 +38,24 @@ subroutine EXC_dip() ! integer :: i_alpha ! - ! Calculate the residual ! - BS_R=rZERO - do i_alpha=EXCPH_states(1),EXCPH_states(2) - BS_R(i_alpha)=real(abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)),SP) - enddo - ! - ! This formula can be wrong in presence of the 2D-cutoff - BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + if(all(abs(EXC_q0(:)) Date: Fri, 5 Aug 2022 17:09:21 +0200 Subject: [PATCH 0390/1367] Version 5.1.0, Revision 21838, Hash cd3599399 MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Additions: -Recalculation of exciton dipole implemented Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 38 +++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c0455d773f..97b0c21891 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21837 -#define YAMBO_HASH "37f81cf9e" +#define YAMBO_REVISION 21838 +#define YAMBO_HASH "cd3599399" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index a549ee04a1..a55c07199a 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -29,33 +29,37 @@ subroutine EXC_dip() use com, ONLY:msg use R_lattice, ONLY:d3k_factor,bare_qpg use electrons, ONLY:spin_occ - use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states + use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm ! #include ! ! Work Space ! - integer :: i_alpha + integer :: i_alpha,i_BS_mat ! - ! - if(all(abs(EXC_q0(:))epsilon(1.))) then + ! + EXC_q0=EXC_q0/v_norm(EXC_q0) + call msg('rs','Excitonic dipole along the direction : ',EXC_q0) ! - ! This formula can be wrong in presence of the 2D-cutoff - BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + i_BS_mat=1 + call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) ! else - EXC_q0=EXC_q0/v_norm(EXC_q0) - call msg('rs','Excitonic dipole along the direction : ',EXC_q0) + ! + call msg('rs','Use dipole of the Lin') + ! endif ! + ! Calculate the residual + ! + BS_R=rZERO + do i_alpha=EXCPH_states(1),EXCPH_states(2) + BS_R(i_alpha)=real(abs(BS_R_left(i_alpha)*BS_R_right(i_alpha)),SP) + enddo + ! + ! This formula can be wrong in presence of the 2D-cutoff + BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + ! end subroutine From 0342d0f5a593216a95eb02b48ce545b1beb32d9c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 5 Aug 2022 17:32:06 +0200 Subject: [PATCH 0391/1367] Version 5.1.0, Revision 21839, Hash 07c14b823 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F Additions: -Dipoles are loaded, I have only to fill the BSS_dipole_opt array Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 +- src/exc-ph/EXC_dipole.F | 23 ++++++++++++++++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 97b0c21891..e12b1676a3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21838 -#define YAMBO_HASH "cd3599399" +#define YAMBO_REVISION 21839 +#define YAMBO_HASH "07c14b823" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index c65a5e4e0f..2eb2d847a0 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -81,7 +81,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Calculate excitonic dipole ! - call EXC_dip() + call EXC_dip(k,E) ! call parser('NoMatrxEl',l_no_matrix_elements) if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index a55c07199a..ec7e3abb03 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -23,26 +23,43 @@ ! !> @brief Calculate exciton-dipole !! -subroutine EXC_dip() +subroutine EXC_dip(Xk,E) ! use pars, ONLY:pi,SP,rZERO use com, ONLY:msg - use R_lattice, ONLY:d3k_factor,bare_qpg - use electrons, ONLY:spin_occ + use R_lattice, ONLY:d3k_factor,bare_qpg,bz_samp + use DIPOLES, ONLY:DIPOLE_t + use electrons, ONLY:levels,spin_occ use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm + use BS, ONLY:BS_bands,BS_dip_size + use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt ! #include + ! + type(levels), intent(in) :: E + type(bz_samp), intent(in) :: Xk + ! ! ! Work Space ! integer :: i_alpha,i_BS_mat + integer :: io_err + type(DIPOLE_t) :: Dip ! if(any(abs(EXC_q0(:))>epsilon(1.))) then ! EXC_q0=EXC_q0/v_norm(EXC_q0) call msg('rs','Excitonic dipole along the direction : ',EXC_q0) ! + BS_dip_size=1 + YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) + ! + call DIPOLE_dimensions(E,Dip,BS_bands,EXC_q0) + call DIPOLE_IO(Xk,E,Dip,'read ',io_err,'K') + ! + ! Fill BSS_dipole_opt to be done + ! i_BS_mat=1 call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) ! From 6beeef72f08ce197117b457d928fb9dc83594425 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 8 Aug 2022 15:40:32 +0200 Subject: [PATCH 0392/1367] Version 5.1.0, Revision 21840, Hash 0342d0f5a MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Additions: -Filled the BSS_dipoles_opt variable Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e12b1676a3..54eae46e8e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21839 -#define YAMBO_HASH "07c14b823" +#define YAMBO_REVISION 21840 +#define YAMBO_HASH "0342d0f5a" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index ec7e3abb03..1264f557f0 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -34,6 +34,7 @@ subroutine EXC_dip(Xk,E) use vec_operate, ONLY:v_norm use BS, ONLY:BS_bands,BS_dip_size use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt + use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index ! #include ! @@ -55,11 +56,16 @@ subroutine EXC_dip(Xk,E) BS_dip_size=1 YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) ! - call DIPOLE_dimensions(E,Dip,BS_bands,EXC_q0) - call DIPOLE_IO(Xk,E,Dip,'read ',io_err,'K') + ! ... PARALLEL setup + call PARALLEL_global_indexes(Xen,Xk,q," ",RESET=.TRUE.) + call PARALLEL_global_indexes(Xen,Xk,q,"DIPOLES",Dip=DIPs,Dip_limits_pre_defined=.TRUE.) ! ! Fill BSS_dipole_opt to be done ! + call K_dipoles(1,E,Xk,Dip) + ! + BSS_dipoles_opt(1,:)=BS_T_grp(1)%dipoles_opt(1,:,1) + ! i_BS_mat=1 call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) ! From 3ab3aacdb1ead5a40d57edd798f027b78cecd873 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Aug 2022 15:41:18 +0200 Subject: [PATCH 0393/1367] Version 5.1.0, Revision 21683, Hash f031746 MODIFIED * NEW * linear_algebra/MATRIX_slepc.F Bugs: - [yambo] Matrix SLEPC restored to bug-fixes version Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/linear_algebra/MATRIX_slepc.F | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 54f3d9b61e..a9c26fbc48 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21682 -#define YAMBO_HASH "9a239e9ce" +#define YAMBO_REVISION 21683 +#define YAMBO_HASH "f031746" diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index 84c442c68d..d1f405d54b 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -243,6 +243,10 @@ subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cm call msg( 'sr', '[SLEPC] Stopping condition tolerance ', real(tol,SP) ) call msg( 'sr', '[SLEPC] Stopping condition max iterations ', int(maxit) ) + !Set monitor + call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) + ! + ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! Solve the eigensystem ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -254,10 +258,6 @@ subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cm call msg( 'sr', '[SLEPC] Max. subspace size of solver [NCV]', int(ncv) ) call msg( 'sr', '[SLEPC] Max. allowed dim [MPD]', int(mpd) ) - !Set monitor - call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) - ! - ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! Display solution and clean up ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From a182216ff679f872532f9c25fa5deb1c8ffbce3b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Aug 2022 15:42:44 +0200 Subject: [PATCH 0394/1367] Version 5.1.0, Revision 21684, Hash 3ab3aac MODIFIED * interface/INIT_activate.F Changes: - [yambo] small change to make the code more clear Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a9c26fbc48..be2c5b73fe 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21683 -#define YAMBO_HASH "f031746" +#define YAMBO_REVISION 21684 +#define YAMBO_HASH "3ab3aac" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 0d5bbc0ddb..0015653388 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -388,7 +388,7 @@ subroutine INIT_activate() call initactivate(1,'BoseCut ShiftedPaths') ! if (l_gw0) then - if (.not.l_cohsex.or.COHSEX_use_empties) call initactivate(1,'GbndRnge') + if ((.not.l_cohsex).or.COHSEX_use_empties) call initactivate(1,'GbndRnge') if (.not.l_cohsex.and.trim(QP_solver)/='g') call initactivate(1,'GDamping') if (.not.l_cohsex) call initactivate(1,'dScStep') if (.not.l_elphoton_corr) then From 850314e748834ccda54807bbfcfdecbc717a0756 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Aug 2022 15:47:20 +0200 Subject: [PATCH 0395/1367] Version 5.1.0, Revision 21685, Hash a182216 MODIFIED * pol_function/X_pre_setup.F Bugs: - [yambo] Fixed value of COHSEX_use_empties logical in X_pre_setup Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/pol_function/X_pre_setup.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index be2c5b73fe..ac247c5932 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21684 -#define YAMBO_HASH "3ab3aac" +#define YAMBO_REVISION 21685 +#define YAMBO_HASH "a182216" diff --git a/src/pol_function/X_pre_setup.F b/src/pol_function/X_pre_setup.F index 9763b030e6..2bad78ce85 100644 --- a/src/pol_function/X_pre_setup.F +++ b/src/pol_function/X_pre_setup.F @@ -75,6 +75,8 @@ subroutine X_pre_setup(Xen,Xk,X) ! response function is accessed in G-G' mode. Here I ensure that all G-G' are in the ! range provided externally ! + if (l_cohsex) call parser("UseEbands",COHSEX_use_empties) + ! if ((l_cohsex.and..not.COHSEX_use_empties).or.l_X_terminator) then X%ng=eval_G_minus_G(X%ng,0,COMM=PAR_COM_WORLD) call warning(' Response block size reduced to '//intc(X%ng) & From 25b6a6a8ed68df0b3e86315192d49b1f9ece638e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Aug 2022 15:59:33 +0200 Subject: [PATCH 0396/1367] Version 5.1.0, Revision 21686, Hash 850314e MODIFIED * pol_function/X_pre_setup.F NEW * Changes: - [yambo] Warning message improved Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/pol_function/X_pre_setup.F | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ac247c5932..50b4356c8e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21685 -#define YAMBO_HASH "a182216" +#define YAMBO_REVISION 21686 +#define YAMBO_HASH "850314e" diff --git a/src/pol_function/X_pre_setup.F b/src/pol_function/X_pre_setup.F index 2bad78ce85..143f354907 100644 --- a/src/pol_function/X_pre_setup.F +++ b/src/pol_function/X_pre_setup.F @@ -23,7 +23,7 @@ ! subroutine X_pre_setup(Xen,Xk,X) ! - use pars, ONLY:SP + use pars, ONLY:SP,lchlen use X_m, ONLY:X_t,use_X_DbGd,X_DbGd_nkpts,l_X_terminator,X_use_lin_sys,& & X_use_gpu,Chi_linalg_mode,X_ng,l_write_disk_Xo use electrons, ONLY:levels,n_sp_pol @@ -46,6 +46,8 @@ subroutine X_pre_setup(Xen,Xk,X) ! Work Space ! real(SP), external :: G2E + integer :: Xng_tmp + character(lchlen) :: mesg ! if (X%ib(1)<0) X%ib(1)=1 if (X%ib(2)<0) X%ib(2)=1 @@ -78,9 +80,13 @@ subroutine X_pre_setup(Xen,Xk,X) if (l_cohsex) call parser("UseEbands",COHSEX_use_empties) ! if ((l_cohsex.and..not.COHSEX_use_empties).or.l_X_terminator) then - X%ng=eval_G_minus_G(X%ng,0,COMM=PAR_COM_WORLD) - call warning(' Response block size reduced to '//intc(X%ng) & -& //'RL ('//intc(int(1000.*G2E(X%ng)))//'mHa)') + Xng_tmp=eval_G_minus_G(X%ng,0,COMM=PAR_COM_WORLD) + if (Xng_tmp/=X%ng) then + mesg=' Response block size reduced from '//intc(X%ng)//' to '//intc(Xng_tmp) //'RL' + mesg=trim(mesg)//' ('//intc(int(1000.*G2E(X%ng)))//' -->'//intc(int(1000.*G2E(Xng_tmp)))//' mHa)' + call warning(trim(mesg)) + X%ng=Xng_tmp + endif endif ! ! Fxc Checks From 05ea3f9e5f60fed60ba02a0e8a440eb282608b0f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Aug 2022 16:59:31 +0200 Subject: [PATCH 0397/1367] Version 5.1.0, Revision 21687, Hash 25b6a6a MODIFIED * src/interface/INIT_activate.F NEW * Bugs: - [yambo_rt] INIT_RT_ctl can be activated also if running HF only Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 50b4356c8e..01ca6dc696 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21686 -#define YAMBO_HASH "850314e" +#define YAMBO_REVISION 21687 +#define YAMBO_HASH "25b6a6a" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 0015653388..26dfbb65b5 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -374,15 +374,19 @@ subroutine INIT_activate() endif endif #endif + ! + if (l_HF_and_locXC.or.l_elel_corr) then + call INIT_QP_ctl_switch('G') +#if defined _RT + call INIT_RT_ctl_switch('G') +#endif + endif ! if (l_elel_corr) then ! call INIT_QP_ctl_switch('X') - call INIT_QP_ctl_switch('G') - ! #if defined _RT call INIT_RT_ctl_switch('X') - call INIT_RT_ctl_switch('G') #endif ! call initactivate(1,'BoseCut ShiftedPaths') From df720d9703909dddf53450b1c8fd229b9ea5b1b6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 22 Aug 2022 11:08:30 +0200 Subject: [PATCH 0398/1367] Version 5.1.0, Revision 21841, Hash 6beeef72f MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F Bugs: -Fixed compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 +- src/exc-ph/EXC_dipole.F | 16 +++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 54eae46e8e..45b86b285a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21840 -#define YAMBO_HASH "0342d0f5a" +#define YAMBO_REVISION 21841 +#define YAMBO_HASH "6beeef72f" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 2eb2d847a0..83a0e7d497 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -81,7 +81,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Calculate excitonic dipole ! - call EXC_dip(k,E) + call EXC_dip(k,E,q) ! call parser('NoMatrxEl',l_no_matrix_elements) if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 1264f557f0..8eb21bec00 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -23,7 +23,7 @@ ! !> @brief Calculate exciton-dipole !! -subroutine EXC_dip(Xk,E) +subroutine EXC_dip(Xk,E,q) ! use pars, ONLY:pi,SP,rZERO use com, ONLY:msg @@ -32,14 +32,14 @@ subroutine EXC_dip(Xk,E) use electrons, ONLY:levels,spin_occ use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm - use BS, ONLY:BS_bands,BS_dip_size + use BS, ONLY:BS_bands,BS_dip_size,BS_T_grp use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt - use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index + use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index ! #include ! type(levels), intent(in) :: E - type(bz_samp), intent(in) :: Xk + type(bz_samp), intent(in) :: Xk,q ! ! ! Work Space @@ -57,8 +57,8 @@ subroutine EXC_dip(Xk,E) YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) ! ! ... PARALLEL setup - call PARALLEL_global_indexes(Xen,Xk,q," ",RESET=.TRUE.) - call PARALLEL_global_indexes(Xen,Xk,q,"DIPOLES",Dip=DIPs,Dip_limits_pre_defined=.TRUE.) + call PARALLEL_global_indexes(E,Xk,q," ",RESET=.TRUE.) + call PARALLEL_global_indexes(E,Xk,q,"DIPOLES",Dip=Dip,Dip_limits_pre_defined=.TRUE.) ! ! Fill BSS_dipole_opt to be done ! @@ -66,6 +66,8 @@ subroutine EXC_dip(Xk,E) ! BSS_dipoles_opt(1,:)=BS_T_grp(1)%dipoles_opt(1,:,1) ! + ! Recalculate the residuals + ! i_BS_mat=1 call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) ! @@ -75,7 +77,7 @@ subroutine EXC_dip(Xk,E) ! endif ! - ! Calculate the residual + ! Calculate the full residual ! BS_R=rZERO do i_alpha=EXCPH_states(1),EXCPH_states(2) From b4d7802c881db55042b63460f6ebb130a2d7f29c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 22 Aug 2022 19:51:14 +0200 Subject: [PATCH 0399/1367] Version 5.1.0, Revision 21842, Hash df720d970 MODIFIED * include/driver/version.h exc-ph/.objects exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_load_L.F interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F modules/mod_EXCPH.F NEW * exc-ph/EXCPH_gkkp_eval_ber.F RENAMED * exc-ph/EXCPH_gkkp_eval.F -> exc-ph/EXCPH_gkkp_eval_pal.F Additions: -Added possibility to use Bernardi formulation Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/.objects | 2 +- src/exc-ph/EXCPH_gkkp_driver.F | 25 +- src/exc-ph/EXCPH_gkkp_eval_ber.F | 250 ++++++++++++++++++ ...XCPH_gkkp_eval.F => EXCPH_gkkp_eval_pal.F} | 4 +- src/exc-ph/EXCPH_load_L.F | 2 +- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 3 +- src/modules/SET_defaults.F | 3 +- src/modules/mod_EXCPH.F | 6 +- 10 files changed, 289 insertions(+), 12 deletions(-) create mode 100644 src/exc-ph/EXCPH_gkkp_eval_ber.F rename src/exc-ph/{EXCPH_gkkp_eval.F => EXCPH_gkkp_eval_pal.F} (98%) diff --git a/include/driver/version.h b/include/driver/version.h index 45b86b285a..7f4ebeccf9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21841 -#define YAMBO_HASH "6beeef72f" +#define YAMBO_REVISION 21842 +#define YAMBO_HASH "df720d970" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 2b30ad7b1b..3c57d90789 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ +EQ_objs = EXCPH_gkkp_eval_ber.o EXCPH_gkkp_eval_pal.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o #endif diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 9f8cf497c9..ecd457ffd1 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -46,7 +46,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in, & +& EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -90,7 +91,17 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call parser('AbsElph', l_abs_elph) call parser('AbsExc', l_abs_exc) ! - ! Build Q_map + ! Exciton-phonon kind + ! + select case (trim(EXCPH_kind_name)) + case('PALEARI') + EXCPH_kind=PALEARI + case('BERNARDI') + EXCPH_kind=BERNARDI + case default + call error("Unknow exciton-phonon coupling type") + end select + ! elph_branches_save =elph_branches call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. @@ -190,7 +201,15 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! do il=elph_branches(1),elph_branches(2) ! - call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) + if(EXCPH_kind==PALEARI) then + ! + call EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) + ! + elseif(EXCPH_kind==BERNARDI) then + ! + call EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) + ! + endif ! call live_timing(steps=1) ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F new file mode 100644 index 0000000000..cbf4871a4e --- /dev/null +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -0,0 +1,250 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM FP DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! --- Theory --- +! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! - FP +! +! GKKP formulation following the PRL 125, 107401 (2020) +! +subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) + ! + use pars, ONLY:SP,cZERO,rZERO,cONE + !use electrons, ONLY:levels + use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev + use R_lattice, ONLY:bz_samp,qindx_C + use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_free + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & +& deliver_IO_error_message,manage_action,RD + use IO_int, ONLY:io_control + !use X_m, ONLY:X_t + use BS, ONLY:BS_H_dim,BS_bands + use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map + use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,& +& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& +& l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in + ! +#include + ! + !type(levels) ::E + type(bz_samp) ::k,q + !type(X_t) ::X + integer, intent(in) :: iq_s,iq_bz,il!,iq + integer, intent(inout) :: ID_gkkp + ! + ! Work Space + ! + logical :: t_rev + integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& +& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT, & +& iv_in,ic_in,ik_bz_in + real(SP) :: ph_E + complex(SP) :: elph_gkkp + integer, external :: io_ELPH + !complex(SP) :: aux_phase_1,aux_phase_2 + ! + ! Loop scheme: + ! i_l ->i_beta ->i_star [load gkkp] ->i_H + ! ->ivp [Calculate Xi(1)] + ! ->icp [Calculate Xi(2)] + ! ->i_alpha ->i_H [Calculate Gkkp] + Xi=cZERO + ! + elph_gkkp=cONE + ! + t_rev= (iq_s>nsym/(i_time_rev+1)) + ! + ! + ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > + ! + ! with k and q in the BZ + ! + iq_db=Q_io_map(iq_bz) + IO_ACT=RD + if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + ! + call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + if(io_err/=0) call error(" Error reading gkkp_expanded") + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) + ! + if (ph_E ik_bz + ! + ! ip_bz = R_iq_s^-1 ik_bz + ! = R_iq_s^-1 R_ik_s ik_ibz + ! + ip_bz = elemental_scattering(iq_s,ik_bz) + ! + ! 1=DOWN + !======== + ! + do ivp=BS_bands(1),BS_bands(2) + ! + i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) + if (i_Hp==0) cycle + ! + if (.not.l_const_elph) then + ik_db=K_io_map(ik_bz) + if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) + !ik_db=K_io_map(ik_minus_iq_bz) + !elph_gkkp=GKKP%dVc(il,ivp,iv,ik_db,1)/sqrt(2._SP*ph_E) + endif + ! + !ik_db=K_io_map(ik_bz) + !write(*,*) elph_gkkp,conjg(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) + ! + !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) + ! + if (l_abs_exc) then + Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) + else + if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat(i_Hp,i_beta) + endif + ! + enddo + ! + ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz + ! + ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) + ! + ! 2=UP + !====== + ! + do icp=BS_bands(1),BS_bands(2) + ! + i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) + if (i_Hp==0) cycle + ! + if (.not.l_const_elph) then + ik_db=K_io_map(ik_plus_iq_bz) + if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,icp,ic,ik_db,1) /sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + !ik_db=K_io_map(ik_bz) + !elph_gkkp=GKKP%dVc(il,ic,icp,ik_db,1)/sqrt(2._SP*ph_E) + endif + if (l_abs_exc) then + Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) + else + if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat(i_Hp,i_beta) + endif + ! + enddo + ! + enddo + ! + ! Gkkp m.e. + !============= + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + do i_H=1,BS_H_dim + ! + ! K = (ik_bz,iv,ic) + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + ! + ! K_in = (ik_bz,iv,ic) + ! + ik_bz_in = BSS_eh_table_in(i_H,1) + iv_in = BSS_eh_table_in(i_H,2) + ic_in = BSS_eh_table_in(i_H,3) + ! + if (ik_bz /= ik_bz_in) call error(" Wrong k correspondence") + if (iv /= iv_in ) call error(" Wrong iv correspondence") + if (ic /= ic_in ) call error(" Wrong ic correspondence") + ! + ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate + ! + !aux_phase_1 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,1)), REAL(Xi(i_H,1)) ) ) + !aux_phase_2 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,2)), REAL(Xi(i_H,2)) ) ) + ! + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& +& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + ! + enddo + enddo + ! + enddo !Loop i_beta + ! + ! Compute the squared couplings + ! + forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) + !EXCPH_Gkkp_sq(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) + EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + end forall + ! + contains + ! + integer function elemental_scattering(i_q_SYM,i_k_BZ) + ! + ! This is done because the BSE is solved for q in IBZ and k in BZ. + ! However the EXCPH matrix elements are for k in BZ and q in BZ. + ! + ! Therefore, I have the exc. weight (q |cRk vRk-q) + ! but I don't have the exc. weight (Sq |cRk vRk-Sq). + ! + ! Yet, I know that (Sq |cRk vRk-Sq) = (q |c{S^-1R}k v{S^-1R}k-q). + ! + ! Therefore, in this subroutine I look for p = {S^-1 R}k + ! + integer i_q_SYM,i_k_BZ,i_k_IBZ,i_k_SYM + ! + ! K_i_k_bz =R_i_k_SYM K_i_k_IBZ + ! + i_k_IBZ = k%sstar(i_k_BZ,1) + i_k_SYM = k%sstar(i_k_BZ,2) + ! + ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz + ! + elemental_scattering = k%k_table(i_k_IBZ, sop_tab(sop_inv(i_q_SYM),i_k_SYM) ) + ! + end function + ! +end subroutine diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval_pal.F similarity index 98% rename from src/exc-ph/EXCPH_gkkp_eval.F rename to src/exc-ph/EXCPH_gkkp_eval_pal.F index 9037ddf8a5..1d01f16eb6 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval_pal.F @@ -25,7 +25,9 @@ ! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. ! - FP ! -subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) +! GKKP formulation following the F. Paleari PhD thesis +! +subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO,cONE !use electrons, ONLY:levels diff --git a/src/exc-ph/EXCPH_load_L.F b/src/exc-ph/EXCPH_load_L.F index a4eebb7809..4407f3ae82 100644 --- a/src/exc-ph/EXCPH_load_L.F +++ b/src/exc-ph/EXCPH_load_L.F @@ -32,7 +32,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use R_lattice, ONLY:bz_samp use BS, ONLY:BS_H_dim,BSE_L_kind,BS_res_ares_n_mat,BS_K_dim - use EXCPH, ONLY:BS_E,BS_R_left,BS_R_right,EXCPH_states,EXCPH_sum,EXCPH_kind,Lout_path,L_kind_in,L_kind_out + use EXCPH, ONLY:BS_E,BS_R_left,BS_R_right,EXCPH_states,EXCPH_sum,Lout_path,L_kind_in,L_kind_out use IO_int, ONLY:io_control use stderr, ONLY:intc use X_m, ONLY:X_t diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 543d3b39ff..88ec9aff9e 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -454,7 +454,7 @@ subroutine INIT_activate() ! ! Exciton-phonon Self-energy ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact LDamping') + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) & & call initactivate(1,'BoseTemp ElPhModes EXCTemp EXCLongDr DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 11a978e3dd..6adc798e22 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0 + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,EXCPH_kind_name use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP @@ -667,6 +667,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) + call it(defs,'ExcPhKind', '[EXCPH] Exciton-phonon kind (PALEARI | BERNARDI)',EXCPH_kind_name) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index ff2d51ec25..554f217b00 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -83,7 +83,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0 + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -538,6 +538,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Lin_path ='none' Lout_path='none' EXCPH_states=(/1,1/) + EXCPH_kind_name='PALEARI' EXCPH_sum=(/1,1/) L_damping=0.0005/HA2EV ! set to 0.5 meV EXC_q0=(/0.0,0.0,0.0/) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 9f001c1733..0d0ae2400d 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -42,9 +42,13 @@ module EXCPH integer :: EXCPH_states(2) integer :: EXCPH_sum(2) real(SP), allocatable :: EXCPH_q(:,:) - character(schlen) :: EXCPH_kind + character(schlen) :: EXCPH_kind_name + integer :: EXCPH_kind real(SP) :: EXC_q0(3) ! + integer, parameter :: PALEARI = 1 + integer, parameter :: BERNARDI = 2 + ! ! L_in and L_out paths ! character(lchlen) :: Lin_path From 138d905fcb1033cea21794a54ac4fc6e6ab10099 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 22 Aug 2022 19:53:25 +0200 Subject: [PATCH 0400/1367] Version 5.1.0, Revision 21843, Hash b4d7802c8 MODIFIED * include/driver/version.h io/io_EXCPH_gkkp.F Additions: -Added EXCPH_kind in the IO Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/io/io_EXCPH_gkkp.F | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7f4ebeccf9..c4054ceaf6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21842 -#define YAMBO_HASH "df720d970" +#define YAMBO_REVISION 21843 +#define YAMBO_HASH "b4d7802c8" diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index c31a16aba6..e5778cb339 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -29,7 +29,7 @@ integer function io_EXCPH_gkkp(ID) & def_variable_bulk,io_variable_bulk,io_fragment use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& & BS_EXCPH_E,ph_EXCPH_E,EXCPH_q,L_kind_in,L_kind_out,Sat_alloc, & -& EXCPH_gkkp_alloc +& EXCPH_gkkp_alloc,EXCPH_kind use IO_int, ONLY:io_variable_elemental,def_variable_elemental use ELPH, ONLY:ph_modes use stderr, ONLY:intc @@ -61,7 +61,7 @@ integer function io_EXCPH_gkkp(ID) ! io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) ! - call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + call io_elemental(ID,VAR="PARS",VAR_SZ=7,MENU=0) ! call io_elemental(ID,& & VAR=" Number of qpoints (BZ) :",I0=nqbz,CHECK=.true.,OP=(/"=="/)) @@ -70,7 +70,10 @@ integer function io_EXCPH_gkkp(ID) & VAR=" Exciton states :",I1=EXCPH_states,CHECK=.true.,OP=(/"==","=="/)) ! call io_elemental(ID,& -& VAR=" Exciton sum (scattered) :",I1=EXCPH_sum,CHECK=.true.,OP=(/"==","=="/)) +& VAR=" Exciton sum (scattered) :",I1=EXCPH_sum,CHECK=.true.,OP=(/"==","=="/)) + ! + call io_elemental(ID,& +& VAR=" Exciton-phonon kind :",I0=EXCPH_kind,CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,& & VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) From 1682da85aaaf15badfca1c496d6d116b009136e2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 09:05:12 +0200 Subject: [PATCH 0401/1367] Version 5.1.0, Revision 21844, Hash 138d905fc MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F Additions: -Fixed dipole range Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 +- src/exc-ph/EXC_dipole.F | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c4054ceaf6..8ef87c9679 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21843 -#define YAMBO_HASH "b4d7802c8" +#define YAMBO_REVISION 21844 +#define YAMBO_HASH "138d905fc" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 83a0e7d497..70177c0916 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -81,7 +81,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Calculate excitonic dipole ! - call EXC_dip(k,E,q) + call EXC_dipole(k,E,q) ! call parser('NoMatrxEl',l_no_matrix_elements) if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 8eb21bec00..fab65a088a 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -23,7 +23,7 @@ ! !> @brief Calculate exciton-dipole !! -subroutine EXC_dip(Xk,E,q) +subroutine EXC_dipole(Xk,E,q) ! use pars, ONLY:pi,SP,rZERO use com, ONLY:msg @@ -56,6 +56,12 @@ subroutine EXC_dip(Xk,E,q) BS_dip_size=1 YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) ! + DIPs%ib =BS_bands(1:2) + DIPs%ib_lim(1)=E%nbf + DIPs%ib_lim(2)=E%nbf+1 + ! + call msg('s'',Dipole bands range: ',BS_bands) + ! ! ... PARALLEL setup call PARALLEL_global_indexes(E,Xk,q," ",RESET=.TRUE.) call PARALLEL_global_indexes(E,Xk,q,"DIPOLES",Dip=Dip,Dip_limits_pre_defined=.TRUE.) From f05268159932ac6681ee8c752262f78bebcd2b9e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 09:21:13 +0200 Subject: [PATCH 0402/1367] Version 5.1.0, Revision 21845, Hash 1682da85a MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Bugs: -Fixed dip range Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8ef87c9679..8bf4803fec 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21844 -#define YAMBO_HASH "138d905fc" +#define YAMBO_REVISION 21845 +#define YAMBO_HASH "1682da85a" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index fab65a088a..8d65e191de 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -27,6 +27,7 @@ subroutine EXC_dipole(Xk,E,q) ! use pars, ONLY:pi,SP,rZERO use com, ONLY:msg + use stderr, ONLY:intc use R_lattice, ONLY:d3k_factor,bare_qpg,bz_samp use DIPOLES, ONLY:DIPOLE_t use electrons, ONLY:levels,spin_occ @@ -46,7 +47,7 @@ subroutine EXC_dipole(Xk,E,q) ! integer :: i_alpha,i_BS_mat integer :: io_err - type(DIPOLE_t) :: Dip + type(DIPOLE_t) :: DIPs ! if(any(abs(EXC_q0(:))>epsilon(1.))) then ! @@ -57,18 +58,18 @@ subroutine EXC_dipole(Xk,E,q) YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) ! DIPs%ib =BS_bands(1:2) - DIPs%ib_lim(1)=E%nbf - DIPs%ib_lim(2)=E%nbf+1 + DIPs%ib_lim(1)=E%nbf(1) + DIPs%ib_lim(2)=E%nbf(1)+1 ! - call msg('s'',Dipole bands range: ',BS_bands) + call msg('s','Dipole bands range: ',BS_bands) ! ! ... PARALLEL setup call PARALLEL_global_indexes(E,Xk,q," ",RESET=.TRUE.) - call PARALLEL_global_indexes(E,Xk,q,"DIPOLES",Dip=Dip,Dip_limits_pre_defined=.TRUE.) + call PARALLEL_global_indexes(E,Xk,q,"DIPOLES",Dip=DIPs,Dip_limits_pre_defined=.TRUE.) ! ! Fill BSS_dipole_opt to be done ! - call K_dipoles(1,E,Xk,Dip) + call K_dipoles(1,E,Xk,DIPs) ! BSS_dipoles_opt(1,:)=BS_T_grp(1)%dipoles_opt(1,:,1) ! From 8508d59cbfcf923630456fcc2c2805d313b9717f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 10:12:15 +0200 Subject: [PATCH 0403/1367] Version 5.1.0, Revision 21846, Hash f05268159 MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Additions: -Fixed dipole varibles in IO Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8bf4803fec..6a9218476d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21845 -#define YAMBO_HASH "1682da85a" +#define YAMBO_REVISION 21846 +#define YAMBO_HASH "f05268159" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 8d65e191de..7de3e4947d 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -29,12 +29,12 @@ subroutine EXC_dipole(Xk,E,q) use com, ONLY:msg use stderr, ONLY:intc use R_lattice, ONLY:d3k_factor,bare_qpg,bz_samp - use DIPOLES, ONLY:DIPOLE_t + use DIPOLES, ONLY:DIPOLE_t,DIPOLES_reset use electrons, ONLY:levels,spin_occ use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm use BS, ONLY:BS_bands,BS_dip_size,BS_T_grp - use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt + use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt,BSS_Vnl_included use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index ! #include @@ -46,7 +46,6 @@ subroutine EXC_dipole(Xk,E,q) ! Work Space ! integer :: i_alpha,i_BS_mat - integer :: io_err type(DIPOLE_t) :: DIPs ! if(any(abs(EXC_q0(:))>epsilon(1.))) then @@ -57,11 +56,16 @@ subroutine EXC_dipole(Xk,E,q) BS_dip_size=1 YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) ! - DIPs%ib =BS_bands(1:2) - DIPs%ib_lim(1)=E%nbf(1) - DIPs%ib_lim(2)=E%nbf(1)+1 + call DIPOLES_reset(DIPs) ! - call msg('s','Dipole bands range: ',BS_bands) + DIPs%ib =BS_bands(1:2) + DIPs%ib_lim(1) =E%nbf(1) + DIPs%ib_lim(2) =E%nbf(1)+1 + DIPs%Vnl_included=.TRUE. ! Unfortunatelly BSS_Vnl_included is not saved on disk I assume .TRUE. + DIPs%computed='R V P' + ! + call msg('s','Dipole bands range : ',BS_bands) + call msg('s','Dipole Vnl included: ',BSS_Vnl_included) ! ! ... PARALLEL setup call PARALLEL_global_indexes(E,Xk,q," ",RESET=.TRUE.) From ad8add38cef0ac8f32fa39f80db648a722f15fd4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 10:40:34 +0200 Subject: [PATCH 0404/1367] Version 5.1.0, Revision 21847, Hash 8508d59cb MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F Bugs: -Still problems with BSE parallelism Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 +- src/exc-ph/EXC_dipole.F | 15 +++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6a9218476d..5c1667f65c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21846 -#define YAMBO_HASH "f05268159" +#define YAMBO_REVISION 21847 +#define YAMBO_HASH "8508d59cb" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 70177c0916..3d492023d5 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -81,7 +81,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Calculate excitonic dipole ! - call EXC_dipole(k,E,q) + call EXC_dipole(k,E,q,X) ! call parser('NoMatrxEl',l_no_matrix_elements) if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 7de3e4947d..3f674fcda4 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -23,7 +23,7 @@ ! !> @brief Calculate exciton-dipole !! -subroutine EXC_dipole(Xk,E,q) +subroutine EXC_dipole(Xk,E,q,X) ! use pars, ONLY:pi,SP,rZERO use com, ONLY:msg @@ -33,6 +33,7 @@ subroutine EXC_dipole(Xk,E,q) use electrons, ONLY:levels,spin_occ use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm + use X_m, ONLY:X_t use BS, ONLY:BS_bands,BS_dip_size,BS_T_grp use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt,BSS_Vnl_included use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index @@ -41,6 +42,7 @@ subroutine EXC_dipole(Xk,E,q) ! type(levels), intent(in) :: E type(bz_samp), intent(in) :: Xk,q + type(X_t), intent(in) :: X ! ! ! Work Space @@ -61,15 +63,20 @@ subroutine EXC_dipole(Xk,E,q) DIPs%ib =BS_bands(1:2) DIPs%ib_lim(1) =E%nbf(1) DIPs%ib_lim(2) =E%nbf(1)+1 - DIPs%Vnl_included=.TRUE. ! Unfortunatelly BSS_Vnl_included is not saved on disk I assume .TRUE. - DIPs%computed='R V P' +! +! Unfortunatelly BSS_Vnl_included and DIPs%computed +! are not saved by the BS_solves I assume .TRUE. and 'R V P' +! + DIPs%Vnl_included=.TRUE. + DIPs%computed ='R V P' ! call msg('s','Dipole bands range : ',BS_bands) call msg('s','Dipole Vnl included: ',BSS_Vnl_included) ! ! ... PARALLEL setup + ! call PARALLEL_global_indexes(E,Xk,q," ",RESET=.TRUE.) - call PARALLEL_global_indexes(E,Xk,q,"DIPOLES",Dip=DIPs,Dip_limits_pre_defined=.TRUE.) + call PARALLEL_global_indexes(E,Xk,q,"Response_T_space",X=X) ! ! Fill BSS_dipole_opt to be done ! From af50491324b8c6fda13d1a5951b0bde818716496 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 10:58:42 +0200 Subject: [PATCH 0405/1367] Version 5.1.0, Revision 21848, Hash ad8add38c MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Bugs: -Problems with BSE parallelism not solved yet Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5c1667f65c..32f52598a5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21847 -#define YAMBO_HASH "8508d59cb" +#define YAMBO_REVISION 21848 +#define YAMBO_HASH "ad8add38c" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 3f674fcda4..13c7663a7c 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -36,7 +36,8 @@ subroutine EXC_dipole(Xk,E,q,X) use X_m, ONLY:X_t use BS, ONLY:BS_bands,BS_dip_size,BS_T_grp use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt,BSS_Vnl_included - use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index + use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index,PARALLEL_WF_distribute,PARALLEL_WF_index + use parallel_m, ONLY:PAR_IND_WF_b_and_k ! #include ! @@ -71,7 +72,7 @@ subroutine EXC_dipole(Xk,E,q,X) DIPs%computed ='R V P' ! call msg('s','Dipole bands range : ',BS_bands) - call msg('s','Dipole Vnl included: ',BSS_Vnl_included) + call msg('s','Dipole Vnl included: ',BSS_Vnl_included) ! ! ... PARALLEL setup ! @@ -79,6 +80,18 @@ subroutine EXC_dipole(Xk,E,q,X) call PARALLEL_global_indexes(E,Xk,q,"Response_T_space",X=X) ! ! Fill BSS_dipole_opt to be done + ! + call K_Transitions_setup("T",1,E,Xk,DIPs) + ! + call PARALLEL_global_Response_T_transitions(Xk) + ! + !... Blocks build-up + call K_blocks() + ! + ! Wave Functions distribution + !============================= + call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.FALSE.) + call PARALLEL_WF_index( ) ! call K_dipoles(1,E,Xk,DIPs) ! @@ -105,4 +118,6 @@ subroutine EXC_dipole(Xk,E,q,X) ! This formula can be wrong in presence of the 2D-cutoff BS_R=BS_R*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 ! + call PARALLEL_global_indexes(E,Xk,q,"Response_T_space",X=X,RESET=.TRUE.) + ! end subroutine From d9aa33c6f5540c7bc00e294ade09f3bf60a55b18 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 14:50:51 +0200 Subject: [PATCH 0406/1367] Version 5.1.0, Revision 21849, Hash af5049132 MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Bugs: -Fixed parallel indexes Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 32f52598a5..4e53d612be 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21848 -#define YAMBO_HASH "ad8add38c" +#define YAMBO_REVISION 21849 +#define YAMBO_HASH "af5049132" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 13c7663a7c..7fdc0c8e65 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -79,12 +79,15 @@ subroutine EXC_dipole(Xk,E,q,X) call PARALLEL_global_indexes(E,Xk,q," ",RESET=.TRUE.) call PARALLEL_global_indexes(E,Xk,q,"Response_T_space",X=X) ! - ! Fill BSS_dipole_opt to be done + ! ... EH space (no parallelization) + call K_Transitions_setup("K",1,E,Xk,DIPs) ! - call K_Transitions_setup("T",1,E,Xk,DIPs) - ! + !... Parallel distribution call PARALLEL_global_Response_T_transitions(Xk) ! + ! ... EH space (with parallelization) and Transition groups build-up + call K_Transitions_setup("T",1,E,Xk,DIPs) + ! !... Blocks build-up call K_blocks() ! @@ -93,6 +96,7 @@ subroutine EXC_dipole(Xk,E,q,X) call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.FALSE.) call PARALLEL_WF_index( ) ! + ! Fill BSS_dipole_opt to be done call K_dipoles(1,E,Xk,DIPs) ! BSS_dipoles_opt(1,:)=BS_T_grp(1)%dipoles_opt(1,:,1) From 0bd6f9ebb028fda8619580cc708aff2689ce9923 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 15:44:55 +0200 Subject: [PATCH 0407/1367] Version 5.1.0, Revision 21850, Hash d9aa33c6f MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F Bugs: - Additions: -Fixed problem with dipoles... working on residuals Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 8 ++++---- src/exc-ph/EXC_dipole.F | 20 +++++++++----------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4e53d612be..1562a62ad9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21849 -#define YAMBO_HASH "af5049132" +#define YAMBO_REVISION 21850 +#define YAMBO_HASH "d9aa33c6f" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 3d492023d5..d18d40634c 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -74,15 +74,15 @@ subroutine EXCPH_optics(E,k,q,X,wv) call EXCPH_load_L(1,X,'eigenvalues residuals','Lin') BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out ! + ! Recalculate excitonic dipole if required + ! + call EXC_dipole(k,E,q,X) + ! do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! - ! Calculate excitonic dipole - ! - call EXC_dipole(k,E,q,X) - ! call parser('NoMatrxEl',l_no_matrix_elements) if(l_no_matrix_elements) call warning('No exc-ph matrix elements, just ph-assisted dos') ! diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 7fdc0c8e65..3ddc355bd0 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -34,8 +34,8 @@ subroutine EXC_dipole(Xk,E,q,X) use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm use X_m, ONLY:X_t - use BS, ONLY:BS_bands,BS_dip_size,BS_T_grp - use BS_solvers, ONLY:BS_H_dim,BSS_dipoles_opt,BSS_Vnl_included + use BS, ONLY:BS_bands,BS_T_grp,BSE_prop,BS_dip_size + use BS_solvers, ONLY:BS_H_dim,BSS_Vnl_included,BSS_alloc use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_WF_b_and_k ! @@ -56,9 +56,6 @@ subroutine EXC_dipole(Xk,E,q,X) EXC_q0=EXC_q0/v_norm(EXC_q0) call msg('rs','Excitonic dipole along the direction : ',EXC_q0) ! - BS_dip_size=1 - YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) - ! call DIPOLES_reset(DIPs) ! DIPs%ib =BS_bands(1:2) @@ -91,15 +88,16 @@ subroutine EXC_dipole(Xk,E,q,X) !... Blocks build-up call K_blocks() ! - ! Wave Functions distribution - !============================= - call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.FALSE.) - call PARALLEL_WF_index( ) - ! ! Fill BSS_dipole_opt to be done call K_dipoles(1,E,Xk,DIPs) ! - BSS_dipoles_opt(1,:)=BS_T_grp(1)%dipoles_opt(1,:,1) + BSE_prop='abs' + BS_dip_size=1 + call K_observables() + ! + call BSS_alloc() + ! + call K_components_folded_in_serial_arrays(1) ! ! Recalculate the residuals ! From fb6097e3c4c8d5acdcfb7d9df374df1c43c09c5d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 16:33:33 +0200 Subject: [PATCH 0408/1367] Version 5.1.0, Revision 21851, Hash 0bd6f9ebb MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F modules/mod_EXCPH.F Bugs: -Fixed allocation BSE arrays Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_gkkp_driver.F | 37 +++++++-------------- src/exc-ph/EXCPH_lifetime.F | 7 ++-- src/exc-ph/EXCPH_optics.F | 15 ++++++--- src/exc-ph/EXC_dipole.F | 2 +- src/modules/mod_EXCPH.F | 60 ++++++++++++++++++++++++++++++---- 6 files changed, 82 insertions(+), 43 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1562a62ad9..93024ca8af 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21850 -#define YAMBO_HASH "d9aa33c6f" +#define YAMBO_REVISION 21851 +#define YAMBO_HASH "0bd6f9ebb" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index ecd457ffd1..96b337e405 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -47,7 +47,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in, & -& EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI +& EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -132,10 +132,14 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) ! - call BSE_alloc() + call BSE_alloc(k,q) ! call EXCPH_load_L(1,X,'load','Lin') ! + ! Alloc BS_in variables + ! + call BSE_in_alloc() + ! ! Alloage EXCPH_gkkp ! call EXCPH_gkkp_alloc() @@ -236,6 +240,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call live_timing( ) ! call BSE_free() + call BSE_in_free() call EXCPH_gkkp_free() ! ! Report all relevant data of the exciton-phonon coupling @@ -248,50 +253,30 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! contains ! - subroutine BSE_alloc() + subroutine BSE_in_alloc() implicit none ! ! pre-allocs... ! - YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) - YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) - YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) - YAMBO_ALLOC(BS_E,(BSS_n_eig)) - YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) - YAMBO_ALLOC(BSqpts,(3,q%nibz)) - ! YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) ! - BS_mat=cZERO - BS_E=cZERO - ! - k_plus_q_table = 0 - BSS_eh_table = 0 - BSS_eh_table_m1 = 0 - ! BS_mat_in=cZERO BS_E_in =cZERO BSS_eh_table_in = 0 BSS_eh_table_m1_in = 0 ! - end subroutine BSE_alloc + end subroutine BSE_in_alloc ! - subroutine BSE_free + subroutine BSE_in_free implicit none - YAMBO_FREE(BS_mat) - YAMBO_FREE(BSS_eh_table) - YAMBO_FREE(BSS_eh_table_m1) YAMBO_FREE(BS_E_in) YAMBO_FREE(BS_mat_in) YAMBO_FREE(BSS_eh_table_in) YAMBO_FREE(BSS_eh_table_m1_in) - YAMBO_FREE(BS_E) - YAMBO_FREE(k_plus_q_table) - YAMBO_FREE(BSqpts) - end subroutine BSE_free + end subroutine BSE_in_free ! subroutine get_excph_q_momenta() ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index ef43b3e47c..94bbe0d7c7 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -35,7 +35,8 @@ subroutine EXCPH_lifetime(k,q,X) use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & -& alloc_EXC,free_EXC,EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements +& EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements, & +& RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use vec_operate, ONLY:degeneration_finder use frequency, ONLY:w_samp @@ -73,7 +74,7 @@ subroutine EXCPH_lifetime(k,q,X) ! ! Allocations ! - call alloc_EXC(q) + call RESIDUALS_and_EIGENVALUES_alloc(q) ! ! Load excitonic energies ! @@ -179,7 +180,7 @@ subroutine EXCPH_lifetime(k,q,X) ! Deallocations ! YAMBO_FREE(EXC_LifeTime) - call free_EXC() + call RESIDUALS_and_EIGENVALUES_free() ! contains ! diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index d18d40634c..f1f10d997e 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -32,11 +32,13 @@ subroutine EXCPH_optics(E,k,q,X,wv) use X_m, ONLY:X_t use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R,free_EXC,alloc_EXC, & +& BS_R_left,BS_R_right,BS_R,BSE_alloc,BSE_free, & +& RESIDUALS_and_EIGENVALUES_free, RESIDUALS_and_EIGENVALUES_alloc, & & l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free use ELPH, ONLY:use_PH_DbGd,ph_modes + use BS_solvers, ONLY:BSS_eh_table use frequency, ONLY:w_samp - use parser_m, ONLY:parser + use parser_m, ONLY:parser ! #include ! @@ -65,14 +67,17 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Allocations ! - call alloc_EXC(q) + call RESIDUALS_and_EIGENVALUES_alloc(q) ! call Sat_alloc() ! ! Load excitonic energies and residuals ! - call EXCPH_load_L(1,X,'eigenvalues residuals','Lin') + call BSE_alloc(k,q) + call EXCPH_load_L(1,X,'load residuals','Lin') BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out + write(*,*) ' passo qui ',shape(BSS_eh_table) + stop ! ! Recalculate excitonic dipole if required ! @@ -122,7 +127,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Deallocations ! - call free_EXC() + call RESIDUALS_and_EIGENVALUES_free() call Sat_free() YAMBO_FREE(Epsilon_ii) YAMBO_FREE(PL_ii) diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 3ddc355bd0..7e61a7ada7 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -52,7 +52,7 @@ subroutine EXC_dipole(Xk,E,q,X) type(DIPOLE_t) :: DIPs ! if(any(abs(EXC_q0(:))>epsilon(1.))) then - ! + ! EXC_q0=EXC_q0/v_norm(EXC_q0) call msg('rs','Excitonic dipole along the direction : ',EXC_q0) ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 0d0ae2400d..ed91857435 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -172,28 +172,76 @@ subroutine EXCPH_gkkp_free YAMBO_FREE(Xi) end subroutine EXCPH_gkkp_free ! - subroutine free_EXC() + subroutine RESIDUALS_and_EIGENVALUES_free implicit none ! - YAMBO_FREE(BS_E) YAMBO_FREE(BS_all_E) YAMBO_FREE_P(BS_R_left) YAMBO_FREE_P(BS_R_right) YAMBO_FREE(BS_R) + if(allocated(BS_E)) then + YAMBO_FREE(BS_E) + endif ! - end subroutine free_EXC + end subroutine RESIDUALS_and_EIGENVALUES_free ! - subroutine alloc_EXC(q) + subroutine RESIDUALS_and_EIGENVALUES_alloc(q) use R_lattice, ONLY:bz_samp implicit none type(bz_samp) ::q - YAMBO_ALLOC(BS_E,(BSS_n_eig)) + if(.not.allocated(BS_E)) then + YAMBO_ALLOC(BS_E,(BSS_n_eig)) + endif YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) YAMBO_ALLOC(BS_R,(BSS_n_eig)) YAMBO_ALLOC(BS_E_in,(EXCPH_states(1):EXCPH_states(2))) YAMBO_ALLOC(BS_all_E,(BSS_n_eig,q%nibz)) - end subroutine alloc_EXC + end subroutine RESIDUALS_and_EIGENVALUES_alloc + ! + subroutine BSE_alloc(k,q) + ! + use electrons, ONLY:n_sp_pol + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig + use BS, ONLY:BS_H_dim,BS_bands,BSqpts + use R_lattice, ONLY:bz_samp + ! +#include + ! + type(bz_samp) ::k,q + ! + ! pre-allocs... + ! + YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) + YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) + YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) + YAMBO_ALLOC(BSqpts,(3,q%nibz)) + ! + BS_mat=cZERO + BS_E=cZERO + ! + k_plus_q_table = 0 + BSS_eh_table = 0 + BSS_eh_table_m1 = 0 + ! + end subroutine BSE_alloc + ! + subroutine BSE_free + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig + use BS, ONLY:BSqpts + ! +#include + ! + YAMBO_FREE(BS_mat) + YAMBO_FREE(BSS_eh_table) + YAMBO_FREE(BSS_eh_table_m1) + if(allocated(BS_E)) then + YAMBO_FREE(BS_E) + endif + YAMBO_FREE(k_plus_q_table) + YAMBO_FREE(BSqpts) + end subroutine BSE_free ! subroutine build_Q_map(q) use R_lattice, ONLY:bz_samp From 915b355de78983dc4fe921148947f51ab68bf20d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 24 Aug 2022 16:46:01 +0200 Subject: [PATCH 0409/1367] Version 5.1.0, Revision 21852, Hash fb6097e3c MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Bugs: -Not working yet due to the BSS_eh_table variable Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 -- src/modules/mod_EXCPH.F | 6 +++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 93024ca8af..fedcbb63bc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21851 -#define YAMBO_HASH "0bd6f9ebb" +#define YAMBO_REVISION 21852 +#define YAMBO_HASH "fb6097e3c" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index f1f10d997e..55efe47ed9 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -76,8 +76,6 @@ subroutine EXCPH_optics(E,k,q,X,wv) call BSE_alloc(k,q) call EXCPH_load_L(1,X,'load residuals','Lin') BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out - write(*,*) ' passo qui ',shape(BSS_eh_table) - stop ! ! Recalculate excitonic dipole if required ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index ed91857435..71760deb96 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -214,7 +214,11 @@ subroutine BSE_alloc(k,q) ! YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) - YAMBO_ALLOC(BS_E,(BSS_n_eig)) + YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + ! + if(.not.allocated(BS_E)) then + YAMBO_ALLOC(BS_E,(BSS_n_eig)) + endif YAMBO_ALLOC(k_plus_q_table,(k%nbz,q%nbz)) YAMBO_ALLOC(BSqpts,(3,q%nibz)) ! From b4e625b3643b0e0b9fbb658673480f8af159c9ae Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 25 Aug 2022 11:24:37 +0200 Subject: [PATCH 0410/1367] Version 5.1.0, Revision 21853, Hash 915b355de MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F modules/mod_EXCPH.F Additions: -Better allocations.... not working yet Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 5 ++++- src/exc-ph/EXCPH_optics.F | 6 +++++- src/exc-ph/EXC_dipole.F | 2 -- src/modules/mod_EXCPH.F | 2 -- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fedcbb63bc..1f1ec31f09 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21852 -#define YAMBO_HASH "fb6097e3c" +#define YAMBO_REVISION 21853 +#define YAMBO_HASH "915b355de" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 96b337e405..1a4fa818de 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -38,7 +38,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use R_lattice, ONLY:bz_samp,qindx_B !_load use parser_m, ONLY:parser use X_m, ONLY:X_t - use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig,BSS_alloc,BSS_free use BS, ONLY:BS_H_dim,BS_bands,BSqpts use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & @@ -132,6 +132,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) ! + call BSS_alloc() + ! call BSE_alloc(k,q) ! call EXCPH_load_L(1,X,'load','Lin') @@ -239,6 +241,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call live_timing( ) ! + call BSS_free() call BSE_free() call BSE_in_free() call EXCPH_gkkp_free() diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 55efe47ed9..f583b942cf 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -36,7 +36,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) & RESIDUALS_and_EIGENVALUES_free, RESIDUALS_and_EIGENVALUES_alloc, & & l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free use ELPH, ONLY:use_PH_DbGd,ph_modes - use BS_solvers, ONLY:BSS_eh_table + use BS_solvers, ONLY:BSS_eh_table,BSS_alloc,BSS_free use frequency, ONLY:w_samp use parser_m, ONLY:parser ! @@ -73,7 +73,10 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Load excitonic energies and residuals ! + call BSS_alloc() + ! call BSE_alloc(k,q) + ! call EXCPH_load_L(1,X,'load residuals','Lin') BS_E_in(:)=BS_E(EXCPH_states(1):EXCPH_states(2)) ! L_in can be different from L_out ! @@ -127,6 +130,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! call RESIDUALS_and_EIGENVALUES_free() call Sat_free() + call BSS_free() YAMBO_FREE(Epsilon_ii) YAMBO_FREE(PL_ii) ! diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 7e61a7ada7..383377fb25 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -95,8 +95,6 @@ subroutine EXC_dipole(Xk,E,q,X) BS_dip_size=1 call K_observables() ! - call BSS_alloc() - ! call K_components_folded_in_serial_arrays(1) ! ! Recalculate the residuals diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 71760deb96..181326b4d9 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -213,7 +213,6 @@ subroutine BSE_alloc(k,q) ! pre-allocs... ! YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) - YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) ! if(.not.allocated(BS_E)) then @@ -226,7 +225,6 @@ subroutine BSE_alloc(k,q) BS_E=cZERO ! k_plus_q_table = 0 - BSS_eh_table = 0 BSS_eh_table_m1 = 0 ! end subroutine BSE_alloc From e74dfaa759366f65d5691ab3234c208d5bc864b9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 25 Aug 2022 12:01:47 +0200 Subject: [PATCH 0411/1367] Version 5.1.0, Revision 21854, Hash b4e625b36 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/EXC_dipole.F modules/mod_BS_solvers.F Additions: -The code works Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 6 ++++++ src/exc-ph/EXC_dipole.F | 4 ---- src/modules/mod_BS_solvers.F | 1 + 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1f1ec31f09..2f787ced9c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21853 -#define YAMBO_HASH "915b355de" +#define YAMBO_REVISION 21854 +#define YAMBO_HASH "b4e625b36" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index f583b942cf..2e5971e1f7 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -37,6 +37,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) & l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free use ELPH, ONLY:use_PH_DbGd,ph_modes use BS_solvers, ONLY:BSS_eh_table,BSS_alloc,BSS_free + use BS, ONLY:BSE_prop,BS_dip_size use frequency, ONLY:w_samp use parser_m, ONLY:parser ! @@ -73,6 +74,11 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! ! Load excitonic energies and residuals ! + BSE_prop='abs' + BS_dip_size=1 + ! + call K_observables() + ! call BSS_alloc() ! call BSE_alloc(k,q) diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 383377fb25..cc636ba479 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -91,10 +91,6 @@ subroutine EXC_dipole(Xk,E,q,X) ! Fill BSS_dipole_opt to be done call K_dipoles(1,E,Xk,DIPs) ! - BSE_prop='abs' - BS_dip_size=1 - call K_observables() - ! call K_components_folded_in_serial_arrays(1) ! ! Recalculate the residuals diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 9c80397c1b..1e1a5246cd 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -321,6 +321,7 @@ subroutine BSS_alloc( ) BSS_eh_table = 0 BSS_eh_E = rZERO BSS_eh_f = rZERO + write(*,*) ' passo qui ',l_BS_abs,BS_dip_size,BS_H_dim if (l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism) then YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) BSS_dipoles_opt = cZERO From 0da86df6faeeed1f60c08638b3e5b48245b245c7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 28 Aug 2022 18:03:52 +0200 Subject: [PATCH 0412/1367] Version 5.1.0, Revision 21855, Hash e74dfaa75 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval_ber.F Bugs: - Additions: -Implemented Bernardi way ... test in progress... Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_gkkp_eval_ber.F | 205 +++++++++++-------------------- 2 files changed, 77 insertions(+), 132 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2f787ced9c..07e619ae74 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21854 -#define YAMBO_HASH "b4e625b36" +#define YAMBO_REVISION 21855 +#define YAMBO_HASH "e74dfaa75" diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index cbf4871a4e..1ed06496f2 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -59,7 +59,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) & iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT, & & iv_in,ic_in,ik_bz_in real(SP) :: ph_E - complex(SP) :: elph_gkkp + complex(SP) :: elph_gkkp,Xi_element integer, external :: io_ELPH !complex(SP) :: aux_phase_1,aux_phase_2 ! @@ -74,149 +74,94 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! t_rev= (iq_s>nsym/(i_time_rev+1)) ! + ! + ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > + ! + ! with k and q in the BZ + ! + iq_db=Q_io_map(iq_bz) + IO_ACT=RD + if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + ! + call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + if(io_err/=0) call error(" Error reading gkkp_expanded") + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) + ! + if (ph_E - ! - ! with k and q in the BZ - ! - iq_db=Q_io_map(iq_bz) - IO_ACT=RD - if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) - ! - call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. - if(io_err/=0) call error(" Error reading gkkp_expanded") - ! - ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) - ! - if (ph_E ik_bz ! - !write(iq_bz*1000+i_beta,*) iq_bz,i_beta,iq_s + ! ip_bz = R_iq_s^-1 ik_bz + ! = R_iq_s^-1 R_ik_s ik_ibz ! - do i_H=1,BS_H_dim - ! - ! K = (ik_bz,iv,ic) - ! - ik_bz = BSS_eh_table(i_H,1) - iv = BSS_eh_table(i_H,2) - ic = BSS_eh_table(i_H,3) - ! - ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz - ! - ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz - ! - ! DS note: I think here the choice is not unique - ! given a ik_bz there maybe multiple ik_s which send ik_ibz --> ik_bz - ! - ! ip_bz = R_iq_s^-1 ik_bz - ! = R_iq_s^-1 R_ik_s ik_ibz - ! - ip_bz = elemental_scattering(iq_s,ik_bz) - ! - ! 1=DOWN - !======== - ! - do ivp=BS_bands(1),BS_bands(2) - ! - i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) - if (i_Hp==0) cycle - ! - if (.not.l_const_elph) then - ik_db=K_io_map(ik_bz) - if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) - !ik_db=K_io_map(ik_minus_iq_bz) - !elph_gkkp=GKKP%dVc(il,ivp,iv,ik_db,1)/sqrt(2._SP*ph_E) - endif - ! - !ik_db=K_io_map(ik_bz) - !write(*,*) elph_gkkp,conjg(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) - ! - !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) - ! - if (l_abs_exc) then - Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) - else - if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat(i_Hp,i_beta) - endif - ! - enddo - ! - ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz - ! - ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) - ! - ! 2=UP - !====== - ! - do icp=BS_bands(1),BS_bands(2) - ! - i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) - if (i_Hp==0) cycle - ! - if (.not.l_const_elph) then - ik_db=K_io_map(ik_plus_iq_bz) - if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,icp,ic,ik_db,1) /sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) - !ik_db=K_io_map(ik_bz) - !elph_gkkp=GKKP%dVc(il,ic,icp,ik_db,1)/sqrt(2._SP*ph_E) - endif - if (l_abs_exc) then - Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) - else - if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat(i_Hp,i_beta) - endif - ! - enddo + ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) + ! + ! Conduction scattering + ! ====================== + ! + do icp=BS_bands(1),BS_bands(2) + ! + i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) + ! + if (i_Hp==0) cycle + ! + ik_db=K_io_map(ik_plus_iq_bz) + elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) + ! + if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) + ! + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_alpha)*Xi_element ! enddo ! - ! Gkkp m.e. - !============= + ! Valence Scattering + ! ========================= + ! + ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz + ip_bz = elemental_scattering(iq_s,ik_minus_iq_bz) ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - ! - do i_H=1,BS_H_dim - ! - ! K = (ik_bz,iv,ic) - ! - ik_bz = BSS_eh_table(i_H,1) - iv = BSS_eh_table(i_H,2) - ic = BSS_eh_table(i_H,3) - ! - ! K_in = (ik_bz,iv,ic) - ! - ik_bz_in = BSS_eh_table_in(i_H,1) - iv_in = BSS_eh_table_in(i_H,2) - ic_in = BSS_eh_table_in(i_H,3) - ! - if (ik_bz /= ik_bz_in) call error(" Wrong k correspondence") - if (iv /= iv_in ) call error(" Wrong iv correspondence") - if (ic /= ic_in ) call error(" Wrong ic correspondence") - ! - ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate - ! - !aux_phase_1 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,1)), REAL(Xi(i_H,1)) ) ) - !aux_phase_2 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,2)), REAL(Xi(i_H,2)) ) ) - ! - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) - ! - enddo + do ivp=BS_bands(1),BS_bands(2) + ! + i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) + ! + if (i_Hp==0) cycle + ! + ik_db=K_io_map(ik_minus_iq_bz) + elph_gkkp= GKKP%dVc(il,ivp,iv,ik_db,1) /sqrt(2._SP*ph_E) + ! + if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) + ! + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_alpha)*Xi_element + ! enddo ! - enddo !Loop i_beta + ! + enddo + ! + enddo !Loop i_beta ! ! Compute the squared couplings ! forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) - !EXCPH_Gkkp_sq(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 end forall ! From c4d0deca830c2ad7b4b6e12e0b8c4a926efd1f30 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 28 Aug 2022 18:04:55 +0200 Subject: [PATCH 0413/1367] Version 5.1.0, Revision 21856, Hash 0da86df6f MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval_ber.F Bugs: - Additions: -Small change Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval_ber.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 07e619ae74..8c58e54269 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21855 -#define YAMBO_HASH "e74dfaa75" +#define YAMBO_REVISION 21856 +#define YAMBO_HASH "0da86df6f" diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index 1ed06496f2..a866e03503 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -40,7 +40,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) !use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map - use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,& + use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& & l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in ! @@ -68,8 +68,6 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! ->ivp [Calculate Xi(1)] ! ->icp [Calculate Xi(2)] ! ->i_alpha ->i_H [Calculate Gkkp] - Xi=cZERO - ! elph_gkkp=cONE ! t_rev= (iq_s>nsym/(i_time_rev+1)) @@ -91,6 +89,8 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (ph_E Date: Mon, 29 Aug 2022 11:23:30 +0200 Subject: [PATCH 0414/1367] Version 5.1.0, Revision 21857, Hash c4d0deca8 MODIFIED * include/driver/version.h modules/mod_BS_solvers.F Bugs: -Removed comment Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/modules/mod_BS_solvers.F | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8c58e54269..18b95a9457 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21856 -#define YAMBO_HASH "0da86df6f" +#define YAMBO_REVISION 21857 +#define YAMBO_HASH "c4d0deca8" diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 1e1a5246cd..9c80397c1b 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -321,7 +321,6 @@ subroutine BSS_alloc( ) BSS_eh_table = 0 BSS_eh_E = rZERO BSS_eh_f = rZERO - write(*,*) ' passo qui ',l_BS_abs,BS_dip_size,BS_H_dim if (l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism) then YAMBO_ALLOC(BSS_dipoles_opt,(BS_dip_size,BS_H_dim)) BSS_dipoles_opt = cZERO From f90bd7c60d6bbfdc1b95a4a3e25acecc3729dcaa Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 29 Aug 2022 12:09:38 +0200 Subject: [PATCH 0415/1367] Version 5.1.0, Revision 21858, Hash 3ba5a279f MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval_ber.F Bugs: -Fixed two memory leaks Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval_ber.F | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 18b95a9457..279877896e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21857 -#define YAMBO_HASH "c4d0deca8" +#define YAMBO_REVISION 21858 +#define YAMBO_HASH "3ba5a279f" diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index a866e03503..f642462f16 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -30,14 +30,12 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO,cONE - !use electrons, ONLY:levels use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev use R_lattice, ONLY:bz_samp,qindx_C use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control - !use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,& @@ -46,9 +44,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! #include ! - !type(levels) ::E type(bz_samp) ::k,q - !type(X_t) ::X integer, intent(in) :: iq_s,iq_bz,il!,iq integer, intent(inout) :: ID_gkkp ! @@ -61,7 +57,6 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) real(SP) :: ph_E complex(SP) :: elph_gkkp,Xi_element integer, external :: io_ELPH - !complex(SP) :: aux_phase_1,aux_phase_2 ! ! Loop scheme: ! i_l ->i_beta ->i_star [load gkkp] ->i_H @@ -89,7 +84,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (ph_E Date: Mon, 29 Aug 2022 14:43:15 +0200 Subject: [PATCH 0416/1367] Solved some inconsistencies for Ltilde --- src/interface/INIT_load.F | 2 +- src/io_serial/variables_BS.F | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 5a88b3bcbf..9d493975ef 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -301,7 +301,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! BSE/BSK ! call it(defs,'BSEmod', '[BSE] resonant/retarded/coupling',BSE_mode,case="a") - call it(defs,'Lkind', '[BSE,X] bar(default)/full',BSE_L_kind,verb_level=V_resp) + call it(defs,'Lkind', '[BSE,X] bar(default)/full/tilde',BSE_L_kind,verb_level=V_resp) call it(defs,'BSEBands','[BSK] Bands range',BS_bands) call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]',BS_n_g_W,G_unit) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) diff --git a/src/io_serial/variables_BS.F b/src/io_serial/variables_BS.F index 8bb16d52ae..ff621e6436 100644 --- a/src/io_serial/variables_BS.F +++ b/src/io_serial/variables_BS.F @@ -28,10 +28,10 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) use drivers, ONLY:l_td_hf use X_m, ONLY:X_t use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts,cut_geometry - use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,L_kind,& + use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,BSE_L_kind,& & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& -& BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& +& BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,BSqpts,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:ver_is_gt_or_eq,def_variable_elemental,io_variable_elemental @@ -107,7 +107,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! if(ver_is_gt_or_eq(ID,revision=21261)) then call def_variable_elemental(ID,"L_kind",1,0,0) - call io_variable_elemental(ID,VAR='[K] L kind',CH0=L_kind,CHECK=.true.,DESCRIPTOR=desc) + call io_variable_elemental(ID,VAR='[K] L kind',CH0=BSE_L_kind,CHECK=.true.,DESCRIPTOR=desc) endif ! ! Interaction From 9d14bdfeb5f221d11d4eeeadb10f2de3a6b73cc1 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 29 Aug 2022 14:59:44 +0200 Subject: [PATCH 0417/1367] Version 5.1.0, Revision 21859, Hash f90bd7c60 MODIFIED * include/driver/version.h exc-ph/EXC_dipole.F Bugs: - Additions: -Dipoles can be recalculated on the fly Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_dipole.F | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 279877896e..59dbf8227d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21858 -#define YAMBO_HASH "3ba5a279f" +#define YAMBO_REVISION 21859 +#define YAMBO_HASH "f90bd7c60" diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index cc636ba479..902bcfa635 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -34,8 +34,8 @@ subroutine EXC_dipole(Xk,E,q,X) use EXCPH, ONLY:EXC_q0,BS_R_left,BS_R_right,BS_R,EXCPH_states,BS_E_in use vec_operate, ONLY:v_norm use X_m, ONLY:X_t - use BS, ONLY:BS_bands,BS_T_grp,BSE_prop,BS_dip_size - use BS_solvers, ONLY:BS_H_dim,BSS_Vnl_included,BSS_alloc + use BS, ONLY:BS_bands,BS_T_grp,BSE_prop,BS_dip_size,BS_nT_grps + use BS_solvers, ONLY:BS_H_dim,BSS_Vnl_included,BSS_alloc,BSS_free use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_WF_b_and_k ! @@ -53,11 +53,12 @@ subroutine EXC_dipole(Xk,E,q,X) ! if(any(abs(EXC_q0(:))>epsilon(1.))) then ! - EXC_q0=EXC_q0/v_norm(EXC_q0) - call msg('rs','Excitonic dipole along the direction : ',EXC_q0) ! call DIPOLES_reset(DIPs) ! + DIPs%q0=EXC_q0/v_norm(EXC_q0) + call msg('rs','Excitonic dipole along the direction : ', DIPs%q0) + ! DIPs%ib =BS_bands(1:2) DIPs%ib_lim(1) =E%nbf(1) DIPs%ib_lim(2) =E%nbf(1)+1 @@ -91,6 +92,11 @@ subroutine EXC_dipole(Xk,E,q,X) ! Fill BSS_dipole_opt to be done call K_dipoles(1,E,Xk,DIPs) ! + ! I deallocate BSS_eh_table to force the code + ! to reconstruct all elements + ! + call BSS_free() + ! call K_components_folded_in_serial_arrays(1) ! ! Recalculate the residuals From c56660caf05490e4ce7509ce63aca3b51a824146 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Mon, 29 Aug 2022 15:27:51 +0200 Subject: [PATCH 0418/1367] Added stdout for coupling convention --- src/exc-ph/EXCPH_gkkp_driver.F | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 1a4fa818de..33cdf818d1 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -102,6 +102,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call error("Unknow exciton-phonon coupling type") end select ! + call msg('rs','Use coupling convention from',trim(EXCPH_kind_name)) + ! elph_branches_save =elph_branches call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. From cf74897d091c921b27f5f87d3a6b1f8e324370fc Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 31 Aug 2022 12:34:50 +0200 Subject: [PATCH 0419/1367] Version 5.1.0, Revision 21865, Hash b604736d0 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval_ber.F Additions: -Work in progress Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval_ber.F | 23 +++++++++++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 59dbf8227d..2d1cda8b0e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21859 -#define YAMBO_HASH "f90bd7c60" +#define YAMBO_REVISION 21865 +#define YAMBO_HASH "b604736d0" diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index f642462f16..5871039f4f 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -106,7 +106,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = R_iq_s^-1 ik_bz ! = R_iq_s^-1 R_ik_s ik_ibz ! - ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) +! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! ! Conduction scattering ! ====================== @@ -117,14 +117,18 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (i_Hp==0) cycle ! - ik_db=K_io_map(ik_plus_iq_bz) +! ik_db=K_io_map(ik_plus_iq_bz) + ik_db=K_io_map(ik_minus_iq_bz) elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) ! - if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) +! if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) +! if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_alpha)) + if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_alpha) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) - EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_alpha)*Xi_element +! EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_alpha)*Xi_element + EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_beta)*Xi_element enddo ! enddo @@ -144,11 +148,14 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ik_db=K_io_map(ik_minus_iq_bz) elph_gkkp= GKKP%dVc(il,ivp,iv,ik_db,1) /sqrt(2._SP*ph_E) ! - if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) +! if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) +! if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_alpha)) + if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_alpha) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_alpha)*Xi_element +! EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_alpha)*Xi_element + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_beta)*Xi_element enddo ! enddo From 9d3a1ac02836b7318a5dbbeae307e3cbaebd54e2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Sep 2022 10:07:43 +0200 Subject: [PATCH 0420/1367] Version 5.1.0, Revision 21689, Hash 45030f8e1 MODIFIED * include/driver/version.h a2y/a2y.F a2y/a2y_gkkp.F allocations/ELPH_alloc.F Changes: - [a2y] working on a2y interface for ndb.gkkp_expanded starting from gstore with both q and k in the full BZ Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y.F | 14 +++++++++----- interfaces/a2y/a2y_gkkp.F | 32 +++++++++++++++++++++++--------- src/allocations/ELPH_alloc.F | 2 +- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ece48fc18f..0a20ad8e81 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21683 -#define YAMBO_HASH "b1ab1a7b7" +#define YAMBO_REVISION 21689 +#define YAMBO_HASH "45030f8e1" diff --git a/interfaces/a2y/a2y.F b/interfaces/a2y/a2y.F index d483d07fcd..f7ba32f0f2 100644 --- a/interfaces/a2y/a2y.F +++ b/interfaces/a2y/a2y.F @@ -35,7 +35,7 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use electrons, ONLY: levels,E_reset,n_spinor,n_sp_pol use D_lattice, ONLY: n_atoms_species_max use pseudo, ONLY: PP_free,pp_n_l_times_proj_max - use R_lattice, ONLY: bz_samp,bz_samp_reset,nkibz + use R_lattice, ONLY: bz_samp,bz_samp_reset,nkibz,nqibz,nqbz use wave_func, ONLY: wf_ncx,io_WF,wf_nb_io_groups,wf_nb_io,wf_igk,wf_nc_k use IO_int, ONLY: io_control,IO_and_Messaging_switch use IO_m, ONLY: OP_WR,WR,WR_CL,OP_WR_CL,NONE,OP_APP_CL,serial_number @@ -246,19 +246,23 @@ integer function a2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! call msg('s',' == Writing DB3 (gkkp) ...') ! - call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID) - io_err=io_ELPH(ID,'gkkp') - ! do iq=1,elph_nQ ! ! Read from the etsf-nc file ! call a2y_gkkp(iq,i_sp_pol,ncid_gkkp,grpid_gkkp) ! + if(i_sp_pol==1.and.iq==1) then + call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID) + if(elph_nQ==nqibz) io_err=io_ELPH(ID,'gkkp') + if(elph_nQ==nqbz) io_err=io_ELPH(ID,'gkkp_expanded') + endif + ! ifrag=iq+elph_nQ*(i_sp_pol-1) if(ifrag Date: Thu, 8 Sep 2022 13:04:46 +0200 Subject: [PATCH 0421/1367] Version 5.1.0, Revision 21945, Hash 56d04a362 MODIFIED * include/driver/version.h modules/mod_EXCPH.F Bugs: - Additions: -Better error message Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/modules/mod_EXCPH.F | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8cfd4736e8..152eff1d18 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21682 -#define YAMBO_HASH "e50ac5c58" +#define YAMBO_REVISION 21945 +#define YAMBO_HASH "56d04a362" diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 181326b4d9..c152992662 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -250,6 +250,8 @@ subroutine build_Q_map(q) use zeros, ONLY:k_iku_zero use vec_operate, ONLY:v_is_zero use ELPH, ONLY:PH_qpt + use com, ONLY:msg + ! implicit none type(bz_samp) ::q ! @@ -267,7 +269,12 @@ subroutine build_Q_map(q) exit enddo enddo - if(any(DB_Q_map==0)) call error("Q-point not found in gkkp_expanded DBs") + if(any(DB_Q_map==0)) then + do iq=1,q%nbz + if(DB_Q_map(iq)==0) call msg('s',' Q point not found in gkkp_expanded DBs ',q%ptbz(iq,:)) + enddo + call error("Q-point not found in gkkp_expanded DBs") + endif ! do iq=1,q%nbz if(DB_Q_map(iq)/=iq) then From ad75f9a4d9900244c01b2608d186564a35628c0b Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 20 Sep 2022 12:42:12 +0200 Subject: [PATCH 0422/1367] Yambo can now compute em1s and BS using SAVEs with different band numbers. Added debug option to ypp_ph gkkp expansion --- src/io/io_header.F | 2 +- src/io/variables_X.F | 2 +- src/pol_function/X_dielectric_matrix.F | 4 +++- src/pol_function/X_pre_setup.F | 2 +- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 29 +++++++++++++++++++++++ 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/io/io_header.F b/src/io/io_header.F index 3cfa44593f..1b666b035d 100644 --- a/src/io/io_header.F +++ b/src/io/io_header.F @@ -144,7 +144,7 @@ integer function io_header(ID,QPTS,R_LATT,WF,IMPOSE_SN,TEMP,KPTS,D_LATT,XC_KIND, goto 1 endif if (WARN_SERIAL.and.io_com(ID)/=NONE) then - call warning('Wrong serial number for '//trim(io_file(ID))) + call warning('Different serial number for '//trim(io_file(ID))) endif endif ! diff --git a/src/io/variables_X.F b/src/io/variables_X.F index 81c43e9836..0ee16f63a5 100644 --- a/src/io/variables_X.F +++ b/src/io/variables_X.F @@ -111,7 +111,7 @@ integer function variables_X(ID,local_desc,X,EM1S_NOSOC) endif ! call io_variable_elemental(ID,& -& VAR="Field direction",R1=X%q0,CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=local_desc) +& VAR="Field direction",R1=X%q0,WARN=.true.,OP=(/"==","==","=="/),DESCRIPTOR=local_desc) ! if (ver_is_gt_or_eq(ID,(/3,0,1/))) then call io_variable_elemental(ID,& diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 0b46fa8bca..213c074f42 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -80,7 +80,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! ! Some check ! - if(X%ib(2)>Xen%nb) call error("Too many bands required in X. Run DFT with more bands!") + if(X%ib(2)>Xen%nb) call warning("More bands required in X than available in the current SAVE.") ! l_X_terminator = X_terminator_Kind/='none' if (l_X_terminator.and.trim(X_terminator_Kind)/='BG') then @@ -184,6 +184,8 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) call FREQUENCIES_reset(Xw,"all") if (X%iq(1)==X%iq(2)) X_dielectric_matrix=X%iq(1) return + else + if(X%ib(2)>Xen%nb) call error("Too many bands required in X. Run DFT with more bands!") endif ! endif diff --git a/src/pol_function/X_pre_setup.F b/src/pol_function/X_pre_setup.F index 9763b030e6..41503103fb 100644 --- a/src/pol_function/X_pre_setup.F +++ b/src/pol_function/X_pre_setup.F @@ -62,7 +62,7 @@ subroutine X_pre_setup(Xen,Xk,X) ! Other checks ! if (X%ib(1)<0.or.X%ib(1)>maxval(Xen%nbm).or.X%ib(2)Xen%nb.or.X%ib(2)Xen%nb.or.X%ib(2) Date: Wed, 21 Sep 2022 23:49:57 +0200 Subject: [PATCH 0423/1367] Version 5.1.0, Revision 21948, Hash 67bb7456e MODIFIED * include/driver/version.h interface/INIT_q_points.F Changes: - [yambo_ph] qpoints can be read from gkkp_expanded when initializing Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_q_points.F | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 152eff1d18..785308c3bb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21945 -#define YAMBO_HASH "56d04a362" +#define YAMBO_REVISION 21948 +#define YAMBO_HASH "67bb7456e" diff --git a/src/interface/INIT_q_points.F b/src/interface/INIT_q_points.F index 4778762681..83c495028f 100644 --- a/src/interface/INIT_q_points.F +++ b/src/interface/INIT_q_points.F @@ -33,6 +33,7 @@ subroutine INIT_q_points( ) use pars, ONLY:SP,schlen,DP use it_tools, ONLY:check_verbosity use R_lattice, ONLY:nqibz,q_pt,bz_samp,q_source + use D_lattice, ONLY:nsym #if defined _ELPH use ELPH, ONLY:PH_qpt,elph_use_q_grid,elph_nQ,elph_grids_are_expanded #endif @@ -67,6 +68,11 @@ subroutine INIT_q_points( ) nqibz=elph_nQ YAMBO_ALLOC(q_pt,(nqibz,3)) q_pt(:,:)=-real(PH_qpt(:,:),SP) + else if(allocated(PH_qpt).and.elph_use_q_grid.and.elph_grids_are_expanded.and.nsym==1) then + q_source="is read from the El-Ph databases expanded" + nqibz=elph_nQ + YAMBO_ALLOC(q_pt,(nqibz,3)) + q_pt(:,:)=-real(PH_qpt(:,:),SP) endif #endif ! @@ -124,6 +130,6 @@ integer function get_e_p_q_point(i_q,q_in) endif call io_disconnect(ID) ! - end function + end function get_e_p_q_point ! end subroutine From b30a41a81eff13dc251bc47426d6bd2ddbce905c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 21 Sep 2022 23:53:24 +0200 Subject: [PATCH 0424/1367] Version 5.1.0, Revision 21694, Hash 7b2236ec1 MODIFIED * include/driver/version.h a2y/a2y_gkkp.F modules/mod_R_lattice.F Changes: - [a2y] Setting PH_qpt to -abi_qpt - [a2y] Few preliminary steps to prepare reading of abi symmetries Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- interfaces/a2y/a2y_gkkp.F | 87 +++++++++++++++++++++++++++++-------- src/modules/mod_R_lattice.F | 10 +++-- 3 files changed, 76 insertions(+), 25 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e701458722..0ef88cf250 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21685 -#define YAMBO_HASH "5e9e19489" +#define YAMBO_REVISION 21694 +#define YAMBO_HASH "7b2236ec1" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 02585362b9..8bb1836105 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -29,7 +29,7 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) use stderr, ONLY:intc use com, ONLY:msg use interfaces, ONLY:ELPH_alloc - use R_lattice, ONLY:nkibz,nkbz,nqibz,nqbz,k_pt + use R_lattice, ONLY:nkibz,nkbz,nqibz,nqbz,k_pt,k_sstar,q_pt,q_sstar use D_lattice, ONLY:n_atoms use ELPH, ONLY:ph_modes,elph_nb,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & elph_nQ,elph_nk_bz,elph_grids_are_expanded,elph_use_q_grid,& @@ -98,7 +98,11 @@ subroutine import_kpoints_group() implicit none integer :: ik real(DP), allocatable :: gstore_kbz(:,:) + real(DP), allocatable :: abi_kibz(:,:) + integer, allocatable :: abi_kbz2ibz(:,:) ! + ! k-points of gstore, for now always in the BZ + !============================================== allocate(gstore_kbz(3, elph_nk_bz)) ! varid = netcdf_inquire_varid(ncid, "gstore_kbz") @@ -111,20 +115,36 @@ subroutine import_kpoints_group() ! deallocate(gstore_kbz) ! - allocate(gstore_kbz(3, nkibz)) + ! k-points in the IBZ + !===================== + allocate(abi_kibz(3, nkibz)) ! varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_kpoints") - netcdf_error = nf90_get_var(ncid, varid, gstore_kbz) + netcdf_error = nf90_get_var(ncid, varid, abi_kibz) call netcdf_check(ncid,netcdf_error,varid) ! allocate(k_pt(nkibz,3) ) do ik = 1,nkibz - k_pt(ik,:)=matmul(transpose(b),gstore_kbz(:,ik))*alat(:)/2.0_SP/pi + k_pt(ik,:)=matmul(transpose(b),abi_kibz(:,ik))*alat(:)/2.0_SP/pi enddo ! - deallocate(gstore_kbz) + deallocate(abi_kibz) + ! + ! symmetries to move from the BZ to IBZ + !======================================= + allocate(abi_kbz2ibz(6, nkbz)) ! ! Here I will have to load the k-points symmetries, etc ... + varid = netcdf_inquire_varid(ncid, "gstore_kbz2ibz") + netcdf_error = nf90_get_var(ncid, varid, abi_kbz2ibz) + call netcdf_check(ncid,netcdf_error,varid) + ! + allocate(k_sstar(nkbz,2) ) + do ik = 1,nkbz + k_sstar(ik,:)=abi_kbz2ibz(1:2,ik) + enddo + ! + deallocate(abi_kbz2ibz) ! end subroutine import_kpoints_group ! @@ -137,6 +157,8 @@ subroutine import_qpoints_group() implicit none integer :: iq real(DP), allocatable :: gstore_q(:,:) + real(DP), allocatable :: abi_qibz(:,:) + integer, allocatable :: abi_qbz2ibz(:,:) ! allocate(gstore_q(3, elph_nQ)) ! @@ -145,12 +167,45 @@ subroutine import_qpoints_group() netcdf_error = nf90_get_var(ncid, varid, gstore_q) call netcdf_check(ncid,netcdf_error,varid) ! + ! warning: here I et a -q + call warning(" setting PH_qpt=-qpt_abi") do iq = 1,elph_nQ - PH_qpt(iq,:)=matmul(transpose(b),gstore_q(:,iq))*alat(:)/2.0_SP/pi + PH_qpt(iq,:)=-matmul(transpose(b),gstore_q(:,iq))*alat(:)/2.0_SP/pi enddo ! deallocate(gstore_q) ! + ! q-points in the IBZ + !===================== + allocate(abi_qibz(3, nqibz)) + ! + varid = netcdf_inquire_varid(ncid, "reduced_coordinates_of_kpoints") + netcdf_error = nf90_get_var(ncid, varid, abi_qibz) + call netcdf_check(ncid,netcdf_error,varid) + ! + allocate(q_pt(nqibz,3) ) + do iq = 1,nqibz + q_pt(iq,:)=matmul(transpose(b),abi_qibz(:,iq))*alat(:)/2.0_SP/pi + enddo + ! + deallocate(abi_qibz) + ! + ! symmetries to move from the BZ to IBZ + !======================================= + allocate(abi_qbz2ibz(6, nqbz)) + ! + ! Here I will have to load the k-points symmetries, etc ... + varid = netcdf_inquire_varid(ncid, "gstore_qbz2ibz") + netcdf_error = nf90_get_var(ncid, varid, abi_qbz2ibz) + call netcdf_check(ncid,netcdf_error,varid) + ! + allocate(q_sstar(nqbz,2) ) + do iq = 1,nqbz + q_sstar(iq,:)=abi_qbz2ibz(1:2,iq) + enddo + ! + deallocate(abi_qbz2ibz) + ! end subroutine import_qpoints_group ! ! PH_frequencies @@ -160,7 +215,7 @@ subroutine import_ph_frequencies() use R_lattice, only : b use D_lattice, only : alat implicit none - integer :: iq,iqibz,qpt_map(elph_nQ) + integer :: iq,iqibz real(DP), allocatable :: phfreqs_ibz(:,:) ! allocate(phfreqs_ibz(ph_modes,nqibz)) @@ -169,23 +224,17 @@ subroutine import_ph_frequencies() netcdf_error = nf90_get_var(ncid, varid, phfreqs_ibz) call netcdf_check(ncid,netcdf_error,varid) ! - if (elph_nQ==nqibz) then - do iq = 1,elph_nQ - qpt_map(iq)=iq + if (elph_nQ==nqbz) then + do iq = 1,nqbz + iqibz=q_sstar(iq,1) + PH_freqs_sq(iq,:)=real(phfreqs_ibz(:,iqibz),SP)**2 enddo else - ! This is a temporary implementation - ! It needs to be fixed for the case elph_nQ==nqbz) - do iq = 1,elph_nQ - qpt_map(iq)=mod(iq-1,nqibz)+1 + do iqibz = 1,nqibz + PH_freqs_sq(iqibz,:)=real(phfreqs_ibz(:,iqibz),SP)**2 enddo endif ! - do iq = 1,elph_nQ - iqibz=qpt_map(iq) - PH_freqs_sq(iq,:)=real(phfreqs_ibz(:,iqibz),SP)**2 - enddo - ! deallocate(phfreqs_ibz) ! end subroutine import_ph_frequencies diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 7fb40e26c6..668082ae7f 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -78,10 +78,11 @@ module R_lattice integer :: nibz integer :: nbz integer, allocatable :: nstar(:) ! n° of points in the star - integer, allocatable :: star(:,:) ! ik,ikstar --> is is sends ik in ikstar - integer, allocatable :: sstar(:,:) ! ik_bz --> ik,is is sends ik in ikbz - integer, allocatable :: s_table(:,:) ! ik,is --> sym@k_bz revers of sstar(2) - integer, allocatable :: k_table(:,:) ! ik,is --> ik_bz revers of sstar(1) + ! Below "is" can be any symmetry operation, while is_used + integer, allocatable :: star(:,:) ! ik,ikstar --> is_used is_used sends ik in ikstar + integer, allocatable :: sstar(:,:) ! ik_bz --> ik,is_used is_used sends ik in ikbz + integer, allocatable :: s_table(:,:) ! ik,is --> is_used revers of sstar(2) + integer, allocatable :: k_table(:,:) ! ik,is --> ik_bz revers of sstar(1) real(SP), allocatable :: pt(:,:) real(SP), allocatable :: ptbz(:,:) real(SP), allocatable :: weights(:) @@ -110,6 +111,7 @@ module R_lattice ! Q/K sampling shadow tables ! real(SP),allocatable :: k_pt(:,:) + integer ,allocatable :: k_sstar(:,:) real(SP),allocatable :: q_pt(:,:) integer ,allocatable :: q_sstar(:,:) ! From ba105de2e0743602b0451abfbba86f2dd76da785 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 22 Sep 2022 00:13:14 +0200 Subject: [PATCH 0425/1367] Version 5.1.0, Revision 21962, Hash 71398c347 MODIFIED * include/driver/version.h interface/INIT_q_points.F Changes: - [yambo_ph] Removed -1 from initialization of q-points when reading ndb.gkkp Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_q_points.F | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0ef88cf250..fa380f1a8c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21694 -#define YAMBO_HASH "7b2236ec1" +#define YAMBO_REVISION 21962 +#define YAMBO_HASH "71398c347" diff --git a/src/interface/INIT_q_points.F b/src/interface/INIT_q_points.F index 83c495028f..334737a702 100644 --- a/src/interface/INIT_q_points.F +++ b/src/interface/INIT_q_points.F @@ -67,12 +67,14 @@ subroutine INIT_q_points( ) q_source="is read from the El-Ph databases" nqibz=elph_nQ YAMBO_ALLOC(q_pt,(nqibz,3)) + ! here I read from s.ph and I need to put a -1 q_pt(:,:)=-real(PH_qpt(:,:),SP) else if(allocated(PH_qpt).and.elph_use_q_grid.and.elph_grids_are_expanded.and.nsym==1) then q_source="is read from the El-Ph databases expanded" nqibz=elph_nQ YAMBO_ALLOC(q_pt,(nqibz,3)) - q_pt(:,:)=-real(PH_qpt(:,:),SP) + ! In the ndb.gkkp the -q was already imposed + q_pt(:,:)=real(PH_qpt(:,:),SP) endif #endif ! From c104a2c39d1a28e76990af6a377645f63ca632ff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 22 Sep 2022 14:23:52 +0200 Subject: [PATCH 0426/1367] Version 5.1.0, Revision 21695, Hash b30a41a81 MODIFIED * include/driver/version.h a2y/a2y_gkkp.F Changes: - [a2y] Coded transformation from k -> k+q to k-q -> k according to eq.5 of the notes of Fulvio Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0ef88cf250..652332bd09 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21694 -#define YAMBO_HASH "7b2236ec1" +#define YAMBO_REVISION 21695 +#define YAMBO_HASH "b30a41a81" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 8bb1836105..7f1abb1595 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -262,7 +262,7 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! ! Workspace ! - integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6),i_atom,xyz + integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6),i_atom,xyz,i_n,i_m real(DP), allocatable :: gstore_abinit(:,:,:,:,:,:),phdispl_cart_ibz(:,:,:,:,:) ! ! (natom3, glob_nk, nb, glob_nq, nb, cplex) @@ -282,7 +282,14 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! do ik=1,elph_nk_bz do i_modes=1,ph_modes - GKKP%dVc(i_modes,:,:,ik,1)=cmplx(gstore_abinit(1,:,:,i_modes,ik,1),gstore_abinit(2,:,:,i_modes,ik,1),kind=SP) + ! Invert the band indexes and do the complex conjugate + ! See eq.(5) of the notes of Fulvio + do i_n=1,elph_nb + do i_m=1,elph_nb + GKKP%dVc(i_modes,i_n,i_m,ik,1)=cmplx(gstore_abinit(1,i_m,i_n,i_modes,ik,1),& + & -gstore_abinit(2,i_m,i_n,i_modes,ik,1),kind=SP) + enddo + enddo enddo enddo ! From 1cd844f7513e3e4c19e551a903587557978b9224 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 22 Sep 2022 16:50:36 +0200 Subject: [PATCH 0427/1367] Version 5.1.0, Revision 21965, Hash 50606f9b7 MODIFIED * config/version/version.m4 include/driver/version.h exc-ph/EXCPH_X_phass.F interface/INIT_activate.F interface/INIT_load.F Additions: -Added q-resolved luminescence Changes: - Patch sent by: Claudio Attaccalite --- config/version/version.m4 | 6 ++-- include/driver/version.h | 4 +-- src/exc-ph/EXCPH_X_phass.F | 61 ++++++++++++++++++++++++++++++++++- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + 5 files changed, 67 insertions(+), 7 deletions(-) diff --git a/config/version/version.m4 b/config/version/version.m4 index c28f2c7ccd..cd0f0cf571 100644 --- a/config/version/version.m4 +++ b/config/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.21682 h.e50ac5c58, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.21945 h.56d04a362, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21682" -SHASH="e50ac5c58" +SREVISION="21945" +SHASH="56d04a362" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/include/driver/version.h b/include/driver/version.h index 652332bd09..54cb0c7a2f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21695 -#define YAMBO_HASH "b30a41a81" +#define YAMBO_REVISION 21965 +#define YAMBO_HASH "50606f9b7" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 43a160349d..58162da272 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -48,11 +48,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs_sq use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use com, ONLY:msg use R_lattice, ONLY:bz_samp,bz_samp_reset use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc + use parser_m, ONLY:parser + use com, ONLY:msg,of_open_close ! #include ! @@ -68,6 +69,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) integer :: iq_db integer :: elph_branches_save(2) type(PP_indexes)::px + logical :: l_prt_pl_q_res + complex(SP), allocatable :: PL_ii_q(:,:,:) + character(schlen) :: pl_file_name + integer, parameter :: n_output=7 + real(SP) :: output_data(n_output) + character(schlen) :: headers(n_output) ! real(SP), allocatable :: max_Sat_weight(:) integer, allocatable :: max_Sat_pos(:,:) @@ -94,6 +101,12 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) if(io_err/=0) call error('gkkp_expanded databases not found!') elph_branches=elph_branches_save ! + call parser('PLqres',l_prt_pl_q_res) + if(l_prt_pl_q_res) then + YAMBO_ALLOC(PL_ii_q,(wv%n_freqs,3,q%nbz)) + PL_ii_q=cZERO + endif + ! ! Renormalization factors ! call Renorm_alloc() @@ -181,6 +194,11 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) PL_ii(iw,1) =PL_ii(iw,1)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) PL_ii(iw,3) =PL_ii(iw,3)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) ! + if(l_prt_pl_q_res) then + PL_ii_q(iw,1,iq_bz) =PL_ii_q(iw,1,iq_bz)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii_q(iw,3,iq_bz) =PL_ii_q(iw,3,iq_bz)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + endif + ! enddo ! enddo @@ -252,10 +270,51 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) W=wv%p(iw) Epsilon_ii(iw,:)=1._SP-Epsilon_ii(iw,:) PL_ii(iw,:)=-W*PL_ii(iw,:) + if(l_prt_pl_q_res) then + PL_ii_q(iw,:,:)=-W*PL_ii_q(iw,:,:) + endif + ! enddo ! + if(l_prt_pl_q_res) then + ! Write on disk + do iq_bz=1,q%nbz + pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) + ! + call of_open_close(pl_file_name,'ot') + ! + call msg('o pl_bse','# EXCITON PHONON') + call msg('o pl_bse','# Exciton_states :',EXCPH_states,INDENT=0) + call msg('o pl_bse','# EXciton sum :',EXCPH_sum,INDENT=0) + call msg('o pl_bse','#') + headers(1)='E[eV]' + headers(2:n_output)=(/'Im(pl_ph )','Re(pl_ph )','Im(pl_nos)','Re(pl_nos)','Re(pl_sat)','Im(pl_sat)'/) + call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) + call msg('o pl_bse','#') + ! + ! Write output on file + ! + do iw=1,wv%n_freqs + ! + ! Luminescence + ! + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & +& aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),aimag(PL_ii(iw,3)),real(PL_ii(iw,3))/) + call msg('o pl_bse','',output_data,INDENT=-2,USE_TABS=.true.) + ! + enddo + ! + ! Close files + ! + call of_open_close(pl_file_name) + enddo + ! + endif + ! + ! call PP_redux_wait(Epsilon_ii) call PP_redux_wait(PL_ii) + if(l_prt_pl_q_res) call PP_redux_wait(PL_ii_q) ! ! Free ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 26919aebc4..46c095dd10 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) & -& call initactivate(1,'BoseTemp ElPhModes EXCTemp EXCLongDr DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') +& call initactivate(1,'BoseTemp ElPhModes EXCTemp EXCLongDr PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') ! #endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 8969ba82a2..d5f79244a1 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -674,6 +674,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') + call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point') call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) ! ! GPL_EXCLUDE_START From 1b41c45ffd64bea8820d23873e8a1d902eed6df0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 23 Sep 2022 11:06:41 +0200 Subject: [PATCH 0428/1367] Automatic commit: configure regenerated after merge --- configure | 22 +++++++++++----------- include/driver/version.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/configure b/configure index dea7854399..3aad34e228 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21648 h.30d1f2f7f. +# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21682 h.e50ac5c58. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.21648 h.30d1f2f7f' -PACKAGE_STRING='Yambo 5.1.0 r.21648 h.30d1f2f7f' +PACKAGE_VERSION='5.1.0 r.21682 h.e50ac5c58' +PACKAGE_STRING='Yambo 5.1.0 r.21682 h.e50ac5c58' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1566,7 +1566,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.21648 h.30d1f2f7f to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.21682 h.e50ac5c58 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1632,7 +1632,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.21648 h.30d1f2f7f:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.21682 h.e50ac5c58:";; esac cat <<\_ACEOF @@ -1843,7 +1843,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.21648 h.30d1f2f7f +Yambo configure 5.1.0 r.21682 h.e50ac5c58 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2472,7 +2472,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.21648 h.30d1f2f7f, which was +It was created by Yambo $as_me 5.1.0 r.21682 h.e50ac5c58, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3230,8 +3230,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21648" -SHASH="30d1f2f7f" +SREVISION="21682" +SHASH="e50ac5c58" @@ -16439,7 +16439,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.21648 h.30d1f2f7f, which was +This file was extended by Yambo $as_me 5.1.0 r.21682 h.e50ac5c58, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16503,7 +16503,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.1.0 r.21648 h.30d1f2f7f +Yambo config.status 5.1.0 r.21682 h.e50ac5c58 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/driver/version.h b/include/driver/version.h index 82d33ec2cc..4b0043221b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21686 -#define YAMBO_HASH "17a705e0e" +#define YAMBO_REVISION 21702 +#define YAMBO_HASH "6729de984" From d572a573781713e7b895526326e1837c1e39be5a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 23 Sep 2022 11:34:35 +0200 Subject: [PATCH 0429/1367] Automatic commit: configure regenerated after merge --- configure | 22 +++++++++++----------- include/driver/version.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/configure b/configure index dea7854399..3aad34e228 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21648 h.30d1f2f7f. +# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21682 h.e50ac5c58. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.21648 h.30d1f2f7f' -PACKAGE_STRING='Yambo 5.1.0 r.21648 h.30d1f2f7f' +PACKAGE_VERSION='5.1.0 r.21682 h.e50ac5c58' +PACKAGE_STRING='Yambo 5.1.0 r.21682 h.e50ac5c58' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1566,7 +1566,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.21648 h.30d1f2f7f to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.21682 h.e50ac5c58 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1632,7 +1632,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.21648 h.30d1f2f7f:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.21682 h.e50ac5c58:";; esac cat <<\_ACEOF @@ -1843,7 +1843,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.21648 h.30d1f2f7f +Yambo configure 5.1.0 r.21682 h.e50ac5c58 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2472,7 +2472,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.21648 h.30d1f2f7f, which was +It was created by Yambo $as_me 5.1.0 r.21682 h.e50ac5c58, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3230,8 +3230,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="21648" -SHASH="30d1f2f7f" +SREVISION="21682" +SHASH="e50ac5c58" @@ -16439,7 +16439,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.21648 h.30d1f2f7f, which was +This file was extended by Yambo $as_me 5.1.0 r.21682 h.e50ac5c58, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16503,7 +16503,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.1.0 r.21648 h.30d1f2f7f +Yambo config.status 5.1.0 r.21682 h.e50ac5c58 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/driver/version.h b/include/driver/version.h index 52f550b843..276fa49628 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21688 -#define YAMBO_HASH "05ea3f9e5" +#define YAMBO_REVISION 21755 +#define YAMBO_HASH "bbd8021ed" From 000bfdab835faf3dc2ce14ef013b1491f4afb8e4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 26 Sep 2022 16:31:45 +0200 Subject: [PATCH 0430/1367] Version 5.1.0, Revision 21966, Hash 1cd844f75 MODIFIED * include/driver/version.h modules/mod_pars.F Bugs: - Additions: -Number of file limits increase to 10K Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/modules/mod_pars.F | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 54cb0c7a2f..cff69313b4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21965 -#define YAMBO_HASH "50606f9b7" +#define YAMBO_REVISION 21966 +#define YAMBO_HASH "1cd844f75" diff --git a/src/modules/mod_pars.F b/src/modules/mod_pars.F index 25b244d372..f809752d67 100644 --- a/src/modules/mod_pars.F +++ b/src/modules/mod_pars.F @@ -58,10 +58,10 @@ module pars integer, parameter :: n_debugs_max=100 ! !...Output Files/Report File - integer,parameter :: max_n_ofs=1000 - integer,parameter :: max_open_ofs=1000 - integer,parameter :: repfile_index=1001 - integer,parameter :: logfile_index=1002 + integer,parameter :: max_n_ofs=10000 + integer,parameter :: max_open_ofs=10000 + integer,parameter :: repfile_index=10001 + integer,parameter :: logfile_index=10002 ! !...I/O integer, parameter :: max_io_units=40 From aebd8f417da0910bebe6ca53a8531a4aa1bc1018 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 27 Sep 2022 09:38:20 +0200 Subject: [PATCH 0431/1367] Version 5.1.0, Revision 21967, Hash 000bfdab8 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -Fixed bug Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index cff69313b4..6e774fc152 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21966 -#define YAMBO_HASH "1cd844f75" +#define YAMBO_REVISION 21967 +#define YAMBO_HASH "000bfdab8" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 58162da272..48c061a886 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -298,8 +298,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Luminescence ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii(iw,1)),real(PL_ii(iw,1)), & -& aimag(PL_ii(iw,2)),real(PL_ii(iw,2)),aimag(PL_ii(iw,3)),real(PL_ii(iw,3))/) + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii_q(iw,1,iq_bz)),real(PL_ii_q(iw,1,iq_bz)), & +& aimag(PL_ii_q(iw,2,iq_bz)),real(PL_ii_q(iw,2,iq_bz)),aimag(PL_ii_q(iw,3,iq_bz)),real(PL_ii_q(iw,3,iq_bz))/) call msg('o pl_bse','',output_data,INDENT=-2,USE_TABS=.true.) ! enddo From 8b4008bdb4e04d52e1c2515c9c396634f9bc8fe2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 27 Sep 2022 10:01:53 +0200 Subject: [PATCH 0432/1367] Version 5.1.0, Revision 21968, Hash aebd8f417 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -More corrections Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6e774fc152..fa06eb1d95 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21967 -#define YAMBO_HASH "000bfdab8" +#define YAMBO_REVISION 21968 +#define YAMBO_HASH "aebd8f417" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 48c061a886..9fe52ddba4 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -66,7 +66,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss real(SP) :: min_E,exc_E,PH_E integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: iq_db + integer :: iq_db,iq_ibz integer :: elph_branches_save(2) type(PP_indexes)::px logical :: l_prt_pl_q_res @@ -280,6 +280,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Write on disk do iq_bz=1,q%nbz pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) + iq_ibz = q%sstar(iq_bz,1) ! call of_open_close(pl_file_name,'ot') ! @@ -291,6 +292,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) headers(2:n_output)=(/'Im(pl_ph )','Re(pl_ph )','Im(pl_nos)','Re(pl_nos)','Re(pl_sat)','Im(pl_sat)'/) call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) call msg('o pl_bse','#') + call msg('o pl_bse','# iq_ibz = '//intc(iq_ibz)) ! ! Write output on file ! From bd52977b22b53668943da2fdd2cfcbe9daac3948 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 2 Oct 2022 22:30:13 +0200 Subject: [PATCH 0433/1367] Version 5.1.0, Revision 21969, Hash 8b4008bdb MODIFIED * include/driver/version.h a2y/a2y_gkkp.F Changes: - "phdispl_cart_ibz" renamed "pheigvec_cart_ibz" Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fa06eb1d95..be660ecc35 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21968 -#define YAMBO_HASH "aebd8f417" +#define YAMBO_REVISION 21969 +#define YAMBO_HASH "8b4008bdb" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 7f1abb1595..e0f14128be 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -263,7 +263,7 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! Workspace ! integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6),i_atom,xyz,i_n,i_m - real(DP), allocatable :: gstore_abinit(:,:,:,:,:,:),phdispl_cart_ibz(:,:,:,:,:) + real(DP), allocatable :: gstore_abinit(:,:,:,:,:,:),pheigvec_cart_ibz(:,:,:,:,:) ! ! (natom3, glob_nk, nb, glob_nq, nb, cplex) ! @@ -297,20 +297,20 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! ! Polarization vectors ! - allocate(phdispl_cart_ibz(2,3,n_atoms,ph_modes,1)) + allocate(pheigvec_cart_ibz(2,3,n_atoms,ph_modes,1)) ! ipos(1:5) =(/1,1,1,1,iq/) isize(1:5)=(/2,3,n_atoms,ph_modes,1/) ! - varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") - netcdf_error = nf90_get_var(ncid, varid, phdispl_cart_ibz, ipos(1:5), isize(1:5)) + varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") + netcdf_error = nf90_get_var(ncid, varid, pheigvec_cart_ibz, ipos(1:5), isize(1:5)) ! do xyz=1,3 do i_atom=1,n_atoms - PH_pol_vector(:,i_atom,xyz,iq)=cmplx(phdispl_cart_ibz(1,xyz,i_atom,:,1),phdispl_cart_ibz(2,xyz,i_atom,:,1),kind=SP) + PH_pol_vector(:,i_atom,xyz,iq)=cmplx(pheigvec_cart_ibz(1,xyz,i_atom,:,1),pheigvec_cart_ibz(2,xyz,i_atom,:,1),kind=SP) enddo enddo ! - deallocate(phdispl_cart_ibz) + deallocate(pheigvec_cart_ibz) ! end subroutine a2y_gkkp From 72de4f2ac2d7a87c283741b8119e188cc89071d9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 2 Oct 2022 22:31:44 +0200 Subject: [PATCH 0434/1367] Version 5.1.0, Revision 21696, Hash c104a2c39 MODIFIED * include/driver/version.h a2y/a2y_gkkp.F Changes: - [a2y] Patch imported from devel-excph-clean Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 652332bd09..3d631709c6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21695 -#define YAMBO_HASH "b30a41a81" +#define YAMBO_REVISION 21696 +#define YAMBO_HASH "c104a2c39" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 7f1abb1595..e0f14128be 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -263,7 +263,7 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! Workspace ! integer :: varid,netcdf_error,ik,i_modes,ipos(6),isize(6),i_atom,xyz,i_n,i_m - real(DP), allocatable :: gstore_abinit(:,:,:,:,:,:),phdispl_cart_ibz(:,:,:,:,:) + real(DP), allocatable :: gstore_abinit(:,:,:,:,:,:),pheigvec_cart_ibz(:,:,:,:,:) ! ! (natom3, glob_nk, nb, glob_nq, nb, cplex) ! @@ -297,20 +297,20 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! ! Polarization vectors ! - allocate(phdispl_cart_ibz(2,3,n_atoms,ph_modes,1)) + allocate(pheigvec_cart_ibz(2,3,n_atoms,ph_modes,1)) ! ipos(1:5) =(/1,1,1,1,iq/) isize(1:5)=(/2,3,n_atoms,ph_modes,1/) ! - varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") - netcdf_error = nf90_get_var(ncid, varid, phdispl_cart_ibz, ipos(1:5), isize(1:5)) + varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") + netcdf_error = nf90_get_var(ncid, varid, pheigvec_cart_ibz, ipos(1:5), isize(1:5)) ! do xyz=1,3 do i_atom=1,n_atoms - PH_pol_vector(:,i_atom,xyz,iq)=cmplx(phdispl_cart_ibz(1,xyz,i_atom,:,1),phdispl_cart_ibz(2,xyz,i_atom,:,1),kind=SP) + PH_pol_vector(:,i_atom,xyz,iq)=cmplx(pheigvec_cart_ibz(1,xyz,i_atom,:,1),pheigvec_cart_ibz(2,xyz,i_atom,:,1),kind=SP) enddo enddo ! - deallocate(phdispl_cart_ibz) + deallocate(pheigvec_cart_ibz) ! end subroutine a2y_gkkp From 2c820121bb415925127caf2bfcb9c69641e4c825 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 4 Oct 2022 14:11:42 +0200 Subject: [PATCH 0435/1367] Version 5.1.0, Revision 21970, Hash bd52977b2 MODIFIED * include/driver/version.h common/.objects NEW * common/OCCUPATIONS_Merge.F common/OCCUPATIONS_Quasi_Fermi.F common/Vertical_Occupation.F Additions: -New files for quasi-fermi distribution Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/common/.objects | 2 +- src/common/OCCUPATIONS_Merge.F | 84 ++++++++++++++++++++ src/common/OCCUPATIONS_Quasi_Fermi.F | 112 +++++++++++++++++++++++++++ src/common/Vertical_Occupation.F | 73 +++++++++++++++++ 5 files changed, 272 insertions(+), 3 deletions(-) create mode 100644 src/common/OCCUPATIONS_Merge.F create mode 100644 src/common/OCCUPATIONS_Quasi_Fermi.F create mode 100644 src/common/Vertical_Occupation.F diff --git a/include/driver/version.h b/include/driver/version.h index be660ecc35..6edb034b98 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21969 -#define YAMBO_HASH "8b4008bdb" +#define YAMBO_REVISION 21970 +#define YAMBO_HASH "bd52977b2" diff --git a/src/common/.objects b/src/common/.objects index 9bc9fe8977..adda8b08e7 100644 --- a/src/common/.objects +++ b/src/common/.objects @@ -9,6 +9,6 @@ objs = eval_G_minus_G.o G_rot_grid.o G_index.o G_index_energy_factor.o eval_Grad Kramers_Kronig.o Convolve.o RIntegrate.o Laplace_transform.o \ CIntegrate.o QPartilize.o Lorentzian_FT.o \ OCCUPATIONS_Fermi.o OCCUPATIONS_Extend.o OCCUPATIONS_Gaps.o OCCUPATIONS_Extend_Double_Grid.o \ - LEVELS_respect_degenerations.o \ + LEVELS_respect_degenerations.o OCCUPATIONS_Merge.o OCCUPATIONS_Quasi_Fermi.o Vertical_Occupation.o \ crystal_lattice.o QP_state_print.o QP_state_group.o \ spline_fit.o OBS_rotate.o $(RT_objects) $(DEV_objects) diff --git a/src/common/OCCUPATIONS_Merge.F b/src/common/OCCUPATIONS_Merge.F new file mode 100644 index 0000000000..0faddefe70 --- /dev/null +++ b/src/common/OCCUPATIONS_Merge.F @@ -0,0 +1,84 @@ +! +! Copyright (C) 2000-2017 Claudio Attaccalite +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) + ! + use pars, ONLY:SP,DP + use electrons, ONLY:levels,default_nel + use com, ONLY:msg + use R_lattice, ONLY:bz_samp + ! + implicit none + ! + type(levels) :: E,E_minus,E_plus + type(bz_samp) :: K + integer :: mode + ! + ! Work Space + ! + integer :: nval + ! + nval=nint(default_nel/2._SP) !nel/2._SP ! number of valence bands + ! + E%nbm=E_plus%nbm ! from negative charged distribution + E%nbf=E_minus%nbf ! from positive charged distribution + ! + ! I do not change E_fermi so the top valence of the un-excited system + ! is set to zero + ! + if(.not.associated(E%f)) return + ! + E%f(:nval,:,:) =E_minus%f(:nval,:,:) + E%f(nval+1:,:,:)=E_plus%f(nval+1:,:,:) + ! + ! Check number of electorns + ! + call msg("sr","Number of electrons in Quasi-Fermi: ",N_electrons(E,k)) + ! + contains + ! + real(SP) function N_electrons(E_in,K_in) + ! + use electrons, ONLY:n_sp_pol,spin_occ + ! + implicit none + ! + type(levels) :: E_in + type(bz_samp) :: K_in + ! + ! Work Space + ! + integer :: ib,ik,is + ! + N_electrons=0._SP + ! + do ib=1,E_in%nb + do ik=1,E_in%nk + do is=1,n_sp_pol + N_electrons=N_electrons+E_in%f(ib,ik,is)*K_in%weights(ik) + enddo + enddo + enddo + ! + end function N_electrons + ! +end subroutine diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F new file mode 100644 index 0000000000..969532fd9f --- /dev/null +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -0,0 +1,112 @@ +! +! Copyright (C) 2000-2017 Claudio Attaccalite +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) + ! + ! Mode = 0 + ! Update the Fermi energy + ! Output : E%E_fermi + ! + ! Mode = 1 -> Mode 0 + + ! Define E%f and reports variations in Ef/nbf/nbm + ! Output : E%nbf,E%nbm + ! E%E are shifted + ! + ! Mode > 1 -> Mode 1 + + ! Full report of system electronic character + ! + use pars, ONLY:SP,DP + use units, ONLY:HA2EV + use electrons, ONLY:levels,nel_cond,nel,E_duplicate,E_reset + use R_lattice, ONLY:bz_samp + use IO_m, ONLY:IO_and_Messaging_switch + use com, ONLY:error,msg + use parser_m, ONLY:parser + use lum_m, ONLY:k_vertical_exc + ! + implicit none + ! + type(levels) ::E + type(bz_samp)::K + integer ::mode + ! + ! Work Space + ! + type(levels) :: E_plus,E_minus + real(SP) :: nel_save + integer :: nbf_save,nbm_save + integer :: nval + logical :: l_gamma_exc + ! + call OCCUPATIONS_Fermi(E,K,mode) + ! + if(nel_cond==0._SP) return + ! + if(k_vertical_exc/=0) then + call Vertical_Occupation(E,K,mode,k_vertical_exc) + return + endif + ! + nel_save=nel + ! + call E_reset(E_plus) + call E_reset(E_minus) + call E_duplicate(E,E_plus) + call E_duplicate(E,E_minus) + ! + if(E%nbf/=E%nbm) call error("Quasi-Fermi distribution only for insulators/semiconductors") + ! + nval=E%nbf + nel =nel+nel_cond + ! + call IO_and_Messaging_switch("-report -log -io_in -io_out") + call OCCUPATIONS_Fermi(E_plus,K,mode) + ! + nbm_save=E_plus%nbm + ! + nel =nel_save + nel =nel-nel_cond + ! + call OCCUPATIONS_Fermi(E_minus,K,mode) + call IO_and_Messaging_switch("+report +log +io_in +io_out") + ! + nbf_save=E_minus%nbf + ! + call REPORT_all_Occupations(E_minus,k,'E_minus') + call REPORT_all_Occupations(E_plus,k,'E_plus') + ! + call OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus + ! + nel =nel_save + E%nbf=nbf_save + E%nbm=nbm_save + ! + call msg('rsn','Number of metalic bands : ',E%nbm) + call msg('rsn','Number of filled bands : ',E%nbf) + call msg('rsn','Number of valence bands : ',nval) + ! + call REPORT_all_Occupations(E,k,'E') + ! + call E_reset(E_plus) + call E_reset(E_minus) + ! +end subroutine diff --git a/src/common/Vertical_Occupation.F b/src/common/Vertical_Occupation.F new file mode 100644 index 0000000000..020db7a66e --- /dev/null +++ b/src/common/Vertical_Occupation.F @@ -0,0 +1,73 @@ +! +! Copyright (C) 2000-2017 Claudio Attaccalite +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine Vertical_Occupation(E,K,mode,ik_exc) + ! + use pars, ONLY:SP,DP + use units, ONLY:HA2EV + use electrons, ONLY:levels,nel_cond,nel,E_duplicate,E_reset + use R_lattice, ONLY:bz_samp + use IO_m, ONLY:IO_and_Messaging_switch + use com, ONLY:error,msg + ! + implicit none + ! + type(levels) ::E + type(bz_samp)::K + integer ::mode + integer, intent(in) :: ik_exc + ! + ! Work Space + ! + real(SP) :: E_range=0.026/HA2EV !eV = 300 Kelvin + real(SP) :: n_remove,n_add + integer :: n_bnd_hole,n_bnd_elect + integer :: ib + ! + n_bnd_hole =0 + n_bnd_elect=0 + ! + do ib=1,E%nbf + if(abs(E%E(ib,ik_exc,1)-E%E(E%nbf,ik_exc,1)) Date: Tue, 4 Oct 2022 14:33:24 +0200 Subject: [PATCH 0436/1367] Version 5.1.0, Revision 21971, Hash 2c820121b MODIFIED * include/driver/version.h common/.objects common/OCCUPATIONS_Merge.F common/OCCUPATIONS_Quasi_Fermi.F modules/mod_electrons.F DELETED * common/Vertical_Occupation.F Bugs: - Additions: -Added Quasi-Fermi distribution Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/common/.objects | 2 +- src/common/OCCUPATIONS_Merge.F | 2 +- src/common/OCCUPATIONS_Quasi_Fermi.F | 27 +++++----- src/common/Vertical_Occupation.F | 73 ---------------------------- src/modules/mod_electrons.F | 1 + 6 files changed, 16 insertions(+), 93 deletions(-) delete mode 100644 src/common/Vertical_Occupation.F diff --git a/include/driver/version.h b/include/driver/version.h index 6edb034b98..21ef14f6ad 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21970 -#define YAMBO_HASH "bd52977b2" +#define YAMBO_REVISION 21971 +#define YAMBO_HASH "2c820121b" diff --git a/src/common/.objects b/src/common/.objects index adda8b08e7..c1b82afc34 100644 --- a/src/common/.objects +++ b/src/common/.objects @@ -9,6 +9,6 @@ objs = eval_G_minus_G.o G_rot_grid.o G_index.o G_index_energy_factor.o eval_Grad Kramers_Kronig.o Convolve.o RIntegrate.o Laplace_transform.o \ CIntegrate.o QPartilize.o Lorentzian_FT.o \ OCCUPATIONS_Fermi.o OCCUPATIONS_Extend.o OCCUPATIONS_Gaps.o OCCUPATIONS_Extend_Double_Grid.o \ - LEVELS_respect_degenerations.o OCCUPATIONS_Merge.o OCCUPATIONS_Quasi_Fermi.o Vertical_Occupation.o \ + LEVELS_respect_degenerations.o OCCUPATIONS_Merge.o OCCUPATIONS_Quasi_Fermi.o \ crystal_lattice.o QP_state_print.o QP_state_group.o \ spline_fit.o OBS_rotate.o $(RT_objects) $(DEV_objects) diff --git a/src/common/OCCUPATIONS_Merge.F b/src/common/OCCUPATIONS_Merge.F index 0faddefe70..96460f368f 100644 --- a/src/common/OCCUPATIONS_Merge.F +++ b/src/common/OCCUPATIONS_Merge.F @@ -45,7 +45,7 @@ subroutine OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) ! I do not change E_fermi so the top valence of the un-excited system ! is set to zero ! - if(.not.associated(E%f)) return + if(.not.allocated(E%f)) return ! E%f(:nval,:,:) =E_minus%f(:nval,:,:) E%f(nval+1:,:,:)=E_plus%f(nval+1:,:,:) diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 969532fd9f..1bcf73be30 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -36,12 +36,11 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) ! use pars, ONLY:SP,DP use units, ONLY:HA2EV - use electrons, ONLY:levels,nel_cond,nel,E_duplicate,E_reset + use electrons, ONLY:levels,nel_cond,nel,E_duplicate,E_reset,n_sp_pol use R_lattice, ONLY:bz_samp - use IO_m, ONLY:IO_and_Messaging_switch - use com, ONLY:error,msg + use IO_int, ONLY:IO_and_Messaging_switch + use com, ONLY:msg use parser_m, ONLY:parser - use lum_m, ONLY:k_vertical_exc ! implicit none ! @@ -55,17 +54,11 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) real(SP) :: nel_save integer :: nbf_save,nbm_save integer :: nval - logical :: l_gamma_exc ! call OCCUPATIONS_Fermi(E,K,mode) ! if(nel_cond==0._SP) return ! - if(k_vertical_exc/=0) then - call Vertical_Occupation(E,K,mode,k_vertical_exc) - return - endif - ! nel_save=nel ! call E_reset(E_plus) @@ -73,15 +66,17 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) call E_duplicate(E,E_plus) call E_duplicate(E,E_minus) ! - if(E%nbf/=E%nbm) call error("Quasi-Fermi distribution only for insulators/semiconductors") + if(any(E%nbf/=E%nbm)) call error("Quasi-Fermi distribution only for insulators/semiconductors") + ! + if(n_sp_pol/=1) call error("Quasi-Fermi distribution not implemented for spin-polarized systems") ! - nval=E%nbf + nval=E%nbf(1) nel =nel+nel_cond ! call IO_and_Messaging_switch("-report -log -io_in -io_out") call OCCUPATIONS_Fermi(E_plus,K,mode) ! - nbm_save=E_plus%nbm + nbm_save=E_plus%nbm(1) ! nel =nel_save nel =nel-nel_cond @@ -89,7 +84,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) call OCCUPATIONS_Fermi(E_minus,K,mode) call IO_and_Messaging_switch("+report +log +io_in +io_out") ! - nbf_save=E_minus%nbf + nbf_save=E_minus%nbf(1) ! call REPORT_all_Occupations(E_minus,k,'E_minus') call REPORT_all_Occupations(E_plus,k,'E_plus') @@ -100,8 +95,8 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) E%nbf=nbf_save E%nbm=nbm_save ! - call msg('rsn','Number of metalic bands : ',E%nbm) - call msg('rsn','Number of filled bands : ',E%nbf) + call msg('rsn','Number of metalic bands : ',E%nbm(1)) + call msg('rsn','Number of filled bands : ',E%nbf(1)) call msg('rsn','Number of valence bands : ',nval) ! call REPORT_all_Occupations(E,k,'E') diff --git a/src/common/Vertical_Occupation.F b/src/common/Vertical_Occupation.F deleted file mode 100644 index 020db7a66e..0000000000 --- a/src/common/Vertical_Occupation.F +++ /dev/null @@ -1,73 +0,0 @@ -! -! Copyright (C) 2000-2017 Claudio Attaccalite -! -! Authors (see AUTHORS file for details): CA -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine Vertical_Occupation(E,K,mode,ik_exc) - ! - use pars, ONLY:SP,DP - use units, ONLY:HA2EV - use electrons, ONLY:levels,nel_cond,nel,E_duplicate,E_reset - use R_lattice, ONLY:bz_samp - use IO_m, ONLY:IO_and_Messaging_switch - use com, ONLY:error,msg - ! - implicit none - ! - type(levels) ::E - type(bz_samp)::K - integer ::mode - integer, intent(in) :: ik_exc - ! - ! Work Space - ! - real(SP) :: E_range=0.026/HA2EV !eV = 300 Kelvin - real(SP) :: n_remove,n_add - integer :: n_bnd_hole,n_bnd_elect - integer :: ib - ! - n_bnd_hole =0 - n_bnd_elect=0 - ! - do ib=1,E%nbf - if(abs(E%E(ib,ik_exc,1)-E%E(E%nbf,ik_exc,1)) ! real(SP) :: nel + real(SP) :: nel_cond ! Number of electrons promoted in conduction (quasi-fermi distribution) real(SP) :: default_nel real(SP) :: spin_occ real(SP) :: filled_tresh From 83607fcf4343058f3c38102bff0ee2e4da84a8e8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 4 Oct 2022 15:22:24 +0200 Subject: [PATCH 0437/1367] Added in input Version 5.1.0, Revision 21972, Hash 3cf00070e MODIFIED * include/driver/version.h interface/INIT_activate.F interface/INIT_load.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 3 ++- ypp/interface/INIT_load_ypp.F | 6 +++++- ypp/interface/INIT_ypp.F | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 21ef14f6ad..8ef48c77f4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21971 -#define YAMBO_HASH "2c820121b" +#define YAMBO_REVISION 21972 +#define YAMBO_HASH "3cf00070e" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 46c095dd10..a42c7733a0 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -58,7 +58,7 @@ subroutine INIT_activate() ! !Common ! - call initactivate(1,'StdoHash Nelectro ElecTemp BoseTemp OccTresh NLogCPUs DBsIOoff DBsFRAGpm EvalMagn MEM_tresh') + call initactivate(1,'StdoHash Nelectro NelCond ElecTemp BoseTemp OccTresh NLogCPUs DBsIOoff DBsFRAGpm EvalMagn MEM_tresh') ! !FFT ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index d5f79244a1..d5cab2f0a9 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -25,7 +25,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! use drivers, ONLY:infile_editing use pars, ONLY:schlen,SP - use electrons, ONLY:levels,nel,filled_tresh + use electrons, ONLY:levels,nel,filled_tresh,nel_cond use zeros, ONLY:G_mod_zero use frequency, ONLY:w_samp use it_tools, ONLY:it,runlevel_is_on @@ -209,6 +209,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'IkSigLim','[KPT] QP K-points indices range',QP_states_k,verb_level=V_kpt) call it(defs,'IkXLim', '[KPT] X grid last k-point index',nXkibz,verb_level=V_kpt) call it(defs,'Nelectro','Electrons number',nel,verb_level=V_general) + call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel,verb_level=V_general) call it(defs,'ElecTemp','Electronic Temperature',Tel,T_unit,verb_level=V_general) call it(defs,'OccTresh','Occupation treshold (metallic bands)',filled_tresh,verb_level=V_general) #if defined _ELPH diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 692fb8b9f9..f05299ced6 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -30,7 +30,7 @@ subroutine INIT_ypp_load(defs) use LIVE_t, ONLY:nhash use D_lattice, ONLY:Tel,Bose_Temp use R_lattice, ONLY:BZ_FineGd_mode - use electrons, ONLY:n_spinor + use electrons, ONLY:n_spinor,nel_cond use interpolate, ONLY:INTERP_shell_factor,INTERP_mode,NN_n_of_nearest use YPPm, ONLY:E_field,alat_used_for_output,B_field,B_psi,B_theta,BANDS_bands,BANDS_path,& & BZ_FineGd_nkpts_to_use,BZ_random_nkpts,CIRCUIT_E_DB_path,coo_in,coo_out,current_dir,& @@ -147,6 +147,10 @@ subroutine INIT_ypp_load(defs) call it(defs,'ElecTemp','Electronic Temperature',Tel,T_unit,verb_level=V_general) call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit,verb_level=V_general) ! + ! Electrons + ! + call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel,verb_level=V_general) + ! ! DOS ! call it(defs,'DOS_broad', 'Broadening of the DOS',DOS_broadening,E_unit) diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 499b594e8a..8709c84b9f 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -586,7 +586,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif if (l_flag) then call initactivate(1,"OutputAlat cooIn cooOut NormN NelFac") - if (l_bands) call initactivate(1,"BANDS_bands") + if (l_bands) call initactivate(1,"NelCond BANDS_bands") call initactivate(1,"CIRCUIT_E_DB_path BANDS_path BANDS_steps BANDS_built_in") endif if (l_flag) then From 46f4d205e95ec30a9e8904663a03dad52fcef33c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 4 Oct 2022 16:26:22 +0200 Subject: [PATCH 0438/1367] Version 5.1.0, Revision 21973, Hash 83607fcf4 MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F modules/SET_defaults.F ypp/electrons/electrons_bands.F ypp/interface/INIT_load_ypp.F Additions: -Added quasi-fermi distribution in bands interpolation Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 12 ++++++++---- src/modules/SET_defaults.F | 3 ++- ypp/electrons/electrons_bands.F | 11 +++++++++-- ypp/interface/INIT_load_ypp.F | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8ef48c77f4..fa5678be6c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21972 -#define YAMBO_HASH "3cf00070e" +#define YAMBO_REVISION 21973 +#define YAMBO_HASH "83607fcf4" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 1bcf73be30..c0d2d4d45e 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -20,7 +20,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) +subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) ! ! Mode = 0 ! Update the Fermi energy @@ -47,6 +47,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) type(levels) ::E type(bz_samp)::K integer ::mode + real(SP), intent(out) :: E_fermi_h,E_fermi_e ! ! Work Space ! @@ -86,8 +87,8 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) ! nbf_save=E_minus%nbf(1) ! - call REPORT_all_Occupations(E_minus,k,'E_minus') - call REPORT_all_Occupations(E_plus,k,'E_plus') + call REPORT_Occupations(E_minus,'E_minus') + call REPORT_Occupations(E_plus,'E_plus') ! call OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus ! @@ -95,11 +96,14 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,K,mode) E%nbf=nbf_save E%nbm=nbm_save ! + E_fermi_h=E_minus%E_Fermi + E_fermi_e=E_plus%E_Fermi + ! call msg('rsn','Number of metalic bands : ',E%nbm(1)) call msg('rsn','Number of filled bands : ',E%nbf(1)) call msg('rsn','Number of valence bands : ',nval) ! - call REPORT_all_Occupations(E,k,'E') + call REPORT_Occupations(E,'E') ! call E_reset(E_plus) call E_reset(E_minus) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 554f217b00..3efcd62511 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -55,7 +55,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & Xk_grid_is_uniform,RIM_id_epsm1_reference,RIM_epsm1,& & RIM_anisotropy,RIM_ng,RIM_W_ng,RIM_n_rand_pts,nqibz,q0_def_norm,& & cutoff_presets,k_map - use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,eval_magn + use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,eval_magn,nel_cond use parallel_m, ONLY:ncpu,CPU_str_reset,CREATE_hosts_COMM use com, ONLY:isec,depth,secnm,previous_secmode,of_name,n_ofs_defined,of_opened,of_unit,max_open_ofs,& & more_io_path,core_io_path,com_path,repfile,grid_paths,fat_log @@ -320,6 +320,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) n_spin_den=1 l_spin_orbit = .FALSE. filled_tresh=0.00001 + nel_cond=rZERO ! ! Magnetization and density ! diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 50561bc783..5301f22eb7 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -37,7 +37,7 @@ subroutine electrons_bands(Xk,Xen) use YPPm, ONLY:BANDS_steps,INTERP_grid,& & BANDS_bands,CIRCUIT_E_DB_path,CIRCUIT_E_db,USER_k,CIRCUIT_k,& & BANDS_path,BANDS_from_db,l_PROJECT_line,l_PROJECT_plane - use electrons, ONLY:levels,n_sp_pol,n_spinor,E_reset,n_spin + use electrons, ONLY:levels,n_sp_pol,n_spinor,E_reset,n_spin,nel_cond use R_lattice, ONLY:bz_samp use D_lattice, ONLY:lattice use com, ONLY:msg @@ -56,7 +56,7 @@ subroutine electrons_bands(Xk,Xen) ! ! Work Space ! - type(levels) :: GRID_E,CIRCUIT_E,CIRCUIT_dE + type(levels) :: GRID_E,CIRCUIT_E,CIRCUIT_dE,E_QF integer :: ID_spin,ID_magn,ID_bands(3),IDs(5),nfiles(5),nqnt,ib real(SP) :: dEf logical :: BANDS_built_in,BANDS_interpolated,GRID_interpolate @@ -68,6 +68,7 @@ subroutine electrons_bands(Xk,Xen) logical, external :: file_exists character(schlen) :: INTERP_mode_save real(SP) :: INTERP_shell_factor_save + real(SP) :: E_fermi_h,E_fermi_e ! ! Apply QP corrections !====================== @@ -150,6 +151,12 @@ subroutine electrons_bands(Xk,Xen) ! endif ! + ! Quasi-Fermi distribution + ! ========================= + if(nel_cond/=rZERO.and.BANDS_steps> 0) then + call OCCUPATIONS_Quasi_Fermi(E_qf,E_fermi_h,E_fermi_e,Xk,1) + endif + ! ! Fermi Levels !============== ! diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index f05299ced6..f94e525e8d 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -149,7 +149,7 @@ subroutine INIT_ypp_load(defs) ! ! Electrons ! - call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel,verb_level=V_general) + call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general) ! ! DOS ! From c9d79d67bffb807be5dd8bdfb747c50befd66463 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Oct 2022 13:19:53 +0200 Subject: [PATCH 0439/1367] Version 5.1.0, Revision 21974, Hash 46f4d205e MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F ypp/electrons/electrons_bands.F Bugs: - Additions: -Fixed call to OCCUPATIONS_Fermi Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 6 +++--- ypp/electrons/electrons_bands.F | 7 ++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fa5678be6c..7d9905f9fe 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21973 -#define YAMBO_HASH "83607fcf4" +#define YAMBO_REVISION 21974 +#define YAMBO_HASH "46f4d205e" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index c0d2d4d45e..136a81b2ba 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -56,7 +56,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) integer :: nbf_save,nbm_save integer :: nval ! - call OCCUPATIONS_Fermi(E,K,mode) + call OCCUPATIONS_Fermi(E,K,'EQ',mode) ! if(nel_cond==0._SP) return ! @@ -75,14 +75,14 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) nel =nel+nel_cond ! call IO_and_Messaging_switch("-report -log -io_in -io_out") - call OCCUPATIONS_Fermi(E_plus,K,mode) + call OCCUPATIONS_Fermi(E_plus,K,'Eplus',mode) ! nbm_save=E_plus%nbm(1) ! nel =nel_save nel =nel-nel_cond ! - call OCCUPATIONS_Fermi(E_minus,K,mode) + call OCCUPATIONS_Fermi(E_minus,K,'Eminus',mode) call IO_and_Messaging_switch("+report +log +io_in +io_out") ! nbf_save=E_minus%nbf(1) diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 5301f22eb7..7a347e51c1 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -151,9 +151,10 @@ subroutine electrons_bands(Xk,Xen) ! endif ! - ! Quasi-Fermi distribution + ! Find the Fermi energies of the Quasi-Fermi distribution ! ========================= if(nel_cond/=rZERO.and.BANDS_steps> 0) then + call E_reset(E_qf) call OCCUPATIONS_Quasi_Fermi(E_qf,E_fermi_h,E_fermi_e,Xk,1) endif ! @@ -197,6 +198,10 @@ subroutine electrons_bands(Xk,Xen) IDs(nqnt)=ID_proj endif #endif + ! + ! Generate excited states occupations + if(nel_cond/=rZERO.and.BANDS_steps> 0) then + endif ! if (BANDS_built_in.and.USER_k%nbz>0 ) call plot_interpolated_values & & (Xk,Xen,dEf,USER_k, IDs(1:nqnt),BANDS_bands,nqnt,nfiles(1:nqnt),"built_in", "bands",0) From c4e750117bb88027c720de3d5297a3b1ba10c2d7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Oct 2022 13:23:41 +0200 Subject: [PATCH 0440/1367] Version 5.1.0, Revision 21975, Hash c9d79d67b MODIFIED * include/driver/version.h common/OCCUPATIONS_Merge.F common/OCCUPATIONS_Quasi_Fermi.F ypp/electrons/electrons_bands.F Bugs: -Fixed again call to OCCUPATIONS_Fermi Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Merge.F | 3 +-- src/common/OCCUPATIONS_Quasi_Fermi.F | 12 ++++++------ ypp/electrons/electrons_bands.F | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7d9905f9fe..0090f25af0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21974 -#define YAMBO_HASH "46f4d205e" +#define YAMBO_REVISION 21975 +#define YAMBO_HASH "c9d79d67b" diff --git a/src/common/OCCUPATIONS_Merge.F b/src/common/OCCUPATIONS_Merge.F index 96460f368f..01a3a33381 100644 --- a/src/common/OCCUPATIONS_Merge.F +++ b/src/common/OCCUPATIONS_Merge.F @@ -20,7 +20,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) +subroutine OCCUPATIONS_Merge(E,E_minus,E_plus,K) ! use pars, ONLY:SP,DP use electrons, ONLY:levels,default_nel @@ -31,7 +31,6 @@ subroutine OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) ! type(levels) :: E,E_minus,E_plus type(bz_samp) :: K - integer :: mode ! ! Work Space ! diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 136a81b2ba..28f69eee66 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -20,7 +20,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) +subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) ! ! Mode = 0 ! Update the Fermi energy @@ -41,12 +41,12 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) use IO_int, ONLY:IO_and_Messaging_switch use com, ONLY:msg use parser_m, ONLY:parser + use interfaces, ONLY:OCCUPATIONS_Fermi ! implicit none ! type(levels) ::E type(bz_samp)::K - integer ::mode real(SP), intent(out) :: E_fermi_h,E_fermi_e ! ! Work Space @@ -56,7 +56,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) integer :: nbf_save,nbm_save integer :: nval ! - call OCCUPATIONS_Fermi(E,K,'EQ',mode) + call OCCUPATIONS_Fermi(E,K,'EQ',mode="OCCUPATIONS") ! if(nel_cond==0._SP) return ! @@ -75,14 +75,14 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) nel =nel+nel_cond ! call IO_and_Messaging_switch("-report -log -io_in -io_out") - call OCCUPATIONS_Fermi(E_plus,K,'Eplus',mode) + call OCCUPATIONS_Fermi(E_plus,K,'Eplus',mode="OCCUPATIONS") ! nbm_save=E_plus%nbm(1) ! nel =nel_save nel =nel-nel_cond ! - call OCCUPATIONS_Fermi(E_minus,K,'Eminus',mode) + call OCCUPATIONS_Fermi(E_minus,K,'Eminus',mode="OCCUPATIONS") call IO_and_Messaging_switch("+report +log +io_in +io_out") ! nbf_save=E_minus%nbf(1) @@ -90,7 +90,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K,mode) call REPORT_Occupations(E_minus,'E_minus') call REPORT_Occupations(E_plus,'E_plus') ! - call OCCUPATIONS_Merge(E,E_minus,E_plus,K,mode) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus + call OCCUPATIONS_Merge(E,E_minus,E_plus,K) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus ! nel =nel_save E%nbf=nbf_save diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 7a347e51c1..7967ccb812 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -155,7 +155,7 @@ subroutine electrons_bands(Xk,Xen) ! ========================= if(nel_cond/=rZERO.and.BANDS_steps> 0) then call E_reset(E_qf) - call OCCUPATIONS_Quasi_Fermi(E_qf,E_fermi_h,E_fermi_e,Xk,1) + call OCCUPATIONS_Quasi_Fermi(E_qf,E_fermi_h,E_fermi_e,Xk) endif ! ! Fermi Levels From b596c2eda2a6c1026da3fdde970a628cd1f8f095 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Oct 2022 13:26:59 +0200 Subject: [PATCH 0441/1367] Version 5.1.0, Revision 21976, Hash c4e750117 MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F ypp/electrons/electrons_bands.F Bugs: -Small fix Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 1 + ypp/electrons/electrons_bands.F | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0090f25af0..6c5e559076 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21975 -#define YAMBO_HASH "c9d79d67b" +#define YAMBO_REVISION 21976 +#define YAMBO_HASH "c4e750117" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 28f69eee66..bb99775449 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -57,6 +57,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) integer :: nval ! call OCCUPATIONS_Fermi(E,K,'EQ',mode="OCCUPATIONS") + stop ! if(nel_cond==0._SP) return ! diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 7967ccb812..4d8415903e 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -37,7 +37,7 @@ subroutine electrons_bands(Xk,Xen) use YPPm, ONLY:BANDS_steps,INTERP_grid,& & BANDS_bands,CIRCUIT_E_DB_path,CIRCUIT_E_db,USER_k,CIRCUIT_k,& & BANDS_path,BANDS_from_db,l_PROJECT_line,l_PROJECT_plane - use electrons, ONLY:levels,n_sp_pol,n_spinor,E_reset,n_spin,nel_cond + use electrons, ONLY:levels,n_sp_pol,n_spinor,E_reset,n_spin,nel_cond,E_duplicate use R_lattice, ONLY:bz_samp use D_lattice, ONLY:lattice use com, ONLY:msg @@ -155,6 +155,7 @@ subroutine electrons_bands(Xk,Xen) ! ========================= if(nel_cond/=rZERO.and.BANDS_steps> 0) then call E_reset(E_qf) + call E_duplicate(Xen,E_qf) call OCCUPATIONS_Quasi_Fermi(E_qf,E_fermi_h,E_fermi_e,Xk) endif ! From 38307ad6d974e570939759aa9069164fe13f6b1a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Oct 2022 13:28:13 +0200 Subject: [PATCH 0442/1367] Version 5.1.0, Revision 21977, Hash b596c2eda MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F Changes: -Removed stop Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6c5e559076..7622bd1afb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21976 -#define YAMBO_HASH "c4e750117" +#define YAMBO_REVISION 21977 +#define YAMBO_HASH "b596c2eda" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index bb99775449..28f69eee66 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -57,7 +57,6 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) integer :: nval ! call OCCUPATIONS_Fermi(E,K,'EQ',mode="OCCUPATIONS") - stop ! if(nel_cond==0._SP) return ! From 57c65af8f391653fbc3e5facf998f49a383e3ee8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 7 Oct 2022 12:58:24 +0200 Subject: [PATCH 0443/1367] Version 5.1.0, Revision 21978, Hash 38307ad6d MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F Bugs: -Fixed call to REPORT_occupations Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7622bd1afb..a9af9cbb18 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21977 -#define YAMBO_HASH "b596c2eda" +#define YAMBO_REVISION 21978 +#define YAMBO_HASH "38307ad6d" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 28f69eee66..f06ecfa247 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -56,6 +56,8 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) integer :: nbf_save,nbm_save integer :: nval ! + call msg('rs','Quasi-Fermi occupation') + ! call OCCUPATIONS_Fermi(E,K,'EQ',mode="OCCUPATIONS") ! if(nel_cond==0._SP) return @@ -87,8 +89,8 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) ! nbf_save=E_minus%nbf(1) ! - call REPORT_Occupations(E_minus,'E_minus') - call REPORT_Occupations(E_plus,'E_plus') + call REPORT_Occupations('E_minus',E_minus) + call REPORT_Occupations('E_plus',E_plus) ! call OCCUPATIONS_Merge(E,E_minus,E_plus,K) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus ! From c7b65c7d82402b84c2dd25c43c7a89d748656d68 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 7 Oct 2022 13:01:05 +0200 Subject: [PATCH 0444/1367] Version 5.1.0, Revision 21979, Hash 57c65af8f MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F ypp/electrons/electrons_bands.F Bugs: -Fixed another call to REPORT_occupations Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 2 +- ypp/electrons/electrons_bands.F | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a9af9cbb18..844fcefebd 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21978 -#define YAMBO_HASH "38307ad6d" +#define YAMBO_REVISION 21979 +#define YAMBO_HASH "57c65af8f" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index f06ecfa247..13b6dc9a40 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -105,7 +105,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) call msg('rsn','Number of filled bands : ',E%nbf(1)) call msg('rsn','Number of valence bands : ',nval) ! - call REPORT_Occupations(E,'E') + call REPORT_Occupations('E',E) ! call E_reset(E_plus) call E_reset(E_minus) diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 4d8415903e..dcdbc31ec8 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -168,6 +168,8 @@ subroutine electrons_bands(Xk,Xen) ! shift of the BUILT-in and the INTERPOLATED grids. Thus it is non-zero ! only when it can be correctly (all occupied bands) evaulated with GRID_E ! + write(*,*) 'passo qui ',GRID_interpolate,BANDS_bands(1) + stop if (GRID_interpolate.and.BANDS_bands(1)==1) call OCCUPATIONS_Fermi(GRID_E,GRID_k,"GRID",mode="FERMI") ! call msg("s",'Fermi Level (BUILT-in bands) ',Xen%E_Fermi*HA2EV,"[eV]") From c33121fc4273354a4f9451d9e793193c14cbf790 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 7 Oct 2022 13:02:21 +0200 Subject: [PATCH 0445/1367] Version 5.1.0, Revision 21980, Hash c7b65c7d8 MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F ypp/electrons/electrons_bands.F Additions: -Better report Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 2 +- ypp/electrons/electrons_bands.F | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 844fcefebd..9302656f4d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21979 -#define YAMBO_HASH "57c65af8f" +#define YAMBO_REVISION 21980 +#define YAMBO_HASH "c7b65c7d8" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 13b6dc9a40..5d9715c82a 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -105,7 +105,7 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) call msg('rsn','Number of filled bands : ',E%nbf(1)) call msg('rsn','Number of valence bands : ',nval) ! - call REPORT_Occupations('E',E) + call REPORT_Occupations('E quasi-fermi',E) ! call E_reset(E_plus) call E_reset(E_minus) diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index dcdbc31ec8..4d8415903e 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -168,8 +168,6 @@ subroutine electrons_bands(Xk,Xen) ! shift of the BUILT-in and the INTERPOLATED grids. Thus it is non-zero ! only when it can be correctly (all occupied bands) evaulated with GRID_E ! - write(*,*) 'passo qui ',GRID_interpolate,BANDS_bands(1) - stop if (GRID_interpolate.and.BANDS_bands(1)==1) call OCCUPATIONS_Fermi(GRID_E,GRID_k,"GRID",mode="FERMI") ! call msg("s",'Fermi Level (BUILT-in bands) ',Xen%E_Fermi*HA2EV,"[eV]") From a771335f014d393b50cd81fd675f4fc9bffc041d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 7 Oct 2022 13:23:11 +0200 Subject: [PATCH 0446/1367] Version 5.1.0, Revision 21981, Hash c33121fc4 MODIFIED * include/driver/version.h common/OCCUPATIONS_Quasi_Fermi.F ypp/electrons/electrons_bands.F Bugs: - Additions: -H/E fermi levels are printed in output Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/common/OCCUPATIONS_Quasi_Fermi.F | 35 +++++++++++++++++----------- ypp/electrons/electrons_bands.F | 8 +++---- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 9302656f4d..171ed016e5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21980 -#define YAMBO_HASH "c7b65c7d8" +#define YAMBO_REVISION 21981 +#define YAMBO_HASH "c33121fc4" diff --git a/src/common/OCCUPATIONS_Quasi_Fermi.F b/src/common/OCCUPATIONS_Quasi_Fermi.F index 5d9715c82a..a6d73835e0 100644 --- a/src/common/OCCUPATIONS_Quasi_Fermi.F +++ b/src/common/OCCUPATIONS_Quasi_Fermi.F @@ -20,7 +20,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) +subroutine OCCUPATIONS_Quasi_Fermi(E,K,E_qf,E_fermi_h,E_fermi_e) ! ! Mode = 0 ! Update the Fermi energy @@ -45,16 +45,17 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) ! implicit none ! - type(levels) ::E - type(bz_samp)::K - real(SP), intent(out) :: E_fermi_h,E_fermi_e + type(levels), intent(out) :: E_qf + real(SP), intent(out) :: E_fermi_h,E_fermi_e + type(levels), intent(in) :: E + type(bz_samp),intent(in) :: K ! ! Work Space ! type(levels) :: E_plus,E_minus real(SP) :: nel_save integer :: nbf_save,nbm_save - integer :: nval + integer :: nval,ik ! call msg('rs','Quasi-Fermi occupation') ! @@ -66,8 +67,10 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) ! call E_reset(E_plus) call E_reset(E_minus) + call E_reset(E_qf) call E_duplicate(E,E_plus) call E_duplicate(E,E_minus) + call E_duplicate(E,E_qf) ! if(any(E%nbf/=E%nbm)) call error("Quasi-Fermi distribution only for insulators/semiconductors") ! @@ -92,20 +95,24 @@ subroutine OCCUPATIONS_Quasi_Fermi(E,E_fermi_h,E_fermi_e,K) call REPORT_Occupations('E_minus',E_minus) call REPORT_Occupations('E_plus',E_plus) ! - call OCCUPATIONS_Merge(E,E_minus,E_plus,K) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus + call OCCUPATIONS_Merge(E_qf,E_minus,E_plus,K) ! Generate a Quasi-Fermi distribution in E using E_minus and E_plus ! nel =nel_save - E%nbf=nbf_save - E%nbm=nbm_save + E_fermi_h=E_minus%E_fermi + E_fermi_e= E_plus%E_fermi ! - E_fermi_h=E_minus%E_Fermi - E_fermi_e=E_plus%E_Fermi - ! - call msg('rsn','Number of metalic bands : ',E%nbm(1)) - call msg('rsn','Number of filled bands : ',E%nbf(1)) + call msg('rsn','Number of metalic bands : ',E_qf%nbm(1)) + call msg('rsn','Number of filled bands : ',E_qf%nbf(1)) call msg('rsn','Number of valence bands : ',nval) + call msg('rsm','Hole Fermi level : ',E_fermi_h*HA2EV,'[eV]') + call msg('rsm','Electron Fermi level : ',E_fermi_e*HA2EV,'[eV]') + ! + call REPORT_Occupations('E quasi-fermi',E_qf) ! - call REPORT_Occupations('E quasi-fermi',E) + K_LOOP: do ik=1,K%nibz + call REPORT_Energies(E_qf%E,K,K,E_qf%nb,(/ik,ik/),'E',.FALSE.,.TRUE.) + call REPORT_Energies(E_qf%f/HA2EV,K,K,E_qf%nb,(/ik,ik/),'occ',.FALSE.,.TRUE.) + enddo K_LOOP ! call E_reset(E_plus) call E_reset(E_minus) diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 4d8415903e..7525b655bd 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -58,7 +58,7 @@ subroutine electrons_bands(Xk,Xen) ! type(levels) :: GRID_E,CIRCUIT_E,CIRCUIT_dE,E_QF integer :: ID_spin,ID_magn,ID_bands(3),IDs(5),nfiles(5),nqnt,ib - real(SP) :: dEf + real(SP) :: dEf,E_fermi_e,E_fermi_h logical :: BANDS_built_in,BANDS_interpolated,GRID_interpolate #if defined _YPP_SC integer :: ID_proj @@ -68,7 +68,6 @@ subroutine electrons_bands(Xk,Xen) logical, external :: file_exists character(schlen) :: INTERP_mode_save real(SP) :: INTERP_shell_factor_save - real(SP) :: E_fermi_h,E_fermi_e ! ! Apply QP corrections !====================== @@ -154,9 +153,8 @@ subroutine electrons_bands(Xk,Xen) ! Find the Fermi energies of the Quasi-Fermi distribution ! ========================= if(nel_cond/=rZERO.and.BANDS_steps> 0) then - call E_reset(E_qf) - call E_duplicate(Xen,E_qf) - call OCCUPATIONS_Quasi_Fermi(E_qf,E_fermi_h,E_fermi_e,Xk) + call E_reset(E_QF) + call OCCUPATIONS_Quasi_Fermi(Xen,Xk,E_QF,E_fermi_h,E_fermi_e) endif ! ! Fermi Levels From 4f12c955d2d78640b6698805134e9b3b9ecadd96 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 7 Oct 2022 14:30:37 +0200 Subject: [PATCH 0447/1367] Version 5.1.0, Revision 21982, Hash a771335f0 MODIFIED * include/driver/version.h ypp/electrons/electrons_bands.F Additions: -Quasi-Fermi plotted in the bands Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/electrons/electrons_bands.F | 37 +++++++++++++++++++++++++++------ 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 171ed016e5..c272ba4268 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21981 -#define YAMBO_HASH "c33121fc4" +#define YAMBO_REVISION 21982 +#define YAMBO_HASH "a771335f0" diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 7525b655bd..8c5e7d65c4 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -37,14 +37,16 @@ subroutine electrons_bands(Xk,Xen) use YPPm, ONLY:BANDS_steps,INTERP_grid,& & BANDS_bands,CIRCUIT_E_DB_path,CIRCUIT_E_db,USER_k,CIRCUIT_k,& & BANDS_path,BANDS_from_db,l_PROJECT_line,l_PROJECT_plane - use electrons, ONLY:levels,n_sp_pol,n_spinor,E_reset,n_spin,nel_cond,E_duplicate + use electrons, ONLY:levels,n_sp_pol,n_spinor,E_reset,n_spin,nel_cond,E_duplicate,spin_occ use R_lattice, ONLY:bz_samp - use D_lattice, ONLY:lattice + use functions, ONLY:Fermi_fnc + use D_lattice, ONLY:lattice,Tel use com, ONLY:msg use parser_m, ONLY:parser - use interpolate, ONLY:electrons_bands_interpolate,GRID_k,INTERP_mode,INTERP_shell_factor + use interpolate, ONLY:electrons_bands_interpolate,GRID_k,INTERP_mode,INTERP_shell_factor,INTERP_obj use QP_CTL_m, ONLY:QP_apply use interfaces, ONLY:OCCUPATIONS_Fermi + use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do #if defined _YPP_SC use SC, ONLY:SC_neq_kind #endif @@ -57,8 +59,8 @@ subroutine electrons_bands(Xk,Xen) ! Work Space ! type(levels) :: GRID_E,CIRCUIT_E,CIRCUIT_dE,E_QF - integer :: ID_spin,ID_magn,ID_bands(3),IDs(5),nfiles(5),nqnt,ib - real(SP) :: dEf,E_fermi_e,E_fermi_h + integer :: ID_spin,ID_magn,ID_bands(3),IDs(5),nfiles(5),nqnt,ib,ID_occ,ik + real(SP) :: dEf,E_fermi_e,E_fermi_h,E_h,E_e logical :: BANDS_built_in,BANDS_interpolated,GRID_interpolate #if defined _YPP_SC integer :: ID_proj @@ -200,6 +202,29 @@ subroutine electrons_bands(Xk,Xen) ! ! Generate excited states occupations if(nel_cond/=rZERO.and.BANDS_steps> 0) then + ! + call INTERPOLATION_driver_seed("SCporj",ID_occ,BANDS_bands,SEED_k=Xk,SEED_E=Xen) + YAMBO_ALLOC(INTERP_obj(ID_occ)%INTERP,(BANDS_bands(1):BANDS_bands(2),CIRCUIT_k%nibz,INTERP_obj(ID_occ)%D)) + INTERP_obj(ID_occ)%INTERP=rZERO + ! + do ik=1,CIRCUIT_k%nibz + ! + do ib=BANDS_bands(1),Xen%nbf(1) + E_h=INTERP_obj(ID_bands(2))%INTERP(ib,ik,1)-E_fermi_h + INTERP_obj(ID_occ)%INTERP(ib,ik,1)=spin_occ*Fermi_fnc(E_h,Tel)-spin_occ + enddo + ! + do ib=Xen%nbf(1)+1,BANDS_bands(2) + E_h=INTERP_obj(ID_bands(2))%INTERP(ib,ik,1)-E_fermi_e + INTERP_obj(ID_occ)%INTERP(ib,ik,1)=spin_occ*Fermi_fnc(E_h,Tel) + enddo + ! + enddo + ! + nqnt=nqnt+1 + nfiles(nqnt)=1 + IDs(nqnt)=ID_occ + ! endif ! if (BANDS_built_in.and.USER_k%nbz>0 ) call plot_interpolated_values & @@ -209,7 +234,7 @@ subroutine electrons_bands(Xk,Xen) & (Xk,Xen,dEf,CIRCUIT_k,IDs(1:1), BANDS_bands,1, nfiles(1:1), "from_DB", "bands",0) ! if(BANDS_interpolated ) call plot_interpolated_values & -& (Xk,Xen,dEf,CIRCUIT_k,IDs(1:nqnt),BANDS_bands,nqnt,nfiles(1:nqnt),"interpolated","bands",0) +& (Xk,Xen,dEf,CIRCUIT_k,IDs(1:nqnt),BANDS_bands,nqnt,nfiles(1:nqnt),"interpolated","bands",1) ! if (l_PROJECT_plane) call PROJECTION_plot( "BANDS", 1, n_spin, BANDS_bands, OBS_B=GRID_E%E ) ! From e719b4db80630f70bb0749d6099fe7f12f4f54a8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Oct 2022 13:05:33 +0200 Subject: [PATCH 0448/1367] Automatic commit: configure regenerated after merge --- include/driver/version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a2b47df981..2e1bb55b3d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21690 -#define YAMBO_HASH "2842813e7" +#define YAMBO_REVISION 21762 +#define YAMBO_HASH "442d8d91c" From 18f4bd355113a5cd5bae38f21381fb86b790a2be Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 11 Oct 2022 15:59:56 +0200 Subject: [PATCH 0449/1367] Version 5.1.0, Revision 21983, Hash 4f12c955d MODIFIED * include/driver/version.h exc-ph/.objects ypp/excitons/excitons_bands.F ypp/excitons/excitons_interpolate_setup.F ypp/modules/mod_YPP.F NEW * exc-ph/EXC_occupations.F Additions: -Excitonic occupation interpolation Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/.objects | 2 +- src/exc-ph/EXC_occupations.F | 42 +++++++++++++++++++++++ ypp/excitons/excitons_bands.F | 5 +-- ypp/excitons/excitons_interpolate_setup.F | 40 ++++++++++++++++----- ypp/modules/mod_YPP.F | 1 + 6 files changed, 81 insertions(+), 13 deletions(-) create mode 100644 src/exc-ph/EXC_occupations.F diff --git a/include/driver/version.h b/include/driver/version.h index c272ba4268..4d36b20d3f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21982 -#define YAMBO_HASH "a771335f0" +#define YAMBO_REVISION 21983 +#define YAMBO_HASH "4f12c955d" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 3c57d90789..3214e36ad6 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval_ber.o EXCPH_gkkp_eval_pal.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ - EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o + EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o EXC_occupations.o #endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F new file mode 100644 index 0000000000..cdbb2dbd29 --- /dev/null +++ b/src/exc-ph/EXC_occupations.F @@ -0,0 +1,42 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! Excitonic occupation, following PRB 99, 081109(R) 2019 +! +subroutine EXC_occupation(E_QF,EXC_n_states,EXC_indexes,EXC_occ) + ! + use pars, ONLY:SP,cZERO,rZERO,cONE + use electrons, ONLY:levels + ! +#include + ! + ! Work space + ! + type(levels), intent(in) :: E_QF + integer, intent(in) :: EXC_n_states + integer, intent(in) :: EXC_indexes(EXC_n_states) + real(SP), intent(out) :: EXC_occ(EXC_n_states) + ! + EXC_occ=rZERO + ! +end subroutine diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index e9b01f5201..6a22986bfd 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -49,7 +49,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! ! Work space ! - integer :: iq,i_c,i_l,ID_INTERP_EXC,i_E + integer :: iq,i_c,i_l,ID_INTERP_EXC,ID_INTERP_OCC,i_E real(SP), allocatable :: BS_all_E(:,:),BSE_interp_E(:,:),values(:) type(bz_samp) :: GRID_q character(schlen) :: file_name @@ -75,7 +75,8 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! Read and interpolate excitons dispersion ! ID_INTERP_EXC=1 - call excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,.TRUE.) + ID_INTERP_OCC=2 + call excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC,.TRUE.) ! ! Interpolate and write on disk ! diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 16d5e30428..c641ce0a8e 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -21,32 +21,34 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) +subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC,report) ! ! This subroutine read and interpolate exciton ! - use pars, ONLY:SP,schlen + use pars, ONLY:SP,schlen,rZERO use units, ONLY:HA2EV use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,nel_cond,E_reset use interpolate, ONLY:INTERPOLATION_BZ,INTERP_obj,INTERPOLATION_coefficients - use YPPm, ONLY:BS_E,EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out,K_transform + use YPPm, ONLY:BS_E,EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out,K_transform,& +& l_exc_occ_interp use com, ONLY:msg use stderr, ONLY:intc ! #include ! type(bz_samp) ::Xk,k,q - type(levels) ::Xen,en + type(levels) ::Xen,en,E_QF logical, intent(in) :: report - integer, intent(inout) :: ID_INTERP_EXC + integer, intent(inout) :: ID_INTERP_EXC,ID_INTERP_OCC ! ! Work space ! integer :: iq,i_c,i_l,io_err real(SP), allocatable :: BS_all_E(:,:) + real(SP), allocatable :: EXC_occ(:,:) real(SP), allocatable :: values(:) - real(SP) :: tmp_q(3) + real(SP) :: tmp_q(3),E_fermi_h,E_fermi_e character(schlen), allocatable :: headings(:) ! ! Allocate arrays for all eigenvalues/eigenvectors @@ -55,6 +57,18 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) ! call section('*','Excitons Interpolation') ! + if(nel_cond/=rZERO) then + call msg('rs','Excitonic quasi-fermi distribution interpolation') + l_exc_occ_interp=.TRUE. + call E_reset(E_QF) + call OCCUPATIONS_Quasi_Fermi(Xen,Xk,E_QF,E_fermi_h,E_fermi_e) +#if defined _YPP_ELPH + YAMBO_ALLOC(EXC_occ,(EXCITONS_n_user_states,q%nibz)) +#else + call error("Excitonic occupations only available in ypp_ph") +#endif + endif + ! call excitons_read(k,Xk,en,Xen,1,"clean",io_err) ! ! Read all eigenvalues and eigenvectors @@ -62,11 +76,21 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) do iq=1,q%nibz call msg('s','Reading excitons at @ Q-index #',iq) call excitons_read(k,Xk,en,Xen,iq,"check",io_err) - call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) + ! + if(l_exc_occ_interp) then + call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) +#if defined _YPP_PH + call EXC_occupations(E_QF,EXC_n_user_states,EXC_user_indexes,EXC_occ(:,iq)) +#endif + else + call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) + endif + ! do i_c=1,EXCITONS_n_user_states i_l=EXCITONS_user_indexes(i_c) BS_all_E(i_c,iq)=BS_E(i_l) enddo + ! call excitons_read(k,Xk,en,Xen,iq,"clean",io_err) ! enddo diff --git a/ypp/modules/mod_YPP.F b/ypp/modules/mod_YPP.F index 72813fd2e8..367ff5c7fb 100644 --- a/ypp/modules/mod_YPP.F +++ b/ypp/modules/mod_YPP.F @@ -186,6 +186,7 @@ module YPPm real(SP) ::EXCITON_Res_treshold real(SP) ::EXCITON_weight_treshold real(SP) ::WF_multiplier + logical ::l_exc_occ_interp=.FALSE. character(schlen) :: AVE_exc character(schlen) :: state_ctl integer :: EXCITONS_n_user_states=0 From 44edc4bf7fafc14542e045115caa6a51adbfdc3e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 11 Oct 2022 16:53:47 +0200 Subject: [PATCH 0450/1367] Version 5.1.0, Revision 21984, Hash 18f4bd355 MODIFIED * include/driver/version.h exc-ph/EXC_occupations.F ypp/excitons/excitons_bands.F ypp/excitons/excitons_interpolate_setup.F Additions: -Added exciton interpolation Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +-- src/exc-ph/EXC_occupations.F | 39 ++++++++++++++++++++--- ypp/excitons/excitons_bands.F | 26 +++++++++++++-- ypp/excitons/excitons_interpolate_setup.F | 7 +++- 4 files changed, 66 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4d36b20d3f..33f2fe1c52 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21983 -#define YAMBO_HASH "4f12c955d" +#define YAMBO_REVISION 21984 +#define YAMBO_HASH "18f4bd355" diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F index cdbb2dbd29..d772b4d08f 100644 --- a/src/exc-ph/EXC_occupations.F +++ b/src/exc-ph/EXC_occupations.F @@ -23,20 +23,51 @@ ! ! Excitonic occupation, following PRB 99, 081109(R) 2019 ! -subroutine EXC_occupation(E_QF,EXC_n_states,EXC_indexes,EXC_occ) +subroutine EXC_occupation(E_QF,k,EXC_n_states,EXC_indexes,EXC_occ) ! use pars, ONLY:SP,cZERO,rZERO,cONE - use electrons, ONLY:levels + use electrons, ONLY:levels,spin_occ + use R_lattice, ONLY:bz_samp + use BS, ONLY:BS_H_dim,BS_bands + use BS_solvers, ONLY:BSS_eh_table ! #include - ! - ! Work space ! type(levels), intent(in) :: E_QF + type(bz_samp),intent(in) :: k integer, intent(in) :: EXC_n_states integer, intent(in) :: EXC_indexes(EXC_n_states) real(SP), intent(out) :: EXC_occ(EXC_n_states) ! + ! Work space + ! + integer :: i_H,iv,ic,ik_bz,ik_ibz,ik_minus_iq_bz,ik_minus_iq_ibz + real(SP) :: el_occ + ! EXC_occ=rZERO ! + do i_H=1,BS_H_dim + ! + ! K = (ik_bz,iv,ic) + ! + ik_bz = BSS_eh_table(i_H,1) + ik_ibz = k%sstar(ik_bz,1) + ! + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + ! + ! In the BSE at finite q we connect (v, k-q) ==> (c, k) + ! + ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz + ik_minus_iq_ibz = k%sstar(ik_minus_iq_bz,1) + ! + el_occ=E_qf%f(ic,ik_ibz,1)*(spin_occ-E_qf%f(iv,ik_minus_iq_ibz,1)) + ! + do i_c=1,EXCITONS_n_user_states + i_l=EXCITONS_user_indexes(i_c) + EXC_occ(i_c)=EXC_occ(i_c)+abs(BS_mat(i_H,i_l))**2*el_occ + enddo + ! + enddo + ! end subroutine diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index 6a22986bfd..3869005ef3 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -32,7 +32,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use units, ONLY:HA2EV use YPPm, ONLY:EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out, & & BANDS_steps,INTERP_grid,K_transform,CIRCUIT_k,DOS_E_step, & -& DOS_E_steps,DOS_broadening,USER_k +& DOS_E_steps,DOS_broadening,USER_k,l_exc_occ_interp use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use stderr, ONLY:intc @@ -50,9 +50,9 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! Work space ! integer :: iq,i_c,i_l,ID_INTERP_EXC,ID_INTERP_OCC,i_E - real(SP), allocatable :: BS_all_E(:,:),BSE_interp_E(:,:),values(:) + real(SP), allocatable :: BS_all_E(:,:),BSE_interp_E(:,:),EXC_occ_interp(:,:),values(:) type(bz_samp) :: GRID_q - character(schlen) :: file_name + character(schlen) :: file_name,file_name2 character(schlen), allocatable :: headings(:) logical :: GRID_interpolate,l_prt_dos real(SP) :: tmp_q(3) @@ -89,6 +89,11 @@ subroutine excitons_bands(k,Xk,en,Xen,q) YAMBO_ALLOC(BSE_interp_E,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) ! + if(l_exc_occ_interp) then + YAMBO_ALLOC(EXC_occ_interp,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) + call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=EXC_occ_interp,ID=ID_INTERP_OCC) + endif + ! call print_BANDS() ! endif @@ -183,6 +188,13 @@ subroutine print_BANDS() call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) call msg('o '//trim(file_name),"#") ! + if(l_exc_occ_interp) then + file_name2="excitons_occupation" + call of_open_close(trim(file_name2),'ot') + call msg('o '//trim(file_name2),"#",headings,INDENT=0,USE_TABS=.true.) + call msg('o '//trim(file_name2),"#") + endif + ! values=0._SP ! do iq=1,CIRCUIT_k%nibz @@ -195,8 +207,16 @@ subroutine print_BANDS() values(1+1:EXCITONS_n_user_states+1)=BSE_interp_E(:,iq)*HA2EV values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) + ! + if(l_exc_occ_interp) then + values(1+1:EXCITONS_n_user_states+1)=EXC_occ_interp(:,iq) + values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q + call msg('o '//trim(file_name2),' ',values,INDENT=0,USE_TABS=.true.) + endif + ! enddo call of_open_close(trim(file_name)) + if(l_exc_occ_interp) call of_open_close(trim(file_name2)) ! end subroutine print_BANDS ! diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index c641ce0a8e..9a70961f4e 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -80,7 +80,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, if(l_exc_occ_interp) then call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) #if defined _YPP_PH - call EXC_occupations(E_QF,EXC_n_user_states,EXC_user_indexes,EXC_occ(:,iq)) + call EXC_occupations(E_QF,Xk,EXC_n_user_states,EXC_user_indexes,EXC_occ(:,iq)) #endif else call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) @@ -132,4 +132,9 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, INTERP_obj(ID_INTERP_EXC)%what="excitons" call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,NK=q%nibz,ID=ID_INTERP_EXC,ID_obj=ID_INTERP_EXC) ! + if(l_exc_occ_interp) then + INTERP_obj(ID_INTERP_EXC)%what="occupations" + call INTERPOLATION_coefficients(R1D=EXC_occ,k=q,NK=q%nibz,ID=ID_INTERP_OCC,ID_obj=ID_INTERP_OCC) + endif + ! end subroutine From 21b6b9562a79a89d8a8d0b1dc4dafa43eee6c724 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 11 Oct 2022 22:25:11 +0200 Subject: [PATCH 0451/1367] Version 5.1.0, Revision 21985, Hash 44edc4bf7 MODIFIED * include/driver/version.h ypp/excitons/excitons_bands.F ypp/interface/INIT_load_ypp.F ypp/modules/mod_YPP.F Bugs: - Additions: -Implemented Boltzman occupation Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/excitons/excitons_bands.F | 28 ++++++++++++++++++++++++---- ypp/interface/INIT_load_ypp.F | 8 +++++--- ypp/modules/mod_YPP.F | 1 + 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 33f2fe1c52..f42c5ec05b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21984 -#define YAMBO_HASH "18f4bd355" +#define YAMBO_REVISION 21986 +#define YAMBO_HASH "44edc4bf7" diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index 3869005ef3..f1c8273171 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -26,13 +26,14 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use pars, ONLY:SP,schlen,rZERO use LIVE_t, ONLY:live_timing use R_lattice, ONLY:bz_samp + use D_lattice, ONLY:Boltz_Temp use interpolate, ONLY:INTERPOLATION_BZ - use electrons, ONLY:levels - use functions, ONLY:Fermi_fnc_derivative + use electrons, ONLY:levels,nel_cond + use functions, ONLY:Fermi_fnc_derivative,boltzman_f use units, ONLY:HA2EV use YPPm, ONLY:EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out, & & BANDS_steps,INTERP_grid,K_transform,CIRCUIT_k,DOS_E_step, & -& DOS_E_steps,DOS_broadening,USER_k,l_exc_occ_interp +& DOS_E_steps,DOS_broadening,USER_k,l_exc_occ_interp,EXC_min use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use stderr, ONLY:intc @@ -78,6 +79,14 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ID_INTERP_OCC=2 call excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC,.TRUE.) ! + ! Check exciton occupations + ! + if(Boltz_Temp/=rZERO.and.EXC_min/=rZERO) then + call msg('rs','Boltzman occupation for the excitons') + if(nel_cond/=rZERO) call error('NelCond /= 0 not compatible with Boltzman occupation ') + l_exc_occ_interp=.true. + endif + ! ! Interpolate and write on disk ! call k_circuit_made_of_user_points( ) @@ -91,7 +100,18 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! if(l_exc_occ_interp) then YAMBO_ALLOC(EXC_occ_interp,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) - call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=EXC_occ_interp,ID=ID_INTERP_OCC) + if(nel_cond/=rZERO) then + ! Excitonic occupations are interpolated + call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=EXC_occ_interp,ID=ID_INTERP_OCC) + else + ! Boltzman occupations are directly calculated + do iq=1,CIRCUIT_k%nibz + do i_c=1,EXCITONS_n_user_states + EXC_occ_interp(i_c,iq)=boltzman_f(BSE_interp_E(i_c,iq)-EXC_min) + enddo + enddo + ! + endif endif ! call print_BANDS() diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index f94e525e8d..8981e4dab1 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -28,7 +28,7 @@ subroutine INIT_ypp_load(defs) & Time_unit,Bfield_unit,V_real_time,T_unit,V_nl_optics,V_io,V_sc use wave_func, ONLY:wf_ng use LIVE_t, ONLY:nhash - use D_lattice, ONLY:Tel,Bose_Temp + use D_lattice, ONLY:Tel,Bose_Temp,Boltz_Temp use R_lattice, ONLY:BZ_FineGd_mode use electrons, ONLY:n_spinor,nel_cond use interpolate, ONLY:INTERP_shell_factor,INTERP_mode,NN_n_of_nearest @@ -36,7 +36,7 @@ subroutine INIT_ypp_load(defs) & BZ_FineGd_nkpts_to_use,BZ_random_nkpts,CIRCUIT_E_DB_path,coo_in,coo_out,current_dir,& & deg_energy,BANDS_steps,DOS_bands,DOS_broadening,PROJECT_path,QP_DB_to_expand,& & DOS_E_range,DOS_E_steps,EXCITON_E_treshold,EXCITON_Res_treshold,EXCITON_weight_treshold,& -& INTERP_grid,mag_dir,N_path_pts,ncell,p_dir,p_format,PDOS_atoms,& +& INTERP_grid,mag_dir,N_path_pts,ncell,p_dir,p_format,PDOS_atoms,EXC_min,& & PDOS_j,PDOS_wfcs,PDOS_kinds,PDOS_l,PDOS_m,perturbative_SOC_path,PtsPath,r_hole,seed_name,& & SOC_bands_buffer,SOC_bands_to_map,SOC_split,state_ctl,AVE_exc,BSiq_via_command_line,& & WF_multiplier,WF_ref,what_to_write,BSiq,PROJECT_mode,PROJECT_N_perp,PROJECT_steps,PROJECT_threshold,& @@ -147,9 +147,11 @@ subroutine INIT_ypp_load(defs) call it(defs,'ElecTemp','Electronic Temperature',Tel,T_unit,verb_level=V_general) call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit,verb_level=V_general) ! - ! Electrons + ! Electrons/Exciton Occupations ! call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general) + call it(defs,'ExcMin' ,'Minimum excitonic energy',EXC_min,verb_level=V_general) + call it(defs,'EXCTemp','Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit,verb_level=V_general) ! ! DOS ! diff --git a/ypp/modules/mod_YPP.F b/ypp/modules/mod_YPP.F index 367ff5c7fb..2bd394624d 100644 --- a/ypp/modules/mod_YPP.F +++ b/ypp/modules/mod_YPP.F @@ -187,6 +187,7 @@ module YPPm real(SP) ::EXCITON_weight_treshold real(SP) ::WF_multiplier logical ::l_exc_occ_interp=.FALSE. + real(SP) ::EXC_min character(schlen) :: AVE_exc character(schlen) :: state_ctl integer :: EXCITONS_n_user_states=0 From 8352d72e21916c2b7330c235b1e8575daa954f54 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 10:31:49 +0200 Subject: [PATCH 0452/1367] Version 5.1.0, Revision 21986, Hash 21b6b9562 MODIFIED * include/driver/version.h ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Bugs: -Fixed Boltzman occupation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/interface/INIT_load_ypp.F | 2 +- ypp/interface/INIT_ypp.F | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f42c5ec05b..7f2eaa49e1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21986 -#define YAMBO_HASH "44edc4bf7" +#define YAMBO_REVISION 21987 +#define YAMBO_HASH "21b6b9562" diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 8981e4dab1..72fdf9d10c 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -150,7 +150,7 @@ subroutine INIT_ypp_load(defs) ! Electrons/Exciton Occupations ! call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general) - call it(defs,'ExcMin' ,'Minimum excitonic energy',EXC_min,verb_level=V_general) + call it(defs,'ExcMin' ,'Minimum excitonic energy',EXC_min,unit=E_unit,verb_level=V_general) call it(defs,'EXCTemp','Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit,verb_level=V_general) ! ! DOS diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 8709c84b9f..4e28abc5c1 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -705,6 +705,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif if (l_interp) then call initactivate(-1,"BSQindex") + call initactivate(1,"NelCond ExcMin EXCTemp") call initactivate(1,"INTERP_mode INTERP_Grid BANDS_steps cooIn cooOut") call initactivate(1,"PrtDOS DOSERange DOSESteps DOS_broad") endif From d6b535907d22787d9cf3536e74d23ed44ffb7996 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 10:50:28 +0200 Subject: [PATCH 0453/1367] Version 5.1.0, Revision 21987, Hash 8352d72e2 MODIFIED * config/mk/global/libraries.mk configure include/driver/version.h exc-ph/.objects exc-ph/EXC_occupations.F ypp/excitons/excitons_interpolate_setup.F Bugs: -Fixed configure Additions: - Changes: - Patch sent by: Claudio Attaccalite --- config/mk/global/libraries.mk | 4 +- configure | 7940 +++++++++------------ include/driver/version.h | 4 +- src/exc-ph/.objects | 3 + src/exc-ph/EXC_occupations.F | 3 +- ypp/excitons/excitons_interpolate_setup.F | 8 +- 6 files changed, 3552 insertions(+), 4410 deletions(-) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index d02dd02211..53343e1c14 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -70,8 +70,8 @@ YPP_BASIC_LIBS = modules interface qp plotting k-points symmetries bits elec YPP_BASIC_LIBS_LD = modules interface qp plotting k-points symmetries bits electrons dipoles YPP_LIBS = $(YPP_BASIC_LIBS) excitons YPP_LIBS_LD = $(YPP_BASIC_LIBS_LD) excitons -YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph excitons -YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph excitons +YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph exc-ph excitons +YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph exc-ph excitons YPPRT_LIBS = $(YPP_BASIC_LIBS) el-ph real_time excitons YPPRT_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph real_time excitons # diff --git a/configure b/configure index dea7854399..3bd97719ea 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21648 h.30d1f2f7f. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.21945 h.56d04a362. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,52 +187,42 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null -then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -222,21 +230,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,19 +255,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,7 +294,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -312,14 +311,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -334,7 +325,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -343,7 +334,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -382,13 +373,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -400,27 +390,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -432,9 +413,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -461,7 +442,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -505,7 +486,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -519,10 +500,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -536,13 +513,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -610,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.21648 h.30d1f2f7f' -PACKAGE_STRING='Yambo 5.1.0 r.21648 h.30d1f2f7f' +PACKAGE_VERSION='5.1.0 r.21945 h.56d04a362' +PACKAGE_STRING='Yambo 5.1.0 r.21945 h.56d04a362' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -619,36 +589,40 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir MPI_info @@ -799,7 +773,6 @@ FFLAGS F77 FPP CPPFLAGS_yambo -CPP IFLAG FCLIBS OPENMPLIBS @@ -828,9 +801,6 @@ AR MAKE ifGNUmake hostname -SIZEOF_INT_P -SET_MAKE -LIBOBJS host_os host_vendor host_cpu @@ -839,9 +809,15 @@ build_os build_vendor build_cpu build +SIZEOF_INT_P +SET_MAKE +LIBOBJS ALLOCA Y_BRANCH GIT_CHECK +EGREP +GREP +CPP OBJEXT EXEEXT ac_ct_CC @@ -1008,10 +984,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS UFLAGS -CPP FPP F77 FFLAGS @@ -1086,6 +1062,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1126,9 +1104,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1152,9 +1130,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1365,9 +1343,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1381,9 +1359,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1427,9 +1405,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1445,7 +1423,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1509,7 +1487,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1566,7 +1544,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.21648 h.30d1f2f7f to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.21945 h.56d04a362 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1632,7 +1610,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.21648 h.30d1f2f7f:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.21945 h.56d04a362:";; esac cat <<\_ACEOF @@ -1765,10 +1743,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags - CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1795,9 +1773,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1825,8 +1803,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1834,7 +1811,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1843,10 +1820,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.21648 h.30d1f2f7f -generated by GNU Autoconf 2.71 +Yambo configure 5.1.0 r.21945 h.56d04a362 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1863,14 +1840,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1878,15 +1855,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1896,6 +1872,176 @@ fi } # ac_fn_c_try_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------- ## +## Report this to yambo@yambo-code.org ## +## ----------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1903,28 +2049,26 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1936,17 +2080,16 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (ac_aggr.$3) @@ -1955,15 +2098,14 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -1972,19 +2114,18 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -1996,18 +2137,17 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2015,13 +2155,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2029,19 +2168,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2052,14 +2190,14 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2067,18 +2205,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2093,172 +2230,156 @@ fi } # ac_fn_c_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -} # ac_fn_c_try_run +#ifdef __STDC__ +# include +#else +# include +#endif -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +#undef $2 - ac_retval=1 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_fc_try_compile +} # ac_fn_c_check_func -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_fc_try_link +} # ac_fn_fc_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } -then : + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +} # ac_fn_fc_try_link # ac_fn_f77_try_compile LINENO # ---------------------------- @@ -2266,14 +2387,14 @@ fi ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2281,15 +2402,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2305,14 +2425,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2320,18 +2440,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2346,136 +2465,44 @@ fi } # ac_fn_f77_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.21648 h.30d1f2f7f, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by Yambo $as_me 5.1.0 r.21945 h.56d04a362, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2508,12 +2535,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2548,7 +2571,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2583,13 +2606,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2600,8 +2621,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2625,7 +2646,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2633,14 +2654,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2648,15 +2669,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2664,8 +2685,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2679,48 +2700,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2730,508 +2766,92 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/config" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -SVERSION="5" -SSUBVERSION="1" -SPATCHLEVEL="0" -SREVISION="21648" -SHASH="30d1f2f7f" +SVERSION="5" +SSUBVERSION="1" +SPATCHLEVEL="0" +SREVISION="21945" +SHASH="56d04a362" @@ -3250,6 +2870,34 @@ compdir=`echo "$PWD"` if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi # +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # @@ -3343,10 +2991,9 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test ${with_extlibs_path+y} -then : +if test "${with_extlibs_path+set}" = set; then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else $as_nop +else extlibs_path="${PWD}/lib/external" fi @@ -3357,8 +3004,7 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test ${enable_keep_objects+y} -then : +if test "${enable_keep_objects+set}" = set; then : enableval=$enable_keep_objects; fi @@ -3369,8 +3015,7 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test ${enable_keep_src+y} -then : +if test "${enable_keep_src+set}" = set; then : enableval=$enable_keep_src; fi @@ -3381,8 +3026,7 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test ${enable_keep_extlibs+y} -then : +if test "${enable_keep_extlibs+set}" = set; then : enableval=$enable_keep_extlibs; fi @@ -3400,8 +3044,7 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test ${enable_dp+y} -then : +if test "${enable_dp+set}" = set; then : enableval=$enable_dp; fi @@ -3417,8 +3060,7 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test ${enable_time_profile+y} -then : +if test "${enable_time_profile+set}" = set; then : enableval=$enable_time_profile; fi @@ -3434,8 +3076,7 @@ fi # USPP # # Check whether --enable-uspp was given. -if test ${enable_uspp+y} -then : +if test "${enable_uspp+set}" = set; then : enableval=$enable_uspp; fi @@ -3452,8 +3093,7 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test ${enable_memory_profile+y} -then : +if test "${enable_memory_profile+set}" = set; then : enableval=$enable_memory_profile; fi @@ -3469,8 +3109,7 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test ${enable_msgs_comps+y} -then : +if test "${enable_msgs_comps+set}" = set; then : enableval=$enable_msgs_comps; fi @@ -3487,10 +3126,9 @@ fi # # Check whether --with-editor was given. -if test ${with_editor+y} -then : +if test "${with_editor+set}" = set; then : withval=$with_editor; -else $as_nop +else with_editor="vim vi pico" fi @@ -3498,12 +3136,11 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_editor+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_editor+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3511,15 +3148,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3530,11 +3163,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -printf "%s\n" "$editor" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +$as_echo "$editor" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3549,10 +3182,9 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test ${with_echo+y} -then : +if test "${with_echo+set}" = set; then : withval=$with_echo; -else $as_nop +else with_echo="echo" fi @@ -3565,15 +3197,6 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3582,12 +3205,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3595,15 +3217,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3614,11 +3232,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3627,12 +3245,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3640,15 +3257,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3659,11 +3272,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3671,8 +3284,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3685,12 +3298,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3698,15 +3310,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3717,11 +3325,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3730,12 +3338,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3744,19 +3351,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3772,18 +3375,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3794,12 +3397,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3807,15 +3409,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3826,11 +3424,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3843,12 +3441,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3856,15 +3453,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3875,11 +3468,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3891,138 +3484,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4032,7 +3521,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4040,7 +3529,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4052,9 +3541,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4075,12 +3564,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4097,7 +3585,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4113,46 +3601,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4166,15 +3652,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4183,7 +3669,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4195,8 +3681,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4204,10 +3690,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4215,40 +3701,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4262,12 +3747,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4276,336 +3760,645 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -int -main (void) -{ -#ifndef __GNUC__ - choke me +#ifdef __STDC__ +# include +#else +# include #endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : - ; - return 0; -} +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test $ac_compiler_gnu = yes; then - GCC=yes + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 else - GCC= + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP fi -ac_test_CFLAGS=${CFLAGS+y} -ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi + ac_cv_header_stdc=no fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program +#include + _ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f conftest* + fi -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c99_program +#include + _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f conftest* + fi -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c89_program +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h +fi +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +done -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes; then : have_malloc_h=1 -else $as_nop +else have_malloc_h=0 fi + CFLAGS=$SAVE if test "$have_malloc_h" -ne 0 then ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include " -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes -then : - printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : + $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h fi @@ -5041,12 +4834,11 @@ esac Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT_CHECK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -5054,15 +4846,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5073,11 +4861,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -printf "%s\n" "$GIT_CHECK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +$as_echo "$GIT_CHECK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5088,63 +4876,45 @@ if test x"$GIT_CHECK" = x"yes" && test -f $srcdir/.gitignore; then fi -# -# Checks for library functions. -# ============================================================================ -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : - printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = xyes -then : - printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes -then : - printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h +# +# Checks for library functions. +# ============================================================================ +for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h -fi +done ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -printf %s "checking for working alloca.h... " >&6; } -if test ${ac_cv_working_alloca_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -5152,52 +4922,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes -else $as_nop +else ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -printf %s "checking for alloca... " >&6; } -if test ${ac_cv_func_alloca_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _MSC_VER +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER # include # define alloca _alloca # else -# ifdef __cplusplus -extern "C" -# endif +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); +# endif +# endif +# endif # endif #endif int -main (void) +main () { char *p = (char *) alloca (1); if (p) return 0; @@ -5205,22 +4975,20 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes -else $as_nop +else ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then -printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -5230,19 +4998,58 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + done +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -printf %s "checking stack direction for C alloca... " >&6; } -if test ${ac_cv_c_stack_direction+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5263,10 +5070,9 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 -else $as_nop +else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5274,24 +5080,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -printf "%s\n" "$ac_cv_c_stack_direction" >&6; } -printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __cplusplus @@ -5304,7 +5111,7 @@ main (void) /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. + /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5332,7 +5139,7 @@ main (void) iptr p = 0; ++p; } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5348,50 +5155,47 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes -else $as_nop +else ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -printf "%s\n" "#define const /**/" >>confdefs.h +$as_echo "#define const /**/" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5408,118 +5212,45 @@ _ACEOF ;; esac - - - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac +done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } -if test ${ac_cv_func_malloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac -else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif int -main (void) +main () { -void *p = malloc (0); - int result = !p; - free (p); - return result; +return ! malloc (0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop +else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5527,15 +5258,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5544,47 +5274,50 @@ else $as_nop esac -printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h +$as_echo "#define malloc rpl_malloc" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -printf %s "checking for GNU libc compatible realloc... " >&6; } -if test ${ac_cv_func_realloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; - esac -else $as_nop +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if ${ac_cv_func_realloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif int -main (void) +main () { -void *p = realloc (0, 0); - int result = !p; - free (p); - return result; +return ! realloc (0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop +else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5592,15 +5325,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5609,42 +5341,34 @@ else $as_nop esac -printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h +$as_echo "#define realloc rpl_realloc" >>confdefs.h fi -if test ${ac_cv_func_setvbuf_reversed+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_func_setvbuf_reversed+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_func_setvbuf_reversed=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -printf %s "checking whether lstat correctly handles trailing slash... " >&6; } -if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; - esac -else $as_nop + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5655,10 +5379,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop +else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5673,12 +5396,14 @@ fi rm -f conftest.sym conftest.file fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +_ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5690,21 +5415,19 @@ esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -printf %s "checking whether stat accepts an empty string... " >&6; } -if test ${ac_cv_func_stat_empty_string_bug+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +$as_echo_n "checking whether stat accepts an empty string... " >&6; } +if ${ac_cv_func_stat_empty_string_bug+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5712,10 +5435,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no -else $as_nop +else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5723,8 +5445,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5733,18 +5455,19 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STAT_EMPTY_STRING_BUG 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5760,20 +5483,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -printf %s "checking for the size of a pointer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +$as_echo_n "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5799,10 +5522,12 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define POINTER_SIZE ${ac_pointersize} +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -printf "%s\n" "${ac_pointersize} bytes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +$as_echo "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5818,12 +5543,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5831,15 +5555,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5850,11 +5570,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5863,12 +5583,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5876,15 +5595,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5895,11 +5610,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5907,8 +5622,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5921,12 +5636,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5934,15 +5648,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5953,11 +5663,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5966,12 +5676,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5980,19 +5689,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6008,18 +5713,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6030,12 +5735,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -6043,15 +5747,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6062,11 +5762,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6079,12 +5779,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -6092,15 +5791,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6111,11 +5806,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6127,138 +5822,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6268,21 +5859,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -6292,33 +5882,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -6327,212 +5913,159 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi - -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c89_program +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -6542,18 +6075,87 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu # +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + hostname=`uname -n` # ============================================================================ # GNU Make MAKE="make" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -printf %s "checking for GNU make... " >&6; } -if test ${_cv_gnu_make_command+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +$as_echo_n "checking for GNU make... " >&6; } +if ${_cv_gnu_make_command+:} false; then : + $as_echo_n "(cached) " >&6 +else _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; @@ -6564,14 +6166,14 @@ else $as_nop done ; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -printf "%s\n" "$_cv_gnu_make_command" >&6; } ; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +$as_echo "$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -printf "%s\n" "\"Not found\"" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +$as_echo "\"Not found\"" >&6; }; fi @@ -6593,12 +6195,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6606,15 +6207,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6625,11 +6222,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6638,12 +6235,11 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6651,15 +6247,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6670,11 +6262,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6682,8 +6274,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6701,8 +6293,7 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test ${enable_options_check+y} -then : +if test "${enable_options_check+set}" = set; then : enableval=$enable_options_check; fi @@ -6726,12 +6317,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6739,15 +6329,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6758,11 +6344,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -printf "%s\n" "$FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6775,12 +6361,11 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6788,15 +6373,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6807,11 +6388,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -printf "%s\n" "$ac_ct_FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6823,8 +6404,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6833,7 +6414,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6843,7 +6424,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6853,7 +6434,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6862,12 +6443,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 -printf %s "checking whether the compiler supports GNU Fortran... " >&6; } -if test ${ac_cv_fc_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6876,48 +6456,43 @@ else $as_nop end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+y} +ac_test_FCFLAGS=${FCFLAGS+set} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -printf %s "checking whether $FC accepts -g... " >&6; } -if test ${ac_cv_prog_fc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_g=yes -else $as_nop +else ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -printf "%s\n" "$ac_cv_prog_fc_g" >&6; } -if test $ac_test_FCFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6951,8 +6526,8 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -printf %s "checking if the current OS is supported... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +$as_echo_n "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6986,31 +6561,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -printf "%s\n" "$as_me: a guest account on this machine." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +$as_echo "$as_me: Platform <${host}> is not supported." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +$as_echo "$as_me: providing either a list of compilers and options or" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +$as_echo "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -7026,8 +6601,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test ${with_f90ext+y} -then : +if test "${with_f90ext+set}" = set; then : withval=$with_f90ext; fi @@ -7039,12 +6613,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -printf %s "checking for Fortran flag to compile .f90 files... " >&6; } -if test ${ac_cv_fc_srcext_f90+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -7060,18 +6633,17 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -7097,12 +6669,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -printf %s "checking for Fortran flag to compile .f files... " >&6; } -if test ${ac_cv_fc_srcext_f+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } +if ${ac_cv_fc_srcext_f+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -7118,18 +6689,17 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +$as_echo "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -7220,10 +6790,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -printf %s "checking for $FC kind and version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +$as_echo_n "checking for $FC kind and version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -7240,8 +6810,7 @@ printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test ${enable_debug_flags+y} -then : +if test "${enable_debug_flags+set}" = set; then : enableval=$enable_debug_flags; fi @@ -7627,35 +7196,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -printf %s "checking for specific $FC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +$as_echo_n "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -printf "%s\n" "$FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +$as_echo "$FCFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -printf "%s\n" "(User-defined) $FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +$as_echo "(User-defined) $FCFLAGS" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -printf %s "checking for specific Open-MP flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -printf "%s\n" "$OMPFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +$as_echo_n "checking for specific Open-MP flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +$as_echo "$OMPFLAGS" >&6; } # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -printf %s "checking for specific $CC flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -printf "%s\n" "$CFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +$as_echo_n "checking for specific $CC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +$as_echo "$CFLAGS" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -printf %s "checking for specific unoptimized flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +$as_echo_n "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -printf "%s\n" "$FCUFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +$as_echo "$FCUFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -printf "%s\n" "(User-defined) $UFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +$as_echo "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7666,10 +7235,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -printf %s "checking for specific NETCDF flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -printf "%s\n" "$NETCDFFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +$as_echo_n "checking for specific NETCDF flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +$as_echo "$NETCDFFLAGS" >&6; } # @@ -7691,8 +7260,7 @@ FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" # OpenMP # # Check whether --enable-open-mp was given. -if test ${enable_open_mp+y} -then : +if test "${enable_open_mp+set}" = set; then : enableval=$enable_open_mp; fi @@ -7714,19 +7282,17 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -printf %s "checking how to get verbose linking output from $FC... " >&6; } -if test ${ac_cv_prog_fc_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7744,13 +7310,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7817,24 +7383,23 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -printf "%s\n" "$ac_cv_prog_fc_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -printf %s "checking for Fortran libraries of $FC... " >&6; } -if test ${ac_cv_fc_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7853,13 +7418,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7936,10 +7501,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -7952,10 +7516,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -7970,24 +7533,9 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) - # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; esac ;; @@ -8005,7 +7553,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -8014,10 +7562,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -8032,17 +7579,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -8054,7 +7599,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -8069,8 +7614,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -printf "%s\n" "$ac_cv_fc_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -8085,12 +7630,11 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -printf %s "checking for dummy main to link with Fortran libraries... " >&6; } -if test ${ac_cv_fc_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -8113,20 +7657,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -8143,18 +7686,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -8167,24 +7709,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown -then : +if test "$FC_DUMMY_MAIN" != unknown; then : if test $FC_DUMMY_MAIN != none; then -printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -8199,12 +7742,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -printf %s "checking for Fortran name-mangling scheme... " >&6; } -if test ${ac_cv_fc_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -8213,8 +7755,7 @@ else $as_nop return end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -8235,6 +7776,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8245,18 +7789,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -8291,6 +7834,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8301,18 +7847,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -8342,17 +7887,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -printf "%s\n" "$ac_cv_fc_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8375,8 +7920,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8391,11 +7935,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -8406,7 +7949,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8414,8 +7957,7 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8430,11 +7972,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -8445,12 +7986,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -printf %s "checking for external C routine (test) naming scheme... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -printf "%s\n" "$msg" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +$as_echo "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8458,48 +7999,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8558,12 +8099,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } -if test ${ac_cv_fc_freeform+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } +if ${ac_cv_fc_freeform+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8578,18 +8118,17 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -printf "%s\n" "$ac_cv_fc_freeform" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +$as_echo "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8614,12 +8153,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -printf %s "checking fortran 90 modules inclusion flag... " >&6; } -if test ${ax_cv_f90_modflag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } +if ${ax_cv_f90_modflag+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8642,180 +8180,36 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do if test "$ax_cv_f90_modflag" = "not found" ; then ax_save_FCFLAGS="$FCFLAGS" FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i" - cat > conftest.$ac_ext <<_ACEOF - -!234567 - program conftest_program - use conftest_module - call conftest_routine - end program conftest_program - -_ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - ax_cv_f90_modflag="$ax_flag" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - FCFLAGS="$ax_save_FCFLAGS" - fi -done -rm -fr tmpdir_$i -if test "$ax_cv_f90_modflag" = "not found" ; then - as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -printf "%s\n" "$ax_cv_f90_modflag" >&6; } -IFLAG="$ax_cv_f90_modflag" -if test -z "$IFLAG" ; then IFLAG="-I" ; fi - -# -# ============================================================================ -# CPP check & flags -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext + cat > conftest.$ac_ext <<_ACEOF + +!234567 + program conftest_program + use conftest_module + call conftest_routine + end program conftest_program - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break +if ac_fn_fc_try_compile "$LINENO"; then : + ax_cv_f90_modflag="$ax_flag" fi -rm -f conftest.err conftest.i conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + FCFLAGS="$ax_save_FCFLAGS" + fi done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +rm -fr tmpdir_$i +if test "$ax_cv_f90_modflag" = "not found" ; then + as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5 fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8823,6 +8217,15 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +$as_echo "$ax_cv_f90_modflag" >&6; } +IFLAG="$ax_cv_f90_modflag" +if test -z "$IFLAG" ; then IFLAG="-I" ; fi + +# +# ============================================================================ +# CPP check & flags # case "${CPP}" in @@ -8871,8 +8274,8 @@ case "${CPP}" in esac # # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} # # TESTS #======= @@ -8889,8 +8292,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -printf %s "checking if C precompiler works on C source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +$as_echo_n "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8902,15 +8305,14 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : acx_C_ok=yes -else $as_nop +else CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -printf "%s\n" "$acx_C_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +$as_echo "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -8958,8 +8360,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -8968,8 +8370,8 @@ printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -printf %s "checking if FC precompiler works on FC source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +$as_echo_n "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -8996,8 +8398,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -printf "%s\n" "$acx_FC_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +$as_echo "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -9026,12 +8428,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -9039,15 +8440,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9058,11 +8455,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -printf "%s\n" "$F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +$as_echo "$F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9075,12 +8472,11 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -9088,15 +8484,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9107,11 +8499,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -printf "%s\n" "$ac_ct_F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9123,8 +8515,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -9133,7 +8525,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -9143,7 +8535,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -9153,7 +8545,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -9162,12 +8554,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 -printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } -if test ${ac_cv_f77_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } +if ${ac_cv_f77_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -9176,48 +8567,43 @@ else $as_nop end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+y} +ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -printf %s "checking whether $F77 accepts -g... " >&6; } -if test ${ac_cv_prog_f77_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } +if ${ac_cv_prog_f77_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes -else $as_nop +else ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -printf "%s\n" "$ac_cv_prog_f77_g" >&6; } -if test $ac_test_FFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -9243,24 +8629,23 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : - acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO"; then : + acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9328,8 +8713,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test ${enable_mpi+y} -then : +if test "${enable_mpi+set}" = set; then : enableval=$enable_mpi; fi @@ -9360,12 +8744,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9373,15 +8756,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9392,11 +8771,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9405,13 +8784,12 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9421,22 +8799,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIFC_test=$MPIFC -else $as_nop +else for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9444,15 +8820,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9463,11 +8835,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9483,23 +8855,22 @@ fi if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9519,11 +8890,10 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -printf %s "checking for a working mpif.h... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +$as_echo_n "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9534,23 +8904,21 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9561,22 +8929,20 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -printf %s "checking for a working mpi module... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +$as_echo_n "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9587,15 +8953,14 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi # # @@ -9607,12 +8972,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9643,13 +9008,12 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -printf %s "checking for $MPIF77... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +$as_echo_n "checking for $MPIF77... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9659,22 +9023,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIF77 -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9682,15 +9044,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9701,11 +9059,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9716,13 +9074,12 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9732,22 +9089,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIFC -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9755,15 +9110,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9774,11 +9125,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9793,12 +9144,11 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9806,15 +9156,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9825,11 +9171,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9843,23 +9189,22 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : ac_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9895,12 +9240,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9936,12 +9281,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9949,15 +9293,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9968,11 +9308,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9981,13 +9321,12 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -printf %s "checking for $MPICC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +$as_echo_n "checking for $MPICC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -9997,26 +9336,24 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else $as_nop +else for ac_prog in $MPICC mpipgicc mpiicc mpicc hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -10024,15 +9361,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10043,11 +9376,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10064,8 +9397,7 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes -then : +if test "x$ac_cv_func_MPI_Init" = xyes; then : acx_mpi_ok="yes" fi @@ -10080,8 +9412,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10094,22 +9426,21 @@ printf %s "checking for a working mpi.h... " >&6; } #endif #endif int -main (void) +main () { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; };acx_mpi_ok="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -10134,12 +9465,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -10178,10 +9509,10 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -printf %s "checking for MPI version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -printf "%s\n" "$MPIKIND" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +$as_echo_n "checking for MPI version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +$as_echo "$MPIKIND" >&6; } # @@ -10201,29 +9532,25 @@ fi # Check whether --with-mpi_libs was given. -if test ${with_mpi_libs+y} -then : +if test "${with_mpi_libs+set}" = set; then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test ${with_mpi_path+y} -then : +if test "${with_mpi_path+set}" = set; then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test ${with_mpi_libdir+y} -then : +if test "${with_mpi_libdir+set}" = set; then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test ${with_mpi_includedir+y} -then : +if test "${with_mpi_includedir+set}" = set; then : withval=$with_mpi_includedir; fi @@ -10299,13 +9626,12 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -10315,12 +9641,11 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : mpif_found_tmp="yes" -else $as_nop +else mpif_found_tmp="no" fi @@ -10615,10 +9940,9 @@ DRIVER_INCS="-I$PWD/lib/yambo/driver/include/ -I$PWD/include/driver" # # Check whether --with-yambo-libs-branch was given. -if test ${with_yambo_libs_branch+y} -then : +if test "${with_yambo_libs_branch+set}" = set; then : withval=$with_yambo_libs_branch; -else $as_nop +else with_yambo_libs_branch=none fi @@ -10640,8 +9964,7 @@ fi # # Check whether --enable-ydb was given. -if test ${enable_ydb+y} -then : +if test "${enable_ydb+set}" = set; then : enableval=$enable_ydb; fi @@ -10655,12 +9978,11 @@ if test "x$enable_ydb" = "xyes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -10668,15 +9990,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10687,11 +10005,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -printf "%s\n" "$GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +$as_echo "$GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10700,12 +10018,11 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10713,15 +10030,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10732,11 +10045,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -printf "%s\n" "$ac_ct_GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +$as_echo "$ac_ct_GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10744,8 +10057,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10757,14 +10070,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -printf %s "checking YDB from $url_ydb... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +$as_echo_n "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10774,8 +10087,8 @@ printf %s "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10789,19 +10102,17 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -printf %s "checking how to get verbose linking output from $F77... " >&6; } -if test ${ac_cv_prog_f77_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } +if ${ac_cv_prog_f77_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10819,13 +10130,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10892,24 +10203,23 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -printf "%s\n" "$ac_cv_prog_f77_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -printf %s "checking for Fortran 77 libraries of $F77... " >&6; } -if test ${ac_cv_f77_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +$as_echo "$ac_cv_prog_f77_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } +if ${ac_cv_f77_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10928,13 +10238,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -11011,10 +10321,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -11027,10 +10336,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" @@ -11045,24 +10353,9 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) - # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi + *cygwin*) ;; + *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; esac ;; @@ -11080,7 +10373,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -11089,10 +10382,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -11107,17 +10399,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -11129,7 +10419,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | + ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -11144,8 +10434,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -printf "%s\n" "$ac_cv_f77_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +$as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -11161,20 +10451,17 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test ${enable_int_linalg+y} -then : +if test "${enable_int_linalg+set}" = set; then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test ${enable_openmp_int_linalg+y} -then : +if test "${enable_openmp_int_linalg+set}" = set; then : enableval=$enable_openmp_int_linalg; fi @@ -11182,8 +10469,7 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi @@ -11208,23 +10494,22 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_blas_ok=yes -else $as_nop +else BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -printf "%s\n" "$acx_blas_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +$as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -11233,10 +10518,9 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi @@ -11245,12 +10529,11 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -printf %s "checking for ATL_xerbla in -latlas... " >&6; } -if test ${ac_cv_lib_atlas_ATL_xerbla+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } +if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11258,27 +10541,24 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes -else $as_nop +else ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -printf %s "checking for $caxpy in -lf77blas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11286,27 +10566,24 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -printf %s "checking for cblas_daxpy in -lcblas... " >&6; } -if test ${ac_cv_lib_cblas_cblas_daxpy+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } +if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11314,20 +10591,18 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_daxpy=yes -else $as_nop +else ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -11340,13 +10615,12 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11354,28 +10628,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -printf %s "checking for $daxpy in -ldaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11383,28 +10654,25 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -printf %s "checking for $caxpy in -lcaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11412,21 +10680,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -11438,13 +10704,12 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -printf %s "checking for $caxpy in -lcxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +$as_echo_n "checking for $caxpy in -lcxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11452,21 +10717,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -11474,13 +10737,12 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -printf %s "checking for $caxpy in -ldxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +$as_echo_n "checking for $caxpy in -ldxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11488,21 +10750,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -11511,12 +10771,11 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -printf %s "checking for acosp in -lsunmath... " >&6; } -if test ${ac_cv_lib_sunmath_acosp+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +$as_echo_n "checking for acosp in -lsunmath... " >&6; } +if ${ac_cv_lib_sunmath_acosp+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11524,27 +10783,24 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes -else $as_nop +else ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -printf %s "checking for $caxpy in -lsunperf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11552,21 +10808,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -11578,13 +10832,12 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -printf %s "checking for $caxpy in -lscs... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +$as_echo_n "checking for $caxpy in -lscs... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11592,21 +10845,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -11614,13 +10865,12 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11628,21 +10878,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -11650,13 +10898,12 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11664,28 +10911,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -printf %s "checking for $caxpy in -lessl... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +$as_echo_n "checking for $caxpy in -lessl... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11693,21 +10937,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -11723,13 +10965,12 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11737,33 +10978,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -printf %s "checking for $caxpy in -lmkl_gf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11771,21 +11009,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11797,13 +11033,12 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11811,33 +11046,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -printf %s "checking for $caxpy in -lmkl_intel... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11845,21 +11077,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11870,13 +11100,12 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11884,21 +11113,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11909,7 +11136,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h +$as_echo "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11919,12 +11146,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11961,12 +11188,11 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if test ${ac_cv_f77_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if ${ac_cv_f77_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -11997,20 +11223,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -12035,18 +11260,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -12059,24 +11283,25 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +$as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown -then : +if test "$F77_DUMMY_MAIN" != unknown; then : if test $F77_DUMMY_MAIN != none; then -printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define F77_DUMMY_MAIN $F77_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -12090,12 +11315,11 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } -if test ${ac_cv_f77_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } +if ${ac_cv_f77_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -12104,8 +11328,7 @@ else $as_nop return end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -12126,6 +11349,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -12144,18 +11370,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -12190,6 +11415,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -12208,18 +11436,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -12249,17 +11476,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -printf "%s\n" "$ac_cv_f77_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +$as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -12273,8 +11500,7 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test ${with_lapack_libs+y} -then : +if test "${with_lapack_libs+set}" = set; then : withval=$with_lapack_libs; fi @@ -12300,23 +11526,22 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_lapack_ok=yes -else $as_nop +else LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -printf "%s\n" "$acx_lapack_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +$as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -12326,10 +11551,9 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi @@ -12340,13 +11564,12 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -printf %s "checking for $cheev in -l$lapack... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +$as_echo_n "checking for $cheev in -l$lapack... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -12354,21 +11577,19 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -12400,23 +11621,22 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_dlaran_ok=yes -else $as_nop +else acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -printf "%s\n" "$acx_dlaran_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +$as_echo "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -12424,7 +11644,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h +$as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -12434,12 +11654,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -12462,60 +11682,52 @@ fi # Check whether --with-fft_libs was given. -if test ${with_fft_libs+y} -then : +if test "${with_fft_libs+set}" = set; then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test ${with_fft_path+y} -then : +if test "${with_fft_path+set}" = set; then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test ${with_fft_libdir+y} -then : +if test "${with_fft_libdir+set}" = set; then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test ${with_fft_includedir+y} -then : +if test "${with_fft_includedir+set}" = set; then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test ${enable_internal_fftqe+y} -then : +if test "${enable_internal_fftqe+set}" = set; then : enableval=$enable_internal_fftqe; -else $as_nop +else enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test ${enable_internal_fftsg+y} -then : +if test "${enable_internal_fftsg+set}" = set; then : enableval=$enable_internal_fftsg; -else $as_nop +else enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test ${enable_3d_fft+y} -then : +if test "${enable_3d_fft+set}" = set; then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test ${with_fftsg_fac+y} -then : +if test "${with_fftsg_fac+set}" = set; then : withval=$with_fftsg_fac; fi @@ -12540,10 +11752,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -12559,16 +11771,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -printf %s "checking for FFT Library using $with_fft_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } fi # # check for FFTW @@ -12631,24 +11843,22 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW="yes"; -else $as_nop +else HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW_OMP="yes"; -else $as_nop +else HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -12660,18 +11870,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -printf "%s\n" "FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +$as_echo "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -printf "%s\n" "FFTW3_OMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +$as_echo "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -printf "%s\n" "FFTW ($desc) " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +$as_echo "FFTW ($desc) " >&6; } fi else def_fft="" @@ -12686,8 +11896,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -12697,8 +11907,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -printf "%s\n" "FFTW no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +$as_echo "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -12708,31 +11918,30 @@ printf "%s\n" "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -printf %s "checking for dcft in $LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +$as_echo_n "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_ESSL=yes -else $as_nop +else HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -printf "%s\n" "$HAVE_ESSL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +$as_echo "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -12744,8 +11953,8 @@ printf %s "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -printf "%s\n" "ESSL FFT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +$as_echo "ESSL FFT" >&6; } fi fi # @@ -12754,8 +11963,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -12792,8 +12001,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +$as_echo "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12819,8 +12028,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -printf "%s\n" "FFTSG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +$as_echo "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12841,8 +12050,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -printf "%s\n" "Internal FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +$as_echo "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12856,48 +12065,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12906,7 +12115,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - printf "%s\n" "#define _FFTQE 1" >>confdefs.h + $as_echo "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12928,80 +12137,69 @@ fi # # Check whether --enable-slepc_linalg was given. -if test ${enable_slepc_linalg+y} -then : +if test "${enable_slepc_linalg+set}" = set; then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test ${with_slepc_libs+y} -then : +if test "${with_slepc_libs+set}" = set; then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test ${with_slepc_incs+y} -then : +if test "${with_slepc_incs+set}" = set; then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test ${with_slepc_path+y} -then : +if test "${with_slepc_path+set}" = set; then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test ${with_slepc_libdir+y} -then : +if test "${with_slepc_libdir+set}" = set; then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test ${with_slepc_includedir+y} -then : +if test "${with_slepc_includedir+set}" = set; then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test ${with_petsc_libs+y} -then : +if test "${with_petsc_libs+set}" = set; then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test ${with_petsc_incs+y} -then : +if test "${with_petsc_incs+set}" = set; then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test ${with_petsc_path+y} -then : +if test "${with_petsc_path+set}" = set; then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test ${with_petsc_libdir+y} -then : +if test "${with_petsc_libdir+set}" = set; then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test ${with_petsc_includedir+y} -then : +if test "${with_petsc_includedir+set}" = set; then : withval=$with_petsc_includedir; fi @@ -13025,12 +12223,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13039,6 +12236,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13057,29 +12257,27 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi @@ -13114,12 +12312,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -13162,24 +12360,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : petsc=yes -else $as_nop +else petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13192,8 +12389,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -printf %s "checking for internal Petsc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +$as_echo_n "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # @@ -13205,12 +12402,12 @@ printf %s "checking for internal Petsc library... " >&6; } petsc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; then compile_petsc="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_petsc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi # fi @@ -13237,12 +12434,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -13281,25 +12478,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : slepc=yes -else $as_nop +else slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13313,8 +12509,8 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -printf %s "checking for internal Slepc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +$as_echo_n "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # @@ -13324,12 +12520,12 @@ printf %s "checking for internal Slepc library... " >&6; } slepc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; then compile_slepc="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_slepc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -13353,22 +12549,19 @@ fi # Check whether --enable-par_linalg was given. -if test ${enable_par_linalg+y} -then : +if test "${enable_par_linalg+set}" = set; then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test ${with_blacs_libs+y} -then : +if test "${with_blacs_libs+set}" = set; then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test ${with_scalapack_libs+y} -then : +if test "${with_scalapack_libs+set}" = set; then : withval=$with_scalapack_libs; fi @@ -13450,23 +12643,22 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_blacs="yes" -else $as_nop +else enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -printf "%s\n" "$enable_blacs" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +$as_echo "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -13481,23 +12673,22 @@ printf "%s\n" "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_scalapack="yes" -else $as_nop +else enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -printf "%s\n" "$enable_scalapack" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +$as_echo "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -13571,29 +12762,25 @@ LIBS="$reset_LIBS" # # Check whether --with-hdf5_libs was given. -if test ${with_hdf5_libs+y} -then : +if test "${with_hdf5_libs+set}" = set; then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test ${with_hdf5_path+y} -then : +if test "${with_hdf5_path+set}" = set; then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test ${with_hdf5_libdir+y} -then : +if test "${with_hdf5_libdir+set}" = set; then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test ${with_hdf5_includedir+y} -then : +if test "${with_hdf5_includedir+set}" = set; then : withval=$with_hdf5_includedir; fi @@ -13601,8 +12788,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -13610,10 +12796,9 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test ${enable_hdf5_par_io+y} -then : +if test "${enable_hdf5_par_io+set}" = set; then : enableval=$enable_hdf5_par_io; -else $as_nop +else enable_hdf5_par_io="yes" fi @@ -13621,8 +12806,7 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test ${enable_hdf5_p2y_support+y} -then : +if test "${enable_hdf5_p2y_support+set}" = set; then : enableval=$enable_hdf5_p2y_support; fi @@ -13653,13 +12837,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -printf %s "checking for deflate in -lz ... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +$as_echo_n "checking for deflate in -lz ... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13668,6 +12851,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13686,39 +12872,36 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : use_libz="yes"; -else $as_nop +else use_libz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -printf %s "checking for deflate in -lsz... " >&6; } -if test ${ac_cv_lib_sz_deflate+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +$as_echo_n "checking for deflate in -lsz... " >&6; } +if ${ac_cv_lib_sz_deflate+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13727,6 +12910,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13745,38 +12931,35 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sz_deflate=yes -else $as_nop +else ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +$as_echo "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes; then : use_libsz="yes"; -else $as_nop +else use_libsz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13785,6 +12968,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13803,38 +12989,35 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -printf %s "checking for curl_version in -lcurl... " >&6; } -if test ${ac_cv_lib_curl_curl_version+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +$as_echo_n "checking for curl_version in -lcurl... " >&6; } +if ${ac_cv_lib_curl_curl_version+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13843,6 +13026,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13861,38 +13047,35 @@ char curl_version (); #endif #endif int -main (void) +main () { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_curl_version=yes -else $as_nop +else ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +$as_echo "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes; then : use_libcurl="yes"; -else $as_nop +else use_libcurl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -printf %s "checking for cos in -lm... " >&6; } -if test ${ac_cv_lib_m_cos+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13901,6 +13084,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -13919,29 +13105,27 @@ char cos (); #endif #endif int -main (void) +main () { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes -else $as_nop +else ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -printf "%s\n" "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : use_libm="yes"; -else $as_nop +else use_libm="no"; fi @@ -13985,8 +13169,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # if test x"$with_hdf5_libs" != "x" ; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 -printf %s "checking for HDF5 using $with_hdf5_libs... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 +$as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; try_HDF5_LIBS="$with_hdf5_libs" ; if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi # @@ -14007,13 +13191,12 @@ printf %s "checking for HDF5 using $with_hdf5_libs... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -14023,8 +13206,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # # Automatic detection of hdf5 libs copied from QE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -14070,23 +13253,22 @@ printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -printf %s "checking for HDF5 using automatic library list... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -14126,13 +13308,12 @@ printf %s "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -14144,13 +13325,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -printf "%s\n" "yes - parallel lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +$as_echo "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -printf "%s\n" "yes - serial lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +$as_echo "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -14158,13 +13339,13 @@ printf "%s\n" "yes - serial lib found" >&6; } ; fi # if test "x$hdf5" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; - if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -printf %s "checking for internal HDF5 library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +$as_echo_n "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -14180,8 +13361,8 @@ printf %s "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -14189,8 +13370,8 @@ printf "%s\n" "already compiled" >&6; } ; IO_LIB_VER="parallel"; HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14199,8 +13380,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14257,58 +13438,50 @@ fi # Check whether --with-netcdf_libs was given. -if test ${with_netcdf_libs+y} -then : +if test "${with_netcdf_libs+set}" = set; then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test ${with_netcdf_path+y} -then : +if test "${with_netcdf_path+set}" = set; then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test ${with_netcdf_libdir+y} -then : +if test "${with_netcdf_libdir+set}" = set; then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test ${with_netcdf_includedir+y} -then : +if test "${with_netcdf_includedir+set}" = set; then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test ${with_netcdff_libs+y} -then : +if test "${with_netcdff_libs+set}" = set; then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test ${with_netcdff_path+y} -then : +if test "${with_netcdff_path+set}" = set; then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test ${with_netcdff_libdir+y} -then : +if test "${with_netcdff_libdir+set}" = set; then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test ${with_netcdff_includedir+y} -then : +if test "${with_netcdff_includedir+set}" = set; then : withval=$with_netcdff_includedir; fi @@ -14316,8 +13489,7 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test ${enable_netcdf_classic+y} -then : +if test "${enable_netcdf_classic+set}" = set; then : enableval=$enable_netcdf_classic; fi @@ -14325,8 +13497,7 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test ${enable_netcdf_par_io+y} -then : +if test "${enable_netcdf_par_io+set}" = set; then : enableval=$enable_netcdf_par_io; fi @@ -14334,8 +13505,7 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test ${enable_netcdf_v3+y} -then : +if test "${enable_netcdf_v3+set}" = set; then : enableval=$enable_netcdf_v3; fi @@ -14343,8 +13513,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -14352,8 +13521,7 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test ${enable_netcdf_output+y} -then : +if test "${enable_netcdf_output+set}" = set; then : enableval=$enable_netcdf_output; fi @@ -14391,10 +13559,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -14457,8 +13625,8 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi if test -d "$with_pnetcdf_includedir" ; then try_PNETCDF_INCS="$IFLAG$with_pnetcdf_includedir" ; fi @@ -14466,8 +13634,8 @@ printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; try_PNETCDF_LIBS="$with_pnetcdf_libs" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # fi # @@ -14492,17 +13660,16 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; @@ -14510,8 +13677,8 @@ printf "%s\n" "yes" >&6; } ; PNETCDF_INCS="$try_PNETCDF_INCS" ; PNETCDF_LIBS="$try_PNETCDF_LIBS" ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -14522,8 +13689,8 @@ printf "%s\n" "no" >&6; } ; # # internal netcdf # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -printf %s "checking for internal NetCDF library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +$as_echo_n "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -14557,22 +13724,22 @@ printf %s "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PATH}/lib/libpnetcdf.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi fi # @@ -14607,13 +13774,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -14621,8 +13787,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; # fi # @@ -14630,11 +13796,11 @@ printf "%s\n" "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -printf %s "checking for internal NETCDF library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +$as_echo_n "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -14653,8 +13819,8 @@ printf %s "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -14664,8 +13830,8 @@ printf "%s\n" "already compiled" >&6; } ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14674,8 +13840,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14767,37 +13933,32 @@ fi # Check whether --enable-yaml_output was given. -if test ${enable_yaml_output+y} -then : +if test "${enable_yaml_output+set}" = set; then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test ${with_yaml_libs+y} -then : +if test "${with_yaml_libs+set}" = set; then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test ${with_yaml_includedir+y} -then : +if test "${with_yaml_includedir+set}" = set; then : withval=$with_yaml_includedir; fi @@ -14806,29 +13967,25 @@ fi # Check whether --with-futile_libs was given. -if test ${with_futile_libs+y} -then : +if test "${with_futile_libs+set}" = set; then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test ${with_futile_includedir+y} -then : +if test "${with_futile_includedir+set}" = set; then : withval=$with_futile_includedir; fi @@ -14851,10 +14008,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14873,55 +14030,55 @@ printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -printf %s "checking for internal YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +$as_echo_n "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_yaml="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -printf %s "checking for YAML library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +$as_echo_n "checking for YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14945,10 +14102,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -14967,55 +14124,55 @@ printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -printf %s "checking for internal FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +$as_echo_n "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_futile="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -printf %s "checking for FUTILE library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +$as_echo_n "checking for FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -15041,38 +14198,33 @@ fi # Check whether --enable-iotk was given. -if test ${enable_iotk+y} -then : +if test "${enable_iotk+set}" = set; then : enableval=$enable_iotk; -else $as_nop +else enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test ${with_iotk_libs+y} -then : +if test "${with_iotk_libs+set}" = set; then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test ${with_iotk_path+y} -then : +if test "${with_iotk_path+set}" = set; then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test ${with_iotk_libdir+y} -then : +if test "${with_iotk_libdir+set}" = set; then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test ${with_iotk_includedir+y} -then : +if test "${with_iotk_includedir+set}" = set; then : withval=$with_iotk_includedir; fi @@ -15093,10 +14245,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -15116,38 +14268,38 @@ printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir_src" IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" IOTK_LIBS="$try_iotk_libdir/libiotk.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -printf %s "checking for internal IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +$as_echo_n "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" @@ -15155,21 +14307,21 @@ printf %s "checking for internal IOTK library... " >&6; } if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -printf %s "checking for IOTK library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +$as_echo_n "checking for IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # PW_VER="no-hdf5-support" @@ -15197,38 +14349,33 @@ fi # Check whether --enable-etsf_io was given. -if test ${enable_etsf_io+y} -then : +if test "${enable_etsf_io+set}" = set; then : enableval=$enable_etsf_io; -else $as_nop +else enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test ${with_etsf_io_libs+y} -then : +if test "${with_etsf_io_libs+set}" = set; then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test ${with_etsf_io_path+y} -then : +if test "${with_etsf_io_path+set}" = set; then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test ${with_etsf_io_libdir+y} -then : +if test "${with_etsf_io_libdir+set}" = set; then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test ${with_etsf_io_includedir+y} -then : +if test "${with_etsf_io_includedir+set}" = set; then : withval=$with_etsf_io_includedir; fi @@ -15255,10 +14402,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -15277,50 +14424,50 @@ printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # # internal ETSF_IO # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -printf %s "checking for internal ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +$as_echo_n "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -printf "%s\n" "found already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +$as_echo "found already compiled" >&6; } else compile_etsf="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } fi fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -printf %s "checking for ETSF_IO Library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +$as_echo_n "checking for ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # @@ -15338,29 +14485,25 @@ compile_libxc=yes # Check whether --with-libxc_libs was given. -if test ${with_libxc_libs+y} -then : +if test "${with_libxc_libs+set}" = set; then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test ${with_libxc_path+y} -then : +if test "${with_libxc_path+set}" = set; then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test ${with_libxc_libdir+y} -then : +if test "${with_libxc_libdir+set}" = set; then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test ${with_libxc_includedir+y} -then : +if test "${with_libxc_includedir+set}" = set; then : withval=$with_libxc_includedir; fi @@ -15381,8 +14524,8 @@ LIBXC_INCS="$IFLAG$libxc_incdir" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -printf %s "checking for libxc... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +$as_echo_n "checking for libxc... " >&6; } testprog=" program main @@ -15402,11 +14545,10 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15417,11 +14559,10 @@ if test x"$acx_libxc_ok" = xno && test ! -z "$with_libxc_libs" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15432,11 +14573,10 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15447,11 +14587,10 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15527,71 +14666,66 @@ if test x"$acx_libxc_ok" = xyes; then cat > conftest.$ac_ext <<_ACEOF $testprog_11 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=110, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_12 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_20 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=200, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_203 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=203, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_21 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=210, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_4x _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=400, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_5x _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=5, acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBXC_VERSION $acx_libxc_version +_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi if test x"$acx_libxc_ok" = xyes; then @@ -15599,7 +14733,7 @@ if test x"$acx_libxc_ok" = xyes; then internal_libxc=no # -printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h +$as_echo "#define HAVE_LIBXC 1" >>confdefs.h fi @@ -15611,12 +14745,12 @@ if test x"$acx_libxc_ok" = xno; then LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } else compile_libxc="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } fi fi @@ -15632,15 +14766,13 @@ LIBS="$acx_libxc_save_LIBS" # # Check whether --enable-cuda was given. -if test ${enable_cuda+y} -then : +if test "${enable_cuda+set}" = set; then : enableval=$enable_cuda; fi # # Check whether --enable-nvtx was given. -if test ${enable_nvtx+y} -then : +if test "${enable_nvtx+set}" = set; then : enableval=$enable_nvtx; fi @@ -15666,41 +14798,41 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" # cc60 for Pascal cards (eg P100) # cc70 for Volta cards (eg V100) # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 -printf %s "checking for CUDA support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 +$as_echo_n "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -printf "%s\n" "$CUDA_FLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +$as_echo "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -printf "%s\n" "$CUDA_FLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +$as_echo "$CUDA_FLAGS" >&6; } fi # if test x"$enable_cuda" = "x" -o x"$enable_cuda" = "xno" ; then enable_nvtx=no def_cuda="" CUDA_FLAGS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 -printf %s "checking for NVTX support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 +$as_echo_n "checking for NVTX support... " >&6; } if ! test x"$enable_nvtx" = "xno" ; then if test x"$enable_nvtx" = "xyes" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -lnvToolsExt" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif ! test x"$enable_nvtx" = "x" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi # @@ -15967,8 +15099,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -15998,15 +15130,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -16020,8 +15152,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -16038,7 +15170,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -16054,8 +15186,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -16078,16 +15210,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -16097,46 +15227,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -16145,6 +15275,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -16153,12 +15290,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -16170,10 +15303,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -16186,14 +15339,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -16220,20 +15372,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -16245,13 +15395,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -16282,7 +15431,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -16304,10 +15453,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -16321,12 +15466,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -16368,7 +15507,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -16377,7 +15516,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16439,8 +15578,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.21648 h.30d1f2f7f, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by Yambo $as_me 5.1.0 r.21945 h.56d04a362, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16498,16 +15637,14 @@ $config_headers Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.21648 h.30d1f2f7f -configured by $0, generated by GNU Autoconf 2.71, +Yambo config.status 5.1.0 r.21945 h.56d04a362 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -16544,15 +15681,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -16560,7 +15697,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -16569,7 +15706,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -16597,7 +15734,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -16611,7 +15748,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -16651,8 +15788,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -16988,7 +16125,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -16996,17 +16133,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -17023,7 +16160,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17047,9 +16184,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -17102,8 +16239,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -17145,9 +16282,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -17163,20 +16300,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -17217,8 +16354,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -17376,4 +16513,3 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi - diff --git a/include/driver/version.h b/include/driver/version.h index 7f2eaa49e1..02b008b3f9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21987 -#define YAMBO_HASH "21b6b9562" +#define YAMBO_REVISION 21988 +#define YAMBO_HASH "8352d72e2" diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 3214e36ad6..88acd9a6a9 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -3,4 +3,7 @@ EQ_objs = EXCPH_gkkp_eval_ber.o EXCPH_gkkp_eval_pal.o EXCPH_gkkp_driver.o EXCPH_ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o EXC_occupations.o #endif +#if defined _YPP_ELPH +EQ_objs = EXC_occupations.o +#endif objs = ${EQ_objs} diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F index d772b4d08f..3a63e57355 100644 --- a/src/exc-ph/EXC_occupations.F +++ b/src/exc-ph/EXC_occupations.F @@ -23,7 +23,7 @@ ! ! Excitonic occupation, following PRB 99, 081109(R) 2019 ! -subroutine EXC_occupation(E_QF,k,EXC_n_states,EXC_indexes,EXC_occ) +subroutine EXC_occupations(E_QF,k,EXC_n_states,EXC_indexes,EXC_occ) ! use pars, ONLY:SP,cZERO,rZERO,cONE use electrons, ONLY:levels,spin_occ @@ -62,6 +62,7 @@ subroutine EXC_occupation(E_QF,k,EXC_n_states,EXC_indexes,EXC_occ) ik_minus_iq_ibz = k%sstar(ik_minus_iq_bz,1) ! el_occ=E_qf%f(ic,ik_ibz,1)*(spin_occ-E_qf%f(iv,ik_minus_iq_ibz,1)) + write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ ! do i_c=1,EXCITONS_n_user_states i_l=EXCITONS_user_indexes(i_c) diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 9a70961f4e..645459b222 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -31,7 +31,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, use electrons, ONLY:levels,nel_cond,E_reset use interpolate, ONLY:INTERPOLATION_BZ,INTERP_obj,INTERPOLATION_coefficients use YPPm, ONLY:BS_E,EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out,K_transform,& -& l_exc_occ_interp +& l_exc_occ_interp,EXCITONS_user_indexes,EXCITONS_n_user_states use com, ONLY:msg use stderr, ONLY:intc ! @@ -79,8 +79,10 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, ! if(l_exc_occ_interp) then call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) -#if defined _YPP_PH - call EXC_occupations(E_QF,Xk,EXC_n_user_states,EXC_user_indexes,EXC_occ(:,iq)) +#if defined _YPP_ELPH + call EXC_occupations(E_QF,Xk,EXCITONS_user_indexes,EXCITONS_n_user_states,EXC_occ(:,iq)) + write(*,*) ' exc occ ',EXC_occ(:,iq) + stop #endif else call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) From be93f9f9d6ccaf982bae0368805319c3277aeced Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 11:44:06 +0200 Subject: [PATCH 0454/1367] Version 5.1.0, Revision 21988, Hash d6b535907 MODIFIED * config/mk/global/actions/compile_ypp.mk config/mk/global/libraries.mk include/driver/version.h exc-ph/EXC_occupations.F Bugs: -Fixed compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- config/mk/global/actions/compile_ypp.mk | 4 +++- config/mk/global/libraries.mk | 6 ++++-- include/driver/version.h | 4 ++-- src/exc-ph/EXC_occupations.F | 16 +++++++++------- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/config/mk/global/actions/compile_ypp.mk b/config/mk/global/actions/compile_ypp.mk index ffc0ada090..1f98d30162 100644 --- a/config/mk/global/actions/compile_ypp.mk +++ b/config/mk/global/actions/compile_ypp.mk @@ -26,8 +26,10 @@ else ifneq (,$(findstring ypp_rt,$(MAKECMDGOALS))) YPP_SRC_LIBS=$(YPPRT_LIBS) YPP_EXE_LIBS=$(YPPRT_LIBS_LD) else ifneq (,$(findstring ypp_ph,$(MAKECMDGOALS))) - Y_PRECMP=-D_ELPH + Y_PRECMP=-D_ELPH -D_YPP_ELPH YPP_PRECMP=-D_YPP_ELPH + Y_SRC_LIBS=$(YPPPH_MAIN_LIBS) + Y_EXE_LIBS=$(YPPPH_MAIN_LIBS_LD) YPP_SRC_LIBS=$(YPPPH_LIBS) YPP_EXE_LIBS=$(YPPPH_LIBS_LD) else ifneq (,$(findstring ypp_nl,$(MAKECMDGOALS))) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 53343e1c14..564cd83018 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -70,8 +70,8 @@ YPP_BASIC_LIBS = modules interface qp plotting k-points symmetries bits elec YPP_BASIC_LIBS_LD = modules interface qp plotting k-points symmetries bits electrons dipoles YPP_LIBS = $(YPP_BASIC_LIBS) excitons YPP_LIBS_LD = $(YPP_BASIC_LIBS_LD) excitons -YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph exc-ph excitons -YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph exc-ph excitons +YPPPH_LIBS = $(YPP_BASIC_LIBS) el-ph excitons +YPPPH_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph excitons YPPRT_LIBS = $(YPP_BASIC_LIBS) el-ph real_time excitons YPPRT_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph real_time excitons # @@ -79,6 +79,8 @@ YPPRT_LIBS_LD = $(YPP_BASIC_LIBS_LD) el-ph real_time excitons # YPP_MAIN_LIBS = $(BASIC_LIBS) interpolate qp_control setup interface tddft dipoles pol_function qp bse YPP_MAIN_LIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup interface tddft dipoles pol_function qp bse +YPPPH_MAIN_LIBS = $(YPP_MAIN_LIBS) el-ph exc-ph +YPPPH_MAIN_LIBS_LD = $(YPP_MAIN_LIBS_LD) el-ph exc-ph YPPSC_MAIN_LIBS = $(YPP_MAIN_LIBS) collisions hamiltonian sc YPPSC_MAIN_LIBS_LD = $(YPP_MAIN_LIBS_LD) collisions hamiltonian sc YPPRT_MAIN_LIBS = $(BASIC_LIBS) real_time_control interpolate qp_control setup interface \ diff --git a/include/driver/version.h b/include/driver/version.h index 02b008b3f9..208254f586 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21988 -#define YAMBO_HASH "8352d72e2" +#define YAMBO_REVISION 21989 +#define YAMBO_HASH "d6b535907" diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F index 3a63e57355..7d1d9f9229 100644 --- a/src/exc-ph/EXC_occupations.F +++ b/src/exc-ph/EXC_occupations.F @@ -23,25 +23,26 @@ ! ! Excitonic occupation, following PRB 99, 081109(R) 2019 ! -subroutine EXC_occupations(E_QF,k,EXC_n_states,EXC_indexes,EXC_occ) +subroutine EXC_occupations(E_QF,k,q,iq_ibz,EXC_n_states,EXC_indexes,EXC_occ) ! use pars, ONLY:SP,cZERO,rZERO,cONE use electrons, ONLY:levels,spin_occ + use R_lattice, ONLY:qindx_C use R_lattice, ONLY:bz_samp use BS, ONLY:BS_H_dim,BS_bands - use BS_solvers, ONLY:BSS_eh_table + use BS_solvers, ONLY:BSS_eh_table,BS_mat ! #include ! type(levels), intent(in) :: E_QF - type(bz_samp),intent(in) :: k - integer, intent(in) :: EXC_n_states + type(bz_samp),intent(in) :: k,q + integer, intent(in) :: EXC_n_states,iq_ibz integer, intent(in) :: EXC_indexes(EXC_n_states) real(SP), intent(out) :: EXC_occ(EXC_n_states) ! ! Work space ! - integer :: i_H,iv,ic,ik_bz,ik_ibz,ik_minus_iq_bz,ik_minus_iq_ibz + integer :: i_H,iv,ic,i_l,i_c,ik_bz,ik_ibz,ik_minus_iq_bz,ik_minus_iq_ibz,iq_bz real(SP) :: el_occ ! EXC_occ=rZERO @@ -58,14 +59,15 @@ subroutine EXC_occupations(E_QF,k,EXC_n_states,EXC_indexes,EXC_occ) ! ! In the BSE at finite q we connect (v, k-q) ==> (c, k) ! + iq_bz = q%k_table(iq_ibz,1) ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz ik_minus_iq_ibz = k%sstar(ik_minus_iq_bz,1) ! el_occ=E_qf%f(ic,ik_ibz,1)*(spin_occ-E_qf%f(iv,ik_minus_iq_ibz,1)) write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ ! - do i_c=1,EXCITONS_n_user_states - i_l=EXCITONS_user_indexes(i_c) + do i_c=1,EXC_n_states + i_l=EXC_indexes(i_c) EXC_occ(i_c)=EXC_occ(i_c)+abs(BS_mat(i_H,i_l))**2*el_occ enddo ! From 364d92a1ab2a5e289f055cfcc37af9cabf6c3570 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 13:45:37 +0200 Subject: [PATCH 0455/1367] Version 5.1.0, Revision 21989, Hash be93f9f9d MODIFIED * include/driver/version.h ypp/excitons/excitons_interpolate_setup.F Bugs: -Fixed many bugs but not all Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/excitons/excitons_interpolate_setup.F | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 208254f586..22e57a623d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21989 -#define YAMBO_HASH "d6b535907" +#define YAMBO_REVISION 21990 +#define YAMBO_HASH "be93f9f9d" diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 645459b222..e8bce7c148 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -62,6 +62,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, l_exc_occ_interp=.TRUE. call E_reset(E_QF) call OCCUPATIONS_Quasi_Fermi(Xen,Xk,E_QF,E_fermi_h,E_fermi_e) + if(.not.allocated(q%k_table)) call k_build_up_BZ_tables(q) #if defined _YPP_ELPH YAMBO_ALLOC(EXC_occ,(EXCITONS_n_user_states,q%nibz)) #else @@ -80,9 +81,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, if(l_exc_occ_interp) then call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) #if defined _YPP_ELPH - call EXC_occupations(E_QF,Xk,EXCITONS_user_indexes,EXCITONS_n_user_states,EXC_occ(:,iq)) - write(*,*) ' exc occ ',EXC_occ(:,iq) - stop + call EXC_occupations(E_QF,Xk,q,iq,EXCITONS_user_indexes,EXCITONS_n_user_states,EXC_occ(:,iq)) #endif else call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) From 27b2ec3e3737e0af36d9b52b92c8508f9fa0e217 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 13:54:39 +0200 Subject: [PATCH 0456/1367] Version 5.1.0, Revision 21990, Hash 364d92a1a MODIFIED * include/driver/version.h ypp/excitons/excitons_interpolate_setup.F Additions: -Added load of qindx_C Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/excitons/excitons_interpolate_setup.F | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 22e57a623d..e79ce7cb07 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21990 -#define YAMBO_HASH "be93f9f9d" +#define YAMBO_REVISION 21991 +#define YAMBO_HASH "364d92a1a" diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index e8bce7c148..604044f1d8 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -27,12 +27,14 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, ! use pars, ONLY:SP,schlen,rZERO use units, ONLY:HA2EV - use R_lattice, ONLY:bz_samp + use R_lattice, ONLY:bz_samp,coll_scattering,qindx_C use electrons, ONLY:levels,nel_cond,E_reset use interpolate, ONLY:INTERPOLATION_BZ,INTERP_obj,INTERPOLATION_coefficients use YPPm, ONLY:BS_E,EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out,K_transform,& & l_exc_occ_interp,EXCITONS_user_indexes,EXCITONS_n_user_states use com, ONLY:msg + use IO_int, ONLY:io_control + use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL use stderr, ONLY:intc ! #include @@ -44,12 +46,13 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, ! ! Work space ! - integer :: iq,i_c,i_l,io_err + integer :: iq,i_c,i_l,io_err,ID real(SP), allocatable :: BS_all_E(:,:) real(SP), allocatable :: EXC_occ(:,:) real(SP), allocatable :: values(:) real(SP) :: tmp_q(3),E_fermi_h,E_fermi_e character(schlen), allocatable :: headings(:) + integer, external ::io_QINDX ! ! Allocate arrays for all eigenvalues/eigenvectors ! @@ -63,6 +66,15 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, call E_reset(E_QF) call OCCUPATIONS_Quasi_Fermi(Xen,Xk,E_QF,E_fermi_h,E_fermi_e) if(.not.allocated(q%k_table)) call k_build_up_BZ_tables(q) + if(.not.allocated(qindx_C)) then + if(coll_scattering.eqv..FALSE.) call error('Please run again the setup with: K_grids= "X B C S" ') + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) + io_err=io_QINDX(k,q,ID) + if (io_err/=0) then + call msg('s',"Missing k/q scattering database") + call error('Please (re)run the setup K_grids="C"') + endif + endif #if defined _YPP_ELPH YAMBO_ALLOC(EXC_occ,(EXCITONS_n_user_states,q%nibz)) #else From 2886df73d07ca7330059b1e66bdc662683afc01d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 14:03:07 +0200 Subject: [PATCH 0457/1367] Version 5.1.0, Revision 21991, Hash 27b2ec3e3 MODIFIED * include/driver/version.h exc-ph/EXC_occupations.F Additions: -More tests are needed Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_occupations.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e79ce7cb07..6143877966 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21991 -#define YAMBO_HASH "364d92a1a" +#define YAMBO_REVISION 21992 +#define YAMBO_HASH "27b2ec3e3" diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F index 7d1d9f9229..f50d587dec 100644 --- a/src/exc-ph/EXC_occupations.F +++ b/src/exc-ph/EXC_occupations.F @@ -64,7 +64,7 @@ subroutine EXC_occupations(E_QF,k,q,iq_ibz,EXC_n_states,EXC_indexes,EXC_occ) ik_minus_iq_ibz = k%sstar(ik_minus_iq_bz,1) ! el_occ=E_qf%f(ic,ik_ibz,1)*(spin_occ-E_qf%f(iv,ik_minus_iq_ibz,1)) - write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ +! write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ ! do i_c=1,EXC_n_states i_l=EXC_indexes(i_c) From ad90418510720e8d41bd8778c27657a8a6de77b1 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 12 Oct 2022 18:01:37 +0200 Subject: [PATCH 0458/1367] Version 5.1.0, Revision 21992, Hash 2886df73d MODIFIED * include/driver/version.h exc-ph/EXC_occupations.F ypp/excitons/excitons_interpolate_setup.F Additions: -Work in progress Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXC_occupations.F | 3 ++- ypp/excitons/excitons_interpolate_setup.F | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6143877966..4a4038bcdf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21992 -#define YAMBO_HASH "27b2ec3e3" +#define YAMBO_REVISION 21993 +#define YAMBO_HASH "2886df73d" diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F index f50d587dec..6b8817ded5 100644 --- a/src/exc-ph/EXC_occupations.F +++ b/src/exc-ph/EXC_occupations.F @@ -64,7 +64,7 @@ subroutine EXC_occupations(E_QF,k,q,iq_ibz,EXC_n_states,EXC_indexes,EXC_occ) ik_minus_iq_ibz = k%sstar(ik_minus_iq_bz,1) ! el_occ=E_qf%f(ic,ik_ibz,1)*(spin_occ-E_qf%f(iv,ik_minus_iq_ibz,1)) -! write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ +! if(iv==4.and.ic==5) write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ ! do i_c=1,EXC_n_states i_l=EXC_indexes(i_c) @@ -72,5 +72,6 @@ subroutine EXC_occupations(E_QF,k,q,iq_ibz,EXC_n_states,EXC_indexes,EXC_occ) enddo ! enddo +! write(*,*) iq_ibz,EXC_occ(:) ! end subroutine diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 604044f1d8..446c574458 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -93,7 +93,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, if(l_exc_occ_interp) then call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) #if defined _YPP_ELPH - call EXC_occupations(E_QF,Xk,q,iq,EXCITONS_user_indexes,EXCITONS_n_user_states,EXC_occ(:,iq)) + call EXC_occupations(E_QF,Xk,q,iq,EXCITONS_n_user_states,EXCITONS_user_indexes,EXC_occ(:,iq)) #endif else call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) From 30e8d729e7282b027cdc2ba1dbe0e6349bc4f436 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 13 Oct 2022 09:40:28 +0200 Subject: [PATCH 0459/1367] Version 5.1.0, Revision 21993, Hash ad9041851 MODIFIED * include/driver/version.h ypp/excitons/excitons_bands.F ypp/excitons/excitons_interpolate_setup.F Bugs: -Fixed small bugs Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/excitons/excitons_bands.F | 2 +- ypp/excitons/excitons_interpolate_setup.F | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4a4038bcdf..83b4051ee1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21993 -#define YAMBO_HASH "2886df73d" +#define YAMBO_REVISION 21994 +#define YAMBO_HASH "ad9041851" diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index f1c8273171..d596f9e506 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -229,7 +229,7 @@ subroutine print_BANDS() call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) ! if(l_exc_occ_interp) then - values(1+1:EXCITONS_n_user_states+1)=EXC_occ_interp(:,iq) + values(1+1:EXCITONS_n_user_states+1)=abs(EXC_occ_interp(:,iq)) values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q call msg('o '//trim(file_name2),' ',values,INDENT=0,USE_TABS=.true.) endif diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 446c574458..8d8031e5b6 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -146,7 +146,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,NK=q%nibz,ID=ID_INTERP_EXC,ID_obj=ID_INTERP_EXC) ! if(l_exc_occ_interp) then - INTERP_obj(ID_INTERP_EXC)%what="occupations" + INTERP_obj(ID_INTERP_OCC)%what="occupations" call INTERPOLATION_coefficients(R1D=EXC_occ,k=q,NK=q%nibz,ID=ID_INTERP_OCC,ID_obj=ID_INTERP_OCC) endif ! From 7817a9acb80fa4359c6e729a799cf8b4d2fa45c0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 13 Oct 2022 09:47:58 +0200 Subject: [PATCH 0460/1367] Version 5.1.0, Revision 21994, Hash 30e8d729e MODIFIED * include/driver/version.h interface/INIT_activate.F Additions: -Added NelCond in exciton-phonon optics -Interpolated occupation taken in absolute value Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 83b4051ee1..414fee5aac 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21994 -#define YAMBO_HASH "ad9041851" +#define YAMBO_REVISION 21995 +#define YAMBO_HASH "30e8d729e" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index a42c7733a0..7d55eadf79 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) & -& call initactivate(1,'BoseTemp ElPhModes EXCTemp EXCLongDr PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') +& call initactivate(1,'BoseTemp NelCond ElPhModes EXCTemp EXCLongDr PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') ! #endif ! From 16e2b7b454b002828a1ff387a82b64f191b203c4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 13 Oct 2022 10:02:39 +0200 Subject: [PATCH 0461/1367] Version 5.1.0, Revision 21995, Hash 7817a9acb MODIFIED * include/driver/version.h interface/INIT_load.F Additions: -Fixed input Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_load.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 414fee5aac..5ee9e0f6f9 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21995 -#define YAMBO_HASH "30e8d729e" +#define YAMBO_REVISION 21996 +#define YAMBO_HASH "7817a9acb" diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index d5cab2f0a9..651a525a69 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -209,7 +209,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'IkSigLim','[KPT] QP K-points indices range',QP_states_k,verb_level=V_kpt) call it(defs,'IkXLim', '[KPT] X grid last k-point index',nXkibz,verb_level=V_kpt) call it(defs,'Nelectro','Electrons number',nel,verb_level=V_general) - call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel,verb_level=V_general) + call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general) call it(defs,'ElecTemp','Electronic Temperature',Tel,T_unit,verb_level=V_general) call it(defs,'OccTresh','Occupation treshold (metallic bands)',filled_tresh,verb_level=V_general) #if defined _ELPH From 0f621b36275a122be48453451a0baf1c6c66cb31 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 13 Oct 2022 14:32:45 +0200 Subject: [PATCH 0462/1367] Version 5.1.0, Revision 21996, Hash 16e2b7b45 MODIFIED * include/driver/version.h interface/INIT_activate.F Bugs: -Fixed compilation with gfortran Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5ee9e0f6f9..5648aaa445 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21996 -#define YAMBO_HASH "7817a9acb" +#define YAMBO_REVISION 21997 +#define YAMBO_HASH "16e2b7b45" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 7d55eadf79..f02840731b 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -456,8 +456,10 @@ subroutine INIT_activate() ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') - if (l_EXCPH_optics) & -& call initactivate(1,'BoseTemp NelCond ElPhModes EXCTemp EXCLongDr PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + if (l_EXCPH_optics) then + call initactivate(1,'PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + call initactivate(1,'DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + endif ! #endif ! From 5699b5e8eaa09412cfc43bee27643c8137d58d64 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 13 Oct 2022 18:10:22 +0200 Subject: [PATCH 0463/1367] Version 5.1.0, Revision 21997, Hash 0f621b362 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Additions: -Added construction of excitonic occupations Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 38 ++++++++++++++++++++++++++++++-------- src/modules/mod_EXCPH.F | 4 ++++ 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5648aaa445..f33881929f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21997 -#define YAMBO_HASH "16e2b7b45" +#define YAMBO_REVISION 21998 +#define YAMBO_HASH "0f621b362" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 2e5971e1f7..9b84cc130b 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -26,13 +26,13 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! use units, ONLY:HA2EV - use pars, ONLY:SP,cZERO,schlen - use electrons, ONLY:levels + use pars, ONLY:SP,cZERO,schlen,rZERO + use electrons, ONLY:levels,nel_cond,E_reset use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use X_m, ONLY:X_t use com, ONLY:msg,of_open_close - use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R,BSE_alloc,BSE_free, & + use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & +& BS_R_left,BS_R_right,BS_R,BSE_alloc,BSE_free,EXC_occ, & & RESIDUALS_and_EIGENVALUES_free, RESIDUALS_and_EIGENVALUES_alloc, & & l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free use ELPH, ONLY:use_PH_DbGd,ph_modes @@ -52,10 +52,12 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=7 - real(SP) :: output_data(n_output) + real(SP) :: output_data(n_output),E_fermi_h,E_fermi_e character(schlen) :: headers(n_output) - integer :: iw,iq,i_alpha,max_filling + integer :: iw,iq,i_alpha,max_filling,EXC_n_sum,i_beta + integer, allocatable:: EXC_states(:) character(schlen) :: dbgd_string + type(levels) :: E_QF ! call section('*','EXCPH-Optics') ! @@ -90,9 +92,29 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! call EXC_dipole(k,E,q,X) ! + ! Excitonic occupation + ! + if(nel_cond/=rZERO) then + call msg('rs','Excitonic quasi-fermi distribution interpolation') + call E_reset(E_QF) + call OCCUPATIONS_Quasi_Fermi(E,k,E_QF,E_fermi_h,E_fermi_e) + EXC_n_sum=EXCPH_sum(2)-EXCPH_sum(1)+1 + YAMBO_ALLOC(EXC_occ,(EXC_n_sum,q%nibz)) + YAMBO_ALLOC(EXC_states,(EXC_n_sum)) + if(EXCPH_sum(1)/=1) call error("This part of the code does not work for ELPhExcSum(1)/=1") + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + EXC_states(i_beta)=i_beta + enddo + endif + ! do iq=1,q%nibz - call EXCPH_load_L(iq,X,'eigenvalues','Lout') - BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real + if(nel_cond/=rZERO) then + call EXCPH_load_L(iq,X,'load','Lout') + call EXC_occupations(E_QF,k,q,iq,EXC_n_sum,EXC_states,EXC_occ(:,iq)) + else + call EXCPH_load_L(iq,X,'eigenvalues','Lout') + endif + BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real enddo ! call parser('NoMatrxEl',l_no_matrix_elements) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index c152992662..f2c0491028 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -110,6 +110,10 @@ module EXCPH logical :: l_DbGd_PH_only ! Double-Grid only for phonon energies logical :: l_no_matrix_elements ! Set EXC-PH matrix elements to 1 (in lifetime and satellites) ! + ! Excitonic occupations + ! + real(SP), allocatable :: EXC_occ(:,:) + ! contains ! subroutine Sat_alloc() From 771101e0db5cf4673a970b98bc55a0488bef2907 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 13 Oct 2022 18:20:56 +0200 Subject: [PATCH 0464/1367] Version 5.1.0, Revision 21998, Hash 5699b5e8e MODIFIED * include/driver/version.h exc-ph/Satellite_Simple.F Additions: -Excitonic occupations in Satellite Simple Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/Satellite_Simple.F | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f33881929f..ebd4b9bfc6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21998 -#define YAMBO_HASH "0f621b362" +#define YAMBO_REVISION 21999 +#define YAMBO_HASH "5699b5e8e" diff --git a/src/exc-ph/Satellite_Simple.F b/src/exc-ph/Satellite_Simple.F index 43559776c3..31edda372e 100644 --- a/src/exc-ph/Satellite_Simple.F +++ b/src/exc-ph/Satellite_Simple.F @@ -37,11 +37,12 @@ subroutine Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! use frequency, ONLY:w_samp use units, ONLY:HA2CMm1 + use electrons, ONLY:nel_cond use R_lattice, ONLY:bz_samp use D_lattice, ONLY:nsym use pars, ONLY:SP,cZERO,rZERO use EXCPH, ONLY:BS_Sat_E,BS_Sat_WEIGHT,BS_all_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs,BS_E_in, & -& min_EXC_E,DB_Q_map +& min_EXC_E,DB_Q_map,EXC_occ use functions, ONLY:bose_f,boltzman_f use units, ONLY:HA2CMm1 use ELPH, ONLY:PH_freqs_sq,FAN_deltaE_treshold,Q_io_map @@ -79,6 +80,8 @@ subroutine Satellite_Simple(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss iq_ibz = q%sstar(iq_bz,1) boltzm_factor=boltzman_f(BS_all_E(i_beta,iq_ibz)-min_EXC_E) ! + if(nel_cond/=rZERO) boltzm_factor=EXC_occ(i_beta,iq_ibz) + ! pole=E_alpha+BS_Sat_E(il,i_beta,i_alpha) ! ! Phonon emission in absorption [photon absorption / phonon emission] From a0a21872b523ed3493a23b205223033d63aa37f6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Oct 2022 11:45:45 +0200 Subject: [PATCH 0465/1367] Version 5.1.0, Revision 21999, Hash 771101e0d MODIFIED * include/driver/version.h ypp/electrons/electrons_bands.F Bugs: -Fixed plotting bands without interpolation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/electrons/electrons_bands.F | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ebd4b9bfc6..551f848256 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21999 -#define YAMBO_HASH "5699b5e8e" +#define YAMBO_REVISION 22000 +#define YAMBO_HASH "771101e0d" diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 8c5e7d65c4..186f4918d5 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -59,7 +59,7 @@ subroutine electrons_bands(Xk,Xen) ! Work Space ! type(levels) :: GRID_E,CIRCUIT_E,CIRCUIT_dE,E_QF - integer :: ID_spin,ID_magn,ID_bands(3),IDs(5),nfiles(5),nqnt,ib,ID_occ,ik + integer :: ID_spin,ID_magn,ID_bands(3),IDs(5),nfiles(5),nqnt,ib,ID_occ,ik,prt_occ real(SP) :: dEf,E_fermi_e,E_fermi_h,E_h,E_e logical :: BANDS_built_in,BANDS_interpolated,GRID_interpolate #if defined _YPP_SC @@ -232,9 +232,12 @@ subroutine electrons_bands(Xk,Xen) ! if (BANDS_interpolated.and.BANDS_from_db) call plot_interpolated_values & & (Xk,Xen,dEf,CIRCUIT_k,IDs(1:1), BANDS_bands,1, nfiles(1:1), "from_DB", "bands",0) + ! + prt_occ=0 + if(nel_cond/=rZERO) prt_occ=1 ! if(BANDS_interpolated ) call plot_interpolated_values & -& (Xk,Xen,dEf,CIRCUIT_k,IDs(1:nqnt),BANDS_bands,nqnt,nfiles(1:nqnt),"interpolated","bands",1) +& (Xk,Xen,dEf,CIRCUIT_k,IDs(1:nqnt),BANDS_bands,nqnt,nfiles(1:nqnt),"interpolated","bands",prt_occ) ! if (l_PROJECT_plane) call PROJECTION_plot( "BANDS", 1, n_spin, BANDS_bands, OBS_B=GRID_E%E ) ! From e8639facdb7cb349bba243091811162639ec8e63 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Oct 2022 11:53:29 +0200 Subject: [PATCH 0466/1367] Version 5.1.0, Revision 22000, Hash a0a21872b MODIFIED * include/driver/version.h ypp/electrons/electrons_bands.F Bugs: -Small typos Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/electrons/electrons_bands.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 551f848256..83d5ecbf32 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22000 -#define YAMBO_HASH "771101e0d" +#define YAMBO_REVISION 22001 +#define YAMBO_HASH "a0a21872b" diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index 186f4918d5..d9fe62c78c 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -203,7 +203,7 @@ subroutine electrons_bands(Xk,Xen) ! Generate excited states occupations if(nel_cond/=rZERO.and.BANDS_steps> 0) then ! - call INTERPOLATION_driver_seed("SCporj",ID_occ,BANDS_bands,SEED_k=Xk,SEED_E=Xen) + call INTERPOLATION_driver_seed("OCCinterp",ID_occ,BANDS_bands,SEED_k=Xk,SEED_E=Xen) YAMBO_ALLOC(INTERP_obj(ID_occ)%INTERP,(BANDS_bands(1):BANDS_bands(2),CIRCUIT_k%nibz,INTERP_obj(ID_occ)%D)) INTERP_obj(ID_occ)%INTERP=rZERO ! From 16d5617e2fd4193a4390f65e7a9aa39a8146f2da Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Oct 2022 14:34:31 +0200 Subject: [PATCH 0467/1367] Version 5.1.0, Revision 22001, Hash e8639facd MODIFIED * include/driver/version.h exc-ph/EXCPH_double_grid_setup.F modules/mod_EXCPH.F Additions: -Interpolation of excitonic occuption Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_double_grid_setup.F | 18 +++++++++++++++--- src/modules/mod_EXCPH.F | 2 ++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 83d5ecbf32..dffb68d4ff 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22001 -#define YAMBO_HASH "a0a21872b" +#define YAMBO_REVISION 22002 +#define YAMBO_HASH "e8639facd" diff --git a/src/exc-ph/EXCPH_double_grid_setup.F b/src/exc-ph/EXCPH_double_grid_setup.F index 553a3eba99..5c2a396066 100644 --- a/src/exc-ph/EXCPH_double_grid_setup.F +++ b/src/exc-ph/EXCPH_double_grid_setup.F @@ -25,16 +25,18 @@ ! subroutine EXCPH_double_grid_setup(q) ! - use pars, ONLY:schlen,SP + use pars, ONLY:schlen,SP,rZERO use vec_operate, ONLY:c2a use units, ONLY:HA2EV + use electrons, ONLY:nel_cond use R_lattice, ONLY:bz_samp,bz_samp_reset use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use ELPH, ONLY:PH_freqs,use_PH_DbGd,ph_modes,E_kpq_sh_fact use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& & INTERPOLATE_is_quiet,INTERPOLATION_BZ - use EXCPH, ONLY:min_EXC_E_DbGd,ID_EXC,ID_EXC_obj,EXC_E_DbGd,EXCPH_sum,BS_all_E + use EXCPH, ONLY:min_EXC_E_DbGd,ID_EXC,ID_EXC_obj,EXC_E_DbGd,EXCPH_sum,BS_all_E, & +& EXC_occ,ID_occ,ID_occ_obj,EXC_occ_DbGd use com, ONLY:msg ! #include @@ -78,7 +80,7 @@ subroutine EXCPH_double_grid_setup(q) ID_EXC_obj=1 ID_EXC =1 call INTERPOLATION_BZ_setup(q) - INTERP_obj(ID_EXC_obj)%what="EXC_E(k+q)" + INTERP_obj(ID_EXC_obj)%what="EXC_E(Q)" call INTERPOLATION_coefficients(R1D=BS_all_E(:EXCPH_sum(2),:),k=q,NK=q%nibz,ID=ID_EXC,ID_obj=ID_EXC_obj) ! call bz_samp_reset(q_DbGd) @@ -96,4 +98,14 @@ subroutine EXCPH_double_grid_setup(q) write(q_point,'(3f12.6,a)') v(:),' [rlu] ' call msg('rs','Minimum q-point in the DbGrid : '//q_point) ! + if(nel_cond/=rZERO) then + ID_occ_obj=2 + ID_occ =2 + INTERP_obj(ID_occ_obj)%what="EXC_occ(Q)" + call INTERPOLATION_coefficients(R1D=EXC_occ(:EXCPH_sum(2),:),k=q,NK=q%nibz,ID=ID_occ,ID_obj=ID_occ_obj) + YAMBO_ALLOC(EXC_occ_DbGd,(EXCPH_sum(2),q_DbGd%nibz)) + call INTERPOLATION_BZ(K=q_DbGd,NK=q_DbGd%nibz,ID=ID_occ,R1D=EXC_occ_DbGd) + call msg('rs','Excitonic occupation interpolated on the Double-Grid') + endif + ! end subroutine diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index f2c0491028..b91a04be40 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -113,6 +113,8 @@ module EXCPH ! Excitonic occupations ! real(SP), allocatable :: EXC_occ(:,:) + integer :: ID_occ,ID_occ_obj + real(SP), allocatable :: EXC_occ_DbGd(:,:) ! contains ! From 831913fc41b770b78fc9636d8694112048f09a6a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Oct 2022 14:48:14 +0200 Subject: [PATCH 0468/1367] Version 5.1.0, Revision 22002, Hash 16d5617e2 MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F exc-ph/Satellite_DbGrid.F Bugs: -Fixed allocation k_table Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 9 +++++---- src/exc-ph/Satellite_DbGrid.F | 16 +++++++++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index dffb68d4ff..b5a46d62e5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22002 -#define YAMBO_HASH "e8639facd" +#define YAMBO_REVISION 22003 +#define YAMBO_HASH "16d5617e2" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 9b84cc130b..c1579a21b3 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -55,7 +55,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) real(SP) :: output_data(n_output),E_fermi_h,E_fermi_e character(schlen) :: headers(n_output) integer :: iw,iq,i_alpha,max_filling,EXC_n_sum,i_beta - integer, allocatable:: EXC_states(:) + integer, allocatable:: EXC_indexes(:) character(schlen) :: dbgd_string type(levels) :: E_QF ! @@ -100,17 +100,18 @@ subroutine EXCPH_optics(E,k,q,X,wv) call OCCUPATIONS_Quasi_Fermi(E,k,E_QF,E_fermi_h,E_fermi_e) EXC_n_sum=EXCPH_sum(2)-EXCPH_sum(1)+1 YAMBO_ALLOC(EXC_occ,(EXC_n_sum,q%nibz)) - YAMBO_ALLOC(EXC_states,(EXC_n_sum)) + YAMBO_ALLOC(EXC_indexes,(EXC_n_sum)) + if(.not.allocated(q%k_table)) call k_build_up_BZ_tables(q) if(EXCPH_sum(1)/=1) call error("This part of the code does not work for ELPhExcSum(1)/=1") do i_beta=EXCPH_sum(1),EXCPH_sum(2) - EXC_states(i_beta)=i_beta + EXC_indexes(i_beta)=i_beta enddo endif ! do iq=1,q%nibz if(nel_cond/=rZERO) then call EXCPH_load_L(iq,X,'load','Lout') - call EXC_occupations(E_QF,k,q,iq,EXC_n_sum,EXC_states,EXC_occ(:,iq)) + call EXC_occupations(E_QF,k,q,iq,EXC_n_sum,EXC_indexes,EXC_occ(:,iq)) else call EXCPH_load_L(iq,X,'eigenvalues','Lout') endif diff --git a/src/exc-ph/Satellite_DbGrid.F b/src/exc-ph/Satellite_DbGrid.F index 17619fb6be..8099a63794 100644 --- a/src/exc-ph/Satellite_DbGrid.F +++ b/src/exc-ph/Satellite_DbGrid.F @@ -38,9 +38,11 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss use frequency, ONLY:w_samp use R_lattice, ONLY:bz_samp use units, ONLY:HA2EV + use electrons, ONLY:nel_cond use pars, ONLY:SP,cZERO,rZERO use EXCPH, ONLY:BS_all_E,BS_E_in,min_EXC_E_DbGd,EXC_E_DbGd,l_DbGd_PH_only,BS_Sat_E_PH_abs, & - BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,min_EXC_E,l_no_matrix_elements +& BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,min_EXC_E,l_no_matrix_elements, & +& EXC_occ,EXC_occ_DbGd use ELPH, ONLY:PH_freqs,FAN_deltaE_treshold,PH_freqs_sq,Q_io_map use functions, ONLY:bose_f,boltzman_f ! @@ -105,7 +107,11 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss iq_ibz = q%sstar(iq_bz,1) E_beta =BS_all_E(i_beta,iq_ibz) ! - boltzm_factor=boltzman_f(E_beta-min_EXC_E) + if(nel_cond/=rZERO) then + boltzm_factor=EXC_occ(i_beta,iq_ibz) + else + boltzm_factor=boltzman_f(E_beta-min_EXC_E) + endif ! else ! @@ -115,7 +121,11 @@ subroutine Satellite_DbGrid(iq_bz,q,il,i_alpha,i_beta,W,Sat_absorption,Sat_emiss ! ! Boltzman factor for the luminescence ! - boltzm_factor=boltzman_f(E_beta-min_EXC_E_DbGd) + if(nel_cond/=rZERO) then + boltzm_factor=abs(EXC_occ_DbGd(i_beta,iq_fg)) ! Fourier interpolation can generate negative occupations I take abs() + else + boltzm_factor=boltzman_f(E_beta-min_EXC_E_DbGd) + endif ! endif ! From 3e0fdc4b1461f4fa86ff70139f05d3ec7eae50c6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Oct 2022 14:57:11 +0200 Subject: [PATCH 0469/1367] Version 5.1.0, Revision 22003, Hash 831913fc4 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXC_occupations.F Bugs: -Fixed excitonic occupations Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 18 +++++++++++++----- src/exc-ph/EXC_occupations.F | 2 -- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b5a46d62e5..de04e77a53 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22003 -#define YAMBO_HASH "16d5617e2" +#define YAMBO_REVISION 22004 +#define YAMBO_HASH "831913fc4" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 9fe52ddba4..d6085747dc 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -42,7 +42,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use units, ONLY:HA2EV,HA2CMm1 use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,& + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,EXC_occ,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,min_EXC_E_DbGd, & & EXCPH_Renorm_PL,EXCPH_Renorm_PL_PH_abs,Renorm_alloc,Renorm_free,l_DbGd_WEIGHTs use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs_sq @@ -52,8 +52,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc - use parser_m, ONLY:parser - use com, ONLY:msg,of_open_close + use electrons, ONLY:nel_cond + use parser_m, ONLY:parser + use com, ONLY:msg,of_open_close ! #include ! @@ -64,7 +65,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Work space ! complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E,PH_E + real(SP) :: min_E,exc_E,PH_E,occ_fact integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer :: iq_db,iq_ibz integer :: elph_branches_save(2) @@ -250,8 +251,15 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! exc_E=BS_E_in(i_alpha)-min_E pole =BS_E_in(i_alpha) + ! + if(nel_cond/=rZERO) then + occ_fact=EXC_occ(i_alpha,1) + else + occ_fact=boltzman_f(exc_E) + endif + ! PL_ii(iw,1:2) =PL_ii(iw,1:2) + W**3*(1._SP-EXCPH_Renorm_PL(i_alpha)-EXCPH_Renorm_PL_PH_abs(i_alpha))*BS_R(i_alpha) & -& /(W-pole)*boltzman_f(exc_E) +& /(W-pole)*occ_fact ! enddo ! diff --git a/src/exc-ph/EXC_occupations.F b/src/exc-ph/EXC_occupations.F index 6b8817ded5..89d436ae20 100644 --- a/src/exc-ph/EXC_occupations.F +++ b/src/exc-ph/EXC_occupations.F @@ -64,7 +64,6 @@ subroutine EXC_occupations(E_QF,k,q,iq_ibz,EXC_n_states,EXC_indexes,EXC_occ) ik_minus_iq_ibz = k%sstar(ik_minus_iq_bz,1) ! el_occ=E_qf%f(ic,ik_ibz,1)*(spin_occ-E_qf%f(iv,ik_minus_iq_ibz,1)) -! if(iv==4.and.ic==5) write(*,*) 'passo qui ',iv,ic,ik_ibz,el_occ ! do i_c=1,EXC_n_states i_l=EXC_indexes(i_c) @@ -72,6 +71,5 @@ subroutine EXC_occupations(E_QF,k,q,iq_ibz,EXC_n_states,EXC_indexes,EXC_occ) enddo ! enddo -! write(*,*) iq_ibz,EXC_occ(:) ! end subroutine From 61b0a5d1f70d073a9397469f96a58bfd405e81a0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Oct 2022 15:43:58 +0200 Subject: [PATCH 0470/1367] Version 5.1.0, Revision 22004, Hash 3e0fdc4b1 MODIFIED * include/driver/version.h interface/INIT_activate.F ypp/excitons/excitons_bands.F Bugs: -Fixed small bug Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- ypp/excitons/excitons_bands.F | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index de04e77a53..62ceb477cd 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22004 -#define YAMBO_HASH "831913fc4" +#define YAMBO_REVISION 22005 +#define YAMBO_HASH "3e0fdc4b1" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index f02840731b..91515aa9ee 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) then - call initactivate(1,'PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + call initactivate(1,'EXCTemp PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') endif ! diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index d596f9e506..8a82512a8d 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -87,6 +87,8 @@ subroutine excitons_bands(k,Xk,en,Xen,q) l_exc_occ_interp=.true. endif ! + if(nel_cond/=rZERO.and.Boltz_Temp/=rZERO) call warning('Excitonic Occupation, EXCTemp ignored, use ElecTemp!') + ! ! Interpolate and write on disk ! call k_circuit_made_of_user_points( ) From 63782d1438664c0b84d5a730d1a40d0ccaaa4948 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 17 Oct 2022 15:01:10 +0200 Subject: [PATCH 0471/1367] Version 5.1.0, Revision 22005, Hash 61b0a5d1f MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F modules/SET_defaults.F modules/mod_EXCPH.F ypp/excitons/excitons_bands.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Bugs: - Additions: -Fixed alphaQ in ypp_ph Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 2 ++ src/modules/SET_defaults.F | 3 ++- src/modules/mod_EXCPH.F | 1 + ypp/excitons/excitons_bands.F | 9 ++++++++- ypp/interface/INIT_load_ypp.F | 2 ++ ypp/interface/INIT_ypp.F | 2 +- 7 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 62ceb477cd..3dbfb878ff 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22005 -#define YAMBO_HASH "3e0fdc4b1" +#define YAMBO_REVISION 22006 +#define YAMBO_HASH "61b0a5d1f" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index c1579a21b3..6130ae269c 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -29,6 +29,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) use pars, ONLY:SP,cZERO,schlen,rZERO use electrons, ONLY:levels,nel_cond,E_reset use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor + use D_lattice, ONLY:Boltz_Temp use X_m, ONLY:X_t use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & @@ -106,6 +107,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) do i_beta=EXCPH_sum(1),EXCPH_sum(2) EXC_indexes(i_beta)=i_beta enddo + if(Boltz_Temp/=rZERO) call warning('Excitonic Occupation, EXCTemp ignored, use ElecTemp!') endif ! do iq=1,q%nibz diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 3efcd62511..77057905c2 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -83,7 +83,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name,alphaQ #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -543,6 +543,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) EXCPH_sum=(/1,1/) L_damping=0.0005/HA2EV ! set to 0.5 meV EXC_q0=(/0.0,0.0,0.0/) + alphaQ=rZERO ! #endif ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index b91a04be40..be1654fe6f 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -115,6 +115,7 @@ module EXCPH real(SP), allocatable :: EXC_occ(:,:) integer :: ID_occ,ID_occ_obj real(SP), allocatable :: EXC_occ_DbGd(:,:) + real(SP) :: alphaQ ! contains ! diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index 8a82512a8d..cf36f8dd55 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -41,7 +41,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - + use EXCPH, ONLY:alphaQ ! #include ! @@ -100,6 +100,13 @@ subroutine excitons_bands(k,Xk,en,Xen,q) YAMBO_ALLOC(BSE_interp_E,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) ! + if(alphaQ/=rZERO) then + call msg('rs','Excitonic bands stretching :',alphaQ) + do iq=1,CIRCUIT_k%nibz + BSE_interp_E(:,iq)=BSE_interp_E(:,iq)+alphaQ*iku_v_norm(CIRCUIT_k%pt(iq,:3)) + enddo + endif + ! if(l_exc_occ_interp) then YAMBO_ALLOC(EXC_occ_interp,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) if(nel_cond/=rZERO) then diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 72fdf9d10c..04f6d27c70 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -58,6 +58,7 @@ subroutine INIT_ypp_load(defs) use YPP_ELPH, ONLY:elph_dbs_path,elph_Ef,elph_gamma_broad,elph_residual_treshold,elph_steps,& & ph_broad,ph_freqs_file,ph_modes_file use ELPH, ONLY:EkplusQ_mode + use EXCPH, ONLY:alphaQ #endif ! implicit none @@ -152,6 +153,7 @@ subroutine INIT_ypp_load(defs) call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general) call it(defs,'ExcMin' ,'Minimum excitonic energy',EXC_min,unit=E_unit,verb_level=V_general) call it(defs,'EXCTemp','Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit,verb_level=V_general) + call it(defs,'AlphaQ',"Distortion of excitonic dispersion E'(Q)=E(Q)+\alpha*|Q| ",alphaQ,verb_level=V_general) ! ! DOS ! diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 4e28abc5c1..09f81b9417 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -705,7 +705,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif if (l_interp) then call initactivate(-1,"BSQindex") - call initactivate(1,"NelCond ExcMin EXCTemp") + call initactivate(1,"NelCond ExcMin EXCTemp AlphaQ") call initactivate(1,"INTERP_mode INTERP_Grid BANDS_steps cooIn cooOut") call initactivate(1,"PrtDOS DOSERange DOSESteps DOS_broad") endif From c324aaaf07aa4d4fb914fe2275df8aa600135b34 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 17 Oct 2022 15:31:58 +0200 Subject: [PATCH 0472/1367] Version 5.1.0, Revision 22006, Hash 63782d143 MODIFIED * include/driver/version.h exc-ph/EXCPH_double_grid_setup.F exc-ph/EXCPH_optics.F modules/mod_EXCPH.F Additions: -Added alphaQ in luminescence Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_double_grid_setup.F | 4 +--- src/exc-ph/EXCPH_optics.F | 32 ++++++++++++++++++++++++---- src/modules/mod_EXCPH.F | 3 +++ 4 files changed, 34 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3dbfb878ff..2069e5baee 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22006 -#define YAMBO_HASH "61b0a5d1f" +#define YAMBO_REVISION 22007 +#define YAMBO_HASH "63782d143" diff --git a/src/exc-ph/EXCPH_double_grid_setup.F b/src/exc-ph/EXCPH_double_grid_setup.F index 5c2a396066..d251ab1dde 100644 --- a/src/exc-ph/EXCPH_double_grid_setup.F +++ b/src/exc-ph/EXCPH_double_grid_setup.F @@ -36,7 +36,7 @@ subroutine EXCPH_double_grid_setup(q) use interpolate, ONLY:INTERPOLATE_is_serial,INTERPOLATION_coefficients,INTERP_obj,INTERP_shell_factor,& & INTERPOLATE_is_quiet,INTERPOLATION_BZ use EXCPH, ONLY:min_EXC_E_DbGd,ID_EXC,ID_EXC_obj,EXC_E_DbGd,EXCPH_sum,BS_all_E, & -& EXC_occ,ID_occ,ID_occ_obj,EXC_occ_DbGd +& EXC_occ,ID_occ,ID_occ_obj,EXC_occ_DbGd,q_DbGd,min_pos_E_DbGd use com, ONLY:msg ! #include @@ -45,9 +45,7 @@ subroutine EXCPH_double_grid_setup(q) ! ! Work space ! - type(bz_samp) :: q_DbGd integer :: io_err,ID_DG - integer :: min_pos_E_DbGd(1) real(SP) :: v(3) character(schlen) :: q_point integer, external :: io_Double_Grid diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 6130ae269c..41ff3a70d5 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -27,15 +27,17 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! use units, ONLY:HA2EV use pars, ONLY:SP,cZERO,schlen,rZERO + use vec_operate, ONLY:iku_v_norm,c2a use electrons, ONLY:levels,nel_cond,E_reset use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use D_lattice, ONLY:Boltz_Temp use X_m, ONLY:X_t use com, ONLY:msg,of_open_close use EXCPH, ONLY:EXCPH_sum,EXCPH_states,L_kind_in,L_kind_out,BS_E,BS_all_E,BS_E_in, & -& BS_R_left,BS_R_right,BS_R,BSE_alloc,BSE_free,EXC_occ, & -& RESIDUALS_and_EIGENVALUES_free, RESIDUALS_and_EIGENVALUES_alloc, & -& l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free +& BS_R_left,BS_R_right,BS_R,BSE_alloc,BSE_free,EXC_occ,alphaQ,q_DbGd, & +& RESIDUALS_and_EIGENVALUES_free, RESIDUALS_and_EIGENVALUES_alloc,EXC_E_DbGd, & +& l_DbGd_PH_only,l_DbGd_WEIGHTs,l_no_matrix_elements,Sat_alloc,Sat_free, & +& min_EXC_E_DbGd,min_pos_E_DbGd use ELPH, ONLY:use_PH_DbGd,ph_modes use BS_solvers, ONLY:BSS_eh_table,BSS_alloc,BSS_free use BS, ONLY:BSE_prop,BS_dip_size @@ -53,11 +55,12 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! complex(SP), allocatable :: PL_ii(:,:),Epsilon_ii(:,:) integer, parameter :: n_output=7 - real(SP) :: output_data(n_output),E_fermi_h,E_fermi_e + real(SP) :: output_data(n_output),E_fermi_h,E_fermi_e,v(3) character(schlen) :: headers(n_output) integer :: iw,iq,i_alpha,max_filling,EXC_n_sum,i_beta integer, allocatable:: EXC_indexes(:) character(schlen) :: dbgd_string + character(schlen) :: q_point type(levels) :: E_QF ! call section('*','EXCPH-Optics') @@ -149,6 +152,27 @@ subroutine EXCPH_optics(E,k,q,X,wv) YAMBO_ALLOC(Epsilon_ii,(wv%n_freqs,3)) YAMBO_ALLOC(PL_ii,(wv%n_freqs,3)) ! + ! Band structure distortion + ! + if(alphaQ/=rZERO) then + call msg('rs','Excitonic bands stretching :',alphaQ) + do iq=1,q%nibz + BS_all_E(:,iq)=BS_all_E(:,iq)+alphaQ*iku_v_norm(q%pt(iq,:3)) + enddo + if(use_PH_DbGd) then + do iq=1,q_DbGd%nibz + EXC_E_DbGd(:,iq)=EXC_E_DbGd(:,iq)+alphaQ*iku_v_norm(q_DbGd%pt(iq,:3)) + enddo + min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) + min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) + call c2a(v_in=q_DbGd%pt(min_pos_E_DbGd,:),v_out=v,mode="ki2a") + call msg('rs','NEW!!! Minimum excitonic energy with DbGd: ',min_EXC_E_DbGd*HA2EV,'eV') + write(q_point,'(3f12.6,a)') v(:),' [rlu] ' + call msg('rs','NEW!!!! Minimum q-point in the DbGrid : '//q_point) + endif + endif + ! + ! ! Calculate X(w) include phonon assisted transitions ! call EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index be1654fe6f..d1a337a9c7 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -27,6 +27,7 @@ module EXCPH use BS_solvers, ONLY:BSS_n_eig use BS, ONLY:BS_H_dim use ELPH, ONLY:ph_modes + use R_lattice, ONLY:bz_samp ! #include ! @@ -94,7 +95,9 @@ module EXCPH ! integer :: ID_EXC,ID_EXC_obj real(SP) :: min_EXC_E_DbGd + integer :: min_pos_E_DbGd(1) real(SP), allocatable :: EXC_E_DbGd(:,:) + type(bz_samp) :: q_DbGd ! ! Life Times ! From e7a2e5c5d0cb9a552f7e62c8d735adcd98cff831 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 17 Oct 2022 15:34:32 +0200 Subject: [PATCH 0473/1367] Version 5.1.0, Revision 22007, Hash c324aaaf0 MODIFIED * include/driver/version.h interface/INIT_activate.F interface/INIT_load.F Additions: -Added alphaQ in input Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2069e5baee..a9894d8ab8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22007 -#define YAMBO_HASH "63782d143" +#define YAMBO_REVISION 22008 +#define YAMBO_HASH "c324aaaf0" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 91515aa9ee..6e0d309aee 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -457,7 +457,7 @@ subroutine INIT_activate() if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) then - call initactivate(1,'EXCTemp PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 651a525a69..27878109c5 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,EXCPH_kind_name + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,EXCPH_kind_name,alphaQ use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP @@ -671,6 +671,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ExcPhKind', '[EXCPH] Exciton-phonon kind (PALEARI | BERNARDI)',EXCPH_kind_name) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) + call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure distortion',alphaQ) call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') From 2e2babd89ad10a6400363781b73ff8b0cbbf3942 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 17 Oct 2022 15:59:02 +0200 Subject: [PATCH 0474/1367] Version 5.1.0, Revision 22008, Hash e7a2e5c5d MODIFIED * include/driver/version.h exc-ph/EXCPH_optics.F modules/mod_vec_operate.F ypp/excitons/excitons_bands.F Additions: -2D version of bands distortion Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_optics.F | 6 +++--- src/modules/mod_vec_operate.F | 23 +++++++++++++++++++++++ ypp/excitons/excitons_bands.F | 4 ++-- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a9894d8ab8..fa7e3efbac 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22008 -#define YAMBO_HASH "c324aaaf0" +#define YAMBO_REVISION 22009 +#define YAMBO_HASH "e7a2e5c5d" diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 41ff3a70d5..8b2543e464 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -27,7 +27,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! use units, ONLY:HA2EV use pars, ONLY:SP,cZERO,schlen,rZERO - use vec_operate, ONLY:iku_v_norm,c2a + use vec_operate, ONLY:iku_v_2D_norm,c2a use electrons, ONLY:levels,nel_cond,E_reset use R_lattice, ONLY:bz_samp,bare_qpg,d3k_factor use D_lattice, ONLY:Boltz_Temp @@ -157,11 +157,11 @@ subroutine EXCPH_optics(E,k,q,X,wv) if(alphaQ/=rZERO) then call msg('rs','Excitonic bands stretching :',alphaQ) do iq=1,q%nibz - BS_all_E(:,iq)=BS_all_E(:,iq)+alphaQ*iku_v_norm(q%pt(iq,:3)) + BS_all_E(:,iq)=BS_all_E(:,iq)+alphaQ*iku_v_2D_norm(q%pt(iq,:3)) enddo if(use_PH_DbGd) then do iq=1,q_DbGd%nibz - EXC_E_DbGd(:,iq)=EXC_E_DbGd(:,iq)+alphaQ*iku_v_norm(q_DbGd%pt(iq,:3)) + EXC_E_DbGd(:,iq)=EXC_E_DbGd(:,iq)+alphaQ*iku_v_2D_norm(q_DbGd%pt(iq,:3)) enddo min_EXC_E_DbGd=minval(EXC_E_DbGd(1,:)) min_pos_E_DbGd=minloc(EXC_E_DbGd(1,:)) diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 4453204da2..9639f1b398 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -102,6 +102,29 @@ real(SP) function iku_v_norm(v,inside_bz) iku_v_norm=sqrt(dot_product(u,u)) ! end function iku_v_norm + ! + real(SP) function iku_v_2D_norm(v,inside_bz) + ! + ! shifted in the BZ if inside_bz is set to true, ak2bz=|k| + ! + use D_lattice, ONLY:alat + real(SP), intent(in) :: v(3) + logical, intent(in), optional :: inside_bz + ! + real(SP) :: u(3) + logical :: inside_bz_ + ! + inside_bz_=.false. + if(present(inside_bz)) inside_bz_=inside_bz + ! + u(:)=v(:) + if(inside_bz_) call k2bz(v_in=u) + ! + u(1:2)=u(1:2)*2._SP*pi/alat(1:2) + iku_v_2D_norm=sqrt(dot_product(u(1:2),u(1:2))) + ! + end function iku_v_2D_norm + ! real(SP) function rlu_v_norm(k,inside_bz) ! diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index cf36f8dd55..a4c800b629 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -37,7 +37,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use stderr, ONLY:intc - use vec_operate, ONLY:iku_v_norm + use vec_operate, ONLY:iku_v_2D_norm use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index @@ -103,7 +103,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) if(alphaQ/=rZERO) then call msg('rs','Excitonic bands stretching :',alphaQ) do iq=1,CIRCUIT_k%nibz - BSE_interp_E(:,iq)=BSE_interp_E(:,iq)+alphaQ*iku_v_norm(CIRCUIT_k%pt(iq,:3)) + BSE_interp_E(:,iq)=BSE_interp_E(:,iq)+alphaQ*iku_v_2D_norm(CIRCUIT_k%pt(iq,:3)) enddo endif ! From 75c2c941a6e232b5b6e85b8ba55bec0c684bd4a5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 18 Oct 2022 21:42:07 +0200 Subject: [PATCH 0475/1367] Version 5.1.0, Revision 22009, Hash 2e2babd89 MODIFIED * include/driver/version.h modules/mod_vec_operate.F ypp/excitons/excitons_bands.F Bugs: -Small correction to exciton bands Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/modules/mod_vec_operate.F | 3 ++- ypp/excitons/excitons_bands.F | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fa7e3efbac..8a229f9362 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22009 -#define YAMBO_HASH "e7a2e5c5d" +#define YAMBO_REVISION 22010 +#define YAMBO_HASH "2e2babd89" diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 9639f1b398..a1a22fecb2 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -121,7 +121,8 @@ real(SP) function iku_v_2D_norm(v,inside_bz) if(inside_bz_) call k2bz(v_in=u) ! u(1:2)=u(1:2)*2._SP*pi/alat(1:2) - iku_v_2D_norm=sqrt(dot_product(u(1:2),u(1:2))) + u(3)=0._SP + iku_v_2D_norm=sqrt(dot_product(u,u)) ! end function iku_v_2D_norm diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index a4c800b629..d1d5cb1345 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -37,7 +37,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use parser_m, ONLY:parser use com, ONLY:msg,of_open_close use stderr, ONLY:intc - use vec_operate, ONLY:iku_v_2D_norm + use vec_operate, ONLY:iku_v_2D_norm,iku_v_norm use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index From f564e2904679192b2c434b2ae46d0a2b883a0f65 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 19 Oct 2022 11:14:30 +0200 Subject: [PATCH 0476/1367] Version 5.1.0, Revision 22010, Hash 75c2c941a MODIFIED * include/driver/version.h ypp/interface/INIT_load_ypp.F Bugs: -Fixed compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/interface/INIT_load_ypp.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8a229f9362..3c97ad1dc5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22010 -#define YAMBO_HASH "2e2babd89" +#define YAMBO_REVISION 22011 +#define YAMBO_HASH "75c2c941a" diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 04f6d27c70..e9c49b0156 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -153,7 +153,9 @@ subroutine INIT_ypp_load(defs) call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general) call it(defs,'ExcMin' ,'Minimum excitonic energy',EXC_min,unit=E_unit,verb_level=V_general) call it(defs,'EXCTemp','Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit,verb_level=V_general) +#if defined _YPP_ELPH call it(defs,'AlphaQ',"Distortion of excitonic dispersion E'(Q)=E(Q)+\alpha*|Q| ",alphaQ,verb_level=V_general) +#endif ! ! DOS ! From 7863e54f58505f0e8fa8abe90bf1b17c1920928f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 Oct 2022 13:54:56 +0200 Subject: [PATCH 0477/1367] Version 5.1.0, Revision 21821, Hash 7c1a50376 MODIFIED * include/driver/version.h bse/K_kernel.F bse/K_solvers.F Bugs: - [yambo] Fixed issues introduced with recent merges Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 14 +++++++++----- src/bse/K_solvers.F | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2619116a0b..d0e78aa979 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21686 -#define YAMBO_HASH "f2a584ff1" +#define YAMBO_REVISION 21821 +#define YAMBO_HASH "7c1a50376" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 18236f72fb..59581092b0 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -103,7 +103,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external ::K_correlation_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! - logical :: load_O_X,l_bs_corr,l_load_WFs + logical :: load_O_X,l_bs_corr,l_load_WFs,l_matrix_init ! ! I/O ! @@ -281,6 +281,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! iHxc=2 --> K_TDDFT=fxc ! iHxc=3 --> K_c=W ! + l_matrix_init=.true. + ! do iHxc=1,3 ! if (iHxc==1) BS_blk_done=.false. @@ -659,11 +661,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) sqrt_f_itk=sqrt(cmplx(BS_T_grp(i_Tgrp_k)%f(i_Tk),kind=SP)) sqrt_f_itp=sqrt(cmplx(BS_T_grp(i_Tgrp_p)%f(i_Tp),kind=SP)) ! - BS_blk(i_block)%mat(i_Tk,i_Tp)=sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp - if (mode_now=="C") BS_blk(i_block)%mat(i_Tk,i_Tp)= cI*BS_blk(i_block)%mat(i_Tk,i_Tp) + BS_mat_tmp=sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp + if (mode_now=="C") BS_mat_tmp= cI*BS_mat_tmp ! - if (iHxc==1) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp - if (iHxc>=2) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp + if ( l_matrix_init) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp + if (.not.l_matrix_init) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp ! if (iHxc==3) BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! @@ -725,6 +727,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (l_load_WFs) call WF_free(WF,keep_states_to_load=iHxc<3) ! + l_matrix_init=.false. + ! enddo ! iHxc loop ! #if defined _PAR_IO diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 410fffd9d2..f13b618545 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -119,7 +119,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! A possible alternative could be to use the algorithm with Cf ! from both the left and the right hand side to get from a single Haydock loop ! - if (l_BS_abs) call K_Haydock(iq,W_bss,"abs",Xk) + if (l_BS_abs) call K_Haydock(iq,W_bss,"optics",Xk) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) if (l_BS_dichroism) call K_Haydock(iq,W_bss,"dichroism",Xk) From 4671fd03b7555b0ca4b3a0c3ad4cc3728fd369a0 Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Wed, 19 Oct 2022 15:02:30 +0200 Subject: [PATCH 0478/1367] Fixed issue related to Ltilde in BSE K --- src/bse/K.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bse/K.F b/src/bse/K.F index 1852e5e072..dfe613dd2c 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -409,7 +409,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- ! - if (trim(L_kind)/="Ltilde") then + if (trim(BSE_L_kind)/="tilde") then call K_exchange_collisions(iq,Xk,i_Tgrp_k) ! if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p) From 41f5a5e3bdd0294091abea452527c16c56b7272d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Oct 2022 14:42:09 +0200 Subject: [PATCH 0479/1367] Version 5.1.0, Revision 21828, Hash e07b3bb88 MODIFIED * include/driver/version.h bse/K_kernel.F Changes: - [yambo] Improving handling of I/O within Hxc loop in BSE kernel Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K_kernel.F | 85 +++++++++++++++++++++------------------- 2 files changed, 47 insertions(+), 42 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a7dac265d0..aacaa518d1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21822 -#define YAMBO_HASH "7863e54f5" +#define YAMBO_REVISION 21828 +#define YAMBO_HASH "e07b3bb88" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 59581092b0..dcdbda145d 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -103,7 +103,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external ::K_correlation_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! - logical :: load_O_X,l_bs_corr,l_load_WFs,l_matrix_init + logical :: l_bs_exch,l_bs_corr,l_matrix_init,l_load_kernel,l_write_kernel ! ! I/O ! @@ -161,20 +161,16 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call section('=',trim(section_title)) ! - ! Exchange - !========== - ! - load_O_X=BS_res_K_exchange.or.l_bs_fxc - ! - if (load_O_X) call msg('r','[BSE] Exchange components ',BS_n_g_exch) - ! ! Oscillators Setup !=================== O_ng=1 O_ng_exch =maxval(qindx_X(iq,:,2)) O_ng_shift=O_ng_exch ! - l_bs_corr=any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc + l_bs_exch=any((/BS_res_K_exchange,BS_cpl_K_exchange/)).or.l_bs_fxc.and..not.(l_BS_magnons.and.n_sp_pol==2) + l_bs_corr=any((/BS_res_K_corr,BS_cpl_K_corr/)) .and. .not.l_bs_fxc + ! + if (l_bs_exch) call msg('r','[BSE] Exchange components ',BS_n_g_exch) ! if (l_bs_corr) then O_ng=G_m_G_maxval @@ -282,15 +278,23 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! iHxc=3 --> K_c=W ! l_matrix_init=.true. + l_load_kernel=.true. + l_write_kernel=.false. ! do iHxc=1,3 ! if (iHxc==1) BS_blk_done=.false. ! - if (l_BS_magnons.and.n_sp_pol==2.and.iHxc==1) cycle + if ((.not.l_bs_exch).and.iHxc==1) cycle ! if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle ! + if ((.not.l_bs_corr).and.iHxc==3) cycle + ! + if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) + if (iHxc==2) l_write_kernel=.not. l_bs_corr + if (iHxc==3) l_write_kernel=.true. + ! section_title='-BSK-'//trim(intc(iHxc)) if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) ! @@ -303,8 +307,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !if (iHxc==3) NG(2)=O_ng_shift ! WARNING > ! - l_load_WFs= iHxc==1 .or. iHxc==2 .or. (iHxc==3.and.l_bs_corr) - ! ! ALDA !====== if (iHxc==2) then @@ -349,11 +351,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if (l_load_WFs) call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) + call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) ! ! Wave Functions Phases !======================= - if (iHxc==3.and.l_bs_corr) call K_WF_phases(Xk) + if (iHxc==3) call K_WF_phases(Xk) ! ! Spatial Inversion Test !======================== @@ -371,7 +373,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !================================================= ! #ifdef _PAR_IO - if (l_BSE_restart.and.iHxc==1) then + if (l_BSE_restart.and.l_load_kernel) then ! if (m_steps>0) call live_timing("Loading partial kernel",m_steps) ! @@ -412,6 +414,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call msg("s","Kernel loaded percentual ",real(n_steps-m_steps,SP)/real(n_steps,SP)*100._SP,'[%]') ! + l_load_kernel=.false. + ! endif #endif ! @@ -421,7 +425,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==1) section_title=trim(section_title)//' exch' if (iHxc==2) section_title=trim(section_title)//' tddft' if (iHxc==3) section_title=trim(section_title)//' corr' - if (.not.l_load_WFs) section_title='Final I/O' + if (l_write_kernel) section_title=trim(section_title)//' and I/O' ! if (m_steps>0) call live_timing(trim(section_title),m_steps) ! @@ -431,10 +435,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! block_loop:& do i_block=1,n_BS_blks + ! + mode_now=BS_blk(i_block)%mode + if (.not.l_BS_ares_from_res) mode_now="F" ! if (BS_blk_done(i_block)) then #if defined _PAR_IO - if(l_partial_kernel_loaded.and.iHxc==3) then + if(l_partial_kernel_loaded.and.l_write_kernel) then call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") endif @@ -465,7 +472,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- ! - if(iHxc==3.and.l_bs_corr) call K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) + if(iHxc==3) call K_correlation_collisions(iq,i_block,qindx_ID_frag,Xk,q) ! ! Transition Loops !------------------ @@ -476,7 +483,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !$omp & sqrt_f_itk,i_k_bz,i_v_k,i_c_k,i_k_sp_pol_c,i_k_sp_pol_v,i_k_s,is_k,os_k,i_k_s_m1,H_pos, & !$omp & sqrt_f_itp,i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v,i_p_s,is_p,os_p,i_kp_s, & !$omp & i_kmq_bz,ig_kmq,i_kmq,i_kmq_s,i_kmq_t,i_kmq_s_m1,i_kp_mq_s, & - !$omp & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t,mode_now, & + !$omp & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t, & !$omp & ig_W,iq_W,iq_W_s,iq_W_bz,iq_W_bz_mq,ig_W_mq,iq_W_mq,iq_W_s_mq,H_x,H_c, & !$omp & i_p_bz_last,i_k_bz_last,i_pmq_bz_last,i_kmq_bz_last, & !$omp & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last, & @@ -522,7 +529,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) i_kmq_s =Xk%sstar(i_kmq_bz,2) i_pmq_s =Xk%sstar(i_pmq_bz,2) ! - if (iHxc==3.and.l_bs_corr) then + if (iHxc==3) then i_kmq_t=BS_blk(i_block)%kp_table(1,i_kmq) i_pmq_t=BS_blk(i_block)%kp_table(2,i_pmq) endif @@ -530,7 +537,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) i_kmq_s_m1 = sop_inv(i_kmq_s) i_kp_mq_s = sop_tab(i_kmq_s_m1,i_pmq_s) ! - if (iHxc==3.and.l_bs_corr) then + if (iHxc==3) then i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) if (i_p_bz_last/=i_p_bz.or.i_k_bz_last/=i_k_bz) then i_p_bz_last=i_p_bz @@ -570,7 +577,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ig_kmq = qindx_X(iq,i_k_bz,2) ig_pmq = qindx_X(iq,i_p_bz,2) ! - if (iHxc==3.and.l_bs_corr) then + if (iHxc==3) then i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) if (i_pmq_bz_last/=i_pmq_bz.or.i_kmq_bz_last/=i_kmq_bz) then i_pmq_bz_last=i_pmq_bz @@ -595,14 +602,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) iq_W_s_mq =q%sstar( iq_W_bz_mq,2) endif ! - if (BS_K_is_ALDA.and.iHxc==2) then + if (iHxc==2) then is_k = (/i_c_k,i_k,i_k_s,i_k_sp_pol_c/) os_k = (/i_v_k,i_kmq,i_kmq_s,i_k_sp_pol_v/) is_p = (/i_c_p,i_p,i_p_s,i_p_sp_pol_c/) os_p = (/i_v_p,i_pmq,i_pmq_s,i_p_sp_pol_v/) endif ! - if (iHxc==3.and.l_bs_corr) then + if (iHxc==3) then ! if (iq_W_bz/=iq_W_bz_mq.or.iq_W/=iq_W_mq.or.iq_W_s/=iq_W_s_mq) call error("Wrong transferred momentum") ! @@ -613,9 +620,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) H_x=cZERO H_c=cZERO ! - mode_now=BS_blk(i_block)%mode - if (.not.l_BS_ares_from_res) mode_now="F" - ! select case (mode_now) ! case ("R","A","F") @@ -624,14 +628,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !=================================== ! ! Exchange - if (BS_res_K_exchange.and.iHxc==1) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & -& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + if (iHxc==1) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & +& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA .and.iHxc==2) H_x=TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') + if (iHxc==2) H_x=TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'RES') ! ! Correlations - if (BS_res_K_corr .and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_c_p,i_kmq_s,i_kp_mq_s,i_v_k,i_v_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) @@ -642,14 +646,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !============================= ! ! Exchange - if (BS_cpl_K_exchange.and.iHxc==1) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & - & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + if (iHxc==1) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & +& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA .and.iHxc==2) H_x=TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') + if (iHxc==2) H_x=TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,'CPL') ! ! Correlations - if (BS_cpl_K_corr .and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (BS_cpl_K_corr.and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_v_p,i_kmq_s,i_kp_mq_s,i_v_k,i_c_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_v,i_k_sp_pol_v,i_p_sp_pol_c, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) @@ -667,7 +671,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if ( l_matrix_init) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp if (.not.l_matrix_init) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp ! - if (iHxc==3) BS_blk(i_block)%done(i_Tk,i_Tp)="t" + if (l_write_kernel) BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! enddo ! i_Tk enddo ! i_Tp @@ -676,7 +680,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !$omp end parallel #endif ! - if(BS_K_cutoff>0._SP.and.iHxc==3) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) + if(BS_K_cutoff>0._SP.and.l_write_kernel) & +& BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! if(l_BSE_minimize_memory.and.iHxc==1) then call BS_oscillators_free(i_Tgrp_p,0) @@ -685,7 +690,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if(iHxc==3) call BS_oscillators_free(0,i_block) ! - if(iHxc==3) then + if(l_write_kernel) then #if defined _PAR_IO call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") @@ -719,13 +724,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if(iHxc==3.and.l_bs_corr) then + if(iHxc==3) then YAMBO_FREE(WF_phase) qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) YAMBO_FREE(BS_W) endif ! - if (l_load_WFs) call WF_free(WF,keep_states_to_load=iHxc<3) + call WF_free(WF,keep_states_to_load=iHxc<3) ! l_matrix_init=.false. ! From 6063c108fd4b2eca579891608465ae9a5cfb9ebb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Oct 2022 15:09:02 +0200 Subject: [PATCH 0480/1367] Version 5.1.0, Revision 21829, Hash 41f5a5e3b MODIFIED * include/driver/version.h bse/K_kernel.F xc_functionals/XC_libxc_driver.F Changes: - [yambo] handling of BSE kernel I/O in iHxc loop further improved - [yambo] Added warning message when Fxc is evaluated from numerical functional derivative of Vxc Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_kernel.F | 18 +++++++++++++----- src/xc_functionals/XC_libxc_driver.F | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index aacaa518d1..9d2038fc64 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21828 -#define YAMBO_HASH "e07b3bb88" +#define YAMBO_REVISION 21829 +#define YAMBO_HASH "41f5a5e3b" diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index dcdbda145d..e8c2cdd402 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -291,10 +291,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if ((.not.l_bs_corr).and.iHxc==3) cycle ! - if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) - if (iHxc==2) l_write_kernel=.not. l_bs_corr - if (iHxc==3) l_write_kernel=.true. - ! section_title='-BSK-'//trim(intc(iHxc)) if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) ! @@ -425,7 +421,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==1) section_title=trim(section_title)//' exch' if (iHxc==2) section_title=trim(section_title)//' tddft' if (iHxc==3) section_title=trim(section_title)//' corr' - if (l_write_kernel) section_title=trim(section_title)//' and I/O' ! if (m_steps>0) call live_timing(trim(section_title),m_steps) ! @@ -439,6 +434,19 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! + if (.not.trim(BS_blk(i_block)%mode)=="C") then + if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) + if (iHxc==2) l_write_kernel=.not. l_bs_corr + if (iHxc==3) l_write_kernel=.true. + else + if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.BS_cpl_K_corr) + if (iHxc==2) l_write_kernel=.not. BS_cpl_K_corr + if (iHxc==3) l_write_kernel=.true. + ! + if (iHxc==3.and..not.BS_cpl_K_corr) cycle + ! + endif + ! if (BS_blk_done(i_block)) then #if defined _PAR_IO if(l_partial_kernel_loaded.and.l_write_kernel) then diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 0b30388810..ec688e3467 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -266,6 +266,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! ORDER_NOW=ORDER if (l_Fxc_from_Vxc.and.ORDER==2) then + call warning(' Evaluating Fxc as numerical functional derivative of Vxc') PERT_FAC=1.000001_DP ORDER_NOW=1 YAMBO_ALLOC(V_xc_pert,(fft_size,n_spin)) From aa520370a24f3d163aa7f06d643baeb7b70eaeb7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 25 Oct 2022 15:07:16 +0200 Subject: [PATCH 0481/1367] Version 5.1.0, Revision 22011, Hash f564e2904 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: - Additions: -q_point bz written in output Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3c97ad1dc5..20e9e62002 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22011 -#define YAMBO_HASH "75c2c941a" +#define YAMBO_REVISION 22012 +#define YAMBO_HASH "f564e2904" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index d6085747dc..3d80c15a6a 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -65,7 +65,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! Work space ! complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss - real(SP) :: min_E,exc_E,PH_E,occ_fact + real(SP) :: min_E,exc_E,PH_E,occ_fact,v(3) integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) integer :: iq_db,iq_ibz integer :: elph_branches_save(2) @@ -301,6 +301,9 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) call msg('o pl_bse','#') call msg('o pl_bse','# iq_ibz = '//intc(iq_ibz)) + call msg('o pl_bse','# iq_bz = '//intc(iq_bz)) + call c2a(v_in=q%ptbz(iq_bz,:),v_out=v,mode="ki2a") + call msg('o pl_bse','# qbz_pt = ',v) ! ! Write output on file ! From 04c89356f1f7321270c1128bf73535302549cc6f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 25 Oct 2022 15:07:45 +0200 Subject: [PATCH 0482/1367] Version 5.1.0, Revision 22012, Hash aa520370a MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: - Additions: -Better change Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 20e9e62002..5491838501 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22012 -#define YAMBO_HASH "f564e2904" +#define YAMBO_REVISION 22013 +#define YAMBO_HASH "aa520370a" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 3d80c15a6a..650f00a4e2 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -301,9 +301,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) call msg('o pl_bse','#') call msg('o pl_bse','# iq_ibz = '//intc(iq_ibz)) - call msg('o pl_bse','# iq_bz = '//intc(iq_bz)) call c2a(v_in=q%ptbz(iq_bz,:),v_out=v,mode="ki2a") - call msg('o pl_bse','# qbz_pt = ',v) + call msg('o pl_bse','# q_pt_bz(rlu) = ',v) ! ! Write output on file ! From 21ed5f62e34b8a7d5f68d4264938b21691dfd27f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 25 Oct 2022 15:29:08 +0200 Subject: [PATCH 0483/1367] Version 5.1.0, Revision 22013, Hash 04c89356f MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Additions: -q point is written in output Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5491838501..78e2eef19e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22013 -#define YAMBO_HASH "aa520370a" +#define YAMBO_REVISION 22014 +#define YAMBO_HASH "04c89356f" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 650f00a4e2..273e630e50 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -285,6 +285,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) enddo ! if(l_prt_pl_q_res) then + call k_ibz2bz(q) ! Write on disk do iq_bz=1,q%nbz pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) From 376d28cfef62a76e0b4a8579ef69ce25a2b1f10e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 25 Oct 2022 17:53:15 +0200 Subject: [PATCH 0484/1367] Version 5.1.0, Revision 22014, Hash 21ed5f62e MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -Fixed bug Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 78e2eef19e..30cd288cd6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22014 -#define YAMBO_HASH "04c89356f" +#define YAMBO_REVISION 22015 +#define YAMBO_HASH "21ed5f62e" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 273e630e50..a4f0d29fb0 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -285,7 +285,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) enddo ! if(l_prt_pl_q_res) then - call k_ibz2bz(q) + call k_ibz2bz(q,'a',.true.) ! Write on disk do iq_bz=1,q%nbz pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) @@ -302,8 +302,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) call msg('o pl_bse','#') call msg('o pl_bse','# iq_ibz = '//intc(iq_ibz)) - call c2a(v_in=q%ptbz(iq_bz,:),v_out=v,mode="ki2a") - call msg('o pl_bse','# q_pt_bz(rlu) = ',v) + call msg('o pl_bse','# q_pt_bz(rlu) = ',q%ptbz(iq_bz,:)) ! ! Write output on file ! From 496e0d006a7800b27d0919932ab51e62e96b81c8 Mon Sep 17 00:00:00 2001 From: Pedro Melo Date: Wed, 26 Oct 2022 15:53:12 +0200 Subject: [PATCH 0485/1367] Merging with old fixes --- src/bse/PL_diago_residual.F | 3 ++- src/bse/PL_via_perturbative_inversion.F | 2 +- src/ph-el/PHEL_from_GF_to_quasiphonons.F | 2 +- src/real_time_lifetimes/RT_Radiative_Lifetimes.F | 2 +- src/xc_functionals/XC_libxc_driver.F | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 0cc2ecdb68..69df1a3b1f 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM PM ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -170,6 +170,7 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_H_dim,BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) ! enddo + write(*,*) Pi_x_R_x_adA_right ! ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) ! that cancel out. diff --git a/src/bse/PL_via_perturbative_inversion.F b/src/bse/PL_via_perturbative_inversion.F index 5cce4244f8..5805a171c2 100644 --- a/src/bse/PL_via_perturbative_inversion.F +++ b/src/bse/PL_via_perturbative_inversion.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM PM ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or diff --git a/src/ph-el/PHEL_from_GF_to_quasiphonons.F b/src/ph-el/PHEL_from_GF_to_quasiphonons.F index da3b991dee..e7fe74f1fc 100644 --- a/src/ph-el/PHEL_from_GF_to_quasiphonons.F +++ b/src/ph-el/PHEL_from_GF_to_quasiphonons.F @@ -112,7 +112,7 @@ subroutine PHEL_from_GF_to_quasiphonons(il,iq,ph_freq,QPH) do iw=1,QPH%N_D_freqs W=real( QPH%W(iw) ) + cI*0.1_SP/1000._SP/HA2EV if (trim(QPH%what)=="FULL") then - QPH%D(iw)=D_from_PI(cmplx(ph_freq),PHEL_qp%PI(il,iq,iw)-PI_ref,W) + QPH%D(iw)=cZERO!D_from_PI(cmplx(ph_freq),PHEL_qp%PI(il,iq,iw)-PI_ref,W) else if (.not.trim(QPH%what)=="DDFPT)") then QPH%D(iw)=D_from_POLE_and_GAMMA(QPH%Pole,QPH%Gamma,QPH%Residual,W) endif diff --git a/src/real_time_lifetimes/RT_Radiative_Lifetimes.F b/src/real_time_lifetimes/RT_Radiative_Lifetimes.F index a6474109b5..a27f40fc0d 100644 --- a/src/real_time_lifetimes/RT_Radiative_Lifetimes.F +++ b/src/real_time_lifetimes/RT_Radiative_Lifetimes.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM PM ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 0aeaa70f93..3814b532a9 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -66,7 +66,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) real(SP) :: local_exx_fraction real(DP) :: exsr ! - integer(SP) :: size_IPL_s + integer(4) :: size_IPL_s ! ! XC routines arrays ! @@ -255,7 +255,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) end if ! size_IPL=int(fft_size,kind=IPL) - size_IPL_s = size_IPL + size_IPL_s = int(fft_size) ! do ixc = 1,2 if (fnctl(ixc)%id == 0) cycle From 87eb9741bc5eccd7db0493df4777f162e112526c Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 27 Oct 2022 19:13:04 +0200 Subject: [PATCH 0486/1367] Added PL ph-ass satellites formulation following from exc. Hamiltonian --- src/exc-ph/.objects | 3 +- src/exc-ph/EXCPH_X_phass_from_Hpert.F | 221 ++++++++++++++++++++++++++ src/exc-ph/EXCPH_eval_sat.F | 11 +- src/exc-ph/EXCPH_optics.F | 23 ++- 4 files changed, 248 insertions(+), 10 deletions(-) create mode 100644 src/exc-ph/EXCPH_X_phass_from_Hpert.F diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 88acd9a6a9..2d9f3fa546 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,7 +1,8 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = EXCPH_gkkp_eval_ber.o EXCPH_gkkp_eval_pal.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ - EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o EXC_occupations.o + EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o EXC_occupations.o \ + EXCPH_X_phass_from_Hpert.o #endif #if defined _YPP_ELPH EQ_objs = EXC_occupations.o diff --git a/src/exc-ph/EXCPH_X_phass_from_Hpert.F b/src/exc-ph/EXCPH_X_phass_from_Hpert.F new file mode 100644 index 0000000000..1eca0f434b --- /dev/null +++ b/src/exc-ph/EXCPH_X_phass_from_Hpert.F @@ -0,0 +1,221 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): FP AC +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +! This subroutine is a simple version do not use double-grid +! neigther better integrations at gamma +! +!> @brief Calculate PL(w) satellites including ph-assisted transitions +! +! @param[in] wv frequencies range +! @param[in] EXCPH_gkkp read from file +! @param[in] Bose_Temp Bose temperature for phonons +! @param[in] Boltz_Temp Boltz temperature for excitons +! +! @param[out] PL_ii Satellites of phonon-assisted luminescence +! +! This is only for testing and so far only works for +! - photon emission +! - phonon emission +! - satellites only (no main peak renormalisation) +! - no double grid +! +subroutine EXCPH_X_phass_from_Hpert(wv,q,PL_ii) + ! + use frequency, ONLY:w_samp + use vec_operate, ONLY:c2a + use pars, ONLY:pi,SP,cZERO,rZERO,schlen + use units, ONLY:HA2EV,HA2CMm1 + use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY + use IO_int, ONLY:io_control + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_all_E,BS_R,EXC_occ,EXCPH_Gkkp,& +& BS_E_in,Sat_free,min_EXC_E,BS_R_left,BS_Sat_E_PH_abs,BS_Sat_E + use ELPH, ONLY:ph_modes,elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs_sq + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use R_lattice, ONLY:bz_samp,bz_samp_reset,d3k_factor,bare_qpg + use functions, ONLY:boltzman_f,bose_f + use LIVE_t, ONLY:live_timing + use stderr, ONLY:intc + use electrons, ONLY:spin_occ + use parser_m, ONLY:parser + use com, ONLY:msg,of_open_close + ! +#include + ! + type(bz_samp), intent(in) :: q + type(w_samp), intent(in) :: wv + complex(SP), intent(out) :: PL_ii(wv%n_freqs,3) + ! + ! Work space + ! + complex(SP) :: pole,W,Sat_emission,Sat_absorption,EXCPH_gaux,BS_aux + real(SP) :: min_E,exc_E,ph_E,bose_factor,boltzm_factor,E_alpha,E_beta + integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) + integer :: iq_db,iq_ibz + integer :: elph_branches_save(2) + type(PP_indexes)::px + complex(SP),allocatable :: BS_Sat_AMPLITUDE(:,:), BS_Sat_AMPLITUDE_PH_abs(:,:) + real(SP),allocatable :: BS_Sat_WEIGHT_sum(:,:), BS_Sat_WEIGHT_PH_abs_sum(:,:) + logical :: l_no_matrix_elements + ! + integer, external :: io_EXCPH_gkkp,io_ELPH + ! + min_pos =minloc(BS_all_E(1,:)) + min_EXC_E=minval(BS_all_E(1,:)) + ! + call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) + call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') + ! + ! Load the Exciton-phonon elements and phonon energies + ! + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp) + if(io_err/=0) call error('excph_gkkp databases not found!') + ! + elph_branches_save=elph_branches + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + if(io_err/=0) call error('gkkp_expanded databases not found!') + elph_branches=elph_branches_save + ! + ! Allocate modified workspace variables + ! + YAMBO_ALLOC(BS_Sat_WEIGHT_sum,(ph_modes,EXCPH_sum(1):EXCPH_sum(2))) + YAMBO_ALLOC(BS_Sat_WEIGHT_PH_abs_sum,(ph_modes,EXCPH_sum(1):EXCPH_sum(2))) + YAMBO_ALLOC(BS_Sat_AMPLITUDE,(ph_modes,EXCPH_sum(1):EXCPH_sum(2))) + YAMBO_ALLOC(BS_Sat_AMPLITUDE_PH_abs,(ph_modes,EXCPH_sum(1):EXCPH_sum(2))) + ! + BS_Sat_WEIGHT_sum =rZERO + BS_Sat_WEIGHT_PH_abs_sum =rZERO + BS_Sat_AMPLITUDE =cZERO + BS_Sat_AMPLITUDE_PH_abs =cZERO + PL_ii =cZERO + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/wv%n_freqs/)) + ! + call live_timing('Satellites',px%n_of_elements(myid+1)*q%nbz) + ! + do iq_bz=1,q%nbz + ! + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp) + ! + iq_db=Q_io_map(iq_bz) + call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') + ! + ! Add the contribution of q-point transition to the renormalization factors + ! for all excionts i_alpha + ! + do iw=1,wv%n_freqs + ! + if (.not.px%element_1D(iw)) cycle + ! + W=wv%p(iw) + ! + Sat_emission =cZERO + Sat_absorption =cZERO + ! + do il=elph_branches(1),elph_branches(2) + ! + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) + ! + iq_ibz=q%sstar(iq_bz,1) + ! + iq_db=Q_io_map(iq_bz) + ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) + ! + if(ph_EFAN_deltaE_treshold) then + BS_Sat_AMPLITUDE(il,i_beta)=BS_Sat_AMPLITUDE(il,i_beta)+& +& BS_aux*EXCPH_gaux/abs(BS_Sat_E(il,i_beta,i_alpha)) + endif + ! + if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>FAN_deltaE_treshold) then + BS_Sat_AMPLITUDE_PH_abs(il,i_beta)=BS_Sat_AMPLITUDE_PH_abs(il,i_beta)+& +& BS_aux*EXCPH_gaux/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha)) + endif + ! + enddo ! i_alpha + ! + BS_Sat_WEIGHT_sum(il,i_beta) = abs(BS_Sat_AMPLITUDE(il,i_beta))**2._SP + BS_Sat_WEIGHT_PH_abs_sum(il,i_beta) = abs(BS_Sat_AMPLITUDE_PH_abs(il,i_beta))**2._SP + ! + ! Phonon emission in luminescence [photon emission / phonon emission] + ! + Sat_emission=Sat_emission+& +& BS_Sat_WEIGHT_PH_abs_sum(il,i_beta)/(W-cmplx(pole))/pole*(1._SP+bose_factor)*boltzm_factor + ! + enddo ! i_beta + ! + enddo ! i_l + ! + PL_ii(iw,1) =PL_ii(iw,1)+(W+2.*ph_E)**2*Sat_emission/real(q%nbz,SP) + PL_ii(iw,3) =PL_ii(iw,3)+(W+2.*ph_E)**2*Sat_emission/real(q%nbz,SP) + ! + call live_timing(steps=1) + ! + enddo ! iw + ! + enddo ! i_q_bz + ! + call live_timing( ) + ! + do iw=1,wv%n_freqs + if (.not.px%element_1D(iw)) cycle + W=wv%p(iw) + PL_ii(iw,:)=-PL_ii(iw,:)*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/bare_qpg(1,1)**2 + enddo + ! + call PP_redux_wait(PL_ii) + ! + ! Free + ! + YAMBO_FREE(BS_Sat_WEIGHT_sum) + YAMBO_FREE(BS_Sat_WEIGHT_PH_abs_sum) + YAMBO_FREE(BS_Sat_AMPLITUDE) + YAMBO_FREE(BS_Sat_AMPLITUDE_PH_abs) + ! + call PP_indexes_reset(px) + call Sat_free() + ! +end subroutine EXCPH_X_phass_from_Hpert + diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 4918af785f..a16ea54334 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -40,7 +40,7 @@ subroutine EXCPH_eval_sat(iq_bz,q) ! Work space ! integer :: i_alpha,i_beta,il,iq_db,iq_ibz - real(SP) :: ph_E,E_alpha,E_beta,EXCPH_gkkp + real(SP) :: ph_E,E_alpha,E_beta,EXCPH_gaux ! ! Calculate satellites weights and renormalization factors without double-grid ! @@ -61,13 +61,14 @@ subroutine EXCPH_eval_sat(iq_bz,q) BS_Sat_E (il,i_beta,i_alpha)=E_beta-E_alpha+ph_E BS_Sat_E_PH_abs(il,i_beta,i_alpha)=E_beta-E_alpha-ph_E ! - EXCPH_gkkp=EXCPH_Gkkp_sq(il,i_beta,i_alpha) - if(l_no_matrix_elements) EXCPH_gkkp=1._SP + EXCPH_gaux=EXCPH_Gkkp_sq(il,i_beta,i_alpha) + if(l_no_matrix_elements) EXCPH_gaux=1._SP ! if(abs(BS_Sat_E(il,i_beta,i_alpha))>FAN_deltaE_treshold) & -& BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_gkkp/abs(BS_Sat_E(il,i_beta,i_alpha))**2 +& BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_gaux/abs(BS_Sat_E(il,i_beta,i_alpha))**2 + ! if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>FAN_deltaE_treshold) & -& BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_gkkp/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 +& BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_gaux/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! enddo enddo diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 8b2543e464..8cd52bf6f0 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -62,6 +62,7 @@ subroutine EXCPH_optics(E,k,q,X,wv) character(schlen) :: dbgd_string character(schlen) :: q_point type(levels) :: E_QF + logical :: l_sat_from_Hpert ! call section('*','EXCPH-Optics') ! @@ -172,10 +173,24 @@ subroutine EXCPH_optics(E,k,q,X,wv) endif endif ! - ! - ! Calculate X(w) include phonon assisted transitions - ! - call EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) + call parser('SatFromHPert',l_sat_from_Hpert) + if (l_sat_from_Hpert) then + ! + ! This option only computes phonon-assisted emission satellites + ! using perturbation-theory formula from excitonic Hamiltonian + ! (i.e. |sum_in BS_R (in) G (in,out)|^2 instead of sum_in BS_R(in)**2! G(in,out)**2 ) + ! + call warning(' Calculating only modified satellites for PL') + call EXCPH_X_phass_from_Hpert(wv,q,PL_ii) + ! + else + ! + ! Calculate X(w) including phonon-assisted transitions as + ! derived from exciton-phonon self-energy + ! + call EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) + ! + endif ! ! call X_setup_file_names(1,'bse ','phass',dbgd_string) ! From a39e8fefba6969583f3af09d0df727de1f1d3a4e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 28 Oct 2022 16:12:32 +0200 Subject: [PATCH 0487/1367] Version 5.1.0, Revision 22015, Hash 376d28cfe MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval_ber.F Bugs: -Fixed indexes, not sure everythings is correct Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval_ber.F | 28 +++++++++++++--------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 30cd288cd6..515753483e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22015 -#define YAMBO_HASH "21ed5f62e" +#define YAMBO_REVISION 22016 +#define YAMBO_HASH "376d28cfe" diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index 5871039f4f..63d3c41042 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -86,6 +86,11 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! EXCPH_gkkp=cZERO ! + ! Respect to the Bernardi notation + ! + ! alpha = m + ! beta = n + ! do i_beta=EXCPH_sum(1),EXCPH_sum(2) ! do i_H=1,BS_H_dim @@ -106,7 +111,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = R_iq_s^-1 ik_bz ! = R_iq_s^-1 R_ik_s ik_ibz ! -! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) + ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! ! Conduction scattering ! ====================== @@ -117,18 +122,15 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (i_Hp==0) cycle ! -! ik_db=K_io_map(ik_plus_iq_bz) - ik_db=K_io_map(ik_minus_iq_bz) + ik_db=K_io_map(ik_plus_iq_bz) +! ik_db=K_io_map(ik_minus_iq_bz) elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) ! -! if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) -! if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) - if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_alpha)) - if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_alpha) + if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) + if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) -! EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_alpha)*Xi_element - EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_beta)*Xi_element + EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_alpha)*Xi_element enddo ! enddo @@ -146,21 +148,17 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) if (i_Hp==0) cycle ! ik_db=K_io_map(ik_minus_iq_bz) - elph_gkkp= GKKP%dVc(il,ivp,iv,ik_db,1) /sqrt(2._SP*ph_E) + elph_gkkp= GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) ! -! if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) -! if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_alpha)) if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_alpha) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) -! EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_alpha)*Xi_element - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_beta)*Xi_element + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_alpha)*Xi_element enddo ! enddo ! - ! enddo ! enddo !Loop i_beta From 4f1a5bd9a374a287cbe9fa710d98bc11b69cfa37 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 28 Oct 2022 16:17:47 +0200 Subject: [PATCH 0488/1367] Version 5.1.0, Revision 22019, Hash 407e86936 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_eval_ber.F Bugs: -Fixed index Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_eval_ber.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 515753483e..1b7e3d5290 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22016 -#define YAMBO_HASH "376d28cfe" +#define YAMBO_REVISION 22019 +#define YAMBO_HASH "407e86936" diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index 63d3c41042..4ab61a1c5e 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -111,7 +111,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = R_iq_s^-1 ik_bz ! = R_iq_s^-1 R_ik_s ik_ibz ! - ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) + ip_bz = elemental_scattering(iq_s,ik_minus_iq_bz) ! ! Conduction scattering ! ====================== @@ -122,8 +122,8 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (i_Hp==0) cycle ! - ik_db=K_io_map(ik_plus_iq_bz) -! ik_db=K_io_map(ik_minus_iq_bz) +! ik_db=K_io_map(ik_plus_iq_bz) + ik_db=K_io_map(ik_minus_iq_bz) elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) ! if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) From 8dc7510b48d19b5365298953b57f4eb94b7f1ef9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 4 Nov 2022 17:23:38 +0100 Subject: [PATCH 0489/1367] Version 5.1.0, Revision 21789, Hash 3a2e456e8 MODIFIED * include/driver/version.h nloptics/NL_initialize.F Bugs: - [yambo_nl] Fixed wrong merge of previous commit Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/nloptics/NL_initialize.F | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5d78a6a24e..7c577a57eb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21763 -#define YAMBO_HASH "e719b4db8" +#define YAMBO_REVISION 21790 +#define YAMBO_HASH "3a2e456e8" diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 916de553cd..3eb156fcfd 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -162,19 +162,12 @@ subroutine NL_initialize(E,k) ! if(n_active_fields==0) call error('Not valid external field present!') ! -<<<<<<< HEAD - if(n_active_fields>1.or.n_frequencies==1) then - l_pump_and_probe=.true. - l_NE_with_fields=.true. - call msg('s','[NL] Variables NLEnSteps and NLEnRange are ignored ') -======= call msg('s','[NL] Number of active fields : ',n_active_fields) ! - if(n_active_fields>1.or.all(NL_er<0._SP)) then + if(n_active_fields>1.or.n_frequencies==1.or.all(NL_er<0._SP)) then l_pump_and_probe=.true. l_NE_with_fields=.true. call msg('s', '[NL] Variables NLEnSteps and NLEnRange are ignored ') ->>>>>>> bug-fixes call msg('sr','[NL] Pump and probe configuration: verbosity set to high') if(n_frequencies/=1) call error("NLEnSteps /=1 not compatible with Pump and Probe ") NL_verbosity=VERB_HIGH From dbf58502b7a4ffdc046b6fd5454dc8466072cf15 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 5 Nov 2022 01:31:22 +0100 Subject: [PATCH 0490/1367] Version 5.1.0, Revision 21790, Hash 8dc7510b4 MODIFIED * include/driver/version.h nloptics/NL_driver.F Bugs: - [yambo_nl] Fixed timing when restarting in time Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/nloptics/NL_driver.F | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7c577a57eb..161eff4c08 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21790 -#define YAMBO_HASH "3a2e456e8" +#define YAMBO_REVISION 21791 +#define YAMBO_HASH "8dc7510b4" diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index a81f23e39b..2cc9c6eb49 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -64,7 +64,7 @@ subroutine NL_driver(E,X,k,q,Dip) ! ! Work Space ! - integer :: i_f,i1,i_sp_pol,N_sample_size,wf_ng_save,io_err + integer :: i_f,i1,i_sp_pol,nw,N_sample_size,wf_ng_save,io_err logical :: l_dynamics_is_over real(SP) :: OBSERVABLES(25),Time ! @@ -210,7 +210,9 @@ subroutine NL_driver(E,X,k,q,Dip) ! ! Start-Up & Timing !=================== - call live_timing('[NL] Frequencies ',PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1)*NE_steps) + nw=PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1) + if(.not.l_pump_and_probe) NE_i_time=0 + call live_timing('[NL] Frequencies',nw*(NE_steps-NE-i_time)) ! do i_f=1,n_frequencies ! From 6c30fe51271f7e3910f1718f226b4cc7437f6a57 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 9 Nov 2022 00:02:12 +0100 Subject: [PATCH 0491/1367] Version 5.1.0, Revision 21791, Hash dbf58502b MODIFIED * include/driver/version.h nloptics/NL_driver.F Bugs: - [yambo_nl] Fixed typo Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/nloptics/NL_driver.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 161eff4c08..3bfa657ef1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21791 -#define YAMBO_HASH "8dc7510b4" +#define YAMBO_REVISION 21792 +#define YAMBO_HASH "dbf58502b" diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 2cc9c6eb49..1fd5a5af27 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -212,7 +212,7 @@ subroutine NL_driver(E,X,k,q,Dip) !=================== nw=PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1) if(.not.l_pump_and_probe) NE_i_time=0 - call live_timing('[NL] Frequencies',nw*(NE_steps-NE-i_time)) + call live_timing('[NL] Frequencies',nw*(NE_steps-NE_i_time)) ! do i_f=1,n_frequencies ! From d404dfc89ce3b3d135db111bdee9825a9e89eb73 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Sat, 12 Nov 2022 14:55:59 +0100 Subject: [PATCH 0492/1367] New scheme for PL_diago_residual and writing of OUTPUT fixed --- PL_diago_residual_Pedro.F | 236 +++++++++++++++ PL_diago_residual_halfBSE.F | 244 +++++++++++++++ compile_yambo_gcc | 20 ++ .../K_components_folded_in_serial_arrays.F | 2 +- src/bse/K_diago_driver.F | 6 +- src/bse/PL_diago_residual.F | 280 +++++++++++------- src/bse/PL_diago_residual_old.F | 193 ++++++++++++ src/ph-el/PHEL_from_GF_to_quasiphonons.F | 2 +- 8 files changed, 865 insertions(+), 118 deletions(-) create mode 100755 PL_diago_residual_Pedro.F create mode 100755 PL_diago_residual_halfBSE.F create mode 100644 compile_yambo_gcc mode change 100644 => 100755 src/bse/PL_diago_residual.F create mode 100644 src/bse/PL_diago_residual_old.F diff --git a/PL_diago_residual_Pedro.F b/PL_diago_residual_Pedro.F new file mode 100755 index 0000000000..cbd1df55be --- /dev/null +++ b/PL_diago_residual_Pedro.F @@ -0,0 +1,236 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BS__dim),BS_V_right(BS_H_dim,BS_H_dim) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + complex(SP),optional,intent(in) :: BS_overlap(BS_H_dim,BS_H_dim) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_K_dim(1)),B(BS_H_dim) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig +! +! Hermitian residual +!==================== +! +do i_c=1,3 + P_x_fZ(1:BS_H_dim,i_c,1)=BSS_dipoles_PL(i_c,1:BS_H_dim)*sqrt(BSS_eh_f(1:BS_H_dim)) ! Pi multiplied by (fc-fv) dipoles of + !current <(vk|gradCk)> C is conduction +enddo +! +write(*,*) 'BS_K_dim(1)', BS_K_dim(1) +write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) +write(*,*) 'shape(BS_V_right)', shape(BS_V_right) +write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) +do i_l=1,BS_K_dim(1) + ! + if (.not.px%element_1D(i_l)) cycle + ! + ! R_over_R_x_A = R<_j/R_j A^l_j + ! + do ik = 1, BS_K_dim(1) + if (BSS_eh_f(ik) .gt. rZERO) then + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + R_over_R_x_A(2,ik) = BSS_PL_f(BS_K_dim(1)+ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + endif + enddo + ! + ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j + ! + adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)), R_over_R_x_A(1,1:BS_K_dim(1)))!resonant + adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(BS_K_dim(1)+1:2*BS_K_dim(1),i_l)),R_over_R_x_A(2,1:BS_K_dim(1))) + !antiresonant, no error if two arrays have different dimensions + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i + ! + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(1:BS_K_dim(1),i_l),P_x_fZ(1:BS_K_dim(1),i_c,1)) + ! + enddo + ! + ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) + ! that cancel out. + ! + BS_R_PL(:,i_l)=real(dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:)) + ! + call live_timing(steps=1) + ! +enddo +! +call live_timing() +! +call PP_redux_wait(BS_R_PL) +! +call PP_indexes_reset(px) +! +end subroutine PL_diago_herm_residual + +subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) + ! + ! Non-Hermitian residual + !======================== + ! + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + complex(SP),optional,intent(in) :: BS_overlap(BS_n_eig,BS_n_eig) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_K_dim(1)),B(BS_H_dim) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig + ! + ! 1=> left + ! 2=> right + ! + do i_c=1,3 + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) + enddo + do i_K=BS_K_dim(1)+1,BS_H_dim + P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + enddo + enddo + ! + do i_lr=1,BS_H_dim + ! + if (.not.px%element_1D(i_lr)) cycle + ! + ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i + ! + B=cZERO + do i_ll=1,BS_H_dim + B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) + enddo + ! + ! R_over_R_x_A = R<_j/R_j B^l_j + ! + R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) + ! + ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j + ! + adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i + ! + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) + ! + ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) + ! + Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) + ! + enddo + ! + BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& +& Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& +& Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) + ! + call live_timing(steps=1) + ! + enddo + ! + call live_timing() + ! + call PP_redux_wait(BS_R_PL) + ! + call PP_indexes_reset(px) + ! + + end subroutine PL_diago_non_herm_residual diff --git a/PL_diago_residual_halfBSE.F b/PL_diago_residual_halfBSE.F new file mode 100755 index 0000000000..85d02484bb --- /dev/null +++ b/PL_diago_residual_halfBSE.F @@ -0,0 +1,244 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BSS_n_eig,BSS_n_eig),BS_V_right(BSS_n_eig,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + real(SP) :: half_BSS_n_eig + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "Hermitian run" + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig + write(*,*) "BS_K_dim", BS_K_dim(2) + half_BSS_n_eig=BSS_n_eig/2. +! +! Hermitian residual +!==================== +! +do i_c=1,3 + P_x_fZ(1:BSS_n_eig,i_c,1)=BSS_dipoles_PL(i_c,1:BSS_n_eig)*sqrt(BSS_eh_f(1:BSS_n_eig)) ! Pi multiplied by (fc-fv) dipoles of + !current <(vk|gradCk)> C is conduction +enddo +! +write(*,*) 'BS_K_dim(1)', BS_K_dim(1) +write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) +write(*,*) 'shape(BS_V_right)', shape(BS_V_right) +write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) +!write(*,*) 'BSS_V_right(577,576)', BS_V_right(577,576) +do i_l=1,BSS_n_eig + ! + if (.not.px%element_1D(i_l)) cycle + ! + ! R_over_R_x_A = R<_j/R_j A^l_j + ! + do ik = 1, BS_K_dim(1) + if (BSS_eh_f(ik) .gt. rZERO) then + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + R_over_R_x_A(2,ik) = BSS_PL_f(BS_K_dim(1)+ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + endif + enddo + ! + ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j + ! + adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:half_BSS_n_eig,i_l)),& + R_over_R_x_A(1,1:half_BSS_n_eig)) !resonant + adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(half_BSS_N_eig+1:BS_K_dim(1),i_l)),& + R_over_R_x_A(2,half_BSS_n_eig:BS_K_dim(1))) + !antiresonant, no error if two arrays have different dimensions + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i + ! + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(1:BS_K_dim(1),i_l),P_x_fZ(1:BS_K_dim(1),i_c,1)) + ! + enddo + ! + ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) + ! that cancel out. + ! + BS_R_PL(:,i_l)=real(dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:)) + ! + call live_timing(steps=1) + ! +enddo +! +call live_timing() +! +call PP_redux_wait(BS_R_PL) +! +call PP_indexes_reset(px) +! +end subroutine PL_diago_herm_residual + +subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) + ! + ! Non-Hermitian residual + !======================== + ! + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "Non-Hermitian run" + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig + ! + ! 1=> left + ! 2=> right + ! + do i_c=1,3 + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) + enddo + do i_K=BS_K_dim(1)+1,BS_H_dim + P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + enddo + enddo + ! + do i_lr=1,BS_H_dim + ! + if (.not.px%element_1D(i_lr)) cycle + ! + ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i + ! + B=cZERO + do i_ll=1,BS_H_dim + B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) + enddo + ! + ! R_over_R_x_A = R<_j/R_j B^l_j + ! + write (*,*) "shape(BSS_PL_f)", shape(BSS_PL_f) + R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) + ! + ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j + ! + adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i + ! + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) + ! + ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) + ! + Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) + ! + enddo + ! + BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& +& Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& +& Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) + ! + call live_timing(steps=1) + ! + enddo + ! + call live_timing() + ! + call PP_redux_wait(BS_R_PL) + ! + call PP_indexes_reset(px) + ! + + end subroutine PL_diago_non_herm_residual diff --git a/compile_yambo_gcc b/compile_yambo_gcc new file mode 100644 index 0000000000..5f6b5e5025 --- /dev/null +++ b/compile_yambo_gcc @@ -0,0 +1,20 @@ +#!/bin/bash + +make clean_all + +./configure --prefix='/home/rireho/codes/yambo/branches/fix-pl' \ +FCFLAGS='-w -fallow-argument-mismatch -O2 -fcheck=bounds' FFLAGS="-w -fallow-argument-mismatch -O2 -fcheck=bounds" \ +--enable-dp \ +--enable-time-profile=no \ +--enable-debug-flags \ +--enable-hdf5-p2y-support \ +--enable-iotk \ +--enable-memory-profile \ +--enable-msgs-comps \ +--with-netcdf-path='/sw/arch/Centos8/EB_production/2021/software/netCDF/4.8.0-gompi-2021a/' \ +--with-netcdff-path='/sw/arch/Centos8/EB_production/2021/software/netCDF-Fortran/4.5.3-gompi-2021a/' \ +--with-hdf5-path='/sw/arch/Centos8/EB_production/2021/software/HDF5/1.10.7-gompi-2021a/' \ +--with-blas-libs="-L/sw/arch/Centos8/EB_production/2021/software/OpenBLAS/0.3.15-GCC-10.3.0/lib -lopenblas" \ +--with-lapack-libs="-L/sw/arch/Centos8/EB_production/2021/software/OpenBLAS/0.3.15-GCC-10.3.0/lib -lopenblas" \ +--with-fft-path='/sw/arch/Centos8/EB_production/2021/software/FFTW/3.3.9-gompi-2021a/' + diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 2dbadef4be..8df48db9eb 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -107,7 +107,7 @@ subroutine K_components_folded_in_serial_arrays(iq) BSS_eh_table(H_pos,:)=(/i_k_bz,i_v,i_c,i_sp_c,i_sp_v/) ! BSS_eh_E(H_pos)=BS_T_grp(i_g)%E(i_Tr,1)*ares_fac - write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr + !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%Z)) BSS_eh_Z(H_pos)=BS_T_grp(i_g)%Z(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%W)) BSS_eh_W(H_pos)=BS_T_grp(i_g)%W(i_Tr)*ares_fac diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 8d042a381e..2d165e7df5 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -257,14 +257,16 @@ subroutine K_diago_driver(iq,W,X_static) if (l_BS_optics ) call K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_V_right,BS_R_right_kerr) if (l_BS_magnons) call K_diago_non_herm_magnons_residual(BS_R_left_magn,BS_R_right_magn,BS_V_left,BS_V_right,BS_overlap) - if (l_BS_photolum)call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) + write (*,*) 'Shape BS_V_left', shape(BS_V_left) + if (l_BS_photolum)call PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! else ! if (l_BS_optics) call K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_mat,BS_R_right_kerr) if (l_BS_magnons) call K_diago_herm_magnons_residual(i_BS_mat,BS_R_left_magn,BS_R_right_magn) - if (l_BS_photolum)call PL_diago_residual(BS_mat,BS_mat,BS_R_PL,K_is_not_hermitian) + write (*,*) 'Shape BS_mat', shape(BS_mat) + if (l_BS_photolum)call PL_diago_herm_residual(BS_mat,BS_mat,BS_R_PL) ! endif ! diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F old mode 100644 new mode 100755 index 0cc2ecdb68..85d02484bb --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -21,9 +21,9 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) +subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) ! - ! PL Residuals + ! Resonant PL Residuals ! use pars, ONLY:SP,rZERO,cZERO,cI use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp @@ -36,22 +36,21 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! implicit none ! - logical, intent(in) :: K_is_not_hermitian - complex(SP),intent(in) :: BS_V_left(BS_H_dim,BS_H_dim),BS_V_right(BS_H_dim,BS_H_dim) - real(SP) ,intent(out) :: BS_R_PL(2,BS_H_dim) - complex(SP),optional,intent(in) :: BS_overlap(BS_H_dim,BS_H_dim) + complex(SP),intent(in) :: BS_V_left(BSS_n_eig,BSS_n_eig),BS_V_right(BSS_n_eig,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + real(SP) :: half_BSS_n_eig ! ! Workspace ! type(PP_indexes) ::px integer ::i_l,i_c,i_K,i_lr,i_ll, ik complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& -& R_over_R_x_A(2,BS_K_dim(1)),B(BS_H_dim) +& R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) ! ! Parallel indexes ! call PP_indexes_reset(px) - call PARALLEL_index(px,(/BS_H_dim/)) + call PARALLEL_index(px,(/BSS_n_eig/)) ! ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) ! @@ -65,123 +64,175 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! Live-Timing ! call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "Hermitian run" write(*,*) "BS_H_dim", BS_H_dim write(*,*) "BSS_n_eig", BSS_n_eig + write(*,*) "BS_K_dim", BS_K_dim(2) + half_BSS_n_eig=BSS_n_eig/2. +! +! Hermitian residual +!==================== +! +do i_c=1,3 + P_x_fZ(1:BSS_n_eig,i_c,1)=BSS_dipoles_PL(i_c,1:BSS_n_eig)*sqrt(BSS_eh_f(1:BSS_n_eig)) ! Pi multiplied by (fc-fv) dipoles of + !current <(vk|gradCk)> C is conduction +enddo +! +write(*,*) 'BS_K_dim(1)', BS_K_dim(1) +write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) +write(*,*) 'shape(BS_V_right)', shape(BS_V_right) +write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) +!write(*,*) 'BSS_V_right(577,576)', BS_V_right(577,576) +do i_l=1,BSS_n_eig + ! + if (.not.px%element_1D(i_l)) cycle + ! + ! R_over_R_x_A = R<_j/R_j A^l_j + ! + do ik = 1, BS_K_dim(1) + if (BSS_eh_f(ik) .gt. rZERO) then + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + R_over_R_x_A(2,ik) = BSS_PL_f(BS_K_dim(1)+ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + endif + enddo + ! + ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j + ! + adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:half_BSS_n_eig,i_l)),& + R_over_R_x_A(1,1:half_BSS_n_eig)) !resonant + adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(half_BSS_N_eig+1:BS_K_dim(1),i_l)),& + R_over_R_x_A(2,half_BSS_n_eig:BS_K_dim(1))) + !antiresonant, no error if two arrays have different dimensions + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i + ! + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(1:BS_K_dim(1),i_l),P_x_fZ(1:BS_K_dim(1),i_c,1)) + ! + enddo + ! + ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) + ! that cancel out. + ! + BS_R_PL(:,i_l)=real(dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:)) + ! + call live_timing(steps=1) + ! +enddo +! +call live_timing() +! +call PP_redux_wait(BS_R_PL) +! +call PP_indexes_reset(px) +! +end subroutine PL_diago_herm_residual + +subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! ! Non-Hermitian residual !======================== ! - if (K_is_not_hermitian) then + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "Non-Hermitian run" + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig ! ! 1=> left ! 2=> right ! - do i_c=1,3 - do i_K=1,BS_K_dim(1) - P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) - P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) - enddo - do i_K=BS_K_dim(1)+1,BS_H_dim - P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) - P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) - enddo - enddo - ! - do i_lr=1,BS_H_dim - ! - if (.not.px%element_1D(i_lr)) cycle - ! - ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i - ! - B=cZERO - do i_ll=1,BS_H_dim - B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) - enddo - ! - ! R_over_R_x_A = R<_j/R_j B^l_j - ! - R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) - ! - ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j - ! - adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) - ! - do i_c=1,3 - ! - ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i - ! - Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) - ! - ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) - ! - Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) - ! - enddo - ! - BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& + do i_c=1,3 + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) + enddo + do i_K=BS_K_dim(1)+1,BS_H_dim + P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + enddo + enddo + ! + do i_lr=1,BS_H_dim + ! + if (.not.px%element_1D(i_lr)) cycle + ! + ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i + ! + B=cZERO + do i_ll=1,BS_H_dim + B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) + enddo + ! + ! R_over_R_x_A = R<_j/R_j B^l_j + ! + write (*,*) "shape(BSS_PL_f)", shape(BSS_PL_f) + R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) + ! + ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j + ! + adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i + ! + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) + ! + ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) + ! + Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) + ! + enddo + ! + BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& & Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& & Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) - ! - call live_timing(steps=1) - ! - enddo - ! - else - ! - ! Hermitian residual - !==================== - ! - do i_c=1,3 - P_x_fZ(:,i_c,1)=BSS_dipoles_PL(i_c,:)*sqrt(BSS_eh_f(:)) - enddo - ! - write(*,*) 'BS_K_dim(1)', BS_K_dim(1) - write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) - write(*,*) 'shape(BS_V_right)', shape(BS_V_right) - write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) - ! - do i_l=1,2!BS_K_dim(1) - ! - if (.not.px%element_1D(i_l)) cycle - ! - ! R_over_R_x_A = R<_j/R_j A^l_j - ! - if (i_l == 1) write(*,*) 'BSS_PL_f', dot_product(BSS_PL_f(1:BS_K_dim(1)),BSS_PL_f(1:BS_K_dim(1))) - if (i_l == 1) write(*,*) 'BS_V_right', dot_product(BS_V_right(1:BS_K_dim(1),1),BS_V_right(1:BS_K_dim(1),1)) - if (i_l == 1) write(*,*) 'BSS_eh_f', dot_product(BSS_eh_f(1:BS_K_dim(1)),BSS_eh_f(1:BS_K_dim(1))) - ! - do ik=1,BS_K_dim(1) - R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) - write(*,*) ik, R_over_R_x_A(1,ik), BSS_PL_f(ik),BS_V_right(ik,i_l),BSS_eh_f(ik) - enddo -! R_over_R_x_A(1,1:BS_K_dim(1)) = BSS_PL_f(1:BS_K_dim(1))*BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) - R_over_R_x_A(2,1:BS_K_dim(1)) = BSS_PL_f(BS_K_dim(1)+1:)*BS_V_right(BS_K_dim(1)+1:,i_l)/BSS_eh_f(BS_K_dim(1)+1:) - ! - if (i_l == 1) write(*,*) 'R_over_R_x_A(1,1)', R_over_R_x_A(1,1) - ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j - ! - adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)),R_over_R_x_A(1,1:BS_K_dim(1))) - adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(BS_K_dim(1)+1:,i_l)),R_over_R_x_A(2,BS_K_dim(1)+1:)) - ! - do i_c=1,3 - ! - ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i - ! - Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_H_dim,BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) - ! - enddo - ! - ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) - ! that cancel out. - ! - BS_R_PL(:,i_l)=dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:) - ! - if (i_l == 1) write(*,*) BS_R_PL(:,i_l) - call live_timing(steps=1) - ! - enddo - ! - endif + ! + call live_timing(steps=1) + ! + enddo ! call live_timing() ! @@ -189,4 +240,5 @@ subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_ ! call PP_indexes_reset(px) ! -end subroutine PL_diago_residual + + end subroutine PL_diago_non_herm_residual diff --git a/src/bse/PL_diago_residual_old.F b/src/bse/PL_diago_residual_old.F new file mode 100644 index 0000000000..21c448056e --- /dev/null +++ b/src/bse/PL_diago_residual_old.F @@ -0,0 +1,193 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) + ! + ! PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + logical, intent(in) :: K_is_not_hermitian + complex(SP),intent(in) :: BS_V_left(BS_K_dim(1),BSS_n_eig),BS_V_right(BS_K_dim(1),BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BS_H_dim) + complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BS_H_dim/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig + ! + ! Non-Hermitian residual + !======================== + ! + if (K_is_not_hermitian) then + ! + ! 1=> left + ! 2=> right + ! + do i_c=1,3 + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) + enddo + do i_K=BS_K_dim(1)+1,BS_H_dim + P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + enddo + enddo + ! + do i_lr=1,BS_H_dim + ! + if (.not.px%element_1D(i_lr)) cycle + ! + ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i + ! + B=cZERO + do i_ll=1,BS_H_dim + B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) + enddo + ! + ! R_over_R_x_A = R<_j/R_j B^l_j + ! + R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) + ! + ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j + ! + adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i + ! + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) + ! + ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) + ! + Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) + ! + enddo + ! + BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& +& Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& +& Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) + ! + call live_timing(steps=1) + ! + enddo + ! + else + ! + ! Hermitian residual + !==================== + ! + do i_c=1,3 + P_x_fZ(:,i_c,1)=BSS_dipoles_PL(i_c,:)*sqrt(BSS_eh_f(:)) + enddo + ! + write(*,*) 'BS_K_dim(1)', BS_K_dim(1) + write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) + write(*,*) 'shape(BS_V_right)', shape(BS_V_right) + write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) + write(*,*) 'BS_H_dim', BS_H_dim + ! + do i_l=1,2!BS_K_dim(1) + ! + if (.not.px%element_1D(i_l)) cycle + ! + ! R_over_R_x_A = R<_j/R_j A^l_j + ! + !if (i_l == 1) write(*,*) 'BSS_PL_f', dot_product(BSS_PL_f(1:BS_K_dim(1)),BSS_PL_f(1:BS_K_dim(1))) + !if (i_l == 1) write(*,*) 'BS_V_right', dot_product(BS_V_right(1:BS_K_dim(1),1),BS_V_right(1:BS_K_dim(1),1)) + !if (i_l == 1) write(*,*) 'BSS_eh_f', dot_product(BSS_eh_f(1:BS_K_dim(1)),BSS_eh_f(1:BS_K_dim(1))) + ! + do ik=1,BS_K_dim(1) + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + write(*,*) ik, R_over_R_x_A(1,ik), BSS_PL_f(ik),BS_V_right(ik,i_l),BSS_eh_f(ik) + enddo +! R_over_R_x_A(1,1:BS_K_dim(1)) = BSS_PL_f(1:BS_K_dim(1))*BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) + R_over_R_x_A(2,1:BS_H_dim) = BSS_PL_f(1:BS_K_dim(1))*BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) + ! + if (i_l == 1) write(*,*) 'R_over_R_x_A(1,1)', R_over_R_x_A(1,1) + ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j + ! + adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)),R_over_R_x_A(1,1:BS_H_dim)) + adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)),R_over_R_x_A(2,BS_H_dim:)) + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i + ! + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_H_dim,BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) + ! + enddo + ! + ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) + ! that cancel out. + ! + BS_R_PL(:,i_l)=dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:) + ! + if (i_l == 1) write(*,*) BS_R_PL(:,i_l) + call live_timing(steps=1) + ! + enddo + ! + endif + ! + call live_timing() + ! + call PP_redux_wait(BS_R_PL) + ! + call PP_indexes_reset(px) + ! +end subroutine PL_diago_residual diff --git a/src/ph-el/PHEL_from_GF_to_quasiphonons.F b/src/ph-el/PHEL_from_GF_to_quasiphonons.F index da3b991dee..989f7aa9ab 100644 --- a/src/ph-el/PHEL_from_GF_to_quasiphonons.F +++ b/src/ph-el/PHEL_from_GF_to_quasiphonons.F @@ -112,7 +112,7 @@ subroutine PHEL_from_GF_to_quasiphonons(il,iq,ph_freq,QPH) do iw=1,QPH%N_D_freqs W=real( QPH%W(iw) ) + cI*0.1_SP/1000._SP/HA2EV if (trim(QPH%what)=="FULL") then - QPH%D(iw)=D_from_PI(cmplx(ph_freq),PHEL_qp%PI(il,iq,iw)-PI_ref,W) + QPH%D(iw)=czero !D_from_PI(cmplx(ph_freq),PHEL_qp%PI(il,iq,iw)-PI_ref,W) else if (.not.trim(QPH%what)=="DDFPT)") then QPH%D(iw)=D_from_POLE_and_GAMMA(QPH%Pole,QPH%Gamma,QPH%Residual,W) endif From 2cd61d9ae165bb696b927d9083ec45db77c4f246 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Nov 2022 13:15:07 +0100 Subject: [PATCH 0493/1367] Version 5.1.0, Revision 22020, Hash 4f1a5bd9a MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_gkkp_eval_ber.F Additions: -Added cutoff of 3KT on the q-resolved PL Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 5 +++++ src/exc-ph/EXCPH_gkkp_eval_ber.F | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1b7e3d5290..f972ab10ed 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22019 -#define YAMBO_HASH "407e86936" +#define YAMBO_REVISION 22020 +#define YAMBO_HASH "4f1a5bd9a" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index a4f0d29fb0..6a8136df1e 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -49,6 +49,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use R_lattice, ONLY:bz_samp,bz_samp_reset + use D_lattice, ONLY:Boltz_Temp use functions, ONLY:boltzman_f,bose_f use LIVE_t, ONLY:live_timing use stderr, ONLY:intc @@ -288,6 +289,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call k_ibz2bz(q,'a',.true.) ! Write on disk do iq_bz=1,q%nbz + ! + iq_ibz = q%sstar(iq_bz,1) + if(.not.use_PH_DbGd.and.abs(BS_all_E(EXCPH_sum(1),iq_ibz)-min_EXC_E)<3.0*Boltz_Temp) cycle + ! pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) iq_ibz = q%sstar(iq_bz,1) ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index 4ab61a1c5e..b5aa892061 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -135,6 +135,13 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! enddo ! + enddo + ! + enddo !Loop i_beta + ! + do i_beta=EXCPH_sum(1),EXCPH_sum(2) + ! + do i_H=1,BS_H_dim ! Valence Scattering ! ========================= ! From 23d6a59947b9f63ef8198648e5ee0d53ba02427d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Nov 2022 15:58:51 +0100 Subject: [PATCH 0494/1367] Version 5.1.0, Revision 22021, Hash 2cd61d9ae MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F modules/mod_EXCPH.F Bugs: - Additions: -Improved search of q-points Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 5 ++++- src/modules/mod_EXCPH.F | 8 ++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f972ab10ed..339d47e29d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22020 -#define YAMBO_HASH "4f1a5bd9a" +#define YAMBO_REVISION 22021 +#define YAMBO_HASH "2cd61d9ae" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 6a8136df1e..3d32435caf 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -291,7 +291,10 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) do iq_bz=1,q%nbz ! iq_ibz = q%sstar(iq_bz,1) - if(.not.use_PH_DbGd.and.abs(BS_all_E(EXCPH_sum(1),iq_ibz)-min_EXC_E)<3.0*Boltz_Temp) cycle + if(.not.use_PH_DbGd.and.abs(BS_all_E(EXCPH_sum(1),iq_ibz)-min_EXC_E)>3.0*Boltz_Temp) then + call msg('s','Too weak signal at q-point '//intc(iq_bz)//' skipped ') + cycle + endif ! pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) iq_ibz = q%sstar(iq_bz,1) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index d1a337a9c7..8a25501580 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -258,7 +258,7 @@ end subroutine BSE_free subroutine build_Q_map(q) use R_lattice, ONLY:bz_samp use zeros, ONLY:k_iku_zero - use vec_operate, ONLY:v_is_zero + use vec_operate, ONLY:v_is_zero,c2a,rlu_v_is_zero use ELPH, ONLY:PH_qpt use com, ONLY:msg ! @@ -266,6 +266,7 @@ subroutine build_Q_map(q) type(bz_samp) ::q ! integer :: iq,idb + real(SP) :: v_rlu(3) ! YAMBO_ALLOC(DB_Q_map,(q%nbz)) ! @@ -274,7 +275,10 @@ subroutine build_Q_map(q) DB_Q_map=0 do iq=1,q%nbz do idb=1,q%nbz - if(.not.v_is_zero(q%ptbz(iq,:)-PH_qpt(idb,:),zero_=k_iku_zero)) cycle + v_rlu=q%ptbz(iq,:)-PH_qpt(idb,:) + call c2a(v_in=v_rlu,mode='ki2a') +! if(.not.v_is_zero(q%ptbz(iq,:)-PH_qpt(idb,:),zero_=k_iku_zero)) cycle + if(.not.rlu_v_is_zero(v_rlu)) cycle DB_Q_map(iq)=idb exit enddo From 025b7c72f6b017422722286d8bb7c31a26672c64 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Nov 2022 16:31:39 +0100 Subject: [PATCH 0495/1367] Version 5.1.0, Revision 22022, Hash 23d6a5994 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_eval_sat.F Bugs: -Fixed different bugs but not all Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 34 ++++++++++++++++++++-------------- src/exc-ph/EXCPH_eval_sat.F | 3 +++ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 339d47e29d..fbab3e028e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22021 -#define YAMBO_HASH "2cd61d9ae" +#define YAMBO_REVISION 22022 +#define YAMBO_HASH "23d6a5994" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 3d32435caf..3d5a2ac866 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -105,7 +105,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! call parser('PLqres',l_prt_pl_q_res) if(l_prt_pl_q_res) then - YAMBO_ALLOC(PL_ii_q,(wv%n_freqs,3,q%nbz)) + YAMBO_ALLOC(PL_ii_q,(wv%n_freqs,3,q%nibz)) PL_ii_q=cZERO endif ! @@ -132,12 +132,16 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) max_Sat_weight_PH_abs=rZERO max_Sat_pos_PH_abs =0 ! + if(.not.allocated(q%k_table)) call k_build_up_BZ_tables(q) + ! call PP_indexes_reset(px) call PARALLEL_index(px,(/wv%n_freqs/)) ! - call live_timing('Satellites',px%n_of_elements(myid+1)*q%nbz) + call live_timing('Satellites',px%n_of_elements(myid+1)*q%nibz) ! - do iq_bz=1,q%nbz + do iq_ibz=1,q%nibz + ! + iq_bz=q%k_table(iq_ibz,1) ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) @@ -190,15 +194,15 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Add the satellites to the dielectric constant and luminescence ! - Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) - Epsilon_ii(iw,3)=Epsilon_ii(iw,3)+Sat_alpha_abs*BS_R(i_alpha)/real(q%nbz,SP) + Epsilon_ii(iw,1)=Epsilon_ii(iw,1)+Sat_alpha_abs*BS_R(i_alpha)*q%weights(iq_ibz) !/real(q%nbz,SP) + Epsilon_ii(iw,3)=Epsilon_ii(iw,3)+Sat_alpha_abs*BS_R(i_alpha)*q%weights(iq_ibz) !/real(q%nbz,SP) ! - PL_ii(iw,1) =PL_ii(iw,1)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) - PL_ii(iw,3) =PL_ii(iw,3)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii(iw,1) =PL_ii(iw,1)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)*q%weights(iq_ibz) !/real(q%nbz,SP) + PL_ii(iw,3) =PL_ii(iw,3)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)*q%weights(iq_ibz) !/real(q%nbz,SP) ! if(l_prt_pl_q_res) then - PL_ii_q(iw,1,iq_bz) =PL_ii_q(iw,1,iq_bz)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) - PL_ii_q(iw,3,iq_bz) =PL_ii_q(iw,3,iq_bz)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)/real(q%nbz,SP) + PL_ii_q(iw,1,iq_ibz) =PL_ii_q(iw,1,iq_ibz)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)*q%weights(iq_ibz) !/real(q%nbz,SP) + PL_ii_q(iw,3,iq_ibz) =PL_ii_q(iw,3,iq_ibz)+(W+2.*ph_E)**2*Sat_alpha_emiss*BS_R(i_alpha)*q%weights(iq_ibz) !/real(q%nbz,SP) endif ! enddo @@ -288,16 +292,16 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) if(l_prt_pl_q_res) then call k_ibz2bz(q,'a',.true.) ! Write on disk - do iq_bz=1,q%nbz + do iq_ibz=1,q%nibz ! - iq_ibz = q%sstar(iq_bz,1) +! iq_ibz = q%sstar(iq_bz,1) if(.not.use_PH_DbGd.and.abs(BS_all_E(EXCPH_sum(1),iq_ibz)-min_EXC_E)>3.0*Boltz_Temp) then call msg('s','Too weak signal at q-point '//intc(iq_bz)//' skipped ') cycle endif ! - pl_file_name ='pl_bse_resolved_q'//intc(iq_bz) - iq_ibz = q%sstar(iq_bz,1) + pl_file_name ='pl_bse_resolved_q'//intc(iq_ibz) +! iq_ibz = q%sstar(iq_bz,1) ! call of_open_close(pl_file_name,'ot') ! @@ -310,7 +314,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) call msg('o pl_bse','#',headers,INDENT=0,USE_TABS=.TRUE.) call msg('o pl_bse','#') call msg('o pl_bse','# iq_ibz = '//intc(iq_ibz)) - call msg('o pl_bse','# q_pt_bz(rlu) = ',q%ptbz(iq_bz,:)) + call msg('o pl_bse','# q_pt_bz(rlu) = ',q%pt(iq_ibz,:)) +! call msg('o pl_bse','# q_pt_bz(rlu) = ',q%ptbz(iq_bz,:)) ! ! Write output on file ! @@ -383,6 +388,7 @@ subroutine Sat_report() call msg('sr',' Max satellite weight: ') do i1=EXCPH_states(1),EXCPH_states(2) iq_bz = max_Sat_pos(i1,1) + write(*,*) 'passo qui ',iq_bz iq_db =Q_io_map(iq_bz) iq_ibz =q%sstar(iq_bz,1) ph_E=sqrt(abs(ph_freqs_sq(iq_db,max_Sat_pos(i1,2)))) diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index a16ea54334..a4ced0d6c6 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -46,6 +46,9 @@ subroutine EXCPH_eval_sat(iq_bz,q) ! iq_ibz=q%sstar(iq_bz,1) ! + BS_Sat_WEIGHT =rZERO + BS_Sat_WEIGHT_PH_abs=rZERO + ! do il=elph_branches(1),elph_branches(2) ! iq_db=Q_io_map(iq_bz) From b428b57041611df754916dd5b9323bf3c738d012 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 15 Nov 2022 16:42:44 +0100 Subject: [PATCH 0496/1367] Version 5.1.0, Revision 22023, Hash 025b7c72f MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F Bugs: -Fixed fortran problem Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fbab3e028e..09848750e3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22022 -#define YAMBO_HASH "23d6a5994" +#define YAMBO_REVISION 22023 +#define YAMBO_HASH "025b7c72f" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 3d5a2ac866..91e48ede08 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -354,18 +354,26 @@ subroutine Find_Max_Sat() ! ! Work Space ! - integer :: i1 + integer :: i1 + real(SP) :: max_Sat(EXCPH_states(1):EXCPH_states(2)) + real(SP) :: max_Sat_PH_abs(EXCPH_states(1):EXCPH_states(2)) ! ! Find the maximum weight of the satellites ! do i1=EXCPH_states(1),EXCPH_states(2) - if(max_Sat_weight(i1) Date: Tue, 15 Nov 2022 16:53:37 +0100 Subject: [PATCH 0497/1367] PL fix dimensions for Hermitian case --- Makefile | 2 +- PL_diago_residual_full_n_eig.F | 248 ++++++++ compile_yambo_gcc | 4 +- mod_YPP_interfaces.tmp_source | 94 +++ mod_YPP_real_time.tmp_source | 777 +++++++++++++++++++++++ src/bse/K_IP.F | 1 + src/bse/K_diago_response_functions.F | 5 +- src/bse/PL_diago_residual.F | 28 +- src/mod_YPP_real_time.tmp_source | 259 ++++++++ src/output/X_OUTPUT_driver.F | 5 +- src/xc_functionals/XC_libxc_driver.F | 2 +- ypp/modules/mod_YPP_real_time.tmp_source | 777 +++++++++++++++++++++++ 12 files changed, 2179 insertions(+), 23 deletions(-) create mode 100755 PL_diago_residual_full_n_eig.F create mode 100644 mod_YPP_interfaces.tmp_source create mode 100644 mod_YPP_real_time.tmp_source create mode 100644 src/mod_YPP_real_time.tmp_source create mode 100644 ypp/modules/mod_YPP_real_time.tmp_source diff --git a/Makefile b/Makefile index a4ae332bea..8f90f22143 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ else include config/mk/global/no_configure_help.mk endif # -MAKEFLAGS = --no-print-directory +MAKEFLAGS = --no-print-director y # # Targets include config/mk/global/targets.mk diff --git a/PL_diago_residual_full_n_eig.F b/PL_diago_residual_full_n_eig.F new file mode 100755 index 0000000000..6fae5abc59 --- /dev/null +++ b/PL_diago_residual_full_n_eig.F @@ -0,0 +1,248 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM PM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BSS_n_eig,BSS_n_eig),BS_V_right(BSS_n_eig,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + real(SP) :: half_BSS_n_eig + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "Hermitian run" + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig + write(*,*) "BS_K_dim", BS_K_dim(2) + half_BSS_n_eig=BSS_n_eig/2. +! +! Hermitian residual +!==================== +! +do i_c=1,3 + P_x_fZ(1:BSS_n_eig,i_c,1)=BSS_dipoles_PL(i_c,1:BSS_n_eig)*sqrt(BSS_eh_f(1:BSS_n_eig)) ! Pi multiplied by (fc-fv) dipoles of + !current <(vk|gradCk)> C is conduction +enddo +! +write(*,*) 'BS_K_dim(1)', BS_K_dim(1) +write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) +write(*,*) 'shape(BS_V_right)', shape(BS_V_right) +write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) +!write(*,*) 'BSS_V_right(577,576)', BS_V_right(577,576) +do i_l=1,BSS_n_eig + ! + if (.not.px%element_1D(i_l)) cycle + ! + ! R_over_R_x_A = R<_j/R_j A^l_j + ! + do ik = 1, BS_K_dim(1) + if (BSS_eh_f(ik) .gt. rZERO) then + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + R_over_R_x_A(2,ik) = BSS_PL_f(BS_K_dim(1)+ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + endif + enddo + ! + ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j + ! + adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BSS_n_eig,i_l)),& + R_over_R_x_A(1,1:BSS_n_eig)) !resonant + adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(BSS_N_eig+1:BS_K_dim(1),i_l)),& + R_over_R_x_A(2,BSS_n_eig:BS_K_dim(1))) + !antiresonant, no error if two arrays have different dimensions + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i + ! + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(1:BS_K_dim(1),i_l),P_x_fZ(1:BS_K_dim(1),i_c,1)) + ! + enddo + ! + ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) + ! that cancel out. + ! + BS_R_PL(:,i_l)=real(dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:)) + ! + call live_timing(steps=1) + ! +enddo +! +call live_timing() +! +call PP_redux_wait(BS_R_PL) +! +call PP_indexes_reset(px) +! +end subroutine PL_diago_herm_residual + +subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) + ! + ! Non-Hermitian residual + !======================== + ! + ! + ! Resonant PL Residuals + ! + use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use BS, ONLY:BS_H_dim,BS_K_dim + use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) + real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) + complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_l,i_c,i_K,i_lr,i_ll, ik + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) + ! + ! Parallel indexes + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + ! sqrt(R_i) Re[ (Pi_i)* A^l_i (A^l_j)* R<_j/R_j A^l_j (A^l_k)* Pi_k ] sqrt(R_k) + ! + ! Zeroing + ! + BS_R_PL =rZERO + P_x_fZ =cZERO + R_over_R_x_A =cZERO + ! + ! + ! Live-Timing + ! + call live_timing('PL residuals',px%n_of_elements(myid+1)) + write(*,*) "Non-Hermitian run" + write(*,*) "BS_H_dim", BS_H_dim + write(*,*) "BSS_n_eig", BSS_n_eig + ! + ! 1=> left + ! 2=> right + ! + do i_c=1,3 + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) + enddo + do i_K=BS_K_dim(1)+1,BS_H_dim + P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) + enddo + enddo + ! + do i_lr=1,BS_H_dim + ! + if (.not.px%element_1D(i_lr)) cycle + ! + ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i + ! + B=cZERO + do i_ll=1,BS_H_dim + B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) + enddo + ! + ! R_over_R_x_A = R<_j/R_j B^l_j + ! + write (*,*) "shape(BSS_PL_f)", shape(BSS_PL_f) + R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) + ! + ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j + ! + adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) + ! + do i_c=1,3 + ! + ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i + ! + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) + ! + ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) + ! + Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) + ! + enddo + ! + BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& +& Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& +& Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) + ! + call live_timing(steps=1) + ! + ! + call live_timing(steps=1) + ! + enddo + ! + ! + call live_timing() + ! + call PP_redux_wait(BS_R_PL) + ! + call PP_indexes_reset(px) + ! + + end subroutine PL_diago_non_herm_residual diff --git a/compile_yambo_gcc b/compile_yambo_gcc index 5f6b5e5025..b8f48a334c 100644 --- a/compile_yambo_gcc +++ b/compile_yambo_gcc @@ -2,8 +2,8 @@ make clean_all -./configure --prefix='/home/rireho/codes/yambo/branches/fix-pl' \ -FCFLAGS='-w -fallow-argument-mismatch -O2 -fcheck=bounds' FFLAGS="-w -fallow-argument-mismatch -O2 -fcheck=bounds" \ +./configure --prefix='/home/rireho/codes/yambo/branches/fix-pl-broken' \ +FCFLAGS='-w -fallow-argument-mismatch -O2 -fcheck=bounds -ffree-line-length-512' \ --enable-dp \ --enable-time-profile=no \ --enable-debug-flags \ diff --git a/mod_YPP_interfaces.tmp_source b/mod_YPP_interfaces.tmp_source new file mode 100644 index 0000000000..a2ec5c0f26 --- /dev/null +++ b/mod_YPP_interfaces.tmp_source @@ -0,0 +1,94 @@ + + +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +module YPP_interfaces + ! + implicit none + ! + interface + ! + + ! + subroutine RT_OBSERVABLES_IO(what,J,P,IO_error,first_sec_only,G_lesser_only,COM_) + use YPP_real_time, ONLY:OBS_el + use electrons, ONLY:levels + implicit none + character(*) :: what + type(OBS_el), optional :: J,P + logical, optional :: IO_error,first_sec_only,G_lesser_only + integer, optional :: COM_ + end subroutine + ! + + ! + subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,ID_spin,ID_pdos,USE_the_DbGd,QUIET,FORCE_occ) + use pars, ONLY:SP + use electrons, ONLY:levels,n_spin + use R_lattice, ONLY:bz_samp + use electrons, ONLY:n_spin + use YPPm, ONLY:DOS_E_steps + implicit none + type(bz_samp), intent(in) :: k + type(levels), intent(in) :: E + integer, intent(in) :: bands(2),ID_spin,ID_pdos + real(SP), intent(in) :: dos_E(DOS_E_steps) + real(SP), intent(out):: el_dos(DOS_E_steps,n_spin) + logical, optional,intent(in) :: USE_the_DbGd,QUIET,FORCE_occ + end subroutine electrons_dos_elemental + ! + subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) + use pars, ONLY:SP + use BS_solvers, ONLY:BSS_n_eig + use YPPm, ONLY:EXCITON_spin + implicit none + integer :: iq + complex(SP) :: BS_R(BSS_n_eig),BS_E(BSS_n_eig) + real(SP), optional, pointer :: BS_E_SOC_corr(:,:) + type(EXCITON_spin),optional :: EXC_spin + end subroutine + ! + subroutine PROJECTION_setup( what, bands) + character(*) :: what + integer ,optional:: bands(2) + end subroutine + ! + subroutine k_special( LIST_only ) + logical ,optional:: LIST_only + end subroutine + ! + subroutine PROJECTION_plot( what, N , Ns, bands, W, TIME, OBS_K, OBS_B) + use pars, ONLY:SP + use YPPm, ONLY:PROJECT_N_par + use interpolate, ONLY:GRID_k + character(*) :: what + integer :: N,Ns,bands(2) + real(SP) ,optional:: W(N),TIME(N) + real(SP) ,optional:: OBS_K(PROJECT_N_par,N,Ns) + real(SP) ,optional:: OBS_B(bands(1):bands(2),PROJECT_N_par,Ns) + end subroutine + ! + end interface + ! +end module YPP_interfaces diff --git a/mod_YPP_real_time.tmp_source b/mod_YPP_real_time.tmp_source new file mode 100644 index 0000000000..83d8ea8ac7 --- /dev/null +++ b/mod_YPP_real_time.tmp_source @@ -0,0 +1,777 @@ + + +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +module YPP_real_time + ! + use units, ONLY:HA2EV + use pars, ONLY:schlen,SP,DP,rZERO + ! + + use memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg,IPL + implicit none + + + + + + + + + + + + + + + + + + + + + + + + + + ! + ! RT + ! + logical :: l_RealTime + logical :: l_RT_DBs + ! + ! RT DBs (what) + ! + logical :: l_RTpump_energy + logical :: l_RTpump_Fermi + ! + ! RT Post-processing (what) + ! + logical :: l_RT_occupations + logical :: l_RT_lifetimes + logical :: l_RT_density + logical :: l_RT_G_two_times + logical :: l_RT_X + logical :: l_NL_X + logical :: l_NL_exc + logical :: l_RT_abs + logical :: l_RT_pol + ! + ! RT post-processing (kind) + ! + logical :: l_RT_bands + logical :: l_RT_time + logical :: l_RT_energy + logical :: l_RT_dos + ! + ! (RT) Retarded Green's functions + ! + integer :: Ret_GF_bands(2) ! Bands Range + real(SP) :: Gr_E_step + real(SP) :: GF_T_step + ! + ! Manual pump ... + ! + real(SP) :: Eh_pumped_Nel + ! + ! ... Energy + ! + real(SP) :: Eh_pumped_pair_energy(2) + ! + ! ... K-space + ! + real(SP) :: Eh_pumped_pair_deltaE + real(SP) :: Eh_pumped_pair_BZ_width + integer :: Eh_pumped_pair_n_BZ_regions + real(SP), allocatable :: Eh_pumped_pair_BZ_regions(:,:) + ! + ! ... Energy and K-space + ! + real(SP) :: Eh_pumped_pair_width ! energy width + ! + ! ... Fermi function + ! + real(SP) :: Eh_mu(2) ! chemical potential for holes, electrons + real(SP) :: Eh_temp(2) ! effective temperature for holes, electrons + real(SP) :: h_mu_autotune_thr ! threshold for matching number of pumped holes / electrons + ! + ! (RT) X + ! + logical :: Use_FFT + logical :: l_skip_OBS_IO + logical :: l_force_min_damp + logical :: l_RT_X_inversion + integer :: N_probes + integer :: N_pumps + integer :: N_probe_frequencies + integer :: X_order + character(schlen) :: X_kind + character(schlen) :: Probe_Keyword + character(schlen) :: Pump_Keyword + integer, parameter:: max_n_of_paths=500 + character(schlen) :: Pump_path + character(schlen) :: Probe_path(max_n_of_paths) + character(3) :: RT_p_format + ! + ! (RT) TRabs + ! + real(SP) :: TRabsDIP_dir(3)=0. + real(SP) :: TRabs_Eeh_treshold=1.E-5_SP/HA2EV + character(schlen) :: TRabsWHAT="abs" + character(schlen) :: TRabsDIP_plane="none" + character(schlen) :: TRabsMODE="cv" + logical :: TRabs_lEPS(3,3)=.FALSE. + real(SP), allocatable :: TRabs_E(:) + complex(SP), allocatable :: TRabs_RES_left(:,:,:) ! I_trans, DIP_dir, 1 ( RES_0 ) - 2 ( dRES) + complex(SP), allocatable :: TRabs_RES_right(:,:,:) + complex(SP), allocatable :: Epsilon_ij(:,:,:) + complex(SP), allocatable :: B_Hall(:,:) + ! + ! (RT) carriers + ! + real(SP), allocatable :: delta_f(:,:,:) + real(SP), allocatable :: integrated_Nel(:,:) + real(SP), allocatable :: integrated_Nhole(:,:) + ! + ! (RT) common + ! + real(SP),allocatable :: RT_time(:) + ! + ! (RT) G<(t,t') + ! + real(SP) :: Rho_deph + ! + type RT_ctl + real(SP) :: delta_W =0._SP ! delta W + real(SP) :: X_W_range(2) =0._SP ! Response energy range + real(SP) :: Carriers_W_range(2) =0._SP ! Carriers energy range + integer :: W_n_steps =0 ! number of steps in energy mesh + real(SP) :: delta_T =0._SP ! delta T + real(SP) :: T_range(2) =0._SP ! time windows for the transform + integer :: T_n_range(2) =0 ! lower and upper value of time range + integer :: T_n_steps =0 ! number of steps in Time mesh + real(SP) :: damp_factor =0._SP ! factor used in damping + real(SP) :: Field_damp_factor =0._SP ! factor used deduced from the Field + character(schlen) :: damping ="NONE" ! Damp type (none, lorentian or gaussian) + end type RT_ctl + ! + type(RT_ctl), save :: RT_conf,RT_conf_save + ! + type OBS_el + character(schlen) :: title + integer :: N + complex(DP), allocatable :: F_t(:,:) + complex(DP), allocatable :: F_w(:,:) + complex(SP), allocatable :: W(:) + end type OBS_el + ! + type(OBS_el), allocatable :: Pol(:) + type(OBS_el), allocatable :: Curr(:) + type(OBS_el) :: ElField + type(OBS_el) :: GreenF_T_and_W + ! + interface + ! + subroutine RT_IO_carriers(Time,imposed_COM) + use pars, ONLY:SP + real(SP), optional, intent(inout) :: Time + integer , optional, intent(in) :: imposed_COM + end subroutine RT_IO_carriers + ! + end interface + ! + contains + ! + subroutine RT_conf_duplicate(Cin,Cout) + type(RT_ctl) :: Cin,Cout + Cout%delta_W=Cin%delta_W + Cout%X_W_range=Cin%X_W_range + Cout%Carriers_W_range=Cin%Carriers_W_range + Cout%W_n_steps=Cin%W_n_steps + Cout%delta_T=Cin%delta_T + Cout%T_range=Cin%T_range + Cout%T_n_range=Cin%T_n_range + Cout%T_n_steps=Cin%T_n_steps + Cout%damp_factor=Cin%damp_factor + Cout%Field_damp_factor=Cin%Field_damp_factor + Cout%damping=Cin%damping + end subroutine + ! + subroutine OBS_el_free(FT) + type(OBS_el) :: FT + if (.not.allocated(FT%F_w)) &NEWLINE& call MEM_free(QUOTES FT%F_w QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%F_w)) &NEWLINE& call MEM_free(QUOTES FT%F_w QUOTES,size(FT%F_w,KIND=IPL))NEWLINE if ( allocated(FT%F_w)) &NEWLINE& deallocate(FT%F_w) + if (.not.allocated(FT%F_t)) &NEWLINE& call MEM_free(QUOTES FT%F_t QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%F_t)) &NEWLINE& call MEM_free(QUOTES FT%F_t QUOTES,size(FT%F_t,KIND=IPL))NEWLINE if ( allocated(FT%F_t)) &NEWLINE& deallocate(FT%F_t) + if (.not.allocated(FT%W)) &NEWLINE& call MEM_free(QUOTES FT%W QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%W)) &NEWLINE& call MEM_free(QUOTES FT%W QUOTES,size(FT%W,KIND=IPL))NEWLINE if ( allocated(FT%W)) &NEWLINE& deallocate(FT%W) + end subroutine + ! + function TRabs_EPS_label(i,j) + character(2) :: TRabs_EPS_label + integer :: i,j + if (i==1) TRabs_EPS_label="x" + if (i==2) TRabs_EPS_label="y" + if (i==3) TRabs_EPS_label="z" + if (j==1) TRabs_EPS_label=TRabs_EPS_label(1:1)//"x" + if (j==2) TRabs_EPS_label=TRabs_EPS_label(1:1)//"y" + if (j==3) TRabs_EPS_label=TRabs_EPS_label(1:1)//"z" + end function + ! + subroutine gimme_a_G_Time_Point(i_T) + use real_time, ONLY:G_MEM_steps + use RT_control, ONLY:Gless_RT_IO_t + integer ::i_T,i_Tp,Nt + real(SP) ::TIME_diff,REF_diff + ! + Nt=size(Gless_RT_IO_t%Time) + ! + REF_diff=Gless_RT_IO_t%Time(Nt)-Gless_RT_IO_t%Time(Nt-G_MEM_steps) + ! + do i_Tp=1,Nt + TIME_diff= abs ( Gless_RT_IO_t%Time(i_Tp) - RT_time(i_T) ) + if (abs(TIME_diff) left ! 2=> right ! @@ -232,11 +236,7 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! call live_timing(steps=1) ! - ! - call live_timing(steps=1) - ! - enddo - ! + enddo ! call live_timing() ! diff --git a/src/mod_YPP_real_time.tmp_source b/src/mod_YPP_real_time.tmp_source new file mode 100644 index 0000000000..87e6f5dd17 --- /dev/null +++ b/src/mod_YPP_real_time.tmp_source @@ -0,0 +1,259 @@ + + +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +module YPP_real_time + ! + use units, ONLY:HA2EV + use pars, ONLY:schlen,SP,DP,rZERO + ! + + use memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg,IPL + implicit none + + + + + + + + + + + + + + + + + + + + + + + + + + ! + ! RT + ! + logical :: l_RealTime + logical :: l_RT_DBs + ! + ! RT DBs (what) + ! + logical :: l_RTpump_energy + logical :: l_RTpump_Fermi + ! + ! RT Post-processing (what) + ! + logical :: l_RT_occupations + logical :: l_RT_lifetimes + logical :: l_RT_density + logical :: l_RT_G_two_times + logical :: l_RT_X + logical :: l_NL_X + logical :: l_NL_exc + logical :: l_RT_abs + logical :: l_RT_pol + ! + ! RT post-processing (kind) + ! + logical :: l_RT_bands + logical :: l_RT_time + logical :: l_RT_energy + logical :: l_RT_dos + ! + ! (RT) Retarded Green's functions + ! + integer :: Ret_GF_bands(2) ! Bands Range + real(SP) :: Gr_E_step + real(SP) :: GF_T_step + ! + ! Manual pump ... + ! + real(SP) :: Eh_pumped_Nel + ! + ! ... Energy + ! + real(SP) :: Eh_pumped_pair_energy(2) + ! + ! ... K-space + ! + real(SP) :: Eh_pumped_pair_deltaE + real(SP) :: Eh_pumped_pair_BZ_width + integer :: Eh_pumped_pair_n_BZ_regions + real(SP), allocatable :: Eh_pumped_pair_BZ_regions(:,:) + ! + ! ... Energy and K-space + ! + real(SP) :: Eh_pumped_pair_width ! energy width + ! + ! ... Fermi function + ! + real(SP) :: Eh_mu(2) ! chemical potential for holes, electrons + real(SP) :: Eh_temp(2) ! effective temperature for holes, electrons + real(SP) :: h_mu_autotune_thr ! threshold for matching number of pumped holes / electrons + ! + ! (RT) X + ! + logical :: Use_FFT + logical :: l_skip_OBS_IO + logical :: l_force_min_damp + logical :: l_RT_X_inversion + integer :: N_probes + integer :: N_pumps + integer :: N_probe_frequencies + integer :: X_order + character(schlen) :: X_kind + character(schlen) :: Probe_Keyword + character(schlen) :: Pump_Keyword + integer, parameter:: max_n_of_paths=500 + character(schlen) :: Pump_path + character(schlen) :: Probe_path(max_n_of_paths) + character(3) :: RT_p_format + ! + ! (RT) TRabs + ! + real(SP) :: TRabsDIP_dir(3)=0. + real(SP) :: TRabs_Eeh_treshold=1.E-5_SP/HA2EV + character(schlen) :: TRabsWHAT="abs" + character(schlen) :: TRabsDIP_plane="none" + character(schlen) :: TRabsMODE="cv" + logical :: TRabs_lEPS(3,3)=.FALSE. + real(SP), allocatable :: TRabs_E(:) + complex(SP), allocatable :: TRabs_RES_left(:,:,:) ! I_trans, DIP_dir, 1 ( RES_0 ) - 2 ( dRES) + complex(SP), allocatable :: TRabs_RES_right(:,:,:) + complex(SP), allocatable :: Epsilon_ij(:,:,:) + complex(SP), allocatable :: B_Hall(:,:) + ! + ! (RT) carriers + ! + real(SP), allocatable :: delta_f(:,:,:) + real(SP), allocatable :: integrated_Nel(:,:) + real(SP), allocatable :: integrated_Nhole(:,:) + ! + ! (RT) common + ! + real(SP),allocatable :: RT_time(:) + ! + ! (RT) G<(t,t') + ! + real(SP) :: Rho_deph + ! + type RT_ctl + real(SP) :: delta_W =0._SP ! delta W + real(SP) :: X_W_range(2) =0._SP ! Response energy range + real(SP) :: Carriers_W_range(2) =0._SP ! Carriers energy range + integer :: W_n_steps =0 ! number of steps in energy mesh + real(SP) :: delta_T =0._SP ! delta T + real(SP) :: T_range(2) =0._SP ! time windows for the transform + integer :: T_n_range(2) =0 ! lower and upper value of time range + integer :: T_n_steps =0 ! number of steps in Time mesh + real(SP) :: damp_factor =0._SP ! factor used in damping + real(SP) :: Field_damp_factor =0._SP ! factor used deduced from the Field + character(schlen) :: damping ="NONE" ! Damp type (none, lorentian or gaussian) + end type RT_ctl + ! + type(RT_ctl), save :: RT_conf,RT_conf_save + ! + type OBS_el + character(schlen) :: title + integer :: N + complex(DP), allocatable :: F_t(:,:) + complex(DP), allocatable :: F_w(:,:) + complex(SP), allocatable :: W(:) + end type OBS_el + ! + type(OBS_el), allocatable :: Pol(:) + type(OBS_el), allocatable :: Curr(:) + type(OBS_el) :: ElField + type(OBS_el) :: GreenF_T_and_W + ! + interface + ! + subroutine RT_IO_carriers(Time,imposed_COM) + use pars, ONLY:SP + real(SP), optional, intent(inout) :: Time + integer , optional, intent(in) :: imposed_COM + end subroutine RT_IO_carriers + ! + end interface + ! + contains + ! + subroutine RT_conf_duplicate(Cin,Cout) + type(RT_ctl) :: Cin,Cout + Cout%delta_W=Cin%delta_W + Cout%X_W_range=Cin%X_W_range + Cout%Carriers_W_range=Cin%Carriers_W_range + Cout%W_n_steps=Cin%W_n_steps + Cout%delta_T=Cin%delta_T + Cout%T_range=Cin%T_range + Cout%T_n_range=Cin%T_n_range + Cout%T_n_steps=Cin%T_n_steps + Cout%damp_factor=Cin%damp_factor + Cout%Field_damp_factor=Cin%Field_damp_factor + Cout%damping=Cin%damping + end subroutine + ! + subroutine OBS_el_free(FT) + type(OBS_el) :: FT + if (.not.allocated(FT%F_w)) &NEWLINE& call MEM_free(QUOTES FT%F_w QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%F_w)) &NEWLINE& call MEM_free(QUOTES FT%F_w QUOTES,size(FT%F_w,KIND=IPL))NEWLINE if ( allocated(FT%F_w)) &NEWLINE& deallocate(FT%F_w) + if (.not.allocated(FT%F_t)) &NEWLINE& call MEM_free(QUOTES FT%F_t QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%F_t)) &NEWLINE& call MEM_free(QUOTES FT%F_t QUOTES,size(FT%F_t,KIND=IPL))NEWLINE if ( allocated(FT%F_t)) &NEWLINE& deallocate(FT%F_t) + if (.not.allocated(FT%W)) &NEWLINE& call MEM_free(QUOTES FT%W QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%W)) &NEWLINE& call MEM_free(QUOTES FT%W QUOTES,size(FT%W,KIND=IPL))NEWLINE if ( allocated(FT%W)) &NEWLINE& deallocate(FT%W) + end subroutine + ! + function TRabs_EPS_label(i,j) + character(2) :: TRabs_EPS_label + integer :: i,j + if (i==1) TRabs_EPS_label="x" + if (i==2) TRabs_EPS_label="y" + if (i==3) TRabs_EPS_label="z" + if (j==1) TRabs_EPS_label=TRabs_EPS_label(1:1)//"x" + if (j==2) TRabs_EPS_label=TRabs_EPS_label(1:1)//"y" + if (j==3) TRabs_EPS_label=TRabs_EPS_label(1:1)//"z" + end function + ! + subroutine gimme_a_G_Time_Point(i_T) + use real_time, ONLY:G_MEM_steps + use RT_control, ONLY:Gless_RT_IO_t + integer ::i_T,i_Tp,Nt + real(SP) ::TIME_diff,REF_diff + ! + Nt=size(Gless_RT_IO_t%Time) + ! + REF_diff=Gless_RT_IO_t%Time(Nt)-Gless_RT_IO_t%Time(Nt-G_MEM_steps) + ! + do i_Tp=1,Nt + TIME_diff= abs ( Gless_RT_IO_t%Time(i_Tp) - RT_time(i_T) ) + if (abs(TIME_diff) Date: Thu, 17 Nov 2022 15:21:39 +0100 Subject: [PATCH 0498/1367] Pre commit for Eq check --- .gitignore | 1 + compile_yambo_gcc | 4 +- src/bse/PL_diago_residual.F | 2 +- ypp/modules/mod_YPP_real_time.tmp_source | 777 ----------------------- 4 files changed, 4 insertions(+), 780 deletions(-) delete mode 100644 ypp/modules/mod_YPP_real_time.tmp_source diff --git a/.gitignore b/.gitignore index b504a5e846..a054035dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,4 @@ Thumbs.db myconfig* nohup.out autom4te.cache +compile_yambo_gcc diff --git a/compile_yambo_gcc b/compile_yambo_gcc index b8f48a334c..5f6b5e5025 100644 --- a/compile_yambo_gcc +++ b/compile_yambo_gcc @@ -2,8 +2,8 @@ make clean_all -./configure --prefix='/home/rireho/codes/yambo/branches/fix-pl-broken' \ -FCFLAGS='-w -fallow-argument-mismatch -O2 -fcheck=bounds -ffree-line-length-512' \ +./configure --prefix='/home/rireho/codes/yambo/branches/fix-pl' \ +FCFLAGS='-w -fallow-argument-mismatch -O2 -fcheck=bounds' FFLAGS="-w -fallow-argument-mismatch -O2 -fcheck=bounds" \ --enable-dp \ --enable-time-profile=no \ --enable-debug-flags \ diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 59f0c6069a..7fd08a4e35 100755 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -103,7 +103,7 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) R_over_R_x_A(1,1:BS_K_dim(1))) !resonant adA_x_R_over_R_x_A(2)=conjg(V_dot_V_omp(BS_K_dim(2),conjg(BS_V_right(1:BS_K_dim(2),i_l)),& R_over_R_x_A(2,1:BS_K_dim(2)))) - !antiresonant, no error if two arrays have different dimensions + !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not ! do i_c=1,3 ! diff --git a/ypp/modules/mod_YPP_real_time.tmp_source b/ypp/modules/mod_YPP_real_time.tmp_source deleted file mode 100644 index 83d8ea8ac7..0000000000 --- a/ypp/modules/mod_YPP_real_time.tmp_source +++ /dev/null @@ -1,777 +0,0 @@ - - -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -module YPP_real_time - ! - use units, ONLY:HA2EV - use pars, ONLY:schlen,SP,DP,rZERO - ! - - use memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg,IPL - implicit none - - - - - - - - - - - - - - - - - - - - - - - - - - ! - ! RT - ! - logical :: l_RealTime - logical :: l_RT_DBs - ! - ! RT DBs (what) - ! - logical :: l_RTpump_energy - logical :: l_RTpump_Fermi - ! - ! RT Post-processing (what) - ! - logical :: l_RT_occupations - logical :: l_RT_lifetimes - logical :: l_RT_density - logical :: l_RT_G_two_times - logical :: l_RT_X - logical :: l_NL_X - logical :: l_NL_exc - logical :: l_RT_abs - logical :: l_RT_pol - ! - ! RT post-processing (kind) - ! - logical :: l_RT_bands - logical :: l_RT_time - logical :: l_RT_energy - logical :: l_RT_dos - ! - ! (RT) Retarded Green's functions - ! - integer :: Ret_GF_bands(2) ! Bands Range - real(SP) :: Gr_E_step - real(SP) :: GF_T_step - ! - ! Manual pump ... - ! - real(SP) :: Eh_pumped_Nel - ! - ! ... Energy - ! - real(SP) :: Eh_pumped_pair_energy(2) - ! - ! ... K-space - ! - real(SP) :: Eh_pumped_pair_deltaE - real(SP) :: Eh_pumped_pair_BZ_width - integer :: Eh_pumped_pair_n_BZ_regions - real(SP), allocatable :: Eh_pumped_pair_BZ_regions(:,:) - ! - ! ... Energy and K-space - ! - real(SP) :: Eh_pumped_pair_width ! energy width - ! - ! ... Fermi function - ! - real(SP) :: Eh_mu(2) ! chemical potential for holes, electrons - real(SP) :: Eh_temp(2) ! effective temperature for holes, electrons - real(SP) :: h_mu_autotune_thr ! threshold for matching number of pumped holes / electrons - ! - ! (RT) X - ! - logical :: Use_FFT - logical :: l_skip_OBS_IO - logical :: l_force_min_damp - logical :: l_RT_X_inversion - integer :: N_probes - integer :: N_pumps - integer :: N_probe_frequencies - integer :: X_order - character(schlen) :: X_kind - character(schlen) :: Probe_Keyword - character(schlen) :: Pump_Keyword - integer, parameter:: max_n_of_paths=500 - character(schlen) :: Pump_path - character(schlen) :: Probe_path(max_n_of_paths) - character(3) :: RT_p_format - ! - ! (RT) TRabs - ! - real(SP) :: TRabsDIP_dir(3)=0. - real(SP) :: TRabs_Eeh_treshold=1.E-5_SP/HA2EV - character(schlen) :: TRabsWHAT="abs" - character(schlen) :: TRabsDIP_plane="none" - character(schlen) :: TRabsMODE="cv" - logical :: TRabs_lEPS(3,3)=.FALSE. - real(SP), allocatable :: TRabs_E(:) - complex(SP), allocatable :: TRabs_RES_left(:,:,:) ! I_trans, DIP_dir, 1 ( RES_0 ) - 2 ( dRES) - complex(SP), allocatable :: TRabs_RES_right(:,:,:) - complex(SP), allocatable :: Epsilon_ij(:,:,:) - complex(SP), allocatable :: B_Hall(:,:) - ! - ! (RT) carriers - ! - real(SP), allocatable :: delta_f(:,:,:) - real(SP), allocatable :: integrated_Nel(:,:) - real(SP), allocatable :: integrated_Nhole(:,:) - ! - ! (RT) common - ! - real(SP),allocatable :: RT_time(:) - ! - ! (RT) G<(t,t') - ! - real(SP) :: Rho_deph - ! - type RT_ctl - real(SP) :: delta_W =0._SP ! delta W - real(SP) :: X_W_range(2) =0._SP ! Response energy range - real(SP) :: Carriers_W_range(2) =0._SP ! Carriers energy range - integer :: W_n_steps =0 ! number of steps in energy mesh - real(SP) :: delta_T =0._SP ! delta T - real(SP) :: T_range(2) =0._SP ! time windows for the transform - integer :: T_n_range(2) =0 ! lower and upper value of time range - integer :: T_n_steps =0 ! number of steps in Time mesh - real(SP) :: damp_factor =0._SP ! factor used in damping - real(SP) :: Field_damp_factor =0._SP ! factor used deduced from the Field - character(schlen) :: damping ="NONE" ! Damp type (none, lorentian or gaussian) - end type RT_ctl - ! - type(RT_ctl), save :: RT_conf,RT_conf_save - ! - type OBS_el - character(schlen) :: title - integer :: N - complex(DP), allocatable :: F_t(:,:) - complex(DP), allocatable :: F_w(:,:) - complex(SP), allocatable :: W(:) - end type OBS_el - ! - type(OBS_el), allocatable :: Pol(:) - type(OBS_el), allocatable :: Curr(:) - type(OBS_el) :: ElField - type(OBS_el) :: GreenF_T_and_W - ! - interface - ! - subroutine RT_IO_carriers(Time,imposed_COM) - use pars, ONLY:SP - real(SP), optional, intent(inout) :: Time - integer , optional, intent(in) :: imposed_COM - end subroutine RT_IO_carriers - ! - end interface - ! - contains - ! - subroutine RT_conf_duplicate(Cin,Cout) - type(RT_ctl) :: Cin,Cout - Cout%delta_W=Cin%delta_W - Cout%X_W_range=Cin%X_W_range - Cout%Carriers_W_range=Cin%Carriers_W_range - Cout%W_n_steps=Cin%W_n_steps - Cout%delta_T=Cin%delta_T - Cout%T_range=Cin%T_range - Cout%T_n_range=Cin%T_n_range - Cout%T_n_steps=Cin%T_n_steps - Cout%damp_factor=Cin%damp_factor - Cout%Field_damp_factor=Cin%Field_damp_factor - Cout%damping=Cin%damping - end subroutine - ! - subroutine OBS_el_free(FT) - type(OBS_el) :: FT - if (.not.allocated(FT%F_w)) &NEWLINE& call MEM_free(QUOTES FT%F_w QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%F_w)) &NEWLINE& call MEM_free(QUOTES FT%F_w QUOTES,size(FT%F_w,KIND=IPL))NEWLINE if ( allocated(FT%F_w)) &NEWLINE& deallocate(FT%F_w) - if (.not.allocated(FT%F_t)) &NEWLINE& call MEM_free(QUOTES FT%F_t QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%F_t)) &NEWLINE& call MEM_free(QUOTES FT%F_t QUOTES,size(FT%F_t,KIND=IPL))NEWLINE if ( allocated(FT%F_t)) &NEWLINE& deallocate(FT%F_t) - if (.not.allocated(FT%W)) &NEWLINE& call MEM_free(QUOTES FT%W QUOTES,int(-1,KIND=IPL))NEWLINE if ( allocated(FT%W)) &NEWLINE& call MEM_free(QUOTES FT%W QUOTES,size(FT%W,KIND=IPL))NEWLINE if ( allocated(FT%W)) &NEWLINE& deallocate(FT%W) - end subroutine - ! - function TRabs_EPS_label(i,j) - character(2) :: TRabs_EPS_label - integer :: i,j - if (i==1) TRabs_EPS_label="x" - if (i==2) TRabs_EPS_label="y" - if (i==3) TRabs_EPS_label="z" - if (j==1) TRabs_EPS_label=TRabs_EPS_label(1:1)//"x" - if (j==2) TRabs_EPS_label=TRabs_EPS_label(1:1)//"y" - if (j==3) TRabs_EPS_label=TRabs_EPS_label(1:1)//"z" - end function - ! - subroutine gimme_a_G_Time_Point(i_T) - use real_time, ONLY:G_MEM_steps - use RT_control, ONLY:Gless_RT_IO_t - integer ::i_T,i_Tp,Nt - real(SP) ::TIME_diff,REF_diff - ! - Nt=size(Gless_RT_IO_t%Time) - ! - REF_diff=Gless_RT_IO_t%Time(Nt)-Gless_RT_IO_t%Time(Nt-G_MEM_steps) - ! - do i_Tp=1,Nt - TIME_diff= abs ( Gless_RT_IO_t%Time(i_Tp) - RT_time(i_T) ) - if (abs(TIME_diff) Date: Mon, 21 Nov 2022 14:10:58 +0100 Subject: [PATCH 0499/1367] Version 5.1.0, Revision 21699, Hash 2af1cef0c MODIFIED * include/driver/version.h modules/mod_BS.F Bugs: - [yambo] Fixed doubly defined l_BS_jdos logical in mod_BS Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_BS.F | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f56b104c59..e664b70ae0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21687 -#define YAMBO_HASH "c84147172" +#define YAMBO_REVISION 21699 +#define YAMBO_HASH "2af1cef0c" diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 8cf05677ab..0593c71d97 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -55,7 +55,6 @@ module BS !=========================== logical :: l_BS_fix_holes logical :: l_BS_fix_elecs - logical :: l_BS_jdos ! ! Dipoles tracing !================= From a86f7c2925d3266e5bb8ad11949ef123d1812868 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 24 Nov 2022 10:45:45 +0100 Subject: [PATCH 0500/1367] Add comments on PL_diago_residual.F with things to fix --- src/bse/K_IP.F | 1 - src/bse/PL_diago_residual.F | 35 ++++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 0fd02b8dd6..b8b41bec2f 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -290,7 +290,6 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then PL(:,3)=PL(:,3)-PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif - write (*,*) PL(:,3) endif ! if (l_BS_dichroism) then diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 7fd08a4e35..ab03769678 100755 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -44,7 +44,7 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) ! type(PP_indexes) ::px integer ::i_l,i_c,i_K,i_lr,i_ll, ik - complex(SP) ::P_x_fZ(BSS_n_eig,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& + complex(SP) ::P_x_fZ(BSS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& & R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) ! ! Parallel indexes @@ -74,26 +74,32 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) ! Hermitian residual !==================== ! +! 1=> left +! 2=> right +! do i_c=1,3 - P_x_fZ(1:BSS_n_eig,i_c,1)=BSS_dipoles_PL(i_c,1:BSS_n_eig)*sqrt(BSS_eh_f(1:BSS_n_eig)) ! Pi multiplied by (fc-fv) dipoles of - !current <(vk|gradCk)> C is conduction + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c,1)=BSS_dipoles_PL(i_c,i_K)*sqrt(BSS_eh_f(i_K)) !resonant PI_greco=BSS_dipoles_PL + P_x_fZ(i_K,i_c,2)=BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(BS_K_dim(1)+i_K)) !antiresonat + enddo enddo ! +! write(*,*) 'BS_K_dim(1)', BS_K_dim(1) write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) write(*,*) 'shape(BS_V_right)', shape(BS_V_right) write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) !write(*,*) 'BSS_V_right(577,576)', BS_V_right(577,576) -do i_l=1,BSS_n_eig +do i_l=1,BS_H_dim ! - if (.not.px%element_1D(i_l)) cycle + if (.not.px%element_1D(i_l)) cycle !parallelization ! ! R_over_R_x_A = R<_j/R_j A^l_j ! do ik = 1, BS_K_dim(1) if (BSS_eh_f(ik) .gt. rZERO) then - R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) - R_over_R_x_A(2,ik) = BSS_PL_f(BS_K_dim(1)+ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) + R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) !resonant + R_over_R_x_A(2,ik) = BSS_PL_f(BS_K_dim(1)+ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik+BS_K_dim(1)) !antiresonant endif enddo ! @@ -106,17 +112,22 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not ! do i_c=1,3 - ! - ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i + !dim(P_x_fz) = BS_H_dim + !dim(BS_V_right) = BS_K_dim(1) + ! we have a problem in this multiplication + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_K_dim(1),P_x_fZ(:,i_c,1),BS_V_right(:,i_l)) !resonant + ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i ! - Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),BS_V_right(1:BS_K_dim(1),i_l),P_x_fZ(1:BS_K_dim(1),i_c,1)) + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(2),BS_V_right(:,i_l),P_x_fZ(1:BS_K_dim(1),i_c,2)) !antiresonant ! enddo ! ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) ! that cancel out. ! - BS_R_PL(:,i_l)=real(dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:)) + !Check dimensions for these vectors to be consistent that we have only resonant and antiresonant + BS_R_PL(1,i_l)=real(dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(1)) !resonant + BS_R_PL(2,i_l)=real(dot_product(Pi_x_R_x_adA_left,Pi_x_R_x_adA_left)*adA_x_R_over_R_x_A(2)) !antiresonant ! write (*,*) 'BS_R_PL', BS_R_PL(:,i_l) call live_timing(steps=1) @@ -128,8 +139,6 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) call PP_redux_wait(BS_R_PL) ! call PP_indexes_reset(px) -! -end subroutine PL_diago_herm_residual subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! From b0700939277dcc59f28d1d22ea07ee4c2aeb7401 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Nov 2022 16:10:21 +0100 Subject: [PATCH 0501/1367] Version 5.1.0, Revision 21866, Hash c868cef34 MODIFIED * include/driver/version.h allocations/X_ALLOC_elemental.F bse/K_IP.F bse/K_IP_sort.F modules/mod_X.F output/K_OUTPUT.F output/X_OUTPUT_driver.F Changes: - [yambo] Working on file which prints indexes for IP transitions in BSE runlevel Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- src/allocations/X_ALLOC_elemental.F | 2 ++ src/bse/K_IP.F | 24 +++++++------ src/bse/K_IP_sort.F | 19 ++++++++--- src/modules/mod_X.F | 1 + src/output/K_OUTPUT.F | 9 +++++ src/output/X_OUTPUT_driver.F | 53 ++++++++++++++++------------- 7 files changed, 72 insertions(+), 40 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d314dfff18..5b2766f276 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21855 -#define YAMBO_HASH "57b687ecb" +#define YAMBO_REVISION 21866 +#define YAMBO_HASH "c868cef34" diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index d7a67529d9..5ef35ed20c 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -68,6 +68,8 @@ subroutine X_ALLOC_elemental(WHAT,DIM) case('BS_E_SORTED') YAMBO_ALLOC(BS_E_sorted,(DIM(1),DIM(2),DIM(3))) BS_E_sorted=cZERO + YAMBO_ALLOC(BS_E_sorted_indx,(DIM(1),2*DIM(2),4)) + BS_E_sorted=-1 case('FXC') YAMBO_ALLOC(X_fxc,(DIM(1))) X_fxc=cZERO diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 452d87c3b3..df9481c5e0 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -63,13 +63,14 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) integer ::i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR real(SP) ::f_eh,f_eh_PL,res_PL logical ::dip_v,dip_r - complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),& + complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),Indexes(5),& & para_term_w0,diam_term_used,Z_eh,E_eh ! integer :: i_ColFG complex(SP), allocatable :: E_DbGd(:) ! complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich + integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! if (l_bs_fxc) return @@ -114,13 +115,15 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Sorting pre-setup !------------------- if(l_BS_esort) then - N_BS_E_sorted=2 ! Energies (IP + degeneracy) + N_BS_E_sorted=2 ! Energies (IP + degeneracy) if(l_BS_abs) n_BS_E_sorted=n_BS_E_sorted+1 if(l_BS_kerr) n_BS_E_sorted=n_BS_E_sorted+1 if(l_BS_dichroism) n_BS_E_sorted=n_BS_E_sorted+1 if(l_BS_magnons) n_BS_E_sorted=n_BS_E_sorted+n_spinor YAMBO_ALLOC(vtmpC,(BS_H_dim,n_BS_E_sorted)) vtmpC=cZERO + YAMBO_ALLOC(vtmpI,(BS_H_dim,5)) + vtmpI=-1 endif ! if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then @@ -145,6 +148,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Energy !======== ! + Indexes=BS_T_grp(i_T_g)%table(i_T,:) E_plus_W0=BS_T_grp(i_T_g)%E(i_T,1) if(allocated(BS_T_grp(i_T_g)%W)) then E_plus_W0=BS_T_grp(i_T_g)%E(i_T,1)-cI*BS_T_grp(i_T_g)%W(i_T) @@ -164,7 +168,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) enddo ! if (l_BS_esort.and.i_res_ares==1) then - call K_IP_sort("add",i_sort,nVAR,E_plus_W0,vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,E_plus_W0,vtmpC) nVAR=nVAR+1 endif ! @@ -191,7 +195,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)))/3._SP endif res_abs=res_abs*f_eh*Z_eh*E_eh - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_abs,vtmpC) + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_abs,vtmpC) endif ! if (l_BS_kerr) then @@ -201,7 +205,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)))/2._SP endif res_kerr=res_kerr*Z_eh*E_eh*f_eh - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_kerr,vtmpC) + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_kerr,vtmpC) endif ! if (l_BS_photolum) then @@ -225,7 +229,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP endif res_dich=res_dich*f_eh*Z_eh/(q0_def_norm) - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_dich,vtmpC) + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_dich,vtmpC) endif ! ! Magnons @@ -237,8 +241,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_magn(:)=BS_T_grp(i_T_g)%dipoles_mag(:,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_mag(:,i_T,1)) res_magn=res_magn*f_eh*Z_eh if (l_BS_esort.and.i_res_ares==1) then - call K_IP_sort("add",i_sort,nVAR,res_magn(1),vtmpC) - if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,res_magn(2),vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(1),vtmpC) + if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) endif endif ! @@ -330,7 +334,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Sorting procedure !=================== - if (l_BS_esort) call K_IP_sort("sort",0,nVAR,cZERO,vtmpC) + if (l_BS_esort) call K_IP_sort("sort",0,nVAR,(/0,0,0,0,0/),vtmpI,cZERO,vtmpC) ! ! ALL 2 ALL !============== @@ -433,7 +437,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism") - call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP") + call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") ! ! Clean ! diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index 2e6d1734c9..4ea1012774 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -21,11 +21,11 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_IP_sort(what,I,N,El,vC) +subroutine K_IP_sort(what,I,N,Itrans,vI,El,vC) ! use pars, ONLY:SP,cZERO use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_COM_Xk_ibz_INDEX - use X_m, ONLY:BS_E_sorted,N_BS_E_sorted + use X_m, ONLY:BS_E_sorted,N_BS_E_sorted,BS_E_sorted_indx use BS, ONLY:BS_H_dim use vec_operate, ONLY:sort,degeneration_finder use units, ONLY:HA2EV @@ -34,7 +34,7 @@ subroutine K_IP_sort(what,I,N,El,vC) #include ! character(*) ::what - integer ::I,N + integer ::I,N,Itrans,vI(BS_H_dim,5) complex(SP) ::El,vC(BS_H_dim,N_BS_E_sorted) ! ! Work space @@ -46,6 +46,7 @@ subroutine K_IP_sort(what,I,N,El,vC) if (what=="add") then N=N+1 vC(I,N)=El + if(N==1) vI(I,:)=BS_T_grp(i_T_group_now)%table(i_T_in_the_grp,:) return endif ! @@ -72,15 +73,25 @@ subroutine K_IP_sort(what,I,N,El,vC) BS_E_sorted(:,i_VAR,1)=cZERO do i_grp=1,n_deg_grp if(i_grp>EDIM/Ntmp) cycle + ! + if(i_VAR==1) then + if (n_of_el(i_grp)>18) call warning("More than 18 degenerate transitions detected. Printing only first 18") + do i_cv=first_el(i_grp),first_el(i_grp)+n_of_el(i_grp)-1 + BS_E_sorted_indx(i_grp,i_cv-first_el(i_grp)+1,1:4)=vI(sort_indx(i_cv),:) + enddo + endif + ! if(i_VAR==2) then BS_E_sorted(i_grp,i_VAR,1)=real(n_of_el(i_grp),SP) cycle endif + ! do i_cv=first_el(i_grp),first_el(i_grp)+n_of_el(i_grp)-1 BS_E_sorted(i_grp,i_VAR,1)=BS_E_sorted(i_grp,i_VAR,1)+vC(sort_indx(i_cv),i_VAR) enddo - BS_E_sorted(i_grp,i_VAR,1)=BS_E_sorted(i_grp,i_VAR,1)/real(n_of_el(i_grp),SP) + if(i_VAR==1) BS_E_sorted(i_grp,i_VAR,1)=BS_E_sorted(i_grp,i_VAR,1)/real(n_of_el(i_grp),SP) enddo + ! enddo ! ! Free diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 737c384030..0c28e79d7b 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -78,6 +78,7 @@ module X_m ! Absorption & Polarizability ! integer :: N_BS_E_sorted=0 + integer, allocatable :: BS_E_sorted_indx(:,:,:) complex(SP), allocatable :: BS_E_sorted(:,:,:) complex(SP), allocatable :: Epsilon_ii(:,:) complex(SP), allocatable :: Epsilon_ij(:,:) diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 4620ba37eb..bc70cc8e6f 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -147,6 +147,15 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) if (data_sort(1)==0._SP) cycle call X_OUTPUT_driver("WRITE E_IP",data=data_sort(:N_BS_E_sorted)) enddo + do id=1,min(BS_H_dim,1000) + data_sort(1)=real(BS_E_sorted(id,1,1),SP) + if (data_sort(1)==0._SP) cycle + do it=1,18 + if (BS_E_sorted_indx(id,it,1)==-1) exit + data_sort(2:6)=BS_E_sorted_indx(id,it,1:4) + call X_OUTPUT_driver("WRITE E_INDX_IP",data=data_sort(:N_BS_E_sorted)) + enddo + enddo endif ! ! E sorted diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index ece5143300..d51d374484 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -53,20 +53,21 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) ! if (STRING_match(WHAT,"DEF")) then call ELEMENTAL_init(1,"fxc","Exchange-Correlation Kernel","optics") - call ELEMENTAL_init(2,"E_IP","Sorted IP Energies","sort") - call ELEMENTAL_init(3,"Esort","Sorted Interacting Energies","sort") - call ELEMENTAL_init(4,"pl","Photoluminescence","PL") - call ELEMENTAL_init(5,"eps","Absorption","optics") - call ELEMENTAL_init(6,"refl","Reflectivity","optics") - call ELEMENTAL_init(7,"eel","Electron Energy Loss","optics") - call ELEMENTAL_init(8,"alpha","Polarizability ( -<> )","optics") - call ELEMENTAL_init(9,"off","Off-diagonal Absorption","kerr") - call ELEMENTAL_init(10,"beta","Off-diagonal Polarizability","kerr") - call ELEMENTAL_init(11,"moke","MOKE parameters","kerr") - call ELEMENTAL_init(12,"jdos","Joint Density of states","optics") - call ELEMENTAL_init(13,"CD","Dichroism","dichroism") - call ELEMENTAL_init(14,"Spm","Magnons (S+-)","magnons") - call ELEMENTAL_init(15,"Smp","Magnons (S-p)","magnons") + call ELEMENTAL_init(2,"E_INDX_IP","Sorted IP Energies indexes","indexes") + call ELEMENTAL_init(3,"E_IP","Sorted IP Energies","sort") + call ELEMENTAL_init(4,"Esort","Sorted Interacting Energies","sort") + call ELEMENTAL_init(5,"pl","Photoluminescence","PL") + call ELEMENTAL_init(6,"eps","Absorption","optics") + call ELEMENTAL_init(7,"refl","Reflectivity","optics") + call ELEMENTAL_init(8,"eel","Electron Energy Loss","optics") + call ELEMENTAL_init(9,"alpha","Polarizability ( -<> )","optics") + call ELEMENTAL_init(10,"off","Off-diagonal Absorption","kerr") + call ELEMENTAL_init(11,"beta","Off-diagonal Polarizability","kerr") + call ELEMENTAL_init(12,"moke","MOKE parameters","kerr") + call ELEMENTAL_init(13,"jdos","Joint Density of states","optics") + call ELEMENTAL_init(14,"CD","Dichroism","dichroism") + call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") + call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") endif ! if (STRING_match(WHAT,"INIT")) then @@ -91,7 +92,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) endif if (l_BS_jdos) call X_obs_onoff("+ jdos") if (trim(alpha_dim)/='adim'.and.X_do_obs("eps")) call X_obs_onoff("+ alpha") - if (l_BS_esort) call X_obs_onoff("+ Esort E_IP") + if (l_BS_esort) call X_obs_onoff("+ Esort E_IP E_INDX_IP") if (l_BS_kerr) call X_obs_onoff("+ off") if (X_do_obs("alpha") .and. l_BS_kerr) call X_obs_onoff("+ beta") if (.not.X_do_obs("alpha") .and. l_BS_kerr) call X_obs_onoff("+ moke") @@ -102,9 +103,9 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) !...solvers specific if (present(solver)) then if (STRING_match(solver,"Slepc")) call X_obs_onoff("- eel") - if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP kerr magnons jdos") - if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort jdos E_IP") - if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP") + if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP E_INDX_IP kerr magnons jdos") + if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort jdos E_IP E_INDX_IP") + if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP E_INDX_IP") endif ! ! Headers... @@ -116,7 +117,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) X_obs(1)%COL_header(2:3) = (/'Re(q^2Fxc)','Re(q^2Fxc)'/) endif if (X_do_obs("Esort")) then - do ic=2,3 + do ic=3,4 X_obs(ic)%N_columns=2 X_obs(ic)%COL_header(1:2) = (/'E ','N_deg'/) enddo @@ -127,16 +128,20 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) do it=1,N_X_obs if (.not.X_do_obs(trim(X_obs(it)%what))) cycle if (.not.any(trim(X_obs(it)%what)==((/"eps","Spm","Smp","off"/))).and..not.trim(X_obs(it)%what)=="CD") cycle - do ic=2,3 + do ic=3,4 X_obs(ic)%N_columns=X_obs(ic)%N_columns+1 X_obs(ic)%COL_header(X_obs(ic)%N_columns) =trim(X_obs(it)%what) enddo enddo endif + if (X_do_obs("indexes")) then + X_obs(2)%N_columns=5 + X_obs(2)%COL_header(1:2) = (/' E ','ikbz','ib1 ','ib2 ','i_sp1','i_sp2'/) + endif if (X_do_obs("PL")) then - X_obs(4)%N_columns=3 - X_obs(4)%COL_header(1) = 'E' - X_obs(4)%COL_header(2:3) = (/'PL ','PL_o'/) + X_obs(5)%N_columns=3 + X_obs(5)%COL_header(1) = 'E' + X_obs(5)%COL_header(2:3) = (/'PL ','PL_o'/) endif ! ! ... pre-formatted @@ -144,7 +149,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) BASIC_col(2:3) = (/'Im(XXX)', 'Re(XXX)'/) BASIC_col(4:5) = (/'Im(XXX_o)', 'Re(XXX_o)'/) BASIC_col(6:7) = (/'Im(XXX`)','Re(XXX`)'/) - do it=5,N_X_obs + do it=6,N_X_obs X_obs(it)%N_columns=7 do ic=1,X_obs(it)%N_columns X_obs(it)%COL_header(ic)=STRING_remove(BASIC_col(ic),"XXX",trim(X_obs(it)%what)) From 8afc8ffcc2ad18c22491e98179df6236696ff34d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Nov 2022 16:11:37 +0100 Subject: [PATCH 0502/1367] Automatic commit: configure regenerated after merge --- configure | 23 +++++++++++++++++++++++ include/driver/version.h | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 697f109b7a..47f2011780 100755 --- a/configure +++ b/configure @@ -680,6 +680,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -855,6 +856,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -914,6 +917,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1645,6 +1649,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3412,6 +3417,20 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15711,6 +15730,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15893,6 +15915,7 @@ fi + # diff --git a/include/driver/version.h b/include/driver/version.h index d9444afb05..2f9079d120 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21867 -#define YAMBO_HASH "b07009392" +#define YAMBO_REVISION 21897 +#define YAMBO_HASH "987418070" From 0c2a86ec1d940286e7439234913c467b616f398e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Nov 2022 16:33:58 +0100 Subject: [PATCH 0503/1367] Version 5.1.0, Revision 21913, Hash 2f9ddb5b0 MODIFIED * include/driver/version.h allocations/X_ALLOC_elemental.F bse/K_IP.F bse/K_IP_sort.F modules/mod_X.F output/K_OUTPUT.F output/X_OUTPUT_driver.F Changes: - [yambo] Printing of IP indexes fixed Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/allocations/X_ALLOC_elemental.F | 5 +++-- src/bse/K_IP.F | 4 ++-- src/bse/K_IP_sort.F | 8 ++++---- src/modules/mod_X.F | 2 +- src/output/K_OUTPUT.F | 15 ++++++++------- src/output/X_OUTPUT_driver.F | 8 ++++---- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3a9a711bf3..6ba57c5b26 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21755 -#define YAMBO_HASH "1ccdd3a2e" +#define YAMBO_REVISION 21913 +#define YAMBO_HASH "2f9ddb5b0" diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 5ef35ed20c..7458353993 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -24,7 +24,8 @@ subroutine X_ALLOC_elemental(WHAT,DIM) ! use pars, ONLY:rZERO,cZERO - use X_m, ONLY:Epsilon_ii,Joint_DOS,BS_E_sorted,Epsilon_ij,X_magnons,X_dichroism,& + use X_m, ONLY:Epsilon_ii,Joint_DOS,BS_E_sorted,BS_E_sorted_indx, & +& Epsilon_ij,X_magnons,X_dichroism, & & X_fxc,EEL,Alpha,X_mat,X_drude_term,X_RLcomp_ig use PHOTOLUM, ONLY:PL #ifdef _CUDA @@ -68,7 +69,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) case('BS_E_SORTED') YAMBO_ALLOC(BS_E_sorted,(DIM(1),DIM(2),DIM(3))) BS_E_sorted=cZERO - YAMBO_ALLOC(BS_E_sorted_indx,(DIM(1),2*DIM(2),4)) + YAMBO_ALLOC(BS_E_sorted_indx,(DIM(1),2*DIM(2),5)) BS_E_sorted=-1 case('FXC') YAMBO_ALLOC(X_fxc,(DIM(1))) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index df9481c5e0..45e6de2c85 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -60,10 +60,10 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Work space ! - integer ::i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR + integer ::i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR,Indexes(5) real(SP) ::f_eh,f_eh_PL,res_PL logical ::dip_v,dip_r - complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),Indexes(5),& + complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),& & para_term_w0,diam_term_used,Z_eh,E_eh ! integer :: i_ColFG diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index 4ea1012774..092dd26b07 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_IP_sort(what,I,N,Itrans,vI,El,vC) +subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! use pars, ONLY:SP,cZERO use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_COM_Xk_ibz_INDEX @@ -34,7 +34,7 @@ subroutine K_IP_sort(what,I,N,Itrans,vI,El,vC) #include ! character(*) ::what - integer ::I,N,Itrans,vI(BS_H_dim,5) + integer ::I,N,Indexes(5),vI(BS_H_dim,5) complex(SP) ::El,vC(BS_H_dim,N_BS_E_sorted) ! ! Work space @@ -46,7 +46,7 @@ subroutine K_IP_sort(what,I,N,Itrans,vI,El,vC) if (what=="add") then N=N+1 vC(I,N)=El - if(N==1) vI(I,:)=BS_T_grp(i_T_group_now)%table(i_T_in_the_grp,:) + if(N==1) vI(I,:)=Indexes return endif ! @@ -77,7 +77,7 @@ subroutine K_IP_sort(what,I,N,Itrans,vI,El,vC) if(i_VAR==1) then if (n_of_el(i_grp)>18) call warning("More than 18 degenerate transitions detected. Printing only first 18") do i_cv=first_el(i_grp),first_el(i_grp)+n_of_el(i_grp)-1 - BS_E_sorted_indx(i_grp,i_cv-first_el(i_grp)+1,1:4)=vI(sort_indx(i_cv),:) + BS_E_sorted_indx(i_grp,i_cv-first_el(i_grp)+1,1:5)=vI(sort_indx(i_cv),:) enddo endif ! diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 0c28e79d7b..249391648f 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -168,7 +168,7 @@ module X_m integer :: N_messages character(schlen) :: messages(N_MAX_columns) end type - integer, parameter :: N_X_obs=15 + integer, parameter :: N_X_obs=16 type(X_obs_t) :: X_obs(N_X_obs) ! interface diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index bc70cc8e6f..2dadc3f836 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -30,7 +30,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use BS, ONLY:BSE_mode,BS_K_is_ALDA,BSqpts,BS_field_direction,BS_dip_size,BS_H_dim,BS_K_coupling use stderr, ONLY:STRING_match use X_m, ONLY:Epsilon_ii,eps_2_alpha,EPS_2_eels,X_OUTPUT_driver,Epsilon_ij,X_obs_onoff,& -& X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,X_magnons +& X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,BS_E_sorted_indx,X_magnons use com, ONLY:msg,com_compose_msg use R_lattice, ONLY:bare_qpg,q_norm,FineGd_desc,nkbz use D_lattice, ONLY:l_0D @@ -47,10 +47,10 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! Work Space ! character(2) :: ordering - integer :: id + integer :: id,it character(10) :: solver complex(SP) :: spectra(BSS_n_freqs,3),eel(BSS_n_freqs,3) - real(SP) :: data_sort(N_BS_E_sorted+1) + real(SP) :: data_sort(N_BS_E_sorted+1),index_sort(6) logical :: l_last_col,eval_eels ! if (STRING_match(WHAT,"open")) then @@ -148,12 +148,13 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) call X_OUTPUT_driver("WRITE E_IP",data=data_sort(:N_BS_E_sorted)) enddo do id=1,min(BS_H_dim,1000) - data_sort(1)=real(BS_E_sorted(id,1,1),SP) - if (data_sort(1)==0._SP) cycle + index_sort(1)=real(BS_E_sorted(id,1,1),SP) + if (index_sort(1)==0._SP) cycle do it=1,18 if (BS_E_sorted_indx(id,it,1)==-1) exit - data_sort(2:6)=BS_E_sorted_indx(id,it,1:4) - call X_OUTPUT_driver("WRITE E_INDX_IP",data=data_sort(:N_BS_E_sorted)) + index_sort(1)=real(BS_E_sorted(id,1,1),SP) + index_sort(2:6)=real(BS_E_sorted_indx(id,it,1:5),SP) + call X_OUTPUT_driver("WRITE E_INDX_IP",data=index_sort) enddo enddo endif diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index d51d374484..37ea021fbf 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -116,6 +116,10 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) X_obs(1)%COL_header(1) = 'E' X_obs(1)%COL_header(2:3) = (/'Re(q^2Fxc)','Re(q^2Fxc)'/) endif + if (X_do_obs("indexes")) then + X_obs(2)%N_columns=6 + X_obs(2)%COL_header(1:6) = (/' E ','ikbz','ib1 ','ib2 ','isp1','isp2'/) + endif if (X_do_obs("Esort")) then do ic=3,4 X_obs(ic)%N_columns=2 @@ -134,10 +138,6 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) enddo enddo endif - if (X_do_obs("indexes")) then - X_obs(2)%N_columns=5 - X_obs(2)%COL_header(1:2) = (/' E ','ikbz','ib1 ','ib2 ','i_sp1','i_sp2'/) - endif if (X_do_obs("PL")) then X_obs(5)%N_columns=3 X_obs(5)%COL_header(1) = 'E' From 71e1ea125b7aeb20605df33cda57ce2a91204520 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Nov 2022 18:59:57 +0100 Subject: [PATCH 0504/1367] Version 5.1.0, Revision 21914, Hash 0c2a86ec1 MODIFIED * include/driver/version.h allocations/X_ALLOC_elemental.F modules/mod_X.F output/K_OUTPUT.F output/X_OUTPUT_driver.F Changes: - [yambo] BSE indexes printed as integers Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/allocations/X_ALLOC_elemental.F | 2 +- src/modules/mod_X.F | 3 ++- src/output/K_OUTPUT.F | 14 +++++++------- src/output/X_OUTPUT_driver.F | 15 +++++++++++---- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6ba57c5b26..7f3e86a807 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21913 -#define YAMBO_HASH "2f9ddb5b0" +#define YAMBO_REVISION 21914 +#define YAMBO_HASH "0c2a86ec1" diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 7458353993..b81d63eb3c 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -70,7 +70,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) YAMBO_ALLOC(BS_E_sorted,(DIM(1),DIM(2),DIM(3))) BS_E_sorted=cZERO YAMBO_ALLOC(BS_E_sorted_indx,(DIM(1),2*DIM(2),5)) - BS_E_sorted=-1 + BS_E_sorted_indx=-1 case('FXC') YAMBO_ALLOC(X_fxc,(DIM(1))) X_fxc=cZERO diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 249391648f..89a849bed8 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -184,7 +184,7 @@ subroutine X_OUTPUT_messages(iq,ig,Vnl,GF,ordering,Q_plus_G,MORE) character(*), optional :: MORE end subroutine ! - subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) + subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) use pars, ONLY:SP use frequency, ONLY:w_samp use descriptors, ONLY:IO_desc @@ -194,6 +194,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) integer, optional:: IQ,IG type(IO_desc),optional:: DESC real(SP), optional:: data(:) + integer, optional:: indexes(:) end subroutine ! subroutine X_Double_Grid_setup(iq,k,k_FGbz,nTrans_percent,Radius) diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 2dadc3f836..358a1d42f1 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -47,10 +47,10 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! Work Space ! character(2) :: ordering - integer :: id,it + integer :: id,it,index_sort(5) character(10) :: solver complex(SP) :: spectra(BSS_n_freqs,3),eel(BSS_n_freqs,3) - real(SP) :: data_sort(N_BS_E_sorted+1),index_sort(6) + real(SP) :: data_sort(N_BS_E_sorted+1) logical :: l_last_col,eval_eels ! if (STRING_match(WHAT,"open")) then @@ -148,13 +148,13 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) call X_OUTPUT_driver("WRITE E_IP",data=data_sort(:N_BS_E_sorted)) enddo do id=1,min(BS_H_dim,1000) - index_sort(1)=real(BS_E_sorted(id,1,1),SP) - if (index_sort(1)==0._SP) cycle + data_sort(1)=real(BS_E_sorted(id,1,1),SP) + if (data_sort(1)==0._SP) cycle do it=1,18 if (BS_E_sorted_indx(id,it,1)==-1) exit - index_sort(1)=real(BS_E_sorted(id,1,1),SP) - index_sort(2:6)=real(BS_E_sorted_indx(id,it,1:5),SP) - call X_OUTPUT_driver("WRITE E_INDX_IP",data=index_sort) + data_sort(1)=real(BS_E_sorted(id,1,1),SP) + index_sort(1:5)=real(BS_E_sorted_indx(id,it,1:5),SP) + call X_OUTPUT_driver("WRITE E_INDX_IP",data=data_sort(1:1),indexes=index_sort) enddo enddo endif diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 37ea021fbf..b46fe9bf39 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) +subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) ! use pars, ONLY:schlen,SP use D_lattice, ONLY:l_0D @@ -45,6 +45,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) integer, optional :: IQ,IG type(IO_desc),optional :: DESC real(SP), optional :: data(:) + integer, optional :: indexes(:) ! ! Work Space integer ::it,ik,ic @@ -199,9 +200,15 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) do it=1,N_X_obs if (.not.IS_this_ok(it)) cycle call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(1:1),TITLES=X_obs(it)%COL_header(1:1),UNIT="eV") - do ic=2,size(data) - call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(ic:ic),TITLES=X_obs(it)%COL_header(ic:ic)) - enddo + if (present(indexes)) then + do ic=1,size(indexes) + call OUTPUT_driver(trim(X_obs(it)%prefix),I_VALUES=indexes(ic:ic),TITLES=X_obs(it)%COL_header(ic+1:ic+1)) + enddo + else + do ic=2,size(data) + call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(ic:ic),TITLES=X_obs(it)%COL_header(ic:ic)) + enddo + endif call OUTPUT_driver(trim(X_obs(it)%prefix),action="write") enddo endif From 34dac0e16d5a538404e3869b5370d53142a5fe08 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Nov 2022 19:03:36 +0100 Subject: [PATCH 0505/1367] Version 5.1.0, Revision 21915, Hash 71e1ea125 MODIFIED * include/driver/version.h output/X_OUTPUT_driver.F Changes: - [yambo] Small change Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/output/X_OUTPUT_driver.F | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 7f3e86a807..e9b9f6939d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21914 -#define YAMBO_HASH "0c2a86ec1" +#define YAMBO_REVISION 21915 +#define YAMBO_HASH "71e1ea125" diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index b46fe9bf39..dd3e80fc66 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -200,14 +200,13 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) do it=1,N_X_obs if (.not.IS_this_ok(it)) cycle call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(1:1),TITLES=X_obs(it)%COL_header(1:1),UNIT="eV") + do ic=2,size(data) + call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(ic:ic),TITLES=X_obs(it)%COL_header(ic:ic)) + enddo if (present(indexes)) then do ic=1,size(indexes) call OUTPUT_driver(trim(X_obs(it)%prefix),I_VALUES=indexes(ic:ic),TITLES=X_obs(it)%COL_header(ic+1:ic+1)) enddo - else - do ic=2,size(data) - call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(ic:ic),TITLES=X_obs(it)%COL_header(ic:ic)) - enddo endif call OUTPUT_driver(trim(X_obs(it)%prefix),action="write") enddo From ce026e67289b15e8c79bc2e70c417cff47e21216 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Mon, 28 Nov 2022 10:13:25 +0100 Subject: [PATCH 0506/1367] Organize PL_diago_residual for matrix multplication and change K_diago_response_functions.F --- src/bse/K_IP.F | 1 + .../K_components_folded_in_serial_arrays.F | 11 +- src/bse/K_diago_driver.F | 4 +- src/bse/K_diago_response_functions.F | 14 ++- src/bse/PL_diago_residual.F | 114 ++++++++++++------ 5 files changed, 101 insertions(+), 43 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index b8b41bec2f..9fdcd95f80 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -201,6 +201,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Note that res_PL is always positive as f_eh_PL>0 ! + write (*,*) "iresares", i_res_ares f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,1) P_weighted(:)=BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1)*PL_weights(:) res_PL=real(dot_product(P_weighted,P_weighted)*f_eh_PL*Z_eh*E_eh) diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 8df48db9eb..387febf6ae 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -102,7 +102,7 @@ subroutine K_components_folded_in_serial_arrays(iq) do i_res_ares_solver=1,BS_n_eh_spaces_solver ! H_pos=sum(BS_T_grp(i_g_start:I_g-1)%size)+i_Tr+(max(i_res_ares_solver,i_res_ares)-1)*BS_K_dim(1) - ares_fac=(-1)**(i_res_ares_solver-1) + ares_fac=(-1)**(i_res_ares_solver) ! BSS_eh_table(H_pos,:)=(/i_k_bz,i_v,i_c,i_sp_c,i_sp_v/) ! @@ -115,9 +115,14 @@ subroutine K_components_folded_in_serial_arrays(iq) if (BS_perturbative_SOC) BSS_eh_E_SOC_corr(:,H_pos)=BS_T_grp(i_g)%E_SOC_corr(:,i_Tr)*ares_fac ! if (l_BS_photolum) then + !write (*,*) 'i_res_ares_solver', i_res_ares_solver + !write (*,*) 'f_PL', BS_T_grp(i_g)%f_PL(2,2) BSS_PL_f(H_pos)=BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) - if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) BSS_PL_f(H_pos+BS_K_dim(1))=BS_T_grp(i_g)%f_PL(i_Tr,2) - endif + if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) then + write(*,*) 'ciao' + BSS_PL_f(H_pos+BS_K_dim(1))=BS_T_grp(i_g)%f_PL(i_Tr,2) + endif + endif ! if (l_BS_optics) BSS_dipoles_opt(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver) ! diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 2d165e7df5..9ac4b96c23 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -143,7 +143,7 @@ subroutine K_diago_driver(iq,W,X_static) if (.not.BSS_write_eig_2_db) call parser('WRbsWF',BSS_write_eig_2_db) call parser('BSSPertWidth',BSS_perturbative_width) ! - do i_BS_mat=1,BS_res_ares_n_mat + do i_BS_mat=1, BS_res_ares_n_mat ! if(l_diago) then if(.not.BS_K_coupling) BSS_n_eig = BS_K_dim(i_BS_mat) @@ -266,7 +266,7 @@ subroutine K_diago_driver(iq,W,X_static) if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_mat,BS_R_right_kerr) if (l_BS_magnons) call K_diago_herm_magnons_residual(i_BS_mat,BS_R_left_magn,BS_R_right_magn) write (*,*) 'Shape BS_mat', shape(BS_mat) - if (l_BS_photolum)call PL_diago_herm_residual(BS_mat,BS_mat,BS_R_PL) + if (l_BS_photolum)call PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) ! endif ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 7785b58c47..8ce90a6edc 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -63,7 +63,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS real(SP), allocatable :: vtmpR(:) complex(SP), allocatable :: BS_E_sorted_tmp(:,:) integer, allocatable :: sort_indx(:),first_exc(:),n_of_exc(:) - complex(SP) :: gauge_factor,res_kerr,res_magn(2) + complex(SP) :: gauge_factor,res_kerr,res_magn(2), res_pl(2) logical :: l_ADD_the_ARES_using_the_RES ! n_SOC=1 @@ -161,9 +161,15 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif endif if(l_BS_photolum) then - PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi - PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi - write (*,*) "PL2 here", PL(:,2) + !write (*,*) "BS_E(i1)", i1, BS_E(i1) + PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi + PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi + write (*,*) "PL2 here", PL(:,2) + ! PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi + ! PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi + !if (real(BS_E(i1)) .lt. 0) PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi + !if (real(BS_E(i1)) .gt. 0) PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi + !write (*,*) "PL2 here", PL(:,2) endif ! enddo diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index ab03769678..3f43ef1106 100755 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -21,10 +21,17 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) +subroutine PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) ! ! Resonant PL Residuals ! + ! Resonant Residuals + !==================== + ! BS_R_right(i) = \sum_k = + ! \sum_k BS_mat(k,i) x conjg( BSS_dipoles(k) ) + ! BS_R_left(i) = conjg( BS_R_right(i) ) + ! + !shape BS_mat=BS_K_dim(1),BS_K_dim(2) and it's like BS_V_right I think use pars, ONLY:SP,rZERO,cZERO,cI use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset @@ -36,17 +43,18 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) ! implicit none ! - complex(SP),intent(in) :: BS_V_left(BS_K_dim(1),BS_K_dim(2)),BS_V_right(BS_K_dim(1),BS_K_dim(2)) + complex(SP),intent(in) :: BS_mat(BS_K_dim(1),BS_K_dim(2)) real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) real(SP) :: half_BSS_n_eig ! ! Workspace ! type(PP_indexes) ::px + integer, intent(in) :: i_BS_mat integer ::i_l,i_c,i_K,i_lr,i_ll, ik - complex(SP) ::P_x_fZ(BSS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& + complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& & R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) - ! +!Write to a file ! Parallel indexes ! call PP_indexes_reset(px) @@ -65,10 +73,10 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) ! call live_timing('PL residuals',px%n_of_elements(myid+1)) write(*,*) "Hermitian run" - write(*,*) "BS_H_dim", BS_H_dim - write(*,*) "BSS_n_eig", BSS_n_eig - write(*,*) "BS_K_dim(1)", BS_K_dim(1) - write(*,*) "BS_K_dim(2)", BS_K_dim(2) + write(*,*) "BS_H_dim", BS_H_dim !72 + write(*,*) "BSS_n_eig", BSS_n_eig !36 + write(*,*) "BS_K_dim(1)", BS_K_dim(1) !36 + write(*,*) "BS_K_dim(2)", BS_K_dim(2) !36 half_BSS_n_eig=BSS_n_eig/2. ! ! Hermitian residual @@ -77,48 +85,84 @@ subroutine PL_diago_herm_residual(BS_V_left,BS_V_right,BS_R_PL) ! 1=> left ! 2=> right ! -do i_c=1,3 +if (i_BS_mat==1) then + + do i_c=1,3 do i_K=1,BS_K_dim(1) - P_x_fZ(i_K,i_c,1)=BSS_dipoles_PL(i_c,i_K)*sqrt(BSS_eh_f(i_K)) !resonant PI_greco=BSS_dipoles_PL - P_x_fZ(i_K,i_c,2)=BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(BS_K_dim(1)+i_K)) !antiresonat + !BSS_dipoles_PL= dipoles*PL_weights + P_x_fZ(i_K,i_c,i_BS_mat)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f(i_K))) !Pi^* left sqrt(R) + enddo +enddo +do i_l=1,BS_K_dim(1) + ! + if (.not.px%element_1D(i_l)) cycle !parallelization + ! + ! R_over_R_x_A = R<_j/R_j A^r_ij + ! + do ik = 1, BS_K_dim(1) + R_over_R_x_A(i_BS_mat,ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f(ik) !resonant R + !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not + !Al*R Date: Mon, 28 Nov 2022 10:35:44 +0100 Subject: [PATCH 0507/1367] Version 5.1.0, Revision 22024, Hash b428b5704 MODIFIED * include/driver/version.h driver/options_ypp.c ypp/interface/INIT_ypp.F ypp/modules/mod_YPP_ELPH.F Bugs: - Additions: -New option for a single gkkp database with or without symmetries Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/driver/options_ypp.c | 2 +- ypp/interface/INIT_ypp.F | 3 ++- ypp/modules/mod_YPP_ELPH.F | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 09848750e3..749ecae132 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22023 -#define YAMBO_HASH "025b7c72f" +#define YAMBO_REVISION 22024 +#define YAMBO_HASH "b428b5704" diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index 563f59822a..66dad9ca7a 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -92,7 +92,7 @@ void options_ypp(struct options_struct options[],int *i_opt) options[*i_opt].bin="ypp_ph"; options[*i_opt].yambo_string="gkkp" ; options[*i_opt].section="Convertions"; - options[*i_opt].long_desc[0]="=(g)kkp,(d)ouble grid,(p)lot gkkp"; + options[*i_opt].long_desc[0]="=(g)kkp,(d)ouble grid,(p)lot gkkp,(s)ingle gkkp db"; options[*i_opt].char_var=1; #endif /* diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 09f81b9417..0751d93973 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -294,6 +294,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_gkkp_db =STRING_match(rstr_piece(i1+1),'g') l_gkkp_dg =STRING_match(rstr_piece(i1+1),'d') l_gkkp_plot =STRING_match(rstr_piece(i1+1),'p') + l_gkkp_s_db =STRING_match(rstr_piece(i1+1),'s') endif #endif if ( trim(rstr_piece(i1)) == 'dipoles') then @@ -393,7 +394,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #if defined _YPP_ELPH ! if (l_eliashberg) call initactivate(1,'eliashberg') - if (l_gkkp.or.l_gkkp_db) call initactivate(1,'gkkp') + if (l_gkkp.or.l_gkkp_db.or.l_gkkp_s_db) call initactivate(1,'gkkp') if (l_gkkp_db) call initactivate(1,'gkkp_db') if (l_gkkp_dg) call initactivate(1,'gkkp_dg') if (l_gkkp_plot) call initactivate(1,'gkkp_plot') diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index 460dfc32e7..0eec374cab 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -46,6 +46,7 @@ module YPP_ELPH ! ...GKKP I/O logical :: l_gkkp logical :: l_gkkp_db + logical :: l_gkkp_s_db logical :: l_gkkp_dg logical :: l_gkkp_plot logical :: l_use_qindxB From f8e1a49d149192a908b2338ff261d1c472c7c0b3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Nov 2022 10:41:40 +0100 Subject: [PATCH 0508/1367] Version 5.1.0, Revision 22025, Hash fdbe1c1e5 MODIFIED * include/driver/version.h ypp/interface/INIT_ypp.F Additions: -Removed useless flag Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/interface/INIT_ypp.F | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 749ecae132..635f74a551 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22024 -#define YAMBO_HASH "b428b5704" +#define YAMBO_REVISION 22025 +#define YAMBO_HASH "fdbe1c1e5" diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 0751d93973..042a3f9fed 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -721,7 +721,10 @@ subroutine INIT_ypp(E,instr,FINALIZE) ! #if defined _YPP_ELPH if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpExpOnlyK UseQindxB") - if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") + if (l_gkkp_dg.or.l_gkkp_db) then + call initactivate(1,"PHfreqF PHmodeF") + call initactivate(-1,"ElecTemp") + endif if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") if (l_gkkp_plot) call initactivate(1,"Degen_Step cooOut") if (l_phonons.and.l_eliashberg) call initactivate(1,"EE_Fermi EfGbroad") From c5ced23c56d6dbd48f6b42649dfcc4bb70c1f586 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Nov 2022 11:03:28 +0100 Subject: [PATCH 0509/1367] Version 5.1.0, Revision 22026, Hash f8e1a49d1 MODIFIED * driver/ypp.F include/driver/version.h ypp/el-ph/.objects ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F ypp/modules/mod_YPP_ELPH.F NEW * ypp/el-ph/ELPH_sngl_db.F Bugs: - Additions: -New file to read a single database without symmetries Changes: - Patch sent by: Claudio Attaccalite --- driver/ypp.F | 5 +++-- include/driver/version.h | 4 ++-- ypp/el-ph/.objects | 2 +- ypp/el-ph/ELPH_sngl_db.F | 34 ++++++++++++++++++++++++++++++++++ ypp/interface/INIT_load_ypp.F | 2 ++ ypp/interface/INIT_ypp.F | 13 +++++++------ ypp/modules/mod_YPP_ELPH.F | 2 +- 7 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 ypp/el-ph/ELPH_sngl_db.F diff --git a/driver/ypp.F b/driver/ypp.F index 71b3a59d52..22d0785922 100644 --- a/driver/ypp.F +++ b/driver/ypp.F @@ -45,7 +45,7 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir #endif #if defined _YPP_ELPH use YPP_ELPH, ONLY:l_atomic_amplitude,l_eliashberg,l_phonons,l_gkkp,ELPH_general_gFsq, & -& l_gkkp_dg,l_gkkp_plot,l_gkkp_db +& l_gkkp_dg,l_gkkp_plot,l_gkkp_db,l_gkkp_sngl #endif ! implicit none @@ -260,7 +260,8 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! if ((l_gkkp.and..not.l_excitons).or.l_phonons) then ! ===== ======== - if (l_gkkp) call ELPH_databases(k,en,q) + if (l_gkkp_db) call ELPH_databases(k,en,q) + if (l_gkkp_sngl) call ELPH_sngl_db(k,en,q) if (l_eliashberg.or.l_dos) call ELPH_eliashberg_dos(k,en,q) if (l_atomic_amplitude) call ELPH_atomic_amplitude(q) if (l_gkkp_dg) call ELPH_double_grid(k,en,q) diff --git a/include/driver/version.h b/include/driver/version.h index 635f74a551..3522ff26d8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22025 -#define YAMBO_HASH "fdbe1c1e5" +#define YAMBO_REVISION 22026 +#define YAMBO_HASH "f8e1a49d1" diff --git a/ypp/el-ph/.objects b/ypp/el-ph/.objects index 34dd17f077..5553fe5c4c 100644 --- a/ypp/el-ph/.objects +++ b/ypp/el-ph/.objects @@ -2,5 +2,5 @@ objs = ELPH_databases.o ELPH_databases_IO_elemental.o ELPH_databases_IO_pol_and_freqs.o ELPH_databases_IO_grids_check.o \ ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o \ ELPH_eliashberg_dos.o ELPH_general_gFsq.o ELPH_excitonic_gkkp.o ELPH_databases_IO_modes.o \ - ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o + ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o ELPH_sngl_db.o #endif diff --git a/ypp/el-ph/ELPH_sngl_db.F b/ypp/el-ph/ELPH_sngl_db.F new file mode 100644 index 0000000000..f722776323 --- /dev/null +++ b/ypp/el-ph/ELPH_sngl_db.F @@ -0,0 +1,34 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine ELPH_sngl_db(k,E,q) + ! + use units, ONLY:HA2EV + use pars, ONLY:schlen,SP + use stderr, ONLY:intc + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp + ! +#include + ! +end subroutine diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index e9c49b0156..f38e480ef0 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -92,6 +92,7 @@ subroutine INIT_ypp_load(defs) #if defined _YPP_ELPH call it('r',defs,'eliashberg', '[R] Eliashberg') call it('r',defs,'gkkp_db', '[R] GKKP database') + call it('r',defs,'gkkp_sngl', '[R] GKKP single q-database') call it('r',defs,'gkkp_dg', '[R] GKKP double grid') call it('r',defs,'gkkp_plot', '[R] GKKP plot') call it('r',defs,'ph_ass_dos', '[R] Phonon-assisted DOS') @@ -326,6 +327,7 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') call it('f',defs,'GkkpExpOnlyK','Expand only k-points and not the q-points (that should be already in BZ)') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') + call it('f',defs,'UseKSymm','Use symmetries to expand the k-points (default no)') ! #endif ! diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 042a3f9fed..ae97031421 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -294,7 +294,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_gkkp_db =STRING_match(rstr_piece(i1+1),'g') l_gkkp_dg =STRING_match(rstr_piece(i1+1),'d') l_gkkp_plot =STRING_match(rstr_piece(i1+1),'p') - l_gkkp_s_db =STRING_match(rstr_piece(i1+1),'s') + l_gkkp_sngl =STRING_match(rstr_piece(i1+1),'s') endif #endif if ( trim(rstr_piece(i1)) == 'dipoles') then @@ -394,9 +394,10 @@ subroutine INIT_ypp(E,instr,FINALIZE) #if defined _YPP_ELPH ! if (l_eliashberg) call initactivate(1,'eliashberg') - if (l_gkkp.or.l_gkkp_db.or.l_gkkp_s_db) call initactivate(1,'gkkp') + if (l_gkkp.or.l_gkkp_db.or.l_gkkp_sngl) call initactivate(1,'gkkp') if (l_gkkp_db) call initactivate(1,'gkkp_db') if (l_gkkp_dg) call initactivate(1,'gkkp_dg') + if (l_gkkp_sngl) call initactivate(1,'gkkp_sngl') if (l_gkkp_plot) call initactivate(1,'gkkp_plot') if (l_ph_ass_dos) call initactivate(1,'ph_ass_dos') ! @@ -452,6 +453,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_phonons =runlevel_is_on('phonons') l_gkkp =runlevel_is_on('gkkp') l_gkkp_db =runlevel_is_on('gkkp_db') + l_gkkp_sngl =runlevel_is_on('gkkp_sngl') l_gkkp_dg =runlevel_is_on('gkkp_dg') l_gkkp_plot =runlevel_is_on('gkkp_plot') l_ph_ass_dos=runlevel_is_on('ph_ass_dos').and.runlevel_is_on('excitons') @@ -721,10 +723,9 @@ subroutine INIT_ypp(E,instr,FINALIZE) ! #if defined _YPP_ELPH if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpExpOnlyK UseQindxB") - if (l_gkkp_dg.or.l_gkkp_db) then - call initactivate(1,"PHfreqF PHmodeF") - call initactivate(-1,"ElecTemp") - endif + if (l_gkkp_sngl) call initactivate(1,"DBsPATH UseKSymm UseQindxB") + if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") + if (l_gkkp_dg.or.l_gkkp_db.or.l_gkkp_sngl) call initactivate(-1,"ElecTemp") if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") if (l_gkkp_plot) call initactivate(1,"Degen_Step cooOut") if (l_phonons.and.l_eliashberg) call initactivate(1,"EE_Fermi EfGbroad") diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index 0eec374cab..1bd5a7e2e3 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -46,7 +46,7 @@ module YPP_ELPH ! ...GKKP I/O logical :: l_gkkp logical :: l_gkkp_db - logical :: l_gkkp_s_db + logical :: l_gkkp_sngl logical :: l_gkkp_dg logical :: l_gkkp_plot logical :: l_use_qindxB From 374da9eb362403318abb8dcb7405dfd5d64360d4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Nov 2022 12:04:17 +0100 Subject: [PATCH 0510/1367] Version 5.1.0, Revision 22027, Hash c5ced23c5 MODIFIED * include/driver/version.h ypp/el-ph/.objects ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_sngl_db.F Additions: -Working on single point import wave-function Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/el-ph/.objects | 3 ++- ypp/el-ph/ELPH_databases.F | 44 ++++---------------------------------- ypp/el-ph/ELPH_sngl_db.F | 10 +++++++++ 4 files changed, 18 insertions(+), 43 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3522ff26d8..a3a99c1caa 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22026 -#define YAMBO_HASH "f8e1a49d1" +#define YAMBO_REVISION 22027 +#define YAMBO_HASH "c5ced23c5" diff --git a/ypp/el-ph/.objects b/ypp/el-ph/.objects index 5553fe5c4c..97a8493afa 100644 --- a/ypp/el-ph/.objects +++ b/ypp/el-ph/.objects @@ -2,5 +2,6 @@ objs = ELPH_databases.o ELPH_databases_IO_elemental.o ELPH_databases_IO_pol_and_freqs.o ELPH_databases_IO_grids_check.o \ ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o \ ELPH_eliashberg_dos.o ELPH_general_gFsq.o ELPH_excitonic_gkkp.o ELPH_databases_IO_modes.o \ - ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o ELPH_sngl_db.o + ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o ELPH_sngl_db.o \ + ELPH_load_indexes.o #endif diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 19054cb7be..ad25e1b516 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -66,50 +66,14 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) call parser('GkkpExpand',l_gkkp_expand) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) - call parser('UseQindxB',l_use_qindxB) ! if(l_gkkp_expand.and.l_gkkp_expand_only_k) & & call error(' Both flags "GkkpExpand" and "GkkpExpOnlyK" cannot be present at the same moment! ') ! - if(l_gkkp_expand.or.l_gkkp_expand_only_k) then - ! - ! Setup parallelization to load qindx_B - ! ====================================== - ! - call PARALLEL_global_indexes(E,k,q,"BZ_Indexes") - call PARALLEL_SETUP_K_scheme("BZINDX") - ! - if(l_use_qindxB) then - ! - if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') - ! - ! here qindx_B is allocated - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) - if (io_err(1)/=0) then - call msg('s',"Missing k/q scattering database") - call error("Please run a setup with the BSEscatt flag activated") - endif - ! - ! Initialize qindx_B IO - ! ============================= - io_err(2)=qindx_B_init(qindx_ID,qindx_ID_frag) - if(io_err(2)/=0) call error("Error reading qindx_B") - ! - else - ! otherwise qindx_C is allocated - if(.not.allocated(qindx_C)) then - if(coll_scattering.eqv..FALSE.) call error('Please run again the setup with: K_grids= "X B C S" ') - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) - if (io_err(1)/=0) then - call msg('s',"Missing k/q scattering database") - call error('Please (re)run the setup K_grids="C"') - endif - endif - endif - ! - endif + ! Load symmetry indexes if expantion is required + ! ================================================= + ! + if(l_gkkp_expand.or.l_gkkp_expand_only_k) call ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) ! ! Existence and dimensions !========================== diff --git a/ypp/el-ph/ELPH_sngl_db.F b/ypp/el-ph/ELPH_sngl_db.F index f722776323..e4a9f67276 100644 --- a/ypp/el-ph/ELPH_sngl_db.F +++ b/ypp/el-ph/ELPH_sngl_db.F @@ -27,8 +27,18 @@ subroutine ELPH_sngl_db(k,E,q) use pars, ONLY:schlen,SP use stderr, ONLY:intc use electrons, ONLY:levels + use YPP_ELPH, ONLY:l_gkkp_expand_only_k use R_lattice, ONLY:bz_samp + use parser_m, ONLY:parser ! #include ! + type(bz_samp) ::k,q + type(levels) ::E + integer ::qindx_ID,qindx_ID_frag + ! + call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) + ! + if(l_gkkp_expand_only_k) call ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) + ! end subroutine From 2b1c4be4b45d59935c971486fecb75640a8ea0cb Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 28 Nov 2022 14:09:46 +0100 Subject: [PATCH 0511/1367] Version 5.1.0, Revision 22028, Hash 374da9eb3 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_sngl_db.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Additions: -Starting reading DBs Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_sngl_db.F | 22 ++++++++++++++++++---- ypp/interface/INIT_load_ypp.F | 1 - ypp/interface/INIT_ypp.F | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a3a99c1caa..39d30dffee 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22027 -#define YAMBO_HASH "c5ced23c5" +#define YAMBO_REVISION 22028 +#define YAMBO_HASH "374da9eb3" diff --git a/ypp/el-ph/ELPH_sngl_db.F b/ypp/el-ph/ELPH_sngl_db.F index e4a9f67276..76ecdaec64 100644 --- a/ypp/el-ph/ELPH_sngl_db.F +++ b/ypp/el-ph/ELPH_sngl_db.F @@ -26,19 +26,33 @@ subroutine ELPH_sngl_db(k,E,q) use units, ONLY:HA2EV use pars, ONLY:schlen,SP use stderr, ONLY:intc + use com, ONLY:msg use electrons, ONLY:levels - use YPP_ELPH, ONLY:l_gkkp_expand_only_k + use YPP_ELPH, ONLY:l_gkkp_expand_only_k,elph_dbs_path use R_lattice, ONLY:bz_samp use parser_m, ONLY:parser ! #include ! - type(bz_samp) ::k,q - type(levels) ::E - integer ::qindx_ID,qindx_ID_frag + type(bz_samp) :: k,q + type(levels) :: E + integer :: qindx_ID,qindx_ID_frag,io_err,iq + integer, external :: ELPH_databases_IO_elemental + integer :: n_dbs_found ! call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) ! if(l_gkkp_expand_only_k) call ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) ! + call msg('s','Inspecting databases ...') + n_dbs_found=0 + ! + do iq=1,q%nbz + io_err=ELPH_databases_IO_elemental("dV EXIST",iq) + if (io_err==0) n_dbs_found=n_dbs_found+1 + enddo + ! + call msg('sr','Found '//intc(n_dbs_found)//' databases in: '//trim(elph_dbs_path)) + if(n_dbs_found==0) return + ! end subroutine diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index f38e480ef0..98fee8ba99 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -327,7 +327,6 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') call it('f',defs,'GkkpExpOnlyK','Expand only k-points and not the q-points (that should be already in BZ)') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') - call it('f',defs,'UseKSymm','Use symmetries to expand the k-points (default no)') ! #endif ! diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index ae97031421..87b4fee4d5 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -723,7 +723,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) ! #if defined _YPP_ELPH if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpExpOnlyK UseQindxB") - if (l_gkkp_sngl) call initactivate(1,"DBsPATH UseKSymm UseQindxB") + if (l_gkkp_sngl) call initactivate(1,"DBsPATH GkkpExpOnlyK UseQindxB") if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") if (l_gkkp_dg.or.l_gkkp_db.or.l_gkkp_sngl) call initactivate(-1,"ElecTemp") if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") From bea119e941319d57cadca795f9804ac37efdde89 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 29 Nov 2022 11:11:47 +0100 Subject: [PATCH 0512/1367] Version 5.1.0, Revision 22029, Hash 2b1c4be4b MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F NEW * ypp/el-ph/ELPH_load_indexes.F Bugs: -Fixed bug in PL output Additions: -ELPH_databases split in more subroutines Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- src/exc-ph/EXCPH_X_phass.F | 4 +- ypp/el-ph/ELPH_load_indexes.F | 76 +++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 ypp/el-ph/ELPH_load_indexes.F diff --git a/include/driver/version.h b/include/driver/version.h index 39d30dffee..3ac31cb446 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22028 -#define YAMBO_HASH "374da9eb3" +#define YAMBO_REVISION 22029 +#define YAMBO_HASH "2b1c4be4b" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 91e48ede08..5a80d93e84 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -323,8 +323,8 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! ! Luminescence ! - output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii_q(iw,1,iq_bz)),real(PL_ii_q(iw,1,iq_bz)), & -& aimag(PL_ii_q(iw,2,iq_bz)),real(PL_ii_q(iw,2,iq_bz)),aimag(PL_ii_q(iw,3,iq_bz)),real(PL_ii_q(iw,3,iq_bz))/) + output_data=(/real(wv%p(iw))*HA2EV,aimag(PL_ii_q(iw,1,iq_ibz)),real(PL_ii_q(iw,1,iq_ibz)), & +& aimag(PL_ii_q(iw,2,iq_ibz)),real(PL_ii_q(iw,2,iq_ibz)),aimag(PL_ii_q(iw,3,iq_ibz)),real(PL_ii_q(iw,3,iq_ibz))/) call msg('o pl_bse','',output_data,INDENT=-2,USE_TABS=.true.) ! enddo diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F new file mode 100644 index 0000000000..c7efccac5c --- /dev/null +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -0,0 +1,76 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) + ! + use units, ONLY:HA2EV + use pars, ONLY:schlen,SP + use stderr, ONLY:intc + use com, ONLY:msg + use YPP_ELPH, ONLY:l_use_qindxB + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp,bse_scattering,coll_scattering + use parser_m, ONLY:parser + use IO_int, ONLY:io_control + use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL + use parallel_int, ONLY:PARALLEL_global_indexes + ! +#include + ! + type(bz_samp) ::k,q + type(levels) ::E + integer ::qindx_ID,qindx_ID_frag + ! + ! Work Space... + ! + integer ::io_err(3),ID + integer, external ::io_QINDX,qindx_B_init + ! + if(l_use_qindxB) then + ! + if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') + ! + ! here qindx_B is allocated + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) + io_err(1)=io_QINDX(k,q,ID) + if (io_err(1)/=0) then + call msg('s',"Missing k/q scattering database") + call error("Please run a setup with the BSEscatt flag activated") + endif + ! + ! Initialize qindx_B IO + ! ============================= + io_err(2)=qindx_B_init(qindx_ID,qindx_ID_frag) + if(io_err(2)/=0) call error("Error reading qindx_B") + ! + else + ! otherwise qindx_S is allocated + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) + io_err(1)=io_QINDX(k,q,ID) + if (io_err(1)/=0) then + call msg('s',"Missing k/q scattering database") + call error("Please (re)run the setup") + endif + endif + ! +end subroutine From 684eea534fd2acae875d30e4ec725ad12d08f1e9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 2 Dec 2022 11:51:39 +0100 Subject: [PATCH 0513/1367] Version 5.1.0, Revision 22030, Hash bea119e94 MODIFIED * include/driver/version.h ypp/el-ph/.objects ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_load_indexes.F ypp/el-ph/ELPH_sngl_db.F Bugs: -Fixed small bug in reading elph db Additions: -Reading of a single db implemented Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 +- ypp/el-ph/.objects | 2 +- ypp/el-ph/ELPH_databases.F | 2 +- ypp/el-ph/ELPH_load_indexes.F | 7 +++- ypp/el-ph/ELPH_sngl_db.F | 71 ++++++++++++++++++++++++++++++++--- 5 files changed, 74 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3ac31cb446..59ae484926 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22029 -#define YAMBO_HASH "2b1c4be4b" +#define YAMBO_REVISION 22030 +#define YAMBO_HASH "bea119e94" diff --git a/ypp/el-ph/.objects b/ypp/el-ph/.objects index 97a8493afa..f5fd849b7e 100644 --- a/ypp/el-ph/.objects +++ b/ypp/el-ph/.objects @@ -3,5 +3,5 @@ objs = ELPH_databases.o ELPH_databases_IO_elemental.o ELPH_databases_IO_pol_and_ ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o \ ELPH_eliashberg_dos.o ELPH_general_gFsq.o ELPH_excitonic_gkkp.o ELPH_databases_IO_modes.o \ ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o ELPH_sngl_db.o \ - ELPH_load_indexes.o + ELPH_load_indexes.o #endif diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index ad25e1b516..6c251949a1 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -54,7 +54,7 @@ subroutine ELPH_databases(k,E,q) ! integer ::io_err(3),iq,ik,is,idb,i_star,iq_bz,ID,qindx_ID,qindx_ID_frag character(schlen) ::what,db_name - integer, external ::ELPH_databases_IO_elemental,io_ELPH,io_QINDX,qindx_B_init + integer, external ::ELPH_databases_IO_elemental,io_ELPH,qindx_B_init logical, external ::file_exists real(SP) ::v(3) type(GKKP_me) ::GKKP_save,GKKP_bare_save diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index c7efccac5c..960bf7cb11 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -64,8 +64,11 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) if(io_err(2)/=0) call error("Error reading qindx_B") ! else - ! otherwise qindx_S is allocated - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) + ! otherwise qindx_C is allocated + ! + if(.not.coll_scattering) call error(' Please run setup with COLLscatt flag ') + ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) io_err(1)=io_QINDX(k,q,ID) if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") diff --git a/ypp/el-ph/ELPH_sngl_db.F b/ypp/el-ph/ELPH_sngl_db.F index 76ecdaec64..483e2e9f19 100644 --- a/ypp/el-ph/ELPH_sngl_db.F +++ b/ypp/el-ph/ELPH_sngl_db.F @@ -26,19 +26,30 @@ subroutine ELPH_sngl_db(k,E,q) use units, ONLY:HA2EV use pars, ONLY:schlen,SP use stderr, ONLY:intc + use interfaces, ONLY:ELPH_alloc + use ELPH, ONLY:GKKP,elph_nb,ph_modes,elph_nQ,elph_nk_bz + use YPP_ELPH, ONLY:ELPH_DB_alloc,ELPH_DB_free,DB_PH_kpt,DB_nq,DB_q_map,DB_PH_qpt,& +& DB_ph_modes,DB_nb,DB_nq use com, ONLY:msg use electrons, ONLY:levels - use YPP_ELPH, ONLY:l_gkkp_expand_only_k,elph_dbs_path + use YPP_ELPH, ONLY:l_gkkp_expand_only_k,elph_dbs_path,DB_nk use R_lattice, ONLY:bz_samp use parser_m, ONLY:parser + use zeros, ONLY:k_iku_zero + use vec_operate, ONLY:v_is_zero + use LIVE_t, ONLY:live_timing + use IO_m, ONLY:REP,OP_WR_CL,VERIFY,OP_APP_CL,OP_RD_CL + use IO_int, ONLY:io_control ! #include ! type(bz_samp) :: k,q type(levels) :: E - integer :: qindx_ID,qindx_ID_frag,io_err,iq - integer, external :: ELPH_databases_IO_elemental - integer :: n_dbs_found + integer :: qindx_ID,qindx_ID_frag,io_err,iqbz,idb + integer, external :: ELPH_databases_IO_elemental,io_ELPH + character(schlen) :: db_name + integer :: n_dbs_found,ID + real(SP) :: v(3) ! call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) ! @@ -47,12 +58,60 @@ subroutine ELPH_sngl_db(k,E,q) call msg('s','Inspecting databases ...') n_dbs_found=0 ! - do iq=1,q%nbz - io_err=ELPH_databases_IO_elemental("dV EXIST",iq) + ! Withtout symmetries at maximum there will be q%nbz databases + do idb=1,q%nbz + io_err=ELPH_databases_IO_elemental("dV EXIST",idb) if (io_err==0) n_dbs_found=n_dbs_found+1 enddo + DB_nq=n_dbs_found ! call msg('sr','Found '//intc(n_dbs_found)//' databases in: '//trim(elph_dbs_path)) if(n_dbs_found==0) return ! + call ELPH_DB_alloc( ) + ! + call k_ibz2bz(k,'i',.TRUE.) + call k_ibz2bz(q,'i',.TRUE.) + ! + db_name='gkkp_expanded' + ! + ph_modes =DB_ph_modes + elph_nb =DB_nb + elph_nQ =q%nbz + elph_nk_bz =k%nbz + ! + call ELPH_alloc("PHONONS") + call ELPH_alloc("LEVELS dV DW",GKKP=GKKP,Nq_mem=1) + ! + call live_timing('ELPH databases: ',DB_nq) + do idb=1,q%nbz + io_err=ELPH_databases_IO_elemental("dV EXIST",idb) + if(io_err==0) then + if(DB_nk/=k%nbz.and..not.l_gkkp_expand_only_k) call error('Wrong number of k-points ') + ! + ! the q-point is read with KPT + ! + io_err=ELPH_databases_IO_elemental("dV FREQS POL_VEC KPT",idb) + call ELPH_databases_IO_grids_check(k) + io_err=ELPH_databases_IO_elemental("dV KPT GKKP",idb) + call ELPH_databases_IO_transfer_and_write(idb,k,E,GKKP) + ! + ! Search for the q-point + ! + do iqbz=1,q%nbz + v=DB_PH_qpt(idb,:) + if (v_is_zero(v+q%ptbz(iqbz,:),zero_=k_iku_zero)) DB_Q_map(idb)=iqbz + enddo + ! + if(DB_Q_map(idb)==0) call error('Q-point '//intc(idb)//' not found ! ') + ! + if (DB_Q_map(idb)==1) call io_control(ACTION=OP_APP_CL,SEC=(/1,2/),ID=ID) + if (DB_Q_map(idb)> 1) call io_control(ACTION=OP_APP_CL,SEC=(/DB_Q_map(idb)+1/),ID=ID) + io_err=io_ELPH(ID,db_name) + call live_timing(steps=1) + ! + endif + enddo + call live_timing( ) + ! end subroutine From a7cd87e67061aff3be4eaca4dda7100ae14cb3ca Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 2 Dec 2022 14:29:49 +0100 Subject: [PATCH 0514/1367] Version 5.1.0, Revision 21928, Hash 29bd08054 MODIFIED * include/driver/version.h bse/DOUBLE_project.dep dipoles/DOUBLE_project.dep Changes: - [compilation] Updated DOUBLE_project locks Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/DOUBLE_project.dep | 8 ++++---- src/dipoles/DOUBLE_project.dep | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 73fc0cb0a0..d0dd092884 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21763 -#define YAMBO_HASH "68741863c" +#define YAMBO_REVISION 21928 +#define YAMBO_HASH "29bd08054" diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 9c8a47fc06..f02a0ef3e4 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -1,5 +1,4 @@ EPS_via_perturbative_inversion.o - K.o K_Haydock.o K_Haydock_gather.o K_Haydock_response.o @@ -16,11 +15,11 @@ K_correlation_kernel.o K_diago_driver.o K_diago_hermitian_residuals.o - K_diago_kerr_residual.o - K_diago_magnons_residual.o - K_diago_non_hermitian_residuals.o + K_diago_left_residuals.o + K_diago_overlap_matrix.o K_diago_perturbative.o K_diago_response_functions.o + K_diago_right_residuals.o K_diagonal.o K_dipoles.o K_dot_product.o @@ -35,6 +34,7 @@ K_inversion_driver.o K_inversion_engine.o K_inversion_restart.o + K_kernel.o K_multiply_by_V.o K_multiply_by_V_slepc.o K_multiply_by_V_transpose.o diff --git a/src/dipoles/DOUBLE_project.dep b/src/dipoles/DOUBLE_project.dep index efca48007f..deaebdcff9 100644 --- a/src/dipoles/DOUBLE_project.dep +++ b/src/dipoles/DOUBLE_project.dep @@ -13,8 +13,8 @@ DIPOLE_kb_pwscf_comp.o DIPOLE_kb_pwscf_def_dim.o DIPOLE_kb_sum.o - DIPOLE_orb_magn_forCD.o - DIPOLE_orbital_magnetization.o + DIPOLE_orbital_magnetization_cd.o + DIPOLE_orbital_magnetization_rt.o DIPOLE_overlaps.o DIPOLE_p_matrix_elements.o DIPOLE_shifted_grids.o From 5c2a5da220cf1ecb8e39a9d8c70a40b6d42b124f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 13:26:27 +0100 Subject: [PATCH 0515/1367] Version 5.1.0, Revision 21785, Hash 7adfa49a1 MODIFIED * a2y/DOUBLE_project.dep Additions: - [a2y] added a2y/DOUBLE_project.dep after merge with devel-compilation Patch sent by: Davide Sangalli --- interfaces/a2y/DOUBLE_project.dep | 1 + 1 file changed, 1 insertion(+) diff --git a/interfaces/a2y/DOUBLE_project.dep b/interfaces/a2y/DOUBLE_project.dep index 2672db47c2..e008ad9ccf 100644 --- a/interfaces/a2y/DOUBLE_project.dep +++ b/interfaces/a2y/DOUBLE_project.dep @@ -1,5 +1,6 @@ a2y.o a2y_db1.o + a2y_gkkp.o a2y_kb_pp.o a2y_wf.o netcdf_data.o From a6885e56765397c173d784489ed800965200e391 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 22:16:18 +0100 Subject: [PATCH 0516/1367] Version 5.1.0, Revision 21786, Hash 5c2a5da22 MODIFIED * include/driver/version.h a2y/a2y_db1.F Bugs: - [a2y] atom masses stored in atomic units Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_db1.F | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 73fc0cb0a0..d284c951d8 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21763 -#define YAMBO_HASH "68741863c" +#define YAMBO_REVISION 21786 +#define YAMBO_HASH "5c2a5da22" diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 0f5605b452..dfe89bb219 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -115,6 +115,7 @@ subroutine a2y_db1(en,k,ncid) subroutine import_geometry_group use vec_operate, only : cross_product use matrix_operate, only : m3det_i + use units, only : Da2AU use R_lattice, only : b use D_lattice, only : nsym, i_time_rev, i_space_inv, dl_sop, & & DL_vol, a, alat, & @@ -208,6 +209,9 @@ subroutine import_geometry_group varid = netcdf_inquire_varid(ncid, "amu") netcdf_error = nf90_get_var(ncid, varid, atom_mass) call netcdf_check(ncid,netcdf_error,varid) + do i1 = 1, n_atomic_species + atom_mass(i1) = real(atom_mass(i1),SP)*Da2AU ! Mass are stored in Atomic Units + enddo ! ! Symmetry From 6e9b10b87ce36a181bd88a04c28ec250059613bb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 22:20:03 +0100 Subject: [PATCH 0517/1367] Version 5.1.0, Revision 21787, Hash a6885e567 MODIFIED * include/driver/version.h interface/INIT_q_points.F Changes: - [yambo] INIT_q_points imported from devel-exchph-clean Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/INIT_q_points.F | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d284c951d8..9e2aee449d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21786 -#define YAMBO_HASH "5c2a5da22" +#define YAMBO_REVISION 21787 +#define YAMBO_HASH "a6885e567" diff --git a/src/interface/INIT_q_points.F b/src/interface/INIT_q_points.F index 4778762681..334737a702 100644 --- a/src/interface/INIT_q_points.F +++ b/src/interface/INIT_q_points.F @@ -33,6 +33,7 @@ subroutine INIT_q_points( ) use pars, ONLY:SP,schlen,DP use it_tools, ONLY:check_verbosity use R_lattice, ONLY:nqibz,q_pt,bz_samp,q_source + use D_lattice, ONLY:nsym #if defined _ELPH use ELPH, ONLY:PH_qpt,elph_use_q_grid,elph_nQ,elph_grids_are_expanded #endif @@ -66,7 +67,14 @@ subroutine INIT_q_points( ) q_source="is read from the El-Ph databases" nqibz=elph_nQ YAMBO_ALLOC(q_pt,(nqibz,3)) + ! here I read from s.ph and I need to put a -1 q_pt(:,:)=-real(PH_qpt(:,:),SP) + else if(allocated(PH_qpt).and.elph_use_q_grid.and.elph_grids_are_expanded.and.nsym==1) then + q_source="is read from the El-Ph databases expanded" + nqibz=elph_nQ + YAMBO_ALLOC(q_pt,(nqibz,3)) + ! In the ndb.gkkp the -q was already imposed + q_pt(:,:)=real(PH_qpt(:,:),SP) endif #endif ! @@ -124,6 +132,6 @@ integer function get_e_p_q_point(i_q,q_in) endif call io_disconnect(ID) ! - end function + end function get_e_p_q_point ! end subroutine From 24d6a611212b028cd84af2988f2884c3a9867a55 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 22:21:18 +0100 Subject: [PATCH 0518/1367] Version 5.1.0, Revision 22057, Hash 099583a86 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Bugs: - [yambo_ph] small fix Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d284c951d8..8156d97bef 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21786 -#define YAMBO_HASH "5c2a5da22" +#define YAMBO_REVISION 22057 +#define YAMBO_HASH "099583a86" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 33cdf818d1..43d1fce175 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -105,7 +105,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call msg('rs','Use coupling convention from',trim(EXCPH_kind_name)) ! elph_branches_save =elph_branches - call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) + call io_control(ACTION=OP_RD_CL,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. elph_branches =elph_branches_save ! @@ -173,7 +173,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Check if gkkp_expanded is present ! elph_branches_save =elph_branches - call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) + call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. call deliver_IO_error_message(io_err,"GKKP") elph_branches =elph_branches_save From 567fca268f41cccf7be1cac1daf19e8edba2ebeb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 22:24:07 +0100 Subject: [PATCH 0519/1367] Version 5.1.0, Revision 22058, Hash 24d6a6112 MODIFIED * include/driver/version.h el-ph/ELPH_databases_grids_map.F Changes: - [yambo_ph] added comments on ELPH_databases_grids_map Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/el-ph/ELPH_databases_grids_map.F | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 8156d97bef..8d6a4f44f7 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22057 -#define YAMBO_HASH "099583a86" +#define YAMBO_REVISION 22058 +#define YAMBO_HASH "24d6a6112" diff --git a/src/el-ph/ELPH_databases_grids_map.F b/src/el-ph/ELPH_databases_grids_map.F index 43b45e8d08..1d5302e66d 100644 --- a/src/el-ph/ELPH_databases_grids_map.F +++ b/src/el-ph/ELPH_databases_grids_map.F @@ -70,6 +70,9 @@ subroutine ELPH_databases_grids_map(k,q) call k_ibz2bz(q,'i',.false.) do i1=1,nQ do i2=1,elph_nQ + ! For abinit I may need a -1 ?! + !call c2a(v_in=q%ptbz(i1,:)+PH_qpt(i2,:),v_out=v,mode="ki2a") + ! For pwscf no need for -1 (see comment below) call c2a(v_in=q%ptbz(i1,:)-PH_qpt(i2,:),v_out=v,mode="ki2a") ! DS comment 2022/04/23: ! - these if are useless, if l_GKKP_DB_exists the code exits before (see return) From acdc1209adac23a7a7321d29bca290c61b7c8ec0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 22:28:32 +0100 Subject: [PATCH 0520/1367] Version 5.1.0, Revision 22126, Hash ccd94edc0 MODIFIED * configure include/driver/version.h Changes: - configure regenerated Patch sent by: Davide Sangalli --- configure | 7859 +++++++++++++++++++++----------------- include/driver/version.h | 4 +- 2 files changed, 4392 insertions(+), 3471 deletions(-) diff --git a/configure b/configure index 3bd97719ea..07b8bad515 100755 --- a/configure +++ b/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.21945 h.56d04a362. +# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21945 h.56d04a362. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,42 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -230,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -255,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -311,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -325,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -334,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -373,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -390,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -413,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -442,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -486,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -500,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -513,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -589,40 +619,36 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir MPI_info @@ -737,9 +763,13 @@ def_fft FFT_INCS FFT_LIBS fft_cfactor +lapack_shared +LAPACK_SO_LIBS LAPACK_LIBS compile_lapack internal_lapack +blas_shared +BLAS_SO_LIBS BLAS_info BLAS_LIBS compile_blas @@ -750,7 +780,7 @@ internal_blas FLIBS YDB_dir GIT -with_yambo_libs_branch +with_ydriver_branch DRIVER_INCS Ydriver_check Ydriver_LIB @@ -773,6 +803,7 @@ FFLAGS F77 FPP CPPFLAGS_yambo +CPP IFLAG FCLIBS OPENMPLIBS @@ -801,6 +832,9 @@ AR MAKE ifGNUmake hostname +SIZEOF_INT_P +SET_MAKE +LIBOBJS host_os host_vendor host_cpu @@ -809,15 +843,9 @@ build_os build_vendor build_cpu build -SIZEOF_INT_P -SET_MAKE -LIBOBJS ALLOCA Y_BRANCH GIT_CHECK -EGREP -GREP -CPP OBJEXT EXEEXT ac_ct_CC @@ -905,7 +933,7 @@ with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir -with_yambo_libs_branch +with_ydriver_branch enable_ydb with_blas_libs enable_int_linalg @@ -984,10 +1012,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP FC FCFLAGS UFLAGS +CPP FPP F77 FFLAGS @@ -1062,8 +1090,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1104,9 +1130,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1130,9 +1156,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1343,9 +1369,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1359,9 +1385,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1405,9 +1431,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1423,7 +1449,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1487,7 +1513,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1674,9 +1700,8 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory - --with-yambo-libs-branch= - Use the of the yambo-libraries - repository. + --with-ydriver-branch= + Use the of the ydriver repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -1743,10 +1768,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags + CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1773,9 +1798,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1803,7 +1828,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1811,7 +1837,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1821,9 +1847,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Yambo configure 5.1.0 r.21945 h.56d04a362 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1840,14 +1866,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1855,14 +1881,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1872,176 +1899,6 @@ fi } # ac_fn_c_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------- ## -## Report this to yambo@yambo-code.org ## -## ----------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2049,26 +1906,28 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2080,16 +1939,17 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (ac_aggr.$3) @@ -2098,14 +1958,15 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2114,18 +1975,19 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2137,17 +1999,18 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2155,12 +2018,13 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2168,18 +2032,19 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2190,14 +2055,14 @@ $as_echo "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2205,17 +2070,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2230,72 +2096,48 @@ fi } # ac_fn_c_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#undef $2 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func +} # ac_fn_c_try_run # ac_fn_fc_try_compile LINENO # --------------------------- @@ -2303,14 +2145,14 @@ $as_echo "$ac_res" >&6; } ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2318,14 +2160,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2341,14 +2184,14 @@ fi ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2356,17 +2199,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2381,20 +2225,58 @@ fi } # ac_fn_fc_try_link +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2402,14 +2284,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2425,14 +2308,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2440,17 +2323,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2465,44 +2349,136 @@ fi } # ac_fn_f77_try_link +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ + +#include +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Yambo $as_me 5.1.0 r.21945 h.56d04a362, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2535,8 +2511,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2571,7 +2551,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2606,11 +2586,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2621,8 +2603,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2646,7 +2628,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2654,14 +2636,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2669,15 +2651,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2685,8 +2667,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2700,63 +2682,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2766,153 +2733,541 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -SVERSION="5" -SSUBVERSION="1" -SPATCHLEVEL="0" -SREVISION="21945" -SHASH="56d04a362" +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; -# -CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` -if ! test -d $CURRENT_DIR ; then - as_fn_error $? "Make cannot work using paths which include spaces" "$LINENO" 5 -fi -# -compdir=`echo "$PWD"` -# +struct incomplete_array +{ + int datasize; + double data[]; +}; -if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi -if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi -# -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -fi +struct named_init { + int number; + const wchar_t *name; + double average; +}; -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +typedef const char *ccp; +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); -# -# YAMBO SPECIFIC -# -# -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): DS AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/config" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +SVERSION="5" +SSUBVERSION="1" +SPATCHLEVEL="0" +SREVISION="21945" +SHASH="56d04a362" + + + + + + +# +CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` +if ! test -d $CURRENT_DIR ; then + as_fn_error $? "Make cannot work using paths which include spaces" "$LINENO" 5 +fi +# +compdir=`echo "$PWD"` +# + +if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi +if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi +# + + +# +# YAMBO SPECIFIC +# +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): DS AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; # either version 2, or (at your option) any later version. # # This program is distributed in the hope that it will @@ -2949,6 +3304,7 @@ if [ "$compdir" != "$srcdir" ] && [ "$srcdir" != "." ] ; then rsync -az --exclude="$basecomp/" --include='*/' --include='*.h.F' --exclude='*' $srcdir/ $compdir rsync -az --exclude="$basecomp/" --include='*/' --include='*.h' --exclude='*' $srcdir/ $compdir rsync -az --exclude="$basecomp/" --include='*/' --include='*.objects' --exclude='*' $srcdir/ $compdir + rsync -az --exclude="$basecomp/" --include='*/' --include='*.dep' --exclude='*' $srcdir/ $compdir rsync -az --exclude="$basecomp/" --include='*/' --include='*Makefile.lo' --exclude='*' $srcdir/ $compdir rsync -az --exclude="$basecomp/" --include='*/' --include='*Makefile*' --exclude='*' $srcdir/lib $compdir/ rsync -az --exclude="$basecomp/" --include='*/' --include='*list*' --exclude='*' $srcdir/lib $compdir/ @@ -2957,9 +3313,9 @@ if [ "$compdir" != "$srcdir" ] && [ "$srcdir" != "." ] ; then # if test ! -d "$compdir/log" ; then mkdir "$compdir/log"; fi if test ! -d "$compdir/lib/archive"; then mkdir "$compdir/lib/archive"; fi - if test ! -d "$compdir/lib/archive"; then mkdir "$compdir/lib/archive"; fi - cp $srcdir/lib/archive/* $compdir/lib/archive - cp $srcdir/lib/config/* $compdir/lib/config + if test ! -d "$compdir/lib/config"; then mkdir "$compdir/lib/config"; fi + cp -r $srcdir/lib/archive/* $compdir/lib/archive/ + cp $srcdir/lib/config/* $compdir/lib/config/ # fi @@ -2991,9 +3347,10 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test "${with_extlibs_path+set}" = set; then : +if test ${with_extlibs_path+y} +then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else +else $as_nop extlibs_path="${PWD}/lib/external" fi @@ -3004,7 +3361,8 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test "${enable_keep_objects+set}" = set; then : +if test ${enable_keep_objects+y} +then : enableval=$enable_keep_objects; fi @@ -3015,7 +3373,8 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test "${enable_keep_src+set}" = set; then : +if test ${enable_keep_src+y} +then : enableval=$enable_keep_src; fi @@ -3026,7 +3385,8 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test "${enable_keep_extlibs+set}" = set; then : +if test ${enable_keep_extlibs+y} +then : enableval=$enable_keep_extlibs; fi @@ -3044,7 +3404,8 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test "${enable_dp+set}" = set; then : +if test ${enable_dp+y} +then : enableval=$enable_dp; fi @@ -3060,7 +3421,8 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test "${enable_time_profile+set}" = set; then : +if test ${enable_time_profile+y} +then : enableval=$enable_time_profile; fi @@ -3076,7 +3438,8 @@ fi # USPP # # Check whether --enable-uspp was given. -if test "${enable_uspp+set}" = set; then : +if test ${enable_uspp+y} +then : enableval=$enable_uspp; fi @@ -3093,7 +3456,8 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test "${enable_memory_profile+set}" = set; then : +if test ${enable_memory_profile+y} +then : enableval=$enable_memory_profile; fi @@ -3109,7 +3473,8 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test "${enable_msgs_comps+set}" = set; then : +if test ${enable_msgs_comps+y} +then : enableval=$enable_msgs_comps; fi @@ -3126,9 +3491,10 @@ fi # # Check whether --with-editor was given. -if test "${with_editor+set}" = set; then : +if test ${with_editor+y} +then : withval=$with_editor; -else +else $as_nop with_editor="vim vi pico" fi @@ -3136,11 +3502,12 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_editor+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_editor+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3148,11 +3515,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3163,11 +3534,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -$as_echo "$editor" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +printf "%s\n" "$editor" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3182,9 +3553,10 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test "${with_echo+set}" = set; then : +if test ${with_echo+y} +then : withval=$with_echo; -else +else $as_nop with_echo="echo" fi @@ -3197,6 +3569,15 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3205,11 +3586,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3217,11 +3599,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3232,11 +3618,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3245,11 +3631,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3257,11 +3644,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3272,11 +3663,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3284,8 +3675,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3298,11 +3689,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3310,11 +3702,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3325,11 +3721,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3338,11 +3734,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3351,15 +3748,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3375,18 +3776,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3397,11 +3798,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3409,11 +3811,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3424,11 +3830,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3441,11 +3847,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3453,11 +3860,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3468,11 +3879,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3484,8 +3895,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3493,43 +3904,147 @@ esac fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } done + done +IFS=$as_save_IFS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion -version; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) { ; @@ -3541,9 +4056,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3564,11 +4079,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3585,7 +4101,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3601,44 +4117,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3652,15 +4170,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3669,7 +4187,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3681,8 +4199,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3690,10 +4208,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3701,39 +4219,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3747,11 +4266,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3760,31 +4280,32 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3794,29 +4315,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3825,57 +4350,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3890,232 +4418,144 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +$ac_c_conftest_c11_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +$ac_c_conftest_c99_program _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +$ac_c_conftest_c89_program _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f conftest.err conftest.i conftest.$ac_ext - +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP +rm -f conftest.$ac_ext +CC=$ac_save_CC fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4125,280 +4565,51 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +ac_header= ac_cache= +for ac_item in $ac_header_c_list do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : +done -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h -fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -fi -done +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : -ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes; then : +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : have_malloc_h=1 -else +else $as_nop have_malloc_h=0 fi - CFLAGS=$SAVE if test "$have_malloc_h" -ne 0 then ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include " -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : - $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes +then : + printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h fi @@ -4834,11 +5045,12 @@ esac Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT_CHECK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT_CHECK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -4846,11 +5058,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4861,11 +5077,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -$as_echo "$GIT_CHECK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +printf "%s\n" "$GIT_CHECK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4879,42 +5095,60 @@ fi # # Checks for library functions. # ============================================================================ -for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -4922,52 +5156,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_working_alloca_h=yes -else +else $as_nop ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER # include # define alloca _alloca # else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif +# ifdef __cplusplus +extern "C" # endif +void *alloca (size_t); # endif #endif int -main () +main (void) { char *p = (char *) alloca (1); if (p) return 0; @@ -4975,20 +5209,22 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_alloca_works=yes -else +else $as_nop ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } +fi if test $ac_cv_func_alloca_works = yes; then -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -4998,58 +5234,19 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h - break -fi - - done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_c_stack_direction=0 -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5070,9 +5267,10 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_c_stack_direction=1 -else +else $as_nop ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5080,25 +5278,24 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -5111,7 +5308,7 @@ main () /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5139,7 +5336,7 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5155,47 +5352,50 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5212,45 +5412,118 @@ _ACEOF ;; esac -for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if ${ac_cv_func_malloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +printf %s "checking for GNU libc compatible malloc... " >&6; } +if test ${ac_cv_func_malloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif +#include int -main () +main (void) { -return ! malloc (0); +void *p = malloc (0); + int result = !p; + free (p); + return result; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_malloc_0_nonnull=yes -else +else $as_nop ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5258,14 +5531,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes +then : -$as_echo "#define HAVE_MALLOC 1" >>confdefs.h +printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h -else - $as_echo "#define HAVE_MALLOC 0" >>confdefs.h +else $as_nop + printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5274,50 +5548,47 @@ else esac -$as_echo "#define malloc rpl_malloc" >>confdefs.h - -fi - - -for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF +printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if ${ac_cv_func_realloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +printf %s "checking for GNU libc compatible realloc... " >&6; } +if test ${ac_cv_func_realloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif +#include int -main () +main (void) { -return ! realloc (0, 0); +void *p = realloc (0, 0); + int result = !p; + free (p); + return result; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_realloc_0_nonnull=yes -else +else $as_nop ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5325,14 +5596,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes +then : -$as_echo "#define HAVE_REALLOC 1" >>confdefs.h +printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h -else - $as_echo "#define HAVE_REALLOC 0" >>confdefs.h +else $as_nop + printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5341,34 +5613,35 @@ else esac -$as_echo "#define realloc rpl_realloc" >>confdefs.h - -fi - +printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h -if ${ac_cv_func_setvbuf_reversed+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_func_setvbuf_reversed=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : - $as_echo_n "(cached) " >&6 -else +# AC_FUNC_SETVBUF_REVERSE # This is reported as obsolete +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +printf %s "checking whether lstat correctly handles trailing slash... " >&6; } +if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - ac_cv_func_lstat_dereferences_slashed_symlink=no -else + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5379,9 +5652,10 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else +else $as_nop ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5396,14 +5670,12 @@ fi rm -f conftest.sym conftest.file fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF +printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5415,19 +5687,21 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -$as_echo_n "checking whether stat accepts an empty string... " >&6; } -if ${ac_cv_func_stat_empty_string_bug+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +printf %s "checking whether stat accepts an empty string... " >&6; } +if test ${ac_cv_func_stat_empty_string_bug+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_func_stat_empty_string_bug=yes -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5435,9 +5709,10 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_stat_empty_string_bug=no -else +else $as_nop ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5445,8 +5720,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5455,19 +5730,18 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 -_ACEOF +printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5483,20 +5757,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -$as_echo_n "checking for the size of a pointer... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +printf %s "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5522,12 +5796,10 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -cat >>confdefs.h <<_ACEOF -#define POINTER_SIZE ${ac_pointersize} -_ACEOF +printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -$as_echo "${ac_pointersize} bytes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +printf "%s\n" "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5543,11 +5815,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5555,11 +5828,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5570,11 +5847,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5583,11 +5860,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5595,11 +5873,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5610,11 +5892,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5622,8 +5904,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5636,11 +5918,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5648,11 +5931,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5663,11 +5950,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5676,11 +5963,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5689,15 +5977,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5713,18 +6005,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5735,11 +6027,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5747,11 +6040,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5762,11 +6059,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5779,11 +6076,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5791,11 +6089,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5806,11 +6108,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5822,34 +6124,138 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -5859,20 +6265,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -5882,29 +6289,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -5913,57 +6324,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -5978,94 +6392,144 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -6075,87 +6539,18 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu # -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - hostname=`uname -n` # ============================================================================ # GNU Make MAKE="make" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -$as_echo_n "checking for GNU make... " >&6; } -if ${_cv_gnu_make_command+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +printf %s "checking for GNU make... " >&6; } +if test ${_cv_gnu_make_command+y} +then : + printf %s "(cached) " >&6 +else $as_nop _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; @@ -6166,14 +6561,14 @@ else done ; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -$as_echo "$_cv_gnu_make_command" >&6; } ; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +printf "%s\n" "$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -$as_echo "\"Not found\"" >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +printf "%s\n" "\"Not found\"" >&6; }; fi @@ -6195,11 +6590,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6207,11 +6603,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6222,11 +6622,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6235,11 +6635,12 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6247,11 +6648,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6262,11 +6667,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6274,8 +6679,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6293,7 +6698,8 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test "${enable_options_check+set}" = set; then : +if test ${enable_options_check+y} +then : enableval=$enable_options_check; fi @@ -6317,11 +6723,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6329,11 +6736,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6344,11 +6755,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +printf "%s\n" "$FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6361,11 +6772,12 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6373,11 +6785,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6388,11 +6804,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +printf "%s\n" "$ac_ct_FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6404,8 +6820,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6414,7 +6830,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6424,7 +6840,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6434,7 +6850,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6443,11 +6859,12 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 +printf %s "checking whether the compiler supports GNU Fortran... " >&6; } +if test ${ac_cv_fc_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6456,43 +6873,48 @@ else end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} +ac_test_FCFLAGS=${FCFLAGS+y} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +printf %s "checking whether $FC accepts -g... " >&6; } +if test ${ac_cv_prog_fc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_g=yes -else +else $as_nop ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +printf "%s\n" "$ac_cv_prog_fc_g" >&6; } +if test $ac_test_FCFLAGS; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6526,8 +6948,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -$as_echo_n "checking if the current OS is supported... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +printf %s "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6561,31 +6983,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -$as_echo "$as_me: Platform <${host}> is not supported." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -$as_echo "$as_me: providing either a list of compilers and options or" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -$as_echo "$as_me: a guest account on this machine." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +printf "%s\n" "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -6601,7 +7023,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test "${with_f90ext+set}" = set; then : +if test ${with_f90ext+y} +then : withval=$with_f90ext; fi @@ -6613,11 +7036,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +printf %s "checking for Fortran flag to compile .f90 files... " >&6; } +if test ${ac_cv_fc_srcext_f90+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6633,17 +7057,18 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -6669,11 +7094,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } -if ${ac_cv_fc_srcext_f+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +printf %s "checking for Fortran flag to compile .f files... " >&6; } +if test ${ac_cv_fc_srcext_f+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6689,17 +7115,18 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -$as_echo "$ac_cv_fc_srcext_f" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -6790,10 +7217,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -$as_echo_n "checking for $FC kind and version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +printf %s "checking for $FC kind and version... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -6810,7 +7237,8 @@ $as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test "${enable_debug_flags+set}" = set; then : +if test ${enable_debug_flags+y} +then : enableval=$enable_debug_flags; fi @@ -7196,35 +7624,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -$as_echo_n "checking for specific $FC flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +printf %s "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -$as_echo "$FCFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +printf "%s\n" "$FCFLAGS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -$as_echo "(User-defined) $FCFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +printf "%s\n" "(User-defined) $FCFLAGS" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -$as_echo_n "checking for specific Open-MP flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -$as_echo "$OMPFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +printf %s "checking for specific Open-MP flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +printf "%s\n" "$OMPFLAGS" >&6; } # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -$as_echo_n "checking for specific $CC flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -$as_echo "$CFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +printf %s "checking for specific $CC flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +printf "%s\n" "$CFLAGS" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -$as_echo_n "checking for specific unoptimized flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +printf %s "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -$as_echo "$FCUFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +printf "%s\n" "$FCUFLAGS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -$as_echo "(User-defined) $UFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +printf "%s\n" "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7235,10 +7663,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -$as_echo_n "checking for specific NETCDF flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -$as_echo "$NETCDFFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +printf %s "checking for specific NETCDF flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +printf "%s\n" "$NETCDFFLAGS" >&6; } # @@ -7260,7 +7688,8 @@ FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" # OpenMP # # Check whether --enable-open-mp was given. -if test "${enable_open_mp+set}" = set; then : +if test ${enable_open_mp+y} +then : enableval=$enable_open_mp; fi @@ -7282,17 +7711,19 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +printf %s "checking how to get verbose linking output from $FC... " >&6; } +if test ${ac_cv_prog_fc_v+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7310,13 +7741,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 +printf "%s\n" "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7383,23 +7814,24 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +printf "%s\n" "$ac_cv_prog_fc_v" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +printf %s "checking for Fortran libraries of $FC... " >&6; } +if test ${ac_cv_fc_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7418,13 +7850,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 +printf "%s\n" "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7501,9 +7933,10 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -7516,9 +7949,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -7533,9 +7967,24 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) + # Ignore this library only on Windows-like systems. case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + cygwin* | msys* ) ;; + *) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue +then : + +else $as_nop + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi ;; esac ;; @@ -7553,7 +8002,7 @@ fi esac ;; -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -7562,9 +8011,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -7579,15 +8029,17 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; + -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -7599,7 +8051,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -7614,8 +8066,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +printf "%s\n" "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -7630,11 +8082,12 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +printf %s "checking for dummy main to link with Fortran libraries... " >&6; } +if test ${ac_cv_fc_dummy_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -7657,19 +8110,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=none -else +else $as_nop ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -7686,17 +8140,18 @@ rm -f core conftest.err conftest.$ac_objext \ #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi @@ -7709,25 +8164,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : +if test "$FC_DUMMY_MAIN" != unknown +then : if test $FC_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF +printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -7742,11 +8196,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +printf %s "checking for Fortran name-mangling scheme... " >&6; } +if test ${ac_cv_fc_mangling+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -7755,7 +8210,8 @@ else return end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -7776,9 +8232,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -7789,17 +8242,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done done @@ -7834,9 +8288,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -7847,17 +8298,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -7887,17 +8339,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +printf "%s\n" "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7920,7 +8372,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -7935,10 +8388,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -7949,7 +8403,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7957,7 +8411,8 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -7972,10 +8427,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -7986,12 +8442,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -$as_echo "$msg" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +printf %s "checking for external C routine (test) naming scheme... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +printf "%s\n" "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7999,48 +8455,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8099,11 +8555,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } -if ${ac_cv_fc_freeform+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } +if test ${ac_cv_fc_freeform+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8118,17 +8575,18 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -$as_echo "$ac_cv_fc_freeform" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +printf "%s\n" "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8153,11 +8611,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } -if ${ax_cv_f90_modflag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +printf %s "checking fortran 90 modules inclusion flag... " >&6; } +if test ${ax_cv_f90_modflag+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8180,10 +8639,11 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do @@ -8199,10 +8659,11 @@ for ax_flag in "-I" "-M" "-p"; do end program conftest_program _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ax_cv_f90_modflag="$ax_flag" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext FCFLAGS="$ax_save_FCFLAGS" fi done @@ -8217,15 +8678,148 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -$as_echo "$ax_cv_f90_modflag" >&6; } -IFLAG="$ax_cv_f90_modflag" -if test -z "$IFLAG" ; then IFLAG="-I" ; fi - -# -# ============================================================================ -# CPP check & flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +printf "%s\n" "$ax_cv_f90_modflag" >&6; } +IFLAG="$ax_cv_f90_modflag" +if test -z "$IFLAG" ; then IFLAG="-I" ; fi + +# +# ============================================================================ +# CPP check & flags +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # case "${CPP}" in @@ -8274,8 +8868,8 @@ case "${CPP}" in esac # # -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} # # TESTS #======= @@ -8292,8 +8886,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -$as_echo_n "checking if C precompiler works on C source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +printf %s "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8305,14 +8899,15 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : acx_C_ok=yes -else +else $as_nop CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -$as_echo "$acx_C_ok" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +printf "%s\n" "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -8360,8 +8955,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -8370,8 +8965,8 @@ $as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -$as_echo_n "checking if FC precompiler works on FC source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +printf %s "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -8398,8 +8993,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -$as_echo "$acx_FC_ok" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +printf "%s\n" "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -8428,11 +9023,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_F77+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -8440,11 +9036,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8455,11 +9055,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +printf "%s\n" "$F77" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8472,11 +9072,12 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_F77+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -8484,11 +9085,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8499,11 +9104,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +printf "%s\n" "$ac_ct_F77" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8515,8 +9120,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -8525,7 +9130,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -8535,7 +9140,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -8545,7 +9150,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -8554,11 +9159,12 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if ${ac_cv_f77_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 +printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } +if test ${ac_cv_f77_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -8567,43 +9173,48 @@ else end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} +ac_test_FFLAGS=${FFLAGS+y} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if ${ac_cv_prog_f77_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +printf %s "checking whether $F77 accepts -g... " >&6; } +if test ${ac_cv_prog_f77_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_cv_prog_f77_g=yes -else +else $as_nop ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +printf "%s\n" "$ac_cv_prog_f77_g" >&6; } +if test $ac_test_FFLAGS; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -8629,23 +9240,24 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO" +then : + acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8713,7 +9325,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test "${enable_mpi+set}" = set; then : +if test ${enable_mpi+y} +then : enableval=$enable_mpi; fi @@ -8744,11 +9357,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIFC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIFC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -8756,11 +9370,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8771,11 +9389,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -$as_echo "$MPIFC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +printf "%s\n" "$MPIFC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8784,12 +9402,13 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -$as_echo_n "checking for $MPIFC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +printf %s "checking for $MPIFC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -8799,20 +9418,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIFC_test=$MPIFC -else +else $as_nop for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIFC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIFC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -8820,11 +9441,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8835,11 +9460,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -$as_echo "$MPIFC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +printf "%s\n" "$MPIFC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8855,27 +9480,28 @@ fi if test "$acx_mpi_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +printf %s "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_mpi_ok="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -# We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the +# We have to use AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) and not AC_CHECK_HEADER because the # latter uses $CPP, not $CC (which may be mpicc). # # In the following, we tentatively skip the check for mpipgicc, @@ -8890,10 +9516,11 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -$as_echo_n "checking for a working mpif.h... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +printf %s "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8904,21 +9531,23 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -$as_echo_n "checking for a working mpi.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +printf %s "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8929,20 +9558,22 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -$as_echo_n "checking for a working mpi module... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +printf %s "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8953,14 +9584,15 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi # # @@ -8972,12 +9604,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9008,12 +9640,13 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -$as_echo_n "checking for $MPIF77... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +printf %s "checking for $MPIF77... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9023,20 +9656,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIF77_test=$MPIF77 -else +else $as_nop for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9044,11 +9679,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9059,11 +9698,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9074,12 +9713,13 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -$as_echo_n "checking for $MPIFC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +printf %s "checking for $MPIFC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9089,20 +9729,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIF77_test=$MPIFC -else +else $as_nop for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9110,11 +9752,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9125,11 +9771,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9144,11 +9790,12 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9156,11 +9803,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9171,11 +9822,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9189,26 +9840,27 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +printf %s "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO"; then : +if ac_fn_f77_try_link "$LINENO" +then : ac_mpi_ok="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -# We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the +# We have to use AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) and not AC_CHECK_HEADER because the # latter uses $CPP, not $CC (which may be mpicc). # # In the following, we tentatively skip the check for mpipgicc, @@ -9240,12 +9892,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9281,11 +9933,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPICC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPICC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9293,11 +9946,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9308,11 +9965,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -$as_echo "$MPICC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +printf "%s\n" "$MPICC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9321,12 +9978,13 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -$as_echo_n "checking for $MPICC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +printf %s "checking for $MPICC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -9336,24 +9994,26 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else +else $as_nop for ac_prog in $MPICC mpipgicc mpiicc mpicc hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPICC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPICC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9361,11 +10021,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9376,11 +10040,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -$as_echo "$MPICC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +printf "%s\n" "$MPICC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9397,13 +10061,14 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes; then : +if test "x$ac_cv_func_MPI_Init" = xyes +then : acx_mpi_ok="yes" fi fi -# We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the +# We have to use AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) and not AC_CHECK_HEADER because the # latter uses $CPP, not $CC (which may be mpicc). # # In the following, we tentatively skip the check for mpipgicc, @@ -9412,8 +10077,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -$as_echo_n "checking for a working mpi.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +printf %s "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9426,21 +10091,22 @@ $as_echo_n "checking for a working mpi.h... " >&6; } #endif #endif int -main () +main (void) { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; };acx_mpi_ok="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -9465,12 +10131,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9509,10 +10175,10 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -$as_echo_n "checking for MPI version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -$as_echo "$MPIKIND" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +printf %s "checking for MPI version... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +printf "%s\n" "$MPIKIND" >&6; } # @@ -9532,25 +10198,29 @@ fi # Check whether --with-mpi_libs was given. -if test "${with_mpi_libs+set}" = set; then : +if test ${with_mpi_libs+y} +then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test "${with_mpi_path+set}" = set; then : +if test ${with_mpi_path+y} +then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test "${with_mpi_libdir+set}" = set; then : +if test ${with_mpi_libdir+y} +then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test "${with_mpi_includedir+set}" = set; then : +if test ${with_mpi_includedir+y} +then : withval=$with_mpi_includedir; fi @@ -9626,12 +10296,13 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -9641,11 +10312,12 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : mpif_found_tmp="yes" -else +else $as_nop mpif_found_tmp="no" fi @@ -9936,23 +10608,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # Yambo Libs -DRIVER_INCS="-I$PWD/lib/yambo/driver/include/ -I$PWD/include/driver" +DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" # -# Check whether --with-yambo-libs-branch was given. -if test "${with_yambo_libs_branch+set}" = set; then : - withval=$with_yambo_libs_branch; -else - with_yambo_libs_branch=none +# Check whether --with-ydriver-branch was given. +if test ${with_ydriver_branch+y} +then : + withval=$with_ydriver_branch; +else $as_nop + with_ydriver_branch=none fi # -if test x"$with_yambo_libs_branch" = "xnone"; then +if test x"$with_ydriver_branch" = "xnone"; then Ydriver_check="D"; Ydriver_LIB="Download" else Ydriver_check="G"; - Ydriver_LIB="GIT, branch $with_yambo_libs_branch" + Ydriver_LIB="GIT, branch $with_ydriver_branch" fi @@ -9964,25 +10637,27 @@ fi # # Check whether --enable-ydb was given. -if test "${enable_ydb+set}" = set; then : +if test ${enable_ydb+y} +then : enableval=$enable_ydb; fi # enable_yambopy="no" # -# AC_ARG_ENABLE(yambopy, AC_HELP_STRING([--enable-yambopy],[Activate the Yambo PY project])) +# AC_ARG_ENABLE(yambopy, AS_HELP_STRING([--enable-yambopy],[Activate the Yambo PY project])) # if test "x$enable_ydb" = "xyes"; then # if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -9990,11 +10665,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10005,11 +10684,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -$as_echo "$GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +printf "%s\n" "$GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -10018,11 +10697,12 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10030,11 +10710,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10045,11 +10729,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -$as_echo "$ac_ct_GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +printf "%s\n" "$ac_ct_GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10057,8 +10741,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10070,14 +10754,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -$as_echo_n "checking YDB from $url_ydb... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +printf %s "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10087,8 +10771,8 @@ $as_echo_n "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10102,17 +10786,19 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } -if ${ac_cv_prog_f77_v+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +printf %s "checking how to get verbose linking output from $F77... " >&6; } +if test ${ac_cv_prog_f77_v+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10130,13 +10816,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_f77_v_output" >&5 +printf "%s\n" "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10203,23 +10889,24 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -$as_echo "$ac_cv_prog_f77_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } -if ${ac_cv_f77_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +printf "%s\n" "$ac_cv_prog_f77_v" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +printf %s "checking for Fortran 77 libraries of $F77... " >&6; } +if test ${ac_cv_f77_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10238,13 +10925,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_f77_v_output" >&5 +printf "%s\n" "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10321,9 +11008,10 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -10336,9 +11024,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" @@ -10353,9 +11042,24 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) + # Ignore this library only on Windows-like systems. case $host_os in - *cygwin*) ;; - *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + cygwin* | msys* ) ;; + *) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue +then : + +else $as_nop + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi ;; esac ;; @@ -10373,7 +11077,7 @@ fi esac ;; -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -10382,9 +11086,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -10399,15 +11104,17 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; + -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -10419,7 +11126,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_f77_v_output" | + ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -10434,8 +11141,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -$as_echo "$ac_cv_f77_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +printf "%s\n" "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -10451,17 +11158,20 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test "${with_blas_libs+set}" = set; then : +if test ${with_blas_libs+y} +then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test "${enable_int_linalg+set}" = set; then : +if test ${enable_int_linalg+y} +then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test "${enable_openmp_int_linalg+set}" = set; then : +if test ${enable_openmp_int_linalg+y} +then : enableval=$enable_openmp_int_linalg; fi @@ -10469,7 +11179,8 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test "${with_blas_libs+set}" = set; then : +if test ${with_blas_libs+y} +then : withval=$with_blas_libs; fi @@ -10494,22 +11205,23 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_blas_ok=yes -else +else $as_nop BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -$as_echo "$acx_blas_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +printf "%s\n" "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -10518,9 +11230,10 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : acx_blas_ok=yes fi @@ -10529,11 +11242,12 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } -if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +printf %s "checking for ATL_xerbla in -latlas... " >&6; } +if test ${ac_cv_lib_atlas_ATL_xerbla+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10541,24 +11255,27 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_atlas_ATL_xerbla=yes -else +else $as_nop ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : - as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +printf %s "checking for $caxpy in -lf77blas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10566,24 +11283,27 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } -if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +printf %s "checking for cblas_daxpy in -lcblas... " >&6; } +if test ${ac_cv_lib_cblas_cblas_daxpy+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10591,18 +11311,20 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_cblas_cblas_daxpy=yes -else +else $as_nop ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes +then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -10615,12 +11337,13 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10628,25 +11351,28 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +printf %s "checking for $daxpy in -ldaxpy... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10654,25 +11380,28 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +printf %s "checking for $caxpy in -lcaxpy... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10680,19 +11409,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -10704,12 +11435,13 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -$as_echo_n "checking for $caxpy in -lcxml... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +printf %s "checking for $caxpy in -lcxml... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10717,19 +11449,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -10737,12 +11471,13 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -$as_echo_n "checking for $caxpy in -ldxml... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +printf %s "checking for $caxpy in -ldxml... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10750,19 +11485,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -10771,11 +11508,12 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -$as_echo_n "checking for acosp in -lsunmath... " >&6; } -if ${ac_cv_lib_sunmath_acosp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +printf %s "checking for acosp in -lsunmath... " >&6; } +if test ${ac_cv_lib_sunmath_acosp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10783,24 +11521,27 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_sunmath_acosp=yes -else +else $as_nop ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : - as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +printf %s "checking for $caxpy in -lsunperf... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10808,19 +11549,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -10832,12 +11575,13 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -$as_echo_n "checking for $caxpy in -lscs... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +printf %s "checking for $caxpy in -lscs... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10845,19 +11589,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -10865,12 +11611,13 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10878,19 +11625,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -10898,12 +11647,13 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10911,25 +11661,28 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -$as_echo_n "checking for $caxpy in -lessl... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +printf %s "checking for $caxpy in -lessl... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10937,19 +11690,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -10965,12 +11720,13 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10978,30 +11734,33 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +printf %s "checking for $caxpy in -lmkl_gf... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11009,19 +11768,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11033,12 +11794,13 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11046,30 +11808,33 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +printf %s "checking for $caxpy in -lmkl_intel... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11077,19 +11842,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11100,12 +11867,13 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11113,19 +11881,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11136,7 +11906,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -$as_echo "#define HAVE_BLAS 1" >>confdefs.h +printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11146,12 +11916,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11174,6 +11944,28 @@ if test x"$enable_openmp_int_linalg" = "xyes" ; then fi fi +# Test for shared BLAS +BLAS_SO_LIBS="" +if test "$internal_blas" = "yes"; then + if test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libblas.so || test $compile_blas = "yes" ; then + BLAS_SO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libblas.so"; + fi +fi +if test $acx_blas_ok = yes && test -d "${MKLROOT}" ; then + BLAS_SO_LIBS=${BLAS_LIBS} +fi +if test $acx_blas_ok = yes && test "${BLAS_LIBS}" = "*.so"; then + BLAS_SO_LIBS=${BLAS_LIBS} +fi +blas_shared="no" +if test x"${BLAS_SO_LIBS}" = "x"; then + BLAS_SO_LIBS=${BLAS_LIBS} +else + blas_shared="yes" +fi + + + @@ -11188,11 +11980,12 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if ${ac_cv_f77_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if test ${ac_cv_f77_dummy_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -11223,19 +12016,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=none -else +else $as_nop ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -11260,17 +12054,18 @@ rm -f core conftest.err conftest.$ac_objext \ #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi @@ -11283,25 +12078,24 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -$as_echo "$ac_cv_f77_dummy_main" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown; then : +if test "$F77_DUMMY_MAIN" != unknown +then : if test $F77_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define F77_DUMMY_MAIN $F77_DUMMY_MAIN -_ACEOF +printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -11315,11 +12109,12 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } -if ${ac_cv_f77_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } +if test ${ac_cv_f77_mangling+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -11328,7 +12123,8 @@ else return end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -11349,9 +12145,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11370,17 +12163,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done done @@ -11415,9 +12209,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11436,17 +12227,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -11476,17 +12268,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -$as_echo "$ac_cv_f77_mangling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +printf "%s\n" "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -11500,7 +12292,8 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test "${with_lapack_libs+set}" = set; then : +if test ${with_lapack_libs+y} +then : withval=$with_lapack_libs; fi @@ -11526,22 +12319,23 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_lapack_ok=yes -else +else $as_nop LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -$as_echo "$acx_lapack_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +printf "%s\n" "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -11551,9 +12345,10 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : acx_lapack_ok=yes fi @@ -11564,12 +12359,13 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -$as_echo_n "checking for $cheev in -l$lapack... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +printf %s "checking for $cheev in -l$lapack... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11577,19 +12373,21 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -11621,22 +12419,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_dlaran_ok=yes -else +else $as_nop acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -$as_echo "$acx_dlaran_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +printf "%s\n" "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -11644,7 +12443,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -$as_echo "#define HAVE_LAPACK 1" >>confdefs.h +printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -11654,12 +12453,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -11671,6 +12470,28 @@ if test "$internal_lapack" = "yes"; then fi fi +# Test for shared LAPACK +LAPACK_SO_LIBS="" +if test "$internal_lapack" = "yes"; then + if test -e ${extlibs_path}/${FCKIND}/${FC}/lib/liblapack.so || test $compile_lapack = "yes"; then + LAPACK_SO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/liblapack.so"; + fi +fi +if test $acx_lapack_ok = yes && test "${lapack_LIBS}" = "*.so"; then + LAPACK_SO_LIBS=${LAPACK_LIBS} +fi +lapack_shared="0" +if test "x${LAPACK_SO_LIBS}" = "x"; then + LAPACK_SO_LIBS=${LAPACK_LIBS} + if test $blas_shared = yes && test -d "${MKLROOT}" ; then + lapack_shared="1" + fi +else + lapack_shared="1" +fi + + + @@ -11682,52 +12503,60 @@ fi # Check whether --with-fft_libs was given. -if test "${with_fft_libs+set}" = set; then : +if test ${with_fft_libs+y} +then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test "${with_fft_path+set}" = set; then : +if test ${with_fft_path+y} +then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test "${with_fft_libdir+set}" = set; then : +if test ${with_fft_libdir+y} +then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test "${with_fft_includedir+set}" = set; then : +if test ${with_fft_includedir+y} +then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test "${enable_internal_fftqe+set}" = set; then : +if test ${enable_internal_fftqe+y} +then : enableval=$enable_internal_fftqe; -else +else $as_nop enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test "${enable_internal_fftsg+set}" = set; then : +if test ${enable_internal_fftsg+y} +then : enableval=$enable_internal_fftsg; -else +else $as_nop enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test "${enable_3d_fft+set}" = set; then : +if test ${enable_3d_fft+y} +then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test "${with_fftsg_fac+set}" = set; then : +if test ${with_fftsg_fac+y} +then : withval=$with_fftsg_fac; fi @@ -11752,10 +12581,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -11771,16 +12600,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +printf %s "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } fi # # check for FFTW @@ -11843,22 +12672,24 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_FFTW="yes"; -else +else $as_nop HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_FFTW_OMP="yes"; -else +else $as_nop HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -11870,18 +12701,18 @@ rm -f core conftest.err conftest.$ac_objext \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -$as_echo "FFTW3" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +printf "%s\n" "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -$as_echo "FFTW3_OMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +printf "%s\n" "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -$as_echo "FFTW ($desc) " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +printf "%s\n" "FFTW ($desc) " >&6; } fi else def_fft="" @@ -11896,8 +12727,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -11907,8 +12738,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -$as_echo "FFTW no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +printf "%s\n" "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -11918,30 +12749,31 @@ $as_echo "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -$as_echo_n "checking for dcft in $LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +printf %s "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_ESSL=yes -else +else $as_nop HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -$as_echo "$HAVE_ESSL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +printf "%s\n" "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -11953,8 +12785,8 @@ $as_echo_n "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -$as_echo "ESSL FFT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +printf "%s\n" "ESSL FFT" >&6; } fi fi # @@ -11963,8 +12795,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -12001,8 +12833,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -$as_echo "Internal FFTQE (FFTW2)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12028,8 +12860,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -$as_echo "FFTSG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +printf "%s\n" "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12050,8 +12882,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -$as_echo "Internal FFTW3" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +printf "%s\n" "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12065,48 +12897,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12115,7 +12947,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - $as_echo "#define _FFTQE 1" >>confdefs.h + printf "%s\n" "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12137,69 +12969,80 @@ fi # # Check whether --enable-slepc_linalg was given. -if test "${enable_slepc_linalg+set}" = set; then : +if test ${enable_slepc_linalg+y} +then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test "${with_slepc_libs+set}" = set; then : +if test ${with_slepc_libs+y} +then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test "${with_slepc_incs+set}" = set; then : +if test ${with_slepc_incs+y} +then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test "${with_slepc_path+set}" = set; then : +if test ${with_slepc_path+y} +then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test "${with_slepc_libdir+set}" = set; then : +if test ${with_slepc_libdir+y} +then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test "${with_slepc_includedir+set}" = set; then : +if test ${with_slepc_includedir+y} +then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test "${with_petsc_libs+set}" = set; then : +if test ${with_petsc_libs+y} +then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test "${with_petsc_incs+set}" = set; then : +if test ${with_petsc_incs+y} +then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test "${with_petsc_path+set}" = set; then : +if test ${with_petsc_path+y} +then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test "${with_petsc_libdir+set}" = set; then : +if test ${with_petsc_libdir+y} +then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test "${with_petsc_includedir+set}" = set; then : +if test ${with_petsc_includedir+y} +then : withval=$with_petsc_includedir; fi @@ -12223,11 +13066,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12236,9 +13080,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -12257,27 +13098,29 @@ char dlopen (); #endif #endif int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : use_libdl="yes"; -else +else $as_nop use_libdl="no"; fi @@ -12312,12 +13155,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -12360,23 +13203,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : petsc=yes -else +else $as_nop petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # fi # @@ -12389,12 +13233,16 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -$as_echo_n "checking for internal Petsc library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +printf %s "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # - PETSC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; + if test "x$lapack_shared" = "x1" ; then + PETSC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.so" ; + else + PETSC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; + fi PETSC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi @@ -12402,12 +13250,16 @@ $as_echo_n "checking for internal Petsc library... " >&6; } petsc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; then compile_petsc="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.so" ; then + compile_petsc="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_petsc="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi # fi @@ -12434,12 +13286,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -12478,24 +13330,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : slepc=yes -else +else $as_nop slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # fi # @@ -12509,23 +13362,31 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -$as_echo_n "checking for internal Slepc library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +printf %s "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # - SLEPC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; + if test "x$lapack_shared" = "x1" ; then + SLEPC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.so -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; + else + SLEPC_LIBS="${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; + fi SLEPC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # slepc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; then compile_slepc="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.so" ; then + compile_slepc="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_slepc="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -12549,19 +13410,22 @@ fi # Check whether --enable-par_linalg was given. -if test "${enable_par_linalg+set}" = set; then : +if test ${enable_par_linalg+y} +then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test "${with_blacs_libs+set}" = set; then : +if test ${with_blacs_libs+y} +then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test "${with_scalapack_libs+set}" = set; then : +if test ${with_scalapack_libs+y} +then : withval=$with_scalapack_libs; fi @@ -12643,22 +13507,23 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : enable_blacs="yes" -else +else $as_nop enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -$as_echo "$enable_blacs" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +printf "%s\n" "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -12673,22 +13538,23 @@ $as_echo "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : enable_scalapack="yes" -else +else $as_nop enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -$as_echo "$enable_scalapack" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +printf "%s\n" "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -12762,25 +13628,29 @@ LIBS="$reset_LIBS" # # Check whether --with-hdf5_libs was given. -if test "${with_hdf5_libs+set}" = set; then : +if test ${with_hdf5_libs+y} +then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test "${with_hdf5_path+set}" = set; then : +if test ${with_hdf5_path+y} +then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test "${with_hdf5_libdir+set}" = set; then : +if test ${with_hdf5_libdir+y} +then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test "${with_hdf5_includedir+set}" = set; then : +if test ${with_hdf5_includedir+y} +then : withval=$with_hdf5_includedir; fi @@ -12788,7 +13658,8 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test "${enable_hdf5_compression+set}" = set; then : +if test ${enable_hdf5_compression+y} +then : enableval=$enable_hdf5_compression; fi @@ -12796,9 +13667,10 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test "${enable_hdf5_par_io+set}" = set; then : +if test ${enable_hdf5_par_io+y} +then : enableval=$enable_hdf5_par_io; -else +else $as_nop enable_hdf5_par_io="yes" fi @@ -12806,7 +13678,8 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test "${enable_hdf5_p2y_support+set}" = set; then : +if test ${enable_hdf5_p2y_support+y} +then : enableval=$enable_hdf5_p2y_support; fi @@ -12837,12 +13710,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -$as_echo_n "checking for deflate in -lz ... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +printf %s "checking for deflate in -lz ... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12851,9 +13725,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -12872,36 +13743,39 @@ char deflate (); #endif #endif int -main () +main (void) { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : use_libz="yes"; -else +else $as_nop use_libz="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -$as_echo_n "checking for deflate in -lsz... " >&6; } -if ${ac_cv_lib_sz_deflate+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +printf %s "checking for deflate in -lsz... " >&6; } +if test ${ac_cv_lib_sz_deflate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12910,9 +13784,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -12931,35 +13802,38 @@ char deflate (); #endif #endif int -main () +main (void) { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_sz_deflate=yes -else +else $as_nop ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -$as_echo "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes +then : use_libsz="yes"; -else +else $as_nop use_libsz="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12968,9 +13842,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -12989,35 +13860,38 @@ char dlopen (); #endif #endif int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : use_libdl="yes"; -else +else $as_nop use_libdl="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -$as_echo_n "checking for curl_version in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_version+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +printf %s "checking for curl_version in -lcurl... " >&6; } +if test ${ac_cv_lib_curl_curl_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13026,9 +13900,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13047,35 +13918,38 @@ char curl_version (); #endif #endif int -main () +main (void) { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_curl_curl_version=yes -else +else $as_nop ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -$as_echo "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes +then : use_libcurl="yes"; -else +else $as_nop use_libcurl="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +printf %s "checking for cos in -lm... " >&6; } +if test ${ac_cv_lib_m_cos+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13084,9 +13958,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -13105,27 +13976,29 @@ char cos (); #endif #endif int -main () +main (void) { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_m_cos=yes -else +else $as_nop ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +printf "%s\n" "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes +then : use_libm="yes"; -else +else $as_nop use_libm="no"; fi @@ -13169,8 +14042,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # if test x"$with_hdf5_libs" != "x" ; then # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 -$as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 +printf %s "checking for HDF5 using $with_hdf5_libs... " >&6; } ; try_HDF5_LIBS="$with_hdf5_libs" ; if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi # @@ -13191,12 +14064,13 @@ $as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13206,8 +14080,8 @@ rm -f core conftest.err conftest.$ac_objext \ # # Automatic detection of hdf5 libs copied from QE # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -13253,22 +14127,23 @@ $as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +printf %s "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -13308,12 +14183,13 @@ $as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13325,13 +14201,13 @@ rm -f core conftest.err conftest.$ac_objext \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -$as_echo "yes - parallel lib found" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +printf "%s\n" "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -$as_echo "yes - serial lib found" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +printf "%s\n" "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -13339,13 +14215,13 @@ $as_echo "yes - serial lib found" >&6; } ; fi # if test "x$hdf5" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -$as_echo_n "checking for internal HDF5 library... " >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +printf %s "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -13361,8 +14237,8 @@ $as_echo_n "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -13370,8 +14246,8 @@ $as_echo "already compiled" >&6; } ; IO_LIB_VER="parallel"; HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -$as_echo "already compiled (using parallel version)" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +printf "%s\n" "already compiled (using parallel version)" >&6; } ; # else # @@ -13380,8 +14256,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; # fi # @@ -13438,50 +14314,58 @@ fi # Check whether --with-netcdf_libs was given. -if test "${with_netcdf_libs+set}" = set; then : +if test ${with_netcdf_libs+y} +then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test "${with_netcdf_path+set}" = set; then : +if test ${with_netcdf_path+y} +then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test "${with_netcdf_libdir+set}" = set; then : +if test ${with_netcdf_libdir+y} +then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test "${with_netcdf_includedir+set}" = set; then : +if test ${with_netcdf_includedir+y} +then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test "${with_netcdff_libs+set}" = set; then : +if test ${with_netcdff_libs+y} +then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test "${with_netcdff_path+set}" = set; then : +if test ${with_netcdff_path+y} +then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test "${with_netcdff_libdir+set}" = set; then : +if test ${with_netcdff_libdir+y} +then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test "${with_netcdff_includedir+set}" = set; then : +if test ${with_netcdff_includedir+y} +then : withval=$with_netcdff_includedir; fi @@ -13489,7 +14373,8 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test "${enable_netcdf_classic+set}" = set; then : +if test ${enable_netcdf_classic+y} +then : enableval=$enable_netcdf_classic; fi @@ -13497,7 +14382,8 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test "${enable_netcdf_par_io+set}" = set; then : +if test ${enable_netcdf_par_io+y} +then : enableval=$enable_netcdf_par_io; fi @@ -13505,7 +14391,8 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test "${enable_netcdf_v3+set}" = set; then : +if test ${enable_netcdf_v3+y} +then : enableval=$enable_netcdf_v3; fi @@ -13513,7 +14400,8 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test "${enable_hdf5_compression+set}" = set; then : +if test ${enable_hdf5_compression+y} +then : enableval=$enable_hdf5_compression; fi @@ -13521,7 +14409,8 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test "${enable_netcdf_output+set}" = set; then : +if test ${enable_netcdf_output+y} +then : enableval=$enable_netcdf_output; fi @@ -13559,10 +14448,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -13625,8 +14514,8 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi if test -d "$with_pnetcdf_includedir" ; then try_PNETCDF_INCS="$IFLAG$with_pnetcdf_includedir" ; fi @@ -13634,8 +14523,8 @@ $as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; try_PNETCDF_LIBS="$with_pnetcdf_libs" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # fi # @@ -13660,16 +14549,17 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : netcdf=yes -else +else $as_nop netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; @@ -13677,8 +14567,8 @@ $as_echo "yes" >&6; } ; PNETCDF_INCS="$try_PNETCDF_INCS" ; PNETCDF_LIBS="$try_PNETCDF_LIBS" ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -13689,8 +14579,8 @@ $as_echo "no" >&6; } ; # # internal netcdf # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -$as_echo_n "checking for internal NetCDF library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +printf %s "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -13724,22 +14614,22 @@ $as_echo_n "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PATH}/lib/libpnetcdf.a"; then compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi fi # @@ -13774,12 +14664,13 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : netcdf=yes -else +else $as_nop netcdf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -13787,8 +14678,8 @@ rm -f core conftest.err conftest.$ac_objext \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; # fi # @@ -13796,11 +14687,11 @@ $as_echo "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -$as_echo_n "checking for internal NETCDF library... " >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +printf %s "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -13819,8 +14710,8 @@ $as_echo_n "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -13830,8 +14721,8 @@ $as_echo "already compiled" >&6; } ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -$as_echo "already compiled (using parallel version)" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +printf "%s\n" "already compiled (using parallel version)" >&6; } ; # else # @@ -13840,8 +14731,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; # fi # @@ -13933,32 +14824,37 @@ fi # Check whether --enable-yaml_output was given. -if test "${enable_yaml_output+set}" = set; then : +if test ${enable_yaml_output+y} +then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test "${with_yaml_libs+set}" = set; then : +if test ${with_yaml_libs+y} +then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test "${with_yaml_libdir+set}" = set; then : +if test ${with_yaml_libdir+y} +then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test "${with_yaml_libdir+set}" = set; then : +if test ${with_yaml_libdir+y} +then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test "${with_yaml_includedir+set}" = set; then : +if test ${with_yaml_includedir+y} +then : withval=$with_yaml_includedir; fi @@ -13967,25 +14863,29 @@ fi # Check whether --with-futile_libs was given. -if test "${with_futile_libs+set}" = set; then : +if test ${with_futile_libs+y} +then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test "${with_futile_libdir+set}" = set; then : +if test ${with_futile_libdir+y} +then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test "${with_futile_libdir+set}" = set; then : +if test ${with_futile_libdir+y} +then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test "${with_futile_includedir+set}" = set; then : +if test ${with_futile_includedir+y} +then : withval=$with_futile_includedir; fi @@ -14008,10 +14908,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14030,55 +14930,55 @@ $as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -$as_echo_n "checking for internal YAML library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +printf %s "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } else compile_yaml="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -$as_echo_n "checking for YAML library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +printf %s "checking for YAML library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -14102,10 +15002,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -14124,55 +15024,55 @@ $as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -$as_echo_n "checking for internal FUTILE library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +printf %s "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } else compile_futile="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -$as_echo_n "checking for FUTILE library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +printf %s "checking for FUTILE library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -14198,33 +15098,38 @@ fi # Check whether --enable-iotk was given. -if test "${enable_iotk+set}" = set; then : +if test ${enable_iotk+y} +then : enableval=$enable_iotk; -else +else $as_nop enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test "${with_iotk_libs+set}" = set; then : +if test ${with_iotk_libs+y} +then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test "${with_iotk_path+set}" = set; then : +if test ${with_iotk_path+y} +then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test "${with_iotk_libdir+set}" = set; then : +if test ${with_iotk_libdir+y} +then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test "${with_iotk_includedir+set}" = set; then : +if test ${with_iotk_includedir+y} +then : withval=$with_iotk_includedir; fi @@ -14245,10 +15150,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -14268,38 +15173,38 @@ $as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir_src" IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" IOTK_LIBS="$try_iotk_libdir/libiotk.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -$as_echo_n "checking for internal IOTK library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +printf %s "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" @@ -14307,21 +15212,21 @@ $as_echo_n "checking for internal IOTK library... " >&6; } if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -$as_echo_n "checking for IOTK library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +printf %s "checking for IOTK library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # PW_VER="no-hdf5-support" @@ -14349,33 +15254,38 @@ fi # Check whether --enable-etsf_io was given. -if test "${enable_etsf_io+set}" = set; then : +if test ${enable_etsf_io+y} +then : enableval=$enable_etsf_io; -else +else $as_nop enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test "${with_etsf_io_libs+set}" = set; then : +if test ${with_etsf_io_libs+y} +then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test "${with_etsf_io_path+set}" = set; then : +if test ${with_etsf_io_path+y} +then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test "${with_etsf_io_libdir+set}" = set; then : +if test ${with_etsf_io_libdir+y} +then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test "${with_etsf_io_includedir+set}" = set; then : +if test ${with_etsf_io_includedir+y} +then : withval=$with_etsf_io_includedir; fi @@ -14402,10 +15312,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -14424,50 +15334,50 @@ $as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else # # internal ETSF_IO # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -$as_echo_n "checking for internal ETSF_IO Library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +printf %s "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -$as_echo "found already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +printf "%s\n" "found already compiled" >&6; } else compile_etsf="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } fi fi # else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -$as_echo_n "checking for ETSF_IO Library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +printf %s "checking for ETSF_IO Library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # @@ -14485,25 +15395,29 @@ compile_libxc=yes # Check whether --with-libxc_libs was given. -if test "${with_libxc_libs+set}" = set; then : +if test ${with_libxc_libs+y} +then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test "${with_libxc_path+set}" = set; then : +if test ${with_libxc_path+y} +then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test "${with_libxc_libdir+set}" = set; then : +if test ${with_libxc_libdir+y} +then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test "${with_libxc_includedir+set}" = set; then : +if test ${with_libxc_includedir+y} +then : withval=$with_libxc_includedir; fi @@ -14524,8 +15438,8 @@ LIBXC_INCS="$IFLAG$libxc_incdir" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -$as_echo_n "checking for libxc... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +printf %s "checking for libxc... " >&6; } testprog=" program main @@ -14545,10 +15459,11 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14559,10 +15474,11 @@ if test x"$acx_libxc_ok" = xno && test ! -z "$with_libxc_libs" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14573,10 +15489,11 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14587,10 +15504,11 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14666,66 +15584,71 @@ if test x"$acx_libxc_ok" = xyes; then cat > conftest.$ac_ext <<_ACEOF $testprog_11 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=110, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_12 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_20 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=200, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_203 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=203, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_21 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=210, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_4x _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=400, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_5x _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=5, acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -cat >>confdefs.h <<_ACEOF -#define LIBXC_VERSION $acx_libxc_version -_ACEOF +printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi if test x"$acx_libxc_ok" = xyes; then @@ -14733,7 +15656,7 @@ if test x"$acx_libxc_ok" = xyes; then internal_libxc=no # -$as_echo "#define HAVE_LIBXC 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h fi @@ -14745,12 +15668,12 @@ if test x"$acx_libxc_ok" = xno; then LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } else compile_libxc="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } fi fi @@ -14766,13 +15689,15 @@ LIBS="$acx_libxc_save_LIBS" # # Check whether --enable-cuda was given. -if test "${enable_cuda+set}" = set; then : +if test ${enable_cuda+y} +then : enableval=$enable_cuda; fi # # Check whether --enable-nvtx was given. -if test "${enable_nvtx+set}" = set; then : +if test ${enable_nvtx+y} +then : enableval=$enable_nvtx; fi @@ -14798,41 +15723,41 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" # cc60 for Pascal cards (eg P100) # cc70 for Volta cards (eg V100) # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 -$as_echo_n "checking for CUDA support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 +printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -$as_echo "$CUDA_FLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -$as_echo "$CUDA_FLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +printf "%s\n" "$CUDA_FLAGS" >&6; } fi # if test x"$enable_cuda" = "x" -o x"$enable_cuda" = "xno" ; then enable_nvtx=no def_cuda="" CUDA_FLAGS="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 -$as_echo_n "checking for NVTX support... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 +printf %s "checking for NVTX support... " >&6; } if ! test x"$enable_nvtx" = "xno" ; then if test x"$enable_nvtx" = "xyes" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -lnvToolsExt" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif ! test x"$enable_nvtx" = "x" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi # @@ -15099,8 +16024,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -15130,15 +16055,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -15152,8 +16077,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -15170,7 +16095,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -15186,8 +16111,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -15210,14 +16135,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -15227,46 +16154,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -15275,13 +16202,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -15290,8 +16210,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -15303,30 +16227,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -15339,13 +16243,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -15372,18 +16277,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -15395,12 +16302,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -15431,7 +16339,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -15453,6 +16361,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -15466,6 +16378,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -15507,7 +16425,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -15516,7 +16434,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -15579,7 +16497,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Yambo $as_me 5.1.0 r.21945 h.56d04a362, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15637,14 +16555,16 @@ $config_headers Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ Yambo config.status 5.1.0 r.21945 h.56d04a362 -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15681,15 +16601,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -15697,7 +16617,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -15706,7 +16626,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -15734,7 +16654,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -15748,7 +16668,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -15788,8 +16708,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -16125,7 +17045,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -16133,17 +17053,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -16160,7 +17080,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16184,9 +17104,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -16239,8 +17159,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -16282,9 +17202,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -16300,20 +17220,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -16354,8 +17274,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -16513,3 +17433,4 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi + diff --git a/include/driver/version.h b/include/driver/version.h index 59ae484926..b24141a0a6 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22030 -#define YAMBO_HASH "bea119e94" +#define YAMBO_REVISION 22126 +#define YAMBO_HASH "ccd94edc0" From faa19dd5db462c030be9c2de5678883eab3291aa Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 8 Dec 2022 22:45:48 +0100 Subject: [PATCH 0521/1367] Version 5.1.0, Revision 22127, Hash acdc1209a MODIFIED * include/driver/version.h common/DOUBLE_project.dep el-ph/DOUBLE_project.dep io/DOUBLE_project.dep modules/DOUBLE_project.dep ypp/el-ph/DOUBLE_project.dep ypp/excitons/YPP_ELPH_project.dep Changes: - Fixed projects dependencies after upgrade to new compilation scheme Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/common/DOUBLE_project.dep | 2 ++ src/el-ph/DOUBLE_project.dep | 3 ++- src/io/DOUBLE_project.dep | 2 ++ src/modules/DOUBLE_project.dep | 1 + ypp/el-ph/DOUBLE_project.dep | 2 ++ ypp/excitons/YPP_ELPH_project.dep | 1 + 7 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b24141a0a6..c31e52828e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22126 -#define YAMBO_HASH "ccd94edc0" +#define YAMBO_REVISION 22127 +#define YAMBO_HASH "acdc1209a" diff --git a/src/common/DOUBLE_project.dep b/src/common/DOUBLE_project.dep index f0f79adf70..46b1d88ad4 100644 --- a/src/common/DOUBLE_project.dep +++ b/src/common/DOUBLE_project.dep @@ -21,6 +21,8 @@ OCCUPATIONS_Extend_Double_Grid.o OCCUPATIONS_Fermi.o OCCUPATIONS_Gaps.o + OCCUPATIONS_Merge.o + OCCUPATIONS_Quasi_Fermi.o QP_state_group.o QP_state_print.o QPartilize.o diff --git a/src/el-ph/DOUBLE_project.dep b/src/el-ph/DOUBLE_project.dep index ec032683f4..8728922c0a 100644 --- a/src/el-ph/DOUBLE_project.dep +++ b/src/el-ph/DOUBLE_project.dep @@ -1,6 +1,6 @@ - ELPH_GreenF.o ELPH_Hamiltonian.o ELPH_Sigma_c.o + ELPH_Sigma_c_engine.o ELPH_acoustic_phonon_properties.o ELPH_databases_check.o ELPH_databases_grids_map.o @@ -9,4 +9,5 @@ ELPH_gsqF_to_Sigma.o ELPH_simmetrize_and_distribute_gsqF.o En_k_plus_q_interpolate.o + get_ph_E_DbGd.o diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index cde6f2310e..129698f0ad 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -8,6 +8,8 @@ io_DB1_selective_scan.o io_Double_Grid.o io_ELPH.o + io_EXCPH_SE.o + io_EXCPH_gkkp.o io_E_SOC_map.o io_GROT.o io_HF_and_locXC.o diff --git a/src/modules/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index 41c1b927ed..81bf38c74c 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -8,6 +8,7 @@ mod_DIPOLES.o mod_D_lattice.o mod_ELPH.o + mod_EXCPH.o mod_FFT.o mod_H_interfaces.o mod_IO.o diff --git a/ypp/el-ph/DOUBLE_project.dep b/ypp/el-ph/DOUBLE_project.dep index 77cfe8cedd..41555c423a 100644 --- a/ypp/el-ph/DOUBLE_project.dep +++ b/ypp/el-ph/DOUBLE_project.dep @@ -11,6 +11,8 @@ ELPH_eliashberg_dos.o ELPH_excitonic_gkkp.o ELPH_general_gFsq.o + ELPH_load_indexes.o ELPH_plot_gkkp.o + ELPH_sngl_db.o Eliashberg_Dos_Func.o diff --git a/ypp/excitons/YPP_ELPH_project.dep b/ypp/excitons/YPP_ELPH_project.dep index d69819a652..541076743e 100644 --- a/ypp/excitons/YPP_ELPH_project.dep +++ b/ypp/excitons/YPP_ELPH_project.dep @@ -1,2 +1,3 @@ excitons_driver.o + excitons_interpolate_setup.o From 3aa025c76139437d4c9424480e341817e1d8b236 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 9 Dec 2022 23:25:55 +0100 Subject: [PATCH 0522/1367] Version 5.1.0, Revision 21841, Hash 75e45def9 MODIFIED * include/driver/version.h io/DOUBLE_project.dep io/NL_project.dep modules/NL_project.dep nloptics/DOUBLE_project.dep Changes: - [compilation] Fixed *_projects.dep files after merge Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/DOUBLE_project.dep | 1 + src/io/NL_project.dep | 1 + src/modules/NL_project.dep | 1 + src/nloptics/DOUBLE_project.dep | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5b74278cf1..a31d644681 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21792 -#define YAMBO_HASH "6c30fe512" +#define YAMBO_REVISION 21841 +#define YAMBO_HASH "75e45def9" diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index cde6f2310e..4e4fb304df 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -26,6 +26,7 @@ io_RT_components_OBS.o io_RT_components_Reference.o io_RT_components_TIME_points.o + io_RT_components_V_bands.o io_RT_components_header.o io_SC_components.o io_USPP_pwscf.o diff --git a/src/io/NL_project.dep b/src/io/NL_project.dep index 889b62b3a1..6cb40f61a1 100644 --- a/src/io/NL_project.dep +++ b/src/io/NL_project.dep @@ -1,4 +1,5 @@ io_DB1.o io_NL.o + io_RT_components.o variables_NL.o diff --git a/src/modules/NL_project.dep b/src/modules/NL_project.dep index 65bdf5a427..1ffe88949f 100644 --- a/src/modules/NL_project.dep +++ b/src/modules/NL_project.dep @@ -1,4 +1,5 @@ SET_defaults.o + SET_logicals.o mod_BS_solvers.o mod_interfaces.o diff --git a/src/nloptics/DOUBLE_project.dep b/src/nloptics/DOUBLE_project.dep index 0283229f4b..a758baca11 100644 --- a/src/nloptics/DOUBLE_project.dep +++ b/src/nloptics/DOUBLE_project.dep @@ -10,6 +10,7 @@ NL_average_operator.o NL_build_dG_lesser.o NL_build_valence_bands.o + NL_carriers_number.o NL_current.o NL_damping.o NL_databases_IO.o From ff889686b110f53c51ae0c12dc154c769dc8fe4f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Oct 2022 15:08:07 +0200 Subject: [PATCH 0523/1367] Version 5.1.0, Revision 21688, Hash 05ea3f9 MODIFIED * modified: communicate/DESC_compare.F ypp/real_time/RT_OBSERVABLES_IO_path.F Bugs: - Saving local changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/communicate/DESC_compare.F | 7 +++++++ ypp/real_time/RT_OBSERVABLES_IO_path.F | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a31d644681..cd88fd15b5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21841 -#define YAMBO_HASH "75e45def9" +#define YAMBO_REVISION 21688 +#define YAMBO_HASH "05ea3f9" diff --git a/src/communicate/DESC_compare.F b/src/communicate/DESC_compare.F index cb5bf47972..ef95b59823 100644 --- a/src/communicate/DESC_compare.F +++ b/src/communicate/DESC_compare.F @@ -55,14 +55,21 @@ subroutine DESC_compare(D1,D2,i_err,exclude,only) do i_v=1,D1%size(i_d) if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) i_err=(/i_d,i_dp/) if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) i_err=(/i_d,i_dp/) + if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) write(*,*) D1%ival(i_v,i_d),D2%ival(i_v,i_dp) + if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) write(*,*) D1%rval(i_v,i_d),D2%rval(i_v,i_dp) enddo if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) i_err=(/i_d,i_dp/) + if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) write(*,*) real(D1%dval(i_d)),real(D2%dval(i_dp)) if (D1%kind(i_d)=='c') then if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) i_err=(/i_d,i_dp/) if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) i_err=(/i_d,i_dp/) + if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) write(*,*) real(D1%cval(i_d)),real(D2%cval(i_dp)) + if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) write(*,*) aimag(D1%cval(i_d)),aimag(D2%cval(i_dp)) endif if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) i_err=(/i_d,i_dp/) if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) i_err=(/i_d,i_dp/) + if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) write(*,*) trim(D1%sval(i_d)),trim(D2%sval(i_dp)) + if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) write(*,*) D1%lval(i_d),D2%lval(i_dp) enddo enddo ! diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index 403e95cb92..b270c75bf2 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -147,8 +147,8 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! Pump & Probe comparison ! if (N_pumps>0) then - call DESC_compare(RT_desc,Pump_RT_desc,i_desc_err,exclude="FIELDs") - if (any(i_desc_err/=0)) call error("Probe and Pump runs are not compatible") + !call DESC_compare(RT_desc,Pump_RT_desc,i_desc_err,exclude="FIELDs") + !if (any(i_desc_err/=0)) call error("Probe and Pump runs are not compatible") if (n_ext_fields/=2) call warning("Probe run has only one field. Pump ignored") endif ! From 2c3ac86096c9fe03d86b4df25b18bc14318f4fa8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 21 Nov 2022 12:11:59 +0100 Subject: [PATCH 0524/1367] Version 5.1.0, Revision 21794, Hash 119ef33 MODIFIED * modified: src/modules/mod_pars.F NEW * Changes: - [yambo] Increased maximum value of lchlen Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_pars.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index cd88fd15b5..4c0918cb1c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21688 -#define YAMBO_HASH "05ea3f9" +#define YAMBO_REVISION 21794 +#define YAMBO_HASH "119ef33" diff --git a/src/modules/mod_pars.F b/src/modules/mod_pars.F index 25b244d372..60f46d19e6 100644 --- a/src/modules/mod_pars.F +++ b/src/modules/mod_pars.F @@ -98,7 +98,7 @@ module pars ! STRINGs !========= integer, parameter :: schlen=100 - integer, parameter :: lchlen=300 + integer, parameter :: lchlen=500 integer, parameter :: msg_len=50 integer, parameter :: DB_menu_length=30+msg_len ! From 64b5879aec01fd4772f4e61bd359f59346be6e34 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 12 Dec 2022 17:01:38 +0100 Subject: [PATCH 0525/1367] Version 5.1.0, Revision 22128, Hash faa19dd5d MODIFIED * .gitignore include/driver/version.h NEW * bse/PHEL_project.dep bse/SC_project.dep driver/SC_project.dep exc-ph/DOUBLE_project.dep io_serial/SC_project.dep linear_algebra/SC_project.dep matrices/SC_project.dep real_time_drivers/ELPH_project.dep ypp/symmetries/ELPH_project.dep ypp/symmetries/YPP_ELPH_project.dep Changes: - [yambo_ph] Added missing project.dep files Patch sent by: Davide Sangalli --- .gitignore | 3 ++- include/driver/version.h | 4 ++-- src/bse/PHEL_project.dep | 2 ++ src/bse/SC_project.dep | 6 ++++++ src/driver/SC_project.dep | 2 ++ src/exc-ph/DOUBLE_project.dep | 17 +++++++++++++++++ src/io_serial/SC_project.dep | 2 ++ src/linear_algebra/SC_project.dep | 2 ++ src/matrices/SC_project.dep | 2 ++ src/real_time_drivers/ELPH_project.dep | 2 ++ ypp/symmetries/ELPH_project.dep | 2 ++ ypp/symmetries/YPP_ELPH_project.dep | 2 ++ 12 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 src/bse/PHEL_project.dep create mode 100644 src/bse/SC_project.dep create mode 100644 src/driver/SC_project.dep create mode 100644 src/exc-ph/DOUBLE_project.dep create mode 100644 src/io_serial/SC_project.dep create mode 100644 src/linear_algebra/SC_project.dep create mode 100644 src/matrices/SC_project.dep create mode 100644 src/real_time_drivers/ELPH_project.dep create mode 100644 ypp/symmetries/ELPH_project.dep create mode 100644 ypp/symmetries/YPP_ELPH_project.dep diff --git a/.gitignore b/.gitignore index 334f9786f5..3970dc129f 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,8 @@ lib/archive/git.list *.a *.so *.mod -*.dep +*modules.dep +*.save *.f90 *.s *.sw* diff --git a/include/driver/version.h b/include/driver/version.h index c31e52828e..6572122925 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22127 -#define YAMBO_HASH "acdc1209a" +#define YAMBO_REVISION 22128 +#define YAMBO_HASH "faa19dd5d" diff --git a/src/bse/PHEL_project.dep b/src/bse/PHEL_project.dep new file mode 100644 index 0000000000..f564be77c8 --- /dev/null +++ b/src/bse/PHEL_project.dep @@ -0,0 +1,2 @@ + K_driver_init.o + diff --git a/src/bse/SC_project.dep b/src/bse/SC_project.dep new file mode 100644 index 0000000000..30d039b87a --- /dev/null +++ b/src/bse/SC_project.dep @@ -0,0 +1,6 @@ + EPS_via_perturbative_inversion.o + K_diago_driver.o + K_inversion_driver.o + K_inversion_engine.o + PL_via_perturbative_inversion.o + diff --git a/src/driver/SC_project.dep b/src/driver/SC_project.dep new file mode 100644 index 0000000000..a3379bb643 --- /dev/null +++ b/src/driver/SC_project.dep @@ -0,0 +1,2 @@ + options_control.o + diff --git a/src/exc-ph/DOUBLE_project.dep b/src/exc-ph/DOUBLE_project.dep new file mode 100644 index 0000000000..f3592d99f1 --- /dev/null +++ b/src/exc-ph/DOUBLE_project.dep @@ -0,0 +1,17 @@ + EXCPH_X_phass.o + EXCPH_X_phass_from_Hpert.o + EXCPH_ave_sat_DbGrid.o + EXCPH_double_grid_setup.o + EXCPH_eval_renorm.o + EXCPH_eval_sat.o + EXCPH_gkkp_driver.o + EXCPH_gkkp_eval_ber.o + EXCPH_gkkp_eval_pal.o + EXCPH_lifetime.o + EXCPH_load_L.o + EXCPH_optics.o + EXC_dipole.o + EXC_occupations.o + Satellite_DbGrid.o + Satellite_Simple.o + diff --git a/src/io_serial/SC_project.dep b/src/io_serial/SC_project.dep new file mode 100644 index 0000000000..3e6252f7ef --- /dev/null +++ b/src/io_serial/SC_project.dep @@ -0,0 +1,2 @@ + io_DIPOLES.o + diff --git a/src/linear_algebra/SC_project.dep b/src/linear_algebra/SC_project.dep new file mode 100644 index 0000000000..5310098e74 --- /dev/null +++ b/src/linear_algebra/SC_project.dep @@ -0,0 +1,2 @@ + LINEAR_ALGEBRA_driver.o + diff --git a/src/matrices/SC_project.dep b/src/matrices/SC_project.dep new file mode 100644 index 0000000000..cb0ee78d1d --- /dev/null +++ b/src/matrices/SC_project.dep @@ -0,0 +1,2 @@ + MATRIX_init.o + diff --git a/src/real_time_drivers/ELPH_project.dep b/src/real_time_drivers/ELPH_project.dep new file mode 100644 index 0000000000..e3d1b42bc9 --- /dev/null +++ b/src/real_time_drivers/ELPH_project.dep @@ -0,0 +1,2 @@ + RT_relaxation.o + diff --git a/ypp/symmetries/ELPH_project.dep b/ypp/symmetries/ELPH_project.dep new file mode 100644 index 0000000000..23bff92dca --- /dev/null +++ b/ypp/symmetries/ELPH_project.dep @@ -0,0 +1,2 @@ + symmetries_driver.o + diff --git a/ypp/symmetries/YPP_ELPH_project.dep b/ypp/symmetries/YPP_ELPH_project.dep new file mode 100644 index 0000000000..645782fb3e --- /dev/null +++ b/ypp/symmetries/YPP_ELPH_project.dep @@ -0,0 +1,2 @@ + symmetries_driver.o + From 603a2f1562ed151068330a795d394efea8186ece Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 12 Dec 2022 23:05:47 +0100 Subject: [PATCH 0526/1367] Version 5.1.0, Revision 22129, Hash 64b5879ae MODIFIED * include/driver/version.h io/io_PH.F NEW * io/PHEL_project.dep Changes: - [yambo_ph] compilation fixed Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/PHEL_project.dep | 2 ++ src/io/io_PH.F | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 src/io/PHEL_project.dep diff --git a/include/driver/version.h b/include/driver/version.h index 6572122925..c634077f0e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22128 -#define YAMBO_HASH "faa19dd5d" +#define YAMBO_REVISION 22129 +#define YAMBO_HASH "64b5879ae" diff --git a/src/io/PHEL_project.dep b/src/io/PHEL_project.dep new file mode 100644 index 0000000000..df62ae28df --- /dev/null +++ b/src/io/PHEL_project.dep @@ -0,0 +1,2 @@ + io_PH.o + diff --git a/src/io/io_PH.F b/src/io/io_PH.F index 8014938c9d..1fcfa93728 100644 --- a/src/io/io_PH.F +++ b/src/io/io_PH.F @@ -21,6 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! +#if defined _PHEL integer function io_PH(ID) ! use units, ONLY:HA2EV @@ -137,3 +138,4 @@ integer function io_PH(ID) call io_disconnect(ID=ID) ! end function +#endif From d96be7f5897561912a03496376850c5ae591f621 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Wed, 14 Dec 2022 11:35:12 +0100 Subject: [PATCH 0527/1367] ares-fac as yambo-devel and remove l_BS_ares_from_res --- src/bse/K_IP.F | 1 + src/bse/K_components_folded_in_serial_arrays.F | 10 +++++++--- src/bse/K_diago_response_functions.F | 2 +- src/bse/K_driver_init.F | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 9fdcd95f80..dc98aa5e43 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -202,6 +202,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Note that res_PL is always positive as f_eh_PL>0 ! write (*,*) "iresares", i_res_ares + write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL, i_T_g f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,1) P_weighted(:)=BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1)*PL_weights(:) res_PL=real(dot_product(P_weighted,P_weighted)*f_eh_PL*Z_eh*E_eh) diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 387febf6ae..27fe7ad3f1 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -102,11 +102,16 @@ subroutine K_components_folded_in_serial_arrays(iq) do i_res_ares_solver=1,BS_n_eh_spaces_solver ! H_pos=sum(BS_T_grp(i_g_start:I_g-1)%size)+i_Tr+(max(i_res_ares_solver,i_res_ares)-1)*BS_K_dim(1) - ares_fac=(-1)**(i_res_ares_solver) + write (*,*) 'BS_T_grp(i_g_start: I_g=1)%size', BS_T_grp(i_g_start:I_g-1)%size, i_g_start, I_g-1 + write (*,*) 'i_Tr i_res_ares_solver, i_res_ares', i_Tr, i_res_ares_solver, i_res_ares + write (*,*) 'H_pos',H_pos + ares_fac=(-1)**(i_res_ares_solver-1) ! BSS_eh_table(H_pos,:)=(/i_k_bz,i_v,i_c,i_sp_c,i_sp_v/) + write (*,*) 'BSS_eh_table', BSS_eh_table(H_pos,:) ! BSS_eh_E(H_pos)=BS_T_grp(i_g)%E(i_Tr,1)*ares_fac + write (*,*) 'BSS_eh_E(H_pos)', BSS_eh_E(H_pos), ares_fac !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%Z)) BSS_eh_Z(H_pos)=BS_T_grp(i_g)%Z(i_Tr)*ares_fac @@ -116,10 +121,9 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_photolum) then !write (*,*) 'i_res_ares_solver', i_res_ares_solver - !write (*,*) 'f_PL', BS_T_grp(i_g)%f_PL(2,2) + write (*,*) 'f_PL', BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) BSS_PL_f(H_pos)=BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) then - write(*,*) 'ciao' BSS_PL_f(H_pos+BS_K_dim(1))=BS_T_grp(i_g)%f_PL(i_Tr,2) endif endif diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 8ce90a6edc..034e1f17a5 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -164,7 +164,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS !write (*,*) "BS_E(i1)", i1, BS_E(i1) PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi - write (*,*) "PL2 here", PL(:,2) + !write (*,*) "PL2 here", PL(:,2) ! PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi ! PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi !if (real(BS_E(i1)) .lt. 0) PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 7eac643ea0..80c722b066 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -85,7 +85,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) if (l_flag) l_BS_ares_from_res=.FALSE. ! if (iq/=1.and.i_time_rev==0.and.i_space_inv==0 ) l_BS_ares_from_res=.FALSE. - if (l_BS_photolum) l_BS_ares_from_res=.FALSE. +! if (l_BS_photolum) l_BS_ares_from_res=.FALSE. Line removed after discussion 14/12/22 RR,PM,DS if (l_BS_magnons.and.n_sp_pol==2) l_BS_ares_from_res=.FALSE. ! The next line is to switch of section of the codes due to the calculation ! of the ARES part without checking the BSE_mode (see io_BS_PAR_init for example) From 5d1f974bcc8cf73586a1982d8047b088fb38c7d0 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Wed, 14 Dec 2022 18:51:19 +0100 Subject: [PATCH 0528/1367] WIP: adapt PL_diago_residual for case BS_K=BS_H --- src/bse/K_IP.F | 4 +++ src/bse/K_diago_driver.F | 2 +- src/bse/K_diago_response_functions.F | 11 +++---- src/bse/PL_diago_residual.F | 46 ++++++++++++---------------- 4 files changed, 29 insertions(+), 34 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index dc98aa5e43..a79bdf3778 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -206,6 +206,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,1) P_weighted(:)=BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1)*PL_weights(:) res_PL=real(dot_product(P_weighted,P_weighted)*f_eh_PL*Z_eh*E_eh) + write(*,*) 'P_weighted, f_eh_PL, Z_eh, E_eh', P_weighted, f_eh_PL, Z_eh, E_eh endif ! ! Dichroism @@ -288,10 +289,13 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_photolum) then + write(*,*)'l_BS_ares_from_res', l_BS_ares_from_res, BS_K_anti_resonant PL(:,3)=PL(:,3) +PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi if (BS_K_anti_resonant.and.l_BS_ares_from_res) then PL(:,3)=PL(:,3)-PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif + !write (*,*) 'PL(:3) here', PL(:,3) + write (*,*) 'res_PL here', res_PL endif ! if (l_BS_dichroism) then diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 9ac4b96c23..09fd94b87c 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -266,7 +266,7 @@ subroutine K_diago_driver(iq,W,X_static) if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_mat,BS_R_right_kerr) if (l_BS_magnons) call K_diago_herm_magnons_residual(i_BS_mat,BS_R_left_magn,BS_R_right_magn) write (*,*) 'Shape BS_mat', shape(BS_mat) - if (l_BS_photolum)call PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) + if (l_BS_photolum)call PL_diago_herm_residual(BS_mat,BS_R_PL) ! endif ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 034e1f17a5..a1ab6fad07 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -163,13 +163,10 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if(l_BS_photolum) then !write (*,*) "BS_E(i1)", i1, BS_E(i1) PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi - PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi - !write (*,*) "PL2 here", PL(:,2) - ! PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi - ! PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi - !if (real(BS_E(i1)) .lt. 0) PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi - !if (real(BS_E(i1)) .gt. 0) PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi - !write (*,*) "PL2 here", PL(:,2) + if (l_ADD_the_ARES_using_the_RES) then + PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi + endif + write (*,*) "PL2 here", PL(:,2) endif ! enddo diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 3f43ef1106..b634049b66 100755 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) +subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! ! Resonant PL Residuals ! @@ -43,14 +43,13 @@ subroutine PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) ! implicit none ! - complex(SP),intent(in) :: BS_mat(BS_K_dim(1),BS_K_dim(2)) + complex(SP),intent(in) :: BS_mat(BS_K_dim(1),BSS_n_eig) real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) - real(SP) :: half_BSS_n_eig + integer :: half_BSS_n_eig ! ! Workspace ! type(PP_indexes) ::px - integer, intent(in) :: i_BS_mat integer ::i_l,i_c,i_K,i_lr,i_ll, ik complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& & R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) @@ -73,7 +72,7 @@ subroutine PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) ! call live_timing('PL residuals',px%n_of_elements(myid+1)) write(*,*) "Hermitian run" - write(*,*) "BS_H_dim", BS_H_dim !72 + write(*,*) "BS_H_dim", BS_H_dim !36 write(*,*) "BSS_n_eig", BSS_n_eig !36 write(*,*) "BS_K_dim(1)", BS_K_dim(1) !36 write(*,*) "BS_K_dim(2)", BS_K_dim(2) !36 @@ -85,29 +84,27 @@ subroutine PL_diago_herm_residual(i_BS_mat,BS_mat,BS_R_PL) ! 1=> left ! 2=> right ! -if (i_BS_mat==1) then - - do i_c=1,3 - do i_K=1,BS_K_dim(1) + do i_c=1,3 + do i_K=1,half_BSS_n_eig !BSS_dipoles_PL= dipoles*PL_weights - P_x_fZ(i_K,i_c,i_BS_mat)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f(i_K))) !Pi^* left sqrt(R) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f(i_K))) !Pi^* left sqrt(R) enddo enddo -do i_l=1,BS_K_dim(1) +do i_l=1,half_BSS_n_eig ! if (.not.px%element_1D(i_l)) cycle !parallelization ! ! R_over_R_x_A = R<_j/R_j A^r_ij ! do ik = 1, BS_K_dim(1) - R_over_R_x_A(i_BS_mat,ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f(ik) !resonant R + R_over_R_x_A(1,1:BS_K_dim(1))) !resonant this is dipoles_PL*BS_mat*fermifactors= sum_k !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not !Al*R Date: Wed, 14 Dec 2022 19:32:07 +0100 Subject: [PATCH 0529/1367] WIP: writing statements for IP debugging --- src/bse/K_IP.F | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index a79bdf3778..bd01c81b2c 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -203,10 +203,14 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! write (*,*) "iresares", i_res_ares write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL, i_T_g - f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,1) + f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,2) P_weighted(:)=BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1)*PL_weights(:) res_PL=real(dot_product(P_weighted,P_weighted)*f_eh_PL*Z_eh*E_eh) - write(*,*) 'P_weighted, f_eh_PL, Z_eh, E_eh', P_weighted, f_eh_PL, Z_eh, E_eh + write(*,*) 'P_weighted', P_weighted + write(*,*) 'E_eh', E_eh + write(*,*) 'f_eh_PL', f_eh_PL + write(*,*) 'Z_eh', Z_eh + write(*,*) 'fine' endif ! ! Dichroism @@ -294,8 +298,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then PL(:,3)=PL(:,3)-PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif - !write (*,*) 'PL(:3) here', PL(:,3) + write (*,*) 'PL(:3) here', PL(:,3) write (*,*) 'res_PL here', res_PL + write (*,*) 'aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))', aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))) endif ! if (l_BS_dichroism) then From d814fb0ee85212b35867e685a0821f7aa05a325b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 14 Dec 2022 19:32:58 +0100 Subject: [PATCH 0530/1367] Version 5.1.0, Revision 21617, Hash 5d1f974bc MODIFIED * bse/PL_diago_residual.F Changes: - [yambo] removed exec mode from residuals Patch sent by: Davide Sangalli --- src/bse/PL_diago_residual.F | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 src/bse/PL_diago_residual.F diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F old mode 100755 new mode 100644 From f370815ab8b5741b386ac7b0ced25af680dc8349 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 14 Dec 2022 21:45:40 +0100 Subject: [PATCH 0531/1367] Version 5.1.0, Revision 21789, Hash e69f0bb77 MODIFIED * bse/K_IP.F bse/K_Transition_check.F bse/K_Transitions_setup.F bse/K_components_folded_in_serial_arrays.F bse/K_diago_response_functions.F bse/PL_diago_residual.F Changes: - [yambo] Several changes on PL Patch sent by: Davide Sangalli --- src/bse/K_IP.F | 4 ++-- src/bse/K_Transition_check.F | 4 +++- src/bse/K_Transitions_setup.F | 2 +- .../K_components_folded_in_serial_arrays.F | 4 +--- src/bse/K_diago_response_functions.F | 2 +- src/bse/PL_diago_residual.F | 21 +++++++++++-------- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 4934c7e307..79bf7c375f 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -202,8 +202,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Note that res_PL is always positive as f_eh_PL>0 ! write (*,*) "iresares", i_res_ares - write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL, i_T_g - f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,1) + write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares), i_T_g + f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) P_weighted(:)=BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1)*PL_weights(:) res_PL=real(dot_product(P_weighted,P_weighted)*f_eh_PL*Z_eh*E_eh) write(*,*) 'P_weighted, f_eh_PL, Z_eh, E_eh', P_weighted, f_eh_PL, Z_eh, E_eh diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 6f74d43e5b..a156332133 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -105,7 +105,9 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& f_h = (spin_occ-Ken%f(iv,ikp,i_sp_v))/spin_occ endif ! - f_eh_PL = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ + if ( E_eh>=0._SP ) f_eh_PL = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ + if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ + write(*,*) "E_eh f_eh f_eh_PL= ",E_eh*27.2116,f_eh, f_eh_PL,f_eh_REF*(-1._SP)**(i_res_ares-1),i_res_ares ! #if defined _RT if(EQ_NoOcc) then diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 28e36e68d6..eaa06b69cb 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -261,7 +261,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) end if ! ! To be fixed - if (l_BS_photolum) BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,1) =f_eh_PL + if (l_BS_photolum) BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares) =f_eh_PL ! BS_T_grp(i_T_group_now)%f_RES(i_T_in_the_grp)=f_eh_RES ! diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 27fe7ad3f1..ed0e40a743 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -123,9 +123,7 @@ subroutine K_components_folded_in_serial_arrays(iq) !write (*,*) 'i_res_ares_solver', i_res_ares_solver write (*,*) 'f_PL', BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) BSS_PL_f(H_pos)=BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) - if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) then - BSS_PL_f(H_pos+BS_K_dim(1))=BS_T_grp(i_g)%f_PL(i_Tr,2) - endif + if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) BSS_PL_f(H_pos+BS_K_dim(1))=BS_T_grp(i_g)%f_PL(i_Tr,2) endif ! if (l_BS_optics) BSS_dipoles_opt(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver) diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index d171190d6a..5c77b9d92b 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -166,7 +166,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if (l_ADD_the_ARES_using_the_RES) then PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi endif - write (*,*) "PL2 here", PL(:,2) + write (*,*) "PL2 here", PL(1:10,2) endif ! enddo diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index b634049b66..e3afde1627 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -31,7 +31,6 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! \sum_k BS_mat(k,i) x conjg( BSS_dipoles(k) ) ! BS_R_left(i) = conjg( BS_R_right(i) ) ! - !shape BS_mat=BS_K_dim(1),BS_K_dim(2) and it's like BS_V_right I think use pars, ONLY:SP,rZERO,cZERO,cI use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset @@ -45,11 +44,11 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! complex(SP),intent(in) :: BS_mat(BS_K_dim(1),BSS_n_eig) real(SP) ,intent(out) :: BS_R_PL(2,BSS_n_eig) - integer :: half_BSS_n_eig ! ! Workspace ! type(PP_indexes) ::px + logical ::compute_ares_explicitly integer ::i_l,i_c,i_K,i_lr,i_ll, ik complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& & R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) @@ -76,7 +75,6 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) write(*,*) "BSS_n_eig", BSS_n_eig !36 write(*,*) "BS_K_dim(1)", BS_K_dim(1) !36 write(*,*) "BS_K_dim(2)", BS_K_dim(2) !36 - half_BSS_n_eig=BSS_n_eig/2. ! ! Hermitian residual !==================== @@ -85,12 +83,12 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! 2=> right ! do i_c=1,3 - do i_K=1,half_BSS_n_eig + do i_K=1,BS_K_dim(1) !BSS_dipoles_PL= dipoles*PL_weights P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f(i_K))) !Pi^* left sqrt(R) enddo enddo -do i_l=1,half_BSS_n_eig +do i_l=1,BSS_n_eig ! if (.not.px%element_1D(i_l)) cycle !parallelization ! @@ -126,26 +124,30 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) do i_c=1,3 - do i_K=half_BSS_n_eig,BS_K_dim(1) + do i_K=1,BS_K_dim(1) P_x_fZ(i_K,i_c,2)=conjg(BSS_dipoles_PL(i_c,i_K)) *sqrt(abs((BSS_eh_f(i_K)))) !antiresonat !Pi^* *sqrt(R) enddo enddo ! +BS_R_PL(2,:)=-BS_R_PL(1,:) ! +compute_ares_explicitly=.false. +if (compute_ares_explicitly) then write(*,*) 'BS_K_dim(1)', BS_K_dim(1) !36 write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) !72 write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) !72 write(*,*) 'shape(BSS_dipoles_PL)', shape(BSS_dipoles_PL) !3 72 !write(*,*) 'BSS_V_right(577,576)', BS_V_right(577,576) -do i_l=half_BSS_n_eig, BS_K_dim(1) +do i_l=1,BSS_n_eig ! if (.not.px%element_1D(i_l)) cycle !parallelization ! ! R_over_R_x_A = R<_j/R_j A^r_ij ! - do ik = half_BSS_n_eig, BS_K_dim(1) - R_over_R_x_A(2,ik) = BSS_PL_f(ik+BS_K_dim(1))*BS_mat(ik,i_l)/abs(BSS_eh_f(ik)) !antiresonant !R Date: Thu, 15 Dec 2022 01:23:38 +0100 Subject: [PATCH 0532/1367] Version 5.1.0, Revision 21792, Hash ad443732c MODIFIED * bse/K_Transition_check.F bse/K_components_folded_in_serial_arrays.F bse/K_diago_hermitian_residuals.F modules/mod_BS_solvers.F Bugs: - [yambo_rt] Fixed use of f_eh_REF Patch sent by: Davide Sangalli --- src/bse/K_Transition_check.F | 19 +++++++++---------- .../K_components_folded_in_serial_arrays.F | 5 ++++- src/bse/K_diago_hermitian_residuals.F | 4 ++-- src/modules/mod_BS_solvers.F | 4 ++++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index a156332133..70ea1d6661 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -44,7 +44,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! Work Space ! integer :: i_sp_v,iv_SOC(2/n_sp_pol),ic_SOC(2/n_sp_pol),pert_range(2/n_sp_pol,2) - real(SP):: Eo_eh,E_v_SOC(2/n_sp_pol),E_c_SOC(2/n_sp_pol),f_eh_REF,f_e,f_h,f_check + real(SP):: Eo_eh,E_v_SOC(2/n_sp_pol),E_c_SOC(2/n_sp_pol),f_eh_REF,f_eh_EQ,f_e,f_h ! K_Transition_check=.TRUE. ! @@ -80,7 +80,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& f_eh_REF =(Ken%f(iv,ikp,i_sp_v)-Ken%f(ic,ik ,i_sp_c))/spin_occ f_eh =f_eh_REF f_eh_RES =f_eh_REF - f_check =f_eh_REF + f_eh_EQ =f_eh_REF ! ! f_eh enter the excitonic Hamiltonian ! f_eh_RES enter the residual of the dielectric constant @@ -88,12 +88,12 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& #if defined _RT if (l_rt_carriers_in_use.and.allocated(Ken%fo)) then ! - if ( EQ_Transitions) f_eh_REF=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ - if (.not.EQ_Transitions) f_eh_REF=(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ - if ( NEQ_Kernel ) f_eh =(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ - if (.not.NEQ_Kernel ) f_eh =(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ - if ( NEQ_Residuals ) f_eh_RES=(Ken%f (iv,ikp,i_sp_v)-Ken%f (ic,ik ,i_sp_c))/spin_occ - if (.not.NEQ_Residuals ) f_eh_RES=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ + f_eh_EQ=(Ken%fo(iv,ikp,i_sp_v)-Ken%fo(ic,ik ,i_sp_c))/spin_occ + ! + if ( EQ_Transitions) f_eh_REF=f_eh_EQ + if (.not.NEQ_Kernel ) f_eh =f_eh_EQ + if (.not.NEQ_Residuals ) f_eh_RES=f_eh_EQ + ! endif #endif ! @@ -107,14 +107,13 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! if ( E_eh>=0._SP ) f_eh_PL = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ - write(*,*) "E_eh f_eh f_eh_PL= ",E_eh*27.2116,f_eh, f_eh_PL,f_eh_REF*(-1._SP)**(i_res_ares-1),i_res_ares ! #if defined _RT if(EQ_NoOcc) then f_eh_REF=1._SP f_eh =1._SP f_eh_RES=1._SP - f_check =1._SP + f_eh_EQ =1._SP f_e =1._SP f_h =1._SP endif diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index ed0e40a743..b05eee11e1 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -31,7 +31,7 @@ subroutine K_components_folded_in_serial_arrays(iq) use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_IND_T_groups,PAR_COM_Xk_ibz_INDEX use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& -& BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_W,BSS_eh_Z,BSS_alloc +& BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& & BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & BS_dip_size,BS_H_dim @@ -114,6 +114,7 @@ subroutine K_components_folded_in_serial_arrays(iq) write (*,*) 'BSS_eh_E(H_pos)', BSS_eh_E(H_pos), ares_fac !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac + BSS_eh_f_RES(H_pos)=BS_T_grp(i_g)%f_RES(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%Z)) BSS_eh_Z(H_pos)=BS_T_grp(i_g)%Z(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%W)) BSS_eh_W(H_pos)=BS_T_grp(i_g)%W(i_Tr)*ares_fac ! @@ -153,6 +154,8 @@ subroutine K_components_folded_in_serial_arrays(iq) call PP_redux_wait(BSS_eh_E,COMM=PAR_COM_eh_INDEX%COMM) call PP_redux_wait(BSS_eh_f,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait(BSS_eh_f,COMM=PAR_COM_eh_INDEX%COMM) + call PP_redux_wait(BSS_eh_f_RES,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait(BSS_eh_f_RES,COMM=PAR_COM_eh_INDEX%COMM) call PP_redux_wait(BSS_eh_table,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait(BSS_eh_table,COMM=PAR_COM_eh_INDEX%COMM) if (allocated(BSS_eh_W)) then diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F index 46882a87b6..6bfc7f4613 100644 --- a/src/bse/K_diago_hermitian_residuals.F +++ b/src/bse/K_diago_hermitian_residuals.F @@ -35,7 +35,7 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use X_m, ONLY:global_gauge - use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f,BS_mat,BSS_n_eig + use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f_RES,BS_mat,BSS_n_eig use BS, ONLY:BS_K_dim ! implicit none @@ -59,7 +59,7 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) BS_R_right=cZERO call live_timing('EPS R residuals',px%n_of_elements(myid+1)) ! - tmp_res = BSS_dipoles_opt(1,i_range(1):i_range(2))*sqrt(cmplx(BSS_eh_f(i_range(1):i_range(2)),kind=SP)) + tmp_res = BSS_dipoles_opt(1,i_range(1):i_range(2))*sqrt(cmplx(BSS_eh_f_RES(i_range(1):i_range(2)),kind=SP)) ! ! DS. Note. Velocity gauge fixing does not work if neq occupations are loaded. Not sure why. if (trim(global_gauge)=="velocity") tmp_res =tmp_res/BSS_eh_E(i_range(1):i_range(2)) diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 15dfb90711..c81ad327a3 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -144,6 +144,7 @@ module BS_solvers real(SP) , allocatable :: BSS_eh_f(:) real(SP) , allocatable :: BSS_eh_W(:) complex(SP), allocatable :: BSS_eh_Z(:) + real(SP) , allocatable :: BSS_eh_f_RES(:) real(SP) , allocatable :: BSS_eh_E_SOC_corr(:,:) complex(SP), allocatable :: BSS_dipoles_opt(:,:) ! @@ -341,6 +342,8 @@ subroutine BSS_alloc( ) YAMBO_ALLOC(BSS_eh_Z,(BS_H_dim)) BSS_eh_Z = cZERO endif + YAMBO_ALLOC(BSS_eh_f_RES,(BS_H_dim)) + BSS_eh_f_RES = rZERO if (E_SOC_is_allocated) then YAMBO_ALLOC(BSS_eh_E_SOC_corr,(2/n_sp_pol,BS_H_dim)) BSS_eh_E_SOC_corr = rZERO @@ -354,6 +357,7 @@ subroutine BSS_free() YAMBO_FREE(BSS_eh_W) YAMBO_FREE(BSS_eh_f) YAMBO_FREE(BSS_eh_Z) + YAMBO_FREE(BSS_eh_f_RES) YAMBO_FREE(BSS_eh_E_SOC_corr) end subroutine ! From 5809b52ccbfb6e73b8567d9065ee7505b2fff8ef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 15 Dec 2022 02:00:10 +0100 Subject: [PATCH 0533/1367] Version 5.1.0, Revision 21793, Hash bc5f246b7 MODIFIED * bse/K_Transition_check.F bse/PL_diago_residual.F Changes: - [yambo] Working on PL Patch sent by: Davide Sangalli --- src/bse/K_Transition_check.F | 4 ++-- src/bse/PL_diago_residual.F | 27 +++++++++++++-------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 70ea1d6661..69b758d2bc 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -130,8 +130,8 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! However they contribute to the JDOS. We need to take only the E>0 component, ! since the E<0 component is then accounted for by the anti-resonant part if ( f_eh_REF==0._SP .and. E_eh*(-1._SP)**(i_res_ares-1)<0._SP ) K_Transition_check=.FALSE. - ! f_eh=0 transitions give issue in PL. Removed in this case - if (l_BS_photolum .and. f_eh_REF==0._SP) K_Transition_check=.FALSE. + ! f_eh_RES=0 transitions give issue in PL. Removed in this case + if (l_BS_photolum .and. f_eh_RES==0._SP) K_Transition_check=.FALSE. ! #if defined _RT ! diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index e3afde1627..9943c1a91d 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -37,7 +37,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use BS, ONLY:BS_H_dim,BS_K_dim - use BS_solvers, ONLY:BSS_eh_f,BSS_n_eig + use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f ! implicit none @@ -85,7 +85,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) do i_c=1,3 do i_K=1,BS_K_dim(1) !BSS_dipoles_PL= dipoles*PL_weights - P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f(i_K))) !Pi^* left sqrt(R) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) enddo enddo do i_l=1,BSS_n_eig @@ -95,7 +95,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! R_over_R_x_A = R<_j/R_j A^r_ij ! do ik = 1, BS_K_dim(1) - R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f(ik) !resonant R Date: Thu, 15 Dec 2022 09:13:28 +0100 Subject: [PATCH 0534/1367] Version 5.1.0, Revision 21794, Hash 5809b52cc MODIFIED * bse/K_IP.F bse/K_components_folded_in_serial_arrays.F bse/K_observables.F bse/PL_diago_residual.F modules/SET_defaults.F modules/mod_PHOTOLUM.F Bugs: - [yambo] Added barrier, trace cannot be done beyond IP for now Changes: - [yambo] Working on PL. Trace is not anymore on by default. Patch sent by: Davide Sangalli --- src/bse/K_IP.F | 9 +++++++-- src/bse/K_components_folded_in_serial_arrays.F | 2 +- src/bse/K_observables.F | 5 ++++- src/bse/PL_diago_residual.F | 11 ++++++----- src/modules/SET_defaults.F | 2 +- src/modules/mod_PHOTOLUM.F | 9 +++++---- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index e2522b6a40..fac663524b 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -204,8 +204,13 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) write (*,*) "iresares", i_res_ares write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares), i_T_g f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) - P_weighted(:)=BS_T_grp(i_T_g)%dipoles_opt(:,i_T,1)*PL_weights(:) - res_PL=real(dot_product(P_weighted,P_weighted)*f_eh_PL*Z_eh*E_eh) + res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*PL_weights(1))**2 + if(l_BS_trace) then + do i_dip=2,BS_dip_size + res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*PL_weights(i_dip))**2 + enddo + res_PL=res_PL*f_eh_PL*Z_eh*E_eh + endif write(*,*) 'P_weighted', P_weighted write(*,*) 'E_eh', E_eh write(*,*) 'f_eh_PL', f_eh_PL diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index b05eee11e1..4bc159caf9 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -133,7 +133,7 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_c,i_res_ares_solver) ! - if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:) + if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:BS_dip_size) ! enddo ! diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 5c1128964f..3e3a1f7527 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -26,6 +26,7 @@ subroutine K_observables( ) #if defined _SLEPC && !defined _NL use BS_solvers, ONLY:run_Slepc #endif + use drivers, ONLY:l_rpa_IP use X_m, ONLY:global_gauge use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,BSS_mode use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& @@ -70,11 +71,13 @@ subroutine K_observables( ) l_BS_abs=.TRUE. endif if (l_BS_photolum) then - l_BS_trace = .true. + !l_BS_trace = .true. global_gauge="velocity" endif if (l_BS_trace ) BS_dip_size = 3 ! + if (l_BS_trace .and. .not.l_rpa_IP) call error(" trace coded only at the IP level") + ! l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum ! ! Solver Logicals diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 9943c1a91d..e782c70689 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -36,7 +36,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing - use BS, ONLY:BS_H_dim,BS_K_dim + use BS, ONLY:BS_H_dim,BS_K_dim,BS_dip_size use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f ! @@ -82,7 +82,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! 1=> left ! 2=> right ! - do i_c=1,3 + do i_c=1,BS_dip_size do i_K=1,BS_K_dim(1) !BSS_dipoles_PL= dipoles*PL_weights P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) @@ -105,7 +105,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) R_over_R_x_A(1,1:BS_K_dim(1))) !resonant this is dipoles_PL*BS_mat*fermifactors= sum_k !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not !Al*R ! @@ -52,15 +52,16 @@ subroutine PL_init( ) use BS_solvers, ONLY:BSS_n_freqs PL_prefactor =32._SP*pi**3*SPEED_OF_LIGHT*2._SP/3._SP*RL_vol/nqbz/(2._SP*pi)**3 if (allocated(PL)) return - PL_weights=PL_weights/v_norm(PL_weights) + if ( l_BS_trace) PL_weights=PL_weights/v_norm(PL_weights) + if (.not.l_BS_trace) PL_weights=(/1._SP,0._SP,0._SP/) end subroutine ! subroutine BSS_PL_alloc( ) use pars, ONLY:cZERO,rZERO - use BS, ONLY:BS_H_dim,BS_K_dim + use BS, ONLY:BS_H_dim,BS_K_dim,BS_dip_size integer :: f_PL_dim if (.not.l_BS_photolum) return - YAMBO_ALLOC(BSS_dipoles_PL,(3,BS_H_dim)) + YAMBO_ALLOC(BSS_dipoles_PL,(BS_dip_size,BS_H_dim)) BSS_dipoles_PL = cZERO f_PL_dim=BS_H_dim if(BS_H_dim==BS_K_dim(1)) f_PL_dim=2*BS_K_dim(1) From 9f27078fbc493cf8b9aaab45ce526489c5d3c1d4 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 15 Dec 2022 10:37:21 +0100 Subject: [PATCH 0535/1367] track new files after merge with develop --- src/bse/SC_project.dep | 6 ++++++ src/driver/SC_project.dep | 2 ++ src/io_serial/SC_project.dep | 2 ++ src/linear_algebra/SC_project.dep | 2 ++ src/matrices/SC_project.dep | 2 ++ src/real_time_drivers/ELPH_project.dep | 2 ++ 6 files changed, 16 insertions(+) create mode 100644 src/bse/SC_project.dep create mode 100644 src/driver/SC_project.dep create mode 100644 src/io_serial/SC_project.dep create mode 100644 src/linear_algebra/SC_project.dep create mode 100644 src/matrices/SC_project.dep create mode 100644 src/real_time_drivers/ELPH_project.dep diff --git a/src/bse/SC_project.dep b/src/bse/SC_project.dep new file mode 100644 index 0000000000..30d039b87a --- /dev/null +++ b/src/bse/SC_project.dep @@ -0,0 +1,6 @@ + EPS_via_perturbative_inversion.o + K_diago_driver.o + K_inversion_driver.o + K_inversion_engine.o + PL_via_perturbative_inversion.o + diff --git a/src/driver/SC_project.dep b/src/driver/SC_project.dep new file mode 100644 index 0000000000..a3379bb643 --- /dev/null +++ b/src/driver/SC_project.dep @@ -0,0 +1,2 @@ + options_control.o + diff --git a/src/io_serial/SC_project.dep b/src/io_serial/SC_project.dep new file mode 100644 index 0000000000..3e6252f7ef --- /dev/null +++ b/src/io_serial/SC_project.dep @@ -0,0 +1,2 @@ + io_DIPOLES.o + diff --git a/src/linear_algebra/SC_project.dep b/src/linear_algebra/SC_project.dep new file mode 100644 index 0000000000..5310098e74 --- /dev/null +++ b/src/linear_algebra/SC_project.dep @@ -0,0 +1,2 @@ + LINEAR_ALGEBRA_driver.o + diff --git a/src/matrices/SC_project.dep b/src/matrices/SC_project.dep new file mode 100644 index 0000000000..cb0ee78d1d --- /dev/null +++ b/src/matrices/SC_project.dep @@ -0,0 +1,2 @@ + MATRIX_init.o + diff --git a/src/real_time_drivers/ELPH_project.dep b/src/real_time_drivers/ELPH_project.dep new file mode 100644 index 0000000000..e3d1b42bc9 --- /dev/null +++ b/src/real_time_drivers/ELPH_project.dep @@ -0,0 +1,2 @@ + RT_relaxation.o + From 7e8d5e2ca3377cd6a4a45f4ee1e18e4c18a4008e Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 15 Dec 2022 15:29:32 +0100 Subject: [PATCH 0536/1367] Split res-ares part for IP and PL_diago_residual --- src/bse/K_IP.F | 17 ++++++++++++----- src/bse/PL_diago_residual.F | 4 ++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index fac663524b..79fc4b5dbc 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -61,7 +61,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Work space ! integer ::iv,ic,i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR,i_dip - real(SP) ::f_eh,f_eh_PL,res_PL + real(SP) ::f_eh,f_eh_PL,res_PL,ares_PL logical ::dip_v,dip_r complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),& & para_term_w0,diam_term_used,Z_eh,E_eh @@ -201,13 +201,20 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Note that res_PL is always positive as f_eh_PL>0 ! + ! R< = fc(1-fv) + ! R> = fv(1-fc) + ! R_ares = fv-fc + ! R_res = fc-fv + ! R> = fv - fv*fc = fv + fc - fc - fv*fc = fv - fc + R< = R_ares + R< = -R_res + R< write (*,*) "iresares", i_res_ares write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares), i_T_g f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) - res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*PL_weights(1))**2 + res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*PL_weights(1))**2*BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) !was missing R< + ares_PL= -res_PL + BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) if(l_BS_trace) then do i_dip=2,BS_dip_size - res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*PL_weights(i_dip))**2 + res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*PL_weights(i_dip))**2*BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) ! was missing only R< + ares_PL= -res_PL + BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) enddo res_PL=res_PL*f_eh_PL*Z_eh*E_eh endif @@ -299,9 +306,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_photolum) then write(*,*)'l_BS_ares_from_res', l_BS_ares_from_res, BS_K_anti_resonant - PL(:,3)=PL(:,3) +PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi + PL(:,3)=PL(:,3) + PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - PL(:,3)=PL(:,3)-PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi + PL(:,3)=PL(:,3) - PL_prefactor*ares_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif write (*,*) 'PL(:3) here', PL(:,3) write (*,*) 'res_PL here', res_PL diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index e782c70689..bf72aed507 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -122,9 +122,9 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! enddo ! -BS_R_PL(2,:)=-BS_R_PL(1,:) +!BS_R_PL(2,:)=-BS_R_PL(1,:) We disagree with this relationship ! -compute_ares_explicitly=.false. +compute_ares_explicitly=.true. if (compute_ares_explicitly) then ! do i_c=1,BS_dip_size From 9c10455ef3cd87648e86c3edf3a1cc7602dde75c Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 15 Dec 2022 16:39:35 +0100 Subject: [PATCH 0537/1367] WIP: introduce ares_PL for antiresonant part --- lib/archive/Ydriver-src/.gitignore | 60 + lib/archive/Ydriver-src/bin/.empty | 0 .../Ydriver-src/config/acx_fortran_flags.m4 | 395 ++ lib/archive/Ydriver-src/config/acx_fpp.m4 | 99 + lib/archive/Ydriver-src/config/acx_misc.m4 | 196 + lib/archive/Ydriver-src/config/config.guess | 1667 +++++ lib/archive/Ydriver-src/config/config.sub | 1793 +++++ lib/archive/Ydriver-src/config/configure.ac | 90 + lib/archive/Ydriver-src/config/defs.mk.in | 31 + lib/archive/Ydriver-src/config/install.sh | 1 + lib/archive/Ydriver-src/config/version.m4 | 6 + lib/archive/Ydriver-src/configure | 5825 +++++++++++++++++ .../example/include/example_driver.h | 24 + .../example/include/fortran_driver.h | 38 + .../Ydriver-src/example/include/tool.h | 28 + .../Ydriver-src/example/include/version.h.in | 30 + lib/archive/Ydriver-src/example/main.F | 63 + .../Ydriver-src/example/options/.empty | 0 lib/archive/Ydriver-src/include/.empty | 0 lib/archive/Ydriver-src/include/driver.h | 37 + .../Ydriver-src/include/fortran_arguments.h | 27 + lib/archive/Ydriver-src/include/kind.h | 73 + lib/archive/Ydriver-src/include/wrapper.h | 39 + lib/archive/Ydriver-src/lib/.empty | 0 lib/archive/Ydriver-src/src/driver/driver.c | 78 + .../Ydriver-src/src/interface/.objects | 2 + .../src/interface/C_driver_transfer.F | 43 + .../Ydriver-src/src/interface/get_libraries.c | 87 + .../Ydriver-src/src/interface/get_runlevel.c | 48 + .../src/interface/get_running_project.c | 53 + .../src/interface/get_running_tool.c | 48 + .../Ydriver-src/src/interface/get_version.c | 54 + .../Ydriver-src/src/interface/mod_C_driver.F | 68 + lib/archive/Ydriver-src/src/main/.objects | 1 + .../Ydriver-src/src/main/command_line.c | 179 + lib/archive/Ydriver-src/src/main/input_file.c | 57 + lib/archive/Ydriver-src/src/main/launcher.c | 160 + .../Ydriver-src/src/main/load_environments.c | 85 + .../Ydriver-src/src/main/options_maker.c | 92 + lib/archive/Ydriver-src/src/main/title.c | 49 + lib/archive/Ydriver-src/src/main/tool_init.c | 101 + lib/archive/Ydriver-src/src/main/usage.c | 149 + lib/archive/Ydriver-src/src/main/use_me.c | 44 + lib/archive/Ydriver-src/src/main/winsize.c | 47 + lib/archive/Ydriver-src/src/options/.objects | 1 + .../Ydriver-src/src/options/options_help.c | 47 + src/bse/DOUBLE_project.dep | 1 + src/bse/K_IP.F | 11 +- src/bse/PL_diago_residual.F | 16 +- 49 files changed, 12032 insertions(+), 11 deletions(-) create mode 100644 lib/archive/Ydriver-src/.gitignore create mode 100644 lib/archive/Ydriver-src/bin/.empty create mode 100644 lib/archive/Ydriver-src/config/acx_fortran_flags.m4 create mode 100644 lib/archive/Ydriver-src/config/acx_fpp.m4 create mode 100644 lib/archive/Ydriver-src/config/acx_misc.m4 create mode 100755 lib/archive/Ydriver-src/config/config.guess create mode 100755 lib/archive/Ydriver-src/config/config.sub create mode 100644 lib/archive/Ydriver-src/config/configure.ac create mode 100644 lib/archive/Ydriver-src/config/defs.mk.in create mode 100755 lib/archive/Ydriver-src/config/install.sh create mode 100644 lib/archive/Ydriver-src/config/version.m4 create mode 100755 lib/archive/Ydriver-src/configure create mode 100644 lib/archive/Ydriver-src/example/include/example_driver.h create mode 100644 lib/archive/Ydriver-src/example/include/fortran_driver.h create mode 100644 lib/archive/Ydriver-src/example/include/tool.h create mode 100644 lib/archive/Ydriver-src/example/include/version.h.in create mode 100644 lib/archive/Ydriver-src/example/main.F create mode 100644 lib/archive/Ydriver-src/example/options/.empty create mode 100644 lib/archive/Ydriver-src/include/.empty create mode 100644 lib/archive/Ydriver-src/include/driver.h create mode 100644 lib/archive/Ydriver-src/include/fortran_arguments.h create mode 100644 lib/archive/Ydriver-src/include/kind.h create mode 100644 lib/archive/Ydriver-src/include/wrapper.h create mode 100644 lib/archive/Ydriver-src/lib/.empty create mode 100644 lib/archive/Ydriver-src/src/driver/driver.c create mode 100644 lib/archive/Ydriver-src/src/interface/.objects create mode 100644 lib/archive/Ydriver-src/src/interface/C_driver_transfer.F create mode 100644 lib/archive/Ydriver-src/src/interface/get_libraries.c create mode 100644 lib/archive/Ydriver-src/src/interface/get_runlevel.c create mode 100644 lib/archive/Ydriver-src/src/interface/get_running_project.c create mode 100644 lib/archive/Ydriver-src/src/interface/get_running_tool.c create mode 100644 lib/archive/Ydriver-src/src/interface/get_version.c create mode 100644 lib/archive/Ydriver-src/src/interface/mod_C_driver.F create mode 100644 lib/archive/Ydriver-src/src/main/.objects create mode 100644 lib/archive/Ydriver-src/src/main/command_line.c create mode 100644 lib/archive/Ydriver-src/src/main/input_file.c create mode 100644 lib/archive/Ydriver-src/src/main/launcher.c create mode 100644 lib/archive/Ydriver-src/src/main/load_environments.c create mode 100644 lib/archive/Ydriver-src/src/main/options_maker.c create mode 100644 lib/archive/Ydriver-src/src/main/title.c create mode 100644 lib/archive/Ydriver-src/src/main/tool_init.c create mode 100644 lib/archive/Ydriver-src/src/main/usage.c create mode 100644 lib/archive/Ydriver-src/src/main/use_me.c create mode 100644 lib/archive/Ydriver-src/src/main/winsize.c create mode 100644 lib/archive/Ydriver-src/src/options/.objects create mode 100644 lib/archive/Ydriver-src/src/options/options_help.c diff --git a/lib/archive/Ydriver-src/.gitignore b/lib/archive/Ydriver-src/.gitignore new file mode 100644 index 0000000000..ed4e5f15e9 --- /dev/null +++ b/lib/archive/Ydriver-src/.gitignore @@ -0,0 +1,60 @@ +# Compiled source # +################### +*.com +*.class +*.dll +*.o +*.a +*.so +*.mod +modfiles.list +*.dep +*.f90 +*.s +*.sw* +*dSYM +*bk + + +# source # +########## +.check_configure +config/mk/defs.mk +*__lock* +Makefile.locks +Makefile.archive +*Makefile +make.dep +commit.msg + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db +myconfig* +nohup.out +autom4te.cache diff --git a/lib/archive/Ydriver-src/bin/.empty b/lib/archive/Ydriver-src/bin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/archive/Ydriver-src/config/acx_fortran_flags.m4 b/lib/archive/Ydriver-src/config/acx_fortran_flags.m4 new file mode 100644 index 0000000000..4ff16f7c46 --- /dev/null +++ b/lib/archive/Ydriver-src/config/acx_fortran_flags.m4 @@ -0,0 +1,395 @@ +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# # +################################################ +# Set FC FLAGS +# ---------------------------------- +AC_DEFUN([ACX_FCSETUP], +[ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_ARG_VAR(UFLAGS,[Unoptimized Fortran flags]) +# +if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi +# +AC_ARG_ENABLE(debug-flags, AC_HELP_STRING([--enable-debug-flags], + [Debug flags are set for compilation. Default is no.])) +if test x"$enable_debug_flags" = "x"; then enable_debug_flags="no"; fi +# +def_compiler= +# +case "${host}" in +i?86*linux*) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + #FUFLAGS="-O0 -g -Mbackslash" + FUFLAGS="-O0 -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_PGI" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *abf90*) + SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" + ;; + *ifc*) + SYSFLAGS="-O3 -g -w -tpp7" + FUFLAGS="-O0 -w -tpp7" + FCMFLAG="" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="" + ;; + *g95*) + SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore -mtune=pentium4" + FUFLAGS="-g -O0 -fbackslash -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *ifort*) + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + CPU_FLAG="" + case "${INTELVERSION}" in + *11* | *12* | *13* |*14* | *15* | *16* ) + CPU_FLAG="-xHost" + #CPU_FLAG=" " + ;; + *17* | *18* | *19*) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + ;; + *10*) + CPU_FLAG="-xW" + ;; + *) + CPU_FLAG=" " + ;; + esac + SYSFLAGS="-assume bscc -O3 -g -ip $CPU_FLAG" + FUFLAGS="-assume bscc -O0 $CPU_FLAG" + FCMFLAG="-nofor_main" + DEBUG_FLAGS="-check all -CB -traceback -check bound" + ;; + *pathf9*) + SYSFLAGS="-O2 -g -fno-second-underscore" + FUFLAGS="-O0 -g -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-ffortran-bounds-check -C" + ;; + *) + SYSFLAGS="-O -g" + FUFLAGS="-O0 -g" + OMPFLAGS="-openmp" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +*86*apple* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -g -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *g95*) + SYSFLAGS="-O3 -g -fno-second-underscore -mtune=pentium4" + FUFLAGS="-O0 -g -fno-second-underscore" + FCMFLAG="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *ifort*) + CPU_FLAG="" + case "${INTELVERSION}" in + *1*) + CPU_FLAG="-mtune=pentium4" + ;; + *) + CPU_FLAG="-mtune=pentium4" + ;; + esac + SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" + FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" + FCMFLAG="-nofor_main" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-check all -CB -traceback -check bound" + ;; + *) + SYSFLAGS="-O -g" + FUFLAGS="-O -g0" + OMPFLAGS="-openmp" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +ia64*linux* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_PGI" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -g -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *g95*) + SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" + FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" + FCMFLAG="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *abf90*) + SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" + ;; + *ifc*) + SYSFLAGS="-O3 -g -w" + FUFLAGS="-O0 -g -w" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="" + ;; + *ifort*) + CPU_FLAG="" + case "${INTELVERSION}" in + *1*) + CPU_FLAG="-mtune=itanium" + ;; + *) + CPU_FLAG="" + ;; + esac + SYSFLAGS="-assume bscc -O2 -g -ip ${CPU_FLAG}" + FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" + FCMFLAG="-nofor_main" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-check all -CB -traceback -check bound" + ;; + *openf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + ;; + *pathf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-ffortran-bounds-check -C" + ;; + *) + SYSFLAGS="-g -O" + FUFLAGS="-O0" + OMPFLAGS="-openmp" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +*x86*64* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_PGI" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -g -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *g95*) + SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" + FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" + FCMFLAG="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *abf90*) + SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" + ;; + *ifc*) + SYSFLAGS="-O3 -g -w -tpp2" + FUFLAGS="-O0 -g -w -tpp2" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + ;; + *ifort*) + OMPFLAGS="-openmp" + CPU_FLAG="" + case "${INTELVERSION}" in + *11* | *12* | *13* |*14* |*15* | *16* ) + #CPU_FLAG="-xHost" + CPU_FLAG=" " + ;; + *17* | *18* | *19*) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + ;; + *10*) + CPU_FLAG="-xW" + ;; + *) + CPU_FLAG=" " + ;; + esac + SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" + FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" + FCMFLAG="-nofor_main" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-CB -traceback" + ;; + *openf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + ;; + *pathf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-ffortran-bounds-check -C" + ;; + *) + SYSFLAGS="-g -O" + FUFLAGS="-O0" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +alphaev*) + SYSFLAGS="-O3 -arch host -tune host" + FUFLAGS="-O0" + FCMFLAG="-nofor_main" + ;; +powerpc64*linux* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_PGI" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *) + CFLAGS="-q64 -O2 -g" + SYSFLAGS="-q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970" + FUFLAGS="-q64 -O0 -g" + OMPFLAGS="" + def_compiler="-D_XLF" + esac + ;; +powerpc-ibm* ) + CFLAGS="-O -q64" + SYSFLAGS="-O3 -g -q64 -qstrict -qarch=auto -qtune=auto -qmaxmem=-1" + FUFLAGS="-q64" + OMPFLAGS="-qthreaded" + def_compiler="-D_XLF" + ;; +mips-sgi-irix*) + SYSFLAGS="-O3 -r10000 -mips4" + ;; +*) + SYSFLAGS="-O" +esac +# +if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi +# +AC_MSG_CHECKING([for specific $FC flags]) +if test -z "${FCFLAGS}"; then + FCFLAGS="$SYSFLAGS" + AC_MSG_RESULT([$FCFLAGS]) +else + AC_MSG_RESULT([(User-defined) $FCFLAGS]) +fi +AC_MSG_CHECKING([for specific Open-MP flags]) +AC_MSG_RESULT([$OMPFLAGS]) +# +AC_MSG_CHECKING([for specific $CC flags]) +AC_MSG_RESULT([$CFLAGS]) + +AC_MSG_CHECKING([for specific unoptimized flags]) +if test -z "${UFLAGS}"; then + FCUFLAGS="$FUFLAGS" + AC_MSG_RESULT([$FCUFLAGS]) +else + AC_MSG_RESULT([(User-defined) $UFLAGS]) + FCUFLAGS="$UFLAGS" + FUFLAGS="$UFLAGS" +fi +# +if test x"$enable_debug_flags" = "xyes"; then + FCFLAGS="$DEBUG_FLAGS" + FCUFLAGS="$DEBUG_FLAGS" +fi +# +AC_MSG_CHECKING([for specific NETCDF flags]) +AC_MSG_RESULT([$NETCDFFLAGS]) +# +AC_SUBST(CFLAGS) +AC_SUBST(FCFLAGS) +AC_SUBST(FCUFLAGS) +AC_SUBST(FUFLAGS) +AC_SUBST(FCMFLAG) +AC_SUBST(OMPFLAGS) +AC_SUBST(NETCDFFLAGS) +AC_SUBST(DEBUG_FLAGS) +AC_SUBST(def_compiler) +]) +# diff --git a/lib/archive/Ydriver-src/config/acx_fpp.m4 b/lib/archive/Ydriver-src/config/acx_fpp.m4 new file mode 100644 index 0000000000..99bbc30011 --- /dev/null +++ b/lib/archive/Ydriver-src/config/acx_fpp.m4 @@ -0,0 +1,99 @@ +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +AC_DEFUN([ACX_FPP], +[ +# +AC_ARG_VAR(FPP,Fortran preprocessor) +# +case "${FC}" in + # + # does not work properly + # + *ifort*) + if test -z "$FPP"; then FPP="fpp -free -P"; fi + ;; + *gfortran | *g95) + if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi + ;; + # + # some of the following could be uncommented once explicitly checked + # + #*sunf95) + # if test -z "$FPP"; then FPP="${FC} -E -P -fpp"; fi + # ;; + #*openf95) + # if test -z "$FPP"; then FPP="${FC} -E -P -ftpp"; fi + # ;; + #*pathf*) + # if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi + # ;; +esac +# +if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi +# +AC_MSG_NOTICE([testing FC-preprocessor $FPP]) +# +# TESTS +#======= +# +# Fortran Source +# +acx_FC_ok=yes +FPP_TESTS_PASSED=yes +AC_MSG_CHECKING([if FC precompiler works on FC source]) +cat > conftest.F << EOF_ + program conftest + character (1) :: a + a="a" + write (*,'('//a//')') 'hello' + end program +EOF_ +# ! Replace "S" with "\" and find the max length of +(eval $FPP conftest.F > conftest.${FCSUFFIX}) 2> conftest.er1 +if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" || + test -n "`grep "warning" conftest.er1`" || + test -n "`grep "command line remark" conftest.er1`" ; then + eval $FPP conftest.F > conftest.${FCSUFFIX} + eval $FC $FCFLAGS -c conftest.${FCSUFFIX} 2> conftest.er2 >&5 + if test -s conftest.er2 ; then + if ! ( test -n "`grep successful conftest.er2`" || + test -n "`grep "warning" conftest.er2`" || + test -n "`grep "command line remark" conftest.er2`" ) ; then + acx_FC_ok=no ; + FPP_TESTS_PASSED=no; + fi + fi +else + acx_FC_ok=no ; + FPP_TESTS_PASSED=no +fi +AC_MSG_RESULT([$acx_FC_ok]) +# +if test "x$FPP_TESTS_PASSED" = xno ; then + AC_MSG_ERROR(Found FC precompiler problems in processing FC source.); +fi +# +AC_SUBST(FPP) +# +]) diff --git a/lib/archive/Ydriver-src/config/acx_misc.m4 b/lib/archive/Ydriver-src/config/acx_misc.m4 new file mode 100644 index 0000000000..79f93319d2 --- /dev/null +++ b/lib/archive/Ydriver-src/config/acx_misc.m4 @@ -0,0 +1,196 @@ +# +# Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +################################################ +# Check size of a pointer +# ---------------------------------- +AC_DEFUN([ACX_POINTER_SIZE], +[AC_MSG_CHECKING([for the size of a pointer]) + AC_REQUIRE([AC_PROG_CC]) + if test -z "$POINTER_SIZE"; then + cat >pointertest.c < +void main() +{ + printf("%ld", sizeof(void *)); +} +EOF + ac_try='$CC $CFLAGS -o pointertest.x pointertest.c 1>&AC_FD_CC' + if AC_TRY_EVAL(ac_try); then + ac_try="" + else + echo "configure: failed program was:" >&AC_FD_CC + cat pointertest.c >&AC_FD_CC + rm -rf pointertest* + AC_MSG_ERROR(failed to compile c program to find the size of a pointer) + fi + ac_pointersize=`./pointertest.x`; + rm -rf pointertest* + AC_DEFINE_UNQUOTED(POINTER_SIZE, ${ac_pointersize}, [The size of a C pointer]) + AC_MSG_RESULT([${ac_pointersize} bytes]) +fi +]) +################################################ +# AC_LANG_FUNC_LINK_TRY(Fortran)(FUNCTION) +# ---------------------------------- +m4_define([AC_LANG_FUNC_LINK_TRY(Fortran)], +[AC_LANG_PROGRAM([], [call [$1]])]) + +################################################ +# Set various default FLAGS +# ---------------------------------- +AC_DEFUN([ACX_WIDESETUP], +[ +AC_REQUIRE([AC_CANONICAL_HOST]) + +AC_MSG_CHECKING([if the current OS is supported]) +#TIMER="ct_cclock.o" +TIMER="ct_cptimer.o" +case "${host}" in + i?86*linux* | ia64*linux* | *x86*64* | *86*cygwin ) + build_os="linux" + #TIMER="ct_etime.o" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + *86*apple* ) + build_os="apple" + #TIMER="ct_etime.o" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + powerpc64*linux* ) + build_os="linux" + #TIMER="ct_etime.o" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + powerpc-ibm* ) + build_os="aix" + save=$AR_FLAGS + AR_FLAGS="$save -X32_64" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + mips-sgi-irix*) + build_os="irix" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + alphaev*) + build_os="tru64" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + *) + AC_MSG_RESULT([no]) + AC_MSG_NOTICE(Platform <${host}> is not supported.) + AC_MSG_NOTICE(Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT) + AC_MSG_NOTICE(providing either a list of compilers and options or) + AC_MSG_NOTICE(a guest account on this machine.) + AC_MSG_ERROR(stopping) + ;; + *) +esac +AC_MSG_RESULT([yes]) + +AC_MSG_NOTICE([WIDESETUP: using build_os="$build_os"]) +AC_MSG_NOTICE([WIDESETUP: using F90SUFFIX="$F90SUFFIX"]) +AC_MSG_NOTICE([WIDESETUP: using AR="$AR"]) +AC_MSG_NOTICE([WIDESETUP: using AR_FLAGS="$AR_FLAGS"]) +AC_SUBST(F90SUFFIX) +AC_SUBST(TIMER) +AC_SUBST(AR) +AC_SUBST(AR_FLAGS) +]) + + +################################################ +# Get External C routines naming scheme +# ---------------------------------- +AC_DEFUN([ACX_EXTUS], +[ +c_success=no +msg="unknown" +AC_LANG_PUSH(C) +AC_COMPILE_IFELSE( +[AC_LANG_SOURCE(#define F90_FUNC(name,NAME) name ## _ + #define F90_FUNC_(name,NAME) name ## _ + void F90_FUNC_(ftest, FTEST)(){})],[ + mv conftest.$ac_objext ftest.$ac_objext + AC_LANG_PUSH(Fortran) + save="$LIBS" + LIBS="ftest.$ac_objext" + AC_LINK_IFELSE([AC_LANG_CALL([], [ftest])], + [c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US"]) + LIBS="$save" + AC_LANG_POP(Fortran) + rm -f ftest.$ac_objext],[]) +if test "$c_success" = "no" ; then + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE(#define F90_FUNC(name,NAME) name + #define F90_FUNC_(name,NAME) name + void F90_FUNC_(ftest, FTEST)(){})],[ + mv conftest.$ac_objext ftest.$ac_objext + AC_LANG_PUSH(Fortran) + save="$LIBS" + LIBS="ftest.$ac_objext" + AC_LINK_IFELSE([AC_LANG_CALL([], [ftest])], + [c_success="yes"; msg="test"]) + LIBS="$save" + AC_LANG_POP(Fortran) + rm -f ftest.$ac_objext],[]) +fi +AC_MSG_CHECKING([for external C routine (test) naming scheme]) +AC_MSG_RESULT([$msg]) + +AC_FC_WRAPPERS +f_success="no" +case $ac_cv_fc_mangling in + "lower case, underscore, no extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; + "lower case, underscore, extra underscore") + f_success="no" ;; + "lower case, no underscore, no extra underscore") + f_success="yes";; + "lower case, no underscore, extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; + "upper case, underscore, no extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; + "upper case, underscore, extra underscore") + f_success="no" ;; + "upper case, no underscore, no extra underscore") + f_success="yes";; + "upper case, no underscore, extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; +esac +AC_LANG_POP(C) +if test "$c_success" = "no" || test "$f_success" = "no" ; then + AC_MSG_ERROR(unknown Fortran <-> C subroutines name conventions) +fi + +]) diff --git a/lib/archive/Ydriver-src/config/config.guess b/lib/archive/Ydriver-src/config/config.guess new file mode 100755 index 0000000000..45001cfecd --- /dev/null +++ b/lib/archive/Ydriver-src/config/config.guess @@ -0,0 +1,1667 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2020 Free Software Foundation, Inc. + +timestamp='2020-01-01' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2020 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + set_cc_for_build + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "$UNAME_VERSION" in + Debian*) + release='-gnu' + ;; + *) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "$machine-${os}${release}${abi-}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + exit ;; + *:ekkoBSD:*:*) + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + exit ;; + *:SolidBSD:*:*) + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:MirBSD:*:*) + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo "$UNAME_MACHINE"-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix"$UNAME_RELEASE" + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux"$UNAME_RELEASE" + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos"$UNAME_RELEASE" + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos"$UNAME_RELEASE" + ;; + sun4) + echo sparc-sun-sunos"$UNAME_RELEASE" + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos"$UNAME_RELEASE" + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint"$UNAME_RELEASE" + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint"$UNAME_RELEASE" + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint"$UNAME_RELEASE" + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint"$UNAME_RELEASE" + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten"$UNAME_RELEASE" + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten"$UNAME_RELEASE" + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix"$UNAME_RELEASE" + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix"$UNAME_RELEASE" + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix"$UNAME_RELEASE" + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos"$UNAME_RELEASE" + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + then + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] + then + echo m88k-dg-dgux"$UNAME_RELEASE" + else + echo m88k-dg-dguxbcs"$UNAME_RELEASE" + fi + else + echo i586-dg-dgux"$UNAME_RELEASE" + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + fi + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ "$HP_ARCH" = hppa2.0w ] + then + set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" + exit ;; + 3050*:HI-UX:*:*) + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo "$UNAME_MACHINE"-unknown-osf1mk + else + echo "$UNAME_MACHINE"-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi"$UNAME_RELEASE" + exit ;; + *:BSD/OS:*:*) + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case "$UNAME_PROCESSOR" in + amd64) + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; + esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + i*:CYGWIN*:*) + echo "$UNAME_MACHINE"-pc-cygwin + exit ;; + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 + exit ;; + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 + exit ;; + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys + exit ;; + i*:PW*:*) + echo "$UNAME_MACHINE"-pc-pw32 + exit ;; + *:Interix*:*) + case "$UNAME_MACHINE" in + x86) + echo i586-pc-interix"$UNAME_RELEASE" + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix"$UNAME_RELEASE" + exit ;; + IA64) + echo ia64-unknown-interix"$UNAME_RELEASE" + exit ;; + esac ;; + i*:UWIN*:*) + echo "$UNAME_MACHINE"-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-pc-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + exit ;; + *:GNU:*:*) + # the GNU system + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + exit ;; + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix + exit ;; + aarch64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arm*:Linux:*:*) + set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + else + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + cris:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + crisv32:Linux:*:*) + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + frv:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + hexagon:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + ia64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m32r*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + m68*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 + sed 's/^ //' << EOF > "$dummy.c" + #undef CPU + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + MIPS_ENDIAN=el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + MIPS_ENDIAN= + #else + MIPS_ENDIAN= + #endif + #endif +EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } + ;; + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-"$LIBC" + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-"$LIBC" + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-"$LIBC" + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + exit ;; + sh64*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sh*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + tile*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + vax:Linux:*:*) + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + exit ;; + x86_64:Linux:*:*) + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + exit ;; + xtensa*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo "$UNAME_MACHINE"-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo "$UNAME_MACHINE"-unknown-stop + exit ;; + i*86:atheos:*:*) + echo "$UNAME_MACHINE"-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo "$UNAME_MACHINE"-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos"$UNAME_RELEASE" + exit ;; + i*86:*DOS:*:*) + echo "$UNAME_MACHINE"-pc-msdosdjgpp + exit ;; + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + else + echo "$UNAME_MACHINE"-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos"$UNAME_RELEASE" + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos"$UNAME_RELEASE" + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos"$UNAME_RELEASE" + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv"$UNAME_RELEASE" + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo "$UNAME_MACHINE"-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo "$UNAME_MACHINE"-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux"$UNAME_RELEASE" + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv"$UNAME_RELEASE" + else + echo mips-unknown-sysv"$UNAME_RELEASE" + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux"$UNAME_RELEASE" + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux"$UNAME_RELEASE" + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux"$UNAME_RELEASE" + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux"$UNAME_RELEASE" + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Rhapsody:*:*) + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + # shellcheck disable=SC2154 + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo "$UNAME_MACHINE"-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux"$UNAME_RELEASE" + exit ;; + *:DragonFly:*:*) + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "$UNAME_MACHINE" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + exit ;; + i*86:rdos:*:*) + echo "$UNAME_MACHINE"-pc-rdos + exit ;; + i*86:AROS:*:*) + echo "$UNAME_MACHINE"-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; +esac + +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/archive/Ydriver-src/config/config.sub b/lib/archive/Ydriver-src/config/config.sub new file mode 100755 index 0000000000..f02d43ad50 --- /dev/null +++ b/lib/archive/Ydriver-src/config/config.sub @@ -0,0 +1,1793 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2020 Free Software Foundation, Inc. + +timestamp='2020-01-01' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2020 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo "$1" + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 + ;; + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac + ;; + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac + ;; + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac + ;; +esac + +# Decode 1-component or ad-hoc basic machines +case $basic_machine in + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond + ;; + op50n) + cpu=hppa1.1 + vendor=oki + ;; + op60c) + cpu=hppa1.1 + vendor=oki + ;; + ibm*) + cpu=i370 + vendor=ibm + ;; + orion105) + cpu=clipper + vendor=highlevel + ;; + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple + ;; + pmac | pmac-mpw) + cpu=powerpc + vendor=apple + ;; + + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + cpu=m68000 + vendor=att + ;; + 3b*) + cpu=we32k + vendor=att + ;; + bluegene*) + cpu=powerpc + vendor=ibm + os=cnk + ;; + decsystem10* | dec10*) + cpu=pdp10 + vendor=dec + os=tops10 + ;; + decsystem20* | dec20*) + cpu=pdp10 + vendor=dec + os=tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + cpu=m68k + vendor=motorola + ;; + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 + ;; + encore | umax | mmax) + cpu=ns32k + vendor=encore + ;; + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} + ;; + fx2800) + cpu=i860 + vendor=alliant + ;; + genix) + cpu=ns32k + vendor=ns + ;; + h3050r* | hiux*) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + cpu=m68000 + vendor=hp + ;; + hp9k3[2-9][0-9]) + cpu=m68k + vendor=hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + cpu=hppa1.1 + vendor=hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + cpu=hppa1.0 + vendor=hp + ;; + i*86v32) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 + ;; + i*86v4*) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 + ;; + i*86v) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv + ;; + i*86sol2) + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} + ;; + iris | iris4d) + cpu=mips + vendor=sgi + case $os in + irix*) + ;; + *) + os=irix4 + ;; + esac + ;; + miniframe) + cpu=m68000 + vendor=convergent + ;; + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint + ;; + news-3600 | risc-news) + cpu=mips + vendor=sony + os=newsos + ;; + next | m*-next) + cpu=m68k + vendor=next + case $os in + openstep*) + ;; + nextstep*) + ;; + ns2*) + os=nextstep2 + ;; + *) + os=nextstep3 + ;; + esac + ;; + np1) + cpu=np1 + vendor=gould + ;; + op50n-* | op60c-*) + cpu=hppa1.1 + vendor=oki + os=proelf + ;; + pa-hitachi) + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 + ;; + pbd) + cpu=sparc + vendor=tti + ;; + pbb) + cpu=m68k + vendor=tti + ;; + pc532) + cpu=ns32k + vendor=pc532 + ;; + pn) + cpu=pn + vendor=gould + ;; + power) + cpu=power + vendor=ibm + ;; + ps2) + cpu=i386 + vendor=ibm + ;; + rm[46]00) + cpu=mips + vendor=siemens + ;; + rtpc | rtpc-*) + cpu=romp + vendor=ibm + ;; + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} + ;; + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks + ;; + tower | tower-32) + cpu=m68k + vendor=ncr + ;; + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu + ;; + w65) + cpu=w65 + vendor=wdc + ;; + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf + ;; + none) + cpu=none + vendor=none + ;; + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine + ;; + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` + ;; + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 + exit 1 + ;; + esac + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $vendor in + digital*) + vendor=dec + ;; + commodore*) + vendor=cbm + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x$os != x ] +then +case $os in + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux + ;; + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + solaris) + os=solaris2 + ;; + unixware*) + os=sysv4.2uw + ;; + gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + qnx*) + case $cpu in + x86 | i*86) + ;; + *) + os=nto-$os + ;; + esac + ;; + hiux*) + os=hiuxwe2 + ;; + nto-qnx*) + ;; + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` + ;; + opened*) + os=openedition + ;; + os400*) + os=os400 + ;; + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + ;; + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + ;; + wince*) + os=wince + ;; + utek*) + os=bsd + ;; + dynix*) + os=bsd + ;; + acis*) + os=aos + ;; + atheos*) + os=atheos + ;; + syllable*) + os=syllable + ;; + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova + ;; + ns2) + os=nextstep2 + ;; + # Preserve the version number of sinix5. + sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + sinix*) + os=sysv4 + ;; + tpf*) + os=tpf + ;; + triton*) + os=sysv3 + ;; + oss*) + os=sysv3 + ;; + svr4*) + os=sysv4 + ;; + svr3) + os=sysv3 + ;; + sysvr4) + os=sysv4 + ;; + # This must come after sysvr4. + sysv*) + ;; + ose*) + os=ose + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint + ;; + zvmoe) + os=zvmoe + ;; + dicos*) + os=dicos + ;; + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac + ;; + nacl*) + ;; + ios) + ;; + none) + ;; + *-eabi) + ;; + *) + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $cpu-$vendor in + score-*) + os=elf + ;; + spu-*) + os=elf + ;; + *-acorn) + os=riscix1.2 + ;; + arm*-rebel) + os=linux + ;; + arm*-semi) + os=aout + ;; + c4x-* | tic4x-*) + os=coff + ;; + c8051-*) + os=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) + os=elf + ;; + tic54x-*) + os=coff + ;; + tic55x-*) + os=coff + ;; + tic6x-*) + os=coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=tops20 + ;; + pdp11-*) + os=none + ;; + *-dec | vax-*) + os=ultrix4.2 + ;; + m68*-apollo) + os=domain + ;; + i386-sun) + os=sunos4.0.2 + ;; + m68000-sun) + os=sunos3 + ;; + m68*-cisco) + os=aout + ;; + mep-*) + os=elf + ;; + mips*-cisco) + os=elf + ;; + mips*-*) + os=elf + ;; + or32-*) + os=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 + ;; + sparc-* | *-sun) + os=sunos4.1.1 + ;; + pru-*) + os=elf + ;; + *-be) + os=beos + ;; + *-ibm) + os=aix + ;; + *-knuth) + os=mmixware + ;; + *-wec) + os=proelf + ;; + *-winbond) + os=proelf + ;; + *-oki) + os=proelf + ;; + *-hp) + os=hpux + ;; + *-hitachi) + os=hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=sysv + ;; + *-cbm) + os=amigaos + ;; + *-dg) + os=dgux + ;; + *-dolphin) + os=sysv3 + ;; + m68k-ccur) + os=rtu + ;; + m88k-omron*) + os=luna + ;; + *-next) + os=nextstep + ;; + *-sequent) + os=ptx + ;; + *-crds) + os=unos + ;; + *-ns) + os=genix + ;; + i370-*) + os=mvs + ;; + *-gould) + os=sysv + ;; + *-highlevel) + os=bsd + ;; + *-encore) + os=bsd + ;; + *-sgi) + os=irix + ;; + *-siemens) + os=sysv4 + ;; + *-masscomp) + os=rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=uxpv + ;; + *-rom68k) + os=coff + ;; + *-*bug) + os=coff + ;; + *-apple) + os=macos + ;; + *-atari*) + os=mint + ;; + *-wrs) + os=vxworks + ;; + *) + os=none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +case $vendor in + unknown) + case $os in + riscix*) + vendor=acorn + ;; + sunos*) + vendor=sun + ;; + cnk*|-aix*) + vendor=ibm + ;; + beos*) + vendor=be + ;; + hpux*) + vendor=hp + ;; + mpeix*) + vendor=hp + ;; + hiux*) + vendor=hitachi + ;; + unos*) + vendor=crds + ;; + dgux*) + vendor=dg + ;; + luna*) + vendor=omron + ;; + genix*) + vendor=ns + ;; + clix*) + vendor=intergraph + ;; + mvs* | opened*) + vendor=ibm + ;; + os400*) + vendor=ibm + ;; + ptx*) + vendor=sequent + ;; + tpf*) + vendor=ibm + ;; + vxsim* | vxworks* | windiss*) + vendor=wrs + ;; + aux*) + vendor=apple + ;; + hms*) + vendor=hitachi + ;; + mpw* | macos*) + vendor=apple + ;; + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + vendor=atari + ;; + vos*) + vendor=stratus + ;; + esac + ;; +esac + +echo "$cpu-$vendor-$os" +exit + +# Local variables: +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/lib/archive/Ydriver-src/config/configure.ac b/lib/archive/Ydriver-src/config/configure.ac new file mode 100644 index 0000000000..731a19fa7c --- /dev/null +++ b/lib/archive/Ydriver-src/config/configure.ac @@ -0,0 +1,90 @@ +# +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +AC_INIT(Yambo Driver Library, yambo@yambo-code.org) +# +m4_include([config/version.m4]) +# +AC_MSG_CHECKING(version) +AC_MSG_RESULT($YDRI_VERSION.$YDRI_SUBVERSION.$YDRI_PATCHLEVEL) +# +AC_CONFIG_AUX_DIR(config) +# +# General +# +m4_include([config/acx_misc.m4]) +m4_include([config/acx_fpp.m4]) +m4_include([config/acx_fortran_flags.m4]) +# ============================================================================ +# CC +AC_PROG_CC +# ============================================================================ +# AR +AC_CHECK_TOOL(AR, ar, false) +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS="-ru" +AC_SUBST(AR_FLAGS) +# ============================================================================ +# Fortran 90 +acx_save_fcflags="$FCFLAGS" +AC_PROG_FC([],[90]) +if test "$FC" = "" ; then + AC_MSG_ERROR([could not find Fortran 90 compiler]) +fi +AC_LANG_PUSH(Fortran) +# +# F90 extension +# +F90SUFFIX=.f90 +AC_ARG_WITH(f90ext, AC_HELP_STRING([--with-f90ext=],[Use . Fortran 90 extension],[32])) +if ! test -z "$with_f90ext"; then F90SUFFIX=".$with_f90ext"; fi +case $F90SUFFIX in + .f90) + AC_FC_SRCEXT(f90,[F90SUFFIX=".f90"; F90EXTFLAGS="$FCFLAGS_f90"],[]) + ;; + .f) + AC_FC_SRCEXT(f,[F90SUFFIX=".f"; F90EXTFLAGS="$FCFLAGS_f"],[]) + ;; +esac +AC_SUBST(F90SUFFIX) +FCFLAGS="${acx_save_fcflags}" +acx_save_fcflags="$FCFLAGS" +# +# Fortran FLAGS +# +ACX_FCSETUP() +OPENMPLIBS="" +CUDA_FLAGS="" +AC_SUBST(OPENMPLIBS) +AC_SUBST(CUDA_FLAGS) +# ============================================================================ +# Underscore options in subroutine naming +ACX_EXTUS +# ============================================================================ +# FPP check +ACX_FPP +# ============================================================================ +# Output +AC_LANG_PUSH(Fortran) +AC_CONFIG_FILES([config/defs.mk example/include/version.h]) +AC_OUTPUT diff --git a/lib/archive/Ydriver-src/config/defs.mk.in b/lib/archive/Ydriver-src/config/defs.mk.in new file mode 100644 index 0000000000..f2fb392032 --- /dev/null +++ b/lib/archive/Ydriver-src/config/defs.mk.in @@ -0,0 +1,31 @@ +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +ar = @AR@ +arflags = @AR_FLAGS@ +cc = @CC@ +cflags = @CFLAGS@ +fpp = @FPP@ +fc = @FC@ +fcflags = @FCFLAGS@ @FCMFLAG@ @OPENMPLIBS@ @CUDA_FLAGS@ +f90suffix = @F90SUFFIX@ diff --git a/lib/archive/Ydriver-src/config/install.sh b/lib/archive/Ydriver-src/config/install.sh new file mode 100755 index 0000000000..50d48845c0 --- /dev/null +++ b/lib/archive/Ydriver-src/config/install.sh @@ -0,0 +1 @@ +#! /bin/sh diff --git a/lib/archive/Ydriver-src/config/version.m4 b/lib/archive/Ydriver-src/config/version.m4 new file mode 100644 index 0000000000..f6f7a750b6 --- /dev/null +++ b/lib/archive/Ydriver-src/config/version.m4 @@ -0,0 +1,6 @@ +YDRI_VERSION="1" +YDRI_SUBVERSION="1" +YDRI_PATCHLEVEL="0" +AC_SUBST(YDRI_VERSION) +AC_SUBST(YDRI_SUBVERSION) +AC_SUBST(YDRI_PATCHLEVEL) diff --git a/lib/archive/Ydriver-src/configure b/lib/archive/Ydriver-src/configure new file mode 100755 index 0000000000..bdd39c1053 --- /dev/null +++ b/lib/archive/Ydriver-src/configure @@ -0,0 +1,5825 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for Yambo Driver Library yambo@yambo-code.org. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='Yambo Driver Library' +PACKAGE_TARNAME='yambo-driver-library' +PACKAGE_VERSION='yambo@yambo-code.org' +PACKAGE_STRING='Yambo Driver Library yambo@yambo-code.org' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' + +ac_subst_vars='LTLIBOBJS +LIBOBJS +FPP +FCLIBS +CUDA_FLAGS +OPENMPLIBS +def_compiler +DEBUG_FLAGS +NETCDFFLAGS +OMPFLAGS +FCMFLAG +FUFLAGS +FCUFLAGS +UFLAGS +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +F90SUFFIX +FCFLAGS_f +FCFLAGS_f90 +ac_ct_FC +FCFLAGS +FC +AR_FLAGS +AR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +YDRI_PATCHLEVEL +YDRI_SUBVERSION +YDRI_VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +runstatedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_f90ext +enable_debug_flags +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +FC +FCFLAGS +UFLAGS +FPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir runstatedir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Yambo Driver Library yambo@yambo-code.org to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root + [DATAROOTDIR/doc/yambo-driver-library] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Yambo Driver Library yambo@yambo-code.org:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-debug-flags Debug flags are set for compilation. Default is no. + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-f90ext= Use . Fortran 90 extension + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + FC Fortran compiler command + FCFLAGS Fortran compiler flags + UFLAGS Unoptimized Fortran flags + FPP Fortran preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Yambo Driver Library configure yambo@yambo-code.org +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_compile + +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_fc_try_link + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Yambo Driver Library $as_me yambo@yambo-code.org, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# +YDRI_VERSION="0" +YDRI_SUBVERSION="1" +YDRI_PATCHLEVEL="0" + + + + +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version" >&5 +$as_echo_n "checking version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $YDRI_VERSION.$YDRI_SUBVERSION.$YDRI_PATCHLEVEL" >&5 +$as_echo "$YDRI_VERSION.$YDRI_SUBVERSION.$YDRI_PATCHLEVEL" >&6; } +# +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# +# General +# +# +# Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch +# +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +################################################ +# Check size of a pointer +# ---------------------------------- + +################################################ +# AC_LANG_FUNC_LINK_TRY(Fortran)(FUNCTION) +# ---------------------------------- + + +################################################ +# Set various default FLAGS +# ---------------------------------- + + + +################################################ +# Get External C routines naming scheme +# ---------------------------------- + + +# +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + +# +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# # +################################################ +# Set FC FLAGS +# ---------------------------------- + +# + +# ============================================================================ +# CC +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# ============================================================================ +# AR +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS="-ru" + +# ============================================================================ +# Fortran 90 +acx_save_fcflags="$FCFLAGS" +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_FC" && break +done + + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FCFLAGS=${FCFLAGS+set} +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_g=yes +else + ac_cv_prog_fc_g=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then + FCFLAGS=$ac_save_FCFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi + +if test $ac_compiler_gnu = yes; then + GFC=yes +else + GFC= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test "$FC" = "" ; then + as_fn_error $? "could not find Fortran 90 compiler" "$LINENO" 5 +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +# +# F90 extension +# +F90SUFFIX=.f90 + +# Check whether --with-f90ext was given. +if test "${with_f90ext+set}" = set; then : + withval=$with_f90ext; +fi + +if ! test -z "$with_f90ext"; then F90SUFFIX=".$with_f90ext"; fi +case $F90SUFFIX in + .f90) + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" + else + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 + fi + + F90SUFFIX=".f90"; F90EXTFLAGS="$FCFLAGS_f90" +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ;; + .f) + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } +if ${ac_cv_fc_srcext_f+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest.$ac_objext conftest.f +ac_fcflags_srcext=$ac_fcflags_srcext_save + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +$as_echo "$ac_cv_fc_srcext_f" >&6; } +if test "x$ac_cv_fc_srcext_f" = xunknown; then + as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 +else + ac_fc_srcext=f + if test "x$ac_cv_fc_srcext_f" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f="" + else + ac_fcflags_srcext=$ac_cv_fc_srcext_f + FCFLAGS_f=$ac_cv_fc_srcext_f + fi + + F90SUFFIX=".f"; F90EXTFLAGS="$FCFLAGS_f" +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ;; +esac + +FCFLAGS="${acx_save_fcflags}" +acx_save_fcflags="$FCFLAGS" +# +# Fortran FLAGS +# +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + + +# +if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi +# +# Check whether --enable-debug-flags was given. +if test "${enable_debug_flags+set}" = set; then : + enableval=$enable_debug_flags; +fi + +if test x"$enable_debug_flags" = "x"; then enable_debug_flags="no"; fi +# +def_compiler= +# +case "${host}" in +i?86*linux*) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + #FUFLAGS="-O0 -g -Mbackslash" + FUFLAGS="-O0 -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_PGI" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *abf90*) + SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" + ;; + *ifc*) + SYSFLAGS="-O3 -g -w -tpp7" + FUFLAGS="-O0 -w -tpp7" + FCMFLAG="" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="" + ;; + *g95*) + SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore -mtune=pentium4" + FUFLAGS="-g -O0 -fbackslash -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *ifort*) + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + CPU_FLAG="" + case "${INTELVERSION}" in + *11* | *12* | *13* |*14* | *15* | *16* ) + CPU_FLAG="-xHost" + #CPU_FLAG=" " + ;; + *17* | *18* | *19*) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + ;; + *10*) + CPU_FLAG="-xW" + ;; + *) + CPU_FLAG=" " + ;; + esac + SYSFLAGS="-assume bscc -O3 -g -ip $CPU_FLAG" + FUFLAGS="-assume bscc -O0 $CPU_FLAG" + FCMFLAG="-nofor_main" + DEBUG_FLAGS="-check all -CB -traceback -check bound" + ;; + *pathf9*) + SYSFLAGS="-O2 -g -fno-second-underscore" + FUFLAGS="-O0 -g -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-ffortran-bounds-check -C" + ;; + *) + SYSFLAGS="-O -g" + FUFLAGS="-O0 -g" + OMPFLAGS="-openmp" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +*86*apple* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -g -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *g95*) + SYSFLAGS="-O3 -g -fno-second-underscore -mtune=pentium4" + FUFLAGS="-O0 -g -fno-second-underscore" + FCMFLAG="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *ifort*) + CPU_FLAG="" + case "${INTELVERSION}" in + *1*) + CPU_FLAG="-mtune=pentium4" + ;; + *) + CPU_FLAG="-mtune=pentium4" + ;; + esac + SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" + FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" + FCMFLAG="-nofor_main" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-check all -CB -traceback -check bound" + ;; + *) + SYSFLAGS="-O -g" + FUFLAGS="-O -g0" + OMPFLAGS="-openmp" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +ia64*linux* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + NETCDFFLAGS="-DpgiFortran" + def_compiler="-D_PGI" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -g -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *g95*) + SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" + FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" + FCMFLAG="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *abf90*) + SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" + ;; + *ifc*) + SYSFLAGS="-O3 -g -w" + FUFLAGS="-O0 -g -w" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="" + ;; + *ifort*) + CPU_FLAG="" + case "${INTELVERSION}" in + *1*) + CPU_FLAG="-mtune=itanium" + ;; + *) + CPU_FLAG="" + ;; + esac + SYSFLAGS="-assume bscc -O2 -g -ip ${CPU_FLAG}" + FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" + FCMFLAG="-nofor_main" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-check all -CB -traceback -check bound" + ;; + *openf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + ;; + *pathf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-ffortran-bounds-check -C" + ;; + *) + SYSFLAGS="-g -O" + FUFLAGS="-O0" + OMPFLAGS="-openmp" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +*x86*64* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_PGI" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native" + FUFLAGS="-O0 -g -mtune=native" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *g95*) + SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" + FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" + FCMFLAG="" + DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" + ;; + *abf90*) + SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" + ;; + *ifc*) + SYSFLAGS="-O3 -g -w -tpp2" + FUFLAGS="-O0 -g -w -tpp2" + OMPFLAGS="-openmp" + NETCDFFLAGS="-DpgiFortran" + ;; + *ifort*) + OMPFLAGS="-openmp" + CPU_FLAG="" + case "${INTELVERSION}" in + *11* | *12* | *13* |*14* |*15* | *16* ) + #CPU_FLAG="-xHost" + CPU_FLAG=" " + ;; + *17* | *18* | *19*) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + ;; + *10*) + CPU_FLAG="-xW" + ;; + *) + CPU_FLAG=" " + ;; + esac + SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" + FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" + FCMFLAG="-nofor_main" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-CB -traceback" + ;; + *openf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + ;; + *pathf9*) + SYSFLAGS="-O2 -fno-second-underscore" + FUFLAGS="-O0 -fno-second-underscore" + FCMFLAG="" + OMPFLAGS="" + DEBUG_FLAGS="-ffortran-bounds-check -C" + ;; + *) + SYSFLAGS="-g -O" + FUFLAGS="-O0" + NETCDFFLAGS="-Df2cFortran" + esac + ;; +alphaev*) + SYSFLAGS="-O3 -arch host -tune host" + FUFLAGS="-O0" + FCMFLAG="-nofor_main" + ;; +powerpc64*linux* ) + case "${FC}" in + *pgf9* | *ftn* | *pgfortran* ) + SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" + FUFLAGS="-O0 -g -Mbackslash" + FCMFLAG="-Mnomain" + OMPFLAGS="-mp" + def_compiler="-D_PGI" + NETCDFFLAGS="-DpgiFortran" + DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" + ;; + *) + CFLAGS="-q64 -O2 -g" + SYSFLAGS="-q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970" + FUFLAGS="-q64 -O0 -g" + OMPFLAGS="" + def_compiler="-D_XLF" + esac + ;; +powerpc-ibm* ) + CFLAGS="-O -q64" + SYSFLAGS="-O3 -g -q64 -qstrict -qarch=auto -qtune=auto -qmaxmem=-1" + FUFLAGS="-q64" + OMPFLAGS="-qthreaded" + def_compiler="-D_XLF" + ;; +mips-sgi-irix*) + SYSFLAGS="-O3 -r10000 -mips4" + ;; +*) + SYSFLAGS="-O" +esac +# +if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +$as_echo_n "checking for specific $FC flags... " >&6; } +if test -z "${FCFLAGS}"; then + FCFLAGS="$SYSFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +$as_echo "$FCFLAGS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +$as_echo "(User-defined) $FCFLAGS" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +$as_echo_n "checking for specific Open-MP flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +$as_echo "$OMPFLAGS" >&6; } +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +$as_echo_n "checking for specific $CC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +$as_echo "$CFLAGS" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +$as_echo_n "checking for specific unoptimized flags... " >&6; } +if test -z "${UFLAGS}"; then + FCUFLAGS="$FUFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +$as_echo "$FCUFLAGS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +$as_echo "(User-defined) $UFLAGS" >&6; } + FCUFLAGS="$UFLAGS" + FUFLAGS="$UFLAGS" +fi +# +if test x"$enable_debug_flags" = "xyes"; then + FCFLAGS="$DEBUG_FLAGS" + FCUFLAGS="$DEBUG_FLAGS" +fi +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +$as_echo_n "checking for specific NETCDF flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +$as_echo "$NETCDFFLAGS" >&6; } +# + + + + + + + + + + +OPENMPLIBS="" +CUDA_FLAGS="" + + +# ============================================================================ +# Underscore options in subroutine naming + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_prog_fc_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_verb" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS + +rm -rf conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" + +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; + + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac + + + # look for -l* and *.a constructs in the output + for ac_arg in $ac_fc_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_fc_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_fc_v"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} +fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$FCLIBS" != "x"; then + ac_cv_fc_libs="$FCLIBS" # Let the user override the test. +else + +cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FCFLAGS=$FCFLAGS +FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" +eval "set x $ac_link" +shift +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | + sed '/^Driving:/d; /^Configured with:/d; + '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` +$as_echo "$ac_fc_v_output" >&5 +FCFLAGS=$ac_save_FCFLAGS + +rm -rf conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_fc_v_output="`echo $ac_fc_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" + +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_fc_v_output in + # With xlf replace commas with spaces, + # and remove "-link" and closing parenthesis. + *xlfentry*) + ac_fc_v_output=`echo $ac_fc_v_output | + sed ' + s/,/ /g + s/ -link / /g + s/) *$// + ' + ` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_fc_v_output=`echo $ac_fc_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + + # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. + *fort77*f2c*gcc*) + ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' + /:[ ]\+Running[ ]\{1,\}"gcc"/{ + /"-c"/d + /[.]c"*/d + s/^.*"gcc"/"gcc"/ + s/"//gp + }'` ;; + + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; +esac + + + +ac_cv_fc_libs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_fc_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then : + +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then : + +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi +fi + ;; + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ + |-LANG:=* | -LIST:* | -LNO:* | -link) + ;; + -lkernel32) + case $host_os in + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + ;; + esac + ;; + -[LRuYz]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then : + +else + ac_arg="$ac_arg $ac_j" + ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" +fi + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then : + +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi + ;; + -zallextract*| -zdefaultextract) + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" + done +else + ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } +FCLIBS="$ac_cv_fc_libs" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fc_dm_save_LIBS=$LIBS + LIBS="$LIBS $FCLIBS" + ac_fortran_dm_var=FC_DUMMY_MAIN + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # First, try linking without a dummy main: + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=none +else + ac_cv_fortran_dummy_main=unknown +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define $ac_fortran_dm_var $ac_func +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_fortran_dummy_main=$ac_func; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + fi + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main + rm -rf conftest* + LIBS=$ac_fc_dm_save_LIBS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } +FC_DUMMY_MAIN=$ac_cv_fc_dummy_main +if test "$FC_DUMMY_MAIN" != unknown; then : + if test $FC_DUMMY_MAIN != none; then + +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF + + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then + +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h + + fi +fi +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success=yes; break 2 +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_success_extra=yes; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success_extra" = "yes"; then + ac_cv_fc_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi + else + ac_cv_fc_mangling="unknown" + fi + else + ac_cv_fc_mangling="unknown" + fi + + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +c_success=no +msg="unknown" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define F90_FUNC(name,NAME) name ## _ + #define F90_FUNC_(name,NAME) name ## _ + void F90_FUNC_(ftest, FTEST)(){} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + mv conftest.$ac_objext ftest.$ac_objext + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + save="$LIBS" + LIBS="ftest.$ac_objext" + cat > conftest.$ac_ext <<_ACEOF + program main + call ftest + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + rm -f ftest.$ac_objext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test "$c_success" = "no" ; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define F90_FUNC(name,NAME) name + #define F90_FUNC_(name,NAME) name + void F90_FUNC_(ftest, FTEST)(){} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + mv conftest.$ac_objext ftest.$ac_objext + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + save="$LIBS" + LIBS="ftest.$ac_objext" + cat > conftest.$ac_ext <<_ACEOF + program main + call ftest + end +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + c_success="yes"; msg="test" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + rm -f ftest.$ac_objext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +$as_echo "$msg" >&6; } + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +case $ac_cv_fc_mangling in + "lower case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + ;; + "lower case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + ;; + "lower case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + ;; + "upper case, no underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + ;; + "upper case, no underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, no extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + ;; + "upper case, underscore, extra underscore") + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + ;; +esac + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +f_success="no" +case $ac_cv_fc_mangling in + "lower case, underscore, no extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; + "lower case, underscore, extra underscore") + f_success="no" ;; + "lower case, no underscore, no extra underscore") + f_success="yes";; + "lower case, no underscore, extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; + "upper case, underscore, no extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; + "upper case, underscore, extra underscore") + f_success="no" ;; + "upper case, no underscore, no extra underscore") + f_success="yes";; + "upper case, no underscore, extra underscore") + f_success="yes" + save="$CFLAGS" + CFLAGS="$save -D_FORTRAN_US" ;; +esac +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +if test "$c_success" = "no" || test "$f_success" = "no" ; then + as_fn_error $? "unknown Fortran <-> C subroutines name conventions" "$LINENO" 5 +fi + + +# ============================================================================ +# FPP check + +# + +# +case "${FC}" in + # + # does not work properly + # + *ifort*) + if test -z "$FPP"; then FPP="fpp -free -P"; fi + ;; + *gfortran | *g95) + if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi + ;; + # + # some of the following could be uncommented once explicitly checked + # + #*sunf95) + # if test -z "$FPP"; then FPP="${FC} -E -P -fpp"; fi + # ;; + #*openf95) + # if test -z "$FPP"; then FPP="${FC} -E -P -ftpp"; fi + # ;; + #*pathf*) + # if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi + # ;; +esac +# +if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} +# +# TESTS +#======= +# +# Fortran Source +# +acx_FC_ok=yes +FPP_TESTS_PASSED=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +$as_echo_n "checking if FC precompiler works on FC source... " >&6; } +cat > conftest.F << EOF_ + program conftest + character (1) :: a + a="a" + write (*,'('//a//')') 'hello' + end program +EOF_ +# ! Replace "S" with "\" and find the max length of +(eval $FPP conftest.F > conftest.${FCSUFFIX}) 2> conftest.er1 +if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" || + test -n "`grep "warning" conftest.er1`" || + test -n "`grep "command line remark" conftest.er1`" ; then + eval $FPP conftest.F > conftest.${FCSUFFIX} + eval $FC $FCFLAGS -c conftest.${FCSUFFIX} 2> conftest.er2 >&5 + if test -s conftest.er2 ; then + if ! ( test -n "`grep successful conftest.er2`" || + test -n "`grep "warning" conftest.er2`" || + test -n "`grep "command line remark" conftest.er2`" ) ; then + acx_FC_ok=no ; + FPP_TESTS_PASSED=no; + fi + fi +else + acx_FC_ok=no ; + FPP_TESTS_PASSED=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +$as_echo "$acx_FC_ok" >&6; } +# +if test "x$FPP_TESTS_PASSED" = xno ; then + as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; +fi +# + +# + +# ============================================================================ +# Output +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +ac_config_files="$ac_config_files config/defs.mk example/include/version.h" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Yambo Driver Library $as_me yambo@yambo-code.org, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +Yambo Driver Library config.status yambo@yambo-code.org +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config/defs.mk") CONFIG_FILES="$CONFIG_FILES config/defs.mk" ;; + "example/include/version.h") CONFIG_FILES="$CONFIG_FILES example/include/version.h" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/lib/archive/Ydriver-src/example/include/example_driver.h b/lib/archive/Ydriver-src/example/include/example_driver.h new file mode 100644 index 0000000000..a542a51db9 --- /dev/null +++ b/lib/archive/Ydriver-src/example/include/example_driver.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ +void options_example(struct options_struct options[],int *i_opt); diff --git a/lib/archive/Ydriver-src/example/include/fortran_driver.h b/lib/archive/Ydriver-src/example/include/fortran_driver.h new file mode 100644 index 0000000000..c1a1ee5c6f --- /dev/null +++ b/lib/archive/Ydriver-src/example/include/fortran_driver.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): DS + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ +/* + Tool drivers +*/ +/* MAIN +*/ +#if defined _example_driver + #if defined _FORTRAN_US + int main_ + #else + int main + #endif +#endif + (int *, int *,int *,int *,int *,int *,int *,int *, + char *string, char *in_file, char *in_dir, char *out_dir, char *com_dir, char *job, + int string_N, int in_file_N, int in_dir_N, int out_dir_N, int com_dir_N, int job_N); diff --git a/lib/archive/Ydriver-src/example/include/tool.h b/lib/archive/Ydriver-src/example/include/tool.h new file mode 100644 index 0000000000..d81ec8d6df --- /dev/null +++ b/lib/archive/Ydriver-src/example/include/tool.h @@ -0,0 +1,28 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): DS + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + + tool & desc + +*/ + char *tool="example"; + char *tool_desc="Ydriver Lib example"; diff --git a/lib/archive/Ydriver-src/example/include/version.h.in b/lib/archive/Ydriver-src/example/include/version.h.in new file mode 100644 index 0000000000..c0f3f755f9 --- /dev/null +++ b/lib/archive/Ydriver-src/example/include/version.h.in @@ -0,0 +1,30 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#define YAMBO_VERSION @YDRI_VERSION@ +#define YAMBO_SUBVERSION @YDRI_SUBVERSION@ +#define YAMBO_PATCHLEVEL @YDRI_PATCHLEVEL@ +#define YAMBO_REVISION 0 +#define YAMBO_HASH "" + diff --git a/lib/archive/Ydriver-src/example/main.F b/lib/archive/Ydriver-src/example/main.F new file mode 100644 index 0000000000..0d0f8af828 --- /dev/null +++ b/lib/archive/Ydriver-src/example/main.F @@ -0,0 +1,63 @@ +! +integer function main(& +& np,pid,& +& string_N,in_file_N,in_dir_N,out_dir_N,com_dir_N,job_N,& +& string, in_file, in_dir, out_dir, com_dir, job) + ! + use C_driver + ! + integer, intent(in) :: np,pid + integer, intent(in) :: string_N,in_file_N,in_dir_N,out_dir_N,com_dir_N,job_N + character(string_N), intent(in) :: string + character(in_file_N), intent(in) :: in_file + character(in_dir_N), intent(in) :: in_dir + character(out_dir_N), intent(in) :: out_dir + character(com_dir_N), intent(in) :: com_dir + character(job_N), intent(in) :: job + ! + integer i_runlevel + character(100) key,desc,pj,hash + ! + if (pid==0) then + ! + write (*,'(/a/)') " F driver" + write (*,*) "NP, PID :",np,pid + write (*,*) "RUNSTRING :",string_N,string + write (*,*) "INPUT file:",in_file_N,in_file + write (*,*) "INPUT dir :",in_dir_N,in_dir + write (*,*) "OUT dir :",out_dir_N,out_dir + write (*,*) "COM dir :",com_dir_N,com_dir + write (*,*) "JOB :",job_N,job + + call C_driver_transfer( ) + write (*,'(/2a)') " RUNNING :",trim(code_bin) + write (*,'(2a)') " LIBS :",trim(code_libraries) + write (*,'(a,2(i1,a),i1/)') " VERSION :",code_version(1),".",code_version(2),".",code_version(3) + do i_runlevel=0,199 + key=" " + desc=" " + call get_runlevel(key,1,i_runlevel) + call get_runlevel(desc,2,i_runlevel) + if (trim(key)=="EMPTY") cycle + write (*,*) "RUNLEVEL #",i_runlevel," KEY:",trim(key),' DESC:',trim(desc) + enddo +endif + +end function + ! + character(100) function cstr(si) result(so) + character(*), intent(IN) :: si + integer :: i + i = len(trim(si)) + call clear_str(so) + so(1:i) = si(1:i) + so(i+1:i+1) = achar(0) + end function cstr + + subroutine clear_str(str) + character(*), intent(out) :: str + integer :: i + do i = 1, len(str) + str(i:i) = " " + end do + end subroutine clear_str diff --git a/lib/archive/Ydriver-src/example/options/.empty b/lib/archive/Ydriver-src/example/options/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/archive/Ydriver-src/include/.empty b/lib/archive/Ydriver-src/include/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/archive/Ydriver-src/include/driver.h b/lib/archive/Ydriver-src/include/driver.h new file mode 100644 index 0000000000..8fae1763df --- /dev/null +++ b/lib/archive/Ydriver-src/include/driver.h @@ -0,0 +1,37 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ +struct yambo_seed_struct command_line(int argc, char *argv[],struct options_struct options[], struct tool_struct t, int *use_editor, int *use_mpi, int n_options); +void input_file(struct yambo_seed_struct y,struct tool_struct t, int *use_editor); +void launcher(int argc, char *argv[],int np, int pid, struct yambo_seed_struct y,int *use_editor , int *use_mpi ); +void options_maker(struct options_struct options[], int n_options); +struct tool_struct tool_init( ); +void usage(struct options_struct options[], struct tool_struct t, char* what, int n_options); +struct tool_struct versions( ); +void title(FILE *file_name,char *cmnt, struct tool_struct t); +int use_me(struct options_struct options[], struct tool_struct t, int i_opt); +char *running_tool(); +char *running_project(); +char *running_libraries(); +char *runlevel(int *runid, int *id); +void options_help(struct options_struct options[],int *i_opt); diff --git a/lib/archive/Ydriver-src/include/fortran_arguments.h b/lib/archive/Ydriver-src/include/fortran_arguments.h new file mode 100644 index 0000000000..a165657e80 --- /dev/null +++ b/lib/archive/Ydriver-src/include/fortran_arguments.h @@ -0,0 +1,27 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): DS + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ +&np,&pid, +&y.string_N,&y.in_file_N,&y.in_dir_N,&y.out_dir_N,&y.com_dir_N,&y.job_N, + y.string, y.in_file, y.in_dir, y.out_dir, y.com_dir, y.job, + y.string_N, y.in_file_N, y.in_dir_N, y.out_dir_N, y.com_dir_N, y.job_N diff --git a/lib/archive/Ydriver-src/include/kind.h b/lib/archive/Ydriver-src/include/kind.h new file mode 100644 index 0000000000..c73552ff23 --- /dev/null +++ b/lib/archive/Ydriver-src/include/kind.h @@ -0,0 +1,73 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ + +typedef struct tool_struct +{ + char *editor; + char *tool; + char *bin; + char *desc; + char version_string[500]; + char hash[500]; + char *pj; + int version; + int subversion; + int patchlevel; + int revision; +} tool_struct; + +typedef struct yambo_seed_struct +{ + char string[500]; + char *in_file; + char *in_dir; + char *out_dir; + char *com_dir; + char *job; + char *parenv_file; + int string_N; + int in_file_N; + int in_dir_N; + int out_dir_N; + int com_dir_N; + int job_N; +} yambo_seed_struct; + +typedef struct options_struct +{ + char short_opt; + char *long_opt; + char *short_desc; + char *long_desc[20]; /* max size equal to max_long_desc */ + char *bin; + char *yambo_string; + char *section; + int int_var; + int float_var; + int char_var; + int optional_var; + int serial_var; +} options_struct; + diff --git a/lib/archive/Ydriver-src/include/wrapper.h b/lib/archive/Ydriver-src/include/wrapper.h new file mode 100644 index 0000000000..9992a42fa5 --- /dev/null +++ b/lib/archive/Ydriver-src/include/wrapper.h @@ -0,0 +1,39 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): DS + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ +/* + C wrapper +*/ +#if defined _C_US + #define C_FUNC(name,NAME) name ## _ +#else + #define C_FUNC(name,NAME) name +#endif +/* + F90 wrapper +*/ +#if defined _FORTRAN_US + #define F90_FUNC(name) name ## _ +#else + #define F90_FUNC(name) name +#endif diff --git a/lib/archive/Ydriver-src/lib/.empty b/lib/archive/Ydriver-src/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/archive/Ydriver-src/src/driver/driver.c b/lib/archive/Ydriver-src/src/driver/driver.c new file mode 100644 index 0000000000..56e83f16f6 --- /dev/null +++ b/lib/archive/Ydriver-src/src/driver/driver.c @@ -0,0 +1,78 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ +#include +#include +#include +#include +#if defined _MPI + #include +#endif +/* + MAIN +*/ +int main(int argc, char *argv[]) +{ + /* + Work Space + */ + int np=1,pid=0,use_mpi=1,use_editor=1,n_options=200; + /* + Yambo and Tool structures + */ + yambo_seed_struct y; + tool_struct tool; + struct options_struct options[n_options]; + /* + TOOL & Version initialization + */ + tool=tool_init(); + /* + Options "maker" + */ + options_maker(options,n_options); + /* + Command line parsing + */ + y=command_line(argc,argv,options,tool,&use_editor,&use_mpi,n_options); + /* + Launcher + */ + launcher(argc,argv,np,pid,y,&use_editor,&use_mpi); + /* + Input File + */ + input_file(y,tool,&use_editor); + /* + CLEAN & EXIT + =========================================================================== + */ +#if defined _MPI + if (use_mpi==1) { + MPI_Barrier(MPI_COMM_WORLD); + MPI_Finalize(); + }; +#endif +} + diff --git a/lib/archive/Ydriver-src/src/interface/.objects b/lib/archive/Ydriver-src/src/interface/.objects new file mode 100644 index 0000000000..4f515078b5 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/.objects @@ -0,0 +1,2 @@ +objs = get_running_tool.o get_running_project.o get_runlevel.o get_libraries.o get_version.o mod_C_driver.o \ + C_driver_transfer.o diff --git a/lib/archive/Ydriver-src/src/interface/C_driver_transfer.F b/lib/archive/Ydriver-src/src/interface/C_driver_transfer.F new file mode 100644 index 0000000000..8025ff94d9 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/C_driver_transfer.F @@ -0,0 +1,43 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine C_driver_transfer() + ! + use C_driver, ONLY:code_version,code_revision,code_hash,& +& code_libraries,get_version,get_libraries,get_running_tool,& +& get_running_project,code_bin,code_tool,code_project + ! + implicit none + ! + code_tool=" " + call get_running_tool(code_tool) + code_project=" " + call get_running_project(code_project) + code_bin=trim(code_tool) + if (len_trim(code_project)>0) code_bin=trim(code_tool)//"_"//trim(code_project) + code_libraries=" " + call get_libraries(code_libraries) + code_hash=" " + call get_version(code_version(1),code_version(2),code_version(3),code_revision,code_hash) + ! +end subroutine diff --git a/lib/archive/Ydriver-src/src/interface/get_libraries.c b/lib/archive/Ydriver-src/src/interface/get_libraries.c new file mode 100644 index 0000000000..30d8a80c73 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/get_libraries.c @@ -0,0 +1,87 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include +#include + +char *running_libraries() +{ + int i_str,str_len,i_c; + char strings[20][20], *c; + i_str=0; +#if defined _MPI + strcpy(strings[i_str], "MPI"); +#else + strcpy(strings[i_str], "Serial"); +#endif +#if defined _OPENMP + i_str++; + strcpy(strings[i_str], "OpenMP"); +#endif +#if defined _CUDA + i_str++; + strcpy(strings[i_str], "CUDA"); +#endif +#if defined _SCALAPACK + i_str++; + strcpy(strings[i_str], "SLK"); +#endif +#if defined _SLEPC + i_str++; + strcpy(strings[i_str], "SLEPC"); +#endif +#if defined _PAR_IO + i_str++; + strcpy(strings[i_str], "HDF5_MPI_IO"); +#elif defined _HDF5_IO + i_str++; + strcpy(strings[i_str], "HDF5_IO"); +#elif defined _HDF5_LIB + i_str++; + strcpy(strings[i_str], "HDF5_LIB"); +#endif + str_len=0; + for(i_c=0;i_c<=i_str;i_c++) { + str_len=str_len+sizeof(strings[i_c]); + } + c = malloc(str_len+1); + strcpy(c,""); + for(i_c=0;i_c<=i_str;i_c++) { + if (i_c>0) strcat(c,"+"); + strcat(c,strings[i_c]); + } + return c; +} +void C_FUNC(get_libraries, GET_LIBRARIES)(char *libraries) +{ + char *c = running_libraries(); + int len = strlen(c); + strcpy(libraries, c); + libraries[len] = libraries[len + 1]; +} + diff --git a/lib/archive/Ydriver-src/src/interface/get_runlevel.c b/lib/archive/Ydriver-src/src/interface/get_runlevel.c new file mode 100644 index 0000000000..076d983320 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/get_runlevel.c @@ -0,0 +1,48 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include + +char *runlevel(int *runid, int *id) +{ + int n_options=200; + struct options_struct options[n_options]; + options_maker(options,n_options); + if (strcmp(options[*runid].yambo_string,"unused")==0) return "EMPTY"; + if (*id == 1) {return options[*runid].yambo_string;} + if (*id == 2) {return options[*runid].short_desc;} + if (*id == 3) {return options[*runid].bin;} +} +void C_FUNC(get_runlevel, GET_RUNLEVEL)(char *component, int *component_id, int *runlevel_id) +{ + char *c = runlevel(runlevel_id,component_id); + int len = strlen(c); + strcpy(component, c); + component[len] = component[len + 1]; +} + diff --git a/lib/archive/Ydriver-src/src/interface/get_running_project.c b/lib/archive/Ydriver-src/src/interface/get_running_project.c new file mode 100644 index 0000000000..35a5b18f45 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/get_running_project.c @@ -0,0 +1,53 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include +#include + +char *running_project() +{ + tool_struct tool; + tool=tool_init(); + char *c; + if (tool.pj!=NULL) { + c = malloc(sizeof(tool.pj)+1); + strcpy(c,tool.pj); + }else{ + c = malloc(2); + strcpy(c,""); + } + return c; +} +void C_FUNC(get_running_project, GET_RUNNING_TOOL)(char *code_project) +{ + char *c = running_project(); + int len = strlen(c); + strcpy(code_project, c); + code_project[len] = code_project[len + 1]; +} + diff --git a/lib/archive/Ydriver-src/src/interface/get_running_tool.c b/lib/archive/Ydriver-src/src/interface/get_running_tool.c new file mode 100644 index 0000000000..b8719ed548 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/get_running_tool.c @@ -0,0 +1,48 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include +#include + +char *running_tool() +{ + tool_struct tool; + tool=tool_init(); + char *c; + c = malloc(sizeof(tool.tool)+1); + strcpy(c,tool.tool); + return c; +} +void C_FUNC(get_running_tool, GET_RUNNING_TOOL)(char *code_tool) +{ + char *c = running_tool(); + int len = strlen(c); + strcpy(code_tool, c); + code_tool[len] = code_tool[len + 1]; +} + diff --git a/lib/archive/Ydriver-src/src/interface/get_version.c b/lib/archive/Ydriver-src/src/interface/get_version.c new file mode 100644 index 0000000000..0de2bf0508 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/get_version.c @@ -0,0 +1,54 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include +#include + +struct tool_struct versions( ) +{ + tool_struct t; + t.version=YAMBO_VERSION; + t.subversion=YAMBO_SUBVERSION; + t.patchlevel=YAMBO_PATCHLEVEL; + t.revision=YAMBO_REVISION; + sprintf(t.hash,"%s",YAMBO_HASH); + return(t); +} +void C_FUNC(get_version, GET_VERSION)(int *version,int *subversion, int *patchlevel, int *revision, char *hash) +{ + tool_struct t; + t=versions(); + *version=t.version; + *subversion=t.subversion; + *patchlevel=t.patchlevel; + *revision=t.revision; + strcpy(hash, t.hash); + int len = strlen(t.hash); + hash[len] = hash[len + 1]; +} + diff --git a/lib/archive/Ydriver-src/src/interface/mod_C_driver.F b/lib/archive/Ydriver-src/src/interface/mod_C_driver.F new file mode 100644 index 0000000000..2cf87035d5 --- /dev/null +++ b/lib/archive/Ydriver-src/src/interface/mod_C_driver.F @@ -0,0 +1,68 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +module C_driver + ! + implicit none + ! + integer :: code_version(3) + integer :: code_GPL_revision + integer :: code_revision + character(50):: code_bin + character(50):: code_tool + character(50):: code_project + character(50):: code_hash + character(50):: code_libraries + character(50):: code_branch + ! + interface + ! + subroutine get_version(version,subversion,patchlevel,revision,hash) + integer , intent(out):: version + integer , intent(out):: subversion + integer , intent(out):: patchlevel + integer , intent(out):: revision + character(*), intent(out):: hash + end subroutine + ! + subroutine get_libraries(libraries) + character(*), intent(out):: libraries + end subroutine + ! + subroutine get_running_project(code_project) + character(*), intent(out):: code_project + end subroutine + ! + subroutine get_running_tool(code_tool) + character(*), intent(out):: code_tool + end subroutine + ! + subroutine get_runlevel(component,component_id,runlevel_id) + character(*), intent(out):: component + integer, intent(in) :: component_id + integer, intent(in) :: runlevel_id + end subroutine + ! + end interface + ! +end module C_driver diff --git a/lib/archive/Ydriver-src/src/main/.objects b/lib/archive/Ydriver-src/src/main/.objects new file mode 100644 index 0000000000..fad604c43d --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/.objects @@ -0,0 +1 @@ +objs = launcher.o command_line.o input_file.o load_environments.o options_maker.o title.o tool_init.o usage.o use_me.o diff --git a/lib/archive/Ydriver-src/src/main/command_line.c b/lib/archive/Ydriver-src/src/main/command_line.c new file mode 100644 index 0000000000..ecc9528dd6 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/command_line.c @@ -0,0 +1,179 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + + https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Option-Example.html + https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html#Getopt-Long-Options + +Data Type: struct option +This structure describes a single long option name for the sake of getopt_long. +The argument longopts must be an array of these structures, one for each long option. Terminate the array with an element containing all zeros. + +The struct option structure has these fields: + +- const char *name + This field is the name of the option. It is a string. + +- int has_arg + This field says whether the option takes an argument. It is an integer, and there are three legitimate values: no_argument, required_argument and optional_argument. + +- int *flag + +- int val + These fields control how to report or act on the option when it occurs. + + If flag is a null pointer, then the val is a value which identifies this option. + Often these values are chosen to uniquely identify particular long options. + + If flag is not a null pointer, it should be the address of an int variable which is the flag for this option. + The value in val is the value to store in the flag to indicate that the option was seen. + +*/ +#include +#include +#include +#include +#include +#include + +struct yambo_seed_struct command_line(int argc, char *argv[], struct options_struct opts[], struct tool_struct t, int *use_editor, int *use_mpi, int n_options) +{ + int n_active,n_vars,opt=0,i_opt; + char opt_string[100],ch[3]; + /* */ + yambo_seed_struct y; + /* + Pre-sets + */ + y.in_file = malloc(strlen(t.tool)+3); + y.parenv_file = NULL; + strcpy(y.in_file,t.tool); + strcat(y.in_file,".in"); + y.in_dir="."; + y.out_dir="."; + y.com_dir="."; + y.job=""; + strcpy(y.string,""); + /* */ + n_active=0; + for(i_opt=0;i_opt 0) {printf ("GETOPT ouput: %c %s",opts[i_opt].short_opt,opts[i_opt].long_opt);} + printf ("\n"); + */ + /* help */ + if (strcmp(opts[i_opt].long_opt,"help")==0){ + if (optarg == NULL && argv[optind] != NULL && argv[optind][0] != '-') { // not an option + usage(opts,t,argv[optind],n_options); + ++optind; + } else { // handle case of argument immediately after option + if (optarg == NULL) usage(opts,t,"help",n_options); + if (optarg != NULL) usage(opts,t,optarg,n_options); + } + exit(0); + } + /* version */ + if (strcmp(opts[i_opt].long_opt,"version")==0){ + usage(opts,t,"version",n_options); + exit(0); + } + if (strcmp(opts[i_opt].long_opt,"Input")==0){y.in_file=optarg;continue;} + if (strcmp(opts[i_opt].long_opt,"Job")==0){y.job=optarg;continue;} + if (strcmp(opts[i_opt].long_opt,"Idir")==0){y.in_dir=optarg;continue;} + if (strcmp(opts[i_opt].long_opt,"Cdir")==0){y.com_dir=optarg;continue;} + if (strcmp(opts[i_opt].long_opt,"parenv")==0){y.parenv_file=optarg;continue;} + if (strcmp(opts[i_opt].long_opt,"Odir")==0){y.out_dir=optarg;continue;} + if (strcmp(opts[i_opt].long_opt,"nompi")==0){*use_mpi=-1;continue;} + if (strcmp(opts[i_opt].long_opt,"Quiet")==0){*use_editor=-2;continue;} + if (opt > 0) { + strcat(y.string," "); + strcat(y.string,opts[i_opt].yambo_string); + } + if (optarg) { + strcat(y.string," "); + strcat(y.string,optarg); + } + }; + /* + Sizes + */ + y.string_N=strlen(y.string); + y.in_file_N=strlen(y.in_file); + y.out_dir_N=strlen(y.out_dir); + y.in_dir_N=strlen(y.in_dir); + y.com_dir_N=strlen(y.com_dir); + y.job_N=strlen(y.job); + /* */ + return(y); +}; + + + diff --git a/lib/archive/Ydriver-src/src/main/input_file.c b/lib/archive/Ydriver-src/src/main/input_file.c new file mode 100644 index 0000000000..be111ef891 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/input_file.c @@ -0,0 +1,57 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ +#include +#include +#include +#include + +void input_file(struct yambo_seed_struct y,struct tool_struct t,int *use_editor) +{ + int ttd; + char edit_line[100]={'\0'},file_name[100]={'\0'}; + /* + External functions + */ + extern int guess_winsize(); + /* + stdlog? + */ + ttd=guess_winsize(); + /* */ + strcpy(edit_line,t.editor); + strcpy(file_name,y.in_file); + if (y.parenv_file !=NULL) {strcpy(file_name,y.parenv_file);}; + strncat(edit_line," ",1); + strncat(edit_line,file_name,strlen(file_name)); +#if defined _yambo || defined _ypp + if (*use_editor == 1 && ttd>0 && strstr(t.editor,"none ")==0) + { + system(edit_line); + }else if (*use_editor == -2){ + fprintf(stderr," \n%s%s %s %s\n\n",t.tool,": input file",file_name,"created"); + exit (0); + }; +#endif +}; diff --git a/lib/archive/Ydriver-src/src/main/launcher.c b/lib/archive/Ydriver-src/src/main/launcher.c new file mode 100644 index 0000000000..3b35716d24 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/launcher.c @@ -0,0 +1,160 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ +#include +#include +#include +#include +#include +#include +#if defined _yambo || defined _ypp || defined _a2y || defined _p2y + #include +#endif +#if defined _MPI + #include +#endif + +void launcher(int argc, char *argv[],int np, int pid, struct yambo_seed_struct y,int *use_editor, int *use_mpi) +{ + int yambo_err; + /* + Par Environments? Yes? => Return + */ +#if defined _yambo + if (y.parenv_file !=NULL) + { + int env_editor=load_environments(y.parenv_file); + if (env_editor==1) + { + *use_editor=1; + return; + }; + }; +#endif + /* + MPI + */ +#if defined _MPI + if (*use_mpi==1) { + MPI_Init(&argc,&argv); /* starts MPI */ + MPI_Comm_rank(MPI_COMM_WORLD, &pid); /* get current process id */ + MPI_Comm_size(MPI_COMM_WORLD, &np); /* get number of processes */ + }; +#endif +#if defined _example_driver + /* + Testing Driver + =========================================================================== + */ + yambo_err=F90_FUNC(main)( +#include + ); +#endif +#if defined _yambo + /* + Running the Fortran YAMBO driver + =========================================================================== + */ + yambo_err=F90_FUNC(yambo)( +#include + ); + if(yambo_err==2) exit(0); /* DB listing mode */ +#endif +#if defined _ypp + /* + Running the Fortran YPP driver + =========================================================================== + */ + F90_FUNC(ypp)( +#include + ); +#endif +#if defined _c2y + /* + Running the Fortran c2y driver + =========================================================================== + */ + F90_FUNC(c2y)( +#include + ); +#endif +#if defined _a2y + /* + Running the Fortran a2y driver + =========================================================================== + */ + F90_FUNC(a2y)( +#include + ); +#endif +#if defined _p2y + /* + Running the Fortran p2y driver + =========================================================================== + */ + F90_FUNC(p2y)( +#include + ); +#endif +#if defined _e2y + /* + Running the Fortran p2y driver + =========================================================================== + */ + F90_FUNC(e2y)( +#include + ); +#endif +#if defined _eph2y + /* + Running the Fortran eph2y driver + =========================================================================== + */ + F90_FUNC(eph2y)( +#include + ); +#endif + /* + Input file edit ? + =========================================================================== + */ + if ( y.in_file_N ==1 && *use_editor ==0 ) {*use_editor=1;}; + if ( y.in_file_N ==0 || y.in_file_N ==2 ) {*use_editor=0;}; + /* + Error message + =========================================================================== + */ + if ( y.in_file_N < 0 ) + { + if (pid==0 && y.in_file_N == -1) { + fprintf(stderr," \n%s\n\n","yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)"); + }; + if (pid==0 && y.in_file_N == -2) { + fprintf(stderr," \n%s\n\n","yambo: invalid command line options and/or build"); + }; +#if defined _MPI + if (*use_mpi==1) { MPI_Abort(MPI_COMM_WORLD,1); }; +#endif + } +}; diff --git a/lib/archive/Ydriver-src/src/main/load_environments.c b/lib/archive/Ydriver-src/src/main/load_environments.c new file mode 100644 index 0000000000..d2f99cb881 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/load_environments.c @@ -0,0 +1,85 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include + +int load_environments(char* file_name) +{ + FILE *fp; + char str[100]; + char* pch; + char* token; + char* var; + char* value; + fp = fopen(file_name, "r"); + if (fp) { + while(fgets(str, 100, fp)) { + pch=strchr(str,'#'); + if (!pch) { + /* get the first token */ + token=strtok(str," "); + /* walk through other tokens */ + if ( token != NULL ) + { + token = strtok(NULL," "); + var=token; + token = strtok(NULL," "); + value=token; + /* printf( " %s %s %s \n", var, value, token ); */ + } + setenv(var,value,1); + } + } + return 0; + }else{ + fp = fopen(file_name, "w+"); + fputs("#\n",fp); + fputs("# Edit it and use with -E during runtime\n#\n",fp); + fputs("# CPU section (just edit, do not remove fields)\n",fp); + fputs("setenv YAMBO_X_q_0_CPU 1.1.1.1\n",fp); + fputs("setenv YAMBO_X_finite_q_CPU 1.1.1.1.1\n",fp); + fputs("setenv YAMBO_X_all_q_CPU 1.1.1.1.1\n",fp); + fputs("setenv YAMBO_BS_CPU 1.1.1\n",fp); + fputs("setenv YAMBO_SE_CPU 1.1.1\n",fp); + fputs("setenv YAMBO_RT_CPU 1.1.1.1\n",fp); + fputs("# Scalapack section (leave unchanged if you wish)\n",fp); + fputs("setenv YAMBO_X_q_0_nCPU_LinAlg_INV 1\n",fp); + fputs("setenv YAMBO_X_finite_q_nCPU_LinAlg_INV 1\n",fp); + fputs("setenv YAMBO_X_all_q_nCPU_LinAlg_INV 1\n",fp); + fputs("setenv YAMBO_BS_nCPU_LinAlg_INV 1\n",fp); + fputs("setenv YAMBO_BS_nCPU_LinAlg_DIAGO 1\n",fp); + fputs("# ROLEs section (leave unchanged if you wish)\n",fp); + fputs("setenv YAMBO_X_q_0_ROLEs g.k.c.v\n",fp); + fputs("setenv YAMBO_X_finite_q_ROLEs q.g.k.c.v\n",fp); + fputs("setenv YAMBO_X_all_q_ROLEs q.g.k.c.v\n",fp); + fputs("setenv YAMBO_BS_ROLEs k.eh.t\n",fp); + fputs("setenv YAMBO_SE_ROLEs q.qp.b\n",fp); + fputs("setenv YAMBO_RT_ROLEs k.b.q.qp\n",fp); + fclose(fp); + return 1; + } +}; diff --git a/lib/archive/Ydriver-src/src/main/options_maker.c b/lib/archive/Ydriver-src/src/main/options_maker.c new file mode 100644 index 0000000000..771a166954 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/options_maker.c @@ -0,0 +1,92 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ +#include +#include +#if defined _yambo + #include +#endif +#if defined _example_driver + #include +#endif +#include +#include + +void options_maker(struct options_struct options[], int n_options) +{ + int i_opt,dummy,i; + int max_long_desc=20; + + for(i_opt=0;i_opt 0 ) continue; + options[i_opt].short_opt=dummy; + dummy--; + } +} diff --git a/lib/archive/Ydriver-src/src/main/title.c b/lib/archive/Ydriver-src/src/main/title.c new file mode 100644 index 0000000000..3bd956459b --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/title.c @@ -0,0 +1,49 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ +#include +#include +#include +#include + +void title(FILE *file_name,char *cmnt, struct tool_struct t) +{ + char *tool = running_tool(); + char *pj = running_project(); + char *libs = running_libraries(); + fprintf(file_name,"%s%s\n",cmnt, " ___ __ _____ __ __ _____ _____ "); + fprintf(file_name,"%s%s\n",cmnt, "| Y || _ || Y || _ \\ | _ |"); + fprintf(file_name,"%s%s\n",cmnt, "| | ||. | ||. ||. | / |. | |"); + fprintf(file_name,"%s%s\n",cmnt, " \\ _/ |. _ ||.\\ / ||. _ \\ |. | |"); + fprintf(file_name,"%s%s\n",cmnt, " |: | |: | ||: | ||: | \\|: | |"); + fprintf(file_name,"%s%s\n",cmnt, " |::| |:.|:.||:.|:.||::. /|::. |"); + fprintf(file_name,"%s%s\n",cmnt, " `--\" `-- --\"`-- --\"`-----\" `-----\""); + fprintf(file_name,"%s '%s' \n",cmnt,t.desc); + if (strlen(pj)>0) { + fprintf(file_name,"%s\n%s This is : %s(%s)",cmnt,cmnt,tool,pj); + }else{ + fprintf(file_name,"%s\n%s This is : %s",cmnt,cmnt,tool); + } + fprintf(file_name,"%s\n%s Version : %s ",cmnt,cmnt,t.version_string); + fprintf(file_name,"%s\n%s Configuration: %s \n",cmnt,cmnt,libs); +}; diff --git a/lib/archive/Ydriver-src/src/main/tool_init.c b/lib/archive/Ydriver-src/src/main/tool_init.c new file mode 100644 index 0000000000..bc0ef3c177 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/tool_init.c @@ -0,0 +1,101 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ + +#include +#include +#include +#include +#include +#include +#include +#if defined _yambo || defined _ypp + #include +#endif + +/* + AM 29/7/2021 + + This source is project dependent via tool.h. In order to properly compile it, then, + I need to add fictiuous pre-compiler options + +*/ +#if defined _p2y || defined _a2y || defined _c2y || defined _2y +#endif + +struct tool_struct tool_init( ) +{ + tool_struct t; + t=versions(); +#if defined _yambo || defined _ypp + t.editor=editor; +#else + t.editor="vim"; +#endif + t.tool=tool; + t.desc=tool_desc; + /* + Projects + */ + char *pj=NULL; +#if defined _YPP_ELPH || defined _ELPH + pj="ph"; +#endif +#if defined _YPP_RT || defined _RT + pj="rt"; +#endif +#if defined _YPP_SC || defined _SC + pj="sc"; +#endif +#if defined _YPP_NL || defined _NL + pj="nl"; +#endif +#if defined _YPP_DF || defined _DF + pj="df"; +#endif +#if defined _QED + pj="qed"; +#endif +#if defined _SURF + pj="surf"; +#endif + + if (pj!=NULL) { + t.bin = malloc(strlen(tool)+strlen(pj)+1); + strcpy(t.bin,t.tool); + t.pj=pj; + strcat(t.bin,"_"); + strcat(t.bin,t.pj); + }else{ + t.bin = malloc(strlen(tool)); + strcpy(t.bin,t.tool); + pj=""; + t.pj=pj; + } + if (pj==NULL) pj=" "; + sprintf(t.version_string,"%i.%i.%i Revision %i Hash %s",t.version,t.subversion, + t.patchlevel,t.revision,t.hash); + return(t); +}; + diff --git a/lib/archive/Ydriver-src/src/main/usage.c b/lib/archive/Ydriver-src/src/main/usage.c new file mode 100644 index 0000000000..652b700561 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/usage.c @@ -0,0 +1,149 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include + +void usage(options_struct *options, struct tool_struct t, char *what, int n_options) +{ + int i_opt,i,i_o,n_blanks,n_strings; + + char *pj = running_project(); + char *tool = running_tool(); + char *libs = running_libraries(); + + int max_long_desc=20; + + /* + Order + */ + int n_orders=19,n_order_elements; + char *order[]={ + "Help & version", /* 1 */ + "Input file & Directories", /* 2 */ + "Parallel Control", /* 3 */ + "Initializations", /* 4 */ + "Response Functions", /* 5 */ + "Self-Energy", /* 6 */ + "Bethe-Salpeter Equation", /* 7 */ + "Hamiltonians & Potentials", /* 8 */ + "Real-Time", /* 9 */ + "Surface Spectroscopy", /* 10 */ + "Total Energy", /* 11 */ + "Interface", /* 12 */ + "Brillouin Zone", /* 13 */ + "Convertions", /* 14 */ + "Plots", /* 15 */ + "SOC", /* 16 */ + "Utilites", /* 17 */ + "Wannier", /* 18 */ + "undef", /* 19 */ + }; + + if (strcmp(what,"help")==0) { + + title(stderr,"",t); + + n_strings=0; + for(i_opt=0;i_optn_strings) n_strings=n_blanks; + }; + + for(i_o=0;i_o57) + {fprintf(stderr," (-%c)",options[i_opt].short_opt);} + else + {for(i=1;i<=5;i++) fprintf(stderr," ");}; + for(i=1;i<=options[i_opt].int_var;i++) {fprintf(stderr," %s","");}; + for(i=1;i<=options[i_opt].float_var;i++) {fprintf(stderr," %s","");}; + for(i=1;i<=options[i_opt].char_var;i++) {fprintf(stderr," %s","");}; + n_blanks=n_strings+2-options[i_opt].int_var*6-options[i_opt].float_var*7-options[i_opt].char_var*9; + for(i=1;i<=n_blanks;i++) fprintf(stderr," "); + fprintf(stderr," :%s",options[i_opt].short_desc); + if (options[i_opt].long_desc[0]!= NULL) fprintf(stderr," %s%s%s","(more with -h ",options[i_opt].long_opt,")"); + fprintf(stderr,"\n"); + } + } + + fprintf(stderr,"\n"); + fprintf(stderr,"%s\n\n"," YAMBO developers group (http://www.yambo-code.org)"); + + }else if (strcmp(what,"version")==0) { + if (strlen(pj)>0) { + fprintf(stderr,"\nThis is %s(%s) - %s - Ver. %s \n\n",tool,pj,libs,t.version_string); + }else{ + fprintf(stderr,"\nThis is %s - %s - Ver. %s \n\n",tool,libs,t.version_string); + } + }else{ + for(i_opt=0;i_opt57) fprintf(stderr," Short option: %c\n",options[i_opt].short_opt); + if (options[i_opt].int_var+options[i_opt].float_var+options[i_opt].char_var>0) + { + fprintf(stderr," Variables :"); + for(i=1;i<=options[i_opt].int_var;i++) {fprintf(stderr," %s","");}; + for(i=1;i<=options[i_opt].float_var;i++) {fprintf(stderr," %s","");}; + for(i=1;i<=options[i_opt].char_var;i++) {fprintf(stderr," %s","");}; + fprintf(stderr,"\n"); + } + if (options[i_opt].long_desc[0]!= NULL) + { + fprintf(stderr," Description :%s",options[i_opt].short_desc); + for(i=0;i +#include +#include +#include +#include + +int use_me(struct options_struct options[], struct tool_struct t, int i_opt) +{ + char *pch,str[100]; + if (options[i_opt].short_desc==NULL) return 0; + strcpy(str,options[i_opt].bin); + pch = strtok(str," "); + while (pch != NULL) + { + if (strcmp(pch,t.tool)==0) return 1; + if (strcmp(pch,t.bin)==0) return 1; + if (strcmp(pch,"all")==0) return 1; + pch = strtok (NULL, " "); + } +}; diff --git a/lib/archive/Ydriver-src/src/main/winsize.c b/lib/archive/Ydriver-src/src/main/winsize.c new file mode 100644 index 0000000000..b625f8b8f9 --- /dev/null +++ b/lib/archive/Ydriver-src/src/main/winsize.c @@ -0,0 +1,47 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +*/ + +#include +#include +#include +#include +#include + +int guess_winsize() +{ + int width; + struct winsize ws; + if (!isatty(2)) {width=-1;return width;} + if( ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0 ) + width = 79; + else + width = ws.ws_col - 1; + return width; +}; +int C_FUNC(win_size, WIN_SIZE)(int *win_width) +{ + *win_width = 0; + *win_width = guess_winsize(); + return 0; +}; diff --git a/lib/archive/Ydriver-src/src/options/.objects b/lib/archive/Ydriver-src/src/options/.objects new file mode 100644 index 0000000000..f81b3c5580 --- /dev/null +++ b/lib/archive/Ydriver-src/src/options/.objects @@ -0,0 +1 @@ +objs = options_help.o diff --git a/lib/archive/Ydriver-src/src/options/options_help.c b/lib/archive/Ydriver-src/src/options/options_help.c new file mode 100644 index 0000000000..09e6f4f446 --- /dev/null +++ b/lib/archive/Ydriver-src/src/options/options_help.c @@ -0,0 +1,47 @@ +/* + Copyright (C) 2000-2022 the YAMBO team + http://www.yambo-code.org + + Authors (see AUTHORS file for details): AM + + This file is distributed under the terms of the GNU + General Public License. You can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; + either version 2, or (at your option) any later version. + + This program is distributed in the hope that it will + be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, + MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +*/ +#include +#include + +void options_help(struct options_struct options[],int *i_opt) +{ + char *desc="Help & version"; + /* + Help(s) + */ + *i_opt=*i_opt+1; + options[*i_opt].short_desc=" can be an option (e.g. -h optics)"; + options[*i_opt].short_opt='h'; + options[*i_opt].long_opt="help"; + options[*i_opt].serial_var=1; + options[*i_opt].optional_var=1; + options[*i_opt].char_var=1; + options[*i_opt].section=desc; + *i_opt=*i_opt+1; + options[*i_opt].short_desc="Code version & libraries"; + options[*i_opt].long_opt="version"; + options[*i_opt].serial_var=1; + options[*i_opt].section=desc; +}; diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 9c8a47fc06..f13b4aa21f 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -47,5 +47,6 @@ K_stored_in_a_big_matrix.o K_stored_in_a_slepc_matrix.o PL_diago_residual.o + PL_diago_residual_old.o PL_via_perturbative_inversion.o diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 79fc4b5dbc..1220e7e3f1 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -209,14 +209,15 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) write (*,*) "iresares", i_res_ares write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares), i_T_g f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) - res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*PL_weights(1))**2*BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) !was missing R< - ares_PL= -res_PL + BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) + res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*PL_weights(1))**2*BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) !was missing R< + ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) if(l_BS_trace) then do i_dip=2,BS_dip_size - res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*PL_weights(i_dip))**2*BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) ! was missing only R< - ares_PL= -res_PL + BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) + res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*PL_weights(i_dip))**2*BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) ! was missing only R< + ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) enddo - res_PL=res_PL*f_eh_PL*Z_eh*E_eh + res_PL=res_PL*f_eh_PL*Z_eh*E_eh + ares_PL=ares_PL*f_eh_PL*Z_eh*E_eh endif write(*,*) 'P_weighted', P_weighted write(*,*) 'E_eh', E_eh diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index bf72aed507..4013cf61ab 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -122,22 +122,22 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! enddo ! -!BS_R_PL(2,:)=-BS_R_PL(1,:) We disagree with this relationship +BS_R_PL(2,:)=-BS_R_PL(1,:) !We disagree with this relationship ! -compute_ares_explicitly=.true. +compute_ares_explicitly=.false. if (compute_ares_explicitly) then ! do i_c=1,BS_dip_size do i_K=1,BS_K_dim(1) - P_x_fZ(i_K,i_c,2)=conjg(BSS_dipoles_PL(i_c,i_K)) *sqrt(abs((BSS_eh_f_RES(i_K)))) !antiresonat + P_x_fZ(i_K,i_c,2)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx((BSS_eh_f_RES(i_K)))) !antiresonat !Pi^* *sqrt(R) enddo +write(*,*) 'P_x_fZ', P_x_fZ enddo write(*,*) 'BS_K_dim(1)', BS_K_dim(1) !36 write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f_RES) !72 write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) !72 write(*,*) 'shape(BSS_dipoles_PL)', shape(BSS_dipoles_PL) !3 72 -!write(*,*) 'BSS_V_right(577,576)', BS_V_right(577,576) do i_l=1,BSS_n_eig ! if (.not.px%element_1D(i_l)) cycle !parallelization @@ -146,7 +146,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! do ik = 1,BS_K_dim(1) !R_over_R_x_A(2,ik) = BSS_PL_f(ik+BS_K_dim(1))*BS_mat(ik,i_l)/abs(BSS_eh_f_RES(ik)) !antiresonant !R Date: Thu, 22 Dec 2022 00:29:48 +0100 Subject: [PATCH 0538/1367] Version 5.1.0, Revision 22138, Hash 9deecc59b MODIFIED * include/driver/version.h a2y/a2y_gkkp.F Changes: - [a2y] inverted gppk indexes n and m Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 1d3e55fd57..2e92d0d747 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21777 -#define YAMBO_HASH "ef4f442a1" +#define YAMBO_REVISION 22138 +#define YAMBO_HASH "9deecc59b" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index e0f14128be..9fcc378497 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -286,7 +286,7 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! See eq.(5) of the notes of Fulvio do i_n=1,elph_nb do i_m=1,elph_nb - GKKP%dVc(i_modes,i_n,i_m,ik,1)=cmplx(gstore_abinit(1,i_m,i_n,i_modes,ik,1),& + GKKP%dVc(i_modes,i_m,i_n,ik,1)=cmplx(gstore_abinit(1,i_m,i_n,i_modes,ik,1),& & -gstore_abinit(2,i_m,i_n,i_modes,ik,1),kind=SP) enddo enddo From e8f669ba54ac84aa9f2bbd15341b7e6196c29088 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 22 Dec 2022 10:29:22 +0100 Subject: [PATCH 0539/1367] Version 5.1.0, Revision 22139, Hash dd5176fa7 MODIFIED * include/driver/version.h a2y/a2y_gkkp.F Bugs: - [a2y] Addressing issue #690 Now ndb.gkkp databases contain the matrix elements according to the abinit convention. This is done to mimic what happens with the ndb.gkkp databases obtained from the QE interface They contain dVc(in,im,ik,iq) = < n k+q|g(q)| m k> Yambo later would need < n k|g(q)| m k-q> = (< m k-q|g(-q)| n k>)* = (dVc(im,in,ik,-iq))* This needs to be done at loading time. To double check what happens to the q index. See also issue #609 ... Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2e92d0d747..fd0fe686ac 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22138 -#define YAMBO_HASH "9deecc59b" +#define YAMBO_REVISION 22139 +#define YAMBO_HASH "dd5176fa7" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 9fcc378497..200b78117d 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -282,12 +282,20 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! do ik=1,elph_nk_bz do i_modes=1,ph_modes - ! Invert the band indexes and do the complex conjugate + ! Here we should invert the band indexes and do the complex conjugate ! See eq.(5) of the notes of Fulvio + ! This operation however is already performed inside the subrtouine + ! src/el-ph/ELPH_databases_load.F + ! + ! See comment there, reported also here. + ! There has been a key error in the definition of the el-ph SE of the BKE (Eq. 30_9_11.18) + ! where the band indexes have been exchanged. Instead of doing a global change of the notes + ! and of the code I decided, here, to exchange the indexes: + ! do i_n=1,elph_nb do i_m=1,elph_nb GKKP%dVc(i_modes,i_m,i_n,ik,1)=cmplx(gstore_abinit(1,i_m,i_n,i_modes,ik,1),& - & -gstore_abinit(2,i_m,i_n,i_modes,ik,1),kind=SP) + & gstore_abinit(2,i_m,i_n,i_modes,ik,1),kind=SP) enddo enddo enddo @@ -302,7 +310,8 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ipos(1:5) =(/1,1,1,1,iq/) isize(1:5)=(/2,3,n_atoms,ph_modes,1/) ! - varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") + !varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") + varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") netcdf_error = nf90_get_var(ncid, varid, pheigvec_cart_ibz, ipos(1:5), isize(1:5)) ! do xyz=1,3 From 3125831bf4cfae04ed8f59558bf34c6ec4c6bbf1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 22 Dec 2022 10:36:28 +0100 Subject: [PATCH 0540/1367] Version 5.1.0, Revision 22140, Hash e8f669ba5 MODIFIED * include/driver/version.h a2y/a2y_gkkp.F Bugs: - [a2y] Fixed wrong variable name entered by mistake Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index fd0fe686ac..f7e03ad85b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22139 -#define YAMBO_HASH "dd5176fa7" +#define YAMBO_REVISION 22140 +#define YAMBO_HASH "e8f669ba5" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 200b78117d..f436148bab 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -310,8 +310,8 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ipos(1:5) =(/1,1,1,1,iq/) isize(1:5)=(/2,3,n_atoms,ph_modes,1/) ! - !varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") - varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") + varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") + !varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") netcdf_error = nf90_get_var(ncid, varid, pheigvec_cart_ibz, ipos(1:5), isize(1:5)) ! do xyz=1,3 From 9ff96c53cbccd5cbce80063cfb4f833c21294ad2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 22 Dec 2022 16:38:05 +0100 Subject: [PATCH 0541/1367] Version 5.1.0, Revision 22141, Hash 3125831bf MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Bugs: - [yambo_ph] Fixed compilation issue Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f7e03ad85b..0fd698f882 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22140 -#define YAMBO_HASH "e8f669ba5" +#define YAMBO_REVISION 22141 +#define YAMBO_HASH "3125831bf" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 43d1fce175..ce34b5508d 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -231,7 +231,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! I/O !===== call io_control(ACTION=WR_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp) + io_err=io_EXCPH_gkkp(ID_exc_gkkp,"all") ! enddo ! From 8e67315b1e99daf88cc46bcb0e24196944c551b6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 Dec 2022 12:54:29 +0100 Subject: [PATCH 0542/1367] Version 5.1.0, Revision 21860, Hash fb0ea9488 MODIFIED * include/driver/version.h NEW * real_time_control/NL_project.dep Changes: - [yambo_nl] Added missing NL_project.dep Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/real_time_control/NL_project.dep | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/real_time_control/NL_project.dep diff --git a/include/driver/version.h b/include/driver/version.h index 4082637686..eae8e5f2bc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21781 -#define YAMBO_HASH "09c7115f9" +#define YAMBO_REVISION 21860 +#define YAMBO_HASH "fb0ea9488" diff --git a/src/real_time_control/NL_project.dep b/src/real_time_control/NL_project.dep new file mode 100644 index 0000000000..bbbad1cf24 --- /dev/null +++ b/src/real_time_control/NL_project.dep @@ -0,0 +1,2 @@ + RT_databases_IO.o + From 9e6bbe34b84bad3ef995067c8586893b92c6f3a6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 Dec 2022 13:59:17 +0100 Subject: [PATCH 0543/1367] Version 5.1.0, Revision 21861, Hash 8e67315b1 MODIFIED * include/driver/version.h modules/mod_fields.F ypp/real_time/RT_OBSERVABLES_IO_path.F ypp/real_time/RT_X_LRR_real_field.F Changes: - [real_time / nl_optics] Linear response post-processing can be done with multi-frequency fields - [real_time / nl_optics] In presence of multi-frequency fields (a) Field initial phase changes among the frequencies (b) Intensity is renormalized to the total number of frequencies Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 13 ++++++++----- ypp/real_time/RT_OBSERVABLES_IO_path.F | 20 ++++++++++++++++---- ypp/real_time/RT_X_LRR_real_field.F | 8 +++++--- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index eae8e5f2bc..f1d624af4f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21860 -#define YAMBO_HASH "fb0ea9488" +#define YAMBO_REVISION 21861 +#define YAMBO_HASH "8e67315b1" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 55350569c3..8a54bc4071 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -132,7 +132,7 @@ function small_a(T,E_field,order,envelop_only) real(SP) ::damp_func,a,b,c complex(SP), dimension(2) :: small_a ! - integer ::i_fr,i_field,n_fields + integer ::i_fr,i_field,n_fields,n_freqs real(SP) ::T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z character(schlen) ::field_defs(3) @@ -155,6 +155,7 @@ function small_a(T,E_field,order,envelop_only) sigma=E_field%width fr_shift(1)=0._SP fr_shift(2)=pi/2._SP + n_freqs=max(1,E_field%n_frequencies) ! field_defs="" call STRING_split(trim(E_field%ef_name),field_defs) @@ -185,7 +186,7 @@ function small_a(T,E_field,order,envelop_only) if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') ! Fields which need T_0 - W_0=field_frequency(E_field,1) + W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0=2._SP*sigma if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0=3._SP*sigma @@ -196,7 +197,7 @@ function small_a(T,E_field,order,envelop_only) E_field%To=T_0 ! do i_field=1,n_fields - do i_fr=1,max(1,E_field%n_frequencies) + do i_fr=1,n_freqs ! if (envelop_only_) then W_field=0._SP @@ -207,12 +208,14 @@ function small_a(T,E_field,order,envelop_only) W_field=field_frequency(E_field,i_fr) W_field_m1=1._SP/W_field WtimesT=W_field*(T-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase + if(n_freqs>0) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif endif - ! + ! EXPf=exp(-(T-T_0)**2/(2._SP*sigma**2) ) ! select case( trim(field_defs(1)) ) @@ -306,7 +309,7 @@ function small_a(T,E_field,order,envelop_only) enddo enddo ! - small_a=f_t + small_a=f_t/real(n_freqs,SP) ! end function small_a ! diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index 403e95cb92..6e4f89b39c 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -25,7 +25,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! use YPP_interfaces, ONLY:RT_OBSERVABLES_IO use YPP_real_time, ONLY:Probe_Keyword,Pump_Keyword,max_n_of_paths,Pump_path,Probe_path,& -& N_pumps,N_probes,N_probe_frequencies +& N_pumps,N_probes,N_probe_frequencies,X_order use RT_output_m, ONLY:RT_desc use com, ONLY:core_io_path,msg,jobstr use IO_m, ONLY:NONE @@ -148,13 +148,19 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! if (N_pumps>0) then call DESC_compare(RT_desc,Pump_RT_desc,i_desc_err,exclude="FIELDs") - if (any(i_desc_err/=0)) call error("Probe and Pump runs are not compatible") + if (any(i_desc_err/=0)) call warning("Probe and Pump runs differ") if (n_ext_fields/=2) call warning("Probe run has only one field. Pump ignored") endif ! ! In case of several probe_frequencies only one probe is supported ! - if (N_probes>1.and.N_probe_frequencies>1) N_probes=0 + if (N_probes>1.and.N_probe_frequencies>1) then + if (X_order==1) call warning("Using multi-frequency probe") + if (X_order/=1) then + call warning("Multi-frequency probe not supported for NL optics") + N_probes=0 + endif + endif ! call IO_temporary_jobdir_and_strings("ALL","RESTORE") ! @@ -174,7 +180,13 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! I can use ANTIRES/RES probes with multiple frequencies only by using ! ProbeKey in the input file. This is because of the procedures defined in X_effective/X_inversion. ! - if (Efield(i_Probe)%n_frequencies>1) IO_error=.TRUE. + if (Efield(i_Probe)%n_frequencies>1) then + if (X_order==1) call warning("Using multi-frequency probe") + if (X_order/=1) then + call warning("Multi-frequency probe not supported for NL optics") + IO_error=.TRUE. + endif + endif if (.not.IO_error) N_probes=1 ! ! If no Probes using the Keyword try using jobstr diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index dc1d78aa13..334433718c 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -46,7 +46,7 @@ subroutine RT_X_LRR_real_field(en) ! ! Work Space ! - integer :: i_t,i_w,i_p_dir,iE_err,i_Probe,i_field,n_fields,NW + integer :: i_t,i_w,i_p_dir,iE_err,i_Probe,i_field,n_fields,n_freqs,NW logical :: l_rm_asympt_limit real(SP) :: W_reached,Field_time,outdata(6),E_ver(3,3),Fac complex(SP) :: OBS_proj,OBS_vec(3),E_w_SP(3),Field,E_of_t(2),A_of_t(2),theta,delta,Field_freq @@ -62,8 +62,10 @@ subroutine RT_X_LRR_real_field(en) call parser('RmAsymLim',l_rm_asympt_limit) ! i_Probe=1 - if(trim(Efield(i_Probe)%ef_pol)=="linear" ) n_fields=1 + n_freqs=1 + n_fields=1 if(trim(Efield(i_Probe)%ef_pol)=="circular") n_fields=2 + if( Efield(i_Probe)%n_frequencies > 1 ) n_freqs=Efield(i_Probe)%n_frequencies ! ! Pump removal (if any) !----------------------- @@ -125,7 +127,7 @@ subroutine RT_X_LRR_real_field(en) !... Analytic ... ! iE_err=-1 - if (n_fields==1.and.trim(X_kind)=="rhorho") then + if (n_fields==1.and.n_freqs==1.and.trim(X_kind)=="rhorho") then do i_w = 1, RT_conf%W_n_steps ! if(trim(RT_conf%damping) /= "NONE") Field_freq=ElField%W(i_w)-cI*RT_conf%damp_factor From 84af55bc67844bac0e6db5833a8d1ab44c249c4a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 Dec 2022 14:01:36 +0100 Subject: [PATCH 0544/1367] Version 5.1.0, Revision 21862, Hash 9e6bbe34b MODIFIED * include/driver/version.h sbin/compilation/check_updated_locks.sh Changes: - [compilation] project dependencies are not tested when switching from single to double compilation otherwise check for modules is very slow Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- sbin/compilation/check_updated_locks.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f1d624af4f..ab93f1e033 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21861 -#define YAMBO_HASH "8e67315b1" +#define YAMBO_REVISION 21862 +#define YAMBO_HASH "9e6bbe34b" diff --git a/sbin/compilation/check_updated_locks.sh b/sbin/compilation/check_updated_locks.sh index 20b0e5f6e2..7a15afbf84 100755 --- a/sbin/compilation/check_updated_locks.sh +++ b/sbin/compilation/check_updated_locks.sh @@ -94,6 +94,7 @@ do if [[ "$refs" == *"$file"* ]]; then if [ "$VERB" == 1 ] ; then echo "$step preparing $file"; fi DIR_is_to_recompile=1 + if [ "$lock" == "DOUBLE" ]; then continue; fi obj=$file source ./sbin/compilation/check_object_childs.sh "locks" fi From 6d8c225007506138f919b8b278aac38aeb8868ea Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 Dec 2022 14:50:22 +0100 Subject: [PATCH 0545/1367] Version 5.1.0, Revision 21863, Hash 84af55bc6 MODIFIED * include/driver/version.h modules/mod_fields.F Bugs: - [yambo_rt / yambo_nl] Fixed bug introduced with previous commit Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index ab93f1e033..129e1e7e16 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21862 -#define YAMBO_HASH "9e6bbe34b" +#define YAMBO_REVISION 21863 +#define YAMBO_HASH "84af55bc6" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 8a54bc4071..5cf13e24b0 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -100,7 +100,8 @@ real(SP) function field_frequency(E_field,i_f) integer ::i_f type(ext_field) ::E_field field_frequency=E_field%frequency(1) - if (i_f>1.and.E_field%n_frequencies>1) field_frequency=E_field%frequency(1)+& + if (i_f<=1.or.E_field%n_frequencies<=1) return + field_frequency=E_field%frequency(1)+& & (E_field%frequency(2)-E_field%frequency(1))/(E_field%n_frequencies-1)*(i_f-1) end function ! @@ -209,7 +210,7 @@ function small_a(T,E_field,order,envelop_only) W_field_m1=1._SP/W_field WtimesT=W_field*(T-T_0)+fr_shift(i_field) ! each frequency has a different initial phase - if(n_freqs>0) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(n_freqs>1) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif From 0bdaf18af63be66b248deed61793b6183199e68e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 29 Dec 2022 12:33:54 +0100 Subject: [PATCH 0546/1367] Version 5.1.0, Revision 21864, Hash 6d8c22500 MODIFIED * include/driver/version.h io/io_NL.F modules/mod_fields.F nloptics/NL_initialize.F ypp/real_time/RT_X_response.F Changes: - [yambo_nl] n_ext_fields is not anymore inizialized to 3 by default. - [yambo_nl/yambo_rt] Field initial phase can be controlled adding PHINV to the field kind - [ypp_rt] Post processing with PHINV field is accepted Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_NL.F | 22 +++++++++++----------- src/modules/mod_fields.F | 5 +++++ src/nloptics/NL_initialize.F | 5 ++--- ypp/real_time/RT_X_response.F | 2 +- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 129e1e7e16..c698e849cf 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21863 -#define YAMBO_HASH "84af55bc6" +#define YAMBO_REVISION 21864 +#define YAMBO_HASH "6d8c22500" diff --git a/src/io/io_NL.F b/src/io/io_NL.F index 32b7437e0e..b5ed25d81b 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -127,29 +127,29 @@ integer function io_NL(what,ID) ! i_Prb=1 ! we store only the first field in the fragments ! - call io_elemental(ID_frag,VAR="FIELD_NAME",CH0="",VAR_SZ=1,MENU=0) - call io_elemental(ID_frag,CH0=Efield(i_Prb)%ef_name,VAR=' [FIELDs] Type ',CHECK=.true.,OP=(/"=="/)) + call io_elemental(ID_frag,VAR="PROBE_NAME",CH0="",VAR_SZ=1,MENU=0) + call io_elemental(ID_frag,CH0=Efield(i_Prb)%ef_name,VAR=' [PROBE] Type ',CHECK=.true.,OP=(/"=="/)) call io_elemental(ID_frag,VAR="",VAR_SZ=0,MENU=0) ! - call io_elemental(ID_frag,VAR="EXTERNAL_FIELD",VAR_SZ=10,MENU=0) - call io_elemental(ID_frag,VAR="[FIELDs] Versor ",& + call io_elemental(ID_frag,VAR="PROBE_FIELD",VAR_SZ=10,MENU=0) + call io_elemental(ID_frag,VAR="[PROBE] Versor ",& & R1=Efield(i_Prb)%versor,WARN=.true.,OP=(/"==","==","=="/)) - call io_elemental(ID_frag,VAR="[FIELDs] Intensity [kWCMm2] ",& + call io_elemental(ID_frag,VAR="[PROBE] Intensity [kWCMm2] ",& & R0=Efield(i_Prb)%intensity,CHECK=.true.,OP=(/"=="/),UNIT=AU2KWCMm2) - call io_elemental(ID_frag,VAR="[FIELDs] Field width [fs] ",& + call io_elemental(ID_frag,VAR="[PROBE] Field width [fs] ",& & R0=Efield(i_Prb)%width,CHECK=.true.,OP=(/"=="/)) - call io_elemental(ID_frag,VAR="[FIELDs] Frequency range [eV] ",& + call io_elemental(ID_frag,VAR="[PROBE] Frequency range [eV] ",& & R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV) - call io_elemental(ID_frag,VAR="[FIELDs] Frequency steps ",& + call io_elemental(ID_frag,VAR="[PROBE] Frequency steps ",& & I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/)) - call io_elemental(ID_frag,VAR="[FIELDs] Frequency step [eV] ",& + call io_elemental(ID_frag,VAR="[PROBE] Frequency step [eV] ",& & R0=Efield(i_Prb)%W_step,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) - call io_elemental(ID_frag,VAR='[FIELDs] Initial time [fs] ',& + call io_elemental(ID_frag,VAR='[PROBE] Initial time [fs] ',& & R0=Efield(i_Prb)%t_initial,CHECK=.true.,OP=(/"=="/),UNIT=AUT2FS) call io_elemental(ID_frag,VAR="",VAR_SZ=0,MENU=0) ! call io_elemental(ID_frag,VAR="FIELD_POL",CH0="",VAR_SZ=1,MENU=0) - call io_elemental(ID_frag,CH0=Efield(i_Prb)%ef_pol,VAR="[FIELDs] Polarization ",CHECK=.true.,OP=(/"=="/)) + call io_elemental(ID_frag,CH0=Efield(i_Prb)%ef_pol,VAR="[PROBE] Polarization ",CHECK=.true.,OP=(/"=="/)) call io_elemental(ID_frag,VAR="",VAR_SZ=0,MENU=0) ! ! Polarization diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 5cf13e24b0..2894e67823 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -195,6 +195,11 @@ function small_a(T,E_field,order,envelop_only) if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0=5._SP*sigma end select ! + if( trim(field_defs(2))=="PHINV" .or. trim(field_defs(3))=="PHINV" ) then + fr_shift(1)=pi/2._SP + fr_shift(2)=0._SP + endif + ! E_field%To=T_0 ! do i_field=1,n_fields diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 3eb156fcfd..9dde43cbee 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -33,7 +33,7 @@ subroutine NL_initialize(E,k) use zeros, ONLY:zero_dfl use com, ONLY:msg use R_lattice, ONLY:bz_samp,k_map - use fields, ONLY:Efield,Efield_strength,n_ext_fields,EtoT + use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& @@ -123,10 +123,9 @@ subroutine NL_initialize(E,k) ! ! This part of the code works with only one field ! - n_ext_fields=3 n_active_fields=0 ! - do i1=1,n_ext_fields + do i1=1,n_ext_fields_max ! Efield(i1)%ef_name=trim(Efield(i1)%ef_name) if((Efield(i1)%ef_name=='none')) cycle diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 282bd83741..25dfdba614 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -52,7 +52,7 @@ subroutine RT_X_response(en,k,q) !======================================= call STRING_split(Efield(1)%ef_name,probe_defs,n_non_empty_strings=Ndefs) ! - l_RT_LRR_real_field= all( (/ Ndefs==1 ,N_pumps<=1, N_probes==1, X_order==1/) ) + l_RT_LRR_real_field= all( (/ N_pumps<=1, N_probes==1, X_order==1/) ) ! l_RT_SHG_qssin = all( (/ trim(probe_defs(1))=="QSSIN" , N_pumps==0, N_probes==1, X_order==2/) ) ! From fd77daa897b46b334d500d5f67de6fa561ad2e78 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 29 Dec 2022 12:52:11 +0100 Subject: [PATCH 0547/1367] Version 5.1.0, Revision 21865, Hash 0bdaf18af MODIFIED * include/driver/version.h modules/mod_fields.F Changes: - [yambo_rt/yambo_nl] Added further control on initial phase PHPI2 (replaced PHINV) and PHPI4 options Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c698e849cf..badfdb1dcc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21864 -#define YAMBO_HASH "6d8c22500" +#define YAMBO_REVISION 21865 +#define YAMBO_HASH "0bdaf18af" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 2894e67823..f353337276 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -195,9 +195,12 @@ function small_a(T,E_field,order,envelop_only) if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0=5._SP*sigma end select ! - if( trim(field_defs(2))=="PHINV" .or. trim(field_defs(3))=="PHINV" ) then + if( trim(field_defs(2))=="PHPI2" .or. trim(field_defs(3))=="PHPI2" ) then fr_shift(1)=pi/2._SP - fr_shift(2)=0._SP + fr_shift(2)=pi + else if( trim(field_defs(2))=="PHPI4" .or. trim(field_defs(3))=="PHPI4" ) then + fr_shift(1)=pi/4._SP + fr_shift(2)=3._SP*pi/4._SP endif ! E_field%To=T_0 From b0915133778307a39dff86918ddf937866ba5888 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 29 Dec 2022 18:14:24 +0100 Subject: [PATCH 0548/1367] Version 5.1.0, Revision 21866, Hash fd77daa89 MODIFIED * include/driver/version.h modules/mod_fields.F Changes: - [yambo_rt/yambo_nl] Added rectangular pulse Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 38 +++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index badfdb1dcc..361273141a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21865 -#define YAMBO_HASH "0bdaf18af" +#define YAMBO_REVISION 21866 +#define YAMBO_HASH "fd77daa89" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index f353337276..2c6671f5a7 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -121,6 +121,8 @@ function small_a(T,E_field,order,envelop_only) use X_m, ONLY:global_gauge use pars, ONLY:cI,cONE,cZERO,pi,schlen use wrapper, ONLY:FADEVA + use functions, ONLY:theta_function + use real_time, ONLY:RT_dyn_step ! type(ext_field), intent(inout) ::E_field ! @@ -133,11 +135,11 @@ function small_a(T,E_field,order,envelop_only) real(SP) ::damp_func,a,b,c complex(SP), dimension(2) :: small_a ! - integer ::i_fr,i_field,n_fields,n_freqs + integer ::i1,i_fr,i_field,n_fields,n_freqs real(SP) ::T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z - character(schlen) ::field_defs(3) - logical ::envelop_only_ + character(schlen) ::field_defs(4) + logical ::lchirp,envelop_only_ ! ! Zeroing ! @@ -154,15 +156,13 @@ function small_a(T,E_field,order,envelop_only) ! Field parameters ! sigma=E_field%width - fr_shift(1)=0._SP - fr_shift(2)=pi/2._SP n_freqs=max(1,E_field%n_frequencies) ! field_defs="" call STRING_split(trim(E_field%ef_name),field_defs) ! select case( trim(field_defs(1)) ) - case('STATIC','SIN','ANTIRES','RES','DELTA') + case('STATIC','RECT','SIN','ANTIRES','RES','DELTA') ! Fields which do not need T_0 W_0=0._SP T_0=0._SP @@ -195,13 +195,15 @@ function small_a(T,E_field,order,envelop_only) if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0=5._SP*sigma end select ! - if( trim(field_defs(2))=="PHPI2" .or. trim(field_defs(3))=="PHPI2" ) then - fr_shift(1)=pi/2._SP - fr_shift(2)=pi - else if( trim(field_defs(2))=="PHPI4" .or. trim(field_defs(3))=="PHPI4" ) then - fr_shift(1)=pi/4._SP - fr_shift(2)=3._SP*pi/4._SP - endif + lchirp=.false. + fr_shift(1)=0._SP + fr_shift(2)=pi/2._SP + do i1=1,4 + if( trim(field_defs(i1))=="PHPI1") fr_shift(:)=fr_shift(:)+pi + if( trim(field_defs(i1))=="PHPI2") fr_shift(:)=fr_shift(:)+pi/2._SP + if( trim(field_defs(i1))=="PHPI4") fr_shift(:)=fr_shift(:)+pi/4._SP + if( trim(field_defs(i1))=="CHIRP") lchirp=.true. + enddo ! E_field%To=T_0 ! @@ -218,7 +220,7 @@ function small_a(T,E_field,order,envelop_only) W_field_m1=1._SP/W_field WtimesT=W_field*(T-T_0)+fr_shift(i_field) ! each frequency has a different initial phase - if(n_freqs>1) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(n_freqs>1 .and. lchirp) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif @@ -233,6 +235,12 @@ function small_a(T,E_field,order,envelop_only) if (order==1 ) f_now=1._SP if (order==2 ) f_now=0._SP ! + case('RECT') + if (order==0 .and. abs(T)< sigma) f_now=T + if (order==0 .and. abs(T)>=sigma) f_now=sigma + if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0) ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1) ! delta function + ! case('SIN') if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 if (order==1 ) f_now=+damp_func* f1t @@ -250,9 +258,9 @@ function small_a(T,E_field,order,envelop_only) if (order==2 ) f_now=0._SP ! case('DELTA') + if (order==-1) f_now=1._SP if (order==0 ) f_now=1._SP if (order> 0 ) f_now=0._SP - if (order==-1) f_now=1._SP ! case('GAUSS') if (order==0 ) f_now= sigma*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma*sqrt(2._SP)) )+1._SP ) From 1a2d36366417bcaf98aa19e40d2508693bb91b86 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 Dec 2022 11:36:17 +0100 Subject: [PATCH 0549/1367] Version 5.1.0, Revision 21867, Hash b09151337 MODIFIED * include/driver/version.h modules/mod_fields.F nloptics/NL_initialize.F Changes: - [yambo_rt/yambo_nl] Added RECTSIN pulse - [yambo_nl] Circular fields can be used for pump and probe Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 6 ++++++ src/nloptics/NL_initialize.F | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 361273141a..07049da283 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21866 -#define YAMBO_HASH "fd77daa89" +#define YAMBO_REVISION 21867 +#define YAMBO_HASH "b09151337" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 2c6671f5a7..4d182f02e1 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -241,6 +241,12 @@ function small_a(T,E_field,order,envelop_only) if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0) ! theta function if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1) ! delta function ! + case('RECTSIN') + if (order==0 ) call error('RECTSIN integral not implemented') + if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0)*f1t ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1)*f1t+ & ! delta function + & theta_function(sigma-T,RT_dyn_step,0)*f0t + ! case('SIN') if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 if (order==1 ) f_now=+damp_func* f1t diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 9dde43cbee..6e37669a81 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -151,7 +151,6 @@ subroutine NL_initialize(E,k) ! see definition of "step_case" in function "theta_function" in src/modules/mod_functions.F Efield(i1)%t_initial_indx=max(nint(Efield(i1)%t_initial/RT_step)+1,2) Efield(i1)%t_initial =real(Efield(i1)%t_initial_indx-1)*RT_step - Efield(i1)%ef_pol ="linear" ! call Check_symmetries(Efield(i1)%versor,"electric") ! From d335f9fb38c74aceac1b1c4744dd012ba51e042a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 Dec 2022 15:07:48 +0100 Subject: [PATCH 0550/1367] Version 5.1.0, Revision 21868, Hash 1a2d36366 MODIFIED * include/driver/version.h modules/mod_fields.F Changes: - [yambo_nl] Fixed recently introduced RECTSIN field Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 07049da283..22de3d912d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21867 -#define YAMBO_HASH "b09151337" +#define YAMBO_REVISION 21868 +#define YAMBO_HASH "1a2d36366" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 4d182f02e1..3e42958236 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -136,7 +136,7 @@ function small_a(T,E_field,order,envelop_only) complex(SP), dimension(2) :: small_a ! integer ::i1,i_fr,i_field,n_fields,n_freqs - real(SP) ::T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt + real(SP) ::Tloc,T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z character(schlen) ::field_defs(4) logical ::lchirp,envelop_only_ @@ -162,7 +162,7 @@ function small_a(T,E_field,order,envelop_only) call STRING_split(trim(E_field%ef_name),field_defs) ! select case( trim(field_defs(1)) ) - case('STATIC','RECT','SIN','ANTIRES','RES','DELTA') + case('STATIC','RECT','RECTSIN','SIN','DELTA') ! Fields which do not need T_0 W_0=0._SP T_0=0._SP @@ -218,10 +218,13 @@ function small_a(T,E_field,order,envelop_only) else W_field=field_frequency(E_field,i_fr) W_field_m1=1._SP/W_field - WtimesT=W_field*(T-T_0)+fr_shift(i_field) - ! each frequency has a different initial phase + Tloc=T + if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma + WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase if(n_freqs>1 .and. lchirp) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt + ! f1t=-f0t' f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif @@ -236,16 +239,15 @@ function small_a(T,E_field,order,envelop_only) if (order==2 ) f_now=0._SP ! case('RECT') - if (order==0 .and. abs(T)< sigma) f_now=T - if (order==0 .and. abs(T)>=sigma) f_now=sigma + if (order==0 ) f_now= Tloc if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0) ! theta function if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1) ! delta function ! case('RECTSIN') - if (order==0 ) call error('RECTSIN integral not implemented') + if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0)*f1t ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1)*f1t+ & ! delta function - & theta_function(sigma-T,RT_dyn_step,0)*f0t + if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1)*f1t & ! delta function + &+theta_function(sigma-T,RT_dyn_step,0)*f0t*W_field ! case('SIN') if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 From 7314fe09166e61e12380bae5d7ca08abe5133744 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 3 Jan 2023 16:19:41 +0100 Subject: [PATCH 0551/1367] Version 5.1.0, Revision 21869, Hash d335f9fb3 MODIFIED * include/driver/version.h modules/SET_defaults.F modules/mod_fields.F modules/mod_pars.F real_time_control/RT_Fluence_and_PI_kind.F real_time_initialize/.objects real_time_initialize/RT_Field_Commensurable_Frequencies.F real_time_initialize/RT_initialize.F real_time_propagation/RT_Ext_fields.F ypp/real_time/RT_X_effective.F ypp/real_time/RT_X_response.F NEW * real_time_initialize/RT_field_from_file.F Changes: - [yambo_rt] First version of implementation able to load exteranl fields from file (see issue #694 ) Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/modules/SET_defaults.F | 6 +- src/modules/mod_fields.F | 110 +++++++++++++----- src/modules/mod_pars.F | 1 + .../RT_Fluence_and_PI_kind.F | 13 ++- src/real_time_initialize/.objects | 3 +- .../RT_Field_Commensurable_Frequencies.F | 4 +- src/real_time_initialize/RT_field_from_file.F | 107 +++++++++++++++++ src/real_time_initialize/RT_initialize.F | 48 +++++--- src/real_time_propagation/RT_Ext_fields.F | 24 +++- ypp/real_time/RT_X_effective.F | 4 +- ypp/real_time/RT_X_response.F | 4 +- 12 files changed, 269 insertions(+), 59 deletions(-) create mode 100644 src/real_time_initialize/RT_field_from_file.F diff --git a/include/driver/version.h b/include/driver/version.h index 22de3d912d..b808733ebc 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21868 -#define YAMBO_HASH "1a2d36366" +#define YAMBO_REVISION 21870 +#define YAMBO_HASH "d335f9fb3" diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 0c7df0fc07..bfd50d680c 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -115,7 +115,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & NE_time_step_update_last_point,NE_time_step_update_jump,NE_time_step_update_jump_INPUT, & & NE_initial_time_step_update,NE_step_update_treshold use fields, ONLY:Efield,Efield_reset,n_ext_fields_max,n_ext_fields,A_vecpot_reset, & -& A_tot,A_ind,A_ext +& A_tot,A_ind,A_ext,field_from_file_fname,field_from_file_steps use plasma, ONLY:PLASMA_redux_percent #endif #if defined _NL @@ -583,6 +583,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! ! Real Time ! + field_from_file_fname="" + field_from_file_steps=0 n_ext_fields=0 do i1=1,n_ext_fields_max call Efield_reset(Efield(i1)) @@ -689,6 +691,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) NL_damping =0.2_SP/HA2EV NL_LRC_alpha =0._SP ! + field_from_file_fname="" + field_from_file_steps=0 do i1=1,n_ext_fields_max call Efield_reset(Efield(i1)) Efield(i1)%frequency=0.1_SP/HA2EV diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 3e42958236..ea269b332c 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM, DS ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -23,7 +23,8 @@ ! module fields ! - use pars, ONLY:SP,DP,schlen,lchlen,pi,n_ext_fields_max + use pars, ONLY:SP,DP,schlen,lchlen,pi, & +& n_ext_fields_max,n_fields_defs_max use stderr,ONLY:STRING_split use units, ONLY:FS2AUT ! @@ -55,6 +56,10 @@ module fields integer :: n_ext_fields =0 type(ext_field), save :: Efield(n_ext_fields_max) ! + real(SP), allocatable :: field_from_file(:,:,:) + character(schlen) :: field_from_file_fname(n_ext_fields_max) + integer :: field_from_file_steps + ! ! Vector potential ! type gauge_field @@ -73,17 +78,22 @@ module fields contains ! logical function field_is_ok(E_field) - use stderr, ONLY:STRING_same - type(ext_field) ::E_field - field_is_ok= any((/ STRING_same(E_field%ef_name,'SIN') ,& -& STRING_same(E_field%ef_name,'SOFTSIN') ,& -& STRING_same(E_field%ef_name,'DELTA') ,& -& STRING_same(E_field%ef_name,'GAUSS') ,& -& STRING_same(E_field%ef_name,'THETA') ,& -& STRING_same(E_field%ef_name,'PULSE') ,& -& STRING_same(E_field%ef_name,'QSSIN') ,& -& STRING_same(E_field%ef_name,'SPULSE'),& -& STRING_same(E_field%ef_name,'QSFIELD') /)) .and. & + use stderr, ONLY:STRING_same,STRING_split + type(ext_field), intent(in) :: E_field + character(schlen) :: ef_name(n_fields_defs_max) + call STRING_split(E_field%ef_name,ef_name) + field_is_ok= any((/ STRING_same(ef_name(1),'SIN') ,& +& STRING_same(ef_name(1),'SOFTSIN') ,& +& STRING_same(ef_name(1),'DELTA') ,& +& STRING_same(ef_name(1),'RECT') ,& +& STRING_same(ef_name(1),'RECTSIN'),& +& STRING_same(ef_name(1),'GAUSS') ,& +& STRING_same(ef_name(1),'THETA') ,& +& STRING_same(ef_name(1),'PULSE') ,& +& STRING_same(ef_name(1),'QSSIN') ,& +& STRING_same(ef_name(1),'SPULSE'),& +& STRING_same(ef_name(1),'QSFIELD'),& +& STRING_same(ef_name(1),'FROM_FILE') /)) .and. & & any((/ STRING_same(E_field%ef_pol,'linear') ,& & STRING_same(E_field%ef_pol,'circular') /)) end function @@ -105,6 +115,17 @@ real(SP) function field_frequency(E_field,i_f) & (E_field%frequency(2)-E_field%frequency(1))/(E_field%n_frequencies-1)*(i_f-1) end function ! + integer function get_field_file_index(filename) + character(*) ::filename + integer ::i1 + get_field_file_index=-1 + do i1=1,n_ext_fields_max + if ( trim(filename)/=trim(field_from_file_fname(i1)) ) cycle + get_field_file_index=i1 + return + enddo + end function + ! function small_a(T,E_field,order,envelop_only) ! ! The vector potential is generally written as @@ -135,10 +156,10 @@ function small_a(T,E_field,order,envelop_only) real(SP) ::damp_func,a,b,c complex(SP), dimension(2) :: small_a ! - integer ::i1,i_fr,i_field,n_fields,n_freqs - real(SP) ::Tloc,T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt + integer ::i1,i_fr,i_T,i_field,i_file,n_fields,n_freqs + real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z - character(schlen) ::field_defs(4) + character(schlen) ::field_defs(n_fields_defs_max) logical ::lchirp,envelop_only_ ! ! Zeroing @@ -161,6 +182,9 @@ function small_a(T,E_field,order,envelop_only) field_defs="" call STRING_split(trim(E_field%ef_name),field_defs) ! + Tloc=T + if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma + ! select case( trim(field_defs(1)) ) case('STATIC','RECT','RECTSIN','SIN','DELTA') ! Fields which do not need T_0 @@ -176,6 +200,11 @@ function small_a(T,E_field,order,envelop_only) ! if (T>NE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) !endif ! DEBUG > + case('FROM_FILE') + i_file=get_field_file_index(field_defs(2)) + T_0=field_from_file(1,1,i_file)*FS2AUT + W_0=0._SP + damp_func=1._SP case('SOFTSIN','THETA') ! Fields which do not need T_0 and with damp_func W_0=0._SP @@ -188,20 +217,27 @@ function small_a(T,E_field,order,envelop_only) case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') ! Fields which need T_0 W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP - T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) - if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0=2._SP*sigma - if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0=3._SP*sigma - if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0=4._SP*sigma - if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0=5._SP*sigma + T_0_fac=3._SP*sigma + if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma + if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma + if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma + if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma + if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma + T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) + if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac end select ! + ! Initial and relative phases control lchirp=.false. fr_shift(1)=0._SP fr_shift(2)=pi/2._SP - do i1=1,4 - if( trim(field_defs(i1))=="PHPI1") fr_shift(:)=fr_shift(:)+pi - if( trim(field_defs(i1))=="PHPI2") fr_shift(:)=fr_shift(:)+pi/2._SP - if( trim(field_defs(i1))=="PHPI4") fr_shift(:)=fr_shift(:)+pi/4._SP + do i1=1,n_fields_defs_max + if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi ! 90 deg + if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 60 deg + if( trim(field_defs(i1))=="PHPI45") fr_shift(:)=fr_shift(:)+pi/2._SP ! 45 deg + if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/3._SP ! 30 deg + if( trim(field_defs(i1))=="PHPI15") fr_shift(:)=fr_shift(:)+pi/6._SP ! 15 deg + if( trim(field_defs(i1))=="PHPI10") fr_shift(:)=fr_shift(:)+pi/9._SP ! 10 deg if( trim(field_defs(i1))=="CHIRP") lchirp=.true. enddo ! @@ -217,12 +253,17 @@ function small_a(T,E_field,order,envelop_only) f0t=cONE ; f1t=cONE else W_field=field_frequency(E_field,i_fr) - W_field_m1=1._SP/W_field - Tloc=T - if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) - ! each frequency has a different initial phase + ! (ii n_freqs>1) to chirp the relative frequencies, + ! i.e. each frequency has a different initial phase if(n_freqs>1 .and. lchirp) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + ! + ! CONTROL RES / ANTIRES case cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt ! f1t=-f0t' f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) @@ -233,6 +274,13 @@ function small_a(T,E_field,order,envelop_only) EXPf=exp(-(T-T_0)**2/(2._SP*sigma**2) ) ! select case( trim(field_defs(1)) ) + case('FROM_FILE') + i_T=nint((T-T_0)/(RT_dyn_step/2._SP))+1 + if (order==0 ) f_now=field_from_file(i_T,2+3*(i_field-1),i_file) + if (order==1 ) f_now=field_from_file(i_T,3+3*(i_field-1),i_file) + if (order==2 ) f_now=field_from_file(i_T,4+3*(i_field-1),i_file) + if (envelop_only_) f_now=0._SP + ! case('STATIC') if (order==0 ) f_now=T if (order==1 ) f_now=1._SP @@ -348,7 +396,7 @@ complex(SP) function small_a_frequency(W_i,E_field,iErr) integer ::i_f real(SP) ::W_0 complex(SP) ::local_a(2) - character(schlen) ::field_defs(3) + character(schlen) ::field_defs(n_fields_defs_max) ! iErr=-1 local_a=cZERO @@ -450,7 +498,7 @@ complex(SP) function Divide_by_Field(Field,order) ! work space complex(SP) :: E_w real(SP) :: T_0, sigma, W_0, T - character(schlen) ::field_defs(3) + character(schlen) ::field_defs(n_fields_defs_max) ! call STRING_split(trim(Field%ef_name),field_defs) ! diff --git a/src/modules/mod_pars.F b/src/modules/mod_pars.F index 25b244d372..94ca4464fe 100644 --- a/src/modules/mod_pars.F +++ b/src/modules/mod_pars.F @@ -48,6 +48,7 @@ module pars ! !...RT integer, parameter :: n_ext_fields_max=4 + integer, parameter :: n_fields_defs_max=6 ! !...Input file analyze integer, parameter :: n_max_DB_IO_off_fields=20 diff --git a/src/real_time_control/RT_Fluence_and_PI_kind.F b/src/real_time_control/RT_Fluence_and_PI_kind.F index 79964d2e0d..59d629325e 100644 --- a/src/real_time_control/RT_Fluence_and_PI_kind.F +++ b/src/real_time_control/RT_Fluence_and_PI_kind.F @@ -40,7 +40,7 @@ subroutine RT_Fluence_and_PI_kind(En,i_field) type(gauge_field) :: A ! logical :: l_print_rabi - integer :: it0,it,last_it_evaluated,NE_i_time_save + integer :: it0,itmax,it,last_it_evaluated,NE_i_time_save real(SP) :: I(NE_steps),Omega(NE_steps),T(NE_steps) ! real(SP),external :: RIntegrate,RT_Rabi_frequency @@ -74,12 +74,21 @@ subroutine RT_Fluence_and_PI_kind(En,i_field) Efield(i_field)%pi_kind=0._SP ! it0=Efield(i_field)%t_initial_indx + itmax=nint(Efield(i_field)%width/RT_step) + ! + if ( index(Efield(i_field)%ef_name,'QSSIN')>0 .or. & + & index(Efield(i_field)%ef_name,'QSFIELD')>0 .or. & + & index(Efield(i_field)%ef_name,'GAUSS')>0 ) then + itmax=10*itmax + else + itmax=itmax+10 + endif ! do it=it0,NE_steps ! T(it)=it*RT_step ! - if ((it-it0)>6*nint(Efield(i_field)%width/RT_step)) exit + if ((it-it0)>itmax) exit ! NE_i_time=it ! diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index cca402ff0f..0419c09534 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -5,6 +5,7 @@ RT_scatt=RT_empty.o PH_objs = RT_occupations_and_levels_init.o #endif #if defined _RT -RT_objs = RT_initialize.o RT_ELPH_initialize.o RT_start_and_restart.o RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o RT_occupations_update.o +RT_objs = RT_initialize.o RT_ELPH_initialize.o RT_start_and_restart.o RT_Field_Commensurable_Frequencies.o \ + RT_Dephasing_Matrix.o RT_G_lesser_init.o RT_occupations_update.o RT_field_from_file.o #endif objs = $(PH_objs) $(RT_objs) $(RT_scatt) diff --git a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F index bed073048c..5d7eb7a3e7 100644 --- a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F +++ b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F @@ -30,7 +30,7 @@ subroutine RT_Field_Commensurable_Frequencies() ! Moreover to extract the Fourier coefficients I need to integrate over aa Time range ! equal to 2*pi/deltaW. This must be not larger then NE_tot_time ! - use pars, ONLY:SP,schlen + use pars, ONLY:SP,schlen,n_fields_defs_max use stderr, ONLY:STRING_split use fields, ONLY:Efield,n_ext_fields,EtoT use real_time, ONLY:NE_tot_time @@ -40,7 +40,7 @@ subroutine RT_Field_Commensurable_Frequencies() integer :: i_master_field,i_f,i_Pump,i_Probe real(SP) :: W_step,T_treshold,T_step real(SP), parameter :: treshold=0.8 - character(schlen) ::pump_defs(3),probe_defs(3) + character(schlen) :: pump_defs(n_fields_defs_max),probe_defs(n_fields_defs_max) ! if (n_ext_fields<2) return ! diff --git a/src/real_time_initialize/RT_field_from_file.F b/src/real_time_initialize/RT_field_from_file.F new file mode 100644 index 0000000000..7a8e9d049d --- /dev/null +++ b/src/real_time_initialize/RT_field_from_file.F @@ -0,0 +1,107 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine RT_load_field_from_file_init(filename) + ! + use com, ONLY:com_path + use fields, ONLY:field_from_file_steps + ! + implicit none + ! + character(*), intent(in) :: filename + ! + integer :: n_time_steps + ! + open(unit=99,file=trim(com_path)//"/"//trim(filename)) + read(99,*) n_time_steps + close(99) + field_from_file_steps=max(field_from_file_steps,n_time_steps) + ! +end subroutine RT_load_field_from_file_init +! +! +subroutine RT_load_field_from_file(filename,i_field) + ! + use real_time, ONLY:RT_step + use com, ONLY:com_path + use pars, ONLY:n_ext_fields_max,SP + use fields, ONLY:Efield,field_from_file,field_from_file_fname,field_from_file_steps + ! + implicit none + ! + character(*), intent(in) :: filename + integer, intent(in) :: i_field + ! + integer :: i1,i_field_file,n_time_steps + ! + i_field_file=-1 + do i1=1,n_ext_fields_max + if ( field_from_file_fname(i1)/="" ) cycle + i_field_file=i1 + exit + enddo + ! + field_from_file_fname(i_field_file)=filename + ! + if(i_field_file==1) then + allocate(field_from_file(field_from_file_steps,7,n_ext_fields_max)) + field_from_file=0._SP + endif + open(unit=99,file=trim(com_path)//"/"//trim(filename)) + read(99,*) n_time_steps + do i1=1,n_time_steps + read(99,*) field_from_file(i1,:,i_field_file) + enddo + close(99) + ! + Efield(i_field)%t_final_indx=(n_time_steps-8)/2+Efield(i_field)%t_initial_indx-1 + Efield(i_field)%t_final=RT_step*(Efield(i_field)%t_final_indx-1) + !write(*,*) Efield(i_field)%t_initial_indx,Efield(i_field)%t_final_indx + ! +end subroutine RT_load_field_from_file +! +! +subroutine RT_print_field_to_file_init(i_field) + ! + use stderr, ONLY:intc + use com, ONLY:com_path + use pars, ONLY:schlen + use fields, ONLY:Efield + ! + implicit none + ! + integer, intent(in) :: i_field + ! + integer :: n_time_steps + character(schlen) :: filename + ! + filename="RT_EXTFIELD_"//trim(intc(i_field))//".time" + ! + n_time_steps=(Efield(i_field)%t_final_indx-Efield(i_field)%t_initial_indx+1)*2+8 + ! + !write(*,*) Efield(i_field)%t_initial_indx,Efield(i_field)%t_final_indx + ! + open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) + write(99+i_field,*) n_time_steps + ! +end subroutine RT_print_field_to_file_init diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index f82317c8fc..6cf5a338c2 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -28,7 +28,7 @@ subroutine RT_initialize(E,k,q) #if defined _PHEL use drivers, ONLY:l_phel_scatt #endif - use pars, ONLY:SP,pi,schlen + use pars, ONLY:SP,pi,schlen,n_fields_defs_max use stderr, ONLY:STRING_split use units, ONLY:HA2EV,HBAR_eVfs,AU2VMm1,AU2KWCMm2,AUT2FS use stderr, ONLY:intc @@ -73,8 +73,8 @@ subroutine RT_initialize(E,k,q) ! ! Work space ! - integer :: i1,N_T_samplings,ik,NK_cpu(PAR_COM_Xk_ibz_INDEX%n_CPU) - character(schlen) :: MSG_ch,field_defs(3) + integer :: i1,i_defs,N_T_samplings,ik,NK_cpu(PAR_COM_Xk_ibz_INDEX%n_CPU) + character(schlen) :: MSG_ch,field_defs(n_fields_defs_max) real(SP) :: T_memory logical :: l_Full_RT_T_evolution,l_skip_it,l_velocity_gauge_tmp real(SP), parameter :: thresh=1.E-5_SP @@ -234,36 +234,46 @@ subroutine RT_initialize(E,k,q) ! l_NE_with_fields=.false. ! + ! Initial check for fields defined from file + do i1=1,n_ext_fields + Efield(i1)%ef_name=trim(Efield(i1)%ef_name) + call STRING_split(Efield(i1)%ef_name,field_defs) + if ( field_defs(1)/='FROM_FILE') cycle + call RT_load_field_from_file_init(field_defs(2)) + enddo + ! do i1=1,n_ext_fields ! Efield(i1)%ef_name=trim(Efield(i1)%ef_name) ! MSG_ch="Field#"//trim(intc(i1))//" "//trim(Efield(i1)%ef_name) ! - if(trim(Efield(i1)%ef_name)/='none') then + call STRING_split(Efield(i1)%ef_name,field_defs) + ! + if(trim(field_defs(1))/='none') then ! - if (.not.field_is_ok( Efield(i1)) ) call error(trim(MSG_ch)//' not supported or polarization is wrong') + if (.not.field_is_ok( Efield(i1) ) ) call error(trim(MSG_ch)//' not supported or polarization is wrong') ! l_NE_with_fields=.true. ! - call STRING_split(Efield(i1)%ef_name,field_defs) - ! - if(field_defs(1)/='DELTA'.and.Efield(i1)%frequency(1)==0._SP) & + if( (field_defs(1)/='DELTA'.or.field_defs(1)/='GAUSS'.or. & +& field_defs(1)/='RECT' .or.field_defs(1)/='FROM_FILE') & +& .and. Efield(i1)%frequency(1)==0._SP) & & call error(trim(MSG_ch)//" field has zero frequency.") ! if(Efield(i1)%intensity==0._SP) & & call warning(trim(MSG_ch)//" field has zero intensity.") ! - if( all( abs(Efield(i1)%versor(:)) + ! endif ! enddo diff --git a/src/real_time_propagation/RT_Ext_fields.F b/src/real_time_propagation/RT_Ext_fields.F index 9d5a2f81f6..c47e88c43f 100644 --- a/src/real_time_propagation/RT_Ext_fields.F +++ b/src/real_time_propagation/RT_Ext_fields.F @@ -42,10 +42,11 @@ subroutine RT_Ext_fields(A,time,i_f) ! the induced current is included in the dynamics ( RT_propagate_fields ) ! use pars, ONLY:SP - use units, ONLY:SPEED_OF_LIGHT + use units, ONLY:SPEED_OF_LIGHT,FS2AUT use real_time, ONLY:RT_dyn_step,NE_i_time use functions, ONLY:theta_function - use fields, ONLY:Efield,small_a,gauge_field,compute_intensity,compute_envelop,A_vecpot_reset + use fields, ONLY:Efield,small_a,gauge_field,A_vecpot_reset,& +& compute_envelop,compute_intensity ! implicit none ! @@ -55,17 +56,27 @@ subroutine RT_Ext_fields(A,time,i_f) ! ! Work Space ! + ! DEBUG < + logical :: l_print_to_file + ! DEBUG > integer :: ikind real(SP) :: Field_time,A_coeff complex(SP) :: A_of_t(2),E_of_t(2),J_of_t(2),theta,delta,signf ! Field_time=time-Efield(i_f)%t_initial ! - if (Efield(i_f)%ef_name=="none" .or. Efield(i_f)%t_initial_indx>(NE_i_time+2) ) then + if (Efield(i_f)%ef_name=="none" .or. NE_i_time0 .and. NE_i_time>Efield(i_f)%t_final_indx+2) ) then call A_vecpot_reset(A) return endif ! + ! DEBUG < + inquire ( unit=99+i_f,opened=l_print_to_file) + if (l_print_to_file) l_print_to_file=Efield(i_f)%t_final_indx>=NE_i_time-2 + if (l_print_to_file.and.Efield(i_f)%t_initial_indx<4) call error('writing field to file requires initial index>3') + ! DEBUG > + ! theta=theta_function(Field_time,RT_dyn_step,0) delta=theta_function(Field_time,RT_dyn_step,1) signf=theta_function(Field_time,RT_dyn_step,2) @@ -76,6 +87,13 @@ subroutine RT_Ext_fields(A,time,i_f) E_of_t=small_a(Field_time,Efield(i_f),1,envelop_only=(ikind==1)) J_of_t=small_a(Field_time,Efield(i_f),2,envelop_only=(ikind==1)) ! + ! DEBUG < + if (ikind==2.and.l_print_to_file) then + write(99+i_f,*) Field_time/FS2AUT,real(A_of_t(1),SP),real(E_of_t(1),SP),real(J_of_t(1),SP),& + real(A_of_t(2),SP),real(E_of_t(2),SP),real(J_of_t(2),SP) + endif + ! DEBUG > + ! select case(Efield(i_f)%ef_pol) case("linear") A_coeff=SPEED_OF_LIGHT*Efield(i_f)%amplitude diff --git a/ypp/real_time/RT_X_effective.F b/ypp/real_time/RT_X_effective.F index e3141f49fd..4e3bc0e6ac 100644 --- a/ypp/real_time/RT_X_effective.F +++ b/ypp/real_time/RT_X_effective.F @@ -23,7 +23,7 @@ ! subroutine RT_X_effective(en) ! - use pars, ONLY:SP,lchlen,pi,schlen,cZERO + use pars, ONLY:SP,lchlen,pi,schlen,cZERO,n_fields_defs_max use YPP_real_time, ONLY:RT_P_t,Pump_path,N_probes,Probe_path,RT_IO_J_and_P,& & max_n_of_paths,Use_FFT,RT_conf,N_pumps,N_probe_frequencies,X_order,& & l_RT_X_inversion,l_skip_pol_and_curr_IO @@ -44,7 +44,7 @@ subroutine RT_X_effective(en) type(levels) :: en ! character(lchlen) :: jobstr_save - character(schlen) :: X_file_name,field_defs(3) + character(schlen) :: X_file_name,field_defs(n_fields_defs_max) integer :: i_f,i_fp,f_indx(max_n_of_paths),i_order,min_X_order,i_c,i_t,i_conv,& & i_p,N_periods,i_Pump,i_Probe real(SP) :: Pump_Frequency(1),Unit_of_Measure diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 25dfdba614..ced67b80f1 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -28,7 +28,7 @@ subroutine RT_X_response(en,k,q) & l_RT_X_inversion,Probe_path,Pump_path,N_probes,RT_conf,l_skip_OBS_IO use YPP_interfaces, ONLY:RT_OBSERVABLES_IO use RT_control, ONLY:OBS_RT_IO_t - use pars, ONLY:schlen + use pars, ONLY:schlen,n_fields_defs_max use stderr, ONLY:STRING_split,STRING_same use R_lattice, ONLY:bz_samp use electrons, ONLY:levels @@ -43,7 +43,7 @@ subroutine RT_X_response(en,k,q) ! Work Space ! integer :: Ndefs,i_o - character(schlen) :: probe_defs(3) + character(schlen) :: probe_defs(n_fields_defs_max) logical :: l_RT_LRR_real_field,l_RT_X_effective,l_RT_SHG_qssin,IO_error ! call RT_OBSERVABLES_IO_paths('JP',en) From b3b7fc80954f29ac05c77b0eb4985a91b38bac1e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 3 Jan 2023 22:49:13 +0100 Subject: [PATCH 0552/1367] Version 5.1.0, Revision 21870, Hash 7314fe091 MODIFIED * include/driver/version.h ypp/real_time/RT_X_response.F Bugs: - [ypp_rt] Fix for issue #695 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/real_time/RT_X_response.F | 38 +++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b808733ebc..c73e88332b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21870 -#define YAMBO_HASH "d335f9fb3" +#define YAMBO_REVISION 21871 +#define YAMBO_HASH "7314fe091" diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index ced67b80f1..be9d112003 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -79,44 +79,48 @@ subroutine RT_X_response(en,k,q) ! call IO_temporary_jobdir_and_strings("ALL","SAVE") ! - if (N_pumps==0) then - Pol(1)%title ="polarization" - Curr(1)%title="current" - else + Pol(1)%title ="polarization" + Curr(1)%title="current" + if (.not.STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(1)) + call RT_OBSERVABLES_IO( what='JP',J=Curr(1),P=Pol(1),IO_error=IO_error) + if (.not.allocated(Curr(1)%F_t)) call error('Probe databases missing/corrupt') + ! + call IO_temporary_jobdir_and_strings("ALL","RESTORE") + ! + if (N_pumps>0) then ! ! Here the assumption is that ! - run 1 contains both the pump(s) and the probe. Probe is Field1 ! - run 2 contains only the pump(s) ! - Pol(1)%title ="pump-probe-polarization" - Curr(1)%title="pump-probe-current" Pol(2)%title ="pump-polarization" Curr(2)%title="pump-current" if (.not.STRING_same(Pump_path,"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Pump_path) call RT_OBSERVABLES_IO( what='JP',J=Curr(2),P=Pol(2),IO_error=IO_error) if (.not.allocated(Curr(2)%F_t)) call error('Pump databases missing/corrupt') + ! + call IO_temporary_jobdir_and_strings("ALL","RESTORE") + ! + Pol(3)%title ="probe-polarization" + Curr(3)%title="probe-current" + Pol(3)%F_t =Pol(1)%F_t -Pol(2)%F_t + Curr(3)%F_t=Curr(1)%F_t-Curr(2)%F_t + ! endif ! - if ( STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("ALL","RESTORE") - if (.not.STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(1)) - call RT_OBSERVABLES_IO( what='JP',J=Curr(1),P=Pol(1),IO_error=IO_error) - if (.not.allocated(Curr(1)%F_t)) call error('Probe databases missing/corrupt') - ! - call IO_temporary_jobdir_and_strings("ALL","RESTORE") - ! ! Damping and output !--------------------- call RT_OBSERVABLES_damp_and_write(Pol(1),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(1),RT_conf,l_skip_OBS_IO) + ! if (N_pumps>0) then + ! call RT_OBSERVABLES_damp_and_write(Pol(2),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(2),RT_conf,l_skip_OBS_IO) - Pol(3)%title ="probe-polarization" - Curr(3)%title="probe-current" - Pol(3)%F_t =Pol(1)%F_t -Pol(2)%F_t - Curr(3)%F_t=Curr(1)%F_t-Curr(2)%F_t + ! call RT_OBSERVABLES_damp_and_write(Pol(3),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(3),RT_conf,l_skip_OBS_IO) + ! endif ! if ( l_RT_pol ) then From e072c8b36810847699f327b477945e326c27cf80 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 4 Jan 2023 00:22:16 +0100 Subject: [PATCH 0553/1367] Version 5.1.0, Revision 21871, Hash b3b7fc809 MODIFIED * include/driver/version.h interface/.objects interface/INIT_activate.F interface/INIT_load.F NEW * interface/INIT_fields.F Changes: - [yambo_rt/yambo_nl] subroutines for activating and loading field variables moved outside INIT_activate and INIT_load subroutines contains to be used by ypp_rt Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/interface/.objects | 2 +- src/interface/INIT_activate.F | 22 +------ src/interface/INIT_fields.F | 108 ++++++++++++++++++++++++++++++++++ src/interface/INIT_load.F | 52 +--------------- 5 files changed, 114 insertions(+), 74 deletions(-) create mode 100644 src/interface/INIT_fields.F diff --git a/include/driver/version.h b/include/driver/version.h index c73e88332b..4c34db5a8e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21871 -#define YAMBO_HASH "7314fe091" +#define YAMBO_REVISION 21872 +#define YAMBO_HASH "b3b7fc809" diff --git a/src/interface/.objects b/src/interface/.objects index 51c0b18547..8d5ea6f74e 100644 --- a/src/interface/.objects +++ b/src/interface/.objects @@ -7,5 +7,5 @@ RT_SC_objects= INIT_read_command_line_potentials.o #endif objs = INIT_C_driver_runlevels.o INIT_load.o INIT.o INIT_read_command_line.o INIT_check_databases.o INIT_activate.o INIT_read_command_line_corr_scatt.o \ $(RT_SC_objects) \ - INIT_QP.o INIT_report_and_log_files.o INIT_input_file.o \ + INIT_QP.o INIT_report_and_log_files.o INIT_input_file.o INIT_fields.o \ INIT_q_points.o INIT_barriers.o INIT_QP_ctl_load.o INIT_QP_ctl_switch.o $(RT_objects) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 3c1edd1845..7d4c55bdfa 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -25,7 +25,7 @@ subroutine INIT_activate() ! use BS_solvers, ONLY:BSS_mode use QP_m, ONLY:QP_solver,COHSEX_use_empties - use stderr, ONLY:intc,STRING_match + use stderr, ONLY:STRING_match use global_XC, ONLY:WF_exx_fraction,WF_exx_screening use drivers, ONLY:l_em1s,l_acfdt,l_HF_and_locXC,l_col_cut,l_alda_fxc,l_bs_fxc,l_optics,l_bse,l_bss,& & l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hf,l_setup,l_sc_run,l_rim,& @@ -584,26 +584,6 @@ subroutine INIT_activate() ! contains ! -#if defined _RT || defined _NL - ! - subroutine Afield_activate(i1) - integer ::i1 - character(6)::field - field='Field'//trim(intc(i1)) - call initactivate(1,field//'_Freq') - call initactivate(1,field//'_NFreqs') - call initactivate(1,field//'_DFreq') - call initactivate(1,field//'_Int') - call initactivate(1,field//'_Width') - call initactivate(1,field//'_FWHM') - call initactivate(1,field//'_kind') - call initactivate(1,field//'_pol') - call initactivate(1,field//'_Dir') - call initactivate(1,field//'_Dir_circ') - call initactivate(1,field//'_Tstart') - end subroutine - ! -#endif ! subroutine CPU_activate(what) character(*) :: what diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F new file mode 100644 index 0000000000..06bb2adb26 --- /dev/null +++ b/src/interface/INIT_fields.F @@ -0,0 +1,108 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +#if defined _RT || defined _NL +! +subroutine Afield_activate(i1) + use stderr, ONLY:intc + ! + implicit none + ! + integer, intent(in) ::i1 + ! + character(6)::field + field='Field'//trim(intc(i1)) + call initactivate(1,field//'_Freq') + call initactivate(1,field//'_NFreqs') + call initactivate(1,field//'_DFreq') + call initactivate(1,field//'_Int') + call initactivate(1,field//'_Width') + call initactivate(1,field//'_FWHM') + call initactivate(1,field//'_kind') + call initactivate(1,field//'_pol') + call initactivate(1,field//'_Dir') + call initactivate(1,field//'_Dir_circ') + call initactivate(1,field//'_Tstart') +end subroutine +! +! +subroutine Afield(i_field) + ! + use it_tools, ONLY:it + use pars, ONLY:SP + use drivers, ONLY:infile_editing + use fields, ONLY:Efield,n_ext_fields + use units, ONLY:AU2KWCMm2 + use parser_m, ONLY:parser + use stderr, ONLY:intc + use it_m, ONLY:E_unit,I_unit,Time_unit,V_real_time, & + & initmode,initdefs + ! + implicit none + ! + integer, intent(in):: i_field + type(initdefs) :: defs + ! + ! Workspace + ! + character(10) :: name + logical :: is_def + ! + name='Field'//trim(intc(i_field)) + ! + call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%frequency,unit=E_unit) + call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%n_frequencies) + call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& +& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) + call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& +& Efield(i_field)%intensity,unit=I_unit) + call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& +& Efield(i_field)%width,unit=Time_unit(1)) + call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& +& Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) + call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& +& Efield(i_field)%ef_name) + call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& +& Efield(i_field)%ef_pol) + call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& +& Efield(i_field)%versor) + call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& +& Efield(i_field)%versor_circ,verb_level=V_real_time) + call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& +& Efield(i_field)%t_initial,unit=Time_unit(1)) + ! + if (initmode==4.and..not.infile_editing) then + ! + call parser(trim(name)//'_FWHM',is_def) + if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) + if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) + ! + if (trim(Efield(i_field)%ef_name)/='none') n_ext_fields=n_ext_fields+1 + ! + endif + ! +end subroutine +! +#endif diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index c7ddd41432..a8acb21da7 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -81,7 +81,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _RT use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t, & & CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t,Vbands_RT_IO_t - use stderr, ONLY:intc use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem use RT_lifetimes, ONLY:RT_life_extrap_times_INPUT use real_time, ONLY:RT_step, Integrator_name, RAD_LifeTime, Phase_LifeTime, & @@ -92,7 +91,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & NE_initial_time_step_update,NE_step_update_treshold, & & RT_MAX_step,RAD_magnification, & & RT_deph_deg_thresh,RT_step_manual_prefactor,NE_time_step_update_manual - use fields, ONLY:Efield,n_ext_fields_max,n_ext_fields + use fields, ONLY:n_ext_fields_max,n_ext_fields use plasma, ONLY:PLASMA_redux_percent #endif #if defined _NL @@ -543,7 +542,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! if (initmode==4.and..not.infile_editing) n_ext_fields=0 do i_field=1,n_ext_fields_max - call Afield(i_field) + call Afield(defs,i_field) enddo ! #endif @@ -729,53 +728,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! contains ! -#if defined _RT || defined _NL - ! - subroutine Afield(i_field) - use units, ONLY :AU2KWCMm2 - use parser_m, ONLY : parser - character(10) :: name - integer :: i_field - logical :: is_def - ! - name='Field'//trim(intc(i_field)) - ! - call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%frequency,unit=E_unit) - call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies) - call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& -& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) - call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& -& Efield(i_field)%intensity,unit=I_unit) - call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& -& Efield(i_field)%width,unit=Time_unit(1)) - call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& -& Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) - call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& -& Efield(i_field)%ef_name) - call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& -& Efield(i_field)%ef_pol) - call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& -& Efield(i_field)%versor) - call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& -& Efield(i_field)%versor_circ,verb_level=V_real_time) - call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& -& Efield(i_field)%t_initial,unit=Time_unit(1)) - ! - if (initmode==4.and..not.infile_editing) then - ! - call parser(trim(name)//'_FWHM',is_def) - if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) - if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) - ! - if (trim(Efield(i_field)%ef_name)/='none') n_ext_fields=n_ext_fields+1 - ! - endif - ! - end subroutine - ! -#endif ! #if defined _MPI ! From c9a5017968a2bb9f45e2df4e447bb1000a1aad11 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 4 Jan 2023 01:19:14 +0100 Subject: [PATCH 0554/1367] Version 5.1.0, Revision 21872, Hash e072c8b36 MODIFIED * include/driver/version.h driver/options_ypp.c interface/INIT_fields.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F ypp/modules/mod_YPP_real_time.F ypp/real_time/.objects ypp/real_time/RT_ypp_driver.F NEW * ypp/real_time/RT_fields.F Changes: - [ypp_rt] working on issue #694 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/driver/options_ypp.c | 6 ++- src/interface/INIT_fields.F | 5 ++- ypp/interface/INIT_load_ypp.F | 6 ++- ypp/interface/INIT_ypp.F | 12 +++++- ypp/modules/mod_YPP_real_time.F | 1 + ypp/real_time/.objects | 2 +- ypp/real_time/RT_fields.F | 75 +++++++++++++++++++++++++++++++++ ypp/real_time/RT_ypp_driver.F | 6 ++- 9 files changed, 106 insertions(+), 11 deletions(-) create mode 100644 ypp/real_time/RT_fields.F diff --git a/include/driver/version.h b/include/driver/version.h index 4c34db5a8e..a4ce15df99 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21872 -#define YAMBO_HASH "b3b7fc809" +#define YAMBO_REVISION 21873 +#define YAMBO_HASH "e072c8b36" diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index 563f59822a..3c29b5c891 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -204,12 +204,14 @@ void options_ypp(struct options_struct options[],int *i_opt) options[*i_opt].bin="ypp_rt"; options[*i_opt].yambo_string="TDplots"; /* TDplots */ options[*i_opt].section="Real-Time"; - options[*i_opt].long_desc[0]="=(X)response,(a)bsorption,(o)ccupations,(l)ifetimes,(d)ensity,(p)olariazion,(g)reen-function"; + options[*i_opt].long_desc[0]="=(X)response,(a)bsorption,(o)ccupations,(l)ifetimes,(d)ensity,(p)olariazion,(f)ields,(g)reen-function"; options[*i_opt].long_desc[1]=" "; options[*i_opt].long_desc[2]="(X) response calculates the response via the time-resolved polarization"; options[*i_opt].long_desc[3]="(a) absorption amends the Kubo expression with the time-dependent occupations"; options[*i_opt].long_desc[4]="(p) polarization evaluates the k-resolved components of the time-dependent polarization"; - options[*i_opt].long_desc[5]="(g) evaluates the two-times Green`s function"; + options[*i_opt].long_desc[5]="(f) generate and manupulate fields file"; + options[*i_opt].long_desc[6]="(g) evaluates the two-times Green`s function"; + *i_opt=*i_opt+1; options[*i_opt].short_desc="TD plot control"; options[*i_opt].char_var=1; diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 06bb2adb26..d392977adc 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -46,11 +46,12 @@ subroutine Afield_activate(i1) end subroutine ! ! -subroutine Afield(i_field) +subroutine Afield(defs,i_field) ! use it_tools, ONLY:it use pars, ONLY:SP use drivers, ONLY:infile_editing + use C_driver, ONLY:code_bin use fields, ONLY:Efield,n_ext_fields use units, ONLY:AU2KWCMm2 use parser_m, ONLY:parser @@ -99,7 +100,7 @@ subroutine Afield(i_field) if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) ! - if (trim(Efield(i_field)%ef_name)/='none') n_ext_fields=n_ext_fields+1 + if (trim(Efield(i_field)%ef_name)/='none'.and.index(code_bin,'ypp')==0) n_ext_fields=n_ext_fields+1 ! endif ! diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index cc4e184e02..1ffc7852f5 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -49,6 +49,7 @@ subroutine INIT_ypp_load(defs) & Eh_pumped_pair_BZ_width,Eh_mu,Eh_temp,h_mu_autotune_thr,TRabsWHAT,TRabsDIP_plane,& & TRabsMODE,TRabsDIP_dir,TRabs_Eeh_treshold,Pump_path,RT_pol_mode use real_time, ONLY:RT_bands + use fields, ONLY:n_ext_fields #endif #if defined _YPP_SC use YPPm, ONLY:V_value @@ -119,6 +120,7 @@ subroutine INIT_ypp_load(defs) call it('r',defs,'RToccupations','[R] Analize time-dependent occupations') call it('r',defs,'RTlifetimes', '[R] Analize time-dependent lifetimes') call it('r',defs,'RTpol', '[R] Analize time-dependent polarization') + call it('r',defs,'RTfields', '[R] Analize time-dependent fields') call it('r',defs,'RTdeltaRho', '[R] Analize the density') call it('r',defs,'RTGtwotimes', '[R] Construct G/G(r)/G(a)/A(t,tp) from rho within GKBA') ! @@ -379,7 +381,9 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'SkipOBS_IO','Do not dump on file the RT observables (P(t),J(t),D(t)...)') call it('f',defs,'RmAsymLim','Remove Asymptotic limit from P or J',verb_level=V_real_time) ! - call it('f',defs,'STD_style','Print occupations using the standard style',verb_level=V_real_time) + call it('f',defs,'STD_style','Print occupations using the standard style',verb_level=V_real_time) + ! + call Afield(defs,1) ! #endif ! diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index b90e0d5a3f..3d901f2212 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -59,7 +59,8 @@ subroutine INIT_ypp(E,instr,FINALIZE) use YPP_real_time, ONLY:l_RealTime,l_RT_dos,l_RT_abs,l_RT_bands,l_RT_DBs,l_RT_density,l_RT_G_two_times,& & l_RT_energy,l_RT_lifetimes,l_RT_occupations,l_RT_time,l_RT_X,l_RTpump_Fermi,& & l_RTpump_energy,Eh_pumped_pair_n_BZ_regions,Eh_pumped_pair_BZ_regions,& -& l_NL_X,l_NL_exc,RT_conf,l_RT_pol +& l_NL_X,l_NL_exc,RT_conf,l_RT_pol,l_RT_fields + use fields, ONLY:n_ext_fields use real_time, ONLY:RT_bands #endif #if defined _YPP_NL @@ -337,6 +338,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_RT_G_two_times =STRING_match(rstr_piece(i1+1),'g') l_RT_abs =STRING_match(rstr_piece(i1+1),'a') l_RT_pol =STRING_match(rstr_piece(i1+1),'p') + l_RT_fields =STRING_match(rstr_piece(i1+1),'f') ! l_rtplot=.TRUE. ! @@ -381,6 +383,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) if (l_RT_energy) call initactivate(1,'RTenergy') if (l_RT_dos) call initactivate(1,'RTdos') if (l_RT_pol) call initactivate(1,'RTpol') + if (l_RT_fields) call initactivate(1,'RTfields') ! #endif ! @@ -466,6 +469,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_RTpump_Fermi = runlevel_is_on('Select_Fermi') ! l_RT_pol = runlevel_is_on('RTpol') + l_RT_fields = runlevel_is_on('RTfields') l_RT_abs = runlevel_is_on('RTabs') l_RT_occupations = runlevel_is_on('RToccupations') l_RT_lifetimes = runlevel_is_on('RTlifetimes') @@ -639,7 +643,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) ! l_flag=l_RT_occupations.or.l_RT_abs.or.l_RT_pol if (l_flag) call init_RT_ctl_switch('G') - l_flag=l_RT_occupations.or.l_RT_density.or.l_RT_lifetimes.or.l_RT_abs.or.l_RT_pol.or.l_RT_G_two_times + l_flag=l_RT_occupations.or.l_RT_density.or.l_RT_lifetimes.or.l_RT_abs.or.l_RT_pol.or.l_RT_G_two_times.or.l_RT_fields if (l_flag) call initactivate(1,"TimeStep TimeRange") ! if (l_RT_pol) call initactivate(1,"PolMode EnRngeRt ETStpsRt DampFactor") @@ -666,6 +670,10 @@ subroutine INIT_ypp(E,instr,FINALIZE) call initactivate(1,"BSQindex EnRngeRt ETStpsRt DampFactor") call initactivate(1,"TRabsOBS TRabsDIPdir TRabsDIPplane TRabsMODE TRabsEtresh") endif + if (l_RT_fields) then + n_ext_fields=1 + call Afield_activate(1) + endif ! endif #endif diff --git a/ypp/modules/mod_YPP_real_time.F b/ypp/modules/mod_YPP_real_time.F index 65923cbf96..73e960e88d 100644 --- a/ypp/modules/mod_YPP_real_time.F +++ b/ypp/modules/mod_YPP_real_time.F @@ -50,6 +50,7 @@ module YPP_real_time logical :: l_NL_exc logical :: l_RT_abs logical :: l_RT_pol + logical :: l_RT_fields ! ! RT post-processing (kind) ! diff --git a/ypp/real_time/.objects b/ypp/real_time/.objects index 01a0a9c4bd..21daf3b4f7 100644 --- a/ypp/real_time/.objects +++ b/ypp/real_time/.objects @@ -1,7 +1,7 @@ #if defined _YPP_RT RT_objects = RT_ypp_driver.o \ RT_OBSERVABLES_IO_path.o RT_OBSERVABLES_IO.o \ - RT_TRabs_driver.o RT_TRabs_residuals.o RT_TRabs_output.o \ + RT_TRabs_driver.o RT_TRabs_residuals.o RT_TRabs_output.o RT_fields.o \ RT_X_LRR_real_field.o RT_X_response.o RT_manual_excitation.o RT_DBs_carriers_setup.o \ RT_OBSERVABLES_damp_and_write.o RT_1D_Fourier_setup.o RT_1D_Fourier_Transform.o \ RT_occupations_driver.o RT_components_energy_plot.o RT_occ_time_plot.o RT_density.o \ diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F new file mode 100644 index 0000000000..948258fc14 --- /dev/null +++ b/ypp/real_time/RT_fields.F @@ -0,0 +1,75 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine RT_Fields() + ! + use pars, ONLY:schlen,n_fields_defs_max + use RT_control, ONLY:OBS_RT_IO_t + use fields, ONLY:Efield + use stderr, ONLY:STRING_split + ! + implicit none + ! + ! Work Space + ! + logical :: l_load_from_file,l_from_time_fft + character(schlen) :: field_defs(n_fields_defs_max) + ! + ! Time Initialization from input + call RT_time_configuration_setup('FIELDS',OBS_RT_IO_t) + ! + ! Analize the input variables for the external field + call STRING_split(Efield(1)%ef_name,field_defs) + ! + ! Field in frequency space from external file + if ( field_defs(1)=='FROM_W_FILE') call RT_Field_w_load() + ! + ! Field in frequency space from FT of real time expression + if ( field_defs(1)/='FROM_W_FILE') call RT_Field_t_to_w() + ! + ! Chirp the field and convert back into real time + call RT_field_chirp() + ! +end subroutine RT_fields +! +! +subroutine RT_Field_w_load() + ! + ! TODO + ! +end subroutine RT_Field_w_load +! +! +subroutine RT_Field_t_to_w() + ! + ! TODO + ! +end subroutine RT_Field_t_to_w +! +! +subroutine RT_Field_chirp() + ! + ! TODO + ! +end subroutine RT_Field_chirp + diff --git a/ypp/real_time/RT_ypp_driver.F b/ypp/real_time/RT_ypp_driver.F index 12d8ddff68..b45af7c695 100644 --- a/ypp/real_time/RT_ypp_driver.F +++ b/ypp/real_time/RT_ypp_driver.F @@ -26,7 +26,7 @@ subroutine RT_ypp_driver(en,k,q) use R_lattice, ONLY:bz_samp use electrons, ONLY:levels use YPP_real_time, ONLY:l_RT_X,l_RT_occupations,l_RT_lifetimes,l_RT_density,& -& l_RT_G_two_times,l_skip_OBS_IO,l_force_min_damp,l_RT_pol +& l_RT_G_two_times,l_skip_OBS_IO,l_force_min_damp,l_RT_pol,l_RT_fields use YPPm, ONLY:PROJECT_mode,l_PROJECT_atom,l_PROJECT_line,l_PROJECT_plane,& & l_add_EQ_occ,l_separate_eh,l_skip_occ use interpolate, ONLY:l_integral_respect @@ -76,4 +76,8 @@ subroutine RT_ypp_driver(en,k,q) !==================== if ( l_RT_X .or. l_RT_pol ) call RT_X_response(en,k,q) ! + ! Response Functions + !==================== + if ( l_RT_fields ) call RT_fields() + ! end subroutine From d7aa52fcbba1f03672516164570039f0e2ad0f8b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 7 Jan 2023 17:23:16 +0100 Subject: [PATCH 0555/1367] Version 5.1.0, Revision 21877, Hash 0ca3d369a MODIFIED * ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F ypp/modules/mod_YPP_real_time.F ypp/real_time/RT_1D_Fourier_Transform.F ypp/real_time/RT_fields.F Changes: - [ypp_rt] Implementing generation of pulses via modified Fourier transform ( #694 ) Patch sent by: Davide Sangalli --- ypp/interface/INIT_load_ypp.F | 3 +- ypp/interface/INIT_ypp.F | 1 + ypp/modules/mod_YPP_real_time.F | 4 + ypp/real_time/RT_1D_Fourier_Transform.F | 25 ++++- ypp/real_time/RT_fields.F | 130 ++++++++++++++++++++---- 5 files changed, 141 insertions(+), 22 deletions(-) diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 1ffc7852f5..e019d09ffc 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -44,7 +44,7 @@ subroutine INIT_ypp_load(defs) use YPP_symm, ONLY:wf_ng_cut #if defined _YPP_RT use YPPm, ONLY:Nel_fac - use YPP_real_time, ONLY:RT_conf,Eh_pumped_Nel,Eh_pumped_pair_deltaE,Rho_deph,& + use YPP_real_time, ONLY:RT_conf,Eh_pumped_Nel,Eh_pumped_pair_deltaE,Rho_deph,alpha_lin_chirp,& & Eh_pumped_pair_width,Probe_Keyword,Pump_Keyword,X_order,X_kind,Eh_pumped_pair_energy,& & Eh_pumped_pair_BZ_width,Eh_mu,Eh_temp,h_mu_autotune_thr,TRabsWHAT,TRabsDIP_plane,& & TRabsMODE,TRabsDIP_dir,TRabs_Eeh_treshold,Pump_path,RT_pol_mode @@ -383,6 +383,7 @@ subroutine INIT_ypp_load(defs) ! call it('f',defs,'STD_style','Print occupations using the standard style',verb_level=V_real_time) ! + call it(defs,'ChirpFac','Prefactor for linear chirping in frequency space',alpha_lin_chirp) call Afield(defs,1) ! #endif diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 3d901f2212..d961dd6ef3 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -671,6 +671,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) call initactivate(1,"TRabsOBS TRabsDIPdir TRabsDIPplane TRabsMODE TRabsEtresh") endif if (l_RT_fields) then + call initactivate(1,"EnRngeRt ETStpsRt ChirpFac") n_ext_fields=1 call Afield_activate(1) endif diff --git a/ypp/modules/mod_YPP_real_time.F b/ypp/modules/mod_YPP_real_time.F index 73e960e88d..16f2c3a65c 100644 --- a/ypp/modules/mod_YPP_real_time.F +++ b/ypp/modules/mod_YPP_real_time.F @@ -140,6 +140,10 @@ module YPP_real_time ! character(schlen) :: RT_pol_mode="slice" ! + ! (RT) Fields + ! + real(SP) :: alpha_lin_chirp=0._SP + ! type RT_ctl real(SP) :: delta_W =0._SP ! delta W real(SP) :: X_W_range(2) =0._SP ! Response energy range diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 5b756de9eb..49312495eb 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -37,7 +37,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! ! F_t(t) = \int F_w(w) exp^(-i w t) ! - use YPP_real_time, ONLY:RT_time,Use_FFT,OBS_el,RT_ctl + use YPP_real_time, ONLY:RT_time,Use_FFT,OBS_el,RT_ctl,alpha_lin_chirp use pars, ONLY:DP,cI,cZERO_DP use LIVE_t, ONLY:live_timing ! @@ -53,6 +53,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) integer :: i_w,i_t,fft_sign,i_c integer(8) :: fftw_plan logical :: l_live_timing + complex :: chirp_phase ! l_live_timing=len_trim(FT%title)>0 ! @@ -106,7 +107,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! FT%F_t=cZERO_DP ! - if (l_live_timing) call live_timing('FT'//trim(FT%title)//'',RT%T_n_steps*FT%N) + if (l_live_timing) call live_timing('FT@'//trim(FT%title)//'',RT%T_n_steps*FT%N) do i_c=1,FT%N do i_t = 1, RT%T_n_steps do i_w = 1, RT%W_n_steps @@ -119,5 +120,25 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! endif ! + ! Frequency to Time + !=================== + if (mode=="W2T_LIN_CHIRP") then + ! + FT%F_t=cZERO_DP + ! + if (l_live_timing) call live_timing('FT@'//trim(FT%title)//'',RT%T_n_steps*FT%N) + do i_c=1,FT%N + do i_t = 1, RT%T_n_steps + do i_w = 1, RT%W_n_steps + chirp_phase=-cI*alpha_lin_chirp*cos(FT%W(i_w)-FT%W(1)) + FT%F_t(i_t,i_c) = FT%F_t(i_t,i_c)+FT%F_w(i_w,i_c)*(FT%W(2)-FT%W(1))*exp(-cI*FT%W(i_w)*RT_time(i_t)-chirp_phase) + enddo + if (l_live_timing) call live_timing(steps=1) + enddo + enddo + if (l_live_timing) call live_timing() + ! + endif + ! end subroutine RT_1D_Fourier_Transform diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F index 948258fc14..eb57b5b151 100644 --- a/ypp/real_time/RT_fields.F +++ b/ypp/real_time/RT_fields.F @@ -21,55 +21,147 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine RT_Fields() +subroutine RT_fields() ! - use pars, ONLY:schlen,n_fields_defs_max - use RT_control, ONLY:OBS_RT_IO_t + use units, ONLY:FS2AUT,AUT2FS + use stderr, ONLY:intc + use com, ONLY:msg + use pars, ONLY:SP,schlen,pi,n_fields_defs_max + use com, ONLY:com_path + use YPP_real_time, ONLY:RT_conf,ElField,RT_time use fields, ONLY:Efield use stderr, ONLY:STRING_split ! - implicit none +#include ! ! Work Space ! + integer :: i_field,i_t logical :: l_load_from_file,l_from_time_fft - character(schlen) :: field_defs(n_fields_defs_max) + character(schlen) :: field_defs(n_fields_defs_max),filename + real(SP) :: field_data(7),Field_time + ! + RT_conf%T_n_steps=nint( (RT_conf%T_range(2)-RT_conf%T_range(1))/RT_conf%delta_T )+1 ! ! Time Initialization from input - call RT_time_configuration_setup('FIELDS',OBS_RT_IO_t) + !call RT_time_configuration_setup('FIELDS',OBS_RT_IO_t) + YAMBO_ALLOC(RT_time,(RT_conf%T_n_steps)) + do i_t=1,RT_conf%T_n_steps + RT_time(i_t)=(i_t-1)*RT_conf%delta_T+RT_conf%T_range(1) + enddo + ! + call msg('s',' Time range :',(/minval(RT_time),maxval(RT_time)/)*AUT2FS,"[fs]") + call msg('s',' Time step :',RT_conf%delta_T*AUT2FS,"[fs]") + call msg('s',' Time steps :',RT_conf%T_n_steps) ! ! Analize the input variables for the external field call STRING_split(Efield(1)%ef_name,field_defs) ! + i_field=1 + ! ! Field in frequency space from external file - if ( field_defs(1)=='FROM_W_FILE') call RT_Field_w_load() + if ( field_defs(1)=='FROM_W_FILE') call RT_Field_w_load(i_field) ! ! Field in frequency space from FT of real time expression - if ( field_defs(1)/='FROM_W_FILE') call RT_Field_t_to_w() + if ( field_defs(1)/='FROM_W_FILE') call RT_Field_t_to_w(i_field) ! ! Chirp the field and convert back into real time - call RT_field_chirp() + ! Warning a pi factor is missing in the FT + call RT_1D_Fourier_Transform('W2T_LIN_CHIRP',ElField,RT_conf,1) + ! + filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".time" + ! + open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) + write(99+i_field,*) RT_conf%T_n_steps + ! + do i_t=1,RT_conf%T_n_steps + ! + Field_time=RT_time(i_t)-Efield(i_field)%t_initial + ! + field_data(1)=Field_time/FS2AUT + field_data(2)=real(ElField%F_t(i_t,1))/pi + field_data(3)=real(ElField%F_t(i_t,3))/pi + field_data(4)=real(ElField%F_t(i_t,5))/pi + field_data(5)=real(ElField%F_t(i_t,2))/pi + field_data(6)=real(ElField%F_t(i_t,4))/pi + field_data(6)=real(ElField%F_t(i_t,6))/pi + ! + write(99+i_field,*) field_data + ! + enddo + ! + close(99+i_field) ! end subroutine RT_fields ! ! -subroutine RT_Field_w_load() +subroutine RT_Field_w_load(i_field) ! ! TODO ! + implicit none + ! + integer, intent(in) :: i_field + ! + call error(' Loading field frequency from file not yet coded') + ! end subroutine RT_Field_w_load ! ! -subroutine RT_Field_t_to_w() +subroutine RT_Field_t_to_w(i_field) ! - ! TODO + use units, ONLY:FS2AUT + use stderr, ONLY:intc + use pars, ONLY:SP,schlen + use fields, ONLY:Efield,small_a + use com, ONLY:com_path + use YPP_real_time, ONLY:RT_conf,ElField,RT_time ! -end subroutine RT_Field_t_to_w -! -! -subroutine RT_Field_chirp() + implicit none ! - ! TODO + integer, intent(in) :: i_field + ! + integer :: i_t + character(schlen) :: filename + real(SP) :: field_data(7),Field_time + ! + ElField%title="Field" + ElField%N =6 + call RT_1D_Fourier_setup(ElField,RT_conf,6) + ! + do i_t=1,RT_conf%T_n_steps + ! + Field_time=RT_time(i_t)-Efield(i_field)%t_initial + ! + ElField%F_t(i_t,1:2) =small_a(Field_time,Efield(i_field),0) + ElField%F_t(i_t,3:4) =small_a(Field_time,Efield(i_field),1) + ElField%F_t(i_t,5:6) =small_a(Field_time,Efield(i_field),2) + ! + enddo ! -end subroutine RT_Field_chirp - + filename="YPP_EXTFIELD_"//trim(intc(i_field))//".time" + ! + open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) + write(99+i_field,*) RT_conf%T_n_steps + ! + do i_t=1,RT_conf%T_n_steps + ! + Field_time=RT_time(i_t)-Efield(i_field)%t_initial + ! + field_data(1)=Field_time/FS2AUT + field_data(2)=real(ElField%F_t(i_t,1)) + field_data(3)=real(ElField%F_t(i_t,3)) + field_data(4)=real(ElField%F_t(i_t,5)) + field_data(5)=real(ElField%F_t(i_t,2)) + field_data(6)=real(ElField%F_t(i_t,4)) + field_data(6)=real(ElField%F_t(i_t,6)) + ! + write(99+i_field,*) field_data + ! + enddo + ! + close(99+i_field) + ! + call RT_1D_Fourier_Transform('T2W',ElField,RT_conf,1) + ! +end subroutine RT_Field_t_to_w From d9ab9f1682de0333d4967781014a56317dc2cff8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 8 Jan 2023 15:33:16 +0100 Subject: [PATCH 0556/1367] Version 5.1.0, Revision 21878, Hash d7aa52fcb MODIFIED * interface/INIT_fields.F modules/mod_fields.F real_time_initialize/RT_initialize.F ypp/interface/INIT_load_ypp.F ypp/modules/mod_YPP_real_time.F ypp/real_time/RT_1D_Fourier_Transform.F ypp/real_time/RT_fields.F Changes: - [yambo_rt/yambo_nl] Chirped pulses coded in mod_fields for some pulses Alternative chirping procedure coded in ypp_rt Patch sent by: Davide Sangalli --- src/interface/INIT_fields.F | 3 + src/modules/mod_fields.F | 65 ++++++++----- src/real_time_initialize/RT_initialize.F | 6 +- ypp/interface/INIT_load_ypp.F | 4 +- ypp/modules/mod_YPP_real_time.F | 2 +- ypp/real_time/RT_1D_Fourier_Transform.F | 69 +++++++++----- ypp/real_time/RT_fields.F | 111 +++++++++++++---------- 7 files changed, 164 insertions(+), 96 deletions(-) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index d392977adc..8c1746e242 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -37,6 +37,7 @@ subroutine Afield_activate(i1) call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') + call initactivate(1,field//'_Chirp') call initactivate(1,field//'_FWHM') call initactivate(1,field//'_kind') call initactivate(1,field//'_pol') @@ -81,6 +82,8 @@ subroutine Afield(defs,i_field) & Efield(i_field)%intensity,unit=I_unit) call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& & Efield(i_field)%width,unit=Time_unit(1)) + call it(defs,trim(name)//'_Chirp', '[RT '//trim(name)//'] Width',& +& Efield(i_field)%chirp,unit=Time_unit(1),verb_level=V_real_time) call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& & Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index ea269b332c..375131ab75 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -43,6 +43,7 @@ module fields integer :: n_frequencies real(SP) :: frequency(2) real(SP) :: width + real(SP) :: chirp real(SP) :: FWHM real(SP) :: fluence real(SP) :: pi_kind @@ -157,10 +158,11 @@ function small_a(T,E_field,order,envelop_only) complex(SP), dimension(2) :: small_a ! integer ::i1,i_fr,i_T,i_field,i_file,n_fields,n_freqs - real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt + real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & + & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z character(schlen) ::field_defs(n_fields_defs_max) - logical ::lchirp,envelop_only_ + logical ::l_multi_phase,envelop_only_ ! ! Zeroing ! @@ -177,6 +179,13 @@ function small_a(T,E_field,order,envelop_only) ! Field parameters ! sigma=E_field%width + chirp=E_field%chirp + ! + s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) + c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) + ! + sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) + ! n_freqs=max(1,E_field%n_frequencies) ! field_defs="" @@ -217,18 +226,18 @@ function small_a(T,E_field,order,envelop_only) case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') ! Fields which need T_0 W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP - T_0_fac=3._SP*sigma - if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma - if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma - if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma - if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma - if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma + T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff + if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff + if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff + if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac end select ! ! Initial and relative phases control - lchirp=.false. + l_multi_phase=.false. fr_shift(1)=0._SP fr_shift(2)=pi/2._SP do i1=1,n_fields_defs_max @@ -238,7 +247,7 @@ function small_a(T,E_field,order,envelop_only) if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/3._SP ! 30 deg if( trim(field_defs(i1))=="PHPI15") fr_shift(:)=fr_shift(:)+pi/6._SP ! 15 deg if( trim(field_defs(i1))=="PHPI10") fr_shift(:)=fr_shift(:)+pi/9._SP ! 10 deg - if( trim(field_defs(i1))=="CHIRP") lchirp=.true. + if( trim(field_defs(i1))=="PHMULT" .and. n_freqs>1) l_multi_phase=.true. enddo ! E_field%To=T_0 @@ -249,19 +258,21 @@ function small_a(T,E_field,order,envelop_only) if (envelop_only_) then W_field=0._SP W_field_m1=0._SP + der_fac=0._SP WtimesT=fr_shift(i_field) f0t=cONE ; f1t=cONE else W_field=field_frequency(E_field,i_fr) if(W_field> 0._SP) W_field_m1=1._SP/W_field if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) ! ! The frequency shift is applied in two cases ! (i n_fields=2) to have a circular polarized pulse, and WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) - ! (ii n_freqs>1) to chirp the relative frequencies, - ! i.e. each frequency has a different initial phase - if(n_freqs>1 .and. lchirp) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + ! each frequency has a different initial phase + if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2._SP ! ! CONTROL RES / ANTIRES case cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt @@ -271,7 +282,7 @@ function small_a(T,E_field,order,envelop_only) if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif endif ! - EXPf=exp(-(T-T_0)**2/(2._SP*sigma**2) ) + EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) ! select case( trim(field_defs(1)) ) case('FROM_FILE') @@ -292,21 +303,24 @@ function small_a(T,E_field,order,envelop_only) if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1) ! delta function ! case('RECTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0)*f1t ! theta function if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1)*f1t & ! delta function - &+theta_function(sigma-T,RT_dyn_step,0)*f0t*W_field + &+theta_function(sigma-T,RT_dyn_step,0)*f0t*der_fac ! case('SIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 if (order==1 ) f_now=+damp_func* f1t - if (order==2 ) f_now=+damp_func* f0t *W_field + if (order==2 ) f_now=+damp_func* f0t *der_fac ! case('SOFTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) if (order==-1) f_now=-2 if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 if (order== 1) f_now=+damp_func* f1t - if (order== 2) f_now=+damp_func* f0t *W_field + if (order== 2) f_now=+damp_func* f0t *der_fac ! case('THETA') if (order==0 ) f_now=damp_func*T @@ -319,9 +333,9 @@ function small_a(T,E_field,order,envelop_only) if (order> 0 ) f_now=0._SP ! case('GAUSS') - if (order==0 ) f_now= sigma*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma*sqrt(2._SP)) )+1._SP ) + if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) if (order==1 ) f_now= Expf - if (order==2 ) f_now=-Expf*(T-T_0)/sigma**2 + if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 ! case('QSSIN') ! @@ -331,6 +345,9 @@ function small_a(T,E_field,order,envelop_only) ! ! ERFI(z)=i*(exp(z^2)*W(-z)-1) ! + if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & + & call error("chirp not implemented with QSSIN and velocity gauge") + ! cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) ! @@ -340,10 +357,11 @@ function small_a(T,E_field,order,envelop_only) if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO ! if (order==0 ) f_now= erfi_z - if (order==1 ) f_now= f1t *EXPf - if (order==2 ) f_now=(W_field*f0t-(T-T_0)*f1t/sigma**2)*EXPf + if (order==1 ) f_now= f1t *EXPf + if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf ! case('QSFIELD') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) ! if (order==0 ) f_now= f1t *EXPf if (order==1 ) f_now=( W_field*f0t-(T-T_0)*f1t/sigma**2)*EXPf @@ -352,6 +370,8 @@ function small_a(T,E_field,order,envelop_only) & -(T-T_0)*(W_field*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf ! case('PULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + ! if(abs((T-T_0))< sigma) then if (order==0 ) f_now= 0._SP if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t @@ -360,6 +380,7 @@ function small_a(T,E_field,order,envelop_only) endif ! case('SPULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) T_0=sigma W_0=W_field f_now=cZERO @@ -434,6 +455,7 @@ subroutine Efield_duplicate(E1,E2) E2%n_frequencies=E1%n_frequencies E2%W_step=E1%W_step E2%width=E1%width + E2%chirp=E1%chirp E2%FWHM=E1%FWHM E2%amplitude=E1%amplitude E2%intensity=E1%intensity @@ -460,6 +482,7 @@ subroutine Efield_reset(E) E%fluence =0._SP E%pi_kind =0._SP E%width =0._SP + E%chirp =0._SP E%ef_name ='none' E%ef_pol ='none' E%versor =(/1._SP,0._SP,0._SP/) diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 6cf5a338c2..2d37bf79e8 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -75,7 +75,7 @@ subroutine RT_initialize(E,k,q) ! integer :: i1,i_defs,N_T_samplings,ik,NK_cpu(PAR_COM_Xk_ibz_INDEX%n_CPU) character(schlen) :: MSG_ch,field_defs(n_fields_defs_max) - real(SP) :: T_memory + real(SP) :: T_memory,sigma_eff logical :: l_Full_RT_T_evolution,l_skip_it,l_velocity_gauge_tmp real(SP), parameter :: thresh=1.E-5_SP integer, external :: RT_Lifetimes_evaluation_plan @@ -486,7 +486,9 @@ subroutine RT_initialize(E,k,q) & 2._SP*pi*HBAR_evfs/(Efield(i1)%frequency*HA2EV)/),'[eV/fs]') call msg('r', trim(MSG_ch)//' elemental oscillation ',EtoT(E=Efield(i1)%frequency(2)-& & Efield(i1)%frequency(1))*AUT2FS,'[fs]') - call msg('r', trim(MSG_ch)//' width ',Efield(i1)%width*AUT2FS,'[fs]') + sigma_eff=sqrt((Efield(i1)%width**4+Efield(i1)%chirp**4)/Efield(i1)%width**2) + call msg('r', trim(MSG_ch)//' Fourier limited width ',Efield(i1)%width*AUT2FS,'[fs]') + call msg('r', trim(MSG_ch)//' Real time width ',sigma_eff*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' start time ',Efield(i1)%t_initial*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' energy steps ',Efield(i1)%n_frequencies) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index e019d09ffc..3e84352482 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -44,7 +44,7 @@ subroutine INIT_ypp_load(defs) use YPP_symm, ONLY:wf_ng_cut #if defined _YPP_RT use YPPm, ONLY:Nel_fac - use YPP_real_time, ONLY:RT_conf,Eh_pumped_Nel,Eh_pumped_pair_deltaE,Rho_deph,alpha_lin_chirp,& + use YPP_real_time, ONLY:RT_conf,Eh_pumped_Nel,Eh_pumped_pair_deltaE,Rho_deph,ypp_chirp,& & Eh_pumped_pair_width,Probe_Keyword,Pump_Keyword,X_order,X_kind,Eh_pumped_pair_energy,& & Eh_pumped_pair_BZ_width,Eh_mu,Eh_temp,h_mu_autotune_thr,TRabsWHAT,TRabsDIP_plane,& & TRabsMODE,TRabsDIP_dir,TRabs_Eeh_treshold,Pump_path,RT_pol_mode @@ -383,7 +383,7 @@ subroutine INIT_ypp_load(defs) ! call it('f',defs,'STD_style','Print occupations using the standard style',verb_level=V_real_time) ! - call it(defs,'ChirpFac','Prefactor for linear chirping in frequency space',alpha_lin_chirp) + call it(defs,'ChirpFac','Prefactor for linear chirping in frequency space',ypp_chirp,unit=Time_unit(1)) call Afield(defs,1) ! #endif diff --git a/ypp/modules/mod_YPP_real_time.F b/ypp/modules/mod_YPP_real_time.F index 16f2c3a65c..120ddccd74 100644 --- a/ypp/modules/mod_YPP_real_time.F +++ b/ypp/modules/mod_YPP_real_time.F @@ -142,7 +142,7 @@ module YPP_real_time ! ! (RT) Fields ! - real(SP) :: alpha_lin_chirp=0._SP + real(SP) :: ypp_chirp=0._SP ! type RT_ctl real(SP) :: delta_W =0._SP ! delta W diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 49312495eb..a355d70479 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM CA +! Authors (see AUTHORS file for details): AM CA DS ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -37,7 +37,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! ! F_t(t) = \int F_w(w) exp^(-i w t) ! - use YPP_real_time, ONLY:RT_time,Use_FFT,OBS_el,RT_ctl,alpha_lin_chirp + use YPP_real_time, ONLY:RT_time,Use_FFT,OBS_el,RT_ctl use pars, ONLY:DP,cI,cZERO_DP use LIVE_t, ONLY:live_timing ! @@ -53,7 +53,6 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) integer :: i_w,i_t,fft_sign,i_c integer(8) :: fftw_plan logical :: l_live_timing - complex :: chirp_phase ! l_live_timing=len_trim(FT%title)>0 ! @@ -61,7 +60,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) !=================== if (mode=="T2W") then ! - if (l_live_timing) call live_timing('FT@'//trim(FT%title)//'',RT%W_n_steps*FT%N) + if (l_live_timing) call live_timing('FT-'//mode//'@'//trim(FT%title)//'',RT%W_n_steps*FT%N) ! FT%F_w=cZERO_DP ! @@ -107,7 +106,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! FT%F_t=cZERO_DP ! - if (l_live_timing) call live_timing('FT@'//trim(FT%title)//'',RT%T_n_steps*FT%N) + if (l_live_timing) call live_timing('FT-'//mode//'@'//trim(FT%title)//'',RT%T_n_steps*FT%N) do i_c=1,FT%N do i_t = 1, RT%T_n_steps do i_w = 1, RT%W_n_steps @@ -120,25 +119,47 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! endif ! - ! Frequency to Time - !=================== - if (mode=="W2T_LIN_CHIRP") then - ! - FT%F_t=cZERO_DP - ! - if (l_live_timing) call live_timing('FT@'//trim(FT%title)//'',RT%T_n_steps*FT%N) - do i_c=1,FT%N - do i_t = 1, RT%T_n_steps - do i_w = 1, RT%W_n_steps - chirp_phase=-cI*alpha_lin_chirp*cos(FT%W(i_w)-FT%W(1)) - FT%F_t(i_t,i_c) = FT%F_t(i_t,i_c)+FT%F_w(i_w,i_c)*(FT%W(2)-FT%W(1))*exp(-cI*FT%W(i_w)*RT_time(i_t)-chirp_phase) - enddo - if (l_live_timing) call live_timing(steps=1) +end subroutine RT_1D_Fourier_Transform +! +! +subroutine RT_1D_Fourier_Chirp(FT,RT) + ! + ! This subroutine adds a chirp in frequency space + ! + use fields, ONLY:Efield + use YPP_real_time, ONLY:RT_time,Use_FFT,OBS_el,RT_ctl,ypp_chirp + use pars, ONLY:DP,cI,cZERO_DP,pi + use LIVE_t, ONLY:live_timing + ! + implicit none + ! + type(OBS_el),intent(inout)::FT + type(RT_ctl),intent(in) ::RT + ! + ! Work Space + ! + integer :: i_w,i_t,i_c + logical :: l_live_timing + complex(DP):: chirp_phase(RT%W_n_steps),dw + ! + l_live_timing=len_trim(FT%title)>0 + ! + FT%F_t=cZERO_DP + dw=(FT%W(2)-FT%W(1)) + do i_w = 1, RT%W_n_steps + chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency(1))**2) + enddo + ! + if (l_live_timing) call live_timing('FT-CHIRP@'//trim(FT%title)//'',RT%T_n_steps*FT%N) + do i_c=1,FT%N + do i_t = 1, RT%T_n_steps + do i_w = 1, RT%W_n_steps + FT%F_t(i_t,i_c) = FT%F_t(i_t,i_c)+FT%F_w(i_w,i_c)*chirp_phase(i_w)*exp(-cI*FT%W(i_w)*RT_time(i_t)) enddo + if (l_live_timing) call live_timing(steps=1) enddo - if (l_live_timing) call live_timing() - ! - endif + enddo + FT%F_t=FT%F_t*dw/pi + if (l_live_timing) call live_timing() ! -end subroutine RT_1D_Fourier_Transform - +end subroutine RT_1D_Fourier_Chirp diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F index eb57b5b151..e8dab93523 100644 --- a/ypp/real_time/RT_fields.F +++ b/ypp/real_time/RT_fields.F @@ -23,7 +23,7 @@ ! subroutine RT_fields() ! - use units, ONLY:FS2AUT,AUT2FS + use units, ONLY:AUT2FS use stderr, ONLY:intc use com, ONLY:msg use pars, ONLY:SP,schlen,pi,n_fields_defs_max @@ -66,36 +66,20 @@ subroutine RT_fields() if ( field_defs(1)/='FROM_W_FILE') call RT_Field_t_to_w(i_field) ! ! Chirp the field and convert back into real time - ! Warning a pi factor is missing in the FT - call RT_1D_Fourier_Transform('W2T_LIN_CHIRP',ElField,RT_conf,1) + call RT_1D_Fourier_Chirp(ElField,RT_conf) ! - filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".time" + call RT_print_Elfield(1,"time-chirped",Elfield) ! - open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) - write(99+i_field,*) RT_conf%T_n_steps - ! - do i_t=1,RT_conf%T_n_steps - ! - Field_time=RT_time(i_t)-Efield(i_field)%t_initial - ! - field_data(1)=Field_time/FS2AUT - field_data(2)=real(ElField%F_t(i_t,1))/pi - field_data(3)=real(ElField%F_t(i_t,3))/pi - field_data(4)=real(ElField%F_t(i_t,5))/pi - field_data(5)=real(ElField%F_t(i_t,2))/pi - field_data(6)=real(ElField%F_t(i_t,4))/pi - field_data(6)=real(ElField%F_t(i_t,6))/pi - ! - write(99+i_field,*) field_data - ! - enddo + call RT_1D_Fourier_Transform('T2W',ElField,RT_conf,1) ! - close(99+i_field) + call RT_print_Elfield(1,"freq-chirped",Elfield) ! end subroutine RT_fields ! ! subroutine RT_Field_w_load(i_field) + ! + use YPP_real_time, ONLY:RT_conf,ElField ! ! TODO ! @@ -105,16 +89,16 @@ subroutine RT_Field_w_load(i_field) ! call error(' Loading field frequency from file not yet coded') ! + call RT_print_Elfield(1,"freq",Elfield) + ! end subroutine RT_Field_w_load ! ! subroutine RT_Field_t_to_w(i_field) ! use units, ONLY:FS2AUT - use stderr, ONLY:intc use pars, ONLY:SP,schlen use fields, ONLY:Efield,small_a - use com, ONLY:com_path use YPP_real_time, ONLY:RT_conf,ElField,RT_time ! implicit none @@ -122,46 +106,81 @@ subroutine RT_Field_t_to_w(i_field) integer, intent(in) :: i_field ! integer :: i_t - character(schlen) :: filename - real(SP) :: field_data(7),Field_time + real(SP) :: Field_time ! ElField%title="Field" ElField%N =6 call RT_1D_Fourier_setup(ElField,RT_conf,6) ! do i_t=1,RT_conf%T_n_steps - ! Field_time=RT_time(i_t)-Efield(i_field)%t_initial - ! ElField%F_t(i_t,1:2) =small_a(Field_time,Efield(i_field),0) ElField%F_t(i_t,3:4) =small_a(Field_time,Efield(i_field),1) ElField%F_t(i_t,5:6) =small_a(Field_time,Efield(i_field),2) - ! enddo ! - filename="YPP_EXTFIELD_"//trim(intc(i_field))//".time" + call RT_print_Elfield(1,"time",Elfield) + ! + call RT_1D_Fourier_Transform('T2W',ElField,RT_conf,1) + ! + call RT_print_Elfield(1,"freq",Elfield) + ! +end subroutine RT_Field_t_to_w +! +! +subroutine RT_print_Elfield(i_field,mode,Elfield) + ! + use units, ONLY:FS2AUT + use YPP_real_time, ONLY:RT_conf,OBS_el + use pars, ONLY:SP,schlen + use stderr, ONLY:intc + use com, ONLY:com_path + ! + implicit none + ! + integer, intent(in) :: i_field + character(*), intent(in) :: mode + type(OBS_el), intent(in) :: ElField + ! + integer :: i_t,i_w,idata + character(schlen) :: filename + real(SP) :: field_data(7),Field_t,Field_w + ! + if (mode=="time") filename="YPP_EXTFIELD_"//trim(intc(i_field))//".time" + if (mode=="time-chirped") filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".time" + if (mode=="freq") filename="YPP_EXTFIELD_"//trim(intc(i_field))//".freq" + if (mode=="freq-chirped") filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".freq" ! open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) - write(99+i_field,*) RT_conf%T_n_steps ! - do i_t=1,RT_conf%T_n_steps + if (index(mode,"time")>0) then ! - Field_time=RT_time(i_t)-Efield(i_field)%t_initial + write(99+i_field,*) RT_conf%T_n_steps ! - field_data(1)=Field_time/FS2AUT - field_data(2)=real(ElField%F_t(i_t,1)) - field_data(3)=real(ElField%F_t(i_t,3)) - field_data(4)=real(ElField%F_t(i_t,5)) - field_data(5)=real(ElField%F_t(i_t,2)) - field_data(6)=real(ElField%F_t(i_t,4)) - field_data(6)=real(ElField%F_t(i_t,6)) + do i_t=1,RT_conf%T_n_steps + Field_t=RT_conf%T_range(1)+(i_t-1)*RT_conf%delta_t !-Efield%t_initial + field_data(1)=Field_t/FS2AUT + do idata=1,6 + field_data(idata+1)=real(ElField%F_t(i_t,idata)) + enddo + write(99+i_field,*) field_data + enddo ! - write(99+i_field,*) field_data + else if (index(mode,"freq")>0) then ! - enddo + write(99+i_field,*) RT_conf%W_n_steps + ! + do i_w=1,RT_conf%W_n_steps + Field_w=RT_conf%X_w_range(1)+(i_w-1)*RT_conf%delta_W + field_data(1)=Field_w !/FS2AUT + do idata=1,6 + field_data(idata+1)=real(ElField%F_w(i_w,idata)) + enddo + write(99+i_field,*) field_data + enddo + ! + endif ! close(99+i_field) ! - call RT_1D_Fourier_Transform('T2W',ElField,RT_conf,1) - ! -end subroutine RT_Field_t_to_w +end subroutine RT_print_Elfield From 780d21494c262079e602cf261c83dd486f4e3e93 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 10 Jan 2023 12:24:01 +0100 Subject: [PATCH 0557/1367] Version 5.1.0, Revision 21879, Hash d9ab9f168 MODIFIED * include/driver/version.h io/variables_RT_static.F ypp/real_time/RT_X_LRR_real_field.F ypp/real_time/RT_X_response.F Bugs: - [ypp_rt] fixed post-processing in case of pump and probe simulations. Chirp information on the field added to RT database. Warning: this breaks back compatibility. Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/variables_RT_static.F | 5 +++-- ypp/real_time/RT_X_LRR_real_field.F | 9 --------- ypp/real_time/RT_X_response.F | 30 +++++++++++++++++++++-------- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b7d0e9848e..d60beee229 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21863 -#define YAMBO_HASH "1a877c605" +#define YAMBO_REVISION 21879 +#define YAMBO_HASH "d9ab9f168" diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index 866428806a..545bedd666 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -176,12 +176,13 @@ integer function variables_RT_static(ID) call def_variable_elemental(ID,VAR="FIELD_POL"//trim(intc(i1)),VAR_SZ=1,VAR_KIND=0,MENU=0) call io_variable_elemental(ID,CH0=Efield(i1)%ef_pol,VAR=' [FIELDs] Polarization',DESCRIPTOR=RT_desc) ! - call def_variable_elemental(ID,VAR="EXTERNAL_FIELD"//trim(intc(i1)),VAR_SZ=13,VAR_KIND=SP,MENU=0) + call def_variable_elemental(ID,VAR="EXTERNAL_FIELD"//trim(intc(i1)),VAR_SZ=14,VAR_KIND=SP,MENU=0) call io_variable_elemental(ID,R1=Efield(i1)%versor,VAR=" [FIELDs] Versor",DESCRIPTOR=RT_desc) call io_variable_elemental(ID,R1=Efield(i1)%versor_circ,VAR=" [FIELDs] Versor_circ",DESCRIPTOR=RT_desc) call io_variable_elemental(ID,VAR=" [FIELDs] Intensity",R0=Efield(i1)%intensity,& & DESCRIPTOR=RT_desc,UNIT=AU2KWCMm2,TERMINATOR="[kWCMm2]") - call io_variable_elemental(ID,VAR=" [FIELDs] Damping",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") + call io_variable_elemental(ID,VAR=" [FIELDs] Width ",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") + call io_variable_elemental(ID,VAR=" [FIELDs] Chirp ",R0=Efield(i1)%chirp,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R1=Efield(i1)%frequency,& & DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") call io_variable_elemental(ID,VAR=" [FIELDs] Frequency steps",I0=Efield(i1)%n_frequencies,DESCRIPTOR=RT_desc) diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 334433718c..97f0c59429 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -67,15 +67,6 @@ subroutine RT_X_LRR_real_field(en) if(trim(Efield(i_Probe)%ef_pol)=="circular") n_fields=2 if( Efield(i_Probe)%n_frequencies > 1 ) n_freqs=Efield(i_Probe)%n_frequencies ! - ! Pump removal (if any) - !----------------------- - if (N_pumps==1) then - do i_t=1,RT_conf%T_n_steps - Curr(i_Probe)%F_t(i_t,:)=Curr(i_Probe)%F_t(i_t,:)-Curr(i_Probe+1)%F_t(i_t,:) - Pol(i_Probe)%F_t(i_t,:)=Pol(i_Probe)%F_t(i_t,:)-Pol(i_Probe+1)%F_t(i_t,:) - enddo - endif - ! ! 1D FFT setup !-------------- call RT_1D_Fourier_setup(ElField,RT_conf,n_fields) diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index be9d112003..c9577d9bb9 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -79,14 +79,6 @@ subroutine RT_X_response(en,k,q) ! call IO_temporary_jobdir_and_strings("ALL","SAVE") ! - Pol(1)%title ="polarization" - Curr(1)%title="current" - if (.not.STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(1)) - call RT_OBSERVABLES_IO( what='JP',J=Curr(1),P=Pol(1),IO_error=IO_error) - if (.not.allocated(Curr(1)%F_t)) call error('Probe databases missing/corrupt') - ! - call IO_temporary_jobdir_and_strings("ALL","RESTORE") - ! if (N_pumps>0) then ! ! Here the assumption is that @@ -101,8 +93,27 @@ subroutine RT_X_response(en,k,q) ! call IO_temporary_jobdir_and_strings("ALL","RESTORE") ! + endif + ! + ! NB: the full run needs to be loaded as last, + ! otherwise the wrong fields are stored + ! + Pol(1)%title ="polarization" + Curr(1)%title="current" + if (.not.STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(1)) + call RT_OBSERVABLES_IO( what='JP',J=Curr(1),P=Pol(1),IO_error=IO_error) + if (.not.allocated(Curr(1)%F_t)) call error('Probe databases missing/corrupt') + ! + call IO_temporary_jobdir_and_strings("ALL","RESTORE") + ! + if (N_pumps>0) then + ! Pol(3)%title ="probe-polarization" Curr(3)%title="probe-current" + Pol(3)%N=3 + Curr(3)%N=3 + YAMBO_ALLOC(Pol(3)%F_t,(RT_conf%T_n_steps,3)) + YAMBO_ALLOC(Curr(3)%F_t,(RT_conf%T_n_steps,3)) Pol(3)%F_t =Pol(1)%F_t -Pol(2)%F_t Curr(3)%F_t=Curr(1)%F_t-Curr(2)%F_t ! @@ -121,6 +132,9 @@ subroutine RT_X_response(en,k,q) call RT_OBSERVABLES_damp_and_write(Pol(3),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(3),RT_conf,l_skip_OBS_IO) ! + Pol(1)%F_t =Pol(1)%F_t -Pol(2)%F_t + Curr(1)%F_t=Curr(1)%F_t-Curr(2)%F_t + ! endif ! if ( l_RT_pol ) then From 41cf94b6afc6f82a485f34c085bb60f9f20587a8 Mon Sep 17 00:00:00 2001 From: palful Date: Tue, 10 Jan 2023 13:11:39 +0100 Subject: [PATCH 0558/1367] Swapped gkkp indices as per issue #690 --- src/exc-ph/EXCPH_gkkp_driver.F | 4 ++-- src/exc-ph/EXCPH_gkkp_eval_pal.F | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index ce34b5508d..52753b512f 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -122,7 +122,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! and are consistent with the Lin and Lout specified in input ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') + io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') ! if(io_err==0) return if(io_err/=0) call warning("[EXCPH] Exc-ph matrix elements not correct or missing. To be computed") @@ -183,7 +183,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Write headers ! call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') + io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') ! ! Get q-point coordinates in the q-BZ YAMBO_ALLOC(EXCPH_q,(q%nbz,3)) diff --git a/src/exc-ph/EXCPH_gkkp_eval_pal.F b/src/exc-ph/EXCPH_gkkp_eval_pal.F index 1d01f16eb6..064450a534 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_pal.F +++ b/src/exc-ph/EXCPH_gkkp_eval_pal.F @@ -125,10 +125,13 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) if (i_Hp==0) cycle ! + ! [NB] Here we apply the conj and SWAP band indices in the matrix elements + ! Notes: (iv,ivp) => Code: (ivp,iv) + ! See issues #690 and #609 if (.not.l_const_elph) then ik_db=K_io_map(ik_bz) - if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ivp,iv,ik_db,1)) /sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp= abs(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) !ik_db=K_io_map(ik_minus_iq_bz) !elph_gkkp=GKKP%dVc(il,ivp,iv,ik_db,1)/sqrt(2._SP*ph_E) endif @@ -158,11 +161,13 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) if (i_Hp==0) cycle - ! + ! [NB] Here we apply the conj and SWAP band indices in the matrix elements + ! Notes: (icp,ic) => Code: (ic,icp) + ! See issues #690 and #609 if (.not.l_const_elph) then ik_db=K_io_map(ik_plus_iq_bz) - if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,icp,ic,ik_db,1) /sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) !ik_db=K_io_map(ik_bz) !elph_gkkp=GKKP%dVc(il,ic,icp,ik_db,1)/sqrt(2._SP*ph_E) endif From c3ebcd7b6d9391a98320b84213cd6946ea1a6031 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Fri, 13 Jan 2023 16:55:29 +0100 Subject: [PATCH 0559/1367] Update git ignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 99a008f0d9..72f6a7d4ac 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ objects.mk ################## config/compilation_helper.sh.inc lib/archive/git.list - +lib/archive/Ydriver-src # Compiled source # ################### *.com From e61ebd13f4259bd4acc8ecff8b9e44b14fa7f692 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Fri, 13 Jan 2023 16:57:28 +0100 Subject: [PATCH 0560/1367] rm Ydriver-src files --- lib/archive/Ydriver-src/.gitignore | 60 - lib/archive/Ydriver-src/bin/.empty | 0 .../Ydriver-src/config/acx_fortran_flags.m4 | 395 -- lib/archive/Ydriver-src/config/acx_fpp.m4 | 99 - lib/archive/Ydriver-src/config/acx_misc.m4 | 196 - lib/archive/Ydriver-src/config/config.guess | 1667 ----- lib/archive/Ydriver-src/config/config.sub | 1793 ----- lib/archive/Ydriver-src/config/configure.ac | 90 - lib/archive/Ydriver-src/config/defs.mk.in | 31 - lib/archive/Ydriver-src/config/install.sh | 1 - lib/archive/Ydriver-src/config/version.m4 | 6 - lib/archive/Ydriver-src/configure | 5825 ----------------- .../example/include/example_driver.h | 24 - .../example/include/fortran_driver.h | 38 - .../Ydriver-src/example/include/tool.h | 28 - .../Ydriver-src/example/include/version.h.in | 30 - lib/archive/Ydriver-src/example/main.F | 63 - .../Ydriver-src/example/options/.empty | 0 lib/archive/Ydriver-src/include/.empty | 0 lib/archive/Ydriver-src/include/driver.h | 37 - .../Ydriver-src/include/fortran_arguments.h | 27 - lib/archive/Ydriver-src/include/kind.h | 73 - lib/archive/Ydriver-src/include/wrapper.h | 39 - lib/archive/Ydriver-src/lib/.empty | 0 lib/archive/Ydriver-src/src/driver/driver.c | 78 - .../Ydriver-src/src/interface/.objects | 2 - .../src/interface/C_driver_transfer.F | 43 - .../Ydriver-src/src/interface/get_libraries.c | 87 - .../Ydriver-src/src/interface/get_runlevel.c | 48 - .../src/interface/get_running_project.c | 53 - .../src/interface/get_running_tool.c | 48 - .../Ydriver-src/src/interface/get_version.c | 54 - .../Ydriver-src/src/interface/mod_C_driver.F | 68 - lib/archive/Ydriver-src/src/main/.objects | 1 - .../Ydriver-src/src/main/command_line.c | 179 - lib/archive/Ydriver-src/src/main/input_file.c | 57 - lib/archive/Ydriver-src/src/main/launcher.c | 160 - .../Ydriver-src/src/main/load_environments.c | 85 - .../Ydriver-src/src/main/options_maker.c | 92 - lib/archive/Ydriver-src/src/main/title.c | 49 - lib/archive/Ydriver-src/src/main/tool_init.c | 101 - lib/archive/Ydriver-src/src/main/usage.c | 149 - lib/archive/Ydriver-src/src/main/use_me.c | 44 - lib/archive/Ydriver-src/src/main/winsize.c | 47 - lib/archive/Ydriver-src/src/options/.objects | 1 - .../Ydriver-src/src/options/options_help.c | 47 - 46 files changed, 12015 deletions(-) delete mode 100644 lib/archive/Ydriver-src/.gitignore delete mode 100644 lib/archive/Ydriver-src/bin/.empty delete mode 100644 lib/archive/Ydriver-src/config/acx_fortran_flags.m4 delete mode 100644 lib/archive/Ydriver-src/config/acx_fpp.m4 delete mode 100644 lib/archive/Ydriver-src/config/acx_misc.m4 delete mode 100755 lib/archive/Ydriver-src/config/config.guess delete mode 100755 lib/archive/Ydriver-src/config/config.sub delete mode 100644 lib/archive/Ydriver-src/config/configure.ac delete mode 100644 lib/archive/Ydriver-src/config/defs.mk.in delete mode 100755 lib/archive/Ydriver-src/config/install.sh delete mode 100644 lib/archive/Ydriver-src/config/version.m4 delete mode 100755 lib/archive/Ydriver-src/configure delete mode 100644 lib/archive/Ydriver-src/example/include/example_driver.h delete mode 100644 lib/archive/Ydriver-src/example/include/fortran_driver.h delete mode 100644 lib/archive/Ydriver-src/example/include/tool.h delete mode 100644 lib/archive/Ydriver-src/example/include/version.h.in delete mode 100644 lib/archive/Ydriver-src/example/main.F delete mode 100644 lib/archive/Ydriver-src/example/options/.empty delete mode 100644 lib/archive/Ydriver-src/include/.empty delete mode 100644 lib/archive/Ydriver-src/include/driver.h delete mode 100644 lib/archive/Ydriver-src/include/fortran_arguments.h delete mode 100644 lib/archive/Ydriver-src/include/kind.h delete mode 100644 lib/archive/Ydriver-src/include/wrapper.h delete mode 100644 lib/archive/Ydriver-src/lib/.empty delete mode 100644 lib/archive/Ydriver-src/src/driver/driver.c delete mode 100644 lib/archive/Ydriver-src/src/interface/.objects delete mode 100644 lib/archive/Ydriver-src/src/interface/C_driver_transfer.F delete mode 100644 lib/archive/Ydriver-src/src/interface/get_libraries.c delete mode 100644 lib/archive/Ydriver-src/src/interface/get_runlevel.c delete mode 100644 lib/archive/Ydriver-src/src/interface/get_running_project.c delete mode 100644 lib/archive/Ydriver-src/src/interface/get_running_tool.c delete mode 100644 lib/archive/Ydriver-src/src/interface/get_version.c delete mode 100644 lib/archive/Ydriver-src/src/interface/mod_C_driver.F delete mode 100644 lib/archive/Ydriver-src/src/main/.objects delete mode 100644 lib/archive/Ydriver-src/src/main/command_line.c delete mode 100644 lib/archive/Ydriver-src/src/main/input_file.c delete mode 100644 lib/archive/Ydriver-src/src/main/launcher.c delete mode 100644 lib/archive/Ydriver-src/src/main/load_environments.c delete mode 100644 lib/archive/Ydriver-src/src/main/options_maker.c delete mode 100644 lib/archive/Ydriver-src/src/main/title.c delete mode 100644 lib/archive/Ydriver-src/src/main/tool_init.c delete mode 100644 lib/archive/Ydriver-src/src/main/usage.c delete mode 100644 lib/archive/Ydriver-src/src/main/use_me.c delete mode 100644 lib/archive/Ydriver-src/src/main/winsize.c delete mode 100644 lib/archive/Ydriver-src/src/options/.objects delete mode 100644 lib/archive/Ydriver-src/src/options/options_help.c diff --git a/lib/archive/Ydriver-src/.gitignore b/lib/archive/Ydriver-src/.gitignore deleted file mode 100644 index ed4e5f15e9..0000000000 --- a/lib/archive/Ydriver-src/.gitignore +++ /dev/null @@ -1,60 +0,0 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.o -*.a -*.so -*.mod -modfiles.list -*.dep -*.f90 -*.s -*.sw* -*dSYM -*bk - - -# source # -########## -.check_configure -config/mk/defs.mk -*__lock* -Makefile.locks -Makefile.archive -*Makefile -make.dep -commit.msg - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db -myconfig* -nohup.out -autom4te.cache diff --git a/lib/archive/Ydriver-src/bin/.empty b/lib/archive/Ydriver-src/bin/.empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/archive/Ydriver-src/config/acx_fortran_flags.m4 b/lib/archive/Ydriver-src/config/acx_fortran_flags.m4 deleted file mode 100644 index 4ff16f7c46..0000000000 --- a/lib/archive/Ydriver-src/config/acx_fortran_flags.m4 +++ /dev/null @@ -1,395 +0,0 @@ -# -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# # -################################################ -# Set FC FLAGS -# ---------------------------------- -AC_DEFUN([ACX_FCSETUP], -[ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_ARG_VAR(UFLAGS,[Unoptimized Fortran flags]) -# -if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi -# -AC_ARG_ENABLE(debug-flags, AC_HELP_STRING([--enable-debug-flags], - [Debug flags are set for compilation. Default is no.])) -if test x"$enable_debug_flags" = "x"; then enable_debug_flags="no"; fi -# -def_compiler= -# -case "${host}" in -i?86*linux*) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - #FUFLAGS="-O0 -g -Mbackslash" - FUFLAGS="-O0 -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - NETCDFFLAGS="-DpgiFortran" - def_compiler="-D_PGI" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *abf90*) - SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" - ;; - *ifc*) - SYSFLAGS="-O3 -g -w -tpp7" - FUFLAGS="-O0 -w -tpp7" - FCMFLAG="" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="" - ;; - *g95*) - SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore -mtune=pentium4" - FUFLAGS="-g -O0 -fbackslash -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *ifort*) - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - CPU_FLAG="" - case "${INTELVERSION}" in - *11* | *12* | *13* |*14* | *15* | *16* ) - CPU_FLAG="-xHost" - #CPU_FLAG=" " - ;; - *17* | *18* | *19*) - CPU_FLAG=" " - OMPFLAGS="-qopenmp" - ;; - *10*) - CPU_FLAG="-xW" - ;; - *) - CPU_FLAG=" " - ;; - esac - SYSFLAGS="-assume bscc -O3 -g -ip $CPU_FLAG" - FUFLAGS="-assume bscc -O0 $CPU_FLAG" - FCMFLAG="-nofor_main" - DEBUG_FLAGS="-check all -CB -traceback -check bound" - ;; - *pathf9*) - SYSFLAGS="-O2 -g -fno-second-underscore" - FUFLAGS="-O0 -g -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-ffortran-bounds-check -C" - ;; - *) - SYSFLAGS="-O -g" - FUFLAGS="-O0 -g" - OMPFLAGS="-openmp" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -*86*apple* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -g -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *g95*) - SYSFLAGS="-O3 -g -fno-second-underscore -mtune=pentium4" - FUFLAGS="-O0 -g -fno-second-underscore" - FCMFLAG="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *ifort*) - CPU_FLAG="" - case "${INTELVERSION}" in - *1*) - CPU_FLAG="-mtune=pentium4" - ;; - *) - CPU_FLAG="-mtune=pentium4" - ;; - esac - SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" - FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" - FCMFLAG="-nofor_main" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-check all -CB -traceback -check bound" - ;; - *) - SYSFLAGS="-O -g" - FUFLAGS="-O -g0" - OMPFLAGS="-openmp" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -ia64*linux* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - NETCDFFLAGS="-DpgiFortran" - def_compiler="-D_PGI" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -g -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *g95*) - SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" - FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" - FCMFLAG="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *abf90*) - SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" - ;; - *ifc*) - SYSFLAGS="-O3 -g -w" - FUFLAGS="-O0 -g -w" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="" - ;; - *ifort*) - CPU_FLAG="" - case "${INTELVERSION}" in - *1*) - CPU_FLAG="-mtune=itanium" - ;; - *) - CPU_FLAG="" - ;; - esac - SYSFLAGS="-assume bscc -O2 -g -ip ${CPU_FLAG}" - FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" - FCMFLAG="-nofor_main" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-check all -CB -traceback -check bound" - ;; - *openf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - ;; - *pathf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-ffortran-bounds-check -C" - ;; - *) - SYSFLAGS="-g -O" - FUFLAGS="-O0" - OMPFLAGS="-openmp" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -*x86*64* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - def_compiler="-D_PGI" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -g -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *g95*) - SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" - FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" - FCMFLAG="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *abf90*) - SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" - ;; - *ifc*) - SYSFLAGS="-O3 -g -w -tpp2" - FUFLAGS="-O0 -g -w -tpp2" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - ;; - *ifort*) - OMPFLAGS="-openmp" - CPU_FLAG="" - case "${INTELVERSION}" in - *11* | *12* | *13* |*14* |*15* | *16* ) - #CPU_FLAG="-xHost" - CPU_FLAG=" " - ;; - *17* | *18* | *19*) - CPU_FLAG=" " - OMPFLAGS="-qopenmp" - ;; - *10*) - CPU_FLAG="-xW" - ;; - *) - CPU_FLAG=" " - ;; - esac - SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" - FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" - FCMFLAG="-nofor_main" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-CB -traceback" - ;; - *openf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - ;; - *pathf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-ffortran-bounds-check -C" - ;; - *) - SYSFLAGS="-g -O" - FUFLAGS="-O0" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -alphaev*) - SYSFLAGS="-O3 -arch host -tune host" - FUFLAGS="-O0" - FCMFLAG="-nofor_main" - ;; -powerpc64*linux* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - def_compiler="-D_PGI" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *) - CFLAGS="-q64 -O2 -g" - SYSFLAGS="-q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970" - FUFLAGS="-q64 -O0 -g" - OMPFLAGS="" - def_compiler="-D_XLF" - esac - ;; -powerpc-ibm* ) - CFLAGS="-O -q64" - SYSFLAGS="-O3 -g -q64 -qstrict -qarch=auto -qtune=auto -qmaxmem=-1" - FUFLAGS="-q64" - OMPFLAGS="-qthreaded" - def_compiler="-D_XLF" - ;; -mips-sgi-irix*) - SYSFLAGS="-O3 -r10000 -mips4" - ;; -*) - SYSFLAGS="-O" -esac -# -if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi -# -AC_MSG_CHECKING([for specific $FC flags]) -if test -z "${FCFLAGS}"; then - FCFLAGS="$SYSFLAGS" - AC_MSG_RESULT([$FCFLAGS]) -else - AC_MSG_RESULT([(User-defined) $FCFLAGS]) -fi -AC_MSG_CHECKING([for specific Open-MP flags]) -AC_MSG_RESULT([$OMPFLAGS]) -# -AC_MSG_CHECKING([for specific $CC flags]) -AC_MSG_RESULT([$CFLAGS]) - -AC_MSG_CHECKING([for specific unoptimized flags]) -if test -z "${UFLAGS}"; then - FCUFLAGS="$FUFLAGS" - AC_MSG_RESULT([$FCUFLAGS]) -else - AC_MSG_RESULT([(User-defined) $UFLAGS]) - FCUFLAGS="$UFLAGS" - FUFLAGS="$UFLAGS" -fi -# -if test x"$enable_debug_flags" = "xyes"; then - FCFLAGS="$DEBUG_FLAGS" - FCUFLAGS="$DEBUG_FLAGS" -fi -# -AC_MSG_CHECKING([for specific NETCDF flags]) -AC_MSG_RESULT([$NETCDFFLAGS]) -# -AC_SUBST(CFLAGS) -AC_SUBST(FCFLAGS) -AC_SUBST(FCUFLAGS) -AC_SUBST(FUFLAGS) -AC_SUBST(FCMFLAG) -AC_SUBST(OMPFLAGS) -AC_SUBST(NETCDFFLAGS) -AC_SUBST(DEBUG_FLAGS) -AC_SUBST(def_compiler) -]) -# diff --git a/lib/archive/Ydriver-src/config/acx_fpp.m4 b/lib/archive/Ydriver-src/config/acx_fpp.m4 deleted file mode 100644 index 99bbc30011..0000000000 --- a/lib/archive/Ydriver-src/config/acx_fpp.m4 +++ /dev/null @@ -1,99 +0,0 @@ -# -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# -AC_DEFUN([ACX_FPP], -[ -# -AC_ARG_VAR(FPP,Fortran preprocessor) -# -case "${FC}" in - # - # does not work properly - # - *ifort*) - if test -z "$FPP"; then FPP="fpp -free -P"; fi - ;; - *gfortran | *g95) - if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi - ;; - # - # some of the following could be uncommented once explicitly checked - # - #*sunf95) - # if test -z "$FPP"; then FPP="${FC} -E -P -fpp"; fi - # ;; - #*openf95) - # if test -z "$FPP"; then FPP="${FC} -E -P -ftpp"; fi - # ;; - #*pathf*) - # if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi - # ;; -esac -# -if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi -# -AC_MSG_NOTICE([testing FC-preprocessor $FPP]) -# -# TESTS -#======= -# -# Fortran Source -# -acx_FC_ok=yes -FPP_TESTS_PASSED=yes -AC_MSG_CHECKING([if FC precompiler works on FC source]) -cat > conftest.F << EOF_ - program conftest - character (1) :: a - a="a" - write (*,'('//a//')') 'hello' - end program -EOF_ -# ! Replace "S" with "\" and find the max length of -(eval $FPP conftest.F > conftest.${FCSUFFIX}) 2> conftest.er1 -if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" || - test -n "`grep "warning" conftest.er1`" || - test -n "`grep "command line remark" conftest.er1`" ; then - eval $FPP conftest.F > conftest.${FCSUFFIX} - eval $FC $FCFLAGS -c conftest.${FCSUFFIX} 2> conftest.er2 >&5 - if test -s conftest.er2 ; then - if ! ( test -n "`grep successful conftest.er2`" || - test -n "`grep "warning" conftest.er2`" || - test -n "`grep "command line remark" conftest.er2`" ) ; then - acx_FC_ok=no ; - FPP_TESTS_PASSED=no; - fi - fi -else - acx_FC_ok=no ; - FPP_TESTS_PASSED=no -fi -AC_MSG_RESULT([$acx_FC_ok]) -# -if test "x$FPP_TESTS_PASSED" = xno ; then - AC_MSG_ERROR(Found FC precompiler problems in processing FC source.); -fi -# -AC_SUBST(FPP) -# -]) diff --git a/lib/archive/Ydriver-src/config/acx_misc.m4 b/lib/archive/Ydriver-src/config/acx_misc.m4 deleted file mode 100644 index 79f93319d2..0000000000 --- a/lib/archive/Ydriver-src/config/acx_misc.m4 +++ /dev/null @@ -1,196 +0,0 @@ -# -# Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch -# -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# -################################################ -# Check size of a pointer -# ---------------------------------- -AC_DEFUN([ACX_POINTER_SIZE], -[AC_MSG_CHECKING([for the size of a pointer]) - AC_REQUIRE([AC_PROG_CC]) - if test -z "$POINTER_SIZE"; then - cat >pointertest.c < -void main() -{ - printf("%ld", sizeof(void *)); -} -EOF - ac_try='$CC $CFLAGS -o pointertest.x pointertest.c 1>&AC_FD_CC' - if AC_TRY_EVAL(ac_try); then - ac_try="" - else - echo "configure: failed program was:" >&AC_FD_CC - cat pointertest.c >&AC_FD_CC - rm -rf pointertest* - AC_MSG_ERROR(failed to compile c program to find the size of a pointer) - fi - ac_pointersize=`./pointertest.x`; - rm -rf pointertest* - AC_DEFINE_UNQUOTED(POINTER_SIZE, ${ac_pointersize}, [The size of a C pointer]) - AC_MSG_RESULT([${ac_pointersize} bytes]) -fi -]) -################################################ -# AC_LANG_FUNC_LINK_TRY(Fortran)(FUNCTION) -# ---------------------------------- -m4_define([AC_LANG_FUNC_LINK_TRY(Fortran)], -[AC_LANG_PROGRAM([], [call [$1]])]) - -################################################ -# Set various default FLAGS -# ---------------------------------- -AC_DEFUN([ACX_WIDESETUP], -[ -AC_REQUIRE([AC_CANONICAL_HOST]) - -AC_MSG_CHECKING([if the current OS is supported]) -#TIMER="ct_cclock.o" -TIMER="ct_cptimer.o" -case "${host}" in - i?86*linux* | ia64*linux* | *x86*64* | *86*cygwin ) - build_os="linux" - #TIMER="ct_etime.o" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - *86*apple* ) - build_os="apple" - #TIMER="ct_etime.o" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - powerpc64*linux* ) - build_os="linux" - #TIMER="ct_etime.o" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - powerpc-ibm* ) - build_os="aix" - save=$AR_FLAGS - AR_FLAGS="$save -X32_64" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - mips-sgi-irix*) - build_os="irix" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - alphaev*) - build_os="tru64" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - *) - AC_MSG_RESULT([no]) - AC_MSG_NOTICE(Platform <${host}> is not supported.) - AC_MSG_NOTICE(Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT) - AC_MSG_NOTICE(providing either a list of compilers and options or) - AC_MSG_NOTICE(a guest account on this machine.) - AC_MSG_ERROR(stopping) - ;; - *) -esac -AC_MSG_RESULT([yes]) - -AC_MSG_NOTICE([WIDESETUP: using build_os="$build_os"]) -AC_MSG_NOTICE([WIDESETUP: using F90SUFFIX="$F90SUFFIX"]) -AC_MSG_NOTICE([WIDESETUP: using AR="$AR"]) -AC_MSG_NOTICE([WIDESETUP: using AR_FLAGS="$AR_FLAGS"]) -AC_SUBST(F90SUFFIX) -AC_SUBST(TIMER) -AC_SUBST(AR) -AC_SUBST(AR_FLAGS) -]) - - -################################################ -# Get External C routines naming scheme -# ---------------------------------- -AC_DEFUN([ACX_EXTUS], -[ -c_success=no -msg="unknown" -AC_LANG_PUSH(C) -AC_COMPILE_IFELSE( -[AC_LANG_SOURCE(#define F90_FUNC(name,NAME) name ## _ - #define F90_FUNC_(name,NAME) name ## _ - void F90_FUNC_(ftest, FTEST)(){})],[ - mv conftest.$ac_objext ftest.$ac_objext - AC_LANG_PUSH(Fortran) - save="$LIBS" - LIBS="ftest.$ac_objext" - AC_LINK_IFELSE([AC_LANG_CALL([], [ftest])], - [c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US"]) - LIBS="$save" - AC_LANG_POP(Fortran) - rm -f ftest.$ac_objext],[]) -if test "$c_success" = "no" ; then - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE(#define F90_FUNC(name,NAME) name - #define F90_FUNC_(name,NAME) name - void F90_FUNC_(ftest, FTEST)(){})],[ - mv conftest.$ac_objext ftest.$ac_objext - AC_LANG_PUSH(Fortran) - save="$LIBS" - LIBS="ftest.$ac_objext" - AC_LINK_IFELSE([AC_LANG_CALL([], [ftest])], - [c_success="yes"; msg="test"]) - LIBS="$save" - AC_LANG_POP(Fortran) - rm -f ftest.$ac_objext],[]) -fi -AC_MSG_CHECKING([for external C routine (test) naming scheme]) -AC_MSG_RESULT([$msg]) - -AC_FC_WRAPPERS -f_success="no" -case $ac_cv_fc_mangling in - "lower case, underscore, no extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; - "lower case, underscore, extra underscore") - f_success="no" ;; - "lower case, no underscore, no extra underscore") - f_success="yes";; - "lower case, no underscore, extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; - "upper case, underscore, no extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; - "upper case, underscore, extra underscore") - f_success="no" ;; - "upper case, no underscore, no extra underscore") - f_success="yes";; - "upper case, no underscore, extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; -esac -AC_LANG_POP(C) -if test "$c_success" = "no" || test "$f_success" = "no" ; then - AC_MSG_ERROR(unknown Fortran <-> C subroutines name conventions) -fi - -]) diff --git a/lib/archive/Ydriver-src/config/config.guess b/lib/archive/Ydriver-src/config/config.guess deleted file mode 100755 index 45001cfecd..0000000000 --- a/lib/archive/Ydriver-src/config/config.guess +++ /dev/null @@ -1,1667 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2020 Free Software Foundation, Inc. - -timestamp='2020-01-01' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. -# -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess -# -# Please send patches to . - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright 1992-2020 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -tmp= -# shellcheck disable=SC2172 -trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 - -set_cc_for_build() { - # prevent multiple calls if $tmp is already set - test "$tmp" && return 0 - : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } - dummy=$tmp/dummy - case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in - ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do - if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" - break - fi - done - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; - esac -} - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if test -f /.attbin/uname ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -case "$UNAME_SYSTEM" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - set_cc_for_build - cat <<-EOF > "$dummy.c" - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi - ;; -esac - -# Note: order is significant - the case branches are not exclusive. - -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in - Debian*) - release='-gnu' - ;; - *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; - *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; - *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; - *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; - "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" - ;; - sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] - then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] - then - echo m88k-dg-dgux"$UNAME_RELEASE" - else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" - fi - else - echo i586-dg-dgux"$UNAME_RELEASE" - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` - else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" - fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "$HP_ARCH" = "" ]; then - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ "$HP_ARCH" = hppa2.0w ] - then - set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH=hppa2.0w - else - HP_ARCH=hppa64 - fi - fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" - exit ;; - 3050*:HI-UX:*:*) - set_cc_for_build - sed 's/^ //' << EOF > "$dummy.c" - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk - else - echo "$UNAME_MACHINE"-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; - *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; - arm:FreeBSD:*:*) - UNAME_PROCESSOR=`uname -p` - set_cc_for_build - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi - else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf - fi - exit ;; - *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in - amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; - esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; - *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; - *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; - *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; - i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; - *:Interix*:*) - case "$UNAME_MACHINE" in - x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; - IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; - esac ;; - i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" - exit ;; - *:GNU:*:*) - # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" - exit ;; - *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; - aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - aarch64_be:Linux:*:*) - UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arm*:Linux:*:*) - set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - else - if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_PCS_VFP - then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi - else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf - fi - fi - exit ;; - avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 - sed 's/^ //' << EOF > "$dummy.c" - #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= - #else - MIPS_ENDIAN= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } - ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; - or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; - ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; - sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; - x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; - xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; - i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; - i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" - else - echo "$UNAME_MACHINE"-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" - else - echo mips-unknown-sysv"$UNAME_RELEASE" - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build - fi - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE - fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; - *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" - exit ;; - i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; - x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; - *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; -esac - -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" < -#include -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include -#if defined(_SIZE_T_) || defined(SIGLOST) -#include -#endif -#endif -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/lib/archive/Ydriver-src/config/config.sub b/lib/archive/Ydriver-src/config/config.sub deleted file mode 100755 index f02d43ad50..0000000000 --- a/lib/archive/Ydriver-src/config/config.sub +++ /dev/null @@ -1,1793 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright 1992-2020 Free Software Foundation, Inc. - -timestamp='2020-01-01' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that -# program. This Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# Please send patches to . -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - -Canonicalize a configuration name. - -Options: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright 1992-2020 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo "$1" - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Split fields of configuration type -# shellcheck disable=SC2162 -IFS="-" read field1 field2 field3 field4 <&2 - exit 1 - ;; - *-*-*-*) - basic_machine=$field1-$field2 - os=$field3-$field4 - ;; - *-*-*) - # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two - # parts - maybe_os=$field2-$field3 - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ - | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ - | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ - | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) - basic_machine=$field1 - os=$maybe_os - ;; - android-linux) - basic_machine=$field1-unknown - os=linux-android - ;; - *) - basic_machine=$field1-$field2 - os=$field3 - ;; - esac - ;; - *-*) - # A lone config we happen to match not fitting any pattern - case $field1-$field2 in - decstation-3100) - basic_machine=mips-dec - os= - ;; - *-*) - # Second component is usually, but not always the OS - case $field2 in - # Prevent following clause from handling this valid os - sun*os*) - basic_machine=$field1 - os=$field2 - ;; - # Manufacturers - dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ - | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ - | unicom* | ibm* | next | hp | isi* | apollo | altos* \ - | convergent* | ncr* | news | 32* | 3600* | 3100* \ - | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ - | ultra | tti* | harris | dolphin | highlevel | gould \ - | cbm | ns | masscomp | apple | axis | knuth | cray \ - | microblaze* | sim | cisco \ - | oki | wec | wrs | winbond) - basic_machine=$field1-$field2 - os= - ;; - *) - basic_machine=$field1 - os=$field2 - ;; - esac - ;; - esac - ;; - *) - # Convert single-component short-hands not valid as part of - # multi-component configurations. - case $field1 in - 386bsd) - basic_machine=i386-pc - os=bsd - ;; - a29khif) - basic_machine=a29k-amd - os=udi - ;; - adobe68k) - basic_machine=m68010-adobe - os=scout - ;; - alliant) - basic_machine=fx80-alliant - os= - ;; - altos | altos3068) - basic_machine=m68k-altos - os= - ;; - am29k) - basic_machine=a29k-none - os=bsd - ;; - amdahl) - basic_machine=580-amdahl - os=sysv - ;; - amiga) - basic_machine=m68k-unknown - os= - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=bsd - ;; - aros) - basic_machine=i386-pc - os=aros - ;; - aux) - basic_machine=m68k-apple - os=aux - ;; - balance) - basic_machine=ns32k-sequent - os=dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=linux - ;; - cegcc) - basic_machine=arm-unknown - os=cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=bsd - ;; - convex-c2) - basic_machine=c2-convex - os=bsd - ;; - convex-c32) - basic_machine=c32-convex - os=bsd - ;; - convex-c34) - basic_machine=c34-convex - os=bsd - ;; - convex-c38) - basic_machine=c38-convex - os=bsd - ;; - cray) - basic_machine=j90-cray - os=unicos - ;; - crds | unos) - basic_machine=m68k-crds - os= - ;; - da30) - basic_machine=m68k-da30 - os= - ;; - decstation | pmax | pmin | dec3100 | decstatn) - basic_machine=mips-dec - os= - ;; - delta88) - basic_machine=m88k-motorola - os=sysv3 - ;; - dicos) - basic_machine=i686-pc - os=dicos - ;; - djgpp) - basic_machine=i586-pc - os=msdosdjgpp - ;; - ebmon29k) - basic_machine=a29k-amd - os=ebmon - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=ose - ;; - gmicro) - basic_machine=tron-gmicro - os=sysv - ;; - go32) - basic_machine=i386-pc - os=go32 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=hms - ;; - harris) - basic_machine=m88k-harris - os=sysv3 - ;; - hp300 | hp300hpux) - basic_machine=m68k-hp - os=hpux - ;; - hp300bsd) - basic_machine=m68k-hp - os=bsd - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=proelf - ;; - i386mach) - basic_machine=i386-mach - os=mach - ;; - isi68 | isi) - basic_machine=m68k-isi - os=sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=sysv - ;; - merlin) - basic_machine=ns32k-utek - os=sysv - ;; - mingw64) - basic_machine=x86_64-pc - os=mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=mingw32ce - ;; - monitor) - basic_machine=m68k-rom68k - os=coff - ;; - morphos) - basic_machine=powerpc-unknown - os=morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=moxiebox - ;; - msdos) - basic_machine=i386-pc - os=msdos - ;; - msys) - basic_machine=i686-pc - os=msys - ;; - mvs) - basic_machine=i370-ibm - os=mvs - ;; - nacl) - basic_machine=le32-unknown - os=nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=sysv4 - ;; - netbsd386) - basic_machine=i386-pc - os=netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=newsos - ;; - news1000) - basic_machine=m68030-sony - os=newsos - ;; - necv70) - basic_machine=v70-nec - os=sysv - ;; - nh3000) - basic_machine=m68k-harris - os=cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=cxux - ;; - nindy960) - basic_machine=i960-intel - os=nindy - ;; - mon960) - basic_machine=i960-intel - os=mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=nonstopux - ;; - os400) - basic_machine=powerpc-ibm - os=os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=ose - ;; - os68k) - basic_machine=m68k-none - os=os68k - ;; - paragon) - basic_machine=i860-intel - os=osf - ;; - parisc) - basic_machine=hppa-unknown - os=linux - ;; - pw32) - basic_machine=i586-unknown - os=pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=rdos - ;; - rdos32) - basic_machine=i386-pc - os=rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=coff - ;; - sa29200) - basic_machine=a29k-amd - os=udi - ;; - sei) - basic_machine=mips-sei - os=seiux - ;; - sequent) - basic_machine=i386-sequent - os= - ;; - sps7) - basic_machine=m68k-bull - os=sysv2 - ;; - st2000) - basic_machine=m68k-tandem - os= - ;; - stratus) - basic_machine=i860-stratus - os=sysv4 - ;; - sun2) - basic_machine=m68000-sun - os= - ;; - sun2os3) - basic_machine=m68000-sun - os=sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=sunos4 - ;; - sun3) - basic_machine=m68k-sun - os= - ;; - sun3os3) - basic_machine=m68k-sun - os=sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=sunos4 - ;; - sun4) - basic_machine=sparc-sun - os= - ;; - sun4os3) - basic_machine=sparc-sun - os=sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=solaris2 - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - os= - ;; - sv1) - basic_machine=sv1-cray - os=unicos - ;; - symmetry) - basic_machine=i386-sequent - os=dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=unicos - ;; - t90) - basic_machine=t90-cray - os=unicos - ;; - toad1) - basic_machine=pdp10-xkl - os=tops20 - ;; - tpf) - basic_machine=s390x-ibm - os=tpf - ;; - udi29k) - basic_machine=a29k-amd - os=udi - ;; - ultra3) - basic_machine=a29k-nyu - os=sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=none - ;; - vaxv) - basic_machine=vax-dec - os=sysv - ;; - vms) - basic_machine=vax-dec - os=vms - ;; - vsta) - basic_machine=i386-pc - os=vsta - ;; - vxworks960) - basic_machine=i960-wrs - os=vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=vxworks - ;; - xbox) - basic_machine=i686-pc - os=mingw32 - ;; - ymp) - basic_machine=ymp-cray - os=unicos - ;; - *) - basic_machine=$1 - os= - ;; - esac - ;; -esac - -# Decode 1-component or ad-hoc basic machines -case $basic_machine in - # Here we handle the default manufacturer of certain CPU types. It is in - # some cases the only manufacturer, in others, it is the most popular. - w89k) - cpu=hppa1.1 - vendor=winbond - ;; - op50n) - cpu=hppa1.1 - vendor=oki - ;; - op60c) - cpu=hppa1.1 - vendor=oki - ;; - ibm*) - cpu=i370 - vendor=ibm - ;; - orion105) - cpu=clipper - vendor=highlevel - ;; - mac | mpw | mac-mpw) - cpu=m68k - vendor=apple - ;; - pmac | pmac-mpw) - cpu=powerpc - vendor=apple - ;; - - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - cpu=m68000 - vendor=att - ;; - 3b*) - cpu=we32k - vendor=att - ;; - bluegene*) - cpu=powerpc - vendor=ibm - os=cnk - ;; - decsystem10* | dec10*) - cpu=pdp10 - vendor=dec - os=tops10 - ;; - decsystem20* | dec20*) - cpu=pdp10 - vendor=dec - os=tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - cpu=m68k - vendor=motorola - ;; - dpx2*) - cpu=m68k - vendor=bull - os=sysv3 - ;; - encore | umax | mmax) - cpu=ns32k - vendor=encore - ;; - elxsi) - cpu=elxsi - vendor=elxsi - os=${os:-bsd} - ;; - fx2800) - cpu=i860 - vendor=alliant - ;; - genix) - cpu=ns32k - vendor=ns - ;; - h3050r* | hiux*) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - cpu=m68000 - vendor=hp - ;; - hp9k3[2-9][0-9]) - cpu=m68k - vendor=hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - cpu=hppa1.1 - vendor=hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - cpu=hppa1.0 - vendor=hp - ;; - i*86v32) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv32 - ;; - i*86v4*) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv4 - ;; - i*86v) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=sysv - ;; - i*86sol2) - cpu=`echo "$1" | sed -e 's/86.*/86/'` - vendor=pc - os=solaris2 - ;; - j90 | j90-cray) - cpu=j90 - vendor=cray - os=${os:-unicos} - ;; - iris | iris4d) - cpu=mips - vendor=sgi - case $os in - irix*) - ;; - *) - os=irix4 - ;; - esac - ;; - miniframe) - cpu=m68000 - vendor=convergent - ;; - *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) - cpu=m68k - vendor=atari - os=mint - ;; - news-3600 | risc-news) - cpu=mips - vendor=sony - os=newsos - ;; - next | m*-next) - cpu=m68k - vendor=next - case $os in - openstep*) - ;; - nextstep*) - ;; - ns2*) - os=nextstep2 - ;; - *) - os=nextstep3 - ;; - esac - ;; - np1) - cpu=np1 - vendor=gould - ;; - op50n-* | op60c-*) - cpu=hppa1.1 - vendor=oki - os=proelf - ;; - pa-hitachi) - cpu=hppa1.1 - vendor=hitachi - os=hiuxwe2 - ;; - pbd) - cpu=sparc - vendor=tti - ;; - pbb) - cpu=m68k - vendor=tti - ;; - pc532) - cpu=ns32k - vendor=pc532 - ;; - pn) - cpu=pn - vendor=gould - ;; - power) - cpu=power - vendor=ibm - ;; - ps2) - cpu=i386 - vendor=ibm - ;; - rm[46]00) - cpu=mips - vendor=siemens - ;; - rtpc | rtpc-*) - cpu=romp - vendor=ibm - ;; - sde) - cpu=mipsisa32 - vendor=sde - os=${os:-elf} - ;; - simso-wrs) - cpu=sparclite - vendor=wrs - os=vxworks - ;; - tower | tower-32) - cpu=m68k - vendor=ncr - ;; - vpp*|vx|vx-*) - cpu=f301 - vendor=fujitsu - ;; - w65) - cpu=w65 - vendor=wdc - ;; - w89k-*) - cpu=hppa1.1 - vendor=winbond - os=proelf - ;; - none) - cpu=none - vendor=none - ;; - leon|leon[3-9]) - cpu=sparc - vendor=$basic_machine - ;; - leon-*|leon[3-9]-*) - cpu=sparc - vendor=`echo "$basic_machine" | sed 's/-.*//'` - ;; - - *-*) - # shellcheck disable=SC2162 - IFS="-" read cpu vendor <&2 - exit 1 - ;; - esac - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $vendor in - digital*) - vendor=dec - ;; - commodore*) - vendor=cbm - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x$os != x ] -then -case $os in - # First match some system type aliases that might get confused - # with valid system types. - # solaris* is a basic system type, with this one exception. - auroraux) - os=auroraux - ;; - bluegene*) - os=cnk - ;; - solaris1 | solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - solaris) - os=solaris2 - ;; - unixware*) - os=sysv4.2uw - ;; - gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # es1800 is here to avoid being matched by es* (a different OS) - es1800*) - os=ose - ;; - # Some version numbers need modification - chorusos*) - os=chorusos - ;; - isc) - os=isc2.2 - ;; - sco6) - os=sco5v6 - ;; - sco5) - os=sco3.2v5 - ;; - sco4) - os=sco3.2v4 - ;; - sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - ;; - sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - ;; - scout) - # Don't match below - ;; - sco*) - os=sco3.2v2 - ;; - psos*) - os=psos - ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. - # sysv* is not here because it comes later, after sysvr4. - gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ - | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ - | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ - | sym* | kopensolaris* | plan9* \ - | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ - | aos* | aros* | cloudabi* | sortix* | twizzler* \ - | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ - | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ - | knetbsd* | mirbsd* | netbsd* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ - | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ - | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ - | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ - | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ - | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ - | linux-newlib* | linux-musl* | linux-uclibc* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ - | openstep* | oskit* | conix* | pw32* | nonstopux* \ - | storm-chaos* | tops10* | tenex* | tops20* | its* \ - | os2* | vos* | palmos* | uclinux* | nucleus* \ - | morphos* | superux* | rtmk* | windiss* \ - | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ - | skyos* | haiku* | rdos* | toppers* | drops* | es* \ - | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - qnx*) - case $cpu in - x86 | i*86) - ;; - *) - os=nto-$os - ;; - esac - ;; - hiux*) - os=hiuxwe2 - ;; - nto-qnx*) - ;; - nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - sim | xray | os68k* | v88r* \ - | windows* | osx | abug | netware* | os9* \ - | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) - ;; - linux-dietlibc) - os=linux-dietlibc - ;; - linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - lynx*178) - os=lynxos178 - ;; - lynx*5) - os=lynxos5 - ;; - lynx*) - os=lynxos - ;; - mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` - ;; - opened*) - os=openedition - ;; - os400*) - os=os400 - ;; - sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` - ;; - sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` - ;; - wince*) - os=wince - ;; - utek*) - os=bsd - ;; - dynix*) - os=bsd - ;; - acis*) - os=aos - ;; - atheos*) - os=atheos - ;; - syllable*) - os=syllable - ;; - 386bsd) - os=bsd - ;; - ctix* | uts*) - os=sysv - ;; - nova*) - os=rtmk-nova - ;; - ns2) - os=nextstep2 - ;; - # Preserve the version number of sinix5. - sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - sinix*) - os=sysv4 - ;; - tpf*) - os=tpf - ;; - triton*) - os=sysv3 - ;; - oss*) - os=sysv3 - ;; - svr4*) - os=sysv4 - ;; - svr3) - os=sysv3 - ;; - sysvr4) - os=sysv4 - ;; - # This must come after sysvr4. - sysv*) - ;; - ose*) - os=ose - ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) - os=mint - ;; - zvmoe) - os=zvmoe - ;; - dicos*) - os=dicos - ;; - pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $cpu in - arm*) - os=eabi - ;; - *) - os=elf - ;; - esac - ;; - nacl*) - ;; - ios) - ;; - none) - ;; - *-eabi) - ;; - *) - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $cpu-$vendor in - score-*) - os=elf - ;; - spu-*) - os=elf - ;; - *-acorn) - os=riscix1.2 - ;; - arm*-rebel) - os=linux - ;; - arm*-semi) - os=aout - ;; - c4x-* | tic4x-*) - os=coff - ;; - c8051-*) - os=elf - ;; - clipper-intergraph) - os=clix - ;; - hexagon-*) - os=elf - ;; - tic54x-*) - os=coff - ;; - tic55x-*) - os=coff - ;; - tic6x-*) - os=coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=tops20 - ;; - pdp11-*) - os=none - ;; - *-dec | vax-*) - os=ultrix4.2 - ;; - m68*-apollo) - os=domain - ;; - i386-sun) - os=sunos4.0.2 - ;; - m68000-sun) - os=sunos3 - ;; - m68*-cisco) - os=aout - ;; - mep-*) - os=elf - ;; - mips*-cisco) - os=elf - ;; - mips*-*) - os=elf - ;; - or32-*) - os=coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=sysv3 - ;; - sparc-* | *-sun) - os=sunos4.1.1 - ;; - pru-*) - os=elf - ;; - *-be) - os=beos - ;; - *-ibm) - os=aix - ;; - *-knuth) - os=mmixware - ;; - *-wec) - os=proelf - ;; - *-winbond) - os=proelf - ;; - *-oki) - os=proelf - ;; - *-hp) - os=hpux - ;; - *-hitachi) - os=hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=sysv - ;; - *-cbm) - os=amigaos - ;; - *-dg) - os=dgux - ;; - *-dolphin) - os=sysv3 - ;; - m68k-ccur) - os=rtu - ;; - m88k-omron*) - os=luna - ;; - *-next) - os=nextstep - ;; - *-sequent) - os=ptx - ;; - *-crds) - os=unos - ;; - *-ns) - os=genix - ;; - i370-*) - os=mvs - ;; - *-gould) - os=sysv - ;; - *-highlevel) - os=bsd - ;; - *-encore) - os=bsd - ;; - *-sgi) - os=irix - ;; - *-siemens) - os=sysv4 - ;; - *-masscomp) - os=rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=uxpv - ;; - *-rom68k) - os=coff - ;; - *-*bug) - os=coff - ;; - *-apple) - os=macos - ;; - *-atari*) - os=mint - ;; - *-wrs) - os=vxworks - ;; - *) - os=none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -case $vendor in - unknown) - case $os in - riscix*) - vendor=acorn - ;; - sunos*) - vendor=sun - ;; - cnk*|-aix*) - vendor=ibm - ;; - beos*) - vendor=be - ;; - hpux*) - vendor=hp - ;; - mpeix*) - vendor=hp - ;; - hiux*) - vendor=hitachi - ;; - unos*) - vendor=crds - ;; - dgux*) - vendor=dg - ;; - luna*) - vendor=omron - ;; - genix*) - vendor=ns - ;; - clix*) - vendor=intergraph - ;; - mvs* | opened*) - vendor=ibm - ;; - os400*) - vendor=ibm - ;; - ptx*) - vendor=sequent - ;; - tpf*) - vendor=ibm - ;; - vxsim* | vxworks* | windiss*) - vendor=wrs - ;; - aux*) - vendor=apple - ;; - hms*) - vendor=hitachi - ;; - mpw* | macos*) - vendor=apple - ;; - *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) - vendor=atari - ;; - vos*) - vendor=stratus - ;; - esac - ;; -esac - -echo "$cpu-$vendor-$os" -exit - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/lib/archive/Ydriver-src/config/configure.ac b/lib/archive/Ydriver-src/config/configure.ac deleted file mode 100644 index 731a19fa7c..0000000000 --- a/lib/archive/Ydriver-src/config/configure.ac +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# -AC_INIT(Yambo Driver Library, yambo@yambo-code.org) -# -m4_include([config/version.m4]) -# -AC_MSG_CHECKING(version) -AC_MSG_RESULT($YDRI_VERSION.$YDRI_SUBVERSION.$YDRI_PATCHLEVEL) -# -AC_CONFIG_AUX_DIR(config) -# -# General -# -m4_include([config/acx_misc.m4]) -m4_include([config/acx_fpp.m4]) -m4_include([config/acx_fortran_flags.m4]) -# ============================================================================ -# CC -AC_PROG_CC -# ============================================================================ -# AR -AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS="-ru" -AC_SUBST(AR_FLAGS) -# ============================================================================ -# Fortran 90 -acx_save_fcflags="$FCFLAGS" -AC_PROG_FC([],[90]) -if test "$FC" = "" ; then - AC_MSG_ERROR([could not find Fortran 90 compiler]) -fi -AC_LANG_PUSH(Fortran) -# -# F90 extension -# -F90SUFFIX=.f90 -AC_ARG_WITH(f90ext, AC_HELP_STRING([--with-f90ext=],[Use . Fortran 90 extension],[32])) -if ! test -z "$with_f90ext"; then F90SUFFIX=".$with_f90ext"; fi -case $F90SUFFIX in - .f90) - AC_FC_SRCEXT(f90,[F90SUFFIX=".f90"; F90EXTFLAGS="$FCFLAGS_f90"],[]) - ;; - .f) - AC_FC_SRCEXT(f,[F90SUFFIX=".f"; F90EXTFLAGS="$FCFLAGS_f"],[]) - ;; -esac -AC_SUBST(F90SUFFIX) -FCFLAGS="${acx_save_fcflags}" -acx_save_fcflags="$FCFLAGS" -# -# Fortran FLAGS -# -ACX_FCSETUP() -OPENMPLIBS="" -CUDA_FLAGS="" -AC_SUBST(OPENMPLIBS) -AC_SUBST(CUDA_FLAGS) -# ============================================================================ -# Underscore options in subroutine naming -ACX_EXTUS -# ============================================================================ -# FPP check -ACX_FPP -# ============================================================================ -# Output -AC_LANG_PUSH(Fortran) -AC_CONFIG_FILES([config/defs.mk example/include/version.h]) -AC_OUTPUT diff --git a/lib/archive/Ydriver-src/config/defs.mk.in b/lib/archive/Ydriver-src/config/defs.mk.in deleted file mode 100644 index f2fb392032..0000000000 --- a/lib/archive/Ydriver-src/config/defs.mk.in +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (C) 2000-2022 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# -ar = @AR@ -arflags = @AR_FLAGS@ -cc = @CC@ -cflags = @CFLAGS@ -fpp = @FPP@ -fc = @FC@ -fcflags = @FCFLAGS@ @FCMFLAG@ @OPENMPLIBS@ @CUDA_FLAGS@ -f90suffix = @F90SUFFIX@ diff --git a/lib/archive/Ydriver-src/config/install.sh b/lib/archive/Ydriver-src/config/install.sh deleted file mode 100755 index 50d48845c0..0000000000 --- a/lib/archive/Ydriver-src/config/install.sh +++ /dev/null @@ -1 +0,0 @@ -#! /bin/sh diff --git a/lib/archive/Ydriver-src/config/version.m4 b/lib/archive/Ydriver-src/config/version.m4 deleted file mode 100644 index f6f7a750b6..0000000000 --- a/lib/archive/Ydriver-src/config/version.m4 +++ /dev/null @@ -1,6 +0,0 @@ -YDRI_VERSION="1" -YDRI_SUBVERSION="1" -YDRI_PATCHLEVEL="0" -AC_SUBST(YDRI_VERSION) -AC_SUBST(YDRI_SUBVERSION) -AC_SUBST(YDRI_PATCHLEVEL) diff --git a/lib/archive/Ydriver-src/configure b/lib/archive/Ydriver-src/configure deleted file mode 100755 index bdd39c1053..0000000000 --- a/lib/archive/Ydriver-src/configure +++ /dev/null @@ -1,5825 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo Driver Library yambo@yambo-code.org. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='Yambo Driver Library' -PACKAGE_TARNAME='yambo-driver-library' -PACKAGE_VERSION='yambo@yambo-code.org' -PACKAGE_STRING='Yambo Driver Library yambo@yambo-code.org' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_subst_vars='LTLIBOBJS -LIBOBJS -FPP -FCLIBS -CUDA_FLAGS -OPENMPLIBS -def_compiler -DEBUG_FLAGS -NETCDFFLAGS -OMPFLAGS -FCMFLAG -FUFLAGS -FCUFLAGS -UFLAGS -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -F90SUFFIX -FCFLAGS_f -FCFLAGS_f90 -ac_ct_FC -FCFLAGS -FC -AR_FLAGS -AR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -YDRI_PATCHLEVEL -YDRI_SUBVERSION -YDRI_VERSION -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -runstatedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_f90ext -enable_debug_flags -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -FC -FCFLAGS -UFLAGS -FPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures Yambo Driver Library yambo@yambo-code.org to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root - [DATAROOTDIR/doc/yambo-driver-library] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Yambo Driver Library yambo@yambo-code.org:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-debug-flags Debug flags are set for compilation. Default is no. - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-f90ext= Use . Fortran 90 extension - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - FC Fortran compiler command - FCFLAGS Fortran compiler flags - UFLAGS Unoptimized Fortran flags - FPP Fortran preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -Yambo Driver Library configure yambo@yambo-code.org -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_compile - -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by Yambo Driver Library $as_me yambo@yambo-code.org, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# -YDRI_VERSION="0" -YDRI_SUBVERSION="1" -YDRI_PATCHLEVEL="0" - - - - -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version" >&5 -$as_echo_n "checking version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $YDRI_VERSION.$YDRI_SUBVERSION.$YDRI_PATCHLEVEL" >&5 -$as_echo "$YDRI_VERSION.$YDRI_SUBVERSION.$YDRI_PATCHLEVEL" >&6; } -# -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# -# General -# -# -# Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch -# -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# -################################################ -# Check size of a pointer -# ---------------------------------- - -################################################ -# AC_LANG_FUNC_LINK_TRY(Fortran)(FUNCTION) -# ---------------------------------- - - -################################################ -# Set various default FLAGS -# ---------------------------------- - - - -################################################ -# Get External C routines naming scheme -# ---------------------------------- - - -# -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# - - -# -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.org -# -# Authors (see AUTHORS file for details): AM -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# # -################################################ -# Set FC FLAGS -# ---------------------------------- - -# - -# ============================================================================ -# CC -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# ============================================================================ -# AR -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS="-ru" - -# ============================================================================ -# Fortran 90 -acx_save_fcflags="$FCFLAGS" -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$FC"; then - ac_cv_prog_FC="$FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FC=$ac_cv_prog_FC -if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$FC" && break - done -fi -if test -z "$FC"; then - ac_ct_FC=$FC - for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FC"; then - ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FC=$ac_cv_prog_ac_ct_FC -if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_FC" && break -done - - if test "x$ac_ct_FC" = x; then - FC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FC=$ac_ct_FC - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_fc_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - FCFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_g=yes -else - ac_cv_prog_fc_g=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then - FCFLAGS=$ac_save_FCFLAGS -elif test $ac_cv_prog_fc_g = yes; then - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-g -O2" - else - FCFLAGS="-g" - fi -else - if test "x$ac_cv_fc_compiler_gnu" = xyes; then - FCFLAGS="-O2" - else - FCFLAGS= - fi -fi - -if test $ac_compiler_gnu = yes; then - GFC=yes -else - GFC= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test "$FC" = "" ; then - as_fn_error $? "could not find Fortran 90 compiler" "$LINENO" 5 -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -# -# F90 extension -# -F90SUFFIX=.f90 - -# Check whether --with-f90ext was given. -if test "${with_f90ext+set}" = set; then : - withval=$with_f90ext; -fi - -if ! test -z "$with_f90ext"; then F90SUFFIX=".$with_f90ext"; fi -case $F90SUFFIX in - .f90) - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f90=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 - fi - - F90SUFFIX=".f90"; F90EXTFLAGS="$FCFLAGS_f90" -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - ;; - .f) - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } -if ${ac_cv_fc_srcext_f+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=f -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_fc_srcext_f=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -$as_echo "$ac_cv_fc_srcext_f" >&6; } -if test "x$ac_cv_fc_srcext_f" = xunknown; then - as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 -else - ac_fc_srcext=f - if test "x$ac_cv_fc_srcext_f" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f - FCFLAGS_f=$ac_cv_fc_srcext_f - fi - - F90SUFFIX=".f"; F90EXTFLAGS="$FCFLAGS_f" -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - ;; -esac - -FCFLAGS="${acx_save_fcflags}" -acx_save_fcflags="$FCFLAGS" -# -# Fortran FLAGS -# -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - - - -# -if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi -# -# Check whether --enable-debug-flags was given. -if test "${enable_debug_flags+set}" = set; then : - enableval=$enable_debug_flags; -fi - -if test x"$enable_debug_flags" = "x"; then enable_debug_flags="no"; fi -# -def_compiler= -# -case "${host}" in -i?86*linux*) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - #FUFLAGS="-O0 -g -Mbackslash" - FUFLAGS="-O0 -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - NETCDFFLAGS="-DpgiFortran" - def_compiler="-D_PGI" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *abf90*) - SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" - ;; - *ifc*) - SYSFLAGS="-O3 -g -w -tpp7" - FUFLAGS="-O0 -w -tpp7" - FCMFLAG="" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="" - ;; - *g95*) - SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore -mtune=pentium4" - FUFLAGS="-g -O0 -fbackslash -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *ifort*) - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - CPU_FLAG="" - case "${INTELVERSION}" in - *11* | *12* | *13* |*14* | *15* | *16* ) - CPU_FLAG="-xHost" - #CPU_FLAG=" " - ;; - *17* | *18* | *19*) - CPU_FLAG=" " - OMPFLAGS="-qopenmp" - ;; - *10*) - CPU_FLAG="-xW" - ;; - *) - CPU_FLAG=" " - ;; - esac - SYSFLAGS="-assume bscc -O3 -g -ip $CPU_FLAG" - FUFLAGS="-assume bscc -O0 $CPU_FLAG" - FCMFLAG="-nofor_main" - DEBUG_FLAGS="-check all -CB -traceback -check bound" - ;; - *pathf9*) - SYSFLAGS="-O2 -g -fno-second-underscore" - FUFLAGS="-O0 -g -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-ffortran-bounds-check -C" - ;; - *) - SYSFLAGS="-O -g" - FUFLAGS="-O0 -g" - OMPFLAGS="-openmp" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -*86*apple* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -g -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *g95*) - SYSFLAGS="-O3 -g -fno-second-underscore -mtune=pentium4" - FUFLAGS="-O0 -g -fno-second-underscore" - FCMFLAG="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *ifort*) - CPU_FLAG="" - case "${INTELVERSION}" in - *1*) - CPU_FLAG="-mtune=pentium4" - ;; - *) - CPU_FLAG="-mtune=pentium4" - ;; - esac - SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" - FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" - FCMFLAG="-nofor_main" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-check all -CB -traceback -check bound" - ;; - *) - SYSFLAGS="-O -g" - FUFLAGS="-O -g0" - OMPFLAGS="-openmp" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -ia64*linux* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - NETCDFFLAGS="-DpgiFortran" - def_compiler="-D_PGI" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -g -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *g95*) - SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" - FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" - FCMFLAG="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *abf90*) - SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" - ;; - *ifc*) - SYSFLAGS="-O3 -g -w" - FUFLAGS="-O0 -g -w" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="" - ;; - *ifort*) - CPU_FLAG="" - case "${INTELVERSION}" in - *1*) - CPU_FLAG="-mtune=itanium" - ;; - *) - CPU_FLAG="" - ;; - esac - SYSFLAGS="-assume bscc -O2 -g -ip ${CPU_FLAG}" - FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" - FCMFLAG="-nofor_main" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-check all -CB -traceback -check bound" - ;; - *openf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - ;; - *pathf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-ffortran-bounds-check -C" - ;; - *) - SYSFLAGS="-g -O" - FUFLAGS="-O0" - OMPFLAGS="-openmp" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -*x86*64* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - def_compiler="-D_PGI" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" - FUFLAGS="-O0 -g -mtune=native" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *g95*) - SYSFLAGS="-O3 -g -fbackslash -fno-second-underscore" - FUFLAGS="-O0 -g -fbackslash -fno-second-underscore" - FCMFLAG="" - DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" - ;; - *abf90*) - SYSFLAGS="-B101 -YEXT_NAMES=LCS -YEXT_SFX=_" - ;; - *ifc*) - SYSFLAGS="-O3 -g -w -tpp2" - FUFLAGS="-O0 -g -w -tpp2" - OMPFLAGS="-openmp" - NETCDFFLAGS="-DpgiFortran" - ;; - *ifort*) - OMPFLAGS="-openmp" - CPU_FLAG="" - case "${INTELVERSION}" in - *11* | *12* | *13* |*14* |*15* | *16* ) - #CPU_FLAG="-xHost" - CPU_FLAG=" " - ;; - *17* | *18* | *19*) - CPU_FLAG=" " - OMPFLAGS="-qopenmp" - ;; - *10*) - CPU_FLAG="-xW" - ;; - *) - CPU_FLAG=" " - ;; - esac - SYSFLAGS="-assume bscc -O3 -g -ip ${CPU_FLAG}" - FUFLAGS="-assume bscc -O0 -g ${CPU_FLAG}" - FCMFLAG="-nofor_main" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-CB -traceback" - ;; - *openf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - ;; - *pathf9*) - SYSFLAGS="-O2 -fno-second-underscore" - FUFLAGS="-O0 -fno-second-underscore" - FCMFLAG="" - OMPFLAGS="" - DEBUG_FLAGS="-ffortran-bounds-check -C" - ;; - *) - SYSFLAGS="-g -O" - FUFLAGS="-O0" - NETCDFFLAGS="-Df2cFortran" - esac - ;; -alphaev*) - SYSFLAGS="-O3 -arch host -tune host" - FUFLAGS="-O0" - FCMFLAG="-nofor_main" - ;; -powerpc64*linux* ) - case "${FC}" in - *pgf9* | *ftn* | *pgfortran* ) - SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" - FUFLAGS="-O0 -g -Mbackslash" - FCMFLAG="-Mnomain" - OMPFLAGS="-mp" - def_compiler="-D_PGI" - NETCDFFLAGS="-DpgiFortran" - DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" - ;; - *) - CFLAGS="-q64 -O2 -g" - SYSFLAGS="-q64 -O2 -g -qnoescape -qnostrict -qarch=ppc970 -qtune=ppc970" - FUFLAGS="-q64 -O0 -g" - OMPFLAGS="" - def_compiler="-D_XLF" - esac - ;; -powerpc-ibm* ) - CFLAGS="-O -q64" - SYSFLAGS="-O3 -g -q64 -qstrict -qarch=auto -qtune=auto -qmaxmem=-1" - FUFLAGS="-q64" - OMPFLAGS="-qthreaded" - def_compiler="-D_XLF" - ;; -mips-sgi-irix*) - SYSFLAGS="-O3 -r10000 -mips4" - ;; -*) - SYSFLAGS="-O" -esac -# -if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -$as_echo_n "checking for specific $FC flags... " >&6; } -if test -z "${FCFLAGS}"; then - FCFLAGS="$SYSFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -$as_echo "$FCFLAGS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -$as_echo "(User-defined) $FCFLAGS" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -$as_echo_n "checking for specific Open-MP flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -$as_echo "$OMPFLAGS" >&6; } -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -$as_echo_n "checking for specific $CC flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -$as_echo "$CFLAGS" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -$as_echo_n "checking for specific unoptimized flags... " >&6; } -if test -z "${UFLAGS}"; then - FCUFLAGS="$FUFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -$as_echo "$FCUFLAGS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -$as_echo "(User-defined) $UFLAGS" >&6; } - FCUFLAGS="$UFLAGS" - FUFLAGS="$UFLAGS" -fi -# -if test x"$enable_debug_flags" = "xyes"; then - FCFLAGS="$DEBUG_FLAGS" - FCUFLAGS="$DEBUG_FLAGS" -fi -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -$as_echo_n "checking for specific NETCDF flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -$as_echo "$NETCDFFLAGS" >&6; } -# - - - - - - - - - - -OPENMPLIBS="" -CUDA_FLAGS="" - - -# ============================================================================ -# Underscore options in subroutine naming - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - ac_cv_prog_fc_v= -# Try some options frequently used verbose output -for ac_verb in -v -verbose --verbose -V -\#\#\#; do - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_verb" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS - -rm -rf conftest* - -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" - -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; - - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; - - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac - - - # look for -l* and *.a constructs in the output - for ac_arg in $ac_fc_v_output; do - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) - ac_cv_prog_fc_v=$ac_verb - break 2 ;; - esac - done -done -if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} -fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$FCLIBS" != "x"; then - ac_cv_fc_libs="$FCLIBS" # Let the user override the test. -else - -cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF - -# Compile and link our simple test program by passing a flag (argument -# 1 to this macro) to the Fortran compiler in order to get -# "verbose" output that we can then parse for the Fortran linker -# flags. -ac_save_FCFLAGS=$FCFLAGS -FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" -eval "set x $ac_link" -shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 -# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, -# LIBRARY_PATH; skip all such settings. -ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | - sed '/^Driving:/d; /^Configured with:/d; - '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 -FCFLAGS=$ac_save_FCFLAGS - -rm -rf conftest* - -# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where -# /foo, /bar, and /baz are search directories for the Fortran linker. -# Here, we change these into -L/foo -L/bar -L/baz (and put it first): -ac_fc_v_output="`echo $ac_fc_v_output | - grep 'LPATH is:' | - sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output" - -# FIXME: we keep getting bitten by quoted arguments; a more general fix -# that detects unbalanced quotes in FLIBS should be implemented -# and (ugh) tested at some point. -case $ac_fc_v_output in - # With xlf replace commas with spaces, - # and remove "-link" and closing parenthesis. - *xlfentry*) - ac_fc_v_output=`echo $ac_fc_v_output | - sed ' - s/,/ /g - s/ -link / /g - s/) *$// - ' - ` ;; - - # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted - # $LIBS confuse us, and the libraries appear later in the output anyway). - *mGLOB_options_string*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; - - # Portland Group compiler has singly- or doubly-quoted -cmdline argument - # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. - # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". - *-cmdline\ * | *-ignore\ * | *-def\ *) - ac_fc_v_output=`echo $ac_fc_v_output | sed "\ - s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g - s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g - s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; - - # If we are using fort77 (the f2c wrapper) then filter output and delete quotes. - *fort77*f2c*gcc*) - ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n ' - /:[ ]\+Running[ ]\{1,\}"gcc"/{ - /"-c"/d - /[.]c"*/d - s/^.*"gcc"/"gcc"/ - s/"//gp - }'` ;; - - # If we are using Cray Fortran then delete quotes. - *cft90*) - ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;; -esac - - - -ac_cv_fc_libs= - -# Save positional arguments (if any) -ac_save_positional="$@" - -set X $ac_fc_v_output -while test $# != 1; do - shift - ac_arg=$1 - case $ac_arg in - [\\/]*.a | ?:[\\/]*.a) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi - ;; - -bI:*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_arg; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi -fi - ;; - # Ignore these flags. - -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:* | -link) - ;; - -lkernel32) - case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - esac - ;; - -[LRuYz]) - # These flags, when seen by themselves, take an argument. - # We remove the space between option and argument and re-iterate - # unless we find an empty arg or a new option (starting with -) - case $2 in - "" | -*);; - *) - ac_arg="$ac_arg$2" - shift; shift - set X $ac_arg "$@" - ;; - esac - ;; - -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_j" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - ac_arg="$ac_arg $ac_j" - ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" -fi - done - ;; - -[lLR]*) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue; then : - -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi - ;; - -zallextract*| -zdefaultextract) - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" - ;; - # Ignore everything else. - esac -done -# restore positional arguments -set X $ac_save_positional; shift - -# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, -# then we insist that the "run path" must be an absolute path (i.e. it -# must begin with a "/"). -case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | - sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` - test "x$ac_ld_run_path" != x && - if test "$ac_compiler_gnu" = yes; then - for ac_link_opt in $ac_ld_run_path; do - ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" - done -else - ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path" -fi - ;; -esac -fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } -FCLIBS="$ac_cv_fc_libs" - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_fc_dm_save_LIBS=$LIBS - LIBS="$LIBS $FCLIBS" - ac_fortran_dm_var=FC_DUMMY_MAIN - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # First, try linking without a dummy main: - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=none -else - ac_cv_fortran_dummy_main=unknown -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - if test $ac_cv_fortran_dummy_main = unknown; then - for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define $ac_fortran_dm_var $ac_func -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_fortran_dummy_main=$ac_func; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - fi - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main - rm -rf conftest* - LIBS=$ac_fc_dm_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } -FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : - if test $FC_DUMMY_MAIN != none; then - -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF - - if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then - -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h - - fi -fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - subroutine foobar() - return - end - subroutine foo_bar() - return - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - mv conftest.$ac_objext cfortran_test.$ac_objext - - ac_save_LIBS=$LIBS - LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success=no - for ac_foobar in foobar FOOBAR; do - for ac_underscore in "" "_"; do - ac_func="$ac_foobar$ac_underscore" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success=yes; break 2 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - if test "$ac_success" = "yes"; then - case $ac_foobar in - foobar) - ac_case=lower - ac_foo_bar=foo_bar - ;; - FOOBAR) - ac_case=upper - ac_foo_bar=FOO_BAR - ;; - esac - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_success_extra=no - for ac_extra in "" "_"; do - ac_func="$ac_foo_bar$ac_underscore$ac_extra" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_success_extra=yes; break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - if test "$ac_success_extra" = "yes"; then - ac_cv_fc_mangling="$ac_case case" - if test -z "$ac_underscore"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" - fi - if test -z "$ac_extra"; then - ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" - else - ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" - fi - else - ac_cv_fc_mangling="unknown" - fi - else - ac_cv_fc_mangling="unknown" - fi - - LIBS=$ac_save_LIBS - rm -rf conftest* - rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -c_success=no -msg="unknown" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define F90_FUNC(name,NAME) name ## _ - #define F90_FUNC_(name,NAME) name ## _ - void F90_FUNC_(ftest, FTEST)(){} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - mv conftest.$ac_objext ftest.$ac_objext - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - save="$LIBS" - LIBS="ftest.$ac_objext" - cat > conftest.$ac_ext <<_ACEOF - program main - call ftest - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - rm -f ftest.$ac_objext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test "$c_success" = "no" ; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define F90_FUNC(name,NAME) name - #define F90_FUNC_(name,NAME) name - void F90_FUNC_(ftest, FTEST)(){} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - mv conftest.$ac_objext ftest.$ac_objext - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - save="$LIBS" - LIBS="ftest.$ac_objext" - cat > conftest.$ac_ext <<_ACEOF - program main - call ftest - end -_ACEOF -if ac_fn_fc_try_link "$LINENO"; then : - c_success="yes"; msg="test" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - rm -f ftest.$ac_objext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -$as_echo "$msg" >&6; } - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -case $ac_cv_fc_mangling in - "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h - ;; - "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h - ;; - "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h - ;; - "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h - ;; - "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h - ;; - "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} - ;; -esac - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -f_success="no" -case $ac_cv_fc_mangling in - "lower case, underscore, no extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; - "lower case, underscore, extra underscore") - f_success="no" ;; - "lower case, no underscore, no extra underscore") - f_success="yes";; - "lower case, no underscore, extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; - "upper case, underscore, no extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; - "upper case, underscore, extra underscore") - f_success="no" ;; - "upper case, no underscore, no extra underscore") - f_success="yes";; - "upper case, no underscore, extra underscore") - f_success="yes" - save="$CFLAGS" - CFLAGS="$save -D_FORTRAN_US" ;; -esac -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -if test "$c_success" = "no" || test "$f_success" = "no" ; then - as_fn_error $? "unknown Fortran <-> C subroutines name conventions" "$LINENO" 5 -fi - - -# ============================================================================ -# FPP check - -# - -# -case "${FC}" in - # - # does not work properly - # - *ifort*) - if test -z "$FPP"; then FPP="fpp -free -P"; fi - ;; - *gfortran | *g95) - if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi - ;; - # - # some of the following could be uncommented once explicitly checked - # - #*sunf95) - # if test -z "$FPP"; then FPP="${FC} -E -P -fpp"; fi - # ;; - #*openf95) - # if test -z "$FPP"; then FPP="${FC} -E -P -ftpp"; fi - # ;; - #*pathf*) - # if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi - # ;; -esac -# -if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi -# -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} -# -# TESTS -#======= -# -# Fortran Source -# -acx_FC_ok=yes -FPP_TESTS_PASSED=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -$as_echo_n "checking if FC precompiler works on FC source... " >&6; } -cat > conftest.F << EOF_ - program conftest - character (1) :: a - a="a" - write (*,'('//a//')') 'hello' - end program -EOF_ -# ! Replace "S" with "\" and find the max length of -(eval $FPP conftest.F > conftest.${FCSUFFIX}) 2> conftest.er1 -if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" || - test -n "`grep "warning" conftest.er1`" || - test -n "`grep "command line remark" conftest.er1`" ; then - eval $FPP conftest.F > conftest.${FCSUFFIX} - eval $FC $FCFLAGS -c conftest.${FCSUFFIX} 2> conftest.er2 >&5 - if test -s conftest.er2 ; then - if ! ( test -n "`grep successful conftest.er2`" || - test -n "`grep "warning" conftest.er2`" || - test -n "`grep "command line remark" conftest.er2`" ) ; then - acx_FC_ok=no ; - FPP_TESTS_PASSED=no; - fi - fi -else - acx_FC_ok=no ; - FPP_TESTS_PASSED=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -$as_echo "$acx_FC_ok" >&6; } -# -if test "x$FPP_TESTS_PASSED" = xno ; then - as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; -fi -# - -# - -# ============================================================================ -# Output -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -ac_config_files="$ac_config_files config/defs.mk example/include/version.h" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by Yambo Driver Library $as_me yambo@yambo-code.org, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -Yambo Driver Library config.status yambo@yambo-code.org -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config/defs.mk") CONFIG_FILES="$CONFIG_FILES config/defs.mk" ;; - "example/include/version.h") CONFIG_FILES="$CONFIG_FILES example/include/version.h" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/lib/archive/Ydriver-src/example/include/example_driver.h b/lib/archive/Ydriver-src/example/include/example_driver.h deleted file mode 100644 index a542a51db9..0000000000 --- a/lib/archive/Ydriver-src/example/include/example_driver.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ -void options_example(struct options_struct options[],int *i_opt); diff --git a/lib/archive/Ydriver-src/example/include/fortran_driver.h b/lib/archive/Ydriver-src/example/include/fortran_driver.h deleted file mode 100644 index c1a1ee5c6f..0000000000 --- a/lib/archive/Ydriver-src/example/include/fortran_driver.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): DS - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ -/* - Tool drivers -*/ -/* MAIN -*/ -#if defined _example_driver - #if defined _FORTRAN_US - int main_ - #else - int main - #endif -#endif - (int *, int *,int *,int *,int *,int *,int *,int *, - char *string, char *in_file, char *in_dir, char *out_dir, char *com_dir, char *job, - int string_N, int in_file_N, int in_dir_N, int out_dir_N, int com_dir_N, int job_N); diff --git a/lib/archive/Ydriver-src/example/include/tool.h b/lib/archive/Ydriver-src/example/include/tool.h deleted file mode 100644 index d81ec8d6df..0000000000 --- a/lib/archive/Ydriver-src/example/include/tool.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): DS - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - - tool & desc - -*/ - char *tool="example"; - char *tool_desc="Ydriver Lib example"; diff --git a/lib/archive/Ydriver-src/example/include/version.h.in b/lib/archive/Ydriver-src/example/include/version.h.in deleted file mode 100644 index c0f3f755f9..0000000000 --- a/lib/archive/Ydriver-src/example/include/version.h.in +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#define YAMBO_VERSION @YDRI_VERSION@ -#define YAMBO_SUBVERSION @YDRI_SUBVERSION@ -#define YAMBO_PATCHLEVEL @YDRI_PATCHLEVEL@ -#define YAMBO_REVISION 0 -#define YAMBO_HASH "" - diff --git a/lib/archive/Ydriver-src/example/main.F b/lib/archive/Ydriver-src/example/main.F deleted file mode 100644 index 0d0f8af828..0000000000 --- a/lib/archive/Ydriver-src/example/main.F +++ /dev/null @@ -1,63 +0,0 @@ -! -integer function main(& -& np,pid,& -& string_N,in_file_N,in_dir_N,out_dir_N,com_dir_N,job_N,& -& string, in_file, in_dir, out_dir, com_dir, job) - ! - use C_driver - ! - integer, intent(in) :: np,pid - integer, intent(in) :: string_N,in_file_N,in_dir_N,out_dir_N,com_dir_N,job_N - character(string_N), intent(in) :: string - character(in_file_N), intent(in) :: in_file - character(in_dir_N), intent(in) :: in_dir - character(out_dir_N), intent(in) :: out_dir - character(com_dir_N), intent(in) :: com_dir - character(job_N), intent(in) :: job - ! - integer i_runlevel - character(100) key,desc,pj,hash - ! - if (pid==0) then - ! - write (*,'(/a/)') " F driver" - write (*,*) "NP, PID :",np,pid - write (*,*) "RUNSTRING :",string_N,string - write (*,*) "INPUT file:",in_file_N,in_file - write (*,*) "INPUT dir :",in_dir_N,in_dir - write (*,*) "OUT dir :",out_dir_N,out_dir - write (*,*) "COM dir :",com_dir_N,com_dir - write (*,*) "JOB :",job_N,job - - call C_driver_transfer( ) - write (*,'(/2a)') " RUNNING :",trim(code_bin) - write (*,'(2a)') " LIBS :",trim(code_libraries) - write (*,'(a,2(i1,a),i1/)') " VERSION :",code_version(1),".",code_version(2),".",code_version(3) - do i_runlevel=0,199 - key=" " - desc=" " - call get_runlevel(key,1,i_runlevel) - call get_runlevel(desc,2,i_runlevel) - if (trim(key)=="EMPTY") cycle - write (*,*) "RUNLEVEL #",i_runlevel," KEY:",trim(key),' DESC:',trim(desc) - enddo -endif - -end function - ! - character(100) function cstr(si) result(so) - character(*), intent(IN) :: si - integer :: i - i = len(trim(si)) - call clear_str(so) - so(1:i) = si(1:i) - so(i+1:i+1) = achar(0) - end function cstr - - subroutine clear_str(str) - character(*), intent(out) :: str - integer :: i - do i = 1, len(str) - str(i:i) = " " - end do - end subroutine clear_str diff --git a/lib/archive/Ydriver-src/example/options/.empty b/lib/archive/Ydriver-src/example/options/.empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/archive/Ydriver-src/include/.empty b/lib/archive/Ydriver-src/include/.empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/archive/Ydriver-src/include/driver.h b/lib/archive/Ydriver-src/include/driver.h deleted file mode 100644 index 8fae1763df..0000000000 --- a/lib/archive/Ydriver-src/include/driver.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ -struct yambo_seed_struct command_line(int argc, char *argv[],struct options_struct options[], struct tool_struct t, int *use_editor, int *use_mpi, int n_options); -void input_file(struct yambo_seed_struct y,struct tool_struct t, int *use_editor); -void launcher(int argc, char *argv[],int np, int pid, struct yambo_seed_struct y,int *use_editor , int *use_mpi ); -void options_maker(struct options_struct options[], int n_options); -struct tool_struct tool_init( ); -void usage(struct options_struct options[], struct tool_struct t, char* what, int n_options); -struct tool_struct versions( ); -void title(FILE *file_name,char *cmnt, struct tool_struct t); -int use_me(struct options_struct options[], struct tool_struct t, int i_opt); -char *running_tool(); -char *running_project(); -char *running_libraries(); -char *runlevel(int *runid, int *id); -void options_help(struct options_struct options[],int *i_opt); diff --git a/lib/archive/Ydriver-src/include/fortran_arguments.h b/lib/archive/Ydriver-src/include/fortran_arguments.h deleted file mode 100644 index a165657e80..0000000000 --- a/lib/archive/Ydriver-src/include/fortran_arguments.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): DS - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ -&np,&pid, -&y.string_N,&y.in_file_N,&y.in_dir_N,&y.out_dir_N,&y.com_dir_N,&y.job_N, - y.string, y.in_file, y.in_dir, y.out_dir, y.com_dir, y.job, - y.string_N, y.in_file_N, y.in_dir_N, y.out_dir_N, y.com_dir_N, y.job_N diff --git a/lib/archive/Ydriver-src/include/kind.h b/lib/archive/Ydriver-src/include/kind.h deleted file mode 100644 index c73552ff23..0000000000 --- a/lib/archive/Ydriver-src/include/kind.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ - -typedef struct tool_struct -{ - char *editor; - char *tool; - char *bin; - char *desc; - char version_string[500]; - char hash[500]; - char *pj; - int version; - int subversion; - int patchlevel; - int revision; -} tool_struct; - -typedef struct yambo_seed_struct -{ - char string[500]; - char *in_file; - char *in_dir; - char *out_dir; - char *com_dir; - char *job; - char *parenv_file; - int string_N; - int in_file_N; - int in_dir_N; - int out_dir_N; - int com_dir_N; - int job_N; -} yambo_seed_struct; - -typedef struct options_struct -{ - char short_opt; - char *long_opt; - char *short_desc; - char *long_desc[20]; /* max size equal to max_long_desc */ - char *bin; - char *yambo_string; - char *section; - int int_var; - int float_var; - int char_var; - int optional_var; - int serial_var; -} options_struct; - diff --git a/lib/archive/Ydriver-src/include/wrapper.h b/lib/archive/Ydriver-src/include/wrapper.h deleted file mode 100644 index 9992a42fa5..0000000000 --- a/lib/archive/Ydriver-src/include/wrapper.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): DS - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ -/* - C wrapper -*/ -#if defined _C_US - #define C_FUNC(name,NAME) name ## _ -#else - #define C_FUNC(name,NAME) name -#endif -/* - F90 wrapper -*/ -#if defined _FORTRAN_US - #define F90_FUNC(name) name ## _ -#else - #define F90_FUNC(name) name -#endif diff --git a/lib/archive/Ydriver-src/lib/.empty b/lib/archive/Ydriver-src/lib/.empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/archive/Ydriver-src/src/driver/driver.c b/lib/archive/Ydriver-src/src/driver/driver.c deleted file mode 100644 index 56e83f16f6..0000000000 --- a/lib/archive/Ydriver-src/src/driver/driver.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ -#include -#include -#include -#include -#if defined _MPI - #include -#endif -/* - MAIN -*/ -int main(int argc, char *argv[]) -{ - /* - Work Space - */ - int np=1,pid=0,use_mpi=1,use_editor=1,n_options=200; - /* - Yambo and Tool structures - */ - yambo_seed_struct y; - tool_struct tool; - struct options_struct options[n_options]; - /* - TOOL & Version initialization - */ - tool=tool_init(); - /* - Options "maker" - */ - options_maker(options,n_options); - /* - Command line parsing - */ - y=command_line(argc,argv,options,tool,&use_editor,&use_mpi,n_options); - /* - Launcher - */ - launcher(argc,argv,np,pid,y,&use_editor,&use_mpi); - /* - Input File - */ - input_file(y,tool,&use_editor); - /* - CLEAN & EXIT - =========================================================================== - */ -#if defined _MPI - if (use_mpi==1) { - MPI_Barrier(MPI_COMM_WORLD); - MPI_Finalize(); - }; -#endif -} - diff --git a/lib/archive/Ydriver-src/src/interface/.objects b/lib/archive/Ydriver-src/src/interface/.objects deleted file mode 100644 index 4f515078b5..0000000000 --- a/lib/archive/Ydriver-src/src/interface/.objects +++ /dev/null @@ -1,2 +0,0 @@ -objs = get_running_tool.o get_running_project.o get_runlevel.o get_libraries.o get_version.o mod_C_driver.o \ - C_driver_transfer.o diff --git a/lib/archive/Ydriver-src/src/interface/C_driver_transfer.F b/lib/archive/Ydriver-src/src/interface/C_driver_transfer.F deleted file mode 100644 index 8025ff94d9..0000000000 --- a/lib/archive/Ydriver-src/src/interface/C_driver_transfer.F +++ /dev/null @@ -1,43 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine C_driver_transfer() - ! - use C_driver, ONLY:code_version,code_revision,code_hash,& -& code_libraries,get_version,get_libraries,get_running_tool,& -& get_running_project,code_bin,code_tool,code_project - ! - implicit none - ! - code_tool=" " - call get_running_tool(code_tool) - code_project=" " - call get_running_project(code_project) - code_bin=trim(code_tool) - if (len_trim(code_project)>0) code_bin=trim(code_tool)//"_"//trim(code_project) - code_libraries=" " - call get_libraries(code_libraries) - code_hash=" " - call get_version(code_version(1),code_version(2),code_version(3),code_revision,code_hash) - ! -end subroutine diff --git a/lib/archive/Ydriver-src/src/interface/get_libraries.c b/lib/archive/Ydriver-src/src/interface/get_libraries.c deleted file mode 100644 index 30d8a80c73..0000000000 --- a/lib/archive/Ydriver-src/src/interface/get_libraries.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include -#include - -char *running_libraries() -{ - int i_str,str_len,i_c; - char strings[20][20], *c; - i_str=0; -#if defined _MPI - strcpy(strings[i_str], "MPI"); -#else - strcpy(strings[i_str], "Serial"); -#endif -#if defined _OPENMP - i_str++; - strcpy(strings[i_str], "OpenMP"); -#endif -#if defined _CUDA - i_str++; - strcpy(strings[i_str], "CUDA"); -#endif -#if defined _SCALAPACK - i_str++; - strcpy(strings[i_str], "SLK"); -#endif -#if defined _SLEPC - i_str++; - strcpy(strings[i_str], "SLEPC"); -#endif -#if defined _PAR_IO - i_str++; - strcpy(strings[i_str], "HDF5_MPI_IO"); -#elif defined _HDF5_IO - i_str++; - strcpy(strings[i_str], "HDF5_IO"); -#elif defined _HDF5_LIB - i_str++; - strcpy(strings[i_str], "HDF5_LIB"); -#endif - str_len=0; - for(i_c=0;i_c<=i_str;i_c++) { - str_len=str_len+sizeof(strings[i_c]); - } - c = malloc(str_len+1); - strcpy(c,""); - for(i_c=0;i_c<=i_str;i_c++) { - if (i_c>0) strcat(c,"+"); - strcat(c,strings[i_c]); - } - return c; -} -void C_FUNC(get_libraries, GET_LIBRARIES)(char *libraries) -{ - char *c = running_libraries(); - int len = strlen(c); - strcpy(libraries, c); - libraries[len] = libraries[len + 1]; -} - diff --git a/lib/archive/Ydriver-src/src/interface/get_runlevel.c b/lib/archive/Ydriver-src/src/interface/get_runlevel.c deleted file mode 100644 index 076d983320..0000000000 --- a/lib/archive/Ydriver-src/src/interface/get_runlevel.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include - -char *runlevel(int *runid, int *id) -{ - int n_options=200; - struct options_struct options[n_options]; - options_maker(options,n_options); - if (strcmp(options[*runid].yambo_string,"unused")==0) return "EMPTY"; - if (*id == 1) {return options[*runid].yambo_string;} - if (*id == 2) {return options[*runid].short_desc;} - if (*id == 3) {return options[*runid].bin;} -} -void C_FUNC(get_runlevel, GET_RUNLEVEL)(char *component, int *component_id, int *runlevel_id) -{ - char *c = runlevel(runlevel_id,component_id); - int len = strlen(c); - strcpy(component, c); - component[len] = component[len + 1]; -} - diff --git a/lib/archive/Ydriver-src/src/interface/get_running_project.c b/lib/archive/Ydriver-src/src/interface/get_running_project.c deleted file mode 100644 index 35a5b18f45..0000000000 --- a/lib/archive/Ydriver-src/src/interface/get_running_project.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include -#include - -char *running_project() -{ - tool_struct tool; - tool=tool_init(); - char *c; - if (tool.pj!=NULL) { - c = malloc(sizeof(tool.pj)+1); - strcpy(c,tool.pj); - }else{ - c = malloc(2); - strcpy(c,""); - } - return c; -} -void C_FUNC(get_running_project, GET_RUNNING_TOOL)(char *code_project) -{ - char *c = running_project(); - int len = strlen(c); - strcpy(code_project, c); - code_project[len] = code_project[len + 1]; -} - diff --git a/lib/archive/Ydriver-src/src/interface/get_running_tool.c b/lib/archive/Ydriver-src/src/interface/get_running_tool.c deleted file mode 100644 index b8719ed548..0000000000 --- a/lib/archive/Ydriver-src/src/interface/get_running_tool.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include -#include - -char *running_tool() -{ - tool_struct tool; - tool=tool_init(); - char *c; - c = malloc(sizeof(tool.tool)+1); - strcpy(c,tool.tool); - return c; -} -void C_FUNC(get_running_tool, GET_RUNNING_TOOL)(char *code_tool) -{ - char *c = running_tool(); - int len = strlen(c); - strcpy(code_tool, c); - code_tool[len] = code_tool[len + 1]; -} - diff --git a/lib/archive/Ydriver-src/src/interface/get_version.c b/lib/archive/Ydriver-src/src/interface/get_version.c deleted file mode 100644 index 0de2bf0508..0000000000 --- a/lib/archive/Ydriver-src/src/interface/get_version.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include -#include - -struct tool_struct versions( ) -{ - tool_struct t; - t.version=YAMBO_VERSION; - t.subversion=YAMBO_SUBVERSION; - t.patchlevel=YAMBO_PATCHLEVEL; - t.revision=YAMBO_REVISION; - sprintf(t.hash,"%s",YAMBO_HASH); - return(t); -} -void C_FUNC(get_version, GET_VERSION)(int *version,int *subversion, int *patchlevel, int *revision, char *hash) -{ - tool_struct t; - t=versions(); - *version=t.version; - *subversion=t.subversion; - *patchlevel=t.patchlevel; - *revision=t.revision; - strcpy(hash, t.hash); - int len = strlen(t.hash); - hash[len] = hash[len + 1]; -} - diff --git a/lib/archive/Ydriver-src/src/interface/mod_C_driver.F b/lib/archive/Ydriver-src/src/interface/mod_C_driver.F deleted file mode 100644 index 2cf87035d5..0000000000 --- a/lib/archive/Ydriver-src/src/interface/mod_C_driver.F +++ /dev/null @@ -1,68 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -module C_driver - ! - implicit none - ! - integer :: code_version(3) - integer :: code_GPL_revision - integer :: code_revision - character(50):: code_bin - character(50):: code_tool - character(50):: code_project - character(50):: code_hash - character(50):: code_libraries - character(50):: code_branch - ! - interface - ! - subroutine get_version(version,subversion,patchlevel,revision,hash) - integer , intent(out):: version - integer , intent(out):: subversion - integer , intent(out):: patchlevel - integer , intent(out):: revision - character(*), intent(out):: hash - end subroutine - ! - subroutine get_libraries(libraries) - character(*), intent(out):: libraries - end subroutine - ! - subroutine get_running_project(code_project) - character(*), intent(out):: code_project - end subroutine - ! - subroutine get_running_tool(code_tool) - character(*), intent(out):: code_tool - end subroutine - ! - subroutine get_runlevel(component,component_id,runlevel_id) - character(*), intent(out):: component - integer, intent(in) :: component_id - integer, intent(in) :: runlevel_id - end subroutine - ! - end interface - ! -end module C_driver diff --git a/lib/archive/Ydriver-src/src/main/.objects b/lib/archive/Ydriver-src/src/main/.objects deleted file mode 100644 index fad604c43d..0000000000 --- a/lib/archive/Ydriver-src/src/main/.objects +++ /dev/null @@ -1 +0,0 @@ -objs = launcher.o command_line.o input_file.o load_environments.o options_maker.o title.o tool_init.o usage.o use_me.o diff --git a/lib/archive/Ydriver-src/src/main/command_line.c b/lib/archive/Ydriver-src/src/main/command_line.c deleted file mode 100644 index ecc9528dd6..0000000000 --- a/lib/archive/Ydriver-src/src/main/command_line.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - - https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Option-Example.html - https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html#Getopt-Long-Options - -Data Type: struct option -This structure describes a single long option name for the sake of getopt_long. -The argument longopts must be an array of these structures, one for each long option. Terminate the array with an element containing all zeros. - -The struct option structure has these fields: - -- const char *name - This field is the name of the option. It is a string. - -- int has_arg - This field says whether the option takes an argument. It is an integer, and there are three legitimate values: no_argument, required_argument and optional_argument. - -- int *flag - -- int val - These fields control how to report or act on the option when it occurs. - - If flag is a null pointer, then the val is a value which identifies this option. - Often these values are chosen to uniquely identify particular long options. - - If flag is not a null pointer, it should be the address of an int variable which is the flag for this option. - The value in val is the value to store in the flag to indicate that the option was seen. - -*/ -#include -#include -#include -#include -#include -#include - -struct yambo_seed_struct command_line(int argc, char *argv[], struct options_struct opts[], struct tool_struct t, int *use_editor, int *use_mpi, int n_options) -{ - int n_active,n_vars,opt=0,i_opt; - char opt_string[100],ch[3]; - /* */ - yambo_seed_struct y; - /* - Pre-sets - */ - y.in_file = malloc(strlen(t.tool)+3); - y.parenv_file = NULL; - strcpy(y.in_file,t.tool); - strcat(y.in_file,".in"); - y.in_dir="."; - y.out_dir="."; - y.com_dir="."; - y.job=""; - strcpy(y.string,""); - /* */ - n_active=0; - for(i_opt=0;i_opt 0) {printf ("GETOPT ouput: %c %s",opts[i_opt].short_opt,opts[i_opt].long_opt);} - printf ("\n"); - */ - /* help */ - if (strcmp(opts[i_opt].long_opt,"help")==0){ - if (optarg == NULL && argv[optind] != NULL && argv[optind][0] != '-') { // not an option - usage(opts,t,argv[optind],n_options); - ++optind; - } else { // handle case of argument immediately after option - if (optarg == NULL) usage(opts,t,"help",n_options); - if (optarg != NULL) usage(opts,t,optarg,n_options); - } - exit(0); - } - /* version */ - if (strcmp(opts[i_opt].long_opt,"version")==0){ - usage(opts,t,"version",n_options); - exit(0); - } - if (strcmp(opts[i_opt].long_opt,"Input")==0){y.in_file=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Job")==0){y.job=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Idir")==0){y.in_dir=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Cdir")==0){y.com_dir=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"parenv")==0){y.parenv_file=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Odir")==0){y.out_dir=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"nompi")==0){*use_mpi=-1;continue;} - if (strcmp(opts[i_opt].long_opt,"Quiet")==0){*use_editor=-2;continue;} - if (opt > 0) { - strcat(y.string," "); - strcat(y.string,opts[i_opt].yambo_string); - } - if (optarg) { - strcat(y.string," "); - strcat(y.string,optarg); - } - }; - /* - Sizes - */ - y.string_N=strlen(y.string); - y.in_file_N=strlen(y.in_file); - y.out_dir_N=strlen(y.out_dir); - y.in_dir_N=strlen(y.in_dir); - y.com_dir_N=strlen(y.com_dir); - y.job_N=strlen(y.job); - /* */ - return(y); -}; - - - diff --git a/lib/archive/Ydriver-src/src/main/input_file.c b/lib/archive/Ydriver-src/src/main/input_file.c deleted file mode 100644 index be111ef891..0000000000 --- a/lib/archive/Ydriver-src/src/main/input_file.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ -#include -#include -#include -#include - -void input_file(struct yambo_seed_struct y,struct tool_struct t,int *use_editor) -{ - int ttd; - char edit_line[100]={'\0'},file_name[100]={'\0'}; - /* - External functions - */ - extern int guess_winsize(); - /* - stdlog? - */ - ttd=guess_winsize(); - /* */ - strcpy(edit_line,t.editor); - strcpy(file_name,y.in_file); - if (y.parenv_file !=NULL) {strcpy(file_name,y.parenv_file);}; - strncat(edit_line," ",1); - strncat(edit_line,file_name,strlen(file_name)); -#if defined _yambo || defined _ypp - if (*use_editor == 1 && ttd>0 && strstr(t.editor,"none ")==0) - { - system(edit_line); - }else if (*use_editor == -2){ - fprintf(stderr," \n%s%s %s %s\n\n",t.tool,": input file",file_name,"created"); - exit (0); - }; -#endif -}; diff --git a/lib/archive/Ydriver-src/src/main/launcher.c b/lib/archive/Ydriver-src/src/main/launcher.c deleted file mode 100644 index 3b35716d24..0000000000 --- a/lib/archive/Ydriver-src/src/main/launcher.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ -#include -#include -#include -#include -#include -#include -#if defined _yambo || defined _ypp || defined _a2y || defined _p2y - #include -#endif -#if defined _MPI - #include -#endif - -void launcher(int argc, char *argv[],int np, int pid, struct yambo_seed_struct y,int *use_editor, int *use_mpi) -{ - int yambo_err; - /* - Par Environments? Yes? => Return - */ -#if defined _yambo - if (y.parenv_file !=NULL) - { - int env_editor=load_environments(y.parenv_file); - if (env_editor==1) - { - *use_editor=1; - return; - }; - }; -#endif - /* - MPI - */ -#if defined _MPI - if (*use_mpi==1) { - MPI_Init(&argc,&argv); /* starts MPI */ - MPI_Comm_rank(MPI_COMM_WORLD, &pid); /* get current process id */ - MPI_Comm_size(MPI_COMM_WORLD, &np); /* get number of processes */ - }; -#endif -#if defined _example_driver - /* - Testing Driver - =========================================================================== - */ - yambo_err=F90_FUNC(main)( -#include - ); -#endif -#if defined _yambo - /* - Running the Fortran YAMBO driver - =========================================================================== - */ - yambo_err=F90_FUNC(yambo)( -#include - ); - if(yambo_err==2) exit(0); /* DB listing mode */ -#endif -#if defined _ypp - /* - Running the Fortran YPP driver - =========================================================================== - */ - F90_FUNC(ypp)( -#include - ); -#endif -#if defined _c2y - /* - Running the Fortran c2y driver - =========================================================================== - */ - F90_FUNC(c2y)( -#include - ); -#endif -#if defined _a2y - /* - Running the Fortran a2y driver - =========================================================================== - */ - F90_FUNC(a2y)( -#include - ); -#endif -#if defined _p2y - /* - Running the Fortran p2y driver - =========================================================================== - */ - F90_FUNC(p2y)( -#include - ); -#endif -#if defined _e2y - /* - Running the Fortran p2y driver - =========================================================================== - */ - F90_FUNC(e2y)( -#include - ); -#endif -#if defined _eph2y - /* - Running the Fortran eph2y driver - =========================================================================== - */ - F90_FUNC(eph2y)( -#include - ); -#endif - /* - Input file edit ? - =========================================================================== - */ - if ( y.in_file_N ==1 && *use_editor ==0 ) {*use_editor=1;}; - if ( y.in_file_N ==0 || y.in_file_N ==2 ) {*use_editor=0;}; - /* - Error message - =========================================================================== - */ - if ( y.in_file_N < 0 ) - { - if (pid==0 && y.in_file_N == -1) { - fprintf(stderr," \n%s\n\n","yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)"); - }; - if (pid==0 && y.in_file_N == -2) { - fprintf(stderr," \n%s\n\n","yambo: invalid command line options and/or build"); - }; -#if defined _MPI - if (*use_mpi==1) { MPI_Abort(MPI_COMM_WORLD,1); }; -#endif - } -}; diff --git a/lib/archive/Ydriver-src/src/main/load_environments.c b/lib/archive/Ydriver-src/src/main/load_environments.c deleted file mode 100644 index d2f99cb881..0000000000 --- a/lib/archive/Ydriver-src/src/main/load_environments.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include - -int load_environments(char* file_name) -{ - FILE *fp; - char str[100]; - char* pch; - char* token; - char* var; - char* value; - fp = fopen(file_name, "r"); - if (fp) { - while(fgets(str, 100, fp)) { - pch=strchr(str,'#'); - if (!pch) { - /* get the first token */ - token=strtok(str," "); - /* walk through other tokens */ - if ( token != NULL ) - { - token = strtok(NULL," "); - var=token; - token = strtok(NULL," "); - value=token; - /* printf( " %s %s %s \n", var, value, token ); */ - } - setenv(var,value,1); - } - } - return 0; - }else{ - fp = fopen(file_name, "w+"); - fputs("#\n",fp); - fputs("# Edit it and use with -E during runtime\n#\n",fp); - fputs("# CPU section (just edit, do not remove fields)\n",fp); - fputs("setenv YAMBO_X_q_0_CPU 1.1.1.1\n",fp); - fputs("setenv YAMBO_X_finite_q_CPU 1.1.1.1.1\n",fp); - fputs("setenv YAMBO_X_all_q_CPU 1.1.1.1.1\n",fp); - fputs("setenv YAMBO_BS_CPU 1.1.1\n",fp); - fputs("setenv YAMBO_SE_CPU 1.1.1\n",fp); - fputs("setenv YAMBO_RT_CPU 1.1.1.1\n",fp); - fputs("# Scalapack section (leave unchanged if you wish)\n",fp); - fputs("setenv YAMBO_X_q_0_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_X_finite_q_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_X_all_q_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_BS_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_BS_nCPU_LinAlg_DIAGO 1\n",fp); - fputs("# ROLEs section (leave unchanged if you wish)\n",fp); - fputs("setenv YAMBO_X_q_0_ROLEs g.k.c.v\n",fp); - fputs("setenv YAMBO_X_finite_q_ROLEs q.g.k.c.v\n",fp); - fputs("setenv YAMBO_X_all_q_ROLEs q.g.k.c.v\n",fp); - fputs("setenv YAMBO_BS_ROLEs k.eh.t\n",fp); - fputs("setenv YAMBO_SE_ROLEs q.qp.b\n",fp); - fputs("setenv YAMBO_RT_ROLEs k.b.q.qp\n",fp); - fclose(fp); - return 1; - } -}; diff --git a/lib/archive/Ydriver-src/src/main/options_maker.c b/lib/archive/Ydriver-src/src/main/options_maker.c deleted file mode 100644 index 771a166954..0000000000 --- a/lib/archive/Ydriver-src/src/main/options_maker.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ -#include -#include -#if defined _yambo - #include -#endif -#if defined _example_driver - #include -#endif -#include -#include - -void options_maker(struct options_struct options[], int n_options) -{ - int i_opt,dummy,i; - int max_long_desc=20; - - for(i_opt=0;i_opt 0 ) continue; - options[i_opt].short_opt=dummy; - dummy--; - } -} diff --git a/lib/archive/Ydriver-src/src/main/title.c b/lib/archive/Ydriver-src/src/main/title.c deleted file mode 100644 index 3bd956459b..0000000000 --- a/lib/archive/Ydriver-src/src/main/title.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ -#include -#include -#include -#include - -void title(FILE *file_name,char *cmnt, struct tool_struct t) -{ - char *tool = running_tool(); - char *pj = running_project(); - char *libs = running_libraries(); - fprintf(file_name,"%s%s\n",cmnt, " ___ __ _____ __ __ _____ _____ "); - fprintf(file_name,"%s%s\n",cmnt, "| Y || _ || Y || _ \\ | _ |"); - fprintf(file_name,"%s%s\n",cmnt, "| | ||. | ||. ||. | / |. | |"); - fprintf(file_name,"%s%s\n",cmnt, " \\ _/ |. _ ||.\\ / ||. _ \\ |. | |"); - fprintf(file_name,"%s%s\n",cmnt, " |: | |: | ||: | ||: | \\|: | |"); - fprintf(file_name,"%s%s\n",cmnt, " |::| |:.|:.||:.|:.||::. /|::. |"); - fprintf(file_name,"%s%s\n",cmnt, " `--\" `-- --\"`-- --\"`-----\" `-----\""); - fprintf(file_name,"%s '%s' \n",cmnt,t.desc); - if (strlen(pj)>0) { - fprintf(file_name,"%s\n%s This is : %s(%s)",cmnt,cmnt,tool,pj); - }else{ - fprintf(file_name,"%s\n%s This is : %s",cmnt,cmnt,tool); - } - fprintf(file_name,"%s\n%s Version : %s ",cmnt,cmnt,t.version_string); - fprintf(file_name,"%s\n%s Configuration: %s \n",cmnt,cmnt,libs); -}; diff --git a/lib/archive/Ydriver-src/src/main/tool_init.c b/lib/archive/Ydriver-src/src/main/tool_init.c deleted file mode 100644 index bc0ef3c177..0000000000 --- a/lib/archive/Ydriver-src/src/main/tool_init.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#if defined _yambo || defined _ypp - #include -#endif - -/* - AM 29/7/2021 - - This source is project dependent via tool.h. In order to properly compile it, then, - I need to add fictiuous pre-compiler options - -*/ -#if defined _p2y || defined _a2y || defined _c2y || defined _2y -#endif - -struct tool_struct tool_init( ) -{ - tool_struct t; - t=versions(); -#if defined _yambo || defined _ypp - t.editor=editor; -#else - t.editor="vim"; -#endif - t.tool=tool; - t.desc=tool_desc; - /* - Projects - */ - char *pj=NULL; -#if defined _YPP_ELPH || defined _ELPH - pj="ph"; -#endif -#if defined _YPP_RT || defined _RT - pj="rt"; -#endif -#if defined _YPP_SC || defined _SC - pj="sc"; -#endif -#if defined _YPP_NL || defined _NL - pj="nl"; -#endif -#if defined _YPP_DF || defined _DF - pj="df"; -#endif -#if defined _QED - pj="qed"; -#endif -#if defined _SURF - pj="surf"; -#endif - - if (pj!=NULL) { - t.bin = malloc(strlen(tool)+strlen(pj)+1); - strcpy(t.bin,t.tool); - t.pj=pj; - strcat(t.bin,"_"); - strcat(t.bin,t.pj); - }else{ - t.bin = malloc(strlen(tool)); - strcpy(t.bin,t.tool); - pj=""; - t.pj=pj; - } - if (pj==NULL) pj=" "; - sprintf(t.version_string,"%i.%i.%i Revision %i Hash %s",t.version,t.subversion, - t.patchlevel,t.revision,t.hash); - return(t); -}; - diff --git a/lib/archive/Ydriver-src/src/main/usage.c b/lib/archive/Ydriver-src/src/main/usage.c deleted file mode 100644 index 652b700561..0000000000 --- a/lib/archive/Ydriver-src/src/main/usage.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include - -void usage(options_struct *options, struct tool_struct t, char *what, int n_options) -{ - int i_opt,i,i_o,n_blanks,n_strings; - - char *pj = running_project(); - char *tool = running_tool(); - char *libs = running_libraries(); - - int max_long_desc=20; - - /* - Order - */ - int n_orders=19,n_order_elements; - char *order[]={ - "Help & version", /* 1 */ - "Input file & Directories", /* 2 */ - "Parallel Control", /* 3 */ - "Initializations", /* 4 */ - "Response Functions", /* 5 */ - "Self-Energy", /* 6 */ - "Bethe-Salpeter Equation", /* 7 */ - "Hamiltonians & Potentials", /* 8 */ - "Real-Time", /* 9 */ - "Surface Spectroscopy", /* 10 */ - "Total Energy", /* 11 */ - "Interface", /* 12 */ - "Brillouin Zone", /* 13 */ - "Convertions", /* 14 */ - "Plots", /* 15 */ - "SOC", /* 16 */ - "Utilites", /* 17 */ - "Wannier", /* 18 */ - "undef", /* 19 */ - }; - - if (strcmp(what,"help")==0) { - - title(stderr,"",t); - - n_strings=0; - for(i_opt=0;i_optn_strings) n_strings=n_blanks; - }; - - for(i_o=0;i_o57) - {fprintf(stderr," (-%c)",options[i_opt].short_opt);} - else - {for(i=1;i<=5;i++) fprintf(stderr," ");}; - for(i=1;i<=options[i_opt].int_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].float_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].char_var;i++) {fprintf(stderr," %s","");}; - n_blanks=n_strings+2-options[i_opt].int_var*6-options[i_opt].float_var*7-options[i_opt].char_var*9; - for(i=1;i<=n_blanks;i++) fprintf(stderr," "); - fprintf(stderr," :%s",options[i_opt].short_desc); - if (options[i_opt].long_desc[0]!= NULL) fprintf(stderr," %s%s%s","(more with -h ",options[i_opt].long_opt,")"); - fprintf(stderr,"\n"); - } - } - - fprintf(stderr,"\n"); - fprintf(stderr,"%s\n\n"," YAMBO developers group (http://www.yambo-code.org)"); - - }else if (strcmp(what,"version")==0) { - if (strlen(pj)>0) { - fprintf(stderr,"\nThis is %s(%s) - %s - Ver. %s \n\n",tool,pj,libs,t.version_string); - }else{ - fprintf(stderr,"\nThis is %s - %s - Ver. %s \n\n",tool,libs,t.version_string); - } - }else{ - for(i_opt=0;i_opt57) fprintf(stderr," Short option: %c\n",options[i_opt].short_opt); - if (options[i_opt].int_var+options[i_opt].float_var+options[i_opt].char_var>0) - { - fprintf(stderr," Variables :"); - for(i=1;i<=options[i_opt].int_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].float_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].char_var;i++) {fprintf(stderr," %s","");}; - fprintf(stderr,"\n"); - } - if (options[i_opt].long_desc[0]!= NULL) - { - fprintf(stderr," Description :%s",options[i_opt].short_desc); - for(i=0;i -#include -#include -#include -#include - -int use_me(struct options_struct options[], struct tool_struct t, int i_opt) -{ - char *pch,str[100]; - if (options[i_opt].short_desc==NULL) return 0; - strcpy(str,options[i_opt].bin); - pch = strtok(str," "); - while (pch != NULL) - { - if (strcmp(pch,t.tool)==0) return 1; - if (strcmp(pch,t.bin)==0) return 1; - if (strcmp(pch,"all")==0) return 1; - pch = strtok (NULL, " "); - } -}; diff --git a/lib/archive/Ydriver-src/src/main/winsize.c b/lib/archive/Ydriver-src/src/main/winsize.c deleted file mode 100644 index b625f8b8f9..0000000000 --- a/lib/archive/Ydriver-src/src/main/winsize.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#include -#include -#include -#include -#include - -int guess_winsize() -{ - int width; - struct winsize ws; - if (!isatty(2)) {width=-1;return width;} - if( ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0 ) - width = 79; - else - width = ws.ws_col - 1; - return width; -}; -int C_FUNC(win_size, WIN_SIZE)(int *win_width) -{ - *win_width = 0; - *win_width = guess_winsize(); - return 0; -}; diff --git a/lib/archive/Ydriver-src/src/options/.objects b/lib/archive/Ydriver-src/src/options/.objects deleted file mode 100644 index f81b3c5580..0000000000 --- a/lib/archive/Ydriver-src/src/options/.objects +++ /dev/null @@ -1 +0,0 @@ -objs = options_help.o diff --git a/lib/archive/Ydriver-src/src/options/options_help.c b/lib/archive/Ydriver-src/src/options/options_help.c deleted file mode 100644 index 09e6f4f446..0000000000 --- a/lib/archive/Ydriver-src/src/options/options_help.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. - -*/ -#include -#include - -void options_help(struct options_struct options[],int *i_opt) -{ - char *desc="Help & version"; - /* - Help(s) - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc=" can be an option (e.g. -h optics)"; - options[*i_opt].short_opt='h'; - options[*i_opt].long_opt="help"; - options[*i_opt].serial_var=1; - options[*i_opt].optional_var=1; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Code version & libraries"; - options[*i_opt].long_opt="version"; - options[*i_opt].serial_var=1; - options[*i_opt].section=desc; -}; From 344acc0a91ca3ef5a7859ded4a6b4bb1e851c1a9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 16 Jan 2023 16:12:06 +0100 Subject: [PATCH 0561/1367] Version 5.1.0, Revision 21888, Hash 2609d39c0 MODIFIED * include/driver/version.h interface/DOUBLE_project.dep interface/NL_project.dep interface/RT_project.dep real_time_initialize/DOUBLE_project.dep ypp/real_time/DOUBLE_project.dep Bugs: - [compilation] Fixed _project.dep files after last changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/interface/DOUBLE_project.dep | 1 + src/interface/NL_project.dep | 1 + src/interface/RT_project.dep | 1 + src/real_time_initialize/DOUBLE_project.dep | 1 + ypp/real_time/DOUBLE_project.dep | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 923beba5c7..c22eaa3c39 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21870 -#define YAMBO_HASH "14dbb68b2" +#define YAMBO_REVISION 21888 +#define YAMBO_HASH "2609d39c0" diff --git a/src/interface/DOUBLE_project.dep b/src/interface/DOUBLE_project.dep index de74fe71b9..d5653f7beb 100644 --- a/src/interface/DOUBLE_project.dep +++ b/src/interface/DOUBLE_project.dep @@ -9,6 +9,7 @@ INIT_activate.o INIT_barriers.o INIT_check_databases.o + INIT_fields.o INIT_input_file.o INIT_load.o INIT_q_points.o diff --git a/src/interface/NL_project.dep b/src/interface/NL_project.dep index 762c81e5ad..aecba3ab0f 100644 --- a/src/interface/NL_project.dep +++ b/src/interface/NL_project.dep @@ -1,5 +1,6 @@ INIT.o INIT_activate.o + INIT_fields.o INIT_load.o INIT_read_command_line.o diff --git a/src/interface/RT_project.dep b/src/interface/RT_project.dep index a58560f906..321ea2819e 100644 --- a/src/interface/RT_project.dep +++ b/src/interface/RT_project.dep @@ -1,6 +1,7 @@ INIT.o INIT_activate.o INIT_check_databases.o + INIT_fields.o INIT_load.o INIT_read_command_line.o diff --git a/src/real_time_initialize/DOUBLE_project.dep b/src/real_time_initialize/DOUBLE_project.dep index 6c52e6b757..f482688fdd 100644 --- a/src/real_time_initialize/DOUBLE_project.dep +++ b/src/real_time_initialize/DOUBLE_project.dep @@ -3,6 +3,7 @@ RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_empty.o + RT_field_from_file.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o diff --git a/ypp/real_time/DOUBLE_project.dep b/ypp/real_time/DOUBLE_project.dep index e1f722a192..538a897ae5 100644 --- a/ypp/real_time/DOUBLE_project.dep +++ b/ypp/real_time/DOUBLE_project.dep @@ -26,6 +26,7 @@ RT_damp_it.o RT_density.o RT_dos_time_plot.o + RT_fields.o RT_manual_excitation.o RT_occ_bands_interpolation.o RT_occ_time_plot.o From a08a08a73c6f8d99bc2cfdb6f2eca00a69ea83c6 Mon Sep 17 00:00:00 2001 From: palful Date: Wed, 18 Jan 2023 11:29:32 +0100 Subject: [PATCH 0562/1367] Fixed issue when calling io_EXCPH --- src/exc-ph/EXCPH_gkkp_driver.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 43d1fce175..99ea2edd09 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -122,7 +122,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! and are consistent with the Lin and Lout specified in input ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') + io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') ! if(io_err==0) return if(io_err/=0) call warning("[EXCPH] Exc-ph matrix elements not correct or missing. To be computed") @@ -183,7 +183,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Write headers ! call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,'all') + io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') ! ! Get q-point coordinates in the q-BZ YAMBO_ALLOC(EXCPH_q,(q%nbz,3)) From 946b0ca03c436a4c709f79c59070dacd143acbee Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Tue, 24 Jan 2023 14:20:40 +0100 Subject: [PATCH 0563/1367] Meeting 24/01/2023 fix IP residuals --- src/bse/K_IP.F | 22 +++++++++++----------- src/bse/K_Transitions_setup.F | 5 ++++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 1220e7e3f1..30c6d24698 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -209,17 +209,17 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) write (*,*) "iresares", i_res_ares write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares), i_T_g f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) - res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*PL_weights(1))**2*BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) !was missing R< - ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) + res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 !was missing R< + !ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) if(l_BS_trace) then do i_dip=2,BS_dip_size - res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*PL_weights(i_dip))**2*BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) ! was missing only R< - ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) + res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 ! was missing only R< + !ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) enddo - res_PL=res_PL*f_eh_PL*Z_eh*E_eh - ares_PL=ares_PL*f_eh_PL*Z_eh*E_eh endif - write(*,*) 'P_weighted', P_weighted + res_PL=res_PL*f_eh_PL*Z_eh*E_eh + ares_PL= -res_PL! -res_PL+f_eh_PL*Z_eh*E_eh + write(*,*) 'PL_weights', PL_weights write(*,*) 'E_eh', E_eh write(*,*) 'f_eh_PL', f_eh_PL write(*,*) 'Z_eh', Z_eh @@ -309,11 +309,11 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) write(*,*)'l_BS_ares_from_res', l_BS_ares_from_res, BS_K_anti_resonant PL(:,3)=PL(:,3) + PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - PL(:,3)=PL(:,3) - PL_prefactor*ares_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi + PL(:,3)=PL(:,3) - PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif - write (*,*) 'PL(:3) here', PL(:,3) - write (*,*) 'res_PL here', res_PL - write (*,*) 'aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))', aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))) + !write (*,*) 'PL(:3) here', PL(:,3) + !write (*,*) 'res_PL here', res_PL + !write (*,*) 'aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))', aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))) endif ! if (l_BS_dichroism) then diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index eaa06b69cb..1cc696a2fd 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -261,7 +261,10 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) end if ! ! To be fixed - if (l_BS_photolum) BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares) =f_eh_PL + if (l_BS_photolum) then + write (*,*), 'BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares)', f_eh_PL + BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares) =f_eh_PL + endif ! BS_T_grp(i_T_group_now)%f_RES(i_T_in_the_grp)=f_eh_RES ! From 562624f8d4f84c2ac842a08d88b151b31c0df1d1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 24 Jan 2023 16:00:19 +0100 Subject: [PATCH 0564/1367] Version 5.1.0, Revision 21838, Hash bff73e280 MODIFIED * include/driver/version.h bse/K_IP.F bse/K_Transition_check.F bse/K_Transitions_setup.F bse/K_components_folded_in_serial_arrays.F bse/K_inversion_engine.F bse/PL_diago_residual.F modules/mod_BS.F modules/mod_PHOTOLUM.F Changes: - working on PL Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K_IP.F | 30 ++-- src/bse/K_Transition_check.F | 4 + src/bse/K_Transitions_setup.F | 2 +- .../K_components_folded_in_serial_arrays.F | 10 +- src/bse/K_inversion_engine.F | 2 +- src/bse/PL_diago_residual.F | 131 +++++------------- src/modules/mod_BS.F | 4 +- src/modules/mod_PHOTOLUM.F | 5 +- 9 files changed, 57 insertions(+), 135 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a2fb4944e4..39205c49f0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21875 -#define YAMBO_HASH "e61ebd13f" +#define YAMBO_REVISION 21876 +#define YAMBO_HASH "bff73e280" diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 30c6d24698..ffdc5a8116 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -201,29 +201,14 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Note that res_PL is always positive as f_eh_PL>0 ! - ! R< = fc(1-fv) - ! R> = fv(1-fc) - ! R_ares = fv-fc - ! R_res = fc-fv - ! R> = fv - fv*fc = fv + fc - fc - fv*fc = fv - fc + R< = R_ares + R< = -R_res + R< - write (*,*) "iresares", i_res_ares - write (*,*) "f_eh_PL", BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares), i_T_g - f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) - res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 !was missing R< - !ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) + f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T) + res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 if(l_BS_trace) then do i_dip=2,BS_dip_size - res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 ! was missing only R< - !ares_PL= -res_PL + BS_T_grp(i_T_g)%f_PL(i_T,i_res_ares) + res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 enddo endif res_PL=res_PL*f_eh_PL*Z_eh*E_eh - ares_PL= -res_PL! -res_PL+f_eh_PL*Z_eh*E_eh - write(*,*) 'PL_weights', PL_weights - write(*,*) 'E_eh', E_eh - write(*,*) 'f_eh_PL', f_eh_PL - write(*,*) 'Z_eh', Z_eh - write(*,*) 'fine' endif ! ! Dichroism @@ -306,14 +291,15 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_photolum) then - write(*,*)'l_BS_ares_from_res', l_BS_ares_from_res, BS_K_anti_resonant + ! + ! ( L< if w>0 This ensures that + ! I^PL = ( 1) we always select the "emission channel" + ! ( -L> if w<0 2) PL has the same symmetry properties + ! PL(:,3)=PL(:,3) + PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi if (BS_K_anti_resonant.and.l_BS_ares_from_res) then PL(:,3)=PL(:,3) - PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif - !write (*,*) 'PL(:3) here', PL(:,3) - !write (*,*) 'res_PL here', res_PL - !write (*,*) 'aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))', aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC))) endif ! if (l_BS_dichroism) then diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 69b758d2bc..2b31c20508 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -77,6 +77,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! Occupations Factors !===================== ! + ! f_res = (fv-fc) [ f_ares = (fc-fv) ] f_eh_REF =(Ken%f(iv,ikp,i_sp_v)-Ken%f(ic,ik ,i_sp_c))/spin_occ f_eh =f_eh_REF f_eh_RES =f_eh_REF @@ -105,7 +106,10 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& f_h = (spin_occ-Ken%f(iv,ikp,i_sp_v))/spin_occ endif ! + ! f< = fc(1-fv) if ( E_eh>=0._SP ) f_eh_PL = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ + ! -f> = -fv(1-fc) + ! Here we put a minus to mimic what happens in the retarded functions if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ ! #if defined _RT diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 1cc696a2fd..7b2edb7b9a 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -263,7 +263,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! To be fixed if (l_BS_photolum) then write (*,*), 'BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares)', f_eh_PL - BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares) =f_eh_PL + BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp) =f_eh_PL endif ! BS_T_grp(i_T_group_now)%f_RES(i_T_in_the_grp)=f_eh_RES diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 4bc159caf9..c0cab94766 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -115,18 +115,12 @@ subroutine K_components_folded_in_serial_arrays(iq) !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac BSS_eh_f_RES(H_pos)=BS_T_grp(i_g)%f_RES(i_Tr)*ares_fac + if (l_BS_photolum) BSS_PL_f(H_pos)=BS_T_grp(i_g)%f_PL(i_Tr) + ! if (allocated(BS_T_grp(i_g)%Z)) BSS_eh_Z(H_pos)=BS_T_grp(i_g)%Z(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%W)) BSS_eh_W(H_pos)=BS_T_grp(i_g)%W(i_Tr)*ares_fac - ! if (BS_perturbative_SOC) BSS_eh_E_SOC_corr(:,H_pos)=BS_T_grp(i_g)%E_SOC_corr(:,i_Tr)*ares_fac ! - if (l_BS_photolum) then - !write (*,*) 'i_res_ares_solver', i_res_ares_solver - write (*,*) 'f_PL', BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) - BSS_PL_f(H_pos)=BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) - if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) BSS_PL_f(H_pos+BS_K_dim(1))=BS_T_grp(i_g)%f_PL(i_Tr,2) - endif - ! if (l_BS_optics) BSS_dipoles_opt(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver) ! if (l_BS_magnons) BSS_dipoles_magn(:,H_pos)=BS_T_grp(i_g)%dipoles_mag(:,i_Tr,i_res_ares_solver) diff --git a/src/bse/K_inversion_engine.F b/src/bse/K_inversion_engine.F index ec31266864..3aae0428c7 100644 --- a/src/bse/K_inversion_engine.F +++ b/src/bse/K_inversion_engine.F @@ -145,7 +145,7 @@ subroutine PL_compose(i_L_) Vp(i_cv)=V(i_cv)*Lo(i_cv,iw,i_L_) enddo PL(iw,2)=PL(iw,2)+PL_prefactor*Vstar_dot_V(BS_H_dim,V,Vp) - enddo + enddo end subroutine ! subroutine EPS_compose(i_L_) diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 4013cf61ab..ccb96c124f 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -50,8 +50,8 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) type(PP_indexes) ::px logical ::compute_ares_explicitly integer ::i_l,i_c,i_K,i_lr,i_ll, ik - complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& -& R_over_R_x_A(2,BS_K_dim(1)),B(BSS_n_eig) + complex(SP) ::P_x_fZ(BS_H_dim,3),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A,& +& R_over_R_x_A(BS_K_dim(1)),B(BSS_n_eig) !Write to a file ! Parallel indexes ! @@ -66,7 +66,6 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) P_x_fZ =cZERO R_over_R_x_A =cZERO ! - ! ! Live-Timing ! call live_timing('PL residuals',px%n_of_elements(myid+1)) @@ -75,115 +74,57 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) write(*,*) "BSS_n_eig", BSS_n_eig !36 write(*,*) "BS_K_dim(1)", BS_K_dim(1) !36 write(*,*) "BS_K_dim(2)", BS_K_dim(2) !36 -! -! Hermitian residual -!==================== -! -! 1=> left -! 2=> right -! + ! + ! Hermitian residual + !==================== + ! + ! 1=> left + ! 2=> right + ! do i_c=1,BS_dip_size - do i_K=1,BS_K_dim(1) - !BSS_dipoles_PL= dipoles*PL_weights - P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) - enddo -enddo -do i_l=1,BSS_n_eig + do i_K=1,BS_K_dim(1) + P_x_fZ(i_K,i_c)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) + enddo + enddo + ! + do i_l=1,BSS_n_eig ! if (.not.px%element_1D(i_l)) cycle !parallelization ! ! R_over_R_x_A = R<_j/R_j A^r_ij ! do ik = 1, BS_K_dim(1) - R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f_RES(ik) !resonant R + R_over_R_x_A(1:BS_K_dim(1))) !resonant this is dipoles_PL*BS_mat*fermifactors= sum_k !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not !Al*R Date: Tue, 24 Jan 2023 16:43:26 +0100 Subject: [PATCH 0565/1367] Version 5.1.0, Revision 21839, Hash 562624f8d MODIFIED * include/driver/version.h bse/K_diago_driver.F bse/K_diago_response_functions.F bse/PL_diago_residual.F Changes: - [photoluminescemce] couplng does not give NaN anymore removed some write lines Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K_diago_driver.F | 2 - src/bse/K_diago_response_functions.F | 8 ++-- src/bse/PL_diago_residual.F | 67 ++++++++++++---------------- 4 files changed, 33 insertions(+), 48 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 39205c49f0..44c9c457b2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21876 -#define YAMBO_HASH "bff73e280" +#define YAMBO_REVISION 21877 +#define YAMBO_HASH "562624f8d" diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 09fd94b87c..6bbd6069ed 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -257,7 +257,6 @@ subroutine K_diago_driver(iq,W,X_static) if (l_BS_optics ) call K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_V_right,BS_R_right_kerr) if (l_BS_magnons) call K_diago_non_herm_magnons_residual(BS_R_left_magn,BS_R_right_magn,BS_V_left,BS_V_right,BS_overlap) - write (*,*) 'Shape BS_V_left', shape(BS_V_left) if (l_BS_photolum)call PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! else @@ -265,7 +264,6 @@ subroutine K_diago_driver(iq,W,X_static) if (l_BS_optics) call K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_mat,BS_R_right_kerr) if (l_BS_magnons) call K_diago_herm_magnons_residual(i_BS_mat,BS_R_left_magn,BS_R_right_magn) - write (*,*) 'Shape BS_mat', shape(BS_mat) if (l_BS_photolum)call PL_diago_herm_residual(BS_mat,BS_R_PL) ! endif diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 5c77b9d92b..57ccfd5749 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -161,12 +161,10 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif endif if(l_BS_photolum) then - !write (*,*) "BS_E(i1)", i1, BS_E(i1) - PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi - if (l_ADD_the_ARES_using_the_RES) then + PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi + if (l_ADD_the_ARES_using_the_RES) then PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi - endif - write (*,*) "PL2 here", PL(1:10,2) + endif endif ! enddo diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index ccb96c124f..bf14ce1871 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -51,7 +51,7 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) logical ::compute_ares_explicitly integer ::i_l,i_c,i_K,i_lr,i_ll, ik complex(SP) ::P_x_fZ(BS_H_dim,3),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A,& -& R_over_R_x_A(BS_K_dim(1)),B(BSS_n_eig) +& R_over_R_x_A(BS_K_dim(1)) !Write to a file ! Parallel indexes ! @@ -69,11 +69,6 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! Live-Timing ! call live_timing('PL residuals',px%n_of_elements(myid+1)) - write(*,*) "Hermitian run" - write(*,*) "BS_H_dim", BS_H_dim !36 - write(*,*) "BSS_n_eig", BSS_n_eig !36 - write(*,*) "BS_K_dim(1)", BS_K_dim(1) !36 - write(*,*) "BS_K_dim(2)", BS_K_dim(2) !36 ! ! Hermitian residual !==================== @@ -140,7 +135,7 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing - use BS, ONLY:BS_H_dim,BS_K_dim + use BS, ONLY:BS_H_dim,BS_K_dim,BS_dip_size use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f ! @@ -155,7 +150,7 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) type(PP_indexes) ::px integer ::i_l,i_c,i_K,i_lr,i_ll, ik complex(SP) ::P_x_fZ(BS_H_dim,3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& -& R_over_R_x_A(2,BS_H_dim),B(BS_H_dim) +& R_over_R_x_A(2,BS_H_dim),B_var(BS_H_dim) ! ! Parallel indexes ! @@ -170,28 +165,20 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) P_x_fZ =cZERO R_over_R_x_A =cZERO ! - call error(" PL implementation beyond TDA not finalized") - ! ! Live-Timing ! call live_timing('PL residuals',px%n_of_elements(myid+1)) - write(*,*) "Non-Hermitian run" - write(*,*) "BS_H_dim", BS_H_dim - write(*,*) "BSS_n_eig", BSS_n_eig - write(*,*) "BS_K_dim(1)", BS_K_dim(1) - write(*,*) "BS_K_dim(2)", BS_K_dim(2) - ! - ! 1=> left - ! 2=> right - ! - do i_c=1,3 - do i_K=1,BS_K_dim(1) - P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f_RES(i_K)) - P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f_RES(i_K)) - enddo - do i_K=BS_K_dim(1)+1,BS_H_dim - P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f_RES(i_K-BS_K_dim(1))) - P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f_RES(i_K-BS_K_dim(1))) + ! + ! 1=> left + ! 2=> right + ! + do i_c=1,BS_dip_size + do i_K=1,BS_H_dim + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) + ! Here there is a conjg becaus we are getting a -1 somewhere from + ! the occupation factors. This seems to fix it. Not sure it is the + ! proper solution + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K)*conjg(sqrt(cmplx(BSS_eh_f_RES(i_K)))) enddo enddo ! @@ -199,23 +186,24 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! if (.not.px%element_1D(i_lr)) cycle ! - ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i + ! B_i = \sum_ll Overlap^*(ll,lr) A^ll_i ! - B=cZERO + B_var=cZERO do i_ll=1,BS_H_dim - B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) + B_var(:)=B_var(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) enddo ! ! R_over_R_x_A = R<_j/R_j B^l_j ! - write (*,*) "shape(BSS_PL_f)", shape(BSS_PL_f) - R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f_RES(:) + do i_ll=1,BS_H_dim + R_over_R_x_A(1,i_ll) = BSS_PL_f(i_ll)*B_var(i_ll)/BSS_eh_f_RES(i_ll) + enddo ! ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j ! - adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) + adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B_var,R_over_R_x_A(1,:)) ! - do i_c=1,3 + do i_c=1,BS_dip_size ! ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i ! @@ -225,11 +213,11 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) ! + BS_R_PL(1,i_lr)=BS_R_PL(1,i_lr)+real(Pi_x_R_x_adA_left(i_c)*Pi_x_R_x_adA_right(i_c)) + ! enddo ! - BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& -& Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& -& Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) + BS_R_PL(1,i_lr)=BS_R_PL(1,i_lr)*adA_x_R_over_R_x_A(1) ! call live_timing(steps=1) ! @@ -239,7 +227,8 @@ subroutine PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) ! call PP_redux_wait(BS_R_PL) ! + BS_R_PL(2,:)=-BS_R_PL(1,:) + ! call PP_indexes_reset(px) ! - - end subroutine PL_diago_non_herm_residual +end subroutine PL_diago_non_herm_residual From 454516657c63d8e873a7eaf6fba6dd40136be7d3 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Wed, 25 Jan 2023 19:12:10 +0100 Subject: [PATCH 0566/1367] WIP: Add Boltzman f for Fulvio --- src/bse/K_Transition_check.F | 1 + src/bse/K_diago_driver.F | 6 +++--- src/bse/PL_diago_residual.F | 33 +++++++++++++++++++-------------- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 4 +++- src/modules/SET_defaults.F | 3 ++- src/modules/mod_functions.F | 14 ++++++++++++-- 7 files changed, 41 insertions(+), 22 deletions(-) diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 2b31c20508..8930148bc7 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -93,6 +93,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! if ( EQ_Transitions) f_eh_REF=f_eh_EQ if (.not.NEQ_Kernel ) f_eh =f_eh_EQ + ! NEQ_Residuals means we have in input ndb.RT_carriers if (.not.NEQ_Residuals ) f_eh_RES=f_eh_EQ ! endif diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 6bbd6069ed..ea7e52c007 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -213,8 +213,8 @@ subroutine K_diago_driver(iq,W,X_static) ! Diagonalization of the excitonic hamiltonian !============================================== if(l_diago) call live_timing('BSK diagonalize',1) - ! - if (K_is_not_hermitian) then + ! + if (K_is_not_hermitian) then !coupling ! if(l_diago) call LINEAR_ALGEBRA_driver(DIAGO,M=BS_mat,E_cmpl=BS_E,V_left=BS_V_left,V_right=BS_V_right) #if defined _SLEPC && !defined _NL @@ -223,7 +223,7 @@ subroutine K_diago_driver(iq,W,X_static) ! if (BSS_write_eig_2_db) BS_mat=BS_V_right ! - else + else !no coupling ! if(l_diago) call LINEAR_ALGEBRA_driver(DIAGO,M=BS_mat,E_real=BS_E_real) #if defined _SLEPC && !defined _NL diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index bf14ce1871..e118e5aca2 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -37,8 +37,10 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use BS, ONLY:BS_H_dim,BS_K_dim,BS_dip_size - use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig + use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig, BS_E use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f + use functions ONLY: boltzman_f + use RT_control, ONLY:NEQ_Residuals ! implicit none ! @@ -87,18 +89,22 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) if (.not.px%element_1D(i_l)) cycle !parallelization ! ! R_over_R_x_A = R<_j/R_j A^r_ij - ! - do ik = 1, BS_K_dim(1) - R_over_R_x_A(ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f_RES(ik) !resonant R - !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not - !Al*R + !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not + !Al*RE_small.and.abs(Boltz_Temp)>T_small) then + boltzman_f=exp(-Eb/Boltz_Temp) ! Normal case + elseif(abs(Eb)>E_small.and.abs(Boltz_Temp)<=T_small) then + boltzman_f=0._SP ! Case E>0 but T=0 + elseif(abs(Eb) Date: Thu, 26 Jan 2023 09:16:39 +0100 Subject: [PATCH 0567/1367] BUG fix --- src/modules/mod_D_lattice.F | 1 + src/modules/mod_functions.F | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/mod_D_lattice.F b/src/modules/mod_D_lattice.F index 24512f2bed..50333287b3 100644 --- a/src/modules/mod_D_lattice.F +++ b/src/modules/mod_D_lattice.F @@ -41,6 +41,7 @@ module D_lattice real(SP) :: T_elecs real(SP) :: T_holes real(SP) :: Bose_Temp + real(SP) :: Boltz_Temp real(SP) :: input_GS_Tel logical :: input_Tel_is_negative ! diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index 7a98763149..375b2cc826 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -212,7 +212,7 @@ pure function bose_decay(E) ! Boltzman function !---------------- ! - pure function boltzman_f(Eb) + function boltzman_f(Eb) ! use D_lattice, ONLY:Boltz_Temp use units, ONLY:HA2EV,HA2KEL From 45fa0fdeb01a867ee1d4f7990e3520ec7208edbd Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 26 Jan 2023 09:51:04 +0100 Subject: [PATCH 0568/1367] Remove writing statements and add a warning in PL diago residuals --- include/driver/version.h | 4 ++-- src/bse/K_Transitions_setup.F | 1 - src/bse/K_components_folded_in_serial_arrays.F | 5 ----- src/bse/PL_diago_residual.F | 12 ++++++++---- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 44c9c457b2..4a0642a066 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21877 -#define YAMBO_HASH "562624f8d" +#define YAMBO_REVISION 21878 +#define YAMBO_HASH "06da51f71" diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 7b2edb7b9a..b02077f5c0 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -262,7 +262,6 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! ! To be fixed if (l_BS_photolum) then - write (*,*), 'BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,i_res_ares)', f_eh_PL BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp) =f_eh_PL endif ! diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index c0cab94766..97a78e06a2 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -102,16 +102,11 @@ subroutine K_components_folded_in_serial_arrays(iq) do i_res_ares_solver=1,BS_n_eh_spaces_solver ! H_pos=sum(BS_T_grp(i_g_start:I_g-1)%size)+i_Tr+(max(i_res_ares_solver,i_res_ares)-1)*BS_K_dim(1) - write (*,*) 'BS_T_grp(i_g_start: I_g=1)%size', BS_T_grp(i_g_start:I_g-1)%size, i_g_start, I_g-1 - write (*,*) 'i_Tr i_res_ares_solver, i_res_ares', i_Tr, i_res_ares_solver, i_res_ares - write (*,*) 'H_pos',H_pos ares_fac=(-1)**(i_res_ares_solver-1) ! BSS_eh_table(H_pos,:)=(/i_k_bz,i_v,i_c,i_sp_c,i_sp_v/) - write (*,*) 'BSS_eh_table', BSS_eh_table(H_pos,:) ! BSS_eh_E(H_pos)=BS_T_grp(i_g)%E(i_Tr,1)*ares_fac - write (*,*) 'BSS_eh_E(H_pos)', BSS_eh_E(H_pos), ares_fac !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac BSS_eh_f_RES(H_pos)=BS_T_grp(i_g)%f_RES(i_Tr)*ares_fac diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index e118e5aca2..b628fcd255 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -39,8 +39,9 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) use BS, ONLY:BS_H_dim,BS_K_dim,BS_dip_size use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig, BS_E use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f - use functions ONLY: boltzman_f - use RT_control, ONLY:NEQ_Residuals + use functions, ONLY:boltzman_f + use RT_control, ONLY:NEQ_Residuals + use D_lattice, ONLY:Boltz_Temp ! implicit none ! @@ -90,6 +91,9 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! ! R_over_R_x_A = R<_j/R_j A^r_ij ! Here I create an If statement if I want to populate L lesser with electornic or excitonic populations + if (NEQ_Residuals .and. Boltz_Temp .gt. 0) then + call warning ('The user can specify either boltzmann or external residual occupations, not both') + endif if (NEQ_Residuals) then do ik = 1, BS_K_dim(1) R_over_R_x_A(ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f_RES(ik) !resonant R !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not !Al*R Date: Thu, 26 Jan 2023 11:23:42 +0100 Subject: [PATCH 0569/1367] Bug Fix --- include/driver/version.h | 4 ++-- src/bse/PL_diago_residual.F | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4a0642a066..302ff7a329 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21878 -#define YAMBO_HASH "06da51f71" +#define YAMBO_REVISION 21879 +#define YAMBO_HASH "45fa0fdeb" diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index b628fcd255..67be526ce9 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -79,6 +79,9 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! 1=> left ! 2=> right ! + if (NEQ_Residuals .and. Boltz_Temp .gt. 0) then + call warning ('The user can specify either boltzmann or external residual occupations, not both') + endif do i_c=1,BS_dip_size do i_K=1,BS_K_dim(1) P_x_fZ(i_K,i_c)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) @@ -91,11 +94,9 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! ! R_over_R_x_A = R<_j/R_j A^r_ij ! Here I create an If statement if I want to populate L lesser with electornic or excitonic populations - if (NEQ_Residuals .and. Boltz_Temp .gt. 0) then - call warning ('The user can specify either boltzmann or external residual occupations, not both') - endif if (NEQ_Residuals) then do ik = 1, BS_K_dim(1) + call msg('s','Running with NEQ Residuals') R_over_R_x_A(ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f_RES(ik) !resonant R !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not !Al*R Date: Thu, 26 Jan 2023 16:30:32 +0100 Subject: [PATCH 0570/1367] Version 5.1.0, Revision 21844, Hash aa436b9bb MODIFIED * include/driver/version.h bse/K_IP.F bse/K_Transition_check.F bse/K_Transitions_setup.F bse/K_components_folded_in_serial_arrays.F bse/K_diago_hermitian_residuals.F bse/K_diago_response_functions.F bse/K_driver_init.F bse/K_inversion_Lo.F bse/PL_diago_residual.F modules/mod_BS.F modules/mod_PHOTOLUM.F DELETED * bse/PL_diago_residual_old.F Bugs: - [yambo_pl] Restored dimension 2 for PL residuals. This way in the BSE only the residuals of the L< function are mixed when computing PL - [yambo_pl] When computing PL by default resonant part is chosen with DE>0 - [yambo] Added developer option to control how selection of resonant block is done, i.e. from DE>0 or from Df>0 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/bse/K_IP.F | 19 +- src/bse/K_Transition_check.F | 44 ++-- src/bse/K_Transitions_setup.F | 5 +- .../K_components_folded_in_serial_arrays.F | 6 +- src/bse/K_diago_hermitian_residuals.F | 5 +- src/bse/K_diago_response_functions.F | 2 +- src/bse/K_driver_init.F | 10 +- src/bse/K_inversion_Lo.F | 6 +- src/bse/PL_diago_residual.F | 81 ++++---- src/bse/PL_diago_residual_old.F | 193 ------------------ src/modules/mod_BS.F | 5 +- src/modules/mod_PHOTOLUM.F | 4 +- 13 files changed, 115 insertions(+), 269 deletions(-) delete mode 100644 src/bse/PL_diago_residual_old.F diff --git a/include/driver/version.h b/include/driver/version.h index 302ff7a329..c48e6b6a5f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21879 -#define YAMBO_HASH "45fa0fdeb" +#define YAMBO_REVISION 21880 +#define YAMBO_HASH "aa436b9bb" diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index ffdc5a8116..3e6530a44e 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -61,7 +61,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Work space ! integer ::iv,ic,i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR,i_dip - real(SP) ::f_eh,f_eh_PL,res_PL,ares_PL + real(SP) ::f_eh,f_eh_PL(2),res_PL(2) logical ::dip_v,dip_r complex(SP) ::drude_GreenF(W_bss%n_freqs),res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),& & para_term_w0,diam_term_used,Z_eh,E_eh @@ -201,14 +201,15 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Note that res_PL is always positive as f_eh_PL>0 ! - f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T) - res_PL=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 + f_eh_PL=BS_T_grp(i_T_g)%f_PL(i_T,:) + res_PL(1)=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 if(l_BS_trace) then do i_dip=2,BS_dip_size - res_PL=res_PL+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 + res_PL(1)=res_PL(1)+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 enddo endif - res_PL=res_PL*f_eh_PL*Z_eh*E_eh + res_PL(1)=res_PL(1)*f_eh_PL(1)*Z_eh*E_eh + res_PL(2)=res_PL(1)*f_eh_PL(2)*Z_eh*E_eh endif ! ! Dichroism @@ -292,13 +293,11 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_photolum) then ! - ! ( L< if w>0 This ensures that - ! I^PL = ( 1) we always select the "emission channel" - ! ( -L> if w<0 2) PL has the same symmetry properties + ! I^PL = L< ! - PL(:,3)=PL(:,3) + PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi + PL(:,3)=PL(:,3) + PL_prefactor*res_PL(1)*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - PL(:,3)=PL(:,3) - PL_prefactor*res_PL*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi + PL(:,3)=PL(:,3) + PL_prefactor*res_PL(2)*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi endif endif ! diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 8930148bc7..d64f496df9 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -28,7 +28,8 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& use X_m, ONLY:global_gauge use DIPOLES, ONLY:DIPOLE_t use electrons, ONLY:levels,n_sp_pol,filled_tresh,spin_occ - use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,l_BS_magnons,l_BS_photolum + use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,& + l_BS_magnons,l_BS_photolum,l_BS_res_from_E #if defined _RT use drivers, ONLY:l_rt_carriers_in_use use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,EQ_NoOcc @@ -39,7 +40,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& type(levels), intent(in) :: Ken type(DIPOLE_t), intent(in) :: Dip integer, intent(in) :: iq,ik,ikp,iv,ic,i_sp_c,i_res_ares - real(SP), intent(out):: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL + real(SP), intent(out):: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL(2) ! ! Work Space ! @@ -108,10 +109,15 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& endif ! ! f< = fc(1-fv) - if ( E_eh>=0._SP ) f_eh_PL = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ - ! -f> = -fv(1-fc) - ! Here we put a minus to mimic what happens in the retarded functions - if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ + f_eh_PL(1) = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ + ! f> = fv(1-fc) + f_eh_PL(2) = Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(iv,ikp,i_sp_c))/spin_occ/spin_occ + ! + !! f< = fc(1-fv) + !if ( E_eh>=0._SP ) f_eh_PL = Ken%f(ic,ikp,i_sp_c)*(spin_occ-Ken%f(iv,ik ,i_sp_v))/spin_occ/spin_occ + !! -f> = -fv(1-fc) + !! Here we put a minus to mimic what happens in the retarded functions + !if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ ! #if defined _RT if(EQ_NoOcc) then @@ -127,14 +133,26 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! A 0.001 % fractional occupation swiches on the particular treatment of finite temp. BSE if ( abs(abs(f_eh_REF)-1._SP)> filled_tresh ) BS_not_const_eh_f=.TRUE. ! - ! f_eh<0 transitions are included in the anti-resonant part - if ( f_eh_REF*(-1._SP)**(i_res_ares-1)< 0._SP ) K_Transition_check=.FALSE. + if (l_BS_res_from_E) then + ! + ! E_eh<0 transitions are included in the anti-resonant part + if ( E_eh*(-1._SP)**(i_res_ares-1)< 0._SP ) K_Transition_check=.FALSE. + ! + if ( E_eh==0._SP .and. f_eh_REF*(-1._SP)**(i_res_ares-1)<0._SP ) K_Transition_check=.FALSE. + ! + else + ! + ! f_eh<0 transitions are included in the anti-resonant part + if ( f_eh_REF*(-1._SP)**(i_res_ares-1)< 0._SP ) K_Transition_check=.FALSE. + ! + ! f_eh=0 transitions give no contribution to absorption at the IP level + ! and they do not mix with others neither since the kernel is weighted by f_eh + ! However they contribute to the JDOS. We need to take only the E>0 component, + ! since the E<0 component is then accounted for by the anti-resonant part + if ( f_eh_REF==0._SP .and. E_eh*(-1._SP)**(i_res_ares-1)<0._SP ) K_Transition_check=.FALSE. + ! + endif ! - ! f_eh=0 transitions give no contribution to absorption at the IP level - ! and they do not mix with others neither since the kernel is weighted by f_eh - ! However they contribute to the JDOS. We need to take only the E>0 component, - ! since the E<0 component is then accounted for by the anti-resonant part - if ( f_eh_REF==0._SP .and. E_eh*(-1._SP)**(i_res_ares-1)<0._SP ) K_Transition_check=.FALSE. ! f_eh_RES=0 transitions give issue in PL. Removed in this case if (l_BS_photolum .and. f_eh_RES==0._SP) K_Transition_check=.FALSE. ! diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index b02077f5c0..0c25a6b84f 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -78,7 +78,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! ! Work Space ! - real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL + real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL(2) logical :: l_trans_in_group,l_grp_to_grp integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2,isp1,isp2, & & i_T_now,i_T_group_now,i_T_group_last,i_T_group_start,i_g,n_loops,i_loop,i_T_in_the_grp,i_res_ares,& @@ -260,9 +260,8 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) endif end if ! - ! To be fixed if (l_BS_photolum) then - BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp) =f_eh_PL + BS_T_grp(i_T_group_now)%f_PL(i_T_in_the_grp,:) =f_eh_PL endif ! BS_T_grp(i_T_group_now)%f_RES(i_T_in_the_grp)=f_eh_RES diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 97a78e06a2..55053f7397 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -110,7 +110,11 @@ subroutine K_components_folded_in_serial_arrays(iq) !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac BSS_eh_f_RES(H_pos)=BS_T_grp(i_g)%f_RES(i_Tr)*ares_fac - if (l_BS_photolum) BSS_PL_f(H_pos)=BS_T_grp(i_g)%f_PL(i_Tr) + if (l_BS_photolum) then + BSS_PL_f(H_pos,i_res_ares_solver)=BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) + if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) & + & BSS_PL_f(H_pos,2)=BS_T_grp(i_g)%f_PL(i_Tr,2) + endif ! if (allocated(BS_T_grp(i_g)%Z)) BSS_eh_Z(H_pos)=BS_T_grp(i_g)%Z(i_Tr)*ares_fac if (allocated(BS_T_grp(i_g)%W)) BSS_eh_W(H_pos)=BS_T_grp(i_g)%W(i_Tr)*ares_fac diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F index 6bfc7f4613..fe8c87e48e 100644 --- a/src/bse/K_diago_hermitian_residuals.F +++ b/src/bse/K_diago_hermitian_residuals.F @@ -35,7 +35,8 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use X_m, ONLY:global_gauge - use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f_RES,BS_mat,BSS_n_eig + use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f_RES,& + BS_mat,BSS_n_eig,l_BS_res_from_E use BS, ONLY:BS_K_dim ! implicit none @@ -50,6 +51,8 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) integer ::i_lambda,i_range(2) complex(SP) ::tmp_res(BS_K_dim(i_BS_mat)) ! + if (l_BS_res_from_E) call error(" Not coded, since sqrt of BSS_eh_f takes a conjg and it should not") + ! call PP_indexes_reset(px) call PARALLEL_index(px,(/BSS_n_eig/)) ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 57ccfd5749..fdf874dd74 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -161,7 +161,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif endif if(l_BS_photolum) then - PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi + PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi if (l_ADD_the_ARES_using_the_RES) then PL(:,2)=PL(:,2)+PL_prefactor*BS_R_PL(2,i1)*aimag(-1._SP/(W%p(:)+conjg(EXC_E(i_pert_SOC))))/pi endif diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 80c722b066..1848cb7f41 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -33,7 +33,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use BS, ONLY:BSE_L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& & BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& -& BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant +& BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant,l_BS_res_from_E use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr use drivers, ONLY:l_col_cut,l_rpa_IP,l_alda_fxc,l_bs_fxc use D_lattice, ONLY:l_0D,i_time_rev,i_space_inv,l_1D,l_2D @@ -84,8 +84,14 @@ subroutine K_driver_init(what,iq,Ken,Xk) call parser('ImposeAsym',l_flag) if (l_flag) l_BS_ares_from_res=.FALSE. ! + ! Developer options. Without the code works in default mode + ! With the user can switch to experimental coding + call parser('SelectResFromE',l_BS_res_from_E) + if (l_BS_photolum) l_BS_res_from_E=.TRUE. + call parser('SelectResFromF',l_flag) + if (l_flag) l_BS_res_from_E=.FALSE. + ! if (iq/=1.and.i_time_rev==0.and.i_space_inv==0 ) l_BS_ares_from_res=.FALSE. -! if (l_BS_photolum) l_BS_ares_from_res=.FALSE. Line removed after discussion 14/12/22 RR,PM,DS if (l_BS_magnons.and.n_sp_pol==2) l_BS_ares_from_res=.FALSE. ! The next line is to switch of section of the codes due to the calculation ! of the ARES part without checking the BSE_mode (see io_BS_PAR_init for example) diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index 814cf0ae5b..ce5e2c14fa 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -169,7 +169,7 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) if (BS_K_anti_resonant) then call X_GreenF_analytical(iq,transition,W,E,k,SF(:,2),"Ra","eh",.TRUE.,.FALSE.) endif - Lo(i_Lo_trans,:,i_Lo)=BSS_PL_f(i_res)/BSS_eh_f(i_res)**2*aimag(W%p(1))/pi + Lo(i_Lo_trans,:,i_Lo)=BSS_PL_f(i_res,i_Lo)/BSS_eh_f(i_res)**2*aimag(W%p(1))/pi endif ! else @@ -199,9 +199,9 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) ! if (l_BS_photolum.and.i_loop==1) then residual=dot_product(BSS_dipoles_PL(:,i_res),BSS_dipoles_PL(:,i_res)) - PL(:,i_eps)=PL(:,i_eps)-PL_prefactor*residual*aimag(SF(:,1))/pi*BSS_PL_f(i_res) + PL(:,i_eps)=PL(:,i_eps)-PL_prefactor*residual*aimag(SF(:,1))/pi*BSS_PL_f(i_res,1) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - PL(:,i_eps)=PL(:,i_eps)+PL_prefactor*residual*aimag(SF(:,2))/pi*BSS_PL_f(i_cpl) + PL(:,i_eps)=PL(:,i_eps)-PL_prefactor*residual*aimag(SF(:,2))/pi*BSS_PL_f(i_cpl,2) endif endif ! diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 67be526ce9..b62f7f500c 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -32,10 +32,12 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! BS_R_left(i) = conjg( BS_R_right(i) ) ! use pars, ONLY:SP,rZERO,cZERO,cI + use wrapper, ONLY:V_dot_V use wrapper_omp, ONLY:V_dot_V_omp,Vstar_dot_V_omp use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing + use com, ONLY:msg use BS, ONLY:BS_H_dim,BS_K_dim,BS_dip_size use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig, BS_E use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f @@ -53,8 +55,8 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) type(PP_indexes) ::px logical ::compute_ares_explicitly integer ::i_l,i_c,i_K,i_lr,i_ll, ik - complex(SP) ::P_x_fZ(BS_H_dim,3),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A,& -& R_over_R_x_A(BS_K_dim(1)) + complex(SP) ::P_x_fZ(BS_K_dim(1),3,2),Pi_x_R_x_adA_left(3),Pi_x_R_x_adA_right(3),adA_x_R_over_R_x_A(2),& +& R_over_R_x_A(BS_K_dim(1),2) !Write to a file ! Parallel indexes ! @@ -79,52 +81,61 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! 1=> left ! 2=> right ! - if (NEQ_Residuals .and. Boltz_Temp .gt. 0) then - call warning ('The user can specify either boltzmann or external residual occupations, not both') - endif + if (NEQ_Residuals .and. (Boltz_Temp .gt. 0) ) then + call error('The user can specify either boltzmann or external residual occupations, not both') + endif + ! + if (NEQ_Residuals) call msg('s','Running with NEQ Residuals') + if (Boltz_Temp .gt. 0) call msg('s','Running with Boltz excitonic occupations') + ! do i_c=1,BS_dip_size do i_K=1,BS_K_dim(1) - P_x_fZ(i_K,i_c)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) + P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) + P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(cmplx(BSS_eh_f_RES(i_K))) !Pi^* left sqrt(R) enddo enddo ! do i_l=1,BSS_n_eig ! if (.not.px%element_1D(i_l)) cycle !parallelization + ! + do i_c=1,BS_dip_size + !dim(P_x_fz) = BS_H_dim + ! we have a problem in this multiplication + Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_K_dim(1),P_x_fZ(:,i_c,2), BS_mat(:,i_l) ) !resonan Pi^* Ar*sqrt(R) + Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_K_dim(1),P_x_fZ(:,i_c,1),conjg(BS_mat(:,i_l))) !resonan Pi^* Ar*sqrt(R) + ! Pi_x_R_x_adA_left = Pi sqrt(R) dipoles_PL*BS_mat/R + enddo + ! + !Check dimensions for these vectors to be consistent that we have only resonant and antiresonant + BS_R_PL(:,i_l)=real(V_dot_V(BS_dip_size,Pi_x_R_x_adA_left,Pi_x_R_x_adA_right)) ! ! R_over_R_x_A = R<_j/R_j A^r_ij ! Here I create an If statement if I want to populate L lesser with electornic or excitonic populations if (NEQ_Residuals) then - do ik = 1, BS_K_dim(1) - call msg('s','Running with NEQ Residuals') - R_over_R_x_A(ik) = BSS_PL_f(ik)*BS_mat(ik,i_l)/BSS_eh_f_RES(ik) !resonant R - !antiresonant, no error if two arrays have different dimensions, We don't know if it's conjg or not - !Al*R left - ! 2=> right - ! - do i_c=1,3 - do i_K=1,BS_K_dim(1) - P_x_fZ(i_K,i_c,1)=conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K)) - P_x_fZ(i_K,i_c,2)= BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K)) - enddo - do i_K=BS_K_dim(1)+1,BS_H_dim - P_x_fZ(i_K,i_c,1)=cI*conjg(BSS_dipoles_PL(i_c,i_K))*sqrt(BSS_eh_f(i_K-BS_K_dim(1))) - P_x_fZ(i_K,i_c,2)=cI* BSS_dipoles_PL(i_c,i_K) *sqrt(BSS_eh_f(i_K-BS_K_dim(1))) - enddo - enddo - ! - do i_lr=1,BS_H_dim - ! - if (.not.px%element_1D(i_lr)) cycle - ! - ! B_i = \sum_lp Overlap^*(lp,l) A^ll_i - ! - B=cZERO - do i_ll=1,BS_H_dim - B(:)=B(:)+conjg(BS_overlap(i_ll,i_lr))*BS_V_left(:,i_ll) - enddo - ! - ! R_over_R_x_A = R<_j/R_j B^l_j - ! - R_over_R_x_A(1,:) = BSS_PL_f(:)*B(:)/BSS_eh_f(:) - ! - ! adA_x_R_over_R_x_A = B^l*_j R<_j/R_j B^l_j - ! - adA_x_R_over_R_x_A(1)=Vstar_dot_V_omp(BS_H_dim,B,R_over_R_x_A(1,:)) - ! - do i_c=1,3 - ! - ! Pi_x_R_x_adA_left = sqrt(R) Pi_i* A^lr_i - ! - Pi_x_R_x_adA_left(i_c) =V_dot_V_omp(BS_H_dim,P_x_fZ(:,i_c,1),BS_V_right(:,i_lr)) - ! - ! Pi_x_R_x_adA_right= A^lr*_i Pi_i sqrt(R) - ! - Pi_x_R_x_adA_right(i_c)=Vstar_dot_V_omp(BS_H_dim,BS_V_right(:,i_lr),P_x_fZ(:,i_c,2)) - ! - enddo - ! - BS_R_PL(1,i_lr)=real((Pi_x_R_x_adA_left(1)*Pi_x_R_x_adA_right(1)+& -& Pi_x_R_x_adA_left(2)*Pi_x_R_x_adA_right(2)+& -& Pi_x_R_x_adA_left(3)*Pi_x_R_x_adA_right(3))*adA_x_R_over_R_x_A(1)) - ! - call live_timing(steps=1) - ! - enddo - ! - else - ! - ! Hermitian residual - !==================== - ! - do i_c=1,3 - P_x_fZ(:,i_c,1)=BSS_dipoles_PL(i_c,:)*sqrt(BSS_eh_f(:)) - enddo - ! - write(*,*) 'BS_K_dim(1)', BS_K_dim(1) - write(*,*) 'shape(BSS_eh_f)', shape(BSS_eh_f) - write(*,*) 'shape(BS_V_right)', shape(BS_V_right) - write(*,*) 'shape(BSS_PL_f)', shape(BSS_PL_f) - write(*,*) 'BS_H_dim', BS_H_dim - ! - do i_l=1,2!BS_K_dim(1) - ! - if (.not.px%element_1D(i_l)) cycle - ! - ! R_over_R_x_A = R<_j/R_j A^l_j - ! - !if (i_l == 1) write(*,*) 'BSS_PL_f', dot_product(BSS_PL_f(1:BS_K_dim(1)),BSS_PL_f(1:BS_K_dim(1))) - !if (i_l == 1) write(*,*) 'BS_V_right', dot_product(BS_V_right(1:BS_K_dim(1),1),BS_V_right(1:BS_K_dim(1),1)) - !if (i_l == 1) write(*,*) 'BSS_eh_f', dot_product(BSS_eh_f(1:BS_K_dim(1)),BSS_eh_f(1:BS_K_dim(1))) - ! - do ik=1,BS_K_dim(1) - R_over_R_x_A(1,ik) = BSS_PL_f(ik)*BS_V_right(ik,i_l)/BSS_eh_f(ik) - write(*,*) ik, R_over_R_x_A(1,ik), BSS_PL_f(ik),BS_V_right(ik,i_l),BSS_eh_f(ik) - enddo -! R_over_R_x_A(1,1:BS_K_dim(1)) = BSS_PL_f(1:BS_K_dim(1))*BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) - R_over_R_x_A(2,1:BS_H_dim) = BSS_PL_f(1:BS_K_dim(1))*BS_V_right(1:BS_K_dim(1),i_l)/BSS_eh_f(1:BS_K_dim(1)) - ! - if (i_l == 1) write(*,*) 'R_over_R_x_A(1,1)', R_over_R_x_A(1,1) - ! adA_x_R_over_R_x_A = (A^l_j)* R<_j/R_j A^l_j - ! - adA_x_R_over_R_x_A(1)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)),R_over_R_x_A(1,1:BS_H_dim)) - adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_V_right(1:BS_K_dim(1),i_l)),R_over_R_x_A(2,BS_H_dim:)) - ! - do i_c=1,3 - ! - ! Pi_x_R_x_adA_right = Pi sqrt(R) A^l_i - ! - Pi_x_R_x_adA_right(i_c)=V_dot_V_omp(BS_H_dim,BS_V_right(:,i_l),P_x_fZ(:,i_c,1)) - ! - enddo - ! - ! Note that the 2nd component (anti-resonant) should take a -1 from BSS_eh_f and a i^2 from sqrt(R) - ! that cancel out. - ! - BS_R_PL(:,i_l)=dot_product(Pi_x_R_x_adA_right,Pi_x_R_x_adA_right)*adA_x_R_over_R_x_A(:) - ! - if (i_l == 1) write(*,*) BS_R_PL(:,i_l) - call live_timing(steps=1) - ! - enddo - ! - endif - ! - call live_timing() - ! - call PP_redux_wait(BS_R_PL) - ! - call PP_indexes_reset(px) - ! -end subroutine PL_diago_residual diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 598141c39a..1d661f0846 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -136,6 +136,7 @@ module BS ! |_l_BS_ares_from_res=.FALSE. 2 2 ! logical :: l_BS_ares_from_res=.TRUE. + logical :: l_BS_res_from_E integer :: BS_res_ares_n_mat=1 integer :: BS_n_eh_spaces=1 ! @@ -189,7 +190,7 @@ module BS real(SP) , allocatable :: E(:,:) ! (/ i_Tr; maxval(Xk%FGbz%N_mapped('kpts_in_T_gr')) /) real(SP) , allocatable :: f(:) real(SP) , allocatable :: f_RES(:) - real(SP) , allocatable :: f_PL(:) ! (/ i_Tr /) + real(SP) , allocatable :: f_PL(:,:) ! (/ i_Tr ; 2 /) This is always of size 2 since fv(1-fc) and fc(1-fv) are independent real(SP) , allocatable :: W(:) real(SP) , allocatable :: E_SOC_corr(:,:) ! (/2/n_sp_pol; i_Tr /) complex(SP), allocatable :: Z(:) @@ -365,7 +366,7 @@ subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) YAMBO_ALLOC(BS_T_grp(iT)%E,(nT,dom_k_T_group)) YAMBO_ALLOC(BS_T_grp(iT)%f,(nT)) YAMBO_ALLOC(BS_T_grp(iT)%f_RES,(nT)) - YAMBO_ALLOC(BS_T_grp(iT)%f_PL,(nT)) + YAMBO_ALLOC(BS_T_grp(iT)%f_PL,(nT,2)) if (allocated(E%Z)) then YAMBO_ALLOC(BS_T_grp(iT)%Z,(nT)) endif diff --git a/src/modules/mod_PHOTOLUM.F b/src/modules/mod_PHOTOLUM.F index 4faec49900..d4dada2cf5 100644 --- a/src/modules/mod_PHOTOLUM.F +++ b/src/modules/mod_PHOTOLUM.F @@ -40,7 +40,7 @@ module PHOTOLUM ! BS dipoles ! complex(SP), allocatable :: BSS_dipoles_PL(:,:) - complex(SP), allocatable :: BSS_PL_f(:) + complex(SP), allocatable :: BSS_PL_f(:,:) ! contains ! @@ -62,7 +62,7 @@ subroutine BSS_PL_alloc( ) if (.not.l_BS_photolum) return YAMBO_ALLOC(BSS_dipoles_PL,(BS_dip_size,BS_H_dim)) BSS_dipoles_PL = cZERO - YAMBO_ALLOC(BSS_PL_f,(BS_H_dim)) + YAMBO_ALLOC(BSS_PL_f,(BS_H_dim,2)) BSS_PL_f = rZERO end subroutine ! From 1a5315971e7c7327a574ba5436a2adca79619f8b Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 26 Jan 2023 16:42:06 +0100 Subject: [PATCH 0571/1367] Bug Fix compilation; --- include/driver/version.h | 4 ++-- src/bse/K_diago_hermitian_residuals.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c48e6b6a5f..6ed71808ed 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21880 -#define YAMBO_HASH "aa436b9bb" +#define YAMBO_REVISION 21881 +#define YAMBO_HASH "1867cc277" diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F index fe8c87e48e..8273cfe311 100644 --- a/src/bse/K_diago_hermitian_residuals.F +++ b/src/bse/K_diago_hermitian_residuals.F @@ -36,8 +36,8 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) use LIVE_t, ONLY:live_timing use X_m, ONLY:global_gauge use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f_RES,& - BS_mat,BSS_n_eig,l_BS_res_from_E - use BS, ONLY:BS_K_dim + BS_mat,BSS_n_eig + use BS, ONLY:BS_K_dim, l_BS_res_from_E ! implicit none ! From a5ddaac410110865aec3daa24f93b8b64de9d7c6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 27 Jan 2023 16:27:40 +0100 Subject: [PATCH 0572/1367] Version 5.1.0, Revision 22143, Hash 41cf94b6a MODIFIED * include/driver/version.h exc-ph/EXCPH_ave_sat_DbGrid.F interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F modules/mod_EXCPH.F Bugs: - Additions: -Added new cutoff for the replica Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_ave_sat_DbGrid.F | 6 +++--- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 4 +++- src/modules/SET_defaults.F | 8 +++++--- src/modules/mod_EXCPH.F | 1 + 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0fd698f882..0716a4580a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22141 -#define YAMBO_HASH "3125831bf" +#define YAMBO_REVISION 22143 +#define YAMBO_HASH "41cf94b6a" diff --git a/src/exc-ph/EXCPH_ave_sat_DbGrid.F b/src/exc-ph/EXCPH_ave_sat_DbGrid.F index f4a1d366ac..4c8151d6af 100644 --- a/src/exc-ph/EXCPH_ave_sat_DbGrid.F +++ b/src/exc-ph/EXCPH_ave_sat_DbGrid.F @@ -27,7 +27,7 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) use pars, ONLY:SP,cZERO,rZERO,cI use R_lattice, ONLY:bz_samp use ELPH, ONLY:elph_branches,FAN_deltaE_treshold,Q_io_map,PH_freqs,PH_freqs_sq - use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & + use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs,EXCPH_deltaE_treshold, & & BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,L_damping,EXC_E_DbGd ! #include @@ -81,12 +81,12 @@ subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! E_beta =EXC_E_DbGd(i_beta,iq_fg) ! - if(abs(E_beta-E_alpha+ph_E)>FAN_deltaE_treshold) then + if(abs(E_beta-E_alpha+ph_E)>EXCPH_deltaE_treshold) then W_DG =W_DG + 1._SP/(E_beta-E_alpha+ph_E+cI*L_damping) weight_dbgd =weight_dbgd+1._SP endif ! - if(abs(E_beta-E_alpha-ph_E)>FAN_deltaE_treshold) then + if(abs(E_beta-E_alpha-ph_E)>EXCPH_deltaE_treshold) then W_DG_PH_abs =W_DG_PH_abs + 1._SP/(E_beta-E_alpha-ph_E+cI*L_damping) weight_dbgd_PH_abs =weight_dbgd_PH_abs+1._SP endif diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 6e0d309aee..42080d312b 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -458,7 +458,7 @@ subroutine INIT_activate() if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') if (l_EXCPH_optics) then call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') - call initactivate(1,'DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + call initactivate(1,'EXCPHdEtresh DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') endif ! #endif diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 27878109c5..18735da5f1 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -108,7 +108,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,EXCPH_kind_name,alphaQ + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,EXCPH_kind_name,alphaQ, & +& EXCPH_deltaE_treshold use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP @@ -678,6 +679,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point') call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) + call it(defs,'EXCPHdEtresh','[ELPH] Energy treshold for exc-ph denominator',EXCPH_deltaE_treshold,unit=E_unit) ! ! GPL_EXCLUDE_START ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index d63e803caf..f2d212c6b8 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -83,7 +83,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name,alphaQ + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name,alphaQ, & +& EXCPH_deltaE_treshold #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -528,8 +529,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) elph_Ham_bands=0 elph_Ham_ik=1 RES_tresh=0.01_SP - DW_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff on electronic energy differences - FAN_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff on phonon energies + DW_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff on electronic energy differences + FAN_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff on phonon energies use_PH_DbGd=.FALSE. EkplusQ_mode='interp' ! E(k+q) energies (interp | dftp ) gkkp_db='gkkp' ! gkkp_db ( gkkp | gkkp_expanded | genFroh ) @@ -542,6 +543,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) EXCPH_kind_name='PALEARI' EXCPH_sum=(/1,1/) L_damping=0.0005/HA2EV ! set to 0.5 meV + EXCPH_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff for denominator in the exc-ph spectra EXC_q0=(/0.0,0.0,0.0/) alphaQ=rZERO ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 8a25501580..59c0dfcd54 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -86,6 +86,7 @@ module EXCPH complex(SP), allocatable :: EXCPH_Sigma_c_diag(:,:) complex(SP), allocatable :: EXCPH_Sigma_c(:,:,:) real(SP) :: L_damping + real(SP) :: EXCPH_deltaE_treshold ! ! Minimum excitonic energy ! From e87351a5317fb7824ada211526ea8a7cf22faace Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 27 Jan 2023 17:07:39 +0100 Subject: [PATCH 0573/1367] Version 5.1.0, Revision 21898, Hash 0e9a2b3fe MODIFIED * include/driver/version.h modules/mod_fields.F Changes: - [yambo_rt] Fixed phase shift of fields Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/modules/mod_fields.F | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 57f10c5328..1648e88cb3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21889 -#define YAMBO_HASH "344acc0a9" +#define YAMBO_REVISION 21898 +#define YAMBO_HASH "0e9a2b3fe" diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 375131ab75..181c951e44 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -241,12 +241,12 @@ function small_a(T,E_field,order,envelop_only) fr_shift(1)=0._SP fr_shift(2)=pi/2._SP do i1=1,n_fields_defs_max - if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi ! 90 deg - if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 60 deg - if( trim(field_defs(i1))=="PHPI45") fr_shift(:)=fr_shift(:)+pi/2._SP ! 45 deg - if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/3._SP ! 30 deg - if( trim(field_defs(i1))=="PHPI15") fr_shift(:)=fr_shift(:)+pi/6._SP ! 15 deg - if( trim(field_defs(i1))=="PHPI10") fr_shift(:)=fr_shift(:)+pi/9._SP ! 10 deg + if( trim(field_defs(i1))=="PHPI180") fr_shift(:)=fr_shift(:)+pi ! 180 deg + if( trim(field_defs(i1))=="PHPI120") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 120 deg + if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi/2._SP ! 90 deg + if( trim(field_defs(i1))=="PHPI60") fr_shift(:)=fr_shift(:)+pi/3._SP ! 60 deg + if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/6._SP ! 30 deg + if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi/9._SP ! 20 deg if( trim(field_defs(i1))=="PHMULT" .and. n_freqs>1) l_multi_phase=.true. enddo ! From ad00c1791bb5b208c2ef25fc4d5dec06256d6d57 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 31 Jan 2023 15:19:54 +0100 Subject: [PATCH 0574/1367] Version 5.1.0, Revision 21902, Hash 952bd5c MODIFIED * src/real_time_drivers/RT_driver.F NEW * Bugs: - [yambo_rt] Fixed issue with definition of steps for live_timing in "pump free" region Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/real_time_drivers/RT_driver.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6d889fc879..2bdc0bfb2d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21899 -#define YAMBO_HASH "2c3ac86" +#define YAMBO_REVISION 21902 +#define YAMBO_HASH "952bd5c" diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index 3bb55f4d2e..52c0b93838 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -349,7 +349,7 @@ subroutine CLOSE_and_clean( ) ! subroutine RT_timing(steps) ! - integer :: steps + integer, intent(in) :: steps ! if (steps==0) then ! @@ -373,7 +373,7 @@ subroutine RT_timing(steps) if (NE_i_time>LT_pump_steps+1.and.LT_pump) then LT_pump=.FALSE. call live_timing( ) - call live_timing('[RT] Dynamics (pump-free region) ',NE_steps-LT_pump_steps-NE_i_start_time+1,DEPTH=0.01_SP) + call live_timing('[RT] Dynamics (pump-free region) ',NE_steps-max(LT_pump_steps,NE_i_start_time)+1,DEPTH=0.01_SP) endif call live_timing(steps=steps) ! From 31c45937e8f450a31c6b5afbed25a355e0972cf4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 2 Feb 2023 16:56:46 +0100 Subject: [PATCH 0575/1367] Version 5.1.0, Revision 22144, Hash a5ddaac41 MODIFIED * include/driver/version.h exc-ph/EXCPH_eval_sat.F Bugs: -Fixed Energy cutoff in the satellites Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_eval_sat.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 0716a4580a..795025eeeb 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22143 -#define YAMBO_HASH "41cf94b6a" +#define YAMBO_REVISION 22144 +#define YAMBO_HASH "a5ddaac41" diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index a4ced0d6c6..8d644cf874 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -30,7 +30,7 @@ subroutine EXCPH_eval_sat(iq_bz,q) use ELPH, ONLY:elph_branches,PH_freqs_sq,FAN_deltaE_treshold,Q_io_map use EXCPH, ONLY:BS_Sat_E,BS_Sat_E_PH_abs,BS_Sat_WEIGHT,BS_Sat_WEIGHT_PH_abs, & & BS_all_E,BS_E_in,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,DB_Q_map, & -& l_no_matrix_elements +& l_no_matrix_elements,EXCPH_deltaE_treshold ! #include ! @@ -67,10 +67,10 @@ subroutine EXCPH_eval_sat(iq_bz,q) EXCPH_gaux=EXCPH_Gkkp_sq(il,i_beta,i_alpha) if(l_no_matrix_elements) EXCPH_gaux=1._SP ! - if(abs(BS_Sat_E(il,i_beta,i_alpha))>FAN_deltaE_treshold) & + if(abs(BS_Sat_E(il,i_beta,i_alpha))>EXCPH_deltaE_treshold) & & BS_Sat_WEIGHT(il,i_beta,i_alpha) =EXCPH_gaux/abs(BS_Sat_E(il,i_beta,i_alpha))**2 ! - if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>FAN_deltaE_treshold) & + if(abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))>EXCPH_deltaE_treshold) & & BS_Sat_WEIGHT_PH_abs(il,i_beta,i_alpha)=EXCPH_gaux/abs(BS_Sat_E_PH_abs(il,i_beta,i_alpha))**2 ! enddo From 1fa0fdea44dbc99658d04f726a34f4f8db3ca502 Mon Sep 17 00:00:00 2001 From: palful Date: Fri, 10 Feb 2023 10:29:42 +0100 Subject: [PATCH 0576/1367] Started adding ExtendOutput to lifetimes --- src/exc-ph/EXCPH_gkkp_driver.F | 2 +- src/exc-ph/EXCPH_lifetime.F | 29 ++++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 52753b512f..914b28621e 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -231,7 +231,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! I/O !===== call io_control(ACTION=WR_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,"all") + io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,"all") ! enddo ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 94bbe0d7c7..8ff1879c21 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -55,11 +55,13 @@ subroutine EXCPH_lifetime(k,q,X) integer :: iq,iq_s,iq_bz,i_alpha,j_alpha,i_beta,il,i_star,iq_db,igrp integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp - logical :: l_keep_deg + logical :: l_keep_deg,l_extend_output real(SP) :: ExcPhM,EXC_life_average + real(SP) , allocatable :: EXC_life_of_q(:,:) ! call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) + call parser('ExtendOutput', l_extend_output) ! call section('*','EXCPH-LifTime') ! @@ -75,6 +77,10 @@ subroutine EXCPH_lifetime(k,q,X) ! Allocations ! call RESIDUALS_and_EIGENVALUES_alloc(q) + if (l_extend_output) then + allocate(EXC_life_of_q(EXCPH_states(1):EXCPH_states(2),q%nbz)) + EXC_life_of_q=rZERO + endif ! ! Load excitonic energies ! @@ -143,8 +149,14 @@ subroutine EXCPH_lifetime(k,q,X) ! if(use_PH_DbGd) then EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*DbGrid_pole() + if (l_extend_output) then + EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*DbGrid_pole() + endif else EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() + if (l_extend_output) then + EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Simple_pole() + endif ! DS Debug < ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) ! DS Debug > @@ -172,15 +184,21 @@ subroutine EXCPH_lifetime(k,q,X) enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) + if (l_extend_output) EXC_life_of_q=EXC_life_of_q*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! call print_and_write() + ! Here I need to create a netCDF database... che palle + !if (l_extend_output) call extended_print_and_write() ! ! Deallocations ! YAMBO_FREE(EXC_LifeTime) call RESIDUALS_and_EIGENVALUES_free() + if (l_extend_output) then + deallocate(EXC_life_of_q) + endif ! contains ! @@ -208,10 +226,11 @@ function Simple_pole() ! ! Remove degenerate states E(alpha,iq_in)=E(beta,iq_in) [currently iq_in=1] ! - ! if(iq_db==1.and.abs(E_alpha-E_beta) Date: Mon, 13 Feb 2023 12:39:31 +0100 Subject: [PATCH 0577/1367] Added option to print q-resolved lifetimes --- src/exc-ph/EXCPH_lifetime.F | 79 ++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 8ff1879c21..8ede5515eb 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -189,7 +189,7 @@ subroutine EXCPH_lifetime(k,q,X) ! Print output and write on file ! call print_and_write() - ! Here I need to create a netCDF database... che palle + ! Here I need to create some specialised output... check those for exciton interpolation !if (l_extend_output) call extended_print_and_write() ! ! Deallocations @@ -345,4 +345,81 @@ subroutine print_and_write() ! end subroutine ! + subroutine print_LifeTimes_of_q() + ! print q-map of lifetimes for each exc_in state for q-space plot + ! + use vec_operate, ONLY:iku_v_norm + use com, ONLY:of_open_close + use YPPm, ONLY:K_transform + ! + implicit none + ! + character(schlen), allocatable :: headings(:) + character(schlen) :: file_name + real(SP), allocatable :: values(:) + real(SP) :: tmp_q(3) + ! + allocate(headings(n_exc_in+4)) + YAMBO_ALLOC(values,(n_exc_in+4)) + ! + headings(1)=" |q| (a.u.) " + do i_alpha=EXCPH_states(1),EXCPH_states(2) + headings(i_alpha+1)=' e'//intc(i_alpha) + enddo + headings(n_exc_in+2:n_exc_in+4)=& +& (/"q_x (rlu)","q_y (rlu)","q_z (rlu)"/) + ! + file_name="LifeTimes_of_q" + call of_open_close(trim(file_name),'ot') + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + call msg('o '//trim(file_name),"#") + ! + do iq=1,q%nbz + ! + if (iq>1) values(1)=iku_v_norm(q%pt(iq,:3)) + ! + tmp_q = q%pt(iq,:3) + ! + call K_transform(tmp_q,'iku') + values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq)**HA2EV*1000._SP + values(n_exc_in+2:n_exc_in+4)=tmp_q + call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) + enddo + call of_open_close(trim(file_name)) + ! + end subroutine print_LifeTimes_of_q + ! +! subroutine print_LifeTime_resonances() +! ! Print resonance energies E_in - E_out(q) \pm E_ph(q) for +! ! each exc_in state for 2D plot +! implicit none +! ! +! headings(1)=" |q| (a.u.) " +! do i_c=1,EXCITONS_n_user_states +! i_l=EXCITONS_user_indexes(i_c) +! headings(i_c+1)=' e'//intc(i_l) +! enddo +! headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& +! & (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) +! ! +! file_name="excitons_interpolated_IBZ" +! call of_open_close(trim(file_name),'ot') +! call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) +! call msg('o '//trim(file_name),"#") +! ! +! do iq=1,GRID_q%nibz +! ! +! if (iq>1) values(1)=iku_v_norm(GRID_q%pt(iq,:3)) +! ! +! tmp_q = GRID_q%pt(iq,:3) +! ! +! call K_transform(tmp_q,'iku') +! values(1+1:EXCITONS_n_user_states+1)=BSE_interp_E(:,iq)*HA2EV +! values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q +! call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) +! enddo +! call of_open_close(trim(file_name)) +! ! +! end subroutine print_LifeTime_resonances + ! end subroutine From b51d5f5e2d2e70651054c99f85f23fdd8612eb98 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Mon, 13 Feb 2023 12:54:21 +0100 Subject: [PATCH 0578/1367] some fixes --- src/exc-ph/EXCPH_lifetime.F | 9 ++++++--- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 8ede5515eb..7618b6955e 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -190,7 +190,10 @@ subroutine EXCPH_lifetime(k,q,X) ! call print_and_write() ! Here I need to create some specialised output... check those for exciton interpolation - !if (l_extend_output) call extended_print_and_write() + if (l_extend_output) then + call print_LifeTimes_of_q() + !call print_LifeTime_resonances() + endif ! ! Deallocations ! @@ -350,7 +353,7 @@ subroutine print_LifeTimes_of_q() ! use vec_operate, ONLY:iku_v_norm use com, ONLY:of_open_close - use YPPm, ONLY:K_transform + !use YPPm, ONLY:K_transform ! implicit none ! @@ -380,7 +383,7 @@ subroutine print_LifeTimes_of_q() ! tmp_q = q%pt(iq,:3) ! - call K_transform(tmp_q,'iku') + !call K_transform(tmp_q,'iku') values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq)**HA2EV*1000._SP values(n_exc_in+2:n_exc_in+4)=tmp_q call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 6e0d309aee..526f73941e 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -455,7 +455,7 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl ExtendOutput') if (l_EXCPH_optics) then call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 27878109c5..3e830d76f4 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -675,6 +675,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') + call it('f',defs,'ExtendOutput', '[EXCPH] Print additional output with q-resolved lifetimes and resonances') call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point') call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) From e34c980caaf1fed5fc6e13c336a324097ec4ec02 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 13 Feb 2023 21:19:13 +0100 Subject: [PATCH 0579/1367] Version 5.1.0, Revision 22145, Hash 31c45937e MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Bugs: -Fixed "all" in the call of io_EXCPH Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 795025eeeb..a3a3319d2e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22144 -#define YAMBO_HASH "a5ddaac41" +#define YAMBO_REVISION 22145 +#define YAMBO_HASH "31c45937e" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 52753b512f..121a74cb35 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -122,7 +122,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! and are consistent with the Lin and Lout specified in input ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') + io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! if(io_err==0) return if(io_err/=0) call warning("[EXCPH] Exc-ph matrix elements not correct or missing. To be computed") @@ -183,7 +183,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Write headers ! call io_control(ACTION=OP_WR,SEC=(/1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') + io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! ! Get q-point coordinates in the q-BZ YAMBO_ALLOC(EXCPH_q,(q%nbz,3)) @@ -231,7 +231,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! I/O !===== call io_control(ACTION=WR_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp,"all") + io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! enddo ! From baed21c873a9c97e1d8405741adff8c04341a1c8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 14 Feb 2023 10:29:36 +0100 Subject: [PATCH 0580/1367] Version 5.1.0, Revision 22173, Hash 9c5f3a141 MODIFIED * include/driver/version.h interface/INIT_activate.F Bugs: - Additions: -AlphaQ added in life-time Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/interface/INIT_activate.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index a3a3319d2e..5dc4c532b1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22145 -#define YAMBO_HASH "31c45937e" +#define YAMBO_REVISION 22173 +#define YAMBO_HASH "9c5f3a141" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 42080d312b..9660354ed6 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -455,7 +455,7 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp NoMatrxEl') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ NoMatrxEl') if (l_EXCPH_optics) then call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'EXCPHdEtresh DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') From e1928094bffb66c92fd0e2983867713573fe98ae Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 14 Feb 2023 10:44:24 +0100 Subject: [PATCH 0581/1367] Version 5.1.0, Revision 22174, Hash baed21c87 MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F exc-ph/EXCPH_optics.F interface/INIT_load.F ypp/excitons/excitons_bands.F Additions: -Added alphaQ also in the life-time Changes: -Better message for the stretching Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 14 ++++++++++++-- src/exc-ph/EXCPH_optics.F | 5 ++++- src/interface/INIT_load.F | 2 +- ypp/excitons/excitons_bands.F | 2 +- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5dc4c532b1..b383794792 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22173 -#define YAMBO_HASH "9c5f3a141" +#define YAMBO_REVISION 22174 +#define YAMBO_HASH "baed21c87" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 94bbe0d7c7..f11405f2fa 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -36,9 +36,9 @@ subroutine EXCPH_lifetime(k,q,X) use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & & EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements, & -& RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free +& RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free,alphaQ use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map - use vec_operate, ONLY:degeneration_finder + use vec_operate, ONLY:degeneration_finder,iku_v_norm,iku_v_2D_norm use frequency, ONLY:w_samp use stderr, ONLY:intc ! @@ -87,6 +87,16 @@ subroutine EXCPH_lifetime(k,q,X) !write(*,*) iq,BS_all_E(:,iq) enddo ! + if(alphaQ/=rZERO) then + ! + call msg('rs','Excitonic bands 2D stretching :',alphaQ) + ! + do iq=1,q%nibz + BS_all_E(:,iq)=BS_all_E(:,iq)+alphaQ*iku_v_2D_norm(q%pt(iq,:3)) + enddo + ! + endif + ! ! Load the Exciton-phonon elements and phonon energies ! call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 8cd52bf6f0..76920900d3 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -156,8 +156,11 @@ subroutine EXCPH_optics(E,k,q,X,wv) ! Band structure distortion ! if(alphaQ/=rZERO) then - call msg('rs','Excitonic bands stretching :',alphaQ) + call msg('rs','Excitonic bands 2D stretching :',alphaQ) do iq=1,q%nibz + ! In a general case here we should use iku_v_norm + ! we modified to the iku_v_2D_norm for the AB-hBN case + ! one can restore the original one BS_all_E(:,iq)=BS_all_E(:,iq)+alphaQ*iku_v_2D_norm(q%pt(iq,:3)) enddo if(use_PH_DbGd) then diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 18735da5f1..109a8dd686 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -672,7 +672,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ExcPhKind', '[EXCPH] Exciton-phonon kind (PALEARI | BERNARDI)',EXCPH_kind_name) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) - call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure distortion',alphaQ) + call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure 2D distortion',alphaQ) call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index d1d5cb1345..4968914404 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -101,7 +101,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) ! if(alphaQ/=rZERO) then - call msg('rs','Excitonic bands stretching :',alphaQ) + call msg('rs','Excitonic 2D bands stretching :',alphaQ) do iq=1,CIRCUIT_k%nibz BSE_interp_E(:,iq)=BSE_interp_E(:,iq)+alphaQ*iku_v_2D_norm(CIRCUIT_k%pt(iq,:3)) enddo From 8f825c964745636bb6d09989f790352de5afd418 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 14 Feb 2023 10:54:23 +0100 Subject: [PATCH 0582/1367] Version 5.1.0, Revision 22175, Hash e1928094b MODIFIED * include/driver/version.h exc-ph/EXCPH_lifetime.F Bugs: - Additions: -Parallelization Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b383794792..f0d2d4a6af 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22174 -#define YAMBO_HASH "baed21c87" +#define YAMBO_REVISION 22175 +#define YAMBO_HASH "e1928094b" diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index f11405f2fa..3d14c43114 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -41,6 +41,9 @@ subroutine EXCPH_lifetime(k,q,X) use vec_operate, ONLY:degeneration_finder,iku_v_norm,iku_v_2D_norm use frequency, ONLY:w_samp use stderr, ONLY:intc + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing ! #include ! @@ -57,6 +60,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg real(SP) :: ExcPhM,EXC_life_average + type(PP_indexes)::px ! call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) @@ -126,12 +130,19 @@ subroutine EXCPH_lifetime(k,q,X) YAMBO_ALLOC(EXC_LifeTime,(EXCPH_states(1):EXCPH_states(2))) EXC_LifeTime=rZERO ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/q%nbz/)) + ! + call live_timing('Lifetimes',px%n_of_elements(myid+1)) + ! do iq=1,q%nibz do i_star=1,q%nstar(iq) ! iq_s=q%star(iq,i_star) iq_bz = q%k_table(iq, iq_s) ! + if (.not.px%element_1D(iq_bz)) cycle + ! call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) if(io_err/=0) call error('excph_gkkp databases not found!') @@ -166,9 +177,17 @@ subroutine EXCPH_lifetime(k,q,X) ! enddo ! + call live_timing(steps=1) + ! enddo enddo ! + call live_timing( ) + ! + call PP_redux_wait(EXC_LifeTime) + ! + call PP_indexes_reset(px) + ! ! Perform average ! call degeneration_finder(real(BS_E_in(EXCPH_states(1):EXCPH_states(2))),n_exc_in,first_exc_grp, & From 3cabee628ac424f99467117c316fb12f5ca59d43 Mon Sep 17 00:00:00 2001 From: palful Date: Tue, 14 Feb 2023 11:00:27 +0100 Subject: [PATCH 0583/1367] Updated treatment of degen states in lifetimes --- src/exc-ph/EXCPH_gkkp_driver.F | 2 +- src/exc-ph/EXCPH_lifetime.F | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 914b28621e..2d336174ff 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -231,7 +231,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! I/O !===== call io_control(ACTION=WR_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) - io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,"all") + io_err=io_EXCPH_gkkp(ID_exc_gkkp)!,'all') ! enddo ! diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 7618b6955e..648476e88a 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -290,10 +290,11 @@ function DbGrid_pole() ! ! Remove degenerate states E(alpha,iq_in)=E(beta,iq_fg(iq_in)) [currently iq_in=1] ! - ! if(iq==1.and.abs(E_alpha-E_beta)1) values(1)=iku_v_norm(q%pt(iq,:3)) + if (iq>1) values(1)=iku_v_norm(q%ptbz(iq,:3)) ! tmp_q = q%pt(iq,:3) ! From 5c7900ca3685f0b84ca6a770e207564dae284bc2 Mon Sep 17 00:00:00 2001 From: palful Date: Tue, 14 Feb 2023 18:26:45 +0100 Subject: [PATCH 0584/1367] Changes to extended output --- src/exc-ph/EXCPH_lifetime.F | 46 +++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 3436731afa..077dedf142 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -59,7 +59,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg,l_extend_output - real(SP) :: ExcPhM,EXC_life_average + real(SP) :: ExcPhM,EXC_life_average,Pole real(SP) , allocatable :: EXC_life_of_q(:,:) type(PP_indexes)::px ! @@ -168,20 +168,16 @@ subroutine EXCPH_lifetime(k,q,X) ExcPhM=EXCPH_Gkkp_sq(il,i_beta,i_alpha) if(l_no_matrix_elements) ExcPhM=1._SP ! - if(use_PH_DbGd) then - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*DbGrid_pole() - if (l_extend_output) then - EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*DbGrid_pole() - endif - else - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() - if (l_extend_output) then - EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Simple_pole() - endif - ! DS Debug < - ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) - ! DS Debug > + if(.not.use_PH_DbGd) Pole=Simple_pole() + if(use_PH_DbGd) Pole=DbGrid_pole() + ! + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole + if (l_extend_output) then + EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole endif + ! DS Debug < + ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) + ! DS Debug > ! enddo ! @@ -213,12 +209,12 @@ subroutine EXCPH_lifetime(k,q,X) enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) - if (l_extend_output) EXC_life_of_q=EXC_life_of_q*2._SP*pi/real(q%nbz,SP) + !if (l_extend_output) EXC_life_of_q=EXC_life_of_q*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! call print_and_write() - ! Here I need to create some specialised output... check those for exciton interpolation + ! if (l_extend_output) then call print_LifeTimes_of_q() !call print_LifeTime_resonances() @@ -380,6 +376,7 @@ subroutine print_and_write() ! subroutine print_LifeTimes_of_q() ! print q-map of lifetimes for each exc_in state for q-space plot + ! We print l(q)/sum_q l(q) ! use vec_operate, ONLY:iku_v_norm use com, ONLY:of_open_close @@ -394,10 +391,13 @@ subroutine print_LifeTimes_of_q() ! allocate(headings(n_exc_in+4)) YAMBO_ALLOC(values,(n_exc_in+4)) + values=rZERO ! headings(1)=" |q| (a.u.) " do i_alpha=EXCPH_states(1),EXCPH_states(2) headings(i_alpha+1)=' e'//intc(i_alpha) + ! + EXC_life_of_q(i_alpha,:)=EXC_life_of_q(i_alpha,:)/SUM(EXC_life_of_q(i_alpha,:)) enddo headings(n_exc_in+2:n_exc_in+4)=& & (/"q_x (rlu)","q_y (rlu)","q_z (rlu)"/) @@ -407,16 +407,22 @@ subroutine print_LifeTimes_of_q() call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) call msg('o '//trim(file_name),"#") ! - do iq=1,q%nbz + do iq=1,q%nibz + do i_star=1,q%nstar(iq) ! - if (iq>1) values(1)=iku_v_norm(q%ptbz(iq,:3)) + iq_s=q%star(iq,i_star) + iq_bz = q%k_table(iq, iq_s) ! - tmp_q = q%pt(iq,:3) + if (iq_bz>1) values(1)=iku_v_norm(q%ptbz(iq_bz,:3)) + ! + tmp_q = q%ptbz(iq_bz,:3) ! !call K_transform(tmp_q,'iku') - values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq)**HA2EV*1000._SP + values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq_bz) values(n_exc_in+2:n_exc_in+4)=tmp_q call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) + ! + enddo enddo call of_open_close(trim(file_name)) ! From 3170faadeba480bf627bff185c47b8e0061f25d9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 Feb 2023 16:54:17 +0100 Subject: [PATCH 0585/1367] Version 5.1.0, Revision 22324, Hash 2fbab73d9 MODIFIED * include/driver/version.h exc-ph/EXCPH_X_phass.F exc-ph/EXCPH_X_phass_from_Hpert.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_lifetime.F Bugs: - [yambo_ph] Fixed some issues found in I/O related to exch-ph Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_X_phass.F | 10 ++++++---- src/exc-ph/EXCPH_X_phass_from_Hpert.F | 10 ++++++---- src/exc-ph/EXCPH_gkkp_driver.F | 7 ++++--- src/exc-ph/EXCPH_lifetime.F | 8 +++++--- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index be049cc381..d199b2ef76 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22319 -#define YAMBO_HASH "2f7afb9e8" +#define YAMBO_REVISION 22324 +#define YAMBO_HASH "2fbab73d9" diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index 5a80d93e84..38c56fb430 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -40,7 +40,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) use vec_operate, ONLY:c2a use pars, ONLY:SP,cZERO,rZERO,schlen use units, ONLY:HA2EV,HA2CMm1 - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY + use IO_m, ONLY:manage_action,NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_Sat_WEIGHT,EXCPH_Renorm,BS_all_E,BS_R,EXC_occ,& & BS_Sat_WEIGHT_PH_abs,BS_E_in,EXCPH_Renorm_PH_abs,Sat_free,min_EXC_E,min_EXC_E_DbGd, & @@ -68,7 +68,7 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) complex(SP) :: pole,W,Sat_alpha_abs,Sat_alpha_emiss real(SP) :: min_E,exc_E,PH_E,occ_fact,v(3) integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: iq_db,iq_ibz + integer :: iq_db,iq_ibz,IO_ACT integer :: elph_branches_save(2) type(PP_indexes)::px logical :: l_prt_pl_q_res @@ -143,11 +143,13 @@ subroutine EXCPH_X_phass(wv,q,Epsilon_ii,PL_ii) ! iq_bz=q%k_table(iq_ibz,1) ! - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) + IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + ! + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! iq_db=Q_io_map(iq_bz) - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! ! Add the contribution of q-point transition to the renormalization factors diff --git a/src/exc-ph/EXCPH_X_phass_from_Hpert.F b/src/exc-ph/EXCPH_X_phass_from_Hpert.F index 1eca0f434b..dc89bfd90e 100644 --- a/src/exc-ph/EXCPH_X_phass_from_Hpert.F +++ b/src/exc-ph/EXCPH_X_phass_from_Hpert.F @@ -45,7 +45,7 @@ subroutine EXCPH_X_phass_from_Hpert(wv,q,PL_ii) use vec_operate, ONLY:c2a use pars, ONLY:pi,SP,cZERO,rZERO,schlen use units, ONLY:HA2EV,HA2CMm1 - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY + use IO_m, ONLY:manage_action,NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,REP,VERIFY use IO_int, ONLY:io_control use EXCPH, ONLY:EXCPH_states,EXCPH_sum,BS_all_E,BS_R,EXC_occ,EXCPH_Gkkp,& & BS_E_in,Sat_free,min_EXC_E,BS_R_left,BS_Sat_E_PH_abs,BS_Sat_E @@ -71,7 +71,7 @@ subroutine EXCPH_X_phass_from_Hpert(wv,q,PL_ii) complex(SP) :: pole,W,Sat_emission,Sat_absorption,EXCPH_gaux,BS_aux real(SP) :: min_E,exc_E,ph_E,bose_factor,boltzm_factor,E_alpha,E_beta integer :: i_alpha,i_beta,il,iq_bz,iw,io_err,ID_exc_gkkp,ID_gkkp,min_pos(1) - integer :: iq_db,iq_ibz + integer :: iq_db,iq_ibz,IO_ACT integer :: elph_branches_save(2) type(PP_indexes)::px complex(SP),allocatable :: BS_Sat_AMPLITUDE(:,:), BS_Sat_AMPLITUDE_PH_abs(:,:) @@ -118,11 +118,13 @@ subroutine EXCPH_X_phass_from_Hpert(wv,q,PL_ii) ! do iq_bz=1,q%nbz ! - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) + IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + ! + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! iq_db=Q_io_map(iq_bz) - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') ! ! Add the contribution of q-point transition to the renormalization factors diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 121a74cb35..1d0457db45 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -42,7 +42,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use BS, ONLY:BS_H_dim,BS_bands,BSqpts use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & -& REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END +& REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END,manage_action use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & @@ -61,7 +61,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Work Space ! integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM - integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID + integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID,IO_ACT integer :: il,iq_bz,iq,i_star,iq_s,iq_db,elph_branches_save(2) ! Debug !integer :: ik @@ -230,7 +230,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! I/O !===== - call io_control(ACTION=WR_CL_IF_END,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) + IO_ACT=manage_action(WR_CL_IF_END,iq_bz,1,q%nbz) + call io_control(ACTION=IO_ACT,SEC=(/iq_bz+1/),ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) ! enddo diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 3d14c43114..d5d7be1d96 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -53,7 +53,7 @@ subroutine EXCPH_lifetime(k,q,X) ! ! Work space ! - integer :: ID_exc_gkkp,ID_gkkp,io_err + integer :: ID_exc_gkkp,ID_gkkp,io_err,IO_ACT integer, external :: io_EXCPH_gkkp,io_ELPH integer :: iq,iq_s,iq_bz,i_alpha,j_alpha,i_beta,il,i_star,iq_db,igrp integer :: elph_branches_save(2) @@ -143,13 +143,15 @@ subroutine EXCPH_lifetime(k,q,X) ! if (.not.px%element_1D(iq_bz)) cycle ! - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) + IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz,PAR_INDEX=px) + ! + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+iq_bz/),MODE=DUMP,ID=ID_exc_gkkp) io_err=io_EXCPH_gkkp(ID_exc_gkkp) if(io_err/=0) call error('excph_gkkp databases not found!') ! !iq_db=DB_Q_map(iq_bz) iq_db=Q_io_map(iq_bz) - call io_control(ACTION=RD_CL_IF_END,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+iq_db/),MODE=DUMP,ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded no_matrix_elements') if(io_err/=0) call error('gkkp_expanded databases not found!') ! From 3acffe993df2cce284d763762f5ecd4b331e7e60 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 Feb 2023 17:05:52 +0100 Subject: [PATCH 0586/1367] Version 5.1.0, Revision 22325, Hash 3170faade MODIFIED * include/driver/version.h io/io_EXCPH_SE.F io/io_EXCPH_gkkp.F Bugs: - [yambo_ph] Removed workaround needed to avoid I/O bugs. Related bugs have been now properly fixed Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_EXCPH_SE.F | 6 +----- src/io/io_EXCPH_gkkp.F | 6 +----- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index d199b2ef76..4ecaae6183 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22324 -#define YAMBO_HASH "2fbab73d9" +#define YAMBO_REVISION 22325 +#define YAMBO_HASH "3170faade" diff --git a/src/io/io_EXCPH_SE.F b/src/io/io_EXCPH_SE.F index cfc0d5a6f4..8c0b2add27 100644 --- a/src/io/io_EXCPH_SE.F +++ b/src/io/io_EXCPH_SE.F @@ -24,7 +24,7 @@ integer function io_EXCPH_SE(ID,what) ! use pars, ONLY:SP,schlen - use IO_m, ONLY:io_sec,read_is_on,RD_CL,RD_CL_IF_END,io_action,frag_ELPH,io_status + use IO_m, ONLY:io_sec,read_is_on,frag_ELPH,io_status use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& & def_variable_bulk,io_variable_bulk,io_fragment use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& @@ -123,10 +123,6 @@ integer function io_EXCPH_SE(ID,what) goto 1 endif ! - ! Manage RD_CL_IF_END - ! - if (io_action(ID)==RD_CL_IF_END.and.iq==nqibz) io_action(ID)=RD_CL - ! ! Excitonic Gkkp (and SE) fragments !========================= ! diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index e5778cb339..9f2fa8cc63 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -24,7 +24,7 @@ integer function io_EXCPH_gkkp(ID) ! use pars, ONLY:SP,schlen - use IO_m, ONLY:io_sec,read_is_on,RD_CL,RD_CL_IF_END,io_action,frag_ELPH,io_status + use IO_m, ONLY:io_sec,read_is_on,frag_ELPH,io_status use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& & def_variable_bulk,io_variable_bulk,io_fragment use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& @@ -119,10 +119,6 @@ integer function io_EXCPH_gkkp(ID) goto 1 endif ! - ! Manage RD_CL_IF_END - ! - if (io_action(ID)==RD_CL_IF_END.and.iq==nqbz) io_action(ID)=RD_CL - ! ! Excitonic Gkkp (and SE) fragments !========================= ! From 97aaf9f98f1187ceaf4777c5c3437a6c4099eaba Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 Feb 2023 22:37:42 +0100 Subject: [PATCH 0587/1367] Version 5.1.0, Revision 22056, Hash c145aaf1f MODIFIED * include/driver/version.h sbin/compilation/check_updated_locks.sh real_time_initialize/RT_field_from_file.F Bugs: - [compilation] Some small improvements. They also avoids a fail I found with the sequence "make nl-projec -j", "make core -j", "make ypp_rt -j" Changes: - [yambo_rt] Removed debug lines Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- sbin/compilation/check_updated_locks.sh | 10 ++++++++++ src/real_time_initialize/RT_field_from_file.F | 3 --- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3563660abe..5fb81238d3 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21948 -#define YAMBO_HASH "a9643d749" +#define YAMBO_REVISION 22056 +#define YAMBO_HASH "c145aaf1f" diff --git a/sbin/compilation/check_updated_locks.sh b/sbin/compilation/check_updated_locks.sh index 3d6024cef9..65997d0c6f 100755 --- a/sbin/compilation/check_updated_locks.sh +++ b/sbin/compilation/check_updated_locks.sh @@ -84,9 +84,17 @@ source ./sbin/compilation/object_save_and_restore.sh if [ "$FOLDER_OK" == 1 ] ; then return ; fi + + +if [[ "$unmatched" == *"DOUBLE"* ]]; then + # in this case I already recompile the whole + # source, no need to check for other locks + unmatched="DOUBLE"; +fi # # tag new objects to be compiled # +files_done="" for lock in $unmatched do # @@ -95,6 +103,7 @@ do refs=$deps ; if [ -f $dir/$restore_dir/files.dep ] ; then refs=`cat $dir/$restore_dir/files.dep` ; fi for file in $deps; do + if [[ "$files_done" == *"$file"* ]]; then continue; fi if [[ "$refs" == *"$file"* ]]; then if [ "$VERB" == 1 ] ; then echo "$step preparing $file"; fi DIR_is_to_recompile=1 @@ -103,6 +112,7 @@ do source ./sbin/compilation/object_remove.sh "remove" "locks" continue; fi + files_done="$file $files_done" obj=$file source ./sbin/compilation/check_object_childs.sh "locks" fi diff --git a/src/real_time_initialize/RT_field_from_file.F b/src/real_time_initialize/RT_field_from_file.F index 7a8e9d049d..2118864293 100644 --- a/src/real_time_initialize/RT_field_from_file.F +++ b/src/real_time_initialize/RT_field_from_file.F @@ -76,7 +76,6 @@ subroutine RT_load_field_from_file(filename,i_field) ! Efield(i_field)%t_final_indx=(n_time_steps-8)/2+Efield(i_field)%t_initial_indx-1 Efield(i_field)%t_final=RT_step*(Efield(i_field)%t_final_indx-1) - !write(*,*) Efield(i_field)%t_initial_indx,Efield(i_field)%t_final_indx ! end subroutine RT_load_field_from_file ! @@ -99,8 +98,6 @@ subroutine RT_print_field_to_file_init(i_field) ! n_time_steps=(Efield(i_field)%t_final_indx-Efield(i_field)%t_initial_indx+1)*2+8 ! - !write(*,*) Efield(i_field)%t_initial_indx,Efield(i_field)%t_final_indx - ! open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) write(99+i_field,*) n_time_steps ! From c90131ef86bb532c2e0351b76dd19639d74bcb62 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 Feb 2023 23:15:15 +0100 Subject: [PATCH 0588/1367] Version 5.1.0, Revision 22057, Hash 97aaf9f98 MODIFIED * include/driver/version.h ypp/real_time/RT_coefficients_Inversion.F Bugs: - [ypp_nl] Fix for issue #688 Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/real_time/RT_coefficients_Inversion.F | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5fb81238d3..7a71411235 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22056 -#define YAMBO_HASH "c145aaf1f" +#define YAMBO_REVISION 22057 +#define YAMBO_HASH "97aaf9f98" diff --git a/ypp/real_time/RT_coefficients_Inversion.F b/ypp/real_time/RT_coefficients_Inversion.F index f4d9aa0e92..768b4b9ec7 100644 --- a/ypp/real_time/RT_coefficients_Inversion.F +++ b/ypp/real_time/RT_coefficients_Inversion.F @@ -22,12 +22,11 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! subroutine RT_coefficients_Inversion(NW,NX,P,X,W,T_period) - ! - ! BROKEN AS i_t_start not in YPP module anymore ! use pars, ONLY:SP,cI,cONE,cZERO use YPP_real_time, ONLY:X_order,RT_conf use real_time, ONLY:RT_step,NE_steps + use fields, ONLY:Efield use interfaces, ONLY:LINEAR_ALGEBRA_driver use linear_algebra, ONLY:INV #include @@ -56,7 +55,7 @@ subroutine RT_coefficients_Inversion(NW,NX,P,X,W,T_period) M=cZERO ! do i_t=1,M_size - T_i(i_t)= ((i_t_start-1._SP)+i_deltaT*(i_t-1._SP))*RT_step + T_i(i_t)= ((i_t_start-1._SP)+i_deltaT*(i_t-1._SP))*RT_step-Efield(1)%t_initial P_i(i_t)=P(i_t_start+i_deltaT*(i_t-1)) enddo ! From 1e30f83e435fb3480082c9211fb32ab3776e1150 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Mon, 6 Mar 2023 12:55:03 +0100 Subject: [PATCH 0589/1367] Print Pole values in exc-ph lifetimes with ExtendOutput --- src/common/DOUBLE_project.dep | 1 + src/exc-ph/EXCPH_lifetime.F | 65 ++++++++++++---------------------- src/io/DOUBLE_project.dep | 1 + src/modules/DOUBLE_project.dep | 1 + src/qp/DOUBLE_project.dep | 1 + 5 files changed, 27 insertions(+), 42 deletions(-) diff --git a/src/common/DOUBLE_project.dep b/src/common/DOUBLE_project.dep index 46b1d88ad4..294b97f65f 100644 --- a/src/common/DOUBLE_project.dep +++ b/src/common/DOUBLE_project.dep @@ -4,6 +4,7 @@ FREQUENCIES_coarse_grid.o FREQUENCIES_damping.o FREQUENCIES_merge.o + FREQUENCIES_mpa_sampling.o FREQUENCIES_reset.o FREQUENCIES_set_reference_point.o FREQUENCIES_setup.o diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 04e4211d44..ea0fa14eb7 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -60,7 +60,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg,l_extend_output real(SP) :: ExcPhM,EXC_life_average,Pole - real(SP) , allocatable :: EXC_life_of_q(:,:) + real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! call parser('NoMatrxEl',l_no_matrix_elements) @@ -83,7 +83,9 @@ subroutine EXCPH_lifetime(k,q,X) call RESIDUALS_and_EIGENVALUES_alloc(q) if (l_extend_output) then allocate(EXC_life_of_q(EXCPH_states(1):EXCPH_states(2),q%nbz)) + allocate(EXC_pole_of_q(EXCPH_states(1):EXCPH_states(2),q%nbz)) EXC_life_of_q=rZERO + EXC_pole_of_q=rZERO endif ! ! Load excitonic energies @@ -176,6 +178,7 @@ subroutine EXCPH_lifetime(k,q,X) EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole if (l_extend_output) then EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole + EXC_pole_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+Pole endif ! DS Debug < ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) @@ -218,8 +221,8 @@ subroutine EXCPH_lifetime(k,q,X) call print_and_write() ! if (l_extend_output) then - call print_LifeTimes_of_q() - !call print_LifeTime_resonances() + call print_LifeTimes_of_q("L") + call print_LifeTimes_of_q("P") endif ! ! Deallocations @@ -376,9 +379,13 @@ subroutine print_and_write() ! end subroutine ! - subroutine print_LifeTimes_of_q() - ! print q-map of lifetimes for each exc_in state for q-space plot - ! We print l(q)/sum_q l(q) + subroutine print_LifeTimes_of_q(MODE) + ! MODE="L"[ife]: + ! - print q-map of lifetimes for each exc_in state for q-space plot + ! We print l(q)/sum_q l(q) + ! MODE="P"[ole]: + ! - Print value of the Pole [F_occ*delta(...)] for each exc_in state for q-space plot + ! We print sum_{beta,mu} Pole_{beta,mu}(q) ! use vec_operate, ONLY:iku_v_norm use com, ONLY:of_open_close @@ -386,6 +393,7 @@ subroutine print_LifeTimes_of_q() ! implicit none ! + character(1) :: MODE character(schlen), allocatable :: headings(:) character(schlen) :: file_name real(SP), allocatable :: values(:) @@ -399,12 +407,17 @@ subroutine print_LifeTimes_of_q() do i_alpha=EXCPH_states(1),EXCPH_states(2) headings(i_alpha+1)=' e'//intc(i_alpha) ! - EXC_life_of_q(i_alpha,:)=EXC_life_of_q(i_alpha,:)/SUM(EXC_life_of_q(i_alpha,:)) + if (MODE=="L") then + EXC_life_of_q(i_alpha,:)=EXC_life_of_q(i_alpha,:)/SUM(EXC_life_of_q(i_alpha,:)) + endif + ! enddo headings(n_exc_in+2:n_exc_in+4)=& & (/"q_x (rlu)","q_y (rlu)","q_z (rlu)"/) ! - file_name="LifeTimes_of_q" + if (MODE=="L") file_name="LifeTimes_of_q" + if (MODE=="P") file_name="Resonance_of_q" + ! call of_open_close(trim(file_name),'ot') call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) call msg('o '//trim(file_name),"#") @@ -420,7 +433,8 @@ subroutine print_LifeTimes_of_q() tmp_q = q%ptbz(iq_bz,:3) ! !call K_transform(tmp_q,'iku') - values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq_bz) + if (MODE=="L") values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq_bz) + if (MODE=="P") values(1+1:n_exc_in+1)=EXC_pole_of_q(:,iq_bz) values(n_exc_in+2:n_exc_in+4)=tmp_q call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) ! @@ -430,37 +444,4 @@ subroutine print_LifeTimes_of_q() ! end subroutine print_LifeTimes_of_q ! -! subroutine print_LifeTime_resonances() -! ! Print resonance energies E_in - E_out(q) \pm E_ph(q) for -! ! each exc_in state for 2D plot -! implicit none -! ! -! headings(1)=" |q| (a.u.) " -! do i_c=1,EXCITONS_n_user_states -! i_l=EXCITONS_user_indexes(i_c) -! headings(i_c+1)=' e'//intc(i_l) -! enddo -! headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& -! & (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) -! ! -! file_name="excitons_interpolated_IBZ" -! call of_open_close(trim(file_name),'ot') -! call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) -! call msg('o '//trim(file_name),"#") -! ! -! do iq=1,GRID_q%nibz -! ! -! if (iq>1) values(1)=iku_v_norm(GRID_q%pt(iq,:3)) -! ! -! tmp_q = GRID_q%pt(iq,:3) -! ! -! call K_transform(tmp_q,'iku') -! values(1+1:EXCITONS_n_user_states+1)=BSE_interp_E(:,iq)*HA2EV -! values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q -! call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) -! enddo -! call of_open_close(trim(file_name)) -! ! -! end subroutine print_LifeTime_resonances - ! end subroutine diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index 129698f0ad..25f675ca85 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -16,6 +16,7 @@ io_KB_abinit.o io_KB_pwscf.o io_KB_real_space.o + io_MPA.o io_NL.o io_NLCC_pwscf.o io_PH.o diff --git a/src/modules/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index 81bf38c74c..f705528b8b 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -15,6 +15,7 @@ mod_IO_interfaces.o mod_LIVE_t.o mod_MAGNONS.o + mod_MPA.o mod_NL_interfaces.o mod_OUTPUT.o mod_Overlaps.o diff --git a/src/qp/DOUBLE_project.dep b/src/qp/DOUBLE_project.dep index 6da6cd629f..0502ba06ee 100644 --- a/src/qp/DOUBLE_project.dep +++ b/src/qp/DOUBLE_project.dep @@ -10,6 +10,7 @@ QP_life_transitions.o QP_load_SC_xc.o QP_logicals.o + QP_mpa.o QP_newton.o QP_of.o QP_ppa_EET_terminator.o From 1b471738492cd9fac61684aa7325967540434e0a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 7 Mar 2023 11:05:39 +0100 Subject: [PATCH 0590/1367] Version 5.1.0, Revision 22328, Hash b1dea7974 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F io/io_EXCPH_gkkp.F Bugs: - [yambo_ph] Fixed I/O problem with exc-ph Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 7 +++---- src/io/io_EXCPH_gkkp.F | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 3563660abe..23d22ce967 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 21948 -#define YAMBO_HASH "a9643d749" +#define YAMBO_REVISION 22328 +#define YAMBO_HASH "b1dea7974" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 1d0457db45..f1d104412b 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -170,11 +170,11 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) BSS_eh_table_m1_in=BSS_eh_table_m1 BS_E_in =BS_E ! - ! Check if gkkp_expanded is present + ! Open gkkp_expanded ! elph_branches_save =elph_branches - call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + call io_control(ACTION=OP_RD,COM=REP,MODE=VERIFY,SEC=(/1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') call deliver_IO_error_message(io_err,"GKKP") elph_branches =elph_branches_save ! @@ -227,7 +227,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! iq_db=Q_io_map(iq_bz) ! - ! ! I/O !===== IO_ACT=manage_action(WR_CL_IF_END,iq_bz,1,q%nbz) diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index 9f2fa8cc63..b48c612601 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -54,8 +54,8 @@ integer function io_EXCPH_gkkp(ID) ! db_name='excph_gkkp' ! - io_EXCPH_gkkp=io_connect(desc=trim(db_name),type=2,ID=ID) - if (io_EXCPH_gkkp/=0) goto 1 + io_EXCPH_gkkp=io_connect(desc=trim(db_name),type=2,ID=ID,FORCE_READ_MODE=(.not.any((/io_sec(ID,:)==1/))).and.frag_ELPH) + if (io_EXCPH_gkkp/=0) goto 2 ! if (any((/io_sec(ID,:)==1/))) then ! @@ -103,7 +103,7 @@ integer function io_EXCPH_gkkp(ID) io_EXCPH_gkkp=io_status(ID) ! iq=maxval(io_sec(ID,:))-1 - if (iq<=0) goto 1 + if (iq<=0) goto 2 ! ! Fragmentation ! @@ -146,7 +146,7 @@ integer function io_EXCPH_gkkp(ID) ! 1 call io_fragment_disconnect(ID,ID_frag) ! - call io_disconnect(ID=ID) +2 call io_disconnect(ID=ID) ! call timing('io_EXCPH_gkkp',OPR='stop') ! From 4f8fdf8f1304b87abdc269b54142b08ec7f6c8db Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 10 Mar 2023 12:13:37 +0100 Subject: [PATCH 0591/1367] Version 5.1.0, Revision 22329, Hash 1b4717384 MODIFIED * include/driver/version.h a2y/a2y_gkkp.F allocations/ELPH_alloc.F el-ph/ELPH_Sigma_c.F el-ph/ELPH_databases_check.F el-ph/En_k_plus_q_interpolate.F io/variables_ELPH.F modules/SET_defaults.F modules/mod_ELPH.F ph-el/PHEL_driver.F real_time_initialize/RT_ELPH_initialize.F ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F ypp/el-ph/ELPH_databases_IO_transfer_and_write.F ypp/el-ph/ELPH_double_grid.F ypp/el-ph/ELPH_eliashberg_dos.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F Changes: - [ypp_ph/yambmo_ph] When creating the ndb.gkkp the number of bands can be chosen in input with both a lower and an upper value Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- interfaces/a2y/a2y_gkkp.F | 6 ++++-- src/allocations/ELPH_alloc.F | 8 ++++---- src/el-ph/ELPH_Sigma_c.F | 8 ++++---- src/el-ph/ELPH_databases_check.F | 13 +++++++------ src/el-ph/En_k_plus_q_interpolate.F | 6 +++--- src/io/variables_ELPH.F | 9 +++++---- src/modules/SET_defaults.F | 4 +++- src/modules/mod_ELPH.F | 11 ++++++----- src/ph-el/PHEL_driver.F | 12 ++++++------ src/real_time_initialize/RT_ELPH_initialize.F | 2 +- ypp/el-ph/ELPH_databases.F | 18 ++++++++++++++---- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 6 +++--- .../ELPH_databases_IO_transfer_and_write.F | 8 ++++---- ypp/el-ph/ELPH_double_grid.F | 6 ++++-- ypp/el-ph/ELPH_eliashberg_dos.F | 8 ++++---- ypp/interface/INIT_load_ypp.F | 5 ++++- ypp/interface/INIT_ypp.F | 5 ++++- 18 files changed, 82 insertions(+), 57 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 23d22ce967..3c4c846080 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22328 -#define YAMBO_HASH "b1dea7974" +#define YAMBO_REVISION 22329 +#define YAMBO_HASH "1b4717384" diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index f436148bab..3ddd254770 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -31,7 +31,7 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) use interfaces, ONLY:ELPH_alloc use R_lattice, ONLY:nkibz,nkbz,nqibz,nqbz,k_pt,k_sstar,q_pt,q_sstar use D_lattice, ONLY:n_atoms - use ELPH, ONLY:ph_modes,elph_nb,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& + use ELPH, ONLY:ph_modes,elph_nb,elph_bands,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & elph_nQ,elph_nk_bz,elph_grids_are_expanded,elph_use_q_grid,& & PH_qpt,PH_kpt_bz,GKKP,PH_freqs_sq ! @@ -67,7 +67,9 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) elph_nk_bz = netcdf_get_dimension(grpid, "glob_nk") elph_nQ = netcdf_get_dimension(grpid, "glob_nq") ! - call msg('s','ELPH dims',(/elph_nb,ph_modes,elph_nk_bz,elph_nQ/)) + elph_bands=(/1,elph_nb/) + ! + call msg('s','ELPH dims',(/elph_bands,ph_modes,elph_nk_bz,elph_nQ/)) ! call ELPH_alloc("PHONONS dV LEVELS",GKKP=GKKP) ! diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index 47bb12820c..fb6524db9c 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -30,7 +30,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) use QP_m, ONLY:QP_n_states use ELPH, ONLY:GKKP_me,PH_pol_vector,ph_modes,PH_freqs_sq,& & PH_acoustic_speed,PH_acoustic_branch,gsqF_life_f,gsqF_life_bose,gsqF_fan,& -& gsqF_ca_corr,gsqF_dw,PH_Q_modulus,PH_qpt,elph_nb,elph_nQ,eval_G_using_KK,& +& gsqF_ca_corr,gsqF_dw,PH_Q_modulus,PH_qpt,elph_bands,elph_nQ,eval_G_using_KK,& & gsqF_energy_steps,PH_kpt_bz,elph_nk_bz,elph_use_q_grid,FineGd_E_kpq_components_reset use parallel_m, ONLY:PAR_nQ_bz use stderr, ONLY:STRING_split @@ -50,7 +50,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) ! if (present(GKKP)) then GKKP%Nq_mem=1 - GKKP%Nb=(/1,elph_nb/) + GKKP%Nb=elph_bands GKKP%Nmodes=(/1,ph_modes/) GKKP%Nk_mem=nkbz if (present(Nq_mem)) then @@ -89,8 +89,8 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) if (.not.allocated(GKKP%E_kpq)) then allocate(GKKP%E_kpq(elph_nQ)) do iq=1,elph_nQ - YAMBO_ALLOC(GKKP%E_kpq(iq)%E,(elph_nb,nkbz,1)) - YAMBO_ALLOC(GKKP%E_kpq(iq)%f,(elph_nb,nkbz,1)) + YAMBO_ALLOC(GKKP%E_kpq(iq)%E,(GKKP%Nb(1):GKKP%Nb(2),nkbz,1)) + YAMBO_ALLOC(GKKP%E_kpq(iq)%f,(GKKP%Nb(1):GKKP%Nb(2),nkbz,1)) GKKP%E_kpq(iq)%E=0._SP enddo endif diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index 7730480b2d..137c5635ac 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -48,7 +48,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) & On_Mass_Shell_approx,QP_time_order_sign use D_lattice, ONLY:sop_inv,nsym,i_time_rev,sop_tab use R_lattice, ONLY:qindx_S,bz_samp,RL_vol,nqibz - use ELPH, ONLY:elph_nb,PH_freqs_sq,GKKP,ph_modes,PH_freqs,FineGd_E_kpq_components_reset,& + use ELPH, ONLY:elph_bands,PH_freqs_sq,GKKP,ph_modes,PH_freqs,FineGd_E_kpq_components_reset,& & QP_PH_n_G_bands,PH_W_debye,use_PH_DbGd,EkplusQ_mode,gkkp_db,elph_grids_are_expanded, & & elph_nQ,elph_use_q_grid,setup_k_plus_q_levels,elph_nQ_used,& & E_kpq_sh_fact,gsqF_energy_steps,eval_G_using_KK,PH_qpt,ID_E_kpq,ID_E_kpq_obj, & @@ -106,8 +106,8 @@ subroutine ELPH_Sigma_c(en,k,q,qp) call k_build_up_BZ_tables(k) call k_expand(k) ! - if (QP_PH_n_G_bands(2)<=0.or.QP_PH_n_G_bands(2)>elph_nb) QP_PH_n_G_bands=(/1,elph_nb/) - if (QP_PH_n_G_bands(1)<=0.or.QP_PH_n_G_bands(1)>elph_nb) QP_PH_n_G_bands=(/1,elph_nb/) + if (QP_PH_n_G_bands(2)<=elph_bands(1).or.QP_PH_n_G_bands(2)>elph_bands(2)) QP_PH_n_G_bands=elph_bands + if (QP_PH_n_G_bands(1)<=elph_bands(1).or.QP_PH_n_G_bands(1)>elph_bands(2)) QP_PH_n_G_bands=elph_bands ! call msg('r', '[GW/El-Ph] Bands range ',(/QP_PH_n_G_bands(1),QP_PH_n_G_bands(2)/)) if (trim(QP_solver)=='n') & @@ -303,7 +303,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) ! call setup_k_plus_q_levels(iq_db,E_random_shift) ! - call QP_apply((/1,elph_nb/),GKKP%E_kpq(iq_db),k,"G",msg_fmt=' ') + call QP_apply(elph_bands,GKKP%E_kpq(iq_db),k,"G",msg_fmt=' ') ! endif ! diff --git a/src/el-ph/ELPH_databases_check.F b/src/el-ph/ELPH_databases_check.F index 82d8794221..c81bd1f02a 100644 --- a/src/el-ph/ELPH_databases_check.F +++ b/src/el-ph/ELPH_databases_check.F @@ -21,15 +21,15 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine ELPH_databases_check(n_bands) +subroutine ELPH_databases_check(bands) ! use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_RD_CL - use ELPH, ONLY:l_GKKP_DB_exists,l_GKKP_expanded_DB_exists,elph_nb + use ELPH, ONLY:l_GKKP_DB_exists,l_GKKP_expanded_DB_exists,elph_bands ! implicit none ! - integer :: n_bands + integer :: bands(2) ! ! Work Space ! @@ -40,12 +40,13 @@ subroutine ELPH_databases_check(n_bands) !=========== call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),ID=ID) io_err=io_ELPH(ID,'gkkp') - if (io_err==0) l_GKKP_DB_exists=n_bands<=elph_nb + if (io_err==0) l_GKKP_DB_exists= bands(1)>elph_bands(1) .and. bands(2)<=elph_bands(2) ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),ID=ID) io_err=io_ELPH(ID,'gkkp_expanded') - if (io_err==0) l_GKKP_expanded_DB_exists=n_bands<=elph_nb + if (io_err==0) l_GKKP_expanded_DB_exists= bands(1)>elph_bands(1) .and. bands(2)<=elph_bands(2) ! - if (all((/l_GKKP_DB_exists,l_GKKP_expanded_DB_exists/))) call error("Both expanded and un-expandend GKKP database found") + if (all((/l_GKKP_DB_exists,l_GKKP_expanded_DB_exists/))) & + & call error("Neither expanded or un-expandend GKKP database found") ! end subroutine ELPH_databases_check diff --git a/src/el-ph/En_k_plus_q_interpolate.F b/src/el-ph/En_k_plus_q_interpolate.F index d4684e67b0..59ea167ccb 100644 --- a/src/el-ph/En_k_plus_q_interpolate.F +++ b/src/el-ph/En_k_plus_q_interpolate.F @@ -26,7 +26,7 @@ subroutine En_k_plus_q_interpolate(k,q,E,iqbz) use pars, ONLY:pi,rZERO use electrons, ONLY:levels,n_sp_pol,E_reset,spin_occ use R_lattice, ONLY:bz_samp,bz_samp_reset - use ELPH, ONLY:elph_nb,ID_E_kpq,GKKP,FineGd_E_kpq_alloc + use ELPH, ONLY:elph_bands,ID_E_kpq,GKKP,FineGd_E_kpq_alloc use interpolate, ONLY:INTERPOLATION_BZ ! #include @@ -100,8 +100,8 @@ subroutine En_k_plus_q_interpolate(k,q,E,iqbz) do ik=1,k%nibz do iq_fine=q%FGbz%k_range(iqbz,1)+1,q%FGbz%k_range(iqbz,2),1 iq_idx=iq_fine-q%FGbz%k_range(iqbz,1) - GKKP%E_dg_kpq(iqbz)%E_kpq(:elph_nb,ik,:,iq_idx)=E_kpq%E(:elph_nb,ic,:) - GKKP%E_dg_kpq(iqbz)%f_kpq(:elph_nb,ik,:,iq_idx)=E_kpq%f(:elph_nb,ic,:) + GKKP%E_dg_kpq(iqbz)%E_kpq(elph_bands(1):elph_bands(2),ik,:,iq_idx)=E_kpq%E(elph_bands(1):elph_bands(2),ic,:) + GKKP%E_dg_kpq(iqbz)%f_kpq(elph_bands(1):elph_bands(2),ik,:,iq_idx)=E_kpq%f(elph_bands(1):elph_bands(2),ic,:) ic=ic+1 enddo enddo diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 928488007d..6f06897772 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -27,7 +27,7 @@ integer function variables_ELPH(ID,what) use pars, ONLY:SP use IO_m, ONLY:io_status,read_is_on,write_is_on,io_mode,DUMP,IO_INCOMPATIBLE_VAR use IO_int, ONLY:ver_is_gt_or_eq,io_variable_elemental,io_bulk,def_variable_elemental - use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,elph_nk_bz,ELPH_desc,elph_grids_are_expanded, & + use ELPH, ONLY:ph_modes,elph_bands,elph_nb,PH_freqs_sq,elph_nk_bz,ELPH_desc,elph_grids_are_expanded, & & QP_PH_n_G_bands,PH_W_debye,elph_nQ,PH_kpt_bz,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & elph_use_q_grid,PH_qpt,elph_nQ_used,PH_pol_vector,elph_Ham_bands,elph_branches use interfaces, ONLY:ELPH_alloc @@ -68,7 +68,8 @@ integer function variables_ELPH(ID,what) if (l_gFsq) call io_variable_elemental(ID,VAR="[ELPH]",I0=elph_nQ_used,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[used]",DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] K points",I0=elph_nk_bz,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I0=elph_nb,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) + if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 call io_variable_elemental(ID,VAR="[ELPH] Using the Q-grid",L0=elph_use_q_grid,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) if (ver_is_gt_or_eq(ID,revision=18920)) then call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& @@ -89,8 +90,8 @@ integer function variables_ELPH(ID,what) call def_variable_elemental(ID,"",0,0,1) ! if (io_mode(ID)==DUMP.or.write_is_on(ID)) then - QP_PH_n_G_bands=(/1,elph_nb/) - elph_Ham_bands =(/1,elph_nb/) + QP_PH_n_G_bands=(/elph_bands(1),elph_bands(2)/) + elph_Ham_bands =(/elph_bands(1),elph_bands(2)/) elph_branches =(/1,ph_modes/) endif ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 6f0caabb72..aac15421c3 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -82,7 +82,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use ACFDT, ONLY:ACFDT_n_lambda,ACFDT_n_freqs,ACFDT_E_range #if defined _ELPH use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& -& elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold +& elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,& +& elph_bands use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name,alphaQ, & & EXCPH_deltaE_treshold #endif @@ -524,6 +525,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! ph_modes=0 elph_nb=0 + elph_bands=-1 elph_branches=0 gsqF_energy_steps=2 eval_G_using_KK=.FALSE. diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 0a9cc1f5e4..74fbe0b275 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -30,12 +30,13 @@ module ELPH #include ! ! Dumensions - integer :: ph_modes=0 - integer :: elph_nb=0 + integer :: ph_modes + integer :: elph_bands(2) + integer :: elph_nb integer :: elph_nk_bz=0 integer :: elph_nQ=0 integer :: elph_nQ_used=0 - integer :: elph_branches(2)=0 + integer :: elph_branches(2) ! logical :: elph_use_q_grid=.FALSE. logical :: elph_grids_are_expanded=.FALSE. @@ -168,8 +169,8 @@ subroutine FineGd_E_kpq_alloc(E) ! type(E_kpq_fine_grid):: E ! - YAMBO_ALLOC(E%E_kpq,(elph_nb,E%nk,n_sp_pol,E%nq_around)) - YAMBO_ALLOC(E%f_kpq,(elph_nb,E%nk,n_sp_pol,E%nq_around)) + YAMBO_ALLOC(E%E_kpq,(elph_bands(1):elph_bands(2),E%nk,n_sp_pol,E%nq_around)) + YAMBO_ALLOC(E%f_kpq,(elph_bands(1):elph_bands(2),E%nk,n_sp_pol,E%nq_around)) ! end subroutine ! diff --git a/src/ph-el/PHEL_driver.F b/src/ph-el/PHEL_driver.F index 55f3aee66d..ceb1a96897 100644 --- a/src/ph-el/PHEL_driver.F +++ b/src/ph-el/PHEL_driver.F @@ -29,7 +29,7 @@ subroutine PHEL_driver(E,k,q) use R_lattice, ONLY:bz_samp,bz_samp_FineGd_default,bz_samp_FineGd_alloc,bz_fine_grid use interfaces, ONLY:ELPH_alloc use ELPH, ONLY:QP_PH_n_G_bands,elph_branches,GKKP_pe_sq,l_GKKP_DB_exists,& -& l_GKKP_expanded_DB_exists,elph_nb,elph_use_q_grid +& l_GKKP_expanded_DB_exists,elph_bands,elph_use_q_grid use PHEL, ONLY:l_PH_uses_E_FineGd,PH_Self_Energy_mode,PHEL_free,PH_Q,PH_SF_W,PHEL_alloc,PHEL_qp,& & PH_DbGd_points,PH_energy,KpQ_io_map,phel_info,PHEL_fit_Energies,& & QPH_OMS,QPH_OMS_bare_Pole,QPH_full,QPH,QPHt_alloc,QPH_DDFPT @@ -70,7 +70,7 @@ subroutine PHEL_driver(E,k,q) ! El-Ph databases check !======================= call section('+',"Databases I/O") - call ELPH_databases_check(elph_nb) + call ELPH_databases_check(elph_bands) ! if (.not.any((/l_GKKP_DB_exists,l_GKKP_expanded_DB_exists/))) call error("GKKP databases absent or damaged") ! @@ -213,11 +213,11 @@ subroutine PHEL_driver(E,k,q) ! ! ... grids if (l_RT_uses_E_FineGd .or. l_PH_uses_E_FineGd) then - YAMBO_ALLOC(E_FG%E,(elph_nb,k_FG%N,n_sp_pol)) - YAMBO_ALLOC(E_FG%W,(elph_nb,k_FG%N,n_sp_pol)) + YAMBO_ALLOC(E_FG%E,(elph_bands(1):elph_bands(2),k_FG%N,n_sp_pol)) + YAMBO_ALLOC(E_FG%W,(elph_bands(1):elph_bands(2),k_FG%N,n_sp_pol)) else - YAMBO_ALLOC(E_FG%E,(elph_nb,nk_CG,n_sp_pol)) - YAMBO_ALLOC(E_FG%W,(elph_nb,nk_CG,n_sp_pol)) + YAMBO_ALLOC(E_FG%E,(elph_bands(1):elph_bands(2),nk_CG,n_sp_pol)) + YAMBO_ALLOC(E_FG%W,(elph_bands(1):elph_bands(2),nk_CG,n_sp_pol)) endif ! ! ... occupations & levels diff --git a/src/real_time_initialize/RT_ELPH_initialize.F b/src/real_time_initialize/RT_ELPH_initialize.F index f6cb63ab81..01e6188d1c 100644 --- a/src/real_time_initialize/RT_ELPH_initialize.F +++ b/src/real_time_initialize/RT_ELPH_initialize.F @@ -49,7 +49,7 @@ subroutine RT_ELPH_initialize(E,k,q) ! ! El-Ph databases check !======================= - call ELPH_databases_check(RT_bands(2)) + call ELPH_databases_check(RT_bands) if (.not.l_GKKP_expanded_DB_exists) then call warning('ELPH (expanded) database not found and/or incompatible OR QP widths not provided. E-P scattering switched off') l_elph_scatt =.FALSE. diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 6c251949a1..d78d524940 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -28,8 +28,9 @@ subroutine ELPH_databases(k,E,q) use stderr, ONLY:intc use electrons, ONLY:levels use interfaces, ONLY:ELPH_alloc - use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,& -& PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,l_GKKP_hosts_bare_dV + use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_bands,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,& +& PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,& +& l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab use R_lattice, ONLY:bz_samp,qindx_B,nqbz,nqibz,bse_scattering,qindx_C,coll_scattering @@ -53,6 +54,7 @@ subroutine ELPH_databases(k,E,q) ! Work Space... ! integer ::io_err(3),iq,ik,is,idb,i_star,iq_bz,ID,qindx_ID,qindx_ID_frag + logical ::l_GKKP_skip_DW character(schlen) ::what,db_name integer, external ::ELPH_databases_IO_elemental,io_ELPH,qindx_B_init logical, external ::file_exists @@ -66,6 +68,8 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) call parser('GkkpExpand',l_gkkp_expand) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) + call parser('GkkpSkipDW',l_GKKP_skip_DW) + l_GKKP_hosts_DW=.not.l_GKKP_skip_DW ! if(l_gkkp_expand.and.l_gkkp_expand_only_k) & & call error(' Both flags "GkkpExpand" and "GkkpExpOnlyK" cannot be present at the same moment! ') @@ -214,7 +218,12 @@ subroutine ELPH_databases(k,E,q) ! ... Transfer and write ... !---------------------------- ph_modes =DB_ph_modes - elph_nb =DB_nb + if(elph_bands(1)>=1 .and. elph_bands(2) Date: Mon, 13 Mar 2023 20:47:26 +0100 Subject: [PATCH 0592/1367] Fixed bug with AbsExc (gamma exciton was not in module) and added flag to compute elec and hole terms separately --- src/exc-ph/EXCPH_gkkp_driver.F | 6 ++++-- src/exc-ph/EXCPH_gkkp_eval_pal.F | 21 +++++++++++++++------ src/exc-ph/EXCPH_lifetime.F | 8 ++++++-- src/modules/mod_EXCPH.F | 2 +- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index f1d104412b..0bf831d644 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -46,8 +46,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in, & -& EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & +& n_exc_in,EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -90,6 +90,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call parser('ConstElph',l_const_elph) call parser('AbsElph', l_abs_elph) call parser('AbsExc', l_abs_exc) + call parser('ElectronContributionOnly', l_elec_only) + call parser('HoleContributionOnly', l_hole_only) ! ! Exciton-phonon kind ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_pal.F b/src/exc-ph/EXCPH_gkkp_eval_pal.F index 064450a534..361cb99eed 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_pal.F +++ b/src/exc-ph/EXCPH_gkkp_eval_pal.F @@ -40,9 +40,9 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map - use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,& + use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& -& l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in +& l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only ! #include ! @@ -117,10 +117,12 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = elemental_scattering(iq_s,ik_bz) ! - ! 1=DOWN + ! 1=DOWN (hole contribution) !======== ! do ivp=BS_bands(1),BS_bands(2) + ! + if (l_elec_only) exit ! i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) if (i_Hp==0) cycle @@ -154,10 +156,12 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! - ! 2=UP + ! 2=UP (electron contribution) !====== ! do icp=BS_bands(1),BS_bands(2) + ! + if (l_hole_only) exit ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) if (i_Hp==0) cycle @@ -210,8 +214,13 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !aux_phase_1 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,1)), REAL(Xi(i_H,1)) ) ) !aux_phase_2 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,2)), REAL(Xi(i_H,2)) ) ) ! - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + if (l_abs_exc) then + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& +& abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + else + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& +& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + endif ! enddo enddo diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index ea0fa14eb7..eb10f1c353 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -67,7 +67,7 @@ subroutine EXCPH_lifetime(k,q,X) call parser('KeepDeg', l_keep_deg) call parser('ExtendOutput', l_extend_output) ! - call section('*','EXCPH-LifTime') + call section('*','EXCPH-LifeTime') ! call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) @@ -178,7 +178,7 @@ subroutine EXCPH_lifetime(k,q,X) EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole if (l_extend_output) then EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole - EXC_pole_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+Pole + EXC_pole_of_q(i_alpha,iq_bz)=EXC_pole_of_q(i_alpha,iq_bz)+Pole endif ! DS Debug < ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) @@ -198,6 +198,10 @@ subroutine EXCPH_lifetime(k,q,X) call live_timing( ) ! call PP_redux_wait(EXC_LifeTime) + if (l_extend_output) then + call PP_redux_wait(EXC_life_of_q) + call PP_redux_wait(EXC_pole_of_q) + endif ! call PP_indexes_reset(px) ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 59c0dfcd54..fd47b44cc8 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -36,7 +36,7 @@ module EXCPH ! ! ... GKKP & EXC-PH Interaction ! - logical :: l_const_elph,l_abs_elph,l_abs_exc + logical :: l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: n_exc_in From 338451399613e317c103891767d93fd2f3ee0911 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 14 Mar 2023 11:48:27 +0100 Subject: [PATCH 0593/1367] Version 5.1.0, Revision 22330, Hash 4f8fdf8f1 MODIFIED * include/driver/version.h allocations/ELPH_alloc.F io/io_ELPH.F modules/mod_ELPH.F ypp/el-ph/.objects ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_elemental.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F ypp/el-ph/ELPH_databases_IO_transfer_and_write.F ypp/modules/mod_YPP_ELPH.F NEW * ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] Workingon phase fixing for elph databases Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/allocations/ELPH_alloc.F | 3 + src/io/io_ELPH.F | 14 ++- src/modules/mod_ELPH.F | 2 + ypp/el-ph/.objects | 2 +- ypp/el-ph/ELPH_databases.F | 4 +- ypp/el-ph/ELPH_databases_IO_elemental.F | 6 +- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 107 ++++++++++++++++++ ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 4 + .../ELPH_databases_IO_transfer_and_write.F | 6 +- ypp/modules/mod_YPP_ELPH.F | 3 + 11 files changed, 146 insertions(+), 9 deletions(-) create mode 100644 ypp/el-ph/ELPH_databases_IO_fix_phases.F diff --git a/include/driver/version.h b/include/driver/version.h index 3c4c846080..eb42a5ed21 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22329 -#define YAMBO_HASH "1b4717384" +#define YAMBO_REVISION 22330 +#define YAMBO_HASH "4f8fdf8f1" diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index fb6524db9c..ec58caced8 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -83,6 +83,8 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) GKKP%KIND=trim(strings(is)) YAMBO_ALLOC(GKKP%dVc,(GKKP%Nmodes(1):GKKP%Nmodes(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) GKKP%dVc=cZERO + YAMBO_ALLOC(GKKP%Ovlp,(GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) + GKKP%Ovlp=cZERO endif ! case ('LEVELS') @@ -168,6 +170,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) else YAMBO_FREE(GKKP%dVr) YAMBO_FREE(GKKP%dVc) + YAMBO_FREE(GKKP%Ovlp) if (allocated(GKKP%E_kpq)) then do iq=1,elph_nQ call E_reset( GKKP%E_kpq(iq) ) diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index cfe3bc8c03..ba5cef7d5b 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -28,8 +28,9 @@ integer function io_ELPH(ID,what) use IO_m, ONLY:io_sec,read_is_on,frag_ELPH use IO_int, ONLY:io_connect,io_disconnect,io_fragment,& & io_bulk,io_header - use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& -& PH_pol_vector,GKKP,elph_grids_are_expanded,GKKP,GKKP_bare + use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,& +& l_GKKP_hosts_DW,l_GKKP_hosts_Ovlp,PH_pol_vector,& +& GKKP,elph_grids_are_expanded,GKKP,GKKP_bare use stderr, ONLY:intc use interfaces, ONLY:ELPH_alloc use R_lattice, ONLY:nkbz @@ -133,6 +134,15 @@ integer function io_ELPH(ID,what) call io_bulk(ID_frag,VAR="ELPH_GKKP_Q"//trim(intc(iq)),VAR_SZ=(/2,ph_modes,elph_nb,elph_nb,nkbz/) ) call io_bulk(ID_frag,C4=GKKP%dVc(:,:,:,:,1)) ! + if (l_GKKP_hosts_Ovlp) then + ! + ! OVERLAPS + ! + call io_bulk(ID_frag,VAR="ELPH_OVLP_Q"//trim(intc(iq)),VAR_SZ=(/elph_nb,elph_nb,nkbz/)) + call io_bulk(ID_frag,C3=GKKP%Ovlp(:,:,:,1)) + ! + endif + ! if (l_GKKP_hosts_bare_dV) then ! ! ELPH_gkkp_bare diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 74fbe0b275..732762dd3a 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -81,6 +81,7 @@ module ELPH ! dVr/c(Nmodes,Nb,Nb,Nk,Nq) real(SP), allocatable :: dVr(:,:,:,:,:) complex(SP), allocatable :: dVc(:,:,:,:,:) + complex(SP), allocatable :: Ovlp(:,:,:,:) ! ! Phonon assisted energy/occupation levels type(levels),allocatable :: E_kpq(:) @@ -130,6 +131,7 @@ module ELPH ! Databases logical :: l_GKKP_hosts_bare_dV=.FALSE. logical :: l_GKKP_hosts_DW =.TRUE. + logical :: l_GKKP_hosts_Ovlp =.FALSE. logical :: l_GKKP_DB_exists =.FALSE. logical :: l_GKKP_expanded_DB_exists=.FALSE. character(schlen) :: gkkp_db ! Database type for el-ph calculation (gkkp | expanded | genFroh ) diff --git a/ypp/el-ph/.objects b/ypp/el-ph/.objects index f5fd849b7e..124b38f0db 100644 --- a/ypp/el-ph/.objects +++ b/ypp/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _YPP_ELPH objs = ELPH_databases.o ELPH_databases_IO_elemental.o ELPH_databases_IO_pol_and_freqs.o ELPH_databases_IO_grids_check.o \ - ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o \ + ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o ELPH_databases_IO_fix_phases.o \ ELPH_eliashberg_dos.o ELPH_general_gFsq.o ELPH_excitonic_gkkp.o ELPH_databases_IO_modes.o \ ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o ELPH_sngl_db.o \ ELPH_load_indexes.o diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index d78d524940..133117ebe3 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -30,7 +30,7 @@ subroutine ELPH_databases(k,E,q) use interfaces, ONLY:ELPH_alloc use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_bands,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,& & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,& -& l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW +& l_GKKP_hosts_bare_dV,l_GKKP_hosts_Ovlp,l_GKKP_hosts_DW use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab use R_lattice, ONLY:bz_samp,qindx_B,nqbz,nqibz,bse_scattering,qindx_C,coll_scattering @@ -70,6 +70,7 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('GkkpSkipDW',l_GKKP_skip_DW) l_GKKP_hosts_DW=.not.l_GKKP_skip_DW + l_GKKP_hosts_Ovlp=.TRUE. ! if(l_gkkp_expand.and.l_gkkp_expand_only_k) & & call error(' Both flags "GkkpExpand" and "GkkpExpOnlyK" cannot be present at the same moment! ') @@ -297,6 +298,7 @@ subroutine ELPH_databases(k,E,q) ! io_err(1)=ELPH_databases_IO_elemental("dV KPT GKKP",idb) call ELPH_databases_IO_grids_check(k) + call ELPH_databases_IO_fix_phases(idb,k) call ELPH_databases_IO_transfer_and_write(idb,k,E,GKKP) call ELPH_databases_IO_gkkp_expand("K",iq,1,k,q,qindx_ID,qindx_ID_frag,GKKP) ! diff --git a/ypp/el-ph/ELPH_databases_IO_elemental.F b/ypp/el-ph/ELPH_databases_IO_elemental.F index f345ead0cb..6ceb5e5332 100644 --- a/ypp/el-ph/ELPH_databases_IO_elemental.F +++ b/ypp/el-ph/ELPH_databases_IO_elemental.F @@ -30,6 +30,7 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! read (99) ph_freqs_sq ! DO ik=1,nksq ! read (99) elph_gkkp_disk + ! read (99) overlap_disk ! read (99) polarization_vec ! read (99) grad_at_gamma (only at Gamma) ! read (99) Ek @@ -40,7 +41,7 @@ integer function ELPH_databases_IO_elemental(what,IDB) use ELPH, ONLY:PH_W_debye use YPP_ELPH, ONLY:DB_kind,DB_ph_modes,DB_nk,DB_nb,DB_ph_kpt,DB_PH_qpt,& & DB_ph_pol_vec,DB_ph_freq_sq,DB_alat,DB_E_k,DB_E_k_plus_q,& -& DB_grad_at_gamma,DB_gkkp,elph_dbs_path,DB_K_map +& DB_grad_at_gamma,DB_gkkp,DB_Ovlp,elph_dbs_path,DB_K_map use IO_int, ONLY:io_control,io_connect,io_disconnect use IO_m, ONLY:OP_RD,RD_CL,io_unit use D_lattice, ONLY:alat @@ -106,6 +107,7 @@ integer function ELPH_databases_IO_elemental(what,IDB) endif ! if (index(what,"POL_VEC")>0) then + read (io_unit(ID)) read (io_unit(ID)) read (io_unit(ID)) DB_ph_pol_vec(IDB,:,:,:) endif @@ -137,12 +139,14 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! if (IDB==1) DB_grad_at_gamma=cZERO DB_gkkp=cZERO + DB_Ovlp=cZERO ! do ik=1,DB_nk ! ik_yambo=DB_K_map(ik) ! read (io_unit(ID)) DB_gkkp(:,:,:,ik) + read (io_unit(ID)) DB_Ovlp(:,:,ik) read (io_unit(ID)) ! DB_gkkp(:,:,:,ik)=DB_gkkp(:,:,:,ik)*dVRY2Ha diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F new file mode 100644 index 0000000000..59ba493901 --- /dev/null +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -0,0 +1,107 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine ELPH_databases_IO_fix_phases(IDB,kpts) + ! + use pars, ONLY:SP,DP,cZERO + use R_lattice, ONLY:bz_samp,qindx_X + use wave_func, ONLY:WF,wf_ng + use interfaces, ONLY:WF_load,WF_free + use parallel_m, ONLY:PAR_IND_WF_k,PP_indexes_reset + use parallel_int, ONLY:PARALLEL_WF_distribute + use ELPH, ONLY:elph_use_q_grid + use YPP_ELPH, ONLY:DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,DB_nb,DB_ph_modes,DB_Q_map + use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc + ! + implicit none + ! + integer :: IDB + type(bz_samp) :: kpts + ! + ! Work Space + ! + type(elemental_collision):: YPP_scatt + ! + complex(SP) :: Y_overlap(DB_nb,DB_nb),PHASES_MATRIX(DB_nb,DB_nb),det_tmp + integer :: ik_DB,iq,ik,ok,ik_bz,ok_bz,isymm,osymm,ib1,ib2,i_sp_pol,i_l,iGo + ! + iq=IDB + if (elph_use_q_grid) iq=DB_Q_map(IDB) + ! + i_sp_pol=1 + ! + Y_overlap=cZERO + ! + call PP_indexes_reset(PAR_IND_WF_k) + allocate(PAR_IND_WF_k%element_1D(kpts%nibz)) + ! + ! GKKP & Levels + !=============== + do ik_db=1,DB_nk + ! + ik_bz=DB_K_map(ik_db) + ! + ok_bz=qindx_X(iq,ik_bz,1) + iGo =qindx_X(iq,ik_bz,2) + ! + ik =kpts%sstar(ik_bz,1) + isymm=kpts%sstar(ik_bz,2) + ! + ok =kpts%sstar(ok_bz,1) + osymm=kpts%sstar(ok_bz,2) + ! + PAR_IND_WF_k%element_1d(:)=.false. + PAR_IND_WF_k%element_1d(ik)=.true. + PAR_IND_WF_k%element_1d(ok)=.true. + call PARALLEL_WF_distribute(K_index=PAR_IND_WF_k,CLEAN_UP=.FALSE.) + call WF_load(WF,wf_ng,iGo,(/1,DB_nb/),(/1,DB_nk/),(/i_sp_pol,i_sp_pol/),space='G',title='Fix GKKP phases') + ! + call elemental_collision_alloc(YPP_scatt,NG=1,TITLE="BSE") + ! + do ib1=1,DB_nb + do ib2=1,DB_nb + ! + YPP_scatt%is=(/ib1,ik,isymm,i_sp_pol/) + YPP_scatt%os=(/ib2,ok,osymm,i_sp_pol/) + YPP_scatt%qs=(/iGo,iq,1/) + ! + call scatter_Bamp(YPP_scatt) + ! + Y_overlap(ib1,ib2)=-conjg(YPP_scatt%rhotw(1)) + ! + enddo + enddo + ! + call WF_free(WF) + call elemental_collision_free(YPP_scatt) + ! + call SERIAL_inversion(DB_nb,Y_overlap,det_tmp,.false.) + PHASES_MATRIX=matmul(Y_overlap,DB_Ovlp(:,:,ik_db)) + ! + do i_l=1,DB_ph_modes + DB_gkkp(:,:,i_l,ik_db)=matmul(PHASES_MATRIX,DB_gkkp(:,:,i_l,ik_db)) + enddo + ! + enddo + ! +end subroutine diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index 7451f765dc..10554a3864 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -93,6 +93,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag if (local_K_found(ik_bz)) cycle if (l_debug) write (*,*) "Expanding k ",ik_bz," from ",ik GKKP%dVc(:,:,:,ik_bz,1)=GKKP%dVc(:,:,:,ik,1) + GKKP%Ovlp (:,:,ik_bz,1)=GKKP%Ovlp (:,:,ik,1) if (allocated(GKKP%dVr)) GKKP%dVr(:,:,:,ik_bz,1)=GKKP%dVr(:,:,:,ik,1) GKKP%E_kpq(iq)%E(:,ik_bz,1)=GKKP%E_kpq(iq)%E(:,ik,1) local_K_found(ik_bz)=.TRUE. @@ -178,8 +179,10 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag do ob=elph_bands(1),elph_bands(2) if (l_bands_reverted) then GKKP_expanded%dVc(:,ob,ib,ik_bz,1)=conjg(GKKP%dVc(:,ib,ob,ik_bz_gkkp,1)) + GKKP_expanded%Ovlp (ob,ib,ik_bz,1)=conjg(GKKP%Ovlp (ib,ob,ik_bz_gkkp,1)) else GKKP_expanded%dVc(:,ib,ob,ik_bz,1)=GKKP%dVc(:,ib,ob,ik_bz_gkkp,1) + GKKP_expanded%Ovlp (ib,ob,ik_bz,1)=GKKP%Ovlp (ib,ob,ik_bz_gkkp,1) endif ! enddo @@ -234,6 +237,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag enddo ! GKKP%dVc=GKKP_expanded%dVc + GKKP%Ovlp=GKKP_expanded%Ovlp GKKP%E_kpq(iq)%E=GKKP_expanded%E_kpq(iq)%E ! if(l_use_qindxB) qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) diff --git a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F index cd53ddf763..4ffbb4f05b 100644 --- a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F +++ b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F @@ -27,7 +27,7 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) use D_lattice, ONLY:n_atoms use R_lattice, ONLY:bz_samp use ELPH, ONLY:GKKP_me,elph_use_q_grid,elph_bands - use YPP_ELPH, ONLY:DB_ph_pol_vec,DB_E_k,DB_kind,DB_K_map,DB_nk,DB_gkkp,& + use YPP_ELPH, ONLY:DB_ph_pol_vec,DB_E_k,DB_kind,DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,& & DB_nb,DB_ph_modes,DB_grad_at_gamma,DB_E_k_plus_q,DB_Q_map use electrons, ONLY:levels ! @@ -48,7 +48,8 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) if (elph_use_q_grid) iq=DB_Q_map(IDB) ! GKKP%dVc=cZERO - if (allocated(GKKP%dVr)) GKKP%dVr=rZERO + if (allocated(GKKP%dVr)) GKKP%dVr=rZERO + if (allocated(GKKP%Ovlp)) GKKP%Ovlp=cZERO ! ! GKKP & Levels !=============== @@ -94,6 +95,7 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) do ib2=elph_bands(1),elph_bands(2) ! GKKP%dVc(:,ib1,ib2,ik_bz,1)=DB_gkkp(ib1,ib2,:,ik_db) + GKKP%Ovlp(ib1,ib2,ik_bz,1)=DB_Ovlp(ib1,ib2,ik_db) ! if (trim(GKKP%KIND)=="dV_bare") cycle ! diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index 8511ec3add..e9ea39bdd4 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -77,6 +77,7 @@ module YPP_ELPH real(DP), allocatable :: DB_E_k_plus_q(:,:) complex(DP), allocatable :: DB_grad_at_gamma(:,:,:,:,:) complex(DP), allocatable :: DB_gkkp(:,:,:,:) + complex(DP), allocatable :: DB_Ovlp(:,:,:) ! interface ! @@ -132,6 +133,7 @@ subroutine ELPH_DB_alloc() YAMBO_ALLOC(DB_ph_kpt,(3,nkbz)) YAMBO_ALLOC(DB_grad_at_gamma,(DB_nb,DB_nb,n_atoms,3,nkbz)) YAMBO_ALLOC(DB_gkkp,(DB_nb,DB_nb,DB_ph_modes,nkbz)) + YAMBO_ALLOC(DB_Ovlp,(DB_nb,DB_nb,nkbz)) YAMBO_ALLOC(DB_ph_pol_vec,(DB_nq,DB_ph_modes,n_atoms,3)) YAMBO_ALLOC(DB_ph_freq_sq,(DB_nq,DB_ph_modes)) YAMBO_ALLOC(DB_E_k,(DB_nb,nkbz)) @@ -146,6 +148,7 @@ subroutine ELPH_DB_free() YAMBO_FREE(DB_ph_kpt) YAMBO_FREE(DB_grad_at_gamma) YAMBO_FREE(DB_gkkp) + YAMBO_FREE(DB_Ovlp) YAMBO_FREE(DB_ph_pol_vec) YAMBO_FREE(DB_ph_freq_sq) YAMBO_FREE(DB_E_k) From ad8225035faa928ab4b8d2017dcca9e0fb0aa286 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 14 Mar 2023 12:15:31 +0100 Subject: [PATCH 0594/1367] Version 5.1.0, Revision 22378, Hash 749057a5f MODIFIED * include/driver/version.h io/io_ELPH.F ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] Working on phase fixing. Code compiles and runs. Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/io/io_ELPH.F | 2 +- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 24 ++++++++++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index eb42a5ed21..fd4aa6d0c2 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22330 -#define YAMBO_HASH "4f8fdf8f1" +#define YAMBO_REVISION 22378 +#define YAMBO_HASH "749057a5f" diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index ba5cef7d5b..dba86bf808 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -138,7 +138,7 @@ integer function io_ELPH(ID,what) ! ! OVERLAPS ! - call io_bulk(ID_frag,VAR="ELPH_OVLP_Q"//trim(intc(iq)),VAR_SZ=(/elph_nb,elph_nb,nkbz/)) + call io_bulk(ID_frag,VAR="ELPH_OVLP_Q"//trim(intc(iq)),VAR_SZ=(/2,elph_nb,elph_nb,nkbz/)) call io_bulk(ID_frag,C3=GKKP%Ovlp(:,:,:,1)) ! endif diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index 59ba493901..fdb4b74d45 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -24,10 +24,11 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! use pars, ONLY:SP,DP,cZERO - use R_lattice, ONLY:bz_samp,qindx_X - use wave_func, ONLY:WF,wf_ng + use R_lattice, ONLY:bz_samp,qindx_X,nkibz + use wave_func, ONLY:WF + use electrons, ONLY:n_bands use interfaces, ONLY:WF_load,WF_free - use parallel_m, ONLY:PAR_IND_WF_k,PP_indexes_reset + use parallel_m, ONLY:PAR_IND_WF_b_and_k,PP_indexes_reset use parallel_int, ONLY:PARALLEL_WF_distribute use ELPH, ONLY:elph_use_q_grid use YPP_ELPH, ONLY:DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,DB_nb,DB_ph_modes,DB_Q_map @@ -49,11 +50,13 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) if (elph_use_q_grid) iq=DB_Q_map(IDB) ! i_sp_pol=1 + n_bands=DB_nb + nkibz=kpts%nibz ! Y_overlap=cZERO ! - call PP_indexes_reset(PAR_IND_WF_k) - allocate(PAR_IND_WF_k%element_1D(kpts%nibz)) + call PP_indexes_reset(PAR_IND_WF_b_and_k) + allocate(PAR_IND_WF_b_and_k%element_2D(DB_nb,nkibz)) ! ! GKKP & Levels !=============== @@ -70,11 +73,12 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ok =kpts%sstar(ok_bz,1) osymm=kpts%sstar(ok_bz,2) ! - PAR_IND_WF_k%element_1d(:)=.false. - PAR_IND_WF_k%element_1d(ik)=.true. - PAR_IND_WF_k%element_1d(ok)=.true. - call PARALLEL_WF_distribute(K_index=PAR_IND_WF_k,CLEAN_UP=.FALSE.) - call WF_load(WF,wf_ng,iGo,(/1,DB_nb/),(/1,DB_nk/),(/i_sp_pol,i_sp_pol/),space='G',title='Fix GKKP phases') + PAR_IND_WF_b_and_k%element_2d(:,:)=.false. + PAR_IND_WF_b_and_k%element_2d(:,ik)=.true. + PAR_IND_WF_b_and_k%element_2d(:,ok)=.true. + ! + call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.TRUE.) + call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),title='Fix GKKP phases',quiet=.true.) ! call elemental_collision_alloc(YPP_scatt,NG=1,TITLE="BSE") ! From 1397f08461f2beb5b80a85c8e69b582932f43ea2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 15 Mar 2023 11:25:55 +0100 Subject: [PATCH 0595/1367] Version 5.1.0, Revision 22379, Hash ad8225035 MODIFIED * driver/ypp.F include/driver/version.h Yio/io_fragment.F Yio/io_fragment_disconnect.F bse/K.F bse/K_driver.F bz_ops/bz_samp_indexes.F exc-ph/EXCPH_gkkp_driver.F interface/INIT_check_databases.F io/io_QINDX.F modules/SET_defaults.F modules/mod_R_lattice.F ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_fix_phases.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F ypp/el-ph/ELPH_databases_IO_transfer_and_write.F ypp/el-ph/ELPH_load_indexes.F ypp/excitons/excitons_interpolate_setup.F Changes: - [yambo/ypp_ph] Created the possibility to build the ?_indx tables with "plus q" convention. This is used at present by ypp_ph to fix the phases in the gkkp databases from QE Patch sent by: Davide Sangalli --- driver/ypp.F | 2 +- include/driver/version.h | 4 +- src/Yio/io_fragment.F | 2 +- src/Yio/io_fragment_disconnect.F | 2 +- src/bse/K.F | 7 ++-- src/bse/K_driver.F | 2 +- src/bz_ops/bz_samp_indexes.F | 39 ++++++++++++------- src/exc-ph/EXCPH_gkkp_driver.F | 2 +- src/interface/INIT_check_databases.F | 2 +- src/io/io_QINDX.F | 39 ++++++++++++------- src/modules/SET_defaults.F | 3 +- src/modules/mod_R_lattice.F | 2 +- ypp/el-ph/ELPH_databases.F | 8 +++- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 9 +++-- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 2 +- .../ELPH_databases_IO_transfer_and_write.F | 4 +- ypp/el-ph/ELPH_load_indexes.F | 35 +++++++++++++++-- ypp/excitons/excitons_interpolate_setup.F | 2 +- 18 files changed, 114 insertions(+), 52 deletions(-) diff --git a/driver/ypp.F b/driver/ypp.F index a0c1a7f35f..dd5ef07722 100644 --- a/driver/ypp.F +++ b/driver/ypp.F @@ -182,7 +182,7 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir else call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1,2,3/),MODE=DUMP,ID=ID) endif - i_err=io_QINDX(k,q,ID) + i_err=io_QINDX(k,q,ID,"minus_q") if(i_err/=0) call error(' Error reading K-point grid, please run setup again!') ! ! Rim energies and kpts diff --git a/include/driver/version.h b/include/driver/version.h index fd4aa6d0c2..19ebfd834f 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22378 -#define YAMBO_HASH "749057a5f" +#define YAMBO_REVISION 22379 +#define YAMBO_HASH "ad8225035" diff --git a/src/Yio/io_fragment.F b/src/Yio/io_fragment.F index 4e83a17bf8..22ca774d8f 100644 --- a/src/Yio/io_fragment.F +++ b/src/Yio/io_fragment.F @@ -59,7 +59,7 @@ subroutine io_fragment(ID,ID_frag,i_fragment,j_fragment,ierr) select case (trim(io_raw_extension(ID))) case("Vnl","wf","kb_pp","kb_pp_pwscf") if (.not.frag_WF) return - case("kindx") + case("kindx","kindx_pq") if (.not.frag_QINDX) return case("dip_iR_and_P","Overlaps") if (.not.frag_DIP) return diff --git a/src/Yio/io_fragment_disconnect.F b/src/Yio/io_fragment_disconnect.F index 5215d8e33f..5aeea3301a 100644 --- a/src/Yio/io_fragment_disconnect.F +++ b/src/Yio/io_fragment_disconnect.F @@ -38,7 +38,7 @@ subroutine io_fragment_disconnect(ID,ID_frag) select case (trim(io_raw_extension(ID))) case("Vnl","wf","kb_pp","kb_pp_pwscf") if (.not.frag_WF) return - case("kindx") + case("kindx","kindx_pq") if (.not.frag_QINDX) return case("dip_iR_and_P","Overlaps") if (.not.frag_DIP) return diff --git a/src/bse/K.F b/src/bse/K.F index 083a16b54a..5f45d52180 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -195,9 +195,10 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! if( l_BSE_kernel_complete ) return ! - io_QINDX_err=0 - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag) - if(io_QINDX_err/=0) call error('Error reading qindx_B database ') + if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then + io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag,"minus_q") + if(io_QINDX_err/=0) call error('Error reading qindx_B database ') + endif ! ! Screened interaction !====================== diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 4cc345af4e..d3a1e14ed0 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -128,7 +128,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err=io_QINDX(Xk,q,ID) + io_err=io_QINDX(Xk,q,ID,'minus_q') ! YAMBO_ALLOC(qindx_B_max_CPU,(PAR_K_scheme%COM_ibz_INDEX%n_CPU)) qindx_B_max_CPU=0 diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 2b4ec1a78b..64a34f99da 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -42,7 +42,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! qindx_C(ikbz,iqbz,1)=okbz ! qindx_C(ikbz,iqbz,2)=iGo ! - use pars, ONLY:SP,lchlen,zero_dfl + use pars, ONLY:SP,schlen,lchlen,zero_dfl use drivers, ONLY:l_bse,l_elel_scatt,l_setup,l_EXCPH_gkkp use com, ONLY:msg,fat_log use parallel_m, ONLY:PAR_K_scheme,master_cpu,PP_indexes,myid,PP_indexes_reset @@ -70,8 +70,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! #include ! - type(levels) ::en - type(bz_samp)::k,Xk,q + type(levels), intent(in) :: en + type(bz_samp), intent(inout) :: k,Xk,q ! ! Work Space ! @@ -83,6 +83,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) #if defined _ELPH logical :: bse_setup_scatt #endif + character(schlen) :: convention integer, external :: G_index character(lchlen) :: string(2) integer, allocatable :: q_map(:,:,:),q_iptbz(:,:) @@ -103,6 +104,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) bse_scattering=.TRUE. coll_scattering=.TRUE. #endif + convention="minus_q" ! ! ... User defined call parser('K_grids', user_grids) @@ -111,6 +113,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) coll_scattering = index(k_GRIDS_string,"C")/=0 X_scattering = index(k_GRIDS_string,"X")/=0 sigma_scattering= index(k_GRIDS_string,"S")/=0 + if (index(k_GRIDS_string,"plus_q")/=0) convention="plus_q" if (len_trim(k_GRIDS_string)==0) k_GRIDS_string="none" call k_GRIDS_update( ) endif @@ -121,7 +124,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) q%description='q' ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2,3,4,6/),MODE=VERIFY,ID=io_db) - io_err=io_QINDX(Xk,q,io_db) + io_err=io_QINDX(Xk,q,io_db,trim(convention)) if (io_err==0) then call k_expand(q) d3q_factor=RL_vol/real(q%nbz) @@ -294,10 +297,12 @@ subroutine bz_samp_indexes(en,k,Xk,q) if ((.not.do_qindx_X_ik).and.(.not.do_qindx_B)) cycle ! do ikbz_p=1,Xk%nbz + ! + if (trim(convention)=="minus_q") v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:) ! K-K_p= Q + Go + if (trim(convention)=="plus_q" ) v1=Xk%ptbz(ikbz_p,:)-Xk%ptbz(ikbz,:) ! K_p-K= Q + Go ! if(Xk_grid_new_mapping) then ! - v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:) v1=v1-nint(v1) ! Bring in the BZ, remove the G0 where(v1<-zero_dfl) ! Bring between [0,1) v1(:)=1._SP+v1(:) @@ -312,7 +317,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! else ! - v1=matmul(k_b_m1,Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:)) ! K-K_p= Q + Go + v1=matmul(k_b_m1,v1) iv1=nint(v1) call k_grid_shift(iv1) ! @@ -329,7 +334,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) if (do_qindx_X) qindx_X(iqibz,ikbz,1)=ikbz_p if (do_qindx_B) qindx_B(ikbz_p,ikbz_mem,1)=iqbz ! - v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:)-q%ptbz(iqbz,:) + if (trim(convention)=="minus_q") v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:)-q%ptbz(iqbz,:) + if (trim(convention)=="plus_q" ) v1=Xk%ptbz(ikbz_p,:)-Xk%ptbz(ikbz,:)-q%ptbz(iqbz,:) call c2a(v_in=v1,mode='ka2i') ! if (do_qindx_X) qindx_X(iqibz, ikbz ,2)=G_index(v1,.true.) @@ -406,11 +412,13 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! do ikbz_p=1,k%nbz ! - if (.not.PAR_IND_k%element_1D(ikbz_p)) cycle + if (.not.PAR_IND_k%element_1D(ikbz_p)) cycle + ! + if (trim(convention)=="minus_q") v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:) ! K-K_p= Q + Go + if (trim(convention)=="plus_q" ) v1=Xk%ptbz(ikbz_p,:)-Xk%ptbz(ikbz,:) ! K_p-K= Q + Go ! if(Xk_grid_new_mapping) then ! - v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:) v1=v1-nint(v1) ! Bring in the BZ, remove the G0 where(v1<-zero_dfl) ! Bring between [0,1) v1(:)=1._SP+v1(:) @@ -425,7 +433,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! else ! - v1=matmul(k_b_m1,k%ptbz(ikbz,:)-k%ptbz(ikbz_p,:)) + v1=matmul(k_b_m1,v1) iv1=nint(v1) ! if (.not.v_is_zero(v1-real(iv1,SP),zero_=local_zero)) then @@ -443,7 +451,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if (iks==1) qindx_S(ikibz,iqbz,1)=ikbz_p if (coll_scattering) qindx_C(ikbz,iqbz,1)=ikbz_p - v1=k%ptbz(ikbz,:)-k%ptbz(ikbz_p,:)-q%ptbz(iqbz,:) + if (trim(convention)=="minus_q") v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:)-q%ptbz(iqbz,:) + if (trim(convention)=="plus_q" ) v1=Xk%ptbz(ikbz_p,:)-Xk%ptbz(ikbz,:)-q%ptbz(iqbz,:) call c2a(v_in=v1,mode='ka2i') if (iks==1) qindx_S(ikibz,iqbz,2)=G_index(v1,.false.) if (coll_scattering) qindx_C(ikbz,iqbz,2)=G_index(v1,.false.) @@ -495,7 +504,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if(master_cpu) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2,3,4,6/),ID=io_db) - io_err=io_QINDX(Xk,q,io_db) + io_err=io_QINDX(Xk,q,io_db,trim(convention)) endif ! ! Before writing section 5 (qindx_B) I need to wait that the master is done @@ -511,7 +520,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) if (do_qindx_B) then call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/5/),ID=io_db,& & COMM=PAR_K_scheme%COM_ibz_index,DO_it=PAR_K_scheme%COM_ibz_A2A%CPU_id==0) - io_err=io_QINDX(Xk,q,io_db) + io_err=io_QINDX(Xk,q,io_db,trim(convention)) endif ! !CLEAN @@ -543,6 +552,8 @@ subroutine k_GRIDS_update() if (bse_scattering ) k_GRIDS_string=trim(k_GRIDS_string)//" B" if (coll_scattering ) k_GRIDS_string=trim(k_GRIDS_string)//" C" if (sigma_scattering) k_GRIDS_string=trim(k_GRIDS_string)//" S" + if (trim(convention)=="plus_q" ) k_GRIDS_string=trim(k_GRIDS_string)//" plus_q" + if (trim(convention)=="minus_q") k_GRIDS_string=trim(k_GRIDS_string)//" minus_q" ! end subroutine ! diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index f1d104412b..5ef097e687 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -325,7 +325,7 @@ subroutine build_k_plus_q_table() ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err=io_QINDX(k,q,ID) + io_err=io_QINDX(k,q,ID,'minus_q') if (io_err/=0) then call msg('s',"Missing k/q scattering database") call error("Please run a setup with the BSEscatt flag activated") diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index ee5427f70d..c17be11ed0 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -136,7 +136,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! kindx ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) - io_QINDX_err=io_QINDX(k,q,io_ID) + io_QINDX_err=io_QINDX(k,q,io_ID,'minus_q') if (io_QINDX_err==0) call initactivate(-1,'IkSigLim IkXLim') ! ! If the GROT/KINDX DBs are not present, reset to setup run diff --git a/src/io/io_QINDX.F b/src/io/io_QINDX.F index 186e4bd399..7b707b641f 100644 --- a/src/io/io_QINDX.F +++ b/src/io/io_QINDX.F @@ -21,9 +21,9 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -integer function io_QINDX(Xk,q,io_db) +integer function io_QINDX(Xk,q,io_db,convention) ! - use pars, ONLY:SP,IP + use pars, ONLY:SP,IP,schlen use R_lattice, ONLY:nqibz,nqbz,qindx_X,qindx_B,qindx_S,qindx_C,& & bse_scattering,QP_states_k,nXkibz,qindx_alloc,& & Xk_grid_is_uniform,bz_samp,nXkbz,coll_scattering,q_pt,& @@ -38,16 +38,23 @@ integer function io_QINDX(Xk,q,io_db) ! #include ! - type(bz_samp)::q,Xk - integer ::io_db,i3,i2,i2_dn,i2_up,i2_mem,i2_step,IO_size + type(bz_samp), intent(inout) :: q + type(bz_samp), intent(in) :: Xk + integer , intent(in) :: io_db + character(*) , intent(in) :: convention ! ! Work Space ! - integer :: ioScatt,id_frag + integer :: ioScatt,id_frag + integer :: i3,i2,i2_dn,i2_up,i2_mem,i2_step,IO_size + character(schlen) :: filename ! call timing('io_QINDX',OPR='start') ! - io_QINDX=io_connect(desc='kindx',type=1,ID=io_db) + if(trim(convention)=="minus_q" ) filename="kindx" ! standard yambo convention + if(trim(convention)=="plus_q" ) filename="kindx_pq" ! QE convention + ! + io_QINDX=io_connect(desc=trim(filename),type=1,ID=io_db) if (io_QINDX/=0) goto 1 ! if (any((/io_sec(io_db,:)==1/))) then @@ -128,7 +135,7 @@ integer function io_QINDX(Xk,q,io_db) ! ! Fragmentation (1): eXchange indx ! - io_extension(io_db)='kindx' + io_extension(io_db)=trim(filename) call io_fragment(io_db,id_frag,i_fragment=1) call def_variable_bulk(id_frag,"Qindx",1,shape(qindx_X),IP+100) call io_variable_bulk(id_frag,1,I3=qindx_X) @@ -143,7 +150,7 @@ integer function io_QINDX(Xk,q,io_db) ! ! Fragmentation (2): Self-Energy indx ! - io_extension(io_db)='kindx' + io_extension(io_db)=trim(filename) call io_fragment(io_db,id_frag,i_fragment=2) call def_variable_bulk(id_frag,"Sindx",2,shape(qindx_S),IP+100) call io_variable_bulk(id_frag,2,I3=qindx_S) @@ -158,7 +165,7 @@ integer function io_QINDX(Xk,q,io_db) ! ! Fragmentation (3): BSE indx ! - io_extension(io_db)='kindx' + io_extension(io_db)=trim(filename) call io_fragment(io_db,id_frag,i_fragment=3) call def_variable_bulk(id_frag,"Bindx",3,(/nXkbz,nXkbz,2/),IP+100,par_io_kind='independent') ! 46341 is the sqare root of the maximum integer 2147483647 @@ -198,7 +205,7 @@ integer function io_QINDX(Xk,q,io_db) ! ! Fragmentation (4): COLL indx ! - io_extension(io_db)='kindx' + io_extension(io_db)=trim(filename) call io_fragment(io_db,id_frag,i_fragment=4) call def_variable_bulk(id_frag,"Cindx",4,shape(qindx_C),IP+100) call io_variable_bulk(id_frag,4,I3=qindx_C) @@ -212,9 +219,9 @@ integer function io_QINDX(Xk,q,io_db) ! end function io_QINDX ! -integer function qindx_B_init(ID,ID_frag) +integer function qindx_B_init(ID,ID_frag,convention) ! - use pars, ONLY:IP + use pars, ONLY:IP,schlen use R_lattice, ONLY:nXkbz use IO_m, ONLY:OP_RD,RD,io_status use IO_int, ONLY:io_control,io_connect,def_variable_bulk,io_fragment @@ -222,9 +229,15 @@ integer function qindx_B_init(ID,ID_frag) implicit none ! integer :: ID,ID_frag + character(*) , intent(in) :: convention + ! + character(schlen) :: filename + ! + if(trim(convention)=="minus_q" ) filename="kindx" ! standard yambo convention + if(trim(convention)=="plus_q" ) filename="kindx_pq" ! QE convention ! call io_control(ACTION=OP_RD,ID=ID) - qindx_B_init=io_connect(desc='kindx',type=1,ID=ID) + qindx_B_init=io_connect(desc=trim(filename),type=1,ID=ID) ! call io_fragment(ID,ID_frag,i_fragment=3) call def_variable_bulk(ID_frag,"Bindx",3,(/nXkbz,nXkbz,2/),IP+100,par_io_kind='independent') diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 8669507680..7e959f6aee 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -54,7 +54,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use R_lattice, ONLY:n_g_shells,ng_closed,bse_scattering,coll_scattering,& & Xk_grid_is_uniform,RIM_id_epsm1_reference,RIM_epsm1,& & RIM_anisotropy,RIM_ng,RIM_W_ng,rimw_type,RIM_n_rand_pts,nqibz,q0_def_norm,& -& cutoff_presets,k_map +& cutoff_presets,k_map,k_GRIDS_string use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,eval_magn,nel_cond use parallel_m, ONLY:ncpu,CPU_str_reset,CREATE_hosts_COMM use com, ONLY:isec,depth,secnm,previous_secmode,of_name,n_ofs_defined,of_opened,of_unit,max_open_ofs,& @@ -284,6 +284,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) k_map%g0_idx =-1 k_map%q_step =-1 k_map%max_kdir= 0 + k_GRIDS_string="X S B C minus_q" ! ! RIM ! diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 1be13de63f..095e262377 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -39,7 +39,7 @@ module R_lattice real(SP) :: k_grid_b(3,3) logical :: Xk_grid_is_uniform logical :: Xk_grid_new_mapping - character(schlen) :: k_GRIDS_string="X S B C" + character(schlen) :: k_GRIDS_string ! ! Q/K-sampling ! diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 133117ebe3..76c7af6e83 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -33,7 +33,7 @@ subroutine ELPH_databases(k,E,q) & l_GKKP_hosts_bare_dV,l_GKKP_hosts_Ovlp,l_GKKP_hosts_DW use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab - use R_lattice, ONLY:bz_samp,qindx_B,nqbz,nqibz,bse_scattering,qindx_C,coll_scattering + use R_lattice, ONLY:bz_samp,nqbz,nqibz use parser_m, ONLY:parser use vec_operate, ONLY:v_is_zero use zeros, ONLY:k_iku_zero @@ -56,7 +56,7 @@ subroutine ELPH_databases(k,E,q) integer ::io_err(3),iq,ik,is,idb,i_star,iq_bz,ID,qindx_ID,qindx_ID_frag logical ::l_GKKP_skip_DW character(schlen) ::what,db_name - integer, external ::ELPH_databases_IO_elemental,io_ELPH,qindx_B_init + integer, external ::ELPH_databases_IO_elemental,io_ELPH logical, external ::file_exists real(SP) ::v(3) type(GKKP_me) ::GKKP_save,GKKP_bare_save @@ -288,6 +288,8 @@ subroutine ELPH_databases(k,E,q) db_name='gkkp' if(l_gkkp_expand.or.l_gkkp_expand_only_k) db_name='gkkp_expanded' ! + call ELPH_switch_X_indexes_convention(k,q,"plus_q") + ! do idb=1,DB_nq ! if(elph_use_q_grid) then @@ -339,6 +341,8 @@ subroutine ELPH_databases(k,E,q) enddo call live_timing() ! + call ELPH_switch_X_indexes_convention(k,q,"minus_q") + ! ! Clean !======= call ELPH_DB_free( ) diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index fdb4b74d45..d6a450d2ac 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -43,7 +43,8 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! type(elemental_collision):: YPP_scatt ! - complex(SP) :: Y_overlap(DB_nb,DB_nb),PHASES_MATRIX(DB_nb,DB_nb),det_tmp + complex(DP) :: PHASES_MATRIX(DB_nb,DB_nb) + complex(SP) :: Y_overlap(DB_nb,DB_nb),det_tmp integer :: ik_DB,iq,ik,ok,ik_bz,ok_bz,isymm,osymm,ib1,ib2,i_sp_pol,i_l,iGo ! iq=IDB @@ -91,7 +92,8 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! call scatter_Bamp(YPP_scatt) ! - Y_overlap(ib1,ib2)=-conjg(YPP_scatt%rhotw(1)) + ! To be fixed + Y_overlap(ib1,ib2)=YPP_scatt%rhotw(1) ! enddo enddo @@ -99,8 +101,9 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) call WF_free(WF) call elemental_collision_free(YPP_scatt) ! + ! Serial inversion probably not needed, part to be fixed call SERIAL_inversion(DB_nb,Y_overlap,det_tmp,.false.) - PHASES_MATRIX=matmul(Y_overlap,DB_Ovlp(:,:,ik_db)) + PHASES_MATRIX=matmul(cmplx(Y_overlap,kind=DP),DB_Ovlp(:,:,ik_db)) ! do i_l=1,DB_ph_modes DB_gkkp(:,:,i_l,ik_db)=matmul(PHASES_MATRIX,DB_gkkp(:,:,i_l,ik_db)) diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index 10554a3864..a69feb6afa 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -113,7 +113,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag ! call ELPH_alloc("LEVELS dV",GKKP=GKKP_expanded,Nq_mem=1) ! - if(l_use_qindxB) qindx_tmp=qindx_B_init(qindx_ID,qindx_ID_frag) + if(l_use_qindxB) qindx_tmp=qindx_B_init(qindx_ID,qindx_ID_frag,"minus_q") ! do ik_bz=1,k%nbz ! diff --git a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F index 4ffbb4f05b..8ab3bb392a 100644 --- a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F +++ b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F @@ -94,8 +94,8 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) do ib1=elph_bands(1),elph_bands(2) do ib2=elph_bands(1),elph_bands(2) ! - GKKP%dVc(:,ib1,ib2,ik_bz,1)=DB_gkkp(ib1,ib2,:,ik_db) - GKKP%Ovlp(ib1,ib2,ik_bz,1)=DB_Ovlp(ib1,ib2,ik_db) + GKKP%dVc(:,ib1,ib2,ik_bz,1)=cmplx(DB_gkkp(ib1,ib2,:,ik_db),kind=SP) + GKKP%Ovlp(ib1,ib2,ik_bz,1)= cmplx(DB_Ovlp(ib1,ib2,ik_db),kind=SP) ! if (trim(GKKP%KIND)=="dV_bare") cycle ! diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index 960bf7cb11..6a93c3cf7f 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2022 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -52,7 +52,7 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) + io_err(1)=io_QINDX(k,q,ID,'minus_q') if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") call error("Please run a setup with the BSEscatt flag activated") @@ -69,7 +69,7 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) if(.not.coll_scattering) call error(' Please run setup with COLLscatt flag ') ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) + io_err(1)=io_QINDX(k,q,ID,'minus_q') if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") call error("Please (re)run the setup") @@ -77,3 +77,32 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) endif ! end subroutine +! +! +subroutine ELPH_switch_X_indexes_convention(kpts,qpts,convention) + ! + use com, ONLY:msg + use IO_m, ONLY:OP_RD_CL,DUMP,NONE + use IO_int, ONLY:io_control + use R_lattice, ONLY:bz_samp,qindx_free + ! + implicit none + ! + type(bz_samp) :: kpts,qpts + character(*), intent(in) :: convention + ! + integer, external :: io_QINDX + integer :: ID_qindx,io_err_qindx + ! + call msg('s',' Switching qindx_X table to '//convention//' convention') + call qindx_free('X') + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),MODE=DUMP,ID=ID_qindx) + io_err_qindx=io_QINDX(kpts,qpts,ID_qindx,convention) + ! + if (io_err_qindx/=0 .and. convention=="plus_q") & + & call error("Run yambo_ph setup setting K_grids='X plus_q'") + ! + if (io_err_qindx/=0 .and. convention=="minus_q") & + & call error("ndb.kindx file missing, please run yambo setup") + ! +end subroutine diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 8d8031e5b6..f90ed6ecaa 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -69,7 +69,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,ID_INTERP_OCC, if(.not.allocated(qindx_C)) then if(coll_scattering.eqv..FALSE.) call error('Please run again the setup with: K_grids= "X B C S" ') call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) - io_err=io_QINDX(k,q,ID) + io_err=io_QINDX(k,q,ID,'minus_q') if (io_err/=0) then call msg('s',"Missing k/q scattering database") call error('Please (re)run the setup K_grids="C"') From 26859789669e4119c4ff4c51435da3ae15f51c09 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 15 Mar 2023 11:47:21 +0100 Subject: [PATCH 0596/1367] Version 5.1.0, Revision 22380, Hash 1397f0846 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] Small changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 19ebfd834f..c8db456c24 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22379 -#define YAMBO_HASH "ad8225035" +#define YAMBO_REVISION 22380 +#define YAMBO_HASH "1397f0846" diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index d6a450d2ac..b90c4ec44f 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -26,7 +26,7 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) use pars, ONLY:SP,DP,cZERO use R_lattice, ONLY:bz_samp,qindx_X,nkibz use wave_func, ONLY:WF - use electrons, ONLY:n_bands + use electrons, ONLY:n_bands,n_sp_pol use interfaces, ONLY:WF_load,WF_free use parallel_m, ONLY:PAR_IND_WF_b_and_k,PP_indexes_reset use parallel_int, ONLY:PARALLEL_WF_distribute @@ -50,6 +50,8 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) iq=IDB if (elph_use_q_grid) iq=DB_Q_map(IDB) ! + if (n_sp_pol==2) call error(' gkkp phase fixing not coded for n_sp_pol==2') + ! i_sp_pol=1 n_bands=DB_nb nkibz=kpts%nibz @@ -93,6 +95,7 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) call scatter_Bamp(YPP_scatt) ! ! To be fixed + ! rhotw(1)= Y_overlap(ib1,ib2)=YPP_scatt%rhotw(1) ! enddo From 3caca90f7d45058fb95f8fccba92bfc61e00cf03 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 19 Mar 2023 18:25:23 +0100 Subject: [PATCH 0597/1367] Version 5.1.0, Revision 22381, Hash 268597896 MODIFIED * include/driver/version.h ypp/interface/INIT_load_ypp.F Bugs: -Fixed small bug, GkkpBands was always activated Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- ypp/interface/INIT_load_ypp.F | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c8db456c24..e71aa0ec1a 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22380 -#define YAMBO_HASH "1397f0846" +#define YAMBO_REVISION 22381 +#define YAMBO_HASH "268597896" diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index e8cf167e31..6c6af2dfb2 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -314,7 +314,6 @@ subroutine INIT_ypp_load(defs) ! !EL-PH ! - call initactivate(1,"GkkpBands SkipDW") call it(defs,'DBsPATH', 'Path to the PW el-ph databases',elph_dbs_path) call it(defs,'PHfreqF', 'PWscf format file containing the phonon frequencies',ph_freqs_file) call it(defs,'PHmodeF', 'PWscf format file containing the phonon modes',ph_modes_file) From de6a70a59117257376fd3b042e6e06ada87f1fce Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 Mar 2023 11:38:20 +0100 Subject: [PATCH 0598/1367] Version 5.1.0, Revision 22382, Hash 3caca90f7 MODIFIED * include/driver/version.h allocations/ELPH_alloc.F ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_elemental.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F ypp/el-ph/ELPH_databases_IO_transfer_and_write.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F ypp/modules/mod_YPP_ELPH.F Changes: - [ypp_ph] Restored compatibility with old s.dbph_* Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/allocations/ELPH_alloc.F | 8 ++++--- ypp/el-ph/ELPH_databases.F | 8 +++---- ypp/el-ph/ELPH_databases_IO_elemental.F | 14 +++++++----- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 22 ++++++++++++++----- .../ELPH_databases_IO_transfer_and_write.F | 6 +++-- ypp/interface/INIT_load_ypp.F | 1 + ypp/interface/INIT_ypp.F | 2 +- ypp/modules/mod_YPP_ELPH.F | 12 +++++++--- 9 files changed, 50 insertions(+), 27 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index e71aa0ec1a..c96b62e1a5 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22381 -#define YAMBO_HASH "268597896" +#define YAMBO_REVISION 22382 +#define YAMBO_HASH "3caca90f7" diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index ec58caced8..36549f2cd6 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -28,7 +28,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) use R_lattice, ONLY:nkbz,nqbz use electrons, ONLY:E_reset use QP_m, ONLY:QP_n_states - use ELPH, ONLY:GKKP_me,PH_pol_vector,ph_modes,PH_freqs_sq,& + use ELPH, ONLY:GKKP_me,PH_pol_vector,ph_modes,PH_freqs_sq,l_GKKP_hosts_Ovlp,& & PH_acoustic_speed,PH_acoustic_branch,gsqF_life_f,gsqF_life_bose,gsqF_fan,& & gsqF_ca_corr,gsqF_dw,PH_Q_modulus,PH_qpt,elph_bands,elph_nQ,eval_G_using_KK,& & gsqF_energy_steps,PH_kpt_bz,elph_nk_bz,elph_use_q_grid,FineGd_E_kpq_components_reset @@ -83,8 +83,10 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) GKKP%KIND=trim(strings(is)) YAMBO_ALLOC(GKKP%dVc,(GKKP%Nmodes(1):GKKP%Nmodes(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) GKKP%dVc=cZERO - YAMBO_ALLOC(GKKP%Ovlp,(GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) - GKKP%Ovlp=cZERO + if (l_GKKP_hosts_Ovlp) then + YAMBO_ALLOC(GKKP%Ovlp,(GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) + GKKP%Ovlp=cZERO + endif endif ! case ('LEVELS') diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 76c7af6e83..7a160cdef7 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -66,11 +66,11 @@ subroutine ELPH_databases(k,E,q) ! Logicals & Init !================= call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) + call parser('GkkpIncludeOvlp',l_GKKP_hosts_Ovlp) call parser('GkkpExpand',l_gkkp_expand) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('GkkpSkipDW',l_GKKP_skip_DW) l_GKKP_hosts_DW=.not.l_GKKP_skip_DW - l_GKKP_hosts_Ovlp=.TRUE. ! if(l_gkkp_expand.and.l_gkkp_expand_only_k) & & call error(' Both flags "GkkpExpand" and "GkkpExpOnlyK" cannot be present at the same moment! ') @@ -288,7 +288,7 @@ subroutine ELPH_databases(k,E,q) db_name='gkkp' if(l_gkkp_expand.or.l_gkkp_expand_only_k) db_name='gkkp_expanded' ! - call ELPH_switch_X_indexes_convention(k,q,"plus_q") + if (l_GKKP_hosts_Ovlp) call ELPH_switch_X_indexes_convention(k,q,"plus_q") ! do idb=1,DB_nq ! @@ -300,7 +300,7 @@ subroutine ELPH_databases(k,E,q) ! io_err(1)=ELPH_databases_IO_elemental("dV KPT GKKP",idb) call ELPH_databases_IO_grids_check(k) - call ELPH_databases_IO_fix_phases(idb,k) + if (l_GKKP_hosts_Ovlp) call ELPH_databases_IO_fix_phases(idb,k) call ELPH_databases_IO_transfer_and_write(idb,k,E,GKKP) call ELPH_databases_IO_gkkp_expand("K",iq,1,k,q,qindx_ID,qindx_ID_frag,GKKP) ! @@ -341,7 +341,7 @@ subroutine ELPH_databases(k,E,q) enddo call live_timing() ! - call ELPH_switch_X_indexes_convention(k,q,"minus_q") + if (l_GKKP_hosts_Ovlp) call ELPH_switch_X_indexes_convention(k,q,"minus_q") ! ! Clean !======= diff --git a/ypp/el-ph/ELPH_databases_IO_elemental.F b/ypp/el-ph/ELPH_databases_IO_elemental.F index 6ceb5e5332..192e35a8f6 100644 --- a/ypp/el-ph/ELPH_databases_IO_elemental.F +++ b/ypp/el-ph/ELPH_databases_IO_elemental.F @@ -38,7 +38,7 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! ENDDO ! use pars, ONLY:DP,schlen,SP,cZERO - use ELPH, ONLY:PH_W_debye + use ELPH, ONLY:PH_W_debye,l_GKKP_hosts_Ovlp use YPP_ELPH, ONLY:DB_kind,DB_ph_modes,DB_nk,DB_nb,DB_ph_kpt,DB_PH_qpt,& & DB_ph_pol_vec,DB_ph_freq_sq,DB_alat,DB_E_k,DB_E_k_plus_q,& & DB_grad_at_gamma,DB_gkkp,DB_Ovlp,elph_dbs_path,DB_K_map @@ -108,7 +108,7 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! if (index(what,"POL_VEC")>0) then read (io_unit(ID)) - read (io_unit(ID)) + if (l_GKKP_hosts_Ovlp) read (io_unit(ID)) read (io_unit(ID)) DB_ph_pol_vec(IDB,:,:,:) endif ! @@ -137,16 +137,18 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! ! GKKP ! - if (IDB==1) DB_grad_at_gamma=cZERO - DB_gkkp=cZERO - DB_Ovlp=cZERO + if (IDB==1) then + DB_grad_at_gamma=cZERO + DB_gkkp=cZERO + if (l_GKKP_hosts_Ovlp) DB_Ovlp=cZERO + endif ! do ik=1,DB_nk ! ik_yambo=DB_K_map(ik) ! read (io_unit(ID)) DB_gkkp(:,:,:,ik) - read (io_unit(ID)) DB_Ovlp(:,:,ik) + if (l_GKKP_hosts_Ovlp) read (io_unit(ID)) DB_Ovlp(:,:,ik) read (io_unit(ID)) ! DB_gkkp(:,:,:,ik)=DB_gkkp(:,:,:,ik)*dVRY2Ha diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index a69feb6afa..acf097eaa3 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -27,7 +27,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag use R_lattice, ONLY:bz_samp,qindx_B,qindx_B_load,qindx_C use interfaces, ONLY:ELPH_alloc use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_tab - use ELPH, ONLY:elph_bands,GKKP_me,PH_qpt + use ELPH, ONLY:elph_bands,GKKP_me,PH_qpt,l_GKKP_hosts_Ovlp use YPP_ELPH, ONLY:DB_ph_K_sym_table,YAMBO_K_found,l_use_qindxB use parser_m, ONLY:parser ! @@ -93,7 +93,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag if (local_K_found(ik_bz)) cycle if (l_debug) write (*,*) "Expanding k ",ik_bz," from ",ik GKKP%dVc(:,:,:,ik_bz,1)=GKKP%dVc(:,:,:,ik,1) - GKKP%Ovlp (:,:,ik_bz,1)=GKKP%Ovlp (:,:,ik,1) + if (l_GKKP_hosts_Ovlp) GKKP%Ovlp (:,:,ik_bz,1)=GKKP%Ovlp (:,:,ik,1) if (allocated(GKKP%dVr)) GKKP%dVr(:,:,:,ik_bz,1)=GKKP%dVr(:,:,:,ik,1) GKKP%E_kpq(iq)%E(:,ik_bz,1)=GKKP%E_kpq(iq)%E(:,ik,1) local_K_found(ik_bz)=.TRUE. @@ -179,14 +179,24 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag do ob=elph_bands(1),elph_bands(2) if (l_bands_reverted) then GKKP_expanded%dVc(:,ob,ib,ik_bz,1)=conjg(GKKP%dVc(:,ib,ob,ik_bz_gkkp,1)) - GKKP_expanded%Ovlp (ob,ib,ik_bz,1)=conjg(GKKP%Ovlp (ib,ob,ik_bz_gkkp,1)) else GKKP_expanded%dVc(:,ib,ob,ik_bz,1)=GKKP%dVc(:,ib,ob,ik_bz_gkkp,1) - GKKP_expanded%Ovlp (ib,ob,ik_bz,1)=GKKP%Ovlp (ib,ob,ik_bz_gkkp,1) endif - ! enddo enddo + ! + if (l_GKKP_hosts_Ovlp) then + do ib=elph_bands(1),elph_bands(2) + do ob=elph_bands(1),elph_bands(2) + if (l_bands_reverted) then + GKKP_expanded%Ovlp (ob,ib,ik_bz,1)=conjg(GKKP%Ovlp (ib,ob,ik_bz_gkkp,1)) + else + GKKP_expanded%Ovlp (ib,ob,ik_bz,1)=GKKP%Ovlp (ib,ob,ik_bz_gkkp,1) + endif + enddo + enddo + endif + ! enddo ! ! For the energies E(k+q) @@ -237,7 +247,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag enddo ! GKKP%dVc=GKKP_expanded%dVc - GKKP%Ovlp=GKKP_expanded%Ovlp + if (l_GKKP_hosts_Ovlp) GKKP%Ovlp=GKKP_expanded%Ovlp GKKP%E_kpq(iq)%E=GKKP_expanded%E_kpq(iq)%E ! if(l_use_qindxB) qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) diff --git a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F index 8ab3bb392a..9ba655c719 100644 --- a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F +++ b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F @@ -26,7 +26,7 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) use pars, ONLY:SP,DP,rZERO,cZERO use D_lattice, ONLY:n_atoms use R_lattice, ONLY:bz_samp - use ELPH, ONLY:GKKP_me,elph_use_q_grid,elph_bands + use ELPH, ONLY:GKKP_me,elph_use_q_grid,elph_bands,l_GKKP_hosts_Ovlp use YPP_ELPH, ONLY:DB_ph_pol_vec,DB_E_k,DB_kind,DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,& & DB_nb,DB_ph_modes,DB_grad_at_gamma,DB_E_k_plus_q,DB_Q_map use electrons, ONLY:levels @@ -95,7 +95,9 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) do ib2=elph_bands(1),elph_bands(2) ! GKKP%dVc(:,ib1,ib2,ik_bz,1)=cmplx(DB_gkkp(ib1,ib2,:,ik_db),kind=SP) - GKKP%Ovlp(ib1,ib2,ik_bz,1)= cmplx(DB_Ovlp(ib1,ib2,ik_db),kind=SP) + if (l_GKKP_hosts_Ovlp) then + GKKP%Ovlp(ib1,ib2,ik_bz,1)= cmplx(DB_Ovlp(ib1,ib2,ik_db),kind=SP) + endif ! if (trim(GKKP%KIND)=="dV_bare") cycle ! diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 6c6af2dfb2..6b900cbd79 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -327,6 +327,7 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'TestPHDGrid','Test double-grid: set all values of the fine grid equal to the couse ones') call it('f',defs,'GkkpReadBare','Read the bare gkkp') call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') + call it('f',defs,'GkkpIncludeOvlp','GKKP matrix elements also include Ovlp') call it('f',defs,'GkkpExpOnlyK','Expand only k-points and not the q-points (that should be already in BZ)') call it('f',defs,'GkkpSkipDW','Do not include the DW factor in the databases') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 4246e61658..9a84cc7685 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -724,7 +724,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #if defined _YPP_ELPH if (l_gkkp_db) then call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpExpOnlyK UseQindxB") - call initactivate(1,"GkkpBands GkkpSkipDW") + call initactivate(1,"GkkpBands GkkpSkipDW GkkpIncludeOvlp") endif if (l_gkkp_sngl) call initactivate(1,"DBsPATH GkkpExpOnlyK UseQindxB") if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index e9ea39bdd4..e8b173a386 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -124,7 +124,8 @@ subroutine ELPH_databases_IO_freqs(ph_file,n_q,q_pt,ph_freqs) ! contains ! - subroutine ELPH_DB_alloc() + subroutine ELPH_DB_alloc() + use ELPH, ONLY:l_GKKP_hosts_Ovlp YAMBO_ALLOC(DB_Q_map,(DB_nq)) DB_Q_map=0 YAMBO_ALLOC(DB_K_map,(nkbz)) @@ -133,7 +134,9 @@ subroutine ELPH_DB_alloc() YAMBO_ALLOC(DB_ph_kpt,(3,nkbz)) YAMBO_ALLOC(DB_grad_at_gamma,(DB_nb,DB_nb,n_atoms,3,nkbz)) YAMBO_ALLOC(DB_gkkp,(DB_nb,DB_nb,DB_ph_modes,nkbz)) - YAMBO_ALLOC(DB_Ovlp,(DB_nb,DB_nb,nkbz)) + if (l_GKKP_hosts_Ovlp) then + YAMBO_ALLOC(DB_Ovlp,(DB_nb,DB_nb,nkbz)) + endif YAMBO_ALLOC(DB_ph_pol_vec,(DB_nq,DB_ph_modes,n_atoms,3)) YAMBO_ALLOC(DB_ph_freq_sq,(DB_nq,DB_ph_modes)) YAMBO_ALLOC(DB_E_k,(DB_nb,nkbz)) @@ -141,6 +144,7 @@ subroutine ELPH_DB_alloc() end subroutine ! subroutine ELPH_DB_free() + use ELPH, ONLY:l_GKKP_hosts_Ovlp YAMBO_FREE(DB_Q_map) YAMBO_FREE(DB_K_map) YAMBO_FREE(YAMBO_K_found) @@ -148,7 +152,9 @@ subroutine ELPH_DB_free() YAMBO_FREE(DB_ph_kpt) YAMBO_FREE(DB_grad_at_gamma) YAMBO_FREE(DB_gkkp) - YAMBO_FREE(DB_Ovlp) + if (l_GKKP_hosts_Ovlp) then + YAMBO_FREE(DB_Ovlp) + endif YAMBO_FREE(DB_ph_pol_vec) YAMBO_FREE(DB_ph_freq_sq) YAMBO_FREE(DB_E_k) From 380de77e1f86ac0aebebc76cc546c9a6651f191e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 Mar 2023 14:47:21 +0100 Subject: [PATCH 0599/1367] Version 5.1.0, Revision 22383, Hash de6a70a59 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] el-ph/ELPH_databases_IO_fix_phases.F adapted to notes from Fulvio Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 44 ++++++++++++++---------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index c96b62e1a5..f9bbdfe031 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22382 -#define YAMBO_HASH "3caca90f7" +#define YAMBO_REVISION 22383 +#define YAMBO_HASH "de6a70a59" diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index b90c4ec44f..b86259c577 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -28,6 +28,7 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) use wave_func, ONLY:WF use electrons, ONLY:n_bands,n_sp_pol use interfaces, ONLY:WF_load,WF_free + use matrix_operate, ONLY:hermitian use parallel_m, ONLY:PAR_IND_WF_b_and_k,PP_indexes_reset use parallel_int, ONLY:PARALLEL_WF_distribute use ELPH, ONLY:elph_use_q_grid @@ -43,9 +44,9 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! type(elemental_collision):: YPP_scatt ! - complex(DP) :: PHASES_MATRIX(DB_nb,DB_nb) + complex(SP) :: PHASES_MATRIX(DB_nb,DB_nb),M_tmp(DB_nb,DB_nb) complex(SP) :: Y_overlap(DB_nb,DB_nb),det_tmp - integer :: ik_DB,iq,ik,ok,ik_bz,ok_bz,isymm,osymm,ib1,ib2,i_sp_pol,i_l,iGo + integer :: ik_DB,iq,ik,ikpq,ik_bz,ikpq_bz,isymm1,isymm2,ib1,ib2,i_sp_pol,i_l,iGo ! iq=IDB if (elph_use_q_grid) iq=DB_Q_map(IDB) @@ -67,18 +68,18 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! ik_bz=DB_K_map(ik_db) ! - ok_bz=qindx_X(iq,ik_bz,1) - iGo =qindx_X(iq,ik_bz,2) + ikpq_bz=qindx_X(iq,ik_bz,1) + iGo =qindx_X(iq,ik_bz,2) ! - ik =kpts%sstar(ik_bz,1) - isymm=kpts%sstar(ik_bz,2) + ik =kpts%sstar(ik_bz,1) + isymm1=kpts%sstar(ik_bz,2) ! - ok =kpts%sstar(ok_bz,1) - osymm=kpts%sstar(ok_bz,2) + ikpq =kpts%sstar(ikpq_bz,1) + isymm2=kpts%sstar(ikpq_bz,2) ! PAR_IND_WF_b_and_k%element_2d(:,:)=.false. PAR_IND_WF_b_and_k%element_2d(:,ik)=.true. - PAR_IND_WF_b_and_k%element_2d(:,ok)=.true. + PAR_IND_WF_b_and_k%element_2d(:,ikpq)=.true. ! call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.TRUE.) call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),title='Fix GKKP phases',quiet=.true.) @@ -88,15 +89,15 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) do ib1=1,DB_nb do ib2=1,DB_nb ! - YPP_scatt%is=(/ib1,ik,isymm,i_sp_pol/) - YPP_scatt%os=(/ib2,ok,osymm,i_sp_pol/) + YPP_scatt%is=(/ib2,ikpq,isymm2,i_sp_pol/) + YPP_scatt%os=(/ib1,ik, isymm1,i_sp_pol/) YPP_scatt%qs=(/iGo,iq,1/) ! + ! rhotw(1)= < b2 k+q | b1 k> call scatter_Bamp(YPP_scatt) ! - ! To be fixed - ! rhotw(1)= - Y_overlap(ib1,ib2)=YPP_scatt%rhotw(1) + ! Y_overlap= < b2 k+q | b1 k> + Y_overlap(ib2,ib1)=YPP_scatt%rhotw(1) ! enddo enddo @@ -104,12 +105,19 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) call WF_free(WF) call elemental_collision_free(YPP_scatt) ! - ! Serial inversion probably not needed, part to be fixed - call SERIAL_inversion(DB_nb,Y_overlap,det_tmp,.false.) - PHASES_MATRIX=matmul(cmplx(Y_overlap,kind=DP),DB_Ovlp(:,:,ik_db)) + ! Eq. 6 notes Fulvio + ! PHASES_MATRIX= (QE_overlap)^-1 * Y_overlap + M_tmp=cmplx(DB_Ovlp(:,:,ik_db),kind=SP) + call SERIAL_inversion(DB_nb,M_tmp,det_tmp,.false.) + PHASES_MATRIX=matmul(M_tmp,Y_overlap) ! + ! Eq. 8 notes Fulvio + ! U = (PHASES_MATRIX^dag)^-1 + PHASES_MATRIX=hermitian(PHASES_MATRIX) + call SERIAL_inversion(DB_nb,PHASES_MATRIX,det_tmp,.false.) do i_l=1,DB_ph_modes - DB_gkkp(:,:,i_l,ik_db)=matmul(PHASES_MATRIX,DB_gkkp(:,:,i_l,ik_db)) + ! Gkkp^y = U Gkkp^QE + DB_gkkp(:,:,i_l,ik_db)=matmul(cmplx(PHASES_MATRIX,kind=DP),DB_gkkp(:,:,i_l,ik_db)) enddo ! enddo From dcc827b418a038b972500c5b3a0f299979611930 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 22 Mar 2023 10:12:35 +0100 Subject: [PATCH 0600/1367] Version 5.1.0, Revision 22384, Hash 380de77e1 MODIFIED * include/driver/version.h modules/mod_ELPH.F ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_fix_phases.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F Changes: - [ypp_ph] l_debug moved to global l_GKKP_debug and inserted als in fix_phases Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/modules/mod_ELPH.F | 1 + ypp/el-ph/ELPH_databases.F | 11 +++- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 75 +++++++++++++++++++++-- ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 8 +-- 5 files changed, 85 insertions(+), 14 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f9bbdfe031..b30a75a0d4 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22383 -#define YAMBO_HASH "de6a70a59" +#define YAMBO_REVISION 22384 +#define YAMBO_HASH "380de77e1" diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index cd27160d3e..1adc404782 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -135,6 +135,7 @@ module ELPH logical :: l_GKKP_hosts_Ovlp =.FALSE. logical :: l_GKKP_DB_exists =.FALSE. logical :: l_GKKP_expanded_DB_exists=.FALSE. + logical :: l_GKKP_debug=.FALSE. character(schlen) :: gkkp_db ! Database type for el-ph calculation (gkkp | expanded | genFroh ) ! contains diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 7a160cdef7..0eae6f34b3 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -30,7 +30,7 @@ subroutine ELPH_databases(k,E,q) use interfaces, ONLY:ELPH_alloc use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_bands,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,& & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,& -& l_GKKP_hosts_bare_dV,l_GKKP_hosts_Ovlp,l_GKKP_hosts_DW +& l_GKKP_debug,l_GKKP_hosts_bare_dV,l_GKKP_hosts_Ovlp,l_GKKP_hosts_DW use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab use R_lattice, ONLY:bz_samp,nqbz,nqibz @@ -68,6 +68,7 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) call parser('GkkpIncludeOvlp',l_GKKP_hosts_Ovlp) call parser('GkkpExpand',l_gkkp_expand) + call parser('GkkpDebug',l_GKKP_debug) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('GkkpSkipDW',l_GKKP_skip_DW) l_GKKP_hosts_DW=.not.l_GKKP_skip_DW @@ -282,13 +283,17 @@ subroutine ELPH_databases(k,E,q) enddo ! !... GKKP - call live_timing('ELPH databases: transfer and I/O',DB_nq) call section("*","== Q-points list in Yambo (iku units) ==") ! db_name='gkkp' if(l_gkkp_expand.or.l_gkkp_expand_only_k) db_name='gkkp_expanded' ! - if (l_GKKP_hosts_Ovlp) call ELPH_switch_X_indexes_convention(k,q,"plus_q") + if (l_GKKP_hosts_Ovlp) then + call msg('s',' Starting procedure to fix phases') + call ELPH_switch_X_indexes_convention(k,q,"plus_q") + endif + ! + call live_timing('ELPH databases: transfer and I/O',DB_nq) ! do idb=1,DB_nq ! diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index b86259c577..933f6f577a 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -31,7 +31,7 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) use matrix_operate, ONLY:hermitian use parallel_m, ONLY:PAR_IND_WF_b_and_k,PP_indexes_reset use parallel_int, ONLY:PARALLEL_WF_distribute - use ELPH, ONLY:elph_use_q_grid + use ELPH, ONLY:elph_use_q_grid,l_GKKP_debug use YPP_ELPH, ONLY:DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,DB_nb,DB_ph_modes,DB_Q_map use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc ! @@ -46,6 +46,7 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! complex(SP) :: PHASES_MATRIX(DB_nb,DB_nb),M_tmp(DB_nb,DB_nb) complex(SP) :: Y_overlap(DB_nb,DB_nb),det_tmp + real(SP) :: Ovlp_trace(DB_nb) integer :: ik_DB,iq,ik,ikpq,ik_bz,ikpq_bz,isymm1,isymm2,ib1,ib2,i_sp_pol,i_l,iGo ! iq=IDB @@ -57,13 +58,16 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) n_bands=DB_nb nkibz=kpts%nibz ! - Y_overlap=cZERO - ! call PP_indexes_reset(PAR_IND_WF_b_and_k) allocate(PAR_IND_WF_b_and_k%element_2D(DB_nb,nkibz)) ! ! GKKP & Levels !=============== + ! + ! DEBUG < + if (l_GKKP_debug) write(*,*) "Transferred momentum index q= ",iq + ! DEBUG > + ! do ik_db=1,DB_nk ! ik_bz=DB_K_map(ik_db) @@ -86,6 +90,8 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! call elemental_collision_alloc(YPP_scatt,NG=1,TITLE="BSE") ! + Y_overlap=cZERO + ! do ib1=1,DB_nb do ib2=1,DB_nb ! @@ -107,10 +113,67 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! ! Eq. 6 notes Fulvio ! PHASES_MATRIX= (QE_overlap)^-1 * Y_overlap + ! + ! option a) M_tmp=cmplx(DB_Ovlp(:,:,ik_db),kind=SP) - call SERIAL_inversion(DB_nb,M_tmp,det_tmp,.false.) + call SERIAL_inversion(DB_nb,M_tmp,det_tmp,.true.) + ! + ! option b) (QE_overlap)^-1=(QE_overlap)^dag + !det_tmp=cZERO + !M_tmp=hermitian(cmplx(DB_Ovlp(:,:,ik_db),kind=SP)) + ! PHASES_MATRIX=matmul(M_tmp,Y_overlap) ! + ! DEBUG < + if (l_GKKP_debug) then + write(*,*) "O_Y, O_QE and U at k ",ik_bz + write(*,*) "Y OVERLAP MATRIX " + do ib1=1,DB_nb + write(*,*) abs(Y_overlap(ib1,:)) + enddo + Ovlp_trace=0._SP + do ib1=1,DB_nb + do ib2=1,DB_nb + Ovlp_trace(ib1)=Ovlp_trace(ib1)+abs(Y_overlap(ib1,ib2))**2 + enddo + enddo + write(*,*) "Y OVERLAP TRACE ",Ovlp_trace + write(*,*) "" + ! + write(*,*) "QE OVERLAP MATRIX" + do ib1=1,DB_nb + write(*,*) real(abs(DB_Ovlp(ib1,:,ik_db)),kind=SP) + enddo + Ovlp_trace=0._SP + do ib1=1,DB_nb + do ib2=1,DB_nb + Ovlp_trace(ib1)=Ovlp_trace(ib1)+real(abs(DB_Ovlp(ib1,ib2,ik_db)),kind=SP)**2 + enddo + enddo + write(*,*) "QE OVERLAP TRACE ",Ovlp_trace + write(*,*) "" + ! + write(*,*) "QE OVERLAP inverted (det)",det_tmp + do ib1=1,DB_nb + write(*,*) abs(M_tmp(ib1,:)) + enddo + Ovlp_trace=0._SP + do ib1=1,DB_nb + do ib2=1,DB_nb + Ovlp_trace(ib1)=Ovlp_trace(ib1)+real(abs(DB_Ovlp(ib1,ib2,ik_db)),kind=SP)**2 + enddo + enddo + write(*,*) "QE OVERLAP inverted TRACE ",Ovlp_trace + write(*,*) "" + ! + write(*,*) "PHASES MATRIX " + do ib1=1,DB_nb + write(*,*) abs(PHASES_MATRIX(ib1,:)) + enddo + write(*,*) "" + endif + ! DEBUG > + ! ! Eq. 8 notes Fulvio ! U = (PHASES_MATRIX^dag)^-1 PHASES_MATRIX=hermitian(PHASES_MATRIX) @@ -122,4 +185,8 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! enddo ! + ! DEBUG < + if (l_GKKP_debug) write(*,*) "" + ! DEBUG > + ! end subroutine diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index acf097eaa3..dd05eaa86d 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -27,7 +27,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag use R_lattice, ONLY:bz_samp,qindx_B,qindx_B_load,qindx_C use interfaces, ONLY:ELPH_alloc use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_tab - use ELPH, ONLY:elph_bands,GKKP_me,PH_qpt,l_GKKP_hosts_Ovlp + use ELPH, ONLY:elph_bands,GKKP_me,PH_qpt,l_GKKP_debug,l_GKKP_hosts_Ovlp use YPP_ELPH, ONLY:DB_ph_K_sym_table,YAMBO_K_found,l_use_qindxB use parser_m, ONLY:parser ! @@ -49,9 +49,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag ! ! Debug: print kpt/qpt coordinates for plotting integer :: iaux - logical :: l_debug - call parser('GKKPDebug',l_debug) - if (l_debug) then + if (l_GKKP_debug) then open(1, file='K_grid_bz.dat') open(2, file='Q_grid_bz.dat') open(3, file='PH_Q_grid_bz.dat') @@ -91,7 +89,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag do is=1,nsmall ik_bz=DB_ph_K_sym_table(ik,sop_inv(small(is))) if (local_K_found(ik_bz)) cycle - if (l_debug) write (*,*) "Expanding k ",ik_bz," from ",ik + if (l_GKKP_debug) write (*,*) "Expanding k ",ik_bz," from ",ik GKKP%dVc(:,:,:,ik_bz,1)=GKKP%dVc(:,:,:,ik,1) if (l_GKKP_hosts_Ovlp) GKKP%Ovlp (:,:,ik_bz,1)=GKKP%Ovlp (:,:,ik,1) if (allocated(GKKP%dVr)) GKKP%dVr(:,:,:,ik_bz,1)=GKKP%dVr(:,:,:,ik,1) From 55d2c93eebd5122a0a2688e3cce6111b5f1b00c1 Mon Sep 17 00:00:00 2001 From: Nicola Spallanzani Date: Wed, 22 Mar 2023 10:28:13 +0100 Subject: [PATCH 0601/1367] added configure support for magma libraries. support for internal library compilation not yet available. --- config/configure.ac | 4 + config/m4/acx_report.m4 | 9 + config/m4/magma.m4 | 164 + config/mk/global/defs.mk.in | 3 +- config/report.in | 6 +- config/setup.in | 2 + configure | 8233 ++++++++++++++++------------------- 7 files changed, 3990 insertions(+), 4431 deletions(-) create mode 100644 config/m4/magma.m4 diff --git a/config/configure.ac b/config/configure.ac index c09d9b4a59..1afa0125d1 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -247,6 +247,7 @@ m4_include([config/m4/iotk.m4]) m4_include([config/m4/etsf_io.m4]) m4_include([config/m4/scalapack.m4]) m4_include([config/m4/petsc_slepc.m4]) +m4_include([config/m4/magma.m4]) # AC_LANG_PUSH(Fortran) # ============================================================================ @@ -293,6 +294,9 @@ ACX_LIBXC # CUDA AC_HAVE_CUDA # ============================================================================ +# MAGMA +AC_MAGMA_SETUP +# ============================================================================ # Prepare the REPORT file variables ACX_REPORT() # ============================================================================ diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index 804050e5d0..3402a1ca65 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -149,6 +149,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then SLEPC_check="C"; fi + if test "$compile_magma" = "no" ; then SLEPC_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -240,6 +248,7 @@ AC_SUBST(YDB_check) AC_SUBST(YPY_check) # AC_SUBST(LIBXC_check) +AC_SUBST(MAGMA_check) AC_SUBST(MPI_check) AC_SUBST(MPI_info) ]) diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 new file mode 100644 index 0000000000..a95275e23b --- /dev/null +++ b/config/m4/magma.m4 @@ -0,0 +1,164 @@ +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +AC_DEFUN([AC_MAGMA_SETUP],[ +# +AC_ARG_ENABLE(magma_linalg, AS_HELP_STRING([--enable-magma-linalg],[Enable suport for the diagonalization of BSE using MAGMA. Default is no])) +# +AC_ARG_WITH(magma_libs,AS_HELP_STRING([--with-magma-libs=],[Use Magma libraries ],[32])) +AC_ARG_WITH(magma_incs,AS_HELP_STRING([--with-magma-incs=],[Use Magma includes ],[32])) +AC_ARG_WITH(magma_path, AS_HELP_STRING([--with-magma-path=],[Path to the Magma install directory],[32]),[],[]) +AC_ARG_WITH(magma_libdir,AS_HELP_STRING([--with-magma-libdir=],[Path to the Magma lib directory],[32])) +AC_ARG_WITH(magma_includedir,AS_HELP_STRING([--with-magma-includedir=],[Path to the Magma include directory],[32])) + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then AC_MSG_CHECKING([for Magma using $with_magma_libs]) ; + elif test -d "$with_magma_libdir" ; then AC_MSG_CHECKING([for Magma in $with_magma_libdir]) ; + elif test -d "$with_magma_path" ; then AC_MSG_CHECKING([for Magma in $with_magma_path]) ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then AC_MSG_ERROR([No libs specified]) ; fi + if test -z "$try_MAGMA_INCS" ; then AC_MSG_ERROR([No include-dir specified]) ; fi + # + AC_LANG([Fortran]) + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [ +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA]), + [magma=yes], [magma=no]); + # + if test "x$magma" = "xyes"; then + AC_MSG_RESULT([yes]) ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + AC_MSG_RESULT([no]) ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + AC_MSG_CHECKING([for internal Magma library]) + # + internal_magma="yes" + # + if test "x$lapack_shared" = "x1" ; then + #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + MAGMA_LIBS="" ; + else + #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + MAGMA_LIBS="" ; + fi + #MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + MAGMA_INCS="" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + AC_MSG_RESULT([already compiled]) ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + AC_MSG_RESULT([already compiled]) ; + else + #compile_magma="yes" ; + #AC_MSG_RESULT([to be compiled]) ; + AC_MSG_RESULT([Compatible external Magma not found/specified. Internal compilation not available yet.]) ; + compile_magma="no" + def_magma="" + enable_magma="no" + fi + # +fi +# +AC_SUBST(MAGMA_LIBS) +AC_SUBST(MAGMA_INCS) +AC_SUBST(def_magma) +AC_SUBST(enable_magma) +AC_SUBST(compile_magma) +AC_SUBST(internal_magma) +# +]) diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index 1d4cd47b66..15e0967012 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -29,7 +29,8 @@ netcdf = @def_netcdf@ scalapack = @def_scalapack@ slepc = @def_slepc@ fft = @def_fft@ -xcpp = @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_memory_profile@ @def_uspp@ @def_cuda@ @def_yaml@ +magma = @def_magma@ +xcpp = @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_memory_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_magma@ p2ycpp = @PW_CPP@ keep_objs = @enable_keep_objects@ do_blacs = @compile_blacs@ diff --git a/config/report.in b/config/report.in index cedba40370..14209e4f20 100644 --- a/config/report.in +++ b/config/report.in @@ -68,6 +68,8 @@ # @PETSC_INCS@ # [@SLEPC_check@] SLEPC : @SLEPC_LIBS@ # @SLEPC_INCS@ +# [@MAGMA_check@] MAGMA : @MAGMA_LIBS@ +# @MAGMA_INCS@ # # > OTHERs # @@ -81,8 +83,8 @@ # FC kind = @FCKIND@ @FCVERSION@ # MPI kind= @MPIKIND@ # -# [ CPP ] @CPP@ @CPPFLAGS_yambo@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @PW_CPP@ -# [ FPP ] @FPP@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ +# [ CPP ] @CPP@ @CPPFLAGS_yambo@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @PW_CPP@ @def_magma@ +# [ FPP ] @FPP@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_cuda@ @def_yaml@ @def_magma@ # [ CC ] @CC@ @CFLAGS@ # [ FC ] @FC@ @FCFLAGS@ @OPENMPLIBS@ @CUDA_FLAGS@ # [ FCUF] @FCUFLAGS@ @CUDA_FLAGS@ diff --git a/config/setup.in b/config/setup.in index bfbc4344b2..b6f48877cb 100644 --- a/config/setup.in +++ b/config/setup.in @@ -83,6 +83,8 @@ lfutile = @FUTILE_LIBS@ ifutile = @FUTILE_INCS@ letsf = @ETSF_LIBS@ ietsf = @ETSF_INCS@ +lmagma = @MAGMA_LIBS@ +imagma = @MAGMA_INCS@ idriver = @DRIVER_INCS@ # # VPATH diff --git a/configure b/configure index c0727c247c..7d86fe4606 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.21876 h.7fe3130aa. +# Generated by GNU Autoconf 2.69 for Yambo 5.1.0 r.21879 h.7d3ae819b. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,52 +187,42 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null -then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -222,21 +230,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,19 +255,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,7 +294,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -312,14 +311,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -334,7 +325,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -343,7 +334,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -382,13 +373,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -400,27 +390,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -432,9 +413,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -461,7 +442,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -505,7 +486,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -519,10 +500,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -536,13 +513,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -610,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.21876 h.7fe3130aa' -PACKAGE_STRING='Yambo 5.1.0 r.21876 h.7fe3130aa' +PACKAGE_VERSION='5.1.0 r.21879 h.7d3ae819b' +PACKAGE_STRING='Yambo 5.1.0 r.21879 h.7d3ae819b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -619,40 +589,45 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir MPI_info MPI_check +MAGMA_check LIBXC_check YPY_check YDB_check @@ -681,6 +656,12 @@ MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check +internal_magma +compile_magma +enable_magma +def_magma +MAGMA_INCS +MAGMA_LIBS CUDA_FLAGS def_cuda internal_libxc @@ -803,7 +784,6 @@ FFLAGS F77 FPP CPPFLAGS_yambo -CPP IFLAG FCLIBS OPENMPLIBS @@ -833,9 +813,6 @@ AR MAKE ifGNUmake hostname -SIZEOF_INT_P -SET_MAKE -LIBOBJS host_os host_vendor host_cpu @@ -844,9 +821,15 @@ build_os build_vendor build_cpu build +SIZEOF_INT_P +SET_MAKE +LIBOBJS ALLOCA Y_BRANCH GIT_CHECK +EGREP +GREP +CPP OBJEXT EXEEXT ac_ct_CC @@ -891,7 +874,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1004,6 +986,12 @@ with_libxc_libdir with_libxc_includedir enable_cuda enable_nvtx +enable_magma_linalg +with_magma_libs +with_magma_incs +with_magma_path +with_magma_libdir +with_magma_includedir ' ac_precious_vars='build_alias host_alias @@ -1013,10 +1001,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS UFLAGS -CPP FPP F77 FFLAGS @@ -1061,7 +1049,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1091,6 +1078,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1131,9 +1120,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1157,9 +1146,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1312,15 +1301,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1370,9 +1350,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1386,9 +1366,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1432,9 +1412,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1450,7 +1430,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1458,7 +1438,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1514,7 +1494,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1571,7 +1551,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.21876 h.7fe3130aa to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.21879 h.7d3ae819b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1611,7 +1591,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1637,7 +1616,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.21876 h.7fe3130aa:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.21879 h.7d3ae819b:";; esac cat <<\_ACEOF @@ -1688,6 +1667,8 @@ Optional Features: --enable-etsf-io Activate the ETSF_IO support --enable-cuda= Enable CUDA support --enable-nvtx= Enable NVTX support + --enable-magma-linalg Enable suport for the diagonalization of BSE using + MAGMA. Default is no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1760,6 +1741,12 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory Some influential environment variables: CC C compiler command @@ -1769,10 +1756,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags - CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1799,9 +1786,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1829,8 +1816,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1838,7 +1824,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1847,10 +1833,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.21876 h.7fe3130aa -generated by GNU Autoconf 2.71 +Yambo configure 5.1.0 r.21879 h.7d3ae819b +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1867,14 +1853,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1882,15 +1868,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1900,6 +1885,176 @@ fi } # ac_fn_c_try_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------- ## +## Report this to yambo@yambo-code.org ## +## ----------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1907,28 +2062,26 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1940,17 +2093,16 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (ac_aggr.$3) @@ -1959,15 +2111,14 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -1976,19 +2127,18 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2000,18 +2150,17 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2019,13 +2168,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2033,19 +2181,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2056,14 +2203,14 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2071,18 +2218,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2097,79 +2243,102 @@ fi } # ac_fn_c_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -} # ac_fn_c_try_run +#ifdef __STDC__ +# include +#else +# include +#endif -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2185,14 +2354,14 @@ fi ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2200,18 +2369,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2226,58 +2394,20 @@ fi } # ac_fn_fc_try_link -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2285,15 +2415,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2309,14 +2438,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2324,18 +2453,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2350,136 +2478,44 @@ fi } # ac_fn_f77_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.21876 h.7fe3130aa, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by Yambo $as_me 5.1.0 r.21879 h.7d3ae819b, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2512,12 +2548,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2552,7 +2584,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2587,13 +2619,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2604,8 +2634,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2629,7 +2659,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2637,14 +2667,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2652,15 +2682,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2668,8 +2698,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2683,48 +2713,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2734,508 +2779,92 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/config" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -SVERSION="5" -SSUBVERSION="1" -SPATCHLEVEL="0" -SREVISION="21876" -SHASH="7fe3130aa" +SVERSION="5" +SSUBVERSION="1" +SPATCHLEVEL="0" +SREVISION="21879" +SHASH="7d3ae819b" @@ -3254,6 +2883,34 @@ compdir=`echo "$PWD"` if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi # +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # @@ -3348,10 +3005,9 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test ${with_extlibs_path+y} -then : +if test "${with_extlibs_path+set}" = set; then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else $as_nop +else extlibs_path="${PWD}/lib/external" fi @@ -3362,8 +3018,7 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test ${enable_keep_objects+y} -then : +if test "${enable_keep_objects+set}" = set; then : enableval=$enable_keep_objects; fi @@ -3374,8 +3029,7 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test ${enable_keep_src+y} -then : +if test "${enable_keep_src+set}" = set; then : enableval=$enable_keep_src; fi @@ -3386,8 +3040,7 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test ${enable_keep_extlibs+y} -then : +if test "${enable_keep_extlibs+set}" = set; then : enableval=$enable_keep_extlibs; fi @@ -3405,8 +3058,7 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test ${enable_dp+y} -then : +if test "${enable_dp+set}" = set; then : enableval=$enable_dp; fi @@ -3422,8 +3074,7 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test ${enable_time_profile+y} -then : +if test "${enable_time_profile+set}" = set; then : enableval=$enable_time_profile; fi @@ -3439,8 +3090,7 @@ fi # USPP # # Check whether --enable-uspp was given. -if test ${enable_uspp+y} -then : +if test "${enable_uspp+set}" = set; then : enableval=$enable_uspp; fi @@ -3457,8 +3107,7 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test ${enable_memory_profile+y} -then : +if test "${enable_memory_profile+set}" = set; then : enableval=$enable_memory_profile; fi @@ -3474,8 +3123,7 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test ${enable_msgs_comps+y} -then : +if test "${enable_msgs_comps+set}" = set; then : enableval=$enable_msgs_comps; fi @@ -3492,10 +3140,9 @@ fi # # Check whether --with-editor was given. -if test ${with_editor+y} -then : +if test "${with_editor+set}" = set; then : withval=$with_editor; -else $as_nop +else with_editor="vim vi pico" fi @@ -3503,12 +3150,11 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_editor+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_editor+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3516,15 +3162,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3535,11 +3177,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -printf "%s\n" "$editor" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +$as_echo "$editor" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3554,10 +3196,9 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test ${with_echo+y} -then : +if test "${with_echo+set}" = set; then : withval=$with_echo; -else $as_nop +else with_echo="echo" fi @@ -3570,15 +3211,6 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3587,12 +3219,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3600,15 +3231,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3619,11 +3246,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3632,12 +3259,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3645,15 +3271,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3664,11 +3286,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3676,8 +3298,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3690,12 +3312,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3703,15 +3324,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3722,11 +3339,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3735,12 +3352,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3749,19 +3365,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3777,18 +3389,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3799,12 +3411,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3812,15 +3423,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3831,11 +3438,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3848,12 +3455,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3861,15 +3467,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3880,11 +3482,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3896,138 +3498,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4037,7 +3535,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4045,7 +3543,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4057,9 +3555,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4080,12 +3578,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4102,7 +3599,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4118,46 +3615,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4171,15 +3666,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4188,7 +3683,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4200,8 +3695,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4209,10 +3704,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4220,397 +3715,704 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include int -main (void) +main () { ; return 0; } _ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -int -main (void) -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu +rm -f conftest* -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= fi -ac_test_CFLAGS=${CFLAGS+y} -ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int -main (void) -{ +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : -int -main (void) -{ +else + ac_cv_header_stdc=no +fi +rm -f conftest* - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +fi -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int -main (void) +main () { - - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi +if ac_fn_c_try_run "$LINENO"; then : + else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 -fi fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi done - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes; then : have_malloc_h=1 -else $as_nop +else have_malloc_h=0 fi + CFLAGS=$SAVE if test "$have_malloc_h" -ne 0 then ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include " -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes -then : - printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : + $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h fi @@ -5037,12 +4839,11 @@ fi Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT_CHECK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -5050,15 +4851,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5069,11 +4866,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -printf "%s\n" "$GIT_CHECK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +$as_echo "$GIT_CHECK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5087,60 +4884,42 @@ fi # # Checks for library functions. # ============================================================================ -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : - printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = xyes -then : - printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes -then : - printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h +for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h -fi +done ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -printf %s "checking for working alloca.h... " >&6; } -if test ${ac_cv_working_alloca_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -5148,52 +4927,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes -else $as_nop +else ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -printf %s "checking for alloca... " >&6; } -if test ${ac_cv_func_alloca_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _MSC_VER +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER # include # define alloca _alloca # else -# ifdef __cplusplus -extern "C" -# endif +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); +# endif +# endif +# endif # endif #endif int -main (void) +main () { char *p = (char *) alloca (1); if (p) return 0; @@ -5201,22 +4980,20 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes -else $as_nop +else ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then -printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -5226,19 +5003,58 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + done +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -printf %s "checking stack direction for C alloca... " >&6; } -if test ${ac_cv_c_stack_direction+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5259,10 +5075,9 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 -else $as_nop +else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5270,24 +5085,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -printf "%s\n" "$ac_cv_c_stack_direction" >&6; } -printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __cplusplus @@ -5300,7 +5116,7 @@ main (void) /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. + /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5328,7 +5144,7 @@ main (void) iptr p = 0; ++p; } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5344,50 +5160,47 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes -else $as_nop +else ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -printf "%s\n" "#define const /**/" >>confdefs.h +$as_echo "#define const /**/" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5401,121 +5214,48 @@ case $ac_cv_c_inline in #define inline $ac_val #endif _ACEOF - ;; -esac - - - - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - + ;; +esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } -if test ${ac_cv_func_malloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif int -main (void) +main () { -void *p = malloc (0); - int result = !p; - free (p); - return result; +return ! malloc (0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop +else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5523,15 +5263,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5540,47 +5279,50 @@ else $as_nop esac -printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h +$as_echo "#define malloc rpl_malloc" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -printf %s "checking for GNU libc compatible realloc... " >&6; } -if test ${ac_cv_func_realloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; - esac -else $as_nop +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if ${ac_cv_func_realloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif int -main (void) +main () { -void *p = realloc (0, 0); - int result = !p; - free (p); - return result; +return ! realloc (0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop +else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5588,15 +5330,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5605,35 +5346,28 @@ else $as_nop esac -printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h +$as_echo "#define realloc rpl_realloc" >>confdefs.h fi # AC_FUNC_SETVBUF_REVERSE # This is reported as obsolete -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -printf %s "checking whether lstat correctly handles trailing slash... " >&6; } -if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; - esac -else $as_nop + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5644,10 +5378,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop +else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5662,12 +5395,14 @@ fi rm -f conftest.sym conftest.file fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +_ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5679,21 +5414,19 @@ esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -printf %s "checking whether stat accepts an empty string... " >&6; } -if test ${ac_cv_func_stat_empty_string_bug+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +$as_echo_n "checking whether stat accepts an empty string... " >&6; } +if ${ac_cv_func_stat_empty_string_bug+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5701,10 +5434,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no -else $as_nop +else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5712,8 +5444,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5722,18 +5454,19 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STAT_EMPTY_STRING_BUG 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5749,20 +5482,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -printf %s "checking for the size of a pointer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +$as_echo_n "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5788,10 +5521,12 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define POINTER_SIZE ${ac_pointersize} +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -printf "%s\n" "${ac_pointersize} bytes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +$as_echo "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5807,12 +5542,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5820,15 +5554,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5839,11 +5569,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5852,12 +5582,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5865,15 +5594,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5884,11 +5609,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5896,8 +5621,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5910,12 +5635,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5923,15 +5647,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5942,11 +5662,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5955,12 +5675,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5969,19 +5688,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5997,18 +5712,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6019,12 +5734,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -6032,15 +5746,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6051,11 +5761,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6068,12 +5778,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -6081,15 +5790,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6100,11 +5805,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6116,138 +5821,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6257,21 +5858,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -6281,33 +5881,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -6316,60 +5912,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -6384,144 +5977,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -6530,19 +6073,88 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# +# +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + hostname=`uname -n` # ============================================================================ # GNU Make MAKE="make" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -printf %s "checking for GNU make... " >&6; } -if test ${_cv_gnu_make_command+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +$as_echo_n "checking for GNU make... " >&6; } +if ${_cv_gnu_make_command+:} false; then : + $as_echo_n "(cached) " >&6 +else _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; @@ -6553,14 +6165,14 @@ else $as_nop done ; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -printf "%s\n" "$_cv_gnu_make_command" >&6; } ; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +$as_echo "$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -printf "%s\n" "\"Not found\"" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +$as_echo "\"Not found\"" >&6; }; fi @@ -6582,12 +6194,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6595,15 +6206,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6614,11 +6221,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6627,12 +6234,11 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6640,15 +6246,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6659,11 +6261,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6671,8 +6273,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6690,8 +6292,7 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test ${enable_options_check+y} -then : +if test "${enable_options_check+set}" = set; then : enableval=$enable_options_check; fi @@ -6715,12 +6316,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6728,15 +6328,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6747,11 +6343,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -printf "%s\n" "$FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6764,12 +6360,11 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6777,15 +6372,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6796,11 +6387,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -printf "%s\n" "$ac_ct_FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6812,8 +6403,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6822,7 +6413,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6832,7 +6423,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6842,7 +6433,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6851,12 +6442,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 -printf %s "checking whether the compiler supports GNU Fortran... " >&6; } -if test ${ac_cv_fc_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6865,48 +6455,43 @@ else $as_nop end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+y} +ac_test_FCFLAGS=${FCFLAGS+set} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -printf %s "checking whether $FC accepts -g... " >&6; } -if test ${ac_cv_prog_fc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_g=yes -else $as_nop +else ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -printf "%s\n" "$ac_cv_prog_fc_g" >&6; } -if test $ac_test_FCFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6940,8 +6525,8 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -printf %s "checking if the current OS is supported... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +$as_echo_n "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6975,31 +6560,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -printf "%s\n" "$as_me: a guest account on this machine." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +$as_echo "$as_me: Platform <${host}> is not supported." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +$as_echo "$as_me: providing either a list of compilers and options or" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +$as_echo "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -7015,8 +6600,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test ${with_f90ext+y} -then : +if test "${with_f90ext+set}" = set; then : withval=$with_f90ext; fi @@ -7028,12 +6612,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -printf %s "checking for Fortran flag to compile .f90 files... " >&6; } -if test ${ac_cv_fc_srcext_f90+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -7049,18 +6632,17 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -7086,12 +6668,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -printf %s "checking for Fortran flag to compile .f files... " >&6; } -if test ${ac_cv_fc_srcext_f+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } +if ${ac_cv_fc_srcext_f+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -7107,18 +6688,17 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +$as_echo "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -7209,10 +6789,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -printf %s "checking for $FC kind and version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +$as_echo_n "checking for $FC kind and version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -7229,8 +6809,7 @@ printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test ${enable_debug_flags+y} -then : +if test "${enable_debug_flags+set}" = set; then : enableval=$enable_debug_flags; fi @@ -7622,35 +7201,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -printf %s "checking for specific $FC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +$as_echo_n "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -printf "%s\n" "$FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +$as_echo "$FCFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -printf "%s\n" "(User-defined) $FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +$as_echo "(User-defined) $FCFLAGS" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -printf %s "checking for specific Open-MP flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -printf "%s\n" "$OMPFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +$as_echo_n "checking for specific Open-MP flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +$as_echo "$OMPFLAGS" >&6; } # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -printf %s "checking for specific $CC flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -printf "%s\n" "$CFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +$as_echo_n "checking for specific $CC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +$as_echo "$CFLAGS" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -printf %s "checking for specific unoptimized flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +$as_echo_n "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -printf "%s\n" "$FCUFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +$as_echo "$FCUFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -printf "%s\n" "(User-defined) $UFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +$as_echo "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7661,10 +7240,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -printf %s "checking for specific NETCDF flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -printf "%s\n" "$NETCDFFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +$as_echo_n "checking for specific NETCDF flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +$as_echo "$NETCDFFLAGS" >&6; } # @@ -7687,8 +7266,7 @@ FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" # OpenMP # # Check whether --enable-open-mp was given. -if test ${enable_open_mp+y} -then : +if test "${enable_open_mp+set}" = set; then : enableval=$enable_open_mp; fi @@ -7710,19 +7288,17 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -printf %s "checking how to get verbose linking output from $FC... " >&6; } -if test ${ac_cv_prog_fc_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7740,13 +7316,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7813,24 +7389,23 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -printf "%s\n" "$ac_cv_prog_fc_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -printf %s "checking for Fortran libraries of $FC... " >&6; } -if test ${ac_cv_fc_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7849,13 +7424,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7932,10 +7507,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -7948,10 +7522,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -7966,24 +7539,9 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) - # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; esac ;; @@ -8001,7 +7559,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -8010,10 +7568,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -8028,17 +7585,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -8050,7 +7605,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -8065,8 +7620,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -printf "%s\n" "$ac_cv_fc_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -8081,12 +7636,11 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -printf %s "checking for dummy main to link with Fortran libraries... " >&6; } -if test ${ac_cv_fc_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -8109,20 +7663,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -8139,18 +7692,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -8163,24 +7715,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown -then : +if test "$FC_DUMMY_MAIN" != unknown; then : if test $FC_DUMMY_MAIN != none; then -printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -8195,12 +7748,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -printf %s "checking for Fortran name-mangling scheme... " >&6; } -if test ${ac_cv_fc_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -8209,8 +7761,7 @@ else $as_nop return end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -8231,6 +7782,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8241,18 +7795,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -8287,6 +7840,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8297,18 +7853,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -8338,17 +7893,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -printf "%s\n" "$ac_cv_fc_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8371,8 +7926,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8387,11 +7941,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -8402,7 +7955,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8410,8 +7963,7 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8426,11 +7978,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -8441,12 +7992,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -printf %s "checking for external C routine (test) naming scheme... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -printf "%s\n" "$msg" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +$as_echo "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8454,48 +8005,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8554,12 +8105,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } -if test ${ac_cv_fc_freeform+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } +if ${ac_cv_fc_freeform+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8574,18 +8124,17 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -printf "%s\n" "$ac_cv_fc_freeform" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +$as_echo "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8610,12 +8159,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -printf %s "checking fortran 90 modules inclusion flag... " >&6; } -if test ${ax_cv_f90_modflag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } +if ${ax_cv_f90_modflag+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8638,11 +8186,10 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do @@ -8658,11 +8205,10 @@ for ax_flag in "-I" "-M" "-p"; do end program conftest_program _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ax_cv_f90_modflag="$ax_flag" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS="$ax_save_FCFLAGS" fi done @@ -8678,153 +8224,23 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -printf "%s\n" "$ax_cv_f90_modflag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +$as_echo "$ax_cv_f90_modflag" >&6; } IFLAG="$ax_cv_f90_modflag" if test -z "$IFLAG" ; then IFLAG="-I" ; fi # # ============================================================================ # CPP check & flags -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # case "${CPP}" in *icc* ) if test -z "$CPPFLAGS"; then CPPFLAGS="-ansi"; fi ;; + *icx* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-ansi"; fi + ;; *gcc* ) case "${host}" in *86*apple* ) @@ -8867,8 +8283,8 @@ case "${CPP}" in esac # # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} # # TESTS #======= @@ -8885,8 +8301,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -printf %s "checking if C precompiler works on C source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +$as_echo_n "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8898,15 +8314,14 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : acx_C_ok=yes -else $as_nop +else CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -printf "%s\n" "$acx_C_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +$as_echo "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -8954,8 +8369,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -8964,8 +8379,8 @@ printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -printf %s "checking if FC precompiler works on FC source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +$as_echo_n "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -8992,8 +8407,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -printf "%s\n" "$acx_FC_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +$as_echo "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -9022,12 +8437,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -9035,15 +8449,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9054,11 +8464,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -printf "%s\n" "$F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +$as_echo "$F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9071,12 +8481,11 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -9084,15 +8493,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9103,11 +8508,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -printf "%s\n" "$ac_ct_F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9119,8 +8524,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -9129,7 +8534,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -9139,7 +8544,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -9149,7 +8554,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -9158,12 +8563,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 -printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } -if test ${ac_cv_f77_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } +if ${ac_cv_f77_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -9172,48 +8576,43 @@ else $as_nop end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+y} +ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -printf %s "checking whether $F77 accepts -g... " >&6; } -if test ${ac_cv_prog_f77_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } +if ${ac_cv_prog_f77_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes -else $as_nop +else ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -printf "%s\n" "$ac_cv_prog_f77_g" >&6; } -if test $ac_test_FFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -9239,24 +8638,23 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : - acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO"; then : + acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9324,8 +8722,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test ${enable_mpi+y} -then : +if test "${enable_mpi+set}" = set; then : enableval=$enable_mpi; fi @@ -9356,12 +8753,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9369,15 +8765,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9388,11 +8780,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9401,13 +8793,12 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9417,22 +8808,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIFC_test=$MPIFC -else $as_nop +else for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9440,15 +8829,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9459,11 +8844,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9479,23 +8864,22 @@ fi if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9515,11 +8899,10 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -printf %s "checking for a working mpif.h... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +$as_echo_n "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9530,23 +8913,21 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9557,22 +8938,20 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -printf %s "checking for a working mpi module... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +$as_echo_n "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9583,15 +8962,14 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi # # @@ -9603,12 +8981,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9639,13 +9017,12 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -printf %s "checking for $MPIF77... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +$as_echo_n "checking for $MPIF77... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9655,22 +9032,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIF77 -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9678,15 +9053,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9697,11 +9068,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9712,13 +9083,12 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9728,22 +9098,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIFC -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9751,15 +9119,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9770,11 +9134,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9789,12 +9153,11 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9802,15 +9165,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9821,11 +9180,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9839,23 +9198,22 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : ac_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9891,12 +9249,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9932,12 +9290,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9945,15 +9302,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9964,11 +9317,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9977,13 +9330,12 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -printf %s "checking for $MPICC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +$as_echo_n "checking for $MPICC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -9993,26 +9345,24 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else $as_nop +else for ac_prog in $MPICC mpipgicc mpiicc mpicc hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -10020,15 +9370,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10039,11 +9385,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10060,8 +9406,7 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes -then : +if test "x$ac_cv_func_MPI_Init" = xyes; then : acx_mpi_ok="yes" fi @@ -10076,8 +9421,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10090,22 +9435,21 @@ printf %s "checking for a working mpi.h... " >&6; } #endif #endif int -main (void) +main () { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; };acx_mpi_ok="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -10130,12 +9474,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -10174,10 +9518,10 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -printf %s "checking for MPI version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -printf "%s\n" "$MPIKIND" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +$as_echo_n "checking for MPI version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +$as_echo "$MPIKIND" >&6; } # @@ -10197,29 +9541,25 @@ fi # Check whether --with-mpi_libs was given. -if test ${with_mpi_libs+y} -then : +if test "${with_mpi_libs+set}" = set; then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test ${with_mpi_path+y} -then : +if test "${with_mpi_path+set}" = set; then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test ${with_mpi_libdir+y} -then : +if test "${with_mpi_libdir+set}" = set; then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test ${with_mpi_includedir+y} -then : +if test "${with_mpi_includedir+set}" = set; then : withval=$with_mpi_includedir; fi @@ -10295,13 +9635,12 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -10311,12 +9650,11 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : mpif_found_tmp="yes" -else $as_nop +else mpif_found_tmp="no" fi @@ -10597,6 +9935,31 @@ url_ydb=https://github.com/yambo-code/ydb.git # +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -10611,10 +9974,9 @@ DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" # # Check whether --with-ydriver-branch was given. -if test ${with_ydriver_branch+y} -then : +if test "${with_ydriver_branch+set}" = set; then : withval=$with_ydriver_branch; -else $as_nop +else with_ydriver_branch=none fi @@ -10636,8 +9998,7 @@ fi # # Check whether --enable-ydb was given. -if test ${enable_ydb+y} -then : +if test "${enable_ydb+set}" = set; then : enableval=$enable_ydb; fi @@ -10651,12 +10012,11 @@ if test "x$enable_ydb" = "xyes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -10664,15 +10024,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10683,11 +10039,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -printf "%s\n" "$GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +$as_echo "$GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10696,12 +10052,11 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10709,15 +10064,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10728,11 +10079,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -printf "%s\n" "$ac_ct_GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +$as_echo "$ac_ct_GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10740,8 +10091,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10753,14 +10104,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -printf %s "checking YDB from $url_ydb... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +$as_echo_n "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10770,8 +10121,8 @@ printf %s "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10785,19 +10136,17 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -printf %s "checking how to get verbose linking output from $F77... " >&6; } -if test ${ac_cv_prog_f77_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } +if ${ac_cv_prog_f77_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10815,13 +10164,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10888,24 +10237,23 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -printf "%s\n" "$ac_cv_prog_f77_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -printf %s "checking for Fortran 77 libraries of $F77... " >&6; } -if test ${ac_cv_f77_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +$as_echo "$ac_cv_prog_f77_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } +if ${ac_cv_f77_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10924,13 +10272,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -11007,10 +10355,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -11023,42 +10370,26 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done -else - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi -fi - ;; - # Ignore these flags. - -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:* | -link) - ;; - -lkernel32) - # Ignore this library only on Windows-like systems. - case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi +fi + ;; + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ + |-LANG:=* | -LIST:* | -LNO:* | -link) + ;; + -lkernel32) + case $host_os in + *cygwin*) ;; + *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; esac ;; @@ -11076,7 +10407,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -11085,10 +10416,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -11103,17 +10433,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -11125,7 +10453,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | + ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -11140,8 +10468,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -printf "%s\n" "$ac_cv_f77_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +$as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -11157,20 +10485,17 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test ${enable_int_linalg+y} -then : +if test "${enable_int_linalg+set}" = set; then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test ${enable_openmp_int_linalg+y} -then : +if test "${enable_openmp_int_linalg+set}" = set; then : enableval=$enable_openmp_int_linalg; fi @@ -11178,8 +10503,7 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi @@ -11204,23 +10528,22 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_blas_ok=yes -else $as_nop +else BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -printf "%s\n" "$acx_blas_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +$as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -11229,10 +10552,9 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi @@ -11241,12 +10563,11 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -printf %s "checking for ATL_xerbla in -latlas... " >&6; } -if test ${ac_cv_lib_atlas_ATL_xerbla+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } +if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11254,27 +10575,24 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes -else $as_nop +else ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -printf %s "checking for $caxpy in -lf77blas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11282,27 +10600,24 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -printf %s "checking for cblas_daxpy in -lcblas... " >&6; } -if test ${ac_cv_lib_cblas_cblas_daxpy+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } +if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11310,20 +10625,18 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_daxpy=yes -else $as_nop +else ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -11336,13 +10649,12 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11350,28 +10662,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -printf %s "checking for $daxpy in -ldaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11379,28 +10688,25 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -printf %s "checking for $caxpy in -lcaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11408,21 +10714,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -11434,13 +10738,12 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -printf %s "checking for $caxpy in -lcxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +$as_echo_n "checking for $caxpy in -lcxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11448,21 +10751,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -11470,13 +10771,12 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -printf %s "checking for $caxpy in -ldxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +$as_echo_n "checking for $caxpy in -ldxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11484,21 +10784,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -11507,12 +10805,11 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -printf %s "checking for acosp in -lsunmath... " >&6; } -if test ${ac_cv_lib_sunmath_acosp+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +$as_echo_n "checking for acosp in -lsunmath... " >&6; } +if ${ac_cv_lib_sunmath_acosp+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11520,27 +10817,24 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes -else $as_nop +else ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -printf %s "checking for $caxpy in -lsunperf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11548,21 +10842,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -11574,13 +10866,12 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -printf %s "checking for $caxpy in -lscs... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +$as_echo_n "checking for $caxpy in -lscs... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11588,21 +10879,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -11610,13 +10899,12 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11624,21 +10912,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -11646,13 +10932,12 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11660,28 +10945,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -printf %s "checking for $caxpy in -lessl... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +$as_echo_n "checking for $caxpy in -lessl... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11689,21 +10971,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -11719,13 +10999,12 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11733,33 +11012,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -printf %s "checking for $caxpy in -lmkl_gf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11767,21 +11043,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11793,13 +11067,12 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11807,33 +11080,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -printf %s "checking for $caxpy in -lmkl_intel... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11841,21 +11111,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11866,13 +11134,12 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11880,21 +11147,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11905,7 +11170,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h +$as_echo "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11915,12 +11180,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11979,12 +11244,11 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if test ${ac_cv_f77_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if ${ac_cv_f77_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -12015,20 +11279,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -12053,18 +11316,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -12077,24 +11339,25 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +$as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown -then : +if test "$F77_DUMMY_MAIN" != unknown; then : if test $F77_DUMMY_MAIN != none; then -printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define F77_DUMMY_MAIN $F77_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -12108,12 +11371,11 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } -if test ${ac_cv_f77_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } +if ${ac_cv_f77_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -12122,8 +11384,7 @@ else $as_nop return end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -12144,6 +11405,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -12162,18 +11426,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -12208,6 +11471,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -12226,18 +11492,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -12267,17 +11532,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -printf "%s\n" "$ac_cv_f77_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +$as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -12291,8 +11556,7 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test ${with_lapack_libs+y} -then : +if test "${with_lapack_libs+set}" = set; then : withval=$with_lapack_libs; fi @@ -12318,23 +11582,22 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_lapack_ok=yes -else $as_nop +else LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -printf "%s\n" "$acx_lapack_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +$as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -12344,10 +11607,9 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi @@ -12358,13 +11620,12 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -printf %s "checking for $cheev in -l$lapack... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +$as_echo_n "checking for $cheev in -l$lapack... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -12372,21 +11633,19 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -12418,23 +11677,22 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_dlaran_ok=yes -else $as_nop +else acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -printf "%s\n" "$acx_dlaran_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +$as_echo "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -12442,7 +11700,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h +$as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -12452,12 +11710,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -12502,60 +11760,52 @@ fi # Check whether --with-fft_libs was given. -if test ${with_fft_libs+y} -then : +if test "${with_fft_libs+set}" = set; then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test ${with_fft_path+y} -then : +if test "${with_fft_path+set}" = set; then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test ${with_fft_libdir+y} -then : +if test "${with_fft_libdir+set}" = set; then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test ${with_fft_includedir+y} -then : +if test "${with_fft_includedir+set}" = set; then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test ${enable_internal_fftqe+y} -then : +if test "${enable_internal_fftqe+set}" = set; then : enableval=$enable_internal_fftqe; -else $as_nop +else enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test ${enable_internal_fftsg+y} -then : +if test "${enable_internal_fftsg+set}" = set; then : enableval=$enable_internal_fftsg; -else $as_nop +else enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test ${enable_3d_fft+y} -then : +if test "${enable_3d_fft+set}" = set; then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test ${with_fftsg_fac+y} -then : +if test "${with_fftsg_fac+set}" = set; then : withval=$with_fftsg_fac; fi @@ -12580,10 +11830,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -12599,16 +11849,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -printf %s "checking for FFT Library using $with_fft_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } fi # # check for FFTW @@ -12671,24 +11921,22 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW="yes"; -else $as_nop +else HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW_OMP="yes"; -else $as_nop +else HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -12700,18 +11948,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -printf "%s\n" "FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +$as_echo "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -printf "%s\n" "FFTW3_OMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +$as_echo "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -printf "%s\n" "FFTW ($desc) " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +$as_echo "FFTW ($desc) " >&6; } fi else def_fft="" @@ -12726,8 +11974,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -12737,8 +11985,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -printf "%s\n" "FFTW no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +$as_echo "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -12748,31 +11996,30 @@ printf "%s\n" "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -printf %s "checking for dcft in $LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +$as_echo_n "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_ESSL=yes -else $as_nop +else HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -printf "%s\n" "$HAVE_ESSL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +$as_echo "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -12784,8 +12031,8 @@ printf %s "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -printf "%s\n" "ESSL FFT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +$as_echo "ESSL FFT" >&6; } fi fi # @@ -12794,8 +12041,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -12832,8 +12079,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +$as_echo "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12859,8 +12106,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -printf "%s\n" "FFTSG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +$as_echo "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12881,8 +12128,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -printf "%s\n" "Internal FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +$as_echo "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12896,48 +12143,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12946,7 +12193,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - printf "%s\n" "#define _FFTQE 1" >>confdefs.h + $as_echo "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12968,80 +12215,69 @@ fi # # Check whether --enable-slepc_linalg was given. -if test ${enable_slepc_linalg+y} -then : +if test "${enable_slepc_linalg+set}" = set; then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test ${with_slepc_libs+y} -then : +if test "${with_slepc_libs+set}" = set; then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test ${with_slepc_incs+y} -then : +if test "${with_slepc_incs+set}" = set; then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test ${with_slepc_path+y} -then : +if test "${with_slepc_path+set}" = set; then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test ${with_slepc_libdir+y} -then : +if test "${with_slepc_libdir+set}" = set; then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test ${with_slepc_includedir+y} -then : +if test "${with_slepc_includedir+set}" = set; then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test ${with_petsc_libs+y} -then : +if test "${with_petsc_libs+set}" = set; then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test ${with_petsc_incs+y} -then : +if test "${with_petsc_incs+set}" = set; then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test ${with_petsc_path+y} -then : +if test "${with_petsc_path+set}" = set; then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test ${with_petsc_libdir+y} -then : +if test "${with_petsc_libdir+set}" = set; then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test ${with_petsc_includedir+y} -then : +if test "${with_petsc_includedir+set}" = set; then : withval=$with_petsc_includedir; fi @@ -13065,12 +12301,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13079,6 +12314,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13097,29 +12335,27 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi @@ -13154,12 +12390,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -13202,24 +12438,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : petsc=yes -else $as_nop +else petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13232,8 +12467,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -printf %s "checking for internal Petsc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +$as_echo_n "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # @@ -13249,16 +12484,16 @@ printf %s "checking for internal Petsc library... " >&6; } petsc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.a" ; then compile_petsc="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; elif test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libpetsc.so" ; then compile_petsc="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_petsc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi # fi @@ -13285,12 +12520,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -13329,25 +12564,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : slepc=yes -else $as_nop +else slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13361,8 +12595,8 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -printf %s "checking for internal Slepc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +$as_echo_n "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # @@ -13376,16 +12610,16 @@ printf %s "checking for internal Slepc library... " >&6; } slepc=yes if test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.a" ; then compile_slepc="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; elif test -e "${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib/libslepc.so" ; then compile_slepc="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_slepc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -13409,22 +12643,19 @@ fi # Check whether --enable-par_linalg was given. -if test ${enable_par_linalg+y} -then : +if test "${enable_par_linalg+set}" = set; then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test ${with_blacs_libs+y} -then : +if test "${with_blacs_libs+set}" = set; then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test ${with_scalapack_libs+y} -then : +if test "${with_scalapack_libs+set}" = set; then : withval=$with_scalapack_libs; fi @@ -13506,23 +12737,22 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_blacs="yes" -else $as_nop +else enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -printf "%s\n" "$enable_blacs" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +$as_echo "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -13537,23 +12767,22 @@ printf "%s\n" "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_scalapack="yes" -else $as_nop +else enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -printf "%s\n" "$enable_scalapack" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +$as_echo "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -13627,29 +12856,25 @@ LIBS="$reset_LIBS" # # Check whether --with-hdf5_libs was given. -if test ${with_hdf5_libs+y} -then : +if test "${with_hdf5_libs+set}" = set; then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test ${with_hdf5_path+y} -then : +if test "${with_hdf5_path+set}" = set; then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test ${with_hdf5_libdir+y} -then : +if test "${with_hdf5_libdir+set}" = set; then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test ${with_hdf5_includedir+y} -then : +if test "${with_hdf5_includedir+set}" = set; then : withval=$with_hdf5_includedir; fi @@ -13657,8 +12882,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -13666,10 +12890,9 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test ${enable_hdf5_par_io+y} -then : +if test "${enable_hdf5_par_io+set}" = set; then : enableval=$enable_hdf5_par_io; -else $as_nop +else enable_hdf5_par_io="yes" fi @@ -13677,8 +12900,7 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test ${enable_hdf5_p2y_support+y} -then : +if test "${enable_hdf5_p2y_support+set}" = set; then : enableval=$enable_hdf5_p2y_support; fi @@ -13709,13 +12931,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -printf %s "checking for deflate in -lz ... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +$as_echo_n "checking for deflate in -lz ... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13724,6 +12945,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13742,39 +12966,36 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : use_libz="yes"; -else $as_nop +else use_libz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -printf %s "checking for deflate in -lsz... " >&6; } -if test ${ac_cv_lib_sz_deflate+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +$as_echo_n "checking for deflate in -lsz... " >&6; } +if ${ac_cv_lib_sz_deflate+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13783,6 +13004,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13801,38 +13025,35 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sz_deflate=yes -else $as_nop +else ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +$as_echo "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes; then : use_libsz="yes"; -else $as_nop +else use_libsz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13841,6 +13062,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13859,38 +13083,35 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -printf %s "checking for curl_version in -lcurl... " >&6; } -if test ${ac_cv_lib_curl_curl_version+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +$as_echo_n "checking for curl_version in -lcurl... " >&6; } +if ${ac_cv_lib_curl_curl_version+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13899,6 +13120,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13917,38 +13141,35 @@ char curl_version (); #endif #endif int -main (void) +main () { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_curl_version=yes -else $as_nop +else ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +$as_echo "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes; then : use_libcurl="yes"; -else $as_nop +else use_libcurl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -printf %s "checking for cos in -lm... " >&6; } -if test ${ac_cv_lib_m_cos+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13957,6 +13178,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -13975,29 +13199,27 @@ char cos (); #endif #endif int -main (void) +main () { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes -else $as_nop +else ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -printf "%s\n" "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : use_libm="yes"; -else $as_nop +else use_libm="no"; fi @@ -14041,8 +13263,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # if test x"$with_hdf5_libs" != "x" ; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 -printf %s "checking for HDF5 using $with_hdf5_libs... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using $with_hdf5_libs" >&5 +$as_echo_n "checking for HDF5 using $with_hdf5_libs... " >&6; } ; try_HDF5_LIBS="$with_hdf5_libs" ; if test -d "$try_hdf5_incdir" ; then try_HDF5_INCS="$IFLAG$try_hdf5_incdir" ; fi # @@ -14063,13 +13285,12 @@ printf %s "checking for HDF5 using $with_hdf5_libs... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -14079,8 +13300,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # # Automatic detection of hdf5 libs copied from QE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -14126,23 +13347,22 @@ printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -printf %s "checking for HDF5 using automatic library list... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -14182,13 +13402,12 @@ printf %s "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -14200,13 +13419,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -printf "%s\n" "yes - parallel lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +$as_echo "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -printf "%s\n" "yes - serial lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +$as_echo "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -14214,13 +13433,13 @@ printf "%s\n" "yes - serial lib found" >&6; } ; fi # if test "x$hdf5" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; - if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + if test -d "$with_hdf5_libdir" || test -d "$with_hdf5_path"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -printf %s "checking for internal HDF5 library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +$as_echo_n "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -14236,8 +13455,8 @@ printf %s "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -14245,8 +13464,8 @@ printf "%s\n" "already compiled" >&6; } ; IO_LIB_VER="parallel"; HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14255,8 +13474,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14313,58 +13532,50 @@ fi # Check whether --with-netcdf_libs was given. -if test ${with_netcdf_libs+y} -then : +if test "${with_netcdf_libs+set}" = set; then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test ${with_netcdf_path+y} -then : +if test "${with_netcdf_path+set}" = set; then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test ${with_netcdf_libdir+y} -then : +if test "${with_netcdf_libdir+set}" = set; then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test ${with_netcdf_includedir+y} -then : +if test "${with_netcdf_includedir+set}" = set; then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test ${with_netcdff_libs+y} -then : +if test "${with_netcdff_libs+set}" = set; then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test ${with_netcdff_path+y} -then : +if test "${with_netcdff_path+set}" = set; then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test ${with_netcdff_libdir+y} -then : +if test "${with_netcdff_libdir+set}" = set; then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test ${with_netcdff_includedir+y} -then : +if test "${with_netcdff_includedir+set}" = set; then : withval=$with_netcdff_includedir; fi @@ -14372,8 +13583,7 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test ${enable_netcdf_classic+y} -then : +if test "${enable_netcdf_classic+set}" = set; then : enableval=$enable_netcdf_classic; fi @@ -14381,8 +13591,7 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test ${enable_netcdf_par_io+y} -then : +if test "${enable_netcdf_par_io+set}" = set; then : enableval=$enable_netcdf_par_io; fi @@ -14390,8 +13599,7 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test ${enable_netcdf_v3+y} -then : +if test "${enable_netcdf_v3+set}" = set; then : enableval=$enable_netcdf_v3; fi @@ -14399,8 +13607,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -14408,8 +13615,7 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test ${enable_netcdf_output+y} -then : +if test "${enable_netcdf_output+set}" = set; then : enableval=$enable_netcdf_output; fi @@ -14447,10 +13653,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -14513,8 +13719,8 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi if test -d "$with_pnetcdf_includedir" ; then try_PNETCDF_INCS="$IFLAG$with_pnetcdf_includedir" ; fi @@ -14522,8 +13728,8 @@ printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; try_PNETCDF_LIBS="$with_pnetcdf_libs" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # fi # @@ -14548,17 +13754,16 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; @@ -14566,8 +13771,8 @@ printf "%s\n" "yes" >&6; } ; PNETCDF_INCS="$try_PNETCDF_INCS" ; PNETCDF_LIBS="$try_PNETCDF_LIBS" ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -14578,8 +13783,8 @@ printf "%s\n" "no" >&6; } ; # # internal netcdf # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -printf %s "checking for internal NetCDF library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +$as_echo_n "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -14613,22 +13818,22 @@ printf %s "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PATH}/lib/libpnetcdf.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi fi # @@ -14663,13 +13868,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -14677,8 +13881,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; # fi # @@ -14686,11 +13890,11 @@ printf "%s\n" "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -printf %s "checking for internal NETCDF library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +$as_echo_n "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -14709,8 +13913,8 @@ printf %s "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -14720,8 +13924,8 @@ printf "%s\n" "already compiled" >&6; } ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14730,8 +13934,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14823,37 +14027,32 @@ fi # Check whether --enable-yaml_output was given. -if test ${enable_yaml_output+y} -then : +if test "${enable_yaml_output+set}" = set; then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test ${with_yaml_libs+y} -then : +if test "${with_yaml_libs+set}" = set; then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test ${with_yaml_includedir+y} -then : +if test "${with_yaml_includedir+set}" = set; then : withval=$with_yaml_includedir; fi @@ -14862,29 +14061,25 @@ fi # Check whether --with-futile_libs was given. -if test ${with_futile_libs+y} -then : +if test "${with_futile_libs+set}" = set; then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test ${with_futile_includedir+y} -then : +if test "${with_futile_includedir+set}" = set; then : withval=$with_futile_includedir; fi @@ -14907,10 +14102,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14929,55 +14124,55 @@ printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -printf %s "checking for internal YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +$as_echo_n "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_yaml="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -printf %s "checking for YAML library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +$as_echo_n "checking for YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -15001,10 +14196,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -15023,55 +14218,55 @@ printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -printf %s "checking for internal FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +$as_echo_n "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_futile="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -printf %s "checking for FUTILE library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +$as_echo_n "checking for FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -15097,38 +14292,33 @@ fi # Check whether --enable-iotk was given. -if test ${enable_iotk+y} -then : +if test "${enable_iotk+set}" = set; then : enableval=$enable_iotk; -else $as_nop +else enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test ${with_iotk_libs+y} -then : +if test "${with_iotk_libs+set}" = set; then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test ${with_iotk_path+y} -then : +if test "${with_iotk_path+set}" = set; then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test ${with_iotk_libdir+y} -then : +if test "${with_iotk_libdir+set}" = set; then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test ${with_iotk_includedir+y} -then : +if test "${with_iotk_includedir+set}" = set; then : withval=$with_iotk_includedir; fi @@ -15149,10 +14339,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -15172,38 +14362,38 @@ printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir_src" IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" IOTK_LIBS="$try_iotk_libdir/libiotk.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -printf %s "checking for internal IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +$as_echo_n "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" @@ -15211,21 +14401,21 @@ printf %s "checking for internal IOTK library... " >&6; } if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -printf %s "checking for IOTK library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +$as_echo_n "checking for IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # PW_VER="no-hdf5-support" @@ -15253,38 +14443,33 @@ fi # Check whether --enable-etsf_io was given. -if test ${enable_etsf_io+y} -then : +if test "${enable_etsf_io+set}" = set; then : enableval=$enable_etsf_io; -else $as_nop +else enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test ${with_etsf_io_libs+y} -then : +if test "${with_etsf_io_libs+set}" = set; then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test ${with_etsf_io_path+y} -then : +if test "${with_etsf_io_path+set}" = set; then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test ${with_etsf_io_libdir+y} -then : +if test "${with_etsf_io_libdir+set}" = set; then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test ${with_etsf_io_includedir+y} -then : +if test "${with_etsf_io_includedir+set}" = set; then : withval=$with_etsf_io_includedir; fi @@ -15311,10 +14496,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -15333,50 +14518,50 @@ printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # # internal ETSF_IO # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -printf %s "checking for internal ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +$as_echo_n "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -printf "%s\n" "found already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +$as_echo "found already compiled" >&6; } else compile_etsf="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } fi fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -printf %s "checking for ETSF_IO Library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +$as_echo_n "checking for ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # @@ -15394,29 +14579,25 @@ compile_libxc=yes # Check whether --with-libxc_libs was given. -if test ${with_libxc_libs+y} -then : +if test "${with_libxc_libs+set}" = set; then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test ${with_libxc_path+y} -then : +if test "${with_libxc_path+set}" = set; then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test ${with_libxc_libdir+y} -then : +if test "${with_libxc_libdir+set}" = set; then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test ${with_libxc_includedir+y} -then : +if test "${with_libxc_includedir+set}" = set; then : withval=$with_libxc_includedir; fi @@ -15437,8 +14618,8 @@ LIBXC_INCS="$IFLAG$libxc_incdir" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -printf %s "checking for libxc... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +$as_echo_n "checking for libxc... " >&6; } testprog=" program main @@ -15458,11 +14639,10 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15473,11 +14653,10 @@ if test x"$acx_libxc_ok" = xno && test ! -z "$with_libxc_libs" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15488,11 +14667,10 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15503,11 +14681,10 @@ if test x"$acx_libxc_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15583,71 +14760,66 @@ if test x"$acx_libxc_ok" = xyes; then cat > conftest.$ac_ext <<_ACEOF $testprog_11 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=110, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_12 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_20 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=200, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_203 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=203, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_21 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=210, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_4x _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=400, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_5x _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=5, acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBXC_VERSION $acx_libxc_version +_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi if test x"$acx_libxc_ok" = xyes; then @@ -15655,7 +14827,7 @@ if test x"$acx_libxc_ok" = xyes; then internal_libxc=no # -printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h +$as_echo "#define HAVE_LIBXC 1" >>confdefs.h fi @@ -15667,12 +14839,12 @@ if test x"$acx_libxc_ok" = xno; then LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } else compile_libxc="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } fi fi @@ -15688,15 +14860,13 @@ LIBS="$acx_libxc_save_LIBS" # # Check whether --enable-cuda was given. -if test ${enable_cuda+y} -then : +if test "${enable_cuda+set}" = set; then : enableval=$enable_cuda; fi # # Check whether --enable-nvtx was given. -if test ${enable_nvtx+y} -then : +if test "${enable_nvtx+set}" = set; then : enableval=$enable_nvtx; fi @@ -15722,46 +14892,240 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" # cc60 for Pascal cards (eg P100) # cc70 for Volta cards (eg V100) # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 -printf %s "checking for CUDA support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 +$as_echo_n "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -printf "%s\n" "$CUDA_FLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +$as_echo "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -printf "%s\n" "$CUDA_FLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +$as_echo "$CUDA_FLAGS" >&6; } fi # if test x"$enable_cuda" = "x" -o x"$enable_cuda" = "xno" ; then enable_nvtx=no def_cuda="" CUDA_FLAGS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 -printf %s "checking for NVTX support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 +$as_echo_n "checking for NVTX support... " >&6; } if ! test x"$enable_nvtx" = "xno" ; then if test x"$enable_nvtx" = "xyes" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -lnvToolsExt" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif ! test x"$enable_nvtx" = "x" ; then def_cuda="$def_cuda -D_NVTX" CUDA_FLAGS="$CUDA_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi +fi +# + + +# + +# ============================================================================ +# MAGMA + +# +# Check whether --enable-magma_linalg was given. +if test "${enable_magma_linalg+set}" = set; then : + enableval=$enable_magma_linalg; +fi + +# + +# Check whether --with-magma_libs was given. +if test "${with_magma_libs+set}" = set; then : + withval=$with_magma_libs; +fi + + +# Check whether --with-magma_incs was given. +if test "${with_magma_incs+set}" = set; then : + withval=$with_magma_incs; +fi + + +# Check whether --with-magma_path was given. +if test "${with_magma_path+set}" = set; then : + withval=$with_magma_path; +fi + + +# Check whether --with-magma_libdir was given. +if test "${with_magma_libdir+set}" = set; then : + withval=$with_magma_libdir; +fi + + +# Check whether --with-magma_includedir was given. +if test "${with_magma_includedir+set}" = set; then : + withval=$with_magma_includedir; +fi + + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +$as_echo_n "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +$as_echo_n "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 +$as_echo_n "checking for Magma in $with_magma_path... " >&6; } ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then as_fn_error $? "No libs specified" "$LINENO" 5 ; fi + if test -z "$try_MAGMA_INCS" ; then as_fn_error $? "No include-dir specified" "$LINENO" 5 ; fi + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + cat > conftest.$ac_ext <<_ACEOF + program main + +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + magma=yes +else + magma=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; + # + if test "x$magma" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +$as_echo_n "checking for internal Magma library... " >&6; } + # + internal_magma="yes" + # + if test "x$lapack_shared" = "x1" ; then + #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + MAGMA_LIBS="" ; + else + #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + MAGMA_LIBS="" ; + fi + #MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + MAGMA_INCS="" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; + else + #compile_magma="yes" ; + #AC_MSG_RESULT([to be compiled]) ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. Internal compilation not available yet." >&5 +$as_echo "Compatible external Magma not found/specified. Internal compilation not available yet." >&6; } ; + compile_magma="no" + def_magma="" + enable_magma="no" fi + # fi # + + + + # # ============================================================================ @@ -15893,6 +15257,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then SLEPC_check="C"; fi + if test "$compile_magma" = "no" ; then SLEPC_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -15987,6 +15359,7 @@ fi + # ============================================================================ # Compilation dir @@ -16023,8 +15396,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -16054,15 +15427,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -16076,8 +15449,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -16094,7 +15467,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -16110,8 +15483,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -16134,16 +15507,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -16153,46 +15524,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -16201,6 +15572,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -16209,12 +15587,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -16226,10 +15600,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -16242,14 +15636,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -16276,20 +15669,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -16301,13 +15692,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -16338,7 +15728,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -16360,10 +15750,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -16377,12 +15763,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -16424,7 +15804,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -16433,7 +15813,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16495,8 +15875,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.21876 h.7fe3130aa, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by Yambo $as_me 5.1.0 r.21879 h.7d3ae819b, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16554,16 +15934,14 @@ $config_headers Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.1.0 r.21876 h.7fe3130aa -configured by $0, generated by GNU Autoconf 2.71, +Yambo config.status 5.1.0 r.21879 h.7d3ae819b +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -16600,15 +15978,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -16616,7 +15994,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -16625,7 +16003,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -16653,7 +16031,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -16667,7 +16045,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -16707,8 +16085,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -17044,7 +16422,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -17052,17 +16430,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -17079,7 +16457,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17103,9 +16481,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -17158,8 +16536,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -17201,9 +16579,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -17219,20 +16597,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -17273,8 +16651,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -17432,4 +16810,3 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi - From cfad2124a127913067494f9931a6bdc060740f13 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 22 Mar 2023 12:02:13 +0100 Subject: [PATCH 0602/1367] Version 5.1.0, Revision 22385, Hash dcc827b41 MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] Improved debugging of ypp/el-ph/ELPH_databases_IO_fix_phases.F and added option to replace inversion with dagger Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +-- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 39 ++++++++++++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b30a75a0d4..171f0076a1 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22384 -#define YAMBO_HASH "380de77e1" +#define YAMBO_REVISION 22385 +#define YAMBO_HASH "dcc827b41" diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index 933f6f577a..7357ea2c17 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -48,6 +48,10 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) complex(SP) :: Y_overlap(DB_nb,DB_nb),det_tmp real(SP) :: Ovlp_trace(DB_nb) integer :: ik_DB,iq,ik,ikpq,ik_bz,ikpq_bz,isymm1,isymm2,ib1,ib2,i_sp_pol,i_l,iGo + logical :: l_invert,l_dagger + ! + l_invert=.false. + l_dagger=.true. ! iq=IDB if (elph_use_q_grid) iq=DB_Q_map(IDB) @@ -115,12 +119,16 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! PHASES_MATRIX= (QE_overlap)^-1 * Y_overlap ! ! option a) - M_tmp=cmplx(DB_Ovlp(:,:,ik_db),kind=SP) - call SERIAL_inversion(DB_nb,M_tmp,det_tmp,.true.) + if (l_invert) then + M_tmp=cmplx(DB_Ovlp(:,:,ik_db),kind=SP) + call SERIAL_inversion(DB_nb,M_tmp,det_tmp,.true.) + endif ! ! option b) (QE_overlap)^-1=(QE_overlap)^dag - !det_tmp=cZERO - !M_tmp=hermitian(cmplx(DB_Ovlp(:,:,ik_db),kind=SP)) + if (l_dagger) then + det_tmp=cZERO + M_tmp=hermitian(cmplx(DB_Ovlp(:,:,ik_db),kind=SP)) + endif ! PHASES_MATRIX=matmul(M_tmp,Y_overlap) ! @@ -153,31 +161,42 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) write(*,*) "QE OVERLAP TRACE ",Ovlp_trace write(*,*) "" ! - write(*,*) "QE OVERLAP inverted (det)",det_tmp + if (l_invert) write(*,*) "QE OVERLAP inverted (det)",det_tmp + if (l_dagger) write(*,*) "QE OVERLAP dagger" do ib1=1,DB_nb write(*,*) abs(M_tmp(ib1,:)) enddo Ovlp_trace=0._SP do ib1=1,DB_nb do ib2=1,DB_nb - Ovlp_trace(ib1)=Ovlp_trace(ib1)+real(abs(DB_Ovlp(ib1,ib2,ik_db)),kind=SP)**2 + Ovlp_trace(ib1)=Ovlp_trace(ib1)+abs(M_tmp(ib1,ib2))**2 enddo enddo - write(*,*) "QE OVERLAP inverted TRACE ",Ovlp_trace + if (l_invert) write(*,*) "QE OVERLAP inverted TRACE ",Ovlp_trace + if (l_dagger) write(*,*) "QE OVERLAP dagger TRACE ",Ovlp_trace write(*,*) "" ! write(*,*) "PHASES MATRIX " do ib1=1,DB_nb write(*,*) abs(PHASES_MATRIX(ib1,:)) enddo + Ovlp_trace=0._SP + do ib1=1,DB_nb + do ib2=1,DB_nb + Ovlp_trace(ib1)=Ovlp_trace(ib1)+abs(PHASES_MATRIX(ib1,ib2))**2 + enddo + enddo + write(*,*) "PHASES MATRIX TRACE ",Ovlp_trace write(*,*) "" endif ! DEBUG > ! ! Eq. 8 notes Fulvio - ! U = (PHASES_MATRIX^dag)^-1 - PHASES_MATRIX=hermitian(PHASES_MATRIX) - call SERIAL_inversion(DB_nb,PHASES_MATRIX,det_tmp,.false.) + ! U = (PHASES_MATRIX^dag)^-1 = PHASE_MATRIX + if (l_invert) then + PHASES_MATRIX=hermitian(PHASES_MATRIX) + call SERIAL_inversion(DB_nb,PHASES_MATRIX,det_tmp,.false.) + endif do i_l=1,DB_ph_modes ! Gkkp^y = U Gkkp^QE DB_gkkp(:,:,i_l,ik_db)=matmul(cmplx(PHASES_MATRIX,kind=DP),DB_gkkp(:,:,i_l,ik_db)) From 722402b0be83bab22bbe4f5c14b3f077d396d0c8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 24 Mar 2023 12:38:08 +0100 Subject: [PATCH 0603/1367] Version 5.1.0, Revision 22386, Hash cfad2124a MODIFIED * include/driver/version.h ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] Saving some local changes Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 49 ++++++++++++++++++------ 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 171f0076a1..5fcc47226d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22385 -#define YAMBO_HASH "dcc827b41" +#define YAMBO_REVISION 22386 +#define YAMBO_HASH "cfad2124a" diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F index 7357ea2c17..979c703eaf 100644 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ b/ypp/el-ph/ELPH_databases_IO_fix_phases.F @@ -25,10 +25,12 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) ! use pars, ONLY:SP,DP,cZERO use R_lattice, ONLY:bz_samp,qindx_X,nkibz - use wave_func, ONLY:WF + use wave_func, ONLY:WF,wf_ng + use wrapper, ONLY:Vstar_dot_V use electrons, ONLY:n_bands,n_sp_pol use interfaces, ONLY:WF_load,WF_free use matrix_operate, ONLY:hermitian + use FFT_m, ONLY:fft_size use parallel_m, ONLY:PAR_IND_WF_b_and_k,PP_indexes_reset use parallel_int, ONLY:PARALLEL_WF_distribute use ELPH, ONLY:elph_use_q_grid,l_GKKP_debug @@ -47,7 +49,8 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) complex(SP) :: PHASES_MATRIX(DB_nb,DB_nb),M_tmp(DB_nb,DB_nb) complex(SP) :: Y_overlap(DB_nb,DB_nb),det_tmp real(SP) :: Ovlp_trace(DB_nb) - integer :: ik_DB,iq,ik,ikpq,ik_bz,ikpq_bz,isymm1,isymm2,ib1,ib2,i_sp_pol,i_l,iGo + integer :: ik_DB,iq,ik,ikpq,ik_bz,ikpq_bz,isymm1,isymm2,ib1,ib2, & + i_sp_pol,i_l,iGo,i_wf1,i_wf2 logical :: l_invert,l_dagger ! l_invert=.false. @@ -90,7 +93,15 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) PAR_IND_WF_b_and_k%element_2d(:,ikpq)=.true. ! call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.TRUE.) - call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),title='Fix GKKP phases',quiet=.true.) + call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),& + title='Fix GKKP phases',quiet=.true.) + ! + ! DEBUG < + ! Alternative, compute explicitely the overlaps + ! Implementation does not take into account symmetries and shifts + !call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),& + ! space="G",title='Fix GKKP phases',quiet=.true.) + ! DEBUG > ! call elemental_collision_alloc(YPP_scatt,NG=1,TITLE="BSE") ! @@ -103,12 +114,22 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) YPP_scatt%os=(/ib1,ik, isymm1,i_sp_pol/) YPP_scatt%qs=(/iGo,iq,1/) ! - ! rhotw(1)= < b2 k+q | b1 k> + ! rhotw(1)= < b2 k+q | e^{-iG0*r} | b1 k> call scatter_Bamp(YPP_scatt) ! ! Y_overlap= < b2 k+q | b1 k> Y_overlap(ib2,ib1)=YPP_scatt%rhotw(1) ! + ! DEBUG < + ! Alternative, compute explicitely the overlaps + ! Implementation does not take into account symmetries and shifts + !i_wf2=WF%index(ib2,ikpq,i_sp_pol) + !i_wf1=WF%index(ib1,ik, i_sp_pol) + !! + !Y_overlap(ib2,ib1)=Vstar_dot_V(wf_ng,WF%c(1:wf_ng,1,i_wf2), & + !& WF%c(1:wf_ng,1,i_wf1)) + ! DEBUG > + ! enddo enddo ! @@ -175,7 +196,18 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) if (l_invert) write(*,*) "QE OVERLAP inverted TRACE ",Ovlp_trace if (l_dagger) write(*,*) "QE OVERLAP dagger TRACE ",Ovlp_trace write(*,*) "" - ! + endif + ! DEBUG > + ! + ! Eq. 8 notes Fulvio + ! U = (PHASES_MATRIX^dag)^-1 = PHASE_MATRIX + if (l_invert) then + PHASES_MATRIX=hermitian(PHASES_MATRIX) + call SERIAL_inversion(DB_nb,PHASES_MATRIX,det_tmp,.false.) + endif + ! + ! DEBUG < + if (l_GKKP_debug) then write(*,*) "PHASES MATRIX " do ib1=1,DB_nb write(*,*) abs(PHASES_MATRIX(ib1,:)) @@ -191,12 +223,7 @@ subroutine ELPH_databases_IO_fix_phases(IDB,kpts) endif ! DEBUG > ! - ! Eq. 8 notes Fulvio - ! U = (PHASES_MATRIX^dag)^-1 = PHASE_MATRIX - if (l_invert) then - PHASES_MATRIX=hermitian(PHASES_MATRIX) - call SERIAL_inversion(DB_nb,PHASES_MATRIX,det_tmp,.false.) - endif + ! Final rotation of GKKP coefficients do i_l=1,DB_ph_modes ! Gkkp^y = U Gkkp^QE DB_gkkp(:,:,i_l,ik_db)=matmul(cmplx(PHASES_MATRIX,kind=DP),DB_gkkp(:,:,i_l,ik_db)) From a5116b58935992472f2622e956522cff54096d63 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Mar 2023 15:41:02 +0200 Subject: [PATCH 0604/1367] Version 5.1.0, Revision 22394, Hash 563301ca8 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Additions: -Just two warning messages Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 23d22ce967..7561416475 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22328 -#define YAMBO_HASH "b1dea7974" +#define YAMBO_REVISION 22394 +#define YAMBO_HASH "563301ca8" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 0bf831d644..cc73bf1be1 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -89,7 +89,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call parser('ConstElph',l_const_elph) call parser('AbsElph', l_abs_elph) + if(l_abs_elph) call warning('Absolute value of electron-phonon coupling ') call parser('AbsExc', l_abs_exc) + if(l_abs_exc) call warning('Absolute value of exciton-phonon coupling ') call parser('ElectronContributionOnly', l_elec_only) call parser('HoleContributionOnly', l_hole_only) ! From ff4217b70ffe3d1e2e308012dd4ae26de2033992 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Mar 2023 16:25:47 +0200 Subject: [PATCH 0605/1367] Version 5.1.0, Revision 22387, Hash 722402b0b MODIFIED * include/driver/version.h allocations/ELPH_alloc.F io/io_ELPH.F modules/mod_ELPH.F ypp/el-ph/ELPH_databases_IO_gkkp_expand.F ypp/el-ph/ELPH_databases_IO_transfer_and_write.F Changes: - [ypp_ph] Code for phase fixing is not useful. Removing it (part 1) Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/allocations/ELPH_alloc.F | 7 +------ src/io/io_ELPH.F | 10 +--------- src/modules/mod_ELPH.F | 1 - ypp/el-ph/ELPH_databases_IO_gkkp_expand.F | 16 +--------------- ypp/el-ph/ELPH_databases_IO_transfer_and_write.F | 8 ++------ 6 files changed, 7 insertions(+), 39 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 5fcc47226d..2dbc8fbf1d 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22386 -#define YAMBO_HASH "cfad2124a" +#define YAMBO_REVISION 22387 +#define YAMBO_HASH "722402b0b" diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index 36549f2cd6..fb6524db9c 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -28,7 +28,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) use R_lattice, ONLY:nkbz,nqbz use electrons, ONLY:E_reset use QP_m, ONLY:QP_n_states - use ELPH, ONLY:GKKP_me,PH_pol_vector,ph_modes,PH_freqs_sq,l_GKKP_hosts_Ovlp,& + use ELPH, ONLY:GKKP_me,PH_pol_vector,ph_modes,PH_freqs_sq,& & PH_acoustic_speed,PH_acoustic_branch,gsqF_life_f,gsqF_life_bose,gsqF_fan,& & gsqF_ca_corr,gsqF_dw,PH_Q_modulus,PH_qpt,elph_bands,elph_nQ,eval_G_using_KK,& & gsqF_energy_steps,PH_kpt_bz,elph_nk_bz,elph_use_q_grid,FineGd_E_kpq_components_reset @@ -83,10 +83,6 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) GKKP%KIND=trim(strings(is)) YAMBO_ALLOC(GKKP%dVc,(GKKP%Nmodes(1):GKKP%Nmodes(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) GKKP%dVc=cZERO - if (l_GKKP_hosts_Ovlp) then - YAMBO_ALLOC(GKKP%Ovlp,(GKKP%Nb(1):GKKP%Nb(2),GKKP%Nb(1):GKKP%Nb(2),GKKP%Nk_mem,GKKP%Nq_mem)) - GKKP%Ovlp=cZERO - endif endif ! case ('LEVELS') @@ -172,7 +168,6 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) else YAMBO_FREE(GKKP%dVr) YAMBO_FREE(GKKP%dVc) - YAMBO_FREE(GKKP%Ovlp) if (allocated(GKKP%E_kpq)) then do iq=1,elph_nQ call E_reset( GKKP%E_kpq(iq) ) diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index dba86bf808..6bdcc05929 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -29,7 +29,7 @@ integer function io_ELPH(ID,what) use IO_int, ONLY:io_connect,io_disconnect,io_fragment,& & io_bulk,io_header use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,& -& l_GKKP_hosts_DW,l_GKKP_hosts_Ovlp,PH_pol_vector,& +& l_GKKP_hosts_DW,PH_pol_vector,& & GKKP,elph_grids_are_expanded,GKKP,GKKP_bare use stderr, ONLY:intc use interfaces, ONLY:ELPH_alloc @@ -134,14 +134,6 @@ integer function io_ELPH(ID,what) call io_bulk(ID_frag,VAR="ELPH_GKKP_Q"//trim(intc(iq)),VAR_SZ=(/2,ph_modes,elph_nb,elph_nb,nkbz/) ) call io_bulk(ID_frag,C4=GKKP%dVc(:,:,:,:,1)) ! - if (l_GKKP_hosts_Ovlp) then - ! - ! OVERLAPS - ! - call io_bulk(ID_frag,VAR="ELPH_OVLP_Q"//trim(intc(iq)),VAR_SZ=(/2,elph_nb,elph_nb,nkbz/)) - call io_bulk(ID_frag,C3=GKKP%Ovlp(:,:,:,1)) - ! - endif ! if (l_GKKP_hosts_bare_dV) then ! diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 1adc404782..de67ce726d 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -82,7 +82,6 @@ module ELPH ! dVr/c(Nmodes,Nb,Nb,Nk,Nq) real(SP), allocatable :: dVr(:,:,:,:,:) complex(SP), allocatable :: dVc(:,:,:,:,:) - complex(SP), allocatable :: Ovlp(:,:,:,:) ! ! Phonon assisted energy/occupation levels type(levels),allocatable :: E_kpq(:) diff --git a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F index dd05eaa86d..076a67667a 100644 --- a/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F +++ b/ypp/el-ph/ELPH_databases_IO_gkkp_expand.F @@ -27,7 +27,7 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag use R_lattice, ONLY:bz_samp,qindx_B,qindx_B_load,qindx_C use interfaces, ONLY:ELPH_alloc use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_tab - use ELPH, ONLY:elph_bands,GKKP_me,PH_qpt,l_GKKP_debug,l_GKKP_hosts_Ovlp + use ELPH, ONLY:elph_bands,GKKP_me,PH_qpt,l_GKKP_debug use YPP_ELPH, ONLY:DB_ph_K_sym_table,YAMBO_K_found,l_use_qindxB use parser_m, ONLY:parser ! @@ -91,7 +91,6 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag if (local_K_found(ik_bz)) cycle if (l_GKKP_debug) write (*,*) "Expanding k ",ik_bz," from ",ik GKKP%dVc(:,:,:,ik_bz,1)=GKKP%dVc(:,:,:,ik,1) - if (l_GKKP_hosts_Ovlp) GKKP%Ovlp (:,:,ik_bz,1)=GKKP%Ovlp (:,:,ik,1) if (allocated(GKKP%dVr)) GKKP%dVr(:,:,:,ik_bz,1)=GKKP%dVr(:,:,:,ik,1) GKKP%E_kpq(iq)%E(:,ik_bz,1)=GKKP%E_kpq(iq)%E(:,ik,1) local_K_found(ik_bz)=.TRUE. @@ -183,18 +182,6 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag enddo enddo ! - if (l_GKKP_hosts_Ovlp) then - do ib=elph_bands(1),elph_bands(2) - do ob=elph_bands(1),elph_bands(2) - if (l_bands_reverted) then - GKKP_expanded%Ovlp (ob,ib,ik_bz,1)=conjg(GKKP%Ovlp (ib,ob,ik_bz_gkkp,1)) - else - GKKP_expanded%Ovlp (ib,ob,ik_bz,1)=GKKP%Ovlp (ib,ob,ik_bz_gkkp,1) - endif - enddo - enddo - endif - ! enddo ! ! For the energies E(k+q) @@ -245,7 +232,6 @@ subroutine ELPH_databases_IO_gkkp_expand(mode,iq,iq_s,k,q,qindx_ID,qindx_ID_frag enddo ! GKKP%dVc=GKKP_expanded%dVc - if (l_GKKP_hosts_Ovlp) GKKP%Ovlp=GKKP_expanded%Ovlp GKKP%E_kpq(iq)%E=GKKP_expanded%E_kpq(iq)%E ! if(l_use_qindxB) qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) diff --git a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F index 9ba655c719..7dfd9c087f 100644 --- a/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F +++ b/ypp/el-ph/ELPH_databases_IO_transfer_and_write.F @@ -26,8 +26,8 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) use pars, ONLY:SP,DP,rZERO,cZERO use D_lattice, ONLY:n_atoms use R_lattice, ONLY:bz_samp - use ELPH, ONLY:GKKP_me,elph_use_q_grid,elph_bands,l_GKKP_hosts_Ovlp - use YPP_ELPH, ONLY:DB_ph_pol_vec,DB_E_k,DB_kind,DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,& + use ELPH, ONLY:GKKP_me,elph_use_q_grid,elph_bands + use YPP_ELPH, ONLY:DB_ph_pol_vec,DB_E_k,DB_kind,DB_K_map,DB_nk,DB_gkkp,& & DB_nb,DB_ph_modes,DB_grad_at_gamma,DB_E_k_plus_q,DB_Q_map use electrons, ONLY:levels ! @@ -49,7 +49,6 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) ! GKKP%dVc=cZERO if (allocated(GKKP%dVr)) GKKP%dVr=rZERO - if (allocated(GKKP%Ovlp)) GKKP%Ovlp=cZERO ! ! GKKP & Levels !=============== @@ -95,9 +94,6 @@ subroutine ELPH_databases_IO_transfer_and_write(IDB,k,E,GKKP) do ib2=elph_bands(1),elph_bands(2) ! GKKP%dVc(:,ib1,ib2,ik_bz,1)=cmplx(DB_gkkp(ib1,ib2,:,ik_db),kind=SP) - if (l_GKKP_hosts_Ovlp) then - GKKP%Ovlp(ib1,ib2,ik_bz,1)= cmplx(DB_Ovlp(ib1,ib2,ik_db),kind=SP) - endif ! if (trim(GKKP%KIND)=="dV_bare") cycle ! From 8ed4938092097747471e09faa8df39abfe7ec1d5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Mar 2023 16:45:15 +0200 Subject: [PATCH 0606/1367] Version 5.1.0, Revision 22388, Hash ff4217b70 MODIFIED * include/driver/version.h modules/mod_ELPH.F ypp/el-ph/.objects ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_databases_IO_elemental.F ypp/el-ph/ELPH_load_indexes.F ypp/interface/INIT_load_ypp.F ypp/interface/INIT_ypp.F ypp/modules/mod_YPP_ELPH.F DELETED * ypp/el-ph/ELPH_databases_IO_fix_phases.F Changes: - [ypp_ph] Removed coding for fixing phases. It does not work Patch sent by: Davide Sangalli --- include/driver/version.h | 4 +- src/modules/mod_ELPH.F | 1 - ypp/el-ph/.objects | 2 +- ypp/el-ph/ELPH_databases.F | 11 +- ypp/el-ph/ELPH_databases_IO_elemental.F | 8 +- ypp/el-ph/ELPH_databases_IO_fix_phases.F | 238 ----------------------- ypp/el-ph/ELPH_load_indexes.F | 29 --- ypp/interface/INIT_load_ypp.F | 1 - ypp/interface/INIT_ypp.F | 2 +- ypp/modules/mod_YPP_ELPH.F | 9 - 10 files changed, 7 insertions(+), 298 deletions(-) delete mode 100644 ypp/el-ph/ELPH_databases_IO_fix_phases.F diff --git a/include/driver/version.h b/include/driver/version.h index 2dbc8fbf1d..4bfca187ad 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22387 -#define YAMBO_HASH "722402b0b" +#define YAMBO_REVISION 22388 +#define YAMBO_HASH "ff4217b70" diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index de67ce726d..fa7d14615a 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -131,7 +131,6 @@ module ELPH ! Databases logical :: l_GKKP_hosts_bare_dV=.FALSE. logical :: l_GKKP_hosts_DW =.TRUE. - logical :: l_GKKP_hosts_Ovlp =.FALSE. logical :: l_GKKP_DB_exists =.FALSE. logical :: l_GKKP_expanded_DB_exists=.FALSE. logical :: l_GKKP_debug=.FALSE. diff --git a/ypp/el-ph/.objects b/ypp/el-ph/.objects index 124b38f0db..f5fd849b7e 100644 --- a/ypp/el-ph/.objects +++ b/ypp/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _YPP_ELPH objs = ELPH_databases.o ELPH_databases_IO_elemental.o ELPH_databases_IO_pol_and_freqs.o ELPH_databases_IO_grids_check.o \ - ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o ELPH_databases_IO_fix_phases.o \ + ELPH_databases_IO_transfer_and_write.o ELPH_databases_IO_gkkp_expand.o ELPH_databases_IO_freqs.o \ ELPH_eliashberg_dos.o ELPH_general_gFsq.o ELPH_excitonic_gkkp.o ELPH_databases_IO_modes.o \ ELPH_atomic_amplitude.o ELPH_double_grid.o Eliashberg_Dos_Func.o ELPH_plot_gkkp.o ELPH_sngl_db.o \ ELPH_load_indexes.o diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 0eae6f34b3..f9f6bd5012 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -30,7 +30,7 @@ subroutine ELPH_databases(k,E,q) use interfaces, ONLY:ELPH_alloc use ELPH, ONLY:elph_use_q_grid,ph_modes,elph_bands,elph_nb,elph_nQ,GKKP,GKKP_bare,PH_W_debye,& & PH_freqs_sq,PH_qpt,PH_pol_vector,GKKP_me,elph_nk_bz,PH_kpt_bz,& -& l_GKKP_debug,l_GKKP_hosts_bare_dV,l_GKKP_hosts_Ovlp,l_GKKP_hosts_DW +& l_GKKP_debug,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW use com, ONLY:msg use D_lattice, ONLY:nsym,sop_tab use R_lattice, ONLY:bz_samp,nqbz,nqibz @@ -66,7 +66,6 @@ subroutine ELPH_databases(k,E,q) ! Logicals & Init !================= call parser('GkkpReadBare',l_GKKP_hosts_bare_dV) - call parser('GkkpIncludeOvlp',l_GKKP_hosts_Ovlp) call parser('GkkpExpand',l_gkkp_expand) call parser('GkkpDebug',l_GKKP_debug) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) @@ -288,11 +287,6 @@ subroutine ELPH_databases(k,E,q) db_name='gkkp' if(l_gkkp_expand.or.l_gkkp_expand_only_k) db_name='gkkp_expanded' ! - if (l_GKKP_hosts_Ovlp) then - call msg('s',' Starting procedure to fix phases') - call ELPH_switch_X_indexes_convention(k,q,"plus_q") - endif - ! call live_timing('ELPH databases: transfer and I/O',DB_nq) ! do idb=1,DB_nq @@ -305,7 +299,6 @@ subroutine ELPH_databases(k,E,q) ! io_err(1)=ELPH_databases_IO_elemental("dV KPT GKKP",idb) call ELPH_databases_IO_grids_check(k) - if (l_GKKP_hosts_Ovlp) call ELPH_databases_IO_fix_phases(idb,k) call ELPH_databases_IO_transfer_and_write(idb,k,E,GKKP) call ELPH_databases_IO_gkkp_expand("K",iq,1,k,q,qindx_ID,qindx_ID_frag,GKKP) ! @@ -346,8 +339,6 @@ subroutine ELPH_databases(k,E,q) enddo call live_timing() ! - if (l_GKKP_hosts_Ovlp) call ELPH_switch_X_indexes_convention(k,q,"minus_q") - ! ! Clean !======= call ELPH_DB_free( ) diff --git a/ypp/el-ph/ELPH_databases_IO_elemental.F b/ypp/el-ph/ELPH_databases_IO_elemental.F index 192e35a8f6..c85523af7d 100644 --- a/ypp/el-ph/ELPH_databases_IO_elemental.F +++ b/ypp/el-ph/ELPH_databases_IO_elemental.F @@ -30,7 +30,6 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! read (99) ph_freqs_sq ! DO ik=1,nksq ! read (99) elph_gkkp_disk - ! read (99) overlap_disk ! read (99) polarization_vec ! read (99) grad_at_gamma (only at Gamma) ! read (99) Ek @@ -38,10 +37,10 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! ENDDO ! use pars, ONLY:DP,schlen,SP,cZERO - use ELPH, ONLY:PH_W_debye,l_GKKP_hosts_Ovlp + use ELPH, ONLY:PH_W_debye use YPP_ELPH, ONLY:DB_kind,DB_ph_modes,DB_nk,DB_nb,DB_ph_kpt,DB_PH_qpt,& & DB_ph_pol_vec,DB_ph_freq_sq,DB_alat,DB_E_k,DB_E_k_plus_q,& -& DB_grad_at_gamma,DB_gkkp,DB_Ovlp,elph_dbs_path,DB_K_map +& DB_grad_at_gamma,DB_gkkp,elph_dbs_path,DB_K_map use IO_int, ONLY:io_control,io_connect,io_disconnect use IO_m, ONLY:OP_RD,RD_CL,io_unit use D_lattice, ONLY:alat @@ -108,7 +107,6 @@ integer function ELPH_databases_IO_elemental(what,IDB) ! if (index(what,"POL_VEC")>0) then read (io_unit(ID)) - if (l_GKKP_hosts_Ovlp) read (io_unit(ID)) read (io_unit(ID)) DB_ph_pol_vec(IDB,:,:,:) endif ! @@ -140,7 +138,6 @@ integer function ELPH_databases_IO_elemental(what,IDB) if (IDB==1) then DB_grad_at_gamma=cZERO DB_gkkp=cZERO - if (l_GKKP_hosts_Ovlp) DB_Ovlp=cZERO endif ! do ik=1,DB_nk @@ -148,7 +145,6 @@ integer function ELPH_databases_IO_elemental(what,IDB) ik_yambo=DB_K_map(ik) ! read (io_unit(ID)) DB_gkkp(:,:,:,ik) - if (l_GKKP_hosts_Ovlp) read (io_unit(ID)) DB_Ovlp(:,:,ik) read (io_unit(ID)) ! DB_gkkp(:,:,:,ik)=DB_gkkp(:,:,:,ik)*dVRY2Ha diff --git a/ypp/el-ph/ELPH_databases_IO_fix_phases.F b/ypp/el-ph/ELPH_databases_IO_fix_phases.F deleted file mode 100644 index 979c703eaf..0000000000 --- a/ypp/el-ph/ELPH_databases_IO_fix_phases.F +++ /dev/null @@ -1,238 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine ELPH_databases_IO_fix_phases(IDB,kpts) - ! - use pars, ONLY:SP,DP,cZERO - use R_lattice, ONLY:bz_samp,qindx_X,nkibz - use wave_func, ONLY:WF,wf_ng - use wrapper, ONLY:Vstar_dot_V - use electrons, ONLY:n_bands,n_sp_pol - use interfaces, ONLY:WF_load,WF_free - use matrix_operate, ONLY:hermitian - use FFT_m, ONLY:fft_size - use parallel_m, ONLY:PAR_IND_WF_b_and_k,PP_indexes_reset - use parallel_int, ONLY:PARALLEL_WF_distribute - use ELPH, ONLY:elph_use_q_grid,l_GKKP_debug - use YPP_ELPH, ONLY:DB_K_map,DB_nk,DB_gkkp,DB_Ovlp,DB_nb,DB_ph_modes,DB_Q_map - use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc - ! - implicit none - ! - integer :: IDB - type(bz_samp) :: kpts - ! - ! Work Space - ! - type(elemental_collision):: YPP_scatt - ! - complex(SP) :: PHASES_MATRIX(DB_nb,DB_nb),M_tmp(DB_nb,DB_nb) - complex(SP) :: Y_overlap(DB_nb,DB_nb),det_tmp - real(SP) :: Ovlp_trace(DB_nb) - integer :: ik_DB,iq,ik,ikpq,ik_bz,ikpq_bz,isymm1,isymm2,ib1,ib2, & - i_sp_pol,i_l,iGo,i_wf1,i_wf2 - logical :: l_invert,l_dagger - ! - l_invert=.false. - l_dagger=.true. - ! - iq=IDB - if (elph_use_q_grid) iq=DB_Q_map(IDB) - ! - if (n_sp_pol==2) call error(' gkkp phase fixing not coded for n_sp_pol==2') - ! - i_sp_pol=1 - n_bands=DB_nb - nkibz=kpts%nibz - ! - call PP_indexes_reset(PAR_IND_WF_b_and_k) - allocate(PAR_IND_WF_b_and_k%element_2D(DB_nb,nkibz)) - ! - ! GKKP & Levels - !=============== - ! - ! DEBUG < - if (l_GKKP_debug) write(*,*) "Transferred momentum index q= ",iq - ! DEBUG > - ! - do ik_db=1,DB_nk - ! - ik_bz=DB_K_map(ik_db) - ! - ikpq_bz=qindx_X(iq,ik_bz,1) - iGo =qindx_X(iq,ik_bz,2) - ! - ik =kpts%sstar(ik_bz,1) - isymm1=kpts%sstar(ik_bz,2) - ! - ikpq =kpts%sstar(ikpq_bz,1) - isymm2=kpts%sstar(ikpq_bz,2) - ! - PAR_IND_WF_b_and_k%element_2d(:,:)=.false. - PAR_IND_WF_b_and_k%element_2d(:,ik)=.true. - PAR_IND_WF_b_and_k%element_2d(:,ikpq)=.true. - ! - call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.TRUE.) - call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),& - title='Fix GKKP phases',quiet=.true.) - ! - ! DEBUG < - ! Alternative, compute explicitely the overlaps - ! Implementation does not take into account symmetries and shifts - !call WF_load(WF,1,iGo,(/1,DB_nb/),(/1,nkibz/),(/i_sp_pol,i_sp_pol/),& - ! space="G",title='Fix GKKP phases',quiet=.true.) - ! DEBUG > - ! - call elemental_collision_alloc(YPP_scatt,NG=1,TITLE="BSE") - ! - Y_overlap=cZERO - ! - do ib1=1,DB_nb - do ib2=1,DB_nb - ! - YPP_scatt%is=(/ib2,ikpq,isymm2,i_sp_pol/) - YPP_scatt%os=(/ib1,ik, isymm1,i_sp_pol/) - YPP_scatt%qs=(/iGo,iq,1/) - ! - ! rhotw(1)= < b2 k+q | e^{-iG0*r} | b1 k> - call scatter_Bamp(YPP_scatt) - ! - ! Y_overlap= < b2 k+q | b1 k> - Y_overlap(ib2,ib1)=YPP_scatt%rhotw(1) - ! - ! DEBUG < - ! Alternative, compute explicitely the overlaps - ! Implementation does not take into account symmetries and shifts - !i_wf2=WF%index(ib2,ikpq,i_sp_pol) - !i_wf1=WF%index(ib1,ik, i_sp_pol) - !! - !Y_overlap(ib2,ib1)=Vstar_dot_V(wf_ng,WF%c(1:wf_ng,1,i_wf2), & - !& WF%c(1:wf_ng,1,i_wf1)) - ! DEBUG > - ! - enddo - enddo - ! - call WF_free(WF) - call elemental_collision_free(YPP_scatt) - ! - ! Eq. 6 notes Fulvio - ! PHASES_MATRIX= (QE_overlap)^-1 * Y_overlap - ! - ! option a) - if (l_invert) then - M_tmp=cmplx(DB_Ovlp(:,:,ik_db),kind=SP) - call SERIAL_inversion(DB_nb,M_tmp,det_tmp,.true.) - endif - ! - ! option b) (QE_overlap)^-1=(QE_overlap)^dag - if (l_dagger) then - det_tmp=cZERO - M_tmp=hermitian(cmplx(DB_Ovlp(:,:,ik_db),kind=SP)) - endif - ! - PHASES_MATRIX=matmul(M_tmp,Y_overlap) - ! - ! DEBUG < - if (l_GKKP_debug) then - write(*,*) "O_Y, O_QE and U at k ",ik_bz - write(*,*) "Y OVERLAP MATRIX " - do ib1=1,DB_nb - write(*,*) abs(Y_overlap(ib1,:)) - enddo - Ovlp_trace=0._SP - do ib1=1,DB_nb - do ib2=1,DB_nb - Ovlp_trace(ib1)=Ovlp_trace(ib1)+abs(Y_overlap(ib1,ib2))**2 - enddo - enddo - write(*,*) "Y OVERLAP TRACE ",Ovlp_trace - write(*,*) "" - ! - write(*,*) "QE OVERLAP MATRIX" - do ib1=1,DB_nb - write(*,*) real(abs(DB_Ovlp(ib1,:,ik_db)),kind=SP) - enddo - Ovlp_trace=0._SP - do ib1=1,DB_nb - do ib2=1,DB_nb - Ovlp_trace(ib1)=Ovlp_trace(ib1)+real(abs(DB_Ovlp(ib1,ib2,ik_db)),kind=SP)**2 - enddo - enddo - write(*,*) "QE OVERLAP TRACE ",Ovlp_trace - write(*,*) "" - ! - if (l_invert) write(*,*) "QE OVERLAP inverted (det)",det_tmp - if (l_dagger) write(*,*) "QE OVERLAP dagger" - do ib1=1,DB_nb - write(*,*) abs(M_tmp(ib1,:)) - enddo - Ovlp_trace=0._SP - do ib1=1,DB_nb - do ib2=1,DB_nb - Ovlp_trace(ib1)=Ovlp_trace(ib1)+abs(M_tmp(ib1,ib2))**2 - enddo - enddo - if (l_invert) write(*,*) "QE OVERLAP inverted TRACE ",Ovlp_trace - if (l_dagger) write(*,*) "QE OVERLAP dagger TRACE ",Ovlp_trace - write(*,*) "" - endif - ! DEBUG > - ! - ! Eq. 8 notes Fulvio - ! U = (PHASES_MATRIX^dag)^-1 = PHASE_MATRIX - if (l_invert) then - PHASES_MATRIX=hermitian(PHASES_MATRIX) - call SERIAL_inversion(DB_nb,PHASES_MATRIX,det_tmp,.false.) - endif - ! - ! DEBUG < - if (l_GKKP_debug) then - write(*,*) "PHASES MATRIX " - do ib1=1,DB_nb - write(*,*) abs(PHASES_MATRIX(ib1,:)) - enddo - Ovlp_trace=0._SP - do ib1=1,DB_nb - do ib2=1,DB_nb - Ovlp_trace(ib1)=Ovlp_trace(ib1)+abs(PHASES_MATRIX(ib1,ib2))**2 - enddo - enddo - write(*,*) "PHASES MATRIX TRACE ",Ovlp_trace - write(*,*) "" - endif - ! DEBUG > - ! - ! Final rotation of GKKP coefficients - do i_l=1,DB_ph_modes - ! Gkkp^y = U Gkkp^QE - DB_gkkp(:,:,i_l,ik_db)=matmul(cmplx(PHASES_MATRIX,kind=DP),DB_gkkp(:,:,i_l,ik_db)) - enddo - ! - enddo - ! - ! DEBUG < - if (l_GKKP_debug) write(*,*) "" - ! DEBUG > - ! -end subroutine diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index 6a93c3cf7f..02903bbc04 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -77,32 +77,3 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) endif ! end subroutine -! -! -subroutine ELPH_switch_X_indexes_convention(kpts,qpts,convention) - ! - use com, ONLY:msg - use IO_m, ONLY:OP_RD_CL,DUMP,NONE - use IO_int, ONLY:io_control - use R_lattice, ONLY:bz_samp,qindx_free - ! - implicit none - ! - type(bz_samp) :: kpts,qpts - character(*), intent(in) :: convention - ! - integer, external :: io_QINDX - integer :: ID_qindx,io_err_qindx - ! - call msg('s',' Switching qindx_X table to '//convention//' convention') - call qindx_free('X') - call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),MODE=DUMP,ID=ID_qindx) - io_err_qindx=io_QINDX(kpts,qpts,ID_qindx,convention) - ! - if (io_err_qindx/=0 .and. convention=="plus_q") & - & call error("Run yambo_ph setup setting K_grids='X plus_q'") - ! - if (io_err_qindx/=0 .and. convention=="minus_q") & - & call error("ndb.kindx file missing, please run yambo setup") - ! -end subroutine diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 6b900cbd79..6c6af2dfb2 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -327,7 +327,6 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'TestPHDGrid','Test double-grid: set all values of the fine grid equal to the couse ones') call it('f',defs,'GkkpReadBare','Read the bare gkkp') call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') - call it('f',defs,'GkkpIncludeOvlp','GKKP matrix elements also include Ovlp') call it('f',defs,'GkkpExpOnlyK','Expand only k-points and not the q-points (that should be already in BZ)') call it('f',defs,'GkkpSkipDW','Do not include the DW factor in the databases') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 9a84cc7685..4246e61658 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -724,7 +724,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #if defined _YPP_ELPH if (l_gkkp_db) then call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpExpOnlyK UseQindxB") - call initactivate(1,"GkkpBands GkkpSkipDW GkkpIncludeOvlp") + call initactivate(1,"GkkpBands GkkpSkipDW") endif if (l_gkkp_sngl) call initactivate(1,"DBsPATH GkkpExpOnlyK UseQindxB") if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") diff --git a/ypp/modules/mod_YPP_ELPH.F b/ypp/modules/mod_YPP_ELPH.F index e8b173a386..9d1f73ee48 100644 --- a/ypp/modules/mod_YPP_ELPH.F +++ b/ypp/modules/mod_YPP_ELPH.F @@ -77,7 +77,6 @@ module YPP_ELPH real(DP), allocatable :: DB_E_k_plus_q(:,:) complex(DP), allocatable :: DB_grad_at_gamma(:,:,:,:,:) complex(DP), allocatable :: DB_gkkp(:,:,:,:) - complex(DP), allocatable :: DB_Ovlp(:,:,:) ! interface ! @@ -125,7 +124,6 @@ subroutine ELPH_databases_IO_freqs(ph_file,n_q,q_pt,ph_freqs) contains ! subroutine ELPH_DB_alloc() - use ELPH, ONLY:l_GKKP_hosts_Ovlp YAMBO_ALLOC(DB_Q_map,(DB_nq)) DB_Q_map=0 YAMBO_ALLOC(DB_K_map,(nkbz)) @@ -134,9 +132,6 @@ subroutine ELPH_DB_alloc() YAMBO_ALLOC(DB_ph_kpt,(3,nkbz)) YAMBO_ALLOC(DB_grad_at_gamma,(DB_nb,DB_nb,n_atoms,3,nkbz)) YAMBO_ALLOC(DB_gkkp,(DB_nb,DB_nb,DB_ph_modes,nkbz)) - if (l_GKKP_hosts_Ovlp) then - YAMBO_ALLOC(DB_Ovlp,(DB_nb,DB_nb,nkbz)) - endif YAMBO_ALLOC(DB_ph_pol_vec,(DB_nq,DB_ph_modes,n_atoms,3)) YAMBO_ALLOC(DB_ph_freq_sq,(DB_nq,DB_ph_modes)) YAMBO_ALLOC(DB_E_k,(DB_nb,nkbz)) @@ -144,7 +139,6 @@ subroutine ELPH_DB_alloc() end subroutine ! subroutine ELPH_DB_free() - use ELPH, ONLY:l_GKKP_hosts_Ovlp YAMBO_FREE(DB_Q_map) YAMBO_FREE(DB_K_map) YAMBO_FREE(YAMBO_K_found) @@ -152,9 +146,6 @@ subroutine ELPH_DB_free() YAMBO_FREE(DB_ph_kpt) YAMBO_FREE(DB_grad_at_gamma) YAMBO_FREE(DB_gkkp) - if (l_GKKP_hosts_Ovlp) then - YAMBO_FREE(DB_Ovlp) - endif YAMBO_FREE(DB_ph_pol_vec) YAMBO_FREE(DB_ph_freq_sq) YAMBO_FREE(DB_E_k) From cacd6e2ef127e271f6194b8a076f4215350d0221 Mon Sep 17 00:00:00 2001 From: palful Date: Mon, 13 Mar 2023 20:47:26 +0100 Subject: [PATCH 0607/1367] Fixed bug with AbsExc (gamma exciton was not in module) and added flag to compute elec and hole terms separately --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 6 ++++-- src/exc-ph/EXCPH_gkkp_eval_pal.F | 21 +++++++++++++++------ src/exc-ph/EXCPH_lifetime.F | 20 ++++++++++++-------- src/modules/mod_EXCPH.F | 2 +- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4bfca187ad..696aea0560 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22388 -#define YAMBO_HASH "ff4217b70" +#define YAMBO_REVISION 22389 +#define YAMBO_HASH "8ed493809" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 5ef097e687..5392399349 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -46,8 +46,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & -& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,n_exc_in, & -& EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free +& EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & +& n_exc_in,EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -90,6 +90,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call parser('ConstElph',l_const_elph) call parser('AbsElph', l_abs_elph) call parser('AbsExc', l_abs_exc) + call parser('ElectronContributionOnly', l_elec_only) + call parser('HoleContributionOnly', l_hole_only) ! ! Exciton-phonon kind ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_pal.F b/src/exc-ph/EXCPH_gkkp_eval_pal.F index 064450a534..361cb99eed 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_pal.F +++ b/src/exc-ph/EXCPH_gkkp_eval_pal.F @@ -40,9 +40,9 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map - use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,& + use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& & EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& -& l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in +& l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only ! #include ! @@ -117,10 +117,12 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = elemental_scattering(iq_s,ik_bz) ! - ! 1=DOWN + ! 1=DOWN (hole contribution) !======== ! do ivp=BS_bands(1),BS_bands(2) + ! + if (l_elec_only) exit ! i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) if (i_Hp==0) cycle @@ -154,10 +156,12 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) ! - ! 2=UP + ! 2=UP (electron contribution) !====== ! do icp=BS_bands(1),BS_bands(2) + ! + if (l_hole_only) exit ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) if (i_Hp==0) cycle @@ -210,8 +214,13 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !aux_phase_1 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,1)), REAL(Xi(i_H,1)) ) ) !aux_phase_2 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,2)), REAL(Xi(i_H,2)) ) ) ! - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + if (l_abs_exc) then + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& +& abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + else + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& +& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) + endif ! enddo enddo diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index d5d7be1d96..c1d166657f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -65,7 +65,7 @@ subroutine EXCPH_lifetime(k,q,X) call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) ! - call section('*','EXCPH-LifTime') + call section('*','EXCPH-LifeTime') ! call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) @@ -164,13 +164,13 @@ subroutine EXCPH_lifetime(k,q,X) ExcPhM=EXCPH_Gkkp_sq(il,i_beta,i_alpha) if(l_no_matrix_elements) ExcPhM=1._SP ! - if(use_PH_DbGd) then - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*DbGrid_pole() - else - EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Simple_pole() - ! DS Debug < - ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) - ! DS Debug > + if(.not.use_PH_DbGd) Pole=Simple_pole() + if(use_PH_DbGd) Pole=DbGrid_pole() + ! + EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole + if (l_extend_output) then + EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole + EXC_pole_of_q(i_alpha,iq_bz)=EXC_pole_of_q(i_alpha,iq_bz)+Pole endif ! enddo @@ -187,6 +187,10 @@ subroutine EXCPH_lifetime(k,q,X) call live_timing( ) ! call PP_redux_wait(EXC_LifeTime) + if (l_extend_output) then + call PP_redux_wait(EXC_life_of_q) + call PP_redux_wait(EXC_pole_of_q) + endif ! call PP_indexes_reset(px) ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 59c0dfcd54..fd47b44cc8 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -36,7 +36,7 @@ module EXCPH ! ! ... GKKP & EXC-PH Interaction ! - logical :: l_const_elph,l_abs_elph,l_abs_exc + logical :: l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: n_exc_in From d612719d7011281a628c6ccf7483d4d80b218e65 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 28 Mar 2023 15:41:02 +0200 Subject: [PATCH 0608/1367] Version 5.1.0, Revision 22394, Hash 563301ca8 MODIFIED * include/driver/version.h exc-ph/EXCPH_gkkp_driver.F Additions: -Just two warning messages Changes: - Patch sent by: Claudio Attaccalite --- include/driver/version.h | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 696aea0560..7561416475 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22389 -#define YAMBO_HASH "8ed493809" +#define YAMBO_REVISION 22394 +#define YAMBO_HASH "563301ca8" diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 5392399349..515063582b 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -89,7 +89,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call parser('ConstElph',l_const_elph) call parser('AbsElph', l_abs_elph) + if(l_abs_elph) call warning('Absolute value of electron-phonon coupling ') call parser('AbsExc', l_abs_exc) + if(l_abs_exc) call warning('Absolute value of exciton-phonon coupling ') call parser('ElectronContributionOnly', l_elec_only) call parser('HoleContributionOnly', l_hole_only) ! From afe284ef607533acd808dbe2cb858a205d3b5238 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Mar 2023 16:56:18 +0200 Subject: [PATCH 0609/1367] Version 5.1.0, Revision 22458, Hash 91cafa70e MODIFIED * include/driver/version.h NEW * BASED_ON_devel-excph-clean Changes: - Added file to remember that the branch is based on devel-exph-clean Patch sent by: Davide Sangalli --- BASED_ON_devel-excph-clean | 0 include/driver/version.h | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 BASED_ON_devel-excph-clean diff --git a/BASED_ON_devel-excph-clean b/BASED_ON_devel-excph-clean new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/driver/version.h b/include/driver/version.h index 7561416475..d395c61fff 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22394 -#define YAMBO_HASH "563301ca8" +#define YAMBO_REVISION 22458 +#define YAMBO_HASH "91cafa70e" From f525855c0a19082ea7745dc803aee7b5f300ca7d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 7 Apr 2023 12:55:40 +0200 Subject: [PATCH 0610/1367] Version 5.1.0, Revision 22206, Hash 6542ec35d MODIFIED * include/driver/version.h DELETED * based_on_devel_tddft Changes: - [yambo] This branch is now directly based on develop Patch sent by: Davide Sangalli --- based_on_devel_tddft | 0 include/driver/version.h | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 based_on_devel_tddft diff --git a/based_on_devel_tddft b/based_on_devel_tddft deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/driver/version.h b/include/driver/version.h index 003a7392d0..4bef22952b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22014 -#define YAMBO_HASH "69f54ed68" +#define YAMBO_REVISION 22206 +#define YAMBO_HASH "6542ec35d" From a391fb0cbaaa3ccea4886fd2dfb2c6938194109a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 9 Apr 2023 21:54:34 +0200 Subject: [PATCH 0611/1367] Version 5.1.0, Revision 22207, Hash f525855c0 MODIFIED * include/driver/version.h tddft/TDDFT_ALDA_R_space.F Bugs: - [yambo] Fixed compilation issue Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/tddft/TDDFT_ALDA_R_space.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 4bef22952b..186d40e37c 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22206 -#define YAMBO_HASH "6542ec35d" +#define YAMBO_REVISION 22207 +#define YAMBO_HASH "f525855c0" diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F index b26782045c..f710e4d325 100644 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ b/src/tddft/TDDFT_ALDA_R_space.F @@ -59,7 +59,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) ! Work Space ! logical :: l_use_rho_map - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y ! complex(SP), pointer :: rhotwr1_p(:) complex(SP), pointer :: rhotwr2_p(:) From 2545c78a0cdf36ac07c36d458b170409b009676e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 9 Apr 2023 23:24:55 +0200 Subject: [PATCH 0612/1367] Version 5.1.0, Revision 22208, Hash a391fb0cb MODIFIED * include/driver/version.h xc_functionals/el_density_and_current.F Bugs: - [yambo_nl] Fixed compilation issue Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/xc_functionals/el_density_and_current.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 186d40e37c..184cf674df 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22207 -#define YAMBO_HASH "f525855c0" +#define YAMBO_REVISION 22208 +#define YAMBO_HASH "a391fb0cb" diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 6ffdebc45c..22a7142585 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -227,7 +227,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! if (l_J) then ! - call eval_Gradient(cmplx(WF%r(:,:,i_wf)),WF_der,n_spinor,"wave") + call eval_Gradient(cmplx(WF%r(:,:,i_wf),kind=SP),WF_der,n_spinor,"wave") ! do i_dir=1,3 do i_spinor=1,n_spinor From b8e5c0d57951b15696b955f465e4a742a08be42f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Apr 2023 09:13:55 +0200 Subject: [PATCH 0613/1367] Version 5.1.0, Revision 22168, Hash 9fe048d02 MODIFIED * include/driver/version.h collisions/.objects Changes: - File reverted to develop version Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/collisions/.objects | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index be19cf6ee7..b5f84d1ec0 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22066 -#define YAMBO_HASH "1ad239d89" +#define YAMBO_REVISION 22168 +#define YAMBO_HASH "9fe048d02" diff --git a/src/collisions/.objects b/src/collisions/.objects index 6cc99e576f..a0790d237b 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -3,7 +3,7 @@ RT_objs = NL_objs = SC_objs = #if defined _QED -QED_objs=SCATTERING_GW_kinematics.o SCATTERING_QED_transverse_matrix.o COLLISIONS_momentum.o +QED_objs=SCATTERING_GW_kinematics.o SCATTERING_QED_transverse_matrix.o COLLISIONS_momentum.o #endif #if defined _SC SC_objs = COLLISIONS_compose_sc.o @@ -18,5 +18,4 @@ objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ PLASMA_build_up.o PLASMA_tables_and_dimensions.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ - COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o \ - $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) + COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) From 5b4dd75cafb951f3339636e1e09c71052616b0d3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Apr 2023 09:18:54 +0200 Subject: [PATCH 0614/1367] Version 5.1.0, Revision 22169, Hash b8e5c0d57 MODIFIED * include/driver/version.h communicate/DESC_compare.F Changes: - [yambo_nl] write lines moved to debug Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/communicate/DESC_compare.F | 22 +++++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index b5f84d1ec0..f71d95ae8b 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22168 -#define YAMBO_HASH "9fe048d02" +#define YAMBO_REVISION 22169 +#define YAMBO_HASH "b8e5c0d57" diff --git a/src/communicate/DESC_compare.F b/src/communicate/DESC_compare.F index ef95b59823..8d6b07d884 100644 --- a/src/communicate/DESC_compare.F +++ b/src/communicate/DESC_compare.F @@ -55,21 +55,29 @@ subroutine DESC_compare(D1,D2,i_err,exclude,only) do i_v=1,D1%size(i_d) if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) i_err=(/i_d,i_dp/) if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) i_err=(/i_d,i_dp/) - if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) write(*,*) D1%ival(i_v,i_d),D2%ival(i_v,i_dp) - if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) write(*,*) D1%rval(i_v,i_d),D2%rval(i_v,i_dp) + ! DEBUG < + !if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) write(*,*) D1%ival(i_v,i_d),D2%ival(i_v,i_dp) + !if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) write(*,*) D1%rval(i_v,i_d),D2%rval(i_v,i_dp) + ! DEBUG > enddo if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) i_err=(/i_d,i_dp/) - if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) write(*,*) real(D1%dval(i_d)),real(D2%dval(i_dp)) + ! DEBUG < + !if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) write(*,*) real(D1%dval(i_d)),real(D2%dval(i_dp)) + ! DEBUG > if (D1%kind(i_d)=='c') then if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) i_err=(/i_d,i_dp/) if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) i_err=(/i_d,i_dp/) - if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) write(*,*) real(D1%cval(i_d)),real(D2%cval(i_dp)) - if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) write(*,*) aimag(D1%cval(i_d)),aimag(D2%cval(i_dp)) + ! DEBUG < + !if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) write(*,*) real(D1%cval(i_d)),real(D2%cval(i_dp)) + !if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) write(*,*) aimag(D1%cval(i_d)),aimag(D2%cval(i_dp)) + ! DEBUG > endif if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) i_err=(/i_d,i_dp/) if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) i_err=(/i_d,i_dp/) - if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) write(*,*) trim(D1%sval(i_d)),trim(D2%sval(i_dp)) - if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) write(*,*) D1%lval(i_d),D2%lval(i_dp) + ! DEBUG > + !if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) write(*,*) trim(D1%sval(i_d)),trim(D2%sval(i_dp)) + !if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) write(*,*) D1%lval(i_d),D2%lval(i_dp) + ! DEBUG < enddo enddo ! From add0241e53811649238a28519619b96050e39d0f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Apr 2023 09:29:55 +0200 Subject: [PATCH 0615/1367] Version 5.1.0, Revision 22170, Hash 5b4dd75ca MODIFIED * include/driver/version.h bse/K_driver.F interface/INIT_check_databases.F io/io_BSS_diago.F io_parallel/variables_BS.F io_serial/variables_BS.F modules/mod_BS.F output/K_OUTPUT.F ypp/excitons/excitons_amplitudes.F ypp/excitons/excitons_read.F ypp/excitons/excitons_sort_and_report.F Changes: - [yambo] Variable name BS_qpt reverted to version BSqpts of develop to reduce number of differences Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/bse/K_driver.F | 10 +++++----- src/interface/INIT_check_databases.F | 6 +++--- src/io/io_BSS_diago.F | 4 ++-- src/io_parallel/variables_BS.F | 4 ++-- src/io_serial/variables_BS.F | 4 ++-- src/modules/mod_BS.F | 2 +- src/output/K_OUTPUT.F | 4 ++-- ypp/excitons/excitons_amplitudes.F | 4 ++-- ypp/excitons/excitons_read.F | 6 +++--- ypp/excitons/excitons_sort_and_report.F | 4 ++-- 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index f71d95ae8b..6f788c2400 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22169 -#define YAMBO_HASH "b8e5c0d57" +#define YAMBO_REVISION 22170 +#define YAMBO_HASH "5b4dd75ca" diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index a85a4ceb6b..557906a854 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -34,7 +34,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use IO_m, ONLY:OP_RD_CL,REP use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_eels_to_eps,BSS_uses_DbGd use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_cpl_K_corr,& -& BS_Blocks_and_Transitions_free,BS_qpt,BS_kpt_bz,l_BS_photolum +& BS_Blocks_and_Transitions_free,BSqpts,BS_kpt_bz,l_BS_photolum use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded use drivers, ONLY:l_rpa_IP,l_bs_fxc,l_bss use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme,PARALLEL_default_mode @@ -146,7 +146,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! ! Tranferred momentum !====================== - YAMBO_ALLOC(BS_qpt,(3,BS_q(1):BS_q(2))) + YAMBO_ALLOC(BSqpts,(3,BS_q(1):BS_q(2))) ! do iq=BS_q(1),BS_q(2) ! @@ -154,8 +154,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) !=========================================== call X_OUTPUT_driver("DEF INIT") ! - if (iq==1) BS_qpt(:,iq) = BSS_q0 - if (iq/=1) BS_qpt(:,iq) = q%pt(iq,:) + if (iq==1) BSqpts(:,iq) = BSS_q0 + if (iq/=1) BSqpts(:,iq) = q%pt(iq,:) ! call K_driver_init("loop-init",iq,Ken,Xk) ! @@ -271,7 +271,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) !... Parallel distribution reset call PARALLEL_global_indexes(Ken,Xk,q,"Response_T_space",X=X_oscillators,RESET=.TRUE.) ! - YAMBO_FREE(BS_qpt) + YAMBO_FREE(BSqpts) YAMBO_FREE(BS_kpt_bz) call qindx_free('B') ! diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index d595afc2f9..004f9f6d7d 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -31,7 +31,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t use frequency, ONLY:w_samp - use BS, ONLY:BS_n_g_exch,BS_n_g_fxc,BS_q,BS_qpt + use BS, ONLY:BS_n_g_exch,BS_n_g_fxc,BS_q,BSqpts use R_lattice, ONLY:ng_closed,nqibz,bz_samp use QP_m, ONLY:QP_t,QP_ng_Sx,QP_ng_Sc,QP_ng_SH,QP_ng_Vxc use wave_func, ONLY:io_WF @@ -240,7 +240,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! ! if (nqibz>0) then - YAMBO_ALLOC(BS_qpt,(3,nqibz)) + YAMBO_ALLOC(BSqpts,(3,nqibz)) do i_io=1,nqibz call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=io_ID) # if defined _PAR_IO @@ -249,7 +249,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I io_BS_err=io_BS(i_io,Xbsk,io_ID) #endif enddo - YAMBO_FREE(BS_qpt) + YAMBO_FREE(BSqpts) else call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,SEC=(/1/),ID=io_ID) # if defined _PAR_IO diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index c04b62c7c3..321efe5a7e 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -26,7 +26,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! use pars, ONLY:SP,schlen,IP use stderr, ONLY:intc - use BS, ONLY:BS_K_dim,BS_H_dim,BS_qpt,BS_perturbative_SOC,BS_res_ares_n_mat + use BS, ONLY:BS_K_dim,BS_H_dim,BSqpts,BS_perturbative_SOC,BS_res_ares_n_mat use BS_solvers, ONLY:BSS_q0,BSS_write_eig_2_db,BSS_eh_table,BS_mat,variables_BS,BSS_n_eig,BSS_desc use X_m, ONLY:X_t use descriptors, ONLY:IO_desc,IO_desc_reset,IO_desc_duplicate @@ -74,7 +74,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& call io_elemental(ID,VAR="[BSS] Eigenstates included",L0=BSS_write_eig_2_db,CHECK=.true.,OP=(/"=="/)) if(iq==1) then call io_elemental(ID,VAR="[BSS] Field direction",R1=BSS_q0,CHECK=.true.,OP=(/"==","==","=="/)) - if (allocated(BS_qpt)) BS_qpt(:,iq)=BSS_q0 + if (allocated(BSqpts)) BSqpts(:,iq)=BSS_q0 endif call io_elemental(ID,VAR="[BSS] Eigenstates computed ",I0=BSS_n_eig,CHECK=.true.,OP=(/"=="/)) call io_elemental(ID,VAR="[BSS] Number of BSE matrices ",I0=BS_res_ares_n_mat,CHECK=.true.,OP=(/"=="/)) diff --git a/src/io_parallel/variables_BS.F b/src/io_parallel/variables_BS.F index 2876f43ae3..2bfd315f73 100644 --- a/src/io_parallel/variables_BS.F +++ b/src/io_parallel/variables_BS.F @@ -32,7 +32,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& & BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& -& BS_cpl_K_corr,BS_qpt,BS_perturbative_SOC +& BS_cpl_K_corr,BSqpts,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:def_variable_elemental,io_variable_elemental,ver_is_gt_or_eq use descriptors, ONLY:IO_desc,IO_desc_reset @@ -62,7 +62,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) if(iq>1) then call def_variable_elemental(ID,"BS_Q",3,SP,0) call io_variable_elemental(ID,VAR="[K] BS Q-point",& -& R1=BS_qpt(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) +& R1=BSqpts(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) endif ! call def_variable_elemental(ID,"Dimension",1,IP+100,0) diff --git a/src/io_serial/variables_BS.F b/src/io_serial/variables_BS.F index f58fbe9aba..cd7e4476a2 100644 --- a/src/io_serial/variables_BS.F +++ b/src/io_serial/variables_BS.F @@ -32,7 +32,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& & BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& -& BS_cpl_K_corr,BS_qpt,BS_perturbative_SOC +& BS_cpl_K_corr,BSqpts,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:ver_is_gt_or_eq,def_variable_elemental,io_variable_elemental use descriptors, ONLY:IO_desc,IO_desc_reset @@ -63,7 +63,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call io_variable_elemental(ID,VAR="[K] Identifier",I0=BS_identifier,DESCRIPTOR=desc) if (iq>1) then call io_variable_elemental(ID,VAR="[K] Q-point",& -& R1=BS_qpt(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) +& R1=BSqpts(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) endif call io_variable_elemental(ID,VAR="[K] Dimension",I0=BS_K_dim(1),CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) call io_variable_elemental(ID,VAR="[K] Bands",I1=BS_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index d0c866895d..255bfba9b5 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -85,7 +85,7 @@ module BS real(SP):: BS_max_val real(SP):: BS_K_cutoff real(SP),allocatable :: BS_K_cutoff_done(:) - real(SP),allocatable :: BS_qpt(:,:) + real(SP),allocatable :: BSqpts(:,:) real(SP),allocatable :: BS_kpt_bz(:,:) integer,allocatable :: BS_K_io_map(:) ! diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 072a68783a..4620ba37eb 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -27,7 +27,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use drivers, ONLY:l_col_cut use frequency, ONLY:w_samp use BS_solvers, ONLY:BSS_desc,BSS_uses_GreenF,BSS_Vnl_included,BSS_n_freqs,K_diago_in_BS_mat,A_drude,B_Hall - use BS, ONLY:BSE_mode,BS_K_is_ALDA,BS_qpt,BS_field_direction,BS_dip_size,BS_H_dim,BS_K_coupling + use BS, ONLY:BSE_mode,BS_K_is_ALDA,BSqpts,BS_field_direction,BS_dip_size,BS_H_dim,BS_K_coupling use stderr, ONLY:STRING_match use X_m, ONLY:Epsilon_ii,eps_2_alpha,EPS_2_eels,X_OUTPUT_driver,Epsilon_ij,X_obs_onoff,& & X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,X_magnons @@ -76,7 +76,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) if (STRING_match(WHAT,"override")) call X_OUTPUT_driver("override "//OBS) ! if (STRING_match(WHAT,"open").or.STRING_match(WHAT,"override")) then - call X_OUTPUT_messages(iq,Q_plus_G=BS_qpt(:,iq),ig=1) + call X_OUTPUT_messages(iq,Q_plus_G=BSqpts(:,iq),ig=1) ! if ( trim(BSE_mode)=='resonant' ) ordering='r' if (.not.trim(BSE_mode)=='resonant' ) ordering='R' diff --git a/ypp/excitons/excitons_amplitudes.F b/ypp/excitons/excitons_amplitudes.F index feee00305c..6c3586dae8 100644 --- a/ypp/excitons/excitons_amplitudes.F +++ b/ypp/excitons/excitons_amplitudes.F @@ -33,7 +33,7 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) & DIPs_direction,l_dipoles,BSiq use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_desc,BSS_n_eig use DIPOLES, ONLY:DIP_rotated,DIP_alloc,DIPOLES_reset - use BS, ONLY:BS_H_dim,BS_bands,BS_qpt + use BS, ONLY:BS_H_dim,BS_bands,BSqpts use com, ONLY:msg use vec_operate, ONLY:sort,v_norm use interfaces, ONLY:DESC_write @@ -74,7 +74,7 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) ! ... IO call DIPOLE_IO(Xk,Xen,DIPs,'read ',io_err,'DIP') ! - DIPs_direction=BS_qpt(:,BSiq)/v_norm(BS_qpt(:,BSiq)) + DIPs_direction=BSqpts(:,BSiq)/v_norm(BSqpts(:,BSiq)) ! endif ! diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index 632260b4d0..9df4d42a29 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -32,7 +32,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) use IO_int, ONLY:io_control,io_disconnect use IO_m, ONLY:OP_RD_CL,DUMP,NONE,REP,VERIFY use BS_solvers, ONLY:BSS_eh_table,BSS_write_eig_2_db,io_BSS_diago,BS_mat,BSS_n_eig - use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BS_qpt + use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BSqpts use YPPm, ONLY:BS_R_left,BS_R_right,BS_E,BS_E_SOC_corr,BS_R_PL,BS_R_kerr,Xbsk ! #include @@ -68,7 +68,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) io_err=io_E_SOC_map(en,k,io_ID) endif ! - YAMBO_ALLOC(BS_qpt,(3,iq)) + YAMBO_ALLOC(BSqpts,(3,iq)) ! ! X type. Also used in PARALLEL setup ! @@ -163,7 +163,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) YAMBO_FREE(BS_E) YAMBO_FREE(BSS_eh_table) YAMBO_FREE(BS_mat) - YAMBO_FREE(BS_qpt) + YAMBO_FREE(BSqpts) if(associated(BS_E_SOC_corr)) then YAMBO_FREE_P(BS_E_SOC_corr) endif diff --git a/ypp/excitons/excitons_sort_and_report.F b/ypp/excitons/excitons_sort_and_report.F index cd3701cdd5..7ff9389367 100644 --- a/ypp/excitons/excitons_sort_and_report.F +++ b/ypp/excitons/excitons_sort_and_report.F @@ -27,7 +27,7 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) use units, ONLY:HA2EV use electrons, ONLY:spin_occ,spin,n_sp_pol,n_spinor use stderr, ONLY:intc - use BS, ONLY:BS_qpt + use BS, ONLY:BSqpts use BS_solvers, ONLY:BSS_desc,BSS_n_eig use com, ONLY:msg,of_open_close use R_lattice, ONLY:d3k_factor,q0_def_norm @@ -126,7 +126,7 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) Residuals(:) = real(BS_R(:)*conjg(BS_R(:)),SP) if (write_widths) Residuals(:) = abs(BS_R(:)) if(iq==1) q_norm=q0_def_norm**2 - if(iq> 1) q_norm=iku_v_norm(BS_qpt(:,iq))**2 + if(iq> 1) q_norm=iku_v_norm(BSqpts(:,iq))**2 Residuals(:) = Residuals(:)*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/q_norm*HA2EV ! if (trim(R_normalize)=='yes') then From 702fa61611ae0a32970cacf7596303bbf09c174a Mon Sep 17 00:00:00 2001 From: palful Date: Mon, 17 Apr 2023 15:26:31 +0200 Subject: [PATCH 0616/1367] Fix interpolation in EXCPH_lifetime (part 1) --- src/exc-ph/EXCPH_lifetime.F | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index eb10f1c353..670402af4e 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -59,7 +59,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg,l_extend_output - real(SP) :: ExcPhM,EXC_life_average,Pole + real(SP) :: ExcPhM,EXC_life_average,EXC_energy_average,Pole real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! @@ -109,6 +109,24 @@ subroutine EXCPH_lifetime(k,q,X) ! endif ! + ! Here we find the degenerations of the first n_exc_in values of BS_all_E at gamma + ! and we set their energies to exactly the same value (average). This is to + ! improve the quality of the interpolation at gamma in the case of double grid + ! (try to avoid unphysical splitting of degenerate states) + ! + write (*,*) "ENERGIES BEFORE: ",BS_all_E(EXCPH_states(1):EXCPH_states(2),1) + call degeneration_finder(BS_all_E(EXCPH_states(1):EXCPH_states(2),1),n_exc_in,first_exc_grp,& + & n_of_exc_grp,n_deg_grp,0.001/HA2EV,Include_single_values=.true.) + ! + do igrp=1,n_deg_grp + j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 + i_alpha=first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 + EXC_energy_average=sum(BS_all_E(j_alpha:i_alpha,1))/real(n_of_exc_grp(igrp),SP) + BS_all_E(j_alpha:i_alpha,1)=EXC_energy_average + enddo + write (*,*) "ENERGIES AFTER: ",BS_all_E(EXCPH_states(1):EXCPH_states(2),1) + ! + ! ! Load the Exciton-phonon elements and phonon energies ! call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) From 2bf9eb1d88ad2c079a961b3c3b9a81b124ded740 Mon Sep 17 00:00:00 2001 From: palful Date: Mon, 17 Apr 2023 17:34:57 +0200 Subject: [PATCH 0617/1367] Fix interpolation in EXCPH_lifetime (part 2) --- src/exc-ph/EXCPH_lifetime.F | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 670402af4e..d76d3df85f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -114,7 +114,6 @@ subroutine EXCPH_lifetime(k,q,X) ! improve the quality of the interpolation at gamma in the case of double grid ! (try to avoid unphysical splitting of degenerate states) ! - write (*,*) "ENERGIES BEFORE: ",BS_all_E(EXCPH_states(1):EXCPH_states(2),1) call degeneration_finder(BS_all_E(EXCPH_states(1):EXCPH_states(2),1),n_exc_in,first_exc_grp,& & n_of_exc_grp,n_deg_grp,0.001/HA2EV,Include_single_values=.true.) ! @@ -124,7 +123,6 @@ subroutine EXCPH_lifetime(k,q,X) EXC_energy_average=sum(BS_all_E(j_alpha:i_alpha,1))/real(n_of_exc_grp(igrp),SP) BS_all_E(j_alpha:i_alpha,1)=EXC_energy_average enddo - write (*,*) "ENERGIES AFTER: ",BS_all_E(EXCPH_states(1):EXCPH_states(2),1) ! ! ! Load the Exciton-phonon elements and phonon energies @@ -321,25 +319,33 @@ function DbGrid_pole() weight_dbgd=1._SP/real(nq_around+1._SP,SP) ! do iq_fg=q%FGbz%k_range(iq_bz,1),q%FGbz%k_range(iq_bz,2) + ! ! if(iq_fg==q%FGbz%k_range(iq_bz,1)) then - iq_db=Q_io_map(iq_bz) + ! + ! Here we get original points for coarse grids + ! (partially counters inaccuracies in the interpolation in the exc. + ! case) + ! + iq_db=Q_io_map(iq_bz) ! This mapping is because sometimes the phonon q_bz differs from the exciton one in yambo ph_E=sqrt(abs(PH_freqs_sq(iq_db,il))) ! + E_beta=BS_all_E(i_beta,iq) ! Getting this in the IBZ for the equivalent iq to iq_bz + ! ! If there is the double-grid I read the gamma phonons from there ! because they include the LO-TO splitting and the acustic sum rule ! if(iq_bz==1) ph_E=PH_freqs%FG%E(il,1,1) ! else - iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ - ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + iE_fg=q%FGbz%E_map(iq_fg) ! Map w(q) from BZ to IBZ + ph_E =PH_freqs%FG%E(il,iE_fg,1) ! w(q_db) phonon energy in the D-Grid + ! + E_beta=EXC_E_DbGd(i_beta,iq_fg) ! E(q_bz) exciton energy in the D-Grid endif ! if(ph_E Date: Mon, 17 Apr 2023 17:37:54 +0200 Subject: [PATCH 0618/1367] Manual back-update of EXCPH_lifetime from excph-fix-q --- src/exc-ph/EXCPH_lifetime.F | 141 ++++++++++++++++++++++++++++++++---- 1 file changed, 126 insertions(+), 15 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index c1d166657f..d76d3df85f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -58,12 +58,14 @@ subroutine EXCPH_lifetime(k,q,X) integer :: iq,iq_s,iq_bz,i_alpha,j_alpha,i_beta,il,i_star,iq_db,igrp integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp - logical :: l_keep_deg - real(SP) :: ExcPhM,EXC_life_average + logical :: l_keep_deg,l_extend_output + real(SP) :: ExcPhM,EXC_life_average,EXC_energy_average,Pole + real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) + call parser('ExtendOutput', l_extend_output) ! call section('*','EXCPH-LifeTime') ! @@ -79,6 +81,12 @@ subroutine EXCPH_lifetime(k,q,X) ! Allocations ! call RESIDUALS_and_EIGENVALUES_alloc(q) + if (l_extend_output) then + allocate(EXC_life_of_q(EXCPH_states(1):EXCPH_states(2),q%nbz)) + allocate(EXC_pole_of_q(EXCPH_states(1):EXCPH_states(2),q%nbz)) + EXC_life_of_q=rZERO + EXC_pole_of_q=rZERO + endif ! ! Load excitonic energies ! @@ -101,6 +109,22 @@ subroutine EXCPH_lifetime(k,q,X) ! endif ! + ! Here we find the degenerations of the first n_exc_in values of BS_all_E at gamma + ! and we set their energies to exactly the same value (average). This is to + ! improve the quality of the interpolation at gamma in the case of double grid + ! (try to avoid unphysical splitting of degenerate states) + ! + call degeneration_finder(BS_all_E(EXCPH_states(1):EXCPH_states(2),1),n_exc_in,first_exc_grp,& + & n_of_exc_grp,n_deg_grp,0.001/HA2EV,Include_single_values=.true.) + ! + do igrp=1,n_deg_grp + j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 + i_alpha=first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 + EXC_energy_average=sum(BS_all_E(j_alpha:i_alpha,1))/real(n_of_exc_grp(igrp),SP) + BS_all_E(j_alpha:i_alpha,1)=EXC_energy_average + enddo + ! + ! ! Load the Exciton-phonon elements and phonon energies ! call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID_exc_gkkp) @@ -172,6 +196,9 @@ subroutine EXCPH_lifetime(k,q,X) EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole EXC_pole_of_q(i_alpha,iq_bz)=EXC_pole_of_q(i_alpha,iq_bz)+Pole endif + ! DS Debug < + ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) + ! DS Debug > ! enddo ! @@ -207,15 +234,24 @@ subroutine EXCPH_lifetime(k,q,X) enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) + !if (l_extend_output) EXC_life_of_q=EXC_life_of_q*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! call print_and_write() ! + if (l_extend_output) then + call print_LifeTimes_of_q("L") + call print_LifeTimes_of_q("P") + endif + ! ! Deallocations ! YAMBO_FREE(EXC_LifeTime) call RESIDUALS_and_EIGENVALUES_free() + if (l_extend_output) then + deallocate(EXC_life_of_q) + endif ! contains ! @@ -243,10 +279,11 @@ function Simple_pole() ! ! Remove degenerate states E(alpha,iq_in)=E(beta,iq_in) [currently iq_in=1] ! - ! if(iq_db==1.and.abs(E_alpha-E_beta)1) values(1)=iku_v_norm(q%ptbz(iq_bz,:3)) + ! + tmp_q = q%ptbz(iq_bz,:3) + ! + !call K_transform(tmp_q,'iku') + if (MODE=="L") values(1+1:n_exc_in+1)=EXC_life_of_q(:,iq_bz) + if (MODE=="P") values(1+1:n_exc_in+1)=EXC_pole_of_q(:,iq_bz) + values(n_exc_in+2:n_exc_in+4)=tmp_q + call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) + ! + enddo + enddo + call of_open_close(trim(file_name)) + ! + end subroutine print_LifeTimes_of_q + ! end subroutine From 75689aa062c0253e70ca80673b926a7bac0555f7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Apr 2023 21:19:02 +0200 Subject: [PATCH 0619/1367] Version 5.1.0, Revision 22171, Hash add0241e5 MODIFIED * modules/mod_real_time.F real_time_control/RT_alloc.F real_time_control/RT_free.F real_time_hamiltonian/RT_Hamiltonian.F real_time_propagation/RT_EULER_step.F real_time_propagation/RT_Integrator_init.F Changes: - Coded changes to allow: (a) perturbative approach also without RWA (b) perturbative approach where, however, the field is coupled with the full rho Patch sent by: Davide Sangalli --- src/modules/mod_real_time.F | 2 + src/real_time_control/RT_alloc.F | 4 +- src/real_time_control/RT_free.F | 3 +- src/real_time_hamiltonian/RT_Hamiltonian.F | 4 +- src/real_time_propagation/RT_EULER_step.F | 132 ++++++++++++++---- .../RT_Integrator_init.F | 10 +- 6 files changed, 118 insertions(+), 37 deletions(-) diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 467106e0af..f3129ff88c 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -209,6 +209,7 @@ module real_time ! complex(SP), allocatable :: Ho_plus_Sigma(:,:,:,:) complex(SP), allocatable :: H_EQ(:,:,:,:) + complex(SP), allocatable :: H_field(:,:,:,:) complex(SP), allocatable :: H_pseudo_eq(:,:,:,:) complex(SP), allocatable :: RT_Vnl_xc(:,:,:,:) ! @@ -227,6 +228,7 @@ module real_time logical :: l_RT_RWA logical :: l_RT_ACC logical :: l_RT_PERT + logical :: l_RT_FRES logical :: l_RT_DIAG ! logical :: l_RT_SIMPLE diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index 22f22b2a69..234f8d2754 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -36,7 +36,7 @@ subroutine RT_alloc(en,what) & RT_RTA_H_occ_infty,l_RT_relax_time_approx use RT_lifetimes, ONLY:RT_EL_lifetimes_alloc,RT_PH_lifetimes_alloc use real_time, ONLY:RT_levels,RT_is_dynamically_dephased,& -& Ho_plus_Sigma,H_EQ,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& +& Ho_plus_Sigma,H_EQ,H_field,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& & dG_lesser,G_lesser,MEM_pointer,G_MEM_steps,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,RT_bands,RT_nk,l_RT_is_WFfree,l_RT_rotate_DM,& & l_velocity_gauge_corr,dG_avg @@ -82,6 +82,8 @@ subroutine RT_alloc(en,what) ! YAMBO_ALLOC(H_EQ,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol)) ! + YAMBO_ALLOC(H_field,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol)) + ! if (l_velocity_gauge_corr) then YAMBO_ALLOC(H_pseudo_eq,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) endif diff --git a/src/real_time_control/RT_free.F b/src/real_time_control/RT_free.F index c3359cf195..2d01ceff0e 100644 --- a/src/real_time_control/RT_free.F +++ b/src/real_time_control/RT_free.F @@ -32,7 +32,7 @@ subroutine RT_free( ) use hamiltonian, ONLY:H_free use xc_functionals, ONLY:E_xc use real_time, ONLY:DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,dG_avg,& -& Ho_plus_Sigma,H_EQ,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& +& Ho_plus_Sigma,H_EQ,H_field,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& & dG_lesser,G_lesser,MEM_pointer,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,& & RT_levels,I1_matrix,RT_Deph_Matrix,RTibz @@ -68,6 +68,7 @@ subroutine RT_free( ) ! YAMBO_FREE(Ho_plus_Sigma) YAMBO_FREE(H_EQ) + YAMBO_FREE(H_field) YAMBO_FREE(H_pseudo_eq) YAMBO_FREE(RT_Vnl_xc) YAMBO_FREE(dG_avg) diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 77afee3d00..ef2a37e19b 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -58,7 +58,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) use R_lattice, ONLY:bz_samp,nXkibz use hamiltonian, ONLY:V_hartree_sc,H_nl_sc,rho_n,magn_n,V_xc_sc use real_time, ONLY:Ho_plus_Sigma,l_NE_with_fields,REF_V_xc_sc, & -& rho_reference,magn_reference,RT_Vnl_xc,H_EQ, & +& rho_reference,magn_reference,RT_Vnl_xc,H_field,H_EQ, & & l_RT_RWA,eval_HARTREE,eval_DFT,RTibz,RT_potential, & & RT_bands,RT_nbands,dG_avg,l_update_SOC,l_velocity_gauge_corr use fields, ONLY:gauge_field @@ -207,11 +207,13 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! call timing('RT Apply Field',OPR='start') ! + H_field=cZERO do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) + H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) enddo enddo diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index 0a5c536d86..2ae8617197 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -21,46 +21,61 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,deltaT) +subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) ! use pars, ONLY:SP,cZERO,cI - use real_time, ONLY:l_RT_PERT - use wrapper_omp, ONLY:M_by_M_omp - use real_time, ONLY:Ho_plus_Sigma,RT_bands,RT_nbands, & -& G_lesser_reference + use real_time, ONLY:l_RT_PERT,l_RT_FRES,l_RT_RWA,& + & H_EQ,H_field,Ho_plus_Sigma, & + & G_lesser_reference,RT_bands ! implicit none ! integer, intent(in) :: ik,nbf - real(SP), intent(in) :: deltaT + real(SP), intent(in) :: dT complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) ! ! Workspace ! - complex(SP) :: I1_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - complex(SP) :: I2_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP) :: G_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP) :: G_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP) :: H_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) ! integer :: ib1,ib2 ! - ! I1 = Ho_plus_Sigma*G - ! I2 = G*Ho_plus_Sigma + if (.not. l_RT_pert) then + ! + G_k=dG_in+G_lesser_reference(:,:,ik) + H_k=Ho_plus_Sigma(:,:,ik,1) + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") + ! + return + ! + endif ! - if (.not.l_RT_PERT) G_k=dG_in+G_lesser_reference(:,:,ik) - if ( l_RT_PERT) G_k= G_lesser_reference(:,:,ik) + ! Part of the hamiltonina multiplied by rho0+rho1 ! - call M_by_M_omp('n','n',RT_nbands,Ho_plus_Sigma(:,:,ik,1),G_k,I1_k) - call M_by_M_omp('n','n',RT_nbands,G_k,Ho_plus_Sigma(:,:,ik,1),I2_k) + H_k=Ho_plus_Sigma(:,:,ik,1) + if(.not.l_RT_RWA) H_k=H_k-H_EQ(:,:,ik,1) + if( l_RT_FRES ) H_k=H_k-H_field(:,:,ik,1) ! - ! dG_out = G(T0+dt) -G(T0)= -i dt * ( I1(T0)-I2(T0) ) + ! First the rho0 term. This gives rho1. + ! + G_k=G_lesser_reference(:,:,ik) + ! + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") ! - dG_out=-cI*deltaT*(I1_k-I2_k) + ! Then the rho1 term. This gives rho2. ! - if (.not.l_RT_PERT) return + ! The first order rho is zero in the vv' and cc' channel + ! Thus I compute the second order rho, constructed using the + ! first order rho from the cv channel ! - I1_k=cZERO - I2_k=cZERO + ! N.B. In the case l_RT_FRES the above sentence is not true anymore + ! However I still want only the cv channel to enter here + ! to avoid energy shifts due to repulsion + ! + ! Take in input only the cv channel ! G_k=cZERO do ib1=RT_bands(1),nbf @@ -70,19 +85,74 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,deltaT) enddo enddo ! - call M_by_M_omp('n','n',RT_nbands,Ho_plus_Sigma(:,:,ik,1),G_k,I1_k) - call M_by_M_omp('n','n',RT_nbands,G_k,Ho_plus_Sigma(:,:,ik,1),I2_k) + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"pop") ! - do ib1=RT_bands(1),nbf - do ib2=RT_bands(1),nbf - dG_out(ib1,ib2)=-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) - enddo - enddo + if( l_RT_RWA .and. (.not.l_RT_FRES) ) return ! - do ib1=nbf+1,RT_bands(2) - do ib2=nbf+1,RT_bands(2) - dG_out(ib1,ib2)=-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) - enddo - enddo + ! Part of the hamiltonian multiplied by the full rho + ! + H_k=cZERO + if(.not.l_RT_RWA) H_k=H_EQ(:,:,ik,1) + if( l_RT_FRES ) H_k=H_k-H_field(:,:,ik,1) + G_k=dG_in+G_lesser_reference(:,:,ik) + H_k=Ho_plus_Sigma(:,:,ik,1) + ! + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") ! end subroutine RT_EULER_step +! +! +subroutine RT_EULER_step_apply(G_k,H_k,dG_out,nbf,deltaT,mode) + ! + use pars, ONLY:SP,cI + use wrapper_omp, ONLY:M_by_M_omp + use real_time, ONLY:RT_bands,RT_nbands + ! + implicit none + ! + character(*),intent(in) :: mode + integer, intent(in) :: nbf + real(SP), intent(in) :: deltaT + complex(SP), intent(in) :: G_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: H_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + ! + ! Workspace + ! + complex(SP) :: I1_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP) :: I2_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + ! + integer :: ib1,ib2 + ! + ! I1 = Ho_plus_Sigma*G + ! I2 = G*Ho_plus_Sigma + ! + call M_by_M_omp('n','n',RT_nbands,H_k,G_k,I1_k) + call M_by_M_omp('n','n',RT_nbands,G_k,H_k,I2_k) + ! + ! dG_out = G(T0+dt) -G(T0)= -i dt * ( I1(T0)-I2(T0) ) + ! + if(mode=="def") dG_out=-cI*deltaT*(I1_k-I2_k) + ! + if(mode=="add") dG_out=dG_out-cI*deltaT*(I1_k-I2_k) + ! + if(mode=="pop") then + ! + ! Save in output only the vv' and cc' channels + ! This will control the normalization of the residuals + ! + do ib1=RT_bands(1),nbf + do ib2=RT_bands(1),nbf + dG_out(ib1,ib2)=dG_out(ib1,ib2)-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) + enddo + enddo + ! + do ib1=nbf+1,RT_bands(2) + do ib2=nbf+1,RT_bands(2) + dG_out(ib1,ib2)=dG_out(ib1,ib2)-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) + enddo + enddo + ! + endif + ! +end subroutine RT_EULER_step_apply diff --git a/src/real_time_propagation/RT_Integrator_init.F b/src/real_time_propagation/RT_Integrator_init.F index 814bbd3547..9619039178 100644 --- a/src/real_time_propagation/RT_Integrator_init.F +++ b/src/real_time_propagation/RT_Integrator_init.F @@ -26,7 +26,7 @@ subroutine RT_Integrator_init() use pars, ONLY:SP,cONE,cZERO use com, ONLY:msg use stderr, ONLY:intc - use real_time, ONLY:l_RT_EULER,l_RT_EXP,l_RT_INV, & + use real_time, ONLY:l_RT_EULER,l_RT_EXP,l_RT_INV,l_RT_FRES, & & l_RT_RWA,l_RT_ACC,l_RT_DIAG,l_RT_PERT, & & l_RT_HEUN,l_RT_RK2,l_RT_RK4,l_RT_SIMPLE, & & Integrator_name,integrator_exp_order, & @@ -77,8 +77,11 @@ subroutine RT_Integrator_init() l_RT_DIAG= l_RT_INV .and. & & index(Integrator_name,'DIAG' )/=0.or.index(Integrator_name,'diag' )/=0 ! - l_RT_PERT= (l_RT_EULER.and.l_RT_RWA) .and. & -& index(Integrator_name,'PERT' )/=0.or.index(Integrator_name,'pert' )/=0 + l_RT_PERT= l_RT_EULER .and. & +& index(Integrator_name,'PERT' )/=0.or.index(Integrator_name,'pert' )/=0 + ! + l_RT_FRES= l_RT_PERT .and. & +& index(Integrator_name,'FRES' )/=0.or.index(Integrator_name,'fres' )/=0 ! ! d) Reset integrator name ! @@ -96,6 +99,7 @@ subroutine RT_Integrator_init() if (l_RT_ACC ) Integrator_name = trim(Integrator_name)//" + ACC" if (l_RT_DIAG ) Integrator_name = trim(Integrator_name)//" + DIAG" if (l_RT_PERT ) Integrator_name = trim(Integrator_name)//" + PERT" + if (l_RT_FRES ) Integrator_name = trim(Integrator_name)//" + FRES" ! call msg('s','Integrator '//trim(Integrator_name)) ! From b6b898209d37a69d81711a3e202c8ad8fba745bb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Apr 2023 21:36:53 +0200 Subject: [PATCH 0620/1367] Version 5.1.0, Revision 22172, Hash 75689aa06 MODIFIED * include/driver/version.h real_time_initialize/RT_initialize.F Bugs: - [yambo_rt] Fixed bug introduced on fields checks Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/real_time_initialize/RT_initialize.F | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 6f788c2400..2e41392f7e 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22170 -#define YAMBO_HASH "5b4dd75ca" +#define YAMBO_REVISION 22172 +#define YAMBO_HASH "75689aa06" diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 2d37bf79e8..0d291ad76f 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -256,8 +256,8 @@ subroutine RT_initialize(E,k,q) ! l_NE_with_fields=.true. ! - if( (field_defs(1)/='DELTA'.or.field_defs(1)/='GAUSS'.or. & -& field_defs(1)/='RECT' .or.field_defs(1)/='FROM_FILE') & + if( (field_defs(1)/='DELTA'.and.field_defs(1)/='GAUSS'.and. & +& field_defs(1)/='RECT' .and.field_defs(1)/='FROM_FILE') & & .and. Efield(i1)%frequency(1)==0._SP) & & call error(trim(MSG_ch)//" field has zero frequency.") ! From f5b57fdbcdbea749bce206d39742ffdb05b158b0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Apr 2023 21:51:50 +0200 Subject: [PATCH 0621/1367] Version 5.1.0, Revision 22173, Hash b6b898209 MODIFIED * include/driver/version.h real_time_propagation/RT_EULER_step.F Bugs: - [yambo_rt] Fixed two small bugs in the perturbative time step Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/real_time_propagation/RT_EULER_step.F | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 2e41392f7e..9efe232595 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22172 -#define YAMBO_HASH "75689aa06" +#define YAMBO_REVISION 22173 +#define YAMBO_HASH "b6b898209" diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index 2ae8617197..870abf4dab 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -93,9 +93,8 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) ! H_k=cZERO if(.not.l_RT_RWA) H_k=H_EQ(:,:,ik,1) - if( l_RT_FRES ) H_k=H_k-H_field(:,:,ik,1) + if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,1) G_k=dG_in+G_lesser_reference(:,:,ik) - H_k=Ho_plus_Sigma(:,:,ik,1) ! call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") ! From ffc7c5e0042c795848745d86c3ee1645b4087df9 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 24 Apr 2023 08:45:31 +0200 Subject: [PATCH 0622/1367] cuda compilation fixed --- src/dipoles/DIPOLE_overlaps.F | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 253fd13986..b8b6d04ef9 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -34,7 +34,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) use vec_operate, ONLY:k_periodic_idx use DIPOLES, ONLY:DIPOLE_t,DIP_S use electrons, ONLY:n_spinor,n_sp_pol - use wrapper_omp, ONLY:Vstar_dot_V_omp + use wrapper_omp, ONLY:Vstar_dot_V_omp,Vstar_dot_V use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & @@ -159,7 +159,11 @@ subroutine DIPOLE_overlaps(Xk,Dip) do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & +#if defined _CUDA + & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) +#else & Vstar_dot_V_omp(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) +#endif enddo ! ibp enddo ! ib ! From 44a8287cf62fc6e2f814c245c5e1ebdeb0f481e1 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 24 Apr 2023 09:58:28 +0200 Subject: [PATCH 0623/1367] Revert "cuda compilation fixed" This reverts commit ffc7c5e0042c795848745d86c3ee1645b4087df9. --- src/dipoles/DIPOLE_overlaps.F | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index b8b6d04ef9..253fd13986 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -34,7 +34,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) use vec_operate, ONLY:k_periodic_idx use DIPOLES, ONLY:DIPOLE_t,DIP_S use electrons, ONLY:n_spinor,n_sp_pol - use wrapper_omp, ONLY:Vstar_dot_V_omp,Vstar_dot_V + use wrapper_omp, ONLY:Vstar_dot_V_omp use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & @@ -159,11 +159,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & -#if defined _CUDA - & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) -#else & Vstar_dot_V_omp(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) -#endif enddo ! ibp enddo ! ib ! From 0c0b01e5d88271124f33f88728bc3bd57b1c70bb Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 24 Apr 2023 15:29:49 +0200 Subject: [PATCH 0624/1367] Version 5.1.0, Revision 22124, Hash 407f3a474 MODIFIED * include/driver/version.h dipoles/DIPOLE_overlaps.F NEW * Bugs: - workaround for issue #729 to fix compilation Patch sent by: Davide Sangalli --- include/driver/version.h | 4 ++-- src/dipoles/DIPOLE_overlaps.F | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/driver/version.h b/include/driver/version.h index 951d208485..6a7fb9fa46 100644 --- a/include/driver/version.h +++ b/include/driver/version.h @@ -25,6 +25,6 @@ #define YAMBO_VERSION 5 #define YAMBO_SUBVERSION 1 #define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22080 -#define YAMBO_HASH "195023b9a" +#define YAMBO_REVISION 22124 +#define YAMBO_HASH "407f3a474" diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 253fd13986..a2e4e01a6d 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -25,6 +25,8 @@ ! !! @param[out] DIP_S Overlap matrices ! +#include +! subroutine DIPOLE_overlaps(Xk,Dip) ! use pars, ONLY:SP,cZERO,pi @@ -34,7 +36,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) use vec_operate, ONLY:k_periodic_idx use DIPOLES, ONLY:DIPOLE_t,DIP_S use electrons, ONLY:n_spinor,n_sp_pol - use wrapper_omp, ONLY:Vstar_dot_V_omp + use wrapper, ONLY:Vstar_dot_V use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & @@ -42,8 +44,6 @@ subroutine DIPOLE_overlaps(Xk,Dip) use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute use interfaces, ONLY:WF_shift_kpoint,WF_symm_kpoint,eval_G_minus_G,WF_load,WF_free use timing_m, ONLY:timing - ! -#include #include ! type(bz_samp), intent(in) :: Xk @@ -55,10 +55,12 @@ subroutine DIPOLE_overlaps(Xk,Dip) integer :: iG0,ng_tmp,wf_ng_save,wf_ng_1st_BZ_save integer :: id,idx_kp(3),idx_k(3),shift(3),g0_idx(3,2) real(SP) :: g0_length(3) - complex(SP), allocatable :: WF_symm(:,:,:,:),WF_shifted(:,:,:,:),WF_ik(:,:,:,:),WF_ikp(:,:,:,:) -#ifdef _CUDA - attributes(device):: WF_symm,WF_shifted,WF_ik,WF_ikp -#endif + ! + complex(SP), allocatable DEV_ATTR :: WF_symm(:,:,:,:) + complex(SP), allocatable DEV_ATTR :: WF_shifted(:,:,:,:) + complex(SP), allocatable DEV_ATTR :: WF_ik(:,:,:,:) + complex(SP), allocatable DEV_ATTR :: WF_ikp(:,:,:,:) + ! logical :: USE_shifted_wf ! call timing("DIPOLE_overlaps",OPR="start") @@ -159,7 +161,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) do ibp=1,Dip%ib(2) if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & - & Vstar_dot_V_omp(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) + & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) enddo ! ibp enddo ! ib ! From 71a1f067605e6fcd5833b364f6785b50048a6ba8 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 24 Apr 2023 15:30:56 +0200 Subject: [PATCH 0625/1367] tentative implementation of interface to magma_Xgeev_m (X=z,c) --- config/mk/global/defs.mk.in | 1 + sbin/compilation/libraries.sh | 2 +- src/modules/.objects | 12 +- src/modules/mod_linear_algebra.F | 52 +++- src/modules/mod_magma2.F | 279 ++++++++++++++++++++++ src/modules/mod_magma2_cfortran.F | 230 ++++++++++++++++++ src/modules/mod_magma2_common.F | 378 ++++++++++++++++++++++++++++++ src/modules/mod_magma2_dfortran.F | 230 ++++++++++++++++++ src/modules/mod_magma2_sfortran.F | 230 ++++++++++++++++++ src/modules/mod_magma2_zfortran.F | 230 ++++++++++++++++++ 10 files changed, 1633 insertions(+), 11 deletions(-) create mode 100644 src/modules/mod_magma2.F create mode 100644 src/modules/mod_magma2_cfortran.F create mode 100644 src/modules/mod_magma2_common.F create mode 100644 src/modules/mod_magma2_dfortran.F create mode 100644 src/modules/mod_magma2_sfortran.F create mode 100644 src/modules/mod_magma2_zfortran.F diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index 15e0967012..fdd6a54f37 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -50,6 +50,7 @@ do_e2y = @compile_e2y@ do_libxc = @compile_libxc@ do_petsc = @compile_petsc@ do_slepc = @compile_slepc@ +do_magma = @compile_magma@ shell = @SHELL@ package_bugreport = @PACKAGE_BUGREPORT@ prefix = @prefix@ diff --git a/sbin/compilation/libraries.sh b/sbin/compilation/libraries.sh index 5371724801..6e74955d04 100755 --- a/sbin/compilation/libraries.sh +++ b/sbin/compilation/libraries.sh @@ -34,7 +34,7 @@ done # # llocal="-lqe_pseudo -lmath77 -lslatec -llocal" -lPLA="\$(lscalapack) \$(lblacs) \$(llapack) \$(lblas)" +lPLA="\$(lscalapack) \$(lblacs) \$(lmagma) \$(llapack) \$(lblas)" lSL="\$(lslepc) \$(lpetsc)" lIO="\$(liotk) \$(lpnetcdf) \$(lnetcdff) \$(lnetcdf) \$(lhdf5)" lextlibs="\$(llibxc) \$(lfft) \$(lfutile) \$(lyaml)" diff --git a/src/modules/.objects b/src/modules/.objects index a8fc2f172d..2e8aaf57ad 100644 --- a/src/modules/.objects +++ b/src/modules/.objects @@ -16,15 +16,18 @@ RT_objects_pre = mod_RT_lifetimes.o mod_RT_occupations.o mod_real_time.o #if defined _NL NL_objects = mod_fields.o mod_electric.o mod_nl_optics.o mod_NL_interfaces.o #endif +#if defined _MAGMA +MAGMA_objects = mod_magma2_common.o mod_magma2_sfortran.o mod_magma2_dfortran.o \ + mod_magma2_cfortran.o mod_magma2_zfortran.o mod_magma2.o #if defined _io_lib objs = mod_pars.o mod_stderr.o mod_parallel.o mod_parallel_interface.o \ mod_com_interfcs.o mod_descriptors.o mod_com.o mod_IO.o mod_IO_interfaces.o #else ELPH_objects = mod_ELPH.o mod_PHEL.o DEV_objects = mod_cusolverdn_y.o mod_cuda.o -objs = mod_pars.o mod_units.o mod_lexical_sort.o mod_stderr.o mod_memory.o mod_openmp.o mod_parallel.o mod_parallel_interface.o mod_matrix.o mod_SLK.o \ - mod_linear_algebra.o mod_wrapper.o mod_wrapper_omp.o mod_drivers.o mod_FFT.o\ - mod_LIVE_t.o mod_logo.o mod_cutoff_ws.o \ +objs = mod_pars.o mod_units.o mod_lexical_sort.o mod_stderr.o mod_memory.o mod_openmp.o mod_parallel.o mod_parallel_interface.o \ + mod_matrix.o mod_SLK.o $(MAGMA_objects) mod_linear_algebra.o mod_wrapper.o mod_wrapper_omp.o \ + mod_drivers.o mod_FFT.o mod_LIVE_t.o mod_logo.o mod_cutoff_ws.o \ mod_descriptors.o mod_com.o mod_com_interfcs.o mod_timing.o mod_R_lattice.o mod_electrons.o mod_wave_func.o mod_OUTPUT.o \ mod_xc_functionals.o mod_global_XC.o \ mod_matrix_operate.o mod_D_lattice.o mod_frequency.o \ @@ -33,6 +36,7 @@ objs = mod_pars.o mod_units.o mod_lexical_sort.o mod_stderr.o mod_memory.o mod_o mod_QP.o mod_MPA.o mod_collision_el.o \ mod_BS.o mod_BS_solvers.o mod_QP_CTL.o mod_TDDFT.o mod_ACFDT.o mod_MAGNONS.o mod_DICHROISM.o mod_PHOTOLUM.o \ mod_IO.o mod_IO_interfaces.o $(ELPH_objects) mod_POL_FIT.o $(RT_objects_pre) \ - mod_hamiltonian.o $(COMMON_objects) $(SC_objects) $(RT_objects_post) $(RT_objects_iterative) $(MAGNETIC_objects) $(NL_objects) $(ELECTRIC_objects) \ + mod_hamiltonian.o $(COMMON_objects) $(SC_objects) $(RT_objects_post) $(RT_objects_iterative) $(MAGNETIC_objects) \ + $(NL_objects) $(ELECTRIC_objects) \ mod_debug.o mod_interfaces.o mod_interpolate_tools.o mod_interpolate.o SET_logicals.o SET_defaults.o $(DEV_objects) #endif diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index a078d7f3ef..2ab1a523e8 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -23,7 +23,12 @@ ! module linear_algebra ! - use pars, ONLY:SP,schlen + use iso_c_binding + use pars, ONLY: SP,schlen +#ifdef _MAGMA + use magma2, ONLY: magma_init,magma_queue_create, & +& magma_cgeev_m,magma_zgeev_m,MagmaVec +#endif ! #include #include @@ -39,6 +44,11 @@ module linear_algebra integer, parameter :: MAT_MUL=9 integer, parameter :: min_cpu_block_size=50 ! + ! magma vars + ! + type(c_ptr) :: magma_queue !! magma_queue_t + logical :: magma_init_done = .false. + ! ! Common Work Space ! type LALGEBRA_WS @@ -125,6 +135,15 @@ subroutine LINEAR_ALGEBRA_error(calling_subr,message_) call error( trim( STRING_pack('LINEAR ALGEBRA driver [',trim(calling_subr),']',trim(message_)) )) end subroutine ! + subroutine magma_setup() +#ifdef _MAGMA + call magma_init() + call magma_queue_create( 0, magma_queue ) + magma_init_done=.true. +#endif + return + end subroutine + ! !============================ ! SINGLE VALUE DECOMPOSITION !============================ @@ -192,9 +211,9 @@ subroutine heev(msize,M,E_real,work,lwork,rwk,ifail) complex(SP),intent(inout) :: M(msize,*) ! #if defined _DOUBLE - call ZHEEV('V','U',msize,M,msize,E_real,work,lwork,rwk,ifail) + call ZHEEV('V','U',msize,M,msize,E_real,work,lwork,rwk,ifail) #else - call CHEEV('V','U',msize,M,msize,E_real,work,lwork,rwk,ifail) + call CHEEV('V','U',msize,M,msize,E_real,work,lwork,rwk,ifail) #endif ! end subroutine heev @@ -207,10 +226,31 @@ subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) complex(SP),intent(out) :: E_cmpl(*),V_left(msize,*),V_right(msize,*),work(*) complex(SP),intent(inout) :: M(msize,*) ! -#if defined _DOUBLE - call ZGEEV('V','V',msize,M,msize,E_cmpl,V_left,msize,V_right,msize,work,lwork,rwk,ifail) + ! +#if defined _MAGMA + ! + ! use magma (if available) + ! + if (.not.magma_init_done) call magma_setup() + ! +# if defined _DOUBLE + call magma_zgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& +& work,lwork,rwk,ifail) +# else + call magma_cgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& +& work,lwork,rwk,ifail) +# endif + ! #else - call CGEEV('V','V',msize,M,msize,E_cmpl,V_left,msize,V_right,msize,work,lwork,rwk,ifail) + ! + ! use lapack + ! +# if defined _DOUBLE + call ZGEEV('V','V',msize,M,msize,E_cmpl,V_left,msize,V_right,msize,work,lwork,rwk,ifail) +# else + call CGEEV('V','V',msize,M,msize,E_cmpl,V_left,msize,V_right,msize,work,lwork,rwk,ifail) +# endif + ! #endif ! end subroutine geev diff --git a/src/modules/mod_magma2.F b/src/modules/mod_magma2.F new file mode 100644 index 0000000000..bcf771ab29 --- /dev/null +++ b/src/modules/mod_magma2.F @@ -0,0 +1,279 @@ +! +! -- MAGMA (version 2.7.1) -- +! Univ. of Tennessee, Knoxville +! Univ. of California, Berkeley +! Univ. of Colorado, Denver +! @date February 2023 +! + +module magma2 + +use iso_c_binding + +use magma2_common +use magma2_sfortran +use magma2_dfortran +use magma2_cfortran +use magma2_zfortran + +implicit none + +!! ============================================================================= +!! Parameter constants from magma_types.h +integer(c_int), parameter :: & + MagmaFalse = 0, & + MagmaTrue = 1, & + + MagmaRowMajor = 101, & + MagmaColMajor = 102, & + + MagmaNoTrans = 111, & + MagmaTrans = 112, & + MagmaConjTrans = 113, & + + MagmaUpper = 121, & + MagmaLower = 122, & + MagmaGeneral = 123, & + MagmaFull = 123, & !! deprecated, use MagmaGeneral + + MagmaNonUnit = 131, & + MagmaUnit = 132, & + + MagmaLeft = 141, & + MagmaRight = 142, & + MagmaBothSides = 143, & + + MagmaNoVec = 301, & !/* geev, syev, gesvd */ + MagmaVec = 302, & !/* geev, syev */ + MagmaIVec = 303, & !/* stedc */ + MagmaAllVec = 304, & !/* gesvd, trevc */ + MagmaSomeVec = 305, & !/* gesvd, trevc */ + MagmaOverwriteVec = 306, & !/* gesvd */ + MagmaBacktransVec = 307 !/* trevc */ +!! todo all the rest + + +!! ============================================================================= +!! Fortran interfaces to C functions +interface + + !! ------------------------------------------------------------------------- + !! initialize + subroutine magma_init() & + bind(C, name="magma_init") + use iso_c_binding + end subroutine + + subroutine magma_finalize() & + bind(C, name="magma_finalize") + use iso_c_binding + end subroutine + + !! ------------------------------------------------------------------------- + !! version + subroutine magma_version( major, minor, micro ) & + bind(C, name="magma_version") + use iso_c_binding + integer(c_int), target :: major, minor, micro + end subroutine + + subroutine magma_print_environment() & + bind(C, name="magma_print_environment") + use iso_c_binding + end subroutine + + !! ------------------------------------------------------------------------- + !! timing + real(c_double) function magma_wtime() & + bind(C, name="magma_wtime") + use iso_c_binding + end function + + real(c_double) function magma_sync_wtime( queue ) & + bind(C, name="magma_wtime") + use iso_c_binding + type(c_ptr), value :: queue + end function + + !! ------------------------------------------------------------------------- + !! device support + integer(c_int) function magma_num_gpus() & + bind(C, name="magma_num_gpus") + use iso_c_binding + end function + + integer(c_int) function magma_get_device_arch() & + bind(C, name="magma_getdevice_arch") + use iso_c_binding + end function + + subroutine magma_get_device( dev ) & + bind(C, name="magma_getdevice") + use iso_c_binding + integer(c_int), target :: dev + end subroutine + + subroutine magma_set_device( dev ) & + bind(C, name="magma_setdevice") + use iso_c_binding + integer(c_int), value :: dev + end subroutine + + integer(c_size_t) function magma_mem_size( queue ) & + bind(C, name="magma_mem_size") + use iso_c_binding + type(c_ptr), value :: queue + end function + + !! ------------------------------------------------------------------------- + !! queue support + subroutine magma_queue_create_internal( dev, queue_ptr, func, file, line ) & + bind(C, name="magma_queue_create_internal") + use iso_c_binding + integer(c_int), value :: dev + type(c_ptr), target :: queue_ptr !! queue_t* + character(c_char) :: func, file + integer(c_int), value :: line + end subroutine + + subroutine magma_queue_destroy_internal( queue, func, file, line ) & + bind(C, name="magma_queue_destroy_internal") + use iso_c_binding + type(c_ptr), value :: queue !! queue_t + character(c_char) :: func, file + integer(c_int), value :: line + end subroutine + + subroutine magma_queue_sync_internal( queue, func, file, line ) & + bind(C, name="magma_queue_sync_internal") + use iso_c_binding + type(c_ptr), value :: queue !! queue_t + character(c_char) :: func, file + integer(c_int), value :: line + end subroutine + + integer(c_int) function magma_queue_get_device( queue ) & + bind(C, name="magma_queue_get_device") + use iso_c_binding + type(c_ptr), value :: queue !! queue_t + end function + + !! ------------------------------------------------------------------------- + !! offsets pointers -- 1D vectors with inc + !! see offset.c + type(c_ptr) function magma_soffset_1d( ptr, inc, i ) & + bind(C, name="magma_soffset_1d") + use iso_c_binding + type(c_ptr), value :: ptr + integer(c_int), value :: inc, i + end function + + type(c_ptr) function magma_doffset_1d( ptr, inc, i ) & + bind(C, name="magma_doffset_1d") + use iso_c_binding + type(c_ptr), value :: ptr + integer(c_int), value :: inc, i + end function + + type(c_ptr) function magma_coffset_1d( ptr, inc, i ) & + bind(C, name="magma_coffset_1d") + use iso_c_binding + type(c_ptr), value :: ptr + integer(c_int), value :: inc, i + end function + + type(c_ptr) function magma_zoffset_1d( ptr, inc, i ) & + bind(C, name="magma_zoffset_1d") + use iso_c_binding + type(c_ptr), value :: ptr + integer(c_int), value :: inc, i + end function + + type(c_ptr) function magma_ioffset_1d( ptr, inc, i ) & + bind(C, name="magma_ioffset_1d") + use iso_c_binding + type(c_ptr), value :: ptr + integer(c_int), value :: inc, i + end function + + !! ------------------------------------------------------------------------- + !! offsets pointers -- 2D matrices with lda + !! see offset.c + type(c_ptr) function magma_soffset_2d( ptr, lda, i, j ) & + bind(C, name="magma_soffset_2d") + use iso_c_binding + type(c_ptr), value:: ptr + integer(c_int), value :: lda, i, j + end function + + type(c_ptr) function magma_doffset_2d( ptr, lda, i, j ) & + bind(C, name="magma_doffset_2d") + use iso_c_binding + type(c_ptr), value:: ptr + integer(c_int), value :: lda, i, j + end function + + type(c_ptr) function magma_coffset_2d( ptr, lda, i, j ) & + bind(C, name="magma_coffset_2d") + use iso_c_binding + type(c_ptr), value:: ptr + integer(c_int), value :: lda, i, j + end function + + type(c_ptr) function magma_zoffset_2d( ptr, lda, i, j ) & + bind(C, name="magma_zoffset_2d") + use iso_c_binding + type(c_ptr), value:: ptr + integer(c_int), value :: lda, i, j + end function + + type(c_ptr) function magma_ioffset_2d( ptr, lda, i, j ) & + bind(C, name="magma_ioffset_2d") + use iso_c_binding + type(c_ptr), value:: ptr + integer(c_int), value :: lda, i, j + end function + +end interface + +!! ============================================================================= +!! Fortran routines & functions +contains + + !! ------------------------------------------------------------------------- + !! queue support + subroutine magma_queue_create( dev, queue_ptr ) + use iso_c_binding + integer(c_int), value :: dev + type(c_ptr), target :: queue_ptr !! queue_t* + + call magma_queue_create_internal( & + dev, queue_ptr, & + "magma_queue_create" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_queue_destroy( queue ) + use iso_c_binding + type(c_ptr), value :: queue !! queue_t + + call magma_queue_destroy_internal( & + queue, & + "magma_queue_destroy" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_queue_sync( queue ) + use iso_c_binding + type(c_ptr), value :: queue !! queue_t + + call magma_queue_sync_internal( & + queue, & + "magma_queue_sync" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + +end module diff --git a/src/modules/mod_magma2_cfortran.F b/src/modules/mod_magma2_cfortran.F new file mode 100644 index 0000000000..4d61c9bc83 --- /dev/null +++ b/src/modules/mod_magma2_cfortran.F @@ -0,0 +1,230 @@ +!! @generated from magma2_zfortran.F90, fortran z -> c, Sat Apr 22 18:54:26 2023 + +module magma2_cfortran + +use magma2_common +implicit none + +!! ============================================================================= +!! Fortran interfaces to C functions +interface + + !! ------------------------------------------------------------------------- + !! CPU interfaces (matrix in CPU memory) + subroutine magma_cgetrf( m, n, A, lda, ipiv, info ) & + bind(C, name="magma_cgetrf") + use iso_c_binding + integer(c_int), value :: m, n, lda + complex(c_float_complex), target :: A(lda,*) + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_cpotrf( uplo, n, A, lda, info ) & + bind(C, name="magma_cpotrf") + use iso_c_binding + integer(c_int), value :: uplo + integer(c_int), value :: n, lda + complex(c_float_complex), target :: A(lda,*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_cgeev") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + complex(c_float_complex), target :: A(lda,*) + complex(c_float_complex), target :: w(*) + complex(c_float_complex), target :: VR(ldvr,*), VL(ldvl,*) + complex(c_float_complex), target :: work(*) + real(c_float), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_cgeev_m") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + complex(c_float_complex), target :: A(lda,*) + complex(c_float_complex), target :: w(*) + complex(c_float_complex), target :: VR(ldvr,*), VL(ldvl,*) + complex(c_float_complex), target :: work(*) + real(c_float), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_cheevd_m") + use iso_c_binding + integer(c_int), value :: ngpu + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, lda, lwork, lrwork, liwork + complex(c_float_complex), target :: A(lda,*) + real(c_double), target :: w(*) + complex(c_float_complex), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! ------------------------------------------------------------------------- + !! GPU interfaces (matrix in GPU memory) + subroutine magma_cgetrf_gpu( m, n, dA, lda, ipiv, info ) & + bind(C, name="magma_cgetrf_gpu") + use iso_c_binding + integer(c_int), value :: m, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_cpotrf_gpu( uplo, n, dA, lda, info ) & + bind(C, name="magma_cpotrf_gpu") + use iso_c_binding + integer(c_int), value :: uplo, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_cheevd_gpu") + use iso_c_binding + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork + type(c_ptr), value :: dA !! double complex** + real(c_double), target :: w(*) + complex(c_float_complex), target :: wA(*) + complex(c_float_complex), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! batched GPU interfaces (all arrays in GPU memory) + subroutine magma_cgetrf_batched( & + m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & + bind(C, name="magma_cgetrf_batched") + use iso_c_binding + integer(c_int), value :: m, n, lda, batchcount + type(c_ptr), value :: dA_array !! double_complex** + type(c_ptr), value :: ipiv_array !! int** + type(c_ptr), value :: info_array !! int* + type(c_ptr), value :: queue + end subroutine + + !! ------------------------------------------------------------------------- + !! BLAS (matrices in GPU memory) + subroutine magma_caxpy( & + n, & + alpha, dx, incx, & + dy, incy, & + queue ) & + bind(C, name="magma_caxpy") + use iso_c_binding + integer(c_int), value :: n, incx, incy + complex(c_float_complex), value :: alpha + type(c_ptr), value :: dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_cgemv( & + transA, m, n, & + alpha, dA, lda, & + dx, incx, & + beta, dy, incy, & + queue ) & + bind(C, name="magma_cgemv") + use iso_c_binding + integer(c_int), value :: transA, m, n, lda, incx, incy + complex(c_float_complex), value :: alpha, beta + type(c_ptr), value :: dA, dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_cgemm( & + transA, transB, m, n, k, & + alpha, dA, lda, & + dB, ldb, & + beta, dC, ldc, & + queue ) & + bind(C, name="magma_cgemm") + use iso_c_binding + integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc + complex(c_float_complex), value :: alpha, beta + type(c_ptr), value :: dA, dB, dC + type(c_ptr), value :: queue !! queue_t + end subroutine + +end interface + +!! ============================================================================= +!! Fortran routines & functions +contains + + !! ------------------------------------------------------------------------- + !! malloc wrappers + integer(c_int) function magma_cmalloc( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_cmalloc = magma_malloc( ptr, n*sizeof_complex ) + end function + + integer(c_int) function magma_cmalloc_cpu( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_cmalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_complex ) + end function + + integer(c_int) function magma_cmalloc_pinned( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_cmalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_complex ) + end function + + !! ------------------------------------------------------------------------- + !! set/get wrappers + subroutine magma_csetmatrix( & + m, n, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + complex(c_float_complex), target :: hA_src(lda,*) + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, int(sizeof_complex), c_loc(hA_src), lda, dB_dst, ldb, queue, & + "magma_csetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_cgetmatrix( & + m, n, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), value :: dA_src + complex(c_float_complex), target :: hB_dst(ldb,*) + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, int(sizeof_complex), dA_src, lda, c_loc(hB_dst), ldb, queue, & + "magma_cgetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + +end module diff --git a/src/modules/mod_magma2_common.F b/src/modules/mod_magma2_common.F new file mode 100644 index 0000000000..ac18317b87 --- /dev/null +++ b/src/modules/mod_magma2_common.F @@ -0,0 +1,378 @@ +module magma2_common + +use iso_c_binding +implicit none + +!! ===================================================================== +!! Parameter constants +real(c_float), parameter :: sdummy = 0 +real(c_double), parameter :: ddummy = 0 +complex(c_float_complex), parameter :: cdummy = 0 +complex(c_double_complex), parameter :: zdummy = 0 +integer(c_int), parameter :: idummy = 0 +type(c_ptr), parameter :: ptr_dummy = c_null_ptr + +!! Intel ifort chokes on c_sizeof here, so use extension sizeof +!! see https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/495001 +integer(c_size_t), parameter :: & + sizeof_real = sizeof(sdummy), & + sizeof_double = sizeof(ddummy), & + sizeof_complex = sizeof(cdummy), & + sizeof_complex16 = sizeof(zdummy), & + sizeof_int = sizeof(idummy), & + sizeof_ptr = sizeof(ptr_dummy) + + +!! ============================================================================= +!! Fortran interfaces to C functions +interface + + !! ------------------------------------------------------------------------- + !! magma_malloc (GPU memory) + integer(c_int) function magma_malloc( ptr, bytes ) & + bind(C, name="magma_malloc") + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: bytes + end function + + !! todo imalloc + + integer(c_int) function magma_free_internal( ptr, func, file, line ) & + bind(C, name="magma_free_internal") + use iso_c_binding + type(c_ptr), value :: ptr !! void* + character(c_char) :: func, file + integer(c_int), value :: line + end function + + !! ------------------------------------------------------------------------- + !! magma_malloc_cpu (CPU main memory) + !! these are aligned to 32-byte boundary + integer(c_int) function magma_malloc_cpu( ptr, bytes ) & + bind(C, name="magma_malloc_cpu") + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: bytes + end function + + !! todo imalloc_cpu + + integer(c_int) function magma_free_cpu( ptr ) & + bind(C, name="magma_free_cpu") + use iso_c_binding + type(c_ptr), value :: ptr !! void* + end function + + !! ------------------------------------------------------------------------- + !! magma_malloc_pinned (pinned CPU main memory) + integer(c_int) function magma_malloc_pinned( ptr, bytes ) & + bind(C, name="magma_malloc_pinned") + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: bytes + end function + + !! todo imalloc_pinned + + integer(c_int) function magma_free_pinned_internal( ptr, func, file, line ) & + bind(C, name="magma_free_pinned_internal") + use iso_c_binding + type(c_ptr), value :: ptr !! void* + character(c_char), value :: func, file + integer(c_int), value :: line + end function + + !! ------------------------------------------------------------------------- + !! set/get + subroutine magma_setmatrix_internal( & + m, n, elemsize, hA_src, lda, dB_dst, ldb, queue, func, file, line ) & + bind(C, name="magma_setmatrix_internal") + use iso_c_binding + integer(c_int), value :: m, n, elemsize, lda, ldb + type(c_ptr), value :: hA_src + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + character(c_char), value :: func, file + integer(c_int), value :: line + end subroutine + + subroutine magma_getmatrix_internal( & + m, n, elemsize, dA_src, lda, hB_dst, ldb, queue, func, file, line ) & + bind(C, name="magma_getmatrix_internal") + use iso_c_binding + integer(c_int), value :: m, n, elemsize, lda, ldb + type(c_ptr), value :: dA_src + type(c_ptr), value :: hB_dst + type(c_ptr), value :: queue + character(c_char), value :: func, file + integer(c_int), value :: line + end subroutine + + subroutine magma_setvector_internal( & + n, elemsize, hx_src, incx, dy_dst, incy, queue, func, file, line ) & + bind(C, name="magma_setvector_internal") + use iso_c_binding + integer(c_int), value :: n, elemsize, incx, incy + type(c_ptr), value :: hx_src + type(c_ptr), value :: dy_dst + type(c_ptr), value :: queue + character(c_char), value :: func, file + integer(c_int), value :: line + end subroutine + + subroutine magma_getvector_internal( & + n, elemsize, dx_src, incx, hy_dst, incy, queue, func, file, line ) & + bind(C, name="magma_getvector_internal") + use iso_c_binding + integer(c_int), value :: n, elemsize, incx, incy + type(c_ptr), value :: dx_src + type(c_ptr), value :: hy_dst + type(c_ptr), value :: queue + character(c_char), value :: func, file + integer(c_int), value :: line + end subroutine + +end interface + +!! ============================================================================= +!! Fortran routines & functions +contains + + !! ------------------------------------------------------------------------- + !! malloc wrappers + integer(c_int) function magma_imalloc( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_imalloc = magma_malloc( ptr, n*sizeof_int ) + end function + + integer(c_int) function magma_imalloc_cpu( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_imalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_int ) + end function + + integer(c_int) function magma_imalloc_pinned( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_imalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_int ) + end function + + !! ------------------------------------------------------------------------- + !! magma_free wrappers + integer(c_int) function magma_free( ptr ) + type(c_ptr) :: ptr + + magma_free = magma_free_internal( & + ptr, & + "magma_free" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end function + + integer(c_int) function magma_free_pinned( ptr ) + type(c_ptr) :: ptr + + magma_free_pinned = magma_free_internal( & + ptr, & + "magma_free_pinned" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end function + + !! ------------------------------------------------------------------------- + !! set/get wrappers + subroutine magma_setmatrix( & + m, n, elemsize, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, elemsize, lda, ldb + type(c_ptr), value :: hA_src + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, elemsize, hA_src, lda, dB_dst, ldb, queue, & + "magma_setmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_getmatrix( & + m, n, elemsize, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, elemsize, lda, ldb + type(c_ptr), value :: dA_src + type(c_ptr), value :: hB_dst + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, elemsize, dA_src, lda, hB_dst, ldb, queue, & + "magma_getmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_setvector( & + n, elemsize, hx_src, incx, dy_dst, incy, queue ) + use iso_c_binding + integer(c_int), value :: n, elemsize, incx, incy + type(c_ptr), value :: hx_src + type(c_ptr), value :: dy_dst + type(c_ptr), value :: queue + + call magma_setvector_internal( & + n, elemsize, hx_src, incx, dy_dst, incy, queue, & + "magma_setvector" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_getvector( & + n, elemsize, dx_src, incx, hy_dst, incy, queue ) + use iso_c_binding + integer(c_int), value :: n, elemsize, incx, incy + type(c_ptr), value :: dx_src + type(c_ptr), value :: hy_dst + type(c_ptr), value :: queue + + call magma_getvector_internal( & + n, elemsize, dx_src, incx, hy_dst, incy, queue, & + "magma_getvector" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + !! ------------------------------------------------------------------------- + !! set/get wrappers + !! matrices & vectors of integers + subroutine magma_isetmatrix( & + m, n, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + integer(c_int), target :: hA_src(lda,*) + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, int(sizeof_int), c_loc(hA_src), lda, dB_dst, ldb, queue, & + "magma_isetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_igetmatrix( & + m, n, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), value :: dA_src + integer(c_int), target :: hB_dst(ldb,*) + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, int(sizeof_int), dA_src, lda, c_loc(hB_dst), ldb, queue, & + "magma_igetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_isetvector( & + n, hx_src, incx, dy_dst, incy, queue ) + use iso_c_binding + integer(c_int), value :: n, incx, incy + integer(c_int), target :: hx_src(*) + type(c_ptr), value :: dy_dst + type(c_ptr), value :: queue + + call magma_setvector_internal( & + n, int(sizeof_int), c_loc(hx_src), incx, dy_dst, incy, queue, & + "magma_isetvector" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_igetvector( & + n, dx_src, incx, hy_dst, incy, queue ) + use iso_c_binding + integer(c_int), value :: n, incx, incy + type(c_ptr), value :: dx_src + integer(c_int), target :: hy_dst(*) + type(c_ptr), value :: queue + + call magma_getvector_internal( & + n, int(sizeof_int), dx_src, incx, c_loc(hy_dst), incy, queue, & + "magma_igetvector" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + !! ------------------------------------------------------------------------- + !! set/get wrappers + !! matrices & vectors of c_ptr pointers + subroutine magma_psetmatrix( & + m, n, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), target :: hA_src(lda,*) + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, int(sizeof_ptr), c_loc(hA_src), lda, dB_dst, ldb, queue, & + "magma_psetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_pgetmatrix( & + m, n, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), value :: dA_src + type(c_ptr), target :: hB_dst(ldb,*) + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, int(sizeof_ptr), dA_src, lda, c_loc(hB_dst), ldb, queue, & + "magma_pgetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_psetvector( & + n, hx_src, incx, dy_dst, incy, queue ) + use iso_c_binding + integer(c_int), value :: n, incx, incy + type(c_ptr), target :: hx_src(*) + type(c_ptr), value :: dy_dst + type(c_ptr), value :: queue + + call magma_setvector_internal( & + n, int(sizeof_ptr), c_loc(hx_src), incx, dy_dst, incy, queue, & + "magma_psetvector" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_pgetvector( & + n, dx_src, incx, hy_dst, incy, queue ) + use iso_c_binding + integer(c_int), value :: n, incx, incy + type(c_ptr), value :: dx_src + type(c_ptr), target :: hy_dst(*) + type(c_ptr), value :: queue + + call magma_getvector_internal( & + n, int(sizeof_ptr), dx_src, incx, c_loc(hy_dst), incy, queue, & + "magma_pgetvector" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + +end module diff --git a/src/modules/mod_magma2_dfortran.F b/src/modules/mod_magma2_dfortran.F new file mode 100644 index 0000000000..e85b83b368 --- /dev/null +++ b/src/modules/mod_magma2_dfortran.F @@ -0,0 +1,230 @@ +!! @generated from magma2_zfortran.F90, fortran z -> d, Sat Apr 22 18:54:26 2023 + +module magma2_dfortran + +use magma2_common +implicit none + +!! ============================================================================= +!! Fortran interfaces to C functions +interface + + !! ------------------------------------------------------------------------- + !! CPU interfaces (matrix in CPU memory) + subroutine magma_dgetrf( m, n, A, lda, ipiv, info ) & + bind(C, name="magma_dgetrf") + use iso_c_binding + integer(c_int), value :: m, n, lda + real(c_double), target :: A(lda,*) + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_dpotrf( uplo, n, A, lda, info ) & + bind(C, name="magma_dpotrf") + use iso_c_binding + integer(c_int), value :: uplo + integer(c_int), value :: n, lda + real(c_double), target :: A(lda,*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_dgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_dgeev") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + real(c_double), target :: A(lda,*) + real(c_double), target :: w(*) + real(c_double), target :: VR(ldvr,*), VL(ldvl,*) + real(c_double), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_dgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_dgeev_m") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + real(c_double), target :: A(lda,*) + real(c_double), target :: w(*) + real(c_double), target :: VR(ldvr,*), VL(ldvl,*) + real(c_double), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_dsyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_dsyevd_m") + use iso_c_binding + integer(c_int), value :: ngpu + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, lda, lwork, lrwork, liwork + real(c_double), target :: A(lda,*) + real(c_double), target :: w(*) + real(c_double), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! ------------------------------------------------------------------------- + !! GPU interfaces (matrix in GPU memory) + subroutine magma_dgetrf_gpu( m, n, dA, lda, ipiv, info ) & + bind(C, name="magma_dgetrf_gpu") + use iso_c_binding + integer(c_int), value :: m, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_dpotrf_gpu( uplo, n, dA, lda, info ) & + bind(C, name="magma_dpotrf_gpu") + use iso_c_binding + integer(c_int), value :: uplo, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_dsyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_dsyevd_gpu") + use iso_c_binding + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork + type(c_ptr), value :: dA !! double real** + real(c_double), target :: w(*) + real(c_double), target :: wA(*) + real(c_double), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! batched GPU interfaces (all arrays in GPU memory) + subroutine magma_dgetrf_batched( & + m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & + bind(C, name="magma_dgetrf_batched") + use iso_c_binding + integer(c_int), value :: m, n, lda, batchcount + type(c_ptr), value :: dA_array !! double_real** + type(c_ptr), value :: ipiv_array !! int** + type(c_ptr), value :: info_array !! int* + type(c_ptr), value :: queue + end subroutine + + !! ------------------------------------------------------------------------- + !! BLAS (matrices in GPU memory) + subroutine magma_daxpy( & + n, & + alpha, dx, incx, & + dy, incy, & + queue ) & + bind(C, name="magma_daxpy") + use iso_c_binding + integer(c_int), value :: n, incx, incy + real(c_double), value :: alpha + type(c_ptr), value :: dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_dgemv( & + transA, m, n, & + alpha, dA, lda, & + dx, incx, & + beta, dy, incy, & + queue ) & + bind(C, name="magma_dgemv") + use iso_c_binding + integer(c_int), value :: transA, m, n, lda, incx, incy + real(c_double), value :: alpha, beta + type(c_ptr), value :: dA, dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_dgemm( & + transA, transB, m, n, k, & + alpha, dA, lda, & + dB, ldb, & + beta, dC, ldc, & + queue ) & + bind(C, name="magma_dgemm") + use iso_c_binding + integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc + real(c_double), value :: alpha, beta + type(c_ptr), value :: dA, dB, dC + type(c_ptr), value :: queue !! queue_t + end subroutine + +end interface + +!! ============================================================================= +!! Fortran routines & functions +contains + + !! ------------------------------------------------------------------------- + !! malloc wrappers + integer(c_int) function magma_dmalloc( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_dmalloc = magma_malloc( ptr, n*sizeof_double ) + end function + + integer(c_int) function magma_dmalloc_cpu( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_dmalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_double ) + end function + + integer(c_int) function magma_dmalloc_pinned( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_dmalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_double ) + end function + + !! ------------------------------------------------------------------------- + !! set/get wrappers + subroutine magma_dsetmatrix( & + m, n, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + real(c_double), target :: hA_src(lda,*) + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, int(sizeof_double), c_loc(hA_src), lda, dB_dst, ldb, queue, & + "magma_dsetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_dgetmatrix( & + m, n, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), value :: dA_src + real(c_double), target :: hB_dst(ldb,*) + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, int(sizeof_double), dA_src, lda, c_loc(hB_dst), ldb, queue, & + "magma_dgetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + +end module diff --git a/src/modules/mod_magma2_sfortran.F b/src/modules/mod_magma2_sfortran.F new file mode 100644 index 0000000000..0d11469b02 --- /dev/null +++ b/src/modules/mod_magma2_sfortran.F @@ -0,0 +1,230 @@ +!! @generated from magma2_zfortran.F90, fortran z -> s, Sat Apr 22 18:54:26 2023 + +module magma2_sfortran + +use magma2_common +implicit none + +!! ============================================================================= +!! Fortran interfaces to C functions +interface + + !! ------------------------------------------------------------------------- + !! CPU interfaces (matrix in CPU memory) + subroutine magma_sgetrf( m, n, A, lda, ipiv, info ) & + bind(C, name="magma_sgetrf") + use iso_c_binding + integer(c_int), value :: m, n, lda + real(c_float), target :: A(lda,*) + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_spotrf( uplo, n, A, lda, info ) & + bind(C, name="magma_spotrf") + use iso_c_binding + integer(c_int), value :: uplo + integer(c_int), value :: n, lda + real(c_float), target :: A(lda,*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_sgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_sgeev") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + real(c_float), target :: A(lda,*) + real(c_float), target :: w(*) + real(c_float), target :: VR(ldvr,*), VL(ldvl,*) + real(c_float), target :: work(*) + real(c_float), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_sgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_sgeev_m") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + real(c_float), target :: A(lda,*) + real(c_float), target :: w(*) + real(c_float), target :: VR(ldvr,*), VL(ldvl,*) + real(c_float), target :: work(*) + real(c_float), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_ssyevd_m") + use iso_c_binding + integer(c_int), value :: ngpu + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, lda, lwork, lrwork, liwork + real(c_float), target :: A(lda,*) + real(c_double), target :: w(*) + real(c_float), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! ------------------------------------------------------------------------- + !! GPU interfaces (matrix in GPU memory) + subroutine magma_sgetrf_gpu( m, n, dA, lda, ipiv, info ) & + bind(C, name="magma_sgetrf_gpu") + use iso_c_binding + integer(c_int), value :: m, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_spotrf_gpu( uplo, n, dA, lda, info ) & + bind(C, name="magma_spotrf_gpu") + use iso_c_binding + integer(c_int), value :: uplo, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_ssyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_ssyevd_gpu") + use iso_c_binding + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork + type(c_ptr), value :: dA !! double real** + real(c_double), target :: w(*) + real(c_float), target :: wA(*) + real(c_float), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! batched GPU interfaces (all arrays in GPU memory) + subroutine magma_sgetrf_batched( & + m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & + bind(C, name="magma_sgetrf_batched") + use iso_c_binding + integer(c_int), value :: m, n, lda, batchcount + type(c_ptr), value :: dA_array !! double_real** + type(c_ptr), value :: ipiv_array !! int** + type(c_ptr), value :: info_array !! int* + type(c_ptr), value :: queue + end subroutine + + !! ------------------------------------------------------------------------- + !! BLAS (matrices in GPU memory) + subroutine magma_saxpy( & + n, & + alpha, dx, incx, & + dy, incy, & + queue ) & + bind(C, name="magma_saxpy") + use iso_c_binding + integer(c_int), value :: n, incx, incy + real(c_float), value :: alpha + type(c_ptr), value :: dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_sgemv( & + transA, m, n, & + alpha, dA, lda, & + dx, incx, & + beta, dy, incy, & + queue ) & + bind(C, name="magma_sgemv") + use iso_c_binding + integer(c_int), value :: transA, m, n, lda, incx, incy + real(c_float), value :: alpha, beta + type(c_ptr), value :: dA, dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_sgemm( & + transA, transB, m, n, k, & + alpha, dA, lda, & + dB, ldb, & + beta, dC, ldc, & + queue ) & + bind(C, name="magma_sgemm") + use iso_c_binding + integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc + real(c_float), value :: alpha, beta + type(c_ptr), value :: dA, dB, dC + type(c_ptr), value :: queue !! queue_t + end subroutine + +end interface + +!! ============================================================================= +!! Fortran routines & functions +contains + + !! ------------------------------------------------------------------------- + !! malloc wrappers + integer(c_int) function magma_smalloc( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_smalloc = magma_malloc( ptr, n*sizeof_real ) + end function + + integer(c_int) function magma_smalloc_cpu( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_smalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_real ) + end function + + integer(c_int) function magma_smalloc_pinned( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_smalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_real ) + end function + + !! ------------------------------------------------------------------------- + !! set/get wrappers + subroutine magma_ssetmatrix( & + m, n, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + real(c_float), target :: hA_src(lda,*) + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, int(sizeof_real), c_loc(hA_src), lda, dB_dst, ldb, queue, & + "magma_ssetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_sgetmatrix( & + m, n, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), value :: dA_src + real(c_float), target :: hB_dst(ldb,*) + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, int(sizeof_real), dA_src, lda, c_loc(hB_dst), ldb, queue, & + "magma_sgetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + +end module diff --git a/src/modules/mod_magma2_zfortran.F b/src/modules/mod_magma2_zfortran.F new file mode 100644 index 0000000000..8066052bee --- /dev/null +++ b/src/modules/mod_magma2_zfortran.F @@ -0,0 +1,230 @@ +!! @precisions fortran z -> s d c + +module magma2_zfortran + +use magma2_common +implicit none + +!! ============================================================================= +!! Fortran interfaces to C functions +interface + + !! ------------------------------------------------------------------------- + !! CPU interfaces (matrix in CPU memory) + subroutine magma_zgetrf( m, n, A, lda, ipiv, info ) & + bind(C, name="magma_zgetrf") + use iso_c_binding + integer(c_int), value :: m, n, lda + complex(c_double_complex), target :: A(lda,*) + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_zpotrf( uplo, n, A, lda, info ) & + bind(C, name="magma_zpotrf") + use iso_c_binding + integer(c_int), value :: uplo + integer(c_int), value :: n, lda + complex(c_double_complex), target :: A(lda,*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_zgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_zgeev") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + complex(c_double_complex), target :: A(lda,*) + complex(c_double_complex), target :: w(*) + complex(c_double_complex), target :: VR(ldvr,*), VL(ldvl,*) + complex(c_double_complex), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_zgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + work, lwork, rwork, info) & + bind(C, name="magma_zgeev_m") + use iso_c_binding + integer(c_int), value :: jobvl, jobvr + integer(c_int), value :: n, lda, ldvl, ldvr, lwork + complex(c_double_complex), target :: A(lda,*) + complex(c_double_complex), target :: w(*) + complex(c_double_complex), target :: VR(ldvr,*), VL(ldvl,*) + complex(c_double_complex), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_zheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_zheevd_m") + use iso_c_binding + integer(c_int), value :: ngpu + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, lda, lwork, lrwork, liwork + complex(c_double_complex), target :: A(lda,*) + real(c_double), target :: w(*) + complex(c_double_complex), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! ------------------------------------------------------------------------- + !! GPU interfaces (matrix in GPU memory) + subroutine magma_zgetrf_gpu( m, n, dA, lda, ipiv, info ) & + bind(C, name="magma_zgetrf_gpu") + use iso_c_binding + integer(c_int), value :: m, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: ipiv(*) + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_zpotrf_gpu( uplo, n, dA, lda, info ) & + bind(C, name="magma_zpotrf_gpu") + use iso_c_binding + integer(c_int), value :: uplo, n, lda + type(c_ptr), value :: dA + integer(c_int), target :: info !! int* + end subroutine + + subroutine magma_zheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + rwork, lrwork, iwork, liwork, info) & + bind(C, name="magma_zheevd_gpu") + use iso_c_binding + integer(c_int), value :: jobz, uplo + integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork + type(c_ptr), value :: dA !! double complex** + real(c_double), target :: w(*) + complex(c_double_complex), target :: wA(*) + complex(c_double_complex), target :: work(*) + real(c_double), target :: rwork(*) + integer(c_int), target :: iwork(*) + integer(c_int), target :: info !! int* + end subroutine + + !! ------------------------------------------------------------------------- + !! batched GPU interfaces (all arrays in GPU memory) + subroutine magma_zgetrf_batched( & + m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & + bind(C, name="magma_zgetrf_batched") + use iso_c_binding + integer(c_int), value :: m, n, lda, batchcount + type(c_ptr), value :: dA_array !! double_complex** + type(c_ptr), value :: ipiv_array !! int** + type(c_ptr), value :: info_array !! int* + type(c_ptr), value :: queue + end subroutine + + !! ------------------------------------------------------------------------- + !! BLAS (matrices in GPU memory) + subroutine magma_zaxpy( & + n, & + alpha, dx, incx, & + dy, incy, & + queue ) & + bind(C, name="magma_zaxpy") + use iso_c_binding + integer(c_int), value :: n, incx, incy + complex(c_double_complex), value :: alpha + type(c_ptr), value :: dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_zgemv( & + transA, m, n, & + alpha, dA, lda, & + dx, incx, & + beta, dy, incy, & + queue ) & + bind(C, name="magma_zgemv") + use iso_c_binding + integer(c_int), value :: transA, m, n, lda, incx, incy + complex(c_double_complex), value :: alpha, beta + type(c_ptr), value :: dA, dx, dy + type(c_ptr), value :: queue !! queue_t + end subroutine + + subroutine magma_zgemm( & + transA, transB, m, n, k, & + alpha, dA, lda, & + dB, ldb, & + beta, dC, ldc, & + queue ) & + bind(C, name="magma_zgemm") + use iso_c_binding + integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc + complex(c_double_complex), value :: alpha, beta + type(c_ptr), value :: dA, dB, dC + type(c_ptr), value :: queue !! queue_t + end subroutine + +end interface + +!! ============================================================================= +!! Fortran routines & functions +contains + + !! ------------------------------------------------------------------------- + !! malloc wrappers + integer(c_int) function magma_zmalloc( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_zmalloc = magma_malloc( ptr, n*sizeof_complex16 ) + end function + + integer(c_int) function magma_zmalloc_cpu( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_zmalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_complex16 ) + end function + + integer(c_int) function magma_zmalloc_pinned( ptr, n ) + use iso_c_binding + type(c_ptr), target :: ptr !! void** + integer(c_size_t), value :: n + + magma_zmalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_complex16 ) + end function + + !! ------------------------------------------------------------------------- + !! set/get wrappers + subroutine magma_zsetmatrix( & + m, n, hA_src, lda, dB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + complex(c_double_complex), target :: hA_src(lda,*) + type(c_ptr), value :: dB_dst + type(c_ptr), value :: queue + + call magma_setmatrix_internal( & + m, n, int(sizeof_complex16), c_loc(hA_src), lda, dB_dst, ldb, queue, & + "magma_zsetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + + subroutine magma_zgetmatrix( & + m, n, dA_src, lda, hB_dst, ldb, queue ) + use iso_c_binding + integer(c_int), value :: m, n, lda, ldb + type(c_ptr), value :: dA_src + complex(c_double_complex), target :: hB_dst(ldb,*) + type(c_ptr), value :: queue + + call magma_getmatrix_internal( & + m, n, int(sizeof_complex16), dA_src, lda, c_loc(hB_dst), ldb, queue, & + "magma_zgetmatrix" // c_null_char, & + __FILE__ // c_null_char, & + __LINE__ ) + end subroutine + +end module From 6191ff3ef182872809bb3c01470dd8c85d09963d Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 24 Apr 2023 15:59:09 +0200 Subject: [PATCH 0626/1367] compilation without magma fixed --- src/modules/.objects | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/.objects b/src/modules/.objects index 2e8aaf57ad..c023690e3d 100644 --- a/src/modules/.objects +++ b/src/modules/.objects @@ -19,6 +19,7 @@ NL_objects = mod_fields.o mod_electric.o mod_nl_optics.o mod_NL_interfaces #if defined _MAGMA MAGMA_objects = mod_magma2_common.o mod_magma2_sfortran.o mod_magma2_dfortran.o \ mod_magma2_cfortran.o mod_magma2_zfortran.o mod_magma2.o +#endif #if defined _io_lib objs = mod_pars.o mod_stderr.o mod_parallel.o mod_parallel_interface.o \ mod_com_interfcs.o mod_descriptors.o mod_com.o mod_IO.o mod_IO_interfaces.o From 31b3b055919a776cb31d723929c2a4da33940ec3 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Mon, 24 Apr 2023 19:19:45 +0200 Subject: [PATCH 0627/1367] thread safeness added to magma interfaces --- src/modules/mod_linear_algebra.F | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index 2ab1a523e8..93d9eb3878 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -28,6 +28,9 @@ module linear_algebra #ifdef _MAGMA use magma2, ONLY: magma_init,magma_queue_create, & & magma_cgeev_m,magma_zgeev_m,MagmaVec +#endif +#ifdef _OPENMP + use omp_lib #endif ! #include @@ -226,19 +229,31 @@ subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) complex(SP),intent(out) :: E_cmpl(*),V_left(msize,*),V_right(msize,*),work(*) complex(SP),intent(inout) :: M(msize,*) ! + integer :: nthreads ! -#if defined _MAGMA ! ! use magma (if available) ! +#if defined _MAGMA + ! if (.not.magma_init_done) call magma_setup() ! +# if defined _OPENMP + ! thread safety + nthreads=omp_get_max_threads() + call omp_set_num_threads(1) +# endif + ! # if defined _DOUBLE call magma_zgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& & work,lwork,rwk,ifail) # else call magma_cgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& & work,lwork,rwk,ifail) +# endif + ! +# if defined _OPENMP + call omp_set_num_threads(nthreads) # endif ! #else From dde56621afa4024f191ef63c1947c14bdd0279c4 Mon Sep 17 00:00:00 2001 From: palful Date: Wed, 26 Apr 2023 14:25:44 +0200 Subject: [PATCH 0628/1367] Removed commented code --- src/exc-ph/EXCPH_lifetime.F | 1 - 1 file changed, 1 deletion(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index d76d3df85f..1407171ea6 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -234,7 +234,6 @@ subroutine EXCPH_lifetime(k,q,X) enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) - !if (l_extend_output) EXC_life_of_q=EXC_life_of_q*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! From 926c1ee5b88bbc3102316215d5a9d265671240c5 Mon Sep 17 00:00:00 2001 From: palful Date: Wed, 26 Apr 2023 15:13:24 +0200 Subject: [PATCH 0629/1367] Off-diagonal Exc-Ph self-energy: added logicals --- src/exc-ph/EXCPH_lifetime.F | 4 +++- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + src/modules/mod_EXCPH.F | 1 + src/modules/mod_drivers.F | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 1407171ea6..736ef832e0 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -36,7 +36,8 @@ subroutine EXCPH_lifetime(k,q,X) use IO_m, ONLY:manage_action,OP_RD,REP,RD_CL_IF_END,DUMP use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & & EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements, & -& RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free,alphaQ +& RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free,alphaQ, & +& l_EXCPH_offdiago use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use vec_operate, ONLY:degeneration_finder,iku_v_norm,iku_v_2D_norm use frequency, ONLY:w_samp @@ -66,6 +67,7 @@ subroutine EXCPH_lifetime(k,q,X) call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) call parser('ExtendOutput', l_extend_output) + call parser('ExcPhOffDiago', l_EXCPH_offdiago) ! call section('*','EXCPH-LifeTime') ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index d9a0306bfa..2d3f875546 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -464,7 +464,7 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ NoMatrxEl') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ ExcPhOffDiago NoMatrxEl') if (l_EXCPH_optics) then call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'EXCPHdEtresh DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 7a1ad8ce3f..0f836591bc 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -685,6 +685,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point') call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) call it(defs,'EXCPHdEtresh','[ELPH] Energy treshold for exc-ph denominator',EXCPH_deltaE_treshold,unit=E_unit) + call it('f',defs,'ExcPhOffDiago', '[EXCPH] Exciton-Phonon off-diagonal self-energy') ! ! GPL_EXCLUDE_START ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index fd47b44cc8..24e03466e5 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -113,6 +113,7 @@ module EXCPH logical :: l_DbGd_WEIGHTs ! Double-Grid for Satellite weights logical :: l_DbGd_PH_only ! Double-Grid only for phonon energies logical :: l_no_matrix_elements ! Set EXC-PH matrix elements to 1 (in lifetime and satellites) + logical :: l_EXCPH_offdiago ! Turn on off-diagonal part of the EXC-PH self-energy ! ! Excitonic occupations ! diff --git a/src/modules/mod_drivers.F b/src/modules/mod_drivers.F index b533d8a946..f0e51db6b6 100644 --- a/src/modules/mod_drivers.F +++ b/src/modules/mod_drivers.F @@ -73,6 +73,7 @@ module drivers logical :: l_EXCPH_gkkp =.FALSE. logical :: l_EXCPH_optics =.FALSE. logical :: l_EXCPH_lifetime =.FALSE. + logical :: l_EXCPH_offdiago =.FALSE. ! ! Real Axis non SC Self-energies ! From 277caec1fdf075ffebe1ec923e5990154defa995 Mon Sep 17 00:00:00 2001 From: palful Date: Wed, 26 Apr 2023 17:38:51 +0200 Subject: [PATCH 0630/1367] Added calculation of interband elements (off-diagonal SE) --- src/exc-ph/EXCPH_lifetime.F | 48 +++++++++++++++++++++++++++++++++---- src/modules/mod_EXCPH.F | 8 ++++--- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 736ef832e0..4f611d365f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -37,7 +37,7 @@ subroutine EXCPH_lifetime(k,q,X) use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & & EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements, & & RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free,alphaQ, & -& l_EXCPH_offdiago +& l_EXCPH_offdiago,EXCPH_Gkkp,EXC_LineWidth use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use vec_operate, ONLY:degeneration_finder,iku_v_norm,iku_v_2D_norm use frequency, ONLY:w_samp @@ -60,7 +60,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg,l_extend_output - real(SP) :: ExcPhM,EXC_life_average,EXC_energy_average,Pole + real(SP) :: ExcPhM,ExcPhW,EXC_life_average,EXC_line_average,EXC_energy_average,Pole real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! @@ -147,6 +147,9 @@ subroutine EXCPH_lifetime(k,q,X) call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') call msg('rs','Self-energy broadening : ',L_damping*HA2EV*1000._SP,'meV') + if (l_EXCPH_offdiago) then + call msg('rs','Interband transitions (off-diagonal self-energy) included.') + endif ! ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) @@ -155,6 +158,10 @@ subroutine EXCPH_lifetime(k,q,X) ! YAMBO_ALLOC(EXC_LifeTime,(EXCPH_states(1):EXCPH_states(2))) EXC_LifeTime=rZERO + if (l_EXCPH_offdiago) then + YAMBO_ALLOC(EXC_LineWidth,(EXCPH_states(1):EXCPH_states(2))) + EXC_LineWidth=rZERO + endif ! call PP_indexes_reset(px) call PARALLEL_index(px,(/q%nbz/)) @@ -187,13 +194,29 @@ subroutine EXCPH_lifetime(k,q,X) ! do il=elph_branches(1),elph_branches(2) ! + ! Intraband terms only (lifetimes) ExcPhM=EXCPH_Gkkp_sq(il,i_beta,i_alpha) + ! Including interband terms (linewidths) + if (l_EXCPH_offdiago) then + ! + ExcPhW=0._SP + do j_alpha=EXCPH_states(1),EXCPH_states(2) + ! + ExcPhW=ExcPhW+EXCPH_Gkkp(il,i_beta,j_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) + ! + enddo + ! + endif + ! if(l_no_matrix_elements) ExcPhM=1._SP ! if(.not.use_PH_DbGd) Pole=Simple_pole() if(use_PH_DbGd) Pole=DbGrid_pole() ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole + if (l_EXCPH_offdiago) then + EXC_LineWidth(i_alpha)=EXC_LineWidth(i_alpha)+ExcPhW*Pole + endif if (l_extend_output) then EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole EXC_pole_of_q(i_alpha,iq_bz)=EXC_pole_of_q(i_alpha,iq_bz)+Pole @@ -216,6 +239,9 @@ subroutine EXCPH_lifetime(k,q,X) call live_timing( ) ! call PP_redux_wait(EXC_LifeTime) + if (l_EXCPH_offdiago) then + call PP_redux_wait(EXC_LineWidth) + endif if (l_extend_output) then call PP_redux_wait(EXC_life_of_q) call PP_redux_wait(EXC_pole_of_q) @@ -233,9 +259,14 @@ subroutine EXCPH_lifetime(k,q,X) i_alpha=first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 EXC_life_average=sum(EXC_LifeTime(j_alpha:i_alpha))/real(n_of_exc_grp(igrp),SP) EXC_LifeTime(j_alpha:i_alpha)=EXC_life_average + if (l_EXCPH_offdiago) then + EXC_line_average=sum(EXC_LineWidth(j_alpha:i_alpha))/real(n_of_exc_grp(igrp),SP) + EXC_LineWidth(j_alpha:i_alpha)=EXC_line_average + endif enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) + if (l_EXCPH_offdiago) EXC_LineWidth=EXC_LineWidth*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! @@ -249,6 +280,9 @@ subroutine EXCPH_lifetime(k,q,X) ! Deallocations ! YAMBO_FREE(EXC_LifeTime) + if (l_EXCPH_offdiago) then + YAMBO_FREE(EXC_LineWidth) + endif call RESIDUALS_and_EIGENVALUES_free() if (l_extend_output) then deallocate(EXC_life_of_q) @@ -390,14 +424,18 @@ subroutine print_and_write() call msg('o '//what,'# Exciton Sum : '//trim(intc(EXCPH_sum(1)))//' - '//trim(intc(EXCPH_sum(2)))) call msg('o '//what,'# Exciton States : '//trim(intc(EXCPH_states(1)))//' - '//trim(intc(EXCPH_states(2)))) call msg('o '//what,'# Self-Energy broadening :'//trim(real2ch(L_damping*HA2EV*1000._SP))//' meV') - call msg('o '//what,'# FAN treshold :'//trim(real2ch(FAN_deltaE_treshold*HA2EV*1000._SP))//' meV') - call msg('o '//what,'# PH Doble-Grid : '//log2ch(use_PH_DbGd)) + call msg('o '//what,'# FAN threshold :'//trim(real2ch(FAN_deltaE_treshold*HA2EV*1000._SP))//' meV') + call msg('o '//what,'# PH Double-Grid : '//log2ch(use_PH_DbGd)) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! call OUTPUT_driver(what,TITLES=(/"Band "/),I_VALUES=(/i_alpha/)) call OUTPUT_driver(what,TITLES=(/"E"/),R_VALUES=(/real(BS_E_in(i_alpha))/),UNIT="eV") - call OUTPUT_driver(what,TITLES=(/"Width"/),R_VALUES=(/EXC_LifeTime(i_alpha)/),UNIT="meV") + call OUTPUT_driver(what,TITLES=(/"Life^-1"/),R_VALUES=(/EXC_LifeTime(i_alpha)/),UNIT="meV") + if (l_EXCPH_offdiago) then + call OUTPUT_driver(what,TITLES=(/"Width"/),R_VALUES=(/EXC_LineWidth(i_alpha)/),UNIT="meV") + endif + call OUTPUT_driver(what,action="write") ! call msg('rs','Exciton ['//trim(intc(i_alpha))//'] Lifetime: ',EXC_LifeTime(i_alpha)*HA2EV*1000._SP,'meV') diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 24e03466e5..232e5e7a57 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -40,8 +40,9 @@ module EXCPH complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: n_exc_in - integer :: EXCPH_states(2) - integer :: EXCPH_sum(2) + integer :: EXCPH_states(2) ! External states + integer :: EXCPH_sum(2) ! Internal states ("virtual") + integer :: EXCPH_interband(2) ! Interband states real(SP), allocatable :: EXCPH_q(:,:) character(schlen) :: EXCPH_kind_name integer :: EXCPH_kind @@ -100,9 +101,10 @@ module EXCPH real(SP), allocatable :: EXC_E_DbGd(:,:) type(bz_samp) :: q_DbGd ! - ! Life Times + ! Life Times and Line Widths ! real(SP), allocatable :: EXC_Lifetime(:) + real(SP), allocatable :: EXC_LineWidth(:) ! ! DB Q-mapping in case symmetries are removed ! From 80b6c8aa75dda636aea24c5b9f642184fbec1104 Mon Sep 17 00:00:00 2001 From: palful Date: Wed, 26 Apr 2023 17:48:55 +0200 Subject: [PATCH 0631/1367] Added off-diagonal self-energy for linewidths --- src/exc-ph/EXCPH_lifetime.F | 48 +++++++++++++++++++++++++++++++++---- src/modules/mod_EXCPH.F | 8 ++++--- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 736ef832e0..4f611d365f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -37,7 +37,7 @@ subroutine EXCPH_lifetime(k,q,X) use EXCPH, ONLY:EXCPH_sum,EXCPH_states,BS_E,BS_all_E,BS_E_in,L_damping,n_exc_in, & & EXC_LifeTime,min_EXC_E,EXCPH_Gkkp_sq,DB_Q_map,l_no_matrix_elements, & & RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free,alphaQ, & -& l_EXCPH_offdiago +& l_EXCPH_offdiago,EXCPH_Gkkp,EXC_LineWidth use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map use vec_operate, ONLY:degeneration_finder,iku_v_norm,iku_v_2D_norm use frequency, ONLY:w_samp @@ -60,7 +60,7 @@ subroutine EXCPH_lifetime(k,q,X) integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg,l_extend_output - real(SP) :: ExcPhM,EXC_life_average,EXC_energy_average,Pole + real(SP) :: ExcPhM,ExcPhW,EXC_life_average,EXC_line_average,EXC_energy_average,Pole real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! @@ -147,6 +147,9 @@ subroutine EXCPH_lifetime(k,q,X) call msg('rs','Minimum excitonic energy : ',min_EXC_E*HA2EV,' eV, at q-point :'//intc(min_pos(1))) call msg('rs','FAN treshold: ',FAN_deltaE_treshold*HA2CMm1,' cm-1') call msg('rs','Self-energy broadening : ',L_damping*HA2EV*1000._SP,'meV') + if (l_EXCPH_offdiago) then + call msg('rs','Interband transitions (off-diagonal self-energy) included.') + endif ! ! Turn on double-grid if presents call EXCPH_double_grid_setup(q) @@ -155,6 +158,10 @@ subroutine EXCPH_lifetime(k,q,X) ! YAMBO_ALLOC(EXC_LifeTime,(EXCPH_states(1):EXCPH_states(2))) EXC_LifeTime=rZERO + if (l_EXCPH_offdiago) then + YAMBO_ALLOC(EXC_LineWidth,(EXCPH_states(1):EXCPH_states(2))) + EXC_LineWidth=rZERO + endif ! call PP_indexes_reset(px) call PARALLEL_index(px,(/q%nbz/)) @@ -187,13 +194,29 @@ subroutine EXCPH_lifetime(k,q,X) ! do il=elph_branches(1),elph_branches(2) ! + ! Intraband terms only (lifetimes) ExcPhM=EXCPH_Gkkp_sq(il,i_beta,i_alpha) + ! Including interband terms (linewidths) + if (l_EXCPH_offdiago) then + ! + ExcPhW=0._SP + do j_alpha=EXCPH_states(1),EXCPH_states(2) + ! + ExcPhW=ExcPhW+EXCPH_Gkkp(il,i_beta,j_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) + ! + enddo + ! + endif + ! if(l_no_matrix_elements) ExcPhM=1._SP ! if(.not.use_PH_DbGd) Pole=Simple_pole() if(use_PH_DbGd) Pole=DbGrid_pole() ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole + if (l_EXCPH_offdiago) then + EXC_LineWidth(i_alpha)=EXC_LineWidth(i_alpha)+ExcPhW*Pole + endif if (l_extend_output) then EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole EXC_pole_of_q(i_alpha,iq_bz)=EXC_pole_of_q(i_alpha,iq_bz)+Pole @@ -216,6 +239,9 @@ subroutine EXCPH_lifetime(k,q,X) call live_timing( ) ! call PP_redux_wait(EXC_LifeTime) + if (l_EXCPH_offdiago) then + call PP_redux_wait(EXC_LineWidth) + endif if (l_extend_output) then call PP_redux_wait(EXC_life_of_q) call PP_redux_wait(EXC_pole_of_q) @@ -233,9 +259,14 @@ subroutine EXCPH_lifetime(k,q,X) i_alpha=first_exc_grp(igrp)+n_of_exc_grp(igrp)+EXCPH_states(1)-2 EXC_life_average=sum(EXC_LifeTime(j_alpha:i_alpha))/real(n_of_exc_grp(igrp),SP) EXC_LifeTime(j_alpha:i_alpha)=EXC_life_average + if (l_EXCPH_offdiago) then + EXC_line_average=sum(EXC_LineWidth(j_alpha:i_alpha))/real(n_of_exc_grp(igrp),SP) + EXC_LineWidth(j_alpha:i_alpha)=EXC_line_average + endif enddo ! EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) + if (l_EXCPH_offdiago) EXC_LineWidth=EXC_LineWidth*2._SP*pi/real(q%nbz,SP) ! ! Print output and write on file ! @@ -249,6 +280,9 @@ subroutine EXCPH_lifetime(k,q,X) ! Deallocations ! YAMBO_FREE(EXC_LifeTime) + if (l_EXCPH_offdiago) then + YAMBO_FREE(EXC_LineWidth) + endif call RESIDUALS_and_EIGENVALUES_free() if (l_extend_output) then deallocate(EXC_life_of_q) @@ -390,14 +424,18 @@ subroutine print_and_write() call msg('o '//what,'# Exciton Sum : '//trim(intc(EXCPH_sum(1)))//' - '//trim(intc(EXCPH_sum(2)))) call msg('o '//what,'# Exciton States : '//trim(intc(EXCPH_states(1)))//' - '//trim(intc(EXCPH_states(2)))) call msg('o '//what,'# Self-Energy broadening :'//trim(real2ch(L_damping*HA2EV*1000._SP))//' meV') - call msg('o '//what,'# FAN treshold :'//trim(real2ch(FAN_deltaE_treshold*HA2EV*1000._SP))//' meV') - call msg('o '//what,'# PH Doble-Grid : '//log2ch(use_PH_DbGd)) + call msg('o '//what,'# FAN threshold :'//trim(real2ch(FAN_deltaE_treshold*HA2EV*1000._SP))//' meV') + call msg('o '//what,'# PH Double-Grid : '//log2ch(use_PH_DbGd)) ! do i_alpha=EXCPH_states(1),EXCPH_states(2) ! call OUTPUT_driver(what,TITLES=(/"Band "/),I_VALUES=(/i_alpha/)) call OUTPUT_driver(what,TITLES=(/"E"/),R_VALUES=(/real(BS_E_in(i_alpha))/),UNIT="eV") - call OUTPUT_driver(what,TITLES=(/"Width"/),R_VALUES=(/EXC_LifeTime(i_alpha)/),UNIT="meV") + call OUTPUT_driver(what,TITLES=(/"Life^-1"/),R_VALUES=(/EXC_LifeTime(i_alpha)/),UNIT="meV") + if (l_EXCPH_offdiago) then + call OUTPUT_driver(what,TITLES=(/"Width"/),R_VALUES=(/EXC_LineWidth(i_alpha)/),UNIT="meV") + endif + call OUTPUT_driver(what,action="write") ! call msg('rs','Exciton ['//trim(intc(i_alpha))//'] Lifetime: ',EXC_LifeTime(i_alpha)*HA2EV*1000._SP,'meV') diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 24e03466e5..232e5e7a57 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -40,8 +40,9 @@ module EXCPH complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: n_exc_in - integer :: EXCPH_states(2) - integer :: EXCPH_sum(2) + integer :: EXCPH_states(2) ! External states + integer :: EXCPH_sum(2) ! Internal states ("virtual") + integer :: EXCPH_interband(2) ! Interband states real(SP), allocatable :: EXCPH_q(:,:) character(schlen) :: EXCPH_kind_name integer :: EXCPH_kind @@ -100,9 +101,10 @@ module EXCPH real(SP), allocatable :: EXC_E_DbGd(:,:) type(bz_samp) :: q_DbGd ! - ! Life Times + ! Life Times and Line Widths ! real(SP), allocatable :: EXC_Lifetime(:) + real(SP), allocatable :: EXC_LineWidth(:) ! ! DB Q-mapping in case symmetries are removed ! From f933bf6f272fc3948fa7dc653e2a96768df367b6 Mon Sep 17 00:00:00 2001 From: palful Date: Thu, 27 Apr 2023 18:49:03 +0200 Subject: [PATCH 0632/1367] small change to interband part --- src/exc-ph/EXCPH_lifetime.F | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 4f611d365f..0982a45db4 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -60,7 +60,8 @@ subroutine EXCPH_lifetime(k,q,X) integer :: elph_branches_save(2) integer :: min_pos(1),first_exc_grp(n_exc_in),n_of_exc_grp(n_exc_in),n_deg_grp logical :: l_keep_deg,l_extend_output - real(SP) :: ExcPhM,ExcPhW,EXC_life_average,EXC_line_average,EXC_energy_average,Pole + real(SP) :: ExcPhM,EXC_life_average,EXC_line_average,EXC_energy_average,Pole + complex(SP) :: ExcPhW real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! @@ -215,7 +216,7 @@ subroutine EXCPH_lifetime(k,q,X) ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole if (l_EXCPH_offdiago) then - EXC_LineWidth(i_alpha)=EXC_LineWidth(i_alpha)+ExcPhW*Pole + EXC_LineWidth(i_alpha)=EXC_LineWidth(i_alpha)+REAL(ExcPhW)*Pole endif if (l_extend_output) then EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole From cd7451a2cda9e4be355e4d018edbd8a48c27dade Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 9 May 2023 16:59:31 +0200 Subject: [PATCH 0633/1367] Version 5.1.0, Revision 22288, Hash 3280de62d MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Changes: - [yambo_nl/yambo_rt] It is now possible to load collisions from BSE in the cv channel and add other collisions in the cc / vv channel in the same file Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +-- src/collisions/COLLISIONS_HXC.F | 66 +++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9321ae4ee0..cae5de9773 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22166 h.ab8307bf7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22288 h.3280de62d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22166" -SHASH="ab8307bf7" +SREVISION="22288" +SHASH="3280de62d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index dd1e4fc794..8f567fd7cf 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -78,6 +78,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) ! complex(SP), allocatable :: EM1s(:,:),rhotw_tmp(:) integer :: io_err,ID_X,ID_HXC,ID_COH,TMP_VEC(ncpu) + logical :: doing_cv_colls,cc_vv_prime_only integer, external :: io_X ! call timing(trim(H_potential)//' Collisions',OPR='start') @@ -101,7 +102,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) call k_build_up_BZ_tables(q) call k_expand(k) ! - if (l_compute_screening.and.IO_BS_err/=0) then + if (l_compute_screening.and.(IO_BS_err/=0.or.(.not.COLLISIONS_CV_only))) then ! ! Plasmon-Pole/Static interaction DB I/O ! @@ -158,7 +159,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) bands_to_load(2)=max(COLL_bands(2),maxval(E%nbm)) endif ! - if (IO_BS_err/=0) then + if (IO_BS_err/=0.or.(.not.COLLISIONS_CV_only)) then ! if (WF_buffered_IO) call WF_load(WF_buffer,0,1,bands_to_load,(/1,k%nibz/),space='B',title='-BUFFER') call WF_load(WF,NG_max,iGo_max,bands_to_load,(/1,k%nibz/),title='-'//trim(H_potential)//' Collisions') @@ -322,16 +323,32 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) if( l_HXC_collisions ) HXC_COLL_element(1)%v3_c=cZERO if( l_use_COH_collisions ) COH_COLL_element(1)%v3_c=cZERO ! - ! HARTREE collisions - ! if (IO_BS_err==0) then - ! HXC collisions from BSE kernel - call map_BSE_to_HXC_collisions() - else + ! + doing_cv_colls=.not.((i_n> n_met_bands(i_sp) .and. i_m>n_met_bands(i_sp) ) .or. & + & (i_n<=n_full_bands(i_sp) .and. i_m<=n_full_bands(i_sp)) ) + ! + ! HXC collisions from BSE kernel if in the cv channel + if (doing_cv_colls) call map_BSE_to_HXC_collisions() + ! + if (.not.COLLISIONS_CV_only) then + ! + ! If (in,im) is in the cv channel, I need (inp,imp) only in the cc/vv channel + ! If (in,im) is not in the cv channel, I need (inp,imp) everywhere + cc_vv_prime_only=doing_cv_colls + ! Hartree collisions + if ( COLLISIONS_HXC_local ) call compute_Hartree_collisions(cc_vv_prime_only) + ! XC collisions within MBPT + if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions(cc_vv_prime_only) + endif + ! + else + ! ! Hartree collisions - if ( COLLISIONS_HXC_local ) call compute_Hartree_collisions() + if ( COLLISIONS_HXC_local ) call compute_Hartree_collisions(.false.) ! XC collisions within MBPT - if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions() + if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions(.false.) + ! endif ! if(l_HXC_collisions) then @@ -394,8 +411,8 @@ subroutine map_BSE_to_HXC_collisions() do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) ! - if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle - if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle + if ( (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle + if ( (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle ! i_k_bz=BS_K_io_map(k%k_table(i_k,1)) i_p_bz=BS_K_io_map(k%k_table(i_p,1)) @@ -447,7 +464,7 @@ subroutine map_BSE_to_HXC_collisions() ! end subroutine map_BSE_to_HXC_collisions ! - subroutine compute_Hartree_collisions() + subroutine compute_Hartree_collisions(cc_vv_only) ! ! Scattering geometry !===================== _ \ _ @@ -459,7 +476,10 @@ subroutine compute_Hartree_collisions() ! | ! (i_n,i_k,1)------>----------.---------->----(i_m,i_k,1) ! - ! + ! + logical, intent(in) :: cc_vv_only + ! + logical :: cc_vv_colls integer :: i_q_fake, i_p_bz ! isc_H%qs = 1 @@ -484,8 +504,11 @@ subroutine compute_Hartree_collisions() do i_mp=COLL_bands(1),COLL_bands(2) do i_np=i_mp,COLL_bands(2) ! - if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle - if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle + cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & + & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) + ! + if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle + if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle ! if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle @@ -575,7 +598,7 @@ subroutine compute_Hartree_collisions() ! end subroutine compute_Hartree_collisions ! - subroutine compute_MBPT_XC_collisions() + subroutine compute_MBPT_XC_collisions(cc_vv_only) ! ! Scattering geometry !===================== @@ -590,7 +613,9 @@ subroutine compute_MBPT_XC_collisions() ! (i_n,i_k,1)-->--.---------->----------.---->----(i_m,i_k,1) ! (i_kmq,i_kmq_s) ! + logical, intent(in) :: cc_vv_only ! + logical :: cc_vv_colls integer :: TMP_INDEX(COLL_bands(1):COLL_bands(2)) ! if (l_compute_screening.and.i_coll==first_coll) then @@ -660,8 +685,11 @@ subroutine compute_MBPT_XC_collisions() ! do i_np=COLL_bands(1),COLL_bands(2) ! - if ( COLLISIONS_CV_only .and. (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle - if ( COLLISIONS_CV_only .and. (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle + cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & + & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) + ! + if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle + if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle ! ! COLLISIONS(n,n',qp_n_states) = \sum_{G,G',q} ( rho(m,n,G,q,k) x EM1s(G ,G') x rho*(m',n',G',q,k) /|q+G|/|q+G'| ) ! @@ -694,7 +722,7 @@ subroutine compute_MBPT_XC_collisions() enddo !$omp end parallel do endif - ! + ! if(index(H_potential,"SEX")>0 .or. index(H_potential,"FOCK")>0) & & HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq) & & -4._SP/spin_occ*pi*(pre_factor1+pre_factor2) From af88dc7a5b632b20bd4d710e9762656635671383 Mon Sep 17 00:00:00 2001 From: palful Date: Wed, 10 May 2023 17:24:20 +0200 Subject: [PATCH 0634/1367] redeclare off-diagonal SE as complex --- src/exc-ph/EXCPH_lifetime.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 0982a45db4..66240f7c8f 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -200,7 +200,7 @@ subroutine EXCPH_lifetime(k,q,X) ! Including interband terms (linewidths) if (l_EXCPH_offdiago) then ! - ExcPhW=0._SP + ExcPhW=cZERO do j_alpha=EXCPH_states(1),EXCPH_states(2) ! ExcPhW=ExcPhW+EXCPH_Gkkp(il,i_beta,j_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) @@ -216,7 +216,7 @@ subroutine EXCPH_lifetime(k,q,X) ! EXC_LifeTime(i_alpha)=EXC_LifeTime(i_alpha)+ExcPhM*Pole if (l_EXCPH_offdiago) then - EXC_LineWidth(i_alpha)=EXC_LineWidth(i_alpha)+REAL(ExcPhW)*Pole + EXC_LineWidth(i_alpha)=EXC_LineWidth(i_alpha)+REAL(ExcPhW,SP)*Pole endif if (l_extend_output) then EXC_life_of_q(i_alpha,iq_bz)=EXC_life_of_q(i_alpha,iq_bz)+ExcPhM*Pole From 8154b27e5c27509e3ea73a0371333396e7af10e8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 18 May 2023 12:47:59 +0200 Subject: [PATCH 0635/1367] Version 5.1.0, Revision 22574, Hash 6d84a621a MODIFIED * include/version/version.m4 NEW * exc-ph/ELPH_project.dep exc-ph/YPP_ELPH_project.dep Bugs: - [ph_project] added missing .dep files Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/exc-ph/ELPH_project.dep | 17 +++++++++++++++++ src/exc-ph/YPP_ELPH_project.dep | 2 ++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 src/exc-ph/ELPH_project.dep create mode 100644 src/exc-ph/YPP_ELPH_project.dep diff --git a/include/version/version.m4 b/include/version/version.m4 index 03c9396322..da1c01f270 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22522 h.80b6c8aa7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22574 h.6d84a621a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22522" -SHASH="80b6c8aa7" +SREVISION="22574" +SHASH="6d84a621a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/ELPH_project.dep b/src/exc-ph/ELPH_project.dep new file mode 100644 index 0000000000..f3592d99f1 --- /dev/null +++ b/src/exc-ph/ELPH_project.dep @@ -0,0 +1,17 @@ + EXCPH_X_phass.o + EXCPH_X_phass_from_Hpert.o + EXCPH_ave_sat_DbGrid.o + EXCPH_double_grid_setup.o + EXCPH_eval_renorm.o + EXCPH_eval_sat.o + EXCPH_gkkp_driver.o + EXCPH_gkkp_eval_ber.o + EXCPH_gkkp_eval_pal.o + EXCPH_lifetime.o + EXCPH_load_L.o + EXCPH_optics.o + EXC_dipole.o + EXC_occupations.o + Satellite_DbGrid.o + Satellite_Simple.o + diff --git a/src/exc-ph/YPP_ELPH_project.dep b/src/exc-ph/YPP_ELPH_project.dep new file mode 100644 index 0000000000..d828f38222 --- /dev/null +++ b/src/exc-ph/YPP_ELPH_project.dep @@ -0,0 +1,2 @@ + EXC_occupations.o + From c38c6b9fa0da55aa1faed868bb976f80ede38658 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 29 May 2023 23:17:48 +0200 Subject: [PATCH 0636/1367] Version 5.2.0, Revision 22204, Hash b72887603 MODIFIED * include/version/version.m4 a2y/a2y_gkkp.F Changes: - Imported changes done in branch devel-excph-clean Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- interfaces/a2y/a2y_gkkp.F | 23 +++++++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 248e3b1aa7..0f016eb025 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22185 h.aca1205ba, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22204 h.b72887603, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22185" -SHASH="aca1205ba" +SREVISION="22204" +SHASH="b72887603" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index e0f14128be..c01833804a 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -28,10 +28,10 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) use pars, ONLY:DP,SP,cZERO use stderr, ONLY:intc use com, ONLY:msg - use interfaces, ONLY:ELPH_alloc + use ELPH_intfcs, ONLY:ELPH_alloc use R_lattice, ONLY:nkibz,nkbz,nqibz,nqbz,k_pt,k_sstar,q_pt,q_sstar use D_lattice, ONLY:n_atoms - use ELPH, ONLY:ph_modes,elph_nb,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& + use ELPH, ONLY:ph_modes,elph_nb,elph_bands,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& & elph_nQ,elph_nk_bz,elph_grids_are_expanded,elph_use_q_grid,& & PH_qpt,PH_kpt_bz,GKKP,PH_freqs_sq ! @@ -67,7 +67,9 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) elph_nk_bz = netcdf_get_dimension(grpid, "glob_nk") elph_nQ = netcdf_get_dimension(grpid, "glob_nq") ! - call msg('s','ELPH dims',(/elph_nb,ph_modes,elph_nk_bz,elph_nQ/)) + elph_bands=(/1,elph_nb/) + ! + call msg('s','ELPH dims',(/elph_bands,ph_modes,elph_nk_bz,elph_nQ/)) ! call ELPH_alloc("PHONONS dV LEVELS",GKKP=GKKP) ! @@ -282,12 +284,20 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) ! do ik=1,elph_nk_bz do i_modes=1,ph_modes - ! Invert the band indexes and do the complex conjugate + ! Here we should invert the band indexes and do the complex conjugate ! See eq.(5) of the notes of Fulvio + ! This operation however is already performed inside the subrtouine + ! src/el-ph/ELPH_databases_load.F + ! + ! See comment there, reported also here. + ! There has been a key error in the definition of the el-ph SE of the BKE (Eq. 30_9_11.18) + ! where the band indexes have been exchanged. Instead of doing a global change of the notes + ! and of the code I decided, here, to exchange the indexes: + ! do i_n=1,elph_nb do i_m=1,elph_nb - GKKP%dVc(i_modes,i_n,i_m,ik,1)=cmplx(gstore_abinit(1,i_m,i_n,i_modes,ik,1),& - & -gstore_abinit(2,i_m,i_n,i_modes,ik,1),kind=SP) + GKKP%dVc(i_modes,i_m,i_n,ik,1)=cmplx(gstore_abinit(1,i_m,i_n,i_modes,ik,1),& + & gstore_abinit(2,i_m,i_n,i_modes,ik,1),kind=SP) enddo enddo enddo @@ -303,6 +313,7 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) isize(1:5)=(/2,3,n_atoms,ph_modes,1/) ! varid = netcdf_inquire_varid(ncid, "pheigvec_cart_ibz") + !varid = netcdf_inquire_varid(ncid, "phdispl_cart_ibz") netcdf_error = nf90_get_var(ncid, varid, pheigvec_cart_ibz, ipos(1:5), isize(1:5)) ! do xyz=1,3 From da56e922943c491536c7e6cda6985059126f6409 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 2 Jun 2023 00:02:26 +0200 Subject: [PATCH 0637/1367] Version 5.2.0, Revision 22343, Hash abaa13a9d MODIFIED * include/version/version.m4 bse/K_dipoles.F Changes: - [yambo] Small stylistic change Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_dipoles.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index fa97e91c32..c7ba95d65a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22274 h.8e6998cb0, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22343 h.abaa13a9d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22274" -SHASH="8e6998cb0" +SREVISION="22343" +SHASH="abaa13a9d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 4d51087e80..d54ddd2a2f 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -95,7 +95,7 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) geometry_ok=abs(dot_product(BSS_E_dir,BSS_Q_dir))<1.E-5_SP ! if ( l_BS_trace .and. .not. geometry_ok ) then - call warning(" Propagation direction not ortogonal to field direction. Setting z for field propagation and x-y for direction") + call warning(" Propagation direction not ortogonal to field polarization. Setting z for propagation and x-y for polarization") BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) BS_field_direction(:,2)=(/0._SP,1._SP,0._SP/) BS_field_direction(:,3)=(/0._SP,0._SP,1._SP/) From 09aa5766f77dcc7ca5728166e2ac9d92af0bb1d9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 19 Jun 2023 17:39:43 +0200 Subject: [PATCH 0638/1367] Version 5.2.0, Revision 22683, Hash 0a35f15d2 MODIFIED * include/version/version.m4 output/X_OUTPUT_driver.F Bugs: - [yambo] Fixed issue introduced in Esort and E_IP output Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/output/X_OUTPUT_driver.F | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 562f159abd..bd247fc05c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22657 h.af09e53a3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22683 h.0a35f15d2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22657" -SHASH="af09e53a3" +SREVISION="22683" +SHASH="0a35f15d2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 403efca385..9d69095457 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -127,8 +127,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) X_obs(ic)%COL_header(1:2) = (/'E ','N_deg'/) enddo if (BS_K_coupling) then - X_obs(3)%N_columns=3 - X_obs(3)%COL_header(1:3) = (/'Re(E)','Im(E)','N_deg'/) + X_obs(4)%N_columns=3 + X_obs(4)%COL_header(1:3) = (/'Re(E)','Im(E)','N_deg'/) endif do it=1,N_X_obs if (.not.X_do_obs(trim(X_obs(it)%what))) cycle From 7f212baaa869c27761b7ed4ff7d38a47e1896eaa Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 20 Jun 2023 00:03:30 +0200 Subject: [PATCH 0639/1367] Version 5.2.0, Revision 22684, Hash 09aa5766f MODIFIED * include/version/version.m4 bse/K_observables.F Changes: - [yambo] Automatic swithcing on of trace commented for now Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_observables.F | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index bd247fc05c..96b6d3e3d0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22683 h.0a35f15d2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22684 h.09aa5766f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22683" -SHASH="0a35f15d2" +SREVISION="22684" +SHASH="09aa5766f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 749b67e078..44ac17a563 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -85,8 +85,9 @@ subroutine K_observables( W ) l_BS_trace = .false. endif if (l_BS_dichroism.and..not.l_BS_trace) then - call warning(" Trace is automatically switched of with dichroism") - l_BS_trace=.true. + call warning(" Natural dichroism without trace") + ! call warning(" Trace is automatically switched on with dichroism") + ! l_BS_trace=.true. endif ! if (l_BS_trace ) BS_dip_size = 3 From 1710424d79f7d384db8fb27a2184241823d2d1d9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 20 Jun 2023 00:33:05 +0200 Subject: [PATCH 0640/1367] Version 5.2.0, Revision 22685, Hash 7f212baaa MODIFIED * include/version/version.m4 bse/K_observables.F Bugs: - [yambo] Fixed definition for oriented samples Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_observables.F | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 96b6d3e3d0..5ae123eac2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22684 h.09aa5766f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22685 h.7f212baaa, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22684" -SHASH="09aa5766f" +SREVISION="22685" +SHASH="7f212baaa" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 44ac17a563..6588844e06 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -85,7 +85,10 @@ subroutine K_observables( W ) l_BS_trace = .false. endif if (l_BS_dichroism.and..not.l_BS_trace) then + BS_dip_size=2 call warning(" Natural dichroism without trace") + ! NB: in the case without trace the quadripolar terms should be taken into account, + ! With trace these terms average to zero ! call warning(" Trace is automatically switched on with dichroism") ! l_BS_trace=.true. endif From 1ae3bf08c1e4d4dfd11397dd771f20e649b81e48 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 20 Jun 2023 01:12:48 +0200 Subject: [PATCH 0641/1367] Version 5.2.0, Revision 22686, Hash 1710424d7 MODIFIED * include/version/version.m4 bse/K_kernel.F Bugs: - [yambo] Small fix in ALDA cutoff lowering fix Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 5ae123eac2..0f2a631300 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22685 h.7f212baaa, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22686 h.1710424d7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22685" -SHASH="7f212baaa" +SREVISION="22686" +SHASH="1710424d7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 475c75bc31..cce36029ba 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -320,8 +320,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) ! - call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) - ! QP_ng_Vxc=BS_n_g_fxc ! YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) @@ -347,6 +345,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(magn) endif ! + call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + ! call WF_free(WF,keep_states_to_load=.true.) ! endif From cc708f10423a3203df05e2f6cc0bbed1d925182b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 21 Jun 2023 14:10:17 +0200 Subject: [PATCH 0642/1367] Version 5.1.0, Revision 22338, Hash 93fc353fb MODIFIED * include/version/version.m4 io_parallel/io_COLLISIONS.F Bugs: - [collisions] fixed compilation bug (typo in variable name) Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/io_parallel/io_COLLISIONS.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 660e868e32..4d87f43910 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22292 h.490ea3948, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22338 h.93fc353fb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22292" -SHASH="490ea3948" +SREVISION="22338" +SHASH="93fc353fb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 2ee2dd2bf3..a52bbfdf49 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -104,7 +104,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) if(def2) then COLL_chunksize(1:2)=YAMBO_DEF_CHUNK if (COLL_element%N Date: Thu, 22 Jun 2023 23:46:51 +0200 Subject: [PATCH 0643/1367] Version 5.2.0, Revision 22687, Hash 1ae3bf08c MODIFIED * driver/yambo.F driver/ypp.F include/version/version.m4 bse/K_kernel.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_NEQ_GW_static.F interface/INIT_activate.F pol_function/X_half_mat_check.F qp/QP_ppa_cohsex.F qp/QP_real_axis.F setup/eval_Mtot.F setup/setup.F xc_functionals/el_magnetization.F xc_functionals/el_magnetization_matrix.F Changes: - check on symmetries based on WFs moved in setup and removed from all other subroutines. It seems that it is never used. To be checked - restored calculation of magnetization in setup - el_magnetization and el_magnetization_matrix can now load WFs on the fly, k-point by k-point Patch sent by: Davide Sangalli --- driver/yambo.F | 2 +- driver/ypp.F | 2 +- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 16 ++++++---------- src/collisions/COLLISIONS_HXC.F | 4 ---- src/collisions/COLLISIONS_NEQ_GW_static.F | 4 ---- src/interface/INIT_activate.F | 2 +- src/pol_function/X_half_mat_check.F | 2 -- src/qp/QP_ppa_cohsex.F | 4 ---- src/qp/QP_real_axis.F | 4 ---- src/setup/eval_Mtot.F | 15 +++++++++------ src/setup/setup.F | 10 ++++++++-- src/xc_functionals/el_magnetization.F | 13 +++++++++++++ src/xc_functionals/el_magnetization_matrix.F | 10 ++++++++++ 14 files changed, 52 insertions(+), 42 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 17fb7f4f71..961a2716f3 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -131,7 +131,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! ! Basical ! - call setup(en,Xen,Ken,k,Xk) + call setup(en,q,Xen,Ken,k,Xk) ! ! Update the default variables ! diff --git a/driver/ypp.F b/driver/ypp.F index 60fde6e5fb..8e112594e8 100644 --- a/driver/ypp.F +++ b/driver/ypp.F @@ -213,7 +213,7 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! Main SETUP !============ ! - call setup(en,Xen,Ken,k,Xk) + call setup(en,q,Xen,Ken,k,Xk) ! call PARALLEL_global_indexes(Xen,Xk,q," ",RESET=.TRUE.) ! diff --git a/include/version/version.m4 b/include/version/version.m4 index 0f2a631300..9a3c0e430b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22686 h.1710424d7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22687 h.1ae3bf08c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22686" -SHASH="1710424d7" +SREVISION="22687" +SHASH="1ae3bf08c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index cce36029ba..a2e4c9dd3c 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -351,16 +351,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) - ! - ! Wave Functions Phases - !======================= - if (iHxc==3) call K_WF_phases(Xk) - ! - ! Spatial Inversion Test - !======================== - if (iHxc==1) call WF_spatial_inversion(Ken,Xk) - ! ! Timing !======== ! @@ -418,6 +408,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif #endif + ! + call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) + ! + ! Wave Functions Phases + !======================= + if (iHxc==3) call K_WF_phases(Xk) ! if (.not.l_bs_fxc) section_title='Kernel' if ( l_bs_fxc) section_title='Kernel->Fxc' diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index f0789e13df..4f87c1f433 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -177,10 +177,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) call elemental_collision_alloc(iscp_XC,NG=NG_XC,NG_GAMP=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) ! if (l_compute_screening) then - ! - ! Test the spatial Inversion - ! - call WF_spatial_inversion(E,Xk) ! ! Allocation (EM1S can be bigger than N_g_vecs_C) ! diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index ccd2678b58..57510a04da 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -99,10 +99,6 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! call timing('NEQ GW collisions',OPR='start') ! - ! Test the spatial Inversion - ! - call WF_spatial_inversion(E,Xk) - ! ! ALLOCATION !------------ ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index eb5361b7f2..19a4b50891 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -138,7 +138,7 @@ subroutine INIT_activate() ! !Setup ! - if (l_setup) call initactivate(1,'MaxGvecs Gthresh K_grids IkSigLim IkXLim NoDiagSC') + if (l_setup) call initactivate(1,'MaxGvecs Gthresh K_grids IkSigLim IkXLim NoDiagSC EvalMagn') #if defined _ELPH if (l_setup) call initactivate(1,'BSEscatt') #endif diff --git a/src/pol_function/X_half_mat_check.F b/src/pol_function/X_half_mat_check.F index 56dc75b3ea..c38333a1af 100644 --- a/src/pol_function/X_half_mat_check.F +++ b/src/pol_function/X_half_mat_check.F @@ -35,8 +35,6 @@ subroutine X_half_mat_check(Xen,Xk,Xw) type(bz_samp),intent(in) :: Xk type(w_samp) ,intent(in) :: Xw ! - call WF_spatial_inversion(Xen,Xk) - ! if (i_space_inv==1) then X_FILL_UP_matrix_only= .TRUE. else diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index b73094c20f..805cbd061b 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -215,10 +215,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,W,GW_iter) io_err=io_X(X,Xw,ID) if (io_err<0.and.io_RESPONSE) call error('Incomplete and/or broken PPA/Static diel. fun. database') ! - ! Test the spatial Inversion - ! - call WF_spatial_inversion(E,Xk) - ! ! ALLOCATION !------------ ! diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 8368212954..31fe3b2447 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -273,10 +273,6 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) QP_W=cZERO endif ! - ! Test the spatial Inversion - ! - call WF_spatial_inversion(en,Xk) - ! ! ALLOCATION (scattering_main) ! call X_ALLOC_elemental('X',(/X%ng,X%ng,QP_n_W_freqs_redux/)) diff --git a/src/setup/eval_Mtot.F b/src/setup/eval_Mtot.F index 3ec329e061..244dfd0bd3 100644 --- a/src/setup/eval_Mtot.F +++ b/src/setup/eval_Mtot.F @@ -24,12 +24,12 @@ subroutine eval_Mtot(en,k,q) ! use pars, ONLY:SP + use parser_m, ONLY:parser use FFT_m, ONLY:fft_size use wave_func, ONLY:WF use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_spin,Spin_magn,eval_magn use com, ONLY:msg - use electrons, ONLY:eval_magn use interfaces, ONLY:WF_load,el_magnetization use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,& & PARALLEL_WF_index @@ -43,7 +43,11 @@ subroutine eval_Mtot(en,k,q) ! real(SP), allocatable :: magn_tmp(:,:) ! - if (eval_magn) return + if(n_spin==1) return + ! + call parser("EvalMagn",eval_magn) + ! + if(.not.eval_magn) return ! call msg('r','DL Magnetization [cc]') ! @@ -51,12 +55,11 @@ subroutine eval_Mtot(en,k,q) call PARALLEL_WF_distribute(CLEAN_UP=.TRUE.) call PARALLEL_WF_index( ) ! - call WF_load(WF,0,1,(/1,en%nbm/),(/1,k%nibz/),space='R',title='-WF') - ! + call fft_setup(0,1,.true.) YAMBO_ALLOC(magn_tmp,(fft_size,3)) call el_magnetization(en,k,magn_tmp) YAMBO_FREE(magn_tmp) ! - call WF_free(WF) + call msg('s','Total magnetization (x,y,z)',real(Spin_magn(:),SP),"[Bohr_magneton]") ! end subroutine eval_Mtot diff --git a/src/setup/setup.F b/src/setup/setup.F index 240d8fcfb4..dd546e301f 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine setup(en,Xen,Ken,k,Xk) +subroutine setup(en,q,Xen,Ken,k,Xk) ! use pars, ONLY:SP,pi,schlen use units, ONLY:Da2AU @@ -68,7 +68,7 @@ subroutine setup(en,Xen,Ken,k,Xk) #endif ! type(levels) ::en,Xen,Ken - type(bz_samp) ::k,Xk + type(bz_samp) ::q,k,Xk ! ! Work Space ! @@ -225,6 +225,9 @@ subroutine setup(en,Xen,Ken,k,Xk) call msg('r','Inversion symmetry ',inv_index>0) call msg('r','Spatial inversion ',i_space_inv==1) if (inv_index>0) call msg('r','Inversion index ',inv_index) + ! + ! Test Spatial Inversion for WFs + call WF_spatial_inversion(en,k,q) ! ! Time reversal ! @@ -418,6 +421,9 @@ subroutine setup(en,Xen,Ken,k,Xk) ! call E_duplicate(Xen,Ken) ! + ! Magnetization + call eval_Mtot(en,k) + ! #if defined _SC K_kind=X_kind K_xc_functional=X_xc_functional diff --git a/src/xc_functionals/el_magnetization.F b/src/xc_functionals/el_magnetization.F index 68b138bf45..cce2a16cfd 100644 --- a/src/xc_functionals/el_magnetization.F +++ b/src/xc_functionals/el_magnetization.F @@ -36,6 +36,8 @@ subroutine el_magnetization(en,Xk,magn,bands) use D_lattice, ONLY:nsym,dl_sop,i_time_rev use FFT_m, ONLY:fft_size,fft_rot_r use wave_func, ONLY:WF + use interfaces, ONLY:WF_load,WF_free + use hamiltonian, ONLY:WF_G_max,WF_Go_indx use electrons, ONLY:Spin_magn use matrix_operate, ONLY:m3det use parallel_m, ONLY:PAR_IND_WF_linear,PAR_COM_density @@ -56,6 +58,7 @@ subroutine el_magnetization(en,Xk,magn,bands) ! ! Work Space ! + logical :: l_WFs_on_the_fly integer :: isym,ifft,ib,ik,i_sp_pol,i_wf,bands_range(2) real(SP):: cv(fft_size,3),tmp_sop(3,3),f_occ ! @@ -70,11 +73,18 @@ subroutine el_magnetization(en,Xk,magn,bands) ! if (n_spin==1) return ! + l_WFs_on_the_fly=.not.allocated(WF%r) ! do i_sp_pol=1,n_sp_pol bands_range=(/1,en%nbm(i_sp_pol)/) if(present(bands)) bands_range=bands do ik=1,Xk%nibz + ! + if (l_WFs_on_the_fly) then + call WF_load(WF,WF_G_max,WF_Go_indx,bands_range,(/ik,ik/),(/i_sp_pol,i_sp_pol/),& +& space='R',title='-mang',keep_states_to_load=.true.) + endif + ! do ib=bands_range(1),bands_range(2) ! if (allocated(PAR_IND_WF_linear%element_2D)) then @@ -124,6 +134,9 @@ subroutine el_magnetization(en,Xk,magn,bands) endif ! enddo + ! + if (l_WFs_on_the_fly) call WF_free(WF,keep_fft=.true.) + ! enddo enddo ! diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index a7317f836b..bebb9f6e13 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -57,6 +57,7 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! ! Work Space ! + logical :: l_WFs_on_the_fly integer :: ib1,ib2,i_sp_pol,ik,ik_RT,isym,ifft,i_wf1,i_wf2 real(SP):: cv(fft_size,3),tmp_sop(3,3) complex(SP) :: f_occ @@ -71,6 +72,8 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! if (n_sp_pol==2) call error(' case n_sp_pol=2 not yet coded in yambo_rt') ! + l_WFs_on_the_fly=.not.allocated(WF%r) + ! if(lowest_band Date: Fri, 23 Jun 2023 13:15:32 +0200 Subject: [PATCH 0644/1367] Version 5.2.0, Revision 22688, Hash 110635272 MODIFIED * include/version/version.m4 bse/K_driver.F bse/K_exchange_collisions.F bse/K_kernel.F modules/mod_BS.F modules/mod_interfaces.F setup/setup.F wf_and_fft/WF_alloc.F wf_and_fft/WF_load.F Changes: - [yambo] WF_laod now can handle the loading of WFs at two specific k points, e.g. k1 and k2 - [yambo] In BSE at q=0 the WFs for the exchange term of the kernel are now loaded k-point by k-point (default, it can be swithced off) In BSE at finite q, the same procedure can be activated. This is possible with the use of the new feature in WF_load with k1=k , k2=k+q By default this option is switched off since, for the way the loop on transitions is coded, it would require a continuous loading and off-loading of the wave-functions Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++--- src/bse/K_driver.F | 2 +- src/bse/K_exchange_collisions.F | 30 +++++++++++++++++++--- src/bse/K_kernel.F | 45 +++++++++++++++++++++++++-------- src/modules/mod_BS.F | 1 - src/modules/mod_interfaces.F | 5 ++-- src/setup/setup.F | 8 +++--- src/wf_and_fft/WF_alloc.F | 20 +++++++++++---- src/wf_and_fft/WF_load.F | 14 +++++++--- 9 files changed, 98 insertions(+), 33 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9a3c0e430b..9c1348f586 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22687 h.1ae3bf08c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22688 h.110635272, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22687" -SHASH="1ae3bf08c" +SREVISION="22688" +SHASH="110635272" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 303780e173..b75ec3b00d 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -210,7 +210,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! ! Wave Functions distribution !============================= - call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.FALSE.) + call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=iq==BS_q(1)) call PARALLEL_WF_index( ) ! ! 0. The Dipoles diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index f1b7bb9dc1..09c1e90f06 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -21,12 +21,14 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine K_exchange_collisions(iq,Xk,i_T_grp) +subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! use pars, ONLY:SP,cZERO use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_inv_d use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_oscillators_alloc,BS_n_g_exch,& -& BSE_L_kind,l_BS_magnons +& BSE_L_kind,l_BS_magnons,l_BSE_minimize_memory,BS_bands + use interfaces, ONLY:WF_load,WF_free + use wave_func, ONLY:WF use R_lattice, ONLY:g_rot,g_rot_d,qindx_X,bz_samp use stderr, ONLY:STRING_match use electrons, ONLY:n_sp_pol @@ -40,10 +42,13 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) implicit none ! type(bz_samp),intent(in) :: Xk - integer, intent(in) :: iq,i_T_grp + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_exch_wf_in_loop ! ! Work Space ! + logical :: l_load_WFs + integer :: NK(2) integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_el_last_with_identity_sym,i_T_grp_last_with_identity_sym,i_T_grp_p #ifdef _CUDA @@ -67,7 +72,7 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) !$omp parallel default(shared), private( K_EXCH_collision, & !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & - !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2) + !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2, NK) #endif ! call OPENMP_update(master_thread) @@ -77,6 +82,7 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) #if defined(__NOTNOW) && ! defined(_CUDA) !$omp do schedule(dynamic) #endif + NK=-1 T_loop: do i_T_el=1,BS_T_grp(i_T_grp)%size ! i_k_bz=BS_T_grp(i_T_grp)%table(i_T_el,1) @@ -98,6 +104,20 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) K_EXCH_collision%os=(/i_v,i_p,i_sp,i_sp_v/) K_EXCH_collision%qs=(/i_g_p,iq,1/) ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) + endif +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + ! if (iq==1) then ! ! G==0 term @@ -189,6 +209,8 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) #if defined(__NOTNOW) && ! defined(_CUDA) !$omp end parallel #endif + ! + if(l_bs_exch_wf_in_loop) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) ! call timing('T_space EXX Osc.',OPR='stop') ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index a2e4c9dd3c..33ec385775 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -61,7 +61,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use wave_func, ONLY:WF,rho_map,rho_map_thresh use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing - use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,master_cpu + use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,PARALLEL_default_mode,master_cpu use parallel_int, ONLY:PP_redux_wait use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free @@ -94,7 +94,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last ! - integer :: i_block,O_ng_shift,O_ng_exch,iHxc,NG(2),& + integer :: i_block,O_ng_shift,O_ng_exch,iHxc,NG(2),NK(2),& & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& & bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4) complex(SP):: Co,H_x,H_c,BS_mat_tmp @@ -104,7 +104,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external ::K_correlation_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! - logical :: l_bs_exch,l_bs_corr,l_matrix_init,l_load_kernel,l_write_kernel + logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_matrix_init,l_load_kernel,l_write_kernel ! ! I/O ! @@ -171,6 +171,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) l_bs_exch=any((/BS_res_K_exchange,BS_cpl_K_exchange/)).or.l_bs_fxc.and..not.(l_BS_magnons.and.n_sp_pol==2) l_bs_corr=any((/BS_res_K_corr,BS_cpl_K_corr/)) .and. .not.l_bs_fxc ! + ! I load the WFs for exachange in a loop in two cases + ! - q=0 and more than one k-point. + ! In this case it is the default, unless I specify workload in the parallel mode + ! - q/=0 + ! In this case it is activated only if I specify KQmemory in the parallel mode + ! The code would work fine also in this case, however it would require continuous loading and unloading of WFs. + ! To avoid this one would need to move the loop over i_star in K_Transitions_setup outside the + ! loop over ic and iv (see related comment in K_Transiontion_setup.F) + l_bs_exch_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and..not.trim(PARALLEL_default_mode)=="workload") .or. & + & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory") + ! if (l_bs_exch) call msg('r','[BSE] Exchange components ',BS_n_g_exch) ! if (l_bs_corr) then @@ -409,11 +420,19 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif #endif ! - call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',title=trim(section_title),keep_states_to_load=.true.) - ! - ! Wave Functions Phases - !======================= - if (iHxc==3) call K_WF_phases(Xk) + if (iHxc==1 .and. l_bs_exch_wf_in_loop) then + ! DS this is used only for iq==1 + call fft_setup(NG(1),NG(2),.true.) + else + ! + call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',& + & title=trim(section_title),keep_states_to_load=.true.) + ! + ! Wave Functions Phases + !======================= + if (iHxc==3) call K_WF_phases(Xk) + ! + endif ! if (.not.l_bs_fxc) section_title='Kernel' if ( l_bs_fxc) section_title='Kernel->Fxc' @@ -473,8 +492,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !---------------------- ! if(iHxc==1) then - call K_exchange_collisions(iq,Xk,i_Tgrp_k) - if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p) + call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) + if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) endif ! ! Exchange oscillators @@ -744,7 +763,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(RIM_W) endif ! - call WF_free(WF,keep_states_to_load=iHxc<3) + if (iHxc==1 .and. l_bs_exch_wf_in_loop) then + call fft_free() + else + call WF_free(WF,keep_states_to_load=iHxc<3) + endif ! l_matrix_init=.false. ! diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 736b91e8e4..d155e0e85a 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -328,7 +328,6 @@ subroutine BS_oscillators_free(iG_ref,iB_ref) do iB=iB_ref,1,-1 ik_loop=BS_blk(iB)%ik ip_loop=BS_blk(iB)%ip - if ( ik_now==ik_loop .and. ip_now==ip_loop ) cycle if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle if (.not.allocated(BS_blk(iB)%O_c)) exit YAMBO_FREE(BS_blk(iB)%O_c) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index c6603a65c8..3728ac4c84 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -188,8 +188,8 @@ integer function eval_G_minus_G(iG,iGo,force_recompute,COMM) type(yMPI_comm), optional :: COMM end function ! - subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,& -& sp_pol_to_load,space,title,impose_free_and_alloc,& + subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,sp_pol_to_load,& +& k_extrema_only,space,title,impose_free_and_alloc,& & force_WFo,keep_states_to_load,quiet) use wave_func, ONLY:WAVEs integer :: iG_max,iGo_max,bands_to_load(2),kpts_to_load(2) @@ -197,6 +197,7 @@ subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,& integer, optional :: sp_pol_to_load(2) character(*),optional :: space character(*),optional :: title + logical ,optional :: k_extrema_only logical ,optional :: impose_free_and_alloc logical ,optional :: force_WFo logical ,optional :: keep_states_to_load diff --git a/src/setup/setup.F b/src/setup/setup.F index dd546e301f..52c3c99ceb 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -225,9 +225,6 @@ subroutine setup(en,q,Xen,Ken,k,Xk) call msg('r','Inversion symmetry ',inv_index>0) call msg('r','Spatial inversion ',i_space_inv==1) if (inv_index>0) call msg('r','Inversion index ',inv_index) - ! - ! Test Spatial Inversion for WFs - call WF_spatial_inversion(en,k,q) ! ! Time reversal ! @@ -420,6 +417,11 @@ subroutine setup(en,q,Xen,Ken,k,Xk) ! Once the occupations have been evaluated I dump Xen in Ken ! call E_duplicate(Xen,Ken) + ! + ! Test Spatial Inversion for WFs + ! Notice that the variable i_space_inv is already defined by + ! atoms_spatial_inversion() + call WF_spatial_inversion(en,k,q) ! ! Magnetization call eval_Mtot(en,k) diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index 328d4a47d8..a0131b126b 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine WF_alloc(WF) +subroutine WF_alloc(WF,k_extrema_only) ! use pars, ONLY:cZERO,SP use wave_func, ONLY:WAVEs,states_to_load,wf_ng,wf_ncx,rho_map_size @@ -33,34 +33,43 @@ subroutine WF_alloc(WF) #include ! type(WAVEs) :: WF + logical, intent(in) :: k_extrema_only ! ! Work Space ! - integer :: ik,ib,i_sp_pol,N_total,wf_grid_size + integer :: ik,ib,i_sp_pol,NK,N_loaded,N_total,wf_grid_size ! ! Distributed allocation ! if(allocated(states_to_load)) then ! WF%N=0 + N_loaded=0 N_total=0 do i_sp_pol=WF%sp_pol(1),WF%sp_pol(2) do ik=WF%k(1),WF%k(2) do ib=WF%b(1),WF%b(2) N_total=N_total+1 - if (states_to_load(ib,ik,i_sp_pol)) WF%N=WF%N+1 + if (states_to_load(ib,ik,i_sp_pol)) then + N_loaded=N_loaded+1 + if (.not.k_extrema_only) WF%N=WF%N+1 + if ( k_extrema_only.and.(ik==WF%k(1).or.ik==WF%k(2))) WF%N=WF%N+1 + endif enddo enddo enddo ! else ! - WF%N=(WF%b(2)-WF%b(1)+1)*(WF%k(2)-WF%k(1)+1)*(WF%sp_pol(2)-WF%sp_pol(1)+1) + NK=(WF%k(2)-WF%k(1)+1) + if (k_extrema_only) NK=min(NK,2) + WF%N=(WF%b(2)-WF%b(1)+1)*NK*(WF%sp_pol(2)-WF%sp_pol(1)+1) + N_loaded=WF%N N_total=WF%N ! endif ! - call PARALLEL_live_message("Wave-Function states",LOADED=WF%N,TOTAL=N_total) + call PARALLEL_live_message("Wave-Function states",LOADED=N_loaded,TOTAL=N_total) ! if (WF%space=='R') wf_grid_size=rho_map_size if (WF%space=='G') wf_grid_size=wf_ng @@ -84,6 +93,7 @@ subroutine WF_alloc(WF) endif ! YAMBO_ALLOC(WF%index,(WF%b(2),WF%k(2),WF%sp_pol(2))) + !AMBO_ALLOC(WF%index,(WF%b(1):WF%b(2),WF%k(1):WF%k(2),WF%sp_pol(1):WF%sp_pol(2))) WF%index=0 ! end subroutine diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index db549e984c..f7eb361b42 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -26,6 +26,7 @@ !! @param[in] iGo_max_in ??? !! @param[in] bands_to_load bands range !! @param[in] kpts_to_load k-points range +!! @param[in] k_extrema_only k-points, load only !first and last in range !! @param[in] sp_pol_to_load spin-polarization range !! @param[in] space R = real-space, G = G-space, C = ?, B = ? !! @param[in] title purpose of the wave-function loading @@ -36,7 +37,7 @@ !! !! @param[out] WF Wave-function object ! -subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load,& +subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load,k_extrema_only,& & space,title,impose_free_and_alloc,force_WFo,keep_states_to_load,quiet) ! ! Load and (eventually) FFTs the wavefunctions @@ -74,6 +75,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load integer, optional :: sp_pol_to_load(2) character(*),optional :: space character(*),optional :: title + logical, optional :: k_extrema_only logical, optional :: impose_free_and_alloc logical, optional :: force_WFo logical, optional :: keep_states_to_load @@ -88,7 +90,8 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load & npwk,N real(SP) ::mndp,mxdp,xk(3) complex(SP) ::c - logical ::loaded_bounds_ok,free_and_alloc,buffer_is_ok,clean_up_states,force_WFo_,QUIET_wf,SIZE_msg + logical ::loaded_bounds_ok,free_and_alloc,buffer_is_ok,clean_up_states,& + k_extrema_only_,force_WFo_,QUIET_wf,SIZE_msg complex(SP), allocatable :: wf_disk(:,:,:) complex(DP), allocatable :: wf_DP(:) ! @@ -121,6 +124,9 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load force_WFo_=.false. if(present(force_WFo)) force_WFo_=force_WFo ! + k_extrema_only_=.false. + if(present(k_extrema_only)) k_extrema_only_=k_extrema_only + ! sp_pol_to_load_=(/1,n_sp_pol/) if(present(sp_pol_to_load)) sp_pol_to_load_=sp_pol_to_load ! @@ -199,6 +205,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! QUIET_wf = .false. if (kpts_to_load(1)==kpts_to_load(2).and.kpts_to_load(2)>1) QUIET_wf = .true. + if (k_extrema_only_.and.kpts_to_load(1)>1) QUIET_wf = .true. if (present(quiet)) QUIET_wf = quiet if (QUIET_wf) call IO_and_Messaging_switch("-report -log") SIZE_msg=.not.QUIET_wf.and.(any((/fft_dim_loaded/=fft_dim/)).or.any((/fft_dim==0/))) @@ -272,7 +279,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! ! Memory allocation ! - call WF_alloc(WF) + call WF_alloc(WF,k_extrema_only_) ! if (WF%space=='R') wf_grid_size=fft_size if (WF%space=='G') wf_grid_size=wf_ng @@ -321,6 +328,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load do ikibz=1,nkibz ! if (any( (/ikibzWF%k(2)/) )) cycle + if (k_extrema_only_ .and. all( (/ikibz>WF%k(1), ikibz Date: Fri, 23 Jun 2023 15:35:37 +0200 Subject: [PATCH 0645/1367] Version 5.2.0, Revision 22689, Hash 61b900ab6 MODIFIED * include/version/version.m4 wf_and_fft/WF_load.F Bugs: - [yambo] Fixed check on WFs normalization Additions: - Changes: - Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/wf_and_fft/WF_load.F | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9c1348f586..85f6ac3ded 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22688 h.110635272, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22689 h.61b900ab6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22688" -SHASH="110635272" +SREVISION="22689" +SHASH="61b900ab6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index f7eb361b42..4fd2ecca83 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -585,13 +585,14 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! mndp=10._SP mxdp=-1._SP + if (WF%space=='R') N=size(WF%r(:,:,WF%index(1,1,1))) + if (WF%space/='R') N=size(WF%c(:,:,WF%index(1,1,1))) do ib1=1,min(int(nel)+5,WF%b(2)) do ib2=1,min(int(nel)+5,WF%b(2)) ! if ( WF%index(ib1,1,1)==0 .or. WF%index(ib2,1,1)==0 ) cycle ! c=cZERO - N=size(WF%r(:,:,WF%index(1,1,1))) if (WF%space=='R') c=Vstar_dot_V( N, WF%r(:,:,WF%index(ib1,1,1) ) , WF%r(:,:,WF%index(ib2,1,1)) ) if (WF%space/='R') c=Vstar_dot_V( N, WF%c(:,:,WF%index(ib1,1,1) ) , WF%c(:,:,WF%index(ib2,1,1)) ) ! From 477305e02c75f30b1b10f2d8da34e5223b56b5cb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 23 Jun 2023 16:41:19 +0200 Subject: [PATCH 0646/1367] Version 5.2.0, Revision 22690, Hash d7eb77e71 MODIFIED * include/version/version.m4 wf_and_fft/WF_rotate.F Bugs: - [yambo_sc] Fixed bug in WF_rotate Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/wf_and_fft/WF_rotate.F | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 85f6ac3ded..be77a6b6ce 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22689 h.61b900ab6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22690 h.d7eb77e71, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22689" -SHASH="61b900ab6" +SREVISION="22690" +SHASH="d7eb77e71" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/wf_and_fft/WF_rotate.F b/src/wf_and_fft/WF_rotate.F index 33c9357c4b..220736b729 100644 --- a/src/wf_and_fft/WF_rotate.F +++ b/src/wf_and_fft/WF_rotate.F @@ -58,7 +58,7 @@ subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size,space) do ibp = H_ref_bands(1),H_ref_bands(2) i_wfp = WFo%index(ibp,ik,i_sp_pol) if (i_wfp==0) cycle - if (space=="G") WS_wf(:,:,ib)=WS_wf(:,:,ib)+H_rotation(ibp,ib,ik,i_sp_pol)*WFo%c(:,:,i_wfp) + if (space/="R") WS_wf(:,:,ib)=WS_wf(:,:,ib)+H_rotation(ibp,ib,ik,i_sp_pol)*WFo%c(:,:,i_wfp) if (space=="R") WS_wf(:,:,ib)=WS_wf(:,:,ib)+H_rotation(ibp,ib,ik,i_sp_pol)*WFo%r(:,:,i_wfp) end do ! @@ -69,7 +69,7 @@ subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size,space) i_wf = WFo%index(ib,ik,i_sp_pol) if (i_wf==0) cycle ! - if (space=="G") then + if (space/="R") then ! !$omp parallel do default(shared), private(i_c,i_spinor) do i_spinor=1,n_spinor From 52bd49138223f67797ff953d0a3704dda1d67d80 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 23 Jun 2023 20:01:18 +0200 Subject: [PATCH 0647/1367] Version 5.2.0, Revision 22691, Hash 477305e02 MODIFIED * include/version/version.m4 allocations/X_ALLOC_elemental.F bse/K_IP.F bse/K_IP_sort.F output/K_OUTPUT.F Bugs: - [yambo] Fixed E_IP_INDEX in bse in parallel Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/allocations/X_ALLOC_elemental.F | 2 +- src/bse/K_IP.F | 2 +- src/bse/K_IP_sort.F | 3 +++ src/output/K_OUTPUT.F | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index be77a6b6ce..5c2bb23f4d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22690 h.d7eb77e71, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22691 h.477305e02, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22690" -SHASH="d7eb77e71" +SREVISION="22691" +SHASH="477305e02" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index c80b02f358..43e7a8585d 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -70,7 +70,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) YAMBO_ALLOC(BS_E_sorted,(DIM(1),DIM(2),DIM(3))) BS_E_sorted=cZERO YAMBO_ALLOC(BS_E_sorted_indx,(DIM(1),2*DIM(2),5)) - BS_E_sorted_indx=-1 + BS_E_sorted_indx=0 case('FXC') YAMBO_ALLOC(X_fxc,(DIM(1))) X_fxc=cZERO diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 8269668794..6d501fec35 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -123,7 +123,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) YAMBO_ALLOC(vtmpC,(BS_H_dim,n_BS_E_sorted)) vtmpC=cZERO YAMBO_ALLOC(vtmpI,(BS_H_dim,5)) - vtmpI=-1 + vtmpI=0 endif ! if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index 74d2e8f822..4af8c725e3 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -50,8 +50,11 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) return endif ! + ! call PP_redux_wait(vC,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait(vI,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait(vC,COMM=PAR_COM_eh_INDEX%COMM ) + call PP_redux_wait(vI,COMM=PAR_COM_eh_INDEX%COMM ) ! YAMBO_ALLOC(vR,(BS_H_dim)) YAMBO_ALLOC(sort_indx,(BS_H_dim)) diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 9f7f910ac7..b1eac794a6 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -216,7 +216,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) data_sort(1)=real(BS_E_sorted(id,1,1),SP) if (data_sort(1)==0._SP) cycle do it=1,18 - if (BS_E_sorted_indx(id,it,1)==-1) exit + if (BS_E_sorted_indx(id,it,1)==0) exit data_sort(1)=real(BS_E_sorted(id,1,1),SP) index_sort(1:5)=real(BS_E_sorted_indx(id,it,1:5),SP) call X_OUTPUT_driver("WRITE E_INDX_IP",data=data_sort(1:1),indexes=index_sort) From 32294aaa7e07fe3859792ef6a718e86e1901d412 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 09:31:04 +0200 Subject: [PATCH 0648/1367] Version 5.2.0, Revision 22692, Hash 52bd49138 MODIFIED * configure include/version/version.m4 Changes: - configure re-generated Patch sent by: Davide Sangalli --- configure | 45 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 764d59b77d..11931bad60 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22184 h.2871b0cee. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22691 h.477305e02. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.22184 h.2871b0cee' -PACKAGE_STRING='Yambo 5.2.0 r.22184 h.2871b0cee' +PACKAGE_VERSION='5.2.0 r.22691 h.477305e02' +PACKAGE_STRING='Yambo 5.2.0 r.22691 h.477305e02' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -716,6 +716,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -896,6 +897,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -955,6 +958,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1607,7 +1611,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.22184 h.2871b0cee to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.22691 h.477305e02 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1673,7 +1677,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.22184 h.2871b0cee:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.22691 h.477305e02:";; esac cat <<\_ACEOF @@ -1686,6 +1690,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1883,7 +1888,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.22184 h.2871b0cee +Yambo configure 5.2.0 r.22691 h.477305e02 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2512,7 +2517,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.22184 h.2871b0cee, which was +It was created by Yambo $as_me 5.2.0 r.22691 h.477305e02, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3270,8 +3275,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22184" -SHASH="2871b0cee" +SREVISION="22691" +SHASH="477305e02" @@ -3452,6 +3457,20 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15963,6 +15982,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16145,6 +16167,7 @@ fi + # @@ -17102,7 +17125,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.22184 h.2871b0cee, which was +This file was extended by Yambo $as_me 5.2.0 r.22691 h.477305e02, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17166,7 +17189,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.22184 h.2871b0cee +Yambo config.status 5.2.0 r.22691 h.477305e02 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5c2bb23f4d..9fa9e87db2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22691 h.477305e02, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22692 h.52bd49138, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22691" -SHASH="477305e02" +SREVISION="22692" +SHASH="52bd49138" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 4745a07ba7785b56252a841e0bd96e5e10c20b2d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 09:44:53 +0200 Subject: [PATCH 0649/1367] Version 5.2.0, Revision 22693, Hash 32294aaa7 MODIFIED * include/version/version.m4 bse/K_observables.F interface/INIT_activate.F interface/INIT_load.F Changes: - [yambo] Removed old flag for anomalous Hall effect which is now controlled by BSprop Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_observables.F | 2 +- src/interface/INIT_activate.F | 4 ++-- src/interface/INIT_load.F | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9fa9e87db2..8770073d60 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22692 h.52bd49138, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22693 h.32294aaa7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22692" -SHASH="52bd49138" +SREVISION="22693" +SHASH="32294aaa7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 6588844e06..d8eeb6e412 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -31,7 +31,7 @@ subroutine K_observables( W ) use X_m, ONLY:global_gauge use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,BSS_mode,l_eps_res_ares use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& -& l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,& +& l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum,l_BS_kerr_asymm,BSE_mode use parser_m, ONLY:parser use stderr, ONLY:STRING_match diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 19a4b50891..48b3902d2b 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -221,7 +221,7 @@ subroutine INIT_activate() ! ! Dipoles & Gauges ! - call initactivate(1,'DipApproach DipComputed DipPDirect ShiftedPaths Gauge AnHall') + call initactivate(1,'DipApproach DipComputed DipPDirect ShiftedPaths Gauge') ! endif ! @@ -259,7 +259,7 @@ subroutine INIT_activate() call INIT_RT_ctl_switch('R') #endif ! - call initactivate(1,'NoCondSumRule MetDamp AnHall') + call initactivate(1,'NoCondSumRule MetDamp') ! #if defined _NL || defined _SC call initactivate(1,'EvPolarization FrSndOrd') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index d1eef62041..aa6f7375d9 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -370,7 +370,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! ! BSE properties: kerr, magnons, absorption, ... ! - call it('f',defs,'AnHall' , '[BSE] Add the anomalous Hall effect to eps if using length gauge',verb_level=V_resp) call it(defs,'PL_weights','[PL] [cc] Weights of the carthesian components of the emitted radiation',PL_weights,verb_level=V_resp) ! #if defined _RT From c8a6a0a5a3aa6d4d3b143fe1245b3ab4dece4029 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 09:53:04 +0200 Subject: [PATCH 0650/1367] Version 5.2.0, Revision 22694, Hash 4745a07ba MODIFIED * include/version/version.m4 bse/K_observables.F Changes: - [yambo] Restored back-compatibility with old input files for anomalous hall effect Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_observables.F | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 8770073d60..c87311fa32 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22693 h.32294aaa7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22694 h.4745a07ba, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22693" -SHASH="32294aaa7" +SREVISION="22694" +SHASH="4745a07ba" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index d8eeb6e412..4487e25ae3 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -76,6 +76,7 @@ subroutine K_observables( W ) call warning(" n_sp_pol=2 and magnons requested. Spin flip BSE only is computed") endif if (l_BS_kerr) then + call parser('AnHall',l_BS_anomalous_Hall) BS_dip_size=2 l_BS_abs=.TRUE. endif From 5ed9597078946850de879d3e84bb5ff57fd57046 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 10:07:31 +0200 Subject: [PATCH 0651/1367] Version 5.2.0, Revision 22695, Hash c8a6a0a5a MODIFIED * include/version/version.m4 bse/K_observables.F Changes: - BSprop string updated after check on logicals Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_observables.F | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index c87311fa32..17e402353b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22694 h.4745a07ba, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22695 h.c8a6a0a5a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22694" -SHASH="4745a07ba" +SREVISION="22695" +SHASH="c8a6a0a5a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 4487e25ae3..6483ed2811 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -99,6 +99,20 @@ subroutine K_observables( W ) ! l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum ! + ! Now fix BSE_prop string + ! + BSE_prop="" + if(l_BS_abs) BSE_prop=trim(BSE_prop)//'abs ' + if(l_BS_jdos) BSE_prop=trim(BSE_prop)//'jdos ' + if(l_BS_dichroism) BSE_prop=trim(BSE_prop)//'dich ' + if(l_BS_kerr) BSE_prop=trim(BSE_prop)//'kerr ' + if(l_BS_kerr_asymm) BSE_prop=trim(BSE_prop)//'asymm ' + if(l_BS_anomalous_Hall) BSE_prop=trim(BSE_prop)//'anHall ' + if(l_BS_photolum) BSE_prop=trim(BSE_prop)//'photolum ' + if(l_BS_magnons) BSE_prop=trim(BSE_prop)//'magn ' + if(l_BS_esort) BSE_prop=trim(BSE_prop)//'esrt ' + if(l_BS_trace) BSE_prop=trim(BSE_prop)//'trace ' + ! ! Solver Logicals !================= run_Diago = STRING_match(BSS_mode,'d') From f91eb0c831973a5b08a47a6d578ee741d16abdf4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 16:42:33 +0200 Subject: [PATCH 0652/1367] Version 5.2.0, Revision 22696, Hash 5ed959707 MODIFIED * include/version/version.m4 bse/K_observables.F interface/INIT_load.F setup/setup.F Changes: - Few small changes Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_observables.F | 22 +++++++++++----------- src/interface/INIT_load.F | 2 +- src/setup/setup.F | 3 ++- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 17e402353b..46fc10ea3b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22695 h.c8a6a0a5a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22696 h.5ed959707, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22695" -SHASH="c8a6a0a5a" +SREVISION="22696" +SHASH="5ed959707" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 6483ed2811..c691489a70 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -76,7 +76,7 @@ subroutine K_observables( W ) call warning(" n_sp_pol=2 and magnons requested. Spin flip BSE only is computed") endif if (l_BS_kerr) then - call parser('AnHall',l_BS_anomalous_Hall) + if(.not.l_BS_anomalous_Hall) call parser('AnHall',l_BS_anomalous_Hall) BS_dip_size=2 l_BS_abs=.TRUE. endif @@ -102,16 +102,16 @@ subroutine K_observables( W ) ! Now fix BSE_prop string ! BSE_prop="" - if(l_BS_abs) BSE_prop=trim(BSE_prop)//'abs ' - if(l_BS_jdos) BSE_prop=trim(BSE_prop)//'jdos ' - if(l_BS_dichroism) BSE_prop=trim(BSE_prop)//'dich ' - if(l_BS_kerr) BSE_prop=trim(BSE_prop)//'kerr ' - if(l_BS_kerr_asymm) BSE_prop=trim(BSE_prop)//'asymm ' - if(l_BS_anomalous_Hall) BSE_prop=trim(BSE_prop)//'anHall ' - if(l_BS_photolum) BSE_prop=trim(BSE_prop)//'photolum ' - if(l_BS_magnons) BSE_prop=trim(BSE_prop)//'magn ' - if(l_BS_esort) BSE_prop=trim(BSE_prop)//'esrt ' - if(l_BS_trace) BSE_prop=trim(BSE_prop)//'trace ' + if(l_BS_abs) BSE_prop=trim(BSE_prop)//' abs' + if(l_BS_jdos) BSE_prop=trim(BSE_prop)//' jdos' + if(l_BS_dichroism) BSE_prop=trim(BSE_prop)//' dich' + if(l_BS_kerr) BSE_prop=trim(BSE_prop)//' kerr' + if(l_BS_kerr_asymm) BSE_prop=trim(BSE_prop)//' asymm' + if(l_BS_anomalous_Hall) BSE_prop=trim(BSE_prop)//' anHall' + if(l_BS_photolum) BSE_prop=trim(BSE_prop)//' photolum' + if(l_BS_magnons) BSE_prop=trim(BSE_prop)//' magn' + if(l_BS_esort) BSE_prop=trim(BSE_prop)//' esrt' + if(l_BS_trace) BSE_prop=trim(BSE_prop)//' trace' ! ! Solver Logicals !================= diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index aa6f7375d9..ba7aadb462 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -311,7 +311,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'NoCondSumRule' ,'[BSE/X] Do not impose the conductivity sum rule in velocity gauge',verb_level=V_resp) call it('f',defs,'MetDamp' , '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) - call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/magn/dich/photolum/esrt',BSE_prop) + call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt',BSE_prop) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',& & K_INV_EPS%PERT_FULL_ratio) diff --git a/src/setup/setup.F b/src/setup/setup.F index 52c3c99ceb..72eb6ae824 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -258,7 +258,8 @@ subroutine setup(en,q,Xen,Ken,k,Xk) call G_shells_finder() ! if ( wf_ng > maxval(wf_igk) ) then - call warning("wf_ng > maxval(wf_igk), probably because FFTGvecs in input. Reducing it") + call msg("r","wf_ng > maxval(wf_igk), likely because FFTGvecs was set in input.") + call msg("rn","Reducing wf_ng from "//trim(intc(wf_ng))//" to "//trim(intc(maxval(wf_igk)))) wf_ng=maxval(wf_igk) endif ! From f5f859663ce382f6c596b0281a261da765b46908 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 17:54:21 +0200 Subject: [PATCH 0653/1367] Version 5.2.0, Revision 22697, Hash f91eb0c83 MODIFIED * include/version/version.m4 bse/K_dipoles.F interface/INIT_load.F modules/SET_defaults.F modules/mod_BS.F modules/mod_BS_solvers.F output/X_OUTPUT_messages.F Changes: - [yambo] Dipoles geometry restored to version of bug-fixes Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_dipoles.F | 37 ++++++++++++++++++++++++---------- src/interface/INIT_load.F | 3 ++- src/modules/SET_defaults.F | 3 ++- src/modules/mod_BS.F | 1 + src/modules/mod_BS_solvers.F | 5 +++-- src/output/X_OUTPUT_messages.F | 4 +++- 7 files changed, 40 insertions(+), 19 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 46fc10ea3b..0797c09c2f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22696 h.5ed959707, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22697 h.f91eb0c83, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22696" -SHASH="5ed959707" +SREVISION="22697" +SHASH="f91eb0c83" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index d54ddd2a2f..5c10278dcb 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -29,22 +29,23 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) use vec_operate, ONLY:v_norm use R_lattice, ONLY:bz_samp,q0_def_norm,qindx_X use stderr, ONLY:intc + use com, ONLY:msg use wave_func, ONLY:WF use interfaces, ONLY:WF_load,WF_free use electrons, ONLY:levels,spin use X_m, ONLY:global_gauge use DIPOLES, ONLY:DIPOLE_t,DIP_alloc,DIP_rotated - use BS_solvers, ONLY:BSS_Vnl_included,BSS_Q_dir,BSS_E_dir + use BS_solvers, ONLY:BSS_Vnl_included,BSS_Q_dir,BSS_E_dir,BSS_P_dir use BS, ONLY:BS_T_grp,BS_K_coupling,BS_nT_grps,BSE_L_kind,BS_bands,& & BS_dip_size,l_BS_trace,BS_n_eh_spaces,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BS_field_direction,l_BS_ares_from_res +& BSE_dipole_geometry,BS_field_direction,l_BS_ares_from_res use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& & PAR_COM_Xk_ibz_INDEX use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use timing_m, ONLY:timing - use vec_operate, ONLY:cross_product + use vec_operate, ONLY:v_rotate,cross_product ! #include ! @@ -86,21 +87,35 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) ! if (iq==1) then ! - ! Directions for the external field + BSS_P_dir=cross_product(BSS_Q_dir,BSS_E_dir) ! - BS_field_direction(:,1)=BSS_E_dir - BS_field_direction(:,2)=cross_product(BSS_Q_dir,BSS_E_dir) - BS_field_direction(:,3)=BSS_Q_dir + if (trim(BSE_dipole_geometry)/='none'.and.l_BS_kerr) then + BSS_P_dir=0._SP + call v_rotate(trim(BSE_dipole_geometry),-pi/2._SP,BSS_E_dir,v_out=BSS_P_dir) + geometry_ok=abs(v_norm(BSS_P_dir)-1._SP)<1.E-5_SP .and. & + & abs(dot_product(BSS_E_dir,BSS_Q_dir))<1.E-5_SP + if ( .not. geometry_ok) call error(" Field direction and BSEdips do not agree") + call msg("r"," BSEdips set in input. This imposes the propagation direction") + BSS_Q_dir=-cross_product(BSS_E_dir,BSS_P_dir) + endif ! geometry_ok=abs(dot_product(BSS_E_dir,BSS_Q_dir))<1.E-5_SP ! if ( l_BS_trace .and. .not. geometry_ok ) then - call warning(" Propagation direction not ortogonal to field polarization. Setting z for propagation and x-y for polarization") - BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) - BS_field_direction(:,2)=(/0._SP,1._SP,0._SP/) - BS_field_direction(:,3)=(/0._SP,0._SP,1._SP/) + call warning(" Propagation direction not ortogonal to field polarization") + call warning(" Setting z for propagation and x-y for polarization") + BSS_E_dir=(/1._SP,0._SP,0._SP/) + BSS_P_dir=(/0._SP,1._SP,0._SP/) + BSS_Q_dir=(/0._SP,0._SP,1._SP/) + if (trim(BSE_dipole_geometry)/='none'.and.l_BS_kerr) BSE_dipole_geometry="xy" endif ! + ! Directions for the external field + ! + BS_field_direction(:,1)=BSS_E_dir ! external field + BS_field_direction(:,2)=BSS_P_dir ! induced polarization + BS_field_direction(:,3)=BSS_Q_dir ! field propagation direction + ! if (trim(global_gauge)=='length' ) BS_field_direction=BS_field_direction*q0_def_norm ! endif diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index ba7aadb462..6b2bb052e3 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -49,7 +49,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & bz_samp,RIM_ng,RIM_epsm1,RIM_id_epsm1_reference,& & RIM_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,& -& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode +& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,& & BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& & BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig,Haydock_iterMAX @@ -312,6 +312,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'MetDamp' , '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt',BSE_prop) + call it(defs,'BSEdips', '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',& & K_INV_EPS%PERT_FULL_ratio) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 4c14ff6a01..1734771045 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -63,7 +63,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use wave_func, ONLY:wf_ng,wf_norm_test,wf_nb_io,wf_nb_io_groups,WF,WF_buffer,WF_buffered_IO,rho_map_thresh use FFT_m, ONLY:fft_dim_loaded,fft_size,fft_dim,fft_multiplier use IO_m, ONLY:io_reset,max_io_units,serial_number,frag_WF - use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,BSS_E_dir,BSS_Q_dir,& + use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,BSS_P_dir,BSS_E_dir,BSS_Q_dir,& & Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,& & BSS_damp_reference,BSS_Vnl_included,BSS_uses_GreenF,BSS_inversion_mode,& & BSS_perturbative_width,K_INV_EPS,K_INV_PL,K_INV_PI_PH @@ -469,6 +469,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) BSS_er=(/0._SP,10._SP/)/HA2EV BSS_dr=0.1_SP/HA2EV BSS_E_dir=(/1._SP,0._SP,0._SP/) + BSS_P_dir=(/0._SP,1._SP,0._SP/) BSS_Q_dir=(/0._SP,0._SP,1._SP/) BSS_uses_DbGd=.FALSE. BSS_damp_reference=0._SP diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index d155e0e85a..5f026af150 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -47,6 +47,7 @@ module BS character(schlen) :: BSE_L_kind character(schlen) :: BSE_mode character(schlen) :: BSE_prop + character(schlen) :: BSE_dipole_geometry="none" character(schlen) :: BSK_mode character(schlen) :: BSK_IO_mode ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 7920c6f710..e15153c1b7 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -74,8 +74,9 @@ module BS_solvers real(SP) :: BSS_dr(2) real(SP) :: BSS_damp_reference real(SP) :: BSS_q0(3) - real(SP) :: BSS_E_dir(3) - real(SP) :: BSS_Q_dir(3) + real(SP) :: BSS_E_dir(3) ! Electric field + real(SP) :: BSS_P_dir(3) ! Induced polarization + real(SP) :: BSS_Q_dir(3) ! Field propagation direction logical :: BSS_uses_DbGd logical :: BSS_Vnl_included logical :: BSS_uses_GreenF diff --git a/src/output/X_OUTPUT_messages.F b/src/output/X_OUTPUT_messages.F index 237a029324..b612653489 100644 --- a/src/output/X_OUTPUT_messages.F +++ b/src/output/X_OUTPUT_messages.F @@ -29,6 +29,7 @@ subroutine X_OUTPUT_messages(iq,ig,Vnl,GF,ordering,Q_plus_G,MORE) use X_m, ONLY:global_gauge,X_obs,alpha_dim,N_X_obs,X_ng use global_XC, ONLY:X_E_xc_string use stderr, ONLY:intc,STRING_match + use BS, ONLY:BSE_dipole_geometry ! implicit none ! @@ -55,7 +56,8 @@ subroutine X_OUTPUT_messages(iq,ig,Vnl,GF,ordering,Q_plus_G,MORE) if (iq> 1) call msg("o "//trim(X_obs(it)%prefix),trim(wk),Q_plus_G,INDENT=0,after_msg="[iku]") if (STRING_match(X_obs(it)%what,"off").or.STRING_match(X_obs(it)%what,"beta").or.& & STRING_match(X_obs(it)%what,"moke")) then - ! TO DO: add info on BSS_E_dir and BSS_Q_dir + call msg("o "//trim(X_obs(it)%prefix),com_compose_msg(pre="# ",body="[DIP] Rotation plane"),& +& trim(BSE_dipole_geometry),INDENT=0) endif else wk=com_compose_msg(pre='# ',body=trim(X_obs(it)%title)//' @Q('//trim(intc(iq))//') + G('//trim(intc(ig))//')') From 181f9ddcb4a83224babdd5b8bf2bfea6141c80da Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 Jun 2023 18:01:12 +0200 Subject: [PATCH 0654/1367] Version 5.2.0, Revision 22698, Hash f5f859663 MODIFIED * include/version/version.m4 bse/K_dipoles.F Bugs: - Fixed typo Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_dipoles.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0797c09c2f..a63ea4db7d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22697 h.f91eb0c83, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22698 h.f5f859663, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22697" -SHASH="f91eb0c83" +SREVISION="22698" +SHASH="f5f859663" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 5c10278dcb..526209d40c 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -93,7 +93,7 @@ subroutine K_dipoles(iq,Ken,Xk,Dip) BSS_P_dir=0._SP call v_rotate(trim(BSE_dipole_geometry),-pi/2._SP,BSS_E_dir,v_out=BSS_P_dir) geometry_ok=abs(v_norm(BSS_P_dir)-1._SP)<1.E-5_SP .and. & - & abs(dot_product(BSS_E_dir,BSS_Q_dir))<1.E-5_SP + & abs(dot_product(BSS_E_dir,BSS_P_dir))<1.E-5_SP if ( .not. geometry_ok) call error(" Field direction and BSEdips do not agree") call msg("r"," BSEdips set in input. This imposes the propagation direction") BSS_Q_dir=-cross_product(BSS_E_dir,BSS_P_dir) From fe04f75dfbe42f8d5c6224a72f81fa573f0ebc11 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 26 Jun 2023 21:31:31 +0200 Subject: [PATCH 0655/1367] Version 5.2.0, Revision 22699, Hash 181f9ddcb MODIFIED * include/version/version.m4 dipoles/RT_project.dep interface/INIT_activate.F Bugs: - [yambo] BSEdips activation restored Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/dipoles/RT_project.dep | 1 - src/interface/INIT_activate.F | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index a63ea4db7d..577fa2fc69 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22698 h.f5f859663, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22699 h.181f9ddcb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22698" -SHASH="f5f859663" +SREVISION="22699" +SHASH="181f9ddcb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/RT_project.dep b/src/dipoles/RT_project.dep index a375ef9236..ed4c8d35ce 100644 --- a/src/dipoles/RT_project.dep +++ b/src/dipoles/RT_project.dep @@ -1,6 +1,5 @@ DIPOLE_IO.o DIPOLE_driver.o - DIPOLE_orbital_magnetization.o DIPOLE_p_matrix_elements.o DIPOLE_shifted_grids.o DIPOLE_transverse.o diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 48b3902d2b..da82915fbd 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -283,7 +283,7 @@ subroutine INIT_activate() ! call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps BLongDir QPropDir') !call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps EFieldDir QPropDir') - call initactivate(1,'BSEprop') + call initactivate(1,'BSEprop BSEdips') ! ! Special case: the BSE_Fxc kernel has been constructed ! Thus I move to g-space to solve the Dyson equation From ffd33a7d65fbb9d041fd05201f0ac3795b36bbff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 Jun 2023 00:25:57 +0200 Subject: [PATCH 0656/1367] Version 5.1.0, Revision 22737, Hash a0d25330b MODIFIED * include/version/version.m4 allocations/X_ALLOC_elemental.F bse/K_IP_sort.F Bugs: - [yambo] FEw fixes Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/allocations/X_ALLOC_elemental.F | 1 + src/bse/K_IP_sort.F | 9 +++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 855f0543ae..4fdf247ace 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22215 h.ca8b389c9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22737 h.a0d25330b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22215" -SHASH="ca8b389c9" +SREVISION="22737" +SHASH="a0d25330b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 43e7a8585d..b6a73ecc81 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -112,6 +112,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) endif if (STRING_match(WHAT,"BS_E_SORTED").or.STRING_match(WHAT,"ALL")) then YAMBO_FREE(BS_E_sorted) + YAMBO_FREE(BS_E_sorted_indx) endif if (STRING_match(WHAT,"FXC").or.STRING_match(WHAT,"ALL")) then YAMBO_FREE(X_fxc) diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index 4af8c725e3..10e8533f64 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -39,6 +39,7 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! ! Work space ! + logical :: l_print_warning integer :: EDIM,Ntmp,i_VAR,i_cv,i_grp,n_deg_grp real(SP), allocatable :: vR(:) integer, allocatable :: sort_indx(:),first_el(:),n_of_el(:) @@ -72,14 +73,16 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! Threshold is 1meV call degeneration_finder(vR(:EDIM),EDIM,first_el,n_of_el,n_deg_grp,0.001_SP/HA2EV,Include_single_values=.TRUE.) ! + l_print_warning=.false. + ! do i_VAR=1,n_BS_E_sorted BS_E_sorted(:,i_VAR,1)=cZERO do i_grp=1,n_deg_grp if(i_grp>EDIM/Ntmp) cycle ! if(i_VAR==1) then - if (n_of_el(i_grp)>18) call warning("More than 18 degenerate transitions detected. Printing only first 18") - do i_cv=first_el(i_grp),first_el(i_grp)+n_of_el(i_grp)-1 + if (n_of_el(i_grp)>18) l_print_warning=.true. + do i_cv=first_el(i_grp),first_el(i_grp)+min(18,n_of_el(i_grp))-1 BS_E_sorted_indx(i_grp,i_cv-first_el(i_grp)+1,1:5)=vI(sort_indx(i_cv),:) enddo endif @@ -97,6 +100,8 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! enddo ! + if (l_print_warning) call warning("More than 18 degenerate transitions detected. Printing only first 18") + ! ! Free deallocate(first_el) deallocate(n_of_el) From 0038d4d1fa390e01813dabc5310f2252a2669644 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 Jun 2023 15:53:40 +0200 Subject: [PATCH 0657/1367] Version 5.1.0, Revision 22691, Hash 2a2b94e53 MODIFIED * include/version/version.m4 modules/mod_fields.F Bugs: - [yambo] Fixed definition of small_A (order=2) for fields without a defined width Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/modules/mod_fields.F | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 2581759cc5..58ad8eadd2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22537 h.f2c02d810, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22691 h.2a2b94e53, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22537" -SHASH="f2c02d810" +SREVISION="22691" +SHASH="2a2b94e53" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 477af47f8b..cce6265503 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -181,8 +181,13 @@ function small_a(T,E_field,order,envelop_only) sigma=E_field%width chirp=E_field%chirp ! - s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) - c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) + s_sigma_chirp=cZERO + c_sigma_chirp=cZERO + ! + if (abs(sigma)>0._SP .or. abs(chirp)>0._SP) then + s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) + c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) + endif ! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) ! From 2cc3475cf3b3b887a27b5cba1937c4ad729220f7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 Jun 2023 23:32:29 +0200 Subject: [PATCH 0658/1367] Version 5.1.0, Revision 22747, Hash 88b9c6509 MODIFIED * configure include/version/version.m4 Changes: - [configure] regenerated after merge Patch sent by: Davide Sangalli --- configure | 45 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 8e2e2abfef..e341e11317 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.22214 h.aa5047c1f. +# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.22541 h.3f1e06ace. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.22214 h.aa5047c1f' -PACKAGE_STRING='Yambo 5.1.0 r.22214 h.aa5047c1f' +PACKAGE_VERSION='5.1.0 r.22541 h.3f1e06ace' +PACKAGE_STRING='Yambo 5.1.0 r.22541 h.3f1e06ace' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -716,6 +716,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -896,6 +897,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -955,6 +958,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1607,7 +1611,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.22214 h.aa5047c1f to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.22541 h.3f1e06ace to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1673,7 +1677,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.22214 h.aa5047c1f:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.22541 h.3f1e06ace:";; esac cat <<\_ACEOF @@ -1686,6 +1690,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1883,7 +1888,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.22214 h.aa5047c1f +Yambo configure 5.1.0 r.22541 h.3f1e06ace generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2512,7 +2517,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.22214 h.aa5047c1f, which was +It was created by Yambo $as_me 5.1.0 r.22541 h.3f1e06ace, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3270,8 +3275,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22214" -SHASH="aa5047c1f" +SREVISION="22541" +SHASH="3f1e06ace" @@ -3452,6 +3457,20 @@ if test x"$enable_dp" = "xyes"; then def_dp="-D_DOUBLE"; build_precision="double +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15962,6 +15981,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16144,6 +16166,7 @@ fi + # @@ -17101,7 +17124,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.22214 h.aa5047c1f, which was +This file was extended by Yambo $as_me 5.1.0 r.22541 h.3f1e06ace, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17165,7 +17188,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.1.0 r.22214 h.aa5047c1f +Yambo config.status 5.1.0 r.22541 h.3f1e06ace configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9215b8be02..4ee0b8912e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22541 h.3f1e06ace, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22747 h.88b9c6509, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22541" -SHASH="3f1e06ace" +SREVISION="22747" +SHASH="88b9c6509" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From ae6d2433ab888ec3a0258f2699eb9f3a13872966 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 29 Jun 2023 17:49:01 +0200 Subject: [PATCH 0659/1367] Version 5.1.0, Revision 22697, Hash 4545c0777 MODIFIED * include/version/version.m4 modules/SET_defaults.F Changes: - [yambo_rt/yambo_nl] changed default times for IO, output, and restart Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/modules/SET_defaults.F | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9215b8be02..8f7d4d96f9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22541 h.3f1e06ace, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22697 h.4545c0777, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22541" -SHASH="3f1e06ace" +SREVISION="22697" +SHASH="4545c0777" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 551cdfa01e..fe0c17f04a 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -663,11 +663,11 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! ! RT_ctl ! - OBS_RT_IO_t%INTERVAL_time_INPUT =2._SP*FS2AUT - CARR_RT_IO_t%INTERVAL_time_INPUT =2._SP*FS2AUT - OUTPUT_RT_IO_t%INTERVAL_time_INPUT =5._SP*FS2AUT - Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =1._SP*FS2AUT - Vbands_RT_IO_t%INTERVAL_time_INPUT =1._SP*FS2AUT + OBS_RT_IO_t%INTERVAL_time_INPUT =2.0_SP*FS2AUT + CARR_RT_IO_t%INTERVAL_time_INPUT =2.0_SP*FS2AUT + OUTPUT_RT_IO_t%INTERVAL_time_INPUT =0.1_SP*FS2AUT + Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =5.0_SP*FS2AUT + Vbands_RT_IO_t%INTERVAL_time_INPUT =5.0_SP*FS2AUT SAVE_G_history=.FALSE. SAVE_Vb_history=.FALSE. RT_NAN_found =.FALSE. From 2ffb2a964d67ffff83bec74d43e66feb6dbb0915 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 29 Jun 2023 22:41:04 +0200 Subject: [PATCH 0660/1367] Version 5.1.0, Revision 22748, Hash 2cc3475cf MODIFIED * include/version/version.m4 bse/K_kernel.F Changes: - few small adjustments to report Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++--- src/bse/K_kernel.F | 49 +++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 4ee0b8912e..a804c92d8a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22747 h.88b9c6509, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22748 h.2cc3475cf, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22747" -SHASH="88b9c6509" +SREVISION="22748" +SHASH="2cc3475cf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 33ec385775..32b3b4e039 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -153,9 +153,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (BS_res_K_corr.or.BS_res_K_exchange) section_title=trim(section_title)//")" ! if (BS_cpl_K_corr.or.BS_cpl_K_exchange) section_title=trim(section_title)//" (Coupling" - !if (BS_K_is_ALDA.and.BS_cpl_K_exchange) section_title=trim(section_title)//" ALDA" - !if (BS_cpl_K_corr ) section_title=trim(section_title)//" CORRRELATION" - !if (BS_cpl_K_exchange) section_title=trim(section_title)//" EXCHANGE" + if (BS_K_is_ALDA.and.BS_cpl_K_exchange) section_title=trim(section_title)//" ALDA" + if (BS_cpl_K_corr ) section_title=trim(section_title)//" CORRRELATION" + if (BS_cpl_K_exchange) section_title=trim(section_title)//" EXCHANGE" if (BS_cpl_K_corr.or.BS_cpl_K_exchange) section_title=trim(section_title)//")" ! endif @@ -168,21 +168,25 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) O_ng_exch =maxval(qindx_X(iq,:,2)) O_ng_shift=O_ng_exch ! - l_bs_exch=any((/BS_res_K_exchange,BS_cpl_K_exchange/)).or.l_bs_fxc.and..not.(l_BS_magnons.and.n_sp_pol==2) - l_bs_corr=any((/BS_res_K_corr,BS_cpl_K_corr/)) .and. .not.l_bs_fxc + l_bs_exch=(any((/BS_res_K_exchange,BS_cpl_K_exchange/)).or.l_bs_fxc).and..not.(l_BS_magnons.and.n_sp_pol==2) + l_bs_corr=(any((/BS_res_K_corr,BS_cpl_K_corr/)) .and. .not.l_bs_fxc) ! - ! I load the WFs for exachange in a loop in two cases - ! - q=0 and more than one k-point. - ! In this case it is the default, unless I specify workload in the parallel mode - ! - q/=0 - ! In this case it is activated only if I specify KQmemory in the parallel mode - ! The code would work fine also in this case, however it would require continuous loading and unloading of WFs. - ! To avoid this one would need to move the loop over i_star in K_Transitions_setup outside the - ! loop over ic and iv (see related comment in K_Transiontion_setup.F) - l_bs_exch_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and..not.trim(PARALLEL_default_mode)=="workload") .or. & - & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory") - ! - if (l_bs_exch) call msg('r','[BSE] Exchange components ',BS_n_g_exch) + if (l_bs_exch) then + ! + call msg('r','[BSE] Exchange components ',BS_n_g_exch) + ! + ! I load the WFs for exachange in a loop in two cases + ! - q=0 and more than one k-point. + ! In this case it is the default, unless I specify workload in the parallel mode + ! - q/=0 + ! In this case it is activated only if I specify KQmemory in the parallel mode + ! The code would work fine also in this case, however it would require continuous loading and unloading of WFs. + ! To avoid this one would need to move the loop over i_star in K_Transitions_setup outside the + ! loop over ic and iv (see related comment in K_Transiontion_setup.F) + l_bs_exch_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and..not.trim(PARALLEL_default_mode)=="workload") .or. & + & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory") + ! + endif ! if (l_bs_corr) then O_ng=G_m_G_maxval @@ -293,10 +297,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) l_load_kernel=.true. l_write_kernel=.false. ! - do iHxc=1,3 - ! - if (iHxc==1) BS_blk_done=.false. + BS_blk_done=.false. ! + do iHxc=1,3 + ! if ((.not.l_bs_exch).and.iHxc==1) cycle ! if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle @@ -309,8 +313,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) if (iHxc==2) NG=(/BS_n_g_fxc, 1/) ! < WARNIGN: 2021/03/19 - ! The following has been changed to the commente line - ! However the commented line maybe needed for internal consistency. Otherwise the output of many BSE tests could change + ! The following has been changed to the commented line + ! However the commented line maybe needed for internal consistency. + ! Otherwise the output of many BSE tests could change if (iHxc==3) NG=(/O_ng,O_ng_shift/) !if (iHxc==3) NG(2)=O_ng_shift ! WARNING > From ab9db72b29b8e6946e97bfea2f3cb9e7462c9781 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 3 Jul 2023 14:34:55 +0200 Subject: [PATCH 0661/1367] Version 5.1.0, Revision 22749, Hash 2ffb2a964 MODIFIED * include/version/version.m4 bse/K_kernel.F Bugs: - [yambo] Fixed issue with parallel I/O of BSE kernel and l_BS_ares_from_res = .false. Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index a804c92d8a..d04ed6baff 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22748 h.2cc3475cf, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22749 h.2ffb2a964, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22748" -SHASH="2cc3475cf" +SREVISION="22749" +SHASH="2ffb2a964" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 32b3b4e039..e59654a590 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -416,7 +416,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! enddo ! - call live_timing() + if (m_steps>0) call live_timing() ! call msg("s","Kernel loaded percentual ",real(n_steps-m_steps,SP)/real(n_steps,SP)*100._SP,'[%]') ! @@ -458,7 +458,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! - if (.not.trim(BS_blk(i_block)%mode)=="C") then + if (.not.trim(mode_now)=="C") then if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) if (iHxc==2) l_write_kernel=.not. l_bs_corr if (iHxc==3) l_write_kernel=.true. @@ -540,7 +540,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& - & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) if (H_pos(1)>H_pos(2)) cycle ! i_k_bz = BS_T_grp(i_Tgrp_k)%table(i_Tk,1) @@ -736,7 +736,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! enddo block_loop ! - if (n_steps>0) call live_timing( ) + if (m_steps>0) call live_timing( ) ! ! GLOBAL CLEANING !================= From e0d27e459a9bf07958ab65d28045d6b7ab4987e7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 4 Jul 2023 15:08:12 +0200 Subject: [PATCH 0662/1367] Version 5.1.0, Revision 22750, Hash ab9db72b2 MODIFIED * include/version/version.m4 bse/K_kernel.F Bugs: - [yambo] Fixed issue with parallel I/O of BSE kernel and l_BS_ares_from_res = .false. Previous fix was not correct Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 28 +++++++++++++--------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d04ed6baff..bb1b947b5b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22749 h.2ffb2a964, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22750 h.ab9db72b2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22749" -SHASH="2ffb2a964" +SREVISION="22750" +SHASH="ab9db72b2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index e59654a590..5340d5846a 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -458,18 +458,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! - if (.not.trim(mode_now)=="C") then - if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) - if (iHxc==2) l_write_kernel=.not. l_bs_corr - if (iHxc==3) l_write_kernel=.true. - else - if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.BS_cpl_K_corr) - if (iHxc==2) l_write_kernel=.not. BS_cpl_K_corr - if (iHxc==3) l_write_kernel=.true. - ! - if (iHxc==3.and..not.BS_cpl_K_corr) cycle - ! - endif + if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) + if (iHxc==2) l_write_kernel=.not. l_bs_corr + if (iHxc==3) l_write_kernel=.true. ! if (BS_blk_done(i_block)) then #if defined _PAR_IO @@ -486,6 +477,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (BS_LiveTiming_steps>= 0) i_steps=BS_Block_size(i_block) if (BS_LiveTiming_steps==-1) i_steps=1 ! + ! Nothing to do, just write the kernel to disk + if (trim(BS_blk(i_block)%mode)=="C" .and. iHxc==3 .and. .not.BS_cpl_K_corr) then + BS_blk(i_block)%done(:,:)="t" + if(BS_K_cutoff>0._SP) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) + goto 100 + endif + ! i_Tgrp_k =BS_blk(i_block)%iT_k i_Tgrp_p =BS_blk(i_block)%iT_p i_Tgrp_k_st=BS_blk(i_block)%iT_k_st @@ -667,7 +665,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'RES') ! ! Correlations - if (iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_c_p,i_kmq_s,i_kp_mq_s,i_v_k,i_v_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) @@ -685,7 +683,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'CPL') ! ! Correlations - if (BS_cpl_K_corr.and.iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & + if (iHxc==3) H_c=K_correlation_kernel(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_v_p,i_kmq_s,i_kp_mq_s,i_v_k,i_c_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_v,i_k_sp_pol_v,i_p_sp_pol_c, & & iq_W,iq_W_s,ig_W,i_k_s_m1,iq_W_s_mq,ig_W_mq,i_kmq_s_m1) @@ -722,7 +720,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if(iHxc==3) call BS_oscillators_free(0,i_block) ! - if(l_write_kernel) then +100 if(l_write_kernel) then #if defined _PAR_IO call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") From 756db956173d857cee8b5325e12a62fa8d124dc7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Jul 2023 17:18:32 +0200 Subject: [PATCH 0663/1367] Version 5.1.0, Revision 22698, Hash ae6d2433a MODIFIED * include/version/version.m4 ypp/real_time/RT_OBSERVABLES_IO_path.F Bugs: - [ypp_rt] Fixed 2 bugs: a) if in the probes folders list .. and . where nearby, only one ofthe two was removed by the list b) if in the probes folders list the folder matching the jobname was coming right before the pump folder then the pump folder was erased from the list. The coding did not make much sense since i_f was increased and later also nf was decreased. Only one of the two actions should be done Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- ypp/real_time/RT_OBSERVABLES_IO_path.F | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 8f7d4d96f9..38589726ba 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22697 h.4545c0777, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22698 h.ae6d2433a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22697" -SHASH="4545c0777" +SREVISION="22698" +SHASH="ae6d2433a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index 4dab7ba51b..21f336d400 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -73,12 +73,13 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! Remove "." and ".." ! i_f=1 - do while (i_f0)) then N_probes =N_probes+1 i_f=i_f+1 + cycle else if ( index(trim(Probe_path(i_f)),trim(Pump_Keyword))>0 ) then Pump_path=Probe_path(i_f) N_pumps=1 From 322302e26d41fcda2535c251234278aa0a169862 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 Jul 2023 13:23:14 +0200 Subject: [PATCH 0664/1367] Version 5.1.0, Revision 22729, Hash 8e981bbeb MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F Changes: - [yambo_rt/yambo_nl] Added consistency check for BSE parameters when when computing collisions from BSE kernel Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 8 +++++--- src/collisions/COLLISIONS_eval.F | 33 ++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index a2d17f7cc4..7626aeeacb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22242 h.714e321a6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22729 h.8e981bbeb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22242" -SHASH="714e321a6" +SREVISION="22729" +SHASH="8e981bbeb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 8f567fd7cf..b89756c804 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -128,11 +128,13 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) if (COLLISIONS_HXC_MB ) N_g_vecs_X = QP_ng_Sx if (l_compute_screening ) N_g_vecs_C = QP_ng_Sc ! - call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_H,"SH") - call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_X,"SF") + if (IO_BS_err/=0.or.(.not.COLLISIONS_CV_only)) then + call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_H,"SH") + call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_X,"SF") + endif ! if(COLLISIONS_HXC_local) QP_ng_SH=N_g_vecs_H - if(COLLISIONS_HXC_MB) QP_ng_Sx=N_g_vecs_X + if(COLLISIONS_HXC_MB) QP_ng_Sx=N_g_vecs_X ! NG_max=maxval((/N_g_vecs_H,N_g_vecs_X,N_g_vecs_C/)) NG_XC =max(N_g_vecs_X,N_g_vecs_C) diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 969d86a83e..fa2b6d94fd 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -152,6 +152,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) if (IO_err_BS==0) then call set_BS_blks(Xk) call K_restart(1,X(2),ID_tmp,ID_tmp,ID_tmp,l_tmp) + call check_BS_parameters_consistency(Xk) call build_inverse_BS_eh_table(Xk) call build_BS_kpt_map(Xk) endif @@ -372,6 +373,38 @@ subroutine set_BS_blks(Xk) end subroutine set_BS_blks ! ! +subroutine check_BS_parameters_consistency(Xk) + ! + use R_lattice, ONLY:bz_samp + use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc + use BS, ONLY:BS_blk,BS_n_g_W,BS_n_g_exch,BS_K_dim + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + ! + integer :: i_H,BS_nk + ! + BS_nk=-1 + do i_H=1,2*BS_K_dim(1) + BS_nk = max(BS_blk(i_H)%table(1,1),BS_nk) + enddo + ! + if ( Xk%nbz/=BS_nk ) & + & call error(" Different number of k-points between bse kernel and SAVE folder") + ! + if (BS_n_g_exch/=QP_ng_SH) & + & call error(" Different cutoff between coll(hartree) and bse(exch)") + ! + if (BS_n_g_W /=QP_ng_Sx) & + & call error(" Different cutoff between coll(fock) and bse(direct)") + ! + if (BS_n_g_W /=QP_ng_Sc) & + & call error(" Different cutoff between coll(corr) and bse(direct)") + ! +end subroutine check_BS_parameters_consistency +! +! subroutine build_inverse_BS_eh_table(Xk) ! use electrons, ONLY:n_sp_pol From 9f309dff15ba73cf2b7b6813efa4379d223a399a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Jul 2023 00:34:58 +0200 Subject: [PATCH 0665/1367] Version 5.1.0, Revision 22730, Hash 322302e26 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Changes: - [yambo_rt] Few improvement into collisions generation from BSE kernel Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 7626aeeacb..29a084858a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22729 h.8e981bbeb, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22730 h.322302e26, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22729" -SHASH="8e981bbeb" +SREVISION="22730" +SHASH="322302e26" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index b89756c804..df8de591ce 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -111,8 +111,12 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) if (io_err<0) call error(' Incomplete and/or broken PPA/Static diel. fun. database') ! if (X%ng Date: Fri, 21 Jul 2023 09:54:39 +0200 Subject: [PATCH 0666/1367] Version 5.1.0, Revision 22731, Hash 9f309dff1 MODIFIED * include/version/version.m4 bse/K_restart.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F io_parallel/io_BS_PAR_block.F Changes: - [yambo_rt/yambo_nl] Conversion of collisions from BSE kernel: BS_blk%mat is allocated on the fly for each block to save memory. To check if this is not too slow. Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++-- src/bse/K_restart.F | 6 ++++ src/collisions/COLLISIONS_HXC.F | 60 +++++++++++++++++++++++++------ src/collisions/COLLISIONS_eval.F | 25 +++++++------ src/io_parallel/io_BS_PAR_block.F | 9 +++-- 5 files changed, 80 insertions(+), 26 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 29a084858a..ebfd537d29 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22730 h.322302e26, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22731 h.9f309dff1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22730" -SHASH="322302e26" +SREVISION="22731" +SHASH="9f309dff1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_restart.F b/src/bse/K_restart.F index 03bf6d8521..4abfa000d1 100644 --- a/src/bse/K_restart.F +++ b/src/bse/K_restart.F @@ -104,6 +104,11 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) timing_string="Loading BSE_done from compressed file" ID_now=ID_compr endif + if(l_eval_collisions) then + IO_mode="tableonly" + timing_string="Loading BSE table only" + ID_now=ID + endif if(n_BS_blks>0) call live_timing(trim(timing_string),n_BS_blks) do i_block=1,n_BS_blks call io_control(ACTION=RD,ID=ID_now) @@ -151,6 +156,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) endif ! call io_control(ACTION=IO_ACT,COM=REP,ID=ID_head) + if(l_eval_collisions) return call io_control(ACTION=RD_CL,COM=REP,ID=ID) if( l_BSE_kernel_complete) call io_BS_PAR_free(ID_head,ID,IO_mode,.true.) if(.not.l_BSE_kernel_complete) call io_BS_PAR_free(ID_head,ID,IO_mode,.false.) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index df8de591ce..dcabd18356 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) +subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! ! HXC collisions ! @@ -61,6 +61,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err) type(bz_samp) ::k,q,Xk type(X_t) ::X type(w_samp) ::Xw + integer ::ID_BS integer, intent(in) ::IO_BS_err ! ! Work Space @@ -413,9 +414,16 @@ subroutine map_BSE_to_HXC_collisions() use pars, ONLY:cI use BS, ONLY:BS_blk,BS_K_dim,BS_K_io_map use BS_solvers, ONLY:BSS_eh_table_m1 + use IO_int, ONLY:io_control + use IO_m, ONLY:RD ! complex(SP) :: M_ij - integer :: i_BSE,j_BSE,i_k_bz,i_p_bz + integer :: i_BSE,j_BSE,i_k_bz,i_p_bz,iB,iB_save,jB + logical :: l_conj,l_cI,l_m1 + ! + iB=-1 + iB_save=-1 + jB=-1 ! do i_p=1,Xk%nibz do i_mp=COLL_bands(1),COLL_bands(2) @@ -429,41 +437,68 @@ subroutine map_BSE_to_HXC_collisions() ! i_BSE=BSS_eh_table_m1(i_k_bz,i_m,i_n,i_sp,i_sp) j_BSE=BSS_eh_table_m1(i_p_bz,i_mp,i_np,i_sp,i_sp) - ! + ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! + l_cI=.false. + l_m1=.false. ! Resonant block - if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1) + if(j_BSE>=i_BSE) then; iB=i_BSE ; jB=j_BSE-i_BSE+1; l_conj=.false. ; endif ! Resonant is hermitian - if(j_BSE< i_BSE) M_ij= conjg(BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1)) + if(j_BSE< i_BSE) then; iB=j_BSE ; jB=i_BSE-j_BSE+1; l_conj=.true. ; endif ! else if(i_BSE<=BS_K_dim(1) .and. j_BSE>BS_K_dim(1)) then ! + l_cI=.true. + l_m1=.false. + l_conj=.false. ! Coupling block j_BSE=j_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij= BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1)*cI + if(j_BSE>=i_BSE) then ; iB=i_BSE+BS_K_dim(1) ; jB=j_BSE-i_BSE+1; endif ! Coupling is symmetric - if(j_BSE< i_BSE) M_ij= BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1)*cI + if(j_BSE< i_BSE) then ; iB=j_BSE+BS_K_dim(1) ; iB=i_BSE-j_BSE+1; endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! + l_cI=.true. + l_m1=.true. + l_conj=.true. ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE+BS_K_dim(1))%mat(1,j_BSE-i_BSE+1))*cI + if(j_BSE>=i_BSE) then; iB=i_BSE+BS_K_dim(1); jB=j_BSE-i_BSE+1; endif ! anti-Coupling is symmetric - if(j_BSE< i_BSE) M_ij=-conjg(BS_blk(j_BSE+BS_K_dim(1))%mat(1,i_BSE-j_BSE+1))*cI + if(j_BSE< i_BSE) then; iB=j_BSE+BS_K_dim(1); jB=i_BSE-j_BSE+1; endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then ! + l_cI=.false. + l_m1=.true. ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) j_BSE=j_BSE-BS_K_dim(1) - if(j_BSE>=i_BSE) M_ij=-conjg(BS_blk(i_BSE)%mat(1,j_BSE-i_BSE+1)) + if(j_BSE>=i_BSE) then; iB=i_BSE; jB=j_BSE-i_BSE+1; l_conj=.true.; endif ! anti-resonant is hermitian - if(j_BSE< i_BSE) M_ij= -BS_blk(j_BSE)%mat(1,i_BSE-j_BSE+1) + if(j_BSE< i_BSE) then; iB=j_BSE; jB=i_BSE-j_BSE+1; l_conj=.false.; endif ! endif ! + if(iB/=iB_save) then + if(iB_save/=-1) then + deallocate(BS_blk(iB_save)%mat) + deallocate(BS_blk(iB_save)%done) + endif + allocate(BS_blk(iB)%mat (BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + call io_control(ACTION=RD,ID=ID_BS) + call io_BS_PAR_block(1,iB,ID_BS,"matonly") + iB_save=iB + endif + ! + M_ij= BS_blk(iB)%mat(1,jB) + if(l_conj) M_ij= conjg(M_ij) + if(l_cI) M_ij= cI * M_ij + if(l_m1) M_ij= - M_ij + ! ! The occupation factor here is already contained in the density matrix ! HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=-M_ij/spin_occ @@ -472,6 +507,9 @@ subroutine map_BSE_to_HXC_collisions() enddo enddo ! + deallocate(BS_blk(iB_save)%mat) + deallocate(BS_blk(iB_save)%done) + ! end subroutine map_BSE_to_HXC_collisions ! subroutine compute_Hartree_collisions(cc_vv_only) diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index fa2b6d94fd..8300d723ec 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -52,7 +52,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use plasma, ONLY:EH_gas use frequency, ONLY:w_samp use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,io_COLLs,manage_action + use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,io_COLLs,manage_action use parallel_m, ONLY:PAR_IND_G_k,PAR_IND_Bp_mat,PAR_IND_Plasma use parallel_int, ONLY:PP_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:WF_free @@ -68,7 +68,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! WorkSpace ! logical :: l_collisions_from_bse,l_tmp - integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_tmp + integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr character(20) :: PAR_ch,FREE_ch ! integer, external :: io_BS_header @@ -146,12 +146,12 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! ! Check if I can use the BSE kernel for the collisions ! - call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,ID=ID_tmp) - IO_err_BS=io_BS_header(1,X(2),ID_tmp,"full") + call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,ID=ID_head) + IO_err_BS=io_BS_header(1,X(2),ID_head,"full") ! if (IO_err_BS==0) then call set_BS_blks(Xk) - call K_restart(1,X(2),ID_tmp,ID_tmp,ID_tmp,l_tmp) + call K_restart(1,X(2),ID_head,ID_mat,ID_cmpr,l_tmp) call check_BS_parameters_consistency(Xk) call build_inverse_BS_eh_table(Xk) call build_BS_kpt_map(Xk) @@ -161,7 +161,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! if (IO_err/=0) then ! - call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2),IO_err_BS) + call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2),IO_err_BS,ID_mat) ! ! COHSEX clean !-------------- @@ -171,6 +171,11 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! endif ! + if (l_use_Hxc_collisions.and.IO_err_BS==0) then + call io_control(ACTION=RD_CL,COM=REP,ID=ID_mat) + call io_BS_PAR_free(ID_head,ID_mat,"full",.true.) + endif + ! endif ! #if defined _QED @@ -358,10 +363,10 @@ subroutine set_BS_blks(Xk) enddo ! do iB=1,n_BS_blks - YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - BS_blk(iB)%mat=cZERO - BS_blk(iB)%done(:,:)="f" + !AMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + !allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + !BS_blk(iB)%mat=cZERO + !BS_blk(iB)%done(:,:)="f" if (BS_blk(iB)%coordinate(1)==BS_blk(iB)%coordinate(2)) then allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) bs_blk(iB)%table=0 diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index 1f19cdcab2..c7e31e131b 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -79,6 +79,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! BSK_IO_local=trim(STRING_remove(BSK_IO_mode,"norestart")) if(index(mode,"compressed")/=0) BSK_IO_local=trim(mode) + if(index(mode,"tableonly")/=0) BSK_IO_local=trim(mode) ! select case(trim(BSK_IO_local)) case("1D_linear","compressed_head","compressed_mat") @@ -193,7 +194,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! Write one block at a time in 2D ! call io_variable_bulk(ID, VAR_IDs(1), C2=BS_blk(i_block)%mat , IPOS=(/1,x1,x2/) ) - if(read_is_on(ID)) then + if(read_is_on(ID) .and. .not.trim(mode)=="matonly") then do i2=1,BS_blk(i_block)%size(2) do i1=1,BS_blk(i_block)%size(1) if(BS_blk(i_block)%mat(i1,i2)==YAMBO_CMPLX_NO_FILL) cycle @@ -202,9 +203,13 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) enddo endif ! + case("tableonly") + ! + ! Skip I/O of BS_mat + ! end select ! - if (x1==x2) then + if (x1==x2 .and. .not.trim(mode)=="matonly") then if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) call C_F_POINTER(C_LOC(BS_blk(i_block)%table),tmp_link,(/5,BS_blk(i_block)%size(1)/)) call io_variable_bulk(ID, ID_table, I2=tmp_link, IPOS=(/1,x1/) ) From 04c0f2e85f806e66ce03e2b203e228787dc9a316 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 21 Jul 2023 15:26:45 +0200 Subject: [PATCH 0667/1367] Version 5.1.0, Revision 22732, Hash 50c00a756 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Bugs: - [yambo_rt/yambo_nl] Fixed conversion of bse kernel into collisions for parallelization over q Additions: - Changes: - Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 17 +++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index ebfd537d29..be0eacfa73 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22731 h.9f309dff1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22732 h.50c00a756, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22731" -SHASH="9f309dff1" +SREVISION="22732" +SHASH="50c00a756" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index dcabd18356..4e710e8cd9 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -228,10 +228,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) endif endif ! - else - ! - ! to add here or somewhere else checks on the consistency of the parameters ... - ! endif ! n_colls=max(HXC_collisions%N,COH_collisions%N) @@ -418,19 +414,28 @@ subroutine map_BSE_to_HXC_collisions() use IO_m, ONLY:RD ! complex(SP) :: M_ij - integer :: i_BSE,j_BSE,i_k_bz,i_p_bz,iB,iB_save,jB + integer :: i_BSE,j_BSE,i_k_bz,i_p_bz,iB,iB_save,jB,i_q_fake,i_p_bz_fake logical :: l_conj,l_cI,l_m1 ! iB=-1 iB_save=-1 jB=-1 ! - do i_p=1,Xk%nibz + do i_q_fake=1,q%nbz + ! + if (.not.PAR_IND_Q_bz%element_1D(i_q_fake)) cycle + ! + i_p_bz_fake=qindx_S(i_k,i_q_fake,1) + i_p =k%sstar(i_p_bz_fake,1) + ! do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) ! if ( (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle if ( (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle + ! + if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & +& .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle ! i_k_bz=BS_K_io_map(k%k_table(i_k,1)) i_p_bz=BS_K_io_map(k%k_table(i_p,1)) From ca3f4767234d9f598f311a4d60b32908d6eeae77 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 21 Jul 2023 22:38:31 +0200 Subject: [PATCH 0668/1367] Version 5.1.0, Revision 22733, Hash 04c0f2e85 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Changes: - [yambo_rt] Fixed warning message when evaluating collisions Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index be0eacfa73..4f07313cd2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22732 h.50c00a756, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22733 h.04c0f2e85, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22732" -SHASH="50c00a756" +SREVISION="22733" +SHASH="04c0f2e85" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 4e710e8cd9..b99c7e5832 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -136,7 +136,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) if (IO_BS_err/=0.or.(.not.COLLISIONS_CV_only)) then call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_H,"SH") call fft_check_size(iGo_max,N_g_vecs_C,N_g_vecs_X,"SF") - if (IO_BS_err/=0) then + if (IO_BS_err==0) then if(QP_ng_SH/=N_g_vecs_H) call warning("Hartree cutoff is different between cv and cc/vv channels") if(QP_ng_Sx/=N_g_vecs_X) call warning("Exchange cutoff is different between cv and cc/vv channels") endif From 77243da1ab85a86ccd2442d63a1c8f77cee203f2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Jul 2023 00:12:33 +0200 Subject: [PATCH 0669/1367] Version 5.1.0, Revision 22734, Hash ca3f47672 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Changes: - Removed non conforming tab characters - Improved indexes naming Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++--- src/collisions/COLLISIONS_HXC.F | 48 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 4f07313cd2..616c533865 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22733 h.04c0f2e85, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22734 h.ca3f47672, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22733" -SHASH="04c0f2e85" +SREVISION="22734" +SHASH="ca3f47672" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index b99c7e5832..8457b8a438 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -414,7 +414,7 @@ subroutine map_BSE_to_HXC_collisions() use IO_m, ONLY:RD ! complex(SP) :: M_ij - integer :: i_BSE,j_BSE,i_k_bz,i_p_bz,iB,iB_save,jB,i_q_fake,i_p_bz_fake + integer :: i_BSE,j_BSE,i_k_bz_bse,i_p_bz_bse,iB,iB_save,jB,i_q_fake,i_p_bz logical :: l_conj,l_cI,l_m1 ! iB=-1 @@ -425,8 +425,8 @@ subroutine map_BSE_to_HXC_collisions() ! if (.not.PAR_IND_Q_bz%element_1D(i_q_fake)) cycle ! - i_p_bz_fake=qindx_S(i_k,i_q_fake,1) - i_p =k%sstar(i_p_bz_fake,1) + i_p_bz=qindx_S(i_k,i_q_fake,1) + i_p =k%sstar(i_p_bz,1) ! do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) @@ -437,26 +437,26 @@ subroutine map_BSE_to_HXC_collisions() if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle ! - i_k_bz=BS_K_io_map(k%k_table(i_k,1)) - i_p_bz=BS_K_io_map(k%k_table(i_p,1)) + i_k_bz_bse=BS_K_io_map(k%k_table(i_k,1)) + i_p_bz_bse=BS_K_io_map(k%k_table(i_p,1)) + ! + i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) + j_BSE=BSS_eh_table_m1(i_p_bz_bse,i_mp,i_np,i_sp,i_sp) ! - i_BSE=BSS_eh_table_m1(i_k_bz,i_m,i_n,i_sp,i_sp) - j_BSE=BSS_eh_table_m1(i_p_bz,i_mp,i_np,i_sp,i_sp) - ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! - l_cI=.false. - l_m1=.false. + l_cI=.false. + l_m1=.false. ! Resonant block - if(j_BSE>=i_BSE) then; iB=i_BSE ; jB=j_BSE-i_BSE+1; l_conj=.false. ; endif + if(j_BSE>=i_BSE) then; iB=i_BSE ; jB=j_BSE-i_BSE+1; l_conj=.false. ; endif ! Resonant is hermitian - if(j_BSE< i_BSE) then; iB=j_BSE ; jB=i_BSE-j_BSE+1; l_conj=.true. ; endif + if(j_BSE< i_BSE) then; iB=j_BSE ; jB=i_BSE-j_BSE+1; l_conj=.true. ; endif ! else if(i_BSE<=BS_K_dim(1) .and. j_BSE>BS_K_dim(1)) then ! - l_cI=.true. - l_m1=.false. - l_conj=.false. + l_cI=.true. + l_m1=.false. + l_conj=.false. ! Coupling block j_BSE=j_BSE-BS_K_dim(1) if(j_BSE>=i_BSE) then ; iB=i_BSE+BS_K_dim(1) ; jB=j_BSE-i_BSE+1; endif @@ -465,9 +465,9 @@ subroutine map_BSE_to_HXC_collisions() ! else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! - l_cI=.true. - l_m1=.true. - l_conj=.true. + l_cI=.true. + l_m1=.true. + l_conj=.true. ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) if(j_BSE>=i_BSE) then; iB=i_BSE+BS_K_dim(1); jB=j_BSE-i_BSE+1; endif @@ -476,8 +476,8 @@ subroutine map_BSE_to_HXC_collisions() ! else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then ! - l_cI=.false. - l_m1=.true. + l_cI=.false. + l_m1=.true. ! Anti-resonant from resonant: the whole BSE matrix is Pseudo-Hermitian i_BSE=i_BSE-BS_K_dim(1) j_BSE=j_BSE-BS_K_dim(1) @@ -498,7 +498,7 @@ subroutine map_BSE_to_HXC_collisions() call io_BS_PAR_block(1,iB,ID_BS,"matonly") iB_save=iB endif - ! + ! M_ij= BS_blk(iB)%mat(1,jB) if(l_conj) M_ij= conjg(M_ij) if(l_cI) M_ij= cI * M_ij @@ -559,7 +559,7 @@ subroutine compute_Hartree_collisions(cc_vv_only) ! cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) - ! + ! if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle ! @@ -740,7 +740,7 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) ! cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) - ! + ! if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle ! @@ -775,7 +775,7 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) enddo !$omp end parallel do endif - ! + ! if(index(H_potential,"SEX")>0 .or. index(H_potential,"FOCK")>0) & & HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq) & & -4._SP/spin_occ*pi*(pre_factor1+pre_factor2) From 55d6289a519a4414cb92a93f7142f613ee3ec85a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Jul 2023 14:44:30 +0200 Subject: [PATCH 0670/1367] Version 5.1.0, Revision 22751, Hash e0d27e459 MODIFIED * configure include/version/version.m4 bse/K_driver_init.F Changes: - Saving local changes Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_driver_init.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index e341e11317..c86421a4e1 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.22541 h.3f1e06ace. +# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.22750 h.ab9db72b2. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.22541 h.3f1e06ace' -PACKAGE_STRING='Yambo 5.1.0 r.22541 h.3f1e06ace' +PACKAGE_VERSION='5.1.0 r.22750 h.ab9db72b2' +PACKAGE_STRING='Yambo 5.1.0 r.22750 h.ab9db72b2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1611,7 +1611,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.22541 h.3f1e06ace to adapt to many kinds of systems. +\`configure' configures Yambo 5.1.0 r.22750 h.ab9db72b2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1677,7 +1677,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.22541 h.3f1e06ace:";; + short | recursive ) echo "Configuration of Yambo 5.1.0 r.22750 h.ab9db72b2:";; esac cat <<\_ACEOF @@ -1888,7 +1888,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.22541 h.3f1e06ace +Yambo configure 5.1.0 r.22750 h.ab9db72b2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2517,7 +2517,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.22541 h.3f1e06ace, which was +It was created by Yambo $as_me 5.1.0 r.22750 h.ab9db72b2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3275,8 +3275,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22541" -SHASH="3f1e06ace" +SREVISION="22750" +SHASH="ab9db72b2" @@ -17124,7 +17124,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.22541 h.3f1e06ace, which was +This file was extended by Yambo $as_me 5.1.0 r.22750 h.ab9db72b2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17188,7 +17188,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.1.0 r.22541 h.3f1e06ace +Yambo config.status 5.1.0 r.22750 h.ab9db72b2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index bb1b947b5b..1a3c47f2e9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22750 h.ab9db72b2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22751 h.e0d27e459, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22750" -SHASH="ab9db72b2" +SREVISION="22751" +SHASH="e0d27e459" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index eea11127a2..b028248ac6 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -87,7 +87,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) if (iq/=1.and.i_time_rev==0.and.i_space_inv==0 ) l_BS_ares_from_res=.FALSE. if (l_BS_photolum) l_BS_ares_from_res=.FALSE. if (l_BS_magnons.and.n_sp_pol==2) l_BS_ares_from_res=.FALSE. - ! The next line is to switch of section of the codes due to the calculation + ! The next line is to switch off sections of the code due to the calculation ! of the ARES part without checking the BSE_mode (see io_BS_PAR_init for example) if (trim(BSE_mode)=="resonant") l_BS_ares_from_res=.TRUE. ! From ed708c14b2a503095bdca5995af2721149ace623 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Jul 2023 22:32:25 +0200 Subject: [PATCH 0671/1367] Version 5.1.0, Revision 22735, Hash 77243da1a MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Changes: - [yambo_rt/yambo_nl] when converting bse kernel into collisions: - "%done" element not allocated - refinement in parallelization over q Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 616c533865..eced6f1e5a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22734 h.ca3f47672, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22735 h.77243da1a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22734" -SHASH="ca3f47672" +SREVISION="22735" +SHASH="77243da1a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 8457b8a438..0dc6ae5fcb 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -407,7 +407,7 @@ subroutine map_BSE_to_HXC_collisions() ! This requires a cI factor in the coupling terms ! use electrons, ONLY:spin_occ - use pars, ONLY:cI + use pars, ONLY:cI,cZERO use BS, ONLY:BS_blk,BS_K_dim,BS_K_io_map use BS_solvers, ONLY:BSS_eh_table_m1 use IO_int, ONLY:io_control @@ -415,11 +415,12 @@ subroutine map_BSE_to_HXC_collisions() ! complex(SP) :: M_ij integer :: i_BSE,j_BSE,i_k_bz_bse,i_p_bz_bse,iB,iB_save,jB,i_q_fake,i_p_bz - logical :: l_conj,l_cI,l_m1 + logical :: l_conj,l_cI,l_m1,p_table(k%nibz) ! iB=-1 iB_save=-1 jB=-1 + p_table=.false. ! do i_q_fake=1,q%nbz ! @@ -428,6 +429,14 @@ subroutine map_BSE_to_HXC_collisions() i_p_bz=qindx_S(i_k,i_q_fake,1) i_p =k%sstar(i_p_bz,1) ! + ! DS: here I'm assuming that the "non overlapping" distribution of q + ! gives a "non overlapping" distribution over q. + ! To be checked + ! + if (p_table(i_p)) cycle + ! + p_table(i_p)=.true. + ! do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) ! @@ -488,12 +497,9 @@ subroutine map_BSE_to_HXC_collisions() endif ! if(iB/=iB_save) then - if(iB_save/=-1) then - deallocate(BS_blk(iB_save)%mat) - deallocate(BS_blk(iB_save)%done) - endif + if(iB_save/=-1) deallocate(BS_blk(iB_save)%mat) allocate(BS_blk(iB)%mat (BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + BS_blk(iB)%mat=cZERO call io_control(ACTION=RD,ID=ID_BS) call io_BS_PAR_block(1,iB,ID_BS,"matonly") iB_save=iB @@ -513,7 +519,6 @@ subroutine map_BSE_to_HXC_collisions() enddo ! deallocate(BS_blk(iB_save)%mat) - deallocate(BS_blk(iB_save)%done) ! end subroutine map_BSE_to_HXC_collisions ! From bac68a1e77a6dd595b1c9d8e004b8e2546c6bf1c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Jul 2023 09:48:05 +0200 Subject: [PATCH 0672/1367] Version 5.1.0, Revision 22794, Hash ad2e36810 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Bugs: - [yambo_rt/yambo_nl/yambo_sc] Fixed generation of collisions from bse kernel in the case where few symmetries exist Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 24 +++++++++--------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index eba398626a..6fc715585a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22592 h.be2e3f3c3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22794 h.ad2e36810, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22592" -SHASH="be2e3f3c3" +SREVISION="22794" +SHASH="ad2e36810" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 0dc6ae5fcb..9e78d772d4 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -415,12 +415,11 @@ subroutine map_BSE_to_HXC_collisions() ! complex(SP) :: M_ij integer :: i_BSE,j_BSE,i_k_bz_bse,i_p_bz_bse,iB,iB_save,jB,i_q_fake,i_p_bz - logical :: l_conj,l_cI,l_m1,p_table(k%nibz) + logical :: l_conj,l_cI,l_m1 ! iB=-1 iB_save=-1 jB=-1 - p_table=.false. ! do i_q_fake=1,q%nbz ! @@ -428,14 +427,7 @@ subroutine map_BSE_to_HXC_collisions() ! i_p_bz=qindx_S(i_k,i_q_fake,1) i_p =k%sstar(i_p_bz,1) - ! - ! DS: here I'm assuming that the "non overlapping" distribution of q - ! gives a "non overlapping" distribution over q. - ! To be checked - ! - if (p_table(i_p)) cycle - ! - p_table(i_p)=.true. + !i_p_s =k%sstar(i_p_bz,2) ! do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) @@ -447,7 +439,8 @@ subroutine map_BSE_to_HXC_collisions() & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle ! i_k_bz_bse=BS_K_io_map(k%k_table(i_k,1)) - i_p_bz_bse=BS_K_io_map(k%k_table(i_p,1)) + !i_p_bz_bse=BS_K_io_map(k%k_table(i_p,i_p_s)) + i_p_bz_bse=BS_K_io_map(i_p_bz) ! i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) j_BSE=BSS_eh_table_m1(i_p_bz_bse,i_mp,i_np,i_sp,i_sp) @@ -510,9 +503,10 @@ subroutine map_BSE_to_HXC_collisions() if(l_cI) M_ij= cI * M_ij if(l_m1) M_ij= - M_ij ! - ! The occupation factor here is already contained in the density matrix + ! - The occupation factor here is already contained in the density matrix + ! - Compared to the BSE case, the collisions are summed over the points in the star of i_p ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=-M_ij/spin_occ + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)-M_ij/spin_occ ! enddo enddo @@ -613,7 +607,7 @@ subroutine compute_Hartree_collisions(cc_vv_only) enddo endif ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)+4._SP*pi*pre_factor1+Co*pre_factor2 ! call live_timing(steps=1) ! @@ -642,7 +636,7 @@ subroutine compute_Hartree_collisions(cc_vv_only) enddo endif ! - HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p)=4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p)=HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p)+4._SP*pi*pre_factor1+Co*pre_factor2 ! call live_timing(steps=1) ! From c2634e398eb37e60f56d26b6ba61acc4ee3dcec1 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 2 Aug 2023 12:06:42 +0200 Subject: [PATCH 0673/1367] Version 5.2.0, Revision 22596, Hash 1ab98e15c MODIFIED * exc-ph/EXCPH_gkkp_driver.F interface/INIT_load.F Additions: -Disabilitatd the Bernardi implementation (not working well) Changes: - Patch sent by: Claudio Attaccalite --- src/exc-ph/EXCPH_gkkp_driver.F | 4 ++-- src/interface/INIT_load.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 515063582b..0cc0ed74ed 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -101,7 +101,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) case('PALEARI') EXCPH_kind=PALEARI case('BERNARDI') - EXCPH_kind=BERNARDI + call error("Bernardi formulation not implemented") case default call error("Unknow exciton-phonon coupling type") end select @@ -219,7 +219,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! elseif(EXCPH_kind==BERNARDI) then ! - call EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) +! call EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index ef38e34413..d2f4125b48 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -674,7 +674,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) - call it(defs,'ExcPhKind', '[EXCPH] Exciton-phonon kind (PALEARI | BERNARDI)',EXCPH_kind_name) + call it(defs,'ExcPhKind', '[EXCPH] Exciton-phonon kind (PALEARI | BERNARDI)',EXCPH_kind_name,verb_level=V_ph) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure 2D distortion',alphaQ) From d35190eb3e9d8a683b07cc17ae7480149b393925 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 11 Aug 2023 11:52:31 +0200 Subject: [PATCH 0674/1367] Version 5.1.0, Revision 22795, Hash bac68a1e7 MODIFIED * include/version/version.m4 ypp/real_time/RT_X_LRR_real_field.F Changes: - [ypp_rt] Small change in control of field direction. It likely does not have any impact on the final results. Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- ypp/real_time/RT_X_LRR_real_field.F | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 6fc715585a..ac8e1468ec 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22794 h.ad2e36810, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22795 h.bac68a1e7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22794" -SHASH="ad2e36810" +SREVISION="22795" +SHASH="bac68a1e7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 97f0c59429..50add73a92 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -49,7 +49,7 @@ subroutine RT_X_LRR_real_field(en) integer :: i_t,i_w,i_p_dir,iE_err,i_Probe,i_field,n_fields,n_freqs,NW logical :: l_rm_asympt_limit real(SP) :: W_reached,Field_time,outdata(6),E_ver(3,3),Fac - complex(SP) :: OBS_proj,OBS_vec(3),E_w_SP(3),Field,E_of_t(2),A_of_t(2),theta,delta,Field_freq + complex(SP) :: OBS_proj,OBS_vec(3),E_w_SP(3),Field,E_ver_cmplx(3,3),E_of_t(2),A_of_t(2),theta,delta,Field_freq complex(SP), allocatable :: EELS(:,:),EPS(:,:) ! #if defined _YPP_NL @@ -231,13 +231,15 @@ subroutine RT_X_LRR_real_field(en) E_ver(:,1)=abs(E_w_SP/v_norm(abs(E_w_SP))) endif ! + E_ver_cmplx=cmplx(E_ver,kind=SP) + ! do i_p_dir=1,3 ! if(trim(X_kind)=="rhorho") OBS_vec=cmplx( Pol(1)%F_w(i_w,:),kind=SP) if(trim(X_kind)=="jj") OBS_vec=cmplx(Curr(1)%F_w(i_w,:),kind=SP)/ElField%W(i_w)**2 ! - OBS_proj=dot_product(E_ver(:,i_p_dir),OBS_vec) - if(Efield(i_Probe)%ef_pol=="circular") Field=dot_product(E_ver(:,i_p_dir),E_w_SP ) + OBS_proj=dot_product(E_ver_cmplx(:,i_p_dir),OBS_vec) + if(Efield(i_Probe)%ef_pol=="circular") Field=dot_product(E_ver_cmplx(:,i_p_dir),E_w_SP ) ! if( l_RT_induced_field) EELS(i_w,i_p_dir) = 4._SP*pi*OBS_proj/Field if(.not.l_RT_induced_field) EPS( i_w,i_p_dir) = 4._SP*pi*OBS_proj/Field From 19ab4595917f5cd256b67715d5cd28aec676e9f8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 31 Aug 2023 10:25:11 +0200 Subject: [PATCH 0675/1367] Version 5.2.0, Revision 22918, Hash 495dd2886 MODIFIED * config/mk/global/libraries.mk include/version/version.m4 el-ph/.objects Bugs: - Additions: -Fixing compilation Changes: - Patch sent by: Claudio Attaccalite --- config/mk/global/libraries.mk | 4 ++-- include/version/version.m4 | 6 +++--- src/el-ph/.objects | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index b2a0b69574..753b30fb4b 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -23,8 +23,8 @@ BASIC_LIBS_LD= tools memory allocations communicate modules matrices linear_alge MAIN_LIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse MAIN_LIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse -PJ_PHLIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function el-ph qp acfdt bse -PJ_PHLIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function el-ph qp acfdt bse +PJ_PHLIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function el-ph qp acfdt bse exc-ph +PJ_PHLIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function el-ph qp acfdt bse exc-ph PJ_SCLIBS = $(MAIN_LIBS) collisions hamiltonian sc PJ_SCLIBS_LD = $(MAIN_LIBS_LD) hamiltonian collisions sc diff --git a/include/version/version.m4 b/include/version/version.m4 index 0f016eb025..0a81e56bdb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22204 h.b72887603, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22918 h.495dd2886, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22204" -SHASH="b72887603" +SREVISION="22918" +SHASH="495dd2886" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/el-ph/.objects b/src/el-ph/.objects index deded2192b..8881546dca 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,6 +1,6 @@ #if defined _ELPH && !defined _YPP_ELPH EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o Eval_Efermi_DbGd.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o get_ph_E_DbGd.o + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o get_ph_E_DbGd.o ELPH_databases_grids_map.o #endif #if defined _RT || defined _PHEL RT_objs = ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ From 490979cc299ac0e28b08d173589a90e72c07fc41 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 1 Sep 2023 15:21:10 +0200 Subject: [PATCH 0676/1367] Version 5.2.0, Revision 22597, Hash c2634e398 MODIFIED * ypp/el-ph/ELPH_databases.F Bugs: -Flag l_use_qindxB was lost for some reason, restored Additions: - Changes: - Patch sent by: Claudio Attaccalite --- ypp/el-ph/ELPH_databases.F | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 22c20e3ba0..e17fb91e65 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -70,6 +70,8 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpDebug',l_GKKP_debug) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('GkkpSkipDW',l_GKKP_skip_DW) + call parser('UseQindxB',l_use_qindxB) + ! l_GKKP_hosts_DW=.not.l_GKKP_skip_DW ! if(l_gkkp_expand.and.l_gkkp_expand_only_k) & From 0cf32bc5e29840bcebcaa0bb7484883de04c0b0c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 1 Sep 2023 15:22:08 +0200 Subject: [PATCH 0677/1367] Version 5.2.0, Revision 22919, Hash 19ab45959 MODIFIED * include/version/version.m4 ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_load_indexes.F Bugs: -Restored l_use_qindxB Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/el-ph/ELPH_databases.F | 2 ++ ypp/el-ph/ELPH_load_indexes.F | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0a81e56bdb..0f613c0c0c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22918 h.495dd2886, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22919 h.19ab45959, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22918" -SHASH="495dd2886" +SREVISION="22919" +SHASH="19ab45959" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 22c20e3ba0..e17fb91e65 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -70,6 +70,8 @@ subroutine ELPH_databases(k,E,q) call parser('GkkpDebug',l_GKKP_debug) call parser('GkkpExpOnlyK',l_gkkp_expand_only_k) call parser('GkkpSkipDW',l_GKKP_skip_DW) + call parser('UseQindxB',l_use_qindxB) + ! l_GKKP_hosts_DW=.not.l_GKKP_skip_DW ! if(l_gkkp_expand.and.l_gkkp_expand_only_k) & diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index 02903bbc04..18fdc95bb0 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -46,6 +46,7 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) integer ::io_err(3),ID integer, external ::io_QINDX,qindx_B_init ! + write(*,*) 'passo qui ',l_use_qindxB,bse_scattering,coll_scattering if(l_use_qindxB) then ! if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') From 5bc22b153f8fb7bcabf6ddbf21bb1ba26a9e3395 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 1 Sep 2023 15:41:53 +0200 Subject: [PATCH 0678/1367] Version 5.2.0, Revision 22920, Hash 0cf32bc5e MODIFIED * include/version/version.m4 ypp/el-ph/ELPH_load_indexes.F Bugs: -Fixed correct loading of indexes Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/el-ph/ELPH_load_indexes.F | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0f613c0c0c..bf1700fad4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22919 h.19ab45959, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22920 h.0cf32bc5e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22919" -SHASH="19ab45959" +SREVISION="22920" +SHASH="0cf32bc5e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index 18fdc95bb0..38956df2f8 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -46,10 +46,9 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) integer ::io_err(3),ID integer, external ::io_QINDX,qindx_B_init ! - write(*,*) 'passo qui ',l_use_qindxB,bse_scattering,coll_scattering if(l_use_qindxB) then ! - if(.not.bse_scattering) call error(' Please run setup with BSEscatt flag ') + bse_scattering=.true. ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) @@ -67,7 +66,7 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) else ! otherwise qindx_C is allocated ! - if(.not.coll_scattering) call error(' Please run setup with COLLscatt flag ') + coll_scattering=.true. ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) io_err(1)=io_QINDX(k,q,ID,'minus_q') From a06de0206b9b7c1acc4edc54cabbcf0c9c306ac7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 1 Sep 2023 15:42:29 +0200 Subject: [PATCH 0679/1367] Version 5.2.0, Revision 22598, Hash 490979cc2 MODIFIED * include/version/version.m4 ypp/el-ph/ELPH_load_indexes.F Bugs: -Fixed correct indexes loading Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/el-ph/ELPH_load_indexes.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0f016eb025..51f488525a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22204 h.b72887603, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22597 h.c2634e398, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22204" -SHASH="b72887603" +SREVISION="22597" +SHASH="c2634e398" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index 02903bbc04..bd5f1d4be0 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -66,7 +66,7 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) else ! otherwise qindx_C is allocated ! - if(.not.coll_scattering) call error(' Please run setup with COLLscatt flag ') + coll_scattering=.true. ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/6/),ID=ID) io_err(1)=io_QINDX(k,q,ID,'minus_q') From ac1d046eeb7b957b22057ff12ab74be250e6f3e3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 1 Sep 2023 17:16:04 +0200 Subject: [PATCH 0680/1367] Version 5.2.0, Revision 22599, Hash a06de0206 MODIFIED * include/version/version.m4 interface/INIT_activate.F Bugs: -Restored flag in the luminescence input Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/interface/INIT_activate.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 51f488525a..a373d16fe0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22597 h.c2634e398, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22598 h.490979cc2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22597" -SHASH="c2634e398" +SREVISION="22598" +SHASH="490979cc2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 76e97d059f..28085b073b 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -466,7 +466,7 @@ subroutine INIT_activate() if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ ExcPhOffDiago NoMatrxEl') if (l_EXCPH_optics) then - call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') + call initactivate(1,'EXCTemp AlphaQ ElPhModes PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'EXCPHdEtresh DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') endif ! From f282c868fdd82e23a820d074c7595054a0fb3ca4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 19 Sep 2023 08:40:18 +0200 Subject: [PATCH 0681/1367] Version 5.2.0, Revision 22860, Hash 7f6e3385e MODIFIED * configure include/version/version.m4 Changes: - [configure] regenerated after merge Patch sent by: Davide Sangalli --- configure | 47 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/configure b/configure index dc1e061c8e..2aea4fdd3f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.1.0 r.22561 h.785b4fd6f. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22185 h.aca1205ba. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.1.0 r.22561 h.785b4fd6f' -PACKAGE_STRING='Yambo 5.1.0 r.22561 h.785b4fd6f' +PACKAGE_VERSION='5.2.0 r.22185 h.aca1205ba' +PACKAGE_STRING='Yambo 5.2.0 r.22185 h.aca1205ba' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -716,6 +716,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -896,6 +897,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -955,6 +958,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1607,7 +1611,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.1.0 r.22561 h.785b4fd6f to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.22185 h.aca1205ba to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1673,7 +1677,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.1.0 r.22561 h.785b4fd6f:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.22185 h.aca1205ba:";; esac cat <<\_ACEOF @@ -1686,6 +1690,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1883,7 +1888,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.1.0 r.22561 h.785b4fd6f +Yambo configure 5.2.0 r.22185 h.aca1205ba generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2512,7 +2517,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.1.0 r.22561 h.785b4fd6f, which was +It was created by Yambo $as_me 5.2.0 r.22185 h.aca1205ba, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3268,10 +3273,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" -SSUBVERSION="1" +SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22561" -SHASH="785b4fd6f" +SREVISION="22185" +SHASH="aca1205ba" @@ -3455,6 +3460,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15968,6 +15987,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16150,6 +16172,7 @@ fi + # @@ -17107,7 +17130,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.1.0 r.22561 h.785b4fd6f, which was +This file was extended by Yambo $as_me 5.2.0 r.22185 h.aca1205ba, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17171,7 +17194,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.1.0 r.22561 h.785b4fd6f +Yambo config.status 5.2.0 r.22185 h.aca1205ba configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 248e3b1aa7..251e93268b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22185 h.aca1205ba, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22860 h.7f6e3385e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22185" -SHASH="aca1205ba" +SREVISION="22860" +SHASH="7f6e3385e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 67d16324c4bf78212e8fa2b7b1e5eb5650359e96 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 3 Oct 2023 14:27:44 +0200 Subject: [PATCH 0682/1367] Version 5.1.0, Revision 22383, Hash 219bded50 MODIFIED * nloptics/NL_initialize.F Changes: -Fixed P&P vs nlinear runs Patch sent by: Claudio Attaccalite --- src/nloptics/NL_initialize.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index bfc8bb6523..9167c3f4c8 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -162,7 +162,7 @@ subroutine NL_initialize(E,k) ! call msg('s','[NL] Number of active fields : ',n_active_fields) ! - if(n_active_fields>1.or.n_frequencies==1.or.all(NL_er<0._SP)) then + if(n_active_fields>1.or.(n_frequencies==1.and.any(NL_er<0._SP))) then l_pump_and_probe=.true. l_NE_with_fields=.true. call msg('s', '[NL] Variables NLEnSteps and NLEnRange are ignored ') From f18d9cc798f73771706b3df4bb9c72a6dff4c3b1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 20 Oct 2023 23:02:41 +0200 Subject: [PATCH 0683/1367] Version 5.2.0, Revision 22985, Hash 46aa612263 MODIFIED * configure Changes: - [yambo] Configure restored after merge Patch sent by: Davide Sangalli --- configure | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/configure b/configure index affe44b6f0..a485dec425 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22633 h.aafc6d3fb. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22885 h.41fc9d87d4. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.22633 h.aafc6d3fb' -PACKAGE_STRING='Yambo 5.2.0 r.22633 h.aafc6d3fb' +PACKAGE_VERSION='5.2.0 r.22885 h.41fc9d87d4' +PACKAGE_STRING='Yambo 5.2.0 r.22885 h.41fc9d87d4' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -716,6 +716,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -896,6 +897,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -955,6 +958,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1607,7 +1611,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.22633 h.aafc6d3fb to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.22885 h.41fc9d87d4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1673,7 +1677,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.22633 h.aafc6d3fb:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.22885 h.41fc9d87d4:";; esac cat <<\_ACEOF @@ -1686,6 +1690,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1883,7 +1888,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.22633 h.aafc6d3fb +Yambo configure 5.2.0 r.22885 h.41fc9d87d4 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2512,7 +2517,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.22633 h.aafc6d3fb, which was +It was created by Yambo $as_me 5.2.0 r.22885 h.41fc9d87d4, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3270,8 +3275,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22633" -SHASH="aafc6d3fb" +SREVISION="22885" +SHASH="41fc9d87d4" @@ -3423,6 +3428,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15527,6 +15546,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15709,6 +15731,7 @@ fi + # @@ -16666,7 +16689,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.22633 h.aafc6d3fb, which was +This file was extended by Yambo $as_me 5.2.0 r.22885 h.41fc9d87d4, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16730,7 +16753,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.22633 h.aafc6d3fb +Yambo config.status 5.2.0 r.22885 h.41fc9d87d4 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" From 72bc253f25305794aa408778da826395675fdc3e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 25 Oct 2023 17:40:23 +0200 Subject: [PATCH 0684/1367] Version 5.1.0, Revision 22960, Hash a4252980bf MODIFIED * include/version/version.m4 bse/K_driver_init.F bse/K_stored_in_a_slepc_matrix.F output/K_OUTPUT.F qp/QP_ppa_cohsex.F Bugs: - Fixed compilation Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_driver_init.F | 2 +- src/bse/K_stored_in_a_slepc_matrix.F | 2 +- src/output/K_OUTPUT.F | 2 +- src/qp/QP_ppa_cohsex.F | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index e7b996fb71..93cdbe47df 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22941 h.46d9023c93, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.22960 h.a4252980bf, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22941" -SHASH="46d9023c93" +SREVISION="22960" +SHASH="a4252980bf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index afea71719a..13228cd862 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -15,7 +15,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use BS_solvers, ONLY:BSS_eels_to_eps,BSS_mode,BSS_slepc_matrix,BSS_uses_DbGd,& & l_ab_from_eels,BSS_slepc_double_grp use BS, ONLY:BSE_L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& -& BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,l_BSE_kernel,full,& +& BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,l_BSE_kernel_full,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& & BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr diff --git a/src/bse/K_stored_in_a_slepc_matrix.F b/src/bse/K_stored_in_a_slepc_matrix.F index 3c1de150d3..29664fcac0 100644 --- a/src/bse/K_stored_in_a_slepc_matrix.F +++ b/src/bse/K_stored_in_a_slepc_matrix.F @@ -41,7 +41,7 @@ subroutine K_stored_in_a_slepc_matrix(i_BS_mat,slepc_mat) PetscInt :: H_pos(2),SL_K_dim(2),SL_H_dim PetscErrorCode :: ierr ! - if (l_BS_kernel_full) call error("Slepc with matrix not coded with full BSE mode") + if (l_BSE_kernel_full) call error("Slepc with matrix not coded with full BSE mode") ! if( BS_K_coupling) SL_H_dim=BS_H_dim if(.not.BS_K_coupling) SL_H_dim=BS_K_dim(i_BS_mat) diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 906c0e9032..32e69007b5 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -67,7 +67,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) if (STRING_match(WHAT,"override")) call X_OUTPUT_driver("override "//OBS) ! if (STRING_match(WHAT,"open").or.STRING_match(WHAT,"override")) then - call X_OUTPUT_messages(iq,Q_plus_G=BS_qpt(:,iq),ig=1) + call X_OUTPUT_messages(iq,Q_plus_G=BSqpts(:,iq),ig=1) ! if ( trim(BSE_mode)=='resonant' ) ordering='r' if (.not.trim(BSE_mode)=='resonant' ) ordering='R' diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index a4e5526295..fa448174e7 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -89,7 +89,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) integer, external ::io_X complex(SP), external ::QP_ppa_EET_terminator ! - integer :: first_el(QP_n_states),n_of_el(QP_n_states),n_deg_grp,i_c + integer :: first_el(QP_n_states),n_of_el(QP_n_states),n_deg_grp integer :: PPcond_rate,TO_rate real(SP) :: PP_err ! From 7d9d8895fcc16d142228f60139d4235de73a8eb8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 27 Oct 2023 08:56:08 +0200 Subject: [PATCH 0685/1367] Version 5.2.0, Revision 22986, Hash f18d9cc798 MODIFIED * bse/K_correlation_collisions_dir.F bse/K_correlation_collisions_std.F bse/K_exchange_collisions.F bse/K_kernel.F modules/mod_BS.F modules/mod_TDDFT.F tddft/.objects tddft/TDDFT_ALDA_lower_cutoff.F NEW * tddft/TDDFT_ALDA_eh_space_G_collisions.F tddft/TDDFT_ALDA_eh_space_G_kernel.F RENAMED * tddft/TDDFT_ALDA_R_space.F -> tddft/TDDFT_ALDA_eh_space_R_kernel.F Changes: - [yambo] Working on restructuring TDDFT implementation in eh space Patch sent by: Davide Sangalli --- src/bse/K_correlation_collisions_dir.F | 4 +- src/bse/K_correlation_collisions_std.F | 4 +- src/bse/K_exchange_collisions.F | 4 +- src/bse/K_kernel.F | 80 +++- src/modules/mod_BS.F | 80 ++-- src/modules/mod_TDDFT.F | 4 +- src/tddft/.objects | 3 +- src/tddft/TDDFT_ALDA_eh_space_G_collisions.F | 395 ++++++++++++++++++ src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 58 +++ ...space.F => TDDFT_ALDA_eh_space_R_kernel.F} | 0 src/tddft/TDDFT_ALDA_lower_cutoff.F | 10 +- 11 files changed, 574 insertions(+), 68 deletions(-) create mode 100644 src/tddft/TDDFT_ALDA_eh_space_G_collisions.F create mode 100644 src/tddft/TDDFT_ALDA_eh_space_G_kernel.F rename src/tddft/{TDDFT_ALDA_R_space.F => TDDFT_ALDA_eh_space_R_kernel.F} (100%) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 15c50f97a6..7fc40017a5 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -31,7 +31,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) use D_lattice, ONLY:nsym use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& -& BS_oscillators_alloc,K_CORR_collision,BS_T_grp,& +& BS_correlation_oscillators_alloc,K_CORR_collision,BS_T_grp,& & BS_K_dim,l_BS_ares_from_res use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc @@ -194,7 +194,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! end select ! - call BS_oscillators_alloc(.FALSE.,0,.TRUE.,i_block) + call BS_correlation_oscillators_alloc(i_block) ! #if !defined _CUDA !$omp parallel default(shared), private(i_Tk,i_Tp, & diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index 3c58fd26ef..d004888284 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -27,7 +27,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) use D_lattice, ONLY:nsym use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& -& BS_oscillators_alloc,K_CORR_collision,BS_T_grp,& +& BS_correlation_oscillators_alloc,K_CORR_collision,BS_T_grp,& & BS_K_dim,l_BS_ares_from_res use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc @@ -192,7 +192,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) ! end select ! - call BS_oscillators_alloc(.FALSE.,0,.TRUE.,i_block) + call BS_correlation_oscillators_alloc(i_block) ! #if !defined _CUDA !$omp parallel default(shared), private(i_Tk,i_Tp, & diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index 4e24be9b10..4ecea24251 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -9,7 +9,7 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! use pars, ONLY:SP,cZERO use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_inv_d - use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_oscillators_alloc,BS_n_g_exch,& + use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_exchange_oscillators_alloc,BS_n_g_exch,& & BSE_L_kind,l_BS_magnons,l_BSE_minimize_memory,BS_bands use interfaces, ONLY:WF_load,WF_free use wave_func, ONLY:WF @@ -50,7 +50,7 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! Allocate ! call elemental_collision_free(K_EXCH_collision) - call BS_oscillators_alloc(.TRUE.,i_T_grp,.FALSE.,0) + call BS_exchange_oscillators_alloc(i_T_grp) ! #if defined(__NOTNOW) && ! defined(_CUDA) !$omp parallel default(shared), private( K_EXCH_collision, & diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 24b3b363f6..2e9fd58c53 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -29,9 +29,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& & BS_res_K_exchange,BS_Block_size,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& -& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& -& BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& -& BS_oscillators_free,WF_phase,n_BS_blks,BS_blk,BS_T_grp,& +& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,TDDFT_oscillators_free,& +& BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,BS_correlation_oscillators_free,& +& BS_exchange_oscillators_free,WF_phase,n_BS_blks,BS_blk,BS_T_grp,& & BS_nT_grps,BS_blks_free,l_BS_ares_from_res,& & l_BSE_minimize_memory,l_BSE_restart,l_BSE_kernel_complete,& & BS_perturbative_SOC,BS_K_cutoff,BS_max_val,BSE_L_kind,l_BS_magnons @@ -42,7 +42,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & ALDA_cut_scheme,tddft_wf_t use xc_functionals,ONLY:V_xc,F_xc,F_xc_mat,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind,WF_exx_fraction - use wave_func, ONLY:WF,rho_map,rho_map_thresh + use wave_func, ONLY:WF,rho_map,rho_map_thresh,rho_map_size use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,PARALLEL_default_mode,master_cpu @@ -85,11 +85,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP):: sqrt_f_itk,sqrt_f_itp real(SP), allocatable :: BS_max_val_CPU(:),rho(:) ! - complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir + complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir,TDDFT_ALDA_eh_space_G_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_matrix_init,& - & l_load_kernel,l_write_kernel,l_std_alg,l_dir_alg + & l_load_kernel,l_write_kernel,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum ! ! I/O ! @@ -192,13 +192,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if (BS_K_is_ALDA.and.trim(ALDA_cut_scheme)=="lower_GmGp") then + if (BS_K_is_ALDA) then + l_tddft_gsum=(index(ALDA_cut_scheme,"-G")>0 ) + l_tddft_rsum=(index(ALDA_cut_scheme,"-G")==0) + if(index(ALDA_cut_scheme,"lower_GmGp")>0) then FXC_n_g_corr=BS_n_g_fxc if (BS_n_g_fxc/= eval_G_minus_G(BS_n_g_fxc,0) ) then BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) call msg('s','[TDDFT] ALDA Fxc cutoff is forced by symmetry to be ',BS_n_g_fxc) endif endif + endif ! call K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) ! @@ -311,6 +315,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !if (iHxc==3) NG(2)=O_ng_shift ! WARNING > ! + ! ! ALDA !====== if (iHxc==2) then @@ -329,8 +334,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! QP_ng_Vxc=BS_n_g_fxc ! - YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) - YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size*n_spinor*n_spinor)) + if (l_tddft_rsum) then + YAMBO_ALLOC(tddft_wf%rhotwr1,(rho_map_size*n_spinor*n_spinor)) + YAMBO_ALLOC(tddft_wf%rhotwr2,(rho_map_size*n_spinor*n_spinor)) + else if (l_tddft_gsum) then + YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size)) + endif + ! YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) ! @@ -416,7 +426,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif #endif ! - if (iHxc==1 .and. l_bs_exch_wf_in_loop) then + if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_exch_wf_in_loop.and.l_tddft_gsum)) then ! DS this is used only for iq==1 call fft_setup(NG(1),NG(2),.true.) else @@ -484,15 +494,25 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! Exchange oscillators !---------------------- - ! if(iHxc==1) then call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) endif ! - ! Exchange oscillators + ! TDDFT oscillators + !---------------------- + if(iHxc==2 .and. l_tddft_gsum) then + call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop,tddft_wf) + select case (mode_now) + case ("R","A","F") + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop,tddft_wf,"RES") + case ("C","Q") + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop,tddft_wf,"CPL") + end select + endif + ! + ! Correlation oscillators !---------------------- - ! if(iHxc==3) then if (l_std_alg) call K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) if (l_dir_alg) call K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) @@ -630,7 +650,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if (iHxc==2) then + if (iHxc==2.and.l_tddft_rsum) then is_k = (/i_c_k,i_k,i_k_s,i_k_sp_pol_c/) os_k = (/i_v_k,i_kmq,i_kmq_s,i_k_sp_pol_v/) is_p = (/i_c_p,i_p,i_p_s,i_p_sp_pol_c/) @@ -662,7 +682,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'RES') + if (iHxc==2) then + if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'RES') + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, & +& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + endif ! ! Correlations if (iHxc==3) then @@ -686,7 +710,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (iHxc==2) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'CPL') + if (iHxc==2) then + if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'CPL') + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, & +& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + endif ! ! Correlations if (iHxc==3) then @@ -726,11 +754,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! if(l_BSE_minimize_memory.and.iHxc==1) then - call BS_oscillators_free(i_Tgrp_p,0) - call BS_oscillators_free(i_Tgrp_k,0) + call BS_exchange_oscillators_free(i_Tgrp_p) + call BS_exchange_oscillators_free(i_Tgrp_k) endif ! - if(iHxc==3) call BS_oscillators_free(0,i_block) + !if(l_BSE_minimize_memory.and.iHxc==2.and.l_tddft_gsum) then + if(iHxc==2.and.l_tddft_gsum) then + call TDDFT_oscillators_free(i_Tgrp_p) + call TDDFT_oscillators_free(i_Tgrp_k) + endif + ! + if(iHxc==3) call BS_correlation_oscillators_free(i_block) ! 100 if(l_write_kernel) then #if defined _PAR_IO @@ -751,9 +785,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! GLOBAL CLEANING !================= ! - if(iHxc==1) call BS_oscillators_free(BS_nT_grps,0) + if(iHxc==1) call BS_exchange_oscillators_free(BS_nT_grps) ! if(iHxc==2) then + ! + !if (l_tddft_gsum) call TDDFT_oscillators_free(BS_nT_grps) ! YAMBO_FREE(tddft_wf%rhotwr1) YAMBO_FREE(tddft_wf%rhotwr2) @@ -780,10 +816,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(RIM_W) endif ! - if (iHxc==1 .and. l_bs_exch_wf_in_loop) then + if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_exch_wf_in_loop.and.l_tddft_gsum)) then call fft_free() else - call WF_free(WF,keep_states_to_load=iHxc<3) + call WF_free(WF,keep_states_to_load=l_write_kernel) endif ! l_matrix_init=.false. diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index d4f34c4362..f013d56813 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -188,6 +188,13 @@ module BS complex(SP), allocatable :: O_x(:,:) #ifdef _CUDA complex(SP), allocatable, device :: O_x_d(:,:) +#endif + ! + ! TDDFT Oscillators + ! + complex(SP), allocatable :: O_tddft(:,:,:,:,:) +#ifdef _CUDA + complex(SP), allocatable, device :: O_tddft_d(:,:,:,:,:) #endif ! end type BS_T_group @@ -270,44 +277,38 @@ integer function T_group(I) if (I>=BS_T_grp_1st_el(BS_nT_grps-1)) T_group=BS_nT_grps end function ! - subroutine BS_oscillators_alloc(EXCHANGE,iG,CORRELATION,iB) - ! - use pars, ONLY:IP - use stderr, ONLY:intc - ! - logical, intent(in) :: EXCHANGE,CORRELATION - integer, intent(in) :: iG,iB - ! - if (EXCHANGE) then - if (BS_T_grp(iG)%size==0) return - YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) + subroutine BS_exchange_oscillators_alloc(iG) + integer, intent(in) :: iG + if (BS_T_grp(iG)%size==0) return + YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) #ifdef _CUDA - allocate(BS_T_grp(iG)%O_x_d,mold=BS_T_grp(iG)%O_x) + allocate(BS_T_grp(iG)%O_x_d,mold=BS_T_grp(iG)%O_x) #endif - - endif - ! - if (CORRELATION) then - if (BS_blk(iB)%N_oscillators==0) return - YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) + end subroutine BS_exchange_oscillators_alloc + ! + subroutine BS_correlation_oscillators_alloc(iB) + integer, intent(in) :: iB + if (BS_blk(iB)%N_oscillators==0) return + YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) #ifdef _CUDA - allocate(BS_blk(iB)%O_c_d,mold=BS_blk(iB)%O_c) + allocate(BS_blk(iB)%O_c_d,mold=BS_blk(iB)%O_c) #endif - endif - ! - end subroutine + end subroutine BS_correlation_oscillators_alloc ! - subroutine BS_oscillators_free(iG_ref,iB_ref) - use stderr, ONLY:intc - integer, intent(in) :: iG_ref,iB_ref - integer :: iG,iB,ik_loop,ip_loop,ik_now,ip_now + subroutine BS_exchange_oscillators_free(iG_ref) + integer, intent(in) :: iG_ref + integer :: iG do iG=iG_ref,1,-1 YAMBO_FREE(BS_T_grp(iG)%O_x) #ifdef _CUDA if (allocated(BS_T_grp(iG)%O_x_d)) deallocate(BS_T_grp(iG)%O_x_d) #endif enddo - if(iB_ref==0) return + end subroutine BS_exchange_oscillators_free + ! + subroutine BS_correlation_oscillators_free(iB_ref) + integer, intent(in) :: iB_ref + integer :: iB,ik_loop,ip_loop,ik_now,ip_now ik_now=BS_blk(iB_ref)%ik ip_now=BS_blk(iB_ref)%ip if(iB_ref==n_BS_blks) then @@ -327,13 +328,29 @@ subroutine BS_oscillators_free(iG_ref,iB_ref) if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) #endif enddo - ! - end subroutine + end subroutine BS_correlation_oscillators_free + ! + subroutine TDDFT_oscillators_alloc(iG) + use electrons, ONLY:n_spin + integer, intent(in) :: iG + if (BS_T_grp(iG)%size==0) return + YAMBO_ALLOC(BS_T_grp(iG)%O_tddft,(BS_n_g_fxc,BS_T_grp(iG)%size,n_spin,n_spin,2)) +#ifdef _CUDA + allocate(BS_T_grp(iG)%O_tddft_d,mold=BS_T_grp(iG)%O_tddft) +#endif + end subroutine TDDFT_oscillators_alloc + ! + subroutine TDDFT_oscillators_free(iG) + integer, intent(in) :: iG + YAMBO_FREE(BS_T_grp(iG)%O_tddft) +#ifdef _CUDA + if (allocated(BS_T_grp(iG)%O_tddft_d)) deallocate(BS_T_grp(iG)%O_tddft_d) +#endif + end subroutine TDDFT_oscillators_free ! subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) ! use pars, ONLY:IP,cZERO - use stderr, ONLY:intc use electrons, ONLY:levels,n_sp_pol integer, intent(in) :: iT,dom_k_T_group type(levels), intent(in) :: E @@ -381,7 +398,6 @@ subroutine BS_blks_free(i_BS_mat) end subroutine ! subroutine BS_Blocks_and_Transitions_free() - use stderr, ONLY:intc use parallel_m, ONLY:PAR_BS_T_grps_index integer :: iT ! @@ -416,7 +432,7 @@ subroutine BS_Blocks_and_Transitions_free() ! if(allocated(BS_blk)) deallocate(BS_blk) ! - end subroutine + end subroutine BS_Blocks_and_Transitions_free ! function BS_Block_size(i_block) ! diff --git a/src/modules/mod_TDDFT.F b/src/modules/mod_TDDFT.F index 47846de128..df3fbae468 100644 --- a/src/modules/mod_TDDFT.F +++ b/src/modules/mod_TDDFT.F @@ -36,8 +36,8 @@ module TDDFT complex(SP), allocatable :: WF_symm2(:,:) end type tddft_wf_t ! - character(10) :: ALDA_cut_scheme - ! + character(12) :: ALDA_cut_scheme + ! interface ! integer function io_BS_Fxc(iq,W,ID,X) diff --git a/src/tddft/.objects b/src/tddft/.objects index f694797ac1..41d2d98d3d 100644 --- a/src/tddft/.objects +++ b/src/tddft/.objects @@ -1,4 +1,5 @@ objs = TDDFT_BSK_2_FXC.o TDDFT_BSK_disk_2_FXC.o \ TDDFT_do_X_W_typs.o \ - TDDFT_ALDA_G_space.o TDDFT_ALDA_lower_cutoff.o TDDFT_ALDA_R_space.o \ + TDDFT_ALDA_G_space.o TDDFT_ALDA_lower_cutoff.o TDDFT_ALDA_eh_space_R_kernel.o \ + TDDFT_ALDA_eh_space_G_collisions.o TDDFT_ALDA_eh_space_G_kernel.o \ TDDFT_PF_coefficient.o diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F new file mode 100644 index 0000000000..39ce82f77d --- /dev/null +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F @@ -0,0 +1,395 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2015 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf) + ! + ! Calculates the F_xc scattering + ! + ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) + ! :sqrt(Fxc): + ! + use pars, ONLY:SP,pi,cZERO + use FFT_m, ONLY:fft_size + use wave_func, ONLY:rho_map_size,rho_map,WF + use interfaces, ONLY:WF_load,WF_free + use R_lattice, ONLY:qindx_X,bz_samp + use BS, ONLY:l_BS_magnons,TDDFT_oscillators_alloc,BS_T_grp,BS_bands + use electrons, ONLY:n_spinor,n_sp_pol,n_spin + use timing_m, ONLY:timing + use openmp, ONLY:OPENMP_update,master_thread + !use interfaces, ONLY:WF_apply_symm + use TDDFT, ONLY:tddft_wf_t + ! + implicit none + ! + type(bz_samp),intent(in) :: Xk + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_exch_wf_in_loop + type(tddft_wf_t), target, intent(inout) :: tddft_wf + ! + ! Work Space + ! + logical :: l_use_rho_map,l_load_WFs + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y + integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& +& i_sp,i_T_grp_p,is(4),os(4),NK(2) + ! + complex(SP), pointer :: rhotwr_p(:) + complex(SP), pointer :: WF_symm1_p(:,:) + complex(SP), pointer :: WF_symm2_p(:,:) + ! + call timing('T_space ALDA Osc.',OPR='start') + ! + ! Allocate + ! + call TDDFT_oscillators_alloc(i_T_grp) + ! + WF_symm1_p => tddft_wf%WF_symm1 + WF_symm2_p => tddft_wf%WF_symm2 + rhotwr_p => tddft_wf%rhotwr2 + ! + ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation + l_use_rho_map=allocated(rho_map) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp parallel default(shared), private( K_EXCH_collision, & + !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & + !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & + !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2, Nk, is, os) +#endif + ! + call OPENMP_update(master_thread) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp do schedule(dynamic) +#endif + NK=-1 + do i_T_el=1,BS_T_grp(i_T_grp)%size + ! + i_k_bz=BS_T_grp(i_T_grp)%table(i_T_el,1) + i_k =Xk%sstar(i_k_bz,1) + i_s =Xk%sstar(i_k_bz,2) + ! + i_p_bz=qindx_X(iq,i_k_bz,1) + i_g_p =qindx_X(iq,i_k_bz,2) + ! + i_p =Xk%sstar(i_p_bz,1) + i_sp =Xk%sstar(i_p_bz,2) + ! + i_v =BS_T_grp(i_T_grp)%table(i_T_el,2) + i_c =BS_T_grp(i_T_grp)%table(i_T_el,3) + i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) + i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) + ! + is=(/i_c,i_k,i_s,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) + endif +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + ! + if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") + if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") + ! + call WF_apply_symm_cpu(is,WF_symm1_p) + call WF_apply_symm_cpu(os,WF_symm2_p) + ! + if( n_spinor==1 ) then + if( l_use_rho_map) rhotwr_p(rho_map(:))=WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + if(.not.l_use_rho_map) rhotwr_p( : )=WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + write(*,*) "L",i_T_grp,i_T_el,rhotwr_p(1:2),WF_symm1_p(1:2,1),WF_symm2_p(1:2,1) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,is(4),os(4),1)) + endif + ! + if(n_spinor==2) then + ! + do i_spinor=1,n_spinor + do j_spinor=1,n_spinor + ! + do irho=1,rho_map_size + if( l_use_rho_map) ifft=rho_map(irho) + if(.not.l_use_rho_map) ifft= irho + rhotwr_p(ifft)=WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)) + enddo + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,1)) + ! + enddo + enddo + endif + ! + write(*,*) "L",i_T_grp,i_T_el,BS_T_grp(i_T_grp)%O_tddft(1:2,i_T_el,1,1,1) + ! + enddo + ! + nullify(WF_symm1_p) + nullify(WF_symm2_p) + nullify(rhotwr_p) + ! + call timing('T_space ALDA Osc.',OPR='stop') + ! +end subroutine TDDFT_ALDA_eh_space_G_collisions_L +! +! +subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf,mode) + ! + ! Calculates the F_xc scattering + ! + ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) + ! :sqrt(Fxc): + ! + use pars, ONLY:SP,pi,cZERO + use FFT_m, ONLY:fft_size + use wave_func, ONLY:rho_map_size,rho_map,WF + use xc_functionals, ONLY:F_xc_mat + use interfaces, ONLY:WF_load,WF_free + use R_lattice, ONLY:qindx_X,bz_samp + use BS, ONLY:l_BS_magnons,TDDFT_oscillators_alloc,BS_T_grp,BS_bands + use electrons, ONLY:n_spinor,n_sp_pol,n_spin + use timing_m, ONLY:timing + use openmp, ONLY:OPENMP_update,master_thread + !use interfaces, ONLY:WF_apply_symm + use TDDFT, ONLY:tddft_wf_t + ! + implicit none + ! + type(bz_samp),intent(in) :: Xk + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_exch_wf_in_loop + character(3), intent(in) :: mode + type(tddft_wf_t), target, intent(inout) :: tddft_wf + ! + ! Work Space + ! + logical :: l_use_rho_map,l_load_WFs + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y,& +& i_sp_loop,o_sp_loop + integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& +& i_sp,i_T_grp_p,is(4),os(4),NK(2) + ! + complex(SP), pointer :: rhotwr_p(:) + complex(SP), pointer :: WF_symm1_p(:,:) + complex(SP), pointer :: WF_symm2_p(:,:) + ! + call timing('T_space ALDA Osc.',OPR='start') + ! + ! Allocate + ! + if (.not.allocated( BS_T_grp(i_T_grp)%O_tddft )) call TDDFT_oscillators_alloc(i_T_grp) + ! + WF_symm1_p => tddft_wf%WF_symm1 + WF_symm2_p => tddft_wf%WF_symm2 + rhotwr_p => tddft_wf%rhotwr2 + ! + ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation + l_use_rho_map=allocated(rho_map) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp parallel default(shared), private( K_EXCH_collision, & + !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & + !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & + !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2s, Nk, is, os) +#endif + ! + call OPENMP_update(master_thread) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp do schedule(dynamic) +#endif + NK=-1 + do i_T_el=1,BS_T_grp(i_T_grp)%size + ! + i_k_bz=BS_T_grp(i_T_grp)%table(i_T_el,1) + i_k =Xk%sstar(i_k_bz,1) + i_s =Xk%sstar(i_k_bz,2) + ! + i_p_bz=qindx_X(iq,i_k_bz,1) + i_g_p =qindx_X(iq,i_k_bz,2) + ! + i_p =Xk%sstar(i_p_bz,1) + i_sp =Xk%sstar(i_p_bz,2) + ! + i_v =BS_T_grp(i_T_grp)%table(i_T_el,2) + i_c =BS_T_grp(i_T_grp)%table(i_T_el,3) + i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) + i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) + ! + is=(/i_c,i_k,i_s,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) + endif +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + ! + if ((is(4)/=os(4)).and.((.not.l_BS_magnons).or. n_sp_pol==1)) call error(" TDDFT_ALDA_R_space: wrong spin index") + if ((is(4)==os(4)).and.(( l_BS_magnons).and.n_sp_pol==2)) call error(" TDDFT_ALDA_R_space: wrong spin index") + ! + if (mode=="RES") then + call WF_apply_symm_cpu(is,WF_symm1_p) + call WF_apply_symm_cpu(os,WF_symm2_p) + else if (mode=="CPL") then + call WF_apply_symm_cpu(is,WF_symm2_p) + call WF_apply_symm_cpu(os,WF_symm1_p) + endif + ! + if( n_spin==1 ) then + ! + if ( l_use_rho_map) rhotwr_p(rho_map(:))=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + if (.not.l_use_rho_map) rhotwr_p( : )=F_xc_mat( : ,1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,1,1,2)) + ! + endif + ! + if(n_sp_pol==2) then + ! + do i_sp_loop=1,n_sp_pol + do o_sp_loop=1,n_sp_pol + ! This takes into account the different conventions between the definition of the spin indexes + ! between yambo and the derivation of fxc in spin space for magnons + ! This happens because in the yambo convention the left indexes "v sigma_v, c sigma_c, k" are inverted + ! with respect to the standard convention, i.e. "c sigma_c, v sigma_v, k" + ! As a result f_\up\dn,\dn\up is in yambo f_\dn\up,\dn\up and so on + is_yambo=i_sp_loop + os_yambo=o_sp_loop + ! To check/fix the spinorial version + if ( l_use_rho_map) rhotwr_p(rho_map(:))=F_xc_mat(rho_map(:),is_yambo,os_yambo,is(4),os(4))* & + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + if (.not.l_use_rho_map) rhotwr_p(rho_map(:))=F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_sp_loop,o_sp_loop,2)) + ! + enddo + enddo + endif + ! + if(n_spinor==2) then + ! + rhotwr_p=cZERO + do i_spinor=1,n_spinor + do j_spinor=1,n_spinor + i_spinor_y=j_spinor + j_spinor_y=i_spinor + do ip_spinor=1,n_spinor + do jp_spinor=1,n_spinor + do irho=1,rho_map_size + if( l_use_rho_map) ifft=rho_map(irho) + if(.not.l_use_rho_map) ifft= irho + rhotwr_p(ifft)=rhotwr_p(ifft)+ & + & F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)* & + & WF_symm1_p(irho,ip_spinor)*conjg(WF_symm2_p(irho,jp_spinor)) + enddo + enddo + enddo + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,2)) + ! + enddo + enddo + endif + ! + write(*,*) "R",i_T_grp,i_T_el,BS_T_grp(i_T_grp)%O_tddft(1:2,i_T_el,1,1,2) + ! + enddo + ! + nullify(WF_symm1_p) + nullify(WF_symm2_p) + nullify(rhotwr_p) + ! + call timing('T_space ALDA Osc.',OPR='stop') + ! +end subroutine TDDFT_ALDA_eh_space_G_collisions_R +! +! +#include +! +! +subroutine perform_fft_3d(rhotw,O_x) + ! + use BS, ONLY:BS_n_g_fxc + use pars, ONLY:cZERO,cONE,DP,SP + use FFT_m, ONLY:fftw_plan,cufft_plan,fft_size,fft_dim,DEV_VAR(fft_g_table) + ! + implicit none + ! + integer :: ig,iGo + ! + complex(SP), intent(in) :: rhotw(fft_size) + complex(SP), intent(out) :: O_x(BS_n_g_fxc) + ! + !O_x(1:10)=rhotw(1:10) + !return + ! + ! perform the actual FFT + ! +#if defined _CUDA + ! + call fft_3d_cuda(rhotw,fft_dim,+1,cufft_plan) + ! +#else + ! +# if defined _FFTW + call fft_3d(rhotw,fft_dim,+1,fftw_plan) +# elif defined _FFTSG || (defined _USE_3D_FFT && defined _FFTQE) + call fft_3d(rhotw,fft_dim,+1) +# elif defined _FFTQE + ! + ! the QE fft must be performed in the right + ! direction. conjg is taken care separately + ! AF: please note the different definition of isc%rho_tw_rs above + ! (one extra conjg has been added) + ! + call fft_3d(rhotw,fft_dim,-1) + ! +# else +# error "[CPP] Inconsistent FFT environment" +# endif + ! +#endif + ! + iGo=1 + ! +#if defined _FFTQE && !defined _USE_3D_FFT && !defined _CUDA_LOC + ! + ! one extra conjg is performed on rho_tw_rs + ! + !$omp parallel do default(shared), private(ig) + do ig = 1, BS_n_g_fxc + O_x(ig)= cmplx(conjg(rhotw(fft_g_table(ig,iGo))),kind=SP) + enddo + ! +#else + ! +#ifdef _CUDA_LOC + !$cuf kernel do(1) <<<*,*>>> +#else + !$omp parallel do default(shared), private(ig) +#endif + do ig = 1, BS_n_g_fxc + O_x(ig)= cmplx(rhotw(DEV_VAR(fft_g_table)(ig,iGo)),kind=SP) + enddo + ! +#endif + ! +end subroutine perform_fft_3d diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F new file mode 100644 index 0000000000..32404887e4 --- /dev/null +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -0,0 +1,58 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2015 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) + ! + ! Calculates the F_xc scattering + ! + ! mode 1 + ! + ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) + ! :Fxc: + ! (iv(1),ik(3),is(3)) -->--:...:-->-- (iv(2),ik(4),is(4)) + ! + ! mode 2 + ! + ! (ic(1),ik(1),is(1)) --<--:...:--<-- (iv(2),ik(2),is(2)) + ! :Fxc: + ! (iv(1),ik(3),is(3)) -->--:...:-->-- (ic(2),ik(4),is(4)) + ! + use pars, ONLY:SP,pi,cZERO + use FFT_m, ONLY:fft_size + use BS, ONLY:BS_T_group + use wrapper_omp, ONLY:Vstar_dot_V_omp + use electrons, ONLY:n_spinor + ! + implicit none + ! + integer, intent(in) :: BS_n_g_fxc,i_Tp,i_Tk + type(BS_T_group), target, intent(in) :: BS_T_grp_ip,BS_T_grp_ik + ! + complex(SP) :: H_x + ! + integer :: i_sp_xc,o_sp_xc + ! + if (n_spinor==1) then + H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft(:,i_Tp,1,1,1),BS_T_grp_ik%O_tddft(:,i_Tk,1,1,2)) + else if (n_spinor==2) then + H_x=cZERO + do i_sp_xc=1,n_spinor + do o_sp_xc=1,n_spinor + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft(:,i_Tp,i_sp_xc,o_sp_xc,1),& + & BS_T_grp_ik%O_tddft(:,i_Tk,i_sp_xc,o_sp_xc,2)) + enddo + enddo + endif + ! + ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K + ! X = fft_size*spin_occ/DL_vol/Nq + ! Co = 4*pi*spin_occ/DL_vol/Nq + ! --> X/Co = fft_size/4/pi + ! + H_x=H_x*real(fft_size,SP)/4._SP/pi + ! +end function diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F similarity index 100% rename from src/tddft/TDDFT_ALDA_R_space.F rename to src/tddft/TDDFT_ALDA_eh_space_R_kernel.F diff --git a/src/tddft/TDDFT_ALDA_lower_cutoff.F b/src/tddft/TDDFT_ALDA_lower_cutoff.F index 69cb1e675b..bb762c087b 100644 --- a/src/tddft/TDDFT_ALDA_lower_cutoff.F +++ b/src/tddft/TDDFT_ALDA_lower_cutoff.F @@ -34,7 +34,7 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) ! implicit none ! - character(10) :: ALDA_cut_scheme + character(12) :: ALDA_cut_scheme ! ! Work Space ! @@ -42,11 +42,11 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) complex(DP) :: F_xc_DP(fft_size),F_xc_DP_reduced(fft_size) logical :: l_lower_GmGp, l_lower_Gmax, l_use_fullgd ! - if(trim(ALDA_cut_scheme)=="none") return + if(index(ALDA_cut_scheme,"none")>0) return ! - l_lower_GmGp=trim(ALDA_cut_scheme)=="lower_GmGp" - l_lower_Gmax=trim(ALDA_cut_scheme)=="lower_Gmax" - l_use_fullgd=trim(ALDA_cut_scheme)=="full_grid" + l_lower_GmGp=index(ALDA_cut_scheme,"lower_GmGp")>0 + l_lower_Gmax=index(ALDA_cut_scheme,"lower_Gmax")>0 + l_use_fullgd=index(ALDA_cut_scheme,"full_grid")>0 ! if (l_lower_GmGp) then BS_n_g_fxc=maxval(G_m_G(:FXC_n_g_corr,:FXC_n_g_corr)) From 7f36b411696dcb11263816d4e067cbf94b6e6e96 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 27 Oct 2023 10:22:23 +0200 Subject: [PATCH 0686/1367] Version 5.2.0, Revision 22987, Hash 7d9d8895fc MODIFIED * include/version/version.m4 bse/K_kernel.F modules/mod_TDDFT.F tddft/TDDFT_ALDA_eh_space_G_collisions.F tddft/TDDFT_ALDA_eh_space_G_kernel.F Changes: - [yambo] New implementation fixed Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +-- src/bse/K_kernel.F | 10 +++-- src/modules/mod_TDDFT.F | 5 ++- src/tddft/TDDFT_ALDA_eh_space_G_collisions.F | 46 +++++++++----------- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 8 ++-- 5 files changed, 37 insertions(+), 38 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 009122f4b4..3041c8d008 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22885 h.41fc9d87d4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22987 h.7d9d8895fc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22885" -SHASH="41fc9d87d4" +SREVISION="22987" +SHASH="7d9d8895fc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 2e9fd58c53..8879a024b3 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -338,7 +338,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(tddft_wf%rhotwr1,(rho_map_size*n_spinor*n_spinor)) YAMBO_ALLOC(tddft_wf%rhotwr2,(rho_map_size*n_spinor*n_spinor)) else if (l_tddft_gsum) then - YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size)) + YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) endif ! YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) @@ -791,8 +791,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! !if (l_tddft_gsum) call TDDFT_oscillators_free(BS_nT_grps) ! - YAMBO_FREE(tddft_wf%rhotwr1) - YAMBO_FREE(tddft_wf%rhotwr2) + if (l_tddft_rsum) then + YAMBO_FREE(tddft_wf%rhotwr1) + YAMBO_FREE(tddft_wf%rhotwr2) + else if (l_tddft_gsum) then + YAMBO_FREE(tddft_wf%rhotwr_DP) + endif YAMBO_FREE(tddft_wf%WF_symm1) YAMBO_FREE(tddft_wf%WF_symm2) ! diff --git a/src/modules/mod_TDDFT.F b/src/modules/mod_TDDFT.F index df3fbae468..6532724d84 100644 --- a/src/modules/mod_TDDFT.F +++ b/src/modules/mod_TDDFT.F @@ -3,12 +3,12 @@ ! ! Copyright (C) 2006 The Yambo Team ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS ! module TDDFT ! use descriptors,ONLY:IO_desc - use pars, ONLY:SP,lchlen,schlen + use pars, ONLY:SP,DP,lchlen,schlen ! implicit none ! @@ -30,6 +30,7 @@ module TDDFT complex(SP), allocatable :: F_xc_gspace(:,:,:) ! type tddft_wf_t + complex(DP), allocatable :: rhotwr_DP(:) complex(SP), allocatable :: rhotwr1(:) complex(SP), allocatable :: rhotwr2(:) complex(SP), allocatable :: WF_symm1(:,:) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F index 39ce82f77d..dbdf685113 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F @@ -12,7 +12,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) ! :sqrt(Fxc): ! - use pars, ONLY:SP,pi,cZERO + use pars, ONLY:SP,DP,pi,cZERO use FFT_m, ONLY:fft_size use wave_func, ONLY:rho_map_size,rho_map,WF use interfaces, ONLY:WF_load,WF_free @@ -38,7 +38,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_grp_p,is(4),os(4),NK(2) ! - complex(SP), pointer :: rhotwr_p(:) + complex(DP), pointer :: rhotwr_p(:) complex(SP), pointer :: WF_symm1_p(:,:) complex(SP), pointer :: WF_symm2_p(:,:) ! @@ -50,7 +50,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! WF_symm1_p => tddft_wf%WF_symm1 WF_symm2_p => tddft_wf%WF_symm2 - rhotwr_p => tddft_wf%rhotwr2 + rhotwr_p => tddft_wf%rhotwr_DP ! ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) @@ -109,9 +109,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l call WF_apply_symm_cpu(os,WF_symm2_p) ! if( n_spinor==1 ) then - if( l_use_rho_map) rhotwr_p(rho_map(:))=WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) - if(.not.l_use_rho_map) rhotwr_p( : )=WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) - write(*,*) "L",i_T_grp,i_T_el,rhotwr_p(1:2),WF_symm1_p(1:2,1),WF_symm2_p(1:2,1) + if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,is(4),os(4),1)) endif ! @@ -123,7 +122,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l do irho=1,rho_map_size if( l_use_rho_map) ifft=rho_map(irho) if(.not.l_use_rho_map) ifft= irho - rhotwr_p(ifft)=WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)) + rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) enddo call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,1)) ! @@ -131,8 +130,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l enddo endif ! - write(*,*) "L",i_T_grp,i_T_el,BS_T_grp(i_T_grp)%O_tddft(1:2,i_T_el,1,1,1) - ! enddo ! nullify(WF_symm1_p) @@ -151,7 +148,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) ! :sqrt(Fxc): ! - use pars, ONLY:SP,pi,cZERO + use pars, ONLY:SP,DP,pi,cZERO use FFT_m, ONLY:fft_size use wave_func, ONLY:rho_map_size,rho_map,WF use xc_functionals, ONLY:F_xc_mat @@ -180,7 +177,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_grp_p,is(4),os(4),NK(2) ! - complex(SP), pointer :: rhotwr_p(:) + complex(DP), pointer :: rhotwr_p(:) complex(SP), pointer :: WF_symm1_p(:,:) complex(SP), pointer :: WF_symm2_p(:,:) ! @@ -192,7 +189,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! WF_symm1_p => tddft_wf%WF_symm1 WF_symm2_p => tddft_wf%WF_symm2 - rhotwr_p => tddft_wf%rhotwr2 + rhotwr_p => tddft_wf%rhotwr_DP ! ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) @@ -257,8 +254,10 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! if( n_spin==1 ) then ! - if ( l_use_rho_map) rhotwr_p(rho_map(:))=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) - if (.not.l_use_rho_map) rhotwr_p( : )=F_xc_mat( : ,1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),1,1,1,1)*& + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,1,1,1,1)*& + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,1,1,2)) ! endif @@ -275,10 +274,10 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l is_yambo=i_sp_loop os_yambo=o_sp_loop ! To check/fix the spinorial version - if ( l_use_rho_map) rhotwr_p(rho_map(:))=F_xc_mat(rho_map(:),is_yambo,os_yambo,is(4),os(4))* & - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) - if (.not.l_use_rho_map) rhotwr_p(rho_map(:))=F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) + if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),is_yambo,os_yambo,is(4),os(4))* & + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + if (.not.l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_sp_loop,o_sp_loop,2)) ! enddo @@ -309,8 +308,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l enddo endif ! - write(*,*) "R",i_T_grp,i_T_el,BS_T_grp(i_T_grp)%O_tddft(1:2,i_T_el,1,1,2) - ! enddo ! nullify(WF_symm1_p) @@ -328,19 +325,16 @@ end subroutine TDDFT_ALDA_eh_space_G_collisions_R subroutine perform_fft_3d(rhotw,O_x) ! use BS, ONLY:BS_n_g_fxc - use pars, ONLY:cZERO,cONE,DP,SP + use pars, ONLY:cZERO,cONE,DP,SP,DP use FFT_m, ONLY:fftw_plan,cufft_plan,fft_size,fft_dim,DEV_VAR(fft_g_table) ! implicit none ! integer :: ig,iGo ! - complex(SP), intent(in) :: rhotw(fft_size) + complex(DP), intent(in) :: rhotw(fft_size) complex(SP), intent(out) :: O_x(BS_n_g_fxc) ! - !O_x(1:10)=rhotw(1:10) - !return - ! ! perform the actual FFT ! #if defined _CUDA @@ -376,7 +370,7 @@ subroutine perform_fft_3d(rhotw,O_x) ! !$omp parallel do default(shared), private(ig) do ig = 1, BS_n_g_fxc - O_x(ig)= cmplx(conjg(rhotw(fft_g_table(ig,iGo))),kind=SP) + O_x(ig)= cmplx(conjg(rhotw(fft_g_table)(ig,iGo)),kind=SP) enddo ! #else diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 32404887e4..3111eda2e7 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -49,10 +49,10 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik endif ! ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K - ! X = fft_size*spin_occ/DL_vol/Nq - ! Co = 4*pi*spin_occ/DL_vol/Nq - ! --> X/Co = fft_size/4/pi + ! X = spin_occ/DL_vol/Nq + ! Co = 4*pi*spin_occ/DL_vol/Nq + ! --> X/Co = 1/4/pi ! - H_x=H_x*real(fft_size,SP)/4._SP/pi + H_x=H_x/4._SP/pi ! end function From 95e2b453a2a0996384c963f74e7fae5248150161 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 27 Oct 2023 13:14:40 +0200 Subject: [PATCH 0687/1367] Version 5.2.0, Revision 22988, Hash 7f36b41169 MODIFIED * include/version/version.m4 bse/K_kernel.F interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F modules/mod_TDDFT.F modules/mod_interfaces.F tddft/.objects tddft/TDDFT_ALDA_eh_space_G_kernel.F tddft/TDDFT_ALDA_eh_space_R_kernel.F tddft/TDDFT_ALDA_lower_cutoff.F NEW * tddft/TDDFT_ALDA_eh_space_G_collisions_L.F RENAMED * tddft/TDDFT_ALDA_eh_space_G_collisions.F -> tddft/TDDFT_ALDA_eh_space_G_collisions_R.F Bugs: - Fixed new implementation for case n_sp_pol=2 Changes: - Logic of the code improved Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- src/bse/K_kernel.F | 27 +-- src/interface/INIT_activate.F | 4 +- src/interface/INIT_load.F | 4 +- src/modules/SET_defaults.F | 4 +- src/modules/mod_TDDFT.F | 2 +- src/modules/mod_interfaces.F | 6 +- src/tddft/.objects | 2 +- .../TDDFT_ALDA_eh_space_G_collisions_L.F | 211 +++++++++++++++++ ...F => TDDFT_ALDA_eh_space_G_collisions_R.F} | 218 +----------------- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 15 +- src/tddft/TDDFT_ALDA_eh_space_R_kernel.F | 12 +- src/tddft/TDDFT_ALDA_lower_cutoff.F | 12 +- 13 files changed, 268 insertions(+), 255 deletions(-) create mode 100644 src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F rename src/tddft/{TDDFT_ALDA_eh_space_G_collisions.F => TDDFT_ALDA_eh_space_G_collisions_R.F} (51%) diff --git a/include/version/version.m4 b/include/version/version.m4 index 3041c8d008..1c769fa7d0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22987 h.7d9d8895fc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22988 h.7f36b41169, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22987" -SHASH="7d9d8895fc" +SREVISION="22988" +SHASH="7f36b41169" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 8879a024b3..744f6f8212 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -15,7 +15,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use frequency, ONLY:w_samp use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_sp_pol use FFT_m, ONLY:fft_size - use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G,TDDFT_ALDA_R_space + use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G,TDDFT_ALDA_eh_space_R_kernel use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab use R_lattice, ONLY:G_m_G_maxval,qindx_X,bz_samp,g_rot,& & qindx_B,qindx_B_max,qindx_B_load,RIM_W,& @@ -39,7 +39,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR,RD,WR_CL,OP_APP,deliver_IO_error_message,WR use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc, & -& ALDA_cut_scheme,tddft_wf_t +& FXC_mode,tddft_wf_t use xc_functionals,ONLY:V_xc,F_xc,F_xc_mat,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind,WF_exx_fraction use wave_func, ONLY:WF,rho_map,rho_map_thresh,rho_map_size @@ -193,16 +193,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif ! if (BS_K_is_ALDA) then - l_tddft_gsum=(index(ALDA_cut_scheme,"-G")>0 ) - l_tddft_rsum=(index(ALDA_cut_scheme,"-G")==0) - if(index(ALDA_cut_scheme,"lower_GmGp")>0) then - FXC_n_g_corr=BS_n_g_fxc - if (BS_n_g_fxc/= eval_G_minus_G(BS_n_g_fxc,0) ) then - BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) - call msg('s','[TDDFT] ALDA Fxc cutoff is forced by symmetry to be ',BS_n_g_fxc) + l_tddft_gsum=(index(FXC_mode,"G-")>0) + l_tddft_rsum=(index(FXC_mode,"R-")>0) + if( .not.(l_tddft_gsum.or.l_tddft_rsum) ) call error("Wrong FXC_mode:"//trim(FXC_mode)) + if(index(FXC_mode,"cut_GmGp")>0) then + FXC_n_g_corr=BS_n_g_fxc + if (BS_n_g_fxc/= eval_G_minus_G(BS_n_g_fxc,0) ) then + BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) + call msg('s','[TDDFT] Fxc cutoff is forced by symmetry to be ',BS_n_g_fxc) + endif endif endif - endif ! call K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) ! @@ -362,7 +363,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(magn) endif ! - call TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) + call TDDFT_ALDA_lower_cutoff(FXC_mode) ! call WF_free(WF,keep_states_to_load=.true.) ! @@ -683,7 +684,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! ALDA if (iHxc==2) then - if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'RES') + if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'RES') if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, & & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif @@ -711,7 +712,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! ALDA if (iHxc==2) then - if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_R_space(is_k,os_k,is_p,os_p,tddft_wf,'CPL') + if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'CPL') if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, & & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 84e32fa551..b0e98ed4a9 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -167,7 +167,7 @@ subroutine INIT_activate() if(l_bs_fxc) call initactivate(1,'FxcGRLc FxcSVdig FxcRetarded') ! ! ALDA/LRC Tddft - if (l_alda_fxc) call initactivate(1,'FxcGRLc FxcLibxc FxcCutScheme UseNLCC') + if (l_alda_fxc) call initactivate(1,'FxcGRLc FxcLibxc FxcMode UseNLCC') if (l_lrc_fxc) call initactivate(1,'LRC_alpha LRC_beta') if (l_pf_fxc) call initactivate(1,'PF_alpha') ! @@ -218,7 +218,7 @@ subroutine INIT_activate() if(l_td_hf.or.l_td_sex) call initactivate(1,'BSENGBlk') if(l_td_sex) call initactivate(1,'WehDiag WehCpl') if(l_alda_fxc) then - call initactivate(1,'BSENGfxc FxcLibxc FxcCutScheme') + call initactivate(1,'BSENGfxc FxcLibxc FxcMode') if( (WF_exx_fraction>0.) .or. (WF_exx_screening>0.) ) call initactivate(1,'BSENGBlk WehDiag WehCpl') endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 6a3b37b6d0..d40c15e661 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -42,7 +42,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & BSS_slepc_precondition,BSS_slepc_approach #endif use TDDFT, ONLY:FXC_n_g_corr,FXC_per_memstps,FXC_LRC_alpha,FXC_LRC_beta, & -& FXC_SVD_digits,FXC_PF_alpha,ALDA_cut_scheme +& FXC_SVD_digits,FXC_PF_alpha,FXC_mode use ACFDT, ONLY:ACFDT_n_lambda,ACFDT_n_freqs,ACFDT_E_range use functions, ONLY:bose_E_cut use parallel_m, ONLY:n_log_CPUs @@ -288,7 +288,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) call it(defs,'BSENGfxc','[BSK] Fxc components', BS_n_g_fxc,G_unit,verb_level=V_resp) call it(defs,'RhoMapThresh','[BSK] Density cutoff for integrals region',rho_map_thresh,verb_level=V_resp) - call it(defs,'FxcCutScheme', '[TDDFT] ("none","lower_Gmax","lower_GmGp","full_grid") ',ALDA_cut_scheme,verb_level=V_resp) + call it(defs,'FxcMode', '[TDDFT] ("G-XXX" or "R-XXX" with XXX=def/full/cut_Gmax/cut_GmGp") ',FXC_mode,verb_level=V_resp) call it(defs,'BSEEhEny','[BSK] Electron-hole energy range',BS_eh_en,E_unit,verb_level=V_resp) call it(defs,'BSKCut', '[BSK] Cutoff on the BSE Kernel, 0=full 1=none',BS_K_cutoff,verb_level=V_resp) call it(defs,'BSKIOmode','[BSK] ("1D_linear"/"2D_standard" + "norestart")',BSK_IO_mode,verb_level=V_resp) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index f7e89a0a6a..94567e08f6 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -59,7 +59,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use BS, ONLY:BS_n_g_W,BS_eh_en,BS_identifier,BS_q,BS_eh_win,MAX_BSK_LIN_size,& & BS_K_dim,BS_not_const_eh_f,BSK_mode,l_BSE_kernel_complete,& & BS_K_is_ALDA,BSE_mode,BSE_prop,BSE_L_kind,BS_K_cutoff,BS_perturbative_SOC,BSK_IO_mode - use TDDFT, ONLY:FXC_type,FXC_n_g_corr,ALDA_cut_scheme,& + use TDDFT, ONLY:FXC_type,FXC_n_g_corr,FXC_mode,& & FXC_per_memstps,FXC_LRC_alpha,FXC_PF_alpha,FXC_LRC_beta,FXC_SVD_digits,& & FXC_is_retarded,TDDFT_mode use ACFDT, ONLY:ACFDT_n_lambda,ACFDT_n_freqs,ACFDT_E_range @@ -445,7 +445,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) BSK_IO_mode='2D_standard' l_BSE_kernel_complete=.false. TDDFT_mode=' ' - ALDA_cut_scheme="none" + FXC_mode="G-def" BSS_Wd=cZERO l_drude=.false. BS_K_dim=0 diff --git a/src/modules/mod_TDDFT.F b/src/modules/mod_TDDFT.F index 6532724d84..a60aef0731 100644 --- a/src/modules/mod_TDDFT.F +++ b/src/modules/mod_TDDFT.F @@ -37,7 +37,7 @@ module TDDFT complex(SP), allocatable :: WF_symm2(:,:) end type tddft_wf_t ! - character(12) :: ALDA_cut_scheme + character(12) :: FXC_mode ! interface ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 6038fd2104..1777734d88 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -284,14 +284,14 @@ subroutine QP_state_print(qp) type(QP_t),optional ::qp end subroutine ! - function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) + function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) use pars, ONLY:SP use TDDFT, ONLY:tddft_wf_t - complex(SP) :: TDDFT_ALDA_R_space + complex(SP) :: H_x integer, intent(in) :: is(4),os(4),isp(4),osp(4) character(3), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf - end function TDDFT_ALDA_R_space + end function TDDFT_ALDA_eh_space_R_kernel ! end interface ! diff --git a/src/tddft/.objects b/src/tddft/.objects index 41d2d98d3d..55a78a4d9e 100644 --- a/src/tddft/.objects +++ b/src/tddft/.objects @@ -1,5 +1,5 @@ objs = TDDFT_BSK_2_FXC.o TDDFT_BSK_disk_2_FXC.o \ TDDFT_do_X_W_typs.o \ TDDFT_ALDA_G_space.o TDDFT_ALDA_lower_cutoff.o TDDFT_ALDA_eh_space_R_kernel.o \ - TDDFT_ALDA_eh_space_G_collisions.o TDDFT_ALDA_eh_space_G_kernel.o \ + TDDFT_ALDA_eh_space_G_collisions_L.o TDDFT_ALDA_eh_space_G_collisions_R.o TDDFT_ALDA_eh_space_G_kernel.o \ TDDFT_PF_coefficient.o diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F new file mode 100644 index 0000000000..380b1484d5 --- /dev/null +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -0,0 +1,211 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2015 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf) + ! + ! Calculates the F_xc scattering + ! + ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) + ! :sqrt(Fxc): + ! + use pars, ONLY:SP,DP,pi,cZERO + use FFT_m, ONLY:fft_size + use wave_func, ONLY:rho_map_size,rho_map,WF + use interfaces, ONLY:WF_load,WF_free + use R_lattice, ONLY:qindx_X,bz_samp + use BS, ONLY:l_BS_magnons,TDDFT_oscillators_alloc,BS_T_grp,BS_bands + use electrons, ONLY:n_spinor,n_sp_pol,n_spin + use timing_m, ONLY:timing + use openmp, ONLY:OPENMP_update,master_thread + !use interfaces, ONLY:WF_apply_symm + use TDDFT, ONLY:tddft_wf_t + ! + implicit none + ! + type(bz_samp),intent(in) :: Xk + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_exch_wf_in_loop + type(tddft_wf_t), target, intent(inout) :: tddft_wf + ! + ! Work Space + ! + logical :: l_use_rho_map,l_load_WFs + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y + integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& +& i_sp,i_T_grp_p,is(4),os(4),NK(2) + ! + complex(DP), pointer :: rhotwr_p(:) + complex(SP), pointer :: WF_symm1_p(:,:) + complex(SP), pointer :: WF_symm2_p(:,:) + ! + call timing('T_space ALDA Osc.',OPR='start') + ! + ! Allocate + ! + call TDDFT_oscillators_alloc(i_T_grp) + ! + WF_symm1_p => tddft_wf%WF_symm1 + WF_symm2_p => tddft_wf%WF_symm2 + rhotwr_p => tddft_wf%rhotwr_DP + ! + ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation + l_use_rho_map=allocated(rho_map) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp parallel default(shared), private( K_EXCH_collision, & + !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & + !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & + !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2, Nk, is, os) +#endif + ! + call OPENMP_update(master_thread) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp do schedule(dynamic) +#endif + NK=-1 + do i_T_el=1,BS_T_grp(i_T_grp)%size + ! + i_k_bz=BS_T_grp(i_T_grp)%table(i_T_el,1) + i_k =Xk%sstar(i_k_bz,1) + i_s =Xk%sstar(i_k_bz,2) + ! + i_p_bz=qindx_X(iq,i_k_bz,1) + i_g_p =qindx_X(iq,i_k_bz,2) + ! + i_p =Xk%sstar(i_p_bz,1) + i_sp =Xk%sstar(i_p_bz,2) + ! + i_v =BS_T_grp(i_T_grp)%table(i_T_el,2) + i_c =BS_T_grp(i_T_grp)%table(i_T_el,3) + i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) + i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) + ! + is=(/i_c,i_k,i_s,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + ! +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) + endif +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + ! + if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") + if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") + ! + call WF_apply_symm_cpu(is,WF_symm1_p) + call WF_apply_symm_cpu(os,WF_symm2_p) + ! + if( n_spinor==1 ) then + if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,1,1,1)) + endif + ! + if(n_spinor==2) then + ! + do i_spinor=1,n_spinor + do j_spinor=1,n_spinor + ! + do irho=1,rho_map_size + if( l_use_rho_map) ifft=rho_map(irho) + if(.not.l_use_rho_map) ifft= irho + rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) + enddo + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,1)) + ! + enddo + enddo + endif + ! + enddo + ! + nullify(WF_symm1_p) + nullify(WF_symm2_p) + nullify(rhotwr_p) + ! + call timing('T_space ALDA Osc.',OPR='stop') + ! +end subroutine TDDFT_ALDA_eh_space_G_collisions_L +! +! +#include +! +! +subroutine perform_fft_3d(rhotw,O_x) + ! + use BS, ONLY:BS_n_g_fxc + use pars, ONLY:cZERO,cONE,DP,SP,DP + use FFT_m, ONLY:fftw_plan,cufft_plan,fft_size,fft_dim,DEV_VAR(fft_g_table) + ! + implicit none + ! + integer :: ig,iGo + ! + complex(DP), intent(in) :: rhotw(fft_size) + complex(SP), intent(out) :: O_x(BS_n_g_fxc) + ! + ! perform the actual FFT + ! +#if defined _CUDA + ! + call fft_3d_cuda(rhotw,fft_dim,+1,cufft_plan) + ! +#else + ! +# if defined _FFTW + call fft_3d(rhotw,fft_dim,+1,fftw_plan) +# elif defined _FFTSG || (defined _USE_3D_FFT && defined _FFTQE) + call fft_3d(rhotw,fft_dim,+1) +# elif defined _FFTQE + ! + ! the QE fft must be performed in the right + ! direction. conjg is taken care separately + ! AF: please note the different definition of isc%rho_tw_rs above + ! (one extra conjg has been added) + ! + call fft_3d(rhotw,fft_dim,-1) + ! +# else +# error "[CPP] Inconsistent FFT environment" +# endif + ! +#endif + ! + iGo=1 + ! +#if defined _FFTQE && !defined _USE_3D_FFT && !defined _CUDA_LOC + ! + ! one extra conjg is performed on rho_tw_rs + ! + !$omp parallel do default(shared), private(ig) + do ig = 1, BS_n_g_fxc + O_x(ig)= cmplx(conjg(rhotw(fft_g_table)(ig,iGo)),kind=SP) + enddo + ! +#else + ! +#ifdef _CUDA_LOC + !$cuf kernel do(1) <<<*,*>>> +#else + !$omp parallel do default(shared), private(ig) +#endif + do ig = 1, BS_n_g_fxc + O_x(ig)= cmplx(rhotw(DEV_VAR(fft_g_table)(ig,iGo)),kind=SP) + enddo + ! +#endif + ! +end subroutine perform_fft_3d diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F similarity index 51% rename from src/tddft/TDDFT_ALDA_eh_space_G_collisions.F rename to src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index dbdf685113..24ea98ffd8 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -5,142 +5,6 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf) - ! - ! Calculates the F_xc scattering - ! - ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) - ! :sqrt(Fxc): - ! - use pars, ONLY:SP,DP,pi,cZERO - use FFT_m, ONLY:fft_size - use wave_func, ONLY:rho_map_size,rho_map,WF - use interfaces, ONLY:WF_load,WF_free - use R_lattice, ONLY:qindx_X,bz_samp - use BS, ONLY:l_BS_magnons,TDDFT_oscillators_alloc,BS_T_grp,BS_bands - use electrons, ONLY:n_spinor,n_sp_pol,n_spin - use timing_m, ONLY:timing - use openmp, ONLY:OPENMP_update,master_thread - !use interfaces, ONLY:WF_apply_symm - use TDDFT, ONLY:tddft_wf_t - ! - implicit none - ! - type(bz_samp),intent(in) :: Xk - integer, intent(in) :: iq,i_T_grp,NG(2) - logical, intent(in) :: l_bs_exch_wf_in_loop - type(tddft_wf_t), target, intent(inout) :: tddft_wf - ! - ! Work Space - ! - logical :: l_use_rho_map,l_load_WFs - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y - integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& -& i_sp,i_T_grp_p,is(4),os(4),NK(2) - ! - complex(DP), pointer :: rhotwr_p(:) - complex(SP), pointer :: WF_symm1_p(:,:) - complex(SP), pointer :: WF_symm2_p(:,:) - ! - call timing('T_space ALDA Osc.',OPR='start') - ! - ! Allocate - ! - call TDDFT_oscillators_alloc(i_T_grp) - ! - WF_symm1_p => tddft_wf%WF_symm1 - WF_symm2_p => tddft_wf%WF_symm2 - rhotwr_p => tddft_wf%rhotwr_DP - ! - ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation - l_use_rho_map=allocated(rho_map) - ! -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp parallel default(shared), private( K_EXCH_collision, & - !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & - !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & - !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2, Nk, is, os) -#endif - ! - call OPENMP_update(master_thread) - ! -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp do schedule(dynamic) -#endif - NK=-1 - do i_T_el=1,BS_T_grp(i_T_grp)%size - ! - i_k_bz=BS_T_grp(i_T_grp)%table(i_T_el,1) - i_k =Xk%sstar(i_k_bz,1) - i_s =Xk%sstar(i_k_bz,2) - ! - i_p_bz=qindx_X(iq,i_k_bz,1) - i_g_p =qindx_X(iq,i_k_bz,2) - ! - i_p =Xk%sstar(i_p_bz,1) - i_sp =Xk%sstar(i_p_bz,2) - ! - i_v =BS_T_grp(i_T_grp)%table(i_T_el,2) - i_c =BS_T_grp(i_T_grp)%table(i_T_el,3) - i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) - i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) - ! - is=(/i_c,i_k,i_s,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) - ! -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp critical -#endif - l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) - if (l_load_WFs) then - if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) - NK=(/min(i_k,i_p),max(i_k,i_p)/) - call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& - & space='R',title="Kernel exch",keep_states_to_load=.true.) - endif -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp end critical -#endif - ! - if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") - if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") - ! - call WF_apply_symm_cpu(is,WF_symm1_p) - call WF_apply_symm_cpu(os,WF_symm2_p) - ! - if( n_spinor==1 ) then - if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,is(4),os(4),1)) - endif - ! - if(n_spinor==2) then - ! - do i_spinor=1,n_spinor - do j_spinor=1,n_spinor - ! - do irho=1,rho_map_size - if( l_use_rho_map) ifft=rho_map(irho) - if(.not.l_use_rho_map) ifft= irho - rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) - enddo - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,1)) - ! - enddo - enddo - endif - ! - enddo - ! - nullify(WF_symm1_p) - nullify(WF_symm2_p) - nullify(rhotwr_p) - ! - call timing('T_space ALDA Osc.',OPR='stop') - ! -end subroutine TDDFT_ALDA_eh_space_G_collisions_L -! -! subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering @@ -198,7 +62,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l !$omp parallel default(shared), private( K_EXCH_collision, & !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & - !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2s, Nk, is, os) + !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2, Nk, is, os) #endif ! call OPENMP_update(master_thread) @@ -241,8 +105,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l !$omp end critical #endif ! - if ((is(4)/=os(4)).and.((.not.l_BS_magnons).or. n_sp_pol==1)) call error(" TDDFT_ALDA_R_space: wrong spin index") - if ((is(4)==os(4)).and.(( l_BS_magnons).and.n_sp_pol==2)) call error(" TDDFT_ALDA_R_space: wrong spin index") + if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") + if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! if (mode=="RES") then call WF_apply_symm_cpu(is,WF_symm1_p) @@ -271,12 +135,12 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! This happens because in the yambo convention the left indexes "v sigma_v, c sigma_c, k" are inverted ! with respect to the standard convention, i.e. "c sigma_c, v sigma_v, k" ! As a result f_\up\dn,\dn\up is in yambo f_\dn\up,\dn\up and so on - is_yambo=i_sp_loop - os_yambo=o_sp_loop + is_yambo=o_sp_loop + os_yambo=i_sp_loop ! To check/fix the spinorial version if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),is_yambo,os_yambo,is(4),os(4))* & & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - if (.not.l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & + if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_sp_loop,o_sp_loop,2)) ! @@ -317,73 +181,3 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l call timing('T_space ALDA Osc.',OPR='stop') ! end subroutine TDDFT_ALDA_eh_space_G_collisions_R -! -! -#include -! -! -subroutine perform_fft_3d(rhotw,O_x) - ! - use BS, ONLY:BS_n_g_fxc - use pars, ONLY:cZERO,cONE,DP,SP,DP - use FFT_m, ONLY:fftw_plan,cufft_plan,fft_size,fft_dim,DEV_VAR(fft_g_table) - ! - implicit none - ! - integer :: ig,iGo - ! - complex(DP), intent(in) :: rhotw(fft_size) - complex(SP), intent(out) :: O_x(BS_n_g_fxc) - ! - ! perform the actual FFT - ! -#if defined _CUDA - ! - call fft_3d_cuda(rhotw,fft_dim,+1,cufft_plan) - ! -#else - ! -# if defined _FFTW - call fft_3d(rhotw,fft_dim,+1,fftw_plan) -# elif defined _FFTSG || (defined _USE_3D_FFT && defined _FFTQE) - call fft_3d(rhotw,fft_dim,+1) -# elif defined _FFTQE - ! - ! the QE fft must be performed in the right - ! direction. conjg is taken care separately - ! AF: please note the different definition of isc%rho_tw_rs above - ! (one extra conjg has been added) - ! - call fft_3d(rhotw,fft_dim,-1) - ! -# else -# error "[CPP] Inconsistent FFT environment" -# endif - ! -#endif - ! - iGo=1 - ! -#if defined _FFTQE && !defined _USE_3D_FFT && !defined _CUDA_LOC - ! - ! one extra conjg is performed on rho_tw_rs - ! - !$omp parallel do default(shared), private(ig) - do ig = 1, BS_n_g_fxc - O_x(ig)= cmplx(conjg(rhotw(fft_g_table)(ig,iGo)),kind=SP) - enddo - ! -#else - ! -#ifdef _CUDA_LOC - !$cuf kernel do(1) <<<*,*>>> -#else - !$omp parallel do default(shared), private(ig) -#endif - do ig = 1, BS_n_g_fxc - O_x(ig)= cmplx(rhotw(DEV_VAR(fft_g_table)(ig,iGo)),kind=SP) - enddo - ! -#endif - ! -end subroutine perform_fft_3d diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 3111eda2e7..8a97a8aea0 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -34,16 +34,23 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik ! complex(SP) :: H_x ! - integer :: i_sp_xc,o_sp_xc + integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v,i_sk_v,i_sk_c + ! + i_sk_c=1 + i_sk_v=1 + ! + i_sp_c=BS_T_grp_ik%table(i_Tk,4) + i_sp_v=BS_T_grp_ik%table(i_Tk,5) ! if (n_spinor==1) then - H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft(:,i_Tp,1,1,1),BS_T_grp_ik%O_tddft(:,i_Tk,1,1,2)) + H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft(:,i_Tk,i_sk_c,i_sk_v,1),& + & BS_T_grp_ip%O_tddft(:,i_Tp,i_sp_c,i_sp_v,2) ) else if (n_spinor==2) then H_x=cZERO do i_sp_xc=1,n_spinor do o_sp_xc=1,n_spinor - H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft(:,i_Tp,i_sp_xc,o_sp_xc,1),& - & BS_T_grp_ik%O_tddft(:,i_Tk,i_sp_xc,o_sp_xc,2)) + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft(:,i_Tk,i_sp_xc,o_sp_xc,1),& + & BS_T_grp_ip%O_tddft(:,i_Tp,i_sp_xc,o_sp_xc,2) ) enddo enddo endif diff --git a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F index 8218939571..59bdeef2f7 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F @@ -3,9 +3,9 @@ ! ! Copyright (C) 2015 The Yambo Team ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS ! -function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) +function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) ! ! Calculates the F_xc scattering ! @@ -34,7 +34,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) ! implicit none ! - complex(SP) :: TDDFT_ALDA_R_space + complex(SP) :: H_x ! integer, intent(in) :: is(4),os(4),isp(4),osp(4) character(3), intent(in) :: mode @@ -56,7 +56,7 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) if ((is(4)==os(4).or.isp(4)==osp(4)).and.(( l_BS_magnons).and.n_sp_pol==2)) call error(" TDDFT_ALDA_R_space: wrong spin index") if (mode/="RES" .and. mode/="CPL" ) call error(" TDDFT_ALDA_R_space: unkown mode") ! - TDDFT_ALDA_R_space=cZERO + H_x=cZERO ! WF_symm1_p => tddft_wf%WF_symm1 WF_symm2_p => tddft_wf%WF_symm2 @@ -134,14 +134,14 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) ! ! SUM !===== - TDDFT_ALDA_R_space=V_dot_V_omp(rho_map_size*n_spinor*n_spinor,rhotwr1_p,rhotwr2_p) + H_x=V_dot_V_omp(rho_map_size*n_spinor*n_spinor,rhotwr1_p,rhotwr2_p) ! ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K ! X = fft_size*spin_occ/DL_vol/Nq ! Co = 4*pi*spin_occ/DL_vol/Nq ! --> X/Co = fft_size/4/pi ! - TDDFT_ALDA_R_space=TDDFT_ALDA_R_space*real(fft_size,SP)/4._SP/pi + H_x=H_x*real(fft_size,SP)/4._SP/pi ! call timing('T_space ALDA scatt.',OPR='stop') ! diff --git a/src/tddft/TDDFT_ALDA_lower_cutoff.F b/src/tddft/TDDFT_ALDA_lower_cutoff.F index bb762c087b..5c5a03f1b5 100644 --- a/src/tddft/TDDFT_ALDA_lower_cutoff.F +++ b/src/tddft/TDDFT_ALDA_lower_cutoff.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) +subroutine TDDFT_ALDA_lower_cutoff(FXC_mode) ! ! This subroutine performes a double FFT of F_xc ! F_xc(r) --> F_xc(G_l) --> F_xc(r) @@ -34,7 +34,7 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) ! implicit none ! - character(12) :: ALDA_cut_scheme + character(12) :: FXC_mode ! ! Work Space ! @@ -42,11 +42,11 @@ subroutine TDDFT_ALDA_lower_cutoff(ALDA_cut_scheme) complex(DP) :: F_xc_DP(fft_size),F_xc_DP_reduced(fft_size) logical :: l_lower_GmGp, l_lower_Gmax, l_use_fullgd ! - if(index(ALDA_cut_scheme,"none")>0) return + if(index(FXC_mode,"def")>0) return ! - l_lower_GmGp=index(ALDA_cut_scheme,"lower_GmGp")>0 - l_lower_Gmax=index(ALDA_cut_scheme,"lower_Gmax")>0 - l_use_fullgd=index(ALDA_cut_scheme,"full_grid")>0 + l_lower_GmGp=index(FXC_mode,"cut_GmGp")>0 + l_lower_Gmax=index(FXC_mode,"cut_Gmax")>0 + l_use_fullgd=index(FXC_mode,"full")>0 ! if (l_lower_GmGp) then BS_n_g_fxc=maxval(G_m_G(:FXC_n_g_corr,:FXC_n_g_corr)) From e27f9a4e2a67163b78c02c34dcd8a872621f6a9b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 27 Oct 2023 13:33:03 +0200 Subject: [PATCH 0688/1367] Version 5.2.0, Revision 22989, Hash 95e2b453a2 MODIFIED * include/version/version.m4 bse/K_kernel.F modules/mod_BS.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_G_kernel.F Changes: - [yambo] defiend left and right oscillators for tddft. This reduces the memory needed Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++-- src/bse/K_kernel.F | 18 +++------- src/modules/mod_BS.F | 35 ++++++++++++------- .../TDDFT_ALDA_eh_space_G_collisions_L.F | 8 ++--- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 16 ++++----- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 13 +++---- 6 files changed, 44 insertions(+), 52 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 1c769fa7d0..6f3e28052d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22988 h.7f36b41169, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22989 h.95e2b453a2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22988" -SHASH="7f36b41169" +SREVISION="22989" +SHASH="95e2b453a2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 744f6f8212..1414a90f92 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -29,7 +29,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& & BS_res_K_exchange,BS_Block_size,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& -& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,TDDFT_oscillators_free,& +& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,TDDFT_oscillators_alloc,TDDFT_oscillators_free,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,BS_correlation_oscillators_free,& & BS_exchange_oscillators_free,WF_phase,n_BS_blks,BS_blk,BS_T_grp,& & BS_nT_grps,BS_blks_free,l_BS_ares_from_res,& @@ -503,13 +503,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! TDDFT oscillators !---------------------- if(iHxc==2 .and. l_tddft_gsum) then + call TDDFT_oscillators_alloc(i_Tgrp_k,i_Tgrp_p) call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop,tddft_wf) - select case (mode_now) - case ("R","A","F") - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop,tddft_wf,"RES") - case ("C","Q") - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop,tddft_wf,"CPL") - end select + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop,tddft_wf,mode_now) endif ! ! Correlation oscillators @@ -759,11 +755,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call BS_exchange_oscillators_free(i_Tgrp_k) endif ! - !if(l_BSE_minimize_memory.and.iHxc==2.and.l_tddft_gsum) then - if(iHxc==2.and.l_tddft_gsum) then - call TDDFT_oscillators_free(i_Tgrp_p) - call TDDFT_oscillators_free(i_Tgrp_k) - endif + if(iHxc==2.and.l_tddft_gsum) call TDDFT_oscillators_free(i_Tgrp_k,i_Tgrp_p) ! if(iHxc==3) call BS_correlation_oscillators_free(i_block) ! @@ -789,8 +781,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if(iHxc==1) call BS_exchange_oscillators_free(BS_nT_grps) ! if(iHxc==2) then - ! - !if (l_tddft_gsum) call TDDFT_oscillators_free(BS_nT_grps) ! if (l_tddft_rsum) then YAMBO_FREE(tddft_wf%rhotwr1) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index f013d56813..ac6ba7e1ab 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -192,9 +192,11 @@ module BS ! ! TDDFT Oscillators ! - complex(SP), allocatable :: O_tddft(:,:,:,:,:) + complex(SP), allocatable :: O_tddft_L(:,:,:,:) + complex(SP), allocatable :: O_tddft_R(:,:,:,:) #ifdef _CUDA - complex(SP), allocatable, device :: O_tddft_d(:,:,:,:,:) + complex(SP), allocatable, device :: O_tddft_L_d(:,:,:,:) + complex(SP), allocatable, device :: O_tddft_R_d(:,:,:,:) #endif ! end type BS_T_group @@ -330,21 +332,30 @@ subroutine BS_correlation_oscillators_free(iB_ref) enddo end subroutine BS_correlation_oscillators_free ! - subroutine TDDFT_oscillators_alloc(iG) - use electrons, ONLY:n_spin - integer, intent(in) :: iG - if (BS_T_grp(iG)%size==0) return - YAMBO_ALLOC(BS_T_grp(iG)%O_tddft,(BS_n_g_fxc,BS_T_grp(iG)%size,n_spin,n_spin,2)) + subroutine TDDFT_oscillators_alloc(iGL,iGR) + use electrons, ONLY:n_spin,n_spinor + integer, intent(in) :: iGL,iGR + if (BS_T_grp(iGL)%size>0) then + YAMBO_ALLOC(BS_T_grp(iGL)%O_tddft_L,(BS_n_g_fxc,BS_T_grp(iGL)%size,n_spinor,n_spinor)) #ifdef _CUDA - allocate(BS_T_grp(iG)%O_tddft_d,mold=BS_T_grp(iG)%O_tddft) + allocate(BS_T_grp(iGL)%O_tddft_L_d,mold=BS_T_grp(iGL)%O_tddft_L) #endif + endif + if (BS_T_grp(iGR)%size>0) then + YAMBO_ALLOC(BS_T_grp(iGR)%O_tddft_R,(BS_n_g_fxc,BS_T_grp(iGR)%size,n_spin,n_spin)) +#ifdef _CUDA + allocate(BS_T_grp(iGR)%O_tddft_R_d,mold=BS_T_grp(iGR)%O_tddft_R) +#endif + endif end subroutine TDDFT_oscillators_alloc ! - subroutine TDDFT_oscillators_free(iG) - integer, intent(in) :: iG - YAMBO_FREE(BS_T_grp(iG)%O_tddft) + subroutine TDDFT_oscillators_free(iGL,iGR) + integer, intent(in) :: iGL,iGR + YAMBO_FREE(BS_T_grp(iGL)%O_tddft_L) + YAMBO_FREE(BS_T_grp(iGR)%O_tddft_R) #ifdef _CUDA - if (allocated(BS_T_grp(iG)%O_tddft_d)) deallocate(BS_T_grp(iG)%O_tddft_d) + if (allocated(BS_T_grp(iGL)%O_tddft_L_d)) deallocate(BS_T_grp(iGL)%O_tddft_L_d) + if (allocated(BS_T_grp(iGR)%O_tddft_R_d)) deallocate(BS_T_grp(iGR)%O_tddft_R_d) #endif end subroutine TDDFT_oscillators_free ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 380b1484d5..80d7dd25fa 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -44,10 +44,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! call timing('T_space ALDA Osc.',OPR='start') ! - ! Allocate - ! - call TDDFT_oscillators_alloc(i_T_grp) - ! WF_symm1_p => tddft_wf%WF_symm1 WF_symm2_p => tddft_wf%WF_symm2 rhotwr_p => tddft_wf%rhotwr_DP @@ -111,7 +107,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l if( n_spinor==1 ) then if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,1,1,1)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,1,1)) endif ! if(n_spinor==2) then @@ -124,7 +120,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l if(.not.l_use_rho_map) ifft= irho rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) enddo - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,1)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,i_spinor,j_spinor)) ! enddo enddo diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 24ea98ffd8..3325e04fbf 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -18,7 +18,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l use xc_functionals, ONLY:F_xc_mat use interfaces, ONLY:WF_load,WF_free use R_lattice, ONLY:qindx_X,bz_samp - use BS, ONLY:l_BS_magnons,TDDFT_oscillators_alloc,BS_T_grp,BS_bands + use BS, ONLY:l_BS_magnons,BS_T_grp,BS_bands use electrons, ONLY:n_spinor,n_sp_pol,n_spin use timing_m, ONLY:timing use openmp, ONLY:OPENMP_update,master_thread @@ -30,7 +30,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l type(bz_samp),intent(in) :: Xk integer, intent(in) :: iq,i_T_grp,NG(2) logical, intent(in) :: l_bs_exch_wf_in_loop - character(3), intent(in) :: mode + character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space @@ -49,8 +49,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! ! Allocate ! - if (.not.allocated( BS_T_grp(i_T_grp)%O_tddft )) call TDDFT_oscillators_alloc(i_T_grp) - ! WF_symm1_p => tddft_wf%WF_symm1 WF_symm2_p => tddft_wf%WF_symm2 rhotwr_p => tddft_wf%rhotwr_DP @@ -108,10 +106,10 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! - if (mode=="RES") then + if (mode=="R".or.mode=="A".or.mode=="F") then call WF_apply_symm_cpu(is,WF_symm1_p) call WF_apply_symm_cpu(os,WF_symm2_p) - else if (mode=="CPL") then + else if (mode=="C".or.mode=="Q") then call WF_apply_symm_cpu(is,WF_symm2_p) call WF_apply_symm_cpu(os,WF_symm1_p) endif @@ -122,7 +120,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,1,1,1,1)*& & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,1,1,2)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,1,1)) ! endif ! @@ -142,7 +140,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_sp_loop,o_sp_loop,2)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_sp_loop,o_sp_loop)) ! enddo enddo @@ -166,7 +164,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l enddo enddo enddo - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft(:,i_T_el,i_spinor,j_spinor,2)) + call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_spinor,j_spinor)) ! enddo enddo diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 8a97a8aea0..116029f6db 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -34,23 +34,20 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik ! complex(SP) :: H_x ! - integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v,i_sk_v,i_sk_c - ! - i_sk_c=1 - i_sk_v=1 + integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v ! i_sp_c=BS_T_grp_ik%table(i_Tk,4) i_sp_v=BS_T_grp_ik%table(i_Tk,5) ! if (n_spinor==1) then - H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft(:,i_Tk,i_sk_c,i_sk_v,1),& - & BS_T_grp_ip%O_tddft(:,i_Tp,i_sp_c,i_sp_v,2) ) + H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(:,i_Tk, 1 , 1 ),& + & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_c,i_sp_v) ) else if (n_spinor==2) then H_x=cZERO do i_sp_xc=1,n_spinor do o_sp_xc=1,n_spinor - H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft(:,i_Tk,i_sp_xc,o_sp_xc,1),& - & BS_T_grp_ip%O_tddft(:,i_Tp,i_sp_xc,o_sp_xc,2) ) + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(:,i_Tk,i_sp_xc,o_sp_xc),& + & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_xc,o_sp_xc) ) enddo enddo endif From 9bda1eee60bd8335d13975c4a1a64a81ea3ed806 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Oct 2023 09:39:02 +0200 Subject: [PATCH 0689/1367] Version 5.2.0, Revision 23133, Hash 3ab84494fe MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_collisions_R.F xc_functionals/Build_F_xc_mat.F xc_functionals/XC_libxc_driver.F Changes: - [yambo] TDDFT: saving work done Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 4 +- src/xc_functionals/Build_F_xc_mat.F | 57 +++++++++++++------ src/xc_functionals/XC_libxc_driver.F | 47 ++++++++------- 4 files changed, 72 insertions(+), 42 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 6f3e28052d..03724e9967 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22989 h.95e2b453a2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23134 h.e27f9a4e2a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22989" -SHASH="95e2b453a2" +SREVISION="23134" +SHASH="e27f9a4e2a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 3325e04fbf..9f82413505 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -159,8 +159,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l if( l_use_rho_map) ifft=rho_map(irho) if(.not.l_use_rho_map) ifft= irho rhotwr_p(ifft)=rhotwr_p(ifft)+ & - & F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)* & - & WF_symm1_p(irho,ip_spinor)*conjg(WF_symm2_p(irho,jp_spinor)) + & cmplx(F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)* & + & WF_symm1_p(irho,ip_spinor)*conjg(WF_symm2_p(irho,jp_spinor)),kind=DP) enddo enddo enddo diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index 121bca5a96..ade90a3551 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -24,7 +24,7 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! Work space ! integer :: ifft - real(SP) :: mod_mag,magn_versor(fft_size,3),magn_inv(fft_size),& + real(SP) :: mod_mag,mod_mag_n,magn_versor(fft_size,3),magn_inv(fft_size),& & Fxc_rho2(fft_size),Fxc_mag2(fft_size),Fxc_rhom(fft_size),Vxc_mag(fft_size) ! F_xc_mat=cZERO @@ -68,21 +68,22 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! else ! - ! The following is in principle ok - ! In practice, due to numerical noise, it gives wrong results - ! - !Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP - !! - !do ifft=1,fft_size - ! mod_mag=abs(magn(ifft,3)) - ! if(mod_mag==0._SP) magn_inv(ifft)=0._SP - ! if(mod_mag/=0._SP) magn_inv(ifft)=1._SP/mod_mag - !enddo + ! The following is in principle ok, but slightly less precise + ! + ! DEBUG< + Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP + ! + do ifft=1,fft_size + mod_mag=abs(magn(ifft,3)) + if(mod_mag< 1.E-6_SP) magn_inv(ifft)=0._SP + if(mod_mag>=1.E-6_SP) magn_inv(ifft)=1._SP/mod_mag + enddo !! !F_xc_mat(:,1,2,1,2)= cZERO - !F_xc_mat(:,1,2,2,1)= F_xc(:,1,2) !2*Vxc_mag*magn_inv - !F_xc_mat(:,2,1,1,2)= F_xc(:,2,1) !2*Vxc_mag*magn_inv + !F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv + !F_xc_mat(:,2,1,1,2)= 2*Vxc_mag*magn_inv !F_xc_mat(:,2,1,2,1)= cZERO + ! DEBUG> ! F_xc_mat(:,1,2,1,2)= F_xc(:,1,1) F_xc_mat(:,1,2,2,1)= F_xc(:,1,2) @@ -95,11 +96,12 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! magn_versor=0._SP do ifft=1,fft_size - mod_mag=v_norm(magn(ifft,:)) - if(mod_mag==0._SP) magn_versor(ifft,:)=0._SP - if(mod_mag/=0._SP) magn_versor(ifft,:)=magn(ifft,:)/mod_mag - if(mod_mag==0._SP) magn_inv(ifft) =0._SP - if(mod_mag/=0._SP) magn_inv(ifft) =1._SP/mod_mag + mod_mag_n=v_norm(magn(ifft,:)) + mod_mag=mod_mag_n*real(fft_size,SP)/DL_vol + if(mod_mag< 1.E-6_SP) magn_versor(ifft,:)=0._SP + if(mod_mag>=1.E-6_SP) magn_versor(ifft,:)=magn(ifft,:)/mod_mag_n + if(mod_mag< 1.E-6_SP) magn_inv(ifft) =0._SP + if(mod_mag>=1.E-6_SP) magn_inv(ifft) =1._SP/mod_mag enddo ! Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP @@ -117,6 +119,18 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) F_xc_mat(:,1,2,2,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)**2+magn_versor(:,2)**2)+2*Vxc_mag*magn_inv ! (mag) F_xc_mat(:,2,1,1,2) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)**2+magn_versor(:,2)**2)+2*Vxc_mag*magn_inv ! (mag) F_xc_mat(:,2,1,2,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)+cI*magn_versor(:,2))**2 ! (mag) + ! + ! DEBUG< + F_xc_mat(:,1,1,1,1)= F_xc(:,1,1) ! (opt) + F_xc_mat(:,1,1,2,2)= F_xc(:,1,2) ! (opt) + F_xc_mat(:,2,2,1,1)= F_xc(:,2,1) ! (opt) + F_xc_mat(:,2,2,2,2)= F_xc(:,2,2) ! (opt) + ! + F_xc_mat(:,1,2,1,2)= cZERO ! (mag) + F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv ! (mag) + F_xc_mat(:,2,1,1,2)= 2*Vxc_mag*magn_inv ! (mag) + F_xc_mat(:,2,1,2,1)= cZERO ! (mag) + ! DEBUG> ! ! TO DO !! ! @@ -132,4 +146,11 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! endif ! + !write(*,*) 2*Vxc_mag(1:10)*magn_inv(1:10) + ! + write(*,*) real(F_xc_mat(1:10,1,2,1,2),SP) + write(*,*) real(F_xc_mat(1:10,1,2,2,1),SP) + write(*,*) real(F_xc_mat(1:10,2,1,1,2),SP) + write(*,*) real(F_xc_mat(1:10,2,1,2,1),SP) + ! end subroutine Build_F_xc_mat diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index ae7b0de62c..eb61d3c828 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -23,7 +23,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) use hamiltonian, ONLY:rho_n,magn_n #endif use wave_func, ONLY:rho_map_thresh - use electrons, ONLY:levels,n_spin,n_spinor + use electrons, ONLY:levels,n_spin,n_spinor,n_sp_pol use FFT_m, ONLY:fft_size use wrapper, ONLY:V_dot_V use BS, ONLY:l_BS_magnons @@ -271,6 +271,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) case(1) call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + ! Needed to build F_xc from functional derivative for n_spin=1 if (l_Fxc_from_Vxc.and.ORDER==2) then spin_rho_DP=spin_rho_DP*PERT_FAC call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) @@ -278,17 +279,20 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) spin_rho_DP=spin_rho_DP/PERT_FAC endif case(2) - if( l_BS_magnons) then + if( l_BS_magnons .or. n_spinor==2 ) then + ! This is needed by XC_eval_lda_kernel to construct F_xc for magnons with n_sp_pol=2 call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) + ! V_xc is needed for F_xc_mat in Build_Fxc_mat.F with n_spinor=2, + ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, + ! avoiding the call to XC_eval_lda_kernel + ! Howerver but the latter is more precise, since it works with DP quantities forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - ! I could avoid this, however I need it due to numerical noise - ! See also comment in Build_F_xc_mat - !if( (.not.l_BS_magnons) .or. n_spinor==2) then - call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) - ! Yambo internal for Kxc - call XC_eval_lda_kernel(v1rho,v2rho2) - !endif + ! Needed to build Fxc unless in magnons case with n_sp_pol==2 + if( .not.( l_BS_magnons.and.n_sp_pol==2) ) & + & call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) + ! Yambo internal for Kxc + call XC_eval_lda_kernel(v1rho,v2rho2) end select elseif (fnctl(ixc)%family==XC_FAMILY_GGA.or.fnctl(ixc)%family==XC_FAMILY_HYB_GGA) then !GAUPBE short range x-energy and potentials part @@ -317,18 +321,23 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) endif case(2) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) call error(' Fxc not coded for GAU-PBEP') - if( l_BS_magnons) then + if( l_BS_magnons .or. n_spinor==2 ) then + ! This is in needed by XC_eval_gga_kernel to construct F_xc for magnons with n_sp_pol=2 + ! For now only v1rho is used by XC_eval_lda_kernel call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) - ! Yambo internal for V_xc - call XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) + ! V_xc is needed for F_xc_mat in Build_Fxc_mat.F with n_spinor=2, + ! However the GGA potential does not give good results, so below I use the LDA expression + ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, + ! avoiding the call to XC_eval_gga_kernel + ! Howerver but the latter is more precise, since it works with DP quantities + !call XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) + forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - ! I could avoid this, however I need it due to numerical noise - ! See also comment in Build_F_xc_mat - !if( (.not.l_BS_magnons) .or. n_spinor==2) then - call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) - ! Yambo internal for Kxc - call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) - !endif + ! Needed to build Fxc unless in magnons case with n_sp_pol==2 + if( .not.(l_BS_magnons.and.n_sp_pol==2) ) & + & call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) + ! Yambo internal for Kxc (for now it is just a wrapperr to lda_kernel) + call XC_eval_gga_kernel(v1rho,v1sigma,v2rho2,v2rhosigma,v2sigma2) end select end if call xc_f03_func_end(fnctl(ixc)%conf) From 59091e260d69145f657e2d9706561ee005f408ea Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Oct 2023 12:46:07 +0200 Subject: [PATCH 0690/1367] Version 5.2.0, Revision 23134, Hash 02de99969a MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_collisions_R.F xc_functionals/Build_F_xc_mat.F Bugs: - [yambo] Fixed tddft with spinors Changes: - [yambo] Added debug lines Patch sent by: Davide Sangalli --- include/version/version.m4 | 4 +-- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 2 +- src/xc_functionals/Build_F_xc_mat.F | 35 +++++++++++-------- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 03724e9967..cb5862c51f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23134 h.e27f9a4e2a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23134 h.02de99969a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" SREVISION="23134" -SHASH="e27f9a4e2a" +SHASH="02de99969a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 9f82413505..c5fdd805b0 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -148,11 +148,11 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! if(n_spinor==2) then ! - rhotwr_p=cZERO do i_spinor=1,n_spinor do j_spinor=1,n_spinor i_spinor_y=j_spinor j_spinor_y=i_spinor + rhotwr_p=cZERO do ip_spinor=1,n_spinor do jp_spinor=1,n_spinor do irho=1,rho_map_size diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index ade90a3551..fa3c8998a8 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -121,15 +121,15 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) F_xc_mat(:,2,1,2,1) = (Fxc_mag2+Vxc_mag*magn_inv)*(magn_versor(:,1)+cI*magn_versor(:,2))**2 ! (mag) ! ! DEBUG< - F_xc_mat(:,1,1,1,1)= F_xc(:,1,1) ! (opt) - F_xc_mat(:,1,1,2,2)= F_xc(:,1,2) ! (opt) - F_xc_mat(:,2,2,1,1)= F_xc(:,2,1) ! (opt) - F_xc_mat(:,2,2,2,2)= F_xc(:,2,2) ! (opt) - ! - F_xc_mat(:,1,2,1,2)= cZERO ! (mag) - F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv ! (mag) - F_xc_mat(:,2,1,1,2)= 2*Vxc_mag*magn_inv ! (mag) - F_xc_mat(:,2,1,2,1)= cZERO ! (mag) + !F_xc_mat(:,1,1,1,1)= F_xc(:,1,1) ! (opt) + !F_xc_mat(:,1,1,2,2)= F_xc(:,1,2) ! (opt) + !F_xc_mat(:,2,2,1,1)= F_xc(:,2,1) ! (opt) + !F_xc_mat(:,2,2,2,2)= F_xc(:,2,2) ! (opt) + !! + !F_xc_mat(:,1,2,1,2)= cZERO ! (mag) + !F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv ! (mag) + !F_xc_mat(:,2,1,1,2)= 2*Vxc_mag*magn_inv ! (mag) + !F_xc_mat(:,2,1,2,1)= cZERO ! (mag) ! DEBUG> ! ! TO DO !! @@ -146,11 +146,18 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) ! endif ! + ! DEBUG< !write(*,*) 2*Vxc_mag(1:10)*magn_inv(1:10) - ! - write(*,*) real(F_xc_mat(1:10,1,2,1,2),SP) - write(*,*) real(F_xc_mat(1:10,1,2,2,1),SP) - write(*,*) real(F_xc_mat(1:10,2,1,1,2),SP) - write(*,*) real(F_xc_mat(1:10,2,1,2,1),SP) + !! + !write(*,*) real(F_xc_mat(1:10,1,1,1,1),SP) + !write(*,*) real(F_xc_mat(1:10,1,1,2,2),SP) + !write(*,*) real(F_xc_mat(1:10,2,2,1,1),SP) + !write(*,*) real(F_xc_mat(1:10,2,2,2,2),SP) + !! + !write(*,*) real(F_xc_mat(1:10,1,2,1,2),SP) + !write(*,*) real(F_xc_mat(1:10,1,2,2,1),SP) + !write(*,*) real(F_xc_mat(1:10,2,1,1,2),SP) + !write(*,*) real(F_xc_mat(1:10,2,1,2,1),SP) + ! DEBUG> ! end subroutine Build_F_xc_mat From a452bb927642c4f82153b4fd6fbf1554be49b555 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Oct 2023 23:11:09 +0200 Subject: [PATCH 0691/1367] Version 5.2.0, Revision 22992, Hash 59091e260d MODIFIED * include/version/version.m4 bse/K_kernel.F Bugs: - [yambo] Fixed wrong allocation/deallocation of V_xc in bse with magnons / n_spinor=2 Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index cb5862c51f..0f2da07b90 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23134 h.02de99969a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23135 h.59091e260d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23134" -SHASH="02de99969a" +SREVISION="23135" +SHASH="59091e260d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 1414a90f92..604fad22ba 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -346,8 +346,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - YAMBO_ALLOC(V_xc,(fft_size,n_spin)) - V_xc=0._SP + if(l_BS_magnons .or. n_spinor==2) then + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP + endif ! if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) @@ -356,7 +358,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) YAMBO_FREE(F_xc) - if(l_BS_magnons) then + if(l_BS_magnons .or. n_spinor==2) then YAMBO_FREE(V_xc) endif if(n_spin>1) then From 60e46b1d6a29aca256ed3ca9b05166eae25b463f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Oct 2023 23:36:15 +0200 Subject: [PATCH 0692/1367] Version 5.2.0, Revision 22996, Hash fc8784c9b3 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F Bugs: - [yambo_sc] Fixed compilation after renaming of TDDFT_kernel subroutine Additions: - Changes: - Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 68911fe75e..f0d0bcde43 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22737 h.38730efedc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22996 h.fc8784c9b3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22737" -SHASH="38730efedc" +SREVISION="22996" +SHASH="fc8784c9b3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 2be9f180fb..1ffca4715a 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -33,7 +33,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) use IO_int, ONLY:io_control,IO_and_Messaging_switch use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,io_COLLs use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t - use interfaces, ONLY:WF_load,TDDFT_ALDA_R_space + use interfaces, ONLY:WF_load,TDDFT_ALDA_eh_space_R_kernel use wave_func, ONLY:WF,WF_buffer,WF_buffered_IO use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G use hamiltonian, ONLY:B_mat_index @@ -426,7 +426,7 @@ subroutine compute_loc_HXC_collisions() i_p_s =k%star(i_p,i_star) iscp_H%is(3) = i_p_s iscp_H%os(3) = i_p_s - pre_factor2=pre_factor2+TDDFT_ALDA_R_space(isc_H%is,isc_H%os,iscp_H%is,iscp_H%os,tddft_wf,'RES') + pre_factor2=pre_factor2+TDDFT_ALDA_eh_space_R_kernel(isc_H%is,isc_H%os,iscp_H%is,iscp_H%os,tddft_wf,'RES') enddo endif ! @@ -455,7 +455,7 @@ subroutine compute_loc_HXC_collisions() i_p_s =k%star(i_p,i_star) iscp_H%is(3) = i_p_s iscp_H%os(3) = i_p_s - pre_factor2=pre_factor2+TDDFT_ALDA_R_space(isc_H%is,isc_H%os,iscp_H%is,iscp_H%os,tddft_wf,'CPL') + pre_factor2=pre_factor2+TDDFT_ALDA_eh_space_R_kernel(isc_H%is,isc_H%os,iscp_H%is,iscp_H%os,tddft_wf,'CPL') enddo endif ! From 5d258b4c83028048210ac5600a7fedb0a622cb78 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 29 Oct 2023 11:24:48 +0100 Subject: [PATCH 0693/1367] Version 5.2.0, Revision 22997, Hash 60e46b1d6a MODIFIED * include/version/version.m4 bse/.objects bse/K_correlation_collisions_dir.F bse/K_correlation_collisions_std.F bse/K_driver_init.F bse/K_exchange_collisions.F bse/K_kernel.F modules/mod_BS.F modules/mod_TDDFT.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_G_kernel.F xc_functionals/XC_libxc_driver.F NEW * bse/BSE_utilities.F Changes: - [yambo] New tddft in eh-space implementaiton mimics implementation of exchange also for memory handling - [yambo] Allocation and deallocation of oscillators is now handled via subroutine which are inside the file BSE_utilities Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- src/bse/.objects | 2 +- src/bse/BSE_utilities.F | 119 ++++++++++++++++++ src/bse/K_correlation_collisions_dir.F | 2 +- src/bse/K_correlation_collisions_std.F | 2 +- src/bse/K_driver_init.F | 10 +- src/bse/K_exchange_collisions.F | 9 +- src/bse/K_kernel.F | 48 ++++--- src/modules/mod_BS.F | 80 ------------ src/modules/mod_TDDFT.F | 1 + .../TDDFT_ALDA_eh_space_G_collisions_L.F | 8 +- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 8 +- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 2 +- src/xc_functionals/XC_libxc_driver.F | 7 +- 14 files changed, 180 insertions(+), 124 deletions(-) create mode 100644 src/bse/BSE_utilities.F diff --git a/include/version/version.m4 b/include/version/version.m4 index f0d0bcde43..2d5a7648c8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22996 h.fc8784c9b3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22997 h.60e46b1d6a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22996" -SHASH="fc8784c9b3" +SREVISION="22997" +SHASH="60e46b1d6a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/.objects b/src/bse/.objects index 713ff6b52d..1a3608214e 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -10,7 +10,7 @@ SLK_objects = K_inversion_do_it_SLK.o #endif objs = K_blocks.o K_driver_init.o K_dipoles.o K_IP.o K_IP_sort.o \ K_Transitions_setup.o K_Transition_check.o \ - K_driver.o \ + K_driver.o BSE_utilities.o \ K_WF_phases.o \ K_kernel.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_exchange_kernel.o \ diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F new file mode 100644 index 0000000000..726df526ec --- /dev/null +++ b/src/bse/BSE_utilities.F @@ -0,0 +1,119 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2023 The Yambo Team +! +! Authors (see AUTHORS file for details): AM MG DS +! +subroutine BS_exchange_oscillators_alloc(iG) + use BS, ONLY:BS_T_grp,BS_n_g_exch +#include + integer, intent(in) :: iG + if (BS_T_grp(iG)%size==0) return + YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) +#ifdef _CUDA + allocate(BS_T_grp(iG)%O_x_d,mold=BS_T_grp(iG)%O_x) +#endif +end subroutine BS_exchange_oscillators_alloc +! +subroutine BS_correlation_oscillators_alloc(iB) + use BS, ONLY:BS_blk,O_ng +#include + integer, intent(in) :: iB + if (BS_blk(iB)%N_oscillators==0) return + YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) +#ifdef _CUDA + allocate(BS_blk(iB)%O_c_d,mold=BS_blk(iB)%O_c) +#endif +end subroutine BS_correlation_oscillators_alloc +! +subroutine BS_exchange_oscillators_free(iG_ref) + use BS, ONLY:BS_T_grp +#include + integer, intent(in) :: iG_ref + integer :: iG + do iG=iG_ref,1,-1 + YAMBO_FREE(BS_T_grp(iG)%O_x) +#ifdef _CUDA + if (allocated(BS_T_grp(iG)%O_x_d)) deallocate(BS_T_grp(iG)%O_x_d) +#endif + enddo +end subroutine BS_exchange_oscillators_free +! +subroutine BS_correlation_oscillators_free(iB_ref) + use BS, ONLY:BS_T_grp,l_BSE_minimize_memory,BS_blk,n_BS_blks +#include + integer, intent(in) :: iB_ref + integer :: iB,ik_loop,ip_loop,ik_now,ip_now + ik_now=BS_blk(iB_ref)%ik + ip_now=BS_blk(iB_ref)%ip + if(iB_ref==n_BS_blks) then + ik_now=0 + ip_now=0 + endif + do iB=iB_ref,1,-1 + ik_loop=BS_blk(iB)%ik + ip_loop=BS_blk(iB)%ip + if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle + if (.not.allocated(BS_blk(iB)%O_c)) exit + YAMBO_FREE(BS_blk(iB)%O_c) + YAMBO_FREE(BS_blk(iB)%O_table1) + YAMBO_FREE(BS_blk(iB)%O_table2) + YAMBO_FREE(BS_blk(iB)%kp_table) +#ifdef _CUDA + if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) +#endif + enddo +end subroutine BS_correlation_oscillators_free +! +subroutine TDDFT_oscillators_alloc_L(iGL) + use electrons, ONLY:n_spin,n_spinor + use BS, ONLY:BS_T_grp,BS_n_g_fxc +#include + integer, intent(in) :: iGL + if (BS_T_grp(iGL)%size>0) then + YAMBO_ALLOC(BS_T_grp(iGL)%O_tddft_L,(BS_n_g_fxc,BS_T_grp(iGL)%size,n_spinor,n_spinor)) +#ifdef _CUDA + allocate(BS_T_grp(iGL)%O_tddft_L_d,mold=BS_T_grp(iGL)%O_tddft_L) +#endif + endif +end subroutine TDDFT_oscillators_alloc_L +! +subroutine TDDFT_oscillators_alloc_R(iGR) + use electrons, ONLY:n_spin,n_spinor + use BS, ONLY:BS_T_grp,BS_n_g_fxc +#include + integer, intent(in) :: iGR + if (BS_T_grp(iGR)%size>0) then + YAMBO_ALLOC(BS_T_grp(iGR)%O_tddft_R,(BS_n_g_fxc,BS_T_grp(iGR)%size,n_spin,n_spin)) +#ifdef _CUDA + allocate(BS_T_grp(iGR)%O_tddft_R_d,mold=BS_T_grp(iGR)%O_tddft_R) +#endif + endif +end subroutine TDDFT_oscillators_alloc_R +! +subroutine TDDFT_oscillators_free_L(iG_ref) + use BS, ONLY:BS_T_grp +#include + integer, intent(in) :: iG_ref + integer :: iGL + do iGL=iG_ref,1,-1 + YAMBO_FREE(BS_T_grp(iGL)%O_tddft_L) +#ifdef _CUDA + if (allocated(BS_T_grp(iGL)%O_tddft_L_d)) deallocate(BS_T_grp(iGL)%O_tddft_L_d) +#endif + enddo +end subroutine TDDFT_oscillators_free_L +! +subroutine TDDFT_oscillators_free_R(iG_ref) + use BS, ONLY:BS_T_grp +#include + integer, intent(in) :: iG_ref + integer :: iGR + do iGR=iG_ref,1,-1 + YAMBO_FREE(BS_T_grp(iGR)%O_tddft_R) +#ifdef _CUDA + if (allocated(BS_T_grp(iGR)%O_tddft_R_d)) deallocate(BS_T_grp(iGR)%O_tddft_R_d) +#endif + enddo +end subroutine TDDFT_oscillators_free_R diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 7fc40017a5..796b5ff36a 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -31,7 +31,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) use D_lattice, ONLY:nsym use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& -& BS_correlation_oscillators_alloc,K_CORR_collision,BS_T_grp,& +& K_CORR_collision,BS_T_grp,& & BS_K_dim,l_BS_ares_from_res use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index d004888284..3b3ba38de6 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -27,7 +27,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) use D_lattice, ONLY:nsym use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& -& BS_correlation_oscillators_alloc,K_CORR_collision,BS_T_grp,& +& K_CORR_collision,BS_T_grp,& & BS_K_dim,l_BS_ares_from_res use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 57c2c68928..aeda5feba1 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -8,7 +8,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels,n_sp_pol,n_spinor + use electrons, ONLY:levels,n_sp_pol,n_spinor,n_spin use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode use stderr, ONLY:STRING_match,STRING_same @@ -18,7 +18,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) & BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& & BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant - use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr + use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr,l_Fxc_from_Vxc use drivers, ONLY:l_col_cut,l_rpa_IP,l_alda_fxc,l_bs_fxc use D_lattice, ONLY:i_time_rev,i_space_inv,l_0D,l_1D,l_2D,l_3D #if defined _RT @@ -35,7 +35,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! ! Work Space ! - logical :: l_flag,l_slepc_special + logical :: l_flag,l_slepc_special,l_Fxc_Libxc ! ! Defaults !========== @@ -118,6 +118,10 @@ subroutine K_driver_init(what,iq,Ken,Xk) if (what=="loop-init") return ! BS_K_is_ALDA=l_alda_fxc + if (l_alda_fxc) then + call parser('FxcLibxc',l_Fxc_Libxc) + l_Fxc_from_Vxc=(n_spin==1).and..not.l_Fxc_Libxc + endif BS_dip_size=1 ! ! Memory saving diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index 4ecea24251..d4fcf92317 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -9,7 +9,7 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! use pars, ONLY:SP,cZERO use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_inv_d - use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_exchange_oscillators_alloc,BS_n_g_exch,& + use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_n_g_exch,& & BSE_L_kind,l_BS_magnons,l_BSE_minimize_memory,BS_bands use interfaces, ONLY:WF_load,WF_free use wave_func, ONLY:WF @@ -38,19 +38,12 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) #ifdef _CUDA complex(SP), pointer, device :: O_x_d(:,:),O_x_sym_d(:,:) #endif - ! - ! Oscillators already done ? - ! - if (allocated( BS_T_grp(i_T_grp)%O_x )) return - ! - if (l_BS_magnons.and.n_sp_pol==2) return ! call timing('T_space EXX Osc.',OPR='start') ! ! Allocate ! call elemental_collision_free(K_EXCH_collision) - call BS_exchange_oscillators_alloc(i_T_grp) ! #if defined(__NOTNOW) && ! defined(_CUDA) !$omp parallel default(shared), private( K_EXCH_collision, & diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 604fad22ba..673ab1ce89 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -29,9 +29,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& & BS_res_K_exchange,BS_Block_size,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& -& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,TDDFT_oscillators_alloc,TDDFT_oscillators_free,& -& BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,BS_correlation_oscillators_free,& -& BS_exchange_oscillators_free,WF_phase,n_BS_blks,BS_blk,BS_T_grp,& +& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& +& BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& +& WF_phase,n_BS_blks,BS_blk,BS_T_grp,& & BS_nT_grps,BS_blks_free,l_BS_ares_from_res,& & l_BSE_minimize_memory,l_BSE_restart,l_BSE_kernel_complete,& & BS_perturbative_SOC,BS_K_cutoff,BS_max_val,BSE_L_kind,l_BS_magnons @@ -39,7 +39,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR,RD,WR_CL,OP_APP,deliver_IO_error_message,WR use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc, & -& FXC_mode,tddft_wf_t +& FXC_mode,tddft_wf_t,l_Fxc_from_Vxc use xc_functionals,ONLY:V_xc,F_xc,F_xc_mat,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind,WF_exx_fraction use wave_func, ONLY:WF,rho_map,rho_map_thresh,rho_map_size @@ -88,7 +88,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir,TDDFT_ALDA_eh_space_G_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! - logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_matrix_init,& + logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,& & l_load_kernel,l_write_kernel,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum ! ! I/O @@ -195,6 +195,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (BS_K_is_ALDA) then l_tddft_gsum=(index(FXC_mode,"G-")>0) l_tddft_rsum=(index(FXC_mode,"R-")>0) + l_bs_tddft_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and.(.not.trim(PARALLEL_default_mode)=="workload") ) .or. & + & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory" ) if( .not.(l_tddft_gsum.or.l_tddft_rsum) ) call error("Wrong FXC_mode:"//trim(FXC_mode)) if(index(FXC_mode,"cut_GmGp")>0) then FXC_n_g_corr=BS_n_g_fxc @@ -346,7 +348,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - if(l_BS_magnons .or. n_spinor==2) then + if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then YAMBO_ALLOC(V_xc,(fft_size,n_spin)) V_xc=0._SP endif @@ -358,7 +360,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) YAMBO_FREE(F_xc) - if(l_BS_magnons .or. n_spinor==2) then + if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then YAMBO_FREE(V_xc) endif if(n_spin>1) then @@ -429,7 +431,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif #endif ! - if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_exch_wf_in_loop.and.l_tddft_gsum)) then + if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_tddft_wf_in_loop.and.l_tddft_gsum)) then ! DS this is used only for iq==1 call fft_setup(NG(1),NG(2),.true.) else @@ -498,16 +500,27 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- if(iHxc==1) then - call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) - if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) + if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_x) ) then + call BS_exchange_oscillators_alloc(i_Tgrp_k) + call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) + endif + if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_x) ) then + call BS_exchange_oscillators_alloc(i_Tgrp_p) + call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) + endif endif ! ! TDDFT oscillators !---------------------- if(iHxc==2 .and. l_tddft_gsum) then - call TDDFT_oscillators_alloc(i_Tgrp_k,i_Tgrp_p) - call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop,tddft_wf) - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop,tddft_wf,mode_now) + if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_L) ) then + call TDDFT_oscillators_alloc_L(i_Tgrp_k) + call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf) + endif + if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_tddft_R) ) then + call TDDFT_oscillators_alloc_R(i_Tgrp_p) + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) + endif endif ! ! Correlation oscillators @@ -757,7 +770,10 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call BS_exchange_oscillators_free(i_Tgrp_k) endif ! - if(iHxc==2.and.l_tddft_gsum) call TDDFT_oscillators_free(i_Tgrp_k,i_Tgrp_p) + if(l_BSE_minimize_memory.and.iHxc==2.and.l_tddft_gsum) then + call TDDFT_oscillators_free_L(i_Tgrp_k) + call TDDFT_oscillators_free_R(i_Tgrp_p) + endif ! if(iHxc==3) call BS_correlation_oscillators_free(i_block) ! @@ -788,6 +804,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(tddft_wf%rhotwr1) YAMBO_FREE(tddft_wf%rhotwr2) else if (l_tddft_gsum) then + call TDDFT_oscillators_free_L(BS_nT_grps) + call TDDFT_oscillators_free_R(BS_nT_grps) YAMBO_FREE(tddft_wf%rhotwr_DP) endif YAMBO_FREE(tddft_wf%WF_symm1) @@ -813,7 +831,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(RIM_W) endif ! - if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_exch_wf_in_loop.and.l_tddft_gsum)) then + if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_tddft_wf_in_loop.and.l_tddft_gsum)) then call fft_free() else call WF_free(WF,keep_states_to_load=l_write_kernel) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index ac6ba7e1ab..55c2d99cbb 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -279,86 +279,6 @@ integer function T_group(I) if (I>=BS_T_grp_1st_el(BS_nT_grps-1)) T_group=BS_nT_grps end function ! - subroutine BS_exchange_oscillators_alloc(iG) - integer, intent(in) :: iG - if (BS_T_grp(iG)%size==0) return - YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) -#ifdef _CUDA - allocate(BS_T_grp(iG)%O_x_d,mold=BS_T_grp(iG)%O_x) -#endif - end subroutine BS_exchange_oscillators_alloc - ! - subroutine BS_correlation_oscillators_alloc(iB) - integer, intent(in) :: iB - if (BS_blk(iB)%N_oscillators==0) return - YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) -#ifdef _CUDA - allocate(BS_blk(iB)%O_c_d,mold=BS_blk(iB)%O_c) -#endif - end subroutine BS_correlation_oscillators_alloc - ! - subroutine BS_exchange_oscillators_free(iG_ref) - integer, intent(in) :: iG_ref - integer :: iG - do iG=iG_ref,1,-1 - YAMBO_FREE(BS_T_grp(iG)%O_x) -#ifdef _CUDA - if (allocated(BS_T_grp(iG)%O_x_d)) deallocate(BS_T_grp(iG)%O_x_d) -#endif - enddo - end subroutine BS_exchange_oscillators_free - ! - subroutine BS_correlation_oscillators_free(iB_ref) - integer, intent(in) :: iB_ref - integer :: iB,ik_loop,ip_loop,ik_now,ip_now - ik_now=BS_blk(iB_ref)%ik - ip_now=BS_blk(iB_ref)%ip - if(iB_ref==n_BS_blks) then - ik_now=0 - ip_now=0 - endif - do iB=iB_ref,1,-1 - ik_loop=BS_blk(iB)%ik - ip_loop=BS_blk(iB)%ip - if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle - if (.not.allocated(BS_blk(iB)%O_c)) exit - YAMBO_FREE(BS_blk(iB)%O_c) - YAMBO_FREE(BS_blk(iB)%O_table1) - YAMBO_FREE(BS_blk(iB)%O_table2) - YAMBO_FREE(BS_blk(iB)%kp_table) -#ifdef _CUDA - if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) -#endif - enddo - end subroutine BS_correlation_oscillators_free - ! - subroutine TDDFT_oscillators_alloc(iGL,iGR) - use electrons, ONLY:n_spin,n_spinor - integer, intent(in) :: iGL,iGR - if (BS_T_grp(iGL)%size>0) then - YAMBO_ALLOC(BS_T_grp(iGL)%O_tddft_L,(BS_n_g_fxc,BS_T_grp(iGL)%size,n_spinor,n_spinor)) -#ifdef _CUDA - allocate(BS_T_grp(iGL)%O_tddft_L_d,mold=BS_T_grp(iGL)%O_tddft_L) -#endif - endif - if (BS_T_grp(iGR)%size>0) then - YAMBO_ALLOC(BS_T_grp(iGR)%O_tddft_R,(BS_n_g_fxc,BS_T_grp(iGR)%size,n_spin,n_spin)) -#ifdef _CUDA - allocate(BS_T_grp(iGR)%O_tddft_R_d,mold=BS_T_grp(iGR)%O_tddft_R) -#endif - endif - end subroutine TDDFT_oscillators_alloc - ! - subroutine TDDFT_oscillators_free(iGL,iGR) - integer, intent(in) :: iGL,iGR - YAMBO_FREE(BS_T_grp(iGL)%O_tddft_L) - YAMBO_FREE(BS_T_grp(iGR)%O_tddft_R) -#ifdef _CUDA - if (allocated(BS_T_grp(iGL)%O_tddft_L_d)) deallocate(BS_T_grp(iGL)%O_tddft_L_d) - if (allocated(BS_T_grp(iGR)%O_tddft_R_d)) deallocate(BS_T_grp(iGR)%O_tddft_R_d) -#endif - end subroutine TDDFT_oscillators_free - ! subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) ! use pars, ONLY:IP,cZERO diff --git a/src/modules/mod_TDDFT.F b/src/modules/mod_TDDFT.F index a60aef0731..4ce5d60c03 100644 --- a/src/modules/mod_TDDFT.F +++ b/src/modules/mod_TDDFT.F @@ -25,6 +25,7 @@ module TDDFT character(schlen):: FXC_PF_alpha ! logical :: FXC_is_causal logical :: FXC_is_retarded + logical :: l_Fxc_from_Vxc ! real(SP), allocatable :: FXC_K_diagonal(:) complex(SP), allocatable :: F_xc_gspace(:,:,:) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 80d7dd25fa..94586d1ceb 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf) +subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf) ! ! Calculates the F_xc scattering ! @@ -28,7 +28,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! type(bz_samp),intent(in) :: Xk integer, intent(in) :: iq,i_T_grp,NG(2) - logical, intent(in) :: l_bs_exch_wf_in_loop + logical, intent(in) :: l_bs_tddft_wf_in_loop type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space @@ -87,7 +87,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l #if defined(__NOTNOW) && ! defined(_CUDA) !$omp critical #endif - l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) @@ -128,6 +128,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! enddo ! + if(l_bs_tddft_wf_in_loop) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + ! nullify(WF_symm1_p) nullify(WF_symm2_p) nullify(rhotwr_p) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index c5fdd805b0..8067332141 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop,tddft_wf,mode) +subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering ! @@ -29,7 +29,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! type(bz_samp),intent(in) :: Xk integer, intent(in) :: iq,i_T_grp,NG(2) - logical, intent(in) :: l_bs_exch_wf_in_loop + logical, intent(in) :: l_bs_tddft_wf_in_loop character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! @@ -92,7 +92,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l #if defined(__NOTNOW) && ! defined(_CUDA) !$omp critical #endif - l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) @@ -172,6 +172,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_l ! enddo ! + if(l_bs_tddft_wf_in_loop) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + ! nullify(WF_symm1_p) nullify(WF_symm2_p) nullify(rhotwr_p) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 116029f6db..8c0763ff64 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -25,7 +25,7 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik use FFT_m, ONLY:fft_size use BS, ONLY:BS_T_group use wrapper_omp, ONLY:Vstar_dot_V_omp - use electrons, ONLY:n_spinor + use electrons, ONLY:n_spinor,spin_occ ! implicit none ! diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index eb61d3c828..9388ae3e5f 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -27,6 +27,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) use FFT_m, ONLY:fft_size use wrapper, ONLY:V_dot_V use BS, ONLY:l_BS_magnons + use TDDFT, ONLY:l_Fxc_from_Vxc use xc_functionals, ONLY:E_xc,E_xc_val,magn,F_xc,V_xc,xc_setup_hyb,& & XC_LDA_C_KP,xc_fnctl_t,xc_setup_fnctl,xc_f03_func_end, & & xc_spin,xc_spin_map1, & @@ -47,7 +48,6 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! ! Work Space ! - logical :: l_Fxc_from_Vxc integer :: i1,i2,is_xc,is1,is2,ixc,ifft,ORDER_NOW integer(IPL) :: size_IPL real(SP) :: mod_magn @@ -69,7 +69,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) real(DP),allocatable :: v1rho(:,:),v1sigma(:,:) real(DP),allocatable :: vx1(:,:),vx2(:,:) real(DP),allocatable :: v2rho2(:,:),v2rhosigma(:,:),v2sigma2(:,:) - logical :: EvaluateDGradient,l_Fxc_Libxc + logical :: EvaluateDGradient ! ! Functional and Functional infos ! @@ -79,9 +79,6 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! Convert and Initialize !=============================== ! - call parser('FxcLibxc',l_Fxc_Libxc) - l_Fxc_from_Vxc=(n_spin==1).and..not.l_Fxc_Libxc - ! exsr=0._DP FUNCTIONALTMP=0 !Set the functional as a PBE to get Exc, next calculate the GAU-PBE Exc as From da77275e50bb868a211290b511492b47b4a05fed Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 29 Oct 2023 23:02:49 +0100 Subject: [PATCH 0694/1367] Version 5.2.0, Revision 22998, Hash 5d258b4c83 MODIFIED * include/version/version.m4 bse/BSE_utilities.F Bugs: - [yambo] Fixed bug with minimal memry use of correlation collisions in BSE Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/BSE_utilities.F | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 2d5a7648c8..71ff57828b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22997 h.60e46b1d6a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22998 h.5d258b4c83, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22997" -SHASH="60e46b1d6a" +SREVISION="22998" +SHASH="5d258b4c83" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index 726df526ec..be11fe2042 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -48,8 +48,8 @@ subroutine BS_correlation_oscillators_free(iB_ref) ik_now=BS_blk(iB_ref)%ik ip_now=BS_blk(iB_ref)%ip if(iB_ref==n_BS_blks) then - ik_now=0 - ip_now=0 + ik_now=0 + ip_now=0 endif do iB=iB_ref,1,-1 ik_loop=BS_blk(iB)%ik @@ -57,6 +57,7 @@ subroutine BS_correlation_oscillators_free(iB_ref) if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle if (.not.allocated(BS_blk(iB)%O_c)) exit YAMBO_FREE(BS_blk(iB)%O_c) + YAMBO_FREE(BS_blk(iB)%O_table) YAMBO_FREE(BS_blk(iB)%O_table1) YAMBO_FREE(BS_blk(iB)%O_table2) YAMBO_FREE(BS_blk(iB)%kp_table) From bc067fcbf7dda676c9f29507bce657d27f57c76d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 29 Oct 2023 23:09:01 +0100 Subject: [PATCH 0695/1367] Version 5.2.0, Revision 22999, Hash da77275e50 MODIFIED * include/version/version.m4 bse/BSE_utilities.F Bugs: - refined previous fix Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/BSE_utilities.F | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 71ff57828b..10dc217b81 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22998 h.5d258b4c83, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22999 h.da77275e50, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22998" -SHASH="5d258b4c83" +SREVISION="22999" +SHASH="da77275e50" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index be11fe2042..1aa15cc3de 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -57,9 +57,12 @@ subroutine BS_correlation_oscillators_free(iB_ref) if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle if (.not.allocated(BS_blk(iB)%O_c)) exit YAMBO_FREE(BS_blk(iB)%O_c) - YAMBO_FREE(BS_blk(iB)%O_table) - YAMBO_FREE(BS_blk(iB)%O_table1) - YAMBO_FREE(BS_blk(iB)%O_table2) + if ( allocated(BS_blk(iB)%O_table) ) then + YAMBO_FREE(BS_blk(iB)%O_table) + else + YAMBO_FREE(BS_blk(iB)%O_table1) + YAMBO_FREE(BS_blk(iB)%O_table2) + endif YAMBO_FREE(BS_blk(iB)%kp_table) #ifdef _CUDA if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) From 118ad7691485902b2481c96f613b3d6bf3dae844 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 29 Oct 2023 23:35:04 +0100 Subject: [PATCH 0696/1367] Version 5.2.0, Revision 23000, Hash bc067fcbf7 MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_collisions_L.F Bugs: - [yambo] Fixed compilations issue Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 10dc217b81..61195938c3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22999 h.da77275e50, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23000 h.bc067fcbf7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22999" -SHASH="da77275e50" +SREVISION="23000" +SHASH="bc067fcbf7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 94586d1ceb..2830f2bbfb 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -17,7 +17,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ use wave_func, ONLY:rho_map_size,rho_map,WF use interfaces, ONLY:WF_load,WF_free use R_lattice, ONLY:qindx_X,bz_samp - use BS, ONLY:l_BS_magnons,TDDFT_oscillators_alloc,BS_T_grp,BS_bands + use BS, ONLY:l_BS_magnons,BS_T_grp,BS_bands use electrons, ONLY:n_spinor,n_sp_pol,n_spin use timing_m, ONLY:timing use openmp, ONLY:OPENMP_update,master_thread From 8dc4531686f49071bfabe61231cd5306b35041da Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 30 Oct 2023 09:04:54 +0100 Subject: [PATCH 0697/1367] Version 5.2.0, Revision 23001, Hash 118ad76914 MODIFIED * include/version/version.m4 bse/DOUBLE_project.dep tddft/DOUBLE_project.dep DELETED * driver/PHEL_project.dep el-ph/PHEL_project.dep interface/PHEL_project.dep io/PHEL_project.dep parallel/PHEL_project.dep pol_function/PHEL_project.dep qp/PHEL_project.dep real_time_control/PHEL_project.dep real_time_drivers/PHEL_project.dep real_time_initialize/PHEL_project.dep Bugs: - _project.dep files updated Changes: - PHEL_project.dep files deleted Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/DOUBLE_project.dep | 1 + src/driver/PHEL_project.dep | 3 --- src/el-ph/PHEL_project.dep | 6 ------ src/interface/PHEL_project.dep | 6 ------ src/io/PHEL_project.dep | 2 -- src/parallel/PHEL_project.dep | 3 --- src/pol_function/PHEL_project.dep | 2 -- src/qp/PHEL_project.dep | 2 -- src/real_time_control/PHEL_project.dep | 2 -- src/real_time_drivers/PHEL_project.dep | 2 -- src/real_time_initialize/PHEL_project.dep | 3 --- src/tddft/DOUBLE_project.dep | 5 ++++- 13 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 src/driver/PHEL_project.dep delete mode 100644 src/el-ph/PHEL_project.dep delete mode 100644 src/interface/PHEL_project.dep delete mode 100644 src/io/PHEL_project.dep delete mode 100644 src/parallel/PHEL_project.dep delete mode 100644 src/pol_function/PHEL_project.dep delete mode 100644 src/qp/PHEL_project.dep delete mode 100644 src/real_time_control/PHEL_project.dep delete mode 100644 src/real_time_drivers/PHEL_project.dep delete mode 100644 src/real_time_initialize/PHEL_project.dep diff --git a/include/version/version.m4 b/include/version/version.m4 index 61195938c3..ca74de8a28 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23000 h.bc067fcbf7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23001 h.118ad76914, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23000" -SHASH="bc067fcbf7" +SREVISION="23001" +SHASH="118ad76914" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 12812c97a6..eb3ed2c615 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -1,3 +1,4 @@ + BSE_utilities.o EPS_via_perturbative_inversion.o K_Haydock.o K_Haydock_gather.o diff --git a/src/driver/PHEL_project.dep b/src/driver/PHEL_project.dep deleted file mode 100644 index e91fccffa5..0000000000 --- a/src/driver/PHEL_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - options_projects.o - options_yambo.o - diff --git a/src/el-ph/PHEL_project.dep b/src/el-ph/PHEL_project.dep deleted file mode 100644 index bbc20f4200..0000000000 --- a/src/el-ph/PHEL_project.dep +++ /dev/null @@ -1,6 +0,0 @@ - ELPH_acoustic_phonon_properties.o - ELPH_databases_check.o - ELPH_databases_grids_map.o - ELPH_databases_load.o - ELPH_databases_symmetrize.o - diff --git a/src/interface/PHEL_project.dep b/src/interface/PHEL_project.dep deleted file mode 100644 index 02120d3c55..0000000000 --- a/src/interface/PHEL_project.dep +++ /dev/null @@ -1,6 +0,0 @@ - INIT.o - INIT_activate.o - INIT_barriers.o - INIT_load.o - INIT_read_command_line.o - diff --git a/src/io/PHEL_project.dep b/src/io/PHEL_project.dep deleted file mode 100644 index df62ae28df..0000000000 --- a/src/io/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - io_PH.o - diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep deleted file mode 100644 index b51e13f8a5..0000000000 --- a/src/parallel/PHEL_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - PARALLEL_global_dimensions.o - PARALLEL_global_indexes.o - diff --git a/src/pol_function/PHEL_project.dep b/src/pol_function/PHEL_project.dep deleted file mode 100644 index a644e71a2b..0000000000 --- a/src/pol_function/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - X_Double_Grid_setup.o - diff --git a/src/qp/PHEL_project.dep b/src/qp/PHEL_project.dep deleted file mode 100644 index 2a34e69ef3..0000000000 --- a/src/qp/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - QP_logicals.o - diff --git a/src/real_time_control/PHEL_project.dep b/src/real_time_control/PHEL_project.dep deleted file mode 100644 index 94a3292b75..0000000000 --- a/src/real_time_control/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - RT_alloc.o - diff --git a/src/real_time_drivers/PHEL_project.dep b/src/real_time_drivers/PHEL_project.dep deleted file mode 100644 index d7e6a8488e..0000000000 --- a/src/real_time_drivers/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - RT_driver.o - diff --git a/src/real_time_initialize/PHEL_project.dep b/src/real_time_initialize/PHEL_project.dep deleted file mode 100644 index 5bb91066cc..0000000000 --- a/src/real_time_initialize/PHEL_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - RT_initialize.o - RT_occupations_and_levels_init.o - diff --git a/src/tddft/DOUBLE_project.dep b/src/tddft/DOUBLE_project.dep index 640f9e89f2..32f2d9b8b7 100644 --- a/src/tddft/DOUBLE_project.dep +++ b/src/tddft/DOUBLE_project.dep @@ -1,5 +1,8 @@ TDDFT_ALDA_G_space.o - TDDFT_ALDA_R_space.o + TDDFT_ALDA_eh_space_G_collisions_L.o + TDDFT_ALDA_eh_space_G_collisions_R.o + TDDFT_ALDA_eh_space_G_kernel.o + TDDFT_ALDA_eh_space_R_kernel.o TDDFT_ALDA_lower_cutoff.o TDDFT_BSK_2_FXC.o TDDFT_BSK_disk_2_FXC.o From 8236a02217904714c05c81a77bc3168d558a5c2d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 30 Oct 2023 21:55:14 +0100 Subject: [PATCH 0698/1367] Version 5.2.0, Revision 23013, Hash 78533ae21a MODIFIED * tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_R_kernel.F Bugs: - [tddft] Fixed indexes for coupling at finite momentum Patch sent by: Davide Sangalli --- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 19 ++++++++++--------- src/tddft/TDDFT_ALDA_eh_space_R_kernel.F | 14 +++++++++----- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 8067332141..c067f5d9e0 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -86,8 +86,14 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! - is=(/i_c,i_k,i_s,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) + if (mode=="R".or.mode=="A".or.mode=="F") then + is=(/i_c,i_k,i_s ,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + else if (mode=="C".or.mode=="Q") then + ! Same momenta, inverted band and spin indexes + is=(/i_v,i_k,i_s ,i_sp_v/) + os=(/i_c,i_p,i_sp,i_sp_c/) + endif ! #if defined(__NOTNOW) && ! defined(_CUDA) !$omp critical @@ -106,13 +112,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! - if (mode=="R".or.mode=="A".or.mode=="F") then - call WF_apply_symm_cpu(is,WF_symm1_p) - call WF_apply_symm_cpu(os,WF_symm2_p) - else if (mode=="C".or.mode=="Q") then - call WF_apply_symm_cpu(is,WF_symm2_p) - call WF_apply_symm_cpu(os,WF_symm1_p) - endif + call WF_apply_symm_cpu(is,WF_symm1_p) + call WF_apply_symm_cpu(os,WF_symm2_p) ! if( n_spin==1 ) then ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F index 59bdeef2f7..35ef7d41b6 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F @@ -42,7 +42,7 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) ! ! Work Space ! - logical :: l_use_rho_map + logical :: l_use_rho_map,isp_loc(4),osp_loc(4) integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y ! complex(SP), pointer :: rhotwr1_p(:) @@ -85,13 +85,17 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) endif ! if (mode=="RES") then - call WF_apply_symm_cpu(isp,WF_symm1_p) - call WF_apply_symm_cpu(osp,WF_symm2_p) + isp_loc=isp + osp_loc=osp else if (mode=="CPL") then - call WF_apply_symm_cpu(isp,WF_symm2_p) - call WF_apply_symm_cpu(osp,WF_symm1_p) + ! Same momenta, inverted band and spin indexes + isp_loc=(/osp(1),isp(2),isp(3),osp(4)/) + osp_loc=(/isp(1),osp(2),osp(3),isp(4)/) endif ! + call WF_apply_symm_cpu(isp_loc,WF_symm1_p) + call WF_apply_symm_cpu(osp_loc,WF_symm2_p) + ! if( n_spin==1 ) then if ( l_use_rho_map) rhotwr2_p(:)=F_xc_mat(rho_map(:),1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) if (.not.l_use_rho_map) rhotwr2_p(:)=F_xc_mat(:,1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) From c736f071028e5d663f2d2825b61eaae1f68f2bf1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 30 Oct 2023 22:03:31 +0100 Subject: [PATCH 0699/1367] Version 5.2.0, Revision 23014, Hash 8236a02217 MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_R_kernel.F Bugs: - [yambo] Fixed error in previous commit Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/tddft/TDDFT_ALDA_eh_space_R_kernel.F | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d22706e75d..9ed158351f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22743 h.739c9e34a1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23014 h.8236a02217, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22743" -SHASH="739c9e34a1" +SREVISION="23014" +SHASH="8236a02217" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F index 35ef7d41b6..005b548718 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F @@ -42,8 +42,9 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) ! ! Work Space ! - logical :: l_use_rho_map,isp_loc(4),osp_loc(4) - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y + logical :: l_use_rho_map + integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,& + & is_yambo,os_yambo,i_spinor_y,j_spinor_y,isp_loc(4),osp_loc(4) ! complex(SP), pointer :: rhotwr1_p(:) complex(SP), pointer :: rhotwr2_p(:) From 5e61828e242e1f8ae7535e888e75614edc03da61 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 2 Nov 2023 14:08:19 +0100 Subject: [PATCH 0700/1367] Version 5.2.0, Revision 23017, Hash 3ae793fb24 MODIFIED * include/version/version.m4 bse/K_exchange_collisions.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F Bugs: - "$omp critical" moved outside "#if _NOT_NOW" definition Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_exchange_collisions.F | 8 ++------ src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 8 ++------ src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 8 ++------ 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 603d2009db..02ffa94740 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22744 h.94ab292d80, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23018 h.3ae793fb24, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22744" -SHASH="94ab292d80" +SREVISION="23018" +SHASH="3ae793fb24" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index d4fcf92317..6c6341d99a 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -81,19 +81,15 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) K_EXCH_collision%os=(/i_v,i_p,i_sp,i_sp_v/) K_EXCH_collision%qs=(/i_g_p,iq,1/) ! -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp critical -#endif l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then + !$omp critical if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& & space='R',title="Kernel exch",keep_states_to_load=.true.) + !$omp end critical endif -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp end critical -#endif ! if (iq==1) then ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 2830f2bbfb..4ff198e51d 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -84,19 +84,15 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ is=(/i_c,i_k,i_s,i_sp_c/) os=(/i_v,i_p,i_sp,i_sp_v/) ! -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp critical -#endif l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then + !$omp critical if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& & space='R',title="Kernel exch",keep_states_to_load=.true.) + !$omp end critical endif -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp end critical -#endif ! if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index c067f5d9e0..d81e3554d9 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -95,19 +95,15 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ os=(/i_c,i_p,i_sp,i_sp_c/) endif ! -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp critical -#endif l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then + !$omp critical if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& & space='R',title="Kernel exch",keep_states_to_load=.true.) + !$omp end critical endif -#if defined(__NOTNOW) && ! defined(_CUDA) - !$omp end critical -#endif ! if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") From 9df961ad14b9104c054336fdf2792e6142ea452f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 2 Nov 2023 16:39:13 +0100 Subject: [PATCH 0701/1367] Version 5.2.0, Revision 23018, Hash 5e61828e24 MODIFIED * include/version/version.m4 bse/K_exchange_collisions.F bse/K_kernel.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F Changes: - Removed line which was imposing to always use std algorithm for collisions - Re-insterted #if _NOT_NOW at protection of $omp critical lines Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_exchange_collisions.F | 6 +++++- src/bse/K_kernel.F | 9 ++++++++- src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 4 ++++ src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 4 ++++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 02ffa94740..dcdcb4cd3e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23018 h.3ae793fb24, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23019 h.5e61828e24, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23018" -SHASH="3ae793fb24" +SREVISION="23019" +SHASH="5e61828e24" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index 6c6341d99a..c24cc5c5dd 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -83,12 +83,16 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then - !$omp critical +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& & space='R',title="Kernel exch",keep_states_to_load=.true.) +#if defined(__NOTNOW) && ! defined(_CUDA) !$omp end critical +#endif endif ! if (iq==1) then diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 673ab1ce89..1c5131fd95 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -175,7 +175,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (l_bs_corr) then ! + ! G_m_G maxval is the maximum G obtained from the following lines (see K_driver.F) + !iG_BSE =BS_n_g_W + !iGo_BSE=qindx_B_max + !if (.not.iq==1) iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) + !Max_G_m_G=eval_G_minus_G(BS_nG_W,iGo_BSE) + ! Remember that it is different from Max_G_m_G O_ng=G_m_G_maxval + ! ! < WARNIGN: 2021/03/19 ! The following can be safely removed with the new implementation ! However it maybe needed for internal consistency. Otherwise the output of many BSE tests could change @@ -187,7 +194,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) ! call parser('ImposeDirAlg',l_dir_alg) - if(.not.l_dir_alg) l_dir_alg=(iq/=1 .and. n_spinor==2 .and. nsym>1) + !if(.not.l_dir_alg) l_dir_alg=(iq/=1 .and. n_spinor==2 .and. nsym>1) l_std_alg=.not.l_dir_alg ! endif diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 4ff198e51d..f4411a73ab 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -86,12 +86,16 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then +#if defined(__NOTNOW) && ! defined(_CUDA) !$omp critical +#endif if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& & space='R',title="Kernel exch",keep_states_to_load=.true.) +#if defined(__NOTNOW) && ! defined(_CUDA) !$omp end critical +#endif endif ! if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index d81e3554d9..ab889c89ac 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -97,12 +97,16 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then +#if defined(__NOTNOW) && ! defined(_CUDA) !$omp critical +#endif if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) NK=(/min(i_k,i_p),max(i_k,i_p)/) call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& & space='R',title="Kernel exch",keep_states_to_load=.true.) +#if defined(__NOTNOW) && ! defined(_CUDA) !$omp end critical +#endif endif ! if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") From 1270a512dae7bd4cc098c70f659a177563eae6d5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 2 Nov 2023 16:48:01 +0100 Subject: [PATCH 0702/1367] Version 5.2.0, Revision 23019, Hash 9df961ad14 MODIFIED * include/version/version.m4 bse/K_driver.F Changes: - Now that WFs for exchange and correlation are loaded independently, it is non needed anymore to check the exchange cutoff related to correlation --> check in K_driver on exhcange cutoff removed Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_driver.F | 19 +++---------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index dcdcb4cd3e..8c4cb29694 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23019 h.5e61828e24, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23020 h.9df961ad14, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23019" -SHASH="5e61828e24" +SREVISION="23020" +SHASH="9df961ad14" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index c187582640..b6cab96ec9 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -151,26 +151,13 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! W/X RL size setup looking at the max index of G-G' ! ========= ! - iGo_BSE=qindx_B_max iG_BSE =BS_n_g_W - if (.not.iq==1) then - iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) - iG_BSE =max(BS_n_g_exch,BS_n_g_W) - !iGo_BSE=4*maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) - !iG_BSE =maxval((/BS_n_g_exch,BS_n_g_W,qindx_B_max/)) - endif + iGo_BSE=qindx_B_max + if (.not.iq==1) iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) ! + ! This is the size of the first dimension of the G_m_G table Max_G_m_G=eval_G_minus_G(iG_BSE,iGo_BSE) ! - if (.not.iq==1) then - if (BS_n_g_exch> Max_G_m_G ) then - call warning (' Exch size reduced from '//trim(intc(BS_n_g_exch))//' to '& -& //trim(intc(Max_G_m_G))//' due to symmetry constraints') - BS_n_g_exch= Max_G_m_G - call msg('s','[BSE-exch] Exch size forced by symmetry to be ',BS_n_g_exch) - endif - endif - ! if (BS_n_g_W> Max_G_m_G ) then call warning (' W size reduced from '//trim(intc(BS_n_g_W))//' to '& & //trim(intc(Max_G_m_G))//' due to symmetry constraints') From f66484aeee5d7a25181425fc7472076f301c0fef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 2 Nov 2023 17:36:28 +0100 Subject: [PATCH 0703/1367] Version 5.2.0, Revision 23020, Hash 1270a512da MODIFIED * include/version/version.m4 bse/K_driver.F bse/K_kernel.F Changes: - Logic of WFs cutoff for BSE simplified Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++-- src/bse/K_driver.F | 8 +++-- src/bse/K_kernel.F | 68 +++++++++++--------------------------- 3 files changed, 27 insertions(+), 55 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 8c4cb29694..dc36fbadb1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23020 h.9df961ad14, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23021 h.1270a512da, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23020" -SHASH="9df961ad14" +SREVISION="23021" +SHASH="1270a512da" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index b6cab96ec9..513f6b71b8 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -19,14 +19,14 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_uses_DbGd,& & BSS_Q_dir,BSS_E_dir use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_cpl_K_corr,& -& BS_Blocks_and_Transitions_free,BSqpts,l_BS_photolum +& BS_Blocks_and_Transitions_free,BSqpts,O_ng,l_BS_photolum use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded use drivers, ONLY:l_rpa_IP,l_bs_fxc,l_bss use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme,PARALLEL_default_mode use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:eval_G_minus_G use vec_operate, ONLY:v_norm - use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free,q0_def_norm + use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free,G_m_G_maxval,q0_def_norm ! #include ! @@ -153,10 +153,12 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! iG_BSE =BS_n_g_W iGo_BSE=qindx_B_max - if (.not.iq==1) iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) + ! This needs be changed in case i_gW is redefined vi G_m_G + !if (.not.iq==1) iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) ! ! This is the size of the first dimension of the G_m_G table Max_G_m_G=eval_G_minus_G(iG_BSE,iGo_BSE) + O_ng=G_m_G_maxval ! if (BS_n_g_W> Max_G_m_G ) then call warning (' W size reduced from '//trim(intc(BS_n_g_W))//' to '& diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 1c5131fd95..a01d029635 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -17,7 +17,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use FFT_m, ONLY:fft_size use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G,TDDFT_ALDA_eh_space_R_kernel use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab - use R_lattice, ONLY:G_m_G_maxval,qindx_X,bz_samp,g_rot,& + use R_lattice, ONLY:qindx_X,bz_samp,g_rot,& & qindx_B,qindx_B_max,qindx_B_load,RIM_W,& & RIM_ng,RIM_W_is_diagonal,RIM_W_ng use com, ONLY:msg @@ -27,8 +27,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use interfaces, ONLY:el_density_and_current use QP_m, ONLY:QP_ng_Vxc use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& -& BS_res_K_exchange,BS_Block_size,& -& O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& +& BS_res_K_exchange,BS_Block_size,BS_n_g_W,& +& BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& & BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& & WF_phase,n_BS_blks,BS_blk,BS_T_grp,& @@ -147,19 +147,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call section('=',trim(section_title)) ! - ! Oscillators Setup - !=================== - O_ng=1 - O_ng_exch =maxval(qindx_X(iq,:,2)) - O_ng_shift=O_ng_exch - ! l_bs_exch=(any((/BS_res_K_exchange,BS_cpl_K_exchange/)).or.l_bs_fxc).and..not.(l_BS_magnons.and.n_sp_pol==2) l_bs_corr=(any((/BS_res_K_corr,BS_cpl_K_corr/)) .and. .not.l_bs_fxc) ! + ! Oscillators Setup + !=================== + ! if (l_bs_exch) then - ! - call msg('r','[BSE] Exchange components ',BS_n_g_exch) - ! + O_ng_exch =maxval(qindx_X(iq,:,2)) ! I load the WFs for exachange in a loop in two cases ! - q=0 and more than one k-point. ! In this case it is the default, unless I specify workload in the parallel mode @@ -170,40 +165,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! loop over ic and iv (see related comment in K_Transiontion_setup.F) l_bs_exch_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and..not.trim(PARALLEL_default_mode)=="workload") .or. & & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory") - ! - endif - ! - if (l_bs_corr) then - ! - ! G_m_G maxval is the maximum G obtained from the following lines (see K_driver.F) - !iG_BSE =BS_n_g_W - !iGo_BSE=qindx_B_max - !if (.not.iq==1) iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) - !Max_G_m_G=eval_G_minus_G(BS_nG_W,iGo_BSE) - ! Remember that it is different from Max_G_m_G - O_ng=G_m_G_maxval - ! - ! < WARNIGN: 2021/03/19 - ! The following can be safely removed with the new implementation - ! However it maybe needed for internal consistency. Otherwise the output of many BSE tests could change - !! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered - !call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") - !! Hybrid functional. - !if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"fxc") - ! WARNING > - if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) - ! - call parser('ImposeDirAlg',l_dir_alg) - !if(.not.l_dir_alg) l_dir_alg=(iq/=1 .and. n_spinor==2 .and. nsym>1) - l_std_alg=.not.l_dir_alg - ! + call msg('r','[BSE] Exchange components ',BS_n_g_exch) endif ! if (BS_K_is_ALDA) then l_tddft_gsum=(index(FXC_mode,"G-")>0) l_tddft_rsum=(index(FXC_mode,"R-")>0) - l_bs_tddft_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and.(.not.trim(PARALLEL_default_mode)=="workload") ) .or. & - & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory" ) if( .not.(l_tddft_gsum.or.l_tddft_rsum) ) call error("Wrong FXC_mode:"//trim(FXC_mode)) if(index(FXC_mode,"cut_GmGp")>0) then FXC_n_g_corr=BS_n_g_fxc @@ -212,6 +179,16 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call msg('s','[TDDFT] Fxc cutoff is forced by symmetry to be ',BS_n_g_fxc) endif endif + l_bs_tddft_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and.(.not.trim(PARALLEL_default_mode)=="workload") ) .or. & + & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory" ) + call msg('r','[BSE] ALDA components ',BS_n_g_fxc) + endif + ! + if (l_bs_corr) then + O_ng_shift=qindx_B_max + call parser('ImposeDirAlg',l_dir_alg) + l_std_alg=.not.l_dir_alg + call msg('r','[BSE] Correlation components ',BS_n_g_W) endif ! call K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) @@ -317,14 +294,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) if (iHxc==2) NG=(/BS_n_g_fxc, 1/) - ! < WARNIGN: 2021/03/19 - ! The following has been changed to the commented line - ! However the commented line maybe needed for internal consistency. - ! Otherwise the output of many BSE tests could change - if (iHxc==3) NG=(/O_ng,O_ng_shift/) - !if (iHxc==3) NG(2)=O_ng_shift - ! WARNING > - ! + if (iHxc==3) NG=(/BS_n_g_W,O_ng_shift/) ! ! ALDA !====== From 9c63a5824cc65010b4b78a7fe41ac3b1d6d93f0b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 3 Nov 2023 09:06:29 +0100 Subject: [PATCH 0704/1367] Version 5.2.0, Revision 23021, Hash f66484aeee MODIFIED * include/version/version.m4 bse/K_kernel.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F Bugs: - [yambo] Fixed bug in finite-q TDDFT with BSE Changes: - [yambo] Finte-q BSE for correlation (W) Default algorith is "std" in avery case but with SOC and symmetries where the code switches to the "dir" algorith. The default in both cases can be changed by input flag Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 18 +++++++++++++----- src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 13 ++++++++----- src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 12 +++++++----- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index dc36fbadb1..dc598074c9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23021 h.1270a512da, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23022 h.f66484aeee, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23021" -SHASH="1270a512da" +SREVISION="23022" +SHASH="f66484aeee" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index a01d029635..22ae11a281 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -78,7 +78,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last,ig_W_final ! - integer :: i_block,O_ng_shift,O_ng_exch,iHxc,NG(2),NK(2),& + integer :: i_block,O_ng_shift,O_ng_exch,O_ng_tddft,iHxc,NG(2),NK(2),& & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& & bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4) complex(SP):: Co,H_x,H_c,BS_mat_tmp @@ -169,6 +169,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif ! if (BS_K_is_ALDA) then + O_ng_tddft =maxval(qindx_X(iq,:,2)) l_tddft_gsum=(index(FXC_mode,"G-")>0) l_tddft_rsum=(index(FXC_mode,"R-")>0) if( .not.(l_tddft_gsum.or.l_tddft_rsum) ) call error("Wrong FXC_mode:"//trim(FXC_mode)) @@ -186,8 +187,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (l_bs_corr) then O_ng_shift=qindx_B_max - call parser('ImposeDirAlg',l_dir_alg) - l_std_alg=.not.l_dir_alg + if (iq/=1 .and. n_spinor==2 .and. nsym>1) then + ! Default is direct algorithm, unless imposed from input + call parser('ImposeStdAlg',l_std_alg) + l_dir_alg=.not.l_std_alg + else + ! Default is standard algorithm, unless imposed from input + call parser('ImposeDirAlg',l_dir_alg) + l_std_alg=.not.l_dir_alg + endif call msg('r','[BSE] Correlation components ',BS_n_g_W) endif ! @@ -293,8 +301,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) ! if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) - if (iHxc==2) NG=(/BS_n_g_fxc, 1/) - if (iHxc==3) NG=(/BS_n_g_W,O_ng_shift/) + if (iHxc==2) NG=(/BS_n_g_fxc ,O_ng_tddft/) + if (iHxc==3) NG=(/BS_n_g_W ,O_ng_shift/) ! ! ALDA !====== diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index f4411a73ab..140ba9c539 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -36,7 +36,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ logical :: l_use_rho_map,l_load_WFs integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& -& i_sp,i_T_grp_p,is(4),os(4),NK(2) +& i_sp,i_T_grp_p,is(4),os(4),qs(3),NK(2) ! complex(DP), pointer :: rhotwr_p(:) complex(SP), pointer :: WF_symm1_p(:,:) @@ -83,6 +83,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ ! is=(/i_c,i_k,i_s,i_sp_c/) os=(/i_v,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then @@ -107,7 +108,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if( n_spinor==1 ) then if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,1,1)) + call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,1,1)) endif ! if(n_spinor==2) then @@ -120,7 +121,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if(.not.l_use_rho_map) ifft= irho rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) enddo - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,i_spinor,j_spinor)) + call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,i_spinor,j_spinor)) ! enddo enddo @@ -142,16 +143,18 @@ end subroutine TDDFT_ALDA_eh_space_G_collisions_L #include ! ! -subroutine perform_fft_3d(rhotw,O_x) +subroutine perform_fft_3d(qs,rhotw,O_x) ! use BS, ONLY:BS_n_g_fxc use pars, ONLY:cZERO,cONE,DP,SP,DP + use R_lattice, ONLY:DEV_VAR(g_rot) use FFT_m, ONLY:fftw_plan,cufft_plan,fft_size,fft_dim,DEV_VAR(fft_g_table) ! implicit none ! integer :: ig,iGo ! + integer, intent(in) :: qs(3) complex(DP), intent(in) :: rhotw(fft_size) complex(SP), intent(out) :: O_x(BS_n_g_fxc) ! @@ -182,7 +185,7 @@ subroutine perform_fft_3d(rhotw,O_x) ! #endif ! - iGo=1 + iGo=qs(1) ! #if defined _FFTQE && !defined _USE_3D_FFT && !defined _CUDA_LOC ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index ab889c89ac..d748476dbd 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -17,7 +17,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ use wave_func, ONLY:rho_map_size,rho_map,WF use xc_functionals, ONLY:F_xc_mat use interfaces, ONLY:WF_load,WF_free - use R_lattice, ONLY:qindx_X,bz_samp + use R_lattice, ONLY:qindx_X,bz_samp,minus_G use BS, ONLY:l_BS_magnons,BS_T_grp,BS_bands use electrons, ONLY:n_spinor,n_sp_pol,n_spin use timing_m, ONLY:timing @@ -39,7 +39,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irho,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y,& & i_sp_loop,o_sp_loop integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& -& i_sp,i_T_grp_p,is(4),os(4),NK(2) +& i_sp,i_T_grp_p,is(4),os(4),qs(3),NK(2) ! complex(DP), pointer :: rhotwr_p(:) complex(SP), pointer :: WF_symm1_p(:,:) @@ -89,10 +89,12 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if (mode=="R".or.mode=="A".or.mode=="F") then is=(/i_c,i_k,i_s ,i_sp_c/) os=(/i_v,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) else if (mode=="C".or.mode=="Q") then ! Same momenta, inverted band and spin indexes is=(/i_v,i_k,i_s ,i_sp_v/) os=(/i_c,i_p,i_sp,i_sp_c/) + qs=(/minus_G(i_g_p),iq,1/) endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) @@ -121,7 +123,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,1,1,1,1)*& & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,1,1)) + call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,1,1)) ! endif ! @@ -141,7 +143,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_sp_loop,o_sp_loop)) + call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_sp_loop,o_sp_loop)) ! enddo enddo @@ -165,7 +167,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ enddo enddo enddo - call perform_fft_3d(rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_spinor,j_spinor)) + call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_spinor,j_spinor)) ! enddo enddo From e3000fb57c4dcae325ad8c042d0e09e5888c6bda Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 3 Nov 2023 12:56:09 +0100 Subject: [PATCH 0705/1367] Version 5.2.0, Revision 23022, Hash 9c63a5824c MODIFIED * include/version/version.m4 bse/K_kernel.F Bugs: - [yambo] Fixed wrong allocation for correlation Changes: - [yambo] Added developer option to ignore BSE phases Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index dc598074c9..4c185001db 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23022 h.f66484aeee, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23023 h.9c63a5824c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23022" -SHASH="f66484aeee" +SREVISION="23023" +SHASH="9c63a5824c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 22ae11a281..9b0d18deab 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -28,7 +28,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use QP_m, ONLY:QP_ng_Vxc use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& & BS_res_K_exchange,BS_Block_size,BS_n_g_W,& -& BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& +& O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& & BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& & WF_phase,n_BS_blks,BS_blk,BS_T_grp,& @@ -89,7 +89,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,& - & l_load_kernel,l_write_kernel,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum + & l_load_kernel,l_write_kernel,l_skip_phases,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum ! ! I/O ! @@ -196,7 +196,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call parser('ImposeDirAlg',l_dir_alg) l_std_alg=.not.l_dir_alg endif - call msg('r','[BSE] Correlation components ',BS_n_g_W) + call parser('SkipPhases',l_skip_phases) + call msg('r','[BSE] Correlation components ',(/BS_n_g_W,O_ng/)) endif ! call K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) @@ -302,7 +303,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) if (iHxc==2) NG=(/BS_n_g_fxc ,O_ng_tddft/) - if (iHxc==3) NG=(/BS_n_g_W ,O_ng_shift/) + if (iHxc==3) NG=(/O_ng ,O_ng_shift/) ! ! ALDA !====== @@ -426,7 +427,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! Wave Functions Phases !======================= - if (iHxc==3.and.l_std_alg) call K_WF_phases(Xk) + if (iHxc==3.and.l_std_alg) then + call K_WF_phases(Xk) + if (l_skip_phases) then + WF_phase=-99._SP + call msg('r','[BSE] WF phases ignored as imposed in input') + endif + endif ! endif ! From eef29afe9d83be76737933691516e1edf046080f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 3 Nov 2023 22:56:55 +0100 Subject: [PATCH 0706/1367] Version 5.2.0, Revision 23023, Hash e3000fb57c MODIFIED * include/version/version.m4 bse/K_kernel.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_G_kernel.F Bugs: - [yambo] Fixed inverted left and right residuals in tddft kernel in eh space Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++--- src/bse/K_kernel.F | 24 +++++++++---------- .../TDDFT_ALDA_eh_space_G_collisions_L.F | 6 ++--- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 10 ++++---- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 12 +++++----- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 4c185001db..163d18acc7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23023 h.9c63a5824c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23024 h.e3000fb57c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23023" -SHASH="9c63a5824c" +SREVISION="23024" +SHASH="e3000fb57c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 9b0d18deab..14e9de2aa9 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -492,26 +492,26 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- if(iHxc==1) then - if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_x) ) then - call BS_exchange_oscillators_alloc(i_Tgrp_k) - call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) - endif if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_x) ) then call BS_exchange_oscillators_alloc(i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) endif + if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_x) ) then + call BS_exchange_oscillators_alloc(i_Tgrp_k) + call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) + endif endif ! ! TDDFT oscillators !---------------------- if(iHxc==2 .and. l_tddft_gsum) then - if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_L) ) then - call TDDFT_oscillators_alloc_L(i_Tgrp_k) - call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf) + if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_tddft_L) ) then + call TDDFT_oscillators_alloc_L(i_Tgrp_p) + call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf) endif - if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_tddft_R) ) then - call TDDFT_oscillators_alloc_R(i_Tgrp_p) - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) + if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_R) ) then + call TDDFT_oscillators_alloc_R(i_Tgrp_k) + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) endif endif ! @@ -763,8 +763,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif ! if(l_BSE_minimize_memory.and.iHxc==2.and.l_tddft_gsum) then - call TDDFT_oscillators_free_L(i_Tgrp_k) - call TDDFT_oscillators_free_R(i_Tgrp_p) + call TDDFT_oscillators_free_L(i_Tgrp_p) + call TDDFT_oscillators_free_R(i_Tgrp_k) endif ! if(iHxc==3) call BS_correlation_oscillators_free(i_block) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 140ba9c539..389c63fdfc 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -106,8 +106,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ call WF_apply_symm_cpu(os,WF_symm2_p) ! if( n_spinor==1 ) then - if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) - if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) + if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,1,1)) endif ! @@ -119,7 +119,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ do irho=1,rho_map_size if( l_use_rho_map) ifft=rho_map(irho) if(.not.l_use_rho_map) ifft= irho - rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) + rhotwr_p(ifft)=cmplx(conjg(WF_symm1_p(irho,i_spinor))*WF_symm2_p(irho,j_spinor),kind=DP) enddo call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,i_spinor,j_spinor)) ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index d748476dbd..c6afc6d05d 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -120,9 +120,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if( n_spin==1 ) then ! if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),1,1,1,1)*& - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,1,1,1,1)*& - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,1,1)) ! endif @@ -140,9 +140,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ os_yambo=i_sp_loop ! To check/fix the spinorial version if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),is_yambo,os_yambo,is(4),os(4))* & - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_sp_loop,o_sp_loop)) ! enddo @@ -163,7 +163,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if(.not.l_use_rho_map) ifft= irho rhotwr_p(ifft)=rhotwr_p(ifft)+ & & cmplx(F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)* & - & WF_symm1_p(irho,ip_spinor)*conjg(WF_symm2_p(irho,jp_spinor)),kind=DP) + & conjg(WF_symm1_p(irho,ip_spinor))*WF_symm2_p(irho,jp_spinor),kind=DP) enddo enddo enddo diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 8c0763ff64..8aeccffad2 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -36,18 +36,18 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik ! integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v ! - i_sp_c=BS_T_grp_ik%table(i_Tk,4) - i_sp_v=BS_T_grp_ik%table(i_Tk,5) + i_sp_c=BS_T_grp_ip%table(i_Tp,4) + i_sp_v=BS_T_grp_ip%table(i_Tp,5) ! if (n_spinor==1) then - H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(:,i_Tk, 1 , 1 ),& - & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_c,i_sp_v) ) + H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp, 1 , 1 ),& + & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_c,i_sp_v) ) else if (n_spinor==2) then H_x=cZERO do i_sp_xc=1,n_spinor do o_sp_xc=1,n_spinor - H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(:,i_Tk,i_sp_xc,o_sp_xc),& - & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_xc,o_sp_xc) ) + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp,i_sp_xc,o_sp_xc),& + & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc) ) enddo enddo endif From 0af4594dee95efd81664fad576151f474b727a01 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 00:29:29 +0100 Subject: [PATCH 0707/1367] Version 5.2.0, Revision 23024, Hash eef29afe9d MODIFIED * include/version/version.m4 bse/K_kernel.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_G_kernel.F Bugs: - tddft with coupling is not working fine trying to fix it. Not yet ok Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- src/bse/K_kernel.F | 16 +++-- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 13 +---- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 58 ++++++++++++++++--- 4 files changed, 67 insertions(+), 26 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 163d18acc7..701407c55a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23024 h.e3000fb57c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23025 h.eef29afe9d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23024" -SHASH="e3000fb57c" +SREVISION="23025" +SHASH="eef29afe9d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 14e9de2aa9..fe21f4719b 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -85,7 +85,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP):: sqrt_f_itk,sqrt_f_itp real(SP), allocatable :: BS_max_val_CPU(:),rho(:) ! - complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir,TDDFT_ALDA_eh_space_G_kernel + complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir + complex(SP), external ::TDDFT_ALDA_eh_space_G_kernel_res,TDDFT_ALDA_eh_space_G_kernel_cpl complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,& @@ -456,6 +457,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! + if(BS_blk(i_B)%mode=="C") H_shift(2)=BS_K_dim(1) + if(BS_blk(i_B)%mode=="A") H_shift(:)=BS_K_dim(1) + ! if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) if (iHxc==2) l_write_kernel=.not. l_bs_corr if (iHxc==3) l_write_kernel=.true. @@ -511,7 +515,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_R) ) then call TDDFT_oscillators_alloc_R(i_Tgrp_k) - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf) endif endif ! @@ -557,7 +561,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) - if (H_pos(1)>H_pos(2)) cycle + ! + if (H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle + if (l_BS_ares_from_res.and.H_pos(1)>H_pos(2)) cycle ! i_k_bz = BS_T_grp(i_Tgrp_k)%table(i_Tk,1) i_p_bz = BS_T_grp(i_Tgrp_p)%table(i_Tp,1) @@ -688,7 +694,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'RES') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, & + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_res(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! @@ -716,7 +722,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'CPL') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, & + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_cpl(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index c6afc6d05d..f8d8133fe6 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -86,16 +86,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! - if (mode=="R".or.mode=="A".or.mode=="F") then - is=(/i_c,i_k,i_s ,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) - else if (mode=="C".or.mode=="Q") then - ! Same momenta, inverted band and spin indexes - is=(/i_v,i_k,i_s ,i_sp_v/) - os=(/i_c,i_p,i_sp,i_sp_c/) - qs=(/minus_G(i_g_p),iq,1/) - endif + is=(/i_c,i_k,i_s ,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 8aeccffad2..e6ef643452 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -5,17 +5,58 @@ ! ! Authors (see AUTHORS file for details): DS ! -function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) +function TDDFT_ALDA_eh_space_G_kernel_res(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) ! ! Calculates the F_xc scattering ! - ! mode 1 - ! ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) ! :Fxc: ! (iv(1),ik(3),is(3)) -->--:...:-->-- (iv(2),ik(4),is(4)) ! - ! mode 2 + use pars, ONLY:SP,pi,cZERO + use FFT_m, ONLY:fft_size + use BS, ONLY:BS_T_group + use wrapper_omp, ONLY:Vstar_dot_V_omp + use electrons, ONLY:n_spinor,spin_occ + ! + implicit none + ! + integer, intent(in) :: BS_n_g_fxc,i_Tp,i_Tk + type(BS_T_group), target, intent(in) :: BS_T_grp_ip,BS_T_grp_ik + ! + complex(SP) :: H_x + ! + integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v + ! + i_sp_c=BS_T_grp_ip%table(i_Tp,4) + i_sp_v=BS_T_grp_ip%table(i_Tp,5) + ! + if (n_spinor==1) then + H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp, 1 , 1 ),& + & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_c,i_sp_v) ) + else if (n_spinor==2) then + H_x=cZERO + do i_sp_xc=1,n_spinor + do o_sp_xc=1,n_spinor + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp,i_sp_xc,o_sp_xc),& + & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc) ) + enddo + enddo + endif + ! + ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K + ! X = spin_occ/DL_vol/Nq + ! Co = 4*pi*spin_occ/DL_vol/Nq + ! --> X/Co = 1/4/pi + ! + H_x=H_x/4._SP/pi + ! +end function TDDFT_ALDA_eh_space_G_kernel_res +! +! +function TDDFT_ALDA_eh_space_G_kernel_cpl(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) + ! + ! Calculates the F_xc scattering ! ! (ic(1),ik(1),is(1)) --<--:...:--<-- (iv(2),ik(2),is(2)) ! :Fxc: @@ -24,8 +65,9 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik use pars, ONLY:SP,pi,cZERO use FFT_m, ONLY:fft_size use BS, ONLY:BS_T_group - use wrapper_omp, ONLY:Vstar_dot_V_omp + use wrapper_omp, ONLY:V_dot_V_omp use electrons, ONLY:n_spinor,spin_occ + use R_lattice, ONLY:minus_G ! implicit none ! @@ -40,13 +82,13 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik i_sp_v=BS_T_grp_ip%table(i_Tp,5) ! if (n_spinor==1) then - H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp, 1 , 1 ),& + H_x=V_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(minus_G(:BS_n_g_fxc),i_Tp, 1 , 1 ),& & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_c,i_sp_v) ) else if (n_spinor==2) then H_x=cZERO do i_sp_xc=1,n_spinor do o_sp_xc=1,n_spinor - H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp,i_sp_xc,o_sp_xc),& + H_x=H_x+V_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(minus_G(:BS_n_g_fxc),i_Tp,i_sp_xc,o_sp_xc),& & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc) ) enddo enddo @@ -59,4 +101,4 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik ! H_x=H_x/4._SP/pi ! -end function +end function TDDFT_ALDA_eh_space_G_kernel_cpl From 49f0ecd8af53245786f6d378bc09e48a5ab5540d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 11:30:12 +0100 Subject: [PATCH 0708/1367] Version 5.2.0, Revision 23025, Hash 0af4594dee MODIFIED * include/version/version.m4 bse/K_kernel.F Bugs: - Fixed compilation problem left after prvious commit Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 701407c55a..73ac9c4baf 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23025 h.eef29afe9d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23026 h.0af4594dee, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23025" -SHASH="eef29afe9d" +SREVISION="23026" +SHASH="0af4594dee" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index fe21f4719b..e93cfd7ed8 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -71,7 +71,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& & i_kmq_s,i_kmq_s_m1,i_pmq_s,i_kmq_bz,i_pmq_bz,i_kmq,i_pmq,i_kp_mq_s,& -& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),& +& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_shift(2),H_pos(2),& & i_v_k,i_v_p,i_c_k,i_c_p,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v,iq_W,iq_W_bz,iq_W_s,ig_W,& & i_kmq_t,i_pmq_t,i_k_bz_mem,i_kmq_bz_mem,qindx_tmp(2) ! OMP LAST DEF @@ -457,8 +457,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! - if(BS_blk(i_B)%mode=="C") H_shift(2)=BS_K_dim(1) - if(BS_blk(i_B)%mode=="A") H_shift(:)=BS_K_dim(1) + H_shift=0 + if(BS_blk(i_block)%mode=="C") H_shift(2)=BS_K_dim(1) + if(BS_blk(i_block)%mode=="A") H_shift(:)=BS_K_dim(1) ! if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) if (iHxc==2) l_write_kernel=.not. l_bs_corr From 12ec222434d288294af48d3b69b91cc7b7845a8d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 12:03:59 +0100 Subject: [PATCH 0709/1367] Version 5.2.0, Revision 23026, Hash 49f0ecd8af MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_collisions_R.F Bugs: - Fixed small bug left in the new implementation Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 73ac9c4baf..2d5b73aa08 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23026 h.0af4594dee, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23027 h.49f0ecd8af, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23026" -SHASH="0af4594dee" +SREVISION="23027" +SHASH="49f0ecd8af" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index f8d8133fe6..3515f165f2 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) +subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf) ! ! Calculates the F_xc scattering ! @@ -30,7 +30,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ type(bz_samp),intent(in) :: Xk integer, intent(in) :: iq,i_T_grp,NG(2) logical, intent(in) :: l_bs_tddft_wf_in_loop - character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space From 2cdea3b689f62289a95a94237b6d69de2b97bfb1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 14:01:24 +0100 Subject: [PATCH 0710/1367] Version 5.2.0, Revision 23027, Hash 12ec222434 MODIFIED * include/version/version.m4 bse/K_Transitions_setup.F bse/K_kernel.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_G_kernel.F DELETED * bse/K_diago_hermitian_residuals.F Changes: - [ysmbo] Logic of magnons implementation improved. Still results with coupling have an error Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- src/bse/K_Transitions_setup.F | 9 +-- src/bse/K_diago_hermitian_residuals.F | 73 ------------------- src/bse/K_kernel.F | 32 ++++---- .../TDDFT_ALDA_eh_space_G_collisions_L.F | 22 ++++-- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 26 ++++--- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 66 ++--------------- 7 files changed, 62 insertions(+), 172 deletions(-) delete mode 100644 src/bse/K_diago_hermitian_residuals.F diff --git a/include/version/version.m4 b/include/version/version.m4 index 2d5b73aa08..c90fda3feb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23027 h.49f0ecd8af, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23028 h.12ec222434, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23027" -SHASH="49f0ecd8af" +SREVISION="23028" +SHASH="12ec222434" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 12f988c586..b49c32141d 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -151,8 +151,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) i_sp_v=i_sp_c ! if (l_BS_magnons.and.n_sp_pol==2) then - if(i_res_ares==1.and.i_sp_c==1) cycle - if(i_res_ares==2.and.i_sp_c==2) cycle + if(i_sp_c==1) cycle i_sp_v=mod(i_sp_c,n_sp_pol)+1 endif ! @@ -165,14 +164,12 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! ib1=iv ib2=ic - isp1=i_sp_v - isp2=i_sp_c if (i_res_ares==2) then ib1=ic ib2=iv - isp1=i_sp_c - isp2=i_sp_v endif + isp1=i_sp_v + isp2=i_sp_c ! if (.not.K_Transition_check(Ken,Dip,iq,ik,ikp,ib1,ib2,isp2,i_res_ares,& & E_eh,E_eh_SOC_corr,f_eh,f_eh_RES,f_eh_PL)) cycle diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F deleted file mode 100644 index f61fca79dc..0000000000 --- a/src/bse/K_diago_hermitian_residuals.F +++ /dev/null @@ -1,73 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2016 The Yambo Team -! -! Authors (see AUTHORS file for details): AM MG DS -! -subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) - ! - ! Resonant Residuals - !==================== - ! BS_R_right(i) = \sum_k = - ! \sum_k BS_mat(k,i) x conjg( BSS_dipoles(k) ) - ! BS_R_left(i) = conjg( BS_R_right(i) ) - ! - use pars, ONLY:SP,cZERO - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use LIVE_t, ONLY:live_timing - use X_m, ONLY:global_gauge - use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f_RES,BS_mat,BSS_n_eig - use BS, ONLY:BS_K_dim - ! - implicit none - ! - integer, intent(in) :: i_BS_mat - real(SP) ,intent(in) :: BS_E_real(BSS_n_eig) - complex(SP),intent(out) :: BS_R_left(BSS_n_eig),BS_R_right(BSS_n_eig) - ! - ! Workspace - ! - type(PP_indexes) ::px - integer ::i_lambda,i_range(2) - complex(SP) ::tmp_res(BS_K_dim(i_BS_mat)) - ! - call PP_indexes_reset(px) - call PARALLEL_index(px,(/BSS_n_eig/)) - ! - i_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) - ! - BS_R_left =cZERO - BS_R_right=cZERO - call live_timing('EPS R residuals',px%n_of_elements(myid+1)) - ! - tmp_res = BSS_dipoles_opt(1,i_range(1):i_range(2))*sqrt(cmplx(BSS_eh_f_RES(i_range(1):i_range(2)),kind=SP)) - ! - ! DS. Note. Velocity gauge fixing does not work if neq occupations are loaded. Not sure why. - if (trim(global_gauge)=="velocity") tmp_res =tmp_res/BSS_eh_E(i_range(1):i_range(2)) - if (allocated(BSS_eh_Z)) tmp_res =tmp_res*sqrt(BSS_eh_Z(i_range(1):i_range(2))) - ! - do i_lambda=1,BSS_n_eig - ! - if (.not.px%element_1D(i_lambda)) cycle - ! - BS_R_left(i_lambda) =V_dot_V_omp(BS_K_dim(i_BS_mat),tmp_res,conjg(BS_mat(:,i_lambda))) - if (trim(global_gauge)=="velocity") then - BS_R_left(i_lambda) = BS_R_left(i_lambda)*BS_E_real(i_lambda) - endif - ! - BS_R_right(i_lambda)=conjg(BS_R_left(i_lambda)) - ! - call live_timing(steps=1) - ! - enddo - call live_timing() - ! - call PP_redux_wait(BS_R_left) - call PP_redux_wait(BS_R_right) - ! - call PP_indexes_reset(px) - ! -end subroutine K_diago_hermitian_residuals diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index e93cfd7ed8..54ee340dfe 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -86,7 +86,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) real(SP), allocatable :: BS_max_val_CPU(:),rho(:) ! complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir - complex(SP), external ::TDDFT_ALDA_eh_space_G_kernel_res,TDDFT_ALDA_eh_space_G_kernel_cpl + complex(SP), external ::TDDFT_ALDA_eh_space_G_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,& @@ -497,26 +497,26 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Exchange oscillators !---------------------- if(iHxc==1) then - if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_x) ) then - call BS_exchange_oscillators_alloc(i_Tgrp_p) - call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) - endif if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_x) ) then call BS_exchange_oscillators_alloc(i_Tgrp_k) call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) endif + if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_x) ) then + call BS_exchange_oscillators_alloc(i_Tgrp_p) + call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) + endif endif ! ! TDDFT oscillators !---------------------- if(iHxc==2 .and. l_tddft_gsum) then - if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_tddft_L) ) then - call TDDFT_oscillators_alloc_L(i_Tgrp_p) - call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf) + if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_L) ) then + call TDDFT_oscillators_alloc_L(i_Tgrp_k) + call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) endif - if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_R) ) then - call TDDFT_oscillators_alloc_R(i_Tgrp_k) - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf) + if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_tddft_R) ) then + call TDDFT_oscillators_alloc_R(i_Tgrp_p) + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) endif endif ! @@ -695,7 +695,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'RES') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_res(BS_n_g_fxc,& + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! @@ -723,7 +723,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'CPL') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_cpl(BS_n_g_fxc,& + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! @@ -765,13 +765,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! if(l_BSE_minimize_memory.and.iHxc==1) then - call BS_exchange_oscillators_free(i_Tgrp_p) call BS_exchange_oscillators_free(i_Tgrp_k) + call BS_exchange_oscillators_free(i_Tgrp_p) endif ! if(l_BSE_minimize_memory.and.iHxc==2.and.l_tddft_gsum) then - call TDDFT_oscillators_free_L(i_Tgrp_p) - call TDDFT_oscillators_free_R(i_Tgrp_k) + call TDDFT_oscillators_free_L(i_Tgrp_k) + call TDDFT_oscillators_free_R(i_Tgrp_p) endif ! if(iHxc==3) call BS_correlation_oscillators_free(i_block) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 389c63fdfc..b0bc2be03f 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf) +subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering ! @@ -29,6 +29,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ type(bz_samp),intent(in) :: Xk integer, intent(in) :: iq,i_T_grp,NG(2) logical, intent(in) :: l_bs_tddft_wf_in_loop + character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space @@ -81,9 +82,16 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! - is=(/i_c,i_k,i_s,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) + if (mode=="R".or.mode=="C".or.mode=="F") then + is=(/i_c,i_k,i_s ,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) + else if (mode=="A".or.mode=="Q") then + ! Same momenta and spin indexes, inverted bands + is=(/i_v,i_k,i_s ,i_sp_c/) + os=(/i_c,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) + endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then @@ -106,8 +114,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ call WF_apply_symm_cpu(os,WF_symm2_p) ! if( n_spinor==1 ) then - if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) - if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) + if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + if(.not.l_use_rho_map) rhotwr_p( : )=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,1,1)) endif ! @@ -119,7 +127,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ do irho=1,rho_map_size if( l_use_rho_map) ifft=rho_map(irho) if(.not.l_use_rho_map) ifft= irho - rhotwr_p(ifft)=cmplx(conjg(WF_symm1_p(irho,i_spinor))*WF_symm2_p(irho,j_spinor),kind=DP) + rhotwr_p(ifft)=cmplx(WF_symm1_p(irho,i_spinor)*conjg(WF_symm2_p(irho,j_spinor)),kind=DP) enddo call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,i_spinor,j_spinor)) ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 3515f165f2..f91c76c0ed 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf) +subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering ! @@ -30,6 +30,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ type(bz_samp),intent(in) :: Xk integer, intent(in) :: iq,i_T_grp,NG(2) logical, intent(in) :: l_bs_tddft_wf_in_loop + character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space @@ -85,9 +86,16 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! - is=(/i_c,i_k,i_s ,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) + if (mode=="R".or.mode=="Q".or.mode=="F") then + is=(/i_c,i_k,i_s ,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) + else if (mode=="A".or.mode=="C") then + ! Same momenta and spin indexes, inverted bands + is=(/i_v,i_k,i_s ,i_sp_c/) + os=(/i_c,i_p,i_sp,i_sp_v/) + qs=(/i_g_p,iq,1/) + endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then @@ -112,9 +120,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if( n_spin==1 ) then ! if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),1,1,1,1)*& - & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,1,1,1,1)*& - & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,1,1)) ! endif @@ -132,9 +140,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ os_yambo=i_sp_loop ! To check/fix the spinorial version if ( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(F_xc_mat(rho_map(:),is_yambo,os_yambo,is(4),os(4))* & - & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) if (.not.l_use_rho_map) rhotwr_p( : )=cmplx(F_xc_mat( : ,is_yambo,os_yambo,is(4),os(4))* & - & conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1),kind=DP) + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_sp_loop,o_sp_loop)) ! enddo @@ -155,7 +163,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if(.not.l_use_rho_map) ifft= irho rhotwr_p(ifft)=rhotwr_p(ifft)+ & & cmplx(F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)* & - & conjg(WF_symm1_p(irho,ip_spinor))*WF_symm2_p(irho,jp_spinor),kind=DP) + & WF_symm1_p(irho,ip_spinor)*conjg(WF_symm2_p(irho,jp_spinor)),kind=DP) enddo enddo enddo diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index e6ef643452..6e281946dc 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -function TDDFT_ALDA_eh_space_G_kernel_res(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) +function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) ! ! Calculates the F_xc scattering ! @@ -28,18 +28,18 @@ function TDDFT_ALDA_eh_space_G_kernel_res(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_gr ! integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v ! - i_sp_c=BS_T_grp_ip%table(i_Tp,4) - i_sp_v=BS_T_grp_ip%table(i_Tp,5) + i_sp_c=BS_T_grp_ik%table(i_Tk,4) + i_sp_v=BS_T_grp_ik%table(i_Tk,5) ! if (n_spinor==1) then - H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp, 1 , 1 ),& - & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_c,i_sp_v) ) + H_x=Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(:,i_Tk, 1 , 1 ),& + & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_c,i_sp_v) ) else if (n_spinor==2) then H_x=cZERO do i_sp_xc=1,n_spinor do o_sp_xc=1,n_spinor - H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(:,i_Tp,i_sp_xc,o_sp_xc),& - & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc) ) + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc),& + & BS_T_grp_ip%O_tddft_L(:,i_Tp,i_sp_xc,o_sp_xc) ) enddo enddo endif @@ -51,54 +51,4 @@ function TDDFT_ALDA_eh_space_G_kernel_res(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_gr ! H_x=H_x/4._SP/pi ! -end function TDDFT_ALDA_eh_space_G_kernel_res -! -! -function TDDFT_ALDA_eh_space_G_kernel_cpl(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) - ! - ! Calculates the F_xc scattering - ! - ! (ic(1),ik(1),is(1)) --<--:...:--<-- (iv(2),ik(2),is(2)) - ! :Fxc: - ! (iv(1),ik(3),is(3)) -->--:...:-->-- (ic(2),ik(4),is(4)) - ! - use pars, ONLY:SP,pi,cZERO - use FFT_m, ONLY:fft_size - use BS, ONLY:BS_T_group - use wrapper_omp, ONLY:V_dot_V_omp - use electrons, ONLY:n_spinor,spin_occ - use R_lattice, ONLY:minus_G - ! - implicit none - ! - integer, intent(in) :: BS_n_g_fxc,i_Tp,i_Tk - type(BS_T_group), target, intent(in) :: BS_T_grp_ip,BS_T_grp_ik - ! - complex(SP) :: H_x - ! - integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v - ! - i_sp_c=BS_T_grp_ip%table(i_Tp,4) - i_sp_v=BS_T_grp_ip%table(i_Tp,5) - ! - if (n_spinor==1) then - H_x=V_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(minus_G(:BS_n_g_fxc),i_Tp, 1 , 1 ),& - & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_c,i_sp_v) ) - else if (n_spinor==2) then - H_x=cZERO - do i_sp_xc=1,n_spinor - do o_sp_xc=1,n_spinor - H_x=H_x+V_dot_V_omp(BS_n_g_fxc,BS_T_grp_ip%O_tddft_L(minus_G(:BS_n_g_fxc),i_Tp,i_sp_xc,o_sp_xc),& - & BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc) ) - enddo - enddo - endif - ! - ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K - ! X = spin_occ/DL_vol/Nq - ! Co = 4*pi*spin_occ/DL_vol/Nq - ! --> X/Co = 1/4/pi - ! - H_x=H_x/4._SP/pi - ! -end function TDDFT_ALDA_eh_space_G_kernel_cpl +end function TDDFT_ALDA_eh_space_G_kernel From f3bec07bab2b9ececcd4ee725715d2a515957232 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 18:25:04 +0100 Subject: [PATCH 0711/1367] Version 5.2.0, Revision 23028, Hash 2cdea3b689 MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_kernel.F Bugs: - Fixed bug introduced with last changes Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index c90fda3feb..1fd7ea2491 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23028 h.12ec222434, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23029 h.2cdea3b689, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23028" -SHASH="12ec222434" +SREVISION="23029" +SHASH="2cdea3b689" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 6e281946dc..94e0378420 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -38,8 +38,8 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik H_x=cZERO do i_sp_xc=1,n_spinor do o_sp_xc=1,n_spinor - H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_R(:,i_Tk,i_sp_xc,o_sp_xc),& - & BS_T_grp_ip%O_tddft_L(:,i_Tp,i_sp_xc,o_sp_xc) ) + H_x=H_x+Vstar_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(:,i_Tk,i_sp_xc,o_sp_xc),& + & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_xc,o_sp_xc) ) enddo enddo endif From 821003f6d3635a0510a54fd64a7b00282ac908a0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 18:35:04 +0100 Subject: [PATCH 0712/1367] Version 5.2.0, Revision 23029, Hash f3bec07bab MODIFIED * include/version/version.m4 bse/K_correlation_collisions_dir.F Changes: - K_correlation_collisions_dir imported from phys-magnons Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_correlation_collisions_dir.F | 12 ++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 1fd7ea2491..124e1096ef 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23029 h.2cdea3b689, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23030 h.f3bec07bab, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23029" -SHASH="2cdea3b689" +SREVISION="23030" +SHASH="f3bec07bab" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 796b5ff36a..9e2b10575c 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -277,19 +277,15 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! if(i_k_sp_pol_c/=i_p_sp_pol_v) cycle ! - ! DS: Is coupling inmplemented or to do ?? - ! ! v->c', i.e. k-q -> p-q=k-q_W-q transitions ! - !i_s_collision=collision_star(i_pmq,i_kp_mq_s,i_c_p,i_p_sp_pol_c,i_s_mq_star,i_kp_mq_s) - !call EVAL_collision(i_block,i_kmq,i_pmq,i_kmq_t,i_pmq_t,i_k_sp_pol_v,& - !& i_p_sp_pol_c,i_v_k,i_c_p,iq_W,i_s_collision,K_CORR_collision) + call EVAL_collision(i_block,i_kmq,i_pmq,i_kmq_t,i_pmq_t,i_k_sp_pol_v,& + & i_p_sp_pol_c,i_v_k,i_c_p,iq_W,i_kmq_s,i_pmq_s,K_CORR_collision) ! ! c->v', i.e. k -> p=k-q_W transitions ! - !i_s_collision=collision_star(i_p,i_kp_s,i_v_p,i_p_sp_pol_v,i_s_star,i_kp_s) - !call EVAL_collision(i_block,i_k,i_p,1,1,i_k_sp_pol_c,i_p_sp_pol_v,& - !& i_c_k,i_v_p,iq_W,i_s_collision,K_CORR_collision) + call EVAL_collision(i_block,i_k,i_p,1,1,i_k_sp_pol_c,i_p_sp_pol_v,& + & i_c_k,i_v_p,iq_W,i_k_s,i_p_s,K_CORR_collision) ! enddo enddo From d2c87483e99696d1e334814382ed9e0840458f66 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 18:56:21 +0100 Subject: [PATCH 0713/1367] Version 5.2.0, Revision 23030, Hash 821003f6d3 MODIFIED * include/version/version.m4 bse/BSE_utilities.F bse/K_kernel.F Changes: - [yambo] With standard algorithm correlation oscillators are always deallocated Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/BSE_utilities.F | 6 ++++-- src/bse/K_kernel.F | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 124e1096ef..77b15cb132 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23030 h.f3bec07bab, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23032 h.821003f6d3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23030" -SHASH="f3bec07bab" +SREVISION="23032" +SHASH="821003f6d3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index 1aa15cc3de..58534ec627 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -40,10 +40,11 @@ subroutine BS_exchange_oscillators_free(iG_ref) enddo end subroutine BS_exchange_oscillators_free ! -subroutine BS_correlation_oscillators_free(iB_ref) +subroutine BS_correlation_oscillators_free(iB_ref,l_std_alg) use BS, ONLY:BS_T_grp,l_BSE_minimize_memory,BS_blk,n_BS_blks #include integer, intent(in) :: iB_ref + logical, intent(in) :: l_std_alg integer :: iB,ik_loop,ip_loop,ik_now,ip_now ik_now=BS_blk(iB_ref)%ik ip_now=BS_blk(iB_ref)%ip @@ -54,7 +55,8 @@ subroutine BS_correlation_oscillators_free(iB_ref) do iB=iB_ref,1,-1 ik_loop=BS_blk(iB)%ik ip_loop=BS_blk(iB)%ip - if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle + if ( ik_now==ik_loop .and. ip_now==ip_loop .and. & + & .not.(l_BSE_minimize_memory.or.l_std_alg)) cycle if (.not.allocated(BS_blk(iB)%O_c)) exit YAMBO_FREE(BS_blk(iB)%O_c) if ( allocated(BS_blk(iB)%O_table) ) then diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 54ee340dfe..bdef161519 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -774,7 +774,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call TDDFT_oscillators_free_R(i_Tgrp_p) endif ! - if(iHxc==3) call BS_correlation_oscillators_free(i_block) + if(iHxc==3) call BS_correlation_oscillators_free(i_block,l_std_alg) ! 100 if(l_write_kernel) then #if defined _PAR_IO From 41ca2a15499a9f7673171f945b3d847d6871e385 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 19:07:47 +0100 Subject: [PATCH 0714/1367] Version 5.2.0, Revision 23031, Hash d2c87483e9 MODIFIED * include/version/version.m4 bse/BSE_utilities.F bse/K_correlation_collisions_dir.F bse/K_correlation_kernel_dir.F bse/K_kernel.F modules/mod_BS.F Bugs: - removed recently introduced H_shift in K_kernel It was not needed, since it is accounted for by i_res_ares in calculation of H_pos Changes: - Simplified H_dir implementation Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++--- src/bse/BSE_utilities.F | 7 +---- src/bse/K_correlation_collisions_dir.F | 36 ++++++++++---------------- src/bse/K_correlation_kernel_dir.F | 17 +++++------- src/bse/K_kernel.F | 9 ++----- src/modules/mod_BS.F | 8 +++--- 6 files changed, 29 insertions(+), 54 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 77b15cb132..a0240441a6 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23032 h.821003f6d3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23033 h.d2c87483e9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23032" -SHASH="821003f6d3" +SREVISION="23033" +SHASH="d2c87483e9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index 58534ec627..f38dbbd2c0 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -59,12 +59,7 @@ subroutine BS_correlation_oscillators_free(iB_ref,l_std_alg) & .not.(l_BSE_minimize_memory.or.l_std_alg)) cycle if (.not.allocated(BS_blk(iB)%O_c)) exit YAMBO_FREE(BS_blk(iB)%O_c) - if ( allocated(BS_blk(iB)%O_table) ) then - YAMBO_FREE(BS_blk(iB)%O_table) - else - YAMBO_FREE(BS_blk(iB)%O_table1) - YAMBO_FREE(BS_blk(iB)%O_table2) - endif + YAMBO_FREE(BS_blk(iB)%O_table) YAMBO_FREE(BS_blk(iB)%kp_table) #ifdef _CUDA if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 9e2b10575c..ebb7a8e51f 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -112,13 +112,11 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) enddo enddo ! - YAMBO_ALLOC(BS_blk(i_block)%O_table1,(nsym,nsym,N_kmq,N_pmq,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol)) - YAMBO_ALLOC(BS_blk(i_block)%O_table2,(nsym,nsym,N_kmq,N_pmq,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol)) + YAMBO_ALLOC(BS_blk(i_block)%O_table,(nsym,nsym,N_kmq,N_pmq,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol)) allocate(O_todo_table(nsym,nsym,N_kmq,N_pmq,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol)) ! BS_blk(i_block)%N_oscillators=0 - BS_blk(i_block)%O_table1=0 - BS_blk(i_block)%O_table2=0 + BS_blk(i_block)%O_table=0 O_todo_table=.false. ! i_p_bz_last=0 ; i_k_bz_last=0 ; iq_W_bz_last=0 ; ig_W_last=0 @@ -150,11 +148,11 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! ! v->v', i.e. k-q -> p-q=k-q_W-q transitions ! - call EVAL_table(i_block,i_kmq_t,i_pmq_t,i_v_k,i_v_p,i_k_sp_pol_v,i_kmq_s,i_pmq_s) + call SET_table(i_block,i_kmq_t,i_pmq_t,i_v_k,i_v_p,i_k_sp_pol_v,i_kmq_s,i_pmq_s) ! ! c->c', i.e. k -> p=k-q_w transitions ! - call EVAL_table(i_block,1,1,i_c_k,i_c_p,i_k_sp_pol_c,i_k_s,i_p_s) + call SET_table(i_block,1,1,i_c_k,i_c_p,i_k_sp_pol_c,i_k_s,i_p_s) ! enddo enddo @@ -183,11 +181,11 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! ! v->c', i.e. k-q -> p-q=k-q_W-q transitions ! - call EVAL_table(i_block,i_kmq_t,i_pmq_t,i_v_k,i_c_p,i_k_sp_pol_v,i_kmq_s,i_pmq_s) + call SET_table(i_block,i_kmq_t,i_pmq_t,i_v_k,i_c_p,i_k_sp_pol_v,i_kmq_s,i_pmq_s) ! ! c->v', i.e. k -> p=k-q_W transitions ! - call EVAL_table(i_block,1,1,i_c_k,i_v_p,i_k_sp_pol_c,i_k_s,i_p_s) + call SET_table(i_block,1,1,i_c_k,i_v_p,i_k_sp_pol_c,i_k_s,i_p_s) ! enddo enddo @@ -394,22 +392,14 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & ! end subroutine fill_indexes ! - subroutine EVAL_table(iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko) + subroutine SET_table(iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko) implicit none integer, intent(in) :: iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko - integer :: iB_ref, iB_p - iB_ref=-1 - if ( iB_ref==-1 ) then - iB_ref=iB - BS_blk(iB)%N_oscillators=BS_blk(iB)%N_oscillators+1 - BS_blk(iB)%O_table1(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=BS_blk(iB)%N_oscillators - BS_blk(iB)%O_table2(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=iB - O_todo_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=.true. - endif - BS_blk(iB)%O_table1(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)= & -& BS_blk(iB_ref)%O_table1(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol) - BS_blk(iB)%O_table2(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)= & -& BS_blk(iB_ref)%O_table2(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol) + ! + BS_blk(iB)%N_oscillators=BS_blk(iB)%N_oscillators+1 + BS_blk(iB)%O_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=BS_blk(iB)%N_oscillators + O_todo_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=.true. + ! end subroutine ! subroutine EVAL_collision(iB,iki,iko,ikit,ikot,i_sp_pol_i,i_sp_pol_o,ibi,ibo,iq_W_in,i_s_ki,i_s_ko,isc) @@ -424,7 +414,7 @@ subroutine EVAL_collision(iB,iki,iko,ikit,ikot,i_sp_pol_i,i_sp_pol_o,ibi,ibo,iq_ isc%os=(/ibo,iko,i_s_ko,i_sp_pol_o/) isc%qs=(/1,iq_W_in,1/) ! - iB_oscillator = BS_blk(iB)%O_table1(i_s_ki,i_s_ko,ikit,ikot,ibi,ibo,i_sp_pol_i) + iB_oscillator = BS_blk(iB)%O_table(i_s_ki,i_s_ko,ikit,ikot,ibi,ibo,i_sp_pol_i) ! call DEV_SUB(scatter_Bamp)(isc) call dev_memcpy( DEV_VAR(BS_blk(iB)%O_c)(:,iB_oscillator), DEV_VAR(isc%rhotw) ) diff --git a/src/bse/K_correlation_kernel_dir.F b/src/bse/K_correlation_kernel_dir.F index 90458c7c51..60aaa50eed 100644 --- a/src/bse/K_correlation_kernel_dir.F +++ b/src/bse/K_correlation_kernel_dir.F @@ -45,7 +45,7 @@ function K_correlation_kernel_dir(i_block,i_p,i_pmq, ! complex(SP) :: K_correlation_kernel_dir ! - integer :: iO1,i_block_1,iO2,i_block_2,i_g1,i_g2,i_g3 + integer :: iO1,iO2,i_g1,i_g2,i_g3 complex(SP) :: O1(BS_n_g_W),O2(BS_n_g_W),O_times_W(BS_n_g_W) #ifdef _CUDA attributes(device) :: O1,O2,O_times_W @@ -58,16 +58,13 @@ function K_correlation_kernel_dir(i_block,i_p,i_pmq, return endif ! - iO1 = BS_blk(i_block)%O_table1(i_k_s,i_p_s,1,1,i_n_k,i_n_p,i_k_sp_pol_n) - i_block_1 = BS_blk(i_block)%O_table2(i_k_s,i_p_s,1,1,i_n_k,i_n_p,i_k_sp_pol_n) - ! - iO2 = BS_blk(i_block)%O_table1(i_kmq_s,i_pmq_s,i_kmq_t,i_pmq_t,i_m_k,i_m_p,i_k_sp_pol_m) - i_block_2 = BS_blk(i_block)%O_table2(i_kmq_s,i_pmq_s,i_kmq_t,i_pmq_t,i_m_k,i_m_p,i_k_sp_pol_m) + iO1 = BS_blk(i_block)%O_table(i_k_s,i_p_s,1,1,i_n_k,i_n_p,i_k_sp_pol_n) + iO2 = BS_blk(i_block)%O_table(i_kmq_s,i_pmq_s,i_kmq_t,i_pmq_t,i_m_k,i_m_p,i_k_sp_pol_m) ! #ifdef _CUDA ! - O_c_d_iO1 => BS_blk(i_block_1)%O_c_d(:,iO1) - O_c_d_iO2 => BS_blk(i_block_2)%O_c_d(:,iO2) + O_c_d_iO1 => BS_blk(i_block)%O_c_d(:,iO1) + O_c_d_iO2 => BS_blk(i_block)%O_c_d(:,iO2) !$cuf kernel do(1) <<<*,*>>> do i_g1=1,BS_n_g_W i_g2=G_m_G_d(g_rot_d(i_g1,iq_W_s) ,ig_W ) @@ -82,8 +79,8 @@ function K_correlation_kernel_dir(i_block,i_p,i_pmq, do i_g1=1,BS_n_g_W i_g2=G_m_G(g_rot(i_g1,iq_W_s) ,ig_W ) i_g3=G_m_G(g_rot(i_g1,iq_W_s_mq),ig_W_mq) - O1(i_g1)=BS_blk(i_block_1)%O_c(i_g2,iO1) - O2(i_g1)=BS_blk(i_block_2)%O_c(i_g3,iO2) + O1(i_g1)=BS_blk(i_block)%O_c(i_g2,iO1) + O2(i_g1)=BS_blk(i_block)%O_c(i_g3,iO2) enddo !$omp end parallel do ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index bdef161519..7ce2df054d 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -71,7 +71,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& & i_kmq_s,i_kmq_s_m1,i_pmq_s,i_kmq_bz,i_pmq_bz,i_kmq,i_pmq,i_kp_mq_s,& -& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_shift(2),H_pos(2),& +& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),& & i_v_k,i_v_p,i_c_k,i_c_p,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v,iq_W,iq_W_bz,iq_W_s,ig_W,& & i_kmq_t,i_pmq_t,i_k_bz_mem,i_kmq_bz_mem,qindx_tmp(2) ! OMP LAST DEF @@ -457,10 +457,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! - H_shift=0 - if(BS_blk(i_block)%mode=="C") H_shift(2)=BS_K_dim(1) - if(BS_blk(i_block)%mode=="A") H_shift(:)=BS_K_dim(1) - ! if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) if (iHxc==2) l_write_kernel=.not. l_bs_corr if (iHxc==3) l_write_kernel=.true. @@ -563,8 +559,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle - if (l_BS_ares_from_res.and.H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2)) cycle ! i_k_bz = BS_T_grp(i_Tgrp_k)%table(i_Tk,1) i_p_bz = BS_T_grp(i_Tgrp_p)%table(i_Tp,1) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 55c2d99cbb..a0dc5c16c3 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -235,11 +235,9 @@ module BS !------------------ integer :: N_oscillators integer, allocatable :: kp_table(:,:) ! 2,nkibz @ k = (i_kmq,i_pmq) - ! O_table is used by the std algorithm - integer, allocatable :: O_table(:,:,:,:,:,:,:) ! 2,sym,nkmq,npmq,n,n',spin @ k = (iOnn,i_block_ref) - ! O_table1 and O_table2 are used by the dir algorithm - integer, allocatable :: O_table1(:,:,:,:,:,:,:) ! symk,symp,nkmq,npmq,n,n',spin @ k = iOnn - integer, allocatable :: O_table2(:,:,:,:,:,:,:) ! symk,symp,nkmq,npmq,n,n',spin @ k = i_block_ref + ! O_table version used by the std algorithm --> 2,sym,nkmq,npmq,n,n',spin @ k = (iOnn,i_block_ref) + ! O_table Version used by the dir algorithm --> symk,symp,nkmq,npmq,n,n',spin @ k = iOnn + integer, allocatable :: O_table(:,:,:,:,:,:,:) complex(SP), allocatable :: O_c(:,:) #ifdef _CUDA complex(SP), allocatable, device :: O_c_d(:,:) From ed09ae16ac47dfdb4b6459891e34ce4b0c3d1335 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 19:17:03 +0100 Subject: [PATCH 0715/1367] Version 5.2.0, Revision 22970, Hash af8ba271e5 MODIFIED * include/version/version.m4 bse/K.F bse/K_stored_in_a_big_matrix.F Changes: - comments fixed Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K.F | 12 ++++++------ src/bse/K_stored_in_a_big_matrix.F | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 603d2009db..9d0928b11e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22744 h.94ab292d80, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22970 h.af8ba271e5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22744" -SHASH="94ab292d80" +SREVISION="22970" +SHASH="af8ba271e5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K.F b/src/bse/K.F index 923ea2e822..c392626338 100644 --- a/src/bse/K.F +++ b/src/bse/K.F @@ -445,19 +445,19 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! if (BS_blk(i_block)%done(i_Tk,i_Tp)=="t".and.l_BSE_restart) cycle ! - ! H_pos defines the position inside the full R/C/Q/A block, - ! but not inside the full BSE matrix + ! H_pos defines the position inside the full bse matrix when + ! l_BS_ares_from_res=.false. Otherwise it defines the position + ! inside the R/C blocks ! H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - ! When l_BS_ares_from_res=.false., also the upper part of the - ! anti-coupling and anti-resonant blocks are also computed + ! When l_BS_ares_from_res=.false., the full coupling block, and + ! the upper part of the anti-resonant blocks are also computed ! - ! When l_BSE_kernel_full also the lower parts of all blocks are - ! computed + ! When l_BSE_kernel_full the full blocks are computed ! if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 24ef7c784e..c81fa64aba 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -21,10 +21,10 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! coupling block is a square coupling block maybe rectangular coupling block is a square coupling block maybe rectangular ! ! (r r r c c c) (r r r c c) (r r r c c c) (r r r c c) - ! (- r r - c c) (- r r - c) (r r r c c c) (r r r c c) - ! (- - r - - c) (- - r - -) (r r r c c c) (r r r c c) - ! (- - - - - -) (q q q a a) (- - - - - -) (q q q a a) - ! (- - - - - -) (- q q - a) (- - - - - -) (q q q a a) + ! (- r r - c c) (- r r c c) (r r r c c c) (r r r c c) + ! (- - r - - c) (- - r c c) (r r r c c c) (r r r c c) + ! (- - - - - -) (- - - a a) (- - - - - -) (q q q a a) + ! (- - - - - -) (- - - - a) (- - - - - -) (q q q a a) ! (- - - - - -) (- - - - - -) ! use pars, ONLY:SP,cI,cZERO,cONE From c774add36bedd58b12fb1506ef7e48cd4469123a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 4 Nov 2023 22:40:40 +0100 Subject: [PATCH 0716/1367] Version 5.2.0, Revision 23032, Hash 41ca2a1549 MODIFIED * include/version/version.m4 bse/K_correlation_collisions_dir.F Bugs: - [yambo] Fixed memory usage Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_correlation_collisions_dir.F | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index a0240441a6..daa2c9b930 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23033 h.d2c87483e9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23035 h.41ca2a1549, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23033" -SHASH="d2c87483e9" +SREVISION="23035" +SHASH="41ca2a1549" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index ebb7a8e51f..b50095a085 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -396,6 +396,7 @@ subroutine SET_table(iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko) implicit none integer, intent(in) :: iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko ! + if( O_todo_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol) ) return BS_blk(iB)%N_oscillators=BS_blk(iB)%N_oscillators+1 BS_blk(iB)%O_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=BS_blk(iB)%N_oscillators O_todo_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=.true. From 5b22d462ab454e19d4f3dae5700b97675b1d9498 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 6 Nov 2023 17:30:16 +0100 Subject: [PATCH 0717/1367] Version 5.2.0, Revision 23033, Hash c774add36b MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F Changes: - [yambo] TDDFT fixes imported from phys-magnons Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 16 +++++++++------- src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 14 ++++++++------ 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index daa2c9b930..60adfe2924 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23035 h.41ca2a1549, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23036 h.c774add36b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23035" -SHASH="41ca2a1549" +SREVISION="23036" +SHASH="c774add36b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index b0bc2be03f..b4f75e25a3 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -16,7 +16,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ use FFT_m, ONLY:fft_size use wave_func, ONLY:rho_map_size,rho_map,WF use interfaces, ONLY:WF_load,WF_free - use R_lattice, ONLY:qindx_X,bz_samp + use R_lattice, ONLY:qindx_X,bz_samp,minus_G use BS, ONLY:l_BS_magnons,BS_T_grp,BS_bands use electrons, ONLY:n_spinor,n_sp_pol,n_spin use timing_m, ONLY:timing @@ -82,15 +82,17 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! + is=(/0,i_k,i_s ,i_sp_c/) + os=(/0,i_p,i_sp,i_sp_v/) + qs=(/minus_G(i_g_p),iq,1/) + ! if (mode=="R".or.mode=="C".or.mode=="F") then - is=(/i_c,i_k,i_s ,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) + is(1)=i_c + os(1)=i_v else if (mode=="A".or.mode=="Q") then ! Same momenta and spin indexes, inverted bands - is=(/i_v,i_k,i_s ,i_sp_c/) - os=(/i_c,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) + is(1)=i_v + os(1)=i_c endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index f91c76c0ed..1c4853f36d 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -86,15 +86,17 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! + is=(/i_c,i_k,i_s ,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) + qs=(/minus_G(i_g_p),iq,1/) + ! if (mode=="R".or.mode=="Q".or.mode=="F") then - is=(/i_c,i_k,i_s ,i_sp_c/) - os=(/i_v,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) + is(1)=i_c + os(1)=i_v else if (mode=="A".or.mode=="C") then ! Same momenta and spin indexes, inverted bands - is=(/i_v,i_k,i_s ,i_sp_c/) - os=(/i_c,i_p,i_sp,i_sp_v/) - qs=(/i_g_p,iq,1/) + is(1)=i_v + os(1)=i_c endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) From 61fbb195ca235ba2d014745cd4b107b6187ca788 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 7 Nov 2023 22:55:01 +0100 Subject: [PATCH 0718/1367] Version 5.2.0, Revision 23053, Hash 0ed59aa4f9 MODIFIED * include/version/version.m4 bse/K_Transitions_setup.F bse/K_driver.F Changes: - [yambo] K_Transitions_setup subroutine split in two again Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- src/bse/K_Transitions_setup.F | 274 ++++++++++++++++++++-------------- src/bse/K_driver.F | 6 +- 3 files changed, 167 insertions(+), 119 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 60adfe2924..ead68df755 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23036 h.c774add36b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23054 h.5b22d462ab, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23036" -SHASH="c774add36b" +SREVISION="23054" +SHASH="5b22d462ab" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index b49c32141d..d675144ed3 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -5,18 +5,8 @@ ! ! Authors (see AUTHORS file for details): AM DS IMA ! -subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) +subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! - ! mode=K - ! ====== - ! Out: - ! - ! BS_K_dim(1) - ! BS_H_dim - ! BS_nT_at_k - ! - ! mode=T - ! ====== ! Filling of Transition groups ! !type BS_T_group @@ -33,152 +23,113 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) use pars, ONLY:SP use stderr, ONLY:intc use BS_solvers, ONLY:BSS_mode,BSS_uses_DbGd - ! mode ="T" use BS, ONLY:T_group,BS_bands,BS_T_grp,BS_nT_grps,BS_n_eh_spaces,& & BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,& & BS_nkFGbz_in_Tgrp - ! mode ="K" - use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & -& l_BS_ares_from_res,BS_res_ares_n_mat use DIPOLES, ONLY:DIPOLE_t use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_IND_T_ordered,PAR_IND_T_groups,& & PAR_IND_T_Haydock,PP_indexes_reset - use electrons, ONLY:levels,n_sp_pol,n_full_bands,n_met_bands + use electrons, ONLY:levels,n_sp_pol use com, ONLY:msg use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:l_BS_magnons,l_BS_photolum #if defined _RT + use electrons, ONLY:n_full_bands,n_met_bands use drivers, ONLY:l_rt_carriers_in_use use RT_control, ONLY:EQ_Transitions,EQ_NoOcc #endif ! #include ! - character(1) :: mode ! "K" for k-resolved, "T" for transitions groups - type(levels) :: Ken - type(bz_samp) :: Xk - type(DIPOLE_t) :: Dip - integer :: iq + type(levels), intent(in) :: Ken + type(bz_samp), intent(in) :: Xk + type(DIPOLE_t), intent(in) :: Dip + integer, intent(in) :: iq + integer, intent(in) :: V_bands(2),C_bands(2) ! ! Work Space ! real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL logical :: l_trans_in_group,l_grp_to_grp - integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2,isp1,isp2, & + integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2, & & i_T_now,i_T_group_now,i_T_group_last,i_T_group_start,i_g,n_loops,i_loop,i_T_in_the_grp,i_res_ares,& -& BS_nT_at_k_tmp(Xk%nibz*2),V_bands(2),C_bands(2),& & nColFG_in_T_group_now,i_ColFG,ikFGbz,ikFG ! logical, external :: K_Transition_check ! - if (mode=="K") call section("+P",'Transition pre-analysis @q'//trim(intc(iq))) - if (mode=="T") call section("=",'Transition Groups build-up @q'//trim(intc(iq))) + call section("=",'Transition Groups build-up @q'//trim(intc(iq))) ! - call k_build_up_BZ_tables(Xk) + ! BS_nT_grps is computed in PARALLEL_Transition_grouping ! - ! BS_nT_grps is first computed in PARALLEL_Transition_grouping + call msg('r','[BSK] Transition groups (total)',BS_nT_grps) ! - if (mode=="T") then - allocate(BS_T_grp(BS_nT_grps)) - do i_g=1,BS_nT_grps - BS_T_grp(i_g)%size=0 - enddo - n_loops=2 - ! - allocate(BS_nkFGbz_in_Tgrp(BS_nT_grps)) - ! - call PP_indexes_reset(PAR_IND_WF_b_and_k) - YAMBO_ALLOC(PAR_IND_WF_b_and_k%element_2D,(BS_bands(2),Xk%nibz)) - PAR_IND_WF_b_and_k%element_2D=.FALSE. - else - BS_K_dim=0 - BS_nT_at_k_tmp=0 - n_loops=1 - endif + allocate(BS_T_grp(BS_nT_grps)) + do i_g=1,BS_nT_grps + BS_T_grp(i_g)%size=0 + enddo + n_loops=2 ! - V_bands=(/BS_bands(1),maxval(Ken%nbm)/) - C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) -#if defined _RT - ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. - if (l_rt_carriers_in_use.and.EQ_Transitions) then - V_bands=(/BS_bands(1),maxval(n_met_bands)/) - C_bands=(/minval(n_full_bands)+1,BS_bands(2)/) - endif - if (EQ_NoOcc) then - V_bands=BS_bands - C_bands=BS_bands - endif -#endif + allocate(BS_nkFGbz_in_Tgrp(BS_nT_grps)) + ! + call PP_indexes_reset(PAR_IND_WF_b_and_k) + YAMBO_ALLOC(PAR_IND_WF_b_and_k%element_2D,(BS_bands(2),Xk%nibz)) + PAR_IND_WF_b_and_k%element_2D=.FALSE. ! do i_loop=1,n_loops ! - if (mode=="T") then - i_T_now=0 - i_T_group_now=0 - i_T_group_last=0 - endif + i_T_now=0 + i_T_group_now=0 + i_T_group_last=0 + ! + nColFG_in_T_group_now=1 ! ! DS: WARNING ! I cannot revert ik and i_sp_pol loop here ... ! do i_res_ares=1,BS_n_eh_spaces ! - if (mode=="T") i_T_group_start=i_T_group_now+1 + i_T_group_start=i_T_group_now+1 ! do ik=1,Xk%nibz - ! - ! Here I cannot invert the ik and the i_sp loop since - ! BS_T_grp and BS_nT_at_k are defined according to kpts while they - ! should be defined according to both i_sp_pol and kpts - ! - ! Moreover I cannot move iv,ic loops insiede i_sp_pol and i_star loops - ! Otherwise runs with parallelization over eh fail - ! Having i_star inside the loops is likely what makes the distribution - ! of the algorithm with the qindx_B distributed in memory very slow - ! since i_k_bz and i_p_bz change at each iteration of the loop ! if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then nColFG_in_T_group_now = maxval(Xk%FGbz%N_mapped(& & Xk%k_table(ik,Xk%star(ik,:Xk%nstar(ik))))) - else - nColFG_in_T_group_now=1 end if ! - do iv=V_bands(1),V_bands(2) - do ic=C_bands(1),C_bands(2) - ! - do i_sp_c=1,n_sp_pol - i_sp_v=i_sp_c - ! - if (l_BS_magnons.and.n_sp_pol==2) then - if(i_sp_c==1) cycle - i_sp_v=mod(i_sp_c,n_sp_pol)+1 - endif + ! Here I cannot invert the ik and the i_sp loop since + ! BS_T_grp and BS_nT_at_k are defined according to kpts while they + ! should be defined according to both i_sp_pol and kpts + ! + do i_star=1,Xk%nstar(ik) + ! + ikbz=Xk%k_table(ik,Xk%star(ik,i_star)) + ! + ikpbz=qindx_X(iq,ikbz,1) + ikp =Xk%sstar(ikpbz,1) + ! + ! Moreover I cannot move iv,ic loops insiede i_sp_pol and i_star loops + ! Otherwise runs with parallelization over eh fail + ! Having i_star inside the loops is likely what makes the distribution + ! of the algorithm with the qindx_B distributed in memory very slow + ! since i_k_bz and i_p_bz change at each iteration of the loop + ! + do iv=V_bands(1),V_bands(2) + do ic=C_bands(1),C_bands(2) ! - do i_star=1,Xk%nstar(ik) + do i_sp_c=1,n_sp_pol + i_sp_v=i_sp_c ! - ikbz=Xk%k_table(ik,Xk%star(ik,i_star)) - ! - ikpbz=qindx_X(iq,ikbz,1) - ikp =Xk%sstar(ikpbz,1) - ! - ib1=iv - ib2=ic - if (i_res_ares==2) then - ib1=ic - ib2=iv + if (l_BS_magnons.and.n_sp_pol==2) then + if(i_sp_c==1) cycle + i_sp_v=mod(i_sp_c,n_sp_pol)+1 endif - isp1=i_sp_v - isp2=i_sp_c ! - if (.not.K_Transition_check(Ken,Dip,iq,ik,ikp,ib1,ib2,isp2,i_res_ares,& -& E_eh,E_eh_SOC_corr,f_eh,f_eh_RES,f_eh_PL)) cycle + if (i_res_ares==1) then; ib1=iv; ib2=ic; endif + if (i_res_ares==2) then; ib1=ic; ib2=iv; endif ! - if (mode=="K") then - BS_K_dim(i_res_ares)=BS_K_dim(i_res_ares)+1 - BS_nT_at_k_tmp(ik+(i_res_ares-1)*Xk%nibz)=BS_nT_at_k_tmp(ik+(i_res_ares-1)*Xk%nibz)+1 - cycle - endif + if (.not.K_Transition_check(Ken,Dip,iq,ik,ikp,ib1,ib2,i_sp_c,i_res_ares,& +& E_eh,E_eh_SOC_corr,f_eh,f_eh_RES,f_eh_PL)) cycle ! i_T_now=i_T_now+1 i_T_group_now=T_group(i_T_now) @@ -216,7 +167,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! i_T_in_the_grp=i_T_in_the_grp+1 ! - BS_T_grp(i_T_group_now)%table(i_T_in_the_grp,:)=(/ikbz,ib1,ib2,isp2,isp1/) + BS_T_grp(i_T_group_now)%table(i_T_in_the_grp,:)=(/ikbz,ib1,ib2,i_sp_c,i_sp_v/) ! PAR_IND_WF_b_and_k%element_2D(ib2,ik )=.TRUE. PAR_IND_WF_b_and_k%element_2D(ib1,ikp)=.TRUE. @@ -247,13 +198,13 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) BS_T_grp(i_T_group_now)%f_RES(i_T_in_the_grp)=f_eh_RES ! if (allocated(Ken%Z)) BS_T_grp(i_T_group_now)%Z(i_T_in_the_grp)=& -& Ken%Z(ib2,ik,isp2)*Ken%Z(ib1,ikp,isp1) + & Ken%Z(ib2,ik,i_sp_c)*Ken%Z(ib1,ikp,i_sp_v) ! ! Note that W is negative as the linewidth is negative(positive) above(below) the Fermi level. ! Presently there is the abs value here and a minus in K_IP.F ! if (allocated(Ken%W)) BS_T_grp(i_T_group_now)%W(i_T_in_the_grp)= & -& (-1._SP)**(i_res_ares-1)*(abs(Ken%W(ib2,ik,isp2))+abs(Ken%W(ib1,ikp,isp1))) + & (-1._SP)**(i_res_ares-1)*(abs(Ken%W(ib2,ik,i_sp_c))+abs(Ken%W(ib1,ikp,i_sp_v))) ! if ( BS_perturbative_SOC ) BS_T_grp(i_T_group_now)%E_SOC_corr(:,i_T_in_the_grp)=E_eh_SOC_corr(:) ! @@ -268,12 +219,109 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! enddo ! loop ! - ! REPORT +end subroutine K_Transitions_setup +! +! +subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) + ! + ! Out: ! - if (mode=="T") then - call msg('r','[BSK] Transition groups (total)',BS_nT_grps) - return + ! BS_K_dim(1) + ! BS_H_dim + ! BS_nT_at_k + ! + use pars, ONLY:SP + use stderr, ONLY:intc + use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & +& l_BS_ares_from_res,BS_res_ares_n_mat,BS_bands,& +& BS_n_eh_spaces + use DIPOLES, ONLY:DIPOLE_t + use electrons, ONLY:levels,n_sp_pol + use com, ONLY:msg + use R_lattice, ONLY:qindx_X,bz_samp + use BS, ONLY:l_BS_magnons +#if defined _RT + use electrons, ONLY:n_full_bands,n_met_bands + use drivers, ONLY:l_rt_carriers_in_use + use RT_control, ONLY:EQ_Transitions,EQ_NoOcc +#endif + ! +#include + ! + type(levels), intent(in) :: Ken + type(bz_samp), intent(in) :: Xk + type(DIPOLE_t), intent(in) :: Dip + integer, intent(in) :: iq + integer, intent(out):: V_bands(2),C_bands(2) + ! + ! Work Space + ! + real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL + integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2, & +& i_res_ares,BS_nT_at_k_tmp(Xk%nibz*2) + ! + logical, external :: K_Transition_check + ! + ! + call section("+P",'Transition pre-analysis @q'//trim(intc(iq))) + ! + call k_build_up_BZ_tables(Xk) + ! + BS_K_dim=0 + BS_nT_at_k_tmp=0 + ! + V_bands=(/BS_bands(1),maxval(Ken%nbm)/) + C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) +#if defined _RT + ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. + if (l_rt_carriers_in_use.and.EQ_Transitions) then + V_bands=(/BS_bands(1),maxval(n_met_bands)/) + C_bands=(/minval(n_full_bands)+1,BS_bands(2)/) + endif + if (EQ_NoOcc) then + V_bands=BS_bands + C_bands=BS_bands endif +#endif + ! + do i_res_ares=1,BS_n_eh_spaces + ! + do i_sp_c=1,n_sp_pol + ! + i_sp_v=i_sp_c + ! + if (l_BS_magnons.and.n_sp_pol==2) then + if(i_sp_c==1) cycle + i_sp_v=mod(i_sp_c,n_sp_pol)+1 + endif + ! + do ik=1,Xk%nibz + do i_star=1,Xk%nstar(ik) + ! + ikbz=Xk%k_table(ik,Xk%star(ik,i_star)) + ikpbz=qindx_X(iq,ikbz,1) + ikp =Xk%sstar(ikpbz,1) + ! + do iv=V_bands(1),V_bands(2) + do ic=C_bands(1),C_bands(2) + ! + if (i_res_ares==1) then; ib1=iv; ib2=ic; endif + if (i_res_ares==2) then; ib1=ic; ib2=iv; endif + ! + if (.not.K_Transition_check(Ken,Dip,iq,ik,ikp,ib1,ib2,i_sp_c,i_res_ares,& + & E_eh,E_eh_SOC_corr,f_eh,f_eh_RES,f_eh_PL)) cycle + ! + BS_K_dim(i_res_ares)=BS_K_dim(i_res_ares)+1 + BS_nT_at_k_tmp(ik+(i_res_ares-1)*Xk%nibz)=BS_nT_at_k_tmp(ik+(i_res_ares-1)*Xk%nibz)+1 + ! + enddo ! conduction + enddo ! valence + ! + enddo ! symmetries + enddo ! k (ibz) + enddo ! spin + ! + enddo ! i_res_ares ! YAMBO_ALLOC(BS_nT_at_k,(Xk%nibz*BS_n_eh_spaces)) BS_nT_at_k=BS_nT_at_k_tmp(:Xk%nibz*BS_n_eh_spaces) @@ -288,4 +336,4 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) if (BS_res_ares_n_mat==2.or.BS_K_coupling) BS_H_dim=BS_K_dim(1)+BS_K_dim(2) endif ! -end subroutine +end subroutine K_Transitions_dimensions diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 513f6b71b8..e1cc475e1b 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -39,7 +39,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! Work Space ! type(X_t) :: X_tddft,X_oscillators - integer :: iq,Max_G_m_G,iG_BSE,iGo_BSE + integer :: iq,Max_G_m_G,iG_BSE,iGo_BSE,VB(2),CB(2) type(w_samp) :: W_bss ! ! I/O @@ -172,13 +172,13 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) call DIPOLE_dimensions(Ken,Dip,BS_bands,BSS_q0) ! ! ... EH space (no parallelization) - call K_Transitions_setup("K",iq,Ken,Xk,Dip) + call K_Transitions_dimensions(iq,Ken,Xk,Dip,VB,CB) ! !... Parallel distribution call PARALLEL_global_Response_T_transitions(Xk) ! ! ... EH space (with parallelization) and Transition groups build-up - call K_Transitions_setup("T",iq,Ken,Xk,Dip) + call K_Transitions_setup(iq,Ken,Xk,Dip,VB,CB) ! !... Blocks build-up if (.not.l_rpa_IP) call K_blocks() From ad8724dd0664af4d864bc9ab4fc19d50182b2f3f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 7 Nov 2023 23:11:44 +0100 Subject: [PATCH 0719/1367] Version 5.2.0, Revision 23035, Hash 61fbb195ca MODIFIED * include/version/version.m4 bse/K_Transitions_setup.F Bugs: - [yambo] Ordering of loops reverted Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++--- src/bse/K_Transitions_setup.F | 48 +++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index ead68df755..b770438f25 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23054 h.5b22d462ab, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23055 h.61fbb195ca, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23054" -SHASH="5b22d462ab" +SREVISION="23055" +SHASH="61fbb195ca" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index d675144ed3..b394f0688a 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -90,6 +90,10 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! i_T_group_start=i_T_group_now+1 ! + ! Here I cannot invert the ik and the i_sp loop since + ! BS_T_grp and BS_nT_at_k are defined according to kpts while they + ! should be defined according to both i_sp_pol and kpts + ! do ik=1,Xk%nibz ! if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then @@ -97,33 +101,29 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) & Xk%k_table(ik,Xk%star(ik,:Xk%nstar(ik))))) end if ! - ! Here I cannot invert the ik and the i_sp loop since - ! BS_T_grp and BS_nT_at_k are defined according to kpts while they - ! should be defined according to both i_sp_pol and kpts + ! Moreover I cannot move iv,ic loops insiede i_sp_pol and i_star loops + ! Otherwise runs with parallelization over eh fail + ! Having i_star inside the loops is likely what makes the distribution + ! of the algorithm with the qindx_B distributed in memory very slow + ! since i_k_bz and i_p_bz change at each iteration of the loop ! - do i_star=1,Xk%nstar(ik) - ! - ikbz=Xk%k_table(ik,Xk%star(ik,i_star)) - ! - ikpbz=qindx_X(iq,ikbz,1) - ikp =Xk%sstar(ikpbz,1) - ! - ! Moreover I cannot move iv,ic loops insiede i_sp_pol and i_star loops - ! Otherwise runs with parallelization over eh fail - ! Having i_star inside the loops is likely what makes the distribution - ! of the algorithm with the qindx_B distributed in memory very slow - ! since i_k_bz and i_p_bz change at each iteration of the loop - ! - do iv=V_bands(1),V_bands(2) - do ic=C_bands(1),C_bands(2) + do iv=V_bands(1),V_bands(2) + do ic=C_bands(1),C_bands(2) + ! + do i_sp_c=1,n_sp_pol + i_sp_v=i_sp_c ! - do i_sp_c=1,n_sp_pol - i_sp_v=i_sp_c + if (l_BS_magnons.and.n_sp_pol==2) then + if(i_sp_c==1) cycle + i_sp_v=mod(i_sp_c,n_sp_pol)+1 + endif + ! + do i_star=1,Xk%nstar(ik) ! - if (l_BS_magnons.and.n_sp_pol==2) then - if(i_sp_c==1) cycle - i_sp_v=mod(i_sp_c,n_sp_pol)+1 - endif + ikbz=Xk%k_table(ik,Xk%star(ik,i_star)) + ! + ikpbz=qindx_X(iq,ikbz,1) + ikp =Xk%sstar(ikpbz,1) ! if (i_res_ares==1) then; ib1=iv; ib2=ic; endif if (i_res_ares==2) then; ib1=ic; ib2=iv; endif From 4e313c8e7ab5ed906ea845253620e8598a2f978e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 8 Nov 2023 17:18:22 +0100 Subject: [PATCH 0720/1367] Version 5.2.0, Revision 23036, Hash ad8724dd06 MODIFIED * include/version/version.m4 tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F wf_and_fft/WF_apply_symm.F Bugs: - [yambo] There is a bug in tddft which so far I'v not been able to spot Tentative code cleaning. When the code is compiled with --enable-gamma-only some elements of the wave-function in real in space have a wrong value. It seems to be due to some out of bounds somewhere Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 17 +++++++++++------ src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 17 +++++++++++------ src/wf_and_fft/WF_apply_symm.F | 16 ++++++++-------- 4 files changed, 33 insertions(+), 23 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index b770438f25..1062d9d8e8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23055 h.61fbb195ca, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23056 h.ad8724dd06, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23055" -SHASH="61fbb195ca" +SREVISION="23056" +SHASH="ad8724dd06" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index b4f75e25a3..d56221516d 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -5,6 +5,8 @@ ! ! Authors (see AUTHORS file for details): DS ! +#include +! subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering @@ -21,7 +23,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ use electrons, ONLY:n_spinor,n_sp_pol,n_spin use timing_m, ONLY:timing use openmp, ONLY:OPENMP_update,master_thread - !use interfaces, ONLY:WF_apply_symm + use interfaces, ONLY:WF_apply_symm use TDDFT, ONLY:tddft_wf_t ! implicit none @@ -39,9 +41,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_grp_p,is(4),os(4),qs(3),NK(2) ! - complex(DP), pointer :: rhotwr_p(:) - complex(SP), pointer :: WF_symm1_p(:,:) - complex(SP), pointer :: WF_symm2_p(:,:) + complex(DP), pointer DEV_ATTR :: rhotwr_p(:) + complex(SP), pointer DEV_ATTR :: WF_symm1_p(:,:) + complex(SP), pointer DEV_ATTR :: WF_symm2_p(:,:) ! call timing('T_space ALDA Osc.',OPR='start') ! @@ -49,6 +51,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ WF_symm2_p => tddft_wf%WF_symm2 rhotwr_p => tddft_wf%rhotwr_DP ! + WF_symm1_p=cZERO + WF_symm2_p=cZERO + ! ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) ! @@ -112,8 +117,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! - call WF_apply_symm_cpu(is,WF_symm1_p) - call WF_apply_symm_cpu(os,WF_symm2_p) + call WF_apply_symm(is,WF_symm1_p) + call WF_apply_symm(os,WF_symm2_p) ! if( n_spinor==1 ) then if( l_use_rho_map) rhotwr_p(rho_map(:))=cmplx(WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 1c4853f36d..cdf64a37e8 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -5,6 +5,8 @@ ! ! Authors (see AUTHORS file for details): DS ! +#include +! subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering @@ -22,7 +24,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ use electrons, ONLY:n_spinor,n_sp_pol,n_spin use timing_m, ONLY:timing use openmp, ONLY:OPENMP_update,master_thread - !use interfaces, ONLY:WF_apply_symm + use interfaces, ONLY:WF_apply_symm use TDDFT, ONLY:tddft_wf_t ! implicit none @@ -41,9 +43,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_grp_p,is(4),os(4),qs(3),NK(2) ! - complex(DP), pointer :: rhotwr_p(:) - complex(SP), pointer :: WF_symm1_p(:,:) - complex(SP), pointer :: WF_symm2_p(:,:) + complex(DP), pointer DEV_ATTR :: rhotwr_p(:) + complex(SP), pointer DEV_ATTR :: WF_symm1_p(:,:) + complex(SP), pointer DEV_ATTR :: WF_symm2_p(:,:) ! call timing('T_space ALDA Osc.',OPR='start') ! @@ -53,6 +55,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ WF_symm2_p => tddft_wf%WF_symm2 rhotwr_p => tddft_wf%rhotwr_DP ! + WF_symm1_p=cZERO + WF_symm2_p=cZERO + ! ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) ! @@ -116,8 +121,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! - call WF_apply_symm_cpu(is,WF_symm1_p) - call WF_apply_symm_cpu(os,WF_symm2_p) + call WF_apply_symm(is,WF_symm1_p) + call WF_apply_symm(os,WF_symm2_p) ! if( n_spin==1 ) then ! diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 1cc9d18774..b22667e81b 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -25,7 +25,7 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) integer, intent(in) :: isc(4) complex(SP), intent(out) DEV_ATTR :: WF_symm(rho_map_size,n_spinor) ! - WF_RSPACE(SP), pointer DEV_ATTR :: WF_p(:,:,:) + WF_RSPACE(SP), pointer DEV_ATTR :: WF_p(:,:) integer :: i_wf integer :: ifft,ifftp,isymm ! @@ -37,12 +37,12 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) & ' ID'//trim(intc(myid))) #endif ! - WF_p => DEV_VAR(WF%r) + WF_p => DEV_VAR(WF%r)(:,:,i_wf) isymm = isc(3) ! if(isc(3)==idt_index) then ! - call dev_memcpy(WF_symm,cmplx(DEV_VAR(WF%r)(:,:,i_wf),kind=SP)) + call dev_memcpy(WF_symm,cmplx(WF_p,kind=SP)) return ! endif @@ -58,7 +58,7 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) #endif do ifft = 1, fft_size ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) - WF_symm(ifft,1)=cmplx(WF_p(ifftp,1,i_wf),kind=SP) + WF_symm(ifft,1)=cmplx(WF_p(ifftp,1),kind=SP) enddo ! endif @@ -72,10 +72,10 @@ subroutine DEV_SUB_ALT(WF_apply_symm)(isc,WF_symm) #endif do ifft = 1, fft_size ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) - WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ifftp,1,i_wf)+ & - DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ifftp,2,i_wf) - WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ifftp,1,i_wf)+ & - DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ifftp,2,i_wf) + WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & + DEV_VAR(spin_sop)(1,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) + WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & + DEV_VAR(spin_sop)(2,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) enddo ! endif From ff7844774ebf58870a00d0d782535f1e33657bf4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 8 Nov 2023 21:06:53 +0100 Subject: [PATCH 0721/1367] Version 5.2.0, Revision 23037, Hash 4e313c8e7a MODIFIED * include/version/version.m4 bse/K_kernel.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_ALDA_eh_space_R_kernel.F Bugs: - [yambo] Fixed bug when rho_map is used in real space Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 4 ++-- src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F | 1 + src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F | 1 + src/tddft/TDDFT_ALDA_eh_space_R_kernel.F | 2 -- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 1062d9d8e8..65543f97de 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23056 h.ad8724dd06, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23057 h.4e313c8e7a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23056" -SHASH="ad8724dd06" +SREVISION="23057" +SHASH="4e313c8e7a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 7ce2df054d..b4283b583a 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -331,8 +331,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) endif ! - YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) - YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm1,(rho_map_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm2,(rho_map_size,n_spinor)) ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index d56221516d..51dbd8071d 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -53,6 +53,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ ! WF_symm1_p=cZERO WF_symm2_p=cZERO + rhotwr_p= cZERO ! ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index cdf64a37e8..d68998bc47 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -57,6 +57,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ ! WF_symm1_p=cZERO WF_symm2_p=cZERO + rhotwr_p= cZERO ! ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) diff --git a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F index 005b548718..9696c68643 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_R_kernel.F @@ -67,8 +67,6 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation l_use_rho_map=allocated(rho_map) ! - ! - ! call WF_apply_symm_cpu(is,WF_symm1_p) call WF_apply_symm_cpu(os,WF_symm2_p) ! From 357e9ad957a9989830ec59a5400fa9de20807450 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 9 Nov 2023 16:12:58 +0100 Subject: [PATCH 0722/1367] Version 5.2.0, Revision 23286, Hash 36c0fcb9a8 MODIFIED * config/mk/global/libraries.mk include/version/version.m4 lib/qe_pseudo/DOUBLE_project.dep el-ph/.objects el-ph/ELPH_project.dep modules/YPP_RT_project.dep parallel/PHEL_project.dep Bugs: - Additions: - Changes: - Patch sent by: Davide Sangalli --- config/mk/global/libraries.mk | 2 -- include/version/version.m4 | 6 +++--- lib/qe_pseudo/DOUBLE_project.dep | 1 - src/el-ph/.objects | 9 +++------ src/el-ph/ELPH_project.dep | 4 ---- src/modules/YPP_RT_project.dep | 1 + src/parallel/PHEL_project.dep | 1 - 7 files changed, 7 insertions(+), 17 deletions(-) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 33ed35969e..1fdb105589 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -89,8 +89,6 @@ YPPPH_MAIN_LIBS = $(YPP_MAIN_LIBS) el-ph exc-ph YPPPH_MAIN_LIBS_LD = $(YPP_MAIN_LIBS_LD) el-ph exc-ph YPPSC_MAIN_LIBS = $(YPP_MAIN_LIBS) collisions hamiltonian sc YPPSC_MAIN_LIBS_LD = $(YPP_MAIN_LIBS_LD) collisions hamiltonian sc -YPPPH_MAIN_LIBS = $(YPP_MAIN_LIBS) -YPPPH_MAIN_LIBS_LD = $(YPP_MAIN_LIBS_LD) YPPRT_MAIN_LIBS = $(BASIC_LIBS) real_time_control interpolate qp_control setup interface \ dipoles pol_function qp bse collisions hamiltonian YPPRT_MAIN_LIBS_LD = $(BASIC_LIBS_LD) real_time_control interpolate qp_control setup interface \ diff --git a/include/version/version.m4 b/include/version/version.m4 index de347de3d6..b733a54c5f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23116 h.3c1dccc317, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23286 h.36c0fcb9a8, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23116" -SHASH="3c1dccc317" +SREVISION="23286" +SHASH="36c0fcb9a8" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/qe_pseudo/DOUBLE_project.dep b/lib/qe_pseudo/DOUBLE_project.dep index fbc606fa4d..eb9021637a 100644 --- a/lib/qe_pseudo/DOUBLE_project.dep +++ b/lib/qe_pseudo/DOUBLE_project.dep @@ -39,5 +39,4 @@ us_module.o uspp.o ylmr2.o - objects.o diff --git a/src/el-ph/.objects b/src/el-ph/.objects index 90d0e387af..47f21ce807 100644 --- a/src/el-ph/.objects +++ b/src/el-ph/.objects @@ -1,8 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o Eval_Efermi_DbGd.o \ - ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o get_ph_E_DbGd.o \ - ELPH_databases_load.o ELPH_databases_check.o ELPH_databases_grids_map.o \ - ELPH_databases_symmetrize.o ELPH_acoustic_phonon_properties.o -#EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o Eval_Efermi_DbGd.o \ -# ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o get_ph_E_DbGd.o ELPH_databases_grids_map.o +EQ_objs = ELPH_Sigma_c.o ELPH_Hamiltonian.o ELPH_simmetrize_and_distribute_gsqF.o Eval_Efermi_DbGd.o \ + ELPH_gsqF_to_Sigma.o ELPH_Sigma_c_engine.o En_k_plus_q_interpolate.o get_ph_E_DbGd.o ELPH_databases_grids_map.o #endif +objs = ${EQ_objs} diff --git a/src/el-ph/ELPH_project.dep b/src/el-ph/ELPH_project.dep index 818f59c7e4..1c2099f24d 100644 --- a/src/el-ph/ELPH_project.dep +++ b/src/el-ph/ELPH_project.dep @@ -1,11 +1,7 @@ ELPH_Hamiltonian.o ELPH_Sigma_c.o ELPH_Sigma_c_engine.o - ELPH_acoustic_phonon_properties.o - ELPH_databases_check.o ELPH_databases_grids_map.o - ELPH_databases_load.o - ELPH_databases_symmetrize.o ELPH_gsqF_to_Sigma.o ELPH_simmetrize_and_distribute_gsqF.o En_k_plus_q_interpolate.o diff --git a/src/modules/YPP_RT_project.dep b/src/modules/YPP_RT_project.dep index 31e196909e..b5839bd7cb 100644 --- a/src/modules/YPP_RT_project.dep +++ b/src/modules/YPP_RT_project.dep @@ -1 +1,2 @@ SET_defaults.o + diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep index b51e13f8a5..5a22ceb339 100644 --- a/src/parallel/PHEL_project.dep +++ b/src/parallel/PHEL_project.dep @@ -1,3 +1,2 @@ PARALLEL_global_dimensions.o - PARALLEL_global_indexes.o From ce4fa4601f6b498cb64b9f90978d8106e1ee4ac1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 9 Nov 2023 23:28:12 +0100 Subject: [PATCH 0723/1367] Version 5.1.0, Revision 23314, Hash ea6e70b413 MODIFIED * include/version/version.m4 io/io_ELPH.F io/variables_ELPH.F output/K_OUTPUT.F Changes: - Fixed compilation and issue with I/O in variables_ELPH Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/io/io_ELPH.F | 1 - src/io/variables_ELPH.F | 11 ++++++++--- src/output/K_OUTPUT.F | 3 ++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9171f31a4c..70f6f78aac 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.1.0 r.22813 h.998e0a7803, yambo@yambo-code.org) +AC_INIT(Yambo, 5.1.0 r.23314 h.ea6e70b413, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="1" SPATCHLEVEL="0" -SREVISION="22813" -SHASH="998e0a7803" +SREVISION="23314" +SHASH="ea6e70b413" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index d5748b3b8b..6b1e0bf624 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -95,7 +95,6 @@ integer function io_ELPH(ID,what) ! call io_bulk(ID_frag,VAR="PH_FREQS"//trim(intc(iq)),VAR_SZ=(/ph_modes/)) call io_bulk(ID_frag,R1=PH_freqs_sq(iq,:)) -! write(*,*) "w(",iq,")= ",PH_freqs_sq(iq,:) ! ! Polarization vectors ! diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 79f0b759bf..423c3c32d4 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -42,7 +42,7 @@ integer function variables_ELPH(ID,what) ! NVAR=6 if (ver_is_gt_or_eq(ID,revision=18920)) NVAR=7 - if (ver_is_gt_or_eq(ID,revision=21550)) NVAR=8 + if (ver_is_gt_or_eq(ID,revision=21550)) NVAR=9 call def_variable_elemental(ID,"PARS",NVAR,SP,0) ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) @@ -51,8 +51,13 @@ integer function variables_ELPH(ID,what) if (l_gFsq) call io_variable_elemental(ID,VAR="[ELPH]",I0=elph_nQ_used,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[used]",DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] K points",I0=elph_nk_bz,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) - if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 + if (ver_is_gt_or_eq(ID,revision=21550)) then + call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) + if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 + else + call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I0=elph_nb,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + if (read_is_on(ID)) elph_bands=(/1,elph_nb/) + endif call io_variable_elemental(ID,VAR="[ELPH] Using the Q-grid",L0=elph_use_q_grid,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) if (ver_is_gt_or_eq(ID,revision=18920)) then call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index e1b11d240b..130caa9799 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -10,7 +10,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use pars, ONLY:pi,SP,cI,cZERO,schlen use drivers, ONLY:l_col_cut use frequency, ONLY:w_samp - use BS_solvers, ONLY:BSS_desc,BSS_uses_GreenF,BSS_Vnl_included,BSS_n_freqs,K_diago_in_BS_mat,A_drude,B_Hall + use BS_solvers, ONLY:BSS_desc,BSS_uses_GreenF,BSS_Vnl_included,BSS_n_freqs,K_diago_in_BS_mat,A_drude,B_Hall,& +& l_eps_res_ares,l_ab_from_eels use BS, ONLY:BSE_mode,BS_K_is_ALDA,BS_dip_size,BS_H_dim,BS_K_coupling use stderr, ONLY:STRING_match use X_m, ONLY:Epsilon_ii,eps_2_alpha,X_OUTPUT_driver,Epsilon_ij,X_obs_onoff,& From 675f40547fdba59ee45d2c54957112adcefaefbd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 12 Nov 2023 22:51:19 +0100 Subject: [PATCH 0724/1367] Version 5.2.0, Revision 23334, Hash 6819550837 MODIFIED * include/version/version.m4 bz_ops/bz_samp_indexes.F Bugs: - Fixed wrong use of Xk in place of k Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bz_ops/bz_samp_indexes.F | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 745dac4172..e145e81ad8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22857 h.c4daa14900, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23334 h.6819550837, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22857" -SHASH="c4daa14900" +SREVISION="23334" +SHASH="6819550837" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 530dedb76e..8901c97e03 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -317,7 +317,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) enddo ! else - ! + ! v1=matmul(k_b_m1,v1) iv1=nint(v1) call k_grid_shift(iv1) @@ -415,8 +415,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if (.not.PAR_IND_k%element_1D(ikbz_p)) cycle ! - if (trim(convention)=="minus_q") v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:) ! K-K_p= Q + Go - if (trim(convention)=="plus_q" ) v1=Xk%ptbz(ikbz_p,:)-Xk%ptbz(ikbz,:) ! K_p-K= Q + Go + if (trim(convention)=="minus_q") v1=k%ptbz(ikbz,:)-k%ptbz(ikbz_p,:) ! K-K_p= Q + Go + if (trim(convention)=="plus_q" ) v1=k%ptbz(ikbz_p,:)-k%ptbz(ikbz,:) ! K_p-K= Q + Go ! if(Xk_grid_new_mapping) then ! @@ -433,7 +433,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) enddo ! else - ! + ! v1=matmul(k_b_m1,v1) iv1=nint(v1) ! @@ -452,8 +452,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if (iks==1) qindx_S(ikibz,iqbz,1)=ikbz_p if (coll_scattering) qindx_C(ikbz,iqbz,1)=ikbz_p - if (trim(convention)=="minus_q") v1=Xk%ptbz(ikbz,:)-Xk%ptbz(ikbz_p,:)-q%ptbz(iqbz,:) - if (trim(convention)=="plus_q" ) v1=Xk%ptbz(ikbz_p,:)-Xk%ptbz(ikbz,:)-q%ptbz(iqbz,:) + if (trim(convention)=="minus_q") v1=k%ptbz(ikbz,:)-k%ptbz(ikbz_p,:)-q%ptbz(iqbz,:) + if (trim(convention)=="plus_q" ) v1=k%ptbz(ikbz_p,:)-k%ptbz(ikbz,:)-q%ptbz(iqbz,:) call c2a(v_in=v1,mode='ka2i') if (iks==1) qindx_S(ikibz,iqbz,2)=G_index(v1,.false.) if (coll_scattering) qindx_C(ikbz,iqbz,2)=G_index(v1,.false.) From cfb7a980350b6618f5fe8f7cdb50f3dd00da22e6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 14 Nov 2023 22:19:55 +0100 Subject: [PATCH 0725/1367] Version 5.2.0, Revision 23090, Hash d6d6512413 MODIFIED * include/version/version.m4 bse/K_kernel.F Changes: - Added extra check on timing Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 396634b3ed..2bacc59218 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22851 h.cb9e2200bb, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23090 h.d6d6512413, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22851" -SHASH="cb9e2200bb" +SREVISION="23090" +SHASH="d6d6512413" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 3c8a3bc7cc..363db437d3 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -523,6 +523,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (l_dir_alg) call K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) endif ! + call timing('X T_space Kernel sum',OPR='start') + ! ! Transition Loops !------------------ ! @@ -755,6 +757,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !$omp end do !$omp end parallel #endif + ! + call timing('X T_space Kernel sum',OPR='stop') ! if(BS_K_cutoff>0._SP.and.l_write_kernel) & & BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) From f985e909266e15b4bff1d96f6daf34e6aa1df8f9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 20 Nov 2023 12:54:13 +0100 Subject: [PATCH 0726/1367] Version 5.2.0, Revision 23351, Hash cab6344872 MODIFIED * include/version/version.m4 bse/K_driver_init.F DELETED * bse/PHEL_project.dep Bugs: - [yambo_ph] PHEL flag changed to ELPH flag Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/K_driver_init.F | 2 +- src/bse/PHEL_project.dep | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 src/bse/PHEL_project.dep diff --git a/include/version/version.m4 b/include/version/version.m4 index b5753dd427..4e8c5609f7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22437 h.0b3e586eb, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23351 h.cab6344872, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22437" -SHASH="0b3e586eb" +SREVISION="23351" +SHASH="cab6344872" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 993906506c..8505a2da83 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -168,7 +168,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) BS_res_K_exchange=.FALSE. BS_cpl_K_exchange=.FALSE. endif -#if defined _PHEL +#if defined _ELPH ! [EXCPH]: Allow code to go back to different Lkind calculations after Ltilde if (index(BSE_L_kind,"tilde")==0.and.(.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.)) then BS_res_K_exchange=.TRUE. diff --git a/src/bse/PHEL_project.dep b/src/bse/PHEL_project.dep deleted file mode 100644 index f564be77c8..0000000000 --- a/src/bse/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - K_driver_init.o - From 01e1ca4152a5e71b9b97f5102cc5032f3082f881 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 20 Nov 2023 12:54:47 +0100 Subject: [PATCH 0727/1367] Version 5.2.0, Revision 23352, Hash f985e90926 MODIFIED * include/version/version.m4 sbin/compilation/check_updated_locks.sh Bugs: - [yambo_ph] Fixed compilation issue Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- sbin/compilation/check_updated_locks.sh | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 4e8c5609f7..b3cd8658bc 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23351 h.cab6344872, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23352 h.f985e90926, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23351" -SHASH="cab6344872" +SREVISION="23352" +SHASH="f985e90926" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/sbin/compilation/check_updated_locks.sh b/sbin/compilation/check_updated_locks.sh index 95a7fc5df6..25853f8dc3 100755 --- a/sbin/compilation/check_updated_locks.sh +++ b/sbin/compilation/check_updated_locks.sh @@ -65,7 +65,6 @@ if [ "$DIR_saved" == "yes" ] ; then fi if [ "$DIR_restored" == "yes" ] ; then source ./sbin/compilation/verbosity.sh "check_updated_locks.sh: $dir has been restored" - return fi # # tag new objects to be compiled @@ -78,7 +77,9 @@ do for dep_file in $deps; do source ./sbin/compilation/verbosity.sh "check_updated_locks.sh: $dep_file must be recompiled" source ./sbin/compilation/name_me.sh $dir/$dep_file "no_search" - DIR_is_to_recompile=1 + if [ ! "$DIR_restored" == "yes" ] ; then + DIR_is_to_recompile=1 + fi if [ "$lock" == "DOUBLE" ]; then source ./sbin/compilation/object_remove.sh "remove" "locks" continue; From c587d8660c160a2aa410738daa029dc8ee62040b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 Nov 2023 22:50:58 +0100 Subject: [PATCH 0728/1367] Version 5.2.0, Revision 23091, Hash cfb7a98035 MODIFIED * include/version/version.m4 pol_function/X_redux.F Changes: - [yambo] Removed parenthesis from authors list in X_redux Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/pol_function/X_redux.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 2bacc59218..41346194a9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23090 h.d6d6512413, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23092 h.cfb7a98035, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23090" -SHASH="d6d6512413" +SREVISION="23092" +SHASH="cfb7a98035" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index ba7baa67c0..75cd5576db 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2006 The Yambo Team ! -! Authors (see AUTHORS file for details): AM (AF +! Authors (see AUTHORS file for details): AM AF ! subroutine X_redux(iq,what,X_par,Xw,X) ! From 8d39e6c988d69cc887218f86005f9990717bbaed Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Nov 2023 23:36:27 +0100 Subject: [PATCH 0729/1367] Version 5.2.0, Revision 23156, Hash 775d2132d3 MODIFIED * include/version/version.m4 output/X_OUTPUT_driver.F Bugs: - Removed buggy output file creation in BSE with diago/slepc Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/output/X_OUTPUT_driver.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 27a4cabea9..6e48f84459 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23145 h.795ce6f3da, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23156 h.775d2132d3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23145" -SHASH="795ce6f3da" +SREVISION="23156" +SHASH="775d2132d3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 9ea1f4b1d1..841aef811e 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -102,7 +102,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) endif if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP E_INDX_IP kerr magnons jdos") if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort jdos E_IP E_INDX_IP") - if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP") + if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP E_INDX_IP") endif ! ! Headers... From 991d7a4c38f757c6f64363d8dc8e711c8e3bdc18 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 30 Nov 2023 15:39:59 +0100 Subject: [PATCH 0730/1367] Changes in *.dep files --- src/modules/YPP_RT_project.dep | 3 --- src/parallel/PHEL_project.dep | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/YPP_RT_project.dep b/src/modules/YPP_RT_project.dep index d0be149b13..b5839bd7cb 100644 --- a/src/modules/YPP_RT_project.dep +++ b/src/modules/YPP_RT_project.dep @@ -1,5 +1,2 @@ SET_defaults.o - mod_ELPH.o - mod_ELPH_intfcs.o - mod_EXCPH.o diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep index 1da0a4b238..5a22ceb339 100644 --- a/src/parallel/PHEL_project.dep +++ b/src/parallel/PHEL_project.dep @@ -1,2 +1,2 @@ PARALLEL_global_dimensions.o - PARALLEL_global_indexes.o + From a7a10fee2fe32f58273b6b605c1303bb278ff372 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 1 Dec 2023 01:37:12 +0100 Subject: [PATCH 0731/1367] Version 5.2.0, Revision 23394, Hash b5fde37d96 MODIFIED * include/version/version.m4 interface/INIT_activate.F interface/INIT_load.F Bugs: - Fixed input flags for test-suite in input file generation mode Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/interface/INIT_activate.F | 4 +++- src/interface/INIT_load.F | 13 ++++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 5e32c0ab4d..b649fc92dd 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23353 h.01e1ca4152, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23394 h.b5fde37d96, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23353" -SHASH="01e1ca4152" +SREVISION="23394" +SHASH="b5fde37d96" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 1fa1bff5ca..de8d4af073 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -449,7 +449,9 @@ subroutine INIT_activate() ! Exciton-phonon Self-energy ! if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') - if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ ExcPhOffDiago NoMatrxEl') + if (l_EXCPH_gkkp) call initactivate(1,'ConstElph AbsElph AbsExc HoleContributionOnly ElectronContributionOnly') + if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ ExcPhOffDiago') + if (l_EXCPH_lifetime) call initactivate(1,'NoMatrxEl KeepDeg ') if (l_EXCPH_optics) then call initactivate(1,'EXCTemp AlphaQ PLqres DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') call initactivate(1,'EXCPHdEtresh DbGdOnlyPh DbGdWEIGHTs NoMatrxEl EnRngeXd DmRngeXd ETStpsXd') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index cfb323e36c..15345a9bb1 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -663,11 +663,22 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure 2D distortion',alphaQ) call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) + ! call it('f',defs,'DbGdOnlyPh' , '[EXCPH] Use Double-Grid only for phonon energies (do not interpolate excitons)') - call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') call it('f',defs,'ExtendOutput', '[EXCPH] Print additional output with q-resolved lifetimes and resonances') call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite weights and renormalization') call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point') + ! + ! Testing only zone < + call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') + call it('f',defs,'KeepDeg' , '[EXCPH] Keep degenerate states (for testing purpose') + ! + call it('f',defs,'AbsElph', '[EXCPH] Module of elph matrix elements') + call it('f',defs,'AbsExc', '[EXCPH] Module of excitonic WFs') + call it('f',defs,'HoleContributionOnly', '[EXCPH] Hole only') + call it('f',defs,'ElectronContributionOnly', '[EXCPH] Elec only') + ! Testing only zone > + ! call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) call it(defs,'EXCPHdEtresh','[ELPH] Energy treshold for exc-ph denominator',EXCPH_deltaE_treshold,unit=E_unit) call it('f',defs,'ExcPhOffDiago', '[EXCPH] Exciton-Phonon off-diagonal self-energy') From aa07817b3c6ba257d530c240ab3999fbfc3c0ec0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 1 Dec 2023 09:25:51 +0100 Subject: [PATCH 0732/1367] Version 5.2.0, Revision 23395, Hash a7a10fee2f MODIFIED * include/version/version.m4 interface/INIT_load.F Bugs: - [yambo_ph] Fixed input file generation for constant elph ( ConstElph flag) Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/interface/INIT_load.F | 15 ++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index b649fc92dd..b98d94b051 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23394 h.b5fde37d96, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23395 h.a7a10fee2f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23394" -SHASH="b5fde37d96" +SREVISION="23395" +SHASH="a7a10fee2f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 15345a9bb1..67c8092eb7 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -670,13 +670,14 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point') ! ! Testing only zone < - call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') - call it('f',defs,'KeepDeg' , '[EXCPH] Keep degenerate states (for testing purpose') - ! - call it('f',defs,'AbsElph', '[EXCPH] Module of elph matrix elements') - call it('f',defs,'AbsExc', '[EXCPH] Module of excitonic WFs') - call it('f',defs,'HoleContributionOnly', '[EXCPH] Hole only') - call it('f',defs,'ElectronContributionOnly', '[EXCPH] Elec only') + call it('f',defs,'ConstElph' , '[EXCPH] Set all electron-phonon matrix elements to one (for testing purpose)') + call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all exciton-phonon matrix elements to one (for testing purpose)') + call it('f',defs,'KeepDeg' , '[EXCPH] Keep degenerate states (for testing purpose)') + ! + call it('f',defs,'AbsElph', '[EXCPH] Module of elph matrix elements (for testing purpose)') + call it('f',defs,'AbsExc', '[EXCPH] Module of excitonic WFs (for testing purpose)') + call it('f',defs,'HoleContributionOnly', '[EXCPH] Hole channel only (for testing purpose)') + call it('f',defs,'ElectronContributionOnly', '[EXCPH] Elec channel only (for testing purpose)') ! Testing only zone > ! call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) From c0c20166e9a9034285298b522e6b7a14b3748f37 Mon Sep 17 00:00:00 2001 From: Blanca Mellado Date: Thu, 6 Jul 2023 16:21:43 +0200 Subject: [PATCH 0733/1367] Magma implementation for diagonalization (overwrites serial implementation) --- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 2 +- .../SERIAL_HERMITIAN_diagonalization.F | 32 +++++++++++++++---- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index fc004e95e5..1178744cc4 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -80,7 +80,7 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& ! lib_in_use=USE_LK #if defined _SCALAPACK - lib_in_use=USE_SLK + !lib_in_use=USE_SLK #endif if (present(lib_in)) then lib_in_use=lib_in diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index 7f2ed10f66..f3d9b0edf6 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -7,6 +7,7 @@ ! subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! + use magma use pars, ONLY:SP use drivers, ONLY:l_nl_optics,l_real_time use linear_algebra, ONLY:LINEAR_ALGEBRA_error,& @@ -19,39 +20,57 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) real(SP) :: E(n) ! character(64) :: subname="SERIAL_HERMITIAN_diagonalization" - integer :: lwork + integer :: lwork, lrwork, liwork type(LALGEBRA_WS) :: WS ! + ! MAGMA + call magmaf_init() + ! lwork=-1 + lrwork=-1 + liwork=-1 allocate(WS%v_cmplx(1)) + allocate(WS%v_real(1)) + allocate(WS%v_int(1)) ! if(.not.(l_nl_optics.or.l_real_time)) then call timing('SERIAL_HERMITIAN_diagonalization',OPR='start') - YAMBO_ALLOC(WS%v_real,(max(1,3*n-2))) - else - allocate(WS%v_real(max(1,3*n-2))) endif ! + ! Query lwork, lrwork, liwork + ! #if defined _DOUBLE call ZHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) #else - call CHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call magmaf_cheevd('v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) #endif + ! + ! Allocate v_cmplx, v_real, v_int ! lwork=nint(real(WS%v_cmplx(1))) + lrwork=nint(WS%v_real(1)) + liwork=WS%v_int(1) deallocate(WS%v_cmplx) + deallocate(WS%v_real) + deallocate(WS%v_int) ! if(.not.(l_nl_optics.or.l_real_time)) then YAMBO_ALLOC(WS%v_cmplx,(lwork)) + YAMBO_ALLOC(WS%v_real,(lrwork)) + YAMBO_ALLOC(WS%v_int,(liwork)) else allocate(WS%v_cmplx(lwork)) + allocate(WS%v_real(lrwork)) + allocate(WS%v_int(liwork)) endif ! + ! Compute eigenvalues + ! #if defined _DOUBLE call ZHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(subname,'performing ZHEEV') #else - call CHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call magmaf_cheevd('v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(subname,'performing CHEEV') #endif ! @@ -61,4 +80,5 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) call timing('SERIAL_HERMITIAN_diagonalization',OPR='stop') endif ! + call magmaf_finalize() end subroutine From fa88a5d76314ebdb38bc91641b1244e83f4d9bce Mon Sep 17 00:00:00 2001 From: Blanca Mellado Date: Mon, 4 Dec 2023 15:10:42 +0100 Subject: [PATCH 0734/1367] Changed magma functions to multiple gpu version (with 2 gpus hardcoded) --- src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index f3d9b0edf6..cf90985b35 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -42,7 +42,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) #if defined _DOUBLE call ZHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) #else - call magmaf_cheevd('v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) + call magmaf_cheevd_m(2,'v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) #endif ! ! Allocate v_cmplx, v_real, v_int @@ -70,7 +70,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) call ZHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(subname,'performing ZHEEV') #else - call magmaf_cheevd('v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) + call magmaf_cheevd_m(2,'v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(subname,'performing CHEEV') #endif ! From feea1e80dbbe394f1996581687158669537ac719 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Mon, 11 Dec 2023 09:57:02 +0100 Subject: [PATCH 0735/1367] update *.dep --- src/bse/ELPH_project.dep | 1 + src/bse/NL_project.dep | 1 - src/pol_function/DOUBLE_project.dep | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bse/ELPH_project.dep b/src/bse/ELPH_project.dep index 42c26df40b..bcc9dc9973 100644 --- a/src/bse/ELPH_project.dep +++ b/src/bse/ELPH_project.dep @@ -1,2 +1,3 @@ + K_driver_init.o K_inversion_Lo.o diff --git a/src/bse/NL_project.dep b/src/bse/NL_project.dep index 65ce9348b0..7bef4cdefd 100644 --- a/src/bse/NL_project.dep +++ b/src/bse/NL_project.dep @@ -1,5 +1,4 @@ K_diago_driver.o K_driver_init.o K_observables.o - K_solvers.o diff --git a/src/pol_function/DOUBLE_project.dep b/src/pol_function/DOUBLE_project.dep index d6d8d8fc4c..b43a6457b4 100644 --- a/src/pol_function/DOUBLE_project.dep +++ b/src/pol_function/DOUBLE_project.dep @@ -6,6 +6,7 @@ X_GreenF_analytical.o X_GreenF_convoluted.o X_GreenF_remap.o + X_OUTPUT.o X_delta_part.o X_dielectric_matrix.o X_drude.o From df6e74890e71dfc23a06c7adc1c05bdf4e47cca3 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Mon, 11 Dec 2023 09:57:44 +0100 Subject: [PATCH 0736/1367] other .dep files --- src/driver/PHEL_project.dep | 3 +++ src/interface/PHEL_project.dep | 6 ++++++ src/io/PHEL_project.dep | 2 ++ src/pol_function/PHEL_project.dep | 2 ++ src/qp/PHEL_project.dep | 2 ++ src/real_time_control/PHEL_project.dep | 2 ++ src/real_time_drivers/PHEL_project.dep | 2 ++ src/real_time_initialize/PHEL_project.dep | 3 +++ 8 files changed, 22 insertions(+) create mode 100644 src/driver/PHEL_project.dep create mode 100644 src/interface/PHEL_project.dep create mode 100644 src/io/PHEL_project.dep create mode 100644 src/pol_function/PHEL_project.dep create mode 100644 src/qp/PHEL_project.dep create mode 100644 src/real_time_control/PHEL_project.dep create mode 100644 src/real_time_drivers/PHEL_project.dep create mode 100644 src/real_time_initialize/PHEL_project.dep diff --git a/src/driver/PHEL_project.dep b/src/driver/PHEL_project.dep new file mode 100644 index 0000000000..e91fccffa5 --- /dev/null +++ b/src/driver/PHEL_project.dep @@ -0,0 +1,3 @@ + options_projects.o + options_yambo.o + diff --git a/src/interface/PHEL_project.dep b/src/interface/PHEL_project.dep new file mode 100644 index 0000000000..02120d3c55 --- /dev/null +++ b/src/interface/PHEL_project.dep @@ -0,0 +1,6 @@ + INIT.o + INIT_activate.o + INIT_barriers.o + INIT_load.o + INIT_read_command_line.o + diff --git a/src/io/PHEL_project.dep b/src/io/PHEL_project.dep new file mode 100644 index 0000000000..df62ae28df --- /dev/null +++ b/src/io/PHEL_project.dep @@ -0,0 +1,2 @@ + io_PH.o + diff --git a/src/pol_function/PHEL_project.dep b/src/pol_function/PHEL_project.dep new file mode 100644 index 0000000000..a644e71a2b --- /dev/null +++ b/src/pol_function/PHEL_project.dep @@ -0,0 +1,2 @@ + X_Double_Grid_setup.o + diff --git a/src/qp/PHEL_project.dep b/src/qp/PHEL_project.dep new file mode 100644 index 0000000000..2a34e69ef3 --- /dev/null +++ b/src/qp/PHEL_project.dep @@ -0,0 +1,2 @@ + QP_logicals.o + diff --git a/src/real_time_control/PHEL_project.dep b/src/real_time_control/PHEL_project.dep new file mode 100644 index 0000000000..94a3292b75 --- /dev/null +++ b/src/real_time_control/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_alloc.o + diff --git a/src/real_time_drivers/PHEL_project.dep b/src/real_time_drivers/PHEL_project.dep new file mode 100644 index 0000000000..d7e6a8488e --- /dev/null +++ b/src/real_time_drivers/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_driver.o + diff --git a/src/real_time_initialize/PHEL_project.dep b/src/real_time_initialize/PHEL_project.dep new file mode 100644 index 0000000000..5bb91066cc --- /dev/null +++ b/src/real_time_initialize/PHEL_project.dep @@ -0,0 +1,3 @@ + RT_initialize.o + RT_occupations_and_levels_init.o + From 23dbe638527efdf67d69e412319cd4278bbe298d Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 12 Dec 2023 09:44:35 +0100 Subject: [PATCH 0737/1367] Removed duplicate BSE_L_kind writing in variables_BS --- src/io_parallel/variables_BS.F | 11 +---------- src/io_serial/variables_BS.F | 5 ----- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/io_parallel/variables_BS.F b/src/io_parallel/variables_BS.F index 4d0efc9a06..c1fdd08e75 100644 --- a/src/io_parallel/variables_BS.F +++ b/src/io_parallel/variables_BS.F @@ -15,7 +15,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,BSE_L_kind,& & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& -& BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& +& BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,BSqpts,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:def_variable_elemental,io_variable_elemental,ver_is_gt_or_eq @@ -101,15 +101,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call def_variable_elemental(ID,"CPL_RANGE",2,SP,0) call io_variable_elemental(ID,& & VAR="[K] Coupling range",TERMINATOR="[o/o]",R1=BS_eh_win,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) - ! - if(ver_is_gt_or_eq(ID,revision=21261)) then - if(ver_is_gt_or_eq(ID,revision=21550)) then - call def_variable_elemental(ID,"BSE_L_kind",1,0,0) - else - call def_variable_elemental(ID,"L_kind",1,0,0) - endif - call io_variable_elemental(ID,VAR='[K] BSE L kind',CH0=BSE_L_kind,CHECK=.true.,DESCRIPTOR=desc) - endif ! ! Interaction ! diff --git a/src/io_serial/variables_BS.F b/src/io_serial/variables_BS.F index d03dcc141a..d3b5c2d256 100644 --- a/src/io_serial/variables_BS.F +++ b/src/io_serial/variables_BS.F @@ -88,11 +88,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & VAR="[K] E/h energy range",TERMINATOR="[eV]",R1=BS_eh_en,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) call io_variable_elemental(ID,& & VAR="[K] Coupling range",TERMINATOR="[o/o]",R1=BS_eh_win,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) - ! - if(ver_is_gt_or_eq(ID,revision=21261)) then - call def_variable_elemental(ID,"L_kind",1,0,0) - call io_variable_elemental(ID,VAR='[K] L kind',CH0=BSE_L_kind,CHECK=.true.,DESCRIPTOR=desc) - endif ! ! Interaction ! From 5eb484ae3f05c5676b6eec79c8a2771a92f7f5a9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Dec 2023 15:36:36 +0100 Subject: [PATCH 0738/1367] Version 5.2.0, Revision 23398, Hash c7cac50987 MODIFIED * include/version/version.m4 bse/ELPH_project.dep bse/NL_project.dep io_parallel/variables_BS.F io_serial/variables_BS.F pol_function/DOUBLE_project.dep NEW * driver/PHEL_project.dep interface/PHEL_project.dep io/PHEL_project.dep parallel/PHEL_project.dep pol_function/PHEL_project.dep qp/PHEL_project.dep real_time_control/PHEL_project.dep real_time_drivers/PHEL_project.dep real_time_initialize/PHEL_project.dep Bugs: - Fixed duplicated output of BSE_L_kind - Fixed .dep files Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bse/ELPH_project.dep | 1 + src/bse/NL_project.dep | 1 - src/driver/PHEL_project.dep | 3 +++ src/interface/PHEL_project.dep | 6 ++++++ src/io/PHEL_project.dep | 2 ++ src/io_parallel/variables_BS.F | 11 +---------- src/io_serial/variables_BS.F | 5 ----- src/parallel/PHEL_project.dep | 2 ++ src/pol_function/DOUBLE_project.dep | 1 + src/pol_function/PHEL_project.dep | 2 ++ src/qp/PHEL_project.dep | 2 ++ src/real_time_control/PHEL_project.dep | 2 ++ src/real_time_drivers/PHEL_project.dep | 2 ++ src/real_time_initialize/PHEL_project.dep | 3 +++ 15 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 src/driver/PHEL_project.dep create mode 100644 src/interface/PHEL_project.dep create mode 100644 src/io/PHEL_project.dep create mode 100644 src/parallel/PHEL_project.dep create mode 100644 src/pol_function/PHEL_project.dep create mode 100644 src/qp/PHEL_project.dep create mode 100644 src/real_time_control/PHEL_project.dep create mode 100644 src/real_time_drivers/PHEL_project.dep create mode 100644 src/real_time_initialize/PHEL_project.dep diff --git a/include/version/version.m4 b/include/version/version.m4 index 9305fff0b7..fb1f6a2ddb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23396 h.aa07817b3c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23398 h.c7cac50987, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23396" -SHASH="aa07817b3c" +SREVISION="23398" +SHASH="c7cac50987" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/ELPH_project.dep b/src/bse/ELPH_project.dep index 42c26df40b..bcc9dc9973 100644 --- a/src/bse/ELPH_project.dep +++ b/src/bse/ELPH_project.dep @@ -1,2 +1,3 @@ + K_driver_init.o K_inversion_Lo.o diff --git a/src/bse/NL_project.dep b/src/bse/NL_project.dep index 65ce9348b0..7bef4cdefd 100644 --- a/src/bse/NL_project.dep +++ b/src/bse/NL_project.dep @@ -1,5 +1,4 @@ K_diago_driver.o K_driver_init.o K_observables.o - K_solvers.o diff --git a/src/driver/PHEL_project.dep b/src/driver/PHEL_project.dep new file mode 100644 index 0000000000..e91fccffa5 --- /dev/null +++ b/src/driver/PHEL_project.dep @@ -0,0 +1,3 @@ + options_projects.o + options_yambo.o + diff --git a/src/interface/PHEL_project.dep b/src/interface/PHEL_project.dep new file mode 100644 index 0000000000..02120d3c55 --- /dev/null +++ b/src/interface/PHEL_project.dep @@ -0,0 +1,6 @@ + INIT.o + INIT_activate.o + INIT_barriers.o + INIT_load.o + INIT_read_command_line.o + diff --git a/src/io/PHEL_project.dep b/src/io/PHEL_project.dep new file mode 100644 index 0000000000..df62ae28df --- /dev/null +++ b/src/io/PHEL_project.dep @@ -0,0 +1,2 @@ + io_PH.o + diff --git a/src/io_parallel/variables_BS.F b/src/io_parallel/variables_BS.F index 4d0efc9a06..c1fdd08e75 100644 --- a/src/io_parallel/variables_BS.F +++ b/src/io_parallel/variables_BS.F @@ -15,7 +15,7 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) use BS, ONLY:BS_identifier,BS_K_dim,BS_bands,BSE_L_kind,& & BS_K_coupling,BS_res_K_exchange,BS_res_K_corr,& & BS_n_g_exch,BS_n_g_W,BS_eh_en,BS_eh_win,BS_W_is_diagonal,& -& BS_K_is_ALDA,BS_cpl_K_exchange,BSE_L_kind,& +& BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,BSqpts,BS_perturbative_SOC use IO_m, ONLY:io_status,variable_exist,write_is_on use IO_int, ONLY:def_variable_elemental,io_variable_elemental,ver_is_gt_or_eq @@ -101,15 +101,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call def_variable_elemental(ID,"CPL_RANGE",2,SP,0) call io_variable_elemental(ID,& & VAR="[K] Coupling range",TERMINATOR="[o/o]",R1=BS_eh_win,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) - ! - if(ver_is_gt_or_eq(ID,revision=21261)) then - if(ver_is_gt_or_eq(ID,revision=21550)) then - call def_variable_elemental(ID,"BSE_L_kind",1,0,0) - else - call def_variable_elemental(ID,"L_kind",1,0,0) - endif - call io_variable_elemental(ID,VAR='[K] BSE L kind',CH0=BSE_L_kind,CHECK=.true.,DESCRIPTOR=desc) - endif ! ! Interaction ! diff --git a/src/io_serial/variables_BS.F b/src/io_serial/variables_BS.F index d03dcc141a..d3b5c2d256 100644 --- a/src/io_serial/variables_BS.F +++ b/src/io_serial/variables_BS.F @@ -88,11 +88,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) & VAR="[K] E/h energy range",TERMINATOR="[eV]",R1=BS_eh_en,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) call io_variable_elemental(ID,& & VAR="[K] Coupling range",TERMINATOR="[o/o]",R1=BS_eh_win,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=desc) - ! - if(ver_is_gt_or_eq(ID,revision=21261)) then - call def_variable_elemental(ID,"L_kind",1,0,0) - call io_variable_elemental(ID,VAR='[K] L kind',CH0=BSE_L_kind,CHECK=.true.,DESCRIPTOR=desc) - endif ! ! Interaction ! diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep new file mode 100644 index 0000000000..5a22ceb339 --- /dev/null +++ b/src/parallel/PHEL_project.dep @@ -0,0 +1,2 @@ + PARALLEL_global_dimensions.o + diff --git a/src/pol_function/DOUBLE_project.dep b/src/pol_function/DOUBLE_project.dep index d6d8d8fc4c..b43a6457b4 100644 --- a/src/pol_function/DOUBLE_project.dep +++ b/src/pol_function/DOUBLE_project.dep @@ -6,6 +6,7 @@ X_GreenF_analytical.o X_GreenF_convoluted.o X_GreenF_remap.o + X_OUTPUT.o X_delta_part.o X_dielectric_matrix.o X_drude.o diff --git a/src/pol_function/PHEL_project.dep b/src/pol_function/PHEL_project.dep new file mode 100644 index 0000000000..a644e71a2b --- /dev/null +++ b/src/pol_function/PHEL_project.dep @@ -0,0 +1,2 @@ + X_Double_Grid_setup.o + diff --git a/src/qp/PHEL_project.dep b/src/qp/PHEL_project.dep new file mode 100644 index 0000000000..2a34e69ef3 --- /dev/null +++ b/src/qp/PHEL_project.dep @@ -0,0 +1,2 @@ + QP_logicals.o + diff --git a/src/real_time_control/PHEL_project.dep b/src/real_time_control/PHEL_project.dep new file mode 100644 index 0000000000..94a3292b75 --- /dev/null +++ b/src/real_time_control/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_alloc.o + diff --git a/src/real_time_drivers/PHEL_project.dep b/src/real_time_drivers/PHEL_project.dep new file mode 100644 index 0000000000..d7e6a8488e --- /dev/null +++ b/src/real_time_drivers/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_driver.o + diff --git a/src/real_time_initialize/PHEL_project.dep b/src/real_time_initialize/PHEL_project.dep new file mode 100644 index 0000000000..5bb91066cc --- /dev/null +++ b/src/real_time_initialize/PHEL_project.dep @@ -0,0 +1,3 @@ + RT_initialize.o + RT_occupations_and_levels_init.o + From b98e2474e67340cc4bcbe7eb697669b4ca9147f9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Dec 2023 13:57:35 +0100 Subject: [PATCH 0739/1367] Version 5.2.0, Revision 22923, Hash be32037d29 MODIFIED * driver/yambo.F include/version/version.m4 bse/K_driver.F bz_ops/bz_samp_indexes.F interface/INIT_check_databases.F io/io_QINDX.F ypp/el-ph/ELPH_databases.F Changes: - printing of kpts in the IBA and BZ added to ndb.kindx Patch sent by: Davide Sangalli --- driver/yambo.F | 2 +- include/version/version.m4 | 6 +++--- src/bse/K_driver.F | 6 +++--- src/bz_ops/bz_samp_indexes.F | 6 +++--- src/interface/INIT_check_databases.F | 2 +- src/io/io_QINDX.F | 14 +++++++++++--- ypp/el-ph/ELPH_databases.F | 4 ++-- 7 files changed, 24 insertions(+), 16 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 35dcab83ca..dd5c0ccb07 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -213,7 +213,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! driver_now=(l_optics.and.l_bse).or.l_bss ! - if (driver_now) call K_driver(Xen,Ken,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip) + if (driver_now) call K_driver(Xen,Ken,k,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip) if (driver_now) call mem_manager_report ! ! ACFDT diff --git a/include/version/version.m4 b/include/version/version.m4 index bce082b5be..6495d1b54b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22919 h.99672e8d83, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22924 h.be32037d29, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22919" -SHASH="99672e8d83" +SREVISION="22924" +SHASH="be32037d29" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 79f651a37b..87d3cddabe 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM IMA ! -subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) +subroutine K_driver(Xen,Ken,kk,Xk,q,X_static_pp,Xw,Dip) ! use pars, ONLY:IP use com, ONLY:msg @@ -29,7 +29,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) #include ! type(levels) ::Xen,Ken - type(bz_samp) ::Xk,q + type(bz_samp) ::kk,Xk,q type(X_t) ::X_static_pp type(DIPOLE_t)::Dip type(w_samp) ::Xw @@ -102,7 +102,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err=io_QINDX(Xk,q,ID) + io_err=io_QINDX(kk,Xk,q,ID) ! YAMBO_ALLOC(qindx_B_max_CPU,(PAR_K_scheme%COM_ibz_INDEX%n_CPU)) qindx_B_max_CPU=0 diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 30c24261f4..1487573b7a 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -118,7 +118,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2,3,4,6/),MODE=VERIFY,ID=io_db) ! - io_err=io_QINDX(Xk,q,io_db) + io_err=io_QINDX(k,Xk,q,io_db) if (io_err==0) then call k_expand(q) d3q_factor=RL_vol/real(q%nbz) @@ -495,7 +495,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if(master_cpu) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2,3,4,6/),ID=io_db) - io_err=io_QINDX(Xk,q,io_db) + io_err=io_QINDX(k,Xk,q,io_db) endif ! ! Before writing section 5 (qindx_B) I need to wait that the master is done @@ -511,7 +511,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) if (do_qindx_B) then call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/5/),ID=io_db,& & COMM=PAR_K_scheme%COM_ibz_index,DO_it=PAR_K_scheme%COM_ibz_A2A%CPU_id==0) - io_err=io_QINDX(Xk,q,io_db) + io_err=io_QINDX(k,Xk,q,io_db) endif ! !CLEAN diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 3dda729c61..1574344edd 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -120,7 +120,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! kindx ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) - io_QINDX_err=io_QINDX(k,q,io_ID) + io_QINDX_err=io_QINDX(k,k,q,io_ID) if (io_QINDX_err==0) call initactivate(-1,'IkSigLim IkXLim') ! ! If the GROT/KINDX DBs are not present, reset to setup run diff --git a/src/io/io_QINDX.F b/src/io/io_QINDX.F index 47068435e5..b0fa860353 100644 --- a/src/io/io_QINDX.F +++ b/src/io/io_QINDX.F @@ -14,7 +14,7 @@ ! io_sec=5 qindx_B ! io_Sec=6 qindx_C ! -integer function io_QINDX(Xk,q,io_db) +integer function io_QINDX(k,Xk,q,io_db) ! use pars, ONLY:SP,IP,LP,IP_YIO,LP_YIO,CR_YIO use R_lattice, ONLY:nqibz,nqbz,qindx_X,qindx_B,qindx_S,qindx_C,& @@ -23,7 +23,7 @@ integer function io_QINDX(Xk,q,io_db) & sigma_scattering,X_scattering,k_GRIDS_string,k_GRIDS_vector, & & qindx_S_max_Go use IO_m, ONLY:io_sec,frag_QINDX,io_status,read_is_on,IO_OUTDATED_DB, & -& write_is_on,io_extension +& write_is_on,io_extension,variable_exist use IO_int, ONLY:io_connect,io_disconnect,& & io_variable_elemental,def_variable_elemental,io_header,& & ver_is_gt_or_eq,io_fragment,def_variable_bulk,io_variable_bulk @@ -32,7 +32,7 @@ integer function io_QINDX(Xk,q,io_db) ! #include ! - type(bz_samp)::q,Xk + type(bz_samp)::k,q,Xk integer ::io_db,i3,i2,i2_dn,i2_up,i2_mem,i2_step,IO_size ! ! Work Space @@ -51,6 +51,14 @@ integer function io_QINDX(Xk,q,io_db) if (.not.ver_is_gt_or_eq(io_db,revision=22000)) io_QINDX=IO_OUTDATED_DB if (io_QINDX/=0) goto 1 ! + if (write_is_on(io_db).or.variable_exist(io_db,"k_nibz")) then + call def_variable_elemental(io_db,"k_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=k%nibz) + ! + call def_variable_elemental(io_db,"k_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=k%nbz) + endif + ! call def_variable_elemental(io_db,"nXkbz",1,IP_YIO,0) call io_variable_elemental(io_db,VAR="Polarization last K ( bz)",I0=nXkbz) ! diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index c76ebf1438..3a1d3cf050 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -64,7 +64,7 @@ subroutine ELPH_databases(k,E,q) ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) + io_err(1)=io_QINDX(k,k,q,ID) if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") call error("Please run a setup with the BSEscatt flag activated") @@ -78,7 +78,7 @@ subroutine ELPH_databases(k,E,q) else ! otherwise qindx_S is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) - io_err(1)=io_QINDX(k,q,ID) + io_err(1)=io_QINDX(k,k,q,ID) if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") call error("Please (re)run the setup") From 3f1d764922808c052e0aa9192cce37b92649cc48 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Dec 2023 15:56:25 +0100 Subject: [PATCH 0740/1367] Version 5.2.0, Revision 22924, Hash b98e2474e6 MODIFIED * config/mk/global/libraries.mk driver/yambo.F include/version/version.m4 bse/K_driver.F bse/NL_project.dep bz_ops/bz_samp_indexes.F interface/INIT_check_databases.F io/.objects io/DOUBLE_project.dep io/io_QINDX.F pol_function/DOUBLE_project.dep ypp/el-ph/ELPH_databases.F NEW * driver/PHEL_project.dep interface/PHEL_project.dep io/PHEL_project.dep io/io_kpts.F parallel/PHEL_project.dep pol_function/PHEL_project.dep qp/PHEL_project.dep real_time_control/PHEL_project.dep real_time_drivers/PHEL_project.dep real_time_initialize/PHEL_project.dep Changes: - Restored previous version of ndb.kindx Info about kpts are now inside a new ndb.kpts Patch sent by: Davide Sangalli --- config/mk/global/libraries.mk | 2 +- driver/yambo.F | 2 +- include/version/version.m4 | 6 +- src/bse/K_driver.F | 6 +- src/bse/NL_project.dep | 1 - src/bz_ops/bz_samp_indexes.F | 17 ++++-- src/driver/PHEL_project.dep | 3 + src/interface/INIT_check_databases.F | 2 +- src/interface/PHEL_project.dep | 6 ++ src/io/.objects | 2 +- src/io/DOUBLE_project.dep | 1 + src/io/PHEL_project.dep | 2 + src/io/io_QINDX.F | 14 +---- src/io/io_kpts.F | 72 +++++++++++++++++++++++ src/parallel/PHEL_project.dep | 2 + src/pol_function/DOUBLE_project.dep | 1 + src/pol_function/PHEL_project.dep | 2 + src/qp/PHEL_project.dep | 2 + src/real_time_control/PHEL_project.dep | 2 + src/real_time_drivers/PHEL_project.dep | 2 + src/real_time_initialize/PHEL_project.dep | 3 + ypp/el-ph/ELPH_databases.F | 4 +- 22 files changed, 126 insertions(+), 28 deletions(-) create mode 100644 src/driver/PHEL_project.dep create mode 100644 src/interface/PHEL_project.dep create mode 100644 src/io/PHEL_project.dep create mode 100644 src/io/io_kpts.F create mode 100644 src/parallel/PHEL_project.dep create mode 100644 src/pol_function/PHEL_project.dep create mode 100644 src/qp/PHEL_project.dep create mode 100644 src/real_time_control/PHEL_project.dep create mode 100644 src/real_time_drivers/PHEL_project.dep create mode 100644 src/real_time_initialize/PHEL_project.dep diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index cda2df7e3e..4ca1133fbb 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -27,7 +27,7 @@ YLIBIO_LD = $(YLIBIO) # BASIC_LIBS = driver tools modules memory allocations matrices linear_algebra parallel parser communicate output common timing Yio io $(IO_MODE) \ xc_functionals interface stop_and_restart wf_and_fft bz_ops coulomb -BASIC_LIBS_LD= tools memory allocations communicate modules matrices linear_algebra bz_ops parallel parser output common timing Yio io $(IO_MODE) \ +BASIC_LIBS_LD= tools memory allocations communicate modules matrices linear_algebra Yio io $(IO_MODE) bz_ops parallel parser output common timing \ xc_functionals interface stop_and_restart wf_and_fft coulomb MAIN_LIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse diff --git a/driver/yambo.F b/driver/yambo.F index dd5c0ccb07..35dcab83ca 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -213,7 +213,7 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! driver_now=(l_optics.and.l_bse).or.l_bss ! - if (driver_now) call K_driver(Xen,Ken,k,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip) + if (driver_now) call K_driver(Xen,Ken,Xk,q,X(i_X_kind),Xw(i_X_kind),Dip) if (driver_now) call mem_manager_report ! ! ACFDT diff --git a/include/version/version.m4 b/include/version/version.m4 index 6495d1b54b..092142d15d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22924 h.be32037d29, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22925 h.b98e2474e6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22924" -SHASH="be32037d29" +SREVISION="22925" +SHASH="b98e2474e6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 87d3cddabe..79f651a37b 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM IMA ! -subroutine K_driver(Xen,Ken,kk,Xk,q,X_static_pp,Xw,Dip) +subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! use pars, ONLY:IP use com, ONLY:msg @@ -29,7 +29,7 @@ subroutine K_driver(Xen,Ken,kk,Xk,q,X_static_pp,Xw,Dip) #include ! type(levels) ::Xen,Ken - type(bz_samp) ::kk,Xk,q + type(bz_samp) ::Xk,q type(X_t) ::X_static_pp type(DIPOLE_t)::Dip type(w_samp) ::Xw @@ -102,7 +102,7 @@ subroutine K_driver(Xen,Ken,kk,Xk,q,X_static_pp,Xw,Dip) ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err=io_QINDX(kk,Xk,q,ID) + io_err=io_QINDX(Xk,q,ID) ! YAMBO_ALLOC(qindx_B_max_CPU,(PAR_K_scheme%COM_ibz_INDEX%n_CPU)) qindx_B_max_CPU=0 diff --git a/src/bse/NL_project.dep b/src/bse/NL_project.dep index 65ce9348b0..7bef4cdefd 100644 --- a/src/bse/NL_project.dep +++ b/src/bse/NL_project.dep @@ -1,5 +1,4 @@ K_diago_driver.o K_driver_init.o K_observables.o - K_solvers.o diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 1487573b7a..44ae29adb4 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -72,7 +72,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) character(lchlen) :: string(2) integer, allocatable :: q_map(:,:,:),q_iptbz(:,:) type(PP_indexes) :: PAR_IND_Xk,PAR_IND_k - integer, external :: io_QINDX + integer, external :: io_QINDX + integer, external :: io_kpts ! call section('*','Transferred momenta grid and indexing') !======================================================== @@ -116,9 +117,17 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! q%description='q' ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) + io_err=io_kpts(k,Xk,q,io_db) + ! + if (io_err==0) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) + io_err=io_kpts(k,Xk,q,io_db) + endif + ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2,3,4,6/),MODE=VERIFY,ID=io_db) ! - io_err=io_QINDX(k,Xk,q,io_db) + io_err=io_QINDX(Xk,q,io_db) if (io_err==0) then call k_expand(q) d3q_factor=RL_vol/real(q%nbz) @@ -495,7 +504,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if(master_cpu) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2,3,4,6/),ID=io_db) - io_err=io_QINDX(k,Xk,q,io_db) + io_err=io_QINDX(Xk,q,io_db) endif ! ! Before writing section 5 (qindx_B) I need to wait that the master is done @@ -511,7 +520,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) if (do_qindx_B) then call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/5/),ID=io_db,& & COMM=PAR_K_scheme%COM_ibz_index,DO_it=PAR_K_scheme%COM_ibz_A2A%CPU_id==0) - io_err=io_QINDX(k,Xk,q,io_db) + io_err=io_QINDX(Xk,q,io_db) endif ! !CLEAN diff --git a/src/driver/PHEL_project.dep b/src/driver/PHEL_project.dep new file mode 100644 index 0000000000..e91fccffa5 --- /dev/null +++ b/src/driver/PHEL_project.dep @@ -0,0 +1,3 @@ + options_projects.o + options_yambo.o + diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 1574344edd..3dda729c61 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -120,7 +120,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! kindx ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) - io_QINDX_err=io_QINDX(k,k,q,io_ID) + io_QINDX_err=io_QINDX(k,q,io_ID) if (io_QINDX_err==0) call initactivate(-1,'IkSigLim IkXLim') ! ! If the GROT/KINDX DBs are not present, reset to setup run diff --git a/src/interface/PHEL_project.dep b/src/interface/PHEL_project.dep new file mode 100644 index 0000000000..02120d3c55 --- /dev/null +++ b/src/interface/PHEL_project.dep @@ -0,0 +1,6 @@ + INIT.o + INIT_activate.o + INIT_barriers.o + INIT_load.o + INIT_read_command_line.o + diff --git a/src/io/.objects b/src/io/.objects index 6962cdbb0c..5004d212bf 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -18,7 +18,7 @@ PHEL_objects = io_PH.o objs = ver_is_gt_or_eq.o \ io_Vnl.o io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ - io_QINDX.o io_QP_and_GF.o io_X.o io_MPA.o \ + io_QINDX.o io_kpts.o io_QP_and_GF.o io_X.o io_MPA.o \ io_DB1.o io_WF.o io_KB_abinit.o io_KB_pwscf.o io_HF_and_locXC.o \ io_BS_Fxc.o io_NLCC_pwscf.o \ io_ATMPROJ_pwscf.o io_descriptors.o \ diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index 50ca185728..69afd13680 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -36,6 +36,7 @@ io_descriptors.o io_gFsq.o io_header.o + io_kpts.o io_out_of_date.o load_SC_components.o variables_DIPOLES.o diff --git a/src/io/PHEL_project.dep b/src/io/PHEL_project.dep new file mode 100644 index 0000000000..df62ae28df --- /dev/null +++ b/src/io/PHEL_project.dep @@ -0,0 +1,2 @@ + io_PH.o + diff --git a/src/io/io_QINDX.F b/src/io/io_QINDX.F index b0fa860353..47068435e5 100644 --- a/src/io/io_QINDX.F +++ b/src/io/io_QINDX.F @@ -14,7 +14,7 @@ ! io_sec=5 qindx_B ! io_Sec=6 qindx_C ! -integer function io_QINDX(k,Xk,q,io_db) +integer function io_QINDX(Xk,q,io_db) ! use pars, ONLY:SP,IP,LP,IP_YIO,LP_YIO,CR_YIO use R_lattice, ONLY:nqibz,nqbz,qindx_X,qindx_B,qindx_S,qindx_C,& @@ -23,7 +23,7 @@ integer function io_QINDX(k,Xk,q,io_db) & sigma_scattering,X_scattering,k_GRIDS_string,k_GRIDS_vector, & & qindx_S_max_Go use IO_m, ONLY:io_sec,frag_QINDX,io_status,read_is_on,IO_OUTDATED_DB, & -& write_is_on,io_extension,variable_exist +& write_is_on,io_extension use IO_int, ONLY:io_connect,io_disconnect,& & io_variable_elemental,def_variable_elemental,io_header,& & ver_is_gt_or_eq,io_fragment,def_variable_bulk,io_variable_bulk @@ -32,7 +32,7 @@ integer function io_QINDX(k,Xk,q,io_db) ! #include ! - type(bz_samp)::k,q,Xk + type(bz_samp)::q,Xk integer ::io_db,i3,i2,i2_dn,i2_up,i2_mem,i2_step,IO_size ! ! Work Space @@ -51,14 +51,6 @@ integer function io_QINDX(k,Xk,q,io_db) if (.not.ver_is_gt_or_eq(io_db,revision=22000)) io_QINDX=IO_OUTDATED_DB if (io_QINDX/=0) goto 1 ! - if (write_is_on(io_db).or.variable_exist(io_db,"k_nibz")) then - call def_variable_elemental(io_db,"k_nibz",1,IP_YIO,0) - call io_variable_elemental(io_db,I0=k%nibz) - ! - call def_variable_elemental(io_db,"k_nbz",1,IP_YIO,0) - call io_variable_elemental(io_db,I0=k%nbz) - endif - ! call def_variable_elemental(io_db,"nXkbz",1,IP_YIO,0) call io_variable_elemental(io_db,VAR="Polarization last K ( bz)",I0=nXkbz) ! diff --git a/src/io/io_kpts.F b/src/io/io_kpts.F new file mode 100644 index 0000000000..8fe8d5dc75 --- /dev/null +++ b/src/io/io_kpts.F @@ -0,0 +1,72 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2014 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +!> @brief Write info about k-points +! +! io_sec=1 general parameters +! io_sec=2 k-points +! +integer function io_kpts(k,Xk,q,io_db) + ! + use pars, ONLY:IP_YIO + use R_lattice, ONLY:bz_samp + use IO_m, ONLY:io_sec,io_status + use IO_int, ONLY:io_connect,io_disconnect,& +& io_variable_elemental,def_variable_elemental,io_header,& +& def_variable_bulk,io_variable_bulk + use timing_m, ONLY:timing + ! +#include + ! + type(bz_samp)::k,q,Xk + integer ::io_db + ! + call timing('io_kpts',OPR='start') + ! + io_kpts=io_connect(desc='kpts',type=1,ID=io_db) + if (io_kpts/=0) goto 1 + ! + if (any((/io_sec(io_db,:)==1/))) then + ! + io_kpts=io_header(io_db,IMPOSE_SN=.true.) + ! + call def_variable_elemental(io_db,"k_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=k%nibz) + ! + call def_variable_elemental(io_db,"k_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=k%nbz) + ! + call def_variable_elemental(io_db,"Xk_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Number of kpts for polarization (ibz)",I0=Xk%nibz) + ! + call def_variable_elemental(io_db,"Xk_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Number of kpts for polarization ( bz)",I0=Xk%nbz) + ! + call def_variable_elemental(io_db,"q_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=q%nibz) + ! + call def_variable_elemental(io_db,"q_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=q%nbz) + ! + call def_variable_elemental(io_db,"",0,0,1) + ! + if (io_kpts/=0) goto 1 + ! + endif + ! + if (any((/io_sec(io_db,:)==2/))) then + ! + call def_variable_bulk(io_db,"Xk_sstar",11,shape(Xk%sstar),IP_YIO) + call io_variable_bulk(io_db,1,I2=Xk%sstar) + ! + endif + ! +1 call io_disconnect(ID=io_db) + ! + call timing('io_kpts',OPR='stop') + ! +end function io_kpts diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep new file mode 100644 index 0000000000..5a22ceb339 --- /dev/null +++ b/src/parallel/PHEL_project.dep @@ -0,0 +1,2 @@ + PARALLEL_global_dimensions.o + diff --git a/src/pol_function/DOUBLE_project.dep b/src/pol_function/DOUBLE_project.dep index d6d8d8fc4c..b43a6457b4 100644 --- a/src/pol_function/DOUBLE_project.dep +++ b/src/pol_function/DOUBLE_project.dep @@ -6,6 +6,7 @@ X_GreenF_analytical.o X_GreenF_convoluted.o X_GreenF_remap.o + X_OUTPUT.o X_delta_part.o X_dielectric_matrix.o X_drude.o diff --git a/src/pol_function/PHEL_project.dep b/src/pol_function/PHEL_project.dep new file mode 100644 index 0000000000..a644e71a2b --- /dev/null +++ b/src/pol_function/PHEL_project.dep @@ -0,0 +1,2 @@ + X_Double_Grid_setup.o + diff --git a/src/qp/PHEL_project.dep b/src/qp/PHEL_project.dep new file mode 100644 index 0000000000..2a34e69ef3 --- /dev/null +++ b/src/qp/PHEL_project.dep @@ -0,0 +1,2 @@ + QP_logicals.o + diff --git a/src/real_time_control/PHEL_project.dep b/src/real_time_control/PHEL_project.dep new file mode 100644 index 0000000000..94a3292b75 --- /dev/null +++ b/src/real_time_control/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_alloc.o + diff --git a/src/real_time_drivers/PHEL_project.dep b/src/real_time_drivers/PHEL_project.dep new file mode 100644 index 0000000000..d7e6a8488e --- /dev/null +++ b/src/real_time_drivers/PHEL_project.dep @@ -0,0 +1,2 @@ + RT_driver.o + diff --git a/src/real_time_initialize/PHEL_project.dep b/src/real_time_initialize/PHEL_project.dep new file mode 100644 index 0000000000..5bb91066cc --- /dev/null +++ b/src/real_time_initialize/PHEL_project.dep @@ -0,0 +1,3 @@ + RT_initialize.o + RT_occupations_and_levels_init.o + diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 3a1d3cf050..c76ebf1438 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -64,7 +64,7 @@ subroutine ELPH_databases(k,E,q) ! ! here qindx_B is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/5/),ID=ID) - io_err(1)=io_QINDX(k,k,q,ID) + io_err(1)=io_QINDX(k,q,ID) if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") call error("Please run a setup with the BSEscatt flag activated") @@ -78,7 +78,7 @@ subroutine ELPH_databases(k,E,q) else ! otherwise qindx_S is allocated call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/4/),ID=ID) - io_err(1)=io_QINDX(k,k,q,ID) + io_err(1)=io_QINDX(k,q,ID) if (io_err(1)/=0) then call msg('s',"Missing k/q scattering database") call error("Please (re)run the setup") From 401bc18ac9686cf735e1b7b693397069d155a48e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 13 Dec 2023 16:01:06 +0100 Subject: [PATCH 0741/1367] Version 5.2.0, Revision 22925, Hash 3f1d764922 MODIFIED * include/version/version.m4 bz_ops/bz_samp_indexes.F io/io_kpts.F Bugs: - Fixed I/O of kpts info Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/bz_ops/bz_samp_indexes.F | 2 +- src/io/io_kpts.F | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 092142d15d..e1e2a61f36 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22925 h.b98e2474e6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.22926 h.3f1d764922, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22925" -SHASH="b98e2474e6" +SREVISION="22926" +SHASH="3f1d764922" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 44ae29adb4..e82a3ab479 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -120,7 +120,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) io_err=io_kpts(k,Xk,q,io_db) ! - if (io_err==0) then + if (io_err/=0) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) io_err=io_kpts(k,Xk,q,io_db) endif diff --git a/src/io/io_kpts.F b/src/io/io_kpts.F index 8fe8d5dc75..dbd720e6d8 100644 --- a/src/io/io_kpts.F +++ b/src/io/io_kpts.F @@ -60,7 +60,7 @@ integer function io_kpts(k,Xk,q,io_db) ! if (any((/io_sec(io_db,:)==2/))) then ! - call def_variable_bulk(io_db,"Xk_sstar",11,shape(Xk%sstar),IP_YIO) + call def_variable_bulk(io_db,"Xk_sstar",1,shape(Xk%sstar),IP_YIO) call io_variable_bulk(io_db,1,I2=Xk%sstar) ! endif From a0217e1bbc0a6764b290fae1bcb969ab67c7bdac Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 11 Jan 2024 23:57:12 +0100 Subject: [PATCH 0742/1367] Version 5.2.0, Revision 23096, Hash b828d3a5ba MODIFIED * include/version/version.m4 qp/QP_ppa_cohsex.F qp/XCo_Hartree_Fock.F Bugs: - [yambo] Fixed bug introduced in QP_ppa_cohsex and XCo_Hartree_fock Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/qp/QP_ppa_cohsex.F | 13 +++++-------- src/qp/XCo_Hartree_Fock.F | 11 ++++------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index bce082b5be..6aaf0a55df 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22919 h.99672e8d83, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23096 h.b828d3a5ba, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22919" -SHASH="99672e8d83" +SREVISION="23096" +SHASH="b828d3a5ba" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index fa448174e7..28539b725b 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -63,9 +63,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Work Space ! - integer ::i_qp,i_w,iqbz,iqibz,ib,i_v,i_c,i_k,i_kmq,i_kmq_bz,i_kmq_s, & -& ig1,ig2,iqs,i_qp_to_start,iq_to_start,is,iq_mem,i_sp_pol, & -& alloc_err,iscs_save(2,4),X_range(2),io_err,ID,IO_ACT,timing_steps + integer ::i_qp,i_w,iqbz,iqibz,ib,i_v,i_c,i_k,i_kmq,i_kmq_Go,i_kmq_bz,i_kmq_s, & +& ig1,ig2,iqs,i_qp_to_start,iq_to_start,is,iq_mem,i_sp_pol, & +& alloc_err,iscs_save(2,4),X_range(2),io_err,ID,IO_ACT,timing_steps complex(SP), allocatable ::W_(:),dc(:),eet_factor(:,:) type(elemental_collision),target ::isc,iscp type(w_samp) ::Sc_W(qp%n_states) @@ -394,10 +394,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) i_k=QP_table(i_qp,3) i_sp_pol=spin(QP_table(i_qp,:)) ! - ! Note DS 2022/07/29 : i_kmq_Go is not used. - ! This is related to issue with HSEX collisions in real-time. - ! See comment in COLLISIONS_HXC and in XCo_Hartree_Fock - !i_kmq_Go=qindx_S(i_k,iqbz,2) + i_kmq_Go=qindx_S(i_k,iqbz,2) i_kmq_bz=qindx_S(i_k,iqbz,1) ! i_kmq =k%sstar(i_kmq_bz,1) @@ -413,7 +410,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! isc%is=(/i_v,i_k, 1, i_sp_pol/) isc%os=(/0, i_kmq,i_kmq_s,i_sp_pol/) - isc%qs(1)=i_kmq_s + isc%qs(1)=i_kmq_Go ! iscp%is=(/i_c,i_k,1,i_sp_pol/) iscp%qs=isc%qs diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index 133ebfa0b8..ab2baa09cc 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -53,7 +53,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! !QP list ! - integer :: ik,ikp,ikp_s,ikp_bz,i_sp_pol + integer :: ik,ikp,ikp_Go,ikp_s,ikp_bz,i_sp_pol ! ! Resets & basis setup @@ -139,7 +139,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) #if !defined _CUDA ! !!! num_threads(n_outthr) !$omp parallel default(shared), & - !$omp private(isc,iscp,local_rhotw,iq,iq_ibz,is_ibz,ikp,ikp_s,ikp_bz,jb,DP_Sx_l), reduction(+:DP_sx) + !$omp private(isc,iscp,local_rhotw,iq,iq_ibz,is_ibz,ikp_Go,ikp_s,ikp_bz,jb,DP_Sx_l), reduction(+:DP_sx) #endif ! call OPENMP_update(master_thread) @@ -186,10 +186,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! m =QP_table(i_qp,2) ! k =QP_table(i_qp,3) ! - ! Note DS 2022/07/29 : i_kp_Go is not used. - ! This is related to issue with HSEX collisions in real-time. - ! See comments in COLLISIONS_HXC and in QP_ppa_cohsex - !i_kp_Go=qindx_S(i_k,iqbz,2) + ikp_Go=qindx_S(ik,iq,2) ikp_bz=qindx_S(ik,iq,1) ! ikp =k%sstar(ikp_bz,1) @@ -199,7 +196,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) isc%os(2:)=(/ ikp,ikp_s,i_sp_pol/) iscp%is=(/ibp,ik , 1 ,i_sp_pol/) ! - isc%qs(1)=ikp_bz + isc%qs(1)=ikp_Go iscp%qs=isc%qs ! if (pp_is_uspp) then From a4956b8a3d919dd08de8b79679b7c9bfe80f4a09 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 26 Jan 2024 11:12:27 +0100 Subject: [PATCH 0743/1367] Version 5.3.0, Revision 23138, Hash b4068ca696 MODIFIED * include/version/version.m4 collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F interface/INIT_activate.F interface/INIT_load.F Changes: - [yambo_rt/yambo_sc] Conversion of collisions starting from BSE kernel: (i) Timing added, although it does not work properly (ii) By default it loads the full BSE matrix in memory. The previoius algorithm can be used with the input flag COLLBseMem Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 ++-- src/collisions/COLLISIONS_HXC.F | 51 +++++++++++++++++++++++++------- src/collisions/COLLISIONS_eval.F | 11 ++++++- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 5 ++-- 5 files changed, 58 insertions(+), 17 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index e37824b7f9..b4ae2fa078 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23101 h.53dbbd33ec, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23138 h.b4068ca696, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23101" -SHASH="53dbbd33ec" +SREVISION="23138" +SHASH="b4068ca696" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index fa873dab7a..b70fbf3dc1 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -11,11 +11,13 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! use drivers, ONLY:l_use_COH_collisions use pars, ONLY:SP,pi,cZERO + use parser_m, ONLY:parser use com, ONLY:msg use frequency, ONLY:w_samp use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_full_bands,n_met_bands use LIVE_t, ONLY:live_timing use hamiltonian, ONLY:H_potential + use BS, ONLY:BS_blk,n_BS_blks use D_lattice, ONLY:DL_vol,sop_inv use tddft, ONLY:tddft_wf_t use xc_functionals,ONLY:F_xc,V_xc,F_xc_mat,magn,XC_potential_driver @@ -51,9 +53,10 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! Work Space ! integer :: i_coll,first_coll,last_coll,ig1,ig2,iqbz,iqibz,alloc_err,iqs,iGo_max,NG_max,NG_XC,LOCAL_COMM(2),& -& i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,& -& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,bands_to_load(2),n_colls,n_GmG +& i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,iB,& +& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,i_steps,bands_to_load(2),n_colls,n_GmG logical :: l_HXC_collisions,eval_coll,l_compute_screening + logical :: block_loaded(n_BS_blks),l_BSE_minimal_memory ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H type(yMPI_comm) :: LOCAL_yMPI_COMM @@ -87,6 +90,8 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) call k_build_up_BZ_tables(q) call k_expand(k) ! + call parser('COLLBseMem',l_BSE_minimal_memory) + ! if (l_compute_screening.and.(IO_BS_err/=0.or.(.not.COLLISIONS_CV_only))) then ! ! Plasmon-Pole/Static interaction DB I/O @@ -261,6 +266,15 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) if (COLLISIONS_HXC_local) n_steps=n_steps+PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements if (COLLISIONS_HXC_MB.or.l_use_COH_collisions) n_steps=n_steps+PAR_NC_local*PAR_nQ_bz*PAR_n_Bp_mat_elements ! + if (IO_BS_err==0) then + block_loaded=.false. + i_steps=2 + if (COLLISIONS_CV_only) then + i_steps=1 + n_steps=PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements + endif + endif + ! ! Define the local COMM ! if (COLLISIONS_parallel_SC_structure) then @@ -362,6 +376,13 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! ! CLEAN ! + if (IO_BS_err==0.and..not.l_BSE_minimal_memory) then + do iB=1,n_BS_blks + if(.not.block_loaded(iB)) cycle + YAMBO_FREE(BS_blk(iB)%mat) + enddo + endif + ! if (l_compute_screening) then YAMBO_FREE(EM1s) call X_ALLOC_elemental('X') @@ -412,8 +433,8 @@ subroutine map_BSE_to_HXC_collisions() logical :: l_conj,l_cI,l_m1 ! iB=-1 - iB_save=-1 jB=-1 + iB_save=-1 ! do i_q_fake=1,q%nbz ! @@ -462,7 +483,7 @@ subroutine map_BSE_to_HXC_collisions() if (l_BSE_kernel_full) then ! Coupling block iB=i_BSE+BS_K_dim(1) ; jB=j_BSE - else + else ! Coupling block if(j_BSE>=i_BSE) then ; iB=i_BSE+BS_K_dim(1) ; jB=j_BSE-i_BSE+1; endif ! Coupling is symmetric @@ -503,7 +524,15 @@ subroutine map_BSE_to_HXC_collisions() ! endif ! - if(iB/=iB_save) then + if(.not.(block_loaded(iB).or.l_BSE_minimal_memory)) then + YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) + BS_blk(iB)%mat=cZERO + call io_control(ACTION=RD,ID=ID_BS) + call io_BS_PAR_block(1,iB,ID_BS,"matonly") + block_loaded(iB)=.true. + endif + ! + if(iB/=iB_save .and. l_BSE_minimal_memory) then if(iB_save/=-1) deallocate(BS_blk(iB_save)%mat) allocate(BS_blk(iB)%mat (BS_blk(iB)%size(1),BS_blk(iB)%size(2))) BS_blk(iB)%mat=cZERO @@ -522,11 +551,13 @@ subroutine map_BSE_to_HXC_collisions() ! HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)-M_ij/spin_occ ! + call live_timing(steps=i_steps) + ! enddo enddo enddo ! - deallocate(BS_blk(iB_save)%mat) + if(l_BSE_minimal_memory) deallocate(BS_blk(iB_save)%mat) ! end subroutine map_BSE_to_HXC_collisions ! @@ -622,7 +653,7 @@ subroutine compute_Hartree_collisions(cc_vv_only) endif ! HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)+4._SP*pi*pre_factor1+Co*pre_factor2 - ! DS: 2023/10/25 Merge Check + ! DS: 2023/10/25 Merge Check !HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)+4._SP*pi*conjg(pre_factor1)+Co*pre_factor2 ! call live_timing(steps=1) @@ -783,7 +814,7 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) ! isc_XC%os(1)=i_np ! - ! DS: 2023/10/25 Merge Check + ! DS: 2023/10/25 Merge Check !if (any(isc_XC%is/=iscp_XC%is).or.any(isc_XC%os/=iscp_XC%os).or.any(isc_XC%qs/=iscp_XC%qs)) then if (any(isc_XC%is/=iscp_XC%is).or.any(isc_XC%os/=iscp_XC%os)) then call scatter_Bamp(isc_XC) @@ -796,7 +827,7 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor1) do ig1=1,N_g_vecs_X pre_factor1=pre_factor1+isc_XC%rhotw(ig1)*iscp_XC%gamp(ig1,1)*conjg(iscp_XC%rhotw(ig1)) - ! DS: 2023/10/25 Merge Check + ! DS: 2023/10/25 Merge Check !ig2=G_m_G(ig1,minus_G(i_kmq_G0)) !pre_factor1=pre_factor1+conjg(isc_XC%rhotw(ig2))*iscp_XC%gamp(ig2,1)*iscp_XC%rhotw(ig2) enddo @@ -817,7 +848,7 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) do ig1=1,N_g_vecs_C do ig2=1,N_g_vecs_C pre_factor2=pre_factor2+isc_XC%rhotw(ig2)*EM1s(ig2,ig1)*conjg(iscp_XC%rhotw(ig1)) - ! DS: 2023/10/25 Merge Check + ! DS: 2023/10/25 Merge Check !pre_factor2=pre_factor2+conjg(isc_XC%rhotw(ig2))*EM1s(ig2,ig1)*conjg(iscp_XC%rhotw(ig1)) enddo enddo diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 0563eaf731..45736d3c18 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -375,7 +375,8 @@ subroutine check_BS_parameters_consistency(Xk) ! use R_lattice, ONLY:bz_samp use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc - use BS, ONLY:BS_blk,BS_n_g_W,BS_n_g_exch,BS_K_dim + use BS, ONLY:BS_blk,BS_n_g_W,BS_n_g_exch,BS_K_dim,BS_bands + use collision_ext, ONLY:COLL_bands ! implicit none ! @@ -400,6 +401,14 @@ subroutine check_BS_parameters_consistency(Xk) if (BS_n_g_W /=QP_ng_Sc) & & call error(" Different cutoff between coll(corr) and bse(direct)") ! + if ( any(BS_bands/=COLL_bands) ) then + if ( BS_bands(1)>COLL_bands(1) .or. BS_bands(2) Date: Sun, 28 Jan 2024 23:23:21 +0100 Subject: [PATCH 0744/1367] Version 5.3.0, Revision 23139, Hash a4956b8a3d MODIFIED * include/version/version.m4 bse/K_restart.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_eval.F io_parallel/io_BS_PAR_block.F io_parallel/io_COLLISIONS.F modules/mod_BS.F Bugs: - [yambo_rt] Fixed performance bug in collisions chunking Changes: - [yambo_rt] Rewritten read BS / write COLL structure Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +- src/bse/K_restart.F | 12 +-- src/collisions/COLLISIONS_HXC.F | 86 ++++++++++----------- src/collisions/COLLISIONS_eval.F | 123 +++++++++++++----------------- src/io_parallel/io_BS_PAR_block.F | 63 +++++++++++++++ src/io_parallel/io_COLLISIONS.F | 11 ++- src/modules/mod_BS.F | 6 ++ 7 files changed, 177 insertions(+), 130 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index b4ae2fa078..4cb2819489 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23138 h.b4068ca696, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23139 h.a4956b8a3d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23138" -SHASH="b4068ca696" +SREVISION="23139" +SHASH="a4956b8a3d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_restart.F b/src/bse/K_restart.F index 76eb63a8e8..83eeb97a9a 100644 --- a/src/bse/K_restart.F +++ b/src/bse/K_restart.F @@ -11,7 +11,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) use LIVE_t, ONLY:live_timing use com, ONLY:msg use X_m, ONLY:X_t - use drivers, ONLY:l_bs_fxc,l_bss,l_eval_collisions + use drivers, ONLY:l_bs_fxc,l_bss use BS, ONLY:l_BSE_restart,l_BSE_kernel_complete,& & BS_K_cutoff,BS_K_cutoff_done,n_BS_blks use IO_int, ONLY:io_control @@ -79,7 +79,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) enddo endif ! - if(l_BSE_kernel_complete.and.(l_bss.or.l_eval_collisions).and.io_BS_err==0) then + if(l_BSE_kernel_complete.and.l_bss.and.io_BS_err==0) then if(trim(IO_mode)=="full") then timing_string="Loading full BSE kernel" ID_now=ID @@ -88,11 +88,6 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) timing_string="Loading BSE_done from compressed file" ID_now=ID_compr endif - if(l_eval_collisions) then - IO_mode="tableonly" - timing_string="Loading BSE table only" - ID_now=ID - endif if(n_BS_blks>0) call live_timing(trim(timing_string),n_BS_blks) do i_block=1,n_BS_blks call io_control(ACTION=RD,ID=ID_now) @@ -140,7 +135,6 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) endif ! call io_control(ACTION=IO_ACT,COM=REP,ID=ID_head) - if(l_eval_collisions) return call io_control(ACTION=RD_CL,COM=REP,ID=ID) if( l_BSE_kernel_complete) call io_BS_PAR_free(ID_head,ID,IO_mode,.true.) if(.not.l_BSE_kernel_complete) call io_BS_PAR_free(ID_head,ID,IO_mode,.false.) @@ -158,7 +152,7 @@ subroutine K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1/),ID=ID) io_BS_err=io_BS(iq,X,ID) ! - if (io_BS_err==0.and.(l_bss.or.l_eval_collisions)) then + if (io_BS_err==0.and.l_bss) then if(n_BS_blks>0) call live_timing("Loading BSE kernel",n_BS_blks) call io_control(ACTION=OP_RD,COM=NONE,MODE=DUMP,SEC=(/1/),ID=ID) io_BS_err=io_BS(iq,X,ID) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index b70fbf3dc1..a2ba813e13 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -56,7 +56,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) & i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,iB,& & i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,i_steps,bands_to_load(2),n_colls,n_GmG logical :: l_HXC_collisions,eval_coll,l_compute_screening - logical :: block_loaded(n_BS_blks),l_BSE_minimal_memory ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H type(yMPI_comm) :: LOCAL_yMPI_COMM @@ -90,8 +89,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) call k_build_up_BZ_tables(q) call k_expand(k) ! - call parser('COLLBseMem',l_BSE_minimal_memory) - ! if (l_compute_screening.and.(IO_BS_err/=0.or.(.not.COLLISIONS_CV_only))) then ! ! Plasmon-Pole/Static interaction DB I/O @@ -267,7 +264,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) if (COLLISIONS_HXC_MB.or.l_use_COH_collisions) n_steps=n_steps+PAR_NC_local*PAR_nQ_bz*PAR_n_Bp_mat_elements ! if (IO_BS_err==0) then - block_loaded=.false. i_steps=2 if (COLLISIONS_CV_only) then i_steps=1 @@ -376,13 +372,6 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! ! CLEAN ! - if (IO_BS_err==0.and..not.l_BSE_minimal_memory) then - do iB=1,n_BS_blks - if(.not.block_loaded(iB)) cycle - YAMBO_FREE(BS_blk(iB)%mat) - enddo - endif - ! if (l_compute_screening) then YAMBO_FREE(EM1s) call X_ALLOC_elemental('X') @@ -429,12 +418,25 @@ subroutine map_BSE_to_HXC_collisions() use IO_m, ONLY:RD ! complex(SP) :: M_ij - integer :: i_BSE,j_BSE,i_k_bz_bse,i_p_bz_bse,iB,iB_save,jB,i_q_fake,i_p_bz - logical :: l_conj,l_cI,l_m1 + integer :: i_BSE,j_BSE,i_k_bz_bse,i_p_bz_bse,iB,jB,i_q_fake,i_p_bz + logical :: l_use_mat,l_conj,l_cI,l_m1 ! iB=-1 jB=-1 - iB_save=-1 + ! + i_k_bz_bse=BS_K_io_map(k%k_table(i_k,1)) + ! + i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) + iB=mod(i_BSE-1,BS_K_dim(1))+1 + ! + do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) + allocate(BS_blk(jB)%mat (BS_blk(jB)%size(1),BS_blk(jB)%size(2))) + allocate(BS_blk(jB)%tam (BS_blk(jB)%zise(1),BS_blk(jB)%zise(2))) + BS_blk(jB)%mat=cZERO + BS_blk(jB)%tam=cZERO + call io_control(ACTION=RD,ID=ID_BS) + call read_BS_par_collisions(1,jB,ID_BS) + enddo ! do i_q_fake=1,q%nbz ! @@ -453,7 +455,6 @@ subroutine map_BSE_to_HXC_collisions() if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle ! - i_k_bz_bse=BS_K_io_map(k%k_table(i_k,1)) !i_p_bz_bse=BS_K_io_map(k%k_table(i_p,i_p_s)) i_p_bz_bse=BS_K_io_map(i_p_bz) ! @@ -466,12 +467,14 @@ subroutine map_BSE_to_HXC_collisions() l_m1=.false. if (l_BSE_kernel_full) then ! Resonant block - iB=i_BSE ; jB=j_BSE; l_conj=.false. + iB=i_BSE ; jB=j_BSE; l_conj=.false. + l_use_mat=.true. else + iB=i_BSE ! Resonant block - if(j_BSE>=i_BSE) then; iB=i_BSE ; jB=j_BSE-i_BSE+1; l_conj=.false. ; endif + if(j_BSE>=i_BSE) then; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; l_conj=.false.; endif ! Resonant is hermitian - if(j_BSE< i_BSE) then; iB=j_BSE ; jB=i_BSE-j_BSE+1; l_conj=.true. ; endif + if(j_BSE< i_BSE) then; l_use_mat=.false.; jB=j_BSE ; l_conj=.true. ; endif endif ! else if(i_BSE<=BS_K_dim(1) .and. j_BSE>BS_K_dim(1)) then @@ -483,11 +486,13 @@ subroutine map_BSE_to_HXC_collisions() if (l_BSE_kernel_full) then ! Coupling block iB=i_BSE+BS_K_dim(1) ; jB=j_BSE + l_use_mat=.true. else + iB=i_BSE+BS_K_dim(1) ! Coupling block - if(j_BSE>=i_BSE) then ; iB=i_BSE+BS_K_dim(1) ; jB=j_BSE-i_BSE+1; endif + if(j_BSE>=i_BSE) then ; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; endif ! Coupling is symmetric - if(j_BSE< i_BSE) then ; iB=j_BSE+BS_K_dim(1) ; iB=i_BSE-j_BSE+1; endif + if(j_BSE< i_BSE) then ; l_use_mat=.false.; jB=j_BSE ; endif endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then @@ -499,11 +504,13 @@ subroutine map_BSE_to_HXC_collisions() if (l_BSE_kernel_full) then ! Anti-Coupling iB=j_BSE+BS_K_dim(1); jB=i_BSE + l_use_mat=.true. else + iB=i_BSE+BS_K_dim(1) ! Anti-Coupling from coupling: the whole BSE matrix is Pseudo-Hermitian - if(j_BSE>=i_BSE) then; iB=i_BSE+BS_K_dim(1); jB=j_BSE-i_BSE+1; endif + if(j_BSE>=i_BSE) then; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; endif ! Anti-Coupling is symmetric - if(j_BSE< i_BSE) then; iB=j_BSE+BS_K_dim(1); jB=i_BSE-j_BSE+1; endif + if(j_BSE< i_BSE) then; l_use_mat=.false.; jB=j_BSE ; endif endif ! else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then @@ -514,34 +521,21 @@ subroutine map_BSE_to_HXC_collisions() j_BSE=j_BSE-BS_K_dim(1) if (l_BSE_kernel_full) then ! Anti-resonant from Resonant - iB=j_BSE; jB=i_BSE-i_BSE; l_conj=.true. + iB=j_BSE; jB=i_BSE-j_BSE+1; l_conj=.true. + l_use_mat=.true. else + iB=i_BSE ! Anti-resonant from Resonant: the whole BSE matrix is Pseudo-Hermitian - if(j_BSE>=i_BSE) then; iB=i_BSE; jB=j_BSE-i_BSE+1; l_conj=.true.; endif + if(j_BSE>=i_BSE) then; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; l_conj=.true.; endif ! Anti-resonant is hermitian - if(j_BSE< i_BSE) then; iB=j_BSE; jB=i_BSE-j_BSE+1; l_conj=.false.; endif + if(j_BSE< i_BSE) then; l_use_mat=.false.; jB=j_BSE ; l_conj=.false.; endif endif ! endif ! - if(.not.(block_loaded(iB).or.l_BSE_minimal_memory)) then - YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - BS_blk(iB)%mat=cZERO - call io_control(ACTION=RD,ID=ID_BS) - call io_BS_PAR_block(1,iB,ID_BS,"matonly") - block_loaded(iB)=.true. - endif - ! - if(iB/=iB_save .and. l_BSE_minimal_memory) then - if(iB_save/=-1) deallocate(BS_blk(iB_save)%mat) - allocate(BS_blk(iB)%mat (BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - BS_blk(iB)%mat=cZERO - call io_control(ACTION=RD,ID=ID_BS) - call io_BS_PAR_block(1,iB,ID_BS,"matonly") - iB_save=iB - endif + if ( l_use_mat) M_ij= BS_blk(iB)%mat(1,jB) + if (.not.l_use_mat) M_ij= BS_blk(iB)%tam(jB,1) ! - M_ij= BS_blk(iB)%mat(1,jB) if(l_conj) M_ij= conjg(M_ij) if(l_cI) M_ij= cI * M_ij if(l_m1) M_ij= - M_ij @@ -557,7 +551,13 @@ subroutine map_BSE_to_HXC_collisions() enddo enddo ! - if(l_BSE_minimal_memory) deallocate(BS_blk(iB_save)%mat) + i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) + iB=mod(i_BSE-1,BS_K_dim(1))+1 + ! + do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) + deallocate(BS_blk(jB)%mat) + deallocate(BS_blk(jB)%tam) + enddo ! end subroutine map_BSE_to_HXC_collisions ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 45736d3c18..13ce17c049 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -35,6 +35,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use X_m, ONLY:X_t use plasma, ONLY:EH_gas use frequency, ONLY:w_samp + use BS, ONLY:BS_kpt_bz use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,io_COLLs,manage_action use parallel_m, ONLY:PAR_IND_G_k,PAR_IND_Bp_mat,PAR_IND_Plasma @@ -52,10 +53,10 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! WorkSpace ! logical :: l_collisions_from_bse,l_tmp - integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr + integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr,BS_nk character(20) :: PAR_ch,FREE_ch ! - integer, external :: io_BS_header + integer, external :: io_BS_header,io_BS_PAR_init ! call timing('COLLISIONS_eval',OPR='start') ! @@ -130,16 +131,19 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! ! Check if I can use the BSE kernel for the collisions ! + allocate(BS_kpt_bz(3,Xk%nbz)) call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,ID=ID_head) IO_err_BS=io_BS_header(1,X(2),ID_head,"full") ! if (IO_err_BS==0) then call set_BS_blks(Xk) - call K_restart(1,X(2),ID_head,ID_mat,ID_cmpr,l_tmp) - call check_BS_parameters_consistency(Xk) - call build_inverse_BS_eh_table(Xk) + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,ID=ID_mat) + IO_err_BS=io_BS_PAR_init(1,ID_mat,"full") + call build_inverse_BS_eh_table(Xk,ID_mat,BS_nk) + call check_BS_parameters_consistency(Xk,BS_nk) call build_BS_kpt_map(Xk) endif + deallocate(BS_kpt_bz) ! endif ! @@ -320,7 +324,7 @@ subroutine set_BS_blks(Xk) ! use pars, ONLY:cZERO use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat, & -& BSK_IO_mode,BS_kpt_bz,l_BSE_kernel_full +& BSK_IO_mode,l_BSE_kernel_full use R_lattice, ONLY:bz_samp ! #include @@ -335,10 +339,16 @@ subroutine set_BS_blks(Xk) ! allocate(BS_blk(n_BS_blks)) BS_blk(:)%size(1)=1 + ! dual part + BS_blk(:)%zise(2)=1 ! do iB=1,BS_K_dim(1) BS_blk(iB )%coordinate(1)=iB BS_blk(iB+BS_K_dim(1))%coordinate(1)=iB + ! dual part + BS_blk(iB )%poordinate(1)=1 + BS_blk(iB+BS_K_dim(1))%poordinate(1)=1 + ! mode BS_blk(iB )%mode="R" BS_blk(iB+BS_K_dim(1))%mode="C" enddo @@ -352,26 +362,18 @@ subroutine set_BS_blks(Xk) BS_blk(iB+BS_K_dim(1))%size(2)=BS_K_dim(1)-iB+1 BS_blk(iB )%coordinate(2)=iB BS_blk(iB+BS_K_dim(1))%coordinate(2)=iB + ! dual part + BS_blk(iB )%zise(1)=BS_K_dim(1)-BS_blk(iB)%size(2) + BS_blk(iB+BS_K_dim(1))%zise(1)=BS_K_dim(1)-BS_blk(iB)%size(2) + BS_blk(iB )%poordinate(2)=iB + BS_blk(iB+BS_K_dim(1))%poordinate(2)=iB enddo endif ! - do iB=1,n_BS_blks - !AMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - !allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - !BS_blk(iB)%mat=cZERO - !BS_blk(iB)%done(:,:)="f" - if (BS_blk(iB)%coordinate(1)==BS_blk(iB)%coordinate(2)) then - allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) - BS_blk(iB)%table=0 - endif - enddo - ! - YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) - ! end subroutine set_BS_blks ! ! -subroutine check_BS_parameters_consistency(Xk) +subroutine check_BS_parameters_consistency(Xk,BS_nk) ! use R_lattice, ONLY:bz_samp use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc @@ -381,13 +383,9 @@ subroutine check_BS_parameters_consistency(Xk) implicit none ! type(bz_samp), intent(in) :: Xk + integer, intent(in) :: BS_nk ! - integer :: i_H,BS_nk - ! - BS_nk=-1 - do i_H=1,2*BS_K_dim(1) - BS_nk = max(BS_blk(i_H)%table(1,1),BS_nk) - enddo + integer :: i_H ! if ( Xk%nbz/=BS_nk ) & & call error(" Different number of k-points between bse kernel and SAVE folder") @@ -412,43 +410,7 @@ subroutine check_BS_parameters_consistency(Xk) end subroutine check_BS_parameters_consistency ! ! -subroutine set_BS_blks_global(Xk) - ! - use pars, ONLY:cZERO - use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat,BSK_IO_mode,BS_kpt_bz - use R_lattice, ONLY:bz_samp - ! -#include - ! - type(bz_samp), intent(in) :: Xk - ! - integer :: iB - ! - BS_res_ares_n_mat=1 - n_BS_blks=2 - n_BS_blks_min=n_BS_blks - ! - allocate(BS_blk(n_BS_blks)) - BS_blk(1)%mode="R" - BS_blk(2)%mode="C" - ! - do iB=1,n_BS_blks - BS_blk(iB)%size(:)=BS_K_dim(1) - BS_blk(iB)%coordinate(:)=1 - YAMBO_ALLOC(BS_blk(iB)%mat,(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - allocate(BS_blk(iB)%done(BS_blk(iB)%size(1),BS_blk(iB)%size(2))) - BS_blk(iB)%mat=cZERO - BS_blk(iB)%done(:,:)="f" - allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) - BS_blk(iB)%table=0 - enddo - ! - YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) - ! -end subroutine set_BS_blks_global -! -! -subroutine build_inverse_BS_eh_table(Xk) +subroutine build_inverse_BS_eh_table(Xk,ID_mat,BS_nk) ! use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp @@ -458,28 +420,47 @@ subroutine build_inverse_BS_eh_table(Xk) implicit none ! type(bz_samp), intent(in) :: Xk + integer, intent(in) :: ID_mat + integer, intent(out) :: BS_nk ! - integer :: i_H,ik_bz,iv,ic,i_sp_c,i_sp_v + integer :: i_res_ares,i_H,ik_bz,iv,ic,i_sp_c,i_sp_v + ! + allocate(BS_blk(1)%table(5,BS_K_dim(1))) + allocate(BS_blk(2)%table(5,BS_K_dim(1))) + ! + call read_BS_table(1,ID_mat) + ! + BS_nk=-1 + do i_res_ares=1,2 + do i_H=1,BS_K_dim(1) + BS_nk = max(BS_blk(i_res_ares)%table(1,i_H),BS_nk) + enddo + enddo ! allocate(BSS_eh_table_m1(Xk%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) BSS_eh_table_m1=0 !call live_timing('BSE inverse eh-table',BS_H_dim) ! - do i_H=1,2*BS_K_dim(1) + do i_res_ares=1,2 + do i_H=1,BS_K_dim(1) ! - ik_bz = BS_blk(i_H)%table(1,1) - iv = BS_blk(i_H)%table(2,1) - ic = BS_blk(i_H)%table(3,1) - i_sp_c = BS_blk(i_H)%table(4,1) - i_sp_v = BS_blk(i_H)%table(5,1) + ik_bz = BS_blk(i_res_ares)%table(1,i_H) + iv = BS_blk(i_res_ares)%table(2,i_H) + ic = BS_blk(i_res_ares)%table(3,i_H) + i_sp_c = BS_blk(i_res_ares)%table(4,i_H) + i_sp_v = BS_blk(i_res_ares)%table(5,i_H) ! - BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H + BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H+(i_res_ares-1)*BS_K_dim(1) ! !call live_timing(steps=1) ! enddo + enddo !call live_timing( ) ! + deallocate(BS_blk(1)%table) + deallocate(BS_blk(2)%table) + ! end subroutine build_inverse_BS_eh_table ! ! diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index a6251fcc7b..e6977034ec 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -211,3 +211,66 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) call timing('io_BS',OPR='stop') ! end subroutine +! +! +subroutine read_BS_PAR_collisions(iq,i_block,ID) + ! + use BS, ONLY:BS_blk + use timing_m, ONLY:timing + use IO_int, ONLY:io_variable_bulk + ! + implicit none + ! + integer, intent(in) :: ID + integer, intent(in) :: iq,i_block + ! + ! Work Space + ! + integer :: x1,x2,y1,y2,VAR_IDs(2) + ! + ! + ! Get the type of block that we want to write + ! + select case(BS_blk(i_block)%mode) + case("R") + VAR_IDs=(/1,2/) + case("C") + VAR_IDs=(/3,4/) + case("A") + VAR_IDs=(/5,6/) + end select + ! + ! Get lower bound coordinates in 2D matrix + x1=BS_blk(i_block)%coordinate(1) + x2=BS_blk(i_block)%coordinate(2) + ! + y1=BS_blk(i_block)%poordinate(1) + y2=BS_blk(i_block)%poordinate(2) + ! + call timing('read_BS_coll_row',OPR='start') + call io_variable_bulk(ID, VAR_IDs(1), C2=BS_blk(i_block)%mat , IPOS=(/1,x1,x2/) ) + call timing('read_BS_coll_row',OPR='stop') + call timing('read_BS_coll_col',OPR='start') + call io_variable_bulk(ID, VAR_IDs(1), C2=BS_blk(i_block)%tam , IPOS=(/1,y1,y2/) ) + call timing('read_BS_coll_col',OPR='stop') + ! +end subroutine read_BS_PAR_collisions +! +! +subroutine read_BS_table(iq,ID) + ! + use pars, ONLY:max_io_vars_open + use IO_int, ONLY:io_variable_bulk + use BS, ONLY:BS_blk,BS_K_dim + ! + implicit none + ! + integer, intent(in) :: iq,ID + ! + integer :: ID_table + ! + ID_table=max_io_vars_open + call io_variable_bulk(ID, ID_table, I2=BS_blk(1)%table, IPOS=(/1,1/) ) + call io_variable_bulk(ID, ID_table, I2=BS_blk(2)%table, IPOS=(/1,BS_K_dim(1)+1/) ) + ! +end subroutine read_BS_table diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 36a7f97b27..cac3bfa60c 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -101,11 +101,13 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) ! Complex collisions if(def2) then COLL_chunksize(1)=2 - COLL_chunksize(2:3)=YAMBO_DEF_CHUNK - if (COLL_element%N Date: Tue, 6 Feb 2024 18:34:14 +0100 Subject: [PATCH 0745/1367] tentaitve fix to magma interfaces (see comments by blmelp, Blanca Mellado Pinto) --- src/modules/mod_magma2_cfortran.F | 16 ++++++++-------- src/modules/mod_magma2_sfortran.F | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/mod_magma2_cfortran.F b/src/modules/mod_magma2_cfortran.F index 4d61c9bc83..8a25568acf 100644 --- a/src/modules/mod_magma2_cfortran.F +++ b/src/modules/mod_magma2_cfortran.F @@ -64,10 +64,10 @@ subroutine magma_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & integer(c_int), value :: ngpu integer(c_int), value :: jobz, uplo integer(c_int), value :: n, lda, lwork, lrwork, liwork - complex(c_float_complex), target :: A(lda,*) - real(c_double), target :: w(*) - complex(c_float_complex), target :: work(*) - real(c_double), target :: rwork(*) + complex(c_float_complex), target :: A(lda,*) + real(c_float), target :: w(*) + complex(c_float_complex), target :: work(*) + real(c_float), target :: rwork(*) integer(c_int), target :: iwork(*) integer(c_int), target :: info !! int* end subroutine @@ -99,10 +99,10 @@ subroutine magma_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, integer(c_int), value :: jobz, uplo integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork type(c_ptr), value :: dA !! double complex** - real(c_double), target :: w(*) - complex(c_float_complex), target :: wA(*) - complex(c_float_complex), target :: work(*) - real(c_double), target :: rwork(*) + real(c_float), target :: w(*) + complex(c_float_complex), target :: wA(*) + complex(c_float_complex), target :: work(*) + real(c_float), target :: rwork(*) integer(c_int), target :: iwork(*) integer(c_int), target :: info !! int* end subroutine diff --git a/src/modules/mod_magma2_sfortran.F b/src/modules/mod_magma2_sfortran.F index 0d11469b02..b5c45a41c3 100644 --- a/src/modules/mod_magma2_sfortran.F +++ b/src/modules/mod_magma2_sfortran.F @@ -65,9 +65,9 @@ subroutine magma_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & integer(c_int), value :: jobz, uplo integer(c_int), value :: n, lda, lwork, lrwork, liwork real(c_float), target :: A(lda,*) - real(c_double), target :: w(*) + real(c_float), target :: w(*) real(c_float), target :: work(*) - real(c_double), target :: rwork(*) + real(c_float), target :: rwork(*) integer(c_int), target :: iwork(*) integer(c_int), target :: info !! int* end subroutine From 0056deb88e8f740ba061d597cb8b1dc82cf176fc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 9 Feb 2024 10:50:59 +0100 Subject: [PATCH 0746/1367] Version 5.2.0, Revision 23012, Hash 85303a124c MODIFIED * configure include/version/version.m4 interface/INIT_barriers.F Changes: - rim_w works also with mpa Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_barriers.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 7a2f257749..0d72a7e19b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22884 h.74e12b5c7b. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23012 h.85303a124c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.22884 h.74e12b5c7b' -PACKAGE_STRING='Yambo 5.2.0 r.22884 h.74e12b5c7b' +PACKAGE_VERSION='5.2.0 r.23012 h.85303a124c' +PACKAGE_STRING='Yambo 5.2.0 r.23012 h.85303a124c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.22884 h.74e12b5c7b to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23012 h.85303a124c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.22884 h.74e12b5c7b:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23012 h.85303a124c:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.22884 h.74e12b5c7b +Yambo configure 5.2.0 r.23012 h.85303a124c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.22884 h.74e12b5c7b, which was +It was created by Yambo $as_me 5.2.0 r.23012 h.85303a124c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22884" -SHASH="74e12b5c7b" +SREVISION="23012" +SHASH="85303a124c" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.22884 h.74e12b5c7b, which was +This file was extended by Yambo $as_me 5.2.0 r.23012 h.85303a124c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.22884 h.74e12b5c7b +Yambo config.status 5.2.0 r.23012 h.85303a124c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 2b629f5ec4..e73325eaab 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22884 h.74e12b5c7b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23012 h.85303a124c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22884" -SHASH="74e12b5c7b" +SREVISION="23012" +SHASH="85303a124c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_barriers.F b/src/interface/INIT_barriers.F index 6c63cff11e..8506c36447 100644 --- a/src/interface/INIT_barriers.F +++ b/src/interface/INIT_barriers.F @@ -115,7 +115,7 @@ subroutine INIT_barriers() goto 1 endif if (gw0_mpa) then - on_runlevels='dyson gw0 mpa em1d el_el_corr el_ph_corr HF_and_locXC' + on_runlevels='dyson gw0 mpa em1d el_el_corr el_ph_corr HF_and_locXC rim_w' call switch_off_runlevel('all',except=trim(on_runlevels)//' '//trim(always_on_runlevels)) goto 1 endif From fc3c79364a672088e6088a5fbb56010117f6f4bb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 9 Feb 2024 11:10:08 +0100 Subject: [PATCH 0747/1367] Version 5.2.0, Revision 23013, Hash 0056deb88e MODIFIED * configure include/version/version.m4 coulomb/col_driver.F interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F modules/mod_R_lattice.F Changes: - [yambo] Created variable for setting the screening of the environment Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/coulomb/col_driver.F | 3 ++- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 3 ++- src/modules/SET_defaults.F | 3 ++- src/modules/mod_R_lattice.F | 4 ++++ 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 0d72a7e19b..19a022fd01 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23012 h.85303a124c. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23013 h.0056deb88e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23012 h.85303a124c' -PACKAGE_STRING='Yambo 5.2.0 r.23012 h.85303a124c' +PACKAGE_VERSION='5.2.0 r.23013 h.0056deb88e' +PACKAGE_STRING='Yambo 5.2.0 r.23013 h.0056deb88e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23012 h.85303a124c to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23013 h.0056deb88e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23012 h.85303a124c:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23013 h.0056deb88e:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23012 h.85303a124c +Yambo configure 5.2.0 r.23013 h.0056deb88e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23012 h.85303a124c, which was +It was created by Yambo $as_me 5.2.0 r.23013 h.0056deb88e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23012" -SHASH="85303a124c" +SREVISION="23013" +SHASH="0056deb88e" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23012 h.85303a124c, which was +This file was extended by Yambo $as_me 5.2.0 r.23013 h.0056deb88e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23012 h.85303a124c +Yambo config.status 5.2.0 r.23013 h.0056deb88e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index e73325eaab..082eb08a5b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23012 h.85303a124c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23013 h.0056deb88e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23012" -SHASH="85303a124c" +SREVISION="23013" +SHASH="0056deb88e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 295756719b..50c02b91f8 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -40,7 +40,7 @@ subroutine col_driver(bare_NG,q) use R_lattice, ONLY:d3q_factor,RIM_is_diagonal,RIM_qpg,bare_qpg,& & nqibz,g_vec,q_pt,nqbz,RIM_ng,RIM_n_rand_pts,& & bz_samp,q_norm,cutoff_presets,bare_qpg_d,& -& cut_geometry,cut_is_slab,idir,q0_def_norm +& cut_geometry,cut_is_slab,idir,q0_def_norm,eps_env use wave_func, ONLY:wf_ng use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_WR_CL,REP,VERIFY @@ -173,6 +173,7 @@ subroutine col_driver(bare_NG,q) ! call cutoff_driver(q) q_norm(1)=q0_def_norm + bare_qpg=bare_qpg/eps_env ! endif ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 610418059e..ceaaf5859b 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -140,7 +140,7 @@ subroutine INIT_activate() ! !Col CUTOFF ! - if (l_col_cut) call initactivate(1,'CUTGeo CUTBox CUTRadius CUTCylLen CUTwsGvec CUTCol_test') + if (l_col_cut) call initactivate(1,'CUTGeo CUTBox CUTRadius CUTCylLen CUTwsGvec CUTCol_test EpsEnv') ! !XX ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 091427c2df..8aa7fb0c28 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -30,7 +30,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use wave_func, ONLY:wf_ng use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& -& bz_samp,RIM_ng,RIM_epsm1,RIM_id_epsm1_reference,& +& bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& & RIM_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_core_bands,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry @@ -390,6 +390,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! ! CUTOFF ! + call it(defs,'EpsEnv', '[COL] Static Inverse dielectric matrix of enviroment',eps_env,verb_level=V_RL) call it(defs,'CUTGeo', '[CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws/slab X/Y/Z/XY..',cut_geometry) call it(defs,'CUTBox', '[CUT] [au] Box sides',box_length) call it(defs,'CUTRadius','[CUT] [au] Sphere/Cylinder radius',cyl_ph_radius) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index a5b1a4b278..6ccd61dc43 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -37,7 +37,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use R_lattice, ONLY:n_g_shells,ng_closed,bse_scattering,coll_scattering,& & Xk_grid_is_uniform,RIM_id_epsm1_reference,RIM_epsm1,& & RIM_anisotropy,RIM_ng,RIM_W_ng,rimw_type,RIM_n_rand_pts,nqibz,q0_def_norm,& -& cutoff_presets,k_map,qindx_S_max_Go +& cutoff_presets,k_map,qindx_S_max_Go,eps_env use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,eval_magn use parallel_m, ONLY:ncpu,CPU_str_reset,CREATE_hosts_COMM use com, ONLY:isec,depth,secnm,previous_secmode,of_name,n_ofs_defined,of_opened,of_unit,max_open_ofs,& @@ -273,6 +273,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) k_map%q_step =-1 k_map%max_kdir= 0 qindx_S_max_Go=-1 + eps_env=1._SP ! ! RIM ! diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 4b3d23e89a..50706adcbf 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -176,6 +176,10 @@ module R_lattice logical :: cut_is_slab integer :: idir(3) ! + ! Environment effectice screening + ! + real(SP) :: eps_env + ! ! BZ map by direction ! type(bz_map) :: k_map From 5aca842c9066b6c4f9b8316aa159b41118668b43 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 11 Feb 2024 00:01:27 +0100 Subject: [PATCH 0748/1367] Version 5.2.0, Revision 23236, Hash fef8b788e7 MODIFIED * configure include/version/version.m4 bse/K_kernel.F Bugs: - mode_now is not private, it is defined outsided the omp loop Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 7a2f257749..fce6dffbec 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22884 h.74e12b5c7b. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23236 h.fef8b788e7. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.22884 h.74e12b5c7b' -PACKAGE_STRING='Yambo 5.2.0 r.22884 h.74e12b5c7b' +PACKAGE_VERSION='5.2.0 r.23236 h.fef8b788e7' +PACKAGE_STRING='Yambo 5.2.0 r.23236 h.fef8b788e7' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.22884 h.74e12b5c7b to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23236 h.fef8b788e7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.22884 h.74e12b5c7b:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23236 h.fef8b788e7:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.22884 h.74e12b5c7b +Yambo configure 5.2.0 r.23236 h.fef8b788e7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.22884 h.74e12b5c7b, which was +It was created by Yambo $as_me 5.2.0 r.23236 h.fef8b788e7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22884" -SHASH="74e12b5c7b" +SREVISION="23236" +SHASH="fef8b788e7" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.22884 h.74e12b5c7b, which was +This file was extended by Yambo $as_me 5.2.0 r.23236 h.fef8b788e7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.22884 h.74e12b5c7b +Yambo config.status 5.2.0 r.23236 h.fef8b788e7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 2b629f5ec4..a3ae58e716 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22884 h.74e12b5c7b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23236 h.fef8b788e7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22884" -SHASH="74e12b5c7b" +SREVISION="23236" +SHASH="fef8b788e7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 738f4545c4..b758b4c52a 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -534,7 +534,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !$omp & sqrt_f_itk,i_k_bz,i_v_k,i_c_k,i_k_sp_pol_c,i_k_sp_pol_v,i_k_s,is_k,os_k,i_k_s_m1,H_pos, & !$omp & sqrt_f_itp,i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v,i_p_s,is_p,os_p,i_kp_s, & !$omp & i_kmq_bz,ig_kmq,i_kmq,i_kmq_s,i_kmq_t,i_kmq_s_m1,i_kp_mq_s, & - !$omp & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t,ig_W_final,mode_now, & + !$omp & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t,ig_W_final, & !$omp & ig_W,iq_W,iq_W_s,iq_W_bz,iq_W_bz_mq,ig_W_mq,iq_W_mq,iq_W_s_mq,H_x,H_c, & !$omp & i_p_bz_last,i_k_bz_last,i_pmq_bz_last,i_kmq_bz_last, & !$omp & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last, & From dc91bcc56b6687b44b49ffe909e10c71078320de Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 11 Feb 2024 09:50:04 +0100 Subject: [PATCH 0749/1367] Version 5.2.0, Revision 23237, Hash 5aca842c90 MODIFIED * configure include/version/version.m4 bse/K_diago_driver.F Bugs: - [yambo] Fix imported from phys-magnons Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_diago_driver.F | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/configure b/configure index fce6dffbec..68fce8d38f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23236 h.fef8b788e7. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23237 h.5aca842c90. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23236 h.fef8b788e7' -PACKAGE_STRING='Yambo 5.2.0 r.23236 h.fef8b788e7' +PACKAGE_VERSION='5.2.0 r.23237 h.5aca842c90' +PACKAGE_STRING='Yambo 5.2.0 r.23237 h.5aca842c90' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23236 h.fef8b788e7 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23237 h.5aca842c90 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23236 h.fef8b788e7:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23237 h.5aca842c90:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23236 h.fef8b788e7 +Yambo configure 5.2.0 r.23237 h.5aca842c90 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23236 h.fef8b788e7, which was +It was created by Yambo $as_me 5.2.0 r.23237 h.5aca842c90, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23236" -SHASH="fef8b788e7" +SREVISION="23237" +SHASH="5aca842c90" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23236 h.fef8b788e7, which was +This file was extended by Yambo $as_me 5.2.0 r.23237 h.5aca842c90, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23236 h.fef8b788e7 +Yambo config.status 5.2.0 r.23237 h.5aca842c90 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a3ae58e716..c7deb05ad8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23236 h.fef8b788e7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23237 h.5aca842c90, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23236" -SHASH="fef8b788e7" +SREVISION="23237" +SHASH="5aca842c90" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 6515c7a647..92366825b9 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -289,6 +289,7 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Left residuals if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) BS_R_left_abs =conjg(BS_R_right_abs) + if( l_BS_kerr.or.l_BS_dichroism) BS_R_left_kerr=conjg(BS_R_right_kerr) if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) ! ! DS: this also should be changed according to the general structure From f6a85420b93cbd2f8ca338be7626ca7111f5f584 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 14 Feb 2024 12:41:20 +0100 Subject: [PATCH 0750/1367] Version 5.2.0, Revision 23036, Hash 36095c00cc MODIFIED * configure include/version/version.m4 bse/K_Haydock.F bse/K_solvers.F output/X_OUTPUT_driver.F Changes: - jdos Haydock restored Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_Haydock.F | 1 + src/bse/K_solvers.F | 3 ++- src/output/X_OUTPUT_driver.F | 2 +- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 1a71487a5a..34251f7a13 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23009 h.4965144881. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23036 h.36095c00cc. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23009 h.4965144881' -PACKAGE_STRING='Yambo 5.2.0 r.23009 h.4965144881' +PACKAGE_VERSION='5.2.0 r.23036 h.36095c00cc' +PACKAGE_STRING='Yambo 5.2.0 r.23036 h.36095c00cc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23009 h.4965144881 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23036 h.36095c00cc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23009 h.4965144881:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23036 h.36095c00cc:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23009 h.4965144881 +Yambo configure 5.2.0 r.23036 h.36095c00cc generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23009 h.4965144881, which was +It was created by Yambo $as_me 5.2.0 r.23036 h.36095c00cc, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23009" -SHASH="4965144881" +SREVISION="23036" +SHASH="36095c00cc" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23009 h.4965144881, which was +This file was extended by Yambo $as_me 5.2.0 r.23036 h.36095c00cc, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23009 h.4965144881 +Yambo config.status 5.2.0 r.23036 h.36095c00cc configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 17982111f4..f07632ccab 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23009 h.4965144881, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23036 h.36095c00cc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23009" -SHASH="4965144881" +SREVISION="23036" +SHASH="36095c00cc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index f9520f4e87..fa629ceee0 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -226,6 +226,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) do i_g=1,BS_nT_grps if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) + if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 7e6ac48041..d31027ecdb 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -14,7 +14,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use X_m, ONLY:X_t use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& & run_inversion,run_Diago,run_Slepc - use BS, ONLY:BS_K_has_been_calculated_loaded,& + use BS, ONLY:BS_K_has_been_calculated_loaded,l_BS_jdos,& & BS_blks_free,l_BS_abs,l_BS_kerr,l_BS_magnons use parallel_m, ONLY:master_cpu,CPU_structure use IO_int, ONLY:IO_and_Messaging_switch @@ -98,6 +98,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! A possible alternative could be to use the algorithm with Cf ! from both the left and the right hand side to get from a single Haydock loop ! + if (l_BS_jdos) call K_Haydock(iq,W_bss,"jdos",Xk) if (l_BS_abs) call K_Haydock(iq,W_bss,"optics",Xk) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index d35a546030..1bb4e5c8ab 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -99,7 +99,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) endif endif if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP kerr magnons jdos") - if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort jdos E_IP") + if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort E_IP") if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP") endif ! From d90d0910dcb9a8d38d606ad4a0ac473c030d013e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 15 Feb 2024 18:12:55 +0100 Subject: [PATCH 0751/1367] Version 5.2.0, Revision 23037, Hash f6a85420b9 MODIFIED * configure include/version/version.m4 coulomb/col_driver.F Bugs: - [yambo] Fixed eps_env Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/coulomb/col_driver.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 34251f7a13..8bc68be03a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23036 h.36095c00cc. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23037 h.f6a85420b9. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23036 h.36095c00cc' -PACKAGE_STRING='Yambo 5.2.0 r.23036 h.36095c00cc' +PACKAGE_VERSION='5.2.0 r.23037 h.f6a85420b9' +PACKAGE_STRING='Yambo 5.2.0 r.23037 h.f6a85420b9' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23036 h.36095c00cc to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23037 h.f6a85420b9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23036 h.36095c00cc:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23037 h.f6a85420b9:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23036 h.36095c00cc +Yambo configure 5.2.0 r.23037 h.f6a85420b9 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23036 h.36095c00cc, which was +It was created by Yambo $as_me 5.2.0 r.23037 h.f6a85420b9, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23036" -SHASH="36095c00cc" +SREVISION="23037" +SHASH="f6a85420b9" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23036 h.36095c00cc, which was +This file was extended by Yambo $as_me 5.2.0 r.23037 h.f6a85420b9, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23036 h.36095c00cc +Yambo config.status 5.2.0 r.23037 h.f6a85420b9 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index f07632ccab..b28c62da94 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23036 h.36095c00cc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23037 h.f6a85420b9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23036" -SHASH="36095c00cc" +SREVISION="23037" +SHASH="f6a85420b9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 50c02b91f8..25b8f4c4c9 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -173,7 +173,7 @@ subroutine col_driver(bare_NG,q) ! call cutoff_driver(q) q_norm(1)=q0_def_norm - bare_qpg=bare_qpg/eps_env + bare_qpg=bare_qpg*sqrt(eps_env) ! endif ! From 536a3f04e53961bcfb459edfb2e5ab2709abd2c3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 18 Feb 2024 17:55:14 +0100 Subject: [PATCH 0752/1367] Version 5.2.0, Revision 23038, Hash d90d0910dc MODIFIED * configure include/version/version.m4 coulomb/col_driver.F Changes: - [yambo] eps_env rescaling added also to RIM_qpg variable Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/coulomb/col_driver.F | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 8bc68be03a..e560c3a1d6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23037 h.f6a85420b9. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23038 h.d90d0910dc. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23037 h.f6a85420b9' -PACKAGE_STRING='Yambo 5.2.0 r.23037 h.f6a85420b9' +PACKAGE_VERSION='5.2.0 r.23038 h.d90d0910dc' +PACKAGE_STRING='Yambo 5.2.0 r.23038 h.d90d0910dc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23037 h.f6a85420b9 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23038 h.d90d0910dc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23037 h.f6a85420b9:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23038 h.d90d0910dc:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23037 h.f6a85420b9 +Yambo configure 5.2.0 r.23038 h.d90d0910dc generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23037 h.f6a85420b9, which was +It was created by Yambo $as_me 5.2.0 r.23038 h.d90d0910dc, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23037" -SHASH="f6a85420b9" +SREVISION="23038" +SHASH="d90d0910dc" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23037 h.f6a85420b9, which was +This file was extended by Yambo $as_me 5.2.0 r.23038 h.d90d0910dc, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23037 h.f6a85420b9 +Yambo config.status 5.2.0 r.23038 h.d90d0910dc configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index b28c62da94..c25aea1f76 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23037 h.f6a85420b9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23038 h.d90d0910dc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23037" -SHASH="f6a85420b9" +SREVISION="23038" +SHASH="d90d0910dc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 25b8f4c4c9..5784666d33 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -174,6 +174,7 @@ subroutine col_driver(bare_NG,q) call cutoff_driver(q) q_norm(1)=q0_def_norm bare_qpg=bare_qpg*sqrt(eps_env) + RIM_qpg =RIM_qpg*sqrt(eps_env) ! endif ! From 7437d11d3efe71db4c40687a6612574d0da75c73 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 21 Feb 2024 09:40:24 +0100 Subject: [PATCH 0753/1367] Version 5.2.0, Revision 23260, Hash 43cf436a24 MODIFIED * configure include/version/version.m4 Bugs: - Fixed configure after merge Patch sent by: Davide Sangalli --- configure | 45 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 1a71487a5a..f71dc63d90 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23009 h.4965144881. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23260 h.43cf436a24. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23009 h.4965144881' -PACKAGE_STRING='Yambo 5.2.0 r.23009 h.4965144881' +PACKAGE_VERSION='5.2.0 r.23260 h.43cf436a24' +PACKAGE_STRING='Yambo 5.2.0 r.23260 h.43cf436a24' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -711,6 +711,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -889,6 +890,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -948,6 +951,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1600,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23009 h.4965144881 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23260 h.43cf436a24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23009 h.4965144881:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23260 h.43cf436a24:";; esac cat <<\_ACEOF @@ -1679,6 +1683,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1876,7 +1881,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23009 h.4965144881 +Yambo configure 5.2.0 r.23260 h.43cf436a24 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2510,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23009 h.4965144881, which was +It was created by Yambo $as_me 5.2.0 r.23260 h.43cf436a24, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3268,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23009" -SHASH="4965144881" +SREVISION="23260" +SHASH="43cf436a24" @@ -3416,6 +3421,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15479,6 +15498,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15647,6 +15669,7 @@ fi + # @@ -16578,7 +16601,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23009 h.4965144881, which was +This file was extended by Yambo $as_me 5.2.0 r.23260 h.43cf436a24, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16665,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23009 h.4965144881 +Yambo config.status 5.2.0 r.23260 h.43cf436a24 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 17982111f4..5edeb4597c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23009 h.4965144881, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23260 h.43cf436a24, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23009" -SHASH="4965144881" +SREVISION="23260" +SHASH="43cf436a24" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From cf68661a65c45a545f45473e7fa7a1b3c7e28e10 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 26 Feb 2024 09:22:36 +0100 Subject: [PATCH 0754/1367] Version 5.2.0, Revision 23172, Hash 329c6db MODIFIED * modified: nloptics/NL_driver.F Bugs: - [yambo_nl] Compilation fixed Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_driver.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 7a2f257749..c35c1b5d66 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.22884 h.74e12b5c7b. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23172 h.329c6db. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.22884 h.74e12b5c7b' -PACKAGE_STRING='Yambo 5.2.0 r.22884 h.74e12b5c7b' +PACKAGE_VERSION='5.2.0 r.23172 h.329c6db' +PACKAGE_STRING='Yambo 5.2.0 r.23172 h.329c6db' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.22884 h.74e12b5c7b to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23172 h.329c6db to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.22884 h.74e12b5c7b:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23172 h.329c6db:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.22884 h.74e12b5c7b +Yambo configure 5.2.0 r.23172 h.329c6db generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.22884 h.74e12b5c7b, which was +It was created by Yambo $as_me 5.2.0 r.23172 h.329c6db, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22884" -SHASH="74e12b5c7b" +SREVISION="23172" +SHASH="329c6db" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.22884 h.74e12b5c7b, which was +This file was extended by Yambo $as_me 5.2.0 r.23172 h.329c6db, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.22884 h.74e12b5c7b +Yambo config.status 5.2.0 r.23172 h.329c6db configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 2b629f5ec4..b7f787018c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22884 h.74e12b5c7b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23172 h.329c6db, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22884" -SHASH="74e12b5c7b" +SREVISION="23172" +SHASH="329c6db" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index a519dbb8fa..f2d6700f13 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -23,7 +23,7 @@ subroutine NL_driver(E,X,k,q,Dip) use fields, ONLY:Efield use QP_CTL_m, ONLY:QP_apply use nl_optics, ONLY:n_frequencies,Correlation,NL_alloc,NL_free,V_bands,eval_dG,NL_J,NL_initial_J, & -& NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P, & +& NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P,l_pump_and_probe,& & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,freqs_done,n_freqs_todo,l_eval_CURRENT,& & HF,SEX,NL_bands,NL_nbands,V_bands_t,NL_alloc_k_distributed,NL_J_t use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands, & From 54d2fbfc4ad7587ed7ad320651826f89576ba1ba Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 26 Feb 2024 10:49:41 +0100 Subject: [PATCH 0755/1367] Version 5.2.0, Revision 23173, Hash cf68661 MODIFIED * modified: src/real_time_control/RT_output.F src/real_time_control/RT_output_INIT.F ypp/real_time/RT_OBSERVABLES_damp_and_write.F ypp/real_time/RT_X_LRR_real_field.F Changes: - [ypp_rt] Preparing extra output files for P&p analysis Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/real_time_control/RT_output.F | 2 ++ src/real_time_control/RT_output_INIT.F | 1 + ypp/real_time/RT_OBSERVABLES_damp_and_write.F | 2 ++ ypp/real_time/RT_X_LRR_real_field.F | 4 ++-- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/configure b/configure index c35c1b5d66..5cb2b2ef51 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23172 h.329c6db. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23173 h.cf68661. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23172 h.329c6db' -PACKAGE_STRING='Yambo 5.2.0 r.23172 h.329c6db' +PACKAGE_VERSION='5.2.0 r.23173 h.cf68661' +PACKAGE_STRING='Yambo 5.2.0 r.23173 h.cf68661' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23172 h.329c6db to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23173 h.cf68661 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23172 h.329c6db:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23173 h.cf68661:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23172 h.329c6db +Yambo configure 5.2.0 r.23173 h.cf68661 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23172 h.329c6db, which was +It was created by Yambo $as_me 5.2.0 r.23173 h.cf68661, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23172" -SHASH="329c6db" +SREVISION="23173" +SHASH="cf68661" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23172 h.329c6db, which was +This file was extended by Yambo $as_me 5.2.0 r.23173 h.cf68661, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23172 h.329c6db +Yambo config.status 5.2.0 r.23173 h.cf68661 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index b7f787018c..d6b5f62669 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23172 h.329c6db, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23173 h.cf68661, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23172" -SHASH="329c6db" +SREVISION="23173" +SHASH="cf68661" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/RT_output.F b/src/real_time_control/RT_output.F index 1bd1c9825a..697792696c 100644 --- a/src/real_time_control/RT_output.F +++ b/src/real_time_control/RT_output.F @@ -176,6 +176,8 @@ subroutine RT_output(what,VALUES,TIME,E) case('total_field') data_to_dump(2:4) = -real(A_tot%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 data_to_dump(5:7) =-aimag(A_tot%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 + case('YPP-Field') + data_to_dump(2:4) = -real(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 case('external_field') data_to_dump(2:4) = -real(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 data_to_dump(5:7) =-aimag(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 diff --git a/src/real_time_control/RT_output_INIT.F b/src/real_time_control/RT_output_INIT.F index 28b046518f..5638607476 100644 --- a/src/real_time_control/RT_output_INIT.F +++ b/src/real_time_control/RT_output_INIT.F @@ -43,6 +43,7 @@ subroutine RT_output_INIT( ) call RT_FILE_add(name='probe-polarization',TITLES=(/"Time[fs]","Pol_x ","Pol_y ","Pol_z "/)) call RT_FILE_add(name='pump-current',TITLES=(/"Time[fs]","j_x ","j_y ","j_z "/)) call RT_FILE_add(name='pump-polarization',TITLES=(/"Time[fs]","Pol_x ","Pol_y ","Pol_z "/)) + call RT_FILE_add(name='Field',TITLES=(/"Time[fs]"," E_x "," E_y "," E_z "/)) ! do i_fp=1,3 if (i_fp==1) dumb_ch="external_field" diff --git a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F index 726ca0ca9f..d230c670e7 100644 --- a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F +++ b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F @@ -12,6 +12,7 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) use pars, ONLY:pi,SP use units, ONLY:AUT2FS use RT_control, ONLY:RT_output + use fields, ONLY:A_ext use real_time, ONLY:RT_ind_J,RT_P ! #include @@ -59,6 +60,7 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) do i_t=1,RT%T_n_steps if (STRING_match(OBS%title,"polarization")) RT_P=OBS%F_t(i_t,1:3) if (STRING_match(OBS%title,"current") ) RT_ind_J=OBS%F_t(i_t,1:3) + if (STRING_match(OBS%title,"Field") ) A_ext%vecpot_vel=OBS%F_t(i_t,1:3) call RT_output(trim(OBS%title),TIME=RT_time(i_t)*AUT2FS) enddo call RT_output(what="close "//trim(OBS%title)) diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index c8ac8f0c35..1e98fd31bc 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -12,7 +12,7 @@ subroutine RT_X_LRR_real_field(en) ! use YPP_real_time, ONLY:RT_conf,Use_FFT,l_force_min_damp,RT_time,Pol,Curr,ElField,& -& OBS_el_free,X_kind,N_pumps +& OBS_el_free,X_kind,N_pumps,l_skip_OBS_IO use pars, ONLY:SP,pi,cI,cZERO,schlen use units, ONLY:HA2EV use electrons, ONLY:levels @@ -97,7 +97,7 @@ subroutine RT_X_LRR_real_field(en) ! ... FT !-------- ! - call RT_OBSERVABLES_damp_and_write(ElField,RT_conf,.TRUE.) + call RT_OBSERVABLES_damp_and_write(ElField,RT_conf,.true.) !(l_skip_OBS_IO.or.N_pumps==0)) ! !... Analytic ... ! From 0ac33beca34609e231f0697a62910b7ea2f22b87 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 1 Mar 2024 00:13:01 +0100 Subject: [PATCH 0756/1367] Version 5.2.0, Revision 23174, Hash 54d2fbfc4a MODIFIED * configure include/version/version.m4 bse/K_driver.F collisions/COLLISIONS_eval.F io_parallel/variables_BS_more.F modules/mod_BS.F modules/mod_IO.F Changes: - [yambo_rt/yambo_sc/yambo_nl] Added check on k-points when generating collisions from BSE kernel Patch sent by: Davide Sangalli --- configure | 22 ++++++------ include/version/version.m4 | 6 ++-- src/bse/K_driver.F | 7 +++- src/collisions/COLLISIONS_eval.F | 55 +++++++++++++++++++---------- src/io_parallel/variables_BS_more.F | 9 ++++- src/modules/mod_BS.F | 1 + src/modules/mod_IO.F | 4 +-- 7 files changed, 68 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 5cb2b2ef51..10809e514a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23173 h.cf68661. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23174 h.54d2fbfc4a. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23173 h.cf68661' -PACKAGE_STRING='Yambo 5.2.0 r.23173 h.cf68661' +PACKAGE_VERSION='5.2.0 r.23174 h.54d2fbfc4a' +PACKAGE_STRING='Yambo 5.2.0 r.23174 h.54d2fbfc4a' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23173 h.cf68661 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23174 h.54d2fbfc4a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23173 h.cf68661:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23174 h.54d2fbfc4a:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23173 h.cf68661 +Yambo configure 5.2.0 r.23174 h.54d2fbfc4a generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23173 h.cf68661, which was +It was created by Yambo $as_me 5.2.0 r.23174 h.54d2fbfc4a, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23173" -SHASH="cf68661" +SREVISION="23174" +SHASH="54d2fbfc4a" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23173 h.cf68661, which was +This file was extended by Yambo $as_me 5.2.0 r.23174 h.54d2fbfc4a, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23173 h.cf68661 +Yambo config.status 5.2.0 r.23174 h.54d2fbfc4a configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d6b5f62669..631b293c7a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23173 h.cf68661, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23174 h.54d2fbfc4a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23173" -SHASH="cf68661" +SREVISION="23174" +SHASH="54d2fbfc4a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index cfe02d9992..6197ecea5a 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -18,7 +18,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use IO_m, ONLY:OP_RD_CL,REP use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_uses_DbGd use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_cpl_K_corr,& -& BS_Blocks_and_Transitions_free,BSqpts,BS_kpt_bz +& BS_Blocks_and_Transitions_free,BSqpts,BS_kpt_bz,BS_kpt_ibz use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded use drivers, ONLY:l_rpa_IP,l_bs_fxc,l_bss use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme,PARALLEL_default_mode @@ -113,6 +113,10 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! endif ! + YAMBO_ALLOC(BS_kpt_ibz,(3,Xk%nibz)) + do ik=1,Xk%nibz + BS_kpt_ibz(:,ik)=Xk%pt(ik,:) + enddo call k_ibz2bz(Xk,'i',.false.) YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) do ik=1,Xk%nbz @@ -251,6 +255,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! YAMBO_FREE(BSqpts) YAMBO_FREE(BS_kpt_bz) + YAMBO_FREE(BS_kpt_ibz) call qindx_free('B') ! end subroutine diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 13ce17c049..f3c28b8d1f 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -35,9 +35,10 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use X_m, ONLY:X_t use plasma, ONLY:EH_gas use frequency, ONLY:w_samp - use BS, ONLY:BS_kpt_bz + use BS, ONLY:BS_kpt_bz,BS_kpt_ibz use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,io_COLLs,manage_action + use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,& +& io_COLLs,manage_action,netcdf_dim_size use parallel_m, ONLY:PAR_IND_G_k,PAR_IND_Bp_mat,PAR_IND_Plasma use parallel_int, ONLY:PP_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:WF_free @@ -53,7 +54,8 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! WorkSpace ! logical :: l_collisions_from_bse,l_tmp - integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr,BS_nk + integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr,& + & BS_nk_bz,BS_nk_ibz character(20) :: PAR_ch,FREE_ch ! integer, external :: io_BS_header,io_BS_PAR_init @@ -131,19 +133,25 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! ! Check if I can use the BSE kernel for the collisions ! - allocate(BS_kpt_bz(3,Xk%nbz)) - call io_control(ACTION=OP_RD_CL,COM=NONE,MODE=DUMP,ID=ID_head) + call io_control(ACTION=OP_RD,COM=NONE,MODE=DUMP,ID=ID_head) + IO_err_BS=io_BS_header(1,X(2),ID_head,"connect") + BS_nk_bz =netcdf_dim_size(ID_head,"n_kpt_bz") + BS_nk_ibz=netcdf_dim_size(ID_head,"n_kpt_ibz") + allocate(BS_kpt_bz(3,BS_nk_bz)) + allocate(BS_kpt_ibz(3,BS_nk_ibz)) + call io_control(ACTION=RD_CL,COM=NONE,MODE=DUMP,ID=ID_head) IO_err_BS=io_BS_header(1,X(2),ID_head,"full") ! if (IO_err_BS==0) then call set_BS_blks(Xk) call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,ID=ID_mat) IO_err_BS=io_BS_PAR_init(1,ID_mat,"full") - call build_inverse_BS_eh_table(Xk,ID_mat,BS_nk) - call check_BS_parameters_consistency(Xk,BS_nk) + call build_inverse_BS_eh_table(Xk,ID_mat)!,BS_nk_bz) + call check_BS_parameters_consistency(Xk,BS_nk_bz,BS_nk_ibz) call build_BS_kpt_map(Xk) endif deallocate(BS_kpt_bz) + deallocate(BS_kpt_ibz) ! endif ! @@ -373,9 +381,10 @@ subroutine set_BS_blks(Xk) end subroutine set_BS_blks ! ! -subroutine check_BS_parameters_consistency(Xk,BS_nk) +subroutine check_BS_parameters_consistency(Xk,BS_nk_bz,BS_nk_ibz) ! use R_lattice, ONLY:bz_samp + use D_lattice, ONLY:nsym use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc use BS, ONLY:BS_blk,BS_n_g_W,BS_n_g_exch,BS_K_dim,BS_bands use collision_ext, ONLY:COLL_bands @@ -383,13 +392,23 @@ subroutine check_BS_parameters_consistency(Xk,BS_nk) implicit none ! type(bz_samp), intent(in) :: Xk - integer, intent(in) :: BS_nk + integer, intent(in) :: BS_nk_bz,BS_nk_ibz ! integer :: i_H ! - if ( Xk%nbz/=BS_nk ) & + if ( Xk%nbz/=BS_nk_bz ) & & call error(" Different number of k-points between bse kernel and SAVE folder") ! + if ( Xk%nibz/=BS_nk_ibz .and. BS_nk_ibz/=0 ) then + ! This will lead to wrong results due to phases issues. Indeed the k-pts + ! outside the new IBZ maybe reached by a new sym, if the original one + ! is not available anymore + if ( nsym>1 ) call error("nsym>1 and BSE kernel generated with more syms then SAVE") + ! This works only if the SAVE without symmetries has been generated by + ! directly expanding the SAVE used of the BSE run + if ( nsym==1 ) call warning("nsym=1 and BSE kernel generated with syms") + endif + ! if (BS_n_g_exch/=QP_ng_SH) & & call error(" Different cutoff between coll(hartree) and bse(exch)") ! @@ -410,7 +429,7 @@ subroutine check_BS_parameters_consistency(Xk,BS_nk) end subroutine check_BS_parameters_consistency ! ! -subroutine build_inverse_BS_eh_table(Xk,ID_mat,BS_nk) +subroutine build_inverse_BS_eh_table(Xk,ID_mat)!,BS_nk) ! use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp @@ -421,7 +440,7 @@ subroutine build_inverse_BS_eh_table(Xk,ID_mat,BS_nk) ! type(bz_samp), intent(in) :: Xk integer, intent(in) :: ID_mat - integer, intent(out) :: BS_nk + !integer, intent(out) :: BS_nk ! integer :: i_res_ares,i_H,ik_bz,iv,ic,i_sp_c,i_sp_v ! @@ -430,12 +449,12 @@ subroutine build_inverse_BS_eh_table(Xk,ID_mat,BS_nk) ! call read_BS_table(1,ID_mat) ! - BS_nk=-1 - do i_res_ares=1,2 - do i_H=1,BS_K_dim(1) - BS_nk = max(BS_blk(i_res_ares)%table(1,i_H),BS_nk) - enddo - enddo + !BS_nk=-1 + !do i_res_ares=1,2 + !do i_H=1,BS_K_dim(1) + ! BS_nk = max(BS_blk(i_res_ares)%table(1,i_H),BS_nk) + !enddo + !enddo ! allocate(BSS_eh_table_m1(Xk%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) BSS_eh_table_m1=0 diff --git a/src/io_parallel/variables_BS_more.F b/src/io_parallel/variables_BS_more.F index 106960e3cd..a39e129727 100644 --- a/src/io_parallel/variables_BS_more.F +++ b/src/io_parallel/variables_BS_more.F @@ -8,7 +8,8 @@ integer function variables_BS_more(ID,mode) ! use pars, ONLY:IP,SP,LP,schlen,LP_YIO - use BS, ONLY:BS_K_cutoff,BS_K_cutoff_done,BS_max_val,l_BSE_kernel_complete,BS_kpt_bz + use BS, ONLY:BS_K_cutoff,BS_K_cutoff_done,BS_max_val,l_BSE_kernel_complete,& +& BS_kpt_bz,BS_kpt_ibz use IO_m, ONLY:nf90_sync,io_unit,write_is_on,read_is_on,& & variable_exist,NF90_unlimited,netcdf_dim_size use IO_int, ONLY:def_variable_elemental,io_variable_elemental,& @@ -63,6 +64,12 @@ integer function variables_BS_more(ID,mode) call def_variable_bulk(ID,"BS_K_BZ",2,shape(BS_kpt_bz),SP,kpt_dim_names) call io_variable_bulk(ID,2,R2=BS_kpt_bz) endif + if( read_is_on(ID)) io_var=trim(mode)=="start".and.variable_exist(ID,"BS_K_IBZ") + if (io_var) then + kpt_dim_names=[character(schlen) :: "xyz","n_kpt_ibz"] + call def_variable_bulk(ID,"BS_K_IBZ",2,shape(BS_kpt_ibz),SP,kpt_dim_names) + call io_variable_bulk(ID,2,R2=BS_kpt_ibz) + endif ! if(write_is_on(ID)) stat = nf90_sync(io_unit(ID)) ! diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index f5ef1ae79a..1272f3bae6 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -72,6 +72,7 @@ module BS real(SP),allocatable :: BS_K_cutoff_done(:) real(SP),allocatable :: BSqpts(:,:) real(SP),allocatable :: BS_kpt_bz(:,:) + real(SP),allocatable :: BS_kpt_ibz(:,:) integer,allocatable :: BS_K_io_map(:) ! ! Resonant/Antiresonant handling diff --git a/src/modules/mod_IO.F b/src/modules/mod_IO.F index 4b6ab420ef..8f758c8578 100644 --- a/src/modules/mod_IO.F +++ b/src/modules/mod_IO.F @@ -421,12 +421,12 @@ subroutine netcdf_call(status,ID,VAR,ID_VAR) integer function netcdf_dim_size(ID,DIMNAME) ! Returns the value of the specified dim of a variable integer, intent(in) :: ID - character(*), intent(inout) :: DIMNAME + character(*), intent(in) :: DIMNAME integer :: nf90_err,NF90_DIM_ID netcdf_dim_size=0 nf90_err=nf90_inq_dimid(io_unit(ID),DIMNAME,NF90_DIM_ID) if(nf90_err/=NF90_NOERR) return - nf90_err=nf90_inquire_dimension(io_unit(ID),NF90_DIM_ID, name = dimname, len = netcdf_dim_size) + nf90_err=nf90_inquire_dimension(io_unit(ID),NF90_DIM_ID, len = netcdf_dim_size) end function ! integer function netcdf_dim(ID,DIM,dim_name) From a65c0fd89985eea3a643ef2234a89e3a38f09cb2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 1 Mar 2024 00:39:06 +0100 Subject: [PATCH 0757/1367] Version 5.2.0, Revision 23175, Hash 0ac33beca3 MODIFIED * configure include/version/version.m4 real_time_control/RT_output.F real_time_control/RT_output_INIT.F ypp/real_time/RT_OBSERVABLES_damp_and_write.F ypp/real_time/RT_X_LRR_real_field.F Changes: - [ypp_rt] For pump and probe case only the probe is printed in output Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/real_time_control/RT_output.F | 2 +- src/real_time_control/RT_output_INIT.F | 2 +- ypp/real_time/RT_OBSERVABLES_damp_and_write.F | 2 +- ypp/real_time/RT_X_LRR_real_field.F | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 10809e514a..8011f16ccd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23174 h.54d2fbfc4a. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23175 h.0ac33beca3. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23174 h.54d2fbfc4a' -PACKAGE_STRING='Yambo 5.2.0 r.23174 h.54d2fbfc4a' +PACKAGE_VERSION='5.2.0 r.23175 h.0ac33beca3' +PACKAGE_STRING='Yambo 5.2.0 r.23175 h.0ac33beca3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23174 h.54d2fbfc4a to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23175 h.0ac33beca3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23174 h.54d2fbfc4a:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23175 h.0ac33beca3:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23174 h.54d2fbfc4a +Yambo configure 5.2.0 r.23175 h.0ac33beca3 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23174 h.54d2fbfc4a, which was +It was created by Yambo $as_me 5.2.0 r.23175 h.0ac33beca3, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23174" -SHASH="54d2fbfc4a" +SREVISION="23175" +SHASH="0ac33beca3" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23174 h.54d2fbfc4a, which was +This file was extended by Yambo $as_me 5.2.0 r.23175 h.0ac33beca3, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23174 h.54d2fbfc4a +Yambo config.status 5.2.0 r.23175 h.0ac33beca3 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 631b293c7a..c8c54af815 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23174 h.54d2fbfc4a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23175 h.0ac33beca3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23174" -SHASH="54d2fbfc4a" +SREVISION="23175" +SHASH="0ac33beca3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/RT_output.F b/src/real_time_control/RT_output.F index 697792696c..2d6db4477e 100644 --- a/src/real_time_control/RT_output.F +++ b/src/real_time_control/RT_output.F @@ -177,7 +177,7 @@ subroutine RT_output(what,VALUES,TIME,E) data_to_dump(2:4) = -real(A_tot%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 data_to_dump(5:7) =-aimag(A_tot%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 case('YPP-Field') - data_to_dump(2:4) = -real(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 + data_to_dump(2) = -real(A_ext%vecpot_vel(1))*AU2VMm1 !/SPEED_OF_LIGHT case('external_field') data_to_dump(2:4) = -real(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 data_to_dump(5:7) =-aimag(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 diff --git a/src/real_time_control/RT_output_INIT.F b/src/real_time_control/RT_output_INIT.F index 5638607476..ca3fe51de0 100644 --- a/src/real_time_control/RT_output_INIT.F +++ b/src/real_time_control/RT_output_INIT.F @@ -43,7 +43,7 @@ subroutine RT_output_INIT( ) call RT_FILE_add(name='probe-polarization',TITLES=(/"Time[fs]","Pol_x ","Pol_y ","Pol_z "/)) call RT_FILE_add(name='pump-current',TITLES=(/"Time[fs]","j_x ","j_y ","j_z "/)) call RT_FILE_add(name='pump-polarization',TITLES=(/"Time[fs]","Pol_x ","Pol_y ","Pol_z "/)) - call RT_FILE_add(name='Field',TITLES=(/"Time[fs]"," E_x "," E_y "," E_z "/)) + call RT_FILE_add(name='Field',TITLES=(/"Time[fs]"," E(t) "/)) ! do i_fp=1,3 if (i_fp==1) dumb_ch="external_field" diff --git a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F index d230c670e7..315898bb27 100644 --- a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F +++ b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F @@ -60,7 +60,7 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) do i_t=1,RT%T_n_steps if (STRING_match(OBS%title,"polarization")) RT_P=OBS%F_t(i_t,1:3) if (STRING_match(OBS%title,"current") ) RT_ind_J=OBS%F_t(i_t,1:3) - if (STRING_match(OBS%title,"Field") ) A_ext%vecpot_vel=OBS%F_t(i_t,1:3) + if (STRING_match(OBS%title,"Field") ) A_ext%vecpot_vel(1)=OBS%F_t(i_t,1) call RT_output(trim(OBS%title),TIME=RT_time(i_t)*AUT2FS) enddo call RT_output(what="close "//trim(OBS%title)) diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 1e98fd31bc..1d09bdb7fb 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -97,7 +97,7 @@ subroutine RT_X_LRR_real_field(en) ! ... FT !-------- ! - call RT_OBSERVABLES_damp_and_write(ElField,RT_conf,.true.) !(l_skip_OBS_IO.or.N_pumps==0)) + call RT_OBSERVABLES_damp_and_write(ElField,RT_conf,(l_skip_OBS_IO.or.N_pumps==0)) ! !... Analytic ... ! From 94fb4afac011a5a9f437e8f327a8c567631a6244 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 4 Mar 2024 13:28:16 +0100 Subject: [PATCH 0758/1367] Version 5.2.0, Revision 23176, Hash a65c0fd MODIFIED * modified: src/modules/mod_fields.F Bugs: - Removed non conforming tab character Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/modules/mod_fields.F | 34 +++++++++++++++++----------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 8011f16ccd..69d3ccd753 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23175 h.0ac33beca3. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23176 h.a65c0fd. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23175 h.0ac33beca3' -PACKAGE_STRING='Yambo 5.2.0 r.23175 h.0ac33beca3' +PACKAGE_VERSION='5.2.0 r.23176 h.a65c0fd' +PACKAGE_STRING='Yambo 5.2.0 r.23176 h.a65c0fd' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23175 h.0ac33beca3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23176 h.a65c0fd to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23175 h.0ac33beca3:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23176 h.a65c0fd:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23175 h.0ac33beca3 +Yambo configure 5.2.0 r.23176 h.a65c0fd generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23175 h.0ac33beca3, which was +It was created by Yambo $as_me 5.2.0 r.23176 h.a65c0fd, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23175" -SHASH="0ac33beca3" +SREVISION="23176" +SHASH="a65c0fd" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23175 h.0ac33beca3, which was +This file was extended by Yambo $as_me 5.2.0 r.23176 h.a65c0fd, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23175 h.0ac33beca3 +Yambo config.status 5.2.0 r.23176 h.a65c0fd configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c8c54af815..70ff4ef232 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23175 h.0ac33beca3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23176 h.a65c0fd, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23175" -SHASH="0ac33beca3" +SREVISION="23176" +SHASH="a65c0fd" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index b8a9be969a..064bc54578 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -199,8 +199,8 @@ function small_a(T,E_field,order,envelop_only) !endif ! DEBUG > case('FROM_FILE') - i_file=get_field_file_index(field_defs(2)) - T_0=field_from_file(1,1,i_file)*FS2AUT + i_file=get_field_file_index(field_defs(2)) + T_0=field_from_file(1,1,i_file)*FS2AUT W_0=0._SP damp_func=1._SP case('SOFTSIN','THETA') @@ -215,7 +215,7 @@ function small_a(T,E_field,order,envelop_only) case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') ! Fields which need T_0 W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP - T_0_fac=3._SP*sigma_eff + T_0_fac=3._SP*sigma_eff if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff @@ -247,30 +247,30 @@ function small_a(T,E_field,order,envelop_only) if (envelop_only_) then W_field=0._SP W_field_m1=0._SP - der_fac=0._SP + der_fac=0._SP WtimesT=fr_shift(i_field) f0t=cONE ; f1t=cONE else W_field=field_frequency(E_field,i_fr) - if(W_field> 0._SP) W_field_m1=1._SP/W_field - if(W_field==0._SP) W_field_m1=0._SP - der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) - ! - ! The frequency shift is applied in two cases - ! (i n_fields=2) to have a circular polarized pulse, and + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) ! each frequency has a different initial phase if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2._SP - ! - ! CONTROL RES / ANTIRES case + ! + ! CONTROL RES / ANTIRES case cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt ! f1t=-f0t' f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif endif - ! + ! EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) ! select case( trim(field_defs(1)) ) @@ -278,9 +278,9 @@ function small_a(T,E_field,order,envelop_only) i_T=nint((T-T_0)/(RT_dyn_step/2._SP))+1 if (order==0 ) f_now=field_from_file(i_T,2+3*(i_field-1),i_file) if (order==1 ) f_now=field_from_file(i_T,3+3*(i_field-1),i_file) - if (order==2 ) f_now=field_from_file(i_T,4+3*(i_field-1),i_file) - if (envelop_only_) f_now=0._SP - ! + if (order==2 ) f_now=field_from_file(i_T,4+3*(i_field-1),i_file) + if (envelop_only_) f_now=0._SP + ! case('STATIC') if (order==0 ) f_now=T if (order==1 ) f_now=1._SP @@ -296,7 +296,7 @@ function small_a(T,E_field,order,envelop_only) if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0)*f1t ! theta function if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1)*f1t & ! delta function - &+theta_function(sigma-T,RT_dyn_step,0)*f0t*der_fac + &+theta_function(sigma-T,RT_dyn_step,0)*f0t*der_fac ! case('SIN') if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) From 6640d9257787043756eb0ccbac1c50f3fb118de6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 4 Mar 2024 14:27:24 +0100 Subject: [PATCH 0759/1367] Version 5.2.0, Revision 23177, Hash 94fb4af MODIFIED * modified: src/modules/mod_fields.F Changes: - [yambo_rt/yambo_nl] Chirp works fine also with qsfield Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/modules/mod_fields.F | 9 ++++----- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 69d3ccd753..11924919cc 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23176 h.a65c0fd. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23177 h.94fb4af. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23176 h.a65c0fd' -PACKAGE_STRING='Yambo 5.2.0 r.23176 h.a65c0fd' +PACKAGE_VERSION='5.2.0 r.23177 h.94fb4af' +PACKAGE_STRING='Yambo 5.2.0 r.23177 h.94fb4af' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23176 h.a65c0fd to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23177 h.94fb4af to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23176 h.a65c0fd:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23177 h.94fb4af:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23176 h.a65c0fd +Yambo configure 5.2.0 r.23177 h.94fb4af generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23176 h.a65c0fd, which was +It was created by Yambo $as_me 5.2.0 r.23177 h.94fb4af, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23176" -SHASH="a65c0fd" +SREVISION="23177" +SHASH="94fb4af" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23176 h.a65c0fd, which was +This file was extended by Yambo $as_me 5.2.0 r.23177 h.94fb4af, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23176 h.a65c0fd +Yambo config.status 5.2.0 r.23177 h.94fb4af configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 70ff4ef232..d36765d1fe 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23176 h.a65c0fd, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23177 h.94fb4af, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23176" -SHASH="a65c0fd" +SREVISION="23177" +SHASH="94fb4af" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 064bc54578..324eee8c73 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -350,13 +350,12 @@ function small_a(T,E_field,order,envelop_only) if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf ! case('QSFIELD') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) ! if (order==0 ) f_now= f1t *EXPf - if (order==1 ) f_now=( W_field*f0t-(T-T_0)*f1t/sigma**2)*EXPf - if (order==2 ) f_now=(-W_field*f1t-f1t/sigma**2 & - & -W_field*(T-T_0)*f1t/sigma**2 & - & -(T-T_0)*(W_field*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf + if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf + if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & + & -der_fac*(T-T_0)*f1t/sigma**2 & + & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf ! case('PULSE') if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) From 209fa27b2fc18e13b7bc9e3d75d085b06a3776f0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 4 Mar 2024 23:37:02 +0100 Subject: [PATCH 0760/1367] Version 5.2.0, Revision 23178, Hash 6640d92577 MODIFIED * configure include/version/version.m4 modules/mod_fields.F real_time_initialize/RT_field_from_file.F Changes: - [yambo_rt] Simulation with field from file is working It still needs that numerical field has the same time step (or tiwce for RK2 integrator) of the real time propagation Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/modules/mod_fields.F | 11 ++++++---- src/real_time_initialize/RT_field_from_file.F | 4 ++-- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 11924919cc..e7e3ccc552 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23177 h.94fb4af. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23178 h.6640d92577. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23177 h.94fb4af' -PACKAGE_STRING='Yambo 5.2.0 r.23177 h.94fb4af' +PACKAGE_VERSION='5.2.0 r.23178 h.6640d92577' +PACKAGE_STRING='Yambo 5.2.0 r.23178 h.6640d92577' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23177 h.94fb4af to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23178 h.6640d92577 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23177 h.94fb4af:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23178 h.6640d92577:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23177 h.94fb4af +Yambo configure 5.2.0 r.23178 h.6640d92577 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23177 h.94fb4af, which was +It was created by Yambo $as_me 5.2.0 r.23178 h.6640d92577, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23177" -SHASH="94fb4af" +SREVISION="23178" +SHASH="6640d92577" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23177 h.94fb4af, which was +This file was extended by Yambo $as_me 5.2.0 r.23178 h.6640d92577, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23177 h.94fb4af +Yambo config.status 5.2.0 r.23178 h.6640d92577 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d36765d1fe..187d453a3f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23177 h.94fb4af, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23178 h.6640d92577, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23177" -SHASH="94fb4af" +SREVISION="23178" +SHASH="6640d92577" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 324eee8c73..0ee00a2932 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -276,10 +276,13 @@ function small_a(T,E_field,order,envelop_only) select case( trim(field_defs(1)) ) case('FROM_FILE') i_T=nint((T-T_0)/(RT_dyn_step/2._SP))+1 - if (order==0 ) f_now=field_from_file(i_T,2+3*(i_field-1),i_file) - if (order==1 ) f_now=field_from_file(i_T,3+3*(i_field-1),i_file) - if (order==2 ) f_now=field_from_file(i_T,4+3*(i_field-1),i_file) - if (envelop_only_) f_now=0._SP + if (i_T<=0.or.envelop_only_) then + f_now=0 + else + if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) + if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) + if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) + endif ! case('STATIC') if (order==0 ) f_now=T diff --git a/src/real_time_initialize/RT_field_from_file.F b/src/real_time_initialize/RT_field_from_file.F index 2118864293..1ebd984dc6 100644 --- a/src/real_time_initialize/RT_field_from_file.F +++ b/src/real_time_initialize/RT_field_from_file.F @@ -32,7 +32,7 @@ subroutine RT_load_field_from_file_init(filename) ! integer :: n_time_steps ! - open(unit=99,file=trim(com_path)//"/"//trim(filename)) + open(unit=99,file=trim(filename)) read(99,*) n_time_steps close(99) field_from_file_steps=max(field_from_file_steps,n_time_steps) @@ -67,7 +67,7 @@ subroutine RT_load_field_from_file(filename,i_field) allocate(field_from_file(field_from_file_steps,7,n_ext_fields_max)) field_from_file=0._SP endif - open(unit=99,file=trim(com_path)//"/"//trim(filename)) + open(unit=99,file=trim(filename)) read(99,*) n_time_steps do i1=1,n_time_steps read(99,*) field_from_file(i1,:,i_field_file) From 5c23acf598ff1f6e9b129682d07a96343bab40b7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 6 Mar 2024 14:17:51 +0100 Subject: [PATCH 0761/1367] Version 5.2.0, Revision 23261, Hash 7437d11d3e MODIFIED * configure include/version/version.m4 bse/K_kernel.F Changes: - Improved comment in terminal Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_kernel.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f71dc63d90..6ac245968f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23260 h.43cf436a24. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23261 h.7437d11d3e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23260 h.43cf436a24' -PACKAGE_STRING='Yambo 5.2.0 r.23260 h.43cf436a24' +PACKAGE_VERSION='5.2.0 r.23261 h.7437d11d3e' +PACKAGE_STRING='Yambo 5.2.0 r.23261 h.7437d11d3e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23260 h.43cf436a24 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23261 h.7437d11d3e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23260 h.43cf436a24:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23261 h.7437d11d3e:";; esac cat <<\_ACEOF @@ -1881,7 +1881,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23260 h.43cf436a24 +Yambo configure 5.2.0 r.23261 h.7437d11d3e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2510,7 +2510,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23260 h.43cf436a24, which was +It was created by Yambo $as_me 5.2.0 r.23261 h.7437d11d3e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3268,8 +3268,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23260" -SHASH="43cf436a24" +SREVISION="23261" +SHASH="7437d11d3e" @@ -16601,7 +16601,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23260 h.43cf436a24, which was +This file was extended by Yambo $as_me 5.2.0 r.23261 h.7437d11d3e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16665,7 +16665,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23260 h.43cf436a24 +Yambo config.status 5.2.0 r.23261 h.7437d11d3e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5edeb4597c..e781bb8de8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23260 h.43cf436a24, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23261 h.7437d11d3e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23260" -SHASH="43cf436a24" +SREVISION="23261" +SHASH="7437d11d3e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index b758b4c52a..4033b7440b 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -7,7 +7,7 @@ ! subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! - ! K = <2V-W> for n_spin=1 + ! K = <2V-W> for n_spin=1; K= for n_spin>1 ! use pars, ONLY:SP,schlen,pi,cZERO,cI use LOGO, ONLY:pickup_a_random From 50bdb7685297c2864592e67c32e9eddbb70f9c9d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 6 Mar 2024 18:41:55 +0100 Subject: [PATCH 0762/1367] Version 5.2.0, Revision 23179, Hash 209fa27b2f MODIFIED * configure include/version/version.m4 real_time_initialize/RT_initialize.F Bugs: - [yambo_rt] Fixed value of Fluence in report Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/real_time_initialize/RT_initialize.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index e7e3ccc552..ba6082e1a3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23178 h.6640d92577. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23179 h.209fa27b2f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23178 h.6640d92577' -PACKAGE_STRING='Yambo 5.2.0 r.23178 h.6640d92577' +PACKAGE_VERSION='5.2.0 r.23179 h.209fa27b2f' +PACKAGE_STRING='Yambo 5.2.0 r.23179 h.209fa27b2f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23178 h.6640d92577 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23179 h.209fa27b2f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23178 h.6640d92577:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23179 h.209fa27b2f:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23178 h.6640d92577 +Yambo configure 5.2.0 r.23179 h.209fa27b2f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23178 h.6640d92577, which was +It was created by Yambo $as_me 5.2.0 r.23179 h.209fa27b2f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23178" -SHASH="6640d92577" +SREVISION="23179" +SHASH="209fa27b2f" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23178 h.6640d92577, which was +This file was extended by Yambo $as_me 5.2.0 r.23179 h.209fa27b2f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23178 h.6640d92577 +Yambo config.status 5.2.0 r.23179 h.209fa27b2f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 187d453a3f..baba96d585 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23178 h.6640d92577, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23179 h.209fa27b2f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23178" -SHASH="6640d92577" +SREVISION="23179" +SHASH="209fa27b2f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 0d291984e0..f7fe662e2e 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -485,7 +485,7 @@ subroutine RT_initialize(E,k,q) call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then - call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence,'[nJ/cm^2]') + call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') call msg('r', trim(MSG_ch)//' area at selected Rabi trans.',Efield(i1)%pi_kind ) call msg('r', trim(MSG_ch)//' final time ',Efield(i1)%t_final*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' half maximum full width ',Efield(i1)%width*2.*sqrt(2.*log(2.))*AUT2FS,'[fs]') From 58283a0ff9093aa84765b664337dfbdaf27dda28 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 10 Mar 2024 11:38:05 +0100 Subject: [PATCH 0763/1367] Version 5.2.0, Revision 23481, Hash 96759d2753 MODIFIED * config/mk/global/libraries.mk driver/yambo.F include/version/version.m4 bse/.objects bse/DOUBLE_project.dep bz_ops/.objects bz_ops/DOUBLE_project.dep bz_ops/k_build_up_BZ_tables.F bz_ops/k_expand.F exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval_ber.F exc-ph/EXCPH_gkkp_eval_pal.F io/DOUBLE_project.dep modules/mod_BS_solvers.F modules/mod_EXCPH.F modules/mod_R_lattice.F modules/mod_electrons.F modules/mod_interfaces.F modules/mod_wave_func.F tools/DOUBLE_project.dep wf_and_fft/.objects wf_and_fft/DOUBLE_project.dep ypp/symmetries/k_build_map.F NEW * bse/BSE_utilities.F bz_ops/k_small_group.F io/io_WF_phases.F wf_and_fft/EXC_WF_symm_qpoint.F wf_and_fft/WF_phase_matrices.F wf_and_fft/WF_symm_kpoint_g.F Changes: - WF_phases imported from branch phys-excitons Patch sent by: Davide Sangalli --- config/mk/global/libraries.mk | 4 +- driver/yambo.F | 11 +- include/version/version.m4 | 6 +- src/bse/.objects | 2 +- src/bse/BSE_utilities.F | 38 +++++ src/bse/DOUBLE_project.dep | 1 + src/bz_ops/.objects | 2 +- src/bz_ops/DOUBLE_project.dep | 1 + src/bz_ops/k_build_up_BZ_tables.F | 28 +++- src/bz_ops/k_expand.F | 4 +- src/bz_ops/k_small_group.F | 58 +++++++ src/exc-ph/EXCPH_gkkp_driver.F | 26 +--- src/exc-ph/EXCPH_gkkp_eval_ber.F | 8 +- src/exc-ph/EXCPH_gkkp_eval_pal.F | 8 +- src/io/DOUBLE_project.dep | 1 + src/io/io_WF_phases.F | 88 +++++++++++ src/modules/mod_BS_solvers.F | 1 + src/modules/mod_EXCPH.F | 9 +- src/modules/mod_R_lattice.F | 40 +++++ src/modules/mod_electrons.F | 2 + src/modules/mod_interfaces.F | 7 + src/modules/mod_wave_func.F | 14 ++ src/tools/DOUBLE_project.dep | 1 - src/wf_and_fft/.objects | 7 +- src/wf_and_fft/DOUBLE_project.dep | 3 + src/wf_and_fft/EXC_WF_symm_qpoint.F | 199 ++++++++++++++++++++++++ src/wf_and_fft/WF_phase_matrices.F | 229 ++++++++++++++++++++++++++++ src/wf_and_fft/WF_symm_kpoint_g.F | 86 +++++++++++ ypp/symmetries/k_build_map.F | 2 +- 29 files changed, 822 insertions(+), 64 deletions(-) create mode 100644 src/bse/BSE_utilities.F create mode 100644 src/bz_ops/k_small_group.F create mode 100644 src/io/io_WF_phases.F create mode 100644 src/wf_and_fft/EXC_WF_symm_qpoint.F create mode 100644 src/wf_and_fft/WF_phase_matrices.F create mode 100644 src/wf_and_fft/WF_symm_kpoint_g.F diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 1fdb105589..19c41f2365 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -27,14 +27,14 @@ YLIBIO_LD = $(YLIBIO) # BASIC_LIBS = driver tools modules memory allocations matrices linear_algebra parallel parser communicate output common timing Yio io $(IO_MODE) \ xc_functionals interface stop_and_restart wf_and_fft bz_ops coulomb -BASIC_LIBS_LD= tools memory allocations communicate modules matrices linear_algebra bz_ops parallel parser output common timing Yio io $(IO_MODE) \ +BASIC_LIBS_LD= tools memory allocations communicate modules matrices linear_algebra common bz_ops parallel parser output timing Yio io $(IO_MODE) \ xc_functionals interface stop_and_restart wf_and_fft coulomb MAIN_LIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse MAIN_LIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse PJ_PHLIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function el-ph exc-ph qp acfdt bse -PJ_PHLIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function el-ph exc-ph qp acfdt bse +PJ_PHLIBS_LD = $(BASIC_LIBS_LD) interpolate qp_control setup tddft dipoles pol_function el-ph bse exc-ph qp acfdt PJ_SCLIBS = $(MAIN_LIBS) collisions hamiltonian sc PJ_SCLIBS_LD = $(MAIN_LIBS_LD) hamiltonian collisions sc diff --git a/driver/yambo.F b/driver/yambo.F index e628c6d90e..75127c5b2d 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -218,14 +218,9 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! EXCITON-PHONON ! =============== #if defined _ELPH && !defined _RT - driver_now=l_EXCPH_gkkp - if (driver_now) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) - ! - driver_now=l_EXCPH_optics - if(driver_now) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) - ! - driver_now=l_EXCPH_lifetime - if(driver_now) call EXCPH_lifetime(Xk,q,X(i_X_kind)) + if (l_EXCPH_gkkp) call EXCPH_gkkp_driver(Ken,Xk,q,X(i_X_kind)) + if (l_EXCPH_optics) call EXCPH_optics(Ken,Xk,q,X(i_X_kind),Xw(3)) + if (l_EXCPH_lifetime) call EXCPH_lifetime(Xk,q,X(i_X_kind)) #endif ! ! diff --git a/include/version/version.m4 b/include/version/version.m4 index a373d16fe0..1362bb695e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.22598 h.490979cc2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23481 h.96759d2753, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="22598" -SHASH="490979cc2" +SREVISION="23481" +SHASH="96759d2753" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/.objects b/src/bse/.objects index c701b1d97b..e5550ad7a4 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -10,7 +10,7 @@ SLK_objects = K_inversion_do_it_SLK.o #endif objs = K_blocks.o K_driver_init.o K_dipoles.o K_IP.o K_IP_sort.o \ K_Transitions_setup.o K_Transition_check.o \ - K_driver.o \ + K_driver.o BSE_utilities.o \ K_WF_phases.o \ K.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_exchange_kernel.o \ diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F new file mode 100644 index 0000000000..c639d34e8b --- /dev/null +++ b/src/bse/BSE_utilities.F @@ -0,0 +1,38 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2023 The Yambo Team +! +! Authors (see AUTHORS file for details): AM MG DS +! +subroutine build_inverse_eh_table(nk) + ! + use electrons, ONLY:n_sp_pol + use BS, ONLY:BS_H_dim,BS_bands + use BS_solvers, ONLY:BSS_eh_table,BSS_eh_table_m1 + ! + implicit none + ! + integer, intent(in) :: nk + ! + integer :: iv,ic,i_H,ik_bz + ! + if (.not.allocated(BSS_eh_table_m1)) then + allocate(BSS_eh_table_m1(nk,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) + BSS_eh_table_m1=0 + endif + !call live_timing('BSE inverse eh-table',BS_H_dim) + ! + do i_H=1,BS_H_dim + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + ! + BSS_eh_table_m1(ik_bz,iv,ic,1,1)=i_H + !call live_timing(steps=1) + ! + enddo + !call live_timing( ) + ! +end subroutine build_inverse_eh_table diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 8f64bfaf01..3e07745476 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -1,3 +1,4 @@ + BSE_utilities.o EPS_via_perturbative_inversion.o K.o K_Haydock.o diff --git a/src/bz_ops/.objects b/src/bz_ops/.objects index c8824fdfaf..ec8e8a3ffa 100644 --- a/src/bz_ops/.objects +++ b/src/bz_ops/.objects @@ -1,2 +1,2 @@ objs = k_lattice.o k_expand.o k_ibz2bz.o k_reduce.o k_build_up_BZ_tables.o \ - bz_samp_indexes.o k_the_nearest.o k_map_nearest_by_dir.o + k_small_group.o bz_samp_indexes.o k_the_nearest.o k_map_nearest_by_dir.o diff --git a/src/bz_ops/DOUBLE_project.dep b/src/bz_ops/DOUBLE_project.dep index 19ed906216..604673dfc2 100644 --- a/src/bz_ops/DOUBLE_project.dep +++ b/src/bz_ops/DOUBLE_project.dep @@ -5,5 +5,6 @@ k_lattice.o k_map_nearest_by_dir.o k_reduce.o + k_small_group.o k_the_nearest.o diff --git a/src/bz_ops/k_build_up_BZ_tables.F b/src/bz_ops/k_build_up_BZ_tables.F index 17f0580973..6ff2ee4814 100644 --- a/src/bz_ops/k_build_up_BZ_tables.F +++ b/src/bz_ops/k_build_up_BZ_tables.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2015 The Yambo Team ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS ! subroutine k_build_up_BZ_tables(k) ! @@ -11,7 +11,7 @@ subroutine k_build_up_BZ_tables(k) ! ! s_table such that ! - ! R k_ibz = S k_ibz with S=k%s_table(k,R) + ! R k_ibz = S k_ibz with S=k%s_table(k,R) ! R k_ibz = k_bz with k_bz=k%k_table(k,R) ! use pars, ONLY:SP @@ -26,17 +26,23 @@ subroutine k_build_up_BZ_tables(k) ! Work Space ! integer ::i1,i2,is1 - logical ::s_table_is_ok,k_table_is_ok + logical ::s_table_is_ok,k_table_is_ok,g_table_is_ok real(SP) ::v(3) ! + integer, external :: G_index + ! s_table_is_ok=.FALSE. k_table_is_ok=.FALSE. + g_table_is_ok=.FALSE. if (allocated(k%s_table)) then if (size(k%s_table)==k%nibz*nsym) s_table_is_ok=.TRUE. endif if (allocated(k%k_table)) then if (size(k%k_table)==k%nibz*nsym) k_table_is_ok=.TRUE. endif + if (allocated(k%g_table)) then + if (size(k%g_table)==k%nibz*nsym) g_table_is_ok=.TRUE. + endif if (.not.k_table_is_ok) then YAMBO_FREE(k%k_table) YAMBO_ALLOC(k%k_table,(k%nibz,nsym)) @@ -45,6 +51,11 @@ subroutine k_build_up_BZ_tables(k) YAMBO_FREE(k%s_table) YAMBO_ALLOC(k%s_table,(k%nibz,nsym)) endif + if (.not.g_table_is_ok) then + YAMBO_FREE(k%g_table) + YAMBO_ALLOC(k%g_table,(k%nibz,nsym)) + k%g_table=1 + endif ! call k_ibz2bz(k,'a',.false.) k%s_table=0 @@ -53,11 +64,12 @@ subroutine k_build_up_BZ_tables(k) do is1=1,nsym call c2a(v_in=matmul(rl_sop(:,:,is1),k%pt(i1,:)),v_out=v,mode='ki2a') do i2=1,k%nbz - if (rlu_v_is_zero(v-k%ptbz(i2,:),zero_=k_rlu_zero)) then - k%s_table(i1,is1)=k%sstar(i2,2) - k%k_table(i1,is1)=i2 - exit - endif + if ( .not.rlu_v_is_zero(v-k%ptbz(i2,:),zero_=k_rlu_zero) ) cycle + k%s_table(i1,is1)=k%sstar(i2,2) + k%k_table(i1,is1)=i2 + call c2a(v_in=(v-k%ptbz(i2,:)),v_out=v,mode='ka2i') + k%g_table(i1,is1)=G_index(v) + exit enddo enddo enddo diff --git a/src/bz_ops/k_expand.F b/src/bz_ops/k_expand.F index 663b9077ac..168d2dcefc 100644 --- a/src/bz_ops/k_expand.F +++ b/src/bz_ops/k_expand.F @@ -90,12 +90,12 @@ subroutine k_expand(k) k%weights(:)=k%weights(:)/sum(k%weights) k%nbz=sum(k%nstar(:)) ! - YAMBO_ALLOC(k%sstar,(k%nbz,2)) + YAMBO_ALLOC(k%sstar,(k%nbz,3)) i2=0 do i1=1,k%nibz do is=1,k%nstar(i1) i2=i2+1 - k%sstar(i2,:)=(/i1,k%star(i1,is)/) + k%sstar(i2,:)=(/i1,k%star(i1,is),is/) enddo enddo ! diff --git a/src/bz_ops/k_small_group.F b/src/bz_ops/k_small_group.F new file mode 100644 index 0000000000..06d5de070f --- /dev/null +++ b/src/bz_ops/k_small_group.F @@ -0,0 +1,58 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine k_small_group(k) + ! + ! Outputs: + ! + ! k%grp_table k%grp_nsym + ! + !Given the kpoints and the simmetry operations + !this sub. computes which symmetries belong to the small group of k + ! + use pars, ONLY:SP + use vec_operate, ONLY:rlu_v_is_zero,c2a,k2bz + use D_lattice, ONLY:nsym + use R_lattice, ONLY:rl_sop,bz_samp + use zeros, ONLY:k_rlu_zero + ! +#include + ! + type(bz_samp)::k + ! + ! Work Space + ! + integer :: ik,is,istark,ikbz,isk + real(SP) :: kref(3),krot(3) + ! + if (allocated(k%grp_table)) return + ! + YAMBO_ALLOC(k%grp_nsym,(k%nbz)) + YAMBO_ALLOC(k%grp_table,(nsym,k%nbz)) + YAMBO_ALLOC(k%grp_table_m1,(nsym,k%nbz)) + ! + k%grp_nsym=0 + k%grp_table=-1 + k%grp_table_m1=-1 + do ik=1,k%nibz + do istark=1,k%nstar(ik) + isk =k%star(ik,istark) + ikbz=k%k_table(ik,isk) + do is=1,nsym + kref=k%ptbz(ikbz,:) + call c2a(v_in=kref,mode='ki2a') + krot=matmul(rl_sop(:,:,is),k%ptbz(ikbz,:)) + call c2a(v_in=krot,mode='ki2a') + if (.not.rlu_v_is_zero(krot-kref,zero_=k_rlu_zero)) cycle + k%grp_nsym(ikbz)=k%grp_nsym(ikbz)+1 + k%grp_table(k%grp_nsym(ikbz),ikbz)=is + k%grp_table_m1(is,ikbz)=k%grp_nsym(ikbz) + enddo + enddo + enddo + ! +end subroutine diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 0cc0ed74ed..455939e293 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -38,14 +38,14 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use R_lattice, ONLY:bz_samp,qindx_B !_load use parser_m, ONLY:parser use X_m, ONLY:X_t - use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig,BSS_alloc,BSS_free + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BS_H_dim,BSS_n_eig,BSS_alloc,BSS_free use BS, ONLY:BS_H_dim,BS_bands,BSqpts use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END,manage_action use IO_int, ONLY:io_control use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& -& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,build_Q_map,EXCPH_q, & +& EXCPH_states,EXCPH_sum,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & & n_exc_in,EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free use LIVE_t, ONLY:live_timing @@ -165,13 +165,13 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! BSS_eh_table_m1 ! - call build_inverse_eh_table() + call build_inverse_eh_table(k%nbz) ! ! Save the Lin in information ! BS_mat_in =BS_mat(:,EXCPH_states(1):EXCPH_states(2)) BSS_eh_table_in =BSS_eh_table - BSS_eh_table_m1_in=BSS_eh_table_m1 + BSS_eh_table_m1_in=BSS_eh_table_m1(:,:,:,1,1) BS_E_in =BS_E ! ! Open gkkp_expanded @@ -351,24 +351,6 @@ subroutine build_k_plus_q_table() ! end subroutine build_k_plus_q_table ! - subroutine build_inverse_eh_table() - ! - integer :: iv,ic,i_H,ik_bz - ! - call live_timing('BSE inverse eh-table',BS_H_dim) - do i_H=1,BS_H_dim - ! - ik_bz = BSS_eh_table(i_H,1) - iv = BSS_eh_table(i_H,2) - ic = BSS_eh_table(i_H,3) - ! - BSS_eh_table_m1(ik_bz,iv,ic)=i_H - call live_timing(steps=1) - ! - enddo - call live_timing( ) - ! - end subroutine build_inverse_eh_table ! subroutine compare_qindxC_table() ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F index b5aa892061..0050212310 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ b/src/exc-ph/EXCPH_gkkp_eval_ber.F @@ -32,14 +32,14 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) use pars, ONLY:SP,cZERO,rZERO,cONE use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev use R_lattice, ONLY:bz_samp,qindx_C - use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_free + use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,& -& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& +& EXCPH_states,EXCPH_sum,k_plus_q_table,& & l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in ! #include @@ -118,7 +118,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! do icp=BS_bands(1),BS_bands(2) ! - i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) + i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) ! if (i_Hp==0) cycle ! @@ -150,7 +150,7 @@ subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) ! do ivp=BS_bands(1),BS_bands(2) ! - i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) + i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic,1,1) ! if (i_Hp==0) cycle ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_pal.F b/src/exc-ph/EXCPH_gkkp_eval_pal.F index 361cb99eed..4dfea16b2a 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_pal.F +++ b/src/exc-ph/EXCPH_gkkp_eval_pal.F @@ -33,7 +33,7 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !use electrons, ONLY:levels use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev use R_lattice, ONLY:bz_samp,qindx_C - use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_free + use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table_m1,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control @@ -41,7 +41,7 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& -& EXCPH_states,EXCPH_sum,BSS_eh_table_m1,k_plus_q_table,& +& EXCPH_states,EXCPH_sum,k_plus_q_table,& & l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only ! #include @@ -124,7 +124,7 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (l_elec_only) exit ! - i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic) + i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic,1,1) if (i_Hp==0) cycle ! ! [NB] Here we apply the conj and SWAP band indices in the matrix elements @@ -163,7 +163,7 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (l_hole_only) exit ! - i_Hp=BSS_eh_table_m1(ip_bz,iv,icp) + i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) if (i_Hp==0) cycle ! [NB] Here we apply the conj and SWAP band indices in the matrix elements ! Notes: (icp,ic) => Code: (ic,icp) diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index 25f675ca85..78b2db7907 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -34,6 +34,7 @@ io_USPP_pwscf.o io_Vnl.o io_WF.o + io_WF_phases.o io_X.o io_descriptors.o io_gFsq.o diff --git a/src/io/io_WF_phases.F b/src/io/io_WF_phases.F new file mode 100644 index 0000000000..35e1568d70 --- /dev/null +++ b/src/io/io_WF_phases.F @@ -0,0 +1,88 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2011 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +integer function io_WF_phases(nb,ik,istark,i_sp_pol,ID,nsz,WF_phases) + ! + use R_lattice, ONLY:nXkibz + use D_lattice, ONLY:nsym + use electrons, ONLY:n_sp_pol,n_max_deg + use pars, ONLY:schlen,SP,SP_YIO,IP_YIO + use IO_m, ONLY:io_sec,io_extension,read_is_on + use IO_int, ONLY:io_connect,io_disconnect,io_fragment,def_variable_bulk,& +& io_variable_bulk,io_header,def_variable_elemental,io_variable_elemental + use wave_func, ONLY:WF_phases_b_map + use timing_m, ONLY:timing + ! + implicit none + ! + integer :: nb(2),ik,istark,i_sp_pol,ID + integer, intent(in) :: nsz(5) + complex(SP), optional :: WF_phases(:,:,:,:,:) + ! + ! Work Space + ! + integer :: VAR_ID,VAR_SIZE(6),VAR_POS(6),i_fragment,ID_frag + character(schlen) :: VAR_name + ! + call timing('io_WF_phases',OPR='start') + ! + io_extension(ID)='wf_phases' + ! + io_WF_phases=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID) + if (io_WF_phases/=0) goto 1 + ! + if (io_sec(ID,1)==0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + io_WF_phases=io_header(ID,R_LATT=.true.,WF=.true.,IMPOSE_SN=.true.,TEMP=.true.) + if (io_WF_phases/=0) goto 1 + ! + call def_variable_elemental(ID,"nbands",2,IP_YIO,0) + call io_variable_elemental(ID,VAR="Number of bands",I1=nb,CHECK=.true.,OP=(/"==","=="/)) + !call io_variable_elemental(ID,VAR="Number of bands",I1=nb,CHECK=.true.,OP=(/">=","<="/)) + ! + endif + ! + ! WF_phases_b_map + ! + if (any((/io_sec(ID,:)==2/))) then + VAR_ID=2 + VAR_name='WF_phases_b_map' + call def_variable_bulk(ID,trim(VAR_name),VAR_ID,shape(WF_phases_b_map),IP_YIO) + call io_variable_bulk(ID,VAR_ID,I4=WF_phases_b_map) + ! + endif + ! + ! WF_phases + ! + if (any((/io_sec(ID,:)==3/))) then + ! + ! Fragmentation + ! + i_fragment=ik+(i_sp_pol-1)*nXkibz + call io_fragment(ID,ID_frag,i_fragment=i_fragment) + ! + VAR_ID=1 + VAR_name='WF_phases' + VAR_SIZE=(/2,nsz(1),nsz(2),nsz(3),nsz(4),nsz(5)/) + !VAR_SIZE=(/2,shape(WF_phases)/) + VAR_POS=(/1,1,1,1,1,1/) + if(istark>0) VAR_POS=(/1,1,1,1,1,istark/) + ! + call def_variable_bulk(ID_frag,trim(VAR_name),VAR_ID,VAR_SIZE,SP_YIO) + call io_variable_bulk(ID_frag,VAR_ID,C5=WF_phases,IPOS=VAR_POS) + ! + call io_fragment_disconnect(ID,ID_frag) + ! + endif + ! +1 call io_disconnect(ID=ID) + ! + call timing('io_WF_phases',OPR='stop') + ! +end function diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 2959deb491..d4ce3d0a72 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -125,6 +125,7 @@ module BS_solvers ! Solvers (Temporary (LARGE) arrays to be used in solvers ONLY) !========= integer , allocatable :: BSS_eh_table(:,:) + integer , allocatable :: BSS_eh_table_m1(:,:,:,:,:) real(SP) , allocatable :: BSS_eh_E(:) real(SP) , allocatable :: BSS_eh_f(:) real(SP) , allocatable :: BSS_eh_W(:) diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 232e5e7a57..9c9859c96b 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -64,7 +64,8 @@ module EXCPH ! ExcPH gkkp ! complex(SP), allocatable :: A_rot(:,:),Xi(:,:) - integer, allocatable :: BSS_eh_table_m1(:,:,:),BSS_eh_table_m1_in(:,:,:),k_plus_q_table(:,:) + integer, allocatable :: BSS_eh_table_m1_in(:,:,:) + integer, allocatable :: k_plus_q_table(:,:) complex(SP), allocatable :: BS_E_in(:),BS_E(:) real(SP), allocatable :: BS_all_E(:,:) complex(SP), allocatable :: BS_mat_in(:,:) @@ -216,7 +217,7 @@ end subroutine RESIDUALS_and_EIGENVALUES_alloc subroutine BSE_alloc(k,q) ! use electrons, ONLY:n_sp_pol - use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BS_H_dim,BSS_n_eig use BS, ONLY:BS_H_dim,BS_bands,BSqpts use R_lattice, ONLY:bz_samp ! @@ -227,7 +228,7 @@ subroutine BSE_alloc(k,q) ! pre-allocs... ! YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) - YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),1,1)) ! if(.not.allocated(BS_E)) then YAMBO_ALLOC(BS_E,(BSS_n_eig)) @@ -244,7 +245,7 @@ subroutine BSE_alloc(k,q) end subroutine BSE_alloc ! subroutine BSE_free - use BS_solvers, ONLY:BS_mat,BSS_eh_table,BS_H_dim,BSS_n_eig + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BS_H_dim,BSS_n_eig use BS, ONLY:BSqpts ! #include diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 7a7dcc5037..b3d6071f6b 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -66,8 +66,13 @@ module R_lattice ! Below "is" can be any symmetry operation, while is_used integer, allocatable :: star(:,:) ! ik,ikstar --> is_used is_used sends ik in ikstar integer, allocatable :: sstar(:,:) ! ik_bz --> ik,is_used is_used sends ik in ikbz + ! istar added dimension 3, index in the star integer, allocatable :: s_table(:,:) ! ik,is --> is_used revers of sstar(2) integer, allocatable :: k_table(:,:) ! ik,is --> ik_bz revers of sstar(1) + integer, allocatable :: g_table(:,:) ! ik,is --> ig_index + integer, allocatable :: grp_table(:,:)! ik,is_grp --> is table of syms from small group to full list + integer, allocatable :: grp_table_m1(:,:)! ik,is --> is_grp table of syms from full list to small group + integer, allocatable :: grp_nsym(:) ! ik --> is number of syms in the small group real(SP), allocatable :: pt(:,:) real(SP), allocatable :: ptbz(:,:) real(SP), allocatable :: weights(:) @@ -125,13 +130,16 @@ module R_lattice integer :: ng_closed ! Number of G closed integer ,allocatable :: ng_in_shell(:) ! Number of G in each shell integer ,allocatable :: g_rot(:,:) + real(SP),allocatable :: g_phs(:,:) integer ,allocatable :: G_m_G(:,:) integer ,allocatable :: minus_G(:) + integer ,allocatable :: G_mod_indx(:) real(SP),allocatable :: g_vec(:,:) real(SP),allocatable :: E_of_shell(:) ! Energy associated at each shell ! GPUs real(SP),allocatable DEV_ATTR :: g_vec_d(:,:) integer ,allocatable DEV_ATTR :: g_rot_d(:,:) + real(SP),allocatable DEV_ATTR :: g_phs_d(:,:) integer ,allocatable DEV_ATTR :: G_m_G_d(:,:) integer ,allocatable DEV_ATTR :: minus_G_d(:) ! @@ -386,7 +394,39 @@ subroutine bz_samp_duplicate(BZi, BZo) endif ! end subroutine bz_samp_duplicate + ! + subroutine bz_samp_duplicate_nosymm(BZi, BZo) + type(bz_samp), intent(in) :: BZi + type(bz_samp), intent(inout) :: BZo + integer :: ik + ! + BZo%nibz = BZi%nbz + BZo%nbz = BZi%nbz + BZo%units = BZi%units + BZo%description = BZi%description ! + YAMBO_ALLOC(BZo%pt,(BZo%nibz,3)) + BZo%pt(:,:) = BZi%ptbz(:,:) + ! + YAMBO_ALLOC(BZo%nstar,(BZo%nibz)) + BZo%nstar=1 + ! + YAMBO_ALLOC(BZo%weights,(BZo%nibz)) + BZo%weights=1._SP + ! + YAMBO_ALLOC(BZo%star,(BZo%nibz,1)) + BZo%star=1 + ! + YAMBO_ALLOC(BZo%sstar,(BZo%nbz,2)) + do ik=1,BZo%nbz + BZo%sstar(ik,1)=ik + BZo%sstar(ik,2)=1 + enddo + ! + YAMBO_ALLOC(BZo%ptbz,(BZo%nbz,3)) + BZo%ptbz=BZi%ptbz + end subroutine bz_samp_duplicate_nosymm + ! subroutine bz_samp_duplicate_Fg(FGi,FGo,N_coarse) type(bz_fine_grid), intent(in) ::FGi type(bz_fine_grid), intent(out) ::FGo diff --git a/src/modules/mod_electrons.F b/src/modules/mod_electrons.F index 7ecfbb77e7..a141f0bdea 100644 --- a/src/modules/mod_electrons.F +++ b/src/modules/mod_electrons.F @@ -37,6 +37,8 @@ module electrons integer :: n_spin_den logical :: l_spin_orbit ! + integer, parameter :: n_max_deg=4 + ! ! Average magnetization density ! logical :: eval_magn diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index b090186774..3ca75a0f8b 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -267,6 +267,13 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) type(tddft_wf_t), target, intent(inout) :: tddft_wf end function TDDFT_ALDA_R_space ! + subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) + use wave_func, ONLY:WAVEs + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0 + type (WAVEs), target, intent(inout) :: WF + end subroutine WF_symm_kpoint_g + ! end interface ! interface WF_shift_kpoint diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 0f90d5a77b..62b7013083 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -76,6 +76,11 @@ module wave_func integer, allocatable DEV_ATTR :: wf_igk_d(:,:) logical :: wf_norm_test ! + ! Wave function phases + ! + integer, allocatable :: WF_phases_b_map(:,:,:,:) + complex(SP), allocatable :: WF_phases(:,:,:,:,:) + ! interface ! integer function io_WF_old(ID,wf_old) @@ -91,6 +96,15 @@ integer function io_WF(ID,wf,wf_d) complex(SP), optional DEV_ATTR :: wf_d(:,:,:) end function ! + integer function io_WF_phases(nb,ik,istark,i_sp_pol,ID,nsz,WF_phases) + use pars, ONLY: SP + use electrons, ONLY: n_max_deg + use D_lattice, ONLY: nsym + integer :: nb(2),ik,istark,i_sp_pol,ID + integer, intent(in) :: nsz(5) + complex(SP), optional :: WF_phases(:,:,:,:,:) + end function io_WF_phases + ! function WF_symm(ifft,isc) use pars, ONLY: SP use electrons, ONLY: n_spinor diff --git a/src/tools/DOUBLE_project.dep b/src/tools/DOUBLE_project.dep index dc16020ddd..047823828f 100644 --- a/src/tools/DOUBLE_project.dep +++ b/src/tools/DOUBLE_project.dep @@ -4,6 +4,5 @@ ct_etime.o io.o memstat.o - objects.o stack.o diff --git a/src/wf_and_fft/.objects b/src/wf_and_fft/.objects index eaf07345a3..700d6f5c42 100644 --- a/src/wf_and_fft/.objects +++ b/src/wf_and_fft/.objects @@ -26,10 +26,11 @@ WF_der_objects = WF_derivative.o FFT_cuda = fft_3d_cuda.o #endif objs = fft_setup.o fft_free.o $(FFT_object) $(FFT_more) $(FFT_cuda) scatter_Bamp_using_the_gradient.o \ - fft_check_size.o WF_free.o WF_alloc.o WF_shift_kpoint.o WF_symm_kpoint_incl.o \ + fft_check_size.o WF_free.o WF_alloc.o WF_shift_kpoint.o WF_symm_kpoint_g.o WF_symm_kpoint_incl.o \ scatter_Bamp_spin.o scatter_Bamp_incl.o scatter_Gamp_incl.o WF_spatial_inversion.o \ - WF_load.o WF_symm.o WF_apply_symm_incl.o $(WF_rot_object) \ + WF_phase_matrices.o WF_load.o WF_symm.o WF_apply_symm_incl.o $(WF_rot_object) \ $(WF_der_objects) eval_R_minus_R.o scatter_Modscr.o load_cc.o \ PP_uspp_init.o PP_addus_vloc_aug.o PP_vloc_augment.o PP_compute_becp.o \ - PP_becprod_calc.o PP_scatterBamp_init.o PP_rotate_becp.o PP_addus_rhotw_aug.o + PP_becprod_calc.o PP_scatterBamp_init.o PP_rotate_becp.o PP_addus_rhotw_aug.o \ + EXC_WF_symm_qpoint.o diff --git a/src/wf_and_fft/DOUBLE_project.dep b/src/wf_and_fft/DOUBLE_project.dep index 474d9cf37d..4265e299e5 100644 --- a/src/wf_and_fft/DOUBLE_project.dep +++ b/src/wf_and_fft/DOUBLE_project.dep @@ -1,3 +1,4 @@ + EXC_WF_symm_qpoint.o PP_addus_rhotw_aug.o PP_addus_vloc_aug.o PP_becprod_calc.o @@ -12,11 +13,13 @@ WF_derivative.o WF_free.o WF_load.o + WF_phase_matrices.o WF_rotate.o WF_shift_kpoint.o WF_spatial_inversion.o WF_symm.o WF_symm_kpoint.o + WF_symm_kpoint_g.o WF_symm_kpoint_incl.o eval_GradOperator.o eval_R_minus_R.o diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F new file mode 100644 index 0000000000..6783597025 --- /dev/null +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -0,0 +1,199 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2015 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& +& ID,S_index,EXC_WFs,l_min_mem) + ! + use pars, ONLY:SP,cZERO,cONE + use electrons, ONLY:n_sp_pol,n_max_deg + use D_lattice, ONLY:idt_index,i_time_rev,nsym,sop_inv,sop_tab + use R_lattice, ONLY:bz_samp,qindx_X,qindx_C + use BS_solvers, ONLY:BS_mat,BSS_n_eig,BSS_eh_table_m1 + use BS, ONLY:BS_bands,BS_H_dim + use wave_func, ONLY:io_WF_phases,WF_phases_b_map,WF_phases + use IO_int, ONLY:io_control + use IO_m, ONLY:DUMP,REP,RD + ! +#include + ! + type(bz_samp), intent(in) :: Xk,qpt + integer, intent(in) :: first_state,nstates + integer, intent(in) :: iq,isq,igq + integer, intent(inout):: ID + complex(SP), intent(out) :: EXC_WFs(BS_H_dim,nstates) + integer, intent(in) :: S_index(BSS_n_eig) + logical, intent(in) :: l_min_mem + ! + ! Work space + ! + integer :: iexc,il,ik,istark,isk,ikbz,ipbz,ipmqbz,ipmqg0,iv1,ic1,iv2,ic2,& + & i_v1_bnd,i_v1_grp,i_c1_bnd,i_c1_grp,i_v2_bnd,i_v2_grp,i_c2_bnd,i_c2_grp,& + & ikmqbz,ikmqg0,iqbz,i_sp_pol,ip,ipmq,istarp,istarpmq,i1,i2,& + & neh1,neh2,io_err,nsz(5),V_bands(2),C_bands(2),ipmq_last + complex(SP) :: phase_vv,phase_cc + complex(SP), allocatable :: WF_phases_cc(:,:,:,:,:),WF_phases_vv(:,:,:,:,:) + ! + if(isq==idt_index) then + do iexc=1,nstates + il=S_index(iexc+first_state-1) + EXC_WFs(:,iexc)=BS_mat(:,il) + enddo + return + endif + ! + iqbz=qpt%k_table(iq,isq) + ! + !V_bands=(/BS_bands(1),maxval(Ken%nbm)/) + !C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) + ! + EXC_WFs=cZERO + ! + ! First get A(l,R*q)= Ry * A(l,q) + ! + do i_sp_pol=1,n_sp_pol + ! + do ik=1,Xk%nibz + ! + ! For the phases I need: + ! - R p_BZ = k_BZ + ! - the symmetry used to reach k_BZ, e.g. isk + !ik_ref=ikbz + !is_ref=isk + ! + ipmq_last=0 + ! + if (l_min_mem) then + ! + nsz(1:2)=maxval(WF_phases_b_map(:,ik,i_sp_pol,1)) + nsz(3) =maxval(WF_phases_b_map(:,ik,i_sp_pol,2)) + nsz(4) =nsym + nsz(5) =Xk%nstar(ik) + ! + YAMBO_ALLOC(WF_phases_cc,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) + ! + call io_control(ACTION=RD,COM=REP,SEC=(/3/),MODE=DUMP,ID=ID) + io_err=io_WF_phases(BS_bands,ik,0,i_sp_pol,ID,nsz,WF_phases_cc) + ! + endif + ! + do istark=1,Xk%nstar(ik) + ! + isk =Xk%star(ik,istark) + ikbz=Xk%k_table(ik,isk) + ! + ! p_BZ = (R)^-1 k_BZ = (R)^-1 (Rk) k_IBZ + ipbz=Xk%k_table(ik,sop_tab(sop_inv(isq),isk)) + ! + ip =Xk%sstar(ipbz,1) + istarp=Xk%sstar(ipbz,3) + ! + ! (R)^-1 k_BZ - q_IBZ = p_BZ - q_IBZ + ipmqbz=qindx_X(iq,ipbz,1) + ipmqg0=qindx_X(iq,ipbz,2) + ! + ipmq =Xk%sstar(ipmqbz,1) + istarpmq=Xk%sstar(ipmqbz,3) + ! + ! For the phases I need R pmq_BZ = k_BZ - R q_IBZ = k_BZ - q_BZ + !ikmqbz=qindx_C(ikbz,iqbz,1) + !ikmqg0=qindx_C(ikbz,iqbz,2) + ! + if (ipmq/=ipmq_last.and.l_min_mem) then + ! + if (ipmq_last>0) then + YAMBO_FREE(WF_phases_vv) + endif + ! + nsz(1:2)=maxval(WF_phases_b_map(:,ipmq,i_sp_pol,1)) + nsz(3) =maxval(WF_phases_b_map(:,ipmq,i_sp_pol,2)) + nsz(4) =nsym + nsz(5) =Xk%nstar(ipmq) + ! + YAMBO_ALLOC(WF_phases_vv,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) + ! + if (ipmq/=ip) then + call io_control(ACTION=RD,COM=REP,SEC=(/3/),MODE=DUMP,ID=ID) + io_err=io_WF_phases(BS_bands,ipmq,0,i_sp_pol,ID,nsz,WF_phases_vv) + ipmq_last=ipmq + else + WF_phases_vv=WF_phases_cc + ipmq_last=ip + endif + ! + endif + ! + do iexc=1,nstates + il=S_index(iexc+first_state-1) + ! + do iv1 = BS_bands(1),BS_bands(2) + ! + i_v1_bnd=WF_phases_b_map(iv1,ipmq,i_sp_pol,1) + i_v1_grp=WF_phases_b_map(iv1,ipmq,i_sp_pol,2) + ! + do iv2 = BS_bands(1),BS_bands(2) + ! + i_v2_bnd=WF_phases_b_map(iv2,ipmq,i_sp_pol,1) + i_v2_grp=WF_phases_b_map(iv2,ipmq,i_sp_pol,2) + ! + if (i_v1_grp/=i_v2_grp) cycle + ! + do ic1 = BS_bands(1),BS_bands(2) + ! + i_c1_bnd=WF_phases_b_map(ic1,ip,i_sp_pol,1) + i_c1_grp=WF_phases_b_map(ic1,ip,i_sp_pol,2) + ! + neh1=BSS_eh_table_m1(ikbz,iv1,ic1,i_sp_pol,1) + ! + if (neh1==0) cycle + ! + do ic2 = BS_bands(1),BS_bands(2) + ! + i_c2_bnd=WF_phases_b_map(ic2,ip,i_sp_pol,1) + i_c2_grp=WF_phases_b_map(ic2,ip,i_sp_pol,2) + ! + if (i_c1_grp/=i_c2_grp) cycle + ! + neh2=BSS_eh_table_m1(ipbz,iv2,ic2,i_sp_pol,1) + ! + if (neh2==0) cycle + ! + if (l_min_mem) then + phase_vv=conjg(WF_phases_vv(i_v1_bnd,i_v2_bnd,i_v1_grp,isq,istarpmq)) + phase_cc= WF_phases_cc(i_c1_bnd,i_c2_bnd,i_c1_grp,isq,istarp) + else + i1=1 ; i2=1 + if(ipmq>0) i1= sum(Xk%nstar(:ipmq-1))+istarpmq + if(ip >0) i2= sum(Xk%nstar(:ip -1))+istarp + phase_vv=conjg(WF_phases(i_v1_bnd,i_v2_bnd,i_v1_grp,isq,i1)) + phase_cc= WF_phases(i_c1_bnd,i_c2_bnd,i_c1_grp,isq,i2) + endif + ! + EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+BS_mat(neh2,il)*phase_vv*phase_cc + ! + enddo + enddo + ! + enddo + enddo + ! + enddo + ! + enddo + ! + if (l_min_mem) then + YAMBO_FREE(WF_phases_cc) + YAMBO_FREE(WF_phases_vv) + endif + ! + enddo + enddo + ! + !! take care of time reversal if needed + !! + !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_p) + ! +end subroutine EXC_WF_symm_qpoint diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F new file mode 100644 index 0000000000..c94ffeb9e4 --- /dev/null +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -0,0 +1,229 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2015 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +!> @brief Calculate overlaps between wave-function +! <\psi_{Ra(kibz_i)} | \psi_{kbz_j} > +! with for Ra(kibz_i)=kbz_j +! +!! @param[out] WF_phases_S Phase matrices +! +! #include +! +subroutine WF_phase_matrices(En,Xk,blim,klim) + ! + use pars, ONLY:SP,cZERO + use units, ONLY:HA2EV + use LIVE_t, ONLY:live_timing + use R_lattice, ONLY:bz_samp,G_m_G,minus_G,g_vec,rl_sop + use D_lattice, ONLY:nsym,sop_tab + use electrons, ONLY:levels,n_max_deg + use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map + use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy + use electrons, ONLY:n_spinor,n_sp_pol + use wrapper, ONLY:Vstar_dot_V + use hamiltonian, ONLY:B_mat_index + use matrix_operate, ONLY:m3det!,UP_matrix_index + use vec_operate, ONLY:degeneration_finder + use parallel_m, ONLY:PAR_IND_WF_k,PAR_IND_WF_b,PAR_IND_B_mat + use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute + use interfaces, ONLY:WF_symm_kpoint_g,WF_load,WF_free,eval_G_minus_G + use IO_int, ONLY:io_control + use IO_m, ONLY:VERIFY,DUMP,REP,OP_WR,WR,WR_CL,OP_RD_CL + use timing_m, ONLY:timing + ! +#include + ! + integer, intent(in) :: blim(2),klim(2) + type(levels), intent(in) :: En + type(bz_samp), intent(in) :: Xk + ! + ! Work Space + ! + integer :: first_el(blim(2)-blim(1)+1),n_of_el(blim(2)-blim(1)+1),& + & blim_n(2),n_deg_grp,i_grp,g0_idx(3,2),nsz(5) + real(SP) :: g0_length(3) + integer :: ikbz,iRkbz,isk,isloop,isk_c,isk_y,iGk_y,iGk_c,istark,& + & iby,ibc,iby_phase,ibc_phase,i_sp_pol,ik,& + & ifrag,s_count,i_wf_y,i_wf_c,iGp,ng_tmp,nb + complex(SP) :: det,charac(blim(2)-blim(1)+1,nsym) + complex(SP), allocatable :: WF_phases(:,:,:,:,:) + ! + type(WAVEs) :: WF_k,WF_Rk_c,WF_Rk_y + ! + integer :: io_err,ID + ! + if (nsym==1) return + ! + nsz=0 + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_WF_phases(blim,0,0,0,ID,nsz) + ! + if (io_err==0) return + ! + call timing("WF_phases",OPR="start") + ! + !call k_find_smallest_g0(g0_idx,g0_length) + !iGp=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) + iGp=2*maxval(Xk%g_table) + ng_tmp=eval_G_minus_G(wf_ng_1st_BZ,iGp) + ! + nb=blim(2)-blim(1)+1 + ! + !call PARALLEL_WF_distribute(K_index=PAR_IND_WF_k,B_index=PAR_IND_WF_b,CLEAN_UP=.TRUE.) + call PARALLEL_WF_distribute(CLEAN_UP=.TRUE.) + call PARALLEL_WF_index( ) + ! + YAMBO_ALLOC(WF_phases_b_map,(blim(1):blim(2),klim(1):klim(2),n_sp_pol,2)) + ! + call io_control(ACTION=OP_WR,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID) + io_err=io_WF_phases(blim,0,0,0,ID,nsz) + ! + WF_phases_b_map=0 + ! + !call live_timing("WF_phases:",PAR_IND_WF_k%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) + call live_timing("WF_phases:",(sum(Xk%nstar(klim(1):klim(2))))*n_sp_pol) + ! + ifrag=0 + ! + do i_sp_pol=1,n_sp_pol + ! + do ik=klim(1),klim(2) + ! + ifrag=ifrag+1 + ! + call WF_load(WF_k,0,1,blim,(/ik,ik/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-WF_phases',quiet=ifrag>1,keep_states_to_load=.true.) + ! + call degeneration_finder(En%E(blim(1):blim(2),ik,i_sp_pol),nb,& + & first_el,n_of_el,n_deg_grp,0.0001/HA2EV,Include_single_values=.true.) + ! + do i_grp=1,n_deg_grp + do iby_phase=1,n_of_el(i_grp) + iby=iby_phase+first_el(i_grp)-1+blim(1)-1 + WF_phases_b_map(iby,ik,i_sp_pol,:)=(/iby_phase,i_grp/) + enddo + enddo + ! + nsz=(/maxval(n_of_el),maxval(n_of_el),n_deg_grp,nsym,Xk%nstar(ik)/) + ! + YAMBO_ALLOC(WF_phases,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) + WF_phases=cZERO + ! + do istark=1,Xk%nstar(ik) + ! + !if ( .not.PAR_IND_WF_k%element_1D(ik) ) cycle + ! + isk =Xk%star(ik,istark) + ikbz=Xk%k_table(ik,isk) + ! + !charac=0._SP + !if (istark==1) then + ! write(*,*) "" + ! write(*,*) "ik = ",ik,Xk%pt(ik,:) + !endif + ! + do isloop=1,nsym + ! + ! symmetry composed + isk_c=sop_tab(isloop,isk) + ! symmetry used by yambo + isk_y=Xk%s_table(ik,isk_c) + ! + iRkbz =Xk%k_table(ik,isk_c) + ! + iGk_c =minus_G(Xk%g_table(ik,isk_c)) + iGk_y =minus_G(Xk%g_table(ik,isk_y)) + ! + call WF_copy(WF_k,WF_Rk_c) + call WF_copy(WF_k,WF_Rk_y) + ! + !if (ik==13 .and. isloop==7) then + ! write(*,*) "next two " + !endif + ! + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_y,iGk_y,WF_Rk_y) + ! + do i_grp=1,n_deg_grp + blim_n=(/1,n_of_el(i_grp)/) + blim_n=blim_n+first_el(i_grp)-1+blim(1)-1 + ! + do iby_phase=1,n_of_el(i_grp) + iby=iby_phase+first_el(i_grp)-1+blim(1)-1 + i_wf_y=WF_k%index(iby,ik,i_sp_pol) + do ibc_phase=1,n_of_el(i_grp) + ibc=ibc_phase+first_el(i_grp)-1+blim(1)-1 + i_wf_c=WF_k%index(ibc,ik,i_sp_pol) + ! + WF_phases(iby_phase,ibc_phase,i_grp,isloop,istark)= & + & Vstar_dot_V(wf_ng_1st_BZ*n_spinor,WF_Rk_y%c(:,:,i_wf_y),WF_Rk_c%c(:,:,i_wf_c)) + ! + enddo + charac(i_grp,isloop)=charac(i_grp,isloop)+WF_phases(iby_phase,iby_phase,i_grp,isloop,istark) + enddo + ! + enddo + ! + !do ibk=blim(1),blim(2) + ! i_wf_k=WF_k%index(ibk,ik,i_sp_pol) + ! do ibp=blim(1),blim(2) + ! i_wf_p=WF_p%index(ibp,ip,i_sp_pol) + ! !if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib,ibp)-1 )) cycle + ! !if (.not.PAR_IND_B_mat%element_1D( B_mat_index(ib,ibp,(/1,En%blim/))-1 )) cycle + ! WF_phases(ibk,ibp,s_count,k_count,i_sp_pol)= & + ! & Vstar_dot_V(wf_ng_1st_BZ*n_spinor,WF_k%c(:,:,i_wf_k),WF_p_tmp%c(:,:,i_wf_p)) + ! enddo ! ibp + !enddo ! ibk + ! + call WF_free(WF_Rk_c) + call WF_free(WF_Rk_y) + ! + ! DEBUG < + !call SERIAL_inversion(nb,WF_phases(:,:,s_count,k_count,i_sp_pol),det,.true.) + !! + !write(*,*) i_sp_pol,ikbz,isp,iGp,abs(det) + ! DEBUG > + ! + enddo ! isp + ! + call live_timing(steps=1) + ! + !call PP_redux_wait(WF_phases(:,:,s_count,k_count,i_sp_pol)) + ! + ! DEBUG < + !write(*,*) "Character table at k= ",ikbz + !write(*,*) "Number of symmetry elements= ",s_count + !do i_grp=1,n_deg_grp + ! write(*,*) En%E(first_el(i_grp),ik,i_sp_pol)*HA2EV,n_of_el(i_grp),real(charac(i_grp,:s_count)) + !enddo + !write(*,*) "" + ! DEBUG > + ! + enddo ! istar + ! + call io_control(ACTION=WR,COM=REP,SEC=(/3/),MODE=DUMP,ID=ID) + io_err=io_WF_phases(blim,ik,0,i_sp_pol,ID,nsz,WF_phases) + ! + YAMBO_FREE(WF_phases) + ! + call WF_free(WF_k) + ! + enddo ! ik + ! + enddo ! i_sp_pol + ! + call live_timing() + ! + nsz=0 + call io_control(ACTION=WR_CL,COM=REP,SEC=(/2/),MODE=DUMP,ID=ID) + io_err=io_WF_phases(blim,0,0,0,ID,nsz) + ! + YAMBO_FREE(WF_phases_b_map) + ! + call timing("WF_phases",OPR="stop") + ! +end subroutine WF_phase_matrices diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F new file mode 100644 index 0000000000..734d81dd15 --- /dev/null +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -0,0 +1,86 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2015 The Yambo Team +! +! Authors (see AUTHORS file for details): MG CA DS AF +! +#include +! +subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) + ! + use pars, ONLY:SP,cZERO + use electrons, ONLY:n_spinor + use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:wf_ng,wf_ng_1st_BZ + use vec_operate, ONLY:c2a + use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& + & k_pt,rl_sop,g_vec + use deviceXlib_m, ONLY:dev_conjg,dev_memcpy + use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & + & dl_sop,i_time_rev,nsym + ! + implicit none + ! + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0 + type (WAVEs), target, intent(inout) :: WF + ! + ! Work space + ! + complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) + complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + ! + real(SP) :: krot(3),G_cc(3) + ! + integer :: ib,i_wf,isymm_m1 + integer :: ic,ig,igp,igr,igs,i_spinor + ! + !if(isymm==idt_index) write(*,*) k_pt(ik,:) + if(isymm==idt_index) return + ! + WF_p => DEV_VAR(WF%c) + isymm_m1=sop_inv(isymm) + ! + do ib=b_to_load(1),b_to_load(2) + ! + WF_k_tmp=cZERO + ! + i_wf=WF%index(ib,ik,i_sp_pol) + ! + if (n_spinor==1) then + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=wf_igk(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + enddo + ! + else + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=wf_igk(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & +& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & +& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) + enddo + endif + ! + ! take care of time reversal if needed + if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + ! + call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + ! + enddo + ! +end subroutine WF_symm_kpoint_g diff --git a/ypp/symmetries/k_build_map.F b/ypp/symmetries/k_build_map.F index df13dce060..ba376c8c9f 100644 --- a/ypp/symmetries/k_build_map.F +++ b/ypp/symmetries/k_build_map.F @@ -59,7 +59,7 @@ subroutine k_build_map(k,k_save,kpoints_map,action_kind) !if (rlu_v_is_zero(v2-v1,zero_=k_rlu_zero)) then ! DEBUG > if ( v_is_zero(v1-v2,k_iku_zero) ) then - if(action_kind==1) kpoints_map(:, ik ) = k_save%sstar(ik_save,:) + if(action_kind==1) kpoints_map(:, ik ) = k_save%sstar(ik_save,:2) if(action_kind==2) kpoints_map(1, ik ) = ik_save exit endif From 72766bb648296da021e4c81e8f753d14c490f302 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Mar 2024 12:05:43 +0100 Subject: [PATCH 0764/1367] Version 5.2.0, Revision 23495, Hash a3e19cd355 MODIFIED * configure include/version/version.m4 exc-ph/EXCPH_gkkp_driver.F exc-ph/EXCPH_gkkp_eval_pal.F io/.objects modules/mod_EXCPH.F wf_and_fft/EXC_WF_symm_qpoint.F Changes: - [yambo_ph] Prepared use of rotation of excitonic WFs in exc-ph flow Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/exc-ph/EXCPH_gkkp_driver.F | 24 +++++++++++++++++++++--- src/exc-ph/EXCPH_gkkp_eval_pal.F | 22 +++++++++++----------- src/io/.objects | 2 +- src/modules/mod_EXCPH.F | 1 + src/wf_and_fft/EXC_WF_symm_qpoint.F | 4 ++-- 7 files changed, 40 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 200d28b987..7eb795e2b2 100755 --- a/configure +++ b/configure @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23482" -SHASH="58283a0ff9" +SREVISION="23495" +SHASH="a3e19cd355" diff --git a/include/version/version.m4 b/include/version/version.m4 index baea46f784..2a2fc6139d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.22895 h.9b520643a, yambo@yambo-code.eu) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23482" -SHASH="58283a0ff9" +SREVISION="23495" +SHASH="a3e19cd355" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 455939e293..af94c14de4 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -44,7 +44,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END,manage_action use IO_int, ONLY:io_control - use EXCPH, ONLY:BS_mat_in,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& + use EXCPH, ONLY:BS_mat_in,BS_mat_out,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & & n_exc_in,EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free @@ -61,6 +61,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Work Space ! integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM + integer :: S_index(EXCPH_states(1):EXCPH_States(2)),ID_phases integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID,IO_ACT integer :: il,iq_bz,iq,i_star,iq_s,iq_db,elph_branches_save(2) ! Debug @@ -73,6 +74,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Define n_exc_in ! n_exc_in=EXCPH_states(2)-EXCPH_states(1)+1 + ! Sorting index is trivial, no sorting done in exc-ph. + do il=EXCPH_states(1),EXCPH_States(2) + S_index(il)=il + enddo ! ! Check if Lout and Lin are present ! and read their kind @@ -147,6 +152,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Alloc BS_in variables ! call BSE_in_alloc() + call BSE_out_alloc() ! ! Alloage EXCPH_gkkp ! @@ -170,6 +176,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! Save the Lin in information ! BS_mat_in =BS_mat(:,EXCPH_states(1):EXCPH_states(2)) + ! BSS_eh_table_in =BSS_eh_table BSS_eh_table_m1_in=BSS_eh_table_m1(:,:,:,1,1) BS_E_in =BS_E @@ -199,14 +206,17 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call live_timing('Excitonic Gkkp',q%nbz*(elph_branches(2)-elph_branches(1)+1)) ! do iq=1,q%nibz - ! + ! if(iq>1) call EXCPH_load_L(iq,X,'check','Lout') call EXCPH_load_L(iq,X,'load','Lout') ! do i_star=1,q%nstar(iq) ! iq_s=q%star(iq,i_star) - iq_bz = q%k_table(iq, iq_s) + iq_bz = q%k_table(iq,iq_s) + ! + BS_mat_out=cZERO + call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,.false.) ! EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO @@ -279,6 +289,14 @@ subroutine BSE_in_alloc() ! end subroutine BSE_in_alloc ! + subroutine BSE_out_alloc() + implicit none + ! + YAMBO_ALLOC(BS_mat_out,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) + BS_mat_out=cZERO + ! + end subroutine BSE_out_alloc + ! subroutine BSE_in_free implicit none YAMBO_FREE(BS_E_in) diff --git a/src/exc-ph/EXCPH_gkkp_eval_pal.F b/src/exc-ph/EXCPH_gkkp_eval_pal.F index 4dfea16b2a..443e0e0b20 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_pal.F +++ b/src/exc-ph/EXCPH_gkkp_eval_pal.F @@ -22,7 +22,7 @@ ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! ! --- Theory --- -! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. +! (5) Figure out rotations/symmetry of EPC m.e. ! - FP ! ! GKKP formulation following the F. Paleari PhD thesis @@ -33,14 +33,14 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !use electrons, ONLY:levels use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev use R_lattice, ONLY:bz_samp,qindx_C - use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table_m1,BSS_eh_table,BSS_free + use BS_solvers, ONLY:io_BSS_diago,BSS_eh_table_m1,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control !use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map - use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& + use EXCPH, ONLY:BS_mat_in,BS_mat_out,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& & EXCPH_states,EXCPH_sum,k_plus_q_table,& & l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only ! @@ -115,7 +115,7 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) ! ip_bz = R_iq_s^-1 ik_bz ! = R_iq_s^-1 R_ik_s ik_ibz ! - ip_bz = elemental_scattering(iq_s,ik_bz) + ip_bz = ik_bz ! elemental_scattering(iq_s,ik_bz) ! ! 1=DOWN (hole contribution) !======== @@ -144,17 +144,17 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) ! if (l_abs_exc) then - Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) + Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) else - if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) + if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat_out(i_Hp,i_beta) endif ! enddo ! ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz ! - ip_bz = elemental_scattering(iq_s,ik_plus_iq_bz) + ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) ! ! 2=UP (electron contribution) !====== @@ -176,10 +176,10 @@ subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) !elph_gkkp=GKKP%dVc(il,ic,icp,ik_db,1)/sqrt(2._SP*ph_E) endif if (l_abs_exc) then - Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat(i_Hp,i_beta)) + Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) else - if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat(i_Hp,i_beta) + if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) + if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat_out(i_Hp,i_beta) endif ! enddo diff --git a/src/io/.objects b/src/io/.objects index 9852620f81..7b423f6b0a 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -19,7 +19,7 @@ objs = ver_is_gt_or_eq.o \ io_Vnl.o io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ io_QINDX.o io_QP_and_GF.o io_X.o io_MPA.o \ - io_DB1.o io_WF.o io_KB_abinit.o io_KB_pwscf.o io_HF_and_locXC.o \ + io_DB1.o io_WF.o io_WF_phases.o io_KB_abinit.o io_KB_pwscf.o io_HF_and_locXC.o \ io_BS_Fxc.o io_NLCC_pwscf.o \ io_ATMPROJ_pwscf.o io_descriptors.o \ io_BSS_diago.o io_BSS_Haydock.o io_BSS_invert.o io_USPP_pwscf.o \ diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 9c9859c96b..05661bc7fc 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -69,6 +69,7 @@ module EXCPH complex(SP), allocatable :: BS_E_in(:),BS_E(:) real(SP), allocatable :: BS_all_E(:,:) complex(SP), allocatable :: BS_mat_in(:,:) + complex(SP), allocatable :: BS_mat_out(:,:) integer, allocatable :: BSS_eh_table_in(:,:) complex(SP), pointer :: BS_R_left(:),BS_R_right(:) real(SP), allocatable :: BS_R(:) diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F index 6783597025..9455862d69 100644 --- a/src/wf_and_fft/EXC_WF_symm_qpoint.F +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -38,8 +38,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& complex(SP), allocatable :: WF_phases_cc(:,:,:,:,:),WF_phases_vv(:,:,:,:,:) ! if(isq==idt_index) then - do iexc=1,nstates - il=S_index(iexc+first_state-1) + do iexc=first_state,nstates + il=S_index(iexc) EXC_WFs(:,iexc)=BS_mat(:,il) enddo return From c984098cf62eb7820a0db14bbfa704dc7808a7af Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Mar 2024 12:10:07 +0100 Subject: [PATCH 0765/1367] Version 5.2.0, Revision 23508, Hash 2ca85f7013 MODIFIED * configure include/version/version.m4 DELETED * ph-el/PHEL_driver.F Changes: - deleted PHEL_driver Patch sent by: Davide Sangalli --- configure | 4 +- include/version/version.m4 | 4 +- src/ph-el/PHEL_driver.F | 305 ------------------------------------- 3 files changed, 4 insertions(+), 309 deletions(-) delete mode 100644 src/ph-el/PHEL_driver.F diff --git a/configure b/configure index 7eb795e2b2..39b60e03ee 100755 --- a/configure +++ b/configure @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23495" -SHASH="a3e19cd355" +SREVISION="23508" +SHASH="2ca85f7013" diff --git a/include/version/version.m4 b/include/version/version.m4 index 2a2fc6139d..58a7a6a8f9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.22895 h.9b520643a, yambo@yambo-code.eu) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23495" -SHASH="a3e19cd355" +SREVISION="23508" +SHASH="2ca85f7013" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/ph-el/PHEL_driver.F b/src/ph-el/PHEL_driver.F deleted file mode 100644 index 617ed7bce8..0000000000 --- a/src/ph-el/PHEL_driver.F +++ /dev/null @@ -1,305 +0,0 @@ -! -! Copyright (C) 2000-2023 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM FP -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -subroutine PHEL_driver(E,k,q) - ! - use pars, ONLY:SP,cI - use drivers, ONLY:l_life - use electrons, ONLY:levels,n_sp_pol,E_fine_grid - use R_lattice, ONLY:bz_samp,bz_samp_FineGd_default,bz_samp_FineGd_alloc,bz_fine_grid - use ELPH_intfcs, ONLY:ELPH_alloc - use ELPH, ONLY:QP_PH_n_G_bands,elph_branches,GKKP_pe_sq,l_GKKP_DB_exists,& -& l_GKKP_expanded_DB_exists,elph_bands,elph_use_q_grid - use PHEL, ONLY:l_PH_uses_E_FineGd,PH_Self_Energy_mode,PHEL_free,PH_Q,PH_SF_W,PHEL_alloc,PHEL_qp,& -& PH_DbGd_points,PH_energy,KpQ_io_map,phel_info,PHEL_fit_Energies,& -& QPH_OMS,QPH_OMS_bare_Pole,QPH_full,QPH,QPHt_alloc,QPH_DDFPT - use parallel_int, ONLY:PP_redux_wait,PARALLEL_global_indexes - use RT_lifetimes, ONLY:RT_PE_life,RT_lifetime_alloc,Life_MEM_steps,l_initial_equilibrium,RT_ALL_lifetimes_free - use RT_occupations, ONLY:RT_EL_occupations_alloc,RT_PH_occupations_alloc,RT_ALL_occupations_free - use real_time, ONLY:l_RT_uses_E_FineGd - use QP_m, ONLY:l_extended_output,QP_Sc_steps,QP_G_er,QP_G_damp,l_QP_eval_GF,QP_solver,On_Mass_Shell_approx - use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,VERIFY,REP,OP_WR_CL - use frequency, ONLY:W_reset - use stderr, ONLY:STRING_same - use parallel_m, ONLY:PARs_PH_Q_ibz - ! -#include - ! - type(levels) ,intent(in) :: E - type(bz_samp),intent(in) :: k,q - ! - ! Work Space - ! - integer ::i_err,ID,nk_CG,iq,il - logical ::l_SS_test - integer, external ::io_PH - type(E_fine_grid) ::E_FG - type(bz_fine_grid) ::k_FG - ! - call section('*',"Phonon-Electron Interaction and properties") - !============================================================== - ! - ! Setup - !======= - ! ... logicals - call QP_logicals( ) - ! ... BZ Setup - call k_build_up_BZ_tables(q) - ! - ! El-Ph databases check - !======================= - call section('+',"Databases I/O") - call ELPH_databases_check(elph_bands) - ! - if (.not.any((/l_GKKP_DB_exists,l_GKKP_expanded_DB_exists/))) call error("GKKP databases absent or damaged") - ! - ! Already calculated? - ! ===================== - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - i_err=io_PH(ID) - if (i_err==0) then - call io_control(ACTION=OP_RD_CL,SEC=(/2/),MODE=VERIFY,ID=ID) - i_err=io_PH(ID) - call PH_of(q) - call CLEAN() - return - endif - ! - ! Q ranges - !============================ - ! - ! / ypp_ph elph_use_q_grid=F - ! elph_nQ = | - ! \ nqibz elph_use_q_grid=T - ! - ! Parallel Setup - !=============== - call PARALLEL_global_indexes(E,k,q,"Phonon_Self_Energy") - ! - ! Q/K grid remapping - !==================== - call ELPH_databases_grids_map(k,q) - ! - ! El-Ph databases I/O - !===================== - call section("=","El-Ph databases loading") - call ELPH_databases_load(GKKP_pe_sq,E,k,q,QP_PH_n_G_bands,PH_Q,"Q-sym Q-IBZ K-BZ",PH_Self_Energy_mode) - ! - !...acoustic branches - call ELPH_acoustic_phonon_properties(q) - ! - ! Static-Screening test/correction - !================================== - call PHEL_screening(E,q,l_SS_test) - if (l_SS_test) return - ! - ! Maps into the RT kinds - !======================== -#if defined _RT - ! ... grid in the IBZ - l_RT_uses_E_FineGd=k%FGibz%N>0 - if (.not.l_RT_uses_E_FineGd) then - call bz_samp_FineGd_alloc(k%FGibz,k%nibz) - call bz_samp_FineGd_default(k%FGibz,k) - endif - k_FG = k%FGibz - nk_CG= k%nibz -#else - ! ...DbGd in the full BZ - l_PH_uses_E_FineGd=k%FGbz%N>0 - call k_ibz2bz(k,'i',.true.) - if (l_PH_uses_E_FineGd) then - if (PH_DbGd_points<0) PH_DbGd_points=k%FGbz%N - else - call bz_samp_FineGd_alloc(k%FGbz,k%nbz) - call bz_samp_FineGd_default(k%FGbz,k,k%nbz) - PH_DbGd_points=0 - endif - k_FG = k%FGbz - nk_CG= k%nbz -#endif - ! - ! Transitions and frequencies - !============================= - ! - ! ... select fine grid subset - call PHEL_double_grid_subset(k,k_FG,nk_CG) - ! - ! ... Spectral Function energy points - if (l_life) then - QP_Sc_steps=1 - call QPHt_alloc("OMS_bare_Pole",QPH_OMS_bare_Pole,0) - else - ! - if (On_Mass_Shell_approx) call QPHt_alloc("OMS",QPH_OMS,QP_Sc_steps) - call QPHt_alloc("OMS_bare_Pole",QPH_OMS_bare_Pole,QP_Sc_steps) - call QPHt_alloc("QPH",QPH,QP_Sc_steps) - if (l_QP_eval_GF) then - call QPHt_alloc("FULL",QPH_full,QP_Sc_steps) - else - call QPHt_alloc("DDFPT",QPH_DDFPT,0) - endif - ! - allocate(PH_SF_W(elph_branches(1):elph_branches(2),PH_Q(1):PH_Q(2))) - do iq=PH_Q(1),PH_Q(2) - do il=elph_branches(1),elph_branches(2) - call W_reset(PH_SF_W(il,iq)) - PH_SF_W(il,iq)%dr=QP_G_damp - PH_SF_W(il,iq)%n_freqs=QP_Sc_steps - PH_SF_W(il,iq)%er=QP_G_er - call FREQUENCIES_setup(PH_SF_W(il,iq)) - if (On_Mass_Shell_approx) QPH_OMS%W=PH_SF_W(il,iq)%p - QPH_OMS_bare_Pole%W=PH_SF_W(il,iq)%p - QPH%W=PH_SF_W(il,iq)%p - if (l_QP_eval_GF) QPH_full%W=PH_SF_W(il,iq)%p - enddo - enddo - ! - ! SE energy points - if (STRING_same(QP_solver,"n")) then - do iq=PH_Q(1),PH_Q(2) - do il=elph_branches(1),elph_branches(2) - call W_reset(PH_SF_W(il,iq)) - QP_Sc_steps=4 - PH_SF_W(il,iq)%n_freqs=4 - ! - ! Fake range just to call FREQUENCIES_setup - PH_SF_W(il,iq)%er=(/0._SP,1._SP/) - call FREQUENCIES_setup(PH_SF_W(il,iq)) - ! - ! Manual points - PH_SF_W(il,iq)%p( 1)=cI*QP_G_damp - PH_SF_W(il,iq)%p(2:3)=PHEL_fit_Energies*PH_energy(q,il,iq)+cI*QP_G_damp - PH_SF_W(il,iq)%p( 4)=cI*PH_energy(q,il,iq) - enddo - enddo - endif - endif - ! - ! ... allocs -#if defined _RT - Life_MEM_steps=1 - call RT_lifetime_alloc("ph-el",RT_PE_life,elph_branches,PH_Q(2)) -#else - call PHEL_alloc( ) -#endif - ! - ! ... occupations - call RT_EL_occupations_alloc((/QP_PH_n_G_bands(1),QP_PH_n_G_bands(2)/),k_FG%N) -#if defined _RT - call RT_PH_occupations_alloc(elph_branches,PH_Q(2)) -#endif - ! - ! ... grids - if (l_RT_uses_E_FineGd .or. l_PH_uses_E_FineGd) then - YAMBO_ALLOC(E_FG%E,(elph_bands(1):elph_bands(2),k_FG%N,n_sp_pol)) - YAMBO_ALLOC(E_FG%W,(elph_bands(1):elph_bands(2),k_FG%N,n_sp_pol)) - else - YAMBO_ALLOC(E_FG%E,(elph_bands(1):elph_bands(2),nk_CG,n_sp_pol)) - YAMBO_ALLOC(E_FG%W,(elph_bands(1):elph_bands(2),nk_CG,n_sp_pol)) - endif - ! - ! ... occupations & levels - call RT_occupations_and_levels_init(QP_PH_n_G_bands,E,k,q,k_FG,E_FG) - ! - ! Get nearest k-q table if using custom qpoints - if (.not.elph_use_q_grid) then - ! - call section("=","K-Q table (non uniform Q-grid)") - !-------------------------------------------------- - YAMBO_ALLOC(KpQ_io_map,(PH_Q(1):PH_Q(2),k%nbz) ) - call PHEL_k_nearest_table(k) - endif - ! - ! Q-loops - ! - do iq=PH_Q(1),PH_Q(2) - ! - if (.not.PARs_PH_Q_ibz%IND%element_1D(iq)) cycle - ! - ! Select allowed transitions for phonon scatterings - !=================================================== - call PH_Grid_Check_Transitions(iq,k,q,QP_PH_n_G_bands,k_FG,E_FG) - ! - ! Calculation of the lifetimes - ! - Equilibrium (yambo_ph): linewidths with retarded self-energy S^R - ! - Out of eq. (yambo_rt): scatt. rates with lesser/greater S^< and S^> - !============================== -#if defined _RT - l_initial_equilibrium=.TRUE. - !call PHEL_Lifetimes(E,k,q,k_FG,E_FG) -#else - call PHEL_Self_Energy(iq,E,k,q,k_FG,E_FG) -#endif - ! - YAMBO_FREE(phel_info%table) - ! - enddo - ! - ! Redux - call REDUX(PARs_PH_Q_ibz%COMM_a2a%COMM) - call REDUX(PARs_PH_Q_ibz%COMM_i%COMM) - ! - call section("=","Transitions Report") - !------------------------------------- - call PH_Transitions_Report( ) - ! - ! Output DB - !=========== - call section('=',"Output databases") - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),ID=ID) - i_err=io_PH(ID) - ! - ! Output file - !============= - call PH_of(q) - ! - ! Clean - !======= - call CLEAN() - ! - contains - ! - subroutine REDUX(COMM) - integer :: COMM -#if defined _RT -! call PP_redux_wait(RT_PE_life%emit) -! call PP_redux_wait(RT_PE_life%abs) -#endif - call PP_redux_wait(PHEL_qp%PI,COMM=COMM) - if (l_extended_output) then - call PP_redux_wait(PHEL_qp%interband,COMM=COMM) - call PP_redux_wait(PHEL_qp%intraband,COMM=COMM) - call PP_redux_wait(PHEL_qp%allen,COMM=COMM) - endif - end subroutine - ! - subroutine CLEAN() - call RT_ALL_lifetimes_free( ) - call RT_ALL_occupations_free( ) - call ELPH_alloc('FREE',GKKP=GKKP_pe_sq) - call PHEL_free( ) - end subroutine - ! -end subroutine PHEL_driver From 3aeb44eb703346c95b45471900837e89b5918d5a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Mar 2024 12:47:26 +0100 Subject: [PATCH 0766/1367] Version 5.2.0, Revision 23509, Hash c984098cf6 MODIFIED * configure include/version/version.m4 NEW * exc-ph/code_input.f90 Changes: - Added tmp file Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/exc-ph/code_input.f90 | 41 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 src/exc-ph/code_input.f90 diff --git a/configure b/configure index 39b60e03ee..7db9507591 100755 --- a/configure +++ b/configure @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23508" -SHASH="2ca85f7013" +SREVISION="23509" +SHASH="c984098cf6" diff --git a/include/version/version.m4 b/include/version/version.m4 index 58a7a6a8f9..9f25393f86 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.22895 h.9b520643a, yambo@yambo-code.eu) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23508" -SHASH="2ca85f7013" +SREVISION="23509" +SHASH="c984098cf6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/code_input.f90 b/src/exc-ph/code_input.f90 new file mode 100644 index 0000000000..0c80039a47 --- /dev/null +++ b/src/exc-ph/code_input.f90 @@ -0,0 +1,41 @@ + ! code taken from branch phys-excitons + ! file ypp/excitons/exciton_symmetries.f90 + + use wave_func, ONLY:io_WF_phases,WF_phases_b_map,WF_phases + ! + ! Electrons part (pre-requisite) + ! + call k_build_up_BZ_tables(Xk) + call k_ibz2bz(Xk,'iku',.true.) + call k_small_group(Xk) + ! + call WF_phase_matrices(Xen,Xk,BS_bands,(/1,Xk%nibz/)) + ! + YAMBO_ALLOC(WF_phases_b_map,(BS_bands(1):BS_bands(2),Xk%nibz,n_sp_pol,2)) + ! + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1,2/),MODE=DUMP,ID=ID) + io_err=io_WF_phases(BS_bands,0,0,0,ID,(/0,0,0,0,0/)) + ! + call parser("MinimizeMem",l_min_mem) + ! + if (.not.l_min_mem) then + nsz(1:2)=maxval(WF_phases_b_map(:,:,:,1)) + nsz(3) =maxval(WF_phases_b_map(:,:,:,2)) + nsz(4) =nsym + nsz(5) =Xk%nbz + YAMBO_ALLOC(WF_phases,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) + ! + do i_sp_pol=1,n_sp_pol + do ik=1,Xk%nibz + nsz(1:2)=maxval(WF_phases_b_map(:,ik,i_sp_pol,1)) + nsz(3) =maxval(WF_phases_b_map(:,ik,i_sp_pol,2)) + nsz(4) =nsym + nsz(5) =Xk%nstar(ik) + il1=1 + if(ik>0) il1= sum(Xk%nstar(:ik-1))+1 + call io_control(ACTION=RD,COM=REP,SEC=(/3/),MODE=DUMP,ID=ID) + io_err=io_WF_phases( BS_bands,ik,0,i_sp_pol,ID,nsz, & + & WF_phases(:nsz(1),:nsz(2),:nsz(3),:,il1:il1+nsz(5)-1) ) + enddo + enddo + endif From c56a2304bd20f2f26ee2389b36ccaa6af289e694 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Mar 2024 15:07:05 +0100 Subject: [PATCH 0767/1367] Version 5.2.0, Revision 23510, Hash 3aeb44eb70 MODIFIED * configure include/version/version.m4 wf_and_fft/EXC_WF_symm_qpoint.F Changes: - [yambo_ph] Forgot to save changes to file before doing git add and committing Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/wf_and_fft/EXC_WF_symm_qpoint.F | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 7db9507591..403a1dc584 100755 --- a/configure +++ b/configure @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23509" -SHASH="c984098cf6" +SREVISION="23510" +SHASH="3aeb44eb70" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9f25393f86..48e61d7fde 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.22895 h.9b520643a, yambo@yambo-code.eu) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23509" -SHASH="c984098cf6" +SREVISION="23510" +SHASH="3aeb44eb70" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F index 9455862d69..e0aa3542de 100644 --- a/src/wf_and_fft/EXC_WF_symm_qpoint.F +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -24,7 +24,7 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& integer, intent(in) :: first_state,nstates integer, intent(in) :: iq,isq,igq integer, intent(inout):: ID - complex(SP), intent(out) :: EXC_WFs(BS_H_dim,nstates) + complex(SP), intent(out) :: EXC_WFs(BS_H_dim,first_state:nstates) integer, intent(in) :: S_index(BSS_n_eig) logical, intent(in) :: l_min_mem ! @@ -126,8 +126,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& ! endif ! - do iexc=1,nstates - il=S_index(iexc+first_state-1) + do iexc=first_state,nstates + il=S_index(iexc) ! do iv1 = BS_bands(1),BS_bands(2) ! From ad3e097f2243c7b285633b5d8b06a2e35e78ca0c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 15 Mar 2024 11:25:26 +0100 Subject: [PATCH 0768/1367] Version 5.2.0, Revision 23180, Hash 50bdb76852 MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_load.F interface/INIT_check_databases.F Changes: - [yambo_rt/yambo_nl/yambo_sc] Improved explaining io_COLLs in the code Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_load.F | 5 ++++- src/interface/INIT_check_databases.F | 4 +++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/configure b/configure index ba6082e1a3..73dde38bbb 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23179 h.209fa27b2f. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23181 h.50bdb76852. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23179 h.209fa27b2f' -PACKAGE_STRING='Yambo 5.2.0 r.23179 h.209fa27b2f' +PACKAGE_VERSION='5.2.0 r.23181 h.50bdb76852' +PACKAGE_STRING='Yambo 5.2.0 r.23181 h.50bdb76852' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23179 h.209fa27b2f to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23181 h.50bdb76852 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23179 h.209fa27b2f:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23181 h.50bdb76852:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23179 h.209fa27b2f +Yambo configure 5.2.0 r.23181 h.50bdb76852 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23179 h.209fa27b2f, which was +It was created by Yambo $as_me 5.2.0 r.23181 h.50bdb76852, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23179" -SHASH="209fa27b2f" +SREVISION="23181" +SHASH="50bdb76852" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23179 h.209fa27b2f, which was +This file was extended by Yambo $as_me 5.2.0 r.23181 h.50bdb76852, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23179 h.209fa27b2f +Yambo config.status 5.2.0 r.23181 h.50bdb76852 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index baba96d585..4d4ca0ff9c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23179 h.209fa27b2f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23181 h.50bdb76852, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23179" -SHASH="209fa27b2f" +SREVISION="23181" +SHASH="50bdb76852" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index cfe9c4af59..be4011325d 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -32,7 +32,10 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) & GW_NEQ_COLL_element #endif ! - ! Define io_COLLs_header to handle either serial or parallel I/O + ! Inside collisions.h, io_COLLs_header is defined as either + ! - io_COLLISIONS (serial I/O) or + ! - io_COLLISIONS_header (parallel I/O case) + ! #include ! implicit none diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 0a2fa0934e..d3a1906c19 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -30,7 +30,9 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I # endif #endif ! - ! Define io_COLLs_header to handle either serial or parallel I/O + ! Inside collisions.h, io_COLLs_header is defined as either + ! - io_COLLISIONS (serial I/O) or + ! - io_COLLISIONS_header (parallel I/O case) ! #include ! From 02e9562a377e1dd1bf027f69af36b2e09f65f63e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 19 Mar 2024 13:45:29 +0100 Subject: [PATCH 0769/1367] Version 5.2.0, Revision 23039, Hash 536a3f04e5 MODIFIED * configure include/version/version.m4 coulomb/col_driver.F coulomb/rim_integrate_w.F Changes: - [yambo] Fixed rescaling of the interaction via a constant screening in RIM_qpg - [yambo] Added rescaling of the interaction via a constant screening to RIM_W Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/coulomb/col_driver.F | 10 +++++++++- src/coulomb/rim_integrate_w.F | 21 +++++++++++++++++++-- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/configure b/configure index e560c3a1d6..e8a774295f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23038 h.d90d0910dc. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23039 h.536a3f04e5. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23038 h.d90d0910dc' -PACKAGE_STRING='Yambo 5.2.0 r.23038 h.d90d0910dc' +PACKAGE_VERSION='5.2.0 r.23039 h.536a3f04e5' +PACKAGE_STRING='Yambo 5.2.0 r.23039 h.536a3f04e5' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23038 h.d90d0910dc to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23039 h.536a3f04e5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23038 h.d90d0910dc:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23039 h.536a3f04e5:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23038 h.d90d0910dc +Yambo configure 5.2.0 r.23039 h.536a3f04e5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23038 h.d90d0910dc, which was +It was created by Yambo $as_me 5.2.0 r.23039 h.536a3f04e5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23038" -SHASH="d90d0910dc" +SREVISION="23039" +SHASH="536a3f04e5" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23038 h.d90d0910dc, which was +This file was extended by Yambo $as_me 5.2.0 r.23039 h.536a3f04e5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23038 h.d90d0910dc +Yambo config.status 5.2.0 r.23039 h.536a3f04e5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c25aea1f76..f7249a68d3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23038 h.d90d0910dc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23039 h.536a3f04e5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23038" -SHASH="d90d0910dc" +SREVISION="23039" +SHASH="536a3f04e5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 5784666d33..7e47edfe11 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -173,8 +173,16 @@ subroutine col_driver(bare_NG,q) ! call cutoff_driver(q) q_norm(1)=q0_def_norm + ! + ! Here I rescale bare_qpg and RIM_qpg by a constant dielectric + ! function due to the environment. A similar rescaling is also done + ! in the subroutine rim_integrate_w for RIM_W. However, since RIM_W + ! is not linear in q+G, the rescaling there is more involved + ! + ! bare_qpg= q+G bare_qpg=bare_qpg*sqrt(eps_env) - RIM_qpg =RIM_qpg*sqrt(eps_env) + ! RIM_qpg= \int C/|q+G|**2 + RIM_qpg =RIM_qpg/eps_env ! endif ! diff --git a/src/coulomb/rim_integrate_w.F b/src/coulomb/rim_integrate_w.F index 5f0cfcb7c5..a4e8c856d4 100644 --- a/src/coulomb/rim_integrate_w.F +++ b/src/coulomb/rim_integrate_w.F @@ -10,7 +10,7 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) use pars, ONLY:SP,DP,pi use vec_operate, ONLY:iku_v_norm use R_lattice, ONLY:g_vec,RIM_n_rand_pts,k_grid_uc_vol,q0_def_norm,& -& RIM_W_ng,q_pt,b,RIM_W_is_diagonal,& +& RIM_W_ng,q_pt,b,RIM_W_is_diagonal,eps_env,& & RIM_W,f_coeff,cut_is_slab,idir,RIM_id_epsm1_reference use D_lattice, ONLY:alat,a use frequency, ONLY:w_samp @@ -49,12 +49,21 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) & ((qr(idir(3),i2)+q_pt(iq,idir(3))+g_vec(i1,idir(3)))/alat(idir(3)))**2) pre_factor=(1.-exp(-slab_vplane1*lcut)*cos(slab_vz1*lcut)) ! + ! This is the sqrt of eq. 7 in NPJ Mat 9, 44 (2023) + ! Accordingly here vslab=sqrt[v_G(q+q')] vslab(i2,i1) = sqrt(4._SP*pi*pre_factor/(slab_vplane1**2+slab_vz1**2)) ! enddo ! enddo ! + ! Here I rescale vslab by a constant dielectric function due to the environment. + ! A similar rescaling is also done in col_driver for bare_qpg and RIM_qpg + ! The final goal is to resale RIM_W. However, since RIM_W + ! is not linear in q+G, I need to rescale vslab + ! + vslab=vslab/sqrt(eps_env) + ! ! q /= 0 all terms ! !$omp parallel do default(shared), private(i1,i2,i3,func,RIM_acc) @@ -72,6 +81,8 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) & +qr(2,i3)*(f_coeff(3,i1,i2,iq,iw)+qr(2,i3)*f_coeff(6,i1,i2,iq,iw)& & +2._DP*qr(1,i3)*f_coeff(5,i1,i2,iq,iw)) ! Accumulate W + ! This is eq. 16 + eq 14 in NPJ Mat 9, 44 (2023) + ! Accordingly here vslab=sqrt[v_G(q+q')] RIM_acc = RIM_acc + rfac*vslab(i3,i1)**2*func*vslab(i3,i2)**2/(1._DP-vslab(i3,i1)*func*vslab(i3,i2)) enddo ! @@ -99,6 +110,8 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) !Regularization if (slab_vplane1 < 1.e-5) then vslab(i1,1) = sqrt(4._DP*pi*(1.-exp(-q0_def_norm*lcut))/q0_def_norm**2) + ! Again, rescaling of vslab due to epsilon environment + vslab(i1,1) = vslab(i1,1)/sqrt(eps_env) RIM_acc = RIM_acc + rfac*f_coeff(1,1,1,1,iw)*(4*pi*lcut)**2 RIM_acc_anis = RIM_acc_anis + rfac*f_coeff(1,1,1,1,iw)*(4*pi*lcut)**2 & & *0.5_SP*(em1_anis(idir(2))+em1_anis(idir(3))) @@ -107,6 +120,9 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) ! !Evaluate v_slab vslab2=4._DP*pi*(1.-exp(-slab_vplane1*lcut)) + ! Again, rescaling of vslab due to environment. + ! Notice that here this is not the sqrt. + vslab2 = vslab2/eps_env ! !Evaluate interpolation function func = f_coeff(1,1,1,1,iw)*exp(-sqrt((f_coeff(2,1,1,1,iw)*(qr(2,i1)+a(2,1)/a(1,1)*qr(1,i1)))**2+& @@ -119,7 +135,8 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) func = func*anis_fact RIM_acc_anis = RIM_acc_anis + rfac*vslab2*func*vslab2/(r1**2*(1-vslab2*func)) ! - !Store the square root of vslab + ! Store the square root of vslab + ! Here vlsab2 is already rescaled vslab(i1,1) = sqrt(vslab2)/r1 ! enddo From 420562b9dc37b296607ac653db836fad1e51188a Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 20 Mar 2024 18:21:55 +0100 Subject: [PATCH 0770/1367] Removed EXCPH_kind restoring original convention for excph matrix element --- src/exc-ph/.objects | 2 +- src/exc-ph/DOUBLE_project.dep | 3 +- src/exc-ph/ELPH_project.dep | 3 +- src/exc-ph/EXCPH_gkkp_driver.F | 25 +-- ...XCPH_gkkp_eval_pal.F => EXCPH_gkkp_eval.F} | 2 +- src/exc-ph/EXCPH_gkkp_eval_ber.F | 206 ------------------ src/interface/INIT_load.F | 3 +- src/io/io_EXCPH_SE.F | 4 +- src/io/io_EXCPH_gkkp.F | 7 +- src/modules/SET_defaults.F | 3 +- src/modules/mod_EXCPH.F | 5 - 11 files changed, 12 insertions(+), 251 deletions(-) rename src/exc-ph/{EXCPH_gkkp_eval_pal.F => EXCPH_gkkp_eval.F} (99%) delete mode 100644 src/exc-ph/EXCPH_gkkp_eval_ber.F diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 2d9f3fa546..06649e9228 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -1,5 +1,5 @@ #if defined _ELPH && !defined _YPP_ELPH -EQ_objs = EXCPH_gkkp_eval_ber.o EXCPH_gkkp_eval_pal.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ +EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o EXC_occupations.o \ EXCPH_X_phass_from_Hpert.o diff --git a/src/exc-ph/DOUBLE_project.dep b/src/exc-ph/DOUBLE_project.dep index f3592d99f1..a3fea3eab6 100644 --- a/src/exc-ph/DOUBLE_project.dep +++ b/src/exc-ph/DOUBLE_project.dep @@ -5,8 +5,7 @@ EXCPH_eval_renorm.o EXCPH_eval_sat.o EXCPH_gkkp_driver.o - EXCPH_gkkp_eval_ber.o - EXCPH_gkkp_eval_pal.o + EXCPH_gkkp_eval.o EXCPH_lifetime.o EXCPH_load_L.o EXCPH_optics.o diff --git a/src/exc-ph/ELPH_project.dep b/src/exc-ph/ELPH_project.dep index f3592d99f1..a3fea3eab6 100644 --- a/src/exc-ph/ELPH_project.dep +++ b/src/exc-ph/ELPH_project.dep @@ -5,8 +5,7 @@ EXCPH_eval_renorm.o EXCPH_eval_sat.o EXCPH_gkkp_driver.o - EXCPH_gkkp_eval_ber.o - EXCPH_gkkp_eval_pal.o + EXCPH_gkkp_eval.o EXCPH_lifetime.o EXCPH_load_L.o EXCPH_optics.o diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index af94c14de4..e5495e4f3b 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -47,7 +47,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BS_mat_out,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & -& n_exc_in,EXCPH_kind,EXCPH_kind_name,PALEARI,BERNARDI,BSE_alloc,BSE_free +& n_exc_in,BSE_alloc,BSE_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -100,19 +100,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call parser('ElectronContributionOnly', l_elec_only) call parser('HoleContributionOnly', l_hole_only) ! - ! Exciton-phonon kind - ! - select case (trim(EXCPH_kind_name)) - case('PALEARI') - EXCPH_kind=PALEARI - case('BERNARDI') - call error("Bernardi formulation not implemented") - case default - call error("Unknow exciton-phonon coupling type") - end select - ! - call msg('rs','Use coupling convention from',trim(EXCPH_kind_name)) - ! elph_branches_save =elph_branches call io_control(ACTION=OP_RD_CL,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. @@ -223,15 +210,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! do il=elph_branches(1),elph_branches(2) ! - if(EXCPH_kind==PALEARI) then - ! - call EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) - ! - elseif(EXCPH_kind==BERNARDI) then - ! -! call EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) - ! - endif + call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! call live_timing(steps=1) ! diff --git a/src/exc-ph/EXCPH_gkkp_eval_pal.F b/src/exc-ph/EXCPH_gkkp_eval.F similarity index 99% rename from src/exc-ph/EXCPH_gkkp_eval_pal.F rename to src/exc-ph/EXCPH_gkkp_eval.F index 443e0e0b20..c58e8bd550 100644 --- a/src/exc-ph/EXCPH_gkkp_eval_pal.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -27,7 +27,7 @@ ! ! GKKP formulation following the F. Paleari PhD thesis ! -subroutine EXCPH_gkkp_eval_pal(iq_s,iq_bz,il,k,q,ID_gkkp) +subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO,cONE !use electrons, ONLY:levels diff --git a/src/exc-ph/EXCPH_gkkp_eval_ber.F b/src/exc-ph/EXCPH_gkkp_eval_ber.F deleted file mode 100644 index 0050212310..0000000000 --- a/src/exc-ph/EXCPH_gkkp_eval_ber.F +++ /dev/null @@ -1,206 +0,0 @@ -! -! Copyright (C) 2000-2021 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM FP DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -! --- Theory --- -! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. -! - FP -! -! GKKP formulation following the PRL 125, 107401 (2020) -! -subroutine EXCPH_gkkp_eval_ber(iq_s,iq_bz,il,k,q,ID_gkkp) - ! - use pars, ONLY:SP,cZERO,rZERO,cONE - use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev - use R_lattice, ONLY:bz_samp,qindx_C - use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_free - use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & -& deliver_IO_error_message,manage_action,RD - use IO_int, ONLY:io_control - use BS, ONLY:BS_H_dim,BS_bands - use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map - use EXCPH, ONLY:BS_mat_in,EXCPH_gkkp,EXCPH_gkkp_sq,& -& EXCPH_states,EXCPH_sum,k_plus_q_table,& -& l_const_elph,l_abs_elph,l_abs_exc,BSS_eh_table_in - ! -#include - ! - type(bz_samp) ::k,q - integer, intent(in) :: iq_s,iq_bz,il!,iq - integer, intent(inout) :: ID_gkkp - ! - ! Work Space - ! - logical :: t_rev - integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& -& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT, & -& iv_in,ic_in,ik_bz_in - real(SP) :: ph_E - complex(SP) :: elph_gkkp,Xi_element - integer, external :: io_ELPH - ! - ! Loop scheme: - ! i_l ->i_beta ->i_star [load gkkp] ->i_H - ! ->ivp [Calculate Xi(1)] - ! ->icp [Calculate Xi(2)] - ! ->i_alpha ->i_H [Calculate Gkkp] - elph_gkkp=cONE - ! - t_rev= (iq_s>nsym/(i_time_rev+1)) - ! - ! - ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > - ! - ! with k and q in the BZ - ! - iq_db=Q_io_map(iq_bz) - IO_ACT=RD - if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) - ! - call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. - if(io_err/=0) call error(" Error reading gkkp_expanded") - ! - ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) - ! - if (ph_E ik_bz - ! - ! ip_bz = R_iq_s^-1 ik_bz - ! = R_iq_s^-1 R_ik_s ik_ibz - ! - ip_bz = elemental_scattering(iq_s,ik_minus_iq_bz) - ! - ! Conduction scattering - ! ====================== - ! - do icp=BS_bands(1),BS_bands(2) - ! - i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) - ! - if (i_Hp==0) cycle - ! -! ik_db=K_io_map(ik_plus_iq_bz) - ik_db=K_io_map(ik_minus_iq_bz) - elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) - ! - if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_beta)) - if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_beta) - ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - EXCPH_gkkp(il,i_beta,i_alpha)=EXCPH_gkkp(il,i_beta,i_alpha)+BS_mat_in(i_H,i_alpha)*Xi_element - enddo - ! - enddo - ! - enddo - ! - enddo !Loop i_beta - ! - do i_beta=EXCPH_sum(1),EXCPH_sum(2) - ! - do i_H=1,BS_H_dim - ! Valence Scattering - ! ========================= - ! - ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz - ip_bz = elemental_scattering(iq_s,ik_minus_iq_bz) - ! - do ivp=BS_bands(1),BS_bands(2) - ! - i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic,1,1) - ! - if (i_Hp==0) cycle - ! - ik_db=K_io_map(ik_minus_iq_bz) - elph_gkkp= GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) - ! - if(.not.t_rev) Xi_element=elph_gkkp*conjg(BS_mat(i_Hp,i_alpha)) - if( t_rev) Xi_element=elph_gkkp* BS_mat(i_Hp,i_alpha) - ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)-BS_mat_in(i_H,i_alpha)*Xi_element - enddo - ! - enddo - ! - enddo - ! - enddo !Loop i_beta - ! - ! Compute the squared couplings - ! - forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) - EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 - end forall - ! - contains - ! - integer function elemental_scattering(i_q_SYM,i_k_BZ) - ! - ! This is done because the BSE is solved for q in IBZ and k in BZ. - ! However the EXCPH matrix elements are for k in BZ and q in BZ. - ! - ! Therefore, I have the exc. weight (q |cRk vRk-q) - ! but I don't have the exc. weight (Sq |cRk vRk-Sq). - ! - ! Yet, I know that (Sq |cRk vRk-Sq) = (q |c{S^-1R}k v{S^-1R}k-q). - ! - ! Therefore, in this subroutine I look for p = {S^-1 R}k - ! - integer i_q_SYM,i_k_BZ,i_k_IBZ,i_k_SYM - ! - ! K_i_k_bz =R_i_k_SYM K_i_k_IBZ - ! - i_k_IBZ = k%sstar(i_k_BZ,1) - i_k_SYM = k%sstar(i_k_BZ,2) - ! - ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz - ! - elemental_scattering = k%k_table(i_k_IBZ, sop_tab(sop_inv(i_q_SYM),i_k_SYM) ) - ! - end function - ! -end subroutine diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 3a07d583e3..2ea4919188 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -92,7 +92,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #if defined _ELPH use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db - use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,EXCPH_kind_name,alphaQ, & + use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,alphaQ, & & EXCPH_deltaE_treshold use D_lattice, ONLY:Boltz_Temp #endif @@ -658,7 +658,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) - call it(defs,'ExcPhKind', '[EXCPH] Exciton-phonon kind (PALEARI | BERNARDI)',EXCPH_kind_name,verb_level=V_ph) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure 2D distortion',alphaQ) diff --git a/src/io/io_EXCPH_SE.F b/src/io/io_EXCPH_SE.F index 8c0b2add27..cf5befff0d 100644 --- a/src/io/io_EXCPH_SE.F +++ b/src/io/io_EXCPH_SE.F @@ -27,7 +27,7 @@ integer function io_EXCPH_SE(ID,what) use IO_m, ONLY:io_sec,read_is_on,frag_ELPH,io_status use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& & def_variable_bulk,io_variable_bulk,io_fragment - use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& + use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,& & BS_E_in,BS_Sat_E,BS_Sat_WEIGHT,BS_EXCPH_E,ph_EXCPH_E,& & BS_Sat_E_PH_abs,BS_Sat_WEIGHT_PH_abs use ELPH, ONLY:ph_modes,elph_branches @@ -61,7 +61,7 @@ integer function io_EXCPH_SE(ID,what) ! if (any((/io_sec(ID,:)==1/))) then ! - scat_type = kind_to_integers(EXCPH_kind) + scat_type = 3 ! io_EXCPH_gkkp=io_header(ID,R_LATT=.true.,KPTS=.true.,FRAG=frag_ELPH) ! diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index b48c612601..a93b4f09d8 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -27,9 +27,9 @@ integer function io_EXCPH_gkkp(ID) use IO_m, ONLY:io_sec,read_is_on,frag_ELPH,io_status use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,& & def_variable_bulk,io_variable_bulk,io_fragment - use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_kind,EXCPH_sum,EXCPH_states,& + use EXCPH, ONLY:EXCPH_Gkkp,EXCPH_Gkkp_sq,EXCPH_sum,EXCPH_states,& & BS_EXCPH_E,ph_EXCPH_E,EXCPH_q,L_kind_in,L_kind_out,Sat_alloc, & -& EXCPH_gkkp_alloc,EXCPH_kind +& EXCPH_gkkp_alloc use IO_int, ONLY:io_variable_elemental,def_variable_elemental use ELPH, ONLY:ph_modes use stderr, ONLY:intc @@ -73,9 +73,6 @@ integer function io_EXCPH_gkkp(ID) & VAR=" Exciton sum (scattered) :",I1=EXCPH_sum,CHECK=.true.,OP=(/"==","=="/)) ! call io_elemental(ID,& -& VAR=" Exciton-phonon kind :",I0=EXCPH_kind,CHECK=.true.,OP=(/"=="/)) - ! - call io_elemental(ID,& & VAR=" Phonon modes :",I0=ph_modes,CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 1a28a26fd4..bca5c7d849 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -67,7 +67,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use ELPH, ONLY:ph_modes,elph_nb,gsqF_energy_steps,eval_G_using_KK,use_PH_DbGd,EkplusQ_mode,gkkp_db,& & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,& & elph_bands - use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,EXCPH_kind_name,alphaQ, & + use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,alphaQ, & & EXCPH_deltaE_treshold #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl @@ -537,7 +537,6 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Lin_path ='none' Lout_path='none' EXCPH_states=(/1,1/) - EXCPH_kind_name='PALEARI' EXCPH_sum=(/1,1/) L_damping=0.0005/HA2EV ! set to 0.5 meV EXCPH_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff for denominator in the exc-ph spectra diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 05661bc7fc..ef17cdb620 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -44,13 +44,8 @@ module EXCPH integer :: EXCPH_sum(2) ! Internal states ("virtual") integer :: EXCPH_interband(2) ! Interband states real(SP), allocatable :: EXCPH_q(:,:) - character(schlen) :: EXCPH_kind_name - integer :: EXCPH_kind real(SP) :: EXC_q0(3) ! - integer, parameter :: PALEARI = 1 - integer, parameter :: BERNARDI = 2 - ! ! L_in and L_out paths ! character(lchlen) :: Lin_path From 780b11edfb98cd549358e3c6ee0c9e04efe565c0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 22 Mar 2024 17:47:26 +0100 Subject: [PATCH 0771/1367] Version 5.2.0, Revision 23213, Hash cc5a0f7090 MODIFIED * configure include/version/version.m4 modules/mod_fields.F real_time_propagation/RT_Ext_fields.F ypp/real_time/RT_X_LRR_real_field.F ypp/real_time/RT_X_qssin.F ypp/real_time/RT_fields.F Bugs: - [yambo_sc] compilation fixed Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/modules/mod_fields.F | 17 ++++++++--------- src/real_time_propagation/RT_Ext_fields.F | 6 +++--- ypp/real_time/RT_X_LRR_real_field.F | 8 ++++---- ypp/real_time/RT_X_qssin.F | 4 ++-- ypp/real_time/RT_fields.F | 12 +++++++----- 7 files changed, 38 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 20660ffdff..695715b3a2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23181 h.ad3e097f22. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23213 h.cc5a0f7090. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23181 h.ad3e097f22' -PACKAGE_STRING='Yambo 5.2.0 r.23181 h.ad3e097f22' +PACKAGE_VERSION='5.2.0 r.23213 h.cc5a0f7090' +PACKAGE_STRING='Yambo 5.2.0 r.23213 h.cc5a0f7090' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23181 h.ad3e097f22 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23213 h.cc5a0f7090 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23181 h.ad3e097f22:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23213 h.cc5a0f7090:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23181 h.ad3e097f22 +Yambo configure 5.2.0 r.23213 h.cc5a0f7090 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23181 h.ad3e097f22, which was +It was created by Yambo $as_me 5.2.0 r.23213 h.cc5a0f7090, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23181" -SHASH="ad3e097f22" +SREVISION="23213" +SHASH="cc5a0f7090" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23181 h.ad3e097f22, which was +This file was extended by Yambo $as_me 5.2.0 r.23213 h.cc5a0f7090, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23181 h.ad3e097f22 +Yambo config.status 5.2.0 r.23213 h.cc5a0f7090 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 6858ef5338..b5eb9a521f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23181 h.ad3e097f22, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23213 h.cc5a0f7090, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23181" -SHASH="ad3e097f22" +SREVISION="23213" +SHASH="cc5a0f7090" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index a1b04da640..07616fd742 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -126,7 +126,7 @@ integer function get_field_file_index(filename) enddo end function ! - function small_a(T,E_field,order,envelop_only) + function small_a(T,dt,E_field,order,envelop_only) ! ! The vector potential is generally written as ! @@ -143,11 +143,10 @@ function small_a(T,E_field,order,envelop_only) use pars, ONLY:cI,cONE,cZERO,pi,schlen use wrapper, ONLY:FADEVA use functions, ONLY:theta_function - use real_time, ONLY:RT_dyn_step ! type(ext_field), intent(inout) ::E_field ! - real(SP), intent(in) ::T + real(SP), intent(in) ::T,dt integer, intent(in) ::order logical, intent(in), optional :: envelop_only ! @@ -290,7 +289,7 @@ function small_a(T,E_field,order,envelop_only) ! select case( trim(field_defs(1)) ) case('FROM_FILE') - i_T=nint((T-T_0)/(RT_dyn_step/2._SP))+1 + i_T=nint((T-T_0)/(dT/2._SP))+1 if (i_T<=0.or.envelop_only_) then f_now=0 else @@ -306,15 +305,15 @@ function small_a(T,E_field,order,envelop_only) ! case('RECT') if (order==0 ) f_now= Tloc - if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0) ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1) ! delta function + if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function ! case('RECTSIN') if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now= theta_function(sigma-T,RT_dyn_step,0)*f1t ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,RT_dyn_step,1)*f1t & ! delta function - &+theta_function(sigma-T,RT_dyn_step,0)*f0t*der_fac + if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function + &+theta_function(sigma-T,dT,0)*f0t*der_fac ! case('SIN') if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) diff --git a/src/real_time_propagation/RT_Ext_fields.F b/src/real_time_propagation/RT_Ext_fields.F index 8ed8a0f20b..8a9e836859 100644 --- a/src/real_time_propagation/RT_Ext_fields.F +++ b/src/real_time_propagation/RT_Ext_fields.F @@ -67,9 +67,9 @@ subroutine RT_Ext_fields(A,time,i_f) ! do ikind=1,2 ! - A_of_t=small_a(Field_time,Efield(i_f),0,envelop_only=(ikind==1)) - E_of_t=small_a(Field_time,Efield(i_f),1,envelop_only=(ikind==1)) - J_of_t=small_a(Field_time,Efield(i_f),2,envelop_only=(ikind==1)) + A_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),0,envelop_only=(ikind==1)) + E_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),1,envelop_only=(ikind==1)) + J_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),2,envelop_only=(ikind==1)) ! ! DEBUG < if (ikind==2.and.l_print_to_file) then diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 1d09bdb7fb..414637000e 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -81,10 +81,10 @@ subroutine RT_X_LRR_real_field(en) do i_t=1,RT_conf%T_n_steps ! Field_time=RT_time(i_t)-Efield(i_Probe)%t_initial - A_of_t =small_a(Field_time,Efield(i_Probe),0) - E_of_t =small_a(Field_time,Efield(i_Probe),1) - theta =theta_function(Field_time,RT_time(2)-RT_time(1),0) - delta =theta_function(Field_time,RT_time(2)-RT_time(1),1) + A_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),0) + E_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),1) + theta =theta_function(Field_time,RT_conf%delta_T,0) + delta =theta_function(Field_time,RT_conf%delta_T,1) ! do i_field=1,n_fields Fac=Efield(i_Probe)%amplitude diff --git a/ypp/real_time/RT_X_qssin.F b/ypp/real_time/RT_X_qssin.F index 0bcd65c3f5..064c321302 100644 --- a/ypp/real_time/RT_X_qssin.F +++ b/ypp/real_time/RT_X_qssin.F @@ -48,8 +48,8 @@ subroutine RT_X_qssin YAMBO_ALLOC(E_t,(RT_conf%T_n_steps)) do i_t=1,RT_conf%T_n_steps Field_time=(i_t-1)*RT_conf%delta_T-Efield(i_Probe)%t_initial - A_of_t =small_a(Field_time,Efield(i_Probe),0) - E_of_t =small_a(Field_time,Efield(i_Probe),1) + A_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),0) + E_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),1) theta =theta_function(Field_time,RT_conf%delta_T,0) delta =theta_function(Field_time,RT_conf%delta_T,1) select case(Efield(i_Probe)%ef_pol) diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F index e8dab93523..286904c66f 100644 --- a/ypp/real_time/RT_fields.F +++ b/ypp/real_time/RT_fields.F @@ -106,17 +106,19 @@ subroutine RT_Field_t_to_w(i_field) integer, intent(in) :: i_field ! integer :: i_t - real(SP) :: Field_time + real(SP) :: Field_time,dT ! ElField%title="Field" ElField%N =6 - call RT_1D_Fourier_setup(ElField,RT_conf,6) + call RT_1D_Fourier_setup(ElField,RT_conf,6) + ! + dT=RT_conf%delta_T ! do i_t=1,RT_conf%T_n_steps Field_time=RT_time(i_t)-Efield(i_field)%t_initial - ElField%F_t(i_t,1:2) =small_a(Field_time,Efield(i_field),0) - ElField%F_t(i_t,3:4) =small_a(Field_time,Efield(i_field),1) - ElField%F_t(i_t,5:6) =small_a(Field_time,Efield(i_field),2) + ElField%F_t(i_t,1:2) =small_a(Field_time,dT,Efield(i_field),0) + ElField%F_t(i_t,3:4) =small_a(Field_time,dT,Efield(i_field),1) + ElField%F_t(i_t,5:6) =small_a(Field_time,dT,Efield(i_field),2) enddo ! call RT_print_Elfield(1,"time",Elfield) From 2e514946a30f2f6ea92c76e17d4e6b3545a02aae Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 26 Mar 2024 22:36:35 +0100 Subject: [PATCH 0772/1367] Version 5.2.0, Revision 23316, Hash 26b6f6ea8e MODIFIED * configure include/version/version.m4 Changes: - [yambo] Configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 45 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 99c155f29c..a292788f60 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23298 h.3b524d599e. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23316 h.26b6f6ea8e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23298 h.3b524d599e' -PACKAGE_STRING='Yambo 5.2.0 r.23298 h.3b524d599e' +PACKAGE_VERSION='5.2.0 r.23316 h.26b6f6ea8e' +PACKAGE_STRING='Yambo 5.2.0 r.23316 h.26b6f6ea8e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -711,6 +711,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -889,6 +890,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -948,6 +951,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1600,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23298 h.3b524d599e to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23316 h.26b6f6ea8e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23298 h.3b524d599e:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23316 h.26b6f6ea8e:";; esac cat <<\_ACEOF @@ -1679,6 +1683,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1876,7 +1881,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23298 h.3b524d599e +Yambo configure 5.2.0 r.23316 h.26b6f6ea8e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2510,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23298 h.3b524d599e, which was +It was created by Yambo $as_me 5.2.0 r.23316 h.26b6f6ea8e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3268,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23298" -SHASH="3b524d599e" +SREVISION="23316" +SHASH="26b6f6ea8e" @@ -3416,6 +3421,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15479,6 +15498,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15647,6 +15669,7 @@ fi + # @@ -16578,7 +16601,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23298 h.3b524d599e, which was +This file was extended by Yambo $as_me 5.2.0 r.23316 h.26b6f6ea8e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16665,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23298 h.3b524d599e +Yambo config.status 5.2.0 r.23316 h.26b6f6ea8e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3fc348a751..10bf44a799 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23298 h.3b524d599e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23316 h.26b6f6ea8e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23298" -SHASH="3b524d599e" +SREVISION="23316" +SHASH="26b6f6ea8e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From b018532d8cefe7d1c3e7d44d3a07d9570b304dab Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Tue, 9 Apr 2024 18:52:54 +0200 Subject: [PATCH 0773/1367] - Added unitary rotations of the exc wfc in the exc-ph driver - Read LetzElPhC-generated el-ph matrix elements in the exc-ph part --- .gitignore | 3 +- src/driver/options_projects.c | 2 +- src/exc-ph/.objects | 2 +- src/exc-ph/ELEC_WF_phases.F | 81 +++++++++++++++++++ src/exc-ph/EXCPH_gkkp_driver.F | 142 +++++++++++---------------------- src/exc-ph/EXCPH_gkkp_eval.F | 78 ++++++++---------- src/exc-ph/code_input.f90 | 41 ---------- src/modules/mod_EXCPH.F | 42 +++++++++- 8 files changed, 205 insertions(+), 186 deletions(-) create mode 100644 src/exc-ph/ELEC_WF_phases.F delete mode 100644 src/exc-ph/code_input.f90 diff --git a/.gitignore b/.gitignore index acd38eb3e0..0283745492 100644 --- a/.gitignore +++ b/.gitignore @@ -23,11 +23,12 @@ lib/archive/git.list # Compiled source # ################### +src/*/*.o_to_save +ypp/*/*.o_to_save *.com *.class *.dll *.o -*.o_to_save # temporary *.a *.so *.mod diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index a46af830cc..baed276d00 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -72,7 +72,7 @@ void options_projects(struct options_struct options[],int *i_opt) options[*i_opt].yambo_string="ElPhHam"; options[*i_opt].section=desc; *i_opt=*i_opt+1; - options[*i_opt].short_desc="Exction-phonon"; + options[*i_opt].short_desc="Exciton-phonon"; options[*i_opt].long_desc[0]="=(o)ptical spectra,(l)ife times"; options[*i_opt].long_opt="excph"; options[*i_opt].char_var=1; diff --git a/src/exc-ph/.objects b/src/exc-ph/.objects index 06649e9228..97113df687 100644 --- a/src/exc-ph/.objects +++ b/src/exc-ph/.objects @@ -2,7 +2,7 @@ EQ_objs = EXCPH_gkkp_eval.o EXCPH_gkkp_driver.o EXCPH_load_L.o EXCPH_lifetime.o EXC_dipole.o \ EXCPH_eval_sat.o EXCPH_optics.o EXCPH_X_phass.o Satellite_Simple.o Satellite_DbGrid.o \ EXCPH_double_grid_setup.o EXCPH_eval_renorm.o EXCPH_ave_sat_DbGrid.o EXC_occupations.o \ - EXCPH_X_phass_from_Hpert.o + EXCPH_X_phass_from_Hpert.o ELEC_WF_phases.o #endif #if defined _YPP_ELPH EQ_objs = EXC_occupations.o diff --git a/src/exc-ph/ELEC_WF_phases.F b/src/exc-ph/ELEC_WF_phases.F new file mode 100644 index 0000000000..5b114a8cfe --- /dev/null +++ b/src/exc-ph/ELEC_WF_phases.F @@ -0,0 +1,81 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS FP +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +!! Code taken from branch phys-excitons +!! file ypp/excitons/exciton_symmetries.f90 +! +subroutine ELEC_WF_phases(E,k) + ! + use D_lattice, ONLY:nsym + use R_lattice, ONLY:bz_samp + use wave_func, ONLY:io_WF_phases,WF_phases_b_map,WF_phases + use electrons, ONLY:levels,n_sp_pol + use BS, ONLY:BS_bands + use IO_m, ONLY:RD,OP_RD,DUMP,REP + use IO_int, ONLY:io_control + ! +#include + ! + type(levels) ::E + type(bz_samp) ::k + ! + ! Work Space + ! + integer :: nsz(5) + integer :: ID_phases,io_err + integer :: i_sp_pol,ik,il1 + ! + ! Electronic part of the symmetries + ! + call k_build_up_BZ_tables(k) + call k_ibz2bz(k,'iku',.true.) + call k_small_group(k) + ! + call WF_phase_matrices(E,k,BS_bands,(/1,k%nibz/)) + ! + YAMBO_ALLOC(WF_phases_b_map,(BS_bands(1):BS_bands(2),k%nibz,n_sp_pol,2)) + ! + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1,2/),MODE=DUMP,ID=ID_phases) + io_err=io_WF_phases(BS_bands,0,0,0,ID_phases,(/0,0,0,0,0/)) + ! + nsz(1:2)=maxval(WF_phases_b_map(:,:,:,1)) + nsz(3) =maxval(WF_phases_b_map(:,:,:,2)) + nsz(4) =nsym + nsz(5) =k%nbz + YAMBO_ALLOC(WF_phases,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) + ! + do i_sp_pol=1,n_sp_pol + do ik=1,k%nibz + nsz(1:2)=maxval(WF_phases_b_map(:,ik,i_sp_pol,1)) + nsz(3) =maxval(WF_phases_b_map(:,ik,i_sp_pol,2)) + nsz(4) =nsym + nsz(5) =k%nstar(ik) + il1=1 + if(ik>0) il1= sum(k%nstar(:ik-1))+1 + call io_control(ACTION=RD,COM=REP,SEC=(/3/),MODE=DUMP,ID=ID_phases) + io_err=io_WF_phases( BS_bands,ik,0,i_sp_pol,ID_phases,nsz, & +& WF_phases(:nsz(1),:nsz(2),:nsz(3),:,il1:il1+nsz(5)-1) ) + enddo + enddo + ! +end subroutine \ No newline at end of file diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index e5495e4f3b..27c22b9090 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -34,12 +34,12 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! use pars, ONLY:SP,cZERO,rZERO,schlen - use electrons, ONLY:levels,n_sp_pol + use electrons, ONLY:levels!,n_sp_pol use R_lattice, ONLY:bz_samp,qindx_B !_load use parser_m, ONLY:parser use X_m, ONLY:X_t - use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BS_H_dim,BSS_n_eig,BSS_alloc,BSS_free - use BS, ONLY:BS_H_dim,BS_bands,BSqpts + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_alloc,BSS_free!,BS_H_dim,BSS_n_eig + !use BS, ONLY:BSqpts,BS_H_dim,BS_bands use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END,manage_action @@ -47,7 +47,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BS_mat_out,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & -& n_exc_in,BSE_alloc,BSE_free +& n_exc_in,BSE_alloc,BSE_free,BSE_in_alloc,BSE_out_alloc,BSE_in_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -102,10 +102,12 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! elph_branches_save =elph_branches call io_control(ACTION=OP_RD_CL,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + ! Here we read the fully k-expanded and q-expanded matrix elements from the SAVE. + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') elph_branches =elph_branches_save ! - ! I build the map only in the case without symmetries + ! We build the q-phonon / q-yambo map only in the case without symmetries, + ! where we expect the indices to differ. if(io_err==0) then l_GKKP_expanded_DB_exists=.true. call ELPH_databases_grids_map(k,q) @@ -125,11 +127,14 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call timing('EXCPH_gkkp',OPR='start') ! - call EXCPH_load_L(1,X,'check','Lin') ! At present the Lin can be only gamma iq=1 - ! call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) ! + ! Pre-requisite: calculate electronic phases (needed to rotate the excitonic wavefunctions) + call ELEC_WF_phases(E,k) + ! + call EXCPH_load_L(1,X,'check','Lin') ! At present the Lin can be only gamma iq=1 + ! call BSS_alloc() ! call BSE_alloc(k,q) @@ -138,10 +143,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Alloc BS_in variables ! - call BSE_in_alloc() - call BSE_out_alloc() + call BSE_in_alloc(k) ! computed at the BSE step + call BSE_out_alloc() ! rotated via unitary transformations ! - ! Alloage EXCPH_gkkp + ! Allocate EXCPH_gkkp ! call EXCPH_gkkp_alloc() ! @@ -203,6 +208,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) iq_bz = q%k_table(iq,iq_s) ! BS_mat_out=cZERO + ! Here we obtain the rotated BS_mat_out at iq_bz call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,.false.) ! EXCPH_gkkp =cZERO @@ -210,14 +216,12 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! do il=elph_branches(1),elph_branches(2) ! - call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) + call EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! Calculation of the exc-ph matrix element at iq_bz ! call live_timing(steps=1) ! enddo ! - ! Add the WEIGHTs factor to calculate the renormalization factors - ! iq_db=Q_io_map(iq_bz) ! ! I/O @@ -230,10 +234,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! enddo ! - ! [FP] DEBUG - ! call compare_qindxC_table() - ! [FP] END DEBUG - ! call live_timing( ) ! call BSS_free() @@ -251,38 +251,37 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! contains ! - subroutine BSE_in_alloc() - implicit none - ! - ! pre-allocs... - ! - YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) - YAMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) - YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) - ! - BS_mat_in=cZERO - BS_E_in =cZERO - BSS_eh_table_in = 0 - BSS_eh_table_m1_in = 0 - ! - end subroutine BSE_in_alloc + ! subroutine BSE_in_alloc() + ! implicit none + ! ! + ! ! pre-allocs... + ! ! + ! !AMBO_ALLOC(BS_E_in,(BSS_n_eig)) + ! !AMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) + ! !AMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) + ! !AMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + ! ! + ! BS_mat_in=cZERO + ! BS_E_in =cZERO + ! BSS_eh_table_in = 0 + ! BSS_eh_table_m1_in = 0 + ! ! + ! end subroutine BSE_in_alloc ! - subroutine BSE_out_alloc() - implicit none - ! - YAMBO_ALLOC(BS_mat_out,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) - BS_mat_out=cZERO - ! - end subroutine BSE_out_alloc + ! subroutine BSE_out_alloc() + ! implicit none + ! ! + ! !AMBO_ALLOC(BS_mat_out,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) + ! BS_mat_out=cZERO + ! ! + ! end subroutine BSE_out_alloc ! - subroutine BSE_in_free - implicit none - YAMBO_FREE(BS_E_in) - YAMBO_FREE(BS_mat_in) - YAMBO_FREE(BSS_eh_table_in) - YAMBO_FREE(BSS_eh_table_m1_in) - end subroutine BSE_in_free + ! subroutine BSE_in_free + ! implicit none + ! !AMBO_FREE(BS_mat_in) + ! !AMBO_FREE(BSS_eh_table_in) + ! !AMBO_FREE(BSS_eh_table_m1_in) + ! end subroutine BSE_in_free ! subroutine get_excph_q_momenta() ! @@ -290,15 +289,12 @@ subroutine get_excph_q_momenta() ! call k_ibz2bz(q,"i",.false.) ! -! write(*,*) -! write(*,*) 'Excitoni q-list in the BZ ' do iq=1,q%nibz ! do i_star=1,q%nstar(iq) ! iq_s=q%star(iq,i_star) iq_bz = q%k_table(iq, iq_s) -! write(*,*) iq_bz,q%ptbz(iq_bz,:) ! EXCPH_q(iq_bz,:) = q%ptbz(iq_bz,:) ! @@ -348,48 +344,4 @@ subroutine build_k_plus_q_table() ! end subroutine build_k_plus_q_table ! - ! - subroutine compare_qindxC_table() - ! - ! [FP] DEBUG FUNCTION (to be removed?) - ! - use R_lattice, ONLY:qindx_C - ! - integer :: ik_plus_iq_C, ik_plus_iq_tbl, ik_bz - integer :: iq,i_star,iq_s,iq_bz - ! - !call build_k_plus_q_table() - call k_ibz2bz(q,"i",.false.) - call k_ibz2bz(k,"i",.false.) - ! - do ik_bz=1, k%nbz - write(*,*) ik_bz,k%ptbz(ik_bz,:) - enddo - ! - do iq=1,q%nibz - ! - do i_star=1,q%nstar(iq) - ! - iq_s=q%star(iq,i_star) - iq_bz = q%k_table(iq, iq_s) - ! - do ik_bz=1, k%nbz - ! - ik_plus_iq_C = qindx_C(ik_bz,iq_bz,1) - ik_plus_iq_tbl = k_plus_q_table(ik_bz,iq_bz) - write(*,*) k%ptbz(ik_bz,:),q%ptbz(iq_bz,:) - write(*,*) k%ptbz(ik_plus_iq_C,:),ik_plus_iq_C - write(*,*) k%ptbz(ik_plus_iq_tbl,:),ik_plus_iq_tbl - ! - enddo - ! - enddo - enddo - ! - call k_ibz2bz(q,"d",.false.) - call k_ibz2bz(k,"d",.false.) - ! - end subroutine compare_qindxC_table - ! - ! end subroutine diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index c58e8bd550..19f2b70667 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -21,23 +21,17 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -! --- Theory --- -! (5) Figure out rotations/symmetry of EPC m.e. -! - FP -! ! GKKP formulation following the F. Paleari PhD thesis ! subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO,cONE - !use electrons, ONLY:levels use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev use R_lattice, ONLY:bz_samp,qindx_C use BS_solvers, ONLY:io_BSS_diago,BSS_eh_table_m1,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD use IO_int, ONLY:io_control - !use X_m, ONLY:X_t use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,BS_mat_out,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& @@ -46,9 +40,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! #include ! - !type(levels) ::E type(bz_samp) ::k,q - !type(X_t) ::X integer, intent(in) :: iq_s,iq_bz,il!,iq integer, intent(inout) :: ID_gkkp ! @@ -61,7 +53,6 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) real(SP) :: ph_E complex(SP) :: elph_gkkp integer, external :: io_ELPH - !complex(SP) :: aux_phase_1,aux_phase_2 ! ! Loop scheme: ! i_l ->i_beta ->i_star [load gkkp] ->i_H @@ -79,12 +70,14 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! with k and q in the BZ ! + ! El-ph rotated or nosym. The wfc gauge and rotation phases must match WF_phases. + ! iq_db=Q_io_map(iq_bz) IO_ACT=RD if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) ! call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') ! For now we have to work in the full BZ by turning all symmetries off. + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') if(io_err/=0) call error(" Error reading gkkp_expanded") ! ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) @@ -109,12 +102,6 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz ! - ! DS note: I think here the choice is not unique - ! given a ik_bz there maybe multiple ik_s which send ik_ibz --> ik_bz - ! - ! ip_bz = R_iq_s^-1 ik_bz - ! = R_iq_s^-1 R_ik_s ik_ibz - ! ip_bz = ik_bz ! elemental_scattering(iq_s,ik_bz) ! ! 1=DOWN (hole contribution) @@ -127,20 +114,20 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic,1,1) if (i_Hp==0) cycle ! - ! [NB] Here we apply the conj and SWAP band indices in the matrix elements - ! Notes: (iv,ivp) => Code: (ivp,iv) - ! See issues #690 and #609 + ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, + ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg + ! and SWAP band indices in the matrix elements: we use the NOTES indexing. + ! !!!Notes: (iv,ivp) => Code: (ivp,iv) + ! !!!See issues #690 and #609 if (.not.l_const_elph) then ik_db=K_io_map(ik_bz) - if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ivp,iv,ik_db,1)) /sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp= abs(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) !ik_db=K_io_map(ik_minus_iq_bz) - !elph_gkkp=GKKP%dVc(il,ivp,iv,ik_db,1)/sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp=GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) + !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ivp,iv,ik_db,1)) /sqrt(2._SP*ph_E) + !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) endif ! - !ik_db=K_io_map(ik_bz) - !write(*,*) elph_gkkp,conjg(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) - ! !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) ! if (l_abs_exc) then @@ -152,8 +139,6 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! enddo ! - ! ip_bz = R_iq_s^-1 R_ik_s ik_ibz - ! ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) ! ! 2=UP (electron contribution) @@ -165,15 +150,18 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) if (i_Hp==0) cycle - ! [NB] Here we apply the conj and SWAP band indices in the matrix elements - ! Notes: (icp,ic) => Code: (ic,icp) - ! See issues #690 and #609 + ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, + ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg + ! and SWAP band indices in the matrix elements: we use the NOTES indexing. + ! !!!Notes: (icp,ic) => Code: (ic,icp) + ! !!!See issues #690 and #609 if (.not.l_const_elph) then ik_db=K_io_map(ik_plus_iq_bz) - if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) !ik_db=K_io_map(ik_bz) - !elph_gkkp=GKKP%dVc(il,ic,icp,ik_db,1)/sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) + !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) endif if (l_abs_exc) then Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) @@ -211,15 +199,12 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate ! - !aux_phase_1 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,1)), REAL(Xi(i_H,1)) ) ) - !aux_phase_2 = EXP( (0.0,1.0)*ATAN2( AIMAG(Xi(i_H,2)), REAL(Xi(i_H,2)) ) ) - ! if (l_abs_exc) then EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) +& abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2)) else EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2))!*conjg(aux_phase_2)*aux_phase_1) +& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2)) endif ! enddo @@ -230,13 +215,14 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! Compute the squared couplings ! forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) - !EXCPH_Gkkp_sq(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)*conjg(EXCPH_Gkkp(il,i_beta,i_alpha)) EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 end forall ! - contains + !contains ! - integer function elemental_scattering(i_q_SYM,i_k_BZ) + !integer function elemental_scattering(i_q_SYM,i_k_BZ) + ! + ! OUTDATED: now we use the correctly-rotated BS_mat_out already in the q_BZ ! ! This is done because the BSE is solved for q in IBZ and k in BZ. ! However the EXCPH matrix elements are for k in BZ and q in BZ. @@ -248,17 +234,17 @@ integer function elemental_scattering(i_q_SYM,i_k_BZ) ! ! Therefore, in this subroutine I look for p = {S^-1 R}k ! - integer i_q_SYM,i_k_BZ,i_k_IBZ,i_k_SYM + !integer i_q_SYM,i_k_BZ,i_k_IBZ,i_k_SYM ! ! K_i_k_bz =R_i_k_SYM K_i_k_IBZ ! - i_k_IBZ = k%sstar(i_k_BZ,1) - i_k_SYM = k%sstar(i_k_BZ,2) + !i_k_IBZ = k%sstar(i_k_BZ,1) + !i_k_SYM = k%sstar(i_k_BZ,2) ! ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz ! - elemental_scattering = k%k_table(i_k_IBZ, sop_tab(sop_inv(i_q_SYM),i_k_SYM) ) + !elemental_scattering = k%k_table(i_k_IBZ, sop_tab(sop_inv(i_q_SYM),i_k_SYM) ) ! - end function + !end function ! end subroutine diff --git a/src/exc-ph/code_input.f90 b/src/exc-ph/code_input.f90 deleted file mode 100644 index 0c80039a47..0000000000 --- a/src/exc-ph/code_input.f90 +++ /dev/null @@ -1,41 +0,0 @@ - ! code taken from branch phys-excitons - ! file ypp/excitons/exciton_symmetries.f90 - - use wave_func, ONLY:io_WF_phases,WF_phases_b_map,WF_phases - ! - ! Electrons part (pre-requisite) - ! - call k_build_up_BZ_tables(Xk) - call k_ibz2bz(Xk,'iku',.true.) - call k_small_group(Xk) - ! - call WF_phase_matrices(Xen,Xk,BS_bands,(/1,Xk%nibz/)) - ! - YAMBO_ALLOC(WF_phases_b_map,(BS_bands(1):BS_bands(2),Xk%nibz,n_sp_pol,2)) - ! - call io_control(ACTION=OP_RD,COM=REP,SEC=(/1,2/),MODE=DUMP,ID=ID) - io_err=io_WF_phases(BS_bands,0,0,0,ID,(/0,0,0,0,0/)) - ! - call parser("MinimizeMem",l_min_mem) - ! - if (.not.l_min_mem) then - nsz(1:2)=maxval(WF_phases_b_map(:,:,:,1)) - nsz(3) =maxval(WF_phases_b_map(:,:,:,2)) - nsz(4) =nsym - nsz(5) =Xk%nbz - YAMBO_ALLOC(WF_phases,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) - ! - do i_sp_pol=1,n_sp_pol - do ik=1,Xk%nibz - nsz(1:2)=maxval(WF_phases_b_map(:,ik,i_sp_pol,1)) - nsz(3) =maxval(WF_phases_b_map(:,ik,i_sp_pol,2)) - nsz(4) =nsym - nsz(5) =Xk%nstar(ik) - il1=1 - if(ik>0) il1= sum(Xk%nstar(:ik-1))+1 - call io_control(ACTION=RD,COM=REP,SEC=(/3/),MODE=DUMP,ID=ID) - io_err=io_WF_phases( BS_bands,ik,0,i_sp_pol,ID,nsz, & - & WF_phases(:nsz(1),:nsz(2),:nsz(3),:,il1:il1+nsz(5)-1) ) - enddo - enddo - endif diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index ef17cdb620..8415f97d3d 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -122,7 +122,39 @@ module EXCPH real(SP) :: alphaQ ! contains - ! + ! + subroutine BSE_in_alloc(k) + ! + ! pre-allocs... + ! + use R_lattice, ONLY:bz_samp + use electrons, ONLY:n_sp_pol + use BS, ONLY:BS_bands + ! +#include + ! + type(bz_samp) ::k + ! + YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) + YAMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) + YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) + YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + ! + BS_mat_in=cZERO + BS_E_in =cZERO + BSS_eh_table_in = 0 + BSS_eh_table_m1_in = 0 + ! + end subroutine BSE_in_alloc + ! + subroutine BSE_out_alloc() + implicit none + ! + YAMBO_ALLOC(BS_mat_out,(BS_H_dim,EXCPH_sum(1):EXCPH_sum(2))) + BS_mat_out=cZERO + ! + end subroutine BSE_out_alloc + ! subroutine Sat_alloc() implicit none YAMBO_ALLOC(BS_Sat_E,(ph_modes,EXCPH_sum(1):EXCPH_sum(2),EXCPH_states(1):EXCPH_states(2))) @@ -256,6 +288,14 @@ subroutine BSE_free YAMBO_FREE(BSqpts) end subroutine BSE_free ! + subroutine BSE_in_free + implicit none + YAMBO_FREE(BS_E_in) + YAMBO_FREE(BS_mat_in) + YAMBO_FREE(BSS_eh_table_in) + YAMBO_FREE(BSS_eh_table_m1_in) + end subroutine BSE_in_free + ! subroutine build_Q_map(q) use R_lattice, ONLY:bz_samp use zeros, ONLY:k_iku_zero From 652f01bfc015e94876f6b80530d5796ca4c135f9 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 11 Apr 2024 11:47:01 +0200 Subject: [PATCH 0774/1367] Fixed time-reversal + removed old contained functions --- src/exc-ph/EXCPH_gkkp_driver.F | 32 ----------------------------- src/exc-ph/EXCPH_gkkp_eval.F | 20 +++++------------- src/wf_and_fft/EXC_WF_symm_qpoint.F | 6 +++++- 3 files changed, 10 insertions(+), 48 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 27c22b9090..b061801ece 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -250,38 +250,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) return ! contains - ! - ! subroutine BSE_in_alloc() - ! implicit none - ! ! - ! ! pre-allocs... - ! ! - ! !AMBO_ALLOC(BS_E_in,(BSS_n_eig)) - ! !AMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) - ! !AMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) - ! !AMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) - ! ! - ! BS_mat_in=cZERO - ! BS_E_in =cZERO - ! BSS_eh_table_in = 0 - ! BSS_eh_table_m1_in = 0 - ! ! - ! end subroutine BSE_in_alloc - ! - ! subroutine BSE_out_alloc() - ! implicit none - ! ! - ! !AMBO_ALLOC(BS_mat_out,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) - ! BS_mat_out=cZERO - ! ! - ! end subroutine BSE_out_alloc - ! - ! subroutine BSE_in_free - ! implicit none - ! !AMBO_FREE(BS_mat_in) - ! !AMBO_FREE(BSS_eh_table_in) - ! !AMBO_FREE(BSS_eh_table_m1_in) - ! end subroutine BSE_in_free ! subroutine get_excph_q_momenta() ! diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 19f2b70667..8d8f762edc 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -46,7 +46,6 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! Work Space ! - logical :: t_rev integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& & iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT, & & iv_in,ic_in,ik_bz_in @@ -62,8 +61,6 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) Xi=cZERO ! elph_gkkp=cONE - ! - t_rev= (iq_s>nsym/(i_time_rev+1)) ! ! ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > @@ -130,12 +127,8 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) ! - if (l_abs_exc) then - Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - else - if(.not.t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) - if( t_rev) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat_out(i_Hp,i_beta) - endif + if (l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) + if (.not.l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat_out(i_Hp,i_beta) ! enddo ! @@ -163,12 +156,9 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) endif - if (l_abs_exc) then - Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - else - if(.not.t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) - if( t_rev) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat_out(i_Hp,i_beta) - endif + ! + if (l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) + if (.not.l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat_out(i_Hp,i_beta) ! enddo ! diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F index e0aa3542de..89b8edcb09 100644 --- a/src/wf_and_fft/EXC_WF_symm_qpoint.F +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -30,6 +30,7 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& ! ! Work space ! + logical :: t_rev integer :: iexc,il,ik,istark,isk,ikbz,ipbz,ipmqbz,ipmqg0,iv1,ic1,iv2,ic2,& & i_v1_bnd,i_v1_grp,i_c1_bnd,i_c1_grp,i_v2_bnd,i_v2_grp,i_c2_bnd,i_c2_grp,& & ikmqbz,ikmqg0,iqbz,i_sp_pol,ip,ipmq,istarp,istarpmq,i1,i2,& @@ -45,6 +46,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& return endif ! + t_rev= (isq>nsym/(i_time_rev+1)) + ! iqbz=qpt%k_table(iq,isq) ! !V_bands=(/BS_bands(1),maxval(Ken%nbm)/) @@ -172,7 +175,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& phase_cc= WF_phases(i_c1_bnd,i_c2_bnd,i_c1_grp,isq,i2) endif ! - EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+BS_mat(neh2,il)*phase_vv*phase_cc + if(.not.t_rev) EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+BS_mat(neh2,il)*phase_vv*phase_cc + if(t_rev) EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+conjg(BS_mat(neh2,il))*phase_vv*phase_cc ! enddo enddo From 573cdf2f1d57b23317a516bf1278566073d7c1f2 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Mon, 15 Apr 2024 20:11:49 +0200 Subject: [PATCH 0775/1367] WF phases fails if wf_igk > wf_ng. Added error message --- src/io/variables_ELPH.F | 2 +- src/wf_and_fft/WF_phase_matrices.F | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 4bd092601e..8418508c51 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -64,7 +64,7 @@ integer function variables_ELPH(ID,what) & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) endif if (ver_is_gt_or_eq(ID,revision=21550)) then - call io_variable_elemental(ID,VAR="[ELPH] Debay-Waller",L0=l_GKKP_hosts_DW,& + call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller",L0=l_GKKP_hosts_DW,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) else l_GKKP_hosts_DW=.true. diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index c94ffeb9e4..5a4749f62e 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -11,7 +11,7 @@ ! !! @param[out] WF_phases_S Phase matrices ! -! #include +#include ! subroutine WF_phase_matrices(En,Xk,blim,klim) ! @@ -22,7 +22,8 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use D_lattice, ONLY:nsym,sop_tab use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map - use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy + use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k,wf_igk + use stderr, ONLY:intc use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V use hamiltonian, ONLY:B_mat_index @@ -44,7 +45,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! Work Space ! integer :: first_el(blim(2)-blim(1)+1),n_of_el(blim(2)-blim(1)+1),& - & blim_n(2),n_deg_grp,i_grp,g0_idx(3,2),nsz(5) + & blim_n(2),n_deg_grp,i_grp,g0_idx(3,2),nsz(5),max_igk real(SP) :: g0_length(3) integer :: ikbz,iRkbz,isk,isloop,isk_c,isk_y,iGk_y,iGk_c,istark,& & iby,ibc,iby_phase,ibc_phase,i_sp_pol,ik,& @@ -92,6 +93,12 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) do i_sp_pol=1,n_sp_pol ! do ik=klim(1),klim(2) + ! + max_igk = wf_igk(wf_nc_k(ik),ik) + if (max_igk > ng_tmp) then + call error("wf_igk ("//trim(intc(max_igk))//") > wf_ng ("//trim(intc(ng_tmp))//"), it's not possible to get WF phases."& + &//" Is FFTGvecs too low? You need to rerun the BSE step with at least max(wf_igk) G-vectors.") + endif ! ifrag=ifrag+1 ! From 4efa938ede3a49172488b0b59381768a978d59de Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 18 Apr 2024 17:38:17 +0200 Subject: [PATCH 0776/1367] Introduced cutoff_ng to avoid overwriting of wf_ng while reading ndb.cutoff during setup. Before, it could lead to segfault in WF_phases --- src/interface/INIT_check_databases.F | 3 ++- src/io/io_COL_CUT.F | 10 +++++----- src/modules/mod_wave_func.F | 3 ++- src/wf_and_fft/WF_phase_matrices.F | 15 +++++++-------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index ed909dd742..c394048c60 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -18,7 +18,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I use BS, ONLY:BS_n_g_exch,BS_n_g_fxc,BS_q,BSqpts use R_lattice, ONLY:ng_closed,nqibz,bz_samp use QP_m, ONLY:QP_t,QP_ng_Sx,QP_ng_Sc,QP_ng_SH,QP_ng_Vxc - use wave_func, ONLY:io_WF + use wave_func, ONLY:io_WF,wf_ng,cutoff_ng use TDDFT, ONLY:io_BS_Fxc use it_tools, ONLY:switch_off_runlevel use IO_int, ONLY:io_control @@ -143,6 +143,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! ! cutoff ! + cutoff_ng=wf_ng call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) io_err=io_COL_CUT(io_ID) ! diff --git a/src/io/io_COL_CUT.F b/src/io/io_COL_CUT.F index 26998bd959..c6cbd4134e 100644 --- a/src/io/io_COL_CUT.F +++ b/src/io/io_COL_CUT.F @@ -7,7 +7,7 @@ ! integer function io_COL_CUT(ID) ! - use wave_func, ONLY:wf_ng + use wave_func, ONLY:cutoff_ng use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts,CUTOFF_plus_RIM,& & cyl_ph_radius,box_length,cyl_length,cut_geometry,& & ng_closed,nqibz,bare_qpg,cut_description @@ -20,7 +20,7 @@ integer function io_COL_CUT(ID) ! ! Work Space ! - integer ::CUT_RIM_ng,CUT_RIM_npts,wf_ng_db + integer ::CUT_RIM_ng,CUT_RIM_npts,cutoff_ng_db ! call timing('io_COL_CUT',OPR='start') io_COL_CUT=io_connect(desc="cutoff",type=2,ID=ID) @@ -49,7 +49,7 @@ integer function io_COL_CUT(ID) & VAR=' Sphere/Cylinder radius [au]',CHECK=.true.,OP=(/"=="/)) call io_elemental(ID,R0=cyl_length,& & VAR=' Cylinder length [au]',CHECK=.true.,OP=(/"=="/)) - call io_elemental(ID,I0=wf_ng,DB_I0=wf_ng_db,& + call io_elemental(ID,I0=cutoff_ng,DB_I0=cutoff_ng_db,& & VAR=' RL components ',CHECK=.true.,OP=(/"<="/)) call io_elemental(ID,I0=ng_closed,& & VAR=' RL components used in the sum ',CHECK=.true.,OP=(/"=="/)) @@ -73,8 +73,8 @@ integer function io_COL_CUT(ID) ! if (any((/io_sec(ID,:)==2/))) then ! - call io_bulk(ID,VAR='CUT_BARE_QPG',VAR_SZ=(/2,nqibz,wf_ng/)) - call io_bulk(ID,C2=bare_qpg(:,:wf_ng)) + call io_bulk(ID,VAR='CUT_BARE_QPG',VAR_SZ=(/2,nqibz,cutoff_ng/)) + call io_bulk(ID,C2=bare_qpg(:,:cutoff_ng)) ! endif ! diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 62b7013083..e43f90922a 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -52,9 +52,10 @@ module wave_func ! ! Max Num. of G-VECTORS for the WFs maxval(wf_igk) > wf_ncx ! - integer :: wf_ng ! For WFs in the IBZ + integer :: wf_ng ! For WFs in the IBZ (may be later overwritten, e.g. by io_COL_CUT) integer :: wf_ng_1st_BZ ! For WFs in the 1st BZ integer :: wf_ng_overlaps ! For WFs shifted used by the overlaps + integer :: cutoff_ng ! For G-vectors used in cutoff (if read, may be different from wf_ng) ! ! Wave function derivatives ! diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 5a4749f62e..d44d38c2c4 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -22,7 +22,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use D_lattice, ONLY:nsym,sop_tab use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map - use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k,wf_igk + use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k use stderr, ONLY:intc use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V @@ -49,7 +49,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) real(SP) :: g0_length(3) integer :: ikbz,iRkbz,isk,isloop,isk_c,isk_y,iGk_y,iGk_c,istark,& & iby,ibc,iby_phase,ibc_phase,i_sp_pol,ik,& - & ifrag,s_count,i_wf_y,i_wf_c,iGp,ng_tmp,nb + & ifrag,s_count,i_wf_y,i_wf_c,iGp,ng_tmp,nb,NG_max complex(SP) :: det,charac(blim(2)-blim(1)+1,nsym) complex(SP), allocatable :: WF_phases(:,:,:,:,:) ! @@ -90,15 +90,14 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! ifrag=0 ! + if (maxval(wf_nc_k)>ng_tmp) then + call error("MAX(wf_nc_k) ("//trim(intc(maxval(wf_nc_k)))//") > wf_ng ("//trim(intc(ng_tmp))& + &//"), it's not possible to compute WF phases.") + endif + ! do i_sp_pol=1,n_sp_pol ! do ik=klim(1),klim(2) - ! - max_igk = wf_igk(wf_nc_k(ik),ik) - if (max_igk > ng_tmp) then - call error("wf_igk ("//trim(intc(max_igk))//") > wf_ng ("//trim(intc(ng_tmp))//"), it's not possible to get WF phases."& - &//" Is FFTGvecs too low? You need to rerun the BSE step with at least max(wf_igk) G-vectors.") - endif ! ifrag=ifrag+1 ! From ea9df88fc7e407664a546c9e889fb040c95020cc Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Thu, 18 Apr 2024 18:29:22 +0200 Subject: [PATCH 0777/1367] moved wf_ng and cutoff_ng to io_COL_CUT --- src/interface/INIT_check_databases.F | 3 +-- src/io/io_COL_CUT.F | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index c394048c60..ed909dd742 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -18,7 +18,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I use BS, ONLY:BS_n_g_exch,BS_n_g_fxc,BS_q,BSqpts use R_lattice, ONLY:ng_closed,nqibz,bz_samp use QP_m, ONLY:QP_t,QP_ng_Sx,QP_ng_Sc,QP_ng_SH,QP_ng_Vxc - use wave_func, ONLY:io_WF,wf_ng,cutoff_ng + use wave_func, ONLY:io_WF use TDDFT, ONLY:io_BS_Fxc use it_tools, ONLY:switch_off_runlevel use IO_int, ONLY:io_control @@ -143,7 +143,6 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! ! cutoff ! - cutoff_ng=wf_ng call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=DUMP,ID=io_ID) io_err=io_COL_CUT(io_ID) ! diff --git a/src/io/io_COL_CUT.F b/src/io/io_COL_CUT.F index c6cbd4134e..77ad451b51 100644 --- a/src/io/io_COL_CUT.F +++ b/src/io/io_COL_CUT.F @@ -7,7 +7,7 @@ ! integer function io_COL_CUT(ID) ! - use wave_func, ONLY:cutoff_ng + use wave_func, ONLY:wf_ng,cutoff_ng use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts,CUTOFF_plus_RIM,& & cyl_ph_radius,box_length,cyl_length,cut_geometry,& & ng_closed,nqibz,bare_qpg,cut_description @@ -22,6 +22,8 @@ integer function io_COL_CUT(ID) ! integer ::CUT_RIM_ng,CUT_RIM_npts,cutoff_ng_db ! + cutoff_ng = wf_ng ! when writing, the cutoff_ng is the same as the wavefunction ng + ! call timing('io_COL_CUT',OPR='start') io_COL_CUT=io_connect(desc="cutoff",type=2,ID=ID) ! From 0cf5e1efbde5694f3d5eb4afbcf40b15e5e426f5 Mon Sep 17 00:00:00 2001 From: "fpalearii@corvina.fisica.unimo.it" Date: Wed, 24 Apr 2024 12:29:13 +0200 Subject: [PATCH 0778/1367] Fixed loop indentation --- lib/qe_pseudo/DOUBLE_project.dep | 1 - src/bse/DOUBLE_project.dep | 1 - src/bse/NL_project.dep | 1 - src/el-ph/RT_project.dep | 6 +- src/exc-ph/DOUBLE_project.dep | 1 + src/exc-ph/ELPH_project.dep | 1 + src/exc-ph/EXCPH_gkkp_eval.F | 246 +++++++++++++++---------------- src/modules/DOUBLE_project.dep | 1 - 8 files changed, 126 insertions(+), 132 deletions(-) diff --git a/lib/qe_pseudo/DOUBLE_project.dep b/lib/qe_pseudo/DOUBLE_project.dep index fbc606fa4d..eb9021637a 100644 --- a/lib/qe_pseudo/DOUBLE_project.dep +++ b/lib/qe_pseudo/DOUBLE_project.dep @@ -39,5 +39,4 @@ us_module.o uspp.o ylmr2.o - objects.o diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 8247327eb9..3e07745476 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -51,5 +51,4 @@ K_stored_in_a_slepc_matrix.o PL_diago_residual.o PL_via_perturbative_inversion.o - objects.o diff --git a/src/bse/NL_project.dep b/src/bse/NL_project.dep index ea7b3d87f8..7bef4cdefd 100644 --- a/src/bse/NL_project.dep +++ b/src/bse/NL_project.dep @@ -1,5 +1,4 @@ K_diago_driver.o K_driver_init.o K_observables.o - objects.o diff --git a/src/el-ph/RT_project.dep b/src/el-ph/RT_project.dep index bbc20f4200..2455333893 100644 --- a/src/el-ph/RT_project.dep +++ b/src/el-ph/RT_project.dep @@ -1,6 +1,2 @@ - ELPH_acoustic_phonon_properties.o - ELPH_databases_check.o - ELPH_databases_grids_map.o - ELPH_databases_load.o - ELPH_databases_symmetrize.o + ELPH_Sigma_c.o diff --git a/src/exc-ph/DOUBLE_project.dep b/src/exc-ph/DOUBLE_project.dep index a3fea3eab6..cb8f22c982 100644 --- a/src/exc-ph/DOUBLE_project.dep +++ b/src/exc-ph/DOUBLE_project.dep @@ -1,3 +1,4 @@ + ELEC_WF_phases.o EXCPH_X_phass.o EXCPH_X_phass_from_Hpert.o EXCPH_ave_sat_DbGrid.o diff --git a/src/exc-ph/ELPH_project.dep b/src/exc-ph/ELPH_project.dep index a3fea3eab6..cb8f22c982 100644 --- a/src/exc-ph/ELPH_project.dep +++ b/src/exc-ph/ELPH_project.dep @@ -1,3 +1,4 @@ + ELEC_WF_phases.o EXCPH_X_phass.o EXCPH_X_phass_from_Hpert.o EXCPH_ave_sat_DbGrid.o diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 8d8f762edc..d34970a655 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -62,30 +62,112 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! elph_gkkp=cONE ! + ! + ! elph_gkkp(:,ib,ob,ik_bz) = < ib k | dV_ql | ob k - q > + ! + ! with k and q in the BZ + ! + ! El-ph rotated or nosym. The wfc gauge and rotation phases must match WF_phases. + ! + iq_db=Q_io_map(iq_bz) + IO_ACT=RD + if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) + ! + call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) + io_err=io_ELPH(ID_gkkp,'gkkp_expanded') + if(io_err/=0) call error(" Error reading gkkp_expanded") + ! + ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) + ! + if (ph_E - ! - ! with k and q in the BZ - ! - ! El-ph rotated or nosym. The wfc gauge and rotation phases must match WF_phases. - ! - iq_db=Q_io_map(iq_bz) - IO_ACT=RD - if(il==elph_branches(2)) IO_ACT=manage_action(RD_CL_IF_END,iq_bz,1,q%nbz) - ! - call io_control(ACTION=IO_ACT,SEC=(/iq_db+1/),ID=ID_gkkp) - io_err=io_ELPH(ID_gkkp,'gkkp_expanded') - if(io_err/=0) call error(" Error reading gkkp_expanded") - ! - ph_E=sqrt(abs(ph_freqs_sq(iq_db,il))) + Xi=cZERO ! - if (ph_E Code: (ivp,iv) + ! !!!See issues #690 and #609 + if (.not.l_const_elph) then + ik_db=K_io_map(ik_bz) + !ik_db=K_io_map(ik_minus_iq_bz) + if(.not.l_abs_elph) elph_gkkp=GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) + !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ivp,iv,ik_db,1)) /sqrt(2._SP*ph_E) + !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) + endif + ! + !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) + ! + if (l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) + if (.not.l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat_out(i_Hp,i_beta) + ! + enddo ! - Xi=cZERO + ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) ! - !write(iq_bz*1000+i_beta,*) iq_bz,i_beta,iq_s + ! 2=UP (electron contribution) + !====== + ! + do icp=BS_bands(1),BS_bands(2) + ! + if (l_hole_only) exit + ! + i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) + if (i_Hp==0) cycle + ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, + ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg + ! and SWAP band indices in the matrix elements: we use the NOTES indexing. + ! !!!Notes: (icp,ic) => Code: (ic,icp) + ! !!!See issues #690 and #609 + if (.not.l_const_elph) then + ik_db=K_io_map(ik_plus_iq_bz) + !ik_db=K_io_map(ik_bz) + if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) + !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) + endif + ! + if (l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) + if (.not.l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat_out(i_Hp,i_beta) + ! + enddo + ! + enddo + ! + ! Gkkp m.e. + !============= + ! + do i_alpha=EXCPH_states(1),EXCPH_states(2) ! do i_H=1,BS_H_dim ! @@ -95,112 +177,30 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) ! - ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz - ! - ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz - ! - ip_bz = ik_bz ! elemental_scattering(iq_s,ik_bz) - ! - ! 1=DOWN (hole contribution) - !======== - ! - do ivp=BS_bands(1),BS_bands(2) - ! - if (l_elec_only) exit - ! - i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic,1,1) - if (i_Hp==0) cycle - ! - ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, - ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg - ! and SWAP band indices in the matrix elements: we use the NOTES indexing. - ! !!!Notes: (iv,ivp) => Code: (ivp,iv) - ! !!!See issues #690 and #609 - if (.not.l_const_elph) then - ik_db=K_io_map(ik_bz) - !ik_db=K_io_map(ik_minus_iq_bz) - if(.not.l_abs_elph) elph_gkkp=GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) - !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ivp,iv,ik_db,1)) /sqrt(2._SP*ph_E) - !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) - endif - ! - !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) - ! - if (l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - if (.not.l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat_out(i_Hp,i_beta) - ! - enddo - ! - ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) - ! - ! 2=UP (electron contribution) - !====== - ! - do icp=BS_bands(1),BS_bands(2) - ! - if (l_hole_only) exit - ! - i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) - if (i_Hp==0) cycle - ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, - ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg - ! and SWAP band indices in the matrix elements: we use the NOTES indexing. - ! !!!Notes: (icp,ic) => Code: (ic,icp) - ! !!!See issues #690 and #609 - if (.not.l_const_elph) then - ik_db=K_io_map(ik_plus_iq_bz) - !ik_db=K_io_map(ik_bz) - if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) - if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) - !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) - !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) - endif - ! - if (l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - if (.not.l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat_out(i_Hp,i_beta) - ! - enddo + ! K_in = (ik_bz,iv,ic) + ! + ik_bz_in = BSS_eh_table_in(i_H,1) + iv_in = BSS_eh_table_in(i_H,2) + ic_in = BSS_eh_table_in(i_H,3) + ! + if (ik_bz /= ik_bz_in) call error(" Wrong k correspondence") + if (iv /= iv_in ) call error(" Wrong iv correspondence") + if (ic /= ic_in ) call error(" Wrong ic correspondence") + ! + ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate + ! + if (l_abs_exc) then + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& + & abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2)) + else + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& + & BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2)) + endif ! enddo - ! - ! Gkkp m.e. - !============= - ! - do i_alpha=EXCPH_states(1),EXCPH_states(2) - ! - do i_H=1,BS_H_dim - ! - ! K = (ik_bz,iv,ic) - ! - ik_bz = BSS_eh_table(i_H,1) - iv = BSS_eh_table(i_H,2) - ic = BSS_eh_table(i_H,3) - ! - ! K_in = (ik_bz,iv,ic) - ! - ik_bz_in = BSS_eh_table_in(i_H,1) - iv_in = BSS_eh_table_in(i_H,2) - ic_in = BSS_eh_table_in(i_H,3) - ! - if (ik_bz /= ik_bz_in) call error(" Wrong k correspondence") - if (iv /= iv_in ) call error(" Wrong iv correspondence") - if (ic /= ic_in ) call error(" Wrong ic correspondence") - ! - ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate - ! - if (l_abs_exc) then - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2)) - else - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& -& BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2)) - endif - ! - enddo - enddo - ! - enddo !Loop i_beta + enddo + ! + enddo !Loop i_beta ! ! Compute the squared couplings ! diff --git a/src/modules/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index 723e8b1d2f..89a1e42008 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -39,7 +39,6 @@ mod_collision_el.o mod_collision_ext.o mod_com.o - mod_com2y.o mod_com_interfcs.o mod_cuda.o mod_cusolverdn_y.o From d83e36a16a7c3ca87645c3bc3ba94c72922c26bc Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Fri, 3 May 2024 11:55:41 +0200 Subject: [PATCH 0779/1367] Do not calculate WF_phases if the system has no symmetries --- src/exc-ph/EXCPH_gkkp_driver.F | 10 ++++++---- src/exc-ph/EXCPH_gkkp_eval.F | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index b061801ece..676e6a01e8 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -34,8 +34,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! use pars, ONLY:SP,cZERO,rZERO,schlen - use electrons, ONLY:levels!,n_sp_pol - use R_lattice, ONLY:bz_samp,qindx_B !_load + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp,qindx_B + use D_lattice, ONLY:nsym use parser_m, ONLY:parser use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_alloc,BSS_free!,BS_H_dim,BSS_n_eig @@ -131,7 +132,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call k_build_up_BZ_tables(q) ! ! Pre-requisite: calculate electronic phases (needed to rotate the excitonic wavefunctions) - call ELEC_WF_phases(E,k) + if(nsym>1) call ELEC_WF_phases(E,k) ! call EXCPH_load_L(1,X,'check','Lin') ! At present the Lin can be only gamma iq=1 ! @@ -209,7 +210,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! BS_mat_out=cZERO ! Here we obtain the rotated BS_mat_out at iq_bz - call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,.false.) + if(nsym>1) call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,.false.) + if(nsym==1) BS_mat_out=BS_mat(:,EXCPH_sum(1):EXCPH_sum(2)) ! EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index d34970a655..9da22dba5f 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -26,7 +26,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO,cONE - use D_lattice, ONLY:i_time_rev,sop_inv,sop_tab,nsym,i_time_rev + !use D_lattice, ONLY:sop_inv,sop_tab use R_lattice, ONLY:bz_samp,qindx_C use BS_solvers, ONLY:io_BSS_diago,BSS_eh_table_m1,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & From 3cf24062abbe29eea43d9455bf0741c85a3f542f Mon Sep 17 00:00:00 2001 From: muralidhar-nalabothula Date: Thu, 9 May 2024 23:26:01 +0200 Subject: [PATCH 0780/1367] Fix bugs in Ex-ph M.E --- src/exc-ph/EXCPH_gkkp_eval.F | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 9da22dba5f..d1adcf1749 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -21,7 +21,14 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -! GKKP formulation following the F. Paleari PhD thesis +! ====================================================================== +! GKKP formulation following the F. Paleari PhD thesis (Pg. 109, Eq : 4.25) +! The exciton phonon matrix elements are defined as +! +! MN : We compute ex-ph matrix elements for phonon absoption i.e +! In case of phonon emission, we need , this can +! be obtained by conjugating the phonon-absorption matrix elements +! i.e = conjg() ! subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! @@ -128,7 +135,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) ! if (l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - if (.not.l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp* BS_mat_out(i_Hp,i_beta) + if (.not.l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) ! enddo ! @@ -151,14 +158,14 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) if (.not.l_const_elph) then ik_db=K_io_map(ik_plus_iq_bz) !ik_db=K_io_map(ik_bz) - if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) endif ! if (l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - if (.not.l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp* BS_mat_out(i_Hp,i_beta) + if (.not.l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) ! enddo ! @@ -189,6 +196,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate ! + ! MN : FIX ME ! Any reason why we use hole-electron instead of the standard elec-hole? if (l_abs_exc) then EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& & abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2)) From d2669158f76fa17411da56615cc6c77e8f7b1d99 Mon Sep 17 00:00:00 2001 From: muralidhar-nalabothula Date: Fri, 10 May 2024 09:38:55 +0200 Subject: [PATCH 0781/1367] fix bugs --- src/exc-ph/EXCPH_gkkp_eval.F | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index d1adcf1749..485ffefc44 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -24,11 +24,7 @@ ! ====================================================================== ! GKKP formulation following the F. Paleari PhD thesis (Pg. 109, Eq : 4.25) ! The exciton phonon matrix elements are defined as -! -! MN : We compute ex-ph matrix elements for phonon absoption i.e -! In case of phonon emission, we need , this can -! be obtained by conjugating the phonon-absorption matrix elements -! i.e = conjg() +! These are phonon absorption ! subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! @@ -196,7 +192,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate ! - ! MN : FIX ME ! Any reason why we use hole-electron instead of the standard elec-hole? + ! FIX ME ! Any reason why we use hole-electron instead of the standard elec-hole? if (l_abs_exc) then EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& & abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2)) From aa38309c56ff87693b056b6a8c83e723dcb411d1 Mon Sep 17 00:00:00 2001 From: muralidhar-nalabothula Date: Fri, 10 May 2024 09:40:51 +0200 Subject: [PATCH 0782/1367] fix bugs --- src/exc-ph/EXCPH_gkkp_eval.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 485ffefc44..770851bcbd 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -24,7 +24,7 @@ ! ====================================================================== ! GKKP formulation following the F. Paleari PhD thesis (Pg. 109, Eq : 4.25) ! The exciton phonon matrix elements are defined as -! These are phonon absorption +! These is for phonon absorption ! subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! From 0783a7347a4b914ae826ed915a3b1fe6a5ec1c37 Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Mon, 13 May 2024 11:13:52 +0200 Subject: [PATCH 0783/1367] Temporary debugging options to write BS_out --- src/exc-ph/EXCPH_gkkp_driver.F | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 676e6a01e8..7683204eb6 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -198,6 +198,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) !call k_ibz2bz(k,"i",.false.) call live_timing('Excitonic Gkkp',q%nbz*(elph_branches(2)-elph_branches(1)+1)) ! + !open(47, file = 'BS_mat_q.dat') + !write (47,*) "# BS_mat_q rotated: each q, each exciton state alpha, all transitions" + ! do iq=1,q%nibz ! if(iq>1) call EXCPH_load_L(iq,X,'check','Lout') @@ -213,6 +216,12 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) if(nsym>1) call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,.false.) if(nsym==1) BS_mat_out=BS_mat(:,EXCPH_sum(1):EXCPH_sum(2)) ! + !write(47,*) "#q = ",iq_bz + !write(47,*) "# alpha = ", EXCPH_sum(1),EXCPH_sum(1)+1 + !do ik=1,k%nbz + ! write(47,*) BS_mat_out(ik,EXCPH_sum(1)), BS_mat_out(ik,EXCPH_sum(1)+1) + !end do + ! EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO ! @@ -225,6 +234,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) enddo ! iq_db=Q_io_map(iq_bz) + !if (iq_db/=iq_bz) write(*,*) "WARNING: iq_db/=iq_bz",iq_db,iq_bz ! ! I/O !===== @@ -236,6 +246,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! enddo ! + !close(47) + ! call live_timing( ) ! call BSS_free() From a87c19072d8021665c842db968e6fd1804ff7d9e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 14 May 2024 00:01:07 +0200 Subject: [PATCH 0784/1367] Version 5.2.0, Revision 23180, Hash 50bdb76 MODIFIED * modified: src/nloptics/NL_Hamiltonian.F src/nloptics/NL_current.F src/nloptics/NL_driver.F src/nloptics/NL_initialize.F Bugs: - [yambo_nl] Fixed definition of current - [yambo_nl] Fixed logicals for dipoles de-allocation Changes: - [yambo_nl] Added extra logical for control of diamagnetic term Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_Hamiltonian.F | 4 +++- src/nloptics/NL_current.F | 5 +++-- src/nloptics/NL_driver.F | 12 +++--------- src/nloptics/NL_initialize.F | 11 ++++++++++- 6 files changed, 33 insertions(+), 27 deletions(-) diff --git a/configure b/configure index ba6082e1a3..e999be66a0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23179 h.209fa27b2f. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23180 h.50bdb76. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23179 h.209fa27b2f' -PACKAGE_STRING='Yambo 5.2.0 r.23179 h.209fa27b2f' +PACKAGE_VERSION='5.2.0 r.23180 h.50bdb76' +PACKAGE_STRING='Yambo 5.2.0 r.23180 h.50bdb76' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23179 h.209fa27b2f to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23180 h.50bdb76 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23179 h.209fa27b2f:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23180 h.50bdb76:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23179 h.209fa27b2f +Yambo configure 5.2.0 r.23180 h.50bdb76 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23179 h.209fa27b2f, which was +It was created by Yambo $as_me 5.2.0 r.23180 h.50bdb76, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23179" -SHASH="209fa27b2f" +SREVISION="23180" +SHASH="50bdb76" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23179 h.209fa27b2f, which was +This file was extended by Yambo $as_me 5.2.0 r.23180 h.50bdb76, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23179 h.209fa27b2f +Yambo config.status 5.2.0 r.23180 h.50bdb76 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index baba96d585..6e9c4c0c98 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23179 h.209fa27b2f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23180 h.50bdb76, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23179" -SHASH="209fa27b2f" +SREVISION="23180" +SHASH="50bdb76" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 68d3894a95..26e02685c0 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -105,7 +105,9 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! call RT_Ext_fields_sum(A_ext,Time) ! - A_tot=A_ext + A_tot%vecpot =A_ext%vecpot + A_tot%vecpot_vel=A_ext%vecpot_vel + A_tot%vecpot_acc=A_ext%vecpot_acc ! E_ext=-A_ext%vecpot_vel/SPEED_OF_LIGHT ! diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index 81db37f377..06f798702f 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -21,6 +21,7 @@ subroutine NL_current(k,E,V_input,NL_J) use fields, ONLY:A_ext use X_m, ONLY:global_gauge use DIPOLES, ONLY:DIP_v + use real_time, ONLY:l_velocity_gauge_diam use nl_optics, ONLY:NL_bands,l_use_DIPOLES use QP_m, ONLY:QP_nk use NL_interfaces, ONLY:NL_average_operator @@ -39,14 +40,14 @@ subroutine NL_current(k,E,V_input,NL_J) ! ! A : Current ! - call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & & V_bands=V_input,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! if(trim(global_gauge)=='velocity') then ! ! Velocity gauge I must use the correct definition of the J operator ! - NL_J(4:6)=NL_J(4:6)+A_ext%vecpot(:)*real(nel,SP)/(2._SP*SPEED_OF_LIGHT) + if(l_velocity_gauge_diam) NL_J(4:6)=NL_J(4:6)+A_ext%vecpot(:)*real(nel,SP)/(2._SP*SPEED_OF_LIGHT) ! NL_J(1:3)=NL_J(4:6) ! diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index f2d6700f13..af306e8728 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -104,15 +104,9 @@ subroutine NL_driver(E,X,k,q,Dip) call qindx_free('ALL') ! call DIP_alloc('P_square') - if(l_use_DIPOLES) then - call DIP_alloc('DIP_S') - else -! call DIP_alloc('DIP_R') - if(.not.l_eval_CURRENT) then - call DIP_alloc('DIP_R') - call DIP_alloc('DIP_v') - endif - endif + ! Deallocate what is not needed + if(l_use_DIPOLES) call DIP_alloc('DIP_S') + if(.not.l_eval_CURRENT) call DIP_alloc('DIP_v') ! ! WFs loading !============= diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1423d5505e..f2804a2b62 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -17,9 +17,11 @@ subroutine NL_initialize(E,k) use zeros, ONLY:zero_dfl use com, ONLY:msg use R_lattice, ONLY:bz_samp,k_map + use X_m, ONLY:global_gauge use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & -& Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime +& Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& +& l_velocity_gauge_corr,l_velocity_gauge_diam use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& & SAVE_Vb_history use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & @@ -39,6 +41,7 @@ subroutine NL_initialize(E,k) ! real(SP) :: Time,W_0,T_0,sigma integer :: i1,n_active_fields + logical :: l_velocity_gauge_tmp ! ! Parser ! ============ @@ -48,6 +51,12 @@ subroutine NL_initialize(E,k) call parser('EvalCurrent' , l_eval_CURRENT) call parser('FrPolPerdic' , l_P_periodic) call parser('SaveVbhistory', SAVE_Vb_history) + call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) + ! + l_velocity_gauge_corr=.false. + l_velocity_gauge_diam=.not.l_velocity_gauge_tmp + ! + if (.not.l_eval_CURRENT) l_eval_CURRENT= trim(global_gauge)=="current" ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') From 509b64056a9b684668fa9b7701523cbd42a0b209 Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Wed, 15 May 2024 18:38:11 +0200 Subject: [PATCH 0785/1367] Reorganised warnings and comments --- src/exc-ph/EXCPH_gkkp_driver.F | 13 ++++++++----- src/exc-ph/EXCPH_gkkp_eval.F | 27 ++++++++++++++------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 7683204eb6..e2cb232fe6 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -41,7 +41,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use X_m, ONLY:X_t use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_alloc,BSS_free!,BS_H_dim,BSS_n_eig !use BS, ONLY:BSqpts,BS_H_dim,BS_bands - use ELPH, ONLY:elph_branches,Q_io_map,l_GKKP_expanded_DB_exists + use ELPH, ONLY:elph_branches,l_GKKP_expanded_DB_exists!,Q_io_map use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & & REP,VERIFY,WR_CL,OP_WR,WR_CL_IF_END,manage_action use IO_int, ONLY:io_control @@ -64,7 +64,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM integer :: S_index(EXCPH_states(1):EXCPH_States(2)),ID_phases integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID,IO_ACT - integer :: il,iq_bz,iq,i_star,iq_s,iq_db,elph_branches_save(2) + integer :: il,iq_bz,iq,i_star,iq_s,elph_branches_save(2)!,iq_db ! Debug !integer :: ik !open(1, file='K_grid_bz.dat') @@ -95,11 +95,14 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! call parser('ConstElph',l_const_elph) call parser('AbsElph', l_abs_elph) - if(l_abs_elph) call warning('Absolute value of electron-phonon coupling ') call parser('AbsExc', l_abs_exc) - if(l_abs_exc) call warning('Absolute value of exciton-phonon coupling ') call parser('ElectronContributionOnly', l_elec_only) call parser('HoleContributionOnly', l_hole_only) + if (l_const_elph) call warning('Constant electron-phonon coupling') + if(l_abs_elph) call warning('Absolute value of electron-phonon coupling ') + if(l_abs_exc) call warning('Absolute value of exciton wave functions ') + if(l_elec_only) call warning('Only electron contribution to the exciton-phonon coupling') + if(l_hole_only) call warning('Only hole contribution to the exciton-phonon coupling') ! elph_branches_save =elph_branches call io_control(ACTION=OP_RD_CL,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID_gkkp) @@ -233,7 +236,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! enddo ! - iq_db=Q_io_map(iq_bz) + !iq_db=Q_io_map(iq_bz) !if (iq_db/=iq_bz) write(*,*) "WARNING: iq_db/=iq_bz",iq_db,iq_bz ! ! I/O diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 770851bcbd..d5ab3de426 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -30,7 +30,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! use pars, ONLY:SP,cZERO,rZERO,cONE !use D_lattice, ONLY:sop_inv,sop_tab - use R_lattice, ONLY:bz_samp,qindx_C + use R_lattice, ONLY:bz_samp!,qindx_C use BS_solvers, ONLY:io_BSS_diago,BSS_eh_table_m1,BSS_eh_table,BSS_free use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL, & & deliver_IO_error_message,manage_action,RD @@ -50,17 +50,18 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! Work Space ! integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& -& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,ik_minus_iq_bz,IO_ACT, & -& iv_in,ic_in,ik_bz_in +& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT, & +& iv_in,ic_in,ik_bz_in!,ik_minus_iq_bz real(SP) :: ph_E complex(SP) :: elph_gkkp integer, external :: io_ELPH ! - ! Loop scheme: - ! i_l ->i_beta ->i_star [load gkkp] ->i_H - ! ->ivp [Calculate Xi(1)] - ! ->icp [Calculate Xi(2)] - ! ->i_alpha ->i_H [Calculate Gkkp] + ! Loop scheme: + ! for each (iq_bz, il) from gkkp_driver: + ! -> i_beta ->i_H + ! ->ivp [Calculate Xi(1), sum over ivp, hole contribution] + ! ->icp [Calculate Xi(2), sum over icp, elec contribution] + ! ->i_alpha ->i_H [Calculate Gkkp(iq,il;i_beta,i_alpha), sum over i_H] Xi=cZERO ! elph_gkkp=cONE @@ -98,15 +99,15 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) ! - ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz + !ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz ! ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz ! - ip_bz = ik_bz ! elemental_scattering(iq_s,ik_bz) - ! ! 1=DOWN (hole contribution) !======== ! + ip_bz = ik_bz ! elemental_scattering(iq_s,ik_bz) + ! do ivp=BS_bands(1),BS_bands(2) ! if (l_elec_only) exit @@ -135,11 +136,11 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! enddo ! - ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) - ! ! 2=UP (electron contribution) !====== ! + ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) + ! do icp=BS_bands(1),BS_bands(2) ! if (l_hole_only) exit From 2014eebe6d9add19b463b028a3b20ba94e60403a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 18 May 2024 00:07:25 +0200 Subject: [PATCH 0786/1367] Version 5.2.0, Revision 23396, Hash c894348d8f MODIFIED * configure include/version/version.m4 Changes: - [configure] re-generated after merge Patch sent by: Davide Sangalli --- configure | 51 +++++++++++++++++++++++++++----------- include/version/version.m4 | 6 ++--- 2 files changed, 40 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 092ba7d194..061161de5d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23371 h.ea00c65a82. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23396 h.c894348d8f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23371 h.ea00c65a82' -PACKAGE_STRING='Yambo 5.2.0 r.23371 h.ea00c65a82' +PACKAGE_VERSION='5.2.0 r.23396 h.c894348d8f' +PACKAGE_STRING='Yambo 5.2.0 r.23396 h.c894348d8f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -711,6 +711,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -889,6 +890,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -948,6 +951,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1600,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23371 h.ea00c65a82 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23396 h.c894348d8f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23371 h.ea00c65a82:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23396 h.c894348d8f:";; esac cat <<\_ACEOF @@ -1679,6 +1683,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1876,7 +1881,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23371 h.ea00c65a82 +Yambo configure 5.2.0 r.23396 h.c894348d8f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2510,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23371 h.ea00c65a82, which was +It was created by Yambo $as_me 5.2.0 r.23396 h.c894348d8f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3268,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23371" -SHASH="ea00c65a82" +SREVISION="23396" +SHASH="c894348d8f" @@ -3416,6 +3421,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15410,7 +15429,7 @@ if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi # def_cuda="" CUDA_FLAGS="" -CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" +CUDA_LIBS="-cudalib=cufft,cublas,cusolver" # Available cc options: # cc20 Compile for compute capability 2.0 @@ -15432,12 +15451,12 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } fi @@ -15479,6 +15498,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15647,6 +15669,7 @@ fi + # @@ -16578,7 +16601,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23371 h.ea00c65a82, which was +This file was extended by Yambo $as_me 5.2.0 r.23396 h.c894348d8f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16665,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23371 h.ea00c65a82 +Yambo config.status 5.2.0 r.23396 h.c894348d8f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 6a38c0f7e2..ffd0cd0cdb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23371 h.ea00c65a82, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23396 h.c894348d8f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23371" -SHASH="ea00c65a82" +SREVISION="23396" +SHASH="c894348d8f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From d7bb920f42b7c8b2ead7d7e9260fc0c45700dab6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 May 2024 19:19:39 +0200 Subject: [PATCH 0787/1367] Version 5.2.0, Revision 23397, Hash 2014eebe6d MODIFIED * configure include/version/version.m4 ypp/excitons/excitons_bands.F ypp/excitons/excitons_interpolate_setup.F ypp/plotting/plot_interpolated_values.F Changes: - [ypp] Also in excitons bands interpolation built_in values are printed in output Patch sent by: Davide Sangalli --- configure | 22 ++--- include/version/version.m4 | 6 +- ypp/excitons/excitons_bands.F | 84 ++++++++++++++++++-- ypp/excitons/excitons_interpolate_setup.F | 6 +- ypp/plotting/plot_interpolated_values.F | 97 ++++++++++++++--------- 5 files changed, 153 insertions(+), 62 deletions(-) diff --git a/configure b/configure index 061161de5d..397aac45fe 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23396 h.c894348d8f. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23397 h.2014eebe6d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23396 h.c894348d8f' -PACKAGE_STRING='Yambo 5.2.0 r.23396 h.c894348d8f' +PACKAGE_VERSION='5.2.0 r.23397 h.2014eebe6d' +PACKAGE_STRING='Yambo 5.2.0 r.23397 h.2014eebe6d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23396 h.c894348d8f to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23397 h.2014eebe6d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23396 h.c894348d8f:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23397 h.2014eebe6d:";; esac cat <<\_ACEOF @@ -1881,7 +1881,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23396 h.c894348d8f +Yambo configure 5.2.0 r.23397 h.2014eebe6d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2510,7 +2510,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23396 h.c894348d8f, which was +It was created by Yambo $as_me 5.2.0 r.23397 h.2014eebe6d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3268,8 +3268,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23396" -SHASH="c894348d8f" +SREVISION="23397" +SHASH="2014eebe6d" @@ -16601,7 +16601,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23396 h.c894348d8f, which was +This file was extended by Yambo $as_me 5.2.0 r.23397 h.2014eebe6d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16665,7 +16665,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23396 h.c894348d8f +Yambo config.status 5.2.0 r.23397 h.2014eebe6d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index ffd0cd0cdb..13f159c550 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23396 h.c894348d8f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23397 h.2014eebe6d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23396" -SHASH="c894348d8f" +SREVISION="23397" +SHASH="2014eebe6d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index cda9c27715..10ca1342f5 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -34,32 +34,33 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! Work space ! integer :: iq,i_c,i_l,ID_INTERP_EXC,i_E - real(SP), allocatable :: BS_all_E(:,:),BSE_interp_E(:,:),values(:) + real(SP), allocatable :: BSE_interp_E(:,:),values(:) type(bz_samp) :: GRID_q character(schlen) :: file_name character(schlen), allocatable :: headings(:) - logical :: GRID_interpolate,l_prt_dos + logical :: BANDS_built_in,GRID_interpolate,l_prt_dos real(SP) :: tmp_q(3) real(SP) :: dos_E(DOS_E_steps),exc_DOS(DOS_E_steps) + real(SP) :: BS_all_E(EXCITONS_n_user_states,q%nibz) type(PP_indexes) :: px ! ! Parse the different interpolations ! call parser('PrtDOS',l_prt_dos) + call parser('BANDS_built_in',BANDS_built_in) GRID_interpolate = all(INTERP_grid>0) ! if(l_prt_dos.and..not.GRID_interpolate) call error("You need to specify a Q-grid for the DOS") ! ! Allocate arrays for all eigenvalues/eigenvectors ! - YAMBO_ALLOC(BS_all_E,(EXCITONS_n_user_states,q%nibz)) YAMBO_ALLOC(values,(EXCITONS_n_user_states+4)) allocate(headings(EXCITONS_n_user_states+4)) ! ! Read and interpolate excitons dispersion ! ID_INTERP_EXC=1 - call excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,.TRUE.) + call excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,.TRUE.) ! ! Interpolate and write on disk ! @@ -72,7 +73,9 @@ subroutine excitons_bands(k,Xk,en,Xen,q) YAMBO_ALLOC(BSE_interp_E,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) ! - call print_BANDS() + call print_interpolated_BANDS() + ! + if (BANDS_built_in) call print_built_in_BANDS() ! endif ! @@ -150,7 +153,7 @@ subroutine print_DOS() ! end subroutine print_DOS ! - subroutine print_BANDS() + subroutine print_interpolated_BANDS() implicit none ! headings(1)=" |q| (a.u.) " @@ -181,7 +184,74 @@ subroutine print_BANDS() enddo call of_open_close(trim(file_name)) ! - end subroutine print_BANDS + end subroutine print_interpolated_BANDS + ! + subroutine print_built_in_BANDS() + implicit none + ! + integer :: i_point,n_points,n_points_max,iq_bz_grid,iq_ibz_grid + real(SP) :: value_k,values(EXCITONS_n_user_states+4) + integer, allocatable :: Grid_to_path_map(:,:) + real(SP), allocatable :: tmp_var(:,:),tmp_q(:,:),tmp_k_dist(:,:) + ! + call k_ibz2bz(q,'iku',.true.) + ! + YAMBO_ALLOC(Grid_to_path_map,(USER_k%nbz,q%nbz)) + call define_grid_map(q,USER_k,Grid_to_path_map,n_points_max) + YAMBO_ALLOC(tmp_var,(EXCITONS_n_user_states,n_points_max)) + ! + YAMBO_ALLOC( tmp_q,(3,n_points_max)) + YAMBO_ALLOC(tmp_k_dist,(3,n_points_max)) + ! + headings(1)=" |q| (a.u.) " + do i_c=1,EXCITONS_n_user_states + i_l=EXCITONS_user_indexes(i_c) + headings(i_c+1)=' e'//intc(i_l) + enddo + headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& +& (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) + ! + file_name="excitons_built_in" + call of_open_close(trim(file_name),'ot') + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + call msg('o '//trim(file_name),"#") + ! + values=0._SP + ! + do iq=1,USER_k%nibz + ! + if (iq>1) value_k=value_k+iku_v_norm(USER_k%pt(iq,:3)-USER_k%pt(iq-1,:3)) + ! + n_points=0 + ! + do iq_bz_grid=1,q%nbz + if( Grid_to_path_map(iq,iq_bz_grid)==-1 ) cycle + n_points=n_points+1 + iq_ibz_grid=q%sstar(iq_bz_grid,1) + ! + tmp_k_dist(:,n_points)=q%ptbz(iq_bz_grid,:)-USER_k%pt(iq,:) + tmp_q(:,n_points)=q%ptbz(iq_bz_grid,:) + ! + tmp_var(:,n_points)=BS_all_E(:,iq_ibz_grid) + ! + enddo + ! + do i_point=1,n_points + ! + call K_transform(tmp_q(:,i_point),'iku') + ! + values(1)=value_k+iku_v_norm(tmp_k_dist(:,i_point)) + values(2:EXCITONS_n_user_states+1)=tmp_var(:,i_point)*HA2EV + values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q(:,i_point) + ! + call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) + enddo + ! + enddo + ! + call of_open_close(trim(file_name)) + ! + end subroutine print_built_in_BANDS ! subroutine print_INTERP_GRID() implicit none diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index b31322c4bb..49fd31a73b 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA ! -subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) +subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,report) ! ! This subroutine read and interpolate exciton ! @@ -22,21 +22,19 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) ! type(bz_samp) ::Xk,k,q type(levels) ::Xen,en + real(SP),intent(out) :: BS_all_E(EXCITONS_n_user_states,q%nibz) logical, intent(in) :: report integer, intent(inout) :: ID_INTERP_EXC ! ! Work space ! integer :: iq,i_c,i_l,io_err - real(SP), allocatable :: BS_all_E(:,:) real(SP), allocatable :: values(:) real(SP) :: tmp_q(3) character(schlen), allocatable :: headings(:) ! ! Allocate arrays for all eigenvalues/eigenvectors ! - YAMBO_ALLOC(BS_all_E,(EXCITONS_n_user_states,q%nibz)) - ! call section('*','Excitons Interpolation') ! call excitons_read(k,Xk,en,Xen,1,"clean",io_err) diff --git a/ypp/plotting/plot_interpolated_values.F b/ypp/plotting/plot_interpolated_values.F index da345abfaf..43f223c0fa 100644 --- a/ypp/plotting/plot_interpolated_values.F +++ b/ypp/plotting/plot_interpolated_values.F @@ -11,7 +11,7 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile use pars, ONLY:SP,schlen use com, ONLY:msg,of_open_close use electrons, ONLY:levels,n_sp_pol,n_spinor - use vec_operate, ONLY:v_norm,iku_v_norm + use vec_operate, ONLY:iku_v_norm use R_lattice, ONLY:bz_samp use stderr, ONLY:intc use YPPm, ONLY:coo_out,K_transform,CIRCUIT_E_db,CIRCUIT_k_label @@ -47,7 +47,6 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile ! Allocs ! integer, allocatable :: Grid_to_path_map(:,:) - real(SP), allocatable :: circuit_versor(:,:),circuit_dist(:,:) real(SP), allocatable :: auxiliary_var(:,:,:,:),tmp_k(:,:),tmp_k_dist(:,:) ! PLOT_interpolated = index(trim(basename),"interpolated")>0 @@ -66,45 +65,11 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile #if defined _YPP_SC proj_wfc=(trim(SC_neq_kind)=="matsubara") #endif - ! - ! Define a map between k-points in grid and nearest k-point in circuit ! if (PLOT_built_in) then - ! - YAMBO_ALLOC(circuit_versor,(3,LOCAL_k%nbz)) - YAMBO_ALLOC(circuit_dist ,(3,LOCAL_k%nbz)) ! YAMBO_ALLOC(Grid_to_path_map,(LOCAL_k%nbz,Xk%nbz)) - Grid_to_path_map =-1 - ! - do ik_local=1,LOCAL_k%nbz-1 - tmp_dist=LOCAL_k%pt(ik_local+1,:)-LOCAL_k%pt(ik_local,:) - circuit_dist (:,ik_local)=tmp_dist - circuit_versor(:,ik_local)=tmp_dist/v_norm(tmp_dist) - enddo - circuit_versor(:,ik_local)=circuit_versor(:,ik_local-1) - ! - n_points_max=0 - do ik_local=1,LOCAL_k%nbz - ! - n_points=0 - do ik_bz_grid=1,Xk%nbz - ! - tmp_dist=Xk%ptbz(ik_bz_grid,:)-LOCAL_k%pt(ik_local,:) - ! - if ((abs(v_norm(tmp_dist)-dot_product(tmp_dist,circuit_versor(:,ik_local)))<1.E-5_SP).and.& - & iku_v_norm(tmp_dist)<=iku_v_norm(circuit_dist(:,ik_local)) ) then - Grid_to_path_map(ik_local,ik_bz_grid)=ik_bz_grid - n_points=n_points+1 - endif - n_points_max=max(n_points,n_points_max) - ! - enddo - ! - enddo - ! - YAMBO_FREE(circuit_versor) - YAMBO_FREE(circuit_dist ) + call define_grid_map(Xk,Local_k,Grid_to_path_map,n_points_max) ! if(n_points_max>1) then YAMBO_ALLOC(auxiliary_var,(dims(1):dims(2),maxval(nfiles),nquantities,n_points_max-1)) @@ -320,3 +285,61 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile endif ! end subroutine plot_interpolated_values +! +! +subroutine define_grid_map(Xk,Local_k,Grid_to_path_map,n_points_max) + ! + use pars, ONLY:SP + use R_lattice, ONLY:bz_samp + use vec_operate, ONLY:v_norm,iku_v_norm + ! +#include + ! + type(bz_samp), intent(in) :: Xk,LOCAL_k + integer, intent(out) :: Grid_to_path_map(LOCAL_k%nbz,Xk%nbz) + integer, intent(out) :: n_points_max + ! + ! Workspace + ! + integer :: n_points,ik_local,ik_bz_grid + real(SP) :: tmp_dist(3) + real(SP), allocatable :: circuit_versor(:,:),circuit_dist(:,:) + ! + ! Define a map between k-points in grid and nearest k-point in circuit + ! + YAMBO_ALLOC(circuit_versor,(3,LOCAL_k%nbz)) + YAMBO_ALLOC(circuit_dist ,(3,LOCAL_k%nbz)) + ! + Grid_to_path_map =-1 + n_points=1 + ! + do ik_local=1,LOCAL_k%nbz-1 + tmp_dist=LOCAL_k%pt(ik_local+1,:)-LOCAL_k%pt(ik_local,:) + circuit_dist (:,ik_local)=tmp_dist + circuit_versor(:,ik_local)=tmp_dist/v_norm(tmp_dist) + enddo + circuit_versor(:,ik_local)=circuit_versor(:,ik_local-1) + ! + n_points_max=0 + do ik_local=1,LOCAL_k%nbz + ! + n_points=0 + do ik_bz_grid=1,Xk%nbz + ! + tmp_dist=Xk%ptbz(ik_bz_grid,:)-LOCAL_k%pt(ik_local,:) + ! + if ((abs(v_norm(tmp_dist)-dot_product(tmp_dist,circuit_versor(:,ik_local)))<1.E-5_SP).and.& + & iku_v_norm(tmp_dist)<=iku_v_norm(circuit_dist(:,ik_local)) ) then + Grid_to_path_map(ik_local,ik_bz_grid)=ik_bz_grid + n_points=n_points+1 + endif + n_points_max=max(n_points,n_points_max) + ! + enddo + ! + enddo + ! + YAMBO_FREE(circuit_versor) + YAMBO_FREE(circuit_dist ) + ! +end subroutine define_grid_map From f90071f577a0fd70b2de4e483fe50d472cf811dd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 23 May 2024 11:58:06 +0200 Subject: [PATCH 0788/1367] Version 5.2.0, Revision 23218, Hash 4348a8b2f8 MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_alloc_and_free.F Bugs: - [yambo_rt] Fixed bug when dealing with CVONLY HXC collisions in metallic systems Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_alloc_and_free.F | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index b1a3111a8d..a9aae549e4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23181 h.a87c190. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23218 h.4348a8b2f8. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23181 h.a87c190' -PACKAGE_STRING='Yambo 5.2.0 r.23181 h.a87c190' +PACKAGE_VERSION='5.2.0 r.23218 h.4348a8b2f8' +PACKAGE_STRING='Yambo 5.2.0 r.23218 h.4348a8b2f8' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23181 h.a87c190 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23218 h.4348a8b2f8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23181 h.a87c190:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23218 h.4348a8b2f8:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23181 h.a87c190 +Yambo configure 5.2.0 r.23218 h.4348a8b2f8 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23181 h.a87c190, which was +It was created by Yambo $as_me 5.2.0 r.23218 h.4348a8b2f8, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23181" -SHASH="a87c190" +SREVISION="23218" +SHASH="4348a8b2f8" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23181 h.a87c190, which was +This file was extended by Yambo $as_me 5.2.0 r.23218 h.4348a8b2f8, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23181 h.a87c190 +Yambo config.status 5.2.0 r.23218 h.4348a8b2f8 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 45e03bc07a..a91d9e32d3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23181 h.a87c190, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23218 h.4348a8b2f8, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23181" -SHASH="a87c190" +SREVISION="23218" +SHASH="4348a8b2f8" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 26f247bcce..1712e5bb96 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -93,8 +93,8 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) D(2,1:2)=COLL_bands D(3,1:2)=(/1,nkibz/) if (COLLISIONS_CV_only) then - D(1:2,3)=maxval(n_met_bands) - D(1:2,4)=minval(n_full_bands) + D(1:2,3)=minval(n_full_bands) + D(1:2,4)=maxval(n_met_bands) endif if (l_collision.and.l_alloc) then allocate(HXC_COLL_element(size_)) From e3a620051987f9b4d82df1a8cb8432e17461571c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 23 May 2024 13:18:18 +0200 Subject: [PATCH 0789/1367] Version 5.2.0, Revision 23219, Hash f90071f577 MODIFIED * configure include/version/version.m4 bse/K_Transition_check.F bse/K_Transitions_setup.F bse/K_driver_init.F collisions/COLLISIONS_HXC.F modules/mod_RT_control.F Changes: - [yambo_rt] Made possible use of collisions from bse kernel with fractional occupations Patch sent by: Davide Sangalli --- configure | 22 +++++++------- include/version/version.m4 | 6 ++-- src/bse/K_Transition_check.F | 20 ++++++++----- src/bse/K_Transitions_setup.F | 10 +++---- src/bse/K_driver_init.F | 3 +- src/collisions/COLLISIONS_HXC.F | 53 +++++++++++++++++++++++++-------- src/modules/mod_RT_control.F | 1 + 7 files changed, 74 insertions(+), 41 deletions(-) diff --git a/configure b/configure index a9aae549e4..3bfe5d8db3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23218 h.4348a8b2f8. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23219 h.f90071f577. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23218 h.4348a8b2f8' -PACKAGE_STRING='Yambo 5.2.0 r.23218 h.4348a8b2f8' +PACKAGE_VERSION='5.2.0 r.23219 h.f90071f577' +PACKAGE_STRING='Yambo 5.2.0 r.23219 h.f90071f577' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23218 h.4348a8b2f8 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23219 h.f90071f577 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23218 h.4348a8b2f8:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23219 h.f90071f577:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23218 h.4348a8b2f8 +Yambo configure 5.2.0 r.23219 h.f90071f577 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23218 h.4348a8b2f8, which was +It was created by Yambo $as_me 5.2.0 r.23219 h.f90071f577, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23218" -SHASH="4348a8b2f8" +SREVISION="23219" +SHASH="f90071f577" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23218 h.4348a8b2f8, which was +This file was extended by Yambo $as_me 5.2.0 r.23219 h.f90071f577, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23218 h.4348a8b2f8 +Yambo config.status 5.2.0 r.23219 h.f90071f577 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a91d9e32d3..618966aa6b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23218 h.4348a8b2f8, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23219 h.f90071f577, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23218" -SHASH="4348a8b2f8" +SREVISION="23219" +SHASH="f90071f577" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 68828e57a1..12807cd653 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -15,7 +15,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,l_BS_magnons,l_BS_photolum #if defined _RT use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,EQ_NoOcc + use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,ALL_NoOcc,EQ_NoOcc #endif ! implicit none @@ -93,13 +93,13 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ ! #if defined _RT - if(EQ_NoOcc) then - f_eh_REF=1._SP - f_eh =1._SP - f_eh_RES=1._SP - f_eh_EQ =1._SP - f_e =1._SP - f_h =1._SP + if(EQ_NoOcc.or.ALL_NoOcc) then + f_eh_REF=spin_occ + f_eh =spin_occ + f_eh_RES=spin_occ + f_eh_EQ =spin_occ + f_e =spin_occ + f_h =spin_occ endif #endif ! @@ -143,4 +143,8 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& if (any((/abs(E_eh)0._SP,& & abs(E_eh)>BS_eh_en(2).and.BS_eh_en(2)>0._SP/))) K_Transition_check=.FALSE. ! +#if defined _RT + if(ALL_NoOcc) K_Transition_check=All_NoOcc +#endif + ! end function diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 12f988c586..de16766051 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -49,7 +49,7 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) use BS, ONLY:l_BS_magnons,l_BS_photolum #if defined _RT use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:EQ_Transitions,EQ_NoOcc + use RT_control, ONLY:EQ_Transitions,EQ_NoOcc,ALL_NoOcc #endif ! #include @@ -104,10 +104,10 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) V_bands=(/BS_bands(1),maxval(n_met_bands)/) C_bands=(/minval(n_full_bands)+1,BS_bands(2)/) endif - if (EQ_NoOcc) then - V_bands=BS_bands - C_bands=BS_bands - endif + !if (ALL_NoOcc) then + ! V_bands=BS_bands + ! C_bands=BS_bands + !endif #endif ! do i_loop=1,n_loops diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index b16297b365..209a1be801 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -24,7 +24,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use D_lattice, ONLY:i_time_rev,i_space_inv,l_3D #if defined _RT use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:NEQ_Kernel,EQ_Transitions,EQ_NoOcc,NEQ_Residuals,RT_BSE_Occ_Mode + use RT_control, ONLY:NEQ_Kernel,EQ_Transitions,EQ_NoOcc,ALL_NoOcc,NEQ_Residuals,RT_BSE_Occ_Mode #endif ! implicit none @@ -228,6 +228,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) NEQ_Residuals=STRING_match(RT_BSE_Occ_Mode,"r").and.allocated(Ken%fo) call parser('ForceEqTrans',EQ_Transitions) call parser('ForceEqNoOcc',EQ_NoOcc) + call parser('ForceAllNoOcc',ALL_NoOcc) #endif ! ! SLEPC diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index a2ba813e13..7183043ce9 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -23,6 +23,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) use xc_functionals,ONLY:F_xc,V_xc,F_xc_mat,magn,XC_potential_driver use global_XC, ONLY:WF_kind,WF_xc_functional use parallel_int, ONLY:PP_redux_wait + use stderr, ONLY:intc use parallel_m, ONLY:PAR_IND_Q_bz,MPI_COMM_NULL,ncpu,myid,COMM_copy,yMPI_COMM,& & PAR_n_Bp_mat_elements,PAR_COM_QP_A2A,PAR_COM_QP_INDEX,PAR_COM_Q_INDEX,& & PAR_IND_Bp_mat,PAR_nQ_bz,PAR_COM_G_b_A2A,PAR_COM_G_b_index_global @@ -54,7 +55,8 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! integer :: i_coll,first_coll,last_coll,ig1,ig2,iqbz,iqibz,alloc_err,iqs,iGo_max,NG_max,NG_XC,LOCAL_COMM(2),& & i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,iB,& -& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,i_steps,bands_to_load(2),n_colls,n_GmG +& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,i_steps,bands_to_load(2),n_colls,n_GmG,& +& n_skip_colls,n_incl_colls logical :: l_HXC_collisions,eval_coll,l_compute_screening ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H @@ -82,6 +84,8 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! ! Setup ! + n_skip_colls = 0 + n_incl_colls = 0 l_compute_screening = index(H_potential,"COH")>0 .or. index(H_potential,"SEX")>0 l_HXC_collisions = COLLISIONS_HXC_local .or. COLLISIONS_HXC_MB ! @@ -368,6 +372,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! enddo ! loop on i_coll ! + if(n_skip_colls>0) call warning(" BSE conversion, ignored "//& + & trim(intc(n_skip_colls))//"/"//trim(intc(n_incl_colls))//" collisions") + ! call live_timing() ! ! CLEAN @@ -429,14 +436,22 @@ subroutine map_BSE_to_HXC_collisions() i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) iB=mod(i_BSE-1,BS_K_dim(1))+1 ! - do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) - allocate(BS_blk(jB)%mat (BS_blk(jB)%size(1),BS_blk(jB)%size(2))) - allocate(BS_blk(jB)%tam (BS_blk(jB)%zise(1),BS_blk(jB)%zise(2))) - BS_blk(jB)%mat=cZERO - BS_blk(jB)%tam=cZERO - call io_control(ACTION=RD,ID=ID_BS) - call read_BS_par_collisions(1,jB,ID_BS) - enddo + if (i_BSE>0) then + ! + do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) + allocate(BS_blk(jB)%mat (BS_blk(jB)%size(1),BS_blk(jB)%size(2))) + allocate(BS_blk(jB)%tam (BS_blk(jB)%zise(1),BS_blk(jB)%zise(2))) + BS_blk(jB)%mat=cZERO + BS_blk(jB)%tam=cZERO + call io_control(ACTION=RD,ID=ID_BS) + call read_BS_par_collisions(1,jB,ID_BS) + enddo + ! + else + !DEBUG< + !write(*,*) "Block ignored ",i_k_bz_bse,i_m,i_n,i_sp,i_sp + !DEBUG> + endif ! do i_q_fake=1,q%nbz ! @@ -461,6 +476,16 @@ subroutine map_BSE_to_HXC_collisions() i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) j_BSE=BSS_eh_table_m1(i_p_bz_bse,i_mp,i_np,i_sp,i_sp) ! + if (i_BSE==0.or.j_BSE==0) then + n_skip_colls=n_skip_colls+1 + !DEBUG< + !if(j_BSE==0) write(*,*) "Transition ignored ",i_p_bz_bse,i_mp,i_np,i_sp,i_sp + !DEBUG> + cycle + else + n_incl_colls=n_incl_colls+1 + endif + ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then ! l_cI=.false. @@ -554,10 +579,12 @@ subroutine map_BSE_to_HXC_collisions() i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) iB=mod(i_BSE-1,BS_K_dim(1))+1 ! - do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) - deallocate(BS_blk(jB)%mat) - deallocate(BS_blk(jB)%tam) - enddo + if (i_BSE>0) then + do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) + deallocate(BS_blk(jB)%mat) + deallocate(BS_blk(jB)%tam) + enddo + endif ! end subroutine map_BSE_to_HXC_collisions ! diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index 8b594ebb8b..d2e4d00f4d 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -81,6 +81,7 @@ module RT_control logical :: NEQ_Residuals=.FALSE. logical :: EQ_Transitions=.TRUE. logical :: EQ_NoOcc=.FALSE. + logical :: ALL_NoOcc=.FALSE. integer, parameter :: N_RT_ctl_controls=3 character(schlen) :: RT_BSE_Occ_Mode="K" character(schlen) :: RT_ctl_db(N_RT_ctl_controls) From 21a58fbb47913a4ac2b7f1b7fe356fe9133096f0 Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Fri, 24 May 2024 11:54:13 +0200 Subject: [PATCH 0790/1367] Introduced more debugging options --- src/exc-ph/EXCPH_gkkp_eval.F | 7 ++++++- src/interface/INIT_activate.F | 4 ++-- src/interface/INIT_load.F | 3 ++- src/modules/SET_defaults.F | 3 ++- src/modules/mod_EXCPH.F | 4 ++++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index d5ab3de426..828c9873d2 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -38,7 +38,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) use BS, ONLY:BS_H_dim,BS_bands use ELPH, ONLY:ph_freqs_sq,elph_branches,FAN_deltaE_treshold,GKKP,Q_io_map,K_io_map use EXCPH, ONLY:BS_mat_in,BS_mat_out,EXCPH_gkkp,EXCPH_gkkp_sq,Xi,BSS_eh_table_in,& -& EXCPH_states,EXCPH_sum,k_plus_q_table,& +& EXCPH_states,EXCPH_sum,k_plus_q_table,EXCPH_kthresh,& & l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only ! #include @@ -99,6 +99,11 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) ! + ! only sum k-points up to the shell with radius EXCPH_kthresh (debug only) + if (EXCPH_kthresh>0._SP) then + if (norm2(k%ptbz(ik_bz,:)) > EXCPH_kthresh ) cycle + endif + ! !ik_minus_iq_bz = qindx_C(ik_bz,iq_bz,1) ! K_bz-Q_bz ! ik_plus_iq_bz = k_plus_q_table(ik_bz,iq_bz) ! K_bz+Q_bz diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index df90bdc2f4..4322a125d5 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -451,8 +451,8 @@ subroutine INIT_activate() ! ! Exciton-phonon Self-energy ! - if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum ExcPhKind LoutPath FANdEtresh EkpqShFact LDamping') - if (l_EXCPH_gkkp) call initactivate(1,'ConstElph AbsElph AbsExc HoleContributionOnly ElectronContributionOnly') + if (l_EXCPH_gkkp) call initactivate(1,'ELPhExcStates ELPhExcSum LoutPath FANdEtresh EkpqShFact LDamping') + if (l_EXCPH_gkkp) call initactivate(1,'ConstElph AbsElph AbsExc HoleContributionOnly ElectronContributionOnly MaxKShells') if (l_EXCPH_lifetime) call initactivate(1,'BoseTemp ElPhModes EXCTemp AlphaQ ExcPhOffDiago') if (l_EXCPH_lifetime) call initactivate(1,'NoMatrxEl KeepDeg ') if (l_EXCPH_optics) then diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index a667755380..916de3ab15 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -93,7 +93,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use ELPH, ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,& & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db use EXCPH, ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,alphaQ, & -& EXCPH_deltaE_treshold +& EXCPH_deltaE_treshold,EXCPH_kthresh use D_lattice, ONLY:Boltz_Temp #endif #if defined _OPENMP @@ -677,6 +677,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'AbsExc', '[EXCPH] Module of excitonic WFs (for testing purpose)') call it('f',defs,'HoleContributionOnly', '[EXCPH] Hole channel only (for testing purpose)') call it('f',defs,'ElectronContributionOnly', '[EXCPH] Elec channel only (for testing purpose)') + call it(defs,'MaxKShells', '[EXCPH] K-sum up to a max shell within k-radius in IKU (for testing purpose)',EXCPH_kthresh) ! Testing only zone > ! call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 2bb306dcd4..32cd111b69 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -68,7 +68,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & elph_Ham_bands,elph_Ham_ik,elph_branches,RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,& & elph_bands use EXCPH, ONLY:Lin_path,Lout_path,EXCPH_states,EXCPH_sum,L_damping,EXC_q0,alphaQ, & -& EXCPH_deltaE_treshold +& EXCPH_deltaE_treshold,EXCPH_kthresh #endif use zeros, ONLY:zero_norm,k_iku_zero,k_rlu_zero,G_iku_zero,G_mod_zero,zero_dfl use memory, ONLY:MEMs,LARGE_MEMs,N_MEM_max,N_MEM_SAVE_max,MEM_element_init @@ -542,6 +542,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) EXCPH_deltaE_treshold=1.E-6_SP/HA2EV ! This is a cutoff for denominator in the exc-ph spectra EXC_q0=(/0.0,0.0,0.0/) alphaQ=rZERO + EXCPH_kthresh=-1. ! If negative, use all kpoints (turn positive only for debug) ! #endif ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 8415f97d3d..1a70a7202c 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -69,6 +69,10 @@ module EXCPH complex(SP), pointer :: BS_R_left(:),BS_R_right(:) real(SP), allocatable :: BS_R(:) ! + ! Debug + ! + real(SP) :: EXCPH_kthresh + ! ! ... Sigma ! complex(SP), allocatable :: BS_Sat_E(:,:,:) From 54ad8d91310a6e9f3ff44db210c1fd6e92fd4da7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 May 2024 08:45:26 +0200 Subject: [PATCH 0791/1367] Version 5.2.0, Revision 23318, Hash 0e2a3a0053 MODIFIED * configure include/version/version.m4 io_parallel/io_BS_PAR_block.F io_parallel/io_BS_PAR_init.F Bugs: - [yambo] added compatibility with previous ndb.BS_PAR_Qx files Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/io_parallel/io_BS_PAR_block.F | 10 ++++------ src/io_parallel/io_BS_PAR_init.F | 9 +++++---- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/configure b/configure index a2f7d12f74..e1f5d1e8df 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23220 h.e3a6200519. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23318 h.0e2a3a0053. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23220 h.e3a6200519' -PACKAGE_STRING='Yambo 5.2.0 r.23220 h.e3a6200519' +PACKAGE_VERSION='5.2.0 r.23318 h.0e2a3a0053' +PACKAGE_STRING='Yambo 5.2.0 r.23318 h.0e2a3a0053' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23220 h.e3a6200519 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23318 h.0e2a3a0053 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23220 h.e3a6200519:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23318 h.0e2a3a0053:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23220 h.e3a6200519 +Yambo configure 5.2.0 r.23318 h.0e2a3a0053 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23220 h.e3a6200519, which was +It was created by Yambo $as_me 5.2.0 r.23318 h.0e2a3a0053, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23220" -SHASH="e3a6200519" +SREVISION="23318" +SHASH="0e2a3a0053" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23220 h.e3a6200519, which was +This file was extended by Yambo $as_me 5.2.0 r.23318 h.0e2a3a0053, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23220 h.e3a6200519 +Yambo config.status 5.2.0 r.23318 h.0e2a3a0053 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 6131c5f1c4..d83b33511d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23220 h.e3a6200519, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23318 h.0e2a3a0053, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23220" -SHASH="e3a6200519" +SREVISION="23318" +SHASH="0e2a3a0053" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index e6977034ec..dfd3f4678c 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -14,7 +14,6 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! Each block has a status variables indicating if the matrix element was already calculated ! use pars, ONLY:IP,IPL,SP,schlen,max_io_vars_open - use iso_c_binding, ONLY:C_LOC,C_F_POINTER use stderr, ONLY:STRING_remove use BS, ONLY:BS_blk,BSK_IO_mode,MAX_BSK_LIN_size,n_BS_blks_min,BS_K_dim use timing_m, ONLY:timing @@ -34,7 +33,6 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! character(schlen) :: BSK_IO_local logical :: lwrite(3),file_sync - integer, pointer :: tmp_link(:,:) integer :: x1,x2,VAR_IDs(2),ID_table,stat,ID_now(2) integer :: n2,i1,i2,idx1,idx2,imax,i_rep(2),ilast integer(IPL) :: idx @@ -194,10 +192,10 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) end select ! if ((x1==x2.or.BS_blk(i_block)%size(2)==BS_K_dim(1)) .and. .not.trim(mode)=="matonly") then - if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) - call C_F_POINTER(C_LOC(BS_blk(i_block)%table),tmp_link,(/5,BS_blk(i_block)%size(1)/)) - call io_variable_bulk(ID, ID_table, I2=tmp_link, IPOS=(/1,x1/) ) - nullify(tmp_link) + if ( write_is_on(ID) .or. variable_exist(ID,"BS_TABLE") ) then + if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) + call io_variable_bulk(ID, ID_table, I2=BS_blk(i_block)%table, IPOS=(/1,x1/) ) + endif endif ! ! nf90_sync is performed up to n_BS_blks_min and at steps of 5% of BSE kernel diff --git a/src/io_parallel/io_BS_PAR_init.F b/src/io_parallel/io_BS_PAR_init.F index a3f849865f..7b5ca79b6c 100644 --- a/src/io_parallel/io_BS_PAR_init.F +++ b/src/io_parallel/io_BS_PAR_init.F @@ -9,11 +9,11 @@ integer function io_BS_PAR_init(iq,ID,mode) ! use stderr, ONLY:intc,real2ch,STRING_remove use com, ONLY:msg - use pars, ONLY:IP,IPL,SP,schlen,lchlen,max_io_vars_open + use pars, ONLY:IP,IPL,SP,IP_YIO,SP_YIO,schlen,lchlen,max_io_vars_open use BS, ONLY:BS_K_dim,BS_H_dim,BS_IO_dim,BS_K_coupling,l_BSE_kernel_complete,& & BSK_IO_mode,MAX_BSK_LIN_size,BS_lin_size_compressed,BS_K_cutoff, & & BS_res_ares_n_mat,l_BS_ares_from_res,BS_n_eh_spaces - use IO_m, ONLY:io_BS_K,io_file,write_is_on,read_is_on,YAMBO_DEF_CHUNK + use IO_m, ONLY:io_BS_K,io_file,variable_exist,write_is_on,read_is_on,YAMBO_DEF_CHUNK use IO_int, ONLY:io_connect,def_variable_bulk ! implicit none @@ -180,9 +180,10 @@ integer function io_BS_PAR_init(iq,ID,mode) enddo enddo ! - if(trim(mode)=="full" .or. trim(mode)=="compressed_mat") then + if( (trim(mode)=="full" .or. trim(mode)=="compressed_mat") .and. & + & ( write_is_on(ID) .or. variable_exist(ID,"BS_TABLE")) ) then dim_names(1:2,1)=[character(schlen) :: "n_transition_variables","BS_H_dim"] - call def_variable_bulk(ID,"BS_TABLE",max_io_vars_open,[5,BS_H_dim],SP,dim_names(1:2,1),par_io_kind='independent') + call def_variable_bulk(ID,"BS_TABLE",max_io_vars_open,[5,BS_H_dim],IP_YIO,dim_names(1:2,1),par_io_kind='independent') endif ! end function io_BS_PAR_init From 4b69952619c5b684abfc66a0fa71d0f1687597a7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 May 2024 08:48:24 +0200 Subject: [PATCH 0792/1367] Version 5.2.0, Revision 23319, Hash 54ad8d9131 MODIFIED * configure include/version/version.m4 bse/K_blocks.F Bugs: - [yambo] Fixed BS_table in ndb.BS_PAR_Qx for cases where BS matrix is diagonal Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_blocks.F | 5 +++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index e1f5d1e8df..3d10937e36 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23318 h.0e2a3a0053. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23319 h.54ad8d9131. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23318 h.0e2a3a0053' -PACKAGE_STRING='Yambo 5.2.0 r.23318 h.0e2a3a0053' +PACKAGE_VERSION='5.2.0 r.23319 h.54ad8d9131' +PACKAGE_STRING='Yambo 5.2.0 r.23319 h.54ad8d9131' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23318 h.0e2a3a0053 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23319 h.54ad8d9131 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23318 h.0e2a3a0053:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23319 h.54ad8d9131:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23318 h.0e2a3a0053 +Yambo configure 5.2.0 r.23319 h.54ad8d9131 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23318 h.0e2a3a0053, which was +It was created by Yambo $as_me 5.2.0 r.23319 h.54ad8d9131, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23318" -SHASH="0e2a3a0053" +SREVISION="23319" +SHASH="54ad8d9131" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23318 h.0e2a3a0053, which was +This file was extended by Yambo $as_me 5.2.0 r.23319 h.54ad8d9131, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23318 h.0e2a3a0053 +Yambo config.status 5.2.0 r.23319 h.54ad8d9131 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d83b33511d..d920ffd998 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23318 h.0e2a3a0053, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23319 h.54ad8d9131, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23318" -SHASH="0e2a3a0053" +SREVISION="23319" +SHASH="54ad8d9131" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index 03d6035434..0911587a05 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -36,7 +36,7 @@ subroutine K_blocks( ) ! ! Work Space ! - integer :: i_T,j_T,i_T_start,j_T_start,i_block,iB,i_res_ares,j_res_ares,n_new_blocks,n_BS_blks_CPUs(ncpu) + integer :: i_T,j_T,i_T_start,j_T_start,i_block,diag_size,iB,i_res_ares,j_res_ares,n_new_blocks,n_BS_blks_CPUs(ncpu) integer(IPL) :: local_steps real(SP) :: N_Ts_total,N_Ts_local ! @@ -135,7 +135,8 @@ subroutine K_blocks( ) BS_blk(iB)%mat=cZERO bs_blk(iB)%done="f" if (BS_blk(iB)%coordinate(1)==BS_blk(iB)%coordinate(2)) then - allocate(BS_blk(iB)%table(5,BS_blk(iB)%size(1))) + diag_size=minval(BS_blk(iB)%size(:)) + allocate(BS_blk(iB)%table(5,diag_size)) bs_blk(iB)%table=0 endif enddo From 9dcafb7aaa190f4b8db9655da69ae06b8b35cad8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 May 2024 23:01:17 +0200 Subject: [PATCH 0793/1367] Version 5.2.0, Revision 23320, Hash 4b69952619 MODIFIED * configure include/version/version.m4 bse/K_stored_in_a_big_matrix.F io_parallel/io_BS_PAR_block.F Bugs: - [yambo] Fixed issue introduced with coupling and diago solver Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_stored_in_a_big_matrix.F | 17 ++++++++++++++--- src/io_parallel/io_BS_PAR_block.F | 2 +- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 3d10937e36..c7af5a6b1b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23319 h.54ad8d9131. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23320 h.4b69952619. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23319 h.54ad8d9131' -PACKAGE_STRING='Yambo 5.2.0 r.23319 h.54ad8d9131' +PACKAGE_VERSION='5.2.0 r.23320 h.4b69952619' +PACKAGE_STRING='Yambo 5.2.0 r.23320 h.4b69952619' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23319 h.54ad8d9131 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23320 h.4b69952619 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23319 h.54ad8d9131:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23320 h.4b69952619:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23319 h.54ad8d9131 +Yambo configure 5.2.0 r.23320 h.4b69952619 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23319 h.54ad8d9131, which was +It was created by Yambo $as_me 5.2.0 r.23320 h.4b69952619, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23319" -SHASH="54ad8d9131" +SREVISION="23320" +SHASH="4b69952619" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23319 h.54ad8d9131, which was +This file was extended by Yambo $as_me 5.2.0 r.23320 h.4b69952619, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23319 h.54ad8d9131 +Yambo config.status 5.2.0 r.23320 h.4b69952619 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d920ffd998..850207472c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23319 h.54ad8d9131, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23320 h.4b69952619, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23319" -SHASH="54ad8d9131" +SREVISION="23320" +SHASH="4b69952619" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index c81fa64aba..5e38d22041 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -17,7 +17,7 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! ! Case 1 Case 2 Case 3 Case 4 ! l_BS_ares_from_res=.true. l_BS_ares_from_res=.false. l_BS_ares_from_res=.true. l_BS_ares_from_res=.false. - ! l_BS_ares_from_res=.false. l_BSE_matrix_full=.false. l_BSE_matrix_full=.true. l_BSE_matrix_full=.true. + ! l_BSE_matrix_full=.false. l_BSE_matrix_full=.false. l_BSE_matrix_full=.true. l_BSE_matrix_full=.true. ! coupling block is a square coupling block maybe rectangular coupling block is a square coupling block maybe rectangular ! ! (r r r c c c) (r r r c c) (r r r c c c) (r r r c c) @@ -68,6 +68,12 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) if(BS_blk(i_B)%mode=="Q") H_shift(1)=BS_K_dim(1) if(BS_blk(i_B)%mode=="A") H_shift(:)=BS_K_dim(1) ! + ! Skip Q and A block + if ( l_BS_ares_from_res .and. H_shift(1)>0) cycle + ! + ! Skip Q block + if ((.not.l_BSE_kernel_full).and. H_shift(1)>H_shift(2)) cycle + ! do i_r=1,BS_blk(i_B)%size(1) ! H_pos(1)=BS_blk(i_B)%coordinate(1)+i_r-1 @@ -76,8 +82,13 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! H_pos(2)=BS_blk(i_B)%coordinate(2)+i_c-1 ! - ! The upper triangle only of each block - if (H_pos(1)>H_pos(2) .and. .not.l_BSE_kernel_full) cycle + if ( .not.l_BSE_kernel_full) then + ! The upper triangle only of the whole matrix + if( H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle + ! + ! The upper triangle only of each block + if (l_BS_ares_from_res .and. H_pos(1)>H_pos(2)) cycle + endif ! Mij=BS_blk(i_B)%mat(i_r,i_c) ! diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index dfd3f4678c..f511edfe9b 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -17,7 +17,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) use stderr, ONLY:STRING_remove use BS, ONLY:BS_blk,BSK_IO_mode,MAX_BSK_LIN_size,n_BS_blks_min,BS_K_dim use timing_m, ONLY:timing - use IO_m, ONLY:io_unit,netcdf_call,nf90_sync,& + use IO_m, ONLY:io_unit,netcdf_call,nf90_sync,variable_exist,& & write_is_on,read_is_on,io_BS_K,YAMBO_CMPLX_NO_FILL use IO_int, ONLY:io_variable_bulk ! From dede1cb2372013f73e8065e6b5f9236b932d4c7e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 31 May 2024 21:53:14 +0200 Subject: [PATCH 0794/1367] Version 5.2.0, Revision 23442, Hash 6a0338ce0a MODIFIED * configure include/version/version.m4 Changes: - [yambo] Configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 45 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/configure b/configure index f31bfa39a6..e40f436b15 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23398 h.d7bb920f42. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23442 h.6a0338ce0a. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23398 h.d7bb920f42' -PACKAGE_STRING='Yambo 5.2.0 r.23398 h.d7bb920f42' +PACKAGE_VERSION='5.2.0 r.23442 h.6a0338ce0a' +PACKAGE_STRING='Yambo 5.2.0 r.23442 h.6a0338ce0a' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -711,6 +711,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -891,6 +892,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -950,6 +953,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1604,7 +1608,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23398 h.d7bb920f42 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23442 h.6a0338ce0a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1674,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23398 h.d7bb920f42:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23442 h.6a0338ce0a:";; esac cat <<\_ACEOF @@ -1683,6 +1687,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1882,7 +1887,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23398 h.d7bb920f42 +Yambo configure 5.2.0 r.23442 h.6a0338ce0a generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2516,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23398 h.d7bb920f42, which was +It was created by Yambo $as_me 5.2.0 r.23442 h.6a0338ce0a, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3274,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23398" -SHASH="d7bb920f42" +SREVISION="23442" +SHASH="6a0338ce0a" @@ -3422,6 +3427,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -15505,6 +15524,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15675,6 +15697,7 @@ fi + # @@ -16606,7 +16629,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23398 h.d7bb920f42, which was +This file was extended by Yambo $as_me 5.2.0 r.23442 h.6a0338ce0a, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16693,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23398 h.d7bb920f42 +Yambo config.status 5.2.0 r.23442 h.6a0338ce0a configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a46a6ffa3d..264bc75d9e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23398 h.d7bb920f42, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23442 h.6a0338ce0a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23398" -SHASH="d7bb920f42" +SREVISION="23442" +SHASH="6a0338ce0a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From c28b6494c2e6b50333918c814819ad191050270a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Jun 2024 19:05:57 +0200 Subject: [PATCH 0795/1367] Version 5.2.0, Revision 23451, Hash 8df94a37bb MODIFIED * configure include/version/version.m4 NEW * BASED_on_tech_bse Changes: - Added file to remember dependency on branch tech-bse Patch sent by: Davide Sangalli --- BASED_on_tech_bse | 0 configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 BASED_on_tech_bse diff --git a/BASED_on_tech_bse b/BASED_on_tech_bse new file mode 100644 index 0000000000..e69de29bb2 diff --git a/configure b/configure index b82dfec1cb..8c07615844 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23449 h.51d5ab697c. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23451 h.8df94a37bb. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23449 h.51d5ab697c' -PACKAGE_STRING='Yambo 5.2.0 r.23449 h.51d5ab697c' +PACKAGE_VERSION='5.2.0 r.23451 h.8df94a37bb' +PACKAGE_STRING='Yambo 5.2.0 r.23451 h.8df94a37bb' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1608,7 +1608,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23449 h.51d5ab697c to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23451 h.8df94a37bb to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1674,7 +1674,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23449 h.51d5ab697c:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23451 h.8df94a37bb:";; esac cat <<\_ACEOF @@ -1887,7 +1887,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23449 h.51d5ab697c +Yambo configure 5.2.0 r.23451 h.8df94a37bb generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2516,7 +2516,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23449 h.51d5ab697c, which was +It was created by Yambo $as_me 5.2.0 r.23451 h.8df94a37bb, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3274,8 +3274,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23449" -SHASH="51d5ab697c" +SREVISION="23451" +SHASH="8df94a37bb" @@ -16629,7 +16629,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23449 h.51d5ab697c, which was +This file was extended by Yambo $as_me 5.2.0 r.23451 h.8df94a37bb, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16693,7 +16693,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23449 h.51d5ab697c +Yambo config.status 5.2.0 r.23451 h.8df94a37bb configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3fa553deb3..46469360db 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23449 h.51d5ab697c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23451 h.8df94a37bb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23449" -SHASH="51d5ab697c" +SREVISION="23451" +SHASH="8df94a37bb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From ee3dd9bc9c04c291b30e05e73ba4e0c4c9448334 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Jun 2024 14:46:25 +0200 Subject: [PATCH 0796/1367] Version 5.2.0, Revision 23506, Hash e88e4dc077 MODIFIED * configure include/version/version.m4 Changes: - configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 79 +++++++++++++++++++++++++++++++------- include/version/version.m4 | 6 +-- 2 files changed, 68 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 5a5265486a..ba02d3e045 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23238 h.d491dbdf56. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23506 h.e88e4dc077. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23238 h.d491dbdf56' -PACKAGE_STRING='Yambo 5.2.0 r.23238 h.d491dbdf56' +PACKAGE_VERSION='5.2.0 r.23506 h.e88e4dc077' +PACKAGE_STRING='Yambo 5.2.0 r.23506 h.e88e4dc077' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -711,6 +711,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check CUDA_FLAGS def_cuda @@ -772,6 +773,8 @@ def_scalapack enable_scalapack SCALAPACK_LIBS BLACS_LIBS +with_petsc_branch +with_slepc_branch internal_slepc internal_petsc compile_slepc @@ -889,6 +892,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -948,6 +953,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -988,6 +994,8 @@ with_petsc_incs with_petsc_path with_petsc_libdir with_petsc_includedir +with_slepc_branch +with_petsc_branch enable_par_linalg with_blacs_libs with_scalapack_libs @@ -1600,7 +1608,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23238 h.d491dbdf56 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23506 h.e88e4dc077 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1674,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23238 h.d491dbdf56:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23506 h.e88e4dc077:";; esac cat <<\_ACEOF @@ -1679,6 +1687,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1751,6 +1760,8 @@ Optional Packages: --with-petsc-libdir= Path to the Petsc lib directory --with-petsc-includedir= Path to the Petsc include directory + --with-slepc-branch= Use the of the slepc repository. + --with-petsc-branch= Use the of the petsc repository. --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL --with-scalapack-libs=(libs|mkl) Use SCALAPACK libraries or setup MKL @@ -1876,7 +1887,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23238 h.d491dbdf56 +Yambo configure 5.2.0 r.23506 h.e88e4dc077 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2516,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23238 h.d491dbdf56, which was +It was created by Yambo $as_me 5.2.0 r.23506 h.e88e4dc077, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3274,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23238" -SHASH="d491dbdf56" +SREVISION="23506" +SHASH="e88e4dc077" @@ -3416,6 +3427,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -12737,6 +12762,24 @@ then : fi + +# Check whether --with-slepc-branch was given. +if test ${with_slepc_branch+y} +then : + withval=$with_slepc_branch; +else $as_nop + with_slepc_branch=none +fi + + +# Check whether --with-petsc-branch was given. +if test ${with_petsc_branch+y} +then : + withval=$with_petsc_branch; +else $as_nop + with_petsc_branch=none +fi + # def_slepc="" petsc="no" @@ -13129,6 +13172,8 @@ fi + + # # ============================================================================ @@ -15410,7 +15455,7 @@ if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi # def_cuda="" CUDA_FLAGS="" -CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" +CUDA_LIBS="-cudalib=cufft,cublas,cusolver" # Available cc options: # cc20 Compile for compute capability 2.0 @@ -15432,12 +15477,12 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } fi @@ -15479,6 +15524,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -15581,6 +15629,7 @@ PETSC_check="-" if test "$internal_petsc" = "yes" ; then if test "$compile_petsc" = "yes" ; then PETSC_check="C"; fi if test "$compile_petsc" = "no" ; then PETSC_check="I"; fi + if ! test "$with_petsc_branch" = "none"; then PETSC_LIBS="$PETSC_LIBS (git branch $with_petsc_branch)"; fi elif test "$enable_petsc" = "yes" ; then PETSC_check="E" fi @@ -15589,6 +15638,7 @@ SLEPC_check="-" if test "$internal_slepc" = "yes" ; then if test "$compile_slepc" = "yes" ; then SLEPC_check="C"; fi if test "$compile_slepc" = "no" ; then SLEPC_check="I"; fi + if ! test "$with_slepc_branch" = "none"; then SLEPC_LIBS="$SLEPC_LIBS (git branch $with_slepc_branch)"; fi elif test "$enable_slepc" = "yes" ; then SLEPC_check="E" fi @@ -15647,6 +15697,7 @@ fi + # @@ -16578,7 +16629,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23238 h.d491dbdf56, which was +This file was extended by Yambo $as_me 5.2.0 r.23506 h.e88e4dc077, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16693,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23238 h.d491dbdf56 +Yambo config.status 5.2.0 r.23506 h.e88e4dc077 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 2811834ae9..41bf217b05 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23238 h.d491dbdf56, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23506 h.e88e4dc077, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23238" -SHASH="d491dbdf56" +SREVISION="23506" +SHASH="e88e4dc077" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 05e29deee2bc8cec9b05a6d4a50886a5df363a6d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Jun 2024 23:57:09 +0200 Subject: [PATCH 0797/1367] PHEL_project files deleted Version 5.2.0, Revision 23130, Hash 4f2c7e17a7 MODIFIED * configure include/version/version.m4 DELETED * driver/PHEL_project.dep interface/PHEL_project.dep io/PHEL_project.dep parallel/PHEL_project.dep pol_function/PHEL_project.dep qp/PHEL_project.dep real_time_control/PHEL_project.dep real_time_drivers/PHEL_project.dep real_time_initialize/PHEL_project.dep Bugs: - Additions: - Changes: - Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/driver/PHEL_project.dep | 3 --- src/interface/PHEL_project.dep | 6 ------ src/io/PHEL_project.dep | 2 -- src/parallel/PHEL_project.dep | 2 -- src/pol_function/PHEL_project.dep | 2 -- src/qp/PHEL_project.dep | 2 -- src/real_time_control/PHEL_project.dep | 2 -- src/real_time_drivers/PHEL_project.dep | 2 -- src/real_time_initialize/PHEL_project.dep | 3 --- 11 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 src/driver/PHEL_project.dep delete mode 100644 src/interface/PHEL_project.dep delete mode 100644 src/io/PHEL_project.dep delete mode 100644 src/parallel/PHEL_project.dep delete mode 100644 src/pol_function/PHEL_project.dep delete mode 100644 src/qp/PHEL_project.dep delete mode 100644 src/real_time_control/PHEL_project.dep delete mode 100644 src/real_time_drivers/PHEL_project.dep delete mode 100644 src/real_time_initialize/PHEL_project.dep diff --git a/configure b/configure index 69b00a4f5e..896a74e01e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23121 h.c9dd471cfa. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23130 h.4f2c7e17a7. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23121 h.c9dd471cfa' -PACKAGE_STRING='Yambo 5.2.0 r.23121 h.c9dd471cfa' +PACKAGE_VERSION='5.2.0 r.23130 h.4f2c7e17a7' +PACKAGE_STRING='Yambo 5.2.0 r.23130 h.4f2c7e17a7' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23121 h.c9dd471cfa to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23130 h.4f2c7e17a7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23121 h.c9dd471cfa:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23130 h.4f2c7e17a7:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23121 h.c9dd471cfa +Yambo configure 5.2.0 r.23130 h.4f2c7e17a7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23121 h.c9dd471cfa, which was +It was created by Yambo $as_me 5.2.0 r.23130 h.4f2c7e17a7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23121" -SHASH="c9dd471cfa" +SREVISION="23130" +SHASH="4f2c7e17a7" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23121 h.c9dd471cfa, which was +This file was extended by Yambo $as_me 5.2.0 r.23130 h.4f2c7e17a7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23121 h.c9dd471cfa +Yambo config.status 5.2.0 r.23130 h.4f2c7e17a7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index da9cbb7b4a..5df3e7fee1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23121 h.c9dd471cfa, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23130 h.4f2c7e17a7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23121" -SHASH="c9dd471cfa" +SREVISION="23130" +SHASH="4f2c7e17a7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/driver/PHEL_project.dep b/src/driver/PHEL_project.dep deleted file mode 100644 index e91fccffa5..0000000000 --- a/src/driver/PHEL_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - options_projects.o - options_yambo.o - diff --git a/src/interface/PHEL_project.dep b/src/interface/PHEL_project.dep deleted file mode 100644 index 02120d3c55..0000000000 --- a/src/interface/PHEL_project.dep +++ /dev/null @@ -1,6 +0,0 @@ - INIT.o - INIT_activate.o - INIT_barriers.o - INIT_load.o - INIT_read_command_line.o - diff --git a/src/io/PHEL_project.dep b/src/io/PHEL_project.dep deleted file mode 100644 index df62ae28df..0000000000 --- a/src/io/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - io_PH.o - diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep deleted file mode 100644 index 5a22ceb339..0000000000 --- a/src/parallel/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - PARALLEL_global_dimensions.o - diff --git a/src/pol_function/PHEL_project.dep b/src/pol_function/PHEL_project.dep deleted file mode 100644 index a644e71a2b..0000000000 --- a/src/pol_function/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - X_Double_Grid_setup.o - diff --git a/src/qp/PHEL_project.dep b/src/qp/PHEL_project.dep deleted file mode 100644 index 2a34e69ef3..0000000000 --- a/src/qp/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - QP_logicals.o - diff --git a/src/real_time_control/PHEL_project.dep b/src/real_time_control/PHEL_project.dep deleted file mode 100644 index 94a3292b75..0000000000 --- a/src/real_time_control/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - RT_alloc.o - diff --git a/src/real_time_drivers/PHEL_project.dep b/src/real_time_drivers/PHEL_project.dep deleted file mode 100644 index d7e6a8488e..0000000000 --- a/src/real_time_drivers/PHEL_project.dep +++ /dev/null @@ -1,2 +0,0 @@ - RT_driver.o - diff --git a/src/real_time_initialize/PHEL_project.dep b/src/real_time_initialize/PHEL_project.dep deleted file mode 100644 index 5bb91066cc..0000000000 --- a/src/real_time_initialize/PHEL_project.dep +++ /dev/null @@ -1,3 +0,0 @@ - RT_initialize.o - RT_occupations_and_levels_init.o - From aabf26aae21578c6c5a67367423c4a2fc3aafb3d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Jun 2024 00:58:55 +0200 Subject: [PATCH 0798/1367] Version 5.2.0, Revision 23131, Hash 05e29deee2 MODIFIED * configure include/version/version.m4 io/io_QP_and_GF.F qp_control/QP_apply_interpolate_QP.F Changes: - [yambo] Interpolated qp energies are written to disk inside ndb.QP_interpolated Patch sent by: Davide Sangalli --- configure | 22 +++++----- include/version/version.m4 | 6 +-- src/io/io_QP_and_GF.F | 3 +- src/qp_control/QP_apply_interpolate_QP.F | 56 +++++++++++++++++++++--- 4 files changed, 66 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 896a74e01e..13deb87212 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23130 h.4f2c7e17a7. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23131 h.05e29deee2. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23130 h.4f2c7e17a7' -PACKAGE_STRING='Yambo 5.2.0 r.23130 h.4f2c7e17a7' +PACKAGE_VERSION='5.2.0 r.23131 h.05e29deee2' +PACKAGE_STRING='Yambo 5.2.0 r.23131 h.05e29deee2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23130 h.4f2c7e17a7 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23131 h.05e29deee2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23130 h.4f2c7e17a7:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23131 h.05e29deee2:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23130 h.4f2c7e17a7 +Yambo configure 5.2.0 r.23131 h.05e29deee2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23130 h.4f2c7e17a7, which was +It was created by Yambo $as_me 5.2.0 r.23131 h.05e29deee2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23130" -SHASH="4f2c7e17a7" +SREVISION="23131" +SHASH="05e29deee2" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23130 h.4f2c7e17a7, which was +This file was extended by Yambo $as_me 5.2.0 r.23131 h.05e29deee2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23130 h.4f2c7e17a7 +Yambo config.status 5.2.0 r.23131 h.05e29deee2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5df3e7fee1..3bc9a5375e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23130 h.4f2c7e17a7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23131 h.05e29deee2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23130" -SHASH="4f2c7e17a7" +SREVISION="23131" +SHASH="05e29deee2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_QP_and_GF.F b/src/io/io_QP_and_GF.F index eae85c600d..190154a583 100644 --- a/src/io/io_QP_and_GF.F +++ b/src/io/io_QP_and_GF.F @@ -50,12 +50,13 @@ integer function io_QP_and_GF(what,qp,ID) if (what=="G" ) type_two_DB=.TRUE. if (index(what,"QP_merged")>0.and.write_is_on(ID)) type_two_DB=.TRUE. if (index(what,"QP_expanded")>0.and.write_is_on(ID)) type_two_DB=.TRUE. + if (index(what,"QP_interpolated")>0.and.write_is_on(ID)) type_two_DB=.TRUE. ! QP_type_DB=.FALSE. if (what=="QP") QP_type_DB=.TRUE. if (index(what,".QP")/=0) QP_type_DB=.TRUE. if (index(what,"QP_merged")>0.and.write_is_on(ID)) QP_type_DB=.TRUE. - if (index(what,"QP_expanded")>0.and.write_is_on(ID)) QP_type_DB=.TRUE. + if (index(what,"QP_interpolated")>0.and.write_is_on(ID)) QP_type_DB=.TRUE. ! if (type_two_DB) then io_QP_and_GF=io_connect(desc=what,type=2,ID=ID) diff --git a/src/qp_control/QP_apply_interpolate_QP.F b/src/qp_control/QP_apply_interpolate_QP.F index 517678adc5..e01fa19aee 100644 --- a/src/qp_control/QP_apply_interpolate_QP.F +++ b/src/qp_control/QP_apply_interpolate_QP.F @@ -16,14 +16,16 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) ! This is true both at zero and finite temperature. Indeed also at finite temperature ! when the theory is causal the GF must be rotated to the real-energy axis. ! - use pars, ONLY:SP,schlen + use pars, ONLY:SP,schlen,cZERO use units, ONLY:HA2EV + use IO_int, ONLY:io_control + use IO_m, ONLY:OP_WR_CL,LOG use electrons, ONLY:n_sp_pol,spin use com, ONLY:msg use electrons, ONLY:levels,spin use R_lattice, ONLY:bz_samp,bz_samp_reset use stderr, ONLY:real2ch - use QP_m, ONLY:QP_t + use QP_m, ONLY:QP_t,QP_alloc,QP_reset use QP_CTL_m, ONLY:QP_action,QP_ctl_msg_fmt,QP_ctl_xc_STRING,At_least_one_band_corrected use interpolate, ONLY:NN_n_of_nearest,INTERP_obj,INTERPOLATE_msg_fmt,& & INTERPOLATION_driver_seed,INTERPOLATION_driver_do,INTERP_shell_factor @@ -38,10 +40,13 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) ! Work Space ! real(SP) :: E_diff(n_sp_pol),E_min(n_sp_pol) - integer :: ik,ik_fg,iband,i_spin,ID,i_qp,N_exact,N_close,N_far,DB_bands(2) + integer :: ik,ik_fg,iband,i_spin,ID,i_qp,N_exact,N_close,N_far,DB_bands(2),ID_IO,i_err,ic logical :: wrong_width_sign_warn - character(schlen):: what + character(schlen):: what,QP_interpolated_name type(bz_samp) :: QP_k + type(QP_t) :: qp_interpolated + ! + integer, external :: io_QP_and_GF ! ! IBZ -> BZ (iku) ! @@ -52,6 +57,11 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) wrong_width_sign_warn=.false. ! DB_bands=(/minval(qp%table(:,1)),maxval(qp%table(:,1))/) + ! + call QP_reset(qp_interpolated) + qp_interpolated%nk=k%nibz + qp_interpolated%n_states=(DB_bands(2)-DB_bands(1)+1)*n_sp_pol*k%nibz + call QP_alloc(qp_interpolated) ! ! Setup ! @@ -97,9 +107,12 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) N_close=0 N_far =0 ! + ic=0 do ik=1,k%nibz - do iband=bands(1),bands(2) + qp_interpolated%k(ik,:)=k%pt(ik,:) + do iband=bands(1),bands(2) do i_spin=1,n_sp_pol + ic=ic+1 ! call INTERPOLATION_nearest_E(En%Eo(iband,ik,i_spin),qp,E_diff(i_spin),i_qp,i_spin) call QP_transfer_nearest('Stnd_Gd') @@ -133,6 +146,14 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) endif endif ! + ! Output + !-------- + ! + QP_interpolated_name='QP_interpolated' + call io_control(ACTION=OP_WR_CL,COM=LOG,SEC=(/1,2,3/),ID=ID_IO) + i_err=io_QP_and_GF(trim(QP_interpolated_name),qp_interpolated,ID_IO) + call QP_reset(qp_interpolated) + ! ! Clean ! call k_ibz2bz(k,'d',.false.) @@ -164,13 +185,16 @@ subroutine QP_transfer(action_kind) ! case('appl') ! + ic=0 do ik=1,k%nibz - do iband=bands(1),bands(2) + qp_interpolated%k(ik,:)=k%pt(ik,:) + do iband=bands(1),bands(2) ! if (ibandDB_bands(2)) cycle ! do i_spin=1,n_sp_pol + ic=ic+1 ! i_ref=0 if (QP_action(i_ACTION)%plan(1)) i_ref(2)=n_sp_pol @@ -178,6 +202,15 @@ subroutine QP_transfer(action_kind) ! if(QP_action(i_ACTION)%plan(1)) then en%E(iband,ik,i_spin)=en%Eo(iband,ik,i_spin)+INTERP_obj(ID)%INTERP(iband,ik,i_ref(1)+i_spin) + ! + qp_interpolated%E_bare(ic)=en%Eo(iband,ik,i_spin) + qp_interpolated%E(ic)=en%E(iband,ik,i_spin) + qp_interpolated%Z(ic)=cZERO + qp_interpolated%table(ic,1)=iband + qp_interpolated%table(ic,2)=iband + qp_interpolated%table(ic,3)=ik + if(n_sp_pol==2) qp_interpolated%table(ic,4)=i_spin + ! if(allocated(en%FG%E)) then ik1=k%FGbare%k_range(ik,1) ik2=k%FGbare%k_range(ik,2) @@ -231,6 +264,17 @@ subroutine QP_transfer_nearest(action_kind) & real(qp%E(i_qp),SP)-qp%E_bare(i_qp) At_least_one_band_corrected=.TRUE. if(action_kind=="Stnd_Gd") QP_action(i_ACTION)%STATES_done(iband,ik,i_spin)=1 + ! + if(action_kind=="Stnd_Gd") then + qp_interpolated%E_bare(ic)=en%Eo(iband,ik,i_spin) + qp_interpolated%E(ic)=en%E(iband,ik,i_spin) + qp_interpolated%Z(ic)=cZERO + qp_interpolated%table(ic,1)=iband + qp_interpolated%table(ic,2)=iband + qp_interpolated%table(ic,3)=ik + if(n_sp_pol==2) qp_interpolated%table(ic,4)=i_spin + endif + ! endif ! if (QP_action(i_ACTION)%plan(2)) then From 5eb0c8244e0f4132c88b54da6235ae287165d13b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Jun 2024 23:45:05 +0200 Subject: [PATCH 0799/1367] Version 5.2.0, Revision 23132, Hash aabf26aae2 MODIFIED * configure include/version/version.m4 qp_control/QP_apply_interpolate_QP.F Bugs: - [yambo] Fixed printing of ndb.QP_interpolated in uei interplation mode Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/qp_control/QP_apply_interpolate_QP.F | 5 +++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 13deb87212..63fc227eac 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23131 h.05e29deee2. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23132 h.aabf26aae2. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23131 h.05e29deee2' -PACKAGE_STRING='Yambo 5.2.0 r.23131 h.05e29deee2' +PACKAGE_VERSION='5.2.0 r.23132 h.aabf26aae2' +PACKAGE_STRING='Yambo 5.2.0 r.23132 h.aabf26aae2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23131 h.05e29deee2 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23132 h.aabf26aae2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23131 h.05e29deee2:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23132 h.aabf26aae2:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23131 h.05e29deee2 +Yambo configure 5.2.0 r.23132 h.aabf26aae2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23131 h.05e29deee2, which was +It was created by Yambo $as_me 5.2.0 r.23132 h.aabf26aae2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23131" -SHASH="05e29deee2" +SREVISION="23132" +SHASH="aabf26aae2" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23131 h.05e29deee2, which was +This file was extended by Yambo $as_me 5.2.0 r.23132 h.aabf26aae2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23131 h.05e29deee2 +Yambo config.status 5.2.0 r.23132 h.aabf26aae2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3bc9a5375e..f65c2b112e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23131 h.05e29deee2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23132 h.aabf26aae2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23131" -SHASH="05e29deee2" +SREVISION="23132" +SHASH="aabf26aae2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/qp_control/QP_apply_interpolate_QP.F b/src/qp_control/QP_apply_interpolate_QP.F index e01fa19aee..0a7a0ce48e 100644 --- a/src/qp_control/QP_apply_interpolate_QP.F +++ b/src/qp_control/QP_apply_interpolate_QP.F @@ -112,7 +112,8 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) qp_interpolated%k(ik,:)=k%pt(ik,:) do iband=bands(1),bands(2) do i_spin=1,n_sp_pol - ic=ic+1 + ! + if (DB_bands(1)<=iband .and. iband<=DB_bands(2)) ic=ic+1 ! call INTERPOLATION_nearest_E(En%Eo(iband,ik,i_spin),qp,E_diff(i_spin),i_qp,i_spin) call QP_transfer_nearest('Stnd_Gd') @@ -265,7 +266,7 @@ subroutine QP_transfer_nearest(action_kind) At_least_one_band_corrected=.TRUE. if(action_kind=="Stnd_Gd") QP_action(i_ACTION)%STATES_done(iband,ik,i_spin)=1 ! - if(action_kind=="Stnd_Gd") then + if(action_kind=="Stnd_Gd" .and. DB_bands(1)<=iband .and. iband<=DB_bands(2)) then qp_interpolated%E_bare(ic)=en%Eo(iband,ik,i_spin) qp_interpolated%E(ic)=en%E(iband,ik,i_spin) qp_interpolated%Z(ic)=cZERO From 566513b49a8bf64052197de5d9f54c465309d845 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 25 May 2024 23:34:36 +0200 Subject: [PATCH 0800/1367] Version 5.2.0, Revision 23218, Hash 4348a8b MODIFIED * modified: ypp/real_time/RT_OBSERVABLES_IO_path.F Changes: - [ypp_rt] Small easthetic change Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- ypp/real_time/RT_OBSERVABLES_IO_path.F | 4 +++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 63fc227eac..9246be1225 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23132 h.aabf26aae2. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23218 h.4348a8b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23132 h.aabf26aae2' -PACKAGE_STRING='Yambo 5.2.0 r.23132 h.aabf26aae2' +PACKAGE_VERSION='5.2.0 r.23218 h.4348a8b' +PACKAGE_STRING='Yambo 5.2.0 r.23218 h.4348a8b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23132 h.aabf26aae2 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23218 h.4348a8b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23132 h.aabf26aae2:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23218 h.4348a8b:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23132 h.aabf26aae2 +Yambo configure 5.2.0 r.23218 h.4348a8b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23132 h.aabf26aae2, which was +It was created by Yambo $as_me 5.2.0 r.23218 h.4348a8b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23132" -SHASH="aabf26aae2" +SREVISION="23218" +SHASH="4348a8b" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23132 h.aabf26aae2, which was +This file was extended by Yambo $as_me 5.2.0 r.23218 h.4348a8b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23132 h.aabf26aae2 +Yambo config.status 5.2.0 r.23218 h.4348a8b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index f65c2b112e..bbff03acf0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23132 h.aabf26aae2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23218 h.4348a8b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23132" -SHASH="aabf26aae2" +SREVISION="23218" +SHASH="4348a8b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index 30fdab5530..e7739aace2 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -82,8 +82,9 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) & (trim(Probe_Keyword)=="none".and.index(trim(Probe_path(i_f)),trim(jobstr))>0)) then N_probes =N_probes+1 i_f=i_f+1 - cycle + cycle else if ( index(trim(Probe_path(i_f)),trim(Pump_Keyword))>0 ) then + call msg('s',' Candidate pump found in ',trim(Probe_path(i_f))) Pump_path=Probe_path(i_f) N_pumps=1 endif @@ -117,6 +118,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) call IO_desc_duplicate(RT_desc,Pump_RT_desc) if (N_pump_frequencies>1) call error('Pumps with multiple frequencies still not supported') else + call warning('Pump discarded due to IO_error in RT_OBSERVABLES') N_pumps=0 endif endif From e37be73e7622a91328096b10d325b2f8630a0657 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 21 Jun 2024 11:33:16 +0200 Subject: [PATCH 0801/1367] Version 5.2.0, Revision 23239, Hash b626a0b2cb MODIFIED * configure include/version/version.m4 DELETED * include/driver/version.h Changes: - deleted old version.h file (not needed anymore) Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/driver/version.h | 30 ------------------------------ include/version/version.m4 | 6 +++--- 3 files changed, 14 insertions(+), 44 deletions(-) delete mode 100644 include/driver/version.h diff --git a/configure b/configure index 32999844c6..b716c67a52 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23202 h.d35fae3f4e. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23239 h.b626a0b2cb. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23202 h.d35fae3f4e' -PACKAGE_STRING='Yambo 5.2.0 r.23202 h.d35fae3f4e' +PACKAGE_VERSION='5.2.0 r.23239 h.b626a0b2cb' +PACKAGE_STRING='Yambo 5.2.0 r.23239 h.b626a0b2cb' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23202 h.d35fae3f4e to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23239 h.b626a0b2cb to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23202 h.d35fae3f4e:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23239 h.b626a0b2cb:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23202 h.d35fae3f4e +Yambo configure 5.2.0 r.23239 h.b626a0b2cb generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23202 h.d35fae3f4e, which was +It was created by Yambo $as_me 5.2.0 r.23239 h.b626a0b2cb, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23202" -SHASH="d35fae3f4e" +SREVISION="23239" +SHASH="b626a0b2cb" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23202 h.d35fae3f4e, which was +This file was extended by Yambo $as_me 5.2.0 r.23239 h.b626a0b2cb, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23202 h.d35fae3f4e +Yambo config.status 5.2.0 r.23239 h.b626a0b2cb configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/driver/version.h b/include/driver/version.h deleted file mode 100644 index 6a7fb9fa46..0000000000 --- a/include/driver/version.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2000-2022 the YAMBO team - http://www.yambo-code.org - - Authors (see AUTHORS file for details): AM - - This file is distributed under the terms of the GNU - General Public License. You can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; - either version 2, or (at your option) any later version. - - This program is distributed in the hope that it will - be useful, but WITHOUT ANY WARRANTY; without even the - implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, - MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -*/ - -#define YAMBO_VERSION 5 -#define YAMBO_SUBVERSION 1 -#define YAMBO_PATCHLEVEL 0 -#define YAMBO_REVISION 22124 -#define YAMBO_HASH "407f3a474" - diff --git a/include/version/version.m4 b/include/version/version.m4 index dd88d5e7e5..7696a1ba3c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23202 h.d35fae3f4e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23239 h.b626a0b2cb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23202" -SHASH="d35fae3f4e" +SREVISION="23239" +SHASH="b626a0b2cb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From a3133b8d575284bd5a4caf6eb19bc1a387bff0b9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 24 Jun 2024 14:17:42 +0200 Subject: [PATCH 0802/1367] Version 5.2.0, Revision 23578, Hash fcceb66df2 MODIFIED * configure include/version/version.m4 exc-ph/ELEC_WF_phases.F exc-ph/EXCPH_gkkp_driver.F modules/mod_interfaces.F setup/build_spin_sop.F wf_and_fft/EXC_WF_symm_qpoint.F wf_and_fft/WF_phase_matrices.F wf_and_fft/WF_symm_kpoint.F wf_and_fft/WF_symm_kpoint_g.F Bugs: - [yambo] Fixed WF_phase_matrices in presence of n_spinor Changes: - [yambo_ph] exc-ph: added l_mim_mem option for loading of WF phases Patch sent by: Davide Sangalli --- configure | 4 +- include/version/version.m4 | 4 +- src/exc-ph/ELEC_WF_phases.F | 12 +- src/exc-ph/EXCPH_gkkp_driver.F | 14 +-- src/modules/mod_interfaces.F | 16 +++ src/setup/build_spin_sop.F | 1 + src/wf_and_fft/EXC_WF_symm_qpoint.F | 10 +- src/wf_and_fft/WF_phase_matrices.F | 66 +++++++---- src/wf_and_fft/WF_symm_kpoint.F | 6 +- src/wf_and_fft/WF_symm_kpoint_g.F | 165 +++++++++++++++++++++++++++- 10 files changed, 248 insertions(+), 50 deletions(-) diff --git a/configure b/configure index 92fb5d4548..f32ec73af8 100755 --- a/configure +++ b/configure @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23531" -SHASH="e4a4b87232" +SREVISION="23578" +SHASH="fcceb66df2" diff --git a/include/version/version.m4 b/include/version/version.m4 index da686b3dcd..e32b20af82 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.22929 h.cf573729b0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23531" -SHASH="e4a4b87232" +SREVISION="23578" +SHASH="fcceb66df2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/ELEC_WF_phases.F b/src/exc-ph/ELEC_WF_phases.F index 5b114a8cfe..e46fd5f05a 100644 --- a/src/exc-ph/ELEC_WF_phases.F +++ b/src/exc-ph/ELEC_WF_phases.F @@ -24,7 +24,7 @@ !! Code taken from branch phys-excitons !! file ypp/excitons/exciton_symmetries.f90 ! -subroutine ELEC_WF_phases(E,k) +subroutine ELEC_WF_phases(E,k,l_min_mem,ID_phases) ! use D_lattice, ONLY:nsym use R_lattice, ONLY:bz_samp @@ -36,13 +36,15 @@ subroutine ELEC_WF_phases(E,k) ! #include ! - type(levels) ::E - type(bz_samp) ::k + type(levels), intent(in) :: E + type(bz_samp), intent(in) :: k + integer, intent(out):: ID_phases + logical, intent(in) :: l_min_mem ! ! Work Space ! integer :: nsz(5) - integer :: ID_phases,io_err + integer :: io_err integer :: i_sp_pol,ik,il1 ! ! Electronic part of the symmetries @@ -58,6 +60,8 @@ subroutine ELEC_WF_phases(E,k) call io_control(ACTION=OP_RD,COM=REP,SEC=(/1,2/),MODE=DUMP,ID=ID_phases) io_err=io_WF_phases(BS_bands,0,0,0,ID_phases,(/0,0,0,0,0/)) ! + if (l_min_mem) return + ! nsz(1:2)=maxval(WF_phases_b_map(:,:,:,1)) nsz(3) =maxval(WF_phases_b_map(:,:,:,2)) nsz(4) =nsym diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index e2cb232fe6..d3a07f893f 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -65,6 +65,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) integer :: S_index(EXCPH_states(1):EXCPH_States(2)),ID_phases integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID,IO_ACT integer :: il,iq_bz,iq,i_star,iq_s,elph_branches_save(2)!,iq_db + logical :: l_min_mem ! Debug !integer :: ik !open(1, file='K_grid_bz.dat') @@ -134,8 +135,10 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call k_build_up_BZ_tables(k) call k_build_up_BZ_tables(q) ! + l_min_mem=.false. + ! ! Pre-requisite: calculate electronic phases (needed to rotate the excitonic wavefunctions) - if(nsym>1) call ELEC_WF_phases(E,k) + if(nsym>1) call ELEC_WF_phases(E,k,l_min_mem,ID_phases) ! call EXCPH_load_L(1,X,'check','Lin') ! At present the Lin can be only gamma iq=1 ! @@ -216,14 +219,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! BS_mat_out=cZERO ! Here we obtain the rotated BS_mat_out at iq_bz - if(nsym>1) call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,.false.) - if(nsym==1) BS_mat_out=BS_mat(:,EXCPH_sum(1):EXCPH_sum(2)) - ! - !write(47,*) "#q = ",iq_bz - !write(47,*) "# alpha = ", EXCPH_sum(1),EXCPH_sum(1)+1 - !do ik=1,k%nbz - ! write(47,*) BS_mat_out(ik,EXCPH_sum(1)), BS_mat_out(ik,EXCPH_sum(1)+1) - !end do + call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,l_min_mem) ! EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 3ca75a0f8b..3c166a1045 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -267,6 +267,15 @@ function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) type(tddft_wf_t), target, intent(inout) :: tddft_wf end function TDDFT_ALDA_R_space ! + subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) + use pars, ONLY:SP + use wave_func, ONLY:WAVEs + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0 + complex(SP), intent(in) :: ssop(2,2) + type (WAVEs), target, intent(inout) :: WF + end subroutine WF_symm_kpoint_g_ssop + ! subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) use wave_func, ONLY:WAVEs integer, intent(in) :: b_to_load(2) @@ -274,6 +283,13 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) type (WAVEs), target, intent(inout) :: WF end subroutine WF_symm_kpoint_g ! + subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) + use wave_func, ONLY:WAVEs + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0,isref,igref + type (WAVEs), target, intent(inout) :: WF + end subroutine WF_symm_kpoint_g_BZ + ! end interface ! interface WF_shift_kpoint diff --git a/src/setup/build_spin_sop.F b/src/setup/build_spin_sop.F index 1abb326085..ec83b73b89 100644 --- a/src/setup/build_spin_sop.F +++ b/src/setup/build_spin_sop.F @@ -36,6 +36,7 @@ subroutine build_spin_sop() endif ! ! T_rev=(-i sigma_y K0 ) with K0 the complex conjugation. + ! NB: (-i sigma_y) K0 = K0 (-i sigma_y) t_rev=-cI*sigma_y ! do is=1,nsym diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F index 89b8edcb09..3fb432d29d 100644 --- a/src/wf_and_fft/EXC_WF_symm_qpoint.F +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -94,6 +94,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& ip =Xk%sstar(ipbz,1) istarp=Xk%sstar(ipbz,3) ! + if (ip/=ik) call error("WF_phases: rotation of ik got a different ip in the IBZ") + ! ! (R)^-1 k_BZ - q_IBZ = p_BZ - q_IBZ ipmqbz=qindx_X(iq,ipbz,1) ipmqg0=qindx_X(iq,ipbz,2) @@ -175,8 +177,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& phase_cc= WF_phases(i_c1_bnd,i_c2_bnd,i_c1_grp,isq,i2) endif ! - if(.not.t_rev) EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+BS_mat(neh2,il)*phase_vv*phase_cc - if(t_rev) EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+conjg(BS_mat(neh2,il))*phase_vv*phase_cc + if(.not.t_rev) EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+ BS_mat(neh2,il) *phase_vv*phase_cc + if( t_rev) EXC_WFs(neh1,iexc)=EXC_WFs(neh1,iexc)+conjg(BS_mat(neh2,il))*phase_vv*phase_cc ! enddo enddo @@ -196,8 +198,4 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& enddo enddo ! - !! take care of time reversal if needed - !! - !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_p) - ! end subroutine EXC_WF_symm_qpoint diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index d44d38c2c4..5394f1a44d 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -19,11 +19,11 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing use R_lattice, ONLY:bz_samp,G_m_G,minus_G,g_vec,rl_sop - use D_lattice, ONLY:nsym,sop_tab + use D_lattice, ONLY:nsym,i_time_rev,sop_tab,DEV_VAR(spin_sop) use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k - use stderr, ONLY:intc + use stderr, ONLY:intc use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V use hamiltonian, ONLY:B_mat_index @@ -31,7 +31,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use vec_operate, ONLY:degeneration_finder use parallel_m, ONLY:PAR_IND_WF_k,PAR_IND_WF_b,PAR_IND_B_mat use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute - use interfaces, ONLY:WF_symm_kpoint_g,WF_load,WF_free,eval_G_minus_G + use interfaces, ONLY:WF_symm_kpoint_g,WF_symm_kpoint_g_BZ,WF_symm_kpoint_g_ssop,WF_load,WF_free,eval_G_minus_G use IO_int, ONLY:io_control use IO_m, ONLY:VERIFY,DUMP,REP,OP_WR,WR,WR_CL,OP_RD_CL use timing_m, ONLY:timing @@ -47,13 +47,17 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) integer :: first_el(blim(2)-blim(1)+1),n_of_el(blim(2)-blim(1)+1),& & blim_n(2),n_deg_grp,i_grp,g0_idx(3,2),nsz(5),max_igk real(SP) :: g0_length(3) - integer :: ikbz,iRkbz,isk,isloop,isk_c,isk_y,iGk_y,iGk_c,istark,& + integer :: ikbz,iRkbz,isk,isloop,isk_c,isk_y,iGk_y,iGk_c,iGk,iGloop,istark,& & iby,ibc,iby_phase,ibc_phase,i_sp_pol,ik,& & ifrag,s_count,i_wf_y,i_wf_c,iGp,ng_tmp,nb,NG_max complex(SP) :: det,charac(blim(2)-blim(1)+1,nsym) + complex(SP) :: spin_sop_composed(2,2),s1(2,2),s2(2,2) +#if defined _CUDA + complex(SP) DEV_ATTR :: spin_sop_composed_d(2,2) +#endif complex(SP), allocatable :: WF_phases(:,:,:,:,:) ! - type(WAVEs) :: WF_k,WF_Rk_c,WF_Rk_y + type(WAVEs) :: WF_k,WF_Rk_c,WF_Rk_y,WF_Rk ! integer :: io_err,ID ! @@ -95,6 +99,8 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) &//"), it's not possible to compute WF phases.") endif ! + spin_sop_composed=cZERO + ! do i_sp_pol=1,n_sp_pol ! do ik=klim(1),klim(2) @@ -126,32 +132,52 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) isk =Xk%star(ik,istark) ikbz=Xk%k_table(ik,isk) ! - !charac=0._SP - !if (istark==1) then - ! write(*,*) "" - ! write(*,*) "ik = ",ik,Xk%pt(ik,:) - !endif + iGk =minus_G(Xk%g_table(ik,isk)) + ! + call WF_copy(WF_k,WF_Rk) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk,iGk,WF_Rk) ! do isloop=1,nsym ! ! symmetry composed isk_c=sop_tab(isloop,isk) + iGk_c =minus_G(Xk%g_table(ik,isk_c)) + ! + iGloop=G_m_G(iGk_c,iGk) + ! + ! spin_sop with time-reversal are not a space group + ! I need to build the composed spin symmetry operator + ! + if(n_spinor==2) then + s1=spin_sop(:,:,isk) + s2=spin_sop(:,:,isloop) + if (isk >nsym/(1+i_time_rev)) s1=conjg(s1) + if (isloop>nsym/(1+i_time_rev)) then + s2=conjg(s2) + s1=conjg(s1) + endif + spin_sop_composed=matmul(s2,s1) + if (isk_c >nsym/(1+i_time_rev)) spin_sop_composed=conjg(spin_sop_composed) +#if defined _CUDA + call dev_memcpy(spin_sop_composed_d,spin_sop_composed) +#endif + endif + ! ! symmetry used by yambo isk_y=Xk%s_table(ik,isk_c) + iGk_y =minus_G(Xk%g_table(ik,isk_y)) ! iRkbz =Xk%k_table(ik,isk_c) ! - iGk_c =minus_G(Xk%g_table(ik,isk_c)) - iGk_y =minus_G(Xk%g_table(ik,isk_y)) + ! OPTION 1: Apply second symmetry operatio to the WF already expanded in the BZ + call WF_copy(WF_Rk,WF_Rk_c) + call WF_symm_kpoint_g_BZ(blim,ik,i_sp_pol,isloop,iGloop,isk,iGk,WF_Rk_c) ! - call WF_copy(WF_k,WF_Rk_c) - call WF_copy(WF_k,WF_Rk_y) - ! - !if (ik==13 .and. isloop==7) then - ! write(*,*) "next two " - !endif + ! OPTION 2: Use the composed symmetry, importing the composed spin soc + !call WF_copy(WF_k,WF_Rk_c) + !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,spin_sop_composed,WF_Rk_c) ! - call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c) + call WF_copy(WF_k,WF_Rk_y) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_y,iGk_y,WF_Rk_y) ! do i_grp=1,n_deg_grp @@ -196,6 +222,8 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! enddo ! isp ! + call WF_free(WF_Rk) + ! call live_timing(steps=1) ! !call PP_redux_wait(WF_phases(:,:,s_count,k_count,i_sp_pol)) diff --git a/src/wf_and_fft/WF_symm_kpoint.F b/src/wf_and_fft/WF_symm_kpoint.F index 95038dda4f..a3088e8be0 100644 --- a/src/wf_and_fft/WF_symm_kpoint.F +++ b/src/wf_and_fft/WF_symm_kpoint.F @@ -55,12 +55,10 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) if (n_spinor==1) then ! #ifdef _CUDA_LOC - !$cuf kernel do(2) <<<*,*>>> + !$cuf kernel do(1) <<<*,*>>> #endif - do i_spinor=1,n_spinor do i_g=1,wf_ng - WF_k_out(DEV_VAR(g_rot)(i_g,is),i_spinor,ib,i_sp_pol)=WF_p(i_g,i_spinor,iwf) - enddo + WF_k_out(DEV_VAR(g_rot)(i_g,is),1,ib,i_sp_pol)=WF_p(i_g,1,iwf) enddo ! else diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 734d81dd15..b65f9f0fbf 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -24,7 +24,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - type (WAVEs), target, intent(inout) :: WF + type (WAVEs), target, intent(inout) :: WF ! ! Work space ! @@ -36,7 +36,6 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) integer :: ib,i_wf,isymm_m1 integer :: ic,ig,igp,igr,igs,i_spinor ! - !if(isymm==idt_index) write(*,*) k_pt(ik,:) if(isymm==idt_index) return ! WF_p => DEV_VAR(WF%c) @@ -70,9 +69,9 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & -& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) +& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & -& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) +& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) enddo endif ! @@ -84,3 +83,161 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) enddo ! end subroutine WF_symm_kpoint_g +! +! +subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) + ! + use pars, ONLY:SP,cZERO + use electrons, ONLY:n_spinor + use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:wf_ng,wf_ng_1st_BZ + use vec_operate, ONLY:c2a + use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& + & k_pt,rl_sop,g_vec + use deviceXlib_m, ONLY:dev_conjg,dev_memcpy + use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & + & dl_sop,i_time_rev,nsym + ! + implicit none + ! + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0,isref,igref + type (WAVEs), target, intent(inout) :: WF + ! + ! Work space + ! + complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) + complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + ! + real(SP) :: krot(3),G_cc(3) + ! + integer :: ib,i_wf,isymm_m1 + integer :: ic,ig,igp,igr,igs,i_spinor + ! + if(isymm==idt_index) return + ! + WF_p => DEV_VAR(WF%c) + isymm_m1=sop_inv(isymm) + ! + do ib=b_to_load(1),b_to_load(2) + ! + WF_k_tmp=cZERO + ! + i_wf=WF%index(ib,ik,i_sp_pol) + ! + if (n_spinor==1) then + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(wf_igk(ic,ik),isref),igref) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + enddo + ! + else + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(wf_igk(ic,ik),isref),igref) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & + & DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & + & DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) + enddo + endif + ! + ! take care of time reversal if needed + if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + ! + call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + ! + enddo + ! +end subroutine WF_symm_kpoint_g_BZ +! +! +subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) + ! + use pars, ONLY:SP,cZERO + use electrons, ONLY:n_spinor + use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:wf_ng,wf_ng_1st_BZ + use vec_operate, ONLY:c2a + use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& + & k_pt,rl_sop,g_vec + use deviceXlib_m, ONLY:dev_conjg,dev_memcpy + use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & + & dl_sop,i_time_rev,nsym + ! + implicit none + ! + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0 + complex(SP), intent(in) :: ssop(2,2) + type (WAVEs), target, intent(inout) :: WF + ! + ! Work space + ! + complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) + complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + ! + real(SP) :: krot(3),G_cc(3) + ! + integer :: ib,i_wf,isymm_m1 + integer :: ic,ig,igp,igr,igs,i_spinor + ! + if(isymm==idt_index) return + ! + WF_p => DEV_VAR(WF%c) + isymm_m1=sop_inv(isymm) + ! + do ib=b_to_load(1),b_to_load(2) + ! + WF_k_tmp=cZERO + ! + i_wf=WF%index(ib,ik,i_sp_pol) + ! + if (n_spinor==1) then + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=wf_igk(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + enddo + ! + else + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=wf_igk(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=ssop(1,1)*WF_p(ig,1,i_wf)+ & + & ssop(1,2)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,2)=ssop(2,1)*WF_p(ig,1,i_wf)+ & + & ssop(2,2)*WF_p(ig,2,i_wf) + enddo + endif + ! + ! take care of time reversal if needed + if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + ! + call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + ! + enddo + ! + end subroutine WF_symm_kpoint_g_ssop + \ No newline at end of file From 35b6e965321018f23050974079346758e320db37 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 24 Jun 2024 14:25:35 +0200 Subject: [PATCH 0803/1367] Version 5.2.0, Revision 23579, Hash a3133b8d57 MODIFIED * configure include/version/version.m4 exc-ph/EXCPH_gkkp_eval.F exc-ph/EXCPH_load_L.F io/io_WF_phases.F ypp/el-ph/ELPH_databases.F Changes: - [yambo] Code cleaning and improvements Patch sent by: Davide Sangalli --- configure | 4 +- include/version/version.m4 | 4 +- src/exc-ph/EXCPH_gkkp_eval.F | 91 +++++++++--------------------------- src/exc-ph/EXCPH_load_L.F | 2 +- src/io/io_WF_phases.F | 5 +- ypp/el-ph/ELPH_databases.F | 4 +- 6 files changed, 31 insertions(+), 79 deletions(-) diff --git a/configure b/configure index f32ec73af8..4921fe49cf 100755 --- a/configure +++ b/configure @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23578" -SHASH="fcceb66df2" +SREVISION="23579" +SHASH="a3133b8d57" diff --git a/include/version/version.m4 b/include/version/version.m4 index e32b20af82..678b6bfdc9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.22929 h.cf573729b0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23578" -SHASH="fcceb66df2" +SREVISION="23579" +SHASH="a3133b8d57" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 828c9873d2..259981c050 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -50,10 +50,10 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! Work Space ! integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& -& iv,ic,ik_bz,ivp,icp,i_beta,ip_bz,ik_plus_iq_bz,IO_ACT, & -& iv_in,ic_in,ik_bz_in!,ik_minus_iq_bz +& iv,ic,ik_bz,ivp,icp,i_beta,ik_plus_iq_bz,IO_ACT, & +& iv_in,ic_in,ik_bz_in real(SP) :: ph_E - complex(SP) :: elph_gkkp + complex(SP) :: elph_gkkp,EXC_out,EXC_in integer, external :: io_ELPH ! ! Loop scheme: @@ -111,63 +111,45 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! 1=DOWN (hole contribution) !======== ! - ip_bz = ik_bz ! elemental_scattering(iq_s,ik_bz) - ! do ivp=BS_bands(1),BS_bands(2) ! if (l_elec_only) exit ! - i_Hp=BSS_eh_table_m1(ip_bz,ivp,ic,1,1) + i_Hp=BSS_eh_table_m1(ik_bz,ivp,ic,1,1) if (i_Hp==0) cycle ! - ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, - ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg - ! and SWAP band indices in the matrix elements: we use the NOTES indexing. - ! !!!Notes: (iv,ivp) => Code: (ivp,iv) - ! !!!See issues #690 and #609 if (.not.l_const_elph) then ik_db=K_io_map(ik_bz) - !ik_db=K_io_map(ik_minus_iq_bz) - if(.not.l_abs_elph) elph_gkkp=GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,iv,ivp,ik_db,1) /sqrt(2._SP*ph_E) if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,iv,ivp,ik_db,1))/sqrt(2._SP*ph_E) - !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ivp,iv,ik_db,1)) /sqrt(2._SP*ph_E) - !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ivp,iv,ik_db,1))/sqrt(2._SP*ph_E) endif ! - !write(iq_bz*1000+i_beta,*) i_Hp,ik_bz,ivp,ic,abs(BS_mat(i_Hp,i_beta)),ip_bz,ik_db,k%ptbz(ik_bz,:) + if ( l_abs_exc) EXC_OUT= abs(BS_mat_out(i_Hp,i_beta)) + if (.not.l_abs_exc) EXC_OUT=conjg(BS_mat_out(i_Hp,i_beta)) ! - if (l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - if (.not.l_abs_exc) Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) + Xi(i_H,1)=Xi(i_H,1)+elph_gkkp*EXC_OUT ! enddo ! ! 2=UP (electron contribution) !====== ! - ip_bz = ik_plus_iq_bz !elemental_scattering(iq_s,ik_plus_iq_bz) - ! do icp=BS_bands(1),BS_bands(2) ! if (l_hole_only) exit ! - i_Hp=BSS_eh_table_m1(ip_bz,iv,icp,1,1) + i_Hp=BSS_eh_table_m1(ik_plus_iq_bz,iv,icp,1,1) if (i_Hp==0) cycle - ! [NB] If the el-ph matrix elements are obtained bypassing the old el-ph interface, - ! such as with LetzElPhC+yambopy, then we don't need anymore to apply the conjg - ! and SWAP band indices in the matrix elements: we use the NOTES indexing. - ! !!!Notes: (icp,ic) => Code: (ic,icp) - ! !!!See issues #690 and #609 if (.not.l_const_elph) then ik_db=K_io_map(ik_plus_iq_bz) - !ik_db=K_io_map(ik_bz) - if(.not.l_abs_elph) elph_gkkp=GKKP%dVc(il,icp,ic,ik_db,1)/sqrt(2._SP*ph_E) + if(.not.l_abs_elph) elph_gkkp= GKKP%dVc(il,icp,ic,ik_db,1) /sqrt(2._SP*ph_E) if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,icp,ic,ik_db,1))/sqrt(2._SP*ph_E) - !if(.not.l_abs_elph) elph_gkkp=conjg(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) - !if( l_abs_elph) elph_gkkp=abs(GKKP%dVc(il,ic,icp,ik_db,1))/sqrt(2._SP*ph_E) endif ! - if (l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*abs(BS_mat_out(i_Hp,i_beta)) - if (.not.l_abs_exc) Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*conjg(BS_mat_out(i_Hp,i_beta)) + if ( l_abs_exc) EXC_OUT= abs(BS_mat_out(i_Hp,i_beta)) + if (.not.l_abs_exc) EXC_OUT=conjg(BS_mat_out(i_Hp,i_beta)) + ! + Xi(i_H,2)=Xi(i_H,2)+elph_gkkp*exc_out ! enddo ! @@ -196,55 +178,24 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) if (iv /= iv_in ) call error(" Wrong iv correspondence") if (ic /= ic_in ) call error(" Wrong ic correspondence") ! - ! "Left" part of exciton-phonon coupling. The "right" part is its conjugate + ! EXC_IN: "Left" part of exciton-phonon coupling. The "right" part is its conjugate + ! + if ( l_abs_exc) EXC_IN= abs(BS_mat_in(i_H,i_alpha)) + if (.not.l_abs_exc) EXC_IN= BS_mat_in(i_H,i_alpha) ! ! FIX ME ! Any reason why we use hole-electron instead of the standard elec-hole? - if (l_abs_exc) then - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& - & abs(BS_mat_in(i_H,i_alpha))*(Xi(i_H,1)-Xi(i_H,2)) - else - EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+& - & BS_mat_in(i_H,i_alpha)*(Xi(i_H,1)-Xi(i_H,2)) - endif + ! + EXCPH_Gkkp(il,i_beta,i_alpha)=EXCPH_Gkkp(il,i_beta,i_alpha)+EXC_IN*(Xi(i_H,1)-Xi(i_H,2)) ! enddo enddo ! enddo !Loop i_beta ! - ! Compute the squared couplings + ! Compute the squared couplings (to be removed) ! forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 end forall ! - !contains - ! - !integer function elemental_scattering(i_q_SYM,i_k_BZ) - ! - ! OUTDATED: now we use the correctly-rotated BS_mat_out already in the q_BZ - ! - ! This is done because the BSE is solved for q in IBZ and k in BZ. - ! However the EXCPH matrix elements are for k in BZ and q in BZ. - ! - ! Therefore, I have the exc. weight (q |cRk vRk-q) - ! but I don't have the exc. weight (Sq |cRk vRk-Sq). - ! - ! Yet, I know that (Sq |cRk vRk-Sq) = (q |c{S^-1R}k v{S^-1R}k-q). - ! - ! Therefore, in this subroutine I look for p = {S^-1 R}k - ! - !integer i_q_SYM,i_k_BZ,i_k_IBZ,i_k_SYM - ! - ! K_i_k_bz =R_i_k_SYM K_i_k_IBZ - ! - !i_k_IBZ = k%sstar(i_k_BZ,1) - !i_k_SYM = k%sstar(i_k_BZ,2) - ! - ! ip_bz=R_iq_s^-1 R_ik_s ik_ibz - ! - !elemental_scattering = k%k_table(i_k_IBZ, sop_tab(sop_inv(i_q_SYM),i_k_SYM) ) - ! - !end function - ! end subroutine diff --git a/src/exc-ph/EXCPH_load_L.F b/src/exc-ph/EXCPH_load_L.F index 4407f3ae82..1d6eec529b 100644 --- a/src/exc-ph/EXCPH_load_L.F +++ b/src/exc-ph/EXCPH_load_L.F @@ -65,7 +65,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) io_err=io_BSS_diago(iq_bse,1,ID_BS,X) if(io_err/=0) call error(" Error checking "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! - if (BS_res_ares_n_mat/=1) call error("Excitonic Gkkp: anti-resonant part not implemented") + !if (BS_res_ares_n_mat/=1) call error("Excitonic Gkkp: anti-resonant part not implemented") ! if(.not.BSS_write_eig_2_db) call error("BSS diago DB does not contain the eigenstates") ! diff --git a/src/io/io_WF_phases.F b/src/io/io_WF_phases.F index 35e1568d70..aa57645229 100644 --- a/src/io/io_WF_phases.F +++ b/src/io/io_WF_phases.F @@ -26,7 +26,7 @@ integer function io_WF_phases(nb,ik,istark,i_sp_pol,ID,nsz,WF_phases) ! Work Space ! integer :: VAR_ID,VAR_SIZE(6),VAR_POS(6),i_fragment,ID_frag - character(schlen) :: VAR_name + character(schlen) :: VAR_name,DIM_NAMES(6) ! call timing('io_WF_phases',OPR='start') ! @@ -70,11 +70,12 @@ integer function io_WF_phases(nb,ik,istark,i_sp_pol,ID,nsz,WF_phases) VAR_ID=1 VAR_name='WF_phases' VAR_SIZE=(/2,nsz(1),nsz(2),nsz(3),nsz(4),nsz(5)/) + DIM_NAMES = [character(schlen) :: 're_im', 'bands', 'bands', 'bands_grp', 'syms', 'istark'] !VAR_SIZE=(/2,shape(WF_phases)/) VAR_POS=(/1,1,1,1,1,1/) if(istark>0) VAR_POS=(/1,1,1,1,1,istark/) ! - call def_variable_bulk(ID_frag,trim(VAR_name),VAR_ID,VAR_SIZE,SP_YIO) + call def_variable_bulk(ID_frag,trim(VAR_name),VAR_ID,VAR_SIZE,SP_YIO,DIM_NAMES) call io_variable_bulk(ID_frag,VAR_ID,C5=WF_phases,IPOS=VAR_POS) ! call io_fragment_disconnect(ID,ID_frag) diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index abdcd5ccd4..b379dae038 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -165,8 +165,8 @@ subroutine ELPH_databases(k,E,q) DB_Q_map=0 do idb=1,DB_nq do iq=1,nqibz - v=DB_PH_qpt(idb,:) - if (v_is_zero(v+q%pt(iq,:),zero_=k_iku_zero)) DB_Q_map(idb)=iq + v=DB_PH_qpt(idb,:)-q%pt(iq,:) + if (v_is_zero(v,zero_=k_iku_zero)) DB_Q_map(idb)=iq enddo enddo ! From a6604654e55c56ede9b9810217cf6a89c21d1fb4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 24 Jun 2024 16:11:58 +0200 Subject: [PATCH 0804/1367] Version 5.2.0, Revision 23712, Hash 7cee80f78c MODIFIED * configure include/version/version.m4 driver/options_projects.c Bugs: - [yambo] Fixed compilation after merge with new driver Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/driver/options_projects.c | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index ed6a58a0f5..d2453710a8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23580 h.35b6e96532. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23712 h.7cee80f78c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23580 h.35b6e96532' -PACKAGE_STRING='Yambo 5.2.0 r.23580 h.35b6e96532' +PACKAGE_VERSION='5.2.0 r.23712 h.7cee80f78c' +PACKAGE_STRING='Yambo 5.2.0 r.23712 h.7cee80f78c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23580 h.35b6e96532 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23712 h.7cee80f78c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23580 h.35b6e96532:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23712 h.7cee80f78c:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23580 h.35b6e96532 +Yambo configure 5.2.0 r.23712 h.7cee80f78c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23580 h.35b6e96532, which was +It was created by Yambo $as_me 5.2.0 r.23712 h.7cee80f78c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23580" -SHASH="35b6e96532" +SREVISION="23712" +SHASH="7cee80f78c" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23580 h.35b6e96532, which was +This file was extended by Yambo $as_me 5.2.0 r.23712 h.7cee80f78c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23580 h.35b6e96532 +Yambo config.status 5.2.0 r.23712 h.7cee80f78c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 14002603ef..7d7a7d6c07 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23580 h.35b6e96532, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23712 h.7cee80f78c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23580" -SHASH="35b6e96532" +SREVISION="23712" +SHASH="7cee80f78c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index af43dba621..86f4c27ba4 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -74,7 +74,7 @@ void options_projects(struct options_struct options[],int *i_opt) options[*i_opt].section=desc; *i_opt=*i_opt+1; options[*i_opt].short_desc="Exciton-phonon"; - options[*i_opt].long_desc[0]="=(o)ptical spectra,(l)ife times"; + strcpy(options[*i_opt].long_desc[0],"=(o)ptical spectra,(l)ife times"); options[*i_opt].long_opt="excph"; options[*i_opt].char_var=1; options[*i_opt].short_opt='m'; From 8dbe4c002d9dadb9c850179180fe06043b734d0b Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Mon, 24 Jun 2024 18:37:41 +0200 Subject: [PATCH 0805/1367] Ready for merge with master + fix SU(3) composed symmetries --- src/collisions/DOUBLE_project.dep | 1 + src/collisions/NL_project.dep | 1 + src/driver/options_projects.c | 2 +- src/parallel/PHEL_project.dep | 2 ++ src/tddft/DOUBLE_project.dep | 1 + src/wf_and_fft/WF_phase_matrices.F | 45 +++++++++++++++++++----------- 6 files changed, 35 insertions(+), 17 deletions(-) create mode 100644 src/parallel/PHEL_project.dep diff --git a/src/collisions/DOUBLE_project.dep b/src/collisions/DOUBLE_project.dep index bcfe075e27..35d8286eee 100644 --- a/src/collisions/DOUBLE_project.dep +++ b/src/collisions/DOUBLE_project.dep @@ -5,6 +5,7 @@ COLLISIONS_compose_nl.o COLLISIONS_compose_rt.o COLLISIONS_compose_sc.o + COLLISIONS_compress.o COLLISIONS_eval.o COLLISIONS_linearize_and_IO.o COLLISIONS_load.o diff --git a/src/collisions/NL_project.dep b/src/collisions/NL_project.dep index f93c8bbabd..83ae783e44 100644 --- a/src/collisions/NL_project.dep +++ b/src/collisions/NL_project.dep @@ -3,6 +3,7 @@ COLLISIONS_alloc_and_free.o COLLISIONS_basic_operations.o COLLISIONS_compose_nl.o + COLLISIONS_compress.o COLLISIONS_eval.o COLLISIONS_linearize_and_IO.o COLLISIONS_load.o diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index af43dba621..86f4c27ba4 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -74,7 +74,7 @@ void options_projects(struct options_struct options[],int *i_opt) options[*i_opt].section=desc; *i_opt=*i_opt+1; options[*i_opt].short_desc="Exciton-phonon"; - options[*i_opt].long_desc[0]="=(o)ptical spectra,(l)ife times"; + strcpy(options[*i_opt].long_desc[0],"=(o)ptical spectra,(l)ife times"); options[*i_opt].long_opt="excph"; options[*i_opt].char_var=1; options[*i_opt].short_opt='m'; diff --git a/src/parallel/PHEL_project.dep b/src/parallel/PHEL_project.dep new file mode 100644 index 0000000000..5a22ceb339 --- /dev/null +++ b/src/parallel/PHEL_project.dep @@ -0,0 +1,2 @@ + PARALLEL_global_dimensions.o + diff --git a/src/tddft/DOUBLE_project.dep b/src/tddft/DOUBLE_project.dep index 32f2d9b8b7..9215373d32 100644 --- a/src/tddft/DOUBLE_project.dep +++ b/src/tddft/DOUBLE_project.dep @@ -1,4 +1,5 @@ TDDFT_ALDA_G_space.o + TDDFT_ALDA_R_space.o TDDFT_ALDA_eh_space_G_collisions_L.o TDDFT_ALDA_eh_space_G_collisions_R.o TDDFT_ALDA_eh_space_G_kernel.o diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 5394f1a44d..2a21aedbac 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -125,6 +125,16 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) YAMBO_ALLOC(WF_phases,(nsz(1),nsz(2),nsz(3),nsz(4),nsz(5))) WF_phases=cZERO ! + ! Here we have to apply to symmetries: + ! (i) expand from IBZ to BZ (s1) + ! (ii) rotate the expanded wfc to get WF_phase at each symmetry (s2, isloop) + ! + ! We cannot use sop_tab to get the index of symmetry s2(s1) in the + ! spinorial case, because we are in SU(3) instead of SO(3) + ! + ! Therefore, we need to explicity apply both s1 and s2: we use + ! OPTION 1 by DS. OPTION 2 is coded but not working at the moment + ! do istark=1,Xk%nstar(ik) ! !if ( .not.PAR_IND_WF_k%element_1D(ik) ) cycle @@ -134,6 +144,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! iGk =minus_G(Xk%g_table(ik,isk)) ! + ! OPTION 1: expand from IBZ (WF_k) to BZ (WF_Rk) call WF_copy(WF_k,WF_Rk) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk,iGk,WF_Rk) ! @@ -148,20 +159,21 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! spin_sop with time-reversal are not a space group ! I need to build the composed spin symmetry operator ! - if(n_spinor==2) then - s1=spin_sop(:,:,isk) - s2=spin_sop(:,:,isloop) - if (isk >nsym/(1+i_time_rev)) s1=conjg(s1) - if (isloop>nsym/(1+i_time_rev)) then - s2=conjg(s2) - s1=conjg(s1) - endif - spin_sop_composed=matmul(s2,s1) - if (isk_c >nsym/(1+i_time_rev)) spin_sop_composed=conjg(spin_sop_composed) -#if defined _CUDA - call dev_memcpy(spin_sop_composed_d,spin_sop_composed) -#endif - endif + ! OPTION 2 (disabled): directly compute composed symmetry + !if(n_spinor==2) then + ! s1=spin_sop(:,:,isk) + ! s2=spin_sop(:,:,isloop) + ! if (isk >nsym/(1+i_time_rev)) s1=conjg(s1) + ! if (isloop>nsym/(1+i_time_rev)) then + ! s2=conjg(s2) + ! s1=conjg(s1) + ! endif + ! spin_sop_composed=matmul(s2,s1) + ! if (isk_c >nsym/(1+i_time_rev)) spin_sop_composed=conjg(spin_sop_composed) +!#f defined _CUDA + ! call dev_memcpy(spin_sop_composed_d,spin_sop_composed) +!#ndif + !endif ! ! symmetry used by yambo isk_y=Xk%s_table(ik,isk_c) @@ -169,11 +181,12 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! iRkbz =Xk%k_table(ik,isk_c) ! - ! OPTION 1: Apply second symmetry operatio to the WF already expanded in the BZ + ! OPTION 1: Apply second symmetry operation (WF_Rk_c from isk) + ! to the WF already expanded in the BZ (WF_Rk) call WF_copy(WF_Rk,WF_Rk_c) call WF_symm_kpoint_g_BZ(blim,ik,i_sp_pol,isloop,iGloop,isk,iGk,WF_Rk_c) ! - ! OPTION 2: Use the composed symmetry, importing the composed spin soc + ! OPTION 2 (disabled): Use the composed symmetry, importing the composed spin soc !call WF_copy(WF_k,WF_Rk_c) !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,spin_sop_composed,WF_Rk_c) ! From 2bf186a2ffbf1977c8a6c1198cebbc9376e6bac7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 10 Jul 2024 09:15:53 +0200 Subject: [PATCH 0806/1367] Version 5.2.0, Revision 23713, Hash a6604654e5 MODIFIED * configure include/version/version.m4 modules/mod_interfaces.F wf_and_fft/WF_phase_matrices.F wf_and_fft/WF_symm_kpoint_g.F Bugs: - [yambo] Fixed CUDA compilation Patch sent by: Davide Sangalli --- configure | 22 ++++----- include/version/version.m4 | 6 +-- src/modules/mod_interfaces.F | 2 +- src/wf_and_fft/WF_phase_matrices.F | 4 +- src/wf_and_fft/WF_symm_kpoint_g.F | 75 ++++++++++++++++-------------- 5 files changed, 57 insertions(+), 52 deletions(-) diff --git a/configure b/configure index d2453710a8..1099aa9f70 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23712 h.7cee80f78c. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23713 h.a6604654e5. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23712 h.7cee80f78c' -PACKAGE_STRING='Yambo 5.2.0 r.23712 h.7cee80f78c' +PACKAGE_VERSION='5.2.0 r.23713 h.a6604654e5' +PACKAGE_STRING='Yambo 5.2.0 r.23713 h.a6604654e5' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23712 h.7cee80f78c to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23713 h.a6604654e5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23712 h.7cee80f78c:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23713 h.a6604654e5:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23712 h.7cee80f78c +Yambo configure 5.2.0 r.23713 h.a6604654e5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23712 h.7cee80f78c, which was +It was created by Yambo $as_me 5.2.0 r.23713 h.a6604654e5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23712" -SHASH="7cee80f78c" +SREVISION="23713" +SHASH="a6604654e5" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23712 h.7cee80f78c, which was +This file was extended by Yambo $as_me 5.2.0 r.23713 h.a6604654e5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23712 h.7cee80f78c +Yambo config.status 5.2.0 r.23713 h.a6604654e5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7d7a7d6c07..77334cd458 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23712 h.7cee80f78c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23713 h.a6604654e5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23712" -SHASH="7cee80f78c" +SREVISION="23713" +SHASH="a6604654e5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 8be0fe546e..ec9d6c74e1 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -272,7 +272,7 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) use wave_func, ONLY:WAVEs integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - complex(SP), intent(in) :: ssop(2,2) + complex(SP) DEV_ATTR, intent(in) :: ssop(2,2) type (WAVEs), target, intent(inout) :: WF end subroutine WF_symm_kpoint_g_ssop ! diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 5394f1a44d..065e10786a 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -19,7 +19,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing use R_lattice, ONLY:bz_samp,G_m_G,minus_G,g_vec,rl_sop - use D_lattice, ONLY:nsym,i_time_rev,sop_tab,DEV_VAR(spin_sop) + use D_lattice, ONLY:nsym,i_time_rev,sop_tab,spin_sop use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k @@ -175,7 +175,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! ! OPTION 2: Use the composed symmetry, importing the composed spin soc !call WF_copy(WF_k,WF_Rk_c) - !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,spin_sop_composed,WF_Rk_c) + !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,DEV_VAR(spin_sop_composed),WF_Rk_c) ! call WF_copy(WF_k,WF_Rk_y) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_y,iGk_y,WF_Rk_y) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index b65f9f0fbf..4c5b15d3a2 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -11,7 +11,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) use wave_func, ONLY:wf_ng,wf_ng_1st_BZ use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& @@ -29,7 +29,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! Work space ! complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + complex(SP), pointer DEV_ATTR :: WF_p(:,:) ! real(SP) :: krot(3),G_cc(3) ! @@ -38,7 +38,6 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! if(isymm==idt_index) return ! - WF_p => DEV_VAR(WF%c) isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) @@ -46,6 +45,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) WF_k_tmp=cZERO ! i_wf=WF%index(ib,ik,i_sp_pol) + WF_p => DEV_VAR(WF%c)(:,:,i_wf) ! if (n_spinor==1) then ! @@ -53,10 +53,10 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) + ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + WF_k_tmp(igs,1)=WF_p(ig,1) enddo ! else @@ -65,20 +65,22 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) + ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & -& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) - WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & -& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1)+ & +& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2) + WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1)+ & +& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2) enddo endif ! ! take care of time reversal if needed if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) ! - call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + call dev_memcpy(WF_p,WF_k_tmp) + ! + nullify(WF_p) ! enddo ! @@ -89,7 +91,7 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) use wave_func, ONLY:wf_ng,wf_ng_1st_BZ use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& @@ -107,7 +109,7 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) ! Work space ! complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + complex(SP), pointer DEV_ATTR :: WF_p(:,:) ! real(SP) :: krot(3),G_cc(3) ! @@ -116,7 +118,6 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) ! if(isymm==idt_index) return ! - WF_p => DEV_VAR(WF%c) isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) @@ -124,6 +125,7 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) WF_k_tmp=cZERO ! i_wf=WF%index(ib,ik,i_sp_pol) + WF_p => DEV_VAR(WF%c)(:,:,i_wf) ! if (n_spinor==1) then ! @@ -131,10 +133,10 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(wf_igk(ic,ik),isref),igref) + ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + WF_k_tmp(igs,1)=WF_p(ig,1) enddo ! else @@ -143,20 +145,22 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(wf_igk(ic,ik),isref),igref) + ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & - & DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) - WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & - & DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1)+ & + & DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2) + WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1)+ & + & DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2) enddo endif ! ! take care of time reversal if needed if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) ! - call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + call dev_memcpy(WF_p,WF_k_tmp) + ! + nullify(WF_p) ! enddo ! @@ -167,7 +171,7 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) use wave_func, ONLY:wf_ng,wf_ng_1st_BZ use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& @@ -180,13 +184,13 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - complex(SP), intent(in) :: ssop(2,2) + complex(SP) DEV_ATTR, intent(in) :: ssop(2,2) type (WAVEs), target, intent(inout) :: WF ! ! Work space ! complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + complex(SP), pointer DEV_ATTR :: WF_p(:,:) ! real(SP) :: krot(3),G_cc(3) ! @@ -195,7 +199,6 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! if(isymm==idt_index) return ! - WF_p => DEV_VAR(WF%c) isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) @@ -203,6 +206,7 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) WF_k_tmp=cZERO ! i_wf=WF%index(ib,ik,i_sp_pol) + WF_p => DEV_VAR(WF%c)(:,:,i_wf) ! if (n_spinor==1) then ! @@ -210,10 +214,10 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) + ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + WF_k_tmp(igs,1)=WF_p(ig,1) enddo ! else @@ -222,22 +226,23 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) + ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=ssop(1,1)*WF_p(ig,1,i_wf)+ & - & ssop(1,2)*WF_p(ig,2,i_wf) - WF_k_tmp(igs,2)=ssop(2,1)*WF_p(ig,1,i_wf)+ & - & ssop(2,2)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,1)=ssop(1,1)*WF_p(ig,1)+ & + & ssop(1,2)*WF_p(ig,2) + WF_k_tmp(igs,2)=ssop(2,1)*WF_p(ig,1)+ & + & ssop(2,2)*WF_p(ig,2) enddo endif ! ! take care of time reversal if needed if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) ! - call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + call dev_memcpy(WF_p,WF_k_tmp) + ! + nullify(WF_p) ! enddo ! end subroutine WF_symm_kpoint_g_ssop - \ No newline at end of file From 5ba37e290acdb6f5c52d1f2943f42d8ece913018 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 10 Jul 2024 22:59:26 +0200 Subject: [PATCH 0807/1367] Version 5.2.0, Revision 23551, Hash 06cde15a37 MODIFIED * include/version/version.m4 DELETED * BASED_on_tech_bse Changes: - removed dependency. tech-bse merged into master Patch sent by: Davide Sangalli --- BASED_on_tech_bse | 0 include/version/version.m4 | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 BASED_on_tech_bse diff --git a/BASED_on_tech_bse b/BASED_on_tech_bse deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/version/version.m4 b/include/version/version.m4 index f467de3b6a..35610c08dc 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23279 h.6ac3a88014, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23551 h.06cde15a37, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23279" -SHASH="6ac3a88014" +SREVISION="23551" +SHASH="06cde15a37" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 4874a556b7d4e91e4d6f3c8e536d36fa9f815f66 Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Thu, 11 Jul 2024 19:09:45 +0200 Subject: [PATCH 0808/1367] Fix for GPU compilation by Davide --- src/wf_and_fft/WF_symm_kpoint_g.F | 184 +++--------------------------- 1 file changed, 14 insertions(+), 170 deletions(-) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index b65f9f0fbf..2ad21f08bd 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -11,7 +11,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk + use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) use wave_func, ONLY:wf_ng,wf_ng_1st_BZ use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& @@ -24,12 +24,12 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - type (WAVEs), target, intent(inout) :: WF + type (WAVEs), target, intent(inout) :: WF ! ! Work space ! complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) + complex(SP), pointer DEV_ATTR :: WF_p(:,:) ! real(SP) :: krot(3),G_cc(3) ! @@ -38,7 +38,6 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! if(isymm==idt_index) return ! - WF_p => DEV_VAR(WF%c) isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) @@ -46,6 +45,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) WF_k_tmp=cZERO ! i_wf=WF%index(ib,ik,i_sp_pol) + WF_p => DEV_VAR(WF%c)(:,:,i_wf) ! if (n_spinor==1) then ! @@ -53,10 +53,10 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) + ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) + WF_k_tmp(igs,1)=WF_p(ig,1) enddo ! else @@ -65,179 +65,23 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) !$cuf kernel do(1) <<<*,*>>> #endif do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) + ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & -& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) - WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & -& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) + WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1)+ & +& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2) + WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1)+ & +& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2) enddo endif ! ! take care of time reversal if needed if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) ! - call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) + call dev_memcpy(WF_p,WF_k_tmp) + ! + nullify(WF_p) ! enddo ! end subroutine WF_symm_kpoint_g -! -! -subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) - ! - use pars, ONLY:SP,cZERO - use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk - use wave_func, ONLY:wf_ng,wf_ng_1st_BZ - use vec_operate, ONLY:c2a - use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& - & k_pt,rl_sop,g_vec - use deviceXlib_m, ONLY:dev_conjg,dev_memcpy - use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & - & dl_sop,i_time_rev,nsym - ! - implicit none - ! - integer, intent(in) :: b_to_load(2) - integer, intent(in) :: ik,i_sp_pol,isymm,ig0,isref,igref - type (WAVEs), target, intent(inout) :: WF - ! - ! Work space - ! - complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) - ! - real(SP) :: krot(3),G_cc(3) - ! - integer :: ib,i_wf,isymm_m1 - integer :: ic,ig,igp,igr,igs,i_spinor - ! - if(isymm==idt_index) return - ! - WF_p => DEV_VAR(WF%c) - isymm_m1=sop_inv(isymm) - ! - do ib=b_to_load(1),b_to_load(2) - ! - WF_k_tmp=cZERO - ! - i_wf=WF%index(ib,ik,i_sp_pol) - ! - if (n_spinor==1) then - ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif - do ic=1,wf_nc_k(ik) - ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(wf_igk(ic,ik),isref),igref) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) - enddo - ! - else - ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif - do ic=1,wf_nc_k(ik) - ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(wf_igk(ic,ik),isref),igref) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1,i_wf)+ & - & DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2,i_wf) - WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1,i_wf)+ & - & DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2,i_wf) - enddo - endif - ! - ! take care of time reversal if needed - if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) - ! - call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) - ! - enddo - ! -end subroutine WF_symm_kpoint_g_BZ -! -! -subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) - ! - use pars, ONLY:SP,cZERO - use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,wf_igk - use wave_func, ONLY:wf_ng,wf_ng_1st_BZ - use vec_operate, ONLY:c2a - use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& - & k_pt,rl_sop,g_vec - use deviceXlib_m, ONLY:dev_conjg,dev_memcpy - use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & - & dl_sop,i_time_rev,nsym - ! - implicit none - ! - integer, intent(in) :: b_to_load(2) - integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - complex(SP), intent(in) :: ssop(2,2) - type (WAVEs), target, intent(inout) :: WF - ! - ! Work space - ! - complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) - ! - real(SP) :: krot(3),G_cc(3) - ! - integer :: ib,i_wf,isymm_m1 - integer :: ic,ig,igp,igr,igs,i_spinor - ! - if(isymm==idt_index) return - ! - WF_p => DEV_VAR(WF%c) - isymm_m1=sop_inv(isymm) - ! - do ib=b_to_load(1),b_to_load(2) - ! - WF_k_tmp=cZERO - ! - i_wf=WF%index(ib,ik,i_sp_pol) - ! - if (n_spinor==1) then - ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif - do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1,i_wf) - enddo - ! - else - ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif - do ic=1,wf_nc_k(ik) - ig=wf_igk(ic,ik) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=ssop(1,1)*WF_p(ig,1,i_wf)+ & - & ssop(1,2)*WF_p(ig,2,i_wf) - WF_k_tmp(igs,2)=ssop(2,1)*WF_p(ig,1,i_wf)+ & - & ssop(2,2)*WF_p(ig,2,i_wf) - enddo - endif - ! - ! take care of time reversal if needed - if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) - ! - call dev_memcpy(WF_p(:,:,i_wf),WF_k_tmp) - ! - enddo - ! - end subroutine WF_symm_kpoint_g_ssop - \ No newline at end of file From 8016830b06332128daad88e5e462911e5204e8e2 Mon Sep 17 00:00:00 2001 From: Fulvio Paleari Date: Thu, 11 Jul 2024 19:24:43 +0200 Subject: [PATCH 0809/1367] Fix for ssop --- src/wf_and_fft/WF_symm_kpoint_g.F | 160 ++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 2ad21f08bd..0ed25e7735 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -85,3 +85,163 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) enddo ! end subroutine WF_symm_kpoint_g + +subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) + ! + use pars, ONLY:SP,cZERO + use electrons, ONLY:n_spinor + use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) + use wave_func, ONLY:wf_ng,wf_ng_1st_BZ + use vec_operate, ONLY:c2a + use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& + & k_pt,rl_sop,g_vec + use deviceXlib_m, ONLY:dev_conjg,dev_memcpy + use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & + & dl_sop,i_time_rev,nsym + ! + implicit none + ! + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0,isref,igref + type (WAVEs), target, intent(inout) :: WF + ! + ! Work space + ! + complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) + complex(SP), pointer DEV_ATTR :: WF_p(:,:) + ! + real(SP) :: krot(3),G_cc(3) + ! + integer :: ib,i_wf,isymm_m1 + integer :: ic,ig,igp,igr,igs,i_spinor + ! + if(isymm==idt_index) return + ! + isymm_m1=sop_inv(isymm) + ! + do ib=b_to_load(1),b_to_load(2) + ! + WF_k_tmp=cZERO + ! + i_wf=WF%index(ib,ik,i_sp_pol) + WF_p => DEV_VAR(WF%c)(:,:,i_wf) + ! + if (n_spinor==1) then + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=WF_p(ig,1) + enddo + ! + else + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1)+ & + & DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2) + WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1)+ & + & DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2) + enddo + endif + ! + ! take care of time reversal if needed + if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + ! + call dev_memcpy(WF_p,WF_k_tmp) + ! + nullify(WF_p) + ! + enddo + ! +end subroutine WF_symm_kpoint_g_BZ +! +! +subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) + ! + use pars, ONLY:SP,cZERO + use electrons, ONLY:n_spinor + use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) + use wave_func, ONLY:wf_ng,wf_ng_1st_BZ + use vec_operate, ONLY:c2a + use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& + & k_pt,rl_sop,g_vec + use deviceXlib_m, ONLY:dev_conjg,dev_memcpy + use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & + & dl_sop,i_time_rev,nsym + ! + implicit none + ! + integer, intent(in) :: b_to_load(2) + integer, intent(in) :: ik,i_sp_pol,isymm,ig0 + complex(SP) DEV_ATTR, intent(in) :: ssop(2,2) + type (WAVEs), target, intent(inout) :: WF + ! + ! Work space + ! + complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) + complex(SP), pointer DEV_ATTR :: WF_p(:,:) + ! + real(SP) :: krot(3),G_cc(3) + ! + integer :: ib,i_wf,isymm_m1 + integer :: ic,ig,igp,igr,igs,i_spinor + ! + if(isymm==idt_index) return + ! + isymm_m1=sop_inv(isymm) + ! + do ib=b_to_load(1),b_to_load(2) + ! + WF_k_tmp=cZERO + ! + i_wf=WF%index(ib,ik,i_sp_pol) + WF_p => DEV_VAR(WF%c)(:,:,i_wf) + ! + if (n_spinor==1) then + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(wf_igk)(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=WF_p(ig,1) + enddo + ! + else + ! +#ifdef _CUDA + !$cuf kernel do(1) <<<*,*>>> +#endif + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(wf_igk)(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + igs=DEV_VAR(G_m_G)(igr,ig0) + WF_k_tmp(igs,1)=ssop(1,1)*WF_p(ig,1)+ & + & ssop(1,2)*WF_p(ig,2) + WF_k_tmp(igs,2)=ssop(2,1)*WF_p(ig,1)+ & + & ssop(2,2)*WF_p(ig,2) + enddo + endif + ! + ! take care of time reversal if needed + if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + ! + call dev_memcpy(WF_p,WF_k_tmp) + ! + nullify(WF_p) + ! + enddo + ! + end subroutine WF_symm_kpoint_g_ssop From 6b225c7c311d8eed744ee875fc60b2cbd2963b6c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 18 Jul 2024 13:11:27 +0200 Subject: [PATCH 0810/1367] Version 5.2.0, Revision 23297, Hash 8a9239ac3d MODIFIED * config/m4/acx_report.m4 config/report.in configure include/version/version.m4 Bugs: - Few small fixes in the configure Additions: - Changes: - Patch sent by: Davide Sangalli --- config/m4/acx_report.m4 | 4 +- config/report.in | 2 +- configure | 312 +++++++++++++++++++++++++++++++++++-- include/version/version.m4 | 6 +- 4 files changed, 304 insertions(+), 20 deletions(-) diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index 012599b82a..f96dbbd9c7 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -137,8 +137,8 @@ fi # MAGMA_check="-" if test "$internal_magma" = "yes" ; then - if test "$compile_magma" = "yes" ; then SLEPC_check="C"; fi - if test "$compile_magma" = "no" ; then SLEPC_check="I"; fi + if test "$compile_magma" = "yes" ; then MAGMA_check="C"; fi + if test "$compile_magma" = "no" ; then MAGMA_check="I"; fi elif test "$enable_magma" = "yes" ; then MAGMA_check="E" fi diff --git a/config/report.in b/config/report.in index 2a73f1cc1d..f99d64f46c 100644 --- a/config/report.in +++ b/config/report.in @@ -58,7 +58,7 @@ # @FFT_INCS_R@ # [@PETSC_check@] PETSC : @PETSC_LIBS_R@ # @PETSC_INCS_R@ -# [@SLEPC_check@] SLEPC : @SLEPC_LIBS_R@ +# [@SLEPC_check@] SLEPC : @SLEPC_LIBS_R@ # @SLEPC_INCS_R@ # [@MAGMA_check@] MAGMA : @MAGMA_LIBS@ # @MAGMA_INCS@ diff --git a/configure b/configure index 5a5265486a..2359a0c8aa 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23238 h.d491dbdf56. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23297 h.8a9239ac3d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23238 h.d491dbdf56' -PACKAGE_STRING='Yambo 5.2.0 r.23238 h.d491dbdf56' +PACKAGE_VERSION='5.2.0 r.23297 h.8a9239ac3d' +PACKAGE_STRING='Yambo 5.2.0 r.23297 h.8a9239ac3d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -687,6 +687,7 @@ IOTK_INCS_R IOTK_LIBS_R MPI_info MPI_check +MAGMA_check LIBXC_check YPY_check YDB_check @@ -712,6 +713,12 @@ MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check +internal_magma +compile_magma +enable_magma +def_magma +MAGMA_INCS +MAGMA_LIBS CUDA_FLAGS def_cuda internal_libxc @@ -772,6 +779,8 @@ def_scalapack enable_scalapack SCALAPACK_LIBS BLACS_LIBS +with_petsc_branch +with_slepc_branch internal_slepc internal_petsc compile_slepc @@ -988,6 +997,8 @@ with_petsc_incs with_petsc_path with_petsc_libdir with_petsc_includedir +with_slepc_branch +with_petsc_branch enable_par_linalg with_blacs_libs with_scalapack_libs @@ -1033,6 +1044,12 @@ with_libxc_libdir with_libxc_includedir enable_cuda enable_nvtx +enable_magma_linalg +with_magma_libs +with_magma_incs +with_magma_path +with_magma_libdir +with_magma_includedir ' ac_precious_vars='build_alias host_alias @@ -1600,7 +1617,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23238 h.d491dbdf56 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23297 h.8a9239ac3d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1683,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23238 h.d491dbdf56:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23297 h.8a9239ac3d:";; esac cat <<\_ACEOF @@ -1717,6 +1734,8 @@ Optional Features: --enable-etsf-io Activate the ETSF_IO support --enable-cuda= Enable CUDA support --enable-nvtx= Enable NVTX support + --enable-magma-linalg Enable suport for the diagonalization of BSE using + MAGMA. Default is no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1751,6 +1770,8 @@ Optional Packages: --with-petsc-libdir= Path to the Petsc lib directory --with-petsc-includedir= Path to the Petsc include directory + --with-slepc-branch= Use the of the slepc repository. + --with-petsc-branch= Use the of the petsc repository. --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL --with-scalapack-libs=(libs|mkl) Use SCALAPACK libraries or setup MKL @@ -1789,6 +1810,12 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory Some influential environment variables: CC C compiler command @@ -1876,7 +1903,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23238 h.d491dbdf56 +Yambo configure 5.2.0 r.23297 h.8a9239ac3d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2532,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23238 h.d491dbdf56, which was +It was created by Yambo $as_me 5.2.0 r.23297 h.8a9239ac3d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3290,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23238" -SHASH="d491dbdf56" +SREVISION="23297" +SHASH="8a9239ac3d" @@ -10275,6 +10302,31 @@ url_ydb=https://github.com/yambo-code/ydb.git # +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -12737,6 +12789,24 @@ then : fi + +# Check whether --with-slepc-branch was given. +if test ${with_slepc_branch+y} +then : + withval=$with_slepc_branch; +else $as_nop + with_slepc_branch=none +fi + + +# Check whether --with-petsc-branch was given. +if test ${with_petsc_branch+y} +then : + withval=$with_petsc_branch; +else $as_nop + with_petsc_branch=none +fi + # def_slepc="" petsc="no" @@ -13129,6 +13199,8 @@ fi + + # # ============================================================================ @@ -15410,7 +15482,7 @@ if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi # def_cuda="" CUDA_FLAGS="" -CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" +CUDA_LIBS="-cudalib=cufft,cublas,cusolver" # Available cc options: # cc20 Compile for compute capability 2.0 @@ -15432,12 +15504,12 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } fi @@ -15468,6 +15540,207 @@ fi # +# + +# ============================================================================ +# MAGMA + +# +# Check whether --enable-magma_linalg was given. +if test ${enable_magma_linalg+y} +then : + enableval=$enable_magma_linalg; +fi + +# + +# Check whether --with-magma_libs was given. +if test ${with_magma_libs+y} +then : + withval=$with_magma_libs; +fi + + +# Check whether --with-magma_incs was given. +if test ${with_magma_incs+y} +then : + withval=$with_magma_incs; +fi + + +# Check whether --with-magma_path was given. +if test ${with_magma_path+y} +then : + withval=$with_magma_path; +fi + + +# Check whether --with-magma_libdir was given. +if test ${with_magma_libdir+y} +then : + withval=$with_magma_libdir; +fi + + +# Check whether --with-magma_includedir was given. +if test ${with_magma_includedir+y} +then : + withval=$with_magma_includedir; +fi + + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +printf %s "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +printf %s "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 +printf %s "checking for Magma in $with_magma_path... " >&6; } ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then as_fn_error $? "No libs specified" "$LINENO" 5 ; fi + if test -z "$try_MAGMA_INCS" ; then as_fn_error $? "No include-dir specified" "$LINENO" 5 ; fi + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + cat > conftest.$ac_ext <<_ACEOF + program main + +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO" +then : + magma=yes +else $as_nop + magma=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; + # + if test "x$magma" = "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +printf %s "checking for internal Magma library... " >&6; } + # + internal_magma="yes" + # + if test "x$lapack_shared" = "x1" ; then + #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + MAGMA_LIBS="" ; + else + #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + MAGMA_LIBS="" ; + fi + #MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + MAGMA_INCS="" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + else + #compile_magma="yes" ; + #AC_MSG_RESULT([to be compiled]) ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. Internal compilation not available yet." >&5 +printf "%s\n" "Compatible external Magma not found/specified. Internal compilation not available yet." >&6; } ; + compile_magma="no" + def_magma="" + enable_magma="no" + fi + # +fi +# + + + + + + # # ============================================================================ @@ -15581,6 +15854,7 @@ PETSC_check="-" if test "$internal_petsc" = "yes" ; then if test "$compile_petsc" = "yes" ; then PETSC_check="C"; fi if test "$compile_petsc" = "no" ; then PETSC_check="I"; fi + if ! test "$with_petsc_branch" = "none"; then PETSC_LIBS="$PETSC_LIBS (git branch $with_petsc_branch)"; fi elif test "$enable_petsc" = "yes" ; then PETSC_check="E" fi @@ -15589,6 +15863,7 @@ SLEPC_check="-" if test "$internal_slepc" = "yes" ; then if test "$compile_slepc" = "yes" ; then SLEPC_check="C"; fi if test "$compile_slepc" = "no" ; then SLEPC_check="I"; fi + if ! test "$with_slepc_branch" = "none"; then SLEPC_LIBS="$SLEPC_LIBS (git branch $with_slepc_branch)"; fi elif test "$enable_slepc" = "yes" ; then SLEPC_check="E" fi @@ -15599,6 +15874,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then MAGMA_check="C"; fi + if test "$compile_magma" = "no" ; then MAGMA_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -15675,6 +15958,7 @@ fi + # # STRIPE [LIB] from paths # @@ -16578,7 +16862,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23238 h.d491dbdf56, which was +This file was extended by Yambo $as_me 5.2.0 r.23297 h.8a9239ac3d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16926,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23238 h.d491dbdf56 +Yambo config.status 5.2.0 r.23297 h.8a9239ac3d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index f467de3b6a..b41f042baf 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23279 h.6ac3a88014, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23297 h.8a9239ac3d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23279" -SHASH="6ac3a88014" +SREVISION="23297" +SHASH="8a9239ac3d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 500cdaf2e0ad348a621646eb0efc1b147f3c516c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 25 Jul 2024 09:33:11 +0200 Subject: [PATCH 0811/1367] Version 5.2.0, Revision 23244, Hash 5ecc7b1b24 MODIFIED * configure include/version/version.m4 bse/PL_diago_residual.F Changes: - [yambo] Compilation fixed Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/PL_diago_residual.F | 16 +++++++++++++--- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/configure b/configure index b1146d1716..f3ba7ee1b4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23122 h.b585505b07. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23244 h.5ecc7b1b24. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23122 h.b585505b07' -PACKAGE_STRING='Yambo 5.2.0 r.23122 h.b585505b07' +PACKAGE_VERSION='5.2.0 r.23244 h.5ecc7b1b24' +PACKAGE_STRING='Yambo 5.2.0 r.23244 h.5ecc7b1b24' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1600,7 +1600,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23122 h.b585505b07 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23244 h.5ecc7b1b24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1666,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23122 h.b585505b07:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23244 h.5ecc7b1b24:";; esac cat <<\_ACEOF @@ -1876,7 +1876,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23122 h.b585505b07 +Yambo configure 5.2.0 r.23244 h.5ecc7b1b24 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2505,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23122 h.b585505b07, which was +It was created by Yambo $as_me 5.2.0 r.23244 h.5ecc7b1b24, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3263,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23122" -SHASH="b585505b07" +SREVISION="23244" +SHASH="5ecc7b1b24" @@ -16578,7 +16578,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23122 h.b585505b07, which was +This file was extended by Yambo $as_me 5.2.0 r.23244 h.5ecc7b1b24, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16642,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23122 h.b585505b07 +Yambo config.status 5.2.0 r.23244 h.5ecc7b1b24 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 72a6a8eabb..c22d0630eb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23122 h.b585505b07, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23244 h.5ecc7b1b24, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23122" -SHASH="b585505b07" +SREVISION="23244" +SHASH="5ecc7b1b24" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/PL_diago_residual.F b/src/bse/PL_diago_residual.F index 5f4e1ee378..f71802cdc6 100644 --- a/src/bse/PL_diago_residual.F +++ b/src/bse/PL_diago_residual.F @@ -26,7 +26,9 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) use BS_solvers, ONLY:BSS_eh_f_RES,BSS_n_eig, BS_E use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_f use functions, ONLY:boltzman_f +#if defined _RT use RT_control, ONLY:NEQ_Residuals +#endif use D_lattice, ONLY:Boltz_Temp ! implicit none @@ -65,12 +67,16 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! 1=> left ! 2=> right ! - if (NEQ_Residuals .and. (Boltz_Temp .gt. 0) ) then +#if defined _RT + if (NEQ_Residuals .and. (Boltz_Temp > 0._SP) ) then call error('The user can specify either boltzmann or external residual occupations, not both') endif ! if (NEQ_Residuals) call msg('s','Running with NEQ Residuals') - if (Boltz_Temp .gt. 0) call msg('s','Running with Boltz excitonic occupations') +#else + if (.not. (Boltz_Temp > 0._SP) ) call error("Boltz temperature not set in input") +#endif + if ( Boltz_Temp > 0._SP ) call msg('s','Running with Boltz excitonic occupations') ! do i_c=1,BS_dip_size do i_K=1,BS_K_dim(1) @@ -93,7 +99,8 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) ! !Check dimensions for these vectors to be consistent that we have only resonant and antiresonant BS_R_PL(:,i_l)=real(V_dot_V(BS_dip_size,Pi_x_R_x_adA_left,Pi_x_R_x_adA_right)) - ! + ! +#if defined _RT ! R_over_R_x_A = R<_j/R_j A^r_ij ! Here I create an If statement if I want to populate L lesser with electornic or excitonic populations if (NEQ_Residuals) then @@ -109,10 +116,13 @@ subroutine PL_diago_herm_residual(BS_mat,BS_R_PL) adA_x_R_over_R_x_A(2)=V_dot_V_omp(BS_K_dim(1),conjg(BS_mat(:,i_l)),R_over_R_x_A(:,2)) ! else if (Boltz_Temp .gt. 0) then +#endif ! adA_x_R_over_R_x_A=boltzman_f(real(BS_E(i_l)-BS_E(1))) ! +#if defined _RT endif +#endif ! BS_R_PL(1,i_l)=BS_R_PL(1,i_l)*adA_x_R_over_R_x_A(1) !resonant BS_R_PL(2,i_l)=BS_R_PL(2,i_l)*adA_x_R_over_R_x_A(2) !resonant From caef46246c04da3e32a6c433853454b6190821e6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 25 Jul 2024 10:10:34 +0200 Subject: [PATCH 0812/1367] Version 5.2.0, Revision 23245, Hash 500cdaf2e0 MODIFIED * configure include/version/version.m4 bse/K_Transition_check.F bse/K_diago_hermitian_residuals.F bse/K_diago_non_hermitian_residuals.F Bugs: - Few small fixes Changes: - Configure re-generated Patch sent by: Davide Sangalli --- configure | 56 +++++++++++++++++------ include/version/version.m4 | 6 +-- src/bse/K_Transition_check.F | 4 +- src/bse/K_diago_hermitian_residuals.F | 5 +- src/bse/K_diago_non_hermitian_residuals.F | 5 +- 5 files changed, 54 insertions(+), 22 deletions(-) diff --git a/configure b/configure index f3ba7ee1b4..6fe938dde0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23244 h.5ecc7b1b24. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23245 h.500cdaf2e0. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23244 h.5ecc7b1b24' -PACKAGE_STRING='Yambo 5.2.0 r.23244 h.5ecc7b1b24' +PACKAGE_VERSION='5.2.0 r.23245 h.500cdaf2e0' +PACKAGE_STRING='Yambo 5.2.0 r.23245 h.500cdaf2e0' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -772,6 +772,8 @@ def_scalapack enable_scalapack SCALAPACK_LIBS BLACS_LIBS +with_petsc_branch +with_slepc_branch internal_slepc internal_petsc compile_slepc @@ -988,6 +990,8 @@ with_petsc_incs with_petsc_path with_petsc_libdir with_petsc_includedir +with_slepc_branch +with_petsc_branch enable_par_linalg with_blacs_libs with_scalapack_libs @@ -1600,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23244 h.5ecc7b1b24 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23245 h.500cdaf2e0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23244 h.5ecc7b1b24:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23245 h.500cdaf2e0:";; esac cat <<\_ACEOF @@ -1751,6 +1755,8 @@ Optional Packages: --with-petsc-libdir= Path to the Petsc lib directory --with-petsc-includedir= Path to the Petsc include directory + --with-slepc-branch= Use the of the slepc repository. + --with-petsc-branch= Use the of the petsc repository. --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL --with-scalapack-libs=(libs|mkl) Use SCALAPACK libraries or setup MKL @@ -1876,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23244 h.5ecc7b1b24 +Yambo configure 5.2.0 r.23245 h.500cdaf2e0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23244 h.5ecc7b1b24, which was +It was created by Yambo $as_me 5.2.0 r.23245 h.500cdaf2e0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23244" -SHASH="5ecc7b1b24" +SREVISION="23245" +SHASH="500cdaf2e0" @@ -12737,6 +12743,24 @@ then : fi + +# Check whether --with-slepc-branch was given. +if test ${with_slepc_branch+y} +then : + withval=$with_slepc_branch; +else $as_nop + with_slepc_branch=none +fi + + +# Check whether --with-petsc-branch was given. +if test ${with_petsc_branch+y} +then : + withval=$with_petsc_branch; +else $as_nop + with_petsc_branch=none +fi + # def_slepc="" petsc="no" @@ -13129,6 +13153,8 @@ fi + + # # ============================================================================ @@ -15410,7 +15436,7 @@ if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi # def_cuda="" CUDA_FLAGS="" -CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" +CUDA_LIBS="-cudalib=cufft,cublas,cusolver" # Available cc options: # cc20 Compile for compute capability 2.0 @@ -15432,12 +15458,12 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } fi @@ -15581,6 +15607,7 @@ PETSC_check="-" if test "$internal_petsc" = "yes" ; then if test "$compile_petsc" = "yes" ; then PETSC_check="C"; fi if test "$compile_petsc" = "no" ; then PETSC_check="I"; fi + if ! test "$with_petsc_branch" = "none"; then PETSC_LIBS="$PETSC_LIBS (git branch $with_petsc_branch)"; fi elif test "$enable_petsc" = "yes" ; then PETSC_check="E" fi @@ -15589,6 +15616,7 @@ SLEPC_check="-" if test "$internal_slepc" = "yes" ; then if test "$compile_slepc" = "yes" ; then SLEPC_check="C"; fi if test "$compile_slepc" = "no" ; then SLEPC_check="I"; fi + if ! test "$with_slepc_branch" = "none"; then SLEPC_LIBS="$SLEPC_LIBS (git branch $with_slepc_branch)"; fi elif test "$enable_slepc" = "yes" ; then SLEPC_check="E" fi @@ -16578,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23244 h.5ecc7b1b24, which was +This file was extended by Yambo $as_me 5.2.0 r.23245 h.500cdaf2e0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23244 h.5ecc7b1b24 +Yambo config.status 5.2.0 r.23245 h.500cdaf2e0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c22d0630eb..4be13d0ad1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23244 h.5ecc7b1b24, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23245 h.500cdaf2e0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23244" -SHASH="5ecc7b1b24" +SREVISION="23245" +SHASH="500cdaf2e0" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index dcf7e374dc..137322cd63 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -15,7 +15,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,& l_BS_magnons,l_BS_photolum,l_BS_res_from_E #if defined _RT - use drivers, ONLY:l_rt_carriers_in_use + use drivers, ONLY:l_rt_carriers_in_use,l_rpa_IP use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,EQ_NoOcc #endif ! @@ -143,7 +143,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& #if defined _RT ! ! In case of population inversion, it may be problematic if f_eh>0. and f_eh_RES<0. - if ( f_eh_REF*f_eh<0._SP .or. f_eh_REF*f_eh_RES<0._SP ) then + if ( (f_eh_REF*f_eh<0._SP .or. f_eh_REF*f_eh_RES<0._SP) .and. .not.l_rpa_IP) then call error(' I cannot split the R and K BSE contribution.'//& & ' ACTION: Use the same occupations in K and R.') endif diff --git a/src/bse/K_diago_hermitian_residuals.F b/src/bse/K_diago_hermitian_residuals.F index 4b3cb3bfe9..d02178cba5 100644 --- a/src/bse/K_diago_hermitian_residuals.F +++ b/src/bse/K_diago_hermitian_residuals.F @@ -21,7 +21,7 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) use X_m, ONLY:global_gauge use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f_RES,& BS_mat,BSS_n_eig - use BS, ONLY:BS_K_dim, l_BS_res_from_E + use BS, ONLY:BS_K_dim,l_BS_res_from_E,BS_not_const_eh_f ! implicit none ! @@ -35,7 +35,8 @@ subroutine K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) integer ::i_lambda,i_range(2) complex(SP) ::tmp_res(BS_K_dim(i_BS_mat)) ! - if (l_BS_res_from_E) call error(" Not coded, since sqrt of BSS_eh_f takes a conjg and it should not") + if (l_BS_res_from_E.and.BS_not_const_eh_f) & + & call error(" To be fixed, since sqrt of BSS_eh_f takes a conjg and it should not") ! call PP_indexes_reset(px) call PARALLEL_index(px,(/BSS_n_eig/)) diff --git a/src/bse/K_diago_non_hermitian_residuals.F b/src/bse/K_diago_non_hermitian_residuals.F index 53e8e1e1dd..7f303938d5 100644 --- a/src/bse/K_diago_non_hermitian_residuals.F +++ b/src/bse/K_diago_non_hermitian_residuals.F @@ -23,7 +23,7 @@ subroutine K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,B use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use X_m, ONLY:global_gauge - use BS, ONLY:BS_H_dim + use BS, ONLY:BS_H_dim,l_BS_res_from_E,BS_not_const_eh_f use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_n_eig ! implicit none @@ -41,6 +41,9 @@ subroutine K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,B complex(SP) :: tmp_res(BS_H_dim) complex(SP) :: BS_R_tmp(BSS_n_eig) ! + if (l_BS_res_from_E.and.BS_not_const_eh_f) & + & call error(" To be fixed, since sqrt of BSS_eh_f takes a conjg and it should not") + ! call PP_indexes_reset(px) call PARALLEL_index(px,(/BSS_n_eig/)) ! From 74c43fce9f7cdef25e770e6c84ba7fcd6ddece09 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 25 Jul 2024 18:35:44 +0200 Subject: [PATCH 0813/1367] Version 5.2.0, Revision 23397, Hash 566513b49a MODIFIED * configure driver/yambo.F include/version/version.m4 Yio/io_control.F allocations/X_ALLOC_elemental.F bse/.objects bse/DOUBLE_project.dep bse/K_Haydock.F bse/K_Haydock_response.F bse/K_IP.F bse/K_IP_sort.F bse/K_Transitions_setup.F bse/K_components_folded_in_serial_arrays.F bse/K_correlation_collisions_dir.F bse/K_correlation_collisions_std.F bse/K_correlation_kernel_dir.F bse/K_diago_driver.F bse/K_diago_response_functions.F bse/K_dipoles.F bse/K_driver.F bse/K_driver_init.F bse/K_exchange_collisions.F bse/K_observables.F bse/K_solvers.F bz_ops/bz_samp_indexes.F collisions/.objects collisions/COLLISIONS_alloc_and_free.F collisions/COLLISIONS_load.F collisions/DOUBLE_project.dep collisions/NL_project.dep common/eval_G_minus_G.F dipoles/.objects dipoles/DIPOLE_overlaps.F el-ph/RT_project.dep hamiltonian/V_Hartree.F hamiltonian/XC_potentials.F interface/INIT.F interface/INIT_activate.F interface/INIT_load.F io/.objects io/DOUBLE_project.dep io/RT_project.dep io/SC_project.dep io/io_BSS_diago.F io/io_X.F io/variables_NL.F modules/SET_defaults.F modules/mod_BS.F modules/mod_BS_solvers.F modules/mod_R_lattice.F modules/mod_X.F modules/mod_collision_ext.F modules/mod_frequency.F modules/mod_global_XC.F modules/mod_interfaces.F modules/mod_interpolate.F modules/mod_nl_optics.F modules/mod_openmp.F modules/mod_parallel.F modules/mod_vec_operate.F modules/mod_wrapper.F modules/mod_wrapper_omp.F nloptics/.objects nloptics/DOUBLE_project.dep nloptics/NL_Hamiltonian.F nloptics/NL_driver.F nloptics/NL_initialize.F nloptics/NL_project.dep nloptics/NL_start_and_restart.F nloptics/el_density_vbands.F output/K_OUTPUT.F output/X_OUTPUT_driver.F parallel/.objects parallel/DOUBLE_project.dep parallel/PARALLEL_global_Non_Linear.F parallel/PARALLEL_global_defaults.F parallel/PARALLEL_global_dimensions.F parallel/PARALLEL_global_indexes.F pol_function/X_dielectric_matrix.F setup/PARALLEL_and_IO_Setup.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F wf_and_fft/WF_alloc.F wf_and_fft/WF_free.F wf_and_fft/WF_load.F wf_and_fft/WF_shift_kpoint.F wf_and_fft/WF_symm_kpoint.F NEW * bse/BSE_utilities.F bse/K_diago_left_residuals.F bse/K_diago_overlap_matrix.F bse/K_diago_right_residuals.F collisions/Build_LSEX_collisions.F collisions/LSEX_potential.F collisions/OSCLL_compose_collision.F collisions/OSCLL_compose_nl.F collisions/OSCLL_compose_vbands.F collisions/OSCLL_eval.F collisions/OSCLL_load.F io/io_OSCLL.F nloptics/NL_test_collisions.F parallel/PARALLEL_global_Oscillators.F DELETED * tddft/TDDFT_ALDA_R_space.F RENAMED * bse/K.F -> bse/K_kernel.F Bugs: - Additions: - Changes: - Patch sent by: Davide Sangalli --- configure | 56 ++- driver/yambo.F | 4 +- include/version/version.m4 | 6 +- src/Yio/io_control.F | 5 +- src/allocations/X_ALLOC_elemental.F | 6 +- src/bse/.objects | 8 +- src/bse/BSE_utilities.F | 120 +++++ src/bse/DOUBLE_project.dep | 6 +- src/bse/K_Haydock.F | 5 +- src/bse/K_Haydock_response.F | 10 +- src/bse/K_IP.F | 57 ++- src/bse/K_IP_sort.F | 29 +- src/bse/K_Transitions_setup.F | 258 +++++----- .../K_components_folded_in_serial_arrays.F | 4 +- src/bse/K_correlation_collisions_dir.F | 5 +- src/bse/K_correlation_collisions_std.F | 6 +- src/bse/K_correlation_kernel_dir.F | 4 +- src/bse/K_diago_driver.F | 123 +++-- src/bse/K_diago_left_residuals.F | 113 +++++ src/bse/K_diago_overlap_matrix.F | 51 ++ src/bse/K_diago_response_functions.F | 50 +- src/bse/K_diago_right_residuals.F | 79 +++ src/bse/K_dipoles.F | 39 +- src/bse/K_driver.F | 45 +- src/bse/K_driver_init.F | 19 +- src/bse/K_exchange_collisions.F | 39 +- src/bse/{K.F => K_kernel.F} | 457 +++++++++++------- src/bse/K_observables.F | 35 +- src/bse/K_solvers.F | 4 +- src/bz_ops/bz_samp_indexes.F | 2 +- src/collisions/.objects | 4 +- src/collisions/Build_LSEX_collisions.F | 82 ++++ src/collisions/COLLISIONS_alloc_and_free.F | 25 +- src/collisions/COLLISIONS_load.F | 4 +- src/collisions/DOUBLE_project.dep | 8 + src/collisions/LSEX_potential.F | 122 +++++ src/collisions/NL_project.dep | 8 + src/collisions/OSCLL_compose_collision.F | 103 ++++ src/collisions/OSCLL_compose_nl.F | 74 +++ src/collisions/OSCLL_compose_vbands.F | 123 +++++ src/collisions/OSCLL_eval.F | 209 ++++++++ src/collisions/OSCLL_load.F | 80 +++ src/common/eval_G_minus_G.F | 12 +- src/dipoles/.objects | 2 +- src/dipoles/DIPOLE_overlaps.F | 59 ++- src/el-ph/RT_project.dep | 6 +- src/hamiltonian/V_Hartree.F | 4 + src/hamiltonian/XC_potentials.F | 11 +- src/interface/INIT.F | 4 - src/interface/INIT_activate.F | 18 +- src/interface/INIT_load.F | 21 +- src/io/.objects | 6 +- src/io/DOUBLE_project.dep | 1 + src/io/RT_project.dep | 1 + src/io/SC_project.dep | 1 + src/io/io_BSS_diago.F | 11 +- src/io/io_OSCLL.F | 141 ++++++ src/io/io_X.F | 1 + src/io/variables_NL.F | 13 +- src/modules/SET_defaults.F | 8 +- src/modules/mod_BS.F | 65 +-- src/modules/mod_BS_solvers.F | 9 +- src/modules/mod_R_lattice.F | 1 + src/modules/mod_X.F | 6 +- src/modules/mod_collision_ext.F | 7 + src/modules/mod_frequency.F | 4 +- src/modules/mod_global_XC.F | 2 + src/modules/mod_interfaces.F | 65 ++- src/modules/mod_interpolate.F | 3 + src/modules/mod_nl_optics.F | 26 +- src/modules/mod_openmp.F | 18 +- src/modules/mod_parallel.F | 8 +- src/modules/mod_vec_operate.F | 24 + src/modules/mod_wrapper.F | 115 ++++- src/modules/mod_wrapper_omp.F | 46 +- src/nloptics/.objects | 3 +- src/nloptics/DOUBLE_project.dep | 1 + src/nloptics/NL_Hamiltonian.F | 8 +- src/nloptics/NL_driver.F | 121 ++++- src/nloptics/NL_initialize.F | 77 ++- src/nloptics/NL_project.dep | 1 + src/nloptics/NL_start_and_restart.F | 5 +- src/nloptics/NL_test_collisions.F | 92 ++++ src/nloptics/el_density_vbands.F | 34 +- src/output/K_OUTPUT.F | 20 +- src/output/X_OUTPUT_driver.F | 68 +-- src/parallel/.objects | 4 +- src/parallel/DOUBLE_project.dep | 1 + src/parallel/PARALLEL_global_Non_Linear.F | 9 +- src/parallel/PARALLEL_global_Oscillators.F | 110 +++++ src/parallel/PARALLEL_global_defaults.F | 4 +- src/parallel/PARALLEL_global_dimensions.F | 5 + src/parallel/PARALLEL_global_indexes.F | 6 +- src/pol_function/X_dielectric_matrix.F | 1 + src/setup/PARALLEL_and_IO_Setup.F | 4 +- src/tddft/TDDFT_ALDA_R_space.F | 138 ------ .../TDDFT_ALDA_eh_space_G_collisions_L.F | 56 +-- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 64 ++- src/wf_and_fft/WF_alloc.F | 27 +- src/wf_and_fft/WF_free.F | 10 +- src/wf_and_fft/WF_load.F | 26 +- src/wf_and_fft/WF_shift_kpoint.F | 20 +- src/wf_and_fft/WF_symm_kpoint.F | 24 +- 103 files changed, 3133 insertions(+), 1012 deletions(-) create mode 100644 src/bse/BSE_utilities.F create mode 100644 src/bse/K_diago_left_residuals.F create mode 100644 src/bse/K_diago_overlap_matrix.F create mode 100644 src/bse/K_diago_right_residuals.F rename src/bse/{K.F => K_kernel.F} (70%) create mode 100644 src/collisions/Build_LSEX_collisions.F create mode 100644 src/collisions/LSEX_potential.F create mode 100644 src/collisions/OSCLL_compose_collision.F create mode 100644 src/collisions/OSCLL_compose_nl.F create mode 100644 src/collisions/OSCLL_compose_vbands.F create mode 100644 src/collisions/OSCLL_eval.F create mode 100644 src/collisions/OSCLL_load.F create mode 100644 src/io/io_OSCLL.F create mode 100644 src/nloptics/NL_test_collisions.F create mode 100644 src/parallel/PARALLEL_global_Oscillators.F delete mode 100644 src/tddft/TDDFT_ALDA_R_space.F diff --git a/configure b/configure index 9246be1225..194399327d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23218 h.4348a8b. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23287 h.e9ab2f86a2. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23218 h.4348a8b' -PACKAGE_STRING='Yambo 5.2.0 r.23218 h.4348a8b' +PACKAGE_VERSION='5.2.0 r.23287 h.e9ab2f86a2' +PACKAGE_STRING='Yambo 5.2.0 r.23287 h.e9ab2f86a2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -772,6 +772,8 @@ def_scalapack enable_scalapack SCALAPACK_LIBS BLACS_LIBS +with_petsc_branch +with_slepc_branch internal_slepc internal_petsc compile_slepc @@ -988,6 +990,8 @@ with_petsc_incs with_petsc_path with_petsc_libdir with_petsc_includedir +with_slepc_branch +with_petsc_branch enable_par_linalg with_blacs_libs with_scalapack_libs @@ -1600,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23218 h.4348a8b to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23287 h.e9ab2f86a2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1666,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23218 h.4348a8b:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23287 h.e9ab2f86a2:";; esac cat <<\_ACEOF @@ -1751,6 +1755,8 @@ Optional Packages: --with-petsc-libdir= Path to the Petsc lib directory --with-petsc-includedir= Path to the Petsc include directory + --with-slepc-branch= Use the of the slepc repository. + --with-petsc-branch= Use the of the petsc repository. --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL --with-scalapack-libs=(libs|mkl) Use SCALAPACK libraries or setup MKL @@ -1876,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23218 h.4348a8b +Yambo configure 5.2.0 r.23287 h.e9ab2f86a2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2505,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23218 h.4348a8b, which was +It was created by Yambo $as_me 5.2.0 r.23287 h.e9ab2f86a2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3263,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23218" -SHASH="4348a8b" +SREVISION="23287" +SHASH="e9ab2f86a2" @@ -12737,6 +12743,24 @@ then : fi + +# Check whether --with-slepc-branch was given. +if test ${with_slepc_branch+y} +then : + withval=$with_slepc_branch; +else $as_nop + with_slepc_branch=none +fi + + +# Check whether --with-petsc-branch was given. +if test ${with_petsc_branch+y} +then : + withval=$with_petsc_branch; +else $as_nop + with_petsc_branch=none +fi + # def_slepc="" petsc="no" @@ -13129,6 +13153,8 @@ fi + + # # ============================================================================ @@ -15410,7 +15436,7 @@ if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi # def_cuda="" CUDA_FLAGS="" -CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" +CUDA_LIBS="-cudalib=cufft,cublas,cusolver" # Available cc options: # cc20 Compile for compute capability 2.0 @@ -15432,12 +15458,12 @@ CUDA_LIBS="-Mcudalib=cufft,cublas,cusolver" printf %s "checking for CUDA support... " >&6; } if test x"$enable_cuda" = "xyes" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=cuda9.0,cc70,nollvm $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } elif ! test x"$enable_cuda" = "x" ; then def_cuda="-D_CUDA" - CUDA_FLAGS="-Mcuda=$enable_cuda $CUDA_LIBS" + CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 printf "%s\n" "$CUDA_FLAGS" >&6; } fi @@ -15581,6 +15607,7 @@ PETSC_check="-" if test "$internal_petsc" = "yes" ; then if test "$compile_petsc" = "yes" ; then PETSC_check="C"; fi if test "$compile_petsc" = "no" ; then PETSC_check="I"; fi + if ! test "$with_petsc_branch" = "none"; then PETSC_LIBS="$PETSC_LIBS (git branch $with_petsc_branch)"; fi elif test "$enable_petsc" = "yes" ; then PETSC_check="E" fi @@ -15589,6 +15616,7 @@ SLEPC_check="-" if test "$internal_slepc" = "yes" ; then if test "$compile_slepc" = "yes" ; then SLEPC_check="C"; fi if test "$compile_slepc" = "no" ; then SLEPC_check="I"; fi + if ! test "$with_slepc_branch" = "none"; then SLEPC_LIBS="$SLEPC_LIBS (git branch $with_slepc_branch)"; fi elif test "$enable_slepc" = "yes" ; then SLEPC_check="E" fi @@ -16578,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23218 h.4348a8b, which was +This file was extended by Yambo $as_me 5.2.0 r.23287 h.e9ab2f86a2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16642,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23218 h.4348a8b +Yambo config.status 5.2.0 r.23287 h.e9ab2f86a2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/driver/yambo.F b/driver/yambo.F index 46740be97f..f49585ef41 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -242,10 +242,10 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! #if defined _NL ! - ! RT + ! NL !==== ! - if (l_nl_optics) call NL_driver(en,X(:2),k,q,Dip) + if (l_nl_optics) call NL_driver(en,X(:2),Xw(:2),k,q,Dip) if (l_nl_optics) call mem_manager_report ! #endif diff --git a/include/version/version.m4 b/include/version/version.m4 index bbff03acf0..d54def9a3b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23218 h.4348a8b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23397 h.566513b49a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23218" -SHASH="4348a8b" +SREVISION="23397" +SHASH="566513b49a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/Yio/io_control.F b/src/Yio/io_control.F index 47b8bd5b60..f9875066ed 100644 --- a/src/Yio/io_control.F +++ b/src/Yio/io_control.F @@ -24,6 +24,7 @@ subroutine io_control(ACTION,MODE,COM,SEC,ID,COMM,DO_IT) & RD,WR,RD_CL,WR_CL,OP_APP,OP_APP_CL,OP_WR,OP_RD,OP_WR_CL,OP_RD_CL,& & io_reset,io_PAR_comm,io_PAR_cpu,IO_read,IO_write,& & write_is_on + use stderr, ONLY:intc ! implicit none ! @@ -41,14 +42,14 @@ subroutine io_control(ACTION,MODE,COM,SEC,ID,COMM,DO_IT) if ( .not. any( (/ ACTION==RD_CL, ACTION==OP_RD_CL, ACTION==OP_WR_CL, & & ACTION==OP_APP_CL, ACTION==OP_RD, ACTION==OP_APP, & & ACTION==OP_WR, ACTION==RD, ACTION==WR,ACTION==WR_CL/) ) ) & -& call error("io_control called with a non proper action") +& call error("io_control called with a non proper action :"//intc(ACTION)) ! ! Assign a new ID if the unit is not already open ! define_ID_WR=any((/ACTION==OP_WR_CL, ACTION==OP_WR, ACTION==OP_APP_CL, ACTION==OP_APP/)) define_ID_RD=any((/ACTION==OP_RD_CL, ACTION==OP_RD/)) ! - ! Except for the cases where the ID is defined, io_control is a trivial subrtouine + ! Except for the cases where the ID is defined, io_control is a trivial subrtouine (this is a joke) ! if (.not. (define_ID_RD .or. define_ID_WR) ) then call set_action_mode_com_and_sec() diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 51652e624f..d54301c2e7 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -8,7 +8,8 @@ subroutine X_ALLOC_elemental(WHAT,DIM) ! use pars, ONLY:rZERO,cZERO - use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Joint_DOS,BS_E_sorted,Epsilon_ij,X_magnons,X_dichroism,& + use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Joint_DOS,BS_E_sorted,BS_E_sorted_indx, & +& Epsilon_ij,X_magnons,X_dichroism, & & X_fxc,EEL,Alpha,X_mat,X_drude_term,X_RLcomp_ig use PHOTOLUM, ONLY:PL #ifdef _CUDA @@ -58,6 +59,8 @@ subroutine X_ALLOC_elemental(WHAT,DIM) case('BS_E_SORTED') YAMBO_ALLOC(BS_E_sorted,(DIM(1),DIM(2),DIM(3))) BS_E_sorted=cZERO + YAMBO_ALLOC(BS_E_sorted_indx,(DIM(1),2*DIM(2),5)) + BS_E_sorted_indx=0 case('FXC') YAMBO_ALLOC(X_fxc,(DIM(1))) X_fxc=cZERO @@ -103,6 +106,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) endif if (STRING_match(WHAT,"BS_E_SORTED").or.STRING_match(WHAT,"ALL")) then YAMBO_FREE(BS_E_sorted) + YAMBO_FREE(BS_E_sorted_indx) endif if (STRING_match(WHAT,"FXC").or.STRING_match(WHAT,"ALL")) then YAMBO_FREE(X_fxc) diff --git a/src/bse/.objects b/src/bse/.objects index a054e18bf0..a2f9ee2ab2 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -10,15 +10,15 @@ SLK_objects = K_inversion_do_it_SLK.o #endif objs = K_blocks.o K_driver_init.o K_dipoles.o K_IP.o K_IP_sort.o \ K_Transitions_setup.o K_Transition_check.o \ - K_driver.o \ + K_driver.o BSE_utilities.o \ K_WF_phases.o \ - K.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ + K_kernel.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_exchange_kernel.o \ K_restart.o K_solvers.o K_Haydock.o K_Haydock_response.o K_Haydock_gather.o K_Haydock_scatter.o K_screened_interaction.o \ K_inversion_do_it_full.o EPS_via_perturbative_inversion.o \ K_inversion_driver.o K_diagonal.o K_inversion_Lo.o K_inversion_restart.o K_inversion_engine.o \ - K_diago_driver.o K_diago_non_hermitian_residuals.o K_diago_hermitian_residuals.o \ + K_diago_driver.o K_diago_left_residuals.o K_diago_right_residuals.o K_diago_overlap_matrix.o \ K_diago_perturbative.o K_diago_response_functions.o K_eps_interpolate.o \ K_observables.o K_multiply_by_V.o K_multiply_by_V_transpose.o K_dot_product.o K_components_folded_in_serial_arrays.o \ - K_stored_in_a_big_matrix.o K_diago_kerr_residual.o K_diago_magnons_residual.o \ + K_stored_in_a_big_matrix.o \ PL_diago_residual.o PL_via_perturbative_inversion.o $(SLEPC_objects) $(SLK_objects) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F new file mode 100644 index 0000000000..f38dbbd2c0 --- /dev/null +++ b/src/bse/BSE_utilities.F @@ -0,0 +1,120 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2023 The Yambo Team +! +! Authors (see AUTHORS file for details): AM MG DS +! +subroutine BS_exchange_oscillators_alloc(iG) + use BS, ONLY:BS_T_grp,BS_n_g_exch +#include + integer, intent(in) :: iG + if (BS_T_grp(iG)%size==0) return + YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) +#ifdef _CUDA + allocate(BS_T_grp(iG)%O_x_d,mold=BS_T_grp(iG)%O_x) +#endif +end subroutine BS_exchange_oscillators_alloc +! +subroutine BS_correlation_oscillators_alloc(iB) + use BS, ONLY:BS_blk,O_ng +#include + integer, intent(in) :: iB + if (BS_blk(iB)%N_oscillators==0) return + YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) +#ifdef _CUDA + allocate(BS_blk(iB)%O_c_d,mold=BS_blk(iB)%O_c) +#endif +end subroutine BS_correlation_oscillators_alloc +! +subroutine BS_exchange_oscillators_free(iG_ref) + use BS, ONLY:BS_T_grp +#include + integer, intent(in) :: iG_ref + integer :: iG + do iG=iG_ref,1,-1 + YAMBO_FREE(BS_T_grp(iG)%O_x) +#ifdef _CUDA + if (allocated(BS_T_grp(iG)%O_x_d)) deallocate(BS_T_grp(iG)%O_x_d) +#endif + enddo +end subroutine BS_exchange_oscillators_free +! +subroutine BS_correlation_oscillators_free(iB_ref,l_std_alg) + use BS, ONLY:BS_T_grp,l_BSE_minimize_memory,BS_blk,n_BS_blks +#include + integer, intent(in) :: iB_ref + logical, intent(in) :: l_std_alg + integer :: iB,ik_loop,ip_loop,ik_now,ip_now + ik_now=BS_blk(iB_ref)%ik + ip_now=BS_blk(iB_ref)%ip + if(iB_ref==n_BS_blks) then + ik_now=0 + ip_now=0 + endif + do iB=iB_ref,1,-1 + ik_loop=BS_blk(iB)%ik + ip_loop=BS_blk(iB)%ip + if ( ik_now==ik_loop .and. ip_now==ip_loop .and. & + & .not.(l_BSE_minimize_memory.or.l_std_alg)) cycle + if (.not.allocated(BS_blk(iB)%O_c)) exit + YAMBO_FREE(BS_blk(iB)%O_c) + YAMBO_FREE(BS_blk(iB)%O_table) + YAMBO_FREE(BS_blk(iB)%kp_table) +#ifdef _CUDA + if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) +#endif + enddo +end subroutine BS_correlation_oscillators_free +! +subroutine TDDFT_oscillators_alloc_L(iGL) + use electrons, ONLY:n_spin,n_spinor + use BS, ONLY:BS_T_grp,BS_n_g_fxc +#include + integer, intent(in) :: iGL + if (BS_T_grp(iGL)%size>0) then + YAMBO_ALLOC(BS_T_grp(iGL)%O_tddft_L,(BS_n_g_fxc,BS_T_grp(iGL)%size,n_spinor,n_spinor)) +#ifdef _CUDA + allocate(BS_T_grp(iGL)%O_tddft_L_d,mold=BS_T_grp(iGL)%O_tddft_L) +#endif + endif +end subroutine TDDFT_oscillators_alloc_L +! +subroutine TDDFT_oscillators_alloc_R(iGR) + use electrons, ONLY:n_spin,n_spinor + use BS, ONLY:BS_T_grp,BS_n_g_fxc +#include + integer, intent(in) :: iGR + if (BS_T_grp(iGR)%size>0) then + YAMBO_ALLOC(BS_T_grp(iGR)%O_tddft_R,(BS_n_g_fxc,BS_T_grp(iGR)%size,n_spin,n_spin)) +#ifdef _CUDA + allocate(BS_T_grp(iGR)%O_tddft_R_d,mold=BS_T_grp(iGR)%O_tddft_R) +#endif + endif +end subroutine TDDFT_oscillators_alloc_R +! +subroutine TDDFT_oscillators_free_L(iG_ref) + use BS, ONLY:BS_T_grp +#include + integer, intent(in) :: iG_ref + integer :: iGL + do iGL=iG_ref,1,-1 + YAMBO_FREE(BS_T_grp(iGL)%O_tddft_L) +#ifdef _CUDA + if (allocated(BS_T_grp(iGL)%O_tddft_L_d)) deallocate(BS_T_grp(iGL)%O_tddft_L_d) +#endif + enddo +end subroutine TDDFT_oscillators_free_L +! +subroutine TDDFT_oscillators_free_R(iG_ref) + use BS, ONLY:BS_T_grp +#include + integer, intent(in) :: iG_ref + integer :: iGR + do iGR=iG_ref,1,-1 + YAMBO_FREE(BS_T_grp(iGR)%O_tddft_R) +#ifdef _CUDA + if (allocated(BS_T_grp(iGR)%O_tddft_R_d)) deallocate(BS_T_grp(iGR)%O_tddft_R_d) +#endif + enddo +end subroutine TDDFT_oscillators_free_R diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index bb0a01a38a..5bfc14f7b2 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -1,5 +1,5 @@ + BSE_utilities.o EPS_via_perturbative_inversion.o - K.o K_Haydock.o K_Haydock_gather.o K_Haydock_response.o @@ -19,10 +19,13 @@ K_diago_driver.o K_diago_hermitian_residuals.o K_diago_kerr_residual.o + K_diago_left_residuals.o K_diago_magnons_residual.o K_diago_non_hermitian_residuals.o + K_diago_overlap_matrix.o K_diago_perturbative.o K_diago_response_functions.o + K_diago_right_residuals.o K_diagonal.o K_dipoles.o K_dot_product.o @@ -37,6 +40,7 @@ K_inversion_driver.o K_inversion_engine.o K_inversion_restart.o + K_kernel.o K_multiply_by_V.o K_multiply_by_V_slepc.o K_multiply_by_V_transpose.o diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index f9520f4e87..d715448a5f 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -9,6 +9,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) ! use pars, ONLY:SP,schlen,cI,cZERO,cONE use functions, ONLY:NAN + use R_lattice, ONLY:q0_def_norm use X_m, ONLY:global_gauge,X_OUTPUT_driver use wrapper_omp, ONLY:V_plus_alpha_V_omp use frequency, ONLY:w_samp @@ -228,6 +229,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) + if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) V0(i_g)%fragment(:,i_ColFG) = V0(i_g)%fragment(:,i_ColFG)*sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP)) enddo @@ -266,9 +268,10 @@ subroutine K_Haydock(iq,W,OBS,Xk) if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) if (trim(OBS)=="kerr") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) + if (trim(OBS)=="dichroism") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm W0(i_g)%fragment(:,i_ColFG) = W0(i_g)%fragment(:,i_ColFG)*(sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP))) enddo - if(velocity_correction) V_tmp(i_g)%fragment = W0(i_g)%fragment/BS_T_grp(i_g)%E + if(velocity_correction) V_tmp(i_g)%fragment = W0(i_g)%fragment/BS_T_grp(i_g)%E enddo ! do i_g = 1,BS_nT_grps diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index 03e540fbd9..8d59e1c6a0 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -7,9 +7,10 @@ ! subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_threshold,FG_factor) ! - use pars, ONLY:SP,cZERO,cONE,pi + use pars, ONLY:SP,cZERO,cONE,cI,pi + use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Resp_ii,Joint_DOS,global_gauge, & -& X_magnons,Resp_ij,i_G_shift +& X_magnons,Resp_ij,X_dichroism,i_G_shift use R_lattice, ONLY:bare_qpg use frequency, ONLY:w_samp use BS, ONLY:BSE_mode @@ -223,6 +224,8 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh Resp_ij(iw,i_resp(:))= -X_o(1:2,1)*Co case("magnons") X_magnons(iw,1,i_resp(:))=-X_o(1:2,1)*Co/(4._SP*pi) + case("dichroism") + X_dichroism(iw,i_resp(:))=-X_o(1:2,1)*Co/(4._SP*pi)*(cI/SPEED_OF_LIGHT) end select ! enddo @@ -242,6 +245,9 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh case("magnons") sums=(X_magnons(iw,1,2)+X_magnons(iw,1,4))/2._SP diff= X_magnons(iw,1,2)-X_magnons(iw,1,4) + case("dichroism") + sums=(X_dichroism(iw,2)+X_dichroism(iw,4))/2._SP + diff= X_dichroism(iw,2)-X_dichroism(iw,4) end select ! update_thresh = abs(real(sums))>0._SP .and. abs(aimag(sums))>0._SP diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index e7ce35f566..1430298f37 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -21,8 +21,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) & skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism use BS_solvers, ONLY:Co_factor,diam_term_exact,para_term_w0,BSS_Wd,BSS_mode,BSS_uses_DbGd,FG_factor use BS, ONLY:BS_T_grp,BS_nkFGbz_in_Tgrp,BS_nT_grps,BS_perturbative_SOC,& - & BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_H_dim,& - & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& +& BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_H_dim,l_BS_kerr_asymm,& +& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & BS_K_anti_resonant,l_BS_ares_from_res use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& @@ -43,7 +43,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Work space ! - integer ::iv,ic,i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR,i_dip + integer ::i_T_g,i_T,n_SOC,i_pert_SOC,i_res_ares,i_sort,nVAR,Indexes(5) real(SP) ::f_eh,f_eh_PL,res_PL logical ::dip_v,dip_r complex(SP) ::res_abs,E_plus_W0,E_plus_W(2/n_sp_pol),Z_eh,E_eh,g_fac @@ -52,6 +52,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) complex(SP), allocatable :: E_DbGd(:) ! complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich + integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! if (l_bs_fxc) return @@ -97,13 +98,15 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Sorting pre-setup !------------------- if(l_BS_esort) then - N_BS_E_sorted=2 ! Energies (IP + degeneracy) + N_BS_E_sorted=2 ! Energies (IP + degeneracy) if(l_BS_abs) n_BS_E_sorted=n_BS_E_sorted+1 if(l_BS_kerr) n_BS_E_sorted=n_BS_E_sorted+1 if(l_BS_dichroism) n_BS_E_sorted=n_BS_E_sorted+1 if(l_BS_magnons) n_BS_E_sorted=n_BS_E_sorted+n_spinor YAMBO_ALLOC(vtmpC,(BS_H_dim,n_BS_E_sorted)) vtmpC=cZERO + YAMBO_ALLOC(vtmpI,(BS_H_dim,5)) + vtmpI=0 endif ! if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then @@ -128,6 +131,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Energy !======== ! + Indexes=BS_T_grp(i_T_g)%table(i_T,:) E_plus_W0=BS_T_grp(i_T_g)%E(i_T,1) if(allocated(BS_T_grp(i_T_g)%W)) then E_plus_W0=BS_T_grp(i_T_g)%E(i_T,1)-cI*BS_T_grp(i_T_g)%W(i_T) @@ -147,7 +151,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) enddo ! if (l_BS_esort.and.i_res_ares==1) then - call K_IP_sort("add",i_sort,nVAR,E_plus_W0,vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,E_plus_W0,vtmpC) nVAR=nVAR+1 endif ! @@ -163,21 +167,28 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Residuals DIP_cv * DIP_vc ! if(l_BS_abs) then - res_abs=abs(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))**2 + res_abs=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + if(l_BS_kerr_asymm) then + res_abs=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)))/2._SP + endif if(l_BS_trace) then - do i_dip=2,BS_dip_size - res_abs=res_abs+abs(BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1))**2 - enddo - res_abs=res_abs/real(BS_dip_size,SP) + res_abs=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)))/3._SP endif res_abs=res_abs*f_eh*Z_eh*E_eh - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_abs,vtmpC) + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_abs,vtmpC) endif ! if (l_BS_kerr) then res_kerr=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)) + if(l_BS_kerr_asymm) then + res_kerr=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1))- & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)))/2._SP + endif res_kerr=res_kerr*Z_eh*E_eh*f_eh - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_kerr,vtmpC) + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_kerr,vtmpC) endif ! if (l_BS_photolum) then @@ -192,16 +203,16 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Dichroism ! if(l_BS_dichroism) then - res_dich=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1)) + res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1)))/2._SP if(l_BS_trace) then - do i_dip=2,BS_dip_size - ! x*L = DIP_x*DIP_orbital; - res_dich=res_dich+BS_T_grp(i_T_g)%dipoles_opt(i_dip,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(i_dip,i_T,1)) - enddo - res_dich=res_dich/real(BS_dip_size,SP) + ! x*L = DIP_x*DIP_orbital; + res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP endif res_dich=res_dich*f_eh*Z_eh/(q0_def_norm) - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,res_dich,vtmpC) + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_dich,vtmpC) endif ! ! Magnons @@ -213,8 +224,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_magn(:)=BS_T_grp(i_T_g)%dipoles_mag(:,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_mag(:,i_T,1)) res_magn=res_magn*f_eh*Z_eh if (l_BS_esort.and.i_res_ares==1) then - call K_IP_sort("add",i_sort,nVAR,res_magn(1),vtmpC) - if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,res_magn(2),vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(1),vtmpC) + if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) endif endif ! @@ -305,7 +316,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! ! Sorting procedure !=================== - if (l_BS_esort) call K_IP_sort("sort",0,nVAR,cZERO,vtmpC) + if (l_BS_esort) call K_IP_sort("sort",0,nVAR,(/0,0,0,0,0/),vtmpI,cZERO,vtmpC) ! ! ALL 2 ALL !============== @@ -372,7 +383,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism") - call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP") + call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") ! ! Clean ! diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index 9c72fbd310..38a6068617 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -5,12 +5,12 @@ ! ! Authors (see AUTHORS file for details): DS AM ! -subroutine K_IP_sort(what,I,N,El,vC) +subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! use pars, ONLY:SP,cZERO use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_COM_Xk_ibz_INDEX - use X_m, ONLY:BS_E_sorted,N_BS_E_sorted - use BS, ONLY:BS_H_dim + use X_m, ONLY:BS_E_sorted,N_BS_E_sorted,BS_E_sorted_indx + use BS, ONLY:BS_H_dim,l_BS_esort_indx use vec_operate, ONLY:sort,degeneration_finder use units, ONLY:HA2EV use parallel_int, ONLY:PP_redux_wait @@ -18,11 +18,12 @@ subroutine K_IP_sort(what,I,N,El,vC) #include ! character(*) ::what - integer ::I,N + integer ::I,N,Indexes(5),vI(BS_H_dim,5) complex(SP) ::El,vC(BS_H_dim,N_BS_E_sorted) ! ! Work space ! + logical :: l_print_warning integer :: EDIM,Ntmp,i_VAR,i_cv,i_grp,n_deg_grp real(SP), allocatable :: vR(:) integer, allocatable :: sort_indx(:),first_el(:),n_of_el(:) @@ -30,11 +31,15 @@ subroutine K_IP_sort(what,I,N,El,vC) if (what=="add") then N=N+1 vC(I,N)=El + if(N==1) vI(I,:)=Indexes return endif ! + ! call PP_redux_wait(vC,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait(vI,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait(vC,COMM=PAR_COM_eh_INDEX%COMM ) + call PP_redux_wait(vI,COMM=PAR_COM_eh_INDEX%COMM ) ! YAMBO_ALLOC(vR,(BS_H_dim)) YAMBO_ALLOC(sort_indx,(BS_H_dim)) @@ -52,21 +57,35 @@ subroutine K_IP_sort(what,I,N,El,vC) ! Threshold is 1meV call degeneration_finder(vR(:EDIM),EDIM,first_el,n_of_el,n_deg_grp,0.001_SP/HA2EV,Include_single_values=.TRUE.) ! + l_print_warning=.false. + ! do i_VAR=1,n_BS_E_sorted BS_E_sorted(:,i_VAR,1)=cZERO do i_grp=1,n_deg_grp if(i_grp>EDIM/Ntmp) cycle + ! + if(i_VAR==1.and.l_BS_esort_indx) then + if (n_of_el(i_grp)>18) l_print_warning=.true. + do i_cv=first_el(i_grp),first_el(i_grp)+min(18,n_of_el(i_grp))-1 + BS_E_sorted_indx(i_grp,i_cv-first_el(i_grp)+1,1:5)=vI(sort_indx(i_cv),:) + enddo + endif + ! if(i_VAR==2) then BS_E_sorted(i_grp,i_VAR,1)=real(n_of_el(i_grp),SP) cycle endif + ! do i_cv=first_el(i_grp),first_el(i_grp)+n_of_el(i_grp)-1 BS_E_sorted(i_grp,i_VAR,1)=BS_E_sorted(i_grp,i_VAR,1)+vC(sort_indx(i_cv),i_VAR) enddo - BS_E_sorted(i_grp,i_VAR,1)=BS_E_sorted(i_grp,i_VAR,1)/real(n_of_el(i_grp),SP) + if(i_VAR==1) BS_E_sorted(i_grp,i_VAR,1)=BS_E_sorted(i_grp,i_VAR,1)/real(n_of_el(i_grp),SP) enddo + ! enddo ! + if (l_print_warning) call warning("More than 18 degenerate transitions detected. Printing only first 18") + ! ! Free deallocate(first_el) deallocate(n_of_el) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index ff3a2132b8..f4cfd09d98 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -5,18 +5,8 @@ ! ! Authors (see AUTHORS file for details): AM DS IMA ! -subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) +subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! - ! mode=K - ! ====== - ! Out: - ! - ! BS_K_dim(1) - ! BS_H_dim - ! BS_nT_at_k - ! - ! mode=T - ! ====== ! Filling of Transition groups ! !type BS_T_group @@ -33,106 +23,83 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) use pars, ONLY:SP use stderr, ONLY:intc use BS_solvers, ONLY:BSS_mode,BSS_uses_DbGd - ! mode ="T" use BS, ONLY:T_group,BS_bands,BS_T_grp,BS_nT_grps,BS_n_eh_spaces,& & BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,& & BS_nkFGbz_in_Tgrp - ! mode ="K" - use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & -& l_BS_ares_from_res,BS_res_ares_n_mat use DIPOLES, ONLY:DIPOLE_t use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_IND_T_ordered,PAR_IND_T_groups,& & PAR_IND_T_Haydock,PP_indexes_reset - use electrons, ONLY:levels,n_sp_pol,n_full_bands,n_met_bands + use electrons, ONLY:levels,n_sp_pol use com, ONLY:msg use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:l_BS_magnons,l_BS_photolum #if defined _RT + use electrons, ONLY:n_full_bands,n_met_bands use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:EQ_Transitions,EQ_NoOcc,ALL_NoOcc + use RT_control, ONLY:EQ_Transitions,EQ_NoOcc #endif ! #include ! - character(1) :: mode ! "K" for k-resolved, "T" for transitions groups - type(levels) :: Ken - type(bz_samp) :: Xk - type(DIPOLE_t) :: Dip - integer :: iq + type(levels), intent(in) :: Ken + type(bz_samp), intent(in) :: Xk + type(DIPOLE_t), intent(in) :: Dip + integer, intent(in) :: iq + integer, intent(in) :: V_bands(2),C_bands(2) ! ! Work Space ! real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL - logical :: l_trans_in_group,l_grp_to_grp,l_skip_unoccupied - integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2,isp1,isp2, & + logical :: l_trans_in_group,l_grp_to_grp + integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2, & & i_T_now,i_T_group_now,i_T_group_last,i_T_group_start,i_g,n_loops,i_loop,i_T_in_the_grp,i_res_ares,& -& BS_nT_at_k_tmp(Xk%nibz*2),V_bands(2),C_bands(2),& & nColFG_in_T_group_now,i_ColFG,ikFGbz,ikFG ! logical, external :: K_Transition_check ! - if (mode=="K") call section("+P",'Transition pre-analysis @q'//trim(intc(iq))) - if (mode=="T") call section("=",'Transition Groups build-up @q'//trim(intc(iq))) + call section("=",'Transition Groups build-up @q'//trim(intc(iq))) ! - call k_build_up_BZ_tables(Xk) + ! BS_nT_grps is computed in PARALLEL_Transition_grouping ! - ! BS_nT_grps is first computed in PARALLEL_Transition_grouping + call msg('r','[BSK] Transition groups (total)',BS_nT_grps) ! - if (mode=="T") then - allocate(BS_T_grp(BS_nT_grps)) - do i_g=1,BS_nT_grps - BS_T_grp(i_g)%size=0 - enddo - n_loops=2 - ! - allocate(BS_nkFGbz_in_Tgrp(BS_nT_grps)) - ! - call PP_indexes_reset(PAR_IND_WF_b_and_k) - YAMBO_ALLOC(PAR_IND_WF_b_and_k%element_2D,(BS_bands(2),Xk%nibz)) - PAR_IND_WF_b_and_k%element_2D=.FALSE. - else - BS_K_dim=0 - BS_nT_at_k_tmp=0 - n_loops=1 - endif + allocate(BS_T_grp(BS_nT_grps)) + do i_g=1,BS_nT_grps + BS_T_grp(i_g)%size=0 + enddo + n_loops=2 ! - l_skip_unoccupied=.true. - V_bands=(/BS_bands(1),maxval(Ken%nbm)/) - C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) -#if defined _RT - ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. - if (l_rt_carriers_in_use.and.EQ_Transitions) then - l_skip_unoccupied=.false. - V_bands=(/BS_bands(1),maxval(n_met_bands)/) - C_bands=(/minval(n_full_bands)+1,BS_bands(2)/) - endif - !if (ALL_NoOcc) then - ! l_skip_unoccupied=.false. - ! V_bands=BS_bands - ! C_bands=BS_bands - !endif -#endif + allocate(BS_nkFGbz_in_Tgrp(BS_nT_grps)) + ! + call PP_indexes_reset(PAR_IND_WF_b_and_k) + YAMBO_ALLOC(PAR_IND_WF_b_and_k%element_2D,(BS_bands(2),Xk%nibz)) + PAR_IND_WF_b_and_k%element_2D=.FALSE. ! do i_loop=1,n_loops ! - if (mode=="T") then - i_T_now=0 - i_T_group_now=0 - i_T_group_last=0 - endif + i_T_now=0 + i_T_group_now=0 + i_T_group_last=0 + ! + nColFG_in_T_group_now=1 ! ! DS: WARNING ! I cannot revert ik and i_sp_pol loop here ... ! do i_res_ares=1,BS_n_eh_spaces ! - if (mode=="T") i_T_group_start=i_T_group_now+1 + i_T_group_start=i_T_group_now+1 + ! + ! Here I cannot invert the ik and the i_sp loop since + ! BS_T_grp and BS_nT_at_k are defined according to kpts while they + ! should be defined according to both i_sp_pol and kpts ! do ik=1,Xk%nibz ! - ! Here I cannot invert the ik and the i_sp loop since - ! BS_T_grp and BS_nT_at_k are defined according to kpts while they - ! should be defined according to both i_sp_pol and kpts + if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then + nColFG_in_T_group_now = maxval(Xk%FGbz%N_mapped(& +& Xk%k_table(ik,Xk%star(ik,:Xk%nstar(ik))))) + end if ! ! Moreover I cannot move iv,ic loops insiede i_sp_pol and i_star loops ! Otherwise runs with parallelization over eh fail @@ -140,13 +107,6 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) ! of the algorithm with the qindx_B distributed in memory very slow ! since i_k_bz and i_p_bz change at each iteration of the loop ! - if (BSS_uses_DbGd .and. (index(BSS_mode,'h')/=0)) then - nColFG_in_T_group_now = maxval(Xk%FGbz%N_mapped(& -& Xk%k_table(ik,Xk%star(ik,:Xk%nstar(ik))))) - else - nColFG_in_T_group_now=1 - end if - ! do iv=V_bands(1),V_bands(2) do ic=C_bands(1),C_bands(2) ! @@ -154,16 +114,10 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) i_sp_v=i_sp_c ! if (l_BS_magnons.and.n_sp_pol==2) then - if(i_res_ares==1.and.i_sp_c==1) cycle - if(i_res_ares==2.and.i_sp_c==2) cycle + if(i_sp_c==1) cycle i_sp_v=mod(i_sp_c,n_sp_pol)+1 endif ! - if( l_skip_unoccupied) then - if( iv>Ken%nbm(i_sp_v) ) cycle - if( ic + ! + type(levels), intent(in) :: Ken + type(bz_samp), intent(in) :: Xk + type(DIPOLE_t), intent(in) :: Dip + integer, intent(in) :: iq + integer, intent(out):: V_bands(2),C_bands(2) + ! + ! Work Space + ! + real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL + integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2, & +& i_res_ares,BS_nT_at_k_tmp(Xk%nibz*2) + ! + logical, external :: K_Transition_check + ! + ! + call section("+P",'Transition pre-analysis @q'//trim(intc(iq))) + ! + call k_build_up_BZ_tables(Xk) + ! + BS_K_dim=0 + BS_nT_at_k_tmp=0 + ! + V_bands=(/BS_bands(1),maxval(Ken%nbm)/) + C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) +#if defined _RT + ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. + if (l_rt_carriers_in_use.and.EQ_Transitions) then + V_bands=(/BS_bands(1),maxval(n_met_bands)/) + C_bands=(/minval(n_full_bands)+1,BS_bands(2)/) endif + !if (ALL_NoOcc) then + ! l_skip_unoccupied=.false. + ! V_bands=BS_bands + ! C_bands=BS_bands + !endif +#endif + ! + do i_res_ares=1,BS_n_eh_spaces + ! + do i_sp_c=1,n_sp_pol + ! + i_sp_v=i_sp_c + ! + if (l_BS_magnons.and.n_sp_pol==2) then + if(i_sp_c==1) cycle + i_sp_v=mod(i_sp_c,n_sp_pol)+1 + endif + ! + do ik=1,Xk%nibz + do i_star=1,Xk%nstar(ik) + ! + ikbz=Xk%k_table(ik,Xk%star(ik,i_star)) + ikpbz=qindx_X(iq,ikbz,1) + ikp =Xk%sstar(ikpbz,1) + ! + do iv=V_bands(1),V_bands(2) + do ic=C_bands(1),C_bands(2) + ! + if (i_res_ares==1) then; ib1=iv; ib2=ic; endif + if (i_res_ares==2) then; ib1=ic; ib2=iv; endif + ! + if (.not.K_Transition_check(Ken,Dip,iq,ik,ikp,ib1,ib2,i_sp_c,i_res_ares,& + & E_eh,E_eh_SOC_corr,f_eh,f_eh_RES,f_eh_PL)) cycle + ! + BS_K_dim(i_res_ares)=BS_K_dim(i_res_ares)+1 + BS_nT_at_k_tmp(ik+(i_res_ares-1)*Xk%nibz)=BS_nT_at_k_tmp(ik+(i_res_ares-1)*Xk%nibz)+1 + ! + enddo ! conduction + enddo ! valence + ! + enddo ! symmetries + enddo ! k (ibz) + enddo ! spin + ! + enddo ! i_res_ares ! YAMBO_ALLOC(BS_nT_at_k,(Xk%nibz*BS_n_eh_spaces)) BS_nT_at_k=BS_nT_at_k_tmp(:Xk%nibz*BS_n_eh_spaces) @@ -299,4 +337,4 @@ subroutine K_Transitions_setup(mode,iq,Ken,Xk,Dip) if (BS_res_ares_n_mat==2.or.BS_K_coupling) BS_H_dim=BS_K_dim(1)+BS_K_dim(2) endif ! -end subroutine +end subroutine K_Transitions_dimensions diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 0e2ab8c321..47cd16f8c4 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -50,7 +50,7 @@ subroutine K_components_folded_in_serial_arrays(iq) call BSS_DICH_alloc( ) call BSS_PL_alloc( ) ! - if (BS_nT_grps>0) call live_timing("Folding BSE Kernel",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) + if (BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) ! BS_n_eh_spaces_solver=1 if(BS_n_eh_spaces==1.and.BS_K_coupling) BS_n_eh_spaces_solver=2 @@ -106,7 +106,7 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_magnons) BSS_dipoles_magn(:,H_pos)=BS_T_grp(i_g)%dipoles_mag(:,i_Tr,i_res_ares_solver) ! - if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_c,i_res_ares_solver) + if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) ! if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:) ! diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 2024ae7980..93c9fcc2ce 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -14,7 +14,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) use D_lattice, ONLY:nsym use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& -& BS_oscillators_alloc,K_CORR_collision,BS_T_grp,& +& K_CORR_collision,BS_T_grp,& & BS_K_dim,l_BS_ares_from_res use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc @@ -175,7 +175,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! end select ! - call BS_oscillators_alloc(.FALSE.,0,.TRUE.,i_block) + call BS_correlation_oscillators_alloc(i_block) ! #if !defined _CUDA !$omp parallel default(shared), private(i_Tk,i_Tp, & @@ -380,7 +380,6 @@ subroutine EVAL_table(iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko) integer, intent(in) :: iB,iki,iko,ibi,ibo,i_sp_pol,i_s_ki,i_s_ko ! if( O_todo_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol) ) return - ! BS_blk(iB)%N_oscillators=BS_blk(iB)%N_oscillators+1 BS_blk(iB)%O_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=BS_blk(iB)%N_oscillators O_todo_table(i_s_ki,i_s_ko,iki,iko,ibi,ibo,i_sp_pol)=.true. diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index 98020dadb0..cf7f1f9e60 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -36,7 +36,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) use D_lattice, ONLY:nsym use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& -& BS_oscillators_alloc,K_CORR_collision,BS_T_grp,& +& K_CORR_collision,BS_T_grp,& & BS_K_dim,l_BS_ares_from_res,l_BSE_kernel_full use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc @@ -66,7 +66,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) ! logical, allocatable :: O_todo_table(:,:,:,:,:,:) ! - if (.not.BS_res_K_corr) return + if (.not.BS_res_K_corr) return ! call timing('T_space CORR Osc.',OPR='start') ! @@ -201,7 +201,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) ! end select ! - call BS_oscillators_alloc(.FALSE.,0,.TRUE.,i_block) + call BS_correlation_oscillators_alloc(i_block) ! #if !defined _CUDA !$omp parallel default(shared), private(i_Tk,i_Tp, & diff --git a/src/bse/K_correlation_kernel_dir.F b/src/bse/K_correlation_kernel_dir.F index 6e974bfc2d..ff6f1e8ce0 100644 --- a/src/bse/K_correlation_kernel_dir.F +++ b/src/bse/K_correlation_kernel_dir.F @@ -40,8 +40,8 @@ function K_correlation_kernel_dir(i_block,i_p,i_pmq, return endif ! - iO1 = BS_blk(i_block)%O_table(i_k_s,i_p_s,1,1,i_n_k,i_n_p,i_k_sp_pol_n) - iO2 = BS_blk(i_block)%O_table(i_kmq_s,i_pmq_s,i_kmq_t,i_pmq_t,i_m_k,i_m_p,i_k_sp_pol_m) + iO1 = BS_blk(i_block)%O_table(i_k_s,i_p_s,1,1,i_n_k,i_n_p,i_k_sp_pol_n) + iO2 = BS_blk(i_block)%O_table(i_kmq_s,i_pmq_s,i_kmq_t,i_pmq_t,i_m_k,i_m_p,i_k_sp_pol_m) ! #ifdef _CUDA ! diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 08cbac35e5..a4e43858da 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -24,16 +24,17 @@ subroutine K_diago_driver(iq,W,X_static) use pars, ONLY:SP use stderr, ONLY:intc use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& -& BS_res_ares_n_mat,l_BS_optics !,BS_Blocks_symmetrize_K,& +& BS_res_ares_n_mat,l_BS_optics,l_BS_dichroism !,BS_Blocks_symmetrize_K,& use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,& & BSS_write_eig_2_db,BSS_eh_W,BS_mat,BSS_n_eig,BS_E use X_m, ONLY:X_t,X_OUTPUT_driver - use electrons, ONLY:n_sp_pol + use electrons, ONLY:n_sp_pol,n_spinor use frequency, ONLY:w_samp use com, ONLY:isec use LIVE_t, ONLY:live_timing use linear_algebra, ONLY:DIAGO - use interfaces, ONLY:K_diago_response_functions,LINEAR_ALGEBRA_driver,PL_diago_residual + use interfaces, ONLY:K_diago_response_functions,LINEAR_ALGEBRA_driver,& + & K_diago_left_residuals,K_diago_right_residuals,PL_diago_residual use IO_int, ONLY:io_control use IO_m, ONLY:REP,VERIFY,OP_WR_CL,OP_RD_CL use parser_m, ONLY:parser @@ -60,7 +61,7 @@ subroutine K_diago_driver(iq,W,X_static) ! Work Space ! integer :: i_BS_mat,Input_n_eig - logical :: K_is_not_hermitian,l_diago,l_slepc,l_target_energy + logical :: K_is_not_hermitian,l_diago,l_slepc,l_target_energy,l_dip_more character(1) :: sec character(5) :: Solver ! @@ -84,12 +85,14 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Residuals, different for each response function !================================================= - complex(SP),pointer :: BS_R_left(:) => null() - complex(SP),pointer :: BS_R_right(:) => null() + complex(SP),pointer :: BS_R_left_abs(:) => null() + complex(SP),pointer :: BS_R_right_abs(:) => null() ! real(SP), pointer :: BS_R_PL(:,:) => null() ! + complex(SP),pointer :: BS_R_left_kerr(:) => null() complex(SP),pointer :: BS_R_right_kerr(:) => null() + complex(SP),pointer :: BS_R_right_dich(:,:) => null() ! complex(SP),pointer :: BS_R_left_magn(:,:) => null() complex(SP),pointer :: BS_R_right_magn(:,:) => null() @@ -102,6 +105,8 @@ subroutine K_diago_driver(iq,W,X_static) #if defined _SLEPC && !defined _NL l_slepc = index(BSS_mode,'s')/=0 #endif + ! + l_dip_more=l_BS_kerr.or.l_BS_dichroism ! if(l_diago) Solver="Diago" #if defined _SLEPC && !defined _NL @@ -145,8 +150,8 @@ subroutine K_diago_driver(iq,W,X_static) ! Diagonalization DB (IN) !======================== call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) - io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& -& BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! K_is_not_hermitian=BS_K_coupling.or.(allocated(BSS_eh_W).and..not.BSS_perturbative_width) ! @@ -230,20 +235,19 @@ subroutine K_diago_driver(iq,W,X_static) if(l_slepc) call MATRIX_slepc(slepc_mat,l_target_energy,BSS_n_eig,BS_mat,E_real=BS_E_real) #endif ! - BS_E=cmplx(BS_E_real,0._SP,SP) + BS_E=cmplx(BS_E_real,0._SP,kind=SP) ! endif ! #if defined _SLEPC && !defined _NL ! - ! BSS_n_eig could be lowered by MATRIX_slepc - if (Input_n_eig>BSS_n_eig) then - call K_slepc_resize_variables() + if (l_slepc) then + ! BSS_n_eig could be lowered by MATRIX_slepc + if (Input_n_eig>BSS_n_eig) call K_slepc_resize_variables() + ! Destroy the matrix + call MatDestroy(slepc_mat,ierr) endif ! - ! Destroy the matrix - !============================ - if(l_slepc) call MatDestroy(slepc_mat,ierr) #endif ! if(l_diago) call live_timing( ) @@ -251,20 +255,59 @@ subroutine K_diago_driver(iq,W,X_static) ! Construct the residuals of epsilon !==================================== if (K_is_not_hermitian) then + ! + ! Right residuals + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then + call K_diago_right_residuals("opt1",i_BS_mat,BS_E,BS_R_right_abs, BS_V_right) + if(l_dip_more) call K_diago_right_residuals("opt2",i_BS_mat,BS_E,BS_R_right_kerr,BS_V_right) + endif + if(l_BS_dichroism) then + call K_diago_right_residuals("dic1",i_BS_mat,BS_E,BS_R_right_dich(:,1),BS_V_right) + call K_diago_right_residuals("dic2",i_BS_mat,BS_E,BS_R_right_dich(:,2),BS_V_right) + endif + if(l_BS_magnons) then + call K_diago_right_residuals("mag1",i_BS_mat,BS_E,BS_R_right_magn(1,:),BS_V_right) + if(n_spinor==2) call K_diago_right_residuals("mag2",i_BS_mat,BS_E,BS_R_right_magn(2,:),BS_V_right) + endif ! call K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) ! - if (l_BS_optics ) call K_diago_non_hermitian_residuals(BS_E,BS_R_left,BS_R_right,BS_V_left,BS_V_right,BS_overlap) - if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_V_right,BS_R_right_kerr) - if (l_BS_magnons) call K_diago_non_herm_magnons_residual(BS_R_left_magn,BS_R_right_magn,BS_V_left,BS_V_right,BS_overlap) - if (l_BS_photolum)call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) + ! Left residuals + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then + call K_diago_left_residuals("opt1",i_BS_mat,BS_E,BS_R_left_abs, BS_V_left,BS_overlap) + if(l_dip_more) call K_diago_left_residuals("opt2",i_BS_mat,BS_E,BS_R_left_kerr,BS_V_left,BS_overlap) + endif + if(l_BS_magnons) then + call K_diago_left_residuals("mag1",i_BS_mat,BS_E,BS_R_left_magn(1,:),BS_V_left,BS_overlap) + if(n_spinor==2) call K_diago_left_residuals("mag2",i_BS_mat,BS_E,BS_R_left_magn(2,:),BS_V_left,BS_overlap) + endif + ! + ! DS: this also should be changed according to the general structure + if(l_BS_photolum) call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) ! else ! - if (l_BS_optics) call K_diago_hermitian_residuals(i_BS_mat,BS_E_real,BS_R_left,BS_R_right) - if (l_BS_kerr ) call K_diago_kerr_residual(BS_E,BS_mat,BS_R_right_kerr) - if (l_BS_magnons) call K_diago_herm_magnons_residual(i_BS_mat,BS_R_left_magn,BS_R_right_magn) - if (l_BS_photolum)call PL_diago_residual(BS_mat,BS_mat,BS_R_PL,K_is_not_hermitian) + ! Right residuals + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) then + call K_diago_right_residuals("opt1", i_BS_mat,BS_E,BS_R_right_abs, BS_mat) + if(l_dip_more) call K_diago_right_residuals("opt2",i_BS_mat,BS_E,BS_R_right_kerr,BS_mat) + endif + if(l_BS_dichroism) then + call K_diago_right_residuals("dic1",i_BS_mat,BS_E,BS_R_right_dich(:,1),BS_mat) + call K_diago_right_residuals("dic2",i_BS_mat,BS_E,BS_R_right_dich(:,2),BS_mat) + endif + if(l_BS_magnons) then + call K_diago_right_residuals("mag1",i_BS_mat,BS_E,BS_R_right_magn(1,:),BS_mat) + if(n_spinor==2) call K_diago_right_residuals("mag2",i_BS_mat,BS_E,BS_R_right_magn(2,:),BS_mat) + endif + ! + ! Left residuals + if(l_BS_optics.or.l_BS_kerr.or.l_BS_dichroism) BS_R_left_abs =conjg(BS_R_right_abs) + if( l_BS_kerr.or.l_BS_dichroism) BS_R_left_kerr=conjg(BS_R_right_kerr) + if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) + ! + ! DS: this also should be changed according to the general structure + if(l_BS_photolum) call PL_diago_residual(BS_mat,BS_mat,BS_R_PL,K_is_not_hermitian) ! endif ! @@ -289,18 +332,18 @@ subroutine K_diago_driver(iq,W,X_static) ! endif ! - ! Now I calculate epsilon - !========================= - call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + ! Now I calculate the physical quantities + !========================================= + call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! Diagonalization DB (OUT) !========================== if (io_err/=0) then ! call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) - io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! endif ! @@ -338,12 +381,18 @@ subroutine local_alloc(what) YAMBO_ALLOC_P(BS_E_SOC_corr,(2/n_sp_pol,BSS_n_eig)) endif if (l_BS_optics) then - YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) - YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_left_abs,(BSS_n_eig)) + YAMBO_ALLOC_P(BS_R_right_abs,(BSS_n_eig)) endif if (l_BS_kerr) then YAMBO_ALLOC_P(BS_R_right_kerr,(BSS_n_eig)) endif + if (l_dip_more) then + YAMBO_ALLOC_P(BS_R_left_kerr,(BSS_n_eig)) + endif + if (l_BS_dichroism) then + YAMBO_ALLOC_P(BS_R_right_dich,(BSS_n_eig,2)) + endif if (l_BS_magnons) then YAMBO_ALLOC_P(BS_R_left_magn,(2,BSS_n_eig)) YAMBO_ALLOC_P(BS_R_right_magn,(2,BSS_n_eig)) @@ -386,9 +435,11 @@ subroutine local_free() YAMBO_FREE(BS_V_left) YAMBO_FREE_P(BS_overlap) YAMBO_FREE_P(BS_E_SOC_corr) - YAMBO_FREE_P(BS_R_right) - YAMBO_FREE_P(BS_R_left) + YAMBO_FREE_P(BS_R_right_abs) + YAMBO_FREE_P(BS_R_left_abs) YAMBO_FREE_P(BS_R_right_kerr) + YAMBO_FREE_P(BS_R_left_kerr) + YAMBO_FREE_P(BS_R_right_dich) YAMBO_FREE_P(BS_R_right_magn) YAMBO_FREE_P(BS_R_left_magn) YAMBO_FREE_P(BS_R_PL) @@ -411,10 +462,12 @@ subroutine K_slepc_resize_variables() if(allocated(BS_corrections)) call BSS_resize(BS_corrections) if(associated(BS_E_SOC_corr)) call BSS_resize(BS_E_SOC_corr) ! - if(associated(BS_R_left) ) call BSS_resize(BS_R_left) - if(associated(BS_R_right)) call BSS_resize(BS_R_right) + if(associated(BS_R_left_abs) ) call BSS_resize(BS_R_left_abs) + if(associated(BS_R_right_abs)) call BSS_resize(BS_R_right_abs) ! + if(associated(BS_R_left_kerr) ) call BSS_resize(BS_R_left_kerr) if(associated(BS_R_right_kerr)) call BSS_resize(BS_R_right_kerr) + if(associated(BS_R_right_dich)) call BSS_resize(BS_R_right_dich) if(associated(BS_R_left_magn) ) call BSS_resize(BS_R_left_magn) if(associated(BS_R_right_magn)) call BSS_resize(BS_R_right_magn) if(associated(BS_R_PL) ) call BSS_resize(BS_R_PL) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F new file mode 100644 index 0000000000..7114d920e4 --- /dev/null +++ b/src/bse/K_diago_left_residuals.F @@ -0,0 +1,113 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM MG DS +! +subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) + ! + ! The left eigenvector u(j) of A satisfies + ! u(j)**H * A = lambda(j) * u(j)**H + ! where u(j)**H denotes the conjugate transpose of u(j). + ! + ! Remember: 1/(w-H)= \sum_ij |i right>^{-1) null() + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + if (.not.present(BS_overlap)) scheme="hermitian" + if ( present(BS_overlap)) scheme="non-hermitian" + ! + velocity_correction=(index(mode,"opt")>0).and.(trim(global_gauge)=="velocity") + ! + if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) + if ( BS_K_coupling) res_range=(/1,BS_H_dim/) + ! + allocate(tmp_res(res_range(1):res_range(2))) + n_res=res_range(2)-res_range(1)+1 + ! + if (trim(scheme)=="hermitian") BS_R_tmp => BS_R_left + if (trim(scheme)=="non-hermitian") allocate(BS_R_tmp(BSS_n_eig)) + ! + ! [1] BS_R_tmp(i)= + ! = conjg( BS_V_left(k,i))*BSS_dipoles(k)*R_k + BS_R_tmp=cZERO + ! + call live_timing('EPS L residuals',px%n_of_elements(myid+1)) + ! + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + ! + tmp_res = tmp_res*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) + if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) + if (velocity_correction) tmp_res=tmp_res/BSS_eh_E(res_range(1):res_range(2)) + ! + do i_lambda=1,BSS_n_eig + ! + if (.not.px%element_1D(i_lambda)) cycle + ! + BS_R_tmp(i_lambda)=Vstar_dot_V_omp(n_res,BS_V_left(:,i_lambda),tmp_res) + if (velocity_correction) BS_R_tmp(i_lambda)=BS_R_tmp(i_lambda)*BS_E(i_lambda) + ! + call live_timing(steps=1) + ! + enddo + call PP_redux_wait(BS_R_tmp) + ! + call live_timing() + ! + if (trim(scheme)=="hermitian") return + ! + ! [2] BS_R_left(i)=BS_overlap(i,j)BS_R_tmp(j) + ! + BS_R_left=cZERO + ! + call live_timing('EPS L x overlap',px%n_of_elements(myid+1)) + do i_lambda=1,BSS_n_eig + if (.not.px%element_1D(i_lambda)) cycle + ! + BS_R_left(i_lambda)=V_dot_V_omp(BSS_n_eig,BS_overlap(i_lambda,:),BS_R_tmp) + ! + call live_timing(steps=1) + enddo + call PP_redux_wait(BS_R_left) + call live_timing + ! + call PP_indexes_reset(px) + ! +end subroutine K_diago_left_residuals diff --git a/src/bse/K_diago_overlap_matrix.F b/src/bse/K_diago_overlap_matrix.F new file mode 100644 index 0000000000..d697371978 --- /dev/null +++ b/src/bse/K_diago_overlap_matrix.F @@ -0,0 +1,51 @@ +! +! Copyright (C) 2000-2020 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM, MG, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) + ! + use pars, ONLY:SP,cZERO,cONE + use wrapper_omp, ONLY:M_by_M_omp + use interfaces, ONLY:LINEAR_ALGEBRA_driver + use LIVE_t, ONLY:live_timing + use linear_algebra, ONLY:INV + use BS, ONLY:BS_H_dim + use BS_solvers, ONLY:BSS_n_eig + ! + implicit none + ! + complex(SP),intent(in) :: BS_V_left(BS_H_dim,BSS_n_eig),BS_V_right(BS_H_dim,BSS_n_eig) + complex(SP),intent(out) :: BS_overlap(BSS_n_eig,BSS_n_eig) + ! + ! BS_overlap(i,j)=sum_k conjg(BS_V_left(k,i))*BS_V_right(k,j) + ! + BS_overlap=cZERO + ! + call live_timing('BSK overlap mat',1) + ! + call M_by_M_omp('c','n',BSS_n_eig,BSS_n_eig,BS_H_dim,cONE,BS_V_left,BS_H_dim,BS_V_right,BS_H_dim,cZERO,BS_overlap,BSS_n_eig) + ! + call LINEAR_ALGEBRA_driver(INV,M=BS_overlap) + call live_timing(steps=1) + call live_timing() + ! +end subroutine K_diago_overlap_matrix diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index aa32c2836c..b12c9fcba2 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -5,12 +5,13 @@ ! ! Authors (see AUTHORS file for details): DS AM MG ! -subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) +subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) ! ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] ! - use pars, ONLY:cZERO,cONE,SP,pi + use pars, ONLY:cZERO,cONE,cI,SP,pi + use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Resp_ii,Joint_DOS,BS_E_sorted,& & global_gauge,i_G_shift use electrons, ONLY:n_sp_pol,n_spinor @@ -21,23 +22,23 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS use BS, ONLY:BS_perturbative_SOC,BS_res_ares_n_mat,l_BS_abs,l_BS_jdos,l_BS_esort,& & BS_K_anti_resonant,l_BS_ares_from_res,BS_K_coupling use BS_solvers, ONLY:BSS_n_eig,Co_factor - use R_lattice, ONLY:bare_qpg + use R_lattice, ONLY:bare_qpg,q0_def_norm use units, ONLY:HA2EV use vec_operate, ONLY:degeneration_finder,sort use BS_solvers, ONLY:B_Hall,para_term_w0 - use X_m, ONLY:Resp_ij,X_magnons + use X_m, ONLY:Resp_ij,X_magnons,X_dichroism use PHOTOLUM, ONLY:PL,PL_prefactor - use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_photolum,l_BS_dichroism + use BS, ONLY:l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum,l_BS_dichroism ! implicit none ! type(w_samp),intent(in) :: W integer, intent(in) :: iq,i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) - complex(SP), pointer, intent(in) :: BS_R_left(:),BS_R_right(:) + complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_right_kerr(:) + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) ! ! Work space @@ -48,7 +49,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS real(SP), allocatable :: vtmpR(:) complex(SP), allocatable :: BS_E_sorted_tmp(:,:) integer, allocatable :: sort_indx(:),first_exc(:),n_of_exc(:) - complex(SP) :: g_fac,res_kerr,res_magn(2) + complex(SP) :: g_fac,res_kerr,res_dich,res_magn(2) logical :: l_ADD_the_ARES_using_the_RES ! n_SOC=1 @@ -85,10 +86,17 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if (.not.px%element_1D(i1)) cycle ! if (l_BS_abs) then - res_abs=BS_R_left(i1)*BS_R_right(i1)*ares_fac + res_abs=BS_R_left_abs(i1)*BS_R_right_abs(i1)*ares_fac endif if (l_BS_kerr) then - res_kerr=BS_R_left(i1)*BS_R_right_kerr(i1)*ares_fac + res_kerr=BS_R_left_abs(i1)*BS_R_right_kerr(i1)*ares_fac + if(l_BS_kerr_asymm) then + res_kerr=(BS_R_left_abs(i1)*BS_R_right_kerr(i1)-BS_R_left_kerr(i1)*BS_R_right_abs(i1))*ares_fac/2._SP + endif + endif + if(l_BS_dichroism) then + res_dich=(BS_R_left_abs(i1)*BS_R_right_dich(i1,1)+BS_R_left_kerr(i1)*BS_R_right_dich(i1,2)) + res_dich=res_dich*ares_fac/q0_def_norm/2._SP endif if(l_BS_magnons) res_magn(:)=BS_R_left_magn(:,i1)*BS_R_right_magn(:,i1)*ares_fac ! @@ -135,6 +143,18 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS endif B_Hall(2)=B_Hall(2)+res_kerr*g_fac endif + ! + if(l_BS_dichroism) then + if(l_BS_esort.and.i_BS_mat==1) then + BS_E_sorted_tmp(i1,nVAR+1:nVAR+1)=res_dich + nVAR=nVAR+1 + endif + X_dichroism(:,2)=X_dichroism(:,2)-res_dich/(W%p(:)-EXC_E(i_pert_SOC)) + if (l_ADD_the_ARES_using_the_RES) then + X_dichroism(:,2)=X_dichroism(:,2)+conjg(res_dich)/(W%p(:)+conjg(EXC_E(i_pert_SOC))) + endif + endif + ! if(l_BS_magnons) then if(l_BS_esort.and.i_BS_mat==1) then BS_E_sorted_tmp(i1,nVAR+1:nVAR+n_spinor)=res_magn(:n_spinor) @@ -147,6 +167,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS X_magnons(:,2,2)=X_magnons(:,2,2)+conjg(res_magn(1))/(W%p(:)+conjg(EXC_E(i_pert_SOC))) endif endif + ! if(l_BS_photolum) then PL(:,2)=PL(:,2)+PL_prefactor*ares_fac*BS_R_PL(1,i1)*aimag(-1._SP/(W%p(:)-EXC_E(i_pert_SOC)))/pi if (l_ADD_the_ARES_using_the_RES) then @@ -213,6 +234,10 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS call PP_redux_wait(B_Hall(2)) endif ! + if(l_BS_dichroism) then + call PP_redux_wait(X_dichroism(:,2)) + endif + ! if(l_BS_magnons) then call PP_redux_wait(X_magnons(:,:,2)) endif @@ -233,6 +258,9 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS if (BS_K_anti_resonant.and..not.BS_K_coupling) B_Hall(2)=B_Hall(2)-conjg(B_Hall(2)) endif ! + ! Factors to be fixed + if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*(cI/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) + ! if (l_BS_magnons) X_magnons(:,:,2)=X_magnons(:,:,2)*Co_factor/(4._SP*pi) ! end subroutine K_diago_response_functions diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F new file mode 100644 index 0000000000..5f97a86f71 --- /dev/null +++ b/src/bse/K_diago_right_residuals.F @@ -0,0 +1,79 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2022 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) + ! + ! BS_R_right_XX(i)= + ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) + ! + use pars, ONLY:SP,cZERO,cI + use wrapper_omp, ONLY:V_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use X_m, ONLY:global_gauge + use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_n_eig,BSS_dipoles_opt + use BS, ONLY:BS_K_dim,BS_H_dim,BS_K_coupling + use MAGNONS, ONLY:BSS_dipoles_magn + use DICHROISM, ONLY:BSS_dipoles_dich + ! + implicit none + ! + character(*),intent(in) :: mode + integer, intent(in) :: i_BS_mat + complex(SP), intent(in) :: BS_E(BSS_n_eig) + complex(SP), intent(out) :: BS_R_right(BSS_n_eig) + complex(SP), intent(in) :: BS_V_right(:,:) + ! + ! Workspace + ! + type(PP_indexes) ::px + integer ::i_lambda,n_res,res_range(2) + logical ::velocity_correction + ! + complex(SP),allocatable :: tmp_res(:) + ! + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BSS_n_eig/)) + ! + BS_R_right=cZERO + velocity_correction=(index(mode,"opt")>0).and.(trim(global_gauge)=="velocity") + ! + if (.not.BS_K_coupling) res_range=(/1,BS_K_dim(i_BS_mat)/)+BS_K_dim(1)*(i_BS_mat-1) + if ( BS_K_coupling) res_range=(/1,BS_H_dim/) + ! + allocate(tmp_res(res_range(1):res_range(2))) + n_res=res_range(2)-res_range(1)+1 + ! + call live_timing(trim(mode)//' residuals ',px%n_of_elements(myid+1)) + ! + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + ! + tmp_res = conjg(tmp_res)*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) + if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) + if (velocity_correction) tmp_res=tmp_res/BSS_eh_E(res_range(1):res_range(2)) + ! + do i_lambda=1,BSS_n_eig + if (.not.px%element_1D(i_lambda)) cycle + ! + BS_R_right(i_lambda)=V_dot_V_omp(n_res,tmp_res,BS_V_right(:,i_lambda)) + if (velocity_correction) BS_R_right(i_lambda)=BS_R_right(i_lambda)*BS_E(i_lambda) + ! + call live_timing(steps=1) + enddo + call PP_redux_wait(BS_R_right) + call live_timing + ! + call PP_indexes_reset(px) + deallocate(tmp_res) + ! +end subroutine K_diago_right_residuals diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 6eebdb43fb..0e47c08552 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -13,13 +13,14 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) use vec_operate, ONLY:v_norm use R_lattice, ONLY:bz_samp,q0_def_norm,qindx_X use stderr, ONLY:intc + use com, ONLY:msg use wave_func, ONLY:WF use stderr, ONLY:STRING_match use interfaces, ONLY:WF_load,WF_free use electrons, ONLY:levels,spin use X_m, ONLY:X_t,global_gauge,i_G_shift use DIPOLES, ONLY:DIPOLE_t,DIP_alloc,DIP_rotated - use BS_solvers, ONLY:BSS_Vnl_included + use BS_solvers, ONLY:BSS_Vnl_included,BSS_Q_dir,BSS_E_dir,BSS_P_dir use BS, ONLY:BS_T_grp,BS_K_coupling,BS_nT_grps,BSE_L_kind,BS_bands,& & BS_dip_size,l_BS_trace,BS_n_eh_spaces,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& @@ -29,7 +30,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) & PAR_COM_Xk_ibz_INDEX use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use timing_m, ONLY:timing - use vec_operate, ONLY:v_rotate + use vec_operate, ONLY:v_rotate,cross_product ! #include ! @@ -43,6 +44,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! ! Work space ! + logical ::geometry_ok integer ::ik_bz,ok_bz,ik,ok,isymm,osymm,iGo,iv,ic,i_sp_pol_c,i_sp_pol_v,i_T_g,i_T,& & io_err,i_res_ares,i_dip complex(SP) ::DIP_Splus,DIP_Smins,DIP_projected(BS_dip_size),DIP_expanded(3) @@ -78,18 +80,35 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! if (iq==1.and.i_G_shift==1) then ! - ! Directions for the external field + BSS_P_dir=cross_product(BSS_Q_dir,BSS_E_dir) + ! + if (trim(BSE_dipole_geometry)/='none'.and.l_BS_kerr) then + BSS_P_dir=0._SP + call v_rotate(trim(BSE_dipole_geometry),-pi/2._SP,BSS_E_dir,v_out=BSS_P_dir) + geometry_ok=abs(v_norm(BSS_P_dir)-1._SP)<1.E-5_SP .and. & + & abs(dot_product(BSS_E_dir,BSS_P_dir))<1.E-5_SP + if ( .not. geometry_ok) call error(" Field direction and BSEdips do not agree") + call msg("r"," BSEdips set in input. This imposes the propagation direction") + BSS_Q_dir=-cross_product(BSS_E_dir,BSS_P_dir) + endif ! - BS_field_direction(:,1)=Dip%q0/v_norm(Dip%q0) + geometry_ok=abs(dot_product(BSS_E_dir,BSS_Q_dir))<1.E-5_SP ! - if (l_BS_trace) then - BS_field_direction(:,1)=(/1._SP,0._SP,0._SP/) - BS_field_direction(:,2)=(/0._SP,1._SP,0._SP/) - BS_field_direction(:,3)=(/0._SP,0._SP,1._SP/) - else if (trim(BSE_dipole_geometry)/='none'.and.l_BS_kerr) then - call v_rotate(trim(BSE_dipole_geometry),-pi/2._SP,BS_field_direction(:,1),v_out=BS_field_direction(:,2)) + if ( l_BS_trace .and. .not. geometry_ok ) then + call warning(" Propagation direction not ortogonal to field polarization") + call warning(" Setting z for propagation and x-y for polarization") + BSS_E_dir=(/1._SP,0._SP,0._SP/) + BSS_P_dir=(/0._SP,1._SP,0._SP/) + BSS_Q_dir=(/0._SP,0._SP,1._SP/) + if (trim(BSE_dipole_geometry)/='none'.and.l_BS_kerr) BSE_dipole_geometry="xy" endif ! + ! Directions for the external field + ! + BS_field_direction(:,1)=BSS_E_dir ! external field + BS_field_direction(:,2)=BSS_P_dir ! induced polarization + BS_field_direction(:,3)=BSS_Q_dir ! field propagation direction + ! endif ! call live_timing('BSE dipoles',PAR_BS_nT_col_grps) diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 6197ecea5a..bb72bcc64a 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -16,15 +16,17 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use DIPOLES, ONLY:DIPOLE_t use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,REP - use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_uses_DbGd + use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,BSS_uses_DbGd,& +& BSS_Q_dir,BSS_E_dir use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_cpl_K_corr,& -& BS_Blocks_and_Transitions_free,BSqpts,BS_kpt_bz,BS_kpt_ibz +& BS_Blocks_and_Transitions_free,BSqpts,BS_kpt_bz,BS_kpt_ibz,O_ng use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded use drivers, ONLY:l_rpa_IP,l_bs_fxc,l_bss use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme,PARALLEL_default_mode use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:eval_G_minus_G - use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free + use vec_operate, ONLY:v_norm + use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free,G_m_G_maxval,q0_def_norm ! #include ! @@ -37,7 +39,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! Work Space ! type(X_t) :: X_tddft,X_oscillators - integer :: iq,Max_G_m_G,iG_BSE,iGo_BSE + integer :: iq,Max_G_m_G,iG_BSE,iGo_BSE,VB(2),CB(2) type(w_samp) :: W_bss ! ! I/O @@ -57,6 +59,12 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) !========================= call K_driver_init("init",1,Ken,Xk) ! + ! q0 renormalization and field direction + ! + BSS_E_dir(:) = BSS_E_dir(:)/v_norm(BSS_E_dir) + BSS_Q_dir(:) = BSS_Q_dir(:)/v_norm(BSS_Q_dir) + BSS_q0(:) = BSS_E_dir(:)*q0_def_norm + ! ! Energy points !=============== call W_reset(W_bss) @@ -154,25 +162,14 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! W/X RL size setup looking at the max index of G-G' ! ========= ! - iGo_BSE=qindx_B_max iG_BSE =BS_n_g_W - if (.not.iq==1) then - iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) - iG_BSE =max(BS_n_g_exch,BS_n_g_W) - !iGo_BSE=4*maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) - !iG_BSE =maxval((/BS_n_g_exch,BS_n_g_W,qindx_B_max/)) - endif + iGo_BSE=qindx_B_max + ! This needs be changed in case i_gW is redefined vi G_m_G + !if (.not.iq==1) iGo_BSE=maxval((/4*qindx_B_max,qindx_X(iq,:,2)/)) ! + ! This is the size of the first dimension of the G_m_G table Max_G_m_G=eval_G_minus_G(iG_BSE,iGo_BSE) - ! - if (.not.iq==1) then - if (BS_n_g_exch> Max_G_m_G ) then - call warning (' Exch size reduced from '//trim(intc(BS_n_g_exch))//' to '& -& //trim(intc(Max_G_m_G))//' due to symmetry constraints') - BS_n_g_exch= Max_G_m_G - call msg('s','[BSE-exch] Exch size forced by symmetry to be ',BS_n_g_exch) - endif - endif + O_ng=G_m_G_maxval ! if (BS_n_g_W> Max_G_m_G ) then call warning (' W size reduced from '//trim(intc(BS_n_g_W))//' to '& @@ -186,20 +183,20 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) call DIPOLE_dimensions(Ken,Dip,BS_bands,BSS_q0) ! ! ... EH space (no parallelization) - call K_Transitions_setup("K",iq,Ken,Xk,Dip) + call K_Transitions_dimensions(iq,Ken,Xk,Dip,VB,CB) ! !... Parallel distribution call PARALLEL_global_Response_T_transitions(Xk) ! ! ... EH space (with parallelization) and Transition groups build-up - call K_Transitions_setup("T",iq,Ken,Xk,Dip) + call K_Transitions_setup(iq,Ken,Xk,Dip,VB,CB) ! !... Blocks build-up if (.not.l_rpa_IP) call K_blocks() ! ! Wave Functions distribution !============================= - call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=.FALSE.) + call PARALLEL_WF_distribute(B_and_K_index=PAR_IND_WF_b_and_k,CLEAN_UP=iq==BS_q(1)) call PARALLEL_WF_index( ) ! ! 0. The Dipoles @@ -212,7 +209,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! ! 2. The KERNEL ! ================ - if (.not.l_rpa_IP) call K(iq,Ken,Xk,q,X_static_pp,Xw,W_bss) + if (.not.l_rpa_IP) call K_kernel(iq,Ken,Xk,q,X_static_pp,Xw,W_bss) ! ! 3. The SOLVER ! ================= diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 831f61826e..24f8519ad7 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -8,7 +8,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels,n_sp_pol,n_spinor + use electrons, ONLY:levels,n_sp_pol,n_spinor,n_spin use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode use stderr, ONLY:STRING_match @@ -19,12 +19,15 @@ subroutine K_driver_init(what,iq,Ken,Xk) & BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,l_BSE_kernel_full,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& & BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant - use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr + use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr,l_Fxc_from_Vxc use drivers, ONLY:l_col_cut,l_rpa_IP,l_alda_fxc,l_bs_fxc use D_lattice, ONLY:i_time_rev,i_space_inv,l_3D #if defined _RT use drivers, ONLY:l_rt_carriers_in_use use RT_control, ONLY:NEQ_Kernel,EQ_Transitions,EQ_NoOcc,ALL_NoOcc,NEQ_Residuals,RT_BSE_Occ_Mode +#endif +#if defined _CUDA + use TDDFT, ONLY:FXC_mode #endif ! implicit none @@ -36,7 +39,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! ! Work Space ! - logical :: l_flag,l_slepc_special + logical :: l_flag,l_slepc_special,l_Fxc_Libxc ! ! Defaults !========== @@ -167,6 +170,16 @@ subroutine K_driver_init(what,iq,Ken,Xk) & call error('set Lkind = DEFAULT or BAR or FULL') ! BS_K_is_ALDA=l_alda_fxc + if (l_alda_fxc) then + call parser('FxcLibxc',l_Fxc_Libxc) + l_Fxc_from_Vxc=(n_spin==1).and..not.l_Fxc_Libxc + endif +#if defined _CUDA + if ( BS_K_is_alda.and. index(FXC_mode,"G-")>0 ) then + call warning(" Tddft with G-integrals is not GPU ported. Fallback to R-integrals") + FXC_mode="R-def" + endif +#endif BS_dip_size=1 ! ! Memory saving diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index 3933c53ba8..c24cc5c5dd 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -5,12 +5,14 @@ ! ! Authors (see AUTHORS file for details): AM ! -subroutine K_exchange_collisions(iq,Xk,i_T_grp) +subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! use pars, ONLY:SP,cZERO use D_lattice, ONLY:nsym,i_time_rev,sop_inv,sop_inv_d - use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_oscillators_alloc,BS_n_g_exch,& -& BSE_L_kind,l_BS_magnons + use BS, ONLY:BS_T_grp,K_EXCH_collision,BS_n_g_exch,& +& BSE_L_kind,l_BS_magnons,l_BSE_minimize_memory,BS_bands + use interfaces, ONLY:WF_load,WF_free + use wave_func, ONLY:WF use R_lattice, ONLY:g_rot,g_rot_d,qindx_X,bz_samp use stderr, ONLY:STRING_match use electrons, ONLY:n_sp_pol @@ -24,34 +26,30 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) implicit none ! type(bz_samp),intent(in) :: Xk - integer, intent(in) :: iq,i_T_grp + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_exch_wf_in_loop ! ! Work Space ! + logical :: l_load_WFs + integer :: NK(2) integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_el_last_with_identity_sym,i_T_grp_last_with_identity_sym,i_T_grp_p #ifdef _CUDA complex(SP), pointer, device :: O_x_d(:,:),O_x_sym_d(:,:) #endif - ! - ! Oscillators already done ? - ! - if (allocated( BS_T_grp(i_T_grp)%O_x )) return - ! - if (l_BS_magnons.and.n_sp_pol==2) return ! call timing('T_space EXX Osc.',OPR='start') ! ! Allocate ! call elemental_collision_free(K_EXCH_collision) - call BS_oscillators_alloc(.TRUE.,i_T_grp,.FALSE.,0) ! #if defined(__NOTNOW) && ! defined(_CUDA) !$omp parallel default(shared), private( K_EXCH_collision, & !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & !$omp & i_T_grp_last_with_identity_sym, i_T_el_last_with_identity_sym, & - !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2) + !$omp & i_T_grp_p, N_T_el_p, i_T_el_p, i_g1, i_g2, NK) #endif ! call OPENMP_update(master_thread) @@ -61,6 +59,7 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) #if defined(__NOTNOW) && ! defined(_CUDA) !$omp do schedule(dynamic) #endif + NK=-1 T_loop: do i_T_el=1,BS_T_grp(i_T_grp)%size ! i_k_bz=BS_T_grp(i_T_grp)%table(i_T_el,1) @@ -82,6 +81,20 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) K_EXCH_collision%os=(/i_v,i_p,i_sp,i_sp_v/) K_EXCH_collision%qs=(/i_g_p,iq,1/) ! + l_load_WFs= l_bs_exch_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + endif + ! if (iq==1) then ! ! G==0 term @@ -173,6 +186,8 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp) #if defined(__NOTNOW) && ! defined(_CUDA) !$omp end parallel #endif + ! + if(l_bs_exch_wf_in_loop) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) ! call timing('T_space EXX Osc.',OPR='stop') ! diff --git a/src/bse/K.F b/src/bse/K_kernel.F similarity index 70% rename from src/bse/K.F rename to src/bse/K_kernel.F index 0fcf79c40a..4a244649f2 100644 --- a/src/bse/K.F +++ b/src/bse/K_kernel.F @@ -5,47 +5,47 @@ ! ! Authors (see AUTHORS file for details): AM DS AF ! -subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) +subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! - ! K = <2V-W> for n_spin=1 + ! K = <2V-W> for n_spin=1; K= for n_spin>1 ! use pars, ONLY:SP,schlen,pi,cZERO,cI - use stderr, ONLY:intc use LOGO, ONLY:pickup_a_random use drivers, ONLY:l_bs_fxc,l_tddft,l_rim_w use frequency, ONLY:w_samp - use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor + use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_sp_pol use FFT_m, ONLY:fft_size use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G,TDDFT_ALDA_eh_space_R_kernel use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab - use R_lattice, ONLY:G_m_G,qindx_B,bz_samp,RIM_W,& -& qindx_X,qindx_B_max,qindx_B_load,& + use R_lattice, ONLY:qindx_X,bz_samp,& +& qindx_B,qindx_B_max,qindx_B_load,RIM_W,& & RIM_ng,RIM_W_is_diagonal,RIM_W_ng use com, ONLY:msg use stderr, ONLY:intc use LIVE_t, ONLY:live_timing use X_m, ONLY:X_t + use interfaces, ONLY:el_density_and_current use QP_m, ONLY:QP_ng_Vxc use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,& -& BS_res_K_exchange,BS_Block_size,l_BSE_kernel_full,& +& BS_res_K_exchange,BS_Block_size,l_BSE_kernel_full,BS_n_g_W,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& & BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& -& BS_oscillators_free,WF_phase,n_BS_blks,BS_blk,BS_T_grp,& +& WF_phase,n_BS_blks,BS_blk,BS_T_grp,& & BS_nT_grps,BS_blks_free,l_BS_ares_from_res,& & l_BSE_minimize_memory,l_BSE_restart,l_BSE_kernel_complete,& -& BS_perturbative_SOC,BS_K_cutoff,BS_max_val +& BS_perturbative_SOC,BS_K_cutoff,BS_max_val,l_BS_magnons use collision_el, ONLY:elemental_collision_free use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR,RD,WR_CL,OP_APP,deliver_IO_error_message,WR use TDDFT, ONLY:FXC_K_diagonal,F_xc_gspace,FXC_n_g_corr,io_BS_Fxc, & -& FXC_mode,tddft_wf_t +& FXC_mode,tddft_wf_t,l_Fxc_from_Vxc use xc_functionals,ONLY:V_xc,F_xc,F_xc_mat,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind,WF_exx_fraction use wave_func, ONLY:WF use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing - use parallel_m, ONLY:myid,ncpu,PAR_K_scheme + use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,PARALLEL_default_mode,master_cpu use parallel_int, ONLY:PP_redux_wait use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free @@ -78,20 +78,19 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) integer :: i_k_bz_last,i_p_bz_last,i_pmq_bz_last,i_kmq_bz_last, & & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last ! - integer :: i_block,O_ng_shift,NG,& + integer :: i_block,O_ng_shift,O_ng_exch,O_ng_tddft,iHxc,NG(2),NK(2),& & ig_kmq,ig_pmq,ig_W_mq,iq_W_bz_mq,iq_W_mq,iq_W_s_mq,& & bands_to_load(2),is_k(4),os_k(4),is_p(4),os_p(4) - complex(SP):: Co,H_x,H_c + complex(SP):: Co,H_x,H_c,BS_mat_tmp complex(SP):: sqrt_f_itk,sqrt_f_itp - real(SP), allocatable :: BS_max_val_CPU(:) + real(SP), allocatable :: BS_max_val_CPU(:),rho(:) ! complex(SP), external ::K_correlation_kernel_std,K_correlation_kernel_dir complex(SP), external ::TDDFT_ALDA_eh_space_G_kernel complex(SP), external ::K_exchange_kernel_resonant,K_exchange_kernel_coupling ! - ! Oscillators - ! - logical :: load_O_X,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum + logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,& + & l_load_kernel,l_write_kernel,l_skip_phases,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum ! ! I/O ! @@ -149,51 +148,57 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! call section('=',trim(section_title)) ! - ! Exchange - !========== - ! - load_O_X=BS_res_K_exchange.or.l_bs_fxc + l_bs_exch=(any((/BS_res_K_exchange,BS_cpl_K_exchange/)).or.l_bs_fxc).and..not.(l_BS_magnons.and.n_sp_pol==2) + l_bs_corr=(any((/BS_res_K_corr,BS_cpl_K_corr/)) .and. .not.l_bs_fxc) ! - if (load_O_X) call msg('r','[BSE] Exchange components ',BS_n_g_exch) + ! Oscillators Setup + !=================== ! - if (iq/=1 .and. n_spinor==2 .and. nsym>1) then - ! Default is direct algorithm, unless imposed from input - call parser('ImposeStdAlg',l_std_alg) - l_dir_alg=.not.l_std_alg - else - ! Default is standard algorithm, unless imposed from input - call parser('ImposeDirAlg',l_dir_alg) - l_std_alg=.not.l_dir_alg + if (l_bs_exch) then + O_ng_exch =maxval(qindx_X(iq,:,2)) + ! I load the WFs for exachange in a loop in two cases + ! - q=0 and more than one k-point. + ! In this case it is the default, unless I specify workload in the parallel mode + ! - q/=0 + ! In this case it is activated only if I specify KQmemory in the parallel mode + ! The code would work fine also in this case, however it would require continuous loading and unloading of WFs. + ! To avoid this one would need to move the loop over i_star in K_Transitions_setup outside the + ! loop over ic and iv (see related comment in K_Transiontion_setup.F) + l_bs_exch_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and..not.trim(PARALLEL_default_mode)=="workload") .or. & + & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory") + call msg('r','[BSE] Exchange components ',BS_n_g_exch) endif ! - l_tddft_gsum=.false. - l_tddft_rsum=.false. if (BS_K_is_ALDA) then + O_ng_tddft =maxval(qindx_X(iq,:,2)) l_tddft_gsum=(index(FXC_mode,"G-")>0) l_tddft_rsum=(index(FXC_mode,"R-")>0) if( .not.(l_tddft_gsum.or.l_tddft_rsum) ) call error("Wrong FXC_mode:"//trim(FXC_mode)) + if(index(FXC_mode,"cut_GmGp")>0) then + FXC_n_g_corr=BS_n_g_fxc + if (BS_n_g_fxc/= eval_G_minus_G(BS_n_g_fxc,0) ) then + BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) + call msg('s','[TDDFT] Fxc cutoff is forced by symmetry to be ',BS_n_g_fxc) + endif + endif + l_bs_tddft_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and.(.not.trim(PARALLEL_default_mode)=="workload") ) .or. & + & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory" ) + call msg('r','[BSE] ALDA components ',BS_n_g_fxc) endif ! - ! Oscillators Setup - !=================== - O_ng=1 - O_ng_shift=maxval(qindx_X(iq,:,2)) - ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) then - O_ng=maxval(G_m_G) - call fft_check_size(1,O_ng,BS_n_g_exch,"Kx") - ! Hybrid functional. - ! The cutoff on the non-hybrid part, BS_n_g_fxc, need to be lowered - if (BS_K_is_ALDA) call fft_check_size(1,O_ng,BS_n_g_fxc,"Kx") - if(iq/=1) O_ng_shift=max(qindx_B_max,O_ng_shift) - endif - ! - if(BS_K_is_ALDA.and.index(FXC_mode,"cut_GmGp")>0) then - FXC_n_g_corr=BS_n_g_fxc - if (BS_n_g_fxc/= eval_G_minus_G(BS_n_g_fxc,0) ) then - BS_n_g_fxc = eval_G_minus_G(BS_n_g_fxc,0) - call msg('s','[TDDFT] ALDA Fxc cutoff is forced by symmetry to be ',BS_n_g_fxc) + if (l_bs_corr) then + O_ng_shift=qindx_B_max + if (iq/=1 .and. n_spinor==2 .and. nsym>1) then + ! Default is direct algorithm, unless imposed from input + call parser('ImposeStdAlg',l_std_alg) + l_dir_alg=.not.l_std_alg + else + ! Default is standard algorithm, unless imposed from input + call parser('ImposeDirAlg',l_dir_alg) + l_std_alg=.not.l_dir_alg endif + call parser('SkipPhases',l_skip_phases) + call msg('r','[BSE] Correlation components ',(/BS_n_g_W,O_ng/)) endif ! call K_restart(iq,X,ID_head,ID,ID_compr,l_partial_kernel_loaded) @@ -201,7 +206,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) if( l_BSE_kernel_complete ) return ! io_QINDX_err=0 - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag) + if (l_bs_corr) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag) if(io_QINDX_err/=0) call error('Error reading qindx_B database ') ! ! Screened interaction @@ -213,7 +218,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) if (l_rim_w) call QP_interpolate_W(X,Xw,q,'BSE') ! io_X_err=0 - if (BS_res_K_corr) call K_screened_interaction(X,Xw,q,io_X_err) + if (l_bs_corr) call K_screened_interaction(X,Xw,q,io_X_err) ! if (io_X_err<0) then call deliver_IO_error_message(io_X_err,'PP/Em1s') @@ -249,30 +254,66 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - ! Wave Functions - !================ - bands_to_load=BS_bands - if (BS_K_is_ALDA) bands_to_load=(/1,BS_bands(2)/) + ! DB identifier + !=============== + BS_identifier=pickup_a_random(10000._SP) ! - section_title='-BSK' - if (l_bs_fxc) section_title='-BSK->Fxc' + ! BS DB description section I/O + !=============================== ! - NG=max(O_ng,BS_n_g_exch) - if (BS_K_is_ALDA) NG=max(NG,BS_n_g_fxc) + call section('=','Main kernel loop') ! - call WF_load(WF,NG,O_ng_shift,bands_to_load,(/1,Xk%nibz/),space='R',title=trim(section_title)) + if(BS_K_cutoff>0._SP) then + YAMBO_ALLOC(BS_max_val_CPU,(ncpu)) + BS_max_val_CPU=0._SP + endif + ! +#if defined _PAR_IO + ! + call io_control(ACTION=OP_APP,COM=REP,ID=ID_head) + io_BS_err=io_BS_header(iq,X,ID_head,"full") + ! + call io_control(ACTION=OP_APP,COM=REP,ID=ID,DO_IT=.TRUE.) + io_BS_err=io_BS_PAR_init(iq,ID,"full") + ! +#else + call io_control(ACTION=OP_WR,COM=REP,SEC=(/1/),ID=ID) + io_BS_err=io_BS(iq,X,ID) +#endif + ! + ! This loop is on the exchange and correlation of the BSE + ! iHxc=1 --> K_H=v + ! iHxc=2 --> K_TDDFT=fxc + ! iHxc=3 --> K_c=W + ! + l_matrix_init=.true. + l_load_kernel=.true. + l_write_kernel=.false. + ! + BS_blk_done=.false. + ! + do iHxc=1,3 + ! + if ((.not.l_bs_exch).and.iHxc==1) cycle ! - ! Wave Functions Phases - !======================= - if(l_std_alg) call K_WF_phases(Xk) - ! - ! Spatial Inversion Test - !======================== - call WF_spatial_inversion(Ken,Xk) + if ((.not.BS_K_is_ALDA).and.iHxc==2) cycle + ! + if ((.not.l_bs_corr).and.iHxc==3) cycle + ! + section_title='-BSK-'//trim(intc(iHxc)) + if (l_bs_fxc) section_title='-BSK->Fxc-'//trim(intc(iHxc)) + ! + if (iHxc==1) NG=(/BS_n_g_exch,O_ng_exch/) + if (iHxc==2) NG=(/BS_n_g_fxc ,O_ng_tddft/) + if (iHxc==3) NG=(/O_ng ,O_ng_shift/) ! ! ALDA !====== - if (BS_K_is_ALDA) then + if (iHxc==2) then + ! + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) + ! + QP_ng_Vxc=BS_n_g_fxc ! if (l_tddft_rsum) then YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) @@ -280,13 +321,16 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) else if (l_tddft_gsum) then YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) endif + ! YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - YAMBO_ALLOC(V_xc,(fft_size,n_spin)) - V_xc=0._SP - QP_ng_Vxc=BS_n_g_fxc + if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP + endif + ! if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) endif @@ -294,40 +338,18 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) YAMBO_FREE(F_xc) - YAMBO_FREE(V_xc) + if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then + YAMBO_FREE(V_xc) + endif if(n_spin>1) then YAMBO_FREE(magn) endif + ! call TDDFT_ALDA_lower_cutoff(FXC_mode) ! + call WF_free(WF,keep_states_to_load=.true.) + ! endif - ! - ! DB identifier - !=============== - BS_identifier=pickup_a_random(10000._SP) - ! - ! BS DB description section I/O - !=============================== - ! - call section('=','Main kernel loop') - ! - if(BS_K_cutoff>0._SP) then - YAMBO_ALLOC(BS_max_val_CPU,(ncpu)) - BS_max_val_CPU=0._SP - endif - ! -#if defined _PAR_IO - ! - call io_control(ACTION=OP_APP,COM=REP,ID=ID_head) - io_BS_err=io_BS_header(iq,X,ID_head,"full") - ! - call io_control(ACTION=OP_APP,COM=REP,ID=ID,DO_IT=.TRUE.) - io_BS_err=io_BS_PAR_init(iq,ID,"full") - ! -#else - call io_control(ACTION=OP_WR,COM=REP,SEC=(/1/),ID=ID) - io_BS_err=io_BS(iq,X,ID) -#endif ! ! Timing !======== @@ -340,10 +362,8 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! First load previously computed matrix elements. !================================================= ! - BS_blk_done=.false. - ! #ifdef _PAR_IO - if (l_BSE_restart) then + if (l_BSE_restart.and.l_load_kernel) then ! if (m_steps>0) call live_timing("Loading partial kernel",m_steps) ! @@ -380,16 +400,42 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! enddo ! - call live_timing() + if (m_steps>0) call live_timing() ! call msg("s","Kernel loaded percentual ",real(n_steps-m_steps,SP)/real(n_steps,SP)*100._SP,'[%]') ! + l_load_kernel=.false. + ! endif #endif + ! + if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_tddft_wf_in_loop.and.l_tddft_gsum)) then + ! DS this is used only for iq==1 + call fft_setup(NG(1),NG(2),.true.) + else + ! + call WF_load(WF,NG(1),NG(2),BS_bands,(/1,Xk%nibz/),space='R',& + & title=trim(section_title),keep_states_to_load=.true.) + ! + ! Wave Functions Phases + !======================= + if (iHxc==3.and.l_std_alg) then + call K_WF_phases(Xk) + if (l_skip_phases) then + WF_phase=-99._SP + call msg('r','[BSE] WF phases ignored as imposed in input') + endif + endif + ! + endif ! if (.not.l_bs_fxc) section_title='Kernel' if ( l_bs_fxc) section_title='Kernel->Fxc' ! + if (iHxc==1) section_title=trim(section_title)//' exch' + if (iHxc==2) section_title=trim(section_title)//' tddft' + if (iHxc==3) section_title=trim(section_title)//' corr' + ! if (m_steps>0) call live_timing(trim(section_title),m_steps) ! !------------------ @@ -398,10 +444,17 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! block_loop:& do i_block=1,n_BS_blks + ! + mode_now=BS_blk(i_block)%mode + if (.not.l_BS_ares_from_res) mode_now="F" + ! + if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) + if (iHxc==2) l_write_kernel=.not. l_bs_corr + if (iHxc==3) l_write_kernel=.true. ! if (BS_blk_done(i_block)) then #if defined _PAR_IO - if(l_partial_kernel_loaded) then + if(l_partial_kernel_loaded.and.l_write_kernel) then call io_control(ACTION=WR,ID=ID) call io_BS_PAR_block(iq,i_block,ID,"full") endif @@ -414,6 +467,13 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) if (BS_LiveTiming_steps>= 0) i_steps=BS_Block_size(i_block) if (BS_LiveTiming_steps==-1) i_steps=1 ! + ! Nothing to do, just write the kernel to disk + if (trim(BS_blk(i_block)%mode)=="C" .and. iHxc==3 .and. .not.BS_cpl_K_corr) then + BS_blk(i_block)%done(:,:)="t" + if(BS_K_cutoff>0._SP) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) + goto 100 + endif + ! i_Tgrp_k =BS_blk(i_block)%iT_k i_Tgrp_p =BS_blk(i_block)%iT_p i_Tgrp_k_st=BS_blk(i_block)%iT_k_st @@ -421,33 +481,40 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) i_k =BS_blk(i_block)%ik i_p =BS_blk(i_block)%ip ! - mode_now=BS_blk(i_block)%mode - if (.not.l_BS_ares_from_res) mode_now="F" - ! ! Exchange oscillators !---------------------- - ! - call K_exchange_collisions(iq,Xk,i_Tgrp_k) - ! - if (i_Tgrp_k/=i_Tgrp_p) call K_exchange_collisions(iq,Xk,i_Tgrp_p) + if(iHxc==1) then + if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_x) ) then + call BS_exchange_oscillators_alloc(i_Tgrp_k) + call K_exchange_collisions(iq,Xk,i_Tgrp_k,NG,l_bs_exch_wf_in_loop) + endif + if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_x) ) then + call BS_exchange_oscillators_alloc(i_Tgrp_p) + call K_exchange_collisions(iq,Xk,i_Tgrp_p,NG,l_bs_exch_wf_in_loop) + endif + endif ! ! TDDFT oscillators !---------------------- - if(BS_K_is_ALDA.and.l_tddft_gsum) then + if(iHxc==2 .and. l_tddft_gsum) then if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_L) ) then call TDDFT_oscillators_alloc_L(i_Tgrp_k) - call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,tddft_wf,mode_now) + call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) endif if (.not.allocated( BS_T_grp(i_Tgrp_p)%O_tddft_R) ) then call TDDFT_oscillators_alloc_R(i_Tgrp_p) - call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,tddft_wf,mode_now) + call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) endif endif ! ! Correlation oscillators !---------------------- - if (l_std_alg) call K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) - if (l_dir_alg) call K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) + if(iHxc==3) then + if (l_std_alg) call K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) + if (l_dir_alg) call K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) + endif + ! + call timing('X T_space Kernel sum',OPR='start') ! ! Transition Loops !------------------ @@ -458,11 +525,11 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !$omp & sqrt_f_itk,i_k_bz,i_v_k,i_c_k,i_k_sp_pol_c,i_k_sp_pol_v,i_k_s,is_k,os_k,i_k_s_m1,H_pos, & !$omp & sqrt_f_itp,i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v,i_p_s,is_p,os_p,i_kp_s, & !$omp & i_kmq_bz,ig_kmq,i_kmq,i_kmq_s,i_kmq_t,i_kmq_s_m1,i_kp_mq_s, & - !$omp & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t, & + !$omp & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t,ig_W_final, & !$omp & ig_W,iq_W,iq_W_s,iq_W_bz,iq_W_bz_mq,ig_W_mq,iq_W_mq,iq_W_s_mq,H_x,H_c, & !$omp & i_p_bz_last,i_k_bz_last,i_pmq_bz_last,i_kmq_bz_last, & !$omp & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last, & - !$omp & i_k_bz_mem,i_kmq_bz_mem,qindx_tmp,tddft_wf ) + !$omp & i_k_bz_mem,i_kmq_bz_mem,qindx_tmp,BS_mat_tmp,tddft_wf ) #endif ! call OPENMP_update(master_thread) @@ -508,16 +575,13 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) i_kmq_bz=qindx_X(iq,i_k_bz,1) i_pmq_bz=qindx_X(iq,i_p_bz,1) ! - ig_kmq = qindx_X(iq,i_k_bz,2) - ig_pmq = qindx_X(iq,i_p_bz,2) - ! i_kmq =Xk%sstar(i_kmq_bz,1) i_pmq =Xk%sstar(i_pmq_bz,1) ! i_kmq_s =Xk%sstar(i_kmq_bz,2) i_pmq_s =Xk%sstar(i_pmq_bz,2) ! - if (BS_res_K_corr) then + if (iHxc==3) then i_kmq_t=BS_blk(i_block)%kp_table(1,i_kmq) i_pmq_t=BS_blk(i_block)%kp_table(2,i_pmq) endif @@ -525,7 +589,7 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) i_kmq_s_m1 = sop_inv(i_kmq_s) i_kp_mq_s = sop_tab(i_kmq_s_m1,i_pmq_s) ! - if ((BS_res_K_corr.or.BS_cpl_K_corr)) then + if (iHxc==3) then i_k_bz_mem=PAR_K_scheme%bz_index(i_k_bz) if (i_p_bz_last/=i_p_bz.or.i_k_bz_last/=i_k_bz) then i_p_bz_last=i_p_bz @@ -561,7 +625,10 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) i_k_sp_pol_v=BS_T_grp(i_Tgrp_k)%table(i_Tk,5) i_p_sp_pol_v=BS_T_grp(i_Tgrp_p)%table(i_Tp,5) ! - if ((BS_res_K_corr.or.BS_cpl_K_corr)) then + ig_kmq = qindx_X(iq,i_k_bz,2) + ig_pmq = qindx_X(iq,i_p_bz,2) + ! + if (iHxc==3) then i_kmq_bz_mem=PAR_K_scheme%bz_index(i_kmq_bz) if (i_pmq_bz_last/=i_pmq_bz.or.i_kmq_bz_last/=i_kmq_bz) then i_pmq_bz_last=i_pmq_bz @@ -591,14 +658,14 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! - if (BS_K_is_ALDA.and.l_tddft_rsum) then + if (iHxc==2.and.l_tddft_rsum) then is_k = (/i_c_k,i_k,i_k_s,i_k_sp_pol_c/) os_k = (/i_v_k,i_kmq,i_kmq_s,i_k_sp_pol_v/) is_p = (/i_c_p,i_p,i_p_s,i_p_sp_pol_c/) os_p = (/i_v_p,i_pmq,i_pmq_s,i_p_sp_pol_v/) endif ! - if (BS_res_K_corr.or.BS_cpl_K_corr) then + if (iHxc==3) then ! if (iq_W_bz/=iq_W_bz_mq.or.iq_W/=iq_W_mq.or.iq_W_s/=iq_W_s_mq) call error("Wrong transferred momentum") ! @@ -619,18 +686,18 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !=================================== ! ! Exchange - if (BS_res_K_exchange) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & + if (iHxc==1) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA) then + if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'RES') if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! ! Correlations - if (BS_res_K_corr) then + if (iHxc==3) then if (l_std_alg) H_c=K_correlation_kernel_std(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_c_p,i_kmq_s,i_kp_mq_s,i_v_k,i_v_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v, & @@ -647,18 +714,18 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !============================= ! ! Exchange - if (BS_cpl_K_exchange) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & - & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) + if (iHxc==1) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & +& BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA - if (BS_K_is_ALDA) then + if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'CPL') if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! ! Correlations - if (BS_cpl_K_corr) then + if (iHxc==3) then if (l_std_alg) H_c=K_correlation_kernel_std(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_v_p,i_kmq_s,i_kp_mq_s,i_v_k,i_c_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_v,i_k_sp_pol_v,i_p_sp_pol_c, & @@ -671,15 +738,18 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) ! end select ! - if (l_tddft.and.WF_exx_fraction>0._SP) H_c=H_c*WF_exx_fraction + if (l_tddft.and.WF_exx_fraction>0._SP.and.iHxc==3) H_c=H_c*WF_exx_fraction ! sqrt_f_itk=sqrt(cmplx(BS_T_grp(i_Tgrp_k)%f(i_Tk),kind=SP)) sqrt_f_itp=sqrt(cmplx(BS_T_grp(i_Tgrp_p)%f(i_Tp),kind=SP)) ! - BS_blk(i_block)%mat(i_Tk,i_Tp)=sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp - if (mode_now=="C") BS_blk(i_block)%mat(i_Tk,i_Tp)= cI*BS_blk(i_block)%mat(i_Tk,i_Tp) + BS_mat_tmp=sqrt_f_itk*(H_x*Co-H_c)*sqrt_f_itp + if (mode_now=="C") BS_mat_tmp= cI*BS_mat_tmp ! - BS_blk(i_block)%done(i_Tk,i_Tp)="t" + if ( l_matrix_init) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_mat_tmp + if (.not.l_matrix_init) BS_blk(i_block)%mat(i_Tk,i_Tp) = BS_blk(i_block)%mat(i_Tk,i_Tp)+BS_mat_tmp + ! + if (l_write_kernel) BS_blk(i_block)%done(i_Tk,i_Tp)="t" ! i_v_k=BS_T_grp(i_Tgrp_k)%table(i_Tk,2) i_c_k=BS_T_grp(i_Tgrp_k)%table(i_Tk,3) @@ -709,64 +779,45 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) !$omp end parallel #endif ! - if(BS_K_cutoff>0._SP) BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) + call timing('X T_space Kernel sum',OPR='stop') ! - call BS_oscillators_free(0,i_block) + if(BS_K_cutoff>0._SP.and.l_write_kernel) & +& BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! - if(l_BSE_minimize_memory) then - call BS_oscillators_free(i_Tgrp_p,0) - call BS_oscillators_free(i_Tgrp_k,0) - if(l_tddft_gsum) then - call TDDFT_oscillators_free_L(i_Tgrp_k) - call TDDFT_oscillators_free_R(i_Tgrp_p) - endif + if(l_BSE_minimize_memory.and.iHxc==1) then + call BS_exchange_oscillators_free(i_Tgrp_k) + call BS_exchange_oscillators_free(i_Tgrp_p) endif ! + if(l_BSE_minimize_memory.and.iHxc==2.and.l_tddft_gsum) then + call TDDFT_oscillators_free_L(i_Tgrp_k) + call TDDFT_oscillators_free_R(i_Tgrp_p) + endif + ! + if(iHxc==3) call BS_correlation_oscillators_free(i_block,l_std_alg) + ! +100 if(l_write_kernel) then #if defined _PAR_IO - call io_control(ACTION=WR,ID=ID) - call io_BS_PAR_block(iq,i_block,ID,"full") + call io_control(ACTION=WR,ID=ID) + call io_BS_PAR_block(iq,i_block,ID,"full") #else - call io_control(ACTION=WR,COM=REP,SEC=(/i_block+1/),ID=ID) - io_BS_err=io_BS(iq,X,ID) + call io_control(ACTION=WR,COM=REP,SEC=(/i_block+1/),ID=ID) + io_BS_err=io_BS(iq,X,ID) #endif + endif ! call live_timing(steps=i_steps) ! enddo block_loop ! -#if defined _PAR_IO - if(BS_K_cutoff>0._SP) then - call PP_redux_wait(BS_max_val_CPU) - BS_max_val=maxval(BS_max_val_CPU) - call K_compress(iq,ID_compr) - call K_compressed_IO(iq,io_BS_err,"write") - endif - ! - call io_control(ACTION=WR_CL,COM=REP,ID=ID_head) - call io_control(ACTION=WR_CL,COM=REP,ID=ID) - call io_BS_PAR_free(ID_head,ID,"full",.true.) -#else - call io_control(ACTION=WR_CL,COM=REP,SEC=(/n_BS_blks+2/),ID=ID) - io_BS_err=io_BS(iq,X,ID) -#endif - ! - if (n_steps>0) call live_timing( ) + if (m_steps>0) call live_timing( ) ! ! GLOBAL CLEANING !================= ! - call BS_oscillators_free(BS_nT_grps,0) + if(iHxc==1) call BS_exchange_oscillators_free(BS_nT_grps) ! - if ( (BS_res_K_corr.or.BS_cpl_K_corr) .and. l_std_alg) then - YAMBO_FREE(WF_phase) - endif - ! - if (l_bs_fxc) then - ! - YAMBO_FREE(F_xc_gspace) - YAMBO_FREE(FXC_K_diagonal) - ! - else if (BS_K_is_ALDA) then + if(iHxc==2) then ! if (l_tddft_rsum) then YAMBO_FREE(tddft_wf%rhotwr1) @@ -779,16 +830,50 @@ subroutine K(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(tddft_wf%WF_symm1) YAMBO_FREE(tddft_wf%WF_symm2) ! - YAMBO_FREE(F_xc_mat) + if (l_bs_fxc) then + YAMBO_FREE(F_xc_gspace) + YAMBO_FREE(FXC_K_diagonal) + else if (BS_K_is_ALDA) then + YAMBO_FREE(F_xc_mat) + endif ! endif ! - if (any((/BS_res_K_corr,BS_cpl_K_corr/)).and..not.l_bs_fxc) qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) + if(iHxc==3) then + if (l_std_alg) then + YAMBO_FREE(WF_phase) + endif + qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) + YAMBO_FREE(BS_W) + YAMBO_FREE(RIM_W) + endif + ! + if ( (iHxc==1 .and. l_bs_exch_wf_in_loop) .or. (iHxc==2.and.l_bs_tddft_wf_in_loop.and.l_tddft_gsum)) then + call fft_free() + else + call WF_free(WF,keep_states_to_load=l_write_kernel) + endif + ! + l_matrix_init=.false. + ! + enddo ! iHxc loop + ! +#if defined _PAR_IO + if(BS_K_cutoff>0._SP) then + call PP_redux_wait(BS_max_val_CPU) + BS_max_val=maxval(BS_max_val_CPU) + call K_compress(iq,ID_compr) + call K_compressed_IO(iq,io_BS_err,"write") + endif ! - YAMBO_FREE(BS_W) - YAMBO_FREE(RIM_W) - call WF_free(WF) + call io_control(ACTION=WR_CL,COM=REP,ID=ID_head) + call io_control(ACTION=WR_CL,COM=REP,ID=ID) + call io_BS_PAR_free(ID_head,ID,"full",.true.) +#else + call io_control(ACTION=WR_CL,COM=REP,SEC=(/n_BS_blks+2/),ID=ID) + io_BS_err=io_BS(iq,X,ID) +#endif ! call timing('X T_space Kernel',OPR='stop') ! -end subroutine K +end subroutine K_kernel diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index e46ace829f..e5ad52a0ff 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -16,7 +16,7 @@ subroutine K_observables( W ) use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,BSS_mode use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& & l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,& -& l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum +& l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum,l_BS_kerr_asymm,l_BS_esort_indx use parser_m, ONLY:parser use stderr, ONLY:STRING_match use electrons, ONLY:levels,n_sp_pol,n_spin @@ -37,10 +37,13 @@ subroutine K_observables( W ) l_BS_kerr = STRING_match(BSE_prop,'kerr') l_BS_photolum = STRING_match(BSE_prop,'photolum') l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 + l_BS_kerr_asymm= STRING_match(BSE_prop,'asymm') .and. l_BS_kerr + l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr ! ! How ... !--------- l_BS_esort = STRING_match(BSE_prop,'esrt') + l_BS_esort_indx= STRING_match(BSE_prop,'indx').and.l_BS_esort ! ! How to treat dipoles... !------------------------ @@ -55,16 +58,44 @@ subroutine K_observables( W ) call warning(" n_sp_pol=2 and magnons requested. Spin flip BSE only is computed") endif if (l_BS_kerr) then - call parser('AnHall',l_BS_anomalous_Hall) + if(.not.l_BS_anomalous_Hall) call parser('AnHall',l_BS_anomalous_Hall) BS_dip_size=2 l_BS_abs=.TRUE. endif if (l_BS_photolum) global_gauge="velocity" + if ((l_BS_photolum.or.l_BS_kerr).and.l_BS_trace) then + call warning(" Trace not compatible with kerr or pl. Switching it off") + l_BS_trace = .false. + endif + if (l_BS_dichroism.and..not.l_BS_trace) then + BS_dip_size=2 + call warning(" Natural dichroism without trace") + ! NB: in the case without trace the quadripolar terms should be taken into account, + ! With trace these terms average to zero + ! call warning(" Trace is automatically switched on with dichroism") + ! l_BS_trace=.true. + endif + ! if (l_BS_trace ) BS_dip_size = 3 if (l_BS_trace .and. .not.l_rpa_IP) call error(" trace coded only at the IP level") ! l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum ! + ! Now fix BSE_prop string + ! + BSE_prop="" + if(l_BS_abs) BSE_prop=trim(BSE_prop)//' abs' + if(l_BS_jdos) BSE_prop=trim(BSE_prop)//' jdos' + if(l_BS_dichroism) BSE_prop=trim(BSE_prop)//' dich' + if(l_BS_kerr) BSE_prop=trim(BSE_prop)//' kerr' + if(l_BS_kerr_asymm) BSE_prop=trim(BSE_prop)//' asymm' + if(l_BS_anomalous_Hall) BSE_prop=trim(BSE_prop)//' anHall' + if(l_BS_photolum) BSE_prop=trim(BSE_prop)//' photolum' + if(l_BS_magnons) BSE_prop=trim(BSE_prop)//' magn' + if(l_BS_esort) BSE_prop=trim(BSE_prop)//' esrt' + if(l_BS_esort) BSE_prop=trim(BSE_prop)//' indx' + if(l_BS_trace) BSE_prop=trim(BSE_prop)//' trace' + ! ! Solver Logicals !================= run_Diago = STRING_match(BSS_mode,'d') diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 7e6ac48041..9408d1313f 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -15,7 +15,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& & run_inversion,run_Diago,run_Slepc use BS, ONLY:BS_K_has_been_calculated_loaded,& -& BS_blks_free,l_BS_abs,l_BS_kerr,l_BS_magnons + & BS_blks_free,l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism use parallel_m, ONLY:master_cpu,CPU_structure use IO_int, ONLY:IO_and_Messaging_switch use linear_algebra, ONLY:INV,DIAGO @@ -95,12 +95,14 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! The jdos (l_BS_jdos) cannot be computed easely via the Haydock solver. ! it could be obtained as the average of N calls to K_Haydock ! with random intial vectors. See https://doi.org/10.1002/nla.2170 + ! ! A possible alternative could be to use the algorithm with Cf ! from both the left and the right hand side to get from a single Haydock loop ! if (l_BS_abs) call K_Haydock(iq,W_bss,"optics",Xk) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) + if (l_BS_dichroism) call K_Haydock(iq,W_bss,"dichroism",Xk) ! endif ! diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index e82a3ab479..bbb501456b 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -95,7 +95,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! if(l_nl_optics) then X_scattering =.FALSE. - sigma_scattering=.FALSE. + ! sigma_scattering=.FALSE. ! I need them for the LSEX endif ! #endif diff --git a/src/collisions/.objects b/src/collisions/.objects index 2d8cc5b306..22ead9636e 100644 --- a/src/collisions/.objects +++ b/src/collisions/.objects @@ -9,6 +9,8 @@ RT_objs = COLLISIONS_compose_rt.o #endif #if defined _NL NL_objs = COLLISIONS_compose_nl.o COLLISIONS_compress.o +LSEX_objs = Build_LSEX_collisions.o LSEX_potential.o OSCLL_eval.o OSCLL_load.o \ + OSCLL_compose_collision.o OSCLL_compose_nl.o OSCLL_compose_vbands.o #endif #if defined _QED || defined _SC || defined _RT || defined _NL objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ @@ -16,5 +18,5 @@ objs= PLASMA_parallel_setup.o COLLISIONS_basic_operations.o \ COLLISIONS_alloc_and_free.o COLLISIONS_eval.o COLLISIONS_load.o \ COLLISIONS_linearize_and_IO.o COLLISIONS_map_to_QP_table.o \ COLLISIONS_NEQ_GW_static.o COLLISIONS_HXC.o SCATTERING_GW_kinematics.o \ - $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) + $(SC_objs) $(QED_objs) $(RT_objs) $(NL_objs) $(LSEX_objs) #endif diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F new file mode 100644 index 0000000000..4b77cebc17 --- /dev/null +++ b/src/collisions/Build_LSEX_collisions.F @@ -0,0 +1,82 @@ +! +! Copyright (C) 2000-2022 the LUMEN team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine Build_LSEX_collisions(k,q,i_qp,COLL) + ! + ! This subroutine calculate the long-range part of the Screened exchange + ! + use electrons, ONLY:n_sp_pol + use pars, ONLY:SP,cI,cZERO + use collision_ext, ONLY:OSCLL,W,ng_oscll,COLL_bands + use QP_m, ONLY:QP_table,QP_nk,QP_n_states + use R_lattice, ONLY:bz_samp,qindx_S + ! +#include + ! + type(bz_samp), intent(in) :: k,q + integer, intent(in) :: i_qp + ! + ! Work Space + ! + integer :: i_mp ! self-energy external indexes + integer :: i_np,iqbz,i_kmq ! self-energy internal indexes + integer :: ig1,ig2 + integer :: i_n,i_m + integer :: i_k + ! + ! Collisions output + ! + complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + ! + ! Coll indexes + ! + i_n=QP_table(i_qp,1) + i_m=QP_table(i_qp,2) + i_k=QP_table(i_qp,3) + ! + ! Build Collisions from the Oscillators + ! + ! COLL(n,m,n',m',k,k-q) = \sum_{G,G'} \rho(n,n',k,q,G')*\rho^*(m,m',k,q,G)*W(q,G',G) + ! + do i_mp=COLL_bands(1),COLL_bands(2) + do i_np=COLL_bands(1),COLL_bands(2) + ! + COLL(i_np,i_mp,:)=cZERO + ! + do iqbz=1,q%nbz + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + ! + ! Build Collision on the fly + ! + do ig1=1,ng_oscll + do ig2=1,ng_oscll + COLL(i_np,i_mp,i_kmq)=COLL(i_np,i_mp,i_kmq)+OSCLL(i_n,i_np,i_k,iqbz,ig2) & +& *conjg(OSCLL(i_m,i_mp,i_k,iqbz,ig1))*W(iqbz,ig2,ig1) + enddo + enddo + ! + enddo + enddo + enddo + ! +end subroutine Build_LSEX_collisions diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 18b56cc9b7..1ef38da3b0 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -195,33 +195,22 @@ subroutine local_alloc_and_free(COLL_element,COLL_grp) mem_size(3)=mem_size(3)+size(COLL_element(J)%v_r) endif if(l_complex) then -<<<<<<< HEAD YAMBO_ALLOC(COLL_element(J)%v_c,(COLL_element(J)%N)) COLL_element(J)%v_c=cZERO mem_size(4)=mem_size(4)+size(COLL_element(J)%v_c) - endif - endif - if (l_clean.and.(l_v1.or.l_all)) then - YAMBO_FREE(COLL_element(J)%v_c) - YAMBO_FREE(COLL_element(J)%v_r) -======= - YAMBO_ALLOC(COLL(J)%v_c,(COLL(J)%N)) - COLL(J)%v_c=cZERO - mem_size(4)=mem_size(4)+size(COLL(J)%v_c) if(SP==DP.and.COLLISIONS_load_SP) then - YAMBO_ALLOC(COLL(J)%v_c_SP,(COLL(J)%N)) - COLL(J)%v_c_SP=cZERO - mem_size(4)=mem_size(4)+size(COLL(J)%v_c_SP) + YAMBO_ALLOC(COLL_element(J)%v_c_SP,(COLL_element(J)%N)) + COLL_element(J)%v_c_SP=cZERO + mem_size(4)=mem_size(4)+size(COLL_element(J)%v_c_SP) endif endif endif if (l_clean.and.(l_v1.or.l_all)) then - YAMBO_FREE(COLL(J)%v_c) - if(SP==DP.and.allocated(COLL(J)%v_c_SP)) then - YAMBO_FREE(COLL(J)%v_c_SP) + YAMBO_FREE(COLL_element(J)%v_c) + if(SP==DP.and.allocated(COLL_element(J)%v_c_SP)) then + YAMBO_FREE(COLL_element(J)%v_c_SP) endif - YAMBO_FREE(COLL(J)%v_r) ->>>>>>> master + YAMBO_FREE(COLL_element(J)%v_r) endif if (l_alloc.and.(l_table.or.l_all)) then YAMBO_ALLOC(COLL_element(J)%table,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index 46d808b81a..c9fc79896e 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -127,8 +127,8 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) ! if (l_use_COH_collisions.and.l_sc_sex.and..not.l_use_Hxc_collisions) l_error=.TRUE. ! - if (l_error) call error( ' HXC collisions not found / not compatible') - if (l_warning) call warning(' HXC collisions not found. Potential is computed on the fly.') + if (l_error) call error( ' HXC collisions not found/not compatible') + if (l_warning) call warning(' HXC collisions not found/not compatible. Potential is computed on the fly.') ! l_use_scatt_collisions=all(io_err(3:4)==0).and.(l_elphoton_scatt.or.l_elphoton_corr.or.l_elel_scatt) if (io_err(3)/=0) call error(' el-el scatt collisions not found / not compatible') diff --git a/src/collisions/DOUBLE_project.dep b/src/collisions/DOUBLE_project.dep index bcfe075e27..342b1d24b0 100644 --- a/src/collisions/DOUBLE_project.dep +++ b/src/collisions/DOUBLE_project.dep @@ -1,3 +1,4 @@ + Build_LSEX_collisions.o COLLISIONS_HXC.o COLLISIONS_NEQ_GW_static.o COLLISIONS_alloc_and_free.o @@ -5,11 +6,18 @@ COLLISIONS_compose_nl.o COLLISIONS_compose_rt.o COLLISIONS_compose_sc.o + COLLISIONS_compress.o COLLISIONS_eval.o COLLISIONS_linearize_and_IO.o COLLISIONS_load.o COLLISIONS_map_to_QP_table.o COLLISIONS_momentum.o + LSEX_potential.o + OSCLL_compose_collision.o + OSCLL_compose_nl.o + OSCLL_compose_vbands.o + OSCLL_eval.o + OSCLL_load.o PLASMA_build_up.o PLASMA_parallel_setup.o PLASMA_tables_and_dimensions.o diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F new file mode 100644 index 0000000000..f04f1fc512 --- /dev/null +++ b/src/collisions/LSEX_potential.F @@ -0,0 +1,122 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2014 The Yambo Team +! +! Authors (see AUTHORS file for details): AC +! +subroutine LSEX_potential(q,X,Xw) + ! + ! Construct the screeend potential W(G=G'=0,q) + ! + use nl_optics, ONLY:NL_bands,Correlation,LSEX + use collision_ext, ONLY:W + use LIVE_t, ONLY:live_timing + use pars, ONLY:SP,cZERO,pi + use frequency, ONLY:w_samp,W_reset + use R_lattice, ONLY:bz_samp,qindx_S + use D_lattice, ONLY:DL_vol + use electrons, ONLY:levels,spin_occ + use collision_el, ONLY:elemental_collision,elemental_collision_free, & +& elemental_collision_alloc + use X_m, ONLY:X_mat,X_ALLOC_elemental,X_t + use IO_int, ONLY:io_control + use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,RD_CL,OP_RD,RD_CL_IF_END,manage_action, & +& deliver_IO_error_message + use matrix_operate, ONLY:hermitian + use collision_ext, ONLY:ng_oscll + use stderr, ONLY:intc + use parallel_int, ONLY:PP_wait + ! +#include + ! + type(bz_samp), intent(in) :: q + type(w_samp) :: Xw + type(X_t) :: X + ! + ! Work Space + ! + integer :: iqbz,iqibz,iqs,iqref + integer :: io_err,ID,ig1,ig2,IO_ACT + integer, external :: io_X + type(elemental_collision) :: isc + ! + call PP_wait() + ! + ! The number of G in X(q,G,G') is read from input + ! + X%ng =ng_oscll + isc%ngrho =X%ng + isc%iqref =0 + ! + call elemental_collision_free(isc) + call elemental_collision_alloc(isc,NG=X%ng,NG_GAMP=(/X%ng,X%ng/),TITLE="Wlr") + ! + call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) + ! + call live_timing('[NL] W potential :',q%nbz) + ! + if(Correlation==LSEX) then + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) + io_err=io_X(X,Xw,ID) + if (io_err<0) call error('Incomplete and/or broken tatic diel. fun. database') + endif + ! + YAMBO_ALLOC(W,(q%nbz,ng_oscll,ng_oscll)) + iqref=0 + ! +!$OMP WORKSHARE + W=cZERO +!$OMP END WORKSHARE + ! + do iqbz=1,q%nbz + ! + isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) + iqibz=isc%qs(2) + iqs =isc%qs(3) + ! + call scatter_Gamp(isc,'x') + ! + ! The bare exchange v + ! +!$OMP WORKSHARE + forall(ig1=1:X%ng) + W(iqbz,ig1,ig1)=-4._SP/spin_occ*pi*isc%gamp(ig1,ig1) + end forall +!$OMP END WORKSHARE + ! + if(Correlation==LSEX) then + ! + call scatter_Gamp(isc,'c') + ! + if(iqibz/=iqref) then + ! + IO_ACT=manage_action(RD_CL_IF_END,iqibz,1,q%nibz) + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/2*iqibz,2*iqibz+1/),ID=ID) + io_err=io_X(X,Xw,ID) + ! + call deliver_IO_error_message(io_err,'PP/Em1s',STOP_it=.TRUE.) + iqref=iqibz + ! + endif + ! + ! Screened part of the exchange \tilde W = W - v + ! +!$OMP WORKSHARE + forall(ig1=1:X%ng,ig2=1:X%ng) + W(iqbz,ig1,ig2)=W(iqbz,ig1,ig2)-4._SP/spin_occ*pi*X_mat(ig1,ig2,1)*isc%gamp(ig1,ig2) + end forall +!$OMP END WORKSHARE + ! + endif + ! + call live_timing(steps=1) + ! + enddo + ! + call live_timing() + ! + call elemental_collision_free(isc) + call X_ALLOC_elemental('X') + ! +end subroutine LSEX_potential diff --git a/src/collisions/NL_project.dep b/src/collisions/NL_project.dep index f93c8bbabd..6174cfc54c 100644 --- a/src/collisions/NL_project.dep +++ b/src/collisions/NL_project.dep @@ -1,12 +1,20 @@ + Build_LSEX_collisions.o COLLISIONS_HXC.o COLLISIONS_NEQ_GW_static.o COLLISIONS_alloc_and_free.o COLLISIONS_basic_operations.o COLLISIONS_compose_nl.o + COLLISIONS_compress.o COLLISIONS_eval.o COLLISIONS_linearize_and_IO.o COLLISIONS_load.o COLLISIONS_map_to_QP_table.o + LSEX_potential.o + OSCLL_compose_collision.o + OSCLL_compose_nl.o + OSCLL_compose_vbands.o + OSCLL_eval.o + OSCLL_load.o PLASMA_build_up.o PLASMA_parallel_setup.o PLASMA_tables_and_dimensions.o diff --git a/src/collisions/OSCLL_compose_collision.F b/src/collisions/OSCLL_compose_collision.F new file mode 100644 index 0000000000..70ef858e7e --- /dev/null +++ b/src/collisions/OSCLL_compose_collision.F @@ -0,0 +1,103 @@ +! +! Copyright (C) 2020-2023 the Yambo team +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) + ! + ! This subroutine use long-range part of the Screened exchange + ! and the oscillators to reconstruct the collisions + ! (at present used only for testing purpose) + ! + use pars, ONLY:SP,cZERO + use nl_optics, ONLY:NL_bands,Correlation,LSEX,LHF + use collision_ext, ONLY:OSCLL,W,ng_oscll + use QP_m, ONLY:QP_nk + use R_lattice, ONLY:bz_samp,qindx_S + use parallel_m, ONLY:PAR_Xk_ibz_index + use wrapper, ONLY:V_dot_V,M_by_V +#if defined _TIMING + use timing_m, ONLY:timing +#endif + ! + implicit none + ! + type(bz_samp), intent(in) :: k,q + ! + ! Collision indexes + integer, intent(in) :: i_n,i_m,i_k + ! + ! Work Space + ! + integer :: ibp ! self-energy external indexes + integer :: ib,iqbz,i_kmq ! self-energy internal indexes + integer :: ig1,ig2,ik_mem + complex(SP) :: V_tmp(ng_oscll) + ! + ! Collisions output + ! + complex(SP), intent(out) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + ! +#if defined _TIMING + call timing('OSCLL compose',OPR='start') +#endif + ! + ik_mem=PAR_Xk_ibz_index(i_k) + ! + ! Build Collisions from the Oscillators + ! + COLL=cZERO + ! + do iqbz=1,q%nbz + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + ! + ! Build Collision on the fly + ! + if(Correlation==LSEX) then + ! + do ig1=1,ng_oscll + do ig2=1,ng_oscll +!$OMP WORKSHARE + forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) + COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+OSCLL(i_n,ib ,ik_mem,iqbz,ig2)*conjg(OSCLL(i_m,ibp,ik_mem,iqbz,ig1)) & +& *W(iqbz,ig2,ig1) + end forall +!$OMP END WORKSHARE + enddo + enddo + ! + elseif(Correlation==LHF) then + do ig1=1,ng_oscll +!$OMP WORKSHARE + forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) + COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+OSCLL(i_n,ib ,ik_mem,iqbz,ig1)*conjg(OSCLL(i_m,ibp,ik_mem,iqbz,ig1)) & +& *W(iqbz,ig1,ig1) + end forall +!$OMP END WORKSHARE + enddo + endif + ! + enddo ! loop in iqbz + ! +#if defined _TIMING + call timing('OSCLL compose',OPR='stop') +#endif + ! +end subroutine OSCLL_compose_collision diff --git a/src/collisions/OSCLL_compose_nl.F b/src/collisions/OSCLL_compose_nl.F new file mode 100644 index 0000000000..5e952b6eca --- /dev/null +++ b/src/collisions/OSCLL_compose_nl.F @@ -0,0 +1,74 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2014 The Yambo Team +! +! Authors (see AUTHORS file for details): AC +! +subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) + ! + ! This subroutine calculate the long-range part of the Screened exchange + ! + use electrons, ONLY:n_sp_pol,levels,spin_occ + use pars, ONLY:SP,cI,cZERO,cONE + use FFT_m, ONLY:fft_size + use nl_optics, ONLY:NL_bands,NL_nbands + use collision_ext, ONLY:ng_oscll,OSCLL,W + use QP_m, ONLY:QP_nk + use R_lattice, ONLY:bz_samp,qindx_S,nXkibz + use wrapper_omp, ONLY:V_dot_V + use parallel_m, ONLY:PAR_Xk_ibz_index +#if defined _TIMING + use timing_m, ONLY:timing +#endif + ! + implicit none + ! + complex(SP), intent(inout) :: H_nl_sc(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) + integer, intent(in) :: i_k,i_sp_pol + type(bz_samp), intent(in) :: k,q + type(levels), intent(in) :: E + complex(SP), intent(in) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + ! + ! Work Space + ! + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) +#if defined _DOUBLE + complex(SP), external :: ZDOTU +#else + complex(SP), external :: CDOTU +#endif + integer :: i1,i2,i_n,i_m + ! +#if defined _TIMING + call timing('OSCLL compose NL',OPR='start') +#endif + ! + do i_n=NL_bands(1),NL_bands(2) + do i_m=i_n,NL_bands(2) + ! + call OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) + ! +#if defined _DOUBLE + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*ZDOTU(NL_nbands**2*QP_nk,COLL,1,dG,1) +#else + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*CDOTU(NL_nbands**2*QP_nk,COLL,1,dG,1) +#endif + ! + enddo + enddo + ! + ! Symmetrization + ! + do i_n=NL_bands(1),NL_bands(2) + do i_m=i_n+1,NL_bands(2) + H_nl_sc(i_m,i_n)=conjg(H_nl_sc(i_n,i_m)) + enddo + H_nl_sc(i_n,i_n)=real(H_nl_sc(i_n,i_n)) + enddo + ! +#if defined _TIMING + call timing('OSCLL compose NL',OPR='stop') +#endif + ! +end subroutine OSCLL_compose_nl diff --git a/src/collisions/OSCLL_compose_vbands.F b/src/collisions/OSCLL_compose_vbands.F new file mode 100644 index 0000000000..d83534cdf4 --- /dev/null +++ b/src/collisions/OSCLL_compose_vbands.F @@ -0,0 +1,123 @@ +! +! Copyright (C) 2020-2023 the Yambo team +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) + ! + ! This subroutine calculate the long-range part of the Screened exchange + ! + use electrons, ONLY:n_sp_pol,levels,spin_occ + use pars, ONLY:SP,cI,cZERO,cONE + use FFT_m, ONLY:fft_size + use nl_optics, ONLY:NL_bands,NL_nbands,Sigma_SEX_EQ + use collision_ext, ONLY:ng_oscll,OSCLL,W + use QP_m, ONLY:QP_nk + use R_lattice, ONLY:bz_samp,qindx_S,nXkibz + use wrapper_omp, ONLY:Vstar_dot_V_omp + use parallel_m, ONLY:PAR_Xk_ibz_index +#if defined _TIMING + use timing_m, ONLY:timing +#endif + ! + implicit none + ! + complex(SP), intent(inout) :: H_nl_sc(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) + integer, intent(in) :: i_k,i_sp_pol + type(bz_samp), intent(in) :: k,q + type(levels), intent(in) :: E + complex(SP), intent(in) :: V_input(NL_bands(2),maxval(E%nbf),QP_nk,n_sp_pol) + ! + ! Work Space + ! + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP) :: V_kmq(NL_bands(1):NL_bands(2),maxval(E%nbf),q%nbz) + complex(SP) :: OSCLL_val(maxval(E%nbf),NL_bands(1):NL_bands(2),ng_oscll,q%nbz) + complex(SP) :: OSCLL_sum(q%nbz,ng_oscll,ng_oscll) + ! +#if defined _DOUBLE + complex(SP), external :: ZDOTU +#else + complex(SP), external :: CDOTU +#endif + complex(SP) :: COLL_val + integer :: i_kmq,i_n,i_m,iv,iqbz,ig1,ig2,ik_mem + ! + ik_mem=PAR_Xk_ibz_index(i_k) + ! +#if defined _TIMING + call timing('OSCLL compose NL',OPR='start') +#endif + ! +!$omp parallel do default(shared), private(iqbz,i_kmq) + do iqbz=1,q%nbz + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + V_kmq(:,:,iqbz) = V_input(NL_bands(1):,:,i_kmq,i_sp_pol) + enddo +!$omp end parallel do + ! + ! Build Oscillators for the time-dependent valence bands + ! +!$OMP WORKSHARE +forall(iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) + OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) + end forall +!$OMP END WORKSHARE + ! + ! Remove equilibrium Sigma-sex + ! +!$OMP WORKSHARE + H_nl_sc=H_nl_sc-Sigma_SEX_EQ(:,:,i_sp_pol,ik_mem) +!$OMP END WORKSHARE + ! + do i_n=NL_bands(1),NL_bands(2) + do i_m=i_n,NL_bands(2) + ! +!$OMP WORKSHARE + forall(iqbz=1:q%nbz,ig1=1:ng_oscll,ig2=1:ng_oscll) + OSCLL_sum(iqbz,ig1,ig2)=dot_product(OSCLL_val(:,i_m,ig2,iqbz),OSCLL_val(:,i_n,ig2,iqbz)) + end forall +!$OMP END WORKSHARE + ! +#if defined _DOUBLE + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)+spin_occ*ZDOTU(q%nbz*ng_oscll**2,OSCLL_sum,1,W,1) +#else + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)+spin_occ*CDOTU(q%nbz*ng_oscll**2,OSCLL_sum,1,W,1) +#endif + ! + enddo + enddo + ! + ! Symmetrization + ! +!$omp parallel do default(shared), private(i_n,i_m) + do i_n=NL_bands(1),NL_bands(2) + do i_m=i_n+1,NL_bands(2) + H_nl_sc(i_m,i_n)=conjg(H_nl_sc(i_n,i_m)) + enddo + H_nl_sc(i_n,i_n)=real(H_nl_sc(i_n,i_n)) + enddo +!$omp end parallel do + ! +#if defined _TIMING + call timing('OSCLL compose NL',OPR='stop') +#endif + ! +end subroutine OSCLL_compose_vbands diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F new file mode 100644 index 0000000000..63d4e4e171 --- /dev/null +++ b/src/collisions/OSCLL_eval.F @@ -0,0 +1,209 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2012 The Yambo Team +! +! Authors (see AUTHORS file for details): CA +! +!> @brief Calculate oscillators <\psi_k | exp[i*(q+G)] |\psi_{k+q} > for few G-vectors +! +!! @param[out] OSCLL_k Oscillators for each k-point +! +subroutine OSCLL_eval(q,k,en) + ! + ! Evaluate oscillators for the Local-SEX + ! + use LIVE_t, ONLY:live_timing + use pars, ONLY:SP,cZERO + use R_lattice, ONLY:bz_samp,qindx_S + use electrons, ONLY:levels,n_sp_pol + use wave_func, ONLY:WF,wf_ng + use interfaces, ONLY:WF_load,WF_free + use QP_m, ONLY:QP_nk + use com, ONLY:msg + use stderr, ONLY:intc + use collision_el, ONLY:elemental_collision,elemental_collision_free, & +& elemental_collision_alloc + use collision_ext, ONLY:COLL_bands,W,OSCLL_k,ng_oscll + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID,PAR_COM_G_b_INDEX + use FFT_m, ONLY:fft_size + use IO_int, ONLY:io_control,IO_and_Messaging_switch + use IO_m, ONLY:OP_RD_CL,VERIFY,REP,OP_WR_CL,OP_APP_CL,file_is_present,rm_file,DUMP, & +& OP_IF_START_APP_CL_IF_END,manage_action + use parallel_int, ONLY:PP_redux_wait,PP_wait + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,master_cpu,PAR_IND_G_b, & +& PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX + ! +#include +#include + ! + type(bz_samp), intent(in) :: q,k + type(levels), intent(in) :: en + ! + ! Work Space + ! + type(elemental_collision) :: isc + integer :: i_k,i_m,i_n,i_q,iqbz,i_kmq_G0,iqs,i_kmq,i_kmq_s,i_k_s,ik_mem + integer :: i_k_sp,i_kmq_sp,iqibz,ig,i_np,i_mp,io,ic,i_sp_pol,ib_idx + integer :: ID,io_err,iGo_max,i_fragment,max_count,i_count,IO_ACT + integer :: COLL_nbands,OSCLL_perc,NK(2) + logical, allocatable :: OSCLL_done(:) + integer, external :: io_OSCLL + logical :: IO_do_it + ! + call PP_wait() + ! + i_sp_pol=1 + ! + call IO_and_Messaging_switch("SAVE") + call IO_and_Messaging_switch("+io_in",CONDITION=.TRUE.) + ! + call msg('s','[OSC] Checking oscillators header ') + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + ! + YAMBO_ALLOC(OSCLL_done,(QP_nk)) + OSCLL_done=.FALSE. + ! + if(io_err==0) then + ! + ! Check if all oscillators has been evaluated + ! + if(master_cpu) then + ! + do i_k=1,QP_nk + if(file_is_present('OSCLL_fragment_'//intc(i_k))) OSCLL_done(i_k)=.TRUE. + enddo + ! + endif + ! + call PP_redux_wait(OSCLL_done,imode=3) + ! + if(all(OSCLL_done.eqv..TRUE.)) then + return + else + OSCLL_perc=nint(count(OSCLL_done)/real(QP_nk)*100) + call msg('s','Restarting Oscillators calculation : '//trim(intc(OSCLL_perc))//'% done') + endif + ! + else + call msg('s','[OSC] Missing or broken oscillators ') + endif + ! + ! Oscillators not found, recalculated them + ! + if(master_cpu) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + endif + ! + max_count=120 + do while(io_err/=0) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=DUMP,ID=ID) + io_err=io_OSCLL(q,ID) + if(io_err/=0) call sleep(1) + i_count=i_count+1 + if((i_count==max_count).and.io_err/=0) & +& call error(" [OSCLL] Header not found while writing dipoles ") + enddo + ! + call PP_wait() + ! + iGo_max=maxval(qindx_S(:,:,2)) + ! + call elemental_collision_free(isc) + ! + isc%iqref =0 + isc%ngrho =ng_oscll ! only G=1 is required for local-SEX + ! + call WF_load(WF,wf_ng,iGo_max,COLL_bands,(/1,1/),space='R',title='-OSC') + call elemental_collision_alloc(isc,NG=isc%ngrho,TITLE="OSCLL") + ! + call live_timing('[OSC] Oscillators :',PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1)) + ! + YAMBO_ALLOC(OSCLL_k,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),q%nbz,ng_oscll)) + ! + COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 + ! + do i_k=1,QP_nk + ! + if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle + ! + if(OSCLL_done(i_k)) then + call live_timing(steps=1) + cycle + endif + ! + ik_mem=PAR_Xk_ibz_index(i_k) + ! + OSCLL_k=cZERO + ! + do iqbz=1,q%nbz + ! + i_kmq_G0 =qindx_S(i_k,iqbz,2) + iqibz =q%sstar(iqbz,1) + iqs =q%sstar(iqbz,2) + isc%qs =(/i_kmq_G0,iqibz,iqs/) + ! + i_k_s=1 + i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) + i_kmq_s = k%sstar(qindx_S(i_k,iqbz,1),2) + ! + ! Spin-Polarization not supported!! + ! + i_k_sp = 1 + i_kmq_sp= 1 + ! + ! Load only two k-points + ! + NK=(/min(i_k,i_kmq),max(i_k,i_kmq)/) + call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + call WF_load(WF,wf_ng,iGo_max,COLL_bands,NK,k_extrema_only=.true.,quiet=.true.,space='R',title='-OSC', & +& keep_states_to_load=.true.) + ! + do i_n=COLL_bands(1),COLL_bands(2) + do i_m=COLL_bands(1),COLL_bands(2) + ! + ib_idx=i_m-COLL_bands(1)+1+(i_n-COLL_bands(1))*COLL_nbands + ! + if (.not.PAR_IND_G_b%element_1D(ib_idx)) cycle + ! + isc%is =(/i_n,i_k,i_k_s,i_k_sp/) + isc%os =(/i_m,i_kmq,i_kmq_s,i_kmq_sp/) + call DEV_SUB(scatter_Bamp)(isc) + ! +!$omp parallel do default(shared), private(ig) + do ig=1,ng_oscll + OSCLL_k(i_n,i_m,iqbz,ig)=isc%rhotw(ig) + enddo +!$omp end parallel do + ! + enddo + enddo + ! + enddo + ! + call PP_redux_wait(OSCLL_k(:,:,:,:),COMM=PAR_COM_G_b_INDEX%COMM) + ! + i_fragment=i_k+(i_sp_pol-1)*k%nibz + ! + IO_ACT=OP_APP_CL !manage_action(OP_IF_START_APP_CL_IF_END,i_fragment,1,k%nibz*n_sp_pol) + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+i_fragment/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + ! + call live_timing(steps=1) + ! + enddo + ! + call IO_and_Messaging_switch("RESTORE") + ! + call live_timing() + ! + YAMBO_FREE(OSCLL_k) + ! + call elemental_collision_free(isc) + call WF_free(WF) + ! + call PP_wait() + ! +end subroutine OSCLL_eval diff --git a/src/collisions/OSCLL_load.F b/src/collisions/OSCLL_load.F new file mode 100644 index 0000000000..ae5a78d733 --- /dev/null +++ b/src/collisions/OSCLL_load.F @@ -0,0 +1,80 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine OSCLL_load(q,k) + ! + ! Evaluate oscillators for the Local-SEX + ! + use LIVE_t, ONLY:live_timing + use R_lattice, ONLY:bz_samp + use QP_m, ONLY:QP_nk + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID,myid,PAR_COM_Xk_ibz_INDEX,master_cpu + use parallel_int, ONLY:PP_wait + use IO_m, ONLY:OP_RD,RD_CL_IF_END,VERIFY,REP,manage_action,deliver_IO_error_message + use IO_int, ONLY:io_control,IO_and_Messaging_switch + use com, ONLY:msg + ! +#include + ! + type(bz_samp), intent(in) :: q,k + ! + ! Work Space + ! + integer :: i_k,i_sp_pol + integer :: ID,io_err,IO_ACT + integer, external :: io_OSCLL + ! + call PP_wait(COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! + i_sp_pol=1 + ! + call IO_and_Messaging_switch("SAVE") + call IO_and_Messaging_switch("+io_in",CONDITION=.TRUE.) + ! + call msg('s','[OSC] Checking oscillators header ') + call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) + io_err=io_OSCLL(q,ID) + ! + if(io_err/=0) & +& call error('Oscillators not present, evaluate them before non-linear reponse: "yambo -e -v lsex" ') + ! + ! Load Oscillators + ! + call live_timing('[OSC] Load Oscillators :',PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1)) + ! + do i_k=1,QP_nk + if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle + IO_ACT=manage_action(RD_CL_IF_END,i_k,1,(i_sp_pol)*k%nibz) + call io_control(ACTION=IO_ACT,COM=REP,SEC=(/1+i_k+(i_sp_pol-1)*k%nibz/),ID=ID) + io_err=io_OSCLL(q,ID) + call deliver_IO_error_message(io_err,'Oscillators',STOP_it=.TRUE.) + call live_timing(steps=1) + enddo + call live_timing() + ! + call PP_wait(COMM=PAR_COM_Xk_ibz_INDEX%COMM) + call IO_and_Messaging_switch("RESTORE") + ! + call msg('rs','[OSC] Oscillators loaded') + ! +end subroutine OSCLL_load diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 52383bedad..1e8ee8e9d3 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -18,7 +18,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) use vec_operate, ONLY:iku_v_norm use parallel_m, ONLY:yMPI_comm,PP_indexes,PP_indexes_reset,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index,PARALLEL_live_message - use R_lattice, ONLY:G_m_G,g_vec,ng_in_shell,n_g_shells,E_of_shell + use R_lattice, ONLY:G_m_G,g_vec,ng_in_shell,n_g_shells,E_of_shell,G_m_G_maxval #ifdef _CUDA use R_lattice, ONLY:G_m_G_d #endif @@ -34,6 +34,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) integer :: iG_shell,iGo_shell,iG_shell_0,iG_shell_max,iG_,iGo_,iG_alloc,iGo_alloc real(SP):: E_iG, E_iGo, E_max real(SP):: v1(3) + integer, allocatable :: G_m_G_maxval_tmp(:) real(SP), allocatable :: E_G_m_G(:,:) type(PP_indexes) :: PAR_IND_G ! @@ -146,6 +147,9 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! YAMBO_ALLOC(G_m_G,(iG_,iGo_)) G_m_G=0 + YAMBO_ALLOC(G_m_G_maxval_tmp,(iGo_)) + G_m_G_maxval_tmp=0 + G_m_G_maxval=0 ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) do i2=1,iGo_ @@ -159,11 +163,15 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! v1(:)=g_vec(i1,:)-g_vec(i2,:) G_m_G(i1,i2)=G_index(v1,.false.) + G_m_G_maxval_tmp(i2)=max(G_m_G_maxval_tmp(i2),G_m_G(i1,i2)) ! enddo enddo !$omp end parallel do - ! + ! + G_m_G_maxval=maxval(G_m_G_maxval_tmp) + YAMBO_FREE(G_m_G_maxval_tmp) + ! if (present(COMM)) call PP_redux_wait(G_m_G,COMM=COMM%COMM) ! call PP_indexes_reset(PAR_IND_G) diff --git a/src/dipoles/.objects b/src/dipoles/.objects index c5efe3306c..90c81b080b 100644 --- a/src/dipoles/.objects +++ b/src/dipoles/.objects @@ -6,7 +6,7 @@ MAGN_objects = DIPOLE_orbital_magnetization.o SC_objects = DIPOLE_SC_rotate.o #endif #if defined _NL | defined _SC -NL_objects = Berry_polarization_EQ.o Ionic_polarization.o POLARIZATION_output.o +NL_objects = Berry_polarization_EQ.o Ionic_polarization.o POLARIZATION_output.o #endif objs = Build_Overlaps_Det_EQ.o $(SC_objects) $(MAGN_objects) $(NL_objects) \ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_build_covariants.o DIPOLE_x_real_space.o DIPOLE_spin_magnetization.o \ diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 20a8f6eb62..fd6013e8a2 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -22,6 +22,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng + use deviceXlib_m, ONLY:dev_memcpy use parallel_m, ONLY:PAR_IND_DIPk_bz,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_A2A, & & PAR_IND_CON_BANDS_OVLP,PAR_IND_VAL_BANDS_OVLP, & & PAR_IND_OVLPk_ibz,PAR_COM_DIPk_ibz_INDEX @@ -40,10 +41,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) integer :: id,idx_kp(3),idx_k(3),shift(3),g0_idx(3,2) real(SP) :: g0_length(3) ! - complex(SP), allocatable DEV_ATTR :: WF_symm(:,:,:,:) - complex(SP), allocatable DEV_ATTR :: WF_shifted(:,:,:,:) - complex(SP), allocatable DEV_ATTR :: WF_ik(:,:,:,:) - complex(SP), allocatable DEV_ATTR :: WF_ikp(:,:,:,:) + complex(SP), allocatable DEV_ATTR :: WF_symm(:,:,:) + complex(SP), allocatable, target DEV_ATTR :: WF_ik(:,:,:) + complex(SP), allocatable DEV_ATTR :: WF_ikp(:,:,:) + complex(SP), pointer DEV_ATTR :: WF_tmp(:,:,:) ! logical :: USE_shifted_wf ! @@ -74,12 +75,13 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call PARALLEL_WF_index( ) ! - YAMBO_ALLOC(WF_symm,(wf_ng_1st_BZ,n_spinor,Dip%ib(2),n_sp_pol)) - YAMBO_ALLOC(WF_shifted,(wf_ng_overlaps,n_spinor,Dip%ib(2),n_sp_pol)) - YAMBO_ALLOC(WF_ik, (wf_ng_overlaps,n_spinor,Dip%ib(2),n_sp_pol)) - YAMBO_ALLOC(WF_ikp, (wf_ng_overlaps,n_spinor,Dip%ib(2),n_sp_pol)) + YAMBO_ALLOC(WF_symm, (wf_ng_1st_BZ,n_spinor,1)) + YAMBO_ALLOC(WF_ikp, (wf_ng_overlaps,n_spinor,1)) + YAMBO_ALLOC(WF_ik, (wf_ng_overlaps,n_spinor,Dip%ib(2))) ! +!$OMP WORKSHARE DIP_S=cZERO +!$OMP END WORKSHARE ! call live_timing("Overlaps:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) ! @@ -94,11 +96,20 @@ subroutine DIPOLE_overlaps(Xk,Dip) ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) ! - call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ik,ik/),space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ik,ik/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) ! - call WF_symm_kpoint((/1,Dip%ib(2)/),ikbz,Xk,WF_symm) - ! - call WF_shift_kpoint((/1,Dip%ib(2)/),ikbz,WF_shifts(ikbz,:),Xk,WF_symm,WF_ik) + do ib=1,Dip%ib(2) + ! + call WF_symm_kpoint((/ib,ib/),ikbz,i_sp_pol,Xk,WF_symm) + ! + WF_tmp=>WF_ik(:,:,ib:ib) + ! + call WF_shift_kpoint((/ib,ib/),ikbz,i_sp_pol,WF_shifts(ikbz,:),Xk,WF_symm,WF_tmp) + ! + nullify(WF_tmp) + ! + enddo ! call WF_free(WF) ! @@ -124,9 +135,8 @@ subroutine DIPOLE_overlaps(Xk,Dip) ikp = Xk%sstar(ikbzp,1) isp = Xk%sstar(ikbzp,2) ! - call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ikp,ikp/),space='G',title='-Oscill/G space/Overlaps',quiet=.true.) - ! - call WF_symm_kpoint((/1,Dip%ib(2)/),ikbzp,Xk,WF_symm) + call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ikp,ikp/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) ! ! Shift the wave-function by a G-vector if the neighbor is out of the BZ (USE_shifed_wf=.true.) shift=WF_shifts(ikbzp,:) @@ -136,19 +146,19 @@ subroutine DIPOLE_overlaps(Xk,Dip) if(WF_shifts(ikbzp,id)==2) shift(id)=0 endif ! - call WF_shift_kpoint((/1,Dip%ib(2)/),ikbzp,shift,Xk,WF_symm,WF_ikp) - ! - call WF_free(WF) - ! - do ib=1,Dip%ib(2) - if(.not.PAR_IND_VAL_BANDS_OVLP%element_1D(ib)) cycle - do ibp=1,Dip%ib(2) - if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle + do ibp=1,Dip%ib(2) + if(.not.PAR_IND_CON_BANDS_OVLP%element_1D(ibp)) cycle + call WF_symm_kpoint((/ibp,ibp/),ikbzp,i_sp_pol,Xk,WF_symm) + call WF_shift_kpoint((/ibp,ibp/),ikbzp,i_sp_pol,shift,Xk,WF_symm,WF_ikp) + do ib=1,Dip%ib(2) + if(.not.PAR_IND_VAL_BANDS_OVLP%element_1D(ib)) cycle DIP_S(ib,ibp,id+(istep-1)*3,ikbz,i_sp_pol)= & - & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib,i_sp_pol),WF_ikp(:,:,ibp,i_sp_pol)) + & Vstar_dot_V(wf_ng_overlaps*n_spinor,WF_ik(:,:,ib),WF_ikp(:,:,1)) enddo ! ibp enddo ! ib ! + call WF_free(WF) + ! enddo ! istep enddo ! idir ! @@ -172,7 +182,6 @@ subroutine DIPOLE_overlaps(Xk,Dip) wf_ng_1st_BZ=wf_ng_1st_BZ_save ! YAMBO_FREE(WF_symm) - YAMBO_FREE(WF_shifted) YAMBO_FREE(WF_ik) YAMBO_FREE(WF_ikp) ! diff --git a/src/el-ph/RT_project.dep b/src/el-ph/RT_project.dep index bbc20f4200..2455333893 100644 --- a/src/el-ph/RT_project.dep +++ b/src/el-ph/RT_project.dep @@ -1,6 +1,2 @@ - ELPH_acoustic_phonon_properties.o - ELPH_databases_check.o - ELPH_databases_grids_map.o - ELPH_databases_load.o - ELPH_databases_symmetrize.o + ELPH_Sigma_c.o diff --git a/src/hamiltonian/V_Hartree.F b/src/hamiltonian/V_Hartree.F index ada08038dd..37e5c6c9f8 100644 --- a/src/hamiltonian/V_Hartree.F +++ b/src/hamiltonian/V_Hartree.F @@ -35,9 +35,11 @@ subroutine V_Hartree(rho,vhr) ! call timing('V_Hartree',OPR='start') ! +!$OMP WORKSHARE vhg = (0._DP,0._DP) vhtmp = (0._DP,0._DP) rhog = rho +!$OMP END WORKSHARE ! ! FFT call: rho in reciprocal space ! @@ -71,7 +73,9 @@ subroutine V_Hartree(rho,vhr) call fft_3d(vhtmp,fft_dim,1) #endif ! +!$OMP WORKSHARE vhr(:,1) = real(vhtmp,SP) + !$OMP END WORKSHARE if(n_spin==2) vhr(:,2)=vhr(:,1) ! call timing('V_Hartree',OPR='stop') diff --git a/src/hamiltonian/XC_potentials.F b/src/hamiltonian/XC_potentials.F index 928e5cd2fb..772f133d07 100644 --- a/src/hamiltonian/XC_potentials.F +++ b/src/hamiltonian/XC_potentials.F @@ -10,7 +10,8 @@ subroutine XC_potentials(POTENTIALS_string) use pars, ONLY:schlen use drivers, ONLY:l_sc_ip,l_sc_hartree,l_sc_exx,l_sc_fock,l_sc_coh,l_sc_sex,l_sc_is_libDFT,& & l_sc_srpa,l_use_Hxc_collisions,l_use_COH_collisions,l_eval_collisions - use global_XC, ONLY:H_SE_EXX,H_SE_FOCK,H_SE_COH,H_SE_SEX,H_SE_EXXC,H_SE_SRPA,H_SE_HARTREE + use global_XC, ONLY:H_SE_EXX,H_SE_FOCK,H_SE_COH,H_SE_SEX,H_SE_EXXC,H_SE_SRPA,H_SE_HARTREE, & +& H_SE_LSEX,H_SE_LHF use hamiltonian, ONLY:H_kind,H_xc_functional,l_sc_XC_is_local,l_sc_V_is_local use xc_functionals, ONLY:XC_LDA_X,XC_LDA_C_PZ,XC_EXCHANGE_CORRELATION,XC_EXCHANGE,& & GS_xc_KIND,GS_xc_FUNCTIONAL @@ -140,6 +141,14 @@ subroutine XC_potentials(POTENTIALS_string) l_use_Hxc_collisions=.TRUE. endif H_kind=H_kind+H_SE_SEX + else if (STRING_same(trim(potentials(i_c)),'LSEX')) then + l_sc_V_is_local=.false. + l_sc_XC_is_local=.false. + H_kind=H_kind+H_SE_LSEX + else if (STRING_same(trim(potentials(i_c)),'LHF')) then + l_sc_V_is_local=.false. + l_sc_XC_is_local=.false. + H_kind=H_kind+H_SE_LHF else if (STRING_same(trim(potentials(i_c)),'COHSEX')) then l_sc_coh=.true. l_sc_sex=.true. diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 2b27665b4f..4a0270d393 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -482,10 +482,6 @@ subroutine LOCAL_setup_before_input_IO() end subroutine LOCAL_setup_before_input_IO ! subroutine LOCAL_after_input_IO - ! - ! q0 renormalization - ! - BSS_q0(:) = BSS_q0(:)*q0_def_norm/v_norm( BSS_q0) ! if (len_trim(BSE_mode)==0 ) BSE_mode="retarded" if (STRING_same(trim(BSE_mode),"causal") ) BSE_mode="retarded" diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 49abb118aa..d543c9cd37 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -104,7 +104,8 @@ subroutine INIT_activate() if (l_nl_optics) then call CPU_activate("NL") call CPU_activate("DIP") - call initactivate(1,'DIP_Threads NL_Threads') + call CPU_activate("OSCLL") + call initactivate(1,'DIP_Threads NL_Threads OSCLL_Threads') endif #endif ! @@ -122,7 +123,7 @@ subroutine INIT_activate() ! !Setup ! - if (l_setup) call initactivate(1,'MaxGvecs Gthresh K_grids IkSigLim IkXLim NoDiagSC') + if (l_setup) call initactivate(1,'MaxGvecs Gthresh K_grids IkSigLim IkXLim NoDiagSC EvalMagn') #if defined _ELPH if (l_setup) call initactivate(1,'BSEscatt') #endif @@ -205,7 +206,7 @@ subroutine INIT_activate() ! ! Dipoles & Gauges ! - call initactivate(1,'DipApproach DipComputed DipPDirect ShiftedPaths Gauge AnHall') + call initactivate(1,'DipApproach DipComputed DipPDirect ShiftedPaths Gauge') ! endif ! @@ -227,7 +228,8 @@ subroutine INIT_activate() ! Special case: The BSE equation is used to build up the BSE_Fxc kernel. if (l_bs_fxc) then call initactivate(1,'FxcGRLc FxcSVdig FxcRetarded FxcMEStps') - call initactivate(1,'BLongDir BEnRange BDmRange BEnSteps') + call initactivate(1,'BLongDir QPropDir BEnRange BDmRange BEnSteps') + !call initactivate(1,'EFieldDir QPropDir BEnRange BDmRange BEnSteps') endif ! endif @@ -243,7 +245,7 @@ subroutine INIT_activate() call INIT_RT_ctl_switch('R') #endif ! - call initactivate(1,'NoCondSumRule MetDamp AnHall') + call initactivate(1,'NoCondSumRule MetDamp') ! #if defined _NL || defined _SC call initactivate(1,'EvPolarization FrSndOrd') @@ -265,7 +267,8 @@ subroutine INIT_activate() ! if (l_optics.and.l_bse.and.l_bss.or.(l_bse.and.l_rpa_IP)) then ! - call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps BLongDir') + call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps BLongDir QPropDir') + !call initactivate(1,'BEnRange BDmRange BDmERef BEnSteps EFieldDir QPropDir') call initactivate(1,'BSEprop BSEdips') ! ! Special case: the BSE_Fxc kernel has been constructed @@ -553,10 +556,11 @@ subroutine INIT_activate() #if defined _NL if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') + call initactivate(1,'TestOSCLL') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps') if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL EvalCurrent InducedField FrPolPerdic') - call initactivate(1,'Gauge RADLifeTime HARRLvcs EXXRLvcs') + call initactivate(1,'TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') call init_QP_ctl_switch('G') ! do i1=1,n_ext_fields diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 0c2bbfb78b..3e64b49aa7 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -35,7 +35,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,& -& BSS_dr,BSS_er,BSS_q0,BSS_damp_reference,BSS_inversion_mode,& +& BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& & BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig,Haydock_iterMAX #if defined _SLEPC && !defined _NL use BS_solvers, ONLY:BSS_slepc_target_E,BSS_slepc_extraction,BSS_slepc_ncv,BSS_slepc_tol,BSS_slepc_maxit,& @@ -52,7 +52,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _SC || defined _RT || defined _QED use hamiltonian, ONLY:H_ref_bands,H_potential - use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands + use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,ng_oscll #endif use QP_m, ONLY:SC_E_threshold #if defined _SC @@ -93,7 +93,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db #endif #if defined _OPENMP - use openmp, ONLY:n_threads_X,n_threads_SE,n_threads_RT,n_threads_DIP,n_threads_K,n_threads_NL + use openmp, ONLY:n_threads_X,n_threads_SE,n_threads_RT,n_threads_DIP,n_threads_K,n_threads_NL, & +& n_threads_OSCLL #endif #if defined _SCALAPACK use SLK_m, ONLY:SLK_test_H_dim @@ -207,6 +208,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'K_Threads', '[OPENMP/BSK] Number of threads for response functions',n_threads_K) call it(defs,'X_Threads', '[OPENMP/X] Number of threads for response functions',n_threads_X) call it(defs,'DIP_Threads', '[OPENMP/X] Number of threads for dipoles',n_threads_DIP) + call it(defs,'OSCLL_Threads', '[OPENMP/X] Number of threads for Oscillators',n_threads_OSCLL) call it(defs,'SE_Threads', '[OPENMP/GW] Number of threads for self-energy',n_threads_SE) call it(defs,'RT_Threads', '[OPENMP/RT] Number of threads for real-time',n_threads_RT) call it(defs,'NL_Threads', '[OPENMP/NL] Number of threads for nl-optics',n_threads_NL) @@ -295,12 +297,14 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'NoCondSumRule' ,'[BSE/X] Do not impose the conductivity sum rule in velocity gauge',verb_level=V_resp) call it('f',defs,'MetDamp' , '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) - call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/magn/dich/photolum/esrt',BSE_prop) + call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt',BSE_prop) call it(defs,'BSEdips', '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',& & K_INV_EPS%PERT_FULL_ratio) - call it(defs,'BLongDir', '[BSS] [cc] Electric Field',BSS_q0) + call it(defs,'BLongDir', '[BSS] [cc] Electric Field versor',BSS_E_dir) + !call it(defs,'EFieldDir', '[BSS] [cc] Electric Field versor',BSS_E_dir) + call it(defs,'QPropDir', '[BSS] [cc] Propagation versor Field',BSS_Q_dir,verb_level=V_resp) call it(defs,'BEnRange', '[BSS] Energy range',BSS_er,E_unit) call it(defs,'BDmRange', '[BSS] Damping range',BSS_dr,E_unit) call it(defs,'BSHayTrs', '[BSS] Relative [o/o] Haydock threshold. Strict(>0)/Average(<0)',Haydock_threshold) @@ -355,7 +359,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! ! BSE properties: kerr, magnons, absorption, ... ! - call it('f',defs,'AnHall' , '[BSE] Add the anomalous Hall effect to eps if using length gauge',verb_level=V_resp) call it(defs,'PL_weights','[PL] [cc] Weights of the carthesian components of the emitted radiation',PL_weights,verb_level=V_resp) ! #if defined _RT @@ -411,7 +414,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'TwoAlpha', '[RT] C_nk ~ alpha*Gamma_nk^2 ',two_alpha,Verb_level=V_real_time) call it(defs,'GrKind', '[RT] G-ret kind: Lorentzian (QP)/ Hyperbolic QP_secant (HS)',Gr_kind,Verb_level=V_real_time) - call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative Yambo sets it equal to Phase_LifeTime in NL)', & + call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative RADLifeTime=Phase_LifeTime)', & & RAD_LifeTime,unit=Time_unit(1)) call it(defs,'RADmagnific','[RT] Radiative life-time magnification',RAD_magnification,Verb_level=V_real_time) call it(defs,'PhLifeTime', '[RT] Constant Dephasing Time',Phase_LifeTime,unit=Time_unit(1)) @@ -517,7 +520,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'NLstep', '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics) call it(defs,'NLtime', '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1)) call it(defs,'NLintegrator', '[NL] Integrator ("EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")',Integrator_name) - call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX") ',NL_correlation) + call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX/LSEX/LHF") ',NL_correlation) call it(defs,'NLLrcAlpha', '[NL] Long Range Correction',NL_LRC_alpha) call it(defs,'NLDamping', '[NL] Damping (or dephasing)',NL_damping,unit=E_unit) call it(defs,'NLEnRange', '[NL] Energy range (for loop on frequencies NLEnSteps/=0',NL_er,E_unit) @@ -525,6 +528,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'NLrotaxis', '[NL] Rotation axis (for the loop on angles NLAngSteps/=0)',NL_rot_axis) call it(defs,'NLEnSteps', '[NL] Energy steps for the loop on frequencies',n_frequencies) call it('f',defs,'UseDipoles','[NL] Use Covariant Dipoles (just for test purpose)',verb_level=V_nl_optics) + call it('f',defs,'TestOSCLL','[NL] Test Oscillators vs Full Collisions [for testing purposes]',verb_level=V_nl_optics) call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_nl_optics) call it('f',defs,'NoComprCOLL','[NL] Load collisions in double-precision and do not remove small elements (default false)',& & verb_level=V_nl_optics) @@ -740,6 +744,7 @@ subroutine CPU_structure_load() if (i_s==8) possible_fields='(w,k) ' ! NL if (i_s==9) possible_fields='(k) ' ! BZ if (i_s==10)possible_fields='(q,k,b) ' ! PH_SE + if (i_s==11)possible_fields='(k,b) ' ! OSCLL ! if (len_trim(CPU_structure(i_s)%Short_Description)==0) cycle name=trim(CPU_structure(i_s)%Short_Description)//"_CPU" diff --git a/src/io/.objects b/src/io/.objects index 428629a833..1bdf96c2d9 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -15,6 +15,10 @@ ELPH_objects = variables_ELPH.o io_ELPH.o io_gFsq.o #if defined _PHEL PHEL_objects = io_PH.o #endif +COLL_objects = +#if defined _SC || _RT +COLL_objects = io_OSCLL.o +#endif objs = ver_is_gt_or_eq.o \ io_Vnl.o io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ @@ -26,4 +30,4 @@ objs = ver_is_gt_or_eq.o \ io_header.o io_Double_Grid.o \ io_COL_CUT.o io_DB1_selective_scan.o variables_X.o variables_DIPOLES.o \ io_out_of_date.o \ - $(SC_objects) $(RT_objects) $(NL_objects) + $(SC_objects) $(RT_objects) $(NL_objects) $(COLL_objects) diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index dee33a1d31..32855d2dd8 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -17,6 +17,7 @@ io_MPA.o io_NL.o io_NLCC_pwscf.o + io_OSCLL.o io_PH.o io_QINDX.o io_QP_and_GF.o diff --git a/src/io/RT_project.dep b/src/io/RT_project.dep index a4625c321c..544ef7e355 100644 --- a/src/io/RT_project.dep +++ b/src/io/RT_project.dep @@ -1,5 +1,6 @@ io_DB1.o io_KB_real_space.o + io_OSCLL.o io_RT_components.o io_RT_components_G_lesser.o io_RT_components_OBS.o diff --git a/src/io/SC_project.dep b/src/io/SC_project.dep index 863d79b747..09f8e8df32 100644 --- a/src/io/SC_project.dep +++ b/src/io/SC_project.dep @@ -1,5 +1,6 @@ io_DB1.o io_KB_real_space.o + io_OSCLL.o io_SC_components.o load_SC_components.o variables_SC.o diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 05e263801c..600244a95e 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -6,7 +6,7 @@ ! Authors (see AUTHORS file for details): AM ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& -& bsL_magn,bsR_magn,bsR_kerr,bsR_pl) +& bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_pl) ! use pars, ONLY:SP,schlen,IP use stderr, ONLY:intc @@ -25,7 +25,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) , optional :: bsE(:) real(SP) ,pointer, optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer, optional :: bsR_kerr(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) ! ! Work Space ! @@ -127,6 +127,13 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& endif endif ! + if(present(bsR_dich)) then + if(associated(bsR_dich)) then + call io_bulk(ID,'BS_DICH_Residuals',VAR_SZ=(/2,BSS_n_eig,2/)) + call io_bulk(ID,C2=bsR_dich) + endif + endif + ! if(present(bsR_pl)) then if(associated(bsR_pl)) then call io_bulk(ID,'BS_PL_Residuals',VAR_SZ=(/2,BSS_n_eig/)) diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F new file mode 100644 index 0000000000..eee095f323 --- /dev/null +++ b/src/io/io_OSCLL.F @@ -0,0 +1,141 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +integer function io_OSCLL(q,ID) + ! + use pars, ONLY:SP,schlen,IP_YIO + use electrons, ONLY:levels + use matrix_operate,ONLY:mat_c2r,mat_r2c + use R_lattice, ONLY:nXkibz,bz_samp + use QP_m, ONLY:QP_nk + use IO_int, ONLY:io_connect,io_disconnect,io_header,io_fragment, & +& def_variable_bulk,io_variable_bulk,io_variable_elemental,def_variable_elemental + use IO_m, ONLY:io_sec,frag_DIP,read_is_on,write_is_on,io_extension,& +& RD_CL_IF_END,RD_CL,io_action,IO_NOT_ALLOWED,io_DIP, & +& io_status,io_PAR_cpu + use collision_ext, ONLY:COLL_bands,OSCLL,OSCLL_k,ng_oscll + use parallel_m, ONLY:PAR_Xk_ibz_index,PAR_Xk_nibz +#if defined _TIMING + use timing_m, ONLY:timing +#endif + ! +#include + ! + integer ::ID + type(bz_samp), intent(in) :: q + ! + ! Work Space + ! + integer :: ik,ik_mem,i_fragment,COLL_nbands,i_sp_pol,iqbz,ig,ib,ID_frag + character(schlen) :: VAR_name + complex(SP),allocatable :: disk_data(:,:) + ! +#if defined _TIMING + call timing('io_OSCLL',OPR='start') +#endif + ! + ID_frag=0 + io_OSCLL=0 + ! + io_extension(ID)='OSCLL' + io_OSCLL=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID,FORCE_READ_MODE=(.not.any((/io_sec(ID,:)==1/)))) + ! + if (io_OSCLL/=0) goto 1 + ! + if (any((/io_sec(ID,:)==1/))) then + ! + io_OSCLL=io_header(ID,R_LATT=.true.,WF=.true.,IMPOSE_SN=.true.) + if (io_OSCLL/=0) goto 1 + ! + ! Variable for the Oscillators + ! + call def_variable_elemental(ID,"ng_oscll",1,IP_YIO,0) + call io_variable_elemental(ID,VAR="RL vectors in oscillators",I0=ng_oscll,CHECK=.true.,OP=(/"=="/)) + ! + call def_variable_elemental(ID,"COLL_bands",2,IP_YIO,0) + call io_variable_elemental(ID,VAR="Oscillators bands range",I1=COLL_bands,CHECK=.true.,OP=(/"==","=="/)) + ! + io_OSCLL=io_status(ID) + if (io_OSCLL/=0) goto 1 + ! + endif + ! + i_fragment=maxval(io_sec(ID,:))-1 + ! + if(i_fragment<=nXkibz) then + i_sp_pol=1 + ik=i_fragment + else + i_sp_pol=2 + ik=i_fragment-nXkibz + endif + ! + if (ik==0) goto 1 + ! + ik_mem=PAR_Xk_ibz_index(ik) + ! + COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 + YAMBO_ALLOC(disk_data,(COLL_nbands,q%nbz)) + ! + if (read_is_on(ID)) then + if(.not.allocated(OSCLL)) then + YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,q%nbz,ng_oscll)) + endif + endif + ! + ! Fragmentation + ! + call io_fragment(ID,ID_frag,i_fragment=i_fragment) + ! + ! Manage RD_CL_IF_END + ! + if (io_action(ID)==RD_CL_IF_END.and.ik==nXkibz) io_action(ID)=RD_CL + ! + do ib=COLL_bands(1),COLL_bands(2) + do ig=1,ng_oscll + ! + if (write_is_on(ID)) disk_data=OSCLL_k(ib,:,:,ig) + ! + write (VAR_name,'(3(a,i4.4))') 'OSCLL_',ik,'_ib_',ib,'_ig_',ig + call def_variable_bulk(ID_frag,trim(VAR_name),1,(/2,COLL_nbands,q%nbz/),SP) + call io_variable_bulk(ID_frag,1,C2=disk_data) + ! + io_OSCLL=io_status(ID) + if (io_OSCLL/=0) goto 1 + ! + if (read_is_on(ID)) OSCLL(ib,:,ik_mem,:,ig)=disk_data + ! + enddo + enddo + ! + YAMBO_FREE(disk_data) + ! +1 call io_fragment_disconnect(ID,ID_frag) + ! + call io_disconnect(ID=ID) + ! +#if defined _TIMING + call timing('io_OSCLL',OPR='stop') +#endif + ! +end function diff --git a/src/io/io_X.F b/src/io/io_X.F index d562fce064..c91c207b72 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -227,6 +227,7 @@ integer function io_X(X,Xw,ID) endif ! 1 call io_fragment_disconnect(ID,ID_frag) + ! ! call io_disconnect(ID) ! diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index cd9c5487fd..3aac1c7636 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -10,7 +10,8 @@ integer function variables_NL(ID) use pars, ONLY:SP,IP,LP,IP_YIO,LP_YIO,CR_YIO use units, ONLY:AUT2FS, HA2EV, AU2KWCMm2 use nl_optics, ONLY:NL_damping,l_use_DIPOLES,NL_correlation,NL_er,NL_correlation,n_frequencies, & -& NL_desc,NL_rot_axis,n_angles,NL_initial_versor +& NL_desc,NL_rot_axis,n_angles,NL_initial_versor,l_eval_CURRENT + use collision_ext, ONLY:ng_oscll use QP_m, ONLY:QP_ng_SH,QP_ng_Sx use real_time, ONLY:Integrator_name,NE_steps,RT_step,l_RT_induced_field,RT_bands,RAD_LifeTime use electric, ONLY:l_force_SndOrd @@ -74,6 +75,10 @@ integer function variables_NL(ID) call io_variable_elemental(ID,VAR="[NL] Use DIPOLES",L0=l_use_DIPOLES,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) + call def_variable_elemental(ID,"l_eval_CURRENT",1,LP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Evaluate currrent and store on disk",L0=l_eval_CURRENT,CHECK=.true.,OP=(/"=="/), & +& DESCRIPTOR=NL_desc) + call def_variable_elemental(ID,"l_RT_induced_field",1,LP_YIO,0) call io_variable_elemental(ID,VAR="[NL] Induced Field",L0=l_RT_induced_field,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) @@ -85,10 +90,14 @@ integer function variables_NL(ID) call def_variable_elemental(ID,"QP_ng_Sx",1,IP_YIO,0) call io_variable_elemental(ID,VAR="[NL] Number of G in EXCHANGE(DFT)",I0=QP_ng_Sx,CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) - + call def_variable_elemental(ID,"ng_OSCLL",1,IP_YIO,0) + call io_variable_elemental(ID,VAR="[NL] Number of G in LSEX",I0=ng_oscll,CHECK=.true.,OP=(/"=="/), & + & DESCRIPTOR=NL_desc) call def_variable_elemental(ID,"RAD_LifeTime",1,SP,0) call io_variable_elemental(ID,VAR="[NL] Radiative Life-Time",R0=RAD_LifeTime,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=NL_desc) ! + ! INTEGRATOR + ! call def_variable_elemental(ID,"Integrator",1,CR_YIO,0) call io_variable_elemental(ID,CH0=Integrator_name,VAR=' [RT] Integrator ',CHECK=.true.,OP=(/"=="/), & & DESCRIPTOR=NL_desc) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 3174579111..dfe68ac82b 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -47,8 +47,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use wave_func, ONLY:wf_ng,wf_norm_test,wf_nb_io,wf_nb_io_groups,WF,WF_buffer,WF_buffered_IO use FFT_m, ONLY:fft_dim_loaded,fft_size,fft_dim,fft_multiplier use IO_m, ONLY:io_reset,max_io_units,serial_number,frag_WF - use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,& -& BSS_q0,Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,& + use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,BSS_P_dir,BSS_E_dir,BSS_Q_dir,& +& Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,& & BSS_damp_reference,BSS_Vnl_included,BSS_uses_GreenF,BSS_inversion_mode,& & BSS_perturbative_width,K_INV_EPS,K_INV_PL,K_INV_PI_PH,BSS_desc use descriptors,ONLY:IO_desc_reset @@ -449,7 +449,9 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) BSS_inversion_mode='pf' BSS_er=(/0._SP,10._SP/)/HA2EV BSS_dr=0.1_SP/HA2EV - BSS_q0=(/1._SP,0._SP,0._SP/) + BSS_E_dir=(/1._SP,0._SP,0._SP/) + BSS_P_dir=(/0._SP,1._SP,0._SP/) + BSS_Q_dir=(/0._SP,0._SP,1._SP/) BSS_uses_DbGd=.FALSE. BSS_damp_reference=0._SP BS_K_is_ALDA=.FALSE. diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index c10d440289..6a00274c95 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -49,11 +49,13 @@ module BS logical :: l_BS_jdos logical :: l_BS_abs logical :: l_BS_kerr + logical :: l_BS_kerr_asymm logical :: l_BS_photolum logical :: l_BS_magnons logical :: l_BS_dichroism logical :: l_BS_optics logical :: l_BS_esort + logical :: l_BS_esort_indx ! ! Dimensions !============= @@ -298,69 +300,9 @@ integer function T_group(I) if (I>=BS_T_grp_1st_el(BS_nT_grps-1)) T_group=BS_nT_grps end function ! - subroutine BS_oscillators_alloc(EXCHANGE,iG,CORRELATION,iB) - ! - use pars, ONLY:IP - use stderr, ONLY:intc - ! - logical, intent(in) :: EXCHANGE,CORRELATION - integer, intent(in) :: iG,iB - ! - if (EXCHANGE) then - if (BS_T_grp(iG)%size==0) return - YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) -#ifdef _CUDA - allocate(BS_T_grp(iG)%O_x_d,mold=BS_T_grp(iG)%O_x) -#endif - - endif - ! - if (CORRELATION) then - if (BS_blk(iB)%N_oscillators==0) return - YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) -#ifdef _CUDA - allocate(BS_blk(iB)%O_c_d,mold=BS_blk(iB)%O_c) -#endif - endif - ! - end subroutine - ! - subroutine BS_oscillators_free(iG_ref,iB_ref) - use stderr, ONLY:intc - integer, intent(in) :: iG_ref,iB_ref - integer :: iG,iB,ik_loop,ip_loop,ik_now,ip_now - do iG=iG_ref,1,-1 - YAMBO_FREE(BS_T_grp(iG)%O_x) -#ifdef _CUDA - if (allocated(BS_T_grp(iG)%O_x_d)) deallocate(BS_T_grp(iG)%O_x_d) -#endif - enddo - if(iB_ref==0) return - ik_now=BS_blk(iB_ref)%ik - ip_now=BS_blk(iB_ref)%ip - if(iB_ref==n_BS_blks) then - ik_now=0 - ip_now=0 - endif - do iB=iB_ref,1,-1 - ik_loop=BS_blk(iB)%ik - ip_loop=BS_blk(iB)%ip - if ( ik_now==ik_loop .and. ip_now==ip_loop .and. .not.l_BSE_minimize_memory ) cycle - if (.not.allocated(BS_blk(iB)%O_c)) exit - YAMBO_FREE(BS_blk(iB)%O_c) - YAMBO_FREE(BS_blk(iB)%O_table) - YAMBO_FREE(BS_blk(iB)%kp_table) -#ifdef _CUDA - if (allocated(BS_blk(iB)%O_c_d)) deallocate(BS_blk(iB)%O_c_d) -#endif - enddo - ! - end subroutine - ! subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) ! use pars, ONLY:IP,cZERO - use stderr, ONLY:intc use electrons, ONLY:levels,n_sp_pol integer, intent(in) :: iT,dom_k_T_group type(levels), intent(in) :: E @@ -409,7 +351,6 @@ subroutine BS_blks_free(i_BS_mat) end subroutine ! subroutine BS_Blocks_and_Transitions_free() - use stderr, ONLY:intc use parallel_m, ONLY:PAR_BS_T_grps_index integer :: iT ! @@ -444,7 +385,7 @@ subroutine BS_Blocks_and_Transitions_free() ! if(allocated(BS_blk)) deallocate(BS_blk) ! - end subroutine + end subroutine BS_Blocks_and_Transitions_free ! function BS_Block_size(i_block) ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index a9fe183972..4272efd78c 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -59,6 +59,9 @@ module BS_solvers real(SP) :: BSS_dr(2) real(SP) :: BSS_damp_reference real(SP) :: BSS_q0(3) + real(SP) :: BSS_E_dir(3) ! Electric field + real(SP) :: BSS_P_dir(3) ! Induced polarization + real(SP) :: BSS_Q_dir(3) ! Field propagation direction logical :: BSS_uses_DbGd logical :: BSS_Vnl_included logical :: BSS_uses_GreenF @@ -93,8 +96,8 @@ module BS_solvers character(schlen):: BSS_slepc_precondition !choose slepc eigenvalue precondition method (none,bcgs+jacobi) character(schlen):: BSS_slepc_extraction !choose slepc eigenvalue extraction method (ritz,harmonic) integer :: BSS_slepc_ncv !dimension of the subspace - integer :: BSS_slepc_mpd !maximum allowed dimension integer :: BSS_slepc_maxit !maximum number of iterations + integer :: BSS_slepc_mpd !maximum allowed dimension real(SP) :: BSS_slepc_tol !tolerance for the iterative solver real(SP) :: BSS_slepc_target_E !find eigenvalues close to this energy character(schlen):: BSS_slepc_matrix_format !matrix type ("shell","explicit","explicit-debug") @@ -153,7 +156,7 @@ integer function variables_BS(ID,iq,local_desc,CLOSE_the_menu,X) end function ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& - & bsL_magn,bsR_magn,bsR_kerr,bsR_pl) + & bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_pl) use pars, ONLY:SP use X_m, ONLY:X_t implicit none @@ -161,7 +164,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) ,optional :: bsE(:) real(SP), pointer,optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer,optional :: bsR_kerr(:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) end function ! integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn,Vnp1) diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index 4b3d23e89a..a9e9d8db86 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -121,6 +121,7 @@ module R_lattice integer :: n_g_shells ! Number of G-shells integer :: ng_vec ! Number of G-vectors integer :: ng_closed ! Number of G closed + integer :: G_m_G_maxval ! Maximum value of G_m_G integer ,allocatable :: ng_in_shell(:) ! Number of G in each shell integer ,allocatable :: g_rot(:,:) integer ,allocatable :: G_m_G(:,:) diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index f6a116dba2..74e771a73e 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -65,6 +65,7 @@ module X_m ! Absorption & Polarizability ! integer :: N_BS_E_sorted=0 + integer, allocatable :: BS_E_sorted_indx(:,:,:) complex(SP), allocatable :: BS_E_sorted(:,:,:) complex(SP), allocatable :: Resp_ii(:,:) complex(SP), allocatable :: Resp_ij(:,:) @@ -160,7 +161,7 @@ module X_m integer :: N_messages character(schlen) :: messages(N_MAX_columns) end type - integer, parameter :: N_X_obs=15 + integer, parameter :: N_X_obs=16 type(X_obs_t) :: X_obs(N_X_obs) ! interface @@ -176,7 +177,7 @@ subroutine X_OUTPUT_messages(iq,ig,Vnl,GF,ordering,Q_plus_G,MORE) character(*), optional :: MORE end subroutine ! - subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) + subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) use pars, ONLY:SP use frequency, ONLY:w_samp use descriptors, ONLY:IO_desc @@ -186,6 +187,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) integer, optional:: IQ,IG type(IO_desc),optional:: DESC real(SP), optional:: data(:) + integer, optional:: indexes(:) end subroutine ! subroutine X_Double_Grid_setup(iq,k,k_FGbz,nTrans_percent,Radius) diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index fba3d64a0c..cfde57b921 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -92,6 +92,13 @@ module collision_ext type(COLLISIONS_element), allocatable :: HXC_COLL_element(:) type(COLLISIONS_element), allocatable :: P_COLL_element(:) ! + ! On the fly long-range SEX (LSEX) collisions + ! ==================================== + integer :: ng_oscll ! number of G-vectors in the Oscillators + complex(SP), allocatable :: W(:,:,:) ! screened interaction + complex(SP), allocatable :: OSCLL(:,:,:,:,:) ! Oscillators + complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in k, just for the evaluation + ! contains ! subroutine COLLISIONS_naming( H_SE_kind , what ) diff --git a/src/modules/mod_frequency.F b/src/modules/mod_frequency.F index 5911c804ff..6c5f9e87a4 100644 --- a/src/modules/mod_frequency.F +++ b/src/modules/mod_frequency.F @@ -33,10 +33,10 @@ module frequency ! type w_samp integer :: n_freqs - real(SP) :: er(2) + real(SP) :: er(2) ! Energy range real(SP) :: ir(2) real(SP) :: damp_reference - real(SP) :: dr(2) + real(SP) :: dr(2) ! Damping range real(SP) :: per_memstps complex(SP),allocatable :: p(:) character(2) :: samp_type diff --git a/src/modules/mod_global_XC.F b/src/modules/mod_global_XC.F index afde58dd0c..8bb40f39e2 100644 --- a/src/modules/mod_global_XC.F +++ b/src/modules/mod_global_XC.F @@ -101,6 +101,8 @@ module global_XC H_SE_SRPA_SLT = 325, & ! OEP-COHSEX (SLT apprx) H_SE_COH = 326, & ! Coulomb-Hole H_SE_SEX = 327, & ! Screened-eXchange + H_SE_LSEX = 328, & ! Long range-screened-eXchange + H_SE_LHF = 329, & ! Long range-eXchange H_SE_COHSEX = H_SE_SEX+H_SE_COH ! Coulomb-Hole + Screened-eXchange ! ! Phonons diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 6c240a30f9..f7ab3bf85f 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -171,8 +171,8 @@ integer function eval_G_minus_G(iG,iGo,force_recompute,COMM) type(yMPI_comm), optional :: COMM end function ! - subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,& -& sp_pol_to_load,space,title,impose_free_and_alloc,& + subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,sp_pol_to_load,& +& k_extrema_only,space,title,impose_free_and_alloc,& & force_WFo,keep_states_to_load,quiet) use wave_func, ONLY:WAVEs integer :: iG_max,iGo_max,bands_to_load(2),kpts_to_load(2) @@ -180,16 +180,18 @@ subroutine WF_load(WF,iG_max,iGo_max,bands_to_load,kpts_to_load,& integer, optional :: sp_pol_to_load(2) character(*),optional :: space character(*),optional :: title + logical ,optional :: k_extrema_only logical ,optional :: impose_free_and_alloc logical ,optional :: force_WFo logical ,optional :: keep_states_to_load logical, optional, intent(in) :: quiet end subroutine ! - subroutine WF_free(WF,keep_fft) + subroutine WF_free(WF,keep_fft,keep_states_to_load) use wave_func, ONLY:WAVEs type(WAVEs) :: WF logical ,optional :: keep_fft + logical ,optional :: keep_states_to_load end subroutine ! subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) @@ -205,21 +207,44 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) integer , optional :: E_k_ind(n_sp_pol,2) ! k->k' of the indirect gap end subroutine ! - subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left,BS_R_right,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_right_kerr,BS_R_PL) + subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP use frequency, ONLY:w_samp type(w_samp),intent(in) :: W integer, intent(in) :: iq,i_BS_mat complex(SP), intent(in) :: BS_E(BSS_n_eig) - complex(SP), pointer, intent(in) :: BS_R_left(:),BS_R_right(:) + complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_right_kerr(:) + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine ! + subroutine K_diago_right_residuals(mode,i_BS_mat,BS_E,BS_R_right,BS_V_right) + use BS_solvers, ONLY:BSS_n_eig + use pars, ONLY:SP + implicit none + character(*),intent(in) :: mode + integer, intent(in) :: i_BS_mat + complex(SP), intent(in) :: BS_E(BSS_n_eig) + complex(SP), intent(out) :: BS_R_right(BSS_n_eig) + complex(SP), intent(in) :: BS_V_right(:,:) + end subroutine K_diago_right_residuals + ! + subroutine K_diago_left_residuals(mode,i_BS_mat,BS_E,BS_R_left,BS_V_left,BS_overlap) + use BS_solvers, ONLY:BSS_n_eig + use pars, ONLY:SP + implicit none + character(*),intent(in) :: mode + integer, intent(in) :: i_BS_mat + complex(SP), intent(in) :: BS_E(BSS_n_eig) + complex(SP),target, intent(out) :: BS_R_left(BSS_n_eig) + complex(SP), intent(in) :: BS_V_left(:,:) + complex(SP),optional,intent(in) :: BS_overlap(BSS_n_eig,BSS_n_eig) + end subroutine K_diago_left_residuals + ! subroutine PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) use pars, ONLY:SP use BS, ONLY:BS_H_dim @@ -271,42 +296,42 @@ end function TDDFT_ALDA_eh_space_R_kernel ! interface WF_shift_kpoint ! - subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_out) + subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,i_sp_pol,wf_shift,Xk,WF_k_in,WF_k_out) use pars, ONLY:SP - use electrons, ONLY:n_spinor,n_sp_pol + use electrons, ONLY:n_spinor use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps use R_lattice, ONLY:bz_samp - integer, intent(in) :: wf_shift(3),ikbz,b_to_shift(2) + integer, intent(in) :: wf_shift(3),ikbz,i_sp_pol,b_to_shift(2) type(bz_samp), intent(in) :: Xk complex(SP), intent(in) DEV_ATTR :: & -& WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) +& WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2)) complex(SP), intent(out) DEV_ATTR :: & -& WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) +& WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2)) end subroutine end interface ! interface WF_symm_kpoint ! - subroutine WF_symm_kpoint_cpu(b_to_load,ikbz,Xk,WF_k_out) + subroutine WF_symm_kpoint_cpu(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) use pars, ONLY:SP use R_lattice, ONLY:bz_samp use wave_func, ONLY:wf_ng_1st_BZ - use electrons, ONLY:n_spinor,n_sp_pol - integer, intent(in) :: ikbz,b_to_load(2) + use electrons, ONLY:n_spinor + integer, intent(in) :: ikbz,i_sp_pol,b_to_load(2) type(bz_samp), intent(in) :: Xk - complex(SP), intent(out) :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2),n_sp_pol) + complex(SP), intent(out) :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2)) end subroutine WF_symm_kpoint_cpu ! #ifdef _CUDA - subroutine WF_symm_kpoint_gpu(b_to_load,ikbz,Xk,WF_k_out) + subroutine WF_symm_kpoint_gpu(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) use pars, ONLY:SP use R_lattice, ONLY:bz_samp use wave_func, ONLY:wf_ng_1st_BZ - use electrons, ONLY:n_spinor,n_sp_pol - integer, intent(in) :: ikbz,b_to_load(2) + use electrons, ONLY:n_spinor + integer, intent(in) :: ikbz,i_sp_pol,b_to_load(2) type(bz_samp), intent(in) :: Xk complex(SP), intent(out) DEV_ATTR :: & -& WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2),n_sp_pol) +& WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2)) end subroutine WF_symm_kpoint_gpu #endif end interface diff --git a/src/modules/mod_interpolate.F b/src/modules/mod_interpolate.F index d95373bc2c..ce3979cafd 100644 --- a/src/modules/mod_interpolate.F +++ b/src/modules/mod_interpolate.F @@ -12,6 +12,9 @@ module interpolate ! ! Interpolation according to PRB 38 p2721 ! Code copied from BolzTraP + ! Notice that this interpolation is the same interpolation + ! implemented in AbiPy (or YamboPy) + ! where is called Shankland-Koelling-Wood(SKW) ! implicit none ! diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index b779041af2..e80ebcb1a4 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -61,6 +61,9 @@ module nl_optics ! real(SP), allocatable :: full_rho(:) ! density of all bands from 1:SC_bands(2) ! + ! Sigma sex at equilibrium (for oscillators) + complex(SP), allocatable :: Sigma_SEX_EQ(:,:,:,:) + ! ! Integrator Variables ! integer, parameter :: EULER = 1 @@ -96,8 +99,11 @@ module nl_optics integer, parameter :: LRCW = 6 integer, parameter :: HF = 7 integer, parameter :: SEX = 8 + integer, parameter :: LSEX = 9 + integer, parameter :: LHF = 10 ! logical :: eval_COLLISIONS + logical :: eval_OSCLL logical :: eval_dG ! ! Non-linear spectra parameters @@ -138,6 +144,7 @@ module nl_optics ! logical :: l_use_DIPOLES ! Use standard dipoles (valid only for linear response) logical :: l_eval_CURRENT ! Evaluate current using the commutator v=[H,r] and the IP formulation + logical :: l_test_OSCLL ! Test collisions built using OSCLLs vs standard Collisions ! ! IO variables ! @@ -179,14 +186,14 @@ subroutine NL_alloc(en) YAMBO_ALLOC(V_xc_0,(fft_size,n_spin)) endif ! - if(eval_dG.or.l_pump_and_probe) then - YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,1)) - endif - ! if(l_use_Hxc_collisions) then YAMBO_ALLOC(RT_Vnl_xc,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol)) endif ! + if(eval_dG.or.l_pump_and_probe) then + YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,1)) + endif + ! ! Reference energies ! YAMBO_ALLOC(E_full,(1:NL_bands(2),QP_nk,n_sp_pol)) @@ -225,6 +232,10 @@ subroutine NL_alloc_k_distributed(en) YAMBO_ALLOC(I_relax,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),maxval(en%nbf),PAR_Xk_nibz,n_sp_pol)) YAMBO_ALLOC(Ho_plus_Sigma,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),PAR_Xk_nibz,n_sp_pol)) ! + if(Correlation==LSEX.or.Correlation==LHF) then + YAMBO_ALLOC(Sigma_SEX_EQ,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),n_sp_pol,PAR_Xk_nibz)) + endif + ! end subroutine NL_alloc_k_distributed ! subroutine NL_free @@ -258,13 +269,12 @@ subroutine NL_free YAMBO_FREE(E_ext_t) YAMBO_FREE(E_ks_t) ! - if(l_use_Hxc_collisions.or.l_pump_and_probe) then - YAMBO_FREE(dG_lesser) - endif - ! if(l_use_Hxc_collisions) then YAMBO_FREE(RT_Vnl_xc) endif + if(eval_dG.or.l_pump_and_probe) then + YAMBO_FREE(dG_lesser) + endif ! end subroutine NL_free ! diff --git a/src/modules/mod_openmp.F b/src/modules/mod_openmp.F index 408ce42556..8fcb58f977 100644 --- a/src/modules/mod_openmp.F +++ b/src/modules/mod_openmp.F @@ -28,6 +28,7 @@ module openmp integer :: n_threads_K = 0 integer :: n_threads_NL = 0 integer :: n_threads_BZINDX= 0 + integer :: n_threads_OSCLL = 0 integer :: n_threads_now = 0 logical :: master_thread = .TRUE. ! @@ -67,14 +68,15 @@ subroutine OPENMP_initialize( ) ! n_threads = 1 n_threads_limit = 1 - n_threads_now = 1 - n_threads_FFT = 0 - n_threads_X = 1 - n_threads_SE = 1 - n_threads_RT = 1 - n_threads_K = 1 - n_threads_DIP = 1 - n_threads_NL = 1 + n_threads_now = 1 + n_threads_FFT = 0 + n_threads_X = 1 + n_threads_SE = 1 + n_threads_RT = 1 + n_threads_K = 1 + n_threads_DIP = 1 + n_threads_NL = 1 + n_threads_OSCLL= 1 ! n_out_threads = 1 n_inn_threads = 1 diff --git a/src/modules/mod_parallel.F b/src/modules/mod_parallel.F index 0b85f48b88..70d78fca48 100644 --- a/src/modules/mod_parallel.F +++ b/src/modules/mod_parallel.F @@ -75,7 +75,8 @@ module parallel_m ! ! Logicals ! - logical :: l_par_X_T,l_par_X_G,l_par_X_G_finite_q,l_par_DIP,l_par_BZINDX,l_par_SE,l_par_RT,l_par_SC,l_par_NL + logical :: l_par_X_T,l_par_X_G,l_par_X_G_finite_q,l_par_DIP,l_par_BZINDX,l_par_SE, & +& l_par_RT,l_par_SC,l_par_NL,l_par_OSCLL ! ! In a parallel runs, when some loops not involving all CPU's are parallelized it is usefull to keep ! the operations local in the cpu world @@ -540,7 +541,7 @@ integer function i_INTER_CHAIN(N_father,N_child) character(lchlen) function PARALLEL_message(i_s) use stderr, ONLY:intc use openmp, ONLY:n_threads_X,n_threads_SE,n_threads_RT,n_threads_DIP,n_threads_K, & -& n_threads_NL,n_threads_BZINDX,n_threads +& n_threads_NL,n_threads_BZINDX,n_threads_OSCLL,n_threads integer :: i_s ! PARALLEL_message=" " @@ -562,6 +563,7 @@ character(lchlen) function PARALLEL_message(i_s) if (n_threads_RT >0) PARALLEL_message=trim(PARALLEL_message)//"-"//trim(intc(n_threads_RT))//"(threads@RT)" if (n_threads_K >0) PARALLEL_message=trim(PARALLEL_message)//"-"//trim(intc(n_threads_K))//"(threads@K)" if (n_threads_NL >0) PARALLEL_message=trim(PARALLEL_message)//"-"//trim(intc(n_threads_NL))//"(threads@NL)" + if (n_threads_OSCLL >0) PARALLEL_message=trim(PARALLEL_message)//"-"//trim(intc(n_threads_OSCLL))//"(threads@OSCLL)" else PARALLEL_message=trim(CPU_structure(i_s)%Short_Description)//"(environment)-"//& & trim(CPU_structure(i_s)%CPU_string)//"(CPUs)-"//& @@ -608,6 +610,8 @@ subroutine CPU_str_reset() CPU_structure(9)%Short_Description="BZINDX" CPU_structure(10)%Long_Description="Phonon_Self_Energy" CPU_structure(10)%Short_Description="PH_SE" + CPU_structure(11)%Long_Description="Oscillators" + CPU_structure(11)%Short_Description="OSCLL" end subroutine ! subroutine COMM_reset(COMM) diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index aa57da7162..19220da362 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -683,4 +683,28 @@ subroutine degeneration_finder(E,n,first_deg_el,deg_elmnts,deg_grps,& ! end subroutine ! + ! Least common multiple (LCM) + ! + integer function lcm(a, b) + INTEGER, INTENT(IN) :: a, b + INTEGER :: n, m, p, temp + ! + n = a + m = b + IF (n < m) THEN + temp = m + m = n + n = temp + END IF + ! + p = n + DO WHILE (p /= 0) + p = MOD(m, n) + m = n + n = p + END DO + ! + lcm = (a * b) / m + end function lcm + ! end module vec_operate diff --git a/src/modules/mod_wrapper.F b/src/modules/mod_wrapper.F index 939cf485fa..60997b16db 100644 --- a/src/modules/mod_wrapper.F +++ b/src/modules/mod_wrapper.F @@ -13,7 +13,12 @@ module wrapper ! TRANSA = 'T' or 't', op( A ) = A'. ! TRANSA = 'C' or 'c', op( A ) = conjg( A' ). ! - use pars, ONLY:SP,cI + use pars, ONLY:SP,cI + ! + ! Implementation based on C_F_POINTER assumes that variables are contiguous, + ! which may not be the case + ! + use iso_c_binding, ONLY:C_LOC,C_F_POINTER #ifdef _CUDA use cublas #endif @@ -54,9 +59,9 @@ module wrapper end interface ! interface Vstar_dot_V - module procedure Vstar_dot_V_c1_cpu, Vstar_dot_V_c2_cpu + module procedure Vstar_dot_V_c1_cpu,Vstar_dot_V_c2_cpu,V_dot_V_r1_cpu,V_dot_V_r2_cpu #ifdef _CUDA - module procedure Vstar_dot_V_c1_gpu, Vstar_dot_V_c2_gpu + module procedure Vstar_dot_V_c1_gpu,Vstar_dot_V_c2_gpu,V_dot_V_r1_gpu,V_dot_V_r2_gpu #endif end interface ! @@ -68,9 +73,9 @@ module wrapper end interface ! interface V_dot_V - module procedure V_dot_V_r1_cpu, V_dot_V_c1_cpu, V_dot_V_c2_cpu + module procedure V_dot_V_r1_cpu,V_dot_V_r2_cpu,V_dot_V_c1_cpu,V_dot_V_c2_cpu #ifdef _CUDA - module procedure V_dot_V_c1_gpu + module procedure V_dot_V_r1_gpu,V_dot_V_r2_gpu,V_dot_V_c1_gpu,V_dot_V_c2_gpu #endif end interface ! @@ -356,7 +361,7 @@ end subroutine V_copy complex(SP) function Vstar_dot_V_c1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) #if defined _DOUBLE complex(SP)::zdotc Vstar_dot_V_c1_cpu=ZDOTC(N,CX,1,CY,1) @@ -369,7 +374,7 @@ end function Vstar_dot_V_c1_cpu complex(SP) function Vstar_dot_V_c2_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(:,:),CY(:,:) + complex(SP),target,contiguous,intent(in) :: CX(:,:),CY(:,:) #if defined _DOUBLE complex(SP)::zdotc Vstar_dot_V_c2_cpu=ZDOTC(N,CX,1,CY,1) @@ -383,7 +388,7 @@ end function Vstar_dot_V_c2_cpu complex(SP) function Vstar_dot_V_c1_gpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP), device, intent(in) :: CX(*),CY(*) + complex(SP), device, intent(in) :: CX(:),CY(:) ! #if defined _DOUBLE Vstar_dot_V_c1_gpu=cublasZdotc(N,CX,1,CY,1) @@ -395,7 +400,10 @@ end function Vstar_dot_V_c1_gpu complex(SP) function Vstar_dot_V_c2_gpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP), device, intent(in) :: CX(:,:),CY(:,:) + complex(SP), device, target, intent(in) :: CX(:,:),CY(:,:) + !real(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) ! #if defined _DOUBLE Vstar_dot_V_c2_gpu=cublasZdotc(N,CX,1,CY,1) @@ -403,7 +411,6 @@ complex(SP) function Vstar_dot_V_c2_gpu(N,CX,CY) Vstar_dot_V_c2_gpu=cublasCdotc(N,CX,1,CY,1) #endif end function Vstar_dot_V_c2_gpu - ! #endif ! !============== @@ -445,7 +452,7 @@ end function Vstar_dot_VV_c1_gpu real(SP) function V_dot_V_r1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - real(SP),intent(in) :: CX(*),CY(*) + real(SP),intent(in) :: CX(:),CY(:) #if defined _DOUBLE real(SP)::ddot V_dot_V_r1_cpu=DDOT(N,CX,1,CY,1) @@ -454,11 +461,64 @@ real(SP) function V_dot_V_r1_cpu(N,CX,CY) V_dot_V_r1_cpu=SDOT(N,CX,1,CY,1) #endif end function V_dot_V_r1_cpu + ! + real(SP) function V_dot_V_r2_cpu(N,CX,CY) + implicit none + integer, intent(in) :: N + real(SP),target,intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + real(SP)::ddot +#else + real(SP)::sdot +#endif + !real(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_r2_cpu=DDOT(N,CX,1,CY,1) +#else + V_dot_V_r2_cpu=SDOT(N,CX,1,CY,1) +#endif + end function V_dot_V_r2_cpu + ! +#ifdef _CUDA + real(SP) function V_dot_V_r1_gpu(N,CX,CY) + implicit none + integer, intent(in) :: N + real(SP), device, intent(in) :: CX(:),CY(:) +#if defined _DOUBLE + real(SP)::ddot + V_dot_V_r1_gpu=cublasDDOT(N,CX,1,CY,1) +#else + real(SP)::sdot + V_dot_V_r1_gpu=cublasSDOT(N,CX,1,CY,1) +#endif + end function V_dot_V_r1_gpu + ! + real(SP) function V_dot_V_r2_gpu(N,CX,CY) + implicit none + integer, intent(in) :: N + real(SP), device, target, intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + real(SP)::ddot +#else + real(SP)::sdot +#endif + !real(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_r2_gpu=cublasDDOT(N,CX,1,CY,1) +#else + V_dot_V_r2_gpu=cublasSDOT(N,CX,1,CY,1) +#endif + end function V_dot_V_r2_gpu +#endif ! complex(SP) function V_dot_V_c1_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) #if defined _DOUBLE complex(SP)::zdotu V_dot_V_c1_cpu=ZDOTU(N,CX,1,CY,1) @@ -471,12 +531,18 @@ end function V_dot_V_c1_cpu complex(SP) function V_dot_V_c2_cpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP),intent(in) :: CX(:,:),CY(:,:) + complex(SP),target,intent(in) :: CX(:,:),CY(:,:) #if defined _DOUBLE complex(SP)::zdotu - V_dot_V_c2_cpu=ZDOTU(N,CX,1,CY,1) #else complex(SP)::cdotu +#endif + !complex(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_c2_cpu=ZDOTU(N,CX,1,CY,1) +#else V_dot_V_c2_cpu=CDOTU(N,CX,1,CY,1) #endif end function V_dot_V_c2_cpu @@ -485,7 +551,7 @@ end function V_dot_V_c2_cpu complex(SP) function V_dot_V_c1_gpu(N,CX,CY) implicit none integer, intent(in) :: N - complex(SP), device, intent(in) :: CX(*),CY(*) + complex(SP), device, intent(in) :: CX(:),CY(:) #if defined _DOUBLE complex(SP)::zdotu V_dot_V_c1_gpu=cublasZDOTU(N,CX,1,CY,1) @@ -494,6 +560,25 @@ complex(SP) function V_dot_V_c1_gpu(N,CX,CY) V_dot_V_c1_gpu=cublasCDOTU(N,CX,1,CY,1) #endif end function V_dot_V_c1_gpu + ! + complex(SP) function V_dot_V_c2_gpu(N,CX,CY) + implicit none + integer, intent(in) :: N + complex(SP), device, target, intent(in) :: CX(:,:),CY(:,:) +#if defined _DOUBLE + complex(SP)::zdotu +#else + complex(SP)::cdotu +#endif + !complex(SP),pointer :: CX1D(:),CY1D(:) + !call C_F_POINTER(C_LOC(CX),CX1D,(/N/)) + !call C_F_POINTER(C_LOC(CY),CY1D,(/N/)) +#if defined _DOUBLE + V_dot_V_c2_gpu=cublasZDOTU(N,CX,1,CY,1) +#else + V_dot_V_c2_gpu=cublasCDOTU(N,CX,1,CY,1) +#endif + end function V_dot_V_c2_gpu #endif ! !============== diff --git a/src/modules/mod_wrapper_omp.F b/src/modules/mod_wrapper_omp.F index 47669d8ee9..029ffdd528 100644 --- a/src/modules/mod_wrapper_omp.F +++ b/src/modules/mod_wrapper_omp.F @@ -43,6 +43,10 @@ module wrapper_omp module procedure V_dot_V_r1_omp, V_dot_V_c1_omp, V_dot_V_c2_omp end interface ! + interface Vstar_dot_V_omp + module procedure V_dot_V_r1_omp, Vstar_dot_V_c1_omp, Vstar_dot_V_c2_omp + end interface + ! public :: V_copy_omp public :: Vstar_dot_V_omp public :: V_dot_V_omp @@ -283,9 +287,9 @@ end subroutine V_copy_omp ! DOT PRODUCTS !============== ! - complex(SP) function Vstar_dot_V_omp(N,CX,CY) + complex(SP) function Vstar_dot_V_c1_omp(N,CX,CY) integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) ! #if defined _OPENMP_INT_LINALG integer :: i @@ -297,19 +301,45 @@ complex(SP) function Vstar_dot_V_omp(N,CX,CY) ctmp=ctmp +conjg(CX(i))*CY(i) enddo !$omp end parallel do - Vstar_dot_V_omp=ctmp + Vstar_dot_V_c1_omp=ctmp + else + Vstar_dot_V_c1_omp=Vstar_dot_V(N,CX,CY) + endif +#else + Vstar_dot_V_c1_omp=Vstar_dot_V(N,CX,CY) +#endif + ! + end function Vstar_dot_V_c1_omp + ! + complex(SP) function Vstar_dot_V_c2_omp(N,CX,CY) + integer, intent(in) :: N + complex(SP),intent(in) :: CX(:,:),CY(:,:) + ! +#if defined _OPENMP_INT_LINALG + integer :: i,j + complex(SP) :: ctmp + if (n_threads_now>1) then + ctmp=0.0_SP + !$omp parallel do default(shared), private(i), reduction(+:ctmp), collapse(2) + do j=1,N/size(CX,1) + do i=1,size(CX,1) + ctmp=ctmp +conjg(CX(i,j))*CY(i,j) + enddo + enddo + !$omp end parallel do + Vstar_dot_V_c2_omp=ctmp else - Vstar_dot_V_omp=Vstar_dot_V(N,CX,CY) + Vstar_dot_V_c2_omp=Vstar_dot_V(N,CX,CY) endif #else - Vstar_dot_V_omp=Vstar_dot_V(N,CX,CY) + Vstar_dot_V_c2_omp=Vstar_dot_V(N,CX,CY) #endif ! - end function Vstar_dot_V_omp + end function Vstar_dot_V_c2_omp ! real(SP) function V_dot_V_r1_omp(N,CX,CY) integer, intent(in) :: N - real(SP),intent(in) :: CX(*),CY(*) + real(SP),intent(in) :: CX(:),CY(:) ! #if defined _OPENMP_INT_LINALG integer :: i @@ -332,7 +362,7 @@ end function V_dot_V_r1_omp ! complex(SP) function V_dot_V_c1_omp(N,CX,CY) integer, intent(in) :: N - complex(SP),intent(in) :: CX(*),CY(*) + complex(SP),intent(in) :: CX(:),CY(:) ! #if defined _OPENMP_INT_LINALG integer :: i diff --git a/src/nloptics/.objects b/src/nloptics/.objects index be59f324fa..d67e16b2e1 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -1,5 +1,6 @@ #if defined _NL -objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL_Integrator.o NL_damping.o \ +objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL_Integrator.o \ + NL_damping.o NL_test_collisions.o \ NL_Hamiltonian.o NL_output.o DIP_polarization.o NL_average_operator.o EXC_macroscopic_JGM.o \ NL_databases_IO.o NL_build_dG_lesser.o NL_build_valence_bands.o EXP_step.o \ NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o \ diff --git a/src/nloptics/DOUBLE_project.dep b/src/nloptics/DOUBLE_project.dep index 1d9d77014a..68b0c91045 100644 --- a/src/nloptics/DOUBLE_project.dep +++ b/src/nloptics/DOUBLE_project.dep @@ -17,6 +17,7 @@ NL_initialize.o NL_output.o NL_start_and_restart.o + NL_test_collisions.o RK_basestep.o el_density_vbands.o diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 2b9062bad3..7784e2cc8c 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -27,7 +27,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) use xc_functionals, ONLY:V_xc,XC_potential_driver use nl_optics, ONLY:Correlation,V_xc_0,full_rho,IPA,E_full,LRC,JGM,LRCW,l_use_DIPOLES,NL_LRC_alpha, & & NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,eval_dG, & -& NL_bands,VAL_BANDS,NL_P,l_pump_and_probe +& NL_bands,VAL_BANDS,NL_P,l_pump_and_probe,LSEX,LHF use global_XC, ONLY:WF_xc_functional,WF_kind use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index use wrapper_omp, ONLY:M_plus_alpha_M_omp @@ -171,8 +171,10 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! Build the Hamiltonian ! ===================== ! +!$OMP WORKSHARE Ho_plus_Sigma=cZERO I_relax =cZERO +!$OMP END WORKSHARE ! do i_sp_pol=1,n_sp_pol do ik=1,QP_nk @@ -219,10 +221,12 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! endif ! +! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG_lesser(:,:,:,1),H_nl_sc,k,q,E,ik,i_sp_pol) + if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_vbands(V_bands,H_nl_sc,k,q,E,ik,i_sp_pol) + ! if(l_use_Hxc_collisions) then call M_plus_alpha_M_omp(RT_nbands,cONE,RT_Vnl_xc(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),ik,i_sp_pol),& & H_nl_sc(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2))) - endif ! ! Damping: NL_damping fills the I_relax matrix diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index e4241a4118..966c8aa35b 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): MG CA ! -subroutine NL_driver(E,X,k,q,Dip) +subroutine NL_driver(E,X,Xw,k,q,Dip) ! use pars, ONLY:pi,SP,cZERO,cONE,schlen use vec_operate, ONLY:axis_rotation @@ -14,7 +14,7 @@ subroutine NL_driver(E,X,k,q,Dip) use QP_m, ONLY: QP_ng_SH,QP_ng_Sx use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use collision_ext, ONLY:COLLISIONS_CV_only + use collision_ext, ONLY:COLLISIONS_CV_only,HXC_collisions use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t,DIP_alloc,DIP_S use wave_func, ONLY:WF,wf_ng @@ -22,18 +22,21 @@ subroutine NL_driver(E,X,k,q,Dip) use hamiltonian, ONLY:WF_Go_indx,H_QP_table_setup,H_potential use R_lattice, ONLY:bz_samp,qindx_free use fields, ONLY:Efield + use frequency, ONLY:w_samp use QP_CTL_m, ONLY:QP_apply + use QP_m, ONLY:QP_nk use nl_optics, ONLY:n_frequencies,Correlation,IPA,NL_alloc,NL_free,V_bands,eval_dG,NL_J,NL_initial_J,NL_initial_versor, & & NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P,loop_on_angles,n_angles,& & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,runs_done,n_runs_todo,l_eval_CURRENT,NL_rot_axis,& & HF,SEX,NL_bands,NL_nbands,NL_alloc_k_distributed,NL_J_t,n_runs,loop_on_frequencies, & -& l_pump_and_probe +& l_pump_and_probe,eval_OSCLL,l_test_OSCLL,LSEX,LHF,Sigma_SEX_EQ use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands, & eval_DFT,eval_HARTREE,RT_P,RT_ind_J use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index - use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz + use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz,PAR_Xk_ibz_index use collision_ext, ONLY:COLLISIONS_have_HARTREE + use collision_ext, ONLY:ng_oscll,OSCLL,W ! #include ! @@ -43,12 +46,13 @@ subroutine NL_driver(E,X,k,q,Dip) type(bz_samp) :: k,q type(X_t) :: X(2) type(DIPOLE_t) :: Dip + type(w_samp) :: Xw(2) ! logical, external :: stop_now ! ! Work Space ! - integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,nw + integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,nw,ik,ik_mem character(schlen) :: l_message logical :: l_dynamics_is_over integer :: ID_RESTART @@ -80,7 +84,8 @@ subroutine NL_driver(E,X,k,q,Dip) ! ! Dipoles & WF dimensions !========================= - call WF_and_dipole_dimensions(X,k) + + call WF_and_dipole_dimensions(X(1),k) ! ! QP dimensions !================ @@ -88,10 +93,7 @@ subroutine NL_driver(E,X,k,q,Dip) ! ! Non_Linear parallization ! =================================== - call PARALLEL_global_indexes(E,k,q," ",RESET=.TRUE.,Dip=Dip,X=X(1)) - call PARALLEL_global_indexes(E,k,q,"Non_Linear",Dip=Dip,X=X(1)) - call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,CLEAN_UP=.TRUE.) - call PARALLEL_WF_index( ) + call setup_NL_parallelization() ! !Load Dipole after the NL parallelization ! ======================================== @@ -101,11 +103,16 @@ subroutine NL_driver(E,X,k,q,Dip) ! ! Generate bare_qpg if required !============================= - if(eval_HARTREE.or.CORRELATION==JGM) call col_driver(maxval((/wf_ng,QP_ng_Sx,QP_ng_SH/)),q) + if(eval_HARTREE.or.CORRELATION==JGM.or.CORRELATION==LSEX.or.CORRELATION==LHF) & +& call col_driver(maxval((/wf_ng,QP_ng_Sx,QP_ng_SH/)),q) ! ! Free memory: qindx_* and unused DIPOLES ! ===================================================== - call qindx_free('ALL') + if(.not.eval_OSCLL) then + call qindx_free('ALL') + else + call qindx_free('X B C') + endif ! call DIP_alloc('P_square') ! Deallocate what is not needed @@ -118,16 +125,26 @@ subroutine NL_driver(E,X,k,q,Dip) wf_ng_save =wf_ng if(eval_DFT) then wf_ng =max(QP_ng_Sx,QP_ng_SH) + elseif(eval_OSCLL) then + wf_ng =max(wf_ng,QP_ng_Sx,QP_ng_SH) else wf_ng =QP_ng_SH endif WF_Go_indx =1 ! + if(eval_OSCLL.and..not.l_test_OSCLL) then + io_COLLs=.false. + HXC_collisions%N=0 + endif + ! if(io_COLLs) then ! ! check if they exist ! call COLLISIONS_load(.true.) + ! + if(l_test_OSCLL.and..not.l_use_Hxc_collisions) & +& call error("You should calculate collisions before the testing with: yambo_nl -e -v f/sex") ! if(.not.l_use_Hxc_collisions .and. (Correlation==SEX.or.Correlation==HF)) & & call error(' HF / SEX need Collisions. Cannot be computed on the fly.') @@ -148,8 +165,27 @@ subroutine NL_driver(E,X,k,q,Dip) ! endif ! - if(eval_HARTREE.or.eval_DFT) & -& call WF_load(WF,wf_ng,WF_Go_indx,(/1,NL_bands(2)/),(/1,k%nibz/),space='R',title='-NL') + if(eval_OSCLL) then + ! + call setup_OSCLL_parallelization() + ! + ! Evaluate oscillators if not present + call OSCLL_eval(q, k, E) + ! + ! Load the LSEX potential W(q,G,G') or V(q,G,G') + call LSEX_potential(q, X(2), Xw(2)) + ! + ! Load oscillators + ! + call setup_NL_parallelization() + ! + call OSCLL_load(q,k) + ! + endif + ! + if(eval_HARTREE.or.eval_DFT) then + call WF_load(WF,wf_ng,WF_Go_indx,(/1,NL_bands(2)/),(/1,k%nibz/),space='R',title='-NL') + endif ! ! Load Collisions if necessary ! ============================ @@ -167,11 +203,33 @@ subroutine NL_driver(E,X,k,q,Dip) call NL_alloc(E) call NL_alloc_k_distributed(E) ! + if(l_test_OSCLL) then + call NL_test_collisions(k,q) + return + endif + ! ! Initialization ! ================== call section('*','NL Start and Restart') call NL_start_and_restart(E,k,Dip) ! + ! + if(eval_OSCLL) then + ! + ! If I use oscillators I store the equilibrium part of long-range SEX + ! + Sigma_SEX_EQ=cZERO + ! + do ik=1,QP_nk + if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle + ik_mem=PAR_Xk_ibz_index(ik) + do i_sp_pol=1,n_sp_pol + call OSCLL_compose_vbands(V_bands,Sigma_SEX_EQ(:,:,i_sp_pol,ik_mem),k,q,E,ik,i_sp_pol) + enddo + enddo + ! + endif + ! ! Check if calculation was already done ! ===================================== if(n_runs_todo==0) return @@ -199,7 +257,7 @@ subroutine NL_driver(E,X,k,q,Dip) elseif (l_pump_and_probe) then l_message="[NL] Time-steps " else - call error("Wrong call to the code") + call error("Wrong input: use pump-probe mode 'yambo_nl -u p' or set a number of frequencie/angles with 'yambo_nl -u n'") endif nw=PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1) if(.not.l_pump_and_probe) NE_i_time=0 @@ -308,4 +366,37 @@ subroutine NL_driver(E,X,k,q,Dip) call DIP_alloc('DIP_R') call DIP_alloc('DIP_v') ! + contains + ! + subroutine setup_OSCLL_parallelization + implicit none + ! + ! Restore original number of bands + ! + X(1)%ib =(/NL_bands(1),NL_bands(2)/) + ! + call PARALLEL_global_indexes(E,k,q," ",RESET=.TRUE.) + call PARALLEL_WF_distribute(CLEAN_UP=.TRUE.) + ! + call PARALLEL_global_indexes(E,k,q,"Oscillators",X=X(1)) + ! + end subroutine setup_OSCLL_parallelization + ! + subroutine setup_NL_parallelization() + ! + implicit none + ! + ! Restore original number of bands + ! + X(1)%ib =(/NL_bands(1),NL_bands(2)/) + ! + call PARALLEL_global_indexes(E,k,q," ",RESET=.TRUE.) + call PARALLEL_WF_distribute(CLEAN_UP=.TRUE.) + ! + call PARALLEL_global_indexes(E,k,q,"Non_Linear",Dip=Dip,X=X(1)) + call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,CLEAN_UP=.TRUE.) + ! + end subroutine setup_NL_parallelization + + ! end subroutine NL_driver diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1edbff6006..5e9768f5da 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -17,6 +17,8 @@ subroutine NL_initialize(E,k) use X_m, ONLY:global_gauge use zeros, ONLY:zero_dfl use com, ONLY:msg + use QP_m, ONLY:QP_ng_Sc,QP_ng_Sx,QP_ng_Sh + use collision_ext, ONLY:ng_oscll use R_lattice, ONLY:bz_samp,k_map use X_m, ONLY:global_gauge use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT @@ -26,9 +28,9 @@ subroutine NL_initialize(E,k) use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& & SAVE_Vb_history use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & -& NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & -& LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity, & -& l_eval_CURRENT,l_pump_and_probe,DephMult,l_velocity_IPA,n_angles, & +& NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & +& LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& +& l_eval_CURRENT,l_pump_and_probe,DephMult,l_velocity_IPA,n_angles,l_test_OSCLL,LHF,eval_OSCLL, & & NL_ang_step,n_runs,NL_rot_axis,loop_on_frequencies,loop_on_angles,NL_initial_versor use electric, ONLY:l_force_SndOrd,l_P_periodic use parser_m, ONLY:parser @@ -54,6 +56,8 @@ subroutine NL_initialize(E,k) call parser('InducedField' , l_RT_induced_field) call parser('EvalCurrent' , l_eval_CURRENT) call parser('FrPolPerdic' , l_P_periodic) + call parser('TestOSCLL', l_test_OSCLL) + call parser('NoComprCOLL', l_no_compress_COLL) call parser('SaveVbhistory', SAVE_Vb_history) call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) call parser('NoComprCOLL', l_no_compress_COLL) @@ -68,7 +72,6 @@ subroutine NL_initialize(E,k) ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') - if(SP==DP.and.COLLISIONS_load_SP) call msg('sr','COLLISIONS in single precisions') ! ! Velocity gauge mode ! ======================================= @@ -233,6 +236,8 @@ subroutine NL_initialize(E,k) endif endif ! + if(all(NL_er>0._SP).and.n_frequencies>=1) NL_estep=(NL_er(2)-NL_er(1))/real(n_frequencies,SP) + ! ! Determine the total time from the damping or from T_0 ! if(NE_tot_time<=0._SP) then @@ -290,6 +295,7 @@ subroutine NL_initialize(E,k) eval_DFT =.false. eval_dG =.false. eval_COLLISIONS=.false. + eval_OSCLL =.false. ! ! NB.: This part duplicates what is in ! INIT.F @@ -331,6 +337,22 @@ subroutine NL_initialize(E,k) eval_COLLISIONS=.true. l_sc_coh =.true. l_sc_sex =.true. + case('LSEX') + Correlation = LSEX + RT_potential ='LSEX' + eval_HARTREE =.true. + ! Turn off Hartree if required + if(QP_ng_SH<=1) eval_HARTREE=.false. + eval_OSCLL =.true. + eval_dG =.false. + case('LHF') + Correlation = LHF + RT_potential ='LHF' + eval_HARTREE =.true. + ! Turn off Hartree if required + if(QP_ng_SH<=1) eval_HARTREE=.false. + eval_OSCLL =.true. + eval_dG =.false. case('HF') Correlation=HF RT_potential ='HARTREE+FOCK' @@ -343,6 +365,50 @@ subroutine NL_initialize(E,k) call error("Unknow correlation in the response function") end select ! + call msg('rs','Correlation in the reponse functions: '//trim(NL_correlation)) + ! + if(l_test_OSCLL.and.(Correlation==LSEX.or.Correlation==LHF)) then + ! + eval_COLLISIONS=.TRUE. + eval_dG =.TRUE. + ! + ! I force loading collision for testing porpouse + ! + if(Correlation==LHF) then + RT_potential='FOCK' + elseif(Correlation==LSEX) then + RT_potential='SEX' + endif + ! + call msg('s','') + call msg('s','*****************************************') + call msg('s','**** TEST TEST Oscillators TEST TEST ****') + call msg('s','*****************************************') + call msg('s','') + ! + endif + ! + if(eval_COLLISIONS) then + COLLISIONS_load_SP =.not.l_no_compress_COLL + COLLISIONS_compr =.not.l_no_compress_COLL + if(SP==DP.and.COLLISIONS_load_SP) call msg('sr','COLLISIONS in single precisions') + endif + ! + ! Set the number of g-vectors for oscillators and W(q,G,G') or V(q,G) + ! + if(Correlation==LHF.or.Correlation==LSEX) then + if(Correlation==LSEX.and.QP_ng_Sx/=QP_ng_Sc) & + & call error(' EXXRLvcs /= CORRLvcs not possible with oscillator, set the same value in input') + ng_oscll=QP_ng_Sx + call msg('rs','Number of G-vectors in oscillators :',ng_oscll) + endif + ! + if(QP_ng_SH<=1) then + call msg('rs','Hartree term turned off ') + elseif(QP_ng_SH>1.and.eval_HARTREE) then + call msg('rs','Number of G-vectors in Hartree :',QP_ng_SH) + endif + ! if(eval_COLLISIONS) then ! if(COLLISIONS_CV_only) call warning(' ONLY cv scattering in COLLISIONS! ') @@ -354,7 +420,6 @@ subroutine NL_initialize(E,k) endif endif ! - ! H_potential = RT_potential ! ! Frequencies or Angle range @@ -365,8 +430,6 @@ subroutine NL_initialize(E,k) ! if(n_frequencies>=1.and.n_angles>=1) call error("Loops on frequencies and angles cannot be performed in the same run") ! - if(all(NL_er>0._SP).and.n_frequencies>=1) NL_estep=(NL_er(2)-NL_er(1))/real(n_frequencies,SP) - ! if(n_angles>=1) then ! loop on angles NL_ang_step=2.0*pi/real(n_angles,SP) diff --git a/src/nloptics/NL_project.dep b/src/nloptics/NL_project.dep index fbac890c90..9c580b7e80 100644 --- a/src/nloptics/NL_project.dep +++ b/src/nloptics/NL_project.dep @@ -16,6 +16,7 @@ NL_initialize.o NL_output.o NL_start_and_restart.o + NL_test_collisions.o RK_basestep.o el_density_vbands.o diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index 9807245ecc..e259e4b952 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -21,7 +21,8 @@ subroutine NL_start_and_restart(E,k,Dip) use com, ONLY:msg use units, ONLY:AUT2FS use electrons, ONLY:levels,n_sp_pol - use real_time, ONLY:rho_reference,RT_time_status,NE_i_time,RT_step,RT_dyn_step,NE_steps + use real_time, ONLY:rho_reference,RT_time_status,NE_i_time,RT_step,RT_dyn_step,NE_steps,& +& eval_HARTREE,eval_DFT use RT_control, ONLY:Vbands_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,CACHE_OBS_INTERVAL_time,& & N_RT_databases,NE_i_start_time,RT_return_db_ID,RT_DB_ID,RT_DB_name,& & RT_control_alloc,RT_control_free @@ -76,7 +77,7 @@ subroutine NL_start_and_restart(E,k,Dip) forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE enddo ! - if(Correlation/=IPA.and..not.COLLISIONS_have_HARTREE) then + if(Correlation/=IPA.and..not.COLLISIONS_have_HARTREE.and.(eval_HARTREE.or.eval_DFT)) then ! call NL_build_valence_bands(E,V_bands,VAL_BANDS,1) call el_density_vbands(E,k,full_rho,VAL_BANDS) diff --git a/src/nloptics/NL_test_collisions.F b/src/nloptics/NL_test_collisions.F new file mode 100644 index 0000000000..c1a8b93a24 --- /dev/null +++ b/src/nloptics/NL_test_collisions.F @@ -0,0 +1,92 @@ +! +! Copyright (C) 2000-2017 the LUMEN team +! +! Authors (see AUTHORS file for details): MG CA +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine NL_test_collisions(k,q) + ! + ! Test-collisions built on the fly from V/W + ! VS + ! collisions stored on disk (yambo_nl -e -v sex/f) + ! + use pars, ONLY:cZERO,SP,rZERO + use R_lattice, ONLY:nXkibz,bz_samp,qindx_S + use collision_ext, ONLY:HXC_COLL_element,HXC_collisions + use nl_optics, ONLY:NL_bands + use com, ONLY:msg + ! + implicit none + ! + type(bz_samp), intent(in) :: k,q + ! + integer :: i_kmq,i_qp,ib,ibp,i_coll,i_coll_mem + integer :: i_k,i_n,i_m,i_spin + integer :: ic1 + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz) + complex(SP) :: COLL_OSCLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz) + ! + real(SP) :: max_diff,diff + ! + call msg('s','Collisions Test COLL vs OSCLL') + call msg('s','') + ! + max_diff=rZERO + ! + do i_coll=1,HXC_collisions%N + ! + i_k =HXC_collisions%state(i_coll,3) + i_n =HXC_collisions%state(i_coll,1) + i_m =HXC_collisions%state(i_coll,2) + i_spin =HXC_collisions%state(i_coll,4) + i_coll_mem=HXC_collisions%PAR_map(i_coll) + ! + ! Spin not supported for the moment + ! + call OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL_OSCLL) + ! + ic1=1 + ! + COLL=cZERO + ! + do i_kmq=1,nXkibz + ! + do ibp=NL_bands(1),NL_bands(2) + do ib=NL_bands(1),NL_bands(2) + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") then + COLL(ib,ibp,i_kmq)=HXC_COLL_element(i_coll_mem)%v_c(ic1) + ic1=ic1+1 + endif + ! + diff=abs(COLL(ib,ibp,i_kmq)-COLL_OSCLL(ib,ibp,i_kmq)) + write(*,'(6i5,2e14.6)') i_k,i_m,i_n,i_kmq,ib,ibp,abs(COLL(ib,ibp,i_kmq)),abs(COLL_OSCLL(ib,ibp,i_kmq)) + if(max_diff<=diff) max_diff=diff + ! + enddo + enddo + ! + enddo + ! + enddo + ! + call msg('s','') + call msg('s','Max error in collisions : ',max_diff) + call msg('s','') + ! +end subroutine NL_test_collisions diff --git a/src/nloptics/el_density_vbands.F b/src/nloptics/el_density_vbands.F index c2f6a35aae..896f4b373b 100644 --- a/src/nloptics/el_density_vbands.F +++ b/src/nloptics/el_density_vbands.F @@ -47,21 +47,23 @@ subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) integer :: i1,ik,is,rho_syms,ir,ik_mem real(SP) :: rho_no_sym(fft_size) ! +!$OMP WORKSHARE rho=rZERO rho_no_sym=rZERO +!$OMP END WORKSHARE ! do ik=1,Xk%nibz ! if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) ! -!$omp parallel do default(shared), private(ir,is) - do ir=1,fft_size - do is=1,n_sp_pol + do is=1,n_sp_pol +!$OMP WORKSHARE + forall(ir=1:fft_size) rho_no_sym(ir)=rho_no_sym(ir)+real(spin_occ,SP)*Xk%weights(ik)*sum(abs(VAL_BANDS(ir,:en%nbf(is),ik_mem,is))**2._SP) - enddo + end forall +!$OMP END WORKSHARE enddo -!$omp end parallel do ! enddo ! @@ -69,20 +71,18 @@ subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) ! ! Simmetrization ! +!$OMP WORKSHARE rho_syms=nsym/(i_time_rev+1) +!$OMP END WORKSHARE ! -!$omp parallel do default(shared), private(ir,i1) - do ir=1,fft_size - do i1=1,rho_syms - rho(ir)=rho(ir)+real(rho_no_sym(fft_rot_r(ir,i1)),SP)/real(nsym,SP) - enddo - enddo -!$omp end parallel do +!$OMP WORKSHARE + forall(ir=1:fft_size) + rho(ir)=rho(ir)+sum(rho_no_sym(fft_rot_r(ir,1:rho_syms)))/real(nsym,SP) + end forall +!$OMP END WORKSHARE ! -!$omp parallel do default(shared), private(ir) - do ir=1,fft_size - rho(ir)=(1._SP+i_time_rev)*rho(ir) - enddo -!$omp end parallel do +!$OMP WORKSHARE + rho=real(1._SP+i_time_rev,SP)*rho +!$OMP END WORKSHARE ! end subroutine diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index feb4ac07ee..25dad42431 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -14,12 +14,12 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) & diam_term_exact,para_term_w0,l_abs_prop_chi_bse,& & l_eels_from_inversion,Co_factor use BS, ONLY:BSE_mode,BS_K_is_ALDA,BS_H_dim,BS_K_coupling,& -& l_BS_anomalous_Hall +& l_BS_anomalous_Hall,l_BS_Esort_indx use stderr, ONLY:STRING_match use X_m, ONLY:Epsilon_ii,eps_2_alpha,X_OUTPUT_driver,Epsilon_ij,& & X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,& -& X_magnons,i_G_shift,Q_plus_G_pt,Q_plus_G_sq_modulus,Resp_ii,Resp_ij,& -& l_drude,skip_cond_sum_rule,X_drude_term,global_gauge +& BS_E_sorted_indx,X_magnons,i_G_shift,Q_plus_G_pt,Q_plus_G_sq_modulus,& +& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge use com, ONLY:msg,com_compose_msg use R_lattice, ONLY:bare_qpg,FineGd_desc,nkbz use electrons, ONLY:spin_occ @@ -35,7 +35,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! Work Space ! character(2) :: ordering - integer :: id,i_rsp,n_resp,iw_ref + integer :: id,it,i_rsp,n_resp,iw_ref,index_sort(5) character(10) :: solver character(schlen) :: out_string complex(SP) :: hall(3,2),tmp_var(BSS_n_freqs,3),& @@ -246,6 +246,18 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) if (data_sort(1)==0._SP) cycle call X_OUTPUT_driver("WRITE E_IP",data=data_sort(:N_BS_E_sorted)) enddo + if (l_BS_esort_indx) then + do id=1,min(BS_H_dim,1000) + data_sort(1)=real(BS_E_sorted(id,1,1),SP) + if (data_sort(1)==0._SP) cycle + do it=1,18 + if (BS_E_sorted_indx(id,it,1)==0) exit + data_sort(1)=real(BS_E_sorted(id,1,1),SP) + index_sort(1:5)=real(BS_E_sorted_indx(id,it,1:5),SP) + call X_OUTPUT_driver("WRITE E_INDX_IP",data=data_sort(1:1),indexes=index_sort) + enddo + enddo + endif endif ! ! E sorted diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index d35a546030..de20ff34f0 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM ! -subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) +subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) ! use pars, ONLY:schlen,SP use D_lattice, ONLY:l_0D,l_1D,l_2D @@ -14,7 +14,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) use electrons, ONLY:n_spinor use PHOTOLUM, ONLY:PL use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_dichroism,BS_K_coupling,& -& l_BS_photolum,l_BS_abs,l_BS_jdos,l_BS_esort +& l_BS_photolum,l_BS_abs,l_BS_jdos,l_BS_esort_indx,l_BS_esort use BS_solvers, ONLY:l_abs_prop_chi_bse,l_eels_can_be_computed use stderr, ONLY:STRING_match,STRING_split,intc,STRING_remove use OUTPUT, ONLY:OUTPUT_driver @@ -30,6 +30,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) integer, optional :: IQ,IG type(IO_desc),optional :: DESC real(SP), optional :: data(:) + integer, optional :: indexes(:) ! ! Work Space integer ::it,itp,ik,ic @@ -39,20 +40,21 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) ! if (STRING_match(WHAT,"DEF")) then call ELEMENTAL_init(1,"fxc","Exchange-Correlation Kernel","optics") - call ELEMENTAL_init(2,"E_IP","Sorted IP Energies","sort") - call ELEMENTAL_init(3,"Esort","Sorted Interacting Energies","sort") - call ELEMENTAL_init(4,"pl","Photoluminescence","PL") - call ELEMENTAL_init(5,"eps","Absorption","optics") - call ELEMENTAL_init(6,"refl","Reflectivity","optics") - call ELEMENTAL_init(7,"eel","Electron Energy Loss","optics") - call ELEMENTAL_init(8,"alpha","Polarizability ( -<> )","optics") - call ELEMENTAL_init(9,"off","Off-diagonal Absorption","kerr") - call ELEMENTAL_init(10,"beta","Off-diagonal Polarizability","kerr") - call ELEMENTAL_init(11,"moke","MOKE parameters","kerr") - call ELEMENTAL_init(12,"jdos","Joint Density of states","optics") - call ELEMENTAL_init(13,"CD","Dichroism","dichroism") - call ELEMENTAL_init(14,"Spm","Magnons (S+-)","magnons") - call ELEMENTAL_init(15,"Smp","Magnons (S-p)","magnons") + call ELEMENTAL_init(2,"E_INDX_IP","Sorted IP Energies indexes","indexes") + call ELEMENTAL_init(3,"E_IP","Sorted IP Energies","sort") + call ELEMENTAL_init(4,"Esort","Sorted Interacting Energies","sort") + call ELEMENTAL_init(5,"pl","Photoluminescence","PL") + call ELEMENTAL_init(6,"eps","Absorption","optics") + call ELEMENTAL_init(7,"refl","Reflectivity","optics") + call ELEMENTAL_init(8,"eel","Electron Energy Loss","optics") + call ELEMENTAL_init(9,"alpha","Polarizability ( -<> )","optics") + call ELEMENTAL_init(10,"off","Off-diagonal Absorption","kerr") + call ELEMENTAL_init(11,"beta","Off-diagonal Polarizability","kerr") + call ELEMENTAL_init(12,"moke","MOKE parameters","kerr") + call ELEMENTAL_init(13,"jdos","Joint Density of states","optics") + call ELEMENTAL_init(14,"CD","Dichroism","dichroism") + call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") + call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") endif ! if (STRING_match(WHAT,"INIT")) then @@ -77,7 +79,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) if (l_flag) call X_obs_onoff("+ refl") endif if (l_BS_jdos) call X_obs_onoff("+ jdos") - if (l_BS_esort) call X_obs_onoff("+ Esort E_IP") + if (l_BS_esort) call X_obs_onoff("+ Esort E_IP") + if (l_BS_esort_indx) call X_obs_onoff("+ E_INDX_IP") if (l_BS_kerr) then if (X_do_obs("alpha")) call X_obs_onoff("+ beta") if (X_do_obs("eps")) call X_obs_onoff("+ off moke") @@ -98,9 +101,9 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) call warning("eps & alpha evaluation switched off for slepc") endif endif - if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP kerr magnons jdos") - if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort jdos E_IP") - if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP") + if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP E_INDX_IP kerr magnons jdos") + if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort jdos E_IP E_INDX_IP") + if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP E_INDX_IP") endif ! ! Headers... @@ -111,14 +114,18 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) X_obs(1)%COL_header(1) = 'E' X_obs(1)%COL_header(2:3) = (/'Re(q^2Fxc)','Re(q^2Fxc)'/) endif + if (X_do_obs("indexes")) then + X_obs(2)%N_columns=6 + X_obs(2)%COL_header(1:6) = (/' E ','ikbz','ib1 ','ib2 ','isp1','isp2'/) + endif if (X_do_obs("Esort")) then - do ic=2,3 + do ic=3,4 X_obs(ic)%N_columns=2 X_obs(ic)%COL_header(1:2) = (/'E ','N_deg'/) enddo if (BS_K_coupling) then - X_obs(3)%N_columns=3 - X_obs(3)%COL_header(1:3) = (/'Re(E)','Im(E)','N_deg'/) + X_obs(4)%N_columns=3 + X_obs(4)%COL_header(1:3) = (/'Re(E)','Im(E)','N_deg'/) endif obs_with_res=[character(5) :: "eps","alpha","Spm","Smp","off","beta","CD" ] do it=1,N_X_obs @@ -128,16 +135,16 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) l_print_res=l_print_res.or.trim(X_obs(it)%what)==trim(obs_with_res(itp)) enddo if (.not.l_print_res) cycle - do ic=2,3 + do ic=3,4 X_obs(ic)%N_columns=X_obs(ic)%N_columns+1 X_obs(ic)%COL_header(X_obs(ic)%N_columns) =trim(X_obs(it)%what) enddo enddo endif if (X_do_obs("PL")) then - X_obs(4)%N_columns=3 - X_obs(4)%COL_header(1) = 'E' - X_obs(4)%COL_header(2:3) = (/'PL ','PL_o'/) + X_obs(5)%N_columns=3 + X_obs(5)%COL_header(1) = 'E' + X_obs(5)%COL_header(2:3) = (/'PL ','PL_o'/) endif ! ! ... pre-formatted @@ -145,7 +152,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) BASIC_col(2:3) = (/'Im(XXX)', 'Re(XXX)'/) BASIC_col(4:5) = (/'Im(XXX_o)', 'Re(XXX_o)'/) BASIC_col(6:7) = (/'Im(XXX`)','Re(XXX`)'/) - do it=5,N_X_obs + do it=6,N_X_obs X_obs(it)%N_columns=7 do ic=1,X_obs(it)%N_columns X_obs(it)%COL_header(ic)=STRING_remove(BASIC_col(ic),"XXX",trim(X_obs(it)%what)) @@ -198,6 +205,11 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data) do ic=2,size(data) call OUTPUT_driver(trim(X_obs(it)%prefix),R_VALUES=data(ic:ic),TITLES=X_obs(it)%COL_header(ic:ic)) enddo + if (present(indexes)) then + do ic=1,size(indexes) + call OUTPUT_driver(trim(X_obs(it)%prefix),I_VALUES=indexes(ic:ic),TITLES=X_obs(it)%COL_header(ic+1:ic+1)) + enddo + endif call OUTPUT_driver(trim(X_obs(it)%prefix),action="write") enddo endif diff --git a/src/parallel/.objects b/src/parallel/.objects index 4d1c143fe4..c901f08ddc 100644 --- a/src/parallel/.objects +++ b/src/parallel/.objects @@ -1,6 +1,6 @@ NL_objs = #if defined _NL -NL_objs = PARALLEL_global_Non_Linear.o +NL_objs = PARALLEL_global_Non_Linear.o #endif #if _RT RT_objs = PARALLEL_global_Real_Time.o @@ -24,7 +24,7 @@ objs = check_for_a_redundant_IO.o \ PARALLEL_global_BZINDX.o \ PARALLEL_global_defaults.o PARALLEL_global_reset.o PARALLEL_global_dimensions.o PARALLEL_global_ScaLapacK.o \ PARALLEL_global_Response_G.o PARALLEL_global_Self_Energy.o PARALLEL_global_Response_T.o PARALLEL_global_Response_T_transitions.o \ - PARALLEL_global_Response_IO.o PARALLEL_global_DIPOLES.o \ + PARALLEL_global_Response_IO.o PARALLEL_global_DIPOLES.o PARALLEL_global_Oscillators.o \ PARALLEL_global_indexes.o \ PARALLEL_index.o PARALLEL_WF_distribute.o \ PARALLEL_Haydock_VEC_COMMs.o PARALLEL_FREQS_setup.o $(RT_objs) $(NL_objs) diff --git a/src/parallel/DOUBLE_project.dep b/src/parallel/DOUBLE_project.dep index 5c51f98854..1e88f54b17 100644 --- a/src/parallel/DOUBLE_project.dep +++ b/src/parallel/DOUBLE_project.dep @@ -19,6 +19,7 @@ PARALLEL_global_BZINDX.o PARALLEL_global_DIPOLES.o PARALLEL_global_Non_Linear.o + PARALLEL_global_Oscillators.o PARALLEL_global_Real_Time.o PARALLEL_global_Response_G.o PARALLEL_global_Response_IO.o diff --git a/src/parallel/PARALLEL_global_Non_Linear.F b/src/parallel/PARALLEL_global_Non_Linear.F index 7b33d6fa8b..e18fd65e70 100644 --- a/src/parallel/PARALLEL_global_Non_Linear.F +++ b/src/parallel/PARALLEL_global_Non_Linear.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA MG DS ! -subroutine PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) +subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! use electrons, ONLY:levels use R_lattice, ONLY:bz_samp @@ -35,7 +35,6 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) ! type(levels) :: E type(bz_samp) :: Xk,q - character(*) :: ENVIRONMENT ! ! Work space ! @@ -59,7 +58,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) call PARALLEL_index(PAR_IND_freqs,(/n_runs/),COMM=PAR_COM_freqs_INDEX) PAR_IND_freqs_ID=PAR_COM_freqs_INDEX%CPU_id PAR_n_freqs =PAR_IND_freqs%n_of_elements(PAR_IND_Q_ibz_ID+1) - call PARALLEL_live_message("Freqs",ENVIRONMENT=ENVIRONMENT, & + call PARALLEL_live_message("Freqs",ENVIRONMENT="Non_Linear", & & LOADED=PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1), & & TOTAL=n_runs,NCPU=PAR_COM_freqs_INDEX%n_CPU) ! @@ -87,7 +86,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) ! ! Overlap indeces for WF distribution ! - call PARALLEL_live_message("H(ibz)",ENVIRONMENT=ENVIRONMENT,& + call PARALLEL_live_message("H(ibz)",ENVIRONMENT="Non_Linear",& LOADED=PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1),TOTAL=Xk%nibz,& NCPU=PAR_COM_Xk_ibz_INDEX%n_CPU) ! @@ -116,7 +115,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) PAR_IND_QP%element_1D(i_qp)=.TRUE. PAR_IND_QP%n_of_elements=PAR_nQP enddo - call PARALLEL_live_message("QPs",ENVIRONMENT=ENVIRONMENT,LOADED=PAR_nQP,TOTAL=QP_n_states) + call PARALLEL_live_message("QPs",ENVIRONMENT="Non_Linear",LOADED=PAR_nQP,TOTAL=QP_n_states) !......................................................................... ! "COLLISIONS" diff --git a/src/parallel/PARALLEL_global_Oscillators.F b/src/parallel/PARALLEL_global_Oscillators.F new file mode 100644 index 0000000000..badc53f43c --- /dev/null +++ b/src/parallel/PARALLEL_global_Oscillators.F @@ -0,0 +1,110 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): CA MG DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine PARALLEL_global_Oscillators(E,Xk,q) + ! + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp + use collision_ext, ONLY:COLL_bands + use IO_int, ONLY:IO_and_Messaging_switch + use parallel_int, ONLY:PARALLEL_index,PARALLEL_assign_chains_and_COMMs,PARALLEL_live_message + use parallel_m, ONLY:ncpu,COMM_copy,PAR_build_index,PAR_INDEX_copy + ! COMMUNICATORS + use parallel_m, ONLY:PAR_COM_G_b_A2A,PAR_COM_Xk_ibz_INDEX,PAR_COM_WF_k_INDEX,PAR_G_bands_INDEX, & + & PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX,PAR_n_bands,n_WF_bands_to_load + ! IND + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_WF_k,PAR_IND_Xk_bz + ! INDEX + use parallel_m, ONLY:PAR_Xk_ibz_index,PAR_Xk_bz_index + ! DIMENSIONS + use parallel_m, ONLY:PAR_nG_bands,PAR_nQP,PAR_Xk_nbz,PAR_Xk_nibz + ! ID's + use parallel_m, ONLY:PAR_IND_G_b_ID,PAR_IND_WF_k_ID,& +& PAR_IND_Xk_bz_ID,PAR_IND_Xk_ibz_ID + use openmp, ONLY:n_threads_OSCLL,OPENMP_set_threads + use QP_m, ONLY:QP_n_states,QP_table + ! +#include + ! + type(levels) :: E + type(bz_samp) :: Xk,q + ! + ! Work space + ! + integer :: nb_mat + ! + CALL PARALLEL_structure(2,(/"k ","b "/)) + ! + call PARALLEL_assign_chains_and_COMMs(2,COMM_index_1=PAR_COM_Xk_ibz_INDEX, & +& COMM_index_2=PAR_COM_G_b_INDEX,& +& COMM_A2A_1=PAR_COM_Xk_ibz_A2A) + ! + ! The routine PARALLEL_assign_chains_and_COMMs cannot define COMMUNICATORS for internal + ! A2A when there is no internal distribution + ! +if (PAR_COM_Xk_ibz_INDEX%n_CPU==1) then + call COMM_copy(PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_A2A) + endif + ! + ! K-points + ! + call PARALLEL_index(PAR_IND_Xk_ibz,(/Xk%nibz/),COMM=PAR_COM_Xk_ibz_INDEX) + PAR_IND_Xk_ibz_ID=PAR_COM_Xk_ibz_INDEX%CPU_id + PAR_Xk_nibz=PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1) + call PARALLEL_live_message("K-points",ENVIRONMENT="Oscillators", & +& LOADED=PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1), & +& TOTAL=Xk%nibz,NCPU=PAR_COM_Xk_ibz_INDEX%n_CPU) + ! + YAMBO_ALLOC(PAR_Xk_ibz_index,(Xk%nibz)) + call PAR_build_index(PAR_IND_Xk_ibz,Xk%nibz,PAR_Xk_ibz_index,PAR_Xk_nibz) + ! + ! Bands + ! + nb_mat=(COLL_bands(2)-COLL_bands(1)+1)**2 + ! + n_WF_bands_to_load=PAR_n_bands(2) + ! + call PARALLEL_index(PAR_IND_G_b,(/nb_mat/),COMM=PAR_COM_G_b_INDEX) + PAR_IND_G_b_ID=PAR_COM_G_b_INDEX%CPU_id + PAR_nG_bands=PAR_IND_G_b%n_of_elements(PAR_IND_G_b_ID+1) + YAMBO_ALLOC(PAR_G_bands_INDEX,(nb_mat)) + call PAR_build_index(PAR_IND_G_b,nb_mat,PAR_G_bands_index,PAR_nG_bands) + ! + call PARALLEL_live_message("OSCL bands",ENVIRONMENT="Oscillators",& +& LOADED=PAR_IND_G_b%n_of_elements(PAR_IND_G_b_ID+1),& +& TOTAL=nb_mat,NCPU=PAR_COM_G_b_INDEX%n_CPU) + ! + ! Copy to WF + ! + call COMM_copy(PAR_COM_Xk_ibz_INDEX,PAR_COM_WF_k_INDEX) + PAR_IND_WF_k_ID=PAR_COM_WF_k_INDEX%CPU_id + ! + ! Io and messaging + ! + call IO_and_Messaging_switch("+io_out",CONDITION=PAR_COM_G_b_INDEX%CPU_id==0) + ! + call IO_and_Messaging_switch("+output",CONDITION=PAR_COM_G_b_INDEX%CPU_id==0) + ! + call OPENMP_set_threads(n_threads_in=n_threads_OSCLL) + ! +end subroutine PARALLEL_global_Oscillators diff --git a/src/parallel/PARALLEL_global_defaults.F b/src/parallel/PARALLEL_global_defaults.F index e2b9453bf6..5a9e6b2ccd 100644 --- a/src/parallel/PARALLEL_global_defaults.F +++ b/src/parallel/PARALLEL_global_defaults.F @@ -64,13 +64,15 @@ subroutine PARALLEL_global_defaults(ENVIRONMENT) case("DIPOLES_SHIFTED") call GIMME_a_parallel_proposal(2,(/"c","k"/)) case("Response_G_space_and_IO","Response_G_space") - call GIMME_a_parallel_proposal(5,(/"g","v","c","k","q"/)) + call GIMME_a_parallel_proposal(5,(/"c","v","k","q","g"/)) case("Real_Time") call GIMME_a_parallel_proposal(4,(/" k"," b","qp"," q"/)) case("Phonon_Self_Energy") call GIMME_a_parallel_proposal(3,(/"q","k","b"/)) case("Non_Linear") call GIMME_a_parallel_proposal(2,(/" k"," w"/)) + case("Oscillators") + call GIMME_a_parallel_proposal(2,(/" k"," b"/)) case("ScaLapacK") CPU_structure(i_PAR_structure)%ROLE(1)="p" CPU_structure(i_PAR_structure)%CPU(1)=ncpu diff --git a/src/parallel/PARALLEL_global_dimensions.F b/src/parallel/PARALLEL_global_dimensions.F index 8f94695e7c..f7d7a00a15 100644 --- a/src/parallel/PARALLEL_global_dimensions.F +++ b/src/parallel/PARALLEL_global_dimensions.F @@ -154,6 +154,11 @@ subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) !----------- if (ENVIRONMENT=="Self_Energy" ) PAR_QP_range=QP_n_states ! + ! Oscillators +#if defined _NL || defined _RT + if (ENVIRONMENT=="Oscillators" ) PAR_n_bands =COLL_bands +#endif + ! #if defined _NL if (ENVIRONMENT=="Non_Linear" ) PAR_n_freqs =n_runs #endif diff --git a/src/parallel/PARALLEL_global_indexes.F b/src/parallel/PARALLEL_global_indexes.F index 7674d792af..a0f597799a 100644 --- a/src/parallel/PARALLEL_global_indexes.F +++ b/src/parallel/PARALLEL_global_indexes.F @@ -9,7 +9,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre ! ! LOGICALS use parallel_m, ONLY:l_par_X_T,l_par_RT,l_par_SE,l_par_X_G,l_par_X_G_finite_q,& -& l_par_DIP,l_par_BZINDX,l_par_NL,l_par_SC +& l_par_DIP,l_par_BZINDX,l_par_NL,l_par_SC,l_par_OSCLL ! COMMUNICATORS use parallel_m, ONLY:PAR_COM_CON_INDEX_X,PAR_COM_VAL_INDEX_X ! IND @@ -81,6 +81,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre l_par_RT =ENVIRONMENT=="Real_Time" l_par_NL =ENVIRONMENT=="Non_Linear" l_par_SC =ENVIRONMENT=="Self_Energy" + l_par_OSCLL =ENVIRONMENT=="Oscillators" ! !================================== ! USER provided PARALLEL structure @@ -148,7 +149,8 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre #endif ! #if defined _NL - if ( ENVIRONMENT=="Non_Linear") call PARALLEL_global_Non_Linear(E,Xk,q,ENVIRONMENT) + if ( ENVIRONMENT=="Non_Linear") call PARALLEL_global_Non_Linear(E,Xk,q) + if ( ENVIRONMENT=="Oscillators") call PARALLEL_global_Oscillators(E,Xk,q) #endif ! #if defined _SCALAPACK diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index a58e1ac61a..60d2bfc6cf 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -118,6 +118,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) X_MEM_n_freqs =2*X%mpa_npoles X%ordering='t' Xw%grid_type="mp" + if(Xw%dr(1)1.or.n_max_threads>1) then ! diff --git a/src/tddft/TDDFT_ALDA_R_space.F b/src/tddft/TDDFT_ALDA_R_space.F deleted file mode 100644 index b1da0c3f50..0000000000 --- a/src/tddft/TDDFT_ALDA_R_space.F +++ /dev/null @@ -1,138 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2015 The Yambo Team -! -! Authors (see AUTHORS file for details): AM -! -function TDDFT_ALDA_R_space(is,os,isp,osp,tddft_wf,mode) - ! - ! Calculates the F_xc scattering - ! - ! mode 1 - ! - ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) - ! :Fxc: - ! (iv(1),ik(3),is(3)) -->--:...:-->-- (iv(2),ik(4),is(4)) - ! - ! mode 2 - ! - ! (ic(1),ik(1),is(1)) --<--:...:--<-- (iv(2),ik(2),is(2)) - ! :Fxc: - ! (iv(1),ik(3),is(3)) -->--:...:-->-- (ic(2),ik(4),is(4)) - ! - use pars, ONLY:SP,pi,cZERO - use FFT_m, ONLY:fft_size - use xc_functionals, ONLY:F_xc_mat - use BS, ONLY:l_BS_magnons - use wrapper_omp, ONLY:V_dot_V_omp - use electrons, ONLY:n_spinor,n_sp_pol,n_spin - use timing_m, ONLY:timing - !use interfaces, ONLY:WF_apply_symm - use TDDFT, ONLY:tddft_wf_t - ! - implicit none - ! - complex(SP) :: TDDFT_ALDA_R_space - ! - integer, intent(in) :: is(4),os(4),isp(4),osp(4) - character(3), intent(in) :: mode - type(tddft_wf_t), target, intent(inout) :: tddft_wf - ! - ! Work Space - ! - integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y - ! - complex(SP), pointer :: rhotwr1_p(:) - complex(SP), pointer :: rhotwr2_p(:) - complex(SP), pointer :: WF_symm1_p(:,:) - complex(SP), pointer :: WF_symm2_p(:,:) - ! - call timing('T_space ALDA scatt.',OPR='start') - ! - if ((is(4)/=os(4).or.isp(4)/=osp(4)).and.((.not.l_BS_magnons).or. n_sp_pol==1)) call error(" TDDFT_ALDA_R_space: wrong spin index") - if ((is(4)==os(4).or.isp(4)==osp(4)).and.(( l_BS_magnons).and.n_sp_pol==2)) call error(" TDDFT_ALDA_R_space: wrong spin index") - if (mode/="RES" .and. mode/="CPL" ) call error(" TDDFT_ALDA_R_space: unkown mode") - ! - TDDFT_ALDA_R_space=cZERO - ! - WF_symm1_p => tddft_wf%WF_symm1 - WF_symm2_p => tddft_wf%WF_symm2 - rhotwr1_p => tddft_wf%rhotwr1 - rhotwr2_p => tddft_wf%rhotwr2 - ! - ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation - ! - ! - call WF_apply_symm_cpu(is,WF_symm1_p) - call WF_apply_symm_cpu(os,WF_symm2_p) - ! - if(n_spinor==1) rhotwr1_p(:)=conjg(WF_symm1_p(:,1))*WF_symm2_p(:,1) - ! - if(n_spinor==2) then - do i_spinor=1,n_spinor - do j_spinor=1,n_spinor - do ifft=1,fft_size - irhotw=ifft+(i_spinor-1)*fft_size+(j_spinor-1)*n_spinor*fft_size - rhotwr1_p(irhotw)=conjg(WF_symm1_p(ifft,i_spinor))*WF_symm2_p(ifft,j_spinor) - enddo - enddo - enddo - endif - ! - if (mode=="RES") then - call WF_apply_symm_cpu(isp,WF_symm1_p) - call WF_apply_symm_cpu(osp,WF_symm2_p) - else if (mode=="CPL") then - call WF_apply_symm_cpu(isp,WF_symm2_p) - call WF_apply_symm_cpu(osp,WF_symm1_p) - endif - ! - if( n_spin==1 ) rhotwr2_p(:)=F_xc_mat(:,1,1,1,1)*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) - ! - if(n_sp_pol==2) then - ! This takes into account the different conventions between the definition of the spin indexes - ! between yambo and the derivation of fxc in spin space for magnons - ! This happens because in the yambo convention the left indexes "v sigma_v, c sigma_c, k" are inverted - ! with respect to the standard convention, i.e. "c sigma_c, v sigma_v, k" - ! As a result f_\up\dn,\dn\up is in yambo f_\dn\up,\dn\up and so on - is_yambo=os(4) - os_yambo=is(4) - ! To check/fix the spinorial version - rhotwr2_p(:)=F_xc_mat(:,is_yambo,os_yambo,isp(4),osp(4))*WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)) - endif - ! - if(n_spinor==2) then - rhotwr2_p=cZERO - do i_spinor=1,n_spinor - do j_spinor=1,n_spinor - i_spinor_y=j_spinor - j_spinor_y=i_spinor - do ip_spinor=1,n_spinor - do jp_spinor=1,n_spinor - do ifft=1,fft_size - irhotw=ifft+(i_spinor-1)*fft_size+(j_spinor-1)*n_spinor*fft_size - rhotwr2_p(irhotw)=rhotwr2_p(irhotw)+ & - & F_xc_mat(ifft,i_spinor_y,j_spinor_y,ip_spinor,jp_spinor)* & - & WF_symm1_p(ifft,ip_spinor)*conjg(WF_symm2_p(ifft,jp_spinor)) - enddo - enddo - enddo - enddo - enddo - endif - ! - ! SUM - !===== - TDDFT_ALDA_R_space=V_dot_V_omp(fft_size*n_spinor*n_spinor,rhotwr1_p,rhotwr2_p) - ! - ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K - ! X = fft_size*spin_occ/DL_vol/Nq - ! Co = 4*pi*spin_occ/DL_vol/Nq - ! --> X/Co = fft_size/4/pi - ! - TDDFT_ALDA_R_space=TDDFT_ALDA_R_space*real(fft_size,SP)/4._SP/pi - ! - call timing('T_space ALDA scatt.',OPR='stop') - ! -end function diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index fe6d5270c3..3ce0e7f513 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -7,7 +7,7 @@ ! #include ! -subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) +subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering ! @@ -16,6 +16,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) ! use pars, ONLY:SP,DP,pi,cZERO use FFT_m, ONLY:fft_size + use wave_func, ONLY:WF + use interfaces, ONLY:WF_load,WF_free use R_lattice, ONLY:qindx_X,bz_samp,minus_G use BS, ONLY:l_BS_magnons,BS_T_grp,BS_bands use electrons, ONLY:n_spinor,n_sp_pol,n_spin @@ -27,12 +29,14 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) implicit none ! type(bz_samp),intent(in) :: Xk - integer, intent(in) :: iq,i_T_grp + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_tddft_wf_in_loop character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space ! + logical :: l_load_WFs integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_grp_p,is(4),os(4),qs(3),NK(2) @@ -51,8 +55,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) WF_symm2_p=cZERO rhotwr_p= cZERO ! - ! Use pointers both for CUDA and to avoid continuous allocation and de-allocation - ! #if defined(__NOTNOW) && ! defined(_CUDA) !$omp parallel default(shared), private( K_EXCH_collision, & !$omp & i_T_el,i_k_bz,i_k,i_s, i_p_bz,i_p,i_sp, i_v,i_c,i_sp_c,i_sp_v, & @@ -96,6 +98,20 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) os(1)=i_c endif ! + l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + endif + ! if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! @@ -113,7 +129,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) do j_spinor=1,n_spinor ! do ifft=1,fft_size - rhotwr_p(ifft)=cmplx(WF_symm1_p(ifft,i_spinor)*conjg(WF_symm2_p(ifft,j_spinor)),kind=DP) + rhotwr_p(ifft)=cmplx(WF_symm1_p(ifft,i_spinor)*conjg(WF_symm2_p(ifft,j_spinor)),kind=DP) enddo call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_L(:,i_T_el,i_spinor,j_spinor)) ! @@ -123,6 +139,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,tddft_wf,mode) ! enddo ! + if(l_bs_tddft_wf_in_loop) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + ! nullify(WF_symm1_p) nullify(WF_symm2_p) nullify(rhotwr_p) @@ -202,31 +220,3 @@ subroutine perform_fft_3d(qs,rhotw,O_x) #endif ! end subroutine perform_fft_3d -! -! -subroutine TDDFT_oscillators_alloc_L(iGL) - use electrons, ONLY:n_spin,n_spinor - use BS, ONLY:BS_T_grp,BS_n_g_fxc -#include - integer, intent(in) :: iGL - if (BS_T_grp(iGL)%size>0) then - YAMBO_ALLOC(BS_T_grp(iGL)%O_tddft_L,(BS_n_g_fxc,BS_T_grp(iGL)%size,n_spinor,n_spinor)) -#ifdef _CUDA - allocate(BS_T_grp(iGL)%O_tddft_L_d,mold=BS_T_grp(iGL)%O_tddft_L) -#endif - endif -end subroutine TDDFT_oscillators_alloc_L -! -! -subroutine TDDFT_oscillators_free_L(iG_ref) - use BS, ONLY:BS_T_grp -#include - integer, intent(in) :: iG_ref - integer :: iGL - do iGL=iG_ref,1,-1 - YAMBO_FREE(BS_T_grp(iGL)%O_tddft_L) -#ifdef _CUDA - if (allocated(BS_T_grp(iGL)%O_tddft_L_d)) deallocate(BS_T_grp(iGL)%O_tddft_L_d) -#endif - enddo -end subroutine TDDFT_oscillators_free_L diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 10a0677f88..0c815df0e5 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -7,7 +7,7 @@ ! #include ! -subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) +subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering ! @@ -16,7 +16,9 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) ! use pars, ONLY:SP,DP,pi,cZERO use FFT_m, ONLY:fft_size + use wave_func, ONLY:WF use xc_functionals, ONLY:F_xc_mat + use interfaces, ONLY:WF_load,WF_free use R_lattice, ONLY:qindx_X,bz_samp,minus_G use BS, ONLY:l_BS_magnons,BS_T_grp,BS_bands use electrons, ONLY:n_spinor,n_sp_pol,n_spin @@ -28,20 +30,26 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) implicit none ! type(bz_samp),intent(in) :: Xk - integer, intent(in) :: iq,i_T_grp + integer, intent(in) :: iq,i_T_grp,NG(2) + logical, intent(in) :: l_bs_tddft_wf_in_loop character(1), intent(in) :: mode type(tddft_wf_t), target, intent(inout) :: tddft_wf ! ! Work Space ! + logical :: l_load_WFs integer :: i_spinor,j_spinor,ip_spinor,jp_spinor,ifft,irhotw,is_yambo,os_yambo,i_spinor_y,j_spinor_y,& & i_sp_loop,o_sp_loop integer :: i_T_el,i_T_el_p,N_T_el_p,i_c,i_v,i_sp_c,i_sp_v,i_k_bz,i_k,i_s,i_g0,i_g1,i_g2,i_p_bz,i_g_p,i_p,& & i_sp,i_T_grp_p,is(4),os(4),qs(3),NK(2) ! - complex(DP), pointer DEV_ATTR :: rhotwr_p(:) - complex(SP), pointer DEV_ATTR :: WF_symm1_p(:,:) - complex(SP), pointer DEV_ATTR :: WF_symm2_p(:,:) + complex(DP), pointer :: rhotwr_p(:) + complex(SP), pointer :: WF_symm1_p(:,:) + complex(SP), pointer :: WF_symm2_p(:,:) + ! +#if defined _CUDA + call error("TDDFT ALDA Osc. not GPU ported") +#endif ! call timing('T_space ALDA Osc.',OPR='start') ! @@ -100,6 +108,20 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) os(1)=i_c endif ! + l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) + if (l_load_WFs) then +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp critical +#endif + if (NK(2)/=-1) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + NK=(/min(i_k,i_p),max(i_k,i_p)/) + call WF_load(WF,NG(1),NG(2),BS_bands,NK,k_extrema_only=.true.,quiet=.true.,& + & space='R',title="Kernel exch",keep_states_to_load=.true.) +#if defined(__NOTNOW) && ! defined(_CUDA) + !$omp end critical +#endif + endif + ! if ( (is(4)/=os(4)) .and. ((.not.l_BS_magnons).or. n_sp_pol==1) ) call error(" TDDFT_ALDA_R_space: wrong spin index") if ( (is(4)==os(4)) .and. (( l_BS_magnons).and.n_sp_pol==2) ) call error(" TDDFT_ALDA_R_space: wrong spin index") ! @@ -126,7 +148,7 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) os_yambo=i_sp_loop ! To check/fix the spinorial version rhotwr_p(:)=cmplx(F_xc_mat(:,is_yambo,os_yambo,is(4),os(4))* & - & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) + & WF_symm1_p(:,1)*conjg(WF_symm2_p(:,1)),kind=DP) call perform_fft_3d(qs,rhotwr_p,BS_T_grp(i_T_grp)%O_tddft_R(:,i_T_el,i_sp_loop,o_sp_loop)) ! enddo @@ -157,6 +179,8 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) ! enddo ! + if(l_bs_tddft_wf_in_loop) call WF_free(WF,keep_fft=.true.,keep_states_to_load=.true.) + ! nullify(WF_symm1_p) nullify(WF_symm2_p) nullify(rhotwr_p) @@ -164,31 +188,3 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,tddft_wf,mode) call timing('T_space ALDA Osc.',OPR='stop') ! end subroutine TDDFT_ALDA_eh_space_G_collisions_R -! -! -subroutine TDDFT_oscillators_alloc_R(iGR) - use electrons, ONLY:n_spin,n_spinor - use BS, ONLY:BS_T_grp,BS_n_g_fxc -#include - integer, intent(in) :: iGR - if (BS_T_grp(iGR)%size>0) then - YAMBO_ALLOC(BS_T_grp(iGR)%O_tddft_R,(BS_n_g_fxc,BS_T_grp(iGR)%size,n_spin,n_spin)) -#ifdef _CUDA - allocate(BS_T_grp(iGR)%O_tddft_R_d,mold=BS_T_grp(iGR)%O_tddft_R) -#endif - endif -end subroutine TDDFT_oscillators_alloc_R -! -! -subroutine TDDFT_oscillators_free_R(iG_ref) - use BS, ONLY:BS_T_grp -#include - integer, intent(in) :: iG_ref - integer :: iGR - do iGR=iG_ref,1,-1 - YAMBO_FREE(BS_T_grp(iGR)%O_tddft_R) -#ifdef _CUDA - if (allocated(BS_T_grp(iGR)%O_tddft_R_d)) deallocate(BS_T_grp(iGR)%O_tddft_R_d) -#endif - enddo -end subroutine TDDFT_oscillators_free_R diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index f20538073a..99c8994d47 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM ! -subroutine WF_alloc(WF) +subroutine WF_alloc(WF,k_extrema_only) ! use pars, ONLY:cZERO use wave_func, ONLY:WAVEs,states_to_load,wf_ng,wf_ncx @@ -17,50 +17,57 @@ subroutine WF_alloc(WF) #include ! type(WAVEs) :: WF + logical, intent(in) :: k_extrema_only ! ! Work Space ! - integer :: ik,ib,i_sp_pol,N_total,wf_grid_size + integer :: ik,ib,i_sp_pol,NK,N_loaded,N_total,wf_grid_size ! ! Distributed allocation ! if(allocated(states_to_load)) then ! WF%N=0 + N_loaded=0 N_total=0 do i_sp_pol=WF%sp_pol(1),WF%sp_pol(2) do ik=WF%k(1),WF%k(2) do ib=WF%b(1),WF%b(2) N_total=N_total+1 - if (states_to_load(ib,ik,i_sp_pol)) WF%N=WF%N+1 + if (states_to_load(ib,ik,i_sp_pol)) then + N_loaded=N_loaded+1 + if (.not.k_extrema_only) WF%N=WF%N+1 + if ( k_extrema_only.and.(ik==WF%k(1).or.ik==WF%k(2))) WF%N=WF%N+1 + endif enddo enddo enddo ! else ! - WF%N=(WF%b(2)-WF%b(1)+1)*(WF%k(2)-WF%k(1)+1)*(WF%sp_pol(2)-WF%sp_pol(1)+1) + NK=(WF%k(2)-WF%k(1)+1) + if (k_extrema_only) NK=min(NK,2) + WF%N=(WF%b(2)-WF%b(1)+1)*NK*(WF%sp_pol(2)-WF%sp_pol(1)+1) + N_loaded=WF%N N_total=WF%N ! endif ! + call PARALLEL_live_message("Wave-Function states",LOADED=N_loaded,TOTAL=N_total) + ! if (WF%space=='R') wf_grid_size=fft_size if (WF%space=='G') wf_grid_size=wf_ng if (WF%space=='C') wf_grid_size=wf_ncx if (WF%space=='B') wf_grid_size=wf_ncx ! YAMBO_ALLOC(WF%c,(wf_grid_size,n_spinor,WF%N)) + WF%c=cZERO if (have_cuda) then YAMBO_ALLOC_MOLD(WF%c_d,WF%c) + WF%c_d=cZERO endif ! - call PARALLEL_live_message("Wave-Function states",LOADED=WF%N,TOTAL=N_total) - ! YAMBO_ALLOC(WF%index,(WF%b(2),WF%k(2),WF%sp_pol(2))) - ! - WF%c=cZERO - if (have_cuda) WF%c_d=cZERO - ! WF%index=0 ! end subroutine diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index 2f6877cf88..c5c19a0ae3 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM ! -subroutine WF_free(WF,keep_fft) +subroutine WF_free(WF,keep_fft,keep_states_to_load) ! use wave_func, ONLY:WAVEs use pseudo, ONLY:pp_is_uspp,PP_uspp_free @@ -15,14 +15,19 @@ subroutine WF_free(WF,keep_fft) ! type(WAVEs) :: WF logical, optional :: keep_fft + logical, optional :: keep_states_to_load ! ! Work-space ! logical :: keep_fft_ + logical :: keep_states_to_load_ ! keep_fft_=.false. if (present(keep_fft)) keep_fft_=keep_fft ! + keep_states_to_load_=.false. + if (present(keep_states_to_load)) keep_states_to_load_=keep_states_to_load + ! ! USPP if (pp_is_uspp) call PP_uspp_free() ! @@ -44,6 +49,9 @@ subroutine WF_free(WF,keep_fft) WF%b=0 WF%sp_pol=0 WF%space=' ' + ! + if (keep_states_to_load_) return + ! WF%to_load=.TRUE. ! end subroutine diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 0f42af3ce4..52e954fb15 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -11,6 +11,7 @@ !! @param[in] iGo_max_in ??? !! @param[in] bands_to_load bands range !! @param[in] kpts_to_load k-points range +!! @param[in] k_extrema_only k-points, load only !first and last in range !! @param[in] sp_pol_to_load spin-polarization range !! @param[in] space R = real-space, G = G-space, C = ?, B = ? !! @param[in] title purpose of the wave-function loading @@ -21,12 +22,12 @@ !! !! @param[out] WF Wave-function object ! -subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load,& +subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load,k_extrema_only,& & space,title,impose_free_and_alloc,force_WFo,keep_states_to_load,quiet) ! ! Load and (eventually) FFTs the wavefunctions ! - use pars, ONLY:SP,DP,schlen + use pars, ONLY:SP,DP,schlen,cZERO use com, ONLY:msg,core_io_path,fat_log use vec_operate, ONLY:c2a use stderr, ONLY:intc @@ -58,6 +59,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load integer, optional :: sp_pol_to_load(2) character(*),optional :: space character(*),optional :: title + logical, optional :: k_extrema_only logical, optional :: impose_free_and_alloc logical, optional :: force_WFo logical, optional :: keep_states_to_load @@ -69,16 +71,18 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load character(schlen)::wf_title integer ::i_sp_pol,ikibz,ifrag,ib_grp,ib_to_load,ib,ib1,ib2,i_spinor,ic,ig,igfft,& & iG_max,iG_bounds_loaded(2),iGo_max,sp_pol_to_load_(2),wf_grid_size,& -& npwk +& npwk,N real(SP) ::mndp,mxdp,xk(3) complex(SP) ::c - logical ::loaded_bounds_ok,free_and_alloc,buffer_is_ok,clean_up_states,force_WFo_,QUIET_wf,SIZE_msg + logical ::loaded_bounds_ok,free_and_alloc,buffer_is_ok,clean_up_states,& + k_extrema_only_,force_WFo_,QUIET_wf,SIZE_msg complex(SP), allocatable :: wf_disk(:,:,:) complex(DP), allocatable :: wf_DP(:) ! complex(DP), allocatable DEV_ATTR :: wf_DP_d(:) complex(SP), allocatable DEV_ATTR :: wf_disk_d(:,:,:) - complex(SP), pointer DEV_ATTR :: wfc_d(:,:,:) + complex(SP), pointer DEV_ATTR :: wfc_d(:,:,:) + ! integer :: WFN ! ! I/O @@ -104,6 +108,9 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load force_WFo_=.false. if(present(force_WFo)) force_WFo_=force_WFo ! + k_extrema_only_=.false. + if(present(k_extrema_only)) k_extrema_only_=k_extrema_only + ! sp_pol_to_load_=(/1,n_sp_pol/) if(present(sp_pol_to_load)) sp_pol_to_load_=sp_pol_to_load ! @@ -182,6 +189,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! QUIET_wf = .false. if (kpts_to_load(1)==kpts_to_load(2).and.kpts_to_load(2)>1) QUIET_wf = .true. + if (k_extrema_only_.and.kpts_to_load(1)>1) QUIET_wf = .true. if (present(quiet)) QUIET_wf = quiet if (QUIET_wf) call IO_and_Messaging_switch("-report -log") SIZE_msg=.not.QUIET_wf.and.(any((/fft_dim_loaded/=fft_dim/)).or.any((/fft_dim==0/))) @@ -255,7 +263,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! ! Memory allocation ! - call WF_alloc(WF) + call WF_alloc(WF,k_extrema_only_) ! if (WF%space=='R') wf_grid_size=fft_size if (WF%space=='G') wf_grid_size=wf_ng @@ -304,6 +312,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load do ikibz=1,nkibz ! if (any( (/ikibzWF%k(2)/) )) cycle + if (k_extrema_only_ .and. all( (/ikibz>WF%k(1), ikibzmxdp) mxdp=abs(c) if (abs(c) ! -subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_out) +subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,i_sp_pol,wf_shift,Xk,WF_k_in,WF_k_out) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor,n_sp_pol @@ -18,18 +18,18 @@ subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k ! implicit none ! - integer, intent(in) :: wf_shift(3),ikbz,b_to_shift(2) + integer, intent(in) :: wf_shift(3),ikbz,i_sp_pol,b_to_shift(2) type(bz_samp), intent(in) :: Xk - complex(SP), intent(in) DEV_ATTR :: WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) - complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) + complex(SP), intent(in) DEV_ATTR :: WF_k_in (wf_ng_1st_BZ, n_spinor,b_to_shift(1):b_to_shift(2)) + complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2)) ! ! Work space ! integer :: id,ik,is - complex(SP) DEV_ATTR :: WF_tmp(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2),n_sp_pol) + complex(SP) DEV_ATTR :: WF_tmp(wf_ng_overlaps,n_spinor,b_to_shift(1):b_to_shift(2)) integer :: ig,igp,i_b_ref integer :: g0_idx(3,2),g0_idx_val - integer :: i_spinor,i_b,i_sp_pol + integer :: i_spinor,i_b ! ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -48,21 +48,19 @@ subroutine DEV_SUB_ALT(WF_shift_kpoint)(b_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k g0_idx_val=k_map%g0_idx(id,WF_shift(id)) ! #if defined _CUDA - !$cuf kernel do(4) <<<*,*>>> + !$cuf kernel do(3) <<<*,*>>> #endif - do i_sp_pol=1,n_sp_pol do i_b=b_to_shift(1),b_to_shift(2) do i_spinor=1,n_spinor do ig=1,wf_ng_1st_BZ ! - if(WF_tmp(ig,1,i_b_ref,1)==cZERO) cycle + if(WF_tmp(ig,1,i_b_ref)==cZERO) cycle igp=DEV_VAR(G_m_G)(ig,g0_idx_val) - WF_k_out(igp,i_spinor,i_b,i_sp_pol)=WF_tmp(ig,i_spinor,i_b,i_sp_pol) + WF_k_out(igp,i_spinor,i_b)=WF_tmp(ig,i_spinor,i_b) ! enddo enddo enddo - enddo ! else call dev_memcpy(WF_k_out,WF_tmp) diff --git a/src/wf_and_fft/WF_symm_kpoint.F b/src/wf_and_fft/WF_symm_kpoint.F index 95038dda4f..dba1475a70 100644 --- a/src/wf_and_fft/WF_symm_kpoint.F +++ b/src/wf_and_fft/WF_symm_kpoint.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): MG CA DS AF ! -subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) +subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) ! ! INCLUDED in: WF_symm_kpoint_incl.F ! @@ -18,14 +18,14 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! implicit none ! - integer, intent(in) :: ikbz,b_to_load(2) + integer, intent(in) :: ikbz,i_sp_pol,b_to_load(2) type(bz_samp), intent(in) :: Xk - complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2),n_sp_pol) + complex(SP), intent(out) DEV_ATTR :: WF_k_out(wf_ng_1st_BZ,n_spinor,b_to_load(1):b_to_load(2)) ! ! Work space ! complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) - integer :: ik,is,i_sp_pol,ib,iwf + integer :: ik,is,ib,iwf integer :: i_g,i_spinor ! ik = Xk%sstar(ikbz,1) @@ -36,18 +36,15 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) ! if(is==idt_index) then ! - do i_sp_pol=1,n_sp_pol do ib=b_to_load(1),b_to_load(2) ! iwf=WF%index(ib,ik,i_sp_pol) - call dev_memcpy(WF_k_out(:,:,ib,i_sp_pol),DEV_VAR(WF%c)(:,:,iwf)) + call dev_memcpy(WF_k_out(:,:,ib),DEV_VAR(WF%c)(:,:,iwf)) ! enddo - enddo ! else ! - do i_sp_pol=1,n_sp_pol do ib=b_to_load(1),b_to_load(2) ! iwf=WF%index(ib,ik,i_sp_pol) @@ -59,7 +56,7 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) #endif do i_spinor=1,n_spinor do i_g=1,wf_ng - WF_k_out(DEV_VAR(g_rot)(i_g,is),i_spinor,ib,i_sp_pol)=WF_p(i_g,i_spinor,iwf) + WF_k_out(DEV_VAR(g_rot)(i_g,is),i_spinor,ib)=WF_p(i_g,i_spinor,iwf) enddo enddo ! @@ -69,15 +66,14 @@ subroutine DEV_SUB_ALT(WF_symm_kpoint)(b_to_load,ikbz,Xk,WF_k_out) !$cuf kernel do(1) <<<*,*>>> #endif do i_g=1,wf_ng - WF_k_out(DEV_VAR(g_rot)(i_g,is),1,ib,i_sp_pol)=DEV_VAR(spin_sop)(1,1,is)*WF_p(i_g,1,iwf)+ & -& DEV_VAR(spin_sop)(1,2,is)*WF_p(i_g,2,iwf) - WF_k_out(DEV_VAR(g_rot)(i_g,is),2,ib,i_sp_pol)=DEV_VAR(spin_sop)(2,1,is)*WF_p(i_g,1,iwf)+ & -& DEV_VAR(spin_sop)(2,2,is)*WF_p(i_g,2,iwf) + WF_k_out(DEV_VAR(g_rot)(i_g,is),1,ib)=DEV_VAR(spin_sop)(1,1,is)*WF_p(i_g,1,iwf)+ & +& DEV_VAR(spin_sop)(1,2,is)*WF_p(i_g,2,iwf) + WF_k_out(DEV_VAR(g_rot)(i_g,is),2,ib)=DEV_VAR(spin_sop)(2,1,is)*WF_p(i_g,1,iwf)+ & +& DEV_VAR(spin_sop)(2,2,is)*WF_p(i_g,2,iwf) enddo endif ! enddo - enddo ! if(is>nsym/(1+i_time_rev)) call dev_conjg(WF_k_out) ! From 63fe48903f30a2bd105cc375e6b9d9ca0c452b69 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 26 Jul 2024 00:25:09 +0200 Subject: [PATCH 0814/1367] Version 5.2.0, Revision 23398, Hash 74c43fce9f MODIFIED * include/version/version.m4 collisions/COLLISIONS_compress.F Bugs: - [yambo_nl] Collisions compress fixed in presence of CVONLY collisions Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_compress.F | 18 +++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d54def9a3b..7b98619145 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23397 h.566513b49a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23398 h.74c43fce9f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23397" -SHASH="566513b49a" +SREVISION="23398" +SHASH="74c43fce9f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index 4acfed5c8f..b97a0e0425 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -11,8 +11,10 @@ subroutine COLLISIONS_compress(COLL) ! use pars, ONLY:SP,DP,SP6,cZERO - use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff + use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff,& + & COLLISIONS_CV_only use R_lattice, ONLY:nXkibz + use electrons, ONLY:n_met_bands,n_full_bands ! #include ! @@ -44,6 +46,9 @@ subroutine COLLISIONS_compress(COLL) do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! + if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp> maxval(n_met_bands) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + ! ic=ic+1 ! if(l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=cmplx(COLL%v_c_SP(ic),kind=SP) @@ -72,12 +77,11 @@ subroutine COLLISIONS_compress(COLL) do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if(COLL%table(ib,ibp,i_kmq)=='t') then - ic=ic+1 - if(l_coll_SP) COLL%v_c_SP(ic)=cmplx(COLL%v3_c(ib,ibp,i_kmq),kind=SP6) - if(.not.l_coll_SP) COLL%v_c(ic) =COLL%v3_c(ib,ibp,i_kmq) - ! - endif + if(.not.COLL%table(ib,ibp,i_kmq)=='t') cycle + ! + ic=ic+1 + if(l_coll_SP) COLL%v_c_SP(ic)=cmplx(COLL%v3_c(ib,ibp,i_kmq),kind=SP6) + if(.not.l_coll_SP) COLL%v_c(ic) =COLL%v3_c(ib,ibp,i_kmq) ! enddo enddo From 9f8d011f729fb457724534eb30f14eb4689a5dba Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 27 Jul 2024 10:23:37 +0200 Subject: [PATCH 0815/1367] Version 5.2.0, Revision 23399, Hash 63fe48903f MODIFIED * include/version/version.m4 io/io_QP_and_GF.F Bugs: - [ypp] Fixed bug introduced in qp expansion Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/io/io_QP_and_GF.F | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 7b98619145..d7fae0b263 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23398 h.74c43fce9f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23399 h.63fe48903f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23398" -SHASH="74c43fce9f" +SREVISION="23399" +SHASH="63fe48903f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_QP_and_GF.F b/src/io/io_QP_and_GF.F index 190154a583..98936a2396 100644 --- a/src/io/io_QP_and_GF.F +++ b/src/io/io_QP_and_GF.F @@ -56,6 +56,7 @@ integer function io_QP_and_GF(what,qp,ID) if (what=="QP") QP_type_DB=.TRUE. if (index(what,".QP")/=0) QP_type_DB=.TRUE. if (index(what,"QP_merged")>0.and.write_is_on(ID)) QP_type_DB=.TRUE. + if (index(what,"QP_expanded")>0.and.write_is_on(ID)) QP_type_DB=.TRUE. if (index(what,"QP_interpolated")>0.and.write_is_on(ID)) QP_type_DB=.TRUE. ! if (type_two_DB) then From b19e0ad9d4f4ce83db020cf75389b0666f5b717b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 28 Jul 2024 15:31:04 +0200 Subject: [PATCH 0816/1367] Version 5.2.0, Revision 23400, Hash 9f8d011f72 MODIFIED * include/version/version.m4 collisions/COLLISIONS_eval.F driver/options_projects.c hamiltonian/XC_potentials.F interface/INIT_read_command_line.F interface/INIT_read_command_line_potentials.F modules/mod_collision_ext.F Changes: - [yambo_rt] Control of collisions from BSE improved mimicking CVONLY mode Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_eval.F | 6 ++++-- src/driver/options_projects.c | 5 +++-- src/hamiltonian/XC_potentials.F | 11 +++++++++-- src/interface/INIT_read_command_line.F | 7 +++++-- src/interface/INIT_read_command_line_potentials.F | 4 +++- src/modules/mod_collision_ext.F | 1 + 7 files changed, 28 insertions(+), 12 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d7fae0b263..b5417e0b6f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23399 h.63fe48903f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23400 h.9f8d011f72, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23399" -SHASH="63fe48903f" +SREVISION="23400" +SHASH="9f8d011f72" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index f3c28b8d1f..4d094d9fcb 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -30,7 +30,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use wave_func, ONLY:WF use hamiltonian, ONLY:H_potential,H_kind use global_XC, ONLY:QP_SE_GW_NEQ,QP_SE_GW_QED - use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,& + use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,COLLISIONS_from_BSE,& & COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming use X_m, ONLY:X_t use plasma, ONLY:EH_gas @@ -129,7 +129,9 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) if(l_use_Hxc_collisions) call CHECK_and_ALLOC(HXC_collisions) if(l_use_COH_collisions) call CHECK_and_ALLOC(COH_collisions) ! - if (l_use_Hxc_collisions) then + if (.not.COLLISIONS_from_BSE) IO_err_BS=-1 + ! + if (l_use_Hxc_collisions.and.COLLISIONS_from_BSE) then ! ! Check if I can use the BSE kernel for the collisions ! diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index 4f7d9565fd..4d78fa46ec 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -37,8 +37,9 @@ void options_projects(struct options_struct options[],int *i_opt) strcpy(options[*i_opt].long_desc[10],"PZ => =pz"); strcpy(options[*i_opt].long_desc[11],"GS => =gs"); strcpy(options[*i_opt].long_desc[12],"CVONLY => =cvonly (compute only cv collisions)"); - strcpy(options[*i_opt].long_desc[13]," "); - strcpy(options[*i_opt].long_desc[14],"Potentials can be combined. Example: use hf for Hartree-Fock"); + strcpy(options[*i_opt].long_desc[13],"KBSE => =kbse (compute collisions from bse)"); + strcpy(options[*i_opt].long_desc[14]," "); + strcpy(options[*i_opt].long_desc[15],"Potentials can be combined. Example: use hf for Hartree-Fock"); options[*i_opt].long_opt="potential"; options[*i_opt].short_opt='v'; options[*i_opt].bin="yambo_sc yambo_rt yambo_nl"; diff --git a/src/hamiltonian/XC_potentials.F b/src/hamiltonian/XC_potentials.F index 772f133d07..3a51e9f4ba 100644 --- a/src/hamiltonian/XC_potentials.F +++ b/src/hamiltonian/XC_potentials.F @@ -16,7 +16,7 @@ subroutine XC_potentials(POTENTIALS_string) use xc_functionals, ONLY:XC_LDA_X,XC_LDA_C_PZ,XC_EXCHANGE_CORRELATION,XC_EXCHANGE,& & GS_xc_KIND,GS_xc_FUNCTIONAL use collision_ext, ONLY:COLLISIONS_have_HARTREE,COLLISIONS_HXC_local,COLLISIONS_HXC_MB,COLLISIONS_HXC_use_TDDFT,& -& COLLISIONS_CV_only +& COLLISIONS_CV_only,COLLISIONS_from_BSE use electrons, ONLY:n_full_bands,n_met_bands use stderr, ONLY:STRING_split,STRING_same ! @@ -55,6 +55,11 @@ subroutine XC_potentials(POTENTIALS_string) if (.not.index(POTENTIALS_string,'CVONLY')>0) POTENTIALS_string=trim(POTENTIALS_string)//" CVONLY" endif ! + if (STRING_same(trim(potentials(i_c)),'KBSE')) then + COLLISIONS_from_BSE=.true. + if (.not.index(POTENTIALS_string,'KBSE')>0) POTENTIALS_string=trim(POTENTIALS_string)//" KBSE" + endif + ! if (STRING_same(trim(potentials(i_c)),'IP')) then ! This means Hartree and V_xc are frozed: IP=KS-IP l_sc_ip=.true. @@ -159,7 +164,9 @@ subroutine XC_potentials(POTENTIALS_string) call warning("NULL SC potential! ") else if (STRING_same(trim(potentials(i_c)),'CVONLY')) then call warning("Only CV components included ") - else + else if (STRING_same(trim(potentials(i_c)),'KBSE')) then + call warning("Loading BSE kernel instead of computing collisions ") + else call error("Unknown SC potential! ") endif ! diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index 2e220073e5..bfd5b369c6 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -337,6 +337,7 @@ subroutine INIT_read_command_line(rstr,init_) V_is_defined=INIT_read_command_line_potentials(V_string,"f") V_is_defined=INIT_read_command_line_potentials(V_string,"h") V_is_defined=INIT_read_command_line_potentials(V_string,"cvonly") + V_is_defined=INIT_read_command_line_potentials(V_string,"kbse") ! endif #endif @@ -357,6 +358,7 @@ subroutine INIT_read_command_line(rstr,init_) V_is_defined=INIT_read_command_line_potentials(V_string,"f") V_is_defined=INIT_read_command_line_potentials(V_string,"h") V_is_defined=INIT_read_command_line_potentials(V_string,"cvonly") + V_is_defined=INIT_read_command_line_potentials(V_string,"kbse") ! endif #endif @@ -426,8 +428,9 @@ subroutine INIT_read_command_line(rstr,init_) ! COLLISIONS ! if (runlevel_is_on('collisions')) then - if ( l_elel_scatt.or.trim(H_potential)=='COH+SEX'.or.& -& trim(H_potential)=='COH'.or.trim(H_potential)=='SEX' ) call initactivate(1,'em1s') + if ( l_elel_scatt.or.index(H_potential,'SEX')>0 .or.& +& index(H_potential,'COH')>0 ) call initactivate( 1,'em1s') + if ( index(H_potential,'KBSE')>0 ) call initactivate(-1,'em1s') endif ! #endif diff --git a/src/interface/INIT_read_command_line_potentials.F b/src/interface/INIT_read_command_line_potentials.F index c5b45b8b06..9c5b1f930a 100644 --- a/src/interface/INIT_read_command_line_potentials.F +++ b/src/interface/INIT_read_command_line_potentials.F @@ -47,7 +47,9 @@ logical function INIT_read_command_line_potentials(string,potential_user_string) H_potential=trim(H_potential)//"IP" case('cvonly') H_potential=trim(H_potential)//"CVONLY" - end select + case('kbse') + H_potential=trim(H_potential)//"KBSE" + end select ! string=STRING_remove(string,trim(potential_user_string),replace=" ") ! diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index cfde57b921..eafbd7bcce 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -33,6 +33,7 @@ module collision_ext logical :: COLLISIONS_HXC_MB=.FALSE. logical :: COLLISIONS_HXC_use_TDDFT=.FALSE. logical :: COLLISIONS_CV_only=.FALSE. + logical :: COLLISIONS_from_BSE=.FALSE. logical :: COLLISIONS_load_SP=.FALSE. ! Force loading of collision in single precision logical :: COLLISIONS_compr =.FALSE. ! If parallel-io is used collisions in memory are compressed ! From 2e17f6a970b6f0692fbc865894ccb3994c2356da Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 1 Aug 2024 16:51:40 +0200 Subject: [PATCH 0817/1367] Version 5.2.0, Revision 23307, Hash 7175ddda6a MODIFIED * include/version/version.m4 modules/mod_linear_algebra.F Changes: - [yambo] Added few messages Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/modules/mod_linear_algebra.F | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 194e9ef5d4..894b6d1cf8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23289 h.172eddb42b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23307 h.7175ddda6a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23289" -SHASH="172eddb42b" +SREVISION="23307" +SHASH="7175ddda6a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index f2db9b22ea..90299c83f8 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -206,6 +206,8 @@ subroutine heev(msize,M,E_real,work,lwork,rwk,ifail) end subroutine heev ! subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) + ! + use com, ONLY:msg ! integer, intent(in) :: msize,lwork integer, intent(out) :: ifail @@ -220,7 +222,11 @@ subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) ! #if defined _MAGMA ! - if (.not.magma_init_done) call magma_setup() + if (.not.magma_init_done) then + call msg('sr','Initializing magma library in geev') + call magma_setup() + endif + call msg('sr','SERIAL diagonalization with magma') ! # if defined _OPENMP ! thread safety @@ -241,6 +247,8 @@ subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) # endif ! #else + ! + call msg('sr','SERIAL diagonalization with lapack') ! ! use lapack ! From fdc73fcf397de8db24be7a254e7defe86ad78a6d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 1 Aug 2024 17:22:59 +0200 Subject: [PATCH 0818/1367] Version 5.2.0, Revision 23308, Hash 2e17f6a970 MODIFIED * config/m4/acx_report.m4 config/m4/magma.m4 config/mk/global/actions/compile_external_libraries.mk config/mk/global/actions/download_external_libraries.mk configure include/version/version.m4 lib/archive/Makefile.loc lib/archive/package.list NEW * lib/magma/Makefile.loc Changes: - [yambo] few more steps to prepare internal magma compilation Patch sent by: Davide Sangalli --- config/m4/acx_report.m4 | 7 + config/m4/magma.m4 | 37 ++- .../actions/compile_external_libraries.mk | 2 + .../actions/download_external_libraries.mk | 2 + configure | 311 +++++++++++++++++- include/version/version.m4 | 6 +- lib/archive/Makefile.loc | 3 + lib/archive/package.list | 5 + lib/magma/Makefile.loc | 42 +++ 9 files changed, 386 insertions(+), 29 deletions(-) create mode 100644 lib/magma/Makefile.loc diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index f96dbbd9c7..b583690063 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -300,6 +300,13 @@ SCALAPACK_INCS_R=$STRIPE AC_SUBST(SCALAPACK_LIBS_R) AC_SUBST(SCALAPACK_INCS_R) # +ACX_STRIPE_SUBPATH($MAGMA_LIBS,"LIB") +MAGMA_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($MAGMA_INCS,"INC") +MAGMA_INCS_R=$STRIPE +AC_SUBST(MAGMA_LIBS_R) +AC_SUBST(MAGMA_INCS_R) +# ACX_STRIPE_SUBPATH($BLACS_LIBS,"LIB") BLACS_LIBS_R=$STRIPE ACX_STRIPE_SUBPATH($BLACS_INCS,"INC") diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 index a95275e23b..ddf361df49 100644 --- a/config/m4/magma.m4 +++ b/config/m4/magma.m4 @@ -117,6 +117,7 @@ integer :: lda fi # # TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then # # internal magma @@ -125,15 +126,13 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then # internal_magma="yes" # - if test "x$lapack_shared" = "x1" ; then - #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; - MAGMA_LIBS="" ; - else - #MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; - MAGMA_LIBS="" ; - fi - #MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; - MAGMA_INCS="" ; + #if test "x$lapack_shared" = "x1" ; then + # MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + # #MAGMA_LIBS="" ; + #else + MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + #fi + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; # magma=yes def_magma="-D_MAGMA" @@ -144,16 +143,24 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then compile_magma="no" ; AC_MSG_RESULT([already compiled]) ; else - #compile_magma="yes" ; - #AC_MSG_RESULT([to be compiled]) ; - AC_MSG_RESULT([Compatible external Magma not found/specified. Internal compilation not available yet.]) ; - compile_magma="no" - def_magma="" - enable_magma="no" + compile_magma="yes" ; + AC_MSG_RESULT([Compatible external Magma not found/specified. To be compiled.]) ; fi # fi # +# switch off internal magma compilation +# +deactivate_internal=yes +if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then + AC_MSG_RESULT([Internal Magma compilation not available yet. Deactivating it.]) ; + compile_magma="no" + def_magma="" + enable_magma="no" + MAGMA_INCS="" ; + MAGMA_LIBS="" ; +fi +# AC_SUBST(MAGMA_LIBS) AC_SUBST(MAGMA_INCS) AC_SUBST(def_magma) diff --git a/config/mk/global/actions/compile_external_libraries.mk b/config/mk/global/actions/compile_external_libraries.mk index 58c8c44b3a..06ed787c0b 100644 --- a/config/mk/global/actions/compile_external_libraries.mk +++ b/config/mk/global/actions/compile_external_libraries.mk @@ -36,6 +36,8 @@ blacs: scalapack @if test "$(do_blacs)" = yes ; then LIBS="blacs" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) blacs-dl; $(mk_external_lib); fi scalapack: lapack @if test "$(do_slk)" = yes ; then LIBS="scalapack" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) scalapack-dl ; $(mk_external_lib); fi +magma: lapack + @if test "$(do_magma)" = yes ; then LIBS="magma" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) magma-dl ; $(mk_external_lib); fi petsc: @if test "$(do_petsc)" = yes ; then LIBS="petsc" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) petsc-dl; $(mk_external_lib); fi slepc: petsc diff --git a/config/mk/global/actions/download_external_libraries.mk b/config/mk/global/actions/download_external_libraries.mk index d75d996707..e3435a6f74 100644 --- a/config/mk/global/actions/download_external_libraries.mk +++ b/config/mk/global/actions/download_external_libraries.mk @@ -33,6 +33,8 @@ blacs-dl: @LIB2DO="blacs"; $(get_external_libraries) scalapack-dl: @LIB2DO="scalapack"; $(get_external_libraries) +magma-dl: + @LIB2DO="magma"; $(get_external_libraries) petsc-dl: @LIB2DO="petsc"; $(get_external_libraries) slepc-dl: diff --git a/configure b/configure index 194399327d..940236d5db 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23287 h.e9ab2f86a2. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23308 h.2e17f6a970. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23287 h.e9ab2f86a2' -PACKAGE_STRING='Yambo 5.2.0 r.23287 h.e9ab2f86a2' +PACKAGE_VERSION='5.2.0 r.23308 h.2e17f6a970' +PACKAGE_STRING='Yambo 5.2.0 r.23308 h.2e17f6a970' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -663,6 +663,8 @@ PETSC_INCS_R PETSC_LIBS_R BLACS_INCS_R BLACS_LIBS_R +MAGMA_INCS_R +MAGMA_LIBS_R SCALAPACK_INCS_R SCALAPACK_LIBS_R LAPACK_INCS_R @@ -687,6 +689,7 @@ IOTK_INCS_R IOTK_LIBS_R MPI_info MPI_check +MAGMA_check LIBXC_check YPY_check YDB_check @@ -712,6 +715,12 @@ MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check +internal_magma +compile_magma +enable_magma +def_magma +MAGMA_INCS +MAGMA_LIBS CUDA_FLAGS def_cuda internal_libxc @@ -1037,6 +1046,12 @@ with_libxc_libdir with_libxc_includedir enable_cuda enable_nvtx +enable_magma_linalg +with_magma_libs +with_magma_incs +with_magma_path +with_magma_libdir +with_magma_includedir ' ac_precious_vars='build_alias host_alias @@ -1604,7 +1619,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23287 h.e9ab2f86a2 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23308 h.2e17f6a970 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1685,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23287 h.e9ab2f86a2:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23308 h.2e17f6a970:";; esac cat <<\_ACEOF @@ -1721,6 +1736,8 @@ Optional Features: --enable-etsf-io Activate the ETSF_IO support --enable-cuda= Enable CUDA support --enable-nvtx= Enable NVTX support + --enable-magma-linalg Enable suport for the diagonalization of BSE using + MAGMA. Default is no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1795,6 +1812,12 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory Some influential environment variables: CC C compiler command @@ -1882,7 +1905,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23287 h.e9ab2f86a2 +Yambo configure 5.2.0 r.23308 h.2e17f6a970 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2534,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23287 h.e9ab2f86a2, which was +It was created by Yambo $as_me 5.2.0 r.23308 h.2e17f6a970, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3292,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23287" -SHASH="e9ab2f86a2" +SREVISION="23308" +SHASH="2e17f6a970" @@ -10281,6 +10304,31 @@ url_ydb=https://github.com/yambo-code/ydb.git # +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -15494,6 +15542,215 @@ fi # +# + +# ============================================================================ +# MAGMA + +# +# Check whether --enable-magma_linalg was given. +if test ${enable_magma_linalg+y} +then : + enableval=$enable_magma_linalg; +fi + +# + +# Check whether --with-magma_libs was given. +if test ${with_magma_libs+y} +then : + withval=$with_magma_libs; +fi + + +# Check whether --with-magma_incs was given. +if test ${with_magma_incs+y} +then : + withval=$with_magma_incs; +fi + + +# Check whether --with-magma_path was given. +if test ${with_magma_path+y} +then : + withval=$with_magma_path; +fi + + +# Check whether --with-magma_libdir was given. +if test ${with_magma_libdir+y} +then : + withval=$with_magma_libdir; +fi + + +# Check whether --with-magma_includedir was given. +if test ${with_magma_includedir+y} +then : + withval=$with_magma_includedir; +fi + + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +printf %s "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +printf %s "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 +printf %s "checking for Magma in $with_magma_path... " >&6; } ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then as_fn_error $? "No libs specified" "$LINENO" 5 ; fi + if test -z "$try_MAGMA_INCS" ; then as_fn_error $? "No include-dir specified" "$LINENO" 5 ; fi + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + cat > conftest.$ac_ext <<_ACEOF + program main + +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO" +then : + magma=yes +else $as_nop + magma=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; + # + if test "x$magma" = "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +printf %s "checking for internal Magma library... " >&6; } + # + internal_magma="yes" + # + #if test "x$lapack_shared" = "x1" ; then + # MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + # #MAGMA_LIBS="" ; + #else + MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + #fi + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + else + compile_magma="yes" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 +printf "%s\n" "Compatible external Magma not found/specified. To be compiled." >&6; } ; + fi + # +fi +# +# switch off internal magma compilation +# +deactivate_internal=yes +if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 +printf "%s\n" "Internal Magma compilation not available yet. Deactivating it." >&6; } ; + compile_magma="no" + def_magma="" + enable_magma="no" + MAGMA_INCS="" ; + MAGMA_LIBS="" ; +fi +# + + + + + + # # ============================================================================ @@ -15627,6 +15884,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then MAGMA_check="C"; fi + if test "$compile_magma" = "no" ; then MAGMA_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -15703,6 +15968,7 @@ fi + # # STRIPE [LIB] from paths # @@ -15958,6 +16224,29 @@ fi SCALAPACK_INCS_R=$STRIPE +# + +TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +MAGMA_LIBS_R=$STRIPE + +TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +MAGMA_INCS_R=$STRIPE + + # TMP1=`echo $BLACS_LIBS | sed 's/\//+/g'` @@ -16606,7 +16895,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23287 h.e9ab2f86a2, which was +This file was extended by Yambo $as_me 5.2.0 r.23308 h.2e17f6a970, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16959,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23287 h.e9ab2f86a2 +Yambo config.status 5.2.0 r.23308 h.2e17f6a970 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 894b6d1cf8..af52da50c5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23307 h.7175ddda6a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23308 h.2e17f6a970, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23307" -SHASH="7175ddda6a" +SREVISION="23308" +SHASH="2e17f6a970" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/archive/Makefile.loc b/lib/archive/Makefile.loc index e4e7908b7b..7206c1ed79 100644 --- a/lib/archive/Makefile.loc +++ b/lib/archive/Makefile.loc @@ -41,6 +41,8 @@ blacs: @+URL="$(url_blacs)" ; LIB="$(pkgname_blacs)"; $(getsrc) scalapack: @+URL="$(url_scalapack)"; LIB="$(pkgname_scalapack)"; $(getsrc) +magma: + @+URL="$(url_magma)" ; LIB="$(pkgname_magma)"; $(getsrc) petsc: @+URL="$(url_petsc)" ; LIB="$(pkgname_petsc)"; GBRANCH="$(branch_petsc)" ; GIT="$(git_petsc)" ; $(call getsrc_git,"petsc"); slepc: @@ -73,6 +75,7 @@ clean_tgz: if test -s $(tarball_etsf_io) && test "$(keep_etsf_io)" != "yes" ; then rm $(tarball_etsf_io) ; fi ; \ if test -s $(tarball_lapack) && test "$(keep_lapack)" != "yes" ; then rm $(tarball_lapack) ; fi ; \ if test -s $(tarball_scalapack)&& test "$(keep_scalapack)" != "yes" ; then rm $(tarball_scalapack) ; fi ; \ + if test -s $(tarball_magma) && test "$(keep_magma)" != "yes" ; then rm $(tarball_magma) ; fi ; \ if test -s $(tarball_blacs) && test "$(keep_blacs)" != "yes" ; then rm $(tarball_blacs) ; fi ; \ if test -s $(tarball_petsc) && test "$(keep_petsc)" != "yes" ; then rm $(tarball_petsc) ; fi ; \ if test -s $(tarball_slepc) && test "$(keep_slepc)" != "yes" ; then rm $(tarball_slepc) ; fi ; \ diff --git a/lib/archive/package.list b/lib/archive/package.list index 8ed6c766f5..0573a3806f 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -14,6 +14,7 @@ keep_libxc=no keep_lapack=no keep_blacs=no keep_scalapack=no +keep_magma=no keep_petsc=no keep_slepc=no keep_fftw=no @@ -34,6 +35,7 @@ version_libxc=5.2.3 version_lapack=3.12.0 version_blacs=missing version_scalapack=2.2.1 +version_magma=2.8.0 version_slepc=3.20.2 version_petsc=3.20.5 version_fftw=3.3.10 @@ -53,6 +55,7 @@ pkgname_libxc=libxc-$(version_libxc) pkgname_lapack=lapack-$(version_lapack) pkgname_blacs=blacs pkgname_scalapack=scalapack-$(version_scalapack) +pkgname_magma=magma-$(version_magma) pkgname_slepc=slepc-$(version_slepc) pkgname_petsc=petsc-$(version_petsc) pkgname_fftw=fftw-$(version_fftw) @@ -71,6 +74,7 @@ tarball_etsf_io=$(pkgname_etsf_io).tar.gz tarball_libxc=$(pkgname_libxc).tar.gz tarball_lapack=v$(version_lapack).tar.gz tarball_scalapack=v$(version_scalapack).tar.gz +tarball_magma=$(pkgname_magma).tar.gz tarball_blacs=$(pkgname_blacs).tar.gz tarball_slepc=slepc-v$(version_slepc).tar.gz tarball_petsc=petsc-v$(version_petsc).tar.gz @@ -97,6 +101,7 @@ url_libxc=https://gitlab.com/libxc/libxc/-/archive/$(version_libxc)/$(tarball_li # External URL's More # url_fftw=https://fftw.org/$(tarball_fftw) +url_magma=https://icl.utk.edu/projectsfiles/magma/downloads/$(tarball_magma) # # Internal URL's # diff --git a/lib/magma/Makefile.loc b/lib/magma/Makefile.loc new file mode 100644 index 0000000000..5296d0b3e0 --- /dev/null +++ b/lib/magma/Makefile.loc @@ -0,0 +1,42 @@ +# +#=============================== +# Yambo package +#=============================== +# +include ../../config/setup +include ../archive/package.list +# +LIBNAME=libmagma.a +LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/ +LIBRARY=$(LIBPATH)/lib/$(LIBNAME) +# +PACKAGE=$(pkgname_magma) +# +include ../config/external_libs_commons.mk +include ../config/external_libs_defs.mk +# +# +all: $(LIBRARY) +# +uncompress: + @$(uncompress) + +configure: uncompress + @$(configure) + +compile: uncompress configure + @$(call compile) + +install: uncompress configure compile + @$(call install_via_make,magma) + +$(LIBRARY): uncompress configure compile install +# +# cleaning +# +clean: + @$(call clean_the_lib,clean) + +clean_all: clean + @$(rm_the_lib) +# From b81847afc2896c108f802991ac750c3d4f8b8df6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 2 Aug 2024 16:53:54 +0200 Subject: [PATCH 0819/1367] Version 5.2.0, Revision 23401, Hash b19e0ad9d4 MODIFIED * include/version/version.m4 collisions/COLLISIONS_compress.F collisions/LSEX_potential.F modules/SET_defaults.F nloptics/NL_driver.F nloptics/NL_initialize.F Bugs: - [yambo_nl] Fixed collisions compression with COLLISIONS_CV_only Changes: - [yambo_nl] Restored parsing of UseDipoles input flag Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_compress.F | 9 +++++---- src/collisions/LSEX_potential.F | 2 +- src/modules/SET_defaults.F | 4 ++-- src/nloptics/NL_driver.F | 3 ++- src/nloptics/NL_initialize.F | 1 + 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index b5417e0b6f..21eb5ca0cb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23400 h.9f8d011f72, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23401 h.b19e0ad9d4, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23400" -SHASH="9f8d011f72" +SREVISION="23401" +SHASH="b19e0ad9d4" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index b97a0e0425..7f6b5b458a 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -41,7 +41,8 @@ subroutine COLLISIONS_compress(COLL) ! ic=0 ! - COLL%table='t' + COLL%table='f' + ! do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) @@ -51,10 +52,10 @@ subroutine COLLISIONS_compress(COLL) ! ic=ic+1 ! - if(l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=cmplx(COLL%v_c_SP(ic),kind=SP) - if(.not.l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=COLL%v_c(ic) + if( l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=cmplx(COLL%v_c_SP(ic),kind=SP) + if(.not.l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)= COLL%v_c(ic) ! - if(abs(COLL%v3_c(ib,ibp,i_kmq))=COLLISIONS_max*COLLISIONS_cutoff) COLL%table(ib,ibp,i_kmq)='t' ! enddo enddo diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index f04f1fc512..8f2b88123e 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -59,7 +59,7 @@ subroutine LSEX_potential(q,X,Xw) if(Correlation==LSEX) then call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) io_err=io_X(X,Xw,ID) - if (io_err<0) call error('Incomplete and/or broken tatic diel. fun. database') + if (io_err<0) call error('Incomplete and/or broken static diel. fun. database') endif ! YAMBO_ALLOC(W,(q%nbz,ng_oscll,ng_oscll)) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index dfe68ac82b..3c739b8253 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -545,9 +545,9 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) COLLISIONS_cutoff=0.0005_SP # endif ! -#if defined _NL +# if defined _NL COLLISIONS_cutoff=0.0005_SP -#endif +# endif ! COLLISIONS_CV_only=.FALSE. COLLISIONS_load_SP=.FALSE. diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 966c8aa35b..1cfbc8e134 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -32,6 +32,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) & l_pump_and_probe,eval_OSCLL,l_test_OSCLL,LSEX,LHF,Sigma_SEX_EQ use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands, & eval_DFT,eval_HARTREE,RT_P,RT_ind_J + use RT_control, ONLY:RT_NAN_found use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -339,7 +340,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! call live_timing(steps=1) ! - l_dynamics_is_over= (NE_i_time>=NE_steps) .or. stop_now(.false.) + l_dynamics_is_over= (NE_i_time>=NE_steps) .or. stop_now(.false.) .or. RT_NAN_found ! enddo ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 5e9768f5da..85571af3c9 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -61,6 +61,7 @@ subroutine NL_initialize(E,k) call parser('SaveVbhistory', SAVE_Vb_history) call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) call parser('NoComprCOLL', l_no_compress_COLL) + call parser('UseDipoles', l_use_DIPOLES) ! l_velocity_gauge_corr=.false. l_velocity_gauge_diam=.not.l_velocity_gauge_tmp From 824bb1ec9a16f98f00a6c6c86b2e17edeb2b7d3d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 13 Sep 2024 23:03:43 +0200 Subject: [PATCH 0820/1367] Version 5.2.0, Revision 23402, Hash b81847afc2 MODIFIED * include/version/version.m4 modules/mod_fields.F Bugs: - [yambo_rt] Fixed envelop only mode Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/modules/mod_fields.F | 28 ++++++++++++---------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 21eb5ca0cb..16e9afa44d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23401 h.b19e0ad9d4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23402 h.b81847afc2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23401" -SHASH="b19e0ad9d4" +SREVISION="23402" +SHASH="b81847afc2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 07616fd742..7e997248b2 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -257,26 +257,22 @@ function small_a(T,dt,E_field,order,envelop_only) ! do i_field=1,n_fields do i_fr=1,n_freqs + ! + W_field=field_frequency(E_field,i_fr) + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and + WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase + if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2._SP ! if (envelop_only_) then - W_field=0._SP - W_field_m1=0._SP - der_fac=0._SP - WtimesT=fr_shift(i_field) f0t=cONE ; f1t=cONE else - W_field=field_frequency(E_field,i_fr) - if(W_field> 0._SP) W_field_m1=1._SP/W_field - if(W_field==0._SP) W_field_m1=0._SP - der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) - ! - ! The frequency shift is applied in two cases - ! (i n_fields=2) to have a circular polarized pulse, and - WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) - ! each frequency has a different initial phase - if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) - if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2._SP - ! ! CONTROL RES / ANTIRES case cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt ! f1t=-f0t' From 8cd0d22a5e3f9217d96e02c40eb66b2b2cbe1651 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 14 Sep 2024 09:54:17 +0200 Subject: [PATCH 0821/1367] Version 5.2.0, Revision 23517, Hash 1d7e0c08b3 MODIFIED * include/version/version.m4 modules/mod_fields.F Bugs: - Fix for issue https://github.com/yambo-code/yambo/issues/135 Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/modules/mod_fields.F | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 1d0cbbd24d..22046702a3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23403 h.824bb1ec9a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23517 h.1d7e0c08b3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23403" -SHASH="824bb1ec9a" +SREVISION="23517" +SHASH="1d7e0c08b3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 7e997248b2..bb59f7079e 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -386,6 +386,7 @@ function small_a(T,dt,E_field,order,envelop_only) if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & & -der_fac*(T-T_0)*f1t/sigma**2 & & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf + f_now=f_now/der_fac ! case('PULSE') if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) From 3db25581c08e492a5a3b38fae3584b03dd86e948 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 17 Sep 2024 10:41:52 +0200 Subject: [PATCH 0822/1367] Version 5.2.0, Revision 23524, Hash 60b829497c MODIFIED * configure include/version/version.m4 bse/DOUBLE_project.dep io/NL_project.dep nloptics/NL_project.dep real_time_initialize/RT_project.dep real_time_propagation/DOUBLE_project.dep real_time_propagation/RT_project.dep ypp/real_time/YPP_RT_project.dep Changes: - [configure] .dep files fixed Patch sent by: Davide Sangalli --- configure | 22 ++++++++++---------- include/version/version.m4 | 6 +++--- src/bse/DOUBLE_project.dep | 4 ---- src/io/NL_project.dep | 1 + src/nloptics/NL_project.dep | 1 + src/real_time_initialize/RT_project.dep | 1 + src/real_time_propagation/DOUBLE_project.dep | 1 + src/real_time_propagation/RT_project.dep | 1 + ypp/real_time/YPP_RT_project.dep | 1 + 9 files changed, 20 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 3c9bcb064c..030156cd7d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23518 h.8cd0d22a5e. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23524 h.60b829497c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23518 h.8cd0d22a5e' -PACKAGE_STRING='Yambo 5.2.0 r.23518 h.8cd0d22a5e' +PACKAGE_VERSION='5.2.0 r.23524 h.60b829497c' +PACKAGE_STRING='Yambo 5.2.0 r.23524 h.60b829497c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23518 h.8cd0d22a5e to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23524 h.60b829497c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23518 h.8cd0d22a5e:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23524 h.60b829497c:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23518 h.8cd0d22a5e +Yambo configure 5.2.0 r.23524 h.60b829497c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23518 h.8cd0d22a5e, which was +It was created by Yambo $as_me 5.2.0 r.23524 h.60b829497c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23518" -SHASH="8cd0d22a5e" +SREVISION="23524" +SHASH="60b829497c" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23518 h.8cd0d22a5e, which was +This file was extended by Yambo $as_me 5.2.0 r.23524 h.60b829497c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23518 h.8cd0d22a5e +Yambo config.status 5.2.0 r.23524 h.60b829497c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index f4f1505fec..0c5ca31b91 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23518 h.8cd0d22a5e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23524 h.60b829497c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23518" -SHASH="8cd0d22a5e" +SREVISION="23524" +SHASH="60b829497c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 5bfc14f7b2..1ada890367 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -17,11 +17,7 @@ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_diago_driver.o - K_diago_hermitian_residuals.o - K_diago_kerr_residual.o K_diago_left_residuals.o - K_diago_magnons_residual.o - K_diago_non_hermitian_residuals.o K_diago_overlap_matrix.o K_diago_perturbative.o K_diago_response_functions.o diff --git a/src/io/NL_project.dep b/src/io/NL_project.dep index 6cb40f61a1..6112a00d93 100644 --- a/src/io/NL_project.dep +++ b/src/io/NL_project.dep @@ -1,5 +1,6 @@ io_DB1.o io_NL.o io_RT_components.o + io_RT_components_V_bands.o variables_NL.o diff --git a/src/nloptics/NL_project.dep b/src/nloptics/NL_project.dep index 9c580b7e80..68b0c91045 100644 --- a/src/nloptics/NL_project.dep +++ b/src/nloptics/NL_project.dep @@ -9,6 +9,7 @@ NL_average_operator.o NL_build_dG_lesser.o NL_build_valence_bands.o + NL_carriers_number.o NL_current.o NL_damping.o NL_databases_IO.o diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index 7d13d8b4e4..f4e45a6b39 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,6 +1,7 @@ RT_Dephasing_Matrix.o RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o + RT_field_from_file.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o diff --git a/src/real_time_propagation/DOUBLE_project.dep b/src/real_time_propagation/DOUBLE_project.dep index 3a6f2c4520..220d2acc2f 100644 --- a/src/real_time_propagation/DOUBLE_project.dep +++ b/src/real_time_propagation/DOUBLE_project.dep @@ -17,5 +17,6 @@ RT_build_T1_and_T2.o RT_occupations_eval.o RT_propagate_fields.o + RT_small_a.o RT_time_step_update.o diff --git a/src/real_time_propagation/RT_project.dep b/src/real_time_propagation/RT_project.dep index b14151c261..b249f6d4b4 100644 --- a/src/real_time_propagation/RT_project.dep +++ b/src/real_time_propagation/RT_project.dep @@ -16,5 +16,6 @@ RT_apply_RWA.o RT_occupations_eval.o RT_propagate_fields.o + RT_small_a.o RT_time_step_update.o diff --git a/ypp/real_time/YPP_RT_project.dep b/ypp/real_time/YPP_RT_project.dep index b1463c24d6..2ec8a939e6 100644 --- a/ypp/real_time/YPP_RT_project.dep +++ b/ypp/real_time/YPP_RT_project.dep @@ -19,6 +19,7 @@ RT_damp_it.o RT_density.o RT_dos_time_plot.o + RT_fields.o RT_manual_excitation.o RT_occ_bands_interpolation.o RT_occ_time_plot.o From a10be9b14bf0991dd1605ced7fedbabc5535dfd5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 17 Sep 2024 10:56:01 +0200 Subject: [PATCH 0823/1367] Version 5.2.0, Revision 23525, Hash 3db25581c0 MODIFIED * configure include/version/version.m4 real_time_control/.objects real_time_control/DOUBLE_project.dep real_time_control/RT_project.dep real_time_propagation/.objects real_time_propagation/DOUBLE_project.dep real_time_propagation/RT_project.dep RENAMED * real_time_propagation/RT_small_a.F -> real_time_control/RT_small_a.F Bugs: - [ypp_rt] compilation fixed Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/real_time_control/.objects | 2 +- src/real_time_control/DOUBLE_project.dep | 1 + src/real_time_control/RT_project.dep | 1 + .../RT_small_a.F | 0 src/real_time_propagation/.objects | 2 +- src/real_time_propagation/DOUBLE_project.dep | 1 - src/real_time_propagation/RT_project.dep | 1 - 9 files changed, 18 insertions(+), 18 deletions(-) rename src/{real_time_propagation => real_time_control}/RT_small_a.F (100%) diff --git a/configure b/configure index 030156cd7d..71c823211f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23524 h.60b829497c. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23525 h.3db25581c0. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23524 h.60b829497c' -PACKAGE_STRING='Yambo 5.2.0 r.23524 h.60b829497c' +PACKAGE_VERSION='5.2.0 r.23525 h.3db25581c0' +PACKAGE_STRING='Yambo 5.2.0 r.23525 h.3db25581c0' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23524 h.60b829497c to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23525 h.3db25581c0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23524 h.60b829497c:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23525 h.3db25581c0:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23524 h.60b829497c +Yambo configure 5.2.0 r.23525 h.3db25581c0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23524 h.60b829497c, which was +It was created by Yambo $as_me 5.2.0 r.23525 h.3db25581c0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23524" -SHASH="60b829497c" +SREVISION="23525" +SHASH="3db25581c0" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23524 h.60b829497c, which was +This file was extended by Yambo $as_me 5.2.0 r.23525 h.3db25581c0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23524 h.60b829497c +Yambo config.status 5.2.0 r.23525 h.3db25581c0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0c5ca31b91..ce01d5e726 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23524 h.60b829497c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23525 h.3db25581c0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23524" -SHASH="60b829497c" +SREVISION="23525" +SHASH="3db25581c0" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index 52d48c2a5e..7bb981cb13 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o RT_small_a.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/DOUBLE_project.dep b/src/real_time_control/DOUBLE_project.dep index db06478179..eafede5b35 100644 --- a/src/real_time_control/DOUBLE_project.dep +++ b/src/real_time_control/DOUBLE_project.dep @@ -27,5 +27,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o + RT_small_a.o RT_update_TIME_CONF_descriptions.o diff --git a/src/real_time_control/RT_project.dep b/src/real_time_control/RT_project.dep index db06478179..eafede5b35 100644 --- a/src/real_time_control/RT_project.dep +++ b/src/real_time_control/RT_project.dep @@ -27,5 +27,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o + RT_small_a.o RT_update_TIME_CONF_descriptions.o diff --git a/src/real_time_propagation/RT_small_a.F b/src/real_time_control/RT_small_a.F similarity index 100% rename from src/real_time_propagation/RT_small_a.F rename to src/real_time_control/RT_small_a.F diff --git a/src/real_time_propagation/.objects b/src/real_time_propagation/.objects index d44c879c1a..04ed6e67b3 100644 --- a/src/real_time_propagation/.objects +++ b/src/real_time_propagation/.objects @@ -5,6 +5,6 @@ PHEL_objects = RT_PHEL_Scattering_step.o objs = RT_Integrator_init.o RT_Integrator.o \ RT_INV_step_std.o RT_INV_step_accurate.o RT_INV_step_diago.o RT_EXP_step_std.o RT_EXP_step_accurate.o RT_EULER_step.o \ RT_Glesser_evolve.o RT_Glesser_rotate.o RT_Scattering_step.o RT_Dephasing_step.o \ - RT_propagate_fields.o RT_apply_RWA.o RT_Ext_fields.o RT_small_a.o RT_occupations_eval.o \ + RT_propagate_fields.o RT_apply_RWA.o RT_Ext_fields.o RT_occupations_eval.o \ RT_MEMORY_index.o RT_time_step_update.o RT_IO_type_time_steps.o $(PHEL_objects) #endif diff --git a/src/real_time_propagation/DOUBLE_project.dep b/src/real_time_propagation/DOUBLE_project.dep index 220d2acc2f..3a6f2c4520 100644 --- a/src/real_time_propagation/DOUBLE_project.dep +++ b/src/real_time_propagation/DOUBLE_project.dep @@ -17,6 +17,5 @@ RT_build_T1_and_T2.o RT_occupations_eval.o RT_propagate_fields.o - RT_small_a.o RT_time_step_update.o diff --git a/src/real_time_propagation/RT_project.dep b/src/real_time_propagation/RT_project.dep index b249f6d4b4..b14151c261 100644 --- a/src/real_time_propagation/RT_project.dep +++ b/src/real_time_propagation/RT_project.dep @@ -16,6 +16,5 @@ RT_apply_RWA.o RT_occupations_eval.o RT_propagate_fields.o - RT_small_a.o RT_time_step_update.o From 3abd6b78a610f8bfa141bc906f17ccc7de66bc16 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 8 Oct 2024 15:53:37 +0200 Subject: [PATCH 0824/1367] Version 5.2.0, Revision 23532, Hash ec4575dc3a MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_compose_nl.F Changes: - [yambo_nl] Changes to collisions compose nl, trying to speed up the code Patch sent by: Davide Sangalli --- configure | 22 +++++++++--------- include/version/version.m4 | 6 ++--- src/collisions/COLLISIONS_compose_nl.F | 32 ++++++++++++++++++-------- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 2878f5f098..920b3cf704 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23297 h.c470f668ea. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23532 h.ec4575dc3a. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23297 h.c470f668ea' -PACKAGE_STRING='Yambo 5.2.0 r.23297 h.c470f668ea' +PACKAGE_VERSION='5.2.0 r.23532 h.ec4575dc3a' +PACKAGE_STRING='Yambo 5.2.0 r.23532 h.ec4575dc3a' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23297 h.c470f668ea to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23532 h.ec4575dc3a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23297 h.c470f668ea:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23532 h.ec4575dc3a:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23297 h.c470f668ea +Yambo configure 5.2.0 r.23532 h.ec4575dc3a generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23297 h.c470f668ea, which was +It was created by Yambo $as_me 5.2.0 r.23532 h.ec4575dc3a, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23297" -SHASH="c470f668ea" +SREVISION="23532" +SHASH="ec4575dc3a" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23297 h.c470f668ea, which was +This file was extended by Yambo $as_me 5.2.0 r.23532 h.ec4575dc3a, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23297 h.c470f668ea +Yambo config.status 5.2.0 r.23532 h.ec4575dc3a configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a68211e1d6..c58e430a32 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23297 h.c470f668ea, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23532 h.ec4575dc3a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23297" -SHASH="c470f668ea" +SREVISION="23532" +SHASH="ec4575dc3a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index ac5887c6ec..19c6b9e990 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -30,12 +30,25 @@ subroutine COLLISIONS_compose_nl(G_in) integer :: i_coll,ib,ibp,i_k,i_k_NL,i_kmq,i_comp,i_coll_mem,i_spin integer :: i_n,i_m complex(SP) :: COLL + logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2)),coll_sp ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return ! #if defined _TIMING call timing('NL COLL_compose',OPR='start') #endif + ! + do_collisions=.false. + coll_sp=COLLISIONS_load_SP + ! + do ibp=COLL_bands(1),COLL_bands(2) + do ib=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp>maxval(n_met_bands) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if ( .not. HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") cycle + do_collisions(ib,ibp)=.true. + enddo + enddo ! RT_Vnl_xc=cZERO ! @@ -58,18 +71,17 @@ subroutine COLLISIONS_compose_nl(G_in) do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp> maxval(n_met_bands) ) ) cycle - if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle ! - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") then - if(COLLISIONS_load_SP) then - COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c_SP(i_comp),kind=SP) - else - COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c(i_comp),kind=SP) - endif - RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)-cI*COLL*G_in(ib,ibp,i_kmq) - i_comp=i_comp+1 + if ( .not.do_collisions(ib,ibp) ) cycle + ! + if(coll_sp) then + COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c_SP(i_comp),kind=SP) + else + COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c(i_comp),kind=SP) endif + RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)-cI*COLL*G_in(ib,ibp,i_kmq) + i_comp=i_comp+1 ! enddo enddo From 06afe7672c5201c3c784a9928363809ec61a5cc5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 8 Oct 2024 16:02:32 +0200 Subject: [PATCH 0825/1367] Version 5.2.0, Revision 23533, Hash 3abd6b7 MODIFIED * modified: ypp/real_time/RT_damp_it.F Changes: - [yambo_rt] Damping is applied only for T>T_ref, e.g. from the beginning of the probe pulse Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- ypp/real_time/RT_damp_it.F | 8 ++++++-- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 920b3cf704..1f68762305 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23532 h.ec4575dc3a. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23533 h.3abd6b7. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23532 h.ec4575dc3a' -PACKAGE_STRING='Yambo 5.2.0 r.23532 h.ec4575dc3a' +PACKAGE_VERSION='5.2.0 r.23533 h.3abd6b7' +PACKAGE_STRING='Yambo 5.2.0 r.23533 h.3abd6b7' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23532 h.ec4575dc3a to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23533 h.3abd6b7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23532 h.ec4575dc3a:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23533 h.3abd6b7:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23532 h.ec4575dc3a +Yambo configure 5.2.0 r.23533 h.3abd6b7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23532 h.ec4575dc3a, which was +It was created by Yambo $as_me 5.2.0 r.23533 h.3abd6b7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23532" -SHASH="ec4575dc3a" +SREVISION="23533" +SHASH="3abd6b7" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23532 h.ec4575dc3a, which was +This file was extended by Yambo $as_me 5.2.0 r.23533 h.3abd6b7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23532 h.ec4575dc3a +Yambo config.status 5.2.0 r.23533 h.3abd6b7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c58e430a32..3968abd0ba 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23532 h.ec4575dc3a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23533 h.3abd6b7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23532" -SHASH="ec4575dc3a" +SREVISION="23533" +SHASH="3abd6b7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/real_time/RT_damp_it.F b/ypp/real_time/RT_damp_it.F index 87a55eb62f..0a5380a022 100644 --- a/ypp/real_time/RT_damp_it.F +++ b/ypp/real_time/RT_damp_it.F @@ -8,6 +8,7 @@ subroutine RT_damp_it(damp_type,damp_factor,ft,lda) ! use YPP_real_time, ONLY:RT_time,RT_conf + use units, ONLY:FS2AUT use pars, ONLY:SP,DP use fields, ONLY:Efield ! @@ -28,7 +29,7 @@ subroutine RT_damp_it(damp_type,damp_factor,ft,lda) ! select case ( trim(damp_type) ) case("LORENTZIAN") - forall(i_t=1:RT_conf%T_n_steps) damp_function(i_t) = exp(-abs((RT_time(i_t)-T_ref)*damp_factor)) + forall(i_t=1:RT_conf%T_n_steps) damp_function(i_t) = exp(-(RT_time(i_t)-T_ref)*damp_factor) case("GAUSSIAN") forall(i_t=1:RT_conf%T_n_steps) damp_function(i_t) = exp(-(RT_time(i_t)-T_ref)**2*damp_factor**2) case("NONE") @@ -38,7 +39,10 @@ subroutine RT_damp_it(damp_type,damp_factor,ft,lda) return end select ! - forall(i_t=1:RT_conf%T_n_steps) ft(i_t,:)=ft(i_t,:)*damp_function(i_t) + do i_t=1,RT_conf%T_n_steps + if( (RT_time(i_t)-T_ref)<0._SP) cycle + ft(i_t,:)=ft(i_t,:)*damp_function(i_t) + enddo ! end subroutine RT_damp_it From 86e232e307ebe1f57e923fbccd03a6732cd5cee6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 10 Oct 2024 10:59:35 +0200 Subject: [PATCH 0826/1367] Version 5.2.0, Revision 23828, Hash d90f8181c9 MODIFIED * include/version/version.m4 exc-ph/EXC_dipole.F wf_and_fft/WF_phase_matrices.F Bugs: - [yambo_ph] Fixed compilation. Switched to new K_diago_residuals Patch sent by: Davide Sangalli --- include/version/version.m4 | 6 +++--- src/exc-ph/EXC_dipole.F | 6 ++++-- src/wf_and_fft/WF_phase_matrices.F | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 194e9ef5d4..87328afd10 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23289 h.172eddb42b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23828 h.d90f8181c9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23289" -SHASH="172eddb42b" +SREVISION="23828" +SHASH="d90f8181c9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 902bcfa635..d8f6202c22 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -35,7 +35,7 @@ subroutine EXC_dipole(Xk,E,q,X) use vec_operate, ONLY:v_norm use X_m, ONLY:X_t use BS, ONLY:BS_bands,BS_T_grp,BSE_prop,BS_dip_size,BS_nT_grps - use BS_solvers, ONLY:BS_H_dim,BSS_Vnl_included,BSS_alloc,BSS_free + use BS_solvers, ONLY:BS_mat,BS_H_dim,BSS_Vnl_included,BSS_alloc,BSS_free use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_WF_b_and_k ! @@ -102,7 +102,9 @@ subroutine EXC_dipole(Xk,E,q,X) ! Recalculate the residuals ! i_BS_mat=1 - call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) + call K_diago_right_residuals("opt1", i_BS_mat,BS_E_in,BS_R_right,BS_mat) + !call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) + BS_R_left =conjg(BS_R_right) ! else ! diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 065e10786a..5394f1a44d 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -19,7 +19,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing use R_lattice, ONLY:bz_samp,G_m_G,minus_G,g_vec,rl_sop - use D_lattice, ONLY:nsym,i_time_rev,sop_tab,spin_sop + use D_lattice, ONLY:nsym,i_time_rev,sop_tab,DEV_VAR(spin_sop) use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k @@ -175,7 +175,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! ! OPTION 2: Use the composed symmetry, importing the composed spin soc !call WF_copy(WF_k,WF_Rk_c) - !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,DEV_VAR(spin_sop_composed),WF_Rk_c) + !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,spin_sop_composed,WF_Rk_c) ! call WF_copy(WF_k,WF_Rk_y) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_y,iGk_y,WF_Rk_y) From 9e92d0738994771c7117f748438f9403d9c50d4d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Oct 2024 21:16:32 +0200 Subject: [PATCH 0827/1367] Version 5.2.0, Revision 23683, Hash d58ade5261 MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_compose_nl.F Bugs: - [yambo_nl] fixed bug introcued in collisions_compose_nl Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_compose_nl.F | 1 - 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 1f68762305..97a6da383e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23533 h.3abd6b7. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23684 h.d58ade5261. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23533 h.3abd6b7' -PACKAGE_STRING='Yambo 5.2.0 r.23533 h.3abd6b7' +PACKAGE_VERSION='5.2.0 r.23684 h.d58ade5261' +PACKAGE_STRING='Yambo 5.2.0 r.23684 h.d58ade5261' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23533 h.3abd6b7 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23684 h.d58ade5261 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23533 h.3abd6b7:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23684 h.d58ade5261:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23533 h.3abd6b7 +Yambo configure 5.2.0 r.23684 h.d58ade5261 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23533 h.3abd6b7, which was +It was created by Yambo $as_me 5.2.0 r.23684 h.d58ade5261, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23533" -SHASH="3abd6b7" +SREVISION="23684" +SHASH="d58ade5261" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23533 h.3abd6b7, which was +This file was extended by Yambo $as_me 5.2.0 r.23684 h.d58ade5261, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23533 h.3abd6b7 +Yambo config.status 5.2.0 r.23684 h.d58ade5261 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3968abd0ba..666351d132 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23533 h.3abd6b7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23684 h.d58ade5261, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23533" -SHASH="3abd6b7" +SREVISION="23684" +SHASH="d58ade5261" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 19c6b9e990..a99da7ceb6 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -45,7 +45,6 @@ subroutine COLLISIONS_compose_nl(G_in) do ib=COLL_bands(1),COLL_bands(2) if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp>maxval(n_met_bands) ) ) cycle if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle - if ( .not. HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") cycle do_collisions(ib,ibp)=.true. enddo enddo From f156c7a35ee263112c4c26b5efb1e3cc625d9064 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Oct 2024 23:45:17 +0200 Subject: [PATCH 0828/1367] Version 5.2.0, Revision 23323, Hash 57187815cf MODIFIED * configure include/version/version.m4 DELETED * config/stamps_and_lists/project_dependencies.stamp Changes: - [yambo] Configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 311 +++++++++++++++++++++++++++++++++++-- include/version/version.m4 | 6 +- 2 files changed, 303 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 117b95129a..4c259c433d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23298 h.a65667c3c5. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23323 h.57187815cf. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23298 h.a65667c3c5' -PACKAGE_STRING='Yambo 5.2.0 r.23298 h.a65667c3c5' +PACKAGE_VERSION='5.2.0 r.23323 h.57187815cf' +PACKAGE_STRING='Yambo 5.2.0 r.23323 h.57187815cf' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -663,6 +663,8 @@ PETSC_INCS_R PETSC_LIBS_R BLACS_INCS_R BLACS_LIBS_R +MAGMA_INCS_R +MAGMA_LIBS_R SCALAPACK_INCS_R SCALAPACK_LIBS_R LAPACK_INCS_R @@ -687,6 +689,7 @@ IOTK_INCS_R IOTK_LIBS_R MPI_info MPI_check +MAGMA_check LIBXC_check YPY_check YDB_check @@ -712,6 +715,12 @@ MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check +internal_magma +compile_magma +enable_magma +def_magma +MAGMA_INCS +MAGMA_LIBS CUDA_FLAGS def_cuda internal_libxc @@ -1037,6 +1046,12 @@ with_libxc_libdir with_libxc_includedir enable_cuda enable_nvtx +enable_magma_linalg +with_magma_libs +with_magma_incs +with_magma_path +with_magma_libdir +with_magma_includedir ' ac_precious_vars='build_alias host_alias @@ -1604,7 +1619,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23298 h.a65667c3c5 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23323 h.57187815cf to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1685,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23298 h.a65667c3c5:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23323 h.57187815cf:";; esac cat <<\_ACEOF @@ -1721,6 +1736,8 @@ Optional Features: --enable-etsf-io Activate the ETSF_IO support --enable-cuda= Enable CUDA support --enable-nvtx= Enable NVTX support + --enable-magma-linalg Enable suport for the diagonalization of BSE using + MAGMA. Default is no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1795,6 +1812,12 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory Some influential environment variables: CC C compiler command @@ -1882,7 +1905,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23298 h.a65667c3c5 +Yambo configure 5.2.0 r.23323 h.57187815cf generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2534,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23298 h.a65667c3c5, which was +It was created by Yambo $as_me 5.2.0 r.23323 h.57187815cf, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3292,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23298" -SHASH="a65667c3c5" +SREVISION="23323" +SHASH="57187815cf" @@ -10281,6 +10304,31 @@ url_ydb=https://github.com/yambo-code/ydb.git # +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -15494,6 +15542,215 @@ fi # +# + +# ============================================================================ +# MAGMA + +# +# Check whether --enable-magma_linalg was given. +if test ${enable_magma_linalg+y} +then : + enableval=$enable_magma_linalg; +fi + +# + +# Check whether --with-magma_libs was given. +if test ${with_magma_libs+y} +then : + withval=$with_magma_libs; +fi + + +# Check whether --with-magma_incs was given. +if test ${with_magma_incs+y} +then : + withval=$with_magma_incs; +fi + + +# Check whether --with-magma_path was given. +if test ${with_magma_path+y} +then : + withval=$with_magma_path; +fi + + +# Check whether --with-magma_libdir was given. +if test ${with_magma_libdir+y} +then : + withval=$with_magma_libdir; +fi + + +# Check whether --with-magma_includedir was given. +if test ${with_magma_includedir+y} +then : + withval=$with_magma_includedir; +fi + + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +printf %s "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +printf %s "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 +printf %s "checking for Magma in $with_magma_path... " >&6; } ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then as_fn_error $? "No libs specified" "$LINENO" 5 ; fi + if test -z "$try_MAGMA_INCS" ; then as_fn_error $? "No include-dir specified" "$LINENO" 5 ; fi + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + cat > conftest.$ac_ext <<_ACEOF + program main + +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO" +then : + magma=yes +else $as_nop + magma=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; + # + if test "x$magma" = "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +printf %s "checking for internal Magma library... " >&6; } + # + internal_magma="yes" + # + #if test "x$lapack_shared" = "x1" ; then + # MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + # #MAGMA_LIBS="" ; + #else + MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + #fi + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + else + compile_magma="yes" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 +printf "%s\n" "Compatible external Magma not found/specified. To be compiled." >&6; } ; + fi + # +fi +# +# switch off internal magma compilation +# +deactivate_internal=yes +if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 +printf "%s\n" "Internal Magma compilation not available yet. Deactivating it." >&6; } ; + compile_magma="no" + def_magma="" + enable_magma="no" + MAGMA_INCS="" ; + MAGMA_LIBS="" ; +fi +# + + + + + + # # ============================================================================ @@ -15627,6 +15884,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then MAGMA_check="C"; fi + if test "$compile_magma" = "no" ; then MAGMA_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -15703,6 +15968,7 @@ fi + # # STRIPE [LIB] from paths # @@ -15958,6 +16224,29 @@ fi SCALAPACK_INCS_R=$STRIPE +# + +TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +MAGMA_LIBS_R=$STRIPE + +TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +MAGMA_INCS_R=$STRIPE + + # TMP1=`echo $BLACS_LIBS | sed 's/\//+/g'` @@ -16606,7 +16895,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23298 h.a65667c3c5, which was +This file was extended by Yambo $as_me 5.2.0 r.23323 h.57187815cf, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16959,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23298 h.a65667c3c5 +Yambo config.status 5.2.0 r.23323 h.57187815cf configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0e30a6db51..c7274de3fc 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23298 h.a65667c3c5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23323 h.57187815cf, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23298" -SHASH="a65667c3c5" +SREVISION="23323" +SHASH="57187815cf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From cbf592b6b76c82b8b8931fd765794ca7cf23d549 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Oct 2024 23:46:26 +0200 Subject: [PATCH 0829/1367] Version 5.2.0, Revision 23469, Hash fde0c4f549 MODIFIED * configure include/version/version.m4 DELETED * config/stamps_and_lists/project_dependencies.stamp Changes: - configure re-generated Patch sent by: Davide Sangalli --- configure | 315 +++++++++++++++++++++++++++++++++++-- include/version/version.m4 | 6 +- 2 files changed, 307 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 2684439414..43f66da8ab 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23441 h.8e49ace8b0. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23470 h.fde0c4f549. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23441 h.8e49ace8b0' -PACKAGE_STRING='Yambo 5.2.0 r.23441 h.8e49ace8b0' +PACKAGE_VERSION='5.2.0 r.23470 h.fde0c4f549' +PACKAGE_STRING='Yambo 5.2.0 r.23470 h.fde0c4f549' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -663,6 +663,8 @@ PETSC_INCS_R PETSC_LIBS_R BLACS_INCS_R BLACS_LIBS_R +MAGMA_INCS_R +MAGMA_LIBS_R SCALAPACK_INCS_R SCALAPACK_LIBS_R LAPACK_INCS_R @@ -687,6 +689,7 @@ IOTK_INCS_R IOTK_LIBS_R MPI_info MPI_check +MAGMA_check LIBXC_check YPY_check YDB_check @@ -712,6 +715,12 @@ MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check +internal_magma +compile_magma +enable_magma +def_magma +MAGMA_INCS +MAGMA_LIBS CUDA_FLAGS def_cuda internal_libxc @@ -1037,6 +1046,12 @@ with_libxc_libdir with_libxc_includedir enable_cuda enable_nvtx +enable_magma_linalg +with_magma_libs +with_magma_incs +with_magma_path +with_magma_libdir +with_magma_includedir ' ac_precious_vars='build_alias host_alias @@ -1604,7 +1619,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23441 h.8e49ace8b0 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23470 h.fde0c4f549 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1685,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23441 h.8e49ace8b0:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23470 h.fde0c4f549:";; esac cat <<\_ACEOF @@ -1721,6 +1736,8 @@ Optional Features: --enable-etsf-io Activate the ETSF_IO support --enable-cuda= Enable CUDA support --enable-nvtx= Enable NVTX support + --enable-magma-linalg Enable suport for the diagonalization of BSE using + MAGMA. Default is no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1795,6 +1812,12 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory Some influential environment variables: CC C compiler command @@ -1882,7 +1905,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23441 h.8e49ace8b0 +Yambo configure 5.2.0 r.23470 h.fde0c4f549 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2534,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23441 h.8e49ace8b0, which was +It was created by Yambo $as_me 5.2.0 r.23470 h.fde0c4f549, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3292,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23441" -SHASH="8e49ace8b0" +SREVISION="23470" +SHASH="fde0c4f549" @@ -9991,6 +10014,10 @@ printf "%s\n" "$MPIKIND" >&6; } MPI_PATH=`which $CC |sed "s/bin\/$CC//g"` + if ! test -d "$MPI_PATH/include"; then + MPI_PATH=`$CC -show | sed "s/.*-I//g"` ; + MPI_PATH=`echo ${MPI_PATH} | sed "s/\/include.*//g"` ; + fi # else # @@ -10281,6 +10308,31 @@ url_ydb=https://github.com/yambo-code/ydb.git # +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + # ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -15494,6 +15546,215 @@ fi # +# + +# ============================================================================ +# MAGMA + +# +# Check whether --enable-magma_linalg was given. +if test ${enable_magma_linalg+y} +then : + enableval=$enable_magma_linalg; +fi + +# + +# Check whether --with-magma_libs was given. +if test ${with_magma_libs+y} +then : + withval=$with_magma_libs; +fi + + +# Check whether --with-magma_incs was given. +if test ${with_magma_incs+y} +then : + withval=$with_magma_incs; +fi + + +# Check whether --with-magma_path was given. +if test ${with_magma_path+y} +then : + withval=$with_magma_path; +fi + + +# Check whether --with-magma_libdir was given. +if test ${with_magma_libdir+y} +then : + withval=$with_magma_libdir; +fi + + +# Check whether --with-magma_includedir was given. +if test ${with_magma_includedir+y} +then : + withval=$with_magma_includedir; +fi + + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +printf %s "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +printf %s "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 +printf %s "checking for Magma in $with_magma_path... " >&6; } ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then as_fn_error $? "No libs specified" "$LINENO" 5 ; fi + if test -z "$try_MAGMA_INCS" ; then as_fn_error $? "No include-dir specified" "$LINENO" 5 ; fi + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + cat > conftest.$ac_ext <<_ACEOF + program main + +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO" +then : + magma=yes +else $as_nop + magma=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; + # + if test "x$magma" = "xyes"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +printf %s "checking for internal Magma library... " >&6; } + # + internal_magma="yes" + # + #if test "x$lapack_shared" = "x1" ; then + # MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + # #MAGMA_LIBS="" ; + #else + MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + #fi + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; + else + compile_magma="yes" ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 +printf "%s\n" "Compatible external Magma not found/specified. To be compiled." >&6; } ; + fi + # +fi +# +# switch off internal magma compilation +# +deactivate_internal=yes +if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 +printf "%s\n" "Internal Magma compilation not available yet. Deactivating it." >&6; } ; + compile_magma="no" + def_magma="" + enable_magma="no" + MAGMA_INCS="" ; + MAGMA_LIBS="" ; +fi +# + + + + + + # # ============================================================================ @@ -15627,6 +15888,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then MAGMA_check="C"; fi + if test "$compile_magma" = "no" ; then MAGMA_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -15703,6 +15972,7 @@ fi + # # STRIPE [LIB] from paths # @@ -15958,6 +16228,29 @@ fi SCALAPACK_INCS_R=$STRIPE +# + +TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +MAGMA_LIBS_R=$STRIPE + +TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +MAGMA_INCS_R=$STRIPE + + # TMP1=`echo $BLACS_LIBS | sed 's/\//+/g'` @@ -16606,7 +16899,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23441 h.8e49ace8b0, which was +This file was extended by Yambo $as_me 5.2.0 r.23470 h.fde0c4f549, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16963,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23441 h.8e49ace8b0 +Yambo config.status 5.2.0 r.23470 h.fde0c4f549 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7ebd0f43c7..91f1525216 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23441 h.8e49ace8b0, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23470 h.fde0c4f549, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23441" -SHASH="8e49ace8b0" +SREVISION="23470" +SHASH="fde0c4f549" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 27b3538f80087c006ffae82178a0433ed4ad4648 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Oct 2024 00:54:37 +0200 Subject: [PATCH 0830/1367] Version 5.2.0, Revision 23470, Hash cbf592b6b7 MODIFIED * config/m4/magma.m4 configure include/version/version.m4 lib/magma/Makefile.loc NEW * lib/magma/MGmake.inc_lib DELETED * config/stamps_and_lists/project_dependencies.stamp Changes: - [magma] created first version of magma Makefile / make.inc Patch sent by: Davide Sangalli --- config/m4/magma.m4 | 2 +- configure | 24 +++---- include/version/version.m4 | 6 +- lib/magma/MGmake.inc_lib | 126 +++++++++++++++++++++++++++++++++++++ lib/magma/Makefile.loc | 16 ++++- 5 files changed, 156 insertions(+), 18 deletions(-) create mode 100644 lib/magma/MGmake.inc_lib diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 index ddf361df49..c87c65a734 100644 --- a/config/m4/magma.m4 +++ b/config/m4/magma.m4 @@ -151,7 +151,7 @@ fi # # switch off internal magma compilation # -deactivate_internal=yes +deactivate_internal=no if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then AC_MSG_RESULT([Internal Magma compilation not available yet. Deactivating it.]) ; compile_magma="no" diff --git a/configure b/configure index 43f66da8ab..def036b674 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23470 h.fde0c4f549. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23471 h.cbf592b6b7. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23470 h.fde0c4f549' -PACKAGE_STRING='Yambo 5.2.0 r.23470 h.fde0c4f549' +PACKAGE_VERSION='5.2.0 r.23471 h.cbf592b6b7' +PACKAGE_STRING='Yambo 5.2.0 r.23471 h.cbf592b6b7' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1619,7 +1619,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23470 h.fde0c4f549 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23471 h.cbf592b6b7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1685,7 +1685,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23470 h.fde0c4f549:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23471 h.cbf592b6b7:";; esac cat <<\_ACEOF @@ -1905,7 +1905,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23470 h.fde0c4f549 +Yambo configure 5.2.0 r.23471 h.cbf592b6b7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2534,7 +2534,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23470 h.fde0c4f549, which was +It was created by Yambo $as_me 5.2.0 r.23471 h.cbf592b6b7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3292,8 +3292,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23470" -SHASH="fde0c4f549" +SREVISION="23471" +SHASH="cbf592b6b7" @@ -15738,7 +15738,7 @@ fi # # switch off internal magma compilation # -deactivate_internal=yes +deactivate_internal=no if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 printf "%s\n" "Internal Magma compilation not available yet. Deactivating it." >&6; } ; @@ -16899,7 +16899,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23470 h.fde0c4f549, which was +This file was extended by Yambo $as_me 5.2.0 r.23471 h.cbf592b6b7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16963,7 +16963,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23470 h.fde0c4f549 +Yambo config.status 5.2.0 r.23471 h.cbf592b6b7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 91f1525216..c44ce0493a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23470 h.fde0c4f549, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23471 h.cbf592b6b7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23470" -SHASH="fde0c4f549" +SREVISION="23471" +SHASH="cbf592b6b7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/magma/MGmake.inc_lib b/lib/magma/MGmake.inc_lib new file mode 100644 index 0000000000..d1f0d64804 --- /dev/null +++ b/lib/magma/MGmake.inc_lib @@ -0,0 +1,126 @@ +#////////////////////////////////////////////////////////////////////////////// +# -- MAGMA (version 2.8.0) -- +# Univ. of Tennessee, Knoxville +# Univ. of California, Berkeley +# Univ. of Colorado, Denver +# @date March 2024 +#////////////////////////////////////////////////////////////////////////////// + + + +# -------------------- +# configuration + +# should MAGMA be built on CUDA (NVIDIA only) or ROCM (AMD or NVIDIA) +# enter 'cuda' or 'hip' respectively +BACKEND ?= cuda + +# set these to their real paths +CUDADIR ?= $(NVHPC_ROOT)/cuda +ROCM_PATH ?= /opt/rocm + +USE_FORTRAN ?=yes + +# require either hip or cuda +ifeq (,$(findstring $(BACKEND),hip cuda)) + $(error "'BACKEND' should be either 'cuda' or 'hip' (got $(BACKEND))") +endif + +# -------------------- +# programs + +# set compilers +CC ?= gcc +CXX ?= g++ +FORT ?= gfortran +HIPCC ?= hipcc +NVCC ?= nvcc +DEVCC ?= NONE + +# set from 'BACKEND' +ifeq ($(BACKEND),cuda) + DEVCC = $(NVCC) +else ifeq ($(BACKEND),hip) + DEVCC = $(HIPCC) +endif + +# and utilities +ARCH = ar +ARCHFLAGS = cr +RANLIB = ranlib + + +# -------------------- +# flags/settings + +# set our GPU targets +ifeq ($(BACKEND),cuda) + GPU_TARGET = Volta Turing Ampere +else ifeq ($(BACKEND),hip) + GPU_TARGET = gfx900 gfx906 gfx908 +endif + +# Use -fPIC to make shared (.so) and static (.a) library; +# can be commented out if making only static library. +FPIC = -fPIC + +# now, generate our flags +CFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -fopenmp -std=c99 +CXXFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -fopenmp -std=c++11 +FFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -Wno-unused-dummy-argument +F90FLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -Wno-unused-dummy-argument -x f95-cpp-input +LDFLAGS = $(FPIC) -fopenmp + +DEVCCFLAGS = -O3 -DNDEBUG -DADD_ + +# DEVCCFLAGS are populated later in `backend-specific` + + +# -------------------- +# libraries + +# gcc with OpenBLAS (includes LAPACK) +LIB += $(lblas) $(llapack) + +# -------------------- +# directories + +# define library directories preferably in your environment, or here. +LIBDIR += -L$(libs_prefix)/$(fc_kind)/${fc}/lib +INC += -I$(libs_prefix)/$(fc_kind)/${fc}/include + + +# -------------------- +# checks + +# check for openblas +#-include make.check-openblas + + +# -------------------- +# backend-specific + +# add appropriate cuda flags +ifeq ($(BACKEND),cuda) + -include make.check-cuda + + DEVCCFLAGS += -Xcompiler "$(FPIC)" -std=c++11 + + # link with cuda specific libraries + INC += -I$(CUDADIR)/include + LIBDIR += -L$(CUDADIR)/lib64 + LIB += -lcublas -lcusparse -lcudart -lcudadevrt +endif + +# add appropriate ROCM flags +ifeq ($(BACKEND),hip) + -include make.check-hip + + DEVCCFLAGS += $(FPIC) -std=c++11 + + INC += -I$(ROCM_PATH)/include + LIBDIR += -L$(ROCM_PATH)/lib + LIB += -lhipblas -lhipsparse +endif + + diff --git a/lib/magma/Makefile.loc b/lib/magma/Makefile.loc index 5296d0b3e0..78aecaa99d 100644 --- a/lib/magma/Makefile.loc +++ b/lib/magma/Makefile.loc @@ -22,13 +22,25 @@ uncompress: @$(uncompress) configure: uncompress - @$(configure) + @if test -d $(PACKAGE) && ! test -f configured.stamp ; then \ + echo "\t[$(PACKAGE)] configuration"; \ + cd $(PACKAGE); \ + cat $(compdir)/config/setup $(srcdir)/lib/magma/MGmake.inc_lib > make.inc ; \ + cp $(srcdir)/lib/magma/Makefile.lib Makefile ; \ + touch ../configured.stamp;\ + fi compile: uncompress configure @$(call compile) install: uncompress configure compile - @$(call install_via_make,magma) + @if ! test -e installed.stamp ; then \ + echo "\t[$(PACKAGE)] installation"; \ + cd $(PACKAGE); cp *.a $(LIBPATH)/lib ; \ + cp include/*.h $(LIBPATH)/include ; \ + cp include/*.mod $(LIBPATH)/include ; \ + touch ../installed.stamp;\ + fi $(LIBRARY): uncompress configure compile install # From 54856361370d85022aa975ab82a495477edbb977 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Oct 2024 14:04:59 +0200 Subject: [PATCH 0831/1367] Version 5.2.0, Revision 23471, Hash 27b3538f80 MODIFIED * config/m4/acx_report.m4 config/m4/magma.m4 config/mk/global/actions/compile_internal_libraries.mk config/mk/global/libraries.mk config/report.in configure include/version/version.m4 modules/.objects NEW * lib/magma_fmodules/.objects RENAMED * modules/mod_magma2.F -> lib/magma_fmodules/mod_magma2.F modules/mod_magma2_cfortran.F -> lib/magma_fmodules/mod_magma2_cfortran.F modules/mod_magma2_common.F -> lib/magma_fmodules/mod_magma2_common.F modules/mod_magma2_dfortran.F -> lib/magma_fmodules/mod_magma2_dfortran.F modules/mod_magma2_sfortran.F -> lib/magma_fmodules/mod_magma2_sfortran.F modules/mod_magma2_zfortran.F -> lib/magma_fmodules/mod_magma2_zfortran.F Changes: - [magma] fmodules coved inside lib/magma_fmodules folder as discussed during last meeting Patch sent by: Davide Sangalli --- config/m4/acx_report.m4 | 7 +++ config/m4/magma.m4 | 9 +++ .../actions/compile_internal_libraries.mk | 4 +- config/mk/global/libraries.mk | 3 + config/report.in | 4 +- configure | 55 +++++++++++++++---- include/version/version.m4 | 6 +- lib/magma_fmodules/.objects | 5 ++ .../magma_fmodules}/mod_magma2.F | 0 .../magma_fmodules}/mod_magma2_cfortran.F | 0 .../magma_fmodules}/mod_magma2_common.F | 0 .../magma_fmodules}/mod_magma2_dfortran.F | 0 .../magma_fmodules}/mod_magma2_sfortran.F | 0 .../magma_fmodules}/mod_magma2_zfortran.F | 0 src/modules/.objects | 6 +- 15 files changed, 77 insertions(+), 22 deletions(-) create mode 100644 lib/magma_fmodules/.objects rename {src/modules => lib/magma_fmodules}/mod_magma2.F (100%) rename {src/modules => lib/magma_fmodules}/mod_magma2_cfortran.F (100%) rename {src/modules => lib/magma_fmodules}/mod_magma2_common.F (100%) rename {src/modules => lib/magma_fmodules}/mod_magma2_dfortran.F (100%) rename {src/modules => lib/magma_fmodules}/mod_magma2_sfortran.F (100%) rename {src/modules => lib/magma_fmodules}/mod_magma2_zfortran.F (100%) diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index b583690063..4a19fcccf4 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -328,6 +328,13 @@ SLEPC_INCS_R=$STRIPE AC_SUBST(SLEPC_LIBS_R) AC_SUBST(SLEPC_INCS_R) # +ACX_STRIPE_SUBPATH($MAGMA_LIBS,"LIB") +MAGMA_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($MAGMA_INCS,"INC") +MAGMA_INCS_R=$STRIPE +AC_SUBST(MAGMA_LIBS_R) +AC_SUBST(MAGMA_INCS_R) +# ACX_STRIPE_SUBPATH($LIBXC_LIBS,"LIB") LIBXC_LIBS_R=$STRIPE ACX_STRIPE_SUBPATH($LIBXC_INCS,"INC") diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 index c87c65a734..b2a078e89a 100644 --- a/config/m4/magma.m4 +++ b/config/m4/magma.m4 @@ -35,6 +35,7 @@ AC_ARG_WITH(magma_includedir,AS_HELP_STRING([--with-magma-includedir=],[Pa def_magma="" magma="no" enable_magma="no" +do_magma_fmodules="no" internal_magma="no" compile_magma="no" # @@ -46,9 +47,11 @@ fi # if test x"$with_magma_libs" = "xyes" ; then enable_magma="yes" ; + do_magma_fmodules="no" ; with_magma_libs=""; elif test x"$with_magma_libs" = "xno" ; then enable_magma="no" ; + do_magma_fmodules="no" ; with_magma_libs=""; fi # @@ -144,11 +147,16 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then AC_MSG_RESULT([already compiled]) ; else compile_magma="yes" ; + do_magma_fmodules="no" ; AC_MSG_RESULT([Compatible external Magma not found/specified. To be compiled.]) ; fi # fi # +# Check if fortran modules are available +# +if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then do_magma_fmodules="no" ; fi +# # switch off internal magma compilation # deactivate_internal=no @@ -165,6 +173,7 @@ AC_SUBST(MAGMA_LIBS) AC_SUBST(MAGMA_INCS) AC_SUBST(def_magma) AC_SUBST(enable_magma) +AC_SUBST(do_magma_fmodules) AC_SUBST(compile_magma) AC_SUBST(internal_magma) # diff --git a/config/mk/global/actions/compile_internal_libraries.mk b/config/mk/global/actions/compile_internal_libraries.mk index 7a6e35f5a4..7b7276411a 100644 --- a/config/mk/global/actions/compile_internal_libraries.mk +++ b/config/mk/global/actions/compile_internal_libraries.mk @@ -3,7 +3,7 @@ # # Copyright (C) 2020 The Yambo Team # -# Authors (see AUTHORS file for details): AM +# Authors (see AUTHORS file for details): AM DS # qe_pseudo: @+LIBS="qe_pseudo"; BASE="lib" ; ADF="$(STAMP_DBLE)"; LAB=""; $(todo_lib); $(mk_lib) @@ -13,3 +13,5 @@ math77: @+LIBS="math77"; BASE="lib" ; ADF="$(STAMP_DBLE)"; LAB=""; $(todo_lib); $(mk_lib) local: @+LIBS="local" ; BASE="lib" ; ADF="$(STAMP_DBLE)"; LAB=""; $(todo_lib); $(mk_lib) +magma_fmodules: + @+LIBS="magma_fmodules"; BASE="lib" ; ADF="$(STAMP_DBLE)"; LAB=""; $(todo_lib); $(mk_lib) diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 8312313f31..35d7826f59 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -13,6 +13,9 @@ endif include lib/archive/package.list # INT_LIBS = qe_pseudo slatec math77 local +ifeq ($(do_magma_fmodules),yes) + INT_LIBS = $(INT_LIBS) magma_fmodules +endif YAMBO_INT_LIBS= Yio YLIBDRIVER = interface main options YLIBDRIVER_LD = _Ydriver_options _Ydriver_interface _Ydriver_main diff --git a/config/report.in b/config/report.in index f99d64f46c..ae9f0fc1a8 100644 --- a/config/report.in +++ b/config/report.in @@ -60,8 +60,8 @@ # @PETSC_INCS_R@ # [@SLEPC_check@] SLEPC : @SLEPC_LIBS_R@ # @SLEPC_INCS_R@ -# [@MAGMA_check@] MAGMA : @MAGMA_LIBS@ -# @MAGMA_INCS@ +# [@MAGMA_check@] MAGMA : @MAGMA_LIBS_R@ +# @MAGMA_INCS_R@ (fortran modules to be compiled: @do_magma_fmodules@) # # > OTHERs # diff --git a/configure b/configure index def036b674..f0ba881684 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23471 h.cbf592b6b7. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23472 h.27b3538f80. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23471 h.cbf592b6b7' -PACKAGE_STRING='Yambo 5.2.0 r.23471 h.cbf592b6b7' +PACKAGE_VERSION='5.2.0 r.23472 h.27b3538f80' +PACKAGE_STRING='Yambo 5.2.0 r.23472 h.27b3538f80' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -717,6 +717,7 @@ KEEP_OBJS_check DP_check internal_magma compile_magma +do_magma_fmodules enable_magma def_magma MAGMA_INCS @@ -1619,7 +1620,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23471 h.cbf592b6b7 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23472 h.27b3538f80 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1685,7 +1686,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23471 h.cbf592b6b7:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23472 h.27b3538f80:";; esac cat <<\_ACEOF @@ -1905,7 +1906,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23471 h.cbf592b6b7 +Yambo configure 5.2.0 r.23472 h.27b3538f80 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2534,7 +2535,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23471 h.cbf592b6b7, which was +It was created by Yambo $as_me 5.2.0 r.23472 h.27b3538f80, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3292,8 +3293,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23471" -SHASH="cbf592b6b7" +SREVISION="23472" +SHASH="27b3538f80" @@ -15599,6 +15600,7 @@ fi def_magma="" magma="no" enable_magma="no" +do_magma_fmodules="no" internal_magma="no" compile_magma="no" # @@ -15610,9 +15612,11 @@ fi # if test x"$with_magma_libs" = "xyes" ; then enable_magma="yes" ; + do_magma_fmodules="no" ; with_magma_libs=""; elif test x"$with_magma_libs" = "xno" ; then enable_magma="no" ; + do_magma_fmodules="no" ; with_magma_libs=""; fi # @@ -15730,12 +15734,17 @@ printf "%s\n" "already compiled" >&6; } ; printf "%s\n" "already compiled" >&6; } ; else compile_magma="yes" ; + do_magma_fmodules="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 printf "%s\n" "Compatible external Magma not found/specified. To be compiled." >&6; } ; fi # fi # +# Check if fortran modules are available +# +if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then do_magma_fmodules="no" ; fi +# # switch off internal magma compilation # deactivate_internal=no @@ -15755,6 +15764,7 @@ fi + # # ============================================================================ @@ -16320,6 +16330,29 @@ fi SLEPC_INCS_R=$STRIPE +# + +TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +MAGMA_LIBS_R=$STRIPE + +TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +MAGMA_INCS_R=$STRIPE + + # TMP1=`echo $LIBXC_LIBS | sed 's/\//+/g'` @@ -16899,7 +16932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23471 h.cbf592b6b7, which was +This file was extended by Yambo $as_me 5.2.0 r.23472 h.27b3538f80, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16963,7 +16996,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23471 h.cbf592b6b7 +Yambo config.status 5.2.0 r.23472 h.27b3538f80 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c44ce0493a..7bf575246c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23471 h.cbf592b6b7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23472 h.27b3538f80, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23471" -SHASH="cbf592b6b7" +SREVISION="23472" +SHASH="27b3538f80" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/magma_fmodules/.objects b/lib/magma_fmodules/.objects new file mode 100644 index 0000000000..839feb4a6b --- /dev/null +++ b/lib/magma_fmodules/.objects @@ -0,0 +1,5 @@ +#if defined _MAGMA +MAGMA_objects = mod_magma2_common.o mod_magma2_sfortran.o mod_magma2_dfortran.o \ + mod_magma2_cfortran.o mod_magma2_zfortran.o mod_magma2.o +#endif +objects = $(MAGMA_objects) diff --git a/src/modules/mod_magma2.F b/lib/magma_fmodules/mod_magma2.F similarity index 100% rename from src/modules/mod_magma2.F rename to lib/magma_fmodules/mod_magma2.F diff --git a/src/modules/mod_magma2_cfortran.F b/lib/magma_fmodules/mod_magma2_cfortran.F similarity index 100% rename from src/modules/mod_magma2_cfortran.F rename to lib/magma_fmodules/mod_magma2_cfortran.F diff --git a/src/modules/mod_magma2_common.F b/lib/magma_fmodules/mod_magma2_common.F similarity index 100% rename from src/modules/mod_magma2_common.F rename to lib/magma_fmodules/mod_magma2_common.F diff --git a/src/modules/mod_magma2_dfortran.F b/lib/magma_fmodules/mod_magma2_dfortran.F similarity index 100% rename from src/modules/mod_magma2_dfortran.F rename to lib/magma_fmodules/mod_magma2_dfortran.F diff --git a/src/modules/mod_magma2_sfortran.F b/lib/magma_fmodules/mod_magma2_sfortran.F similarity index 100% rename from src/modules/mod_magma2_sfortran.F rename to lib/magma_fmodules/mod_magma2_sfortran.F diff --git a/src/modules/mod_magma2_zfortran.F b/lib/magma_fmodules/mod_magma2_zfortran.F similarity index 100% rename from src/modules/mod_magma2_zfortran.F rename to lib/magma_fmodules/mod_magma2_zfortran.F diff --git a/src/modules/.objects b/src/modules/.objects index 45cdac2089..e615332a87 100644 --- a/src/modules/.objects +++ b/src/modules/.objects @@ -19,17 +19,13 @@ NL_objects = mod_fields.o mod_electric.o mod_nl_optics.o mod_NL_interfaces #if defined _ELPH ELPH_objects = mod_ELPH_intfcs.o mod_ELPH.o #endif -#if defined _MAGMA -MAGMA_objects = mod_magma2_common.o mod_magma2_sfortran.o mod_magma2_dfortran.o \ - mod_magma2_cfortran.o mod_magma2_zfortran.o mod_magma2.o -#endif #if defined _io_lib objs = mod_pars.o mod_stderr.o mod_parallel.o mod_parallel_interface.o \ mod_com_interfcs.o mod_descriptors.o mod_com.o mod_IO.o mod_IO_interfaces.o #else DEV_objects = mod_cusolverdn_y.o mod_cuda.o objs = mod_pars.o mod_units.o mod_lexical_sort.o mod_stderr.o mod_memory.o mod_openmp.o mod_parallel.o mod_parallel_interface.o \ - mod_matrix.o mod_SLK.o $(MAGMA_objects) mod_linear_algebra.o mod_wrapper.o mod_wrapper_omp.o \ + mod_matrix.o mod_SLK.o mod_linear_algebra.o mod_wrapper.o mod_wrapper_omp.o \ mod_drivers.o mod_FFT.o mod_LIVE_t.o mod_logo.o mod_cutoff_ws.o \ mod_descriptors.o mod_com.o mod_com_interfcs.o mod_timing.o mod_R_lattice.o mod_electrons.o mod_wave_func.o mod_OUTPUT.o \ mod_xc_functionals.o mod_global_XC.o \ From 0d6c6f242277d296d040f2612d4440f2156c73ce Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 15 Oct 2024 14:25:13 +0200 Subject: [PATCH 0832/1367] Version 5.2.0, Revision 23472, Hash 5485636137 MODIFIED * config/m4/magma.m4 config/mk/global/defs.mk.in config/mk/global/libraries.mk config/report.in configure include/version/version.m4 lib/magma_fmodules/.objects Changes: - [magma_fmodules] Check for modules refined Patch sent by: Davide Sangalli --- config/m4/magma.m4 | 14 ++++++++------ config/mk/global/defs.mk.in | 1 + config/mk/global/libraries.mk | 5 +++-- config/report.in | 2 +- configure | 36 ++++++++++++++++++----------------- include/version/version.m4 | 6 +++--- lib/magma_fmodules/.objects | 2 +- 7 files changed, 36 insertions(+), 30 deletions(-) diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 index b2a078e89a..b7b02b413e 100644 --- a/config/m4/magma.m4 +++ b/config/m4/magma.m4 @@ -35,9 +35,9 @@ AC_ARG_WITH(magma_includedir,AS_HELP_STRING([--with-magma-includedir=],[Pa def_magma="" magma="no" enable_magma="no" -do_magma_fmodules="no" internal_magma="no" compile_magma="no" +compile_magma_fmodules="no" # if test x"$enable_magma_linalg" = "xyes"; then enable_magma="yes"; @@ -47,11 +47,11 @@ fi # if test x"$with_magma_libs" = "xyes" ; then enable_magma="yes" ; - do_magma_fmodules="no" ; + compile_magma_fmodules="yes" ; with_magma_libs=""; elif test x"$with_magma_libs" = "xno" ; then enable_magma="no" ; - do_magma_fmodules="no" ; + compile_magma_fmodules="no" ; with_magma_libs=""; fi # @@ -141,13 +141,15 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then def_magma="-D_MAGMA" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then compile_magma="no" ; + compile_magma_fmodules="no" ; AC_MSG_RESULT([already compiled]) ; elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then compile_magma="no" ; + compile_magma_fmodules="no" ; AC_MSG_RESULT([already compiled]) ; else compile_magma="yes" ; - do_magma_fmodules="no" ; + compile_magma_fmodules="no" ; AC_MSG_RESULT([Compatible external Magma not found/specified. To be compiled.]) ; fi # @@ -155,7 +157,7 @@ fi # # Check if fortran modules are available # -if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then do_magma_fmodules="no" ; fi +if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then compile_magma_fmodules="no" ; fi # # switch off internal magma compilation # @@ -173,8 +175,8 @@ AC_SUBST(MAGMA_LIBS) AC_SUBST(MAGMA_INCS) AC_SUBST(def_magma) AC_SUBST(enable_magma) -AC_SUBST(do_magma_fmodules) AC_SUBST(compile_magma) +AC_SUBST(compile_magma_fmodules) AC_SUBST(internal_magma) # ]) diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index 4811b25174..3048a2bdf2 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -34,6 +34,7 @@ do_libxc = @compile_libxc@ do_petsc = @compile_petsc@ do_slepc = @compile_slepc@ do_magma = @compile_magma@ +do_magma_fmodules = @compile_magma_fmodules@ shell = @SHELL@ package_bugreport = @PACKAGE_BUGREPORT@ prefix = @prefix@ diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 35d7826f59..94da4a7e9f 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -12,9 +12,10 @@ ifeq ($(wildcard config/mk/global/defs.mk),config/mk/global/defs.mk) endif include lib/archive/package.list # -INT_LIBS = qe_pseudo slatec math77 local ifeq ($(do_magma_fmodules),yes) - INT_LIBS = $(INT_LIBS) magma_fmodules + INT_LIBS = qe_pseudo slatec math77 local magma_fmodules +else + INT_LIBS = qe_pseudo slatec math77 local endif YAMBO_INT_LIBS= Yio YLIBDRIVER = interface main options diff --git a/config/report.in b/config/report.in index ae9f0fc1a8..82acc80611 100644 --- a/config/report.in +++ b/config/report.in @@ -61,7 +61,7 @@ # [@SLEPC_check@] SLEPC : @SLEPC_LIBS_R@ # @SLEPC_INCS_R@ # [@MAGMA_check@] MAGMA : @MAGMA_LIBS_R@ -# @MAGMA_INCS_R@ (fortran modules to be compiled: @do_magma_fmodules@) +# @MAGMA_INCS_R@ (fortran modules to be compiled: @compile_magma_fmodules@) # # > OTHERs # diff --git a/configure b/configure index f0ba881684..2e9d348bee 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23472 h.27b3538f80. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23473 h.5485636137. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23472 h.27b3538f80' -PACKAGE_STRING='Yambo 5.2.0 r.23472 h.27b3538f80' +PACKAGE_VERSION='5.2.0 r.23473 h.5485636137' +PACKAGE_STRING='Yambo 5.2.0 r.23473 h.5485636137' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -716,8 +716,8 @@ TIME_profile_check KEEP_OBJS_check DP_check internal_magma +compile_magma_fmodules compile_magma -do_magma_fmodules enable_magma def_magma MAGMA_INCS @@ -1620,7 +1620,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23472 h.27b3538f80 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23473 h.5485636137 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1686,7 +1686,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23472 h.27b3538f80:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23473 h.5485636137:";; esac cat <<\_ACEOF @@ -1906,7 +1906,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23472 h.27b3538f80 +Yambo configure 5.2.0 r.23473 h.5485636137 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2535,7 +2535,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23472 h.27b3538f80, which was +It was created by Yambo $as_me 5.2.0 r.23473 h.5485636137, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3293,8 +3293,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23472" -SHASH="27b3538f80" +SREVISION="23473" +SHASH="5485636137" @@ -15600,9 +15600,9 @@ fi def_magma="" magma="no" enable_magma="no" -do_magma_fmodules="no" internal_magma="no" compile_magma="no" +compile_magma_fmodules="no" # if test x"$enable_magma_linalg" = "xyes"; then enable_magma="yes"; @@ -15612,11 +15612,11 @@ fi # if test x"$with_magma_libs" = "xyes" ; then enable_magma="yes" ; - do_magma_fmodules="no" ; + compile_magma_fmodules="yes" ; with_magma_libs=""; elif test x"$with_magma_libs" = "xno" ; then enable_magma="no" ; - do_magma_fmodules="no" ; + compile_magma_fmodules="no" ; with_magma_libs=""; fi # @@ -15726,15 +15726,17 @@ printf %s "checking for internal Magma library... " >&6; } def_magma="-D_MAGMA" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then compile_magma="no" ; + compile_magma_fmodules="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 printf "%s\n" "already compiled" >&6; } ; elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then compile_magma="no" ; + compile_magma_fmodules="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 printf "%s\n" "already compiled" >&6; } ; else compile_magma="yes" ; - do_magma_fmodules="no" ; + compile_magma_fmodules="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 printf "%s\n" "Compatible external Magma not found/specified. To be compiled." >&6; } ; fi @@ -15743,7 +15745,7 @@ fi # # Check if fortran modules are available # -if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then do_magma_fmodules="no" ; fi +if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then compile_magma_fmodules="no" ; fi # # switch off internal magma compilation # @@ -16932,7 +16934,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23472 h.27b3538f80, which was +This file was extended by Yambo $as_me 5.2.0 r.23473 h.5485636137, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16996,7 +16998,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23472 h.27b3538f80 +Yambo config.status 5.2.0 r.23473 h.5485636137 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7bf575246c..f3175ec6d0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23472 h.27b3538f80, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23473 h.5485636137, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23472" -SHASH="27b3538f80" +SREVISION="23473" +SHASH="5485636137" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/magma_fmodules/.objects b/lib/magma_fmodules/.objects index 839feb4a6b..cfae042a34 100644 --- a/lib/magma_fmodules/.objects +++ b/lib/magma_fmodules/.objects @@ -2,4 +2,4 @@ MAGMA_objects = mod_magma2_common.o mod_magma2_sfortran.o mod_magma2_dfortran.o \ mod_magma2_cfortran.o mod_magma2_zfortran.o mod_magma2.o #endif -objects = $(MAGMA_objects) +objs = $(MAGMA_objects) From 3688da79e0ee0a63545ffcc7bd9a0ff28af5d602 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 29 Oct 2024 18:43:07 +0100 Subject: [PATCH 0833/1367] All headers moved in the header section of the files Version 5.3.0, Revision 23801, Hash 99140887ae MODIFIED * configure include/headers/common/y_memory.h include/version/version.m4 a2y/a2y_db1.F c2y/c2y.F c2y/c2y_db1.F p2y/mod_p2y.F p2y/p2y.F p2y/p2y_atmproj.F p2y/p2y_db1.F p2y/p2y_wf.F p2y/qe_pseudo_init.F Ymodules/mod_BS.F Ymodules/mod_BS_solvers.F Ymodules/mod_DICHROISM.F Ymodules/mod_DIPOLES.F Ymodules/mod_D_lattice.F Ymodules/mod_ELPH.F Ymodules/mod_FFT.F Ymodules/mod_MAGNONS.F Ymodules/mod_MPA.F Ymodules/mod_Overlaps.F Ymodules/mod_PHOTOLUM.F Ymodules/mod_POL_FIT.F Ymodules/mod_QP.F Ymodules/mod_QP_CTL.F Ymodules/mod_RT_control.F Ymodules/mod_RT_lifetimes.F Ymodules/mod_RT_occupations.F Ymodules/mod_RT_output.F Ymodules/mod_R_lattice.F Ymodules/mod_SC.F Ymodules/mod_SLK.F Ymodules/mod_X.F Ymodules/mod_collision_el.F Ymodules/mod_electric.F Ymodules/mod_electrons.F Ymodules/mod_frequency.F Ymodules/mod_hamiltonian.F Ymodules/mod_interpolate_tools.F Ymodules/mod_linear_algebra.F Ymodules/mod_matrix.F Ymodules/mod_memory.F Ymodules/mod_mklfft_gpu.F Ymodules/mod_nl_optics.F Ymodules/mod_parallel.F Ymodules/mod_plasma.F Ymodules/mod_pseudo.F Ymodules/mod_real_time.F Ymodules/mod_wave_func.F Ymodules/mod_wrapper.F acfdt/acfdt_tot_energy.F allocations/ELPH_alloc.F allocations/MPA_ALLOC_parallel.F allocations/X_ALLOC_elemental.F allocations/X_ALLOC_global.F allocations/X_ALLOC_parallel.F bse/BSE_utilities.F bse/K_Haydock.F bse/K_IP.F bse/K_IP_sort.F bse/K_Transitions_setup.F bse/K_WF_phases.F bse/K_blocks.F bse/K_correlation_collisions_dir.F bse/K_correlation_collisions_std.F bse/K_correlation_kernel_dir.F bse/K_correlation_kernel_std.F bse/K_diago_driver.F bse/K_diagonal.F bse/K_dipoles.F bse/K_driver.F bse/K_exchange_collisions.F bse/K_exchange_kernel.F bse/K_inversion_Lo.F bse/K_inversion_driver.F bse/K_inversion_engine.F bse/K_inversion_restart.F bse/K_kernel.F bse/K_multiply_by_V_slepc.F bse/K_multiply_by_V_transpose_slepc.F bse/K_screened_interaction.F bse/K_shell_matrix.F bse/K_solvers.F bse/K_stored_in_a_big_matrix.F bse/K_stored_in_a_nest_matrix.F bse/K_stored_in_a_slepc_matrix.F bz_ops/bz_samp_indexes.F bz_ops/k_build_up_BZ_tables.F bz_ops/k_expand.F bz_ops/k_ibz2bz.F bz_ops/k_lattice.F bz_ops/k_map_nearest_by_dir.F bz_ops/k_reduce.F collisions/Build_LSEX_collisions.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_NEQ_GW_static.F collisions/COLLISIONS_alloc_and_free.F collisions/COLLISIONS_basic_operations.F collisions/COLLISIONS_compress.F collisions/COLLISIONS_eval.F collisions/COLLISIONS_linearize_and_IO.F collisions/COLLISIONS_load.F collisions/COLLISIONS_map_to_QP_table.F collisions/LSEX_potential.F collisions/OSCLL_eval.F collisions/OSCLL_load.F collisions/PLASMA_parallel_setup.F collisions/PLASMA_tables_and_dimensions.F common/FREQUENCIES_coarse_grid.F common/FREQUENCIES_merge.F common/FREQUENCIES_reset.F common/FREQUENCIES_setup.F common/G_rot_grid.F common/OCCUPATIONS_Extend.F common/OCCUPATIONS_Fermi.F common/QP_state_print.F common/eval_G_minus_G.F common/eval_Gradient.F common/eval_Gradient_cpu.F common/eval_Gradient_gpu.F coulomb/col_driver.F coulomb/cutoff_box.F coulomb/cutoff_cylinder.F coulomb/rim.F dipoles/DIPOLE_build_covariants.F dipoles/DIPOLE_kb_init.F dipoles/DIPOLE_kb_sum.F dipoles/DIPOLE_overlaps.F dipoles/DIPOLE_p_matrix_elements.F dipoles/DIPOLE_shifted_grids.F dipoles/DIPOLE_transverse.F dipoles/DIPOLE_x_real_space.F el-ph/ELPH_Hamiltonian.F el-ph/ELPH_Sigma_c.F el-ph/ELPH_Sigma_c_engine.F el-ph/ELPH_databases_grids_map.F el-ph/ELPH_databases_load.F el-ph/En_k_plus_q_interpolate.F el-ph/Eval_Efermi_DbGd.F el-ph/get_ph_E_DbGd.F gpu_test/GPU_test.F gpu_test/saxpy_explicit.F gpu_test_mod/mod_data.F gpu_test_mod/mod_dev_linalg.F gpu_test_mod/mod_dev_memory.F hamiltonian/Bare_Hamiltonian.F hamiltonian/MAG_Hamiltonian.F hamiltonian/MAG_common_build_A.F hamiltonian/Pseudo_Hamiltonian.F hamiltonian/Pseudo_KB_FFT.F hamiltonian/Pseudo_KB_G_to_R_space.F hamiltonian/Pseudo_KB_gauge_factor.F interface/INIT.F interface/INIT_DephMatrix.F interface/INIT_QP.F interface/INIT_check_databases.F interface/INIT_q_points.F interpolate/INTERPOLATION_BZ.F interpolate/INTERPOLATION_BZ_coeff.F interpolate/INTERPOLATION_BZ_setup.F interpolate/INTERPOLATION_coefficients.F interpolate/INTERPOLATION_driver_do.F interpolate/INTERPOLATION_driver_end.F interpolate/INTERPOLATION_fourier.F interpolate/INTERPOLATION_nearest_k.F io/io_ATMPROJ_pwscf.F io/io_BSS_invert.F io/io_BS_Fxc.F io/io_COL_CUT.F io/io_DB1.F io/io_DB1_selective_scan.F io/io_Double_Grid.F io/io_ELPH.F io/io_E_SOC_map.F io/io_GROT.F io/io_HF_and_locXC.F io/io_KB_abinit.F io/io_KB_pwscf.F io/io_KB_real_space.F io/io_MPA.F io/io_NL.F io/io_OSCLL.F io/io_PH.F io/io_QINDX.F io/io_QP_and_GF.F io/io_RIM.F io/io_RIM_W.F io/io_RT_components_OBS.F io/io_RT_components_Reference.F io/io_RT_components_TIME_points.F io/io_SC_components.F io/io_Vnl.F io/io_X.F io/io_gFsq.F io/load_SC_components.F io/variables_ELPH.F io_parallel/io_COLLISIONS.F io_parallel/io_COLLISIONS_header.F io_serial/io_BS.F io_serial/io_COLLISIONS.F linear_algebra/LINEAR_ALGEBRA_driver.F linear_algebra/MATRIX_slepc.F linear_algebra/PARALLEL_HERMITIAN_diagonalization.F linear_algebra/PARALLEL_inversion.F linear_algebra/PARALLEL_lin_system.F linear_algebra/SERIAL_HERMITIAN_diagonalization.F linear_algebra/SERIAL_SVD_inversion.F linear_algebra/SERIAL_diagonalization.F linear_algebra/SERIAL_inversion.F linear_algebra/SERIAL_lin_system.F linear_algebra/SERIAL_lin_system_gpu.F linear_algebra/SLK_test.F matrices/MATRIX_duplicate.F matrices/MATRIX_init.F matrices/MATRIX_transfer.F matrices/MATRIX_transpose.F matrices/SLK_matrix_init.F nloptics/NL_driver.F nloptics/NL_initialize.F nloptics/NL_start_and_restart.F parallel/PARALLEL_FREQS_setup.F parallel/PARALLEL_Haydock_VEC_COMMs.F parallel/PARALLEL_Transitions_grouping.F parallel/PARALLEL_WF_distribute.F parallel/PARALLEL_WF_index.F parallel/PARALLEL_add_Q_to_K_list.F parallel/PARALLEL_collisions.F parallel/PARALLEL_distribute_BZk_using_IBZk.F parallel/PARALLEL_global_Oscillators.F parallel/PARALLEL_global_Real_Time.F parallel/PARALLEL_global_Response_G.F parallel/PARALLEL_global_Response_T.F parallel/PARALLEL_global_Response_T_transitions.F parallel/PARALLEL_global_Self_Energy.F parallel/PARALLEL_global_dimensions.F parallel/PARALLEL_global_indexes.F parallel/PARALLEL_global_reset.F parallel/PARALLEL_index.F parallel/PARALLEL_scheme_initialize.F pol_function/OPTICS_driver.F pol_function/X_AVERAGE_do_it.F pol_function/X_Double_Grid_setup.F pol_function/X_GreenF_analytical.F pol_function/X_GreenF_remap.F pol_function/X_dielectric_matrix.F pol_function/X_eh_setup.F pol_function/X_irredux.F pol_function/X_irredux_residuals.F pol_function/X_redux.F qp/QED_Sigma_c.F qp/QP_driver.F qp/QP_expand.F qp/QP_interpolate_W.F qp/QP_life_transitions.F qp/QP_mpa.F qp/QP_ppa_cohsex.F qp/QP_real_axis.F qp/QP_secant_driver.F qp/XCo_Hartree_Fock.F qp/XCo_driver.F qp/XCo_local.F qp/XCo_report.F qp_control/QP_DBs_add_me.F qp_control/QP_DBs_merge.F qp_control/QP_apply.F qp_control/QP_apply_QP.F qp_control/QP_apply_dump_user_CTLs.F qp_control/QP_apply_interpolate_QP.F qp_control/QP_apply_the_ACTION.F qp_control/QP_load_DB.F qp_control/QP_load_GFs.F real_time_control/RT_alloc.F real_time_control/RT_free.F real_time_control/RT_interpolation_driver.F real_time_control/RT_k_grid.F real_time_drivers/RT_driver.F real_time_initialize/RT_Dephasing_Matrix.F real_time_initialize/RT_ELPH_initialize.F real_time_initialize/RT_initialize.F real_time_initialize/RT_start_and_restart.F real_time_propagation/RT_Integrator_init.F sc/OEP_ApplySigmaCSX.F sc/OEP_ApplySigmaX.F sc/OEP_app_inversion.F sc/OEP_driver.F sc/OEP_exact_inversion.F sc/SC_driver.F sc/SC_start_and_restart.F setup/G_shells_finder.F setup/QP_state_table_setup.F setup/build_spin_sop.F setup/eval_Mtot.F setup/eval_minus_G.F setup/setup.F tddft/TDDFT_ALDA_G_space.F tddft/TDDFT_ALDA_eh_space_G_collisions_L.F tddft/TDDFT_ALDA_eh_space_G_collisions_R.F tddft/TDDFT_BSK_2_FXC.F tddft/TDDFT_BSK_disk_2_FXC.F tddft/TDDFT_do_X_W_typs.F wf_and_fft/PP_compute_becp.F wf_and_fft/PP_rotate_becp.F wf_and_fft/PP_scatterBamp_init.F wf_and_fft/PP_uspp_init.F wf_and_fft/PP_vloc_augment.F wf_and_fft/WF_alloc.F wf_and_fft/WF_derivative.F wf_and_fft/WF_free.F wf_and_fft/WF_load.F wf_and_fft/WF_rotate.F wf_and_fft/WF_shift_kpoint.F wf_and_fft/eval_GradOperator.F wf_and_fft/eval_R_minus_R.F wf_and_fft/fft_3d_cuda.F wf_and_fft/fft_3d_hip.F wf_and_fft/fft_free.F wf_and_fft/fft_setup.F wf_and_fft/scatter_Bamp_using_the_gradient.F wf_and_fft/scatter_Gamp.F wf_and_fft/scatter_Modscr.F xc_functionals/XC_libxc_driver.F xc_functionals/XC_nlcc_setup.F xc_functionals/el_density_and_current.F ypp/YPPmodules/mod_YPP_ELPH.F ypp/YPPmodules/mod_YPP_real_time.F ypp/bits/WANNIER_driver.F ypp/bits/WF_map_perturbative_SOC.F ypp/dipoles/DIPOLE_ypp_driver.F ypp/el-ph/ELPH_atomic_amplitude.F ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_double_grid.F ypp/el-ph/ELPH_eliashberg_dos.F ypp/el-ph/ELPH_excitonic_gkkp.F ypp/el-ph/ELPH_general_gFsq.F ypp/el-ph/ELPH_plot_gkkp.F ypp/el-ph/Eliashberg_Dos_Func.F ypp/electrons/electrons_WFs.F ypp/electrons/electrons_angular_momentum.F ypp/electrons/electrons_bands.F ypp/electrons/electrons_dos.F ypp/electrons/electrons_driver.F ypp/electrons/electrons_magnetization.F ypp/electrons/electrons_position.F ypp/excitons/excitons_WFs.F ypp/excitons/excitons_bands.F ypp/excitons/excitons_driver.F ypp/excitons/excitons_interpolate_setup.F ypp/excitons/excitons_ph_ass_dos.F ypp/excitons/excitons_read.F ypp/excitons/excitons_spin.F ypp/interface/INIT_ypp.F ypp/interface/QP_DBs_initialize.F ypp/k-points/k_circuit_driver.F ypp/k-points/k_circuit_made_of_special_points.F ypp/k-points/k_circuit_made_of_user_points.F ypp/k-points/k_find_border_and_merge.F ypp/k-points/k_grids.F ypp/k-points/k_map_fine_to_coarse.F ypp/k-points/k_map_fine_to_coarse_driver.F ypp/k-points/k_map_fine_to_coarse_engine.F ypp/k-points/k_map_fine_to_coarse_init.F ypp/k-points/k_map_fine_to_coarse_reduce.F ypp/k-points/k_random.F ypp/k-points/k_special.F ypp/plotting/PROJECTION_plot.F ypp/plotting/plot_gnuplot.F ypp/plotting/plot_interpolated_values.F ypp/plotting/plot_xcrysden.F ypp/qp/QP_DB_expand.F ypp/qp/QP_DBs_create_and_modify.F ypp/qp/QP_DBs_manipulate.F ypp/real_time/NL_exc_driver.F ypp/real_time/NL_ypp_driver.F ypp/real_time/RT_1D_Fourier_setup.F ypp/real_time/RT_G_two_times_build.F ypp/real_time/RT_G_two_times_interp_and_plot.F ypp/real_time/RT_OBSERVABLES_IO.F ypp/real_time/RT_OBSERVABLES_damp_and_write.F ypp/real_time/RT_Polarization.F ypp/real_time/RT_TRabs_driver.F ypp/real_time/RT_TRabs_output.F ypp/real_time/RT_TRabs_residuals.F ypp/real_time/RT_X_LRR_real_field.F ypp/real_time/RT_X_effective.F ypp/real_time/RT_X_inversion.F ypp/real_time/RT_X_qssin.F ypp/real_time/RT_X_response.F ypp/real_time/RT_coefficients_Fourier.F ypp/real_time/RT_coefficients_Inversion.F ypp/real_time/RT_components_energy_plot.F ypp/real_time/RT_density.F ypp/real_time/RT_dos_time_plot.F ypp/real_time/RT_occ_bands_interpolation.F ypp/real_time/RT_occ_time_plot.F ypp/real_time/RT_occupations_driver.F ypp/real_time/RT_split_Polarization.F ypp/real_time/RT_time_configuration_setup.F ypp/symmetries/fix_ATOMPROJs.F ypp/symmetries/fix_PPs.F ypp/symmetries/fix_QP_DBs.F ypp/symmetries/fix_SC_DBs.F ypp/symmetries/fix_WFs_Gshells.F ypp/symmetries/fix_WFs_and_E.F ypp/symmetries/fix_symmetries.F ypp/symmetries/symmetries_driver.F NEW * sbin/move_include_files.sh Bugs: - Additions: - Changes: - Patch sent by: Davide Sangalli --- configure | 4 +- include/headers/common/y_memory.h | 10 +++- include/version/version.m4 | 4 +- interfaces/a2y/a2y_db1.F | 16 ++++- interfaces/c2y/c2y.F | 8 ++- interfaces/c2y/c2y_db1.F | 8 ++- interfaces/p2y/mod_p2y.F | 20 +++++-- interfaces/p2y/p2y.F | 8 ++- interfaces/p2y/p2y_atmproj.F | 8 ++- interfaces/p2y/p2y_db1.F | 8 ++- interfaces/p2y/p2y_wf.F | 8 ++- interfaces/p2y/qe_pseudo_init.F | 8 ++- sbin/move_include_files.sh | 59 +++++++++++++++++++ src/Ymodules/mod_BS.F | 10 +++- src/Ymodules/mod_BS_solvers.F | 8 ++- src/Ymodules/mod_DICHROISM.F | 8 ++- src/Ymodules/mod_DIPOLES.F | 10 +++- src/Ymodules/mod_D_lattice.F | 10 +++- src/Ymodules/mod_ELPH.F | 8 ++- src/Ymodules/mod_FFT.F | 5 +- src/Ymodules/mod_MAGNONS.F | 8 ++- src/Ymodules/mod_MPA.F | 10 +++- src/Ymodules/mod_Overlaps.F | 8 ++- src/Ymodules/mod_PHOTOLUM.F | 8 ++- src/Ymodules/mod_POL_FIT.F | 8 ++- src/Ymodules/mod_QP.F | 8 ++- src/Ymodules/mod_QP_CTL.F | 8 ++- src/Ymodules/mod_RT_control.F | 8 ++- src/Ymodules/mod_RT_lifetimes.F | 8 ++- src/Ymodules/mod_RT_occupations.F | 8 ++- src/Ymodules/mod_RT_output.F | 8 ++- src/Ymodules/mod_R_lattice.F | 10 +++- src/Ymodules/mod_SC.F | 8 ++- src/Ymodules/mod_SLK.F | 8 ++- src/Ymodules/mod_X.F | 10 +++- src/Ymodules/mod_collision_el.F | 10 +++- src/Ymodules/mod_electric.F | 8 ++- src/Ymodules/mod_electrons.F | 8 ++- src/Ymodules/mod_frequency.F | 8 ++- src/Ymodules/mod_hamiltonian.F | 8 ++- src/Ymodules/mod_interpolate_tools.F | 8 ++- src/Ymodules/mod_linear_algebra.F | 10 +++- src/Ymodules/mod_matrix.F | 10 +++- src/Ymodules/mod_memory.F | 5 +- src/Ymodules/mod_mklfft_gpu.F | 10 +++- src/Ymodules/mod_nl_optics.F | 8 ++- src/Ymodules/mod_parallel.F | 8 ++- src/Ymodules/mod_plasma.F | 8 ++- src/Ymodules/mod_pseudo.F | 8 ++- src/Ymodules/mod_real_time.F | 8 ++- src/Ymodules/mod_wave_func.F | 10 +++- src/Ymodules/mod_wrapper.F | 3 + src/acfdt/acfdt_tot_energy.F | 8 ++- src/allocations/ELPH_alloc.F | 8 ++- src/allocations/MPA_ALLOC_parallel.F | 8 ++- src/allocations/X_ALLOC_elemental.F | 8 ++- src/allocations/X_ALLOC_global.F | 8 ++- src/allocations/X_ALLOC_parallel.F | 10 +++- src/bse/BSE_utilities.F | 36 ++++++++--- src/bse/K_Haydock.F | 8 ++- src/bse/K_IP.F | 8 ++- src/bse/K_IP_sort.F | 8 ++- src/bse/K_Transitions_setup.F | 12 +++- src/bse/K_WF_phases.F | 8 ++- src/bse/K_blocks.F | 8 ++- src/bse/K_correlation_collisions_dir.F | 10 +++- src/bse/K_correlation_collisions_std.F | 10 +++- src/bse/K_correlation_kernel_dir.F | 3 + src/bse/K_correlation_kernel_std.F | 10 +++- src/bse/K_diago_driver.F | 6 +- src/bse/K_diagonal.F | 8 ++- src/bse/K_dipoles.F | 8 ++- src/bse/K_driver.F | 8 ++- src/bse/K_exchange_collisions.F | 5 +- src/bse/K_exchange_kernel.F | 3 + src/bse/K_inversion_Lo.F | 8 ++- src/bse/K_inversion_driver.F | 8 ++- src/bse/K_inversion_engine.F | 8 ++- src/bse/K_inversion_restart.F | 8 ++- src/bse/K_kernel.F | 10 +++- src/bse/K_multiply_by_V_slepc.F | 14 +++-- src/bse/K_multiply_by_V_transpose_slepc.F | 14 +++-- src/bse/K_screened_interaction.F | 8 ++- src/bse/K_shell_matrix.F | 19 +++--- src/bse/K_solvers.F | 8 ++- src/bse/K_stored_in_a_big_matrix.F | 8 ++- src/bse/K_stored_in_a_nest_matrix.F | 15 ++--- src/bse/K_stored_in_a_slepc_matrix.F | 14 +++-- src/bz_ops/bz_samp_indexes.F | 8 ++- src/bz_ops/k_build_up_BZ_tables.F | 8 ++- src/bz_ops/k_expand.F | 8 ++- src/bz_ops/k_ibz2bz.F | 8 ++- src/bz_ops/k_lattice.F | 8 ++- src/bz_ops/k_map_nearest_by_dir.F | 8 ++- src/bz_ops/k_reduce.F | 8 ++- src/collisions/Build_LSEX_collisions.F | 8 ++- src/collisions/COLLISIONS_HXC.F | 8 ++- src/collisions/COLLISIONS_NEQ_GW_static.F | 8 ++- src/collisions/COLLISIONS_alloc_and_free.F | 8 ++- src/collisions/COLLISIONS_basic_operations.F | 8 ++- src/collisions/COLLISIONS_compress.F | 8 ++- src/collisions/COLLISIONS_eval.F | 5 +- src/collisions/COLLISIONS_linearize_and_IO.F | 5 +- src/collisions/COLLISIONS_load.F | 5 +- src/collisions/COLLISIONS_map_to_QP_table.F | 8 ++- src/collisions/LSEX_potential.F | 8 ++- src/collisions/OSCLL_eval.F | 10 +++- src/collisions/OSCLL_load.F | 8 ++- src/collisions/PLASMA_parallel_setup.F | 8 ++- src/collisions/PLASMA_tables_and_dimensions.F | 8 ++- src/common/FREQUENCIES_coarse_grid.F | 8 ++- src/common/FREQUENCIES_merge.F | 8 ++- src/common/FREQUENCIES_reset.F | 8 ++- src/common/FREQUENCIES_setup.F | 8 ++- src/common/G_rot_grid.F | 8 ++- src/common/OCCUPATIONS_Extend.F | 8 ++- src/common/OCCUPATIONS_Fermi.F | 8 ++- src/common/QP_state_print.F | 8 ++- src/common/eval_G_minus_G.F | 8 ++- src/common/eval_Gradient.F | 8 ++- src/common/eval_Gradient_cpu.F | 8 ++- src/common/eval_Gradient_gpu.F | 10 +++- src/coulomb/col_driver.F | 10 +++- src/coulomb/cutoff_box.F | 8 ++- src/coulomb/cutoff_cylinder.F | 8 ++- src/coulomb/rim.F | 8 ++- src/dipoles/DIPOLE_build_covariants.F | 8 ++- src/dipoles/DIPOLE_kb_init.F | 8 ++- src/dipoles/DIPOLE_kb_sum.F | 4 +- src/dipoles/DIPOLE_overlaps.F | 10 +++- src/dipoles/DIPOLE_p_matrix_elements.F | 3 + src/dipoles/DIPOLE_shifted_grids.F | 3 + src/dipoles/DIPOLE_transverse.F | 8 ++- src/dipoles/DIPOLE_x_real_space.F | 8 ++- src/el-ph/ELPH_Hamiltonian.F | 8 ++- src/el-ph/ELPH_Sigma_c.F | 8 ++- src/el-ph/ELPH_Sigma_c_engine.F | 8 ++- src/el-ph/ELPH_databases_grids_map.F | 8 ++- src/el-ph/ELPH_databases_load.F | 8 ++- src/el-ph/En_k_plus_q_interpolate.F | 8 ++- src/el-ph/Eval_Efermi_DbGd.F | 8 ++- src/el-ph/get_ph_E_DbGd.F | 8 ++- src/gpu_test/GPU_test.F | 1 - src/gpu_test/saxpy_explicit.F | 1 - src/gpu_test_mod/mod_data.F | 1 - src/gpu_test_mod/mod_dev_linalg.F | 1 - src/gpu_test_mod/mod_dev_memory.F | 1 - src/hamiltonian/Bare_Hamiltonian.F | 8 ++- src/hamiltonian/MAG_Hamiltonian.F | 8 ++- src/hamiltonian/MAG_common_build_A.F | 8 ++- src/hamiltonian/Pseudo_Hamiltonian.F | 8 ++- src/hamiltonian/Pseudo_KB_FFT.F | 8 ++- src/hamiltonian/Pseudo_KB_G_to_R_space.F | 8 ++- src/hamiltonian/Pseudo_KB_gauge_factor.F | 8 ++- src/interface/INIT.F | 8 ++- src/interface/INIT_DephMatrix.F | 8 ++- src/interface/INIT_QP.F | 8 ++- src/interface/INIT_check_databases.F | 10 +++- src/interface/INIT_q_points.F | 8 ++- src/interpolate/INTERPOLATION_BZ.F | 8 ++- src/interpolate/INTERPOLATION_BZ_coeff.F | 8 ++- src/interpolate/INTERPOLATION_BZ_setup.F | 8 ++- src/interpolate/INTERPOLATION_coefficients.F | 8 ++- src/interpolate/INTERPOLATION_driver_do.F | 8 ++- src/interpolate/INTERPOLATION_driver_end.F | 8 ++- src/interpolate/INTERPOLATION_fourier.F | 8 ++- src/interpolate/INTERPOLATION_nearest_k.F | 8 ++- src/io/io_ATMPROJ_pwscf.F | 8 ++- src/io/io_BSS_invert.F | 8 ++- src/io/io_BS_Fxc.F | 8 ++- src/io/io_COL_CUT.F | 8 ++- src/io/io_DB1.F | 8 ++- src/io/io_DB1_selective_scan.F | 8 ++- src/io/io_Double_Grid.F | 8 ++- src/io/io_ELPH.F | 8 ++- src/io/io_E_SOC_map.F | 8 ++- src/io/io_GROT.F | 8 ++- src/io/io_HF_and_locXC.F | 8 ++- src/io/io_KB_abinit.F | 8 ++- src/io/io_KB_pwscf.F | 8 ++- src/io/io_KB_real_space.F | 8 ++- src/io/io_MPA.F | 8 ++- src/io/io_NL.F | 8 ++- src/io/io_OSCLL.F | 8 ++- src/io/io_PH.F | 8 ++- src/io/io_QINDX.F | 8 ++- src/io/io_QP_and_GF.F | 8 ++- src/io/io_RIM.F | 8 ++- src/io/io_RIM_W.F | 8 ++- src/io/io_RT_components_OBS.F | 8 ++- src/io/io_RT_components_Reference.F | 8 ++- src/io/io_RT_components_TIME_points.F | 8 ++- src/io/io_SC_components.F | 8 ++- src/io/io_Vnl.F | 8 ++- src/io/io_X.F | 8 ++- src/io/io_gFsq.F | 8 ++- src/io/load_SC_components.F | 8 ++- src/io/variables_ELPH.F | 8 ++- src/io_parallel/io_COLLISIONS.F | 8 ++- src/io_parallel/io_COLLISIONS_header.F | 8 ++- src/io_serial/io_BS.F | 8 ++- src/io_serial/io_COLLISIONS.F | 8 ++- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 10 +++- src/linear_algebra/MATRIX_slepc.F | 3 + .../PARALLEL_HERMITIAN_diagonalization.F | 8 ++- src/linear_algebra/PARALLEL_inversion.F | 12 +++- src/linear_algebra/PARALLEL_lin_system.F | 8 ++- .../SERIAL_HERMITIAN_diagonalization.F | 8 ++- src/linear_algebra/SERIAL_SVD_inversion.F | 8 ++- src/linear_algebra/SERIAL_diagonalization.F | 8 ++- src/linear_algebra/SERIAL_inversion.F | 8 ++- src/linear_algebra/SERIAL_lin_system.F | 8 ++- src/linear_algebra/SERIAL_lin_system_gpu.F | 10 +++- src/linear_algebra/SLK_test.F | 16 ++++- src/matrices/MATRIX_duplicate.F | 8 ++- src/matrices/MATRIX_init.F | 10 +++- src/matrices/MATRIX_transfer.F | 8 ++- src/matrices/MATRIX_transpose.F | 8 ++- src/matrices/SLK_matrix_init.F | 12 +++- src/nloptics/NL_driver.F | 8 ++- src/nloptics/NL_initialize.F | 8 ++- src/nloptics/NL_start_and_restart.F | 8 ++- src/parallel/PARALLEL_FREQS_setup.F | 8 ++- src/parallel/PARALLEL_Haydock_VEC_COMMs.F | 8 ++- src/parallel/PARALLEL_Transitions_grouping.F | 8 ++- src/parallel/PARALLEL_WF_distribute.F | 8 ++- src/parallel/PARALLEL_WF_index.F | 8 ++- src/parallel/PARALLEL_add_Q_to_K_list.F | 8 ++- src/parallel/PARALLEL_collisions.F | 12 +++- .../PARALLEL_distribute_BZk_using_IBZk.F | 8 ++- src/parallel/PARALLEL_global_Oscillators.F | 8 ++- src/parallel/PARALLEL_global_Real_Time.F | 8 ++- src/parallel/PARALLEL_global_Response_G.F | 8 ++- src/parallel/PARALLEL_global_Response_T.F | 8 ++- .../PARALLEL_global_Response_T_transitions.F | 8 ++- src/parallel/PARALLEL_global_Self_Energy.F | 8 ++- src/parallel/PARALLEL_global_dimensions.F | 8 ++- src/parallel/PARALLEL_global_indexes.F | 8 ++- src/parallel/PARALLEL_global_reset.F | 8 ++- src/parallel/PARALLEL_index.F | 8 ++- src/parallel/PARALLEL_scheme_initialize.F | 8 ++- src/pol_function/OPTICS_driver.F | 8 ++- src/pol_function/X_AVERAGE_do_it.F | 5 +- src/pol_function/X_Double_Grid_setup.F | 8 ++- src/pol_function/X_GreenF_analytical.F | 8 ++- src/pol_function/X_GreenF_remap.F | 8 ++- src/pol_function/X_dielectric_matrix.F | 8 ++- src/pol_function/X_eh_setup.F | 8 ++- src/pol_function/X_irredux.F | 10 +++- src/pol_function/X_irredux_residuals.F | 3 + src/pol_function/X_redux.F | 8 ++- src/qp/QED_Sigma_c.F | 8 ++- src/qp/QP_driver.F | 12 +++- src/qp/QP_expand.F | 8 ++- src/qp/QP_interpolate_W.F | 14 ++++- src/qp/QP_life_transitions.F | 8 ++- src/qp/QP_mpa.F | 10 +++- src/qp/QP_ppa_cohsex.F | 13 +++- src/qp/QP_real_axis.F | 8 ++- src/qp/QP_secant_driver.F | 8 ++- src/qp/XCo_Hartree_Fock.F | 8 ++- src/qp/XCo_driver.F | 8 ++- src/qp/XCo_local.F | 8 ++- src/qp/XCo_report.F | 8 ++- src/qp_control/QP_DBs_add_me.F | 8 ++- src/qp_control/QP_DBs_merge.F | 8 ++- src/qp_control/QP_apply.F | 8 ++- src/qp_control/QP_apply_QP.F | 8 ++- src/qp_control/QP_apply_dump_user_CTLs.F | 8 ++- src/qp_control/QP_apply_interpolate_QP.F | 8 ++- src/qp_control/QP_apply_the_ACTION.F | 8 ++- src/qp_control/QP_load_DB.F | 8 ++- src/qp_control/QP_load_GFs.F | 8 ++- src/real_time_control/RT_alloc.F | 8 ++- src/real_time_control/RT_free.F | 8 ++- .../RT_interpolation_driver.F | 8 ++- src/real_time_control/RT_k_grid.F | 8 ++- src/real_time_drivers/RT_driver.F | 8 ++- .../RT_Dephasing_Matrix.F | 8 ++- src/real_time_initialize/RT_ELPH_initialize.F | 8 ++- src/real_time_initialize/RT_initialize.F | 8 ++- .../RT_start_and_restart.F | 8 ++- .../RT_Integrator_init.F | 8 ++- src/sc/OEP_ApplySigmaCSX.F | 8 ++- src/sc/OEP_ApplySigmaX.F | 8 ++- src/sc/OEP_app_inversion.F | 8 ++- src/sc/OEP_driver.F | 8 ++- src/sc/OEP_exact_inversion.F | 8 ++- src/sc/SC_driver.F | 8 ++- src/sc/SC_start_and_restart.F | 8 ++- src/setup/G_shells_finder.F | 8 ++- src/setup/QP_state_table_setup.F | 8 ++- src/setup/build_spin_sop.F | 8 ++- src/setup/eval_Mtot.F | 8 ++- src/setup/eval_minus_G.F | 8 ++- src/setup/setup.F | 10 +++- src/tddft/TDDFT_ALDA_G_space.F | 8 ++- .../TDDFT_ALDA_eh_space_G_collisions_L.F | 3 + .../TDDFT_ALDA_eh_space_G_collisions_R.F | 3 + src/tddft/TDDFT_BSK_2_FXC.F | 8 ++- src/tddft/TDDFT_BSK_disk_2_FXC.F | 8 ++- src/tddft/TDDFT_do_X_W_typs.F | 8 ++- src/wf_and_fft/PP_compute_becp.F | 8 ++- src/wf_and_fft/PP_rotate_becp.F | 8 ++- src/wf_and_fft/PP_scatterBamp_init.F | 8 ++- src/wf_and_fft/PP_uspp_init.F | 8 ++- src/wf_and_fft/PP_vloc_augment.F | 8 ++- src/wf_and_fft/WF_alloc.F | 10 +++- src/wf_and_fft/WF_derivative.F | 8 ++- src/wf_and_fft/WF_free.F | 10 +++- src/wf_and_fft/WF_load.F | 8 ++- src/wf_and_fft/WF_rotate.F | 3 + src/wf_and_fft/WF_shift_kpoint.F | 8 ++- src/wf_and_fft/eval_GradOperator.F | 8 ++- src/wf_and_fft/eval_R_minus_R.F | 8 ++- src/wf_and_fft/fft_3d_cuda.F | 10 +++- src/wf_and_fft/fft_3d_hip.F | 10 +++- src/wf_and_fft/fft_free.F | 8 ++- src/wf_and_fft/fft_setup.F | 8 ++- .../scatter_Bamp_using_the_gradient.F | 3 + src/wf_and_fft/scatter_Gamp.F | 8 ++- src/wf_and_fft/scatter_Modscr.F | 3 + src/xc_functionals/XC_libxc_driver.F | 8 ++- src/xc_functionals/XC_nlcc_setup.F | 8 ++- src/xc_functionals/el_density_and_current.F | 8 ++- ypp/YPPmodules/mod_YPP_ELPH.F | 8 ++- ypp/YPPmodules/mod_YPP_real_time.F | 8 ++- ypp/bits/WANNIER_driver.F | 12 +++- ypp/bits/WF_map_perturbative_SOC.F | 8 ++- ypp/dipoles/DIPOLE_ypp_driver.F | 8 ++- ypp/el-ph/ELPH_atomic_amplitude.F | 8 ++- ypp/el-ph/ELPH_databases.F | 8 ++- ypp/el-ph/ELPH_double_grid.F | 8 ++- ypp/el-ph/ELPH_eliashberg_dos.F | 8 ++- ypp/el-ph/ELPH_excitonic_gkkp.F | 8 ++- ypp/el-ph/ELPH_general_gFsq.F | 8 ++- ypp/el-ph/ELPH_plot_gkkp.F | 8 ++- ypp/el-ph/Eliashberg_Dos_Func.F | 8 ++- ypp/electrons/electrons_WFs.F | 8 ++- ypp/electrons/electrons_angular_momentum.F | 8 ++- ypp/electrons/electrons_bands.F | 8 ++- ypp/electrons/electrons_dos.F | 8 ++- ypp/electrons/electrons_driver.F | 8 ++- ypp/electrons/electrons_magnetization.F | 8 ++- ypp/electrons/electrons_position.F | 8 ++- ypp/excitons/excitons_WFs.F | 12 +++- ypp/excitons/excitons_bands.F | 8 ++- ypp/excitons/excitons_driver.F | 8 ++- ypp/excitons/excitons_interpolate_setup.F | 8 ++- ypp/excitons/excitons_ph_ass_dos.F | 8 ++- ypp/excitons/excitons_read.F | 8 ++- ypp/excitons/excitons_spin.F | 8 ++- ypp/interface/INIT_ypp.F | 8 ++- ypp/interface/QP_DBs_initialize.F | 8 ++- ypp/k-points/k_circuit_driver.F | 8 ++- .../k_circuit_made_of_special_points.F | 8 ++- ypp/k-points/k_circuit_made_of_user_points.F | 8 ++- ypp/k-points/k_find_border_and_merge.F | 8 ++- ypp/k-points/k_grids.F | 8 ++- ypp/k-points/k_map_fine_to_coarse.F | 8 ++- ypp/k-points/k_map_fine_to_coarse_driver.F | 8 ++- ypp/k-points/k_map_fine_to_coarse_engine.F | 8 ++- ypp/k-points/k_map_fine_to_coarse_init.F | 8 ++- ypp/k-points/k_map_fine_to_coarse_reduce.F | 8 ++- ypp/k-points/k_random.F | 8 ++- ypp/k-points/k_special.F | 8 ++- ypp/plotting/PROJECTION_plot.F | 8 ++- ypp/plotting/plot_gnuplot.F | 8 ++- ypp/plotting/plot_interpolated_values.F | 8 ++- ypp/plotting/plot_xcrysden.F | 8 ++- ypp/qp/QP_DB_expand.F | 8 ++- ypp/qp/QP_DBs_create_and_modify.F | 8 ++- ypp/qp/QP_DBs_manipulate.F | 8 ++- ypp/real_time/NL_exc_driver.F | 8 ++- ypp/real_time/NL_ypp_driver.F | 8 ++- ypp/real_time/RT_1D_Fourier_setup.F | 8 ++- ypp/real_time/RT_G_two_times_build.F | 8 ++- .../RT_G_two_times_interp_and_plot.F | 8 ++- ypp/real_time/RT_OBSERVABLES_IO.F | 8 ++- ypp/real_time/RT_OBSERVABLES_damp_and_write.F | 8 ++- ypp/real_time/RT_Polarization.F | 8 ++- ypp/real_time/RT_TRabs_driver.F | 8 ++- ypp/real_time/RT_TRabs_output.F | 8 ++- ypp/real_time/RT_TRabs_residuals.F | 8 ++- ypp/real_time/RT_X_LRR_real_field.F | 8 ++- ypp/real_time/RT_X_effective.F | 8 ++- ypp/real_time/RT_X_inversion.F | 8 ++- ypp/real_time/RT_X_qssin.F | 8 ++- ypp/real_time/RT_X_response.F | 8 ++- ypp/real_time/RT_coefficients_Fourier.F | 8 ++- ypp/real_time/RT_coefficients_Inversion.F | 8 ++- ypp/real_time/RT_components_energy_plot.F | 8 ++- ypp/real_time/RT_density.F | 8 ++- ypp/real_time/RT_dos_time_plot.F | 8 ++- ypp/real_time/RT_occ_bands_interpolation.F | 8 ++- ypp/real_time/RT_occ_time_plot.F | 8 ++- ypp/real_time/RT_occupations_driver.F | 8 ++- ypp/real_time/RT_split_Polarization.F | 8 ++- ypp/real_time/RT_time_configuration_setup.F | 8 ++- ypp/symmetries/fix_ATOMPROJs.F | 8 ++- ypp/symmetries/fix_PPs.F | 8 ++- ypp/symmetries/fix_QP_DBs.F | 8 ++- ypp/symmetries/fix_SC_DBs.F | 8 ++- ypp/symmetries/fix_WFs_Gshells.F | 8 ++- ypp/symmetries/fix_WFs_and_E.F | 12 +++- ypp/symmetries/fix_symmetries.F | 8 ++- ypp/symmetries/symmetries_driver.F | 8 ++- 407 files changed, 2899 insertions(+), 477 deletions(-) create mode 100755 sbin/move_include_files.sh diff --git a/configure b/configure index 3c41043d4b..7a89619624 100755 --- a/configure +++ b/configure @@ -2969,8 +2969,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23789" -SHASH="e3744e14c4" +SREVISION="23801" +SHASH="99140887ae" diff --git a/include/headers/common/y_memory.h b/include/headers/common/y_memory.h index 160b36c970..7d870bdcc2 100644 --- a/include/headers/common/y_memory.h +++ b/include/headers/common/y_memory.h @@ -3,14 +3,18 @@ Copyright (C) 2016 The Yambo Team - Authors (see AUTHORS file for details): HM AM + Authors (see AUTHORS file for details): HM AM DS */ - use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_count_d,MEM_global_mesg,IPL + #if defined _OPENACC || defined _OPENMP_GPU +#define USE_MEMORY \ + use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_count_d,MEM_global_mesg,IPL NEWLINE \ use devxlib, ONLY:devxlib_map,devxlib_unmap,devxlib_mapped,devxlib_memcpy_h2d +#else +#define USE_MEMORY \ + use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_count_d,MEM_global_mesg,IPL #endif - implicit none #if defined _MPI diff --git a/include/version/version.m4 b/include/version/version.m4 index 0ddddd358a..83b78471aa 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.2.0 r.23610 h.97928140ba, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23789" -SHASH="e3744e14c4" +SREVISION="23801" +SHASH="99140887ae" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 212cf8f274..5d13d05373 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CH DS HM ! +! headers +! +#include +! subroutine a2y_db1(en,k,ncid) ! use netcdf @@ -18,7 +22,9 @@ subroutine a2y_db1(en,k,ncid) use D_lattice, only : nsym, n_atoms, n_atomic_species, atom_mass use mod_com2y, only : print_interface_dimensions, artificial_spin_pol ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(inout) :: en type(bz_samp), intent(inout) :: k @@ -644,7 +650,9 @@ subroutine import_gwdata_group_kss use pseudo, only : PP_alloc_abinit, pp_n_l_times_proj_max,& & pp_n_l_comp, pp_kbs,pp_kb,pp_kbd,& & pp_table,l_many_proj,pp_n_l_max -#include + USE_MEMORY + ! + implicit none real(SP),allocatable :: pp_kbs_(:,:) integer :: max_number_of_angular_momenta,max_number_of_projectors integer :: ia, nproj, ip, il, varid, start(3), count(3) @@ -703,7 +711,9 @@ subroutine import_gwdata_group_wfk use pseudo, only : PP_alloc_abinit, pp_n_l_times_proj_max,& & pp_n_l_comp, pp_kbs,pp_kb,pp_kbd,& & pp_table,l_many_proj,pp_n_l_max -#include + USE_MEMORY + ! + implicit none real(SP),allocatable :: pp_kbs_(:,:) integer :: lmnmax integer, allocatable :: indlmn(:,:,:) diff --git a/interfaces/c2y/c2y.F b/interfaces/c2y/c2y.F index be39cae7e6..45a41f63fb 100644 --- a/interfaces/c2y/c2y.F +++ b/interfaces/c2y/c2y.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DV ! +! headers +! +#include +! integer function c2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! use pars, ONLY:SP,lchlen @@ -20,7 +24,9 @@ integer function c2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use mod_wf2y, ONLY:WF_splitter use parallel_int, ONLY:PARALLEL_live_message ! -#include + USE_MEMORY + ! + implicit none type(levels) :: en type(bz_samp) :: k integer, intent(in) :: lnstr,iind,iod,ijs,np,pid,icd diff --git a/interfaces/c2y/c2y_db1.F b/interfaces/c2y/c2y_db1.F index 8a14f0fb35..d993426ded 100644 --- a/interfaces/c2y/c2y_db1.F +++ b/interfaces/c2y/c2y_db1.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DV ! +! headers +! +#include +! subroutine c2y_db1(en,k,file_name_) ! use pars, ONLY: DP,pi @@ -21,7 +25,9 @@ subroutine c2y_db1(en,k,file_name_) use xc_functionals, ONLY: XC_EXCHANGE_CORRELATION,XC_LDA_C_PW use mod_com2y, ONLY: print_interface_dimensions,symmetries_check_and_load,& & alat_mult_factor -#include + USE_MEMORY + ! + implicit none character(*) :: file_name_ type(levels), intent(out) :: en type(bz_samp), intent(out) :: k diff --git a/interfaces/p2y/mod_p2y.F b/interfaces/p2y/mod_p2y.F index 0b40c037b3..b4280fd8f2 100644 --- a/interfaces/p2y/mod_p2y.F +++ b/interfaces/p2y/mod_p2y.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AF DV ! +! headers +! +#include +! module P2Ym ! use pw_export_module @@ -19,7 +23,9 @@ module P2Ym use parallel_int, ONLY : PP_bcast use units, ONLY : Da2AU ! -#include + USE_MEMORY + ! + implicit none ! character(lchlen) :: index_filename character(lchlen) :: dftdata_fmt @@ -310,7 +316,9 @@ subroutine get_atoms use D_lattice, ONLY:n_atoms_species_max,n_atomic_species,n_atoms_species, & & atom_pos, Z_species,atomic_number,atom_mass,atoms_map ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! @@ -548,7 +556,9 @@ subroutine get_k_points(k) use D_lattice, ONLY:alat use vec_operate, ONLY:v_is_zero ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: k ! @@ -617,7 +627,9 @@ subroutine get_R_vectors use pars, only: pi use R_lattice, ONLY: b, ng_vec, g_vec use D_lattice, ONLY: alat -#include + USE_MEMORY + ! + implicit none ! YAMBO_ALLOC(g_vec,(ng_vec,3)) ! The YAMBO array ! diff --git a/interfaces/p2y/p2y.F b/interfaces/p2y/p2y.F index e2ca38bba8..87bacec68e 100644 --- a/interfaces/p2y/p2y.F +++ b/interfaces/p2y/p2y.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CH AF ! +! headers +! +#include +! integer function p2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir,js) ! use P2Ym, ONLY:pw_init, pw_close, dftdata_fmt @@ -26,7 +30,9 @@ integer function p2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use stderr, ONLY:intc use qexml_module ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: k diff --git a/interfaces/p2y/p2y_atmproj.F b/interfaces/p2y/p2y_atmproj.F index 37a1c83832..47f4af19c9 100644 --- a/interfaces/p2y/p2y_atmproj.F +++ b/interfaces/p2y/p2y_atmproj.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DSDV ! +! headers +! +#include +! subroutine p2y_atmproj(filename,k) ! use pars, ONLY:SP,DP,schlen @@ -17,7 +21,9 @@ subroutine p2y_atmproj(filename,k) use atmproj_tools_module, ONLY:atmproj_read_ext !,nwfcx use qe_pseudo_m, ONLY:nsp ! -#include + USE_MEMORY + ! + implicit none ! character(schlen), intent(in) :: filename type(bz_samp), intent(in) :: k diff --git a/interfaces/p2y/p2y_db1.F b/interfaces/p2y/p2y_db1.F index 9c38e2d748..d6001d15d2 100644 --- a/interfaces/p2y/p2y_db1.F +++ b/interfaces/p2y/p2y_db1.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CH ! +! headers +! +#include +! subroutine p2y_db1(en,k) ! use P2Ym, ONLY : get_dimensions,get_cell,get_atoms,get_symmetries,get_xc,get_k_points,get_more,get_energies,& @@ -16,7 +20,9 @@ subroutine p2y_db1(en,k) use R_lattice, ONLY : ng_vec,g_vec,bz_samp use wave_func, ONLY : wf_ng, wf_nc_k, wf_ncx, wf_igk use mod_com2y, ONLY : force_noWFs -#include + USE_MEMORY + ! + implicit none type(levels), intent(out) :: en ! Energies type(bz_samp), intent(out) :: k ! K/Q points !---------------------------------------------------------------------* diff --git a/interfaces/p2y/p2y_wf.F b/interfaces/p2y/p2y_wf.F index 17e125ae76..3092327166 100644 --- a/interfaces/p2y/p2y_wf.F +++ b/interfaces/p2y/p2y_wf.F @@ -4,6 +4,10 @@ ! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): CH AF +! +! headers +! +#include ! subroutine p2y_wf(wf_disk,i_sp_pol,ikibz, ib_grp) ! @@ -19,7 +23,9 @@ subroutine p2y_wf(wf_disk,i_sp_pol,ikibz, ib_grp) use qexml_module use qexsd_module ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: i_sp_pol,ikibz, ib_grp complex(SP), intent(out) :: wf_disk(wf_ncx,n_spinor,wf_nb_io) diff --git a/interfaces/p2y/qe_pseudo_init.F b/interfaces/p2y/qe_pseudo_init.F index 9aa2d084df..d7a9f4b4eb 100644 --- a/interfaces/p2y/qe_pseudo_init.F +++ b/interfaces/p2y/qe_pseudo_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF IM ! +! headers +! +#include +! subroutine qe_pseudo_init() ! use pars, ONLY: DP, pi_DP @@ -31,7 +35,9 @@ subroutine qe_pseudo_init() ! use matrix_inversion, ONLY: invmat ! -#include + USE_MEMORY + ! + implicit none ! real(DP), parameter :: Ha2Ry=2.0_DP character(14) :: subname="qe_pseudo_init" diff --git a/sbin/move_include_files.sh b/sbin/move_include_files.sh new file mode 100755 index 0000000000..c8b10b32a8 --- /dev/null +++ b/sbin/move_include_files.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +for file in */*/*.F; do + + if [ "$file" == "interfaces/p2y/num_interpolation_module.F" ]; then continue; fi + if [ "$file" == "interfaces/p2y/pw_pseudo_module.F" ]; then continue; fi + if [ "$file" == "src/Ymodules/mod_cufft.F" ]; then continue; fi + if [ "$file" == "src/Ymodules/mod_cusolverdn_y.F" ]; then continue; fi + if [ "$file" == "src/Ymodules/mod_interfaces.F" ]; then continue; fi + if [ "$file" == "src/bse/K_diago_driver.F" ]; then continue; fi + if [[ "$file" == *"_incl.F"* ]]; then continue; fi + + echo "Checking file $file" + +awk ' +{ + lines[NR] = $0; # Store each line in an array +} +END { + for (i = 1; i <= NR; i++) { + if (lines[i] ~ /! Authors/) { + print lines[i]; # Print the line with ! Authors + k = 0; + for (j = 1; j <= NR; j++) { + if (lines[j] ~ /#include/) { + k++ ; + if (k == 1) { + print "!"; + print "! headers"; + print "!"; + print lines[j]; # Print #include lines + line_printed[k++]=lines[j] + } else { + print_line = 1; + for (kp = 1; kp < k; kp++) { + if ( lines[j] == line_printed[kp] ){ print_line = 0 } + } + if (print_line == 1){ + print lines[j] + line_printed[k++]=lines[j] + } + } + } + } + } + if (lines[i] !~ /! Authors/ && lines[i] !~ /#include/) { + print lines[i]; # Print other lines + } + if (lines[i] ~ /#include/ || lines[i] ~ /#include /) { + print " USE_MEMORY" ; + print " !"; + print " implicit none"; # Resume implicit none + } + } +} +' $file > $file.tmp +mv $file.tmp $file +done + diff --git a/src/Ymodules/mod_BS.F b/src/Ymodules/mod_BS.F index 4a6b220120..21815acde5 100644 --- a/src/Ymodules/mod_BS.F +++ b/src/Ymodules/mod_BS.F @@ -5,14 +5,20 @@ ! ! Authors (see AUTHORS file for details): AM MG ! +! headers +! +#include +#include +! module BS ! use pars, ONLY: IP,IPL,SP,schlen,lchlen use collision_el, ONLY: elemental_collision use gpu_m, ONLY: have_gpu ! -#include -#include + USE_MEMORY + ! + implicit none ! ! Modes and logicals !==================== diff --git a/src/Ymodules/mod_BS_solvers.F b/src/Ymodules/mod_BS_solvers.F index 290a281234..a3450bc56e 100644 --- a/src/Ymodules/mod_BS_solvers.F +++ b/src/Ymodules/mod_BS_solvers.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module BS_solvers ! use descriptors, ONLY:IO_desc @@ -12,7 +16,9 @@ module BS_solvers use BS, ONLY:BS_T_grp,BS_nT_grps,BS_K_dim,BS_H_dim,BS_block,n_BS_blks,BS_blk use matrix, ONLY:PAR_matrix ! -#include + USE_MEMORY + ! + implicit none ! ! Epsilon factor !================== diff --git a/src/Ymodules/mod_DICHROISM.F b/src/Ymodules/mod_DICHROISM.F index d3208473e2..2c648a0c35 100644 --- a/src/Ymodules/mod_DICHROISM.F +++ b/src/Ymodules/mod_DICHROISM.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! module DICHROISM ! use pars, ONLY:SP use BS, ONLY:l_BS_dichroism ! -#include + USE_MEMORY + ! + implicit none ! complex(SP), allocatable :: BSS_dipoles_dich(:,:) ! diff --git a/src/Ymodules/mod_DIPOLES.F b/src/Ymodules/mod_DIPOLES.F index 2752d803cc..1a39b8e045 100644 --- a/src/Ymodules/mod_DIPOLES.F +++ b/src/Ymodules/mod_DIPOLES.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +#include +! module DIPOLES ! use pars, ONLY:SP,lchlen,schlen @@ -12,8 +17,9 @@ module DIPOLES use descriptors, ONLY:IO_desc use gpu_m, ONLY:have_gpu ! -#include -#include + USE_MEMORY + ! + implicit none ! ! Logicals ! diff --git a/src/Ymodules/mod_D_lattice.F b/src/Ymodules/mod_D_lattice.F index 3490c77cb1..70d0178009 100644 --- a/src/Ymodules/mod_D_lattice.F +++ b/src/Ymodules/mod_D_lattice.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! module D_lattice ! use pars, ONLY:SP,lchlen,cONE,cZERO,cI,schlen use devxlib ! -#include -#include + USE_MEMORY + ! + implicit none ! ! Non periodic directions ! diff --git a/src/Ymodules/mod_ELPH.F b/src/Ymodules/mod_ELPH.F index 1f7a81845f..6cbfbe4876 100644 --- a/src/Ymodules/mod_ELPH.F +++ b/src/Ymodules/mod_ELPH.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module ELPH ! use pars, ONLY:SP,rZERO,schlen use electrons, ONLY:levels,E_reset use descriptors, ONLY:IO_desc ! -#include + USE_MEMORY + ! + implicit none ! ! Dumensions integer :: ph_modes=0 diff --git a/src/Ymodules/mod_FFT.F b/src/Ymodules/mod_FFT.F index aaae357551..9d220b65b2 100644 --- a/src/Ymodules/mod_FFT.F +++ b/src/Ymodules/mod_FFT.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! !#ifdef _MKLGPU !include "mkl_dfti_omp_offload.f90" !#endif @@ -16,7 +20,6 @@ module FFT_m use mklfft_gpu #endif ! -#include ! implicit none ! diff --git a/src/Ymodules/mod_MAGNONS.F b/src/Ymodules/mod_MAGNONS.F index aea16a2895..3f1a0637ff 100644 --- a/src/Ymodules/mod_MAGNONS.F +++ b/src/Ymodules/mod_MAGNONS.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! module MAGNONS ! use pars, ONLY:SP use BS, ONLY:l_BS_magnons ! -#include + USE_MEMORY + ! + implicit none ! complex(SP), allocatable :: BSS_dipoles_magn(:,:) ! diff --git a/src/Ymodules/mod_MPA.F b/src/Ymodules/mod_MPA.F index 1acd838381..6c79e6bd09 100644 --- a/src/Ymodules/mod_MPA.F +++ b/src/Ymodules/mod_MPA.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): DALV,AF ! +! headers +! +#include +#include +! !------------------------------------------------------------ ! Multipole interpolation: ! - analytical solution for 1-3 poles @@ -35,8 +40,9 @@ module mpa_m use matrix, ONLY:PAR_matrix use gpu_m, ONLY:have_gpu ! -#include -#include + USE_MEMORY + ! + implicit none complex(SP), allocatable, target :: MPA_freqs(:) type(PAR_matrix), allocatable, target :: MPA_E_par(:) diff --git a/src/Ymodules/mod_Overlaps.F b/src/Ymodules/mod_Overlaps.F index 51ce4a66e4..66d844a848 100644 --- a/src/Ymodules/mod_Overlaps.F +++ b/src/Ymodules/mod_Overlaps.F @@ -5,10 +5,16 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! module Overlaps_m ! use pars, ONLY:SP -#include + USE_MEMORY + ! + implicit none ! complex(SP), allocatable :: S_det(:,:) complex(SP), allocatable :: Sm1_plus(:,:,:,:) diff --git a/src/Ymodules/mod_PHOTOLUM.F b/src/Ymodules/mod_PHOTOLUM.F index 620ee61f1f..4a7706bff5 100644 --- a/src/Ymodules/mod_PHOTOLUM.F +++ b/src/Ymodules/mod_PHOTOLUM.F @@ -5,11 +5,17 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module PHOTOLUM ! use BS, ONLY:l_BS_photolum use pars, ONLY:SP -#include + USE_MEMORY + ! + implicit none ! real(SP) :: PL_prefactor ! diff --git a/src/Ymodules/mod_POL_FIT.F b/src/Ymodules/mod_POL_FIT.F index d177471c91..a8fd71e183 100644 --- a/src/Ymodules/mod_POL_FIT.F +++ b/src/Ymodules/mod_POL_FIT.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! ! POL_Gilbreth_fit based on: ! ! pfit.f90: Module for polynomial least-squares fitting @@ -117,7 +121,9 @@ subroutine POL_Gilbreth_fit(x,y,sig,a) ! Notes: ! This routine uses a QR decomposition method, which should be more ! numerically stable than solving the normal equations. -#include + USE_MEMORY + ! + implicit none real(DP), intent(in) :: x(:), y(:), sig(:) real(DP), intent(out) :: a(:) real(DP), allocatable :: work(:), C(:,:), Q(:,:), R(:,:), b(:) diff --git a/src/Ymodules/mod_QP.F b/src/Ymodules/mod_QP.F index cb786e2d9f..b31e1e8b30 100644 --- a/src/Ymodules/mod_QP.F +++ b/src/Ymodules/mod_QP.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module QP_m ! use descriptors, ONLY:IO_desc,IO_desc_duplicate,IO_desc_reset use pars, ONLY:SP,schlen,cZERO ! -#include + USE_MEMORY + ! + implicit none ! ! Mixing for non perturbative calculations integer :: SC_bands_mixed diff --git a/src/Ymodules/mod_QP_CTL.F b/src/Ymodules/mod_QP_CTL.F index 1637bf34a9..5f5de82d0e 100644 --- a/src/Ymodules/mod_QP_CTL.F +++ b/src/Ymodules/mod_QP_CTL.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module QP_CTL_m ! use pars, ONLY:SP,schlen,lchlen,n_QP_actions_MAX @@ -180,7 +184,9 @@ subroutine QP_CTL_fill(iA,i_spin,ID,i_field,CBm,VBM) end subroutine ! subroutine QP_actions_reset -#include + USE_MEMORY + ! + implicit none integer :: i_a n_QP_actions=0 do i_a=1,n_QP_actions_MAX diff --git a/src/Ymodules/mod_RT_control.F b/src/Ymodules/mod_RT_control.F index b59bc48756..aa0fea81f9 100644 --- a/src/Ymodules/mod_RT_control.F +++ b/src/Ymodules/mod_RT_control.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! module RT_control ! use pars, ONLY:SP,lchlen,schlen,rZERO use units, ONLY:AUT2FS use real_time, ONLY:l_NE_dynamics,l_NE_with_fields,l_elph_scatt ! -#include + USE_MEMORY + ! + implicit none ! integer :: CACHE_OBS_last_point real(SP) :: CACHE_OBS_INTERVAL_time diff --git a/src/Ymodules/mod_RT_lifetimes.F b/src/Ymodules/mod_RT_lifetimes.F index 972a45668f..732c69b127 100644 --- a/src/Ymodules/mod_RT_lifetimes.F +++ b/src/Ymodules/mod_RT_lifetimes.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module RT_lifetimes ! use pars, ONLY:SP,rZERO,schlen use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elphoton_scatt,l_phel_scatt ! -#include + USE_MEMORY + ! + implicit none ! type RT_lifetime logical :: active=.FALSE. diff --git a/src/Ymodules/mod_RT_occupations.F b/src/Ymodules/mod_RT_occupations.F index 42b08c54fd..8efe249373 100644 --- a/src/Ymodules/mod_RT_occupations.F +++ b/src/Ymodules/mod_RT_occupations.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module RT_occupations ! use pars, ONLY:SP,rZERO,schlen use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elphoton_scatt,& & l_phel_scatt,l_phel_corr ! -#include + USE_MEMORY + ! + implicit none ! type RT_occupation character(schlen) :: KIND diff --git a/src/Ymodules/mod_RT_output.F b/src/Ymodules/mod_RT_output.F index a45fca3f20..58e4008215 100644 --- a/src/Ymodules/mod_RT_output.F +++ b/src/Ymodules/mod_RT_output.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module RT_output_m ! use drivers, ONLY:l_elel_scatt,l_elph_scatt,l_elphoton_scatt @@ -13,7 +17,9 @@ module RT_output_m use global_XC, ONLY:QP_SE_NONE use descriptors,ONLY:IO_desc ! -#include + USE_MEMORY + ! + implicit none ! integer, parameter :: N_MAX_RT_o_files=150 integer, parameter :: N_MAX_RT_X_order=9 diff --git a/src/Ymodules/mod_R_lattice.F b/src/Ymodules/mod_R_lattice.F index 4b2160f3e7..5cbabbd49f 100644 --- a/src/Ymodules/mod_R_lattice.F +++ b/src/Ymodules/mod_R_lattice.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! module R_lattice ! use pars, ONLY:SP,DP,schlen, IP use descriptors, ONLY:IO_desc ! -#include -#include + USE_MEMORY + ! + implicit none ! integer, parameter:: MAX_kpts_to_report=50 ! diff --git a/src/Ymodules/mod_SC.F b/src/Ymodules/mod_SC.F index 4243d99e8a..caaba9bcd9 100644 --- a/src/Ymodules/mod_SC.F +++ b/src/Ymodules/mod_SC.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM MG ! +! headers +! +#include +! module SC ! use descriptors, ONLY:IO_desc use pars, ONLY:SP,schlen,lchlen ! -#include + USE_MEMORY + ! + implicit none ! integer :: SC_bands(2) integer :: SC_nbands diff --git a/src/Ymodules/mod_SLK.F b/src/Ymodules/mod_SLK.F index 0751309195..e4928e3e1e 100644 --- a/src/Ymodules/mod_SLK.F +++ b/src/Ymodules/mod_SLK.F @@ -5,11 +5,17 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! module SLK_m ! use pars, ONLY: SP use parallel_m, ONLY: yMPI_comm -#include + USE_MEMORY + ! + implicit none ! integer :: n_pools = 1 ! number of pools ! diff --git a/src/Ymodules/mod_X.F b/src/Ymodules/mod_X.F index 732b9794c0..c42db32df5 100644 --- a/src/Ymodules/mod_X.F +++ b/src/Ymodules/mod_X.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! module X_m ! use descriptors, ONLY:IO_desc @@ -14,8 +19,9 @@ module X_m use OUTPUT, ONLY:N_MAX_columns use gpu_m, ONLY:have_gpu ! -#include -#include + USE_MEMORY + ! + implicit none ! ! Observables ! diff --git a/src/Ymodules/mod_collision_el.F b/src/Ymodules/mod_collision_el.F index efc94a800e..82256466ea 100644 --- a/src/Ymodules/mod_collision_el.F +++ b/src/Ymodules/mod_collision_el.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! module collision_el ! !===================== @@ -16,8 +21,9 @@ module collision_el use qe_pseudo_m, ONLY:bec_type,deallocate_bec_type use gpu_m, ONLY:have_gpu ! -#include -#include + USE_MEMORY + ! + implicit none ! type elemental_collision ! diff --git a/src/Ymodules/mod_electric.F b/src/Ymodules/mod_electric.F index 22103803ba..dd2ec8a074 100644 --- a/src/Ymodules/mod_electric.F +++ b/src/Ymodules/mod_electric.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! module electric ! use pars, ONLY:SP,schlen,lchlen use electrons, ONLY:levels ! -#include + USE_MEMORY + ! + implicit none ! complex(SP) :: NL_initial_P(3) ! in principle it can be different from zero ! diff --git a/src/Ymodules/mod_electrons.F b/src/Ymodules/mod_electrons.F index 54a57dfdc7..4b63ecc6c7 100644 --- a/src/Ymodules/mod_electrons.F +++ b/src/Ymodules/mod_electrons.F @@ -5,11 +5,17 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module electrons ! use pars, ONLY:SP,rZERO ! -#include + USE_MEMORY + ! + implicit none ! real(SP) :: nel real(SP) :: default_nel diff --git a/src/Ymodules/mod_frequency.F b/src/Ymodules/mod_frequency.F index ffae67f692..6f8a42b132 100644 --- a/src/Ymodules/mod_frequency.F +++ b/src/Ymodules/mod_frequency.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module frequency ! use pars, ONLY:SP use units, ONLY:HA2EV ! -#include + USE_MEMORY + ! + implicit none ! ! Bare 2 Coarse grid ! diff --git a/src/Ymodules/mod_hamiltonian.F b/src/Ymodules/mod_hamiltonian.F index 1ed7450204..95ef9d39d1 100644 --- a/src/Ymodules/mod_hamiltonian.F +++ b/src/Ymodules/mod_hamiltonian.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! module hamiltonian ! use pars, ONLY:SP,schlen use electrons, ONLY:levels ! -#include + USE_MEMORY + ! + implicit none ! integer :: H_ref_bands(2) integer :: H_ref_nbands diff --git a/src/Ymodules/mod_interpolate_tools.F b/src/Ymodules/mod_interpolate_tools.F index 1452521bc2..164f1a3409 100644 --- a/src/Ymodules/mod_interpolate_tools.F +++ b/src/Ymodules/mod_interpolate_tools.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module interpolate_tools ! use pars, ONLY:SP,schlen,rZERO @@ -13,7 +17,9 @@ module interpolate_tools & INTERPOLATE_msg_fmt,OUT_k_nk,INTERP_FineGd use electrons, ONLY:n_sp_pol ! -#include + USE_MEMORY + ! + implicit none ! contains ! diff --git a/src/Ymodules/mod_linear_algebra.F b/src/Ymodules/mod_linear_algebra.F index 9e7ca9ecaf..80c6ee8be9 100644 --- a/src/Ymodules/mod_linear_algebra.F +++ b/src/Ymodules/mod_linear_algebra.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! module linear_algebra ! use pars, ONLY:SP,schlen ! -#include -#include + USE_MEMORY + ! + implicit none ! integer, parameter :: USE_LK=1 integer, parameter :: USE_SLK=2 diff --git a/src/Ymodules/mod_matrix.F b/src/Ymodules/mod_matrix.F index 024f76abdd..74b5474796 100644 --- a/src/Ymodules/mod_matrix.F +++ b/src/Ymodules/mod_matrix.F @@ -5,14 +5,20 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! module matrix ! use pars, ONLY:schlen,SP use parallel_m, ONLY:yMPI_comm use devxlib, ONLY:devxlib_mapped,devxlib_memset_d ! -#include -#include + USE_MEMORY + ! + implicit none ! ! Distributed Matrix structure ! diff --git a/src/Ymodules/mod_memory.F b/src/Ymodules/mod_memory.F index 14111791ce..89c7c8d3bd 100644 --- a/src/Ymodules/mod_memory.F +++ b/src/Ymodules/mod_memory.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module y_memory ! use pars, ONLY:SP,schlen,IP,IPL,DP,LP,SP6,N_MEM_max,N_MEM_SAVE_max,& @@ -12,7 +16,6 @@ module y_memory use openmp, ONLY:master_thread use iso_c_binding, ONLY:c_int ! -#include ! implicit none ! diff --git a/src/Ymodules/mod_mklfft_gpu.F b/src/Ymodules/mod_mklfft_gpu.F index bc8297eb97..dfb7944627 100644 --- a/src/Ymodules/mod_mklfft_gpu.F +++ b/src/Ymodules/mod_mklfft_gpu.F @@ -4,6 +4,11 @@ ! ! Authors (see AUTHORS file for details): AF ! +! headers +! +#include +#include +! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or ! modify it under the terms of the GNU General Public @@ -44,7 +49,6 @@ ! !===================================================================== ! -#include include "mkl_dfti_omp_offload.f90" ! module mklfft_gpu @@ -59,7 +63,9 @@ module mklfft_gpu contains subroutine fft_3d_mklgpu(c_d,n,fft_sign,mklgpu_desc) ! -#include + USE_MEMORY + ! + implicit none ! integer :: fft_sign,n(3) type(dfti_descriptor), pointer :: mklgpu_desc diff --git a/src/Ymodules/mod_nl_optics.F b/src/Ymodules/mod_nl_optics.F index 1860dcded9..cd3c4cf9ba 100644 --- a/src/Ymodules/mod_nl_optics.F +++ b/src/Ymodules/mod_nl_optics.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG AC ! +! headers +! +#include +! module nl_optics ! use descriptors, ONLY:IO_desc @@ -12,7 +16,9 @@ module nl_optics use electrons, ONLY:levels use real_time, ONLY:NE_steps ! -#include + USE_MEMORY + ! + implicit none ! ! Long range correction field ! diff --git a/src/Ymodules/mod_parallel.F b/src/Ymodules/mod_parallel.F index 1731212895..5aa68a59f9 100644 --- a/src/Ymodules/mod_parallel.F +++ b/src/Ymodules/mod_parallel.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module parallel_m ! ! Collective Operations (from http://linux.die.net/man/3/mpi_lor ) @@ -43,7 +47,9 @@ module parallel_m #endif ! #if !defined _io_lib -#include + USE_MEMORY + ! + implicit none #endif ! #if defined _MPI diff --git a/src/Ymodules/mod_plasma.F b/src/Ymodules/mod_plasma.F index 310cc5c04e..b4d97b9792 100644 --- a/src/Ymodules/mod_plasma.F +++ b/src/Ymodules/mod_plasma.F @@ -5,10 +5,16 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! module plasma ! use pars, ONLY :SP -#include + USE_MEMORY + ! + implicit none ! ! NOTE: Plasma_tab is on bg (big grid), plasma_tab_m1 points to cg (coarse_grid). ! Plasma_grid connects the two diff --git a/src/Ymodules/mod_pseudo.F b/src/Ymodules/mod_pseudo.F index 4ee2823c26..498a757ddf 100644 --- a/src/Ymodules/mod_pseudo.F +++ b/src/Ymodules/mod_pseudo.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS AF ! +! headers +! +#include +! module pseudo ! use pars, ONLY:SP,DP,LP @@ -13,7 +17,9 @@ module pseudo use D_lattice, ONLY:n_atomic_species,n_atoms_species use qe_pseudo_m, ONLY:qe_pseudo_deallocate, qe_pseudo_allocate,& & bec_type, deallocate_bec_type -#include + USE_MEMORY + ! + implicit none ! ! *** Non-Local pseudo. The [r,Vnl] commutator *** ! diff --git a/src/Ymodules/mod_real_time.F b/src/Ymodules/mod_real_time.F index 48674f4e87..91c19378cc 100644 --- a/src/Ymodules/mod_real_time.F +++ b/src/Ymodules/mod_real_time.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG DS ! +! headers +! +#include +! module real_time ! use drivers, ONLY:l_elel_scatt,l_elph_scatt,l_elphoton_scatt,l_phel_scatt @@ -16,7 +20,9 @@ module real_time use RT_occupations, ONLY:RT_obj_occupation,RT_obj_occupation_alloc,RT_obj_occupation_free use electrons, ONLY:E_fine_grid ! -#include + USE_MEMORY + ! + implicit none ! ! CORE LOGICALS ! diff --git a/src/Ymodules/mod_wave_func.F b/src/Ymodules/mod_wave_func.F index d7eca59c88..e64a8e53c1 100644 --- a/src/Ymodules/mod_wave_func.F +++ b/src/Ymodules/mod_wave_func.F @@ -5,14 +5,20 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +#include +! module wave_func ! use pars, ONLY:SP use devxlib, ONLY:devxlib_mapped use gpu_m, ONLY:have_gpu ! -#include -#include + USE_MEMORY + ! + implicit none ! type WAVEs integer :: b(2) ! band range diff --git a/src/Ymodules/mod_wrapper.F b/src/Ymodules/mod_wrapper.F index 0791e86e98..064dcb37a0 100644 --- a/src/Ymodules/mod_wrapper.F +++ b/src/Ymodules/mod_wrapper.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): CA AF ! +! headers +! #include ! +! module wrapper ! ! To remember: diff --git a/src/acfdt/acfdt_tot_energy.F b/src/acfdt/acfdt_tot_energy.F index 17d9cef4f5..68330d9a02 100644 --- a/src/acfdt/acfdt_tot_energy.F +++ b/src/acfdt/acfdt_tot_energy.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine acfdt_tot_energy(Xen,Xk,En,k,q,X,Dip) ! use pars, ONLY:SP,schlen,pi,DP @@ -32,7 +36,9 @@ subroutine acfdt_tot_energy(Xen,Xk,En,k,q,X,Dip) & XC_LDA_X,XC_CORRELATION,XC_potential_driver use global_XC, ONLY:WF_xc_functional ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Xen,En type(bz_samp) ::Xk,q,k diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index 27bb436030..1143f2c38b 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) ! use pars, ONLY:rZERO,cZERO,schlen @@ -19,7 +23,9 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) use parallel_m, ONLY:PAR_nQ_bz use stderr, ONLY:STRING_split ! -#include + USE_MEMORY + ! + implicit none ! character(*) ::what type(GKKP_me), optional ::GKKP diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F index a63de64f40..23ec8f4c48 100644 --- a/src/allocations/MPA_ALLOC_parallel.F +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MB, AF ! +! headers +! +#include +! subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! use pars, ONLY:SP,DP,cZERO,cONE,cI @@ -12,7 +16,9 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) use parallel_int, ONLY:PARALLEL_live_message use gpu_m, ONLY:have_gpu ! -#include + USE_MEMORY + ! + implicit none ! type(PAR_matrix) :: MPA_E_par,MPA_R_par integer :: NG,NW diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 993978d8d9..717e3da951 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! subroutine X_ALLOC_elemental(WHAT,DIM) ! @@ -16,7 +20,9 @@ subroutine X_ALLOC_elemental(WHAT,DIM) use PHOTOLUM, ONLY:PL use stderr, ONLY:STRING_match ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: WHAT integer, optional :: DIM(:) diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index 8ff0b16975..ccd6ab7650 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine X_ALLOC_global(WHAT,W) ! use pars, ONLY:cZERO @@ -15,7 +19,9 @@ subroutine X_ALLOC_global(WHAT,W) use BS_solvers, ONLY:B_Hall use PHOTOLUM, ONLY:PL,PL_init ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: WHAT type(w_samp) :: W diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index efc9ebe8a8..02564729ef 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! subroutine X_ALLOC_parallel(X_par,NG,NW,mode) ! use pars, ONLY:cZERO @@ -16,8 +21,9 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_memset_d ! -#include -#include + USE_MEMORY + ! + implicit none ! type(PAR_matrix) :: X_par integer :: NG,NW diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index a9fa0d7756..e97fa3e614 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM MG DS ! +! headers +! #include +#include +! ! subroutine BS_exchange_oscillators_alloc(iG) use BS, ONLY:BS_T_grp,BS_n_g_exch use gpu_m, ONLY:have_gpu -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iG if (BS_T_grp(iG)%size==0) return !DEV_ACC enter data copyin(BS_T_grp(iG)) @@ -23,7 +29,9 @@ end subroutine BS_exchange_oscillators_alloc subroutine BS_correlation_oscillators_alloc(iB) use BS, ONLY:BS_blk,O_ng use gpu_m, ONLY:have_gpu -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iB if (BS_blk(iB)%N_oscillators==0) return !DEV_ACC enter data copyin(BS_blk(iB)) @@ -35,7 +43,9 @@ end subroutine BS_correlation_oscillators_alloc ! subroutine BS_exchange_oscillators_free(iG_ref) use BS, ONLY:BS_T_grp -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iG_ref integer :: iG do iG=iG_ref,1,-1 @@ -47,7 +57,9 @@ end subroutine BS_exchange_oscillators_free ! subroutine BS_correlation_oscillators_free(iB_ref,l_std_alg) use BS, ONLY:BS_T_grp,l_BSE_minimize_memory,BS_blk,n_BS_blks -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iB_ref logical, intent(in) :: l_std_alg integer :: iB,ik_loop,ip_loop,ik_now,ip_now @@ -76,7 +88,9 @@ subroutine TDDFT_oscillators_alloc_L(iGL) use electrons, ONLY:n_spin,n_spinor use BS, ONLY:BS_T_grp,BS_n_g_fxc use gpu_m, ONLY:have_gpu -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iGL if (BS_T_grp(iGL)%size>0) then !DEV_ACC enter data copyin(BS_T_grp(iGL)) @@ -91,7 +105,9 @@ subroutine TDDFT_oscillators_alloc_R(iGR) use electrons, ONLY:n_spin,n_spinor use BS, ONLY:BS_T_grp,BS_n_g_fxc use gpu_m, ONLY:have_gpu -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iGR if (BS_T_grp(iGR)%size>0) then !DEV_ACC enter data copyin(BS_T_grp(iGR)) @@ -104,7 +120,9 @@ end subroutine TDDFT_oscillators_alloc_R ! subroutine TDDFT_oscillators_free_L(iG_ref) use BS, ONLY:BS_T_grp -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iG_ref integer :: iGL do iGL=iG_ref,1,-1 @@ -116,7 +134,9 @@ end subroutine TDDFT_oscillators_free_L ! subroutine TDDFT_oscillators_free_R(iG_ref) use BS, ONLY:BS_T_grp -#include + USE_MEMORY + ! + implicit none integer, intent(in) :: iG_ref integer :: iGR do iGR=iG_ref,1,-1 diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 1e44f741f9..140fff4448 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG DS IMA ! +! headers +! +#include +! subroutine K_Haydock(iq,W,OBS,Xk) ! use pars, ONLY:SP,schlen,cI,cZERO,cONE @@ -31,7 +35,9 @@ subroutine K_Haydock(iq,W,OBS,Xk) use descriptors, ONLY:IO_desc_add use R_lattice, ONLY:bz_samp ! -#include + USE_MEMORY + ! + implicit none ! type(w_samp), intent(in) :: W integer, intent(in) :: iq diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index d424a93297..1bc8c9c5c1 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM IMA ! +! headers +! +#include +! subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! use pars, ONLY:SP,IP,pi,cZERO,cONE,cI @@ -33,7 +37,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) use PHOTOLUM, ONLY:PL,PL_prefactor,PL_weights use units, ONLY:SPEED_OF_LIGHT ! -#include + USE_MEMORY + ! + implicit none ! integer ::iq type(levels) ::Ken diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index e67771a6d3..aff4471da1 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! use pars, ONLY:SP,cZERO @@ -15,7 +19,9 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) use units, ONLY:HA2EV use parallel_int, ONLY:PP_redux_wait ! -#include + USE_MEMORY + ! + implicit none ! character(*) ::what integer ::I,N,Indexes(5),vI(BS_H_dim,5) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index b4651a6a20..d244dc8664 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS IMA ! +! headers +! +#include +! subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! ! Filling of Transition groups @@ -39,7 +43,9 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) use RT_control, ONLY:EQ_Transitions,EQ_NoOcc #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: Ken type(bz_samp), intent(in) :: Xk @@ -246,7 +252,9 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) use RT_control, ONLY:EQ_Transitions,EQ_NoOcc #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: Ken type(bz_samp), intent(in) :: Xk diff --git a/src/bse/K_WF_phases.F b/src/bse/K_WF_phases.F index 852a0c3f2d..531199c355 100644 --- a/src/bse/K_WF_phases.F +++ b/src/bse/K_WF_phases.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine K_WF_phases(Xk) ! ! This routine evaluates the WF phases needed to evaluate the correlation @@ -36,7 +40,9 @@ subroutine K_WF_phases(Xk) use interfaces, ONLY:WF_apply_symm use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index 62b1463bf6..40ff74e585 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM HM DS ! +! headers +! +#include +! subroutine K_blocks( ) ! ! Create and Fill the BSK blocks @@ -27,7 +31,9 @@ subroutine K_blocks( ) & BS_n_eh_spaces,BS_res_ares_n_mat,BS_IO_dim,l_BS_ares_from_res use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none ! ! YAMBO_PAR_ALLOC ! diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index be34479077..6a9565b8e9 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -4,6 +4,11 @@ ! Copyright (C) 2022 The Yambo Team ! ! Authors (see AUTHORS file for details): AM, DS +! +! headers +! +#include +#include ! subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! @@ -21,8 +26,9 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing ! -#include -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: iq,i_block,qindx_ID_frag type(bz_samp), intent(in) :: Xk,q diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index 9aa18494dc..03dd1ad3ba 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS HM ! +! headers +! +#include +#include +! !************************* WARNING ************************** !* In this subroutine there is a bug for finite q (iq/=1) * !* plus spin-orbit that we were not able to solve yet. * @@ -43,8 +48,9 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing ! -#include -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: iq,i_block,qindx_ID_frag type(bz_samp), intent(in) :: Xk,q diff --git a/src/bse/K_correlation_kernel_dir.F b/src/bse/K_correlation_kernel_dir.F index b800ca05ed..121a010648 100644 --- a/src/bse/K_correlation_kernel_dir.F +++ b/src/bse/K_correlation_kernel_dir.F @@ -5,7 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! #include +! ! function K_correlation_kernel_dir(i_block,i_p,i_pmq, & & i_k_s,i_p_s,i_n_k,i_n_p,i_kmq_s,i_pmq_s,i_m_k,i_m_p, & diff --git a/src/bse/K_correlation_kernel_std.F b/src/bse/K_correlation_kernel_std.F index d2112874e5..b720e257d9 100644 --- a/src/bse/K_correlation_kernel_std.F +++ b/src/bse/K_correlation_kernel_std.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM, DS ! +! headers +! +#include +#include +! !************************* WARNING ************************** !* In this subroutine there is a bug for finite q (iq/=1) * !* plus spin-orbit that we were not able to solve yet. * @@ -14,7 +19,6 @@ !* iq/=1 and spin_orbit is present. * !************************************************************ ! -#include ! function K_correlation_kernel_std(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_n_k,i_n_p,i_kmq_s,i_kp_mq_s,i_m_k,i_m_p, & @@ -29,7 +33,9 @@ function K_correlation_kernel_std(i_block,i_p,i_pmq, use wrapper, ONLY:V_by_V_pwise_gpu,Vstar_dot_V_gpu use devxlib, ONLY:devxlib_conjg,devxlib_xgemv_gpu ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_n_k,i_n_p,i_kmq_s,i_kp_mq_s,i_m_k,i_m_p, & diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 5c18e1db31..fefafc6c7c 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -7,6 +7,8 @@ ! ! headers ! +#include +! #if defined _SLEPC && !defined _NL #include #include @@ -53,7 +55,9 @@ subroutine K_diago_driver(iq,W,X_static) use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free ! -#include + USE_MEMORY + ! + implicit none ! type(w_samp) :: W integer :: iq diff --git a/src/bse/K_diagonal.F b/src/bse/K_diagonal.F index 6ba26e2b30..ec5f38aa00 100644 --- a/src/bse/K_diagonal.F +++ b/src/bse/K_diagonal.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine K_diagonal(iq,what) ! use pars, ONLY:SP,cZERO,cI @@ -14,7 +18,9 @@ subroutine K_diagonal(iq,what) use SLK_m, ONLY:SLK_POOL use parallel_int, ONLY:PP_redux_wait ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: iq character(*) :: what diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index ce45a29113..9aa4aa1c68 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! use pars, ONLY:SP,IP,pi,cZERO,cI @@ -32,7 +36,9 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) use timing_m, ONLY:timing use vec_operate, ONLY:v_rotate,cross_product ! -#include + USE_MEMORY + ! + implicit none ! integer ::iq type(levels) ::Ken diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 044079890a..10fe1c4bb7 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM IMA ! +! headers +! +#include +! subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! use pars, ONLY:IP @@ -28,7 +32,9 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use vec_operate, ONLY:v_norm use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free,G_m_G_maxval,q0_def_norm ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Xen,Ken type(bz_samp) ::Xk,q diff --git a/src/bse/K_exchange_collisions.F b/src/bse/K_exchange_collisions.F index 18d23d6bce..60815a42b9 100644 --- a/src/bse/K_exchange_collisions.F +++ b/src/bse/K_exchange_collisions.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) ! use pars, ONLY:SP,cZERO @@ -22,7 +26,6 @@ subroutine K_exchange_collisions(iq,Xk,i_T_grp,NG,l_bs_exch_wf_in_loop) use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_memcpy_h2d,devxlib_memcpy_d2h,& & devxlib_conjg,devxlib_memset_d ! -#include ! implicit none ! diff --git a/src/bse/K_exchange_kernel.F b/src/bse/K_exchange_kernel.F index fd7ab4d4ea..626381412a 100644 --- a/src/bse/K_exchange_kernel.F +++ b/src/bse/K_exchange_kernel.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): AF DS ! +! headers +! #include ! +! function K_exchange_kernel_resonant(iq, BS_n_g_exch, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) !============================== ! diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index a0e9eecb05..44da877112 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) ! use pars, ONLY:SP,cZERO,cI,pi,rZERO,schlen @@ -29,7 +33,9 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) use BS, ONLY:l_BS_photolum use PHOTOLUM, ONLY:BSS_PL_f,BSS_dipoles_PL,PL,PL_prefactor ! -#include + USE_MEMORY + ! + implicit none ! type(w_samp), intent(inout) :: W type(levels), intent(in) :: E diff --git a/src/bse/K_inversion_driver.F b/src/bse/K_inversion_driver.F index 531ad70426..95ca4560c9 100644 --- a/src/bse/K_inversion_driver.F +++ b/src/bse/K_inversion_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine K_inversion_driver(iq,W,E,k,q) ! use pars, ONLY:SP @@ -35,7 +39,9 @@ subroutine K_inversion_driver(iq,W,E,k,q) use descriptors, ONLY:IO_desc_add use PHOTOLUM, ONLY:BSS_PL_free,PL ! -#include + USE_MEMORY + ! + implicit none ! type(w_samp) :: W integer :: iq diff --git a/src/bse/K_inversion_engine.F b/src/bse/K_inversion_engine.F index 9fb2bed2dc..379a2968a4 100644 --- a/src/bse/K_inversion_engine.F +++ b/src/bse/K_inversion_engine.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,Lo_n_loop,do_it_full) ! use pars, ONLY:SP,cZERO @@ -18,7 +22,9 @@ subroutine K_inversion_engine(what,iw_2start,iw_2do,iq,px,W,Lo,Lo_dim,Lo_n_loop, use BS_solvers, ONLY:Co_factor,K_INV_EPS,BSS_dipoles_opt,Co_factor,K_inv_slk,K_slk,K_INV_PL use PHOTOLUM, ONLY:PL,PL_prefactor,BSS_dipoles_PL ! -#include + USE_MEMORY + ! + implicit none ! character(3) :: what integer :: iw_2start,iw_2do,iq,Lo_dim,Lo_n_loop diff --git a/src/bse/K_inversion_restart.F b/src/bse/K_inversion_restart.F index 0186dcaee8..e018b12539 100644 --- a/src/bse/K_inversion_restart.F +++ b/src/bse/K_inversion_restart.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine K_inversion_restart(iq,W) ! use pars, ONLY:SP,cZERO @@ -20,7 +24,9 @@ subroutine K_inversion_restart(iq,W) use BS_solvers, ONLY:K_INV_PL use PHOTOLUM, ONLY:PL ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(inout) :: iq type(w_samp) ,intent(inout) :: W diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 1f5bbe5060..6a89014ee3 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS AF ! +! headers +! +#include +#include +! subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! K = <2V-W> for n_spin=1; K= for n_spin>1 @@ -51,8 +56,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use PHOTOLUM, ONLY:BSS_PL_free use parser_m, ONLY:parser ! -#include -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Ken type(bz_samp) ::Xk,q diff --git a/src/bse/K_multiply_by_V_slepc.F b/src/bse/K_multiply_by_V_slepc.F index 53b5f8b436..87b5b1fb65 100644 --- a/src/bse/K_multiply_by_V_slepc.F +++ b/src/bse/K_multiply_by_V_slepc.F @@ -5,6 +5,14 @@ ! ! Authors (see AUTHORS file for details): HM DS IMA ! +! headers +! +#include +#include +#include +#include +#include +! subroutine K_multiply_by_V_slepc(slepc_mat,vi,vo,ierr) ! ! Interface with the K_multiply_by_V from the Haydock method @@ -15,12 +23,6 @@ subroutine K_multiply_by_V_slepc(slepc_mat,vi,vo,ierr) use BS, ONLY : BS_T_grp,BS_nT_grps,BS_K_dim use parallel_m, ONLY : PAR_IND_T_Haydock ! -#include -#include -#include -#include -#include -#include ! use petscmat use slepcsys diff --git a/src/bse/K_multiply_by_V_transpose_slepc.F b/src/bse/K_multiply_by_V_transpose_slepc.F index f5ca11cd29..b86e06f33e 100644 --- a/src/bse/K_multiply_by_V_transpose_slepc.F +++ b/src/bse/K_multiply_by_V_transpose_slepc.F @@ -5,6 +5,14 @@ ! ! Authors (see AUTHORS file for details): HM DS IMA ! +! headers +! +#include +#include +#include +#include +#include +! subroutine K_multiply_by_V_transpose_slepc(slepc_mat,vi,vo,ierr) ! ! Interface with the K_multiply_by_V from the Haydock method @@ -15,12 +23,6 @@ subroutine K_multiply_by_V_transpose_slepc(slepc_mat,vi,vo,ierr) use BS, ONLY : BS_T_grp,BS_nT_grps,BS_K_dim use parallel_m, ONLY : PAR_IND_T_Haydock ! -#include -#include -#include -#include -#include -#include ! use petscmat use slepcsys diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index 7090f02575..b35602d4d3 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! #include +#include +! ! subroutine K_screened_interaction(X,Xw,q,io_X_err) ! @@ -26,7 +30,9 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_memcpy_h2d,devxlib_memcpy_d2h use gpu_m, ONLY:have_gpu ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::q type(X_t) ::X diff --git a/src/bse/K_shell_matrix.F b/src/bse/K_shell_matrix.F index 3353b48931..9f0ae9c7c6 100644 --- a/src/bse/K_shell_matrix.F +++ b/src/bse/K_shell_matrix.F @@ -5,6 +5,15 @@ ! ! Authors (see AUTHORS file for details): HM IMA ! +! headers +! +#include +#include +#include +#include +#include +#include +! subroutine K_shell_matrix(i_BS_mat,slepc_mat) ! ! Create a PETSC ShellMatrix and define the matrix-vector product @@ -19,19 +28,15 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) ! use BS_solvers, ONLY:Slepc_v,BS_HAYVEC_alloc ! -#include -#include -#include -#include -#include -#include ! use petscmat use slepceps use petscmatdef use slepcepsdef ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: i_BS_mat Mat, intent(out) :: slepc_mat diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 705e506fc8..90bc509d97 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM IMA ! +! headers +! +#include +! subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! use stderr, ONLY:intc @@ -23,7 +27,9 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use MAGNONS, ONLY:BSS_MAGN_free use DICHROISM, ONLY:BSS_DICH_free ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Ken type(bz_samp)::Xk,q diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 40b0664086..87ae58d1dc 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG DS ! +! headers +! +#include +! subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) ! ! Here I fill the kernel (coupling included) in an entire BIG matrix to be @@ -19,7 +23,9 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,iq,what) & BSS_eh_E,BSS_eh_W use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: i_BS_mat,iq character(*), intent(in) :: what diff --git a/src/bse/K_stored_in_a_nest_matrix.F b/src/bse/K_stored_in_a_nest_matrix.F index f0f6490e7c..bf1211b3a6 100644 --- a/src/bse/K_stored_in_a_nest_matrix.F +++ b/src/bse/K_stored_in_a_nest_matrix.F @@ -5,8 +5,15 @@ ! ! Authors (see AUTHORS file for details): BM ! -module shellmat_module +! headers +! #include +#include +#include +#include +#include +! +module shellmat_module use petscmat Mat::R,C end module shellmat_module @@ -37,12 +44,6 @@ subroutine K_stored_in_a_nest_matrix(i_BS_mat,slepc_mat) ! | R C | ! |-C^* -R^T| ! -#include -#include -#include -#include -#include -#include ! use pars, ONLY:cI,cONE use BS, ONLY:BS_K_dim,BS_H_dim,BS_blk,n_BS_blks diff --git a/src/bse/K_stored_in_a_slepc_matrix.F b/src/bse/K_stored_in_a_slepc_matrix.F index c7a445e989..a8a8add02f 100644 --- a/src/bse/K_stored_in_a_slepc_matrix.F +++ b/src/bse/K_stored_in_a_slepc_matrix.F @@ -5,6 +5,14 @@ ! ! Authors (see AUTHORS file for details): HM DS ! +! headers +! +#include +#include +#include +#include +#include +! subroutine K_stored_in_a_slepc_matrix(i_BS_mat,slepc_mat) ! ! Here I fill the kernel (coupling not yet included) in a slepc matrix to be @@ -20,12 +28,6 @@ subroutine K_stored_in_a_slepc_matrix(i_BS_mat,slepc_mat) use BS_solvers, ONLY:BSS_eh_E,BSS_eh_W,BSS_perturbative_width use gpu_m, ONLY:have_cuda ! -#include -#include -#include -#include -#include -#include ! use petscmat use slepceps diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 971cd4a298..18a719faac 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine bz_samp_indexes(en,k,Xk,q) ! ! ikbz=(ik,is) --<--:--<-- okbz=(ok,os) = (IK-Q) @@ -52,7 +56,9 @@ subroutine bz_samp_indexes(en,k,Xk,q) use ELPH, ONLY:elph_use_q_grid #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp)::k,Xk,q diff --git a/src/bz_ops/k_build_up_BZ_tables.F b/src/bz_ops/k_build_up_BZ_tables.F index 89bf37e520..f26e36a2ac 100644 --- a/src/bz_ops/k_build_up_BZ_tables.F +++ b/src/bz_ops/k_build_up_BZ_tables.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_build_up_BZ_tables(k) ! ! Output: @@ -19,7 +23,9 @@ subroutine k_build_up_BZ_tables(k) use D_lattice, ONLY:nsym use R_lattice, ONLY:rl_sop,bz_samp use zeros, ONLY:k_rlu_zero -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::k ! diff --git a/src/bz_ops/k_expand.F b/src/bz_ops/k_expand.F index 839fedee5b..721f3ed3b4 100644 --- a/src/bz_ops/k_expand.F +++ b/src/bz_ops/k_expand.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_expand(k) ! ! Outputs: @@ -49,7 +53,9 @@ subroutine k_expand(k) use D_lattice, ONLY:nsym use R_lattice, ONLY:rl_sop,bz_samp use zeros, ONLY:k_rlu_zero -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::k ! diff --git a/src/bz_ops/k_ibz2bz.F b/src/bz_ops/k_ibz2bz.F index 04dc73fd6d..f13818b9ed 100644 --- a/src/bz_ops/k_ibz2bz.F +++ b/src/bz_ops/k_ibz2bz.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine k_ibz2bz(k,units,FORCE_BZ) ! ! Output @@ -15,7 +19,9 @@ subroutine k_ibz2bz(k,units,FORCE_BZ) use vec_operate, ONLY:c2a,k2bz use R_lattice, ONLY:rl_sop,bz_samp ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::k character(1) ::units diff --git a/src/bz_ops/k_lattice.F b/src/bz_ops/k_lattice.F index 009ed247da..aa36540ce9 100644 --- a/src/bz_ops/k_lattice.F +++ b/src/bz_ops/k_lattice.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function k_lattice(k,Xk,G_shell,be_verbose) ! ! Output(s) @@ -22,7 +26,9 @@ integer function k_lattice(k,Xk,G_shell,be_verbose) use zeros, ONLY:k_rlu_zero use drivers, ONLY:l_rim_w ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::k,Xk integer ::G_shell diff --git a/src/bz_ops/k_map_nearest_by_dir.F b/src/bz_ops/k_map_nearest_by_dir.F index 28963c000b..db28ca65fa 100644 --- a/src/bz_ops/k_map_nearest_by_dir.F +++ b/src/bz_ops/k_map_nearest_by_dir.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! subroutine k_map_nearest_by_dir(Xk,k_map) ! ! Map k-points on a regular grid along the b directions @@ -14,7 +18,9 @@ subroutine k_map_nearest_by_dir(Xk,k_map) use com, ONLY:msg use pars, ONLY:zero_dfl ! -#include + USE_MEMORY + ! + implicit none ! type(bz_map), intent(inout) :: k_map type(bz_samp),intent(inout) :: Xk diff --git a/src/bz_ops/k_reduce.F b/src/bz_ops/k_reduce.F index d3e671fa36..683301444a 100644 --- a/src/bz_ops/k_reduce.F +++ b/src/bz_ops/k_reduce.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_reduce(k,FORCE_BZ) ! ! Input: @@ -22,7 +26,9 @@ subroutine k_reduce(k,FORCE_BZ) use R_lattice, ONLY:b,rl_sop,bz_samp use zeros, ONLY:k_rlu_zero ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::k logical ::FORCE_BZ diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F index 12ede33754..abdc8ca0ff 100644 --- a/src/collisions/Build_LSEX_collisions.F +++ b/src/collisions/Build_LSEX_collisions.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): CA +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -31,7 +35,9 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) use QP_m, ONLY:QP_table,QP_nk,QP_n_states use R_lattice, ONLY:bz_samp,qindx_S ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: k,q integer, intent(in) :: i_qp diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index d0fce6c4fc..3c3b33b9c8 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! ! HXC collisions @@ -39,7 +43,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) use hamiltonian, ONLY:B_mat_index use fft_m, ONLY:fft_size ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::k,q,Xk diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index 889485323a..b17f04bd19 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! ! NEQ GW collisions @@ -31,7 +35,9 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) use D_lattice, ONLY:DL_vol use wrapper, ONLY:M_by_V ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::k,q,Xk diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index d7f3faf098..562acd086a 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! use pars, ONLY:cZERO,rZERO,DP,SP @@ -19,7 +23,9 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use collision_ext, ONLY:P_COLL_element #endif ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what,elements,actions integer :: I diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index 7c1468711a..8f036d410b 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine COLLISIONS_basic_operations( what, COLL ) ! ! Here I allocate and define some objects of the COLLISIONS_group kind. @@ -23,7 +27,9 @@ subroutine COLLISIONS_basic_operations( what, COLL ) use wave_func, ONLY:states_to_load use IO_m, ONLY:io_COLLs ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what type(COLLISIONS_group) :: COLL diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index 3999aeba6e..51c46aacbd 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! ! This subroutine works directly with collisions in single-precision ! if present ! @@ -14,7 +18,9 @@ subroutine COLLISIONS_compress(COLL) use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff use R_lattice, ONLY:nXkibz ! -#include + USE_MEMORY + ! + implicit none ! type(COLLISIONS_element), intent(inout) :: COLL ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 939ba28555..06bb96cdea 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! ! The EOM looks like: @@ -232,7 +236,6 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! subroutine CHECK_and_ALLOC(COLL) ! -#include ! ! Define io_COLLs_header to handle either serial or parallel I/O ! diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index 6a9c51171d..10650f82bc 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA AM ! +! headers +! +#include +! subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,COLL_ID,COMM) ! use pars, ONLY:SP,cZERO @@ -18,7 +22,6 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C ! implicit none ! -#include ! character(*) :: what integer, intent(in) :: i_coll,last_coll diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index a8976160a1..570f1b4d75 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) ! ! Load all collisions contribution from any kind of self-energy @@ -37,7 +41,6 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) #endif ! ! Define io_COLLs_header to handle either serial or parallel I/O -#include ! implicit none ! diff --git a/src/collisions/COLLISIONS_map_to_QP_table.F b/src/collisions/COLLISIONS_map_to_QP_table.F index fb00938725..810a2b2580 100644 --- a/src/collisions/COLLISIONS_map_to_QP_table.F +++ b/src/collisions/COLLISIONS_map_to_QP_table.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine COLLISIONS_map_to_QP_table(what,COLL) ! use collision_ext, ONLY:COLLISIONS_group,COLL_bands @@ -12,7 +16,9 @@ subroutine COLLISIONS_map_to_QP_table(what,COLL) use electrons, ONLY:n_sp_pol use R_lattice, ONLY:nXkibz ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what type(COLLISIONS_group), intent(inout) :: COLL diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index 172ee9a5ce..7aee62847b 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AC ! +! headers +! +#include +! subroutine LSEX_potential(q,X,Xw) ! ! Construct the screeend potential W(G=G'=0,q) @@ -28,7 +32,9 @@ subroutine LSEX_potential(q,X,Xw) use stderr, ONLY:intc use parallel_int, ONLY:PP_wait ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: q type(w_samp) :: Xw diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F index da9a126a6e..3047af8bc1 100644 --- a/src/collisions/OSCLL_eval.F +++ b/src/collisions/OSCLL_eval.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +#include +! !> @brief Calculate oscillators <\psi_k | exp[i*(q+G)] |\psi_{k+q} > for few G-vectors ! !! @param[out] OSCLL_k Oscillators for each k-point @@ -34,8 +39,9 @@ subroutine OSCLL_eval(q,k,en) use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,master_cpu,PAR_IND_G_b, & & PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX ! -#include -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: q,k type(levels), intent(in) :: en diff --git a/src/collisions/OSCLL_load.F b/src/collisions/OSCLL_load.F index 766a5add11..8d3a0a1076 100644 --- a/src/collisions/OSCLL_load.F +++ b/src/collisions/OSCLL_load.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): CA +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -34,7 +38,9 @@ subroutine OSCLL_load(q,k) use IO_int, ONLY:io_control,IO_and_Messaging_switch use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: q,k ! diff --git a/src/collisions/PLASMA_parallel_setup.F b/src/collisions/PLASMA_parallel_setup.F index ed943354af..dec741f6ec 100644 --- a/src/collisions/PLASMA_parallel_setup.F +++ b/src/collisions/PLASMA_parallel_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine PLASMA_parallel_setup(EH_gas) ! use parallel_m, ONLY:PAR_IND_Plasma,PAR_COM_PLASMA_INDEX,PAR_IND_PLASMA_ID,PAR_PLASMA_index,& @@ -12,7 +16,9 @@ subroutine PLASMA_parallel_setup(EH_gas) use parallel_int, ONLY:PARALLEL_live_message,PARALLEL_index use plasma, ONLY:plasma_gas ! -#include + USE_MEMORY + ! + implicit none ! type(plasma_gas) :: EH_gas ! diff --git a/src/collisions/PLASMA_tables_and_dimensions.F b/src/collisions/PLASMA_tables_and_dimensions.F index a95886934a..270ed0339c 100644 --- a/src/collisions/PLASMA_tables_and_dimensions.F +++ b/src/collisions/PLASMA_tables_and_dimensions.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! integer function PLASMA_tables_and_dimensions(iqbz,E,k,q,poles,N) ! use pars, ONLY:SP @@ -15,7 +19,9 @@ integer function PLASMA_tables_and_dimensions(iqbz,E,k,q,poles,N) use parallel_m, ONLY:PAR_nQ_bz,PAR_Q_bz_index,PAR_IND_Q_bz use collision_ext, ONLY:GW_NEQ_collisions ! -#include + USE_MEMORY + ! + implicit none ! integer :: iqbz,N type(levels) :: E diff --git a/src/common/FREQUENCIES_coarse_grid.F b/src/common/FREQUENCIES_coarse_grid.F index 0ce5af4c83..77b6d9cdb5 100644 --- a/src/common/FREQUENCIES_coarse_grid.F +++ b/src/common/FREQUENCIES_coarse_grid.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) ! ! Input @@ -32,7 +36,9 @@ subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) use frequency, ONLY:bare_grid_N,coarse_grid_N,coarse_grid_Pt,ordered_grid_index,coarse_grid_index use vec_operate, ONLY:sort ! -#include + USE_MEMORY + ! + implicit none ! character(*),intent(in) :: title integer,intent(in) :: npts diff --git a/src/common/FREQUENCIES_merge.F b/src/common/FREQUENCIES_merge.F index 74bc9862cb..bb901a05f9 100644 --- a/src/common/FREQUENCIES_merge.F +++ b/src/common/FREQUENCIES_merge.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine FREQUENCIES_merge(W1,W2,table) ! ! Merge W1 into W2 and create a table of the W1 points in the new merged type @@ -13,7 +17,9 @@ subroutine FREQUENCIES_merge(W1,W2,table) ! use pars, ONLY:SP,cZERO use frequency, ONLY:w_samp,W_reset -#include + USE_MEMORY + ! + implicit none ! type(w_samp), intent(in) :: W1 type(w_samp), intent(inout):: W2 diff --git a/src/common/FREQUENCIES_reset.F b/src/common/FREQUENCIES_reset.F index 8ce7936094..a26f90014b 100644 --- a/src/common/FREQUENCIES_reset.F +++ b/src/common/FREQUENCIES_reset.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine FREQUENCIES_reset(Xw,what) ! ! Input @@ -18,7 +22,9 @@ subroutine FREQUENCIES_reset(Xw,what) ! use frequency, ONLY:w_samp,bare_grid_N,coarse_grid_Pt,ordered_grid_index,coarse_grid_index use X_m, ONLY:X_poles_tab -#include + USE_MEMORY + ! + implicit none ! type(w_samp) :: Xw character(*) :: what diff --git a/src/common/FREQUENCIES_setup.F b/src/common/FREQUENCIES_setup.F index 8b877b32a2..6c8588ce99 100644 --- a/src/common/FREQUENCIES_setup.F +++ b/src/common/FREQUENCIES_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine FREQUENCIES_setup(W) ! ! %er %dr %n_freqs -> %p @@ -12,7 +16,9 @@ subroutine FREQUENCIES_setup(W) use pars, ONLY:SP,cI use frequency, ONLY:w_samp use parser_m, ONLY:parser -#include + USE_MEMORY + ! + implicit none ! type(w_samp):: W ! diff --git a/src/common/G_rot_grid.F b/src/common/G_rot_grid.F index 6cb176d914..5eca9d02ef 100644 --- a/src/common/G_rot_grid.F +++ b/src/common/G_rot_grid.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine G_rot_grid(is,call_kind) ! use pars, ONLY:SP @@ -12,7 +16,9 @@ subroutine G_rot_grid(is,call_kind) use D_lattice, ONLY:dl_sop,alat use zeros, ONLY:G_iku_zero use vec_operate, ONLY:v_is_zero -#include + USE_MEMORY + ! + implicit none ! integer :: is character(*) :: call_kind diff --git a/src/common/OCCUPATIONS_Extend.F b/src/common/OCCUPATIONS_Extend.F index 631a5f1e98..a8bf2da09a 100644 --- a/src/common/OCCUPATIONS_Extend.F +++ b/src/common/OCCUPATIONS_Extend.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine OCCUPATIONS_Extend(Xe,E,k) ! ! The occupation of E levels are decided using the Fermi "Levels" of Xe. @@ -21,7 +25,9 @@ subroutine OCCUPATIONS_Extend(Xe,E,k) use R_lattice, ONLY:bz_samp use interfaces, ONLY:OCCUPATIONS_Gaps ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Xe,E type(bz_samp) ::k diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index bc1d6836c5..c39af1e66e 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! ! Mode = "FERMI" @@ -32,7 +36,9 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) use SC, ONLY:SC_neq_kind,SC_mu,SC_occ #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::K diff --git a/src/common/QP_state_print.F b/src/common/QP_state_print.F index d15a6134a0..d4ea37afde 100644 --- a/src/common/QP_state_print.F +++ b/src/common/QP_state_print.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_state_print(qp) ! ! Print the contents of the QP_state logical array @@ -15,7 +19,9 @@ subroutine QP_state_print(qp) use stderr, ONLY:intc use descriptors, ONLY:IO_desc_add ! -#include + USE_MEMORY + ! + implicit none ! type(QP_t), optional :: qp ! diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index b43b72e21d..e7d5a451c7 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AMAFDS ! +! headers +! #include +#include +! ! integer function eval_G_minus_G(iG,iGo,COMM) ! @@ -24,7 +28,9 @@ integer function eval_G_minus_G(iG,iGo,COMM) use gpu_m, ONLY:have_gpu use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer :: iG,iGo type(yMPI_comm), optional :: COMM diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 67aa43997c..7f75588947 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG AF ! +! headers +! +#include +! subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) ! ! The gradient of a periodic function f(r): @@ -23,7 +27,9 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) use R_lattice, ONLY:g_vec,ng_vec use wave_func, ONLY:wf_ng ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) ::spinor_size complex(SP), intent(in) ::f(fft_size,spinor_size) diff --git a/src/common/eval_Gradient_cpu.F b/src/common/eval_Gradient_cpu.F index 67aa43997c..7f75588947 100644 --- a/src/common/eval_Gradient_cpu.F +++ b/src/common/eval_Gradient_cpu.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG AF ! +! headers +! +#include +! subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) ! ! The gradient of a periodic function f(r): @@ -23,7 +27,9 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) use R_lattice, ONLY:g_vec,ng_vec use wave_func, ONLY:wf_ng ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) ::spinor_size complex(SP), intent(in) ::f(fft_size,spinor_size) diff --git a/src/common/eval_Gradient_gpu.F b/src/common/eval_Gradient_gpu.F index a42e7ba02a..087cdb7024 100644 --- a/src/common/eval_Gradient_gpu.F +++ b/src/common/eval_Gradient_gpu.F @@ -4,6 +4,11 @@ ! ! Authors (see AUTHORS file for details): AM MG AF ! +! headers +! +#include +#include +! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or ! modify it under the terms of the GNU General Public @@ -21,7 +26,6 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -#include ! subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) ! @@ -53,7 +57,9 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) #endif use timing_m ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: spinor_size complex(SP), intent(in) :: f(fft_size,spinor_size) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 3cb5c296dd..138dfefc78 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! ! DESCRIPTION : ! ! the variables generated/read in this series of rotuines are: @@ -24,7 +29,6 @@ ! 4 pi / |q+G|^2 = 2 pi DLVol NqBZ qpg(q,G) ! |q+G| = Sqrt[ 2 / ( DLVol NqBZ qpg(q,G)) ] ! -#include ! subroutine col_driver(bare_NG,q) ! @@ -47,7 +51,9 @@ subroutine col_driver(bare_NG,q) use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_WR_CL,REP,VERIFY ! -#include + USE_MEMORY + ! + implicit none ! integer :: bare_NG type(bz_samp) :: q diff --git a/src/coulomb/cutoff_box.F b/src/coulomb/cutoff_box.F index 0663b02305..fedf43f4bf 100644 --- a/src/coulomb/cutoff_box.F +++ b/src/coulomb/cutoff_box.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine cutoff_box(q,is_cut) ! ! Vc(q,G)=1/(Vdl Nq)\sum_{q' G'} V(q'+G') F(q'+G',q+G) [3D BOX] @@ -26,7 +30,9 @@ subroutine cutoff_box(q,is_cut) use zeros, ONLY:k_iku_zero,G_iku_zero use openmp, ONLY:OPENMP_update,n_threads,master_thread,OPENMP_set_threads ! -#include + USE_MEMORY + ! + implicit none ! logical ::is_cut(3) type(bz_samp)::q diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index b92893d967..4808a48bf0 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DV ! +! headers +! +#include +! subroutine cutoff_cylinder(q,is_cut) ! use pars, ONLY:SP,pi @@ -17,7 +21,9 @@ subroutine cutoff_cylinder(q,is_cut) use LIVE_t, ONLY:live_timing use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none type(bz_samp) ::q logical ::is_cut(3) ! diff --git a/src/coulomb/rim.F b/src/coulomb/rim.F index b958b4af11..f251d61a00 100644 --- a/src/coulomb/rim.F +++ b/src/coulomb/rim.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine rim(mode,Xw) ! use pars, ONLY:SP,pi,DP @@ -22,7 +26,9 @@ subroutine rim(mode,Xw) use timing_m, ONLY:timing use frequency, ONLY:w_samp ! -#include + USE_MEMORY + ! + implicit none ! character(1) :: mode type(w_samp) :: Xw diff --git a/src/dipoles/DIPOLE_build_covariants.F b/src/dipoles/DIPOLE_build_covariants.F index 7288c9af4b..d099069c7d 100644 --- a/src/dipoles/DIPOLE_build_covariants.F +++ b/src/dipoles/DIPOLE_build_covariants.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG CA DS ! +! headers +! +#include +! subroutine DIPOLE_build_covariants(Xen,Xk,Dip) ! ! Build the covariant dipole operator at zero field @@ -24,7 +28,9 @@ subroutine DIPOLE_build_covariants(Xen,Xk,Dip) use parser_m, ONLY:parser use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: Xen type(bz_samp), intent(inout) :: Xk diff --git a/src/dipoles/DIPOLE_kb_init.F b/src/dipoles/DIPOLE_kb_init.F index 500ae71bf3..4cb9ce34bf 100644 --- a/src/dipoles/DIPOLE_kb_init.F +++ b/src/dipoles/DIPOLE_kb_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine Dipole_kb_init(Xen,Dip,io_err,ID) ! use pars, ONLY:SP,pi @@ -18,7 +22,9 @@ subroutine Dipole_kb_init(Xen,Dip,io_err,ID) use pseudo, ONLY:pp_kbv_dim,pp_n_l_times_proj_max,pp_table, & & pp_factor,pp_n_l_max ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: Xen type(DIPOLE_t),intent(inout) :: Dip diff --git a/src/dipoles/DIPOLE_kb_sum.F b/src/dipoles/DIPOLE_kb_sum.F index d361e7c148..1628319890 100644 --- a/src/dipoles/DIPOLE_kb_sum.F +++ b/src/dipoles/DIPOLE_kb_sum.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS AF ! +! headers +! #include ! +! subroutine DIPOLE_kb_project(pp_range,ib_range,ib,i_wf,wf_ncx,nbndx,npp,pp_dim_yambo,WF,kbv,XX) ! use iso_c_binding, ONLY:c_f_pointer,c_loc @@ -74,7 +77,6 @@ subroutine DIPOLE_kb_sum(rho,pp_dim_yambo,ib_range,iv,ic,XX) use devxlib, ONLY:devxlib_memcpy_d2h use DIPOLES, ONLY:drho=>DEV_VAR(DIP_work_drho) ! -#include ! implicit none ! diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 9a3cdd3b90..672cdbcc08 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -4,12 +4,16 @@ ! Copyright (C) 2015 The Yambo Team ! ! Authors (see AUTHORS file for details): MG CA +! +! headers +! +#include +#include ! !> @brief Calculate overlaps between wave-function <\psi_k | \psi_{k+q} > for q = 1,2 ! !! @param[out] DIP_S Overlap matrices ! -#include ! subroutine DIPOLE_overlaps(Xk,Dip) ! @@ -30,7 +34,9 @@ subroutine DIPOLE_overlaps(Xk,Dip) use gpu_m, ONLY:have_gpu use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: Xk type(DIPOLE_t),intent(in) :: Dip diff --git a/src/dipoles/DIPOLE_p_matrix_elements.F b/src/dipoles/DIPOLE_p_matrix_elements.F index 686f23e9e6..80d8b32e32 100644 --- a/src/dipoles/DIPOLE_p_matrix_elements.F +++ b/src/dipoles/DIPOLE_p_matrix_elements.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! #include ! +! subroutine DIPOLE_p_matrix_elements(Xk,iv_wf,ic_wf,ik,rho,rho_spinor,P2,l_eval_P2) ! use pars, ONLY:SP,cZERO,pi diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 8af7d28970..e68433ccbb 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM CH DS ! +! headers +! #include ! +! subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! ! Using the wfc at the k,k-q points to construct diff --git a/src/dipoles/DIPOLE_transverse.F b/src/dipoles/DIPOLE_transverse.F index 40fe99a121..6d7e9864af 100644 --- a/src/dipoles/DIPOLE_transverse.F +++ b/src/dipoles/DIPOLE_transverse.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! #include +#include +! ! subroutine Dipole_transverse(Xen,Xk,Dip) ! @@ -33,7 +37,9 @@ subroutine Dipole_transverse(Xen,Xk,Dip) use gpu_m, ONLY:have_gpu, gpu_devsync use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memset_d ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: Xk type(levels), intent(in) :: Xen diff --git a/src/dipoles/DIPOLE_x_real_space.F b/src/dipoles/DIPOLE_x_real_space.F index fc3baa1cbe..72e3295272 100644 --- a/src/dipoles/DIPOLE_x_real_space.F +++ b/src/dipoles/DIPOLE_x_real_space.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine DIPOLE_x_real_space(Xen,Xk,Dip,idir_todo) ! use drivers, ONLY:l_sc_run @@ -23,7 +27,9 @@ subroutine DIPOLE_x_real_space(Xen,Xk,Dip,idir_todo) & PAR_IND_VAL_BANDS_DIP,PAR_IND_VAL_BANDS_DIP_ID,& & PAR_IND_CON_BANDS_DIP,PAR_IND_CON_BANDS_DIP_ID ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: Xk type(levels), intent(in) :: Xen diff --git a/src/el-ph/ELPH_Hamiltonian.F b/src/el-ph/ELPH_Hamiltonian.F index 9ab2fa241a..f2d29d9c37 100644 --- a/src/el-ph/ELPH_Hamiltonian.F +++ b/src/el-ph/ELPH_Hamiltonian.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_Hamiltonian(en,k,q) ! use pars, ONLY:SP,lchlen,rZERO @@ -26,7 +30,9 @@ subroutine ELPH_Hamiltonian(en,k,q) use QP_m, ONLY:QP_G_damp use parser_m, ONLY:parser ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp) ::k,q diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index d20a8e3685..658aed623f 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_Sigma_c(en,k,q,qp) ! ! This routine calculates the QP shifts due to el-ph intercation @@ -47,7 +51,9 @@ subroutine ELPH_Sigma_c(en,k,q,qp) use RT_control, ONLY:RT_apply #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp) ::k,q diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index ee354eb96e..5617e0a2c8 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA ! +! headers +! +#include +! !> @brief Calculate real and imaginary part of the electron-phonon self-energy !! !! @param[in] i_qp quasi-particle index @@ -35,7 +39,9 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en use D_lattice, ONLY:Tel use functions, ONLY:Fermi_fnc_derivative,Fermi_fnc ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: i_qp integer, intent(in) :: ob diff --git a/src/el-ph/ELPH_databases_grids_map.F b/src/el-ph/ELPH_databases_grids_map.F index 13599140a4..a028a360ff 100644 --- a/src/el-ph/ELPH_databases_grids_map.F +++ b/src/el-ph/ELPH_databases_grids_map.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_databases_grids_map(k,q) ! use drivers, ONLY:l_phel_corr @@ -15,7 +19,9 @@ subroutine ELPH_databases_grids_map(k,q) use vec_operate, ONLY:v_is_zero,rlu_v_is_zero,c2a use zeros, ONLY:k_rlu_zero ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k,q ! diff --git a/src/el-ph/ELPH_databases_load.F b/src/el-ph/ELPH_databases_load.F index 86c4679ba9..090164061b 100644 --- a/src/el-ph/ELPH_databases_load.F +++ b/src/el-ph/ELPH_databases_load.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM FP ! +! headers +! +#include +! subroutine ELPH_databases_load(GKKP_sq,E,k,q,n_bands,q_range,K_mode,SCATT_mode) ! ! mode can be combination of @@ -24,7 +28,9 @@ subroutine ELPH_databases_load(GKKP_sq,E,k,q,n_bands,q_range,K_mode,SCATT_mode) use parallel_m, ONLY:PAR_Q_bz_index,PAR_IND_Q_bz,PAR_nQ_bz,PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_IND_Xk_ibz,& & PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_INDEX,PARs_PH_Q_ibz,PARs_PH_Q_ibz ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: n_bands(2),q_range(2) type(levels), intent(in) :: E diff --git a/src/el-ph/En_k_plus_q_interpolate.F b/src/el-ph/En_k_plus_q_interpolate.F index 586938ef5a..443e436406 100644 --- a/src/el-ph/En_k_plus_q_interpolate.F +++ b/src/el-ph/En_k_plus_q_interpolate.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine En_k_plus_q_interpolate(k,q,E,iqbz) ! use pars, ONLY:pi,rZERO @@ -13,7 +17,9 @@ subroutine En_k_plus_q_interpolate(k,q,E,iqbz) use ELPH, ONLY:elph_nb,ID_E_kpq,GKKP,FineGd_E_kpq_alloc,Efermi_DbGd use interpolate, ONLY:INTERPOLATION_BZ ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: k,q type(levels) , intent(in) :: E diff --git a/src/el-ph/Eval_Efermi_DbGd.F b/src/el-ph/Eval_Efermi_DbGd.F index b2e5ee2fb0..7c4dad3075 100644 --- a/src/el-ph/Eval_Efermi_DbGd.F +++ b/src/el-ph/Eval_Efermi_DbGd.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AC ! +! headers +! +#include +! ! This subroutine calculate the occupation for the double-grid ! energy levels at en(k+q) using the Fermi level calculate ! on the original grid @@ -20,7 +24,9 @@ function Eval_Efermi_DbGd(k,q,en) use interfaces, ONLY:OCCUPATIONS_Fermi use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: q,k type(levels) :: en diff --git a/src/el-ph/get_ph_E_DbGd.F b/src/el-ph/get_ph_E_DbGd.F index 38d9cedd68..93cfbe9235 100644 --- a/src/el-ph/get_ph_E_DbGd.F +++ b/src/el-ph/get_ph_E_DbGd.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AC ! +! headers +! +#include +! !> @brief Return phonon energy in the double-grid ! ! @param[in] q momenutm sampling @@ -20,7 +24,9 @@ function get_ph_E_DbGd(il,iq_fg,iq_bz,q) use R_lattice, ONLY:bz_samp use ELPH, ONLY:PH_freqs,PH_freqs_sq ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: il,iq_bz,iq_fg type(bz_samp), intent(in) :: q diff --git a/src/gpu_test/GPU_test.F b/src/gpu_test/GPU_test.F index f697fc7581..be5957be6f 100644 --- a/src/gpu_test/GPU_test.F +++ b/src/gpu_test/GPU_test.F @@ -1,6 +1,5 @@ -#include subroutine GPU_test(N) use iso_c_binding diff --git a/src/gpu_test/saxpy_explicit.F b/src/gpu_test/saxpy_explicit.F index 78f798af06..b34061ec40 100644 --- a/src/gpu_test/saxpy_explicit.F +++ b/src/gpu_test/saxpy_explicit.F @@ -1,5 +1,4 @@ -#include !================================ subroutine saxpy_cpu(N, a, x, y) diff --git a/src/gpu_test_mod/mod_data.F b/src/gpu_test_mod/mod_data.F index 4c248f2ce3..bb4cff94d1 100644 --- a/src/gpu_test_mod/mod_data.F +++ b/src/gpu_test_mod/mod_data.F @@ -1,5 +1,4 @@ -#include !==================== module data_m diff --git a/src/gpu_test_mod/mod_dev_linalg.F b/src/gpu_test_mod/mod_dev_linalg.F index cdd249e5dd..93f6c34c2d 100644 --- a/src/gpu_test_mod/mod_dev_linalg.F +++ b/src/gpu_test_mod/mod_dev_linalg.F @@ -1,5 +1,4 @@ -#include !==================== module dev_linalg_m diff --git a/src/gpu_test_mod/mod_dev_memory.F b/src/gpu_test_mod/mod_dev_memory.F index 852f159fc0..7cbc42c855 100644 --- a/src/gpu_test_mod/mod_dev_memory.F +++ b/src/gpu_test_mod/mod_dev_memory.F @@ -1,5 +1,4 @@ -#include !==================== module dev_memory_m diff --git a/src/hamiltonian/Bare_Hamiltonian.F b/src/hamiltonian/Bare_Hamiltonian.F index bea95ad214..1e3f10a447 100644 --- a/src/hamiltonian/Bare_Hamiltonian.F +++ b/src/hamiltonian/Bare_Hamiltonian.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DV DS ! +! headers +! +#include +! subroutine Bare_Hamiltonian(E,Xk,k) ! use pars, ONLY:cZERO @@ -30,7 +34,9 @@ subroutine Bare_Hamiltonian(E,Xk,k) #if defined _SC use drivers, ONLY:l_sc_magnetic #endif -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: Xk,k diff --git a/src/hamiltonian/MAG_Hamiltonian.F b/src/hamiltonian/MAG_Hamiltonian.F index 17f0d2cfa2..46329ffbed 100644 --- a/src/hamiltonian/MAG_Hamiltonian.F +++ b/src/hamiltonian/MAG_Hamiltonian.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine MAG_Hamiltonian() ! ! WARNING: you need to put you system at the corner of the supercell <--- @@ -55,7 +59,9 @@ subroutine MAG_Hamiltonian() use parallel_m, ONLY:PAR_IND_QP,HEAD_QP_cpu use QP_m, ONLY:QP_table,QP_n_states ! -#include + USE_MEMORY + ! + implicit none ! ! Dummies ! diff --git a/src/hamiltonian/MAG_common_build_A.F b/src/hamiltonian/MAG_common_build_A.F index 7ab58c4d79..2beb2b2e7f 100644 --- a/src/hamiltonian/MAG_common_build_A.F +++ b/src/hamiltonian/MAG_common_build_A.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine MAG_common_build_A(build) ! ! @@ -41,7 +45,9 @@ subroutine MAG_common_build_A(build) & A_magn_x,A_magn_y,A_magn_z,gauge_factors, & & phase_trick,phase_radius,n_loops use vec_operate, ONLY:v_norm -#include + USE_MEMORY + ! + implicit none ! ! Input variables logical :: build diff --git a/src/hamiltonian/Pseudo_Hamiltonian.F b/src/hamiltonian/Pseudo_Hamiltonian.F index d9b5c165f7..eecd7f0337 100644 --- a/src/hamiltonian/Pseudo_Hamiltonian.F +++ b/src/hamiltonian/Pseudo_Hamiltonian.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine Pseudo_Hamiltonian(Xk,Xen,l_equilibrium) ! use pars, ONLY:SP,cZERO @@ -32,7 +36,9 @@ subroutine Pseudo_Hamiltonian(Xk,Xen,l_equilibrium) use real_time, ONLY:Ho_plus_sigma,H_pseudo_eq #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk type(levels) :: Xen diff --git a/src/hamiltonian/Pseudo_KB_FFT.F b/src/hamiltonian/Pseudo_KB_FFT.F index a67bbaabd2..5874de1348 100644 --- a/src/hamiltonian/Pseudo_KB_FFT.F +++ b/src/hamiltonian/Pseudo_KB_FFT.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine Pseudo_KB_FFT(kbv,kbv_real_space,kpt,pp_range,npp,i_atom,is,ia,ik) ! use drivers, ONLY:l_real_time,l_sc_magnetic @@ -14,7 +18,9 @@ subroutine Pseudo_KB_FFT(kbv,kbv_real_space,kpt,pp_range,npp,i_atom,is,ia,ik) use FFT_m, ONLY:fft_size,fft_dim,fft_g_table,fft_norm,fftw_plan use D_lattice, ONLY:atom_pos,x_cc,a,n_atoms ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: npp,pp_range(2),i_atom,is,ia,ik complex(SP), intent(in) :: kbv(wf_ncx,n_spinor,4,npp) diff --git a/src/hamiltonian/Pseudo_KB_G_to_R_space.F b/src/hamiltonian/Pseudo_KB_G_to_R_space.F index 4232aebc97..0dff793757 100644 --- a/src/hamiltonian/Pseudo_KB_G_to_R_space.F +++ b/src/hamiltonian/Pseudo_KB_G_to_R_space.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine Pseudo_KB_G_to_R_space(Xk,Xen) ! use pars, ONLY:SP @@ -23,7 +27,9 @@ subroutine Pseudo_KB_G_to_R_space(Xk,Xen) use parallel_int, ONLY:PP_wait use parallel_m, ONLY:master_cpu,PAR_IND_Xk_ibz_ID,PAR_IND_Xk_ibz ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk type(levels) :: Xen diff --git a/src/hamiltonian/Pseudo_KB_gauge_factor.F b/src/hamiltonian/Pseudo_KB_gauge_factor.F index e7a5953e61..421e2c966e 100644 --- a/src/hamiltonian/Pseudo_KB_gauge_factor.F +++ b/src/hamiltonian/Pseudo_KB_gauge_factor.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine Pseudo_KB_gauge_factor(gauge_factor) ! use pars, ONLY:SP @@ -21,7 +25,9 @@ subroutine Pseudo_KB_gauge_factor(gauge_factor) use fields, ONLY:A_tot #endif ! -#include + USE_MEMORY + ! + implicit none ! complex(SP) :: gauge_factor(fft_size,n_atoms) ! diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 32b29ebb15..60ec6a499d 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) ! ! INIT =-2 : Unsupported Runlevel(s) combination @@ -61,7 +65,9 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) use yaml_output, ONLY:yaml_close_stream #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp) ::q,k diff --git a/src/interface/INIT_DephMatrix.F b/src/interface/INIT_DephMatrix.F index 1c5e804982..be3075d20e 100644 --- a/src/interface/INIT_DephMatrix.F +++ b/src/interface/INIT_DephMatrix.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine INIT_DephMatrix() ! ! Dephasing Matrix -> input file @@ -13,7 +17,9 @@ subroutine INIT_DephMatrix() use parser_m, ONLY:PARSER_array use real_time, ONLY:RT_INPUT_Deph_limits ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/interface/INIT_QP.F b/src/interface/INIT_QP.F index 3bf4b4ed76..f6244cb281 100644 --- a/src/interface/INIT_QP.F +++ b/src/interface/INIT_QP.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine INIT_QP(comment) ! ! QP_state -> input file @@ -14,7 +18,9 @@ subroutine INIT_QP(comment) use parser_m, ONLY:PARSER_array use it_tools, ONLY:check_verbosity ! -#include + USE_MEMORY + ! + implicit none ! character(*) ::comment ! diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 759b1dfce1..0bd44f972d 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +#include +! subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,INIT,& & io_X_err,io_BS_err,io_BS_Fxc_err,io_QINDX_err,& & io_ELPH_err,io_SC_E_err) @@ -32,9 +37,10 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! ! Define io_COLLs_header to handle either serial or parallel I/O ! -#include ! -#include + USE_MEMORY + ! + implicit none ! type(X_t) :: X(5),Xbsk type(QP_t) :: qp diff --git a/src/interface/INIT_q_points.F b/src/interface/INIT_q_points.F index 1593ab87d5..3305042bb3 100644 --- a/src/interface/INIT_q_points.F +++ b/src/interface/INIT_q_points.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine INIT_q_points( ) ! ! This routine: @@ -22,7 +26,9 @@ subroutine INIT_q_points( ) #endif use parser_m, ONLY:PARSER_array ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/interpolate/INTERPOLATION_BZ.F b/src/interpolate/INTERPOLATION_BZ.F index 8333d183d2..0c684f39a5 100644 --- a/src/interpolate/INTERPOLATION_BZ.F +++ b/src/interpolate/INTERPOLATION_BZ.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine INTERPOLATION_BZ(K,NK,ID,R1D,R2D,C1D,C2D,E) use pars, ONLY:SP use R_lattice, ONLY:bz_samp @@ -12,7 +16,9 @@ subroutine INTERPOLATION_BZ(K,NK,ID,R1D,R2D,C1D,C2D,E) use interpolate, ONLY:interpls,REAL1D,REAL2D,CMPLX1D,CMPLX2D use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: K integer, intent(in) :: ID,NK diff --git a/src/interpolate/INTERPOLATION_BZ_coeff.F b/src/interpolate/INTERPOLATION_BZ_coeff.F index a32f6eb076..f5f9fce56c 100644 --- a/src/interpolate/INTERPOLATION_BZ_coeff.F +++ b/src/interpolate/INTERPOLATION_BZ_coeff.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS AM ! +! headers +! +#include +! subroutine INTERPOLATION_BZ_coeff(Xk,VALUEs,engre,nvalues,Nk,ID) ! ! Interpolation scheme (PRB 38 p2721) @@ -25,7 +29,9 @@ subroutine INTERPOLATION_BZ_coeff(Xk,VALUEs,engre,nvalues,Nk,ID) use parallel_m, ONLY:PP_indexes,PP_indexes_reset,myid,PAR_build_index,ncpu use parallel_int, ONLY:PP_redux_wait,PARALLEL_index ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: nvalues integer, intent(in) :: Nk,ID diff --git a/src/interpolate/INTERPOLATION_BZ_setup.F b/src/interpolate/INTERPOLATION_BZ_setup.F index db87409580..b578ddec0f 100644 --- a/src/interpolate/INTERPOLATION_BZ_setup.F +++ b/src/interpolate/INTERPOLATION_BZ_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine INTERPOLATION_BZ_setup(Xk) ! ! Code inspired by BolzTraP @@ -20,7 +24,9 @@ subroutine INTERPOLATION_BZ_setup(Xk) use matrix_operate, ONLY:m3inv use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk ! diff --git a/src/interpolate/INTERPOLATION_coefficients.F b/src/interpolate/INTERPOLATION_coefficients.F index 923190f820..d18dc4dcc3 100644 --- a/src/interpolate/INTERPOLATION_coefficients.F +++ b/src/interpolate/INTERPOLATION_coefficients.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS ! +! headers +! +#include +! subroutine INTERPOLATION_coefficients(R1D,R2D,C1D,C2D,E,k,Nk,ID,ID_obj) ! ! Notice that input/output k-points for the interpolation are in iku units @@ -17,7 +21,9 @@ subroutine INTERPOLATION_coefficients(R1D,R2D,C1D,C2D,E,k,Nk,ID,ID_obj) use interpolate, ONLY:interpls,REAL1D,REAL2D,CMPLX1D,CMPLX2D,nshells,INTERP_FineGd use interpolate_tools, ONLY:get_ID ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: k real(SP), intent(in), optional :: R1D(:,:),R2D(:,:,:) diff --git a/src/interpolate/INTERPOLATION_driver_do.F b/src/interpolate/INTERPOLATION_driver_do.F index 70236c3978..3a87cd4d8c 100644 --- a/src/interpolate/INTERPOLATION_driver_do.F +++ b/src/interpolate/INTERPOLATION_driver_do.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine INTERPOLATION_driver_do(operation,ID,OUT_k,OUT_E,FineGrid) ! ! INTREPOLATION_driver_do at present interpolates both to the Coarse grid and to the Fine grid @@ -28,7 +32,9 @@ subroutine INTERPOLATION_driver_do(operation,ID,OUT_k,OUT_E,FineGrid) & l_integral_respect,OUT_k_nk use IO_int, ONLY:IO_and_Messaging_switch ! -#include + USE_MEMORY + ! + implicit none ! character(*), intent(in) :: operation integer, intent(in) :: ID diff --git a/src/interpolate/INTERPOLATION_driver_end.F b/src/interpolate/INTERPOLATION_driver_end.F index 13d5d7ded8..ceda83fc28 100644 --- a/src/interpolate/INTERPOLATION_driver_end.F +++ b/src/interpolate/INTERPOLATION_driver_end.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine INTERPOLATION_driver_end(ID) ! use interpolate_tools, ONLY:INTERPOLATION_reset use interpolate, ONLY:INTERPOLATE_msg_fmt,INTERPOLATE_initialized,& & lattice_vectors,INTERP_obj,max_interpls,int_sop,NN_nk_exact ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID ! diff --git a/src/interpolate/INTERPOLATION_fourier.F b/src/interpolate/INTERPOLATION_fourier.F index 81a866ed0d..13049b3030 100644 --- a/src/interpolate/INTERPOLATION_fourier.F +++ b/src/interpolate/INTERPOLATION_fourier.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA AM ! +! headers +! +#include +! subroutine INTERPOLATION_fourier(K,VALUES,engre,nvalues,NK,ID) ! use pars, ONLY:SP,pi,cI,cZERO,DP,rZERO @@ -19,7 +23,9 @@ subroutine INTERPOLATION_fourier(K,VALUES,engre,nvalues,NK,ID) use parallel_m, ONLY:PP_indexes,PP_indexes_reset,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index ! -#include + USE_MEMORY + ! + implicit none ! integer,intent(in) :: nvalues integer,intent(in) :: NK,ID diff --git a/src/interpolate/INTERPOLATION_nearest_k.F b/src/interpolate/INTERPOLATION_nearest_k.F index a59e535ca1..c72d402c56 100644 --- a/src/interpolate/INTERPOLATION_nearest_k.F +++ b/src/interpolate/INTERPOLATION_nearest_k.F @@ -4,6 +4,10 @@ ! Copyright (C) 2018 The Yambo Team ! ! Authors (see AUTHORS file for details): DS AM +! +! headers +! +#include ! subroutine INTERPOLATION_nearest_k(K_in,V_in,K_out,V_out) ! @@ -14,7 +18,9 @@ subroutine INTERPOLATION_nearest_k(K_in,V_in,K_out,V_out) use parallel_m, ONLY:PP_indexes,PP_indexes_reset,ncpu,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index ! -#include + USE_MEMORY + ! + implicit none ! real(SP) :: K_in(:,:) real(SP) :: K_out(:,:) diff --git a/src/io/io_ATMPROJ_pwscf.F b/src/io/io_ATMPROJ_pwscf.F index 1648e0e11f..10acb26167 100644 --- a/src/io/io_ATMPROJ_pwscf.F +++ b/src/io/io_ATMPROJ_pwscf.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! integer function io_ATMPROJ_pwscf(ID) ! use atom_proj @@ -18,7 +22,9 @@ integer function io_ATMPROJ_pwscf(ID) & io_header,io_fragment use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer,intent(in) :: ID ! diff --git a/src/io/io_BSS_invert.F b/src/io/io_BSS_invert.F index ed43a86228..bcc1239cea 100644 --- a/src/io/io_BSS_invert.F +++ b/src/io/io_BSS_invert.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_BSS_invert(iq,W,ID) ! use units, ONLY:HA2EV @@ -15,7 +19,9 @@ integer function io_BSS_invert(iq,W,ID) use IO_m, ONLY:io_sec,io_status,read_is_on use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none integer :: iq type(w_samp) :: W ! diff --git a/src/io/io_BS_Fxc.F b/src/io/io_BS_Fxc.F index c270e3421f..95d02e7da6 100644 --- a/src/io/io_BS_Fxc.F +++ b/src/io/io_BS_Fxc.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_BS_Fxc(iq,FXC_W,ID,X) ! use pars, ONLY:schlen,IP,IP_YIO @@ -22,7 +26,9 @@ integer function io_BS_Fxc(iq,FXC_W,ID,X) & io_elemental,def_variable_elemental,io_variable_elemental,& & io_bulk,io_header use descriptors, ONLY:IO_desc,IO_desc_duplicate,IO_desc_reset -#include + USE_MEMORY + ! + implicit none type(w_samp) ::FXC_W integer ::ID,iq type(X_t), optional ::X diff --git a/src/io/io_COL_CUT.F b/src/io/io_COL_CUT.F index c1e1933587..47160889d5 100644 --- a/src/io/io_COL_CUT.F +++ b/src/io/io_COL_CUT.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_COL_CUT(ID) ! use wave_func, ONLY:wf_ng,cutoff_ng @@ -14,7 +18,9 @@ integer function io_COL_CUT(ID) use IO_m, ONLY:io_sec,io_status use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: ID ! diff --git a/src/io/io_DB1.F b/src/io/io_DB1.F index 572bb79c85..80df91e2f4 100644 --- a/src/io/io_DB1.F +++ b/src/io/io_DB1.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! integer function io_DB1(E,k,ID) ! @@ -44,7 +48,9 @@ integer function io_DB1(E,k,ID) use real_time, ONLY:RT_bands #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: k diff --git a/src/io/io_DB1_selective_scan.F b/src/io/io_DB1_selective_scan.F index f325fb5400..6d60aace68 100644 --- a/src/io/io_DB1_selective_scan.F +++ b/src/io/io_DB1_selective_scan.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! integer function io_DB1_selective_scan(what,DB1_path,E,k,db1_alat,db1_a,COM_mode) ! @@ -23,7 +27,9 @@ integer function io_DB1_selective_scan(what,DB1_path,E,k,db1_alat,db1_a,COM_mode use IO_m, ONLY:OP_RD_CL,NONE,DUMP use IO_int, ONLY:io_control,io_connect,io_disconnect,io_elemental,io_bulk ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: k diff --git a/src/io/io_Double_Grid.F b/src/io/io_Double_Grid.F index 26b6d4a3d7..5749d96f18 100644 --- a/src/io/io_Double_Grid.F +++ b/src/io/io_Double_Grid.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_Double_Grid(E,Xk,ID,what) ! use pars, ONLY:schlen,IP_YIO,CR_YIO @@ -20,7 +24,9 @@ integer function io_Double_Grid(E,Xk,ID,what) use ELPH, ONLY:EkplusQ_mode #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp):: Xk diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index 78787c7507..fe5899efe5 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AC ! +! headers +! +#include +! integer function io_ELPH(ID,what) ! use pars, ONLY:schlen @@ -19,7 +23,9 @@ integer function io_ELPH(ID,what) use D_lattice, ONLY:n_atoms use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer ::ID character(*) ::what diff --git a/src/io/io_E_SOC_map.F b/src/io/io_E_SOC_map.F index a911870cca..81e7de7ff9 100644 --- a/src/io/io_E_SOC_map.F +++ b/src/io/io_E_SOC_map.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! integer function io_E_SOC_map(En,kpt,ID) ! use electrons, ONLY:levels @@ -12,7 +16,9 @@ integer function io_E_SOC_map(En,kpt,ID) use IO_m, ONLY:read_is_on,write_is_on,file_is_present use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: En type(bz_samp):: kpt diff --git a/src/io/io_GROT.F b/src/io/io_GROT.F index 43ee06c9a0..315b856393 100644 --- a/src/io/io_GROT.F +++ b/src/io/io_GROT.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! integer function io_GROT(io_db) ! @@ -17,7 +21,9 @@ integer function io_GROT(io_db) & io_bulk,io_header,ver_is_gt_or_eq use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer :: io_db,nsym_db ! diff --git a/src/io/io_HF_and_locXC.F b/src/io/io_HF_and_locXC.F index 5d64da9292..8ededd4bc5 100644 --- a/src/io/io_HF_and_locXC.F +++ b/src/io/io_HF_and_locXC.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_HF_and_locXC(ID) ! use pars, ONLY:SP,schlen @@ -18,7 +22,9 @@ integer function io_HF_and_locXC(ID) use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk,& & ver_is_gt_or_eq use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none integer :: ID ! ! Work Space diff --git a/src/io/io_KB_abinit.F b/src/io/io_KB_abinit.F index 4c1514f794..798605c3d6 100644 --- a/src/io/io_KB_abinit.F +++ b/src/io/io_KB_abinit.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_KB_abinit(ID) ! use pars, ONLY:SP @@ -19,7 +23,9 @@ integer function io_KB_abinit(ID) use IO_int, ONLY:io_connect,io_disconnect,io_fragment, & & io_elemental,io_bulk,io_header,ver_is_gt_or_eq use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID ! diff --git a/src/io/io_KB_pwscf.F b/src/io/io_KB_pwscf.F index 3024548612..db8d288a93 100644 --- a/src/io/io_KB_pwscf.F +++ b/src/io/io_KB_pwscf.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! integer function io_KB_pwscf(ID) ! use pars, ONLY:SP @@ -20,7 +24,9 @@ integer function io_KB_pwscf(ID) & PP_alloc_pwscf use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer,intent(in) :: ID ! diff --git a/src/io/io_KB_real_space.F b/src/io/io_KB_real_space.F index c21bc22c81..c098547edb 100644 --- a/src/io/io_KB_real_space.F +++ b/src/io/io_KB_real_space.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_KB_real_space(ID,kbv_real_space,kbv_real_space_table) ! use pars, ONLY:SP @@ -17,7 +21,9 @@ integer function io_KB_real_space(ID,kbv_real_space,kbv_real_space_table) use IO_int, ONLY:io_connect,io_disconnect,io_fragment, & & io_elemental,io_bulk,io_header ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID integer, intent(inout) :: kbv_real_space_table(pp_kbv_dim_yambo) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 1836a41c3e..7ef39b401a 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DALV AF ! +! headers +! +#include +! integer function io_MPA(X,Xw,ID) ! use pars, ONLY:SP,schlen @@ -19,7 +23,9 @@ integer function io_MPA(X,Xw,ID) use timing_m, ONLY:timing use mpa_m, ONLY:MPA_freqs,MPA_alloc,MPA_E_par,MPA_R_par ! -#include + USE_MEMORY + ! + implicit none ! type(X_t) :: X type(w_samp):: Xw diff --git a/src/io/io_NL.F b/src/io/io_NL.F index 39ef184d39..d96c84ab65 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! integer function io_NL(what,ID) ! use pars, ONLY:schlen,SP,IP,CR_YIO,IP_YIO @@ -24,7 +28,9 @@ integer function io_NL(what,ID) use timing_m, ONLY:timing #endif ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID character(*), intent(in) :: what diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F index 929e63d92b..5b3710afea 100644 --- a/src/io/io_OSCLL.F +++ b/src/io/io_OSCLL.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): CA +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -39,7 +43,9 @@ integer function io_OSCLL(q,ID) use timing_m, ONLY:timing #endif ! -#include + USE_MEMORY + ! + implicit none ! integer ::ID type(bz_samp), intent(in) :: q diff --git a/src/io/io_PH.F b/src/io/io_PH.F index d370830061..ec54cf1d33 100644 --- a/src/io/io_PH.F +++ b/src/io/io_PH.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_PH(ID) ! use units, ONLY:HA2EV @@ -21,7 +25,9 @@ integer function io_PH(ID) use RT_lifetimes, ONLY:RT_PE_life,RT_lifetime_alloc,Life_MEM_steps use descriptors, ONLY:IO_desc_reset ! -#include + USE_MEMORY + ! + implicit none ! integer ::ID character(schlen) ::QP_solver_disk diff --git a/src/io/io_QINDX.F b/src/io/io_QINDX.F index a7dbe3c3ad..4389056f31 100644 --- a/src/io/io_QINDX.F +++ b/src/io/io_QINDX.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! !> @brief Read and write scattering indexes ! ! io_sec=1 general parameters @@ -30,7 +34,9 @@ integer function io_QINDX(Xk,q,io_db) use timing_m, ONLY:timing use parallel_m, ONLY:PAR_K_scheme ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::q,Xk integer ::io_db,i3,i2,i2_dn,i2_up,i2_mem,i2_step,IO_size diff --git a/src/io/io_QP_and_GF.F b/src/io/io_QP_and_GF.F index d9e97ef57b..b69b058cfe 100644 --- a/src/io/io_QP_and_GF.F +++ b/src/io/io_QP_and_GF.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_QP_and_GF(what,qp,ID) use pars, ONLY:SP,schlen use D_lattice, ONLY:alat @@ -24,7 +28,9 @@ integer function io_QP_and_GF(what,qp,ID) use ELPH, ONLY:ELPH_desc,use_PH_DbGd #endif ! -#include + USE_MEMORY + ! + implicit none ! type(QP_t) ::qp character(*)::what ! 'QP'/'G'/filename diff --git a/src/io/io_RIM.F b/src/io/io_RIM.F index 4c0653c87a..04aaf6d27d 100644 --- a/src/io/io_RIM.F +++ b/src/io/io_RIM.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_RIM(ID) ! use pars, ONLY:SP @@ -14,7 +18,9 @@ integer function io_RIM(ID) use IO_m, ONLY:io_sec,read_is_on,io_status,write_is_on use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk,ver_is_gt_or_eq ! -#include + USE_MEMORY + ! + implicit none ! integer :: ID ! diff --git a/src/io/io_RIM_W.F b/src/io/io_RIM_W.F index ea5decabcf..ffc5ff1878 100644 --- a/src/io/io_RIM_W.F +++ b/src/io/io_RIM_W.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_RIM_W(ID,mode,Xw) ! use pars, ONLY:SP @@ -16,7 +20,9 @@ integer function io_RIM_W(ID,mode,Xw) & io_elemental,io_bulk use frequency, ONLY:w_samp ! -#include + USE_MEMORY + ! + implicit none ! integer :: ID type(w_samp) :: Xw diff --git a/src/io/io_RT_components_OBS.F b/src/io/io_RT_components_OBS.F index 1f8c33ef47..b6e6ebb31e 100644 --- a/src/io/io_RT_components_OBS.F +++ b/src/io/io_RT_components_OBS.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine io_RT_components_OBS(ID,what) ! use pars, ONLY:SP,schlen @@ -16,7 +20,9 @@ subroutine io_RT_components_OBS(ID,what) use RT_control, ONLY:J_cache,P_cache,Ms_cache,Ml_cache,A_cache,& & CACHE_OBS_steps_now,OBS_RT_IO_t,RT_do_IO ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID character(*), intent(in) :: what diff --git a/src/io/io_RT_components_Reference.F b/src/io/io_RT_components_Reference.F index b32dc54960..4c775b77f4 100644 --- a/src/io/io_RT_components_Reference.F +++ b/src/io/io_RT_components_Reference.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine io_RT_components_Reference(ID) ! use pars, ONLY:SP @@ -19,7 +23,9 @@ subroutine io_RT_components_Reference(ID) use ELPH, ONLY:elph_branches #endif ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID ! diff --git a/src/io/io_RT_components_TIME_points.F b/src/io/io_RT_components_TIME_points.F index e4c4185c0c..860516dd24 100644 --- a/src/io/io_RT_components_TIME_points.F +++ b/src/io/io_RT_components_TIME_points.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_time,TYP) ! use pars, ONLY:IP,SP,schlen,IP_YIO @@ -18,7 +22,9 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti use IO_m, ONLY:write_is_on,read_is_on use IO_int, ONLY:def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID,VAR_SZ logical, intent(in) :: load_RESTART_info,UNLIMITED_time diff --git a/src/io/io_SC_components.F b/src/io/io_SC_components.F index 86e2ea894f..19869e054f 100644 --- a/src/io/io_SC_components.F +++ b/src/io/io_SC_components.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_SC_components(what,E_sc,ID) ! ! what can be E WF V OBSERVABLES (J,P,D...) G @@ -23,7 +27,9 @@ integer function io_SC_components(what,E_sc,ID) use FFT_m, ONLY:fft_size use electrons, ONLY:levels,n_sp_pol,n_spin use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: ID type(levels) :: E_sc diff --git a/src/io/io_Vnl.F b/src/io/io_Vnl.F index 7fbd86b7f1..dee00134d4 100644 --- a/src/io/io_Vnl.F +++ b/src/io/io_Vnl.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_Vnl(Dip,Xen,ID) ! use pars, ONLY:SP,schlen @@ -17,7 +21,9 @@ integer function io_Vnl(Dip,Xen,ID) use IO_m, ONLY:io_sec,io_status,read_is_on,write_is_on,io_extension,frag_WF use global_XC, ONLY:Dipole_WF_xc_string,loaded_WF_xc_string ! -#include + USE_MEMORY + ! + implicit none ! type(DIPOLE_t)::Dip type(levels)::Xen diff --git a/src/io/io_X.F b/src/io/io_X.F index 3dfba75520..1fb1c8f09f 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function io_X(X,Xw,ID) ! use pars, ONLY:SP,schlen @@ -21,7 +25,9 @@ integer function io_X(X,Xw,ID) use stderr, ONLY:intc,STRING_same use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(X_t) :: X type(w_samp):: Xw diff --git a/src/io/io_gFsq.F b/src/io/io_gFsq.F index fa6dd8a232..9f0ad6caff 100644 --- a/src/io/io_gFsq.F +++ b/src/io/io_gFsq.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AC ! +! headers +! +#include +! integer function io_gFsq(ID) ! use pars, ONLY:schlen @@ -19,7 +23,9 @@ integer function io_gFsq(ID) use parallel_m, ONLY:PAR_Q_bz_index use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer ::ID ! diff --git a/src/io/load_SC_components.F b/src/io/load_SC_components.F index 298be591ce..bbe0473e32 100644 --- a/src/io/load_SC_components.F +++ b/src/io/load_SC_components.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG ! +! headers +! +#include +! subroutine load_SC_components(what,E,COM_,MODE_,ik,i_sp_pol,n_bands,kind,& & xc_functional,perturbation) ! @@ -17,7 +21,9 @@ subroutine load_SC_components(what,E,COM_,MODE_,ik,i_sp_pol,n_bands,kind,& use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD_CL,RD_CL_IF_END,OP_RD,RD_CL,& & DUMP,OP_RD_CL,NONE,IO_NO_DATABASE -#include + USE_MEMORY + ! + implicit none ! character(*) :: what type(levels), optional :: E diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 518810ae2e..ca490860d2 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AC ! +! headers +! +#include +! integer function variables_ELPH(ID,what) ! use pars, ONLY:SP @@ -20,7 +24,9 @@ integer function variables_ELPH(ID,what) use zeros, ONLY:k_rlu_zero use descriptors, ONLY:IO_desc_reset ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) ::ID character(*) ::what diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 27acf114e0..ce9b9a6d9c 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! use pars, ONLY:schlen,IP,SP,DP,IP_YIO,CR_YIO @@ -22,7 +26,9 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(inout) ::ID type(COLLISIONS_group) ::COLL diff --git a/src/io_parallel/io_COLLISIONS_header.F b/src/io_parallel/io_COLLISIONS_header.F index 82af8b8f69..23be76cbdd 100644 --- a/src/io_parallel/io_COLLISIONS_header.F +++ b/src/io_parallel/io_COLLISIONS_header.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! integer function io_COLLISIONS_header(ID,COLL) ! use pars, ONLY:schlen,IP,IP_YIO @@ -20,7 +24,9 @@ integer function io_COLLISIONS_header(ID,COLL) use X_m, ONLY:X_desc use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer, intent(inout) ::ID type(COLLISIONS_group) ::COLL diff --git a/src/io_serial/io_BS.F b/src/io_serial/io_BS.F index 0f873eaa17..85e8730820 100644 --- a/src/io_serial/io_BS.F +++ b/src/io_serial/io_BS.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! ! Analogously to io_DIPOLES, we write the io files of BS with the ! information of the q-vector ! Just to use what is done: @@ -26,7 +30,9 @@ integer function io_BS(iq,X,ID) use descriptors, ONLY:IO_desc,IO_desc_reset,IO_desc_duplicate use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(X_t):: X integer :: iq,ID diff --git a/src/io_serial/io_COLLISIONS.F b/src/io_serial/io_COLLISIONS.F index 5e5e38c3e2..8effb20f00 100644 --- a/src/io_serial/io_COLLISIONS.F +++ b/src/io_serial/io_COLLISIONS.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) ! use pars, ONLY:schlen,IP,SP,IP_YIO @@ -22,7 +26,9 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) use X_m, ONLY:X_desc use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer, intent(inout) ::ID type(COLLISIONS_group) ::COLL diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index 7f5153e3bd..9c84b8f95f 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +#include +! subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& & M,M_slk,& & M_bse,& @@ -34,8 +39,9 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_mapped ! -#include -#include + USE_MEMORY + ! + implicit none ! integer :: idriver integer, optional :: lib_in diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index e61ba3f0fe..85a6664720 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -14,6 +14,9 @@ #include #include ! +! headers +! +! subroutine MATRIX_slepc(M_slepc,l_target_energy,n_eig,V_right,V_left,E_real,E_cmpl) ! ! 10/06/2016 HM diff --git a/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F b/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F index 058137f4f3..739b475abe 100644 --- a/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F @@ -6,6 +6,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! subroutine PARALLEL_HERMITIAN_diagonalization(M, V, N, E) ! ! perform the diagonalization by using scalapack @@ -16,7 +20,9 @@ subroutine PARALLEL_HERMITIAN_diagonalization(M, V, N, E) use linear_algebra, ONLY:LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: N type(PAR_matrix) :: M,V diff --git a/src/linear_algebra/PARALLEL_inversion.F b/src/linear_algebra/PARALLEL_inversion.F index 3ff718df6d..0f41f5f5b4 100644 --- a/src/linear_algebra/PARALLEL_inversion.F +++ b/src/linear_algebra/PARALLEL_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! ! Copyright (C) 2004 WanT Group ! ! This file is distributed under the terms of the @@ -16,6 +20,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! subroutine PARALLEL_inversion(M,N) ! ! perform the inversion by using scalapack @@ -25,7 +33,9 @@ subroutine PARALLEL_inversion(M,N) & LINEAR_ALGEBRA_WS_reset use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: N type(PAR_matrix) :: M diff --git a/src/linear_algebra/PARALLEL_lin_system.F b/src/linear_algebra/PARALLEL_lin_system.F index 6ec0edd7bb..3ce6973ffa 100644 --- a/src/linear_algebra/PARALLEL_lin_system.F +++ b/src/linear_algebra/PARALLEL_lin_system.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF AM ! +! headers +! +#include +! subroutine PARALLEL_lin_system(A,B,n,nrhs) ! ! Solve the linear system @@ -18,7 +22,9 @@ subroutine PARALLEL_lin_system(A,B,n,nrhs) & LINEAR_ALGEBRA_WS_reset use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: n,nrhs type(PAR_matrix) :: A, B diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index b33bccf04b..99ea0b287d 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! use pars, ONLY:SP @@ -12,7 +16,9 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) use linear_algebra, ONLY:LINEAR_ALGEBRA_error,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: n complex(SP) :: M(n,n) diff --git a/src/linear_algebra/SERIAL_SVD_inversion.F b/src/linear_algebra/SERIAL_SVD_inversion.F index 1e0ab201fe..adc4e6fce0 100644 --- a/src/linear_algebra/SERIAL_SVD_inversion.F +++ b/src/linear_algebra/SERIAL_SVD_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine SERIAL_SVD_inversion(n,M,SVD_digits) ! use pars, ONLY:SP,cZERO @@ -12,7 +16,9 @@ subroutine SERIAL_SVD_inversion(n,M,SVD_digits) use linear_algebra, ONLY:LINEAR_ALGEBRA_error,SV_decomposition,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: n complex(SP) :: M(n,n) diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index e03eada92f..814914cd4d 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! ! The right eigenvector V_right(j) of M satisfies @@ -18,7 +22,9 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) use pars, ONLY:SP use linear_algebra,ONLY:LINEAR_ALGEBRA_error,M_eigenvalues,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! integer :: n complex(SP) :: M(n,n),E(n),V_left(n,n),V_right(n,n) diff --git a/src/linear_algebra/SERIAL_inversion.F b/src/linear_algebra/SERIAL_inversion.F index 79c489e57b..ed354f30a9 100644 --- a/src/linear_algebra/SERIAL_inversion.F +++ b/src/linear_algebra/SERIAL_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine SERIAL_inversion(n,M,det,eval_det) ! use pars, ONLY: SP,cONE @@ -12,7 +16,9 @@ subroutine SERIAL_inversion(n,M,det,eval_det) use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LU_factorization,LU_inversion,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY: timing -#include + USE_MEMORY + ! + implicit none ! integer :: n complex(SP) :: M(n,n),det diff --git a/src/linear_algebra/SERIAL_lin_system.F b/src/linear_algebra/SERIAL_lin_system.F index 02fa8d938e..c11b87846a 100644 --- a/src/linear_algebra/SERIAL_lin_system.F +++ b/src/linear_algebra/SERIAL_lin_system.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF ! +! headers +! +#include +! subroutine SERIAL_lin_system(n,nrhs,A,B) ! ! Solve the linear system @@ -16,7 +20,9 @@ subroutine SERIAL_lin_system(n,nrhs,A,B) use linear_algebra, ONLY:LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! integer :: n,nrhs complex(SP) :: A(n,n),B(n,nrhs) diff --git a/src/linear_algebra/SERIAL_lin_system_gpu.F b/src/linear_algebra/SERIAL_lin_system_gpu.F index 357fcc9b13..85754fc37e 100644 --- a/src/linear_algebra/SERIAL_lin_system_gpu.F +++ b/src/linear_algebra/SERIAL_lin_system_gpu.F @@ -3,6 +3,11 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): AF +! +! headers +! +#include +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -36,8 +41,9 @@ subroutine SERIAL_lin_system_gpu(n,nrhs,A_d,B_d) use cublas, ONLY:CUBLAS_OP_N #endif ! -#include -#include + USE_MEMORY + ! + implicit none ! integer :: n,nrhs complex(SP) DEV_ATTR :: A_d(n,n),B_d(n,nrhs) diff --git a/src/linear_algebra/SLK_test.F b/src/linear_algebra/SLK_test.F index 4a94c556f3..7e3c533fc9 100644 --- a/src/linear_algebra/SLK_test.F +++ b/src/linear_algebra/SLK_test.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! ! Copyright (C) 2004 WanT Group ! ! This file is distributed under the terms of the @@ -16,6 +20,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! subroutine SLK_test(E,k,q) ! ! simple program to check parallel linear algebra @@ -29,7 +37,9 @@ subroutine SLK_test(E,k,q) use linear_algebra, ONLY:INV,DIAGO,LIN_SYS,MAT_MUL,USE_LK,USE_SLK use matrix_operate, ONLY:hermitian ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::k,q @@ -191,7 +201,9 @@ subroutine inverse_check( ndim, Amat, Ainv ) use com, ONLY:msg use parallel_m, ONLY:mpi_comm_world use wrapper, ONLY:M_by_M -#include + USE_MEMORY + ! + implicit none ! integer :: ndim complex(SP) :: Amat(ndim,ndim) diff --git a/src/matrices/MATRIX_duplicate.F b/src/matrices/MATRIX_duplicate.F index 43e708abcc..4589d00f7f 100644 --- a/src/matrices/MATRIX_duplicate.F +++ b/src/matrices/MATRIX_duplicate.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) ! ! operation can be "none/free/+1/-1/-C/+T/+TC" @@ -12,7 +16,9 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) use parallel_m, ONLY:COMM_copy use pars, ONLY:cZERO,SP use matrix, ONLY:PAR_matrix,MATRIX_reset -#include + USE_MEMORY + ! + implicit none ! character(*) :: operation type(PAR_matrix), optional :: M_in diff --git a/src/matrices/MATRIX_init.F b/src/matrices/MATRIX_init.F index 7847633e56..3cbbf06669 100644 --- a/src/matrices/MATRIX_init.F +++ b/src/matrices/MATRIX_init.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! subroutine MATRIX_init( what, M_par, N, Nb) ! ! I initialize a general parallel matrix here. Note the meaning of the two COMMS: INTRA and INTER. @@ -21,8 +26,9 @@ subroutine MATRIX_init( what, M_par, N, Nb) use matrix, ONLY:PAR_matrix,MATRIX_reset use parallel_m, ONLY:COMM_copy,PAR_COM_SLK,PAR_COM_SLK_INDEX_local,& & PAR_COM_RL_INDEX,PAR_COM_RL_A2A,ncpu -#include -#include + USE_MEMORY + ! + implicit none ! character(*) :: what type(PAR_matrix) :: M_par diff --git a/src/matrices/MATRIX_transfer.F b/src/matrices/MATRIX_transfer.F index f1f8c6290d..1ef0b4dd5c 100644 --- a/src/matrices/MATRIX_transfer.F +++ b/src/matrices/MATRIX_transfer.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV, COMM, COMM_name) ! ! General, multi-purpose M <-> M transfer @@ -17,7 +21,9 @@ subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV use D_lattice, ONLY:i_space_inv use matrix, ONLY:PAR_matrix,I_do_SND,I_do_RCV,TRANSFER_world,PAR_to_PAR_comm_NAME use timing_m, ONLY:timing -#include + USE_MEMORY + ! + implicit none ! type(PAR_matrix), optional :: M_in type(PAR_matrix), optional :: M_out diff --git a/src/matrices/MATRIX_transpose.F b/src/matrices/MATRIX_transpose.F index 0928145dec..19da240f99 100644 --- a/src/matrices/MATRIX_transpose.F +++ b/src/matrices/MATRIX_transpose.F @@ -4,6 +4,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or ! modify it under the terms of the GNU General Public @@ -32,7 +36,9 @@ subroutine MATRIX_transpose( operation, M_in, M_out ) ! use interfaces, ONLY:MATRIX_duplicate use matrix, ONLY:PAR_matrix,MATRIX_reset -#include + USE_MEMORY + ! + implicit none ! character(*) :: operation type(PAR_matrix), optional :: M_in diff --git a/src/matrices/SLK_matrix_init.F b/src/matrices/SLK_matrix_init.F index 59718bbd98..3ec20b6b9d 100644 --- a/src/matrices/SLK_matrix_init.F +++ b/src/matrices/SLK_matrix_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! ! Copyright (C) 2004 WanT Group ! ! This file is distributed under the terms of the @@ -16,11 +20,17 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! +#include +! subroutine SLK_matrix_init(M_slk, N, N_blocks) ! use SLK_m, ONLY:SLK_ORTHO use matrix, ONLY:PAR_matrix -#include + USE_MEMORY + ! + implicit none ! integer :: N,N_blocks type(PAR_matrix) :: M_slk diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index b450572af0..cb0aa5e496 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! subroutine NL_driver(E,X,Xw,k,q,Dip) ! use pars, ONLY:pi,SP,cZERO,cONE,schlen @@ -37,7 +41,9 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) use collision_ext, ONLY:COLLISIONS_have_HARTREE use collision_ext, ONLY:ng_oscll,OSCLL,W ! -#include + USE_MEMORY + ! + implicit none ! ! Notice that E is never changed! ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 5a01a2f4ad..2846adf291 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! subroutine NL_initialize(E,k) ! use pars, ONLY:SP,DP,pi @@ -33,7 +37,9 @@ subroutine NL_initialize(E,k) use parser_m, ONLY:parser use stderr, ONLY:intc ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: E type(bz_samp),intent(in) :: k diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index c223ae4502..f3dc246d96 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -6,6 +6,10 @@ ! ! Authors (see AUTHORS file for details): AMCA ! +! headers +! +#include +! subroutine NL_start_and_restart(E,k,Dip) ! ! This subroutine initialize some variables and @@ -40,7 +44,9 @@ subroutine NL_start_and_restart(E,k,Dip) use stderr, ONLY:intc use collision_ext, ONLY:COLLISIONS_have_HARTREE ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: k diff --git a/src/parallel/PARALLEL_FREQS_setup.F b/src/parallel/PARALLEL_FREQS_setup.F index cd7bf1ad74..affafc3485 100644 --- a/src/parallel/PARALLEL_FREQS_setup.F +++ b/src/parallel/PARALLEL_FREQS_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_FREQS_setup(W,IND,COMM) ! use frequency, ONLY:w_samp @@ -12,7 +16,9 @@ subroutine PARALLEL_FREQS_setup(W,IND,COMM) & PAR_build_index,PAR_FREQS_index use parallel_int,ONLY:PARALLEL_index,PARALLEL_live_message ! -#include + USE_MEMORY + ! + implicit none ! type(w_samp) :: W type(PP_indexes):: IND diff --git a/src/parallel/PARALLEL_Haydock_VEC_COMMs.F b/src/parallel/PARALLEL_Haydock_VEC_COMMs.F index 7b9c9da865..512533ab56 100644 --- a/src/parallel/PARALLEL_Haydock_VEC_COMMs.F +++ b/src/parallel/PARALLEL_Haydock_VEC_COMMs.F @@ -4,6 +4,10 @@ ! ! Authors (see AUTHORS file for details): MG DS ! +! headers +! +#include +! subroutine PARALLEL_Haydock_VEC_COMMs(what) ! ! Set up the mask and communicators for the Haydock part. @@ -11,7 +15,9 @@ subroutine PARALLEL_Haydock_VEC_COMMs(what) use BS, ONLY:BS_nT_grps use parallel_m, ONLY:PAR_IND_T_groups,PAR_IND_T_Haydock,& & PAR_COM_T_Haydock,PAR_COM_WORLD,CREATE_the_COMM,ncpu -#include + USE_MEMORY + ! + implicit none ! character(*), intent(in) :: what ! diff --git a/src/parallel/PARALLEL_Transitions_grouping.F b/src/parallel/PARALLEL_Transitions_grouping.F index 1f1e3e9d56..6591271190 100644 --- a/src/parallel/PARALLEL_Transitions_grouping.F +++ b/src/parallel/PARALLEL_Transitions_grouping.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_Transitions_grouping() ! use pars, ONLY:SP @@ -17,7 +21,9 @@ subroutine PARALLEL_Transitions_grouping() use R_lattice, ONLY:nXkibz use vec_operate, ONLY:sort ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/parallel/PARALLEL_WF_distribute.F b/src/parallel/PARALLEL_WF_distribute.F index 60aa309a06..0700dd6d9b 100644 --- a/src/parallel/PARALLEL_WF_distribute.F +++ b/src/parallel/PARALLEL_WF_distribute.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_WF_distribute(B_index,Bp_index,K_index,B_and_K_index,& & QP_index,PLASMA_index,Bm_index,CLEAN_UP) ! @@ -22,7 +26,9 @@ subroutine PARALLEL_WF_distribute(B_index,Bp_index,K_index,B_and_K_index,& use R_lattice, ONLY:nkbz use collision_ext, ONLY:GW_NEQ_collisions #endif -#include + USE_MEMORY + ! + implicit none ! type(PP_indexes), optional :: K_index type(PP_indexes), optional :: B_index diff --git a/src/parallel/PARALLEL_WF_index.F b/src/parallel/PARALLEL_WF_index.F index 15088de036..e2c6649cd4 100644 --- a/src/parallel/PARALLEL_WF_index.F +++ b/src/parallel/PARALLEL_WF_index.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_WF_index(COMM) ! ! Here I used states_to_load to define the WF_linear index. @@ -16,7 +20,9 @@ subroutine PARALLEL_WF_index(COMM) & COMM_copy,PAR_COM_density use wave_func, ONLY:states_to_load use parallel_int, ONLY:PP_redux_wait -#include + USE_MEMORY + ! + implicit none ! type(yMPI_comm), optional :: COMM ! diff --git a/src/parallel/PARALLEL_add_Q_to_K_list.F b/src/parallel/PARALLEL_add_Q_to_K_list.F index c557524e3d..a7f6348f82 100644 --- a/src/parallel/PARALLEL_add_Q_to_K_list.F +++ b/src/parallel/PARALLEL_add_Q_to_K_list.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_add_Q_to_K_list(ZONE,IND_in,IND_in_ID,IND_k_out,IND_k_out_ID,& & IND_q,COMM,q_range,k,q) ! @@ -14,7 +18,9 @@ subroutine PARALLEL_add_Q_to_K_list(ZONE,IND_in,IND_in_ID,IND_k_out,IND_k_out_ID use R_lattice, ONLY:k_map use vec_operate, ONLY:k_periodic_idx ! -#include + USE_MEMORY + ! + implicit none ! character(*) ::ZONE type(PP_indexes) ::IND_in,IND_k_out,IND_q diff --git a/src/parallel/PARALLEL_collisions.F b/src/parallel/PARALLEL_collisions.F index 7b2aa2fded..3c51ad7464 100644 --- a/src/parallel/PARALLEL_collisions.F +++ b/src/parallel/PARALLEL_collisions.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_collisions( k, COLL ) ! ! SC @@ -134,7 +138,9 @@ subroutine PARALLEL_collisions( k, COLL ) use hamiltonian, ONLY:B_mat_index use R_lattice, ONLY:bz_samp,qindx_S,nqbz ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: k type(COLLISIONS_group) :: COLL @@ -214,7 +220,9 @@ subroutine PARALLEL_collisions_reset(COLL) ! use collision_ext, ONLY:COLLISIONS_group ! -#include + USE_MEMORY + ! + implicit none ! type(COLLISIONS_group), intent(inout) :: COLL ! diff --git a/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F b/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F index a6339eece6..c4b1293836 100644 --- a/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F +++ b/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_distribute_BZk_using_IBZk(COMM,K,IND_ibz,IBZ_id,IND_out,BZ_id,BZ_index,PAR_n_bz) ! use R_lattice, ONLY:bz_samp use parallel_m, ONLY:PP_indexes,yMPI_comm ! -#include + USE_MEMORY + ! + implicit none ! type(yMPI_comm) :: COMM type(PP_indexes) :: IND_ibz,IND_out diff --git a/src/parallel/PARALLEL_global_Oscillators.F b/src/parallel/PARALLEL_global_Oscillators.F index f954228ee5..b807776cee 100644 --- a/src/parallel/PARALLEL_global_Oscillators.F +++ b/src/parallel/PARALLEL_global_Oscillators.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): CA MG DS +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -44,7 +48,9 @@ subroutine PARALLEL_global_Oscillators(E,Xk,q) use openmp, ONLY:n_threads_OSCLL,OPENMP_set_threads use QP_m, ONLY:QP_n_states,QP_table ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: Xk,q diff --git a/src/parallel/PARALLEL_global_Real_Time.F b/src/parallel/PARALLEL_global_Real_Time.F index ee4a31cd95..876b3db56d 100644 --- a/src/parallel/PARALLEL_global_Real_Time.F +++ b/src/parallel/PARALLEL_global_Real_Time.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! use drivers, ONLY:l_eval_collisions @@ -34,7 +38,9 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) use parallel_m, ONLY:PAR_IND_Xk_ibz_ID,PAR_IND_Xk_ibz_ID,PAR_IND_Xk_ibz_ID,& & PAR_IND_DIPk_ibz_ID,PAR_IND_Q_bz_ID,PAR_IND_WF_b_ID ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: Xk,q diff --git a/src/parallel/PARALLEL_global_Response_G.F b/src/parallel/PARALLEL_global_Response_G.F index 3e13f6a888..1d150bbd25 100644 --- a/src/parallel/PARALLEL_global_Response_G.F +++ b/src/parallel/PARALLEL_global_Response_G.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_global_Response_G(E,Xk,q,ENVIRONMENT,X_type) ! use drivers, ONLY:l_life @@ -31,7 +35,9 @@ subroutine PARALLEL_global_Response_G(E,Xk,q,ENVIRONMENT,X_type) ! ID's use parallel_m, ONLY:PAR_IND_Xk_ibz_ID,PAR_IND_Xk_bz_ID,PAR_IND_Q_ibz_ID ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: Xk,q diff --git a/src/parallel/PARALLEL_global_Response_T.F b/src/parallel/PARALLEL_global_Response_T.F index 576920ac36..9860da660e 100644 --- a/src/parallel/PARALLEL_global_Response_T.F +++ b/src/parallel/PARALLEL_global_Response_T.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine PARALLEL_global_Response_T_base(Xk) ! use R_lattice, ONLY:bz_samp,nXkbz,nXkibz @@ -25,7 +29,9 @@ subroutine PARALLEL_global_Response_T_base(Xk) ! ID's use parallel_m, ONLY:PAR_IND_Kk_ibz_ID,PAR_IND_Xk_ibz_ID,PAR_IND_Xk_bz_ID ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk ! diff --git a/src/parallel/PARALLEL_global_Response_T_transitions.F b/src/parallel/PARALLEL_global_Response_T_transitions.F index 329565d15d..95d6a9f33d 100644 --- a/src/parallel/PARALLEL_global_Response_T_transitions.F +++ b/src/parallel/PARALLEL_global_Response_T_transitions.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine PARALLEL_global_Response_T_transitions(Xk) ! use R_lattice, ONLY:bz_samp,nXkibz @@ -23,7 +27,9 @@ subroutine PARALLEL_global_Response_T_transitions(Xk) ! ID's use parallel_m, ONLY:PAR_IND_CON_BANDS_DIP_ID,PAR_IND_VAL_BANDS_DIP_ID ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk ! diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index cb3739cff9..4f11150a5b 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_global_Self_Energy(E,Xk,q) ! use electrons, ONLY:levels @@ -52,7 +56,9 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) use ELPH, ONLY:elph_use_q_grid #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: Xk,q diff --git a/src/parallel/PARALLEL_global_dimensions.F b/src/parallel/PARALLEL_global_dimensions.F index 34dbe85b1d..ad74f22583 100644 --- a/src/parallel/PARALLEL_global_dimensions.F +++ b/src/parallel/PARALLEL_global_dimensions.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) ! use com, ONLY:secnm @@ -35,7 +39,9 @@ subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) use electrons, ONLY:levels use R_lattice, ONLY:bz_samp,nqibz,nqbz use QP_m, ONLY:QP_n_states,QP_nb,QP_n_G_bands -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: Xk,q diff --git a/src/parallel/PARALLEL_global_indexes.F b/src/parallel/PARALLEL_global_indexes.F index a9abc93a46..cfdca8aebd 100644 --- a/src/parallel/PARALLEL_global_indexes.F +++ b/src/parallel/PARALLEL_global_indexes.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre_defined) ! ! LOGICALS @@ -27,7 +31,9 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre use R_lattice, ONLY:bz_samp use pars, ONLY:SP ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::Xk,q diff --git a/src/parallel/PARALLEL_global_reset.F b/src/parallel/PARALLEL_global_reset.F index f2be43d976..12808e08d7 100644 --- a/src/parallel/PARALLEL_global_reset.F +++ b/src/parallel/PARALLEL_global_reset.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_global_reset(ENVIRONMENT,X_type) ! use R_lattice, ONLY:bz_samp @@ -55,7 +59,9 @@ subroutine PARALLEL_global_reset(ENVIRONMENT,X_type) use SLK_m, ONLY:SLK_COM_INDEX,SLK_COM_A2A #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk character(*) :: ENVIRONMENT diff --git a/src/parallel/PARALLEL_index.F b/src/parallel/PARALLEL_index.F index b0718f9c79..a41e055075 100644 --- a/src/parallel/PARALLEL_index.F +++ b/src/parallel/PARALLEL_index.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine PARALLEL_index(px,uplim,low_range,COMM,CONSECUTIVE,ORDERED,NO_EMPTIES,MASK) ! use pars, ONLY:SP @@ -14,7 +18,9 @@ subroutine PARALLEL_index(px,uplim,low_range,COMM,CONSECUTIVE,ORDERED,NO_EMPTIES use stderr, ONLY:intc use vec_operate, ONLY:sort ! -#include + USE_MEMORY + ! + implicit none ! type(PP_indexes) ::px integer ::uplim(:) diff --git a/src/parallel/PARALLEL_scheme_initialize.F b/src/parallel/PARALLEL_scheme_initialize.F index 8b6100a192..60b532585c 100644 --- a/src/parallel/PARALLEL_scheme_initialize.F +++ b/src/parallel/PARALLEL_scheme_initialize.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PARALLEL_scheme_initialize(WHAT,ENVIRONMENT,PARALL_PARs,N,TABLE,MATRIX) ! use parallel_m, ONLY:PAR_scheme use parallel_int, ONLY:PARALLEL_live_message,PARALLEL_index,PARALLEL_MATRIX_distribute ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: WHAT character(*) :: ENVIRONMENT diff --git a/src/pol_function/OPTICS_driver.F b/src/pol_function/OPTICS_driver.F index c88df4d9d1..7995584b63 100644 --- a/src/pol_function/OPTICS_driver.F +++ b/src/pol_function/OPTICS_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM, DS ! +! headers +! +#include +! subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) ! ! Optics driver @@ -28,7 +32,9 @@ subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) use interfaces, ONLY:WF_load,WF_free,WF_load use matrix, ONLY:MATRIX_reset ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: Xen type(bz_samp) :: Xk,q diff --git a/src/pol_function/X_AVERAGE_do_it.F b/src/pol_function/X_AVERAGE_do_it.F index 64d98f9ffd..176fe7735e 100644 --- a/src/pol_function/X_AVERAGE_do_it.F +++ b/src/pol_function/X_AVERAGE_do_it.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine X_AVERAGE_do_it(what,X_par) ! ! The procedures to copy from Host to Device, that are included here, maybe not needded. @@ -17,7 +21,6 @@ subroutine X_AVERAGE_do_it(what,X_par) use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memcpy_d2d,devxlib_memset_d use matrix, ONLY:PAR_matrix,MATRIX_reset ! -#include ! implicit none ! diff --git a/src/pol_function/X_Double_Grid_setup.F b/src/pol_function/X_Double_Grid_setup.F index eee7b704b8..b174afa5f3 100644 --- a/src/pol_function/X_Double_Grid_setup.F +++ b/src/pol_function/X_Double_Grid_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine X_Double_Grid_setup(iq,k,k_FGbz,nTrans_percent,Radius) ! ! Define which kpts I will use in a consistent way between q=0 and q/=0 @@ -30,7 +34,9 @@ subroutine X_Double_Grid_setup(iq,k,k_FGbz,nTrans_percent,Radius) use real_time, ONLY:l_RT_uses_E_FineGd #endif ! -#include + USE_MEMORY + ! + implicit none ! integer :: iq type(bz_samp) :: k diff --git a/src/pol_function/X_GreenF_analytical.F b/src/pol_function/X_GreenF_analytical.F index 3c5f92811c..dd008081e2 100644 --- a/src/pol_function/X_GreenF_analytical.F +++ b/src/pol_function/X_GreenF_analytical.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine X_GreenF_analytical(iq,transitions,Xw,Xen,Xk,GreenF,ordering,space,no_occupations,X_terminator) ! ! Compute the GreenF in frequency space starting from it analytical @@ -24,7 +28,9 @@ subroutine X_GreenF_analytical(iq,transitions,Xw,Xen,Xk,GreenF,ordering,space,no use frequency, ONLY:w_samp use parallel_m, ONLY:PAR_Xk_bz_index ! -#include + USE_MEMORY + ! + implicit none ! integer :: iq,transitions(4) type(w_samp) :: Xw diff --git a/src/pol_function/X_GreenF_remap.F b/src/pol_function/X_GreenF_remap.F index ea48aa34a4..03eb65f70a 100644 --- a/src/pol_function/X_GreenF_remap.F +++ b/src/pol_function/X_GreenF_remap.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine X_GreenF_remap(bands,E,W) ! use pars, ONLY:SP,pi @@ -12,7 +16,9 @@ subroutine X_GreenF_remap(bands,E,W) use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol,E_reset use frequency, ONLY:w_samp,W_reset -#include + USE_MEMORY + ! + implicit none integer :: bands(2) type(w_samp) :: W type(levels) :: E diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 301ba20693..b2e15f0849 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) ! ! Calculates and stores on file the dielectric matrix. @@ -33,7 +37,9 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE) use QP_m, ONLY:QP_n_W_freqs_redux use matrix, ONLY:MATRIX_reset,MATRIX_copy ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Xen type(bz_samp) ::Xk,q diff --git a/src/pol_function/X_eh_setup.F b/src/pol_function/X_eh_setup.F index f5d551fba9..bb6a1ac825 100644 --- a/src/pol_function/X_eh_setup.F +++ b/src/pol_function/X_eh_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function X_eh_setup(iq,X,Xen,Xk,minmax_ehe) ! use pars, ONLY:SP @@ -14,7 +18,9 @@ integer function X_eh_setup(iq,X,Xen,Xk,minmax_ehe) use frequency, ONLY:ordered_grid_index use parallel_m, ONLY:PAR_IND_CON_BANDS_X,PAR_IND_Xk_bz,PAR_IND_VAL_BANDS_X ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Xen type(bz_samp) ::Xk diff --git a/src/pol_function/X_irredux.F b/src/pol_function/X_irredux.F index d85cd93663..40463ae04c 100644 --- a/src/pol_function/X_irredux.F +++ b/src/pol_function/X_irredux.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AMDSAFFA ! +! headers +! +#include +#include +! !> @callgraph !> @callergraph subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) @@ -55,8 +60,9 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_memcpy_d2h,devxlib_memcpy_h2d use timing_m, ONLY:timing ! -#include -#include + USE_MEMORY + ! + implicit none ! type(PAR_matrix), target :: X_par type(levels) :: Xen diff --git a/src/pol_function/X_irredux_residuals.F b/src/pol_function/X_irredux_residuals.F index c8df93d6b9..beeb460ada 100644 --- a/src/pol_function/X_irredux_residuals.F +++ b/src/pol_function/X_irredux_residuals.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): DS AM AF IM ! +! headers +! #include ! +! !> @callgraph !> @callergraph subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt,work,lwork) diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index 8fb5a6c874..7b6b51e091 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! #include +#include +! ! subroutine X_redux(iq,what,X_par,Xw,X) ! @@ -42,7 +46,9 @@ subroutine X_redux(iq,what,X_par,Xw,X) use devxlib_async, ONLY:devxlib_async_synchronize use gpu_m ! -#include + USE_MEMORY + ! + implicit none ! type(PAR_matrix) :: X_par type(X_t) :: X diff --git a/src/qp/QED_Sigma_c.F b/src/qp/QED_Sigma_c.F index ab57619861..d7a5ae9da0 100644 --- a/src/qp/QED_Sigma_c.F +++ b/src/qp/QED_Sigma_c.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): PM AM ! +! headers +! +#include +! subroutine QED_Sigma_c(E,k,q,qp) ! use pars, ONLY:SP,pi,cI,rZERO @@ -29,7 +33,9 @@ subroutine QED_Sigma_c(E,k,q,qp) use functions, ONLY:theta_function use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::k,q diff --git a/src/qp/QP_driver.F b/src/qp/QP_driver.F index 9cd663fd19..372d29f9b2 100644 --- a/src/qp/QP_driver.F +++ b/src/qp/QP_driver.F @@ -4,6 +4,10 @@ ! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): AM +! +! headers +! +#include ! subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) ! @@ -36,7 +40,9 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) use stderr, ONLY:intc use descriptors, ONLY:IO_desc,IO_desc_reset,IO_desc_add ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en,Xen type(bz_samp) ::Xk,k,q @@ -434,7 +440,9 @@ subroutine check_qp_states(QP_table,QP_state,qp,en,Xen) ! use QP_m, ONLY:QP_t use electrons, ONLY:n_sp_pol,levels -#include + USE_MEMORY + ! + implicit none ! ! type(QP_t), intent(in) :: qp diff --git a/src/qp/QP_expand.F b/src/qp/QP_expand.F index 38852cfc85..26ea4ee0e1 100644 --- a/src/qp/QP_expand.F +++ b/src/qp/QP_expand.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_expand(k,qp,qp_expanded) ! use pars, ONLY:SP @@ -13,7 +17,9 @@ subroutine QP_expand(k,qp,qp_expanded) use electrons, ONLY:n_sp_pol use descriptors, ONLY:IO_desc_duplicate ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k type(QP_t) ::qp,qp_expanded diff --git a/src/qp/QP_interpolate_W.F b/src/qp/QP_interpolate_W.F index e40e5e06cb..bf9576e906 100644 --- a/src/qp/QP_interpolate_W.F +++ b/src/qp/QP_interpolate_W.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AG ! +! headers +! +#include +#include +! subroutine QP_interpolate_W(X,Xw,q,mode) ! use pars, ONLY:SP,pi,zero_dfl,schlen,DP,rZERO @@ -23,8 +28,9 @@ subroutine QP_interpolate_W(X,Xw,q,mode) use timing_m, ONLY:timing use parallel_m, ONLY:master_cpu ! -#include -#include + USE_MEMORY + ! + implicit none ! type(X_t) :: X type(w_samp) :: Xw @@ -390,7 +396,9 @@ subroutine find_q_nns(q,q_grid_b_iku,idx_q,idx_is,idx_G) use R_lattice, ONLY:bz_samp,RIM_W_ng,g_vec,ng_vec,rl_sop use vec_operate, ONLY:v_is_zero ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp):: q real(SP) :: q_grid_b_iku(3,2) diff --git a/src/qp/QP_life_transitions.F b/src/qp/QP_life_transitions.F index 0d16058495..87f46464b0 100644 --- a/src/qp/QP_life_transitions.F +++ b/src/qp/QP_life_transitions.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! integer function QP_life_transitions(iqibz_in,E,k,q,X_life_W) ! use pars, ONLY:SP @@ -14,7 +18,9 @@ integer function QP_life_transitions(iqibz_in,E,k,q,X_life_W) use electrons, ONLY:levels,spin use R_lattice, ONLY:qindx_S,bz_samp ! -#include + USE_MEMORY + ! + implicit none type(levels) ::E type(bz_samp)::q,k type(w_samp) ::X_life_W diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 5d90afcf58..141a1bfaeb 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -4,8 +4,12 @@ ! Copyright (C) 2006 The Yambo Team ! ! Authors (see AUTHORS file for details): DALV AF AM -! +! +! headers +! #include +#include +! ! subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! @@ -45,7 +49,9 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memcpy_d2h,devxlib_memcpy_d2d use gpu_m, ONLY:have_gpu ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::Xk,k,q diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 895d0afcb7..47a5f3c0ae 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -2,6 +2,11 @@ ! License-Identifier: GPL ! ! Authors (see AUTHORS file for details): AM [AF,IM,MB] +! +! headers +! +#include +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -17,7 +22,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! @@ -66,7 +75,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp)::Xk,k,q diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 02d492d282..dfd52560f0 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! !@brief GW self-energy on the real axis ! subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) @@ -48,7 +52,9 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) use wrapper_omp, ONLY:Vstar_dot_V_omp,V_dot_V_omp use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en,Xen type(bz_samp) :: Xk,k,q diff --git a/src/qp/QP_secant_driver.F b/src/qp/QP_secant_driver.F index 04695aa67c..74b18bb3dc 100644 --- a/src/qp/QP_secant_driver.F +++ b/src/qp/QP_secant_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! !Procedure for non-perturbative solution of Dyson equation. @@ -48,7 +52,9 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) use IO_m, ONLY:NONE,RD,RD_CL,OP_RD,OP_RD_CL,io_SCREEN use stderr, ONLY:intc ! -#include + USE_MEMORY + ! + implicit none type(levels)::en,Xen type(bz_samp)::Xk,k,q type(X_t):: X diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index cd74be3e4d..268f27f7c4 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! @@ -40,7 +44,9 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) use qe_pseudo_m, ONLY:beccopy use devxlib, ONLY:devxlib_memcpy_d2d ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp)::k,Xk,q diff --git a/src/qp/XCo_driver.F b/src/qp/XCo_driver.F index 594595b017..692704c5a8 100644 --- a/src/qp/XCo_driver.F +++ b/src/qp/XCo_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine XCo_driver(E,k,Xk,q) ! use zeros, ONLY:zero_dfl @@ -25,7 +29,9 @@ subroutine XCo_driver(E,k,Xk,q) use global_XC, ONLY:H_SE_FOCK,H_SE_HARTREE,H_SE_COH,H_SE_SEX #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp)::k,Xk,q diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index 9b27bd033e..fee2e90767 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine XCo_local(E,Xk) ! ! Local V_xc @@ -37,7 +41,9 @@ subroutine XCo_local(E,Xk) #endif use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp)::Xk diff --git a/src/qp/XCo_report.F b/src/qp/XCo_report.F index 4373be70e2..4538b06a85 100644 --- a/src/qp/XCo_report.F +++ b/src/qp/XCo_report.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine XCo_report(qp,E,k) ! use drivers, ONLY:l_real_time,l_gw0 @@ -19,7 +23,9 @@ subroutine XCo_report(qp,E,k) use stderr, ONLY:intc,real2ch use xc_functionals,ONLY:E_xc_val ! -#include + USE_MEMORY + ! + implicit none ! type(QP_t) ::qp type(levels) ::E diff --git a/src/qp_control/QP_DBs_add_me.F b/src/qp_control/QP_DBs_add_me.F index a730742794..0dc46c11ad 100644 --- a/src/qp_control/QP_DBs_add_me.F +++ b/src/qp_control/QP_DBs_add_me.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_DBs_add_me(qp_base,qp2add,plan_EWZG,SAME_states,SAME_desc,OP,PRE_FAC) ! ! This routine just adds to qp_base qp with the plan plan_EWZG @@ -13,7 +17,9 @@ subroutine QP_DBs_add_me(qp_base,qp2add,plan_EWZG,SAME_states,SAME_desc,OP,PRE_F use QP_m, ONLY:QP_t,QP_reset,QP_copy,QP_alloc use electrons, ONLY:n_sp_pol ! -#include + USE_MEMORY + ! + implicit none ! type(QP_t) ::qp_base,qp2add logical ::plan_EWZG(4),SAME_states,SAME_desc diff --git a/src/qp_control/QP_DBs_merge.F b/src/qp_control/QP_DBs_merge.F index b6a5402577..81ddb8ec21 100644 --- a/src/qp_control/QP_DBs_merge.F +++ b/src/qp_control/QP_DBs_merge.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_DBs_merge(n_dbs,qp2merge,plan_EWZG,n_GROUNDS,qp,OP,PRE_FAC,FILES) ! use pars, ONLY:SP @@ -15,7 +19,9 @@ subroutine QP_DBs_merge(n_dbs,qp2merge,plan_EWZG,n_GROUNDS,qp,OP,PRE_FAC,FILES) use vec_operate, ONLY:v_is_zero use descriptors, ONLY:IO_desc_duplicate ! -#include + USE_MEMORY + ! + implicit none ! integer :: n_dbs,n_GROUNDS type(QP_t) :: qp2merge(n_dbs) diff --git a/src/qp_control/QP_apply.F b/src/qp_control/QP_apply.F index 504b170681..44a3f69f8d 100644 --- a/src/qp_control/QP_apply.F +++ b/src/qp_control/QP_apply.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine QP_apply(bands,en,k,object,msg_fmt,qp_impose,QP_ctl_impose,main_section) ! ! This routine manages the external qp corrections. @@ -38,7 +42,9 @@ subroutine QP_apply(bands,en,k,object,msg_fmt,qp_impose,QP_ctl_impose,main_secti & At_least_one_band_corrected use global_XC, ONLY:correct_global_XC ! -#include + USE_MEMORY + ! + implicit none ! integer ::bands(2) type(levels) ::en diff --git a/src/qp_control/QP_apply_QP.F b/src/qp_control/QP_apply_QP.F index db7d27168b..274a5a3398 100644 --- a/src/qp_control/QP_apply_QP.F +++ b/src/qp_control/QP_apply_QP.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_apply_QP(i_ACTION,bands,en,k,qp) ! use pars, ONLY:rZERO @@ -13,7 +17,9 @@ subroutine QP_apply_QP(i_ACTION,bands,en,k,qp) use electrons, ONLY:levels,n_sp_pol use QP_CTL_m, ONLY:QP_action ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(QP_t) ::qp diff --git a/src/qp_control/QP_apply_dump_user_CTLs.F b/src/qp_control/QP_apply_dump_user_CTLs.F index fe6abe6197..6fc03d1fb2 100644 --- a/src/qp_control/QP_apply_dump_user_CTLs.F +++ b/src/qp_control/QP_apply_dump_user_CTLs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_apply_dump_user_CTLs( E, object ) ! use pars, ONLY:schlen @@ -15,7 +19,9 @@ subroutine QP_apply_dump_user_CTLs( E, object ) & QP_ctl_ID,QP_CTL_is_active,QP_CTL_fill use stderr, ONLY:STRING_split,STRING_same ! -#include + USE_MEMORY + ! + implicit none ! type (levels) ::E character(1) ::object diff --git a/src/qp_control/QP_apply_interpolate_QP.F b/src/qp_control/QP_apply_interpolate_QP.F index 1717bd6660..9090e60453 100644 --- a/src/qp_control/QP_apply_interpolate_QP.F +++ b/src/qp_control/QP_apply_interpolate_QP.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) ! ! Extend the QP correction from the kpt in qp to the kpt in k @@ -30,7 +34,9 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) use interpolate, ONLY:NN_n_of_nearest,INTERP_obj,INTERPOLATE_msg_fmt,& & INTERPOLATION_driver_seed,INTERPOLATION_driver_do,INTERP_shell_factor ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(QP_t) ::qp diff --git a/src/qp_control/QP_apply_the_ACTION.F b/src/qp_control/QP_apply_the_ACTION.F index 934a9756a8..2f32b40976 100644 --- a/src/qp_control/QP_apply_the_ACTION.F +++ b/src/qp_control/QP_apply_the_ACTION.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_apply_the_ACTION(i_ACTION,bands,E,k) ! ! Here I apply the strecth for both QP_action. @@ -14,7 +18,9 @@ subroutine QP_apply_the_ACTION(i_ACTION,bands,E,k) use R_lattice, ONLY:bz_samp use QP_CTL_m, ONLY:QP_action,QP_ctl_xc_STRING,At_least_one_band_corrected ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp) ::k diff --git a/src/qp_control/QP_load_DB.F b/src/qp_control/QP_load_DB.F index d4af4933f6..a43c1672ee 100644 --- a/src/qp_control/QP_load_DB.F +++ b/src/qp_control/QP_load_DB.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_load_DB(i_ACTION,bands,en,k) ! use drivers, ONLY:l_chi,l_bss @@ -15,7 +19,9 @@ subroutine QP_load_DB(i_ACTION,bands,en,k) use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,DUMP,REP ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp) ::k diff --git a/src/qp_control/QP_load_GFs.F b/src/qp_control/QP_load_GFs.F index 435e952631..5d4cdf43a8 100644 --- a/src/qp_control/QP_load_GFs.F +++ b/src/qp_control/QP_load_GFs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_load_GFs(bands,qp,E) ! ! Using qp%GreenF/qp%GreenF_W I define here the Green Functions @@ -12,7 +16,9 @@ subroutine QP_load_GFs(bands,qp,E) use electrons, ONLY:n_sp_pol,spin,levels use QP_m, ONLY:QP_t,GF_is_causal ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(QP_t) ::qp diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index 53141f5f30..ea357221d8 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_alloc(en,what) ! use pars, ONLY:SP,cZERO @@ -27,7 +31,9 @@ subroutine RT_alloc(en,what) & magn_reference,RT_bands,RT_nk,l_RT_is_WFfree,l_RT_rotate_DM,& & l_velocity_gauge_corr ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: en character(*), intent(in) :: what diff --git a/src/real_time_control/RT_free.F b/src/real_time_control/RT_free.F index 9baa4650e0..78b7e115e0 100644 --- a/src/real_time_control/RT_free.F +++ b/src/real_time_control/RT_free.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_free( ) ! use R_lattice, ONLY:bz_samp_FineGd_reset @@ -26,7 +30,9 @@ subroutine RT_free( ) #endif use RT_lifetimes, ONLY:RT_ALL_lifetimes_free,q_weight_RT ! -#include + USE_MEMORY + ! + implicit none ! call H_free() ! diff --git a/src/real_time_control/RT_interpolation_driver.F b/src/real_time_control/RT_interpolation_driver.F index 851626749b..9e7cc70bc8 100644 --- a/src/real_time_control/RT_interpolation_driver.F +++ b/src/real_time_control/RT_interpolation_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_interpolation_driver(bands,E,K,what,Time,l_f,l_E,l_W,l_B,NN,VERB) ! use pars, ONLY:SP,schlen @@ -16,7 +20,9 @@ subroutine RT_interpolation_driver(bands,E,K,what,Time,l_f,l_E,l_W,l_B,NN,VERB) use com, ONLY:msg use interpolate, ONLY:l_integral_respect,NN_n_of_nearest ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: bands(2),NN type(levels), intent(inout) :: E diff --git a/src/real_time_control/RT_k_grid.F b/src/real_time_control/RT_k_grid.F index a67c3fb178..65f3745738 100644 --- a/src/real_time_control/RT_k_grid.F +++ b/src/real_time_control/RT_k_grid.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine RT_k_grid(E,k,q) ! use pars, ONLY:SP @@ -18,7 +22,9 @@ subroutine RT_k_grid(E,k,q) & bz_samp_FineGd_default use parallel_m, ONLY:PAR_IND_Xk_ibz ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: E type(bz_samp),intent(in) :: k diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index 05ae54b6e3..4390b9517b 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! subroutine RT_driver(E,X,k,q,Dip) ! use pars, ONLY:SP,lchlen @@ -45,7 +49,9 @@ subroutine RT_driver(E,X,k,q,Dip) use units, ONLY:FS2AUT use RT_lifetimes, ONLY:l_initial_equilibrium ! -#include + USE_MEMORY + ! + implicit none ! ! Notice that E is never changed! ! diff --git a/src/real_time_initialize/RT_Dephasing_Matrix.F b/src/real_time_initialize/RT_Dephasing_Matrix.F index 05af9b9f53..bdc968d316 100644 --- a/src/real_time_initialize/RT_Dephasing_Matrix.F +++ b/src/real_time_initialize/RT_Dephasing_Matrix.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine RT_Dephasing_Matrix(E) ! use pars, ONLY:SP @@ -16,7 +20,9 @@ subroutine RT_Dephasing_Matrix(E) & RAD_LifeTime,RT_bands,RT_INPUT_Deph_limits,RT_deph_cv_only, & & RT_deph_deg_thresh ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: E ! diff --git a/src/real_time_initialize/RT_ELPH_initialize.F b/src/real_time_initialize/RT_ELPH_initialize.F index 29df6cd43f..b2dd92efa6 100644 --- a/src/real_time_initialize/RT_ELPH_initialize.F +++ b/src/real_time_initialize/RT_ELPH_initialize.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_ELPH_initialize(E,k,q) ! use parser_m, ONLY:parser @@ -14,7 +18,9 @@ subroutine RT_ELPH_initialize(E,k,q) use R_lattice, ONLY:bz_samp use ELPH, ONLY:PH_freqs_sq,PH_W_debye,GKKP_ep_sq,GKKP_pe_sq,l_GKKP_expanded_DB_exists,elph_nQ ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp),intent(in) :: k,q diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index d981ed9b37..00270a9e9f 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): ! +! headers +! +#include +! subroutine RT_initialize(E,k,q) ! use drivers, ONLY:l_use_collisions,l_elph_scatt,l_elel_scatt,l_sc_hartree,l_use_Hxc_collisions,& @@ -50,7 +54,9 @@ subroutine RT_initialize(E,k,q) use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,PAR_G_k_range use parallel_int, ONLY:PP_redux_wait ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(inout) :: E type(bz_samp),intent(in) :: q,k diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index e9229f2ad2..59e035dc13 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA ! +! headers +! +#include +! subroutine RT_start_and_restart(E,k,q) ! ! This subroutine initialize some variables and restart from SC @@ -51,7 +55,9 @@ subroutine RT_start_and_restart(E,k,q) use parallel_int, ONLY:PP_wait,PP_redux_wait use RT_output_m, ONLY:RT_desc,TIME_STEP_desc,Gr_desc ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: E type(bz_samp) :: k,q diff --git a/src/real_time_propagation/RT_Integrator_init.F b/src/real_time_propagation/RT_Integrator_init.F index a8e7ab3057..119c35b20d 100644 --- a/src/real_time_propagation/RT_Integrator_init.F +++ b/src/real_time_propagation/RT_Integrator_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine RT_Integrator_init() ! use pars, ONLY:SP,cONE,cZERO @@ -17,7 +21,9 @@ subroutine RT_Integrator_init() & a_tableau,b_tableau,c_tableau,RWA_table, & & I1_matrix,Integrator_nsteps,RT_bands ! -#include + USE_MEMORY + ! + implicit none ! integer :: ib ! diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 63025864d0..8d0d392879 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) ! ! Apply the NL local sX+cH operator to the valence wfs. @@ -42,7 +46,9 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) ! ! I/O ! -#include + USE_MEMORY + ! + implicit none complex(SP),intent(inout) :: U_csx(nkibz,maxval(n_met_bands),fft_size) type(levels), intent(in) :: E type(bz_samp), intent(in) :: k,q diff --git a/src/sc/OEP_ApplySigmaX.F b/src/sc/OEP_ApplySigmaX.F index 4dc04ac26f..591830c560 100644 --- a/src/sc/OEP_ApplySigmaX.F +++ b/src/sc/OEP_ApplySigmaX.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine OEP_ApplySigmaX(E,k,q,U_x) ! ! Apply the NL local X operator to the valence wfs: @@ -36,7 +40,9 @@ subroutine OEP_ApplySigmaX(E,k,q,U_x) ! ! I/O ! -#include + USE_MEMORY + ! + implicit none complex(SP),intent(out) :: U_x(nkibz,maxval(n_met_bands),fft_size) type(levels), intent(in) :: E type(bz_samp), intent(in):: k,q diff --git a/src/sc/OEP_app_inversion.F b/src/sc/OEP_app_inversion.F index 4f48ae8d5e..449f13a436 100644 --- a/src/sc/OEP_app_inversion.F +++ b/src/sc/OEP_app_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) ! ! Exchange KLI/CEDA @@ -38,7 +42,9 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) ! ! I/O ! -#include + USE_MEMORY + ! + implicit none real(SP), intent(out):: Vkli(fft_size) real(SP), intent(in) :: Vslt(fft_size),rho(fft_size) complex(SP), intent(in) :: U(nkibz,maxval(n_met_bands),fft_size) diff --git a/src/sc/OEP_driver.F b/src/sc/OEP_driver.F index 473d6507de..f823c4aa25 100644 --- a/src/sc/OEP_driver.F +++ b/src/sc/OEP_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine OEP_driver(X,Xw,E,k,q,V_oep) ! ! Driver for OEP potentials. Variables: @@ -34,7 +38,9 @@ subroutine OEP_driver(X,Xw,E,k,q,V_oep) use SC, ONLY:it_now,l_oep_iterative,l_oep_EWeight use frequency, ONLY:w_samp ! -#include + USE_MEMORY + ! + implicit none real(SP),intent(inout) :: V_oep(fft_size) type(X_t),intent(in) :: X(2) type(w_samp),intent(in) :: Xw diff --git a/src/sc/OEP_exact_inversion.F b/src/sc/OEP_exact_inversion.F index 0827d090e5..250dd9e360 100644 --- a/src/sc/OEP_exact_inversion.F +++ b/src/sc/OEP_exact_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine OEP_exact_inversion(X,E,k,Voep,W_x) ! ! Exact exchange/static RPA potential (voep in direct space) @@ -31,7 +35,9 @@ subroutine OEP_exact_inversion(X,E,k,Voep,W_x) ! ! I/O ! -#include + USE_MEMORY + ! + implicit none real(SP),intent(out) :: Voep(fft_size) complex(SP),intent(in) :: W_x(nkibz,maxval(n_met_bands),fft_size) type(X_t) :: X diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index d4521f18d2..ac3012da8d 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG ! +! headers +! +#include +! subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! use pars, ONLY:SP,schlen,cZERO,rZERO @@ -48,7 +52,9 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) use electrons, ONLY:Spin_magn use electric, ONLY:ELECTRIC_alloc,ELECTRIC_free,W_electric ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp)::k,q,Xk diff --git a/src/sc/SC_start_and_restart.F b/src/sc/SC_start_and_restart.F index 5d0b55e2c3..a7fa0104e2 100644 --- a/src/sc/SC_start_and_restart.F +++ b/src/sc/SC_start_and_restart.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine SC_start_and_restart(X,E,Xk,Dip) ! use pars, ONLY:schlen @@ -35,7 +39,9 @@ subroutine SC_start_and_restart(X,E,Xk,Dip) use collision_ext, ONLY:COLLISIONS_naming,COLLISIONS_have_HARTREE use descriptors, ONLY:IO_desc_reset ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(X_t) ::X(2) ! Xx Em1s diff --git a/src/setup/G_shells_finder.F b/src/setup/G_shells_finder.F index 649779f8fb..1fbf8eec47 100644 --- a/src/setup/G_shells_finder.F +++ b/src/setup/G_shells_finder.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! #include +#include +! ! subroutine G_shells_finder() ! @@ -27,7 +31,9 @@ subroutine G_shells_finder() use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/setup/QP_state_table_setup.F b/src/setup/QP_state_table_setup.F index 41294b7697..81ecaf9cc6 100644 --- a/src/setup/QP_state_table_setup.F +++ b/src/setup/QP_state_table_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_state_table_setup(en) ! ! There are 2 objects that command the QP corrections @@ -33,7 +37,9 @@ subroutine QP_state_table_setup(en) use SC, ONLY:l_SC_diagonal #endif ! -#include + USE_MEMORY + ! + implicit none type(levels)::en ! ! Work Space diff --git a/src/setup/build_spin_sop.F b/src/setup/build_spin_sop.F index ab5d750a78..ed78d7d037 100644 --- a/src/setup/build_spin_sop.F +++ b/src/setup/build_spin_sop.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! #include +#include +! ! subroutine build_spin_sop() ! @@ -17,7 +21,9 @@ subroutine build_spin_sop() use electrons, ONLY:n_spinor use gpu_m, ONLY:have_gpu ! -#include + USE_MEMORY + ! + implicit none ! complex(SP) ::t_rev(2,2) complex(SP) ::spin_RX_delta(2,2),spin_RY_beta(2,2),spin_RZ_alpha(2,2) diff --git a/src/setup/eval_Mtot.F b/src/setup/eval_Mtot.F index 80beaa177d..1747addfb6 100644 --- a/src/setup/eval_Mtot.F +++ b/src/setup/eval_Mtot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine eval_Mtot(en,k,q) ! use pars, ONLY:SP @@ -18,7 +22,9 @@ subroutine eval_Mtot(en,k,q) use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,& & PARALLEL_WF_index ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp) ::k,q diff --git a/src/setup/eval_minus_G.F b/src/setup/eval_minus_G.F index d1354a108f..1229452af7 100644 --- a/src/setup/eval_minus_G.F +++ b/src/setup/eval_minus_G.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! subroutine eval_minus_G() ! @@ -17,7 +21,9 @@ subroutine eval_minus_G() use R_lattice, ONLY:ng_closed,g_rot,minus_G use R_lattice, ONLY:DEV_VAR(minus_G) ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/setup/setup.F b/src/setup/setup.F index 2c4594d527..f8fd2da344 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +!#include +! subroutine setup(en,Xen,Ken,k,Xk) ! use pars, ONLY:SP,pi,schlen @@ -44,11 +49,12 @@ subroutine setup(en,Xen,Ken,k,Xk) !use IO_m, ONLY:netcdf_call #endif ! -#include + USE_MEMORY + ! + implicit none ! ! For I/O debug, see below #if defined _HDF5_IO -!#include #endif ! type(levels) ::en,Xen,Ken diff --git a/src/tddft/TDDFT_ALDA_G_space.F b/src/tddft/TDDFT_ALDA_G_space.F index 4293148a8f..8a2c43e3b2 100644 --- a/src/tddft/TDDFT_ALDA_G_space.F +++ b/src/tddft/TDDFT_ALDA_G_space.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine TDDFT_ALDA_G_space(E,k) ! use pars, ONLY:DP,SP @@ -18,7 +22,9 @@ subroutine TDDFT_ALDA_G_space(E,k) use global_XC, ONLY:WF_xc_functional,WF_kind use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E type(bz_samp)::k diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 12b1300ca6..e7cde0d870 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! #include ! +! subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index 0c815df0e5..bd5feda5fc 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! #include ! +! subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode) ! ! Calculates the F_xc scattering diff --git a/src/tddft/TDDFT_BSK_2_FXC.F b/src/tddft/TDDFT_BSK_2_FXC.F index 76ff5f1bde..13b1645edf 100644 --- a/src/tddft/TDDFT_BSK_2_FXC.F +++ b/src/tddft/TDDFT_BSK_2_FXC.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! use pars, ONLY:SP @@ -23,7 +27,9 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,& & NONE,OP_WR_CL,REP,VERIFY use frequency, ONLY:w_samp -#include + USE_MEMORY + ! + implicit none type(w_samp) ::W integer ::ik1,ik2,O_x_dim,iq complex(SP) ::O1x(FXC_n_g_corr,O_x_dim),O2x(FXC_n_g_corr,O_x_dim) diff --git a/src/tddft/TDDFT_BSK_disk_2_FXC.F b/src/tddft/TDDFT_BSK_disk_2_FXC.F index 86b9146506..9016c6e62f 100644 --- a/src/tddft/TDDFT_BSK_disk_2_FXC.F +++ b/src/tddft/TDDFT_BSK_disk_2_FXC.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine TDDFT_BSK_disk_2_FXC(iq,Xk,W,X_static) ! use pars, ONLY:SP,pi @@ -24,7 +28,9 @@ subroutine TDDFT_BSK_disk_2_FXC(iq,Xk,W,X_static) use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD,RD,NONE,RD_CL,VERIFY,OP_RD_CL,REP use TDDFT, ONLY:F_xc_gspace,FXC_n_g_corr,FXC_K_diagonal,io_BS_Fxc -#include + USE_MEMORY + ! + implicit none type(bz_samp) ::Xk type(w_samp) ::W integer ::iq diff --git a/src/tddft/TDDFT_do_X_W_typs.F b/src/tddft/TDDFT_do_X_W_typs.F index 28526fecde..8f24aa5de2 100644 --- a/src/tddft/TDDFT_do_X_W_typs.F +++ b/src/tddft/TDDFT_do_X_W_typs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine TDDFT_do_X_W_typs(iq,X,wv) ! ! Prepare X and wv types for a TDDFT calculation @@ -21,7 +25,9 @@ subroutine TDDFT_do_X_W_typs(iq,X,wv) use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,VERIFY,REP ! -#include + USE_MEMORY + ! + implicit none ! type(X_t) :: X type(w_samp):: wv diff --git a/src/wf_and_fft/PP_compute_becp.F b/src/wf_and_fft/PP_compute_becp.F index c7b7cc13a8..df8b337445 100644 --- a/src/wf_and_fft/PP_compute_becp.F +++ b/src/wf_and_fft/PP_compute_becp.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF IM ! +! headers +! +#include +! subroutine PP_compute_becp(becp, npwk, wf_nb, wf_c, wf_b_indx) ! ! Compute becp = < beta_j | wfc_n > matrix elements @@ -18,7 +22,9 @@ subroutine PP_compute_becp(becp, npwk, wf_nb, wf_c, wf_b_indx) & allocate_bec_type,calbec use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! ! vars ! diff --git a/src/wf_and_fft/PP_rotate_becp.F b/src/wf_and_fft/PP_rotate_becp.F index 3a254fa7d3..d7047c480e 100644 --- a/src/wf_and_fft/PP_rotate_becp.F +++ b/src/wf_and_fft/PP_rotate_becp.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF IM ! +! headers +! +#include +! subroutine PP_rotate_becp(isc,ibec,obec) ! ! isc(1), ibnd @@ -26,7 +30,9 @@ subroutine PP_rotate_becp(isc,ibec,obec) use R_lattice, ONLY:k_pt,b use qe_pseudo_m, ONLY:bec_type,beccopy,d1,d2,d3,nh,upf,indv_ijkb0 ! -#include + USE_MEMORY + ! + implicit none ! ! vars ! diff --git a/src/wf_and_fft/PP_scatterBamp_init.F b/src/wf_and_fft/PP_scatterBamp_init.F index 7150557f60..a2cc8a1743 100644 --- a/src/wf_and_fft/PP_scatterBamp_init.F +++ b/src/wf_and_fft/PP_scatterBamp_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF IM ! +! headers +! +#include +! subroutine PP_scatterBamp_init(isc) ! ! init USPP workspace in isc scatterBamp argument @@ -16,7 +20,9 @@ subroutine PP_scatterBamp_init(isc) use vec_operate, ONLY:c2a use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! ! vars ! diff --git a/src/wf_and_fft/PP_uspp_init.F b/src/wf_and_fft/PP_uspp_init.F index c3ab7e0ad3..a455285e3b 100644 --- a/src/wf_and_fft/PP_uspp_init.F +++ b/src/wf_and_fft/PP_uspp_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF IM ! +! headers +! +#include +! subroutine PP_uspp_init() ! ! checks and reads USPP DB, and, in case, initialize @@ -26,7 +30,9 @@ subroutine PP_uspp_init() & qe_g=>g, qe_gg=>gg, qe_ngm=>ngm, qe_mill=>mill use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/wf_and_fft/PP_vloc_augment.F b/src/wf_and_fft/PP_vloc_augment.F index 453940c0ae..637c494441 100644 --- a/src/wf_and_fft/PP_vloc_augment.F +++ b/src/wf_and_fft/PP_vloc_augment.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF IM ! +! headers +! +#include +! subroutine PP_vloc_augment(QP_Vloc,Vloc,ik,ib,ibp) ! ! Add the USPP augmentation to the matrix element of a local potential @@ -19,7 +23,9 @@ subroutine PP_vloc_augment(QP_Vloc,Vloc,ik,ib,ibp) #endif use qe_pseudo_m, ONLY:qe_omega=>omega,qe_ngm=>ngm,becprod ! -#include + USE_MEMORY + ! + implicit none ! ! vars ! diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index e9b43dddaf..5b757a8943 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! subroutine WF_alloc(WF,k_extrema_only) ! use pars, ONLY:cZERO @@ -15,8 +20,9 @@ subroutine WF_alloc(WF,k_extrema_only) use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_memset_d ! -#include -#include + USE_MEMORY + ! + implicit none ! type(WAVEs) :: WF logical, intent(in) :: k_extrema_only diff --git a/src/wf_and_fft/WF_derivative.F b/src/wf_and_fft/WF_derivative.F index 3a12d9f168..fe71ae859c 100644 --- a/src/wf_and_fft/WF_derivative.F +++ b/src/wf_and_fft/WF_derivative.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine WF_derivative(derivative_bands,derivative_kpt,derivative_sppol,do_derivative,use_live_timing) ! ! Remember wf_t = -i \der_t wf with t=x,y,z @@ -25,7 +29,9 @@ subroutine WF_derivative(derivative_bands,derivative_kpt,derivative_sppol,do_der use SC, ONLY:SC_bands,found_SC_DB #endif ! -#include + USE_MEMORY + ! + implicit none ! Input variables integer,intent(in) :: derivative_bands(2) integer,intent(in) :: derivative_kpt(2) diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index dd02d97124..2865a84803 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +#include +! subroutine WF_free(WF,keep_fft,keep_states_to_load) ! use wave_func, ONLY:WAVEs @@ -12,8 +17,9 @@ subroutine WF_free(WF,keep_fft,keep_states_to_load) use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_mapped ! -#include -#include + USE_MEMORY + ! + implicit none ! type(WAVEs) :: WF logical, optional :: keep_fft diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 42978a8396..1edc394c39 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM AF ! +! headers +! #include +#include +! ! !> @brief Load wave-function in different forms !! @@ -57,7 +61,9 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memcpy_d2h,devxlib_memcpy_d2d,& devxlib_allocated,devxlib_memset_d ! -#include + USE_MEMORY + ! + implicit none ! integer :: iG_in,iGo_max_in,bands_to_load(2),kpts_to_load(2) type(WAVEs), target :: WF diff --git a/src/wf_and_fft/WF_rotate.F b/src/wf_and_fft/WF_rotate.F index 1f77975bdf..f122fe468b 100644 --- a/src/wf_and_fft/WF_rotate.F +++ b/src/wf_and_fft/WF_rotate.F @@ -5,7 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! #include +! ! subroutine WF_rotate(ik,i_sp_pol,WFo,wf_size) ! diff --git a/src/wf_and_fft/WF_shift_kpoint.F b/src/wf_and_fft/WF_shift_kpoint.F index bd35a1c488..cefefce7ee 100644 --- a/src/wf_and_fft/WF_shift_kpoint.F +++ b/src/wf_and_fft/WF_shift_kpoint.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! #include +#include +! ! subroutine WF_shift_kpoint_gpu(b_to_shift,nb_to_shift,ikbz,i_sp_pol,wf_shift,Xk,WF_k_in,WF_k_out) ! @@ -17,7 +21,9 @@ subroutine WF_shift_kpoint_gpu(b_to_shift,nb_to_shift,ikbz,i_sp_pol,wf_shift,Xk, use devxlib, ONLY: devxlib_memcpy_d2d, devxlib_memset_d use gpu_m, ONLY: have_gpu ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: wf_shift(3),ikbz,i_sp_pol,b_to_shift(2),nb_to_shift type(bz_samp), intent(in) :: Xk diff --git a/src/wf_and_fft/eval_GradOperator.F b/src/wf_and_fft/eval_GradOperator.F index 594556b8ba..d23783ee56 100644 --- a/src/wf_and_fft/eval_GradOperator.F +++ b/src/wf_and_fft/eval_GradOperator.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine eval_GradOperator() ! ! On the fft grid the gradient of a periodic function f(r) acts as @@ -23,7 +27,9 @@ subroutine eval_GradOperator() use FFT_m, ONLY:fft_size,fft_dim,fftw_plan,fft_g_table use D_lattice, ONLY:R_m_R,Grad_R use R_lattice, ONLY:ng_vec,g_vec -#include + USE_MEMORY + ! + implicit none ! ! Work space ! diff --git a/src/wf_and_fft/eval_R_minus_R.F b/src/wf_and_fft/eval_R_minus_R.F index 8267d1ee72..37d7c35e8f 100644 --- a/src/wf_and_fft/eval_R_minus_R.F +++ b/src/wf_and_fft/eval_R_minus_R.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine eval_R_minus_R() ! ! Evaluate the R_i-R_j table ! use FFT_m, ONLY:fft_size,fft_dim,modx use D_lattice, ONLY:R_m_R -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/wf_and_fft/fft_3d_cuda.F b/src/wf_and_fft/fft_3d_cuda.F index 757e21109a..a061f69a5c 100644 --- a/src/wf_and_fft/fft_3d_cuda.F +++ b/src/wf_and_fft/fft_3d_cuda.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): AF ! +! headers +! +#include +#include +! !===================================================================== ! Driver to 3D FFT: FFTW, Goedecker ! @@ -27,7 +32,6 @@ ! !===================================================================== ! -#include ! subroutine fft_3d_cuda(c_d,n,fft_sign,cufft_plan) ! @@ -42,7 +46,9 @@ subroutine fft_3d_cuda(c_d,n,fft_sign,cufft_plan) #endif use gpu_m, only: gpu_devsync ! -#include + USE_MEMORY + ! + implicit none ! integer :: fft_sign,n(3) integer :: cufft_plan diff --git a/src/wf_and_fft/fft_3d_hip.F b/src/wf_and_fft/fft_3d_hip.F index 0ccb368c69..c81068d1af 100644 --- a/src/wf_and_fft/fft_3d_hip.F +++ b/src/wf_and_fft/fft_3d_hip.F @@ -3,6 +3,11 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): AF +! +! headers +! +#include +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -43,7 +48,6 @@ ! !===================================================================== ! -#include ! subroutine fft_3d_hip(c_d,n,fft_sign,hipfft_plan) ! @@ -53,7 +57,9 @@ subroutine fft_3d_hip(c_d,n,fft_sign,hipfft_plan) use devxlib_environment use hipfft_m ! -#include + USE_MEMORY + ! + implicit none ! integer :: fft_sign,n(3) type(c_ptr) :: hipfft_plan diff --git a/src/wf_and_fft/fft_free.F b/src/wf_and_fft/fft_free.F index 4d7b8933bc..18ca6b5b48 100644 --- a/src/wf_and_fft/fft_free.F +++ b/src/wf_and_fft/fft_free.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! subroutine fft_free() ! @@ -30,7 +34,9 @@ subroutine fft_free() # endif #endif ! -#include + USE_MEMORY + ! + implicit none ! integer :: ierr ! diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index 6cfeadb894..e5d90cb60b 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include +#include +! ! subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) ! @@ -30,7 +34,9 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) use FFT_m, ONLY:mklgpu_desc #endif ! -#include + USE_MEMORY + ! + implicit none ! integer :: iG_max,iGo_max,ierr logical :: ONLY_SIZE diff --git a/src/wf_and_fft/scatter_Bamp_using_the_gradient.F b/src/wf_and_fft/scatter_Bamp_using_the_gradient.F index 0f74d7359a..e019663f05 100644 --- a/src/wf_and_fft/scatter_Bamp_using_the_gradient.F +++ b/src/wf_and_fft/scatter_Bamp_using_the_gradient.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include ! +! subroutine scatter_Bamp_using_the_gradient(isc,which) ! ! It computs diff --git a/src/wf_and_fft/scatter_Gamp.F b/src/wf_and_fft/scatter_Gamp.F index c057c73dcf..384a440b18 100644 --- a/src/wf_and_fft/scatter_Gamp.F +++ b/src/wf_and_fft/scatter_Gamp.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine DEV_SUB(scatter_Gamp)(isc,mode) ! ! INCLUDED in: scatter_Gamp_incl.F @@ -26,7 +30,9 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) use gpu_m use timing_m ! -#include + USE_MEMORY + ! + implicit none ! type(elemental_collision), target::isc character(1) ::mode diff --git a/src/wf_and_fft/scatter_Modscr.F b/src/wf_and_fft/scatter_Modscr.F index 2f63cc0819..e1eaf860e3 100644 --- a/src/wf_and_fft/scatter_Modscr.F +++ b/src/wf_and_fft/scatter_Modscr.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): MGDV ! +! headers +! #include ! +! subroutine scatter_ModScr(isc,mu) ! ! multiply scatterGamp by exp((-|q+G|^2)/(4\mu^2)) diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 86f8579ef3..e8ebc3de63 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG DS DV ! +! headers +! +#include +! subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! ! This routine evaluates the xc functional in yambo @@ -38,7 +42,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) use interfaces, ONLY:el_density_and_current,el_magnetization use pseudo, ONLY:pp_rho_nlcc,pp_has_nlcc,PP_nlcc_free ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp)::Xk diff --git a/src/xc_functionals/XC_nlcc_setup.F b/src/xc_functionals/XC_nlcc_setup.F index 16b41dc32c..02ef46976a 100644 --- a/src/xc_functionals/XC_nlcc_setup.F +++ b/src/xc_functionals/XC_nlcc_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AF ! +! headers +! +#include +! subroutine XC_nlcc_setup() ! ! reads the non-linear core-correction (NLCC) data @@ -23,7 +27,9 @@ subroutine XC_nlcc_setup() use parser_m, ONLY:parser use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,REP -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 8d88dfa979..2758684d79 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) ! ! Electronic density (and current). @@ -61,7 +65,9 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) use real_time, ONLY:RTibz #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp)::k type(levels) ::E diff --git a/ypp/YPPmodules/mod_YPP_ELPH.F b/ypp/YPPmodules/mod_YPP_ELPH.F index c6b7dfb4b3..fa2bbefe8f 100644 --- a/ypp/YPPmodules/mod_YPP_ELPH.F +++ b/ypp/YPPmodules/mod_YPP_ELPH.F @@ -5,13 +5,19 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! module YPP_ELPH ! use pars, ONLY:SP,schlen,DP use D_lattice, ONLY:n_atoms use R_lattice, ONLY:nkbz ! -#include + USE_MEMORY + ! + implicit none ! logical :: l_phonons logical :: l_eliashberg diff --git a/ypp/YPPmodules/mod_YPP_real_time.F b/ypp/YPPmodules/mod_YPP_real_time.F index b654048a83..cf2062ae05 100644 --- a/ypp/YPPmodules/mod_YPP_real_time.F +++ b/ypp/YPPmodules/mod_YPP_real_time.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! module YPP_real_time ! use units, ONLY:HA2EV use pars, ONLY:schlen,SP,DP,rZERO ! -#include + USE_MEMORY + ! + implicit none ! ! RT ! diff --git a/ypp/bits/WANNIER_driver.F b/ypp/bits/WANNIER_driver.F index 28cc20ddc9..3670aaae12 100644 --- a/ypp/bits/WANNIER_driver.F +++ b/ypp/bits/WANNIER_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM AR ! +! headers +! +#include +! subroutine WANNIER_driver(k,E) ! ! Latest update: September 14th, 2016 by Antimo Marrazzo (antimo.marrazzo@epfl.ch) @@ -22,7 +26,9 @@ subroutine WANNIER_driver(k,E) use QP_m, ONLY:QP_t,QP_reset use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,LOG,DUMP -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k type(levels) ::E @@ -85,7 +91,9 @@ subroutine scan_file_to(keyword,found,iun_nnkp) !---Subroutine from Wannier90, GPL license------------------------------ !----------------------------------------------------------------------- ! -#include + USE_MEMORY + ! + implicit none ! integer:: iun_nnkp character(len=*), intent(in) :: keyword diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index ba094fe786..79fcd03dea 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine WF_map_perturbative_SOC(kpt,En) ! use YPPm, ONLY:perturbative_SOC_path,SOC_split,SOC_bands_to_map,& @@ -25,7 +29,9 @@ subroutine WF_map_perturbative_SOC(kpt,En) use LIVE_t, ONLY:live_timing use interfaces, ONLY:io_DB1_selective_scan ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: kpt type(levels), intent(inout) :: En diff --git a/ypp/dipoles/DIPOLE_ypp_driver.F b/ypp/dipoles/DIPOLE_ypp_driver.F index 9fd587868c..b4aadcd3ca 100644 --- a/ypp/dipoles/DIPOLE_ypp_driver.F +++ b/ypp/dipoles/DIPOLE_ypp_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine DIPOLE_ypp_driver(k,E,q) ! use pars, ONLY:SP,rZERO,schlen @@ -26,7 +30,9 @@ subroutine DIPOLE_ypp_driver(k,E,q) use parser_m, ONLY:parser use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do,GRID_k,INTERP_obj ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: k,q type(levels) :: E diff --git a/ypp/el-ph/ELPH_atomic_amplitude.F b/ypp/el-ph/ELPH_atomic_amplitude.F index ec0631db72..c0227d41cb 100644 --- a/ypp/el-ph/ELPH_atomic_amplitude.F +++ b/ypp/el-ph/ELPH_atomic_amplitude.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_atomic_amplitude(q) ! use pars, ONLY:SP @@ -23,7 +27,9 @@ subroutine ELPH_atomic_amplitude(q) use linear_algebra, ONLY:DIAGO,USE_LK use stderr, ONLY:intc ! -#include + USE_MEMORY + ! + implicit none type(bz_samp)::q ! ! Work Space diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index 675d4f7f5a..dbd8197ae1 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_databases(k,E,q) ! use units, ONLY:HA2EV @@ -28,7 +32,9 @@ subroutine ELPH_databases(k,E,q) use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL use parallel_int, ONLY:PARALLEL_global_indexes ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k,q type(levels) ::E diff --git a/ypp/el-ph/ELPH_double_grid.F b/ypp/el-ph/ELPH_double_grid.F index 3053553ea4..33737c9584 100644 --- a/ypp/el-ph/ELPH_double_grid.F +++ b/ypp/el-ph/ELPH_double_grid.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine ELPH_double_grid(k,E,q) ! use pars, ONLY:SP,pi,schlen @@ -20,7 +24,9 @@ subroutine ELPH_double_grid(k,E,q) use IO_m, ONLY:OP_RD_CL,REP,DUMP,OP_WR_CL use parser_m, ONLY:parser ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k,q type(levels) ::E diff --git a/ypp/el-ph/ELPH_eliashberg_dos.F b/ypp/el-ph/ELPH_eliashberg_dos.F index 0a81d7522e..09861b2b21 100644 --- a/ypp/el-ph/ELPH_eliashberg_dos.F +++ b/ypp/el-ph/ELPH_eliashberg_dos.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_eliashberg_dos(k,en,q) ! use pars, ONLY:SP,schlen,pi @@ -26,7 +30,9 @@ subroutine ELPH_eliashberg_dos(k,en,q) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use functions, ONLY:Fermi_fnc_derivative ! -#include + USE_MEMORY + ! + implicit none type(levels) ::en type(bz_samp)::k,q ! diff --git a/ypp/el-ph/ELPH_excitonic_gkkp.F b/ypp/el-ph/ELPH_excitonic_gkkp.F index a008a5f2c8..4b1f2f36ca 100644 --- a/ypp/el-ph/ELPH_excitonic_gkkp.F +++ b/ypp/el-ph/ELPH_excitonic_gkkp.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_excitonic_gkkp(Xk) ! use pars, ONLY:SP,schlen,cZERO @@ -24,7 +28,9 @@ subroutine ELPH_excitonic_gkkp(Xk) use stderr, ONLY:intc use YPPm, ONLY:EXCITONS_user_indexes,EXCITONS_n_user_states ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk ! diff --git a/ypp/el-ph/ELPH_general_gFsq.F b/ypp/el-ph/ELPH_general_gFsq.F index 6d7fedfbec..148ecbfc6c 100644 --- a/ypp/el-ph/ELPH_general_gFsq.F +++ b/ypp/el-ph/ELPH_general_gFsq.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine ELPH_general_gFsq(k,en,Xk,Xen,q,BS_E_degs) ! use pars, ONLY:SP,schlen @@ -30,7 +34,9 @@ subroutine ELPH_general_gFsq(k,en,Xk,Xen,q,BS_E_degs) use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use functions, ONLY:Fermi_fnc_derivative ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en,Xen type(bz_samp)::k,Xk,q diff --git a/ypp/el-ph/ELPH_plot_gkkp.F b/ypp/el-ph/ELPH_plot_gkkp.F index a52ee328f8..c52ed987ff 100644 --- a/ypp/el-ph/ELPH_plot_gkkp.F +++ b/ypp/el-ph/ELPH_plot_gkkp.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine ELPH_plot_gkkp(k,E,q) ! use pars, ONLY:SP,pi,schlen @@ -20,7 +24,9 @@ subroutine ELPH_plot_gkkp(k,E,q) use stderr, ONLY:intc use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k,q type(levels) ::E diff --git a/ypp/el-ph/Eliashberg_Dos_Func.F b/ypp/el-ph/Eliashberg_Dos_Func.F index 6cf3b7c7db..1c20218438 100644 --- a/ypp/el-ph/Eliashberg_Dos_Func.F +++ b/ypp/el-ph/Eliashberg_Dos_Func.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! real(SP) function Eliashberg_Dos_Func(iq,im,ph_en, ph_broad, PH_E, q) ! use pars, ONLY:SP @@ -13,7 +17,9 @@ real(SP) function Eliashberg_Dos_Func(iq,im,ph_en, ph_broad, PH_E, q) use functions, ONLY:Fermi_fnc_derivative use ELPH, ONLY:PH_freqs_sq,use_PH_DbGd ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: iq,im real(SP), intent(in) :: ph_en,ph_broad diff --git a/ypp/electrons/electrons_WFs.F b/ypp/electrons/electrons_WFs.F index 9398557f78..17f6ec3f3b 100644 --- a/ypp/electrons/electrons_WFs.F +++ b/ypp/electrons/electrons_WFs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine electrons_WFs(Xen) ! use pars, ONLY:SP,lchlen @@ -35,7 +39,9 @@ subroutine electrons_WFs(Xen) use R_lattice, ONLY:nkibz #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::Xen ! diff --git a/ypp/electrons/electrons_angular_momentum.F b/ypp/electrons/electrons_angular_momentum.F index aa44623edd..6d66d868aa 100644 --- a/ypp/electrons/electrons_angular_momentum.F +++ b/ypp/electrons/electrons_angular_momentum.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine electrons_angular_momentum(nkpt_angular,nband_angular) ! ! Important: @@ -29,7 +33,9 @@ subroutine electrons_angular_momentum(nkpt_angular,nband_angular) use units, ONLY:SPEED_OF_LIGHT use com, ONLY:msg,of_open_close ! -#include + USE_MEMORY + ! + implicit none ! ! Input variables integer :: nkpt_angular(2), nband_angular(2) diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index bd5cbb2744..f73d27053d 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS AM ! +! headers +! +#include +! subroutine electrons_bands(Xk,Xen) ! ! Levels produced by this routine: @@ -33,7 +37,9 @@ subroutine electrons_bands(Xk,Xen) use SC, ONLY:SC_neq_kind #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(inout) :: Xk type(levels), intent(inout) :: Xen diff --git a/ypp/electrons/electrons_dos.F b/ypp/electrons/electrons_dos.F index ac6a259d68..7e3d982215 100644 --- a/ypp/electrons/electrons_dos.F +++ b/ypp/electrons/electrons_dos.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine electrons_dos(Xk,Xen) ! use units, ONLY:HA2EV @@ -22,7 +26,9 @@ subroutine electrons_dos(Xk,Xen) use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do,GRID_k,INTERP_obj use stderr, ONLY:intc ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk type(levels) ::Xen diff --git a/ypp/electrons/electrons_driver.F b/ypp/electrons/electrons_driver.F index 37192ecb51..fe9c5e36e0 100644 --- a/ypp/electrons/electrons_driver.F +++ b/ypp/electrons/electrons_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine electrons_driver(Xk,Xen,Xq) ! Use stderr, ONLY:intc,STRING_same @@ -22,7 +26,9 @@ subroutine electrons_driver(Xk,Xen,Xq) use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interpolate, ONLY:INTERP_mode ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk,Xq type(levels) ::Xen diff --git a/ypp/electrons/electrons_magnetization.F b/ypp/electrons/electrons_magnetization.F index c67cd4e13e..0b23f1005f 100644 --- a/ypp/electrons/electrons_magnetization.F +++ b/ypp/electrons/electrons_magnetization.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine electrons_magnetization(Xk,Xen) ! use pars, ONLY:SP,lchlen @@ -18,7 +22,9 @@ subroutine electrons_magnetization(Xk,Xen) use com, ONLY:msg,of_open_close use xc_functionals, ONLY:magn ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk type(levels) ::Xen diff --git a/ypp/electrons/electrons_position.F b/ypp/electrons/electrons_position.F index 4f6e5de39c..a713282336 100644 --- a/ypp/electrons/electrons_position.F +++ b/ypp/electrons/electrons_position.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) ! use pars, ONLY:SP,schlen,pi @@ -20,7 +24,9 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) use stderr, ONLY:intc use interfaces, ONLY:WF_load,WF_free ! -#include + USE_MEMORY + ! + implicit none ! ! Input variables integer :: nkpt_pos(2),nband_pos(2) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 113472e187..1c5d437caa 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DV ! +! headers +! +#include +! subroutine exciton_WFs(Xk,BS_E_degs,iq) ! use pars, ONLY:SP,cZERO,pi @@ -30,7 +34,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use wrapper, ONLY:V_dot_V use vec_operate, ONLY:c2a ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk integer :: BS_E_degs(BSS_n_eig),iq @@ -304,7 +310,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) subroutine expand_grid() ! use FFT_m, ONLY:fft_size -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index dae520a8e3..cec66ac4de 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine excitons_bands(k,Xk,en,Xen,q) ! use pars, ONLY:SP,schlen,rZERO @@ -26,7 +30,9 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk,k,q type(levels) ::Xen,en diff --git a/ypp/excitons/excitons_driver.F b/ypp/excitons/excitons_driver.F index 2a9c181e6f..97531103d5 100644 --- a/ypp/excitons/excitons_driver.F +++ b/ypp/excitons/excitons_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DV DS ! +! headers +! +#include +! subroutine excitons_driver(k,Xk,en,Xen,q) ! use pars, ONLY:SP,pi,schlen @@ -22,7 +26,9 @@ subroutine excitons_driver(k,Xk,en,Xen,q) use YPP_real_time, ONLY:l_RT_abs #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk,k,q type(levels) ::Xen,en diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index aa5019c088..eaee65de9a 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) ! ! This subroutine read and interpolate exciton @@ -18,7 +22,9 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) use com, ONLY:msg use stderr, ONLY:intc ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk,k,q type(levels) ::Xen,en diff --git a/ypp/excitons/excitons_ph_ass_dos.F b/ypp/excitons/excitons_ph_ass_dos.F index 6727f50614..906ab33e40 100644 --- a/ypp/excitons/excitons_ph_ass_dos.F +++ b/ypp/excitons/excitons_ph_ass_dos.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA ! +! headers +! +#include +! subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) ! use pars, ONLY:SP,pi,rZERO,schlen @@ -25,7 +29,9 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) use functions, ONLY:Lorentzian_func,boltzman_f,bose_f use stderr, ONLY:STRING_same,intc ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk,k,q_exc type(levels) ::Xen,en diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index 2f2166b04e..97643cf32c 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DV DS ! +! headers +! +#include +! subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) ! use pars, ONLY:pi @@ -19,7 +23,9 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BSqpts use YPPm, ONLY:BS_R_left,BS_R_right,BS_E,BS_E_SOC_corr,BS_R_PL,BS_R_kerr,Xbsk ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::Xk,k type(levels) ::Xen,en diff --git a/ypp/excitons/excitons_spin.F b/ypp/excitons/excitons_spin.F index 853e1b0f79..9f49497f9e 100644 --- a/ypp/excitons/excitons_spin.F +++ b/ypp/excitons/excitons_spin.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) ! use pars, ONLY:SP,cZERO,rZERO @@ -23,7 +27,9 @@ subroutine excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk integer :: BS_E_degs(BSS_n_eig) diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 83ed0bc7cd..2112acbe5e 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine INIT_ypp(E,instr,FINALIZE) ! use units, ONLY:FS2AUT @@ -60,7 +64,9 @@ subroutine INIT_ypp(E,instr,FINALIZE) use yaml_output, ONLY:yaml_close_stream #endif ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E character(*) ::instr diff --git a/ypp/interface/QP_DBs_initialize.F b/ypp/interface/QP_DBs_initialize.F index 00682ed415..5836777407 100644 --- a/ypp/interface/QP_DBs_initialize.F +++ b/ypp/interface/QP_DBs_initialize.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA ! +! headers +! +#include +! subroutine QP_DBs_initialize() ! ! QPDB_states -> input file @@ -18,7 +22,9 @@ subroutine QP_DBs_initialize() use YPPm, ONLY:l_QP_DBs_create_and_modify,n_QP_dbs,& & QP_user_corrections,QP_db_input_control,l_QP_DBs_manipulate ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/ypp/k-points/k_circuit_driver.F b/ypp/k-points/k_circuit_driver.F index becfe511d9..34054ec65b 100644 --- a/ypp/k-points/k_circuit_driver.F +++ b/ypp/k-points/k_circuit_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS CA AM ! +! headers +! +#include +! subroutine k_circuit_driver(PATH,n_points) ! use pars, ONLY:SP @@ -19,7 +23,9 @@ subroutine k_circuit_driver(PATH,n_points) & CIRCUIT_made_of_SPECIAL_k,BANDS_from_db,SPECIAL_k,& & BANDS_path,CIRCUIT_k_label,SPECIAL_k_label ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: PATH integer :: n_points diff --git a/ypp/k-points/k_circuit_made_of_special_points.F b/ypp/k-points/k_circuit_made_of_special_points.F index 1c24a1a1aa..78f03cd13a 100644 --- a/ypp/k-points/k_circuit_made_of_special_points.F +++ b/ypp/k-points/k_circuit_made_of_special_points.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_circuit_made_of_special_points( PATH, n_points ) ! use pars, ONLY:SP,schlen @@ -17,7 +21,9 @@ subroutine k_circuit_made_of_special_points( PATH, n_points ) & n_SPECIAL_k_MAX,CIRCUIT_k_label,CIRCUIT_k_norm,CIRCUIT_made_of_SPECIAL_k use stderr, ONLY:STRING_split,STRING_same,intc ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: PATH integer :: n_points diff --git a/ypp/k-points/k_circuit_made_of_user_points.F b/ypp/k-points/k_circuit_made_of_user_points.F index cc467bca46..66b957a852 100644 --- a/ypp/k-points/k_circuit_made_of_user_points.F +++ b/ypp/k-points/k_circuit_made_of_user_points.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS CA AM ! +! headers +! +#include +! subroutine k_circuit_made_of_user_points( ) ! use pars, ONLY:SP,schlen @@ -13,7 +17,9 @@ subroutine k_circuit_made_of_user_points( ) use parser_m, ONLY:PARSER_array use YPPm, ONLY:BANDS_steps,USER_k,CIRCUIT_k,coo_in,coo_out,K_transform,PROJECT_mode ! -#include + USE_MEMORY + ! + implicit none ! ! Work space ! diff --git a/ypp/k-points/k_find_border_and_merge.F b/ypp/k-points/k_find_border_and_merge.F index c494f6096d..2e5e1b9e43 100644 --- a/ypp/k-points/k_find_border_and_merge.F +++ b/ypp/k-points/k_find_border_and_merge.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine k_find_border_and_merge(FineGd_E,FineGd_k,n_FineGd_DBs,FineGd_io_E,FineGd_io_k,Xk,l_skip_border_pts) ! use R_lattice, ONLY:bz_samp,k_the_nearest,bz_samp_reset @@ -12,7 +16,9 @@ subroutine k_find_border_and_merge(FineGd_E,FineGd_k,n_FineGd_DBs,FineGd_io_E,Fi use stderr, ONLY:intc use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: n_FineGd_DBs type(levels), intent(inout) :: FineGd_io_E(n_FineGd_DBs) diff --git a/ypp/k-points/k_grids.F b/ypp/k-points/k_grids.F index 0089bf1c12..de357c96ea 100644 --- a/ypp/k-points/k_grids.F +++ b/ypp/k-points/k_grids.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_grids(en,k,Xk,q) ! use pars, ONLY:SP,schlen,zero_dfl @@ -23,7 +27,9 @@ subroutine k_grids(en,k,Xk,q) use zeros, ONLY:k_iku_zero use YPP_interfaces, ONLY:k_special ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::en type(bz_samp)::k,Xk,q diff --git a/ypp/k-points/k_map_fine_to_coarse.F b/ypp/k-points/k_map_fine_to_coarse.F index e8eca347b4..cab188d79e 100644 --- a/ypp/k-points/k_map_fine_to_coarse.F +++ b/ypp/k-points/k_map_fine_to_coarse.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine k_map_fine_to_coarse(zone,Xk,FG,FineGd_k,Xen) ! use pars, ONLY:SP @@ -13,7 +17,9 @@ subroutine k_map_fine_to_coarse(zone,Xk,FG,FineGd_k,Xen) use R_lattice, ONLY:bz_samp,bz_fine_grid,bz_samp_FineGd_alloc use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! character(*) , intent(in) :: zone type(bz_fine_grid), intent(inout) :: FG diff --git a/ypp/k-points/k_map_fine_to_coarse_driver.F b/ypp/k-points/k_map_fine_to_coarse_driver.F index 98e2eb3672..79d9891fb7 100644 --- a/ypp/k-points/k_map_fine_to_coarse_driver.F +++ b/ypp/k-points/k_map_fine_to_coarse_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine k_map_fine_to_coarse_driver(Xk,Xen) ! use pars, ONLY:SP @@ -16,7 +20,9 @@ subroutine k_map_fine_to_coarse_driver(Xk,Xen) use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR_CL ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: Xk type(levels) :: Xen diff --git a/ypp/k-points/k_map_fine_to_coarse_engine.F b/ypp/k-points/k_map_fine_to_coarse_engine.F index 6ac0468c97..496a1bcf21 100644 --- a/ypp/k-points/k_map_fine_to_coarse_engine.F +++ b/ypp/k-points/k_map_fine_to_coarse_engine.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_map_fine_to_coarse_engine(zone,pts_fg,N_pts_fg,pts_cg,N_pts_cg,MAP) ! use pars, ONLY:SP,rZERO,zero_dfl @@ -15,7 +19,9 @@ subroutine k_map_fine_to_coarse_engine(zone,pts_fg,N_pts_fg,pts_cg,N_pts_cg,MAP) use LIVE_t, ONLY:live_timing use com, ONLY:msg ! -#include + USE_MEMORY + ! + implicit none ! character(*) , intent(in) :: zone integer , intent(in) :: N_pts_fg,N_pts_cg diff --git a/ypp/k-points/k_map_fine_to_coarse_init.F b/ypp/k-points/k_map_fine_to_coarse_init.F index 8e4071acbb..370494f692 100644 --- a/ypp/k-points/k_map_fine_to_coarse_init.F +++ b/ypp/k-points/k_map_fine_to_coarse_init.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS CA ! +! headers +! +#include +! subroutine k_map_fine_to_coarse_init(Xk,Xen,FineGd_k,FineGd_is_expanded,PH_grid) ! use pars, ONLY:SP,pi @@ -26,7 +30,9 @@ subroutine k_map_fine_to_coarse_init(Xk,Xen,FineGd_k,FineGd_is_expanded,PH_grid) use vec_operate, ONLY:c2a,v_is_zero #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: Xk type(levels), intent(inout) :: Xen diff --git a/ypp/k-points/k_map_fine_to_coarse_reduce.F b/ypp/k-points/k_map_fine_to_coarse_reduce.F index 921b1e2502..1e423b2d4e 100644 --- a/ypp/k-points/k_map_fine_to_coarse_reduce.F +++ b/ypp/k-points/k_map_fine_to_coarse_reduce.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! logical function k_map_fine_to_coarse_reduce(FineGd_k) ! use zeros, ONLY:k_rlu_zero @@ -13,7 +17,9 @@ logical function k_map_fine_to_coarse_reduce(FineGd_k) use R_lattice, ONLY:bz_samp use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(inout) :: FineGd_k ! diff --git a/ypp/k-points/k_random.F b/ypp/k-points/k_random.F index c69a6a47b4..34c1909df8 100644 --- a/ypp/k-points/k_random.F +++ b/ypp/k-points/k_random.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_random(Xk,No_Weight) ! use pars, ONLY:SP,DP,lchlen @@ -18,7 +22,9 @@ subroutine k_random(Xk,No_Weight) use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use parser_m, ONLY:parser ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: Xk logical, intent(in) :: No_Weight diff --git a/ypp/k-points/k_special.F b/ypp/k-points/k_special.F index d5bcabd20f..79d229e166 100644 --- a/ypp/k-points/k_special.F +++ b/ypp/k-points/k_special.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine k_special(LIST_only) ! ! Special k-points. Output in IKU. @@ -27,7 +31,9 @@ subroutine k_special(LIST_only) use YPPm, ONLY:K_transform,SPECIAL_k,n_SPECIAL_k_MAX,SPECIAL_k_label,coo_out use LIVE_t, ONLY:live_timing_is_on ! -#include + USE_MEMORY + ! + implicit none ! ! Input ! diff --git a/ypp/plotting/PROJECTION_plot.F b/ypp/plotting/PROJECTION_plot.F index 81315d3127..abbf069583 100644 --- a/ypp/plotting/PROJECTION_plot.F +++ b/ypp/plotting/PROJECTION_plot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine PROJECTION_plot( what, N, Ns, bands, W, TIME, OBS_K, OBS_B) ! use pars, ONLY:SP,schlen @@ -20,7 +24,9 @@ subroutine PROJECTION_plot( what, N, Ns, bands, W, TIME, OBS_K, OBS_B) use interpolate, ONLY:GRID_k use stderr, ONLY:intc,real2ch,STRING_remove ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what integer :: N,Ns,bands(2) diff --git a/ypp/plotting/plot_gnuplot.F b/ypp/plotting/plot_gnuplot.F index 194382e305..e3be7d91c2 100644 --- a/ypp/plotting/plot_gnuplot.F +++ b/ypp/plotting/plot_gnuplot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DV ! +! headers +! +#include +! subroutine plot_gnuplot(eval_only) ! use pars, ONLY:SP,schlen @@ -15,7 +19,9 @@ subroutine plot_gnuplot(eval_only) & plot_is_1D,plot_is_2D,l_free_hole,l_average_eh use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none logical :: eval_only ! ! Work Space... diff --git a/ypp/plotting/plot_interpolated_values.F b/ypp/plotting/plot_interpolated_values.F index 9039bd9eef..4b0dca1282 100644 --- a/ypp/plotting/plot_interpolated_values.F +++ b/ypp/plotting/plot_interpolated_values.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS AM ! +! headers +! +#include +! subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfiles,basename,int_kind,i_T) ! use units, ONLY:HA2EV @@ -23,7 +27,9 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile use YPP_real_time, ONLY:GreenF_T_and_W #endif ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp), intent(in) :: Xk,LOCAL_k type(levels), intent(in) :: Xen diff --git a/ypp/plotting/plot_xcrysden.F b/ypp/plotting/plot_xcrysden.F index 629db07ec3..e44823a2ad 100644 --- a/ypp/plotting/plot_xcrysden.F +++ b/ypp/plotting/plot_xcrysden.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DV ! +! headers +! +#include +! subroutine plot_xcrysden() ! use pars, ONLY:SP,schlen @@ -16,7 +20,9 @@ subroutine plot_xcrysden() use D_lattice, ONLY:n_atomic_species,n_atoms_species,a,atom_pos,Z_species,n_atoms use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space... ! diff --git a/ypp/qp/QP_DB_expand.F b/ypp/qp/QP_DB_expand.F index 39ffe91c68..388addde69 100644 --- a/ypp/qp/QP_DB_expand.F +++ b/ypp/qp/QP_DB_expand.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_DB_expand( k ) ! use pars, ONLY:schlen @@ -14,7 +18,9 @@ subroutine QP_DB_expand( k ) use IO_m, ONLY:OP_WR_CL,DUMP,OP_RD_CL,LOG use QP_m, ONLY:QP_t,QP_reset ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: k ! diff --git a/ypp/qp/QP_DBs_create_and_modify.F b/ypp/qp/QP_DBs_create_and_modify.F index 764c31a6c8..1135ed5464 100644 --- a/ypp/qp/QP_DBs_create_and_modify.F +++ b/ypp/qp/QP_DBs_create_and_modify.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA AM ! +! headers +! +#include +! subroutine QP_DBs_create_and_modify(en,k) ! use pars, ONLY:SP @@ -16,7 +20,9 @@ subroutine QP_DBs_create_and_modify(en,k) use R_lattice, ONLY:bz_samp use YPPm, ONLY:QP_user_corrections ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: en type(bz_samp),intent(in) :: k diff --git a/ypp/qp/QP_DBs_manipulate.F b/ypp/qp/QP_DBs_manipulate.F index 1bcb759bc3..ad09c57447 100644 --- a/ypp/qp/QP_DBs_manipulate.F +++ b/ypp/qp/QP_DBs_manipulate.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine QP_DBs_manipulate( E ) ! use pars, ONLY:schlen,msg_len @@ -17,7 +21,9 @@ subroutine QP_DBs_manipulate( E ) use interfaces, ONLY:QP_DBs_merge,DESC_write use electrons, ONLY:levels,n_sp_pol ! -#include + USE_MEMORY + ! + implicit none ! type(levels) ::E ! diff --git a/ypp/real_time/NL_exc_driver.F b/ypp/real_time/NL_exc_driver.F index d61fde2721..fa85d22192 100644 --- a/ypp/real_time/NL_exc_driver.F +++ b/ypp/real_time/NL_exc_driver.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): MG ! +! headers +! +#include +! subroutine NL_exc_driver(en,k) ! use R_lattice, ONLY:bz_samp use electrons, ONLY:levels ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: k diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index 5e4834259e..8a426ad8e0 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! headers +! +#include +! subroutine NL_ypp_driver(en,k) ! use YPP_real_time, ONLY:X_order,RT_conf,RT_time,Pol,l_skip_OBS_IO,Pump_path @@ -23,7 +27,9 @@ subroutine NL_ypp_driver(en,k) use RT_control, ONLY:OBS_RT_IO_t use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: k diff --git a/ypp/real_time/RT_1D_Fourier_setup.F b/ypp/real_time/RT_1D_Fourier_setup.F index 073f1504f0..faf0a8683e 100644 --- a/ypp/real_time/RT_1D_Fourier_setup.F +++ b/ypp/real_time/RT_1D_Fourier_setup.F @@ -5,12 +5,18 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_1D_Fourier_setup(FT,RT,N) ! use YPP_real_time, ONLY:OBS_el,Use_FFT,RT_ctl use pars, ONLY:SP,cZERO_DP,cZERO ! -#include + USE_MEMORY + ! + implicit none ! type(OBS_el) :: FT type(RT_ctl) :: RT diff --git a/ypp/real_time/RT_G_two_times_build.F b/ypp/real_time/RT_G_two_times_build.F index 2fe03ba163..805651b1f5 100644 --- a/ypp/real_time/RT_G_two_times_build.F +++ b/ypp/real_time/RT_G_two_times_build.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine RT_G_two_times_build(en,kpt,qpt) ! use pars, ONLY:SP,DP,cZERO,cI,cONE,cZERO,schlen @@ -27,7 +31,9 @@ subroutine RT_G_two_times_build(en,kpt,qpt) use YPP_real_time, ONLY:RT_time,RT_conf,GreenF_T_and_W,Rho_deph use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: en type(bz_samp), intent(in) :: kpt,qpt diff --git a/ypp/real_time/RT_G_two_times_interp_and_plot.F b/ypp/real_time/RT_G_two_times_interp_and_plot.F index c8d3d3ba84..ce61450d24 100644 --- a/ypp/real_time/RT_G_two_times_interp_and_plot.F +++ b/ypp/real_time/RT_G_two_times_interp_and_plot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine RT_G_two_times_interp_and_plot(en,kpt,qpt) ! use pars, ONLY:SP @@ -18,7 +22,9 @@ subroutine RT_G_two_times_interp_and_plot(en,kpt,qpt) use D_lattice, ONLY:lattice use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: kpt,qpt,RT_k diff --git a/ypp/real_time/RT_OBSERVABLES_IO.F b/ypp/real_time/RT_OBSERVABLES_IO.F index b25c2a6604..48f80f04df 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO.F +++ b/ypp/real_time/RT_OBSERVABLES_IO.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only,COM_) ! use YPP_real_time, ONLY:RT_conf,OBS_el @@ -16,7 +20,9 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only use real_time, ONLY:NE_steps,NE_i_time,G_lesser,G_lesser_reference,RT_bands,RT_dyn_step,RT_step use fields, ONLY:Efield,n_ext_fields,Efield_strength ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what type(OBS_el), optional :: Curr,Pol diff --git a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F index 4cf74d2530..bf726060a4 100644 --- a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F +++ b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) ! use YPP_real_time, ONLY:l_force_min_damp,RT_time,OBS_el,RT_ctl @@ -14,7 +18,9 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) use RT_control, ONLY:RT_output use real_time, ONLY:RT_ind_J,RT_P ! -#include + USE_MEMORY + ! + implicit none ! type(OBS_el) :: OBS type(RT_ctl) :: RT diff --git a/ypp/real_time/RT_Polarization.F b/ypp/real_time/RT_Polarization.F index c2385c555d..ed98d82281 100644 --- a/ypp/real_time/RT_Polarization.F +++ b/ypp/real_time/RT_Polarization.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_Polarization(en,k,q) ! use pars, ONLY:cZERO,SP,schlen,rZERO @@ -25,7 +29,9 @@ subroutine RT_Polarization(en,k,q) use DIPOLES, ONLY:DIP_iR use functions, ONLY:Fermi_fnc_derivative ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: k,q diff --git a/ypp/real_time/RT_TRabs_driver.F b/ypp/real_time/RT_TRabs_driver.F index ca5de6ac7d..8f04ae434a 100644 --- a/ypp/real_time/RT_TRabs_driver.F +++ b/ypp/real_time/RT_TRabs_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_transient_absorption(Xen,Xk,Xq) ! use drivers, ONLY:l_rt_carriers_in_use @@ -29,7 +33,9 @@ subroutine RT_transient_absorption(Xen,Xk,Xq) use com, ONLY:msg use interpolate, ONLY:INTERPOLATE_is_quiet ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: Xen type(bz_samp) :: Xk,Xq diff --git a/ypp/real_time/RT_TRabs_output.F b/ypp/real_time/RT_TRabs_output.F index 884e845e6b..234d488041 100644 --- a/ypp/real_time/RT_TRabs_output.F +++ b/ypp/real_time/RT_TRabs_output.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_TRabs_output(what,how,ofile,N_files,W,TIME) ! use pars, ONLY:SP,schlen,pi,cI @@ -19,7 +23,9 @@ subroutine RT_TRabs_output(what,how,ofile,N_files,W,TIME) use BS_solvers, ONLY:BSS_desc use stderr, ONLY:STRING_match,set_real_printed_length ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what,how character(schlen) :: ofile(20) diff --git a/ypp/real_time/RT_TRabs_residuals.F b/ypp/real_time/RT_TRabs_residuals.F index f03a89c1ba..1c329cda14 100644 --- a/ypp/real_time/RT_TRabs_residuals.F +++ b/ypp/real_time/RT_TRabs_residuals.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_TRabs_residuals(what,N_trans,N_dirs,DIP_dir,Xen,Xk,nb,l_EQ) ! use pars, ONLY:SP,pi,cI @@ -19,7 +23,9 @@ subroutine RT_TRabs_residuals(what,N_trans,N_dirs,DIP_dir,Xen,Xk,nb,l_EQ) use real_time, ONLY:RT_bands use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_IND_VAL_BANDS_DIP,PAR_IND_CON_BANDS_DIP ! -#include + USE_MEMORY + ! + implicit none ! character(*) :: what integer :: N_trans,nb(2),N_dirs diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 20429d3f18..56a3768bdf 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! ! Partialy inspired from Octopus v. 3.1.0 ! ! Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch @@ -24,7 +28,9 @@ subroutine RT_X_LRR_real_field(en) use functions, ONLY:theta_function use parser_m, ONLY:parser ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en ! diff --git a/ypp/real_time/RT_X_effective.F b/ypp/real_time/RT_X_effective.F index 81d9a9a261..4833393170 100644 --- a/ypp/real_time/RT_X_effective.F +++ b/ypp/real_time/RT_X_effective.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_X_effective(en) ! use pars, ONLY:SP,lchlen,pi,schlen,cZERO @@ -23,7 +27,9 @@ subroutine RT_X_effective(en) use LIVE_t, ONLY:live_timing use stderr, ONLY:intc,real2ch,STRING_split ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en ! diff --git a/ypp/real_time/RT_X_inversion.F b/ypp/real_time/RT_X_inversion.F index 6396dde12f..9e11003430 100644 --- a/ypp/real_time/RT_X_inversion.F +++ b/ypp/real_time/RT_X_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG ! +! headers +! +#include +! subroutine RT_X_inversion(RT_P_Probe,Susceptibility,Harmonic_Frequency,X_effective) ! use pars, ONLY:SP,pi @@ -15,7 +19,9 @@ subroutine RT_X_inversion(RT_P_Probe,Susceptibility,Harmonic_Frequency,X_effecti use units, ONLY:AUT2FS use com, ONLY:msg use LIVE_t, ONLY:live_timing -#include + USE_MEMORY + ! + implicit none ! real(SP), intent(in) :: RT_P_probe(RT_conf%T_n_steps,N_probes,3),Harmonic_Frequency(0:X_order,N_probe_frequencies) complex(SP), intent(out) :: Susceptibility(0:X_order,N_probe_frequencies),X_effective(0:X_order,N_probe_frequencies,3) diff --git a/ypp/real_time/RT_X_qssin.F b/ypp/real_time/RT_X_qssin.F index efa2f2de9d..e9f17f09d2 100644 --- a/ypp/real_time/RT_X_qssin.F +++ b/ypp/real_time/RT_X_qssin.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA MG ! +! headers +! +#include +! subroutine RT_X_qssin ! use YPP_real_time, ONLY:RT_P_t,RT_conf,Use_FFT,i_t_start,i_t_end @@ -16,7 +20,9 @@ subroutine RT_X_qssin use functions, ONLY:theta_function use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! ! Work Space ! diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 8d28ea74b7..c708595250 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA ! +! headers +! +#include +! subroutine RT_X_response(en,k,q) ! use YPP_real_time, ONLY:Use_FFT,Pol,Curr,N_probe_frequencies,& @@ -19,7 +23,9 @@ subroutine RT_X_response(en,k,q) use fields, ONLY:Efield use parser_m, ONLY:parser ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: k,q diff --git a/ypp/real_time/RT_coefficients_Fourier.F b/ypp/real_time/RT_coefficients_Fourier.F index 8952f8e6f5..7a211c83b1 100644 --- a/ypp/real_time/RT_coefficients_Fourier.F +++ b/ypp/real_time/RT_coefficients_Fourier.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_coefficients_Fourier(nt,P,nw,W,X,X_err,deltaW) ! ! Here I calculate the coefficients of a given Fourier series @@ -13,7 +17,9 @@ subroutine RT_coefficients_Fourier(nt,P,nw,W,X,X_err,deltaW) use YPP_real_time, ONLY:i_t_start,RT_conf use fields, ONLY:EtoT use real_time, ONLY:RT_step -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: nw,nt real(SP), intent(in) :: P(nt),W(nw),deltaW diff --git a/ypp/real_time/RT_coefficients_Inversion.F b/ypp/real_time/RT_coefficients_Inversion.F index 8114a453e1..6e1321c2e0 100644 --- a/ypp/real_time/RT_coefficients_Inversion.F +++ b/ypp/real_time/RT_coefficients_Inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM MG ! +! headers +! +#include +! !> @brief Polarization coefficient inversion see Sec. III in PRB 88, 235113 (2013) !! !! @param[in] NW order of the response functions @@ -22,7 +26,9 @@ subroutine RT_coefficients_Inversion(NW,NX,P,X,W,T_period) use fields, ONLY:Efield use interfaces, ONLY:LINEAR_ALGEBRA_driver use linear_algebra, ONLY:INV -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: NW,NX real(SP), intent(in) :: P(NE_steps),W(NW),T_period diff --git a/ypp/real_time/RT_components_energy_plot.F b/ypp/real_time/RT_components_energy_plot.F index ae30dac46d..60ecbbc291 100644 --- a/ypp/real_time/RT_components_energy_plot.F +++ b/ypp/real_time/RT_components_energy_plot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_components_energy_plot(En,kpt,n_T_steps) ! use units, ONLY:HA2EV,HA2KEL,AUT2FS @@ -25,7 +29,9 @@ subroutine RT_components_energy_plot(En,kpt,n_T_steps) use QP_m, ONLY:QP_table,QP_n_states use interfaces, ONLY:DESC_write ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: kpt type(levels) :: En diff --git a/ypp/real_time/RT_density.F b/ypp/real_time/RT_density.F index 54704a457b..0d0e581071 100644 --- a/ypp/real_time/RT_density.F +++ b/ypp/real_time/RT_density.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine RT_density(en,kpt,qpt) ! use pars, ONLY:SP,schlen,cZERO @@ -27,7 +31,9 @@ subroutine RT_density(en,kpt,qpt) use wave_func, ONLY:WF,wf_ng use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index ! -#include + USE_MEMORY + ! + implicit none ! type(levels) :: en type(bz_samp) :: kpt,qpt diff --git a/ypp/real_time/RT_dos_time_plot.F b/ypp/real_time/RT_dos_time_plot.F index d806adabba..7a03ea205f 100644 --- a/ypp/real_time/RT_dos_time_plot.F +++ b/ypp/real_time/RT_dos_time_plot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine RT_dos_time_plot(En,k,n_T_steps) ! use units, ONLY:HA2EV,AUT2FS @@ -24,7 +28,9 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) use real_time, ONLY:RT_carriers,RT_bands use interpolate, ONLY:GRID_k,INTERPOLATION_driver_seed,INTERPOLATION_driver_do ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) ::k type(levels) ::En diff --git a/ypp/real_time/RT_occ_bands_interpolation.F b/ypp/real_time/RT_occ_bands_interpolation.F index 4360b83175..990d514689 100644 --- a/ypp/real_time/RT_occ_bands_interpolation.F +++ b/ypp/real_time/RT_occ_bands_interpolation.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_occ_bands_interpolation(en,k,q,n_T_steps) ! use pars, ONLY:SP,schlen,rZERO @@ -24,7 +28,9 @@ subroutine RT_occ_bands_interpolation(en,k,q,n_T_steps) & INTERP_obj,INTERP_mode,GRID_k use LIVE_t, ONLY:live_timing ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: n_T_steps type(bz_samp), intent(in) :: k,q diff --git a/ypp/real_time/RT_occ_time_plot.F b/ypp/real_time/RT_occ_time_plot.F index ded3da7ca2..06dbcd40ee 100644 --- a/ypp/real_time/RT_occ_time_plot.F +++ b/ypp/real_time/RT_occ_time_plot.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_occ_time_plot(En,kpt,n_T_steps) ! use drivers, ONLY:l_elel_scatt,l_elph_scatt @@ -28,7 +32,9 @@ subroutine RT_occ_time_plot(En,kpt,n_T_steps) use interfaces, ONLY:DESC_write use timing_m, ONLY:timing ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: kpt type(levels) :: En diff --git a/ypp/real_time/RT_occupations_driver.F b/ypp/real_time/RT_occupations_driver.F index 2a9611328a..1d71a9d9ed 100644 --- a/ypp/real_time/RT_occupations_driver.F +++ b/ypp/real_time/RT_occupations_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AM ! +! headers +! +#include +! subroutine RT_occupations_driver(k,q,en) ! use drivers, ONLY:l_rt_carriers_in_use @@ -18,7 +22,9 @@ subroutine RT_occupations_driver(k,q,en) use YPPm, ONLY:DIPs_mask,l_dipoles,DIPs,DIPs_V_bands use YPP_real_time, ONLY:l_RT_time,l_RT_energy,l_RT_bands,l_RT_dos,RT_conf ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp) :: k,q type(levels) :: en diff --git a/ypp/real_time/RT_split_Polarization.F b/ypp/real_time/RT_split_Polarization.F index de796ffd1c..a60d2f5b14 100644 --- a/ypp/real_time/RT_split_Polarization.F +++ b/ypp/real_time/RT_split_Polarization.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine RT_split_Polarization(nh,nt,W,X,P,what) ! use pars, ONLY:SP,cI,schlen,DP @@ -17,7 +21,9 @@ subroutine RT_split_Polarization(nh,nt,W,X,P,what) ! ! Fourier ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(in) :: nt,nh real(SP), intent(inout):: P(nt,3),W(nh) diff --git a/ypp/real_time/RT_time_configuration_setup.F b/ypp/real_time/RT_time_configuration_setup.F index db3c324e70..96ff941a44 100644 --- a/ypp/real_time/RT_time_configuration_setup.F +++ b/ypp/real_time/RT_time_configuration_setup.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#include +! subroutine RT_time_configuration_setup(what,GENERAL_RT_IO_t) ! use units, ONLY:AUT2FS,pi,HA2EV @@ -14,7 +18,9 @@ subroutine RT_time_configuration_setup(what,GENERAL_RT_IO_t) use real_time, ONLY:RT_step use RT_control, ONLY:TIME_adjust,RT_IO_t ! -#include + USE_MEMORY + ! + implicit none ! character(*), intent(in) :: what type(RT_IO_t), intent(in) :: GENERAL_RT_IO_t diff --git a/ypp/symmetries/fix_ATOMPROJs.F b/ypp/symmetries/fix_ATOMPROJs.F index 52d8bf46c6..2b132b432a 100644 --- a/ypp/symmetries/fix_ATOMPROJs.F +++ b/ypp/symmetries/fix_ATOMPROJs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine fix_ATOMPROJs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_contains_TR) ! use pars, ONLY:SP,lchlen,cZERO @@ -19,7 +23,9 @@ subroutine fix_ATOMPROJs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv, use electrons, ONLY:levels use atom_proj ! -#include + USE_MEMORY + ! + implicit none ! type(levels),intent(in) :: E ! diff --git a/ypp/symmetries/fix_PPs.F b/ypp/symmetries/fix_PPs.F index d09a27b826..07f80c0e66 100644 --- a/ypp/symmetries/fix_PPs.F +++ b/ypp/symmetries/fix_PPs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS ! +! headers +! +#include +! subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_contains_TR) ! use pars, ONLY:SP,lchlen @@ -26,7 +30,9 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont & wf_nc_k_new,wf_igk_new,& & wf_nc_k_new,wf_ncx_new,wf_ncx_save ! -#include + USE_MEMORY + ! + implicit none ! type(levels),intent(in) :: E ! diff --git a/ypp/symmetries/fix_QP_DBs.F b/ypp/symmetries/fix_QP_DBs.F index fb1890a72d..1643043799 100644 --- a/ypp/symmetries/fix_QP_DBs.F +++ b/ypp/symmetries/fix_QP_DBs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS ! +! headers +! +#include +! subroutine fix_QP_DBs(k,k_save,kpoints_map) ! use pars, ONLY:lchlen @@ -18,7 +22,9 @@ subroutine fix_QP_DBs(k,k_save,kpoints_map) use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp),intent(in) :: k type(bz_samp),intent(in) :: k_save diff --git a/ypp/symmetries/fix_SC_DBs.F b/ypp/symmetries/fix_SC_DBs.F index c82015248a..d7a1420d57 100644 --- a/ypp/symmetries/fix_SC_DBs.F +++ b/ypp/symmetries/fix_SC_DBs.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS ! +! headers +! +#include +! subroutine fix_SC_DBs(k,k_save,kpoints_map) ! use pars, ONLY:SP,lchlen @@ -18,7 +22,9 @@ subroutine fix_SC_DBs(k,k_save,kpoints_map) use electrons, ONLY:levels,E_reset,n_sp_pol use R_lattice, ONLY:bz_samp,nkibz ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp),intent(in) :: k type(bz_samp),intent(in) :: k_save diff --git a/ypp/symmetries/fix_WFs_Gshells.F b/ypp/symmetries/fix_WFs_Gshells.F index 8b7102aa4c..7cbca3b02c 100644 --- a/ypp/symmetries/fix_WFs_Gshells.F +++ b/ypp/symmetries/fix_WFs_Gshells.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): CA DS ! +! headers +! #include +#include +! ! subroutine fix_WFs_Gshells(k,k_save,kpoints_map,old_nsym) ! @@ -20,7 +24,9 @@ subroutine fix_WFs_Gshells(k,k_save,kpoints_map,old_nsym) & wf_nc_k_new,l_wf_nc_k_red,ng_vec_new,ng_vec_save,wf_igk_new,& & wf_nc_k_new,wf_ncx_new,wf_ncx_save,wf_ng_new,wf_ng_save,wf_ng_cut ! -#include + USE_MEMORY + ! + implicit none ! type(bz_samp),intent(inout) :: k type(bz_samp),intent(in) :: k_save diff --git a/ypp/symmetries/fix_WFs_and_E.F b/ypp/symmetries/fix_WFs_and_E.F index cc7fcdc28a..159d61779f 100644 --- a/ypp/symmetries/fix_WFs_and_E.F +++ b/ypp/symmetries/fix_WFs_and_E.F @@ -5,7 +5,11 @@ ! ! Authors (see AUTHORS file for details): CA DS ! +! headers +! #include +#include +! ! subroutine fix_WFs_and_E(E,k,k_save,kpoints_map,old_nsym,S_contains_TR) ! @@ -25,7 +29,9 @@ subroutine fix_WFs_and_E(E,k,k_save,kpoints_map,old_nsym,S_contains_TR) & wf_nc_k_new,wf_igk_new,& & wf_nc_k_new,wf_ncx_new,wf_ncx_save,wf_ng_new,wf_ng_save ! -#include + USE_MEMORY + ! + implicit none ! type(levels),intent(in) :: E ! @@ -282,7 +288,9 @@ subroutine map_energies(E,E_new,k,kpoints_map) use electrons, ONLY:levels,E_reset,n_sp_pol use R_lattice, ONLY:bz_samp ! -#include + USE_MEMORY + ! + implicit none ! type(levels), intent(in) :: E type(levels), intent(out) :: E_new diff --git a/ypp/symmetries/fix_symmetries.F b/ypp/symmetries/fix_symmetries.F index 057885e3c1..a8e63f4a9a 100644 --- a/ypp/symmetries/fix_symmetries.F +++ b/ypp/symmetries/fix_symmetries.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): CA DS ! +! headers +! +#include +! subroutine fix_symmetries(old_nsym,old_dl_sop,old_sop_inv,S_contains_TR) ! use pars, ONLY:SP @@ -19,7 +23,9 @@ subroutine fix_symmetries(old_nsym,old_dl_sop,old_sop_inv,S_contains_TR) use D_lattice, ONLY:nsym,dl_sop,i_time_rev,alat,mag_syms,& & i_space_inv,sop_inv,inv_index,symmetry_group_table ! -#include + USE_MEMORY + ! + implicit none ! integer, intent(out) :: old_nsym real(SP),intent(out) :: old_dl_sop(3,3,nsym) diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index 31e4838c17..9d65beda2d 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! +! headers +! +#include +! subroutine symmetries_driver(E,Xk) ! use pars, ONLY:SP @@ -20,7 +24,9 @@ subroutine symmetries_driver(E,Xk) use interfaces, ONLY:WF_load,WF_free,el_magnetization use parser_m, ONLY:parser ! -#include + USE_MEMORY + ! + implicit none ! type(levels),intent(in) :: E type(bz_samp),intent(inout) :: Xk From 7df9f9b3d4e53b5a7174f470b07897332ad90c67 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 3 Nov 2024 13:14:53 +0100 Subject: [PATCH 0834/1367] Version 5.2.0, Revision 23483, Hash bbfcb3647f MODIFIED * configure include/version/version.m4 coulomb/rim_integrate_w.F qp/QP_interpolate_W.F Changes: - [yambo] Saving local changes Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/coulomb/rim_integrate_w.F | 6 +++--- src/qp/QP_interpolate_W.F | 7 ++++++- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 814385b3fd..3aaa59c475 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23442 h.57b1fd05f3. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23483 h.bbfcb3647f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23442 h.57b1fd05f3' -PACKAGE_STRING='Yambo 5.2.0 r.23442 h.57b1fd05f3' +PACKAGE_VERSION='5.2.0 r.23483 h.bbfcb3647f' +PACKAGE_STRING='Yambo 5.2.0 r.23483 h.bbfcb3647f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23442 h.57b1fd05f3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23483 h.bbfcb3647f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23442 h.57b1fd05f3:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23483 h.bbfcb3647f:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23442 h.57b1fd05f3 +Yambo configure 5.2.0 r.23483 h.bbfcb3647f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23442 h.57b1fd05f3, which was +It was created by Yambo $as_me 5.2.0 r.23483 h.bbfcb3647f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23442" -SHASH="57b1fd05f3" +SREVISION="23483" +SHASH="bbfcb3647f" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23442 h.57b1fd05f3, which was +This file was extended by Yambo $as_me 5.2.0 r.23483 h.bbfcb3647f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23442 h.57b1fd05f3 +Yambo config.status 5.2.0 r.23483 h.bbfcb3647f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9673ffbf7d..347fb58301 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23442 h.57b1fd05f3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23483 h.bbfcb3647f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23442" -SHASH="57b1fd05f3" +SREVISION="23483" +SHASH="bbfcb3647f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/rim_integrate_w.F b/src/coulomb/rim_integrate_w.F index a4e8c856d4..086c28e7f9 100644 --- a/src/coulomb/rim_integrate_w.F +++ b/src/coulomb/rim_integrate_w.F @@ -62,7 +62,7 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) ! The final goal is to resale RIM_W. However, since RIM_W ! is not linear in q+G, I need to rescale vslab ! - vslab=vslab/sqrt(eps_env) + !vslab=vslab/sqrt(eps_env) ! ! q /= 0 all terms ! @@ -111,7 +111,7 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) if (slab_vplane1 < 1.e-5) then vslab(i1,1) = sqrt(4._DP*pi*(1.-exp(-q0_def_norm*lcut))/q0_def_norm**2) ! Again, rescaling of vslab due to epsilon environment - vslab(i1,1) = vslab(i1,1)/sqrt(eps_env) + !vslab(i1,1) = vslab(i1,1)/sqrt(eps_env) RIM_acc = RIM_acc + rfac*f_coeff(1,1,1,1,iw)*(4*pi*lcut)**2 RIM_acc_anis = RIM_acc_anis + rfac*f_coeff(1,1,1,1,iw)*(4*pi*lcut)**2 & & *0.5_SP*(em1_anis(idir(2))+em1_anis(idir(3))) @@ -122,7 +122,7 @@ subroutine rim_integrate_w(iq,qr,N_out,em1_anis,Xw) vslab2=4._DP*pi*(1.-exp(-slab_vplane1*lcut)) ! Again, rescaling of vslab due to environment. ! Notice that here this is not the sqrt. - vslab2 = vslab2/eps_env + !vslab2 = vslab2/eps_env ! !Evaluate interpolation function func = f_coeff(1,1,1,1,iw)*exp(-sqrt((f_coeff(2,1,1,1,iw)*(qr(2,i1)+a(2,1)/a(1,1)*qr(1,i1)))**2+& diff --git a/src/qp/QP_interpolate_W.F b/src/qp/QP_interpolate_W.F index 807854871b..4252813fd8 100644 --- a/src/qp/QP_interpolate_W.F +++ b/src/qp/QP_interpolate_W.F @@ -11,7 +11,7 @@ subroutine QP_interpolate_W(X,Xw,q,mode) use com, ONLY:msg use R_lattice, ONLY:bz_samp,RIM_W_ng,b,k_grid_b,bare_qpg,& & RIM_W_is_diagonal,RIM_W,RIM_W_d,f_coeff,idir,RIM_W_E,& -& RIM_id_epsm1_reference,RIM_epsm1,RIM_qpg +& RIM_id_epsm1_reference,RIM_epsm1,RIM_qpg,eps_env use vec_operate, ONLY:c2a,v_norm use X_m, ONLY:X_ALLOC_elemental,X_mat,X_t use frequency, ONLY:w_samp @@ -93,6 +93,8 @@ subroutine QP_interpolate_W(X,Xw,q,mode) if (have_cuda) then YAMBO_ALLOC_SOURCE(RIM_W_d,RIM_W) endif + RIM_W=RIM_W + !RIM_W=RIM_W/eps_env return endif ! @@ -377,6 +379,9 @@ subroutine QP_interpolate_W(X,Xw,q,mode) io_err=io_RIM_W(ID,mode,Xw) endif ! + RIM_W=RIM_W + !RIM_W=RIM_W/eps_env + ! if (have_cuda) then YAMBO_ALLOC_SOURCE(RIM_W_d,RIM_W) endif From 2542e5837d5d19a539c77ea0fc96742224fb855e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 10 Nov 2024 00:10:37 +0100 Subject: [PATCH 0835/1367] Version 5.3.0, Revision 24092, Hash 6cb4642bcc MODIFIED * configure include/version/version.m4 sc/SC_driver.F xc_functionals/el_density_and_current.F Bugs: - [yambo_sc] 2 smalle aesthetic fix Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/sc/SC_driver.F | 2 +- src/xc_functionals/el_density_and_current.F | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 99fff277a3..ddf486219e 100755 --- a/configure +++ b/configure @@ -3361,8 +3361,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23811" -SHASH="5e711996fd" +SREVISION="24093" +SHASH="6cb4642bcc" diff --git a/include/version/version.m4 b/include/version/version.m4 index 6722228387..affc02b573 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23811" -SHASH="5e711996fd" +SREVISION="24093" +SHASH="6cb4642bcc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index 04fe4073b9..314017bfeb 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -390,7 +390,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! I/O [H_nl_sc] ! IO_ACT=manage_action(WR_CL_IF_END,i_frag,1,QP_nk*n_sp_pol) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/i_frag+1/),ID=ID(3)) + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/i_frag+1/),ID=ID(3)) io_V=io_SC_components('V',E,ID(3)) ! ! Mixing for non-local self-energies diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index bb113ec639..7a0269b8e9 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -230,7 +230,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! do i_dir=1,3 do i_spinor=1,n_spinor - if (size(WF%r(:,i_spinor,i_wf)) Date: Sun, 10 Nov 2024 10:15:29 +0100 Subject: [PATCH 0836/1367] Version 5.3.0, Revision 24093, Hash 2542e5837d MODIFIED * configure include/version/version.m4 Ymodules/mod_wave_func.F Bugs: - [yambo_sc] fixed bug in WF_copy Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/Ymodules/mod_wave_func.F | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure b/configure index ddf486219e..15aa2d6dfd 100755 --- a/configure +++ b/configure @@ -3361,8 +3361,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24093" -SHASH="6cb4642bcc" +SREVISION="24094" +SHASH="2542e5837d" diff --git a/include/version/version.m4 b/include/version/version.m4 index affc02b573..f4933393bf 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24093" -SHASH="6cb4642bcc" +SREVISION="24094" +SHASH="2542e5837d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/Ymodules/mod_wave_func.F b/src/Ymodules/mod_wave_func.F index 08713b8636..9cc77accbe 100644 --- a/src/Ymodules/mod_wave_func.F +++ b/src/Ymodules/mod_wave_func.F @@ -134,10 +134,13 @@ subroutine WF_copy(WF_in,WF_out) ! if (allocated(WF_in%c)) then YAMBO_ALLOC_MOLD(WF_out%c,WF_in%c) + WF_out%c=WF_in%c endif if (allocated(WF_in%r)) then YAMBO_ALLOC_MOLD(WF_out%r,WF_in%r) + WF_out%r=WF_in%r endif + ! lpres=have_gpu.and.devxlib_mapped(DEV_VAR(WF_in%c)) #ifdef _GPU if (lpres) then From b0e6e937ec5d9fc491901bea012211745bc75022 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 16 Nov 2024 22:33:58 +0100 Subject: [PATCH 0837/1367] Version 5.2.0, Revision 23987, Hash 0bdc6aea5f MODIFIED * configure include/version/version.m4 driver/options_ypp.c Bugs: - [ypp] fix in input file generation Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/driver/options_ypp.c | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f612d5d51c..300fd4ce6f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23829 h.86e232e307. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23987 h.0bdc6aea5f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23829 h.86e232e307' -PACKAGE_STRING='Yambo 5.2.0 r.23829 h.86e232e307' +PACKAGE_VERSION='5.2.0 r.23987 h.0bdc6aea5f' +PACKAGE_STRING='Yambo 5.2.0 r.23987 h.0bdc6aea5f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1604,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23829 h.86e232e307 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23987 h.0bdc6aea5f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1670,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23829 h.86e232e307:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23987 h.0bdc6aea5f:";; esac cat <<\_ACEOF @@ -1882,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23829 h.86e232e307 +Yambo configure 5.2.0 r.23987 h.0bdc6aea5f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2511,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23829 h.86e232e307, which was +It was created by Yambo $as_me 5.2.0 r.23987 h.0bdc6aea5f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3269,8 +3269,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23829" -SHASH="86e232e307" +SREVISION="23987" +SHASH="0bdc6aea5f" @@ -16606,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23829 h.86e232e307, which was +This file was extended by Yambo $as_me 5.2.0 r.23987 h.0bdc6aea5f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16670,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.2.0 r.23829 h.86e232e307 +Yambo config.status 5.2.0 r.23987 h.0bdc6aea5f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a57a95f8bb..0313f31791 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23829 h.86e232e307, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23987 h.0bdc6aea5f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23829" -SHASH="86e232e307" +SREVISION="23987" +SHASH="0bdc6aea5f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index 4d7b56dda9..6bd1b6d536 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -94,13 +94,13 @@ void options_ypp(struct options_struct options[],int *i_opt) *i_opt=*i_opt+1; options[*i_opt].short_desc="Mean Potential"; options[*i_opt].long_opt= "potential"; + strcpy(options[*i_opt].long_desc[0],"=(h)artree,(f)ock,(coh),(sex),(cohsex),(exx),(exxc),(srpa),(d)ef,(ip)"); options[*i_opt].short_opt='v'; options[*i_opt].bin="ypp_sc"; options[*i_opt].yambo_string="MeanPot"; options[*i_opt].section="Plots"; *i_opt=*i_opt+1; options[*i_opt].short_desc="Electronic properties"; - strcpy(options[*i_opt].long_desc[0],"=(h)artree,(f)ock,(coh),(sex),(cohsex),(exx),(exxc),(srpa),(d)ef,(ip)"); #if defined _ELPH strcpy(options[*i_opt].long_desc[0],"=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent,(e)lias"); #elif defined _YPP_MAGNETIC From 300fe87cf268266bc9001e685afc0dcde2475931 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 18 Nov 2024 20:17:01 +0100 Subject: [PATCH 0838/1367] Version 5.3.0, Revision 24098, Hash 843bd9af4f MODIFIED * configure Changes: - configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure b/configure index a27a3cba25..7dd00cb656 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check with_devxlib_branch DEVXLIB_info @@ -923,6 +924,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -982,6 +985,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1738,6 +1742,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3507,6 +3512,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -16579,6 +16598,9 @@ LIBS="$acx_devxlib_save_LIBS" DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16767,6 +16789,7 @@ fi + # From 92a6326d91eab5dc2011a328bb4d306d7690e814 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 19 Nov 2024 17:55:02 +0100 Subject: [PATCH 0839/1367] Version 5.3.0, Revision 24354, Hash 6893e04288 MODIFIED * Ymodules/mod_interfaces.F Bugs: - [yambo] Fixed compilation issue introduced after merge Patch sent by: Davide Sangalli --- src/Ymodules/mod_interfaces.F | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Ymodules/mod_interfaces.F b/src/Ymodules/mod_interfaces.F index 69b28cbb27..3e80e516a6 100644 --- a/src/Ymodules/mod_interfaces.F +++ b/src/Ymodules/mod_interfaces.F @@ -322,10 +322,6 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) type (WAVEs), target, intent(inout) :: WF end subroutine WF_symm_kpoint_g_BZ ! - end interface - ! - interface WF_shift_kpoint - ! subroutine WF_shift_kpoint_gpu(b_to_shift,nb_to_shift,ikbz,i_sp_pol,wf_shift,Xk,WF_k_in,WF_k_out) use pars, ONLY:SP use electrons, ONLY:n_spinor From 0a79d170303dba2a00d42a9fd9474baaad8b4c47 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 19 Nov 2024 18:10:56 +0100 Subject: [PATCH 0840/1367] Version 5.3.0, Revision 24355, Hash 92a6326d91 MODIFIED * driver/yambo.F Ymodules/mod_EXCPH.F bz_ops/k_small_group.F wf_and_fft/EXC_WF_symm_qpoint.F wf_and_fft/WF_phase_matrices.F wf_and_fft/WF_symm_kpoint_g.F Bugs: - yambo compilation fixed after merge Patch sent by: Davide Sangalli --- driver/yambo.F | 13 +++--- src/Ymodules/mod_EXCPH.F | 8 ++-- src/bz_ops/k_small_group.F | 2 +- src/wf_and_fft/EXC_WF_symm_qpoint.F | 2 +- src/wf_and_fft/WF_phase_matrices.F | 2 +- src/wf_and_fft/WF_symm_kpoint_g.F | 62 ++++++++++++++++------------- 6 files changed, 47 insertions(+), 42 deletions(-) diff --git a/driver/yambo.F b/driver/yambo.F index 50c21f8097..8368e43b40 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -16,16 +16,13 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d ! use drivers, ONLY:l_HF_and_locXC,l_sc_run,l_eval_collisions,l_real_time,& & l_optics,l_chi,l_em1s,l_ppa,l_mpa,l_bss,l_bse,l_em1d,l_X,& -& l_EXCPH_gkkp,l_EXCPH_optics,l_EXCPH_lifetime,& -& l_gw0,l_life,l_acfdt,l_dipoles,l_nl_optics,l_elel_corr,l_phel_corr -#if defined _SCALAPACK - use drivers, ONLY:l_slk_test -#endif -#if defined _GPU - use drivers, ONLY:l_gpu_test -#endif +& l_gw0,l_life,l_acfdt,l_dipoles,l_nl_optics,l_elel_corr,l_phel_corr,& +& l_gpu_test,l_slk_test #if defined _ELPH use drivers, ONLY:l_elph_Hamiltonian +#endif +#if defined _ELPH && !defined _RT + use drivers, ONLY:l_EXCPH_gkkp,l_EXCPH_optics,l_EXCPH_lifetime #endif use gpu_m, ONLY:GPU_test_dim use X_m, ONLY:X_t,i_X_kind_existing_DB diff --git a/src/Ymodules/mod_EXCPH.F b/src/Ymodules/mod_EXCPH.F index cfcf9bcc8b..de1a40179f 100644 --- a/src/Ymodules/mod_EXCPH.F +++ b/src/Ymodules/mod_EXCPH.F @@ -29,7 +29,7 @@ module EXCPH use ELPH, ONLY:ph_modes use R_lattice, ONLY:bz_samp ! -#include +#include ! ! Exciton-Phonon !================ @@ -135,7 +135,7 @@ subroutine BSE_in_alloc(k) use electrons, ONLY:n_sp_pol use BS, ONLY:BS_bands ! -#include +#include ! type(bz_samp) ::k ! @@ -253,7 +253,7 @@ subroutine BSE_alloc(k,q) use BS, ONLY:BS_H_dim,BS_bands,BSqpts use R_lattice, ONLY:bz_samp ! -#include +#include ! type(bz_samp) ::k,q ! @@ -280,7 +280,7 @@ subroutine BSE_free use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BS_H_dim,BSS_n_eig use BS, ONLY:BSqpts ! -#include +#include ! YAMBO_FREE(BS_mat) YAMBO_FREE(BSS_eh_table) diff --git a/src/bz_ops/k_small_group.F b/src/bz_ops/k_small_group.F index 06d5de070f..bc362f3ea8 100644 --- a/src/bz_ops/k_small_group.F +++ b/src/bz_ops/k_small_group.F @@ -20,7 +20,7 @@ subroutine k_small_group(k) use R_lattice, ONLY:rl_sop,bz_samp use zeros, ONLY:k_rlu_zero ! -#include +#include ! type(bz_samp)::k ! diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F index 3fb432d29d..42aedff1a4 100644 --- a/src/wf_and_fft/EXC_WF_symm_qpoint.F +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -18,7 +18,7 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& use IO_int, ONLY:io_control use IO_m, ONLY:DUMP,REP,RD ! -#include +#include ! type(bz_samp), intent(in) :: Xk,qpt integer, intent(in) :: first_state,nstates diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 5394f1a44d..264b230476 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -36,7 +36,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use IO_m, ONLY:VERIFY,DUMP,REP,OP_WR,WR,WR_CL,OP_RD_CL use timing_m, ONLY:timing ! -#include +#include ! integer, intent(in) :: blim(2),klim(2) type(levels), intent(in) :: En diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 4c5b15d3a2..19ec076b71 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -16,7 +16,6 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& & k_pt,rl_sop,g_vec - use deviceXlib_m, ONLY:dev_conjg,dev_memcpy use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & & dl_sop,i_time_rev,nsym ! @@ -36,6 +35,10 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) integer :: ib,i_wf,isymm_m1 integer :: ic,ig,igp,igr,igs,i_spinor ! +#if defined _GPU + call error("subroutine WF_symm_kpoint_g is not gpu ported") +#endif + ! if(isymm==idt_index) return ! isymm_m1=sop_inv(isymm) @@ -49,9 +52,11 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! if (n_spinor==1) then ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif + !DEV_ACC_DEBUG data present(WF_k_tmp,g_rot,WF_p) + !DEV_ACC parallel loop private(ig,igr,igs) + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMPGPU target map(present,alloc:WF_k_tmp,g_rot,WF_p) + !DEV_OMPGPU teams loop do ic=1,wf_nc_k(ik) ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) @@ -61,9 +66,11 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! else ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif + !DEV_ACC_DEBUG data present(WF_k_tmp,g_rot,WF_p) + !DEV_ACC parallel loop private(ig,igr,igs) + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMPGPU target map(present,alloc:WF_k_tmp,g_rot,WF_p) + !DEV_OMPGPU teams loop do ic=1,wf_nc_k(ik) ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) @@ -76,9 +83,11 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) endif ! ! take care of time reversal if needed - if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + if(isymm>nsym/(1+i_time_rev)) WF_k_tmp=conjg(WF_k_tmp) ! - call dev_memcpy(WF_p,WF_k_tmp) + !call dev_memcpy(WF_p,WF_k_tmp) + WF_p=WF_k_tmp ! nullify(WF_p) ! @@ -96,7 +105,6 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& & k_pt,rl_sop,g_vec - use deviceXlib_m, ONLY:dev_conjg,dev_memcpy use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & & dl_sop,i_time_rev,nsym ! @@ -118,6 +126,10 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) ! if(isymm==idt_index) return ! +#if defined _GPU + call error("subroutine WF_symm_kpoint_g_BZ is not gpu ported") +#endif + ! isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) @@ -129,9 +141,6 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) ! if (n_spinor==1) then ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif do ic=1,wf_nc_k(ik) ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) igr=DEV_VAR(g_rot)(ig,isymm) @@ -141,9 +150,6 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) ! else ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif do ic=1,wf_nc_k(ik) ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) igr=DEV_VAR(g_rot)(ig,isymm) @@ -156,9 +162,11 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) endif ! ! take care of time reversal if needed - if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + if(isymm>nsym/(1+i_time_rev)) WF_k_tmp=conjg(WF_k_tmp) ! - call dev_memcpy(WF_p,WF_k_tmp) + !call dev_memcpy(WF_p,WF_k_tmp) + WF_p=WF_k_tmp ! nullify(WF_p) ! @@ -176,7 +184,6 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& & k_pt,rl_sop,g_vec - use deviceXlib_m, ONLY:dev_conjg,dev_memcpy use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & & dl_sop,i_time_rev,nsym ! @@ -199,6 +206,10 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! if(isymm==idt_index) return ! +#if defined _GPU + call error("subroutine WF_symm_kpoint_g_ssop is not gpu ported") +#endif + ! isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) @@ -210,9 +221,6 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! if (n_spinor==1) then ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif do ic=1,wf_nc_k(ik) ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) @@ -222,9 +230,6 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! else ! -#ifdef _CUDA - !$cuf kernel do(1) <<<*,*>>> -#endif do ic=1,wf_nc_k(ik) ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) @@ -236,10 +241,13 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) enddo endif ! + ! ! take care of time reversal if needed - if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) + if(isymm>nsym/(1+i_time_rev)) WF_k_tmp=conjg(WF_k_tmp) ! - call dev_memcpy(WF_p,WF_k_tmp) + !call dev_memcpy(WF_p,WF_k_tmp) + WF_p=WF_k_tmp ! nullify(WF_p) ! From 229e6276b73550553bb57f3ebc7718af25a975ec Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Nov 2024 00:35:10 +0100 Subject: [PATCH 0841/1367] Version 5.3.0, Revision 23859, Hash a01016117 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_build_der_k.F Bugs: - Fixed compilation after merge Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/dipoles/DIPOLE_build_der_k.F | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 8f5c0284bf..d2f509fa3d 100755 --- a/configure +++ b/configure @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23801" -SHASH="77efe524a" +SREVISION="23859" +SHASH="a01016117" diff --git a/include/version/version.m4 b/include/version/version.m4 index 92a76281fe..615c56e4c2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23801" -SHASH="77efe524a" +SREVISION="23859" +SHASH="a01016117" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 5175a96040..c718f3ff12 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -44,7 +44,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip) use parser_m, ONLY:parser use timing_m, ONLY:timing ! -#include +#include type(levels), intent(in) :: Xen type(bz_samp), intent(inout) :: Xk From fbd9ddf6569da0b645db6d76d3a0de6874b5acff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Nov 2024 17:47:24 +0100 Subject: [PATCH 0842/1367] Version 5.3.0, Revision 23851, Hash 08d91d1af6 MODIFIED * configure include/version/version.m4 coulomb/col_driver.F Bugs: - [yambo] Fixed bug introduced working on eps-env Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/coulomb/col_driver.F | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a27a3cba25..4409350b4b 100755 --- a/configure +++ b/configure @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23800" -SHASH="7db510283b" +SREVISION="23851" +SHASH="08d91d1af6" diff --git a/include/version/version.m4 b/include/version/version.m4 index b249e9dbf1..ccd63692c5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23800" -SHASH="7db510283b" +SREVISION="23851" +SHASH="08d91d1af6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 55b8dc4294..997ffb19f4 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -182,9 +182,9 @@ subroutine col_driver(bare_NG,q) ! is not linear in q+G, the rescaling there is more involved ! ! bare_qpg= q+G - bare_qpg=bare_qpg*sqrt(eps_env) + if (allocated(bare_qpg)) bare_qpg=bare_qpg*sqrt(eps_env) ! RIM_qpg= \int C/|q+G|**2 - RIM_qpg =RIM_qpg/eps_env + if (allocated(RIM_qpg)) RIM_qpg =RIM_qpg/eps_env ! endif ! From b82264bbb15267a16cbafacf375df3f62c3a3ee7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 20 Nov 2024 20:52:15 +0100 Subject: [PATCH 0843/1367] Version 5.3.0, Revision 23852, Hash fbd9ddf656 MODIFIED * configure include/version/version.m4 bse/K_solvers.F Changes: - [yambo] Haydock jdos switched off Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/bse/K_solvers.F | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 4409350b4b..16809806cd 100755 --- a/configure +++ b/configure @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23851" -SHASH="08d91d1af6" +SREVISION="23852" +SHASH="fbd9ddf656" diff --git a/include/version/version.m4 b/include/version/version.m4 index ccd63692c5..887de295ef 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23851" -SHASH="08d91d1af6" +SREVISION="23852" +SHASH="fbd9ddf656" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 94e6c4f7fb..9284deebde 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -99,7 +99,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! A possible alternative could be to use the algorithm with Cf ! from both the left and the right hand side to get from a single Haydock loop ! - if (l_BS_jdos) call K_Haydock(iq,W_bss,"jdos",Xk) + !if (l_BS_jdos) call K_Haydock(iq,W_bss,"jdos",Xk) if (l_BS_abs) call K_Haydock(iq,W_bss,"optics",Xk) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) From 51bed6e39ec3712be0019bec6ec62975fb9be3ed Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 21 Nov 2024 09:55:42 +0100 Subject: [PATCH 0844/1367] Version 5.3.0, Revision 23853, Hash b82264bbb1 MODIFIED * configure include/version/version.m4 output/X_OUTPUT_driver.F Changes: - [yambo] jdos switched off Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/output/X_OUTPUT_driver.F | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 16809806cd..ba5426200d 100755 --- a/configure +++ b/configure @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23852" -SHASH="fbd9ddf656" +SREVISION="23853" +SHASH="b82264bbb1" diff --git a/include/version/version.m4 b/include/version/version.m4 index 887de295ef..1d013a2228 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23852" -SHASH="fbd9ddf656" +SREVISION="23853" +SHASH="b82264bbb1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 9f3caec52e..67024387ba 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -102,7 +102,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) endif endif if (STRING_match(solver,"Inversion")) call X_obs_onoff("- Esort E_IP E_INDX_IP kerr magnons jdos") - if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort E_IP E_INDX_IP") + !if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort E_IP E_INDX_IP") + if (STRING_match(solver,"Haydock")) call X_obs_onoff("- Esort E_IP E_INDX_IP jdos") if (STRING_match(solver,"Diago").or.STRING_match(solver,"Slepc")) call X_obs_onoff("- E_IP E_INDX_IP") endif ! From 50221d47cdbf03bb4d9827b25d8ca5936aab9230 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Nov 2024 11:31:06 +0100 Subject: [PATCH 0845/1367] Version 5.3.0, Revision 24094, Hash ea56b38c14 MODIFIED * configure include/version/version.m4 Changes: - [yambo] configure re-generated Patch sent by: Davide Sangalli --- configure | 48 ++++++++++++++++++++++++++++++++++++-- include/version/version.m4 | 4 ++-- 2 files changed, 48 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 7dd00cb656..d844607365 100755 --- a/configure +++ b/configure @@ -843,6 +843,10 @@ internal_blas FLIBS YDB_dir GIT +with_ydriver_branch +DRIVER_INCS +Ydriver_check +Ydriver_LIB MPI_LIB_DIR MPI_INC_DIR MPI_LIBS @@ -1004,6 +1008,7 @@ with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir +with_ydriver_branch enable_ydb with_blas_libs enable_int_linalg @@ -1799,6 +1804,8 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory + --with-ydriver-branch= + Use the of the ydriver repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -3359,8 +3366,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23800" -SHASH="7db510283b" +SREVISION="24095" +SHASH="ea56b38c14" @@ -4726,6 +4733,15 @@ fi fi +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + # # General # @@ -10593,6 +10609,34 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +# ============================================================================ +# Yambo Libs + + +DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" +# + +# Check whether --with-ydriver-branch was given. +if test ${with_ydriver_branch+y} +then : + withval=$with_ydriver_branch; +else $as_nop + with_ydriver_branch=none +fi + +# +if test x"$with_ydriver_branch" = "xnone"; then + Ydriver_check="D"; + Ydriver_LIB="Download" +else + Ydriver_check="G"; + Ydriver_LIB="GIT, branch $with_ydriver_branch" +fi + + + + + # ============================================================================ # YDB/YAMBOpy diff --git a/include/version/version.m4 b/include/version/version.m4 index b249e9dbf1..3528af4309 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23800" -SHASH="7db510283b" +SREVISION="24095" +SHASH="ea56b38c14" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 52effa862aff6fd9e6baf7e97a4ec37a4c959652 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Nov 2024 11:56:30 +0100 Subject: [PATCH 0846/1367] Version 5.3.0, Revision 24095, Hash ab58e1d526 MODIFIED * configure include/version/version.m4 Ymodules/mod_wave_func.F wf_and_fft/WF_alloc.F wf_and_fft/WF_apply_symm.F Changes: - [yambo] Fixed compilation in gamma only mode Patch sent by: Davide Sangalli --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/Ymodules/mod_wave_func.F | 6 ++++++ src/wf_and_fft/WF_alloc.F | 6 +++--- src/wf_and_fft/WF_apply_symm.F | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/configure b/configure index d844607365..21f44c276a 100755 --- a/configure +++ b/configure @@ -3366,8 +3366,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24095" -SHASH="ea56b38c14" +SREVISION="24096" +SHASH="ab58e1d526" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3528af4309..faed27d204 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24095" -SHASH="ea56b38c14" +SREVISION="24096" +SHASH="ab58e1d526" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/Ymodules/mod_wave_func.F b/src/Ymodules/mod_wave_func.F index 9cc77accbe..9c3b564931 100644 --- a/src/Ymodules/mod_wave_func.F +++ b/src/Ymodules/mod_wave_func.F @@ -30,6 +30,12 @@ module wave_func complex(SP), allocatable DEV_ATTR :: c_d(:,:,:) end type WAVEs ! +#if defined _GAMMA_ONLY + real(SP), parameter :: wfZERO=0._SP +#else + complex(SP), parameter :: wfZERO=cmplx(0._SP,0._SP) +#endif + ! ! Buffered WFs ! type (WAVEs), save :: WF_buffer diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index e19f056da0..11c7abed1f 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -8,7 +8,7 @@ subroutine WF_alloc(WF,k_extrema_only) ! use pars, ONLY:cZERO,SP - use wave_func, ONLY:WAVEs,states_to_load,wf_ng,wf_ncx,rho_map_size + use wave_func, ONLY:WAVEs,wfZERO,states_to_load,wf_ng,wf_ncx,rho_map_size use electrons, ONLY:n_spinor use parallel_int, ONLY:PARALLEL_live_message use gpu_m, ONLY:have_gpu @@ -67,8 +67,8 @@ subroutine WF_alloc(WF,k_extrema_only) if (have_gpu) then YAMBO_ALLOC_GPU(DEV_VAR(WF%r),(wf_grid_size,n_spinor,WF%N)) endif - WF%r=wfcmplx(cZERO,kind=SP) - if (have_gpu) call devxlib_memset_d(DEV_VAR(WF%r),cZERO) + WF%r=wfcmplx(wfZERO,kind=SP) + if (have_gpu) call devxlib_memset_d(DEV_VAR(WF%r),wfZERO) else YAMBO_ALLOC(WF%c,(wf_grid_size,n_spinor,WF%N)) if (have_gpu) then diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 57f10e9434..b1598078b3 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -46,7 +46,7 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) #ifdef _GPU_LOC call devxlib_memcpy_d2d(WF_symm,cmplx(WF_p,kind=SP)) #else - WF_symm=WF_p + WF_symm=cmplx(WF_p,kind=SP) #endif return ! From 2c9cb477b2506549d8f42906651433976ef70bec Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Nov 2024 12:02:57 +0100 Subject: [PATCH 0847/1367] Version 5.3.0, Revision 24100, Hash e614487aa8 MODIFIED * configure include/version/version.m4 driver/get_libraries.c Changes: - [yambo] Added gamma_only option Patch sent by: Davide Sangalli --- configure | 71 ++------------------------------------ include/version/version.m4 | 4 +-- src/driver/get_libraries.c | 4 +++ 3 files changed, 8 insertions(+), 71 deletions(-) diff --git a/configure b/configure index 21f44c276a..5d743a90fd 100755 --- a/configure +++ b/configure @@ -719,7 +719,6 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check -GAMMA_ONLY_check DP_check with_devxlib_branch DEVXLIB_info @@ -843,10 +842,6 @@ internal_blas FLIBS YDB_dir GIT -with_ydriver_branch -DRIVER_INCS -Ydriver_check -Ydriver_LIB MPI_LIB_DIR MPI_INC_DIR MPI_LIBS @@ -928,8 +923,6 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile -def_gamma_only -enable_gamma_only build_precision def_dp enable_dp @@ -989,7 +982,6 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp -enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1008,7 +1000,6 @@ with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir -with_ydriver_branch enable_ydb with_blas_libs enable_int_linalg @@ -1747,7 +1738,6 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. - --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1804,8 +1794,6 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory - --with-ydriver-branch= - Use the of the ydriver repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -3366,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24096" -SHASH="ab58e1d526" +SREVISION="24100" +SHASH="e614487aa8" @@ -3519,20 +3507,6 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio -# -# ============================================================================ -# VERSION for gamma only case -# Check whether --enable-gamma_only was given. -if test ${enable_gamma_only+y} -then : - enableval=$enable_gamma_only; -fi - -def_gamma_only="" -if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi -if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi - - # # ============================================================================ # @@ -4733,15 +4707,6 @@ fi fi -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - # # General # @@ -10609,34 +10574,6 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -# ============================================================================ -# Yambo Libs - - -DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" -# - -# Check whether --with-ydriver-branch was given. -if test ${with_ydriver_branch+y} -then : - withval=$with_ydriver_branch; -else $as_nop - with_ydriver_branch=none -fi - -# -if test x"$with_ydriver_branch" = "xnone"; then - Ydriver_check="D"; - Ydriver_LIB="Download" -else - Ydriver_check="G"; - Ydriver_LIB="GIT, branch $with_ydriver_branch" -fi - - - - - # ============================================================================ # YDB/YAMBOpy @@ -16642,9 +16579,6 @@ LIBS="$acx_devxlib_save_LIBS" DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # -GAMMA_ONLY_check="-" -if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi -# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16833,7 +16767,6 @@ fi - # diff --git a/include/version/version.m4 b/include/version/version.m4 index faed27d204..37ee147905 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24096" -SHASH="ab58e1d526" +SREVISION="24100" +SHASH="e614487aa8" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/driver/get_libraries.c b/src/driver/get_libraries.c index 2f9542e66d..34cefd773e 100644 --- a/src/driver/get_libraries.c +++ b/src/driver/get_libraries.c @@ -23,6 +23,10 @@ char *running_libraries() #else strcpy(strings[i_str], "Serial"); #endif +#if defined _GAMMA_ONLY + i_str++; + strcpy(strings[i_str], "GAMMA_ONLY"); +#endif #if defined _GPU i_str++; strcpy(strings[i_str], "GPU"); From a4b13d8be69a3f3eb48abe90fb6c2c94f4e38f78 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 12 Nov 2024 12:03:38 +0100 Subject: [PATCH 0848/1367] Version 5.3.0, Revision 24101, Hash 1702e207fc MODIFIED * configure include/version/version.m4 Changes: - configure regenerated after merge Patch sent by: Davide Sangalli --- configure | 27 +++++++++++++++++++++++++-- include/version/version.m4 | 4 ++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 5d743a90fd..d9b65e8dde 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check with_devxlib_branch DEVXLIB_info @@ -923,6 +924,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -982,6 +985,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1738,6 +1742,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3354,8 +3359,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24100" -SHASH="e614487aa8" +SREVISION="24101" +SHASH="1702e207fc" @@ -3507,6 +3512,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -16579,6 +16598,9 @@ LIBS="$acx_devxlib_save_LIBS" DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16767,6 +16789,7 @@ fi + # diff --git a/include/version/version.m4 b/include/version/version.m4 index 37ee147905..963ba835f2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Yambo, 5.3.0 r.23795 h.87d0217fe1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24100" -SHASH="e614487aa8" +SREVISION="24101" +SHASH="1702e207fc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 189866797b835d551b4e268a14e7dc1fa78fefe3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 7 Dec 2024 23:16:41 +0100 Subject: [PATCH 0849/1367] Version 5.3.0, Revision 24136, Hash 54610b0060 MODIFIED * configure include/version/version.m4 parser/mod_itm.F Changes: - [yambo] Fixed issue with yambo_nl Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/parser/mod_itm.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f52056f407..db11478729 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24049 h.5d9931441c. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24136 h.54610b0060. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24049 h.5d9931441c' -PACKAGE_STRING='Yambo 5.3.0 r.24049 h.5d9931441c' +PACKAGE_VERSION='5.3.0 r.24136 h.54610b0060' +PACKAGE_STRING='Yambo 5.3.0 r.24136 h.54610b0060' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24049 h.5d9931441c to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24136 h.54610b0060 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24049 h.5d9931441c:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24136 h.54610b0060:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24049 h.5d9931441c +Yambo configure 5.3.0 r.24136 h.54610b0060 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24049 h.5d9931441c, which was +It was created by Yambo $as_me 5.3.0 r.24136 h.54610b0060, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24049" -SHASH="5d9931441c" +SREVISION="24136" +SHASH="54610b0060" @@ -17780,7 +17780,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24049 h.5d9931441c, which was +This file was extended by Yambo $as_me 5.3.0 r.24136 h.54610b0060, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17844,7 +17844,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24049 h.5d9931441c +Yambo config.status 5.3.0 r.24136 h.54610b0060 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index ce1a0ea4bf..9b3ceb1634 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24049 h.5d9931441c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24136 h.54610b0060, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24049" -SHASH="5d9931441c" +SREVISION="24136" +SHASH="54610b0060" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/parser/mod_itm.F b/src/parser/mod_itm.F index a42d011529..fd1509a016 100644 --- a/src/parser/mod_itm.F +++ b/src/parser/mod_itm.F @@ -41,7 +41,7 @@ module it_m integer, parameter :: V_all=99 ! integer, parameter :: maxrnlvls=60 - integer, parameter :: maxflags =60 + integer, parameter :: maxflags =70 integer, parameter :: maxi1vars=100 integer, parameter :: maxi2vars=50 integer, parameter :: maxi3vars=50 From 8c199c7548d4f87f010005c7a2719f6b0ab6afe5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 8 Oct 2024 16:17:23 +0200 Subject: [PATCH 0850/1367] Version 5.2.0, Revision 23534, Hash 06afe76 MODIFIED * modified: modified: modified: Bugs: - [yambo_nl] Fixed bug introduced in previous commit Patch sent by: Davide Sangalli --- configure | 1534 +++--------------------- include/version/version.m4 | 8 +- src/collisions/COLLISIONS_compose_nl.F | 4 +- 3 files changed, 186 insertions(+), 1360 deletions(-) diff --git a/configure b/configure index db11478729..145fccf5ab 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24136 h.54610b0060. +# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23534 h.06afe76. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24136 h.54610b0060' -PACKAGE_STRING='Yambo 5.3.0 r.24136 h.54610b0060' +PACKAGE_VERSION='5.2.0 r.23534 h.06afe76' +PACKAGE_STRING='Yambo 5.2.0 r.23534 h.06afe76' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -655,10 +655,6 @@ LAPACK_PETSC_INCS_R LAPACK_PETSC_LIBS_R BLAS_PETSC_INCS_R BLAS_PETSC_LIBS_R -LIBCUDA_INCS_R -LIBCUDA_LIBS_R -DEVXLIB_INCS_R -DEVXLIB_LIBS_R LIBXC_INCS_R LIBXC_LIBS_R SLEPC_INCS_R @@ -691,8 +687,6 @@ IOTK_INCS_R IOTK_LIBS_R MPI_info MPI_check -LIBCUDA_check -DEVXLIB_check LIBXC_check YPY_check YDB_check @@ -712,40 +706,14 @@ NETCDF_check HDF5_info HDF5_check PARIO_check -GPU_libinfo -GPU_check OPENMP_check CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check -with_devxlib_branch -DEVXLIB_info -internal_devxlib -compile_devxlib -DEVXLIB_INCS -DEVXLIB_LIBS -MKLGPU_LIBS -LIBROCM_PATH -LIBROCM_INCS -LIBROCM_LIBS -DEVXLIB_CUDALIBS -DEVXLIB_FLAGS -GPU_INCS -GPU_LIBS -GPU_FLAGS -def_gpu -with_gpu_libs -with_cuda_int_libs -with_cuda_runtime -with_cuda_cc -internal_libcuda -compile_libcuda -use_libcuda -LIBCUDA_PATH -LIBCUDA_INCS -LIBCUDA_LIBS +CUDA_FLAGS +def_cuda internal_libxc compile_libxc LIBXC_INCS @@ -842,6 +810,10 @@ internal_blas FLIBS YDB_dir GIT +with_ydriver_branch +DRIVER_INCS +Ydriver_check +Ydriver_LIB MPI_LIB_DIR MPI_INC_DIR MPI_LIBS @@ -867,10 +839,6 @@ IFLAG FCLIBS OPENMPLIBS def_openmp -GPU_SUPPORT -enable_openmp5 -enable_openacc -enable_cuda_fortran def_compiler HDF5_MODE DEBUG_FLAGS @@ -991,15 +959,13 @@ with_echo enable_options_check with_f90ext enable_debug_flags -enable_cuda_fortran -enable_openacc -enable_openmp5 enable_open_mp enable_mpi with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir +with_ydriver_branch enable_ydb with_blas_libs enable_int_linalg @@ -1069,29 +1035,8 @@ with_libxc_libs with_libxc_path with_libxc_libdir with_libxc_includedir -with_cuda_libs -with_cuda_incs -with_cuda_libdir -with_cuda_includedir -with_cuda_path -enable_cuda_libs_check -with_cuda_cc -with_cuda_runtime -with_cuda_int_libs +enable_cuda enable_nvtx -with_gpu_libs -with_gpu_incs -with_rocm_libs -with_rocm_incs -with_rocm_libdir -with_rocm_includedir -with_rocm_path -with_mklgpu_libs -with_devxlib_libs -with_devxlib_path -with_devxlib_libdir -with_devxlib_includedir -with_devxlib_branch ' ac_precious_vars='build_alias host_alias @@ -1659,7 +1604,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24136 h.54610b0060 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.23534 h.06afe76 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1670,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24136 h.54610b0060:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.23534 h.06afe76:";; esac cat <<\_ACEOF @@ -1746,9 +1691,6 @@ Optional Features: --enable-options-check Enable the command line options check in driver.c. Default is yes. --enable-debug-flags Debug flags are set for compilation. Default is no. - --enable-cuda-fortran Enable CUDA support [default=no] - --enable-openacc Enable OPENACC support [default=no] - --enable-openmp5 Enable OPENMP5 support [default=no] --enable-open-mp Enable OpenMP support --enable-mpi Enable mpi parallelization . Default is yes. --enable-ydb Activate the YDB support @@ -1777,10 +1719,8 @@ Optional Features: no --enable-iotk Activate the IOTK support --enable-etsf-io Activate the ETSF_IO support - --enable-cuda-libs-check=yes - The configure script will check CUDA installation - and report problems [default=yes] - --enable-nvtx= Enable NVTX support [default=no] + --enable-cuda= Enable CUDA support + --enable-nvtx= Enable NVTX support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1794,6 +1734,8 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory + --with-ydriver-branch= + Use the of the ydriver repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -1853,33 +1795,6 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory - --with-cuda-libs= Use libcuda libraries - --with-cuda-incs= Use libcuda include options - --with-cuda-libdir= Path to the libcuda lib directory - --with-cuda-includedir= Path to the libcuda include directory - --with-cuda-path= Path to libcuda install directory - --with-cuda-cc=VAL GPU architecture (Kepler: 35, Pascal: 60, Volta: 70, - Ampere: 80) [default=70] - --with-cuda-runtime=VAL CUDA runtime (Pascal: 8+, Volta: 9+) [default=10.1] - --with-cuda-int-libs=VAL - CUDA internal libraries () - [default=cuda,cufft,cublas,cusolver,cudart] - --with-gpu-libs= Use extra GPU-specific libraries - --with-gpu-incs= Includes for extra GPU-specific libraries - - --with-rocm-libs= Use librocm library - --with-rocm-incs= Use librocm include options - --with-rocm-libdir= Path to the rocm lib directory - --with-rocm-includedir= Path to the rocm include directory - --with-rocm-path= Path to rocm install directory - --with-mklgpu-libs= Use librocm library - --with-devxlib-libs= Use devxlib libraries - --with-devxlib-path= Path to devxlib install directory - --with-devxlib-libdir= Path to the devxlib lib directory - --with-devxlib-includedir= - Path to the devxlib include directory - --with-devxlib-branch= - Use the of the devxlib repository. Some influential environment variables: CC C compiler command @@ -1967,7 +1882,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24136 h.54610b0060 +Yambo configure 5.2.0 r.23534 h.06afe76 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2511,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24136 h.54610b0060, which was +It was created by Yambo $as_me 5.2.0 r.23534 h.06afe76, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3352,10 +3267,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" -SSUBVERSION="3" +SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="24136" -SHASH="54610b0060" +SREVISION="23534" +SHASH="06afe76" @@ -4707,6 +4622,15 @@ fi fi +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + # # General # @@ -4778,76 +4702,6 @@ fi # -# -# License-Identifier: GPL -# -# Copyright (C) 2007 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - -# -# License-Identifier: GPL -# -# Copyright (C) 2010 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# # -################################################ -# Set FC FLAGS -# ---------------------------------- - -# - -# -# Original version Available from the GNU Autoconf Macro Archive at: -# http://autoconf-archive.cryp.to/macros-by-category.html -# -# License-Identifier: GPL -# -# Copyright (C) 2006 The Yambo Team -# -# Authors (see AUTHORS file for details): AM DS -# - -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - -# -# License-Identifier: GPL -# -# Copyright (C) 2022 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - -# # =========================================================================== # http://www.nongnu.org/autoconf-archive/ax_f90_module_flag.html # =========================================================================== @@ -4907,89 +4761,81 @@ fi -# =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html -# =========================================================================== # -# SYNOPSIS +# License-Identifier: GPL +# +# Copyright (C) 2007 The Yambo Team # -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# Authors (see AUTHORS file for details): AM # -# DESCRIPTION + + # -# Check whether the given FLAG works with the current language's compiler -# or gives an error. (Warnings, however, are ignored) +# License-Identifier: GPL # -# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on -# success/failure. +# Copyright (C) 2016 The Yambo Team # -# If EXTRA-FLAGS is defined, it is added to the current language's default -# flags (e.g. CFLAGS) when the check is done. The check is thus made with -# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to -# force the compiler to issue an error when a bad flag is given. +# Authors (see AUTHORS file for details): AM # -# INPUT gives an alternative input source to AC_COMPILE_IFELSE. + + # -# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this -# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# License-Identifier: GPL # -# LICENSE +# Copyright (C) 2010 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # +################################################ +# Set FC FLAGS +# ---------------------------------- + # -# Copyright (c) 2008 Guido U. Draheim -# Copyright (c) 2011 Maarten Bosmans + # -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. +# Original version Available from the GNU Autoconf Macro Archive at: +# http://autoconf-archive.cryp.to/macros-by-category.html # -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. +# License-Identifier: GPL # -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . +# Copyright (C) 2006 The Yambo Team # -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. +# Authors (see AUTHORS file for details): AM DS # -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. -#serial 5 +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AF +# # +# License-Identifier: GPL # -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.eu +# Copyright (C) 2016 The Yambo Team # -# Authors (see AUTHORS file for details): AF +# Authors (see AUTHORS file for details): AM +# + + +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team # -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. +# Authors (see AUTHORS file for details): AM +# + + # -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. +# License-Identifier: GPL +# +# Copyright (C) 2022 The Yambo Team # -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# Authors (see AUTHORS file for details): AM # @@ -6949,16 +6795,6 @@ case "${host}" in #TIMER="ct_etime.o" if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; - aarch*apple* | arm*apple* ) - build_os="apple" - #TIMER="ct_etime.o" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; - aarch*linux* | arm*linux* ) - build_os="linux" - #TIMER="ct_etime.o" - if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi - ;; powerpc64*linux* ) build_os="linux" #TIMER="ct_etime.o" @@ -7176,10 +7012,6 @@ case "${FC}" in FCKIND="intel" FCVERSION=`$FC -v 2>&1` ;; - *ifx*) - FCKIND="intel" - FCVERSION=`$FC -v 2>&1` - ;; *ifort*) FCKIND="intel" FCVERSION=`$FC -v 2>&1` @@ -7252,13 +7084,6 @@ SLK_FC_FLAGS="" case "${host}" in i?86*linux*) case "${FC}" in - *ftn* ) - SYSFLAGS="-O1 -g -emf -eZ" - FUFLAGS="-O0 -g -emf -eZ" - FCMFLAG="" - OMPFLAGS="-fopenmp" - DEBUG_FLAGS="-g " - ;; *pgf9* | *ftn* | *pgfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -Mbackslash" @@ -7296,7 +7121,7 @@ i?86*linux*) DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" ;; *gfortran*) - SYSFLAGS="-O3 -g -mtune=native -fno-lto" + SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -mtune=native" SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" @@ -7348,7 +7173,7 @@ i?86*linux*) NETCDFFLAGS="-Df2cFortran" esac ;; -*86*apple* | aarch*apple* | arm*apple* ) +*86*apple* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" @@ -7408,13 +7233,6 @@ i?86*linux*) ;; ia64*linux* ) case "${FC}" in - *ftn* ) - SYSFLAGS="-O1 -g -emf -eZ" - FUFLAGS="-O0 -g -emf -eZ" - FCMFLAG="" - OMPFLAGS="-fopenmp" - DEBUG_FLAGS="-g " - ;; *pgf9* | *ftn* | *pgfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" #SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" @@ -7435,7 +7253,7 @@ ia64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *gfortran*) - SYSFLAGS="-O3 -g -mtune=native -fno-lto" + SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" @@ -7495,32 +7313,8 @@ ia64*linux* ) NETCDFFLAGS="-Df2cFortran" esac ;; -aarch*linux* | arm*linux* ) - case "${FC}" in - *gfortran*) - SYSFLAGS="-O3 -g -mtune=native -fno-lto" - FUFLAGS="-O0 -g -mtune=native" - SLK_FC_FLAGS="-fallow-argument-mismatch" - FCMFLAG="" - OMPFLAGS="-fopenmp" - NETCDFFLAGS="-DgFortran" - DEBUG_FLAGS="-Og -g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" - ;; - *) - SYSFLAGS="-g -O" - FUFLAGS="-O0" - NETCDFFLAGS="-Df2cFortran" - esac - ;; *x86*64* ) case "${FC}" in - *ftn* ) - SYSFLAGS="-O1 -g -emf -eZ" - FUFLAGS="-O0 -g -emf -eZ" - FCMFLAG="" - OMPFLAGS="-fopenmp" - DEBUG_FLAGS="-g " - ;; *pgf9* | *ftn* | *pgfortran* | *nvfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" #SYSFLAGS="-O2 -g -Munroll -Mnoframe -Mdalign -Mbackslash -cpp" @@ -7532,7 +7326,7 @@ aarch*linux* | arm*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame -Mbackslash -cpp" ;; *gfortran*) - SYSFLAGS="-O3 -g -mtune=native -fno-lto" + SYSFLAGS="-O3 -g -mtune=native" FUFLAGS="-O0 -g -mtune=native" SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" @@ -7592,15 +7386,6 @@ aarch*linux* | arm*linux* ) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-CB -traceback -debug full" ;; - *ifx*) - OMPFLAGS="-qopenmp" - CPU_FLAG="" - FCMFLAG="-nofor-main" - CFLAGS="-O2 -std=gnu99" - SYSFLAGS="-O3 -g" - FUFLAGS="-O0 -g" - DEBUG_FLAGS="-CB -traceback -debug full" - ;; *openf9*) SYSFLAGS="-O2 -fno-second-underscore" FUFLAGS="-O0 -fno-second-underscore" @@ -7736,46 +7521,6 @@ printf "%s\n" "$NETCDFFLAGS" >&6; } # acx_save_fcflags="$FCFLAGS" FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" -# -# ============================================================================ -# -# GPUs suppport -# -GPU_SUPPORT="no_gpu" -# -# Check whether --enable-cuda_fortran was given. -if test ${enable_cuda_fortran+y} -then : - enableval=$enable_cuda_fortran; -else $as_nop - enable_cuda_fortran="no" -fi - -# Check whether --enable-openacc was given. -if test ${enable_openacc+y} -then : - enableval=$enable_openacc; -else $as_nop - enable_openacc="no" -fi - -# Check whether --enable-openmp5 was given. -if test ${enable_openmp5+y} -then : - enableval=$enable_openmp5; -else $as_nop - enable_openmp5="no" -fi - -# -if test x"$enable_cuda_fortran" != "xno" ; then GPU_SUPPORT="cudaf" ; fi -if test x"$enable_openacc" != "xno" ; then GPU_SUPPORT="openacc" ; enable_open_mp="no"; fi -if test x"$enable_openmp5" != "xno" ; then GPU_SUPPORT="openmp5" ; fi -# - - - - # # ============================================================================ # @@ -8925,7 +8670,7 @@ case "${CPP}" in ;; *gcc* ) case "${host}" in - *86*apple* | *arm*apple* ) + *86*apple* ) if test -z "$CPPFLAGS"; then CPPFLAGS="-P -D_apple"; fi ;; * ) @@ -8945,7 +8690,7 @@ case "${CPP}" in ;; esac ;; - *86*apple* | *arm*apple* ) + *86*apple* ) if test -z "$CPPFLAGS"; then CPPFLAGS="-P -traditional -D_apple"; fi ;; powerpc64*linux* ) @@ -9036,9 +8781,6 @@ case "${FC}" in *gfortran | *g95) if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi ;; - *nvfortran*) - if test -z "$FPP"; then FPP="${FC} -Mpreprocess -E"; fi - ;; # # some of the following could be uncommented once explicitly checked # @@ -10249,10 +9991,6 @@ printf "%s\n" "$MPIKIND" >&6; } MPI_PATH=`which $CC |sed "s/bin\/$CC//g"` - if ! test -d "$MPI_PATH/include"; then - MPI_PATH=`$CC -show | sed "s/.*-I//g"` ; - MPI_PATH=`echo ${MPI_PATH} | sed "s/\/include.*//g"` ; - fi # else # @@ -10544,62 +10282,38 @@ url_ydb=https://github.com/yambo-code/ydb.git # -# -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.eu -# -# Authors (see AUTHORS file for details): DS -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -# +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +# ============================================================================ +# Yambo Libs -# -# -# Copyright (C) 2000-2021 the YAMBO team -# http://www.yambo-code.eu -# -# Authors (see AUTHORS file for details): DS -# -# This file is distributed under the terms of the GNU -# General Public License. You can redistribute it and/or -# modify it under the terms of the GNU General Public -# License as published by the Free Software Foundation; -# either version 2, or (at your option) any later version. -# -# This program is distributed in the hope that it will -# be useful, but WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License -# for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. + +DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" # +# Check whether --with-ydriver-branch was given. +if test ${with_ydriver_branch+y} +then : + withval=$with_ydriver_branch; +else $as_nop + with_ydriver_branch=none +fi # -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test x"$with_ydriver_branch" = "xnone"; then + Ydriver_check="D"; + Ydriver_LIB="Download" +else + Ydriver_check="G"; + Ydriver_LIB="GIT, branch $with_ydriver_branch" +fi + + + + # ============================================================================ # YDB/YAMBOpy @@ -13510,11 +13224,6 @@ fi # # Parse configure options # -if test "$enable_par_linalg" = "yes" ; then - enable_blacs="internal" ; - enable_scalapack="internal" ; -fi -# case $with_blacs_libs in yes) enable_blacs="internal" ;; no) enable_blacs="no" ; enable_par_linalg="no" ;; @@ -13616,7 +13325,7 @@ printf "%s\n" "$enable_scalapack" >&6; } fi # if test "$mpif_found" = "yes" && test "$enable_blacs" = "internal"; then - enable_blacs="yes"; + enable_blacs="yes" internal_blacs="yes"; BLACS_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_C_init.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; then @@ -14291,10 +14000,8 @@ printf %s "checking for internal HDF5 library... " >&6; }; NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # - #HDF5_LIBS_F="${NETCDF_HDF5_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a"; - HDF5_LIBS_F="-L${NETCDF_HDF5_PATH}/lib/ -lhdf5_hl_fortran -lhdf5_fortran"; - #HDF5_LIBS_C="${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a"; - HDF5_LIBS_C="-L${NETCDF_HDF5_PATH}/lib/ -lhdf5_hl -lhdf5"; + HDF5_LIBS_F="${NETCDF_HDF5_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a"; + HDF5_LIBS_C="${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a"; HDF5_LIBS="$HDF5_LIBS_F $HDF5_LIBS_C"; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # @@ -14310,8 +14017,7 @@ printf "%s\n" "already compiled" >&6; } ; # compile_hdf5="no" ; IO_LIB_VER="parallel"; - #HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; - HDF5_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; + HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 printf "%s\n" "already compiled (using parallel version)" >&6; } ; @@ -14735,11 +14441,9 @@ printf %s "checking for internal NETCDF library... " >&6; }; NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # - #NETCDF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdf.a" ; - NETCDF_LIBS="-L${NETCDF_HDF5_PATH}/lib/ -lnetcdf" ; + NETCDF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdf.a" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; - #NETCDFF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; - NETCDFF_LIBS="-L${NETCDF_HDF5_PATH}/lib/ -lnetcdff" ; + NETCDFF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # netcdf=yes ; @@ -14754,11 +14458,9 @@ printf "%s\n" "already compiled" >&6; } ; # compile_netcdf="no" ; IO_LIB_VER="parallel"; - #NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; - NETCDF_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lnetcdf" ; + NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - #NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; - NETCDFF_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lnetcdff" ; + NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 printf "%s\n" "already compiled (using parallel version)" >&6; } ; @@ -14890,6 +14592,7 @@ fi + # Check whether --with-futile_libs was given. if test ${with_futile_libs+y} then : @@ -15124,7 +14827,7 @@ fi # ============================================================================ # IOTK library -# + # Check whether --enable-iotk was given. if test ${enable_iotk+y} then : @@ -15200,16 +14903,14 @@ printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir_src" - #IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" - IOTK_LIBS="-L$try_iotk_libdir_src/ -liotk" + IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" - #IOTK_LIBS="$try_iotk_libdir/libiotk.a" - IOTK_LIBS="-L$try_iotk_libdir/ -liotk" + IOTK_LIBS="$try_iotk_libdir/libiotk.a" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else @@ -15238,8 +14939,7 @@ printf %s "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" - #IOTK_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" - IOTK_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib -liotk" + IOTK_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi @@ -15425,6 +15125,8 @@ fi # ============================================================================ # LIBXC +acx_libxc_ok=no +compile_libxc=yes # Check whether --with-libxc_libs was given. @@ -15456,7 +15158,6 @@ fi -acx_libxc_ok="no" internal_libxc="no" compile_libxc="no" @@ -15694,8 +15395,7 @@ if test x"$acx_libxc_ok" = xno; then have_configured="no" internal_libxc="yes" # version 5 is used - #LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" - LIBXC_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib/ -lxcf90 -lxcf03 -lxc" + LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" @@ -15716,265 +15416,35 @@ FCFLAGS="$acx_libxc_save_FCFLAGS" LIBS="$acx_libxc_save_LIBS" # ============================================================================ -# CUDA LIBRARY - - - -# Check whether --with-cuda_libs was given. -if test ${with_cuda_libs+y} -then : - withval=$with_cuda_libs; -fi - +# CUDA -# Check whether --with-cuda_incs was given. -if test ${with_cuda_incs+y} +# +# Check whether --enable-cuda was given. +if test ${enable_cuda+y} then : - withval=$with_cuda_incs; + enableval=$enable_cuda; fi # - -# Check whether --with-cuda_libdir was given. -if test ${with_cuda_libdir+y} +# Check whether --enable-nvtx was given. +if test ${enable_nvtx+y} then : - withval=$with_cuda_libdir; + enableval=$enable_nvtx; fi +if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi +# +def_cuda="" +CUDA_FLAGS="" +CUDA_LIBS="-cudalib=cufft,cublas,cusolver" -# Check whether --with-cuda_includedir was given. -if test ${with_cuda_includedir+y} -then : - withval=$with_cuda_includedir; -fi - -# - -# Check whether --with-cuda_path was given. -if test ${with_cuda_path+y} -then : - withval=$with_cuda_path; -fi - - -# -# Check whether --enable-cuda-libs-check was given. -if test ${enable_cuda_libs_check+y} -then : - enableval=$enable_cuda_libs_check; -else $as_nop - enable_cuda_libs_check=yes -fi - -# - -acx_libcuda_ok="no" -internal_libcuda="no" -compile_libcuda="no" -use_libcuda="no" - -acx_libcuda_save_LIBS="$LIBS" -acx_libcuda_save_FCFLAGS="$FCFLAGS" - -# Cuda libraries are needed only in one of the three following cases - -if test x"$enable_cuda_fortran" != "xno" || test x"$enable_openacc" != "xno" ; then - -#if test -z "$NVHPC" ; then -# -if test "x$with_cuda_path" = "x" ; then with_cuda_path="$CUDA_PATH" ; fi -if test "x$with_cuda_path" = "x" ; then with_cuda_path="$CUDA_ROOT" ; fi -if test "x$with_cuda_path" = "x" ; then with_cuda_path="$CUDA_HOME" ; fi - -LIBCUDA_PATH="$with_cuda_path" - -if test -d "$with_cuda_path"; then - libcuda_incdir="$with_cuda_path/include" - libcuda_libdir="$with_cuda_path/lib" - if ! test -d "$libcuda_libdir" ; then libcuda_libdir="$with_cuda_path/lib64" ; fi -fi -if test -d "$with_cuda_includedir"; then libcuda_incdir="$with_cuda_includedir" ; fi -if test -d "$with_cuda_libdir"; then libcuda_libdir="$with_cuda_libdir" ; fi - - -#Test to be finalized, for now it is always going to succeed - - -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -testprog=" program main - - integer ierr - ierr=cuInit - ierr=cudaMalloc - ierr=cublasInit - ierr=cufftPlanMany - - end" - -LIBCUDA_INCS="" -if test x"$CUDA_INCS" != "x" ; then LIBCUDA_INCS="$CUDA_INCS" ; fi -if test x"$libcuda_incdir" != "x" ; then LIBCUDA_INCS="$IFLAG$libcuda_incdir" ; fi -if test x"$with_cuda_incs" != "x" ; then LIBCUDA_INCS="$with_cuda_incs" ; fi - -FCFLAGS="$LIBCUDA_INCS $acx_libcuda_save_FCFLAGS" - -# set from environment variable, if not blank -if test ! -z "$CUDA_LIBS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from environment" >&5 -printf %s "checking for libcuda from environment... " >&6; } - LIBCUDA_LIBS="$CUDA_LIBS" - LIBS="$LIBCUDA_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libcuda_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# set from --with-cuda-libs flag -if test x"$acx_libcuda_ok" = xno && test ! -z "$with_cuda_libs" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from --with-cuda-libs" >&5 -printf %s "checking for libcuda from --with-cuda-libs... " >&6; } - LIBCUDA_LIBS="$with_cuda_libs" - LIBS="$LIBCUDA_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libcuda_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# dynamic linkage, separate Fortran interface -if test x"$acx_libcuda_ok" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from specified libcuda path, dynamic" >&5 -printf %s "checking for libcuda from specified libcuda path, dynamic... " >&6; } - LIBCUDA_LIBS="-L$libcuda_libdir -lcufft -lcusolver -lcublas -lcudart -lcuda" - LIBS="$LIBCUDA_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libcuda_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# static linkage, separate Fortran interface -if test x"$acx_libcuda_ok" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking static" >&5 -printf %s "checking static... " >&6; } - LIBCUDA_LIBS="$libcuda_libdir/libcuda.a" - LIBS="$LIBCUDA_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libcuda_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -if test x"$acx_libcuda_ok" = xyes; then - use_libcuda=yes - compile_libcuda=no - internal_libcuda=no - # - -printf "%s\n" "#define HAVE_LIBCUDA 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes." >&5 -printf "%s\n" "yes." >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found." >&5 -printf "%s\n" "not found." >&6; } - use_libcuda=no - compile_libcuda=no - internal_libcuda=no - LIBCUDA_LIBS="" - LIBCUDA_INCS="" - LIBCUDA_PATH="" -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - -# -# Internal libcuda not available at the moment -# -#if test x"$acx_libcuda_ok" = xno; then -# internal_libcuda="yes" -# LIBCUDA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libcuda.a" -# LIBCUDA_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" -# if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libcuda.a"; then -# compile_libcuda="no" -# AC_MSG_RESULT([Compatible external DevXlib not found/specified. Found internal already compiled.]) -# else -# compile_libcuda="yes" -# AC_MSG_RESULT([Compatible external DevXlib not found/specified. Internal to be compiled.]) -# fi -#fi - -#else -# use_libcuda=yes -# compile_libcuda=no -# internal_libcuda=no -# AC_DEFINE(HAVE_LIBCUDA, 1, [Defined if you have the LIBCUDA library.]) -# AC_MSG_RESULT([yes.]) -#fi -fi - - -FCFLAGS="$acx_libcuda_save_FCFLAGS" -LIBS="$acx_libcuda_save_LIBS" - - - - - - - - - -# ============================================================================ -# CUDA - -# - -# Check whether --with-cuda-cc was given. -if test ${with_cuda_cc+y} -then : - withval=$with_cuda_cc; -else $as_nop - with_cuda_cc=70 -fi - -# -# Available cc options +# Available cc options: # cc20 Compile for compute capability 2.0 # cc30 Compile for compute capability 3.0 # cc35 Compile for compute capability 3.5 # cc50 Compile for compute capability 5.0 # cc60 Compile for compute capability 6.0 # cc70 Compile for compute capability 7.0 -# cc80 Compile for compute capability 8.0 # # check your card at https://en.wikipedia.org/wiki/CUDA#GPUs_supported # @@ -15984,624 +15454,48 @@ fi # cc60 for Pascal cards (eg P100) # cc70 for Volta cards (eg V100) # -# nvfortran options (nvfortran --help) -# -#-ta=host|multicore|tesla -# Choose target accelerator (supported only for OpenACC, DEPRECATED please refer to -acc and -gpu) -# host Compile for serial execution on the host CPU -# multicore Compile for parallel execution on the host CPU -# tesla Compile for parallel execution on a Tesla GPU -# -# -[no]acc[=gpu|host|multicore|[no]autopar|[no]routineseq|legacy|strict|verystrict|sync|[no]wait] -# Enable OpenACC directives -# gpu OpenACC directives are compiled for GPU execution only; please refer to -gpu for target specific options -# host Compile for serial execution on the host CPU -# multicore Compile for parallel execution on the host CPU -# [no]autopar Enable (default) or disable loop autoparallelization within acc parallel -# [no]routineseq Compile every routine for the device -# legacy Suppress warnings about deprecated PGI accelerator directives -# strict Issue warnings for non-OpenACC accelerator directives -# verystrict Fail with an error for any non-OpenACC accelerator directive -# sync Ignore async clauses -# [no]wait Wait for each device kernel to finish -# -#-gpu=cc35|cc50|cc60|cc62|cc70|cc72|cc75|cc80|ccall|cudaX.Y|fastmath|[no]flushz|[no]fma|keep|[no]lineinfo|llc|zeroinit|deepcopy|loadcache:{L1|L2}|maxregcount:|pinned|[no]rdc|safecache|[no]unroll|managed|beta|autocompare|redundant -# Select specific options for GPU code generation -# cc35 Compile for compute capability 3.5 -# cc50 Compile for compute capability 5.0 -# cc60 Compile for compute capability 6.0 -# cc62 Compile for compute capability 6.2 -# cc70 Compile for compute capability 7.0 -# cc72 Compile for compute capability 7.2 -# cc75 Compile for compute capability 7.5 -# cc80 Compile for compute capability 8.0 -# ccall Compile for all supported compute capabilities -# cudaX.Y Use CUDA X.Y Toolkit compatibility, where installed -# fastmath Use fast math library -# [no]flushz Enable flush-to-zero mode on the GPU -# [no]fma Generate fused mul-add instructions (default at -O3) -# keep Keep kernel files -# [no]lineinfo Generate GPU line information -# zeroinit Initialize allocated device memory with zero -# deepcopy Enable Full Deepcopy support in OpenACC Fortran -# loadcache Choose what hardware level cache to use for global memory loads -# L1 Use L1 cache -# L2 Use L2 cache -# maxregcount: Set maximum number of registers to use on the GPU -# pinned Use CUDA Pinned Memory -# [no]rdc Generate relocatable device code -# safecache Allows variable-sized array sections in cache directives and assumes they fit into CUDA shared memory -# [no]unroll Enable automatic inner loop unrolling (default at -O3) -# managed Use CUDA Managed Memory -# beta Enable beta code generation features -# autocompare Automatically compare CPU/GPU results: implies redundant -# redundant Redundant CPU/GPU execution - - - - -# Check whether --with-cuda-runtime was given. -if test ${with_cuda_runtime+y} -then : - withval=$with_cuda_runtime; -else $as_nop - with_cuda_runtime=10.1 -fi - -# - -# Check whether --with-cuda-int-libs was given. -if test ${with_cuda_int_libs+y} -then : - withval=$with_cuda_int_libs; -else $as_nop - with_cuda_int_libs=cufft,cublas,cusolver -fi - -# -# Check whether --enable-nvtx was given. -if test ${enable_nvtx+y} -then : - enableval=$enable_nvtx; -else $as_nop - enable_nvtx="no" -fi - -# - -# Check whether --with-gpu_libs was given. -if test ${with_gpu_libs+y} -then : - withval=$with_gpu_libs; -fi - - -# Check whether --with-gpu_incs was given. -if test ${with_gpu_incs+y} -then : - withval=$with_gpu_incs; -fi - -# - -# Check whether --with-rocm_libs was given. -if test ${with_rocm_libs+y} -then : - withval=$with_rocm_libs; -fi - - -# Check whether --with-rocm_incs was given. -if test ${with_rocm_incs+y} -then : - withval=$with_rocm_incs; -fi - - -# Check whether --with-rocm_libdir was given. -if test ${with_rocm_libdir+y} -then : - withval=$with_rocm_libdir; -fi - - -# Check whether --with-rocm_includedir was given. -if test ${with_rocm_includedir+y} -then : - withval=$with_rocm_includedir; -fi - - -# Check whether --with-rocm_path was given. -if test ${with_rocm_path+y} -then : - withval=$with_rocm_path; -fi - -# - -# Check whether --with-mklgpu_libs was given. -if test ${with_mklgpu_libs+y} -then : - withval=$with_mklgpu_libs; -fi - - -use_int_cuda_libs="no" -use_gpu_libs="no" -enable_nvtx=no -DEVXLIB_CUDALIBS="" -DEVXLIBLIB_FLAGS="" -GPU_LIBS="" -GPU_FLAGS="" -def_gpu="" - - - # - # If not set via the configure use the cuda libs internal to the pgi/nvidia compiler - DEVXLIB_CUDALIBS=""; - if test x"$LIBCUDA_LIBS" = "x" -o x"$with_cuda_libs" = "x" ; then - use_int_cuda_libs="yes" ; - DEVXLIB_CUDALIBS="${with_cuda_int_libs}"; - fi - - # - # GPU aux libraries - GPU_LIBS=""; - if test x"$GPU_LIBS" = "x" -o x"$with_gpu_libs" = "x" ; then - GPU_LIBS="$with_gpu_libs"; - fi - GPU_INCS=""; - if test x"$GPU_INCS" = "x" -o x"$with_gpu_incs" = "x" ; then - GPU_INCS="$with_gpu_incs"; - fi - -# -#if test "x$with_rocm_path" = "x" ; then with_rocm_path="$ROCM_PATH" ; fi -#if test "x$with_rocm_path" = "x" ; then with_rocm_path="$ROCM_ROOT" ; fi -#if test "x$with_rocm_path" = "x" ; then with_rocm_path="$ROCM_HOME" ; fi - -LIBROCM_PATH="$with_rocm_path" - -if test x"$with_rocm_path" != x"" && test -d "$with_rocm_path" ; then - librocm_incdir="$with_rocm_path/include" - librocm_libdir="$with_rocm_path/lib" - if ! test -d "$librocm_libdir" ; then librocm_libdir="$with_rocm_path/lib" ; fi -fi -if test x"$with_rocm_includedir" != x"" && test -d "$with_rocm_includedir" ; then - librocm_incdir="$with_rocm_includedir" - LIBROCM_LIBS="-L$librocm_libdir -lrocblas" -fi -if test x"$with_rocm_libdir" != "$with_rocm_libdir" && test -d "$with_rocm_libdir" ; then - librocm_libdir="$with_rocm_libdir" - LIBROCM_INCS="-I$librocm_incdir" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 +printf %s "checking for CUDA support... " >&6; } +if test x"$enable_cuda" = "xyes" ; then + def_cuda="-D_CUDA" + CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +printf "%s\n" "$CUDA_FLAGS" >&6; } +elif ! test x"$enable_cuda" = "x" ; then + def_cuda="-D_CUDA" + CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 +printf "%s\n" "$CUDA_FLAGS" >&6; } +fi +# +if test x"$enable_cuda" = "x" -o x"$enable_cuda" = "xno" ; then + enable_nvtx=no + def_cuda="" + CUDA_FLAGS="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # -if test x"$with_rocm_libs" != x"" ; then LIBROCM_LIBS="$with_rocm_libs" ; fi -if test x"$with_rocm_incs" != x"" ; then LIBROCM_INCS="$with_rocm_incs" ; fi - -# MKL-GPU -if test x"$with_mklgpu_libs" != x"" ; then MKLGPU_LIBS="$with_mklgpu_libs" ; fi - -# Cuda Fortran -if test x"$enable_cuda_fortran" != "xno" ; then - # - def_gpu="-D_GPU -D_CUDA -D_CUDAF" - # - # Flags to be passed to the devicexlib library - # - DEVXLIB_FLAGS="--enable-openmp --enable-cuda-fortran --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime}" - # - case "${FCVERSION}" in - *nvfortran*) - GPU_FLAGS="-cuda -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" - if test x"$use_int_cuda_libs" = "xyes" ; then - GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; - fi - ;; - *) - GPU_FLAGS="-Mcuda=cc${with_cuda_cc},cuda${with_cuda_runtime}" - if test x"$use_int_cuda_libs" = "xyes" ; then - GPU_FLAGS+=" -Mcudalib=${with_cuda_int_libs}" - fi - esac - # - # Check CUDA - # - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -printf %s "checking for Fortran flag to compile .f90 files... " >&6; } -if test ${ac_cv_fc_srcext_f90+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_ext=f90 -ac_fcflags_srcext_save=$ac_fcflags_srcext -ac_fcflags_srcext= -ac_cv_fc_srcext_f90=unknown -case $ac_ext in #( - [fF]77) ac_try=f77;; #( - *) ac_try=f95;; -esac -for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do - test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" - cat > conftest.$ac_ext <<_ACEOF - program main - - end -_ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - ac_cv_fc_srcext_f90=$ac_flag; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -done -rm -f conftest.$ac_objext conftest.f90 -ac_fcflags_srcext=$ac_fcflags_srcext_save - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } -if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 -else - ac_fc_srcext=f90 - if test "x$ac_cv_fc_srcext_f90" = xnone; then - ac_fcflags_srcext="" - FCFLAGS_f90="" - else - ac_fcflags_srcext=$ac_cv_fc_srcext_f90 - FCFLAGS_f90=$ac_cv_fc_srcext_f90 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 +printf %s "checking for NVTX support... " >&6; } +if ! test x"$enable_nvtx" = "xno" ; then + if test x"$enable_nvtx" = "xyes" ; then + def_cuda="$def_cuda -D_NVTX" + CUDA_FLAGS="$CUDA_FLAGS -lnvToolsExt" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + elif ! test x"$enable_nvtx" = "x" ; then + def_cuda="$def_cuda -D_NVTX" + CUDA_FLAGS="$CUDA_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - - -fi -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - as_CACHEVAR=`printf "%s\n" "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 -printf %s "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } -if eval test \${$as_CACHEVAR+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - ax_check_save_flags=$FCFLAGS - FCFLAGS="$FCFLAGS $GPU_FLAGS" - cat > conftest.$ac_ext <<_ACEOF -MODULE test; use cudafor; END MODULE -_ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - eval "$as_CACHEVAR=yes" -else $as_nop - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - FCFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes" -then : - have_cudafor=yes -else $as_nop - have_cudafor=no -fi - - ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - - if test "x$have_cudafor" != "xyes"; then - as_fn_error $? "You do not have the cudafor module. Are you using a PGI/NVIDIA compiler?" "$LINENO" 5 - fi - # - if ! test x"$enable_nvtx" = "xno" ; then - # - if test x"$enable_nvtx" = "xyes" ; then - def_gpu="$def_gpu -D_NVTX" - GPU_FLAGS="$GPU_FLAGS -lnvToolsExt" - elif ! test x"$enable_nvtx" = "x" ; then - def_gpu="$def_gpu -D_NVTX" - GPU_FLAGS="$GPU_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" - fi - fi -fi -# -# Openacc -# -if test x"$enable_openacc" != "xno" ; then - # - # Flags to be passed to the devicexlib library - # - DEVXLIB_FLAGS="--enable-openacc --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime} " - def_gpu="-D_GPU -D_CUDA -D_OPENACC" - # - case "${FCVERSION}" in - *nvfortran*) - DEVXLIB_FLAGS+="--enable-openmp" - GPU_FLAGS="-acc=gpu,multicore -acclibs -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime} " # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" - if test x"$use_int_cuda_libs" = "xyes" ; then - GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; - fi - ;; - *pgfortran*) - DEVXLIB_FLAGS+="--enable-openmp" - GPU_FLAGS="-acc -acclibs -ta=tesla:cc${with_cuda_cc} " # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" - if test x"$use_int_cuda_libs" = "xyes" ; then - GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; - fi - ;; - *GNU* | *gnu*) - GPU_FLAGS="-fopenacc -foffload=-lm -foffload=-lgfortran" - # -foffload=nvptx-none - # -foffload=amdgcn-amdhsa -foffload=-march=gfx908 - # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime} - esac - # fi # -# OpenMP5 -# -if test x"$enable_openmp5" != "xno" ; then - # - # Flags to be passed to the devicexlib library - # - def_gpu="-D_GPU -D_OPENMP_GPU" - GPU_FLAGS="-fopenmp" # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" - DEVXLIB_FLAGS="--enable-openmp5" # --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime}" - if test x"$LIBROCM_LIBS" != "x" ; then - DEVXLIB_FLAGS+=" --enable-rocblas --with-rocm-libs=$LIBROCM_LIBS"; - def_gpu="$def_gpu -D_HIP" - fi - if test x"$MKLGPU_LIBS" != "x" ; then - DEVXLIB_FLAGS+=" --enable-mkl-gpu" ; - def_gpu="$def_gpu -D_MKLGPU" - GPU_FLAGS="-qopenmp -fopenmp-targets=spir64" - fi - # -fi -# - - - - - - - - - - - - # -# ============================================================================ -# Device XLIB - - - - -# Check whether --with-devxlib_libs was given. -if test ${with_devxlib_libs+y} -then : - withval=$with_devxlib_libs; -fi - - -# Check whether --with-devxlib_path was given. -if test ${with_devxlib_path+y} -then : - withval=$with_devxlib_path; -fi - - -# Check whether --with-devxlib_libdir was given. -if test ${with_devxlib_libdir+y} -then : - withval=$with_devxlib_libdir; -fi - - -# Check whether --with-devxlib_includedir was given. -if test ${with_devxlib_includedir+y} -then : - withval=$with_devxlib_includedir; -fi - - - -# Check whether --with-devxlib-branch was given. -if test ${with_devxlib_branch+y} -then : - withval=$with_devxlib_branch; -else $as_nop - with_devxlib_branch=none -fi - - - -acx_devxlib_ok="no" -internal_devxlib="no" -compile_devxlib="no" - -DEVXLIB_info="" - -if test -d "$with_devxlib_path"; then - devxlib_incdir="$with_devxlib_path/include" - devxlib_libdir="$with_devxlib_path/lib" -fi -if test -d "$with_devxlib_includedir"; then devxlib_incdir="$with_devxlib_includedir" ; fi -if test -d "$with_devxlib_libdir"; then devxlib_libdir="$with_devxlib_libdir" ; fi - -DEVXLIB_INCS="$IFLAG$devxlib_incdir" - -acx_devxlib_save_LIBS="$LIBS" -acx_devxlib_save_FCFLAGS="$FCFLAGS" - -#This is fake, it is always going to fail -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for devxlib" >&5 -printf %s "checking for devxlib... " >&6; } - -testprog=" program main - - use devxlib - implicit none - - integer :: i - - end" - -FCFLAGS="$GPU_FLAGS $LIBCUDA_INCS $LIBROCM_INCS $DEVXLIB_INCS $acx_devxlib_save_FCFLAGS" - -# set from environment variable, if not blank -if test ! -z "$DEVXLIB_LIBS"; then - LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_devxlib_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# set from --with-devxlib-libs flag -if test x"$acx_devxlib_ok" = xno && test ! -z "$with_devxlib_libs" ; then - DEVXLIB_LIBS="$with_devxlib_libs" - LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_devxlib_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# dynamic linkage, separate Fortran interface -if test x"$acx_devxlib_ok" = xno; then - DEVXLIB_LIBS="-L$devxlib_libdir -ldevXlib" - LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_devxlib_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# static linkage, separate Fortran interface -if test x"$acx_devxlib_ok" = xno; then - DEVXLIB_LIBS="$devxlib_libdir/libdevXlib.a" - LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_devxlib_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# static linkage, combined Fortran interface (devxlib pre-r10730) -if test x"$acx_devxlib_ok" = xno; then - DEVXLIB_LIBS="$devxlib_libdir/libdevXlib.a" - LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_devxlib_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - -# dynamic linkage, combined Fortran interface (devxlib pre-r10730) -if test x"$acx_devxlib_ok" = xno; then - DEVXLIB_LIBS="-L$devxlib_libdir -ldevXlib" - LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_devxlib_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi - - -if test x"$acx_devxlib_ok" = xyes; then - compile_devxlib=no - internal_devxlib=no - # - -printf "%s\n" "#define HAVE_DEVXLIB 1" >>confdefs.h - -fi - -if test x"$acx_devxlib_ok" = xno; then - internal_devxlib="yes" - #DEVXLIB_LIBS="${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libdevXlib.a" - DEVXLIB_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib -ldevXlib" - DEVXLIB_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/include" - if test -e "${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libdevXlib.a"; then - compile_devxlib="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Found internal already compiled." >&5 -printf "%s\n" "Compatible external DevXlib not found/specified. Found internal already compiled." >&6; } - else - if test x"$with_devxlib_branch" = "xnone"; then - DEVXLIB_info="(devxlib tarball)" - else - DEVXLIB_info="(devxlib $with_devxlib_branch branch)" - fi - compile_devxlib="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Internal to be compiled." >&5 -printf "%s\n" "Compatible external DevXlib not found/specified. Internal to be compiled." >&6; } - fi -fi -FCFLAGS="$acx_devxlib_save_FCFLAGS" -LIBS="$acx_devxlib_save_LIBS" - - - - - - - - - - - # ============================================================================ # Prepare the REPORT file variables @@ -16620,7 +15514,7 @@ if test "$enable_time_profile" = "yes" ; then TIME_profile_check="X"; fi MEM_profile_check="-" if test "$enable_memory_profile" = "yes" ; then MEM_profile_check="X"; fi # -# - PARALLEL/GPU SUPPORT - +# - PARALLEL/CUDA SUPPORT - # CUDA_check="-" if ! test x"$enable_cuda" = "x"; then CUDA_check="X"; fi @@ -16638,12 +15532,6 @@ fi # OPENMP_check="-" if test "$enable_open_mp" = "yes" ; then OPENMP_check="X"; fi -# -GPU_check="-" -if test "$enable_cuda_fortran" = "yes" ; then GPU_check="X"; fi -if test "$enable_openacc" = "yes" ; then GPU_check="X"; fi -if test "$enable_openmp5" = "yes" ; then GPU_check="X"; fi - # # - LIBRARIES - # @@ -16739,18 +15627,6 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # -DEVXLIB_check="E" -if test "$internal_devxlib" = "yes" ; then - if test "$compile_devxlib" = "yes"; then DEVXLIB_check="C"; fi - if test "$compile_devxlib" = "no" ; then DEVXLIB_check="I"; fi -fi -# -LIBCUDA_check="-" -if test "$use_libcuda" = "yes" ; then LIBCUDA_check="E"; fi - -GPU_libinfo="" -if test "$GPU_SUPPORT" = "cudaf" && test "$LIBCUDA_check" = "-" ; then GPU_libinfo="with internal cuda library"; fi -# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -16807,8 +15683,6 @@ fi - - # @@ -16829,8 +15703,6 @@ fi - - # # STRIPE [LIB] from paths # @@ -17178,52 +16050,6 @@ fi LIBXC_INCS_R=$STRIPE -# - -TMP1=`echo $DEVXLIB_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` -TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` -if [ -z "${1// }" ]; then - STRIPE="$STRIPE ("LIB")" -fi - -DEVXLIB_LIBS_R=$STRIPE - -TMP1=`echo $DEVXLIB_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` -TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` -if [ -z "${1// }" ]; then - STRIPE="$STRIPE ("INC")" -fi - -DEVXLIB_INCS_R=$STRIPE - - -# - -TMP1=`echo $LIBCUDA_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` -TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` -if [ -z "${1// }" ]; then - STRIPE="$STRIPE ("LIB")" -fi - -LIBCUDA_LIBS_R=$STRIPE - -TMP1=`echo $LIBCUDA_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` -TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` -if [ -z "${1// }" ]; then - STRIPE="$STRIPE ("INC")" -fi - -LIBCUDA_INCS_R=$STRIPE - - # TMP1=`echo $BLAS_PETSC_LIBS | sed 's/\//+/g'` @@ -17780,7 +16606,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24136 h.54610b0060, which was +This file was extended by Yambo $as_me 5.2.0 r.23534 h.06afe76, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17844,7 +16670,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24136 h.54610b0060 +Yambo config.status 5.2.0 r.23534 h.06afe76 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9b3ceb1634..4f86c08e93 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24136 h.54610b0060, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.23534 h.06afe76, yambo@yambo-code.org) SVERSION="5" -SSUBVERSION="3" +SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="24136" -SHASH="54610b0060" +SREVISION="23534" +SHASH="06afe76" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index a99da7ceb6..95f70d26aa 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -72,8 +72,8 @@ subroutine COLLISIONS_compose_nl(G_in) ! if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle ! - if ( .not.do_collisions(ib,ibp) ) cycle - ! + if ( .not.do_collisions(ib,ibp) ) cycle + ! if(coll_sp) then COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c_SP(i_comp),kind=SP) else From 0881cad47ab31c5a65389106bce75418e27ea021 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 9 Dec 2024 10:20:25 +0100 Subject: [PATCH 0851/1367] Version 5.2.0, Revision 24138, Hash 8c199c7 MODIFIED * modified: configure Changes: - configure re-generated Patch sent by: Davide Sangalli --- configure | 9650 ++++++++++++++++++------------------ include/version/version.m4 | 6 +- 2 files changed, 4958 insertions(+), 4698 deletions(-) diff --git a/configure b/configure index 145fccf5ab..1e6ab1f5b8 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.2.0 r.23534 h.06afe76. +# Generated by GNU Autoconf 2.69 for Yambo 5.2.0 r.24138 h.8c199c7. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,52 +187,42 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null -then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -222,21 +230,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,19 +255,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,7 +294,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -312,14 +311,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -334,7 +325,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -343,7 +334,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -382,13 +373,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -400,27 +390,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -432,9 +413,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -461,7 +442,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -505,7 +486,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -519,10 +500,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -536,13 +513,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -610,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.2.0 r.23534 h.06afe76' -PACKAGE_STRING='Yambo 5.2.0 r.23534 h.06afe76' +PACKAGE_VERSION='5.2.0 r.24138 h.8c199c7' +PACKAGE_STRING='Yambo 5.2.0 r.24138 h.8c199c7' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -619,42 +589,50 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir LAPACK_PETSC_INCS_R LAPACK_PETSC_LIBS_R BLAS_PETSC_INCS_R BLAS_PETSC_LIBS_R +LIBCUDA_INCS_R +LIBCUDA_LIBS_R +DEVXLIB_INCS_R +DEVXLIB_LIBS_R LIBXC_INCS_R LIBXC_LIBS_R SLEPC_INCS_R @@ -687,6 +665,8 @@ IOTK_INCS_R IOTK_LIBS_R MPI_info MPI_check +LIBCUDA_check +DEVXLIB_check LIBXC_check YPY_check YDB_check @@ -706,14 +686,40 @@ NETCDF_check HDF5_info HDF5_check PARIO_check +GPU_libinfo +GPU_check OPENMP_check CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check -CUDA_FLAGS -def_cuda +with_devxlib_branch +DEVXLIB_info +internal_devxlib +compile_devxlib +DEVXLIB_INCS +DEVXLIB_LIBS +MKLGPU_LIBS +LIBROCM_PATH +LIBROCM_INCS +LIBROCM_LIBS +DEVXLIB_CUDALIBS +DEVXLIB_FLAGS +GPU_INCS +GPU_LIBS +GPU_FLAGS +def_gpu +with_gpu_libs +with_cuda_int_libs +with_cuda_runtime +with_cuda_cc +internal_libcuda +compile_libcuda +use_libcuda +LIBCUDA_PATH +LIBCUDA_INCS +LIBCUDA_LIBS internal_libxc compile_libxc LIBXC_INCS @@ -810,10 +816,6 @@ internal_blas FLIBS YDB_dir GIT -with_ydriver_branch -DRIVER_INCS -Ydriver_check -Ydriver_LIB MPI_LIB_DIR MPI_INC_DIR MPI_LIBS @@ -834,11 +836,14 @@ FFLAGS F77 FPP CPPFLAGS_yambo -CPP IFLAG FCLIBS OPENMPLIBS def_openmp +GPU_SUPPORT +enable_openmp5 +enable_openacc +enable_cuda_fortran def_compiler HDF5_MODE DEBUG_FLAGS @@ -864,9 +869,6 @@ AR MAKE ifGNUmake hostname -SIZEOF_INT_P -SET_MAKE -LIBOBJS host_os host_vendor host_cpu @@ -875,9 +877,15 @@ build_os build_vendor build_cpu build +SIZEOF_INT_P +SET_MAKE +LIBOBJS ALLOCA Y_BRANCH GIT_CHECK +EGREP +GREP +CPP OBJEXT EXEEXT ac_ct_CC @@ -922,7 +930,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -959,13 +966,15 @@ with_echo enable_options_check with_f90ext enable_debug_flags +enable_cuda_fortran +enable_openacc +enable_openmp5 enable_open_mp enable_mpi with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir -with_ydriver_branch enable_ydb with_blas_libs enable_int_linalg @@ -1035,8 +1044,29 @@ with_libxc_libs with_libxc_path with_libxc_libdir with_libxc_includedir -enable_cuda +with_cuda_libs +with_cuda_incs +with_cuda_libdir +with_cuda_includedir +with_cuda_path +enable_cuda_libs_check +with_cuda_cc +with_cuda_runtime +with_cuda_int_libs enable_nvtx +with_gpu_libs +with_gpu_incs +with_rocm_libs +with_rocm_incs +with_rocm_libdir +with_rocm_includedir +with_rocm_path +with_mklgpu_libs +with_devxlib_libs +with_devxlib_path +with_devxlib_libdir +with_devxlib_includedir +with_devxlib_branch ' ac_precious_vars='build_alias host_alias @@ -1046,10 +1076,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS UFLAGS -CPP FPP F77 FFLAGS @@ -1094,7 +1124,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1124,6 +1153,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1164,9 +1195,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1190,9 +1221,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1345,15 +1376,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1403,9 +1425,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1419,9 +1441,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1465,9 +1487,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1483,7 +1505,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1491,7 +1513,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1547,7 +1569,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1604,7 +1626,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.2.0 r.23534 h.06afe76 to adapt to many kinds of systems. +\`configure' configures Yambo 5.2.0 r.24138 h.8c199c7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1644,7 +1666,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1670,7 +1691,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.2.0 r.23534 h.06afe76:";; + short | recursive ) echo "Configuration of Yambo 5.2.0 r.24138 h.8c199c7:";; esac cat <<\_ACEOF @@ -1691,6 +1712,9 @@ Optional Features: --enable-options-check Enable the command line options check in driver.c. Default is yes. --enable-debug-flags Debug flags are set for compilation. Default is no. + --enable-cuda-fortran Enable CUDA support [default=no] + --enable-openacc Enable OPENACC support [default=no] + --enable-openmp5 Enable OPENMP5 support [default=no] --enable-open-mp Enable OpenMP support --enable-mpi Enable mpi parallelization . Default is yes. --enable-ydb Activate the YDB support @@ -1719,8 +1743,10 @@ Optional Features: no --enable-iotk Activate the IOTK support --enable-etsf-io Activate the ETSF_IO support - --enable-cuda= Enable CUDA support - --enable-nvtx= Enable NVTX support + --enable-cuda-libs-check=yes + The configure script will check CUDA installation + and report problems [default=yes] + --enable-nvtx= Enable NVTX support [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1734,8 +1760,6 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory - --with-ydriver-branch= - Use the of the ydriver repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -1795,6 +1819,33 @@ Optional Packages: --with-libxc-libdir= Path to the libxc lib directory --with-libxc-includedir= Path to the libxc include directory + --with-cuda-libs= Use libcuda libraries + --with-cuda-incs= Use libcuda include options + --with-cuda-libdir= Path to the libcuda lib directory + --with-cuda-includedir= Path to the libcuda include directory + --with-cuda-path= Path to libcuda install directory + --with-cuda-cc=VAL GPU architecture (Kepler: 35, Pascal: 60, Volta: 70, + Ampere: 80) [default=70] + --with-cuda-runtime=VAL CUDA runtime (Pascal: 8+, Volta: 9+) [default=10.1] + --with-cuda-int-libs=VAL + CUDA internal libraries () + [default=cuda,cufft,cublas,cusolver,cudart] + --with-gpu-libs= Use extra GPU-specific libraries + --with-gpu-incs= Includes for extra GPU-specific libraries + + --with-rocm-libs= Use librocm library + --with-rocm-incs= Use librocm include options + --with-rocm-libdir= Path to the rocm lib directory + --with-rocm-includedir= Path to the rocm include directory + --with-rocm-path= Path to rocm install directory + --with-mklgpu-libs= Use librocm library + --with-devxlib-libs= Use devxlib libraries + --with-devxlib-path= Path to devxlib install directory + --with-devxlib-libdir= Path to the devxlib lib directory + --with-devxlib-includedir= + Path to the devxlib include directory + --with-devxlib-branch= + Use the of the devxlib repository. Some influential environment variables: CC C compiler command @@ -1804,10 +1855,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags - CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1834,9 +1885,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1864,8 +1915,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1873,7 +1923,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1882,10 +1932,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.2.0 r.23534 h.06afe76 -generated by GNU Autoconf 2.71 +Yambo configure 5.2.0 r.24138 h.8c199c7 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1902,14 +1952,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1917,15 +1967,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1935,6 +1984,176 @@ fi } # ac_fn_c_try_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------- ## +## Report this to yambo@yambo-code.org ## +## ----------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1942,28 +2161,26 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1975,17 +2192,16 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (ac_aggr.$3) @@ -1994,15 +2210,14 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2011,19 +2226,18 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2035,18 +2249,17 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2054,13 +2267,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2068,19 +2280,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2091,14 +2302,14 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2106,18 +2317,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2132,79 +2342,102 @@ fi } # ac_fn_c_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -} # ac_fn_c_try_run +#ifdef __STDC__ +# include +#else +# include +#endif -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2220,14 +2453,14 @@ fi ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2235,18 +2468,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2261,58 +2493,20 @@ fi } # ac_fn_fc_try_link -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2320,15 +2514,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2344,14 +2537,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2359,18 +2552,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2385,136 +2577,44 @@ fi } # ac_fn_f77_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.2.0 r.23534 h.06afe76, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by Yambo $as_me 5.2.0 r.24138 h.8c199c7, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2547,12 +2647,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2587,7 +2683,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2622,13 +2718,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2639,8 +2733,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2664,7 +2758,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2672,14 +2766,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2687,15 +2781,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2703,8 +2797,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2718,48 +2812,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2769,508 +2878,92 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif - -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/config" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -SVERSION="5" -SSUBVERSION="2" -SPATCHLEVEL="0" -SREVISION="23534" -SHASH="06afe76" +SVERSION="5" +SSUBVERSION="2" +SPATCHLEVEL="0" +SREVISION="24138" +SHASH="8c199c7" @@ -3289,6 +2982,34 @@ compdir=`echo "$PWD"` if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi # +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # @@ -3351,10 +3072,9 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test ${with_extlibs_path+y} -then : +if test "${with_extlibs_path+set}" = set; then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else $as_nop +else extlibs_path="${PWD}/lib/external" fi @@ -3365,8 +3085,7 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test ${enable_keep_objects+y} -then : +if test "${enable_keep_objects+set}" = set; then : enableval=$enable_keep_objects; fi @@ -3377,8 +3096,7 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test ${enable_keep_src+y} -then : +if test "${enable_keep_src+set}" = set; then : enableval=$enable_keep_src; fi @@ -3389,8 +3107,7 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test ${enable_keep_extlibs+y} -then : +if test "${enable_keep_extlibs+set}" = set; then : enableval=$enable_keep_extlibs; fi @@ -3408,8 +3125,7 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test ${enable_dp+y} -then : +if test "${enable_dp+set}" = set; then : enableval=$enable_dp; fi @@ -3428,8 +3144,7 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test ${enable_time_profile+y} -then : +if test "${enable_time_profile+set}" = set; then : enableval=$enable_time_profile; fi @@ -3445,8 +3160,7 @@ fi # USPP # # Check whether --enable-uspp was given. -if test ${enable_uspp+y} -then : +if test "${enable_uspp+set}" = set; then : enableval=$enable_uspp; fi @@ -3463,8 +3177,7 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test ${enable_memory_profile+y} -then : +if test "${enable_memory_profile+set}" = set; then : enableval=$enable_memory_profile; fi @@ -3480,8 +3193,7 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test ${enable_msgs_comps+y} -then : +if test "${enable_msgs_comps+set}" = set; then : enableval=$enable_msgs_comps; fi @@ -3498,10 +3210,9 @@ fi # # Check whether --with-editor was given. -if test ${with_editor+y} -then : +if test "${with_editor+set}" = set; then : withval=$with_editor; -else $as_nop +else with_editor="vim vi pico" fi @@ -3509,12 +3220,11 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_editor+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_editor+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3522,15 +3232,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3541,11 +3247,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -printf "%s\n" "$editor" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +$as_echo "$editor" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3560,10 +3266,9 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test ${with_echo+y} -then : +if test "${with_echo+set}" = set; then : withval=$with_echo; -else $as_nop +else with_echo="echo" fi @@ -3576,15 +3281,6 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3593,12 +3289,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3606,15 +3301,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3625,11 +3316,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3638,12 +3329,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3651,15 +3341,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3670,11 +3356,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3682,8 +3368,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3696,12 +3382,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3709,15 +3394,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3728,11 +3409,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3741,12 +3422,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3755,19 +3435,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3783,18 +3459,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3805,12 +3481,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3818,15 +3493,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3837,11 +3508,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3854,12 +3525,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3867,15 +3537,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3886,11 +3552,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3902,138 +3568,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4043,7 +3605,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4051,7 +3613,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4063,9 +3625,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4086,12 +3648,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4108,7 +3669,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4124,46 +3685,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4177,15 +3736,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4194,7 +3753,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4206,8 +3765,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4215,10 +3774,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4226,40 +3785,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4273,12 +3831,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4287,32 +3844,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4322,33 +3878,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4357,60 +3909,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4425,144 +3974,232 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -std=gnu11 +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c99_program +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c89_program +#include _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f conftest.err conftest.i conftest.$ac_ext + done -rm -f conftest.$ac_ext -CC=$ac_save_CC +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" +else + # Broken: fails on valid input. +continue fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4572,79 +4209,299 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_header= ac_cache= -for ac_item in $ac_header_c_list +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : - have_malloc_h=1 -else $as_nop - have_malloc_h=0 -fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -CFLAGS=$SAVE -if test "$have_malloc_h" -ne 0 -then -ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include -" -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes -then : - printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi +rm -f conftest* fi -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : -# -# General -# -# AC_PROG_ECHO -# -# Inspired from https://invisible-island.net/autoconf/portability-echo.html -# ------------- -# Check whether to use -e or not to intepret \backslash commands -# +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi -# -# Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch -# +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes; then : + have_malloc_h=1 +else + have_malloc_h=0 +fi + + +CFLAGS=$SAVE +if test "$have_malloc_h" -ne 0 +then +ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include +" +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : + $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h + +fi + +fi + +# +# General +# +# AC_PROG_ECHO +# +# Inspired from https://invisible-island.net/autoconf/portability-echo.html +# ------------- +# Check whether to use -e or not to intepret \backslash commands +# + + +# +# Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch +# # License-Identifier: GPL # # Copyright (C) 2006 The Yambo Team @@ -4702,6 +4559,76 @@ fi # +# +# License-Identifier: GPL +# +# Copyright (C) 2007 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + +# +# License-Identifier: GPL +# +# Copyright (C) 2010 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# # +################################################ +# Set FC FLAGS +# ---------------------------------- + +# + +# +# Original version Available from the GNU Autoconf Macro Archive at: +# http://autoconf-archive.cryp.to/macros-by-category.html +# +# License-Identifier: GPL +# +# Copyright (C) 2006 The Yambo Team +# +# Authors (see AUTHORS file for details): AM DS +# + +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + +# +# License-Identifier: GPL +# +# Copyright (C) 2022 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + +# # =========================================================================== # http://www.nongnu.org/autoconf-archive/ax_f90_module_flag.html # =========================================================================== @@ -4761,81 +4688,89 @@ fi +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== # -# License-Identifier: GPL -# -# Copyright (C) 2007 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# - - -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM +# SYNOPSIS # - - +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # -# License-Identifier: GPL +# DESCRIPTION # -# Copyright (C) 2010 The Yambo Team +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) # -# Authors (see AUTHORS file for details): AM -# # -################################################ -# Set FC FLAGS -# ---------------------------------- - +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. # - +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. # -# Original version Available from the GNU Autoconf Macro Archive at: -# http://autoconf-archive.cryp.to/macros-by-category.html +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. # -# License-Identifier: GPL +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # -# Copyright (C) 2006 The Yambo Team +# LICENSE # -# Authors (see AUTHORS file for details): AM DS +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans # - +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. # -# License-Identifier: GPL +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# Copyright (C) 2016 The Yambo Team +# You should have received a copy of the GNU General Public License along +# with this program. If not, see . # -# Authors (see AUTHORS file for details): AF +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. # +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. - -# -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team -# -# Authors (see AUTHORS file for details): AM -# +#serial 5 # -# License-Identifier: GPL -# -# Copyright (C) 2016 The Yambo Team # -# Authors (see AUTHORS file for details): AM +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.eu # - - +# Authors (see AUTHORS file for details): AF # -# License-Identifier: GPL +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. # -# Copyright (C) 2022 The Yambo Team +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. # -# Authors (see AUTHORS file for details): AM +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. # @@ -4878,12 +4813,11 @@ EOF Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT_CHECK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -4891,15 +4825,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4910,11 +4840,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -printf "%s\n" "$GIT_CHECK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +$as_echo "$GIT_CHECK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4928,60 +4858,42 @@ fi # # Checks for library functions. # ============================================================================ -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : - printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = xyes -then : - printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes -then : - printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h +for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h -fi +done ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -printf %s "checking for working alloca.h... " >&6; } -if test ${ac_cv_working_alloca_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -4989,52 +4901,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes -else $as_nop +else ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -printf %s "checking for alloca... " >&6; } -if test ${ac_cv_func_alloca_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _MSC_VER +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER # include # define alloca _alloca # else -# ifdef __cplusplus -extern "C" -# endif +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); +# endif +# endif +# endif # endif #endif int -main (void) +main () { char *p = (char *) alloca (1); if (p) return 0; @@ -5042,22 +4954,20 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes -else $as_nop +else ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then -printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -5067,19 +4977,58 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + done +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -printf %s "checking stack direction for C alloca... " >&6; } -if test ${ac_cv_c_stack_direction+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5100,10 +5049,9 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 -else $as_nop +else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5111,24 +5059,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -printf "%s\n" "$ac_cv_c_stack_direction" >&6; } -printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __cplusplus @@ -5141,7 +5090,7 @@ main (void) /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. + /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5169,7 +5118,7 @@ main (void) iptr p = 0; ++p; } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5185,50 +5134,47 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes -else $as_nop +else ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -printf "%s\n" "#define const /**/" >>confdefs.h +$as_echo "#define const /**/" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5245,118 +5191,45 @@ _ACEOF ;; esac +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF +fi +done - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } -if test ${ac_cv_func_malloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif int -main (void) +main () { -void *p = malloc (0); - int result = !p; - free (p); - return result; +return ! malloc (0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop +else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5364,15 +5237,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5381,47 +5253,50 @@ else $as_nop esac -printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h +$as_echo "#define malloc rpl_malloc" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -printf %s "checking for GNU libc compatible realloc... " >&6; } -if test ${ac_cv_func_realloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; - esac -else $as_nop +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if ${ac_cv_func_realloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif int -main (void) +main () { -void *p = realloc (0, 0); - int result = !p; - free (p); - return result; +return ! realloc (0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop +else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5429,15 +5304,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5446,34 +5320,27 @@ else $as_nop esac -printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h +$as_echo "#define realloc rpl_realloc" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -printf %s "checking whether lstat correctly handles trailing slash... " >&6; } -if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; - esac -else $as_nop + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5484,10 +5351,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop +else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5502,12 +5368,14 @@ fi rm -f conftest.sym conftest.file fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +_ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5519,21 +5387,19 @@ esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -printf %s "checking whether stat accepts an empty string... " >&6; } -if test ${ac_cv_func_stat_empty_string_bug+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +$as_echo_n "checking whether stat accepts an empty string... " >&6; } +if ${ac_cv_func_stat_empty_string_bug+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5541,10 +5407,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no -else $as_nop +else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5552,8 +5417,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5562,18 +5427,19 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STAT_EMPTY_STRING_BUG 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5589,20 +5455,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -printf %s "checking for the size of a pointer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +$as_echo_n "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5628,10 +5494,12 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define POINTER_SIZE ${ac_pointersize} +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -printf "%s\n" "${ac_pointersize} bytes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +$as_echo "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5647,12 +5515,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5660,15 +5527,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5679,11 +5542,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5692,12 +5555,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5705,15 +5567,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5724,11 +5582,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5736,8 +5594,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5750,12 +5608,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5763,15 +5620,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5782,11 +5635,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5795,12 +5648,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5809,19 +5661,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5837,18 +5685,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5859,12 +5707,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5872,15 +5719,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5891,11 +5734,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5908,12 +5751,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5921,15 +5763,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5940,11 +5778,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5956,138 +5794,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6097,21 +5831,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -6121,33 +5854,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -6156,60 +5885,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -6224,144 +5950,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -6371,42 +6047,111 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu # +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -hostname=`uname -n` - -# ============================================================================ -# GNU Make -MAKE="make" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -printf %s "checking for GNU make... " >&6; } -if test ${_cv_gnu_make_command+y} -then : - printf %s "(cached) " >&6 -else $as_nop - _cv_gnu_make_command='' ; - for a in "$MAKE" make gmake gnumake ; do - if test -z "$a" ; then continue ; fi ; - if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then - _cv_gnu_make_command=$a ; - break; - fi - done ; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -printf "%s\n" "$_cv_gnu_make_command" >&6; } ; - if test "x$_cv_gnu_make_command" != "x" ; then - ifGNUmake='' ; - else - ifGNUmake='#' ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -printf "%s\n" "\"Not found\"" >&6; }; - fi - - -if test "$_cv_gnu_make_command" = ""; then - -echo -e 'all:\n\t$(f)$\ndefine f\n@echo yes\nendef' >tmk +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +hostname=`uname -n` + +# ============================================================================ +# GNU Make +MAKE="make" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +$as_echo_n "checking for GNU make... " >&6; } +if ${_cv_gnu_make_command+:} false; then : + $as_echo_n "(cached) " >&6 +else + _cv_gnu_make_command='' ; + for a in "$MAKE" make gmake gnumake ; do + if test -z "$a" ; then continue ; fi ; + if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then + _cv_gnu_make_command=$a ; + break; + fi + done ; + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +$as_echo "$_cv_gnu_make_command" >&6; } ; + if test "x$_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +$as_echo "\"Not found\"" >&6; }; + fi + + +if test "$_cv_gnu_make_command" = ""; then + +echo -e 'all:\n\t$(f)$\ndefine f\n@echo yes\nendef' >tmk make_works=`$MAKE -f tmk` rm -f tmk @@ -6422,12 +6167,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6435,15 +6179,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6454,11 +6194,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6467,12 +6207,11 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6480,15 +6219,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6499,11 +6234,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6511,8 +6246,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6530,8 +6265,7 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test ${enable_options_check+y} -then : +if test "${enable_options_check+set}" = set; then : enableval=$enable_options_check; fi @@ -6555,12 +6289,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6568,15 +6301,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6587,11 +6316,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -printf "%s\n" "$FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6604,12 +6333,11 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6617,15 +6345,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6636,11 +6360,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -printf "%s\n" "$ac_ct_FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6652,8 +6376,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6662,7 +6386,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6672,7 +6396,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6682,7 +6406,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6691,12 +6415,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 -printf %s "checking whether the compiler supports GNU Fortran... " >&6; } -if test ${ac_cv_fc_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6705,48 +6428,43 @@ else $as_nop end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+y} +ac_test_FCFLAGS=${FCFLAGS+set} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -printf %s "checking whether $FC accepts -g... " >&6; } -if test ${ac_cv_prog_fc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_g=yes -else $as_nop +else ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -printf "%s\n" "$ac_cv_prog_fc_g" >&6; } -if test $ac_test_FCFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6780,8 +6498,8 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -printf %s "checking if the current OS is supported... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +$as_echo_n "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6795,6 +6513,16 @@ case "${host}" in #TIMER="ct_etime.o" if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; + aarch*apple* | arm*apple* ) + build_os="apple" + #TIMER="ct_etime.o" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; + aarch*linux* | arm*linux* ) + build_os="linux" + #TIMER="ct_etime.o" + if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi + ;; powerpc64*linux* ) build_os="linux" #TIMER="ct_etime.o" @@ -6815,31 +6543,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -printf "%s\n" "$as_me: a guest account on this machine." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +$as_echo "$as_me: Platform <${host}> is not supported." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +$as_echo "$as_me: providing either a list of compilers and options or" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +$as_echo "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -6855,8 +6583,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test ${with_f90ext+y} -then : +if test "${with_f90ext+set}" = set; then : withval=$with_f90ext; fi @@ -6868,12 +6595,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -printf %s "checking for Fortran flag to compile .f90 files... " >&6; } -if test ${ac_cv_fc_srcext_f90+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6889,18 +6615,17 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -6926,12 +6651,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -printf %s "checking for Fortran flag to compile .f files... " >&6; } -if test ${ac_cv_fc_srcext_f+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } +if ${ac_cv_fc_srcext_f+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6947,18 +6671,17 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +$as_echo "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -7012,6 +6735,10 @@ case "${FC}" in FCKIND="intel" FCVERSION=`$FC -v 2>&1` ;; + *ifx*) + FCKIND="intel" + FCVERSION=`$FC -v 2>&1` + ;; *ifort*) FCKIND="intel" FCVERSION=`$FC -v 2>&1` @@ -7049,10 +6776,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -printf %s "checking for $FC kind and version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +$as_echo_n "checking for $FC kind and version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -7069,8 +6796,7 @@ printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test ${enable_debug_flags+y} -then : +if test "${enable_debug_flags+set}" = set; then : enableval=$enable_debug_flags; fi @@ -7084,6 +6810,13 @@ SLK_FC_FLAGS="" case "${host}" in i?86*linux*) case "${FC}" in + *ftn* ) + SYSFLAGS="-O1 -g -emf -eZ" + FUFLAGS="-O0 -g -emf -eZ" + FCMFLAG="" + OMPFLAGS="-fopenmp" + DEBUG_FLAGS="-g " + ;; *pgf9* | *ftn* | *pgfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -Mbackslash" @@ -7121,7 +6854,7 @@ i?86*linux*) DEBUG_FLAGS="-Wall -pedantic -fbounds-check -ftrace=full" ;; *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" + SYSFLAGS="-O3 -g -mtune=native -fno-lto" FUFLAGS="-O0 -mtune=native" SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" @@ -7173,7 +6906,7 @@ i?86*linux*) NETCDFFLAGS="-Df2cFortran" esac ;; -*86*apple* ) +*86*apple* | aarch*apple* | arm*apple* ) case "${FC}" in *pgf9* | *ftn* | *pgfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" @@ -7233,6 +6966,13 @@ i?86*linux*) ;; ia64*linux* ) case "${FC}" in + *ftn* ) + SYSFLAGS="-O1 -g -emf -eZ" + FUFLAGS="-O0 -g -emf -eZ" + FCMFLAG="" + OMPFLAGS="-fopenmp" + DEBUG_FLAGS="-g " + ;; *pgf9* | *ftn* | *pgfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" #SYSFLAGS="-O2 -g -fast -Munroll -Mnoframe -Mdalign -Mbackslash" @@ -7253,7 +6993,7 @@ ia64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame" ;; *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" + SYSFLAGS="-O3 -g -mtune=native -fno-lto" FUFLAGS="-O0 -g -mtune=native" SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" @@ -7313,8 +7053,32 @@ ia64*linux* ) NETCDFFLAGS="-Df2cFortran" esac ;; +aarch*linux* | arm*linux* ) + case "${FC}" in + *gfortran*) + SYSFLAGS="-O3 -g -mtune=native -fno-lto" + FUFLAGS="-O0 -g -mtune=native" + SLK_FC_FLAGS="-fallow-argument-mismatch" + FCMFLAG="" + OMPFLAGS="-fopenmp" + NETCDFFLAGS="-DgFortran" + DEBUG_FLAGS="-Og -g -Wall -pedantic -fbounds-check -ffpe-trap=invalid,zero,overflow" + ;; + *) + SYSFLAGS="-g -O" + FUFLAGS="-O0" + NETCDFFLAGS="-Df2cFortran" + esac + ;; *x86*64* ) case "${FC}" in + *ftn* ) + SYSFLAGS="-O1 -g -emf -eZ" + FUFLAGS="-O0 -g -emf -eZ" + FCMFLAG="" + OMPFLAGS="-fopenmp" + DEBUG_FLAGS="-g " + ;; *pgf9* | *ftn* | *pgfortran* | *nvfortran* ) SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" #SYSFLAGS="-O2 -g -Munroll -Mnoframe -Mdalign -Mbackslash -cpp" @@ -7326,7 +7090,7 @@ ia64*linux* ) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame -Mbackslash -cpp" ;; *gfortran*) - SYSFLAGS="-O3 -g -mtune=native" + SYSFLAGS="-O3 -g -mtune=native -fno-lto" FUFLAGS="-O0 -g -mtune=native" SLK_FC_FLAGS="-fallow-argument-mismatch" FCMFLAG="" @@ -7386,6 +7150,15 @@ ia64*linux* ) NETCDFFLAGS="-DpgiFortran" DEBUG_FLAGS="-CB -traceback -debug full" ;; + *ifx*) + OMPFLAGS="-qopenmp" + CPU_FLAG="" + FCMFLAG="-nofor-main" + CFLAGS="-O2 -std=gnu99" + SYSFLAGS="-O3 -g" + FUFLAGS="-O0 -g" + DEBUG_FLAGS="-CB -traceback -debug full" + ;; *openf9*) SYSFLAGS="-O2 -fno-second-underscore" FUFLAGS="-O0 -fno-second-underscore" @@ -7462,35 +7235,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -printf %s "checking for specific $FC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +$as_echo_n "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -printf "%s\n" "$FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +$as_echo "$FCFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -printf "%s\n" "(User-defined) $FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +$as_echo "(User-defined) $FCFLAGS" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -printf %s "checking for specific Open-MP flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -printf "%s\n" "$OMPFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +$as_echo_n "checking for specific Open-MP flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +$as_echo "$OMPFLAGS" >&6; } # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -printf %s "checking for specific $CC flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -printf "%s\n" "$CFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +$as_echo_n "checking for specific $CC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +$as_echo "$CFLAGS" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -printf %s "checking for specific unoptimized flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +$as_echo_n "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -printf "%s\n" "$FCUFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +$as_echo "$FCUFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -printf "%s\n" "(User-defined) $UFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +$as_echo "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7501,10 +7274,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -printf %s "checking for specific NETCDF flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -printf "%s\n" "$NETCDFFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +$as_echo_n "checking for specific NETCDF flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +$as_echo "$NETCDFFLAGS" >&6; } # @@ -7521,14 +7294,50 @@ printf "%s\n" "$NETCDFFLAGS" >&6; } # acx_save_fcflags="$FCFLAGS" FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" +# +# ============================================================================ +# +# GPUs suppport +# +GPU_SUPPORT="no_gpu" +# +# Check whether --enable-cuda_fortran was given. +if test "${enable_cuda_fortran+set}" = set; then : + enableval=$enable_cuda_fortran; +else + enable_cuda_fortran="no" +fi + +# Check whether --enable-openacc was given. +if test "${enable_openacc+set}" = set; then : + enableval=$enable_openacc; +else + enable_openacc="no" +fi + +# Check whether --enable-openmp5 was given. +if test "${enable_openmp5+set}" = set; then : + enableval=$enable_openmp5; +else + enable_openmp5="no" +fi + +# +if test x"$enable_cuda_fortran" != "xno" ; then GPU_SUPPORT="cudaf" ; fi +if test x"$enable_openacc" != "xno" ; then GPU_SUPPORT="openacc" ; enable_open_mp="no"; fi +if test x"$enable_openmp5" != "xno" ; then GPU_SUPPORT="openmp5" ; fi +# + + + + # # ============================================================================ # # OpenMP # # Check whether --enable-open-mp was given. -if test ${enable_open_mp+y} -then : +if test "${enable_open_mp+set}" = set; then : enableval=$enable_open_mp; fi @@ -7550,19 +7359,17 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -printf %s "checking how to get verbose linking output from $FC... " >&6; } -if test ${ac_cv_prog_fc_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7580,13 +7387,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7653,24 +7460,23 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -printf "%s\n" "$ac_cv_prog_fc_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -printf %s "checking for Fortran libraries of $FC... " >&6; } -if test ${ac_cv_fc_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7689,13 +7495,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7772,10 +7578,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -7788,10 +7593,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -7806,24 +7610,9 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) - # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; esac ;; @@ -7841,7 +7630,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -7850,10 +7639,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -7868,17 +7656,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -7890,7 +7676,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -7905,8 +7691,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -printf "%s\n" "$ac_cv_fc_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -7921,12 +7707,11 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -printf %s "checking for dummy main to link with Fortran libraries... " >&6; } -if test ${ac_cv_fc_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -7949,20 +7734,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -7979,18 +7763,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -8003,24 +7786,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown -then : +if test "$FC_DUMMY_MAIN" != unknown; then : if test $FC_DUMMY_MAIN != none; then -printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -8035,12 +7819,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -printf %s "checking for Fortran name-mangling scheme... " >&6; } -if test ${ac_cv_fc_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -8049,8 +7832,7 @@ else $as_nop return end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -8071,6 +7853,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8081,18 +7866,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -8127,6 +7911,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8137,18 +7924,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -8178,17 +7964,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -printf "%s\n" "$ac_cv_fc_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8211,8 +7997,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8227,11 +8012,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -8242,7 +8026,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8250,8 +8034,7 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8266,11 +8049,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -8281,12 +8063,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -printf %s "checking for external C routine (test) naming scheme... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -printf "%s\n" "$msg" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +$as_echo "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8294,48 +8076,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8394,12 +8176,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } -if test ${ac_cv_fc_freeform+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } +if ${ac_cv_fc_freeform+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8414,18 +8195,17 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -printf "%s\n" "$ac_cv_fc_freeform" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +$as_echo "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8450,12 +8230,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -printf %s "checking fortran 90 modules inclusion flag... " >&6; } -if test ${ax_cv_f90_modflag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } +if ${ax_cv_f90_modflag+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8478,11 +8257,10 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do @@ -8498,11 +8276,10 @@ for ax_flag in "-I" "-M" "-p"; do end program conftest_program _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ax_cv_f90_modflag="$ax_flag" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS="$ax_save_FCFLAGS" fi done @@ -8518,208 +8295,75 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -printf "%s\n" "$ax_cv_f90_modflag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +$as_echo "$ax_cv_f90_modflag" >&6; } IFLAG="$ax_cv_f90_modflag" if test -z "$IFLAG" ; then IFLAG="-I" ; fi # # ============================================================================ # CPP check & flags -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# -case "${CPP}" in - *icc* ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-ansi"; fi - ;; - *icx* ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-ansi"; fi - ;; - *gcc* ) - case "${host}" in - *86*apple* ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P -D_apple"; fi - ;; - * ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P"; fi - ;; - esac - ;; - *cpp* ) - case "${host}" in - i?86*linux* | ia64*linux* | *x86*64* ) - case "${FC}" in - *g95*) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P -traditional"; fi - ;; - *) - if test -z "$CPPFLAGS"; then CPPFLAGS="-traditional"; fi - ;; - esac - ;; - *86*apple* ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P -traditional -D_apple"; fi - ;; - powerpc64*linux* ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-E -traditional"; fi - ;; - powerpc-ibm* ) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P"; fi - ;; - mips-sgi-irix*) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P"; fi - ;; - alphaev*) - if test -z "$CPPFLAGS"; then CPPFLAGS="-P -C"; fi - ;; - esac - ;; -esac -# -# -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} -# -# TESTS -#======= -# -CPP_TESTS_PASSED=yes -# -# Select C to use the CPP in AC_PREPROC_IFELSE -# + +# +case "${CPP}" in + *icc* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-ansi"; fi + ;; + *icx* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-ansi"; fi + ;; + *gcc* ) + case "${host}" in + *86*apple* | *arm*apple* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P -D_apple"; fi + ;; + * ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P"; fi + ;; + esac + ;; + *cpp* ) + case "${host}" in + i?86*linux* | ia64*linux* | *x86*64* ) + case "${FC}" in + *g95*) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P -traditional"; fi + ;; + *) + if test -z "$CPPFLAGS"; then CPPFLAGS="-traditional"; fi + ;; + esac + ;; + *86*apple* | *arm*apple* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P -traditional -D_apple"; fi + ;; + powerpc64*linux* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-E -traditional"; fi + ;; + powerpc-ibm* ) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P"; fi + ;; + mips-sgi-irix*) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P"; fi + ;; + alphaev*) + if test -z "$CPPFLAGS"; then CPPFLAGS="-P -C"; fi + ;; + esac + ;; +esac +# +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +# +# TESTS +#======= +# +CPP_TESTS_PASSED=yes +# +# Select C to use the CPP in AC_PREPROC_IFELSE +# ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8728,8 +8372,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -printf %s "checking if C precompiler works on C source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +$as_echo_n "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8741,15 +8385,14 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : acx_C_ok=yes -else $as_nop +else CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -printf "%s\n" "$acx_C_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +$as_echo "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -8781,6 +8424,9 @@ case "${FC}" in *gfortran | *g95) if test -z "$FPP"; then FPP="${FC} -E -P -cpp"; fi ;; + *nvfortran*) + if test -z "$FPP"; then FPP="${FC} -Mpreprocess -E"; fi + ;; # # some of the following could be uncommented once explicitly checked # @@ -8797,8 +8443,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -8807,8 +8453,8 @@ printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -printf %s "checking if FC precompiler works on FC source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +$as_echo_n "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -8835,8 +8481,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -printf "%s\n" "$acx_FC_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +$as_echo "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -8865,12 +8511,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -8878,15 +8523,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8897,11 +8538,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -printf "%s\n" "$F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +$as_echo "$F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8914,12 +8555,11 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -8927,15 +8567,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8946,11 +8582,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -printf "%s\n" "$ac_ct_F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -8962,8 +8598,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -8972,7 +8608,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -8982,7 +8618,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -8992,7 +8628,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -9001,12 +8637,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 -printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } -if test ${ac_cv_f77_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } +if ${ac_cv_f77_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -9015,48 +8650,43 @@ else $as_nop end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+y} +ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -printf %s "checking whether $F77 accepts -g... " >&6; } -if test ${ac_cv_prog_f77_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } +if ${ac_cv_prog_f77_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes -else $as_nop +else ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -printf "%s\n" "$ac_cv_prog_f77_g" >&6; } -if test $ac_test_FFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -9082,24 +8712,23 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : - acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO"; then : + acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9135,8 +8764,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test ${enable_mpi+y} -then : +if test "${enable_mpi+set}" = set; then : enableval=$enable_mpi; fi @@ -9166,12 +8794,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9179,15 +8806,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9198,11 +8821,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9211,13 +8834,12 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9227,22 +8849,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIFC_test=$MPIFC -else $as_nop +else for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9250,15 +8870,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9269,11 +8885,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9289,23 +8905,22 @@ fi if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9325,11 +8940,10 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -printf %s "checking for a working mpif.h... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +$as_echo_n "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9340,23 +8954,21 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9367,22 +8979,20 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -printf %s "checking for a working mpi module... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +$as_echo_n "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9393,15 +9003,14 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi # # @@ -9413,12 +9022,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9449,13 +9058,12 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -printf %s "checking for $MPIF77... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +$as_echo_n "checking for $MPIF77... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9465,22 +9073,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIF77 -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9488,15 +9094,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9507,11 +9109,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9522,13 +9124,12 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9538,22 +9139,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIFC -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9561,15 +9160,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9580,11 +9175,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9599,12 +9194,11 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9612,15 +9206,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9631,11 +9221,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9649,23 +9239,22 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : ac_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9701,12 +9290,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9742,12 +9331,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9755,15 +9343,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9774,11 +9358,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9787,13 +9371,12 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -printf %s "checking for $MPICC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +$as_echo_n "checking for $MPICC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -9803,26 +9386,24 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else $as_nop +else for ac_prog in $MPICC mpipgicc mpiicc mpicc hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9830,15 +9411,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9849,11 +9426,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9870,8 +9447,7 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes -then : +if test "x$ac_cv_func_MPI_Init" = xyes; then : acx_mpi_ok="yes" fi @@ -9886,8 +9462,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9900,22 +9476,21 @@ printf %s "checking for a working mpi.h... " >&6; } #endif #endif int -main (void) +main () { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; };acx_mpi_ok="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -9940,12 +9515,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9984,13 +9559,17 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -printf %s "checking for MPI version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -printf "%s\n" "$MPIKIND" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +$as_echo_n "checking for MPI version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +$as_echo "$MPIKIND" >&6; } MPI_PATH=`which $CC |sed "s/bin\/$CC//g"` + if ! test -d "$MPI_PATH/include"; then + MPI_PATH=`$CC -show | sed "s/.*-I//g"` ; + MPI_PATH=`echo ${MPI_PATH} | sed "s/\/include.*//g"` ; + fi # else # @@ -10009,29 +9588,25 @@ fi # Check whether --with-mpi_libs was given. -if test ${with_mpi_libs+y} -then : +if test "${with_mpi_libs+set}" = set; then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test ${with_mpi_path+y} -then : +if test "${with_mpi_path+set}" = set; then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test ${with_mpi_libdir+y} -then : +if test "${with_mpi_libdir+set}" = set; then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test ${with_mpi_includedir+y} -then : +if test "${with_mpi_includedir+set}" = set; then : withval=$with_mpi_includedir; fi @@ -10107,13 +9682,12 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -10123,12 +9697,11 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : mpif_found_tmp="yes" -else $as_nop +else mpif_found_tmp="no" fi @@ -10282,46 +9855,69 @@ url_ydb=https://github.com/yambo-code/ydb.git # -ac_ext=${ac_fc_srcext-f} -ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' -ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - -# ============================================================================ -# Yambo Libs - - -DRIVER_INCS="-I$PWD/lib/yambo/Ydriver/include/ -I$PWD/include/driver" # - -# Check whether --with-ydriver-branch was given. -if test ${with_ydriver_branch+y} -then : - withval=$with_ydriver_branch; -else $as_nop - with_ydriver_branch=none -fi - +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.eu +# +# Authors (see AUTHORS file for details): DS +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. # -if test x"$with_ydriver_branch" = "xnone"; then - Ydriver_check="D"; - Ydriver_LIB="Download" -else - Ydriver_check="G"; - Ydriver_LIB="GIT, branch $with_ydriver_branch" -fi +# +# +# Copyright (C) 2000-2021 the YAMBO team +# http://www.yambo-code.eu +# +# Authors (see AUTHORS file for details): DS +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# +# +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu # ============================================================================ # YDB/YAMBOpy # # Check whether --enable-ydb was given. -if test ${enable_ydb+y} -then : +if test "${enable_ydb+set}" = set; then : enableval=$enable_ydb; fi @@ -10335,12 +9931,11 @@ if test "x$enable_ydb" = "xyes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -10348,15 +9943,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10367,11 +9958,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -printf "%s\n" "$GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +$as_echo "$GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10380,12 +9971,11 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10393,15 +9983,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10412,11 +9998,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -printf "%s\n" "$ac_ct_GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +$as_echo "$ac_ct_GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10424,8 +10010,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10437,14 +10023,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -printf %s "checking YDB from $url_ydb... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +$as_echo_n "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10454,8 +10040,8 @@ printf %s "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10469,19 +10055,17 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -printf %s "checking how to get verbose linking output from $F77... " >&6; } -if test ${ac_cv_prog_f77_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } +if ${ac_cv_prog_f77_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10499,13 +10083,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10572,24 +10156,23 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -printf "%s\n" "$ac_cv_prog_f77_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -printf %s "checking for Fortran 77 libraries of $F77... " >&6; } -if test ${ac_cv_f77_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +$as_echo "$ac_cv_prog_f77_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } +if ${ac_cv_f77_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10608,13 +10191,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10691,10 +10274,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -10707,10 +10289,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" @@ -10725,24 +10306,9 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) - # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi + *cygwin*) ;; + *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; esac ;; @@ -10760,7 +10326,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -10769,10 +10335,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -10787,17 +10352,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -10809,7 +10372,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | + ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -10824,8 +10387,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -printf "%s\n" "$ac_cv_f77_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +$as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -10841,20 +10404,17 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test ${enable_int_linalg+y} -then : +if test "${enable_int_linalg+set}" = set; then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test ${enable_openmp_int_linalg+y} -then : +if test "${enable_openmp_int_linalg+set}" = set; then : enableval=$enable_openmp_int_linalg; fi @@ -10862,8 +10422,7 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi @@ -10888,23 +10447,22 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_blas_ok=yes -else $as_nop +else BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -printf "%s\n" "$acx_blas_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +$as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -10913,10 +10471,9 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi @@ -10925,12 +10482,11 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -printf %s "checking for ATL_xerbla in -latlas... " >&6; } -if test ${ac_cv_lib_atlas_ATL_xerbla+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } +if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10938,27 +10494,24 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes -else $as_nop +else ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -printf %s "checking for $caxpy in -lf77blas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10966,27 +10519,24 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -printf %s "checking for cblas_daxpy in -lcblas... " >&6; } -if test ${ac_cv_lib_cblas_cblas_daxpy+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } +if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10994,20 +10544,18 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_daxpy=yes -else $as_nop +else ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -11020,13 +10568,12 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11034,28 +10581,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -printf %s "checking for $daxpy in -ldaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11063,28 +10607,25 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -printf %s "checking for $caxpy in -lcaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11092,21 +10633,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -11118,13 +10657,12 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -printf %s "checking for $caxpy in -lcxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +$as_echo_n "checking for $caxpy in -lcxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11132,21 +10670,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -11154,13 +10690,12 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -printf %s "checking for $caxpy in -ldxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +$as_echo_n "checking for $caxpy in -ldxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11168,21 +10703,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -11191,12 +10724,11 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -printf %s "checking for acosp in -lsunmath... " >&6; } -if test ${ac_cv_lib_sunmath_acosp+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +$as_echo_n "checking for acosp in -lsunmath... " >&6; } +if ${ac_cv_lib_sunmath_acosp+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11204,27 +10736,24 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes -else $as_nop +else ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -printf %s "checking for $caxpy in -lsunperf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11232,21 +10761,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -11258,13 +10785,12 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -printf %s "checking for $caxpy in -lscs... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +$as_echo_n "checking for $caxpy in -lscs... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11272,21 +10798,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -11294,13 +10818,12 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11308,21 +10831,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -11330,13 +10851,12 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11344,28 +10864,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -printf %s "checking for $caxpy in -lessl... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +$as_echo_n "checking for $caxpy in -lessl... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11373,21 +10890,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -11403,13 +10918,12 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11417,33 +10931,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -printf %s "checking for $caxpy in -lmkl_gf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11451,21 +10962,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11477,13 +10986,12 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11491,33 +10999,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -printf %s "checking for $caxpy in -lmkl_intel... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11525,21 +11030,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11550,13 +11053,12 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11564,21 +11066,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11589,7 +11089,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h +$as_echo "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11599,12 +11099,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11669,12 +11169,11 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if test ${ac_cv_f77_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if ${ac_cv_f77_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -11705,20 +11204,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -11743,18 +11241,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -11767,24 +11264,25 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +$as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown -then : +if test "$F77_DUMMY_MAIN" != unknown; then : if test $F77_DUMMY_MAIN != none; then -printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define F77_DUMMY_MAIN $F77_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -11798,12 +11296,11 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } -if test ${ac_cv_f77_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } +if ${ac_cv_f77_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -11812,8 +11309,7 @@ else $as_nop return end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -11834,6 +11330,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11852,18 +11351,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -11898,6 +11396,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11916,18 +11417,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -11957,17 +11457,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -printf "%s\n" "$ac_cv_f77_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +$as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -11981,8 +11481,7 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test ${with_lapack_libs+y} -then : +if test "${with_lapack_libs+set}" = set; then : withval=$with_lapack_libs; fi @@ -12008,23 +11507,22 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_lapack_ok=yes -else $as_nop +else LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -printf "%s\n" "$acx_lapack_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +$as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -12034,10 +11532,9 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi @@ -12048,13 +11545,12 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -printf %s "checking for $cheev in -l$lapack... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +$as_echo_n "checking for $cheev in -l$lapack... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -12062,21 +11558,19 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -12108,23 +11602,22 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_dlaran_ok=yes -else $as_nop +else acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -printf "%s\n" "$acx_dlaran_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +$as_echo "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -12132,7 +11625,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h +$as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -12142,12 +11635,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -12199,60 +11692,52 @@ fi # Check whether --with-fft_libs was given. -if test ${with_fft_libs+y} -then : +if test "${with_fft_libs+set}" = set; then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test ${with_fft_path+y} -then : +if test "${with_fft_path+set}" = set; then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test ${with_fft_libdir+y} -then : +if test "${with_fft_libdir+set}" = set; then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test ${with_fft_includedir+y} -then : +if test "${with_fft_includedir+set}" = set; then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test ${enable_internal_fftqe+y} -then : +if test "${enable_internal_fftqe+set}" = set; then : enableval=$enable_internal_fftqe; -else $as_nop +else enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test ${enable_internal_fftsg+y} -then : +if test "${enable_internal_fftsg+set}" = set; then : enableval=$enable_internal_fftsg; -else $as_nop +else enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test ${enable_3d_fft+y} -then : +if test "${enable_3d_fft+set}" = set; then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test ${with_fftsg_fac+y} -then : +if test "${with_fftsg_fac+set}" = set; then : withval=$with_fftsg_fac; fi @@ -12277,10 +11762,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -12296,16 +11781,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -printf %s "checking for FFT Library using $with_fft_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } fi # # check for FFTW @@ -12368,24 +11853,22 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW="yes"; -else $as_nop +else HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW_OMP="yes"; -else $as_nop +else HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -12397,18 +11880,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -printf "%s\n" "FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +$as_echo "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -printf "%s\n" "FFTW3_OMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +$as_echo "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -printf "%s\n" "FFTW ($desc) " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +$as_echo "FFTW ($desc) " >&6; } fi else def_fft="" @@ -12423,8 +11906,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -12434,8 +11917,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -printf "%s\n" "FFTW no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +$as_echo "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -12445,31 +11928,30 @@ printf "%s\n" "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -printf %s "checking for dcft in $LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +$as_echo_n "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_ESSL=yes -else $as_nop +else HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -printf "%s\n" "$HAVE_ESSL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +$as_echo "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -12481,8 +11963,8 @@ printf %s "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -printf "%s\n" "ESSL FFT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +$as_echo "ESSL FFT" >&6; } fi fi # @@ -12491,8 +11973,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -12529,8 +12011,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +$as_echo "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12556,8 +12038,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -printf "%s\n" "FFTSG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +$as_echo "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12578,8 +12060,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -printf "%s\n" "Internal FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +$as_echo "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12593,48 +12075,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12643,7 +12125,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - printf "%s\n" "#define _FFTQE 1" >>confdefs.h + $as_echo "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12665,99 +12147,86 @@ fi # # Check whether --enable-slepc_linalg was given. -if test ${enable_slepc_linalg+y} -then : +if test "${enable_slepc_linalg+set}" = set; then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test ${with_slepc_libs+y} -then : +if test "${with_slepc_libs+set}" = set; then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test ${with_slepc_incs+y} -then : +if test "${with_slepc_incs+set}" = set; then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test ${with_slepc_path+y} -then : +if test "${with_slepc_path+set}" = set; then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test ${with_slepc_libdir+y} -then : +if test "${with_slepc_libdir+set}" = set; then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test ${with_slepc_includedir+y} -then : +if test "${with_slepc_includedir+set}" = set; then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test ${with_petsc_libs+y} -then : +if test "${with_petsc_libs+set}" = set; then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test ${with_petsc_incs+y} -then : +if test "${with_petsc_incs+set}" = set; then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test ${with_petsc_path+y} -then : +if test "${with_petsc_path+set}" = set; then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test ${with_petsc_libdir+y} -then : +if test "${with_petsc_libdir+set}" = set; then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test ${with_petsc_includedir+y} -then : +if test "${with_petsc_includedir+set}" = set; then : withval=$with_petsc_includedir; fi # Check whether --with-slepc-branch was given. -if test ${with_slepc_branch+y} -then : +if test "${with_slepc_branch+set}" = set; then : withval=$with_slepc_branch; -else $as_nop +else with_slepc_branch=none fi # Check whether --with-petsc-branch was given. -if test ${with_petsc_branch+y} -then : +if test "${with_petsc_branch+set}" = set; then : withval=$with_petsc_branch; -else $as_nop +else with_petsc_branch=none fi @@ -12780,12 +12249,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12794,6 +12262,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -12812,29 +12283,27 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi @@ -12869,12 +12338,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -12917,24 +12386,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : petsc=yes -else $as_nop +else petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -12947,8 +12415,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -printf %s "checking for internal Petsc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +$as_echo_n "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # @@ -12968,30 +12436,30 @@ printf %s "checking for internal Petsc library... " >&6; } PETSC_LIBS="$PETSC_LIBS_DN" ; compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 -printf "%s\n" "dynamic already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 +$as_echo "dynamic already compiled" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 -printf "%s\n" "dynamic found, despite no dynamic lapack detected." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic petsc libs." >&5 -printf "%s\n" "The compilation may fail. In case remove the dynamic petsc libs." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 +$as_echo "dynamic found, despite no dynamic lapack detected." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic petsc libs." >&5 +$as_echo "The compilation may fail. In case remove the dynamic petsc libs." >&6; } ; fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 -printf "%s\n" "static found, despite dynamic lapack." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: You may delete the static petsc and re-run the configure to get smaller executables" >&5 -printf "%s\n" "You may delete the static petsc and re-run the configure to get smaller executables" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 +$as_echo "static found, despite dynamic lapack." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: You may delete the static petsc and re-run the configure to get smaller executables" >&5 +$as_echo "You may delete the static petsc and re-run the configure to get smaller executables" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 -printf "%s\n" "static already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +$as_echo "static already compiled" >&6; } ; fi else compile_petsc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi # fi @@ -13018,12 +12486,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -13062,25 +12530,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : slepc=yes -else $as_nop +else slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13094,8 +12561,8 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -printf %s "checking for internal Slepc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +$as_echo_n "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # @@ -13113,30 +12580,30 @@ printf %s "checking for internal Slepc library... " >&6; } SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; compile_slepc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 -printf "%s\n" "dynamic already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 +$as_echo "dynamic already compiled" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 -printf "%s\n" "dynamic found, despite no dynamic lapack detected." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic slepc libs." >&5 -printf "%s\n" "The compilation may fail. In case remove the dynamic slepc libs." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 +$as_echo "dynamic found, despite no dynamic lapack detected." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic slepc libs." >&5 +$as_echo "The compilation may fail. In case remove the dynamic slepc libs." >&6; } ; fi elif test -e "$SLEPC_LIBS_ST" ; then SLEPC_LIBS="$SLEPC_LIBS_ST" ; compile_slepc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 -printf "%s\n" "static found, despite dynamic lapack." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: You may delete the static slepc and re-run the configure to get smaller executables" >&5 -printf "%s\n" "You may delete the static slepc and re-run the configure to get smaller executables" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 +$as_echo "static found, despite dynamic lapack." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: You may delete the static slepc and re-run the configure to get smaller executables" >&5 +$as_echo "You may delete the static slepc and re-run the configure to get smaller executables" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 -printf "%s\n" "static already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +$as_echo "static already compiled" >&6; } ; fi else compile_slepc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -13162,22 +12629,19 @@ fi # Check whether --enable-par_linalg was given. -if test ${enable_par_linalg+y} -then : +if test "${enable_par_linalg+set}" = set; then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test ${with_blacs_libs+y} -then : +if test "${with_blacs_libs+set}" = set; then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test ${with_scalapack_libs+y} -then : +if test "${with_scalapack_libs+set}" = set; then : withval=$with_scalapack_libs; fi @@ -13224,6 +12688,11 @@ fi # # Parse configure options # +if test "$enable_par_linalg" = "yes" ; then + enable_blacs="internal" ; + enable_scalapack="internal" ; +fi +# case $with_blacs_libs in yes) enable_blacs="internal" ;; no) enable_blacs="no" ; enable_par_linalg="no" ;; @@ -13259,23 +12728,22 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_blacs="yes" -else $as_nop +else enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -printf "%s\n" "$enable_blacs" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +$as_echo "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -13290,23 +12758,22 @@ printf "%s\n" "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_scalapack="yes" -else $as_nop +else enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -printf "%s\n" "$enable_scalapack" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +$as_echo "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -13325,7 +12792,7 @@ printf "%s\n" "$enable_scalapack" >&6; } fi # if test "$mpif_found" = "yes" && test "$enable_blacs" = "internal"; then - enable_blacs="yes" + enable_blacs="yes"; internal_blacs="yes"; BLACS_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_C_init.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; then @@ -13380,29 +12847,25 @@ LIBS="$reset_LIBS" # # Check whether --with-hdf5_libs was given. -if test ${with_hdf5_libs+y} -then : +if test "${with_hdf5_libs+set}" = set; then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test ${with_hdf5_path+y} -then : +if test "${with_hdf5_path+set}" = set; then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test ${with_hdf5_libdir+y} -then : +if test "${with_hdf5_libdir+set}" = set; then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test ${with_hdf5_includedir+y} -then : +if test "${with_hdf5_includedir+set}" = set; then : withval=$with_hdf5_includedir; fi @@ -13410,8 +12873,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -13419,10 +12881,9 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test ${enable_hdf5_par_io+y} -then : +if test "${enable_hdf5_par_io+set}" = set; then : enableval=$enable_hdf5_par_io; -else $as_nop +else enable_hdf5_par_io="yes" fi @@ -13430,8 +12891,7 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test ${enable_hdf5_p2y_support+y} -then : +if test "${enable_hdf5_p2y_support+set}" = set; then : enableval=$enable_hdf5_p2y_support; fi @@ -13462,13 +12922,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -printf %s "checking for deflate in -lz ... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +$as_echo_n "checking for deflate in -lz ... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13477,6 +12936,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13495,39 +12957,36 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : use_libz="yes"; -else $as_nop +else use_libz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -printf %s "checking for deflate in -lsz... " >&6; } -if test ${ac_cv_lib_sz_deflate+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +$as_echo_n "checking for deflate in -lsz... " >&6; } +if ${ac_cv_lib_sz_deflate+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13536,6 +12995,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13554,38 +13016,35 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sz_deflate=yes -else $as_nop +else ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +$as_echo "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes; then : use_libsz="yes"; -else $as_nop +else use_libsz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13594,6 +13053,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13612,38 +13074,35 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -printf %s "checking for curl_version in -lcurl... " >&6; } -if test ${ac_cv_lib_curl_curl_version+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +$as_echo_n "checking for curl_version in -lcurl... " >&6; } +if ${ac_cv_lib_curl_curl_version+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13652,6 +13111,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13670,38 +13132,35 @@ char curl_version (); #endif #endif int -main (void) +main () { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_curl_version=yes -else $as_nop +else ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +$as_echo "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes; then : use_libcurl="yes"; -else $as_nop +else use_libcurl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -printf %s "checking for cos in -lm... " >&6; } -if test ${ac_cv_lib_m_cos+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13710,6 +13169,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -13728,29 +13190,27 @@ char cos (); #endif #endif int -main (void) +main () { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes -else $as_nop +else ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -printf "%s\n" "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : use_libm="yes"; -else $as_nop +else use_libm="no"; fi @@ -13779,14 +13239,14 @@ if test x"$enable_hdf5" = "xyes"; then # if ! test "$with_hdf5_libs" = "internal" ; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 -printf %s "checking for HDF5... " >&6; } ; - if test -d "$with_hdf5_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in libdir $with_hdf5_libdir" >&5 -printf "%s\n" "in libdir $with_hdf5_libdir" >&6; } ; - elif test -d "$with_hdf5_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in path $with_hdf5_path" >&5 -printf "%s\n" "in path $with_hdf5_path" >&6; } ; - elif test x"$with_hdf5_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $with_hdf5_libs" >&5 -printf "%s\n" "using $with_hdf5_libs" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 +$as_echo_n "checking for HDF5... " >&6; } ; + if test -d "$with_hdf5_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: in libdir $with_hdf5_libdir" >&5 +$as_echo "in libdir $with_hdf5_libdir" >&6; } ; + elif test -d "$with_hdf5_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: in path $with_hdf5_path" >&5 +$as_echo "in path $with_hdf5_path" >&6; } ; + elif test x"$with_hdf5_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $with_hdf5_libs" >&5 +$as_echo "using $with_hdf5_libs" >&6; } ; fi # ac_ext=${ac_fc_srcext-f} @@ -13827,26 +13287,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = "xno" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # # Automatic detection of hdf5 libs copied from QE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -13894,13 +13353,12 @@ printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13909,10 +13367,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi # if test "x$hdf5" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -printf %s "checking for HDF5 using automatic library list... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -13952,13 +13410,12 @@ printf %s "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13972,13 +13429,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -printf "%s\n" "yes - parallel lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +$as_echo "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -printf "%s\n" "yes - serial lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +$as_echo "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -13987,12 +13444,12 @@ printf "%s\n" "yes - serial lib found" >&6; } ; # if test "x$hdf5" = xno; then if ! test "$with_hdf5_libs" = "internal" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -printf %s "checking for internal HDF5 library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +$as_echo_n "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -14000,8 +13457,10 @@ printf %s "checking for internal HDF5 library... " >&6; }; NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # - HDF5_LIBS_F="${NETCDF_HDF5_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a"; - HDF5_LIBS_C="${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a"; + #HDF5_LIBS_F="${NETCDF_HDF5_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PATH}/lib/libhdf5_fortran.a"; + HDF5_LIBS_F="-L${NETCDF_HDF5_PATH}/lib/ -lhdf5_hl_fortran -lhdf5_fortran"; + #HDF5_LIBS_C="${NETCDF_HDF5_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PATH}/lib/libhdf5.a"; + HDF5_LIBS_C="-L${NETCDF_HDF5_PATH}/lib/ -lhdf5_hl -lhdf5"; HDF5_LIBS="$HDF5_LIBS_F $HDF5_LIBS_C"; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # @@ -14010,17 +13469,18 @@ printf %s "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; IO_LIB_VER="parallel"; - HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; + #HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; + HDF5_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14029,8 +13489,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14087,58 +13547,50 @@ fi # Check whether --with-netcdf_libs was given. -if test ${with_netcdf_libs+y} -then : +if test "${with_netcdf_libs+set}" = set; then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test ${with_netcdf_path+y} -then : +if test "${with_netcdf_path+set}" = set; then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test ${with_netcdf_libdir+y} -then : +if test "${with_netcdf_libdir+set}" = set; then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test ${with_netcdf_includedir+y} -then : +if test "${with_netcdf_includedir+set}" = set; then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test ${with_netcdff_libs+y} -then : +if test "${with_netcdff_libs+set}" = set; then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test ${with_netcdff_path+y} -then : +if test "${with_netcdff_path+set}" = set; then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test ${with_netcdff_libdir+y} -then : +if test "${with_netcdff_libdir+set}" = set; then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test ${with_netcdff_includedir+y} -then : +if test "${with_netcdff_includedir+set}" = set; then : withval=$with_netcdff_includedir; fi @@ -14146,8 +13598,7 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test ${enable_netcdf_classic+y} -then : +if test "${enable_netcdf_classic+set}" = set; then : enableval=$enable_netcdf_classic; fi @@ -14155,8 +13606,7 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test ${enable_netcdf_par_io+y} -then : +if test "${enable_netcdf_par_io+set}" = set; then : enableval=$enable_netcdf_par_io; fi @@ -14164,8 +13614,7 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test ${enable_netcdf_v3+y} -then : +if test "${enable_netcdf_v3+set}" = set; then : enableval=$enable_netcdf_v3; fi @@ -14173,8 +13622,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -14182,8 +13630,7 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test ${enable_netcdf_output+y} -then : +if test "${enable_netcdf_output+set}" = set; then : enableval=$enable_netcdf_output; fi @@ -14219,10 +13666,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -14267,15 +13714,15 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi netcdf="yes"; try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # fi # @@ -14300,24 +13747,23 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -14328,8 +13774,8 @@ printf "%s\n" "no" >&6; } ; # # internal netcdf # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -printf %s "checking for internal NetCDF library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +$as_echo_n "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -14355,22 +13801,22 @@ printf %s "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi fi # @@ -14405,13 +13851,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -14419,8 +13864,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; # fi # @@ -14428,11 +13873,11 @@ printf "%s\n" "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -printf %s "checking for internal NETCDF library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +$as_echo_n "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -14441,9 +13886,11 @@ printf %s "checking for internal NETCDF library... " >&6; }; NETCDF_HDF5_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}" ; NETCDF_HDF5_PAR_PATH="${extlibs_path}/${FCKIND}/${FC}/${NETCDF_VER}/parallel" ; # - NETCDF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdf.a" ; + #NETCDF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdf.a" ; + NETCDF_LIBS="-L${NETCDF_HDF5_PATH}/lib/ -lnetcdf" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; - NETCDFF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; + #NETCDFF_LIBS="${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; + NETCDFF_LIBS="-L${NETCDF_HDF5_PATH}/lib/ -lnetcdff" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PATH}/include" ; # netcdf=yes ; @@ -14451,19 +13898,21 @@ printf %s "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_netcdf="no" ; IO_LIB_VER="parallel"; - NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; + #NETCDF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" ; + NETCDF_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lnetcdf" ; NETCDF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; + #NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; + NETCDFF_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lnetcdff" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14472,8 +13921,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14555,68 +14004,58 @@ fi # Check whether --enable-yaml_output was given. -if test ${enable_yaml_output+y} -then : +if test "${enable_yaml_output+set}" = set; then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test ${with_yaml_libs+y} -then : +if test "${with_yaml_libs+set}" = set; then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test ${with_yaml_includedir+y} -then : +if test "${with_yaml_includedir+set}" = set; then : withval=$with_yaml_includedir; fi - # Check whether --with-futile_libs was given. -if test ${with_futile_libs+y} -then : +if test "${with_futile_libs+set}" = set; then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test ${with_futile_includedir+y} -then : +if test "${with_futile_includedir+set}" = set; then : withval=$with_futile_includedir; fi @@ -14639,10 +14078,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14661,55 +14100,55 @@ printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -printf %s "checking for internal YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +$as_echo_n "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_yaml="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -printf %s "checking for YAML library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +$as_echo_n "checking for YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14733,10 +14172,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -14755,55 +14194,55 @@ printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -printf %s "checking for internal FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +$as_echo_n "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_futile="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -printf %s "checking for FUTILE library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +$as_echo_n "checking for FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -14827,40 +14266,35 @@ fi # ============================================================================ # IOTK library - +# # Check whether --enable-iotk was given. -if test ${enable_iotk+y} -then : +if test "${enable_iotk+set}" = set; then : enableval=$enable_iotk; -else $as_nop +else enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test ${with_iotk_libs+y} -then : +if test "${with_iotk_libs+set}" = set; then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test ${with_iotk_path+y} -then : +if test "${with_iotk_path+set}" = set; then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test ${with_iotk_libdir+y} -then : +if test "${with_iotk_libdir+set}" = set; then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test ${with_iotk_includedir+y} -then : +if test "${with_iotk_includedir+set}" = set; then : withval=$with_iotk_includedir; fi @@ -14881,10 +14315,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -14903,54 +14337,57 @@ printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir_src" - IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + #IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" + IOTK_LIBS="-L$try_iotk_libdir_src/ -liotk" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" - IOTK_LIBS="$try_iotk_libdir/libiotk.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + #IOTK_LIBS="$try_iotk_libdir/libiotk.a" + IOTK_LIBS="-L$try_iotk_libdir/ -liotk" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -printf %s "checking for internal IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +$as_echo_n "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" - IOTK_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" + #IOTK_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" + IOTK_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib -liotk" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi # @@ -14966,10 +14403,10 @@ printf "%s\n" "already compiled" >&6; } else PW_VER="no support" PW_CPP="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -printf %s "checking for IOTK library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +$as_echo_n "checking for IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # # @@ -14989,38 +14426,33 @@ fi # Check whether --enable-etsf_io was given. -if test ${enable_etsf_io+y} -then : +if test "${enable_etsf_io+set}" = set; then : enableval=$enable_etsf_io; -else $as_nop +else enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test ${with_etsf_io_libs+y} -then : +if test "${with_etsf_io_libs+set}" = set; then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test ${with_etsf_io_path+y} -then : +if test "${with_etsf_io_path+set}" = set; then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test ${with_etsf_io_libdir+y} -then : +if test "${with_etsf_io_libdir+set}" = set; then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test ${with_etsf_io_includedir+y} -then : +if test "${with_etsf_io_includedir+set}" = set; then : withval=$with_etsf_io_includedir; fi @@ -15047,10 +14479,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -15069,50 +14501,50 @@ printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # # internal ETSF_IO # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -printf %s "checking for internal ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +$as_echo_n "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -printf "%s\n" "found already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +$as_echo "found already compiled" >&6; } else compile_etsf="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } fi fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -printf %s "checking for ETSF_IO Library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +$as_echo_n "checking for ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # @@ -15125,47 +14557,42 @@ fi # ============================================================================ # LIBXC -acx_libxc_ok=no -compile_libxc=yes # Check whether --with-libxc_libs was given. -if test ${with_libxc_libs+y} -then : +if test "${with_libxc_libs+set}" = set; then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test ${with_libxc_path+y} -then : +if test "${with_libxc_path+set}" = set; then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test ${with_libxc_libdir+y} -then : +if test "${with_libxc_libdir+set}" = set; then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test ${with_libxc_includedir+y} -then : +if test "${with_libxc_includedir+set}" = set; then : withval=$with_libxc_includedir; fi +acx_libxc_ok="no" internal_libxc="no" compile_libxc="no" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -printf %s "checking for libxc... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +$as_echo_n "checking for libxc... " >&6; } testprog=" program main @@ -15185,11 +14612,10 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15219,282 +14645,1044 @@ if test x"$acx_libxc_ok" = xno ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + # if dynamic / user provided linkage did not work, try static one + if test x"$acx_libxc_ok" = xno && test ! -z "$libxc_libdir"; then + LIBXC_LIBS="$libxc_libdir/libxcf90.a $libxc_libdir/libxcf03.a $libxc_libdir/libxc.a" + LIBS="$LIBXC_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi + + +testprog_5x=" program main + + use xc_f03_lib_m + implicit none + type(xc_f03_func_t) :: p + real(selected_real_kind(14,200)) :: ext_params + call xc_f03_func_set_ext_params(p,(/ext_params/)) + + end" + +testprog_4x=" program main + + use xc_f90_lib_m + use xc_f90_types_m + implicit none + type(xc_f90_pointer_t) :: p + real(xc_f90_kind) :: ext_params + call xc_f90_func_set_ext_params(p,ext_params) + + end" + +testprog_21=" program main + + use xc_f90_lib_m + implicit none + + integer :: i + i = XC_GGA_X_LV_RPW86 + end" + +testprog_203=" program main + + use xc_f90_lib_m + use xc_f90_types_m + implicit none + type(xc_f90_pointer_t) :: conf + real(8) :: alpha + real(8) :: gamma + call xc_f90_hyb_gga_xc_hse_set_par(conf,alpha,gamma) + end" + +testprog_20=" program main + + use xc_f90_lib_m + implicit none + integer :: major + integer :: minor + call xc_f90_version(major, minor) + end" + +testprog_12=" program main + + use xc_f90_lib_m + implicit none + + integer :: i + i = XC_GGA_X_AIRY + end" + +testprog_11=" program main + + use xc_f90_lib_m + implicit none + + integer :: i + i = XC_KINETIC + end" + +if test x"$acx_libxc_ok" = xyes; then +cat > conftest.$ac_ext <<_ACEOF +$testprog_11 +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=110, acx_libxc_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +cat > conftest.$ac_ext <<_ACEOF +$testprog_12 +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=120, acx_libxc_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +cat > conftest.$ac_ext <<_ACEOF +$testprog_20 +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=200, acx_libxc_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +cat > conftest.$ac_ext <<_ACEOF +$testprog_203 +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=203, acx_libxc_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +cat > conftest.$ac_ext <<_ACEOF +$testprog_21 +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=210, acx_libxc_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +cat > conftest.$ac_ext <<_ACEOF +$testprog_4x +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=400, acx_libxc_ok=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +cat > conftest.$ac_ext <<_ACEOF +$testprog_5x +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libxc_version=5, acx_libxc_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - # if dynamic / user provided linkage did not work, try static one - if test x"$acx_libxc_ok" = xno && test ! -z "$libxc_libdir"; then - LIBXC_LIBS="$libxc_libdir/libxcf90.a $libxc_libdir/libxcf03.a $libxc_libdir/libxc.a" - LIBS="$LIBXC_LIBS" - cat > conftest.$ac_ext <<_ACEOF -$testprog -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_ok=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - fi +cat >>confdefs.h <<_ACEOF +#define LIBXC_VERSION $acx_libxc_version +_ACEOF + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +fi + +if test x"$acx_libxc_ok" = xyes; then + compile_libxc=no + internal_libxc=no + # + +$as_echo "#define HAVE_LIBXC 1" >>confdefs.h + +fi + +if test x"$acx_libxc_ok" = xno; then + have_configured="no" + internal_libxc="yes" + # version 5 is used + #LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" + LIBXC_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/lib/ -lxcf90 -lxcf03 -lxc" + LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then + compile_libxc="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + else + compile_libxc="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + fi +fi + + + + + +FCFLAGS="$acx_libxc_save_FCFLAGS" +LIBS="$acx_libxc_save_LIBS" + +# ============================================================================ +# CUDA LIBRARY + + + +# Check whether --with-cuda_libs was given. +if test "${with_cuda_libs+set}" = set; then : + withval=$with_cuda_libs; +fi + + +# Check whether --with-cuda_incs was given. +if test "${with_cuda_incs+set}" = set; then : + withval=$with_cuda_incs; +fi + +# + +# Check whether --with-cuda_libdir was given. +if test "${with_cuda_libdir+set}" = set; then : + withval=$with_cuda_libdir; +fi + + +# Check whether --with-cuda_includedir was given. +if test "${with_cuda_includedir+set}" = set; then : + withval=$with_cuda_includedir; +fi + +# + +# Check whether --with-cuda_path was given. +if test "${with_cuda_path+set}" = set; then : + withval=$with_cuda_path; +fi + + +# +# Check whether --enable-cuda-libs-check was given. +if test "${enable_cuda_libs_check+set}" = set; then : + enableval=$enable_cuda_libs_check; +else + enable_cuda_libs_check=yes +fi + +# + +acx_libcuda_ok="no" +internal_libcuda="no" +compile_libcuda="no" +use_libcuda="no" + +acx_libcuda_save_LIBS="$LIBS" +acx_libcuda_save_FCFLAGS="$FCFLAGS" + +# Cuda libraries are needed only in one of the three following cases + +if test x"$enable_cuda_fortran" != "xno" || test x"$enable_openacc" != "xno" ; then + +#if test -z "$NVHPC" ; then +# +if test "x$with_cuda_path" = "x" ; then with_cuda_path="$CUDA_PATH" ; fi +if test "x$with_cuda_path" = "x" ; then with_cuda_path="$CUDA_ROOT" ; fi +if test "x$with_cuda_path" = "x" ; then with_cuda_path="$CUDA_HOME" ; fi + +LIBCUDA_PATH="$with_cuda_path" + +if test -d "$with_cuda_path"; then + libcuda_incdir="$with_cuda_path/include" + libcuda_libdir="$with_cuda_path/lib" + if ! test -d "$libcuda_libdir" ; then libcuda_libdir="$with_cuda_path/lib64" ; fi +fi +if test -d "$with_cuda_includedir"; then libcuda_incdir="$with_cuda_includedir" ; fi +if test -d "$with_cuda_libdir"; then libcuda_libdir="$with_cuda_libdir" ; fi + + +#Test to be finalized, for now it is always going to succeed + + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +testprog=" program main + + integer ierr + ierr=cuInit + ierr=cudaMalloc + ierr=cublasInit + ierr=cufftPlanMany + + end" + +LIBCUDA_INCS="" +if test x"$CUDA_INCS" != "x" ; then LIBCUDA_INCS="$CUDA_INCS" ; fi +if test x"$libcuda_incdir" != "x" ; then LIBCUDA_INCS="$IFLAG$libcuda_incdir" ; fi +if test x"$with_cuda_incs" != "x" ; then LIBCUDA_INCS="$with_cuda_incs" ; fi + +FCFLAGS="$LIBCUDA_INCS $acx_libcuda_save_FCFLAGS" + +# set from environment variable, if not blank +if test ! -z "$CUDA_LIBS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from environment" >&5 +$as_echo_n "checking for libcuda from environment... " >&6; } + LIBCUDA_LIBS="$CUDA_LIBS" + LIBS="$LIBCUDA_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libcuda_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +# set from --with-cuda-libs flag +if test x"$acx_libcuda_ok" = xno && test ! -z "$with_cuda_libs" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from --with-cuda-libs" >&5 +$as_echo_n "checking for libcuda from --with-cuda-libs... " >&6; } + LIBCUDA_LIBS="$with_cuda_libs" + LIBS="$LIBCUDA_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libcuda_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +# dynamic linkage, separate Fortran interface +if test x"$acx_libcuda_ok" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from specified libcuda path, dynamic" >&5 +$as_echo_n "checking for libcuda from specified libcuda path, dynamic... " >&6; } + LIBCUDA_LIBS="-L$libcuda_libdir -lcufft -lcusolver -lcublas -lcudart -lcuda" + LIBS="$LIBCUDA_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libcuda_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +# static linkage, separate Fortran interface +if test x"$acx_libcuda_ok" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking static" >&5 +$as_echo_n "checking static... " >&6; } + LIBCUDA_LIBS="$libcuda_libdir/libcuda.a" + LIBS="$LIBCUDA_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog +_ACEOF +if ac_fn_fc_try_link "$LINENO"; then : + acx_libcuda_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test x"$acx_libcuda_ok" = xyes; then + use_libcuda=yes + compile_libcuda=no + internal_libcuda=no + # + +$as_echo "#define HAVE_LIBCUDA 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 +$as_echo "yes." >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5 +$as_echo "not found." >&6; } + use_libcuda=no + compile_libcuda=no + internal_libcuda=no + LIBCUDA_LIBS="" + LIBCUDA_INCS="" + LIBCUDA_PATH="" +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + +# +# Internal libcuda not available at the moment +# +#if test x"$acx_libcuda_ok" = xno; then +# internal_libcuda="yes" +# LIBCUDA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libcuda.a" +# LIBCUDA_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" +# if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libcuda.a"; then +# compile_libcuda="no" +# AC_MSG_RESULT([Compatible external DevXlib not found/specified. Found internal already compiled.]) +# else +# compile_libcuda="yes" +# AC_MSG_RESULT([Compatible external DevXlib not found/specified. Internal to be compiled.]) +# fi +#fi + +#else +# use_libcuda=yes +# compile_libcuda=no +# internal_libcuda=no +# AC_DEFINE(HAVE_LIBCUDA, 1, [Defined if you have the LIBCUDA library.]) +# AC_MSG_RESULT([yes.]) +#fi +fi + + +FCFLAGS="$acx_libcuda_save_FCFLAGS" +LIBS="$acx_libcuda_save_LIBS" + + + + + + + + + +# ============================================================================ +# CUDA + +# + +# Check whether --with-cuda-cc was given. +if test "${with_cuda_cc+set}" = set; then : + withval=$with_cuda_cc; +else + with_cuda_cc=70 +fi + +# +# Available cc options +# cc20 Compile for compute capability 2.0 +# cc30 Compile for compute capability 3.0 +# cc35 Compile for compute capability 3.5 +# cc50 Compile for compute capability 5.0 +# cc60 Compile for compute capability 6.0 +# cc70 Compile for compute capability 7.0 +# cc80 Compile for compute capability 8.0 +# +# check your card at https://en.wikipedia.org/wiki/CUDA#GPUs_supported +# +# cc20 for Fermi cards +# cc30 / cc35 for Kepler cards (eg K20, K40, K80) +# cc50 for Maxwell cards +# cc60 for Pascal cards (eg P100) +# cc70 for Volta cards (eg V100) +# +# nvfortran options (nvfortran --help) +# +#-ta=host|multicore|tesla +# Choose target accelerator (supported only for OpenACC, DEPRECATED please refer to -acc and -gpu) +# host Compile for serial execution on the host CPU +# multicore Compile for parallel execution on the host CPU +# tesla Compile for parallel execution on a Tesla GPU +# +# -[no]acc[=gpu|host|multicore|[no]autopar|[no]routineseq|legacy|strict|verystrict|sync|[no]wait] +# Enable OpenACC directives +# gpu OpenACC directives are compiled for GPU execution only; please refer to -gpu for target specific options +# host Compile for serial execution on the host CPU +# multicore Compile for parallel execution on the host CPU +# [no]autopar Enable (default) or disable loop autoparallelization within acc parallel +# [no]routineseq Compile every routine for the device +# legacy Suppress warnings about deprecated PGI accelerator directives +# strict Issue warnings for non-OpenACC accelerator directives +# verystrict Fail with an error for any non-OpenACC accelerator directive +# sync Ignore async clauses +# [no]wait Wait for each device kernel to finish +# +#-gpu=cc35|cc50|cc60|cc62|cc70|cc72|cc75|cc80|ccall|cudaX.Y|fastmath|[no]flushz|[no]fma|keep|[no]lineinfo|llc|zeroinit|deepcopy|loadcache:{L1|L2}|maxregcount:|pinned|[no]rdc|safecache|[no]unroll|managed|beta|autocompare|redundant +# Select specific options for GPU code generation +# cc35 Compile for compute capability 3.5 +# cc50 Compile for compute capability 5.0 +# cc60 Compile for compute capability 6.0 +# cc62 Compile for compute capability 6.2 +# cc70 Compile for compute capability 7.0 +# cc72 Compile for compute capability 7.2 +# cc75 Compile for compute capability 7.5 +# cc80 Compile for compute capability 8.0 +# ccall Compile for all supported compute capabilities +# cudaX.Y Use CUDA X.Y Toolkit compatibility, where installed +# fastmath Use fast math library +# [no]flushz Enable flush-to-zero mode on the GPU +# [no]fma Generate fused mul-add instructions (default at -O3) +# keep Keep kernel files +# [no]lineinfo Generate GPU line information +# zeroinit Initialize allocated device memory with zero +# deepcopy Enable Full Deepcopy support in OpenACC Fortran +# loadcache Choose what hardware level cache to use for global memory loads +# L1 Use L1 cache +# L2 Use L2 cache +# maxregcount: Set maximum number of registers to use on the GPU +# pinned Use CUDA Pinned Memory +# [no]rdc Generate relocatable device code +# safecache Allows variable-sized array sections in cache directives and assumes they fit into CUDA shared memory +# [no]unroll Enable automatic inner loop unrolling (default at -O3) +# managed Use CUDA Managed Memory +# beta Enable beta code generation features +# autocompare Automatically compare CPU/GPU results: implies redundant +# redundant Redundant CPU/GPU execution + + + + +# Check whether --with-cuda-runtime was given. +if test "${with_cuda_runtime+set}" = set; then : + withval=$with_cuda_runtime; +else + with_cuda_runtime=10.1 +fi + +# + +# Check whether --with-cuda-int-libs was given. +if test "${with_cuda_int_libs+set}" = set; then : + withval=$with_cuda_int_libs; +else + with_cuda_int_libs=cufft,cublas,cusolver +fi + +# +# Check whether --enable-nvtx was given. +if test "${enable_nvtx+set}" = set; then : + enableval=$enable_nvtx; +else + enable_nvtx="no" +fi + +# + +# Check whether --with-gpu_libs was given. +if test "${with_gpu_libs+set}" = set; then : + withval=$with_gpu_libs; +fi + + +# Check whether --with-gpu_incs was given. +if test "${with_gpu_incs+set}" = set; then : + withval=$with_gpu_incs; +fi + +# + +# Check whether --with-rocm_libs was given. +if test "${with_rocm_libs+set}" = set; then : + withval=$with_rocm_libs; +fi + + +# Check whether --with-rocm_incs was given. +if test "${with_rocm_incs+set}" = set; then : + withval=$with_rocm_incs; +fi + + +# Check whether --with-rocm_libdir was given. +if test "${with_rocm_libdir+set}" = set; then : + withval=$with_rocm_libdir; +fi + + +# Check whether --with-rocm_includedir was given. +if test "${with_rocm_includedir+set}" = set; then : + withval=$with_rocm_includedir; +fi + + +# Check whether --with-rocm_path was given. +if test "${with_rocm_path+set}" = set; then : + withval=$with_rocm_path; +fi + +# + +# Check whether --with-mklgpu_libs was given. +if test "${with_mklgpu_libs+set}" = set; then : + withval=$with_mklgpu_libs; +fi + + +use_int_cuda_libs="no" +use_gpu_libs="no" +enable_nvtx=no +DEVXLIB_CUDALIBS="" +DEVXLIBLIB_FLAGS="" +GPU_LIBS="" +GPU_FLAGS="" +def_gpu="" + + + # + # If not set via the configure use the cuda libs internal to the pgi/nvidia compiler + DEVXLIB_CUDALIBS=""; + if test x"$LIBCUDA_LIBS" = "x" -o x"$with_cuda_libs" = "x" ; then + use_int_cuda_libs="yes" ; + DEVXLIB_CUDALIBS="${with_cuda_int_libs}"; + fi + + # + # GPU aux libraries + GPU_LIBS=""; + if test x"$GPU_LIBS" = "x" -o x"$with_gpu_libs" = "x" ; then + GPU_LIBS="$with_gpu_libs"; + fi + GPU_INCS=""; + if test x"$GPU_INCS" = "x" -o x"$with_gpu_incs" = "x" ; then + GPU_INCS="$with_gpu_incs"; + fi + +# +#if test "x$with_rocm_path" = "x" ; then with_rocm_path="$ROCM_PATH" ; fi +#if test "x$with_rocm_path" = "x" ; then with_rocm_path="$ROCM_ROOT" ; fi +#if test "x$with_rocm_path" = "x" ; then with_rocm_path="$ROCM_HOME" ; fi + +LIBROCM_PATH="$with_rocm_path" + +if test x"$with_rocm_path" != x"" && test -d "$with_rocm_path" ; then + librocm_incdir="$with_rocm_path/include" + librocm_libdir="$with_rocm_path/lib" + if ! test -d "$librocm_libdir" ; then librocm_libdir="$with_rocm_path/lib" ; fi +fi +if test x"$with_rocm_includedir" != x"" && test -d "$with_rocm_includedir" ; then + librocm_incdir="$with_rocm_includedir" + LIBROCM_LIBS="-L$librocm_libdir -lrocblas" +fi +if test x"$with_rocm_libdir" != "$with_rocm_libdir" && test -d "$with_rocm_libdir" ; then + librocm_libdir="$with_rocm_libdir" + LIBROCM_INCS="-I$librocm_incdir" +fi +# +if test x"$with_rocm_libs" != x"" ; then LIBROCM_LIBS="$with_rocm_libs" ; fi +if test x"$with_rocm_incs" != x"" ; then LIBROCM_INCS="$with_rocm_incs" ; fi + +# MKL-GPU +if test x"$with_mklgpu_libs" != x"" ; then MKLGPU_LIBS="$with_mklgpu_libs" ; fi + +# Cuda Fortran +if test x"$enable_cuda_fortran" != "xno" ; then + # + def_gpu="-D_GPU -D_CUDA -D_CUDAF" + # + # Flags to be passed to the devicexlib library + # + DEVXLIB_FLAGS="--enable-openmp --enable-cuda-fortran --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime}" + # + case "${FCVERSION}" in + *nvfortran*) + GPU_FLAGS="-cuda -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + if test x"$use_int_cuda_libs" = "xyes" ; then + GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; + fi + ;; + *) + GPU_FLAGS="-Mcuda=cc${with_cuda_cc},cuda${with_cuda_runtime}" + if test x"$use_int_cuda_libs" = "xyes" ; then + GPU_FLAGS+=" -Mcudalib=${with_cuda_int_libs}" + fi + esac + # + # Check CUDA + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=f90 +ac_fcflags_srcext_save=$ac_fcflags_srcext +ac_fcflags_srcext= +ac_cv_fc_srcext_f90=unknown +case $ac_ext in #( + [fF]77) ac_try=f77;; #( + *) ac_try=f95;; +esac +for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do + test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag" + cat > conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + ac_cv_fc_srcext_f90=$ac_flag; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest.$ac_objext conftest.f90 +ac_fcflags_srcext=$ac_fcflags_srcext_save + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } +if test "x$ac_cv_fc_srcext_f90" = xunknown; then + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 +else + ac_fc_srcext=f90 + if test "x$ac_cv_fc_srcext_f90" = xnone; then + ac_fcflags_srcext="" + FCFLAGS_f90="" + else + ac_fcflags_srcext=$ac_cv_fc_srcext_f90 + FCFLAGS_f90=$ac_cv_fc_srcext_f90 + fi + + +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + as_CACHEVAR=`$as_echo "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 +$as_echo_n "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$FCFLAGS + FCFLAGS="$FCFLAGS $GPU_FLAGS" + cat > conftest.$ac_ext <<_ACEOF +MODULE test; use cudafor; END MODULE +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + FCFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + have_cudafor=yes +else + have_cudafor=no +fi + + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "x$have_cudafor" != "xyes"; then + as_fn_error $? "You do not have the cudafor module. Are you using a PGI/NVIDIA compiler?" "$LINENO" 5 + fi + # + if ! test x"$enable_nvtx" = "xno" ; then + # + if test x"$enable_nvtx" = "xyes" ; then + def_gpu="$def_gpu -D_NVTX" + GPU_FLAGS="$GPU_FLAGS -lnvToolsExt" + elif ! test x"$enable_nvtx" = "x" ; then + def_gpu="$def_gpu -D_NVTX" + GPU_FLAGS="$GPU_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" + fi + fi +fi +# +# Openacc +# +if test x"$enable_openacc" != "xno" ; then + # + # Flags to be passed to the devicexlib library + # + DEVXLIB_FLAGS="--enable-openacc --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime} " + def_gpu="-D_GPU -D_CUDA -D_OPENACC" + # + case "${FCVERSION}" in + *nvfortran*) + DEVXLIB_FLAGS+="--enable-openmp" + GPU_FLAGS="-acc=gpu,multicore -acclibs -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime} " # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + if test x"$use_int_cuda_libs" = "xyes" ; then + GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; + fi + ;; + *pgfortran*) + DEVXLIB_FLAGS+="--enable-openmp" + GPU_FLAGS="-acc -acclibs -ta=tesla:cc${with_cuda_cc} " # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + if test x"$use_int_cuda_libs" = "xyes" ; then + GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; + fi + ;; + *GNU* | *gnu*) + GPU_FLAGS="-fopenacc -foffload=-lm -foffload=-lgfortran" + # -foffload=nvptx-none + # -foffload=amdgcn-amdhsa -foffload=-march=gfx908 + # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime} + esac + # +fi +# +# OpenMP5 +# +if test x"$enable_openmp5" != "xno" ; then + # + # Flags to be passed to the devicexlib library + # + def_gpu="-D_GPU -D_OPENMP_GPU" + GPU_FLAGS="-fopenmp" # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + DEVXLIB_FLAGS="--enable-openmp5" # --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime}" + if test x"$LIBROCM_LIBS" != "x" ; then + DEVXLIB_FLAGS+=" --enable-rocblas --with-rocm-libs=$LIBROCM_LIBS"; + def_gpu="$def_gpu -D_HIP" + fi + if test x"$MKLGPU_LIBS" != "x" ; then + DEVXLIB_FLAGS+=" --enable-mkl-gpu" ; + def_gpu="$def_gpu -D_MKLGPU" + GPU_FLAGS="-qopenmp -fopenmp-targets=spir64" + fi + # +fi +# + + + + + + + + + + + + + + +# + +# ============================================================================ +# Device XLIB + + + + +# Check whether --with-devxlib_libs was given. +if test "${with_devxlib_libs+set}" = set; then : + withval=$with_devxlib_libs; fi -testprog_5x=" program main +# Check whether --with-devxlib_path was given. +if test "${with_devxlib_path+set}" = set; then : + withval=$with_devxlib_path; +fi - use xc_f03_lib_m - implicit none - type(xc_f03_func_t) :: p - real(selected_real_kind(14,200)) :: ext_params - call xc_f03_func_set_ext_params(p,(/ext_params/)) - end" +# Check whether --with-devxlib_libdir was given. +if test "${with_devxlib_libdir+set}" = set; then : + withval=$with_devxlib_libdir; +fi -testprog_4x=" program main - use xc_f90_lib_m - use xc_f90_types_m - implicit none - type(xc_f90_pointer_t) :: p - real(xc_f90_kind) :: ext_params - call xc_f90_func_set_ext_params(p,ext_params) +# Check whether --with-devxlib_includedir was given. +if test "${with_devxlib_includedir+set}" = set; then : + withval=$with_devxlib_includedir; +fi - end" -testprog_21=" program main - use xc_f90_lib_m - implicit none +# Check whether --with-devxlib-branch was given. +if test "${with_devxlib_branch+set}" = set; then : + withval=$with_devxlib_branch; +else + with_devxlib_branch=none +fi - integer :: i - i = XC_GGA_X_LV_RPW86 - end" -testprog_203=" program main - use xc_f90_lib_m - use xc_f90_types_m - implicit none - type(xc_f90_pointer_t) :: conf - real(8) :: alpha - real(8) :: gamma - call xc_f90_hyb_gga_xc_hse_set_par(conf,alpha,gamma) - end" +acx_devxlib_ok="no" +internal_devxlib="no" +compile_devxlib="no" -testprog_20=" program main +DEVXLIB_info="" - use xc_f90_lib_m - implicit none - integer :: major - integer :: minor - call xc_f90_version(major, minor) - end" +if test -d "$with_devxlib_path"; then + devxlib_incdir="$with_devxlib_path/include" + devxlib_libdir="$with_devxlib_path/lib" +fi +if test -d "$with_devxlib_includedir"; then devxlib_incdir="$with_devxlib_includedir" ; fi +if test -d "$with_devxlib_libdir"; then devxlib_libdir="$with_devxlib_libdir" ; fi -testprog_12=" program main +DEVXLIB_INCS="$IFLAG$devxlib_incdir" - use xc_f90_lib_m - implicit none +acx_devxlib_save_LIBS="$LIBS" +acx_devxlib_save_FCFLAGS="$FCFLAGS" - integer :: i - i = XC_GGA_X_AIRY - end" +#This is fake, it is always going to fail +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for devxlib" >&5 +$as_echo_n "checking for devxlib... " >&6; } -testprog_11=" program main +testprog=" program main - use xc_f90_lib_m - implicit none + use devxlib + implicit none + + integer :: i - integer :: i - i = XC_KINETIC end" -if test x"$acx_libxc_ok" = xyes; then -cat > conftest.$ac_ext <<_ACEOF -$testprog_11 +FCFLAGS="$GPU_FLAGS $LIBCUDA_INCS $LIBROCM_INCS $DEVXLIB_INCS $acx_devxlib_save_FCFLAGS" + +# set from environment variable, if not blank +if test ! -z "$DEVXLIB_LIBS"; then + LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=110, acx_libxc_ok=no +if ac_fn_fc_try_link "$LINENO"; then : + acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -cat > conftest.$ac_ext <<_ACEOF -$testprog_12 -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -cat > conftest.$ac_ext <<_ACEOF -$testprog_20 + +# set from --with-devxlib-libs flag +if test x"$acx_devxlib_ok" = xno && test ! -z "$with_devxlib_libs" ; then + DEVXLIB_LIBS="$with_devxlib_libs" + LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=200, acx_libxc_ok=no +if ac_fn_fc_try_link "$LINENO"; then : + acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -cat > conftest.$ac_ext <<_ACEOF -$testprog_203 +fi + +# dynamic linkage, separate Fortran interface +if test x"$acx_devxlib_ok" = xno; then + DEVXLIB_LIBS="-L$devxlib_libdir -ldevXlib" + LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=203, acx_libxc_ok=no +if ac_fn_fc_try_link "$LINENO"; then : + acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -cat > conftest.$ac_ext <<_ACEOF -$testprog_21 +fi + +# static linkage, separate Fortran interface +if test x"$acx_devxlib_ok" = xno; then + DEVXLIB_LIBS="$devxlib_libdir/libdevXlib.a" + LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=210, acx_libxc_ok=no +if ac_fn_fc_try_link "$LINENO"; then : + acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -cat > conftest.$ac_ext <<_ACEOF -$testprog_4x +fi + +# static linkage, combined Fortran interface (devxlib pre-r10730) +if test x"$acx_devxlib_ok" = xno; then + DEVXLIB_LIBS="$devxlib_libdir/libdevXlib.a" + LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=400, acx_libxc_ok=no +if ac_fn_fc_try_link "$LINENO"; then : + acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -cat > conftest.$ac_ext <<_ACEOF -$testprog_5x +fi + +# dynamic linkage, combined Fortran interface (devxlib pre-r10730) +if test x"$acx_devxlib_ok" = xno; then + DEVXLIB_LIBS="-L$devxlib_libdir -ldevXlib" + LIBS="$DEVXLIB_LIBS $LIBCUDA_LIBS $LIBROCM_LIBS" + cat > conftest.$ac_ext <<_ACEOF +$testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - acx_libxc_version=5, acx_libxc_ok=yes +if ac_fn_fc_try_link "$LINENO"; then : + acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - -printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi -if test x"$acx_libxc_ok" = xyes; then - compile_libxc=no - internal_libxc=no + +if test x"$acx_devxlib_ok" = xyes; then + compile_devxlib=no + internal_devxlib=no # -printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h +$as_echo "#define HAVE_DEVXLIB 1" >>confdefs.h fi -if test x"$acx_libxc_ok" = xno; then - have_configured="no" - internal_libxc="yes" - # version 5 is used - LIBXC_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a ${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" - LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" - if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then - compile_libxc="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } +if test x"$acx_devxlib_ok" = xno; then + internal_devxlib="yes" + #DEVXLIB_LIBS="${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libdevXlib.a" + DEVXLIB_LIBS="-L${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib -ldevXlib" + DEVXLIB_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/include" + if test -e "${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libdevXlib.a"; then + compile_devxlib="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Found internal already compiled." >&5 +$as_echo "Compatible external DevXlib not found/specified. Found internal already compiled." >&6; } else - compile_libxc="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + if test x"$with_devxlib_branch" = "xnone"; then + DEVXLIB_info="(devxlib tarball)" + else + DEVXLIB_info="(devxlib $with_devxlib_branch branch)" + fi + compile_devxlib="yes" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Internal to be compiled." >&5 +$as_echo "Compatible external DevXlib not found/specified. Internal to be compiled." >&6; } fi fi +FCFLAGS="$acx_devxlib_save_FCFLAGS" +LIBS="$acx_devxlib_save_LIBS" -FCFLAGS="$acx_libxc_save_FCFLAGS" -LIBS="$acx_libxc_save_LIBS" - -# ============================================================================ -# CUDA - -# -# Check whether --enable-cuda was given. -if test ${enable_cuda+y} -then : - enableval=$enable_cuda; -fi -# -# Check whether --enable-nvtx was given. -if test ${enable_nvtx+y} -then : - enableval=$enable_nvtx; -fi -if test x"$enable_nvtx" = "x"; then enable_nvtx="no" ; fi -# -def_cuda="" -CUDA_FLAGS="" -CUDA_LIBS="-cudalib=cufft,cublas,cusolver" -# Available cc options: -# cc20 Compile for compute capability 2.0 -# cc30 Compile for compute capability 3.0 -# cc35 Compile for compute capability 3.5 -# cc50 Compile for compute capability 5.0 -# cc60 Compile for compute capability 6.0 -# cc70 Compile for compute capability 7.0 -# -# check your card at https://en.wikipedia.org/wiki/CUDA#GPUs_supported -# -# cc20 for Fermi cards -# cc30 / cc35 for Kepler cards (eg K20, K40, K80) -# cc50 for Maxwell cards -# cc60 for Pascal cards (eg P100) -# cc70 for Volta cards (eg V100) -# -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CUDA support" >&5 -printf %s "checking for CUDA support... " >&6; } -if test x"$enable_cuda" = "xyes" ; then - def_cuda="-D_CUDA" - CUDA_FLAGS="-cuda -gpu=cuda9.0,cc70,nollvm $CUDA_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -printf "%s\n" "$CUDA_FLAGS" >&6; } -elif ! test x"$enable_cuda" = "x" ; then - def_cuda="-D_CUDA" - CUDA_FLAGS="-cuda -gpu=$enable_cuda $CUDA_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CUDA_FLAGS" >&5 -printf "%s\n" "$CUDA_FLAGS" >&6; } -fi -# -if test x"$enable_cuda" = "x" -o x"$enable_cuda" = "xno" ; then - enable_nvtx=no - def_cuda="" - CUDA_FLAGS="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -# -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NVTX support" >&5 -printf %s "checking for NVTX support... " >&6; } -if ! test x"$enable_nvtx" = "xno" ; then - if test x"$enable_nvtx" = "xyes" ; then - def_cuda="$def_cuda -D_NVTX" - CUDA_FLAGS="$CUDA_FLAGS -lnvToolsExt" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - elif ! test x"$enable_nvtx" = "x" ; then - def_cuda="$def_cuda -D_NVTX" - CUDA_FLAGS="$CUDA_FLAGS -L$enable_nvtx/lib64 -lnvToolsExt" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi -fi -# -# # ============================================================================ # Prepare the REPORT file variables @@ -15514,7 +15702,7 @@ if test "$enable_time_profile" = "yes" ; then TIME_profile_check="X"; fi MEM_profile_check="-" if test "$enable_memory_profile" = "yes" ; then MEM_profile_check="X"; fi # -# - PARALLEL/CUDA SUPPORT - +# - PARALLEL/GPU SUPPORT - # CUDA_check="-" if ! test x"$enable_cuda" = "x"; then CUDA_check="X"; fi @@ -15532,6 +15720,12 @@ fi # OPENMP_check="-" if test "$enable_open_mp" = "yes" ; then OPENMP_check="X"; fi +# +GPU_check="-" +if test "$enable_cuda_fortran" = "yes" ; then GPU_check="X"; fi +if test "$enable_openacc" = "yes" ; then GPU_check="X"; fi +if test "$enable_openmp5" = "yes" ; then GPU_check="X"; fi + # # - LIBRARIES - # @@ -15627,6 +15821,18 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +DEVXLIB_check="E" +if test "$internal_devxlib" = "yes" ; then + if test "$compile_devxlib" = "yes"; then DEVXLIB_check="C"; fi + if test "$compile_devxlib" = "no" ; then DEVXLIB_check="I"; fi +fi +# +LIBCUDA_check="-" +if test "$use_libcuda" = "yes" ; then LIBCUDA_check="E"; fi + +GPU_libinfo="" +if test "$GPU_SUPPORT" = "cudaf" && test "$LIBCUDA_check" = "-" ; then GPU_libinfo="with internal cuda library"; fi +# YDB_check="-"; if test "$enable_ydb" = "yes" ; then YDB_check="X"; fi YPY_check="-"; @@ -15683,6 +15889,8 @@ fi + + # @@ -15703,6 +15911,8 @@ fi + + # # STRIPE [LIB] from paths # @@ -16050,6 +16260,52 @@ fi LIBXC_INCS_R=$STRIPE +# + +TMP1=`echo $DEVXLIB_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +DEVXLIB_LIBS_R=$STRIPE + +TMP1=`echo $DEVXLIB_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +DEVXLIB_INCS_R=$STRIPE + + +# + +TMP1=`echo $LIBCUDA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +LIBCUDA_LIBS_R=$STRIPE + +TMP1=`echo $LIBCUDA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +LIBCUDA_INCS_R=$STRIPE + + # TMP1=`echo $BLAS_PETSC_LIBS | sed 's/\//+/g'` @@ -16134,8 +16390,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -16165,15 +16421,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -16187,8 +16443,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -16205,7 +16461,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -16221,8 +16477,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -16245,16 +16501,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -16264,46 +16518,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -16312,6 +16566,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -16320,12 +16581,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -16337,10 +16594,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -16353,14 +16630,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -16387,20 +16663,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -16412,13 +16686,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -16449,7 +16722,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -16471,10 +16744,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -16488,12 +16757,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -16535,7 +16798,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -16544,7 +16807,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -16606,8 +16869,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.2.0 r.23534 h.06afe76, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by Yambo $as_me 5.2.0 r.24138 h.8c199c7, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -16665,16 +16928,14 @@ $config_headers Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Yambo config.status 5.2.0 r.23534 h.06afe76 -configured by $0, generated by GNU Autoconf 2.71, +Yambo config.status 5.2.0 r.24138 h.8c199c7 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -16711,15 +16972,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -16727,7 +16988,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -16736,7 +16997,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -16764,7 +17025,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -16778,7 +17039,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -16818,8 +17079,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -17155,7 +17416,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -17163,17 +17424,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -17190,7 +17451,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17214,9 +17475,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -17269,8 +17530,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -17312,9 +17573,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -17330,20 +17591,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -17384,8 +17645,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -17527,4 +17788,3 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi - diff --git a/include/version/version.m4 b/include/version/version.m4 index 4f86c08e93..8f5455a4eb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.2.0 r.23534 h.06afe76, yambo@yambo-code.org) +AC_INIT(Yambo, 5.2.0 r.24138 h.8c199c7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="2" SPATCHLEVEL="0" -SREVISION="23534" -SHASH="06afe76" +SREVISION="24138" +SHASH="8c199c7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 71f152df0b2669eebbbc58338b45da20b40e780c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 13 Jan 2025 16:49:48 +0100 Subject: [PATCH 0852/1367] Version 5.3.0, Revision 24159, Hash 17d93f81cc MODIFIED * configure include/version/version.m4 real_time_initialize/RT_initialize.F Changes: - Added ponderomotive energy and Keldish parameter in input Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/real_time_initialize/RT_initialize.F | 6 +++++- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 6dccddef76..2810d9a4c8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23897 h.1ec507d413. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24159 h.17d93f81cc. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23897 h.1ec507d413' -PACKAGE_STRING='Yambo 5.3.0 r.23897 h.1ec507d413' +PACKAGE_VERSION='5.3.0 r.24159 h.17d93f81cc' +PACKAGE_STRING='Yambo 5.3.0 r.24159 h.17d93f81cc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23897 h.1ec507d413 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24159 h.17d93f81cc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23897 h.1ec507d413:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24159 h.17d93f81cc:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23897 h.1ec507d413 +Yambo configure 5.3.0 r.24159 h.17d93f81cc generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23897 h.1ec507d413, which was +It was created by Yambo $as_me 5.3.0 r.24159 h.17d93f81cc, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23897" -SHASH="1ec507d413" +SREVISION="24159" +SHASH="17d93f81cc" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23897 h.1ec507d413, which was +This file was extended by Yambo $as_me 5.3.0 r.24159 h.17d93f81cc, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23897 h.1ec507d413 +Yambo config.status 5.3.0 r.24159 h.17d93f81cc configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index fdea3f1735..43fb118769 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23897 h.1ec507d413, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24159 h.17d93f81cc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23897" -SHASH="1ec507d413" +SREVISION="24159" +SHASH="17d93f81cc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 18791a3643..b80cf35d10 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -59,7 +59,7 @@ subroutine RT_initialize(E,k,q) ! integer :: i1,i_defs,N_T_samplings,ik,NK_cpu(PAR_COM_Xk_ibz_INDEX%n_CPU) character(schlen) :: MSG_ch,field_defs(n_fields_defs_max) - real(SP) :: T_memory,sigma_eff + real(SP) :: T_memory,sigma_eff,U_pond logical :: l_Full_RT_T_evolution,l_skip_it,l_velocity_gauge_tmp real(SP), parameter :: thresh=1.E-5_SP #if defined _RT_SCATT @@ -484,6 +484,10 @@ subroutine RT_initialize(E,k,q) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! + U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 + call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') + call msg('r', trim(MSG_ch)//' Keldish parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') + ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') call msg('r', trim(MSG_ch)//' area at selected Rabi trans.',Efield(i1)%pi_kind ) From ca0b43818f5ff286a9dfdbcc98f2c3e7fbd14fe8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 13 Jan 2025 17:23:38 +0100 Subject: [PATCH 0853/1367] Version 5.3.0, Revision 24160, Hash 71f152df0b MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F real_time_initialize/RT_initialize.F Changes: - Added ponderomotive force and Keldysh parameter to NL report Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 2 ++ src/real_time_initialize/RT_initialize.F | 2 +- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 2810d9a4c8..363460c706 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24159 h.17d93f81cc. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24160 h.71f152df0b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24159 h.17d93f81cc' -PACKAGE_STRING='Yambo 5.3.0 r.24159 h.17d93f81cc' +PACKAGE_VERSION='5.3.0 r.24160 h.71f152df0b' +PACKAGE_STRING='Yambo 5.3.0 r.24160 h.71f152df0b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24159 h.17d93f81cc to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24160 h.71f152df0b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24159 h.17d93f81cc:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24160 h.71f152df0b:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24159 h.17d93f81cc +Yambo configure 5.3.0 r.24160 h.71f152df0b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24159 h.17d93f81cc, which was +It was created by Yambo $as_me 5.3.0 r.24160 h.71f152df0b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24159" -SHASH="17d93f81cc" +SREVISION="24160" +SHASH="71f152df0b" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24159 h.17d93f81cc, which was +This file was extended by Yambo $as_me 5.3.0 r.24160 h.71f152df0b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24159 h.17d93f81cc +Yambo config.status 5.3.0 r.24160 h.71f152df0b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 43fb118769..936394f452 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24159 h.17d93f81cc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24160 h.71f152df0b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24159" -SHASH="17d93f81cc" +SREVISION="24160" +SHASH="71f152df0b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 741b8a3511..0633f347e7 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -501,6 +501,8 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) + call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**2*HA2EV) + call msg( 'r', 'Keldysh param [1/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**3) enddo call msg( 'r', 'Efield T_0 ',T_0,"[fs]") call msg( 'r', 'Frequencies range ',NL_er*HA2EV) diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index b80cf35d10..f7c9958c89 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -486,7 +486,7 @@ subroutine RT_initialize(E,k,q) ! U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') - call msg('r', trim(MSG_ch)//' Keldish parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') + call msg('r', trim(MSG_ch)//' Keldysh parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') From e84dc73ff2d3bc919416038d4642983ab59d6673 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 14 Jan 2025 17:18:31 +0100 Subject: [PATCH 0854/1367] Version 5.3.0, Revision 24161, Hash ca0b43818f MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F real_time_initialize/RT_initialize.F Changes: - Keldysh parameter renamed adiabatic parameter Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 2 +- src/real_time_initialize/RT_initialize.F | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 363460c706..938549ece8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24160 h.71f152df0b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24161 h.ca0b43818f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24160 h.71f152df0b' -PACKAGE_STRING='Yambo 5.3.0 r.24160 h.71f152df0b' +PACKAGE_VERSION='5.3.0 r.24161 h.ca0b43818f' +PACKAGE_STRING='Yambo 5.3.0 r.24161 h.ca0b43818f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24160 h.71f152df0b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24161 h.ca0b43818f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24160 h.71f152df0b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24161 h.ca0b43818f:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24160 h.71f152df0b +Yambo configure 5.3.0 r.24161 h.ca0b43818f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24160 h.71f152df0b, which was +It was created by Yambo $as_me 5.3.0 r.24161 h.ca0b43818f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24160" -SHASH="71f152df0b" +SREVISION="24161" +SHASH="ca0b43818f" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24160 h.71f152df0b, which was +This file was extended by Yambo $as_me 5.3.0 r.24161 h.ca0b43818f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24160 h.71f152df0b +Yambo config.status 5.3.0 r.24161 h.ca0b43818f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 936394f452..891ecf90c8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24160 h.71f152df0b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24161 h.ca0b43818f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24160" -SHASH="71f152df0b" +SREVISION="24161" +SHASH="ca0b43818f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 0633f347e7..7d0f732883 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -502,7 +502,7 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**2*HA2EV) - call msg( 'r', 'Keldysh param [1/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**3) + call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**3) enddo call msg( 'r', 'Efield T_0 ',T_0,"[fs]") call msg( 'r', 'Frequencies range ',NL_er*HA2EV) diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index f7c9958c89..859818d470 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -486,7 +486,7 @@ subroutine RT_initialize(E,k,q) ! U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') - call msg('r', trim(MSG_ch)//' Keldysh parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') + call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') From 0a0aa414763b19eb35598395247c2237bd62a281 Mon Sep 17 00:00:00 2001 From: palful Date: Tue, 14 Jan 2025 19:20:35 +0100 Subject: [PATCH 0855/1367] solved merge issue --- src/wf_and_fft/WF_symm_kpoint_g.F | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 9f1d5a364c..817c658027 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -167,11 +167,6 @@ subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) !call dev_memcpy(WF_p,WF_k_tmp) WF_p=WF_k_tmp ! -<<<<<<< HEAD - call dev_memcpy(WF_p,WF_k_tmp) - ! -======= ->>>>>>> yambo-remote/phys-exc-ph nullify(WF_p) ! enddo @@ -210,13 +205,6 @@ subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) ! if(isymm==idt_index) return ! -<<<<<<< HEAD -======= -#if defined _GPU - call error("subroutine WF_symm_kpoint_g_ssop is not gpu ported") -#endif - ! ->>>>>>> yambo-remote/phys-exc-ph isymm_m1=sop_inv(isymm) ! do ib=b_to_load(1),b_to_load(2) From 97da2630f0ceac3c5be16a2cacf21224457b7e7b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 15 Jan 2025 16:43:57 +0100 Subject: [PATCH 0856/1367] Version 5.3.0, Revision 24162, Hash e84dc73 MODIFIED * src/nloptics/NL_initialize.F Bugs: - small fix Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 938549ece8..3403452d46 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24161 h.ca0b43818f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24162 h.e84dc73. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24161 h.ca0b43818f' -PACKAGE_STRING='Yambo 5.3.0 r.24161 h.ca0b43818f' +PACKAGE_VERSION='5.3.0 r.24162 h.e84dc73' +PACKAGE_STRING='Yambo 5.3.0 r.24162 h.e84dc73' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24161 h.ca0b43818f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24162 h.e84dc73 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24161 h.ca0b43818f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24162 h.e84dc73:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24161 h.ca0b43818f +Yambo configure 5.3.0 r.24162 h.e84dc73 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24161 h.ca0b43818f, which was +It was created by Yambo $as_me 5.3.0 r.24162 h.e84dc73, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24161" -SHASH="ca0b43818f" +SREVISION="24162" +SHASH="e84dc73" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24161 h.ca0b43818f, which was +This file was extended by Yambo $as_me 5.3.0 r.24162 h.e84dc73, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24161 h.ca0b43818f +Yambo config.status 5.3.0 r.24162 h.e84dc73 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 891ecf90c8..a414a6fa0e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24161 h.ca0b43818f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24162 h.e84dc73, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24161" -SHASH="ca0b43818f" +SREVISION="24162" +SHASH="e84dc73" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 7d0f732883..9ab3fe4d39 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -501,8 +501,8 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) - call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**2*HA2EV) - call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/NL_er(1)**3) + call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) + call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) enddo call msg( 'r', 'Efield T_0 ',T_0,"[fs]") call msg( 'r', 'Frequencies range ',NL_er*HA2EV) From e68532cd92daedce644bf39ca4e00d6825526d85 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 20 Dec 2024 22:39:54 +0100 Subject: [PATCH 0857/1367] Version 5.3.0, Revision 23898, Hash 54a4f5c593 MODIFIED * configure include/version/version.m4 lib/qe_pseudo/DOUBLE_project.dep lib/slatec/DOUBLE_project.dep Changes: - fixed .dep files Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- lib/qe_pseudo/DOUBLE_project.dep | 1 - lib/slatec/DOUBLE_project.dep | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 3403452d46..c1bb3c33c1 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24162 h.e84dc73. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23898 h.54a4f5c593. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24162 h.e84dc73' -PACKAGE_STRING='Yambo 5.3.0 r.24162 h.e84dc73' +PACKAGE_VERSION='5.3.0 r.23898 h.54a4f5c593' +PACKAGE_STRING='Yambo 5.3.0 r.23898 h.54a4f5c593' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24162 h.e84dc73 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23898 h.54a4f5c593 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24162 h.e84dc73:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23898 h.54a4f5c593:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24162 h.e84dc73 +Yambo configure 5.3.0 r.23898 h.54a4f5c593 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24162 h.e84dc73, which was +It was created by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24162" -SHASH="e84dc73" +SREVISION="23898" +SHASH="54a4f5c593" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24162 h.e84dc73, which was +This file was extended by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24162 h.e84dc73 +Yambo config.status 5.3.0 r.23898 h.54a4f5c593 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a414a6fa0e..36deb2588a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24162 h.e84dc73, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23898 h.54a4f5c593, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24162" -SHASH="e84dc73" +SREVISION="23898" +SHASH="54a4f5c593" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/qe_pseudo/DOUBLE_project.dep b/lib/qe_pseudo/DOUBLE_project.dep index fbc606fa4d..eb9021637a 100644 --- a/lib/qe_pseudo/DOUBLE_project.dep +++ b/lib/qe_pseudo/DOUBLE_project.dep @@ -39,5 +39,4 @@ us_module.o uspp.o ylmr2.o - objects.o diff --git a/lib/slatec/DOUBLE_project.dep b/lib/slatec/DOUBLE_project.dep index 2049458d1e..b24664a8ce 100644 --- a/lib/slatec/DOUBLE_project.dep +++ b/lib/slatec/DOUBLE_project.dep @@ -1,4 +1,4 @@ - objects.oavint.o + avint.o besi0.o besi0e.o besi1.o From 51a8cb1981729bb4e6b7319f0d427527574b3297 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 8 Jan 2025 14:52:16 +0100 Subject: [PATCH 0858/1367] Version 5.3.0, Revision 23899, Hash 16ce88f8e MODIFIED * configure include/version/version.m4 pol_function/X_redux.F Bugs: -Fixed a small bug in parallelization with intel Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/pol_function/X_redux.F | 5 +++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index c1bb3c33c1..069e245a34 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23898 h.54a4f5c593. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23899 h.16ce88f8e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23898 h.54a4f5c593' -PACKAGE_STRING='Yambo 5.3.0 r.23898 h.54a4f5c593' +PACKAGE_VERSION='5.3.0 r.23899 h.16ce88f8e' +PACKAGE_STRING='Yambo 5.3.0 r.23899 h.16ce88f8e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23898 h.54a4f5c593 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23899 h.16ce88f8e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23898 h.54a4f5c593:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23899 h.16ce88f8e:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23898 h.54a4f5c593 +Yambo configure 5.3.0 r.23899 h.16ce88f8e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was +It was created by Yambo $as_me 5.3.0 r.23899 h.16ce88f8e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23898" -SHASH="54a4f5c593" +SREVISION="23899" +SHASH="16ce88f8e" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was +This file was extended by Yambo $as_me 5.3.0 r.23899 h.16ce88f8e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23898 h.54a4f5c593 +Yambo config.status 5.3.0 r.23899 h.16ce88f8e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 36deb2588a..0f4c695184 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23898 h.54a4f5c593, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23899 h.16ce88f8e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23898" -SHASH="54a4f5c593" +SREVISION="23899" +SHASH="16ce88f8e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index 8fb5a6c874..682dfc9b71 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -25,7 +25,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) use drivers, ONLY:l_bs_fxc,l_alda_fxc,l_lrc_fxc use LIVE_t, ONLY:live_timing use parallel_int, ONLY:PP_wait,PP_redux_wait,PP_bcast - use parallel_m, ONLY:PP_indexes,PP_indexes_reset,PAR_COM_X_WORLD_RL_resolved,& + use parallel_m, ONLY:PP_indexes,PP_indexes_reset,PAR_COM_X_WORLD_RL_resolved,PAR_COM_RL_INDEX,& & PAR_COM_X_WORLD,PAR_COM_SLK_INDEX_local,PAR_COM_SLK,PAR_n_freqs,PAR_FREQS_index use R_lattice, ONLY:bare_qpg, bare_qpg_d use frequency, ONLY:w_samp @@ -169,6 +169,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! enddo ! + ! if (iw_par>PAR_n_freqs) cycle ! ! [2] SER/SLK Solver @@ -364,7 +365,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! ! complete the transfer with a collective communication ! - call PP_bcast(X_par%blc,node=0,COMM=PAR_COM_X_WORLD_RL_resolved%COMM) + if(PAR_COM_RL_INDEX%n_CPU>1) call PP_bcast(X_par%blc,node=0,COMM=PAR_COM_X_WORLD_RL_resolved%COMM) ! call timing(what//' (REDUX)',OPR='stop') ! From dd544c8e50841e0970f5065d4821d9badea4606c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 8 Jan 2025 14:54:17 +0100 Subject: [PATCH 0859/1367] Version 5.3.0, Revision 23900, Hash 955a38080 MODIFIED * configure include/version/version.m4 Additions: -Version updated Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 069e245a34..077b4cd7f4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23899 h.16ce88f8e. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23901 h.955a38080. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23899 h.16ce88f8e' -PACKAGE_STRING='Yambo 5.3.0 r.23899 h.16ce88f8e' +PACKAGE_VERSION='5.3.0 r.23901 h.955a38080' +PACKAGE_STRING='Yambo 5.3.0 r.23901 h.955a38080' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23899 h.16ce88f8e to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23901 h.955a38080 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23899 h.16ce88f8e:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23901 h.955a38080:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23899 h.16ce88f8e +Yambo configure 5.3.0 r.23901 h.955a38080 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23899 h.16ce88f8e, which was +It was created by Yambo $as_me 5.3.0 r.23901 h.955a38080, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23899" -SHASH="16ce88f8e" +SREVISION="23901" +SHASH="955a38080" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23899 h.16ce88f8e, which was +This file was extended by Yambo $as_me 5.3.0 r.23901 h.955a38080, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23899 h.16ce88f8e +Yambo config.status 5.3.0 r.23901 h.955a38080 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0f4c695184..cec881fb18 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23899 h.16ce88f8e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23901 h.955a38080, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23899" -SHASH="16ce88f8e" +SREVISION="23901" +SHASH="955a38080" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From ed05847e0994c0b3510938b88cae2104520e420c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 8 Jan 2025 16:59:06 +0100 Subject: [PATCH 0860/1367] Version 5.3.0, Revision 23901, Hash 4ebc8546f MODIFIED * configure include/version/version.m4 pol_function/X_redux.F Bugs: -Sorry I did a commit in the wrong branch, reverted Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/pol_function/X_redux.F | 5 ++--- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 077b4cd7f4..c1bb3c33c1 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23901 h.955a38080. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23898 h.54a4f5c593. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23901 h.955a38080' -PACKAGE_STRING='Yambo 5.3.0 r.23901 h.955a38080' +PACKAGE_VERSION='5.3.0 r.23898 h.54a4f5c593' +PACKAGE_STRING='Yambo 5.3.0 r.23898 h.54a4f5c593' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23901 h.955a38080 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23898 h.54a4f5c593 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23901 h.955a38080:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23898 h.54a4f5c593:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23901 h.955a38080 +Yambo configure 5.3.0 r.23898 h.54a4f5c593 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23901 h.955a38080, which was +It was created by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23901" -SHASH="955a38080" +SREVISION="23898" +SHASH="54a4f5c593" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23901 h.955a38080, which was +This file was extended by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23901 h.955a38080 +Yambo config.status 5.3.0 r.23898 h.54a4f5c593 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index cec881fb18..13396ba973 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23901 h.955a38080, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23902 h.4ebc8546f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23901" -SHASH="955a38080" +SREVISION="23902" +SHASH="4ebc8546f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index 682dfc9b71..8fb5a6c874 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -25,7 +25,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) use drivers, ONLY:l_bs_fxc,l_alda_fxc,l_lrc_fxc use LIVE_t, ONLY:live_timing use parallel_int, ONLY:PP_wait,PP_redux_wait,PP_bcast - use parallel_m, ONLY:PP_indexes,PP_indexes_reset,PAR_COM_X_WORLD_RL_resolved,PAR_COM_RL_INDEX,& + use parallel_m, ONLY:PP_indexes,PP_indexes_reset,PAR_COM_X_WORLD_RL_resolved,& & PAR_COM_X_WORLD,PAR_COM_SLK_INDEX_local,PAR_COM_SLK,PAR_n_freqs,PAR_FREQS_index use R_lattice, ONLY:bare_qpg, bare_qpg_d use frequency, ONLY:w_samp @@ -169,7 +169,6 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! enddo ! - ! if (iw_par>PAR_n_freqs) cycle ! ! [2] SER/SLK Solver @@ -365,7 +364,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! ! complete the transfer with a collective communication ! - if(PAR_COM_RL_INDEX%n_CPU>1) call PP_bcast(X_par%blc,node=0,COMM=PAR_COM_X_WORLD_RL_resolved%COMM) + call PP_bcast(X_par%blc,node=0,COMM=PAR_COM_X_WORLD_RL_resolved%COMM) ! call timing(what//' (REDUX)',OPR='stop') ! From 06ea40378d908448b554a1f6990ba95c18d02326 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 13 Jan 2025 17:17:49 +0100 Subject: [PATCH 0861/1367] Version 5.3.0, Revision 23900, Hash e51825f30d MODIFIED * config/m4/netcdf_f90.m4 configure include/version/version.m4 Changes: - [yambo] Tentative fix for issue detected in https://github.com/yambo-code/yambo/issues/168 with netcdf detection Patch sent by: Davide Sangalli --- config/m4/netcdf_f90.m4 | 4 ++-- configure | 26 +++++++++++++------------- include/version/version.m4 | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/config/m4/netcdf_f90.m4 b/config/m4/netcdf_f90.m4 index 1b58868a3c..7e1cb7b1cd 100644 --- a/config/m4/netcdf_f90.m4 +++ b/config/m4/netcdf_f90.m4 @@ -103,9 +103,9 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then fi # try_NETCDF_LIBS="-L$try_netcdf_libdir -lnetcdf" ; - if test -r $try_netcdff_libdir/libnetcdff.a ; then + if test -r $try_netcdff_libdir/libnetcdff.a || test -r $try_netcdff_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdff_libdir -lnetcdff" ; - elif test -r $try_netcdf_libdir/libnetcdff.a ; then + elif test -r $try_netcdf_libdir/libnetcdff.a || test -r $try_netcdf_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdf_libdir -lnetcdff" ; fi # diff --git a/configure b/configure index c1bb3c33c1..71b154c982 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23898 h.54a4f5c593. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23900 h.e51825f30d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23898 h.54a4f5c593' -PACKAGE_STRING='Yambo 5.3.0 r.23898 h.54a4f5c593' +PACKAGE_VERSION='5.3.0 r.23900 h.e51825f30d' +PACKAGE_STRING='Yambo 5.3.0 r.23900 h.e51825f30d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23898 h.54a4f5c593 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23900 h.e51825f30d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23898 h.54a4f5c593:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23900 h.e51825f30d:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23898 h.54a4f5c593 +Yambo configure 5.3.0 r.23900 h.e51825f30d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was +It was created by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23898" -SHASH="54a4f5c593" +SREVISION="23900" +SHASH="e51825f30d" @@ -14555,9 +14555,9 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu fi # try_NETCDF_LIBS="-L$try_netcdf_libdir -lnetcdf" ; - if test -r $try_netcdff_libdir/libnetcdff.a ; then + if test -r $try_netcdff_libdir/libnetcdff.a || test -r $try_netcdff_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdff_libdir -lnetcdff" ; - elif test -r $try_netcdf_libdir/libnetcdff.a ; then + elif test -r $try_netcdf_libdir/libnetcdff.a || test -r $try_netcdf_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdf_libdir -lnetcdff" ; fi # @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23898 h.54a4f5c593, which was +This file was extended by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23898 h.54a4f5c593 +Yambo config.status 5.3.0 r.23900 h.e51825f30d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 13396ba973..dc93105999 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23902 h.4ebc8546f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23900 h.e51825f30d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23902" -SHASH="4ebc8546f" +SREVISION="23900" +SHASH="e51825f30d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 2518b26c3e686c20e64eef642337105377d21292 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 15 Jan 2025 10:39:50 +0100 Subject: [PATCH 0862/1367] Version 5.3.0, Revision 23925, Hash 5e1a3aea10 MODIFIED * configure include/version/version.m4 ypp/excitons/excitons_bands.F ypp/excitons/excitons_interpolate_setup.F ypp/plotting/plot_interpolated_values.F Changes: - Built in bands available also in excitons interpolation Patch sent by: Davide Sangalli --- configure | 22 ++--- include/version/version.m4 | 6 +- ypp/excitons/excitons_bands.F | 84 ++++++++++++++++++-- ypp/excitons/excitons_interpolate_setup.F | 6 +- ypp/plotting/plot_interpolated_values.F | 97 ++++++++++++++--------- 5 files changed, 153 insertions(+), 62 deletions(-) diff --git a/configure b/configure index 71b154c982..93776b4357 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23900 h.e51825f30d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23925 h.5e1a3aea10. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23900 h.e51825f30d' -PACKAGE_STRING='Yambo 5.3.0 r.23900 h.e51825f30d' +PACKAGE_VERSION='5.3.0 r.23925 h.5e1a3aea10' +PACKAGE_STRING='Yambo 5.3.0 r.23925 h.5e1a3aea10' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23900 h.e51825f30d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23925 h.5e1a3aea10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23900 h.e51825f30d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23925 h.5e1a3aea10:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23900 h.e51825f30d +Yambo configure 5.3.0 r.23925 h.5e1a3aea10 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was +It was created by Yambo $as_me 5.3.0 r.23925 h.5e1a3aea10, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23900" -SHASH="e51825f30d" +SREVISION="23925" +SHASH="5e1a3aea10" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was +This file was extended by Yambo $as_me 5.3.0 r.23925 h.5e1a3aea10, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23900 h.e51825f30d +Yambo config.status 5.3.0 r.23925 h.5e1a3aea10 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index dc93105999..a5c5e2d1ec 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23900 h.e51825f30d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23925 h.5e1a3aea10, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23900" -SHASH="e51825f30d" +SREVISION="23925" +SHASH="5e1a3aea10" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index dae520a8e3..68f6d82cee 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -34,32 +34,33 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! Work space ! integer :: iq,i_c,i_l,ID_INTERP_EXC,i_E - real(SP), allocatable :: BS_all_E(:,:),BSE_interp_E(:,:),values(:) + real(SP), allocatable :: BSE_interp_E(:,:),values(:) type(bz_samp) :: GRID_q character(schlen) :: file_name character(schlen), allocatable :: headings(:) - logical :: GRID_interpolate,l_prt_dos + logical :: BANDS_built_in,GRID_interpolate,l_prt_dos real(SP) :: tmp_q(3) real(SP) :: dos_E(DOS_E_steps),exc_DOS(DOS_E_steps) + real(SP) :: BS_all_E(EXCITONS_n_user_states,q%nibz) type(PP_indexes) :: px ! ! Parse the different interpolations ! call parser('PrtDOS',l_prt_dos) + call parser('BANDS_built_in',BANDS_built_in) GRID_interpolate = all(INTERP_grid>0) ! if(l_prt_dos.and..not.GRID_interpolate) call error("You need to specify a Q-grid for the DOS") ! ! Allocate arrays for all eigenvalues/eigenvectors ! - YAMBO_ALLOC(BS_all_E,(EXCITONS_n_user_states,q%nibz)) YAMBO_ALLOC(values,(EXCITONS_n_user_states+4)) allocate(headings(EXCITONS_n_user_states+4)) ! ! Read and interpolate excitons dispersion ! ID_INTERP_EXC=1 - call excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,.TRUE.) + call excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,.TRUE.) ! ! Interpolate and write on disk ! @@ -72,7 +73,9 @@ subroutine excitons_bands(k,Xk,en,Xen,q) YAMBO_ALLOC(BSE_interp_E,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) ! - call print_BANDS() + call print_interpolated_BANDS() + ! + if (BANDS_built_in) call print_built_in_BANDS() ! endif ! @@ -150,7 +153,7 @@ subroutine print_DOS() ! end subroutine print_DOS ! - subroutine print_BANDS() + subroutine print_interpolated_BANDS() implicit none ! headings(1)=" |q| (a.u.) " @@ -181,7 +184,74 @@ subroutine print_BANDS() enddo call of_open_close(trim(file_name)) ! - end subroutine print_BANDS + end subroutine print_interpolated_BANDS + ! + subroutine print_built_in_BANDS() + implicit none + ! + integer :: i_point,n_points,n_points_max,iq_bz_grid,iq_ibz_grid + real(SP) :: value_k,values(EXCITONS_n_user_states+4) + integer, allocatable :: Grid_to_path_map(:,:) + real(SP), allocatable :: tmp_var(:,:),tmp_q(:,:),tmp_k_dist(:,:) + ! + call k_ibz2bz(q,'iku',.true.) + ! + YAMBO_ALLOC(Grid_to_path_map,(USER_k%nbz,q%nbz)) + call define_grid_map(q,USER_k,Grid_to_path_map,n_points_max) + YAMBO_ALLOC(tmp_var,(EXCITONS_n_user_states,n_points_max)) + ! + YAMBO_ALLOC( tmp_q,(3,n_points_max)) + YAMBO_ALLOC(tmp_k_dist,(3,n_points_max)) + ! + headings(1)=" |q| (a.u.) " + do i_c=1,EXCITONS_n_user_states + i_l=EXCITONS_user_indexes(i_c) + headings(i_c+1)=' e'//intc(i_l) + enddo + headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& +& (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) + ! + file_name="excitons_built_in" + call of_open_close(trim(file_name),'ot') + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + call msg('o '//trim(file_name),"#") + ! + values=0._SP + ! + do iq=1,USER_k%nibz + ! + if (iq>1) value_k=value_k+iku_v_norm(USER_k%pt(iq,:3)-USER_k%pt(iq-1,:3)) + ! + n_points=0 + ! + do iq_bz_grid=1,q%nbz + if( Grid_to_path_map(iq,iq_bz_grid)==-1 ) cycle + n_points=n_points+1 + iq_ibz_grid=q%sstar(iq_bz_grid,1) + ! + tmp_k_dist(:,n_points)=q%ptbz(iq_bz_grid,:)-USER_k%pt(iq,:) + tmp_q(:,n_points)=q%ptbz(iq_bz_grid,:) + ! + tmp_var(:,n_points)=BS_all_E(:,iq_ibz_grid) + ! + enddo + ! + do i_point=1,n_points + ! + call K_transform(tmp_q(:,i_point),'iku') + ! + values(1)=value_k+iku_v_norm(tmp_k_dist(:,i_point)) + values(2:EXCITONS_n_user_states+1)=tmp_var(:,i_point)*HA2EV + values(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=tmp_q(:,i_point) + ! + call msg('o '//trim(file_name),' ',values,INDENT=0,USE_TABS=.true.) + enddo + ! + enddo + ! + call of_open_close(trim(file_name)) + ! + end subroutine print_built_in_BANDS ! subroutine print_INTERP_GRID() implicit none diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index aa5019c088..c71c4a10c0 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA ! -subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) +subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,report) ! ! This subroutine read and interpolate exciton ! @@ -22,21 +22,19 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,ID_INTERP_EXC,report) ! type(bz_samp) ::Xk,k,q type(levels) ::Xen,en + real(SP),intent(out) :: BS_all_E(EXCITONS_n_user_states,q%nibz) logical, intent(in) :: report integer, intent(inout) :: ID_INTERP_EXC ! ! Work space ! integer :: iq,i_c,i_l,io_err - real(SP), allocatable :: BS_all_E(:,:) real(SP), allocatable :: values(:) real(SP) :: tmp_q(3) character(schlen), allocatable :: headings(:) ! ! Allocate arrays for all eigenvalues/eigenvectors ! - YAMBO_ALLOC(BS_all_E,(EXCITONS_n_user_states,q%nibz)) - ! call section('*','Excitons Interpolation') ! call excitons_read(k,Xk,en,Xen,1,"clean",io_err) diff --git a/ypp/plotting/plot_interpolated_values.F b/ypp/plotting/plot_interpolated_values.F index 9039bd9eef..03d35e19cb 100644 --- a/ypp/plotting/plot_interpolated_values.F +++ b/ypp/plotting/plot_interpolated_values.F @@ -11,7 +11,7 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile use pars, ONLY:SP,schlen use com, ONLY:msg,of_open_close use electrons, ONLY:levels,n_sp_pol,n_spinor - use vec_operate, ONLY:v_norm,iku_v_norm + use vec_operate, ONLY:iku_v_norm use R_lattice, ONLY:bz_samp use stderr, ONLY:intc use YPPm, ONLY:coo_out,K_transform,CIRCUIT_E_db,CIRCUIT_k_label @@ -47,7 +47,6 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile ! Allocs ! integer, allocatable :: Grid_to_path_map(:,:) - real(SP), allocatable :: circuit_versor(:,:),circuit_dist(:,:) real(SP), allocatable :: auxiliary_var(:,:,:,:),tmp_k(:,:),tmp_k_dist(:,:) ! PLOT_interpolated = index(trim(basename),"interpolated")>0 @@ -66,45 +65,11 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile #if defined _YPP_SC proj_wfc=(trim(SC_neq_kind)=="matsubara") #endif - ! - ! Define a map between k-points in grid and nearest k-point in circuit ! if (PLOT_built_in) then - ! - YAMBO_ALLOC(circuit_versor,(3,LOCAL_k%nbz)) - YAMBO_ALLOC(circuit_dist ,(3,LOCAL_k%nbz)) ! YAMBO_ALLOC(Grid_to_path_map,(LOCAL_k%nbz,Xk%nbz)) - Grid_to_path_map =-1 - ! - do ik_local=1,LOCAL_k%nbz-1 - tmp_dist=LOCAL_k%pt(ik_local+1,:)-LOCAL_k%pt(ik_local,:) - circuit_dist (:,ik_local)=tmp_dist - circuit_versor(:,ik_local)=tmp_dist/v_norm(tmp_dist) - enddo - circuit_versor(:,ik_local)=circuit_versor(:,ik_local-1) - ! - n_points_max=0 - do ik_local=1,LOCAL_k%nbz - ! - n_points=0 - do ik_bz_grid=1,Xk%nbz - ! - tmp_dist=Xk%ptbz(ik_bz_grid,:)-LOCAL_k%pt(ik_local,:) - ! - if ((abs(v_norm(tmp_dist)-dot_product(tmp_dist,circuit_versor(:,ik_local)))<1.E-5_SP).and.& - & iku_v_norm(tmp_dist)<=iku_v_norm(circuit_dist(:,ik_local)) ) then - Grid_to_path_map(ik_local,ik_bz_grid)=ik_bz_grid - n_points=n_points+1 - endif - n_points_max=max(n_points,n_points_max) - ! - enddo - ! - enddo - ! - YAMBO_FREE(circuit_versor) - YAMBO_FREE(circuit_dist ) + call define_grid_map(Xk,Local_k,Grid_to_path_map,n_points_max) ! if(n_points_max>1) then YAMBO_ALLOC(auxiliary_var,(dims(1):dims(2),maxval(nfiles),nquantities,n_points_max-1)) @@ -320,3 +285,61 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile endif ! end subroutine plot_interpolated_values +! +! +subroutine define_grid_map(Xk,Local_k,Grid_to_path_map,n_points_max) + ! + use pars, ONLY:SP + use R_lattice, ONLY:bz_samp + use vec_operate, ONLY:v_norm,iku_v_norm + ! +#include + ! + type(bz_samp), intent(in) :: Xk,LOCAL_k + integer, intent(out) :: Grid_to_path_map(LOCAL_k%nbz,Xk%nbz) + integer, intent(out) :: n_points_max + ! + ! Workspace + ! + integer :: n_points,ik_local,ik_bz_grid + real(SP) :: tmp_dist(3) + real(SP), allocatable :: circuit_versor(:,:),circuit_dist(:,:) + ! + ! Define a map between k-points in grid and nearest k-point in circuit + ! + YAMBO_ALLOC(circuit_versor,(3,LOCAL_k%nbz)) + YAMBO_ALLOC(circuit_dist ,(3,LOCAL_k%nbz)) + ! + Grid_to_path_map =-1 + n_points=1 + ! + do ik_local=1,LOCAL_k%nbz-1 + tmp_dist=LOCAL_k%pt(ik_local+1,:)-LOCAL_k%pt(ik_local,:) + circuit_dist (:,ik_local)=tmp_dist + circuit_versor(:,ik_local)=tmp_dist/v_norm(tmp_dist) + enddo + circuit_versor(:,ik_local)=circuit_versor(:,ik_local-1) + ! + n_points_max=0 + do ik_local=1,LOCAL_k%nbz + ! + n_points=0 + do ik_bz_grid=1,Xk%nbz + ! + tmp_dist=Xk%ptbz(ik_bz_grid,:)-LOCAL_k%pt(ik_local,:) + ! + if ((abs(v_norm(tmp_dist)-dot_product(tmp_dist,circuit_versor(:,ik_local)))<1.E-5_SP).and.& + & iku_v_norm(tmp_dist)<=iku_v_norm(circuit_dist(:,ik_local)) ) then + Grid_to_path_map(ik_local,ik_bz_grid)=ik_bz_grid + n_points=n_points+1 + endif + n_points_max=max(n_points,n_points_max) + ! + enddo + ! + enddo + ! + YAMBO_FREE(circuit_versor) + YAMBO_FREE(circuit_dist ) + ! +end subroutine define_grid_map From 21f66bb14f6d8c5787e3087604d09fad9d80f280 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 17 Jan 2025 14:23:26 +0100 Subject: [PATCH 0863/1367] Version 5.3.0, Revision 24171, Hash 5b57991ef6 MODIFIED * configure include/version/version.m4 interface/INIT_activate.F Bugs: - Fixed activation of VelGaugeNoDiam flag Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_activate.F | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 93776b4357..596925086e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23925 h.5e1a3aea10. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24171 h.5b57991ef6. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23925 h.5e1a3aea10' -PACKAGE_STRING='Yambo 5.3.0 r.23925 h.5e1a3aea10' +PACKAGE_VERSION='5.3.0 r.24171 h.5b57991ef6' +PACKAGE_STRING='Yambo 5.3.0 r.24171 h.5b57991ef6' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23925 h.5e1a3aea10 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24171 h.5b57991ef6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23925 h.5e1a3aea10:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24171 h.5b57991ef6:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23925 h.5e1a3aea10 +Yambo configure 5.3.0 r.24171 h.5b57991ef6 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23925 h.5e1a3aea10, which was +It was created by Yambo $as_me 5.3.0 r.24171 h.5b57991ef6, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23925" -SHASH="5e1a3aea10" +SREVISION="24171" +SHASH="5b57991ef6" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23925 h.5e1a3aea10, which was +This file was extended by Yambo $as_me 5.3.0 r.24171 h.5b57991ef6, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23925 h.5e1a3aea10 +Yambo config.status 5.3.0 r.24171 h.5b57991ef6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a5c5e2d1ec..91b10e31bb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23925 h.5e1a3aea10, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24171 h.5b57991ef6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23925" -SHASH="5e1a3aea10" +SREVISION="24171" +SHASH="5b57991ef6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index d0c6849611..75b67b6dcd 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -534,7 +534,7 @@ subroutine INIT_activate() call INIT_RT_ctl_switch('G') ! call initactivate(1,'RTskipImposeN RTeeImposeE InducedField') - call initactivate(1,'Gauge VelGaugeCorr VelGaugeDiam PfromJ RTUpdateSOC RTUpdateE SaveGhistory') + call initactivate(1,'Gauge VelGaugeCorr VelGaugeNoDiam PfromJ RTUpdateSOC RTUpdateE SaveGhistory') call initactivate(1,'RTEqScatt RTImpForMet RTzeroTempRef RTskipPHabs RTEvalEnergy RTEvalEntropy') call initactivate(1,'dTupdateTime dTupdateTimeSet dTupdateJump dTupdateTresh dT_MAX dT_SET') if (l_elel_scatt .or. l_elph_scatt .or. l_elphoton_scatt) then @@ -562,7 +562,7 @@ subroutine INIT_activate() #if defined _NL if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') - call initactivate(1,'TestOSCLL') + call initactivate(1,'TestOSCLL VelGaugeNoDiam') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps') if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL EvalCurrent InducedField FrPolPerdic') From 258a0a84cb004fb6ec22f55e435c5bffef56c4c2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 17 Jan 2025 16:20:25 +0100 Subject: [PATCH 0864/1367] Version 5.3.0, Revision 24172, Hash 45058a2b5c MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_covariant.F Changes: - [yambo_nl] Trying to address issue https://github.com/yambo-code/yambo/issues/172 Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_covariant.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 596925086e..3e786db5ca 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24171 h.5b57991ef6. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24172 h.45058a2b5c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24171 h.5b57991ef6' -PACKAGE_STRING='Yambo 5.3.0 r.24171 h.5b57991ef6' +PACKAGE_VERSION='5.3.0 r.24172 h.45058a2b5c' +PACKAGE_STRING='Yambo 5.3.0 r.24172 h.45058a2b5c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24171 h.5b57991ef6 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24172 h.45058a2b5c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24171 h.5b57991ef6:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24172 h.45058a2b5c:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24171 h.5b57991ef6 +Yambo configure 5.3.0 r.24172 h.45058a2b5c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24171 h.5b57991ef6, which was +It was created by Yambo $as_me 5.3.0 r.24172 h.45058a2b5c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24171" -SHASH="5b57991ef6" +SREVISION="24172" +SHASH="45058a2b5c" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24171 h.5b57991ef6, which was +This file was extended by Yambo $as_me 5.3.0 r.24172 h.45058a2b5c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24171 h.5b57991ef6 +Yambo config.status 5.3.0 r.24172 h.45058a2b5c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 91b10e31bb..8bcc639744 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24171 h.5b57991ef6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24172 h.45058a2b5c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24171" -SHASH="5b57991ef6" +SREVISION="24172" +SHASH="45058a2b5c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index b8d6de6378..fe925eb748 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -159,7 +159,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle do idir=1,3 - DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))/cI + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))*cI enddo enddo enddo From 8b88addee99028914640696e562d98eb925164ab Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 19 Jan 2025 18:31:34 +0100 Subject: [PATCH 0865/1367] Version 5.3.0, Revision 24171, Hash 258a0a84cb MODIFIED * configure include/version/version.m4 dipoles/Berry_polarization_EQ.F hamiltonian/Build_W_operator.F nloptics/NL_Berry_current.F Bugs: - addressing issue https://github.com/yambo-code/yambo/issues/172 Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/Berry_polarization_EQ.F | 2 +- src/hamiltonian/Build_W_operator.F | 2 +- src/nloptics/NL_Berry_current.F | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 3e786db5ca..3465778375 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24172 h.45058a2b5c. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24173 h.258a0a84cb. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24172 h.45058a2b5c' -PACKAGE_STRING='Yambo 5.3.0 r.24172 h.45058a2b5c' +PACKAGE_VERSION='5.3.0 r.24173 h.258a0a84cb' +PACKAGE_STRING='Yambo 5.3.0 r.24173 h.258a0a84cb' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24172 h.45058a2b5c to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24173 h.258a0a84cb to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24172 h.45058a2b5c:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24173 h.258a0a84cb:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24172 h.45058a2b5c +Yambo configure 5.3.0 r.24173 h.258a0a84cb generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24172 h.45058a2b5c, which was +It was created by Yambo $as_me 5.3.0 r.24173 h.258a0a84cb, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24172" -SHASH="45058a2b5c" +SREVISION="24173" +SHASH="258a0a84cb" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24172 h.45058a2b5c, which was +This file was extended by Yambo $as_me 5.3.0 r.24173 h.258a0a84cb, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24172 h.45058a2b5c +Yambo config.status 5.3.0 r.24173 h.258a0a84cb configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 8bcc639744..ad746ef429 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24172 h.45058a2b5c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24173 h.258a0a84cb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24172" -SHASH="45058a2b5c" +SREVISION="24173" +SHASH="258a0a84cb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index d2149ee9fe..cd1ad3fe82 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -76,7 +76,7 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) enddo enddo ! - P_Berry_RED(id_in)=-P_Berry_RED(id_in)/real(Nperpend,SP) + P_Berry_RED(id_in)=P_Berry_RED(id_in)/real(Nperpend,SP) ! enddo ! diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 037f8bade1..0f5919c33c 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -133,7 +133,7 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) !$omp parallel do default(shared), private(i1,id) do i1=H_ref_bands(1),H_ref_bands(2) do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))- & + H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) enddo enddo diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index fe59c94178..2c871955e6 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -118,7 +118,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! !$omp parallel do default(shared), private(i1) do id=1,3 - NL_J(id)=-sum(NL_J_red(:)*a(:,id))/(4.0*pi) + NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0*pi) enddo !$omp end parallel do ! From 28dedce5a2c9d007f58dec32e4bc1f1a62156481 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 23 Jan 2025 18:27:06 +0100 Subject: [PATCH 0866/1367] Version 5.3.0, Revision 23985, Hash 105f9ba74d MODIFIED * configure include/version/version.m4 dipoles/.objects dipoles/DIPOLE_IO.F dipoles/DIPOLE_build_der_k.F dipoles/DIPOLE_covariant.F dipoles/DIPOLE_driver.F NEW * dipoles/OVERLAPS_IO.F Changes: - Reading of overlpas made independent from reading of dipoles Patch sent by: Davide Sangalli --- configure | 22 ++--- include/version/version.m4 | 6 +- src/dipoles/.objects | 2 +- src/dipoles/DIPOLE_IO.F | 71 +------------- src/dipoles/DIPOLE_build_der_k.F | 5 +- src/dipoles/DIPOLE_covariant.F | 3 + src/dipoles/DIPOLE_driver.F | 11 ++- src/dipoles/OVERLAPS_IO.F | 153 +++++++++++++++++++++++++++++++ 8 files changed, 187 insertions(+), 86 deletions(-) create mode 100644 src/dipoles/OVERLAPS_IO.F diff --git a/configure b/configure index 10d14d9a36..3dd569fe05 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23907 h.229e6276b7. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23986 h.105f9ba74d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23907 h.229e6276b7' -PACKAGE_STRING='Yambo 5.3.0 r.23907 h.229e6276b7' +PACKAGE_VERSION='5.3.0 r.23986 h.105f9ba74d' +PACKAGE_STRING='Yambo 5.3.0 r.23986 h.105f9ba74d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23907 h.229e6276b7 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23986 h.105f9ba74d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23907 h.229e6276b7:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23986 h.105f9ba74d:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23907 h.229e6276b7 +Yambo configure 5.3.0 r.23986 h.105f9ba74d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23907 h.229e6276b7, which was +It was created by Yambo $as_me 5.3.0 r.23986 h.105f9ba74d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23907" -SHASH="229e6276b7" +SREVISION="23986" +SHASH="105f9ba74d" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23907 h.229e6276b7, which was +This file was extended by Yambo $as_me 5.3.0 r.23986 h.105f9ba74d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23907 h.229e6276b7 +Yambo config.status 5.3.0 r.23986 h.105f9ba74d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3119f1f6fe..e26d55efb3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23907 h.229e6276b7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23986 h.105f9ba74d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23907" -SHASH="229e6276b7" +SREVISION="23986" +SHASH="105f9ba74d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/.objects b/src/dipoles/.objects index 2a893d5076..cafdd7e7e7 100644 --- a/src/dipoles/.objects +++ b/src/dipoles/.objects @@ -9,7 +9,7 @@ SC_objects = DIPOLE_SC_rotate.o NL_objects = Berry_polarization_EQ.o Ionic_polarization.o POLARIZATION_output.o #endif objs = Build_Overlaps_Det_EQ.o $(SC_objects) $(MAGN_objects) $(NL_objects) \ - DIPOLE_setup.o \ + DIPOLE_setup.o OVERLAPS_IO.o \ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_covariant.o DIPOLE_x_real_space.o DIPOLE_spin_magnetization.o \ DIPOLE_kb_abinit_def_dim.o DIPOLE_kb_abinit_comp.o DIPOLE_kb_sum.o DIPOLE_kb_Ylm.o DIPOLE_dimensions.o \ DIPOLE_kb_pwscf_def_dim.o DIPOLE_kb_pwscf_comp.o DIPOLE_kb_init.o DIPOLE_p_matrix_elements.o DIPOLE_overlaps.o \ diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 7c106824b1..1bf0fb832c 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -35,11 +35,9 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) ! ! Work space ! - logical :: write_header, read_header, check,reading,writing,& -& write_header_ovlp,read_header_ovlp,l_project_dipoles,IO_do_it - integer :: ID,ID_S,IO_ACTION,IO_ACT_NOW,IO_MODE,ik_mem,ik,i_sp_pol,i_fragment,iv,ic,max_count,i_count + logical :: write_header,read_header,check,reading,writing,l_project_dipoles,IO_do_it + integer :: ID,IO_ACTION,IO_ACT_NOW,IO_MODE,ik_mem,ik,i_sp_pol,i_fragment,iv,ic,max_count,i_count integer, external :: io_DIPOLES - integer, external :: io_Overlaps #if !defined _PAR_IO type(PP_indexes) :: IO_par_index #endif @@ -60,32 +58,22 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) call PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) ! ID=0 - ID_S=0 io_err=0 ! write_header = (master_cpu.and.writing) read_header = .not.write_header ! - write_header_ovlp =write_header.and.(len_trim(covariant_obs)>0.or.len_trim(der_k_obs)>0) - read_header_ovlp =read_header .and.(len_trim(covariant_obs)>0.or.len_trim(der_k_obs)>0) - ! if(write_header) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) io_err=io_DIPOLES(Dip,ID) endif - ! - if(write_header_ovlp) then - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_S) - io_err=io_err+io_Overlaps(Dip,ID_S) - endif - ! ! To fix problems with asynchronous I/O ! call PP_wait(COMM=PAR_K_scheme%comm_world) ! IO_MODE=VERIFY - if((read_header.or.read_header_ovlp).and.writing) IO_MODE=DUMP + if(read_header.and.writing) IO_MODE=DUMP ! if(read_header) then ! @@ -101,10 +89,6 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) do while(io_err/=0) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=IO_MODE,ID=ID) io_err=io_DIPOLES(Dip,ID) - if(read_header_ovlp) then - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=IO_MODE,ID=ID_S) - io_err=io_err+io_Overlaps(Dip,ID_S) - endif if(io_err/=0) call sleep(1) i_count=i_count+1 if((i_count==max_count).and.io_err/=0) then @@ -169,55 +153,6 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/2+Xk%nibz*n_sp_pol/),ID=ID) io_err=io_DIPOLES(Dip,ID) #endif - ! - ! OVERLAPS I/O - !============== - ! - if(len_trim(covariant_obs)>0.or.len_trim(der_k_obs)>0) then - ! -#if !defined _PAR_IO - ! IO parallel indexes needed below by manage_action - !--------------------- - call PP_indexes_reset(IO_par_index) - allocate(IO_par_index%element_1D(n_sp_pol*Xk%nbz)) - IO_par_index%element_1D=.FALSE. - do i_sp_pol=1,n_sp_pol - do ik=1,Xk%nbz - i_fragment=ik+(i_sp_pol-1)*Xk%nbz - if ( .not.PAR_K_scheme%IND_bz%element_1D(ik)) cycle - IO_par_index%element_1D(i_fragment)=.TRUE. - enddo - enddo -#endif - ! -#if defined _PAR_IO - IO_ACT_NOW=manage_action(IO_ACTION,0,0,2) - call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/0/),ID=ID_S,COMM=PAR_K_scheme%COM_ibz_index,DO_IT=IO_do_it) - io_err=io_Overlaps(Dip,ID_S) - IO_ACT_NOW=manage_action(IO_ACTION,1,0,2) -#endif - do i_sp_pol=1,n_sp_pol - do ik=1,Xk%nbz - i_fragment=ik+(i_sp_pol-1)*Xk%nbz - if (.not.PAR_K_scheme%IND_bz%element_1D(ik).and.writing) cycle -#if !defined _PAR_IO - if (.not.PAR_K_scheme%COM_ibz_A2A%CPU_id==0 .and.writing) cycle - if (writing) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol,IO_par_index) - if (reading) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol) -#endif - call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/1+i_fragment/),ID=ID_S) - io_err=io_Overlaps(Dip,ID_S) - if (io_err/=0.and.IO_do_it) then - call error(" OVERLAPS I/O error when (i_sp_pol,ik)= ("//trim(intc(i_sp_pol))//","//trim(intc(ik))//")") - endif - enddo - enddo -#if defined _PAR_IO - IO_ACT_NOW=manage_action(IO_ACTION,2,0,2) - call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/2+Xk%nbz*n_sp_pol/),ID=ID_S) - io_err=io_Overlaps(Dip,ID_S) -#endif - endif ! call PP_wait(COMM=PAR_K_scheme%comm_world) ! diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 081edfac7f..e726053591 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -68,6 +68,9 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) ! if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. ! + if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) + if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) + ! direction_is_todo(:)= (k_map%max_kdir(:)==1) ! if(any(direction_is_todo)) call warning(' Der-k Dipoles not in 3d. Assuming non periodic system.') @@ -76,7 +79,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) & call msg('rs','Using forth order approximation for der-k dipoles') ! ! Notice that DIP_iR/DIP_v are defined only in the IBZ - ! while the overlaps are in the BZ + ! while the overlaps are in the BZ ! call live_timing("Build Rotation Matrices:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) ! diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index 124b12479a..2d2c4b7487 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -47,6 +47,9 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) ! if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. ! + if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) + if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) + ! if (any(Xen%nbf/=Xen%nbm)) call error(' Covariant dipoles not implemented for metals') ! call parser('EvPolarization' ,l_eval_polarization) diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index c9fc4bd152..f5fd188879 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -55,7 +55,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! ! Work Space ! - integer :: ik,io_err + integer :: ik,io_err,io_err_Overlaps character(schlen) :: msg logical :: l_warning,direction_is_todo(3) ! @@ -81,6 +81,12 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) io_err=-1 call DIPOLE_IO(Xk,Xen,Dip,'check',io_err,'DIP') ! + io_err_Overlaps=-1 + if (eval_OVERLAPS) then + call OVERLAPS_IO(Xk,Xen,Dip,'check',io_err_Overlaps,'DIP') + if (io_err_Overlaps==0) call OVERLAPS_IO(Xk,Xen,Dip,'read',io_err_Overlaps,'DIP') + endif + ! ! In case dipoles were not found/ok then I need to compute them !============================================================== if (io_err/=0) then @@ -105,7 +111,8 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! ! , ,

, , S_overlap ! - if (eval_OVERLAPS) call DIPOLE_overlaps(Xk,Dip) + ! + if (eval_Overlaps.and.io_err_Overlaps/=0) call DIPOLE_overlaps(Xk,Dip) ! if (len_trim(shifted_grids_obs)>0) call DIPOLE_shifted_grids(Xen,Xk,Dip) ! diff --git a/src/dipoles/OVERLAPS_IO.F b/src/dipoles/OVERLAPS_IO.F new file mode 100644 index 0000000000..f4c0933fff --- /dev/null +++ b/src/dipoles/OVERLAPS_IO.F @@ -0,0 +1,153 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2016 The Yambo Team +! +! Authors (see AUTHORS file for details): DS AM +! +subroutine OVERLAPS_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) + ! + use pars, ONLY:SP,cI,cZERO + use parser_m, ONLY:parser + use stderr, ONLY:intc + use com, ONLY:msg + use IO_m, ONLY:io_DIP + use R_lattice, ONLY:bz_samp + use electrons, ONLY:levels,n_sp_pol + use DIPOLES, ONLY:DIPOLE_t,covariant_obs,der_k_obs + use IO_int, ONLY:io_control + use IO_m, ONLY:manage_action,VERIFY,DUMP,REP,OP_WR_CL,OP_WR,OP_RD_CL,& +& OP_IF_START_APP_CL_IF_END,OP_IF_START_RD_CL_IF_END + use parallel_int,ONLY:PP_wait + use parallel_m, ONLY:master_cpu,PAR_K_scheme,PP_indexes,PP_indexes_reset + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + type(DIPOLE_t),intent(inout) :: Dip + character(*), intent(in) :: check_read_or_write + character(*), intent(in) :: PAR_K_scheme_kind + integer, intent(out) :: io_err + ! + ! Work space + ! + logical :: write_header,read_header,check,reading,writing,IO_do_it + integer :: ID_S,IO_ACTION,IO_ACT_NOW,IO_MODE,ik_mem,ik,i_sp_pol,i_fragment,iv,ic,max_count,i_count + integer, external :: io_Overlaps +#if !defined _PAR_IO + type(PP_indexes) :: IO_par_index +#endif + ! + if (.not.IO_dip) return + ! + check =trim(check_read_or_write)=="check" + reading=trim(check_read_or_write)=="read" + writing=trim(check_read_or_write)=="write" + ! + if(.not.any((/check,reading,writing/))) call error("Wrong call to DIPOLES_IO") + ! + ID_S=0 + io_err=0 + ! + write_header = (master_cpu.and.writing) + read_header = .not.write_header + ! + if(write_header) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) + endif + ! + ! To fix problems with asynchronous I/O + ! + call PP_wait(COMM=PAR_K_scheme%comm_world) + ! + IO_MODE=VERIFY + if(read_header.and.writing) IO_MODE=DUMP + ! + if(read_header) then + ! + io_err=-1 + i_count=0 + ! + ! Wait until the ndb.dipoles file is available to all cores + ! In writing mode the loop is needed to fix for asynchronous I/O + ! + if(writing) max_count=120 + if(reading.or.check) max_count=1 + ! + do while(io_err/=0) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=IO_MODE,ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) + if(io_err/=0) call sleep(1) + i_count=i_count+1 + if((i_count==max_count).and.io_err/=0) then + if(writing) call error(" [OVLPs] Header not found while writing overlaps ") + if(reading) call error(" [OVLPs] Header not correct or missing while reading overlaps ") + if( check) call msg("s","[OVLPs] Overlaps not correct or missing. To be computed") + return + endif + enddo + endif + ! + if (check) return + if (writing) call PP_wait(COMM=PAR_K_scheme%comm_world) + ! + if(reading) IO_ACTION=OP_IF_START_RD_CL_IF_END + if(writing) IO_ACTION=OP_IF_START_APP_CL_IF_END + ! + IO_do_it = reading .or. (writing.and.PAR_K_scheme%COM_ibz_A2A%CPU_id==0) + ! + ! DIPOLES I/O + !============== + ! +#if !defined _PAR_IO + ! IO parallel indexes needed below by manage_action + !--------------------- + call PP_indexes_reset(IO_par_index) + allocate(IO_par_index%element_1D(n_sp_pol*Xk%nibz)) + IO_par_index%element_1D=.FALSE. + do i_sp_pol=1,n_sp_pol + do ik=1,Xk%nibz + i_fragment=ik+(i_sp_pol-1)*Xk%nibz + if ( .not.PAR_K_scheme%IND_ibz%element_1D(ik)) cycle + IO_par_index%element_1D(i_fragment)=.TRUE. + enddo + enddo +#endif + ! +#if defined _PAR_IO + IO_ACT_NOW=manage_action(IO_ACTION,0,0,2) + call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/0/),ID=ID_S,COMM=PAR_K_scheme%COM_ibz_index,DO_IT=IO_do_it) + io_err=io_Overlaps(Dip,ID_S) + IO_ACT_NOW=manage_action(IO_ACTION,1,0,2) +#endif + do i_sp_pol=1,n_sp_pol + do ik=1,Xk%nbz + i_fragment=ik+(i_sp_pol-1)*Xk%nbz + if (.not.PAR_K_scheme%IND_bz%element_1D(ik).and.writing) cycle +#if !defined _PAR_IO + if (.not.PAR_K_scheme%COM_ibz_A2A%CPU_id==0 .and.writing) cycle + if (writing) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol,IO_par_index) + if (reading) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol) +#endif + call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/1+i_fragment/),ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) + if (io_err/=0.and.IO_do_it) then + call error(" OVERLAPS I/O error when (i_sp_pol,ik)= ("//trim(intc(i_sp_pol))//","//trim(intc(ik))//")") + endif + enddo + enddo +#if defined _PAR_IO + IO_ACT_NOW=manage_action(IO_ACTION,2,0,2) + call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/2+Xk%nbz*n_sp_pol/),ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) +#endif + ! + call PP_wait(COMM=PAR_K_scheme%comm_world) + ! +#if !defined _PAR_IO + call PP_indexes_reset(IO_par_index) +#endif + ! +end subroutine OVERLAPS_IO From 905729bc76f064b54dcca005cfef80f6a3bb3d42 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 27 Jan 2025 22:36:06 +0100 Subject: [PATCH 0867/1367] Version 5.3.0, Revision 24171, Hash 258a0a84cb MODIFIED * configure include/version/version.m4 real_time_hamiltonian/RT_Hamiltonian.F real_time_hamiltonian/RT_apply_field.F NEW * real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - [yambo_rt] drafted implementation of rho gradient according to notes just derived To better understand what Virk and Sipe do instead Patch sent by: Davide Sangalli --- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 + src/real_time_hamiltonian/RT_apply_field.F | 3 +- .../RT_gradk_rho_times_E.F | 105 ++++++++++++++++++ 3 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 src/real_time_hamiltonian/RT_gradk_rho_times_E.F diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index fcc14039ad..0ceeb71a64 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -196,12 +196,14 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) + call RT_grad_k_rho(ik,1,H_nl_sc) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) enddo enddo ! + ! call timing('RT Apply Field',OPR='stop') ! endif diff --git a/src/real_time_hamiltonian/RT_apply_field.F b/src/real_time_hamiltonian/RT_apply_field.F index 9f3f762250..1869f7d36c 100644 --- a/src/real_time_hamiltonian/RT_apply_field.F +++ b/src/real_time_hamiltonian/RT_apply_field.F @@ -7,7 +7,8 @@ ! subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! - ! This subroutine add the vector potential to the Hamiltonian + ! This subroutine adds the external field to the Hamiltonian, + ! either as A*j (velocity gauge) or as E*r (length gauge) ! use pars, ONLY:SP,cI use drivers, ONLY:l_nl_optics diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F new file mode 100644 index 0000000000..f38e35b313 --- /dev/null +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -0,0 +1,105 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2025 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,A_input) + ! + ! This subroutine computes the k-gradient of the density matrix, + ! and multiplies it by the electric field. + ! See Phys. Rev. B 76, 035213 (2007) + ! + use pars, ONLY:SP + use real_time, ONLY:l_length_grad_k,RT_bands + use fields, ONLY:gauge_field + ! + implicit none + ! + integer, intent(in) :: ik,i_sp_pol + complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + type(gauge_field), intent(in) :: A_input + ! + if (.not.l_length_grad_k) return + ! + ikbz=Xk%k_table(ik,1) + ! + do id_red=1,3 ! loop on reciprocal lattice + ! + if(k_map%max_kdir(id_red)==1) cycle + ! + max_step=1 + ! + ! I need at leat 5 k-points in the line to + ! use the second order formula + ! + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 + ! + do istep=1,max_step + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)-istep + idx=k_periodic_idx(idx,k_map) + ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)+istep + idx=k_periodic_idx(idx,k_map) + ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + !S_tmp(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) ! g+(k) + !S_tmp(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! g-(k)=g+(k-q) + ! + !S_kpq(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikp1,i_sp_pol) ! g+(k+q) + Sm_kpq(:,:)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! g-(k+q)=g+(k) + ! + Sp_kmq(:,:)= DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) + !S_kmq(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm2,i_sp_pol)) ! g-(k-q)=g+(k-2*q) + ! + ! Option 1: Do SVD and later dagger. + ! Coding to be imported from DIPOLE_build_derk subroutine in branch phys-dipoles-k-derivative + ! + ! Option 2: Directly do matrix inversion in place of dagger. + ! + ! To fix 4 indexes on the left, 2x2 on the right + M_p_kmq(:,:,:,:)=hermitian(Sp_kmq),Sp_kmq + M_m_kpq(:,:,:,:)=hermitian(Sm_kpq),Sm_kmq + ! + ! To fix dipole direction + A1p_kmq=matmul(-cI*dG(:,:,ikm1),hermitina(DIP_iR(i_dir,:,:,ikm1,i_sp_pol))) + A1m_kpq=matmul(-cI*dG(:,:,ikp1),hermitina(DIP_iR(i_dir,:,:,ikp1,i_sp_pol))) + ! + A2p_kmq=matmul(-cI*dG(:,:,ikm1), DIP_iR(i_dir,:,:,ikm1,i_sp_pol))) + A2m_kpq=matmul(-cI*dG(:,:,ikp1), DIP_iR(i_dir,:,:,ikp1,i_sp_pol))) + ! + do ib=RT_bands(1),RT_bands(2) + do jb=RT_bands(1),RT_bands(2) + do ibp=RT_bands(1),RT_bands(2) + do jbp=RT_bands(1),RT_bands(2) + gradk_rho(ib,jb,id_red,i_step)=gradk_rho(ib,jb,id_red,i_step)+ & + & -cI*M_p_kmq(ibp,ib,jbp,jb)*dG(ibp,jbp,ikpq) & + & +cI*M_m_kpq(ibp,ib,jbp,jb)*dG(ibp,jbp,ikmq) & + & -cI*q*M_p_kmq(ibp,ib,jbp,jb)*(A1p_kmq(ibp,ib)-A2p_kmq(ibp,ib)) & + & +cI*q*M_m_kpq(ibp,ib,jbp,jb)*(A1m_kpq(ibp,ib)-A2m_kpq(ibp,ib)) + enddo + enddo + enddo + enddo + ! + ! todo: rotate in cartesian coordinates + ! + enddo ! istep + enddo ! id_red + ! + ! + ! Length gauge + !=============== + E_vec_pot=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units + ! + do i_dir=1,3 + H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,i_dir)*E_vec_pot(i_dir) + enddo + ! +end subroutine RT_grad_k_rho + \ No newline at end of file From e6f22d2c3fa8b5b6f3443ff7f3ee3a45c3043f88 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Jan 2025 14:16:48 +0100 Subject: [PATCH 0868/1367] Version 5.3.0, Revision 24173, Hash 905729bc76 MODIFIED * configure include/version/version.m4 real_time_hamiltonian/RT_Hamiltonian.F Changes: - [yambo_rt] Call to RT_gradk_rho_times_E commented Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 3465778375..4a6036577c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24173 h.258a0a84cb. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24174 h.905729bc76. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24173 h.258a0a84cb' -PACKAGE_STRING='Yambo 5.3.0 r.24173 h.258a0a84cb' +PACKAGE_VERSION='5.3.0 r.24174 h.905729bc76' +PACKAGE_STRING='Yambo 5.3.0 r.24174 h.905729bc76' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24173 h.258a0a84cb to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24174 h.905729bc76 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24173 h.258a0a84cb:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24174 h.905729bc76:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24173 h.258a0a84cb +Yambo configure 5.3.0 r.24174 h.905729bc76 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24173 h.258a0a84cb, which was +It was created by Yambo $as_me 5.3.0 r.24174 h.905729bc76, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24173" -SHASH="258a0a84cb" +SREVISION="24174" +SHASH="905729bc76" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24173 h.258a0a84cb, which was +This file was extended by Yambo $as_me 5.3.0 r.24174 h.905729bc76, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24173 h.258a0a84cb +Yambo config.status 5.3.0 r.24174 h.905729bc76 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index ad746ef429..bcb3dd7d34 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24173 h.258a0a84cb, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24174 h.905729bc76, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24173" -SHASH="258a0a84cb" +SREVISION="24174" +SHASH="905729bc76" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 0ceeb71a64..31a713b79a 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -196,7 +196,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) - call RT_grad_k_rho(ik,1,H_nl_sc) + !call RT_grad_k_rho(ik,1,H_nl_sc) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) From b9857ed3d90bca09abe555b541e11068f254dcf5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 29 Jan 2025 20:44:03 +0100 Subject: [PATCH 0869/1367] Version 5.3.0, Revision 23986, Hash 28dedce5a2 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_driver.F dipoles/DIPOLE_overlaps.F interface/INIT_load.F io/variables_Overlaps.F modules/mod_wave_func.F Changes: - [yambo] Few improvements to handling of overlaps Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_driver.F | 2 ++ src/dipoles/DIPOLE_overlaps.F | 23 +++++++++++++++-------- src/interface/INIT_load.F | 4 +++- src/io/variables_Overlaps.F | 12 ++---------- src/modules/mod_wave_func.F | 3 ++- 7 files changed, 38 insertions(+), 34 deletions(-) diff --git a/configure b/configure index 3dd569fe05..27f9ec5265 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23986 h.105f9ba74d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23987 h.28dedce5a2. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23986 h.105f9ba74d' -PACKAGE_STRING='Yambo 5.3.0 r.23986 h.105f9ba74d' +PACKAGE_VERSION='5.3.0 r.23987 h.28dedce5a2' +PACKAGE_STRING='Yambo 5.3.0 r.23987 h.28dedce5a2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23986 h.105f9ba74d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23987 h.28dedce5a2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23986 h.105f9ba74d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23987 h.28dedce5a2:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23986 h.105f9ba74d +Yambo configure 5.3.0 r.23987 h.28dedce5a2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23986 h.105f9ba74d, which was +It was created by Yambo $as_me 5.3.0 r.23987 h.28dedce5a2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23986" -SHASH="105f9ba74d" +SREVISION="23987" +SHASH="28dedce5a2" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23986 h.105f9ba74d, which was +This file was extended by Yambo $as_me 5.3.0 r.23987 h.28dedce5a2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23986 h.105f9ba74d +Yambo config.status 5.3.0 r.23987 h.28dedce5a2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index e26d55efb3..01cf5adeed 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23986 h.105f9ba74d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23987 h.28dedce5a2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23986" -SHASH="105f9ba74d" +SREVISION="23987" +SHASH="28dedce5a2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index f5fd188879..346f35f0a7 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -140,6 +140,8 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! call DIPOLE_IO(Xk,Xen,Dip,'write',io_err,'DIP') ! + if (io_err_Overlaps/=0) call OVERLAPS_IO(Xk,Xen,Dip,'write',io_err_Overlaps,'DIP') + ! ! I/O privilegies: RESTORE to previous values ! call IO_and_Messaging_switch("RESTORE") diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index a274d722a6..f5da6b1d82 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -16,7 +16,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) use pars, ONLY:SP,cZERO,pi use LIVE_t, ONLY:live_timing use R_lattice, ONLY:k_map,bz_samp,WF_shifts,G_m_G - use wave_func, ONLY:WF + use wave_func, ONLY:WF,WF_load_mode use vec_operate, ONLY:k_periodic_idx use DIPOLES, ONLY:DIPOLE_t,DIP_S use ALLOC, ONLY:DIPOLE_ALLOC_elemental @@ -85,6 +85,9 @@ subroutine DIPOLE_overlaps(Xk,Dip) call PARALLEL_WF_distribute(K_index=PAR_IND_OVLPk_ibz,CLEAN_UP=.TRUE.) ! call PARALLEL_WF_index( ) + ! + if (trim(WF_load_mode)=="all") call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/1,Xk%nibz/),space='G',title='-Overlaps') + ! YAMBO_ALLOC_GPU(WF_symm, (wf_ng_1st_BZ,n_spinor,1)) YAMBO_ALLOC_GPU(WF_ikp, (wf_ng_overlaps,n_spinor,1)) @@ -107,8 +110,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) ! - call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ik,ik/),(/i_sp_pol,i_sp_pol/),& - & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + if (trim(WF_load_mode)=="on-the-fly") then + call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ik,ik/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + endif ! do ib=1,Dip%ib(2) ! @@ -122,7 +127,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! enddo ! - call WF_free(WF) + if (trim(WF_load_mode)=="on-the-fly") call WF_free(WF) ! do id=1,3 ! Loop on the three crystal directions in the BZ ! @@ -146,8 +151,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) ikp = Xk%sstar(ikbzp,1) isp = Xk%sstar(ikbzp,2) ! - call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ikp,ikp/),(/i_sp_pol,i_sp_pol/),& - & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + if (trim(WF_load_mode)=="on-the-fly") then + call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ikp,ikp/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + endif ! ! Shift the wave-function by a G-vector if the neighbor is out of the BZ (USE_shifed_wf=.true.) shift=WF_shifts(ikbzp,:) @@ -170,7 +177,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) enddo ! ibp enddo ! ib ! - call WF_free(WF) + if (trim(WF_load_mode)=="on-the-fly") call WF_free(WF) ! enddo ! istep enddo ! idir @@ -204,7 +211,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) YAMBO_FREE(WF_ik) YAMBO_FREE(WF_ikp) ! - call WF_free(WF) + if (trim(WF_load_mode)=="all") call WF_free(WF) ! call timing("DIPOLE_overlaps",OPR="stop") ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 077e402cff..623c3e1310 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -27,7 +27,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & QP_G_er,QP_G_ir,QP_G_dr,QP_Sc_steps,QP_G_solver,& & QP_dSc_delta,QP_G_Zoom_treshold,GF_energy_range_mode use LIVE_t, ONLY:nhash - use wave_func, ONLY:wf_ng + use wave_func, ONLY:wf_ng,WF_load_mode use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& & bz_samp,RIM_ng,RIM_epsm1,RIM_id_epsm1_reference,& @@ -232,6 +232,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'DBsFRAGpm', & & '[IO] Space-separated list of +DB to FRAG and -DB to NOT FRAG. DB=(DIP,X,W,HF,COLLS,K,BS,QINDX,RT,ELPH,SC,ALL)',& & DBs_FRAG_control_string,verb_level=V_io) + call it(defs,"WF_load_mode",'[WF-IO] Default distribution mode ("all"/"on-the-fly")',& +& WF_load_mode,verb_level=V_io) ! ! S_xc ! diff --git a/src/io/variables_Overlaps.F b/src/io/variables_Overlaps.F index 6b3d4b86ef..6cb6574bd1 100644 --- a/src/io/variables_Overlaps.F +++ b/src/io/variables_Overlaps.F @@ -23,16 +23,8 @@ integer function variables_Overlaps(Dip,ID) ! call IO_desc_reset(DIP_desc) ! - call def_variable_elemental(ID,"Bands",2,IP_YIO,0) - call io_variable_elemental(ID,DB_I1=Dip%db_ib,VAR="DIP band range",I1=Dip%ib,CHECK=.true.,OP=(/">=","<="/),& -& DESCRIPTOR=DIP_desc) - ! - call def_variable_elemental(ID,"Bands_limits",2,IP_YIO,0) - call io_variable_elemental(ID,DB_I1=Dip%db_ib_lim,VAR="DIP band range limits",I1=Dip%ib_lim,CHECK=.true.,OP=(/"<=",">="/),& -& DESCRIPTOR=DIP_desc) - ! - call def_variable_elemental(ID,"Bands_ordered",1,LP_YIO,0) - call io_variable_elemental(ID,VAR="Bands ordered",L0=Dip%bands_ordered,CHECK=.true.,OP=(/">="/),& + call def_variable_elemental(ID,"Bands",1,IP_YIO,0) + call io_variable_elemental(ID,DB_I0=Dip%db_ib(2),VAR="DIP nbands",I0=Dip%ib(2),CHECK=.true.,OP=(/"<="/),& & DESCRIPTOR=DIP_desc) ! call def_variable_elemental(ID,"NG",1,IP_YIO,0) diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index d7eca59c88..cf15f5a686 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -7,7 +7,7 @@ ! module wave_func ! - use pars, ONLY:SP + use pars, ONLY:SP,schlen use devxlib, ONLY:devxlib_mapped use gpu_m, ONLY:have_gpu ! @@ -39,6 +39,7 @@ module wave_func ! Real components ? ! logical :: real_wavefunctions + character(schlen) :: WF_load_mode="all" ! "all"/"on-the-fly"/"on-the-fly-kq" ! ! Bands block size ! From f6030c2440771cd1b561150905da9892d37786a2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 27 Jan 2025 22:43:14 +0100 Subject: [PATCH 0870/1367] Version 5.3.0, Revision 23907, Hash 67fc9469a MODIFIED * configure include/version/version.m4 coulomb/cutoff_slab.F Bugs: -Call to undefined variable and removed unused variables Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/coulomb/cutoff_slab.F | 9 --------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 27f9ec5265..a49767abb6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23987 h.28dedce5a2. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23908 h.67fc9469a. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23987 h.28dedce5a2' -PACKAGE_STRING='Yambo 5.3.0 r.23987 h.28dedce5a2' +PACKAGE_VERSION='5.3.0 r.23908 h.67fc9469a' +PACKAGE_STRING='Yambo 5.3.0 r.23908 h.67fc9469a' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23987 h.28dedce5a2 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23908 h.67fc9469a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23987 h.28dedce5a2:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23908 h.67fc9469a:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23987 h.28dedce5a2 +Yambo configure 5.3.0 r.23908 h.67fc9469a generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23987 h.28dedce5a2, which was +It was created by Yambo $as_me 5.3.0 r.23908 h.67fc9469a, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23987" -SHASH="28dedce5a2" +SREVISION="23908" +SHASH="67fc9469a" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23987 h.28dedce5a2, which was +This file was extended by Yambo $as_me 5.3.0 r.23908 h.67fc9469a, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23987 h.28dedce5a2 +Yambo config.status 5.3.0 r.23908 h.67fc9469a configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 01cf5adeed..9bdfc6d494 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23987 h.28dedce5a2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23908 h.67fc9469a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23987" -SHASH="28dedce5a2" +SREVISION="23908" +SHASH="67fc9469a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/coulomb/cutoff_slab.F b/src/coulomb/cutoff_slab.F index 84adb1dce9..fffe39d101 100644 --- a/src/coulomb/cutoff_slab.F +++ b/src/coulomb/cutoff_slab.F @@ -13,8 +13,6 @@ subroutine cutoff_slab(q) use D_lattice, ONLY:alat use R_lattice, ONLY:bz_samp,g_vec,bare_qpg,& & d3q_factor,RIM_qpg,q0_def_norm,idir - use parallel_m, ONLY:PP_indexes,PP_indexes_reset - use parallel_int, ONLY:PARALLEL_index implicit none ! ! Work Space @@ -22,12 +20,8 @@ subroutine cutoff_slab(q) type(bz_samp) :: q integer :: iq,ig,n_idx,n_max real(SP) :: slab_vz,slab_vplane,lcut,pre_factor,R_circle,Sup,factorial - type(PP_indexes) ::px - character(schlen) :: of_name lcut=alat(idir(1))/2.0_SP - call PP_indexes_reset(px) - call PARALLEL_index(px,(/q%nibz,wf_ng/)) ! do ig=1,wf_ng do iq=1,q%nibz @@ -67,7 +61,4 @@ subroutine cutoff_slab(q) ! endif ! - call of_open_close(of_name) - call PP_indexes_reset(px) - ! end subroutine From 1605852857a8a36188bdb6bbf6f7b034d7da17ac Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 13 Jan 2025 17:17:49 +0100 Subject: [PATCH 0871/1367] Version 5.3.0, Revision 23900, Hash e51825f30d MODIFIED * config/m4/netcdf_f90.m4 configure include/version/version.m4 Changes: - [yambo] Tentative fix for issue detected in https://github.com/yambo-code/yambo/issues/168 with netcdf detection Patch sent by: Davide Sangalli --- configure | 26 +++++++++++++------------- include/version/version.m4 | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index a49767abb6..71b154c982 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23908 h.67fc9469a. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23900 h.e51825f30d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23908 h.67fc9469a' -PACKAGE_STRING='Yambo 5.3.0 r.23908 h.67fc9469a' +PACKAGE_VERSION='5.3.0 r.23900 h.e51825f30d' +PACKAGE_STRING='Yambo 5.3.0 r.23900 h.e51825f30d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23908 h.67fc9469a to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23900 h.e51825f30d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23908 h.67fc9469a:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23900 h.e51825f30d:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23908 h.67fc9469a +Yambo configure 5.3.0 r.23900 h.e51825f30d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23908 h.67fc9469a, which was +It was created by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23908" -SHASH="67fc9469a" +SREVISION="23900" +SHASH="e51825f30d" @@ -14555,9 +14555,9 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu fi # try_NETCDF_LIBS="-L$try_netcdf_libdir -lnetcdf" ; - if test -r $try_netcdff_libdir/libnetcdff.a ; then + if test -r $try_netcdff_libdir/libnetcdff.a || test -r $try_netcdff_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdff_libdir -lnetcdff" ; - elif test -r $try_netcdf_libdir/libnetcdff.a ; then + elif test -r $try_netcdf_libdir/libnetcdff.a || test -r $try_netcdf_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdf_libdir -lnetcdff" ; fi # @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23908 h.67fc9469a, which was +This file was extended by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23908 h.67fc9469a +Yambo config.status 5.3.0 r.23900 h.e51825f30d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9bdfc6d494..dc93105999 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23908 h.67fc9469a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23900 h.e51825f30d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23908" -SHASH="67fc9469a" +SREVISION="23900" +SHASH="e51825f30d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 3d1bde9000ce8d3923867e1a2649fe069b977703 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Jan 2025 13:49:02 +0100 Subject: [PATCH 0872/1367] Version 5.3.0, Revision 23910, Hash b941ec6503 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_setup.F Bugs: - [yambo_rt] Fixed issue #179 Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_setup.F | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 71b154c982..72b57951fe 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23900 h.e51825f30d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23910 h.b941ec6503. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23900 h.e51825f30d' -PACKAGE_STRING='Yambo 5.3.0 r.23900 h.e51825f30d' +PACKAGE_VERSION='5.3.0 r.23910 h.b941ec6503' +PACKAGE_STRING='Yambo 5.3.0 r.23910 h.b941ec6503' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23900 h.e51825f30d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23910 h.b941ec6503 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23900 h.e51825f30d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23910 h.b941ec6503:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23900 h.e51825f30d +Yambo configure 5.3.0 r.23910 h.b941ec6503 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was +It was created by Yambo $as_me 5.3.0 r.23910 h.b941ec6503, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23900" -SHASH="e51825f30d" +SREVISION="23910" +SHASH="b941ec6503" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was +This file was extended by Yambo $as_me 5.3.0 r.23910 h.b941ec6503, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23900 h.e51825f30d +Yambo config.status 5.3.0 r.23910 h.b941ec6503 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index dc93105999..675082fe9b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23900 h.e51825f30d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23910 h.b941ec6503, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23900" -SHASH="e51825f30d" +SREVISION="23910" +SHASH="b941ec6503" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 7a11276e93..5b65a67c4d 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -133,12 +133,12 @@ subroutine DIPOLE_setup(Dip) endif ! ...M_spin, M_orb, M_iti, M_orb_CD if (n_spin>1) then + if (STRING_match(Dip%computed,"spin").or.l_BS_magnons) specific_obs=" M_spin" + if (STRING_match(Dip%computed,"orb")) specific_obs=trim(specific_obs)//" M_orb M_it" #if defined _RT + ! Always force all dipoles in real-time case if (l_real_time) specific_obs=" M_spin M_orb M_it" -#else - if (STRING_match(Dip%computed,"orb")) specific_obs=trim(specific_obs)//" M_orb M_it" #endif - if (STRING_match(Dip%computed,"spin").or.l_BS_magnons) specific_obs=" M_spin" endif if (l_BS_dichroism) specific_obs=trim(specific_obs)//" M_CD_orb" ! From 0c5189430e6ea5af6ef6cd4a6fff963422c9018f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 28 Jan 2025 13:50:26 +0100 Subject: [PATCH 0873/1367] Version 5.3.0, Revision 23911, Hash d22bb73a52 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_setup.F Bugs: - Fixed specific obs initialization Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_setup.F | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 72b57951fe..dd1bdb8053 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23910 h.b941ec6503. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23911 h.d22bb73a52. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23910 h.b941ec6503' -PACKAGE_STRING='Yambo 5.3.0 r.23910 h.b941ec6503' +PACKAGE_VERSION='5.3.0 r.23911 h.d22bb73a52' +PACKAGE_STRING='Yambo 5.3.0 r.23911 h.d22bb73a52' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23910 h.b941ec6503 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23911 h.d22bb73a52 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23910 h.b941ec6503:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23911 h.d22bb73a52:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23910 h.b941ec6503 +Yambo configure 5.3.0 r.23911 h.d22bb73a52 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23910 h.b941ec6503, which was +It was created by Yambo $as_me 5.3.0 r.23911 h.d22bb73a52, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23910" -SHASH="b941ec6503" +SREVISION="23911" +SHASH="d22bb73a52" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23910 h.b941ec6503, which was +This file was extended by Yambo $as_me 5.3.0 r.23911 h.d22bb73a52, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23910 h.b941ec6503 +Yambo config.status 5.3.0 r.23911 h.d22bb73a52 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 675082fe9b..50defb1785 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23910 h.b941ec6503, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23911 h.d22bb73a52, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23910" -SHASH="b941ec6503" +SREVISION="23911" +SHASH="d22bb73a52" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 5b65a67c4d..c11886dc99 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -132,6 +132,7 @@ subroutine DIPOLE_setup(Dip) #endif endif ! ...M_spin, M_orb, M_iti, M_orb_CD + specific_obs="" if (n_spin>1) then if (STRING_match(Dip%computed,"spin").or.l_BS_magnons) specific_obs=" M_spin" if (STRING_match(Dip%computed,"orb")) specific_obs=trim(specific_obs)//" M_orb M_it" From 396cf52e4cfe7373e777fa7d8174912ce3f222b9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 Jan 2025 16:51:17 +0100 Subject: [PATCH 0874/1367] Version 5.3.0, Revision 23939, Hash 2d982002ae MODIFIED * configure include/version/version.m4 dipoles/Berry_polarization_EQ.F dipoles/DIPOLE_covariant.F hamiltonian/Build_W_operator.F nloptics/NL_Berry_current.F nloptics/NL_current.F Bugs: - List of changes propsed in https://github.com/yambo-code/yambo/issues/172 Branch created after quick discussion with Claudio and Myrta Patch sent by: Davide Sangalli --- configure | 26 +++++++++++++------------- include/version/version.m4 | 6 +++--- src/dipoles/Berry_polarization_EQ.F | 2 +- src/dipoles/DIPOLE_covariant.F | 2 +- src/hamiltonian/Build_W_operator.F | 2 +- src/nloptics/NL_Berry_current.F | 2 +- src/nloptics/NL_current.F | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/configure b/configure index dd1bdb8053..f24019b20b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23911 h.d22bb73a52. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23939 h.2d982002ae. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23911 h.d22bb73a52' -PACKAGE_STRING='Yambo 5.3.0 r.23911 h.d22bb73a52' +PACKAGE_VERSION='5.3.0 r.23939 h.2d982002ae' +PACKAGE_STRING='Yambo 5.3.0 r.23939 h.2d982002ae' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23911 h.d22bb73a52 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23939 h.2d982002ae to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23911 h.d22bb73a52:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23939 h.2d982002ae:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23911 h.d22bb73a52 +Yambo configure 5.3.0 r.23939 h.2d982002ae generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23911 h.d22bb73a52, which was +It was created by Yambo $as_me 5.3.0 r.23939 h.2d982002ae, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23911" -SHASH="d22bb73a52" +SREVISION="23939" +SHASH="2d982002ae" @@ -14555,9 +14555,9 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu fi # try_NETCDF_LIBS="-L$try_netcdf_libdir -lnetcdf" ; - if test -r $try_netcdff_libdir/libnetcdff.a || test -r $try_netcdff_libdir/libnetcdff.so ; then + if test -r $try_netcdff_libdir/libnetcdff.a ; then try_NETCDFF_LIBS="-L$try_netcdff_libdir -lnetcdff" ; - elif test -r $try_netcdf_libdir/libnetcdff.a || test -r $try_netcdf_libdir/libnetcdff.so ; then + elif test -r $try_netcdf_libdir/libnetcdff.a ; then try_NETCDFF_LIBS="-L$try_netcdf_libdir -lnetcdff" ; fi # @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23911 h.d22bb73a52, which was +This file was extended by Yambo $as_me 5.3.0 r.23939 h.2d982002ae, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23911 h.d22bb73a52 +Yambo config.status 5.3.0 r.23939 h.2d982002ae configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 50defb1785..b56cde571e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23911 h.d22bb73a52, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23939 h.2d982002ae, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23911" -SHASH="d22bb73a52" +SREVISION="23939" +SHASH="2d982002ae" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index d2149ee9fe..cd1ad3fe82 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -76,7 +76,7 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) enddo enddo ! - P_Berry_RED(id_in)=-P_Berry_RED(id_in)/real(Nperpend,SP) + P_Berry_RED(id_in)=P_Berry_RED(id_in)/real(Nperpend,SP) ! enddo ! diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index 2d2c4b7487..f69f3bb84a 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -152,7 +152,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle do idir=1,3 - DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))/cI + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))*cI enddo enddo enddo diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 037f8bade1..0f5919c33c 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -133,7 +133,7 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) !$omp parallel do default(shared), private(i1,id) do i1=H_ref_bands(1),H_ref_bands(2) do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))- & + H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) enddo enddo diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index fe59c94178..2c871955e6 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -118,7 +118,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! !$omp parallel do default(shared), private(i1) do id=1,3 - NL_J(id)=-sum(NL_J_red(:)*a(:,id))/(4.0*pi) + NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0*pi) enddo !$omp end parallel do ! diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index 917539d684..ef7a33c2da 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -41,12 +41,12 @@ subroutine NL_current(k,E,V_input,NL_J) ! ! A : Current ! - call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & & V_bands=V_input,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! ! DEBUG < ! Calculate current using density matrix - ! call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + ! call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & ! & dG=dG,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! DEBUG > ! From 0e0126c31922c8c7069c99177291d5b32b373550 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 29 Jan 2025 20:55:38 +0100 Subject: [PATCH 0875/1367] Version 5.3.0, Revision 23992, Hash 396cf52e4c MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_build_der_k.F Changes: - Fixed cI factor also in derk dipoles. See issue #172 Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_build_der_k.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f24019b20b..1885568cda 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23939 h.2d982002ae. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23992 h.396cf52e4c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23939 h.2d982002ae' -PACKAGE_STRING='Yambo 5.3.0 r.23939 h.2d982002ae' +PACKAGE_VERSION='5.3.0 r.23992 h.396cf52e4c' +PACKAGE_STRING='Yambo 5.3.0 r.23992 h.396cf52e4c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23939 h.2d982002ae to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23992 h.396cf52e4c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23939 h.2d982002ae:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23992 h.396cf52e4c:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23939 h.2d982002ae +Yambo configure 5.3.0 r.23992 h.396cf52e4c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23939 h.2d982002ae, which was +It was created by Yambo $as_me 5.3.0 r.23992 h.396cf52e4c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23939" -SHASH="2d982002ae" +SREVISION="23992" +SHASH="396cf52e4c" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23939 h.2d982002ae, which was +This file was extended by Yambo $as_me 5.3.0 r.23992 h.396cf52e4c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23939 h.2d982002ae +Yambo config.status 5.3.0 r.23992 h.396cf52e4c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index b56cde571e..6c76953afc 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23939 h.2d982002ae, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23992 h.396cf52e4c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23939" -SHASH="2d982002ae" +SREVISION="23992" +SHASH="396cf52e4c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index e726053591..ee49db770c 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -234,7 +234,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle do idir=1,3 - DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(Der_k_cart(ic,iv,idir)+conjg(Der_k_cart(iv,ic,idir)))/cI + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(Der_k_cart(ic,iv,idir)+conjg(Der_k_cart(iv,ic,idir)))*cI enddo enddo enddo From f4a6ceb0e6de453f09d40560b2cf7e74529c1524 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 29 Jan 2025 21:04:59 +0100 Subject: [PATCH 0876/1367] Version 5.3.0, Revision 24001, Hash 676c6e2c8a MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_driver.F Bugs: - OVERLAPS_IO called only if eval_Overlaps is true Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_driver.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 1885568cda..e689744784 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23992 h.396cf52e4c. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24001 h.676c6e2c8a. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23992 h.396cf52e4c' -PACKAGE_STRING='Yambo 5.3.0 r.23992 h.396cf52e4c' +PACKAGE_VERSION='5.3.0 r.24001 h.676c6e2c8a' +PACKAGE_STRING='Yambo 5.3.0 r.24001 h.676c6e2c8a' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23992 h.396cf52e4c to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24001 h.676c6e2c8a to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23992 h.396cf52e4c:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24001 h.676c6e2c8a:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23992 h.396cf52e4c +Yambo configure 5.3.0 r.24001 h.676c6e2c8a generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23992 h.396cf52e4c, which was +It was created by Yambo $as_me 5.3.0 r.24001 h.676c6e2c8a, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23992" -SHASH="396cf52e4c" +SREVISION="24001" +SHASH="676c6e2c8a" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23992 h.396cf52e4c, which was +This file was extended by Yambo $as_me 5.3.0 r.24001 h.676c6e2c8a, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23992 h.396cf52e4c +Yambo config.status 5.3.0 r.24001 h.676c6e2c8a configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 6c76953afc..20f9ca70d8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23992 h.396cf52e4c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24001 h.676c6e2c8a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23992" -SHASH="396cf52e4c" +SREVISION="24001" +SHASH="676c6e2c8a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index 346f35f0a7..9ce79143dc 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -140,7 +140,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! call DIPOLE_IO(Xk,Xen,Dip,'write',io_err,'DIP') ! - if (io_err_Overlaps/=0) call OVERLAPS_IO(Xk,Xen,Dip,'write',io_err_Overlaps,'DIP') + if (eval_Overlaps.and.io_err_Overlaps/=0) call OVERLAPS_IO(Xk,Xen,Dip,'write',io_err_Overlaps,'DIP') ! ! I/O privilegies: RESTORE to previous values ! From f73893ac256e5c43cb64d18d7522e680651175e1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 30 Jan 2025 10:51:50 +0100 Subject: [PATCH 0877/1367] Version 5.3.0, Revision 24241, Hash c5ef11a98b MODIFIED * configure include/version/version.m4 Changes: - configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 49 ++++++++++++++++++++++++++++---------- include/version/version.m4 | 6 ++--- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/configure b/configure index f24019b20b..8c75131d81 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23939 h.2d982002ae. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24241 h.c5ef11a98b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23939 h.2d982002ae' -PACKAGE_STRING='Yambo 5.3.0 r.23939 h.2d982002ae' +PACKAGE_VERSION='5.3.0 r.24241 h.c5ef11a98b' +PACKAGE_STRING='Yambo 5.3.0 r.24241 h.c5ef11a98b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -719,6 +719,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check with_devxlib_branch DEVXLIB_info @@ -923,6 +924,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -982,6 +985,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1659,7 +1663,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23939 h.2d982002ae to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24241 h.c5ef11a98b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1729,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23939 h.2d982002ae:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24241 h.c5ef11a98b:";; esac cat <<\_ACEOF @@ -1738,6 +1742,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1967,7 +1972,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23939 h.2d982002ae +Yambo configure 5.3.0 r.24241 h.c5ef11a98b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2601,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23939 h.2d982002ae, which was +It was created by Yambo $as_me 5.3.0 r.24241 h.c5ef11a98b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3359,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23939" -SHASH="2d982002ae" +SREVISION="24241" +SHASH="c5ef11a98b" @@ -3507,6 +3512,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -14555,9 +14574,9 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu fi # try_NETCDF_LIBS="-L$try_netcdf_libdir -lnetcdf" ; - if test -r $try_netcdff_libdir/libnetcdff.a ; then + if test -r $try_netcdff_libdir/libnetcdff.a || test -r $try_netcdff_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdff_libdir -lnetcdff" ; - elif test -r $try_netcdf_libdir/libnetcdff.a ; then + elif test -r $try_netcdf_libdir/libnetcdff.a || test -r $try_netcdf_libdir/libnetcdff.so ; then try_NETCDFF_LIBS="-L$try_netcdf_libdir -lnetcdff" ; fi # @@ -16615,6 +16634,9 @@ LIBS="$acx_devxlib_save_LIBS" DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16803,6 +16825,7 @@ fi + # @@ -17784,7 +17807,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23939 h.2d982002ae, which was +This file was extended by Yambo $as_me 5.3.0 r.24241 h.c5ef11a98b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17871,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23939 h.2d982002ae +Yambo config.status 5.3.0 r.24241 h.c5ef11a98b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index b56cde571e..28ed8c21f5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23939 h.2d982002ae, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24241 h.c5ef11a98b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23939" -SHASH="2d982002ae" +SREVISION="24241" +SHASH="c5ef11a98b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From c056e6eb192d49459f778fff36943a6537699b9e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Feb 2025 17:58:03 +0100 Subject: [PATCH 0878/1367] Version 5.3.0, Revision 24483, Hash 944f672fd5 MODIFIED * configure include/version/version.m4 ypp/interface/INIT_ypp.F Bugs: - Fixed compilation of ypp_ph Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- ypp/interface/INIT_ypp.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 151a9ca1da..56036c3d2b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24468 h.e10598382b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24483 h.944f672fd5. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24468 h.e10598382b' -PACKAGE_STRING='Yambo 5.3.0 r.24468 h.e10598382b' +PACKAGE_VERSION='5.3.0 r.24483 h.944f672fd5' +PACKAGE_STRING='Yambo 5.3.0 r.24483 h.944f672fd5' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24468 h.e10598382b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24483 h.944f672fd5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24468 h.e10598382b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24483 h.944f672fd5:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24468 h.e10598382b +Yambo configure 5.3.0 r.24483 h.944f672fd5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24468 h.e10598382b, which was +It was created by Yambo $as_me 5.3.0 r.24483 h.944f672fd5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24468" -SHASH="e10598382b" +SREVISION="24483" +SHASH="944f672fd5" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24468 h.e10598382b, which was +This file was extended by Yambo $as_me 5.3.0 r.24483 h.944f672fd5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24468 h.e10598382b +Yambo config.status 5.3.0 r.24483 h.944f672fd5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 194e4c1586..5417c6fe92 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24468 h.e10598382b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24483 h.944f672fd5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24468" -SHASH="e10598382b" +SREVISION="24483" +SHASH="944f672fd5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 0c9d253de1..31081036e7 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -51,7 +51,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif #if defined _YPP_ELPH use YPP_ELPH, ONLY:l_phonons,l_atomic_amplitude,l_eliashberg,l_gkkp,l_gkkp_db,l_gkkp_dg,l_gkkp_plot,& -& l_ph_ass_dos,l_phonons +& l_gkkp_sngl,l_ph_ass_dos,l_phonons #endif #if defined _YAML_OUTPUT use pars, ONLY:logfile_index,repfile_index From 4b44d9961ffa61f9261ecd4eff50785e1f06d5d2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 10 Feb 2025 21:58:27 +0100 Subject: [PATCH 0879/1367] Version 5.3.0, Revision 24484, Hash c056e6eb19 MODIFIED * configure include/version/version.m4 a2y/a2y_gkkp.F ypp/el-ph/ELPH_sngl_db.F Bugs: - Fixed use ELPH_alloc Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- interfaces/a2y/a2y_gkkp.F | 2 +- ypp/el-ph/ELPH_sngl_db.F | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 56036c3d2b..0a425d52f0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24483 h.944f672fd5. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24484 h.c056e6eb19. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24483 h.944f672fd5' -PACKAGE_STRING='Yambo 5.3.0 r.24483 h.944f672fd5' +PACKAGE_VERSION='5.3.0 r.24484 h.c056e6eb19' +PACKAGE_STRING='Yambo 5.3.0 r.24484 h.c056e6eb19' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24483 h.944f672fd5 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24484 h.c056e6eb19 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24483 h.944f672fd5:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24484 h.c056e6eb19:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24483 h.944f672fd5 +Yambo configure 5.3.0 r.24484 h.c056e6eb19 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24483 h.944f672fd5, which was +It was created by Yambo $as_me 5.3.0 r.24484 h.c056e6eb19, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24483" -SHASH="944f672fd5" +SREVISION="24484" +SHASH="c056e6eb19" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24483 h.944f672fd5, which was +This file was extended by Yambo $as_me 5.3.0 r.24484 h.c056e6eb19, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24483 h.944f672fd5 +Yambo config.status 5.3.0 r.24484 h.c056e6eb19 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5417c6fe92..8ff9597fa4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24483 h.944f672fd5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24484 h.c056e6eb19, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24483" -SHASH="944f672fd5" +SREVISION="24484" +SHASH="c056e6eb19" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index 3a9e3c837a..fe74404c2d 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -28,7 +28,7 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) use pars, ONLY:DP,SP,cZERO use stderr, ONLY:intc use com, ONLY:msg - use ELPH_intfcs, ONLY:ELPH_alloc + use ALLOC, ONLY:ELPH_alloc use R_lattice, ONLY:nkibz,nkbz,nqibz,nqbz,k_pt,k_sstar,q_pt,q_sstar use D_lattice, ONLY:n_atoms use ELPH, ONLY:ph_modes,elph_nb,elph_bands,l_GKKP_hosts_bare_dV,l_GKKP_hosts_DW,& diff --git a/ypp/el-ph/ELPH_sngl_db.F b/ypp/el-ph/ELPH_sngl_db.F index 37b32b95a7..56e79d4268 100644 --- a/ypp/el-ph/ELPH_sngl_db.F +++ b/ypp/el-ph/ELPH_sngl_db.F @@ -26,7 +26,7 @@ subroutine ELPH_sngl_db(k,E,q) use units, ONLY:HA2EV use pars, ONLY:schlen,SP use stderr, ONLY:intc - use ELPH_intfcs, ONLY:ELPH_alloc + use ALLOC, ONLY:ELPH_alloc use ELPH, ONLY:GKKP,elph_nb,ph_modes,elph_nQ,elph_nk_bz use YPP_ELPH, ONLY:ELPH_DB_alloc,ELPH_DB_free,DB_PH_kpt,DB_nq,DB_q_map,DB_PH_qpt,& & DB_ph_modes,DB_nb,DB_nq From e4c9b888f3d53a4d1ba23fdef94635aab454696a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Feb 2025 13:40:10 +0100 Subject: [PATCH 0880/1367] Version 5.3.0, Revision 24265, Hash 5cb1e20990 MODIFIED * configure include/version/version.m4 interface/INIT_load.F real_time_hamiltonian/RT_Hamiltonian.F Bugs: - Fixed long line in compilation Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_load.F | 3 ++- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 5f9de18e25..9981968f8a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24174 h.e6f22d2c3f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24265 h.5cb1e20990. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24174 h.e6f22d2c3f' -PACKAGE_STRING='Yambo 5.3.0 r.24174 h.e6f22d2c3f' +PACKAGE_VERSION='5.3.0 r.24265 h.5cb1e20990' +PACKAGE_STRING='Yambo 5.3.0 r.24265 h.5cb1e20990' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24174 h.e6f22d2c3f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24265 h.5cb1e20990 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24174 h.e6f22d2c3f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24265 h.5cb1e20990:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24174 h.e6f22d2c3f +Yambo configure 5.3.0 r.24265 h.5cb1e20990 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24174 h.e6f22d2c3f, which was +It was created by Yambo $as_me 5.3.0 r.24265 h.5cb1e20990, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24174" -SHASH="e6f22d2c3f" +SREVISION="24265" +SHASH="5cb1e20990" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24174 h.e6f22d2c3f, which was +This file was extended by Yambo $as_me 5.3.0 r.24265 h.5cb1e20990, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24174 h.e6f22d2c3f +Yambo config.status 5.3.0 r.24265 h.5cb1e20990 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9bee7af178..d853b7e1ed 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24174 h.e6f22d2c3f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24265 h.5cb1e20990, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24174" -SHASH="e6f22d2c3f" +SREVISION="24265" +SHASH="5cb1e20990" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 55dcf14743..13e1784a2e 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -713,7 +713,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'COLLBands', '[COLL] Bands for the collisions',COLL_bands) ! call it(defs,'HXC_Potential', '[SC] SC HXC Potential',H_potential,protect=.FALSE.,case="A") - call it(defs,'COLLCut', '[SC,RT] Cutoff on the collisions, 0=full 1=none (default =0.0005)',COLLISIONS_cutoff,verb_level=V_sc) + call it(defs,'COLLCut', '[SC,RT] Cutoff on the collisions, 0=full 1=none (default =0.0005)',& + & COLLISIONS_cutoff,verb_level=V_sc) call it('f',defs,'COLLBseMem', '[SC,RT] Minimize memory use in bse kernel conversion',verb_level=V_sc) ! #endif diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 31a713b79a..896a5af400 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -196,7 +196,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) - !call RT_grad_k_rho(ik,1,H_nl_sc) + !call RT_gradk_rho_times_E(ik,1,H_nl_sc) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) From b0eee9bf52ed6df11790feb0b4aafef4a80fb900 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Feb 2025 14:26:18 +0100 Subject: [PATCH 0881/1367] Version 5.3.0, Revision 24008, Hash 899664c326 MODIFIED * configure include/version/version.m4 nloptics/NL_driver.F Bugs: - Fixed OVERLAPS_IO in yambo_nl Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_driver.F | 4 +++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 71ce4d3fed..a86ec0220e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23912 h.12c2985c4f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24008 h.899664c326. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23912 h.12c2985c4f' -PACKAGE_STRING='Yambo 5.3.0 r.23912 h.12c2985c4f' +PACKAGE_VERSION='5.3.0 r.24008 h.899664c326' +PACKAGE_STRING='Yambo 5.3.0 r.24008 h.899664c326' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23912 h.12c2985c4f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24008 h.899664c326 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23912 h.12c2985c4f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24008 h.899664c326:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23912 h.12c2985c4f +Yambo configure 5.3.0 r.24008 h.899664c326 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23912 h.12c2985c4f, which was +It was created by Yambo $as_me 5.3.0 r.24008 h.899664c326, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23912" -SHASH="12c2985c4f" +SREVISION="24008" +SHASH="899664c326" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23912 h.12c2985c4f, which was +This file was extended by Yambo $as_me 5.3.0 r.24008 h.899664c326, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23912 h.12c2985c4f +Yambo config.status 5.3.0 r.24008 h.899664c326 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 83744dba5b..5c42c80861 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23912 h.12c2985c4f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24008 h.899664c326, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23912" -SHASH="12c2985c4f" +SREVISION="24008" +SHASH="899664c326" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index b436c27a98..9371464ece 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -98,7 +98,9 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ======================================== call DIPOLE_dimensions(E,Dip,NL_bands,(/0._SP,0._SP,0._SP/)) call DIPOLE_IO(k,E,Dip,'read ',io_err,'NL') - if(io_err/=0) call error("Error in DIPOLES! ") + if(io_err/=0) call error("Error in Dipoles I/O") + call OVERLAPS_IO(k,E,Dip,'read',io_err,'NL') + if(io_err/=0) call error("Error in Overlaps I/O") ! ! Generate bare_qpg if required !============================= From feb7c9bddbdcc727e1ede4c2d8a05cc82d86e5a6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Feb 2025 23:20:37 +0100 Subject: [PATCH 0882/1367] Version 5.3.0, Revision 24174, Hash e6f22d2c3f MODIFIED * nloptics/NL_initialize.F Changes: - [yambo_nl] Added SaveGHistory option Patch sent by: Davide Sangalli --- src/nloptics/NL_initialize.F | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 49f4bac6c6..55ea5a41ab 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -21,13 +21,14 @@ subroutine NL_initialize(E,k) use QP_m, ONLY:QP_ng_Sc,QP_ng_Sx,QP_ng_Sh use collision_ext, ONLY:ng_oscll,COLLISIONS_cutoff use R_lattice, ONLY:bz_samp,k_map + use IO_m, ONLY:io_GF use X_m, ONLY:global_gauge use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& -& SAVE_Vb_history +& SAVE_Vb_history,SAVE_G_history use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& @@ -63,10 +64,13 @@ subroutine NL_initialize(E,k) call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) call parser('NoComprCOLL', l_no_compress_COLL) call parser('UseDipoles', l_use_DIPOLES) + call parser('SaveGhistory', SAVE_G_history) ! l_velocity_gauge_corr=.false. l_velocity_gauge_diam=.not.l_velocity_gauge_tmp ! + io_GF=SAVE_G_history + ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') ! From dcf00283932421f55cb1e679f7c5b38594996ece Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 21 Feb 2025 01:01:07 +0100 Subject: [PATCH 0883/1367] Version 5.3.0, Revision 24269, Hash feb7c9bddb MODIFIED * configure include/version/version.m4 io/io_RT_components_G_lesser.F nloptics/NL_initialize.F parallel/PARALLEL_global_Non_Linear.F Changes: - [yambo_nl] Fixed parallel I/O of g_lesser Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/io/io_RT_components_G_lesser.F | 8 ++++---- src/nloptics/NL_initialize.F | 9 +++++++-- src/parallel/PARALLEL_global_Non_Linear.F | 17 +++++++++++++---- 5 files changed, 38 insertions(+), 24 deletions(-) diff --git a/configure b/configure index a86ec0220e..730349d8b2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24008 h.899664c326. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24269 h.feb7c9bddb. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24008 h.899664c326' -PACKAGE_STRING='Yambo 5.3.0 r.24008 h.899664c326' +PACKAGE_VERSION='5.3.0 r.24269 h.feb7c9bddb' +PACKAGE_STRING='Yambo 5.3.0 r.24269 h.feb7c9bddb' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24008 h.899664c326 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24269 h.feb7c9bddb to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24008 h.899664c326:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24269 h.feb7c9bddb:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24008 h.899664c326 +Yambo configure 5.3.0 r.24269 h.feb7c9bddb generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24008 h.899664c326, which was +It was created by Yambo $as_me 5.3.0 r.24269 h.feb7c9bddb, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24008" -SHASH="899664c326" +SREVISION="24269" +SHASH="feb7c9bddb" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24008 h.899664c326, which was +This file was extended by Yambo $as_me 5.3.0 r.24269 h.feb7c9bddb, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24008 h.899664c326 +Yambo config.status 5.3.0 r.24269 h.feb7c9bddb configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5c42c80861..7df3f1d4ab 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24008 h.899664c326, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24269 h.feb7c9bddb, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24008" -SHASH="899664c326" +SREVISION="24269" +SHASH="feb7c9bddb" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_RT_components_G_lesser.F b/src/io/io_RT_components_G_lesser.F index 527d5cef8c..69689d6e32 100644 --- a/src/io/io_RT_components_G_lesser.F +++ b/src/io/io_RT_components_G_lesser.F @@ -8,7 +8,7 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! use pars, ONLY:SP,schlen - use drivers, ONLY:l_real_time + use drivers, ONLY:l_real_time,l_nl_optics use R_lattice, ONLY:nkibz use stderr, ONLY:intc use IO_int, ONLY:def_variable_bulk,io_variable_bulk @@ -65,7 +65,7 @@ subroutine io_RT_components_G_lesser(ID,T_size) k_range =PAR_G_k_range G_IO_steps =Gless_RT_IO_t%INTERVAL_steps/nint(RT_dyn_step/RT_step) #endif - ! + ! ! Variables... !-------------- G_var_name="dG_lesser" @@ -93,7 +93,7 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! Variable Definitions... !------------------------- #if defined _PAR_IO - if( NE_i_time==NE_i_start_time.or..not.l_real_time) then + if( NE_i_time==NE_i_start_time.or..not.(l_real_time.or.l_nl_optics)) then #endif call def_variable_bulk(ID,trim(G_var_name),4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) if (l_H_sig) then @@ -114,7 +114,7 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! ! Variable I/O... !----------------- - if (l_real_time) then + if (l_real_time.or.l_nl_optics) then do i_mem_sorted=G_MEM_steps-T_size+1,G_MEM_steps if (RT_do_IO("G_lesser_K_section")) IPOS(5)=Gless_RT_IO_t%N+(i_mem_sorted-G_MEM_steps) if (RT_do_IO("G_lesser_RESTART_K_section")) IPOS(5)= T_size+(i_mem_sorted-G_MEM_steps) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 55ea5a41ab..246d35ab36 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -26,7 +26,7 @@ subroutine NL_initialize(E,k) use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& -& l_velocity_gauge_corr,l_velocity_gauge_diam +& l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& & SAVE_Vb_history,SAVE_G_history use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & @@ -69,7 +69,12 @@ subroutine NL_initialize(E,k) l_velocity_gauge_corr=.false. l_velocity_gauge_diam=.not.l_velocity_gauge_tmp ! - io_GF=SAVE_G_history + if (SAVE_G_history) then + io_GF=.true. + RT_nk=k%nibz + G_MEM_steps=1 + i_MEM_now=1 + endif ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') diff --git a/src/parallel/PARALLEL_global_Non_Linear.F b/src/parallel/PARALLEL_global_Non_Linear.F index e18fd65e70..fbf6d1c135 100644 --- a/src/parallel/PARALLEL_global_Non_Linear.F +++ b/src/parallel/PARALLEL_global_Non_Linear.F @@ -11,6 +11,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) use R_lattice, ONLY:bz_samp use collision_ext, ONLY:HXC_collisions use nl_optics, ONLY:NL_bands + use RT_control, ONLY:SAVE_G_history use IO_int, ONLY:IO_and_Messaging_switch use parallel_int, ONLY:PARALLEL_index,PARALLEL_assign_chains_and_COMMs,PARALLEL_live_message use parallel_m, ONLY:ncpu,COMM_copy,PAR_build_index,PAR_INDEX_copy @@ -23,7 +24,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! INDEX use parallel_m, ONLY:PAR_freqs_index,PAR_Xk_ibz_index,PAR_Xk_bz_index,PAR_QP_index ! DIMENSIONS - use parallel_m, ONLY:PAR_n_freqs,PAR_nQP,PAR_Xk_nbz,PAR_Xk_nibz + use parallel_m, ONLY:PAR_n_freqs,PAR_nQP,PAR_Xk_nbz,PAR_Xk_nibz,PAR_G_k_range ! ID's use parallel_m, ONLY:PAR_IND_freqs_ID,PAR_IND_Q_ibz_ID,PAR_IND_WF_k_ID,& & PAR_IND_Xk_bz_ID,PAR_IND_Xk_ibz_ID @@ -38,7 +39,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! ! Work space ! - integer :: i_qp,ib1,ib2,i_k + integer :: i_qp,ib1,ib2,i_k,nk_G_IO ! CALL PARALLEL_structure(2,(/"w ","k "/)) ! @@ -67,7 +68,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! ! K-points ! - call PARALLEL_index(PAR_IND_Xk_ibz,(/Xk%nibz/),COMM=PAR_COM_Xk_ibz_INDEX) + call PARALLEL_index(PAR_IND_Xk_ibz,(/Xk%nibz/),CONSECUTIVE=SAVE_G_history,COMM=PAR_COM_Xk_ibz_INDEX) PAR_IND_Xk_ibz_ID=PAR_COM_Xk_ibz_INDEX%CPU_id PAR_Xk_nibz=PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1) ! @@ -82,7 +83,15 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) call PARALLEL_distribute_BZk_using_IBZk(PAR_COM_Xk_ibz_INDEX,Xk,PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID,& & PAR_IND_Xk_bz, PAR_IND_Xk_bz_ID,& & PAR_Xk_bz_index,PAR_Xk_nbz) - + ! + nk_G_IO=0 + PAR_G_k_range=0 + do i_k = 1, Xk%nibz + if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle + if (nk_G_IO==0) PAR_G_k_range=i_k + if (nk_G_IO >0) PAR_G_k_range(2)=i_k + nk_G_IO=nk_G_IO+1 + enddo ! ! Overlap indeces for WF distribution ! From a862b5f68eee1657ede7cca743a7d09feb87756e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Feb 2025 00:49:00 +0100 Subject: [PATCH 0884/1367] Version 5.3.0, Revision 24270, Hash dcf0028393 MODIFIED * configure include/version/version.m4 allocations/DIPOLE_ALLOC_global.F dipoles/DIPOLE_driver.F dipoles/DIPOLE_overlaps.F Changes: - [yambo] Saving local changes to dipoles Patch sent by: Davide Sangalli --- configure | 22 ++++++++++---------- include/version/version.m4 | 6 +++--- src/allocations/DIPOLE_ALLOC_global.F | 1 - src/dipoles/DIPOLE_driver.F | 29 +++++++++++++++++++++------ src/dipoles/DIPOLE_overlaps.F | 4 ---- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/configure b/configure index 730349d8b2..7b36f37019 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24269 h.feb7c9bddb. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24270 h.dcf0028393. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24269 h.feb7c9bddb' -PACKAGE_STRING='Yambo 5.3.0 r.24269 h.feb7c9bddb' +PACKAGE_VERSION='5.3.0 r.24270 h.dcf0028393' +PACKAGE_STRING='Yambo 5.3.0 r.24270 h.dcf0028393' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24269 h.feb7c9bddb to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24270 h.dcf0028393 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24269 h.feb7c9bddb:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24270 h.dcf0028393:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24269 h.feb7c9bddb +Yambo configure 5.3.0 r.24270 h.dcf0028393 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24269 h.feb7c9bddb, which was +It was created by Yambo $as_me 5.3.0 r.24270 h.dcf0028393, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24269" -SHASH="feb7c9bddb" +SREVISION="24270" +SHASH="dcf0028393" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24269 h.feb7c9bddb, which was +This file was extended by Yambo $as_me 5.3.0 r.24270 h.dcf0028393, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24269 h.feb7c9bddb +Yambo config.status 5.3.0 r.24270 h.dcf0028393 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7df3f1d4ab..10b817e957 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24269 h.feb7c9bddb, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24270 h.dcf0028393, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24269" -SHASH="feb7c9bddb" +SREVISION="24270" +SHASH="dcf0028393" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/allocations/DIPOLE_ALLOC_global.F b/src/allocations/DIPOLE_ALLOC_global.F index ac78ab08be..d290f3b1eb 100644 --- a/src/allocations/DIPOLE_ALLOC_global.F +++ b/src/allocations/DIPOLE_ALLOC_global.F @@ -25,7 +25,6 @@ subroutine DIPOLE_ALLOC_global(D,NK) call DIPOLE_ALLOC_elemental('DIP_orbital') call DIPOLE_ALLOC_elemental('DIP_spin') call DIPOLE_ALLOC_elemental('DIP_P_spinor') - call DIPOLE_ALLOC_elemental('DIP_S') call DIPOLE_ALLOC_elemental('P_square') return endif diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index 9ce79143dc..faafd6e397 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -36,7 +36,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) use DIPOLES, ONLY:DIPOLE_t,DIP_iR,DIP_P,DIP_v,DIP_spin,DIP_orbital,P_square,& & x_space_obs,g_space_obs,covariant_obs,der_k_obs,shifted_grids_obs,& & Vnl_commutator_warning,eval_OVERLAPS,l_force_SndOrd - use ALLOC, ONLY:DIPOLE_ALLOC_global + use ALLOC, ONLY:DIPOLE_ALLOC_global,DIPOLE_ALLOC_elemental use IO_int, ONLY:IO_and_Messaging_switch use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_nibz,PAR_COM_DIPk_ibz_A2A,& & PAR_IND_CON_BANDS_DIP,PAR_IND_VAL_BANDS_DIP @@ -89,7 +89,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! ! In case dipoles were not found/ok then I need to compute them !============================================================== - if (io_err/=0) then + if (io_err/=0 .or. (eval_Overlaps.and.io_err_Overlaps/=0) ) then ! ! I/O privilegies: temporarly switch it on ! @@ -105,14 +105,27 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! call PARALLEL_WF_index(COMM=PAR_COM_DIPk_ibz_A2A) ! - ! Allocation + endif + ! + ! Overlaps (DIP_S) + ! + if (eval_Overlaps.and.io_err_Overlaps/=0) then ! - call DIPOLE_ALLOC_global(Dip,PAR_DIPk_nibz) + ! Notice that DIP_S is defined in the BZ ! - ! , ,

, , S_overlap + call DIPOLE_ALLOC_elemental('DIP_S',(/Dip%ib(2),Dip%ib(2),6,Xk%nbz/)) ! + call DIPOLE_overlaps(Xk,Dip) ! - if (eval_Overlaps.and.io_err_Overlaps/=0) call DIPOLE_overlaps(Xk,Dip) + endif + ! + if (io_err/=0) then + ! + ! , ,

, , + ! + ! Allocation + ! + call DIPOLE_ALLOC_global(Dip,PAR_DIPk_nibz) ! if (len_trim(shifted_grids_obs)>0) call DIPOLE_shifted_grids(Xen,Xk,Dip) ! @@ -178,6 +191,10 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! if (.not.io_DIP) return ! + ! Overlaps + call DIPOLE_ALLOC_elemental('DIP_S') + ! + ! Dipoles call DIPOLE_ALLOC_global() ! contains diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index f5da6b1d82..5c3704fa7f 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -55,12 +55,8 @@ subroutine DIPOLE_overlaps(Xk,Dip) if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) ! - ! Notice that DIP_S is defined in the BZ - ! - call DIPOLE_ALLOC_elemental('DIP_S',(/Dip%ib(2),Dip%ib(2),6,Xk%nbz/)) DIP_S=cZERO ! - ! call k_find_smallest_g0(g0_idx,g0_length) iG0=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) ! From f152df5a975a01342aa29c242e7c84afee3b95d7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 22 Feb 2025 16:57:11 +0100 Subject: [PATCH 0885/1367] Version 5.3.0, Revision 24270, Hash dcf0028393 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_build_der_k.F modules/mod_real_time.F real_time_hamiltonian/.objects real_time_hamiltonian/RT_Hamiltonian.F real_time_hamiltonian/RT_gradk_rho_times_E.F real_time_initialize/RT_initialize.F Changes: - working on k-gradient of the density matrix Patch sent by: Davide Sangalli --- configure | 22 ++-- include/version/version.m4 | 6 +- src/dipoles/DIPOLE_build_der_k.F | 2 + src/modules/mod_real_time.F | 1 + src/real_time_hamiltonian/.objects | 2 +- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 +- .../RT_gradk_rho_times_E.F | 123 +++++++++++++----- src/real_time_initialize/RT_initialize.F | 3 +- 8 files changed, 115 insertions(+), 46 deletions(-) diff --git a/configure b/configure index 730349d8b2..7b36f37019 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24269 h.feb7c9bddb. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24270 h.dcf0028393. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24269 h.feb7c9bddb' -PACKAGE_STRING='Yambo 5.3.0 r.24269 h.feb7c9bddb' +PACKAGE_VERSION='5.3.0 r.24270 h.dcf0028393' +PACKAGE_STRING='Yambo 5.3.0 r.24270 h.dcf0028393' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24269 h.feb7c9bddb to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24270 h.dcf0028393 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24269 h.feb7c9bddb:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24270 h.dcf0028393:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24269 h.feb7c9bddb +Yambo configure 5.3.0 r.24270 h.dcf0028393 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24269 h.feb7c9bddb, which was +It was created by Yambo $as_me 5.3.0 r.24270 h.dcf0028393, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24269" -SHASH="feb7c9bddb" +SREVISION="24270" +SHASH="dcf0028393" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24269 h.feb7c9bddb, which was +This file was extended by Yambo $as_me 5.3.0 r.24270 h.dcf0028393, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24269 h.feb7c9bddb +Yambo config.status 5.3.0 r.24270 h.dcf0028393 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7df3f1d4ab..10b817e957 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24269 h.feb7c9bddb, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24270 h.dcf0028393, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24269" -SHASH="feb7c9bddb" +SREVISION="24270" +SHASH="dcf0028393" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index ee49db770c..273a15cbd5 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -200,6 +200,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,2)) ) & & -matmul(U_l(:,:,1),hermitian(U_l(:,:,2)) ) ! + ! This contains the i/2q factor + ! 1/q=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP ! enddo diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 850ba4e3b2..1d323965f4 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -49,6 +49,7 @@ module real_time logical :: l_P_integrating_J logical :: l_velocity_gauge_corr logical :: l_velocity_gauge_diam + logical :: l_length_grad_k ! ! Specific flag for when Yambo libraries are called to perform TRabs via YPP ! diff --git a/src/real_time_hamiltonian/.objects b/src/real_time_hamiltonian/.objects index 2574475c03..14f3d23b5b 100644 --- a/src/real_time_hamiltonian/.objects +++ b/src/real_time_hamiltonian/.objects @@ -1,3 +1,3 @@ #if defined _RT -objs = RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o +objs = RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o RT_gradk_rho_times_E.o #endif diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 896a5af400..8ec07292f6 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -196,7 +196,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) - !call RT_gradk_rho_times_E(ik,1,H_nl_sc) + !call RT_gradk_rho_times_E(ik,1,H_nl_sc,dG_in,A_input,k) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index f38e35b313..b59b0cd4d0 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -5,26 +5,54 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,A_input) +subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! ! This subroutine computes the k-gradient of the density matrix, ! and multiplies it by the electric field. ! See Phys. Rev. B 76, 035213 (2007) ! - use pars, ONLY:SP + use pars, ONLY:SP,cI,cZERO,pi + use units, ONLY:SPEED_OF_LIGHT use real_time, ONLY:l_length_grad_k,RT_bands use fields, ONLY:gauge_field + use real_time, ONLY:RT_bands + use vec_operate, ONLY:k_periodic_idx!,degeneration_finder + use matrix_operate, ONLY:hermitian + use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd + use R_lattice, ONLY:bz_samp,k_map + use D_lattice, ONLY:a + use parallel_m, ONLY:PAR_G_k_range ! implicit none ! integer, intent(in) :: ik,i_sp_pol complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) type(gauge_field), intent(in) :: A_input + type(bz_samp), intent(in) :: Xk + ! + ! Workspace + ! + integer :: ikbz,id_red,max_step,istep,idx(3),idir,ikm1,ikp1,ib1,ib2,jb1,jb2 + real(SP) :: q_fac,E_field(3) + ! + complex(SP) :: Mp_kmq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& + & Mm_kpq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& + & Sp_kmq(RT_bands(2),RT_bands(2)),Sm_kpq(RT_bands(2),RT_bands(2)),& + & A1p_kmq(RT_bands(2),RT_bands(2)),A1m_kpq(RT_bands(2),RT_bands(2)),& + & A2p_kmq(RT_bands(2),RT_bands(2)),A2m_kpq(RT_bands(2),RT_bands(2)),& + & DIP_kp(RT_bands(2),RT_bands(2)),DIP_km(RT_bands(2),RT_bands(2)) + ! + complex(SP) :: gradk_rho(RT_bands(2),RT_bands(2),3),gradk_rho_red(RT_bands(2),RT_bands(2),2) + ! + ! Warning: kpts parallelization to be fixed, since rho is distributed ! if (.not.l_length_grad_k) return ! ikbz=Xk%k_table(ik,1) ! + gradk_rho =cZERO + ! do id_red=1,3 ! loop on reciprocal lattice ! if(k_map%max_kdir(id_red)==1) cycle @@ -36,6 +64,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,A_input) ! if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 ! + gradk_rho_red=cZERO + ! do istep=1,max_step ! idx=k_map%k_map_inv(ikbz,:) @@ -62,44 +92,79 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,A_input) ! ! Option 2: Directly do matrix inversion in place of dagger. ! - ! To fix 4 indexes on the left, 2x2 on the right - M_p_kmq(:,:,:,:)=hermitian(Sp_kmq),Sp_kmq - M_m_kpq(:,:,:,:)=hermitian(Sm_kpq),Sm_kmq - ! - ! To fix dipole direction - A1p_kmq=matmul(-cI*dG(:,:,ikm1),hermitina(DIP_iR(i_dir,:,:,ikm1,i_sp_pol))) - A1m_kpq=matmul(-cI*dG(:,:,ikp1),hermitina(DIP_iR(i_dir,:,:,ikp1,i_sp_pol))) - ! - A2p_kmq=matmul(-cI*dG(:,:,ikm1), DIP_iR(i_dir,:,:,ikm1,i_sp_pol))) - A2m_kpq=matmul(-cI*dG(:,:,ikp1), DIP_iR(i_dir,:,:,ikp1,i_sp_pol))) - ! - do ib=RT_bands(1),RT_bands(2) - do jb=RT_bands(1),RT_bands(2) - do ibp=RT_bands(1),RT_bands(2) - do jbp=RT_bands(1),RT_bands(2) - gradk_rho(ib,jb,id_red,i_step)=gradk_rho(ib,jb,id_red,i_step)+ & - & -cI*M_p_kmq(ibp,ib,jbp,jb)*dG(ibp,jbp,ikpq) & - & +cI*M_m_kpq(ibp,ib,jbp,jb)*dG(ibp,jbp,ikmq) & - & -cI*q*M_p_kmq(ibp,ib,jbp,jb)*(A1p_kmq(ibp,ib)-A2p_kmq(ibp,ib)) & - & +cI*q*M_m_kpq(ibp,ib,jbp,jb)*(A1m_kpq(ibp,ib)-A2m_kpq(ibp,ib)) + ! Option 3: Use the dagger without SVD. + do ib1=1,RT_bands(2) + do ib2=1,RT_bands(2) + Mp_kmq(ib1,ib2,:,:)=conjg(Sp_kmq(ib2,ib1))*Sp_kmq(:,:) + Mm_kpq(ib1,ib2,:,:)=conjg(Sm_kpq(ib2,ib1))*Sm_kpq(:,:) + enddo + enddo + ! + ! I need to project the dipoles along the id_red direction + ! + DIP_km=cZERO + DIP_kp=cZERO + do idir=1,3 + DIP_km=DIP_km+cI*DIP_iR(idir,:,:,ikm1,i_sp_pol)*a(id_red,idir) + DIP_kp=DIP_kp+cI*DIP_iR(idir,:,:,ikp1,i_sp_pol)*a(id_red,idir) + enddo + ! + A1p_kmq=matmul(-cI*dG_in(:,:,ikm1),hermitian(DIP_km)) + A1m_kpq=matmul(-cI*dG_in(:,:,ikp1),hermitian(DIP_kp)) + ! + A2p_kmq=matmul(-cI*dG_in(:,:,ikm1), DIP_km ) + A2m_kpq=matmul(-cI*dG_in(:,:,ikp1), DIP_kp ) + ! + ! 1/q factor = k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + do jb2=RT_bands(1),RT_bands(2) + gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & + & -cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1) & + & +cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1) & + & -cI/q_fac*Mp_kmq(ib2,ib1,jb2,jb1)*(A1p_kmq(ib2,ib1)-A2p_kmq(ib2,ib1)) & + & +cI/q_fac*Mm_kpq(ib2,ib1,jb2,jb1)*(A1m_kpq(ib2,ib1)-A2m_kpq(ib2,ib1)) enddo enddo enddo enddo ! - ! todo: rotate in cartesian coordinates + gradk_rho_red(:,:,istep)=gradk_rho_red(:,:,istep)*q_fac/2._SP ! enddo ! istep + ! + ! Rotate in cartesian coordinates + ! + if(max_step==1) then + ! + ! First order formula D(dk) + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(gradk_rho_red(:,:,1))*a(id_red,idir) + enddo + ! + else + ! + ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(4._SP*gradk_rho_red(:,:,1)-gradk_rho_red(:,:,2))/3._SP*a(id_red,idir) + enddo + ! + endif + ! enddo ! id_red - ! ! ! Length gauge !=============== - E_vec_pot=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units + E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units ! - do i_dir=1,3 - H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,i_dir)*E_vec_pot(i_dir) + do idir=1,3 + H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,idir)*E_field(idir) enddo ! -end subroutine RT_grad_k_rho - \ No newline at end of file +end subroutine RT_gradk_rho_times_E + diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 859818d470..19c5c02c5b 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -30,7 +30,7 @@ subroutine RT_initialize(E,k,q) & Life_MEM_steps,l_RT_lifetimes_Tfit,l_RT_skip_ph_abs_lifetimes,l_RT_iterative_ELPH_lifetimes use real_time, ONLY:RT_potential,RT_step,l_NE_with_fields,RT_bands,RT_dyn_step,RT_nk, & & NE_steps,NE_tot_time,l_RT_induced_field,Gr_kind, & -& RAD_LifeTime,Phase_LifeTime, & +& RAD_LifeTime,Phase_LifeTime,l_length_grad_k, & & NE_MEM_treshold,G_MEM_steps,l_RT_uses_E_FineGd,DbGd_EE_Nk_table, & & l_RT_impose_N_dN,Integrator_name,l_RT_impose_E,DbGd_EE_percent, & & l_RT_update_Energies,eval_HARTREE,eval_DFT,l_NE_dynamics, & @@ -98,6 +98,7 @@ subroutine RT_initialize(E,k,q) call parser('RTzeroTempRef', l_RT_eq_is_zero_temp) call parser('RTEqScatt', l_RT_include_eq_scatt) call parser('RTskipPHabs', l_RT_skip_ph_abs_lifetimes) + call parser('RTgradk', l_length_grad_k) ! if (.not.l_RT_skip_ph_abs_lifetimes) l_RT_skip_ph_abs_lifetimes=.not.(Bose_Temp>0..or.l_phel_scatt) ! From 490364f21e3f9781d7d83d0dde709d2de42ea6f9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 23 Feb 2025 09:37:19 +0100 Subject: [PATCH 0886/1367] Version 5.3.0, Revision 24271, Hash f152df5a97 MODIFIED * configure include/version/version.m4 interface/INIT_activate.F interface/INIT_load.F real_time_drivers/RT_driver.F real_time_hamiltonian/RT_Hamiltonian.F real_time_hamiltonian/RT_gradk_rho_times_E.F real_time_initialize/RT_initialize.F Changes: - [yambo_rt] Working on k-gradient of the density matrix Patch sent by: Davide Sangalli --- configure | 22 ++++---- include/version/version.m4 | 6 +-- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + src/real_time_drivers/RT_driver.F | 10 +++- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 +- .../RT_gradk_rho_times_E.F | 54 +++++++++++++------ src/real_time_initialize/RT_initialize.F | 8 ++- 8 files changed, 70 insertions(+), 35 deletions(-) diff --git a/configure b/configure index 7b36f37019..e8eb6ae3ec 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24270 h.dcf0028393. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24271 h.f152df5a97. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24270 h.dcf0028393' -PACKAGE_STRING='Yambo 5.3.0 r.24270 h.dcf0028393' +PACKAGE_VERSION='5.3.0 r.24271 h.f152df5a97' +PACKAGE_STRING='Yambo 5.3.0 r.24271 h.f152df5a97' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24270 h.dcf0028393 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24271 h.f152df5a97 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24270 h.dcf0028393:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24271 h.f152df5a97:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24270 h.dcf0028393 +Yambo configure 5.3.0 r.24271 h.f152df5a97 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24270 h.dcf0028393, which was +It was created by Yambo $as_me 5.3.0 r.24271 h.f152df5a97, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24270" -SHASH="dcf0028393" +SREVISION="24271" +SHASH="f152df5a97" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24270 h.dcf0028393, which was +This file was extended by Yambo $as_me 5.3.0 r.24271 h.f152df5a97, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24270 h.dcf0028393 +Yambo config.status 5.3.0 r.24271 h.f152df5a97 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 10b817e957..2a20d41ff5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24270 h.dcf0028393, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24271 h.f152df5a97, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24270" -SHASH="dcf0028393" +SREVISION="24271" +SHASH="f152df5a97" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 75b67b6dcd..ac8ef0f981 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -534,7 +534,7 @@ subroutine INIT_activate() call INIT_RT_ctl_switch('G') ! call initactivate(1,'RTskipImposeN RTeeImposeE InducedField') - call initactivate(1,'Gauge VelGaugeCorr VelGaugeNoDiam PfromJ RTUpdateSOC RTUpdateE SaveGhistory') + call initactivate(1,'Gauge VelGaugeCorr VelGaugeNoDiam PfromJ RTgradk RTUpdateSOC RTUpdateE SaveGhistory') call initactivate(1,'RTEqScatt RTImpForMet RTzeroTempRef RTskipPHabs RTEvalEnergy RTEvalEntropy') call initactivate(1,'dTupdateTime dTupdateTimeSet dTupdateJump dTupdateTresh dT_MAX dT_SET') if (l_elel_scatt .or. l_elph_scatt .or. l_elphoton_scatt) then diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 13e1784a2e..99ee734b51 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -473,6 +473,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'RTEvalEnergy', '[RT] Energy variation computed on the fly',Verb_level=V_real_time) call it('f',defs,'RTEvalEntropy', '[RT] Entropy variation computed on the fly',Verb_level=V_real_time) call it('f',defs,'SaveGhistory', '[RT] Save the history of the green function',Verb_level=V_real_time) + call it('f',defs,'RTgradk', '[RT] Compute the term grad_k(rho).E',Verb_level=V_real_time) ! ! ... updates ... call it('f',defs,'RTUpdateSOC', '[RT] Update the SOC interaction',Verb_level=V_real_time) diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index 2117a6be9c..d8be371372 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -32,7 +32,7 @@ subroutine RT_driver(E,X,k,q,Dip) & NE_steps,RT_step,G_lesser,RT_bands,& & NE_i_time,eval_energy,rho_reference,magn_reference,RT_nk, & & NE_time,RT_carriers,RT_dyn_step,l_RT_is_WFfree,& -& dG_lesser,NE_tot_time,& +& dG_lesser,NE_tot_time,l_length_grad_k,& & i_MEM_prev,i_MEM_now,RT_is_dynamically_dephased,& & l_RT_update_Energies,l_NE_with_fields,l_update_SOC,l_velocity_gauge_corr use plasma, ONLY:PLASMA_free,EH_gas @@ -121,6 +121,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! call DIPOLE_dimensions(E,Dip,RT_bands,(/0._SP,0._SP,0._SP/)) call DIPOLE_IO(k,E,Dip,'read ',io_err,'RT') + if(io_err/=0) call error("Error in Dipoles I/O") ! ! In dipole_driver the IO is k-dictated. Here I want only the master to write ! @@ -130,7 +131,12 @@ subroutine RT_driver(E,X,k,q,Dip) ! call section('=','Initialization') !################################# - call RT_initialize(E,k,q) + call RT_initialize(E,k,q,Dip) + ! + if (l_length_grad_k) then + call OVERLAPS_IO(k,E,Dip,'read',io_err,'RT') + if(io_err/=0) call error("Error in Overlaps I/O") + endif ! ! Dipoles & WF dimensions !========================= diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 8ec07292f6..f27eda44bf 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -196,7 +196,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) - !call RT_gradk_rho_times_E(ik,1,H_nl_sc,dG_in,A_input,k) + call RT_gradk_rho_times_E(ik,1,H_nl_sc,dG_in,A_input,k) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index b59b0cd4d0..355a0b7625 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -33,8 +33,10 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! ! Workspace ! - integer :: ikbz,id_red,max_step,istep,idx(3),idir,ikm1,ikp1,ib1,ib2,jb1,jb2 + integer :: id_red,max_step,istep,idx(3),idir,ib1,ib2,jb1,jb2,& + ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is real(SP) :: q_fac,E_field(3) + complex(SP) :: Dip_kp_c(3),Dip_km_c(3) ! complex(SP) :: Mp_kmq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& & Mm_kpq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& @@ -49,6 +51,12 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! if (.not.l_length_grad_k) return ! + ! Length gauge + !=============== + E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units + ! + if (all(E_field==0._SP)) return + ! ikbz=Xk%k_table(ik,1) ! gradk_rho =cZERO @@ -73,11 +81,17 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) idx=k_periodic_idx(idx,k_map) ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! + ikm1_ibz=Xk%sstar(ikm1,1) + ikm1_is =Xk%sstar(ikm1,2) + ! idx=k_map%k_map_inv(ikbz,:) idx(id_red)=idx(id_red)+istep idx=k_periodic_idx(idx,k_map) ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! + ikp1_ibz=Xk%sstar(ikp1,1) + ikp1_is =Xk%sstar(ikp1,2) + ! !S_tmp(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) ! g+(k) !S_tmp(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! g-(k)=g+(k-q) ! @@ -100,20 +114,34 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) enddo enddo ! - ! I need to project the dipoles along the id_red direction + ! I need to rotate the dipoles in k-space, + ! and then project them along the id_red direction + ! Note: this term is quitre slow. + ! Pre-expanding the dipoles with the old + ! DIPOLE expand wuold speed-up this part ! DIP_km=cZERO DIP_kp=cZERO - do idir=1,3 - DIP_km=DIP_km+cI*DIP_iR(idir,:,:,ikm1,i_sp_pol)*a(id_red,idir) - DIP_kp=DIP_kp+cI*DIP_iR(idir,:,:,ikp1,i_sp_pol)*a(id_red,idir) + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + call DIPOLE_rotate(ib1,jb1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) + call DIPOLE_rotate(ib1,jb1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) + do idir=1,3 + DIP_km(ib1,jb1)=DIP_km(ib1,jb1)+cI*DIP_km_c(idir)*a(id_red,idir) + DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)+cI*DIP_kp_c(idir)*a(id_red,idir) + enddo + enddo enddo ! - A1p_kmq=matmul(-cI*dG_in(:,:,ikm1),hermitian(DIP_km)) - A1m_kpq=matmul(-cI*dG_in(:,:,ikp1),hermitian(DIP_kp)) ! - A2p_kmq=matmul(-cI*dG_in(:,:,ikm1), DIP_km ) - A2m_kpq=matmul(-cI*dG_in(:,:,ikp1), DIP_kp ) + A1p_kmq=matmul(-cI*dG_in(:,:,ikm1_ibz),hermitian(DIP_km)) + A1m_kpq=matmul(-cI*dG_in(:,:,ikp1_ibz),hermitian(DIP_kp)) + ! + A2p_kmq=matmul(-cI*dG_in(:,:,ikm1_ibz), DIP_km ) + A2m_kpq=matmul(-cI*dG_in(:,:,ikp1_ibz), DIP_kp ) ! ! 1/q factor = k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP @@ -123,8 +151,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) do ib2=RT_bands(1),RT_bands(2) do jb2=RT_bands(1),RT_bands(2) gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & - & -cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1) & - & +cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1) & + & -cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1_ibz) & + & +cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1_ibz) & & -cI/q_fac*Mp_kmq(ib2,ib1,jb2,jb1)*(A1p_kmq(ib2,ib1)-A2p_kmq(ib2,ib1)) & & +cI/q_fac*Mm_kpq(ib2,ib1,jb2,jb1)*(A1m_kpq(ib2,ib1)-A2m_kpq(ib2,ib1)) enddo @@ -158,10 +186,6 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! enddo ! id_red ! - ! Length gauge - !=============== - E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units - ! do idir=1,3 H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,idir)*E_field(idir) enddo diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 19c5c02c5b..69e9e3c2fb 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): ! -subroutine RT_initialize(E,k,q) +subroutine RT_initialize(E,k,q,Dip) ! use drivers, ONLY:l_use_collisions,l_elph_scatt,l_elel_scatt,l_sc_hartree,l_use_Hxc_collisions,& & l_sc_is_libDFT,l_sc_sex,l_sc_fock,l_elphoton_scatt,l_rt_carriers_in_use,l_phel_scatt @@ -20,6 +20,7 @@ subroutine RT_initialize(E,k,q) use QP_CTL_m, ONLY:QP_ctl_user use vec_operate, ONLY:normalize_v use plasma, ONLY:EH_gas + use DIPOLES, ONLY:DIPOLE_t use X_m, ONLY:global_gauge use electrons, ONLY:levels use collision_ext, ONLY:COLLISIONS_have_HARTREE @@ -53,7 +54,8 @@ subroutine RT_initialize(E,k,q) #include ! type(levels), intent(inout) :: E - type(bz_samp),intent(in) :: q,k + type(bz_samp), intent(in) :: q,k + type(DIPOLE_t), intent(in) :: Dip ! ! Work space ! @@ -128,6 +130,8 @@ subroutine RT_initialize(E,k,q) PAR_G_k_range(2)=RTibz%k_range(PAR_G_k_range(2),2) endif ! + if (l_length_grad_k .and. .not.allocated(k%k_table)) call k_build_up_BZ_tables(k) + ! ! Integrator FLAGS !================== call RT_Integrator_init() From c3dfc875f969bae9fcffcdcb20d154612ee5bdfb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 23 Feb 2025 14:38:17 +0100 Subject: [PATCH 0887/1367] Version 5.3.0, Revision 24272, Hash 490364f21e MODIFIED * configure include/version/version.m4 modules/mod_real_time.F real_time_hamiltonian/RT_gradk_rho_times_E.F real_time_initialize/RT_initialize.F Changes: - [yambo_rt] gradk implementation working also if lower band is > 1 Patch sent by: Davide Sangalli --- configure | 22 ++++---- include/version/version.m4 | 6 +-- src/modules/mod_real_time.F | 1 + .../RT_gradk_rho_times_E.F | 54 +++++++++++++------ src/real_time_initialize/RT_initialize.F | 8 +-- 5 files changed, 59 insertions(+), 32 deletions(-) diff --git a/configure b/configure index e8eb6ae3ec..c97b80388a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24271 h.f152df5a97. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24272 h.490364f21e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24271 h.f152df5a97' -PACKAGE_STRING='Yambo 5.3.0 r.24271 h.f152df5a97' +PACKAGE_VERSION='5.3.0 r.24272 h.490364f21e' +PACKAGE_STRING='Yambo 5.3.0 r.24272 h.490364f21e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24271 h.f152df5a97 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24272 h.490364f21e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24271 h.f152df5a97:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24272 h.490364f21e:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24271 h.f152df5a97 +Yambo configure 5.3.0 r.24272 h.490364f21e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24271 h.f152df5a97, which was +It was created by Yambo $as_me 5.3.0 r.24272 h.490364f21e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24271" -SHASH="f152df5a97" +SREVISION="24272" +SHASH="490364f21e" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24271 h.f152df5a97, which was +This file was extended by Yambo $as_me 5.3.0 r.24272 h.490364f21e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24271 h.f152df5a97 +Yambo config.status 5.3.0 r.24272 h.490364f21e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 2a20d41ff5..83d8eb1d86 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24271 h.f152df5a97, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24272 h.490364f21e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24271" -SHASH="f152df5a97" +SREVISION="24272" +SHASH="490364f21e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 1d323965f4..10aaea1722 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -76,6 +76,7 @@ module real_time ! integer :: NE_i_time=1 ! = NE_time/RT_step+1 integer :: NE_steps ! Still relative to RT_step + integer :: NE_i_last_field ! ! Lifetimes Extrapolation Time status ! diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index 355a0b7625..adbc8621cb 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -15,7 +15,7 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) use units, ONLY:SPEED_OF_LIGHT use real_time, ONLY:l_length_grad_k,RT_bands use fields, ONLY:gauge_field - use real_time, ONLY:RT_bands + use real_time, ONLY:RT_bands,NE_i_time,NE_i_last_field use vec_operate, ONLY:k_periodic_idx!,degeneration_finder use matrix_operate, ONLY:hermitian use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd @@ -33,19 +33,26 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! ! Workspace ! - integer :: id_red,max_step,istep,idx(3),idir,ib1,ib2,jb1,jb2,& + integer :: id_red,max_step,istep,idx(3),idir,ib1,ib2,jb1,jb2,nb(2),& ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is real(SP) :: q_fac,E_field(3) complex(SP) :: Dip_kp_c(3),Dip_km_c(3) ! - complex(SP) :: Mp_kmq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& - & Mm_kpq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& - & Sp_kmq(RT_bands(2),RT_bands(2)),Sm_kpq(RT_bands(2),RT_bands(2)),& - & A1p_kmq(RT_bands(2),RT_bands(2)),A1m_kpq(RT_bands(2),RT_bands(2)),& - & A2p_kmq(RT_bands(2),RT_bands(2)),A2m_kpq(RT_bands(2),RT_bands(2)),& - & DIP_kp(RT_bands(2),RT_bands(2)),DIP_km(RT_bands(2),RT_bands(2)) + !complex(SP) :: Mp_kmq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& + !& Mm_kpq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& + !& Sp_kmq(RT_bands(2),RT_bands(2)),Sm_kpq(RT_bands(2),RT_bands(2)),& + !& A1p_kmq(RT_bands(2),RT_bands(2)),A1m_kpq(RT_bands(2),RT_bands(2)),& + !& A2p_kmq(RT_bands(2),RT_bands(2)),A2m_kpq(RT_bands(2),RT_bands(2)),& + !& DIP_kp(RT_bands(2),RT_bands(2)),DIP_km(RT_bands(2),RT_bands(2)) ! - complex(SP) :: gradk_rho(RT_bands(2),RT_bands(2),3),gradk_rho_red(RT_bands(2),RT_bands(2),2) + complex(SP), allocatable :: Mp_kmq(:,:,:,:),Mm_kpq(:,:,:,:),& + & Sp_kmq(:,:),Sm_kpq(:,:),& + & A1p_kmq(:,:),A1m_kpq(:,:),& + & A2p_kmq(:,:),A2m_kpq(:,:),& + & DIP_kp(:,:),DIP_km(:,:) + ! + complex(SP) :: gradk_rho(RT_Bands(1):RT_bands(2),RT_bands(1):RT_bands(2),3),& + & gradk_rho_red(RT_Bands(1):RT_bands(2),RT_Bands(1):RT_bands(2),2) ! ! Warning: kpts parallelization to be fixed, since rho is distributed ! @@ -55,11 +62,28 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) !=============== E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units ! - if (all(E_field==0._SP)) return + if (NE_i_time>NE_i_last_field) return + ! + nb=RT_bands + ! + allocate(Mp_kmq(nb(1):nb(2),nb(1):nb(2),nb(1):nb(2),nb(1):nb(2))) + allocate(Mm_kpq(nb(1):nb(2),nb(1):nb(2),nb(1):nb(2),nb(1):nb(2))) + ! + allocate(Sp_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(Sm_kpq(nb(1):nb(2),nb(1):nb(2))) + ! + allocate(A1p_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(A1m_kpq(nb(1):nb(2),nb(1):nb(2))) + ! + allocate(A2p_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(A2m_kpq(nb(1):nb(2),nb(1):nb(2))) + + allocate(DIP_kp(nb(1):nb(2),nb(1):nb(2))) + allocate(DIP_km(nb(1):nb(2),nb(1):nb(2))) ! ikbz=Xk%k_table(ik,1) ! - gradk_rho =cZERO + gradk_rho=cZERO ! do id_red=1,3 ! loop on reciprocal lattice ! @@ -96,9 +120,9 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) !S_tmp(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! g-(k)=g+(k-q) ! !S_kpq(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikp1,i_sp_pol) ! g+(k+q) - Sm_kpq(:,:)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! g-(k+q)=g+(k) + Sm_kpq(:,:)=hermitian(DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! g-(k+q)=g+(k) ! - Sp_kmq(:,:)= DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) + Sp_kmq(:,:)= DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) !S_kmq(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm2,i_sp_pol)) ! g-(k-q)=g+(k-2*q) ! ! Option 1: Do SVD and later dagger. @@ -107,8 +131,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! Option 2: Directly do matrix inversion in place of dagger. ! ! Option 3: Use the dagger without SVD. - do ib1=1,RT_bands(2) - do ib2=1,RT_bands(2) + do ib1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) Mp_kmq(ib1,ib2,:,:)=conjg(Sp_kmq(ib2,ib1))*Sp_kmq(:,:) Mm_kpq(ib1,ib2,:,:)=conjg(Sm_kpq(ib2,ib1))*Sm_kpq(:,:) enddo diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 69e9e3c2fb..a8eccc7e1b 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -31,7 +31,7 @@ subroutine RT_initialize(E,k,q,Dip) & Life_MEM_steps,l_RT_lifetimes_Tfit,l_RT_skip_ph_abs_lifetimes,l_RT_iterative_ELPH_lifetimes use real_time, ONLY:RT_potential,RT_step,l_NE_with_fields,RT_bands,RT_dyn_step,RT_nk, & & NE_steps,NE_tot_time,l_RT_induced_field,Gr_kind, & -& RAD_LifeTime,Phase_LifeTime,l_length_grad_k, & +& RAD_LifeTime,Phase_LifeTime,l_length_grad_k,NE_i_last_field, & & NE_MEM_treshold,G_MEM_steps,l_RT_uses_E_FineGd,DbGd_EE_Nk_table, & & l_RT_impose_N_dN,Integrator_name,l_RT_impose_E,DbGd_EE_percent, & & l_RT_update_Energies,eval_HARTREE,eval_DFT,l_NE_dynamics, & @@ -233,6 +233,8 @@ subroutine RT_initialize(E,k,q,Dip) call RT_load_field_from_file_init(field_defs(2)) enddo ! + NE_i_last_field=0 + ! do i1=1,n_ext_fields ! Efield(i1)%ef_name=trim(Efield(i1)%ef_name) @@ -241,7 +243,7 @@ subroutine RT_initialize(E,k,q,Dip) ! call STRING_split(Efield(i1)%ef_name,field_defs) ! - if(trim(field_defs(1))/='none') then + if(trim(field_defs(1))=='none') cycle ! if (.not.field_is_ok( Efield(i1) ) ) call error(trim(MSG_ch)//' not supported or polarization is wrong') ! @@ -295,7 +297,7 @@ subroutine RT_initialize(E,k,q,Dip) enddo ! DEBUG > ! - endif + NE_i_last_field=max(NE_i_last_field,Efield(i1)%t_final_indx) ! enddo ! From 599f291f2fef9a8430229b29efee6451ddf90e09 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 23 Feb 2025 23:10:34 +0100 Subject: [PATCH 0888/1367] Version 5.3.0, Revision 24473, Hash 1a32d75c29 MODIFIED * configure include/version/version.m4 real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - Saving local changes Patch sent by: Davide Sangalli --- configure | 22 ++++---- include/version/version.m4 | 6 +- .../RT_gradk_rho_times_E.F | 55 +++++++++++++------ 3 files changed, 52 insertions(+), 31 deletions(-) diff --git a/configure b/configure index c3bd2a0bf8..4491b81705 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24273 h.c3dfc875f9. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24473 h.1a32d75c29. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24273 h.c3dfc875f9' -PACKAGE_STRING='Yambo 5.3.0 r.24273 h.c3dfc875f9' +PACKAGE_VERSION='5.3.0 r.24473 h.1a32d75c29' +PACKAGE_STRING='Yambo 5.3.0 r.24473 h.1a32d75c29' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1677,7 +1677,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24273 h.c3dfc875f9 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24473 h.1a32d75c29 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1743,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24273 h.c3dfc875f9:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24473 h.1a32d75c29:";; esac cat <<\_ACEOF @@ -1988,7 +1988,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24273 h.c3dfc875f9 +Yambo configure 5.3.0 r.24473 h.1a32d75c29 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2617,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24273 h.c3dfc875f9, which was +It was created by Yambo $as_me 5.3.0 r.24473 h.1a32d75c29, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3375,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24273" -SHASH="c3dfc875f9" +SREVISION="24473" +SHASH="1a32d75c29" @@ -18026,7 +18026,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24273 h.c3dfc875f9, which was +This file was extended by Yambo $as_me 5.3.0 r.24473 h.1a32d75c29, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18090,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24273 h.c3dfc875f9 +Yambo config.status 5.3.0 r.24473 h.1a32d75c29 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 260f4314b2..0a218a2b6d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24273 h.c3dfc875f9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24473 h.1a32d75c29, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24273" -SHASH="c3dfc875f9" +SREVISION="24473" +SHASH="1a32d75c29" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index adbc8621cb..d9ca8956bf 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -33,6 +33,7 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! ! Workspace ! + logical :: l_dips_term integer :: id_red,max_step,istep,idx(3),idir,ib1,ib2,jb1,jb2,nb(2),& ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is real(SP) :: q_fac,E_field(3) @@ -64,6 +65,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! if (NE_i_time>NE_i_last_field) return ! + l_dips_term=.false. + ! nb=RT_bands ! allocate(Mp_kmq(nb(1):nb(2),nb(1):nb(2),nb(1):nb(2),nb(1):nb(2))) @@ -133,11 +136,13 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! Option 3: Use the dagger without SVD. do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) - Mp_kmq(ib1,ib2,:,:)=conjg(Sp_kmq(ib2,ib1))*Sp_kmq(:,:) - Mm_kpq(ib1,ib2,:,:)=conjg(Sm_kpq(ib2,ib1))*Sm_kpq(:,:) + Mp_kmq(ib1,ib2,:,:)=conjg(Sp_kmq(ib1,ib2))*Sp_kmq(:,:) + Mm_kpq(ib1,ib2,:,:)=conjg(Sm_kpq(ib1,ib2))*Sm_kpq(:,:) enddo enddo ! + if (l_dips_term) then + ! ! I need to rotate the dipoles in k-space, ! and then project them along the id_red direction ! Note: this term is quitre slow. @@ -148,37 +153,53 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) DIP_kp=cZERO do ib1=RT_bands(1),RT_bands(2) do jb1=RT_bands(1),RT_bands(2) - call DIPOLE_rotate(ib1,jb1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) - call DIPOLE_rotate(ib1,jb1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) - ! DEBUG lines to verify the time gain when non-expanding on the fly + call DIPOLE_rotate(jb1,ib1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) + call DIPOLE_rotate(jb1,ib1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles do idir=1,3 - DIP_km(ib1,jb1)=DIP_km(ib1,jb1)+cI*DIP_km_c(idir)*a(id_red,idir) - DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)+cI*DIP_kp_c(idir)*a(id_red,idir) + DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir) + DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir) enddo enddo enddo ! ! - A1p_kmq=matmul(-cI*dG_in(:,:,ikm1_ibz),hermitian(DIP_km)) - A1m_kpq=matmul(-cI*dG_in(:,:,ikp1_ibz),hermitian(DIP_kp)) - ! - A2p_kmq=matmul(-cI*dG_in(:,:,ikm1_ibz), DIP_km ) - A2m_kpq=matmul(-cI*dG_in(:,:,ikp1_ibz), DIP_kp ) + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + !A1_ll' ib1=l jb1=l' ib2=s + A1p_kmq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikm1_ibz)*conjg(DIP_km(ib2,ib1)) + A1m_kpq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikp1_ibz)*conjg(DIP_kp(ib2,ib1)) + !A2_ll' ib1=l jb1=l' ib2=s + A2p_kmq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikm1_ibz)* DIP_km(ib2,jb1) + A2m_kpq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikp1_ibz)* DIP_kp(ib2,jb1) + enddo + enddo + enddo + ! + else + ! + A1p_kmq=cZERO + A1m_kpq=cZERO + A2p_kmq=cZERO + A2m_kpq=cZERO + ! + endif ! ! 1/q factor = k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) - q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP + q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) ! do ib1=RT_bands(1),RT_bands(2) do jb1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) do jb2=RT_bands(1),RT_bands(2) + ! ib1=n, jb1=m, ib2=l, jb2=l' gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & - & -cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1_ibz) & - & +cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1_ibz) & - & -cI/q_fac*Mp_kmq(ib2,ib1,jb2,jb1)*(A1p_kmq(ib2,ib1)-A2p_kmq(ib2,ib1)) & - & +cI/q_fac*Mm_kpq(ib2,ib1,jb2,jb1)*(A1m_kpq(ib2,ib1)-A2m_kpq(ib2,ib1)) + & -cI*Mm_kpq(ib2,ib1,jb2,jb1)*(dG_in(ib2,jb2,ikm1_ibz)-dG_in(ib2,jb2,ikp1_ibz) & + & +1._SP/q_fac*(A1m_kpq(ib2,jb2)-A2m_kpq(ib2,jb2)+A1p_kmq(ib2,jb2)-A2p_kmq(ib2,jb2)) ) enddo enddo enddo From 166bce0bd60c372eb14b75739c07268c908c893b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 24 Feb 2025 12:35:59 +0100 Subject: [PATCH 0889/1367] Version 5.3.0, Revision 24444, Hash 6feda57176 MODIFIED * configure include/version/version.m4 Changes: - configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 55 +++++++++++++++++++++++++++++--------- include/version/version.m4 | 6 ++--- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/configure b/configure index edfb3ddb64..f6a7793e43 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24242 h.f73893ac25. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24444 h.6feda57176. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24242 h.f73893ac25' -PACKAGE_STRING='Yambo 5.3.0 r.24242 h.f73893ac25' +PACKAGE_VERSION='5.3.0 r.24444 h.6feda57176' +PACKAGE_STRING='Yambo 5.3.0 r.24444 h.6feda57176' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -700,6 +700,8 @@ DEVXLIB_check LIBXC_check YPY_check YDB_check +SLEPC_info +PETSC_info SLEPC_check PETSC_check ELPA_check @@ -724,6 +726,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check with_devxlib_branch DEVXLIB_info @@ -938,6 +941,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -997,6 +1002,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1677,7 +1683,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24242 h.f73893ac25 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24444 h.6feda57176 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1749,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24242 h.f73893ac25:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24444 h.6feda57176:";; esac cat <<\_ACEOF @@ -1756,6 +1762,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1988,7 +1995,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24242 h.f73893ac25 +Yambo configure 5.3.0 r.24444 h.6feda57176 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2624,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24242 h.f73893ac25, which was +It was created by Yambo $as_me 5.3.0 r.24444 h.6feda57176, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3382,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24242" -SHASH="f73893ac25" +SREVISION="24444" +SHASH="6feda57176" @@ -3528,6 +3535,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -16803,6 +16824,9 @@ LIBS="$acx_devxlib_save_LIBS" DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -16915,19 +16939,21 @@ if test "$internal_blacs" = "yes" ; then fi # PETSC_check="-" +PETSC_info="" if test "$internal_petsc" = "yes" ; then if test "$compile_petsc" = "yes" ; then PETSC_check="C"; fi if test "$compile_petsc" = "no" ; then PETSC_check="I"; fi - if ! test "$with_petsc_branch" = "none"; then PETSC_LIBS="$PETSC_LIBS (git branch $with_petsc_branch)"; fi + if ! test "$with_petsc_branch" = "none"; then PETSC_info="(git branch $with_petsc_branch)"; fi elif test "$enable_petsc" = "yes" ; then PETSC_check="E" fi # SLEPC_check="-" +SLEPC_info="" if test "$internal_slepc" = "yes" ; then if test "$compile_slepc" = "yes" ; then SLEPC_check="C"; fi if test "$compile_slepc" = "no" ; then SLEPC_check="I"; fi - if ! test "$with_slepc_branch" = "none"; then SLEPC_LIBS="$SLEPC_LIBS (git branch $with_slepc_branch)"; fi + if ! test "$with_slepc_branch" = "none"; then SLEPC_info="(git branch $with_slepc_branch)"; fi elif test "$enable_slepc" = "yes" ; then SLEPC_check="E" fi @@ -16998,6 +17024,7 @@ fi + # @@ -17022,6 +17049,8 @@ fi + + # @@ -18026,7 +18055,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24242 h.f73893ac25, which was +This file was extended by Yambo $as_me 5.3.0 r.24444 h.6feda57176, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18119,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24242 h.f73893ac25 +Yambo config.status 5.3.0 r.24444 h.6feda57176 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 4970aaf7c7..d081810c11 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24242 h.f73893ac25, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24444 h.6feda57176, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24242" -SHASH="f73893ac25" +SREVISION="24444" +SHASH="6feda57176" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From a13e302daf5ec95d93ba08878aa2cc4a1da9fda7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 24 Feb 2025 23:57:47 +0100 Subject: [PATCH 0890/1367] Version 5.3.0, Revision 24474, Hash 599f291f2f MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_build_der_k.F real_time_hamiltonian/RT_Hamiltonian.F real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - Saving work done so far Patch sent by: Davide Sangalli --- configure | 22 ++-- include/version/version.m4 | 6 +- src/dipoles/DIPOLE_build_der_k.F | 109 ++++++++++-------- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 +- .../RT_gradk_rho_times_E.F | 64 +++++++--- 5 files changed, 121 insertions(+), 82 deletions(-) diff --git a/configure b/configure index 4491b81705..4e1b04bf47 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24473 h.1a32d75c29. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24474 h.599f291f2f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24473 h.1a32d75c29' -PACKAGE_STRING='Yambo 5.3.0 r.24473 h.1a32d75c29' +PACKAGE_VERSION='5.3.0 r.24474 h.599f291f2f' +PACKAGE_STRING='Yambo 5.3.0 r.24474 h.599f291f2f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1677,7 +1677,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24473 h.1a32d75c29 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24474 h.599f291f2f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1743,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24473 h.1a32d75c29:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24474 h.599f291f2f:";; esac cat <<\_ACEOF @@ -1988,7 +1988,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24473 h.1a32d75c29 +Yambo configure 5.3.0 r.24474 h.599f291f2f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2617,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24473 h.1a32d75c29, which was +It was created by Yambo $as_me 5.3.0 r.24474 h.599f291f2f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3375,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24473" -SHASH="1a32d75c29" +SREVISION="24474" +SHASH="599f291f2f" @@ -18026,7 +18026,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24473 h.1a32d75c29, which was +This file was extended by Yambo $as_me 5.3.0 r.24474 h.599f291f2f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18090,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24473 h.1a32d75c29 +Yambo config.status 5.3.0 r.24474 h.599f291f2f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0a218a2b6d..73d196b08f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24473 h.1a32d75c29, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24474 h.599f291f2f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24473" -SHASH="1a32d75c29" +SREVISION="24474" +SHASH="599f291f2f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 273a15cbd5..61703d9461 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -59,7 +59,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) integer :: istep,max_step,ikm1,ikp1 complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:),delta(:,:) ! - logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) + logical :: deg_table_k(Dip%ib(2),Dip%ib(2)) integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k real(SP) :: Ev_m_Ec_KS,deg_thresh character(1)::str(3)=(/'x','y','z'/) @@ -140,63 +140,21 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) idx=k_periodic_idx(idx,k_map) ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! - call degeneration_finder(Xen%E(1:Dip%ib(2),Xk%sstar(ikp1,1),i_sp_pol),Dip%ib(2),& - & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) - ! - deg_table_kp=.false. - do i_grp=1,n_deg_grp_k - do ib=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 - do ibp=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 - deg_table_kp(ib,ibp)=.true. - deg_table_kp(ibp,ib)=.true. - enddo - enddo - enddo - ! idx=k_map%k_map_inv(ikbz,:) idx(id_red)=idx(id_red)-istep idx=k_periodic_idx(idx,k_map) ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! - call degeneration_finder(Xen%E(1:Dip%ib(2),Xk%sstar(ikm1,1),i_sp_pol),Dip%ib(2),& - & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) - ! - deg_table_km=.false. - do i_grp=1,n_deg_grp_k - do ib=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 - do ibp=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 - deg_table_km(ib,ibp)=.true. - deg_table_km(ibp,ib)=.true. - enddo - enddo - enddo - ! U_r(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) + call get_unitary_g_from_SVD(Xen,Xk,(/1,Dip%ib(2)/),ikp1,i_sp_pol,& + & deg_table_k,deg_thresh,U_r(:,:,1),U_r(:,:,2)) + !U_r(:,:,1)=U_r(:,:,2) + ! U_l(:,:,1)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) - ! - U_r(:,:,2)=U_r(:,:,1) - U_l(:,:,2)=U_l(:,:,1) - ! - do ib=1,Dip%ib(2) - do ibp=1,Dip%ib(2) - if(deg_table_k(ibp,ib).or.deg_table_kp(ibp,ib)) cycle - U_r(ib,ibp,2)=cZERO - enddo - enddo - ! - do ib=1,Dip%ib(2) - do ibp=1,Dip%ib(2) - if(deg_table_k(ibp,ib).or.deg_table_km(ibp,ib)) cycle - U_l(ib,ibp,2)=cZERO - enddo - enddo - ! - !U_r(:,:,1)=U_r(:,:,2) !-U_r(:,:,2) - !U_l(:,:,1)=U_l(:,:,2) !-U_l(:,:,2) + call get_unitary_g_from_SVD(Xen,Xk,(/1,Dip%ib(2)/),ikm1,i_sp_pol,& + & deg_table_k,deg_thresh,U_l(:,:,1),U_l(:,:,2)) + !U_l(:,:,1)=U_l(:,:,2) ! - call SERIAL_SVD(Dip%ib(2),U_r(:,:,2),'uni',0) - call SERIAL_SVD(Dip%ib(2),U_l(:,:,2),'uni',0) - ! Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,2)) ) & & -matmul(U_l(:,:,1),hermitian(U_l(:,:,2)) ) ! @@ -290,3 +248,54 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) return ! end subroutine DIPOLE_build_der_k +! +! +subroutine get_unitary_g_from_SVD(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_thresh,U_in,U_out) + ! + use pars, ONLY:SP,cZERO + use R_lattice, ONLY:bz_samp + use electrons, ONLY:levels + use vec_operate, ONLY:degeneration_finder + ! + implicit none + ! + type(levels), intent(in) :: Xen + type(bz_samp), intent(in) :: Xk + ! + integer, intent(in) :: nb(2),ikpbz,i_sp_pol + logical, intent(in) :: deg_table_k(nb(1):nb(2),nb(1):nb(2)) + real(SP),intent(in) :: deg_thresh + ! + complex(SP), intent(in) :: U_in(nb(1):nb(2),nb(1):nb(2)) + complex(SP), intent(out) :: U_out(nb(1):nb(2),nb(1):nb(2)) + ! + ! Workspace + ! + integer :: ib,ibp,i_grp,first_el_k(nb(2)-nb(1)+1),n_of_el_k(nb(2)-nb(1)+1),n_deg_grp_k + logical :: deg_table_kp(nb(1):nb(2),nb(1):nb(2)) + ! + call degeneration_finder(Xen%E(nb(1):nb(2),Xk%sstar(ikpbz,1),i_sp_pol),nb(2)-nb(1)+1,& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_kp=.false. + do i_grp=1,n_deg_grp_k + do ib=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + deg_table_kp(ib,ibp)=.true. + deg_table_kp(ibp,ib)=.true. + enddo + enddo + enddo + ! + U_out=U_in + ! + do ib=nb(1),nb(2) + do ibp=nb(1),nb(2) + if(deg_table_k(ibp,ib).or.deg_table_kp(ibp,ib)) cycle + U_out(ib,ibp)=cZERO + enddo + enddo + ! + call SERIAL_SVD(nb(2)-nb(1)+1,U_out,'uni',0) + ! +end subroutine diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index f27eda44bf..a8c143ebdf 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -196,7 +196,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO call RT_apply_field(ik,1,H_nl_sc,A_input) - call RT_gradk_rho_times_E(ik,1,H_nl_sc,dG_in,A_input,k) + call RT_gradk_rho_times_E(ik,1,H_nl_sc,dG_in,A_input,k,E) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) H_field(:,:,ik_RT,1)=H_nl_sc call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index d9ca8956bf..c8030badc7 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -5,20 +5,21 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) +subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! ! This subroutine computes the k-gradient of the density matrix, ! and multiplies it by the electric field. ! See Phys. Rev. B 76, 035213 (2007) ! use pars, ONLY:SP,cI,cZERO,pi - use units, ONLY:SPEED_OF_LIGHT + use units, ONLY:SPEED_OF_LIGHT,HA2EV use real_time, ONLY:l_length_grad_k,RT_bands use fields, ONLY:gauge_field use real_time, ONLY:RT_bands,NE_i_time,NE_i_last_field - use vec_operate, ONLY:k_periodic_idx!,degeneration_finder + use vec_operate, ONLY:k_periodic_idx,degeneration_finder use matrix_operate, ONLY:hermitian use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd + use electrons, ONLY:levels use R_lattice, ONLY:bz_samp,k_map use D_lattice, ONLY:a use parallel_m, ONLY:PAR_G_k_range @@ -30,14 +31,18 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) type(gauge_field), intent(in) :: A_input type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen ! ! Workspace ! - logical :: l_dips_term + logical :: l_dips_term,l_svd integer :: id_red,max_step,istep,idx(3),idir,ib1,ib2,jb1,jb2,nb(2),& ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is real(SP) :: q_fac,E_field(3) - complex(SP) :: Dip_kp_c(3),Dip_km_c(3) + complex(SP) :: DIP_kp_c(3),DIP_km_c(3) + integer :: ib,ibp,i_grp,first_el_k(RT_bands(2)-RT_bands(1)+1),n_of_el_k(RT_bands(2)-RT_bands(1)+1),n_deg_grp_k + logical :: deg_table_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + real(SP) :: deg_thresh ! !complex(SP) :: Mp_kmq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& !& Mm_kpq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& @@ -47,9 +52,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) !& DIP_kp(RT_bands(2),RT_bands(2)),DIP_km(RT_bands(2),RT_bands(2)) ! complex(SP), allocatable :: Mp_kmq(:,:,:,:),Mm_kpq(:,:,:,:),& - & Sp_kmq(:,:),Sm_kpq(:,:),& - & A1p_kmq(:,:),A1m_kpq(:,:),& - & A2p_kmq(:,:),A2m_kpq(:,:),& + & Sp_kmq(:,:),Sm_kpq(:,:),gp_kmq(:,:),gm_kpq(:,:),& + & A1p_kmq(:,:),A1m_kpq(:,:),A2p_kmq(:,:),A2m_kpq(:,:),& & DIP_kp(:,:),DIP_km(:,:) ! complex(SP) :: gradk_rho(RT_Bands(1):RT_bands(2),RT_bands(1):RT_bands(2),3),& @@ -66,6 +70,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) if (NE_i_time>NE_i_last_field) return ! l_dips_term=.false. + l_svd=.false. + deg_thresh=1.E-5/HA2EV ! nb=RT_bands ! @@ -75,6 +81,9 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) allocate(Sp_kmq(nb(1):nb(2),nb(1):nb(2))) allocate(Sm_kpq(nb(1):nb(2),nb(1):nb(2))) ! + allocate(gp_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(gm_kpq(nb(1):nb(2),nb(1):nb(2))) + ! allocate(A1p_kmq(nb(1):nb(2),nb(1):nb(2))) allocate(A1m_kpq(nb(1):nb(2),nb(1):nb(2))) ! @@ -86,6 +95,23 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) ! ikbz=Xk%k_table(ik,1) ! + if (l_svd) then + ! + call degeneration_finder(Xen%E(nb(1):nb(2),ik,i_sp_pol),nb(2)-nb(1)+1,& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp_k + do ib=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + deg_table_k(ib,ibp)=.true. + deg_table_k(ibp,ib)=.true. + enddo + enddo + enddo + ! + endif + ! gradk_rho=cZERO ! do id_red=1,3 ! loop on reciprocal lattice @@ -123,21 +149,25 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk) !S_tmp(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! g-(k)=g+(k-q) ! !S_kpq(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikp1,i_sp_pol) ! g+(k+q) - Sm_kpq(:,:)=hermitian(DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! g-(k+q)=g+(k) + Sm_kpq(:,:)=hermitian(DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! (g-(k+q)=) g+(k)\dag ! - Sp_kmq(:,:)= DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) + Sp_kmq(:,:)= DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) (=g-(k)\dag) !S_kmq(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm2,i_sp_pol)) ! g-(k-q)=g+(k-2*q) ! - ! Option 1: Do SVD and later dagger. - ! Coding to be imported from DIPOLE_build_derk subroutine in branch phys-dipoles-k-derivative - ! - ! Option 2: Directly do matrix inversion in place of dagger. + if (l_svd) then + call get_unitary_g_from_SVD(Xen,Xk,RT_bands,ikp1,i_sp_pol,& + & deg_table_k,deg_thresh,Sm_kpq,gm_kpq) + call get_unitary_g_from_SVD(Xen,Xk,RT_Bands,ikm1,i_sp_pol,& + & deg_table_k,deg_thresh,Sp_kmq,gp_kmq) + else + gm_kpq=Sm_kpq + gp_kmq=Sp_kmq + endif ! - ! Option 3: Use the dagger without SVD. do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) - Mp_kmq(ib1,ib2,:,:)=conjg(Sp_kmq(ib1,ib2))*Sp_kmq(:,:) - Mm_kpq(ib1,ib2,:,:)=conjg(Sm_kpq(ib1,ib2))*Sm_kpq(:,:) + Mp_kmq(ib1,ib2,:,:)=conjg(gp_kmq(ib1,ib2))*gp_kmq(:,:) + Mm_kpq(ib1,ib2,:,:)=conjg(gm_kpq(ib1,ib2))*gm_kpq(:,:) enddo enddo ! From eaad51072061795241594eea82912b3195453b7e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Feb 2025 00:33:43 +0100 Subject: [PATCH 0891/1367] Version 5.3.0, Revision 24475, Hash a13e302daf MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_build_der_k.F real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - Fixed issue with change in DIPOLE_build_der_k implementation Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/dipoles/DIPOLE_build_der_k.F | 12 +++++----- .../RT_gradk_rho_times_E.F | 4 ++-- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 4e1b04bf47..ac88b37423 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24474 h.599f291f2f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24475 h.a13e302daf. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24474 h.599f291f2f' -PACKAGE_STRING='Yambo 5.3.0 r.24474 h.599f291f2f' +PACKAGE_VERSION='5.3.0 r.24475 h.a13e302daf' +PACKAGE_STRING='Yambo 5.3.0 r.24475 h.a13e302daf' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1677,7 +1677,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24474 h.599f291f2f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24475 h.a13e302daf to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1743,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24474 h.599f291f2f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24475 h.a13e302daf:";; esac cat <<\_ACEOF @@ -1988,7 +1988,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24474 h.599f291f2f +Yambo configure 5.3.0 r.24475 h.a13e302daf generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2617,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24474 h.599f291f2f, which was +It was created by Yambo $as_me 5.3.0 r.24475 h.a13e302daf, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3375,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24474" -SHASH="599f291f2f" +SREVISION="24475" +SHASH="a13e302daf" @@ -18026,7 +18026,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24474 h.599f291f2f, which was +This file was extended by Yambo $as_me 5.3.0 r.24475 h.a13e302daf, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18090,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24474 h.599f291f2f +Yambo config.status 5.3.0 r.24475 h.a13e302daf configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 73d196b08f..9dfac9a586 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24474 h.599f291f2f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24475 h.a13e302daf, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24474" -SHASH="599f291f2f" +SREVISION="24475" +SHASH="a13e302daf" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 61703d9461..8e73e96ee8 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -59,7 +59,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) integer :: istep,max_step,ikm1,ikp1 complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:),delta(:,:) ! - logical :: deg_table_k(Dip%ib(2),Dip%ib(2)) + logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k real(SP) :: Ev_m_Ec_KS,deg_thresh character(1)::str(3)=(/'x','y','z'/) @@ -148,13 +148,11 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) U_r(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) call get_unitary_g_from_SVD(Xen,Xk,(/1,Dip%ib(2)/),ikp1,i_sp_pol,& & deg_table_k,deg_thresh,U_r(:,:,1),U_r(:,:,2)) - !U_r(:,:,1)=U_r(:,:,2) - ! + ! U_l(:,:,1)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) call get_unitary_g_from_SVD(Xen,Xk,(/1,Dip%ib(2)/),ikm1,i_sp_pol,& & deg_table_k,deg_thresh,U_l(:,:,1),U_l(:,:,2)) - !U_l(:,:,1)=U_l(:,:,2) - ! + ! Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,2)) ) & & -matmul(U_l(:,:,1),hermitian(U_l(:,:,2)) ) ! @@ -279,8 +277,8 @@ subroutine get_unitary_g_from_SVD(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_thres ! deg_table_kp=.false. do i_grp=1,n_deg_grp_k - do ib=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 - do ibp=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ib=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 deg_table_kp(ib,ibp)=.true. deg_table_kp(ibp,ib)=.true. enddo diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index c8030badc7..e07650cc4e 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -102,8 +102,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! deg_table_k=.false. do i_grp=1,n_deg_grp_k - do ib=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 - do ibp=nb(1)+first_el_k(i_grp),nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ib=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 deg_table_k(ib,ibp)=.true. deg_table_k(ibp,ib)=.true. enddo From 36aa6cf58102ffa74d83c789abcc050c9bbb55bc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Feb 2025 14:58:21 +0100 Subject: [PATCH 0892/1367] Version 5.3.0, Revision 23949, Hash cdf88af1ad MODIFIED * configure include/version/version.m4 NEW * Discussion_AD_DS_20250225.dat Additions: - Created file with discussion with AndreaF Patch sent by: Davide Sangalli --- Discussion_AD_DS_20250225.dat | 29 +++++++++++++++++++++++++++++ configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- 3 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 Discussion_AD_DS_20250225.dat diff --git a/Discussion_AD_DS_20250225.dat b/Discussion_AD_DS_20250225.dat new file mode 100644 index 0000000000..fbf90acd1b --- /dev/null +++ b/Discussion_AD_DS_20250225.dat @@ -0,0 +1,29 @@ + + +- mod_wrapper --> wrapper yambo for single and double to blas --> when available calls devxlib single and double subroutines + +- mod_linear algebra has wrappers single and double to few selected lapack + --> LU_factorization + --> SV_decomposition + +- dedicated subroutines which interfaces lapack or magma (single and double precision version), and serial or parallel (?) + + SERIAL_HERMITIAN_diagonalization --> could be renamed HEEV + SERIAL_diagonalization (non hermitian case) --> could be renamed GEEV ? + SERIAL_inversion + SERIAL_SVD_inversion + SERIAL_lin_system (to be merge also with SERIAL_lin_system_gpu) + + PARALLEL_HERMITIAN_diagonalization --> could be merged with SERIAL_HERMITIAN_diagonalization + PARALLEL_diagonalization (non hermitian case) --> could be merged with SERIAL_diagonalization + + PARALLEL_MbyM could be created (for now it does not exist) + + The kind of operation could be managed via an handle, however the sobroutines must be cleaned by all extra operations, e.g. + allocation, parallel setup, etc ... which should be shifted inside LINEAR_ALGEBRA_init or similar subroutine + + LINEAR_ALGEBRA_driver is never directly called, but the above subroutines are directly called. It only performs initializations + + +- To be removed: + M_eigenvalues, heev and geev interfaces diff --git a/configure b/configure index 4cb86dc232..628efd2e0f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23906 h.8a510177c. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23949 h.cdf88af1ad. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23906 h.8a510177c' -PACKAGE_STRING='Yambo 5.3.0 r.23906 h.8a510177c' +PACKAGE_VERSION='5.3.0 r.23949 h.cdf88af1ad' +PACKAGE_STRING='Yambo 5.3.0 r.23949 h.cdf88af1ad' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1659,7 +1659,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23906 h.8a510177c to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.23949 h.cdf88af1ad to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1725,7 +1725,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23906 h.8a510177c:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.23949 h.cdf88af1ad:";; esac cat <<\_ACEOF @@ -1967,7 +1967,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23906 h.8a510177c +Yambo configure 5.3.0 r.23949 h.cdf88af1ad generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2596,7 +2596,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23906 h.8a510177c, which was +It was created by Yambo $as_me 5.3.0 r.23949 h.cdf88af1ad, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3354,8 +3354,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23906" -SHASH="8a510177c" +SREVISION="23949" +SHASH="cdf88af1ad" @@ -17784,7 +17784,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23906 h.8a510177c, which was +This file was extended by Yambo $as_me 5.3.0 r.23949 h.cdf88af1ad, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17848,7 +17848,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23906 h.8a510177c +Yambo config.status 5.3.0 r.23949 h.cdf88af1ad configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 1e618cf693..af36ce0f55 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.23906 h.8a510177c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.23949 h.cdf88af1ad, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="23906" -SHASH="8a510177c" +SREVISION="23949" +SHASH="cdf88af1ad" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From a8946d35365cd31f15acf8ca65d7739f27244093 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 27 Feb 2025 15:32:43 +0100 Subject: [PATCH 0893/1367] Version 5.3.0, Revision 24476, Hash eaad510720 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_build_der_k.F real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - [yambo_rt] Saving local changes Patch sent by: Davide Sangalli --- configure | 22 ++++++++--------- include/version/version.m4 | 6 ++--- src/dipoles/DIPOLE_build_der_k.F | 24 ++++++++++++------- .../RT_gradk_rho_times_E.F | 17 ++++++++----- 4 files changed, 40 insertions(+), 29 deletions(-) diff --git a/configure b/configure index ac88b37423..da6c4f1a00 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24475 h.a13e302daf. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24476 h.eaad510720. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24475 h.a13e302daf' -PACKAGE_STRING='Yambo 5.3.0 r.24475 h.a13e302daf' +PACKAGE_VERSION='5.3.0 r.24476 h.eaad510720' +PACKAGE_STRING='Yambo 5.3.0 r.24476 h.eaad510720' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1677,7 +1677,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24475 h.a13e302daf to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24476 h.eaad510720 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1743,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24475 h.a13e302daf:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24476 h.eaad510720:";; esac cat <<\_ACEOF @@ -1988,7 +1988,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24475 h.a13e302daf +Yambo configure 5.3.0 r.24476 h.eaad510720 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2617,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24475 h.a13e302daf, which was +It was created by Yambo $as_me 5.3.0 r.24476 h.eaad510720, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3375,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24475" -SHASH="a13e302daf" +SREVISION="24476" +SHASH="eaad510720" @@ -18026,7 +18026,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24475 h.a13e302daf, which was +This file was extended by Yambo $as_me 5.3.0 r.24476 h.eaad510720, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18090,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24475 h.a13e302daf +Yambo config.status 5.3.0 r.24476 h.eaad510720 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 9dfac9a586..eb69e84210 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24475 h.a13e302daf, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24476 h.eaad510720, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24475" -SHASH="a13e302daf" +SREVISION="24476" +SHASH="eaad510720" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 8e73e96ee8..d2e1b606f7 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -83,8 +83,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) ! call live_timing("Build Rotation Matrices:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) ! - YAMBO_ALLOC(U_l,(Dip%ib(2),Dip%ib(2),2)) - YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(U_l,(Dip%ib(2),Dip%ib(2),3)) + YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) YAMBO_ALLOC(delta,(Dip%ib(2),Dip%ib(2))) @@ -146,15 +146,23 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) ! U_r(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) - call get_unitary_g_from_SVD(Xen,Xk,(/1,Dip%ib(2)/),ikp1,i_sp_pol,& + call zeroing_disconnected_blocks(Xen,Xk,(/1,Dip%ib(2)/),ikp1,i_sp_pol,& & deg_table_k,deg_thresh,U_r(:,:,1),U_r(:,:,2)) + U_r(:,:,3)=U_r(:,:,2) + call SERIAL_SVD(Dip%ib(2),U_r(:,:,3),'uni',0) ! U_l(:,:,1)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) - call get_unitary_g_from_SVD(Xen,Xk,(/1,Dip%ib(2)/),ikm1,i_sp_pol,& + call zeroing_disconnected_blocks(Xen,Xk,(/1,Dip%ib(2)/),ikm1,i_sp_pol,& & deg_table_k,deg_thresh,U_l(:,:,1),U_l(:,:,2)) + U_l(:,:,3)=U_l(:,:,2) + call SERIAL_SVD(Dip%ib(2),U_l(:,:,3),'uni',0) ! - Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,2)) ) & -& -matmul(U_l(:,:,1),hermitian(U_l(:,:,2)) ) + ! Yambo version + Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,3)) ) & + & -matmul(U_l(:,:,1),hermitian(U_l(:,:,3)) ) + ! Virk-Sipe version + !Der_k_red(:,:,istep)=+matmul((U_r(:,:,1)-U_r(:,:,2)),hermitian(U_r(:,:,3)) ) & + !& -matmul((U_l(:,:,1)-U_l(:,:,2)),hermitian(U_l(:,:,3)) ) ! ! This contains the i/2q factor ! 1/q=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) @@ -248,7 +256,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) end subroutine DIPOLE_build_der_k ! ! -subroutine get_unitary_g_from_SVD(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_thresh,U_in,U_out) +subroutine zeroing_disconnected_blocks(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_thresh,U_in,U_out) ! use pars, ONLY:SP,cZERO use R_lattice, ONLY:bz_samp @@ -294,6 +302,4 @@ subroutine get_unitary_g_from_SVD(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_thres enddo enddo ! - call SERIAL_SVD(nb(2)-nb(1)+1,U_out,'uni',0) - ! end subroutine diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index e07650cc4e..e83b21ef9d 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -23,6 +23,7 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) use R_lattice, ONLY:bz_samp,k_map use D_lattice, ONLY:a use parallel_m, ONLY:PAR_G_k_range + use parser_m, ONLY:parser ! implicit none ! @@ -69,8 +70,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! if (NE_i_time>NE_i_last_field) return ! - l_dips_term=.false. - l_svd=.false. + call parser("RTgradkDips",l_dips_term) + l_svd=.true. deg_thresh=1.E-5/HA2EV ! nb=RT_bands @@ -155,10 +156,12 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) !S_kmq(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm2,i_sp_pol)) ! g-(k-q)=g+(k-2*q) ! if (l_svd) then - call get_unitary_g_from_SVD(Xen,Xk,RT_bands,ikp1,i_sp_pol,& + call zeroing_disconnected_blocks(Xen,Xk,RT_bands,ikp1,i_sp_pol,& & deg_table_k,deg_thresh,Sm_kpq,gm_kpq) - call get_unitary_g_from_SVD(Xen,Xk,RT_Bands,ikm1,i_sp_pol,& + call SERIAL_SVD(nb(2)-nb(1)+1,Sm_kpq,'uni',0) + call zeroing_disconnected_blocks(Xen,Xk,RT_Bands,ikm1,i_sp_pol,& & deg_table_k,deg_thresh,Sp_kmq,gp_kmq) + call SERIAL_SVD(nb(2)-nb(1)+1,Sp_kmq,'uni',0) else gm_kpq=Sm_kpq gp_kmq=Sp_kmq @@ -228,8 +231,10 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) do jb2=RT_bands(1),RT_bands(2) ! ib1=n, jb1=m, ib2=l, jb2=l' gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & - & -cI*Mm_kpq(ib2,ib1,jb2,jb1)*(dG_in(ib2,jb2,ikm1_ibz)-dG_in(ib2,jb2,ikp1_ibz) & - & +1._SP/q_fac*(A1m_kpq(ib2,jb2)-A2m_kpq(ib2,jb2)+A1p_kmq(ib2,jb2)-A2p_kmq(ib2,jb2)) ) + & -cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1_ibz)+ & + & +cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1_ibz)+ & + & -cI/q_fac*Mm_kpq(ib2,ib1,jb2,jb1)*(A1m_kpq(ib2,jb2)-A2m_kpq(ib2,jb2))+ & + & -cI/q_fac*Mp_kmq(ib2,ib1,jb2,jb1)*(A1p_kmq(ib2,jb2)-A2p_kmq(ib2,jb2)) enddo enddo enddo From d299a4df65512760226c2136a5711da66c263e53 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 28 Feb 2025 10:29:34 +0100 Subject: [PATCH 0894/1367] Version 5.3.0, Revision 24477, Hash a8946d3536 MODIFIED * configure include/version/version.m4 real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - [yambo_rt] saving local changes Patch sent by: Davide Sangalli --- configure | 22 +- include/version/version.m4 | 6 +- .../RT_gradk_rho_times_E.F | 189 +++++++++++++++++- 3 files changed, 200 insertions(+), 17 deletions(-) diff --git a/configure b/configure index da6c4f1a00..65e8ea508c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24476 h.eaad510720. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24477 h.a8946d3536. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24476 h.eaad510720' -PACKAGE_STRING='Yambo 5.3.0 r.24476 h.eaad510720' +PACKAGE_VERSION='5.3.0 r.24477 h.a8946d3536' +PACKAGE_STRING='Yambo 5.3.0 r.24477 h.a8946d3536' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1677,7 +1677,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24476 h.eaad510720 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24477 h.a8946d3536 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1743,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24476 h.eaad510720:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24477 h.a8946d3536:";; esac cat <<\_ACEOF @@ -1988,7 +1988,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24476 h.eaad510720 +Yambo configure 5.3.0 r.24477 h.a8946d3536 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2617,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24476 h.eaad510720, which was +It was created by Yambo $as_me 5.3.0 r.24477 h.a8946d3536, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3375,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24476" -SHASH="eaad510720" +SREVISION="24477" +SHASH="a8946d3536" @@ -18026,7 +18026,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24476 h.eaad510720, which was +This file was extended by Yambo $as_me 5.3.0 r.24477 h.a8946d3536, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18090,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24476 h.eaad510720 +Yambo config.status 5.3.0 r.24477 h.a8946d3536 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index eb69e84210..e921b9a98f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24476 h.eaad510720, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24477 h.a8946d3536, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24476" -SHASH="eaad510720" +SREVISION="24477" +SHASH="a8946d3536" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index e83b21ef9d..516438cece 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -6,6 +6,190 @@ ! Authors (see AUTHORS file for details): DS ! subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) + ! + ! This subroutine computes the k-gradient of the density matrix, + ! and multiplies it by the electric field. + ! See Phys. Rev. B 76, 035213 (2007) + ! + ! To guage the density matrix it uses the phases matrixi of the dipoles + ! defined in Phys. Rev. Lett. 131, 236902 (2023) + ! In doing so we move into a gauge where the dipoles projected along E are real. + ! Not sure if such gauge really makes sense ... + ! + use pars, ONLY:SP,cI,cZERO,cONE,pi + use units, ONLY:SPEED_OF_LIGHT,HA2EV + use real_time, ONLY:l_length_grad_k,RT_bands + use fields, ONLY:gauge_field + use real_time, ONLY:RT_bands,NE_i_time,NE_i_last_field + use vec_operate, ONLY:k_periodic_idx,degeneration_finder + use matrix_operate, ONLY:hermitian + use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp,k_map + use D_lattice, ONLY:a + use parallel_m, ONLY:PAR_G_k_range + use parser_m, ONLY:parser + ! + implicit none + ! + integer, intent(in) :: ik,i_sp_pol + complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + type(gauge_field), intent(in) :: A_input + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + ! + ! Workspace + ! + logical :: l_dips_term + integer :: id_red,max_step,istep,idx(3),idir,ib1,jb1,nb(2),& + ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is + real(SP) :: q_fac,E_field(3) + complex(SP) :: DIP_kp_c(3),DIP_km_c(3),DIP_k_c(3) + real(SP) :: DIP_kp_mod,DIP_km_mod,DIP_k_mod + ! + complex(SP), allocatable :: DIP_kp(:,:),DIP_km(:,:) + ! + complex(SP) :: gradk_rho(RT_Bands(1):RT_bands(2),RT_bands(1):RT_bands(2),3),& + & gradk_rho_red(RT_Bands(1):RT_bands(2),RT_Bands(1):RT_bands(2),2) + ! + ! Warning: kpts parallelization to be fixed, since rho is distributed + ! + if (.not.l_length_grad_k) return + ! + ! Length gauge + !=============== + E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units + ! + if (NE_i_time>NE_i_last_field) return + ! + nb=RT_bands + call parser("RTgradkDips",l_dips_term) + ! + allocate(DIP_kp(nb(1):nb(2),nb(1):nb(2))) + allocate(DIP_km(nb(1):nb(2),nb(1):nb(2))) + ! + ikbz=Xk%k_table(ik,1) + ! + gradk_rho=cZERO + ! + do id_red=1,3 ! loop on reciprocal lattice + ! + if(k_map%max_kdir(id_red)==1) cycle + ! + max_step=1 + ! + ! I need at leat 5 k-points in the line to + ! use the second order formula + ! + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 + ! + gradk_rho_red=cZERO + ! + do istep=1,max_step + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)-istep + idx=k_periodic_idx(idx,k_map) + ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + ikm1_ibz=Xk%sstar(ikm1,1) + ikm1_is =Xk%sstar(ikm1,2) + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)+istep + idx=k_periodic_idx(idx,k_map) + ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + ikp1_ibz=Xk%sstar(ikp1,1) + ikp1_is =Xk%sstar(ikp1,2) + ! + if (l_dips_term) then + DIP_km=cZERO + DIP_kp=cZERO + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + call DIPOLE_rotate(jb1,ib1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) + call DIPOLE_rotate(jb1,ib1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles + DIP_km_mod=sqrt(abs(DIP_km_c(1))**2+abs(DIP_km_c(2))**2+abs(DIP_km_c(3))**2) + DIP_kp_mod=sqrt(abs(DIP_kp_c(1))**2+abs(DIP_kp_c(2))**2+abs(DIP_kp_c(3))**2) + do idir=1,3 + DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir)/DIP_km_mod + DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir)/DIP_kp_mod + enddo + enddo + enddo + else + DIP_km=cONE + DIP_kp=cONE + endif + ! + ! 1/q factor = k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & + & -cI*(dG_in(ib1,jb1,ikp1_ibz)*conjg(DIP_km(ib1,jb1))+ & + & -dG_in(ib1,jb1,ikm1_ibz)*conjg(DIP_kp(ib1,jb1)) ) + enddo + enddo + ! + gradk_rho_red(:,:,istep)=gradk_rho_red(:,:,istep)*q_fac/2._SP + ! + enddo ! istep + ! + ! Rotate in cartesian coordinates + ! + if(max_step==1) then + ! + ! First order formula D(dk) + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(gradk_rho_red(:,:,1))*a(id_red,idir) + enddo + ! + else + ! + ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(4._SP*gradk_rho_red(:,:,1)-gradk_rho_red(:,:,2))/3._SP*a(id_red,idir) + enddo + ! + endif + ! + enddo ! id_red + ! + l_dips_term=.false. + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + if (l_dips_term) then + call DIPOLE_rotate(jb1,ib1,ikbz,i_sp_pol,"DIP_iR",Xk,DIP_k_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles + DIP_k_mod =sqrt(abs(DIP_k_c(1))**2+abs(DIP_k_c(2))**2+abs(DIP_k_c(3))**2) + DIP_k_c=-cI*DIP_kp_c/DIP_k_mod + else + DIP_k_c=cONE + endif + do idir=1,3 + H_nl_sc(ib1,jb1)=H_nl_sc(ib1,jb1)-gradk_rho(ib1,jb1,idir)*E_field(idir)*DIP_k_c(idir) + enddo + enddo + enddo + ! + ! +end subroutine RT_gradk_rho_times_E +! +! +subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! ! This subroutine computes the k-gradient of the density matrix, ! and multiplies it by the electric field. @@ -191,7 +375,7 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! DEBUG lines to verify the time gain when non-expanding on the fly !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) - ! As always in yambo, band indexes are inverted in the dipoles + ! As always in yambo, band indexes are inverted in the dipoles do idir=1,3 DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir) DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir) @@ -270,5 +454,4 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,idir)*E_field(idir) enddo ! -end subroutine RT_gradk_rho_times_E - +end subroutine RT_gradk_rho_times_E_wrong From 58e409e43ea3ab6802a410fbe6d828fcf2002f9d Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 28 Feb 2025 15:01:26 +0100 Subject: [PATCH 0895/1367] one more step for magma support impl --- configure | 8415 ++++++++++++++++++-------------------- lib/archive/package.list | 2 +- 2 files changed, 3910 insertions(+), 4507 deletions(-) diff --git a/configure b/configure index 71b154c982..961fa62e10 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23900 h.e51825f30d. +# Generated by GNU Autoconf 2.69 for Yambo 5.3.0 r.23900 h.e51825f30d. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,52 +187,42 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null -then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -222,21 +230,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,19 +255,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,7 +294,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -312,14 +311,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -334,7 +325,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -343,7 +334,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -382,13 +373,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -400,27 +390,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -432,9 +413,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -461,7 +442,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -505,7 +486,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -519,10 +500,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -536,13 +513,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -619,36 +589,40 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir LAPACK_PETSC_INCS_R @@ -667,6 +641,8 @@ PETSC_INCS_R PETSC_LIBS_R BLACS_INCS_R BLACS_LIBS_R +MAGMA_INCS_R +MAGMA_LIBS_R SCALAPACK_INCS_R SCALAPACK_LIBS_R LAPACK_INCS_R @@ -693,6 +669,7 @@ MPI_info MPI_check LIBCUDA_check DEVXLIB_check +MAGMA_check LIBXC_check YPY_check YDB_check @@ -720,6 +697,13 @@ MEM_profile_check TIME_profile_check KEEP_OBJS_check DP_check +internal_magma +compile_magma_fmodules +compile_magma +enable_magma +def_magma +MAGMA_INCS +MAGMA_LIBS with_devxlib_branch DEVXLIB_info internal_devxlib @@ -862,7 +846,6 @@ FFLAGS F77 FPP CPPFLAGS_yambo -CPP IFLAG FCLIBS OPENMPLIBS @@ -896,9 +879,6 @@ AR MAKE ifGNUmake hostname -SIZEOF_INT_P -SET_MAKE -LIBOBJS host_os host_vendor host_cpu @@ -907,9 +887,15 @@ build_os build_vendor build_cpu build +SIZEOF_INT_P +SET_MAKE +LIBOBJS ALLOCA Y_BRANCH GIT_CHECK +EGREP +GREP +CPP OBJEXT EXEEXT ac_ct_CC @@ -954,7 +940,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1092,6 +1077,12 @@ with_devxlib_path with_devxlib_libdir with_devxlib_includedir with_devxlib_branch +enable_magma_linalg +with_magma_libs +with_magma_incs +with_magma_path +with_magma_libdir +with_magma_includedir ' ac_precious_vars='build_alias host_alias @@ -1101,10 +1092,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP FC FCFLAGS UFLAGS -CPP FPP F77 FFLAGS @@ -1149,7 +1140,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1179,6 +1169,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1219,9 +1211,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1245,9 +1237,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1400,15 +1392,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1458,9 +1441,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1474,9 +1457,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1520,9 +1503,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1538,7 +1521,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1546,7 +1529,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1602,7 +1585,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1699,7 +1682,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1781,6 +1763,8 @@ Optional Features: The configure script will check CUDA installation and report problems [default=yes] --enable-nvtx= Enable NVTX support [default=no] + --enable-magma-linalg Enable suport for the diagonalization of BSE using + MAGMA. Default is no Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1880,6 +1864,12 @@ Optional Packages: Path to the devxlib include directory --with-devxlib-branch= Use the of the devxlib repository. + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory Some influential environment variables: CC C compiler command @@ -1889,10 +1879,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags - CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1919,9 +1909,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1949,8 +1939,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1958,7 +1947,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1968,9 +1957,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Yambo configure 5.3.0 r.23900 h.e51825f30d -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1987,14 +1976,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2002,15 +1991,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2020,6 +2008,176 @@ fi } # ac_fn_c_try_compile +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------- ## +## Report this to yambo@yambo-code.org ## +## ----------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2027,28 +2185,26 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2060,17 +2216,16 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (ac_aggr.$3) @@ -2079,15 +2234,14 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2096,19 +2250,18 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2120,18 +2273,17 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -2139,13 +2291,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -2153,19 +2304,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2176,14 +2326,14 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2191,18 +2341,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2217,79 +2366,102 @@ fi } # ac_fn_c_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -} # ac_fn_c_try_run +#ifdef __STDC__ +# include +#else +# include +#endif -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2305,14 +2477,14 @@ fi ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2320,18 +2492,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2346,58 +2517,20 @@ fi } # ac_fn_fc_try_link -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2405,15 +2538,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2429,14 +2561,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2444,18 +2576,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2470,136 +2601,44 @@ fi } # ac_fn_f77_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2632,12 +2671,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2672,7 +2707,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2707,13 +2742,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2724,8 +2757,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2749,7 +2782,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2757,14 +2790,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2772,15 +2805,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2788,8 +2821,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2803,48 +2836,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2854,508 +2902,92 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" - -# Auxiliary files required by this configure script. -ac_aux_files="config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}/config" - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -SVERSION="5" -SSUBVERSION="3" -SPATCHLEVEL="0" -SREVISION="23900" -SHASH="e51825f30d" +SVERSION="5" +SSUBVERSION="3" +SPATCHLEVEL="0" +SREVISION="23900" +SHASH="e51825f30d" @@ -3374,6 +3006,34 @@ compdir=`echo "$PWD"` if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi # +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # @@ -3436,10 +3096,9 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test ${with_extlibs_path+y} -then : +if test "${with_extlibs_path+set}" = set; then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else $as_nop +else extlibs_path="${PWD}/lib/external" fi @@ -3450,8 +3109,7 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test ${enable_keep_objects+y} -then : +if test "${enable_keep_objects+set}" = set; then : enableval=$enable_keep_objects; fi @@ -3462,8 +3120,7 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test ${enable_keep_src+y} -then : +if test "${enable_keep_src+set}" = set; then : enableval=$enable_keep_src; fi @@ -3474,8 +3131,7 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test ${enable_keep_extlibs+y} -then : +if test "${enable_keep_extlibs+set}" = set; then : enableval=$enable_keep_extlibs; fi @@ -3493,8 +3149,7 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test ${enable_dp+y} -then : +if test "${enable_dp+set}" = set; then : enableval=$enable_dp; fi @@ -3513,8 +3168,7 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test ${enable_time_profile+y} -then : +if test "${enable_time_profile+set}" = set; then : enableval=$enable_time_profile; fi @@ -3530,8 +3184,7 @@ fi # USPP # # Check whether --enable-uspp was given. -if test ${enable_uspp+y} -then : +if test "${enable_uspp+set}" = set; then : enableval=$enable_uspp; fi @@ -3548,8 +3201,7 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test ${enable_memory_profile+y} -then : +if test "${enable_memory_profile+set}" = set; then : enableval=$enable_memory_profile; fi @@ -3565,8 +3217,7 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test ${enable_msgs_comps+y} -then : +if test "${enable_msgs_comps+set}" = set; then : enableval=$enable_msgs_comps; fi @@ -3583,10 +3234,9 @@ fi # # Check whether --with-editor was given. -if test ${with_editor+y} -then : +if test "${with_editor+set}" = set; then : withval=$with_editor; -else $as_nop +else with_editor="vim vi pico" fi @@ -3594,12 +3244,11 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_editor+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_editor+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3607,15 +3256,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3626,11 +3271,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -printf "%s\n" "$editor" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +$as_echo "$editor" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3645,10 +3290,9 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test ${with_echo+y} -then : +if test "${with_echo+set}" = set; then : withval=$with_echo; -else $as_nop +else with_echo="echo" fi @@ -3661,15 +3305,6 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3678,12 +3313,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3691,15 +3325,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3710,11 +3340,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3723,12 +3353,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3736,15 +3365,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3755,11 +3380,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3767,8 +3392,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3781,12 +3406,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3794,15 +3418,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3813,11 +3433,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3826,12 +3446,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3840,19 +3459,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3868,18 +3483,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3890,12 +3505,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3903,15 +3517,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3922,11 +3532,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3939,12 +3549,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3952,15 +3561,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3971,11 +3576,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3987,138 +3592,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4128,7 +3629,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4136,7 +3637,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4148,9 +3649,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4171,12 +3672,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4193,7 +3693,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4209,46 +3709,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4262,15 +3760,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4279,7 +3777,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4291,8 +3789,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4300,10 +3798,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4311,40 +3809,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4358,12 +3855,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4372,32 +3868,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4407,301 +3902,611 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= + fi fi -ac_test_CFLAGS=${CFLAGS+y} -ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -int -main (void) -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include -int -main (void) -{ - - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f conftest* + fi -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c99_program +#include + _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f conftest* + fi -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c89_program +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c89=$ac_arg +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_header= ac_cache= -for ac_item in $ac_header_c_list -do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h - fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h +fi +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +done -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes; then : have_malloc_h=1 -else $as_nop +else have_malloc_h=0 fi + CFLAGS=$SAVE if test "$have_malloc_h" -ne 0 then ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include " -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes -then : - printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : + $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h fi @@ -5032,12 +4837,11 @@ EOF Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT_CHECK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -5045,15 +4849,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5064,11 +4864,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -printf "%s\n" "$GIT_CHECK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +$as_echo "$GIT_CHECK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5082,60 +4882,42 @@ fi # # Checks for library functions. # ============================================================================ -ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes -then : - printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes -then : - printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" -if test "x$ac_cv_header_unistd_h" = xyes -then : - printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes -then : - printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h +for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h -fi +done ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -printf %s "checking for working alloca.h... " >&6; } -if test ${ac_cv_working_alloca_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -5143,52 +4925,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes -else $as_nop +else ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -printf %s "checking for alloca... " >&6; } -if test ${ac_cv_func_alloca_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _MSC_VER +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER # include # define alloca _alloca # else -# ifdef __cplusplus -extern "C" -# endif +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); +# endif +# endif +# endif # endif #endif int -main (void) +main () { char *p = (char *) alloca (1); if (p) return 0; @@ -5196,22 +4978,20 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes -else $as_nop +else ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then -printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -5221,19 +5001,58 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + done +fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -printf %s "checking stack direction for C alloca... " >&6; } -if test ${ac_cv_c_stack_direction+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5254,10 +5073,9 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 -else $as_nop +else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5265,24 +5083,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -printf "%s\n" "$ac_cv_c_stack_direction" >&6; } -printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __cplusplus @@ -5295,7 +5114,7 @@ main (void) /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. + /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5323,7 +5142,7 @@ main (void) iptr p = 0; ++p; } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5339,50 +5158,47 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes -else $as_nop +else ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -printf "%s\n" "#define const /**/" >>confdefs.h +$as_echo "#define const /**/" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -printf %s "checking for inline... " >&6; } -if test ${ac_cv_c_inline+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo (void) {return 0; } -$ac_kw foo_t foo (void) {return 0; } +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -printf "%s\n" "$ac_cv_c_inline" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5399,118 +5215,45 @@ _ACEOF ;; esac - - - - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac +done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if ${ac_cv_func_malloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -printf %s "checking for GNU libc compatible malloc... " >&6; } -if test ${ac_cv_func_malloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac -else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif int -main (void) +main () { -void *p = malloc (0); - int result = !p; - free (p); - return result; +return ! malloc (0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop +else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5518,15 +5261,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5535,47 +5277,50 @@ else $as_nop esac -printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h +$as_echo "#define malloc rpl_malloc" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -printf %s "checking for GNU libc compatible realloc... " >&6; } -if test ${ac_cv_func_realloc_0_nonnull+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; - esac -else $as_nop +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + +fi + +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +$as_echo_n "checking for GNU libc compatible realloc... " >&6; } +if ${ac_cv_func_realloc_0_nonnull+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_realloc_0_nonnull=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *realloc (); +#endif int -main (void) +main () { -void *p = realloc (0, 0); - int result = !p; - free (p); - return result; +return ! realloc (0, 0); ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop +else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5583,15 +5328,14 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes; then : -printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h +$as_echo "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else + $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5600,34 +5344,27 @@ else $as_nop esac -printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h +$as_echo "#define realloc rpl_realloc" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -printf %s "checking whether lstat correctly handles trailing slash... " >&6; } -if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : + $as_echo_n "(cached) " >&6 +else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes -then : - case "$host_os" in # (( - # Guess yes on glibc systems. - *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; - esac -else $as_nop + if test "$cross_compiling" = yes; then : + ac_cv_func_lstat_dereferences_slashed_symlink=no +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5638,10 +5375,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop +else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5656,12 +5392,14 @@ fi rm -f conftest.sym conftest.file fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +_ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5673,21 +5411,19 @@ esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -printf %s "checking whether stat accepts an empty string... " >&6; } -if test ${ac_cv_func_stat_empty_string_bug+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +$as_echo_n "checking whether stat accepts an empty string... " >&6; } +if ${ac_cv_func_stat_empty_string_bug+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5695,10 +5431,9 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no -else $as_nop +else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5706,8 +5441,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5716,18 +5451,19 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STAT_EMPTY_STRING_BUG 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5743,20 +5479,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -printf %s "checking for the size of a pointer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +$as_echo_n "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5782,10 +5518,12 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define POINTER_SIZE ${ac_pointersize} +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -printf "%s\n" "${ac_pointersize} bytes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +$as_echo "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5801,12 +5539,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5814,15 +5551,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5833,11 +5566,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5846,12 +5579,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5859,15 +5591,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5878,11 +5606,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5890,8 +5618,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5904,12 +5632,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5917,15 +5644,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5936,11 +5659,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5949,12 +5672,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5963,19 +5685,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5991,18 +5709,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6013,12 +5731,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -6026,15 +5743,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6045,11 +5758,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6062,12 +5775,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -6075,15 +5787,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6094,11 +5802,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6110,138 +5818,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6251,21 +5855,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -6275,33 +5878,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -6310,60 +5909,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -6378,144 +5974,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -6525,18 +6071,87 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu # +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + hostname=`uname -n` # ============================================================================ # GNU Make MAKE="make" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -printf %s "checking for GNU make... " >&6; } -if test ${_cv_gnu_make_command+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +$as_echo_n "checking for GNU make... " >&6; } +if ${_cv_gnu_make_command+:} false; then : + $as_echo_n "(cached) " >&6 +else _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; @@ -6547,14 +6162,14 @@ else $as_nop done ; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -printf "%s\n" "$_cv_gnu_make_command" >&6; } ; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +$as_echo "$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -printf "%s\n" "\"Not found\"" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +$as_echo "\"Not found\"" >&6; }; fi @@ -6576,12 +6191,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6589,15 +6203,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6608,11 +6218,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6621,12 +6231,11 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6634,15 +6243,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6653,11 +6258,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6665,8 +6270,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6684,8 +6289,7 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test ${enable_options_check+y} -then : +if test "${enable_options_check+set}" = set; then : enableval=$enable_options_check; fi @@ -6709,12 +6313,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6722,15 +6325,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6741,11 +6340,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -printf "%s\n" "$FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +$as_echo "$FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6758,12 +6357,11 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_FC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6771,15 +6369,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6790,11 +6384,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -printf "%s\n" "$ac_ct_FC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6806,8 +6400,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6816,7 +6410,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6826,7 +6420,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6836,7 +6430,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6845,12 +6439,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 -printf %s "checking whether the compiler supports GNU Fortran... " >&6; } -if test ${ac_cv_fc_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if ${ac_cv_fc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6859,48 +6452,43 @@ else $as_nop end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_fc_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+y} +ac_test_FCFLAGS=${FCFLAGS+set} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -printf %s "checking whether $FC accepts -g... " >&6; } -if test ${ac_cv_prog_fc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if ${ac_cv_prog_fc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_g=yes -else $as_nop +else ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -printf "%s\n" "$ac_cv_prog_fc_g" >&6; } -if test $ac_test_FCFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FCFLAGS" = set; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6934,8 +6522,8 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -printf %s "checking if the current OS is supported... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +$as_echo_n "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6979,31 +6567,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -printf "%s\n" "$as_me: a guest account on this machine." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +$as_echo "$as_me: Platform <${host}> is not supported." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +$as_echo "$as_me: providing either a list of compilers and options or" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +$as_echo "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -7019,8 +6607,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test ${with_f90ext+y} -then : +if test "${with_f90ext+set}" = set; then : withval=$with_f90ext; fi @@ -7032,12 +6619,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -printf %s "checking for Fortran flag to compile .f90 files... " >&6; } -if test ${ac_cv_fc_srcext_f90+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -7053,18 +6639,17 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -7090,12 +6675,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -printf %s "checking for Fortran flag to compile .f files... " >&6; } -if test ${ac_cv_fc_srcext_f+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } +if ${ac_cv_fc_srcext_f+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -7111,18 +6695,17 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +$as_echo "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -7221,10 +6804,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -printf %s "checking for $FC kind and version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +$as_echo_n "checking for $FC kind and version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -7241,8 +6824,7 @@ printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test ${enable_debug_flags+y} -then : +if test "${enable_debug_flags+set}" = set; then : enableval=$enable_debug_flags; fi @@ -7681,35 +7263,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -printf %s "checking for specific $FC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +$as_echo_n "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -printf "%s\n" "$FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +$as_echo "$FCFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -printf "%s\n" "(User-defined) $FCFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +$as_echo "(User-defined) $FCFLAGS" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -printf %s "checking for specific Open-MP flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -printf "%s\n" "$OMPFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +$as_echo_n "checking for specific Open-MP flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +$as_echo "$OMPFLAGS" >&6; } # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -printf %s "checking for specific $CC flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -printf "%s\n" "$CFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +$as_echo_n "checking for specific $CC flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +$as_echo "$CFLAGS" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -printf %s "checking for specific unoptimized flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +$as_echo_n "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -printf "%s\n" "$FCUFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +$as_echo "$FCUFLAGS" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -printf "%s\n" "(User-defined) $UFLAGS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +$as_echo "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7720,10 +7302,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -printf %s "checking for specific NETCDF flags... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -printf "%s\n" "$NETCDFFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +$as_echo_n "checking for specific NETCDF flags... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +$as_echo "$NETCDFFLAGS" >&6; } # @@ -7748,26 +7330,23 @@ FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" GPU_SUPPORT="no_gpu" # # Check whether --enable-cuda_fortran was given. -if test ${enable_cuda_fortran+y} -then : +if test "${enable_cuda_fortran+set}" = set; then : enableval=$enable_cuda_fortran; -else $as_nop +else enable_cuda_fortran="no" fi # Check whether --enable-openacc was given. -if test ${enable_openacc+y} -then : +if test "${enable_openacc+set}" = set; then : enableval=$enable_openacc; -else $as_nop +else enable_openacc="no" fi # Check whether --enable-openmp5 was given. -if test ${enable_openmp5+y} -then : +if test "${enable_openmp5+set}" = set; then : enableval=$enable_openmp5; -else $as_nop +else enable_openmp5="no" fi @@ -7786,8 +7365,7 @@ if test x"$enable_openmp5" != "xno" ; then GPU_SUPPORT="openmp5" ; fi # OpenMP # # Check whether --enable-open-mp was given. -if test ${enable_open_mp+y} -then : +if test "${enable_open_mp+set}" = set; then : enableval=$enable_open_mp; fi @@ -7809,19 +7387,17 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -printf %s "checking how to get verbose linking output from $FC... " >&6; } -if test ${ac_cv_prog_fc_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } +if ${ac_cv_prog_fc_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7839,13 +7415,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7912,24 +7488,23 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -printf "%s\n" "$ac_cv_prog_fc_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -printf %s "checking for Fortran libraries of $FC... " >&6; } -if test ${ac_cv_fc_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +$as_echo "$ac_cv_prog_fc_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +$as_echo_n "checking for Fortran libraries of $FC... " >&6; } +if ${ac_cv_fc_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7948,13 +7523,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_fc_v_output" >&5 +$as_echo "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -8031,10 +7606,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -8047,10 +7621,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -8060,29 +7633,14 @@ else fi fi ;; - # Ignore these flags. - -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:* | -link) - ;; - -lkernel32) - # Ignore this library only on Windows-like systems. - case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_fc_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ + |-LANG:=* | -LIST:* | -LNO:* | -link) + ;; + -lkernel32) + case $host_os in + *cygwin*) ;; + *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; esac ;; @@ -8100,7 +7658,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -8109,10 +7667,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -8127,17 +7684,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -8149,7 +7704,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | + ac_ld_run_path=`$as_echo "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -8164,8 +7719,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -printf "%s\n" "$ac_cv_fc_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +$as_echo "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -8180,12 +7735,11 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -printf %s "checking for dummy main to link with Fortran libraries... " >&6; } -if test ${ac_cv_fc_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } +if ${ac_cv_fc_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -8208,20 +7762,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -8238,18 +7791,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -8262,24 +7814,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +$as_echo "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown -then : +if test "$FC_DUMMY_MAIN" != unknown; then : if test $FC_DUMMY_MAIN != none; then -printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define FC_DUMMY_MAIN $FC_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -8294,12 +7847,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -printf %s "checking for Fortran name-mangling scheme... " >&6; } -if test ${ac_cv_fc_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if ${ac_cv_fc_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -8308,8 +7860,7 @@ else $as_nop return end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -8330,6 +7881,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8340,18 +7894,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -8386,6 +7939,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -8396,18 +7952,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -8437,17 +7992,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -printf "%s\n" "$ac_cv_fc_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8470,8 +8025,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8486,11 +8040,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -8501,7 +8054,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8509,8 +8062,7 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8525,11 +8077,10 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -8540,12 +8091,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -printf %s "checking for external C routine (test) naming scheme... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -printf "%s\n" "$msg" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +$as_echo "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8553,48 +8104,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8653,12 +8204,11 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } -if test ${ac_cv_fc_freeform+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } +if ${ac_cv_fc_freeform+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8673,18 +8223,17 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -printf "%s\n" "$ac_cv_fc_freeform" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +$as_echo "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8709,12 +8258,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -printf %s "checking fortran 90 modules inclusion flag... " >&6; } -if test ${ax_cv_f90_modflag+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } +if ${ax_cv_f90_modflag+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8737,11 +8285,10 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do @@ -8757,11 +8304,10 @@ for ax_flag in "-I" "-M" "-p"; do end program conftest_program _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ax_cv_f90_modflag="$ax_flag" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS="$ax_save_FCFLAGS" fi done @@ -8777,147 +8323,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -printf "%s\n" "$ax_cv_f90_modflag" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +$as_echo "$ax_cv_f90_modflag" >&6; } IFLAG="$ax_cv_f90_modflag" if test -z "$IFLAG" ; then IFLAG="-I" ; fi # # ============================================================================ # CPP check & flags -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - -else $as_nop - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : - # Broken: success on invalid input. -continue -else $as_nop - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : - -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - # case "${CPP}" in @@ -8969,8 +8382,8 @@ case "${CPP}" in esac # # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} # # TESTS #======= @@ -8987,8 +8400,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -printf %s "checking if C precompiler works on C source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +$as_echo_n "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9000,15 +8413,14 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : acx_C_ok=yes -else $as_nop +else CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -printf "%s\n" "$acx_C_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +$as_echo "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -9059,8 +8471,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -9069,8 +8481,8 @@ printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -printf %s "checking if FC precompiler works on FC source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +$as_echo_n "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -9097,8 +8509,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -printf "%s\n" "$acx_FC_ok" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +$as_echo "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -9127,12 +8539,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -9140,15 +8551,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9159,11 +8566,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -printf "%s\n" "$F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +$as_echo "$F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9176,12 +8583,11 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_F77+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -9189,15 +8595,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9208,11 +8610,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -printf "%s\n" "$ac_ct_F77" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9224,8 +8626,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -9234,7 +8636,7 @@ fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -9244,7 +8646,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -9254,7 +8656,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -9263,12 +8665,11 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 -printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } -if test ${ac_cv_f77_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } +if ${ac_cv_f77_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -9277,48 +8678,43 @@ else $as_nop end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_f77_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+y} +ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -printf %s "checking whether $F77 accepts -g... " >&6; } -if test ${ac_cv_prog_f77_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } +if ${ac_cv_prog_f77_g+:} false; then : + $as_echo_n "(cached) " >&6 +else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes -else $as_nop +else ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -printf "%s\n" "$ac_cv_prog_f77_g" >&6; } -if test $ac_test_FFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -9344,24 +8740,23 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : - acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO"; then : + acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -9397,8 +8792,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test ${enable_mpi+y} -then : +if test "${enable_mpi+set}" = set; then : enableval=$enable_mpi; fi @@ -9428,12 +8822,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9441,15 +8834,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9460,11 +8849,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9473,13 +8862,12 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9489,22 +8877,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIFC_test=$MPIFC -else $as_nop +else for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpiifx mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIFC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIFC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -9512,15 +8898,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9531,11 +8913,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -printf "%s\n" "$MPIFC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +$as_echo "$MPIFC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9551,23 +8933,22 @@ fi if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9587,11 +8968,10 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -printf %s "checking for a working mpif.h... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +$as_echo_n "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9602,23 +8982,21 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9629,22 +9007,20 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -printf %s "checking for a working mpi module... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +$as_echo_n "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI" -then : + if test "$LIB_MPI"; then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9655,15 +9031,14 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_fc_try_compile "$LINENO"; then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi # # @@ -9675,12 +9050,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9711,13 +9086,12 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -printf %s "checking for $MPIF77... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +$as_echo_n "checking for $MPIF77... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9727,22 +9101,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIF77 -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9750,15 +9122,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9769,11 +9137,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9784,13 +9152,12 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -printf %s "checking for $MPIFC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +$as_echo_n "checking for $MPIFC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9800,22 +9167,20 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : MPIF77_test=$MPIFC -else $as_nop +else for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9823,15 +9188,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9842,11 +9203,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9861,12 +9222,11 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPIF77_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPIF77_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9874,15 +9234,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9893,11 +9249,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -printf "%s\n" "$MPIF77_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +$as_echo "$MPIF77_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -9911,23 +9267,22 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -printf %s "checking for MPI_Init... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO" -then : +if ac_fn_f77_try_link "$LINENO"; then : ac_mpi_ok="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -9963,12 +9318,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -10004,12 +9359,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -10017,15 +9371,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10036,11 +9386,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10049,13 +9399,12 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -printf %s "checking for $MPICC... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +$as_echo_n "checking for $MPICC... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -10065,26 +9414,24 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else $as_nop +else for ac_prog in $MPICC mpipgicc mpiicc mpicc mpiicpx hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_MPICC_test+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MPICC_test+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -10092,15 +9439,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10111,11 +9454,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -printf "%s\n" "$MPICC_test" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +$as_echo "$MPICC_test" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10132,8 +9475,7 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes -then : +if test "x$ac_cv_func_MPI_Init" = xyes; then : acx_mpi_ok="yes" fi @@ -10148,8 +9490,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -printf %s "checking for a working mpi.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +$as_echo_n "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10162,22 +9504,21 @@ printf %s "checking for a working mpi.h... " >&6; } #endif #endif int -main (void) +main () { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; };acx_mpi_ok="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -10202,12 +9543,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h +$as_echo "#define HAVE_MPI 1" >>confdefs.h : fi @@ -10246,10 +9587,10 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -printf %s "checking for MPI version... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -printf "%s\n" "$MPIKIND" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +$as_echo_n "checking for MPI version... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +$as_echo "$MPIKIND" >&6; } MPI_PATH=`which $CC |sed "s/bin\/$CC//g"` @@ -10275,29 +9616,25 @@ fi # Check whether --with-mpi_libs was given. -if test ${with_mpi_libs+y} -then : +if test "${with_mpi_libs+set}" = set; then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test ${with_mpi_path+y} -then : +if test "${with_mpi_path+set}" = set; then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test ${with_mpi_libdir+y} -then : +if test "${with_mpi_libdir+set}" = set; then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test ${with_mpi_includedir+y} -then : +if test "${with_mpi_includedir+set}" = set; then : withval=$with_mpi_includedir; fi @@ -10373,13 +9710,12 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval test \${$as_ac_File+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval \${$as_ac_File+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -10389,12 +9725,11 @@ else fi fi eval ac_res=\$$as_ac_File - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes"; then : mpif_found_tmp="yes" -else $as_nop +else mpif_found_tmp="no" fi @@ -10547,6 +9882,31 @@ url_ydb=https://github.com/yambo-code/ydb.git # +# +# Copyright (C) 2000-2022 the YAMBO team +# http://www.yambo-code.org +# +# Authors (see AUTHORS file for details): AM +# +# This file is distributed under the terms of the GNU +# General Public License. You can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 2, or (at your option) any later version. +# +# This program is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +# MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +# + + # # # Copyright (C) 2000-2021 the YAMBO team @@ -10610,8 +9970,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --enable-ydb was given. -if test ${enable_ydb+y} -then : +if test "${enable_ydb+set}" = set; then : enableval=$enable_ydb; fi @@ -10625,12 +9984,11 @@ if test "x$enable_ydb" = "xyes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -10638,15 +9996,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10657,11 +10011,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -printf "%s\n" "$GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +$as_echo "$GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -10670,12 +10024,11 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10683,15 +10036,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10702,11 +10051,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -printf "%s\n" "$ac_ct_GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +$as_echo "$ac_ct_GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10714,8 +10063,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10727,14 +10076,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -printf %s "checking YDB from $url_ydb... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +$as_echo_n "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10744,8 +10093,8 @@ printf %s "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10759,19 +10108,17 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -printf %s "checking how to get verbose linking output from $F77... " >&6; } -if test ${ac_cv_prog_f77_v+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } +if ${ac_cv_prog_f77_v+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10789,13 +10136,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10862,24 +10209,23 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -printf "%s\n" "$ac_cv_prog_f77_v" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -printf %s "checking for Fortran 77 libraries of $F77... " >&6; } -if test ${ac_cv_f77_libs+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +$as_echo "$ac_cv_prog_f77_v" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } +if ${ac_cv_f77_libs+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10898,13 +10244,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -printf "%s\n" "$ac_f77_v_output" >&5 +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10981,10 +10327,9 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -10997,10 +10342,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" @@ -11015,24 +10359,9 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) - # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; - *) - ac_exists=false - for ac_i in $ac_cv_f77_libs; do - if test x"$ac_arg" = x"$ac_i"; then - ac_exists=true - break - fi - done - - if test x"$ac_exists" = xtrue -then : - -else $as_nop - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi + *cygwin*) ;; + *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; esac ;; @@ -11050,7 +10379,7 @@ fi esac ;; -YP,*) - for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -11059,10 +10388,9 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -11077,17 +10405,15 @@ fi fi done - if test x"$ac_exists" = xtrue -then : + if test x"$ac_exists" = xtrue; then : -else $as_nop +else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; - -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -11099,7 +10425,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | + ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -11114,8 +10440,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -printf "%s\n" "$ac_cv_f77_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +$as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -11131,20 +10457,17 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test ${enable_int_linalg+y} -then : +if test "${enable_int_linalg+set}" = set; then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test ${enable_openmp_int_linalg+y} -then : +if test "${enable_openmp_int_linalg+set}" = set; then : enableval=$enable_openmp_int_linalg; fi @@ -11152,8 +10475,7 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test ${with_blas_libs+y} -then : +if test "${with_blas_libs+set}" = set; then : withval=$with_blas_libs; fi @@ -11178,23 +10500,22 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_blas_ok=yes -else $as_nop +else BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -printf "%s\n" "$acx_blas_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +$as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -11203,10 +10524,9 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_blas_ok=yes fi @@ -11215,12 +10535,11 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -printf %s "checking for ATL_xerbla in -latlas... " >&6; } -if test ${ac_cv_lib_atlas_ATL_xerbla+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } +if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11228,27 +10547,24 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_atlas_ATL_xerbla=yes -else $as_nop +else ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -printf %s "checking for $caxpy in -lf77blas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11256,27 +10572,24 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -printf %s "checking for cblas_daxpy in -lcblas... " >&6; } -if test ${ac_cv_lib_cblas_cblas_daxpy+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } +if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11284,20 +10597,18 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_cblas_cblas_daxpy=yes -else $as_nop +else ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -11310,13 +10621,12 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11324,28 +10634,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -printf %s "checking for $daxpy in -ldaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11353,28 +10660,25 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -printf %s "checking for $caxpy in -lcaxpy... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11382,21 +10686,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -11408,13 +10710,12 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -printf %s "checking for $caxpy in -lcxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +$as_echo_n "checking for $caxpy in -lcxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11422,21 +10723,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -11444,13 +10743,12 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -printf %s "checking for $caxpy in -ldxml... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +$as_echo_n "checking for $caxpy in -ldxml... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11458,21 +10756,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -11481,12 +10777,11 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -printf %s "checking for acosp in -lsunmath... " >&6; } -if test ${ac_cv_lib_sunmath_acosp+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +$as_echo_n "checking for acosp in -lsunmath... " >&6; } +if ${ac_cv_lib_sunmath_acosp+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11494,27 +10789,24 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : ac_cv_lib_sunmath_acosp=yes -else $as_nop +else ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -printf %s "checking for $caxpy in -lsunperf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : + as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11522,21 +10814,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -11548,13 +10838,12 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -printf %s "checking for $caxpy in -lscs... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +$as_echo_n "checking for $caxpy in -lscs... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11562,21 +10851,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -11584,13 +10871,12 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11598,21 +10884,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -11620,13 +10904,12 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11634,28 +10917,25 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -printf %s "checking for $caxpy in -lessl... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +$as_echo_n "checking for $caxpy in -lessl... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11663,21 +10943,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -11693,13 +10971,12 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11707,33 +10984,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -printf %s "checking for $caxpy in -lmkl_gf... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11741,21 +11015,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11767,13 +11039,12 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11781,33 +11052,30 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -printf %s "checking for $caxpy in -lmkl_intel... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11815,21 +11083,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11840,13 +11106,12 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -printf %s "checking for $caxpy in -lblas... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +$as_echo_n "checking for $caxpy in -lblas... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11854,21 +11119,19 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11879,7 +11142,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h +$as_echo "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11889,12 +11152,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11959,12 +11222,11 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if test ${ac_cv_f77_dummy_main+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if ${ac_cv_f77_dummy_main+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -11995,20 +11257,19 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=none -else $as_nop +else ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -12033,18 +11294,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ #endif #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi @@ -12057,24 +11317,25 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +$as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown -then : +if test "$F77_DUMMY_MAIN" != unknown; then : if test $F77_DUMMY_MAIN != none; then -printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define F77_DUMMY_MAIN $F77_DUMMY_MAIN +_ACEOF if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -12088,12 +11349,11 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } -if test ${ac_cv_f77_mangling+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } +if ${ac_cv_f77_mangling+:} false; then : + $as_echo_n "(cached) " >&6 +else cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -12102,8 +11362,7 @@ else $as_nop return end _ACEOF -if ac_fn_f77_try_compile "$LINENO" -then : +if ac_fn_f77_try_compile "$LINENO"; then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -12124,6 +11383,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -12142,18 +11404,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done done @@ -12188,6 +11449,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -12206,18 +11470,17 @@ char $ac_func (); #endif #endif int -main (void) +main () { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -12247,17 +11510,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -printf "%s\n" "$ac_cv_f77_mangling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +$as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -12271,8 +11534,7 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test ${with_lapack_libs+y} -then : +if test "${with_lapack_libs+set}" = set; then : withval=$with_lapack_libs; fi @@ -12298,23 +11560,22 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_lapack_ok=yes -else $as_nop +else LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -printf "%s\n" "$acx_lapack_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +$as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -12324,10 +11585,9 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes" -then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : acx_lapack_ok=yes fi @@ -12338,13 +11598,12 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -printf %s "checking for $cheev in -l$lapack... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +$as_echo_n "checking for $cheev in -l$lapack... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -12352,21 +11611,19 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -12398,23 +11655,22 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_dlaran_ok=yes -else $as_nop +else acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -printf "%s\n" "$acx_dlaran_ok" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +$as_echo "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -12422,7 +11678,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h +$as_echo "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -12432,12 +11688,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -12489,60 +11745,52 @@ fi # Check whether --with-fft_libs was given. -if test ${with_fft_libs+y} -then : +if test "${with_fft_libs+set}" = set; then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test ${with_fft_path+y} -then : +if test "${with_fft_path+set}" = set; then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test ${with_fft_libdir+y} -then : +if test "${with_fft_libdir+set}" = set; then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test ${with_fft_includedir+y} -then : +if test "${with_fft_includedir+set}" = set; then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test ${enable_internal_fftqe+y} -then : +if test "${enable_internal_fftqe+set}" = set; then : enableval=$enable_internal_fftqe; -else $as_nop +else enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test ${enable_internal_fftsg+y} -then : +if test "${enable_internal_fftsg+set}" = set; then : enableval=$enable_internal_fftsg; -else $as_nop +else enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test ${enable_3d_fft+y} -then : +if test "${enable_3d_fft+set}" = set; then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test ${with_fftsg_fac+y} -then : +if test "${with_fftsg_fac+set}" = set; then : withval=$with_fftsg_fac; fi @@ -12567,10 +11815,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -12586,16 +11834,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -printf %s "checking for FFT Library using $with_fft_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } fi # # check for FFTW @@ -12658,24 +11906,22 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW="yes"; -else $as_nop +else HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_FFTW_OMP="yes"; -else $as_nop +else HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -12687,18 +11933,18 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -printf "%s\n" "FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +$as_echo "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -printf "%s\n" "FFTW3_OMP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +$as_echo "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -printf "%s\n" "FFTW ($desc) " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +$as_echo "FFTW ($desc) " >&6; } fi else def_fft="" @@ -12713,8 +11959,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -12724,8 +11970,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -printf "%s\n" "FFTW no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +$as_echo "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -12735,31 +11981,30 @@ printf "%s\n" "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -printf %s "checking for dcft in $LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +$as_echo_n "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : HAVE_ESSL=yes -else $as_nop +else HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -printf "%s\n" "$HAVE_ESSL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +$as_echo "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -12771,8 +12016,8 @@ printf %s "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -printf "%s\n" "ESSL FFT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +$as_echo "ESSL FFT" >&6; } fi fi # @@ -12781,8 +12026,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -printf %s "checking for FFT... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +$as_echo_n "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -12819,8 +12064,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +$as_echo "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12846,8 +12091,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -printf "%s\n" "FFTSG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +$as_echo "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12868,8 +12113,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -printf "%s\n" "Internal FFTW3" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +$as_echo "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12883,48 +12128,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12933,7 +12178,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - printf "%s\n" "#define _FFTQE 1" >>confdefs.h + $as_echo "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12955,99 +12200,86 @@ fi # # Check whether --enable-slepc_linalg was given. -if test ${enable_slepc_linalg+y} -then : +if test "${enable_slepc_linalg+set}" = set; then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test ${with_slepc_libs+y} -then : +if test "${with_slepc_libs+set}" = set; then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test ${with_slepc_incs+y} -then : +if test "${with_slepc_incs+set}" = set; then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test ${with_slepc_path+y} -then : +if test "${with_slepc_path+set}" = set; then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test ${with_slepc_libdir+y} -then : +if test "${with_slepc_libdir+set}" = set; then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test ${with_slepc_includedir+y} -then : +if test "${with_slepc_includedir+set}" = set; then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test ${with_petsc_libs+y} -then : +if test "${with_petsc_libs+set}" = set; then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test ${with_petsc_incs+y} -then : +if test "${with_petsc_incs+set}" = set; then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test ${with_petsc_path+y} -then : +if test "${with_petsc_path+set}" = set; then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test ${with_petsc_libdir+y} -then : +if test "${with_petsc_libdir+set}" = set; then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test ${with_petsc_includedir+y} -then : +if test "${with_petsc_includedir+set}" = set; then : withval=$with_petsc_includedir; fi # Check whether --with-slepc-branch was given. -if test ${with_slepc_branch+y} -then : +if test "${with_slepc_branch+set}" = set; then : withval=$with_slepc_branch; -else $as_nop +else with_slepc_branch=none fi # Check whether --with-petsc-branch was given. -if test ${with_petsc_branch+y} -then : +if test "${with_petsc_branch+set}" = set; then : withval=$with_petsc_branch; -else $as_nop +else with_petsc_branch=none fi @@ -13070,12 +12302,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13084,6 +12315,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13102,29 +12336,27 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi @@ -13159,12 +12391,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -13207,24 +12439,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : petsc=yes -else $as_nop +else petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13237,8 +12468,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -printf %s "checking for internal Petsc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +$as_echo_n "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # @@ -13258,30 +12489,30 @@ printf %s "checking for internal Petsc library... " >&6; } PETSC_LIBS="$PETSC_LIBS_DN" ; compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 -printf "%s\n" "dynamic already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 +$as_echo "dynamic already compiled" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 -printf "%s\n" "dynamic found, despite no dynamic lapack detected." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic petsc libs." >&5 -printf "%s\n" "The compilation may fail. In case remove the dynamic petsc libs." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 +$as_echo "dynamic found, despite no dynamic lapack detected." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic petsc libs." >&5 +$as_echo "The compilation may fail. In case remove the dynamic petsc libs." >&6; } ; fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 -printf "%s\n" "static found, despite dynamic lapack." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: You may delete the static petsc and re-run the configure to get smaller executables" >&5 -printf "%s\n" "You may delete the static petsc and re-run the configure to get smaller executables" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 +$as_echo "static found, despite dynamic lapack." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: You may delete the static petsc and re-run the configure to get smaller executables" >&5 +$as_echo "You may delete the static petsc and re-run the configure to get smaller executables" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 -printf "%s\n" "static already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +$as_echo "static already compiled" >&6; } ; fi else compile_petsc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi # fi @@ -13308,12 +12539,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -13352,25 +12583,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : slepc=yes -else $as_nop +else slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # fi # @@ -13384,8 +12614,8 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -printf %s "checking for internal Slepc library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +$as_echo_n "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # @@ -13403,30 +12633,30 @@ printf %s "checking for internal Slepc library... " >&6; } SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; compile_slepc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 -printf "%s\n" "dynamic already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 +$as_echo "dynamic already compiled" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 -printf "%s\n" "dynamic found, despite no dynamic lapack detected." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic slepc libs." >&5 -printf "%s\n" "The compilation may fail. In case remove the dynamic slepc libs." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 +$as_echo "dynamic found, despite no dynamic lapack detected." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic slepc libs." >&5 +$as_echo "The compilation may fail. In case remove the dynamic slepc libs." >&6; } ; fi elif test -e "$SLEPC_LIBS_ST" ; then SLEPC_LIBS="$SLEPC_LIBS_ST" ; compile_slepc="no" ; if test "x$lapack_shared" = "x1" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 -printf "%s\n" "static found, despite dynamic lapack." >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: You may delete the static slepc and re-run the configure to get smaller executables" >&5 -printf "%s\n" "You may delete the static slepc and re-run the configure to get smaller executables" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 +$as_echo "static found, despite dynamic lapack." >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: You may delete the static slepc and re-run the configure to get smaller executables" >&5 +$as_echo "You may delete the static slepc and re-run the configure to get smaller executables" >&6; } ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 -printf "%s\n" "static already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +$as_echo "static already compiled" >&6; } ; fi else compile_slepc="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -13452,22 +12682,19 @@ fi # Check whether --enable-par_linalg was given. -if test ${enable_par_linalg+y} -then : +if test "${enable_par_linalg+set}" = set; then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test ${with_blacs_libs+y} -then : +if test "${with_blacs_libs+set}" = set; then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test ${with_scalapack_libs+y} -then : +if test "${with_scalapack_libs+set}" = set; then : withval=$with_scalapack_libs; fi @@ -13554,23 +12781,22 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_blacs="yes" -else $as_nop +else enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -printf "%s\n" "$enable_blacs" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +$as_echo "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -13585,23 +12811,22 @@ printf "%s\n" "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : enable_scalapack="yes" -else $as_nop +else enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -printf "%s\n" "$enable_scalapack" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +$as_echo "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -13675,29 +12900,25 @@ LIBS="$reset_LIBS" # # Check whether --with-hdf5_libs was given. -if test ${with_hdf5_libs+y} -then : +if test "${with_hdf5_libs+set}" = set; then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test ${with_hdf5_path+y} -then : +if test "${with_hdf5_path+set}" = set; then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test ${with_hdf5_libdir+y} -then : +if test "${with_hdf5_libdir+set}" = set; then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test ${with_hdf5_includedir+y} -then : +if test "${with_hdf5_includedir+set}" = set; then : withval=$with_hdf5_includedir; fi @@ -13705,8 +12926,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -13714,10 +12934,9 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test ${enable_hdf5_par_io+y} -then : +if test "${enable_hdf5_par_io+set}" = set; then : enableval=$enable_hdf5_par_io; -else $as_nop +else enable_hdf5_par_io="yes" fi @@ -13725,8 +12944,7 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test ${enable_hdf5_p2y_support+y} -then : +if test "${enable_hdf5_p2y_support+set}" = set; then : enableval=$enable_hdf5_p2y_support; fi @@ -13757,13 +12975,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -printf %s "checking for deflate in -lz ... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop +as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +$as_echo_n "checking for deflate in -lz ... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13772,6 +12989,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13790,39 +13010,36 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : use_libz="yes"; -else $as_nop +else use_libz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -printf %s "checking for deflate in -lsz... " >&6; } -if test ${ac_cv_lib_sz_deflate+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +$as_echo_n "checking for deflate in -lsz... " >&6; } +if ${ac_cv_lib_sz_deflate+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13831,6 +13048,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13849,38 +13069,35 @@ char deflate (); #endif #endif int -main (void) +main () { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sz_deflate=yes -else $as_nop +else ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +$as_echo "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes; then : use_libsz="yes"; -else $as_nop +else use_libsz="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13889,6 +13106,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13907,38 +13127,35 @@ char dlopen (); #endif #endif int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : use_libdl="yes"; -else $as_nop +else use_libdl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -printf %s "checking for curl_version in -lcurl... " >&6; } -if test ${ac_cv_lib_curl_curl_version+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +$as_echo_n "checking for curl_version in -lcurl... " >&6; } +if ${ac_cv_lib_curl_curl_version+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13947,6 +13164,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13965,38 +13185,35 @@ char curl_version (); #endif #endif int -main (void) +main () { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curl_curl_version=yes -else $as_nop +else ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +$as_echo "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes; then : use_libcurl="yes"; -else $as_nop +else use_libcurl="no"; fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -printf %s "checking for cos in -lm... " >&6; } -if test ${ac_cv_lib_m_cos+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14005,6 +13222,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -14023,29 +13243,27 @@ char cos (); #endif #endif int -main (void) +main () { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes -else $as_nop +else ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -printf "%s\n" "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : use_libm="yes"; -else $as_nop +else use_libm="no"; fi @@ -14074,14 +13292,14 @@ if test x"$enable_hdf5" = "xyes"; then # if ! test "$with_hdf5_libs" = "internal" ; then # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 -printf %s "checking for HDF5... " >&6; } ; - if test -d "$with_hdf5_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in libdir $with_hdf5_libdir" >&5 -printf "%s\n" "in libdir $with_hdf5_libdir" >&6; } ; - elif test -d "$with_hdf5_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in path $with_hdf5_path" >&5 -printf "%s\n" "in path $with_hdf5_path" >&6; } ; - elif test x"$with_hdf5_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $with_hdf5_libs" >&5 -printf "%s\n" "using $with_hdf5_libs" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 +$as_echo_n "checking for HDF5... " >&6; } ; + if test -d "$with_hdf5_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: in libdir $with_hdf5_libdir" >&5 +$as_echo "in libdir $with_hdf5_libdir" >&6; } ; + elif test -d "$with_hdf5_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: in path $with_hdf5_path" >&5 +$as_echo "in path $with_hdf5_path" >&6; } ; + elif test x"$with_hdf5_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $with_hdf5_libs" >&5 +$as_echo "using $with_hdf5_libs" >&6; } ; fi # ac_ext=${ac_fc_srcext-f} @@ -14122,26 +13340,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = "xno" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; # # Automatic detection of hdf5 libs copied from QE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -14189,13 +13406,12 @@ printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -14204,10 +13420,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ fi # if test "x$hdf5" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -printf %s "checking for HDF5 using automatic library list... " >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -14247,13 +13463,12 @@ printf %s "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : hdf5=yes -else $as_nop +else hdf5=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -14267,13 +13482,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -printf "%s\n" "yes - parallel lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +$as_echo "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -printf "%s\n" "yes - serial lib found" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +$as_echo "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -14282,12 +13497,12 @@ printf "%s\n" "yes - serial lib found" >&6; } ; # if test "x$hdf5" = xno; then if ! test "$with_hdf5_libs" = "internal" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -printf %s "checking for internal HDF5 library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +$as_echo_n "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -14307,8 +13522,8 @@ printf %s "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -14317,8 +13532,8 @@ printf "%s\n" "already compiled" >&6; } ; #HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14327,8 +13542,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14385,58 +13600,50 @@ fi # Check whether --with-netcdf_libs was given. -if test ${with_netcdf_libs+y} -then : +if test "${with_netcdf_libs+set}" = set; then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test ${with_netcdf_path+y} -then : +if test "${with_netcdf_path+set}" = set; then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test ${with_netcdf_libdir+y} -then : +if test "${with_netcdf_libdir+set}" = set; then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test ${with_netcdf_includedir+y} -then : +if test "${with_netcdf_includedir+set}" = set; then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test ${with_netcdff_libs+y} -then : +if test "${with_netcdff_libs+set}" = set; then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test ${with_netcdff_path+y} -then : +if test "${with_netcdff_path+set}" = set; then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test ${with_netcdff_libdir+y} -then : +if test "${with_netcdff_libdir+set}" = set; then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test ${with_netcdff_includedir+y} -then : +if test "${with_netcdff_includedir+set}" = set; then : withval=$with_netcdff_includedir; fi @@ -14444,8 +13651,7 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test ${enable_netcdf_classic+y} -then : +if test "${enable_netcdf_classic+set}" = set; then : enableval=$enable_netcdf_classic; fi @@ -14453,8 +13659,7 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test ${enable_netcdf_par_io+y} -then : +if test "${enable_netcdf_par_io+set}" = set; then : enableval=$enable_netcdf_par_io; fi @@ -14462,8 +13667,7 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test ${enable_netcdf_v3+y} -then : +if test "${enable_netcdf_v3+set}" = set; then : enableval=$enable_netcdf_v3; fi @@ -14471,8 +13675,7 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test ${enable_hdf5_compression+y} -then : +if test "${enable_hdf5_compression+set}" = set; then : enableval=$enable_hdf5_compression; fi @@ -14480,8 +13683,7 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test ${enable_netcdf_output+y} -then : +if test "${enable_netcdf_output+set}" = set; then : enableval=$enable_netcdf_output; fi @@ -14517,10 +13719,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -14565,15 +13767,15 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi netcdf="yes"; try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # fi # @@ -14598,24 +13800,23 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -14626,8 +13827,8 @@ printf "%s\n" "no" >&6; } ; # # internal netcdf # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -printf %s "checking for internal NetCDF library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +$as_echo_n "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -14653,22 +13854,22 @@ printf %s "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; else compile_netcdf="yes" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; fi fi # @@ -14703,13 +13904,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : netcdf=yes -else $as_nop +else netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -14717,8 +13917,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; # fi # @@ -14726,11 +13926,11 @@ printf "%s\n" "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -printf %s "checking for internal NETCDF library... " >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +$as_echo_n "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -14751,8 +13951,8 @@ printf %s "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -14764,8 +13964,8 @@ printf "%s\n" "already compiled" >&6; } ; #NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lnetcdff" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -printf "%s\n" "already compiled (using parallel version)" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +$as_echo "already compiled (using parallel version)" >&6; } ; # else # @@ -14774,8 +13974,8 @@ printf "%s\n" "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ; # fi # @@ -14857,37 +14057,32 @@ fi # Check whether --enable-yaml_output was given. -if test ${enable_yaml_output+y} -then : +if test "${enable_yaml_output+set}" = set; then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test ${with_yaml_libs+y} -then : +if test "${with_yaml_libs+set}" = set; then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test ${with_yaml_libdir+y} -then : +if test "${with_yaml_libdir+set}" = set; then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test ${with_yaml_includedir+y} -then : +if test "${with_yaml_includedir+set}" = set; then : withval=$with_yaml_includedir; fi @@ -14895,29 +14090,25 @@ fi # Check whether --with-futile_libs was given. -if test ${with_futile_libs+y} -then : +if test "${with_futile_libs+set}" = set; then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test ${with_futile_libdir+y} -then : +if test "${with_futile_libdir+set}" = set; then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test ${with_futile_includedir+y} -then : +if test "${with_futile_includedir+set}" = set; then : withval=$with_futile_includedir; fi @@ -14940,10 +14131,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14962,55 +14153,55 @@ printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -printf %s "checking for internal YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +$as_echo_n "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_yaml="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -printf %s "checking for YAML library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +$as_echo_n "checking for YAML library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -15034,10 +14225,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -15056,55 +14247,55 @@ printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -printf %s "checking for internal FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +$as_echo_n "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } else compile_futile="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -printf %s "checking for FUTILE library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +$as_echo_n "checking for FUTILE library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -15130,38 +14321,33 @@ fi # # Check whether --enable-iotk was given. -if test ${enable_iotk+y} -then : +if test "${enable_iotk+set}" = set; then : enableval=$enable_iotk; -else $as_nop +else enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test ${with_iotk_libs+y} -then : +if test "${with_iotk_libs+set}" = set; then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test ${with_iotk_path+y} -then : +if test "${with_iotk_path+set}" = set; then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test ${with_iotk_libdir+y} -then : +if test "${with_iotk_libdir+set}" = set; then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test ${with_iotk_includedir+y} -then : +if test "${with_iotk_includedir+set}" = set; then : withval=$with_iotk_includedir; fi @@ -15182,10 +14368,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -15206,39 +14392,39 @@ printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi IOTK_INCS="$IFLAG$try_iotk_incdir_src" #IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" IOTK_LIBS="-L$try_iotk_libdir_src/ -liotk" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" #IOTK_LIBS="$try_iotk_libdir/libiotk.a" IOTK_LIBS="-L$try_iotk_libdir/ -liotk" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -printf "%s\n" "no. Fallback to internal library." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +$as_echo "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -printf %s "checking for internal IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +$as_echo_n "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" @@ -15247,14 +14433,14 @@ printf %s "checking for internal IOTK library... " >&6; } if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -printf "%s\n" "already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } fi fi # @@ -15270,10 +14456,10 @@ printf "%s\n" "already compiled" >&6; } else PW_VER="no support" PW_CPP="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -printf %s "checking for IOTK library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +$as_echo_n "checking for IOTK library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # # @@ -15293,38 +14479,33 @@ fi # Check whether --enable-etsf_io was given. -if test ${enable_etsf_io+y} -then : +if test "${enable_etsf_io+set}" = set; then : enableval=$enable_etsf_io; -else $as_nop +else enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test ${with_etsf_io_libs+y} -then : +if test "${with_etsf_io_libs+set}" = set; then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test ${with_etsf_io_path+y} -then : +if test "${with_etsf_io_path+set}" = set; then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test ${with_etsf_io_libdir+y} -then : +if test "${with_etsf_io_libdir+set}" = set; then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test ${with_etsf_io_includedir+y} -then : +if test "${with_etsf_io_includedir+set}" = set; then : withval=$with_etsf_io_includedir; fi @@ -15351,10 +14532,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -15373,50 +14554,50 @@ printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else # # internal ETSF_IO # - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -printf %s "checking for internal ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +$as_echo_n "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -printf "%s\n" "found already compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +$as_echo "found already compiled" >&6; } else compile_etsf="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -printf "%s\n" "to be compiled" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +$as_echo "to be compiled" >&6; } fi fi # else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -printf %s "checking for ETSF_IO Library... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +$as_echo_n "checking for ETSF_IO Library... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # @@ -15432,29 +14613,25 @@ fi # Check whether --with-libxc_libs was given. -if test ${with_libxc_libs+y} -then : +if test "${with_libxc_libs+set}" = set; then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test ${with_libxc_path+y} -then : +if test "${with_libxc_path+set}" = set; then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test ${with_libxc_libdir+y} -then : +if test "${with_libxc_libdir+set}" = set; then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test ${with_libxc_includedir+y} -then : +if test "${with_libxc_includedir+set}" = set; then : withval=$with_libxc_includedir; fi @@ -15467,8 +14644,8 @@ compile_libxc="no" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -printf %s "checking for libxc... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +$as_echo_n "checking for libxc... " >&6; } testprog=" program main @@ -15488,11 +14665,10 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15522,11 +14698,10 @@ if test x"$acx_libxc_ok" = xno ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # if dynamic / user provided linkage did not work, try static one @@ -15536,11 +14711,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi @@ -15618,71 +14792,66 @@ if test x"$acx_libxc_ok" = xyes; then cat > conftest.$ac_ext <<_ACEOF $testprog_11 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=110, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_12 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_20 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=200, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_203 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=203, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_21 _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=210, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_4x _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=400, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_5x _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libxc_version=5, acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define LIBXC_VERSION $acx_libxc_version +_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi if test x"$acx_libxc_ok" = xyes; then @@ -15690,7 +14859,7 @@ if test x"$acx_libxc_ok" = xyes; then internal_libxc=no # -printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h +$as_echo "#define HAVE_LIBXC 1" >>confdefs.h fi @@ -15703,12 +14872,12 @@ if test x"$acx_libxc_ok" = xno; then LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } else compile_libxc="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } fi fi @@ -15725,48 +14894,42 @@ LIBS="$acx_libxc_save_LIBS" # Check whether --with-cuda_libs was given. -if test ${with_cuda_libs+y} -then : +if test "${with_cuda_libs+set}" = set; then : withval=$with_cuda_libs; fi # Check whether --with-cuda_incs was given. -if test ${with_cuda_incs+y} -then : +if test "${with_cuda_incs+set}" = set; then : withval=$with_cuda_incs; fi # # Check whether --with-cuda_libdir was given. -if test ${with_cuda_libdir+y} -then : +if test "${with_cuda_libdir+set}" = set; then : withval=$with_cuda_libdir; fi # Check whether --with-cuda_includedir was given. -if test ${with_cuda_includedir+y} -then : +if test "${with_cuda_includedir+set}" = set; then : withval=$with_cuda_includedir; fi # # Check whether --with-cuda_path was given. -if test ${with_cuda_path+y} -then : +if test "${with_cuda_path+set}" = set; then : withval=$with_cuda_path; fi # # Check whether --enable-cuda-libs-check was given. -if test ${enable_cuda_libs_check+y} -then : +if test "${enable_cuda_libs_check+set}" = set; then : enableval=$enable_cuda_libs_check; -else $as_nop +else enable_cuda_libs_check=yes fi @@ -15828,69 +14991,65 @@ FCFLAGS="$LIBCUDA_INCS $acx_libcuda_save_FCFLAGS" # set from environment variable, if not blank if test ! -z "$CUDA_LIBS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from environment" >&5 -printf %s "checking for libcuda from environment... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from environment" >&5 +$as_echo_n "checking for libcuda from environment... " >&6; } LIBCUDA_LIBS="$CUDA_LIBS" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # set from --with-cuda-libs flag if test x"$acx_libcuda_ok" = xno && test ! -z "$with_cuda_libs" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from --with-cuda-libs" >&5 -printf %s "checking for libcuda from --with-cuda-libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from --with-cuda-libs" >&5 +$as_echo_n "checking for libcuda from --with-cuda-libs... " >&6; } LIBCUDA_LIBS="$with_cuda_libs" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # dynamic linkage, separate Fortran interface if test x"$acx_libcuda_ok" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from specified libcuda path, dynamic" >&5 -printf %s "checking for libcuda from specified libcuda path, dynamic... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from specified libcuda path, dynamic" >&5 +$as_echo_n "checking for libcuda from specified libcuda path, dynamic... " >&6; } LIBCUDA_LIBS="-L$libcuda_libdir -lcufft -lcusolver -lcublas -lcudart -lcuda" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # static linkage, separate Fortran interface if test x"$acx_libcuda_ok" = xno; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking static" >&5 -printf %s "checking static... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking static" >&5 +$as_echo_n "checking static... " >&6; } LIBCUDA_LIBS="$libcuda_libdir/libcuda.a" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -15900,13 +15059,13 @@ if test x"$acx_libcuda_ok" = xyes; then internal_libcuda=no # -printf "%s\n" "#define HAVE_LIBCUDA 1" >>confdefs.h +$as_echo "#define HAVE_LIBCUDA 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes." >&5 -printf "%s\n" "yes." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 +$as_echo "yes." >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found." >&5 -printf "%s\n" "not found." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5 +$as_echo "not found." >&6; } use_libcuda=no compile_libcuda=no internal_libcuda=no @@ -15963,10 +15122,9 @@ LIBS="$acx_libcuda_save_LIBS" # # Check whether --with-cuda-cc was given. -if test ${with_cuda_cc+y} -then : +if test "${with_cuda_cc+set}" = set; then : withval=$with_cuda_cc; -else $as_nop +else with_cuda_cc=70 fi @@ -16045,88 +15203,77 @@ fi # Check whether --with-cuda-runtime was given. -if test ${with_cuda_runtime+y} -then : +if test "${with_cuda_runtime+set}" = set; then : withval=$with_cuda_runtime; -else $as_nop +else with_cuda_runtime=10.1 fi # # Check whether --with-cuda-int-libs was given. -if test ${with_cuda_int_libs+y} -then : +if test "${with_cuda_int_libs+set}" = set; then : withval=$with_cuda_int_libs; -else $as_nop +else with_cuda_int_libs=cufft,cublas,cusolver fi # # Check whether --enable-nvtx was given. -if test ${enable_nvtx+y} -then : +if test "${enable_nvtx+set}" = set; then : enableval=$enable_nvtx; -else $as_nop +else enable_nvtx="no" fi # # Check whether --with-gpu_libs was given. -if test ${with_gpu_libs+y} -then : +if test "${with_gpu_libs+set}" = set; then : withval=$with_gpu_libs; fi # Check whether --with-gpu_incs was given. -if test ${with_gpu_incs+y} -then : +if test "${with_gpu_incs+set}" = set; then : withval=$with_gpu_incs; fi # # Check whether --with-rocm_libs was given. -if test ${with_rocm_libs+y} -then : +if test "${with_rocm_libs+set}" = set; then : withval=$with_rocm_libs; fi # Check whether --with-rocm_incs was given. -if test ${with_rocm_incs+y} -then : +if test "${with_rocm_incs+set}" = set; then : withval=$with_rocm_incs; fi # Check whether --with-rocm_libdir was given. -if test ${with_rocm_libdir+y} -then : +if test "${with_rocm_libdir+set}" = set; then : withval=$with_rocm_libdir; fi # Check whether --with-rocm_includedir was given. -if test ${with_rocm_includedir+y} -then : +if test "${with_rocm_includedir+set}" = set; then : withval=$with_rocm_includedir; fi # Check whether --with-rocm_path was given. -if test ${with_rocm_path+y} -then : +if test "${with_rocm_path+set}" = set; then : withval=$with_rocm_path; fi # # Check whether --with-mklgpu_libs was given. -if test ${with_mklgpu_libs+y} -then : +if test "${with_mklgpu_libs+set}" = set; then : withval=$with_mklgpu_libs; fi @@ -16221,12 +15368,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -printf %s "checking for Fortran flag to compile .f90 files... " >&6; } -if test ${ac_cv_fc_srcext_f90+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } +if ${ac_cv_fc_srcext_f90+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -16242,18 +15388,17 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +$as_echo "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -16273,35 +15418,32 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - as_CACHEVAR=`printf "%s\n" "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 -printf %s "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } -if eval test \${$as_CACHEVAR+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_CACHEVAR=`$as_echo "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 +$as_echo_n "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_check_save_flags=$FCFLAGS FCFLAGS="$FCFLAGS $GPU_FLAGS" cat > conftest.$ac_ext <<_ACEOF MODULE test; use cudafor; END MODULE _ACEOF -if ac_fn_fc_try_compile "$LINENO" -then : +if ac_fn_fc_try_compile "$LINENO"; then : eval "$as_CACHEVAR=yes" -else $as_nop +else eval "$as_CACHEVAR=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : have_cudafor=yes -else $as_nop +else have_cudafor=no fi @@ -16403,39 +15545,34 @@ fi # Check whether --with-devxlib_libs was given. -if test ${with_devxlib_libs+y} -then : +if test "${with_devxlib_libs+set}" = set; then : withval=$with_devxlib_libs; fi # Check whether --with-devxlib_path was given. -if test ${with_devxlib_path+y} -then : +if test "${with_devxlib_path+set}" = set; then : withval=$with_devxlib_path; fi # Check whether --with-devxlib_libdir was given. -if test ${with_devxlib_libdir+y} -then : +if test "${with_devxlib_libdir+set}" = set; then : withval=$with_devxlib_libdir; fi # Check whether --with-devxlib_includedir was given. -if test ${with_devxlib_includedir+y} -then : +if test "${with_devxlib_includedir+set}" = set; then : withval=$with_devxlib_includedir; fi # Check whether --with-devxlib-branch was given. -if test ${with_devxlib_branch+y} -then : +if test "${with_devxlib_branch+set}" = set; then : withval=$with_devxlib_branch; -else $as_nop +else with_devxlib_branch=none fi @@ -16460,8 +15597,8 @@ acx_devxlib_save_LIBS="$LIBS" acx_devxlib_save_FCFLAGS="$FCFLAGS" #This is fake, it is always going to fail -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for devxlib" >&5 -printf %s "checking for devxlib... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for devxlib" >&5 +$as_echo_n "checking for devxlib... " >&6; } testprog=" program main @@ -16480,11 +15617,10 @@ if test ! -z "$DEVXLIB_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -16495,11 +15631,10 @@ if test x"$acx_devxlib_ok" = xno && test ! -z "$with_devxlib_libs" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -16510,11 +15645,10 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -16525,11 +15659,10 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -16540,11 +15673,10 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -16555,11 +15687,10 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO" -then : +if ac_fn_fc_try_link "$LINENO"; then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi @@ -16569,7 +15700,7 @@ if test x"$acx_devxlib_ok" = xyes; then internal_devxlib=no # -printf "%s\n" "#define HAVE_DEVXLIB 1" >>confdefs.h +$as_echo "#define HAVE_DEVXLIB 1" >>confdefs.h fi @@ -16580,8 +15711,8 @@ if test x"$acx_devxlib_ok" = xno; then DEVXLIB_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libdevXlib.a"; then compile_devxlib="no" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Found internal already compiled." >&5 -printf "%s\n" "Compatible external DevXlib not found/specified. Found internal already compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Found internal already compiled." >&5 +$as_echo "Compatible external DevXlib not found/specified. Found internal already compiled." >&6; } else if test x"$with_devxlib_branch" = "xnone"; then DEVXLIB_info="(devxlib tarball)" @@ -16589,8 +15720,8 @@ printf "%s\n" "Compatible external DevXlib not found/specified. Found internal a DEVXLIB_info="(devxlib $with_devxlib_branch branch)" fi compile_devxlib="yes" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Internal to be compiled." >&5 -printf "%s\n" "Compatible external DevXlib not found/specified. Internal to be compiled." >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Internal to be compiled." >&5 +$as_echo "Compatible external DevXlib not found/specified. Internal to be compiled." >&6; } fi fi FCFLAGS="$acx_devxlib_save_FCFLAGS" @@ -16606,6 +15737,219 @@ LIBS="$acx_devxlib_save_LIBS" +# ============================================================================ +# MAGMA + +# +# Check whether --enable-magma_linalg was given. +if test "${enable_magma_linalg+set}" = set; then : + enableval=$enable_magma_linalg; +fi + +# + +# Check whether --with-magma_libs was given. +if test "${with_magma_libs+set}" = set; then : + withval=$with_magma_libs; +fi + + +# Check whether --with-magma_incs was given. +if test "${with_magma_incs+set}" = set; then : + withval=$with_magma_incs; +fi + + +# Check whether --with-magma_path was given. +if test "${with_magma_path+set}" = set; then : + withval=$with_magma_path; +fi + + +# Check whether --with-magma_libdir was given. +if test "${with_magma_libdir+set}" = set; then : + withval=$with_magma_libdir; +fi + + +# Check whether --with-magma_includedir was given. +if test "${with_magma_includedir+set}" = set; then : + withval=$with_magma_includedir; +fi + + +# +def_magma="" +magma="no" +enable_magma="no" +internal_magma="no" +compile_magma="no" +compile_magma_fmodules="no" +# +if test x"$enable_magma_linalg" = "xyes"; then + enable_magma="yes"; +fi +# +# MAGMA global options +# +if test x"$with_magma_libs" = "xyes" ; then + enable_magma="yes" ; + compile_magma_fmodules="yes" ; + with_magma_libs=""; +elif test x"$with_magma_libs" = "xno" ; then + enable_magma="no" ; + compile_magma_fmodules="no" ; + with_magma_libs=""; +fi +# +if test x"$with_magma_libdir" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_path" != "x" ; then enable_magma="yes" ; fi +if test x"$with_magma_libs" != "x" ; then enable_magma="yes" ; fi +# +# Set MAGMA LIBS and FLAGS from INPUT +# +if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_magma_libs" != "x" ; then + # + # external magma + # + if test x"$with_magma_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +$as_echo_n "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +$as_echo_n "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 +$as_echo_n "checking for Magma in $with_magma_path... " >&6; } ; + fi + # + if test -d "$with_magma_path" ; then + try_magma_libdir="$with_magma_path/lib" ; + try_magma_incdir="$with_magma_path/include" ; + fi + # + if test -d "$with_magma_libdir" ; then try_magma_libdir="$with_magma_libdir" ; fi + if test -d "$with_magma_includedir" ; then try_magma_incdir="$with_magma_includedir" ; fi + # + try_MAGMA_INCS="$IFLAG$try_magma_incdir" ; + try_MAGMA_LIBS="-L$try_magma_libdir -lmagma" ; + # + if test x"$with_magma_libs" != "x" ; then try_MAGMA_LIBS="$with_magma_libs" ; fi + if test x"$with_magma_incs" != "x" ; then try_MAGMA_INCS="$with_magma_incs" ; fi + # + if test -z "$try_MAGMA_LIBS" ; then as_fn_error $? "No libs specified" "$LINENO" 5 ; fi + if test -z "$try_MAGMA_INCS" ; then as_fn_error $? "No include-dir specified" "$LINENO" 5 ; fi + # + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + # + save_fcflags="$FCFLAGS" ; + save_libs="$LIBS" ; + # + FCFLAGS="$try_MAGMA_INCS $save_fcflags"; + LIBS="$try_MAGMA_LIBS $save_libs"; + # + cat > conftest.$ac_ext <<_ACEOF + program main + +use magma +implicit none +integer :: lda +!magma_devptr_t :: dA + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + magma=yes +else + magma=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; + # + if test "x$magma" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ; + MAGMA_INCS="$try_MAGMA_INCS" ; + MAGMA_LIBS="$try_MAGMA_LIBS" ; + compile_magma="no"; + internal_magma="no"; + def_magma="-D_MAGMA" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ; + # + fi + # + FCFLAGS="$save_fcflags" ; + LIBS="$save_libs" ; + # +fi +# +# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# +if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then + # + # internal magma + # + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +$as_echo_n "checking for internal Magma library... " >&6; } + # + internal_magma="yes" + # + #if test "x$lapack_shared" = "x1" ; then + # MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; + # #MAGMA_LIBS="" ; + #else + MAGMA_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; + #fi + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + # + magma=yes + def_magma="-D_MAGMA" + if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then + compile_magma="no" ; + compile_magma_fmodules="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; + elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then + compile_magma="no" ; + compile_magma_fmodules="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +$as_echo "already compiled" >&6; } ; + else + compile_magma="yes" ; + compile_magma_fmodules="no" ; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 +$as_echo "Compatible external Magma not found/specified. To be compiled." >&6; } ; + fi + # +fi +# +# Check if fortran modules are available +# +if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then compile_magma_fmodules="no" ; fi +# +# switch off internal magma compilation +# +deactivate_internal=no +if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 +$as_echo "Internal Magma compilation not available yet. Deactivating it." >&6; } ; + compile_magma="no" + def_magma="" + enable_magma="no" + MAGMA_INCS="" ; + MAGMA_LIBS="" ; +fi +# + + + + + + + +# + # ============================================================================ # Prepare the REPORT file variables @@ -16743,6 +16087,14 @@ if test "$internal_libxc" = "yes" ; then if test "$compile_libxc" = "no" ; then LIBXC_check="I"; fi fi # +MAGMA_check="-" +if test "$internal_magma" = "yes" ; then + if test "$compile_magma" = "yes" ; then MAGMA_check="C"; fi + if test "$compile_magma" = "no" ; then MAGMA_check="I"; fi +elif test "$enable_magma" = "yes" ; then + MAGMA_check="E" +fi +# DEVXLIB_check="E" if test "$internal_devxlib" = "yes" ; then if test "$compile_devxlib" = "yes"; then DEVXLIB_check="C"; fi @@ -16835,6 +16187,7 @@ fi + # # STRIPE [LIB] from paths # @@ -17090,6 +16443,29 @@ fi SCALAPACK_INCS_R=$STRIPE +# + +TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +MAGMA_LIBS_R=$STRIPE + +TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +MAGMA_INCS_R=$STRIPE + + # TMP1=`echo $BLACS_LIBS | sed 's/\//+/g'` @@ -17159,6 +16535,29 @@ fi SLEPC_INCS_R=$STRIPE +# + +TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +MAGMA_LIBS_R=$STRIPE + +TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +MAGMA_INCS_R=$STRIPE + + # TMP1=`echo $LIBXC_LIBS | sed 's/\//+/g'` @@ -17312,8 +16711,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -17343,15 +16742,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -17365,8 +16764,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -17383,7 +16782,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -17399,8 +16798,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -17423,16 +16822,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -17442,46 +16839,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -17490,6 +16887,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -17498,12 +16902,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -17515,10 +16915,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -17531,14 +16951,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -17565,20 +16984,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -17590,13 +17007,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -17627,7 +17043,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -17649,10 +17065,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -17666,12 +17078,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -17713,7 +17119,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -17722,7 +17128,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17785,7 +17191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Yambo $as_me 5.3.0 r.23900 h.e51825f30d, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -17843,16 +17249,14 @@ $config_headers Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Yambo config.status 5.3.0 r.23900 h.e51825f30d -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -17889,15 +17293,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -17905,7 +17309,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -17914,7 +17318,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -17942,7 +17346,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -17956,7 +17360,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -17996,8 +17400,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -18333,7 +17737,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -18341,17 +17745,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -18368,7 +17772,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -18392,9 +17796,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -18447,8 +17851,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -18490,9 +17894,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -18508,20 +17912,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -18562,8 +17966,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -18705,4 +18109,3 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi - diff --git a/lib/archive/package.list b/lib/archive/package.list index 11e4b91392..0e3f66ebf7 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -1,7 +1,7 @@ # # Libs list # -EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack petsc slepc fftw fftqe devxlib +EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack magma petsc slepc fftw fftqe devxlib # # storing options # From 7b4a9cad62f8c0565fa2d00fcb5e1647458580d6 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 28 Feb 2025 18:08:13 +0100 Subject: [PATCH 0896/1367] compilation fixed --- config/mk/local/makefile | 2 +- .../{mod_magma2.F => mod_magma.F} | 74 +++++++-------- ...magma2_cfortran.F => mod_magma_cfortran.F} | 50 +++++------ ...mod_magma2_common.F => mod_magma_common.F} | 90 +++++++++---------- ...magma2_dfortran.F => mod_magma_dfortran.F} | 50 +++++------ ...magma2_sfortran.F => mod_magma_sfortran.F} | 50 +++++------ ...magma2_zfortran.F => mod_magma_zfortran.F} | 48 +++++----- src/modules/mod_linear_algebra.F | 20 +++-- 8 files changed, 193 insertions(+), 191 deletions(-) rename lib/magma_fmodules/{mod_magma2.F => mod_magma.F} (79%) rename lib/magma_fmodules/{mod_magma2_cfortran.F => mod_magma_cfortran.F} (85%) rename lib/magma_fmodules/{mod_magma2_common.F => mod_magma_common.F} (85%) rename lib/magma_fmodules/{mod_magma2_dfortran.F => mod_magma_dfortran.F} (85%) rename lib/magma_fmodules/{mod_magma2_sfortran.F => mod_magma_sfortran.F} (85%) rename lib/magma_fmodules/{mod_magma2_zfortran.F => mod_magma_zfortran.F} (86%) diff --git a/config/mk/local/makefile b/config/mk/local/makefile index e01dc1456f..99d642fb8e 100644 --- a/config/mk/local/makefile +++ b/config/mk/local/makefile @@ -24,7 +24,7 @@ include $(compdir)/config/setup # idriver=$(IFLAG)$(includedir)/driver $(IFLAG)$(includedir)/version lf90include=$(IFLAG)$(includedir) $(IFLAG)$(includedir)/headers/common $(IFLAG)$(includedir)/headers/parser $(idriver) -lf90libinclude=$(iiotk) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(ihdf5) $(ilibxc) $(idevxlib) $(icudalib) $(ifft) $(ifutile) $(iyaml) $(idriver) +lf90libinclude=$(iiotk) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(imagma) $(ihdf5) $(ilibxc) $(idevxlib) $(icudalib) $(ifft) $(ifutile) $(iyaml) $(idriver) mfiles=find . -maxdepth 1 -name '*.mod' # # OBJECTS diff --git a/lib/magma_fmodules/mod_magma2.F b/lib/magma_fmodules/mod_magma.F similarity index 79% rename from lib/magma_fmodules/mod_magma2.F rename to lib/magma_fmodules/mod_magma.F index bcf771ab29..9b2f1d9b55 100644 --- a/lib/magma_fmodules/mod_magma2.F +++ b/lib/magma_fmodules/mod_magma.F @@ -6,15 +6,15 @@ ! @date February 2023 ! -module magma2 +module magma use iso_c_binding -use magma2_common -use magma2_sfortran -use magma2_dfortran -use magma2_cfortran -use magma2_zfortran +use magma_common +use magma_sfortran +use magma_dfortran +use magma_cfortran +use magma_zfortran implicit none @@ -59,37 +59,37 @@ module magma2 !! ------------------------------------------------------------------------- !! initialize - subroutine magma_init() & + subroutine magmaf_init() & bind(C, name="magma_init") use iso_c_binding end subroutine - subroutine magma_finalize() & + subroutine magmaf_finalize() & bind(C, name="magma_finalize") use iso_c_binding end subroutine !! ------------------------------------------------------------------------- !! version - subroutine magma_version( major, minor, micro ) & + subroutine magmaf_version( major, minor, micro ) & bind(C, name="magma_version") use iso_c_binding integer(c_int), target :: major, minor, micro end subroutine - subroutine magma_print_environment() & + subroutine magmaf_print_environment() & bind(C, name="magma_print_environment") use iso_c_binding end subroutine !! ------------------------------------------------------------------------- !! timing - real(c_double) function magma_wtime() & + real(c_double) function magmaf_wtime() & bind(C, name="magma_wtime") use iso_c_binding end function - real(c_double) function magma_sync_wtime( queue ) & + real(c_double) function magmaf_sync_wtime( queue ) & bind(C, name="magma_wtime") use iso_c_binding type(c_ptr), value :: queue @@ -97,29 +97,29 @@ real(c_double) function magma_sync_wtime( queue ) & !! ------------------------------------------------------------------------- !! device support - integer(c_int) function magma_num_gpus() & + integer(c_int) function magmaf_num_gpus() & bind(C, name="magma_num_gpus") use iso_c_binding end function - integer(c_int) function magma_get_device_arch() & + integer(c_int) function magmaf_get_device_arch() & bind(C, name="magma_getdevice_arch") use iso_c_binding end function - subroutine magma_get_device( dev ) & + subroutine magmaf_get_device( dev ) & bind(C, name="magma_getdevice") use iso_c_binding integer(c_int), target :: dev end subroutine - subroutine magma_set_device( dev ) & + subroutine magmaf_set_device( dev ) & bind(C, name="magma_setdevice") use iso_c_binding integer(c_int), value :: dev end subroutine - integer(c_size_t) function magma_mem_size( queue ) & + integer(c_size_t) function magmaf_mem_size( queue ) & bind(C, name="magma_mem_size") use iso_c_binding type(c_ptr), value :: queue @@ -127,7 +127,7 @@ integer(c_size_t) function magma_mem_size( queue ) & !! ------------------------------------------------------------------------- !! queue support - subroutine magma_queue_create_internal( dev, queue_ptr, func, file, line ) & + subroutine magmaf_queue_create_internal( dev, queue_ptr, func, file, line ) & bind(C, name="magma_queue_create_internal") use iso_c_binding integer(c_int), value :: dev @@ -136,7 +136,7 @@ subroutine magma_queue_create_internal( dev, queue_ptr, func, file, line ) & integer(c_int), value :: line end subroutine - subroutine magma_queue_destroy_internal( queue, func, file, line ) & + subroutine magmaf_queue_destroy_internal( queue, func, file, line ) & bind(C, name="magma_queue_destroy_internal") use iso_c_binding type(c_ptr), value :: queue !! queue_t @@ -144,7 +144,7 @@ subroutine magma_queue_destroy_internal( queue, func, file, line ) & integer(c_int), value :: line end subroutine - subroutine magma_queue_sync_internal( queue, func, file, line ) & + subroutine magmaf_queue_sync_internal( queue, func, file, line ) & bind(C, name="magma_queue_sync_internal") use iso_c_binding type(c_ptr), value :: queue !! queue_t @@ -152,7 +152,7 @@ subroutine magma_queue_sync_internal( queue, func, file, line ) & integer(c_int), value :: line end subroutine - integer(c_int) function magma_queue_get_device( queue ) & + integer(c_int) function magmaf_queue_get_device( queue ) & bind(C, name="magma_queue_get_device") use iso_c_binding type(c_ptr), value :: queue !! queue_t @@ -161,35 +161,35 @@ integer(c_int) function magma_queue_get_device( queue ) & !! ------------------------------------------------------------------------- !! offsets pointers -- 1D vectors with inc !! see offset.c - type(c_ptr) function magma_soffset_1d( ptr, inc, i ) & + type(c_ptr) function magmaf_soffset_1d( ptr, inc, i ) & bind(C, name="magma_soffset_1d") use iso_c_binding type(c_ptr), value :: ptr integer(c_int), value :: inc, i end function - type(c_ptr) function magma_doffset_1d( ptr, inc, i ) & + type(c_ptr) function magmaf_doffset_1d( ptr, inc, i ) & bind(C, name="magma_doffset_1d") use iso_c_binding type(c_ptr), value :: ptr integer(c_int), value :: inc, i end function - type(c_ptr) function magma_coffset_1d( ptr, inc, i ) & + type(c_ptr) function magmaf_coffset_1d( ptr, inc, i ) & bind(C, name="magma_coffset_1d") use iso_c_binding type(c_ptr), value :: ptr integer(c_int), value :: inc, i end function - type(c_ptr) function magma_zoffset_1d( ptr, inc, i ) & + type(c_ptr) function magmaf_zoffset_1d( ptr, inc, i ) & bind(C, name="magma_zoffset_1d") use iso_c_binding type(c_ptr), value :: ptr integer(c_int), value :: inc, i end function - type(c_ptr) function magma_ioffset_1d( ptr, inc, i ) & + type(c_ptr) function magmaf_ioffset_1d( ptr, inc, i ) & bind(C, name="magma_ioffset_1d") use iso_c_binding type(c_ptr), value :: ptr @@ -199,35 +199,35 @@ type(c_ptr) function magma_ioffset_1d( ptr, inc, i ) & !! ------------------------------------------------------------------------- !! offsets pointers -- 2D matrices with lda !! see offset.c - type(c_ptr) function magma_soffset_2d( ptr, lda, i, j ) & + type(c_ptr) function magmaf_soffset_2d( ptr, lda, i, j ) & bind(C, name="magma_soffset_2d") use iso_c_binding type(c_ptr), value:: ptr integer(c_int), value :: lda, i, j end function - type(c_ptr) function magma_doffset_2d( ptr, lda, i, j ) & + type(c_ptr) function magmaf_doffset_2d( ptr, lda, i, j ) & bind(C, name="magma_doffset_2d") use iso_c_binding type(c_ptr), value:: ptr integer(c_int), value :: lda, i, j end function - type(c_ptr) function magma_coffset_2d( ptr, lda, i, j ) & + type(c_ptr) function magmaf_coffset_2d( ptr, lda, i, j ) & bind(C, name="magma_coffset_2d") use iso_c_binding type(c_ptr), value:: ptr integer(c_int), value :: lda, i, j end function - type(c_ptr) function magma_zoffset_2d( ptr, lda, i, j ) & + type(c_ptr) function magmaf_zoffset_2d( ptr, lda, i, j ) & bind(C, name="magma_zoffset_2d") use iso_c_binding type(c_ptr), value:: ptr integer(c_int), value :: lda, i, j end function - type(c_ptr) function magma_ioffset_2d( ptr, lda, i, j ) & + type(c_ptr) function magmaf_ioffset_2d( ptr, lda, i, j ) & bind(C, name="magma_ioffset_2d") use iso_c_binding type(c_ptr), value:: ptr @@ -242,34 +242,34 @@ type(c_ptr) function magma_ioffset_2d( ptr, lda, i, j ) & !! ------------------------------------------------------------------------- !! queue support - subroutine magma_queue_create( dev, queue_ptr ) + subroutine magmaf_queue_create( dev, queue_ptr ) use iso_c_binding integer(c_int), value :: dev type(c_ptr), target :: queue_ptr !! queue_t* - call magma_queue_create_internal( & + call magmaf_queue_create_internal( & dev, queue_ptr, & "magma_queue_create" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_queue_destroy( queue ) + subroutine magmaf_queue_destroy( queue ) use iso_c_binding type(c_ptr), value :: queue !! queue_t - call magma_queue_destroy_internal( & + call magmaf_queue_destroy_internal( & queue, & "magma_queue_destroy" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_queue_sync( queue ) + subroutine magmaf_queue_sync( queue ) use iso_c_binding type(c_ptr), value :: queue !! queue_t - call magma_queue_sync_internal( & + call magmaf_queue_sync_internal( & queue, & "magma_queue_sync" // c_null_char, & __FILE__ // c_null_char, & diff --git a/lib/magma_fmodules/mod_magma2_cfortran.F b/lib/magma_fmodules/mod_magma_cfortran.F similarity index 85% rename from lib/magma_fmodules/mod_magma2_cfortran.F rename to lib/magma_fmodules/mod_magma_cfortran.F index 8a25568acf..dbf26c0f61 100644 --- a/lib/magma_fmodules/mod_magma2_cfortran.F +++ b/lib/magma_fmodules/mod_magma_cfortran.F @@ -1,8 +1,8 @@ -!! @generated from magma2_zfortran.F90, fortran z -> c, Sat Apr 22 18:54:26 2023 +!! @generated from magma_zfortran.F90, fortran z -> c, Sat Apr 22 18:54:26 2023 -module magma2_cfortran +module magma_cfortran -use magma2_common +use magma_common implicit none !! ============================================================================= @@ -11,7 +11,7 @@ module magma2_cfortran !! ------------------------------------------------------------------------- !! CPU interfaces (matrix in CPU memory) - subroutine magma_cgetrf( m, n, A, lda, ipiv, info ) & + subroutine magmaf_cgetrf( m, n, A, lda, ipiv, info ) & bind(C, name="magma_cgetrf") use iso_c_binding integer(c_int), value :: m, n, lda @@ -20,7 +20,7 @@ subroutine magma_cgetrf( m, n, A, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_cpotrf( uplo, n, A, lda, info ) & + subroutine magmaf_cpotrf( uplo, n, A, lda, info ) & bind(C, name="magma_cpotrf") use iso_c_binding integer(c_int), value :: uplo @@ -29,7 +29,7 @@ subroutine magma_cpotrf( uplo, n, A, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_cgeev") use iso_c_binding @@ -43,7 +43,7 @@ subroutine magma_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_cgeev_m") use iso_c_binding @@ -57,7 +57,7 @@ subroutine magma_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + subroutine magmaf_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_cheevd_m") use iso_c_binding @@ -75,7 +75,7 @@ subroutine magma_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & !! ------------------------------------------------------------------------- !! ------------------------------------------------------------------------- !! GPU interfaces (matrix in GPU memory) - subroutine magma_cgetrf_gpu( m, n, dA, lda, ipiv, info ) & + subroutine magmaf_cgetrf_gpu( m, n, dA, lda, ipiv, info ) & bind(C, name="magma_cgetrf_gpu") use iso_c_binding integer(c_int), value :: m, n, lda @@ -84,7 +84,7 @@ subroutine magma_cgetrf_gpu( m, n, dA, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_cpotrf_gpu( uplo, n, dA, lda, info ) & + subroutine magmaf_cpotrf_gpu( uplo, n, dA, lda, info ) & bind(C, name="magma_cpotrf_gpu") use iso_c_binding integer(c_int), value :: uplo, n, lda @@ -92,7 +92,7 @@ subroutine magma_cpotrf_gpu( uplo, n, dA, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + subroutine magmaf_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_cheevd_gpu") use iso_c_binding @@ -109,7 +109,7 @@ subroutine magma_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, !! ------------------------------------------------------------------------- !! batched GPU interfaces (all arrays in GPU memory) - subroutine magma_cgetrf_batched( & + subroutine magmaf_cgetrf_batched( & m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & bind(C, name="magma_cgetrf_batched") use iso_c_binding @@ -122,7 +122,7 @@ subroutine magma_cgetrf_batched( & !! ------------------------------------------------------------------------- !! BLAS (matrices in GPU memory) - subroutine magma_caxpy( & + subroutine magmaf_caxpy( & n, & alpha, dx, incx, & dy, incy, & @@ -135,7 +135,7 @@ subroutine magma_caxpy( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_cgemv( & + subroutine magmaf_cgemv( & transA, m, n, & alpha, dA, lda, & dx, incx, & @@ -149,7 +149,7 @@ subroutine magma_cgemv( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_cgemm( & + subroutine magmaf_cgemm( & transA, transB, m, n, k, & alpha, dA, lda, & dB, ldb, & @@ -171,33 +171,33 @@ subroutine magma_cgemm( & !! ------------------------------------------------------------------------- !! malloc wrappers - integer(c_int) function magma_cmalloc( ptr, n ) + integer(c_int) function magmaf_cmalloc( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_cmalloc = magma_malloc( ptr, n*sizeof_complex ) + magmaf_cmalloc = magmaf_malloc( ptr, n*sizeof_complex ) end function - integer(c_int) function magma_cmalloc_cpu( ptr, n ) + integer(c_int) function magmaf_cmalloc_cpu( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_cmalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_complex ) + magmaf_cmalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_complex ) end function - integer(c_int) function magma_cmalloc_pinned( ptr, n ) + integer(c_int) function magmaf_cmalloc_pinned( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_cmalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_complex ) + magmaf_cmalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_complex ) end function !! ------------------------------------------------------------------------- !! set/get wrappers - subroutine magma_csetmatrix( & + subroutine magmaf_csetmatrix( & m, n, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -205,14 +205,14 @@ subroutine magma_csetmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, int(sizeof_complex), c_loc(hA_src), lda, dB_dst, ldb, queue, & "magma_csetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_cgetmatrix( & + subroutine magmaf_cgetmatrix( & m, n, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -220,7 +220,7 @@ subroutine magma_cgetmatrix( & complex(c_float_complex), target :: hB_dst(ldb,*) type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, int(sizeof_complex), dA_src, lda, c_loc(hB_dst), ldb, queue, & "magma_cgetmatrix" // c_null_char, & __FILE__ // c_null_char, & diff --git a/lib/magma_fmodules/mod_magma2_common.F b/lib/magma_fmodules/mod_magma_common.F similarity index 85% rename from lib/magma_fmodules/mod_magma2_common.F rename to lib/magma_fmodules/mod_magma_common.F index ac18317b87..d575d6cb33 100644 --- a/lib/magma_fmodules/mod_magma2_common.F +++ b/lib/magma_fmodules/mod_magma_common.F @@ -1,4 +1,4 @@ -module magma2_common +module magma_common use iso_c_binding implicit none @@ -29,7 +29,7 @@ module magma2_common !! ------------------------------------------------------------------------- !! magma_malloc (GPU memory) - integer(c_int) function magma_malloc( ptr, bytes ) & + integer(c_int) function magmaf_malloc( ptr, bytes ) & bind(C, name="magma_malloc") use iso_c_binding type(c_ptr), target :: ptr !! void** @@ -38,7 +38,7 @@ integer(c_int) function magma_malloc( ptr, bytes ) & !! todo imalloc - integer(c_int) function magma_free_internal( ptr, func, file, line ) & + integer(c_int) function magmaf_free_internal( ptr, func, file, line ) & bind(C, name="magma_free_internal") use iso_c_binding type(c_ptr), value :: ptr !! void* @@ -49,7 +49,7 @@ integer(c_int) function magma_free_internal( ptr, func, file, line ) & !! ------------------------------------------------------------------------- !! magma_malloc_cpu (CPU main memory) !! these are aligned to 32-byte boundary - integer(c_int) function magma_malloc_cpu( ptr, bytes ) & + integer(c_int) function magmaf_malloc_cpu( ptr, bytes ) & bind(C, name="magma_malloc_cpu") use iso_c_binding type(c_ptr), target :: ptr !! void** @@ -58,7 +58,7 @@ integer(c_int) function magma_malloc_cpu( ptr, bytes ) & !! todo imalloc_cpu - integer(c_int) function magma_free_cpu( ptr ) & + integer(c_int) function magmaf_free_cpu( ptr ) & bind(C, name="magma_free_cpu") use iso_c_binding type(c_ptr), value :: ptr !! void* @@ -66,7 +66,7 @@ integer(c_int) function magma_free_cpu( ptr ) & !! ------------------------------------------------------------------------- !! magma_malloc_pinned (pinned CPU main memory) - integer(c_int) function magma_malloc_pinned( ptr, bytes ) & + integer(c_int) function magmaf_malloc_pinned( ptr, bytes ) & bind(C, name="magma_malloc_pinned") use iso_c_binding type(c_ptr), target :: ptr !! void** @@ -75,7 +75,7 @@ integer(c_int) function magma_malloc_pinned( ptr, bytes ) & !! todo imalloc_pinned - integer(c_int) function magma_free_pinned_internal( ptr, func, file, line ) & + integer(c_int) function magmaf_free_pinned_internal( ptr, func, file, line ) & bind(C, name="magma_free_pinned_internal") use iso_c_binding type(c_ptr), value :: ptr !! void* @@ -85,7 +85,7 @@ integer(c_int) function magma_free_pinned_internal( ptr, func, file, line ) & !! ------------------------------------------------------------------------- !! set/get - subroutine magma_setmatrix_internal( & + subroutine magmaf_setmatrix_internal( & m, n, elemsize, hA_src, lda, dB_dst, ldb, queue, func, file, line ) & bind(C, name="magma_setmatrix_internal") use iso_c_binding @@ -97,7 +97,7 @@ subroutine magma_setmatrix_internal( & integer(c_int), value :: line end subroutine - subroutine magma_getmatrix_internal( & + subroutine magmaf_getmatrix_internal( & m, n, elemsize, dA_src, lda, hB_dst, ldb, queue, func, file, line ) & bind(C, name="magma_getmatrix_internal") use iso_c_binding @@ -109,7 +109,7 @@ subroutine magma_getmatrix_internal( & integer(c_int), value :: line end subroutine - subroutine magma_setvector_internal( & + subroutine magmaf_setvector_internal( & n, elemsize, hx_src, incx, dy_dst, incy, queue, func, file, line ) & bind(C, name="magma_setvector_internal") use iso_c_binding @@ -121,7 +121,7 @@ subroutine magma_setvector_internal( & integer(c_int), value :: line end subroutine - subroutine magma_getvector_internal( & + subroutine magmaf_getvector_internal( & n, elemsize, dx_src, incx, hy_dst, incy, queue, func, file, line ) & bind(C, name="magma_getvector_internal") use iso_c_binding @@ -141,46 +141,46 @@ subroutine magma_getvector_internal( & !! ------------------------------------------------------------------------- !! malloc wrappers - integer(c_int) function magma_imalloc( ptr, n ) + integer(c_int) function magmaf_imalloc( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_imalloc = magma_malloc( ptr, n*sizeof_int ) + magmaf_imalloc = magmaf_malloc( ptr, n*sizeof_int ) end function - integer(c_int) function magma_imalloc_cpu( ptr, n ) + integer(c_int) function magmaf_imalloc_cpu( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_imalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_int ) + magmaf_imalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_int ) end function - integer(c_int) function magma_imalloc_pinned( ptr, n ) + integer(c_int) function magmaf_imalloc_pinned( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_imalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_int ) + magmaf_imalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_int ) end function !! ------------------------------------------------------------------------- !! magma_free wrappers - integer(c_int) function magma_free( ptr ) + integer(c_int) function magmaf_free( ptr ) type(c_ptr) :: ptr - magma_free = magma_free_internal( & + magmaf_free = magmaf_free_internal( & ptr, & "magma_free" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end function - integer(c_int) function magma_free_pinned( ptr ) + integer(c_int) function magmaf_free_pinned( ptr ) type(c_ptr) :: ptr - magma_free_pinned = magma_free_internal( & + magmaf_free_pinned = magmaf_free_internal( & ptr, & "magma_free_pinned" // c_null_char, & __FILE__ // c_null_char, & @@ -189,7 +189,7 @@ integer(c_int) function magma_free_pinned( ptr ) !! ------------------------------------------------------------------------- !! set/get wrappers - subroutine magma_setmatrix( & + subroutine magmaf_setmatrix( & m, n, elemsize, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, elemsize, lda, ldb @@ -197,14 +197,14 @@ subroutine magma_setmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, elemsize, hA_src, lda, dB_dst, ldb, queue, & "magma_setmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_getmatrix( & + subroutine magmaf_getmatrix( & m, n, elemsize, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, elemsize, lda, ldb @@ -212,14 +212,14 @@ subroutine magma_getmatrix( & type(c_ptr), value :: hB_dst type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, elemsize, dA_src, lda, hB_dst, ldb, queue, & "magma_getmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_setvector( & + subroutine magmaf_setvector( & n, elemsize, hx_src, incx, dy_dst, incy, queue ) use iso_c_binding integer(c_int), value :: n, elemsize, incx, incy @@ -227,14 +227,14 @@ subroutine magma_setvector( & type(c_ptr), value :: dy_dst type(c_ptr), value :: queue - call magma_setvector_internal( & + call magmaf_setvector_internal( & n, elemsize, hx_src, incx, dy_dst, incy, queue, & "magma_setvector" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_getvector( & + subroutine magmaf_getvector( & n, elemsize, dx_src, incx, hy_dst, incy, queue ) use iso_c_binding integer(c_int), value :: n, elemsize, incx, incy @@ -242,7 +242,7 @@ subroutine magma_getvector( & type(c_ptr), value :: hy_dst type(c_ptr), value :: queue - call magma_getvector_internal( & + call magmaf_getvector_internal( & n, elemsize, dx_src, incx, hy_dst, incy, queue, & "magma_getvector" // c_null_char, & __FILE__ // c_null_char, & @@ -252,7 +252,7 @@ subroutine magma_getvector( & !! ------------------------------------------------------------------------- !! set/get wrappers !! matrices & vectors of integers - subroutine magma_isetmatrix( & + subroutine magmaf_isetmatrix( & m, n, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -260,14 +260,14 @@ subroutine magma_isetmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, int(sizeof_int), c_loc(hA_src), lda, dB_dst, ldb, queue, & "magma_isetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_igetmatrix( & + subroutine magmaf_igetmatrix( & m, n, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -275,14 +275,14 @@ subroutine magma_igetmatrix( & integer(c_int), target :: hB_dst(ldb,*) type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, int(sizeof_int), dA_src, lda, c_loc(hB_dst), ldb, queue, & "magma_igetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_isetvector( & + subroutine magmaf_isetvector( & n, hx_src, incx, dy_dst, incy, queue ) use iso_c_binding integer(c_int), value :: n, incx, incy @@ -290,14 +290,14 @@ subroutine magma_isetvector( & type(c_ptr), value :: dy_dst type(c_ptr), value :: queue - call magma_setvector_internal( & + call magmaf_setvector_internal( & n, int(sizeof_int), c_loc(hx_src), incx, dy_dst, incy, queue, & "magma_isetvector" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_igetvector( & + subroutine magmaf_igetvector( & n, dx_src, incx, hy_dst, incy, queue ) use iso_c_binding integer(c_int), value :: n, incx, incy @@ -305,7 +305,7 @@ subroutine magma_igetvector( & integer(c_int), target :: hy_dst(*) type(c_ptr), value :: queue - call magma_getvector_internal( & + call magmaf_getvector_internal( & n, int(sizeof_int), dx_src, incx, c_loc(hy_dst), incy, queue, & "magma_igetvector" // c_null_char, & __FILE__ // c_null_char, & @@ -315,7 +315,7 @@ subroutine magma_igetvector( & !! ------------------------------------------------------------------------- !! set/get wrappers !! matrices & vectors of c_ptr pointers - subroutine magma_psetmatrix( & + subroutine magmaf_psetmatrix( & m, n, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -323,14 +323,14 @@ subroutine magma_psetmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, int(sizeof_ptr), c_loc(hA_src), lda, dB_dst, ldb, queue, & "magma_psetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_pgetmatrix( & + subroutine magmaf_pgetmatrix( & m, n, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -338,14 +338,14 @@ subroutine magma_pgetmatrix( & type(c_ptr), target :: hB_dst(ldb,*) type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, int(sizeof_ptr), dA_src, lda, c_loc(hB_dst), ldb, queue, & "magma_pgetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_psetvector( & + subroutine magmaf_psetvector( & n, hx_src, incx, dy_dst, incy, queue ) use iso_c_binding integer(c_int), value :: n, incx, incy @@ -353,14 +353,14 @@ subroutine magma_psetvector( & type(c_ptr), value :: dy_dst type(c_ptr), value :: queue - call magma_setvector_internal( & + call magmaf_setvector_internal( & n, int(sizeof_ptr), c_loc(hx_src), incx, dy_dst, incy, queue, & "magma_psetvector" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_pgetvector( & + subroutine magmaf_pgetvector( & n, dx_src, incx, hy_dst, incy, queue ) use iso_c_binding integer(c_int), value :: n, incx, incy @@ -368,7 +368,7 @@ subroutine magma_pgetvector( & type(c_ptr), target :: hy_dst(*) type(c_ptr), value :: queue - call magma_getvector_internal( & + call magmaf_getvector_internal( & n, int(sizeof_ptr), dx_src, incx, c_loc(hy_dst), incy, queue, & "magma_pgetvector" // c_null_char, & __FILE__ // c_null_char, & diff --git a/lib/magma_fmodules/mod_magma2_dfortran.F b/lib/magma_fmodules/mod_magma_dfortran.F similarity index 85% rename from lib/magma_fmodules/mod_magma2_dfortran.F rename to lib/magma_fmodules/mod_magma_dfortran.F index e85b83b368..cd50d930a2 100644 --- a/lib/magma_fmodules/mod_magma2_dfortran.F +++ b/lib/magma_fmodules/mod_magma_dfortran.F @@ -1,8 +1,8 @@ -!! @generated from magma2_zfortran.F90, fortran z -> d, Sat Apr 22 18:54:26 2023 +!! @generated from magma_zfortran.F90, fortran z -> d, Sat Apr 22 18:54:26 2023 -module magma2_dfortran +module magma_dfortran -use magma2_common +use magma_common implicit none !! ============================================================================= @@ -11,7 +11,7 @@ module magma2_dfortran !! ------------------------------------------------------------------------- !! CPU interfaces (matrix in CPU memory) - subroutine magma_dgetrf( m, n, A, lda, ipiv, info ) & + subroutine magmaf_dgetrf( m, n, A, lda, ipiv, info ) & bind(C, name="magma_dgetrf") use iso_c_binding integer(c_int), value :: m, n, lda @@ -20,7 +20,7 @@ subroutine magma_dgetrf( m, n, A, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_dpotrf( uplo, n, A, lda, info ) & + subroutine magmaf_dpotrf( uplo, n, A, lda, info ) & bind(C, name="magma_dpotrf") use iso_c_binding integer(c_int), value :: uplo @@ -29,7 +29,7 @@ subroutine magma_dpotrf( uplo, n, A, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_dgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_dgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_dgeev") use iso_c_binding @@ -43,7 +43,7 @@ subroutine magma_dgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_dgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_dgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_dgeev_m") use iso_c_binding @@ -57,7 +57,7 @@ subroutine magma_dgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_dsyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + subroutine magmaf_dsyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_dsyevd_m") use iso_c_binding @@ -75,7 +75,7 @@ subroutine magma_dsyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & !! ------------------------------------------------------------------------- !! ------------------------------------------------------------------------- !! GPU interfaces (matrix in GPU memory) - subroutine magma_dgetrf_gpu( m, n, dA, lda, ipiv, info ) & + subroutine magmaf_dgetrf_gpu( m, n, dA, lda, ipiv, info ) & bind(C, name="magma_dgetrf_gpu") use iso_c_binding integer(c_int), value :: m, n, lda @@ -84,7 +84,7 @@ subroutine magma_dgetrf_gpu( m, n, dA, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_dpotrf_gpu( uplo, n, dA, lda, info ) & + subroutine magmaf_dpotrf_gpu( uplo, n, dA, lda, info ) & bind(C, name="magma_dpotrf_gpu") use iso_c_binding integer(c_int), value :: uplo, n, lda @@ -92,7 +92,7 @@ subroutine magma_dpotrf_gpu( uplo, n, dA, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_dsyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + subroutine magmaf_dsyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_dsyevd_gpu") use iso_c_binding @@ -109,7 +109,7 @@ subroutine magma_dsyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, !! ------------------------------------------------------------------------- !! batched GPU interfaces (all arrays in GPU memory) - subroutine magma_dgetrf_batched( & + subroutine magmaf_dgetrf_batched( & m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & bind(C, name="magma_dgetrf_batched") use iso_c_binding @@ -122,7 +122,7 @@ subroutine magma_dgetrf_batched( & !! ------------------------------------------------------------------------- !! BLAS (matrices in GPU memory) - subroutine magma_daxpy( & + subroutine magmaf_daxpy( & n, & alpha, dx, incx, & dy, incy, & @@ -135,7 +135,7 @@ subroutine magma_daxpy( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_dgemv( & + subroutine magmaf_dgemv( & transA, m, n, & alpha, dA, lda, & dx, incx, & @@ -149,7 +149,7 @@ subroutine magma_dgemv( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_dgemm( & + subroutine magmaf_dgemm( & transA, transB, m, n, k, & alpha, dA, lda, & dB, ldb, & @@ -171,33 +171,33 @@ subroutine magma_dgemm( & !! ------------------------------------------------------------------------- !! malloc wrappers - integer(c_int) function magma_dmalloc( ptr, n ) + integer(c_int) function magmaf_dmalloc( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_dmalloc = magma_malloc( ptr, n*sizeof_double ) + magmaf_dmalloc = magmaf_malloc( ptr, n*sizeof_double ) end function - integer(c_int) function magma_dmalloc_cpu( ptr, n ) + integer(c_int) function magmaf_dmalloc_cpu( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_dmalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_double ) + magmaf_dmalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_double ) end function - integer(c_int) function magma_dmalloc_pinned( ptr, n ) + integer(c_int) function magmaf_dmalloc_pinned( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_dmalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_double ) + magmaf_dmalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_double ) end function !! ------------------------------------------------------------------------- !! set/get wrappers - subroutine magma_dsetmatrix( & + subroutine magmaf_dsetmatrix( & m, n, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -205,14 +205,14 @@ subroutine magma_dsetmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, int(sizeof_double), c_loc(hA_src), lda, dB_dst, ldb, queue, & "magma_dsetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_dgetmatrix( & + subroutine magmaf_dgetmatrix( & m, n, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -220,7 +220,7 @@ subroutine magma_dgetmatrix( & real(c_double), target :: hB_dst(ldb,*) type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, int(sizeof_double), dA_src, lda, c_loc(hB_dst), ldb, queue, & "magma_dgetmatrix" // c_null_char, & __FILE__ // c_null_char, & diff --git a/lib/magma_fmodules/mod_magma2_sfortran.F b/lib/magma_fmodules/mod_magma_sfortran.F similarity index 85% rename from lib/magma_fmodules/mod_magma2_sfortran.F rename to lib/magma_fmodules/mod_magma_sfortran.F index b5c45a41c3..6c5aabab16 100644 --- a/lib/magma_fmodules/mod_magma2_sfortran.F +++ b/lib/magma_fmodules/mod_magma_sfortran.F @@ -1,8 +1,8 @@ -!! @generated from magma2_zfortran.F90, fortran z -> s, Sat Apr 22 18:54:26 2023 +!! @generated from magma_zfortran.F90, fortran z -> s, Sat Apr 22 18:54:26 2023 -module magma2_sfortran +module magma_sfortran -use magma2_common +use magma_common implicit none !! ============================================================================= @@ -11,7 +11,7 @@ module magma2_sfortran !! ------------------------------------------------------------------------- !! CPU interfaces (matrix in CPU memory) - subroutine magma_sgetrf( m, n, A, lda, ipiv, info ) & + subroutine magmaf_sgetrf( m, n, A, lda, ipiv, info ) & bind(C, name="magma_sgetrf") use iso_c_binding integer(c_int), value :: m, n, lda @@ -20,7 +20,7 @@ subroutine magma_sgetrf( m, n, A, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_spotrf( uplo, n, A, lda, info ) & + subroutine magmaf_spotrf( uplo, n, A, lda, info ) & bind(C, name="magma_spotrf") use iso_c_binding integer(c_int), value :: uplo @@ -29,7 +29,7 @@ subroutine magma_spotrf( uplo, n, A, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_sgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_sgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_sgeev") use iso_c_binding @@ -43,7 +43,7 @@ subroutine magma_sgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_sgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_sgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_sgeev_m") use iso_c_binding @@ -57,7 +57,7 @@ subroutine magma_sgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + subroutine magmaf_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_ssyevd_m") use iso_c_binding @@ -75,7 +75,7 @@ subroutine magma_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & !! ------------------------------------------------------------------------- !! ------------------------------------------------------------------------- !! GPU interfaces (matrix in GPU memory) - subroutine magma_sgetrf_gpu( m, n, dA, lda, ipiv, info ) & + subroutine magmaf_sgetrf_gpu( m, n, dA, lda, ipiv, info ) & bind(C, name="magma_sgetrf_gpu") use iso_c_binding integer(c_int), value :: m, n, lda @@ -84,7 +84,7 @@ subroutine magma_sgetrf_gpu( m, n, dA, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_spotrf_gpu( uplo, n, dA, lda, info ) & + subroutine magmaf_spotrf_gpu( uplo, n, dA, lda, info ) & bind(C, name="magma_spotrf_gpu") use iso_c_binding integer(c_int), value :: uplo, n, lda @@ -92,7 +92,7 @@ subroutine magma_spotrf_gpu( uplo, n, dA, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_ssyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + subroutine magmaf_ssyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_ssyevd_gpu") use iso_c_binding @@ -109,7 +109,7 @@ subroutine magma_ssyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, !! ------------------------------------------------------------------------- !! batched GPU interfaces (all arrays in GPU memory) - subroutine magma_sgetrf_batched( & + subroutine magmaf_sgetrf_batched( & m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & bind(C, name="magma_sgetrf_batched") use iso_c_binding @@ -122,7 +122,7 @@ subroutine magma_sgetrf_batched( & !! ------------------------------------------------------------------------- !! BLAS (matrices in GPU memory) - subroutine magma_saxpy( & + subroutine magmaf_saxpy( & n, & alpha, dx, incx, & dy, incy, & @@ -135,7 +135,7 @@ subroutine magma_saxpy( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_sgemv( & + subroutine magmaf_sgemv( & transA, m, n, & alpha, dA, lda, & dx, incx, & @@ -149,7 +149,7 @@ subroutine magma_sgemv( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_sgemm( & + subroutine magmaf_sgemm( & transA, transB, m, n, k, & alpha, dA, lda, & dB, ldb, & @@ -171,33 +171,33 @@ subroutine magma_sgemm( & !! ------------------------------------------------------------------------- !! malloc wrappers - integer(c_int) function magma_smalloc( ptr, n ) + integer(c_int) function magmaf_smalloc( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_smalloc = magma_malloc( ptr, n*sizeof_real ) + magmaf_smalloc = magmaf_malloc( ptr, n*sizeof_real ) end function - integer(c_int) function magma_smalloc_cpu( ptr, n ) + integer(c_int) function magmaf_smalloc_cpu( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_smalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_real ) + magmaf_smalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_real ) end function - integer(c_int) function magma_smalloc_pinned( ptr, n ) + integer(c_int) function magmaf_smalloc_pinned( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_smalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_real ) + magmaf_smalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_real ) end function !! ------------------------------------------------------------------------- !! set/get wrappers - subroutine magma_ssetmatrix( & + subroutine magmaf_ssetmatrix( & m, n, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -205,14 +205,14 @@ subroutine magma_ssetmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, int(sizeof_real), c_loc(hA_src), lda, dB_dst, ldb, queue, & "magma_ssetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_sgetmatrix( & + subroutine magmaf_sgetmatrix( & m, n, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -220,7 +220,7 @@ subroutine magma_sgetmatrix( & real(c_float), target :: hB_dst(ldb,*) type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, int(sizeof_real), dA_src, lda, c_loc(hB_dst), ldb, queue, & "magma_sgetmatrix" // c_null_char, & __FILE__ // c_null_char, & diff --git a/lib/magma_fmodules/mod_magma2_zfortran.F b/lib/magma_fmodules/mod_magma_zfortran.F similarity index 86% rename from lib/magma_fmodules/mod_magma2_zfortran.F rename to lib/magma_fmodules/mod_magma_zfortran.F index 8066052bee..6a1d76e145 100644 --- a/lib/magma_fmodules/mod_magma2_zfortran.F +++ b/lib/magma_fmodules/mod_magma_zfortran.F @@ -1,8 +1,8 @@ !! @precisions fortran z -> s d c -module magma2_zfortran +module magma_zfortran -use magma2_common +use magma_common implicit none !! ============================================================================= @@ -11,7 +11,7 @@ module magma2_zfortran !! ------------------------------------------------------------------------- !! CPU interfaces (matrix in CPU memory) - subroutine magma_zgetrf( m, n, A, lda, ipiv, info ) & + subroutine magmaf_zgetrf( m, n, A, lda, ipiv, info ) & bind(C, name="magma_zgetrf") use iso_c_binding integer(c_int), value :: m, n, lda @@ -20,7 +20,7 @@ subroutine magma_zgetrf( m, n, A, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_zpotrf( uplo, n, A, lda, info ) & + subroutine magmaf_zpotrf( uplo, n, A, lda, info ) & bind(C, name="magma_zpotrf") use iso_c_binding integer(c_int), value :: uplo @@ -29,7 +29,7 @@ subroutine magma_zpotrf( uplo, n, A, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_zgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_zgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_zgeev") use iso_c_binding @@ -43,7 +43,7 @@ subroutine magma_zgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_zgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & + subroutine magmaf_zgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & work, lwork, rwork, info) & bind(C, name="magma_zgeev_m") use iso_c_binding @@ -57,7 +57,7 @@ subroutine magma_zgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & integer(c_int), target :: info !! int* end subroutine - subroutine magma_zheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & + subroutine magmaf_zheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_zheevd_m") use iso_c_binding @@ -75,7 +75,7 @@ subroutine magma_zheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & !! ------------------------------------------------------------------------- !! ------------------------------------------------------------------------- !! GPU interfaces (matrix in GPU memory) - subroutine magma_zgetrf_gpu( m, n, dA, lda, ipiv, info ) & + subroutine magmaf_zgetrf_gpu( m, n, dA, lda, ipiv, info ) & bind(C, name="magma_zgetrf_gpu") use iso_c_binding integer(c_int), value :: m, n, lda @@ -84,7 +84,7 @@ subroutine magma_zgetrf_gpu( m, n, dA, lda, ipiv, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_zpotrf_gpu( uplo, n, dA, lda, info ) & + subroutine magmaf_zpotrf_gpu( uplo, n, dA, lda, info ) & bind(C, name="magma_zpotrf_gpu") use iso_c_binding integer(c_int), value :: uplo, n, lda @@ -92,7 +92,7 @@ subroutine magma_zpotrf_gpu( uplo, n, dA, lda, info ) & integer(c_int), target :: info !! int* end subroutine - subroutine magma_zheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & + subroutine magmaf_zheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & rwork, lrwork, iwork, liwork, info) & bind(C, name="magma_zheevd_gpu") use iso_c_binding @@ -109,7 +109,7 @@ subroutine magma_zheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, !! ------------------------------------------------------------------------- !! batched GPU interfaces (all arrays in GPU memory) - subroutine magma_zgetrf_batched( & + subroutine magmaf_zgetrf_batched( & m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & bind(C, name="magma_zgetrf_batched") use iso_c_binding @@ -122,7 +122,7 @@ subroutine magma_zgetrf_batched( & !! ------------------------------------------------------------------------- !! BLAS (matrices in GPU memory) - subroutine magma_zaxpy( & + subroutine magmaf_zaxpy( & n, & alpha, dx, incx, & dy, incy, & @@ -135,7 +135,7 @@ subroutine magma_zaxpy( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_zgemv( & + subroutine magmaf_zgemv( & transA, m, n, & alpha, dA, lda, & dx, incx, & @@ -149,7 +149,7 @@ subroutine magma_zgemv( & type(c_ptr), value :: queue !! queue_t end subroutine - subroutine magma_zgemm( & + subroutine magmaf_zgemm( & transA, transB, m, n, k, & alpha, dA, lda, & dB, ldb, & @@ -171,33 +171,33 @@ subroutine magma_zgemm( & !! ------------------------------------------------------------------------- !! malloc wrappers - integer(c_int) function magma_zmalloc( ptr, n ) + integer(c_int) function magmaf_zmalloc( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_zmalloc = magma_malloc( ptr, n*sizeof_complex16 ) + magmaf_zmalloc = magmaf_malloc( ptr, n*sizeof_complex16 ) end function - integer(c_int) function magma_zmalloc_cpu( ptr, n ) + integer(c_int) function magmaf_zmalloc_cpu( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_zmalloc_cpu = magma_malloc_cpu( ptr, n*sizeof_complex16 ) + magmaf_zmalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_complex16 ) end function - integer(c_int) function magma_zmalloc_pinned( ptr, n ) + integer(c_int) function magmaf_zmalloc_pinned( ptr, n ) use iso_c_binding type(c_ptr), target :: ptr !! void** integer(c_size_t), value :: n - magma_zmalloc_pinned = magma_malloc_pinned( ptr, n*sizeof_complex16 ) + magmaf_zmalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_complex16 ) end function !! ------------------------------------------------------------------------- !! set/get wrappers - subroutine magma_zsetmatrix( & + subroutine magmaf_zsetmatrix( & m, n, hA_src, lda, dB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -205,14 +205,14 @@ subroutine magma_zsetmatrix( & type(c_ptr), value :: dB_dst type(c_ptr), value :: queue - call magma_setmatrix_internal( & + call magmaf_setmatrix_internal( & m, n, int(sizeof_complex16), c_loc(hA_src), lda, dB_dst, ldb, queue, & "magma_zsetmatrix" // c_null_char, & __FILE__ // c_null_char, & __LINE__ ) end subroutine - subroutine magma_zgetmatrix( & + subroutine magmaf_zgetmatrix( & m, n, dA_src, lda, hB_dst, ldb, queue ) use iso_c_binding integer(c_int), value :: m, n, lda, ldb @@ -220,7 +220,7 @@ subroutine magma_zgetmatrix( & complex(c_double_complex), target :: hB_dst(ldb,*) type(c_ptr), value :: queue - call magma_getmatrix_internal( & + call magmaf_getmatrix_internal( & m, n, int(sizeof_complex16), dA_src, lda, c_loc(hB_dst), ldb, queue, & "magma_zgetmatrix" // c_null_char, & __FILE__ // c_null_char, & diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index ba0f44469a..43be87dfe5 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -8,10 +8,12 @@ module linear_algebra ! use iso_c_binding + use iso_fortran_env, ONLY: int64 + ! use pars, ONLY: SP,schlen #ifdef _MAGMA - use magma2, ONLY: magma_init,magma_queue_create, & -& magma_cgeev_m,magma_zgeev_m,MagmaVec + use magma, ONLY: magmaf_init,magmaf_queue_create, & +& magmaf_cgeev_m,magmaf_zgeev_m,MagmaVec #endif #ifdef _OPENMP use omp_lib @@ -33,7 +35,7 @@ module linear_algebra ! ! magma vars ! - type(c_ptr) :: magma_queue !! magma_queue_t + integer(int64) :: magma_queue !! magma_queue_t logical :: magma_init_done = .false. ! ! Common Work Space @@ -133,8 +135,8 @@ subroutine LINEAR_ALGEBRA_error(calling_subr,message_) ! subroutine magma_setup() #ifdef _MAGMA - call magma_init() - call magma_queue_create( 0, magma_queue ) + call magmaf_init() + call magmaf_queue_create( 0, magma_queue ) magma_init_done=.true. #endif return @@ -244,11 +246,11 @@ subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) # endif ! # if defined _DOUBLE - call magma_zgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& -& work,lwork,rwk,ifail) + call magmaf_zgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& +& work,lwork,rwk,ifail) # else - call magma_cgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& -& work,lwork,rwk,ifail) + call magmaf_cgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& +& work,lwork,rwk,ifail) # endif ! # if defined _OPENMP From 748413042b93918ce0ae0fba9c051925a841c604 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 28 Feb 2025 19:38:33 +0100 Subject: [PATCH 0897/1367] GEEV interface removed and included in SERIAL_diagonalization --- Discussion_AD_DS_20250225.dat | 10 +++ src/linear_algebra/SERIAL_diagonalization.F | 83 +++++++++++++++-- src/modules/mod_linear_algebra.F | 98 ++++----------------- 3 files changed, 104 insertions(+), 87 deletions(-) diff --git a/Discussion_AD_DS_20250225.dat b/Discussion_AD_DS_20250225.dat index fbf90acd1b..92c775fd89 100644 --- a/Discussion_AD_DS_20250225.dat +++ b/Discussion_AD_DS_20250225.dat @@ -1,5 +1,9 @@ +----------------------- +OVERALL philosophy +----------------------- + - mod_wrapper --> wrapper yambo for single and double to blas --> when available calls devxlib single and double subroutines - mod_linear algebra has wrappers single and double to few selected lapack @@ -25,5 +29,11 @@ LINEAR_ALGEBRA_driver is never directly called, but the above subroutines are directly called. It only performs initializations +----------------------- +DONE +----------------------- + +- compilation to be fixed + - To be removed: M_eigenvalues, heev and geev interfaces diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index e03eada92f..652c456742 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -15,32 +15,99 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! V_left(j)**H * M = E(j) * V_left(j)**H ! where V_left(j)**H denotes the conjugate transpose of V_left(j). ! - use pars, ONLY:SP - use linear_algebra,ONLY:LINEAR_ALGEBRA_error,M_eigenvalues,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS - use timing_m, ONLY:timing + use pars, ONLY: SP + use linear_algebra,ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& +& magma_init_done,magma_setup,have_magma + use timing_m, ONLY: timing + use com, ONLY: msg +#ifdef _MAGMA + use magma, ONLY: magmaf_cgeev_m,magmaf_zgeev_m,MagmaVec +#endif +#ifdef _OPENMP + use omp_lib +#endif + ! #include ! integer :: n complex(SP) :: M(n,n),E(n),V_left(n,n),V_right(n,n) type(LALGEBRA_WS) :: WS ! + integer :: nthreads_save + + ! + ! name aliasing + ! +#if defined _DOUBLE +# define _XGEEV_ ZGEEV +# define _MAGMAF_XGEEV_ magmaf_ZGEEV_m +#else +# define _XGEEV_ CGEEV +# define _MAGMAF_XGEEV_ magmaf_CGEEV_m +#endif + ! + call timing('SERIAL_diagonalization',OPR='start') + ! + ! Thread safety +#if defined _OPENMP + nthreads_save=omp_get_max_threads() + call omp_set_num_threads(1) +#endif + + ! + ! workspace + ! allocate(WS%v_cmplx(1)) YAMBO_ALLOC(WS%v_real,(2*n)) - call M_eigenvalues(n,M,E,V_left,V_right,WS%v_cmplx,-1,WS%v_real,WS%i_fail) ! - call timing('SERIAL_diagonalization',OPR='start') +#if defined _MAGMA + call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& +& WS%v_cmplx,-1,WS%v_real,WS%i_fail) +#else + call _XGEEV_('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) +#endif ! - if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error('M_eigenvalues (SD)','WS%v_cmplxspace failed') + if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XGEEV_ ','WS%v_cmplxspace failed') ! WS%dim=int(real(WS%v_cmplx(1))) deallocate(WS%v_cmplx) YAMBO_ALLOC(WS%v_cmplx,(WS%dim)) - call M_eigenvalues(n,M,E,V_left,V_right,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) + + ! + ! use magma (if available) + ! +#if defined _MAGMA + ! + call msg('sr','SERIAL diagonalization with magma') ! - if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error('M_eigenvalues (SD)','failed') + if (.not.magma_init_done) then + call msg('sr','Initializing magma library in geev') + call magma_setup() + endif + ! + call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& +& WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) + ! +#else + ! + ! use lapack (otherwise) + ! + call msg('sr','SERIAL diagonalization with lapack') + ! + call _XGEEV_('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) + ! +#endif + ! + if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(' _XGEEV_ ','failed') ! call LINEAR_ALGEBRA_WS_reset(WS) ! + ! Thread safety +#if defined _OPENMP + call omp_set_num_threads(nthreads_save) +#endif + ! + ! call timing('SERIAL_diagonalization',OPR='stop') ! end subroutine diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index 43be87dfe5..c9ab5c0479 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -10,13 +10,9 @@ module linear_algebra use iso_c_binding use iso_fortran_env, ONLY: int64 ! - use pars, ONLY: SP,schlen + use pars, ONLY: SP,schlen #ifdef _MAGMA - use magma, ONLY: magmaf_init,magmaf_queue_create, & -& magmaf_cgeev_m,magmaf_zgeev_m,MagmaVec -#endif -#ifdef _OPENMP - use omp_lib + use magma, ONLY: magmaf_init,magmaf_queue_create #endif ! #include @@ -35,8 +31,13 @@ module linear_algebra ! ! magma vars ! - integer(int64) :: magma_queue !! magma_queue_t - logical :: magma_init_done = .false. + integer(int64) :: magma_queue !! magma_queue_t + logical :: magma_init_done = .false. +#if defined _MAGMA + logical, parameter :: have_magma=.true. +#else + logical, parameter :: have_magma=.false. +#endif ! ! Common Work Space ! @@ -67,11 +68,6 @@ module linear_algebra public :: LU_factorization public :: LU_inversion public :: SV_decomposition - public :: M_eigenvalues - ! - interface M_eigenvalues - module procedure heev,geev - end interface ! contains ! @@ -98,15 +94,6 @@ subroutine LINEAR_ALGEBRA_WS_reset(WS) YAMBO_FREE(WS%vp_int) YAMBO_FREE(WS%v_int) else - if(allocated(WS%v_real)) deallocate(WS%v_real) - if(allocated(WS%vp_real)) deallocate(WS%vp_real) - if(allocated(WS%v_cmplx)) deallocate(WS%v_cmplx) - if(allocated(WS%vp_cmplx)) deallocate(WS%vp_cmplx) - if(allocated(WS%m1_cmplx)) deallocate(WS%m1_cmplx) - if(allocated(WS%m2_cmplx)) deallocate(WS%m2_cmplx) - if(allocated(WS%vp_int)) deallocate(WS%vp_int) - if(allocated(WS%v_int)) deallocate(WS%v_int) - ! #ifdef _CUDAF if(allocated(WS%v_real_d)) deallocate(WS%v_real_d) if(allocated(WS%vp_real_d)) deallocate(WS%vp_real_d) @@ -123,6 +110,16 @@ subroutine LINEAR_ALGEBRA_WS_reset(WS) ! !call error("[GPU] openacc FREE not implemented in LinAlg_WS_reset") #endif + ! + if(allocated(WS%v_real)) deallocate(WS%v_real) + if(allocated(WS%vp_real)) deallocate(WS%vp_real) + if(allocated(WS%v_cmplx)) deallocate(WS%v_cmplx) + if(allocated(WS%vp_cmplx)) deallocate(WS%vp_cmplx) + if(allocated(WS%m1_cmplx)) deallocate(WS%m1_cmplx) + if(allocated(WS%m2_cmplx)) deallocate(WS%m2_cmplx) + if(allocated(WS%vp_int)) deallocate(WS%vp_int) + if(allocated(WS%v_int)) deallocate(WS%v_int) + ! endif ! end subroutine @@ -216,61 +213,4 @@ subroutine heev(msize,M,E_real,work,lwork,rwk,ifail) ! end subroutine heev ! - subroutine geev(msize,M,E_cmpl,V_left,V_right,work,lwork,rwk,ifail) - ! - use com, ONLY:msg - ! - integer, intent(in) :: msize,lwork - integer, intent(out) :: ifail - real(SP), intent(out) :: rwk(*) - complex(SP),intent(out) :: E_cmpl(*),V_left(msize,*),V_right(msize,*),work(*) - complex(SP),intent(inout) :: M(msize,*) - ! - integer :: nthreads - ! - ! - ! use magma (if available) - ! -#if defined _MAGMA - ! - if (.not.magma_init_done) then - call msg('sr','Initializing magma library in geev') - call magma_setup() - endif - call msg('sr','SERIAL diagonalization with magma') - ! -# if defined _OPENMP - ! thread safety - nthreads=omp_get_max_threads() - call omp_set_num_threads(1) -# endif - ! -# if defined _DOUBLE - call magmaf_zgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& -& work,lwork,rwk,ifail) -# else - call magmaf_cgeev_m(MagmaVec,MagmaVec, msize,M,msize,E_cmpl,V_left,msize,V_right,msize,& -& work,lwork,rwk,ifail) -# endif - ! -# if defined _OPENMP - call omp_set_num_threads(nthreads) -# endif - ! -#else - ! - call msg('sr','SERIAL diagonalization with lapack') - ! - ! use lapack - ! -# if defined _DOUBLE - call ZGEEV('V','V',msize,M,msize,E_cmpl,V_left,msize,V_right,msize,work,lwork,rwk,ifail) -# else - call CGEEV('V','V',msize,M,msize,E_cmpl,V_left,msize,V_right,msize,work,lwork,rwk,ifail) -# endif - ! -#endif - ! - end subroutine geev - ! end module linear_algebra From e63a9beeb9d356e3379900cf2eb6883817786ccc Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 1 Mar 2025 08:52:25 +0100 Subject: [PATCH 0898/1367] HEEV also eliminated from module and merged in SERIAL_HERM_diago. --- .../SERIAL_HERMITIAN_diagonalization.F | 95 ++++++++++++++----- src/linear_algebra/SERIAL_diagonalization.F | 23 ++--- src/modules/mod_linear_algebra.F | 21 +--- 3 files changed, 82 insertions(+), 57 deletions(-) diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index b353516d0e..dc70ee35a0 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -7,12 +7,19 @@ ! subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! - use magma - use pars, ONLY:SP - use drivers, ONLY:l_nl_optics,l_real_time - use linear_algebra, ONLY:LINEAR_ALGEBRA_error,& -& LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS - use timing_m, ONLY:timing + use pars, ONLY: SP + use drivers, ONLY: l_nl_optics,l_real_time + use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& +& magma_init_done,magma_setup + use timing_m, ONLY: timing + use com, ONLY: msg +#ifdef _MAGMA + use magma, ONLY: magmaf_cheevd_m,magmaf_zheevd_m,MagmaVec +#endif +#ifdef _OPENMP + use omp_lib +#endif + ! #include ! integer :: n @@ -23,8 +30,31 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) integer :: lwork, lrwork, liwork type(LALGEBRA_WS) :: WS ! - ! MAGMA - call magmaf_init() + integer :: nthreads_save + + ! + ! name aliasing + ! +#if defined _DOUBLE +# define _XHEEV_ ZHEEV +# define _MAGMAF_XHEEV_ magmaf_ZHEEVD_m +#else +# define _XHEEV_ CHEEV +# define _MAGMAF_XHEEV_ magmaf_CHEEVD_m +#endif + ! + if(.not.(l_nl_optics.or.l_real_time)) then + call timing('SERIAL_HERMITIAN_diagonalization',OPR='start') + endif + ! + ! Thread safety +#if defined _OPENMP + nthreads_save=omp_get_max_threads() + call omp_set_num_threads(1) +#endif + + ! + ! Workspace ! lwork=-1 lrwork=-1 @@ -33,19 +63,21 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) allocate(WS%v_real(1)) allocate(WS%v_int(1)) ! - if(.not.(l_nl_optics.or.l_real_time)) then - call timing('SERIAL_HERMITIAN_diagonalization',OPR='start') - endif - ! - ! Query lwork, lrwork, liwork - ! -#if defined _DOUBLE - call ZHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) +#if defined _MAGMA + ! + if (.not.magma_init_done) then + call msg('sr','Initializing magma library in geev') + call magma_setup() + endif + ! + call _MAGMAF_XHEEV_(1,'v','u', n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& +& lrwork,WS%v_int,liwork,WS%i_fail) #else - call magmaf_cheevd_m(2,'v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) + call _XHEEV_('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) #endif ! - ! Allocate v_cmplx, v_real, v_int + if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XHEEV_ ','WS%v_cmplx size query failed') + ! ! lwork=nint(real(WS%v_cmplx(1))) lrwork=nint(WS%v_real(1)) @@ -63,22 +95,33 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) allocate(WS%v_real(lrwork)) allocate(WS%v_int(liwork)) endif + + ! + ! use magma (if available) + ! +#if defined _MAGMA + ! + call _MAGMAF_XHEEV_(1,'v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& +& lrwork,WS%v_int,liwork,WS%i_fail) ! - ! Compute eigenvalues - ! -#if defined _DOUBLE - call ZHEEV('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) - if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(subname,'performing ZHEEV') #else - call magmaf_cheevd_m(2,'v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,lrwork,WS%v_int,liwork,WS%i_fail) - if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(subname,'performing CHEEV') + ! + call _XHEEV_('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + ! #endif + ! + if(WS%i_fail /= 0) call LINEAR_ALGEBRA_error(' _XHEEV_ ','failed') ! call LINEAR_ALGEBRA_WS_reset(WS) + ! + ! Thread safety +#if defined _OPENMP + call omp_set_num_threads(nthreads_save) +#endif ! if(.not.(l_nl_optics.or.l_real_time)) then call timing('SERIAL_HERMITIAN_diagonalization',OPR='stop') endif ! - call magmaf_finalize() end subroutine + diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index 652c456742..5a2a554ab9 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -55,19 +55,25 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) #endif ! - ! workspace + ! Workspace ! allocate(WS%v_cmplx(1)) YAMBO_ALLOC(WS%v_real,(2*n)) ! #if defined _MAGMA - call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& -& WS%v_cmplx,-1,WS%v_real,WS%i_fail) + ! + if (.not.magma_init_done) then + call msg('sr','Initializing magma library in geev') + call magma_setup() + endif + ! + call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& +& WS%v_cmplx,-1,WS%v_real,WS%i_fail) #else - call _XGEEV_('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) + call _XGEEV_('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) #endif ! - if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XGEEV_ ','WS%v_cmplxspace failed') + if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XGEEV_ ','WS%v_cmplx size query failed') ! WS%dim=int(real(WS%v_cmplx(1))) deallocate(WS%v_cmplx) @@ -80,11 +86,6 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! call msg('sr','SERIAL diagonalization with magma') ! - if (.not.magma_init_done) then - call msg('sr','Initializing magma library in geev') - call magma_setup() - endif - ! call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& & WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) ! @@ -98,7 +99,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! #endif ! - if(WS%i_fail.ne.0) call LINEAR_ALGEBRA_error(' _XGEEV_ ','failed') + if(WS%i_fail /= 0) call LINEAR_ALGEBRA_error(' _XGEEV_ ','failed') ! call LINEAR_ALGEBRA_WS_reset(WS) ! diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index c9ab5c0479..dad65891ac 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -193,24 +193,5 @@ subroutine LU_inversion(msize,M,ipvt,work,lwork,ifail) ! end subroutine LU_inversion ! - !============================== - ! EIGENVALUES AND EIGENVECTORS - !============================== - ! - subroutine heev(msize,M,E_real,work,lwork,rwk,ifail) - ! - integer, intent(in) :: msize,lwork - integer, intent(out) :: ifail - real(SP), intent(out) :: E_real(*), rwk(*) - complex(SP),intent(out) :: work(*) - complex(SP),intent(inout) :: M(msize,*) - ! -#if defined _DOUBLE - call ZHEEV('V','U',msize,M,msize,E_real,work,lwork,rwk,ifail) -#else - call CHEEV('V','U',msize,M,msize,E_real,work,lwork,rwk,ifail) -#endif - ! - end subroutine heev - ! end module linear_algebra + From 5fe1ba87fb79fd123a96130f16b66abd599499b0 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 1 Mar 2025 21:14:12 +0100 Subject: [PATCH 0899/1367] further rationalization of LA drivers --- .../SERIAL_HERMITIAN_diagonalization.F | 34 ++++----- src/linear_algebra/SERIAL_diagonalization.F | 32 +++------ src/modules/mod_linear_algebra.F | 71 ++++++++++++++++++- 3 files changed, 95 insertions(+), 42 deletions(-) diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index dc70ee35a0..da6fb12499 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -10,12 +10,13 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) use pars, ONLY: SP use drivers, ONLY: l_nl_optics,l_real_time use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& -& magma_init_done,magma_setup - use timing_m, ONLY: timing - use com, ONLY: msg +& magma_init_done,magma_setup,xheev #ifdef _MAGMA - use magma, ONLY: magmaf_cheevd_m,magmaf_zheevd_m,MagmaVec + use magma, ONLY: magmaf_cheevd_m, magmaf_zheevd_m +! use linear_algebra, ONLY: magmaf_xheevd_m #endif + use timing_m, ONLY: timing + use com, ONLY: msg #ifdef _OPENMP use omp_lib #endif @@ -32,17 +33,12 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! integer :: nthreads_save - ! - ! name aliasing - ! #if defined _DOUBLE -# define _XHEEV_ ZHEEV -# define _MAGMAF_XHEEV_ magmaf_ZHEEVD_m +# define magmaf_xheevd_m magmaf_zheevd_m #else -# define _XHEEV_ CHEEV -# define _MAGMAF_XHEEV_ magmaf_CHEEVD_m +# define magmaf_xheevd_m magmaf_cheevd_m #endif - ! + if(.not.(l_nl_optics.or.l_real_time)) then call timing('SERIAL_HERMITIAN_diagonalization',OPR='start') endif @@ -70,10 +66,10 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) call magma_setup() endif ! - call _MAGMAF_XHEEV_(1,'v','u', n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& -& lrwork,WS%v_int,liwork,WS%i_fail) + call magmaf_xheevd_m(1,'v','u', n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& +& lrwork,WS%v_int,liwork,WS%i_fail) #else - call _XHEEV_('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) #endif ! if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XHEEV_ ','WS%v_cmplx size query failed') @@ -101,16 +97,16 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! #if defined _MAGMA ! - call _MAGMAF_XHEEV_(1,'v','u',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& -& lrwork,WS%v_int,liwork,WS%i_fail) + call magmaf_xheevd_m(1,'v','u',n, M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& +& lrwork,WS%v_int,liwork,WS%i_fail) ! #else ! - call _XHEEV_('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) ! #endif ! - if(WS%i_fail /= 0) call LINEAR_ALGEBRA_error(' _XHEEV_ ','failed') + if(WS%i_fail /= 0) call LINEAR_ALGEBRA_error(' XHEEV ','failed') ! call LINEAR_ALGEBRA_WS_reset(WS) ! diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index 5a2a554ab9..003ebeb1d9 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -15,14 +15,14 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! V_left(j)**H * M = E(j) * V_left(j)**H ! where V_left(j)**H denotes the conjugate transpose of V_left(j). ! - use pars, ONLY: SP - use linear_algebra,ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& -& magma_init_done,magma_setup,have_magma - use timing_m, ONLY: timing - use com, ONLY: msg + use pars, ONLY: SP + use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& +& magma_init_done,magma_setup,xgeev #ifdef _MAGMA - use magma, ONLY: magmaf_cgeev_m,magmaf_zgeev_m,MagmaVec + use linear_algebra, ONLY: magmaf_xgeev_m #endif + use timing_m, ONLY: timing + use com, ONLY: msg #ifdef _OPENMP use omp_lib #endif @@ -35,17 +35,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! integer :: nthreads_save - ! - ! name aliasing - ! -#if defined _DOUBLE -# define _XGEEV_ ZGEEV -# define _MAGMAF_XGEEV_ magmaf_ZGEEV_m -#else -# define _XGEEV_ CGEEV -# define _MAGMAF_XGEEV_ magmaf_CGEEV_m -#endif - ! + call timing('SERIAL_diagonalization',OPR='start') ! ! Thread safety @@ -67,10 +57,10 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) call magma_setup() endif ! - call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& + call magmaf_xgeev_m('V','V', n,M,n,E,V_left,n,V_right,n,& & WS%v_cmplx,-1,WS%v_real,WS%i_fail) #else - call _XGEEV_('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) + call xgeev('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) #endif ! if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XGEEV_ ','WS%v_cmplx size query failed') @@ -86,7 +76,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! call msg('sr','SERIAL diagonalization with magma') ! - call _MAGMAF_XGEEV_(MagmaVec,MagmaVec, n,M,n,E,V_left,n,V_right,n,& + call magmaf_xgeev_m('V','V', n,M,n,E,V_left,n,V_right,n,& & WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) ! #else @@ -95,7 +85,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! call msg('sr','SERIAL diagonalization with lapack') ! - call _XGEEV_('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) + call xgeev('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) ! #endif ! diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index dad65891ac..edf688d380 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -9,10 +9,11 @@ module linear_algebra ! use iso_c_binding use iso_fortran_env, ONLY: int64 - ! use pars, ONLY: SP,schlen + ! #ifdef _MAGMA - use magma, ONLY: magmaf_init,magmaf_queue_create + use magma, ONLY: magmaf_init,magmaf_queue_create,& +& magmaf_cgeev_m,magmaf_zgeev_m,MagmaVec #endif ! #include @@ -64,12 +65,78 @@ module linear_algebra integer , allocatable DEV_ATTR :: vp_int_d(:) ! end type LALGEBRA_WS + + ! + !=============== + ! INTERFACES + !=============== + ! + interface xgeev + subroutine zgeev(jobvl,jobvr,n,A,lda,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info) + use iso_fortran_env, ONLY : WP => real64 + character(1) :: jobvl,jobvr + integer :: n,lda,ldvl,ldvr,lwork,info + complex(WP) :: w(*), A(lda,*), vl(ldvl,*), vr(ldvr,*), work(*) + real(WP) :: rwork(*) + end subroutine + subroutine cgeev(jobvl,jobvr,n,A,lda,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info) + use iso_fortran_env, ONLY : WP => real32 + character(1) :: jobvl,jobvr + integer :: n,lda,ldvl,ldvr,lwork,info + complex(WP) :: w(*), A(lda,*), vl(ldvl,*), vr(ldvr,*), work(*) + real(WP) :: rwork(*) + end subroutine + end interface + ! + interface xheev + subroutine zheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) + use iso_fortran_env, ONLY : WP => real64 + character(1) :: jobz,uplo + integer :: n,lda,lwork,info + complex(WP) :: A(lda,*), work(*) + real(WP) :: w(*), rwork(*) + end subroutine + subroutine cheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) + use iso_fortran_env, ONLY : WP => real32 + character(1) :: jobz,uplo + integer :: n,lda,lwork,info + complex(WP) :: A(lda,*), work(*) + real(WP) :: w(*), rwork(*) + end subroutine + end interface + ! +#ifdef _MAGMA + ! + interface magmaf_xgeev_m + procedure :: magmaf_cgeev_m,magmaf_zgeev_m + end interface + ! + interface magmaf_xheevd_m + procedure :: magmaf_cheevd_m,magmaf_zheevd_m + end interface + ! +#endif + + + + ! + !==================== + ! PUBLIC STATEMENTS + !==================== ! public :: LU_factorization public :: LU_inversion public :: SV_decomposition + public :: xgeev,xheev +#ifdef _MAGMA + public :: magmaf_xgeev_m,magmaf_xheevd_m +#endif ! contains + ! + !============================ + ! AUXILIARY FUNCTIONS + !============================ ! subroutine LINEAR_ALGEBRA_WS_reset(WS) use drivers, ONLY:l_nl_optics,l_real_time From abf0d00afc2c4960fbf502ee84f6a69360848126 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 1 Mar 2025 22:08:50 +0100 Subject: [PATCH 0900/1367] LA interfaces and modules further rationalized --- Discussion_AD_DS_20250225.dat | 13 +- .../SERIAL_HERMITIAN_diagonalization.F | 6 +- src/linear_algebra/SERIAL_SVD_inversion.F | 9 +- src/linear_algebra/SERIAL_diagonalization.F | 6 +- src/linear_algebra/SERIAL_inversion.F | 11 +- src/modules/mod_linear_algebra.F | 155 ++++++++++-------- 6 files changed, 111 insertions(+), 89 deletions(-) diff --git a/Discussion_AD_DS_20250225.dat b/Discussion_AD_DS_20250225.dat index 92c775fd89..6f06a2d10b 100644 --- a/Discussion_AD_DS_20250225.dat +++ b/Discussion_AD_DS_20250225.dat @@ -4,12 +4,6 @@ OVERALL philosophy ----------------------- -- mod_wrapper --> wrapper yambo for single and double to blas --> when available calls devxlib single and double subroutines - -- mod_linear algebra has wrappers single and double to few selected lapack - --> LU_factorization - --> SV_decomposition - - dedicated subroutines which interfaces lapack or magma (single and double precision version), and serial or parallel (?) SERIAL_HERMITIAN_diagonalization --> could be renamed HEEV @@ -37,3 +31,10 @@ DONE - To be removed: M_eigenvalues, heev and geev interfaces + +- mod_wrapper --> wrapper yambo for single and double to blas --> when available calls devxlib single and double subroutines + +- mod_linear algebra has wrappers single and double to few selected lapack + --> LU_factorization + --> SV_decomposition + diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index da6fb12499..ba265a4e39 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -10,7 +10,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) use pars, ONLY: SP use drivers, ONLY: l_nl_optics,l_real_time use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& -& magma_init_done,magma_setup,xheev +& magma_init_done,magma_setup,la_xheev #ifdef _MAGMA use magma, ONLY: magmaf_cheevd_m, magmaf_zheevd_m ! use linear_algebra, ONLY: magmaf_xheevd_m @@ -69,7 +69,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) call magmaf_xheevd_m(1,'v','u', n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& & lrwork,WS%v_int,liwork,WS%i_fail) #else - call xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call la_xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) #endif ! if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XHEEV_ ','WS%v_cmplx size query failed') @@ -102,7 +102,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! #else ! - call xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call la_xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) ! #endif ! diff --git a/src/linear_algebra/SERIAL_SVD_inversion.F b/src/linear_algebra/SERIAL_SVD_inversion.F index 1e0ab201fe..fb95c78e95 100644 --- a/src/linear_algebra/SERIAL_SVD_inversion.F +++ b/src/linear_algebra/SERIAL_SVD_inversion.F @@ -9,7 +9,7 @@ subroutine SERIAL_SVD_inversion(n,M,SVD_digits) ! use pars, ONLY:SP,cZERO use wrapper, ONLY:M_by_M - use linear_algebra, ONLY:LINEAR_ALGEBRA_error,SV_decomposition,& + use linear_algebra, ONLY:LINEAR_ALGEBRA_error,la_xgesvd,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing #include @@ -31,14 +31,17 @@ subroutine SERIAL_SVD_inversion(n,M,SVD_digits) YAMBO_ALLOC(WS%m1_cmplx,(n,n)) allocate(WS%v_cmplx(1)) ! - call SV_decomposition(n,M,WS%vp_real,WS%m2_cmplx,WS%m1_cmplx,WS%v_cmplx,-1,WS%v_real,WS%i_fail) + call la_xgesvd('S','A',n,n,M,n,WS%vp_real,WS%m2_cmplx,n,WS%m1_cmplx,n,& +& WS%v_cmplx,-1,WS%v_real,WS%i_fail) ! if(WS%i_fail/=0) call LINEAR_ALGEBRA_error('GESVD (SVD)','WS%v_cmplxspace failed') ! WS%dim=int(real(WS%v_cmplx(1))) deallocate(WS%v_cmplx) YAMBO_ALLOC(WS%v_cmplx,(WS%dim)) - call SV_decomposition(n,M,WS%vp_real,WS%m2_cmplx,WS%m1_cmplx,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) + ! + call la_xgesvd('S','A',n,n,M,n,WS%vp_real,WS%m2_cmplx,n,WS%m1_cmplx,n,& +& WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) ! if(WS%i_fail/=0) call LINEAR_ALGEBRA_error('GESVD (SVD)','failed') ! diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index 003ebeb1d9..9707fde5c7 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -17,7 +17,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! use pars, ONLY: SP use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& -& magma_init_done,magma_setup,xgeev +& magma_init_done,magma_setup,la_xgeev #ifdef _MAGMA use linear_algebra, ONLY: magmaf_xgeev_m #endif @@ -60,7 +60,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) call magmaf_xgeev_m('V','V', n,M,n,E,V_left,n,V_right,n,& & WS%v_cmplx,-1,WS%v_real,WS%i_fail) #else - call xgeev('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) + call la_xgeev('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,-1,WS%v_real,WS%i_fail) #endif ! if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XGEEV_ ','WS%v_cmplx size query failed') @@ -85,7 +85,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! call msg('sr','SERIAL diagonalization with lapack') ! - call xgeev('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) + call la_xgeev('V','V',n,M,n,E,V_left,n,V_right,n,WS%v_cmplx,WS%dim,WS%v_real,WS%i_fail) ! #endif ! diff --git a/src/linear_algebra/SERIAL_inversion.F b/src/linear_algebra/SERIAL_inversion.F index 79c489e57b..69b6249cee 100644 --- a/src/linear_algebra/SERIAL_inversion.F +++ b/src/linear_algebra/SERIAL_inversion.F @@ -9,7 +9,7 @@ subroutine SERIAL_inversion(n,M,det,eval_det) ! use pars, ONLY: SP,cONE use drivers, ONLY: l_nl_optics,l_real_time - use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LU_factorization,LU_inversion,& + use linear_algebra, ONLY: LINEAR_ALGEBRA_error,la_xgetrf,la_xgetri,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY: timing #include @@ -29,7 +29,7 @@ subroutine SERIAL_inversion(n,M,det,eval_det) allocate(WS%v_int(n)) endif ! - call LU_factorization(n,M,WS%v_int,WS%i_fail) + call la_xgetrf(n,n,M,n,WS%v_int,WS%i_fail) ! if(WS%i_fail/=0) call LINEAR_ALGEBRA_error('GETRF (SI)','WS%v_cmplxspace failed') ! @@ -49,7 +49,9 @@ subroutine SERIAL_inversion(n,M,det,eval_det) else allocate(WS%v_cmplx(1)) endif - call LU_inversion(n,M,WS%v_int,WS%v_cmplx,-1,WS%i_fail) + ! + call la_xgetri(n,M,n,WS%v_int,WS%v_cmplx,-1,WS%i_fail) + ! WS%dim=int(real(WS%v_cmplx(1))) if(.not.(l_nl_optics.or.l_real_time)) then YAMBO_FREE(WS%v_cmplx) @@ -58,7 +60,8 @@ subroutine SERIAL_inversion(n,M,det,eval_det) deallocate(WS%v_cmplx) allocate(WS%v_cmplx(WS%dim)) endif - call LU_inversion(n,M,WS%v_int,WS%v_cmplx,WS%dim,WS%i_fail) + ! + call la_xgetri(n,M,n,WS%v_int,WS%v_cmplx,WS%dim,WS%i_fail) ! if(WS%i_fail/=0) call LINEAR_ALGEBRA_error('GETRI (SI)','failed') ! diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index edf688d380..0e83d5c0fe 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -71,7 +71,9 @@ module linear_algebra ! INTERFACES !=============== ! - interface xgeev + ! Eigensolvers + ! + interface la_xgeev subroutine zgeev(jobvl,jobvr,n,A,lda,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info) use iso_fortran_env, ONLY : WP => real64 character(1) :: jobvl,jobvr @@ -88,7 +90,7 @@ subroutine cgeev(jobvl,jobvr,n,A,lda,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info) end subroutine end interface ! - interface xheev + interface la_xheev subroutine zheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) use iso_fortran_env, ONLY : WP => real64 character(1) :: jobz,uplo @@ -116,7 +118,74 @@ subroutine cheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) end interface ! #endif - + ! + ! Singular Value Decomposition + ! + interface la_xgesvd + subroutine zgesvd(jobu,jobvt,m,n,A,lda,s,U,ldu,VT,ldvt,work,lwork,rwork,info) + use iso_fortran_env, ONLY : WP => real64 + character(1) :: jobu,jobvt + integer :: m,n,lda,ldu,ldvt,lwork,info + complex(WP) :: A(lda,*), U(ldu,*), VT(ldvt,*), work(*) + real(WP) :: s(*), rwork(*) + end subroutine + subroutine cgesvd(jobu,jobvt,m,n,A,lda,s,U,ldu,VT,ldvt,work,lwork,rwork,info) + use iso_fortran_env, ONLY : WP => real32 + character(1) :: jobu,jobvt + integer :: m,n,lda,ldu,ldvt,lwork,info + complex(WP) :: A(lda,*), U(ldu,*), VT(ldvt,*), work(*) + real(WP) :: s(*), rwork(*) + end subroutine + end interface + ! + ! Lower/Upper Factorization and Inverison + ! + interface la_xgetrf + subroutine zgetrf(m,n,A,lda,ipiv,info) + use iso_fortran_env, ONLY : WP => real64 + integer :: m,n,lda,info + integer :: ipiv(*) + complex(WP) :: A(lda,*) + end subroutine + subroutine cgetrf(m,n,A,lda,ipiv,info) + use iso_fortran_env, ONLY : WP => real32 + integer :: m,n,lda,info + integer :: ipiv(*) + complex(WP) :: A(lda,*) + end subroutine + end interface + ! + interface la_xgetri + subroutine zgetri(n,A,lda,ipiv,work,lwork,info) + use iso_fortran_env, ONLY : WP => real64 + integer :: n,lda,info,lwork + integer :: ipiv(*) + complex(WP) :: A(lda,*), work(*) + end subroutine + subroutine cgetri(n,A,lda,ipiv,work,lwork,info) + use iso_fortran_env, ONLY : WP => real32 + integer :: n,lda,info,lwork + integer :: ipiv(*) + complex(WP) :: A(lda,*), work(*) + end subroutine + end interface + ! + interface la_xgetrs + subroutine zgetrs(trans,n,nrhs,A,lda,ipiv,B,ldb,info) + use iso_fortran_env, ONLY : WP => real64 + character(1) :: trans + integer :: n,nrhs,lda,ldb,info + integer :: ipiv(*) + complex(WP) :: A(lda,*), B(ldb,*) + end subroutine + subroutine cgetrs(trans,n,nrhs,A,lda,ipiv,B,ldb,info) + use iso_fortran_env, ONLY : WP => real32 + character(1) :: trans + integer :: n,nrhs,lda,ldb,info + integer :: ipiv(*) + complex(WP) :: A(lda,*), B(ldb,*) + end subroutine + end interface ! @@ -124,13 +193,13 @@ subroutine cheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) ! PUBLIC STATEMENTS !==================== ! - public :: LU_factorization - public :: LU_inversion - public :: SV_decomposition - public :: xgeev,xheev + public :: la_xgeev, la_xheev #ifdef _MAGMA public :: magmaf_xgeev_m,magmaf_xheevd_m #endif + public :: la_xgesvd + public :: la_xgetrf, la_xgetri, la_xgetrs + ! ! contains ! @@ -138,6 +207,15 @@ subroutine cheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) ! AUXILIARY FUNCTIONS !============================ ! + subroutine magma_setup() +#ifdef _MAGMA + call magmaf_init() + call magmaf_queue_create( 0, magma_queue ) + magma_init_done=.true. +#endif + return + end subroutine + ! subroutine LINEAR_ALGEBRA_WS_reset(WS) use drivers, ONLY:l_nl_optics,l_real_time type(LALGEBRA_WS) :: WS @@ -197,68 +275,5 @@ subroutine LINEAR_ALGEBRA_error(calling_subr,message_) call error( trim( STRING_pack('LINEAR ALGEBRA driver [',trim(calling_subr),'] ',trim(message_)) )) end subroutine ! - subroutine magma_setup() -#ifdef _MAGMA - call magmaf_init() - call magmaf_queue_create( 0, magma_queue ) - magma_init_done=.true. -#endif - return - end subroutine - ! - !============================ - ! SINGLE VALUE DECOMPOSITION - !============================ - ! - subroutine SV_decomposition(msize, M, SV, U, VH, work, lwork, r_WK, ifail) - ! - integer, intent(in) :: msize, lwork - integer, intent(out) :: ifail - ! - real(SP), intent(out) :: r_WK(*), SV(*) - complex(SP),intent(inout):: M(msize,*) - complex(SP),intent(out) :: U(msize,*), VH(msize,*), work(*) - ! -#if defined _DOUBLE - call ZGESVD('S','A',msize,msize,M,msize,SV,U,msize,VH,msize,work,lwork,r_WK,ifail) -#else - call CGESVD('S','A',msize,msize,M,msize,SV,U,msize,VH,msize,work,lwork,r_WK,ifail) -#endif - ! - end subroutine SV_decomposition - ! - !========================================= - ! LOWER/UPPER FACTORIZATION and INVERISON - !========================================= - ! - subroutine LU_factorization(msize,M,ipvt,ifail) - ! - integer, intent(in) :: msize - integer, intent(out) :: ifail, ipvt(*) - complex(SP), intent(inout):: M(msize,*) - ! -#if defined _DOUBLE - call zgetrf(msize,msize,M,msize,ipvt,ifail) -#else - call cgetrf(msize,msize,M,msize,ipvt,ifail) -#endif - ! - end subroutine LU_factorization - ! - subroutine LU_inversion(msize,M,ipvt,work,lwork,ifail) - ! - integer, intent(in) :: msize, lwork, ipvt(*) - integer, intent(out) :: ifail - complex(SP), intent(inout):: M(msize,*) - complex(SP), intent(out) :: work(*) - ! -#if defined _DOUBLE - call zgetri(msize,M,msize,ipvt,work,lwork,ifail) -#else - call cgetri(msize,M,msize,ipvt,work,lwork,ifail) -#endif - ! - end subroutine LU_inversion - ! end module linear_algebra From 0fa49796cfe65413b47dfcc461a89b52881305a4 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sun, 2 Mar 2025 13:13:52 +0100 Subject: [PATCH 0901/1367] cleanup of interfaces in the case of magma --- .../SERIAL_HERMITIAN_diagonalization.F | 1 - src/linear_algebra/SERIAL_diagonalization.F | 7 +++++- src/modules/mod_linear_algebra.F | 22 +++++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index ba265a4e39..6108a72c96 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -13,7 +13,6 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) & magma_init_done,magma_setup,la_xheev #ifdef _MAGMA use magma, ONLY: magmaf_cheevd_m, magmaf_zheevd_m -! use linear_algebra, ONLY: magmaf_xheevd_m #endif use timing_m, ONLY: timing use com, ONLY: msg diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index 9707fde5c7..f3544d0885 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -19,7 +19,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) use linear_algebra, ONLY: LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS,& & magma_init_done,magma_setup,la_xgeev #ifdef _MAGMA - use linear_algebra, ONLY: magmaf_xgeev_m + use magma, ONLY: magmaf_zgeev_m,magmaf_cgeev_m #endif use timing_m, ONLY: timing use com, ONLY: msg @@ -35,6 +35,11 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) ! integer :: nthreads_save +#if defined _DOUBLE +# define magmaf_xgeev_m magmaf_zgeev_m +#else +# define magmaf_xgeev_m magmaf_cgeev_m +#endif call timing('SERIAL_diagonalization',OPR='start') ! diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index 0e83d5c0fe..b8e9d8dd7f 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -107,17 +107,17 @@ subroutine cheev(jobz,uplo,n,A,lda,w,work,lwork,rwork,info) end subroutine end interface ! -#ifdef _MAGMA - ! - interface magmaf_xgeev_m - procedure :: magmaf_cgeev_m,magmaf_zgeev_m - end interface - ! - interface magmaf_xheevd_m - procedure :: magmaf_cheevd_m,magmaf_zheevd_m - end interface - ! -#endif +!#ifdef _MAGMA +! ! +! interface magmaf_xgeev_m +! procedure :: magmaf_cgeev_m,magmaf_zgeev_m +! end interface +! ! +! interface magmaf_xheevd_m +! procedure :: magmaf_cheevd_m,magmaf_zheevd_m +! end interface +! ! +!#endif ! ! Singular Value Decomposition ! From 7dcff98e372d7f5b7a54a007c4c0de4842dc1722 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sun, 2 Mar 2025 13:14:56 +0100 Subject: [PATCH 0902/1367] more cleanup --- src/modules/mod_linear_algebra.F | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index b8e9d8dd7f..ebebd9ba20 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -193,10 +193,10 @@ subroutine cgetrs(trans,n,nrhs,A,lda,ipiv,B,ldb,info) ! PUBLIC STATEMENTS !==================== ! +!#ifdef _MAGMA +! public :: magmaf_xgeev_m,magmaf_xheevd_m +!#endif public :: la_xgeev, la_xheev -#ifdef _MAGMA - public :: magmaf_xgeev_m,magmaf_xheevd_m -#endif public :: la_xgesvd public :: la_xgetrf, la_xgetri, la_xgetrs ! From 10fe2ec5c66aadc33af536668314926d249875dc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 4 Mar 2025 13:44:05 +0100 Subject: [PATCH 0903/1367] Version 5.3.0, Revision 24478, Hash d299a4df65 MODIFIED * configure include/version/version.m4 hamiltonian/Build_tilde_vbands.F Changes: - some comments changed / improved Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/hamiltonian/Build_tilde_vbands.F | 14 ++++---------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 65e8ea508c..1951d51966 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24477 h.a8946d3536. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24478 h.d299a4df65. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24477 h.a8946d3536' -PACKAGE_STRING='Yambo 5.3.0 r.24477 h.a8946d3536' +PACKAGE_VERSION='5.3.0 r.24478 h.d299a4df65' +PACKAGE_STRING='Yambo 5.3.0 r.24478 h.d299a4df65' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1677,7 +1677,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24477 h.a8946d3536 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24478 h.d299a4df65 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1743,7 +1743,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24477 h.a8946d3536:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24478 h.d299a4df65:";; esac cat <<\_ACEOF @@ -1988,7 +1988,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24477 h.a8946d3536 +Yambo configure 5.3.0 r.24478 h.d299a4df65 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2617,7 +2617,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24477 h.a8946d3536, which was +It was created by Yambo $as_me 5.3.0 r.24478 h.d299a4df65, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3375,8 +3375,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24477" -SHASH="a8946d3536" +SREVISION="24478" +SHASH="d299a4df65" @@ -18026,7 +18026,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24477 h.a8946d3536, which was +This file was extended by Yambo $as_me 5.3.0 r.24478 h.d299a4df65, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18090,7 +18090,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24477 h.a8946d3536 +Yambo config.status 5.3.0 r.24478 h.d299a4df65 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index e921b9a98f..f7eaa30c51 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24477 h.a8946d3536, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24478 h.d299a4df65, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24477" -SHASH="a8946d3536" +SREVISION="24478" +SHASH="d299a4df65" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/hamiltonian/Build_tilde_vbands.F b/src/hamiltonian/Build_tilde_vbands.F index fdb117e0cd..99195d0a17 100644 --- a/src/hamiltonian/Build_tilde_vbands.F +++ b/src/hamiltonian/Build_tilde_vbands.F @@ -64,15 +64,10 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) ! ! i,j indexes on all bands CMR basis ! - ! Vp(m,i) = \sum_{j} S(k,K+delta)_{i,j} V(m,j) + ! Vp(i,m) = \sum_{j} S(k,k+delta)_{i,j} V(j,m) ! - ! Vm(m,i) = \sum_{j} S^H(k-delta,K)_{j,i} V(m,j) + ! Vm(i,m) = \sum_{j} S^H(k-delta,k)_{i,j} V(j,m) ! - ! - ! Build \tilde V(k+delta) - \tilde V(k-delta) - ! =========================================== - ! where \tilde V(k+delta,n,:) = \sum_m \tilde S^-1(k,k+delta)_{m,n} * Vp(m,:) - ! call M_by_M_omp('N','N',H_ref_nbands,en%nbf(i_sp),H_ref_bands(2),cONE, & & DIP_S(H_ref_bands(1):,:,id_red+(istep-1)*3,ikbz,i_sp),H_ref_nbands, & & V_bands(:,:en%nbf(i_sp),ikp_ibz),H_ref_bands(2),cZERO,tmp_Vp(H_ref_bands(1):,:en%nbf(i_sp)),H_ref_nbands) @@ -81,9 +76,8 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) & DIP_S(:,H_ref_bands(1):,id_red+(istep-1)*3,ikm ,i_sp),H_ref_bands(2), & & V_bands(:,:en%nbf(i_sp),ikm_ibz),H_ref_bands(2),cZERO,tmp_Vm(H_ref_bands(1):,:en%nbf(i_sp)),H_ref_nbands) ! - ! Build \tilde V(k+delta) - \tilde V(k-delta) - ! =========================================== - ! where \tilde V(k+delta,n,:) = \sum_m \tilde S^-1(k,k+delta)_{m,n} * Vp(m,:) + ! \tilde V(k+delta)_{n,i} = \sum_m \tilde S^-1(k,k+delta)_{m,n} * Vp(i,m) + ! \tilde V(k-delta)_{n,i} = \sum_m \tilde S^-1(k-delta,k)_{m,n} * Vp(i,m) ! !$omp parallel do default(shared), private(i2,iv1), collapse(2) do i2=H_ref_bands(1),H_ref_bands(2) From b1abce61198cb1b959bd4210c110e9cd4beffa72 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 4 Mar 2025 14:53:23 +0100 Subject: [PATCH 0904/1367] Version 5.3.0, Revision 24487, Hash 400de32ec7 MODIFIED * dipoles/Build_Overlaps_Det_EQ.F dipoles/DIPOLE_overlaps.F hamiltonian/Build_Overlaps_det_NEQ.F hamiltonian/Build_W_operator.F hamiltonian/Build_tilde_vbands.F Changes: - More comments Patch sent by: Davide Sangalli --- src/dipoles/Build_Overlaps_Det_EQ.F | 2 +- src/dipoles/DIPOLE_overlaps.F | 3 +++ src/hamiltonian/Build_Overlaps_det_NEQ.F | 2 ++ src/hamiltonian/Build_W_operator.F | 4 +-- src/hamiltonian/Build_tilde_vbands.F | 32 ++++++++++++++++-------- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/dipoles/Build_Overlaps_Det_EQ.F b/src/dipoles/Build_Overlaps_Det_EQ.F index d3c5694f3a..8ad0f8ecaf 100644 --- a/src/dipoles/Build_Overlaps_Det_EQ.F +++ b/src/dipoles/Build_Overlaps_Det_EQ.F @@ -50,7 +50,7 @@ subroutine Build_Overlaps_Det_EQ(Xen,i_sp_pol,ikbz,Sm1_plus,Sm1_minus,S_det) ! nb=Xen%nbm(i_sp_pol) ! - ! Overlap S(k, k-dk) + ! Overlap S(k, k-dk)=S^\dag(k-dk,k) ! S_val=hermitian(DIP_S(1:nb,1:nb,id+(istep-1)*3,ikm,i_sp_pol)) call SERIAL_inversion(nb,S_val,det,.false.) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 3c94e969ec..1562bc9725 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -174,8 +174,11 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! ! see also comments in src/bz_ops/k_map_nearest_by_dir.F ! + ! WF_shifts==1 --> kpt(id) < 0 if(WF_shifts(ikbzp,id)==1) shift(id)=1 + ! WF_shifts==0 --> 0 < kpt(id) < 1 if(WF_shifts(ikbzp,id)==0) shift(id)=1 + ! WF_shifts==2 --> kpt(id) > 1 if(WF_shifts(ikbzp,id)==2) shift(id)=0 ! endif diff --git a/src/hamiltonian/Build_Overlaps_det_NEQ.F b/src/hamiltonian/Build_Overlaps_det_NEQ.F index 746f19a003..17113e8e35 100644 --- a/src/hamiltonian/Build_Overlaps_det_NEQ.F +++ b/src/hamiltonian/Build_Overlaps_det_NEQ.F @@ -126,6 +126,8 @@ subroutine Build_overlaps_det_NEQ(en,Xk,i_sp,ikbz,V_bands,Sm1_plus,Sm1_minus,S_d ! ! Matrix core ! + ! Sm1(k,k-dk)_{n,m} =sum_{i,j} V^\dag(k)_(n,i) S^\dag(k-dk,k)_{i,j} V(k-dk)_(j,n) + ! !$omp parallel do default(shared), private(i2,vtmp) do i2=H_ref_bands(1),en%nbf(i_sp) call M_by_V('C',H_ref_bands(2),DIP_S(:,:,id+(istep-1)*3,ikm,i_sp),V_bands(:,i2,ikm_ibz),vtmp) diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 89cad1b778..dd62557669 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -63,9 +63,9 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) ! ! Build the W operator as ! - ! W(i,j) = \sum_m V*(m,i) * [\tilde Vp(m,j) - \tilde Vm(m,j) ] + ! W(j,i) = \sum_m V*(i,m) * [\tilde Vp(m,j) - \tilde Vm(m,j) ] ! - ! Eq. C13 in PRB 69, 085106 + ! Eq. (C13) in PRB 69, 085106 [sum_sigma di eq. (61) PRB 69, 085106 (2004)] ! !$omp parallel do default(shared), private(i2,i1), collapse(2) do i2=H_ref_bands(1),H_ref_bands(2) diff --git a/src/hamiltonian/Build_tilde_vbands.F b/src/hamiltonian/Build_tilde_vbands.F index 63fa9d7bf7..6ef9ac6e42 100644 --- a/src/hamiltonian/Build_tilde_vbands.F +++ b/src/hamiltonian/Build_tilde_vbands.F @@ -56,19 +56,19 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) ikm_ibz=Xk%sstar(ikm,1) ikp_ibz=Xk%sstar(ikp,1) ! - ! Construct \tilde V_bands(k,k+delta) and \tilde V_bands(k,k-delta) + ! Construct \tilde V_bands(k,k+dk) and \tilde V_bands(k,k-dk) ! - ! Build Vp and Vm (stored in tmp_Vp and tmp_Vm) + ! Eqs. (C11) and (C13) in PRB 69, 085106 (2004) ! - ! m,n indexes on valence bands + ! Build Vp=V'(k+dk)_{i,m} and Vm=V'(k-dk)_{i,m} (stored in tmp_Vp and tmp_Vm) + ! + ! V'(k+dk)_{i,m} = \sum_{j} S(k,k+dk)_{i,j} V(k+dk)_{j,m} ! - ! i,j indexes on all bands CMR basis + ! V'(k-dk)_{i,m} = \sum_{j} S^H(k-dk,k)_{i,j} V(k-dk)_{j,m} = \sum_{j} S(k,k-dk)_{i,j} V(k-dk)_{j,m} ! - ! Eqs. C11 and C13 in PRB 69, 085106(2004) - ! - ! Vp(i,m) = \sum_{j} S(k,k+delta)_{i,j} V(j,m) + ! m,n indexes on valence bands ! - ! Vm(i,m) = \sum_{j} S^H(k-delta,k)_{i,j} V(j,m) + ! i,j indexes on all bands CMR basis ! call M_by_M_omp('N','N',H_ref_nbands,en%nbf(i_sp),H_ref_bands(2),cONE, & & DIP_S(H_ref_bands(1):,:,id_red+(istep-1)*3,ikbz,i_sp),H_ref_nbands, & @@ -78,8 +78,10 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) & DIP_S(:,H_ref_bands(1):,id_red+(istep-1)*3,ikm ,i_sp),H_ref_bands(2), & & V_bands(:,:en%nbf(i_sp),ikm_ibz),H_ref_bands(2),cZERO,tmp_Vm(H_ref_bands(1):,:en%nbf(i_sp)),H_ref_nbands) ! - ! \tilde V(k+delta)_{n,i} = \sum_m \tilde S^-1(k,k+delta)_{m,n} * Vp(i,m) - ! \tilde V(k-delta)_{n,i} = \sum_m \tilde S^-1(k-delta,k)_{m,n} * Vp(i,m) + ! Eq. (53) in PRB 69, 085106 (2004), derived in appendix (C), see eq. C(11) + ! + ! \tilde V(k+dk)_{n,i} = \sum_m S^-1(k,k+dk)_{m,n} * V'(k+dk)_(i,m) + ! \tilde V(k-dk)_{n,i} = \sum_m S^-1(k,k-dk)_{m,n} * V'(k-dk)_(i,m) ! !$omp parallel do default(shared), private(i2,iv1), collapse(2) do i2=H_ref_bands(1),H_ref_bands(2) @@ -90,4 +92,14 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) enddo !$omp end parallel do ! + ! with (see Build_overlaps_det_NEQ) + ! + ! S^-1(k,k+dk)_{n,m} =sum_{i,j} V^\dag(k)_(n,i) S (k,k+dk)_{i,j} V(k-dk)_(j,n) + ! S^-1(k,k-dk)_{n,m} =sum_{i,j} V^\dag(k)_(n,i) S^\dag(k-dk,k)_{i,j} V(k-dk)_(j,n) + ! + ! This is the NEQ version of (see Build_overlaps_det_NEQ) + ! + ! S^-1(k,k+dk)_{n,m} = S (k,k+dk)_{n,m} + ! S^-1(k,k-dk)_{n,m} = S^\dag(k-dk,k)_{n,m} + ! end subroutine Build_tilde_vbands From 61de44d824520ac09bf565d1abaa0973477d1b2f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 5 Mar 2025 15:09:52 +0100 Subject: [PATCH 0905/1367] Version 5.3.0, Revision 24488, Hash b1abce6119 MODIFIED * configure include/version/version.m4 real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - [yambo_rt] Reverted to original implementation Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- .../RT_gradk_rho_times_E.F | 8 +++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index e6a4d15eed..4b7cc39503 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24479 h.10fe2ec5c6. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24488 h.b1abce6119. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24479 h.10fe2ec5c6' -PACKAGE_STRING='Yambo 5.3.0 r.24479 h.10fe2ec5c6' +PACKAGE_VERSION='5.3.0 r.24488 h.b1abce6119' +PACKAGE_STRING='Yambo 5.3.0 r.24488 h.b1abce6119' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24479 h.10fe2ec5c6 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24488 h.b1abce6119 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24479 h.10fe2ec5c6:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24488 h.b1abce6119:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24479 h.10fe2ec5c6 +Yambo configure 5.3.0 r.24488 h.b1abce6119 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24479 h.10fe2ec5c6, which was +It was created by Yambo $as_me 5.3.0 r.24488 h.b1abce6119, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24479" -SHASH="10fe2ec5c6" +SREVISION="24488" +SHASH="b1abce6119" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24479 h.10fe2ec5c6, which was +This file was extended by Yambo $as_me 5.3.0 r.24488 h.b1abce6119, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24479 h.10fe2ec5c6 +Yambo config.status 5.3.0 r.24488 h.b1abce6119 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0fa0fbb22e..8060b5f15c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24479 h.10fe2ec5c6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24488 h.b1abce6119, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24479" -SHASH="10fe2ec5c6" +SREVISION="24488" +SHASH="b1abce6119" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index 516438cece..395336e2bf 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) +subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! ! This subroutine computes the k-gradient of the density matrix, ! and multiplies it by the electric field. @@ -186,10 +186,10 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) enddo ! ! -end subroutine RT_gradk_rho_times_E +end subroutine RT_gradk_rho_times_E_wrong ! ! -subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) +subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! ! This subroutine computes the k-gradient of the density matrix, ! and multiplies it by the electric field. @@ -454,4 +454,4 @@ subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,idir)*E_field(idir) enddo ! -end subroutine RT_gradk_rho_times_E_wrong +end subroutine RT_gradk_rho_times_E From da5e9f71d7aeef6a0437b499499b95f69dc5cee6 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Thu, 6 Mar 2025 10:40:53 +0100 Subject: [PATCH 0906/1367] cleanup --- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index 7405948b05..f78870ff16 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -79,11 +79,11 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& endif ! - ! Decide which to use among LK or SLK + ! Decide which LA lib to use ! lib_in_use=USE_LK #if defined _SCALAPACK - !lib_in_use=USE_SLK + lib_in_use=USE_SLK #endif if (present(lib_in)) then lib_in_use=lib_in From bbd7fd91adade96302d6cb29bb6d01ea2a80523b Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Fri, 7 Mar 2025 22:19:08 +0100 Subject: [PATCH 0907/1367] magma configuration fixed; compilation of internal fmodules working --- config/m4/gpu.m4 | 2 +- config/m4/magma.m4 | 58 +- configure | 82 +- lib/magma_fmodules/.objects | 4 +- lib/magma_fmodules/magma.F | 373 ++++ lib/magma_fmodules/magma_cfortran.F | 2086 +++++++++++++++++++++++ lib/magma_fmodules/magma_dfortran.F | 1830 ++++++++++++++++++++ lib/magma_fmodules/magma_param.F | 25 + lib/magma_fmodules/magma_sfortran.F | 1830 ++++++++++++++++++++ lib/magma_fmodules/magma_zfortran.F | 2086 +++++++++++++++++++++++ lib/magma_fmodules/mod_magma.F | 279 --- lib/magma_fmodules/mod_magma_cfortran.F | 230 --- lib/magma_fmodules/mod_magma_common.F | 378 ---- lib/magma_fmodules/mod_magma_dfortran.F | 230 --- lib/magma_fmodules/mod_magma_sfortran.F | 230 --- lib/magma_fmodules/mod_magma_zfortran.F | 230 --- 16 files changed, 8325 insertions(+), 1628 deletions(-) create mode 100644 lib/magma_fmodules/magma.F create mode 100644 lib/magma_fmodules/magma_cfortran.F create mode 100644 lib/magma_fmodules/magma_dfortran.F create mode 100644 lib/magma_fmodules/magma_param.F create mode 100644 lib/magma_fmodules/magma_sfortran.F create mode 100644 lib/magma_fmodules/magma_zfortran.F delete mode 100644 lib/magma_fmodules/mod_magma.F delete mode 100644 lib/magma_fmodules/mod_magma_cfortran.F delete mode 100644 lib/magma_fmodules/mod_magma_common.F delete mode 100644 lib/magma_fmodules/mod_magma_dfortran.F delete mode 100644 lib/magma_fmodules/mod_magma_sfortran.F delete mode 100644 lib/magma_fmodules/mod_magma_zfortran.F diff --git a/config/m4/gpu.m4 b/config/m4/gpu.m4 index 2338bc7388..2e8f32d2b8 100644 --- a/config/m4/gpu.m4 +++ b/config/m4/gpu.m4 @@ -127,7 +127,7 @@ AC_ARG_WITH(rocm_path, [AS_HELP_STRING([--with-rocm-path=], [Path to rocm install directory],[32])]) # AC_ARG_WITH(mklgpu_libs, [AS_HELP_STRING([--with-mklgpu-libs=], - [Use librocm library ],[32])]) + [Use the MKLGPU library ],[32])]) use_int_cuda_libs="no" use_gpu_libs="no" diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 index b7b02b413e..bbda28790b 100644 --- a/config/m4/magma.m4 +++ b/config/m4/magma.m4 @@ -23,7 +23,7 @@ # AC_DEFUN([AC_MAGMA_SETUP],[ # -AC_ARG_ENABLE(magma_linalg, AS_HELP_STRING([--enable-magma-linalg],[Enable suport for the diagonalization of BSE using MAGMA. Default is no])) +AC_ARG_ENABLE(magma, AS_HELP_STRING([--enable-magma],[Enable suport for the BSE diagonalization using MAGMA. Default is no])) # AC_ARG_WITH(magma_libs,AS_HELP_STRING([--with-magma-libs=],[Use Magma libraries ],[32])) AC_ARG_WITH(magma_incs,AS_HELP_STRING([--with-magma-incs=],[Use Magma includes ],[32])) @@ -34,14 +34,12 @@ AC_ARG_WITH(magma_includedir,AS_HELP_STRING([--with-magma-includedir=],[Pa # def_magma="" magma="no" -enable_magma="no" internal_magma="no" compile_magma="no" compile_magma_fmodules="no" # -if test x"$enable_magma_linalg" = "xyes"; then - enable_magma="yes"; -fi +if test x"$enable_magma" = "x"; then enable_magma="no" ; fi +#if test x"$enable_magma" = "xyes"; then enable_magma="yes"; fi # # MAGMA global options # @@ -67,7 +65,7 @@ if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_ma # if test x"$with_magma_libs" != "x" ; then AC_MSG_CHECKING([for Magma using $with_magma_libs]) ; elif test -d "$with_magma_libdir" ; then AC_MSG_CHECKING([for Magma in $with_magma_libdir]) ; - elif test -d "$with_magma_path" ; then AC_MSG_CHECKING([for Magma in $with_magma_path]) ; + elif test -d "$with_magma_path" ; then AC_MSG_CHECKING([for Magma in $with_magma_path/lib]) ; fi # if test -d "$with_magma_path" ; then @@ -95,22 +93,42 @@ if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_ma FCFLAGS="$try_MAGMA_INCS $save_fcflags"; LIBS="$try_MAGMA_LIBS $save_libs"; # + # check for magma with fortran-interfaces + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [ + use magma + implicit none + integer :: lda + !magma_devptr_t :: dA]), + [magmaf=yes], [magmaf=no]); + # + # check for c-style magma AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [ -use magma -implicit none -integer :: lda -!magma_devptr_t :: dA]), - [magma=yes], [magma=no]); - # - if test "x$magma" = "xyes"; then - AC_MSG_RESULT([yes]) ; + ierr = magma_init(); ]), + [magmac=yes], [magmac=no]); + # + AC_MSG_RESULT([Library: $magmac; Fortran support: $magmaf]) ; + # + if test "x$magmaf" = "xyes"; then + # MAGMA_INCS="$try_MAGMA_INCS" ; MAGMA_LIBS="$try_MAGMA_LIBS" ; + magma=yes; compile_magma="no"; internal_magma="no"; def_magma="-D_MAGMA" + # + elif test "x$magmac" = "xyes"; then + # + MAGMA_LIBS="$try_MAGMA_LIBS" ; + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + magma=yes; + compile_magma="no"; + compile_magma_fmodules="yes"; + def_magma="-D_MAGMA" + # else - AC_MSG_RESULT([no]) ; + # + magma=no; # fi # @@ -119,7 +137,10 @@ integer :: lda # fi # -# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# TO BE FIXED: needs internal compilation support and paths +# have to be corrected with GPU_SUPPORT folder +# +# Internal compilation # if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then # @@ -154,10 +175,7 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then fi # fi -# -# Check if fortran modules are available -# -if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then compile_magma_fmodules="no" ; fi + # # switch off internal magma compilation # diff --git a/configure b/configure index 61307a32c4..0460f39920 100755 --- a/configure +++ b/configure @@ -1077,7 +1077,7 @@ with_devxlib_path with_devxlib_libdir with_devxlib_includedir with_devxlib_branch -enable_magma_linalg +enable_magma with_magma_libs with_magma_incs with_magma_path @@ -1763,7 +1763,7 @@ Optional Features: The configure script will check CUDA installation and report problems [default=yes] --enable-nvtx= Enable NVTX support [default=no] - --enable-magma-linalg Enable suport for the diagonalization of BSE using + --enable-magma Enable suport for the BSE diagonalization using MAGMA. Default is no Optional Packages: @@ -1856,7 +1856,7 @@ Optional Packages: --with-rocm-libdir= Path to the rocm lib directory --with-rocm-includedir= Path to the rocm include directory --with-rocm-path= Path to rocm install directory - --with-mklgpu-libs= Use librocm library + --with-mklgpu-libs= Use the MKLGPU library --with-devxlib-libs= Use devxlib libraries --with-devxlib-path= Path to devxlib install directory --with-devxlib-libdir= Path to the devxlib lib directory @@ -15741,9 +15741,9 @@ LIBS="$acx_devxlib_save_LIBS" # MAGMA # -# Check whether --enable-magma_linalg was given. -if test "${enable_magma_linalg+set}" = set; then : - enableval=$enable_magma_linalg; +# Check whether --enable-magma was given. +if test "${enable_magma+set}" = set; then : + enableval=$enable_magma; fi # @@ -15781,14 +15781,12 @@ fi # def_magma="" magma="no" -enable_magma="no" internal_magma="no" compile_magma="no" compile_magma_fmodules="no" # -if test x"$enable_magma_linalg" = "xyes"; then - enable_magma="yes"; -fi +if test x"$enable_magma" = "x"; then enable_magma="no" ; fi +#if test x"$enable_magma" = "xyes"; then enable_magma="yes"; fi # # MAGMA global options # @@ -15816,8 +15814,8 @@ if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_ma $as_echo_n "checking for Magma using $with_magma_libs... " >&6; } ; elif test -d "$with_magma_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 $as_echo_n "checking for Magma in $with_magma_libdir... " >&6; } ; - elif test -d "$with_magma_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path" >&5 -$as_echo_n "checking for Magma in $with_magma_path... " >&6; } ; + elif test -d "$with_magma_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path/lib" >&5 +$as_echo_n "checking for Magma in $with_magma_path/lib... " >&6; } ; fi # if test -d "$with_magma_path" ; then @@ -15849,33 +15847,61 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu FCFLAGS="$try_MAGMA_INCS $save_fcflags"; LIBS="$try_MAGMA_LIBS $save_libs"; # + # check for magma with fortran-interfaces cat > conftest.$ac_ext <<_ACEOF program main -use magma -implicit none -integer :: lda -!magma_devptr_t :: dA + use magma + implicit none + integer :: lda + !magma_devptr_t :: dA end _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : - magma=yes + magmaf=yes else - magma=no + magmaf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; # - if test "x$magma" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + # check for c-style magma + cat > conftest.$ac_ext <<_ACEOF + program main + + ierr = magma_init(); + end +_ACEOF +if ac_fn_fc_try_compile "$LINENO"; then : + magmac=yes +else + magmac=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; + # + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Library: $magmac; Fortran support: $magmaf" >&5 +$as_echo "Library: $magmac; Fortran support: $magmaf" >&6; } ; + # + if test "x$magmaf" = "xyes"; then + # MAGMA_INCS="$try_MAGMA_INCS" ; MAGMA_LIBS="$try_MAGMA_LIBS" ; + magma=yes; compile_magma="no"; internal_magma="no"; def_magma="-D_MAGMA" + # + elif test "x$magmac" = "xyes"; then + # + MAGMA_LIBS="$try_MAGMA_LIBS" ; + MAGMA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ; + magma=yes; + compile_magma="no"; + compile_magma_fmodules="yes"; + def_magma="-D_MAGMA" + # else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + # + magma=no; # fi # @@ -15884,7 +15910,10 @@ $as_echo "no" >&6; } ; # fi # -# TO BE FIXED: needs internal compilation support and paths have to be corrected with GPU_SUPPORT folder +# TO BE FIXED: needs internal compilation support and paths +# have to be corrected with GPU_SUPPORT folder +# +# Internal compilation # if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then # @@ -15923,10 +15952,7 @@ $as_echo "Compatible external Magma not found/specified. To be compiled." >&6; } fi # fi -# -# Check if fortran modules are available -# -if test -e "$MAGMA_INCS/mod_magma2_common.F" ; then compile_magma_fmodules="no" ; fi + # # switch off internal magma compilation # diff --git a/lib/magma_fmodules/.objects b/lib/magma_fmodules/.objects index cfae042a34..77f516e43f 100644 --- a/lib/magma_fmodules/.objects +++ b/lib/magma_fmodules/.objects @@ -1,5 +1,5 @@ #if defined _MAGMA -MAGMA_objects = mod_magma2_common.o mod_magma2_sfortran.o mod_magma2_dfortran.o \ - mod_magma2_cfortran.o mod_magma2_zfortran.o mod_magma2.o +MAGMA_objects = magma.o magma_param.o \ + magma_cfortran.o magma_zfortran.o #endif objs = $(MAGMA_objects) diff --git a/lib/magma_fmodules/magma.F b/lib/magma_fmodules/magma.F new file mode 100644 index 0000000000..b86b503f84 --- /dev/null +++ b/lib/magma_fmodules/magma.F @@ -0,0 +1,373 @@ +! +! -- MAGMA (version 2.8.0) -- +! Univ. of Tennessee, Knoxville +! Univ. of California, Berkeley +! Univ. of Colorado, Denver +! @date March 2024 +! + +module magma + + use magma_param + use iso_fortran_env, ONLY: int64 + +#define magma_devptr_t integer(int64) + + use magma_zfortran + use magma_cfortran +! use magma_dfortran +! use magma_sfortran + +! use magmablas_zfortran +! use magmablas_dfortran +! use magmablas_cfortran +! use magmablas_sfortran + + !---- Fortran interfaces to MAGMA subroutines ---- + interface + + !! ------------------------------------------------------------------------- + !! initialize + subroutine magmaf_init( ) + end subroutine + + subroutine magmaf_finalize( ) + end subroutine + + !! ------------------------------------------------------------------------- + !! version + subroutine magmaf_version( major, minor, micro ) + integer :: major, minor, micro + end subroutine + + subroutine magmaf_print_environment() + end subroutine + + !! ------------------------------------------------------------------------- + !! device support + integer function magmaf_num_gpus() + end function + + integer function magmaf_getdevice_arch() + end function + + subroutine magmaf_getdevice( dev ) + integer :: dev + end subroutine + + subroutine magmaf_setdevice( dev ) + integer :: dev + end subroutine + + function magmaf_mem_size( queue ) + import int64 + integer(kind=8) :: magmaf_mem_size + magma_devptr_t :: queue + end function + + !! ------------------------------------------------------------------------- + !! queue support + subroutine magmaf_queue_create( dev, queue ) + import int64 + integer :: dev + magma_devptr_t :: queue + end subroutine + + subroutine magmaf_queue_destroy( queue ) + import int64 + magma_devptr_t :: queue + end subroutine + + subroutine magmaf_queue_sync( queue ) + import int64 + magma_devptr_t :: queue + end subroutine + + integer function magmaf_queue_get_device( queue ) + import int64 + magma_devptr_t :: queue + end function + + !! ------------------------------------------------------------------------- + !! GPU allocation + integer function magmaf_malloc( ptr, bytes ) + import int64 + magma_devptr_t :: ptr + integer :: bytes + end function + + integer function magmaf_smalloc( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_dmalloc( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_cmalloc( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_zmalloc( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_free( ptr ) + import int64 + magma_devptr_t :: ptr + end function + + !! ------------------------------------------------------------------------- + !! CPU regular (non-pinned) allocation + integer function magmaf_malloc_cpu( ptr, bytes ) + import int64 + magma_devptr_t :: ptr + integer :: bytes + end function + + integer function magmaf_smalloc_cpu( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_dmalloc_cpu( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_cmalloc_cpu( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_zmalloc_cpu( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_free_cpu( ptr ) + import int64 + magma_devptr_t :: ptr + end function + + !! ------------------------------------------------------------------------- + !! CPU pinned allocation + integer function magmaf_malloc_pinned( ptr, bytes ) + import int64 + magma_devptr_t :: ptr + integer :: bytes + end function + + integer function magmaf_smalloc_pinned( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_dmalloc_pinned( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_cmalloc_pinned( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_zmalloc_pinned( ptr, n ) + import int64 + magma_devptr_t :: ptr + integer :: n + end function + + integer function magmaf_free_pinned( ptr ) + import int64 + magma_devptr_t :: ptr + end function + + !! ------------------------------------------------------------------------- + !! timing; see magma_timer.cpp + subroutine magmaf_wtime( time ) + double precision :: time + end subroutine + + end interface + + !! ------------------------------------------------------------------------- + ! parameter constants from magma_types.h + ! currently MAGMA's Fortran interface uses characters, not integers + character, parameter :: & + MagmaFalse = 'n', & + MagmaTrue = 'y', & + MagmaRowMajor = 'r', & + MagmaColMajor = 'c', & + MagmaNoTrans = 'n', & + MagmaTrans = 't', & + MagmaConjTrans = 'c', & + MagmaUpper = 'u', & + MagmaLower = 'l', & + MagmaFull = 'f', & + MagmaNonUnit = 'n', & + MagmaUnit = 'u', & + MagmaLeft = 'l', & + MagmaRight = 'r', & + MagmaBothSides = 'b', & + MagmaOneNorm = '1', & + MagmaTwoNorm = '2', & + MagmaFrobeniusNorm = 'f', & + MagmaInfNorm = 'i', & + MagmaMaxNorm = 'm', & + MagmaDistUniform = 'u', & + MagmaDistSymmetric = 's', & + MagmaDistNormal = 'n', & + MagmaHermGeev = 'h', & + MagmaHermPoev = 'p', & + MagmaNonsymPosv = 'n', & + MagmaSymPosv = 's', & + MagmaNoPacking = 'n', & + MagmaPackSubdiag = 'u', & + MagmaPackSupdiag = 'l', & + MagmaPackColumn = 'c', & + MagmaPackRow = 'r', & + MagmaPackLowerBand = 'b', & + MagmaPackUpeprBand = 'q', & + MagmaPackAll = 'z', & + MagmaNoVec = 'n', & + MagmaVec = 'v', & + MagmaIVec = 'i', & + MagmaAllVec = 'a', & + MagmaSomeVec = 's', & + MagmaOverwriteVec = 'o', & + MagmaBacktransVec = 'b', & + MagmaRangeAll = 'a', & + MagmaRangeV = 'v', & + MagmaRangeI = 'i', & + MagmaQ = 'q', & + MagmaP = 'p', & + MagmaForward = 'f', & + MagmaBackward = 'b', & + MagmaColumnwise = 'c', & + MagmaRowwise = 'r' + +contains + +! -------------------- +!> Sets ptrNew = ptrOld( i ), with stride inc. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_soff1d( ptrNew, ptrOld, inc, i ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: inc, i + + ptrNew = ptrOld + (i-1) * inc * sizeof_real +end subroutine magmaf_soff1d + +!> Sets ptrNew = ptrOld( i, j ), with leading dimension lda. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_soff2d( ptrNew, ptrOld, lda, i, j ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: lda, i, j + + ptrNew = ptrOld + ((j-1) * lda + (i-1)) * sizeof_real +end subroutine magmaf_soff2d + +! -------------------- +!> Sets ptrNew = ptrOld( i ), with stride inc. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_doff1d( ptrNew, ptrOld, inc, i ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: inc, i + + ptrNew = ptrOld + (i-1) * inc * sizeof_double +end subroutine magmaf_doff1d + +!> Sets ptrNew = ptrOld( i, j ), with leading dimension lda. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_doff2d( ptrNew, ptrOld, lda, i, j ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: lda, i, j + + ptrNew = ptrOld + ((j-1) * lda + (i-1)) * sizeof_double +end subroutine magmaf_doff2d + +! -------------------- +!> Sets ptrNew = ptrOld( i ), with stride inc. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_coff1d( ptrNew, ptrOld, inc, i ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: inc, i + + ptrNew = ptrOld + (i-1) * inc * sizeof_complex +end subroutine magmaf_coff1d + +!> Sets ptrNew = ptrOld( i, j ), with leading dimension lda. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_coff2d( ptrNew, ptrOld, lda, i, j ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: lda, i, j + + ptrNew = ptrOld + ((j-1) * lda + (i-1)) * sizeof_complex +end subroutine magmaf_coff2d + +! -------------------- +!> Sets ptrNew = ptrOld( i ), with stride inc. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_zoff1d( ptrNew, ptrOld, inc, i ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: inc, i + + ptrNew = ptrOld + (i-1) * inc * sizeof_complex_16 +end subroutine magmaf_zoff1d + +!> Sets ptrNew = ptrOld( i, j ), with leading dimension lda. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_zoff2d( ptrNew, ptrOld, lda, i, j ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: lda, i, j + + ptrNew = ptrOld + ((j-1) * lda + (i-1)) * sizeof_complex_16 +end subroutine magmaf_zoff2d + +! -------------------- +!> Sets ptrNew = ptrOld( i ), with stride inc. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_ioff1d( ptrNew, ptrOld, inc, i ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: inc, i + + ptrNew = ptrOld + (i-1) * inc * sizeof_integer +end subroutine magmaf_ioff1d + +!> Sets ptrNew = ptrOld( i, j ), with leading dimension lda. +!! Useful because CUDA pointers are opaque types in Fortran. +subroutine magmaf_ioff2d( ptrNew, ptrOld, lda, i, j ) + magma_devptr_t :: ptrNew + magma_devptr_t :: ptrOld + integer :: lda, i, j + + ptrNew = ptrOld + ((j-1) * lda + (i-1)) * sizeof_integer +end subroutine magmaf_ioff2d + +end module magma diff --git a/lib/magma_fmodules/magma_cfortran.F b/lib/magma_fmodules/magma_cfortran.F new file mode 100644 index 0000000000..48d48b9c71 --- /dev/null +++ b/lib/magma_fmodules/magma_cfortran.F @@ -0,0 +1,2086 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! This file is AUTOMATICALLY GENERATED by: +!! tools/fortran_wrappers.pl include/magma_c.i +!! Do not edit. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +module magma_cfortran + +use magma_param +use iso_fortran_env, ONLY: int64 + +#define magma_devptr_t integer(int64) + +implicit none + +!---- Fortran interfaces to MAGMA subroutines ---- +interface + +integer function magmaf_get_cpotrf_nb( n ) + integer :: n +end + +integer function magmaf_get_cgetrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cgetri_nb( n ) + integer :: n +end + +integer function magmaf_get_chetrf_nb( n ) + integer :: n +end + +integer function magmaf_get_chetrf_nopiv_nb( n ) + integer :: n +end + +integer function magmaf_get_chetrf_aasen_nb( n ) + integer :: n +end + +integer function magmaf_get_cgeqp3_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cgeqrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cgeqlf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cgelqf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cgehrd_nb( n ) + integer :: n +end + +integer function magmaf_get_chetrd_nb( n ) + integer :: n +end + +integer function magmaf_get_chegst_nb( n ) + integer :: n +end + +integer function magmaf_get_chegst_m_nb( n ) + integer :: n +end + +integer function magmaf_get_cgebrd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cgesvd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_cbulge_nb( n, nbthreads ) + integer :: n + integer :: nbthreads +end + +integer function magmaf_get_cbulge_vblksiz( n, nb, nbthreads ) + integer :: n + integer :: nb + integer :: nbthreads +end + +integer function magmaf_get_cbulge_gcperf( ) +end + +subroutine magmaf_cgebrd( m, n, A, lda, d, e, tauq, taup, work, lwork, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + real :: d(*) + real :: e(*) + complex :: tauq(*) + complex :: taup(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, work, lwork, & + rwork, info ) + character :: jobvl + character :: jobvr + integer :: n + complex :: A(*) + integer :: lda + complex :: w(*) + complex :: VL(*) + integer :: ldvl + complex :: VR(*) + integer :: ldvr + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: info +end + +subroutine magmaf_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, work, lwork, & + rwork, info ) + character :: jobvl + character :: jobvr + integer :: n + complex :: A(*) + integer :: lda + complex :: w(*) + complex :: VL(*) + integer :: ldvl + complex :: VR(*) + integer :: ldvr + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: info +end + +subroutine magmaf_cgegqr_gpu( ikind, m, n, dA, ldda, dwork, work, info ) + import int64 + integer :: ikind + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dwork + complex :: work(*) + integer :: info +end + +subroutine magmaf_cgehrd( n, ilo, ihi, A, lda, tau, work, lwork, dT, info ) + import int64 + integer :: n + integer :: ilo + integer :: ihi + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_cgehrd_m( n, ilo, ihi, A, lda, tau, work, lwork, T, info ) + integer :: n + integer :: ilo + integer :: ihi + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + complex :: T(*) + integer :: info +end + +subroutine magmaf_cgehrd2( n, ilo, ihi, A, lda, tau, work, lwork, info ) + integer :: n + integer :: ilo + integer :: ihi + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgelqf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgelqf_gpu( m, n, dA, ldda, tau, work, lwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgels( trans, m, n, nrhs, A, lda, B, ldb, hwork, lwork, info ) + import int64 + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: A + integer :: lda + magma_devptr_t :: B + integer :: ldb + complex :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cggrqf( m, p, n, A, lda, taua, B, ldb, taub, work, lwork, info ) + integer :: m + integer :: p + integer :: n + complex :: A(*) + integer :: lda + complex :: taua(*) + complex :: B(*) + integer :: ldb + complex :: taub(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgglse( m, n, p, A, lda, B, ldb, c, d, x, work, lwork, info ) + integer :: m + integer :: n + integer :: p + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + complex :: c(*) + complex :: d(*) + complex :: x(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgels_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + import int64 + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + complex :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgels3_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + import int64 + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + complex :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeqlf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeqp3( m, n, A, lda, jpvt, tau, work, lwork, rwork, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + integer :: jpvt(*) + complex :: tau(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: info +end + +subroutine magmaf_cgeqp3_gpu( m, n, dA, ldda, jpvt, tau, dwork, lwork, rwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: jpvt(*) + complex :: tau(*) + magma_devptr_t :: dwork + integer :: lwork + real :: rwork(*) + integer :: info +end + +subroutine magmaf_cgeqr2x_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_cgeqr2x2_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_cgeqr2x3_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_cgeqr2x4_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, queue, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_cgeqrf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeqrf_gpu( m, n, dA, ldda, tau, dT, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_cgeqrf_m( ngpu, m, n, A, lda, tau, work, lwork, info ) + integer :: ngpu + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeqrf_ooc( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeqrf2_gpu( m, n, dA, ldda, tau, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + integer :: info +end + +subroutine magmaf_cgeqrf3_gpu( m, n, dA, ldda, tau, dT, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_cgeqrs_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, info & + ) + import int64 + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + complex :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgeqrs3_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, & + info ) + import int64 + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + complex :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cgerbt_gpu( gen, n, nrhs, dA, ldda, dB, lddb, U, V, info ) + import int64 + character :: gen + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + complex :: U(*) + complex :: V(*) + integer :: info +end + +subroutine magmaf_cgerfs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, dX, lddx, dworkd, & + dAF, iter, info ) + import int64 + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + magma_devptr_t :: dX + integer :: lddx + magma_devptr_t :: dworkd + magma_devptr_t :: dAF + integer :: iter + integer :: info +end + +subroutine magmaf_cgesdd( jobz, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, rwork, & + iwork, info ) + character :: jobz + integer :: m + integer :: n + complex :: A(*) + integer :: lda + real :: s(*) + complex :: U(*) + integer :: ldu + complex :: VT(*) + integer :: ldvt + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: iwork(*) + integer :: info +end + +subroutine magmaf_cgesv( n, nrhs, A, lda, ipiv, B, ldb, info ) + integer :: n + integer :: nrhs + complex :: A(*) + integer :: lda + integer :: ipiv(*) + complex :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_cgesv_gpu( n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + import int64 + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_cgesv_nopiv_gpu( n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_cgesv_rbt( ref, n, nrhs, A, lda, B, ldb, info ) + character :: ref + integer :: n + integer :: nrhs + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_cgesvd( jobu, jobvt, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, & + rwork, info ) + character :: jobu + character :: jobvt + integer :: m + integer :: n + complex :: A(*) + integer :: lda + real :: s(*) + complex :: U(*) + integer :: ldu + complex :: VT(*) + integer :: ldvt + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: info +end + +subroutine magmaf_cgetf2_gpu( m, n, dA, ldda, ipiv, queue, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_cgetf2_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_cgetrf( m, n, A, lda, ipiv, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_cgetrf_gpu( m, n, dA, ldda, ipiv, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_cgetrf_m( ngpu, m, n, A, lda, ipiv, info ) + integer :: ngpu + integer :: m + integer :: n + complex :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_cgetrf_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_cgetrf_nopiv_gpu( m, n, dA, ldda, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_cgetri_gpu( n, dA, ldda, ipiv, dwork, lwork, info ) + import int64 + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dwork + integer :: lwork + integer :: info +end + +subroutine magmaf_cgetrs_gpu( trans, n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + import int64 + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_cgetrs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_cheevd( jobz, uplo, n, A, lda, w, work, lwork, rwork, lrwork, iwork, & + liwork, info ) + character :: jobz + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, rwork, & + lrwork, iwork, liwork, info ) + import int64 + character :: jobz + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: w(*) + complex :: wA(*) + integer :: ldwa + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, rwork, lrwork, & + iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevdx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, work, & + lwork, rwork, lrwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevdx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, mout, w, & + wA, ldwa, work, lwork, rwork, lrwork, iwork, liwork, info ) + import int64 + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: wA(*) + integer :: ldwa + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevdx_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevdx_2stage( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, rwork, lrwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevdx_2stage_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, & + mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevr( jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, mout, w, & + Z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + real :: abstol + integer :: mout(*) + real :: w(*) + complex :: Z(*) + integer :: ldz + integer :: isuppz(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevr_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, abstol, & + mout, w, dZ, lddz, isuppz, wA, ldwa, wZ, ldwz, work, lwork, rwork, lrwork, iwork, & + liwork, info ) + import int64 + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: vl + real :: vu + integer :: il + integer :: iu + real :: abstol + integer :: mout(*) + real :: w(*) + magma_devptr_t :: dZ + integer :: lddz + integer :: isuppz(*) + complex :: wA(*) + integer :: ldwa + complex :: wZ(*) + integer :: ldwz + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_cheevx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, mout, w, & + Z, ldz, work, lwork, rwork, iwork, ifail, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + real :: abstol + integer :: mout(*) + real :: w(*) + complex :: Z(*) + integer :: ldz + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: iwork(*) + integer :: ifail(*) + integer :: info +end + +subroutine magmaf_cheevx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, abstol, & + mout, w, dZ, lddz, wA, ldwa, wZ, ldwz, work, lwork, rwork, iwork, ifail, info ) + import int64 + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: vl + real :: vu + integer :: il + integer :: iu + real :: abstol + integer :: mout(*) + real :: w(*) + magma_devptr_t :: dZ + integer :: lddz + complex :: wA(*) + integer :: ldwa + complex :: wZ(*) + integer :: ldwz + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: iwork(*) + integer :: ifail(*) + integer :: info +end + +subroutine magmaf_chegst( itype, uplo, n, A, lda, B, ldb, info ) + integer :: itype + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_chegst_gpu( itype, uplo, n, dA, ldda, dB, lddb, info ) + import int64 + integer :: itype + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_chegst_m( ngpu, itype, uplo, n, A, lda, B, ldb, info ) + integer :: ngpu + integer :: itype + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_chegvd( itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, rwork, & + lrwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvd_m( ngpu, itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, & + rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvdx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvdx_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvdx_2stage( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvdx_2stage_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, & + vl, vu, il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvr( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + abstol, mout, w, Z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info & + ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + real :: abstol + integer :: mout(*) + real :: w(*) + complex :: Z(*) + integer :: ldz + integer :: isuppz(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_chegvx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + abstol, mout, w, Z, ldz, work, lwork, rwork, iwork, ifail, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + real :: abstol + integer :: mout(*) + real :: w(*) + complex :: Z(*) + integer :: ldz + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: iwork(*) + integer :: ifail(*) + integer :: info +end + +subroutine magmaf_chesv( uplo, n, nrhs, A, lda, ipiv, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + complex :: A(*) + integer :: lda + integer :: ipiv(*) + complex :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_chesv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_chetrd( uplo, n, A, lda, d, e, tau, work, lwork, info ) + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + real :: d(*) + real :: e(*) + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_chetrd_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: d(*) + real :: e(*) + complex :: tau(*) + complex :: wA(*) + integer :: ldwa + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_chetrd2_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, & + dwork, ldwork, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: d(*) + real :: e(*) + complex :: tau(*) + complex :: wA(*) + integer :: ldwa + complex :: work(*) + integer :: lwork + magma_devptr_t :: dwork + integer :: ldwork + integer :: info +end + +integer function magmaf_chetrd_hb2st( uplo, n, nb, Vblksiz, A, lda, d, e, V, ldv, TAU, & + compT, T, ldt ) + character :: uplo + integer :: n + integer :: nb + integer :: Vblksiz + complex :: A(*) + integer :: lda + real :: d(*) + real :: e(*) + complex :: V(*) + integer :: ldv + complex :: TAU(*) + integer :: compT + complex :: T(*) + integer :: ldt +end + +subroutine magmaf_chetrd_he2hb( uplo, n, nb, A, lda, tau, work, lwork, dT, info ) + import int64 + character :: uplo + integer :: n + integer :: nb + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_chetrf( uplo, n, A, lda, ipiv, info ) + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_chetrf_aasen( uplo, cpu_panel, n, A, lda, ipiv, info ) + character :: uplo + integer :: cpu_panel + integer :: n + complex :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_chetrf_nopiv( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_chetrf_nopiv_cpu( uplo, n, ib, A, lda, info ) + character :: uplo + integer :: n + integer :: ib + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_chetrf_nopiv_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_chetrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +integer function magmaf_clarf_gpu( m, n, dv, dtau, dC, lddc, queue ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dv + magma_devptr_t :: dtau + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: queue +end + +integer function magmaf_clarfb2_gpu( m, n, k, dV, lddv, dT, lddt, dC, lddc, dwork, & + ldwork, queue ) + import int64 + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dV + integer :: lddv + magma_devptr_t :: dT + integer :: lddt + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: dwork + integer :: ldwork + magma_devptr_t :: queue +end + +subroutine magmaf_clatrsd( uplo, trans, diag, normin, n, A, lda, lambda, x, scale, cnorm, & + info ) + character :: uplo + character :: trans + character :: diag + character :: normin + integer :: n + complex :: A(*) + integer :: lda + complex :: lambda + complex :: x(*) + real :: scale(*) + real :: cnorm(*) + integer :: info +end + +subroutine magmaf_clauum( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_clauum_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_cposv( uplo, n, nrhs, A, lda, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_cposv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_cpotf2_gpu( uplo, n, dA, ldda, queue, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_cpotrf( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_cpotrf_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_cpotrf_m( ngpu, uplo, n, A, lda, info ) + integer :: ngpu + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_cpotri( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_cpotri_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_cpotrs_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_csysv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_csytrf_nopiv_cpu( uplo, n, ib, A, lda, info ) + character :: uplo + integer :: n + integer :: ib + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_csytrf_nopiv_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_csytrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_cstedx( range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, iwork, & + liwork, dwork, info ) + import int64 + character :: range + integer :: n + real :: vl + real :: vu + integer :: il + integer :: iu + real :: d(*) + real :: e(*) + complex :: Z(*) + integer :: ldz + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_cstedx_m( ngpu, range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, & + iwork, liwork, info ) + integer :: ngpu + character :: range + integer :: n + real :: vl + real :: vu + integer :: il + integer :: iu + real :: d(*) + real :: e(*) + complex :: Z(*) + integer :: ldz + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ctrevc3( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, rwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + complex :: T(*) + integer :: ldt + complex :: VL(*) + integer :: ldvl + complex :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: info +end + +subroutine magmaf_ctrevc3_mt( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, rwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + complex :: T(*) + integer :: ldt + complex :: VL(*) + integer :: ldvl + complex :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + complex :: work(*) + integer :: lwork + real :: rwork(*) + integer :: info +end + +integer function magmaf_ctrsm_m( ngpu, side, uplo, transa, diag, m, n, alpha, A, lda, B, & + ldb ) + integer :: ngpu + character :: side + character :: uplo + character :: transa + character :: diag + integer :: m + integer :: n + complex :: alpha + complex :: A(*) + integer :: lda + complex :: B(*) + integer :: ldb +end + +subroutine magmaf_ctrtri( uplo, diag, n, A, lda, info ) + character :: uplo + character :: diag + integer :: n + complex :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_ctrtri_gpu( uplo, diag, n, dA, ldda, info ) + import int64 + character :: uplo + character :: diag + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_cungbr( vect, m, n, k, A, lda, tau, work, lwork, info ) + character :: vect + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunghr( n, ilo, ihi, A, lda, tau, dT, nb, info ) + import int64 + integer :: n + integer :: ilo + integer :: ihi + complex :: A(*) + integer :: lda + complex :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_cunghr_m( n, ilo, ihi, A, lda, tau, T, nb, info ) + integer :: n + integer :: ilo + integer :: ihi + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_cunglq( m, n, k, A, lda, tau, dT, nb, info ) + import int64 + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_cungqr( m, n, k, A, lda, tau, dT, nb, info ) + import int64 + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_cungqr_gpu( m, n, k, dA, ldda, tau, dT, nb, info ) + import int64 + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_cungqr_m( m, n, k, A, lda, tau, T, nb, info ) + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_cungqr2( m, n, k, A, lda, tau, info ) + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + integer :: info +end + +subroutine magmaf_cunmbr( vect, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + character :: vect + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmlq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmrq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmql( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmql2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + import int64 + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_cunmqr( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmqr_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, hwork, & + lwork, dT, nb, info ) + import int64 + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex :: hwork(*) + integer :: lwork + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_cunmqr2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + import int64 + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_cunmqr_m( ngpu, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + integer :: ngpu + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmtr( side, uplo, trans, m, n, A, lda, tau, C, ldc, work, lwork, info & + ) + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_cunmtr_gpu( side, uplo, trans, m, n, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + import int64 + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_cunmtr_m( ngpu, side, uplo, trans, m, n, A, lda, tau, C, ldc, work, & + lwork, info ) + integer :: ngpu + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + complex :: A(*) + integer :: lda + complex :: tau(*) + complex :: C(*) + integer :: ldc + complex :: work(*) + integer :: lwork + integer :: info +end + +integer function magmaf_c_isnan( x ) + complex :: x +end + +integer function magmaf_c_isinf( x ) + complex :: x +end + +integer function magmaf_c_isnan_inf( x ) + complex :: x +end + +integer function magmaf_cnan_inf( uplo, m, n, A, lda, cnt_nan, cnt_inf ) + character :: uplo + integer :: m + integer :: n + complex :: A(*) + integer :: lda + integer :: cnt_nan(*) + integer :: cnt_inf(*) +end + +integer function magmaf_cnan_inf_gpu( uplo, m, n, dA, ldda, cnt_nan, cnt_inf, queue ) + import int64 + character :: uplo + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: cnt_nan(*) + integer :: cnt_inf(*) + magma_devptr_t :: queue +end + +subroutine magmaf_cprint( m, n, A, lda ) + integer :: m + integer :: n + complex :: A(*) + integer :: lda +end + +subroutine magmaf_cprint_gpu( m, n, dA, ldda, queue ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue +end + +subroutine magmaf_cpanel_to_q( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + complex :: A(*) + integer :: lda + complex :: work(*) +end + +subroutine magmaf_cq_to_panel( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + complex :: A(*) + integer :: lda + complex :: work(*) +end + +end interface + +end module magma_cfortran diff --git a/lib/magma_fmodules/magma_dfortran.F b/lib/magma_fmodules/magma_dfortran.F new file mode 100644 index 0000000000..22b3dcc2cc --- /dev/null +++ b/lib/magma_fmodules/magma_dfortran.F @@ -0,0 +1,1830 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! This file is AUTOMATICALLY GENERATED by: +!! tools/fortran_wrappers.pl include/magma_d.i +!! Do not edit. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +module magma_dfortran + +use magma_param + +implicit none + +!---- Fortran interfaces to MAGMA subroutines ---- +interface + +integer function magmaf_get_dlaex3_m_nb( ) +end + +integer function magmaf_get_dpotrf_nb( n ) + integer :: n +end + +integer function magmaf_get_dgetrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dgetri_nb( n ) + integer :: n +end + +integer function magmaf_get_dsytrf_nb( n ) + integer :: n +end + +integer function magmaf_get_dsytrf_nopiv_nb( n ) + integer :: n +end + +integer function magmaf_get_dsytrf_aasen_nb( n ) + integer :: n +end + +integer function magmaf_get_dgeqp3_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dgeqrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dgeqlf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dgelqf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dgehrd_nb( n ) + integer :: n +end + +integer function magmaf_get_dsytrd_nb( n ) + integer :: n +end + +integer function magmaf_get_dsygst_nb( n ) + integer :: n +end + +integer function magmaf_get_dsygst_m_nb( n ) + integer :: n +end + +integer function magmaf_get_dgebrd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dgesvd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_dbulge_nb( n, nbthreads ) + integer :: n + integer :: nbthreads +end + +integer function magmaf_get_dbulge_vblksiz( n, nb, nbthreads ) + integer :: n + integer :: nb + integer :: nbthreads +end + +integer function magmaf_get_dbulge_gcperf( ) +end + +subroutine magmaf_dmove_eig( range, n, w, il, iu, vl, vu, mout ) + character :: range + integer :: n + double precision :: w(*) + integer :: il(*) + integer :: iu(*) + double precision :: vl + double precision :: vu + integer :: mout(*) +end + +subroutine magmaf_dvrange( k, d, il, iu, vl, vu ) + integer :: k + double precision :: d(*) + integer :: il(*) + integer :: iu(*) + double precision :: vl + double precision :: vu +end + +subroutine magmaf_dirange( k, indxq, iil, iiu, il, iu ) + integer :: k + integer :: indxq(*) + integer :: iil(*) + integer :: iiu(*) + integer :: il + integer :: iu +end + +subroutine magmaf_dgebrd( m, n, A, lda, d, e, tauq, taup, work, lwork, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: d(*) + double precision :: e(*) + double precision :: tauq(*) + double precision :: taup(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeev( jobvl, jobvr, n, A, lda, wr, wi, VL, ldvl, VR, ldvr, work, & + lwork, info ) + character :: jobvl + character :: jobvr + integer :: n + double precision :: A(*) + integer :: lda + double precision :: wr(*) + double precision :: wi(*) + double precision :: VL(*) + integer :: ldvl + double precision :: VR(*) + integer :: ldvr + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeev_m( jobvl, jobvr, n, A, lda, wr, wi, VL, ldvl, VR, ldvr, work, & + lwork, info ) + character :: jobvl + character :: jobvr + integer :: n + double precision :: A(*) + integer :: lda + double precision :: wr(*) + double precision :: wi(*) + double precision :: VL(*) + integer :: ldvl + double precision :: VR(*) + integer :: ldvr + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgegqr_gpu( ikind, m, n, dA, ldda, dwork, work, info ) + integer :: ikind + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dwork + double precision :: work(*) + integer :: info +end + +subroutine magmaf_dgehrd( n, ilo, ihi, A, lda, tau, work, lwork, dT, info ) + integer :: n + integer :: ilo + integer :: ihi + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_dgehrd_m( n, ilo, ihi, A, lda, tau, work, lwork, T, info ) + integer :: n + integer :: ilo + integer :: ihi + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + double precision :: T(*) + integer :: info +end + +subroutine magmaf_dgehrd2( n, ilo, ihi, A, lda, tau, work, lwork, info ) + integer :: n + integer :: ilo + integer :: ihi + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgelqf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgelqf_gpu( m, n, dA, ldda, tau, work, lwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgels( trans, m, n, nrhs, A, lda, B, ldb, hwork, lwork, info ) + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: A + integer :: lda + magma_devptr_t :: B + integer :: ldb + double precision :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dggrqf( m, p, n, A, lda, taua, B, ldb, taub, work, lwork, info ) + integer :: m + integer :: p + integer :: n + double precision :: A(*) + integer :: lda + double precision :: taua(*) + double precision :: B(*) + integer :: ldb + double precision :: taub(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgglse( m, n, p, A, lda, B, ldb, c, d, x, work, lwork, info ) + integer :: m + integer :: n + integer :: p + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: c(*) + double precision :: d(*) + double precision :: x(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgels_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + double precision :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgels3_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + double precision :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqlf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqp3( m, n, A, lda, jpvt, tau, work, lwork, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + integer :: jpvt(*) + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqp3_gpu( m, n, dA, ldda, jpvt, tau, dwork, lwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: jpvt(*) + double precision :: tau(*) + magma_devptr_t :: dwork + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqr2x_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_dgeqr2x2_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_dgeqr2x3_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_dgeqr2x4_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, queue, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_dgeqrf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqrf_gpu( m, n, dA, ldda, tau, dT, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_dgeqrf_m( ngpu, m, n, A, lda, tau, work, lwork, info ) + integer :: ngpu + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqrf_ooc( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqrf2_gpu( m, n, dA, ldda, tau, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + integer :: info +end + +subroutine magmaf_dgeqrf3_gpu( m, n, dA, ldda, tau, dT, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_dgeqrs_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, info & + ) + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + double precision :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgeqrs3_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, & + info ) + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + double precision :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgerbt_gpu( gen, n, nrhs, dA, ldda, dB, lddb, U, V, info ) + character :: gen + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + double precision :: U(*) + double precision :: V(*) + integer :: info +end + +subroutine magmaf_dgerfs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, dX, lddx, dworkd, & + dAF, iter, info ) + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + magma_devptr_t :: dX + integer :: lddx + magma_devptr_t :: dworkd + magma_devptr_t :: dAF + integer :: iter + integer :: info +end + +subroutine magmaf_dgesdd( jobz, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, iwork, & + info ) + character :: jobz + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: s(*) + double precision :: U(*) + integer :: ldu + double precision :: VT(*) + integer :: ldvt + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: info +end + +subroutine magmaf_dgesv( n, nrhs, A, lda, ipiv, B, ldb, info ) + integer :: n + integer :: nrhs + double precision :: A(*) + integer :: lda + integer :: ipiv(*) + double precision :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_dgesv_gpu( n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dgesv_nopiv_gpu( n, nrhs, dA, ldda, dB, lddb, info ) + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dgesv_rbt( ref, n, nrhs, A, lda, B, ldb, info ) + character :: ref + integer :: n + integer :: nrhs + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_dgesvd( jobu, jobvt, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, & + info ) + character :: jobu + character :: jobvt + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: s(*) + double precision :: U(*) + integer :: ldu + double precision :: VT(*) + integer :: ldvt + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dgetf2_gpu( m, n, dA, ldda, ipiv, queue, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_dgetf2_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dgetrf( m, n, A, lda, ipiv, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_dgetrf_gpu( m, n, dA, ldda, ipiv, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_dgetrf_m( ngpu, m, n, A, lda, ipiv, info ) + integer :: ngpu + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_dgetrf_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dgetrf_nopiv_gpu( m, n, dA, ldda, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_dgetri_gpu( n, dA, ldda, ipiv, dwork, lwork, info ) + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dwork + integer :: lwork + integer :: info +end + +subroutine magmaf_dgetrs_gpu( trans, n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dgetrs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, info ) + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dsyevd( jobz, uplo, n, A, lda, w, work, lwork, iwork, liwork, info ) + character :: jobz + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, iwork, & + liwork, info ) + character :: jobz + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: w(*) + double precision :: wA(*) + integer :: ldwa + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, iwork, liwork, & + info ) + integer :: ngpu + character :: jobz + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevdx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, work, & + lwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevdx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, mout, w, & + wA, ldwa, work, lwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: wA(*) + integer :: ldwa + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevdx_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevdx_2stage( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsyevdx_2stage_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, & + mout, w, work, lwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsygst( itype, uplo, n, A, lda, B, ldb, info ) + integer :: itype + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_dsygst_gpu( itype, uplo, n, dA, ldda, dB, lddb, info ) + integer :: itype + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dsygst_m( ngpu, itype, uplo, n, A, lda, B, ldb, info ) + integer :: ngpu + integer :: itype + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_dsygvd( itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, iwork, & + liwork, info ) + integer :: itype + character :: jobz + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsygvd_m( ngpu, itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, & + iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsygvdx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + mout, w, work, lwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsygvdx_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsygvdx_2stage( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsygvdx_2stage_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, & + vl, vu, il, iu, mout, w, work, lwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + double precision :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dsysv( uplo, n, nrhs, A, lda, ipiv, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + double precision :: A(*) + integer :: lda + integer :: ipiv(*) + double precision :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_dsysv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dsytrd( uplo, n, A, lda, d, e, tau, work, lwork, info ) + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + double precision :: d(*) + double precision :: e(*) + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dsytrd_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: d(*) + double precision :: e(*) + double precision :: tau(*) + double precision :: wA(*) + integer :: ldwa + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dsytrd2_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, & + dwork, ldwork, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: d(*) + double precision :: e(*) + double precision :: tau(*) + double precision :: wA(*) + integer :: ldwa + double precision :: work(*) + integer :: lwork + magma_devptr_t :: dwork + integer :: ldwork + integer :: info +end + +integer function magmaf_dsytrd_sb2st( uplo, n, nb, Vblksiz, A, lda, d, e, V, ldv, TAU, & + compT, T, ldt ) + character :: uplo + integer :: n + integer :: nb + integer :: Vblksiz + double precision :: A(*) + integer :: lda + double precision :: d(*) + double precision :: e(*) + double precision :: V(*) + integer :: ldv + double precision :: TAU(*) + integer :: compT + double precision :: T(*) + integer :: ldt +end + +subroutine magmaf_dsytrd_sy2sb( uplo, n, nb, A, lda, tau, work, lwork, dT, info ) + character :: uplo + integer :: n + integer :: nb + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_dsytrf( uplo, n, A, lda, ipiv, info ) + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_dsytrf_aasen( uplo, cpu_panel, n, A, lda, ipiv, info ) + character :: uplo + integer :: cpu_panel + integer :: n + double precision :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_dsytrf_nopiv( uplo, n, A, lda, info ) + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dsytrf_nopiv_cpu( uplo, n, ib, A, lda, info ) + character :: uplo + integer :: n + integer :: ib + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dsytrf_nopiv_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_dsytrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dlaln2( trans, na, nw, smin, ca, A, lda, d1, d2, B, ldb, wr, wi, X, & + ldx, scale, xnorm, info ) + integer :: trans + integer :: na + integer :: nw + double precision :: smin + double precision :: ca + double precision :: A(*) + integer :: lda + double precision :: d1 + double precision :: d2 + double precision :: B(*) + integer :: ldb + double precision :: wr + double precision :: wi + double precision :: X(*) + integer :: ldx + double precision :: scale(*) + double precision :: xnorm(*) + integer :: info +end + +subroutine magmaf_dlaqtrsd( trans, n, T, ldt, x, ldx, cnorm, info ) + character :: trans + integer :: n + double precision :: T(*) + integer :: ldt + double precision :: x(*) + integer :: ldx + double precision :: cnorm(*) + integer :: info +end + +integer function magmaf_dlarf_gpu( m, n, dv, dtau, dC, lddc, queue ) + integer :: m + integer :: n + magma_devptr_t :: dv + magma_devptr_t :: dtau + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: queue +end + +integer function magmaf_dlarfb2_gpu( m, n, k, dV, lddv, dT, lddt, dC, lddc, dwork, & + ldwork, queue ) + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dV + integer :: lddv + magma_devptr_t :: dT + integer :: lddt + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: dwork + integer :: ldwork + magma_devptr_t :: queue +end + +subroutine magmaf_dlauum( uplo, n, A, lda, info ) + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dlauum_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_dposv( uplo, n, nrhs, A, lda, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_dposv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dpotf2_gpu( uplo, n, dA, ldda, queue, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_dpotrf( uplo, n, A, lda, info ) + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dpotrf_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_dpotrf_m( ngpu, uplo, n, A, lda, info ) + integer :: ngpu + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dpotri( uplo, n, A, lda, info ) + character :: uplo + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dpotri_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_dpotrs_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_dstedx( range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, iwork, & + liwork, dwork, info ) + character :: range + integer :: n + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: d(*) + double precision :: e(*) + double precision :: Z(*) + integer :: ldz + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_dstedx_m( ngpu, range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, & + iwork, liwork, info ) + integer :: ngpu + character :: range + integer :: n + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: d(*) + double precision :: e(*) + double precision :: Z(*) + integer :: ldz + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_dtrevc3( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + double precision :: T(*) + integer :: ldt + double precision :: VL(*) + integer :: ldvl + double precision :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dtrevc3_mt( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + double precision :: T(*) + integer :: ldt + double precision :: VL(*) + integer :: ldvl + double precision :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +integer function magmaf_dtrsm_m( ngpu, side, uplo, transa, diag, m, n, alpha, A, lda, B, & + ldb ) + integer :: ngpu + character :: side + character :: uplo + character :: transa + character :: diag + integer :: m + integer :: n + double precision :: alpha + double precision :: A(*) + integer :: lda + double precision :: B(*) + integer :: ldb +end + +subroutine magmaf_dtrtri( uplo, diag, n, A, lda, info ) + character :: uplo + character :: diag + integer :: n + double precision :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_dtrtri_gpu( uplo, diag, n, dA, ldda, info ) + character :: uplo + character :: diag + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_dorgbr( vect, m, n, k, A, lda, tau, work, lwork, info ) + character :: vect + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dorghr( n, ilo, ihi, A, lda, tau, dT, nb, info ) + integer :: n + integer :: ilo + integer :: ihi + double precision :: A(*) + integer :: lda + double precision :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_dorghr_m( n, ilo, ihi, A, lda, tau, T, nb, info ) + integer :: n + integer :: ilo + integer :: ihi + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_dorglq( m, n, k, A, lda, tau, dT, nb, info ) + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_dorgqr( m, n, k, A, lda, tau, dT, nb, info ) + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_dorgqr_gpu( m, n, k, dA, ldda, tau, dT, nb, info ) + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_dorgqr_m( m, n, k, A, lda, tau, T, nb, info ) + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_dorgqr2( m, n, k, A, lda, tau, info ) + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + integer :: info +end + +subroutine magmaf_dormbr( vect, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + character :: vect + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormlq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormrq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormql( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormql2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dC + integer :: lddc + double precision :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_dormqr( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormqr_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, hwork, & + lwork, dT, nb, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dC + integer :: lddc + double precision :: hwork(*) + integer :: lwork + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_dormqr2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dC + integer :: lddc + double precision :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_dormqr_m( ngpu, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + integer :: ngpu + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormtr( side, uplo, trans, m, n, A, lda, tau, C, ldc, work, lwork, info & + ) + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_dormtr_gpu( side, uplo, trans, m, n, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: tau(*) + magma_devptr_t :: dC + integer :: lddc + double precision :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_dormtr_m( ngpu, side, uplo, trans, m, n, A, lda, tau, C, ldc, work, & + lwork, info ) + integer :: ngpu + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + double precision :: tau(*) + double precision :: C(*) + integer :: ldc + double precision :: work(*) + integer :: lwork + integer :: info +end + +integer function magmaf_d_isnan( x ) + double precision :: x +end + +integer function magmaf_d_isinf( x ) + double precision :: x +end + +integer function magmaf_d_isnan_inf( x ) + double precision :: x +end + +double precision function magmaf_dmake_lwork( lwork ) + integer :: lwork +end + +integer function magmaf_dnan_inf( uplo, m, n, A, lda, cnt_nan, cnt_inf ) + character :: uplo + integer :: m + integer :: n + double precision :: A(*) + integer :: lda + integer :: cnt_nan(*) + integer :: cnt_inf(*) +end + +integer function magmaf_dnan_inf_gpu( uplo, m, n, dA, ldda, cnt_nan, cnt_inf, queue ) + character :: uplo + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: cnt_nan(*) + integer :: cnt_inf(*) + magma_devptr_t :: queue +end + +subroutine magmaf_dprint( m, n, A, lda ) + integer :: m + integer :: n + double precision :: A(*) + integer :: lda +end + +subroutine magmaf_dprint_gpu( m, n, dA, ldda, queue ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue +end + +subroutine magmaf_dpanel_to_q( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + double precision :: A(*) + integer :: lda + double precision :: work(*) +end + +subroutine magmaf_dq_to_panel( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + double precision :: A(*) + integer :: lda + double precision :: work(*) +end + +end interface + +end module magma_dfortran diff --git a/lib/magma_fmodules/magma_param.F b/lib/magma_fmodules/magma_param.F new file mode 100644 index 0000000000..8fd7c5f978 --- /dev/null +++ b/lib/magma_fmodules/magma_param.F @@ -0,0 +1,25 @@ +! +! -- MAGMA (version 2.8.0) -- +! Univ. of Tennessee, Knoxville +! Univ. of California, Berkeley +! Univ. of Colorado, Denver +! @date March 2024 +! + +module magma_param + + implicit none + + ! could use STORAGE_SIZE in Fortran 2008 + integer, parameter :: sizeof_complex_16 = 16 + integer, parameter :: sizeof_complex = 8 + integer, parameter :: sizeof_double = 8 + integer, parameter :: sizeof_real = 4 + +#if defined(MAGMA_ILP64) || defined(MKL_ILP64) + integer, parameter :: sizeof_integer = 8 +#else + integer, parameter :: sizeof_integer = 4 +#endif + +end module magma_param diff --git a/lib/magma_fmodules/magma_sfortran.F b/lib/magma_fmodules/magma_sfortran.F new file mode 100644 index 0000000000..6a50cb38ce --- /dev/null +++ b/lib/magma_fmodules/magma_sfortran.F @@ -0,0 +1,1830 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! This file is AUTOMATICALLY GENERATED by: +!! tools/fortran_wrappers.pl include/magma_s.i +!! Do not edit. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +module magma_sfortran + +use magma_param + +implicit none + +!---- Fortran interfaces to MAGMA subroutines ---- +interface + +integer function magmaf_get_slaex3_m_nb( ) +end + +integer function magmaf_get_spotrf_nb( n ) + integer :: n +end + +integer function magmaf_get_sgetrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sgetri_nb( n ) + integer :: n +end + +integer function magmaf_get_ssytrf_nb( n ) + integer :: n +end + +integer function magmaf_get_ssytrf_nopiv_nb( n ) + integer :: n +end + +integer function magmaf_get_ssytrf_aasen_nb( n ) + integer :: n +end + +integer function magmaf_get_sgeqp3_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sgeqrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sgeqlf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sgelqf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sgehrd_nb( n ) + integer :: n +end + +integer function magmaf_get_ssytrd_nb( n ) + integer :: n +end + +integer function magmaf_get_ssygst_nb( n ) + integer :: n +end + +integer function magmaf_get_ssygst_m_nb( n ) + integer :: n +end + +integer function magmaf_get_sgebrd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sgesvd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_sbulge_nb( n, nbthreads ) + integer :: n + integer :: nbthreads +end + +integer function magmaf_get_sbulge_vblksiz( n, nb, nbthreads ) + integer :: n + integer :: nb + integer :: nbthreads +end + +integer function magmaf_get_sbulge_gcperf( ) +end + +subroutine magmaf_smove_eig( range, n, w, il, iu, vl, vu, mout ) + character :: range + integer :: n + real :: w(*) + integer :: il(*) + integer :: iu(*) + real :: vl + real :: vu + integer :: mout(*) +end + +subroutine magmaf_svrange( k, d, il, iu, vl, vu ) + integer :: k + real :: d(*) + integer :: il(*) + integer :: iu(*) + real :: vl + real :: vu +end + +subroutine magmaf_sirange( k, indxq, iil, iiu, il, iu ) + integer :: k + integer :: indxq(*) + integer :: iil(*) + integer :: iiu(*) + integer :: il + integer :: iu +end + +subroutine magmaf_sgebrd( m, n, A, lda, d, e, tauq, taup, work, lwork, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: d(*) + real :: e(*) + real :: tauq(*) + real :: taup(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeev( jobvl, jobvr, n, A, lda, wr, wi, VL, ldvl, VR, ldvr, work, & + lwork, info ) + character :: jobvl + character :: jobvr + integer :: n + real :: A(*) + integer :: lda + real :: wr(*) + real :: wi(*) + real :: VL(*) + integer :: ldvl + real :: VR(*) + integer :: ldvr + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeev_m( jobvl, jobvr, n, A, lda, wr, wi, VL, ldvl, VR, ldvr, work, & + lwork, info ) + character :: jobvl + character :: jobvr + integer :: n + real :: A(*) + integer :: lda + real :: wr(*) + real :: wi(*) + real :: VL(*) + integer :: ldvl + real :: VR(*) + integer :: ldvr + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgegqr_gpu( ikind, m, n, dA, ldda, dwork, work, info ) + integer :: ikind + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dwork + real :: work(*) + integer :: info +end + +subroutine magmaf_sgehrd( n, ilo, ihi, A, lda, tau, work, lwork, dT, info ) + integer :: n + integer :: ilo + integer :: ihi + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_sgehrd_m( n, ilo, ihi, A, lda, tau, work, lwork, T, info ) + integer :: n + integer :: ilo + integer :: ihi + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + real :: T(*) + integer :: info +end + +subroutine magmaf_sgehrd2( n, ilo, ihi, A, lda, tau, work, lwork, info ) + integer :: n + integer :: ilo + integer :: ihi + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgelqf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgelqf_gpu( m, n, dA, ldda, tau, work, lwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgels( trans, m, n, nrhs, A, lda, B, ldb, hwork, lwork, info ) + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: A + integer :: lda + magma_devptr_t :: B + integer :: ldb + real :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sggrqf( m, p, n, A, lda, taua, B, ldb, taub, work, lwork, info ) + integer :: m + integer :: p + integer :: n + real :: A(*) + integer :: lda + real :: taua(*) + real :: B(*) + integer :: ldb + real :: taub(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgglse( m, n, p, A, lda, B, ldb, c, d, x, work, lwork, info ) + integer :: m + integer :: n + integer :: p + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: c(*) + real :: d(*) + real :: x(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgels_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + real :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgels3_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + real :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqlf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqp3( m, n, A, lda, jpvt, tau, work, lwork, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + integer :: jpvt(*) + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqp3_gpu( m, n, dA, ldda, jpvt, tau, dwork, lwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: jpvt(*) + real :: tau(*) + magma_devptr_t :: dwork + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqr2x_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_sgeqr2x2_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_sgeqr2x3_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_sgeqr2x4_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, queue, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_sgeqrf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqrf_gpu( m, n, dA, ldda, tau, dT, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_sgeqrf_m( ngpu, m, n, A, lda, tau, work, lwork, info ) + integer :: ngpu + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqrf_ooc( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqrf2_gpu( m, n, dA, ldda, tau, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + integer :: info +end + +subroutine magmaf_sgeqrf3_gpu( m, n, dA, ldda, tau, dT, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_sgeqrs_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, info & + ) + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + real :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgeqrs3_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, & + info ) + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + real :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgerbt_gpu( gen, n, nrhs, dA, ldda, dB, lddb, U, V, info ) + character :: gen + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + real :: U(*) + real :: V(*) + integer :: info +end + +subroutine magmaf_sgerfs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, dX, lddx, dworkd, & + dAF, iter, info ) + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + magma_devptr_t :: dX + integer :: lddx + magma_devptr_t :: dworkd + magma_devptr_t :: dAF + integer :: iter + integer :: info +end + +subroutine magmaf_sgesdd( jobz, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, iwork, & + info ) + character :: jobz + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: s(*) + real :: U(*) + integer :: ldu + real :: VT(*) + integer :: ldvt + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: info +end + +subroutine magmaf_sgesv( n, nrhs, A, lda, ipiv, B, ldb, info ) + integer :: n + integer :: nrhs + real :: A(*) + integer :: lda + integer :: ipiv(*) + real :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_sgesv_gpu( n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_sgesv_nopiv_gpu( n, nrhs, dA, ldda, dB, lddb, info ) + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_sgesv_rbt( ref, n, nrhs, A, lda, B, ldb, info ) + character :: ref + integer :: n + integer :: nrhs + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_sgesvd( jobu, jobvt, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, & + info ) + character :: jobu + character :: jobvt + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: s(*) + real :: U(*) + integer :: ldu + real :: VT(*) + integer :: ldvt + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sgetf2_gpu( m, n, dA, ldda, ipiv, queue, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_sgetf2_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_sgetrf( m, n, A, lda, ipiv, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_sgetrf_gpu( m, n, dA, ldda, ipiv, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_sgetrf_m( ngpu, m, n, A, lda, ipiv, info ) + integer :: ngpu + integer :: m + integer :: n + real :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_sgetrf_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_sgetrf_nopiv_gpu( m, n, dA, ldda, info ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_sgetri_gpu( n, dA, ldda, ipiv, dwork, lwork, info ) + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dwork + integer :: lwork + integer :: info +end + +subroutine magmaf_sgetrs_gpu( trans, n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_sgetrs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, info ) + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_ssyevd( jobz, uplo, n, A, lda, w, work, lwork, iwork, liwork, info ) + character :: jobz + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, iwork, & + liwork, info ) + character :: jobz + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: w(*) + real :: wA(*) + integer :: ldwa + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, iwork, liwork, & + info ) + integer :: ngpu + character :: jobz + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevdx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, work, & + lwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevdx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, mout, w, & + wA, ldwa, work, lwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: wA(*) + integer :: ldwa + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevdx_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevdx_2stage( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssyevdx_2stage_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, & + mout, w, work, lwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssygst( itype, uplo, n, A, lda, B, ldb, info ) + integer :: itype + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_ssygst_gpu( itype, uplo, n, dA, ldda, dB, lddb, info ) + integer :: itype + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_ssygst_m( ngpu, itype, uplo, n, A, lda, B, ldb, info ) + integer :: ngpu + integer :: itype + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_ssygvd( itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, iwork, & + liwork, info ) + integer :: itype + character :: jobz + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssygvd_m( ngpu, itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, & + iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssygvdx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + mout, w, work, lwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssygvdx_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssygvdx_2stage( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssygvdx_2stage_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, & + vl, vu, il, iu, mout, w, work, lwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + real :: vl + real :: vu + integer :: il + integer :: iu + integer :: mout(*) + real :: w(*) + real :: work(*) + integer :: lwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ssysv( uplo, n, nrhs, A, lda, ipiv, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + real :: A(*) + integer :: lda + integer :: ipiv(*) + real :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_ssysv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_ssytrd( uplo, n, A, lda, d, e, tau, work, lwork, info ) + character :: uplo + integer :: n + real :: A(*) + integer :: lda + real :: d(*) + real :: e(*) + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_ssytrd_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: d(*) + real :: e(*) + real :: tau(*) + real :: wA(*) + integer :: ldwa + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_ssytrd2_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, & + dwork, ldwork, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: d(*) + real :: e(*) + real :: tau(*) + real :: wA(*) + integer :: ldwa + real :: work(*) + integer :: lwork + magma_devptr_t :: dwork + integer :: ldwork + integer :: info +end + +integer function magmaf_ssytrd_sb2st( uplo, n, nb, Vblksiz, A, lda, d, e, V, ldv, TAU, & + compT, T, ldt ) + character :: uplo + integer :: n + integer :: nb + integer :: Vblksiz + real :: A(*) + integer :: lda + real :: d(*) + real :: e(*) + real :: V(*) + integer :: ldv + real :: TAU(*) + integer :: compT + real :: T(*) + integer :: ldt +end + +subroutine magmaf_ssytrd_sy2sb( uplo, n, nb, A, lda, tau, work, lwork, dT, info ) + character :: uplo + integer :: n + integer :: nb + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_ssytrf( uplo, n, A, lda, ipiv, info ) + character :: uplo + integer :: n + real :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_ssytrf_aasen( uplo, cpu_panel, n, A, lda, ipiv, info ) + character :: uplo + integer :: cpu_panel + integer :: n + real :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_ssytrf_nopiv( uplo, n, A, lda, info ) + character :: uplo + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_ssytrf_nopiv_cpu( uplo, n, ib, A, lda, info ) + character :: uplo + integer :: n + integer :: ib + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_ssytrf_nopiv_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_ssytrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_slaln2( trans, na, nw, smin, ca, A, lda, d1, d2, B, ldb, wr, wi, X, & + ldx, scale, xnorm, info ) + integer :: trans + integer :: na + integer :: nw + real :: smin + real :: ca + real :: A(*) + integer :: lda + real :: d1 + real :: d2 + real :: B(*) + integer :: ldb + real :: wr + real :: wi + real :: X(*) + integer :: ldx + real :: scale(*) + real :: xnorm(*) + integer :: info +end + +subroutine magmaf_slaqtrsd( trans, n, T, ldt, x, ldx, cnorm, info ) + character :: trans + integer :: n + real :: T(*) + integer :: ldt + real :: x(*) + integer :: ldx + real :: cnorm(*) + integer :: info +end + +integer function magmaf_slarf_gpu( m, n, dv, dtau, dC, lddc, queue ) + integer :: m + integer :: n + magma_devptr_t :: dv + magma_devptr_t :: dtau + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: queue +end + +integer function magmaf_slarfb2_gpu( m, n, k, dV, lddv, dT, lddt, dC, lddc, dwork, & + ldwork, queue ) + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dV + integer :: lddv + magma_devptr_t :: dT + integer :: lddt + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: dwork + integer :: ldwork + magma_devptr_t :: queue +end + +subroutine magmaf_slauum( uplo, n, A, lda, info ) + character :: uplo + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_slauum_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_sposv( uplo, n, nrhs, A, lda, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_sposv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_spotf2_gpu( uplo, n, dA, ldda, queue, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_spotrf( uplo, n, A, lda, info ) + character :: uplo + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_spotrf_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_spotrf_m( ngpu, uplo, n, A, lda, info ) + integer :: ngpu + character :: uplo + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_spotri( uplo, n, A, lda, info ) + character :: uplo + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_spotri_gpu( uplo, n, dA, ldda, info ) + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_spotrs_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_sstedx( range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, iwork, & + liwork, dwork, info ) + character :: range + integer :: n + real :: vl + real :: vu + integer :: il + integer :: iu + real :: d(*) + real :: e(*) + real :: Z(*) + integer :: ldz + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_sstedx_m( ngpu, range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, & + iwork, liwork, info ) + integer :: ngpu + character :: range + integer :: n + real :: vl + real :: vu + integer :: il + integer :: iu + real :: d(*) + real :: e(*) + real :: Z(*) + integer :: ldz + real :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_strevc3( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + real :: T(*) + integer :: ldt + real :: VL(*) + integer :: ldvl + real :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_strevc3_mt( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + real :: T(*) + integer :: ldt + real :: VL(*) + integer :: ldvl + real :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + real :: work(*) + integer :: lwork + integer :: info +end + +integer function magmaf_strsm_m( ngpu, side, uplo, transa, diag, m, n, alpha, A, lda, B, & + ldb ) + integer :: ngpu + character :: side + character :: uplo + character :: transa + character :: diag + integer :: m + integer :: n + real :: alpha + real :: A(*) + integer :: lda + real :: B(*) + integer :: ldb +end + +subroutine magmaf_strtri( uplo, diag, n, A, lda, info ) + character :: uplo + character :: diag + integer :: n + real :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_strtri_gpu( uplo, diag, n, dA, ldda, info ) + character :: uplo + character :: diag + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_sorgbr( vect, m, n, k, A, lda, tau, work, lwork, info ) + character :: vect + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sorghr( n, ilo, ihi, A, lda, tau, dT, nb, info ) + integer :: n + integer :: ilo + integer :: ihi + real :: A(*) + integer :: lda + real :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_sorghr_m( n, ilo, ihi, A, lda, tau, T, nb, info ) + integer :: n + integer :: ilo + integer :: ihi + real :: A(*) + integer :: lda + real :: tau(*) + real :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_sorglq( m, n, k, A, lda, tau, dT, nb, info ) + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_sorgqr( m, n, k, A, lda, tau, dT, nb, info ) + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_sorgqr_gpu( m, n, k, dA, ldda, tau, dT, nb, info ) + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_sorgqr_m( m, n, k, A, lda, tau, T, nb, info ) + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_sorgqr2( m, n, k, A, lda, tau, info ) + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + integer :: info +end + +subroutine magmaf_sormbr( vect, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + character :: vect + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormlq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormrq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormql( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormql2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dC + integer :: lddc + real :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_sormqr( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormqr_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, hwork, & + lwork, dT, nb, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dC + integer :: lddc + real :: hwork(*) + integer :: lwork + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_sormqr2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dC + integer :: lddc + real :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_sormqr_m( ngpu, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + integer :: ngpu + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormtr( side, uplo, trans, m, n, A, lda, tau, C, ldc, work, lwork, info & + ) + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_sormtr_gpu( side, uplo, trans, m, n, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + real :: tau(*) + magma_devptr_t :: dC + integer :: lddc + real :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_sormtr_m( ngpu, side, uplo, trans, m, n, A, lda, tau, C, ldc, work, & + lwork, info ) + integer :: ngpu + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + real :: A(*) + integer :: lda + real :: tau(*) + real :: C(*) + integer :: ldc + real :: work(*) + integer :: lwork + integer :: info +end + +integer function magmaf_s_isnan( x ) + real :: x +end + +integer function magmaf_s_isinf( x ) + real :: x +end + +integer function magmaf_s_isnan_inf( x ) + real :: x +end + +real function magmaf_smake_lwork( lwork ) + integer :: lwork +end + +integer function magmaf_snan_inf( uplo, m, n, A, lda, cnt_nan, cnt_inf ) + character :: uplo + integer :: m + integer :: n + real :: A(*) + integer :: lda + integer :: cnt_nan(*) + integer :: cnt_inf(*) +end + +integer function magmaf_snan_inf_gpu( uplo, m, n, dA, ldda, cnt_nan, cnt_inf, queue ) + character :: uplo + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: cnt_nan(*) + integer :: cnt_inf(*) + magma_devptr_t :: queue +end + +subroutine magmaf_sprint( m, n, A, lda ) + integer :: m + integer :: n + real :: A(*) + integer :: lda +end + +subroutine magmaf_sprint_gpu( m, n, dA, ldda, queue ) + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue +end + +subroutine magmaf_spanel_to_q( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + real :: A(*) + integer :: lda + real :: work(*) +end + +subroutine magmaf_sq_to_panel( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + real :: A(*) + integer :: lda + real :: work(*) +end + +end interface + +end module magma_sfortran diff --git a/lib/magma_fmodules/magma_zfortran.F b/lib/magma_fmodules/magma_zfortran.F new file mode 100644 index 0000000000..c5ef5cbf41 --- /dev/null +++ b/lib/magma_fmodules/magma_zfortran.F @@ -0,0 +1,2086 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! This file is AUTOMATICALLY GENERATED by: +!! tools/fortran_wrappers.pl include/magma_z.i +!! Do not edit. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +module magma_zfortran + +use magma_param +use iso_fortran_env, ONLY: int64 + +#define magma_devptr_t integer(int64) + +implicit none + +!---- Fortran interfaces to MAGMA subroutines ---- +interface + +integer function magmaf_get_zpotrf_nb( n ) + integer :: n +end + +integer function magmaf_get_zgetrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zgetri_nb( n ) + integer :: n +end + +integer function magmaf_get_zhetrf_nb( n ) + integer :: n +end + +integer function magmaf_get_zhetrf_nopiv_nb( n ) + integer :: n +end + +integer function magmaf_get_zhetrf_aasen_nb( n ) + integer :: n +end + +integer function magmaf_get_zgeqp3_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zgeqrf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zgeqlf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zgelqf_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zgehrd_nb( n ) + integer :: n +end + +integer function magmaf_get_zhetrd_nb( n ) + integer :: n +end + +integer function magmaf_get_zhegst_nb( n ) + integer :: n +end + +integer function magmaf_get_zhegst_m_nb( n ) + integer :: n +end + +integer function magmaf_get_zgebrd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zgesvd_nb( m, n ) + integer :: m + integer :: n +end + +integer function magmaf_get_zbulge_nb( n, nbthreads ) + integer :: n + integer :: nbthreads +end + +integer function magmaf_get_zbulge_vblksiz( n, nb, nbthreads ) + integer :: n + integer :: nb + integer :: nbthreads +end + +integer function magmaf_get_zbulge_gcperf( ) +end + +subroutine magmaf_zgebrd( m, n, A, lda, d, e, tauq, taup, work, lwork, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: d(*) + double precision :: e(*) + complex*16 :: tauq(*) + complex*16 :: taup(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, work, lwork, & + rwork, info ) + character :: jobvl + character :: jobvr + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: w(*) + complex*16 :: VL(*) + integer :: ldvl + complex*16 :: VR(*) + integer :: ldvr + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +subroutine magmaf_zgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, work, lwork, & + rwork, info ) + character :: jobvl + character :: jobvr + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: w(*) + complex*16 :: VL(*) + integer :: ldvl + complex*16 :: VR(*) + integer :: ldvr + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +subroutine magmaf_zgegqr_gpu( ikind, m, n, dA, ldda, dwork, work, info ) + import int64 + integer :: ikind + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dwork + complex*16 :: work(*) + integer :: info +end + +subroutine magmaf_zgehrd( n, ilo, ihi, A, lda, tau, work, lwork, dT, info ) + import int64 + integer :: n + integer :: ilo + integer :: ihi + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_zgehrd_m( n, ilo, ihi, A, lda, tau, work, lwork, T, info ) + integer :: n + integer :: ilo + integer :: ihi + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + complex*16 :: T(*) + integer :: info +end + +subroutine magmaf_zgehrd2( n, ilo, ihi, A, lda, tau, work, lwork, info ) + integer :: n + integer :: ilo + integer :: ihi + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgelqf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgelqf_gpu( m, n, dA, ldda, tau, work, lwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgels( trans, m, n, nrhs, A, lda, B, ldb, hwork, lwork, info ) + import int64 + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: A + integer :: lda + magma_devptr_t :: B + integer :: ldb + complex*16 :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zggrqf( m, p, n, A, lda, taua, B, ldb, taub, work, lwork, info ) + integer :: m + integer :: p + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: taua(*) + complex*16 :: B(*) + integer :: ldb + complex*16 :: taub(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgglse( m, n, p, A, lda, B, ldb, c, d, x, work, lwork, info ) + integer :: m + integer :: n + integer :: p + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + complex*16 :: c(*) + complex*16 :: d(*) + complex*16 :: x(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgels_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + import int64 + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + complex*16 :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgels3_gpu( trans, m, n, nrhs, dA, ldda, dB, lddb, hwork, lwork, info ) + import int64 + character :: trans + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + complex*16 :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeqlf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeqp3( m, n, A, lda, jpvt, tau, work, lwork, rwork, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: jpvt(*) + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +subroutine magmaf_zgeqp3_gpu( m, n, dA, ldda, jpvt, tau, dwork, lwork, rwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: jpvt(*) + complex*16 :: tau(*) + magma_devptr_t :: dwork + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +subroutine magmaf_zgeqr2x_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_zgeqr2x2_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_zgeqr2x3_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_zgeqr2x4_gpu( m, n, dA, ldda, dtau, dT, ddA, dwork, queue, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dtau + magma_devptr_t :: dT + magma_devptr_t :: ddA + magma_devptr_t :: dwork + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_zgeqrf( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeqrf_gpu( m, n, dA, ldda, tau, dT, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_zgeqrf_m( ngpu, m, n, A, lda, tau, work, lwork, info ) + integer :: ngpu + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeqrf_ooc( m, n, A, lda, tau, work, lwork, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeqrf2_gpu( m, n, dA, ldda, tau, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + integer :: info +end + +subroutine magmaf_zgeqrf3_gpu( m, n, dA, ldda, tau, dT, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_zgeqrs_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, info & + ) + import int64 + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + complex*16 :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgeqrs3_gpu( m, n, nrhs, dA, ldda, tau, dT, dB, lddb, hwork, lwork, & + info ) + import int64 + integer :: m + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dT + magma_devptr_t :: dB + integer :: lddb + complex*16 :: hwork(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zgerbt_gpu( gen, n, nrhs, dA, ldda, dB, lddb, U, V, info ) + import int64 + character :: gen + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + complex*16 :: U(*) + complex*16 :: V(*) + integer :: info +end + +subroutine magmaf_zgerfs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, dX, lddx, dworkd, & + dAF, iter, info ) + import int64 + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + magma_devptr_t :: dX + integer :: lddx + magma_devptr_t :: dworkd + magma_devptr_t :: dAF + integer :: iter + integer :: info +end + +subroutine magmaf_zgesdd( jobz, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, rwork, & + iwork, info ) + character :: jobz + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: s(*) + complex*16 :: U(*) + integer :: ldu + complex*16 :: VT(*) + integer :: ldvt + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: iwork(*) + integer :: info +end + +subroutine magmaf_zgesv( n, nrhs, A, lda, ipiv, B, ldb, info ) + integer :: n + integer :: nrhs + complex*16 :: A(*) + integer :: lda + integer :: ipiv(*) + complex*16 :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_zgesv_gpu( n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + import int64 + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zgesv_nopiv_gpu( n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zgesv_rbt( ref, n, nrhs, A, lda, B, ldb, info ) + character :: ref + integer :: n + integer :: nrhs + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_zgesvd( jobu, jobvt, m, n, A, lda, s, U, ldu, VT, ldvt, work, lwork, & + rwork, info ) + character :: jobu + character :: jobvt + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: s(*) + complex*16 :: U(*) + integer :: ldu + complex*16 :: VT(*) + integer :: ldvt + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +subroutine magmaf_zgetf2_gpu( m, n, dA, ldda, ipiv, queue, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_zgetf2_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zgetrf( m, n, A, lda, ipiv, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_zgetrf_gpu( m, n, dA, ldda, ipiv, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_zgetrf_m( ngpu, m, n, A, lda, ipiv, info ) + integer :: ngpu + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_zgetrf_nopiv( m, n, A, lda, info ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zgetrf_nopiv_gpu( m, n, dA, ldda, info ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zgetri_gpu( n, dA, ldda, ipiv, dwork, lwork, info ) + import int64 + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dwork + integer :: lwork + integer :: info +end + +subroutine magmaf_zgetrs_gpu( trans, n, nrhs, dA, ldda, ipiv, dB, lddb, info ) + import int64 + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + integer :: ipiv(*) + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zgetrs_nopiv_gpu( trans, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: trans + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zheevd( jobz, uplo, n, A, lda, w, work, lwork, rwork, lrwork, iwork, & + liwork, info ) + character :: jobz + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, rwork, & + lrwork, iwork, liwork, info ) + import int64 + character :: jobz + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: w(*) + complex*16 :: wA(*) + integer :: ldwa + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, rwork, lrwork, & + iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevdx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, work, & + lwork, rwork, lrwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevdx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, mout, w, & + wA, ldwa, work, lwork, rwork, lrwork, iwork, liwork, info ) + import int64 + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: wA(*) + integer :: ldwa + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevdx_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevdx_2stage( jobz, range, uplo, n, A, lda, vl, vu, il, iu, mout, w, & + work, lwork, rwork, lrwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevdx_2stage_m( ngpu, jobz, range, uplo, n, A, lda, vl, vu, il, iu, & + mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevr( jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, mout, w, & + Z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: abstol + integer :: mout(*) + double precision :: w(*) + complex*16 :: Z(*) + integer :: ldz + integer :: isuppz(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevr_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, abstol, & + mout, w, dZ, lddz, isuppz, wA, ldwa, wZ, ldwz, work, lwork, rwork, lrwork, iwork, & + liwork, info ) + import int64 + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: abstol + integer :: mout(*) + double precision :: w(*) + magma_devptr_t :: dZ + integer :: lddz + integer :: isuppz(*) + complex*16 :: wA(*) + integer :: ldwa + complex*16 :: wZ(*) + integer :: ldwz + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zheevx( jobz, range, uplo, n, A, lda, vl, vu, il, iu, abstol, mout, w, & + Z, ldz, work, lwork, rwork, iwork, ifail, info ) + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: abstol + integer :: mout(*) + double precision :: w(*) + complex*16 :: Z(*) + integer :: ldz + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: iwork(*) + integer :: ifail(*) + integer :: info +end + +subroutine magmaf_zheevx_gpu( jobz, range, uplo, n, dA, ldda, vl, vu, il, iu, abstol, & + mout, w, dZ, lddz, wA, ldwa, wZ, ldwz, work, lwork, rwork, iwork, ifail, info ) + import int64 + character :: jobz + character :: range + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: abstol + integer :: mout(*) + double precision :: w(*) + magma_devptr_t :: dZ + integer :: lddz + complex*16 :: wA(*) + integer :: ldwa + complex*16 :: wZ(*) + integer :: ldwz + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: iwork(*) + integer :: ifail(*) + integer :: info +end + +subroutine magmaf_zhegst( itype, uplo, n, A, lda, B, ldb, info ) + integer :: itype + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_zhegst_gpu( itype, uplo, n, dA, ldda, dB, lddb, info ) + import int64 + integer :: itype + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zhegst_m( ngpu, itype, uplo, n, A, lda, B, ldb, info ) + integer :: ngpu + integer :: itype + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_zhegvd( itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, rwork, & + lrwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvd_m( ngpu, itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, & + rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvdx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvdx_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvdx_2stage( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, & + il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvdx_2stage_m( ngpu, itype, jobz, range, uplo, n, A, lda, B, ldb, & + vl, vu, il, iu, mout, w, work, lwork, rwork, lrwork, iwork, liwork, info ) + integer :: ngpu + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + integer :: mout(*) + double precision :: w(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvr( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + abstol, mout, w, Z, ldz, isuppz, work, lwork, rwork, lrwork, iwork, liwork, info & + ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: abstol + integer :: mout(*) + double precision :: w(*) + complex*16 :: Z(*) + integer :: ldz + integer :: isuppz(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_zhegvx( itype, jobz, range, uplo, n, A, lda, B, ldb, vl, vu, il, iu, & + abstol, mout, w, Z, ldz, work, lwork, rwork, iwork, ifail, info ) + integer :: itype + character :: jobz + character :: range + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: abstol + integer :: mout(*) + double precision :: w(*) + complex*16 :: Z(*) + integer :: ldz + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: iwork(*) + integer :: ifail(*) + integer :: info +end + +subroutine magmaf_zhesv( uplo, n, nrhs, A, lda, ipiv, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + complex*16 :: A(*) + integer :: lda + integer :: ipiv(*) + complex*16 :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_zhesv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zhetrd( uplo, n, A, lda, d, e, tau, work, lwork, info ) + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + double precision :: d(*) + double precision :: e(*) + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zhetrd_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: d(*) + double precision :: e(*) + complex*16 :: tau(*) + complex*16 :: wA(*) + integer :: ldwa + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zhetrd2_gpu( uplo, n, dA, ldda, d, e, tau, wA, ldwa, work, lwork, & + dwork, ldwork, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + double precision :: d(*) + double precision :: e(*) + complex*16 :: tau(*) + complex*16 :: wA(*) + integer :: ldwa + complex*16 :: work(*) + integer :: lwork + magma_devptr_t :: dwork + integer :: ldwork + integer :: info +end + +integer function magmaf_zhetrd_hb2st( uplo, n, nb, Vblksiz, A, lda, d, e, V, ldv, TAU, & + compT, T, ldt ) + character :: uplo + integer :: n + integer :: nb + integer :: Vblksiz + complex*16 :: A(*) + integer :: lda + double precision :: d(*) + double precision :: e(*) + complex*16 :: V(*) + integer :: ldv + complex*16 :: TAU(*) + integer :: compT + complex*16 :: T(*) + integer :: ldt +end + +subroutine magmaf_zhetrd_he2hb( uplo, n, nb, A, lda, tau, work, lwork, dT, info ) + import int64 + character :: uplo + integer :: n + integer :: nb + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + magma_devptr_t :: dT + integer :: info +end + +subroutine magmaf_zhetrf( uplo, n, A, lda, ipiv, info ) + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_zhetrf_aasen( uplo, cpu_panel, n, A, lda, ipiv, info ) + character :: uplo + integer :: cpu_panel + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: ipiv(*) + integer :: info +end + +subroutine magmaf_zhetrf_nopiv( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zhetrf_nopiv_cpu( uplo, n, ib, A, lda, info ) + character :: uplo + integer :: n + integer :: ib + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zhetrf_nopiv_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zhetrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +integer function magmaf_zlarf_gpu( m, n, dv, dtau, dC, lddc, queue ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dv + magma_devptr_t :: dtau + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: queue +end + +integer function magmaf_zlarfb2_gpu( m, n, k, dV, lddv, dT, lddt, dC, lddc, dwork, & + ldwork, queue ) + import int64 + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dV + integer :: lddv + magma_devptr_t :: dT + integer :: lddt + magma_devptr_t :: dC + integer :: lddc + magma_devptr_t :: dwork + integer :: ldwork + magma_devptr_t :: queue +end + +subroutine magmaf_zlatrsd( uplo, trans, diag, normin, n, A, lda, lambda, x, scale, cnorm, & + info ) + character :: uplo + character :: trans + character :: diag + character :: normin + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: lambda + complex*16 :: x(*) + double precision :: scale(*) + double precision :: cnorm(*) + integer :: info +end + +subroutine magmaf_zlauum( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zlauum_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zposv( uplo, n, nrhs, A, lda, B, ldb, info ) + character :: uplo + integer :: n + integer :: nrhs + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb + integer :: info +end + +subroutine magmaf_zposv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zpotf2_gpu( uplo, n, dA, ldda, queue, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue + integer :: info +end + +subroutine magmaf_zpotrf( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zpotrf_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zpotrf_m( ngpu, uplo, n, A, lda, info ) + integer :: ngpu + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zpotri( uplo, n, A, lda, info ) + character :: uplo + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zpotri_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zpotrs_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zsysv_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zsytrf_nopiv_cpu( uplo, n, ib, A, lda, info ) + character :: uplo + integer :: n + integer :: ib + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_zsytrf_nopiv_gpu( uplo, n, dA, ldda, info ) + import int64 + character :: uplo + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zsytrs_nopiv_gpu( uplo, n, nrhs, dA, ldda, dB, lddb, info ) + import int64 + character :: uplo + integer :: n + integer :: nrhs + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: dB + integer :: lddb + integer :: info +end + +subroutine magmaf_zstedx( range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, iwork, & + liwork, dwork, info ) + import int64 + character :: range + integer :: n + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: d(*) + double precision :: e(*) + complex*16 :: Z(*) + integer :: ldz + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + magma_devptr_t :: dwork + integer :: info +end + +subroutine magmaf_zstedx_m( ngpu, range, n, vl, vu, il, iu, d, e, Z, ldz, rwork, lrwork, & + iwork, liwork, info ) + integer :: ngpu + character :: range + integer :: n + double precision :: vl + double precision :: vu + integer :: il + integer :: iu + double precision :: d(*) + double precision :: e(*) + complex*16 :: Z(*) + integer :: ldz + double precision :: rwork(*) + integer :: lrwork + integer :: iwork(*) + integer :: liwork + integer :: info +end + +subroutine magmaf_ztrevc3( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, rwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + complex*16 :: T(*) + integer :: ldt + complex*16 :: VL(*) + integer :: ldvl + complex*16 :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +subroutine magmaf_ztrevc3_mt( side, howmany, select, n, T, ldt, VL, ldvl, VR, ldvr, mm, & + mout, work, lwork, rwork, info ) + character :: side + character :: howmany + integer :: select(*) + integer :: n + complex*16 :: T(*) + integer :: ldt + complex*16 :: VL(*) + integer :: ldvl + complex*16 :: VR(*) + integer :: ldvr + integer :: mm + integer :: mout(*) + complex*16 :: work(*) + integer :: lwork + double precision :: rwork(*) + integer :: info +end + +integer function magmaf_ztrsm_m( ngpu, side, uplo, transa, diag, m, n, alpha, A, lda, B, & + ldb ) + integer :: ngpu + character :: side + character :: uplo + character :: transa + character :: diag + integer :: m + integer :: n + complex*16 :: alpha + complex*16 :: A(*) + integer :: lda + complex*16 :: B(*) + integer :: ldb +end + +subroutine magmaf_ztrtri( uplo, diag, n, A, lda, info ) + character :: uplo + character :: diag + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: info +end + +subroutine magmaf_ztrtri_gpu( uplo, diag, n, dA, ldda, info ) + import int64 + character :: uplo + character :: diag + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: info +end + +subroutine magmaf_zungbr( vect, m, n, k, A, lda, tau, work, lwork, info ) + character :: vect + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunghr( n, ilo, ihi, A, lda, tau, dT, nb, info ) + import int64 + integer :: n + integer :: ilo + integer :: ihi + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_zunghr_m( n, ilo, ihi, A, lda, tau, T, nb, info ) + integer :: n + integer :: ilo + integer :: ihi + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_zunglq( m, n, k, A, lda, tau, dT, nb, info ) + import int64 + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_zungqr( m, n, k, A, lda, tau, dT, nb, info ) + import int64 + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_zungqr_gpu( m, n, k, dA, ldda, tau, dT, nb, info ) + import int64 + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_zungqr_m( m, n, k, A, lda, tau, T, nb, info ) + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: T(*) + integer :: nb + integer :: info +end + +subroutine magmaf_zungqr2( m, n, k, A, lda, tau, info ) + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + integer :: info +end + +subroutine magmaf_zunmbr( vect, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + character :: vect + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmlq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmrq( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmql( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmql2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + import int64 + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex*16 :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_zunmqr( side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, info ) + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmqr_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, hwork, & + lwork, dT, nb, info ) + import int64 + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex*16 :: hwork(*) + integer :: lwork + magma_devptr_t :: dT + integer :: nb + integer :: info +end + +subroutine magmaf_zunmqr2_gpu( side, trans, m, n, k, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + import int64 + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex*16 :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_zunmqr_m( ngpu, side, trans, m, n, k, A, lda, tau, C, ldc, work, lwork, & + info ) + integer :: ngpu + character :: side + character :: trans + integer :: m + integer :: n + integer :: k + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmtr( side, uplo, trans, m, n, A, lda, tau, C, ldc, work, lwork, info & + ) + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +subroutine magmaf_zunmtr_gpu( side, uplo, trans, m, n, dA, ldda, tau, dC, lddc, wA, ldwa, & + info ) + import int64 + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + complex*16 :: tau(*) + magma_devptr_t :: dC + integer :: lddc + complex*16 :: wA(*) + integer :: ldwa + integer :: info +end + +subroutine magmaf_zunmtr_m( ngpu, side, uplo, trans, m, n, A, lda, tau, C, ldc, work, & + lwork, info ) + integer :: ngpu + character :: side + character :: uplo + character :: trans + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + complex*16 :: tau(*) + complex*16 :: C(*) + integer :: ldc + complex*16 :: work(*) + integer :: lwork + integer :: info +end + +integer function magmaf_z_isnan( x ) + complex*16 :: x +end + +integer function magmaf_z_isinf( x ) + complex*16 :: x +end + +integer function magmaf_z_isnan_inf( x ) + complex*16 :: x +end + +integer function magmaf_znan_inf( uplo, m, n, A, lda, cnt_nan, cnt_inf ) + character :: uplo + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda + integer :: cnt_nan(*) + integer :: cnt_inf(*) +end + +integer function magmaf_znan_inf_gpu( uplo, m, n, dA, ldda, cnt_nan, cnt_inf, queue ) + import int64 + character :: uplo + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + integer :: cnt_nan(*) + integer :: cnt_inf(*) + magma_devptr_t :: queue +end + +subroutine magmaf_zprint( m, n, A, lda ) + integer :: m + integer :: n + complex*16 :: A(*) + integer :: lda +end + +subroutine magmaf_zprint_gpu( m, n, dA, ldda, queue ) + import int64 + integer :: m + integer :: n + magma_devptr_t :: dA + integer :: ldda + magma_devptr_t :: queue +end + +subroutine magmaf_zpanel_to_q( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + complex*16 :: A(*) + integer :: lda + complex*16 :: work(*) +end + +subroutine magmaf_zq_to_panel( uplo, ib, A, lda, work ) + character :: uplo + integer :: ib + complex*16 :: A(*) + integer :: lda + complex*16 :: work(*) +end + +end interface + +end module magma_zfortran diff --git a/lib/magma_fmodules/mod_magma.F b/lib/magma_fmodules/mod_magma.F deleted file mode 100644 index 9b2f1d9b55..0000000000 --- a/lib/magma_fmodules/mod_magma.F +++ /dev/null @@ -1,279 +0,0 @@ -! -! -- MAGMA (version 2.7.1) -- -! Univ. of Tennessee, Knoxville -! Univ. of California, Berkeley -! Univ. of Colorado, Denver -! @date February 2023 -! - -module magma - -use iso_c_binding - -use magma_common -use magma_sfortran -use magma_dfortran -use magma_cfortran -use magma_zfortran - -implicit none - -!! ============================================================================= -!! Parameter constants from magma_types.h -integer(c_int), parameter :: & - MagmaFalse = 0, & - MagmaTrue = 1, & - - MagmaRowMajor = 101, & - MagmaColMajor = 102, & - - MagmaNoTrans = 111, & - MagmaTrans = 112, & - MagmaConjTrans = 113, & - - MagmaUpper = 121, & - MagmaLower = 122, & - MagmaGeneral = 123, & - MagmaFull = 123, & !! deprecated, use MagmaGeneral - - MagmaNonUnit = 131, & - MagmaUnit = 132, & - - MagmaLeft = 141, & - MagmaRight = 142, & - MagmaBothSides = 143, & - - MagmaNoVec = 301, & !/* geev, syev, gesvd */ - MagmaVec = 302, & !/* geev, syev */ - MagmaIVec = 303, & !/* stedc */ - MagmaAllVec = 304, & !/* gesvd, trevc */ - MagmaSomeVec = 305, & !/* gesvd, trevc */ - MagmaOverwriteVec = 306, & !/* gesvd */ - MagmaBacktransVec = 307 !/* trevc */ -!! todo all the rest - - -!! ============================================================================= -!! Fortran interfaces to C functions -interface - - !! ------------------------------------------------------------------------- - !! initialize - subroutine magmaf_init() & - bind(C, name="magma_init") - use iso_c_binding - end subroutine - - subroutine magmaf_finalize() & - bind(C, name="magma_finalize") - use iso_c_binding - end subroutine - - !! ------------------------------------------------------------------------- - !! version - subroutine magmaf_version( major, minor, micro ) & - bind(C, name="magma_version") - use iso_c_binding - integer(c_int), target :: major, minor, micro - end subroutine - - subroutine magmaf_print_environment() & - bind(C, name="magma_print_environment") - use iso_c_binding - end subroutine - - !! ------------------------------------------------------------------------- - !! timing - real(c_double) function magmaf_wtime() & - bind(C, name="magma_wtime") - use iso_c_binding - end function - - real(c_double) function magmaf_sync_wtime( queue ) & - bind(C, name="magma_wtime") - use iso_c_binding - type(c_ptr), value :: queue - end function - - !! ------------------------------------------------------------------------- - !! device support - integer(c_int) function magmaf_num_gpus() & - bind(C, name="magma_num_gpus") - use iso_c_binding - end function - - integer(c_int) function magmaf_get_device_arch() & - bind(C, name="magma_getdevice_arch") - use iso_c_binding - end function - - subroutine magmaf_get_device( dev ) & - bind(C, name="magma_getdevice") - use iso_c_binding - integer(c_int), target :: dev - end subroutine - - subroutine magmaf_set_device( dev ) & - bind(C, name="magma_setdevice") - use iso_c_binding - integer(c_int), value :: dev - end subroutine - - integer(c_size_t) function magmaf_mem_size( queue ) & - bind(C, name="magma_mem_size") - use iso_c_binding - type(c_ptr), value :: queue - end function - - !! ------------------------------------------------------------------------- - !! queue support - subroutine magmaf_queue_create_internal( dev, queue_ptr, func, file, line ) & - bind(C, name="magma_queue_create_internal") - use iso_c_binding - integer(c_int), value :: dev - type(c_ptr), target :: queue_ptr !! queue_t* - character(c_char) :: func, file - integer(c_int), value :: line - end subroutine - - subroutine magmaf_queue_destroy_internal( queue, func, file, line ) & - bind(C, name="magma_queue_destroy_internal") - use iso_c_binding - type(c_ptr), value :: queue !! queue_t - character(c_char) :: func, file - integer(c_int), value :: line - end subroutine - - subroutine magmaf_queue_sync_internal( queue, func, file, line ) & - bind(C, name="magma_queue_sync_internal") - use iso_c_binding - type(c_ptr), value :: queue !! queue_t - character(c_char) :: func, file - integer(c_int), value :: line - end subroutine - - integer(c_int) function magmaf_queue_get_device( queue ) & - bind(C, name="magma_queue_get_device") - use iso_c_binding - type(c_ptr), value :: queue !! queue_t - end function - - !! ------------------------------------------------------------------------- - !! offsets pointers -- 1D vectors with inc - !! see offset.c - type(c_ptr) function magmaf_soffset_1d( ptr, inc, i ) & - bind(C, name="magma_soffset_1d") - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: inc, i - end function - - type(c_ptr) function magmaf_doffset_1d( ptr, inc, i ) & - bind(C, name="magma_doffset_1d") - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: inc, i - end function - - type(c_ptr) function magmaf_coffset_1d( ptr, inc, i ) & - bind(C, name="magma_coffset_1d") - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: inc, i - end function - - type(c_ptr) function magmaf_zoffset_1d( ptr, inc, i ) & - bind(C, name="magma_zoffset_1d") - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: inc, i - end function - - type(c_ptr) function magmaf_ioffset_1d( ptr, inc, i ) & - bind(C, name="magma_ioffset_1d") - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: inc, i - end function - - !! ------------------------------------------------------------------------- - !! offsets pointers -- 2D matrices with lda - !! see offset.c - type(c_ptr) function magmaf_soffset_2d( ptr, lda, i, j ) & - bind(C, name="magma_soffset_2d") - use iso_c_binding - type(c_ptr), value:: ptr - integer(c_int), value :: lda, i, j - end function - - type(c_ptr) function magmaf_doffset_2d( ptr, lda, i, j ) & - bind(C, name="magma_doffset_2d") - use iso_c_binding - type(c_ptr), value:: ptr - integer(c_int), value :: lda, i, j - end function - - type(c_ptr) function magmaf_coffset_2d( ptr, lda, i, j ) & - bind(C, name="magma_coffset_2d") - use iso_c_binding - type(c_ptr), value:: ptr - integer(c_int), value :: lda, i, j - end function - - type(c_ptr) function magmaf_zoffset_2d( ptr, lda, i, j ) & - bind(C, name="magma_zoffset_2d") - use iso_c_binding - type(c_ptr), value:: ptr - integer(c_int), value :: lda, i, j - end function - - type(c_ptr) function magmaf_ioffset_2d( ptr, lda, i, j ) & - bind(C, name="magma_ioffset_2d") - use iso_c_binding - type(c_ptr), value:: ptr - integer(c_int), value :: lda, i, j - end function - -end interface - -!! ============================================================================= -!! Fortran routines & functions -contains - - !! ------------------------------------------------------------------------- - !! queue support - subroutine magmaf_queue_create( dev, queue_ptr ) - use iso_c_binding - integer(c_int), value :: dev - type(c_ptr), target :: queue_ptr !! queue_t* - - call magmaf_queue_create_internal( & - dev, queue_ptr, & - "magma_queue_create" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_queue_destroy( queue ) - use iso_c_binding - type(c_ptr), value :: queue !! queue_t - - call magmaf_queue_destroy_internal( & - queue, & - "magma_queue_destroy" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_queue_sync( queue ) - use iso_c_binding - type(c_ptr), value :: queue !! queue_t - - call magmaf_queue_sync_internal( & - queue, & - "magma_queue_sync" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - -end module diff --git a/lib/magma_fmodules/mod_magma_cfortran.F b/lib/magma_fmodules/mod_magma_cfortran.F deleted file mode 100644 index dbf26c0f61..0000000000 --- a/lib/magma_fmodules/mod_magma_cfortran.F +++ /dev/null @@ -1,230 +0,0 @@ -!! @generated from magma_zfortran.F90, fortran z -> c, Sat Apr 22 18:54:26 2023 - -module magma_cfortran - -use magma_common -implicit none - -!! ============================================================================= -!! Fortran interfaces to C functions -interface - - !! ------------------------------------------------------------------------- - !! CPU interfaces (matrix in CPU memory) - subroutine magmaf_cgetrf( m, n, A, lda, ipiv, info ) & - bind(C, name="magma_cgetrf") - use iso_c_binding - integer(c_int), value :: m, n, lda - complex(c_float_complex), target :: A(lda,*) - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_cpotrf( uplo, n, A, lda, info ) & - bind(C, name="magma_cpotrf") - use iso_c_binding - integer(c_int), value :: uplo - integer(c_int), value :: n, lda - complex(c_float_complex), target :: A(lda,*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_cgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_cgeev") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - complex(c_float_complex), target :: A(lda,*) - complex(c_float_complex), target :: w(*) - complex(c_float_complex), target :: VR(ldvr,*), VL(ldvl,*) - complex(c_float_complex), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_cgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_cgeev_m") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - complex(c_float_complex), target :: A(lda,*) - complex(c_float_complex), target :: w(*) - complex(c_float_complex), target :: VR(ldvr,*), VL(ldvl,*) - complex(c_float_complex), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_cheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_cheevd_m") - use iso_c_binding - integer(c_int), value :: ngpu - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, lda, lwork, lrwork, liwork - complex(c_float_complex), target :: A(lda,*) - real(c_float), target :: w(*) - complex(c_float_complex), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! ------------------------------------------------------------------------- - !! GPU interfaces (matrix in GPU memory) - subroutine magmaf_cgetrf_gpu( m, n, dA, lda, ipiv, info ) & - bind(C, name="magma_cgetrf_gpu") - use iso_c_binding - integer(c_int), value :: m, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_cpotrf_gpu( uplo, n, dA, lda, info ) & - bind(C, name="magma_cpotrf_gpu") - use iso_c_binding - integer(c_int), value :: uplo, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_cheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_cheevd_gpu") - use iso_c_binding - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork - type(c_ptr), value :: dA !! double complex** - real(c_float), target :: w(*) - complex(c_float_complex), target :: wA(*) - complex(c_float_complex), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! batched GPU interfaces (all arrays in GPU memory) - subroutine magmaf_cgetrf_batched( & - m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & - bind(C, name="magma_cgetrf_batched") - use iso_c_binding - integer(c_int), value :: m, n, lda, batchcount - type(c_ptr), value :: dA_array !! double_complex** - type(c_ptr), value :: ipiv_array !! int** - type(c_ptr), value :: info_array !! int* - type(c_ptr), value :: queue - end subroutine - - !! ------------------------------------------------------------------------- - !! BLAS (matrices in GPU memory) - subroutine magmaf_caxpy( & - n, & - alpha, dx, incx, & - dy, incy, & - queue ) & - bind(C, name="magma_caxpy") - use iso_c_binding - integer(c_int), value :: n, incx, incy - complex(c_float_complex), value :: alpha - type(c_ptr), value :: dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_cgemv( & - transA, m, n, & - alpha, dA, lda, & - dx, incx, & - beta, dy, incy, & - queue ) & - bind(C, name="magma_cgemv") - use iso_c_binding - integer(c_int), value :: transA, m, n, lda, incx, incy - complex(c_float_complex), value :: alpha, beta - type(c_ptr), value :: dA, dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_cgemm( & - transA, transB, m, n, k, & - alpha, dA, lda, & - dB, ldb, & - beta, dC, ldc, & - queue ) & - bind(C, name="magma_cgemm") - use iso_c_binding - integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc - complex(c_float_complex), value :: alpha, beta - type(c_ptr), value :: dA, dB, dC - type(c_ptr), value :: queue !! queue_t - end subroutine - -end interface - -!! ============================================================================= -!! Fortran routines & functions -contains - - !! ------------------------------------------------------------------------- - !! malloc wrappers - integer(c_int) function magmaf_cmalloc( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_cmalloc = magmaf_malloc( ptr, n*sizeof_complex ) - end function - - integer(c_int) function magmaf_cmalloc_cpu( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_cmalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_complex ) - end function - - integer(c_int) function magmaf_cmalloc_pinned( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_cmalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_complex ) - end function - - !! ------------------------------------------------------------------------- - !! set/get wrappers - subroutine magmaf_csetmatrix( & - m, n, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - complex(c_float_complex), target :: hA_src(lda,*) - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, int(sizeof_complex), c_loc(hA_src), lda, dB_dst, ldb, queue, & - "magma_csetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_cgetmatrix( & - m, n, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), value :: dA_src - complex(c_float_complex), target :: hB_dst(ldb,*) - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, int(sizeof_complex), dA_src, lda, c_loc(hB_dst), ldb, queue, & - "magma_cgetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - -end module diff --git a/lib/magma_fmodules/mod_magma_common.F b/lib/magma_fmodules/mod_magma_common.F deleted file mode 100644 index d575d6cb33..0000000000 --- a/lib/magma_fmodules/mod_magma_common.F +++ /dev/null @@ -1,378 +0,0 @@ -module magma_common - -use iso_c_binding -implicit none - -!! ===================================================================== -!! Parameter constants -real(c_float), parameter :: sdummy = 0 -real(c_double), parameter :: ddummy = 0 -complex(c_float_complex), parameter :: cdummy = 0 -complex(c_double_complex), parameter :: zdummy = 0 -integer(c_int), parameter :: idummy = 0 -type(c_ptr), parameter :: ptr_dummy = c_null_ptr - -!! Intel ifort chokes on c_sizeof here, so use extension sizeof -!! see https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/495001 -integer(c_size_t), parameter :: & - sizeof_real = sizeof(sdummy), & - sizeof_double = sizeof(ddummy), & - sizeof_complex = sizeof(cdummy), & - sizeof_complex16 = sizeof(zdummy), & - sizeof_int = sizeof(idummy), & - sizeof_ptr = sizeof(ptr_dummy) - - -!! ============================================================================= -!! Fortran interfaces to C functions -interface - - !! ------------------------------------------------------------------------- - !! magma_malloc (GPU memory) - integer(c_int) function magmaf_malloc( ptr, bytes ) & - bind(C, name="magma_malloc") - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: bytes - end function - - !! todo imalloc - - integer(c_int) function magmaf_free_internal( ptr, func, file, line ) & - bind(C, name="magma_free_internal") - use iso_c_binding - type(c_ptr), value :: ptr !! void* - character(c_char) :: func, file - integer(c_int), value :: line - end function - - !! ------------------------------------------------------------------------- - !! magma_malloc_cpu (CPU main memory) - !! these are aligned to 32-byte boundary - integer(c_int) function magmaf_malloc_cpu( ptr, bytes ) & - bind(C, name="magma_malloc_cpu") - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: bytes - end function - - !! todo imalloc_cpu - - integer(c_int) function magmaf_free_cpu( ptr ) & - bind(C, name="magma_free_cpu") - use iso_c_binding - type(c_ptr), value :: ptr !! void* - end function - - !! ------------------------------------------------------------------------- - !! magma_malloc_pinned (pinned CPU main memory) - integer(c_int) function magmaf_malloc_pinned( ptr, bytes ) & - bind(C, name="magma_malloc_pinned") - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: bytes - end function - - !! todo imalloc_pinned - - integer(c_int) function magmaf_free_pinned_internal( ptr, func, file, line ) & - bind(C, name="magma_free_pinned_internal") - use iso_c_binding - type(c_ptr), value :: ptr !! void* - character(c_char), value :: func, file - integer(c_int), value :: line - end function - - !! ------------------------------------------------------------------------- - !! set/get - subroutine magmaf_setmatrix_internal( & - m, n, elemsize, hA_src, lda, dB_dst, ldb, queue, func, file, line ) & - bind(C, name="magma_setmatrix_internal") - use iso_c_binding - integer(c_int), value :: m, n, elemsize, lda, ldb - type(c_ptr), value :: hA_src - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - character(c_char), value :: func, file - integer(c_int), value :: line - end subroutine - - subroutine magmaf_getmatrix_internal( & - m, n, elemsize, dA_src, lda, hB_dst, ldb, queue, func, file, line ) & - bind(C, name="magma_getmatrix_internal") - use iso_c_binding - integer(c_int), value :: m, n, elemsize, lda, ldb - type(c_ptr), value :: dA_src - type(c_ptr), value :: hB_dst - type(c_ptr), value :: queue - character(c_char), value :: func, file - integer(c_int), value :: line - end subroutine - - subroutine magmaf_setvector_internal( & - n, elemsize, hx_src, incx, dy_dst, incy, queue, func, file, line ) & - bind(C, name="magma_setvector_internal") - use iso_c_binding - integer(c_int), value :: n, elemsize, incx, incy - type(c_ptr), value :: hx_src - type(c_ptr), value :: dy_dst - type(c_ptr), value :: queue - character(c_char), value :: func, file - integer(c_int), value :: line - end subroutine - - subroutine magmaf_getvector_internal( & - n, elemsize, dx_src, incx, hy_dst, incy, queue, func, file, line ) & - bind(C, name="magma_getvector_internal") - use iso_c_binding - integer(c_int), value :: n, elemsize, incx, incy - type(c_ptr), value :: dx_src - type(c_ptr), value :: hy_dst - type(c_ptr), value :: queue - character(c_char), value :: func, file - integer(c_int), value :: line - end subroutine - -end interface - -!! ============================================================================= -!! Fortran routines & functions -contains - - !! ------------------------------------------------------------------------- - !! malloc wrappers - integer(c_int) function magmaf_imalloc( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_imalloc = magmaf_malloc( ptr, n*sizeof_int ) - end function - - integer(c_int) function magmaf_imalloc_cpu( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_imalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_int ) - end function - - integer(c_int) function magmaf_imalloc_pinned( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_imalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_int ) - end function - - !! ------------------------------------------------------------------------- - !! magma_free wrappers - integer(c_int) function magmaf_free( ptr ) - type(c_ptr) :: ptr - - magmaf_free = magmaf_free_internal( & - ptr, & - "magma_free" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end function - - integer(c_int) function magmaf_free_pinned( ptr ) - type(c_ptr) :: ptr - - magmaf_free_pinned = magmaf_free_internal( & - ptr, & - "magma_free_pinned" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end function - - !! ------------------------------------------------------------------------- - !! set/get wrappers - subroutine magmaf_setmatrix( & - m, n, elemsize, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, elemsize, lda, ldb - type(c_ptr), value :: hA_src - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, elemsize, hA_src, lda, dB_dst, ldb, queue, & - "magma_setmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_getmatrix( & - m, n, elemsize, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, elemsize, lda, ldb - type(c_ptr), value :: dA_src - type(c_ptr), value :: hB_dst - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, elemsize, dA_src, lda, hB_dst, ldb, queue, & - "magma_getmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_setvector( & - n, elemsize, hx_src, incx, dy_dst, incy, queue ) - use iso_c_binding - integer(c_int), value :: n, elemsize, incx, incy - type(c_ptr), value :: hx_src - type(c_ptr), value :: dy_dst - type(c_ptr), value :: queue - - call magmaf_setvector_internal( & - n, elemsize, hx_src, incx, dy_dst, incy, queue, & - "magma_setvector" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_getvector( & - n, elemsize, dx_src, incx, hy_dst, incy, queue ) - use iso_c_binding - integer(c_int), value :: n, elemsize, incx, incy - type(c_ptr), value :: dx_src - type(c_ptr), value :: hy_dst - type(c_ptr), value :: queue - - call magmaf_getvector_internal( & - n, elemsize, dx_src, incx, hy_dst, incy, queue, & - "magma_getvector" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - !! ------------------------------------------------------------------------- - !! set/get wrappers - !! matrices & vectors of integers - subroutine magmaf_isetmatrix( & - m, n, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - integer(c_int), target :: hA_src(lda,*) - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, int(sizeof_int), c_loc(hA_src), lda, dB_dst, ldb, queue, & - "magma_isetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_igetmatrix( & - m, n, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), value :: dA_src - integer(c_int), target :: hB_dst(ldb,*) - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, int(sizeof_int), dA_src, lda, c_loc(hB_dst), ldb, queue, & - "magma_igetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_isetvector( & - n, hx_src, incx, dy_dst, incy, queue ) - use iso_c_binding - integer(c_int), value :: n, incx, incy - integer(c_int), target :: hx_src(*) - type(c_ptr), value :: dy_dst - type(c_ptr), value :: queue - - call magmaf_setvector_internal( & - n, int(sizeof_int), c_loc(hx_src), incx, dy_dst, incy, queue, & - "magma_isetvector" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_igetvector( & - n, dx_src, incx, hy_dst, incy, queue ) - use iso_c_binding - integer(c_int), value :: n, incx, incy - type(c_ptr), value :: dx_src - integer(c_int), target :: hy_dst(*) - type(c_ptr), value :: queue - - call magmaf_getvector_internal( & - n, int(sizeof_int), dx_src, incx, c_loc(hy_dst), incy, queue, & - "magma_igetvector" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - !! ------------------------------------------------------------------------- - !! set/get wrappers - !! matrices & vectors of c_ptr pointers - subroutine magmaf_psetmatrix( & - m, n, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), target :: hA_src(lda,*) - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, int(sizeof_ptr), c_loc(hA_src), lda, dB_dst, ldb, queue, & - "magma_psetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_pgetmatrix( & - m, n, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), value :: dA_src - type(c_ptr), target :: hB_dst(ldb,*) - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, int(sizeof_ptr), dA_src, lda, c_loc(hB_dst), ldb, queue, & - "magma_pgetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_psetvector( & - n, hx_src, incx, dy_dst, incy, queue ) - use iso_c_binding - integer(c_int), value :: n, incx, incy - type(c_ptr), target :: hx_src(*) - type(c_ptr), value :: dy_dst - type(c_ptr), value :: queue - - call magmaf_setvector_internal( & - n, int(sizeof_ptr), c_loc(hx_src), incx, dy_dst, incy, queue, & - "magma_psetvector" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_pgetvector( & - n, dx_src, incx, hy_dst, incy, queue ) - use iso_c_binding - integer(c_int), value :: n, incx, incy - type(c_ptr), value :: dx_src - type(c_ptr), target :: hy_dst(*) - type(c_ptr), value :: queue - - call magmaf_getvector_internal( & - n, int(sizeof_ptr), dx_src, incx, c_loc(hy_dst), incy, queue, & - "magma_pgetvector" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - -end module diff --git a/lib/magma_fmodules/mod_magma_dfortran.F b/lib/magma_fmodules/mod_magma_dfortran.F deleted file mode 100644 index cd50d930a2..0000000000 --- a/lib/magma_fmodules/mod_magma_dfortran.F +++ /dev/null @@ -1,230 +0,0 @@ -!! @generated from magma_zfortran.F90, fortran z -> d, Sat Apr 22 18:54:26 2023 - -module magma_dfortran - -use magma_common -implicit none - -!! ============================================================================= -!! Fortran interfaces to C functions -interface - - !! ------------------------------------------------------------------------- - !! CPU interfaces (matrix in CPU memory) - subroutine magmaf_dgetrf( m, n, A, lda, ipiv, info ) & - bind(C, name="magma_dgetrf") - use iso_c_binding - integer(c_int), value :: m, n, lda - real(c_double), target :: A(lda,*) - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_dpotrf( uplo, n, A, lda, info ) & - bind(C, name="magma_dpotrf") - use iso_c_binding - integer(c_int), value :: uplo - integer(c_int), value :: n, lda - real(c_double), target :: A(lda,*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_dgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_dgeev") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - real(c_double), target :: A(lda,*) - real(c_double), target :: w(*) - real(c_double), target :: VR(ldvr,*), VL(ldvl,*) - real(c_double), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_dgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_dgeev_m") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - real(c_double), target :: A(lda,*) - real(c_double), target :: w(*) - real(c_double), target :: VR(ldvr,*), VL(ldvl,*) - real(c_double), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_dsyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_dsyevd_m") - use iso_c_binding - integer(c_int), value :: ngpu - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, lda, lwork, lrwork, liwork - real(c_double), target :: A(lda,*) - real(c_double), target :: w(*) - real(c_double), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! ------------------------------------------------------------------------- - !! GPU interfaces (matrix in GPU memory) - subroutine magmaf_dgetrf_gpu( m, n, dA, lda, ipiv, info ) & - bind(C, name="magma_dgetrf_gpu") - use iso_c_binding - integer(c_int), value :: m, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_dpotrf_gpu( uplo, n, dA, lda, info ) & - bind(C, name="magma_dpotrf_gpu") - use iso_c_binding - integer(c_int), value :: uplo, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_dsyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_dsyevd_gpu") - use iso_c_binding - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork - type(c_ptr), value :: dA !! double real** - real(c_double), target :: w(*) - real(c_double), target :: wA(*) - real(c_double), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! batched GPU interfaces (all arrays in GPU memory) - subroutine magmaf_dgetrf_batched( & - m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & - bind(C, name="magma_dgetrf_batched") - use iso_c_binding - integer(c_int), value :: m, n, lda, batchcount - type(c_ptr), value :: dA_array !! double_real** - type(c_ptr), value :: ipiv_array !! int** - type(c_ptr), value :: info_array !! int* - type(c_ptr), value :: queue - end subroutine - - !! ------------------------------------------------------------------------- - !! BLAS (matrices in GPU memory) - subroutine magmaf_daxpy( & - n, & - alpha, dx, incx, & - dy, incy, & - queue ) & - bind(C, name="magma_daxpy") - use iso_c_binding - integer(c_int), value :: n, incx, incy - real(c_double), value :: alpha - type(c_ptr), value :: dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_dgemv( & - transA, m, n, & - alpha, dA, lda, & - dx, incx, & - beta, dy, incy, & - queue ) & - bind(C, name="magma_dgemv") - use iso_c_binding - integer(c_int), value :: transA, m, n, lda, incx, incy - real(c_double), value :: alpha, beta - type(c_ptr), value :: dA, dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_dgemm( & - transA, transB, m, n, k, & - alpha, dA, lda, & - dB, ldb, & - beta, dC, ldc, & - queue ) & - bind(C, name="magma_dgemm") - use iso_c_binding - integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc - real(c_double), value :: alpha, beta - type(c_ptr), value :: dA, dB, dC - type(c_ptr), value :: queue !! queue_t - end subroutine - -end interface - -!! ============================================================================= -!! Fortran routines & functions -contains - - !! ------------------------------------------------------------------------- - !! malloc wrappers - integer(c_int) function magmaf_dmalloc( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_dmalloc = magmaf_malloc( ptr, n*sizeof_double ) - end function - - integer(c_int) function magmaf_dmalloc_cpu( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_dmalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_double ) - end function - - integer(c_int) function magmaf_dmalloc_pinned( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_dmalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_double ) - end function - - !! ------------------------------------------------------------------------- - !! set/get wrappers - subroutine magmaf_dsetmatrix( & - m, n, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - real(c_double), target :: hA_src(lda,*) - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, int(sizeof_double), c_loc(hA_src), lda, dB_dst, ldb, queue, & - "magma_dsetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_dgetmatrix( & - m, n, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), value :: dA_src - real(c_double), target :: hB_dst(ldb,*) - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, int(sizeof_double), dA_src, lda, c_loc(hB_dst), ldb, queue, & - "magma_dgetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - -end module diff --git a/lib/magma_fmodules/mod_magma_sfortran.F b/lib/magma_fmodules/mod_magma_sfortran.F deleted file mode 100644 index 6c5aabab16..0000000000 --- a/lib/magma_fmodules/mod_magma_sfortran.F +++ /dev/null @@ -1,230 +0,0 @@ -!! @generated from magma_zfortran.F90, fortran z -> s, Sat Apr 22 18:54:26 2023 - -module magma_sfortran - -use magma_common -implicit none - -!! ============================================================================= -!! Fortran interfaces to C functions -interface - - !! ------------------------------------------------------------------------- - !! CPU interfaces (matrix in CPU memory) - subroutine magmaf_sgetrf( m, n, A, lda, ipiv, info ) & - bind(C, name="magma_sgetrf") - use iso_c_binding - integer(c_int), value :: m, n, lda - real(c_float), target :: A(lda,*) - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_spotrf( uplo, n, A, lda, info ) & - bind(C, name="magma_spotrf") - use iso_c_binding - integer(c_int), value :: uplo - integer(c_int), value :: n, lda - real(c_float), target :: A(lda,*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_sgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_sgeev") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - real(c_float), target :: A(lda,*) - real(c_float), target :: w(*) - real(c_float), target :: VR(ldvr,*), VL(ldvl,*) - real(c_float), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_sgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_sgeev_m") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - real(c_float), target :: A(lda,*) - real(c_float), target :: w(*) - real(c_float), target :: VR(ldvr,*), VL(ldvl,*) - real(c_float), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_ssyevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_ssyevd_m") - use iso_c_binding - integer(c_int), value :: ngpu - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, lda, lwork, lrwork, liwork - real(c_float), target :: A(lda,*) - real(c_float), target :: w(*) - real(c_float), target :: work(*) - real(c_float), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! ------------------------------------------------------------------------- - !! GPU interfaces (matrix in GPU memory) - subroutine magmaf_sgetrf_gpu( m, n, dA, lda, ipiv, info ) & - bind(C, name="magma_sgetrf_gpu") - use iso_c_binding - integer(c_int), value :: m, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_spotrf_gpu( uplo, n, dA, lda, info ) & - bind(C, name="magma_spotrf_gpu") - use iso_c_binding - integer(c_int), value :: uplo, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_ssyevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_ssyevd_gpu") - use iso_c_binding - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork - type(c_ptr), value :: dA !! double real** - real(c_double), target :: w(*) - real(c_float), target :: wA(*) - real(c_float), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! batched GPU interfaces (all arrays in GPU memory) - subroutine magmaf_sgetrf_batched( & - m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & - bind(C, name="magma_sgetrf_batched") - use iso_c_binding - integer(c_int), value :: m, n, lda, batchcount - type(c_ptr), value :: dA_array !! double_real** - type(c_ptr), value :: ipiv_array !! int** - type(c_ptr), value :: info_array !! int* - type(c_ptr), value :: queue - end subroutine - - !! ------------------------------------------------------------------------- - !! BLAS (matrices in GPU memory) - subroutine magmaf_saxpy( & - n, & - alpha, dx, incx, & - dy, incy, & - queue ) & - bind(C, name="magma_saxpy") - use iso_c_binding - integer(c_int), value :: n, incx, incy - real(c_float), value :: alpha - type(c_ptr), value :: dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_sgemv( & - transA, m, n, & - alpha, dA, lda, & - dx, incx, & - beta, dy, incy, & - queue ) & - bind(C, name="magma_sgemv") - use iso_c_binding - integer(c_int), value :: transA, m, n, lda, incx, incy - real(c_float), value :: alpha, beta - type(c_ptr), value :: dA, dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_sgemm( & - transA, transB, m, n, k, & - alpha, dA, lda, & - dB, ldb, & - beta, dC, ldc, & - queue ) & - bind(C, name="magma_sgemm") - use iso_c_binding - integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc - real(c_float), value :: alpha, beta - type(c_ptr), value :: dA, dB, dC - type(c_ptr), value :: queue !! queue_t - end subroutine - -end interface - -!! ============================================================================= -!! Fortran routines & functions -contains - - !! ------------------------------------------------------------------------- - !! malloc wrappers - integer(c_int) function magmaf_smalloc( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_smalloc = magmaf_malloc( ptr, n*sizeof_real ) - end function - - integer(c_int) function magmaf_smalloc_cpu( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_smalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_real ) - end function - - integer(c_int) function magmaf_smalloc_pinned( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_smalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_real ) - end function - - !! ------------------------------------------------------------------------- - !! set/get wrappers - subroutine magmaf_ssetmatrix( & - m, n, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - real(c_float), target :: hA_src(lda,*) - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, int(sizeof_real), c_loc(hA_src), lda, dB_dst, ldb, queue, & - "magma_ssetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_sgetmatrix( & - m, n, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), value :: dA_src - real(c_float), target :: hB_dst(ldb,*) - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, int(sizeof_real), dA_src, lda, c_loc(hB_dst), ldb, queue, & - "magma_sgetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - -end module diff --git a/lib/magma_fmodules/mod_magma_zfortran.F b/lib/magma_fmodules/mod_magma_zfortran.F deleted file mode 100644 index 6a1d76e145..0000000000 --- a/lib/magma_fmodules/mod_magma_zfortran.F +++ /dev/null @@ -1,230 +0,0 @@ -!! @precisions fortran z -> s d c - -module magma_zfortran - -use magma_common -implicit none - -!! ============================================================================= -!! Fortran interfaces to C functions -interface - - !! ------------------------------------------------------------------------- - !! CPU interfaces (matrix in CPU memory) - subroutine magmaf_zgetrf( m, n, A, lda, ipiv, info ) & - bind(C, name="magma_zgetrf") - use iso_c_binding - integer(c_int), value :: m, n, lda - complex(c_double_complex), target :: A(lda,*) - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_zpotrf( uplo, n, A, lda, info ) & - bind(C, name="magma_zpotrf") - use iso_c_binding - integer(c_int), value :: uplo - integer(c_int), value :: n, lda - complex(c_double_complex), target :: A(lda,*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_zgeev( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_zgeev") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - complex(c_double_complex), target :: A(lda,*) - complex(c_double_complex), target :: w(*) - complex(c_double_complex), target :: VR(ldvr,*), VL(ldvl,*) - complex(c_double_complex), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_zgeev_m( jobvl, jobvr, n, A, lda, w, VL, ldvl, VR, ldvr, & - work, lwork, rwork, info) & - bind(C, name="magma_zgeev_m") - use iso_c_binding - integer(c_int), value :: jobvl, jobvr - integer(c_int), value :: n, lda, ldvl, ldvr, lwork - complex(c_double_complex), target :: A(lda,*) - complex(c_double_complex), target :: w(*) - complex(c_double_complex), target :: VR(ldvr,*), VL(ldvl,*) - complex(c_double_complex), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_zheevd_m( ngpu, jobz, uplo, n, A, lda, w, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_zheevd_m") - use iso_c_binding - integer(c_int), value :: ngpu - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, lda, lwork, lrwork, liwork - complex(c_double_complex), target :: A(lda,*) - real(c_double), target :: w(*) - complex(c_double_complex), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! ------------------------------------------------------------------------- - !! GPU interfaces (matrix in GPU memory) - subroutine magmaf_zgetrf_gpu( m, n, dA, lda, ipiv, info ) & - bind(C, name="magma_zgetrf_gpu") - use iso_c_binding - integer(c_int), value :: m, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: ipiv(*) - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_zpotrf_gpu( uplo, n, dA, lda, info ) & - bind(C, name="magma_zpotrf_gpu") - use iso_c_binding - integer(c_int), value :: uplo, n, lda - type(c_ptr), value :: dA - integer(c_int), target :: info !! int* - end subroutine - - subroutine magmaf_zheevd_gpu( jobz, uplo, n, dA, ldda, w, wA, ldwa, work, lwork, & - rwork, lrwork, iwork, liwork, info) & - bind(C, name="magma_zheevd_gpu") - use iso_c_binding - integer(c_int), value :: jobz, uplo - integer(c_int), value :: n, ldda, ldwa, lwork, lrwork, liwork - type(c_ptr), value :: dA !! double complex** - real(c_double), target :: w(*) - complex(c_double_complex), target :: wA(*) - complex(c_double_complex), target :: work(*) - real(c_double), target :: rwork(*) - integer(c_int), target :: iwork(*) - integer(c_int), target :: info !! int* - end subroutine - - !! ------------------------------------------------------------------------- - !! batched GPU interfaces (all arrays in GPU memory) - subroutine magmaf_zgetrf_batched( & - m, n, dA_array, lda, ipiv_array, info_array, batchcount, queue ) & - bind(C, name="magma_zgetrf_batched") - use iso_c_binding - integer(c_int), value :: m, n, lda, batchcount - type(c_ptr), value :: dA_array !! double_complex** - type(c_ptr), value :: ipiv_array !! int** - type(c_ptr), value :: info_array !! int* - type(c_ptr), value :: queue - end subroutine - - !! ------------------------------------------------------------------------- - !! BLAS (matrices in GPU memory) - subroutine magmaf_zaxpy( & - n, & - alpha, dx, incx, & - dy, incy, & - queue ) & - bind(C, name="magma_zaxpy") - use iso_c_binding - integer(c_int), value :: n, incx, incy - complex(c_double_complex), value :: alpha - type(c_ptr), value :: dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_zgemv( & - transA, m, n, & - alpha, dA, lda, & - dx, incx, & - beta, dy, incy, & - queue ) & - bind(C, name="magma_zgemv") - use iso_c_binding - integer(c_int), value :: transA, m, n, lda, incx, incy - complex(c_double_complex), value :: alpha, beta - type(c_ptr), value :: dA, dx, dy - type(c_ptr), value :: queue !! queue_t - end subroutine - - subroutine magmaf_zgemm( & - transA, transB, m, n, k, & - alpha, dA, lda, & - dB, ldb, & - beta, dC, ldc, & - queue ) & - bind(C, name="magma_zgemm") - use iso_c_binding - integer(c_int), value :: transA, transB, m, n, k, lda, ldb, ldc - complex(c_double_complex), value :: alpha, beta - type(c_ptr), value :: dA, dB, dC - type(c_ptr), value :: queue !! queue_t - end subroutine - -end interface - -!! ============================================================================= -!! Fortran routines & functions -contains - - !! ------------------------------------------------------------------------- - !! malloc wrappers - integer(c_int) function magmaf_zmalloc( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_zmalloc = magmaf_malloc( ptr, n*sizeof_complex16 ) - end function - - integer(c_int) function magmaf_zmalloc_cpu( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_zmalloc_cpu = magmaf_malloc_cpu( ptr, n*sizeof_complex16 ) - end function - - integer(c_int) function magmaf_zmalloc_pinned( ptr, n ) - use iso_c_binding - type(c_ptr), target :: ptr !! void** - integer(c_size_t), value :: n - - magmaf_zmalloc_pinned = magmaf_malloc_pinned( ptr, n*sizeof_complex16 ) - end function - - !! ------------------------------------------------------------------------- - !! set/get wrappers - subroutine magmaf_zsetmatrix( & - m, n, hA_src, lda, dB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - complex(c_double_complex), target :: hA_src(lda,*) - type(c_ptr), value :: dB_dst - type(c_ptr), value :: queue - - call magmaf_setmatrix_internal( & - m, n, int(sizeof_complex16), c_loc(hA_src), lda, dB_dst, ldb, queue, & - "magma_zsetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - - subroutine magmaf_zgetmatrix( & - m, n, dA_src, lda, hB_dst, ldb, queue ) - use iso_c_binding - integer(c_int), value :: m, n, lda, ldb - type(c_ptr), value :: dA_src - complex(c_double_complex), target :: hB_dst(ldb,*) - type(c_ptr), value :: queue - - call magmaf_getmatrix_internal( & - m, n, int(sizeof_complex16), dA_src, lda, c_loc(hB_dst), ldb, queue, & - "magma_zgetmatrix" // c_null_char, & - __FILE__ // c_null_char, & - __LINE__ ) - end subroutine - -end module From be0ae5bffa466761f0bc40ea4feb7a45a98f44b8 Mon Sep 17 00:00:00 2001 From: Andrea Ferretti Date: Sat, 8 Mar 2025 20:53:51 +0100 Subject: [PATCH 0908/1367] nternal compilation of magma implemented --- config/m4/magma.m4 | 10 ++++++++++ configure | 13 +++++++++++++ lib/magma/Makefile.loc | 5 +++-- lib/magma/{MGmake.inc_lib => make_magma.inc.in} | 12 ++++++------ 4 files changed, 32 insertions(+), 8 deletions(-) rename lib/magma/{MGmake.inc_lib => make_magma.inc.in} (90%) diff --git a/config/m4/magma.m4 b/config/m4/magma.m4 index bbda28790b..7628bb25a8 100644 --- a/config/m4/magma.m4 +++ b/config/m4/magma.m4 @@ -171,7 +171,17 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then else compile_magma="yes" ; compile_magma_fmodules="no" ; + # + NVIDIA_ARCH= + if test "x$with_cuda_cc" != "x" ; then + if test "$with_cuda_cc" -ge 60 && ! test "$with_cuda_cc" -ge 70 ; then NVIDIA_ARCH=Pascal ; fi + if test "$with_cuda_cc" -ge 70 && ! test "$with_cuda_cc" -ge 80 ; then NVIDIA_ARCH=Volta ; fi + if test "$with_cuda_cc" -ge 80 && ! test "$with_cuda_cc" -ge 90 ; then NVIDIA_ARCH=Hopper ; fi + fi + # AC_MSG_RESULT([Compatible external Magma not found/specified. To be compiled.]) ; + AC_SUBST(NVIDIA_ARCH) + AC_CONFIG_FILES([lib/magma/make_magma.inc:lib/magma/make_magma.inc.in]) fi # fi diff --git a/configure b/configure index 0460f39920..b8af7feab6 100755 --- a/configure +++ b/configure @@ -704,6 +704,7 @@ enable_magma def_magma MAGMA_INCS MAGMA_LIBS +NVIDIA_ARCH with_devxlib_branch DEVXLIB_info internal_devxlib @@ -15947,8 +15948,19 @@ $as_echo "already compiled" >&6; } ; else compile_magma="yes" ; compile_magma_fmodules="no" ; + # + NVIDIA_ARCH= + if test "x$with_cuda_cc" != "x" ; then + if test "$with_cuda_cc" -ge 60 && ! test "$with_cuda_cc" -ge 70 ; then NVIDIA_ARCH=Pascal ; fi + if test "$with_cuda_cc" -ge 70 && ! test "$with_cuda_cc" -ge 80 ; then NVIDIA_ARCH=Volta ; fi + if test "$with_cuda_cc" -ge 80 && ! test "$with_cuda_cc" -ge 90 ; then NVIDIA_ARCH=Hopper ; fi + fi + # { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 $as_echo "Compatible external Magma not found/specified. To be compiled." >&6; } ; + + ac_config_files="$ac_config_files lib/magma/make_magma.inc:lib/magma/make_magma.inc.in" + fi # fi @@ -17402,6 +17414,7 @@ do "lib/fftqe/c_defs.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" ;; "lib/fftqe/fftqe_defs.h") CONFIG_FILES="$CONFIG_FILES lib/fftqe/fftqe_defs.h:lib/fftqe/fftqe_defs.h.in" ;; "lib/iotk/make_iotk.inc") CONFIG_FILES="$CONFIG_FILES lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" ;; + "lib/magma/make_magma.inc") CONFIG_FILES="$CONFIG_FILES lib/magma/make_magma.inc:lib/magma/make_magma.inc.in" ;; "include/headers/common/have_malloc.h") CONFIG_HEADERS="$CONFIG_HEADERS include/headers/common/have_malloc.h:include/headers/common/have_malloc.h.in" ;; "config/setup") CONFIG_FILES="$CONFIG_FILES config/setup" ;; "config/mk/global/defs.mk") CONFIG_FILES="$CONFIG_FILES config/mk/global/defs.mk" ;; diff --git a/lib/magma/Makefile.loc b/lib/magma/Makefile.loc index 78aecaa99d..6703f930a2 100644 --- a/lib/magma/Makefile.loc +++ b/lib/magma/Makefile.loc @@ -25,11 +25,12 @@ configure: uncompress @if test -d $(PACKAGE) && ! test -f configured.stamp ; then \ echo "\t[$(PACKAGE)] configuration"; \ cd $(PACKAGE); \ - cat $(compdir)/config/setup $(srcdir)/lib/magma/MGmake.inc_lib > make.inc ; \ - cp $(srcdir)/lib/magma/Makefile.lib Makefile ; \ + cat $(compdir)/config/setup $(srcdir)/lib/magma/make_magma.inc > make.inc ; \ touch ../configured.stamp;\ fi +# cp $(srcdir)/lib/magma/Makefile.lib Makefile ; \ + compile: uncompress configure @$(call compile) diff --git a/lib/magma/MGmake.inc_lib b/lib/magma/make_magma.inc.in similarity index 90% rename from lib/magma/MGmake.inc_lib rename to lib/magma/make_magma.inc.in index d1f0d64804..6921b5dd21 100644 --- a/lib/magma/MGmake.inc_lib +++ b/lib/magma/make_magma.inc.in @@ -16,8 +16,8 @@ BACKEND ?= cuda # set these to their real paths -CUDADIR ?= $(NVHPC_ROOT)/cuda -ROCM_PATH ?= /opt/rocm +CUDADIR ?= @LIBCUDA_PATH@ +ROCM_PATH ?= @LIBROCM_PATH@ USE_FORTRAN ?=yes @@ -32,7 +32,7 @@ endif # set compilers CC ?= gcc CXX ?= g++ -FORT ?= gfortran +FORT ?= @FC@ HIPCC ?= hipcc NVCC ?= nvcc DEVCC ?= NONE @@ -55,7 +55,7 @@ RANLIB = ranlib # set our GPU targets ifeq ($(BACKEND),cuda) - GPU_TARGET = Volta Turing Ampere + GPU_TARGET = @NVIDIA_ARCH@ else ifeq ($(BACKEND),hip) GPU_TARGET = gfx900 gfx906 gfx908 endif @@ -67,8 +67,8 @@ FPIC = -fPIC # now, generate our flags CFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -fopenmp -std=c99 CXXFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -fopenmp -std=c++11 -FFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -Wno-unused-dummy-argument -F90FLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ -Wall -Wno-unused-dummy-argument -x f95-cpp-input +FFLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ +F90FLAGS = -O3 $(FPIC) -DNDEBUG -DADD_ LDFLAGS = $(FPIC) -fopenmp DEVCCFLAGS = -O3 -DNDEBUG -DADD_ From f5357c992d044b69ccbf652e1411ffa1e8cba234 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 9 Mar 2025 15:40:55 +0100 Subject: [PATCH 0909/1367] Version 5.3.0, Revision 24489, Hash 61de44d824 MODIFIED * configure include/version/version.m4 real_time_hamiltonian/RT_gradk_rho_times_E.F Changes: - Saving local changes Patch sent by: Davide Sangalli --- configure | 22 ++-- include/version/version.m4 | 6 +- .../RT_gradk_rho_times_E.F | 123 +++++++++--------- 3 files changed, 73 insertions(+), 78 deletions(-) diff --git a/configure b/configure index 4b7cc39503..94394a1fa2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24488 h.b1abce6119. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24489 h.61de44d824. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24488 h.b1abce6119' -PACKAGE_STRING='Yambo 5.3.0 r.24488 h.b1abce6119' +PACKAGE_VERSION='5.3.0 r.24489 h.61de44d824' +PACKAGE_STRING='Yambo 5.3.0 r.24489 h.61de44d824' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24488 h.b1abce6119 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24489 h.61de44d824 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24488 h.b1abce6119:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24489 h.61de44d824:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24488 h.b1abce6119 +Yambo configure 5.3.0 r.24489 h.61de44d824 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24488 h.b1abce6119, which was +It was created by Yambo $as_me 5.3.0 r.24489 h.61de44d824, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24488" -SHASH="b1abce6119" +SREVISION="24489" +SHASH="61de44d824" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24488 h.b1abce6119, which was +This file was extended by Yambo $as_me 5.3.0 r.24489 h.61de44d824, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24488 h.b1abce6119 +Yambo config.status 5.3.0 r.24489 h.61de44d824 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 8060b5f15c..4fcb08e7e6 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24488 h.b1abce6119, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24489 h.61de44d824, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24488" -SHASH="b1abce6119" +SREVISION="24489" +SHASH="61de44d824" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index 395336e2bf..af8138181b 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -280,22 +280,20 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! ikbz=Xk%k_table(ik,1) ! - if (l_svd) then - ! - call degeneration_finder(Xen%E(nb(1):nb(2),ik,i_sp_pol),nb(2)-nb(1)+1,& - & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) - ! - deg_table_k=.false. - do i_grp=1,n_deg_grp_k - do ib=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 - do ibp=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 - deg_table_k(ib,ibp)=.true. - deg_table_k(ibp,ib)=.true. - enddo + ! define degeneration table at ik + ! + call degeneration_finder(Xen%E(nb(1):nb(2),ik,i_sp_pol),nb(2)-nb(1)+1,& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp_k + do ib=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + deg_table_k(ib,ibp)=.true. + deg_table_k(ibp,ib)=.true. enddo enddo - ! - endif + enddo ! gradk_rho=cZERO ! @@ -330,27 +328,24 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ikp1_ibz=Xk%sstar(ikp1,1) ikp1_is =Xk%sstar(ikp1,2) ! - !S_tmp(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) ! g+(k) - !S_tmp(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) ! g-(k)=g+(k-q) + Sm_kpq(:,:)=hermitian(DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! (g-(k+q))= g+(k)\dag + Sp_kmq(:,:)= DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) =(g-(k)\dag) ! - !S_kpq(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikp1,i_sp_pol) ! g+(k+q) - Sm_kpq(:,:)=hermitian(DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! (g-(k+q)=) g+(k)\dag + ! k+q part + ! Disconnect non connected blocks + call zeroing_disconnected_blocks(Xen,Xk,RT_bands,ikp1,i_sp_pol,& + & deg_table_k,deg_thresh,Sm_kpq,gm_kpq) + ! Perform SVD + call SERIAL_SVD(nb(2)-nb(1)+1,Sm_kpq,'uni',0) ! - Sp_kmq(:,:)= DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) (=g-(k)\dag) - !S_kmq(:,:,2)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm2,i_sp_pol)) ! g-(k-q)=g+(k-2*q) - ! - if (l_svd) then - call zeroing_disconnected_blocks(Xen,Xk,RT_bands,ikp1,i_sp_pol,& - & deg_table_k,deg_thresh,Sm_kpq,gm_kpq) - call SERIAL_SVD(nb(2)-nb(1)+1,Sm_kpq,'uni',0) - call zeroing_disconnected_blocks(Xen,Xk,RT_Bands,ikm1,i_sp_pol,& - & deg_table_k,deg_thresh,Sp_kmq,gp_kmq) - call SERIAL_SVD(nb(2)-nb(1)+1,Sp_kmq,'uni',0) - else - gm_kpq=Sm_kpq - gp_kmq=Sp_kmq - endif + ! k-q part + ! Disconnect non connected blocks + call zeroing_disconnected_blocks(Xen,Xk,RT_Bands,ikm1,i_sp_pol,& + & deg_table_k,deg_thresh,Sp_kmq,gp_kmq) + ! Perform SVD + call SERIAL_SVD(nb(2)-nb(1)+1,Sp_kmq,'uni',0) ! + ! define M matrix do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) Mp_kmq(ib1,ib2,:,:)=conjg(gp_kmq(ib1,ib2))*gp_kmq(:,:) @@ -360,42 +355,42 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! if (l_dips_term) then ! - ! I need to rotate the dipoles in k-space, - ! and then project them along the id_red direction - ! Note: this term is quitre slow. - ! Pre-expanding the dipoles with the old - ! DIPOLE expand wuold speed-up this part - ! - DIP_km=cZERO - DIP_kp=cZERO - do ib1=RT_bands(1),RT_bands(2) - do jb1=RT_bands(1),RT_bands(2) - call DIPOLE_rotate(jb1,ib1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) - call DIPOLE_rotate(jb1,ib1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) - ! DEBUG lines to verify the time gain when non-expanding on the fly - !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) - !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) - ! As always in yambo, band indexes are inverted in the dipoles - do idir=1,3 - DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir) - DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir) + ! I need to rotate the dipoles in k-space, + ! and then project them along the id_red direction + ! Note: this term is quitre slow. + ! Pre-expanding the dipoles with the old + ! DIPOLE expand wuold speed-up this part + ! + DIP_km=cZERO + DIP_kp=cZERO + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + call DIPOLE_rotate(jb1,ib1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) + call DIPOLE_rotate(jb1,ib1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles + do idir=1,3 + DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir) + DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir) + enddo enddo enddo - enddo - ! - ! - do ib1=RT_bands(1),RT_bands(2) - do jb1=RT_bands(1),RT_bands(2) - do ib2=RT_bands(1),RT_bands(2) - !A1_ll' ib1=l jb1=l' ib2=s - A1p_kmq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikm1_ibz)*conjg(DIP_km(ib2,ib1)) - A1m_kpq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikp1_ibz)*conjg(DIP_kp(ib2,ib1)) - !A2_ll' ib1=l jb1=l' ib2=s - A2p_kmq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikm1_ibz)* DIP_km(ib2,jb1) - A2m_kpq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikp1_ibz)* DIP_kp(ib2,jb1) + ! + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + !A1_ll' ib1=l jb1=l' ib2=s + A1p_kmq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikm1_ibz)*conjg(DIP_km(ib2,ib1)) + A1m_kpq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikp1_ibz)*conjg(DIP_kp(ib2,ib1)) + !A2_ll' ib1=l jb1=l' ib2=s + A2p_kmq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikm1_ibz)* DIP_km(ib2,jb1) + A2m_kpq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikp1_ibz)* DIP_kp(ib2,jb1) + enddo enddo enddo - enddo ! else ! From 060dcb61a9511415212489d1acb342f0dac5beb1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Mar 2025 04:02:28 +0100 Subject: [PATCH 0910/1367] Version 5.3.0, Revision 24492, Hash 4fe250385e MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_setup.F Bugs: - fixed typo Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_setup.F | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 94394a1fa2..822cf23352 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24489 h.61de44d824. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24492 h.4fe250385e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24489 h.61de44d824' -PACKAGE_STRING='Yambo 5.3.0 r.24489 h.61de44d824' +PACKAGE_VERSION='5.3.0 r.24492 h.4fe250385e' +PACKAGE_STRING='Yambo 5.3.0 r.24492 h.4fe250385e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24489 h.61de44d824 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24492 h.4fe250385e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24489 h.61de44d824:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24492 h.4fe250385e:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24489 h.61de44d824 +Yambo configure 5.3.0 r.24492 h.4fe250385e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24489 h.61de44d824, which was +It was created by Yambo $as_me 5.3.0 r.24492 h.4fe250385e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24489" -SHASH="61de44d824" +SREVISION="24492" +SHASH="4fe250385e" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24489 h.61de44d824, which was +This file was extended by Yambo $as_me 5.3.0 r.24492 h.4fe250385e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24489 h.61de44d824 +Yambo config.status 5.3.0 r.24492 h.4fe250385e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 4fcb08e7e6..211a7930db 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24489 h.61de44d824, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24492 h.4fe250385e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24489" -SHASH="61de44d824" +SREVISION="24492" +SHASH="4fe250385e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index c11886dc99..bfc7a7583e 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -147,8 +147,8 @@ subroutine DIPOLE_setup(Dip) !--------------------- Dip%computed=" " if (len_trim(x_space_obs ) >0) Dip%computed=trim(x_space_obs)//" [X-space]" - if (len_trim(covariant_obs) >0) Dip%computed=trim(covariant_obs)//" [covarian]" - if (len_trim(der_k_obs) >0) Dip%computed=trim(der_k_obs)//" [covarian]" + if (len_trim(covariant_obs) >0) Dip%computed=trim(covariant_obs)//" [covariant]" + if (len_trim(der_k_obs) >0) Dip%computed=trim(der_k_obs)//" [derk]" if (len_trim(shifted_grids_obs)>0) Dip%computed=trim(shifted_grids_obs)//" [shift-grids]" if (len_trim(Dip%computed)==0) then Dip%computed=trim(g_space_obs)//" [G-space]" From 6e5c730eb4f81ab91fc24f54f0d4b992d5ed1c39 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 26 Mar 2025 23:03:28 +0100 Subject: [PATCH 0911/1367] Version 5.3.0, Revision 24493, Hash 060dcb61a9 MODIFIED * configure include/version/version.m4 ypp/k-points/k_grid_printer.F ypp/k-points/k_grids.F Bugs: - Addressing issue https://github.com/yambo-code/yambo/issues/202 Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- ypp/k-points/k_grid_printer.F | 6 ++++++ ypp/k-points/k_grids.F | 12 +++++++++--- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 822cf23352..399e089ba5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24492 h.4fe250385e. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24493 h.060dcb61a9. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24492 h.4fe250385e' -PACKAGE_STRING='Yambo 5.3.0 r.24492 h.4fe250385e' +PACKAGE_VERSION='5.3.0 r.24493 h.060dcb61a9' +PACKAGE_STRING='Yambo 5.3.0 r.24493 h.060dcb61a9' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24492 h.4fe250385e to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24493 h.060dcb61a9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24492 h.4fe250385e:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24493 h.060dcb61a9:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24492 h.4fe250385e +Yambo configure 5.3.0 r.24493 h.060dcb61a9 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24492 h.4fe250385e, which was +It was created by Yambo $as_me 5.3.0 r.24493 h.060dcb61a9, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24492" -SHASH="4fe250385e" +SREVISION="24493" +SHASH="060dcb61a9" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24492 h.4fe250385e, which was +This file was extended by Yambo $as_me 5.3.0 r.24493 h.060dcb61a9, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24492 h.4fe250385e +Yambo config.status 5.3.0 r.24493 h.060dcb61a9 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 211a7930db..540c385372 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24492 h.4fe250385e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24493 h.060dcb61a9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24492" -SHASH="4fe250385e" +SREVISION="24493" +SHASH="060dcb61a9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/k-points/k_grid_printer.F b/ypp/k-points/k_grid_printer.F index 44fd17734c..df9bf70384 100644 --- a/ypp/k-points/k_grid_printer.F +++ b/ypp/k-points/k_grid_printer.F @@ -40,14 +40,20 @@ subroutine k_grid_printer(nk,k,coo_in,form,wk,coo_out) do ik=1,nk ! v=k(ik,:) + ! Transform points in iku from coo_in. if (trim(coo_in)=="rlu") call c2a(v_in=v,mode="ka2i") if (trim(coo_in)=="cc") call c2a(v_in=v,mode="kc2i") + if (trim(coo_in)=="alat") then + v=v/(alat_used_for_output/2./pi) + call c2a(v_in=v,mode="kc2i") + endif ! weight=1._SP if (present(wk)) then weight=wk(ik) endif ! + ! Transform points from iku to coo_out if (present(coo_out)) then if (trim(coo_out)=="rlu") call c2a(v_in=v,mode="ki2a") if (trim(coo_out)=="cc" ) call c2a(v_in=v,mode="ki2c") diff --git a/ypp/k-points/k_grids.F b/ypp/k-points/k_grids.F index 0089bf1c12..8861ae7ef3 100644 --- a/ypp/k-points/k_grids.F +++ b/ypp/k-points/k_grids.F @@ -194,10 +194,16 @@ subroutine k_grids(en,k,Xk,q) endif ! if (l_shifted_grid) then + ! + call section('=',"== Built-in IBZ K-grid ["//trim(coo_out)//"] ==") + YAMBO_ALLOC(BZ_weights,(Xk%nibz)) + BZ_weights(:)=Xk%weights(:)*real(Xk%nbz,SP) + call k_grid_printer(Xk%nibz,Xk%pt,'iku',"PW",wk=BZ_weights) + YAMBO_FREE(BZ_weights) ! ! Generate shifted k-points set for dipole calculation ! - call section('=',"== Shifted grids generator ==") + call section('=',"== Shifted grids generator ==") !================================================ ! if(any(abs(U_q_shifts)/=0._SP)) then @@ -222,7 +228,7 @@ subroutine k_grids(en,k,Xk,q) ! i2 = i2 + 1 ! - ! Convert U_q_shifts[iku] to coo_in + ! Convert U_q_shifts[iku] to coo_out ! call K_transform(q0,trim(coo_in)) ! @@ -241,7 +247,7 @@ subroutine k_grids(en,k,Xk,q) ! enddo ! - call k_grid_printer(Xk%nibz,k_plus_q,trim(coo_out),"none") + call k_grid_printer(Xk%nibz,k_plus_q,trim(coo_out),"PW") ! enddo ! From 37d9f9dd2d75c8993b47b774de641b0ab93c3f06 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 27 Mar 2025 01:07:15 +0100 Subject: [PATCH 0912/1367] Version 5.3.0, Revision 24494, Hash 6e5c730eb4 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_setup.F dipoles/DIPOLE_shifted_grids.F Changes: - Dipoles shifted grids coded in derk form Patch sent by: Davide Sangalli --- configure | 22 +- include/version/version.m4 | 6 +- src/dipoles/DIPOLE_setup.F | 6 +- src/dipoles/DIPOLE_shifted_grids.F | 362 ++++++++++++++++++++++++++++- 4 files changed, 375 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 399e089ba5..88ce77bb94 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24493 h.060dcb61a9. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24494 h.6e5c730eb4. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24493 h.060dcb61a9' -PACKAGE_STRING='Yambo 5.3.0 r.24493 h.060dcb61a9' +PACKAGE_VERSION='5.3.0 r.24494 h.6e5c730eb4' +PACKAGE_STRING='Yambo 5.3.0 r.24494 h.6e5c730eb4' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24493 h.060dcb61a9 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24494 h.6e5c730eb4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24493 h.060dcb61a9:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24494 h.6e5c730eb4:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24493 h.060dcb61a9 +Yambo configure 5.3.0 r.24494 h.6e5c730eb4 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24493 h.060dcb61a9, which was +It was created by Yambo $as_me 5.3.0 r.24494 h.6e5c730eb4, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24493" -SHASH="060dcb61a9" +SREVISION="24494" +SHASH="6e5c730eb4" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24493 h.060dcb61a9, which was +This file was extended by Yambo $as_me 5.3.0 r.24494 h.6e5c730eb4, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24493 h.060dcb61a9 +Yambo config.status 5.3.0 r.24494 h.6e5c730eb4 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 540c385372..51cc2fc302 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24493 h.060dcb61a9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24494 h.6e5c730eb4, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24493" -SHASH="060dcb61a9" +SREVISION="24494" +SHASH="6e5c730eb4" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index bfc7a7583e..c42d394ee6 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -118,9 +118,11 @@ subroutine DIPOLE_setup(Dip) #if defined _RT if (l_real_time) then g_space_obs=trim(g_space_obs)//" P2" + else +#endif + if (STRING_match(Dip%computed,"p2")) g_space_obs=trim(g_space_obs)//" P2" +#if defined _RT endif -#else - if (STRING_match(Dip%computed,"p2")) g_space_obs=trim(g_space_obs)//" P2" #endif ! ! ... P_spinor diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 3c36d8ff36..3ea5d124c6 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -7,7 +7,7 @@ ! #include ! -subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) +subroutine DIPOLE_shifted_grids_old(Xen,Xk,Dip) ! ! Using the wfc at the k,k-q points to construct ! @@ -228,7 +228,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! enddo ! - DIP_S(ic,in_d)=rho/q0_shift_norm + DIP_S(ic,in_d)=rho ! call live_timing(steps=1) ! @@ -262,7 +262,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! if (abs(Ev_m_Ec_KS)>Dip%Energy_threshold) then do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)+DIP_S(ic,in_d)*DIP_O(in_d,iv) + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)+DIP_S(ic,in_d)*DIP_O(in_d,iv)/q0_shift_norm enddo else ! This part needs to be fixed @@ -270,7 +270,11 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) DIP_D(1)=DIP_S(ic,in_d)-DIP_O(ic,in_d) DIP_D(2)=DIP_S(iv,in_d)-DIP_O(iv,in_d) DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol) & - & +(DIP_D(1)*DIP_O(in_d,iv)-conjg(DIP_O(in_d,ic)*DIP_D(2)))/2._SP + & +(DIP_D(1)*DIP_O(in_d,iv)-conjg(DIP_O(in_d,ic)*DIP_D(2)))/2._SP/q0_shift_norm + ! This is the equation according to the notes. + ! However it looks like here DIP_O = O^\dag + ! In case the above equation is the correct one + !& +(DIP_D(1)*conjg(DIP_O(iv,in_d))-DIP_O(ic,in_d)*conjg(DIP_D(2)))/2._SP/q0_shift_norm enddo endif ! @@ -366,4 +370,352 @@ subroutine set_parms(grid,command) return end subroutine set_parms ! -end subroutine DIPOLE_shifted_grids +end subroutine DIPOLE_shifted_grids_old +! +! +subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) + ! + ! Using the wfc at the k,k-q points to construct + ! + ! i q. = \sum_i=1,3 q(i) /q0(i) + ! + use units, ONLY:HA2EV + use pars, ONLY:SP,cZERO,cONE,lchlen,schlen + use drivers, ONLY:l_sc_run + use com, ONLY:msg,core_io_path,grid_paths + use stderr, ONLY:intc,STRING_split + use LIVE_t, ONLY:live_timing + use electrons, ONLY:levels,n_spinor,n_sp_pol + use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& + & PAR_IND_VAL_BANDS_DIP,PAR_IND_VAL_BANDS_DIP_ID,& + & PAR_IND_CON_BANDS_DIP,PAR_IND_CON_BANDS_DIP_ID + use interfaces, ONLY:WF_load,WF_free,io_DB1_selective_scan + use R_lattice, ONLY:bz_samp,nkibz,q0_shift_norm + use X_m, ONLY:l_X_terminator + use DIPOLES, ONLY:DIPOLE_t,DIP_iR,DIP_v,num_shifted_grids,shifted_grids_obs + use vec_operate, ONLY:degeneration_finder + use matrix_operate, ONLY:hermitian + use timing_m, ONLY:timing + use wrapper, ONLY:Vstar_dot_V_gpu + use wave_func, ONLY:wf_ng,wf_igk,WF,wf_ncx,WAVEs +#if defined _SC + use SC, ONLY:SC_bands +#endif +#if defined _RT + use real_time, ONLY:RT_bands +#endif + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + type(DIPOLE_t),intent(inout) :: Dip + ! + ! Saves + ! + integer :: wf_ng_save + character(lchlen) :: core_io_path_save + integer :: nkibz_save, wf_ncx_save, wf_ncx_shifted, nkibz_shifted + integer :: wf_ng_eff, wf_ng_shifted +#if defined _SC + integer :: SC_bands_save(2) +#endif +#if defined _RT + integer :: RT_bands_save(2) +#endif + ! + ! Work Space + ! + character(schlen) :: grid_paths_vector(3) + logical :: idir_not_done(3) + integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,in_d,in_dp,iq,n_LT_steps,& + & i_spinor,i_sp_pol,ir,grid_order(3),ic_min + integer :: first_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_of_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_deg_grp + complex(SP) :: rho,& + & Identity(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& + & DIP_S(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& + & DIP_O(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)),& + & DIP_Q(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)),& + & Der_k(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)) + real(SP) :: Ev_m_Ec_KS,q_mod(3) + logical :: deg_table_k(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)) + ! + !ioDB1 shifted grids + ! + type(levels) :: E_shift(3) + type(bz_samp) :: Xk_shift + type(WAVEs) :: WF_shifted + ! + !I/O and external functions + ! + integer :: io_err(3) + ! + call timing("DIPOLE_shifted_grids",OPR="start") + ! + call set_parms(grid=' local', command=' define') + ! + if (wf_ng.lt.0.8_SP*maxval(wf_igk)) & + & call warning('All/most WF G-vectors should be used in the case of shifted grids') + ! + grid_paths_vector=' ' + call STRING_split(grid_paths,grid_paths_vector) + ! + num_shifted_grids=0 + do iq=1,3 + if(trim(grid_paths_vector(iq))/=' ') num_shifted_grids=num_shifted_grids+1 + enddo + ! + if(num_shifted_grids==0) call error(' No shifted grid specified in input') + ! + ! Check grids and determine grid displacement + ! + grid_order=0 + ! + if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. + ! if (STRING_match(shifted_grids_obs,"V")) Dip%Vnl_included=.true. + ! + if ( .not.all(PAR_IND_VAL_BANDS_DIP%element_1D(Dip%ib(1):Dip%ib_lim(1))) ) & + & call error(' DIPOLES Parallelization over v bands not accepted') + ! + idir_not_done=.true. + ! + do iq =1,num_shifted_grids + ! + call msg('s','loading info from '//trim(grid_paths_vector(iq))//' ') + ! + io_err(iq)=io_DB1_selective_scan('all',trim(grid_paths_vector(iq)),E_shift(iq),Xk_shift) + call set_parms(grid='shifted',command=' define') + ! + E_shift(iq)%E=E_shift(iq)%E-Xen%E_Fermi + ! + if (io_err(iq)/=0) call error(' Shifted grid not found in folder "'//trim(grid_paths_vector(iq))//'" ') + ! + if (nkibz_save/=nkibz_shifted) & + & call error(' Shifted grid in folder "'//trim(grid_paths_vector(iq))//'": k-points not consistent') + ! + if (wf_ncx_save/=wf_ncx_shifted) & + & call warning(' Shifted grid in folder "'//trim(grid_paths_vector(iq))//'": change in number of WFs components') + ! + call DIPOLE_check_shifted_grids( Xk_shift, Xk, iq, num_shifted_grids, q_mod, grid_order) + ! + idir_not_done(grid_order(iq))=.false. + ! + enddo + ! + call msg('r','Shifted grids found '//trim(intc(num_shifted_grids))) + ! + if (num_shifted_grids<3) call warning(' Shifted grids are '//trim(intc(num_shifted_grids))//'. Assuming non periodic system.') + ! + n_LT_steps=n_sp_pol*PAR_IND_DIPk_ibz%n_of_elements(PAR_IND_DIPk_ibz_ID+1)*& + & PAR_IND_VAL_BANDS_DIP%n_of_elements(PAR_IND_VAL_BANDS_DIP_ID+1)*& + & PAR_IND_CON_BANDS_DIP%n_of_elements(PAR_IND_CON_BANDS_DIP_ID+1)*num_shifted_grids + ! + call live_timing(trim(shifted_grids_obs)//" [shifted grids]",n_LT_steps) + ! + Identity=cZERO + do in_d=Dip%ib(1),Dip%ib_lim(1) + Identity(in_d,in_d)=cONE + enddo + ! + do i_sp_pol = 1,n_sp_pol + ! + do ik = 1, Xk%nibz + ! + if (.not.PAR_IND_DIPk_ibz%element_1D(ik)) cycle + ! + ik_mem=PAR_DIPk_ibz_index(ik) + ! + ! Load WFs first at k and then at k+q_iq + ! + call WF_load(WF,0,1,Dip%ib,(/ik,ik/),sp_pol_to_load=(/i_sp_pol,i_sp_pol/),space='G',& + & title='-Oscillators/G space/Shifted',force_WFo=l_sc_run,keep_states_to_load=.TRUE.) + ! + call degeneration_finder(Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),Dip%ib_lim(1)-Dip%ib(1)+1,& + & first_el,n_of_el,n_deg_grp,Dip%Energy_threshold,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+Dip%ib(1)-1+n_of_el(i_grp)-1 + do in_dp=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+Dip%ib(1)-1+n_of_el(i_grp)-1 + deg_table_k(in_d,in_dp)=.true. + deg_table_k(in_dp,in_d)=.true. + enddo + enddo + enddo + ! + do iq = 1, num_shifted_grids + ! + ir = grid_order(iq) + ! + core_io_path = trim(grid_paths_vector(iq)) + ! + call WF_load(WF_shifted,0,1,(/Dip%ib(1),Dip%ib_lim(1)/),(/ik,ik/),space='G',& + & title='-Oscillators/G space (shifted grid)',keep_states_to_load=.TRUE.) + ! + wf_ng_eff = min(wf_ng_save,wf_ng_shifted) + ! + DIP_S=cZERO + ! + ! Notice that here I sum over the shifted subspace, assuming that it has equal or less degeneracies than the non shifted subspace + ! + do i_grp=1,n_deg_grp + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + ! + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(in_d)) cycle + ! + iv_wf_sh=WF_shifted%index(in_d,ik,i_sp_pol) + ! + if (iv_wf_sh==0) call error(" Error in parallel wf_shifted distribution (Dipole iv)") + ! + iv=in_d + ! + ! loop over conduction + ! + ic_min=max(in_d,Dip%ib_lim(2)) + if (l_X_terminator) ic_min=in_d + ! + do ic=ic_min,Dip%ib(2) + ! + if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle + ! + rho=cZERO + ! + ic_wf=WF%index(ic,ik,i_sp_pol) + ! + if (ic_wf==0) call error(" Error in parallel wf distribution (Dipole ic)") + ! + ! rho = < c,k | v,k+q > + ! + do i_spinor=1,n_spinor + ! + rho = rho + Vstar_dot_V_gpu(wf_ng_eff,DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,ic_wf), & + & DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh)) + ! + enddo + ! + DIP_S(ic,in_d)=rho + ! + call live_timing(steps=1) + ! + enddo ! ic + enddo ! in_d in i_grp + enddo ! i_grp + ! + DIP_O=DIP_S + do in_d=Dip%ib(1),Dip%ib_lim(1) + do in_dp=Dip%ib(1),Dip%ib_lim(1) + if(deg_table_k(in_d,in_dp)) cycle + DIP_O(in_d,in_dp)=cZERO + enddo + enddo + DIP_Q=DIP_O + call SERIAL_SVD(Dip%ib(2)-Dip%ib_lim(2),DIP_Q,'uni',0) + ! + ! Yambo version + Der_k=(matmul(DIP_S,hermitian(DIP_Q) )-Identity)/q0_shift_norm + ! Virk-Sipe version + !Der_k=(matmul((DIP_S-DIP_O),hermitian(DIP_Q) )-Identity)/q0_shift_norm + ! + do i_grp=1,n_deg_grp + do iv=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + ! + ic_min=max(iv,Dip%ib_lim(2)) + if (l_X_terminator) ic_min=iv + ! + do ic=ic_min,Dip%ib(2) + ! + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=Der_k(ic,iv) + ! + !===== + ! + !===== + if(.not.Dip%force_v_g_space) then + DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS + if (iv==ic) then + DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm + endif + ! All the diagonal dipoles are identical to the case where the evaluation is directly done in G-space + ! The only exception are the degenerate subspaces which in G-space have an extra contribution + ! To check if something on the line below here can give that + !if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold) then + ! DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + ! & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm*abs(DIP_O(ic,iv))**2 + !endif + endif + ! + enddo + ! + enddo + enddo + ! + call WF_free(WF_shifted) + ! + enddo ! iq / ir + ! + core_io_path = trim(core_io_path_save) + ! + call WF_free(WF) + ! + enddo ! ik + ! + enddo ! i_sp_pol + ! + call live_timing() + ! + ! CLEAN + ! + call DB1_reset() + ! + if (any(idir_not_done)) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) + ! + call timing("DIPOLE_shifted_grids",OPR="stop") + ! + contains + ! + subroutine DB1_reset() + ! + ! Reload g_vec, dl_sop ... from db1 using _shift types + ! so that all type components (like occupations) are + ! not rewritten. + ! + core_io_path = core_io_path_save + io_err(1)=io_DB1_selective_scan('all',trim(core_io_path),E_shift(1),Xk_shift) + ! + call set_parms(grid=' local', command=' reset') + ! + end subroutine + ! + subroutine set_parms(grid,command) + implicit none + character(len=7), intent(in), optional :: grid, command + ! + if( grid.eq.' local'.and. command.eq.' define') then + nkibz_save = nkibz + wf_ncx_save = wf_ncx + wf_ng_save = wf_ng + core_io_path_save = core_io_path +#if defined _SC + SC_bands_save = SC_bands +#endif +#if defined _RT + RT_bands_save = RT_bands +#endif + else if( grid.eq.'shifted'.and. command.eq.' define') then + nkibz_shifted = nkibz + wf_ncx_shifted = wf_ncx + wf_ng_shifted = wf_ng + else if( grid.eq.' local'.and. command.eq.' reset') then + core_io_path = core_io_path_save + wf_ng = wf_ng_save +#if defined _SC + SC_bands = SC_bands_save +#endif +#if defined _RT + RT_bands = RT_bands_save +#endif + endif + return + end subroutine set_parms + ! + end subroutine DIPOLE_shifted_grids \ No newline at end of file From 3ab512a2af855639ffef94f78a63bbf72f989afc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 31 Mar 2025 23:03:51 +0200 Subject: [PATCH 0913/1367] Version 5.3.0, Revision 24495, Hash 37d9f9dd2d MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_shifted_grids.F Changes: - [dipoles] saving local changes Patch sent by: Davide Sangalli --- configure | 22 ++++++++++---------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_shifted_grids.F | 33 ++++++++++++++++-------------- 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 88ce77bb94..f7304dbaa5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24494 h.6e5c730eb4. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24495 h.37d9f9dd2d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24494 h.6e5c730eb4' -PACKAGE_STRING='Yambo 5.3.0 r.24494 h.6e5c730eb4' +PACKAGE_VERSION='5.3.0 r.24495 h.37d9f9dd2d' +PACKAGE_STRING='Yambo 5.3.0 r.24495 h.37d9f9dd2d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24494 h.6e5c730eb4 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24495 h.37d9f9dd2d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24494 h.6e5c730eb4:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24495 h.37d9f9dd2d:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24494 h.6e5c730eb4 +Yambo configure 5.3.0 r.24495 h.37d9f9dd2d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24494 h.6e5c730eb4, which was +It was created by Yambo $as_me 5.3.0 r.24495 h.37d9f9dd2d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24494" -SHASH="6e5c730eb4" +SREVISION="24495" +SHASH="37d9f9dd2d" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24494 h.6e5c730eb4, which was +This file was extended by Yambo $as_me 5.3.0 r.24495 h.37d9f9dd2d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24494 h.6e5c730eb4 +Yambo config.status 5.3.0 r.24495 h.37d9f9dd2d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 51cc2fc302..661e99c23b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24494 h.6e5c730eb4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24495 h.37d9f9dd2d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24494" -SHASH="6e5c730eb4" +SREVISION="24495" +SHASH="37d9f9dd2d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 3ea5d124c6..f3ba7e43e3 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -267,14 +267,15 @@ subroutine DIPOLE_shifted_grids_old(Xen,Xk,Dip) else ! This part needs to be fixed do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - DIP_D(1)=DIP_S(ic,in_d)-DIP_O(ic,in_d) - DIP_D(2)=DIP_S(iv,in_d)-DIP_O(iv,in_d) - DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol) & - & +(DIP_D(1)*DIP_O(in_d,iv)-conjg(DIP_O(in_d,ic)*DIP_D(2)))/2._SP/q0_shift_norm - ! This is the equation according to the notes. - ! However it looks like here DIP_O = O^\dag - ! In case the above equation is the correct one - !& +(DIP_D(1)*conjg(DIP_O(iv,in_d))-DIP_O(ic,in_d)*conjg(DIP_D(2)))/2._SP/q0_shift_norm + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=cZERO + !DIP_D(1)=DIP_S(ic,in_d)-DIP_O(ic,in_d) + !DIP_D(2)=DIP_S(iv,in_d)-DIP_O(iv,in_d) + !DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol) & + !& +(DIP_D(1)*DIP_O(in_d,iv)-conjg(DIP_O(in_d,ic)*DIP_D(2)))/2._SP/q0_shift_norm + !! This is the equation according to the notes. + !! However it looks like here DIP_O = O^\dag + !! In case the above equation is the correct one + !!& +(DIP_D(1)*conjg(DIP_O(iv,in_d))-DIP_O(ic,in_d)*conjg(DIP_D(2)))/2._SP/q0_shift_norm enddo endif ! @@ -380,7 +381,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! i q. = \sum_i=1,3 q(i) /q0(i) ! use units, ONLY:HA2EV - use pars, ONLY:SP,cZERO,cONE,lchlen,schlen + use pars, ONLY:SP,cZERO,cONE,cI,lchlen,schlen use drivers, ONLY:l_sc_run use com, ONLY:msg,core_io_path,grid_paths use stderr, ONLY:intc,STRING_split @@ -584,12 +585,12 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! if (ic_wf==0) call error(" Error in parallel wf distribution (Dipole ic)") ! - ! rho = < c,k | v,k+q > + ! S_{cv}(k,k+q) = < c k | v k+q > ! do i_spinor=1,n_spinor ! rho = rho + Vstar_dot_V_gpu(wf_ng_eff,DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,ic_wf), & - & DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh)) + & DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh)) ! enddo ! @@ -612,9 +613,9 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) call SERIAL_SVD(Dip%ib(2)-Dip%ib_lim(2),DIP_Q,'uni',0) ! ! Yambo version - Der_k=(matmul(DIP_S,hermitian(DIP_Q) )-Identity)/q0_shift_norm + Der_k=-cI*(matmul(DIP_S,hermitian(DIP_Q) )-Identity)/q0_shift_norm ! Virk-Sipe version - !Der_k=(matmul((DIP_S-DIP_O),hermitian(DIP_Q) )-Identity)/q0_shift_norm + !Der_k=-cI*(matmul((DIP_S-DIP_O),hermitian(DIP_Q) )-Identity)/q0_shift_norm ! do i_grp=1,n_deg_grp do iv=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 @@ -624,7 +625,9 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! do ic=ic_min,Dip%ib(2) ! - DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=Der_k(ic,iv) + ! In yambo there is a band inversion in the definition of the dipoels + ! which results in a conjg factor + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=conjg(cI*Der_k(ic,iv)) ! !===== ! @@ -718,4 +721,4 @@ subroutine set_parms(grid,command) return end subroutine set_parms ! - end subroutine DIPOLE_shifted_grids \ No newline at end of file + end subroutine DIPOLE_shifted_grids From a596226a53d82af2f9ecde0877ca1f19355e940c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Apr 2025 22:41:02 +0200 Subject: [PATCH 0914/1367] Version 5.3.0, Revision 24496, Hash 3ab512a2af MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_compose_rt.F io/io_RT_components.F io/io_RT_components_G_lesser.F io/io_RT_components_Reference.F modules/mod_nl_optics.F modules/mod_real_time.F real_time_control/RT_Observables.F real_time_control/RT_alloc.F real_time_control/RT_average_operator.F real_time_control/RT_current_AND_polarization.F real_time_control/RT_energy_components.F real_time_control/RT_entropy.F real_time_drivers/RT_driver.F real_time_hamiltonian/RT_Hamiltonian.F real_time_hamiltonian/RT_gradk_rho_times_E.F real_time_initialize/RT_G_lesser_init.F real_time_initialize/RT_occupations_update.F real_time_initialize/RT_start_and_restart.F real_time_propagation/RT_EULER_step.F real_time_propagation/RT_EXP_step_accurate.F real_time_propagation/RT_EXP_step_std.F real_time_propagation/RT_Glesser_evolve.F real_time_propagation/RT_INV_step_accurate.F real_time_propagation/RT_INV_step_diago.F real_time_propagation/RT_INV_step_std.F real_time_propagation/RT_Integrator.F real_time_propagation/RT_Scattering_step.F real_time_propagation/RT_apply_RWA.F real_time_propagation/RT_occupations_eval.F real_time_propagation/RT_propagate_fields.F real_time_propagation/RT_time_step_update.F ypp/real_time/RT_G_two_times_build.F ypp/real_time/RT_OBSERVABLES_IO.F ypp/real_time/RT_Polarization.F ypp/real_time/RT_density.F Changes: - [yambo_rt] Working on extending yambo_rt to case n_sp_pol=2 Patch sent by: Davide Sangalli --- configure | 22 +- include/version/version.m4 | 6 +- src/collisions/COLLISIONS_compose_rt.F | 19 +- src/io/io_RT_components.F | 22 +- src/io/io_RT_components_G_lesser.F | 87 +++---- src/io/io_RT_components_Reference.F | 5 +- src/modules/mod_nl_optics.F | 2 +- src/modules/mod_real_time.F | 8 +- src/real_time_control/RT_Observables.F | 4 +- src/real_time_control/RT_alloc.F | 8 +- src/real_time_control/RT_average_operator.F | 4 +- .../RT_current_AND_polarization.F | 6 +- src/real_time_control/RT_energy_components.F | 8 +- src/real_time_control/RT_entropy.F | 18 +- src/real_time_drivers/RT_driver.F | 6 +- src/real_time_hamiltonian/RT_Hamiltonian.F | 30 ++- .../RT_gradk_rho_times_E.F | 24 +- src/real_time_initialize/RT_G_lesser_init.F | 13 +- .../RT_occupations_update.F | 14 +- .../RT_start_and_restart.F | 10 +- src/real_time_propagation/RT_EULER_step.F | 22 +- .../RT_EXP_step_accurate.F | 10 +- src/real_time_propagation/RT_EXP_step_std.F | 18 +- src/real_time_propagation/RT_Glesser_evolve.F | 44 ++-- .../RT_INV_step_accurate.F | 18 +- src/real_time_propagation/RT_INV_step_diago.F | 20 +- src/real_time_propagation/RT_INV_step_std.F | 16 +- src/real_time_propagation/RT_Integrator.F | 63 ++--- .../RT_Scattering_step.F | 12 +- src/real_time_propagation/RT_apply_RWA.F | 8 +- .../RT_occupations_eval.F | 27 ++- .../RT_propagate_fields.F | 4 +- .../RT_time_step_update.F | 26 ++- ypp/real_time/RT_G_two_times_build.F | 217 +++++++++--------- ypp/real_time/RT_OBSERVABLES_IO.F | 12 +- ypp/real_time/RT_Polarization.F | 12 +- ypp/real_time/RT_density.F | 22 +- 37 files changed, 426 insertions(+), 441 deletions(-) diff --git a/configure b/configure index f7304dbaa5..e32575d053 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24495 h.37d9f9dd2d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24496 h.3ab512a2af. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24495 h.37d9f9dd2d' -PACKAGE_STRING='Yambo 5.3.0 r.24495 h.37d9f9dd2d' +PACKAGE_VERSION='5.3.0 r.24496 h.3ab512a2af' +PACKAGE_STRING='Yambo 5.3.0 r.24496 h.3ab512a2af' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24495 h.37d9f9dd2d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24496 h.3ab512a2af to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24495 h.37d9f9dd2d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24496 h.3ab512a2af:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24495 h.37d9f9dd2d +Yambo configure 5.3.0 r.24496 h.3ab512a2af generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24495 h.37d9f9dd2d, which was +It was created by Yambo $as_me 5.3.0 r.24496 h.3ab512a2af, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24495" -SHASH="37d9f9dd2d" +SREVISION="24496" +SHASH="3ab512a2af" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24495 h.37d9f9dd2d, which was +This file was extended by Yambo $as_me 5.3.0 r.24496 h.3ab512a2af, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24495 h.37d9f9dd2d +Yambo config.status 5.3.0 r.24496 h.3ab512a2af configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 661e99c23b..447fa59550 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24495 h.37d9f9dd2d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24496 h.3ab512a2af, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24495" -SHASH="37d9f9dd2d" +SREVISION="24496" +SHASH="3ab512a2af" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index f0d8718da4..46ba623a1d 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -12,7 +12,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only - use electrons, ONLY:spin,n_met_bands,n_full_bands + use electrons, ONLY:spin,n_met_bands,n_full_bands,n_sp_pol use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_COM_Xk_ibz_A2A,PAR_IND_Xk_ibz,PAR_IND_Bp_mat @@ -22,7 +22,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! implicit none ! - complex(SP), intent(in) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + complex(SP), intent(in) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol) ! ! Work Space ! @@ -78,7 +78,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) if (.not.do_collisions(ib,ibp,2)) cycle ! RT_Vnl_xc(i_n,i_m,i_k,i_spin)=RT_Vnl_xc(i_n,i_m,i_k,i_spin) & -& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*dG_avg(ib,ibp,i_kmq) +& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*dG_avg(ib,ibp,i_kmq,i_spin) ! enddo enddo @@ -120,6 +120,7 @@ subroutine Build_dG_avg(dG_in,dG_avg) ! use pars, ONLY:SP,cZERO use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree + use electrons, ONLY:n_sp_pol use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz,PAR_G_k_range @@ -128,12 +129,12 @@ subroutine Build_dG_avg(dG_in,dG_avg) ! implicit none ! - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(out) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(out) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol) ! ! Work Space ! - integer :: i_k,i_k_RT + integer :: i_k,i_k_RT,i_sp ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return ! @@ -141,20 +142,22 @@ subroutine Build_dG_avg(dG_in,dG_avg) ! dG_avg=cZERO ! + do i_sp=1,n_sp_pol do i_k=1,nXkibz ! if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle ! do i_k_RT=RTibz%k_range(i_k,1),RTibz%k_range(i_k,2) - dG_avg(:,:,i_k)=dG_avg(:,:,i_k)+dG_in(:,:,i_k_RT) + dG_avg(:,:,i_k,i_sp)=dG_avg(:,:,i_k,i_sp)+dG_in(:,:,i_k_RT,i_sp) enddo ! ! The 1/real(RT_k_FT%N_mapped(i_k),SP) factor is needed here because I'm integrating ! over kmq. With the DbGd the size of the integrating factor has to be reduced ! - dG_avg(:,:,i_k)=dG_avg(:,:,i_k)/real(RTibz%N_mapped(i_k),SP)/real(PAR_COM_Q_INDEX%n_CPU) + dG_avg(:,:,i_k,i_sp)=dG_avg(:,:,i_k,i_sp)/real(RTibz%N_mapped(i_k),SP)/real(PAR_COM_Q_INDEX%n_CPU) ! enddo + enddo ! call PP_redux_wait(dG_avg,COMM=PAR_COM_Xk_ibz_INDEX%COMM) ! diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index ab7fb6342c..3155ae01a0 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -73,7 +73,7 @@ integer function io_RT_components(what,ID) ! ! Work Space character(schlen) ::db_name - integer ::ik,db_kind,T_size,G_IO_steps,ID_frag + integer ::ik,db_kind,T_size,G_IO_steps logical ::loading_carr_before_neq integer, external ::variables_RT_dynamic ! @@ -166,15 +166,6 @@ integer function io_RT_components(what,ID) ! ! 3rd SECTION !============= - if (RT_do_IO("K_SECTION")) then -#if defined _PAR_IO - ID_frag=ID -#else - ! === deal with K-fragments === - ik = max(1,maxval(io_sec(ID,:))-2) - call io_fragment(ID,ID_frag,i_fragment=ik) -#endif - endif ! #if defined _ELPH_ITERATIVE ! @@ -184,21 +175,21 @@ integer function io_RT_components(what,ID) ! ! This should be replaced by call THETA_IO ! - call def_variable_bulk(ID_frag,"RT_THETA_K"//trim(intc(ik)),4,(/2,2*nqbz*ph_modes,RT_nbands,RT_nbands/),SP) - call io_variable_bulk(ID_frag,4,C3=THETA_matrix(:,:,:,ik)) + call def_variable_bulk(ID,"RT_THETA_K"//trim(intc(ik)),4,(/2,2*nqbz*ph_modes,RT_nbands,RT_nbands/),SP) + call io_variable_bulk(ID,4,C3=THETA_matrix(:,:,:,ik)) endif ! #endif ! ! Lesser Green Function !======================= - if (RT_do_IO("ANY_G")) call io_RT_components_G_lesser(ID_frag,T_size) + if (RT_do_IO("ANY_G")) call io_RT_components_G_lesser(ID,T_size) ! #if defined _NL ! ! Vbands !======== - if (RT_do_IO("ANY_Vb")) call io_RT_components_V_bands(ID_frag,T_size) + if (RT_do_IO("ANY_Vb")) call io_RT_components_V_bands(ID,T_size) ! #endif ! @@ -222,9 +213,6 @@ integer function io_RT_components(what,ID) ! ! End !===== -#if !defined _PAR_IO - if (RT_do_IO("K_SECTION")) call io_fragment_disconnect(ID,ID_frag) -#endif 1 call io_disconnect(ID=ID) call timing('io_RT_components',OPR='stop') ! diff --git a/src/io/io_RT_components_G_lesser.F b/src/io/io_RT_components_G_lesser.F index 69689d6e32..6a9a93c4da 100644 --- a/src/io/io_RT_components_G_lesser.F +++ b/src/io/io_RT_components_G_lesser.F @@ -10,9 +10,10 @@ subroutine io_RT_components_G_lesser(ID,T_size) use pars, ONLY:SP,schlen use drivers, ONLY:l_real_time,l_nl_optics use R_lattice, ONLY:nkibz + use electrons, ONLY:n_sp_pol use stderr, ONLY:intc use IO_int, ONLY:def_variable_bulk,io_variable_bulk - use IO_m, ONLY:variable_exist,write_is_on,read_is_on,io_sec,io_unit,netcdf_call,nf90_sync + use IO_m, ONLY:variable_exist,write_is_on,read_is_on,io_unit,netcdf_call,nf90_sync use hamiltonian, ONLY:H_rotation use RT_control, ONLY:Gless_RT_IO_t,NE_i_start_time,RT_do_IO use real_time, ONLY:dG_lesser,G_MEM_steps,RT_bands,RT_nbands,RT_nk,l_RT_rotate_DM,& @@ -28,43 +29,37 @@ subroutine io_RT_components_G_lesser(ID,T_size) integer, intent(in) :: ID,T_size ! logical :: l_H_rot,l_H_sig,l_H_EQ - integer :: ib,ik,ikibz,i_sp_pol,i_mem,i_mem_sorted,G_IO_steps,VAR_SZ(5),IPOS(5),& + integer :: ib,ik,ikibz,i_sp_pol,i_mem,i_mem_sorted,G_IO_steps,VAR_SZ(6),IPOS(6),& & PAR_G_k_range_ibz(2),k_range(2),ip,TMP_VAR_SZ - character(schlen) :: dim_names(5),dim_name_ibz,G_var_name,Sigma_var_name,H_var_name,ROT_var_name - complex(SP), allocatable ::Delta_Sigma(:,:,:,:) + character(schlen) :: dim_names(6),dim_name_ibz,G_var_name,Sigma_var_name,H_var_name,ROT_var_name + complex(SP), allocatable ::Delta_Sigma(:,:,:,:,:) ! ! Setup !======= ! ! Variables SIZE and strings... !------------------------------- - VAR_SZ(1:4)=(/2,RT_nbands,RT_nbands,1/) - dim_names(1:4) =[character(schlen) :: 'complex', 'RT_nbands','RT_nbands','k_fragment'] + VAR_SZ(1:5)=(/2,RT_nbands,RT_nbands,1,1/) + dim_names(1:5) =[character(schlen) :: 'complex', 'RT_nbands','RT_nbands','k_fragment','n_sp_pol'] dim_name_ibz ='k_fragment' - IPOS(1:4)=1 -#if defined _PAR_IO + IPOS(1:5)=1 + ! VAR_SZ(4) = RT_nk dim_names(4) ='RT_nk' IPOS(4) =PAR_G_k_range(1) dim_name_ibz ='nkibz' -#endif - VAR_SZ(5) = G_MEM_steps - dim_names(5) ='G_MEM_steps' + ! + VAR_SZ(6) = G_MEM_steps + dim_names(6) ='G_MEM_steps' if (RT_do_IO("G_lesser_K_section")) then - VAR_SZ(5) = NF90_UNLIMITED - dim_names(5) ='G_IO_time_step' + VAR_SZ(6) = NF90_UNLIMITED + dim_names(6) ='G_IO_time_step' endif ! ! Sizes... !---------- - i_sp_pol=1 - ik = maxval(io_sec(ID,:))-2 - k_range =(/ik,ik/) - G_IO_steps =1 -#if defined _PAR_IO k_range =PAR_G_k_range G_IO_steps =Gless_RT_IO_t%INTERVAL_steps/nint(RT_dyn_step/RT_step) -#endif ! ! Variables... !-------------- @@ -72,13 +67,6 @@ subroutine io_RT_components_G_lesser(ID,T_size) Sigma_var_name="Delta_Sigma" ROT_var_name="H_rotation" H_var_name="H_equilibrium" -#if !defined _PAR_IO - G_var_name="dG_lesser_K"//trim(intc(ik))//"_SP_POL"//trim(intc(i_sp_pol)) - ikibz=RTibz%k_map(ik) - Sigma_var_name="Delta_Sigma_K"//trim(intc(ikibz))//"_SP_POL"//trim(intc(i_sp_pol)) - H_var_name="H_equilibrium_K"//trim(intc(ikibz))//"_SP_POL"//trim(intc(i_sp_pol)) - ROT_var_name="H_rotation_K"//trim(intc(ikibz))//"_SP_POL"//trim(intc(i_sp_pol)) -#endif ! ! H_sig/H_rot... !---------------- @@ -92,72 +80,61 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! ! Variable Definitions... !------------------------- -#if defined _PAR_IO if( NE_i_time==NE_i_start_time.or..not.(l_real_time.or.l_nl_optics)) then -#endif call def_variable_bulk(ID,trim(G_var_name),4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) if (l_H_sig) then - TMP_VAR_SZ=1 -#if defined _PAR_IO TMP_VAR_SZ=nkibz -#endif - call def_variable_bulk(ID,trim(Sigma_var_name),5,(/VAR_SZ(:3),TMP_VAR_SZ,VAR_SZ(5)/),SP,& -& dim_names=(/dim_names(:3),dim_name_ibz,dim_names(5)/),par_io_kind='collective',silent=.true.) + call def_variable_bulk(ID,trim(Sigma_var_name),5,(/VAR_SZ(:3),TMP_VAR_SZ,VAR_SZ(5:6)/),SP,& +& dim_names=(/dim_names(:3),dim_name_ibz,dim_names(5:6)/),par_io_kind='collective',silent=.true.) endif - if (l_H_rot) call def_variable_bulk(ID,trim(ROT_var_name),6,VAR_SZ(1:4),SP,& -& dim_names=dim_names(1:4),par_io_kind='collective',silent=.true.) - if (l_H_EQ) call def_variable_bulk(ID,trim(H_var_name),7,VAR_SZ(1:4),SP,& -& dim_names=dim_names(1:4),par_io_kind='collective',silent=.true.) -#if defined _PAR_IO + if (l_H_rot) call def_variable_bulk(ID,trim(ROT_var_name),6,VAR_SZ(1:5),SP,& +& dim_names=dim_names(1:5),par_io_kind='collective',silent=.true.) + if (l_H_EQ) call def_variable_bulk(ID,trim(H_var_name),7,VAR_SZ(1:5),SP,& +& dim_names=dim_names(1:5),par_io_kind='collective',silent=.true.) endif -#endif ! ! Variable I/O... !----------------- if (l_real_time.or.l_nl_optics) then do i_mem_sorted=G_MEM_steps-T_size+1,G_MEM_steps - if (RT_do_IO("G_lesser_K_section")) IPOS(5)=Gless_RT_IO_t%N+(i_mem_sorted-G_MEM_steps) - if (RT_do_IO("G_lesser_RESTART_K_section")) IPOS(5)= T_size+(i_mem_sorted-G_MEM_steps) + if (RT_do_IO("G_lesser_K_section")) IPOS(6)=Gless_RT_IO_t%N+(i_mem_sorted-G_MEM_steps) + if (RT_do_IO("G_lesser_RESTART_K_section")) IPOS(6)= T_size+(i_mem_sorted-G_MEM_steps) if (i_mem_sorted==G_MEM_steps ) i_mem=i_MEM_now if (i_mem_sorted==G_MEM_steps-1) i_mem=i_MEM_prev if (i_mem_sorted==G_MEM_steps-2) i_mem=i_MEM_old - call io_variable_bulk(ID,4,C4=dG_lesser(:,:,k_range(1):k_range(2),i_mem:i_mem),IPOS=IPOS) + call io_variable_bulk(ID,4,C5=dG_lesser(:,:,k_range(1):k_range(2),:,i_mem:i_mem),IPOS=IPOS) enddo else - IPOS(5)=Gless_RT_IO_t%N - call io_variable_bulk(ID,4,C4=dG_lesser(:,:,k_range(1):k_range(2),1:1),IPOS=IPOS) + IPOS(6)=Gless_RT_IO_t%N + call io_variable_bulk(ID,4,C5=dG_lesser(:,:,k_range(1):k_range(2),:,1:1),IPOS=IPOS) endif ! if (l_H_sig) then PAR_G_k_range_ibz(1)=RTibz%k_map(k_range(1)) PAR_G_k_range_ibz(2)=RTibz%k_map(k_range(2)) - allocate(Delta_Sigma(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range_ibz(1):PAR_G_k_range_ibz(2),1)) + allocate(Delta_Sigma(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range_ibz(1):PAR_G_k_range_ibz(2),n_sp_pol,1)) if(write_is_on(ID)) then do ikibz=PAR_G_k_range_ibz(1),PAR_G_k_range_ibz(2) ik=RTibz%k_range(ikibz,1) - if( l_RT_RWA) Delta_Sigma(:,:,ikibz,1:1)=Ho_plus_sigma(:,:,ik,1:1) - if(.not.l_RT_RWA) Delta_Sigma(:,:,ikibz,1:1)=Ho_plus_sigma(:,:,ik,1:1)-H_EQ(:,:,ik,1:1) + if( l_RT_RWA) Delta_Sigma(:,:,ikibz,:,1)=Ho_plus_sigma(:,:,ik,:) + if(.not.l_RT_RWA) Delta_Sigma(:,:,ikibz,:,1)=Ho_plus_sigma(:,:,ik,:)-H_EQ(:,:,ik,:) enddo endif -#if defined _PAR_IO IPOS(4)=PAR_G_k_range_ibz(1) -#endif - call io_variable_bulk(ID,5,C4=Delta_Sigma,IPOS=IPOS) -#if defined _PAR_IO + call io_variable_bulk(ID,5,C5=Delta_Sigma,IPOS=IPOS) IPOS(4)=PAR_G_k_range(1) -#endif if(read_is_on(ID)) then do ip=PAR_G_k_range_ibz(1),PAR_G_k_range_ibz(2) ikibz=RTibz%k_map(ip) - Ho_plus_sigma(:,:,ip,1:1)=Delta_Sigma(:,:,ikibz,1:1) + Ho_plus_sigma(:,:,ip,:)=Delta_Sigma(:,:,ikibz,:,1) enddo endif deallocate(Delta_Sigma) endif ! - if (l_H_rot) call io_variable_bulk(ID,6,C3=H_rotation(:,:,k_range(1):k_range(2),1),IPOS=IPOS(1:4)) + if (l_H_rot) call io_variable_bulk(ID,6,C4=H_rotation(:,:,k_range(1):k_range(2),:),IPOS=IPOS(1:5)) ! - if (l_H_EQ) call io_variable_bulk(ID,7,C3=H_EQ(:,:,k_range(1):k_range(2),1),IPOS=IPOS(1:4)) + if (l_H_EQ) call io_variable_bulk(ID,7,C4=H_EQ(:,:,k_range(1):k_range(2),:),IPOS=IPOS(1:5)) ! ! In case of frequent I/O this gives a significant slowdown of the simulation if (G_IO_steps>=10) call netcdf_call(nf90_sync(io_unit(ID)),ID) diff --git a/src/io/io_RT_components_Reference.F b/src/io/io_RT_components_Reference.F index b32dc54960..2e8a6bc5b3 100644 --- a/src/io/io_RT_components_Reference.F +++ b/src/io/io_RT_components_Reference.F @@ -10,6 +10,7 @@ subroutine io_RT_components_Reference(ID) use pars, ONLY:SP use drivers, ONLY:l_elph_scatt use R_lattice, ONLY:nqbz + use electrons, ONLY:n_sp_pol use IO_m, ONLY:read_is_on use IO_int, ONLY:def_variable_bulk,io_variable_bulk use RT_lifetimes, ONLY:RT_lifetime,RT_EE_REF_life,RT_EP_emit_REF_life,RT_EP_abs_REF_life,& @@ -60,8 +61,8 @@ subroutine io_RT_components_Reference(ID) ! if (allocated(G_lesser_reference)) then ! - call def_variable_bulk(ID,"G_lesser_reference",4,(/2,RT_nbands,RT_nbands,RT_nk/),SP) - call io_variable_bulk(ID,4,C3=G_lesser_reference) + call def_variable_bulk(ID,"G_lesser_reference",4,(/2,RT_nbands,RT_nbands,RT_nk,n_sp_pol/),SP) + call io_variable_bulk(ID,4,C4=G_lesser_reference) ! endif ! diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 13dfb00854..7818995d54 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -191,7 +191,7 @@ subroutine NL_alloc(en) endif ! if(eval_dG.or.l_pump_and_probe) then - YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,1)) + YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol,1)) endif ! ! Reference energies diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 10aaea1722..2dadb054aa 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -184,10 +184,10 @@ module real_time ! ! GFs !----- - complex(SP), allocatable :: G_lesser(:,:,:,:) ! Band, Band, K, Time - complex(SP), allocatable :: dG_lesser(:,:,:,:) - complex(SP), allocatable :: dG_avg(:,:,:) - complex(SP), allocatable :: G_lesser_reference(:,:,:) ! Band, Band, K + complex(SP), allocatable :: G_lesser(:,:,:,:,:) ! Band, Band, K, Spin, Time + complex(SP), allocatable :: dG_lesser(:,:,:,:,:) + complex(SP), allocatable :: dG_avg(:,:,:,:) + complex(SP), allocatable :: G_lesser_reference(:,:,:,:) ! Band, Band, K, Spin complex(SP), allocatable :: I1_matrix(:,:) ! ! RT_Hamiltonian diff --git a/src/real_time_control/RT_Observables.F b/src/real_time_control/RT_Observables.F index 8b3e250b0d..1d2b89638a 100644 --- a/src/real_time_control/RT_Observables.F +++ b/src/real_time_control/RT_Observables.F @@ -14,7 +14,7 @@ subroutine RT_Observables(en,k,dG_lesser,OBSERVABLES) ! use pars, ONLY:SP use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use real_time, ONLY:RT_nk,RT_bands use fields, ONLY:A_tot use timing_m, ONLY:timing @@ -23,7 +23,7 @@ subroutine RT_Observables(en,k,dG_lesser,OBSERVABLES) ! type(levels), intent(inout) :: en type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk) + complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol) real(SP), intent(inout) :: OBSERVABLES(25) ! ! Workspace diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index d5ca5015c3..38de787447 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -81,7 +81,7 @@ subroutine RT_alloc(en,what) if(l_use_Hxc_collisions) then YAMBO_ALLOC(RT_Vnl_xc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) RT_Vnl_xc=cZERO - YAMBO_ALLOC(dG_avg,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz)) + YAMBO_ALLOC(dG_avg,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) dG_avg=cZERO endif ! @@ -92,9 +92,9 @@ subroutine RT_alloc(en,what) XC0=cZERO ! ! G's ... - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),G_MEM_steps)) - YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),G_MEM_steps)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol,G_MEM_steps)) + YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol,G_MEM_steps)) G_lesser_reference=cZERO dG_lesser =cZERO G_lesser =cZERO diff --git a/src/real_time_control/RT_average_operator.F b/src/real_time_control/RT_average_operator.F index 51537b9635..de6cf111c3 100644 --- a/src/real_time_control/RT_average_operator.F +++ b/src/real_time_control/RT_average_operator.F @@ -26,7 +26,7 @@ subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& ! type(bz_samp), intent(in) :: k type(levels), intent(in) :: en - complex(SP), intent(in) :: G(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: G(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) integer, intent(in) :: nK_mem,N_V ! ! Optionals @@ -107,7 +107,7 @@ subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& if(N_V> 1) Hk(i_cmp,:,:)=Hk_vec_tmp(i_cmp,:,:) endif ! - VALUE_tmp(i_cmp)=VALUE_tmp(i_cmp)-cI*Vstar_dot_V_omp(RT_bands2,Hk(i_cmp,:,:),G(:,:,ik))*RTibz%weights(ik) + VALUE_tmp(i_cmp)=VALUE_tmp(i_cmp)-cI*Vstar_dot_V_omp(RT_bands2,Hk(i_cmp,:,:),G(:,:,ik,i_sp_pol))*RTibz%weights(ik) ! enddo ! diff --git a/src/real_time_control/RT_current_AND_polarization.F b/src/real_time_control/RT_current_AND_polarization.F index c6a039bf83..6d2c25adad 100644 --- a/src/real_time_control/RT_current_AND_polarization.F +++ b/src/real_time_control/RT_current_AND_polarization.F @@ -23,7 +23,7 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) use units, ONLY:SPEED_OF_LIGHT use R_lattice, ONLY:bz_samp use D_lattice, ONLY:DL_vol - use electrons, ONLY:nel,levels,n_spin,Spin_magn,Orbital_magn,Itinerant_magn + use electrons, ONLY:nel,levels,n_spin,n_sp_pol,Spin_magn,Orbital_magn,Itinerant_magn use real_time, ONLY:l_NE_dynamics,RT_ind_J,RT_ind_J_prev,RT_bands,& & RT_P,RT_spin_magn,RT_orbt_magn,RT_P_prev,G_lesser_reference,NE_i_time,& & RT_dyn_step,l_P_integrating_J,l_velocity_gauge_diam,integrator_step @@ -37,9 +37,9 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) ! type(bz_samp), intent(in) :: k type(levels), intent(in) :: E - complex(SP), intent(in) :: G_input(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) type(gauge_field), intent(in) :: A_input - real(SP), intent(in) :: Ncarr(3) + real(SP), intent(in) :: Ncarr(3) + complex(SP), intent(in) :: G_input(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work Space ! diff --git a/src/real_time_control/RT_energy_components.F b/src/real_time_control/RT_energy_components.F index f37fcf6c83..f139d1a8c5 100644 --- a/src/real_time_control/RT_energy_components.F +++ b/src/real_time_control/RT_energy_components.F @@ -10,7 +10,7 @@ subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) use pars, ONLY:SP,cZERO use DIPOLES, ONLY:P_square use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels,n_spin + use electrons, ONLY:levels,n_spin,n_sp_pol use hamiltonian, ONLY:V_hartree_sc,Hzero use units, ONLY:HA2EV use FFT_m, ONLY:fft_size @@ -26,12 +26,12 @@ subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) ! type(levels), intent(in) :: en type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) real(SP), intent(out):: Energies(5),dE_IP character(3), intent(in) :: what ! real(SP) , allocatable :: E_xc_rt(:,:) - complex(SP) :: G_full(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)), & + complex(SP) :: G_full(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol), & & dE_tot,dE_kin,dE_ion,dE_h,dE_xc,dE_hxc,dE_h_sc,E_xc_sc,E_xc_ref,dE_xc_sc,dE_hxc_sc ! if(.not.eval_energy) return @@ -51,7 +51,7 @@ subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) dE_hxc_sc =cZERO ! if( trim(what)=='el') G_full=dG_lesser - if(.not.trim(what)=='el') G_full=dG_lesser+G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2)) + if(.not.trim(what)=='el') G_full=dG_lesser+G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:) ! ! Non-interacting energy variation ! diff --git a/src/real_time_control/RT_entropy.F b/src/real_time_control/RT_entropy.F index 5f54f0c15f..21f832435f 100644 --- a/src/real_time_control/RT_entropy.F +++ b/src/real_time_control/RT_entropy.F @@ -10,7 +10,7 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) use pars, ONLY:SP,cZERO,rZERO use R_lattice, ONLY:bz_samp use units, ONLY:HA2KEL - use electrons, ONLY:levels,spin_occ + use electrons, ONLY:levels,spin_occ,n_sp_pol use RT_occupations, ONLY:RT_el_occ,RT_ho_occ use real_time, ONLY:RT_bands,eval_entropy,RT_levels,RTibz use parallel_m, ONLY:PAR_G_k_range @@ -19,18 +19,18 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) ! type(levels), intent(in) :: en type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) real(SP), intent(in) :: E_IP real(SP), intent(out) :: TEntr(3) real(SP), intent(inout) :: Entr(3),EnEntr(3) ! ! Workspace ! - integer :: ib1,ib2,ik,ik_RT,i1 + integer :: ib1,ib2,ik,ik_RT,i1,i_sp real(SP) :: Energies_e(5),Energies_h(5),tmp_E(2),Entr_prev(3),EnEntr_prev(3), & & S_e,S_h,VALUE_tmp(3),one_over_T - complex(SP) :: dG_lesser_h(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)), & -& dG_lesser_e(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP) :: dG_lesser_h(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol), & +& dG_lesser_e(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! TEntr=rZERO Entr=rZERO @@ -48,17 +48,19 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) dG_lesser_h=cZERO dG_lesser_e=cZERO ! + do i_sp=1,n_sp_pol do ik_RT=PAR_G_k_range(1),PAR_G_k_range(2) do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) if ( RT_levels%E(ib1,ik_RT,1)<=0._SP .and. RT_levels%E(ib2,ik_RT,1)<=0._SP ) then - dG_lesser_h(ib1,ib2,ik_RT)=dG_lesser(ib1,ib2,ik_RT) + dG_lesser_h(ib1,ib2,ik_RT,i_sp)=dG_lesser(ib1,ib2,ik_RT,i_sp) else if ( RT_levels%E(ib1,ik_RT,1)> 0._SP .and. RT_levels%E(ib2,ik_RT,1)> 0._SP ) then - dG_lesser_e(ib1,ib2,ik_RT)=dG_lesser(ib1,ib2,ik_RT) + dG_lesser_e(ib1,ib2,ik_RT,i_sp)=dG_lesser(ib1,ib2,ik_RT,i_sp) endif enddo enddo enddo + enddo ! ! ! Compute IP energy @@ -71,6 +73,7 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) ! Entr= 0._SP ! + do i_sp=1,n_sp_pol do ik=1,en%nk do ib1=RT_bands(1),RT_bands(2) VALUE_tmp=0._SP @@ -87,6 +90,7 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) Entr=Entr+VALUE_tmp enddo enddo + enddo ! ! Temperature derived from Entropy to Energy variation ratio ! diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index d8be371372..8e98d318be 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -275,7 +275,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Calculate the RT Hamiltonian Ho_plus_Sigma !============================================ - call RT_Hamiltonian(dG_lesser(:,:,:,i_MEM_now),A_tot,E,k) + call RT_Hamiltonian(dG_lesser(:,:,:,:,i_MEM_now),A_tot,E,k) ! ! Rotation in the Coherent Hamiltonian basis !============================================ @@ -283,7 +283,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Energy, number of carriers, fit of electronic temperatures !============================================================= - call RT_Observables(E,k,dG_lesser(:,:,:,i_MEM_now),OBSERVABLES) + call RT_Observables(E,k,dG_lesser(:,:,:,:,i_MEM_now),OBSERVABLES) ! ! Calculate all relaxation and dissipation terms !=============================================== @@ -313,7 +313,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Integration !============= - call RT_Integrator(G_lesser(:,:,:,i_MEM_now),dG_lesser(:,:,:,i_MEM_now),dG_lesser(:,:,:,i_MEM_prev),A_tot,A_tot,E,k,q) + call RT_Integrator(G_lesser(:,:,:,:,i_MEM_now),dG_lesser(:,:,:,:,i_MEM_now),dG_lesser(:,:,:,:,i_MEM_prev),A_tot,A_tot,E,k,q) ! enddo ! diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index a8c143ebdf..82db10aa7d 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -36,7 +36,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! use pars, ONLY:SP,cONE,cZERO use wrapper_omp, ONLY:M_plus_alpha_M_omp - use electrons, ONLY:levels,n_spinor,n_spin + use electrons, ONLY:levels,n_spinor,n_spin,n_sp_pol use FFT_m, ONLY:fft_size use drivers, ONLY:l_use_Hxc_collisions use R_lattice, ONLY:bz_samp,nXkibz @@ -59,12 +59,12 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! type(levels), intent(inout) :: E type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) type(gauge_field), intent(in):: A_input ! ! Work Space ! - integer :: ik,ik_RT,ib + integer :: ik,ik_RT,ib,i_sp_pol logical :: l_H_contains_Hartree real(SP), allocatable :: delta_rho(:),delta_magn(:,:) complex(SP), allocatable :: V_scf(:),V_scf_grad(:,:),V_xc_mat(:,:,:) @@ -141,20 +141,22 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! ! Add H_nl_sc to Ho_plus_Sigma !--------------------------------- + do i_sp_pol=1,n_sp_pol do ik=1,nXkibz ! H_nl_sc=cZERO ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - call V_real_space_to_H(ik,1,H_nl_sc,WF,'def+xc',V=V_hartree_sc,Vxc=V_xc_sc) + call V_real_space_to_H(ik,i_sp_pol,H_nl_sc,WF,'def+xc',V=V_hartree_sc,Vxc=V_xc_sc) if(n_spinor==2.and.l_update_soc) call Vgrad_real_space_to_H(ik,H_nl_sc,WF,V_scf_grad) ! call PP_redux_wait(H_nl_sc,COMM=PAR_COM_Xk_ibz_A2A%COMM) ! - forall(ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) Ho_plus_Sigma(:,:,ik_RT,1)=H_nl_sc + forall(ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=H_nl_sc ! enddo + enddo ! l_H_contains_Hartree=index(trim(RT_potential),"HARTREE")>0 if(allocated(V_scf_grad)) deallocate(V_scf_grad) @@ -170,18 +172,20 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! ! Add RT_Vnl_xc to Ho_plus_Sigma !--------------------------------- - do ik=1,nXkibz + do i_sp_pol=1,n_sp_pol + do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle if (l_H_contains_HARTREE) then do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) - Ho_plus_Sigma(:,:,ik_RT,1)=Ho_plus_Sigma(:,:,ik_RT,1)+RT_Vnl_xc(:,:,ik,1) + Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)+RT_Vnl_xc(:,:,ik,i_sp_pol) enddo else do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) - Ho_plus_Sigma(:,:,ik_RT,1)=RT_Vnl_xc(:,:,ik,1) + Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=RT_Vnl_xc(:,:,ik,i_sp_pol) enddo endif enddo + enddo ! endif ! @@ -192,16 +196,18 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) call timing('RT Apply Field',OPR='start') ! H_field=cZERO + do i_sp_pol=1,n_sp_pol do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO - call RT_apply_field(ik,1,H_nl_sc,A_input) - call RT_gradk_rho_times_E(ik,1,H_nl_sc,dG_in,A_input,k,E) + call RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) + call RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,k,E) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) - H_field(:,:,ik_RT,1)=H_nl_sc - call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) + H_field(:,:,ik_RT,i_sp_pol)=H_nl_sc + call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,i_sp_pol)) enddo enddo + enddo ! ! call timing('RT Apply Field',OPR='stop') diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index af8138181b..7145d8ebe3 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -24,7 +24,7 @@ subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) use vec_operate, ONLY:k_periodic_idx,degeneration_finder use matrix_operate, ONLY:hermitian use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp,k_map use D_lattice, ONLY:a use parallel_m, ONLY:PAR_G_k_range @@ -34,7 +34,7 @@ subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! integer, intent(in) :: ik,i_sp_pol complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) type(gauge_field), intent(in) :: A_input type(bz_samp), intent(in) :: Xk type(levels), intent(in) :: Xen @@ -134,8 +134,8 @@ subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) do ib1=RT_bands(1),RT_bands(2) do jb1=RT_bands(1),RT_bands(2) gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & - & -cI*(dG_in(ib1,jb1,ikp1_ibz)*conjg(DIP_km(ib1,jb1))+ & - & -dG_in(ib1,jb1,ikm1_ibz)*conjg(DIP_kp(ib1,jb1)) ) + & -cI*(dG_in(ib1,jb1,ikp1_ibz,i_sp_pol)*conjg(DIP_km(ib1,jb1))+ & + & -dG_in(ib1,jb1,ikm1_ibz,i_sp_pol)*conjg(DIP_kp(ib1,jb1)) ) enddo enddo ! @@ -203,7 +203,7 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) use vec_operate, ONLY:k_periodic_idx,degeneration_finder use matrix_operate, ONLY:hermitian use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp,k_map use D_lattice, ONLY:a use parallel_m, ONLY:PAR_G_k_range @@ -213,7 +213,7 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! integer, intent(in) :: ik,i_sp_pol complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) type(gauge_field), intent(in) :: A_input type(bz_samp), intent(in) :: Xk type(levels), intent(in) :: Xen @@ -383,11 +383,11 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) do jb1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) !A1_ll' ib1=l jb1=l' ib2=s - A1p_kmq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikm1_ibz)*conjg(DIP_km(ib2,ib1)) - A1m_kpq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikp1_ibz)*conjg(DIP_kp(ib2,ib1)) + A1p_kmq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikm1_ibz,i_sp_pol)*conjg(DIP_km(ib2,ib1)) + A1m_kpq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikp1_ibz,i_sp_pol)*conjg(DIP_kp(ib2,ib1)) !A2_ll' ib1=l jb1=l' ib2=s - A2p_kmq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikm1_ibz)* DIP_km(ib2,jb1) - A2m_kpq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikp1_ibz)* DIP_kp(ib2,jb1) + A2p_kmq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikm1_ibz,i_sp_pol)* DIP_km(ib2,jb1) + A2m_kpq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikp1_ibz,i_sp_pol)* DIP_kp(ib2,jb1) enddo enddo enddo @@ -410,8 +410,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) do jb2=RT_bands(1),RT_bands(2) ! ib1=n, jb1=m, ib2=l, jb2=l' gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & - & -cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1_ibz)+ & - & +cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1_ibz)+ & + & -cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1_ibz,i_sp_pol)+ & + & +cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1_ibz,i_sp_pol)+ & & -cI/q_fac*Mm_kpq(ib2,ib1,jb2,jb1)*(A1m_kpq(ib2,jb2)-A2m_kpq(ib2,jb2))+ & & -cI/q_fac*Mp_kmq(ib2,ib1,jb2,jb1)*(A1p_kmq(ib2,jb2)-A2p_kmq(ib2,jb2)) enddo diff --git a/src/real_time_initialize/RT_G_lesser_init.F b/src/real_time_initialize/RT_G_lesser_init.F index 6a0edfd630..c662d010d4 100644 --- a/src/real_time_initialize/RT_G_lesser_init.F +++ b/src/real_time_initialize/RT_G_lesser_init.F @@ -12,26 +12,31 @@ subroutine RT_G_lesser_init( ) use parallel_m, ONLY:PAR_IND_Xk_ibz use real_time, ONLY:dG_lesser,G_lesser_reference,RTibz,RT_bands,G_lesser use R_lattice, ONLY:nkibz + use electrons, ONLY:n_sp_pol ! implicit none ! ! Work Space ! - integer :: ik,ik_RT,ib + integer :: ik,ik_RT,ib,i_sp_pol + ! + if (n_sp_pol==2) call error("subroutine RT_G_lesser_update not coded for n_sp_pol=2") ! do ib=RT_bands(1),RT_bands(2) + do i_sp_pol=1,n_sp_pol do ik=1,nkibz do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) ! - G_lesser_reference(ib,ib,ik_RT) = cmplx(rZERO,RT_el_occ%N_ref(ib,ik_RT),SP) + G_lesser_reference(ib,ib,ik_RT,i_sp_pol) = cmplx(rZERO,RT_el_occ%N_ref(ib,ik_RT),SP) ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - G_lesser(ib,ib,ik_RT,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT),SP) - dG_lesser(ib,ib,ik_RT,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT)-RT_el_occ%N_ref(ib,ik_RT),SP) + G_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT),SP) + dG_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT)-RT_el_occ%N_ref(ib,ik_RT),SP) ! enddo enddo + enddo enddo ! end subroutine RT_G_lesser_init diff --git a/src/real_time_initialize/RT_occupations_update.F b/src/real_time_initialize/RT_occupations_update.F index 6c1ceb6304..bc0584407d 100644 --- a/src/real_time_initialize/RT_occupations_update.F +++ b/src/real_time_initialize/RT_occupations_update.F @@ -11,14 +11,16 @@ subroutine RT_occupations_update( ) use parallel_int, ONLY:PP_redux_wait use real_time, ONLY:dG_lesser,G_lesser_reference,RT_bands,RT_is_dynamically_dephased,RTibz use RT_occupations, ONLY:RT_el_occ,RT_ho_occ,RT_life_occ,RT_occupation_clean - use electrons, ONLY:spin_occ + use electrons, ONLY:spin_occ,n_sp_pol use R_lattice, ONLY:nkibz ! implicit none ! ! Work Space ! - integer :: ib,ik,ik_RT + integer :: ib,ik,ik_RT,i_sp + ! + if (n_sp_pol==2) call error("subroutine RT_occupations_update not coded with n_sp_pol=2") ! ! El/Ho Occupations are defined from G_lesser and G_lesser_reference !=================== @@ -27,15 +29,16 @@ subroutine RT_occupations_update( ) call RT_occupation_clean(RT_life_occ) ! do ib=RT_bands(1),RT_bands(2) + do i_sp=1,n_sp_pol do ik=1,nkibz do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) ! - RT_el_occ%N_ref(ib,ik_RT) = aimag(G_lesser_reference(ib,ib,ik_RT)) - RT_ho_occ%N_ref(ib,ik_RT) = spin_occ-aimag(G_lesser_reference(ib,ib,ik_RT)) + RT_el_occ%N_ref(ib,ik_RT) = aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) + RT_ho_occ%N_ref(ib,ik_RT) = spin_occ-aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - RT_el_occ%dN(ib,ik_RT)= aimag(dG_lesser(ib,ib,ik_RT,1)) + RT_el_occ%dN(ib,ik_RT)= aimag(dG_lesser(ib,ib,ik_RT,i_sp,1)) ! RT_el_occ%N(ib,ik_RT) = RT_el_occ%N_ref(ib,ik_RT)+RT_el_occ%dN(ib,ik_RT) RT_ho_occ%N(ib,ik_RT) = RT_ho_occ%N_ref(ib,ik_RT)-RT_el_occ%dN(ib,ik_RT) @@ -46,6 +49,7 @@ subroutine RT_occupations_update( ) ! enddo enddo + enddo enddo ! call PP_redux_wait(RT_el_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 5a7e94a781..3c3d9ee120 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -90,8 +90,8 @@ subroutine RT_start_and_restart(E,k,q) ! if(.not.l_RT_is_WFfree) then ! - call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2)),E,k,rho_reference,1) - if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2)),E,k,magn_reference,1) + call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) + if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,magn_reference,1) ! call Bare_Hamiltonian(E,k,k) ! @@ -171,7 +171,7 @@ subroutine RT_start_and_restart(E,k,q) ! !AMBO_FREE(RT_TIME_status) ! - ! I use G_lesser(:,:,:) to reconstruct everything + ! I use G_lesser to reconstruct everything ! Note that the databases must be loaded at the RESTART time (NE_time) ! i_db=RT_return_db_ID("G_lesser_RESTART_K_section") @@ -190,7 +190,7 @@ subroutine RT_start_and_restart(E,k,q) ! The G_lesser must be now rebuild from the reference (T=0) and latest dG components ! do i_mem=1,G_MEM_steps - G_lesser(:,:,:,i_mem)=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2))+dG_lesser(:,:,:,i_mem) + G_lesser(:,:,:,:,i_mem)=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:)+dG_lesser(:,:,:,:,i_mem) enddo ! #if defined _ELPH_ITERATIVE @@ -250,7 +250,7 @@ subroutine RT_start_and_restart(E,k,q) ! Initialize the Vector Potential !================================= ! - if (l_NE_with_fields) call RT_propagate_fields(E,k,A_tot,A_tot,dG_lesser(:,:,:,1),NE_time-RT_step,RT_step) + if (l_NE_with_fields) call RT_propagate_fields(E,k,A_tot,A_tot,dG_lesser(:,:,:,:,1),NE_time-RT_step,RT_step) ! ! Pseudo potential terms needed for velocity gauge !================================================== diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index 1d005b6960..a6c98d6644 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) +subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! use pars, ONLY:SP,cZERO,cI use real_time, ONLY:l_RT_PERT,l_RT_FRES,l_RT_RWA,& @@ -14,7 +14,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) ! implicit none ! - integer, intent(in) :: ik,nbf + integer, intent(in) :: ik,i_sp_pol,nbf real(SP), intent(in) :: dT complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -29,8 +29,8 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) ! if (.not. l_RT_pert) then ! - G_k=dG_in+G_lesser_reference(:,:,ik) - H_k=Ho_plus_Sigma(:,:,ik,1) + G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) + H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") ! return @@ -39,13 +39,13 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) ! ! Part of the hamiltonina multiplied by rho0+rho1 ! - H_k=Ho_plus_Sigma(:,:,ik,1) - if(.not.l_RT_RWA) H_k=H_k-H_EQ(:,:,ik,1) - if( l_RT_FRES ) H_k=H_k-H_field(:,:,ik,1) + H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) + if(.not.l_RT_RWA) H_k=H_k-H_EQ(:,:,ik,i_sp_pol) + if( l_RT_FRES ) H_k=H_k-H_field(:,:,ik,i_sp_pol) ! ! First the rho0 term. This gives rho1. ! - G_k=G_lesser_reference(:,:,ik) + G_k=G_lesser_reference(:,:,ik,i_sp_pol) ! call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") ! @@ -76,9 +76,9 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,dT) ! Part of the hamiltonian multiplied by the full rho ! H_k=cZERO - if(.not.l_RT_RWA) H_k=H_EQ(:,:,ik,1) - if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,1) - G_k=dG_in+G_lesser_reference(:,:,ik) + if(.not.l_RT_RWA) H_k=H_EQ(:,:,ik,i_sp_pol) + if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,i_sp_pol) + G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) ! call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") ! diff --git a/src/real_time_propagation/RT_EXP_step_accurate.F b/src/real_time_propagation/RT_EXP_step_accurate.F index 0ce62016b9..114abb2244 100644 --- a/src/real_time_propagation/RT_EXP_step_accurate.F +++ b/src/real_time_propagation/RT_EXP_step_accurate.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The EXP integrator is better than the EULER integrator if Ho_plus_Sigma ! changes in time more slowly that G @@ -19,7 +19,7 @@ subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -34,12 +34,12 @@ subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! dG_out=cZERO ! - G_comm=dG_inp+G_lesser_reference(:,:,ik) + G_comm=dG_inp+G_lesser_reference(:,:,ik,i_sp_pol) ! do i_order=1,Integrator_exp_order ! - call M_by_M_omp('n','n',RT_nbands,-cI*deltaT*Ho_plus_Sigma(:,:,ik,1)/real(i_order,SP),G_comm,U1_k) - call M_by_M_omp('n','n',RT_nbands,G_comm,+cI*deltaT*Ho_plus_Sigma(:,:,ik,1)/real(i_order,SP),U2_k) + call M_by_M_omp('n','n',RT_nbands,-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol)/real(i_order,SP),G_comm,U1_k) + call M_by_M_omp('n','n',RT_nbands,G_comm,+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol)/real(i_order,SP),U2_k) ! ! dG_out = G(T0+dt) -G(T0)= U1(T0)+U2(T0) ! diff --git a/src/real_time_propagation/RT_EXP_step_std.F b/src/real_time_propagation/RT_EXP_step_std.F index 5fe1bbd3d4..286b02cd5a 100644 --- a/src/real_time_propagation/RT_EXP_step_std.F +++ b/src/real_time_propagation/RT_EXP_step_std.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The EXP integrator is better than the EULER integrator if Ho_plus_Sigma ! changes in time more slowly that G @@ -17,7 +17,7 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -47,8 +47,8 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! U1 = exp ( -i * Ho_plus_Sigma * dt) ! U2 = exp ( +i + Ho_plus_Sigma * dt) ! - U1_km1=-cI*deltaT*Ho_plus_Sigma(:,:,ik,1) - U2_km1=+cI*deltaT*Ho_plus_Sigma(:,:,ik,1) + U1_km1=-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + U2_km1=+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! if(integrator_exp_order>1) then M1_tmp=U2_km1 @@ -82,11 +82,11 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) call M_by_M_omp('n','n',RT_nbands,U1_k,dG_inp,M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,U2_k,dG_out) ! - call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),U2_km1,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),U2_km1,M2_tmp) dG_out=dG_out+(M1_tmp+M2_tmp) ! - call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik),M2_tmp) + call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M2_tmp) call M_by_M_omp('n','n',RT_nbands,M2_tmp,U2_km1,M1_tmp) dG_out=dG_out+M1_tmp-dG_inp ! @@ -94,9 +94,9 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! ! dG_out = G(T0+dt) -G(T0) = U1(T;dt) G(T0) U2(T;-dt) - G(T0) ! - call M_by_M_omp('n','n',RT_nbands,U1_k,dG_inp+G_lesser_reference(:,:,ik),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,U1_k,dG_inp+G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,U2_k,dG_out) - dG_out=dG_out-dG_inp-G_lesser_reference(:,:,ik) + dG_out=dG_out-dG_inp-G_lesser_reference(:,:,ik,i_sp_pol) ! endif ! diff --git a/src/real_time_propagation/RT_Glesser_evolve.F b/src/real_time_propagation/RT_Glesser_evolve.F index c25d78ec21..ab7d0343a5 100644 --- a/src/real_time_propagation/RT_Glesser_evolve.F +++ b/src/real_time_propagation/RT_Glesser_evolve.F @@ -14,7 +14,7 @@ subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) ! T0+dt = T+dt' ! use pars, ONLY:SP,cZERO - use electrons, ONLY:levels,spin_occ + use electrons, ONLY:levels,spin_occ,n_sp_pol use R_lattice, ONLY:bz_samp use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_G_k_range use real_time, ONLY:l_RT_EULER,l_RT_EXP,l_RT_INV, & @@ -27,31 +27,32 @@ subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) type(levels), intent(in) :: En ! real(SP), intent(in) :: dT,dTp - complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work space ! logical :: l_RT_STD - integer :: ik + integer :: ik,i_sp ! dG_out=cZERO ! l_RT_STD=.not.(l_RT_ACC.or.l_RT_DIAG) ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if( .not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! - if (l_RT_EXP.and.l_RT_ACC ) call RT_EXP_step_accurate(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) - if (l_RT_EXP.and.l_RT_STD ) call RT_EXP_step_std(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) + if (l_RT_EXP.and.l_RT_ACC ) call RT_EXP_step_accurate(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) + if (l_RT_EXP.and.l_RT_STD ) call RT_EXP_step_std(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) ! - if (l_RT_EULER ) call RT_EULER_step(dG_in(:,:,ik),dG_out(:,:,ik),ik,En%nbf,dT) + if (l_RT_EULER ) call RT_EULER_step(dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,En%nbf,dT) ! - if (l_RT_INV.and.l_RT_ACC ) call RT_INV_step_accurate(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) - if (l_RT_INV.and.l_RT_DIAG) call RT_INV_step_diago(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) - if (l_RT_INV.and.l_RT_STD ) call RT_INV_step_std(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) + if (l_RT_INV.and.l_RT_ACC ) call RT_INV_step_accurate(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) + if (l_RT_INV.and.l_RT_DIAG) call RT_INV_step_diago(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) + if (l_RT_INV.and.l_RT_STD ) call RT_INV_step_std(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) ! ! Here the term G(T0) [dG_old] is added to dG(t) ! @@ -59,25 +60,26 @@ subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) ! ! Dephasing is integrated analitically in this case. ! - if( l_RT_RWA) call RT_apply_RWA(ik,En,kpt,dT,dTp,dG_out(:,:,ik),dG_old(:,:,ik)) + if( l_RT_RWA) call RT_apply_RWA(ik,i_sp,En,kpt,dT,dTp,dG_out(:,:,ik,i_sp),dG_old(:,:,ik,i_sp)) ! - if(.not.l_RT_RWA) call RT_Dephasing_step(dG_out(:,:,ik),dG_old(:,:,ik),ik,dT) + if(.not.l_RT_RWA) call RT_Dephasing_step(dG_out(:,:,ik,i_sp),dG_old(:,:,ik,i_sp),ik,i_sp,dT) ! ! Carriers relaxation step: ! ! G(T0+dt) = G(T0) - i dt * Sigma_relax(T) ! - call RT_Scattering_step(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) + call RT_Scattering_step(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) ! - call RT_G_symmetrization(dG_out(:,:,ik),ik) + call RT_G_symmetrization(dG_out(:,:,ik,i_sp),ik,i_sp) ! enddo + enddo ! contains ! - subroutine RT_G_symmetrization(G_inout,ik) + subroutine RT_G_symmetrization(G_inout,ik,i_sp) ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp complex(SP), intent(inout) :: G_inout(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) ! integer :: ib,ibp @@ -88,11 +90,11 @@ subroutine RT_G_symmetrization(G_inout,ik) ! G_inout(ib,ib)=cmplx(0._SP,aimag(G_inout(ib,ib))) ! - E_occ_tmp= aimag(G_inout(ib,ib))+ aimag(G_lesser_reference(ib,ib,ik)) - H_occ_tmp=-aimag(G_inout(ib,ib))+ ( spin_occ-aimag(G_lesser_reference(ib,ib,ik)) ) + E_occ_tmp= aimag(G_inout(ib,ib))+ aimag(G_lesser_reference(ib,ib,ik,i_sp)) + H_occ_tmp=-aimag(G_inout(ib,ib))+ ( spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp)) ) ! - if ( E_occ_tmp<0._SP .or. H_occ_tmp>spin_occ ) G_inout(ib,ib)= G_lesser_reference(ib,ib,ik) - if ( H_occ_tmp<0._SP .or. E_occ_tmp>spin_occ ) G_inout(ib,ib)=cmplx(0._SP,spin_occ)-G_lesser_reference(ib,ib,ik) + if ( E_occ_tmp<0._SP .or. H_occ_tmp>spin_occ ) G_inout(ib,ib)= G_lesser_reference(ib,ib,ik,i_sp) + if ( H_occ_tmp<0._SP .or. E_occ_tmp>spin_occ ) G_inout(ib,ib)=cmplx(0._SP,spin_occ)-G_lesser_reference(ib,ib,ik,i_sp) ! do ibp=ib+1,RT_bands(2) ! diff --git a/src/real_time_propagation/RT_INV_step_accurate.F b/src/real_time_propagation/RT_INV_step_accurate.F index 994d317f40..39b33bc326 100644 --- a/src/real_time_propagation/RT_INV_step_accurate.F +++ b/src/real_time_propagation/RT_INV_step_accurate.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The last term in the following come from the fact that G0=G_reference ! is not included in G(t) nor in G(t+dt) @@ -31,7 +31,7 @@ subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -49,22 +49,22 @@ subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! complex(SP), pointer :: vec_dG_out(:) ! - H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! - call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),H2_k,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),H2_k,M2_tmp) G_com=M1_tmp+M2_tmp ! - H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! call M_by_M_omp('n','n',RT_nbands,H1_k,dG_old,M1_tmp) call M_by_M_omp('n','n',RT_nbands,dG_old,H2_k,M2_tmp) dG_out=G_com+M1_tmp+M2_tmp ! !******************************************************* - !U_k=Ho_plus_Sigma(:,:,ik,1) + !U_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) !call SERIAL_HERMITIAN_diagonalization(RT_nbands,U_k,En) !! !! Generate the matrix diff --git a/src/real_time_propagation/RT_INV_step_diago.F b/src/real_time_propagation/RT_INV_step_diago.F index f940851435..0e89948fcd 100644 --- a/src/real_time_propagation/RT_INV_step_diago.F +++ b/src/real_time_propagation/RT_INV_step_diago.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! G(T+dt)-G(T)=-idt/2[H,G(T+dt)+G(T)]-idt[H,G0] ! @@ -27,7 +27,7 @@ subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -46,15 +46,15 @@ subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! logical :: l_use_superindex=.true. ! - H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! - call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),H2_k,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),H2_k,M2_tmp) G_com=M1_tmp+M2_tmp ! - H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! call M_by_M_omp('n','n',RT_nbands,H1_k,dG_old,M1_tmp) call M_by_M_omp('n','n',RT_nbands,dG_old,H2_k,M2_tmp) @@ -62,12 +62,12 @@ subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! ! Diagonalize U_k ! - U_k=Ho_plus_Sigma(:,:,ik,1) + U_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) call SERIAL_HERMITIAN_diagonalization(RT_nbands,U_k,En) ! ! Implementation works, and it is much faster than before ! However it is not sensitive - !U_k=cmplx(Ho_plus_Sigma(:,:,ik,1),kind=DP) + !U_k=cmplx(Ho_plus_Sigma(:,:,ik,i_sp_pol),kind=DP) !call ZHEEV('V','U',RT_nbands,U_k,RT_nbands,En,v_cmplx,lwork,v_real,i_fail) ! ! Rotate G_com in the new basis set diff --git a/src/real_time_propagation/RT_INV_step_std.F b/src/real_time_propagation/RT_INV_step_std.F index 9eca8f06f6..921055bf13 100644 --- a/src/real_time_propagation/RT_INV_step_std.F +++ b/src/real_time_propagation/RT_INV_step_std.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! use pars, ONLY:SP,cI use wrapper_omp, ONLY:M_by_M_omp @@ -16,7 +16,7 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -40,7 +40,7 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! ! Taylor expansion ! - H_k=cI*deltaT/2._SP*Ho_plus_Sigma(:,:,ik,1) + H_k=cI*deltaT/2._SP*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! if(l_use_lin_sys) then ! @@ -95,11 +95,11 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) call M_by_M_omp('n','n',RT_nbands,T1_k,dG_old,M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,T2_k,dG_out) ! - call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),T2_km1,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),T2_km1,M2_tmp) dG_out=dG_out+(M1_tmp+M2_tmp) ! - call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik),M2_tmp) + call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M2_tmp) call M_by_M_omp('n','n',RT_nbands,M2_tmp,T2_km1,M1_tmp) dG_out=dG_out+M1_tmp-dG_old ! @@ -107,9 +107,9 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! ! dG_out = G(T0+dt) -G(T0) = U1(T;dt) G(T0) U2(T;-dt) - G(T0) ! - call M_by_M_omp('n','n',RT_nbands,T1_k,dG_old+G_lesser_reference(:,:,ik),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,T1_k,dG_old+G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,T2_k,dG_out) - dG_out=dG_out-dG_old-G_lesser_reference(:,:,ik) + dG_out=dG_out-dG_old-G_lesser_reference(:,:,ik,i_sp_pol) ! endif ! diff --git a/src/real_time_propagation/RT_Integrator.F b/src/real_time_propagation/RT_Integrator.F index 02d7370f43..65c1b34069 100644 --- a/src/real_time_propagation/RT_Integrator.F +++ b/src/real_time_propagation/RT_Integrator.F @@ -47,10 +47,10 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) use R_lattice, ONLY:bz_samp use RT_control, ONLY:TIME_adjust use real_time, ONLY:Integrator_step,RT_nk,RT_bands,a_tableau,b_tableau,& -& c_tableau,RWA_table,Integrator_nsteps,G_lesser_reference,& +& c_tableau,RWA_table,Int_Ns=>Integrator_nsteps,G_lesser_reference,& & NE_time,NE_i_time,RT_step,RT_dyn_step use fields, ONLY:gauge_field - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use timing_m, ONLY:timing use parallel_m, ONLY:PAR_G_k_range ! @@ -58,9 +58,9 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! type(bz_samp), intent(in) :: k,q type(levels), intent(inout) :: E - complex(SP), intent(inout) :: G_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(out) :: dG_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(inout) :: G_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(out) :: dG_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) type(gauge_field), intent(in) :: A_old type(gauge_field), intent(out) :: A_new ! @@ -68,18 +68,18 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! integer :: i_step real(SP) :: delta_T1,delta_T2,delta_T3 - complex(SP) :: dG_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),Integrator_nsteps+1) + complex(SP) :: dG_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol,Int_Ns+1) ! - type(gauge_field) :: A_tmp(Integrator_nsteps+1) + type(gauge_field) :: A_tmp(Int_Ns+1) ! call timing('RT integrator',OPR='start') ! - dG_tmp(:,:,:,1)=dG_old - A_tmp(1) =A_old + dG_tmp(:,:,:,:,1)=dG_old + A_tmp(1) =A_old ! Integrator_step=1 ! - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns ! if (a_tableau(i_step)==0._SP) cycle ! @@ -89,7 +89,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! Evaluate @ T+dt1 ! - call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,i_step-1),dG_tmp(:,:,:,i_step),delta_T1,delta_T3) + call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,:,i_step-1),dG_tmp(:,:,:,:,i_step),delta_T1,delta_T3) ! ! ... Update of logicals before the occupations update ! @@ -97,11 +97,11 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) call RT_relaxation_logicals( ) #endif ! - call RT_occupations_eval(dG_tmp(:,:,:,i_step)) + call RT_occupations_eval(dG_tmp(:,:,:,:,i_step)) ! ! Fields @ T+dt2 ! - call RT_propagate_fields(E,k,A_old,A_tmp(i_step),dG_tmp(:,:,:,i_step),NE_time,delta_T2) + call RT_propagate_fields(E,k,A_old,A_tmp(i_step),dG_tmp(:,:,:,:,i_step),NE_time,delta_T2) ! Integrator_step=Integrator_step+1 ! @@ -109,7 +109,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! Recalculate H and S using G(t+dt1) ! - call RT_Hamiltonian(dG_tmp(:,:,:,i_step),A_tmp(i_step),E,k) ! The time specifications here is useless + call RT_Hamiltonian(dG_tmp(:,:,:,:,i_step),A_tmp(i_step),E,k) ! The time specifications here is useless ! #if defined _RT_SCATT call RT_relaxation(E,k,q,NE_time+delta_T1) ! since nothing explicitely depends on time @@ -121,8 +121,8 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! final step @ T+dt ! - call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,Integrator_nsteps),dG_tmp(:,:,:,Integrator_nsteps+1), & -& RT_dyn_step,RT_dyn_step*RWA_table(Integrator_nsteps+1)) + call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,:,Int_Ns),dG_tmp(:,:,:,:,Int_Ns+1), & +& RT_dyn_step,RT_dyn_step*RWA_table(Int_Ns+1)) ! call RT_build_dG_new() ! @@ -136,7 +136,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! Fields @ T+dT ! - call RT_propagate_fields(E,k,A_old,A_tmp(Integrator_nsteps+1),dG_new,NE_time,RT_dyn_step) + call RT_propagate_fields(E,k,A_old,A_tmp(Int_Ns+1),dG_new,NE_time,RT_dyn_step) ! call RT_build_A_new() ! @@ -156,50 +156,53 @@ subroutine RT_build_dG_new() ! use parallel_m, ONLY:PAR_IND_Xk_ibz use real_time, ONLY:RTibz + use electrons, ONLY:n_sp_pol ! ! Now I remove dG_old from dG_tmp and rescale to a_tableau ! - integer :: ik + integer :: ik,i_sp ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if (.not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns if (a_tableau(i_step)==0._SP) cycle - dG_tmp(:,:,ik,i_step)=(dG_tmp(:,:,ik,i_step)-dG_old(:,:,ik))/a_tableau(i_step) + dG_tmp(:,:,ik,i_sp,i_step)=(dG_tmp(:,:,ik,i_sp,i_step)-dG_old(:,:,ik,i_sp))/a_tableau(i_step) enddo - dG_tmp(:,:,ik,Integrator_nsteps+1)=dG_tmp(:,:,ik,Integrator_nsteps+1)-dG_old(:,:,ik) + dG_tmp(:,:,ik,i_sp,Int_Ns+1)=dG_tmp(:,:,ik,i_sp,Int_Ns+1)-dG_old(:,:,ik,i_sp) ! ! Finally I average using b_tableau ! - dG_new(:,:,ik)=dG_old(:,:,ik) - do i_step=1,Integrator_nsteps - dG_new(:,:,ik)=dG_new(:,:,ik)+dG_tmp(:,:,ik,i_step+1)*b_tableau(i_step) + dG_new(:,:,ik,i_sp)=dG_old(:,:,ik,i_sp) + do i_step=1,Int_Ns + dG_new(:,:,ik,i_sp)=dG_new(:,:,ik,i_sp)+dG_tmp(:,:,ik,i_sp,i_step+1)*b_tableau(i_step) enddo ! enddo + enddo ! - G_new=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2))+dG_new + G_new=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:)+dG_new ! end subroutine RT_build_dG_new ! subroutine RT_build_A_new() ! - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns if (a_tableau(i_step)==0._SP) cycle A_tmp(i_step)%vecpot =(A_tmp(i_step)%vecpot -A_old%vecpot)/a_tableau(i_step) A_tmp(i_step)%vecpot_vel=(A_tmp(i_step)%vecpot_vel-A_old%vecpot_vel)/a_tableau(i_step) A_tmp(i_step)%vecpot_acc=(A_tmp(i_step)%vecpot_acc-A_old%vecpot_acc)/a_tableau(i_step) enddo - A_tmp(Integrator_nsteps+1)%vecpot =A_tmp(Integrator_nsteps+1)%vecpot -A_old%vecpot - A_tmp(Integrator_nsteps+1)%vecpot_vel=A_tmp(Integrator_nsteps+1)%vecpot_vel-A_old%vecpot_vel - A_tmp(Integrator_nsteps+1)%vecpot_acc=A_tmp(Integrator_nsteps+1)%vecpot_acc-A_old%vecpot_acc + A_tmp(Int_Ns+1)%vecpot =A_tmp(Int_Ns+1)%vecpot -A_old%vecpot + A_tmp(Int_Ns+1)%vecpot_vel=A_tmp(Int_Ns+1)%vecpot_vel-A_old%vecpot_vel + A_tmp(Int_Ns+1)%vecpot_acc=A_tmp(Int_Ns+1)%vecpot_acc-A_old%vecpot_acc ! ! Finally I average using b_tableau ! A_new=A_old - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns A_new%vecpot =A_new%vecpot +A_tmp(i_step+1)%vecpot *b_tableau(i_step) A_new%vecpot_vel=A_new%vecpot_vel+A_tmp(i_step+1)%vecpot_vel*b_tableau(i_step) A_new%vecpot_acc=A_new%vecpot_acc+A_tmp(i_step+1)%vecpot_acc*b_tableau(i_step) diff --git a/src/real_time_propagation/RT_Scattering_step.F b/src/real_time_propagation/RT_Scattering_step.F index cb8e9427f8..5eacf31329 100644 --- a/src/real_time_propagation/RT_Scattering_step.F +++ b/src/real_time_propagation/RT_Scattering_step.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM DS ! -subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The propagation of the scattering part is done in terms of electrons and holes occupations. ! The lifetimes used (computed by RT_relaxation) are all constructed in terms of f_e and f_h @@ -43,7 +43,7 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(inout) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT ! integer :: ib @@ -60,8 +60,8 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) f_(1)=RT_el_occ%N(ib,ik) f_(2)=RT_ho_occ%N(ib,ik) ! - f0(1)= aimag(G_lesser_reference(ib,ib,ik)) - f0(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik)) + f0(1)= aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) + f0(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) df(1)= RT_el_occ%dN(ib,ik) df(2)=-RT_el_occ%dN(ib,ik) ! @@ -111,8 +111,8 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) ! f_inf(2)= GAMMA_(1)/GAMMA__TOT*spin_occ !endif !if( GAMMA__TOT<=0._SP ) then - ! f_inf(1)= aimag(G_lesser_reference(ib,ib,ik)) - ! f_inf(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik)) + ! f_inf(1)= aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) + ! f_inf(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) !endif !df_out(:) = -deltaT*(GAMMA0_TOT*df(:) + GAMMA0_TOT*(f0(:)-f_inf(:)) + & !& dGAMMA_TOT*df(:) + dGAMMA_TOT*(f0(:)-f_inf(:)) ) diff --git a/src/real_time_propagation/RT_apply_RWA.F b/src/real_time_propagation/RT_apply_RWA.F index 2b011f2c9e..3c3a06d53f 100644 --- a/src/real_time_propagation/RT_apply_RWA.F +++ b/src/real_time_propagation/RT_apply_RWA.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM DS ! -subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) +subroutine RT_apply_RWA(ik,i_sp,E,k,dT,dTp,dG_out,dG_in) ! use pars, ONLY:SP,cONE use electrons, ONLY:levels @@ -15,7 +15,7 @@ subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp type(levels), intent(in) :: E type(bz_samp),intent(in) :: k real(SP), intent(in) :: dT,dTp @@ -44,7 +44,7 @@ subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) if (NE_time0._SP) sumGAMMA=0._SP if (NE_time>RT_deph_range(2).and.RT_deph_range(2)>0._SP) sumGAMMA=0._SP ! - deltaE=RT_levels%E(i_n,ik,1)-RT_levels%E(i_np,ik,1) + deltaE=RT_levels%E(i_n,ik,i_sp)-RT_levels%E(i_np,ik,i_sp) ! if (l_RT_EXP) then ! @@ -88,7 +88,7 @@ subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) ! It is higly non satisfactory that ! Gamma_neq[f_eq] /= Gamma_eq (1) ! This explains the need for the special definition - ! sumGAMMA=abs(E%W(i_n,ik,1))+abs(E%W(i_np,ik,1)) (2) + ! sumGAMMA=abs(E%W(i_n,ik,i_sp))+abs(E%W(i_np,ik,i_sp)) (2) ! instead of ! sumGAMMA=sum(REF_lifetime(i_n,ik,:)) (3) ! with i_n=i_np. diff --git a/src/real_time_propagation/RT_occupations_eval.F b/src/real_time_propagation/RT_occupations_eval.F index 76f066b011..09074a54e2 100644 --- a/src/real_time_propagation/RT_occupations_eval.F +++ b/src/real_time_propagation/RT_occupations_eval.F @@ -13,20 +13,23 @@ subroutine RT_occupations_eval(dG) use RT_occupations, ONLY:RT_el_occ,RT_ho_occ use real_time, ONLY:RTibz,RT_bands,RT_nk,RT_nbands,G_lesser_reference,l_RT_rotate_DM use hamiltonian, ONLY:H_rotation - use electrons, ONLY:spin_occ + use electrons, ONLY:spin_occ,n_sp_pol ! implicit none ! - complex(SP), intent(in) :: dG(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work Space ! - integer :: ik,ib + integer :: ik,ib,i_sp real(SP) :: df_H complex(SP) :: G_rot(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)),& & G_ref(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) logical, external :: RT_do_it ! + i_sp=1 + if (n_sp_pol==2) call error("Occupations eval not coded for n_sp_pol=2") + ! ! Update the occupations: ! RT_delta_occupations are always sensitive to small changes ! for Gref~spin_occ RT_H_occ is also sensitive @@ -41,10 +44,10 @@ subroutine RT_occupations_eval(dG) if (.not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! if (l_RT_rotate_DM.and.(RT_do_it('OUT').or.RT_do_it('CARR'))) then - G_rot=G_lesser_reference(:,:,ik)+dG(:,:,ik) - call OBS_rotate(H_rotation(:,:,ik,1),G_rot,RT_nbands,1) - G_ref=G_lesser_reference(:,:,ik) - call OBS_rotate(H_rotation(:,:,ik,1),G_ref,RT_nbands,1) + G_rot=G_lesser_reference(:,:,ik,i_sp)+dG(:,:,ik,i_sp) + call OBS_rotate(H_rotation(:,:,ik,i_sp),G_rot,RT_nbands,1) + G_ref=G_lesser_reference(:,:,ik,i_sp) + call OBS_rotate(H_rotation(:,:,ik,i_sp),G_ref,RT_nbands,1) endif ! if (l_RT_rotate_DM.and.(RT_do_it('OUT').or.RT_do_it('CARR'))) then @@ -54,20 +57,20 @@ subroutine RT_occupations_eval(dG) ! This would be the correct definition ! RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_ref(ib,ib)) ! but I use this definition to consistently reconstruct f from df in ypp - RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_lesser_reference(ib,ib,ik)) + RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_lesser_reference(ib,ib,ik,i_sp)) enddo else do ib=RT_bands(1),RT_bands(2) ! - RT_el_occ%N(ib,ik)= aimag(dG(ib,ib,ik))+aimag(G_lesser_reference(ib,ib,ik)) + RT_el_occ%N(ib,ik)= aimag(dG(ib,ib,ik,i_sp))+aimag(G_lesser_reference(ib,ib,ik,i_sp)) ! ! AM, July 2015. Intel compilers nest in ordered way the mathematical parenthesis. By using ! df_H this problem is solved. ! - df_H =spin_occ-aimag(G_lesser_reference(ib,ib,ik)) - RT_ho_occ%N(ib,ik)=-aimag(dG(ib,ib,ik))+ df_H + df_H =spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp)) + RT_ho_occ%N(ib,ik)=-aimag(dG(ib,ib,ik,i_sp))+ df_H ! - RT_el_occ%dN(ib,ik)=aimag(dG(ib,ib,ik)) + RT_el_occ%dN(ib,ik)=aimag(dG(ib,ib,ik,i_sp)) enddo endif ! diff --git a/src/real_time_propagation/RT_propagate_fields.F b/src/real_time_propagation/RT_propagate_fields.F index e81777bb80..3a59969f89 100644 --- a/src/real_time_propagation/RT_propagate_fields.F +++ b/src/real_time_propagation/RT_propagate_fields.F @@ -25,7 +25,7 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! use pars, ONLY:SP,pi use units, ONLY:SPEED_OF_LIGHT - use electrons, ONLY:levels,nel + use electrons, ONLY:levels,nel,n_sp_pol use R_lattice, ONLY:bz_samp use X_m, ONLY:global_gauge use parallel_m, ONLY:PAR_G_k_range @@ -41,7 +41,7 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) real(SP), intent(in) :: T,T_step type(gauge_field), intent(in) :: A_old type(gauge_field), intent(out) :: A_new - complex(SP), intent(in) :: G_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: G_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work space ! diff --git a/src/real_time_propagation/RT_time_step_update.F b/src/real_time_propagation/RT_time_step_update.F index d1c3e6e40a..45a411ec25 100644 --- a/src/real_time_propagation/RT_time_step_update.F +++ b/src/real_time_propagation/RT_time_step_update.F @@ -19,7 +19,7 @@ subroutine RT_time_step_update( E ) use RT_control, ONLY:TIME_adjust use RT_output_m, ONLY:TIME_STEP_desc use com, ONLY:msg - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz use parallel_int, ONLY:PP_redux_wait use interfaces, ONLY:DESC_write @@ -32,7 +32,7 @@ subroutine RT_time_step_update( E ) ! Work Space ! logical :: l_Update_Time_Step_Manual - integer :: ib,ibp,ik,nT_updated,i_desc_ref + integer :: ib,ibp,ik,i_sp_pol,nT_updated,i_desc_ref complex(SP) :: dG_dT_max(2),dG_dT(2),ERROR,dG(3) real(SP) :: dT_now,dT_previous,dT_next #if defined _RT_SCATT @@ -54,19 +54,21 @@ subroutine RT_time_step_update( E ) ! if(l_update_time_step_manual) then ! + do i_sp_pol=1,n_sp_pol do ik=1,RT_nk ! if( .not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle do ib=RT_bands(1),E%nbf(1) do ibp=E%nbf(1)+1,RT_bands(2) - dG_lesser(ib,ibp,ik,:)=cZERO - dG_lesser(ibp,ib,ik,:)=cZERO - G_lesser(ib,ibp,ik,:)=cZERO - G_lesser(ibp,ib,ik,:)=cZERO + dG_lesser(ib,ibp,ik,i_sp_pol,:)=cZERO + dG_lesser(ibp,ib,ik,i_sp_pol,:)=cZERO + G_lesser(ib,ibp,ik,i_sp_pol,:)=cZERO + G_lesser(ibp,ib,ik,i_sp_pol,:)=cZERO enddo enddo ! enddo + enddo ! dT_next=dT_now*RT_step_manual_prefactor ! @@ -77,23 +79,25 @@ subroutine RT_time_step_update( E ) dG_dT_max =cZERO dG =cZERO ! + do i_sp_pol=1,n_sp_pol do ik=1,RT_nk ! if( .not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! do ib=RT_bands(1),RT_bands(2) do ibp=RT_bands(1),RT_bands(2) - dG_dT(1)=(dG_lesser(ib,ibp,ik,i_MEM_prev)-dG_lesser(ib,ibp,ik,i_MEM_old))/dT_previous - dG_dT(2)=(dG_lesser(ib,ibp,ik,i_MEM_now)-dG_lesser(ib,ibp,ik,i_MEM_prev))/dT_now + dG_dT(1)=(dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_prev)-dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_old))/dT_previous + dG_dT(2)=(dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_now)-dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_prev))/dT_now if ( abs(dG_dT(2)) > abs(dG_dT_max(2)) ) then - dG(1)=dG_lesser(ib,ibp,ik,i_MEM_old) - dG(2)=dG_lesser(ib,ibp,ik,i_MEM_prev) - dG(3)=dG_lesser(ib,ibp,ik,i_MEM_now) + dG(1)=dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_old) + dG(2)=dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_prev) + dG(3)=dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_now) dG_dT_max=dG_dT endif enddo enddo enddo + enddo ! call PP_redux_wait(dG,COMM=PAR_COM_Xk_ibz_INDEX%COMM) call PP_redux_wait(dG_dT_max,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/ypp/real_time/RT_G_two_times_build.F b/ypp/real_time/RT_G_two_times_build.F index 2fe03ba163..95ec47cf24 100644 --- a/ypp/real_time/RT_G_two_times_build.F +++ b/ypp/real_time/RT_G_two_times_build.F @@ -10,10 +10,10 @@ subroutine RT_G_two_times_build(en,kpt,qpt) use pars, ONLY:SP,DP,cZERO,cI,cONE,cZERO,schlen use units, ONLY:FS2AUT,HA2EV use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use parser_m, ONLY:parser use matrix_operate, ONLY:hermitian - use stderr, ONLY:real2ch + use stderr, ONLY:real2ch,intc use wrapper, ONLY:M_by_M use com, ONLY:msg,of_open_close use IO_int, ONLY:io_control @@ -35,10 +35,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! Workspace ! real(SP) :: T_c,REF_diff,TIME_diff,deph_factor -#if !defined _PAR_IO - integer :: IO_ACT -#endif - integer :: ID,ik,ik_RT,ib1,ib2,io_err,i_T(2),i_w,i_T1,i_T2,i_Tc,i_kind,i_t_tmp,Nt + integer :: ID,i_sp,ik,ik_RT,ib1,ib2,io_err,i_T(2),i_w,i_T1,i_T2,i_Tc,i_kind,i_t_tmp,Nt character(2) :: function_name logical :: include_eq_occ,keep_cc,keep_vv,keep_cv,keep_vc,& & build_G_ret,build_G_adv,build_G_les,build_G_grt,build_Spect,& @@ -48,8 +45,8 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! Allocs ! - complex(SP), allocatable :: rho_T(:,:,:),b_rho_T(:,:,:),H_rho_T(:,:,:,:),& -& F_k_tmtp(:,:),G_ret(:,:,:),G_tmp(:,:),TMP_M(:,:,:),& + complex(SP), allocatable :: rho_T(:,:,:,:),b_rho_T(:,:,:,:),H_rho_T(:,:,:,:,:),& +& F_k_tmtp(:,:,:),G_ret(:,:,:,:),G_tmp(:,:),TMP_M(:,:,:),& & G_w(:) ! integer, external :: io_RT_components @@ -95,32 +92,32 @@ subroutine RT_G_two_times_build(en,kpt,qpt) YAMBO_ALLOC(G_tmp,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2))) G_tmp=cZERO ! - YAMBO_ALLOC( rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) - YAMBO_ALLOC(b_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) - YAMBO_ALLOC(H_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,4)) + YAMBO_ALLOC( rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) + YAMBO_ALLOC(b_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) + YAMBO_ALLOC(H_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,4)) rho_T=cZERO b_rho_T=cZERO H_rho_T=cZERO ! - YAMBO_ALLOC(Ho_plus_Sigma,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(Ho_plus_Sigma,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) Ho_plus_Sigma=cZERO - YAMBO_ALLOC(H_EQ,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(H_EQ,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) H_EQ=cZERO - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,1)) dG_lesser=cZERO ! if(include_eq_occ) then - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1,2/),ID=ID) io_err=io_RT_components('REF',ID) endif ! - YAMBO_ALLOC(G_ret,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_ret,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) G_ret=cZERO ! ! I need to keep k resolution to interpolate on a path ! - YAMBO_ALLOC(F_k_tmtp,(RT_nk,RT_conf%T_n_steps)) ! F(k,t-t') for a given T + YAMBO_ALLOC(F_k_tmtp,(RT_nk,n_sp_pol,RT_conf%T_n_steps)) ! F(k,t-t') for a given T F_k_tmtp=cZERO ! YAMBO_ALLOC(TMP_M, (RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),2)) @@ -151,59 +148,51 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! Load rho and H[rho] ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser_K_section',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+1/),ID=ID) - io_err=io_RT_components('G_lesser_K_section',ID) - enddo -#endif ! ! rho and 1-rho ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! - if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik) + if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik,i_sp) if(.not.include_eq_occ) TMP_M(:,:,1)= cZERO ! - if( include_eq_occ) TMP_M(:,:,2)=( I1_matrix+cI*G_lesser_reference(:,:,ik) ) - if(.not.include_eq_occ) TMP_M(:,:,2)=( I1_matrix ) + if( include_eq_occ) TMP_M(:,:,2)= I1_matrix+cI*G_lesser_reference(:,:,ik,i_sp) + if(.not.include_eq_occ) TMP_M(:,:,2)= I1_matrix ! - b_rho_T(:,:,ik)= TMP_M(:,:,2)-rho_T(:,:,ik) - rho_T(:,:,ik)= TMP_M(:,:,1)+rho_T(:,:,ik) + b_rho_T(:,:,ik,i_sp)= TMP_M(:,:,2)-rho_T(:,:,ik,i_sp) + rho_T(:,:,ik,i_sp)= TMP_M(:,:,1)+rho_T(:,:,ik,i_sp) + ! + ! Build G_ret + ! + G_ret(:,:,ik,i_sp)=-cI*I1_matrix(:,:) + ! + H_rho_T(:,:,ik,i_sp,3)=H_EQ(:,:,ik,i_sp)+Ho_plus_sigma(:,:,ik,i_sp) + H_rho_T(:,:,ik,i_sp,4)=H_EQ(:,:,ik,i_sp)+Ho_plus_sigma(:,:,ik,i_sp) ! - enddo - ! - ! Build G_ret - ! - do ik=1,RT_nk - G_ret(:,:,ik)=-cI*I1_matrix(:,:) enddo - ! - H_rho_T(:,:,:,3)=H_EQ(:,:,:,1)+Ho_plus_sigma(:,:,:,1) - H_rho_T(:,:,:,4)=H_EQ(:,:,:,1)+Ho_plus_sigma(:,:,:,1) - ! + enddo ! ! Build G_lesser / G_ret / Spectr ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if(build_G_les) then - call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik),rho_T(:,:,ik),cZERO,G_tmp) - call M_by_M('n','c',RT_nbands,+rho_T(:,:,ik),G_ret(:,:,ik),cONE ,G_tmp) + call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik,i_sp),rho_T(:,:,ik,i_sp),cZERO,G_tmp) + call M_by_M('n','c',RT_nbands,+rho_T(:,:,ik,i_sp),G_ret(:,:,ik,i_sp),cONE ,G_tmp) endif ! if(build_G_grt) then - call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik),b_rho_T(:,:,ik),G_tmp) - call M_by_M('n','c',RT_nbands,-b_rho_T(:,:,ik),G_ret(:,:,ik),G_tmp) + call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik,i_sp),b_rho_T(:,:,ik,i_sp),G_tmp) + call M_by_M('n','c',RT_nbands,-b_rho_T(:,:,ik,i_sp),G_ret(:,:,ik,i_sp),G_tmp) endif ! - if(build_G_ret) G_tmp=G_ret(:,:,ik) - if(build_G_adv) G_tmp= hermitian(G_ret(:,:,ik)) - if(build_Spect) G_tmp=G_ret(:,:,ik)-hermitian(G_ret(:,:,ik)) + if(build_G_ret) G_tmp=G_ret(:,:,ik,i_sp) + if(build_G_adv) G_tmp= hermitian(G_ret(:,:,ik,i_sp)) + if(build_Spect) G_tmp=G_ret(:,:,ik,i_sp)-hermitian(G_ret(:,:,ik,i_sp)) ! do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) @@ -213,11 +202,12 @@ subroutine RT_G_two_times_build(en,kpt,qpt) if((ib1<=en%nbf(1).and.ib2> en%nbf(1)).and.(.not.keep_vc) ) cycle !if ( build_G_ret .and. (ib1> en%nbf(1).and.ib2<=en%nbf(1)).and. keep_cv ) G_tmp(ib1,ib2)=G_tmp(ib1,ib2)*rho_T(ib2,ib1,ik) !if ( build_G_ret .and. (ib1<=en%nbf(1).and.ib2> en%nbf(1)).and. keep_vc ) G_tmp(ib1,ib2)=G_tmp(ib1,ib2)*rho_T(ib2,ib1,ik) - F_k_tmtp(ik,i_Tc)=F_k_tmtp(ik,i_Tc)+G_tmp(ib1,ib2) + F_k_tmtp(ik,i_sp,i_Tc)=F_k_tmtp(ik,i_sp,i_Tc)+G_tmp(ib1,ib2) enddo enddo ! enddo + enddo ! deph_factor=1._SP ! @@ -246,19 +236,12 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! Load rho and H[rho] ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser_K_section',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+2/),ID=ID) - io_err=io_RT_components('G_lesser_K_section',ID) - enddo -#endif + ! ! exp(-abs(RT_time(i_t)*damp_factor)) ! - if(.not.l_dephase_rho) H_rho_T(:,:,:,i_kind)=H_EQ(:,:,:,1)+Ho_plus_sigma(:,:,:,1) + if(.not.l_dephase_rho) H_rho_T(:,:,:,:,i_kind)=H_EQ+Ho_plus_sigma ! if(l_dephase_rho) then ! @@ -267,7 +250,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) deph_factor=1._SP if((ib1> en%nbf(1).and.ib2<=en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) if((ib1<=en%nbf(1).and.ib2> en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) - H_rho_T(ib1,ib2,:,i_kind)=H_EQ(ib1,ib2,:,1)+Ho_plus_sigma(ib1,ib2,:,1)*deph_factor + H_rho_T(ib1,ib2,:,:,i_kind)=H_EQ(ib1,ib2,:,:)+Ho_plus_sigma(ib1,ib2,:,:)*deph_factor enddo enddo ! @@ -275,7 +258,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! if(i_kind==2) then ! - if(.not.l_dephase_rho) rho_T(:,:,:)=-cI*dG_lesser(:,:,:,1) + if(.not.l_dephase_rho) rho_T(:,:,:,:)=-cI*dG_lesser(:,:,:,:,1) ! if(l_dephase_rho) then ! @@ -284,7 +267,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) deph_factor=1._SP if((ib1> en%nbf(1).and.ib2<=en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) if((ib1<=en%nbf(1).and.ib2> en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) - rho_T(ib1,ib2,:)=-cI*dG_lesser(ib1,ib2,:,1)*deph_factor + rho_T(ib1,ib2,:,:)=-cI*dG_lesser(ib1,ib2,:,:,1)*deph_factor enddo enddo ! @@ -292,18 +275,20 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! rho and 1-rho ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! - if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik) + if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik,i_sp) if(.not.include_eq_occ) TMP_M(:,:,1)= cZERO ! - if( include_eq_occ) TMP_M(:,:,2)=( I1_matrix+cI*G_lesser_reference(:,:,ik) ) - if(.not.include_eq_occ) TMP_M(:,:,2)=( I1_matrix ) + if( include_eq_occ) TMP_M(:,:,2)= I1_matrix+cI*G_lesser_reference(:,:,ik,i_sp) + if(.not.include_eq_occ) TMP_M(:,:,2)= I1_matrix ! - b_rho_T(:,:,ik)= TMP_M(:,:,2)-rho_T(:,:,ik) - rho_T(:,:,ik)= TMP_M(:,:,1)+rho_T(:,:,ik) + b_rho_T(:,:,ik,i_sp)= TMP_M(:,:,2)-rho_T(:,:,ik,i_sp) + rho_T(:,:,ik,i_sp)= TMP_M(:,:,1)+rho_T(:,:,ik,i_sp) ! enddo + enddo ! endif ! @@ -311,17 +296,20 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! G^{(r)}(t+dt,t'-dt) = e^{-ih_{HSEX}[rho(t+dt)]dt} G^{(r)}(t,t') e^{-ih_{HSEX}[rho(t'-dt)]dt} ! + do i_sp=1,n_sp_pol do ik=1,RT_nk - TMP_M(:,:,1)=(H_rho_T(:,:,ik,1)+H_rho_T(:,:,ik,3))/2._SP - TMP_M(:,:,2)=(H_rho_T(:,:,ik,2)+H_rho_T(:,:,ik,4))/2._SP - call RT_apply_Texp(TMP_M(:,:,1),G_ret(:,:,ik),TMP_M(:,:,2),RT_conf%delta_T,RT_conf%damp_factor,5) + TMP_M(:,:,1)=(H_rho_T(:,:,ik,i_sp,1)+H_rho_T(:,:,ik,i_sp,3))/2._SP + TMP_M(:,:,2)=(H_rho_T(:,:,ik,i_sp,2)+H_rho_T(:,:,ik,i_sp,4))/2._SP + call RT_apply_Texp(TMP_M(:,:,1),G_ret(:,:,ik,i_sp),TMP_M(:,:,2),RT_conf%delta_T,RT_conf%damp_factor,5) + enddo enddo ! ! Store previous H_rho_T ! - H_rho_T(:,:,:,3)=H_rho_T(:,:,:,1) - H_rho_T(:,:,:,4)=H_rho_T(:,:,:,2) + H_rho_T(:,:,:,:,3)=H_rho_T(:,:,:,:,1) + H_rho_T(:,:,:,:,4)=H_rho_T(:,:,:,:,2) ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if( build_G_les ) then @@ -329,7 +317,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! Build G<(t,t') = -G(r)(t,t') rho(t') for t>t' ! PRA 92, 033419 (2015), Eq.(19a) ! - call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik),rho_T(:,:,ik),G_tmp) + call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik,i_sp),rho_T(:,:,ik,i_sp),G_tmp) ! endif ! @@ -338,13 +326,13 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! Build G>(t,t') = +G(r)(t,t') (1-rho(t')) for t>t' ! PRA 92, 033419 (2015), Eq.(19b) ! - call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik),b_rho_T(:,:,ik),G_tmp) + call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik,i_sp),b_rho_T(:,:,ik,i_sp),G_tmp) ! endif ! - if( build_G_ret ) G_tmp= G_ret(:,:,ik) - if( build_G_adv ) G_tmp=-G_ret(:,:,ik) - if( build_Spect ) G_tmp= G_ret(:,:,ik) + if( build_G_ret ) G_tmp= G_ret(:,:,ik,i_sp) + if( build_G_adv ) G_tmp=-G_ret(:,:,ik,i_sp) + if( build_Spect ) G_tmp= G_ret(:,:,ik,i_sp) ! ! PRA 92, 033419 (2015), Below Eq.(19) ! @@ -364,13 +352,14 @@ subroutine RT_G_two_times_build(en,kpt,qpt) !if ( build_G_adv .and. (ib1> en%nbf(1).and.ib2<=en%nbf(1)).and. keep_cv ) G_tmp(ib2,ib1)=rho_T(ib1,ib2,ik)*G_tmp(ib1,ib2) !if ( build_G_adv .and. (ib1<=en%nbf(1).and.ib2> en%nbf(1)).and. keep_vc ) G_tmp(ib2,ib1)=rho_T(ib1,ib2,ik)*G_tmp(ib1,ib2) ! - if( .not.build_G_adv ) F_k_tmtp(ik,i_T(1))=F_k_tmtp(ik,i_T(1))+ G_tmp(ib1,ib2) ! G_adv is zero for t>t' - if( .not.build_G_ret ) F_k_tmtp(ik,i_T(2))=F_k_tmtp(ik,i_T(2))-conjg(G_tmp(ib2,ib1)) ! G_ret is zero for tt' + if( .not.build_G_ret ) F_k_tmtp(ik,i_sp,i_T(2))=F_k_tmtp(ik,i_sp,i_T(2))-conjg(G_tmp(ib2,ib1)) ! G_ret is zero for t1) file_name=trim(file_name)//"_sp"//trim(intc(i_sp)) + call of_open_close(trim(file_name),'ot') + headings=(/" E[eV] ","Im[G(w)]","Re[G(w)]"/) + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + ! + G_w=cZERO + do ik_RT=1,RT_nk + G_w(:)=G_w(:)+GreenF_T_and_W%F_W(:,ik_RT+RT_nk*(i_sp-1))*RTibz%weights(ik_RT) + enddo + ! + do i_w=1,RT_conf%W_n_steps + odata=(/real(GreenF_T_and_W%W(i_w),SP)*HA2EV,real(-cI*G_w(i_w),SP),real(G_w(i_w),SP)/) + call msg('o '//trim(file_name),'',odata,INDENT=-2,USE_TABS=.true.) + enddo + ! + call of_open_close(trim(file_name)) + ! enddo ! - call of_open_close(trim(file_name)) - ! YAMBO_FREE(G_w) ! ! Print G(w,k) for specific k (only gamma for now) ! - file_name="G_k1_w" - call of_open_close(trim(file_name),'ot') - headings=(/" E[eV] ","Im[G(w)]","Re[G(w)]"/) - call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) - ! - do i_w=1,RT_conf%W_n_steps - odata=(/real(GreenF_T_and_W%W(i_w),SP)*HA2EV, & - & -real(cI*GreenF_T_and_W%F_W(i_w,1),SP), & - & real( GreenF_T_and_W%F_W(i_w,1),SP) /) - call msg('o '//trim(file_name),'',odata,INDENT=-2,USE_TABS=.true.) + do i_sp=1,n_sp_pol + ! + file_name="G_k1_w" + if (n_sp_pol>1) file_name="G_k1_sp"//trim(intc(i_sp))//"_w" + call of_open_close(trim(file_name),'ot') + headings=(/" E[eV] ","Im[G(w)]","Re[G(w)]"/) + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + ! + do i_w=1,RT_conf%W_n_steps + odata=(/real(GreenF_T_and_W%W(i_w),SP)*HA2EV, & + & -real(cI*GreenF_T_and_W%F_W(i_w,1+RT_nk*(i_sp-1)),SP), & + & real( GreenF_T_and_W%F_W(i_w,1+RT_nk*(i_sp-1)),SP) /) + call msg('o '//trim(file_name),'',odata,INDENT=-2,USE_TABS=.true.) + enddo + ! + call of_open_close(trim(file_name)) + ! enddo ! - call of_open_close(trim(file_name)) - ! ! DEBUG < + !do i_sp=1,n_sp_pol !do ik=1,RT_nk ! ! ! if(ik>99) cycle ! ! ! do i_dT=1,RT_conf%T_n_steps ! write(100+ik,*) RT_time(i_dT)/FS2AUT,& - ! & real(GreenF_T_and_W%F_T(i_dT,ik),SP),real(-cI*GreenF_T_and_W%F_T(i_dT,ik),SP) + ! & real(GreenF_T_and_W%F_T(i_dT,ik+RT_nk*(i_sp-1)),SP),real(-cI*GreenF_T_and_W%F_T(i_dT,ik+RT_nk*(i_sp-1)),SP) ! enddo ! ! ! do i_w=1,RT_conf%W_n_steps ! write(200+ik,*) real(GreenF_T_and_W%W(i_w))*HA2EV,& - ! & real(-cI*GreenF_T_and_W%F_W(i_w,ik),SP),real(GreenF_T_and_W%F_W(i_w,ik),SP) + ! & real(-cI*GreenF_T_and_W%F_W(i_w,ik+RT_nk*(i_sp-1)),SP),real(GreenF_T_and_W%F_W(i_w,ik+RT_nk*(i_sp-1)),SP) ! enddo ! ! !enddo + !enddo ! DEBUG > ! end subroutine RT_G_two_times_build diff --git a/ypp/real_time/RT_OBSERVABLES_IO.F b/ypp/real_time/RT_OBSERVABLES_IO.F index b25c2a6604..dc5cd9458a 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO.F +++ b/ypp/real_time/RT_OBSERVABLES_IO.F @@ -10,6 +10,7 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only use YPP_real_time, ONLY:RT_conf,OBS_el use pars, ONLY:DP,cZERO_DP,cZERO use R_lattice, ONLY:nkibz + use electrons, ONLY:n_sp_pol use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD,RD_CL,OP_RD_CL,manage_action,NONE,DUMP,LOG,OP_IF_START_RD_CL_IF_END use RT_control, ONLY:RT_control_alloc,RT_control_free,J_cache,P_cache,CACHE_OBS_steps,CACHE_OBS_steps_now @@ -37,9 +38,9 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only ! if (G_lesser_only) then ! - YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz,1)) + YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz,n_sp_pol,1)) ! - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz,n_sp_pol)) ! call io_control(ACTION=OP_RD_CL,COM=COM_here,MODE=DUMP,SEC=(/1,2/),ID=ID) io_G=io_RT_components('G_lesser_RESTART',ID) @@ -47,11 +48,8 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only if (present(IO_error)) IO_error=io_G/=0 if (io_G/=0) return ! - do ik=1,nkibz - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,nkibz) - call io_control(ACTION=IO_ACT,COM=COM_here,SEC=(/ik+2/),MODE=DUMP,ID=ID) - io_G=io_RT_components('G_lesser_RESTART_K_section',ID) - enddo + call io_control(ACTION=OP_RD_CL,COM=COM_here,SEC=(/3/),MODE=DUMP,ID=ID) + io_G=io_RT_components('G_lesser_RESTART_K_section',ID) ! endif ! diff --git a/ypp/real_time/RT_Polarization.F b/ypp/real_time/RT_Polarization.F index c2385c555d..b2dfe6c03e 100644 --- a/ypp/real_time/RT_Polarization.F +++ b/ypp/real_time/RT_Polarization.F @@ -70,7 +70,7 @@ subroutine RT_Polarization(en,k,q) ! Alloc !------- if (STRING_same(RT_pol_mode,"slice")) then - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,1)) dG_lesser=cZERO ! ! Time conf @@ -99,16 +99,8 @@ subroutine RT_Polarization(en,k,q) ! call gimme_a_G_Time_Point(i_T) ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+2/),ID=ID) - io_err=io_RT_components('G_lesser',ID) - enddo -#endif ! RT_P=cZERO ! @@ -143,7 +135,7 @@ subroutine RT_Polarization(en,k,q) enddo endif if (STRING_same(RT_pol_mode,"slice")) then - RT_P=RT_P+DIP_iR(ic,i_n,i_m,ik_mem,i_sp_pol)*dG_lesser(i_m,i_n,ik,1)/DL_vol*k%weights(ik) + RT_P=RT_P+DIP_iR(ic,i_n,i_m,ik_mem,i_sp_pol)*dG_lesser(i_m,i_n,ik,i_sp_pol,1)/DL_vol*k%weights(ik) endif enddo K_LOOP enddo diff --git a/ypp/real_time/RT_density.F b/ypp/real_time/RT_density.F index 54704a457b..0ea11ba8c1 100644 --- a/ypp/real_time/RT_density.F +++ b/ypp/real_time/RT_density.F @@ -11,7 +11,7 @@ subroutine RT_density(en,kpt,qpt) use units, ONLY:FS2AUT use R_lattice, ONLY:bz_samp use FFT_m, ONLY:fft_size,fft_dim - use electrons, ONLY:levels,n_spin + use electrons, ONLY:levels,n_spin,n_sp_pol use parser_m, ONLY:parser use stderr, ONLY:intc,real2ch use com, ONLY:msg,of_open_close @@ -41,7 +41,7 @@ subroutine RT_density(en,kpt,qpt) ! Allocs ! real(SP), allocatable :: drho(:),delta_magn(:,:) - complex(SP), allocatable :: G_loc(:,:,:) + complex(SP), allocatable :: G_loc(:,:,:,:) ! integer, external :: io_RT_components ! @@ -65,12 +65,12 @@ subroutine RT_density(en,kpt,qpt) ! if(load_G_history) then ch_ws(1)="Computing the density from the G lesser" - YAMBO_ALLOC(G_loc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_loc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) G_loc=cZERO - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,1)) dG_lesser=cZERO if(include_eq_occ) then - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) G_lesser_reference=cZERO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2/),ID=ID) io_err=io_RT_components('REFERENCE',ID) @@ -117,19 +117,11 @@ subroutine RT_density(en,kpt,qpt) ! call gimme_a_G_Time_Point(i_T) ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser_K_section',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+2/),ID=ID) - io_err=io_RT_components('G_lesser_K_section',ID) - enddo -#endif ! - if( include_eq_occ) G_loc=dG_lesser(:,:,:,1)+G_lesser_reference - if(.not.include_eq_occ) G_loc=dG_lesser(:,:,:,1) + if( include_eq_occ) G_loc=dG_lesser(:,:,:,:,1)+G_lesser_reference + if(.not.include_eq_occ) G_loc=dG_lesser(:,:,:,:,1) ! call el_density_matrix(G_loc,en,kpt,drho,RT_bands(1)) ! From 6396555d0624bc64ec8d468aa370d2d43cc7c42c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Apr 2025 22:57:20 +0200 Subject: [PATCH 0915/1367] Version 5.3.0, Revision 24497, Hash a596226a53 MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_HXC.F collisions/COLLISIONS_NEQ_GW_static.F collisions/COLLISIONS_alloc_and_free.F collisions/COLLISIONS_compose_nl.F collisions/COLLISIONS_compose_rt.F collisions/COLLISIONS_compose_sc.F collisions/COLLISIONS_linearize_and_IO.F collisions/COLLISIONS_load.F io_parallel/io_COLLISIONS.F modules/mod_collision_ext.F Changes: - [yambo_rt] Extending yambo_rt to case n_sp_pol=2. Working on collision files Patch sent by: Davide Sangalli --- configure | 22 ++++----- include/version/version.m4 | 6 +-- src/collisions/COLLISIONS_HXC.F | 51 +++++++++++--------- src/collisions/COLLISIONS_NEQ_GW_static.F | 12 ++--- src/collisions/COLLISIONS_alloc_and_free.F | 8 +-- src/collisions/COLLISIONS_compose_nl.F | 19 +++++--- src/collisions/COLLISIONS_compose_rt.F | 18 ++++--- src/collisions/COLLISIONS_compose_sc.F | 16 +++--- src/collisions/COLLISIONS_linearize_and_IO.F | 40 +++++++-------- src/collisions/COLLISIONS_load.F | 9 ++-- src/io_parallel/io_COLLISIONS.F | 3 +- src/modules/mod_collision_ext.F | 6 +-- 12 files changed, 112 insertions(+), 98 deletions(-) diff --git a/configure b/configure index e32575d053..eb2099af18 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24496 h.3ab512a2af. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24497 h.a596226a53. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24496 h.3ab512a2af' -PACKAGE_STRING='Yambo 5.3.0 r.24496 h.3ab512a2af' +PACKAGE_VERSION='5.3.0 r.24497 h.a596226a53' +PACKAGE_STRING='Yambo 5.3.0 r.24497 h.a596226a53' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24496 h.3ab512a2af to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24497 h.a596226a53 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24496 h.3ab512a2af:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24497 h.a596226a53:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24496 h.3ab512a2af +Yambo configure 5.3.0 r.24497 h.a596226a53 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24496 h.3ab512a2af, which was +It was created by Yambo $as_me 5.3.0 r.24497 h.a596226a53, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24496" -SHASH="3ab512a2af" +SREVISION="24497" +SHASH="a596226a53" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24496 h.3ab512a2af, which was +This file was extended by Yambo $as_me 5.3.0 r.24497 h.a596226a53, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24496 h.3ab512a2af +Yambo config.status 5.3.0 r.24497 h.a596226a53 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 447fa59550..a2e94641fe 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24496 h.3ab512a2af, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24497 h.a596226a53, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24496" -SHASH="3ab512a2af" +SREVISION="24497" +SHASH="a596226a53" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 4e27e8d584..0a53af3dbb 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -14,7 +14,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) use parser_m, ONLY:parser use com, ONLY:msg use frequency, ONLY:w_samp - use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_full_bands,n_met_bands + use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_full_bands,n_met_bands,n_sp_pol use LIVE_t, ONLY:live_timing use hamiltonian, ONLY:H_potential use BS, ONLY:BS_blk,n_BS_blks @@ -55,7 +55,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! Work Space ! integer :: i_coll,first_coll,last_coll,ig1,ig2,iqbz,iqibz,alloc_err,iqs,iGo_max,NG_max,NG_XC,LOCAL_COMM(2),& -& i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,iB,& +& i_n,i_k,i_k_s,i_sp,ip_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,iB,& & i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,i_steps,bands_to_load(2),n_colls,n_GmG,& & n_skip_colls,n_incl_colls logical :: l_HXC_collisions,eval_coll,l_compute_screening @@ -454,6 +454,7 @@ subroutine map_BSE_to_HXC_collisions() !DEBUG> endif ! + do ip_sp=1,n_sp_pol do i_q_fake=1,q%nbz ! if (.not.PAR_IND_Q_bz%element_1D(i_q_fake)) cycle @@ -465,8 +466,8 @@ subroutine map_BSE_to_HXC_collisions() do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) ! - if ( (i_np> n_met_bands(i_sp) .and. i_mp> n_met_bands(i_sp) ) ) cycle - if ( (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) ) cycle + if ( (i_np> n_met_bands(ip_sp) .and. i_mp> n_met_bands(ip_sp) ) ) cycle + if ( (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) ) cycle ! if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle @@ -475,16 +476,16 @@ subroutine map_BSE_to_HXC_collisions() i_p_bz_bse=BS_K_io_map(i_p_bz) ! i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) - j_BSE=BSS_eh_table_m1(i_p_bz_bse,i_mp,i_np,i_sp,i_sp) + j_BSE=BSS_eh_table_m1(i_p_bz_bse,i_mp,i_np,ip_sp,ip_sp) ! if (i_BSE==0.or.j_BSE==0) then n_skip_colls=n_skip_colls+1 !DEBUG< - !if(j_BSE==0) write(*,*) "Transition ignored ",i_p_bz_bse,i_mp,i_np,i_sp,i_sp + !if(j_BSE==0) write(*,*) "Transition ignored ",i_p_bz_bse,i_mp,i_np,i_sp !DEBUG> cycle - else - n_incl_colls=n_incl_colls+1 + else + n_incl_colls=n_incl_colls+1 endif ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then @@ -569,13 +570,14 @@ subroutine map_BSE_to_HXC_collisions() ! - The occupation factor here is already contained in the density matrix ! - Compared to the BSE case, the collisions are summed over the points in the star of i_p ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)-M_ij/spin_occ + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)-M_ij/spin_occ ! call live_timing(steps=i_steps) ! enddo enddo enddo + enddo ! i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) iB=mod(i_BSE-1,BS_K_dim(1))+1 @@ -594,12 +596,12 @@ subroutine compute_Hartree_collisions(cc_vv_only) ! Scattering geometry !===================== _ \ _ ! / / \ - ! G_p{np,mp} | | (i_p,i_p_s) + ! G_p{np,mp,ip_sp} | | (i_p,i_p_s) ! \_ _ _/ ! | ! | W(q=0) ! | - ! (i_n,i_k,1)------>----------.---------->----(i_m,i_k,1) + ! (i_n,i_k,i_sp)------>----------.---------->----(i_m,i_k,i_sp) ! ! logical, intent(in) :: cc_vv_only @@ -617,6 +619,7 @@ subroutine compute_Hartree_collisions(cc_vv_only) ! call scatter_Bamp(isc_H) ! + do ip_sp=1,n_sp_pol do i_q_fake=1,q%nbz ! if (.not.PAR_IND_Q_bz%element_1D(i_q_fake)) cycle @@ -629,8 +632,8 @@ subroutine compute_Hartree_collisions(cc_vv_only) do i_mp=COLL_bands(1),COLL_bands(2) do i_np=i_mp,COLL_bands(2) ! - cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & - & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) + cc_vv_colls=(i_np> n_met_bands(ip_sp) .and. i_mp>n_met_bands(ip_sp) ) .or. & + & (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) ! if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle @@ -638,8 +641,8 @@ subroutine compute_Hartree_collisions(cc_vv_only) if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle ! - iscp_H%is =(/i_np,i_p,1,i_sp/) - iscp_H%os =(/i_mp,i_p,1,i_sp/) + iscp_H%is =(/i_np,i_p,1,ip_sp/) + iscp_H%os =(/i_mp,i_p,1,ip_sp/) ! eval_coll=.not.all((/i_n==i_np,i_m==i_mp,i_k==i_p/)) if ( eval_coll) call scatter_Bamp(iscp_H) @@ -680,9 +683,11 @@ subroutine compute_Hartree_collisions(cc_vv_only) enddo endif ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)+4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp) & + & +4._SP*pi*pre_factor1+Co*pre_factor2 ! DS: 2023/10/25 Merge Check - !HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)+4._SP*pi*conjg(pre_factor1)+Co*pre_factor2 + !HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp) & + !& +4._SP*pi*conjg(pre_factor1)+Co*pre_factor2 ! call live_timing(steps=1) ! @@ -711,7 +716,8 @@ subroutine compute_Hartree_collisions(cc_vv_only) enddo endif ! - HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p)=HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p)+4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p,ip_sp) & + & +4._SP*pi*pre_factor1+Co*pre_factor2 ! call live_timing(steps=1) ! @@ -722,6 +728,7 @@ subroutine compute_Hartree_collisions(cc_vv_only) enddo ! enddo + enddo ! end subroutine compute_Hartree_collisions ! @@ -736,8 +743,8 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) ! _ _ _ _ \ _ _ _ _ ! / / \ ! / \ - ! / G_{np,mp} \ - ! (i_n,i_k,1)-->--.----------->---------.---->----(i_m,i_k,1) + ! / G_{np,mp,i_sp} \ + ! (i_n,i_k,i_sp)-->--.----------->---------.---->----(i_m,i_k,i_sp) ! (i_kmq,i_kmq_s) ! logical, intent(in) :: cc_vv_only @@ -884,10 +891,10 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) endif ! if(index(H_potential,"SEX")>0 .or. index(H_potential,"FOCK")>0) & -& HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq) & +& HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp) & & -4._SP/spin_occ*pi*(pre_factor1+pre_factor2) if(index(H_potential,"COH")>0 ) & -& COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq)=COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq) & +& COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp)=COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp) & & +2._SP *pi* pre_factor2 ! call live_timing(steps=1) diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index 0f901378c0..20d65534a4 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -193,9 +193,7 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! Spins ! i_k_sp = GW_NEQ_collisions%state(i_coll1,4) - i_p_sp = i_k_sp i_kmq_sp= i_k_sp - i_pmq_sp= i_k_sp ! isc%is =(/i_n ,i_k,i_k_s,i_k_sp/) isc%os =(/i_np,i_kmq,i_kmq_s,i_kmq_sp/) @@ -209,6 +207,8 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) i_m = GW_NEQ_collisions%state(i_coll2,1) i_mp = GW_NEQ_collisions%state(i_coll2,2) i_p = GW_NEQ_collisions%state(i_coll2,3) + i_p_sp = GW_NEQ_collisions%state(i_coll2,4) + i_pmq_sp= i_k_sp ! do i_p_star=1,k%nstar(i_p) ! @@ -260,13 +260,13 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! if (io_COLLs) then ! - GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz)=& -& GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz) +abs(pre_factor)**2 + GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz,i_p_sp)=& +& GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz,i_p_sp) +abs(pre_factor)**2 ! else ! - GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem)=& -& GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem)+abs(pre_factor)**2 + GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem,i_p_sp)=& +& GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem,i_p_sp)+abs(pre_factor)**2 ! endif ! diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 7a09110b70..5a326ad42f 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -10,7 +10,7 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use pars, ONLY:cZERO,rZERO,DP,SP use plasma, ONLY:N_plasma_poles_global use R_lattice, ONLY:nqbz,nkibz - use electrons, ONLY:n_met_bands,n_full_bands + use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol use parallel_m, ONLY:PAR_nPlasma,PAR_nQ_bz use collision_ext, ONLY:COLLISIONS_element,COH_COLL_element,HXC_COLL_element,GW_NEQ_COLL_element,& & COLL_bands,COLLISIONS_load_SP,COLLISIONS_CV_only,& @@ -169,12 +169,12 @@ subroutine local_alloc_and_free(COLL_element,COLL_grp) ! if (l_alloc.and.(l_v3.or.l_all)) then if(l_real) then - YAMBO_ALLOC(COLL_element(J)%v3_r,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + YAMBO_ALLOC(COLL_element(J)%v3_r,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2),n_sp_pol)) COLL_element(J)%v3_r=rZERO mem_size(1)=mem_size(1)+size(COLL_element(J)%v3_r) endif if(l_complex) then - YAMBO_ALLOC(COLL_element(J)%v3_c,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + YAMBO_ALLOC(COLL_element(J)%v3_c,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2),n_sp_pol)) COLL_element(J)%v3_c=cZERO mem_size(2)=mem_size(2)+size(COLL_element(J)%v3_c) endif @@ -214,7 +214,7 @@ subroutine local_alloc_and_free(COLL_element,COLL_grp) endif if (l_alloc.and.(l_table.or.l_all)) then !AMBO_ALLOC(COLL_element(J)%table,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - allocate(COLL_element(J)%table(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + allocate(COLL_element(J)%table(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2),n_sp_pol)) COLL_element(J)%table='f' COLL_grp%D=D mem_size(5)=mem_size(5)+size(COLL_element(J)%table) diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 95f70d26aa..650fd954fd 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -12,7 +12,7 @@ subroutine COLLISIONS_compose_nl(G_in) use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree!l_sc_hf,l_sc_cohsex,l_sc_exx use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_load_SP,COLLISIONS_CV_only - use electrons, ONLY:spin,n_met_bands,n_full_bands + use electrons, ONLY:spin,n_met_bands,n_full_bands,n_sp_pol use R_lattice, ONLY:nXkibz use parallel_m, ONLY:HEAD_QP_cpu,PAR_COM_Xk_ibz_INDEX use parallel_int, ONLY:PP_redux_wait @@ -23,11 +23,11 @@ subroutine COLLISIONS_compose_nl(G_in) ! implicit none ! - complex(SP), intent(in) :: G_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + complex(SP), intent(in) :: G_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol) ! ! Work Space ! - integer :: i_coll,ib,ibp,i_k,i_k_NL,i_kmq,i_comp,i_coll_mem,i_spin + integer :: i_coll,ib,ibp,i_k,i_k_NL,i_kmq,i_comp,i_coll_mem,i_sp,ip_sp integer :: i_n,i_m complex(SP) :: COLL logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2)),coll_sp @@ -58,19 +58,20 @@ subroutine COLLISIONS_compose_nl(G_in) i_k =HXC_collisions%state(i_coll,3) i_n =HXC_collisions%state(i_coll,1) i_m =HXC_collisions%state(i_coll,2) - i_spin =HXC_collisions%state(i_coll,4) + i_sp =HXC_collisions%state(i_coll,4) i_coll_mem=HXC_collisions%PAR_map(i_coll) ! i_comp=1 ! i_k_NL=i_k ! + do ip_sp=1,n_sp_pol do i_kmq=1,nXkibz ! do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,ip_sp)=='f') cycle ! if ( .not.do_collisions(ib,ibp) ) cycle ! @@ -79,12 +80,13 @@ subroutine COLLISIONS_compose_nl(G_in) else COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c(i_comp),kind=SP) endif - RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)-cI*COLL*G_in(ib,ibp,i_kmq) + RT_Vnl_xc(i_n,i_m,i_k_NL,i_sp)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_sp)-cI*COLL*G_in(ib,ibp,i_kmq,ip_sp) i_comp=i_comp+1 ! enddo enddo enddo + enddo ! enddo ! @@ -96,9 +98,10 @@ subroutine COLLISIONS_compose_nl(G_in) i_k =HXC_collisions%state(i_coll,3) i_n =HXC_collisions%state(i_coll,1) i_m =HXC_collisions%state(i_coll,2) + i_sp =HXC_collisions%state(i_coll,4) ! - RT_Vnl_xc(i_n,i_n,i_k,:) =real(RT_Vnl_xc(i_n,i_n,i_k,:),SP) - RT_Vnl_xc(i_m,i_n,i_k,:)=conjg(RT_Vnl_xc(i_n,i_m,i_k,:)) + RT_Vnl_xc(i_n,i_n,i_k,i_sp) =real(RT_Vnl_xc(i_n,i_n,i_k,i_sp),SP) + RT_Vnl_xc(i_m,i_n,i_k,i_sp)=conjg(RT_Vnl_xc(i_n,i_m,i_k,i_sp)) ! enddo ! diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 46ba623a1d..90e8856d9c 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -26,7 +26,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! ! Work Space ! - integer :: i_coll,i_comp,i_coll_mem,i_spin,i_n,i_m,i_kmq,ib,ibp,i_k + integer :: i_coll,i_comp,i_coll_mem,i_sp,ip_sp,i_n,i_m,i_kmq,ib,ibp,i_k logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),2) ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return @@ -54,7 +54,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) i_k =HXC_collisions%state(i_coll,3) i_n =HXC_collisions%state(i_coll,1) i_m =HXC_collisions%state(i_coll,2) - i_spin =HXC_collisions%state(i_coll,4) + i_sp =HXC_collisions%state(i_coll,4) i_coll_mem=HXC_collisions%PAR_map(i_coll) ! ! If the COLLISIONS are read from a DB with more bands than RT_bands: @@ -64,6 +64,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! i_comp=0 ! + do ip_sp=1,n_sp_pol do i_kmq=1,nXkibz ! do ibp=COLL_bands(1),COLL_bands(2) @@ -71,19 +72,20 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! if (.not.do_collisions(ib,ibp,1)) cycle ! - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,ip_sp)=='f') cycle ! i_comp=i_comp+1 ! if (.not.do_collisions(ib,ibp,2)) cycle ! - RT_Vnl_xc(i_n,i_m,i_k,i_spin)=RT_Vnl_xc(i_n,i_m,i_k,i_spin) & -& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*dG_avg(ib,ibp,i_kmq,i_spin) + RT_Vnl_xc(i_n,i_m,i_k,i_sp)=RT_Vnl_xc(i_n,i_m,i_k,i_sp) & +& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*dG_avg(ib,ibp,i_kmq,ip_sp) ! enddo enddo ! enddo + enddo ! enddo ! @@ -97,15 +99,17 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! ! Symmetrization !================ + do i_sp=1,n_sp_pol do i_k=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle do i_n=COLL_bands(1),COLL_bands(2) - RT_Vnl_xc(i_n,i_n,i_k,:)= real(RT_Vnl_xc(i_n,i_n,i_k,:)) + RT_Vnl_xc(i_n,i_n,i_k,i_sp)= real(RT_Vnl_xc(i_n,i_n,i_k,i_sp)) do i_m=i_n+1,COLL_bands(2) - RT_Vnl_xc(i_m,i_n,i_k,:)=conjg(RT_Vnl_xc(i_n,i_m,i_k,:)) + RT_Vnl_xc(i_m,i_n,i_k,i_sp)=conjg(RT_Vnl_xc(i_n,i_m,i_k,i_sp)) enddo enddo enddo + enddo ! ! Redux over kpts (is this needed?) !==================================== diff --git a/src/collisions/COLLISIONS_compose_sc.F b/src/collisions/COLLISIONS_compose_sc.F index cc508891e7..bd89377e47 100644 --- a/src/collisions/COLLISIONS_compose_sc.F +++ b/src/collisions/COLLISIONS_compose_sc.F @@ -19,12 +19,12 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) use timing_m, ONLY:timing implicit none ! - complex(SP), intent(in) :: G_sex(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) - complex(SP), intent(in) :: G_coh(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + complex(SP), intent(in) :: G_sex(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk,n_sp_pol) + complex(SP), intent(in) :: G_coh(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk,n_sp_pol) ! ! Work Space ! - integer :: i_qp,ib,ibp,i_kmq,ic1,ic2,i_coll_mem + integer :: i_qp,ib,ibp,i_kmq,ic1,ic2,i_coll_mem,i_sp logical :: l_sex ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and.& @@ -57,14 +57,15 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ic1=1 ic2=1 ! + do i_sp=1,n_sp_pol do i_kmq=1,QP_nk ! if (.not.PAR_IND_G_k%element_1D(i_kmq)) then if (l_sc_coh) then - ic1=ic1+count(COH_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq)=='t') + ic1=ic1+count(COH_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq,i_sp)=='t') endif if (l_sex) then - ic2=ic2+count(HXC_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq)=='t') + ic2=ic2+count(HXC_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq,i_sp)=='t') endif cycle endif @@ -76,7 +77,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! if (l_sc_coh) then if (COH_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then - QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*COH_COLL_element(i_coll_mem)%v_c(ic1)*G_coh(ib,ibp,i_kmq) + QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*COH_COLL_element(i_coll_mem)%v_c(ic1)*G_coh(ib,ibp,i_kmq,i_sp) ic1=ic1+1 endif endif @@ -85,7 +86,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! if (l_sex) then if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then - QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*HXC_COLL_element(i_coll_mem)%v_c(ic2)*G_sex(ib,ibp,i_kmq) + QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*HXC_COLL_element(i_coll_mem)%v_c(ic2)*G_sex(ib,ibp,i_kmq,i_sp) ic2=ic2+1 endif endif @@ -94,6 +95,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) enddo ! enddo + enddo enddo ! call PP_redux_wait(QP_Vnl_xc) diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index efef769326..a7c29aec3c 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -10,7 +10,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme use pars, ONLY:SP,cZERO use parallel_m, ONLY:master_cpu,yMPI_comm use parallel_int, ONLY:PP_wait - use electrons, ONLY:n_met_bands,n_full_bands + use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_cutoff,COLLISIONS_group,COLLISIONS_CV_only use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_APP_CL,OP_WR_CL,OP_APP,WR,WR_CL,io_COLLs @@ -30,7 +30,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme ! ! Work Space ! - integer :: ic,i1,i2,i3,i_cycle,io_err,i_ref + integer :: ic,i1,i2,i3,i4,i_cycle,io_err,i_ref logical :: store_it,l_HXC,l_GW_NEQ,l_QED_P,l_COH real(SP) :: COLLISIONS_max ! DEBUG < @@ -76,15 +76,16 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme ! Reference value for the reduction of the tiny elements of COHSEX/HF collision ! integrals. ! - if ( l_HXC .or. l_COH ) COLLISIONS_max=maxval(abs(COLL_element(1)%v3_c(:,:,:))) + if ( l_HXC .or. l_COH ) COLLISIONS_max=maxval(abs(COLL_element(1)%v3_c(:,:,:,:))) ! - COLL_element(i_ref)%table(:,:,:)='f' + COLL_element(i_ref)%table(:,:,:,:)='f' store_it=.true. ! do i_cycle=1,2 ! ic=0 ! + do i4=1,n_sp_pol do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 do i1=COLL_grp%D(1,1),COLL_grp%D(1,2) ! ib2 @@ -95,26 +96,24 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme ! In the COHSEX/HF case a cutoff can be applied ! if (l_HXC.or.l_COH) then - store_it=abs(COLL_element(1)%v3_c(i1,i2,i3))>=COLLISIONS_max*COLLISIONS_cutoff .or. COLLISIONS_cutoff<0.0 + store_it=abs(COLL_element(1)%v3_c(i1,i2,i3,i4))>=COLLISIONS_max*COLLISIONS_cutoff .or. COLLISIONS_cutoff<0.0 endif -#if defined _PAR_IO if ((.not.store_it).and.io_COLLs) then - COLL_element(1)%v3_c(i1,i2,i3)=cZERO + COLL_element(1)%v3_c(i1,i2,i3,i4)=cZERO store_it=.true. endif -#endif ! if (.not.store_it) cycle ic=ic+1 ! if (i_cycle==2) then ! - COLL_element(i_ref)%table(i1,i2,i3)='t' - if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3) - if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3) + COLL_element(i_ref)%table(i1,i2,i3,i4)='t' + if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3,i4) + if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3,i4) ! ! DEBUG < - !Mij=COLL_element(1)%v3_c(i1,i2,i3) + !Mij=COLL_element(1)%v3_c(i1,i2,i3,i4) !if (abs( real(Mij))<1.e-10) Mij=cmplx(0._SP,aimag(Mij),kind=SP) !if (abs(aimag(Mij))<1.e-10) Mij=cmplx(real(Mij),0._SP,kind=SP) !str="N" @@ -123,11 +122,11 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme !if (COLL_grp%state(i_coll,1)i2 ) str="C" !if (COLL_grp%state(i_coll,1)>COLL_grp%state(i_coll,2) .and. i1>i2 ) str="A" !! - ! write(100,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) - !if (str=="R") write(101,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) - !if (str=="C") write(102,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) - !if (str=="Q") write(103,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) - !if (str=="A") write(104,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,str,real(Mij),aimag(Mij) + ! write(100,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="R") write(101,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="C") write(102,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="Q") write(103,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="A") write(104,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) ! DEBUG > ! endif @@ -135,6 +134,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme enddo enddo enddo + enddo ! COLL_element(i_ref)%N=ic ! @@ -144,22 +144,16 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme ! if (IO_colls) then ! -#if defined _PAR_IO call io_control(ACTION=WR,SEC=(/3,4/),ID=COLL_ID) -#else - call io_control(ACTION=OP_APP_CL,SEC=(/2,3/),ID=COLL_ID) -#endif io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) ! call COLLISIONS_alloc_and_free(what,"v1","clean",1) ! -#if defined _PAR_IO if(i_coll==last_coll) then call PP_wait() call io_control(ACTION=WR_CL,SEC=(/5/),ID=COLL_ID) io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) endif -#endif ! endif ! diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index 54d438c94b..cd62a2e349 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -16,6 +16,7 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) use LIVE_t, ONLY:live_timing use QP_m, ONLY:QP_QED_ng use R_lattice, ONLY:nqbz + use electrons, ONLY:n_sp_pol use plasma, ONLY:N_plasma_poles_global use hamiltonian, ONLY:H_kind use global_XC, ONLY:H_SE_FOCK,H_SE_COH,H_SE_SEX,QP_SE_GW_NEQ,H_SE_HARTREE @@ -171,7 +172,7 @@ subroutine local_IO( COLL ) ! type(COLLISIONS_group) :: COLL integer :: iqbz,i_J,ic,i_coll,& -& i_coll_mem,i_q_mem,i_J_mem,i_b,i_g +& i_coll_mem,i_q_mem,i_J_mem,i_b,i_g,i_sp logical :: l_COH,l_HXC,l_NGW,l_QED,l_NGW_init,l_QED_init ! call live_timing(trim(COLL%name)//' collisions I/O',COLL%PAR_N) @@ -288,6 +289,7 @@ subroutine local_IO( COLL ) ! ic=0 ! + do i_sp=1,n_sp_pol do iqbz=1,nqbz ! i_q_mem=PAR_Q_bz_index(iqbz) @@ -302,18 +304,19 @@ subroutine local_IO( COLL ) ic=ic+1 if (.not.PAR_IND_Plasma%element_1D(i_J)) cycle i_J_mem =PAR_PLASMA_index(i_J) - GW_NEQ_COLL_element(i_coll_mem)%v3_r(i_J_mem,1,i_q_mem)=GW_NEQ_COLL_element(1)%v_r(ic) + GW_NEQ_COLL_element(i_coll_mem)%v3_r(i_J_mem,1,i_q_mem,i_sp)=GW_NEQ_COLL_element(1)%v_r(ic) enddo else do i_b=COLL_bands(1),COLL_bands(2) do i_g=1,QP_QED_ng ic=ic+1 - P_COLL_element(i_coll_mem)%v3_r(i_g,i_b,iqbz)=P_COLL_element(1)%v_r(ic) + P_COLL_element(i_coll_mem)%v3_r(i_g,i_b,iqbz,i_sp)=P_COLL_element(1)%v_r(ic) enddo enddo endif ! enddo + enddo endif #endif ! diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index f5df731213..e0a8a762d3 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -20,6 +20,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) use plasma, ONLY:N_plasma_poles_global,PLASMA_redux_percent use QP_m, ONLY:QP_ng_Sx,QP_ng_SH,SC_band_mixing,QP_QED_ng use X_m, ONLY:X_desc + use electrons, ONLY:n_sp_pol use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing ! @@ -71,7 +72,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1)+1 N(3)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 endif - COLL_element%N=N(1)*N(2)*N(3) + COLL_element%N=N(1)*N(2)*N(3)*n_sp_pol endif endif ! diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index eafbd7bcce..326c3cc169 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -52,12 +52,12 @@ module collision_ext type COLLISIONS_element integer :: I=0 ! State Index integer :: N=0 ! Linear Dimension - character, allocatable :: table(:,:,:) + character, allocatable :: table(:,:,:,:) complex(SP), allocatable :: v_c(:) complex(SP6), allocatable :: v_c_SP(:) ! SEX and HF only in single precision - complex(SP), allocatable :: v3_c(:,:,:) + complex(SP), allocatable :: v3_c(:,:,:,:) real(SP) , allocatable :: v_r(:) ! GW NEQ collisions - real(SP) , allocatable :: v3_r(:,:,:) + real(SP) , allocatable :: v3_r(:,:,:,:) end type ! type COLLISIONS_group From b1abe19f1899fc4c62d35b46e2822cf77ba19b7a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Apr 2025 18:23:41 +0200 Subject: [PATCH 0916/1367] Version 5.3.0, Revision 24498, Hash 6396555d06 MODIFIED * configure include/version/version.m4 collisions/Build_LSEX_collisions.F collisions/COLLISIONS_compress.F collisions/OSCLL_compose_collision.F collisions/OSCLL_compose_nl.F collisions/OSCLL_compose_vbands.F collisions/OSCLL_eval.F io/io_OSCLL.F modules/mod_collision_ext.F nloptics/NL_Hamiltonian.F nloptics/NL_carriers_number.F nloptics/NL_test_collisions.F Bugs: - fixed compilations of yambo_nl after introducting n_sp_pol loops in yambo_rt Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/collisions/Build_LSEX_collisions.F | 13 +++++++------ src/collisions/COLLISIONS_compress.F | 24 ++++++++++++++---------- src/collisions/OSCLL_compose_collision.F | 15 ++++++++------- src/collisions/OSCLL_compose_nl.F | 11 ++++++----- src/collisions/OSCLL_compose_vbands.F | 2 +- src/collisions/OSCLL_eval.F | 8 ++++---- src/io/io_OSCLL.F | 6 +++--- src/modules/mod_collision_ext.F | 4 ++-- src/nloptics/NL_Hamiltonian.F | 6 +++--- src/nloptics/NL_carriers_number.F | 10 ++++++---- src/nloptics/NL_test_collisions.F | 17 ++++++++++------- 13 files changed, 78 insertions(+), 66 deletions(-) diff --git a/configure b/configure index eb2099af18..bdb353cc53 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24497 h.a596226a53. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24498 h.6396555d06. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24497 h.a596226a53' -PACKAGE_STRING='Yambo 5.3.0 r.24497 h.a596226a53' +PACKAGE_VERSION='5.3.0 r.24498 h.6396555d06' +PACKAGE_STRING='Yambo 5.3.0 r.24498 h.6396555d06' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24497 h.a596226a53 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24498 h.6396555d06 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24497 h.a596226a53:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24498 h.6396555d06:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24497 h.a596226a53 +Yambo configure 5.3.0 r.24498 h.6396555d06 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24497 h.a596226a53, which was +It was created by Yambo $as_me 5.3.0 r.24498 h.6396555d06, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24497" -SHASH="a596226a53" +SREVISION="24498" +SHASH="6396555d06" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24497 h.a596226a53, which was +This file was extended by Yambo $as_me 5.3.0 r.24498 h.6396555d06, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24497 h.a596226a53 +Yambo config.status 5.3.0 r.24498 h.6396555d06 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a2e94641fe..5352fcc257 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24497 h.a596226a53, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24498 h.6396555d06, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24497" -SHASH="a596226a53" +SREVISION="24498" +SHASH="6396555d06" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F index 32cae39518..d90fdea431 100644 --- a/src/collisions/Build_LSEX_collisions.F +++ b/src/collisions/Build_LSEX_collisions.F @@ -9,7 +9,7 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) ! ! This subroutine calculate the long-range part of the Screened exchange ! - use electrons, ONLY:n_sp_pol + use electrons, ONLY:n_sp_pol,spin use pars, ONLY:SP,cI,cZERO use collision_ext, ONLY:OSCLL,W,ng_oscll,COLL_bands use QP_m, ONLY:QP_table,QP_nk,QP_n_states @@ -26,17 +26,18 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) integer :: i_np,iqbz,i_kmq ! self-energy internal indexes integer :: ig1,ig2 integer :: i_n,i_m - integer :: i_k + integer :: i_k,i_sp ! ! Collisions output ! - complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk,n_sp_pol) ! ! Coll indexes ! i_n=QP_table(i_qp,1) i_m=QP_table(i_qp,2) i_k=QP_table(i_qp,3) + i_sp=spin(QP_table(i_qp,:)) ! ! Build Collisions from the Oscillators ! @@ -45,7 +46,7 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) ! - COLL(i_np,i_mp,:)=cZERO + COLL(i_np,i_mp,:,i_sp)=cZERO ! do iqbz=1,q%nbz i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) @@ -54,8 +55,8 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) ! do ig1=1,ng_oscll do ig2=1,ng_oscll - COLL(i_np,i_mp,i_kmq)=COLL(i_np,i_mp,i_kmq)+OSCLL(i_n,i_np,i_k,iqbz,ig2) & -& *conjg(OSCLL(i_m,i_mp,i_k,iqbz,ig1))*W(iqbz,ig2,ig1) + COLL(i_np,i_mp,i_kmq,i_sp)=COLL(i_np,i_mp,i_kmq,i_sp)+OSCLL(i_n,i_np,i_k,i_sp,iqbz,ig2) & +& *conjg(OSCLL(i_m,i_mp,i_k,i_sp,iqbz,ig1))*W(iqbz,ig2,ig1) enddo enddo ! diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index 4cb5b0e970..eebd29b23f 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -14,7 +14,7 @@ subroutine COLLISIONS_compress(COLL) use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff,& & COLLISIONS_CV_only use R_lattice, ONLY:nXkibz - use electrons, ONLY:n_met_bands,n_full_bands + use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol ! #include ! @@ -23,7 +23,7 @@ subroutine COLLISIONS_compress(COLL) ! Work Space ! real(SP) :: COLLISIONS_max - integer :: ib,ibp,i_kmq,ic + integer :: ib,ibp,i_kmq,ic,i_sp logical :: l_coll_SP ! if(allocated(COLL%v_c_SP)) then @@ -37,12 +37,13 @@ subroutine COLLISIONS_compress(COLL) ! ! Search for non-zero collisions ! - YAMBO_ALLOC(COLL%v3_c,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),1:nXkibz)) + YAMBO_ALLOC(COLL%v3_c,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),1:nXkibz,n_sp_pol)) ! ic=0 ! COLL%table='f' ! + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) @@ -52,16 +53,17 @@ subroutine COLLISIONS_compress(COLL) ! ic=ic+1 ! - if( l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=cmplx(COLL%v_c_SP(ic),kind=SP) - if(.not.l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)= COLL%v_c(ic) + if( l_coll_SP) COLL%v3_c(ib,ibp,i_kmq,i_sp)=cmplx(COLL%v_c_SP(ic),kind=SP) + if(.not.l_coll_SP) COLL%v3_c(ib,ibp,i_kmq,i_sp)= COLL%v_c(ic) ! - if(abs(COLL%v3_c(ib,ibp,i_kmq))>=COLLISIONS_max*COLLISIONS_cutoff) COLL%table(ib,ibp,i_kmq)='t' + if(abs(COLL%v3_c(ib,ibp,i_kmq,i_sp))>=COLLISIONS_max*COLLISIONS_cutoff) COLL%table(ib,ibp,i_kmq,i_sp)='t' ! enddo enddo enddo + enddo ! - COLL%N=count(COLL%table(:,:,:)=='t') + COLL%N=count(COLL%table(:,:,:,:)=='t') ! if(l_coll_SP) then YAMBO_FREE(COLL%v_c_SP) @@ -74,19 +76,21 @@ subroutine COLLISIONS_compress(COLL) ! Fill collisions again ! ic=0 + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if(.not.COLL%table(ib,ibp,i_kmq)=='t') cycle + if(.not.COLL%table(ib,ibp,i_kmq,i_sp)=='t') cycle ! ic=ic+1 - if(l_coll_SP) COLL%v_c_SP(ic)=cmplx(COLL%v3_c(ib,ibp,i_kmq),kind=SP6) - if(.not.l_coll_SP) COLL%v_c(ic) =COLL%v3_c(ib,ibp,i_kmq) + if(l_coll_SP) COLL%v_c_SP(ic)=cmplx(COLL%v3_c(ib,ibp,i_kmq,i_sp),kind=SP6) + if(.not.l_coll_SP) COLL%v_c(ic) =COLL%v3_c(ib,ibp,i_kmq,i_sp) ! enddo enddo enddo + enddo ! YAMBO_FREE(COLL%v3_c) ! diff --git a/src/collisions/OSCLL_compose_collision.F b/src/collisions/OSCLL_compose_collision.F index 70ef858e7e..c223dce761 100644 --- a/src/collisions/OSCLL_compose_collision.F +++ b/src/collisions/OSCLL_compose_collision.F @@ -20,7 +20,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) +subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,i_sp,COLL) ! ! This subroutine use long-range part of the Screened exchange ! and the oscillators to reconstruct the collisions @@ -30,6 +30,7 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) use nl_optics, ONLY:NL_bands,Correlation,LSEX,LHF use collision_ext, ONLY:OSCLL,W,ng_oscll use QP_m, ONLY:QP_nk + use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp,qindx_S use parallel_m, ONLY:PAR_Xk_ibz_index use wrapper, ONLY:V_dot_V,M_by_V @@ -42,7 +43,7 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) type(bz_samp), intent(in) :: k,q ! ! Collision indexes - integer, intent(in) :: i_n,i_m,i_k + integer, intent(in) :: i_n,i_m,i_k,i_sp ! ! Work Space ! @@ -53,7 +54,7 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) ! ! Collisions output ! - complex(SP), intent(out) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP), intent(out) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) ! #if defined _TIMING call timing('OSCLL compose',OPR='start') @@ -76,8 +77,8 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) do ig2=1,ng_oscll !$OMP WORKSHARE forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) - COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+OSCLL(i_n,ib ,ik_mem,iqbz,ig2)*conjg(OSCLL(i_m,ibp,ik_mem,iqbz,ig1)) & -& *W(iqbz,ig2,ig1) + COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib ,ik_mem,i_sp,iqbz,ig2)* & + & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig2,ig1) end forall !$OMP END WORKSHARE enddo @@ -87,8 +88,8 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) do ig1=1,ng_oscll !$OMP WORKSHARE forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) - COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+OSCLL(i_n,ib ,ik_mem,iqbz,ig1)*conjg(OSCLL(i_m,ibp,ik_mem,iqbz,ig1)) & -& *W(iqbz,ig1,ig1) + COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib,ik_mem,i_sp,iqbz,ig1)* & + & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig1,ig1) end forall !$OMP END WORKSHARE enddo diff --git a/src/collisions/OSCLL_compose_nl.F b/src/collisions/OSCLL_compose_nl.F index 5e952b6eca..499871c1b9 100644 --- a/src/collisions/OSCLL_compose_nl.F +++ b/src/collisions/OSCLL_compose_nl.F @@ -15,6 +15,7 @@ subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) use nl_optics, ONLY:NL_bands,NL_nbands use collision_ext, ONLY:ng_oscll,OSCLL,W use QP_m, ONLY:QP_nk + use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp,qindx_S,nXkibz use wrapper_omp, ONLY:V_dot_V use parallel_m, ONLY:PAR_Xk_ibz_index @@ -28,11 +29,11 @@ subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) integer, intent(in) :: i_k,i_sp_pol type(bz_samp), intent(in) :: k,q type(levels), intent(in) :: E - complex(SP), intent(in) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP), intent(in) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) ! ! Work Space ! - complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) #if defined _DOUBLE complex(SP), external :: ZDOTU #else @@ -47,12 +48,12 @@ subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) do i_n=NL_bands(1),NL_bands(2) do i_m=i_n,NL_bands(2) ! - call OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) + call OSCLL_compose_collision(k,q,i_n,i_m,i_k,i_sp_pol,COLL) ! #if defined _DOUBLE - H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*ZDOTU(NL_nbands**2*QP_nk,COLL,1,dG,1) + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*ZDOTU(NL_nbands**2*QP_nk*n_sp_pol,COLL,1,dG,1) #else - H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*CDOTU(NL_nbands**2*QP_nk,COLL,1,dG,1) + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*CDOTU(NL_nbands**2*QP_nk*n_sp_pol,COLL,1,dG,1) #endif ! enddo diff --git a/src/collisions/OSCLL_compose_vbands.F b/src/collisions/OSCLL_compose_vbands.F index d83534cdf4..3245d7a292 100644 --- a/src/collisions/OSCLL_compose_vbands.F +++ b/src/collisions/OSCLL_compose_vbands.F @@ -77,7 +77,7 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) ! !$OMP WORKSHARE forall(iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) - OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) + OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,i_sp_pol,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) end forall !$OMP END WORKSHARE ! diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F index da9a126a6e..e7a6e130ee 100644 --- a/src/collisions/OSCLL_eval.F +++ b/src/collisions/OSCLL_eval.F @@ -125,6 +125,7 @@ subroutine OSCLL_eval(q,k,en) ! COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 ! + do i_sp_pol=1,n_sp_pol do i_k=1,QP_nk ! if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle @@ -149,10 +150,8 @@ subroutine OSCLL_eval(q,k,en) i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) i_kmq_s = k%sstar(qindx_S(i_k,iqbz,1),2) ! - ! Spin-Polarization not supported!! - ! - i_k_sp = 1 - i_kmq_sp= 1 + i_k_sp = i_sp_pol + i_kmq_sp= i_sp_pol ! ! Load only two k-points ! @@ -194,6 +193,7 @@ subroutine OSCLL_eval(q,k,en) call live_timing(steps=1) ! enddo + enddo ! call IO_and_Messaging_switch("RESTORE") ! diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F index dc53d1b509..6c2db1ba04 100644 --- a/src/io/io_OSCLL.F +++ b/src/io/io_OSCLL.F @@ -8,7 +8,7 @@ integer function io_OSCLL(q,ID) ! use pars, ONLY:SP,schlen,IP_YIO - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use matrix_operate,ONLY:mat_c2r,mat_r2c use R_lattice, ONLY:nXkibz,bz_samp use QP_m, ONLY:QP_nk @@ -83,7 +83,7 @@ integer function io_OSCLL(q,ID) ! if (read_is_on(ID)) then if(.not.allocated(OSCLL)) then - YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,q%nbz,ng_oscll)) + YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,n_sp_pol,q%nbz,ng_oscll)) endif endif ! @@ -107,7 +107,7 @@ integer function io_OSCLL(q,ID) io_OSCLL=io_status(ID) if (io_OSCLL/=0) goto 1 ! - if (read_is_on(ID)) OSCLL(ib,:,ik_mem,:,ig)=disk_data + if (read_is_on(ID)) OSCLL(ib,:,ik_mem,i_sp_pol,:,ig)=disk_data ! enddo enddo diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index 326c3cc169..dd612b60c1 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -97,8 +97,8 @@ module collision_ext ! ==================================== integer :: ng_oscll ! number of G-vectors in the Oscillators complex(SP), allocatable :: W(:,:,:) ! screened interaction - complex(SP), allocatable :: OSCLL(:,:,:,:,:) ! Oscillators - complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in k, just for the evaluation + complex(SP), allocatable :: OSCLL(:,:,:,:,:,:) ! Oscillators + complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in (i_sp_pol,ik), just for the evaluation ! contains ! diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 9d76f636b4..6af6c7bdd2 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -88,7 +88,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Evaluate the G_lesser for current/polarization and collisions ! ====================================================== - if(eval_dG.or.l_pump_and_probe) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,1)) + if(eval_dG.or.l_pump_and_probe) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,:,1)) ! ! Evaluate the Polarization ! =================================================================== @@ -166,7 +166,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Calculate collisions if doing TD-SEX or TD-HF ! ============================================= - if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG_lesser(:,:,:,1)) + if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG_lesser(:,:,:,:,1)) ! ! Build the Hamiltonian ! ===================== @@ -221,7 +221,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! endif ! -! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG_lesser(:,:,:,1),H_nl_sc,k,q,E,ik,i_sp_pol) +! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG_lesser(:,:,:,:,1),H_nl_sc,k,q,E,ik,i_sp_pol) if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_vbands(V_bands,H_nl_sc,k,q,E,ik,i_sp_pol) ! if(l_use_Hxc_collisions) then diff --git a/src/nloptics/NL_carriers_number.F b/src/nloptics/NL_carriers_number.F index b328653668..0d84e2165e 100644 --- a/src/nloptics/NL_carriers_number.F +++ b/src/nloptics/NL_carriers_number.F @@ -25,7 +25,7 @@ subroutine NL_carriers_number(en,k,Ncarr) ! use pars, ONLY:SP use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use nl_optics, ONLY:NL_bands use real_time, ONLY:dG_lesser ! @@ -37,18 +37,20 @@ subroutine NL_carriers_number(en,k,Ncarr) ! ! Workspace ! - integer :: ib,ik + integer :: ib,ik,i_sp_pol ! ! Electrons and holes number ! Ncarr = 0._SP ! + do i_sp_pol=1,n_sp_pol do ik=1,en%nk do ib=NL_bands(1),NL_bands(2) - if ( en%E(ib,ik,1)<=0._SP ) Ncarr(2)=Ncarr(2)-aimag(dG_lesser(ib,ib,ik,1))*k%weights(ik) - if ( en%E(ib,ik,1)> 0._SP ) Ncarr(3)=Ncarr(3)+aimag(dG_lesser(ib,ib,ik,1))*k%weights(ik) + if ( en%E(ib,ik,i_sp_pol)<=0._SP ) Ncarr(2)=Ncarr(2)-aimag(dG_lesser(ib,ib,ik,i_sp_pol,1))*k%weights(ik) + if ( en%E(ib,ik,i_sp_pol)> 0._SP ) Ncarr(3)=Ncarr(3)+aimag(dG_lesser(ib,ib,ik,i_sp_pol,1))*k%weights(ik) enddo enddo + enddo ! Ncarr(1)=Ncarr(2)-Ncarr(3) ! diff --git a/src/nloptics/NL_test_collisions.F b/src/nloptics/NL_test_collisions.F index 56f0be55f7..e860fdb94a 100644 --- a/src/nloptics/NL_test_collisions.F +++ b/src/nloptics/NL_test_collisions.F @@ -15,6 +15,7 @@ subroutine NL_test_collisions(k,q) use R_lattice, ONLY:nXkibz,bz_samp,qindx_S use collision_ext, ONLY:HXC_COLL_element,HXC_collisions use nl_optics, ONLY:NL_bands + use electrons, ONLY:n_sp_pol use com, ONLY:msg ! implicit none @@ -22,10 +23,10 @@ subroutine NL_test_collisions(k,q) type(bz_samp), intent(in) :: k,q ! integer :: i_kmq,i_qp,ib,ibp,i_coll,i_coll_mem - integer :: i_k,i_n,i_m,i_spin + integer :: i_k,i_n,i_m,i_spin,i_sp integer :: ic1 - complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz) - complex(SP) :: COLL_OSCLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz) + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz,n_sp_pol) + complex(SP) :: COLL_OSCLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz,n_sp_pol) ! real(SP) :: max_diff,diff ! @@ -50,23 +51,25 @@ subroutine NL_test_collisions(k,q) ! COLL=cZERO ! + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz ! do ibp=NL_bands(1),NL_bands(2) do ib=NL_bands(1),NL_bands(2) - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") then - COLL(ib,ibp,i_kmq)=HXC_COLL_element(i_coll_mem)%v_c(ic1) + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,i_sp)=="t") then + COLL(ib,ibp,i_kmq,i_sp)=HXC_COLL_element(i_coll_mem)%v_c(ic1) ic1=ic1+1 endif ! - diff=abs(COLL(ib,ibp,i_kmq)-COLL_OSCLL(ib,ibp,i_kmq)) - write(*,'(6i5,2e14.6)') i_k,i_m,i_n,i_kmq,ib,ibp,abs(COLL(ib,ibp,i_kmq)),abs(COLL_OSCLL(ib,ibp,i_kmq)) + diff=abs(COLL(ib,ibp,i_kmq,i_sp)-COLL_OSCLL(ib,ibp,i_kmq,i_sp)) + write(*,'(7i5,2e14.6)') i_sp,i_k,i_m,i_n,i_kmq,ib,ibp,abs(COLL(ib,ibp,i_kmq,i_sp)),abs(COLL_OSCLL(ib,ibp,i_kmq,i_sp)) if(max_diff<=diff) max_diff=diff ! enddo enddo ! enddo + enddo ! enddo ! From 929b46e344f1d9b0fb32fc3142f594efa8333d50 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Apr 2025 22:36:59 +0200 Subject: [PATCH 0917/1367] Version 5.3.0, Revision 24499, Hash b1abe19f18 MODIFIED * configure include/version/version.m4 io/io_RT_components_G_lesser.F modules/mod_RT_occupations.F real_time_control/RT_carriers_number.F real_time_control/RT_carriers_object.F real_time_control/RT_entropy.F real_time_initialize/RT_G_lesser_init.F real_time_initialize/RT_occupations_and_levels_init.F real_time_initialize/RT_occupations_update.F real_time_propagation/RT_Scattering_step.F real_time_propagation/RT_occupations_eval.F xc_functionals/el_density_and_current.F Changes: - [yambo_rt] porting for case n_sp_pol=2. Code runs. Results to be checked Patch sent by: Davide Sangalli --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/io/io_RT_components_G_lesser.F | 14 ++++-------- src/modules/mod_RT_occupations.F | 13 ++++++----- src/real_time_control/RT_carriers_number.F | 14 +++++++----- src/real_time_control/RT_carriers_object.F | 9 ++++---- src/real_time_control/RT_entropy.F | 12 +++++----- src/real_time_initialize/RT_G_lesser_init.F | 8 +++---- .../RT_occupations_and_levels_init.F | 12 +++++----- .../RT_occupations_update.F | 14 +++++------- .../RT_Scattering_step.F | 12 +++++----- .../RT_occupations_eval.F | 17 +++++++------- src/xc_functionals/el_density_and_current.F | 2 +- 13 files changed, 75 insertions(+), 80 deletions(-) diff --git a/configure b/configure index bdb353cc53..f2fa21d6fc 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24498 h.6396555d06. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24499 h.b1abe19f18. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24498 h.6396555d06' -PACKAGE_STRING='Yambo 5.3.0 r.24498 h.6396555d06' +PACKAGE_VERSION='5.3.0 r.24499 h.b1abe19f18' +PACKAGE_STRING='Yambo 5.3.0 r.24499 h.b1abe19f18' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24498 h.6396555d06 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24499 h.b1abe19f18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24498 h.6396555d06:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24499 h.b1abe19f18:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24498 h.6396555d06 +Yambo configure 5.3.0 r.24499 h.b1abe19f18 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24498 h.6396555d06, which was +It was created by Yambo $as_me 5.3.0 r.24499 h.b1abe19f18, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24498" -SHASH="6396555d06" +SREVISION="24499" +SHASH="b1abe19f18" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24498 h.6396555d06, which was +This file was extended by Yambo $as_me 5.3.0 r.24499 h.b1abe19f18, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24498 h.6396555d06 +Yambo config.status 5.3.0 r.24499 h.b1abe19f18 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5352fcc257..fa8a6989dd 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24498 h.6396555d06, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24499 h.b1abe19f18, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24498" -SHASH="6396555d06" +SREVISION="24499" +SHASH="b1abe19f18" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_RT_components_G_lesser.F b/src/io/io_RT_components_G_lesser.F index 6a9a93c4da..357ba4cfd7 100644 --- a/src/io/io_RT_components_G_lesser.F +++ b/src/io/io_RT_components_G_lesser.F @@ -39,18 +39,12 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! ! Variables SIZE and strings... !------------------------------- - VAR_SZ(1:5)=(/2,RT_nbands,RT_nbands,1,1/) - dim_names(1:5) =[character(schlen) :: 'complex', 'RT_nbands','RT_nbands','k_fragment','n_sp_pol'] - dim_name_ibz ='k_fragment' - IPOS(1:5)=1 - ! - VAR_SZ(4) = RT_nk - dim_names(4) ='RT_nk' - IPOS(4) =PAR_G_k_range(1) + VAR_SZ =(/2,RT_nbands,RT_nbands,RT_nk,n_sp_pol,G_MEM_steps/) + dim_names =[character(schlen) :: 'complex', 'RT_nbands','RT_nbands','RT_nk','n_sp_pol','G_MEM_steps'] + IPOS =(/1,1,1,PAR_G_k_range(1),1,1/) + ! dim_name_ibz ='nkibz' ! - VAR_SZ(6) = G_MEM_steps - dim_names(6) ='G_MEM_steps' if (RT_do_IO("G_lesser_K_section")) then VAR_SZ(6) = NF90_UNLIMITED dim_names(6) ='G_IO_time_step' diff --git a/src/modules/mod_RT_occupations.F b/src/modules/mod_RT_occupations.F index 42b08c54fd..00d13bdf51 100644 --- a/src/modules/mod_RT_occupations.F +++ b/src/modules/mod_RT_occupations.F @@ -8,6 +8,7 @@ module RT_occupations ! use pars, ONLY:SP,rZERO,schlen + use electrons, ONLY:n_sp_pol use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elphoton_scatt,& & l_phel_scatt,l_phel_corr ! @@ -18,9 +19,9 @@ module RT_occupations logical :: active integer :: D1(2) integer :: D2 - real(SP), allocatable :: N(:,:) - real(SP), allocatable :: N_ref(:,:) - real(SP), allocatable :: dN(:,:) + real(SP), allocatable :: N(:,:,:) + real(SP), allocatable :: N_ref(:,:,:) + real(SP), allocatable :: dN(:,:,:) end type RT_occupation ! type(RT_occupation) :: RT_el_occ,RT_ho_occ,RT_ph_occ,RT_life_occ @@ -84,12 +85,12 @@ subroutine RT_occupation_alloc(KIND,OCC,D1,D2) OCC%D1=D1 OCC%D2=D2 if (KIND=="electrons".or.KIND=="life") then - YAMBO_ALLOC(OCC%dN,(D1(1):D1(2),D2)) + YAMBO_ALLOC(OCC%dN,(D1(1):D1(2),D2,n_sp_pol)) OCC%dN=rZERO endif if (KIND=="electrons".or.KIND=="holes".or.KIND=="phonons") then - YAMBO_ALLOC(OCC%N,(D1(1):D1(2),D2)) - YAMBO_ALLOC(OCC%N_ref,(D1(1):D1(2),D2)) + YAMBO_ALLOC(OCC%N,(D1(1):D1(2),D2,n_sp_pol)) + YAMBO_ALLOC(OCC%N_ref,(D1(1):D1(2),D2,n_sp_pol)) OCC%N=rZERO OCC%N_ref=rZERO endif diff --git a/src/real_time_control/RT_carriers_number.F b/src/real_time_control/RT_carriers_number.F index 2af013e03d..5df0e24b5b 100644 --- a/src/real_time_control/RT_carriers_number.F +++ b/src/real_time_control/RT_carriers_number.F @@ -9,7 +9,7 @@ subroutine RT_carriers_number(en,k,Ncarr) ! use pars, ONLY:SP use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use RT_control, ONLY:NE_i_start_time use RT_occupations, ONLY:RT_el_occ,RT_ho_occ use real_time, ONLY:RTibz,NE_i_time,RT_levels,RT_bands @@ -22,28 +22,30 @@ subroutine RT_carriers_number(en,k,Ncarr) ! ! Workspace ! - integer :: ib,ik,ik_RT + integer :: ib,ik,ik_RT,i_Sp real(SP) :: VALUE_tmp(2) ! ! Electrons and holes number ! Ncarr = 0._SP ! + do i_sp=1,n_sp_pol do ik=1,en%nk do ib=RT_bands(1),RT_bands(2) VALUE_tmp=0._SP do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) if ( RT_levels%E(ib,ik_RT,1)<=0._SP ) then - if (NE_i_time==NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)+RT_ho_occ%N(ib,ik_RT)*RTibz%weights(ik_RT) - if (NE_i_time/=NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)-RT_el_occ%dN(ib,ik_RT)*RTibz%weights(ik_RT) + if (NE_i_time==NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)+RT_ho_occ%N(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) + if (NE_i_time/=NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)-RT_el_occ%dN(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) else - if (NE_i_time==NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%N(ib,ik_RT)*RTibz%weights(ik_RT) - if (NE_i_time/=NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%dN(ib,ik_RT)*RTibz%weights(ik_RT) + if (NE_i_time==NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%N(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) + if (NE_i_time/=NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%dN(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) endif enddo Ncarr(2:3)=Ncarr(2:3)+VALUE_tmp enddo enddo + enddo ! Ncarr(1)=Ncarr(2)-Ncarr(3) ! diff --git a/src/real_time_control/RT_carriers_object.F b/src/real_time_control/RT_carriers_object.F index d736640658..2d137d3bd0 100644 --- a/src/real_time_control/RT_carriers_object.F +++ b/src/real_time_control/RT_carriers_object.F @@ -53,6 +53,7 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) i_b =RT%table(i_RT,1) i_k =RT%table(i_RT,2) i_k_RT =RT%table(i_RT,3) + i_spin =RT%table(i_RT,4) call RT_lifetime_to_RT_obj(WHAT,i_b,i_k_RT,i_RT,RT_EH_life,RT_EH_ref_life,RT%GAMMA_EH) call RT_lifetime_to_RT_obj(WHAT,i_b,i_k_RT,i_RT,RT_EE_life,RT_EE_ref_life,RT%GAMMA_EE) call RT_lifetime_to_RT_obj(WHAT,i_b,i_k_RT,i_RT,RT_EP_emit_life,RT_EP_emit_ref_life,RT%GAMMA_EP_emit) @@ -68,7 +69,7 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! RT%nk=RT_nk RT%nb=RT_bands - RT%nstates=RT_nk*(RT_bands(2)-RT_bands(1)+1) + RT%nstates=RT_nk*(RT_bands(2)-RT_bands(1)+1)*n_sp_pol ! call RT_obj_alloc(RT) ! @@ -115,8 +116,8 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! ! Occupations & Energies ! - if (allocated(RT_el_occ%dN)) RT_el_occ%dN(i_b,i_k_RT) =RT%OCC_el%dN(i_RT) - if (allocated(RT_levels%E) ) RT_levels%E(i_b,i_k_RT,i_spin)=RT%delta_E(i_RT)+RT%E_bare(i_RT) + if (allocated(RT_el_occ%dN)) RT_el_occ%dN(i_b,i_k_RT,i_spin)=RT%OCC_el%dN(i_RT) + if (allocated(RT_levels%E) ) RT_levels%E(i_b,i_k_RT,i_spin) =RT%delta_E(i_RT)+RT%E_bare(i_RT) ! enddo ! @@ -131,7 +132,7 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! ! Occupations & Energies ! - RT%OCC_el%dN(i_RT)=RT_el_occ%dN(i_b,i_k_RT) + RT%OCC_el%dN(i_RT)=RT_el_occ%dN(i_b,i_k_RT,i_spin) RT%delta_E(i_RT) =RT_levels%E(i_b,i_k_RT,i_spin)-RT%E_bare(i_RT) ! f_occ =RT%OCC_el%N_ref(i_RT)/spin_occ diff --git a/src/real_time_control/RT_entropy.F b/src/real_time_control/RT_entropy.F index 21f832435f..91ab0b5a75 100644 --- a/src/real_time_control/RT_entropy.F +++ b/src/real_time_control/RT_entropy.F @@ -52,9 +52,9 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) do ik_RT=PAR_G_k_range(1),PAR_G_k_range(2) do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) - if ( RT_levels%E(ib1,ik_RT,1)<=0._SP .and. RT_levels%E(ib2,ik_RT,1)<=0._SP ) then + if ( RT_levels%E(ib1,ik_RT,i_sp)<=0._SP .and. RT_levels%E(ib2,ik_RT,i_sp)<=0._SP ) then dG_lesser_h(ib1,ib2,ik_RT,i_sp)=dG_lesser(ib1,ib2,ik_RT,i_sp) - else if ( RT_levels%E(ib1,ik_RT,1)> 0._SP .and. RT_levels%E(ib2,ik_RT,1)> 0._SP ) then + else if ( RT_levels%E(ib1,ik_RT,i_sp)> 0._SP .and. RT_levels%E(ib2,ik_RT,i_sp)> 0._SP ) then dG_lesser_e(ib1,ib2,ik_RT,i_sp)=dG_lesser(ib1,ib2,ik_RT,i_sp) endif enddo @@ -80,11 +80,11 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) S_h=0._SP S_e=0._SP - if(RT_ho_occ%N(ib1,ik_RT)>0._SP) S_h=-RT_ho_occ%N(ib1,ik_RT)*log(RT_ho_occ%N(ib1,ik_RT)/spin_occ) - if(RT_el_occ%N(ib1,ik_RT)>0._SP) S_e=-RT_el_occ%N(ib1,ik_RT)*log(RT_el_occ%N(ib1,ik_RT)/spin_occ) + if(RT_ho_occ%N(ib1,ik_RT,i_sp)>0._SP) S_h=-RT_ho_occ%N(ib1,ik_RT,i_sp)*log(RT_ho_occ%N(ib1,ik_RT,i_sp)/spin_occ) + if(RT_el_occ%N(ib1,ik_RT,i_sp)>0._SP) S_e=-RT_el_occ%N(ib1,ik_RT,i_sp)*log(RT_el_occ%N(ib1,ik_RT,i_sp)/spin_occ) VALUE_tmp(1)=VALUE_tmp(1)+S_e+S_h - if ( RT_levels%E(ib1,ik_RT,1)<=0._SP ) VALUE_tmp(2)=VALUE_tmp(2)+S_h - if ( RT_levels%E(ib1,ik_RT,1)> 0._SP ) VALUE_tmp(3)=VALUE_tmp(3)+S_e + if ( RT_levels%E(ib1,ik_RT,i_sp)<=0._SP ) VALUE_tmp(2)=VALUE_tmp(2)+S_h + if ( RT_levels%E(ib1,ik_RT,i_sp)> 0._SP ) VALUE_tmp(3)=VALUE_tmp(3)+S_e VALUE_tmp=VALUE_tmp*RTibz%weights(ik_RT) enddo Entr=Entr+VALUE_tmp diff --git a/src/real_time_initialize/RT_G_lesser_init.F b/src/real_time_initialize/RT_G_lesser_init.F index c662d010d4..7a57f49c10 100644 --- a/src/real_time_initialize/RT_G_lesser_init.F +++ b/src/real_time_initialize/RT_G_lesser_init.F @@ -20,19 +20,17 @@ subroutine RT_G_lesser_init( ) ! integer :: ik,ik_RT,ib,i_sp_pol ! - if (n_sp_pol==2) call error("subroutine RT_G_lesser_update not coded for n_sp_pol=2") - ! do ib=RT_bands(1),RT_bands(2) do i_sp_pol=1,n_sp_pol do ik=1,nkibz do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) ! - G_lesser_reference(ib,ib,ik_RT,i_sp_pol) = cmplx(rZERO,RT_el_occ%N_ref(ib,ik_RT),SP) + G_lesser_reference(ib,ib,ik_RT,i_sp_pol) = cmplx(rZERO,RT_el_occ%N_ref(ib,ik_RT,i_sp_pol),SP) ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - G_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT),SP) - dG_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT)-RT_el_occ%N_ref(ib,ik_RT),SP) + G_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT,i_sp_pol),SP) + dG_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT,i_sp_pol)-RT_el_occ%N_ref(ib,ik_RT,i_sp_pol),SP) ! enddo enddo diff --git a/src/real_time_initialize/RT_occupations_and_levels_init.F b/src/real_time_initialize/RT_occupations_and_levels_init.F index 698ff51556..a8a4c9492d 100644 --- a/src/real_time_initialize/RT_occupations_and_levels_init.F +++ b/src/real_time_initialize/RT_occupations_and_levels_init.F @@ -95,8 +95,8 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) k_FG%pt(ik_RT,:) = kpt ! ! .. occ - RT_el_occ%N_ref(ib,ik_RT) = f_occ_ref(1) - RT_ho_occ%N_ref(ib,ik_RT) = spin_occ-f_occ_ref(1) + RT_el_occ%N_ref(ib,ik_RT,:) = f_occ_ref(:) + RT_ho_occ%N_ref(ib,ik_RT,:) = spin_occ-f_occ_ref(:) ! if (l_RT_relax_time_approx) then RT_RTA_E_occ_infty(ib,ik_FG)= Fermi_fnc( Energy(1)-E%E_CBm(1)-RT_RTA_chem(1) ,RT_RTA_temp(1))*spin_occ @@ -107,13 +107,13 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle #endif ! - RT_el_occ%dN(ib,ik_RT) = f_occ(1)-f_occ_ref(1) - RT_el_occ%N(ib,ik_RT) = f_occ(1) - RT_ho_occ%N(ib,ik_RT) = spin_occ-f_occ(1) + RT_el_occ%dN(ib,ik_RT,:) = f_occ(:)-f_occ_ref(:) + RT_el_occ%N(ib,ik_RT,:) = f_occ(:) + RT_ho_occ%N(ib,ik_RT,:) = spin_occ-f_occ(:) ! if (.not.RT_is_dynamically_dephased) cycle ! - RT_life_occ%dN(ib,ik_RT) = f_occ(1)-f_occ_ref(1) + RT_life_occ%dN(ib,ik_RT,:) = f_occ(:)-f_occ_ref(:) ! enddo enddo diff --git a/src/real_time_initialize/RT_occupations_update.F b/src/real_time_initialize/RT_occupations_update.F index bc0584407d..110df9bb56 100644 --- a/src/real_time_initialize/RT_occupations_update.F +++ b/src/real_time_initialize/RT_occupations_update.F @@ -20,8 +20,6 @@ subroutine RT_occupations_update( ) ! integer :: ib,ik,ik_RT,i_sp ! - if (n_sp_pol==2) call error("subroutine RT_occupations_update not coded with n_sp_pol=2") - ! ! El/Ho Occupations are defined from G_lesser and G_lesser_reference !=================== call RT_occupation_clean(RT_el_occ) @@ -33,19 +31,19 @@ subroutine RT_occupations_update( ) do ik=1,nkibz do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) ! - RT_el_occ%N_ref(ib,ik_RT) = aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) - RT_ho_occ%N_ref(ib,ik_RT) = spin_occ-aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) + RT_el_occ%N_ref(ib,ik_RT,i_sp) = aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) + RT_ho_occ%N_ref(ib,ik_RT,i_sp) = spin_occ-aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - RT_el_occ%dN(ib,ik_RT)= aimag(dG_lesser(ib,ib,ik_RT,i_sp,1)) + RT_el_occ%dN(ib,ik_RT,i_sp)= aimag(dG_lesser(ib,ib,ik_RT,i_sp,1)) ! - RT_el_occ%N(ib,ik_RT) = RT_el_occ%N_ref(ib,ik_RT)+RT_el_occ%dN(ib,ik_RT) - RT_ho_occ%N(ib,ik_RT) = RT_ho_occ%N_ref(ib,ik_RT)-RT_el_occ%dN(ib,ik_RT) + RT_el_occ%N(ib,ik_RT,i_sp) = RT_el_occ%N_ref(ib,ik_RT,i_sp)+RT_el_occ%dN(ib,ik_RT,i_sp) + RT_ho_occ%N(ib,ik_RT,i_sp) = RT_ho_occ%N_ref(ib,ik_RT,i_sp)-RT_el_occ%dN(ib,ik_RT,i_sp) ! if (.not.RT_is_dynamically_dephased) cycle ! - RT_life_occ%dN(ib,ik_RT) = RT_el_occ%dN(ib,ik_RT) + RT_life_occ%dN(ib,ik_RT,i_sp) = RT_el_occ%dN(ib,ik_RT,i_sp) ! enddo enddo diff --git a/src/real_time_propagation/RT_Scattering_step.F b/src/real_time_propagation/RT_Scattering_step.F index 5eacf31329..0f6ecfb1e9 100644 --- a/src/real_time_propagation/RT_Scattering_step.F +++ b/src/real_time_propagation/RT_Scattering_step.F @@ -32,7 +32,7 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! Here remember that the occupations stored in the module are always equal to dG_inp ! use pars, ONLY:SP,cI,rZERO - use electrons, ONLY:spin_occ + use electrons, ONLY:spin_occ,n_sp_pol use real_time, ONLY:RT_bands,RTibz,l_RT_include_eq_scatt,RT_is_statically_dephased,& & RT_is_dynamically_dephased,RT_Deph_Matrix,G_lesser_reference use RT_occupations, ONLY:RT_el_occ,RT_ho_occ,l_RT_relax_time_approx,RT_RTA_E_occ_infty,RT_RTA_H_occ_infty @@ -52,18 +52,20 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! if( .not. RT_is_dynamically_dephased) return ! + if (n_sp_pol==2) call error("RT_Scattering step not fully ported for n_sp_pol=2") + ! do ib=RT_bands(1),RT_bands(2) ! ! 1=electrons ! 2=holes ! - f_(1)=RT_el_occ%N(ib,ik) - f_(2)=RT_ho_occ%N(ib,ik) + f_(1)=RT_el_occ%N(ib,ik,i_sp_pol) + f_(2)=RT_ho_occ%N(ib,ik,i_sp_pol) ! f0(1)= aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) f0(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) - df(1)= RT_el_occ%dN(ib,ik) - df(2)=-RT_el_occ%dN(ib,ik) + df(1)= RT_el_occ%dN(ib,ik,i_sp_pol) + df(2)=-RT_el_occ%dN(ib,ik,i_sp_pol) ! ! The GAMMA0 term could be moved inside RT_apply_RWA.F ! For the moment I keep it here, together with the rest of the relaxation term diff --git a/src/real_time_propagation/RT_occupations_eval.F b/src/real_time_propagation/RT_occupations_eval.F index 09074a54e2..17b5a8ecc8 100644 --- a/src/real_time_propagation/RT_occupations_eval.F +++ b/src/real_time_propagation/RT_occupations_eval.F @@ -27,9 +27,6 @@ subroutine RT_occupations_eval(dG) & G_ref(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) logical, external :: RT_do_it ! - i_sp=1 - if (n_sp_pol==2) call error("Occupations eval not coded for n_sp_pol=2") - ! ! Update the occupations: ! RT_delta_occupations are always sensitive to small changes ! for Gref~spin_occ RT_H_occ is also sensitive @@ -39,6 +36,7 @@ subroutine RT_occupations_eval(dG) RT_ho_occ%N=0._SP RT_el_occ%dN=0._SP ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if (.not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle @@ -52,29 +50,30 @@ subroutine RT_occupations_eval(dG) ! if (l_RT_rotate_DM.and.(RT_do_it('OUT').or.RT_do_it('CARR'))) then do ib=RT_bands(1),RT_bands(2) - RT_el_occ%N(ib,ik)= aimag(G_rot(ib,ib)) - RT_ho_occ%N(ib,ik)=-aimag(G_rot(ib,ib))+spin_occ + RT_el_occ%N(ib,ik,i_sp)= aimag(G_rot(ib,ib)) + RT_ho_occ%N(ib,ik,i_sp)=-aimag(G_rot(ib,ib))+spin_occ ! This would be the correct definition ! RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_ref(ib,ib)) ! but I use this definition to consistently reconstruct f from df in ypp - RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_lesser_reference(ib,ib,ik,i_sp)) + RT_el_occ%dN(ib,ik,i_sp)=aimag(G_rot(ib,ib)-G_lesser_reference(ib,ib,ik,i_sp)) enddo else do ib=RT_bands(1),RT_bands(2) ! - RT_el_occ%N(ib,ik)= aimag(dG(ib,ib,ik,i_sp))+aimag(G_lesser_reference(ib,ib,ik,i_sp)) + RT_el_occ%N(ib,ik,i_sp)= aimag(dG(ib,ib,ik,i_sp))+aimag(G_lesser_reference(ib,ib,ik,i_sp)) ! ! AM, July 2015. Intel compilers nest in ordered way the mathematical parenthesis. By using ! df_H this problem is solved. ! df_H =spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp)) - RT_ho_occ%N(ib,ik)=-aimag(dG(ib,ib,ik,i_sp))+ df_H + RT_ho_occ%N(ib,ik,i_sp)=-aimag(dG(ib,ib,ik,i_sp))+ df_H ! - RT_el_occ%dN(ib,ik)=aimag(dG(ib,ib,ik,i_sp)) + RT_el_occ%dN(ib,ik,i_sp)=aimag(dG(ib,ib,ik,i_sp)) enddo endif ! enddo + enddo ! call PP_redux_wait(RT_el_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) call PP_redux_wait(RT_ho_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 8d88dfa979..916d26ac6a 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -156,7 +156,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) if(present(bands)) then f_occ=0._SP do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) - f_occ=f_occ+RT_el_occ%dN(ib,ik_RT)*RTibz%weights(ik_RT) + f_occ=f_occ+RT_el_occ%dN(ib,ik_RT,i_sp_pol)*RTibz%weights(ik_RT) enddo endif #endif From 2009aca9c7403cbdeba28b776950ba735e5e0183 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Apr 2025 22:59:37 +0200 Subject: [PATCH 0918/1367] Version 5.3.0, Revision 24500, Hash 929b46e344 MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_HXC.F real_time_control/RT_carriers_number.F Changes: - [yambo_rt] small fixes for case n_sp_pol=2 Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_HXC.F | 6 +++--- src/real_time_control/RT_carriers_number.F | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index f2fa21d6fc..5b21392363 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24499 h.b1abe19f18. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24500 h.929b46e344. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24499 h.b1abe19f18' -PACKAGE_STRING='Yambo 5.3.0 r.24499 h.b1abe19f18' +PACKAGE_VERSION='5.3.0 r.24500 h.929b46e344' +PACKAGE_STRING='Yambo 5.3.0 r.24500 h.929b46e344' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24499 h.b1abe19f18 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24500 h.929b46e344 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24499 h.b1abe19f18:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24500 h.929b46e344:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24499 h.b1abe19f18 +Yambo configure 5.3.0 r.24500 h.929b46e344 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24499 h.b1abe19f18, which was +It was created by Yambo $as_me 5.3.0 r.24500 h.929b46e344, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24499" -SHASH="b1abe19f18" +SREVISION="24500" +SHASH="929b46e344" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24499 h.b1abe19f18, which was +This file was extended by Yambo $as_me 5.3.0 r.24500 h.929b46e344, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24499 h.b1abe19f18 +Yambo config.status 5.3.0 r.24500 h.929b46e344 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index fa8a6989dd..76aa176e2c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24499 h.b1abe19f18, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24500 h.929b46e344, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24499" -SHASH="b1abe19f18" +SREVISION="24500" +SHASH="929b46e344" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 0a53af3dbb..105f95a195 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -265,14 +265,14 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) enddo ! n_steps=0 - if (COLLISIONS_HXC_local) n_steps=n_steps+PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements - if (COLLISIONS_HXC_MB.or.l_use_COH_collisions) n_steps=n_steps+PAR_NC_local*PAR_nQ_bz*PAR_n_Bp_mat_elements + if (COLLISIONS_HXC_local) n_steps=n_steps+PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements*n_sp_pol + if (COLLISIONS_HXC_MB.or.l_use_COH_collisions) n_steps=n_steps+PAR_NC_local*PAR_nQ_bz*PAR_n_Bp_mat_elements*n_sp_pol ! if (IO_BS_err==0) then i_steps=2 if (COLLISIONS_CV_only) then i_steps=1 - n_steps=PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements + n_steps=PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements*n_sp_pol endif endif ! diff --git a/src/real_time_control/RT_carriers_number.F b/src/real_time_control/RT_carriers_number.F index 5df0e24b5b..05f4fa4a79 100644 --- a/src/real_time_control/RT_carriers_number.F +++ b/src/real_time_control/RT_carriers_number.F @@ -34,7 +34,7 @@ subroutine RT_carriers_number(en,k,Ncarr) do ib=RT_bands(1),RT_bands(2) VALUE_tmp=0._SP do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) - if ( RT_levels%E(ib,ik_RT,1)<=0._SP ) then + if ( RT_levels%E(ib,ik_RT,i_sp)<=0._SP ) then if (NE_i_time==NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)+RT_ho_occ%N(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) if (NE_i_time/=NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)-RT_el_occ%dN(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) else From 398361671b4bb94605db616ec1d9426f4456bcfa Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 18 Apr 2025 15:13:38 +0200 Subject: [PATCH 0919/1367] Version 5.3.0, Revision 24445, Hash 166bce0bd6 MODIFIED * configure include/version/version.m4 bse/K_IP.F Changes: - [yambo] comment improved Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/K_IP.F | 7 ++++++- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f6a7793e43..c2f27f18fe 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24444 h.6feda57176. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24445 h.166bce0bd6. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24444 h.6feda57176' -PACKAGE_STRING='Yambo 5.3.0 r.24444 h.6feda57176' +PACKAGE_VERSION='5.3.0 r.24445 h.166bce0bd6' +PACKAGE_STRING='Yambo 5.3.0 r.24445 h.166bce0bd6' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1683,7 +1683,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24444 h.6feda57176 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24445 h.166bce0bd6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1749,7 +1749,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24444 h.6feda57176:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24445 h.166bce0bd6:";; esac cat <<\_ACEOF @@ -1995,7 +1995,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24444 h.6feda57176 +Yambo configure 5.3.0 r.24445 h.166bce0bd6 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2624,7 +2624,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24444 h.6feda57176, which was +It was created by Yambo $as_me 5.3.0 r.24445 h.166bce0bd6, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3382,8 +3382,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24444" -SHASH="6feda57176" +SREVISION="24445" +SHASH="166bce0bd6" @@ -18055,7 +18055,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24444 h.6feda57176, which was +This file was extended by Yambo $as_me 5.3.0 r.24445 h.166bce0bd6, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18119,7 +18119,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24444 h.6feda57176 +Yambo config.status 5.3.0 r.24445 h.166bce0bd6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d081810c11..f29d156d1a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24444 h.6feda57176, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24445 h.166bce0bd6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24444" -SHASH="6feda57176" +SREVISION="24445" +SHASH="166bce0bd6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index d424a93297..10637549b2 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -374,9 +374,14 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! beta_ij=-((i*hbar*me)/(omega*qe^2))*G_ij; ! DeltaN=((8*pi*N*omega/(3*c))*Tr(beta_ij); ! N = molecular density = ?? + ! + ! Yambo atomic units ! SPEED_OF_LIGHT = c in a.u. + ! hbar=1 ; me=1 ; qe=1 => beta=-i/omega*G_{ij} + ! + ! this is (omega/c)*beta=-i/c*G_{ij} ! - X_dichroism(:,3)=X_dichroism(:,3)*(cI/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) ! this is (omega/c)*beta, with beta=-((i*hbar*me)/(omega*qe^2))*G_ij + X_dichroism(:,3)=X_dichroism(:,3)*(cI/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) ! endif ! From 3c7ed7b0b4904f249e43eb774ac10d15189b6aa9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 19 Apr 2025 11:15:02 +0200 Subject: [PATCH 0920/1367] Version 5.3.0, Revision 24492, Hash 4fe250385e MODIFIED * configure include/version/version.m4 collisions/COLLISIONS_alloc_and_free.F collisions/COLLISIONS_basic_operations.F collisions/COLLISIONS_compose_nl.F collisions/COLLISIONS_compose_rt.F collisions/COLLISIONS_compress.F collisions/COLLISIONS_eval.F collisions/COLLISIONS_linearize_and_IO.F common/LEVELS_mirror.F common/OCCUPATIONS_Fermi.F hamiltonian/Build_W_operator.F hamiltonian/XC_potentials.F interface/INIT_activate.F interface/INIT_load.F io_parallel/io_COLLISIONS.F io_parallel/io_COLLISIONS_header.F modules/SET_defaults.F modules/mod_collision_ext.F modules/mod_hamiltonian.F modules/mod_nl_optics.F modules/mod_real_time.F nloptics/NL_driver.F nloptics/NL_initialize.F real_time_hamiltonian/RT_apply_field.F Changes: - Coding of rea-time propagation and collisions generation/use with frozen states refined Patch sent by: Davide Sangalli --- configure | 22 ++++++------ include/version/version.m4 | 6 ++-- src/collisions/COLLISIONS_alloc_and_free.F | 10 +++++- src/collisions/COLLISIONS_basic_operations.F | 35 +++++++++++------- src/collisions/COLLISIONS_compose_nl.F | 9 ++++- src/collisions/COLLISIONS_compose_rt.F | 9 ++++- src/collisions/COLLISIONS_compress.F | 23 ++++++++---- src/collisions/COLLISIONS_eval.F | 5 ++- src/collisions/COLLISIONS_linearize_and_IO.F | 11 +++++- src/common/LEVELS_mirror.F | 34 +++++++++++++----- src/common/OCCUPATIONS_Fermi.F | 2 +- src/hamiltonian/Build_W_operator.F | 20 ++++++++--- src/hamiltonian/XC_potentials.F | 6 ++-- src/interface/INIT_activate.F | 6 ++-- src/interface/INIT_load.F | 12 +++++-- src/io_parallel/io_COLLISIONS.F | 4 +-- src/io_parallel/io_COLLISIONS_header.F | 6 ++-- src/modules/SET_defaults.F | 17 ++++++--- src/modules/mod_collision_ext.F | 3 ++ src/modules/mod_hamiltonian.F | 2 ++ src/modules/mod_nl_optics.F | 2 ++ src/modules/mod_real_time.F | 2 ++ src/nloptics/NL_driver.F | 3 +- src/nloptics/NL_initialize.F | 3 +- src/real_time_hamiltonian/RT_apply_field.F | 38 +++++++++++++++++--- 25 files changed, 215 insertions(+), 75 deletions(-) diff --git a/configure b/configure index 94394a1fa2..822cf23352 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24489 h.61de44d824. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24492 h.4fe250385e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24489 h.61de44d824' -PACKAGE_STRING='Yambo 5.3.0 r.24489 h.61de44d824' +PACKAGE_VERSION='5.3.0 r.24492 h.4fe250385e' +PACKAGE_STRING='Yambo 5.3.0 r.24492 h.4fe250385e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24489 h.61de44d824 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24492 h.4fe250385e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24489 h.61de44d824:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24492 h.4fe250385e:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24489 h.61de44d824 +Yambo configure 5.3.0 r.24492 h.4fe250385e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24489 h.61de44d824, which was +It was created by Yambo $as_me 5.3.0 r.24492 h.4fe250385e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24489" -SHASH="61de44d824" +SREVISION="24492" +SHASH="4fe250385e" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24489 h.61de44d824, which was +This file was extended by Yambo $as_me 5.3.0 r.24492 h.4fe250385e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24489 h.61de44d824 +Yambo config.status 5.3.0 r.24492 h.4fe250385e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 4fcb08e7e6..211a7930db 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24489 h.61de44d824, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24492 h.4fe250385e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24489" -SHASH="61de44d824" +SREVISION="24492" +SHASH="4fe250385e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 7a09110b70..c4f2391df1 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -13,7 +13,7 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use electrons, ONLY:n_met_bands,n_full_bands use parallel_m, ONLY:PAR_nPlasma,PAR_nQ_bz use collision_ext, ONLY:COLLISIONS_element,COH_COLL_element,HXC_COLL_element,GW_NEQ_COLL_element,& -& COLL_bands,COLLISIONS_load_SP,COLLISIONS_CV_only,& +& COLL_bands,COLLISIONS_load_SP,COLLISIONS_CV_only,COLLISIONS_FEW_only,& & GW_NEQ_collisions,COH_collisions,HXC_collisions,P_collisions,COLLISIONS_group #if defined _QED use QP_m, ONLY:QP_QED_ng @@ -96,6 +96,14 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) D(1:2,3)=minval(n_full_bands) D(1:2,4)=maxval(n_met_bands) endif + if (COLLISIONS_FEW_only) then + ! This is how these numbers are used in src/io_parallel/io_COLLISIONS.F + !N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk + !N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nv + !N(3)=COLL_grp%D(2,4)-COLL_grp%D(2,1)+1 ! Nc + D(1:2,3)=minval(n_full_bands) + D(1:2,4)=maxval(n_met_bands)+4 ! Remove the first 4 CV bands, e.g. 6-7-8-9 from the count of Nc + endif if (l_collision.and.l_alloc) then allocate(HXC_COLL_element(size_)) HXC_COLL_element%N=size_ diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index 7c1468711a..30acbe453e 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -17,7 +17,8 @@ subroutine COLLISIONS_basic_operations( what, COLL ) ! integer, pointer :: IO_status(:) => null() ! end type ! - use collision_ext, ONLY:COLLISIONS_group,COLL_bands,COLLISIONS_CV_only + use collision_ext, ONLY:COLLISIONS_group,COLLISIONS_CV_only,COLLISIONS_FEW_only,& + & COLL_bands,COLL_hole_bands,COLL_elec_bands use R_lattice, ONLY:nXkibz use electrons, ONLY:n_sp_pol,n_full_bands,n_met_bands use wave_func, ONLY:states_to_load @@ -77,22 +78,29 @@ subroutine COLLISIONS_basic_operations( what, COLL ) ! COLL%N=0 ! - do i_k=1,nXkibz - do i_n=COLL_bands(1),COLL_bands(2) - do i_mix=0,COLL_bands(2)-COLL_bands(1) + do i_sp=1,n_sp_pol + do i_k=1,nXkibz + do i_n=COLL_bands(1),COLL_bands(2) ! - i_m=i_n+i_mix + if ( COLLISIONS_CV_only .and. i_n> n_met_bands(i_sp) ) cycle + if ( COLLISIONS_FEW_only .and. i_nCOLL_hole_bands(2) .and. i_nCOLL_elec_bands(2) ) cycle ! - ! No Off-diagonal elements in the case of P collisions - ! - if (trim(COLL%name)=="Momentum".and.i_mix>0) cycle - ! - if (i_m>COLL_bands(2)) cycle - ! - do i_sp=1,n_sp_pol + do i_mix=0,COLL_bands(2)-COLL_bands(1) + ! + i_m=i_n+i_mix ! - if ( COLLISIONS_CV_only .and. i_n> n_met_bands(i_sp) ) cycle if ( COLLISIONS_CV_only .and. i_m<=n_full_bands(i_sp) ) cycle + if ( COLLISIONS_FEW_only .and. i_mCOLL_hole_bands(2) .and. i_mCOLL_elec_bands(2) ) cycle + ! + if (i_m>COLL_bands(2)) cycle + ! + ! No Off-diagonal elements in the case of P collisions + ! + if (trim(COLL%name)=="Momentum".and.i_mix>0) cycle ! COLL%N=COLL%N+1 if (i_c==2) then @@ -104,6 +112,7 @@ subroutine COLLISIONS_basic_operations( what, COLL ) COLL%state(COLL%N,:4)=(/i_m,i_n,i_k,i_sp/) endif endif + ! enddo enddo enddo diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 95f70d26aa..c926c3bdba 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -11,7 +11,8 @@ subroutine COLLISIONS_compose_nl(G_in) ! use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree!l_sc_hf,l_sc_cohsex,l_sc_exx - use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_load_SP,COLLISIONS_CV_only + use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_load_SP,& + & COLLISIONS_CV_only,COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands use electrons, ONLY:spin,n_met_bands,n_full_bands use R_lattice, ONLY:nXkibz use parallel_m, ONLY:HEAD_QP_cpu,PAR_COM_Xk_ibz_INDEX @@ -42,9 +43,15 @@ subroutine COLLISIONS_compose_nl(G_in) coll_sp=COLLISIONS_load_SP ! do ibp=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle do ib=COLL_bands(1),COLL_bands(2) if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp>maxval(n_met_bands) ) ) cycle if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle do_collisions(ib,ibp)=.true. enddo enddo diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index f0d8718da4..5cb3132947 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -11,7 +11,8 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree - use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only + use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only,& + & COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands use electrons, ONLY:spin,n_met_bands,n_full_bands use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait @@ -36,9 +37,15 @@ subroutine COLLISIONS_compose_rt(dG_avg) do_collisions=.false. ! do ibp=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle do ib=COLL_bands(1),COLL_bands(2) if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp>maxval(n_met_bands) ) ) cycle if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle do_collisions(ib,ibp,1)=.true. if (.not.PAR_IND_Bp_mat%element_1D( B_mat_index(ib,ibp,COLL_bands) ) ) cycle do_collisions(ib,ibp,2)=.true. diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index 4cb5b0e970..b5eecf8216 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -11,10 +11,10 @@ subroutine COLLISIONS_compress(COLL) ! use pars, ONLY:SP,DP,SP6,cZERO - use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff,& - & COLLISIONS_CV_only + use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff,COLLISIONS_CV_only,& + & COLLISIONS_FEW_only,COLL_elec_bands,COLL_hole_bands use R_lattice, ONLY:nXkibz - use electrons, ONLY:n_met_bands,n_full_bands + use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol ! #include ! @@ -23,7 +23,7 @@ subroutine COLLISIONS_compress(COLL) ! Work Space ! real(SP) :: COLLISIONS_max - integer :: ib,ibp,i_kmq,ic + integer :: ib,ibp,i_kmq,ic,i_sp logical :: l_coll_SP ! if(allocated(COLL%v_c_SP)) then @@ -43,12 +43,22 @@ subroutine COLLISIONS_compress(COLL) ! COLL%table='f' ! + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + ! do ib=COLL_bands(1),COLL_bands(2) ! - if ( COLLISIONS_CV_only .and. (ib> maxval(n_met_bands) .and. ibp> maxval(n_met_bands) ) ) cycle - if ( COLLISIONS_CV_only .and. (ib<=minval(n_full_bands) .and. ibp<=minval(n_full_bands)) ) cycle + if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle + ! + if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle ! ic=ic+1 ! @@ -60,6 +70,7 @@ subroutine COLLISIONS_compress(COLL) enddo enddo enddo + enddo ! COLL%N=count(COLL%table(:,:,:)=='t') ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 3afbbef83c..3669f7e5f3 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -31,7 +31,8 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use hamiltonian, ONLY:H_potential,H_kind use global_XC, ONLY:QP_SE_GW_NEQ,QP_SE_GW_QED use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,COLLISIONS_from_BSE,& -& COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming +& COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming,& +& COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands use X_m, ONLY:X_t use plasma, ONLY:EH_gas use frequency, ONLY:w_samp @@ -69,6 +70,8 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! l_use_collisions=.TRUE. ! + COLLISIONS_FEW_only=all((/COLL_hole_bands/=-1,COLL_elec_bands/=-1/)) + ! ! XC Potentials !=============== ! diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index efef769326..a29c9d12aa 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -11,7 +11,9 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme use parallel_m, ONLY:master_cpu,yMPI_comm use parallel_int, ONLY:PP_wait use electrons, ONLY:n_met_bands,n_full_bands - use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_cutoff,COLLISIONS_group,COLLISIONS_CV_only + use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_cutoff,COLLISIONS_group,& +& COLLISIONS_CV_only,COLLISIONS_FEW_only,& +& COLL_hole_bands,COLL_elec_bands use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_APP_CL,OP_WR_CL,OP_APP,WR,WR_CL,io_COLLs use COLL_interfaces, ONLY:io_COLLISIONS @@ -87,11 +89,18 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme ! do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 + if ( COLLISIONS_FEW_only .and. i2COLL_hole_bands(2) .and. i2COLL_elec_bands(2) ) cycle do i1=COLL_grp%D(1,1),COLL_grp%D(1,2) ! ib2 ! if ( COLLISIONS_CV_only .and. (i1> maxval(n_met_bands) .and. i2> maxval(n_met_bands) ) ) cycle if ( COLLISIONS_CV_only .and. (i1<=minval(n_full_bands) .and. i2<=minval(n_full_bands)) ) cycle ! + if ( COLLISIONS_FEW_only .and. i1COLL_hole_bands(2) .and. i1COLL_elec_bands(2) ) cycle + ! ! In the COHSEX/HF case a cutoff can be applied ! if (l_HXC.or.l_COH) then diff --git a/src/common/LEVELS_mirror.F b/src/common/LEVELS_mirror.F index 053e6edf87..fa96e2d1f3 100644 --- a/src/common/LEVELS_mirror.F +++ b/src/common/LEVELS_mirror.F @@ -19,14 +19,14 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) use SC, ONLY:SC_bands #endif #if defined _RT || defined _QED || defined _NL - use real_time, ONLY:RT_bands + use real_time, ONLY:RT_bands,RT_hole_bands,RT_elec_bands #endif #if defined _SC || defined _RT || defined _QED || defined _NL - use collision_ext, ONLY:COLL_bands - use hamiltonian, ONLY:H_ref_bands + use collision_ext, ONLY:COLL_bands,COLL_hole_bands,COLL_elec_bands + use hamiltonian, ONLY:H_ref_bands,H_ref_hole_bands,H_ref_elec_bands #endif #if defined _NL - use nl_optics, ONLY:NL_bands + use nl_optics, ONLY:NL_bands,NL_hole_bands,NL_elec_bands #endif ! implicit none @@ -37,7 +37,7 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) type(X_t) ::X(5) logical ::l_USER_field(16) ! - integer :: i1,SCATT_bands(2),DIP_bands(2) + integer :: i1,SCATT_bands(2),SCATT_hole_bands(2),SCATT_elec_bands(2),DIP_bands(2) ! if (STRING_same(what,"USER_fields")) then ! @@ -81,17 +81,27 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) ! Bands (Electronic levels) !--------------------------- SCATT_bands=-1 + SCATT_hole_bands=-1 + SCATT_elec_bands=-1 do i1=8,12 if(.not.(l_USER_field(i1))) cycle ! #if defined _RT || defined _QED || defined _NL - if(i1==8) SCATT_bands=RT_bands + if(i1==8) then + SCATT_bands=RT_bands + SCATT_hole_bands=RT_hole_bands + SCATT_elec_bands=RT_elec_bands + endif #endif #if defined _SC if(i1==9) SCATT_bands=SC_bands #endif #if defined _NL - if(i1==10) SCATT_bands=NL_bands + if(i1==10) then + SCATT_bands=NL_bands + SCATT_hole_bands=NL_hole_bands + SCATT_elec_bands=NL_elec_bands + endif #endif #if defined _SC if(i1==11) then @@ -102,7 +112,11 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) #if defined _RT || defined _QED || defined _NL if(i1==11) then RT_bands =COLL_bands + RT_hole_bands =COLL_hole_bands + RT_elec_bands =COLL_elec_bands SCATT_bands=COLL_bands + SCATT_hole_bands=COLL_hole_bands + SCATT_elec_bands=COLL_elec_bands endif #endif #if defined _QED @@ -134,11 +148,15 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) call fix_me(SCATT_bands) call fix_me(DIP_bands) ! - ! Now MIRROR in related bands ranges! + ! Now MIRROR in related bands ranges !------------------------------------ #if defined _SC || defined _RT || defined _QED || defined _NL COLL_bands =SCATT_bands + COLL_hole_bands =SCATT_hole_bands + COLL_elec_bands =SCATT_elec_bands H_ref_bands=SCATT_bands + H_ref_hole_bands=SCATT_hole_bands + H_ref_elec_bands=SCATT_elec_bands #endif Dip%ib=DIP_bands ! diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index bc1d6836c5..5971b1b47f 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -118,7 +118,7 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! Start Loop ! i_trials=1 - nel_diff_zero=1.E-5 + nel_diff_zero=1.E-4 Fermi_is_converged=.false. ! ! BUG-fix [Andrea 1/6/2012]: when the system is semiconductive it may happen the diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index dd62557669..95893192eb 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -15,7 +15,7 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) use electrons, ONLY:levels use electric, ONLY:l_force_SndOrd use QP_m, ONLY:QP_nk - use hamiltonian, ONLY:H_ref_bands + use hamiltonian, ONLY:H_ref_bands,H_ref_hole_bands,H_ref_elec_bands use R_lattice, ONLY:bz_samp,k_map use D_lattice, ONLY:a use matrix_operate, ONLY:hermitian @@ -33,6 +33,7 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) ! ! Work Space ! + logical :: l_selective_coupling integer :: i1,i2,im,id,id_red integer :: ikbz,istep,max_step complex(SP) :: Wk(3,H_ref_bands(2),H_ref_bands(2)) @@ -40,6 +41,8 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) complex(SP) :: V_tilde(en%nbf(i_sp),H_ref_bands(2),2) complex(SP) :: E_vec_pot(3) ! + l_selective_coupling=all((/H_ref_hole_bands/=-1,H_ref_elec_bands/=-1/)) + ! E_vec_pot=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Wk=cZERO @@ -133,11 +136,18 @@ subroutine Build_W_operator(en,Xk,A_input,ik,i_sp,V_bands,H_nl_sc) enddo !$omp end parallel do ! - !$omp parallel do default(shared), private(i1,id) + !$omp parallel do default(shared), private(i1,i2,id) do i1=H_ref_bands(1),H_ref_bands(2) - do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & - & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) + if ( l_selective_coupling .and. i1H_ref_hole_bands(2) .and. i1H_ref_elec_bands(2) ) cycle + do i2=H_ref_bands(1),H_ref_bands(2) + if ( l_selective_coupling .and. i2H_ref_hole_bands(2) .and. i2H_ref_elec_bands(2) ) cycle + do id=1,3 + H_nl_sc(i1,i2)=H_nl_sc(i1,i2)+E_vec_pot(id)*Wk(id,i1,i2) + enddo enddo enddo !$omp end parallel do diff --git a/src/hamiltonian/XC_potentials.F b/src/hamiltonian/XC_potentials.F index 3a51e9f4ba..9cca704b3c 100644 --- a/src/hamiltonian/XC_potentials.F +++ b/src/hamiltonian/XC_potentials.F @@ -164,9 +164,9 @@ subroutine XC_potentials(POTENTIALS_string) call warning("NULL SC potential! ") else if (STRING_same(trim(potentials(i_c)),'CVONLY')) then call warning("Only CV components included ") - else if (STRING_same(trim(potentials(i_c)),'KBSE')) then - call warning("Loading BSE kernel instead of computing collisions ") - else + else if (STRING_same(trim(potentials(i_c)),'KBSE')) then + call warning("Loading BSE kernel instead of computing collisions ") + else call error("Unknown SC potential! ") endif ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index a9602cbdad..f923bfdd7f 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -468,7 +468,7 @@ subroutine INIT_activate() ! ! Collisions ! - if (l_eval_collisions) call initactivate( 0,'COLLBands COLLBseMem') + if (l_eval_collisions) call initactivate( 0,'COLLBands COLLHoleBands COLLElecBands COLLBseMem') ! if ( (l_eval_collisions.or.l_real_time).and.l_elel_scatt ) call initactivate(1,'PlasmaPerc') ! @@ -544,7 +544,7 @@ subroutine INIT_activate() if (l_elph_scatt) call initactivate(1,'MemTresh RandQpts RT_T_evol ElPhModes UseDebyeE') if (l_elel_scatt) call initactivate( 1,'EERimPerc') ! - call initactivate(1,'RTBands Integrator GrKind TwoAlph RTehEny ScattTresh') + call initactivate(1,'RTBands RTHoleBands RTElecBands Integrator GrKind TwoAlph RTehEny ScattTresh') call initactivate(1,'RADLifeTime RADmagnific PhLifeTime DephCVonly DephEThresh DephTRange') call initactivate(1,'RTstep NEsteps NETime DipoleEtresh SPINprojected') call initactivate(1,'IOtime IOCachetime') @@ -562,7 +562,7 @@ subroutine INIT_activate() ! #if defined _NL if (l_nl_optics) then - call initactivate(1,'FFTGvecs NLBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') + call initactivate(1,'FFTGvecs NLBands NLHoleBands NLElecBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') call initactivate(1,'TestOSCLL VelGaugeNoDiam') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps') if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index ac40fcf05d..933104bba8 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -52,7 +52,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _SC || defined _RT || defined _QED use hamiltonian, ONLY:H_potential - use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands + use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLL_hole_bands,COLL_elec_bands #endif use QP_m, ONLY:SC_E_threshold #if defined _SC @@ -68,7 +68,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem use RT_lifetimes, ONLY:RT_life_extrap_times_INPUT use real_time, ONLY:RT_step, Integrator_name, RAD_LifeTime, Phase_LifeTime, & -& NE_tot_time,RT_bands,RT_deph_range, & +& NE_tot_time,RT_bands,RT_hole_bands,RT_elec_bands,RT_deph_range, & & RT_ave_dephasing,RT_eh_en,RT_scatt_tresh,Gr_kind, & & NE_MEM_treshold,NE_time_step_update_jump_INPUT, & & two_alpha,DbGd_EE_percent,NE_time_step_update_jump, & @@ -80,7 +80,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _NL use nl_optics, ONLY:NL_bands,NL_damping,NL_correlation,NL_er,n_frequencies,NL_LRC_alpha, & -& NL_verb_name,n_angles,NL_rot_axis +& NL_verb_name,n_angles,NL_rot_axis,NL_hole_bands,NL_elec_bands #endif #if defined _NL | defined _SC use fields, ONLY:Efield @@ -420,6 +420,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! Real Time dynamics ! call it(defs,'RTBands', '[RT] Bands',RT_bands) + call it(defs,'RTHoleBands','[RT] Active Bands range in valence',RT_hole_bands,Verb_level=V_real_time) + call it(defs,'RTElecBands','[RT] Active Bands range in conduct',RT_elec_bands,Verb_level=V_real_time) ! ! This call is a temporary fix due to the multiple definition of energy ranges. ! The call is needed to align the different values based on the USER definition. @@ -529,6 +531,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! Non-linear Optics ! call it(defs,'NLBands', '[NL] Bands range',NL_bands) + call it(defs,'NLHoleBands', '[NL] Active Bands range in valence',NL_hole_bands,Verb_level=V_nl_optics) + call it(defs,'NLElecBands', '[NL] Active Bands range in conduct',NL_elec_bands,Verb_level=V_nl_optics) call it(defs,'NLverbosity', '[NL] Verbosity level (low | high)',NL_verb_name) call it(defs,'NLstep', '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics) call it(defs,'NLtime', '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1)) @@ -715,6 +719,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! SC and RT common ! call it(defs,'COLLBands', '[COLL] Bands for the collisions',COLL_bands) + call it(defs,'COLLHoleBands','[COLL] Active Bands range in valence',COLL_hole_bands,Verb_level=V_sc) + call it(defs,'COLLElecBands','[COLL] Active Bands range in conduct',COLL_elec_bands,Verb_level=V_sc) ! call it(defs,'HXC_Potential', '[SC] SC HXC Potential',H_potential,protect=.FALSE.,case="A") call it(defs,'COLLCut', '[SC,RT] Cutoff on the collisions, 0=full 1=none (default =0.0005)',& diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index f5df731213..d3c814217f 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -11,7 +11,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) use parallel_m, ONLY:master_cpu use iso_c_binding, ONLY:C_LOC,C_F_POINTER use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,LAST_COLL_sync,PAR_COLL_min,& -& COLLISIONS_CV_only,COLLISIONS_load_SP +& COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP use IO_m, ONLY:io_sec,io_status,IO_OUTDATED_DB,read_is_on,IO_mode,io_unit,& & VERIFY,io_extension,write_is_on,nf90_sync,netcdf_call,YAMBO_DEF_CHUNK use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq,io_fragment, & @@ -62,7 +62,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) if (def1) then call def_variable_bulk(ID,'N_COLLISIONS_STATES',1,(/1/),IP_YIO,par_io_kind='independent') if (write_is_on(ID)) then - if (COLLISIONS_CV_only) then + if (COLLISIONS_CV_only.or.COLLISIONS_FEW_only) then N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nc N(3)=COLL_grp%D(2,4)-COLL_grp%D(2,1)+1 ! Nv diff --git a/src/io_parallel/io_COLLISIONS_header.F b/src/io_parallel/io_COLLISIONS_header.F index 43d48f6ef2..9b4095ce6b 100644 --- a/src/io_parallel/io_COLLISIONS_header.F +++ b/src/io_parallel/io_COLLISIONS_header.F @@ -9,7 +9,8 @@ integer function io_COLLISIONS_header(ID,COLL) ! use pars, ONLY:schlen,IP,IP_YIO use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts - use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLLISIONS_group,COLLISIONS_CV_only + use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLLISIONS_group,& +& COLLISIONS_CV_only,COLLISIONS_FEW_only use IO_m, ONLY:io_status,IO_OUTDATED_DB,read_is_on use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq, & & io_variable_bulk,def_variable_bulk,io_disconnect @@ -54,7 +55,7 @@ integer function io_COLLISIONS_header(ID,COLL) if (COLL%kind==QP_SE_GW_NEQ) SIZE_=SIZE_+3 if (COLL%kind==QP_SE_GW_QED) SIZE_=SIZE_+2 if (ver_is_gt_or_eq(ID,revision=21128)) then - SIZE_ = SIZE_+1 + SIZE_ = SIZE_+2 endif call io_elemental(ID,VAR="PARAMETERS",VAR_SZ=SIZE_,MENU=0) ! @@ -89,6 +90,7 @@ integer function io_COLLISIONS_header(ID,COLL) call io_elemental(ID,I0=COLL%kind,DB_I0=V_kind_disk,CHECK=.true.,OP=(/"=="/)) if (ver_is_gt_or_eq(ID,revision=21128)) then call io_elemental(ID,L0=COLLISIONS_CV_only,VAR='CV only scattering ',WARN=.true.,OP=(/"=="/)) + call io_elemental(ID,L0=COLLISIONS_FEW_only,VAR='FEW only scattering ',WARN=.true.,OP=(/"=="/)) endif call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index a242d56433..b7a8878fa1 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -78,8 +78,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & l_SC_nl_mix,SC_kind,SC_perturbation,SC_desc,SC_neq_kind,SC_last_coh_it #endif #if defined _SC || defined _RT || defined _QED || defined _NL - use collision_ext, ONLY:COLLISIONS_naming,COLLISIONS_cutoff,COLLISIONS_CV_only, & -& COLLISIONS_load_SP,COLLISIONS_compr + use collision_ext, ONLY:COLLISIONS_naming,COLLISIONS_cutoff,COLLISIONS_CV_only,COLLISIONS_FEW_only, & +& COLLISIONS_load_SP,COLLISIONS_compr,COLL_hole_bands,COLL_elec_bands use hamiltonian, ONLY:H_potential #endif #if defined _RT || defined _YPP_RT @@ -90,7 +90,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history use RT_lifetimes,ONLY:RT_life_extrap_times use real_time, ONLY:RT_step,NE_steps,NE_time,Integrator_name,RT_deph_range,& -& Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,& +& Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,RT_elec_bands,RT_hole_bands,& & NE_tot_time,NE_MEM_treshold,RT_eh_en,l_update_SOC,& & DbGd_EE_percent,RT_scatt_tresh,integrator_step,RT_nk,& & i_MEM_old,i_MEM_prev,i_MEM_now,G_MEM_steps,RT_step_manual_prefactor,& @@ -103,7 +103,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #endif #if defined _NL use nl_optics, ONLY:NL_correlation,NL_er,n_frequencies,NL_damping,NL_LRC_alpha,NL_initial_versor, & -& NL_verb_name,NL_bands,NL_desc,n_angles,NL_rot_axis +& NL_verb_name,NL_bands,NL_desc,n_angles,NL_rot_axis,NL_hole_bands,NL_elec_bands use fields, ONLY:Efield,Efield_reset #endif #if defined _SC @@ -552,9 +552,13 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) # endif ! COLLISIONS_CV_only=.FALSE. + COLLISIONS_FEW_only=.FALSE. COLLISIONS_load_SP=.FALSE. COLLISIONS_compr =.FALSE. ! + COLL_hole_bands=-1 + COLL_elec_bands=-1 + ! H_potential="NONE" ! #endif @@ -616,6 +620,9 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) NE_time=0._SP NE_tot_time= 1000._SP*FS2AUT ! + RT_hole_bands=-1 + RT_elec_bands=-1 + ! NE_time_step_update_last_point = 1 NE_time_step_update_jump = 0._SP NE_time_step_update_jump_INPUT = 0._SP @@ -695,6 +702,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) NE_tot_time = -1._SP*FS2AUT Integrator_name='INVINT' NL_bands =(/0,0/) + NL_hole_bands =-1 + NL_elec_bands =-1 NL_correlation="IPA" NL_er =(/-1._SP,-1._SP/)/HA2EV n_frequencies =0 diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index eafbd7bcce..f953390cc0 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -17,6 +17,8 @@ module collision_ext implicit none ! integer :: COLL_bands(2) + integer :: COLL_hole_bands(2) + integer :: COLL_elec_bands(2) integer :: COLL_ID integer :: LAST_COLL_sync integer :: PAR_COLL_min @@ -33,6 +35,7 @@ module collision_ext logical :: COLLISIONS_HXC_MB=.FALSE. logical :: COLLISIONS_HXC_use_TDDFT=.FALSE. logical :: COLLISIONS_CV_only=.FALSE. + logical :: COLLISIONS_FEW_only=.FALSE. logical :: COLLISIONS_from_BSE=.FALSE. logical :: COLLISIONS_load_SP=.FALSE. ! Force loading of collision in single precision logical :: COLLISIONS_compr =.FALSE. ! If parallel-io is used collisions in memory are compressed diff --git a/src/modules/mod_hamiltonian.F b/src/modules/mod_hamiltonian.F index 03b5a8b436..2260c55f8d 100644 --- a/src/modules/mod_hamiltonian.F +++ b/src/modules/mod_hamiltonian.F @@ -13,6 +13,8 @@ module hamiltonian #include ! integer :: H_ref_bands(2) + integer :: H_ref_hole_bands(2) + integer :: H_ref_elec_bands(2) integer :: H_ref_nbands ! character(schlen) :: H_potential diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 13dfb00854..71a8b8040b 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -112,6 +112,8 @@ module nl_optics real(SP) :: NL_estep real(SP) :: NL_ang_step integer :: NL_bands(2) + integer :: NL_elec_bands(2) + integer :: NL_hole_bands(2) integer :: NL_nbands integer :: n_angles real(SP) :: NL_rot_axis(3) diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 10aaea1722..f5ce834b50 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -135,6 +135,8 @@ module real_time ! integer :: RT_nk integer :: RT_bands(2) + integer :: RT_elec_bands(2) + integer :: RT_hole_bands(2) integer :: RT_nbands ! ! Equilibrium V_xc and V_hartree in real space diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index cce3d25ac8..a0e260de25 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -14,7 +14,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) use QP_m, ONLY: QP_ng_SH,QP_ng_Sx use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use collision_ext, ONLY:COLLISIONS_CV_only,HXC_collisions + use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_FEW_only,HXC_collisions use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t,DIP_S use ALLOC, ONLY:DIPOLE_ALLOC_elemental,DIPOLE_ALLOC_global @@ -165,6 +165,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) if(l_use_Hxc_collisions.and..not.COLLISIONS_have_HARTREE) eval_HARTREE=.TRUE. ! if(COLLISIONS_CV_only) call msg('rs','Collisions contains C<->V ONLY scatterings') + if(COLLISIONS_FEW_only) call msg('rs','Collisions contains ONLY selected scatterings') ! endif ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 246d35ab36..969b03731f 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -10,7 +10,7 @@ subroutine NL_initialize(E,k) use pars, ONLY:SP,DP,pi use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_hartree use vec_operate, ONLY:normalize_v,v_norm,cross_product - use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_load_SP,COLLISIONS_compr + use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP,COLLISIONS_compr use hamiltonian, ONLY:H_potential use units, ONLY:AU2VMm1,AUT2FS,HA2EV use electrons, ONLY:levels,n_sp_pol @@ -419,6 +419,7 @@ subroutine NL_initialize(E,k) if(eval_COLLISIONS) then ! if(COLLISIONS_CV_only) call warning(' ONLY cv scattering in COLLISIONS! ') + if(COLLISIONS_FEW_only) call warning(' ONLY selected scattering in COLLISIONS! ') ! if(l_no_compress_COLL) then call msg('sr','Full collisions in double-precision ') diff --git a/src/real_time_hamiltonian/RT_apply_field.F b/src/real_time_hamiltonian/RT_apply_field.F index 1869f7d36c..58877cc590 100644 --- a/src/real_time_hamiltonian/RT_apply_field.F +++ b/src/real_time_hamiltonian/RT_apply_field.F @@ -17,7 +17,7 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) use fields, ONLY:gauge_field use DIPOLES, ONLY:DIP_iR,DIP_P,DIP_v,DIP_P_spinor use X_m, ONLY:global_gauge - use real_time, ONLY:RT_bands,l_update_SOC,l_velocity_gauge_corr + use real_time, ONLY:RT_bands,RT_hole_bands,RT_elec_bands,l_update_SOC,l_velocity_gauge_corr use vec_operate, ONLY:cross_product use D_lattice, ONLY:sigma_x,sigma_y,sigma_z use parallel_m, ONLY:PAR_Xk_ibz_index @@ -30,10 +30,13 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! ! Work Space ! + logical :: l_selective_coupling integer :: i1,i2,i_spinor,j_spinor complex(SP) :: A_dot_J(2),E_dot_P(2),& & ExJs(3,n_spinor,n_spinor),A_vec_pot(3),E_vec_pot(3),& & POL(3),Jtot(3),Jspinor(3,n_spinor,n_spinor),sigma_dot_ExJs + ! + l_selective_coupling=all((/RT_hole_bands/=-1,RT_elec_bands/=-1/)) ! select case(trim(global_gauge)) ! @@ -48,8 +51,12 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! in case of complex Efield puts the correct Hermitian matrix ! and the intraband optical matrix elements have been set to zero ! -!$omp parallel do default(shared), private(i1,Jtot,A_dot_J) + !$omp parallel do default(shared), private(i1,Jtot,A_dot_J) do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle ! ! Case A: the pseudo-potential is correctly gauged, so A*p enters the hamiltonian if ( l_velocity_gauge_corr) Jtot(1:3)= -DIP_P(1:3,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) @@ -71,11 +78,20 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) A_dot_J(2)=sum(A_vec_pot(1:3)*conjg(Jtot(1:3))) H_nl_sc(i1,i1)=H_nl_sc(i1,i1)-real(A_dot_J(1),SP) enddo -!$omp end parallel do + !$omp end parallel do ! -!$omp parallel do default(shared), private(i1,i2,Jtot,A_dot_J) + !$omp parallel do default(shared), private(i1,i2,Jtot,A_dot_J) do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + ! do i2=i1+1,RT_bands(2) + ! + if ( l_selective_coupling .and. i2RT_hole_bands(2) .and. i2RT_elec_bands(2) ) cycle ! ! Note that (P)_cv = DIP_P (:,iv,ic,:,:) ! the off-diagonal diamagnetic term is zero @@ -105,6 +121,11 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Intraband terms ! do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + ! POL(:)=cI*DIP_iR(:,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) E_dot_P(1)=sum(E_vec_pot(1:3)* POL(1:3) ) E_dot_P(2)=sum(E_vec_pot(1:3)*conjg(POL(1:3))) @@ -132,7 +153,16 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Inter-band terms ! do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + ! do i2=i1+1,RT_bands(2) + ! + if ( l_selective_coupling .and. i2RT_hole_bands(2) .and. i2RT_elec_bands(2) ) cycle ! ! Note that (iR)_cv = DIP_iR (:,iv,ic,:,:) ! From 4d196571269718b06f355509f4ba4d3274de3174 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 19 Apr 2025 23:41:23 +0200 Subject: [PATCH 0921/1367] Version 5.3.0, Revision 24513, Hash 42bcc77aad MODIFIED * configure include/version/version.m4 io_parallel/io_COLLISIONS_header.F real_time_initialize/RT_start_and_restart.F Bugs: - [yambo_rt] small fix for n_sp_pol=2 case Patch sent by: Davide Sangalli --- configure | 22 ++++++++-------- include/version/version.m4 | 6 ++--- src/io_parallel/io_COLLISIONS_header.F | 26 +++++++++++++++---- .../RT_start_and_restart.F | 6 +++-- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/configure b/configure index c1ec90255c..7afbff53f4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24493 h.3c7ed7b0b4. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24513 h.42bcc77aad. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24493 h.3c7ed7b0b4' -PACKAGE_STRING='Yambo 5.3.0 r.24493 h.3c7ed7b0b4' +PACKAGE_VERSION='5.3.0 r.24513 h.42bcc77aad' +PACKAGE_STRING='Yambo 5.3.0 r.24513 h.42bcc77aad' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1679,7 +1679,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24493 h.3c7ed7b0b4 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24513 h.42bcc77aad to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1745,7 +1745,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24493 h.3c7ed7b0b4:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24513 h.42bcc77aad:";; esac cat <<\_ACEOF @@ -1990,7 +1990,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24493 h.3c7ed7b0b4 +Yambo configure 5.3.0 r.24513 h.42bcc77aad generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2619,7 +2619,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24493 h.3c7ed7b0b4, which was +It was created by Yambo $as_me 5.3.0 r.24513 h.42bcc77aad, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3377,8 +3377,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24493" -SHASH="3c7ed7b0b4" +SREVISION="24513" +SHASH="42bcc77aad" @@ -18032,7 +18032,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24493 h.3c7ed7b0b4, which was +This file was extended by Yambo $as_me 5.3.0 r.24513 h.42bcc77aad, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18096,7 +18096,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24493 h.3c7ed7b0b4 +Yambo config.status 5.3.0 r.24513 h.42bcc77aad configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 6cd18a9cf8..62cba99e1e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24493 h.3c7ed7b0b4, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24513 h.42bcc77aad, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24493" -SHASH="3c7ed7b0b4" +SREVISION="24513" +SHASH="42bcc77aad" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io_parallel/io_COLLISIONS_header.F b/src/io_parallel/io_COLLISIONS_header.F index 9b4095ce6b..1ecaa3476c 100644 --- a/src/io_parallel/io_COLLISIONS_header.F +++ b/src/io_parallel/io_COLLISIONS_header.F @@ -7,13 +7,16 @@ ! integer function io_COLLISIONS_header(ID,COLL) ! - use pars, ONLY:schlen,IP,IP_YIO + use pars, ONLY:schlen,IP,IP_YIO,LP_YIO use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLLISIONS_group,& -& COLLISIONS_CV_only,COLLISIONS_FEW_only - use IO_m, ONLY:io_status,IO_OUTDATED_DB,read_is_on +& COLLISIONS_CV_only,COLLISIONS_FEW_only,& +& COLL_hole_bands,COLL_elec_bands + use IO_m, ONLY:variable_exist,write_is_on,io_status,IO_OUTDATED_DB,read_is_on use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq, & -& io_variable_bulk,def_variable_bulk,io_disconnect +& io_variable_bulk,def_variable_bulk,io_disconnect, & +& def_variable_elemental,& +& io_variable_elemental use global_XC, ONLY:QP_SE_GW_NEQ,QP_SE_GW_QED,& & H_SE_FOCK,H_SE_COH,H_SE_SEX,H_SE_HARTREE use plasma, ONLY:N_plasma_poles_global,PLASMA_redux_percent @@ -21,6 +24,7 @@ integer function io_COLLISIONS_header(ID,COLL) use X_m, ONLY:X_desc use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing + ! #include ! integer, intent(inout) ::ID @@ -90,10 +94,22 @@ integer function io_COLLISIONS_header(ID,COLL) call io_elemental(ID,I0=COLL%kind,DB_I0=V_kind_disk,CHECK=.true.,OP=(/"=="/)) if (ver_is_gt_or_eq(ID,revision=21128)) then call io_elemental(ID,L0=COLLISIONS_CV_only,VAR='CV only scattering ',WARN=.true.,OP=(/"=="/)) - call io_elemental(ID,L0=COLLISIONS_FEW_only,VAR='FEW only scattering ',WARN=.true.,OP=(/"=="/)) endif call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) ! + if (variable_exist(ID,'COLLISIONS_FEW_only').or.write_is_on(ID)) then + call def_variable_elemental(ID,VAR="FEW_only_scattering",VAR_SZ=1,VAR_KIND=LP_YIO,MENU=0) + call io_variable_elemental(ID,L0=COLLISIONS_FEW_only,VAR='FEW only scattering ',WARN=.true.,OP=(/"=="/)) + call def_variable_elemental(ID,VAR="COLL_hole_bands",VAR_SZ=2,VAR_KIND=IP_YIO,MENU=0) + call io_variable_elemental(ID,I1=COLL_hole_bands, VAR='COLL bands holes ',WARN=.true.,OP=(/"==","=="/)) + call def_variable_elemental(ID,VAR="COLL_elec_bands",VAR_SZ=2,VAR_KIND=IP_YIO,MENU=0) + call io_variable_elemental(ID,I1=COLL_elec_bands, VAR='COLL bands elecs ',WARN=.true.,OP=(/"==","=="/)) + else + COLLISIONS_FEW_only=.false. + COLL_hole_bands=-1 + COLL_elec_bands=-1 + endif + ! if(COLL%kind==H_SE_HARTREE.or.COLL%kind==H_SE_FOCK.or.COLL%kind==H_SE_SEX.or.COLL%kind>=H_SE_HARTREE) then ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 3c3d9ee120..ee476ea86d 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -74,19 +74,21 @@ subroutine RT_start_and_restart(E,k,q) ! The Equilibrium Hamiltonian !========================= H_EQ=cZERO + do i_sp_pol=1,n_sp_pol do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) do ib=RT_bands(1),RT_bands(2) if (ik_RT/=RTibz%k_range(ik,1)) then iE_fg=RTibz%E_map(ik_RT) - H_EQ(ib,ib,ik_RT,1)=E_reference%FG%E(ib,iE_fg,1) + H_EQ(ib,ib,ik_RT,i_sp_pol)=E_reference%FG%E(ib,iE_fg,i_sp_pol) else - H_EQ(ib,ib,ik_RT,1)=E_reference%E(ib,ik,1) + H_EQ(ib,ib,ik_RT,i_sp_pol)=E_reference%E(ib,ik,i_sp_pol) endif enddo enddo enddo + enddo ! if(.not.l_RT_is_WFfree) then ! From 27fc118c44f981455c7bdcf4f49046153739f71a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 22 Apr 2025 17:43:49 +0200 Subject: [PATCH 0922/1367] Version 5.3.0, Revision 24360, Hash b6d7db7b8d MODIFIED * configure include/version/version.m4 Changes: - [yambo] Configure re-generated after merge Patch sent by: Davide Sangalli --- configure | 8550 ++++++++++++++++++++---------------- include/version/version.m4 | 6 +- 2 files changed, 4871 insertions(+), 3685 deletions(-) diff --git a/configure b/configure index b8af7feab6..1e4733d234 100755 --- a/configure +++ b/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Yambo 5.3.0 r.23931 h.89a5070b8. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24360 h.b6d7db7b8d. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,42 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -230,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -255,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: yambo@yambo-code.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a @@ -294,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -311,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -325,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -334,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -373,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -390,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -413,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -442,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -486,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -500,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -513,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -580,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23931 h.89a5070b8' -PACKAGE_STRING='Yambo 5.3.0 r.23931 h.89a5070b8' +PACKAGE_VERSION='5.3.0 r.24360 h.b6d7db7b8d' +PACKAGE_STRING='Yambo 5.3.0 r.24360 h.b6d7db7b8d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -589,40 +619,36 @@ ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_subst_vars='LTLIBOBJS compdir LAPACK_PETSC_INCS_R @@ -643,6 +669,8 @@ BLACS_INCS_R BLACS_LIBS_R MAGMA_INCS_R MAGMA_LIBS_R +ELPA_INCS_R +ELPA_LIBS_R SCALAPACK_INCS_R SCALAPACK_LIBS_R LAPACK_INCS_R @@ -665,6 +693,8 @@ YAML_INCS_R YAML_LIBS_R IOTK_INCS_R IOTK_LIBS_R +YDIAGO_INCS_R +YDIAGO_LIBS_R MPI_info MPI_check LIBCUDA_check @@ -673,8 +703,11 @@ MAGMA_check LIBXC_check YPY_check YDB_check +SLEPC_info +PETSC_info SLEPC_check PETSC_check +ELPA_check SLK_check BLACS_check LAPACK_check @@ -715,6 +748,7 @@ MKLGPU_LIBS LIBROCM_PATH LIBROCM_INCS LIBROCM_LIBS +PETSC_FLAGS DEVXLIB_CUDALIBS DEVXLIB_FLAGS GPU_INCS @@ -781,12 +815,18 @@ IO_LIB_VER HDF5_OPT HDF5_INCS HDF5_LIBS +internal_elpa +compile_elpa internal_blacs compile_blacs internal_slk compile_slk +def_elpa def_scalapack +enable_elpa enable_scalapack +ELPA_INCS +ELPA_LIBS SCALAPACK_LIBS BLACS_LIBS with_petsc_branch @@ -827,6 +867,10 @@ internal_blas FLIBS YDB_dir GIT +with_ydiago_branch +ydiago_check +YDIAGO_INCS +YDIAGO_LIBS MPI_LIB_DIR MPI_INC_DIR MPI_LIBS @@ -847,6 +891,7 @@ FFLAGS F77 FPP CPPFLAGS_yambo +CPP IFLAG FCLIBS OPENMPLIBS @@ -880,6 +925,9 @@ AR MAKE ifGNUmake hostname +SIZEOF_INT_P +SET_MAKE +LIBOBJS host_os host_vendor host_cpu @@ -888,15 +936,9 @@ build_os build_vendor build_cpu build -SIZEOF_INT_P -SET_MAKE -LIBOBJS ALLOCA Y_BRANCH GIT_CHECK -EGREP -GREP -CPP OBJEXT EXEEXT ac_ct_CC @@ -941,6 +983,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -986,6 +1029,7 @@ with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir +with_ydiago_branch enable_ydb with_blas_libs enable_int_linalg @@ -1015,6 +1059,8 @@ with_petsc_branch enable_par_linalg with_blacs_libs with_scalapack_libs +with_elpa_libs +with_elpa_includedir with_hdf5_libs with_hdf5_path with_hdf5_libdir @@ -1093,10 +1139,10 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP FC FCFLAGS UFLAGS +CPP FPP F77 FFLAGS @@ -1141,6 +1187,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1170,8 +1217,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1212,9 +1257,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1238,9 +1283,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1393,6 +1438,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1442,9 +1496,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1458,9 +1512,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1504,9 +1558,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1522,7 +1576,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1530,7 +1584,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1586,7 +1640,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1643,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23931 h.89a5070b8 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24360 h.b6d7db7b8d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1683,6 +1737,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1708,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23931 h.89a5070b8:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24360 h.b6d7db7b8d:";; esac cat <<\_ACEOF @@ -1779,6 +1834,7 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory + --with-ydiago-branch= Use the of the ydiago repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -1803,6 +1859,8 @@ Optional Packages: --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL --with-scalapack-libs=(libs|mkl) Use SCALAPACK libraries or setup MKL + --with-elpa-libs=(libs) Use ELPA libraries + --with-elpa-includedir= Path to the elpa include directory --with-hdf5-libs= Use HDF5 libraries --with-hdf5-path= Path to the HDF5 install directory --with-hdf5-libdir= Path to the HDF5 lib directory @@ -1845,7 +1903,8 @@ Optional Packages: --with-cuda-path= Path to libcuda install directory --with-cuda-cc=VAL GPU architecture (Kepler: 35, Pascal: 60, Volta: 70, Ampere: 80) [default=70] - --with-cuda-runtime=VAL CUDA runtime (Pascal: 8+, Volta: 9+) [default=10.1] + --with-cuda-runtime=VAL CUDA runtime (Pascal: 8+, Volta: 9+) [default=none, + checks if the NVHPC_CUDA_HOME variable is set.] --with-cuda-int-libs=VAL CUDA internal libraries () [default=cuda,cufft,cublas,cusolver,cudart] @@ -1880,10 +1939,10 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags UFLAGS Unoptimized Fortran flags + CPP C preprocessor FPP Fortran preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags @@ -1910,9 +1969,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1940,7 +1999,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1948,7 +2008,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1957,10 +2017,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.23931 h.89a5070b8 -generated by GNU Autoconf 2.69 +Yambo configure 5.3.0 r.24360 h.b6d7db7b8d +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1977,14 +2037,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1992,14 +2052,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2009,176 +2070,6 @@ fi } # ac_fn_c_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------- ## -## Report this to yambo@yambo-code.org ## -## ----------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -2186,26 +2077,28 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2217,16 +2110,17 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (ac_aggr.$3) @@ -2235,14 +2129,15 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2251,18 +2146,19 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2274,17 +2170,18 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof ($2)) return 0; @@ -2292,12 +2189,13 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main () +main (void) { if (sizeof (($2))) return 0; @@ -2305,18 +2203,19 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2327,14 +2226,14 @@ $as_echo "$ac_res" >&6; } ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2342,17 +2241,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2367,72 +2267,48 @@ fi } # ac_fn_c_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -#undef $2 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func +} # ac_fn_c_try_run # ac_fn_fc_try_compile LINENO # --------------------------- @@ -2440,14 +2316,14 @@ $as_echo "$ac_res" >&6; } ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2455,14 +2331,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2478,14 +2355,14 @@ fi ac_fn_fc_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2493,17 +2370,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2518,20 +2396,58 @@ fi } # ac_fn_fc_try_link +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2539,14 +2455,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2562,14 +2479,14 @@ fi ac_fn_f77_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2577,17 +2494,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2602,44 +2520,136 @@ fi } # ac_fn_f77_try_link +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ + +#include +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + # ac_fn_fc_check_func LINENO FUNC VAR # ----------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_fc_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main call $2 end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_fc_check_func +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23931 h.89a5070b8, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by Yambo $as_me 5.3.0 r.24360 h.b6d7db7b8d, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2672,8 +2682,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2708,7 +2722,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2743,11 +2757,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2758,8 +2774,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2783,7 +2799,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2791,14 +2807,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2806,15 +2822,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2822,8 +2838,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2837,63 +2853,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2903,154 +2904,542 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -SVERSION="5" -SSUBVERSION="3" -SPATCHLEVEL="0" -SREVISION="23931" -SHASH="89a5070b8" +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; -# -CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` -if ! test -d $CURRENT_DIR ; then - as_fn_error $? "Make cannot work using paths which include spaces" "$LINENO" 5 -fi -# -compdir=`echo "$PWD"` -# +struct incomplete_array +{ + int datasize; + double data[]; +}; -if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi -if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi -# -ac_aux_dir= -for ac_dir in config "$srcdir"/config; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -fi +struct named_init { + int number; + const wchar_t *name; + double average; +}; -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +typedef const char *ccp; +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); -# -# YAMBO SPECIFIC -# -# -# License-Identifier: GPL -# -# Copyright (C) 2021 The Yambo Team -# -# Authors (see AUTHORS file for details): DS AM -# -# Folders -# -if ! test -d log ; then mkdir log ; fi -if ! test -d bin ; then mkdir bin ; fi + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}/config" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +SVERSION="5" +SSUBVERSION="3" +SPATCHLEVEL="0" +SREVISION="24360" +SHASH="b6d7db7b8d" + + + + + + +# +CURRENT_DIR=`echo "$PWD" | sed -e "s/ /X/g"` +if ! test -d $CURRENT_DIR ; then + as_fn_error $? "Make cannot work using paths which include spaces" "$LINENO" 5 +fi +# +compdir=`echo "$PWD"` +# + +if test "$prefix" = "NONE" ; then prefix="$PWD" ; fi +if test "$exec_prefix" = "NONE" ; then exec_prefix="$prefix" ; fi +# + + +# +# YAMBO SPECIFIC +# +# +# License-Identifier: GPL +# +# Copyright (C) 2021 The Yambo Team +# +# Authors (see AUTHORS file for details): DS AM +# +# Folders +# +if ! test -d log ; then mkdir log ; fi +if ! test -d bin ; then mkdir bin ; fi if ! test -d include ; then mkdir include ; fi if ! test -d include/headers ; then mkdir include/headers ; fi if ! test -d lib ; then mkdir lib ; fi @@ -3097,9 +3486,10 @@ fi # PATH FOR EXT LIBS # Check whether --with-extlibs_path was given. -if test "${with_extlibs_path+set}" = set; then : +if test ${with_extlibs_path+y} +then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else +else $as_nop extlibs_path="${PWD}/lib/external" fi @@ -3110,7 +3500,8 @@ if test x"$extlibs_path" = "x"; then extlibs_path="${PWD}/lib/external"; fi # ============================================================================ # DEBUG # Check whether --enable-keep-objects was given. -if test "${enable_keep_objects+set}" = set; then : +if test ${enable_keep_objects+y} +then : enableval=$enable_keep_objects; fi @@ -3121,7 +3512,8 @@ if test x"$enable_keep_objects" = "x"; then enable_keep_objects="yes"; fi # ============================================================================= # KEEP SOURCE FILES # Check whether --enable-keep-src was given. -if test "${enable_keep_src+set}" = set; then : +if test ${enable_keep_src+y} +then : enableval=$enable_keep_src; fi @@ -3132,7 +3524,8 @@ if test x"$enable_keep_src" = "xyes"; then enable_keep_src="yes"; fi # ============================================================================ # KEEP EXT LIBS # Check whether --enable-keep-extlibs was given. -if test "${enable_keep_extlibs+set}" = set; then : +if test ${enable_keep_extlibs+y} +then : enableval=$enable_keep_extlibs; fi @@ -3150,7 +3543,8 @@ fi # ============================================================================ # DP # Check whether --enable-dp was given. -if test "${enable_dp+set}" = set; then : +if test ${enable_dp+y} +then : enableval=$enable_dp; fi @@ -3169,7 +3563,8 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio # Time Profiling (mod_timing) # # Check whether --enable-time-profile was given. -if test "${enable_time_profile+set}" = set; then : +if test ${enable_time_profile+y} +then : enableval=$enable_time_profile; fi @@ -3185,7 +3580,8 @@ fi # USPP # # Check whether --enable-uspp was given. -if test "${enable_uspp+set}" = set; then : +if test ${enable_uspp+y} +then : enableval=$enable_uspp; fi @@ -3202,7 +3598,8 @@ fi # Memory Profiling # # Check whether --enable-memory-profile was given. -if test "${enable_memory_profile+set}" = set; then : +if test ${enable_memory_profile+y} +then : enableval=$enable_memory_profile; fi @@ -3218,7 +3615,8 @@ fi # Verbose compilation # # Check whether --enable-msgs-comps was given. -if test "${enable_msgs_comps+set}" = set; then : +if test ${enable_msgs_comps+y} +then : enableval=$enable_msgs_comps; fi @@ -3235,9 +3633,10 @@ fi # # Check whether --with-editor was given. -if test "${with_editor+set}" = set; then : +if test ${with_editor+y} +then : withval=$with_editor; -else +else $as_nop with_editor="vim vi pico" fi @@ -3245,11 +3644,12 @@ for ac_prog in $with_editor do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_editor+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_editor+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else @@ -3257,11 +3657,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_editor="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3272,11 +3676,11 @@ fi fi editor=$ac_cv_prog_editor if test -n "$editor"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 -$as_echo "$editor" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $editor" >&5 +printf "%s\n" "$editor" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3291,9 +3695,10 @@ test -n "$editor" || editor="none" # # Check whether --with-echo was given. -if test "${with_echo+set}" = set; then : +if test ${with_echo+y} +then : withval=$with_echo; -else +else $as_nop with_echo="echo" fi @@ -3306,6 +3711,15 @@ ECHO=$with_echo # # check if the structure mallinfo is present in malloc.h SAVE=$CFLAGS + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3314,11 +3728,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3326,11 +3741,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3341,11 +3760,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3354,11 +3773,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3366,11 +3786,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3381,11 +3805,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3393,8 +3817,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3407,11 +3831,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3419,11 +3844,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3434,11 +3863,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3447,11 +3876,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3460,15 +3890,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3484,18 +3918,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3506,11 +3940,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3518,11 +3953,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3533,11 +3972,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3550,11 +3989,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3562,11 +4002,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3577,11 +4021,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3593,34 +4037,138 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3630,7 +4178,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3638,7 +4186,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3650,9 +4198,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3673,11 +4221,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3694,7 +4243,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3710,44 +4259,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3761,15 +4312,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3778,7 +4329,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3790,8 +4341,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3799,10 +4350,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3810,39 +4361,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3856,663 +4408,364 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - - fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include int -main () +main (void) { +#ifndef __GNUC__ + choke me +#endif ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO" +then : + ac_compiler_gnu=yes +else $as_nop + ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -else - ac_cv_header_stdc=no fi -rm -f conftest* +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +ac_test_CFLAGS=${CFLAGS+y} +ac_save_CFLAGS=$CFLAGS +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +int +main (void) +{ + + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +else $as_nop + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -else - ac_cv_header_stdc=no -fi -rm -f conftest* +int +main (void) +{ -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else $as_nop + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int -main () +main (void) { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; + + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi else - ac_cv_header_stdc=no + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi done -ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_h" = xyes; then : + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : have_malloc_h=1 -else +else $as_nop have_malloc_h=0 fi - CFLAGS=$SAVE if test "$have_malloc_h" -ne 0 then ac_fn_c_check_member "$LINENO" "struct mallinfo" "arena" "ac_cv_member_struct_mallinfo_arena" "#include " -if test "x$ac_cv_member_struct_mallinfo_arena" = xyes; then : - $as_echo "#define HAVE_MALLINFO 1" >>confdefs.h +if test "x$ac_cv_member_struct_mallinfo_arena" = xyes +then : + printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h fi fi +# +# License-Identifier: GPL +# +# Copyright (C) 2016 The Yambo Team +# +# Authors (see AUTHORS file for details): AM +# + + # # General # @@ -4811,6 +5064,8 @@ fi # + + # # License-Identifier: GPL # @@ -4838,11 +5093,12 @@ EOF Y_BRANCH="unknown" # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT_CHECK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT_CHECK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else @@ -4850,11 +5106,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT_CHECK="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4865,11 +5125,11 @@ fi fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 -$as_echo "$GIT_CHECK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT_CHECK" >&5 +printf "%s\n" "$GIT_CHECK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4883,42 +5143,60 @@ fi # # Checks for library functions. # ============================================================================ -for ac_header in malloc.h stdlib.h unistd.h string.h sys/time.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" +if test "x$ac_cv_header_malloc_h" = xyes +then : + printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h -done +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" +if test "x$ac_cv_header_string_h" = xyes +then : + printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + +fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +printf %s "checking for working alloca.h... " >&6; } +if test ${ac_cv_working_alloca_h+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -4926,52 +5204,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_working_alloca_h=yes -else +else $as_nop ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +printf "%s\n" "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +printf %s "checking for alloca... " >&6; } +if test ${ac_cv_func_alloca_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test $ac_cv_working_alloca_h = yes; then + ac_cv_func_alloca_works=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER +#include +#include +#ifndef alloca +# ifdef __GNUC__ +# define alloca __builtin_alloca +# elif defined _MSC_VER # include # define alloca _alloca # else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif +# ifdef __cplusplus +extern "C" # endif +void *alloca (size_t); # endif #endif int -main () +main (void) { char *p = (char *) alloca (1); if (p) return 0; @@ -4979,20 +5257,22 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_func_alloca_works=yes -else +else $as_nop ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +printf "%s\n" "$ac_cv_func_alloca_works" >&6; } +fi if test $ac_cv_func_alloca_works = yes; then -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -5002,58 +5282,19 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi +printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h - done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +printf %s "checking stack direction for C alloca... " >&6; } +if test ${ac_cv_c_stack_direction+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_c_stack_direction=0 -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -5074,9 +5315,10 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_c_stack_direction=1 -else +else $as_nop ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5084,25 +5326,24 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +printf "%s\n" "$ac_cv_c_stack_direction" >&6; } +printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +printf %s "checking for an ANSI C-conforming const... " >&6; } +if test ${ac_cv_c_const+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __cplusplus @@ -5115,7 +5356,7 @@ main () /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. + /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -5143,7 +5384,7 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying + { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -5159,47 +5400,50 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_const=yes -else +else $as_nop ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -$as_echo "#define const /**/" >>confdefs.h +printf "%s\n" "#define const /**/" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +printf %s "checking for inline... " >&6; } +if test ${ac_cv_c_inline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } +static $ac_kw foo_t static_foo (void) {return 0; } +$ac_kw foo_t foo (void) {return 0; } #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_inline=$ac_kw fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +printf "%s\n" "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; @@ -5216,45 +5460,118 @@ _ACEOF ;; esac -for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if ${ac_cv_func_malloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_malloc_0_nonnull=no -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +printf %s "checking for GNU libc compatible malloc... " >&6; } +if test ${ac_cv_func_malloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif +#include int -main () +main (void) { -return ! malloc (0); +void *p = malloc (0); + int result = !p; + free (p); + return result; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_malloc_0_nonnull=yes -else +else $as_nop ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5262,14 +5579,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes +then : -$as_echo "#define HAVE_MALLOC 1" >>confdefs.h +printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h -else - $as_echo "#define HAVE_MALLOC 0" >>confdefs.h +else $as_nop + printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5278,50 +5596,47 @@ else esac -$as_echo "#define malloc rpl_malloc" >>confdefs.h - -fi - - -for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF +printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 -$as_echo_n "checking for GNU libc compatible realloc... " >&6; } -if ${ac_cv_func_realloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_realloc_0_nonnull=no -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 +printf %s "checking for GNU libc compatible realloc... " >&6; } +if test ${ac_cv_func_realloc_0_nonnull+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif +#include int -main () +main (void) { -return ! realloc (0, 0); +void *p = realloc (0, 0); + int result = !p; + free (p); + return result; ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_realloc_0_nonnull=yes -else +else $as_nop ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5329,14 +5644,15 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 +printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } +if test $ac_cv_func_realloc_0_nonnull = yes +then : -$as_echo "#define HAVE_REALLOC 1" >>confdefs.h +printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h -else - $as_echo "#define HAVE_REALLOC 0" >>confdefs.h +else $as_nop + printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5345,27 +5661,34 @@ else esac -$as_echo "#define realloc rpl_realloc" >>confdefs.h +printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 +printf %s "checking whether lstat correctly handles trailing slash... " >&6; } +if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - ac_cv_func_lstat_dereferences_slashed_symlink=no -else + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. @@ -5376,9 +5699,10 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else +else $as_nop ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5393,14 +5717,12 @@ fi rm -f conftest.sym conftest.file fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF +printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then @@ -5412,19 +5734,21 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -$as_echo_n "checking whether stat accepts an empty string... " >&6; } -if ${ac_cv_func_stat_empty_string_bug+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 +printf %s "checking whether stat accepts an empty string... " >&6; } +if test ${ac_cv_func_stat_empty_string_bug+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_func_stat_empty_string_bug=yes -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { struct stat sbuf; return stat ("", &sbuf) == 0; @@ -5432,9 +5756,10 @@ struct stat sbuf; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_stat_empty_string_bug=no -else +else $as_nop ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5442,8 +5767,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 +printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; @@ -5452,19 +5777,18 @@ if test $ac_cv_func_stat_empty_string_bug = yes; then esac -cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 -_ACEOF +printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -5480,20 +5804,20 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # ============================================================================ # check size of pointers to int - needed to decide the size of integer # arrays in fortran holding C pointers for FFTW -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 -$as_echo_n "checking for the size of a pointer... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5 +printf %s "checking for the size of a pointer... " >&6; } if test -z "$POINTER_SIZE"; then cat >pointertest.c <&5 (eval $ac_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then ac_try="" else @@ -5519,12 +5843,10 @@ EOF ac_pointersize=`./pointertest.x`; rm -rf pointertest* -cat >>confdefs.h <<_ACEOF -#define POINTER_SIZE ${ac_pointersize} -_ACEOF +printf "%s\n" "#define POINTER_SIZE ${ac_pointersize}" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 -$as_echo "${ac_pointersize} bytes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5 +printf "%s\n" "${ac_pointersize} bytes" >&6; } fi SIZEOF_INT_P=$ac_pointersize @@ -5540,11 +5862,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5552,11 +5875,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5567,11 +5894,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5580,11 +5907,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5592,11 +5920,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5607,11 +5939,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -5619,8 +5951,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5633,11 +5965,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5645,11 +5978,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5660,11 +5997,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5673,11 +6010,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5686,15 +6024,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5710,18 +6052,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5732,11 +6074,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -5744,11 +6087,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5759,11 +6106,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5776,11 +6123,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5788,11 +6136,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5803,11 +6155,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5819,34 +6171,138 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -5856,20 +6312,21 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -5879,29 +6336,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -5910,57 +6371,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -5975,184 +6439,165 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +$ac_c_conftest_c11_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -# -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi + +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +# hostname=`uname -n` # ============================================================================ # GNU Make MAKE="make" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 -$as_echo_n "checking for GNU make... " >&6; } -if ${_cv_gnu_make_command+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5 +printf %s "checking for GNU make... " >&6; } +if test ${_cv_gnu_make_command+y} +then : + printf %s "(cached) " >&6 +else $as_nop _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; @@ -6163,14 +6608,14 @@ else done ; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 -$as_echo "$_cv_gnu_make_command" >&6; } ; +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 +printf "%s\n" "$_cv_gnu_make_command" >&6; } ; if test "x$_cv_gnu_make_command" != "x" ; then ifGNUmake='' ; else ifGNUmake='#' ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 -$as_echo "\"Not found\"" >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"Not found\"" >&5 +printf "%s\n" "\"Not found\"" >&6; }; fi @@ -6192,11 +6637,12 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6204,11 +6650,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6219,11 +6669,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6232,11 +6682,12 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6244,11 +6695,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6259,11 +6714,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -6271,8 +6726,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6290,7 +6745,8 @@ test -z "$AR_FLAGS" && AR_FLAGS="-r" # C options specific for driver.c # # Check whether --enable-options_check was given. -if test "${enable_options_check+set}" = set; then : +if test ${enable_options_check+y} +then : enableval=$enable_options_check; fi @@ -6314,11 +6770,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_FC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else @@ -6326,11 +6783,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6341,11 +6802,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 -$as_echo "$FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5 +printf "%s\n" "$FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6358,11 +6819,12 @@ if test -z "$FC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_FC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_FC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else @@ -6370,11 +6832,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6385,11 +6851,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 -$as_echo "$ac_ct_FC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5 +printf "%s\n" "$ac_ct_FC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6401,8 +6867,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -6411,7 +6877,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -6421,7 +6887,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -6431,7 +6897,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -6440,11 +6906,12 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } -if ${ac_cv_fc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5 +printf %s "checking whether the compiler supports GNU Fortran... " >&6; } +if test ${ac_cv_fc_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -6453,43 +6920,48 @@ else end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 -$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FCFLAGS=${FCFLAGS+set} +ac_test_FCFLAGS=${FCFLAGS+y} ac_save_FCFLAGS=$FCFLAGS FCFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 -$as_echo_n "checking whether $FC accepts -g... " >&6; } -if ${ac_cv_prog_fc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5 +printf %s "checking whether $FC accepts -g... " >&6; } +if test ${ac_cv_prog_fc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_g=yes -else +else $as_nop ac_cv_prog_fc_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 -$as_echo "$ac_cv_prog_fc_g" >&6; } -if test "$ac_test_FCFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 +printf "%s\n" "$ac_cv_prog_fc_g" >&6; } +if test $ac_test_FCFLAGS; then FCFLAGS=$ac_save_FCFLAGS elif test $ac_cv_prog_fc_g = yes; then if test "x$ac_cv_fc_compiler_gnu" = xyes; then @@ -6523,8 +6995,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 -$as_echo_n "checking if the current OS is supported... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the current OS is supported" >&5 +printf %s "checking if the current OS is supported... " >&6; } #TIMER="ct_cclock.o" TIMER="ct_cptimer.o" case "${host}" in @@ -6568,31 +7040,31 @@ case "${host}" in if test -z "$F90SUFFIX"; then F90SUFFIX=".f90"; fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 -$as_echo "$as_me: Platform <${host}> is not supported." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 -$as_echo "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 -$as_echo "$as_me: providing either a list of compilers and options or" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 -$as_echo "$as_me: a guest account on this machine." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform <${host}> is not supported." >&5 +printf "%s\n" "$as_me: Platform <${host}> is not supported." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&5 +printf "%s\n" "$as_me: Please contact the $PACKAGE_NAME team at $PACKAGE_BUGREPORT" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: providing either a list of compilers and options or" >&5 +printf "%s\n" "$as_me: providing either a list of compilers and options or" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: a guest account on this machine." >&5 +printf "%s\n" "$as_me: a guest account on this machine." >&6;} as_fn_error $? "stopping" "$LINENO" 5 ;; *) esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 -$as_echo "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 -$as_echo "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 -$as_echo "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} -{ $as_echo "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 -$as_echo "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using build_os=\"$build_os\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using build_os=\"$build_os\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using F90SUFFIX=\"$F90SUFFIX\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR=\"$AR\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using AR=\"$AR\"" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&5 +printf "%s\n" "$as_me: WIDESETUP: using AR_FLAGS=\"$AR_FLAGS\"" >&6;} @@ -6608,7 +7080,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu # # Check whether --with-f90ext was given. -if test "${with_f90ext+set}" = set; then : +if test ${with_f90ext+y} +then : withval=$with_f90ext; fi @@ -6620,11 +7093,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +printf %s "checking for Fortran flag to compile .f90 files... " >&6; } +if test ${ac_cv_fc_srcext_f90+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6640,17 +7114,18 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -6676,11 +7151,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 -$as_echo_n "checking for Fortran flag to compile .f files... " >&6; } -if ${ac_cv_fc_srcext_f+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f files" >&5 +printf %s "checking for Fortran flag to compile .f files... " >&6; } +if test ${ac_cv_fc_srcext_f+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -6696,17 +7172,18 @@ for ac_flag in none -qsuffix=f=f -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 -$as_echo "$ac_cv_fc_srcext_f" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } if test "x$ac_cv_fc_srcext_f" = xunknown; then as_fn_error $? "Fortran could not compile .f files" "$LINENO" 5 else @@ -6805,10 +7282,10 @@ esac # FCVERSION=`echo "$FCVERSION" | sed "/^\s*$/d" | head -n 1` # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 -$as_echo_n "checking for $FC kind and version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 -$as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $FC kind and version" >&5 +printf %s "checking for $FC kind and version... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCKIND $FCVERSION $INTELVERSION" >&5 +printf "%s\n" "$FCKIND $FCVERSION $INTELVERSION" >&6; } @@ -6825,7 +7302,8 @@ $as_echo "$FCKIND $FCVERSION $INTELVERSION" >&6; } if test -z "${CFLAGS}"; then CFLAGS="-O2"; fi # # Check whether --enable-debug-flags was given. -if test "${enable_debug_flags+set}" = set; then : +if test ${enable_debug_flags+y} +then : enableval=$enable_debug_flags; fi @@ -6856,7 +7334,7 @@ i?86*linux*) DEBUG_FLAGS="-g -Minform=inform -Mbounds -Mchkptr -Mchkstk -Meh_frame -Mbackslash" ;; *nvfortran* ) - SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp -c++libs" FUFLAGS="-O0 -Mbackslash" FCMFLAG="-Mnomain" OMPFLAGS="-mp" @@ -7109,7 +7587,7 @@ aarch*linux* | arm*linux* ) DEBUG_FLAGS="-g " ;; *pgf9* | *ftn* | *pgfortran* | *nvfortran* ) - SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp" + SYSFLAGS="-O1 -gopt -Mnoframe -Mdalign -Mbackslash -cpp -c++libs" #SYSFLAGS="-O2 -g -Munroll -Mnoframe -Mdalign -Mbackslash -cpp" FUFLAGS="-O0 -g -Mbackslash -cpp" FCMFLAG="-Mnomain" @@ -7264,35 +7742,35 @@ esac # if test "x$build_os" = "xaix" ; then NETCDFFLAGS="$NETCDFFLAGS -DIBMR2Fortran" ; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 -$as_echo_n "checking for specific $FC flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $FC flags" >&5 +printf %s "checking for specific $FC flags... " >&6; } if test -z "${FCFLAGS}"; then FCFLAGS="$SYSFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 -$as_echo "$FCFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCFLAGS" >&5 +printf "%s\n" "$FCFLAGS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 -$as_echo "(User-defined) $FCFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $FCFLAGS" >&5 +printf "%s\n" "(User-defined) $FCFLAGS" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 -$as_echo_n "checking for specific Open-MP flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 -$as_echo "$OMPFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific Open-MP flags" >&5 +printf %s "checking for specific Open-MP flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OMPFLAGS" >&5 +printf "%s\n" "$OMPFLAGS" >&6; } # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 -$as_echo_n "checking for specific $CC flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 -$as_echo "$CFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific $CC flags" >&5 +printf %s "checking for specific $CC flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGS" >&5 +printf "%s\n" "$CFLAGS" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 -$as_echo_n "checking for specific unoptimized flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific unoptimized flags" >&5 +printf %s "checking for specific unoptimized flags... " >&6; } if test -z "${UFLAGS}"; then FCUFLAGS="$FUFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 -$as_echo "$FCUFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FCUFLAGS" >&5 +printf "%s\n" "$FCUFLAGS" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 -$as_echo "(User-defined) $UFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (User-defined) $UFLAGS" >&5 +printf "%s\n" "(User-defined) $UFLAGS" >&6; } FCUFLAGS="$UFLAGS" FUFLAGS="$UFLAGS" fi @@ -7303,10 +7781,10 @@ if test x"$enable_debug_flags" = "xyes"; then HDF5_MODE="debug"; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 -$as_echo_n "checking for specific NETCDF flags... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 -$as_echo "$NETCDFFLAGS" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for specific NETCDF flags" >&5 +printf %s "checking for specific NETCDF flags... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NETCDFFLAGS" >&5 +printf "%s\n" "$NETCDFFLAGS" >&6; } # @@ -7331,23 +7809,26 @@ FCFLAGS="$acx_save_fcflags $F90EXTFLAGS" GPU_SUPPORT="no_gpu" # # Check whether --enable-cuda_fortran was given. -if test "${enable_cuda_fortran+set}" = set; then : +if test ${enable_cuda_fortran+y} +then : enableval=$enable_cuda_fortran; -else +else $as_nop enable_cuda_fortran="no" fi # Check whether --enable-openacc was given. -if test "${enable_openacc+set}" = set; then : +if test ${enable_openacc+y} +then : enableval=$enable_openacc; -else +else $as_nop enable_openacc="no" fi # Check whether --enable-openmp5 was given. -if test "${enable_openmp5+set}" = set; then : +if test ${enable_openmp5+y} +then : enableval=$enable_openmp5; -else +else $as_nop enable_openmp5="no" fi @@ -7366,7 +7847,8 @@ if test x"$enable_openmp5" != "xno" ; then GPU_SUPPORT="openmp5" ; fi # OpenMP # # Check whether --enable-open-mp was given. -if test "${enable_open_mp+set}" = set; then : +if test ${enable_open_mp+y} +then : enableval=$enable_open_mp; fi @@ -7388,17 +7870,19 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 -$as_echo_n "checking how to get verbose linking output from $FC... " >&6; } -if ${ac_cv_prog_fc_v+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5 +printf %s "checking how to get verbose linking output from $FC... " >&6; } +if test ${ac_cv_prog_fc_v+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_prog_fc_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -7416,13 +7900,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_verb" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 +printf "%s\n" "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7489,23 +7973,24 @@ esac done done if test -z "$ac_cv_prog_fc_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 -$as_echo "$ac_cv_prog_fc_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 -$as_echo_n "checking for Fortran libraries of $FC... " >&6; } -if ${ac_cv_fc_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 +printf "%s\n" "$ac_cv_prog_fc_v" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5 +printf %s "checking for Fortran libraries of $FC... " >&6; } +if test ${ac_cv_fc_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -7524,13 +8009,13 @@ ac_save_FCFLAGS=$FCFLAGS FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_fc_v_output" >&5 +printf "%s\n" "$ac_fc_v_output" >&5 FCFLAGS=$ac_save_FCFLAGS rm -rf conftest* @@ -7607,9 +8092,10 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; @@ -7622,9 +8108,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" @@ -7639,9 +8126,24 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) + # Ignore this library only on Windows-like systems. case $host_os in - *cygwin*) ;; - *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" + cygwin* | msys* ) ;; + *) + ac_exists=false + for ac_i in $ac_cv_fc_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue +then : + +else $as_nop + ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +fi ;; esac ;; @@ -7659,7 +8161,7 @@ fi esac ;; -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_fc_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -7668,9 +8170,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_arg="$ac_arg $ac_j" ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" fi @@ -7685,15 +8188,17 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; + -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -7705,7 +8210,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_fc_v_output" | + ac_ld_run_path=`printf "%s\n" "$ac_fc_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -7720,8 +8225,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 -$as_echo "$ac_cv_fc_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 +printf "%s\n" "$ac_cv_fc_libs" >&6; } FCLIBS="$ac_cv_fc_libs" @@ -7736,11 +8241,12 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; } -if ${ac_cv_fc_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5 +printf %s "checking for dummy main to link with Fortran libraries... " >&6; } +if test ${ac_cv_fc_dummy_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN @@ -7763,19 +8269,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=none -else +else $as_nop ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -7792,17 +8299,18 @@ rm -f core conftest.err conftest.$ac_objext \ #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi @@ -7815,25 +8323,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_fc_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 -$as_echo "$ac_cv_fc_dummy_main" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 +printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } FC_DUMMY_MAIN=$ac_cv_fc_dummy_main -if test "$FC_DUMMY_MAIN" != unknown; then : +if test "$FC_DUMMY_MAIN" != unknown +then : if test $FC_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define FC_DUMMY_MAIN $FC_DUMMY_MAIN -_ACEOF +printf "%s\n" "#define FC_DUMMY_MAIN $FC_DUMMY_MAIN" >>confdefs.h if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -7848,11 +8355,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 -$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } -if ${ac_cv_fc_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5 +printf %s "checking for Fortran name-mangling scheme... " >&6; } +if test ${ac_cv_fc_mangling+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -7861,7 +8369,8 @@ else return end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -7882,9 +8391,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -7895,17 +8401,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done done @@ -7940,9 +8447,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 @@ -7953,17 +8457,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_ext=${ac_fc_srcext-f} @@ -7993,17 +8498,17 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 -$as_echo "$ac_cv_fc_mangling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 +printf "%s\n" "$ac_cv_fc_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8026,7 +8531,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #define F90_FUNC_(name,NAME) name ## _ void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8041,10 +8547,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : c_success="yes"; msg="test_"; save="$CFLAGS"; CFLAGS="$save -D_C_US" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" ac_ext=c @@ -8055,7 +8562,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$c_success" = "no" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8063,7 +8570,8 @@ if test "$c_success" = "no" ; then #define F90_FUNC_(name,NAME) name void F90_FUNC_(ftest, FTEST)(){} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : mv conftest.$ac_objext ftest.$ac_objext ac_ext=${ac_fc_srcext-f} @@ -8078,10 +8586,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu call ftest end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : c_success="yes"; msg="test" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save" ac_ext=c @@ -8092,12 +8601,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu rm -f ftest.$ac_objext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 -$as_echo_n "checking for external C routine (test) naming scheme... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 -$as_echo "$msg" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external C routine (test) naming scheme" >&5 +printf %s "checking for external C routine (test) naming scheme... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $msg" >&5 +printf "%s\n" "$msg" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -8105,48 +8614,48 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu case $ac_cv_fc_mangling in "lower case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h + printf "%s\n" "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -8205,11 +8714,12 @@ ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 -$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } -if ${ac_cv_fc_freeform+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +printf %s "checking for Fortran flag needed to accept free-form source... " >&6; } +if test ${ac_cv_fc_freeform+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ @@ -8224,17 +8734,18 @@ do 'world.' end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_freeform=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 -$as_echo "$ac_cv_fc_freeform" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 +printf "%s\n" "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else @@ -8259,11 +8770,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #============================================================================= # FLAGS TO INCLUDE MODULE -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 -$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } -if ${ax_cv_f90_modflag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5 +printf %s "checking fortran 90 modules inclusion flag... " >&6; } +if test ${ax_cv_f90_modflag+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -8286,10 +8798,11 @@ cat > conftest.$ac_ext <<_ACEOF end module conftest_module _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cd .. ax_cv_f90_modflag="not found" for ax_flag in "-I" "-M" "-p"; do @@ -8305,10 +8818,11 @@ for ax_flag in "-I" "-M" "-p"; do end program conftest_program _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ax_cv_f90_modflag="$ax_flag" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext FCFLAGS="$ax_save_FCFLAGS" fi done @@ -8324,14 +8838,147 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 -$as_echo "$ax_cv_f90_modflag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 +printf "%s\n" "$ax_cv_f90_modflag" >&6; } IFLAG="$ax_cv_f90_modflag" if test -z "$IFLAG" ; then IFLAG="-I" ; fi # # ============================================================================ # CPP check & flags +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # case "${CPP}" in @@ -8383,8 +9030,8 @@ case "${CPP}" in esac # # -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 -$as_echo "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing C-preprocessor $CPP $CPPFLAGS" >&5 +printf "%s\n" "$as_me: testing C-preprocessor $CPP $CPPFLAGS" >&6;} # # TESTS #======= @@ -8401,8 +9048,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # acx_C_ok=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 -$as_echo_n "checking if C precompiler works on C source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C precompiler works on C source" >&5 +printf %s "checking if C precompiler works on C source... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8414,14 +9061,15 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : acx_C_ok=yes -else +else $as_nop CPP_TESTS_PASSED=no fi rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 -$as_echo "$acx_C_ok" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 +printf "%s\n" "$acx_C_ok" >&6; } # if test "x$CPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found C precompiler problems in processing C source." "$LINENO" 5; @@ -8472,8 +9120,8 @@ esac # if test -z "$FPP" ; then FPP="cpp -E -P -ansi"; fi # -{ $as_echo "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 -$as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: testing FC-preprocessor $FPP" >&5 +printf "%s\n" "$as_me: testing FC-preprocessor $FPP" >&6;} # # TESTS #======= @@ -8482,8 +9130,8 @@ $as_echo "$as_me: testing FC-preprocessor $FPP" >&6;} # acx_FC_ok=yes FPP_TESTS_PASSED=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 -$as_echo_n "checking if FC precompiler works on FC source... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if FC precompiler works on FC source" >&5 +printf %s "checking if FC precompiler works on FC source... " >&6; } cat > conftest.F << EOF_ program conftest character (1) :: a @@ -8510,8 +9158,8 @@ else acx_FC_ok=no ; FPP_TESTS_PASSED=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 -$as_echo "$acx_FC_ok" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_FC_ok" >&5 +printf "%s\n" "$acx_FC_ok" >&6; } # if test "x$FPP_TESTS_PASSED" = xno ; then as_fn_error $? "Found FC precompiler problems in processing FC source." "$LINENO" 5; @@ -8540,11 +9188,12 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_F77+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else @@ -8552,11 +9201,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8567,11 +9220,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 +printf "%s\n" "$F77" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8584,11 +9237,12 @@ if test -z "$F77"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_F77+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_F77+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else @@ -8596,11 +9250,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8611,11 +9269,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 +printf "%s\n" "$ac_ct_F77" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8627,8 +9285,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -8637,7 +9295,7 @@ fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -8647,7 +9305,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -8657,7 +9315,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done rm -f a.out @@ -8666,11 +9324,12 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if ${ac_cv_f77_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5 +printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } +if test ${ac_cv_f77_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ @@ -8679,43 +9338,48 @@ else end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} +ac_test_FFLAGS=${FFLAGS+y} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if ${ac_cv_prog_f77_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 +printf %s "checking whether $F77 accepts -g... " >&6; } +if test ${ac_cv_prog_f77_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_cv_prog_f77_g=yes -else +else $as_nop ac_cv_prog_f77_g=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 +printf "%s\n" "$ac_cv_prog_f77_g" >&6; } +if test $ac_test_FFLAGS; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then @@ -8741,23 +9405,24 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 -$as_echo_n "checking if Fortran 77 compiler $F77 works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Fortran 77 compiler $F77 works" >&5 +printf %s "checking if Fortran 77 compiler $F77 works... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main integer ierr end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - acx_f77_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - acx_f77_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; }; +if ac_fn_f77_try_compile "$LINENO" +then : + acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; }; as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8793,7 +9458,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu mpibuild="yes" # Check whether --enable-mpi was given. -if test "${enable_mpi+set}" = set; then : +if test ${enable_mpi+y} +then : enableval=$enable_mpi; fi @@ -8823,11 +9489,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIFC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIFC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -8835,11 +9502,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8850,11 +9521,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -$as_echo "$MPIFC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +printf "%s\n" "$MPIFC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8863,12 +9534,13 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -$as_echo_n "checking for $MPIFC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +printf %s "checking for $MPIFC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -8878,20 +9550,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIFC_test=$MPIFC -else +else $as_nop for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpiifx mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIFC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIFC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else @@ -8899,11 +9573,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIFC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8914,11 +9592,11 @@ fi fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 -$as_echo "$MPIFC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC_test" >&5 +printf "%s\n" "$MPIFC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8934,22 +9612,23 @@ fi if test "$acx_mpi_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +printf %s "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_init end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_mpi_ok="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -8969,10 +9648,11 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 -$as_echo_n "checking for a working mpif.h... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpif.h" >&5 +printf %s "checking for a working mpif.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -8983,21 +9663,23 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPIF_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -$as_echo_n "checking for a working mpi.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +printf %s "checking for a working mpi.h... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9008,20 +9690,22 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPI_H=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPI_H=0; acx_mpi_ok="no" ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 -$as_echo_n "checking for a working mpi module... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi module" >&5 +printf %s "checking for a working mpi module... " >&6; } save_ldflags="$LDFLAGS" - if test "$LIB_MPI"; then : + if test "$LIB_MPI" +then : LDFLAGS="${LDFLAGS} -L${LIB_MPI}" fi cat > conftest.$ac_ext <<_ACEOF @@ -9032,14 +9716,15 @@ fi call MPI_Init(ierr) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : - HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if ac_fn_fc_try_compile "$LINENO" +then : + HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi # # @@ -9051,12 +9736,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9087,12 +9772,13 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`$as_echo "ac_cv_file_$MPIF77" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 -$as_echo_n "checking for $MPIF77... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 +printf %s "checking for $MPIF77... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then @@ -9102,20 +9788,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIF77_test=$MPIF77 -else +else $as_nop for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9123,11 +9811,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9138,11 +9830,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9153,12 +9845,13 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`$as_echo "ac_cv_file_$MPIFC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 -$as_echo_n "checking for $MPIFC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 +printf %s "checking for $MPIFC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then @@ -9168,20 +9861,22 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : MPIF77_test=$MPIFC -else +else $as_nop for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9189,11 +9884,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9204,11 +9903,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9223,11 +9922,12 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPIF77_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPIF77_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else @@ -9235,11 +9935,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPIF77_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9250,11 +9954,11 @@ fi fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 -$as_echo "$MPIF77_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIF77_test" >&5 +printf "%s\n" "$MPIF77_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9268,22 +9972,23 @@ test -n "$MPIF77_test" || MPIF77_test="$F77" if test "$acx_mpi_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 -$as_echo_n "checking for MPI_Init... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI_Init" >&5 +printf %s "checking for MPI_Init... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call MPI_Init end _ACEOF -if ac_fn_f77_try_link "$LINENO"; then : +if ac_fn_f77_try_link "$LINENO" +then : ac_mpi_ok="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -9319,12 +10024,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a FORTRAN 77 mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9360,11 +10065,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPICC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPICC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9372,11 +10078,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9387,11 +10097,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -$as_echo "$MPICC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +printf "%s\n" "$MPICC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9400,12 +10110,13 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`$as_echo "ac_cv_file_$MPICC" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 -$as_echo_n "checking for $MPICC... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 +printf %s "checking for $MPICC... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then @@ -9415,24 +10126,26 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 _ACEOF MPICC_test=$MPICC -else +else $as_nop for ac_prog in $MPICC mpipgicc mpiicc mpicc mpiicpx hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MPICC_test+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MPICC_test+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else @@ -9440,11 +10153,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MPICC_test="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -9455,11 +10172,11 @@ fi fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 -$as_echo "$MPICC_test" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC_test" >&5 +printf "%s\n" "$MPICC_test" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9476,7 +10193,8 @@ fi if test "$acx_mpi_ok" = "yes"; then ac_fn_c_check_func "$LINENO" "MPI_Init" "ac_cv_func_MPI_Init" -if test "x$ac_cv_func_MPI_Init" = xyes; then : +if test "x$ac_cv_func_MPI_Init" = xyes +then : acx_mpi_ok="yes" fi @@ -9491,8 +10209,8 @@ fi if test x"$MPICC" != x"mpipgicc" ; then echo > /dev/null if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 -$as_echo_n "checking for a working mpi.h... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working mpi.h" >&5 +printf %s "checking for a working mpi.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9505,21 +10223,22 @@ $as_echo_n "checking for a working mpi.h... " >&6; } #endif #endif int -main () +main (void) { #include ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; };acx_mpi_ok="yes" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ;acx_mpi_ok="no" +if ac_fn_c_try_compile "$LINENO" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi else acx_mpi_ok="yes" @@ -9544,12 +10263,12 @@ fi # # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test "$acx_mpi_ok" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 -$as_echo "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not compile a C mpi test program. YAMBO serial only." >&5 +printf "%s\n" "$as_me: WARNING: could not compile a C mpi test program. YAMBO serial only." >&2;} : else -$as_echo "#define HAVE_MPI 1" >>confdefs.h +printf "%s\n" "#define HAVE_MPI 1" >>confdefs.h : fi @@ -9588,10 +10307,10 @@ if test -e "conftest.x"; then else MPIKIND="undefined" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 -$as_echo_n "checking for MPI version... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 -$as_echo "$MPIKIND" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPI version" >&5 +printf %s "checking for MPI version... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIKIND" >&5 +printf "%s\n" "$MPIKIND" >&6; } MPI_PATH=`which $CC |sed "s/bin\/$CC//g"` @@ -9617,25 +10336,29 @@ fi # Check whether --with-mpi_libs was given. -if test "${with_mpi_libs+set}" = set; then : +if test ${with_mpi_libs+y} +then : withval=$with_mpi_libs; fi # Check whether --with-mpi_path was given. -if test "${with_mpi_path+set}" = set; then : +if test ${with_mpi_path+y} +then : withval=$with_mpi_path; fi # Check whether --with-mpi_libdir was given. -if test "${with_mpi_libdir+set}" = set; then : +if test ${with_mpi_libdir+y} +then : withval=$with_mpi_libdir; fi # Check whether --with-mpi_includedir was given. -if test "${with_mpi_includedir+set}" = set; then : +if test ${with_mpi_includedir+y} +then : withval=$with_mpi_includedir; fi @@ -9711,12 +10434,13 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`$as_echo "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 -$as_echo_n "checking for $MPI_INC_DIR/mpif.h... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 +printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } +if eval test \${$as_ac_File+y} +then : + printf %s "(cached) " >&6 +else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then @@ -9726,11 +10450,12 @@ else fi fi eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_File"\" = x"yes" +then : mpif_found_tmp="yes" -else +else $as_nop mpif_found_tmp="no" fi @@ -9966,12 +10691,47 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu +# ============================================================================ +# Yambo Libs + + +# + +# Check whether --with-ydiago-branch was given. +if test ${with_ydiago_branch+y} +then : + withval=$with_ydiago_branch; +else $as_nop + with_ydiago_branch=none +fi + +# +ac_config_files="$ac_config_files lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" + +if test x"$with_ydiago_branch" = "xnone"; then + ydiago_check="D"; +else + ydiago_check="G"; +fi +#YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libydiago.a" +#YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include/" +YDIAGO_LIBS="${compdir}/lib/libydiago.a" +YDIAGO_INCS="$IFLAG${compdir}/include/" + + + + + + + + # ============================================================================ # YDB/YAMBOpy # # Check whether --enable-ydb was given. -if test "${enable_ydb+set}" = set; then : +if test ${enable_ydb+y} +then : enableval=$enable_ydb; fi @@ -9985,11 +10745,12 @@ if test "x$enable_ydb" = "xyes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}git", so it can be a program name with args. set dummy ${ac_tool_prefix}git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else @@ -9997,11 +10758,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GIT="${ac_tool_prefix}git" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10012,11 +10777,11 @@ fi fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -$as_echo "$GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +printf "%s\n" "$GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -10025,11 +10790,12 @@ if test -z "$ac_cv_prog_GIT"; then ac_ct_GIT=$GIT # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_GIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_GIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else @@ -10037,11 +10803,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GIT="git" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -10052,11 +10822,11 @@ fi fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 -$as_echo "$ac_ct_GIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GIT" >&5 +printf "%s\n" "$ac_ct_GIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_GIT" = x; then @@ -10064,8 +10834,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GIT=$ac_ct_GIT @@ -10077,14 +10847,14 @@ fi # if test "$GIT" = "false"; then enable_ydb="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 -$as_echo "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Git not found. Impossible to install YDB." >&5 +printf "%s\n" "$as_me: WARNING: Git not found. Impossible to install YDB." >&2;} fi # if test "x$enable_ydb" = "xyes" && ! test -d "scripts/ydb"; then # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 -$as_echo_n "checking YDB from $url_ydb... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking YDB from $url_ydb" >&5 +printf %s "checking YDB from $url_ydb... " >&6; } mkdir -p scripts git clone $url_ydb scripts/ydb # @@ -10094,8 +10864,8 @@ $as_echo_n "checking YDB from $url_ydb... " >&6; } cd $srcdir else enable_ydb="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 -$as_echo "$as_me: WARNING: Impossible to install YDB." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Impossible to install YDB." >&5 +printf "%s\n" "$as_me: WARNING: Impossible to install YDB." >&2;} fi fi # @@ -10109,17 +10879,19 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 -$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } -if ${ac_cv_prog_f77_v+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5 +printf %s "checking how to get verbose linking output from $F77... " >&6; } +if test ${ac_cv_prog_f77_v+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : ac_cv_prog_f77_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do @@ -10137,13 +10909,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_f77_v_output" >&5 +printf "%s\n" "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10210,23 +10982,24 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 -$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 +printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -$as_echo "$as_me: WARNING: compilation failed" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 -$as_echo "$ac_cv_prog_f77_v" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 -$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } -if ${ac_cv_f77_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 +printf "%s\n" "$ac_cv_prog_f77_v" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5 +printf %s "checking for Fortran 77 libraries of $F77... " >&6; } +if test ${ac_cv_f77_libs+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -10245,13 +11018,13 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5 # gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, # LIBRARY_PATH; skip all such settings. ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | sed '/^Driving:/d; /^Configured with:/d; '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"` -$as_echo "$ac_f77_v_output" >&5 +printf "%s\n" "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS rm -rf conftest* @@ -10328,9 +11101,10 @@ while test $# != 1; do fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; @@ -10343,9 +11117,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" @@ -10360,9 +11135,24 @@ fi |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) + # Ignore this library only on Windows-like systems. case $host_os in - *cygwin*) ;; - *) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + cygwin* | msys* ) ;; + *) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue +then : + +else $as_nop + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi ;; esac ;; @@ -10380,7 +11170,7 @@ fi esac ;; -YP,*) - for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -10389,9 +11179,10 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_arg="$ac_arg $ac_j" ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" fi @@ -10406,15 +11197,17 @@ fi fi done - if test x"$ac_exists" = xtrue; then : + if test x"$ac_exists" = xtrue +then : -else +else $as_nop ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" fi ;; -zallextract*| -zdefaultextract) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; + -mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'. # Ignore everything else. esac done @@ -10426,7 +11219,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`$as_echo "$ac_f77_v_output" | + ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -10441,8 +11234,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 -$as_echo "$ac_cv_f77_libs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 +printf "%s\n" "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -10458,17 +11251,20 @@ acx_blas_ok=no # Check whether --with-blas_libs was given. -if test "${with_blas_libs+set}" = set; then : +if test ${with_blas_libs+y} +then : withval=$with_blas_libs; fi # Check whether --enable-int_linalg was given. -if test "${enable_int_linalg+set}" = set; then : +if test ${enable_int_linalg+y} +then : enableval=$enable_int_linalg; fi # Check whether --enable-openmp_int_linalg was given. -if test "${enable_openmp_int_linalg+set}" = set; then : +if test ${enable_openmp_int_linalg+y} +then : enableval=$enable_openmp_int_linalg; fi @@ -10476,7 +11272,8 @@ fi BLAS_LIBS="" # Check whether --with-blas_libs was given. -if test "${with_blas_libs+set}" = set; then : +if test ${with_blas_libs+y} +then : withval=$with_blas_libs; fi @@ -10501,22 +11298,23 @@ internal_blas="no" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 -$as_echo_n "checking for $caxpy in $BLAS_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in $BLAS_LIBS" >&5 +printf %s "checking for $caxpy in $BLAS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_blas_ok=yes -else +else $as_nop BLAS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 -$as_echo "$acx_blas_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_blas_ok" >&5 +printf "%s\n" "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -10525,9 +11323,10 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`$as_echo "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : acx_blas_ok=yes fi @@ -10536,11 +11335,12 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 -$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } -if ${ac_cv_lib_atlas_ATL_xerbla+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5 +printf %s "checking for ATL_xerbla in -latlas... " >&6; } +if test ${ac_cv_lib_atlas_ATL_xerbla+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10548,24 +11348,27 @@ cat > conftest.$ac_ext <<_ACEOF call ATL_xerbla end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_atlas_ATL_xerbla=yes -else +else $as_nop ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes; then : - as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 -$as_echo_n "checking for $caxpy in -lf77blas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 +printf %s "checking for $caxpy in -lf77blas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10573,24 +11376,27 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 -$as_echo_n "checking for cblas_daxpy in -lcblas... " >&6; } -if ${ac_cv_lib_cblas_cblas_daxpy+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_daxpy in -lcblas" >&5 +printf %s "checking for cblas_daxpy in -lcblas... " >&6; } +if test ${ac_cv_lib_cblas_cblas_daxpy+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10598,18 +11404,20 @@ cat > conftest.$ac_ext <<_ACEOF call cblas_daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_cblas_cblas_daxpy=yes -else +else $as_nop ac_cv_lib_cblas_cblas_daxpy=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 -$as_echo "$ac_cv_lib_cblas_cblas_daxpy" >&6; } -if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 +printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } +if test "x$ac_cv_lib_cblas_cblas_daxpy" = xyes +then : acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -10622,12 +11430,13 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10635,25 +11444,28 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 -$as_echo_n "checking for $daxpy in -ldaxpy... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 +printf %s "checking for $daxpy in -ldaxpy... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10661,25 +11473,28 @@ cat > conftest.$ac_ext <<_ACEOF call $daxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 -$as_echo_n "checking for $caxpy in -lcaxpy... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 +printf %s "checking for $caxpy in -lcaxpy... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10687,19 +11502,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lcaxpy -ldaxpy -lblas" fi @@ -10711,12 +11528,13 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 -$as_echo_n "checking for $caxpy in -lcxml... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 +printf %s "checking for $caxpy in -lcxml... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10724,19 +11542,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -10744,12 +11564,13 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 -$as_echo_n "checking for $caxpy in -ldxml... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 +printf %s "checking for $caxpy in -ldxml... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10757,19 +11578,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -10778,11 +11601,12 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 -$as_echo_n "checking for acosp in -lsunmath... " >&6; } -if ${ac_cv_lib_sunmath_acosp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acosp in -lsunmath" >&5 +printf %s "checking for acosp in -lsunmath... " >&6; } +if test ${ac_cv_lib_sunmath_acosp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10790,24 +11614,27 @@ cat > conftest.$ac_ext <<_ACEOF call acosp end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : ac_cv_lib_sunmath_acosp=yes -else +else $as_nop ac_cv_lib_sunmath_acosp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 -$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } -if test "x$ac_cv_lib_sunmath_acosp" = xyes; then : - as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 -$as_echo_n "checking for $caxpy in -lsunperf... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 +printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = xyes +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 +printf %s "checking for $caxpy in -lsunperf... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10815,19 +11642,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -10839,12 +11668,13 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_scs_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 -$as_echo_n "checking for $caxpy in -lscs... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 +printf %s "checking for $caxpy in -lscs... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10852,19 +11682,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -10872,12 +11704,13 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 -$as_echo_n "checking for $caxpy in -lcomplib.sgimath... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 +printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10885,19 +11718,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -10905,12 +11740,13 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10918,25 +11754,28 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : - as_ac_Lib=`$as_echo "ac_cv_lib_essl_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 -$as_echo_n "checking for $caxpy in -lessl... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : + as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 +printf %s "checking for $caxpy in -lessl... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10944,19 +11783,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -10972,12 +11813,13 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 -$as_echo_n "checking for $caxpy in -lmkl_gf_lp64... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 +printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -10985,30 +11827,33 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 -$as_echo_n "checking for $caxpy in -lmkl_gf... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 +printf %s "checking for $caxpy in -lmkl_gf... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11016,19 +11861,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread" fi @@ -11040,12 +11887,13 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 -$as_echo_n "checking for $caxpy in -lmkl_intel_lp64... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 +printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11053,30 +11901,33 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm" fi ;; i?86*linux*) - as_ac_Lib=`$as_echo "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 -$as_echo_n "checking for $caxpy in -lmkl_intel... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 +printf %s "checking for $caxpy in -lmkl_intel... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11084,19 +11935,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes;BLAS_LIBS="-L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread" fi @@ -11107,12 +11960,13 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`$as_echo "ac_cv_lib_blas_$caxpy" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 -$as_echo_n "checking for $caxpy in -lblas... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 +printf %s "checking for $caxpy in -lblas... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11120,19 +11974,21 @@ cat > conftest.$ac_ext <<_ACEOF call $caxpy end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -11143,7 +11999,7 @@ LIBS="$acx_blas_save_LIBS" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_blas_ok" = xyes; then -$as_echo "#define HAVE_BLAS 1" >>confdefs.h +printf "%s\n" "#define HAVE_BLAS 1" >>confdefs.h : else @@ -11153,12 +12009,12 @@ fi if test $acx_blas_ok = "no"; then internal_blas="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 -$as_echo "$as_me: Could not find blas. Using the built-in library" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find blas. Using the built-in library" >&5 +printf "%s\n" "$as_me: Could not find blas. Using the built-in library" >&6;} elif (test -d "$with_blas_libs" && test "$with_blas_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_blas="yes" - if test $acx_blas_ok = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 -$as_echo "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi + if test $acx_blas_ok = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Blas found in ${BLAS_LIBS} but imposing built-in library" >&5 +printf "%s\n" "$as_me: Blas found in ${BLAS_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_blas" = "yes"; then @@ -11223,11 +12079,12 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 -$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } -if ${ac_cv_f77_dummy_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5 +printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if test ${ac_cv_f77_dummy_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN @@ -11258,19 +12115,20 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=none -else +else $as_nop ac_cv_fortran_dummy_main=unknown fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $ac_cv_fortran_dummy_main = unknown; then @@ -11295,17 +12153,18 @@ rm -f core conftest.err conftest.$ac_objext \ #endif #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_fortran_dummy_main=$ac_func; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done fi @@ -11318,25 +12177,24 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_f77_dm_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 -$as_echo "$ac_cv_f77_dummy_main" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 +printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main -if test "$F77_DUMMY_MAIN" != unknown; then : +if test "$F77_DUMMY_MAIN" != unknown +then : if test $F77_DUMMY_MAIN != none; then -cat >>confdefs.h <<_ACEOF -#define F77_DUMMY_MAIN $F77_DUMMY_MAIN -_ACEOF +printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then -$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h +printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails See \`config.log' for more details" "$LINENO" 5; } fi @@ -11350,11 +12208,12 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 -$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } -if ${ac_cv_f77_mangling+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5 +printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } +if test ${ac_cv_f77_mangling+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return @@ -11363,7 +12222,8 @@ else return end _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : +if ac_fn_f77_try_compile "$LINENO" +then : mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS @@ -11384,9 +12244,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11405,17 +12262,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success=yes; break 2 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done done @@ -11450,9 +12308,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char $ac_func (); #ifdef F77_DUMMY_MAIN @@ -11471,17 +12326,18 @@ char $ac_func (); #endif #endif int -main () +main (void) { return $ac_func (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_success_extra=yes; break fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done ac_ext=f @@ -11511,17 +12367,17 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program See \`config.log' for more details" "$LINENO" 5; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 -$as_echo "$ac_cv_f77_mangling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 +printf "%s\n" "$ac_cv_f77_mangling" >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -11535,7 +12391,8 @@ acx_lapack_ok=no LAPACK_LIBS="" # Check whether --with-lapack_libs was given. -if test "${with_lapack_libs+set}" = set; then : +if test ${with_lapack_libs+y} +then : withval=$with_lapack_libs; fi @@ -11561,22 +12418,23 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 -$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in $LAPACK_LIBS" >&5 +printf %s "checking for $cheev in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_lapack_ok=yes -else +else $as_nop LAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 -$as_echo "$acx_lapack_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_lapack_ok" >&5 +printf "%s\n" "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -11586,9 +12444,10 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +if eval test \"x\$"$as_ac_var"\" = x"yes" +then : acx_lapack_ok=yes fi @@ -11599,12 +12458,13 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 -$as_echo_n "checking for $cheev in -l$lapack... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 +printf %s "checking for $cheev in -l$lapack... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF @@ -11612,19 +12472,21 @@ cat > conftest.$ac_ext <<_ACEOF call $cheev end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -11656,22 +12518,23 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 -$as_echo_n "checking for $dlaran in $LAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $dlaran in $LAPACK_LIBS" >&5 +printf %s "checking for $dlaran in $LAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $dlaran end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_dlaran_ok=yes -else +else $as_nop acx_dlaran_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 -$as_echo "$acx_dlaran_ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_dlaran_ok" >&5 +printf "%s\n" "$acx_dlaran_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -11679,7 +12542,7 @@ fi # Execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_lapack_ok" = xyes; then -$as_echo "#define HAVE_LAPACK 1" >>confdefs.h +printf "%s\n" "#define HAVE_LAPACK 1" >>confdefs.h : else @@ -11689,12 +12552,12 @@ fi if test $acx_lapack_ok = "no"; then internal_lapack="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 -$as_echo "$as_me: Could not find lapack. Using the built-in library" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Could not find lapack. Using the built-in library" >&5 +printf "%s\n" "$as_me: Could not find lapack. Using the built-in library" >&6;} elif (test -d "$with_lapack_libs" && test "$with_lapack_libs" = "") || test x"$enable_int_linalg" = "xyes" ; then internal_lapack="yes" - if test "$acx_lalpack_ok" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 -$as_echo "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi + if test "$acx_lalpack_ok" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&5 +printf "%s\n" "$as_me: Lapack found in ${LAPACK_LIBS} but imposing built-in library" >&6;}; fi fi if test "$internal_lapack" = "yes"; then @@ -11746,52 +12609,60 @@ fi # Check whether --with-fft_libs was given. -if test "${with_fft_libs+set}" = set; then : +if test ${with_fft_libs+y} +then : withval=$with_fft_libs; fi # Check whether --with-fft_path was given. -if test "${with_fft_path+set}" = set; then : +if test ${with_fft_path+y} +then : withval=$with_fft_path; fi # Check whether --with-fft_libdir was given. -if test "${with_fft_libdir+set}" = set; then : +if test ${with_fft_libdir+y} +then : withval=$with_fft_libdir; fi # Check whether --with-fft_includedir was given. -if test "${with_fft_includedir+set}" = set; then : +if test ${with_fft_includedir+y} +then : withval=$with_fft_includedir; fi # # Check whether --enable-internal_fftqe was given. -if test "${enable_internal_fftqe+set}" = set; then : +if test ${enable_internal_fftqe+y} +then : enableval=$enable_internal_fftqe; -else +else $as_nop enable_internal_fftqe=no fi # Check whether --enable-internal_fftsg was given. -if test "${enable_internal_fftsg+set}" = set; then : +if test ${enable_internal_fftsg+y} +then : enableval=$enable_internal_fftsg; -else +else $as_nop enable_internal_fftsg=no fi # Check whether --enable-3d_fft was given. -if test "${enable_3d_fft+set}" = set; then : +if test ${enable_3d_fft+y} +then : enableval=$enable_3d_fft; fi # # Check whether --with-fftsg_fac was given. -if test "${with_fftsg_fac+set}" = set; then : +if test ${with_fftsg_fac+y} +then : withval=$with_fftsg_fac; fi @@ -11816,10 +12687,10 @@ if test -d "$with_fft_path" || test -d "$with_fft_libdir" ; then # # external FFT # - if test -d "$with_fft_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 -$as_echo_n "checking for FFT in $with_fft_path... " >&6; } ; fi - if test -d "$with_fft_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 -$as_echo_n "checking for FFT in $with_fft_libdir... " >&6; } ; fi + if test -d "$with_fft_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_path" >&5 +printf %s "checking for FFT in $with_fft_path... " >&6; } ; fi + if test -d "$with_fft_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT in $with_fft_libdir" >&5 +printf %s "checking for FFT in $with_fft_libdir... " >&6; } ; fi # if test -d "$with_fft_path" ; then try_fft_libdir=$with_fft_path/lib @@ -11835,16 +12706,16 @@ elif test x"$with_fft_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 -$as_echo_n "checking for FFT Library using $with_fft_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT Library using $with_fft_libs" >&5 +printf %s "checking for FFT Library using $with_fft_libs... " >&6; } try_fft_libs=$with_fft_libs # if test -d "$with_fft_includedir" ; then try_fft_incdir=$with_fft_includedir ; fi if test -z "$try_fft_incdir" ; then include_warn="yes" ; fi # else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } fi # # check for FFTW @@ -11907,22 +12778,24 @@ if ! test x"$try_fft_libs" = "x" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_FFTW="yes"; -else +else $as_nop HAVE_FFTW="no"; fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_omp _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_FFTW_OMP="yes"; -else +else $as_nop HAVE_FFTW_OMP="no"; fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext # LIBS=$save_libs @@ -11934,18 +12807,18 @@ rm -f core conftest.err conftest.$ac_objext \ # if test "$try_fft_libs" = "-lfftw3" ; then FFT_info="(FFTW v3)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 -$as_echo "FFTW3" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3" >&5 +printf "%s\n" "FFTW3" >&6; } elif test "$try_fft_libs" = "-lfftw3 -lfftw3_omp" && test "$HAVE_FFTW_OMP" = "yes" ; then FFT_info="(FFTW_OMP v3)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 -$as_echo "FFTW3_OMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW3_OMP" >&5 +printf "%s\n" "FFTW3_OMP" >&6; } else desc=Other if ! test -z "`echo $try_fft_libs | grep -i mkl`" ; then desc="MKL" ; fi FFT_info="(FFTW $desc)"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 -$as_echo "FFTW ($desc) " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW ($desc) " >&5 +printf "%s\n" "FFTW ($desc) " >&6; } fi else def_fft="" @@ -11960,8 +12833,8 @@ else fi if test "$HAVE_FFT" = "yes" && test "$include_warn" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 -$as_echo "$as_me: WARNING: No include-dir specified for fft library" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No include-dir specified for fft library" >&5 +printf "%s\n" "$as_me: WARNING: No include-dir specified for fft library" >&2;} fi # # check for ESSL FFT @@ -11971,8 +12844,8 @@ if test -d "$try_fft_libdir" && test -d "$try_fft_incdir" ; then fi # if ! test x"$try_fft_libs" = "x" && ! test "$HAVE_FFT" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 -$as_echo "FFTW no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTW no" >&5 +printf "%s\n" "FFTW no" >&6; } # if ! test x"$try_fft_libdir" = "x" ; then FFT_PATH="-L$try_fft_libdir" ; fi # @@ -11982,30 +12855,31 @@ $as_echo "FFTW no" >&6; } LIBS="$FFT_PATH $try_fft_libs" if test x"$try_fft_incdir" != "x" ; then FCFLAGS="$FCFLAGS $IFLAG$try_fft_incdir" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 -$as_echo_n "checking for dcft in $LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dcft in $LIBS" >&5 +printf %s "checking for dcft in $LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call dcft end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : HAVE_ESSL=yes -else +else $as_nop HAVE_ESSL=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 -$as_echo "$HAVE_ESSL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_ESSL" >&5 +printf "%s\n" "$HAVE_ESSL" >&6; } # LIBS=$save_libs LDFLAGS=$save_ldflags FCFLAGS=$save_fcflags # if test "$HAVE_ESSL" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } if ! test x"$enable_3d_fft" = "xno" ; then FFT3D_CPP="-D_USE_3D_FFT" FFT_info="(FFT ESSL (FFTQE) with 3D support)"; @@ -12017,8 +12891,8 @@ $as_echo_n "checking for FFT... " >&6; } FFT_INCS="$IFLAG$try_fft_incdir" HAVE_FFT=yes compile_fftqe=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 -$as_echo "ESSL FFT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ESSL FFT" >&5 +printf "%s\n" "ESSL FFT" >&6; } fi fi # @@ -12027,8 +12901,8 @@ fi if ! test x"$HAVE_FFT" = "xyes" ; then # # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 -$as_echo_n "checking for FFT... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FFT" >&5 +printf %s "checking for FFT... " >&6; } if test x"$enable_internal_fftqe" = "xyes" ; then use_internal_fftqe=yes use_internal_fftsg=no @@ -12065,8 +12939,8 @@ if test "$use_internal_fftqe" = "yes" ; then else compile_fftqe=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 -$as_echo "Internal FFTQE (FFTW2)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTQE (FFTW2)" >&5 +printf "%s\n" "Internal FFTQE (FFTW2)" >&6; } fi if test "$HAVE_FFTQE" = "yes" ; then HAVE_FFT=yes ; fi @@ -12092,8 +12966,8 @@ if test "$use_internal_fftsg" = "yes" ; then FFT_LIBS="" HAVE_FFTSG=yes; internal_fft="yes"; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 -$as_echo "FFTSG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: FFTSG" >&5 +printf "%s\n" "FFTSG" >&6; } fi if test "$HAVE_FFTSG" = "yes" ; then HAVE_FFT=yes ; fi @@ -12114,8 +12988,8 @@ if test "$use_internal_fftw" = "yes" ; then else compile_fftw=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 -$as_echo "Internal FFTW3" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal FFTW3" >&5 +printf "%s\n" "Internal FFTW3" >&6; } fi if test "$HAVE_FFTW" = "yes" ; then HAVE_FFT=yes ; fi @@ -12129,48 +13003,48 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu case $ac_cv_f77_mangling in "lower case, no underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h ;; "lower case, no underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h ;; "lower case, underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h ;; "upper case, no underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h ;; "upper case, no underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, no extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h ;; "upper case, underscore, extra underscore") - $as_echo "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h + printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h - $as_echo "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h + printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 -$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5 +printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;} ;; esac @@ -12179,7 +13053,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - $as_echo "#define _FFTQE 1" >>confdefs.h + printf "%s\n" "#define _FFTQE 1" >>confdefs.h ac_config_headers="$ac_config_headers lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" @@ -12201,86 +13075,99 @@ fi # # Check whether --enable-slepc_linalg was given. -if test "${enable_slepc_linalg+set}" = set; then : +if test ${enable_slepc_linalg+y} +then : enableval=$enable_slepc_linalg; fi # # Check whether --with-slepc_libs was given. -if test "${with_slepc_libs+set}" = set; then : +if test ${with_slepc_libs+y} +then : withval=$with_slepc_libs; fi # Check whether --with-slepc_incs was given. -if test "${with_slepc_incs+set}" = set; then : +if test ${with_slepc_incs+y} +then : withval=$with_slepc_incs; fi # Check whether --with-slepc_path was given. -if test "${with_slepc_path+set}" = set; then : +if test ${with_slepc_path+y} +then : withval=$with_slepc_path; fi # Check whether --with-slepc_libdir was given. -if test "${with_slepc_libdir+set}" = set; then : +if test ${with_slepc_libdir+y} +then : withval=$with_slepc_libdir; fi # Check whether --with-slepc_includedir was given. -if test "${with_slepc_includedir+set}" = set; then : +if test ${with_slepc_includedir+y} +then : withval=$with_slepc_includedir; fi # # Check whether --with-petsc_libs was given. -if test "${with_petsc_libs+set}" = set; then : +if test ${with_petsc_libs+y} +then : withval=$with_petsc_libs; fi # Check whether --with-petsc_incs was given. -if test "${with_petsc_incs+set}" = set; then : +if test ${with_petsc_incs+y} +then : withval=$with_petsc_incs; fi # Check whether --with-petsc_path was given. -if test "${with_petsc_path+set}" = set; then : +if test ${with_petsc_path+y} +then : withval=$with_petsc_path; fi # Check whether --with-petsc_libdir was given. -if test "${with_petsc_libdir+set}" = set; then : +if test ${with_petsc_libdir+y} +then : withval=$with_petsc_libdir; fi # Check whether --with-petsc_includedir was given. -if test "${with_petsc_includedir+set}" = set; then : +if test ${with_petsc_includedir+y} +then : withval=$with_petsc_includedir; fi # Check whether --with-slepc-branch was given. -if test "${with_slepc_branch+set}" = set; then : +if test ${with_slepc_branch+y} +then : withval=$with_slepc_branch; -else +else $as_nop with_slepc_branch=none fi # Check whether --with-petsc-branch was given. -if test "${with_petsc_branch+set}" = set; then : +if test ${with_petsc_branch+y} +then : withval=$with_petsc_branch; -else +else $as_nop with_petsc_branch=none fi @@ -12303,11 +13190,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12316,9 +13204,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -12337,27 +13222,29 @@ char dlopen (); #endif #endif int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : use_libdl="yes"; -else +else $as_nop use_libdl="no"; fi @@ -12392,12 +13279,12 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe # # external petsc # - if test x"$with_petsc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 -$as_echo_n "checking for Petsc using $with_petsc_libs... " >&6; } ; - elif test -d "$with_petsc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 -$as_echo_n "checking for Petsc in $with_petsc_libdir... " >&6; } ; - elif test -d "$with_petsc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 -$as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; + if test x"$with_petsc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc using $with_petsc_libs" >&5 +printf %s "checking for Petsc using $with_petsc_libs... " >&6; } ; + elif test -d "$with_petsc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_libdir" >&5 +printf %s "checking for Petsc in $with_petsc_libdir... " >&6; } ; + elif test -d "$with_petsc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Petsc in $with_petsc_path" >&5 +printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; fi # if test -d "$with_petsc_path" ; then @@ -12411,7 +13298,7 @@ $as_echo_n "checking for Petsc in $with_petsc_path... " >&6; } ; try_PETSC_INCS="$IFLAG$try_petsc_incdir" ; try_PETSC_LIBS="-L$try_petsc_libdir -lpetsc" ; # - if test "$use_libdl" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -ldl" ; fi + if test "$use_libdl" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -ldl -lstdc++" ; fi # if test x"$with_petsc_libs" != "x" ; then try_PETSC_LIBS="$with_petsc_libs" ; fi if test x"$with_petsc_incs" != "x" ; then try_PETSC_INCS="$with_petsc_incs" ; fi @@ -12440,23 +13327,24 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : petsc=yes -else +else $as_nop petsc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$petsc" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; PETSC_INCS="$try_PETSC_INCS" ; PETSC_LIBS="$try_PETSC_LIBS" ; compile_petsc="no"; internal_petsc="no"; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # fi # @@ -12469,8 +13357,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then # # internal petsc # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 -$as_echo_n "checking for internal Petsc library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Petsc library" >&5 +printf %s "checking for internal Petsc library... " >&6; } # internal_petsc="yes" # @@ -12483,37 +13371,37 @@ $as_echo_n "checking for internal Petsc library... " >&6; } fi PETSC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi # petsc=yes if test -e "$PETSC_LIBS_DN" ; then PETSC_LIBS="$PETSC_LIBS_DN" ; compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 -$as_echo "dynamic already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 +printf "%s\n" "dynamic already compiled" >&6; } ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 -$as_echo "dynamic found, despite no dynamic lapack detected." >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic petsc libs." >&5 -$as_echo "The compilation may fail. In case remove the dynamic petsc libs." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 +printf "%s\n" "dynamic found, despite no dynamic lapack detected." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic petsc libs." >&5 +printf "%s\n" "The compilation may fail. In case remove the dynamic petsc libs." >&6; } ; fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 -$as_echo "static found, despite dynamic lapack." >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: You may delete the static petsc and re-run the configure to get smaller executables" >&5 -$as_echo "You may delete the static petsc and re-run the configure to get smaller executables" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 +printf "%s\n" "static found, despite dynamic lapack." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: You may delete the static petsc and re-run the configure to get smaller executables" >&5 +printf "%s\n" "You may delete the static petsc and re-run the configure to get smaller executables" >&6; } ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 -$as_echo "static already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +printf "%s\n" "static already compiled" >&6; } ; fi else compile_petsc="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi # fi @@ -12540,12 +13428,12 @@ if test -d "$with_slepc_path" || test -d "$with_slec_libdir" || test x"$with_sle # # external slepc # - if test x"$with_slepc_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 -$as_echo_n "checking for Slepc using $with_slepc_libs... " >&6; } ; - elif test -d "$with_slepc_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 -$as_echo_n "checking for Slepc in $with_slepc_libdir... " >&6; } ; - elif test -d "$with_slepc_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 -$as_echo_n "checking for Slepc in $with_slepc_path... " >&6; } ; + if test x"$with_slepc_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc using $with_slepc_libs" >&5 +printf %s "checking for Slepc using $with_slepc_libs... " >&6; } ; + elif test -d "$with_slepc_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_libdir" >&5 +printf %s "checking for Slepc in $with_slepc_libdir... " >&6; } ; + elif test -d "$with_slepc_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Slepc in $with_slepc_path" >&5 +printf %s "checking for Slepc in $with_slepc_path... " >&6; } ; fi # if test -d "$with_slepc_path" ; then @@ -12584,24 +13472,25 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu #include end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : slepc=yes -else +else $as_nop slepc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$slepc" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; SLEPC_INCS="$try_SLEPC_INCS" ; SLEPC_LIBS="$try_SLEPC_LIBS" ; compile_slepc="no"; internal_slepc="no"; def_slepc="-D_SLEPC"; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # fi # @@ -12615,8 +13504,8 @@ if test "x$enable_slepc" = "xyes" && test "x$slepc" = "xno" && test "x$enable_pe # # internal slepc # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 -$as_echo_n "checking for internal Slepc library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Slepc library" >&5 +printf %s "checking for internal Slepc library... " >&6; } # internal_slepc="yes"; # @@ -12634,30 +13523,30 @@ $as_echo_n "checking for internal Slepc library... " >&6; } SLEPC_LIBS="$SLEPC_LIBS_DN -Wl,-rpath=${extlibs_path}/${FCKIND}/${FC}/${build_precision}/lib" ; compile_slepc="no" ; if test "x$lapack_shared" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 -$as_echo "dynamic already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 +printf "%s\n" "dynamic already compiled" >&6; } ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 -$as_echo "dynamic found, despite no dynamic lapack detected." >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic slepc libs." >&5 -$as_echo "The compilation may fail. In case remove the dynamic slepc libs." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic found, despite no dynamic lapack detected." >&5 +printf "%s\n" "dynamic found, despite no dynamic lapack detected." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: The compilation may fail. In case remove the dynamic slepc libs." >&5 +printf "%s\n" "The compilation may fail. In case remove the dynamic slepc libs." >&6; } ; fi elif test -e "$SLEPC_LIBS_ST" ; then SLEPC_LIBS="$SLEPC_LIBS_ST" ; compile_slepc="no" ; if test "x$lapack_shared" = "x1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 -$as_echo "static found, despite dynamic lapack." >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: You may delete the static slepc and re-run the configure to get smaller executables" >&5 -$as_echo "You may delete the static slepc and re-run the configure to get smaller executables" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 +printf "%s\n" "static found, despite dynamic lapack." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: You may delete the static slepc and re-run the configure to get smaller executables" >&5 +printf "%s\n" "You may delete the static slepc and re-run the configure to get smaller executables" >&6; } ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 -$as_echo "static already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static already compiled" >&5 +printf "%s\n" "static already compiled" >&6; } ; fi else compile_slepc="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi def_slepc="-D_SLEPC"; # @@ -12683,41 +13572,85 @@ fi # Check whether --enable-par_linalg was given. -if test "${enable_par_linalg+set}" = set; then : +if test ${enable_par_linalg+y} +then : enableval=$enable_par_linalg; fi # Check whether --with-blacs_libs was given. -if test "${with_blacs_libs+set}" = set; then : +if test ${with_blacs_libs+y} +then : withval=$with_blacs_libs; fi # Check whether --with-scalapack_libs was given. -if test "${with_scalapack_libs+set}" = set; then : +if test ${with_scalapack_libs+y} +then : withval=$with_scalapack_libs; fi +# Check whether --with-elpa_libs was given. +if test ${with_elpa_libs+y} +then : + withval=$with_elpa_libs; +fi + + +# Check whether --with-elpa_includedir was given. +if test ${with_elpa_includedir+y} +then : + withval=$with_elpa_includedir; +fi + + SCALAPACK_LIBS="" BLACS_LIBS="" +ELPA_LIBS="" +ELPA_INCS="" reset_LIBS="$LIBS" enable_scalapack="no" enable_blacs="no" +enable_elpa="no" + internal_slk="no" internal_blacs="no" +internal_elpa="no" + compile_slk="no" compile_blacs="no" +compile_elpa="no" + # # Set fortran linker names of BLACS/SCALAPACK functions to check for. # blacs_routine="blacs_set" scalapack_routine="pcheev" +elpa_routine="elpa_init" mpi_routine=MPI_Init # +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +testprog_elpa=" program main + + use elpa + !class(elpa_t), pointer :: elpa + integer :: success + ! We urge the user to always check the error code of all ELPA functions + if (elpa_init(20200417) /= elpa_ok) then + print *, 'ELPA API version not supported' + stop + endif + + end" +# # Search for MKL-Scalapack # try_mkl_scalapack="no" @@ -12773,6 +13706,12 @@ case $with_scalapack_libs in *) enable_scalapack="check"; SCALAPACK_LIBS="$with_scalapack_libs" ;; esac # +case $with_elpa_libs in + yes) enable_elpa="internal" ;; + no) enable_elpa="no" ;; + *) enable_elpa="check"; ELPA_LIBS="$with_elpa_libs" ; ELPA_INCS="$IFLAG$with_elpa_includedir" ;; +esac +# if test "$mpibuild" = "yes"; then # if test "$enable_blacs" = "check" ; then @@ -12782,22 +13721,23 @@ if test "$mpibuild" = "yes"; then # First, check BLACS_LIBS environment variable if test "x$BLACS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -$as_echo_n "checking for $blacs_routine in $BLACS_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 +printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $blacs_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : enable_blacs="yes" -else +else $as_nop enable_blacs="internal"; BLACS_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -$as_echo "$enable_blacs" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 +printf "%s\n" "$enable_blacs" >&6; } BLACS_LIBS="$acx_blacs_save_LIBS" LIBS="$save_LIBS" else @@ -12812,22 +13752,23 @@ $as_echo "$enable_blacs" >&6; } # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 -$as_echo_n "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $scalapack_routine in $SCALAPACK_LIBS" >&5 +printf %s "checking for $scalapack_routine in $SCALAPACK_LIBS... " >&6; } cat > conftest.$ac_ext <<_ACEOF program main call $scalapack_routine end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : enable_scalapack="yes" -else +else $as_nop enable_scalapack="internal"; SCALAPACK_LIBS="" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 -$as_echo "$enable_scalapack" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_scalapack" >&5 +printf "%s\n" "$enable_scalapack" >&6; } SCALAPACK_LIBS="$acx_scalapack_save_LIBS" LIBS="$save_LIBS" else @@ -12835,6 +13776,39 @@ $as_echo "$enable_scalapack" >&6; } fi fi # + if test "$enable_elpa" = "check" ; then + acx_elpa_save_LIBS="$ELPA_LIBS" + LIBS="$LIBS $FLIBS $SCALAPACK_LIBS $LAPACK_LIBS $BLAS_LIBS $BLACS_LIBS" + # First, check ELPA_LIBS environment variable + if test "x$ELPA_LIBS" != x; then + save_LIBS="$LIBS"; LIBS="$ELPA_LIBS $LIBS" + save_FCFLAGS="$FCFLAGS"; FCFLAGS="$ELPA_INCS/modules/ $FCFLAGS" + #AC_MSG_CHECKING([for $elpa_routine in $ELPA_LIBS]) + #AC_TRY_LINK_FUNC($elpa_routine, [enable_elpa="yes"], [enable_elpa="internal"; ELPA_LIBS=""]) + #AC_MSG_RESULT($enable_elpa) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $elpa_routine in $ELPA_LIBS" >&5 +printf %s "checking for $elpa_routine in $ELPA_LIBS... " >&6; } + cat > conftest.$ac_ext <<_ACEOF +$testprog_elpa +_ACEOF +if ac_fn_fc_try_link "$LINENO" +then : + enable_elpa="yes"; elpa_msg="yes" +else $as_nop + enable_elpa="internal"; elpa_msg="not working, fallback to internal"; ELPA_LIBS="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_elpa" >&5 +printf "%s\n" "$enable_elpa" >&6; } + ELPA_LIBS="$acx_elpa_save_LIBS" + LIBS="$save_LIBS" + FCFLAGS="$save_FCFLAGS" + else + enable_elpa="no"; + fi + fi + # if test x"$enable_par_linalg" = "xyes"; then if test x"$enable_int_linalg" = "xyes"; then enable_blacs="internal"; @@ -12845,6 +13819,14 @@ $as_echo "$enable_scalapack" >&6; } fi fi # + #if test x"$enable_par_linalg" = "xyes"; then + # if test x"$enable_int_linalg" = "xyes"; then + # enable_elpa="internal"; + # else + # if test "$enable_elpa" = "no"; then enable_elpa="internal"; fi + # fi + #fi + # if test "$mpif_found" = "yes" && test "$enable_blacs" = "internal"; then enable_blacs="yes"; internal_blacs="yes"; @@ -12867,20 +13849,48 @@ $as_echo "$enable_scalapack" >&6; } fi fi # + if test "$mpif_found" = "yes" && test "$enable_elpa" = "internal"; then + enable_elpa="yes" + internal_elpa="yes" + ELPA_LIBS="${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libelpa.a" + ELPA_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/include/" + if test -e "${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libelpa.a"; then + compile_elpa="no" + else + compile_elpa="yes" + fi + fi + # fi # if test "$enable_blacs" = "yes" && test "$enable_scalapack" = "yes" ; then def_scalapack="-D_SCALAPACK" + if test "$enable_elpa" = "yes" ; then + def_elpa="-D_ELPA" + else + enable_elpa="no" + def_elpa="" + ELPA_LIBS="" + ELPA_INCS="" + compile_elpa="no" + internal_elpa="no" + fi else enable_scalapack="no" enable_blacs="no" + enable_elpa="no" def_scalapack="" + def_elpa="" BLACS_LIBS="" SCALAPACK_LIBS="" + ELPA_LIBS="" + ELPA_INCS="" compile_blacs="no" compile_slk="no" + compile_elpa="no" internal_blacs="no" internal_slk="no" + internal_elpa="no" fi # LIBS="$reset_LIBS" @@ -12895,31 +13905,41 @@ LIBS="$reset_LIBS" + + + + + + # ============================================================================ # HDF5 # # Check whether --with-hdf5_libs was given. -if test "${with_hdf5_libs+set}" = set; then : +if test ${with_hdf5_libs+y} +then : withval=$with_hdf5_libs; fi # Check whether --with-hdf5_path was given. -if test "${with_hdf5_path+set}" = set; then : +if test ${with_hdf5_path+y} +then : withval=$with_hdf5_path; fi # Check whether --with-hdf5_libdir was given. -if test "${with_hdf5_libdir+set}" = set; then : +if test ${with_hdf5_libdir+y} +then : withval=$with_hdf5_libdir; fi # Check whether --with-hdf5_includedir was given. -if test "${with_hdf5_includedir+set}" = set; then : +if test ${with_hdf5_includedir+y} +then : withval=$with_hdf5_includedir; fi @@ -12927,7 +13947,8 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test "${enable_hdf5_compression+set}" = set; then : +if test ${enable_hdf5_compression+y} +then : enableval=$enable_hdf5_compression; fi @@ -12935,9 +13956,10 @@ fi # HDF5 PAR IO # # Check whether --enable-hdf5_par_io was given. -if test "${enable_hdf5_par_io+set}" = set; then : +if test ${enable_hdf5_par_io+y} +then : enableval=$enable_hdf5_par_io; -else +else $as_nop enable_hdf5_par_io="yes" fi @@ -12945,7 +13967,8 @@ fi # HDF5 FOR P2Y (also requires parallel HDF5) # # Check whether --enable-hdf5_p2y_support was given. -if test "${enable_hdf5_p2y_support+set}" = set; then : +if test ${enable_hdf5_p2y_support+y} +then : enableval=$enable_hdf5_p2y_support; fi @@ -12976,12 +13999,13 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`$as_echo "ac_cv_lib_z ''_deflate" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 -$as_echo_n "checking for deflate in -lz ... " >&6; } -if eval \${$as_ac_Lib+:} false; then : - $as_echo_n "(cached) " >&6 -else +as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 +printf %s "checking for deflate in -lz ... " >&6; } +if eval test \${$as_ac_Lib+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12990,9 +14014,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13011,36 +14032,39 @@ char deflate (); #endif #endif int -main () +main (void) { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$as_ac_Lib=yes" -else +else $as_nop eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes" +then : use_libz="yes"; -else +else $as_nop use_libz="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 -$as_echo_n "checking for deflate in -lsz... " >&6; } -if ${ac_cv_lib_sz_deflate+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 +printf %s "checking for deflate in -lsz... " >&6; } +if test ${ac_cv_lib_sz_deflate+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13049,9 +14073,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char deflate (); #ifdef F77_DUMMY_MAIN @@ -13070,35 +14091,38 @@ char deflate (); #endif #endif int -main () +main (void) { return deflate (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_sz_deflate=yes -else +else $as_nop ac_cv_lib_sz_deflate=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 -$as_echo "$ac_cv_lib_sz_deflate" >&6; } -if test "x$ac_cv_lib_sz_deflate" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 +printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } +if test "x$ac_cv_lib_sz_deflate" = xyes +then : use_libsz="yes"; -else +else $as_nop use_libsz="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13107,9 +14131,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); #ifdef F77_DUMMY_MAIN @@ -13128,35 +14149,38 @@ char dlopen (); #endif #endif int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : use_libdl="yes"; -else +else $as_nop use_libdl="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 -$as_echo_n "checking for curl_version in -lcurl... " >&6; } -if ${ac_cv_lib_curl_curl_version+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 +printf %s "checking for curl_version in -lcurl... " >&6; } +if test ${ac_cv_lib_curl_curl_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13165,9 +14189,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char curl_version (); #ifdef F77_DUMMY_MAIN @@ -13186,35 +14207,38 @@ char curl_version (); #endif #endif int -main () +main (void) { return curl_version (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_curl_curl_version=yes -else +else $as_nop ac_cv_lib_curl_curl_version=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 -$as_echo "$ac_cv_lib_curl_curl_version" >&6; } -if test "x$ac_cv_lib_curl_curl_version" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 +printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } +if test "x$ac_cv_lib_curl_curl_version" = xyes +then : use_libcurl="yes"; -else +else $as_nop use_libcurl="no"; fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 -$as_echo_n "checking for cos in -lm... " >&6; } -if ${ac_cv_lib_m_cos+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +printf %s "checking for cos in -lm... " >&6; } +if test ${ac_cv_lib_m_cos+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13223,9 +14247,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char cos (); #ifdef F77_DUMMY_MAIN @@ -13244,27 +14265,29 @@ char cos (); #endif #endif int -main () +main (void) { return cos (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_m_cos=yes -else +else $as_nop ac_cv_lib_m_cos=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 -$as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 +printf "%s\n" "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes +then : use_libm="yes"; -else +else $as_nop use_libm="no"; fi @@ -13293,14 +14316,14 @@ if test x"$enable_hdf5" = "xyes"; then # if ! test "$with_hdf5_libs" = "internal" ; then # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 -$as_echo_n "checking for HDF5... " >&6; } ; - if test -d "$with_hdf5_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: in libdir $with_hdf5_libdir" >&5 -$as_echo "in libdir $with_hdf5_libdir" >&6; } ; - elif test -d "$with_hdf5_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: in path $with_hdf5_path" >&5 -$as_echo "in path $with_hdf5_path" >&6; } ; - elif test x"$with_hdf5_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $with_hdf5_libs" >&5 -$as_echo "using $with_hdf5_libs" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5" >&5 +printf %s "checking for HDF5... " >&6; } ; + if test -d "$with_hdf5_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in libdir $with_hdf5_libdir" >&5 +printf "%s\n" "in libdir $with_hdf5_libdir" >&6; } ; + elif test -d "$with_hdf5_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in path $with_hdf5_path" >&5 +printf "%s\n" "in path $with_hdf5_path" >&6; } ; + elif test x"$with_hdf5_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $with_hdf5_libs" >&5 +printf "%s\n" "using $with_hdf5_libs" >&6; } ; fi # ac_ext=${ac_fc_srcext-f} @@ -13341,25 +14364,26 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; LIBS="$save_libs" ; # if test "x$hdf5" = "xno" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; # # Automatic detection of hdf5 libs copied from QE # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 -$as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using h5pfc/h5fc system compilers" >&5 +printf %s "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; # h5pfc="none" if test -e $with_hdf5_path/bin/h5pfc; then @@ -13407,12 +14431,13 @@ $as_echo_n "checking for HDF5 using h5pfc/h5fc system compilers... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13421,10 +14446,10 @@ rm -f core conftest.err conftest.$ac_objext \ fi # if test "x$hdf5" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 -$as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 using automatic library list" >&5 +printf %s "checking for HDF5 using automatic library list... " >&6; } ; # # re-define lib and inc dirs # @@ -13464,12 +14489,13 @@ $as_echo_n "checking for HDF5 using automatic library list... " >&6; } ; end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : hdf5=yes -else +else $as_nop hdf5=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # FCFLAGS="$save_fcflags" ; @@ -13483,13 +14509,13 @@ rm -f core conftest.err conftest.$ac_objext \ HDF5_LIBS="$try_HDF5_LIBS" ; HDF5_INCS="$try_HDF5_INCS" ; if test $IO_LIB_VER = "parallel"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 -$as_echo "yes - parallel lib found" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - parallel lib found" >&5 +printf "%s\n" "yes - parallel lib found" >&6; } ; HDF5_OPT="--enable-parallel" ; fi if test $IO_LIB_VER = "serial"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 -$as_echo "yes - serial lib found" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - serial lib found" >&5 +printf "%s\n" "yes - serial lib found" >&6; } ; HDF5_OPT="--disable-parallel" ; fi # AC_MSG_RESULT([yes]) ; @@ -13498,12 +14524,12 @@ $as_echo "yes - serial lib found" >&6; } ; # if test "x$hdf5" = xno; then if ! test "$with_hdf5_libs" = "internal" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 -$as_echo_n "checking for internal HDF5 library... " >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal HDF5 library" >&5 +printf %s "checking for internal HDF5 library... " >&6; }; internal_hdf5="yes" ; # NETCDF_VER="v4"; @@ -13523,8 +14549,8 @@ $as_echo_n "checking for internal HDF5 library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -13533,8 +14559,8 @@ $as_echo "already compiled" >&6; } ; #HDF5_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_fortran.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5_hl.a ${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a" ; HDF5_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lhdf5_hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5" ; HDF5_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -$as_echo "already compiled (using parallel version)" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +printf "%s\n" "already compiled (using parallel version)" >&6; } ; # else # @@ -13543,8 +14569,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; # fi # @@ -13601,50 +14627,58 @@ fi # Check whether --with-netcdf_libs was given. -if test "${with_netcdf_libs+set}" = set; then : +if test ${with_netcdf_libs+y} +then : withval=$with_netcdf_libs; fi # Check whether --with-netcdf_path was given. -if test "${with_netcdf_path+set}" = set; then : +if test ${with_netcdf_path+y} +then : withval=$with_netcdf_path; fi # Check whether --with-netcdf_libdir was given. -if test "${with_netcdf_libdir+set}" = set; then : +if test ${with_netcdf_libdir+y} +then : withval=$with_netcdf_libdir; fi # Check whether --with-netcdf_includedir was given. -if test "${with_netcdf_includedir+set}" = set; then : +if test ${with_netcdf_includedir+y} +then : withval=$with_netcdf_includedir; fi # # Check whether --with-netcdff_libs was given. -if test "${with_netcdff_libs+set}" = set; then : +if test ${with_netcdff_libs+y} +then : withval=$with_netcdff_libs; fi # Check whether --with-netcdff_path was given. -if test "${with_netcdff_path+set}" = set; then : +if test ${with_netcdff_path+y} +then : withval=$with_netcdff_path; fi # Check whether --with-netcdff_libdir was given. -if test "${with_netcdff_libdir+set}" = set; then : +if test ${with_netcdff_libdir+y} +then : withval=$with_netcdff_libdir; fi # Check whether --with-netcdff_includedir was given. -if test "${with_netcdff_includedir+set}" = set; then : +if test ${with_netcdff_includedir+y} +then : withval=$with_netcdff_includedir; fi @@ -13652,7 +14686,8 @@ fi # Large Databases Support (LFS) # # Check whether --enable-netcdf_classic was given. -if test "${enable_netcdf_classic+set}" = set; then : +if test ${enable_netcdf_classic+y} +then : enableval=$enable_netcdf_classic; fi @@ -13660,7 +14695,8 @@ fi # NETCDF PAR IO # # Check whether --enable-netcdf_par_io was given. -if test "${enable_netcdf_par_io+set}" = set; then : +if test ${enable_netcdf_par_io+y} +then : enableval=$enable_netcdf_par_io; fi @@ -13668,7 +14704,8 @@ fi # HDF5 support # # Check whether --enable-netcdf_v3 was given. -if test "${enable_netcdf_v3+set}" = set; then : +if test ${enable_netcdf_v3+y} +then : enableval=$enable_netcdf_v3; fi @@ -13676,7 +14713,8 @@ fi # HDF5 data compression # # Check whether --enable-hdf5_compression was given. -if test "${enable_hdf5_compression+set}" = set; then : +if test ${enable_hdf5_compression+y} +then : enableval=$enable_hdf5_compression; fi @@ -13684,7 +14722,8 @@ fi # NETCDF SHODOW FOR OUTPUT FILES # # Check whether --enable-netcdf_output was given. -if test "${enable_netcdf_output+set}" = set; then : +if test ${enable_netcdf_output+y} +then : enableval=$enable_netcdf_output; fi @@ -13720,10 +14759,10 @@ if test -d "$with_netcdf_path" || test -d "$with_netcdf_libdir" ; then # # external netcdf # - if test -d "$with_netcdf_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 -$as_echo_n "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; - elif test -d "$with_netcdf_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 -$as_echo_n "checking for NetCDF in $with_netcdf_path... " >&6; } ; + if test -d "$with_netcdf_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_libdir" >&5 +printf %s "checking for NetCDF in $with_netcdf_libdir... " >&6; } ; + elif test -d "$with_netcdf_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF in $with_netcdf_path" >&5 +printf %s "checking for NetCDF in $with_netcdf_path... " >&6; } ; fi # if test -d "$with_netcdf_path" ; then @@ -13768,15 +14807,15 @@ elif test x"$with_netcdf_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 -$as_echo_n "checking for NetCDF Library using $with_netcdf_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NetCDF Library using $with_netcdf_libs" >&5 +printf %s "checking for NetCDF Library using $with_netcdf_libs... " >&6; } if test -d "$with_netcdf_includedir" ; then try_NETCDF_INCS="$IFLAG$with_netcdf_includedir" ; fi if test -d "$with_netcdff_includedir" ; then try_NETCDFF_INCS="$IFLAG$with_netcdff_includedir" ; fi netcdf="yes"; try_NETCDF_LIBS="$with_netcdf_libs" ; try_NETCDFF_LIBS="$with_netcdff_libs" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # fi # @@ -13801,23 +14840,24 @@ if test x"$enable_hdf5" = "xno"; then nf_err = nf90_create('netcdf_test',nf90_share,ID) end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : netcdf=yes -else +else $as_nop netcdf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; NETCDF_INCS="$try_NETCDF_INCS" ; NETCDF_LIBS="$try_NETCDF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # FCFLAGS="$save_fcflags" ; @@ -13828,8 +14868,8 @@ $as_echo "no" >&6; } ; # # internal netcdf # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 -$as_echo_n "checking for internal NetCDF library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NetCDF library" >&5 +printf %s "checking for internal NetCDF library... " >&6; } # internal_netcdf="yes" # @@ -13855,22 +14895,22 @@ $as_echo_n "checking for internal NetCDF library... " >&6; } if test x"$enable_pnecdf" = "xyes"; then if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi else if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a"; then compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_netcdf="yes" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; fi fi # @@ -13905,12 +14945,13 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu end _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : netcdf=yes -else +else $as_nop netcdf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; # if test "x$netcdf" = "xyes"; then @@ -13918,8 +14959,8 @@ rm -f core conftest.err conftest.$ac_objext \ NETCDF_INCS="$try_NETCDF_INCS" ; NETCDFF_LIBS="$try_NETCDFF_LIBS" ; NETCDFF_INCS="$try_NETCDFF_INCS" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ; # fi # @@ -13927,11 +14968,11 @@ $as_echo "yes" >&6; } ; LIBS="$save_libs" ; # if test "x$netcdf" = "xno"; then - if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } ; fi + if test -d "$with_netcdf_libdir" || test -d "$with_netcdf_path" || test -d "$with_netcdff_libdir" || test -d "$with_netcdff_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 -$as_echo_n "checking for internal NETCDF library... " >&6; }; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal NETCDF library" >&5 +printf %s "checking for internal NETCDF library... " >&6; }; internal_netcdf="yes" ; # NETCDF_OPT="--enable-netcdf-4"; @@ -13952,8 +14993,8 @@ $as_echo_n "checking for internal NETCDF library... " >&6; }; if test -e "${NETCDF_HDF5_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PATH}/lib/libnetcdff.a" ; then # compile_netcdf="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; # elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # @@ -13965,8 +15006,8 @@ $as_echo "already compiled" >&6; } ; #NETCDFF_LIBS="${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" ; NETCDFF_LIBS="-L${NETCDF_HDF5_PAR_PATH}/lib/ -lnetcdff" ; NETCDFF_INCS="${IFLAG}${NETCDF_HDF5_PAR_PATH}/include" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 -$as_echo "already compiled (using parallel version)" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled (using parallel version)" >&5 +printf "%s\n" "already compiled (using parallel version)" >&6; } ; # else # @@ -13975,8 +15016,8 @@ $as_echo "already compiled (using parallel version)" >&6; } ; if test "$IO_LIB_VER" = "serial"; then HDF5_OPT="--disable-parallel" ; fi if test "$IO_LIB_VER" = "parallel"; then HDF5_OPT="--enable-parallel" ; fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ; # fi # @@ -14058,32 +15099,37 @@ fi # Check whether --enable-yaml_output was given. -if test "${enable_yaml_output+set}" = set; then : +if test ${enable_yaml_output+y} +then : enableval=$enable_yaml_output; fi # Check whether --with-yaml_libs was given. -if test "${with_yaml_libs+set}" = set; then : +if test ${with_yaml_libs+y} +then : withval=$with_yaml_libs; fi # Check whether --with-yaml_libdir was given. -if test "${with_yaml_libdir+set}" = set; then : +if test ${with_yaml_libdir+y} +then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_libdir was given. -if test "${with_yaml_libdir+set}" = set; then : +if test ${with_yaml_libdir+y} +then : withval=$with_yaml_libdir; fi # Check whether --with-yaml_includedir was given. -if test "${with_yaml_includedir+set}" = set; then : +if test ${with_yaml_includedir+y} +then : withval=$with_yaml_includedir; fi @@ -14091,25 +15137,29 @@ fi # Check whether --with-futile_libs was given. -if test "${with_futile_libs+set}" = set; then : +if test ${with_futile_libs+y} +then : withval=$with_futile_libs; fi # Check whether --with-futile_libdir was given. -if test "${with_futile_libdir+set}" = set; then : +if test ${with_futile_libdir+y} +then : withval=$with_futile_libdir; fi # Check whether --with-futile_libdir was given. -if test "${with_futile_libdir+set}" = set; then : +if test ${with_futile_libdir+y} +then : withval=$with_futile_libdir; fi # Check whether --with-futile_includedir was given. -if test "${with_futile_includedir+set}" = set; then : +if test ${with_futile_includedir+y} +then : withval=$with_futile_includedir; fi @@ -14132,10 +15182,10 @@ if test "x$enable_yaml" = "xyes" ; then # # external YAML # - if test -d "$with_yaml_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 -$as_echo_n "checking for YAML in $with_yaml_path... " >&6; } ; fi - if test -d "$with_yaml_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 -$as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi + if test -d "$with_yaml_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_path" >&5 +printf %s "checking for YAML in $with_yaml_path... " >&6; } ; fi + if test -d "$with_yaml_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML in $with_yaml_libdir" >&5 +printf %s "checking for YAML in $with_yaml_libdir... " >&6; } ; fi # if test -d "$with_yaml_path" ; then try_yaml_libdir_src=$with_yaml_path/src @@ -14154,55 +15204,55 @@ $as_echo_n "checking for YAML in $with_yaml_libdir... " >&6; } ; fi compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir_src" YAML_LIBS="$try_yaml_libdir_src/libyaml.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_yaml_libdir/libyaml.a && test -e $try_yaml_incdir/yaml_module.mod ; then compile_yaml="no" YAML_INCS="$IFLAG$try_yaml_incdir" YAML_LIBS="$try_yaml_libdir/libyaml.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_yaml_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 -$as_echo_n "checking for YAML Library using $with_yaml_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML Library using $with_yaml_libs" >&5 +printf %s "checking for YAML Library using $with_yaml_libs... " >&6; } compile_yaml="no" if test -d "$with_yaml_includedir" ; then YAML_INCS="$IFLAG$with_yaml_includedir" ; fi YAML_LIBS="$with_yaml_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$YAML_LIBS" = " "; then # # internal YAML # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 -$as_echo_n "checking for internal YAML library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal YAML library" >&5 +printf %s "checking for internal YAML library... " >&6; } internal_yaml="yes" YAML_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" YAML_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libyaml.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml_parse.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/yaml.h"; then compile_yaml="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } else compile_yaml="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 -$as_echo_n "checking for YAML library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for YAML library" >&5 +printf %s "checking for YAML library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -14226,10 +15276,10 @@ if test "x$enable_futile" = "xyes" ; then # # external FUTILE # - if test -d "$with_futile_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 -$as_echo_n "checking for FUTILE in $with_futile_path... " >&6; } ; fi - if test -d "$with_futile_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 -$as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi + if test -d "$with_futile_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_path" >&5 +printf %s "checking for FUTILE in $with_futile_path... " >&6; } ; fi + if test -d "$with_futile_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE in $with_futile_libdir" >&5 +printf %s "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi # if test -d "$with_futile_path" ; then try_futile_libdir_src=$with_futile_path/src @@ -14248,55 +15298,55 @@ $as_echo_n "checking for FUTILE in $with_futile_libdir... " >&6; } ; fi compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir_src" FUTILE_LIBS="$try_futile_libdir_src/libfutile-1.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_futile_libdir/libfutile-1.a && test -e $try_futile_incdir/futile_module.mod ; then compile_futile="no" FUTILE_INCS="$IFLAG$try_futile_incdir" FUTILE_LIBS="$try_futile_libdir/libfutile-1.a" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_futile_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 -$as_echo_n "checking for FUTILE Library using $with_futile_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE Library using $with_futile_libs" >&5 +printf %s "checking for FUTILE Library using $with_futile_libs... " >&6; } compile_futile="no" if test -d "$with_futile_includedir" ; then FUTILE_INCS="$IFLAG$with_futile_includedir" ; fi FUTILE_LIBS="$with_futile_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$FUTILE_LIBS" = " "; then # # internal FUTILE # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 -$as_echo_n "checking for internal FUTILE library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal FUTILE library" >&5 +printf %s "checking for internal FUTILE library... " >&6; } internal_futile="yes" FUTILE_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" FUTILE_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libfutile-1.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/futile.h"; then compile_futile="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } else compile_futile="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 -$as_echo_n "checking for FUTILE library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FUTILE library" >&5 +printf %s "checking for FUTILE library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # if test $enable_yaml = "yes" && test $enable_futile = "yes" ; then @@ -14322,33 +15372,38 @@ fi # # Check whether --enable-iotk was given. -if test "${enable_iotk+set}" = set; then : +if test ${enable_iotk+y} +then : enableval=$enable_iotk; -else +else $as_nop enable_iotk="yes" fi # Check whether --with-iotk_libs was given. -if test "${with_iotk_libs+set}" = set; then : +if test ${with_iotk_libs+y} +then : withval=$with_iotk_libs; fi # Check whether --with-iotk_path was given. -if test "${with_iotk_path+set}" = set; then : +if test ${with_iotk_path+y} +then : withval=$with_iotk_path; fi # Check whether --with-iotk_libdir was given. -if test "${with_iotk_libdir+set}" = set; then : +if test ${with_iotk_libdir+y} +then : withval=$with_iotk_libdir; fi # Check whether --with-iotk_includedir was given. -if test "${with_iotk_includedir+set}" = set; then : +if test ${with_iotk_includedir+y} +then : withval=$with_iotk_includedir; fi @@ -14369,10 +15424,10 @@ if test "x$enable_iotk" = "xyes" ; then # # external IOTK # - if test -d "$with_iotk_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 -$as_echo_n "checking for IOTK in $with_iotk_path... " >&6; } ; fi - if test -d "$with_iotk_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 -$as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi + if test -d "$with_iotk_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_path" >&5 +printf %s "checking for IOTK in $with_iotk_path... " >&6; } ; fi + if test -d "$with_iotk_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK in $with_iotk_libdir" >&5 +printf %s "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi # if test -d "$with_iotk_path" ; then try_iotk_libdir_src=$with_iotk_path/src @@ -14393,39 +15448,39 @@ $as_echo_n "checking for IOTK in $with_iotk_libdir... " >&6; } ; fi IOTK_INCS="$IFLAG$try_iotk_incdir_src" #IOTK_LIBS="$try_iotk_libdir_src/libiotk.a" IOTK_LIBS="-L$try_iotk_libdir_src/ -liotk" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test -r $try_iotk_libdir/libiotk.a && test -e $try_iotk_incdir/iotk_module.mod ; then compile_p2y="yes" compile_iotk="no" IOTK_INCS="$IFLAG$try_iotk_incdir" #IOTK_LIBS="$try_iotk_libdir/libiotk.a" IOTK_LIBS="-L$try_iotk_libdir/ -liotk" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 -$as_echo "no. Fallback to internal library." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no. Fallback to internal library." >&5 +printf "%s\n" "no. Fallback to internal library." >&6; } fi elif test x"$with_iotk_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 -$as_echo_n "checking for IOTK Library using $with_iotk_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK Library using $with_iotk_libs" >&5 +printf %s "checking for IOTK Library using $with_iotk_libs... " >&6; } compile_p2y="yes" compile_iotk="no" if test -d "$with_iotk_includedir" ; then IOTK_INCS="$IFLAG$with_iotk_includedir" ; fi IOTK_LIBS="$with_iotk_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi if test "$IOTK_LIBS" = " "; then # # internal IOTK # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 -$as_echo_n "checking for internal IOTK library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal IOTK library" >&5 +printf %s "checking for internal IOTK library... " >&6; } internal_iotk="yes" compile_p2y="yes" IOTK_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include/" @@ -14434,14 +15489,14 @@ $as_echo_n "checking for internal IOTK library... " >&6; } if ! test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libiotk.a" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_base.mod" || ! test -e "${extlibs_path}/${FCKIND}/${FC}/include/iotk_specials.h"; then compile_iotk="yes" if test ! -d lib ; then mkdir lib ; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } ac_config_files="$ac_config_files lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" else compile_iotk="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } fi fi # @@ -14457,10 +15512,10 @@ $as_echo "already compiled" >&6; } else PW_VER="no support" PW_CPP="" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 -$as_echo_n "checking for IOTK library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IOTK library" >&5 +printf %s "checking for IOTK library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # # @@ -14480,33 +15535,38 @@ fi # Check whether --enable-etsf_io was given. -if test "${enable_etsf_io+set}" = set; then : +if test ${enable_etsf_io+y} +then : enableval=$enable_etsf_io; -else +else $as_nop enable_etsf_io="no" fi # Check whether --with-etsf_io_libs was given. -if test "${with_etsf_io_libs+set}" = set; then : +if test ${with_etsf_io_libs+y} +then : withval=$with_etsf_io_libs; fi # Check whether --with-etsf_io_path was given. -if test "${with_etsf_io_path+set}" = set; then : +if test ${with_etsf_io_path+y} +then : withval=$with_etsf_io_path; fi # Check whether --with-etsf_io_libdir was given. -if test "${with_etsf_io_libdir+set}" = set; then : +if test ${with_etsf_io_libdir+y} +then : withval=$with_etsf_io_libdir; fi # Check whether --with-etsf_io_includedir was given. -if test "${with_etsf_io_includedir+set}" = set; then : +if test ${with_etsf_io_includedir+y} +then : withval=$with_etsf_io_includedir; fi @@ -14533,10 +15593,10 @@ if test "x$enable_etsf_io" = "xyes" ; then # # external ETSF_IO # - if test -d "$with_etsf_io_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 -$as_echo_n "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi - if test -d "$with_etsf_io_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 -$as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi + if test -d "$with_etsf_io_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_path" >&5 +printf %s "checking for ETSF_IO in $with_etsf_io_path... " >&6; } ; fi + if test -d "$with_etsf_io_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO in $with_etsf_io_libdir" >&5 +printf %s "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi # if test -d "$with_etsf_io_path" ; then try_etsf_libdir=$with_etsf_io_path/lib @@ -14555,50 +15615,50 @@ $as_echo_n "checking for ETSF_IO in $with_etsf_io_libdir... " >&6; } ; fi ETSF_LIBS="$try_etsf_libdir/libetsf_io.a" ETSF_INCS="$IFLAG$try_etsf_incdir" # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi elif test x"$with_etsf_io_libs" != "x" ; then # # directly provided lib # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 -$as_echo_n "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library using $with_etsf_io_libs" >&5 +printf %s "checking for ETSF_IO Library using $with_etsf_io_libs... " >&6; } internal_etsf="no" compile_e2y="yes" if test -d "$with_etsf_io_includedir" ; then ETSF_INCS="$IFLAG$with_etsf_io_includedir" ; fi ETSF_LIBS="$with_etsf_io_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else # # internal ETSF_IO # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 -$as_echo_n "checking for internal ETSF_IO Library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal ETSF_IO Library" >&5 +printf %s "checking for internal ETSF_IO Library... " >&6; } internal_etsf="yes" compile_e2y="yes" ETSF_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/include" ETSF_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libetsf_io.a"; then compile_etsf="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 -$as_echo "found already compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found already compiled" >&5 +printf "%s\n" "found already compiled" >&6; } else compile_etsf="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 -$as_echo "to be compiled" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: to be compiled" >&5 +printf "%s\n" "to be compiled" >&6; } fi fi # else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 -$as_echo_n "checking for ETSF_IO Library... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ETSF_IO Library" >&5 +printf %s "checking for ETSF_IO Library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # @@ -14614,25 +15674,29 @@ fi # Check whether --with-libxc_libs was given. -if test "${with_libxc_libs+set}" = set; then : +if test ${with_libxc_libs+y} +then : withval=$with_libxc_libs; fi # Check whether --with-libxc_path was given. -if test "${with_libxc_path+set}" = set; then : +if test ${with_libxc_path+y} +then : withval=$with_libxc_path; fi # Check whether --with-libxc_libdir was given. -if test "${with_libxc_libdir+set}" = set; then : +if test ${with_libxc_libdir+y} +then : withval=$with_libxc_libdir; fi # Check whether --with-libxc_includedir was given. -if test "${with_libxc_includedir+set}" = set; then : +if test ${with_libxc_includedir+y} +then : withval=$with_libxc_includedir; fi @@ -14645,8 +15709,8 @@ compile_libxc="no" acx_libxc_save_LIBS="$LIBS" acx_libxc_save_FCFLAGS="$FCFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 -$as_echo_n "checking for libxc... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5 +printf %s "checking for libxc... " >&6; } testprog=" program main @@ -14666,10 +15730,11 @@ if test ! -z "$LIBXC_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -14699,10 +15764,11 @@ if test x"$acx_libxc_ok" = xno ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext # if dynamic / user provided linkage did not work, try static one @@ -14712,10 +15778,11 @@ rm -f core conftest.err conftest.$ac_objext \ cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi fi @@ -14793,66 +15860,71 @@ if test x"$acx_libxc_ok" = xyes; then cat > conftest.$ac_ext <<_ACEOF $testprog_11 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=110, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_12 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=120, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_20 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=200, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_203 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=203, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_21 _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=210, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_4x _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=400, acx_libxc_ok=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext cat > conftest.$ac_ext <<_ACEOF $testprog_5x _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libxc_version=5, acx_libxc_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -cat >>confdefs.h <<_ACEOF -#define LIBXC_VERSION $acx_libxc_version -_ACEOF +printf "%s\n" "#define LIBXC_VERSION $acx_libxc_version" >>confdefs.h -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 -$as_echo "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found external LibXC version=$acx_libxc_version (should be 5)" >&5 +printf "%s\n" "Found external LibXC version=$acx_libxc_version (should be 5)" >&6; } fi if test x"$acx_libxc_ok" = xyes; then @@ -14860,7 +15932,7 @@ if test x"$acx_libxc_ok" = xyes; then internal_libxc=no # -$as_echo "#define HAVE_LIBXC 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBXC 1" >>confdefs.h fi @@ -14873,12 +15945,12 @@ if test x"$acx_libxc_ok" = xno; then LIBXC_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxc.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libxcf90.a" && test -e ${extlibs_path}/${FCKIND}/${FC}/lib/libxcf03.a; then compile_libxc="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 -$as_echo "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Found internal already compiled." >&5 +printf "%s\n" "Compatible external LibXC not found/specified. Found internal already compiled." >&6; } else compile_libxc="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 -$as_echo "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external LibXC not found/specified. Internal to be compiled." >&5 +printf "%s\n" "Compatible external LibXC not found/specified. Internal to be compiled." >&6; } fi fi @@ -14895,42 +15967,48 @@ LIBS="$acx_libxc_save_LIBS" # Check whether --with-cuda_libs was given. -if test "${with_cuda_libs+set}" = set; then : +if test ${with_cuda_libs+y} +then : withval=$with_cuda_libs; fi # Check whether --with-cuda_incs was given. -if test "${with_cuda_incs+set}" = set; then : +if test ${with_cuda_incs+y} +then : withval=$with_cuda_incs; fi # # Check whether --with-cuda_libdir was given. -if test "${with_cuda_libdir+set}" = set; then : +if test ${with_cuda_libdir+y} +then : withval=$with_cuda_libdir; fi # Check whether --with-cuda_includedir was given. -if test "${with_cuda_includedir+set}" = set; then : +if test ${with_cuda_includedir+y} +then : withval=$with_cuda_includedir; fi # # Check whether --with-cuda_path was given. -if test "${with_cuda_path+set}" = set; then : +if test ${with_cuda_path+y} +then : withval=$with_cuda_path; fi # # Check whether --enable-cuda-libs-check was given. -if test "${enable_cuda_libs_check+set}" = set; then : +if test ${enable_cuda_libs_check+y} +then : enableval=$enable_cuda_libs_check; -else +else $as_nop enable_cuda_libs_check=yes fi @@ -14992,65 +16070,69 @@ FCFLAGS="$LIBCUDA_INCS $acx_libcuda_save_FCFLAGS" # set from environment variable, if not blank if test ! -z "$CUDA_LIBS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from environment" >&5 -$as_echo_n "checking for libcuda from environment... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from environment" >&5 +printf %s "checking for libcuda from environment... " >&6; } LIBCUDA_LIBS="$CUDA_LIBS" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # set from --with-cuda-libs flag if test x"$acx_libcuda_ok" = xno && test ! -z "$with_cuda_libs" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from --with-cuda-libs" >&5 -$as_echo_n "checking for libcuda from --with-cuda-libs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from --with-cuda-libs" >&5 +printf %s "checking for libcuda from --with-cuda-libs... " >&6; } LIBCUDA_LIBS="$with_cuda_libs" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # dynamic linkage, separate Fortran interface if test x"$acx_libcuda_ok" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcuda from specified libcuda path, dynamic" >&5 -$as_echo_n "checking for libcuda from specified libcuda path, dynamic... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcuda from specified libcuda path, dynamic" >&5 +printf %s "checking for libcuda from specified libcuda path, dynamic... " >&6; } LIBCUDA_LIBS="-L$libcuda_libdir -lcufft -lcusolver -lcublas -lcudart -lcuda" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # static linkage, separate Fortran interface if test x"$acx_libcuda_ok" = xno; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking static" >&5 -$as_echo_n "checking static... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking static" >&5 +printf %s "checking static... " >&6; } LIBCUDA_LIBS="$libcuda_libdir/libcuda.a" LIBS="$LIBCUDA_LIBS" cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_libcuda_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15060,13 +16142,13 @@ if test x"$acx_libcuda_ok" = xyes; then internal_libcuda=no # -$as_echo "#define HAVE_LIBCUDA 1" >>confdefs.h +printf "%s\n" "#define HAVE_LIBCUDA 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes." >&5 -$as_echo "yes." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes." >&5 +printf "%s\n" "yes." >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found." >&5 -$as_echo "not found." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found." >&5 +printf "%s\n" "not found." >&6; } use_libcuda=no compile_libcuda=no internal_libcuda=no @@ -15123,9 +16205,10 @@ LIBS="$acx_libcuda_save_LIBS" # # Check whether --with-cuda-cc was given. -if test "${with_cuda_cc+set}" = set; then : +if test ${with_cuda_cc+y} +then : withval=$with_cuda_cc; -else +else $as_nop with_cuda_cc=70 fi @@ -15204,77 +16287,88 @@ fi # Check whether --with-cuda-runtime was given. -if test "${with_cuda_runtime+set}" = set; then : +if test ${with_cuda_runtime+y} +then : withval=$with_cuda_runtime; -else - with_cuda_runtime=10.1 +else $as_nop + with_cuda_runtime=none fi # # Check whether --with-cuda-int-libs was given. -if test "${with_cuda_int_libs+set}" = set; then : +if test ${with_cuda_int_libs+y} +then : withval=$with_cuda_int_libs; -else +else $as_nop with_cuda_int_libs=cufft,cublas,cusolver fi # # Check whether --enable-nvtx was given. -if test "${enable_nvtx+set}" = set; then : +if test ${enable_nvtx+y} +then : enableval=$enable_nvtx; -else +else $as_nop enable_nvtx="no" fi # # Check whether --with-gpu_libs was given. -if test "${with_gpu_libs+set}" = set; then : +if test ${with_gpu_libs+y} +then : withval=$with_gpu_libs; fi # Check whether --with-gpu_incs was given. -if test "${with_gpu_incs+set}" = set; then : +if test ${with_gpu_incs+y} +then : withval=$with_gpu_incs; fi # # Check whether --with-rocm_libs was given. -if test "${with_rocm_libs+set}" = set; then : +if test ${with_rocm_libs+y} +then : withval=$with_rocm_libs; fi # Check whether --with-rocm_incs was given. -if test "${with_rocm_incs+set}" = set; then : +if test ${with_rocm_incs+y} +then : withval=$with_rocm_incs; fi # Check whether --with-rocm_libdir was given. -if test "${with_rocm_libdir+set}" = set; then : +if test ${with_rocm_libdir+y} +then : withval=$with_rocm_libdir; fi # Check whether --with-rocm_includedir was given. -if test "${with_rocm_includedir+set}" = set; then : +if test ${with_rocm_includedir+y} +then : withval=$with_rocm_includedir; fi # Check whether --with-rocm_path was given. -if test "${with_rocm_path+set}" = set; then : +if test ${with_rocm_path+y} +then : withval=$with_rocm_path; fi # # Check whether --with-mklgpu_libs was given. -if test "${with_mklgpu_libs+set}" = set; then : +if test ${with_mklgpu_libs+y} +then : withval=$with_mklgpu_libs; fi @@ -15336,23 +16430,33 @@ if test x"$with_rocm_incs" != x"" ; then LIBROCM_INCS="$with_rocm_incs" ; fi if test x"$with_mklgpu_libs" != x"" ; then MKLGPU_LIBS="$with_mklgpu_libs" ; fi # Cuda Fortran +PETSC_FLAGS=" " if test x"$enable_cuda_fortran" != "xno" ; then # def_gpu="-D_GPU -D_CUDA -D_CUDAF" # # Flags to be passed to the devicexlib library # - DEVXLIB_FLAGS="--enable-openmp --enable-cuda-fortran --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime}" + DEVXLIB_FLAGS="--enable-openmp --enable-cuda-fortran --with-cuda-cc=${with_cuda_cc}" + if test "x$with_cuda_runtime" != "xnone" ; then + DEVXLIB_FLAGS+=" --with-cuda-runtime=${with_cuda_runtime}" + fi # case "${FCVERSION}" in *nvfortran*) - GPU_FLAGS="-cuda -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + GPU_FLAGS="-cuda -gpu=cc${with_cuda_cc}" + if test "x$with_cuda_runtime" != "xnone" ; then + GPU_FLAGS+=" -gpu=cuda${with_cuda_runtime}"; + fi if test x"$use_int_cuda_libs" = "xyes" ; then GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; fi ;; *) - GPU_FLAGS="-Mcuda=cc${with_cuda_cc},cuda${with_cuda_runtime}" + GPU_FLAGS="-Mcuda=cc${with_cuda_cc}" + if test "x$with_cuda_runtime" != "xnone" ; then + GPU_FLAGS+=" -gpu=cuda${with_cuda_runtime}" + fi if test x"$use_int_cuda_libs" = "xyes" ; then GPU_FLAGS+=" -Mcudalib=${with_cuda_int_libs}" fi @@ -15369,11 +16473,12 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 -$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; } -if ${ac_cv_fc_srcext_f90+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5 +printf %s "checking for Fortran flag to compile .f90 files... " >&6; } +if test ${ac_cv_fc_srcext_f90+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= @@ -15389,17 +16494,18 @@ for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : ac_cv_fc_srcext_f90=$ac_flag; break fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 -$as_echo "$ac_cv_fc_srcext_f90" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 +printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else @@ -15419,32 +16525,35 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - as_CACHEVAR=`$as_echo "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 -$as_echo_n "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else + as_CACHEVAR=`printf "%s\n" "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 +printf %s "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop ax_check_save_flags=$FCFLAGS FCFLAGS="$FCFLAGS $GPU_FLAGS" cat > conftest.$ac_ext <<_ACEOF MODULE test; use cudafor; END MODULE _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : eval "$as_CACHEVAR=yes" -else +else $as_nop eval "$as_CACHEVAR=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext FCFLAGS=$ax_check_save_flags fi eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : have_cudafor=yes -else +else $as_nop have_cudafor=no fi @@ -15481,14 +16590,17 @@ if test x"$enable_openacc" != "xno" ; then case "${FCVERSION}" in *nvfortran*) DEVXLIB_FLAGS+="--enable-openmp" - GPU_FLAGS="-acc=gpu,multicore -acclibs -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime} " # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + GPU_FLAGS="-acc=gpu,multicore -acclibs -gpu=cc${with_cuda_cc}" + if test "x$with_cuda_runtime" != "xnone" ; then + GPU_FLAGS+=" -gpu=cuda${with_cuda_runtime}" + fi if test x"$use_int_cuda_libs" = "xyes" ; then GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; fi ;; *pgfortran*) DEVXLIB_FLAGS+="--enable-openmp" - GPU_FLAGS="-acc -acclibs -ta=tesla:cc${with_cuda_cc} " # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" + GPU_FLAGS="-acc -acclibs -ta=tesla:cc${with_cuda_cc} " if test x"$use_int_cuda_libs" = "xyes" ; then GPU_FLAGS+=" -cudalib=${with_cuda_int_libs}"; fi @@ -15497,7 +16609,6 @@ if test x"$enable_openacc" != "xno" ; then GPU_FLAGS="-fopenacc -foffload=-lm -foffload=-lgfortran" # -foffload=nvptx-none # -foffload=amdgcn-amdhsa -foffload=-march=gfx908 - # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime} esac # fi @@ -15509,8 +16620,8 @@ if test x"$enable_openmp5" != "xno" ; then # Flags to be passed to the devicexlib library # def_gpu="-D_GPU -D_OPENMP_GPU" - GPU_FLAGS="-fopenmp" # -gpu=cc${with_cuda_cc},cuda${with_cuda_runtime}" - DEVXLIB_FLAGS="--enable-openmp5" # --with-cuda-cc=${with_cuda_cc} --with-cuda-runtime=${with_cuda_runtime}" + GPU_FLAGS="-fopenmp" + DEVXLIB_FLAGS="--enable-openmp5" if test x"$LIBROCM_LIBS" != "x" ; then DEVXLIB_FLAGS+=" --enable-rocblas --with-rocm-libs=$LIBROCM_LIBS"; def_gpu="$def_gpu -D_HIP" @@ -15537,6 +16648,7 @@ fi + # # ============================================================================ @@ -15546,34 +16658,39 @@ fi # Check whether --with-devxlib_libs was given. -if test "${with_devxlib_libs+set}" = set; then : +if test ${with_devxlib_libs+y} +then : withval=$with_devxlib_libs; fi # Check whether --with-devxlib_path was given. -if test "${with_devxlib_path+set}" = set; then : +if test ${with_devxlib_path+y} +then : withval=$with_devxlib_path; fi # Check whether --with-devxlib_libdir was given. -if test "${with_devxlib_libdir+set}" = set; then : +if test ${with_devxlib_libdir+y} +then : withval=$with_devxlib_libdir; fi # Check whether --with-devxlib_includedir was given. -if test "${with_devxlib_includedir+set}" = set; then : +if test ${with_devxlib_includedir+y} +then : withval=$with_devxlib_includedir; fi # Check whether --with-devxlib-branch was given. -if test "${with_devxlib_branch+set}" = set; then : +if test ${with_devxlib_branch+y} +then : withval=$with_devxlib_branch; -else +else $as_nop with_devxlib_branch=none fi @@ -15598,8 +16715,8 @@ acx_devxlib_save_LIBS="$LIBS" acx_devxlib_save_FCFLAGS="$FCFLAGS" #This is fake, it is always going to fail -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for devxlib" >&5 -$as_echo_n "checking for devxlib... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for devxlib" >&5 +printf %s "checking for devxlib... " >&6; } testprog=" program main @@ -15618,10 +16735,11 @@ if test ! -z "$DEVXLIB_LIBS"; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15632,10 +16750,11 @@ if test x"$acx_devxlib_ok" = xno && test ! -z "$with_devxlib_libs" ; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15646,10 +16765,11 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15660,10 +16780,11 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15674,10 +16795,11 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15688,10 +16810,11 @@ if test x"$acx_devxlib_ok" = xno; then cat > conftest.$ac_ext <<_ACEOF $testprog _ACEOF -if ac_fn_fc_try_link "$LINENO"; then : +if ac_fn_fc_try_link "$LINENO" +then : acx_devxlib_ok=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi @@ -15701,7 +16824,7 @@ if test x"$acx_devxlib_ok" = xyes; then internal_devxlib=no # -$as_echo "#define HAVE_DEVXLIB 1" >>confdefs.h +printf "%s\n" "#define HAVE_DEVXLIB 1" >>confdefs.h fi @@ -15712,8 +16835,8 @@ if test x"$acx_devxlib_ok" = xno; then DEVXLIB_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/include" if test -e "${extlibs_path}/${FCKIND}/${FC}/${GPU_SUPPORT}/lib/libdevXlib.a"; then compile_devxlib="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Found internal already compiled." >&5 -$as_echo "Compatible external DevXlib not found/specified. Found internal already compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Found internal already compiled." >&5 +printf "%s\n" "Compatible external DevXlib not found/specified. Found internal already compiled." >&6; } else if test x"$with_devxlib_branch" = "xnone"; then DEVXLIB_info="(devxlib tarball)" @@ -15721,8 +16844,8 @@ $as_echo "Compatible external DevXlib not found/specified. Found internal alread DEVXLIB_info="(devxlib $with_devxlib_branch branch)" fi compile_devxlib="yes" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Internal to be compiled." >&5 -$as_echo "Compatible external DevXlib not found/specified. Internal to be compiled." >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external DevXlib not found/specified. Internal to be compiled." >&5 +printf "%s\n" "Compatible external DevXlib not found/specified. Internal to be compiled." >&6; } fi fi FCFLAGS="$acx_devxlib_save_FCFLAGS" @@ -15743,38 +16866,44 @@ LIBS="$acx_devxlib_save_LIBS" # # Check whether --enable-magma was given. -if test "${enable_magma+set}" = set; then : +if test ${enable_magma+y} +then : enableval=$enable_magma; fi # # Check whether --with-magma_libs was given. -if test "${with_magma_libs+set}" = set; then : +if test ${with_magma_libs+y} +then : withval=$with_magma_libs; fi # Check whether --with-magma_incs was given. -if test "${with_magma_incs+set}" = set; then : +if test ${with_magma_incs+y} +then : withval=$with_magma_incs; fi # Check whether --with-magma_path was given. -if test "${with_magma_path+set}" = set; then : +if test ${with_magma_path+y} +then : withval=$with_magma_path; fi # Check whether --with-magma_libdir was given. -if test "${with_magma_libdir+set}" = set; then : +if test ${with_magma_libdir+y} +then : withval=$with_magma_libdir; fi # Check whether --with-magma_includedir was given. -if test "${with_magma_includedir+set}" = set; then : +if test ${with_magma_includedir+y} +then : withval=$with_magma_includedir; fi @@ -15811,12 +16940,12 @@ if test -d "$with_magma_path" || test -d "$with_magma_libdir" || test x"$with_ma # # external magma # - if test x"$with_magma_libs" != "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 -$as_echo_n "checking for Magma using $with_magma_libs... " >&6; } ; - elif test -d "$with_magma_libdir" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 -$as_echo_n "checking for Magma in $with_magma_libdir... " >&6; } ; - elif test -d "$with_magma_path" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path/lib" >&5 -$as_echo_n "checking for Magma in $with_magma_path/lib... " >&6; } ; + if test x"$with_magma_libs" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma using $with_magma_libs" >&5 +printf %s "checking for Magma using $with_magma_libs... " >&6; } ; + elif test -d "$with_magma_libdir" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_libdir" >&5 +printf %s "checking for Magma in $with_magma_libdir... " >&6; } ; + elif test -d "$with_magma_path" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Magma in $with_magma_path/lib" >&5 +printf %s "checking for Magma in $with_magma_path/lib... " >&6; } ; fi # if test -d "$with_magma_path" ; then @@ -15858,12 +16987,13 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu !magma_devptr_t :: dA end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : magmaf=yes -else +else $as_nop magmaf=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # # check for c-style magma cat > conftest.$ac_ext <<_ACEOF @@ -15872,15 +17002,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; ierr = magma_init(); end _ACEOF -if ac_fn_fc_try_compile "$LINENO"; then : +if ac_fn_fc_try_compile "$LINENO" +then : magmac=yes -else +else $as_nop magmac=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Library: $magmac; Fortran support: $magmaf" >&5 -$as_echo "Library: $magmac; Fortran support: $magmaf" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Library: $magmac; Fortran support: $magmaf" >&5 +printf "%s\n" "Library: $magmac; Fortran support: $magmaf" >&6; } ; # if test "x$magmaf" = "xyes"; then # @@ -15920,8 +17051,8 @@ if test "x$enable_magma" = "xyes" && test "x$magma" = "xno" ; then # # internal magma # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 -$as_echo_n "checking for internal Magma library... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for internal Magma library" >&5 +printf %s "checking for internal Magma library... " >&6; } # internal_magma="yes" # @@ -15938,13 +17069,13 @@ $as_echo_n "checking for internal Magma library... " >&6; } if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.a" ; then compile_magma="no" ; compile_magma_fmodules="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; elif test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libmagma.so" ; then compile_magma="no" ; compile_magma_fmodules="no" ; - { $as_echo "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 -$as_echo "already compiled" >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 +printf "%s\n" "already compiled" >&6; } ; else compile_magma="yes" ; compile_magma_fmodules="no" ; @@ -15956,8 +17087,8 @@ $as_echo "already compiled" >&6; } ; if test "$with_cuda_cc" -ge 80 && ! test "$with_cuda_cc" -ge 90 ; then NVIDIA_ARCH=Hopper ; fi fi # - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 -$as_echo "Compatible external Magma not found/specified. To be compiled." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Compatible external Magma not found/specified. To be compiled." >&5 +printf "%s\n" "Compatible external Magma not found/specified. To be compiled." >&6; } ; ac_config_files="$ac_config_files lib/magma/make_magma.inc:lib/magma/make_magma.inc.in" @@ -15970,8 +17101,8 @@ fi # deactivate_internal=no if test "x$compile_magma" = "xyes" && test "x$internal_magma" = "xyes" && test "x$deactivate_internal" = "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 -$as_echo "Internal Magma compilation not available yet. Deactivating it." >&6; } ; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Internal Magma compilation not available yet. Deactivating it." >&5 +printf "%s\n" "Internal Magma compilation not available yet. Deactivating it." >&6; } ; compile_magma="no" def_magma="" enable_magma="no" @@ -16094,6 +17225,13 @@ if test "$internal_slk" = "yes" ; then if test "$compile_slk" = "no" ; then SLK_check="I"; fi fi # +ELPA_check="-" +if test "$enable_elpa" = "yes" ; then ELPA_check="E"; fi +if test "$internal_elpa" = "yes" ; then + if test "$compile_elpa" = "yes"; then ELPA_check="C"; fi + if test "$compile_elpa" = "no" ; then ELPA_check="I"; fi +fi +# BLACS_check="-" if test "$enable_scalapack" = "yes" ; then BLACS_check="E"; fi if test "$internal_blacs" = "yes" ; then @@ -16102,19 +17240,21 @@ if test "$internal_blacs" = "yes" ; then fi # PETSC_check="-" +PETSC_info="" if test "$internal_petsc" = "yes" ; then if test "$compile_petsc" = "yes" ; then PETSC_check="C"; fi if test "$compile_petsc" = "no" ; then PETSC_check="I"; fi - if ! test "$with_petsc_branch" = "none"; then PETSC_LIBS="$PETSC_LIBS (git branch $with_petsc_branch)"; fi + if ! test "$with_petsc_branch" = "none"; then PETSC_info="(git branch $with_petsc_branch)"; fi elif test "$enable_petsc" = "yes" ; then PETSC_check="E" fi # SLEPC_check="-" +SLEPC_info="" if test "$internal_slepc" = "yes" ; then if test "$compile_slepc" = "yes" ; then SLEPC_check="C"; fi if test "$compile_slepc" = "no" ; then SLEPC_check="I"; fi - if ! test "$with_slepc_branch" = "none"; then SLEPC_LIBS="$SLEPC_LIBS (git branch $with_slepc_branch)"; fi + if ! test "$with_slepc_branch" = "none"; then SLEPC_info="(git branch $with_slepc_branch)"; fi elif test "$enable_slepc" = "yes" ; then SLEPC_check="E" fi @@ -16216,6 +17356,9 @@ fi + + + # @@ -16230,6 +17373,29 @@ fi # STRIPE [LIB] from paths # +TMP1=`echo $YDIAGO_LIBS | sed 's/\//+/g'` +TMP2=`echo $compdir | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(CMP\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +YDIAGO_LIBS_R=$STRIPE + +TMP1=`echo $YDIAGO_INCS | sed 's/\//+/g'` +TMP2=`echo $compdir | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(CMP\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +YDIAGO_INCS_R=$STRIPE + + +# + TMP1=`echo $IOTK_LIBS | sed 's/\//+/g'` TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` @@ -16481,6 +17647,29 @@ fi SCALAPACK_INCS_R=$STRIPE +# + +TMP1=`echo $ELPA_LIBS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("LIB")" +fi + +ELPA_LIBS_R=$STRIPE + +TMP1=`echo $ELPA_INCS | sed 's/\//+/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` +STRIPE=`echo $TMP3 | sed 's/+/\//g'` +if [ -z "${1// }" ]; then + STRIPE="$STRIPE ("INC")" +fi + +ELPA_INCS_R=$STRIPE + + # TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` @@ -16749,8 +17938,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -16780,15 +17969,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -16802,8 +17991,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -16820,7 +18009,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -16836,8 +18025,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -16860,14 +18049,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -16877,46 +18068,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -16925,13 +18116,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -16940,8 +18124,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -16953,30 +18141,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -16989,13 +18157,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -17022,18 +18191,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -17045,12 +18216,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -17081,7 +18253,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -17103,6 +18275,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -17116,6 +18292,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -17157,7 +18339,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -17166,7 +18348,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17228,8 +18410,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23931 h.89a5070b8, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by Yambo $as_me 5.3.0 r.24360 h.b6d7db7b8d, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -17287,14 +18469,16 @@ $config_headers Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23931 h.89a5070b8 -configured by $0, generated by GNU Autoconf 2.69, +Yambo config.status 5.3.0 r.24360 h.b6d7db7b8d +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -17331,15 +18515,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -17347,7 +18531,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -17356,7 +18540,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -17384,7 +18568,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -17398,7 +18582,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -17411,6 +18595,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "lib/ydiago/make_ydiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" ;; "lib/fftqe/c_defs.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" ;; "lib/fftqe/fftqe_defs.h") CONFIG_FILES="$CONFIG_FILES lib/fftqe/fftqe_defs.h:lib/fftqe/fftqe_defs.h.in" ;; "lib/iotk/make_iotk.inc") CONFIG_FILES="$CONFIG_FILES lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" ;; @@ -17439,8 +18624,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -17776,7 +18961,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -17784,17 +18969,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -17811,7 +18996,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -17835,9 +19020,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -17890,8 +19075,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -17933,9 +19118,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -17951,20 +19136,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -18005,8 +19190,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # @@ -18148,3 +19333,4 @@ cat config/report if test "x$enable_ydb" = "xyes"; then cat config/msg_ydb fi + diff --git a/include/version/version.m4 b/include/version/version.m4 index 541eca0333..5935e80ddb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24303 h.eb0574eae8, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24360 h.b6d7db7b8d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24303" -SHASH="eb0574eae8" +SREVISION="24360" +SHASH="b6d7db7b8d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 8e850783fadb110b5c1f899c21989dcdcc4e655c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 09:34:01 +0200 Subject: [PATCH 0923/1367] Addressed comment in https://gitlab.com/lumen-code/lumen/-/merge_requests/200 --- src/hamiltonian/Apply_W_field.F | 2 +- src/hamiltonian/Build_W_operator.F | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/hamiltonian/Apply_W_field.F b/src/hamiltonian/Apply_W_field.F index 782d6df894..8480a9ea31 100644 --- a/src/hamiltonian/Apply_W_field.F +++ b/src/hamiltonian/Apply_W_field.F @@ -28,7 +28,7 @@ subroutine Apply_W_field(A_input,Wk,H_nl_sc) !$omp parallel do default(shared), private(i1,id) do i1=H_ref_bands(1),H_ref_bands(2) do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))- & + H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) enddo enddo diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 566122233f..9cf55d06e6 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -126,13 +126,4 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) enddo !$omp end parallel do ! - !$omp parallel do default(shared), private(i1,id) - do i1=H_ref_bands(1),H_ref_bands(2) - do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & - & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) - enddo - enddo - !$omp end parallel do - ! end subroutine Build_W_operator From 1b8b729e5c68e7063206615993f11bea10c67fd6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 12:22:56 +0200 Subject: [PATCH 0924/1367] Version 5.3.0, Revision 24366, Hash c003ccf34b MODIFIED * configure include/version/version.m4 bse/DOUBLE_project.dep NEW * lib/magma_fmodules/DOUBLE_project.dep Changes: - updated .dep files Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- lib/magma_fmodules/DOUBLE_project.dep | 7 +++++++ src/bse/DOUBLE_project.dep | 3 +-- 4 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 lib/magma_fmodules/DOUBLE_project.dep diff --git a/configure b/configure index 1e4733d234..4955337533 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24360 h.b6d7db7b8d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24366 h.c003ccf34b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24360 h.b6d7db7b8d' -PACKAGE_STRING='Yambo 5.3.0 r.24360 h.b6d7db7b8d' +PACKAGE_VERSION='5.3.0 r.24366 h.c003ccf34b' +PACKAGE_STRING='Yambo 5.3.0 r.24366 h.c003ccf34b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24360 h.b6d7db7b8d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24366 h.c003ccf34b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24360 h.b6d7db7b8d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24366 h.c003ccf34b:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24360 h.b6d7db7b8d +Yambo configure 5.3.0 r.24366 h.c003ccf34b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24360 h.b6d7db7b8d, which was +It was created by Yambo $as_me 5.3.0 r.24366 h.c003ccf34b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24360" -SHASH="b6d7db7b8d" +SREVISION="24366" +SHASH="c003ccf34b" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24360 h.b6d7db7b8d, which was +This file was extended by Yambo $as_me 5.3.0 r.24366 h.c003ccf34b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24360 h.b6d7db7b8d +Yambo config.status 5.3.0 r.24366 h.c003ccf34b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5935e80ddb..3fcc0f0f8e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24360 h.b6d7db7b8d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24366 h.c003ccf34b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24360" -SHASH="b6d7db7b8d" +SREVISION="24366" +SHASH="c003ccf34b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/magma_fmodules/DOUBLE_project.dep b/lib/magma_fmodules/DOUBLE_project.dep new file mode 100644 index 0000000000..5efbe90e72 --- /dev/null +++ b/lib/magma_fmodules/DOUBLE_project.dep @@ -0,0 +1,7 @@ + magma.o + magma_cfortran.o + magma_dfortran.o + magma_param.o + magma_sfortran.o + magma_zfortran.o + diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 056d222e22..fca1371b0b 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -23,7 +23,6 @@ K_diago_response_functions.o K_diago_right_residuals.o K_diagonal.o - K_diagonalize.o K_dipoles.o K_dot_product.o K_driver.o @@ -45,7 +44,6 @@ K_multiply_by_V_transpose.o K_multiply_by_V_transpose_slepc.o K_observables.o - K_residuals.o K_restart.o K_screened_interaction.o K_shell_matrix.o @@ -55,4 +53,5 @@ K_stored_in_a_slepc_matrix.o PL_diago_residual.o PL_via_perturbative_inversion.o + YDIAGO_driver.o From 0d45960ef1d2ba6382d4a81cf1e384192885a5bd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 20:03:15 +0000 Subject: [PATCH 0925/1367] Add .gitlab-ci.yml --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..6001a2c658 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +# The Docker image that will be used to build your app +image: ubuntu:24.04 +create-pages: + pages: + # The folder that contains the files to be exposed at the Page URL + publish: public + rules: + # This ensures that only pushes to the default branch will trigger + # a pages deploy + - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + # Functions that should be executed before the build script is run + before_script: [] + script: + - apt-get install -qq build-essential git gcc gfortran libopenblas-dev + libfftw3-dev libopenmpi-dev + - ./configure + - make core -j From bf68270e8c0aacb94b793ba2c7589d752326e4a1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 20:10:01 +0000 Subject: [PATCH 0926/1367] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6001a2c658..ed4befe06e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,4 +14,3 @@ create-pages: - apt-get install -qq build-essential git gcc gfortran libopenblas-dev libfftw3-dev libopenmpi-dev - ./configure - - make core -j From a2f9a3eb45bdce15b6a325337c469d6e7fa4ce6f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 21:22:15 +0000 Subject: [PATCH 0927/1367] Changed image in .gitlab-ci.yml --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed4befe06e..cd8c494e19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ # The Docker image that will be used to build your app -image: ubuntu:24.04 +image: ubuntu:20.04 create-pages: pages: # The folder that contains the files to be exposed at the Page URL @@ -9,7 +9,6 @@ create-pages: # a pages deploy - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH # Functions that should be executed before the build script is run - before_script: [] script: - apt-get install -qq build-essential git gcc gfortran libopenblas-dev libfftw3-dev libopenmpi-dev From 2c9efb9c3fad1696740912a9d43241bdd6a48b82 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 21:43:03 +0000 Subject: [PATCH 0928/1367] changed ci default branch --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd8c494e19..073a52afd9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ create-pages: rules: # This ensures that only pushes to the default branch will trigger # a pages deploy - - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_REF_NAME == develop # $CI_DEFAULT_BRANCH # Functions that should be executed before the build script is run script: - apt-get install -qq build-essential git gcc gfortran libopenblas-dev From f5a2b0c0daf50f05167dd2be94ae0ca6e289c0f3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 21:46:43 +0000 Subject: [PATCH 0929/1367] TRying to fix .gitlab-ci.yml --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 073a52afd9..6d5a415094 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,9 +7,10 @@ create-pages: rules: # This ensures that only pushes to the default branch will trigger # a pages deploy - - if: $CI_COMMIT_REF_NAME == develop # $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_REF_NAME == "develop" + # $CI_DEFAULT_BRANCH # Functions that should be executed before the build script is run + # libopenblas-dev libfftw3-dev libopenmpi-dev script: - - apt-get install -qq build-essential git gcc gfortran libopenblas-dev - libfftw3-dev libopenmpi-dev + - apt-get install -qq build-essential git gcc gfortran libopenmpi-dev - ./configure From 880fcd1d8d7616bb0b81c879cbfa5ebc1d82c662 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 21:54:55 +0000 Subject: [PATCH 0930/1367] Trying to fix .gitlab-ci.yml --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d5a415094..2361755590 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,7 @@ # The Docker image that will be used to build your app image: ubuntu:20.04 +variables: + DEBIAN_FRONTEND: "noninteractive" create-pages: pages: # The folder that contains the files to be exposed at the Page URL @@ -10,7 +12,10 @@ create-pages: - if: $CI_COMMIT_REF_NAME == "develop" # $CI_DEFAULT_BRANCH # Functions that should be executed before the build script is run - # libopenblas-dev libfftw3-dev libopenmpi-dev script: - - apt-get install -qq build-essential git gcc gfortran libopenmpi-dev + - apt-get -qq update + - apt-get -qq install apt-transport-https ca-certificates gnupg software-properties-common wget + - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null + - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' + - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev - ./configure From 0f473e481e92f7ede3eab6cc51932888e6b7504d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 22:00:37 +0000 Subject: [PATCH 0931/1367] pages generation removed from .gitlab-ci.yml --- .gitlab-ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2361755590..6ef5d32f5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,20 +2,20 @@ image: ubuntu:20.04 variables: DEBIAN_FRONTEND: "noninteractive" -create-pages: - pages: - # The folder that contains the files to be exposed at the Page URL - publish: public - rules: - # This ensures that only pushes to the default branch will trigger - # a pages deploy - - if: $CI_COMMIT_REF_NAME == "develop" - # $CI_DEFAULT_BRANCH - # Functions that should be executed before the build script is run - script: - - apt-get -qq update - - apt-get -qq install apt-transport-https ca-certificates gnupg software-properties-common wget - - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null - - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' - - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev - - ./configure +#create-pages: +#pages: +# # The folder that contains the files to be exposed at the Page URL +# publish: public +rules: + # This ensures that only pushes to the default branch will trigger + # a pages deploy + - if: $CI_COMMIT_REF_NAME == "develop" + # $CI_DEFAULT_BRANCH +# Functions that should be executed before the build script is run +script: + - apt-get -qq update + - apt-get -qq install apt-transport-https ca-certificates gnupg software-properties-common wget + - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null + - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' + - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev + - ./configure From 694197ba6c54bf171608b41c40edc70c5c9c2151 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 22:13:31 +0000 Subject: [PATCH 0932/1367] Trying wiorkaround for missing public folder .gitlab-ci.yml --- .gitlab-ci.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ef5d32f5a..841df9070e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,20 +2,21 @@ image: ubuntu:20.04 variables: DEBIAN_FRONTEND: "noninteractive" -#create-pages: -#pages: -# # The folder that contains the files to be exposed at the Page URL -# publish: public -rules: - # This ensures that only pushes to the default branch will trigger - # a pages deploy - - if: $CI_COMMIT_REF_NAME == "develop" - # $CI_DEFAULT_BRANCH -# Functions that should be executed before the build script is run -script: - - apt-get -qq update - - apt-get -qq install apt-transport-https ca-certificates gnupg software-properties-common wget - - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null - - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' - - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev - - ./configure +create-pages: +pages: + # The folder that contains the files to be exposed at the Page URL + publish: public + rules: + # This ensures that only pushes to the default branch will trigger + # a pages deploy + - if: $CI_COMMIT_REF_NAME == "develop" + # $CI_DEFAULT_BRANCH + # Functions that should be executed before the build script is run + script: + - apt-get -qq update + - apt-get -qq install apt-transport-https ca-certificates gnupg software-properties-common wget + - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null + - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' + - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev + - ./configure + - mkdir public From 913b4f1a22d225bde29b6f766594376d9c7b5e6b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 22:15:18 +0000 Subject: [PATCH 0933/1367] Fixed pages alignment in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 841df9070e..2ebe926e8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ image: ubuntu:20.04 variables: DEBIAN_FRONTEND: "noninteractive" create-pages: -pages: + pages: # The folder that contains the files to be exposed at the Page URL publish: public rules: From e1184ee9fe17d600ca364f9ab6c692537a7fd06d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 22:16:05 +0000 Subject: [PATCH 0934/1367] Fixe one more alignment .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ebe926e8e..973aeb82a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,8 @@ variables: DEBIAN_FRONTEND: "noninteractive" create-pages: pages: - # The folder that contains the files to be exposed at the Page URL - publish: public + # The folder that contains the files to be exposed at the Page URL + publish: public rules: # This ensures that only pushes to the default branch will trigger # a pages deploy From 3ab58a4249f253ef8902bcd2516afb0834375a0c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Apr 2025 22:19:51 +0000 Subject: [PATCH 0935/1367] public folder replaced with doc --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 973aeb82a3..b0809e6e9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ variables: create-pages: pages: # The folder that contains the files to be exposed at the Page URL - publish: public + publish: doc rules: # This ensures that only pushes to the default branch will trigger # a pages deploy @@ -18,5 +18,4 @@ create-pages: - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev - - ./configure - - mkdir public + - ./configure \ No newline at end of file From a18e9fee285491c9807ab53a8a238881c6152b25 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Apr 2025 13:05:00 +0200 Subject: [PATCH 0936/1367] both master and develop activate CI --- .gitlab-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0809e6e9a..ed89667cf6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,10 +7,9 @@ create-pages: # The folder that contains the files to be exposed at the Page URL publish: doc rules: - # This ensures that only pushes to the default branch will trigger - # a pages deploy + # This ensures that only pushes to the default branch ($CI_DEFAULT_BRANCH) will trigger a pages deploy - if: $CI_COMMIT_REF_NAME == "develop" - # $CI_DEFAULT_BRANCH + - if: $CI_COMMIT_REF_NAME == "master" # Functions that should be executed before the build script is run script: - apt-get -qq update @@ -18,4 +17,4 @@ create-pages: - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' - apt-get install -qq build-essential git gcc gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev - - ./configure \ No newline at end of file + - ./configure From b17a777fef2180f3356cf7d39da59adadd6c2c6b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Apr 2025 19:37:33 +0200 Subject: [PATCH 0937/1367] Fixed issue with changes introduced with magma library porting --- src/common/eval_Gradient_cpu.F | 87 ------------------- .../SERIAL_HERMITIAN_diagonalization.F | 11 ++- 2 files changed, 9 insertions(+), 89 deletions(-) delete mode 100644 src/common/eval_Gradient_cpu.F diff --git a/src/common/eval_Gradient_cpu.F b/src/common/eval_Gradient_cpu.F deleted file mode 100644 index 67aa43997c..0000000000 --- a/src/common/eval_Gradient_cpu.F +++ /dev/null @@ -1,87 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2012 The Yambo Team -! -! Authors (see AUTHORS file for details): AM MG AF -! -subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) - ! - ! The gradient of a periodic function f(r): - ! - ! f(r) = \sum f(G) exp(iGr) => FFT: f(G) - ! - ! f'(r) = \sum iGf(G) exp(iGr) = - ! - ! \sum f'(G) exp(iGr) => FFT^-1 - ! - use pars, ONLY:SP,DP,cI,cZERO,cZERO_DP - use FFT_m, ONLY:fft_size,fft_dim,fft_g_table -#if defined _FFTW - use FFT_m, ONLY:fftw_plan -#endif - use R_lattice, ONLY:g_vec,ng_vec - use wave_func, ONLY:wf_ng - ! -#include - ! - integer, intent(in) ::spinor_size - complex(SP), intent(in) ::f(fft_size,spinor_size) - complex(SP), intent(out)::f_gradient(fft_size,spinor_size,3) - character(len=*), intent(in) ::f_type ! "wave", "density" or "potential" - ! - ! Work Space - ! - integer :: ng_,ic,ig,i_spinor - complex(DP), allocatable :: Vr(:), V3g(:,:) - ! - select case( trim(f_type) ) - case( "wave" ) - ng_=min(wf_ng,size(fft_g_table,1)) - case( "density") - ng_=min(ng_vec,size(fft_g_table,1)) - case( "potential") - ng_=min(ng_vec,size(fft_g_table,1)) - case default - call error(' [FFT] unknown f_type when computing gradient') - end select - ! - YAMBO_ALLOC(Vr,(fft_size)) - YAMBO_ALLOC(V3g,(ng_,3)) - V3g(:,:) = cZERO_DP - ! - f_gradient = cZERO - ! - do i_spinor=1,spinor_size - ! - Vr=cmplx(f(:,i_spinor),kind=DP) - ! -#if defined _FFTW - call dfftw_destroy_plan(fftw_plan) - fftw_plan = 0 - call fft_3d(Vr,fft_dim,-1,fftw_plan) -#else - call fft_3d(Vr,fft_dim,-1) -#endif - ! - forall (ic=1:3,ig=1:ng_) V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) - ! - do ic = 1,3 - Vr = cZERO_DP - Vr(fft_g_table(1:ng_,1)) = V3g(1:ng_,ic) -#if defined _FFTW - call dfftw_destroy_plan(fftw_plan) - fftw_plan = 0 - call fft_3d(Vr,fft_dim,1,fftw_plan) -#else - call fft_3d(Vr,fft_dim,1) -#endif - f_gradient(:,i_spinor,ic) = cmplx(Vr(:),kind=SP) - enddo - ! - enddo - ! - YAMBO_FREE(Vr) - YAMBO_FREE(V3g) - ! -end subroutine eval_Gradient diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index bc6ee8935a..209eb3c54a 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -54,9 +54,10 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) liwork=-1 allocate(WS%v_cmplx(1)) allocate(WS%v_real(1)) - allocate(WS%v_int(1)) ! #if defined _MAGMA + ! + allocate(WS%v_int(1)) ! if (.not.magma_init_done) then call msg('sr','Initializing magma library in geev') @@ -74,19 +75,25 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! lwork=nint(real(WS%v_cmplx(1))) lrwork=nint(WS%v_real(1)) - liwork=WS%v_int(1) deallocate(WS%v_cmplx) deallocate(WS%v_real) +#if defined _MAGMA + liwork=WS%v_int(1) deallocate(WS%v_int) +#endif ! if(.not.(l_nl_optics.or.l_real_time)) then YAMBO_ALLOC(WS%v_cmplx,(lwork)) YAMBO_ALLOC(WS%v_real,(lrwork)) +#if defined _MAGMA YAMBO_ALLOC(WS%v_int,(liwork)) +#endif else allocate(WS%v_cmplx(lwork)) allocate(WS%v_real(lrwork)) +#if defined _MAGMA allocate(WS%v_int(liwork)) +#endif endif ! From 2c2e289c619959fa950a181becfbf455ea553144 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Apr 2025 20:39:47 +0200 Subject: [PATCH 0938/1367] Fixed more issues in SERIAL_HERMITIAN_diagonalization due to MAGMA porting Now issue lumen#205 should be fixed --- .../SERIAL_HERMITIAN_diagonalization.F | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index 209eb3c54a..6cb02c9792 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -50,56 +50,60 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) ! Workspace ! lwork=-1 - lrwork=-1 - liwork=-1 allocate(WS%v_cmplx(1)) - allocate(WS%v_real(1)) ! + lrwork=max(1,3*n-2) #if defined _MAGMA - ! - allocate(WS%v_int(1)) - ! - if (.not.magma_init_done) then - call msg('sr','Initializing magma library in geev') - call magma_setup() - endif - ! - call magmaf_xheevd_m(1,'v','u', n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& -& lrwork,WS%v_int,liwork,WS%i_fail) + lrwork=1 +#endif + ! + allocate(WS%v_real(lrwork)) + ! +#if defined _MAGMA + ! + lrwork=-1 + liwork=-1 + allocate(WS%v_int(1)) + ! + if (.not.magma_init_done) then + call msg('sr','Initializing magma library in geev') + call magma_setup() + endif + ! + call magmaf_xheevd_m(1,'v','u', n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& + & lrwork,WS%v_int,liwork,WS%i_fail) #else - call la_xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) + call la_xheev('V','U',n,M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,WS%i_fail) #endif ! if(WS%i_fail /=0 ) call LINEAR_ALGEBRA_error(' _XHEEV_ ','WS%v_cmplx size query failed') ! - ! lwork=nint(real(WS%v_cmplx(1))) - lrwork=nint(WS%v_real(1)) deallocate(WS%v_cmplx) - deallocate(WS%v_real) + ! + if(.not.(l_nl_optics.or.l_real_time)) then + YAMBO_ALLOC(WS%v_cmplx,(lwork)) + else + allocate(WS%v_cmplx(lwork)) + endif + ! #if defined _MAGMA + ! + lrwork=nint(WS%v_real(1)) + deallocate(WS%v_real) liwork=WS%v_int(1) deallocate(WS%v_int) -#endif ! if(.not.(l_nl_optics.or.l_real_time)) then - YAMBO_ALLOC(WS%v_cmplx,(lwork)) YAMBO_ALLOC(WS%v_real,(lrwork)) -#if defined _MAGMA YAMBO_ALLOC(WS%v_int,(liwork)) -#endif else - allocate(WS%v_cmplx(lwork)) allocate(WS%v_real(lrwork)) -#if defined _MAGMA allocate(WS%v_int(liwork)) -#endif endif - ! ! use magma (if available) ! -#if defined _MAGMA ! call magmaf_xheevd_m(1,'v','u',n, M,size(M,1),E,WS%v_cmplx,lwork,WS%v_real,& & lrwork,WS%v_int,liwork,WS%i_fail) From da6701e952dd5d14cafda7bb45e2da331cd03b65 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Apr 2025 20:53:49 +0200 Subject: [PATCH 0939/1367] eval_Gradient subroutine split in two. This is done to avoid calling the subroutine with arguments of size f(fft_size) grad_f(fft_size,3) while the subroutine expects f(fft_size,1) grad_f(fft_size,1,3) In principle the two are equivalent, but in practice this could give issues --- src/common/eval_Gradient.F | 100 +++++++++++------- src/real_time_hamiltonian/RT_Hamiltonian.F | 2 +- src/tddft/TDDFT_PF_coefficient.F | 2 +- .../scatter_Bamp_using_the_gradient.F | 4 +- src/xc_functionals/XC_libxc_driver.F | 4 +- src/xc_functionals/el_density_and_current.F | 4 +- 6 files changed, 70 insertions(+), 46 deletions(-) diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 67aa43997c..0bb3bed813 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -3,9 +3,9 @@ ! ! Copyright (C) 2012 The Yambo Team ! -! Authors (see AUTHORS file for details): AM MG AF +! Authors (see AUTHORS file for details): AM MG AF DS ! -subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) +subroutine eval_Gradient(f,f_gradient,ng_) ! ! The gradient of a periodic function f(r): ! @@ -25,37 +25,21 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) ! #include ! - integer, intent(in) ::spinor_size - complex(SP), intent(in) ::f(fft_size,spinor_size) - complex(SP), intent(out)::f_gradient(fft_size,spinor_size,3) - character(len=*), intent(in) ::f_type ! "wave", "density" or "potential" + integer, intent(in) ::ng_ + complex(SP), intent(in) ::f(fft_size) + complex(SP), intent(out)::f_gradient(fft_size,3) ! ! Work Space ! - integer :: ng_,ic,ig,i_spinor - complex(DP), allocatable :: Vr(:), V3g(:,:) - ! - select case( trim(f_type) ) - case( "wave" ) - ng_=min(wf_ng,size(fft_g_table,1)) - case( "density") - ng_=min(ng_vec,size(fft_g_table,1)) - case( "potential") - ng_=min(ng_vec,size(fft_g_table,1)) - case default - call error(' [FFT] unknown f_type when computing gradient') - end select - ! - YAMBO_ALLOC(Vr,(fft_size)) - YAMBO_ALLOC(V3g,(ng_,3)) + integer :: ic,ig + complex(DP) :: Vr(fft_size), V3g(ng_,3) + ! V3g(:,:) = cZERO_DP ! f_gradient = cZERO ! - do i_spinor=1,spinor_size - ! - Vr=cmplx(f(:,i_spinor),kind=DP) - ! + Vr=cmplx(f(:),kind=DP) + ! #if defined _FFTW call dfftw_destroy_plan(fftw_plan) fftw_plan = 0 @@ -63,12 +47,12 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) #else call fft_3d(Vr,fft_dim,-1) #endif - ! - forall (ic=1:3,ig=1:ng_) V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) - ! - do ic = 1,3 - Vr = cZERO_DP - Vr(fft_g_table(1:ng_,1)) = V3g(1:ng_,ic) + ! + forall (ic=1:3,ig=1:ng_) V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) + ! + do ic = 1,3 + Vr = cZERO_DP + Vr(fft_g_table(1:ng_,1)) = V3g(1:ng_,ic) #if defined _FFTW call dfftw_destroy_plan(fftw_plan) fftw_plan = 0 @@ -76,12 +60,52 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) #else call fft_3d(Vr,fft_dim,1) #endif - f_gradient(:,i_spinor,ic) = cmplx(Vr(:),kind=SP) - enddo - ! + f_gradient(:,ic) = cmplx(Vr(:),kind=SP) enddo ! - YAMBO_FREE(Vr) - YAMBO_FREE(V3g) - ! end subroutine eval_Gradient +! +! +subroutine eval_Gradient_wf(wf,wf_gradient) + ! + use pars, ONLY:SP + use FFT_m, ONLY:fft_size,fft_g_table + use wave_func, ONLY:wf_ng + use electrons, ONLY:n_spinor + ! + implicit none + ! + complex(SP), intent(in) ::wf(fft_size,n_spinor) + complex(SP), intent(out)::wf_gradient(fft_size,n_spinor,3) + ! + complex(SP) :: wf_tmp(fft_size,3) + ! + integer :: i_spinor,ng_ + ! + ng_=min(wf_ng,size(fft_g_table,1)) + ! + do i_spinor=1,n_spinor + call eval_Gradient(wf(:,i_spinor),wf_tmp,ng_) + wf_gradient(:,i_spinor,:)=wf_tmp + enddo + ! +end subroutine eval_Gradient_wf +! +! +subroutine eval_Gradient_rho_pot(Vrho,Vrho_gradient) + ! + use pars, ONLY:SP + use FFT_m, ONLY:fft_size,fft_g_table + use R_lattice, ONLY:g_vec,ng_vec + ! + implicit none + ! + complex(SP), intent(in) ::Vrho(fft_size) + complex(SP), intent(out)::Vrho_gradient(fft_size,3) + ! + integer :: ng_ + ! + ng_=min(ng_vec,size(fft_g_table,1)) + call eval_Gradient(Vrho,Vrho_gradient,ng_) + ! +end subroutine eval_Gradient_rho_pot \ No newline at end of file diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 550c99009d..2d69bd14f9 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -135,7 +135,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) deallocate(V_xc_mat) endif allocate(V_scf_grad(fft_size,3)) - call eval_Gradient(V_scf,V_scf_grad,1,"potential") + call eval_Gradient_rho_pot(V_scf,V_scf_grad) deallocate(V_scf) ! endif diff --git a/src/tddft/TDDFT_PF_coefficient.F b/src/tddft/TDDFT_PF_coefficient.F index 8c10f6290c..52d7b8a6f8 100644 --- a/src/tddft/TDDFT_PF_coefficient.F +++ b/src/tddft/TDDFT_PF_coefficient.F @@ -197,7 +197,7 @@ real function Alpha_LOC(density) ! density_cmplx(:,1)=density(:) ! - call eval_Gradient(density_cmplx,d_density,1,"density") + call eval_Gradient_rho_pot(density_cmplx,d_density) ! alpha_ = 0._SP do ir = 1, fft_size diff --git a/src/wf_and_fft/scatter_Bamp_using_the_gradient.F b/src/wf_and_fft/scatter_Bamp_using_the_gradient.F index 0f74d7359a..eef197bdf1 100644 --- a/src/wf_and_fft/scatter_Bamp_using_the_gradient.F +++ b/src/wf_and_fft/scatter_Bamp_using_the_gradient.F @@ -50,10 +50,10 @@ subroutine scatter_Bamp_using_the_gradient(isc,which) call WF_apply_symm(isc%os,isc%WF_symm_o) ! ! \grad - if (which=="o") call eval_Gradient(isc%WF_symm_o,WF_der,n_spinor,"wave") + if (which=="o") call eval_Gradient_wf(isc%WF_symm_o,WF_der) ! ! Chartesian components of the gradient loop ! diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 86f8579ef3..a7fc25fc68 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -199,8 +199,8 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) YAMBO_ALLOC(spin_rho_SP_cmplx,(fft_size)) do is1 = 1,n_spin spin_rho_SP_cmplx(:)=cmplx(spin_rho_SP(:,is1),0.0_SP,kind=SP) - call eval_Gradient(spin_rho_SP_cmplx,drho_cmplx,1,"density") - drho(:,is1,:)=real(drho_cmplx) + call eval_Gradient_rho_pot(spin_rho_SP_cmplx,drho_cmplx) + drho(:,is1,:)=real(drho_cmplx,kind=SP) end do YAMBO_FREE(drho_cmplx) YAMBO_FREE(spin_rho_SP_cmplx) diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 8d88dfa979..1f88532867 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -193,7 +193,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) ! if (l_drho) then ! - call eval_Gradient(WF%c(:,:,i_wf),WF_der,n_spinor,"wave") + call eval_Gradient_wf(WF%c(:,:,i_wf),WF_der) ! do i_dir=1,3 do i_spinor=1,n_spinor @@ -208,7 +208,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) ! if (l_J) then ! - call eval_Gradient(WF%c(:,:,i_wf),WF_der,n_spinor,"wave") + call eval_Gradient_wf(WF%c(:,:,i_wf),WF_der) ! do i_dir=1,3 do i_spinor=1,n_spinor From f65c3e5f7071814aecdb5e08545d29a0f7ca85e3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 27 Apr 2025 22:32:34 +0200 Subject: [PATCH 0940/1367] Fixed magnons with ydiago driver and retarded mode (e.g. 2 BSE matrices case) --- src/bse/K_diago_driver.F | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index b05c855973..6c740c2e80 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -77,7 +77,7 @@ subroutine K_diago_driver(iq,W,X_static) character(1) :: sec character(10) :: Solver ! Ydiago varibles - integer, target :: neigs_range(2) + integer, target :: neigs_range(2),BSS_n_eig_save real(SP), target :: eigvals_range(2) ! ! Slepc specific @@ -166,6 +166,9 @@ subroutine K_diago_driver(iq,W,X_static) if (.not.BSS_write_eig_2_db) call parser('WRbsWF',BSS_write_eig_2_db) call parser('BSSPertWidth',BSS_perturbative_width) ! + ! This is needed in case BS_res_ares_n_mat>1 + BSS_n_eig_save=BSS_n_eig + ! do i_BS_mat=1,BS_res_ares_n_mat ! if(.not.BS_K_coupling) BS_mat_dim = BS_K_dim(i_BS_mat) @@ -674,14 +677,9 @@ subroutine BSS_n_eig_init() call warning('N_eigen < 1. Calculating only 1% of the eigenvalues.') endif ! - if (BSS_n_eig>BS_H_dim) then - call warning('N_eigen > BS_H_dim. Calculating 10% of the eigenvalues.') - BSS_n_eig = nint(BS_H_dim*0.1) - endif - ! - if (BSS_n_eig>BS_K_dim(1) .and. BSS_slepc_pseudo_herm) then - call warning('N_eigen > BS_K_dim and pseudo-hermitian case. Calculating 10% of the eigenvalues.') - BSS_n_eig = nint(BS_K_dim(1)*0.1) + if (BSS_n_eig>BS_mat_dim) then + call warning('N_eigen > BS_mat_dim. Calculating 10% of the eigenvalues.') + BSS_n_eig = nint(BS_mat_dim*0.1) endif ! endif @@ -692,7 +690,7 @@ subroutine BSS_n_eig_init() if(l_ydiago) then ! ! In case of ydiago, BSS_n_eig will be overwritten after the solver is called - if( BSS_n_eig==0 ) BSS_n_eig = BS_mat_dim + if( BSS_n_eig_save==0 ) BSS_n_eig = BS_mat_dim ! neigs_range = 0 eigvals_range= -1._SP From 55689c2b712d59f6851cd0393c5bee5b0d2736af Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Apr 2025 18:50:38 +0200 Subject: [PATCH 0941/1367] Document moved inside doc folder --- .../Discussion_AD_DS_20250225.dat | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Discussion_AD_DS_20250225.dat => doc/Discussion_AD_DS_20250225.dat (100%) diff --git a/Discussion_AD_DS_20250225.dat b/doc/Discussion_AD_DS_20250225.dat similarity index 100% rename from Discussion_AD_DS_20250225.dat rename to doc/Discussion_AD_DS_20250225.dat From bee66127e8ae2e774ea31ff6f6594db630062cc6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Apr 2025 22:00:16 +0200 Subject: [PATCH 0942/1367] Fixed handling of number of requested BSE eigenvalues in runs with multiple q-points --- src/bse/K_diago_driver.F | 21 ++++++++++----------- src/interface/INIT_load.F | 4 ++-- src/modules/SET_defaults.F | 3 ++- src/modules/mod_BS_solvers.F | 1 + 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 6c740c2e80..d1fe953344 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -27,7 +27,7 @@ subroutine K_diago_driver(iq,W,X_static) use units, ONLY:HA2EV use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& & BS_res_ares_n_mat,l_BS_optics,l_BS_dichroism,l_BS_ares_from_res !,BS_Blocks_symmetrize_K,& - use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode, BSS_resize, & + use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize,BSS_n_eig_Input, & & BSS_write_eig_2_db,BSS_eh_W,BSS_n_eig,BS_E,BSS_slepc_pseudo_herm,write_bs_ev_par,& & BSS_ydiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition use X_m, ONLY:X_t,X_OUTPUT_driver @@ -71,13 +71,13 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Work Space ! - integer :: i_BS_mat,Input_n_eig, BS_mat_dim, neigs_this_cpu, neig_shift, elpa_solver = 2 + integer :: i_BS_mat,BSS_n_eig_before_solver, BS_mat_dim, neigs_this_cpu, neig_shift, elpa_solver = 2 logical :: K_is_not_hermitian,l_diago,l_slepc,l_dip_more,l_target_erange,l_neig_input, & & l_ydiago,l_kerr_lft,l_kerr_rgt,l_abs_res character(1) :: sec character(10) :: Solver ! Ydiago varibles - integer, target :: neigs_range(2),BSS_n_eig_save + integer, target :: neigs_range(2) real(SP), target :: eigvals_range(2) ! ! Slepc specific @@ -166,9 +166,6 @@ subroutine K_diago_driver(iq,W,X_static) if (.not.BSS_write_eig_2_db) call parser('WRbsWF',BSS_write_eig_2_db) call parser('BSSPertWidth',BSS_perturbative_width) ! - ! This is needed in case BS_res_ares_n_mat>1 - BSS_n_eig_save=BSS_n_eig - ! do i_BS_mat=1,BS_res_ares_n_mat ! if(.not.BS_K_coupling) BS_mat_dim = BS_K_dim(i_BS_mat) @@ -308,7 +305,7 @@ subroutine K_diago_driver(iq,W,X_static) ! if (l_slepc) then ! BSS_n_eig could be lowered by MATRIX_slepc - if (Input_n_eig>BSS_n_eig) call K_slepc_resize_variables() + if (BSS_n_eig_before_solver>BSS_n_eig) call K_slepc_resize_variables() ! Destroy the matrix call MatDestroy(slepc_mat,ierr) endif @@ -318,7 +315,8 @@ subroutine K_diago_driver(iq,W,X_static) if (l_diago) call live_timing( ) ! if (l_ydiago) then - if (Input_n_eig>BSS_n_eig) call K_ydiago_resize_variables() + ! BSS_n_eig could be lowered by YDIAGO_driver + if (BSS_n_eig_before_solver>BSS_n_eig) call K_ydiago_resize_variables() endif ! ! Compute residuals @@ -598,7 +596,6 @@ subroutine K_local_init() BSS_slepc_pseudo_herm = .false. call warning('Preconditioning not supported in pseudo-hermitian case. Switching to non-hermitian diagonalization') endif - ! if (l_ydiago) then ! @@ -669,6 +666,8 @@ subroutine BSS_n_eig_init() ! Number of states to be computed !================================= ! + BSS_n_eig=BSS_n_eig_Input + ! if (l_slepc) then ! if (BSS_n_eig<1) then @@ -690,7 +689,7 @@ subroutine BSS_n_eig_init() if(l_ydiago) then ! ! In case of ydiago, BSS_n_eig will be overwritten after the solver is called - if( BSS_n_eig_save==0 ) BSS_n_eig = BS_mat_dim + if( BSS_n_eig==0 ) BSS_n_eig = BS_mat_dim ! neigs_range = 0 eigvals_range= -1._SP @@ -717,7 +716,7 @@ subroutine BSS_n_eig_init() ! endif ! - Input_n_eig=BSS_n_eig + BSS_n_eig_before_solver=BSS_n_eig ! ! For backward compatibitly I set neig_shift = 0 diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 41a0389c97..39cfd7bb3d 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -36,7 +36,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,& & BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& -& BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig,BSS_first_eig,Haydock_iterMAX,BSS_ydiago_solver +& BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig_Input,BSS_first_eig,Haydock_iterMAX,BSS_ydiago_solver #if defined _SLEPC && !defined _NL use BS_solvers, ONLY:BSS_slepc_extraction,BSS_slepc_ncv,BSS_slepc_tol,BSS_slepc_maxit,& & BSS_slepc_precondition,BSS_slepc_approach,BSS_slepc_mpd,BSS_slepc_matrix_format @@ -326,7 +326,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'WehDiag', '[BSK] diagonal (G-space) the eh interaction',verb_level=V_resp) call it('f',defs,'WehCpl', '[BSK] eh interaction included also in coupling') call it('f',defs,'WRbsWF', '[BSS] Write to disk excitonic the WFs') - call it(defs,'BSSNEig', '[SLEPC/DIAGO] Number of eigenvalues to compute',BSS_n_eig) + call it(defs,'BSSNEig', '[SLEPC/DIAGO] Number of eigenvalues to compute',BSS_n_eig_Input) call it(defs,'BSSFirstEig', '[DIAGO] Index of the first eigenvalues to compute',BSS_first_eig,verb_level=V_resp) call it(defs,'BSSEnRange', '[DIAGO] Target energy to find eigenvalues',BSS_trange_E,E_unit,verb_level=V_resp) #if defined _SLEPC && !defined _NL diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 521ca93fea..97c94566e0 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -45,7 +45,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use FFT_m, ONLY:fft_dim_loaded,fft_size,fft_dim,fft_multiplier use IO_m, ONLY:io_reset,max_io_units,serial_number,frag_WF use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,BSS_P_dir,BSS_E_dir,BSS_Q_dir,BSS_first_eig,& -& Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,BSS_n_eig,& +& Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,BSS_n_eig,BSS_n_eig_Input,& & BSS_damp_reference,BSS_Vnl_included,BSS_uses_GreenF,BSS_inversion_mode,BSS_target_E,& & BSS_perturbative_width,K_INV_EPS,K_INV_PL,K_INV_PI_PH,BSS_desc,BSS_ydiago_solver,BSS_trange_E,& & BSS_kernel_IO_on_the_fly,BSS_kernel_stored_size,BSS_kernel_last_stored_block @@ -469,6 +469,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) K_INV_EPS%max_treshold=40._SP BSS_n_freqs=100 BSS_n_eig=0 + BSS_n_eig_Input=0 BSS_first_eig=1 BSS_target_E=0._SP BSS_trange_E=-1._SP/HA2EV diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index aaaadfb372..cbc83da0ff 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -55,6 +55,7 @@ module BS_solvers complex(SP) :: BSS_Wd integer :: BSS_n_freqs integer :: BSS_n_eig ! number of eigenvalues to find. Ydiago/Slepc + integer :: BSS_n_eig_Input ! number of eigenvalues requested in input. Ydiago/Slepc integer :: BSS_first_eig ! index of the first eigenvalue to find. Ydiago real(SP) :: BSS_target_E ! find eigenvalues close to this energy. Slepc real(SP) :: BSS_trange_E(2) ! find eigenvalues in this energy range. Ydiago From 7c29bf68da4d835a6082bd616513403722946a00 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Apr 2025 22:19:41 +0200 Subject: [PATCH 0943/1367] Small change to K_fill_block_cyclic to allow Ydiago solver to work also without kernel Needed to overcome some tests in the test-suite --- src/bse/K_fill_block_cyclic.F | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/bse/K_fill_block_cyclic.F b/src/bse/K_fill_block_cyclic.F index 2dd87b25bf..8946339b97 100644 --- a/src/bse/K_fill_block_cyclic.F +++ b/src/bse/K_fill_block_cyclic.F @@ -11,7 +11,7 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) ! K = | | ! | (-cI*K_c^*) (-K_r^*) | ! - use pars, ONLY:cI,cONE + use pars, ONLY:cI,cONE,cZERO use BS, ONLY:BS_K_dim,BS_H_dim,BS_blk,n_BS_blks,BS_K_coupling,& & BS_res_ares_n_mat,l_BS_ares_from_res use BS_solvers, ONLY:BSS_eh_E,BSS_eh_W,BSS_perturbative_width, & @@ -25,6 +25,10 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) ! integer, intent(in) :: i_BS_mat type(c_ptr), intent(in) :: diago_mat + ! + ! Workspace + ! + logical :: l_mat_allocated integer :: i_c,i_r,i_Tk,i_Tp,i_B,H_shift(2) complex(YDIAGO_CMPLX) :: Mij,Mij_star integer(YDIAGO_INT) :: H_pos(2),SL_K_dim(2),SL_H_dim @@ -97,6 +101,7 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) error_diago = initiateSetQueue(diago_mat, nelements) if (error_diago /= 0) call error("Initiating set Queue failed") ! + ! ! // fill the elements do i_B=1,n_BS_blks ! @@ -105,6 +110,8 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) ! if (i_BS_mat/=BS_blk(i_B)%ira_k .and. BS_res_ares_n_mat==2) cycle ! + l_mat_allocated = allocated(BS_blk(i_B)%mat) + ! H_shift=0 if(BS_blk(i_B)%mode=="C") H_shift(2)=BS_K_dim(1) if(BS_blk(i_B)%mode=="A") H_shift(:)=BS_K_dim(1) @@ -122,8 +129,13 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) if (H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle if (l_BS_ares_from_res.and.H_pos(1)>H_pos(2)) cycle ! - Mij = BS_blk(i_B)%mat(i_r,i_c) - Mij_star= real(BS_blk(i_B)%mat(i_r,i_c))-cI*aimag(BS_blk(i_B)%mat(i_r,i_c)) + if (l_mat_allocated) then + Mij = BS_blk(i_B)%mat(i_r,i_c) + Mij_star= real(BS_blk(i_B)%mat(i_r,i_c))-cI*aimag(BS_blk(i_B)%mat(i_r,i_c)) + else + Mij =cZERO + Mij_star=cZERO + endif ! ! Add energies to the diagonal ! From 5b3e01ca2959237a807af1847525e8331d7f6203 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Apr 2025 22:29:32 +0200 Subject: [PATCH 0944/1367] File deleted --- based_on_phys-dipoles-k-derivative | 0 configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 based_on_phys-dipoles-k-derivative diff --git a/based_on_phys-dipoles-k-derivative b/based_on_phys-dipoles-k-derivative deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/configure b/configure index d6548c001a..c20076cab0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24516 h.3dac9f17ee. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24732 h.1c84ad2b77. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24516 h.3dac9f17ee' -PACKAGE_STRING='Yambo 5.3.0 r.24516 h.3dac9f17ee' +PACKAGE_VERSION='5.3.0 r.24732 h.1c84ad2b77' +PACKAGE_STRING='Yambo 5.3.0 r.24732 h.1c84ad2b77' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24516 h.3dac9f17ee to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24732 h.1c84ad2b77 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24516 h.3dac9f17ee:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24732 h.1c84ad2b77:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24516 h.3dac9f17ee +Yambo configure 5.3.0 r.24732 h.1c84ad2b77 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24516 h.3dac9f17ee, which was +It was created by Yambo $as_me 5.3.0 r.24732 h.1c84ad2b77, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24516" -SHASH="3dac9f17ee" +SREVISION="24732" +SHASH="1c84ad2b77" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24516 h.3dac9f17ee, which was +This file was extended by Yambo $as_me 5.3.0 r.24732 h.1c84ad2b77, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24516 h.3dac9f17ee +Yambo config.status 5.3.0 r.24732 h.1c84ad2b77 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5ff1a2536e..a9fda6897e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24516 h.3dac9f17ee, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24732 h.1c84ad2b77, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24516" -SHASH="3dac9f17ee" +SREVISION="24732" +SHASH="1c84ad2b77" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From a589195fdcbb83ccbf9156fa78e26723da4dc781 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Apr 2025 22:35:34 +0200 Subject: [PATCH 0945/1367] Fixed compilation of sc project --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_compose_sc.F | 5 +++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index c20076cab0..b8d544dc23 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24732 h.1c84ad2b77. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24733 h.5b3e01ca29. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24732 h.1c84ad2b77' -PACKAGE_STRING='Yambo 5.3.0 r.24732 h.1c84ad2b77' +PACKAGE_VERSION='5.3.0 r.24733 h.5b3e01ca29' +PACKAGE_STRING='Yambo 5.3.0 r.24733 h.5b3e01ca29' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24732 h.1c84ad2b77 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24733 h.5b3e01ca29 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24732 h.1c84ad2b77:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24733 h.5b3e01ca29:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24732 h.1c84ad2b77 +Yambo configure 5.3.0 r.24733 h.5b3e01ca29 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24732 h.1c84ad2b77, which was +It was created by Yambo $as_me 5.3.0 r.24733 h.5b3e01ca29, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24732" -SHASH="1c84ad2b77" +SREVISION="24733" +SHASH="5b3e01ca29" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24732 h.1c84ad2b77, which was +This file was extended by Yambo $as_me 5.3.0 r.24733 h.5b3e01ca29, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24732 h.1c84ad2b77 +Yambo config.status 5.3.0 r.24733 h.5b3e01ca29 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a9fda6897e..534f9788c7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24732 h.1c84ad2b77, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24733 h.5b3e01ca29, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24732" -SHASH="1c84ad2b77" +SREVISION="24733" +SHASH="5b3e01ca29" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_sc.F b/src/collisions/COLLISIONS_compose_sc.F index bd89377e47..296b8fb388 100644 --- a/src/collisions/COLLISIONS_compose_sc.F +++ b/src/collisions/COLLISIONS_compose_sc.F @@ -10,6 +10,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! HF(qp_state) = - (0.,1.) * \sum_{n,n',q} Collisions(n,n',q,qp_state) x G_sex/coh(n,n',k-q) ! use pars, ONLY:SP,cZERO,cI + use electrons, ONLY:n_sp_pol use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree use QP_m, ONLY:QP_nk,QP_nb,QP_n_states,QP_Sc,QP_Vnl_xc use collision_ext, ONLY:COH_COLL_element,HXC_COLL_element,COLL_bands,HXC_collisions,& @@ -76,7 +77,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! COH part ! if (l_sc_coh) then - if (COH_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then + if (COH_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,i_sp)=='t') then QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*COH_COLL_element(i_coll_mem)%v_c(ic1)*G_coh(ib,ibp,i_kmq,i_sp) ic1=ic1+1 endif @@ -85,7 +86,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! SEX/HF/HARTREE parts ! if (l_sex) then - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,i_sp)=='t') then QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*HXC_COLL_element(i_coll_mem)%v_c(ic2)*G_sex(ib,ibp,i_kmq,i_sp) ic2=ic2+1 endif From a37942f138ca157901856f2947a4a21c4cd42d4b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Apr 2025 22:59:21 +0200 Subject: [PATCH 0946/1367] Threshold nel_diff_zero in occupations Fermi reverted to original value --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/common/OCCUPATIONS_Fermi.F | 4 +++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index b8d544dc23..1a7a70dce2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24733 h.5b3e01ca29. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24734 h.a589195fdc. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24733 h.5b3e01ca29' -PACKAGE_STRING='Yambo 5.3.0 r.24733 h.5b3e01ca29' +PACKAGE_VERSION='5.3.0 r.24734 h.a589195fdc' +PACKAGE_STRING='Yambo 5.3.0 r.24734 h.a589195fdc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24733 h.5b3e01ca29 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24734 h.a589195fdc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24733 h.5b3e01ca29:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24734 h.a589195fdc:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24733 h.5b3e01ca29 +Yambo configure 5.3.0 r.24734 h.a589195fdc generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24733 h.5b3e01ca29, which was +It was created by Yambo $as_me 5.3.0 r.24734 h.a589195fdc, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24733" -SHASH="5b3e01ca29" +SREVISION="24734" +SHASH="a589195fdc" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24733 h.5b3e01ca29, which was +This file was extended by Yambo $as_me 5.3.0 r.24734 h.a589195fdc, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24733 h.5b3e01ca29 +Yambo config.status 5.3.0 r.24734 h.a589195fdc configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 534f9788c7..29801c4754 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24733 h.5b3e01ca29, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24734 h.a589195fdc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24733" -SHASH="5b3e01ca29" +SREVISION="24734" +SHASH="a589195fdc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index 5971b1b47f..2a4cc19cdb 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -118,7 +118,9 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! Start Loop ! i_trials=1 - nel_diff_zero=1.E-4 + ! Setting this to 1.E-4 is needed for CrI3, + ! however, it make Benzene tests fail + nel_diff_zero=1.E-5 Fermi_is_converged=.false. ! ! BUG-fix [Andrea 1/6/2012]: when the system is semiconductive it may happen the From bd19fe98a8642cdcfa1ed9444f51135b9496f8ce Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 29 Apr 2025 09:45:42 +0200 Subject: [PATCH 0947/1367] Version 5.3.0, Revision 24424, Hash 1b52f5f9db MODIFIED * configure include/version/version.m4 common/LEVELS_mirror.F Bugs: - Fixed subroutine LEVELS_mirror which was buggy Patch sent by: Davide Sangalli --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/common/LEVELS_mirror.F | 28 +++++++++++++++++++--------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 4955337533..a14ee6a6fa 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24366 h.c003ccf34b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24424 h.1b52f5f9db. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24366 h.c003ccf34b' -PACKAGE_STRING='Yambo 5.3.0 r.24366 h.c003ccf34b' +PACKAGE_VERSION='5.3.0 r.24424 h.1b52f5f9db' +PACKAGE_STRING='Yambo 5.3.0 r.24424 h.1b52f5f9db' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24366 h.c003ccf34b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24424 h.1b52f5f9db to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24366 h.c003ccf34b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24424 h.1b52f5f9db:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24366 h.c003ccf34b +Yambo configure 5.3.0 r.24424 h.1b52f5f9db generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24366 h.c003ccf34b, which was +It was created by Yambo $as_me 5.3.0 r.24424 h.1b52f5f9db, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24366" -SHASH="c003ccf34b" +SREVISION="24424" +SHASH="1b52f5f9db" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24366 h.c003ccf34b, which was +This file was extended by Yambo $as_me 5.3.0 r.24424 h.1b52f5f9db, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24366 h.c003ccf34b +Yambo config.status 5.3.0 r.24424 h.1b52f5f9db configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3fcc0f0f8e..5894779532 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24366 h.c003ccf34b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24424 h.1b52f5f9db, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24366" -SHASH="c003ccf34b" +SREVISION="24424" +SHASH="1b52f5f9db" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/common/LEVELS_mirror.F b/src/common/LEVELS_mirror.F index 053e6edf87..d7b767cbef 100644 --- a/src/common/LEVELS_mirror.F +++ b/src/common/LEVELS_mirror.F @@ -113,21 +113,31 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) ! Bands (Dipoles) !---------------- DIP_bands=-1 - do i1=1,6 + ! Start from input if present + if( l_USER_field(6) ) DIP_bands=Dip%ib + ! + ! Test scatt bands + if( all((/SCATT_bands/=-1/) ) ) DIP_bands=SCATT_bands + DIP_bands(1)=min(DIP_bands(1),Dip%ib(1)) + DIP_bands(2)=max(DIP_bands(2),Dip%ib(2)) + ! + ! Test other fields + do i1=1,5 if(.not.(l_USER_field(i1))) cycle - if(i1< 6) DIP_bands=X(i1)%ib - if(i1==6) DIP_bands=Dip%ib + DIP_bands=X(i1)%ib enddo - if (all((/DIP_bands<0/))) then - if( l_USER_field(7) ) DIP_bands=BS_bands - if(.not.l_USER_field(7) ) DIP_bands=SCATT_bands + DIP_bands(1)=min(DIP_bands(1),Dip%ib(1)) + DIP_bands(2)=max(DIP_bands(2),Dip%ib(2)) + ! + if( l_USER_field(7) ) DIP_bands=BS_bands #if defined _RT || defined _QED || defined _NL - if( l_USER_field(8) ) DIP_bands=RT_bands + if( l_USER_field(8) ) DIP_bands=RT_bands #endif #if defined _NL - if( l_USER_field(10)) DIP_bands=NL_bands + if( l_USER_field(10)) DIP_bands=NL_bands #endif - endif + DIP_bands(1)=min(DIP_bands(1),Dip%ib(1)) + DIP_bands(2)=max(DIP_bands(2),Dip%ib(2)) ! ! Any negative bands? !--------------------- From 1d1cd3f73ca261fcfc67c4cda3a754a84373e92a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 2 May 2025 15:18:23 +0200 Subject: [PATCH 0948/1367] Version 5.3.0, Revision 24376, Hash 7c29bf68d MODIFIED * configure include/version/version.m4 common/DOUBLE_project.dep dipoles/Berry_polarization_EQ.F dipoles/DIPOLE_covariant.F hamiltonian/Apply_W_field.F hamiltonian/Build_W_operator.F nloptics/NL_Berry_current.F nloptics/NL_current.F Bugs: - Additions: - Changes: -Restored code to reproduce tech-master tests (changes and corrections can be done in future pull request) Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/common/DOUBLE_project.dep | 1 - src/dipoles/Berry_polarization_EQ.F | 2 +- src/dipoles/DIPOLE_covariant.F | 2 +- src/hamiltonian/Apply_W_field.F | 2 +- src/hamiltonian/Build_W_operator.F | 4 +--- src/nloptics/NL_Berry_current.F | 2 +- src/nloptics/NL_current.F | 4 ++-- 9 files changed, 21 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 4955337533..6031815a23 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24366 h.c003ccf34b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24376 h.7c29bf68d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24366 h.c003ccf34b' -PACKAGE_STRING='Yambo 5.3.0 r.24366 h.c003ccf34b' +PACKAGE_VERSION='5.3.0 r.24376 h.7c29bf68d' +PACKAGE_STRING='Yambo 5.3.0 r.24376 h.7c29bf68d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24366 h.c003ccf34b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24376 h.7c29bf68d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24366 h.c003ccf34b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24376 h.7c29bf68d:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24366 h.c003ccf34b +Yambo configure 5.3.0 r.24376 h.7c29bf68d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24366 h.c003ccf34b, which was +It was created by Yambo $as_me 5.3.0 r.24376 h.7c29bf68d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24366" -SHASH="c003ccf34b" +SREVISION="24376" +SHASH="7c29bf68d" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24366 h.c003ccf34b, which was +This file was extended by Yambo $as_me 5.3.0 r.24376 h.7c29bf68d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24366 h.c003ccf34b +Yambo config.status 5.3.0 r.24376 h.7c29bf68d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3fcc0f0f8e..c11f2ae1cf 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24366 h.c003ccf34b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24376 h.7c29bf68d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24366" -SHASH="c003ccf34b" +SREVISION="24376" +SHASH="7c29bf68d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/common/DOUBLE_project.dep b/src/common/DOUBLE_project.dep index 4ef61512e2..119bd9eaf3 100644 --- a/src/common/DOUBLE_project.dep +++ b/src/common/DOUBLE_project.dep @@ -30,7 +30,6 @@ crystal_lattice.o eval_G_minus_G.o eval_Gradient.o - eval_Gradient_cpu.o eval_Gradient_gpu.o f_build_ext.o spline_fit.o diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index cd1ad3fe82..d2149ee9fe 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -76,7 +76,7 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) enddo enddo ! - P_Berry_RED(id_in)=P_Berry_RED(id_in)/real(Nperpend,SP) + P_Berry_RED(id_in)=-P_Berry_RED(id_in)/real(Nperpend,SP) ! enddo ! diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index fe925eb748..b8d6de6378 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -159,7 +159,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle do idir=1,3 - DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))*cI + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))/cI enddo enddo enddo diff --git a/src/hamiltonian/Apply_W_field.F b/src/hamiltonian/Apply_W_field.F index 8480a9ea31..782d6df894 100644 --- a/src/hamiltonian/Apply_W_field.F +++ b/src/hamiltonian/Apply_W_field.F @@ -28,7 +28,7 @@ subroutine Apply_W_field(A_input,Wk,H_nl_sc) !$omp parallel do default(shared), private(i1,id) do i1=H_ref_bands(1),H_ref_bands(2) do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & + H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))- & & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) enddo enddo diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 9cf55d06e6..402527cd41 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -120,9 +120,7 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) ! !$omp parallel do default(shared), private(id) do id=1,3 - Wk(id,H_ref_bands(1):H_ref_bands(2),H_ref_bands(1):H_ref_bands(2))= & - & (Wk(id,H_ref_bands(1):H_ref_bands(2),H_ref_bands(1):H_ref_bands(2)) & - & +hermitian(Wk(id,H_ref_bands(1):H_ref_bands(2),H_ref_bands(1):H_ref_bands(2)))) + Wk(id,:,:)=(Wk(id,:,:)+hermitian(Wk(id,:,:))) enddo !$omp end parallel do ! diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index 3894083879..80cbcea2a2 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -129,7 +129,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! !$omp parallel do default(shared), private(i1) do id=1,3 - NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0*pi) + NL_J(id)=-sum(NL_J_red(:)*a(:,id))/(4.0*pi) enddo !$omp end parallel do ! diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index ef7a33c2da..917539d684 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -41,12 +41,12 @@ subroutine NL_current(k,E,V_input,NL_J) ! ! A : Current ! - call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & & V_bands=V_input,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! ! DEBUG < ! Calculate current using density matrix - ! call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + ! call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & ! & dG=dG,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! DEBUG > ! From 43029f6cf4ed4e12817e91d20cebb1302a772c12 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 5 May 2025 14:41:33 +0200 Subject: [PATCH 0949/1367] Version 5.3.0, Revision 24377, Hash 1d1cd3f73 MODIFIED * configure include/version/version.m4 dipoles/Berry_polarization_EQ.F dipoles/DIPOLE_covariant.F hamiltonian/Apply_W_field.F nloptics/NL_Berry_current.F nloptics/NL_current.F qp_control/DOUBLE_project.dep qp_control/ELPH_project.dep Bugs: - Additions: - Changes: -Restored corrected sign of polarization Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/Berry_polarization_EQ.F | 2 +- src/dipoles/DIPOLE_covariant.F | 2 +- src/hamiltonian/Apply_W_field.F | 2 +- src/nloptics/NL_Berry_current.F | 2 +- src/nloptics/NL_current.F | 4 ++-- src/qp_control/DOUBLE_project.dep | 1 + src/qp_control/ELPH_project.dep | 1 + 9 files changed, 22 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 6031815a23..531bb0660a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24376 h.7c29bf68d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24377 h.1d1cd3f73. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24376 h.7c29bf68d' -PACKAGE_STRING='Yambo 5.3.0 r.24376 h.7c29bf68d' +PACKAGE_VERSION='5.3.0 r.24377 h.1d1cd3f73' +PACKAGE_STRING='Yambo 5.3.0 r.24377 h.1d1cd3f73' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1697,7 +1697,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24376 h.7c29bf68d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24377 h.1d1cd3f73 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1763,7 +1763,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24376 h.7c29bf68d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24377 h.1d1cd3f73:";; esac cat <<\_ACEOF @@ -2017,7 +2017,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24376 h.7c29bf68d +Yambo configure 5.3.0 r.24377 h.1d1cd3f73 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2646,7 +2646,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24376 h.7c29bf68d, which was +It was created by Yambo $as_me 5.3.0 r.24377 h.1d1cd3f73, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3404,8 +3404,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24376" -SHASH="7c29bf68d" +SREVISION="24377" +SHASH="1d1cd3f73" @@ -18410,7 +18410,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24376 h.7c29bf68d, which was +This file was extended by Yambo $as_me 5.3.0 r.24377 h.1d1cd3f73, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18474,7 +18474,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24376 h.7c29bf68d +Yambo config.status 5.3.0 r.24377 h.1d1cd3f73 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c11f2ae1cf..902f6bb2db 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24376 h.7c29bf68d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24377 h.1d1cd3f73, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24376" -SHASH="7c29bf68d" +SREVISION="24377" +SHASH="1d1cd3f73" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index d2149ee9fe..cd1ad3fe82 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -76,7 +76,7 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) enddo enddo ! - P_Berry_RED(id_in)=-P_Berry_RED(id_in)/real(Nperpend,SP) + P_Berry_RED(id_in)=P_Berry_RED(id_in)/real(Nperpend,SP) ! enddo ! diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index b8d6de6378..fe925eb748 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -159,7 +159,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle do idir=1,3 - DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))/cI + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(DIP_tmp(idir,ic,iv)+conjg(DIP_tmp(idir,iv,ic)))*cI enddo enddo enddo diff --git a/src/hamiltonian/Apply_W_field.F b/src/hamiltonian/Apply_W_field.F index 782d6df894..8480a9ea31 100644 --- a/src/hamiltonian/Apply_W_field.F +++ b/src/hamiltonian/Apply_W_field.F @@ -28,7 +28,7 @@ subroutine Apply_W_field(A_input,Wk,H_nl_sc) !$omp parallel do default(shared), private(i1,id) do i1=H_ref_bands(1),H_ref_bands(2) do id=1,3 - H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))- & + H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))=H_nl_sc(i1,H_ref_bands(1):H_ref_bands(2))+ & & E_vec_pot(id)*Wk(id,i1,H_ref_bands(1):H_ref_bands(2)) enddo enddo diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index 80cbcea2a2..3894083879 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -129,7 +129,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! !$omp parallel do default(shared), private(i1) do id=1,3 - NL_J(id)=-sum(NL_J_red(:)*a(:,id))/(4.0*pi) + NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0*pi) enddo !$omp end parallel do ! diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index 917539d684..ef7a33c2da 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -41,12 +41,12 @@ subroutine NL_current(k,E,V_input,NL_J) ! ! A : Current ! - call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & & V_bands=V_input,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! ! DEBUG < ! Calculate current using density matrix - ! call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & + ! call NL_average_operator(V_VALUE=NL_J(4:6), V_MATRIX=-DIP_v(:,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),:,:), & ! & dG=dG,k=k,en=E,TRANS=.TRUE.,nK_mem=PAR_Xk_nibz) ! DEBUG > ! diff --git a/src/qp_control/DOUBLE_project.dep b/src/qp_control/DOUBLE_project.dep index b839ec51b1..85e5eb127d 100644 --- a/src/qp_control/DOUBLE_project.dep +++ b/src/qp_control/DOUBLE_project.dep @@ -12,4 +12,5 @@ QP_fit_widths.o QP_load_DB.o QP_load_GFs.o + objects.o diff --git a/src/qp_control/ELPH_project.dep b/src/qp_control/ELPH_project.dep index 447d6ac6c6..266be8fb5c 100644 --- a/src/qp_control/ELPH_project.dep +++ b/src/qp_control/ELPH_project.dep @@ -1,3 +1,4 @@ QP_load_DB.o QP_load_GFs.o + objects.o From dea02f69dee04702c78e06ee33c37770a6f4508b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 4 May 2025 21:34:32 +0200 Subject: [PATCH 0950/1367] Addressing issue #207 --- src/bse/K_multiply_by_V.F | 4 +++- src/bse/K_multiply_by_V_transpose.F | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bse/K_multiply_by_V.F b/src/bse/K_multiply_by_V.F index f1a205aa12..df5ecd2bcd 100644 --- a/src/bse/K_multiply_by_V.F +++ b/src/bse/K_multiply_by_V.F @@ -46,7 +46,9 @@ subroutine K_multiply_by_V(Vi,Vo,iter_par,iq,mode) ! if(BSS_uses_FKE) FG_factor_c = cmplx(FG_factor,0._SP) ! - forall(i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) Vo(i_g)%fragment = cZERO + do concurrent (i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) + Vo(i_g)%fragment = cZERO + enddo ! do i_B=1,n_BS_blks ! diff --git a/src/bse/K_multiply_by_V_transpose.F b/src/bse/K_multiply_by_V_transpose.F index f4ea5ff9ac..4fef484e87 100644 --- a/src/bse/K_multiply_by_V_transpose.F +++ b/src/bse/K_multiply_by_V_transpose.F @@ -40,7 +40,9 @@ subroutine K_multiply_by_V_transpose(Vi,Vo,iter_par,iq) if(.not.BSS_Slepc_double_grp) alpha=-real(iter_par,SP)*cI if( BSS_Slepc_double_grp) alpha=-real(iter_par,SP) ! - forall(i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) Vo(i_g)%fragment = cZERO + do concurrent (i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) + Vo(i_g)%fragment = cZERO + enddo ! do i_B=1,n_BS_blks ! From 9d3f0bd08d44b57483bb0f10914ef4cec96aca77 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 5 May 2025 22:45:13 +0200 Subject: [PATCH 0951/1367] Fixed compilation of ydiago for code with gpu support, but without elpa linking lib Restored project dipendencies stamp --- config/configure.ac | 6 +- config/m4/acx_report.m4 | 13 ++- config/m4/yambo_diago.m4 | 22 ++-- config/report.in | 2 +- config/setup.in | 1 + .../project_dependencies.stamp | 0 configure | 107 ++++++++++-------- lib/ydiago/Makefile.loc | 9 +- lib/ydiago/make_ydiago.inc.in | 4 +- 9 files changed, 99 insertions(+), 65 deletions(-) create mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/configure.ac b/config/configure.ac index 71d4175b42..8b42acb9e1 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -261,9 +261,6 @@ m4_include([config/m4/device_xlib.m4]) # AC_LANG_PUSH(Fortran) # ============================================================================ -# Yambo Libs -AC_YDIAGO -# ============================================================================ # YDB/YAMBOpy ACX_SCRIPTS # ============================================================================ @@ -307,6 +304,9 @@ ACX_LIBCUDA # CUDA AC_SET_GPU # ============================================================================ +# Diago library +AC_YDIAGO +# ============================================================================ # Device XLIB ACX_DEVXLIB # ============================================================================ diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index fa309b3fb0..e61bbe0291 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -124,6 +124,12 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # +if test x"$with_ydiago_branch" = "xnone"; then + YDIAGO_check="I"; +else + YDIAGO_check="G"; +fi +# PETSC_check="-" PETSC_info="" if test "$internal_petsc" = "yes" ; then @@ -240,6 +246,7 @@ AC_SUBST(LAPACK_check) AC_SUBST(BLACS_check) AC_SUBST(SLK_check) AC_SUBST(ELPA_check) +AC_SUBST(YDIAGO_check) AC_SUBST(PETSC_check) AC_SUBST(SLEPC_check) AC_SUBST(PETSC_info) @@ -257,9 +264,11 @@ AC_SUBST(MPI_info) # # STRIPE [LIB] from paths # -ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") +ACX_STRIPE_SUBPATH($YDIAGO_LIBS,"LIB") +#ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") YDIAGO_LIBS_R=$STRIPE -ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") +ACX_STRIPE_SUBPATH($YDIAGO_INCS,"INC") +#ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") YDIAGO_INCS_R=$STRIPE AC_SUBST(YDIAGO_LIBS_R) AC_SUBST(YDIAGO_INCS_R) diff --git a/config/m4/yambo_diago.m4 b/config/m4/yambo_diago.m4 index 595c16bbea..51d45979d8 100644 --- a/config/m4/yambo_diago.m4 +++ b/config/m4/yambo_diago.m4 @@ -11,20 +11,26 @@ AC_DEFUN([AC_YDIAGO],[ AC_ARG_WITH(ydiago-branch,[AS_HELP_STRING([--with-ydiago-branch=],[Use the of the ydiago repository.],[32])],,[with_ydiago_branch=none]) # AC_CONFIG_FILES([lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in]) -if test x"$with_ydiago_branch" = "xnone"; then - ydiago_check="D"; + +# GPU flags are passed to ydiago compilation only if elpa library is available +if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then + ydiago_opt="$def_gpu $def_elpa" + YDIAGO_GPU_SUPPORT="$GPU_SUPPORT" else - ydiago_check="G"; + ydiago_opt="$def_elpa" + YDIAGO_GPU_SUPPORT="no_gpu" fi -#YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libydiago.a" -#YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include/" -YDIAGO_LIBS="${compdir}/lib/libydiago.a" -YDIAGO_INCS="$IFLAG${compdir}/include/" + +YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib/libydiago.a" +YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include/" +#YDIAGO_LIBS="${compdir}/lib/libydiago.a" +#YDIAGO_INCS="$IFLAG${compdir}/include/" AC_SUBST(YDIAGO_LIBS) AC_SUBST(YDIAGO_INCS) +AC_SUBST(YDIAGO_GPU_SUPPORT) -AC_SUBST(ydiago_check) +AC_SUBST(ydiago_opt) AC_SUBST(with_ydiago_branch) ]) diff --git a/config/report.in b/config/report.in index 357a417f5e..1842c5777b 100644 --- a/config/report.in +++ b/config/report.in @@ -72,7 +72,7 @@ # # > OTHERs: @DEVXLIB_info@ # -# [@ydiago_check@] Ydiago : @YDIAGO_LIBS_R@ +# [@YDIAGO_check@] Ydiago : @YDIAGO_LIBS_R@ # @YDIAGO_INCS_R@ # [@LIBXC_check@] LibXC : @LIBXC_LIBS_R@ # @LIBXC_INCS_R@ diff --git a/config/setup.in b/config/setup.in index 2fad7b683b..01350b7271 100644 --- a/config/setup.in +++ b/config/setup.in @@ -94,6 +94,7 @@ drocmlib = @LIBROCM_PATH@ devxlib_flgs= @DEVXLIB_FLAGS@ devxlib_clib= @DEVXLIB_CUDALIBS@ gpu_support = @GPU_SUPPORT@ +ydiago_gpu_support = @YDIAGO_GPU_SUPPORT@ lfft = @FFT_LIBS@ ifft = @FFT_INCS@ liotk = @IOTK_LIBS@ diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/configure b/configure index 531bb0660a..52beea8ec3 100755 --- a/configure +++ b/configure @@ -707,6 +707,7 @@ SLEPC_info PETSC_info SLEPC_check PETSC_check +YDIAGO_check ELPA_check SLK_check BLACS_check @@ -744,6 +745,11 @@ internal_devxlib compile_devxlib DEVXLIB_INCS DEVXLIB_LIBS +with_ydiago_branch +ydiago_opt +YDIAGO_GPU_SUPPORT +YDIAGO_INCS +YDIAGO_LIBS MKLGPU_LIBS LIBROCM_PATH LIBROCM_INCS @@ -867,10 +873,6 @@ internal_blas FLIBS YDB_dir GIT -with_ydiago_branch -ydiago_check -YDIAGO_INCS -YDIAGO_LIBS MPI_LIB_DIR MPI_INC_DIR MPI_LIBS @@ -1029,7 +1031,6 @@ with_mpi_libs with_mpi_path with_mpi_libdir with_mpi_includedir -with_ydiago_branch enable_ydb with_blas_libs enable_int_linalg @@ -1119,6 +1120,7 @@ with_rocm_libdir with_rocm_includedir with_rocm_path with_mklgpu_libs +with_ydiago_branch with_devxlib_libs with_devxlib_path with_devxlib_libdir @@ -1834,7 +1836,6 @@ Optional Packages: --with-mpi-path= Path to the MPI install directory --with-mpi-libdir= Path to the MPI lib directory --with-mpi-includedir= Path to the MPI include directory - --with-ydiago-branch= Use the of the ydiago repository. --with-blas-libs= Use BLAS libraries --with-lapack-libs= Use LAPACK libraries --with-fft-libs= Link to FFT libraries @@ -1917,6 +1918,7 @@ Optional Packages: --with-rocm-includedir= Path to the rocm include directory --with-rocm-path= Path to rocm install directory --with-mklgpu-libs= Use the MKLGPU library + --with-ydiago-branch= Use the of the ydiago repository. --with-devxlib-libs= Use devxlib libraries --with-devxlib-path= Path to devxlib install directory --with-devxlib-libdir= Path to the devxlib lib directory @@ -10691,40 +10693,6 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -# ============================================================================ -# Yambo Libs - - -# - -# Check whether --with-ydiago-branch was given. -if test ${with_ydiago_branch+y} -then : - withval=$with_ydiago_branch; -else $as_nop - with_ydiago_branch=none -fi - -# -ac_config_files="$ac_config_files lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" - -if test x"$with_ydiago_branch" = "xnone"; then - ydiago_check="D"; -else - ydiago_check="G"; -fi -#YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libydiago.a" -#YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/include/" -YDIAGO_LIBS="${compdir}/lib/libydiago.a" -YDIAGO_INCS="$IFLAG${compdir}/include/" - - - - - - - - # ============================================================================ # YDB/YAMBOpy @@ -16651,6 +16619,46 @@ fi # +# ============================================================================ +# Diago library + + +# + +# Check whether --with-ydiago-branch was given. +if test ${with_ydiago_branch+y} +then : + withval=$with_ydiago_branch; +else $as_nop + with_ydiago_branch=none +fi + +# +ac_config_files="$ac_config_files lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" + + +# GPU flags are passed to ydiago compilation only if elpa library is available +if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then + ydiago_opt="$def_gpu $def_elpa" + YDIAGO_GPU_SUPPORT="$GPU_SUPPORT" +else + ydiago_opt="$def_elpa" + YDIAGO_GPU_SUPPORT="no_gpu" +fi + +YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib/libydiago.a" +YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include/" +#YDIAGO_LIBS="${compdir}/lib/libydiago.a" +#YDIAGO_INCS="$IFLAG${compdir}/include/" + + + + + + + + + # ============================================================================ # Device XLIB @@ -17239,6 +17247,12 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # +if test x"$with_ydiago_branch" = "xnone"; then + YDIAGO_check="I"; +else + YDIAGO_check="G"; +fi +# PETSC_check="-" PETSC_info="" if test "$internal_petsc" = "yes" ; then @@ -17359,6 +17373,7 @@ fi + # @@ -17374,23 +17389,25 @@ fi # TMP1=`echo $YDIAGO_LIBS | sed 's/\//+/g'` -TMP2=`echo $compdir | sed 's/\//+/g'` -TMP3=`echo $TMP1 | sed "s/$TMP2/\(CMP\)/g"` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` STRIPE=`echo $TMP3 | sed 's/+/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi +#ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") YDIAGO_LIBS_R=$STRIPE TMP1=`echo $YDIAGO_INCS | sed 's/\//+/g'` -TMP2=`echo $compdir | sed 's/\//+/g'` -TMP3=`echo $TMP1 | sed "s/$TMP2/\(CMP\)/g"` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` STRIPE=`echo $TMP3 | sed 's/+/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi +#ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") YDIAGO_INCS_R=$STRIPE @@ -18595,10 +18612,10 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "lib/ydiago/make_ydiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" ;; "lib/fftqe/c_defs.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" ;; "lib/fftqe/fftqe_defs.h") CONFIG_FILES="$CONFIG_FILES lib/fftqe/fftqe_defs.h:lib/fftqe/fftqe_defs.h.in" ;; "lib/iotk/make_iotk.inc") CONFIG_FILES="$CONFIG_FILES lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" ;; + "lib/ydiago/make_ydiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" ;; "lib/magma/make_magma.inc") CONFIG_FILES="$CONFIG_FILES lib/magma/make_magma.inc:lib/magma/make_magma.inc.in" ;; "include/headers/common/have_malloc.h") CONFIG_HEADERS="$CONFIG_HEADERS include/headers/common/have_malloc.h:include/headers/common/have_malloc.h.in" ;; "config/setup") CONFIG_FILES="$CONFIG_FILES config/setup" ;; diff --git a/lib/ydiago/Makefile.loc b/lib/ydiago/Makefile.loc index 34bf14a483..4e950a235a 100644 --- a/lib/ydiago/Makefile.loc +++ b/lib/ydiago/Makefile.loc @@ -7,7 +7,8 @@ include ../../config/setup include ../archive/package.list # LIBNAME=libydiago.a -LIBPATH=$(libs_prefix)/$(fc_kind)/${fc} +LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/$(ydiago_gpu_support) +#LIBPATH=$(compdir) LIBRARY=$(LIBPATH)/lib/$(LIBNAME) # PACKAGE=$(pkgname_Ydiago) @@ -46,9 +47,9 @@ install: uncompress configure compile echo "cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libydiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ echo "cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ echo "chmod +x $(LIBPATH)/lib/libydiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a ${compdir}/lib/libydiago.a ;\ - cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod ${compdir}/include/ ;\ - chmod +x ${compdir}/lib/libydiago.a ; \ + cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libydiago.a ;\ + cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/ ;\ + chmod +x $(LIBPATH)/lib/libydiago.a ; \ touch ${compdir}/config/stamps_and_lists/libydiago.a.stamp;\ echo ydiago_interface >> ${compdir}/src/bse/modules.list;\ touch installed.stamp;\ diff --git a/lib/ydiago/make_ydiago.inc.in b/lib/ydiago/make_ydiago.inc.in index 22fd66de19..9df1c17724 100644 --- a/lib/ydiago/make_ydiago.inc.in +++ b/lib/ydiago/make_ydiago.inc.in @@ -13,7 +13,7 @@ AR = @AR@ CPP = @CPP@ CFLAGS = -O3 #@CFLAGS@ #-g -fsanitize=address -fno-omit-frame-pointer -YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @def_gpu@ @def_elpa@ +YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @ydiago_opt@ ELPA_INC = @ELPA_INCS@ @LIBCUDA_INCS@ @GPU_INCS@ @LIBROCM_INCS@ # @@ -60,6 +60,6 @@ RANLIB = echo # libraries # -#LIBS = $(extlibs_prefix)/$(fc_kind)/$(f90)/lib/libydiago.a +#LIBS = $(extlibs_prefix)/$(fc_kind)/$(f90)/$(ydiago_gpu_support)/lib/libydiago.a LIBS = ./libydiago.a IFLAGS = -I./ -I../ -I../include From 37b8811180aa5b78c509141857a0510aa968d985 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 5 May 2025 23:22:51 +0200 Subject: [PATCH 0952/1367] Removed useless objects.o files --- src/qp_control/DOUBLE_project.dep | 2 -- src/qp_control/ELPH_project.dep | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/qp_control/DOUBLE_project.dep b/src/qp_control/DOUBLE_project.dep index 85e5eb127d..5cbc104b85 100644 --- a/src/qp_control/DOUBLE_project.dep +++ b/src/qp_control/DOUBLE_project.dep @@ -12,5 +12,3 @@ QP_fit_widths.o QP_load_DB.o QP_load_GFs.o - objects.o - diff --git a/src/qp_control/ELPH_project.dep b/src/qp_control/ELPH_project.dep index 266be8fb5c..0ade97910b 100644 --- a/src/qp_control/ELPH_project.dep +++ b/src/qp_control/ELPH_project.dep @@ -1,4 +1,2 @@ QP_load_DB.o QP_load_GFs.o - objects.o - From 4551d48f5c9df3eb45222b59eaa65a7b9716f767 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 6 May 2025 17:40:38 +0200 Subject: [PATCH 0953/1367] Fixed readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d431de551e..d9713d73cd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +## Lumen +Lumen is a GPL code derived from Yambo 5.3. Here below the readme file from Yambo + ## Yambo This is the distribution of the Yambo code. Yambo doesn't stand for anything like "Yet Another Many-Body cOde", for instance. Unless you really want it to. From 332cce5849ba66edbf077f532328da1cb5f75f1d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 7 May 2025 13:56:04 +0200 Subject: [PATCH 0954/1367] Documentation updated --- src/wf_and_fft/WF_load.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 42978a8396..5d754f9d9e 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -15,14 +15,14 @@ !! @param[in] kpts_to_load k-points range !! @param[in] k_extrema_only k-points, load only !first and last in range !! @param[in] sp_pol_to_load spin-polarization range -!! @param[in] space R = real-space, G = G-space, C = ?, B = ? +!! @param[in] space R=real-space,G=G-space,C=k-centred,B=buff.-mode !! @param[in] title purpose of the wave-function loading !! @param[in] impose_free_and_alloc force deallocation of already loaded WF !! @param[in] force_WFo do not rotate the WF (for yambo_sc) !! @param[in] keep_states_to_load keep (.TRUE.) or not (.FALSE.) states already loaded !! @param[in] quiet turn off report and log for the WF_laod !! -!! @param[out] WF Wave-function object +!! @param[out] WF Wave-function object ! subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load,k_extrema_only,& & space,title,impose_free_and_alloc,force_WFo,keep_states_to_load,quiet) From 933bef444fb19a13b52034f2dcc0614fb243842b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 9 May 2025 22:40:03 +0200 Subject: [PATCH 0955/1367] MODIFIED * common/LEVELS_mirror.F Bugs: - Fixed bug introduced in previous commit Patch sent by: Davide Sangalli --- src/common/LEVELS_mirror.F | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/common/LEVELS_mirror.F b/src/common/LEVELS_mirror.F index d7b767cbef..6a6e9cc51f 100644 --- a/src/common/LEVELS_mirror.F +++ b/src/common/LEVELS_mirror.F @@ -35,7 +35,7 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) type(levels) ::E type(DIPOLE_t) ::Dip type(X_t) ::X(5) - logical ::l_USER_field(16) + logical ::l_USER_field(16),dip_bands_defined ! integer :: i1,SCATT_bands(2),DIP_bands(2) ! @@ -113,31 +113,26 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) ! Bands (Dipoles) !---------------- DIP_bands=-1 + dip_bands_defined=.false. ! Start from input if present - if( l_USER_field(6) ) DIP_bands=Dip%ib + if( l_USER_field(6) ) call def_dip_bands(Dip%ib) ! ! Test scatt bands - if( all((/SCATT_bands/=-1/) ) ) DIP_bands=SCATT_bands - DIP_bands(1)=min(DIP_bands(1),Dip%ib(1)) - DIP_bands(2)=max(DIP_bands(2),Dip%ib(2)) + if( all((/SCATT_bands/=-1/) ) ) call def_dip_bands(SCATT_bands) ! ! Test other fields do i1=1,5 if(.not.(l_USER_field(i1))) cycle - DIP_bands=X(i1)%ib + call def_dip_bands(X(i1)%ib) enddo - DIP_bands(1)=min(DIP_bands(1),Dip%ib(1)) - DIP_bands(2)=max(DIP_bands(2),Dip%ib(2)) ! - if( l_USER_field(7) ) DIP_bands=BS_bands + if( l_USER_field(7) ) call def_dip_bands(BS_bands) #if defined _RT || defined _QED || defined _NL - if( l_USER_field(8) ) DIP_bands=RT_bands + if( l_USER_field(8) ) call def_dip_bands(RT_bands) #endif #if defined _NL - if( l_USER_field(10)) DIP_bands=NL_bands + if( l_USER_field(10)) call def_dip_bands(NL_bands) #endif - DIP_bands(1)=min(DIP_bands(1),Dip%ib(1)) - DIP_bands(2)=max(DIP_bands(2),Dip%ib(2)) ! ! Any negative bands? !--------------------- @@ -164,4 +159,15 @@ subroutine fix_me(bands) if (bands(2)<0) bands(2)=E%nb end subroutine ! + subroutine def_dip_bands(bands_in) + integer, intent(in) :: bands_in(2) + if (dip_bands_defined) then + DIP_bands(1)=min(DIP_bands(1),bands_in(1)) + DIP_bands(2)=max(DIP_bands(2),bands_in(2)) + else + dip_bands_defined=.true. + DIP_bands=bands_in + endif + end subroutine def_dip_bands + ! end subroutine From 8770f5d99a1dcf827f76b7eded17345c7353aa2f Mon Sep 17 00:00:00 2001 From: Muralidhar Nalabothula Date: Tue, 13 May 2025 13:02:37 +0530 Subject: [PATCH 0956/1367] Driver code cleanup --- .gitignore | 1 + config/m4/acx_version.m4 | 1 + configure | 1 + include/driver/driver.h | 46 +- include/driver/editor.h.in | 4 +- include/driver/fortran_arguments.h | 11 - include/driver/fortran_driver.h | 82 +- include/driver/kind.h | 81 +- include/driver/tool.h | 34 - include/driver/wrapper.h | 16 +- include/driver/yambo_driver.h | 18 +- .../headers/parser/.!54618!gsl_complex_math.h | 2 + include/headers/parser/gsl_complex.h | 114 +- include/headers/parser/gsl_complex_math.h | 158 +-- include/headers/parser/parser.h | 18 +- include/headers/parser/symbols.h | 56 +- sbin/.clang-format | 6 + sbin/clang_format.sh | 3 + src/driver/command_line.c | 404 +++--- src/driver/driver.c | 113 +- src/driver/get_libraries.c | 104 +- src/driver/get_runlevel.c | 53 +- src/driver/get_running_project.c | 46 +- src/driver/get_running_tool.c | 33 +- src/driver/get_version.c | 51 +- src/driver/input_file.c | 63 +- src/driver/launcher.c | 211 +-- src/driver/load_environments.c | 115 +- src/driver/options_control.c | 276 ++-- src/driver/options_help.c | 43 +- src/driver/options_interfaces.c | 129 +- src/driver/options_maker.c | 206 +-- src/driver/options_projects.c | 281 ++-- src/driver/options_yambo.c | 267 ++-- src/driver/options_ypp.c | 416 +++--- src/driver/title.c | 55 +- src/driver/tool_init.c | 114 +- src/driver/usage.c | 326 +++-- src/driver/use_me.c | 72 +- src/driver/winsize.c | 38 +- src/parser/PARSER.c | 556 ++++---- src/parser/PARSER_exp.c | 224 +-- src/parser/PARSER_interface.c | 124 +- src/parser/PARSER_math.c | 1233 ++++++++-------- src/parser/PARSER_symbols.c | 362 ++--- src/parser/grammar.c | 1240 +++++++++-------- src/tools/c_printing.c | 71 +- src/tools/ct_cclock.c | 10 +- src/tools/ct_cptimer.c | 53 +- src/tools/ct_etime.c | 20 +- src/tools/io.c | 110 +- src/tools/memstat.c | 35 +- src/tools/stack.c | 18 +- 53 files changed, 4342 insertions(+), 3782 deletions(-) delete mode 100644 include/driver/fortran_arguments.h delete mode 100644 include/driver/tool.h create mode 100644 include/headers/parser/.!54618!gsl_complex_math.h create mode 100644 sbin/.clang-format create mode 100644 sbin/clang_format.sh diff --git a/.gitignore b/.gitignore index 1c7dd37270..bec4da83bf 100644 --- a/.gitignore +++ b/.gitignore @@ -139,3 +139,4 @@ autom4te.cache gfortran*.sh pgi*.sh nvidia*.sh +git_nmd.sh diff --git a/config/m4/acx_version.m4 b/config/m4/acx_version.m4 index 77de35ea64..162731196b 100644 --- a/config/m4/acx_version.m4 +++ b/config/m4/acx_version.m4 @@ -8,6 +8,7 @@ AC_DEFUN([ACX_VERSION], [ cat << EOF > include/version/version.h +#pragma once #define YAMBO_VERSION $SVERSION #define YAMBO_SUBVERSION $SSUBVERSION #define YAMBO_PATCHLEVEL $SPATCHLEVEL diff --git a/configure b/configure index 52beea8ec3..26ee9c9b8b 100755 --- a/configure +++ b/configure @@ -5081,6 +5081,7 @@ fi # version.m4 -> version.h cat << EOF > include/version/version.h +#pragma once #define YAMBO_VERSION $SVERSION #define YAMBO_SUBVERSION $SSUBVERSION #define YAMBO_PATCHLEVEL $SPATCHLEVEL diff --git a/include/driver/driver.h b/include/driver/driver.h index 7663f515cc..a53a1950b5 100644 --- a/include/driver/driver.h +++ b/include/driver/driver.h @@ -1,26 +1,38 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -struct yambo_seed_struct command_line(int argc, char *argv[],struct options_struct options[], struct tool_struct t, int *use_editor, int *use_mpi, int n_options); -void input_file(struct yambo_seed_struct y,struct tool_struct t, int *use_editor); -void launcher(int argc, char *argv[],int np, int pid, struct yambo_seed_struct y,int *use_editor , int *use_mpi ); -void options_maker(struct options_struct options[], int n_options); -struct tool_struct tool_init( ); -void usage(struct options_struct options[], struct tool_struct t, char* what, int n_options); -struct tool_struct versions( ); -void title(FILE *file_name,char *cmnt, struct tool_struct t); -int use_me(struct options_struct options[], struct tool_struct t, int i_opt); +#pragma once + +#include + +#include "kind.h" + +struct yambo_seed_struct command_line(int argc, char *argv[], + struct options_struct *options, + struct tool_struct t, int *use_editor, + int *use_mpi, int n_options); +void input_file(struct yambo_seed_struct y, struct tool_struct t, + int *use_editor); +void launcher(int argc, char *argv[], int np, int pid, + struct yambo_seed_struct y, int *use_editor, int *use_mpi); +void options_maker(struct options_struct *options, int n_options); +struct tool_struct tool_init(); +void usage(struct options_struct *options, struct tool_struct t, char *what, + int n_options); +struct tool_struct versions(); +void title(FILE *file_name, char *cmnt, struct tool_struct t); +int use_me(struct options_struct *options, struct tool_struct t, int i_opt); char *running_tool(); char *running_project(); char *running_libraries(); char *runlevel(int *runid, int *id); -void options_help(struct options_struct options[],int *i_opt); -void options_control(struct options_struct options[],int *i_opt); -void options_ypp(struct options_struct options[],int *i_opt); -void options_yambo(struct options_struct options[],int *i_opt); -void options_projects(struct options_struct options[],int *i_opt); -void options_interfaces(struct options_struct options[],int *i_opt); +void options_help(struct options_struct *options, int *i_opt); +void options_control(struct options_struct *options, int *i_opt); +void options_ypp(struct options_struct *options, int *i_opt); +void options_yambo(struct options_struct *options, int *i_opt); +void options_projects(struct options_struct *options, int *i_opt); +void options_interfaces(struct options_struct *options, int *i_opt); diff --git a/include/driver/editor.h.in b/include/driver/editor.h.in index 69b2626084..e96797cd09 100644 --- a/include/driver/editor.h.in +++ b/include/driver/editor.h.in @@ -5,4 +5,6 @@ Authors (see AUTHORS file for details): AM */ - char *editor="@editor@ "; +#pragma once + +char *editor="@editor@ "; diff --git a/include/driver/fortran_arguments.h b/include/driver/fortran_arguments.h deleted file mode 100644 index 7204a677de..0000000000 --- a/include/driver/fortran_arguments.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - License-Identifier: GPL - - Copyright (C) 2020 The Yambo Team - - Authors (see AUTHORS file for details): DS -*/ -&np,&pid, -&y.string_N,&y.in_file_N,&y.in_dir_N,&y.out_dir_N,&y.com_dir_N,&y.job_N, - y.string, y.in_file, y.in_dir, y.out_dir, y.com_dir, y.job, - y.string_N, y.in_file_N, y.in_dir_N, y.out_dir_N, y.com_dir_N, y.job_N diff --git a/include/driver/fortran_driver.h b/include/driver/fortran_driver.h index d4f987d7b5..ca5dc859e1 100644 --- a/include/driver/fortran_driver.h +++ b/include/driver/fortran_driver.h @@ -1,62 +1,34 @@ /* License-Identifier: GPL - + Copyright (C) 2019 The Yambo Team - + Authors (see AUTHORS file for details): DS */ -/* - Tool drivers -*/ -/* YAMBO +/* + Tool drivers */ -#if defined _yambo - #if defined _FORTRAN_US - int yambo_ - #else - int yambo - #endif -#endif -/* YPP */ -#if defined _ypp - #if defined _FORTRAN_US - int ypp_ - #else - int ypp - #endif -#endif -/* A2Y */ -#if defined _a2y - #if defined _FORTRAN_US - int a2y_ - #else - int a2y - #endif -#endif -/* C2Y */ -#if defined _c2y - #if defined _FORTRAN_US - int c2y_ - #else - int c2y - #endif -#endif -/* P2Y */ -#if defined _p2y - #if defined _FORTRAN_US - int p2y_ - #else - int p2y - #endif -#endif -/* E2Y */ -#if defined _e2y - #if defined _FORTRAN_US - int e2y_ - #else - int e2y - #endif +/* YAMBO + */ +#pragma once + +#if defined _FORTRAN_US +#define FORTRAN_DRIVER_MACRO(X) \ + int X##_(int *, int *, int *, int *, int *, int *, int *, int *, \ + char *string, char *in_file, char *in_dir, char *out_dir, \ + char *com_dir, char *job, int string_N, int in_file_N, \ + int in_dir_N, int out_dir_N, int com_dir_N, int job_N); +#else +#define FORTRAN_DRIVER_MACRO(X) \ + int X(int *, int *, int *, int *, int *, int *, int *, int *, \ + char *string, char *in_file, char *in_dir, char *out_dir, \ + char *com_dir, char *job, int string_N, int in_file_N, int in_dir_N, \ + int out_dir_N, int com_dir_N, int job_N); #endif - (int *, int *,int *,int *,int *,int *,int *,int *, - char *string, char *in_file, char *in_dir, char *out_dir, char *com_dir, char *job, - int string_N, int in_file_N, int in_dir_N, int out_dir_N, int com_dir_N, int job_N); + +FORTRAN_DRIVER_MACRO(yambo); +FORTRAN_DRIVER_MACRO(ypp); +FORTRAN_DRIVER_MACRO(a2y); +FORTRAN_DRIVER_MACRO(p2y); +FORTRAN_DRIVER_MACRO(c2y); +FORTRAN_DRIVER_MACRO(e2y); diff --git a/include/driver/kind.h b/include/driver/kind.h index bc6df98722..bba12f44b0 100644 --- a/include/driver/kind.h +++ b/include/driver/kind.h @@ -1,58 +1,59 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#pragma once + typedef struct tool_struct { - char *editor; - char *tool; - char *bin; - char *desc; - char version_string[500]; - char hash[500]; - char *pj; - int version; - int subversion; - int patchlevel; - int revision; + char *editor; + char *tool; + char *bin; + char *desc; + char version_string[500]; + char hash[500]; + char *pj; + int version; + int subversion; + int patchlevel; + int revision; } tool_struct; typedef struct yambo_seed_struct { - char string[500]; - char *in_file; - char *in_dir; - char *out_dir; - char *com_dir; - char *job; - char *parenv_file; - int string_N; - int in_file_N; - int in_dir_N; - int out_dir_N; - int com_dir_N; - int job_N; + char string[500]; + char *in_file; + char *in_dir; + char *out_dir; + char *com_dir; + char *job; + char *parenv_file; + int string_N; + int in_file_N; + int in_dir_N; + int out_dir_N; + int com_dir_N; + int job_N; } yambo_seed_struct; typedef struct options_struct { - int short_opt; - char *long_opt; - char *short_desc; - char long_desc[20][128]; - char *bin; - char *no_bin; - char *yambo_string; - char *section; - int int_var; - int float_var; - int char_var; - int optional_var; - int serial_var; + int short_opt; + char *long_opt; + char *short_desc; + char long_desc[20][128]; + char *bin; + char *no_bin; + char *yambo_string; + char *section; + int int_var; + int float_var; + int char_var; + int optional_var; + int serial_var; } options_struct; - diff --git a/include/driver/tool.h b/include/driver/tool.h deleted file mode 100644 index d6438e810d..0000000000 --- a/include/driver/tool.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - License-Identifier: GPL - - Copyright (C) 2019 The Yambo Team - - Authors (see AUTHORS file for details): DS - - tool & desc - -*/ -#if defined _yambo - char *tool="yambo"; - char *tool_desc="A shiny pot of fun and happiness [C.D.Hogan]"; -#endif -#if defined _ypp - char *tool="ypp"; - char *tool_desc="Y(ambo) P(ost)/(re) P(rocessor)"; -#endif -#if defined _a2y - char *tool="a2y"; - char *tool_desc="A(binit) 2 Y(ambo) interface"; -#endif -#if defined _c2y - char *tool="c2y"; - char *tool_desc="C(pmd) 2 Y(ambo) interface"; -#endif -#if defined _p2y - char *tool="p2y"; - char *tool_desc="P(Wscf) 2 Y(ambo) interface"; -#endif -#if defined _e2y - char *tool="e2y"; - char *tool_desc="E(TSF) 2 Y(ambo) interface (0.6)"; -#endif diff --git a/include/driver/wrapper.h b/include/driver/wrapper.h index 596f7aff4a..00e2c4d00f 100644 --- a/include/driver/wrapper.h +++ b/include/driver/wrapper.h @@ -1,23 +1,25 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): DS */ /* C wrapper -*/ +*/ +#pragma once + #if defined _C_US - #define C_FUNC(name,NAME) name ## _ +#define C_FUNC(name, NAME) name##_ #else - #define C_FUNC(name,NAME) name +#define C_FUNC(name, NAME) name #endif /* F90 wrapper */ #if defined _FORTRAN_US - #define F90_FUNC(name) name ## _ +#define F90_FUNC(name) name##_ #else - #define F90_FUNC(name) name +#define F90_FUNC(name) name #endif diff --git a/include/driver/yambo_driver.h b/include/driver/yambo_driver.h index e6f33c8361..154bdbb2eb 100644 --- a/include/driver/yambo_driver.h +++ b/include/driver/yambo_driver.h @@ -1,13 +1,17 @@ /* License-Identifier: GPL - + Copyright (C) 2019 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#pragma once + +#include "kind.h" + int load_environments(char *file_name); -void options_control(struct options_struct options[],int *i_opt); -void options_yambo(struct options_struct options[],int *i_opt); -void options_projects(struct options_struct options[],int *i_opt); -void options_interfaces(struct options_struct options[],int *i_opt); -void options_ypp(struct options_struct options[],int *i_opt); +void options_control(struct options_struct *options, int *i_opt); +void options_yambo(struct options_struct *options, int *i_opt); +void options_projects(struct options_struct *options, int *i_opt); +void options_interfaces(struct options_struct *options, int *i_opt); +void options_ypp(struct options_struct *options, int *i_opt); diff --git a/include/headers/parser/.!54618!gsl_complex_math.h b/include/headers/parser/.!54618!gsl_complex_math.h new file mode 100644 index 0000000000..25b30ad619 --- /dev/null +++ b/include/headers/parser/.!54618!gsl_complex_math.h @@ -0,0 +1,2 @@ +/* complex/gsl_complex_math.h + * diff --git a/include/headers/parser/gsl_complex.h b/include/headers/parser/gsl_complex.h index f9fa463b1c..269d40e600 100644 --- a/include/headers/parser/gsl_complex.h +++ b/include/headers/parser/gsl_complex.h @@ -1,17 +1,17 @@ /* complex/gsl_complex.h - * + * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Gerard Jungman, Brian Gough - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -23,80 +23,94 @@ #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } +#define __BEGIN_DECLS \ + extern "C" \ + { +#define __END_DECLS } #else -# define __BEGIN_DECLS /* empty */ -# define __END_DECLS /* empty */ +#define __BEGIN_DECLS /* empty */ +#define __END_DECLS /* empty */ #endif __BEGIN_DECLS - /* two consecutive built-in types as a complex number */ -typedef double * gsl_complex_packed ; -typedef float * gsl_complex_packed_float ; -typedef long double * gsl_complex_packed_long_double ; - -typedef const double * gsl_const_complex_packed ; -typedef const float * gsl_const_complex_packed_float ; -typedef const long double * gsl_const_complex_packed_long_double ; +typedef double* gsl_complex_packed; +typedef float* gsl_complex_packed_float; +typedef long double* gsl_complex_packed_long_double; +typedef const double* gsl_const_complex_packed; +typedef const float* gsl_const_complex_packed_float; +typedef const long double* gsl_const_complex_packed_long_double; /* 2N consecutive built-in types as N complex numbers */ -typedef double * gsl_complex_packed_array ; -typedef float * gsl_complex_packed_array_float ; -typedef long double * gsl_complex_packed_array_long_double ; - -typedef const double * gsl_const_complex_packed_array ; -typedef const float * gsl_const_complex_packed_array_float ; -typedef const long double * gsl_const_complex_packed_array_long_double ; +typedef double* gsl_complex_packed_array; +typedef float* gsl_complex_packed_array_float; +typedef long double* gsl_complex_packed_array_long_double; +typedef const double* gsl_const_complex_packed_array; +typedef const float* gsl_const_complex_packed_array_float; +typedef const long double* gsl_const_complex_packed_array_long_double; /* Yes... this seems weird. Trust us. The point is just that sometimes you want to make it obvious that something is an output value. The fact that it lacks a 'const' may not be enough of a clue for people in some contexts. */ -typedef double * gsl_complex_packed_ptr ; -typedef float * gsl_complex_packed_float_ptr ; -typedef long double * gsl_complex_packed_long_double_ptr ; - -typedef const double * gsl_const_complex_packed_ptr ; -typedef const float * gsl_const_complex_packed_float_ptr ; -typedef const long double * gsl_const_complex_packed_long_double_ptr ; +typedef double* gsl_complex_packed_ptr; +typedef float* gsl_complex_packed_float_ptr; +typedef long double* gsl_complex_packed_long_double_ptr; +typedef const double* gsl_const_complex_packed_ptr; +typedef const float* gsl_const_complex_packed_float_ptr; +typedef const long double* gsl_const_complex_packed_long_double_ptr; typedef struct - { +{ long double dat[2]; - } -gsl_complex_long_double; +} gsl_complex_long_double; typedef struct - { +{ double dat[2]; - } -gsl_complex; +} gsl_complex; typedef struct - { +{ float dat[2]; - } -gsl_complex_float; +} gsl_complex_float; -#define GSL_REAL(z) ((z).dat[0]) -#define GSL_IMAG(z) ((z).dat[1]) +#define GSL_REAL(z) ((z).dat[0]) +#define GSL_IMAG(z) ((z).dat[1]) #define GSL_COMPLEX_P(zp) ((zp)->dat) -#define GSL_COMPLEX_P_REAL(zp) ((zp)->dat[0]) -#define GSL_COMPLEX_P_IMAG(zp) ((zp)->dat[1]) -#define GSL_COMPLEX_EQ(z1,z2) (((z1).dat[0] == (z2).dat[0]) && ((z1).dat[1] == (z2).dat[1])) - -#define GSL_SET_COMPLEX(zp,x,y) do {(zp)->dat[0]=(x); (zp)->dat[1]=(y);} while(0) -#define GSL_SET_REAL(zp,x) do {(zp)->dat[0]=(x);} while(0) -#define GSL_SET_IMAG(zp,y) do {(zp)->dat[1]=(y);} while(0) - -#define GSL_SET_COMPLEX_PACKED(zp,n,x,y) do {*((zp)+2*(n))=(x); *((zp)+(2*(n)+1))=(y);} while(0) +#define GSL_COMPLEX_P_REAL(zp) ((zp)->dat[0]) +#define GSL_COMPLEX_P_IMAG(zp) ((zp)->dat[1]) +#define GSL_COMPLEX_EQ(z1, z2) \ + (((z1).dat[0] == (z2).dat[0]) && ((z1).dat[1] == (z2).dat[1])) + +#define GSL_SET_COMPLEX(zp, x, y) \ + do \ + { \ + (zp)->dat[0] = (x); \ + (zp)->dat[1] = (y); \ + } while (0) +#define GSL_SET_REAL(zp, x) \ + do \ + { \ + (zp)->dat[0] = (x); \ + } while (0) +#define GSL_SET_IMAG(zp, y) \ + do \ + { \ + (zp)->dat[1] = (y); \ + } while (0) + +#define GSL_SET_COMPLEX_PACKED(zp, n, x, y) \ + do \ + { \ + *((zp) + 2 * (n)) = (x); \ + *((zp) + (2 * (n) + 1)) = (y); \ + } while (0) __END_DECLS diff --git a/include/headers/parser/gsl_complex_math.h b/include/headers/parser/gsl_complex_math.h index 77e25d7308..5521eb1185 100644 --- a/include/headers/parser/gsl_complex_math.h +++ b/include/headers/parser/gsl_complex_math.h @@ -1,17 +1,17 @@ /* complex/gsl_complex_math.h - * + * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Jorma Olavi Tähtinen, Brian Gough - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -24,116 +24,118 @@ #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus -#define __BEGIN_DECLS extern "C" { +#define __BEGIN_DECLS \ + extern "C" \ + { #define __END_DECLS } #else -#define __BEGIN_DECLS /* empty */ -#define __END_DECLS /* empty */ +#define __BEGIN_DECLS /* empty */ +#define __END_DECLS /* empty */ #endif __BEGIN_DECLS /* Complex numbers */ -gsl_complex gsl_complex_rect (double x, double y); /* r= real+i*imag */ -gsl_complex gsl_complex_polar (double r, double theta); /* r= r e^(i theta) */ +gsl_complex gsl_complex_rect(double x, double y); /* r= real+i*imag */ +gsl_complex gsl_complex_polar(double r, double theta); /* r= r e^(i theta) */ #ifdef HAVE_INLINE -extern inline gsl_complex -gsl_complex_rect (double x, double y) -{ /* return z = x + i y */ - gsl_complex z; - GSL_SET_COMPLEX (&z, x, y); - return z; +extern inline gsl_complex gsl_complex_rect(double x, double y) +{ /* return z = x + i y */ + gsl_complex z; + GSL_SET_COMPLEX(&z, x, y); + return z; } #endif -#define GSL_COMPLEX_ONE (gsl_complex_rect(1.0,0.0)) -#define GSL_COMPLEX_ZERO (gsl_complex_rect(0.0,0.0)) -#define GSL_COMPLEX_NEGONE (gsl_complex_rect(-1.0,0.0)) +#define GSL_COMPLEX_ONE (gsl_complex_rect(1.0, 0.0)) +#define GSL_COMPLEX_ZERO (gsl_complex_rect(0.0, 0.0)) +#define GSL_COMPLEX_NEGONE (gsl_complex_rect(-1.0, 0.0)) /* Properties of complex numbers */ -double gsl_complex_arg (gsl_complex z); /* return arg(z), -pi< arg(z) <=+pi */ -double gsl_complex_abs (gsl_complex z); /* return |z| */ -double gsl_complex_abs2 (gsl_complex z); /* return |z|^2 */ -double gsl_complex_logabs (gsl_complex z); /* return log|z| */ +double gsl_complex_arg(gsl_complex z); /* return arg(z), -pi< arg(z) <=+pi */ +double gsl_complex_abs(gsl_complex z); /* return |z| */ +double gsl_complex_abs2(gsl_complex z); /* return |z|^2 */ +double gsl_complex_logabs(gsl_complex z); /* return log|z| */ /* Complex arithmetic operators */ -gsl_complex gsl_complex_add (gsl_complex a, gsl_complex b); /* r=a+b */ -gsl_complex gsl_complex_sub (gsl_complex a, gsl_complex b); /* r=a-b */ -gsl_complex gsl_complex_mul (gsl_complex a, gsl_complex b); /* r=a*b */ -gsl_complex gsl_complex_div (gsl_complex a, gsl_complex b); /* r=a/b */ - -gsl_complex gsl_complex_add_real (gsl_complex a, double x); /* r=a+x */ -gsl_complex gsl_complex_sub_real (gsl_complex a, double x); /* r=a-x */ -gsl_complex gsl_complex_mul_real (gsl_complex a, double x); /* r=a*x */ -gsl_complex gsl_complex_div_real (gsl_complex a, double x); /* r=a/x */ - -gsl_complex gsl_complex_add_imag (gsl_complex a, double y); /* r=a+iy */ -gsl_complex gsl_complex_sub_imag (gsl_complex a, double y); /* r=a-iy */ -gsl_complex gsl_complex_mul_imag (gsl_complex a, double y); /* r=a*iy */ -gsl_complex gsl_complex_div_imag (gsl_complex a, double y); /* r=a/iy */ - -gsl_complex gsl_complex_conjugate (gsl_complex z); /* r=conj(z) */ -gsl_complex gsl_complex_inverse (gsl_complex a); /* r=1/a */ -gsl_complex gsl_complex_negative (gsl_complex a); /* r=-a */ +gsl_complex gsl_complex_add(gsl_complex a, gsl_complex b); /* r=a+b */ +gsl_complex gsl_complex_sub(gsl_complex a, gsl_complex b); /* r=a-b */ +gsl_complex gsl_complex_mul(gsl_complex a, gsl_complex b); /* r=a*b */ +gsl_complex gsl_complex_div(gsl_complex a, gsl_complex b); /* r=a/b */ + +gsl_complex gsl_complex_add_real(gsl_complex a, double x); /* r=a+x */ +gsl_complex gsl_complex_sub_real(gsl_complex a, double x); /* r=a-x */ +gsl_complex gsl_complex_mul_real(gsl_complex a, double x); /* r=a*x */ +gsl_complex gsl_complex_div_real(gsl_complex a, double x); /* r=a/x */ + +gsl_complex gsl_complex_add_imag(gsl_complex a, double y); /* r=a+iy */ +gsl_complex gsl_complex_sub_imag(gsl_complex a, double y); /* r=a-iy */ +gsl_complex gsl_complex_mul_imag(gsl_complex a, double y); /* r=a*iy */ +gsl_complex gsl_complex_div_imag(gsl_complex a, double y); /* r=a/iy */ + +gsl_complex gsl_complex_conjugate(gsl_complex z); /* r=conj(z) */ +gsl_complex gsl_complex_inverse(gsl_complex a); /* r=1/a */ +gsl_complex gsl_complex_negative(gsl_complex a); /* r=-a */ /* Elementary Complex Functions */ -gsl_complex gsl_complex_sqrt (gsl_complex z); /* r=sqrt(z) */ -gsl_complex gsl_complex_sqrt_real (double x); /* r=sqrt(x) (x<0 ok) */ +gsl_complex gsl_complex_sqrt(gsl_complex z); /* r=sqrt(z) */ +gsl_complex gsl_complex_sqrt_real(double x); /* r=sqrt(x) (x<0 ok) */ -gsl_complex gsl_complex_pow (gsl_complex a, gsl_complex b); /* r=a^b */ -gsl_complex gsl_complex_pow_real (gsl_complex a, double b); /* r=a^b */ +gsl_complex gsl_complex_pow(gsl_complex a, gsl_complex b); /* r=a^b */ +gsl_complex gsl_complex_pow_real(gsl_complex a, double b); /* r=a^b */ -gsl_complex gsl_complex_exp (gsl_complex a); /* r=exp(a) */ -gsl_complex gsl_complex_log (gsl_complex a); /* r=log(a) (base e) */ -gsl_complex gsl_complex_log10 (gsl_complex a); /* r=log10(a) (base 10) */ -gsl_complex gsl_complex_log_b (gsl_complex a, gsl_complex b); /* r=log_b(a) (base=b) */ +gsl_complex gsl_complex_exp(gsl_complex a); /* r=exp(a) */ +gsl_complex gsl_complex_log(gsl_complex a); /* r=log(a) (base e) */ +gsl_complex gsl_complex_log10(gsl_complex a); /* r=log10(a) (base 10) */ +gsl_complex gsl_complex_log_b(gsl_complex a, + gsl_complex b); /* r=log_b(a) (base=b) */ /* Complex Trigonometric Functions */ -gsl_complex gsl_complex_sin (gsl_complex a); /* r=sin(a) */ -gsl_complex gsl_complex_cos (gsl_complex a); /* r=cos(a) */ -gsl_complex gsl_complex_sec (gsl_complex a); /* r=sec(a) */ -gsl_complex gsl_complex_csc (gsl_complex a); /* r=csc(a) */ -gsl_complex gsl_complex_tan (gsl_complex a); /* r=tan(a) */ -gsl_complex gsl_complex_cot (gsl_complex a); /* r=cot(a) */ +gsl_complex gsl_complex_sin(gsl_complex a); /* r=sin(a) */ +gsl_complex gsl_complex_cos(gsl_complex a); /* r=cos(a) */ +gsl_complex gsl_complex_sec(gsl_complex a); /* r=sec(a) */ +gsl_complex gsl_complex_csc(gsl_complex a); /* r=csc(a) */ +gsl_complex gsl_complex_tan(gsl_complex a); /* r=tan(a) */ +gsl_complex gsl_complex_cot(gsl_complex a); /* r=cot(a) */ /* Inverse Complex Trigonometric Functions */ -gsl_complex gsl_complex_arcsin (gsl_complex a); /* r=arcsin(a) */ -gsl_complex gsl_complex_arcsin_real (double a); /* r=arcsin(a) */ -gsl_complex gsl_complex_arccos (gsl_complex a); /* r=arccos(a) */ -gsl_complex gsl_complex_arccos_real (double a); /* r=arccos(a) */ -gsl_complex gsl_complex_arcsec (gsl_complex a); /* r=arcsec(a) */ -gsl_complex gsl_complex_arcsec_real (double a); /* r=arcsec(a) */ -gsl_complex gsl_complex_arccsc (gsl_complex a); /* r=arccsc(a) */ -gsl_complex gsl_complex_arccsc_real (double a); /* r=arccsc(a) */ -gsl_complex gsl_complex_arctan (gsl_complex a); /* r=arctan(a) */ -gsl_complex gsl_complex_arccot (gsl_complex a); /* r=arccot(a) */ +gsl_complex gsl_complex_arcsin(gsl_complex a); /* r=arcsin(a) */ +gsl_complex gsl_complex_arcsin_real(double a); /* r=arcsin(a) */ +gsl_complex gsl_complex_arccos(gsl_complex a); /* r=arccos(a) */ +gsl_complex gsl_complex_arccos_real(double a); /* r=arccos(a) */ +gsl_complex gsl_complex_arcsec(gsl_complex a); /* r=arcsec(a) */ +gsl_complex gsl_complex_arcsec_real(double a); /* r=arcsec(a) */ +gsl_complex gsl_complex_arccsc(gsl_complex a); /* r=arccsc(a) */ +gsl_complex gsl_complex_arccsc_real(double a); /* r=arccsc(a) */ +gsl_complex gsl_complex_arctan(gsl_complex a); /* r=arctan(a) */ +gsl_complex gsl_complex_arccot(gsl_complex a); /* r=arccot(a) */ /* Complex Hyperbolic Functions */ -gsl_complex gsl_complex_sinh (gsl_complex a); /* r=sinh(a) */ -gsl_complex gsl_complex_cosh (gsl_complex a); /* r=coshh(a) */ -gsl_complex gsl_complex_sech (gsl_complex a); /* r=sech(a) */ -gsl_complex gsl_complex_csch (gsl_complex a); /* r=csch(a) */ -gsl_complex gsl_complex_tanh (gsl_complex a); /* r=tanh(a) */ -gsl_complex gsl_complex_coth (gsl_complex a); /* r=coth(a) */ +gsl_complex gsl_complex_sinh(gsl_complex a); /* r=sinh(a) */ +gsl_complex gsl_complex_cosh(gsl_complex a); /* r=coshh(a) */ +gsl_complex gsl_complex_sech(gsl_complex a); /* r=sech(a) */ +gsl_complex gsl_complex_csch(gsl_complex a); /* r=csch(a) */ +gsl_complex gsl_complex_tanh(gsl_complex a); /* r=tanh(a) */ +gsl_complex gsl_complex_coth(gsl_complex a); /* r=coth(a) */ /* Inverse Complex Hyperbolic Functions */ -gsl_complex gsl_complex_arcsinh (gsl_complex a); /* r=arcsinh(a) */ -gsl_complex gsl_complex_arccosh (gsl_complex a); /* r=arccosh(a) */ -gsl_complex gsl_complex_arccosh_real (double a); /* r=arccosh(a) */ -gsl_complex gsl_complex_arcsech (gsl_complex a); /* r=arcsech(a) */ -gsl_complex gsl_complex_arccsch (gsl_complex a); /* r=arccsch(a) */ -gsl_complex gsl_complex_arctanh (gsl_complex a); /* r=arctanh(a) */ -gsl_complex gsl_complex_arctanh_real (double a); /* r=arctanh(a) */ -gsl_complex gsl_complex_arccoth (gsl_complex a); /* r=arccoth(a) */ +gsl_complex gsl_complex_arcsinh(gsl_complex a); /* r=arcsinh(a) */ +gsl_complex gsl_complex_arccosh(gsl_complex a); /* r=arccosh(a) */ +gsl_complex gsl_complex_arccosh_real(double a); /* r=arccosh(a) */ +gsl_complex gsl_complex_arcsech(gsl_complex a); /* r=arcsech(a) */ +gsl_complex gsl_complex_arccsch(gsl_complex a); /* r=arccsch(a) */ +gsl_complex gsl_complex_arctanh(gsl_complex a); /* r=arctanh(a) */ +gsl_complex gsl_complex_arctanh_real(double a); /* r=arctanh(a) */ +gsl_complex gsl_complex_arccoth(gsl_complex a); /* r=arccoth(a) */ __END_DECLS diff --git a/include/headers/parser/parser.h b/include/headers/parser/parser.h index 9c23ea93ea..532782962e 100644 --- a/include/headers/parser/parser.h +++ b/include/headers/parser/parser.h @@ -46,12 +46,18 @@ int parse_block_complex(char *name, int l, int col, gsl_complex *r); int parse_block_string(char *name, int l, int col, char **r); /* from parse_exp.c */ -typedef struct parse_result{ - union { - gsl_complex c; - char *s; - } value; - enum {PR_CMPLX, PR_STR} type; +typedef struct parse_result +{ + union + { + gsl_complex c; + char *s; + } value; + enum + { + PR_CMPLX, + PR_STR + } type; } parse_result; int parse_exp(char *exp, parse_result *t); diff --git a/include/headers/parser/symbols.h b/include/headers/parser/symbols.h index 084254e007..cf72ca2d3a 100644 --- a/include/headers/parser/symbols.h +++ b/include/headers/parser/symbols.h @@ -22,41 +22,49 @@ #include -typedef struct sym_block_line{ - int n; - char **fields; -}sym_block_line; +typedef struct sym_block_line +{ + int n; + char **fields; +} sym_block_line; -typedef struct sym_block{ - int n; - sym_block_line *lines; -}sym_block; +typedef struct sym_block +{ + int n; + sym_block_line *lines; +} sym_block; -typedef enum{ - S_CMPLX, S_STR, S_BLOCK, S_FNCT -}symrec_type; +typedef enum +{ + S_CMPLX, + S_STR, + S_BLOCK, + S_FNCT +} symrec_type; /* Data type for links in the chain of symbols. */ -typedef struct symrec{ - char *name; /* name of symbol */ - symrec_type type; /* type of symbol: either VAR or FNCT */ +typedef struct symrec +{ + char *name; /* name of symbol */ + symrec_type type; /* type of symbol: either VAR or FNCT */ - union { - gsl_complex c; /* value of a VAR */ - char *str; /* value of a STRING */ - sym_block *block; /* to store blocks */ - gsl_complex (*fnctptr)(); /* value of a FNCT */ - } value; + union + { + gsl_complex c; /* value of a VAR */ + char *str; /* value of a STRING */ + sym_block *block; /* to store blocks */ + gsl_complex (*fnctptr)(); /* value of a FNCT */ + } value; - struct symrec *next; /* link field */ + struct symrec *next; /* link field */ } symrec; /* The symbol table: a chain of struct symrec. */ extern symrec *sym_table; -symrec *putsym (char *sym_name, symrec_type sym_type); -symrec *getsym (char *sym_name); -int rmsym (char *sym_name); +symrec *putsym(char *sym_name, symrec_type sym_type); +symrec *getsym(char *sym_name); +int rmsym(char *sym_name); void sym_init_table(); void sym_clear_reserved(); void sym_end_table(); diff --git a/sbin/.clang-format b/sbin/.clang-format new file mode 100644 index 0000000000..7a41564904 --- /dev/null +++ b/sbin/.clang-format @@ -0,0 +1,6 @@ +BasedOnStyle: Google +IndentWidth: 4 +BreakBeforeBraces: Allman +AlignAfterOpenBracket: Align +InsertNewlineAtEOF : true +InsertBraces : true diff --git a/sbin/clang_format.sh b/sbin/clang_format.sh new file mode 100644 index 0000000000..49773492c3 --- /dev/null +++ b/sbin/clang_format.sh @@ -0,0 +1,3 @@ +CLANG_FMT=clang-format +$CLANG_FMT -i -style=file \ + ../src/*/*.c ../include/driver/*.h ../include/headers/parser/*.h diff --git a/src/driver/command_line.c b/src/driver/command_line.c index b8b6e397c2..ef1d52e1c0 100644 --- a/src/driver/command_line.c +++ b/src/driver/command_line.c @@ -1,16 +1,17 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Option-Example.html https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html#Getopt-Long-Options Data Type: struct option -This structure describes a single long option name for the sake of getopt_long. -The argument longopts must be an array of these structures, one for each long option. Terminate the array with an element containing all zeros. +This structure describes a single long option name for the sake of getopt_long. +The argument longopts must be an array of these structures, one for each long +option. Terminate the array with an element containing all zeros. The struct option structure has these fields: @@ -18,176 +19,255 @@ The struct option structure has these fields: This field is the name of the option. It is a string. - int has_arg - This field says whether the option takes an argument. It is an integer, and there are three legitimate values: no_argument, required_argument and optional_argument. + This field says whether the option takes an argument. It is an integer, and +there are three legitimate values: no_argument, required_argument and +optional_argument. - int *flag - int val These fields control how to report or act on the option when it occurs. - If flag is a null pointer, then the val is a value which identifies this option. - Often these values are chosen to uniquely identify particular long options. + If flag is a null pointer, then the val is a value which identifies this +option. Often these values are chosen to uniquely identify particular long +options. - If flag is not a null pointer, it should be the address of an int variable which is the flag for this option. - The value in val is the value to store in the flag to indicate that the option was seen. + If flag is not a null pointer, it should be the address of an int variable +which is the flag for this option. The value in val is the value to store in the +flag to indicate that the option was seen. */ +#include +#include +#include #include #include -#include #include -#include -#include -struct yambo_seed_struct command_line(int argc, char *argv[], struct options_struct opts[], struct tool_struct t, int *use_editor, int *use_mpi, int n_options) +struct yambo_seed_struct command_line(int argc, char *argv[], + struct options_struct opts[], + struct tool_struct t, int *use_editor, + int *use_mpi, int n_options) { - int n_active,n_vars,opt=0,i_opt; - char opt_string[100],ch[3],dummy[50]; - /* */ - yambo_seed_struct y; - /* - Pre-sets - */ - y.in_file = malloc(strlen(t.tool)+4); - y.parenv_file = NULL; - strcpy(y.in_file,t.tool); - strcat(y.in_file,".in"); - y.in_dir="."; - y.out_dir="."; - y.com_dir="."; - y.job=""; - strcpy(y.string,""); - strcpy(opt_string,""); - /* - Number of active options - */ - n_active=0; - for(i_opt=0;i_opt 0) {printf ("GETOPT ouput: %c %s",opts[i_opt].short_opt,opts[i_opt].long_opt);} - if (optarg != NULL) {printf (" with arg %s\n", optarg);} - if (optarg == NULL) {printf ("\n");} - */ - /* help */ - if (strcmp(opts[i_opt].long_opt,"help")==0){ - /* - printf ("OPT %s \n",optarg); - printf ("OPT %i \n",optind); - printf ("OPT %s \n",argv[optind]); - */ - if (optarg == NULL && argv[optind] != NULL && argv[optind][0] != '-') { - strcpy(dummy,argv[optind]); - ++optind; - }else{ - if (optarg == NULL) sprintf(dummy,"%s","help"); - if (optarg != NULL) sprintf(dummy,"%c",optarg); - } - /* DEBUG - printf ("USAGE call %s \n",dummy); - */ - usage(opts,t,dummy,n_options); - exit(0); - } - /* version */ - if (strcmp(opts[i_opt].long_opt,"version")==0){ - usage(opts,t,"version",n_options); - exit(0); - } - if (strcmp(opts[i_opt].long_opt,"Input")==0){y.in_file=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Job")==0){y.job=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Idir")==0){y.in_dir=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Cdir")==0){y.com_dir=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"parenv")==0){y.parenv_file=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"Odir")==0){y.out_dir=optarg;continue;} - if (strcmp(opts[i_opt].long_opt,"nompi")==0){*use_mpi=-1;continue;} - if (strcmp(opts[i_opt].long_opt,"Quiet")==0){*use_editor=-2;continue;} - if (opt > 0) { - strcat(y.string," "); - strcat(y.string,opts[i_opt].yambo_string); - } - if (optarg) { - strcat(y.string," "); - strcat(y.string,optarg); - } - }; - /* - Sizes - */ - y.string_N=strlen(y.string); - y.in_file_N=strlen(y.in_file); - y.out_dir_N=strlen(y.out_dir); - y.in_dir_N=strlen(y.in_dir); - y.com_dir_N=strlen(y.com_dir); - y.job_N=strlen(y.job); - /* */ - return(y); + int n_active, n_vars, opt = 0, i_opt; + char opt_string[100], ch[3], dummy[50]; + /* */ + yambo_seed_struct y; + /* + Pre-sets + */ + y.in_file = malloc(strlen(t.tool) + 4); + y.parenv_file = NULL; + strcpy(y.in_file, t.tool); + strcat(y.in_file, ".in"); + y.in_dir = "."; + y.out_dir = "."; + y.com_dir = "."; + y.job = ""; + strcpy(y.string, ""); + strcpy(opt_string, ""); + /* + Number of active options + */ + n_active = 0; + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (opts[i_opt].short_opt == 0) + { + break; + }; + n_active++; + } + /* + Long Options structure + */ + struct option long_options[n_active + 1]; + /* */ + n_active = 0; + for (i_opt = 0; i_opt < n_options; i_opt++) + { + /**/ + if (use_me(opts, t, i_opt) == 0) + { + continue; + } + if (opts[i_opt].short_opt == 0) + { + break; + }; + /**/ + long_options[n_active].name = opts[i_opt].long_opt; + long_options[n_active].flag = 0; + long_options[n_active].val = opts[i_opt].short_opt; + /* DEBUG + printf ("CMD: INIT %i \n",i_opt); + printf ("CMD: INIT %s \n",opts[i_opt].short_desc); + printf ("CMD: (opts.short_opt) %c \n",opts[i_opt].short_opt); + */ + sprintf(ch, "%c", opts[i_opt].short_opt); + strcat(opt_string, ch); + /* DEBUG printf("CMD: opt_string %s\n",opt_string);*/ + if (opts[i_opt].long_opt != NULL) + { + long_options[n_active].name = opts[i_opt].long_opt; + long_options[n_active].flag = 0; + } + /* DEBUG printf ("CMD: (opts.short_desc) %s + * \n",opts[i_opt].short_desc);*/ + /* DEBUG printf ("CMD: (opt_string (now)) %s \n",opt_string);*/ + /* VARS */ + n_vars = + opts[i_opt].int_var + opts[i_opt].float_var + opts[i_opt].char_var; + if (n_vars == 0) + { + /* DEBUG printf ("CMD (n_vars=0)\n");*/ + long_options[n_active].has_arg = no_argument; + } + else + { + /* DEBUG printf ("CMD (n_vars/=0) \n");*/ + long_options[n_active].has_arg = required_argument; + strcat(opt_string, ":"); + }; + if (opts[i_opt].optional_var == 1) + { + /* DEBUG printf ("CMD (opt_var) \n");*/ + long_options[n_active].has_arg = optional_argument; + strcat(opt_string, ":"); + } + n_active++; + }; + /* DEBUG + printf("before getopt %s\n",opt_string); + */ + long_options[n_active].name = 0; + long_options[n_active].has_arg = 0; + long_options[n_active].flag = 0; + long_options[n_active].val = 0; + int long_index = 0; + while ((opt = getopt_long_only(argc, argv, opt_string, long_options, + &long_index)) != -1) + { + /* No option valid */ + if (opt == '?') + { + printf("%s", "\n Use -h to list the options\n"); + exit(EXIT_FAILURE); + } + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (use_me(opts, t, i_opt) == 0) + { + continue; + } + if (opts[i_opt].short_opt == opt) + { + break; + }; + } + /* DEBUG + if (opt > 0) {printf ("GETOPT ouput: %c + %s",opts[i_opt].short_opt,opts[i_opt].long_opt);} if (optarg != NULL) + {printf (" with arg %s\n", optarg);} if (optarg == NULL) {printf + ("\n");} + */ + /* help */ + if (strcmp(opts[i_opt].long_opt, "help") == 0) + { + /* + printf ("OPT %s \n",optarg); + printf ("OPT %i \n",optind); + printf ("OPT %s \n",argv[optind]); + */ + if (optarg == NULL && argv[optind] != NULL && + argv[optind][0] != '-') + { + strcpy(dummy, argv[optind]); + ++optind; + } + else + { + if (optarg == NULL) + { + sprintf(dummy, "%s", "help"); + } + if (optarg != NULL) + { + sprintf(dummy, "%s", optarg); + } + } + /* DEBUG + printf ("USAGE call %s \n",dummy); + */ + usage(opts, t, dummy, n_options); + exit(0); + } + /* version */ + if (strcmp(opts[i_opt].long_opt, "version") == 0) + { + usage(opts, t, "version", n_options); + exit(0); + } + if (strcmp(opts[i_opt].long_opt, "Input") == 0) + { + y.in_file = optarg; + continue; + } + if (strcmp(opts[i_opt].long_opt, "Job") == 0) + { + y.job = optarg; + continue; + } + if (strcmp(opts[i_opt].long_opt, "Idir") == 0) + { + y.in_dir = optarg; + continue; + } + if (strcmp(opts[i_opt].long_opt, "Cdir") == 0) + { + y.com_dir = optarg; + continue; + } + if (strcmp(opts[i_opt].long_opt, "parenv") == 0) + { + y.parenv_file = optarg; + continue; + } + if (strcmp(opts[i_opt].long_opt, "Odir") == 0) + { + y.out_dir = optarg; + continue; + } + if (strcmp(opts[i_opt].long_opt, "nompi") == 0) + { + *use_mpi = -1; + continue; + } + if (strcmp(opts[i_opt].long_opt, "Quiet") == 0) + { + *use_editor = -2; + continue; + } + if (opt > 0) + { + strcat(y.string, " "); + strcat(y.string, opts[i_opt].yambo_string); + } + if (optarg) + { + strcat(y.string, " "); + strcat(y.string, optarg); + } + }; + /* + Sizes + */ + y.string_N = strlen(y.string); + y.in_file_N = strlen(y.in_file); + y.out_dir_N = strlen(y.out_dir); + y.in_dir_N = strlen(y.in_dir); + y.com_dir_N = strlen(y.com_dir); + y.job_N = strlen(y.job); + /* */ + return (y); }; - - - diff --git a/src/driver/driver.c b/src/driver/driver.c index 42ec933031..37d193d7f0 100644 --- a/src/driver/driver.c +++ b/src/driver/driver.c @@ -1,62 +1,81 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include +#include #include +#include #include -#include -#include -#if defined _MPI - #include +#if defined _MPI +#include #endif -/* +/* MAIN */ int main(int argc, char *argv[]) { - /* - Work Space - */ - int np=1,pid=0,use_mpi=1,use_editor=1,n_options=200; - /* - Yambo and Tool structures - */ - yambo_seed_struct y; - tool_struct tool; - struct options_struct options[n_options]; - /* - TOOL & Version initialization - */ - tool=tool_init(); - /* - Options "maker" - */ - options_maker(options,n_options); - /* - Command line parsing - */ - y=command_line(argc,argv,options,tool,&use_editor,&use_mpi,n_options); - /* - Launcher - */ - launcher(argc,argv,np,pid,y,&use_editor,&use_mpi); - /* - Input File - */ - input_file(y,tool,&use_editor); - /* - CLEAN & EXIT - =========================================================================== - */ + /* + Work Space + */ + int np = 1, pid = 0, use_mpi = 1, use_editor = 1, n_options = 200; + /* + Yambo and Tool structures + */ + yambo_seed_struct y; + tool_struct tool; + struct options_struct *options = + calloc(n_options, sizeof(*options)); //[n_options]; + if (!options) + { +#if defined _MPI + if (use_mpi == 1) + { + MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE); + } + else + { + exit(EXIT_FAILURE); + } +#else + exit(EXIT_FAILURE); +#endif + } + /* + TOOL & Version initialization + */ + tool = tool_init(); + /* + Options "maker" + */ + options_maker(options, n_options); + /* + Command line parsing + */ + y = command_line(argc, argv, options, tool, &use_editor, &use_mpi, + n_options); + /* + Launcher + */ + launcher(argc, argv, np, pid, y, &use_editor, &use_mpi); + /* + Input File + */ + input_file(y, tool, &use_editor); + /* + CLEAN & EXIT + =========================================================================== + */ + free(options); #if defined _MPI - if (use_mpi==1) { - MPI_Barrier(MPI_COMM_WORLD); - MPI_Finalize(); - }; -#endif + if (use_mpi == 1) + { + MPI_Barrier(MPI_COMM_WORLD); + MPI_Finalize(); + }; +#endif } - diff --git a/src/driver/get_libraries.c b/src/driver/get_libraries.c index 2f9542e66d..f63b43be0b 100644 --- a/src/driver/get_libraries.c +++ b/src/driver/get_libraries.c @@ -1,87 +1,91 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include -#include -#include #include +#include +#include +#include #include +#include char *running_libraries() { - int i_str,str_len,i_c; - char strings[20][20], *c; - i_str=0; + int i_str, str_len, i_c; + char strings[20][20], *c; + i_str = 0; #if defined _MPI - strcpy(strings[i_str], "MPI"); + strcpy(strings[i_str], "MPI"); #else - strcpy(strings[i_str], "Serial"); + strcpy(strings[i_str], "Serial"); #endif #if defined _GPU - i_str++; - strcpy(strings[i_str], "GPU"); + i_str++; + strcpy(strings[i_str], "GPU"); #endif #if defined _CUDA - i_str++; - strcpy(strings[i_str], "CUDA"); + i_str++; + strcpy(strings[i_str], "CUDA"); #endif #if defined _CUDAF - i_str++; - strcpy(strings[i_str], "CUDAF"); + i_str++; + strcpy(strings[i_str], "CUDAF"); #endif #if defined _OPENACC - i_str++; - strcpy(strings[i_str], "OpenACC"); + i_str++; + strcpy(strings[i_str], "OpenACC"); #endif #if defined _OPENMP - i_str++; - strcpy(strings[i_str], "OpenMP"); + i_str++; + strcpy(strings[i_str], "OpenMP"); #endif #if defined _OPENMP_GPU - i_str++; - strcpy(strings[i_str], "OpenMP-GPU"); + i_str++; + strcpy(strings[i_str], "OpenMP-GPU"); #endif #if defined _SCALAPACK - i_str++; - strcpy(strings[i_str], "SLK"); + i_str++; + strcpy(strings[i_str], "SLK"); #endif #if defined _SLEPC - i_str++; - strcpy(strings[i_str], "SLEPC"); + i_str++; + strcpy(strings[i_str], "SLEPC"); #endif #if defined _PAR_IO - i_str++; - strcpy(strings[i_str], "HDF5_MPI_IO"); + i_str++; + strcpy(strings[i_str], "HDF5_MPI_IO"); #elif defined _HDF5_IO - i_str++; - strcpy(strings[i_str], "HDF5_IO"); + i_str++; + strcpy(strings[i_str], "HDF5_IO"); #elif defined _HDF5_LIB - i_str++; - strcpy(strings[i_str], "HDF5_LIB"); -#endif - str_len=0; - for(i_c=0;i_c<=i_str;i_c++) { - str_len=str_len+sizeof(strings[i_c]); - } - c = malloc(str_len+1); - strcpy(c,""); - for(i_c=0;i_c<=i_str;i_c++) { - if (i_c>0) strcat(c,"+"); - strcat(c,strings[i_c]); - } - return c; + i_str++; + strcpy(strings[i_str], "HDF5_LIB"); +#endif + str_len = 0; + for (i_c = 0; i_c <= i_str; i_c++) + { + str_len = str_len + sizeof(strings[i_c]); + } + c = malloc(str_len + 1); + strcpy(c, ""); + for (i_c = 0; i_c <= i_str; i_c++) + { + if (i_c > 0) + { + strcat(c, "+"); + } + strcat(c, strings[i_c]); + } + return c; } void C_FUNC(get_libraries, GET_LIBRARIES)(char *libraries) { - char *c = running_libraries(); - int len = strlen(c); - strcpy(libraries, c); - libraries[len] = libraries[len + 1]; + char *c = running_libraries(); + int len = strlen(c); + strcpy(libraries, c); + libraries[len] = libraries[len + 1]; } - diff --git a/src/driver/get_runlevel.c b/src/driver/get_runlevel.c index b43c088b9f..c41efda39f 100644 --- a/src/driver/get_runlevel.c +++ b/src/driver/get_runlevel.c @@ -1,33 +1,48 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include -#include #include +#include +#include #include +#include char *runlevel(int *runid, int *id) { - int n_options=200; - struct options_struct options[n_options]; - options_maker(options,n_options); - if (strcmp(options[*runid].yambo_string,"undef")==0) return "EMPTY"; - if (*id == 1) {return options[*runid].yambo_string;} - if (*id == 2) {return options[*runid].short_desc;} - if (*id == 3) {return options[*runid].bin;} - if (*id == 4) {return options[*runid].no_bin;} + int n_options = 200; + struct options_struct options[n_options]; + options_maker(options, n_options); + if (strcmp(options[*runid].yambo_string, "undef") == 0) + { + return "EMPTY"; + } + if (*id == 1) + { + return options[*runid].yambo_string; + } + if (*id == 2) + { + return options[*runid].short_desc; + } + if (*id == 3) + { + return options[*runid].bin; + } + if (*id == 4) + { + return options[*runid].no_bin; + } } -void C_FUNC(get_runlevel, GET_RUNLEVEL)(char *component, int *component_id, int *runlevel_id) +void C_FUNC(get_runlevel, GET_RUNLEVEL)(char *component, int *component_id, + int *runlevel_id) { - char *c = runlevel(runlevel_id,component_id); - int len = strlen(c); - strcpy(component, c); - component[len] = component[len + 1]; + char *c = runlevel(runlevel_id, component_id); + int len = strlen(c); + strcpy(component, c); + component[len] = component[len + 1]; } - diff --git a/src/driver/get_running_project.c b/src/driver/get_running_project.c index f800902977..e12b3670b8 100644 --- a/src/driver/get_running_project.c +++ b/src/driver/get_running_project.c @@ -1,37 +1,39 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include -#include -#include #include +#include +#include +#include #include +#include char *running_project() { - tool_struct tool; - tool=tool_init(); - char *c; - if (tool.pj!=NULL) { - c = malloc(sizeof(tool.pj)+1); - strcpy(c,tool.pj); - }else{ - c = malloc(2); - strcpy(c,""); - } - return c; + tool_struct tool; + tool = tool_init(); + char *c; + if (tool.pj != NULL) + { + c = malloc(sizeof(tool.pj) + 1); + strcpy(c, tool.pj); + } + else + { + c = malloc(2); + strcpy(c, ""); + } + return c; } void C_FUNC(get_running_project, GET_RUNNING_TOOL)(char *code_project) { - char *c = running_project(); - int len = strlen(c); - strcpy(code_project, c); - code_project[len] = code_project[len + 1]; + char *c = running_project(); + int len = strlen(c); + strcpy(code_project, c); + code_project[len] = code_project[len + 1]; } - diff --git a/src/driver/get_running_tool.c b/src/driver/get_running_tool.c index 7e392c3ddf..ef156a957e 100644 --- a/src/driver/get_running_tool.c +++ b/src/driver/get_running_tool.c @@ -1,32 +1,31 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include -#include -#include #include +#include +#include +#include #include +#include char *running_tool() { - tool_struct tool; - tool=tool_init(); - char *c; - c = malloc(sizeof(tool.tool)+1); - strcpy(c,tool.tool); - return c; + tool_struct tool; + tool = tool_init(); + char *c; + c = malloc(sizeof(tool.tool) + 1); + strcpy(c, tool.tool); + return c; } void C_FUNC(get_running_tool, GET_RUNNING_TOOL)(char *code_tool) { - char *c = running_tool(); - int len = strlen(c); - strcpy(code_tool, c); - code_tool[len] = code_tool[len + 1]; + char *c = running_tool(); + int len = strlen(c); + strcpy(code_tool, c); + code_tool[len] = code_tool[len + 1]; } - diff --git a/src/driver/get_version.c b/src/driver/get_version.c index b0b2332fd3..ff48ab494e 100644 --- a/src/driver/get_version.c +++ b/src/driver/get_version.c @@ -1,38 +1,39 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include -#include -#include #include +#include +#include +#include #include +#include -struct tool_struct versions( ) +struct tool_struct versions() { - tool_struct t; - t.version=YAMBO_VERSION; - t.subversion=YAMBO_SUBVERSION; - t.patchlevel=YAMBO_PATCHLEVEL; - t.revision=YAMBO_REVISION; - sprintf(t.hash,"%s",YAMBO_HASH); - return(t); + tool_struct t; + t.version = YAMBO_VERSION; + t.subversion = YAMBO_SUBVERSION; + t.patchlevel = YAMBO_PATCHLEVEL; + t.revision = YAMBO_REVISION; + sprintf(t.hash, "%s", YAMBO_HASH); + return (t); } -void C_FUNC(get_version, GET_VERSION)(int *version,int *subversion, int *patchlevel, int *revision, char *hash) +void C_FUNC(get_version, GET_VERSION)(int *version, int *subversion, + int *patchlevel, int *revision, + char *hash) { - tool_struct t; - t=versions(); - *version=t.version; - *subversion=t.subversion; - *patchlevel=t.patchlevel; - *revision=t.revision; - strcpy(hash, t.hash); - int len = strlen(t.hash); - hash[len] = hash[len + 1]; + tool_struct t; + t = versions(); + *version = t.version; + *subversion = t.subversion; + *patchlevel = t.patchlevel; + *revision = t.revision; + strcpy(hash, t.hash); + int len = strlen(t.hash); + hash[len] = hash[len + 1]; } - diff --git a/src/driver/input_file.c b/src/driver/input_file.c index 9ecd6d05bd..845050e18f 100644 --- a/src/driver/input_file.c +++ b/src/driver/input_file.c @@ -1,41 +1,48 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include #include #include #include -#include -void input_file(struct yambo_seed_struct y,struct tool_struct t,int *use_editor) +void input_file(struct yambo_seed_struct y, struct tool_struct t, + int *use_editor) { - int ttd; - char edit_line[100]={'\0'},file_name[100]={'\0'}; - /* - External functions - */ - extern int guess_winsize(); - /* - stdlog? - */ - ttd=guess_winsize(); - /* */ - strcpy(edit_line,t.editor); - strcpy(file_name,y.in_file); - if (y.parenv_file !=NULL) {strcpy(file_name,y.parenv_file);}; - strncat(edit_line," ",1); - strncat(edit_line,file_name,strlen(file_name)); -#if defined _yambo || defined _ypp - if (*use_editor == 1 && ttd>0 && strstr(t.editor,"none ")==0) - { - system(edit_line); - }else if (*use_editor == -2){ - fprintf(stderr," \n%s%s %s %s\n\n",t.tool,": input file",file_name,"created"); - exit (0); - }; + int ttd; + char edit_line[100] = {'\0'}, file_name[100] = {'\0'}; + /* + External functions + */ + extern int guess_winsize(); + /* + stdlog? + */ + ttd = guess_winsize(); + /* */ + strcpy(edit_line, t.editor); + strcpy(file_name, y.in_file); + if (y.parenv_file != NULL) + { + strcpy(file_name, y.parenv_file); + }; + strncat(edit_line, " ", 1); + strncat(edit_line, file_name, strlen(file_name)); +#if defined _yambo || defined _ypp + if (*use_editor == 1 && ttd > 0 && strstr(t.editor, "none ") == 0) + { + system(edit_line); + } + else if (*use_editor == -2) + { + fprintf(stderr, " \n%s%s %s %s\n\n", t.tool, ": input file", file_name, + "created"); + exit(0); + }; #endif }; diff --git a/src/driver/launcher.c b/src/driver/launcher.c index 21ae46d19a..909405da4f 100644 --- a/src/driver/launcher.c +++ b/src/driver/launcher.c @@ -1,133 +1,144 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include +#include +#include #include #include #include -#include -#include -#include #include -#if defined _MPI - #include +#if defined _MPI +#include #endif -void launcher(int argc, char *argv[],int np, int pid, struct yambo_seed_struct y,int *use_editor, int *use_mpi) +#define F90ARG_MACRO(X) \ + F90_FUNC(X)(&np, &pid, &y.string_N, &y.in_file_N, &y.in_dir_N, \ + &y.out_dir_N, &y.com_dir_N, &y.job_N, y.string, y.in_file, \ + y.in_dir, y.out_dir, y.com_dir, y.job, y.string_N, \ + y.in_file_N, y.in_dir_N, y.out_dir_N, y.com_dir_N, y.job_N); + +void launcher(int argc, char *argv[], int np, int pid, + struct yambo_seed_struct y, int *use_editor, int *use_mpi) { - int yambo_err; - /* - Par Environments? Yes? => Return - */ + int yambo_err; + /* + Par Environments? Yes? => Return + */ #if defined _yambo - if (y.parenv_file !=NULL) - { - int env_editor=load_environments(y.parenv_file); - if (env_editor==1) - { - *use_editor=1; - return; - }; - }; + if (y.parenv_file != NULL) + { + int env_editor = load_environments(y.parenv_file); + if (env_editor == 1) + { + *use_editor = 1; + return; + }; + }; #endif - /* - MPI - */ + /* + MPI + */ #if defined _MPI - if (*use_mpi==1) { - MPI_Init(&argc,&argv); /* starts MPI */ - MPI_Comm_rank(MPI_COMM_WORLD, &pid); /* get current process id */ - MPI_Comm_size(MPI_COMM_WORLD, &np); /* get number of processes */ - }; + if (*use_mpi == 1) + { + MPI_Init(&argc, &argv); /* starts MPI */ + MPI_Comm_rank(MPI_COMM_WORLD, &pid); /* get current process id */ + MPI_Comm_size(MPI_COMM_WORLD, &np); /* get number of processes */ + }; #endif #if defined _yambo - /* - Running the Fortran YAMBO driver - =========================================================================== - */ - yambo_err=F90_FUNC(yambo)( -#include - ); - if(yambo_err==2) exit(0); /* DB listing mode */ + /* + Running the Fortran YAMBO driver + =========================================================================== + */ + yambo_err = F90ARG_MACRO(yambo); + if (yambo_err == 2) + { + exit(0); /* DB listing mode */ + } #endif #if defined _ypp - /* - Running the Fortran YPP driver - =========================================================================== - */ - F90_FUNC(ypp)( -#include - ); + /* + Running the Fortran YPP driver + =========================================================================== + */ + F90ARG_MACRO(ypp); #endif #if defined _c2y - /* - Running the Fortran c2y driver - =========================================================================== - */ - F90_FUNC(c2y)( -#include - ); + /* + Running the Fortran c2y driver + =========================================================================== + */ + F90ARG_MACRO(c2y); #endif #if defined _a2y - /* - Running the Fortran a2y driver - =========================================================================== - */ - F90_FUNC(a2y)( -#include - ); + /* + Running the Fortran a2y driver + =========================================================================== + */ + F90ARG_MACRO(a2y); #endif #if defined _p2y - /* - Running the Fortran p2y driver - =========================================================================== - */ - F90_FUNC(p2y)( -#include - ); + /* + Running the Fortran p2y driver + =========================================================================== + */ + F90ARG_MACRO(p2y); #endif #if defined _e2y - /* - Running the Fortran p2y driver - =========================================================================== - */ - F90_FUNC(e2y)( -#include - ); + /* + Running the Fortran p2y driver + =========================================================================== + */ + F90ARG_MACRO(e2y); #endif #if defined _eph2y - /* - Running the Fortran eph2y driver - =========================================================================== - */ - F90_FUNC(eph2y)( -#include - ); + /* + Running the Fortran eph2y driver + =========================================================================== + */ + F90ARG_MACRO(eph2y); #endif - /* - Input file edit ? - =========================================================================== - */ - if ( y.in_file_N ==1 && *use_editor ==0 ) {*use_editor=1;}; - if ( y.in_file_N ==0 || y.in_file_N ==2 ) {*use_editor=0;}; - /* - Error message - =========================================================================== - */ - if ( y.in_file_N < 0 ) - { - if (pid==0 && y.in_file_N == -1) { - fprintf(stderr," \n%s\n\n","yambo: cannot access CORE database (SAVE/*db1 and/or SAVE/*wf)"); - }; - if (pid==0 && y.in_file_N == -2) { - fprintf(stderr," \n%s\n\n","yambo: invalid command line options and/or build"); - }; + /* + Input file edit ? + =========================================================================== + */ + if (y.in_file_N == 1 && *use_editor == 0) + { + *use_editor = 1; + }; + if (y.in_file_N == 0 || y.in_file_N == 2) + { + *use_editor = 0; + }; + /* + Error message + =========================================================================== + */ + if (y.in_file_N < 0) + { + if (pid == 0 && y.in_file_N == -1) + { + fprintf(stderr, " \n%s\n\n", + "yambo: cannot access CORE database (SAVE/*db1 and/or " + "SAVE/*wf)"); + }; + if (pid == 0 && y.in_file_N == -2) + { + fprintf(stderr, " \n%s\n\n", + "yambo: invalid command line options and/or build"); + }; #if defined _MPI - if (*use_mpi==1) { MPI_Abort(MPI_COMM_WORLD,1); }; -#endif - } + if (*use_mpi == 1) + { + MPI_Abort(MPI_COMM_WORLD, 1); + }; +#endif + } }; diff --git a/src/driver/load_environments.c b/src/driver/load_environments.c index 875999467c..0ac2b48467 100644 --- a/src/driver/load_environments.c +++ b/src/driver/load_environments.c @@ -1,69 +1,74 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include #include #include #include -#include int load_environments(char* file_name) { - FILE *fp; - char str[100]; - char* pch; - char* token; - char* var; - char* value; - fp = fopen(file_name, "r"); - if (fp) { - while(fgets(str, 100, fp)) { - pch=strchr(str,'#'); - if (!pch) { - /* get the first token */ - token=strtok(str," "); - /* walk through other tokens */ - if ( token != NULL ) - { - token = strtok(NULL," "); - var=token; - token = strtok(NULL," "); - value=token; - /* printf( " %s %s %s \n", var, value, token ); */ - } - setenv(var,value,1); + FILE* fp; + char str[100]; + char* pch; + char* token; + char* var; + char* value; + fp = fopen(file_name, "r"); + if (fp) + { + while (fgets(str, 100, fp)) + { + pch = strchr(str, '#'); + if (!pch) + { + /* get the first token */ + token = strtok(str, " "); + /* walk through other tokens */ + if (token != NULL) + { + token = strtok(NULL, " "); + var = token; + token = strtok(NULL, " "); + value = token; + /* printf( " %s %s %s \n", var, value, token ); */ + } + setenv(var, value, 1); + } + } + return 0; + } + else + { + fp = fopen(file_name, "w+"); + fputs("#\n", fp); + fputs("# Edit it and use with -E during runtime\n#\n", fp); + fputs("# CPU section (just edit, do not remove fields)\n", fp); + fputs("setenv YAMBO_X_q_0_CPU 1.1.1.1\n", fp); + fputs("setenv YAMBO_X_finite_q_CPU 1.1.1.1.1\n", fp); + fputs("setenv YAMBO_X_all_q_CPU 1.1.1.1.1\n", fp); + fputs("setenv YAMBO_BS_CPU 1.1.1\n", fp); + fputs("setenv YAMBO_SE_CPU 1.1.1\n", fp); + fputs("setenv YAMBO_RT_CPU 1.1.1.1\n", fp); + fputs("# Scalapack section (leave unchanged if you wish)\n", fp); + fputs("setenv YAMBO_X_q_0_nCPU_LinAlg_INV 1\n", fp); + fputs("setenv YAMBO_X_finite_q_nCPU_LinAlg_INV 1\n", fp); + fputs("setenv YAMBO_X_all_q_nCPU_LinAlg_INV 1\n", fp); + fputs("setenv YAMBO_BS_nCPU_LinAlg_INV 1\n", fp); + fputs("setenv YAMBO_BS_nCPU_LinAlg_DIAGO 1\n", fp); + fputs("# ROLEs section (leave unchanged if you wish)\n", fp); + fputs("setenv YAMBO_X_q_0_ROLEs g.k.c.v\n", fp); + fputs("setenv YAMBO_X_finite_q_ROLEs q.g.k.c.v\n", fp); + fputs("setenv YAMBO_X_all_q_ROLEs q.g.k.c.v\n", fp); + fputs("setenv YAMBO_BS_ROLEs k.eh.t\n", fp); + fputs("setenv YAMBO_SE_ROLEs q.qp.b\n", fp); + fputs("setenv YAMBO_RT_ROLEs k.b.q.qp\n", fp); + fclose(fp); + return 1; } - } - return 0; - }else{ - fp = fopen(file_name, "w+"); - fputs("#\n",fp); - fputs("# Edit it and use with -E during runtime\n#\n",fp); - fputs("# CPU section (just edit, do not remove fields)\n",fp); - fputs("setenv YAMBO_X_q_0_CPU 1.1.1.1\n",fp); - fputs("setenv YAMBO_X_finite_q_CPU 1.1.1.1.1\n",fp); - fputs("setenv YAMBO_X_all_q_CPU 1.1.1.1.1\n",fp); - fputs("setenv YAMBO_BS_CPU 1.1.1\n",fp); - fputs("setenv YAMBO_SE_CPU 1.1.1\n",fp); - fputs("setenv YAMBO_RT_CPU 1.1.1.1\n",fp); - fputs("# Scalapack section (leave unchanged if you wish)\n",fp); - fputs("setenv YAMBO_X_q_0_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_X_finite_q_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_X_all_q_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_BS_nCPU_LinAlg_INV 1\n",fp); - fputs("setenv YAMBO_BS_nCPU_LinAlg_DIAGO 1\n",fp); - fputs("# ROLEs section (leave unchanged if you wish)\n",fp); - fputs("setenv YAMBO_X_q_0_ROLEs g.k.c.v\n",fp); - fputs("setenv YAMBO_X_finite_q_ROLEs q.g.k.c.v\n",fp); - fputs("setenv YAMBO_X_all_q_ROLEs q.g.k.c.v\n",fp); - fputs("setenv YAMBO_BS_ROLEs k.eh.t\n",fp); - fputs("setenv YAMBO_SE_ROLEs q.qp.b\n",fp); - fputs("setenv YAMBO_RT_ROLEs k.b.q.qp\n",fp); - fclose(fp); - return 1; - } }; diff --git a/src/driver/options_control.c b/src/driver/options_control.c index 8f0982eb18..07fd05ace9 100644 --- a/src/driver/options_control.c +++ b/src/driver/options_control.c @@ -1,153 +1,157 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include #include +#include +#include -void options_control(struct options_struct options[],int *i_opt) -{ - char *desc; - /* - Input file - */ - desc="Input file & Directories"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Input file"; +void options_control(struct options_struct *options, int *i_opt) +{ + char *desc; + /* + Input file + */ + desc = "Input file & Directories"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Input file"; #if defined _a2y || defined _e2y - options[*i_opt].short_desc="KSS or WFK file"; + options[*i_opt].short_desc = "KSS or WFK file"; #endif - options[*i_opt].short_opt='F'; - options[*i_opt].long_opt="Input"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - options[*i_opt].bin="yambo ypp a2y e2y"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Input file variables verbosity"; - strcpy(options[*i_opt].long_desc[0]," can be RL,kpt,sc,qp,io,gen,resp/X,ph,rt,par,nl,all"); - options[*i_opt].short_opt='V'; - options[*i_opt].long_opt="Verbosity"; - options[*i_opt].char_var=1; - options[*i_opt].serial_var=1; - options[*i_opt].yambo_string="infver"; - options[*i_opt].bin="yambo ypp"; - options[*i_opt].section=desc; - /* - Utils - */ - desc="Utilites"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Quiet input file creation"; - options[*i_opt].short_opt='Q'; - options[*i_opt].long_opt="Quiet"; - options[*i_opt].serial_var=1; - options[*i_opt].bin="yambo ypp"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Verbose (fatter) log(s)"; - options[*i_opt].long_opt="fatlog"; - options[*i_opt].yambo_string="fatlog"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Assume experienced user"; - options[*i_opt].long_opt="expuser"; - options[*i_opt].yambo_string="expuser"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Databases properties"; - options[*i_opt].short_opt='D'; - options[*i_opt].long_opt="DBlist"; - options[*i_opt].serial_var=1; - options[*i_opt].yambo_string="dbpr"; - options[*i_opt].bin="yambo"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Walltime"; - strcpy(options[*i_opt].long_desc[0],"Format is DdHhMm with D=days, H=hours and M=minutes"); - options[*i_opt].long_opt="walltime"; - options[*i_opt].int_var=1; - options[*i_opt].yambo_string="wallt"; - options[*i_opt].bin="yambo"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Memory"; - strcpy(options[*i_opt].long_desc[0],"The value is per processor. The value can be provided in Mb/Gb. E.g. 1Gb"); - options[*i_opt].long_opt="memory"; - options[*i_opt].int_var=1; - options[*i_opt].yambo_string="memorylimit"; - options[*i_opt].bin="yambo"; - options[*i_opt].section=desc; + options[*i_opt].short_opt = 'F'; + options[*i_opt].long_opt = "Input"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + options[*i_opt].bin = "yambo ypp a2y e2y"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Input file variables verbosity"; + strcpy(options[*i_opt].long_desc[0], + " can be RL,kpt,sc,qp,io,gen,resp/X,ph,rt,par,nl,all"); + options[*i_opt].short_opt = 'V'; + options[*i_opt].long_opt = "Verbosity"; + options[*i_opt].char_var = 1; + options[*i_opt].serial_var = 1; + options[*i_opt].yambo_string = "infver"; + options[*i_opt].bin = "yambo ypp"; + options[*i_opt].section = desc; + /* + Utils + */ + desc = "Utilites"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Quiet input file creation"; + options[*i_opt].short_opt = 'Q'; + options[*i_opt].long_opt = "Quiet"; + options[*i_opt].serial_var = 1; + options[*i_opt].bin = "yambo ypp"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Verbose (fatter) log(s)"; + options[*i_opt].long_opt = "fatlog"; + options[*i_opt].yambo_string = "fatlog"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Assume experienced user"; + options[*i_opt].long_opt = "expuser"; + options[*i_opt].yambo_string = "expuser"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Databases properties"; + options[*i_opt].short_opt = 'D'; + options[*i_opt].long_opt = "DBlist"; + options[*i_opt].serial_var = 1; + options[*i_opt].yambo_string = "dbpr"; + options[*i_opt].bin = "yambo"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Walltime"; + strcpy(options[*i_opt].long_desc[0], + "Format is DdHhMm with D=days, H=hours and M=minutes"); + options[*i_opt].long_opt = "walltime"; + options[*i_opt].int_var = 1; + options[*i_opt].yambo_string = "wallt"; + options[*i_opt].bin = "yambo"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Memory"; + strcpy(options[*i_opt].long_desc[0], + "The value is per processor. The value can be provided in Mb/Gb. " + "E.g. 1Gb"); + options[*i_opt].long_opt = "memory"; + options[*i_opt].int_var = 1; + options[*i_opt].yambo_string = "memorylimit"; + options[*i_opt].bin = "yambo"; + options[*i_opt].section = desc; #if defined _SCALAPACK - *i_opt=*i_opt+1; - options[*i_opt].short_desc="ScaLapacK test"; - options[*i_opt].long_opt="slktest"; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="slktest"; - options[*i_opt].section=desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "ScaLapacK test"; + options[*i_opt].long_opt = "slktest"; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "slktest"; + options[*i_opt].section = desc; #endif - *i_opt=*i_opt+1; - options[*i_opt].short_desc="GPU test"; - options[*i_opt].long_opt="gputest"; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="gputest"; - options[*i_opt].section=desc; - /* - Job control - */ - desc="Input file & Directories"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Job string"; - options[*i_opt].short_opt='J'; - options[*i_opt].long_opt="Job"; - options[*i_opt].char_var=1; - options[*i_opt].yambo_string="jobstr"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Input directory"; - options[*i_opt].short_opt='I'; - options[*i_opt].long_opt="Idir"; - options[*i_opt].char_var=1; - options[*i_opt].bin="yambo ypp p2y"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="I/O directory"; - options[*i_opt].short_opt='O'; - options[*i_opt].long_opt="Odir"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Communication directory"; - options[*i_opt].short_opt='C'; - options[*i_opt].long_opt="Cdir"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - /* - Parallel - */ - desc="Parallel Control"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Environment Parallel Variables file"; - options[*i_opt].short_opt='E'; - options[*i_opt].long_opt="parenv"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "GPU test"; + options[*i_opt].long_opt = "gputest"; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "gputest"; + options[*i_opt].section = desc; + /* + Job control + */ + desc = "Input file & Directories"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Job string"; + options[*i_opt].short_opt = 'J'; + options[*i_opt].long_opt = "Job"; + options[*i_opt].char_var = 1; + options[*i_opt].yambo_string = "jobstr"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Input directory"; + options[*i_opt].short_opt = 'I'; + options[*i_opt].long_opt = "Idir"; + options[*i_opt].char_var = 1; + options[*i_opt].bin = "yambo ypp p2y"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "I/O directory"; + options[*i_opt].short_opt = 'O'; + options[*i_opt].long_opt = "Odir"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Communication directory"; + options[*i_opt].short_opt = 'C'; + options[*i_opt].long_opt = "Cdir"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + /* + Parallel + */ + desc = "Parallel Control"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Environment Parallel Variables file"; + options[*i_opt].short_opt = 'E'; + options[*i_opt].long_opt = "parenv"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; #if defined _MPI - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Switch off MPI support"; - options[*i_opt].long_opt="nompi"; - options[*i_opt].serial_var=1; - options[*i_opt].section=desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Switch off MPI support"; + options[*i_opt].long_opt = "nompi"; + options[*i_opt].serial_var = 1; + options[*i_opt].section = desc; #endif #if defined _OPENMP - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Switch off OPENMP support"; - options[*i_opt].long_opt="noopenmp"; - options[*i_opt].yambo_string="noopenmp"; - options[*i_opt].section=desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Switch off OPENMP support"; + options[*i_opt].long_opt = "noopenmp"; + options[*i_opt].yambo_string = "noopenmp"; + options[*i_opt].section = desc; #endif }; diff --git a/src/driver/options_help.c b/src/driver/options_help.c index 37a8024f6b..b8de8a57b7 100644 --- a/src/driver/options_help.c +++ b/src/driver/options_help.c @@ -1,33 +1,32 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include #include +#include #include -void options_help(struct options_struct options[],int *i_opt) +void options_help(struct options_struct *options, int *i_opt) { - char *desc="Help & version"; - /* - Help(s) - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc=" can be an option (e.g. -h optics)"; - options[*i_opt].short_opt='h'; - options[*i_opt].long_opt="help"; - options[*i_opt].serial_var=1; - options[*i_opt].optional_var=1; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Code version & libraries"; - options[*i_opt].long_opt="version"; - options[*i_opt].serial_var=1; - options[*i_opt].section=desc; - + char *desc = "Help & version"; + /* + Help(s) + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = " can be an option (e.g. -h optics)"; + options[*i_opt].short_opt = 'h'; + options[*i_opt].long_opt = "help"; + options[*i_opt].serial_var = 1; + options[*i_opt].optional_var = 1; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Code version & libraries"; + options[*i_opt].long_opt = "version"; + options[*i_opt].serial_var = 1; + options[*i_opt].section = desc; }; diff --git a/src/driver/options_interfaces.c b/src/driver/options_interfaces.c index 2782a0c517..a881bb42ac 100644 --- a/src/driver/options_interfaces.c +++ b/src/driver/options_interfaces.c @@ -1,73 +1,76 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include #include +#include -void options_interfaces(struct options_struct options[],int *i_opt) +void options_interfaces(struct options_struct *options, int *i_opt) { - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Do not fragment the DataBases (only for serial runs)"; - options[*i_opt].long_opt="nofrag"; - options[*i_opt].short_opt='U'; - options[*i_opt].bin="p2y a2y"; - options[*i_opt].yambo_string="nodbfr"; - options[*i_opt].serial_var=1; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Number of bands for each fragment"; - options[*i_opt].long_opt= "fragbands"; - options[*i_opt].short_opt='b'; - options[*i_opt].bin="p2y a2y c2y"; - options[*i_opt].yambo_string="fragnb"; - options[*i_opt].int_var=1; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Lattice constants rescaling factor"; - options[*i_opt].long_opt= "alat_factor"; - options[*i_opt].short_opt='a'; - options[*i_opt].float_var=1; - options[*i_opt].bin="p2y a2y c2y"; - options[*i_opt].yambo_string="alat_f"; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Force use of spatial Inv. instead of Time Rev."; - options[*i_opt].long_opt="notr"; - options[*i_opt].short_opt='t'; - options[*i_opt].bin="p2y a2y c2y"; - options[*i_opt].yambo_string="notr"; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Force no symmetries"; - options[*i_opt].long_opt= "nosym"; - options[*i_opt].short_opt='n'; - options[*i_opt].bin="p2y a2y c2y"; - options[*i_opt].yambo_string="nosy"; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Force no wavefunctions"; - options[*i_opt].long_opt="nowf"; - options[*i_opt].short_opt='w'; - options[*i_opt].bin="p2y a2y c2y"; - options[*i_opt].yambo_string="nowf"; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Verbose wfc I/O reporting"; - options[*i_opt].long_opt="verbio"; - options[*i_opt].short_opt='v'; - options[*i_opt].bin="p2y"; - options[*i_opt].yambo_string="verb"; - options[*i_opt].section="Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="States duplication (artificial spin polarization)"; - options[*i_opt].long_opt="duplicate"; - options[*i_opt].short_opt='d'; - options[*i_opt].bin="a2y c2y"; - options[*i_opt].yambo_string="dupl"; - options[*i_opt].section="Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = + "Do not fragment the DataBases (only for serial runs)"; + options[*i_opt].long_opt = "nofrag"; + options[*i_opt].short_opt = 'U'; + options[*i_opt].bin = "p2y a2y"; + options[*i_opt].yambo_string = "nodbfr"; + options[*i_opt].serial_var = 1; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Number of bands for each fragment"; + options[*i_opt].long_opt = "fragbands"; + options[*i_opt].short_opt = 'b'; + options[*i_opt].bin = "p2y a2y c2y"; + options[*i_opt].yambo_string = "fragnb"; + options[*i_opt].int_var = 1; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Lattice constants rescaling factor"; + options[*i_opt].long_opt = "alat_factor"; + options[*i_opt].short_opt = 'a'; + options[*i_opt].float_var = 1; + options[*i_opt].bin = "p2y a2y c2y"; + options[*i_opt].yambo_string = "alat_f"; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = + "Force use of spatial Inv. instead of Time Rev."; + options[*i_opt].long_opt = "notr"; + options[*i_opt].short_opt = 't'; + options[*i_opt].bin = "p2y a2y c2y"; + options[*i_opt].yambo_string = "notr"; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Force no symmetries"; + options[*i_opt].long_opt = "nosym"; + options[*i_opt].short_opt = 'n'; + options[*i_opt].bin = "p2y a2y c2y"; + options[*i_opt].yambo_string = "nosy"; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Force no wavefunctions"; + options[*i_opt].long_opt = "nowf"; + options[*i_opt].short_opt = 'w'; + options[*i_opt].bin = "p2y a2y c2y"; + options[*i_opt].yambo_string = "nowf"; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Verbose wfc I/O reporting"; + options[*i_opt].long_opt = "verbio"; + options[*i_opt].short_opt = 'v'; + options[*i_opt].bin = "p2y"; + options[*i_opt].yambo_string = "verb"; + options[*i_opt].section = "Interface"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = + "States duplication (artificial spin polarization)"; + options[*i_opt].long_opt = "duplicate"; + options[*i_opt].short_opt = 'd'; + options[*i_opt].bin = "a2y c2y"; + options[*i_opt].yambo_string = "dupl"; + options[*i_opt].section = "Interface"; }; diff --git a/src/driver/options_maker.c b/src/driver/options_maker.c index b6979f25aa..0e70742644 100644 --- a/src/driver/options_maker.c +++ b/src/driver/options_maker.c @@ -1,109 +1,139 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM, AC */ -#include #include -#if defined _yambo || defined _ypp || defined _a2y || defined _p2y || defined _c2y || defined _e2y - #include +#include +#if defined _yambo || defined _ypp || defined _a2y || defined _p2y || \ + defined _c2y || defined _e2y +#include #endif -#include #include #include +#include -void options_maker(struct options_struct options[], int n_options) +void options_maker(struct options_struct *options, int n_options) { - int i_opt,i,j; - int max_long_desc=20,non_used_short_opt[200],found; + int i_opt, i, j; + int max_long_desc = 20, non_used_short_opt[200], found; - for(i_opt=0;i_opt=58 && i<=64) {continue;}; - if (i>=91 && i<=96) {continue;}; - if (i>=123) {continue;}; - found=-1; - for(i_opt=0;i_opt 0 ) continue; - if (options[i_opt].short_desc==NULL) break; - j++; - options[i_opt].short_opt=non_used_short_opt[j]; - /* DEBUG - printf("Short descripton %c assigned to long var %s\n",options[i_opt].short_opt,options[i_opt].long_opt); - */ - } + /* + Find all short_opt alphanumerical variables not used + */ + j = -1; + for (i = 1; i <= 127; i++) + { + non_used_short_opt[i] = 0; + if (i <= 47) + { + continue; + }; + if (i >= 58 && i <= 64) + { + continue; + }; + if (i >= 91 && i <= 96) + { + continue; + }; + if (i >= 123) + { + continue; + }; + found = -1; + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (options[i_opt].short_opt == i) + { + found = 1; + break; + } + } + if (found < 0) + { + j++; + non_used_short_opt[j] = i; + } + } + /* + Assign those unused variables to the options without short descriptions + */ + j = -1; + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (options[i_opt].short_opt > 0) + { + continue; + } + if (options[i_opt].short_desc == NULL) + { + break; + } + j++; + options[i_opt].short_opt = non_used_short_opt[j]; + /* DEBUG + printf("Short descripton %c assigned to long var + %s\n",options[i_opt].short_opt,options[i_opt].long_opt); + */ + } } diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index 4f7d9565fd..4916341180 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -1,152 +1,167 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include #include +#include +#include -void options_projects(struct options_struct options[],int *i_opt) +void options_projects(struct options_struct *options, int *i_opt) { - char *desc; - int i_desc=0; - desc="Hamiltonians & Potentials"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Self-Consistent Single-Particle Calculations"; - options[*i_opt].long_opt="sc"; - options[*i_opt].short_opt='s'; - options[*i_opt].bin="yambo_sc"; - options[*i_opt].yambo_string="scrun"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Self-Consistent Potential"; - strcpy(options[*i_opt].long_desc[0],"Hartree => =h"); - strcpy(options[*i_opt].long_desc[1],"Fock => =f"); - strcpy(options[*i_opt].long_desc[2],"Coh => =coh"); - strcpy(options[*i_opt].long_desc[3],"Sex => =sex"); - strcpy(options[*i_opt].long_desc[4],"exx => =exx"); - strcpy(options[*i_opt].long_desc[5],"exxc => =exxc"); - strcpy(options[*i_opt].long_desc[6],"srpa => =srpa"); - strcpy(options[*i_opt].long_desc[7],"default => =d"); - strcpy(options[*i_opt].long_desc[8],"IP => =ip"); - strcpy(options[*i_opt].long_desc[9],"LDA_X => =ldax"); - strcpy(options[*i_opt].long_desc[10],"PZ => =pz"); - strcpy(options[*i_opt].long_desc[11],"GS => =gs"); - strcpy(options[*i_opt].long_desc[12],"CVONLY => =cvonly (compute only cv collisions)"); - strcpy(options[*i_opt].long_desc[13]," "); - strcpy(options[*i_opt].long_desc[14],"Potentials can be combined. Example: use hf for Hartree-Fock"); - options[*i_opt].long_opt="potential"; - options[*i_opt].short_opt='v'; - options[*i_opt].bin="yambo_sc yambo_rt yambo_nl"; - options[*i_opt].yambo_string="potential"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Self-Consistent Magnetic Calculations"; - options[*i_opt].long_opt="magnetic"; - options[*i_opt].bin="yambo_sc"; - options[*i_opt].yambo_string="magnetic"; - strcpy(options[*i_opt].long_desc[0],"=(p)auli/(l)andau"); - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Self-Consistent Static Electric Field Calculations"; - options[*i_opt].long_opt="electric"; - options[*i_opt].bin="yambo_sc"; - options[*i_opt].yambo_string="electric"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Collisions"; - options[*i_opt].long_opt="collisions"; - options[*i_opt].short_opt='e'; - options[*i_opt].bin="yambo_rt yambo_sc yambo_nl"; - options[*i_opt].yambo_string="collisions"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Electron-Phonon Hamiltonian"; - options[*i_opt].long_opt="epham"; - options[*i_opt].bin="yambo_ph"; - options[*i_opt].yambo_string="ElPhHam"; - options[*i_opt].section=desc; + char *desc; + int i_desc = 0; + desc = "Hamiltonians & Potentials"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Self-Consistent Single-Particle Calculations"; + options[*i_opt].long_opt = "sc"; + options[*i_opt].short_opt = 's'; + options[*i_opt].bin = "yambo_sc"; + options[*i_opt].yambo_string = "scrun"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Self-Consistent Potential"; + strcpy(options[*i_opt].long_desc[0], "Hartree => =h"); + strcpy(options[*i_opt].long_desc[1], "Fock => =f"); + strcpy(options[*i_opt].long_desc[2], "Coh => =coh"); + strcpy(options[*i_opt].long_desc[3], "Sex => =sex"); + strcpy(options[*i_opt].long_desc[4], "exx => =exx"); + strcpy(options[*i_opt].long_desc[5], "exxc => =exxc"); + strcpy(options[*i_opt].long_desc[6], "srpa => =srpa"); + strcpy(options[*i_opt].long_desc[7], "default => =d"); + strcpy(options[*i_opt].long_desc[8], "IP => =ip"); + strcpy(options[*i_opt].long_desc[9], "LDA_X => =ldax"); + strcpy(options[*i_opt].long_desc[10], "PZ => =pz"); + strcpy(options[*i_opt].long_desc[11], "GS => =gs"); + strcpy(options[*i_opt].long_desc[12], + "CVONLY => =cvonly (compute only cv collisions)"); + strcpy(options[*i_opt].long_desc[13], " "); + strcpy(options[*i_opt].long_desc[14], + "Potentials can be combined. Example: use hf for Hartree-Fock"); + options[*i_opt].long_opt = "potential"; + options[*i_opt].short_opt = 'v'; + options[*i_opt].bin = "yambo_sc yambo_rt yambo_nl"; + options[*i_opt].yambo_string = "potential"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Self-Consistent Magnetic Calculations"; + options[*i_opt].long_opt = "magnetic"; + options[*i_opt].bin = "yambo_sc"; + options[*i_opt].yambo_string = "magnetic"; + strcpy(options[*i_opt].long_desc[0], "=(p)auli/(l)andau"); + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = + "Self-Consistent Static Electric Field Calculations"; + options[*i_opt].long_opt = "electric"; + options[*i_opt].bin = "yambo_sc"; + options[*i_opt].yambo_string = "electric"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Collisions"; + options[*i_opt].long_opt = "collisions"; + options[*i_opt].short_opt = 'e'; + options[*i_opt].bin = "yambo_rt yambo_sc yambo_nl"; + options[*i_opt].yambo_string = "collisions"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Electron-Phonon Hamiltonian"; + options[*i_opt].long_opt = "epham"; + options[*i_opt].bin = "yambo_ph"; + options[*i_opt].yambo_string = "ElPhHam"; + options[*i_opt].section = desc; - desc="Real-Time"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="NEQ Real-time dynamics"; - strcpy(options[*i_opt].long_desc[0],"=(p)ump or probe,(pp)ump & probe, (pn) n external fields"); - options[*i_opt].char_var=1; - options[*i_opt].long_opt="rt"; - options[*i_opt].short_opt='n'; - options[*i_opt].bin="yambo_rt"; - options[*i_opt].yambo_string="negf"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Non-linear spectroscopy"; - strcpy(options[*i_opt].long_desc[0],"=(p)ump or probe,(n) non-linear optics"); - options[*i_opt].long_opt="nl"; - options[*i_opt].char_var=1; - options[*i_opt].short_opt='u'; - options[*i_opt].bin="yambo_nl"; - options[*i_opt].yambo_string="nloptics"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="NEQ scattering kind"; - i_desc=0; - strcpy(options[*i_opt].long_desc[i_desc],"=(ee):electron-electron interaction"); -#if defined _QED - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=(eh):electron-photon interaction"); + desc = "Real-Time"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "NEQ Real-time dynamics"; + strcpy(options[*i_opt].long_desc[0], + "=(p)ump or probe,(pp)ump & probe, (pn) n external fields"); + options[*i_opt].char_var = 1; + options[*i_opt].long_opt = "rt"; + options[*i_opt].short_opt = 'n'; + options[*i_opt].bin = "yambo_rt"; + options[*i_opt].yambo_string = "negf"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Non-linear spectroscopy"; + strcpy(options[*i_opt].long_desc[0], + "=(p)ump or probe,(n) non-linear optics"); + options[*i_opt].long_opt = "nl"; + options[*i_opt].char_var = 1; + options[*i_opt].short_opt = 'u'; + options[*i_opt].bin = "yambo_nl"; + options[*i_opt].yambo_string = "nloptics"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "NEQ scattering kind"; + i_desc = 0; + strcpy(options[*i_opt].long_desc[i_desc], + "=(ee):electron-electron interaction"); +#if defined _QED + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "=(eh):electron-photon interaction"); #endif -#if defined _ELPH - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=(ep):electron-phonon interaction"); +#if defined _ELPH + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "=(ep):electron-phonon interaction"); #endif -#if defined _ELPH - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=(pe):phonon-electron interaction"); +#if defined _ELPH + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "=(pe):phonon-electron interaction"); #endif #if defined _PHEL || defined _PHEL - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc]," "); - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"Use -scattering ee+ep/ee+pe to activate more than one kind simultaneously"); + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], " "); + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "Use -scattering ee+ep/ee+pe to activate more than one kind " + "simultaneously"); #endif - options[*i_opt].long_opt="scattering"; - options[*i_opt].short_opt='s'; - options[*i_opt].bin="yambo_rt"; - options[*i_opt].yambo_string="scattp"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Correlation kind"; - i_desc=0; - strcpy(options[*i_opt].long_desc[i_desc],"=(ee):electron-electron interaction"); -#if defined _QED - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=(eh):electron-photon interaction"); + options[*i_opt].long_opt = "scattering"; + options[*i_opt].short_opt = 's'; + options[*i_opt].bin = "yambo_rt"; + options[*i_opt].yambo_string = "scattp"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Correlation kind"; + i_desc = 0; + strcpy(options[*i_opt].long_desc[i_desc], + "=(ee):electron-electron interaction"); +#if defined _QED + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "=(eh):electron-photon interaction"); #endif -#if defined _ELPH - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=(ep):electron-phonon interaction"); +#if defined _ELPH + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "=(ep):electron-phonon interaction"); #endif -#if defined _ELPH - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=(pe):phonon-electron interaction"); +#if defined _ELPH + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], + "=(pe):phonon-electron interaction"); #endif - options[*i_opt].long_opt="correlation"; - options[*i_opt].short_opt='c'; - options[*i_opt].bin="yambo_ph yambo_qed"; - options[*i_opt].yambo_string="corrtp"; - options[*i_opt].section="Self-Energy"; - options[*i_opt].char_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Photo-Luminescence"; - options[*i_opt].long_opt="pl"; - options[*i_opt].short_opt='u'; - options[*i_opt].bin="yambo_pl"; - options[*i_opt].yambo_string="photolum"; - options[*i_opt].section=desc; + options[*i_opt].long_opt = "correlation"; + options[*i_opt].short_opt = 'c'; + options[*i_opt].bin = "yambo_ph yambo_qed"; + options[*i_opt].yambo_string = "corrtp"; + options[*i_opt].section = "Self-Energy"; + options[*i_opt].char_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Photo-Luminescence"; + options[*i_opt].long_opt = "pl"; + options[*i_opt].short_opt = 'u'; + options[*i_opt].bin = "yambo_pl"; + options[*i_opt].yambo_string = "photolum"; + options[*i_opt].section = desc; }; diff --git a/src/driver/options_yambo.c b/src/driver/options_yambo.c index 12058d9e3d..17e7ec7570 100644 --- a/src/driver/options_yambo.c +++ b/src/driver/options_yambo.c @@ -1,154 +1,161 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include #include +#include +#include -void options_yambo(struct options_struct options[],int *i_opt) -{ - char *desc; - int i_desc=0; - desc="Self-Energy"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Hartree-Fock"; - options[*i_opt].long_opt="hf"; - options[*i_opt].short_opt='x'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="HF_and_locXC"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="GW approximation"; - strcpy(options[*i_opt].long_desc[i_desc],"=(p)PA/(m)PA/(c)HOSEX/(r)eal-axis"); +void options_yambo(struct options_struct *options, int *i_opt) +{ + char *desc; + int i_desc = 0; + desc = "Self-Energy"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Hartree-Fock"; + options[*i_opt].long_opt = "hf"; + options[*i_opt].short_opt = 'x'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "HF_and_locXC"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "GW approximation"; + strcpy(options[*i_opt].long_desc[i_desc], + "=(p)PA/(m)PA/(c)HOSEX/(r)eal-axis"); #if defined _ELPH - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=fan"); + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], "=fan"); #endif #if defined _ELPH - i_desc=i_desc+1; - strcpy(options[*i_opt].long_desc[i_desc],"=X"); + i_desc = i_desc + 1; + strcpy(options[*i_opt].long_desc[i_desc], "=X"); #endif - options[*i_opt].long_opt="gw0"; - options[*i_opt].short_opt='p'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="gw0"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Dyson Equation solver"; - strcpy(options[*i_opt].long_desc[0],"=(g)reen [any scattering]"); - strcpy(options[*i_opt].long_desc[1],"=(n)ewton [order 1]/(s)ecant [e-e scattering]"); + options[*i_opt].long_opt = "gw0"; + options[*i_opt].short_opt = 'p'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "gw0"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Dyson Equation solver"; + strcpy(options[*i_opt].long_desc[0], "=(g)reen [any scattering]"); + strcpy(options[*i_opt].long_desc[1], + "=(n)ewton [order 1]/(s)ecant [e-e scattering]"); #if defined _PHEL - strcpy(options[*i_opt].long_desc[2],"=(n)ewton [order 2] [p-e scattering]"); + strcpy(options[*i_opt].long_desc[2], + "=(n)ewton [order 2] [p-e scattering]"); #endif - options[*i_opt].long_opt="dyson"; - options[*i_opt].short_opt='g'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="dyson"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="GoWo Quasiparticle lifetimes"; - options[*i_opt].long_opt="lifetimes"; - options[*i_opt].short_opt='l'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="life"; - options[*i_opt].section=desc; + options[*i_opt].long_opt = "dyson"; + options[*i_opt].short_opt = 'g'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "dyson"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "GoWo Quasiparticle lifetimes"; + options[*i_opt].long_opt = "lifetimes"; + options[*i_opt].short_opt = 'l'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "life"; + options[*i_opt].section = desc; - desc="Initializations"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Initialization"; - options[*i_opt].short_opt='i'; - options[*i_opt].long_opt="setup"; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="setup"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Coulomb potential"; - options[*i_opt].long_opt="coulomb"; - options[*i_opt].short_opt='r'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="rim_cut"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Screened coulomb potential"; - options[*i_opt].long_opt="rw"; - options[*i_opt].short_opt='w'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="rim_w"; - options[*i_opt].section=desc; + desc = "Initializations"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Initialization"; + options[*i_opt].short_opt = 'i'; + options[*i_opt].long_opt = "setup"; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "setup"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Coulomb potential"; + options[*i_opt].long_opt = "coulomb"; + options[*i_opt].short_opt = 'r'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "rim_cut"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Screened coulomb potential"; + options[*i_opt].long_opt = "rw"; + options[*i_opt].short_opt = 'w'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "rim_w"; + options[*i_opt].section = desc; + desc = "Response Functions"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Linear Response optical properties"; + strcpy(options[*i_opt].long_desc[0], "=c Reciprocal-Space"); + strcpy(options[*i_opt].long_desc[1], + "=b for Transition-Space Bethe-Salpeter"); + options[*i_opt].long_opt = "optics"; + options[*i_opt].short_opt = 'o'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "optics"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Inverse Dielectric/Response Matrix"; + options[*i_opt].long_opt = "X"; + options[*i_opt].short_opt = 'd'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "screen"; + options[*i_opt].section = desc; + strcpy(options[*i_opt].long_desc[0], + "=(s)static/(p)PA/m(PA)/(d)ynamical dielectric matrix"); + strcpy(options[*i_opt].long_desc[1], + "=(X) dynamical response matrix"); + options[*i_opt].char_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Oscillator strenghts (or dipoles)"; + options[*i_opt].long_opt = "dipoles"; + options[*i_opt].short_opt = 'q'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "dipoles"; + options[*i_opt].section = desc; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Kernel"; + strcpy(options[*i_opt].long_desc[0], + "=hartree/alda/lrc/hf/sex/bsfxc"); + strcpy(options[*i_opt].long_desc[1], + "hf/sex only eh-space; lrc only G-space"); + options[*i_opt].long_opt = "kernel"; + options[*i_opt].short_opt = 'k'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "kernel"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; - desc="Response Functions"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Linear Response optical properties"; - strcpy(options[*i_opt].long_desc[0],"=c Reciprocal-Space"); - strcpy(options[*i_opt].long_desc[1],"=b for Transition-Space Bethe-Salpeter"); - options[*i_opt].long_opt="optics"; - options[*i_opt].short_opt='o'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="optics"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Inverse Dielectric/Response Matrix"; - options[*i_opt].long_opt="X"; - options[*i_opt].short_opt='d'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="screen"; - options[*i_opt].section=desc; - strcpy(options[*i_opt].long_desc[0],"=(s)static/(p)PA/m(PA)/(d)ynamical dielectric matrix"); - strcpy(options[*i_opt].long_desc[1],"=(X) dynamical response matrix"); - options[*i_opt].char_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Oscillator strenghts (or dipoles)"; - options[*i_opt].long_opt="dipoles"; - options[*i_opt].short_opt='q'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="dipoles"; - options[*i_opt].section=desc; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Kernel"; - strcpy(options[*i_opt].long_desc[0],"=hartree/alda/lrc/hf/sex/bsfxc"); - strcpy(options[*i_opt].long_desc[1],"hf/sex only eh-space; lrc only G-space"); - options[*i_opt].long_opt="kernel"; - options[*i_opt].short_opt='k'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="kernel"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - - desc="Bethe-Salpeter Equation"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="BSE solver"; + desc = "Bethe-Salpeter Equation"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "BSE solver"; #if defined _SLEPC && !defined _NL - strcpy(options[*i_opt].long_desc[0],"=h/d/s/(p/f)i"); + strcpy(options[*i_opt].long_desc[0], "=h/d/s/(p/f)i"); #else - strcpy(options[*i_opt].long_desc[0],"=h/d/(p/f)i"); + strcpy(options[*i_opt].long_desc[0], "=h/d/(p/f)i"); #endif - strcpy(options[*i_opt].long_desc[1],"(h)aydock/(d)iagonalization"); - strcpy(options[*i_opt].long_desc[2],"(pi) perturbative inversion/ (fi) full inversion"); + strcpy(options[*i_opt].long_desc[1], "(h)aydock/(d)iagonalization"); + strcpy(options[*i_opt].long_desc[2], + "(pi) perturbative inversion/ (fi) full inversion"); #if defined _SLEPC && !defined _NL - strcpy(options[*i_opt].long_desc[2],"(s)lepc partial diagonalization"); + strcpy(options[*i_opt].long_desc[2], "(s)lepc partial diagonalization"); #endif - options[*i_opt].long_opt="Ksolver"; - options[*i_opt].short_opt='y'; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="bss"; - options[*i_opt].char_var=1; - options[*i_opt].section=desc; - - desc="Total Energy"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="ACFDT Total Energy"; - options[*i_opt].long_opt="acfdt"; - options[*i_opt].bin="yambo"; - options[*i_opt].yambo_string="acfdt"; - options[*i_opt].section=desc; + options[*i_opt].long_opt = "Ksolver"; + options[*i_opt].short_opt = 'y'; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "bss"; + options[*i_opt].char_var = 1; + options[*i_opt].section = desc; + desc = "Total Energy"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "ACFDT Total Energy"; + options[*i_opt].long_opt = "acfdt"; + options[*i_opt].bin = "yambo"; + options[*i_opt].yambo_string = "acfdt"; + options[*i_opt].section = desc; }; diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index f94e8a984a..42af258639 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -1,211 +1,239 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include -#include #include +#include +#include -void options_ypp(struct options_struct options[],int *i_opt) +void options_ypp(struct options_struct *options, int *i_opt) { - /* - Brillouin Zone - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc="BZ Grid generator"; - strcpy(options[*i_opt].long_desc[0],"=(k)pt,(q)pt,(s)hifted,(h)igh symmetry,(r)andom,r(e)gular"); - options[*i_opt].long_opt="grid"; - options[*i_opt].short_opt='k'; - options[*i_opt].bin="ypp"; - options[*i_opt].char_var=1; - options[*i_opt].yambo_string="bzgrids"; - options[*i_opt].section="Brillouin Zone"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Fine to coarse grid Map"; - options[*i_opt].long_opt="map"; - options[*i_opt].short_opt='m'; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="kpts_map"; - options[*i_opt].section="Brillouin Zone"; - /* - Wannier - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Wannier 90 interface"; - options[*i_opt].long_opt= "wannier"; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="wannier"; - options[*i_opt].section="Wannier"; - /* - SOC - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Perturbative SOC mapping"; - options[*i_opt].long_opt="soc"; - options[*i_opt].short_opt='w'; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="WFs_SOC_map"; - options[*i_opt].section="SOC"; - /* - Convertions - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Remove symmetries not consistent with an external perturbation"; - options[*i_opt].long_opt= "fixsym"; - options[*i_opt].short_opt='y'; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="fixsyms"; - options[*i_opt].section="Convertions"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Quasiparticle Databases"; - strcpy(options[*i_opt].long_desc[0],"=(g)enerate-modify/(m)erge/(e)xpand"); - strcpy(options[*i_opt].long_desc[1]," (e)xpand uses the symmetries to generate a BZ-expanded QP database"); - options[*i_opt].long_opt="qpdb"; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="QPDBs"; - options[*i_opt].section="Convertions"; - options[*i_opt].char_var=1; -#if !defined _YPP_RT - *i_opt=*i_opt+1; - options[*i_opt].short_desc="gkkp databases"; - options[*i_opt].long_opt= "gkkp"; - options[*i_opt].short_opt='g'; - options[*i_opt].bin="ypp_ph"; - options[*i_opt].yambo_string="gkkp" ; - options[*i_opt].section="Convertions"; - strcpy(options[*i_opt].long_desc[0],"=(g)kkp,(d)ouble grid,(p)lot gkkp"); - options[*i_opt].char_var=1; + /* + Brillouin Zone + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "BZ Grid generator"; + strcpy(options[*i_opt].long_desc[0], + "=(k)pt,(q)pt,(s)hifted,(h)igh symmetry,(r)andom,r(e)gular"); + options[*i_opt].long_opt = "grid"; + options[*i_opt].short_opt = 'k'; + options[*i_opt].bin = "ypp"; + options[*i_opt].char_var = 1; + options[*i_opt].yambo_string = "bzgrids"; + options[*i_opt].section = "Brillouin Zone"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Fine to coarse grid Map"; + options[*i_opt].long_opt = "map"; + options[*i_opt].short_opt = 'm'; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "kpts_map"; + options[*i_opt].section = "Brillouin Zone"; + /* + Wannier + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Wannier 90 interface"; + options[*i_opt].long_opt = "wannier"; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "wannier"; + options[*i_opt].section = "Wannier"; + /* + SOC + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Perturbative SOC mapping"; + options[*i_opt].long_opt = "soc"; + options[*i_opt].short_opt = 'w'; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "WFs_SOC_map"; + options[*i_opt].section = "SOC"; + /* + Convertions + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = + "Remove symmetries not consistent with an external perturbation"; + options[*i_opt].long_opt = "fixsym"; + options[*i_opt].short_opt = 'y'; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "fixsyms"; + options[*i_opt].section = "Convertions"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Quasiparticle Databases"; + strcpy(options[*i_opt].long_desc[0], + "=(g)enerate-modify/(m)erge/(e)xpand"); + strcpy(options[*i_opt].long_desc[1], + " (e)xpand uses the symmetries to generate a BZ-expanded QP " + "database"); + options[*i_opt].long_opt = "qpdb"; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "QPDBs"; + options[*i_opt].section = "Convertions"; + options[*i_opt].char_var = 1; +#if !defined _YPP_RT + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "gkkp databases"; + options[*i_opt].long_opt = "gkkp"; + options[*i_opt].short_opt = 'g'; + options[*i_opt].bin = "ypp_ph"; + options[*i_opt].yambo_string = "gkkp"; + options[*i_opt].section = "Convertions"; + strcpy(options[*i_opt].long_desc[0], + "=(g)kkp,(d)ouble grid,(p)lot gkkp"); + options[*i_opt].char_var = 1; #endif - /* - Plots - */ - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Excitonic State Momentum"; - options[*i_opt].long_opt= "BSiq"; - options[*i_opt].short_opt='b'; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="BSiq"; - options[*i_opt].section="Plots"; - options[*i_opt].int_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Mean Potential"; - options[*i_opt].long_opt= "potential"; - options[*i_opt].short_opt='v'; - options[*i_opt].bin="ypp_sc"; - options[*i_opt].yambo_string="MeanPot"; - options[*i_opt].section="Plots"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Electronic properties"; - strcpy(options[*i_opt].long_desc[0],"=(h)artree,(f)ock,(coh),(sex),(cohsex),(exx),(exxc),(srpa),(d)ef,(ip)"); -#if defined _ELPH - strcpy(options[*i_opt].long_desc[0],"=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent,(e)lias"); -#elif defined _YPP_MAGNETIC - strcpy(options[*i_opt].long_desc[0],"=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent,angu(l)ar,(p)osition"); + /* + Plots + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Excitonic State Momentum"; + options[*i_opt].long_opt = "BSiq"; + options[*i_opt].short_opt = 'b'; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "BSiq"; + options[*i_opt].section = "Plots"; + options[*i_opt].int_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Mean Potential"; + options[*i_opt].long_opt = "potential"; + options[*i_opt].short_opt = 'v'; + options[*i_opt].bin = "ypp_sc"; + options[*i_opt].yambo_string = "MeanPot"; + options[*i_opt].section = "Plots"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Electronic properties"; + strcpy(options[*i_opt].long_desc[0], + "=(h)artree,(f)ock,(coh),(sex),(cohsex),(exx),(exxc),(srpa)," + "(d)ef,(ip)"); +#if defined _ELPH + strcpy(options[*i_opt].long_desc[0], + "=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent,(e)lias"); +#elif defined _YPP_MAGNETIC + strcpy(options[*i_opt].long_desc[0], + "=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent,angu(l)ar,(" + "p)osition"); #else - strcpy(options[*i_opt].long_desc[0],"=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent"); + strcpy(options[*i_opt].long_desc[0], + "=(w)ave,(d)ensity,(m)ag,do(s),(b)ands,(c)urrent"); #endif - options[*i_opt].long_opt="electron"; - options[*i_opt].short_opt='s'; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="electrons"; - options[*i_opt].section="Plots"; - options[*i_opt].char_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Excitonic properties"; - options[*i_opt].long_opt="exciton"; - options[*i_opt].short_opt='e'; - options[*i_opt].bin="ypp ypp_ph"; -#if defined _ELPH - strcpy(options[*i_opt].long_desc[0],"=(s)ort,(sp)in,(a)mplitude,(w)ave,(i)nterpolate,"); - strcpy(options[*i_opt].long_desc[1]," (e)lias,(g)kkp,(p)h-assisted dos"); + options[*i_opt].long_opt = "electron"; + options[*i_opt].short_opt = 's'; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "electrons"; + options[*i_opt].section = "Plots"; + options[*i_opt].char_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Excitonic properties"; + options[*i_opt].long_opt = "exciton"; + options[*i_opt].short_opt = 'e'; + options[*i_opt].bin = "ypp ypp_ph"; +#if defined _ELPH + strcpy(options[*i_opt].long_desc[0], + "=(s)ort,(sp)in,(a)mplitude,(w)ave,(i)nterpolate,"); + strcpy(options[*i_opt].long_desc[1], + " (e)lias,(g)kkp,(p)h-assisted dos"); #else - strcpy(options[*i_opt].long_desc[0],"=(s)ort,(sp)in,(a)mplitude,(w)ave,(i)nterpolate"); + strcpy(options[*i_opt].long_desc[0], + "=(s)ort,(sp)in,(a)mplitude,(w)ave,(i)nterpolate"); #endif - options[*i_opt].yambo_string="excitons"; - options[*i_opt].section="Plots"; - options[*i_opt].char_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Dipole properties"; - options[*i_opt].long_opt="dipoles"; - options[*i_opt].bin="ypp"; - strcpy(options[*i_opt].long_desc[0],"=(exc)itonic,(ip)independent-particle"); -#if defined _YPP_RT - strcpy(options[*i_opt].long_desc[0],"=(exc)itonic,(ip)independent-particle,(m)ask"); + options[*i_opt].yambo_string = "excitons"; + options[*i_opt].section = "Plots"; + options[*i_opt].char_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Dipole properties"; + options[*i_opt].long_opt = "dipoles"; + options[*i_opt].bin = "ypp"; + strcpy(options[*i_opt].long_desc[0], + "=(exc)itonic,(ip)independent-particle"); +#if defined _YPP_RT + strcpy(options[*i_opt].long_desc[0], + "=(exc)itonic,(ip)independent-particle,(m)ask"); #endif - options[*i_opt].yambo_string="dipoles"; - options[*i_opt].section="Plots"; - options[*i_opt].char_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Free hole position in the excitonic plot"; - options[*i_opt].long_opt="freehole"; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="freehole"; - options[*i_opt].section="Plots"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Average hole/electron wavefunction"; - options[*i_opt].long_opt="avehole"; - options[*i_opt].bin="ypp"; - options[*i_opt].yambo_string="avehole"; - options[*i_opt].section="Plots"; -#if !defined _YPP_RT - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Phononic properties"; - strcpy(options[*i_opt].long_desc[0],"=(d)os,(e)lias,(a)mplitude"); - options[*i_opt].long_opt= "phonon"; - options[*i_opt].short_opt='p'; - options[*i_opt].bin="ypp_ph"; - options[*i_opt].yambo_string="phonons"; - options[*i_opt].section="Plots"; - options[*i_opt].char_var=1; + options[*i_opt].yambo_string = "dipoles"; + options[*i_opt].section = "Plots"; + options[*i_opt].char_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Free hole position in the excitonic plot"; + options[*i_opt].long_opt = "freehole"; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "freehole"; + options[*i_opt].section = "Plots"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Average hole/electron wavefunction"; + options[*i_opt].long_opt = "avehole"; + options[*i_opt].bin = "ypp"; + options[*i_opt].yambo_string = "avehole"; + options[*i_opt].section = "Plots"; +#if !defined _YPP_RT + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Phononic properties"; + strcpy(options[*i_opt].long_desc[0], "=(d)os,(e)lias,(a)mplitude"); + options[*i_opt].long_opt = "phonon"; + options[*i_opt].short_opt = 'p'; + options[*i_opt].bin = "ypp_ph"; + options[*i_opt].yambo_string = "phonons"; + options[*i_opt].section = "Plots"; + options[*i_opt].char_var = 1; #endif -/* - Real-Time -*/ - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Non-linear response analysis"; - options[*i_opt].long_opt="nl"; - options[*i_opt].short_opt='u'; - options[*i_opt].bin="ypp_nl"; - options[*i_opt].yambo_string="nonlinear"; - options[*i_opt].section="Real-Time"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="Carriers database generation"; - strcpy(options[*i_opt].long_desc[0],"=(e)nergy,(f)ermi"); - options[*i_opt].long_opt= "rtdb"; - options[*i_opt].short_opt='c'; - options[*i_opt].bin="ypp_rt"; - options[*i_opt].yambo_string="RTDBs"; - options[*i_opt].section="Real-Time"; - options[*i_opt].char_var=1; - *i_opt=*i_opt+1; - options[*i_opt].short_desc="TD observables plot"; - options[*i_opt].long_opt="rtplot"; - options[*i_opt].short_opt='n'; - options[*i_opt].char_var=1; - options[*i_opt].bin="ypp_rt"; - options[*i_opt].yambo_string="TDplots"; /* TDplots */ - options[*i_opt].section="Real-Time"; - strcpy(options[*i_opt].long_desc[0],"=(X)response,(a)bsorption,(o)ccupations,(l)ifetimes,(d)ensity,(p)olariazion,(g)reen-function"); - strcpy(options[*i_opt].long_desc[1]," "); - strcpy(options[*i_opt].long_desc[2],"(X) response calculates the response via the time-resolved polarization"); - strcpy(options[*i_opt].long_desc[3],"(a) absorption amends the Kubo expression with the time-dependent occupations"); - strcpy(options[*i_opt].long_desc[4],"(p) polarization evaluates the k-resolved components of the time-dependent polarization"); - strcpy(options[*i_opt].long_desc[5],"(g) evaluates the two-times Green`s function"); - *i_opt=*i_opt+1; - options[*i_opt].short_desc="TD plot control"; - options[*i_opt].char_var=1; - options[*i_opt].long_opt= "rtmode"; - options[*i_opt].short_opt='t'; - options[*i_opt].bin="ypp_rt"; - options[*i_opt].yambo_string="TDplotmode"; /* TDpol */ - options[*i_opt].section="Real-Time"; - strcpy(options[*i_opt].long_desc[0],"rtplot=X/a => =(t)ime"); - strcpy(options[*i_opt].long_desc[1],"rtplot=o => =(b)ands,(t)ime,(e)nergy,(d)os"); - strcpy(options[*i_opt].long_desc[2],"rtplot=l => =(b)ands,(t)ime,(e)nergy"); - strcpy(options[*i_opt].long_desc[3],"rtplot=d => =(t)ime"); - strcpy(options[*i_opt].long_desc[4],"rtplot=p => =(t)ime"); + /* + Real-Time + */ + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Non-linear response analysis"; + options[*i_opt].long_opt = "nl"; + options[*i_opt].short_opt = 'u'; + options[*i_opt].bin = "ypp_nl"; + options[*i_opt].yambo_string = "nonlinear"; + options[*i_opt].section = "Real-Time"; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "Carriers database generation"; + strcpy(options[*i_opt].long_desc[0], "=(e)nergy,(f)ermi"); + options[*i_opt].long_opt = "rtdb"; + options[*i_opt].short_opt = 'c'; + options[*i_opt].bin = "ypp_rt"; + options[*i_opt].yambo_string = "RTDBs"; + options[*i_opt].section = "Real-Time"; + options[*i_opt].char_var = 1; + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "TD observables plot"; + options[*i_opt].long_opt = "rtplot"; + options[*i_opt].short_opt = 'n'; + options[*i_opt].char_var = 1; + options[*i_opt].bin = "ypp_rt"; + options[*i_opt].yambo_string = "TDplots"; /* TDplots */ + options[*i_opt].section = "Real-Time"; + strcpy(options[*i_opt].long_desc[0], + "=(X)response,(a)bsorption,(o)ccupations,(l)ifetimes,(d)" + "ensity,(p)olariazion,(g)reen-function"); + strcpy(options[*i_opt].long_desc[1], " "); + strcpy(options[*i_opt].long_desc[2], + "(X) response calculates the response via the time-resolved " + "polarization"); + strcpy(options[*i_opt].long_desc[3], + "(a) absorption amends the Kubo expression with the time-dependent " + "occupations"); + strcpy(options[*i_opt].long_desc[4], + "(p) polarization evaluates the k-resolved components of the " + "time-dependent polarization"); + strcpy(options[*i_opt].long_desc[5], + "(g) evaluates the two-times Green`s function"); + *i_opt = *i_opt + 1; + options[*i_opt].short_desc = "TD plot control"; + options[*i_opt].char_var = 1; + options[*i_opt].long_opt = "rtmode"; + options[*i_opt].short_opt = 't'; + options[*i_opt].bin = "ypp_rt"; + options[*i_opt].yambo_string = "TDplotmode"; /* TDpol */ + options[*i_opt].section = "Real-Time"; + strcpy(options[*i_opt].long_desc[0], "rtplot=X/a => =(t)ime"); + strcpy(options[*i_opt].long_desc[1], + "rtplot=o => =(b)ands,(t)ime,(e)nergy,(d)os"); + strcpy(options[*i_opt].long_desc[2], + "rtplot=l => =(b)ands,(t)ime,(e)nergy"); + strcpy(options[*i_opt].long_desc[3], "rtplot=d => =(t)ime"); + strcpy(options[*i_opt].long_desc[4], "rtplot=p => =(t)ime"); }; diff --git a/src/driver/title.c b/src/driver/title.c index 24fed1ebf4..d250e45de6 100644 --- a/src/driver/title.c +++ b/src/driver/title.c @@ -1,33 +1,42 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include +#include #include #include -#include -#include -void title(FILE *file_name,char *cmnt, struct tool_struct t) +void title(FILE *file_name, char *cmnt, struct tool_struct t) { - char *tool = running_tool(); - char *pj = running_project(); - char *libs = running_libraries(); - fprintf(file_name,"%s%s\n",cmnt, " ___ __ _____ __ __ _____ _____ "); - fprintf(file_name,"%s%s\n",cmnt, "| Y || _ || Y || _ \\ | _ |"); - fprintf(file_name,"%s%s\n",cmnt, "| | ||. | ||. ||. | / |. | |"); - fprintf(file_name,"%s%s\n",cmnt, " \\ _/ |. _ ||.\\ / ||. _ \\ |. | |"); - fprintf(file_name,"%s%s\n",cmnt, " |: | |: | ||: | ||: | \\|: | |"); - fprintf(file_name,"%s%s\n",cmnt, " |::| |:.|:.||:.|:.||::. /|::. |"); - fprintf(file_name,"%s%s\n",cmnt, " `--\" `-- --\"`-- --\"`-----\" `-----\""); - fprintf(file_name,"%s '%s' \n",cmnt,t.desc); - if (strlen(pj)>0) { - fprintf(file_name,"%s\n%s This is : %s(%s)",cmnt,cmnt,tool,pj); - }else{ - fprintf(file_name,"%s\n%s This is : %s",cmnt,cmnt,tool); - } - fprintf(file_name,"%s\n%s Version : %s ",cmnt,cmnt,t.version_string); - fprintf(file_name,"%s\n%s Configuration: %s \n",cmnt,cmnt,libs); + char *tool = running_tool(); + char *pj = running_project(); + char *libs = running_libraries(); + fprintf(file_name, "%s%s\n", cmnt, " ___ __ _____ __ __ _____ _____ "); + fprintf(file_name, "%s%s\n", cmnt, + "| Y || _ || Y || _ \\ | _ |"); + fprintf(file_name, "%s%s\n", cmnt, "| | ||. | ||. ||. | / |. | |"); + fprintf(file_name, "%s%s\n", cmnt, + " \\ _/ |. _ ||.\\ / ||. _ \\ |. | |"); + fprintf(file_name, "%s%s\n", cmnt, + " |: | |: | ||: | ||: | \\|: | |"); + fprintf(file_name, "%s%s\n", cmnt, " |::| |:.|:.||:.|:.||::. /|::. |"); + fprintf(file_name, "%s%s\n", cmnt, + " `--\" `-- --\"`-- --\"`-----\" `-----\""); + fprintf(file_name, "%s '%s' \n", cmnt, t.desc); + if (strlen(pj) > 0) + { + fprintf(file_name, "%s\n%s This is : %s(%s)", cmnt, cmnt, tool, + pj); + } + else + { + fprintf(file_name, "%s\n%s This is : %s", cmnt, cmnt, tool); + } + fprintf(file_name, "%s\n%s Version : %s ", cmnt, cmnt, + t.version_string); + fprintf(file_name, "%s\n%s Configuration: %s \n", cmnt, cmnt, libs); }; diff --git a/src/driver/tool_init.c b/src/driver/tool_init.c index a1448892ec..778ea978ab 100644 --- a/src/driver/tool_init.c +++ b/src/driver/tool_init.c @@ -1,81 +1,99 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include +#include #include -#include #include +#include +#include #include -#include -#include #if defined _yambo || defined _ypp - #include +#include #endif -/* - AM 29/7/2021 - - This source is project dependent via tool.h. In order to properly compile it, then, - I need to add fictiuous pre-compiler options - -*/ -#if defined _p2y || defined _a2y || defined _c2y || defined _2y +#ifdef _yambo +const char *tool = "yambo"; +const char *tool_desc = "A shiny pot of fun and happiness [C.D.Hogan]"; +#elif defined _ypp +const char *tool = "ypp"; +const char *tool_desc = "Y(ambo) P(ost)/(re) P(rocessor)"; +#elif defined _a2y +const char *tool = "a2y"; +const char *tool_desc = "A(binit) 2 Y(ambo) interface"; +#elif defined _c2y +const char *tool = "c2y"; +const char *tool_desc = "C(pmd) 2 Y(ambo) interface"; +#elif defined _p2y +const char *tool = "p2y"; +const char *tool_desc = "P(Wscf) 2 Y(ambo) interface"; +#elif defined _e2y +const char *tool = "e2y"; +const char *tool_desc = "E(TSF) 2 Y(ambo) interface (0.6)"; +#else +const char *tool = "none"; +const char *tool_desc = "Not a tool"; #endif -struct tool_struct tool_init( ) +struct tool_struct tool_init() { - tool_struct t; - t=versions(); + tool_struct t; + t = versions(); #if defined _yambo || defined _ypp - t.editor=editor; + t.editor = editor; #else - t.editor="vim"; + t.editor = "vim"; #endif - t.tool=tool; - t.desc=tool_desc; - /* - Projects - */ - char *pj=NULL; + t.tool = tool; + t.desc = tool_desc; + /* + Projects + */ + char *pj = NULL; #if defined _YPP_ELPH || defined _ELPH - pj="ph"; + pj = "ph"; #endif #if defined _YPP_RT || defined _RT - pj="rt"; + pj = "rt"; #endif #if defined _YPP_SC || defined _SC - pj="sc"; + pj = "sc"; #endif #if defined _YPP_NL || defined _NL - pj="nl"; + pj = "nl"; #endif #if defined _YPP_FL || defined _FL - pj="fl"; + pj = "fl"; #endif #if defined _QED - pj="qed"; + pj = "qed"; #endif - if (pj!=NULL) { - t.bin = malloc(strlen(tool) + strlen(pj) + 2); - strcpy(t.bin,t.tool); - t.pj=pj; - strcat(t.bin,"_"); - strcat(t.bin,t.pj); - }else{ - t.bin = malloc(strlen(tool) + 1); - strcpy(t.bin,t.tool); - pj=""; - t.pj=pj; - } - if (pj==NULL) pj=" "; - sprintf(t.version_string,"%i.%i.%i Revision %i Hash %s",t.version,t.subversion,t.patchlevel,t.revision,t.hash); - return(t); + if (pj != NULL) + { + t.bin = malloc(strlen(tool) + strlen(pj) + 2); + strcpy(t.bin, t.tool); + t.pj = pj; + strcat(t.bin, "_"); + strcat(t.bin, t.pj); + } + else + { + t.bin = malloc(strlen(tool) + 1); + strcpy(t.bin, t.tool); + pj = ""; + t.pj = pj; + } + if (pj == NULL) + { + pj = " "; + } + sprintf(t.version_string, "%i.%i.%i Revision %i Hash %s", t.version, + t.subversion, t.patchlevel, t.revision, t.hash); + return (t); }; - diff --git a/src/driver/usage.c b/src/driver/usage.c index 8f7026309d..1ae9cbe1b5 100644 --- a/src/driver/usage.c +++ b/src/driver/usage.c @@ -1,131 +1,227 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include +#include +#include #include #include -#include -#include -#include -void usage(options_struct *options, struct tool_struct t, char *what, int n_options) +void usage(options_struct *options, struct tool_struct t, char *what, + int n_options) { - int i_opt,i,i_o,n_blanks,n_strings; - char *pj = running_project(); - char *tool = running_tool(); - char *libs = running_libraries(); - int max_long_desc=20; - /* - Order - */ - int n_orders=19,n_order_elements; - char *order[]={ - "Help & version", /* 0 */ - "Input file & Directories", /* 1 */ - "Parallel Control", /* 2 */ - "Initializations", /* 3 */ - "Response Functions", /* 4 */ - "Self-Energy", /* 5 */ - "Bethe-Salpeter Equation", /* 6 */ - "Hamiltonians & Potentials", /* 7 */ - "Real-Time", /* 8 */ - "Surface Spectroscopy", /* 9 */ - "Total Energy", /* 10 */ - "Interface", /* 11 */ - "Brillouin Zone", /* 12 */ - "Convertions", /* 13 */ - "Plots", /* 14 */ - "SOC", /* 15 */ - "Utilites", /* 16 */ - "Wannier", /* 17 */ - "Model Hamiltonians", /* 18 */ - "undef", /* 19 */ - }; + int i_opt, i, i_o, n_blanks, n_strings; + char *pj = running_project(); + char *tool = running_tool(); + char *libs = running_libraries(); + int max_long_desc = 20; + /* + Order + */ + int n_orders = 19, n_order_elements; + char *order[] = { + "Help & version", /* 0 */ + "Input file & Directories", /* 1 */ + "Parallel Control", /* 2 */ + "Initializations", /* 3 */ + "Response Functions", /* 4 */ + "Self-Energy", /* 5 */ + "Bethe-Salpeter Equation", /* 6 */ + "Hamiltonians & Potentials", /* 7 */ + "Real-Time", /* 8 */ + "Surface Spectroscopy", /* 9 */ + "Total Energy", /* 10 */ + "Interface", /* 11 */ + "Brillouin Zone", /* 12 */ + "Convertions", /* 13 */ + "Plots", /* 14 */ + "SOC", /* 15 */ + "Utilites", /* 16 */ + "Wannier", /* 17 */ + "Model Hamiltonians", /* 18 */ + "undef", /* 19 */ + }; - if (strcmp(what,"help")==0) { + if (strcmp(what, "help") == 0) + { + title(stderr, "", t); - title(stderr,"",t); + n_strings = 0; + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (use_me(options, t, i_opt) == 0) + { + continue; + } + n_blanks = options[i_opt].int_var * 6 + + options[i_opt].float_var * 7 + + options[i_opt].char_var * 9; + if (n_blanks > n_strings) + { + n_strings = n_blanks; + } + }; - n_strings=0; - for(i_opt=0;i_optn_strings) n_strings=n_blanks; - }; + for (i_o = 0; i_o < n_orders; i_o++) + { + if (order[i_o] == NULL) + { + continue; + } + n_order_elements = 0; + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (use_me(options, t, i_opt) == 0) + { + continue; + } + if (strcmp(options[i_opt].section, order[i_o]) == 0) + { + n_order_elements++; + } + }; + if (n_order_elements == 0) + { + continue; + } + fprintf(stderr, "\n %s:\n", order[i_o]); + for (i_opt = 0; i_opt < n_options; i_opt++) + { + if (strcmp(options[i_opt].section, order[i_o]) != 0) + { + continue; + } + if (use_me(options, t, i_opt) == 0) + { + continue; + } + fprintf(stderr, " -%s", options[i_opt].long_opt); + n_blanks = 15 - strlen(options[i_opt].long_opt); + for (i = 1; i <= n_blanks; i++) + { + fprintf(stderr, " "); + } + if (options[i_opt].short_opt > 57) + { + fprintf(stderr, " (-%c)", options[i_opt].short_opt); + } + else + { + for (i = 1; i <= 5; i++) + { + fprintf(stderr, " "); + } + }; + for (i = 1; i <= options[i_opt].int_var; i++) + { + fprintf(stderr, " %s", ""); + }; + for (i = 1; i <= options[i_opt].float_var; i++) + { + fprintf(stderr, " %s", ""); + }; + for (i = 1; i <= options[i_opt].char_var; i++) + { + fprintf(stderr, " %s", ""); + }; + n_blanks = n_strings + 2 - options[i_opt].int_var * 6 - + options[i_opt].float_var * 7 - + options[i_opt].char_var * 9; + for (i = 1; i <= n_blanks; i++) + { + fprintf(stderr, " "); + } + fprintf(stderr, " :%s", options[i_opt].short_desc); + if (strcmp(options[i_opt].long_desc[0], "undef") != 0) + { + fprintf(stderr, " %s%s%s", "(more with -h ", + options[i_opt].long_opt, ")"); + } + fprintf(stderr, "\n"); + } + } - for(i_o=0;i_o57) - {fprintf(stderr," (-%c)",options[i_opt].short_opt);} + fprintf(stderr, "\n"); + fprintf(stderr, "%s\n\n", + " YAMBO developers group (http://www.yambo-code.eu)"); + } + else if (strcmp(what, "version") == 0) + { + if (strlen(pj) > 0) + { + fprintf(stderr, "\nThis is %s(%s) - %s - Ver. %s \n\n", tool, pj, + libs, t.version_string); + } + else + { + fprintf(stderr, "\nThis is %s - %s - Ver. %s \n\n", tool, libs, + t.version_string); + } + } else - {for(i=1;i<=5;i++) fprintf(stderr," ");}; - for(i=1;i<=options[i_opt].int_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].float_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].char_var;i++) {fprintf(stderr," %s","");}; - n_blanks=n_strings+2-options[i_opt].int_var*6-options[i_opt].float_var*7-options[i_opt].char_var*9; - for(i=1;i<=n_blanks;i++) fprintf(stderr," "); - fprintf(stderr," :%s",options[i_opt].short_desc); - if (strcmp(options[i_opt].long_desc[0],"undef")!=0) fprintf(stderr," %s%s%s","(more with -h ",options[i_opt].long_opt,")"); - fprintf(stderr,"\n"); - } - } - - fprintf(stderr,"\n"); - fprintf(stderr,"%s\n\n"," YAMBO developers group (http://www.yambo-code.eu)"); - - }else if (strcmp(what,"version")==0) { - if (strlen(pj)>0) { - fprintf(stderr,"\nThis is %s(%s) - %s - Ver. %s \n\n",tool,pj,libs,t.version_string); - }else{ - fprintf(stderr,"\nThis is %s - %s - Ver. %s \n\n",tool,libs,t.version_string); - } - }else{ - for(i_opt=0;i_opt57) fprintf(stderr," Short option: %c\n",options[i_opt].short_opt); - if (options[i_opt].int_var+options[i_opt].float_var+options[i_opt].char_var>0) - { - fprintf(stderr," Variables :"); - for(i=1;i<=options[i_opt].int_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].float_var;i++) {fprintf(stderr," %s","");}; - for(i=1;i<=options[i_opt].char_var;i++) {fprintf(stderr," %s","");}; - fprintf(stderr,"\n"); - } - if (strcmp(options[i_opt].long_desc[0],"undef")!=0) - { - fprintf(stderr," Description :%s",options[i_opt].short_desc); - for(i=0;i 57) + { + fprintf(stderr, " Short option: %c\n", options[i_opt].short_opt); + } + if (options[i_opt].int_var + options[i_opt].float_var + + options[i_opt].char_var > + 0) + { + fprintf(stderr, " Variables :"); + for (i = 1; i <= options[i_opt].int_var; i++) + { + fprintf(stderr, " %s", ""); + }; + for (i = 1; i <= options[i_opt].float_var; i++) + { + fprintf(stderr, " %s", ""); + }; + for (i = 1; i <= options[i_opt].char_var; i++) + { + fprintf(stderr, " %s", ""); + }; + fprintf(stderr, "\n"); + } + if (strcmp(options[i_opt].long_desc[0], "undef") != 0) + { + fprintf(stderr, " Description :%s", options[i_opt].short_desc); + for (i = 0; i < max_long_desc; i++) + { + if (strcmp(options[i_opt].long_desc[i], "undef") == 0) + { + continue; + } + fprintf(stderr, "\n %s", + options[i_opt].long_desc[i]); + } + } + fprintf(stderr, "\n\n"); + fprintf(stderr, "%s\n\n", + " YAMBO developers group (http://www.yambo-code.eu)"); + } }; diff --git a/src/driver/use_me.c b/src/driver/use_me.c index cd70202d3f..b5cb0752d2 100644 --- a/src/driver/use_me.c +++ b/src/driver/use_me.c @@ -1,38 +1,56 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ +#include +#include +#include #include #include -#include -#include -#include -int use_me(struct options_struct options[], struct tool_struct t, int i_opt) +int use_me(struct options_struct *options, struct tool_struct t, int i_opt) { - char *pch,str[100]; - if (options[i_opt].short_desc==NULL) return 0; - /* NOT allowed bin */ - strcpy(str,options[i_opt].no_bin); - pch = strtok(str," "); - while (pch != NULL) - { - if (strcmp(pch,t.tool)==0) return 0; - if (strcmp(pch,t.bin)==0) return 0; - pch = strtok (NULL, " "); - } - /* allowed bin */ - strcpy(str,options[i_opt].bin); - pch = strtok(str," "); - while (pch != NULL) - { - if (strcmp(pch,t.tool)==0) return 1; - if (strcmp(pch,t.bin)==0) return 1; - if (strcmp(pch,"all")==0) return 1; - pch = strtok (NULL, " "); - } + char *pch, str[100]; + if (options[i_opt].short_desc == NULL) + { + return 0; + } + /* NOT allowed bin */ + strcpy(str, options[i_opt].no_bin); + pch = strtok(str, " "); + while (pch != NULL) + { + if (strcmp(pch, t.tool) == 0) + { + return 0; + } + if (strcmp(pch, t.bin) == 0) + { + return 0; + } + pch = strtok(NULL, " "); + } + /* allowed bin */ + strcpy(str, options[i_opt].bin); + pch = strtok(str, " "); + while (pch != NULL) + { + if (strcmp(pch, t.tool) == 0) + { + return 1; + } + if (strcmp(pch, t.bin) == 0) + { + return 1; + } + if (strcmp(pch, "all") == 0) + { + return 1; + } + pch = strtok(NULL, " "); + } }; diff --git a/src/driver/winsize.c b/src/driver/winsize.c index 5011d33f41..fa6d111468 100644 --- a/src/driver/winsize.c +++ b/src/driver/winsize.c @@ -1,31 +1,39 @@ /* License-Identifier: GPL - + Copyright (C) 2020 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include #include +#include #include -#include #include +#include int guess_winsize() { - int width; - struct winsize ws; - if (!isatty(2)) {width=-1;return width;} - if( ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0 ) - width = 79; - else - width = ws.ws_col - 1; - return width; + int width; + struct winsize ws; + if (!isatty(2)) + { + width = -1; + return width; + } + if (ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) + { + width = 79; + } + else + { + width = ws.ws_col - 1; + } + return width; }; int C_FUNC(win_size, WIN_SIZE)(int *win_width) { - *win_width = 0; - *win_width = guess_winsize(); - return 0; + *win_width = 0; + *win_width = guess_winsize(); + return 0; }; diff --git a/src/parser/PARSER.c b/src/parser/PARSER.c index 7e00c0eb6a..776e4d0378 100644 --- a/src/parser/PARSER.c +++ b/src/parser/PARSER.c @@ -17,303 +17,391 @@ 02111-1307, USA. */ -#include -#include #include #include #include -#include +#include +#include #include +#include static FILE *fout; static char *str_trim(char *in) { - char *c, *s = in; - - for(c=s; isspace(*c); c++); - for(; *c != '\0'; *s++=*c++); - if (s != in) - { - for(s--; isspace(*s); s--); - *(s+1) = '\0'; - } - else *s = '\0'; - return in; + char *c, *s = in; + + for (c = s; isspace(*c); c++); + for (; *c != '\0'; *s++ = *c++); + if (s != in) + { + for (s--; isspace(*s); s--); + *(s + 1) = '\0'; + } + else + { + *s = '\0'; + } + return in; } static int parse_get_line(FILE *f, char **s, int *length) { - int i, c; - - i = 0; - do{ - c = getc(f); - if(c == '#') /* skip comments */ - while(c!=EOF && c!='\n') c = getc(f); - else if(c != EOF){ - if (i == *length - 1){ - *length *= 2; - *s = (char *)realloc(*s, *length + 1); - } - (*s)[i++] = c; - } - }while(c != EOF && c != '\n'); - (*s)[i] = '\0'; - - str_trim(*s); - return c; + int i, c; + + i = 0; + do + { + c = getc(f); + if (c == '#') /* skip comments */ + { + while (c != EOF && c != '\n') + { + c = getc(f); + } + } + else if (c != EOF) + { + if (i == *length - 1) + { + *length *= 2; + *s = (char *)realloc(*s, *length + 1); + } + (*s)[i++] = c; + } + } while (c != EOF && c != '\n'); + (*s)[i] = '\0'; + + str_trim(*s); + return c; } int parse_init(char *file_in, char *file_out) { - FILE *f; - char *s; - int c, length = 0; - - sym_init_table(); - - if(strcmp(file_in, "-") == 0) - f = stdin; - else - f = fopen(file_in, "r"); - - if(strcmp(file_out, "-") == 0) - fout = stdout; - else{ - fout = fopen(file_out, "w"); - setvbuf(fout, NULL, _IONBF, 0); - } - /* fprintf(fout, "\n => Parser started\n\n");*/ - - if(!f) - return -1; /* error opening file */ - - /* we now read in the file and parse */ - length = 40; - s = (char *)malloc(length + 1); - do{ - c = parse_get_line(f, &s, &length); - if(*s){ - if(*s == '%'){ /* we have a block */ - *s = ' '; - str_trim(s); - if(getsym(s) != NULL){ /* error */ - /*fprintf(stderr, "%s \"%s\" %s", "Block", s, "already defined");*/ - do{ /* skip block */ - c = parse_get_line(f, &s, &length); - }while(c != EOF && *s != '%'); - }else{ /* parse block */ - symrec *rec; - rec = putsym(s, S_BLOCK); - rec->value.block = (sym_block *)malloc(sizeof(sym_block)); - rec->value.block->n = 0; - rec->value.block->lines = NULL; - do{ - c = parse_get_line(f, &s, &length); - if(*s && *s != '%'){ - char *s1, *tok; - int l, col; - - l = rec->value.block->n; - rec->value.block->n++; - rec->value.block->lines = (sym_block_line *) - realloc((void *)rec->value.block->lines, sizeof(sym_block_line)*(l+1)); - rec->value.block->lines[l].n = 0; - rec->value.block->lines[l].fields = NULL; - - /* parse columns */ - for(s1 = s; (tok = strtok(s1, "|")) != NULL; s1 = NULL){ - char *tok2 = strdup(tok); - str_trim(tok2); - - col = rec->value.block->lines[l].n; - rec->value.block->lines[l].n++; - rec->value.block->lines[l].fields = (char **) - realloc((void *)rec->value.block->lines[l].fields, sizeof(char *)*(col+1)); - rec->value.block->lines[l].fields[col] = tok2; - } - } - }while(c != EOF && *s != '%'); - } - }else{ /* we can parse it np */ - parse_result c; - parse_exp(s, &c); - } - } - }while(c != EOF); - - free(s); - if(f != stdin) - fclose(f); - - sym_clear_reserved(); - - return 0; + FILE *f; + char *s; + int c, length = 0; + + sym_init_table(); + + if (strcmp(file_in, "-") == 0) + { + f = stdin; + } + else + { + f = fopen(file_in, "r"); + } + + if (strcmp(file_out, "-") == 0) + { + fout = stdout; + } + else + { + fout = fopen(file_out, "w"); + setvbuf(fout, NULL, _IONBF, 0); + } + /* fprintf(fout, "\n => Parser started\n\n");*/ + + if (!f) + { + return -1; /* error opening file */ + } + + /* we now read in the file and parse */ + length = 40; + s = (char *)malloc(length + 1); + do + { + c = parse_get_line(f, &s, &length); + if (*s) + { + if (*s == '%') + { /* we have a block */ + *s = ' '; + str_trim(s); + if (getsym(s) != NULL) + { /* error */ + /*fprintf(stderr, "%s \"%s\" %s", "Block", s, "already + * defined");*/ + do + { /* skip block */ + c = parse_get_line(f, &s, &length); + } while (c != EOF && *s != '%'); + } + else + { /* parse block */ + symrec *rec; + rec = putsym(s, S_BLOCK); + rec->value.block = (sym_block *)malloc(sizeof(sym_block)); + rec->value.block->n = 0; + rec->value.block->lines = NULL; + do + { + c = parse_get_line(f, &s, &length); + if (*s && *s != '%') + { + char *s1, *tok; + int l, col; + + l = rec->value.block->n; + rec->value.block->n++; + rec->value.block->lines = (sym_block_line *)realloc( + (void *)rec->value.block->lines, + sizeof(sym_block_line) * (l + 1)); + rec->value.block->lines[l].n = 0; + rec->value.block->lines[l].fields = NULL; + + /* parse columns */ + for (s1 = s; (tok = strtok(s1, "|")) != NULL; + s1 = NULL) + { + char *tok2 = strdup(tok); + str_trim(tok2); + + col = rec->value.block->lines[l].n; + rec->value.block->lines[l].n++; + rec->value.block->lines[l] + .fields = (char **)realloc( + (void *)rec->value.block->lines[l].fields, + sizeof(char *) * (col + 1)); + rec->value.block->lines[l].fields[col] = tok2; + } + } + } while (c != EOF && *s != '%'); + } + } + else + { /* we can parse it np */ + parse_result c; + parse_exp(s, &c); + } + } + } while (c != EOF); + + free(s); + if (f != stdin) + { + fclose(f); + } + + sym_clear_reserved(); + + return 0; } void parse_end() { - sym_end_table(); - /* fprintf(fout, "\n => Parser ended"); */ - if(fout != stdout) - fclose(fout); + sym_end_table(); + /* fprintf(fout, "\n => Parser ended"); */ + if (fout != stdout) + { + fclose(fout); + } } int parse_isdef(char *name) { - if(getsym(name) == NULL) - return 0; - return 1; + if (getsym(name) == NULL) + { + return 0; + } + return 1; } int parse_int(char *name, int def) { - symrec *ptr; - int ret; - - ptr = getsym(name); - if(ptr && ptr->type == S_CMPLX){ - ret = (int)rint(GSL_REAL(ptr->value.c)); - /*fprintf(fout," [parser] %s = %d\n", name, ret);*/ - }else{ - ret = def; - /*fprintf(fout, " [parser] %s = %d\t[default value]\n", name, ret);*/ - } - return ret; + symrec *ptr; + int ret; + + ptr = getsym(name); + if (ptr && ptr->type == S_CMPLX) + { + ret = (int)rint(GSL_REAL(ptr->value.c)); + /*fprintf(fout," [parser] %s = %d\n", name, ret);*/ + } + else + { + ret = def; + /*fprintf(fout, " [parser] %s = %d\t[default value]\n", name, ret);*/ + } + return ret; } double parse_double(char *name, double def) { - symrec *ptr; - double ret; - - ptr = getsym(name); - if(ptr && ptr->type == S_CMPLX){ - ret = GSL_REAL(ptr->value.c); - /*fprintf(fout, " [parser] %s = %g\n", name, ret);*/ - }else{ - ret = def; - /*fprintf(fout, " [parser] %s = %g\t[default value]\n", name, ret);*/ - } - return ret; + symrec *ptr; + double ret; + + ptr = getsym(name); + if (ptr && ptr->type == S_CMPLX) + { + ret = GSL_REAL(ptr->value.c); + /*fprintf(fout, " [parser] %s = %g\n", name, ret);*/ + } + else + { + ret = def; + /*fprintf(fout, " [parser] %s = %g\t[default value]\n", name, ret);*/ + } + return ret; } gsl_complex parse_complex(char *name, gsl_complex def) { - symrec *ptr; - gsl_complex ret; - - ptr = getsym(name); - if(ptr && ptr->type == S_CMPLX){ - ret = ptr->value.c; - /*fprintf(fout, " [parser] %s = (%g, %g)\n", name, GSL_REAL(ret), GSL_IMAG(ret));*/ - }else{ - ret = def; - /*fprintf(fout, " [parser] %s = (%g, %g)\t[default value]\n", name, GSL_REAL(ret), GSL_IMAG(ret));*/ - } - return ret; + symrec *ptr; + gsl_complex ret; + + ptr = getsym(name); + if (ptr && ptr->type == S_CMPLX) + { + ret = ptr->value.c; + /*fprintf(fout, " [parser] %s = (%g, %g)\n", name, GSL_REAL(ret), + * GSL_IMAG(ret));*/ + } + else + { + ret = def; + /*fprintf(fout, " [parser] %s = (%g, %g)\t[default value]\n", name, + * GSL_REAL(ret), GSL_IMAG(ret));*/ + } + return ret; } char *parse_string(char *name, char *def) { - symrec *ptr; - char *ret; - - ptr = getsym(name); - if(ptr && ptr->type == S_STR){ - ret = ptr->value.str; - /*fprintf(fout, " [parser] %s = \"%s\"\n", name, ret);*/ - }else{ - ret = def; - /*fprintf(fout, " [parser] %s = \"%s\"\t[default value]\n", name, ret);*/ - } - return ret; + symrec *ptr; + char *ret; + + ptr = getsym(name); + if (ptr && ptr->type == S_STR) + { + ret = ptr->value.str; + /*fprintf(fout, " [parser] %s = \"%s\"\n", name, ret);*/ + } + else + { + ret = def; + /*fprintf(fout, " [parser] %s = \"%s\"\t[default value]\n", name, + * ret);*/ + } + return ret; } int parse_block_n(char *name) { - symrec *ptr; - - ptr = getsym(name); - if(ptr && ptr->type == S_BLOCK){ - return ptr->value.block->n; - }else - return 0; + symrec *ptr; + + ptr = getsym(name); + if (ptr && ptr->type == S_BLOCK) + { + return ptr->value.block->n; + } + else + { + return 0; + } } static int parse_block_work(char *name, int l, int col, parse_result *r) { - symrec *ptr; - - ptr = getsym(name); - if(ptr && ptr->type == S_BLOCK){ - if(l < 0 || l >= ptr->value.block->n) - return -2; /* dimension error */ - if(col < 0 || col >= ptr->value.block->lines[l].n) - return -2; - - return parse_exp(ptr->value.block->lines[l].fields[col], r); - }else - return -1; + symrec *ptr; + + ptr = getsym(name); + if (ptr && ptr->type == S_BLOCK) + { + if (l < 0 || l >= ptr->value.block->n) + { + return -2; /* dimension error */ + } + if (col < 0 || col >= ptr->value.block->lines[l].n) + { + return -2; + } + + return parse_exp(ptr->value.block->lines[l].fields[col], r); + } + else + { + return -1; + } } int parse_block_int(char *name, int l, int col, int *r) { - int o; - parse_result pr; - - o = parse_block_work(name, l, col, &pr); - - if(o == 0 && pr.type == PR_CMPLX){ - *r = (int)rint(GSL_REAL(pr.value.c)); - /*fprintf(fout, " [parser] %s(%d, %d) = %d\n", name, l, col, *r);*/ - return 0; - }else - return o; + int o; + parse_result pr; + + o = parse_block_work(name, l, col, &pr); + + if (o == 0 && pr.type == PR_CMPLX) + { + *r = (int)rint(GSL_REAL(pr.value.c)); + /*fprintf(fout, " [parser] %s(%d, %d) = %d\n", name, l, col, *r);*/ + return 0; + } + else + { + return o; + } } int parse_block_double(char *name, int l, int col, double *r) { - int o; - parse_result pr; - - o = parse_block_work(name, l, col, &pr); - - if(o == 0 && pr.type == PR_CMPLX){ - *r = GSL_REAL(pr.value.c); - /*fprintf(fout, " [parser] %s(%d, %d) = %g\n", name, l, col, *r);*/ - return 0; - }else - return o; + int o; + parse_result pr; + + o = parse_block_work(name, l, col, &pr); + + if (o == 0 && pr.type == PR_CMPLX) + { + *r = GSL_REAL(pr.value.c); + /*fprintf(fout, " [parser] %s(%d, %d) = %g\n", name, l, col, *r);*/ + return 0; + } + else + { + return o; + } } int parse_block_complex(char *name, int l, int col, gsl_complex *r) { - int o; - parse_result pr; - - o = parse_block_work(name, l, col, &pr); - - if(o == 0 && pr.type == PR_CMPLX){ - *r = pr.value.c; - /*fprintf(fout, " [parser] %s(%d, %d) = (%g,%g)\n", name, l, col, GSL_REAL(*r), GSL_IMAG(*r));*/ - return 0; - }else - return o; + int o; + parse_result pr; + + o = parse_block_work(name, l, col, &pr); + + if (o == 0 && pr.type == PR_CMPLX) + { + *r = pr.value.c; + /*fprintf(fout, " [parser] %s(%d, %d) = (%g,%g)\n", name, l, col, + * GSL_REAL(*r), GSL_IMAG(*r));*/ + return 0; + } + else + { + return o; + } } int parse_block_string(char *name, int l, int col, char **r) { - int o; - parse_result pr; - - o = parse_block_work(name, l, col, &pr); - - if(o == 0 && pr.type == PR_STR){ - *r = pr.value.s; - /*fprintf(fout, " [parser] %s(%d, %d) = \"%s\"\n", name, l, col, *r);*/ - return 0; - }else - return o; + int o; + parse_result pr; + + o = parse_block_work(name, l, col, &pr); + + if (o == 0 && pr.type == PR_STR) + { + *r = pr.value.s; + /*fprintf(fout, " [parser] %s(%d, %d) = \"%s\"\n", name, l, col, + * *r);*/ + return 0; + } + else + { + return o; + } } diff --git a/src/parser/PARSER_exp.c b/src/parser/PARSER_exp.c index 97c0ff1b03..500b756519 100644 --- a/src/parser/PARSER_exp.c +++ b/src/parser/PARSER_exp.c @@ -21,20 +21,20 @@ #include #include #include -#include #include #include +#include static char *par_string; static int par_pos; parse_result par_res; int yylex(); -int yyerror (char *s) /* Called by yyparse on error */ +int yyerror(char *s) /* Called by yyparse on error */ { - /* Do nothing */ - /* printf("%s\n", s); */ - return 0; + /* Do nothing */ + /* printf("%s\n", s); */ + return 0; } /* include the parser */ @@ -42,99 +42,135 @@ int yyerror (char *s) /* Called by yyparse on error */ int parse_exp(char *exp, parse_result *r) { - int o; - - par_string = exp; - par_pos = 0; - - o = yyparse(); - if(o == 0){ - r->type = par_res.type; - if(r->type == PR_CMPLX) - r->value.c = par_res.value.c; - else - r->value.s = par_res.value.s; - } - return o; + int o; + + par_string = exp; + par_pos = 0; + + o = yyparse(); + if (o == 0) + { + r->type = par_res.type; + if (r->type == PR_CMPLX) + { + r->value.c = par_res.value.c; + } + else + { + r->value.s = par_res.value.s; + } + } + return o; } int get_real(char *s, double *d) { - int n=0; - sscanf(s, "%lg", d); - while(*s && (isdigit(*s) || *s=='.' || *s=='e' || *s=='E')){ - if((*s=='e' || *s=='E') && (*(s+1)=='+' || *(s+1)=='-')) {s++; n++;} - s++; n++; - } - return n; + int n = 0; + sscanf(s, "%lg", d); + while (*s && (isdigit(*s) || *s == '.' || *s == 'e' || *s == 'E')) + { + if ((*s == 'e' || *s == 'E') && (*(s + 1) == '+' || *(s + 1) == '-')) + { + s++; + n++; + } + s++; + n++; + } + return n; } -int yylex (){ - int c; - static char *symbuf = 0; - static int length = 0; - - /* Ignore whitespace, get first nonwhite character. */ - while ((c = par_string[par_pos++]) == ' ' || c == '\t'); - - if (c == '\0') - return '\n'; - - /* Char starts a number => parse the number. */ - if (c == '.' || isdigit (c)){ - par_pos--; - par_pos += get_real(&par_string[par_pos], &GSL_REAL(yylval.val)); - return NUM; - } - - /* Char starts an identifier => read the name. */ - if (isalpha (c) || c == '\'' || c == '\"'){ - symrec *s; - char startc = c; - int i; - - /* Initially make the buffer long enough - for a 40-character symbol name. */ - if (length == 0) - length = 40, symbuf = (char *)malloc (length + 1); - - if(startc == '\'' || startc == '\"') - c = par_string[par_pos++]; - else - startc = 0; /* false */ - - i = 0; - do{ - /* If buffer is full, make it bigger. */ - if (i == length){ - length *= 2; - symbuf = (char *)realloc (symbuf, length + 1); - } - /* Add this character to the buffer. */ - symbuf[i++] = c; - /* Get another character. */ - c = par_string[par_pos++]; - }while (c != '\0' && ((startc && c!=startc) || - (!startc && (isalnum(c) || c == '_' )))); - - if(!startc) par_pos--; - symbuf[i] = '\0'; - - if(!startc){ - s = getsym (symbuf); - if (s == 0) - s = putsym (symbuf, S_CMPLX); - yylval.tptr = s; - if(s->type == S_CMPLX) - return VAR; - else - return FNCT; - }else{ - yylval.str = strdup(symbuf); - return STR; - } - } - - /* Any other character is a token by itself. */ - return c; +int yylex() +{ + int c; + static char *symbuf = 0; + static int length = 0; + + /* Ignore whitespace, get first nonwhite character. */ + while ((c = par_string[par_pos++]) == ' ' || c == '\t'); + + if (c == '\0') + { + return '\n'; + } + + /* Char starts a number => parse the number. */ + if (c == '.' || isdigit(c)) + { + par_pos--; + par_pos += get_real(&par_string[par_pos], &GSL_REAL(yylval.val)); + return NUM; + } + + /* Char starts an identifier => read the name. */ + if (isalpha(c) || c == '\'' || c == '\"') + { + symrec *s; + char startc = c; + int i; + + /* Initially make the buffer long enough + for a 40-character symbol name. */ + if (length == 0) + { + length = 40, symbuf = (char *)malloc(length + 1); + } + + if (startc == '\'' || startc == '\"') + { + c = par_string[par_pos++]; + } + else + { + startc = 0; /* false */ + } + + i = 0; + do + { + /* If buffer is full, make it bigger. */ + if (i == length) + { + length *= 2; + symbuf = (char *)realloc(symbuf, length + 1); + } + /* Add this character to the buffer. */ + symbuf[i++] = c; + /* Get another character. */ + c = par_string[par_pos++]; + } while (c != '\0' && ((startc && c != startc) || + (!startc && (isalnum(c) || c == '_')))); + + if (!startc) + { + par_pos--; + } + symbuf[i] = '\0'; + + if (!startc) + { + s = getsym(symbuf); + if (s == 0) + { + s = putsym(symbuf, S_CMPLX); + } + yylval.tptr = s; + if (s->type == S_CMPLX) + { + return VAR; + } + else + { + return FNCT; + } + } + else + { + yylval.str = strdup(symbuf); + return STR; + } + } + + /* Any other character is a token by itself. */ + return c; } diff --git a/src/parser/PARSER_interface.c b/src/parser/PARSER_interface.c index 79f4220259..152bbffe5e 100644 --- a/src/parser/PARSER_interface.c +++ b/src/parser/PARSER_interface.c @@ -17,104 +17,100 @@ 02111-1307, USA. */ -#include -#include #include #include #include +#include #include +#include /* Interface to the parsing routines */ -int C_FUNC(iparse_init, IPARSE_INIT) - (char *in, char *out) -{ - return parse_init(in, out); +int C_FUNC(iparse_init, IPARSE_INIT)(char *in, char *out) +{ + return parse_init(in, out); } -void C_FUNC(iparse_end, IPARSE_END) - () -{ - parse_end(); -} +void C_FUNC(iparse_end, IPARSE_END)() { parse_end(); } -int C_FUNC(iparse_isdef, IPARSE_ISDEF) - (char *name) -{ - return parse_isdef(name); -} +int C_FUNC(iparse_isdef, IPARSE_ISDEF)(char *name) { return parse_isdef(name); } -void C_FUNC(iparse_int, IPARSE_INT) - (char *name, int *def, int *res) -{ - *res = parse_int(name, *def); +void C_FUNC(iparse_int, IPARSE_INT)(char *name, int *def, int *res) +{ + *res = parse_int(name, *def); } -void C_FUNC(iparse_double, IPARSE_DOUBLE) - (char *name, double *def, double *res) +void C_FUNC(iparse_double, IPARSE_DOUBLE)(char *name, double *def, double *res) { - *res = parse_double(name, *def); + *res = parse_double(name, *def); } -void C_FUNC(iparse_complex, IPARSE_COMPLEX) - (char *name, gsl_complex *def, gsl_complex *res) +void C_FUNC(iparse_complex, IPARSE_COMPLEX)(char *name, gsl_complex *def, + gsl_complex *res) { - *res = parse_complex(name, *def); + *res = parse_complex(name, *def); } -void C_FUNC(iparse_string, IPARSE_STRING) - (char *name, char *def, char *res) +void C_FUNC(iparse_string, IPARSE_STRING)(char *name, char *def, char *res) { - char *c = parse_string(name, def); - int len = strlen(c); - strcpy(res, c); - res[len] = res[len + 1]; - /*fprintf(stderr, " %s %d %s",name,len,c);*/ + char *c = parse_string(name, def); + int len = strlen(c); + strcpy(res, c); + res[len] = res[len + 1]; + /*fprintf(stderr, " %s %d %s",name,len,c);*/ } -static void parse_block_error(char *type, char *name, int l, int c){ - /*fprintf(stderr, "Error: block \"%s\" does not contain a %s in line %d and col %d", - name, type, l, c); - exit(1);*/ +static void parse_block_error(char *type, char *name, int l, int c) +{ + /*fprintf(stderr, "Error: block \"%s\" does not contain a %s in line %d and + col %d", name, type, l, c); exit(1);*/ } -int C_FUNC(iparse_block_n, IPARSE_BLOCK_N) - (char *name) +int C_FUNC(iparse_block_n, IPARSE_BLOCK_N)(char *name) { - return parse_block_n(name); + return parse_block_n(name); } -void C_FUNC(iparse_block_int, IPARSE_BLOCK_INT) - (char *name, int *l, int *c, int *res) +void C_FUNC(iparse_block_int, IPARSE_BLOCK_INT)(char *name, int *l, int *c, + int *res) { - if(parse_block_int(name, *l, *c, res) != 0) - parse_block_error("int", name, *l, *c); + if (parse_block_int(name, *l, *c, res) != 0) + { + parse_block_error("int", name, *l, *c); + } } -void C_FUNC(iparse_block_double, IPARSE_BLOCK_DOUBLE) - (char *name, int *l, int *c, double *res) +void C_FUNC(iparse_block_double, IPARSE_BLOCK_DOUBLE)(char *name, int *l, + int *c, double *res) { - if(parse_block_double(name, *l, *c, res) != 0) - parse_block_error("double", name, *l, *c); + if (parse_block_double(name, *l, *c, res) != 0) + { + parse_block_error("double", name, *l, *c); + } } -void C_FUNC(iparse_block_complex, IPARSE_BLOCK_COMPLEX) - (char *name, int *l, int *c, gsl_complex *res) +void C_FUNC(iparse_block_complex, + IPARSE_BLOCK_COMPLEX)(char *name, int *l, int *c, gsl_complex *res) { - if(parse_block_complex(name, *l, *c, res) != 0) - parse_block_error("complex", name, *l, *c); + if (parse_block_complex(name, *l, *c, res) != 0) + { + parse_block_error("complex", name, *l, *c); + } } -void C_FUNC(iparse_block_string, IPARSE_BLOCK_STRING) - (char *name, int *l, int *c, char *res) +void C_FUNC(iparse_block_string, IPARSE_BLOCK_STRING)(char *name, int *l, + int *c, char *res) { - char *s; - int len; - - if(parse_block_string(name, *l, *c, &s) != 0) - parse_block_error("string", name, *l, *c); - else{ - len = strlen(s); - strcpy(res, s); - res[len] = res[len + 1]; - } + char *s; + int len; + + if (parse_block_string(name, *l, *c, &s) != 0) + { + parse_block_error("string", name, *l, *c); + } + else + { + len = strlen(s); + strcpy(res, s); + res[len] = res[len + 1]; + } } diff --git a/src/parser/PARSER_math.c b/src/parser/PARSER_math.c index 9078f41821..6b94fa1ae2 100644 --- a/src/parser/PARSER_math.c +++ b/src/parser/PARSER_math.c @@ -1,17 +1,17 @@ /* complex/math.c - * + * * Copyright (C) 1996, 1997, 1998, 1999, 2000 Jorma Olavi Tähtinen, Brian Gough - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -41,957 +41,896 @@ * 4.4.37, 4.4.38, 4.4.39 */ -#include #include #include +#include /********************************************************************** * Complex numbers **********************************************************************/ #ifndef HIDE_INLINE_STATIC -gsl_complex -gsl_complex_rect (double x, double y) -{ /* return z = x + i y */ - gsl_complex z; - GSL_SET_COMPLEX (&z, x, y); - return z; +gsl_complex gsl_complex_rect(double x, double y) +{ /* return z = x + i y */ + gsl_complex z; + GSL_SET_COMPLEX(&z, x, y); + return z; } #endif -gsl_complex -gsl_complex_polar (double r, double theta) -{ /* return z = r exp(i theta) */ - gsl_complex z; - GSL_SET_COMPLEX (&z, r * cos (theta), r * sin (theta)); - return z; +gsl_complex gsl_complex_polar(double r, double theta) +{ /* return z = r exp(i theta) */ + gsl_complex z; + GSL_SET_COMPLEX(&z, r * cos(theta), r * sin(theta)); + return z; } /********************************************************************** * Properties of complex numbers **********************************************************************/ -double -gsl_complex_arg (gsl_complex z) -{ /* return arg(z), -pi < arg(z) <= +pi */ - return atan2 (GSL_IMAG (z), GSL_REAL (z)); +double gsl_complex_arg(gsl_complex z) +{ /* return arg(z), -pi < arg(z) <= +pi */ + return atan2(GSL_IMAG(z), GSL_REAL(z)); } -double -gsl_complex_abs (gsl_complex z) -{ /* return |z| */ - return hypot (GSL_REAL (z), GSL_IMAG (z)); +double gsl_complex_abs(gsl_complex z) +{ /* return |z| */ + return hypot(GSL_REAL(z), GSL_IMAG(z)); } -double -gsl_complex_abs2 (gsl_complex z) -{ /* return |z|^2 */ - double x = GSL_REAL (z); - double y = GSL_IMAG (z); +double gsl_complex_abs2(gsl_complex z) +{ /* return |z|^2 */ + double x = GSL_REAL(z); + double y = GSL_IMAG(z); - return (x * x + y * y); + return (x * x + y * y); } -double -gsl_complex_logabs (gsl_complex z) -{ /* return log|z| */ - double xabs = fabs (GSL_REAL (z)); - double yabs = fabs (GSL_IMAG (z)); - double max, u; +double gsl_complex_logabs(gsl_complex z) +{ /* return log|z| */ + double xabs = fabs(GSL_REAL(z)); + double yabs = fabs(GSL_IMAG(z)); + double max, u; - if (xabs >= yabs) + if (xabs >= yabs) { - max = xabs; - u = yabs / xabs; + max = xabs; + u = yabs / xabs; } - else + else { - max = yabs; - u = xabs / yabs; + max = yabs; + u = xabs / yabs; } - /* Handle underflow when u is close to 0 */ + /* Handle underflow when u is close to 0 */ - return log (max) + 0.5 * log1p (u * u); + return log(max) + 0.5 * log1p(u * u); } - /*********************************************************************** * Complex arithmetic operators ***********************************************************************/ -gsl_complex -gsl_complex_add (gsl_complex a, gsl_complex b) -{ /* z=a+b */ - double ar = GSL_REAL (a), ai = GSL_IMAG (a); - double br = GSL_REAL (b), bi = GSL_IMAG (b); +gsl_complex gsl_complex_add(gsl_complex a, gsl_complex b) +{ /* z=a+b */ + double ar = GSL_REAL(a), ai = GSL_IMAG(a); + double br = GSL_REAL(b), bi = GSL_IMAG(b); - gsl_complex z; - GSL_SET_COMPLEX (&z, ar + br, ai + bi); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, ar + br, ai + bi); + return z; } -gsl_complex -gsl_complex_add_real (gsl_complex a, double x) -{ /* z=a+x */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_REAL (a) + x, GSL_IMAG (a)); - return z; +gsl_complex gsl_complex_add_real(gsl_complex a, double x) +{ /* z=a+x */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_REAL(a) + x, GSL_IMAG(a)); + return z; } -gsl_complex -gsl_complex_add_imag (gsl_complex a, double y) -{ /* z=a+iy */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_REAL (a), GSL_IMAG (a) + y); - return z; +gsl_complex gsl_complex_add_imag(gsl_complex a, double y) +{ /* z=a+iy */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_REAL(a), GSL_IMAG(a) + y); + return z; } +gsl_complex gsl_complex_sub(gsl_complex a, gsl_complex b) +{ /* z=a-b */ + double ar = GSL_REAL(a), ai = GSL_IMAG(a); + double br = GSL_REAL(b), bi = GSL_IMAG(b); -gsl_complex -gsl_complex_sub (gsl_complex a, gsl_complex b) -{ /* z=a-b */ - double ar = GSL_REAL (a), ai = GSL_IMAG (a); - double br = GSL_REAL (b), bi = GSL_IMAG (b); - - gsl_complex z; - GSL_SET_COMPLEX (&z, ar - br, ai - bi); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, ar - br, ai - bi); + return z; } -gsl_complex -gsl_complex_sub_real (gsl_complex a, double x) -{ /* z=a-x */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_REAL (a) - x, GSL_IMAG (a)); - return z; +gsl_complex gsl_complex_sub_real(gsl_complex a, double x) +{ /* z=a-x */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_REAL(a) - x, GSL_IMAG(a)); + return z; } -gsl_complex -gsl_complex_sub_imag (gsl_complex a, double y) -{ /* z=a-iy */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_REAL (a), GSL_IMAG (a) - y); - return z; +gsl_complex gsl_complex_sub_imag(gsl_complex a, double y) +{ /* z=a-iy */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_REAL(a), GSL_IMAG(a) - y); + return z; } -gsl_complex -gsl_complex_mul (gsl_complex a, gsl_complex b) -{ /* z=a*b */ - double ar = GSL_REAL (a), ai = GSL_IMAG (a); - double br = GSL_REAL (b), bi = GSL_IMAG (b); +gsl_complex gsl_complex_mul(gsl_complex a, gsl_complex b) +{ /* z=a*b */ + double ar = GSL_REAL(a), ai = GSL_IMAG(a); + double br = GSL_REAL(b), bi = GSL_IMAG(b); - gsl_complex z; - GSL_SET_COMPLEX (&z, ar * br - ai * bi, ar * bi + ai * br); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, ar * br - ai * bi, ar * bi + ai * br); + return z; } -gsl_complex -gsl_complex_mul_real (gsl_complex a, double x) -{ /* z=a*x */ - gsl_complex z; - GSL_SET_COMPLEX (&z, x * GSL_REAL (a), x * GSL_IMAG (a)); - return z; +gsl_complex gsl_complex_mul_real(gsl_complex a, double x) +{ /* z=a*x */ + gsl_complex z; + GSL_SET_COMPLEX(&z, x * GSL_REAL(a), x * GSL_IMAG(a)); + return z; } -gsl_complex -gsl_complex_mul_imag (gsl_complex a, double y) -{ /* z=a*iy */ - gsl_complex z; - GSL_SET_COMPLEX (&z, -y * GSL_IMAG (a), y * GSL_REAL (a)); - return z; +gsl_complex gsl_complex_mul_imag(gsl_complex a, double y) +{ /* z=a*iy */ + gsl_complex z; + GSL_SET_COMPLEX(&z, -y * GSL_IMAG(a), y * GSL_REAL(a)); + return z; } -gsl_complex -gsl_complex_div (gsl_complex a, gsl_complex b) -{ /* z=a/b */ - double ar = GSL_REAL (a), ai = GSL_IMAG (a); - double br = GSL_REAL (b), bi = GSL_IMAG (b); +gsl_complex gsl_complex_div(gsl_complex a, gsl_complex b) +{ /* z=a/b */ + double ar = GSL_REAL(a), ai = GSL_IMAG(a); + double br = GSL_REAL(b), bi = GSL_IMAG(b); - double s = 1.0 / gsl_complex_abs (b); + double s = 1.0 / gsl_complex_abs(b); - double sbr = s * br; - double sbi = s * bi; + double sbr = s * br; + double sbi = s * bi; - double zr = (ar * sbr + ai * sbi) * s; - double zi = (ai * sbr - ar * sbi) * s; + double zr = (ar * sbr + ai * sbi) * s; + double zi = (ai * sbr - ar * sbi) * s; - gsl_complex z; - GSL_SET_COMPLEX (&z, zr, zi); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, zr, zi); + return z; } -gsl_complex -gsl_complex_div_real (gsl_complex a, double x) -{ /* z=a/x */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_REAL (a) / x, GSL_IMAG (a) / x); - return z; +gsl_complex gsl_complex_div_real(gsl_complex a, double x) +{ /* z=a/x */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_REAL(a) / x, GSL_IMAG(a) / x); + return z; } -gsl_complex -gsl_complex_div_imag (gsl_complex a, double y) -{ /* z=a/(iy) */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_IMAG (a) / y, - GSL_REAL (a) / y); - return z; +gsl_complex gsl_complex_div_imag(gsl_complex a, double y) +{ /* z=a/(iy) */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_IMAG(a) / y, -GSL_REAL(a) / y); + return z; } -gsl_complex -gsl_complex_conjugate (gsl_complex a) -{ /* z=conj(a) */ - gsl_complex z; - GSL_SET_COMPLEX (&z, GSL_REAL (a), -GSL_IMAG (a)); - return z; +gsl_complex gsl_complex_conjugate(gsl_complex a) +{ /* z=conj(a) */ + gsl_complex z; + GSL_SET_COMPLEX(&z, GSL_REAL(a), -GSL_IMAG(a)); + return z; } -gsl_complex -gsl_complex_negative (gsl_complex a) -{ /* z=-a */ - gsl_complex z; - GSL_SET_COMPLEX (&z, -GSL_REAL (a), -GSL_IMAG (a)); - return z; +gsl_complex gsl_complex_negative(gsl_complex a) +{ /* z=-a */ + gsl_complex z; + GSL_SET_COMPLEX(&z, -GSL_REAL(a), -GSL_IMAG(a)); + return z; } -gsl_complex -gsl_complex_inverse (gsl_complex a) -{ /* z=1/a */ - double s = 1.0 / gsl_complex_abs (a); +gsl_complex gsl_complex_inverse(gsl_complex a) +{ /* z=1/a */ + double s = 1.0 / gsl_complex_abs(a); - gsl_complex z; - GSL_SET_COMPLEX (&z, (GSL_REAL (a) * s) * s, -(GSL_IMAG (a) * s) * s); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, (GSL_REAL(a) * s) * s, -(GSL_IMAG(a) * s) * s); + return z; } /********************************************************************** * Elementary complex functions **********************************************************************/ -gsl_complex -gsl_complex_sqrt (gsl_complex a) -{ /* z=sqrt(a) */ - gsl_complex z; +gsl_complex gsl_complex_sqrt(gsl_complex a) +{ /* z=sqrt(a) */ + gsl_complex z; - if (GSL_REAL (a) == 0.0 && GSL_IMAG (a) == 0.0) + if (GSL_REAL(a) == 0.0 && GSL_IMAG(a) == 0.0) { - GSL_SET_COMPLEX (&z, 0, 0); + GSL_SET_COMPLEX(&z, 0, 0); } - else + else { - double x = fabs (GSL_REAL (a)); - double y = fabs (GSL_IMAG (a)); - double w; + double x = fabs(GSL_REAL(a)); + double y = fabs(GSL_IMAG(a)); + double w; - if (x >= y) - { - double t = y / x; - w = sqrt (x) * sqrt (0.5 * (1.0 + sqrt (1.0 + t * t))); - } - else - { - double t = x / y; - w = sqrt (y) * sqrt (0.5 * (t + sqrt (1.0 + t * t))); - } + if (x >= y) + { + double t = y / x; + w = sqrt(x) * sqrt(0.5 * (1.0 + sqrt(1.0 + t * t))); + } + else + { + double t = x / y; + w = sqrt(y) * sqrt(0.5 * (t + sqrt(1.0 + t * t))); + } - if (GSL_REAL (a) >= 0.0) - { - double ai = GSL_IMAG (a); - GSL_SET_COMPLEX (&z, w, ai / (2.0 * w)); - } - else - { - double ai = GSL_IMAG (a); - double vi = (ai >= 0) ? w : -w; - GSL_SET_COMPLEX (&z, ai / (2.0 * vi), vi); - } + if (GSL_REAL(a) >= 0.0) + { + double ai = GSL_IMAG(a); + GSL_SET_COMPLEX(&z, w, ai / (2.0 * w)); + } + else + { + double ai = GSL_IMAG(a); + double vi = (ai >= 0) ? w : -w; + GSL_SET_COMPLEX(&z, ai / (2.0 * vi), vi); + } } - return z; + return z; } -gsl_complex -gsl_complex_sqrt_real (double x) -{ /* z=sqrt(x) */ - gsl_complex z; +gsl_complex gsl_complex_sqrt_real(double x) +{ /* z=sqrt(x) */ + gsl_complex z; - if (x >= 0) + if (x >= 0) { - GSL_SET_COMPLEX (&z, sqrt (x), 0.0); + GSL_SET_COMPLEX(&z, sqrt(x), 0.0); } - else + else { - GSL_SET_COMPLEX (&z, 0.0, sqrt (-x)); + GSL_SET_COMPLEX(&z, 0.0, sqrt(-x)); } - return z; + return z; } -gsl_complex -gsl_complex_exp (gsl_complex a) -{ /* z=exp(a) */ - double rho = exp (GSL_REAL (a)); - double theta = GSL_IMAG (a); +gsl_complex gsl_complex_exp(gsl_complex a) +{ /* z=exp(a) */ + double rho = exp(GSL_REAL(a)); + double theta = GSL_IMAG(a); - gsl_complex z; - GSL_SET_COMPLEX (&z, rho * cos (theta), rho * sin (theta)); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, rho * cos(theta), rho * sin(theta)); + return z; } -gsl_complex -gsl_complex_pow (gsl_complex a, gsl_complex b) -{ /* z=a^b */ - gsl_complex z; +gsl_complex gsl_complex_pow(gsl_complex a, gsl_complex b) +{ /* z=a^b */ + gsl_complex z; - if (GSL_REAL (a) == 0 && GSL_IMAG (a) == 0.0) + if (GSL_REAL(a) == 0 && GSL_IMAG(a) == 0.0) { - GSL_SET_COMPLEX (&z, 0.0, 0.0); + GSL_SET_COMPLEX(&z, 0.0, 0.0); } - else + else { - double logr = gsl_complex_logabs (a); - double theta = gsl_complex_arg (a); + double logr = gsl_complex_logabs(a); + double theta = gsl_complex_arg(a); - double br = GSL_REAL (b), bi = GSL_IMAG (b); + double br = GSL_REAL(b), bi = GSL_IMAG(b); - double rho = exp (logr * br - bi * theta); - double beta = theta * br + bi * logr; + double rho = exp(logr * br - bi * theta); + double beta = theta * br + bi * logr; - GSL_SET_COMPLEX (&z, rho * cos (beta), rho * sin (beta)); + GSL_SET_COMPLEX(&z, rho * cos(beta), rho * sin(beta)); } - return z; + return z; } -gsl_complex -gsl_complex_pow_real (gsl_complex a, double b) -{ /* z=a^b */ - gsl_complex z; +gsl_complex gsl_complex_pow_real(gsl_complex a, double b) +{ /* z=a^b */ + gsl_complex z; - if (GSL_REAL (a) == 0 && GSL_IMAG (a) == 0) + if (GSL_REAL(a) == 0 && GSL_IMAG(a) == 0) { - GSL_SET_COMPLEX (&z, 0, 0); + GSL_SET_COMPLEX(&z, 0, 0); } - else + else { - double logr = gsl_complex_logabs (a); - double theta = gsl_complex_arg (a); - double rho = exp (logr * b); - double beta = theta * b; - GSL_SET_COMPLEX (&z, rho * cos (beta), rho * sin (beta)); + double logr = gsl_complex_logabs(a); + double theta = gsl_complex_arg(a); + double rho = exp(logr * b); + double beta = theta * b; + GSL_SET_COMPLEX(&z, rho * cos(beta), rho * sin(beta)); } - return z; + return z; } -gsl_complex -gsl_complex_log (gsl_complex a) -{ /* z=log(a) */ - double logr = gsl_complex_logabs (a); - double theta = gsl_complex_arg (a); +gsl_complex gsl_complex_log(gsl_complex a) +{ /* z=log(a) */ + double logr = gsl_complex_logabs(a); + double theta = gsl_complex_arg(a); - gsl_complex z; - GSL_SET_COMPLEX (&z, logr, theta); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, logr, theta); + return z; } -gsl_complex -gsl_complex_log10 (gsl_complex a) -{ /* z = log10(a) */ - return gsl_complex_mul_real (gsl_complex_log (a), 1 / log (10.)); +gsl_complex gsl_complex_log10(gsl_complex a) +{ /* z = log10(a) */ + return gsl_complex_mul_real(gsl_complex_log(a), 1 / log(10.)); } -gsl_complex -gsl_complex_log_b (gsl_complex a, gsl_complex b) +gsl_complex gsl_complex_log_b(gsl_complex a, gsl_complex b) { - return gsl_complex_div (gsl_complex_log (a), gsl_complex_log (b)); + return gsl_complex_div(gsl_complex_log(a), gsl_complex_log(b)); } /*********************************************************************** * Complex trigonometric functions ***********************************************************************/ -gsl_complex -gsl_complex_sin (gsl_complex a) -{ /* z = sin(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); +gsl_complex gsl_complex_sin(gsl_complex a) +{ /* z = sin(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); - gsl_complex z; + gsl_complex z; - if (I == 0.0) + if (I == 0.0) { - /* avoid returing negative zero (-0.0) for the imaginary part */ + /* avoid returing negative zero (-0.0) for the imaginary part */ - GSL_SET_COMPLEX (&z, sin (R), 0.0); - } - else + GSL_SET_COMPLEX(&z, sin(R), 0.0); + } + else { - GSL_SET_COMPLEX (&z, sin (R) * cosh (I), cos (R) * sinh (I)); + GSL_SET_COMPLEX(&z, sin(R) * cosh(I), cos(R) * sinh(I)); } - return z; + return z; } -gsl_complex -gsl_complex_cos (gsl_complex a) -{ /* z = cos(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); +gsl_complex gsl_complex_cos(gsl_complex a) +{ /* z = cos(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); - gsl_complex z; + gsl_complex z; - if (I == 0.0) + if (I == 0.0) { - /* avoid returing negative zero (-0.0) for the imaginary part */ + /* avoid returing negative zero (-0.0) for the imaginary part */ - GSL_SET_COMPLEX (&z, cos (R), 0.0); - } - else + GSL_SET_COMPLEX(&z, cos(R), 0.0); + } + else { - GSL_SET_COMPLEX (&z, cos (R) * cosh (I), sin (R) * sinh (-I)); + GSL_SET_COMPLEX(&z, cos(R) * cosh(I), sin(R) * sinh(-I)); } - return z; + return z; } -gsl_complex -gsl_complex_tan (gsl_complex a) -{ /* z = tan(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); +gsl_complex gsl_complex_tan(gsl_complex a) +{ /* z = tan(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); - gsl_complex z; + gsl_complex z; - if (fabs (I) < 1) + if (fabs(I) < 1) { - double D = pow (cos (R), 2.0) + pow (sinh (I), 2.0); + double D = pow(cos(R), 2.0) + pow(sinh(I), 2.0); - GSL_SET_COMPLEX (&z, 0.5 * sin (2 * R) / D, 0.5 * sinh (2 * I) / D); + GSL_SET_COMPLEX(&z, 0.5 * sin(2 * R) / D, 0.5 * sinh(2 * I) / D); } - else + else { - double u = exp (-I); - double C = 2 * u / (1 - pow (u, 2.0)); - double D = 1 + pow (cos (R), 2.0) * pow (C, 2.0); + double u = exp(-I); + double C = 2 * u / (1 - pow(u, 2.0)); + double D = 1 + pow(cos(R), 2.0) * pow(C, 2.0); - double S = pow (C, 2.0); - double T = 1.0 / tanh (I); + double S = pow(C, 2.0); + double T = 1.0 / tanh(I); - GSL_SET_COMPLEX (&z, 0.5 * sin (2 * R) * S / D, T / D); + GSL_SET_COMPLEX(&z, 0.5 * sin(2 * R) * S / D, T / D); } - return z; + return z; } -gsl_complex -gsl_complex_sec (gsl_complex a) -{ /* z = sec(a) */ - gsl_complex z = gsl_complex_cos (a); - return gsl_complex_inverse (z); +gsl_complex gsl_complex_sec(gsl_complex a) +{ /* z = sec(a) */ + gsl_complex z = gsl_complex_cos(a); + return gsl_complex_inverse(z); } -gsl_complex -gsl_complex_csc (gsl_complex a) -{ /* z = csc(a) */ - gsl_complex z = gsl_complex_sin (a); - return gsl_complex_inverse(z); +gsl_complex gsl_complex_csc(gsl_complex a) +{ /* z = csc(a) */ + gsl_complex z = gsl_complex_sin(a); + return gsl_complex_inverse(z); } - -gsl_complex -gsl_complex_cot (gsl_complex a) -{ /* z = cot(a) */ - gsl_complex z = gsl_complex_tan (a); - return gsl_complex_inverse (z); +gsl_complex gsl_complex_cot(gsl_complex a) +{ /* z = cot(a) */ + gsl_complex z = gsl_complex_tan(a); + return gsl_complex_inverse(z); } /********************************************************************** * Inverse Complex Trigonometric Functions **********************************************************************/ -gsl_complex -gsl_complex_arcsin (gsl_complex a) -{ /* z = arcsin(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); - gsl_complex z; +gsl_complex gsl_complex_arcsin(gsl_complex a) +{ /* z = arcsin(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); + gsl_complex z; - if (I == 0) + if (I == 0) { - z = gsl_complex_arcsin_real (R); + z = gsl_complex_arcsin_real(R); } - else + else { - double x = fabs (R), y = fabs (I); - double r = hypot (x + 1, y), s = hypot (x - 1, y); - double A = 0.5 * (r + s); - double B = x / A; - double y2 = y * y; + double x = fabs(R), y = fabs(I); + double r = hypot(x + 1, y), s = hypot(x - 1, y); + double A = 0.5 * (r + s); + double B = x / A; + double y2 = y * y; + + double real, imag; - double real, imag; + const double A_crossover = 1.5, B_crossover = 0.6417; - const double A_crossover = 1.5, B_crossover = 0.6417; + if (B <= B_crossover) + { + real = asin(B); + } + else + { + if (x <= 1) + { + double D = 0.5 * (A + x) * (y2 / (r + x + 1) + (s + (1 - x))); + real = atan(x / sqrt(D)); + } + else + { + double Apx = A + x; + double D = 0.5 * (Apx / (r + x + 1) + Apx / (s + (x - 1))); + real = atan(x / (y * sqrt(D))); + } + } + + if (A <= A_crossover) + { + double Am1; + + if (x < 1) + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + y2 / (s + (1 - x))); + } + else + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + (s + (x - 1))); + } + + imag = log1p(Am1 + sqrt(Am1 * (A + 1))); + } + else + { + imag = log(A + sqrt(A * A - 1)); + } - if (B <= B_crossover) - { - real = asin (B); - } - else - { - if (x <= 1) - { - double D = 0.5 * (A + x) * (y2 / (r + x + 1) + (s + (1 - x))); - real = atan (x / sqrt (D)); - } - else - { - double Apx = A + x; - double D = 0.5 * (Apx / (r + x + 1) + Apx / (s + (x - 1))); - real = atan (x / (y * sqrt (D))); - } - } - - if (A <= A_crossover) - { - double Am1; - - if (x < 1) - { - Am1 = 0.5 * (y2 / (r + (x + 1)) + y2 / (s + (1 - x))); - } - else - { - Am1 = 0.5 * (y2 / (r + (x + 1)) + (s + (x - 1))); - } - - imag = log1p (Am1 + sqrt (Am1 * (A + 1))); - } - else - { - imag = log (A + sqrt (A * A - 1)); - } - - GSL_SET_COMPLEX (&z, (R >= 0) ? real : -real, (I >= 0) ? imag : -imag); - } - - return z; + GSL_SET_COMPLEX(&z, (R >= 0) ? real : -real, (I >= 0) ? imag : -imag); + } + + return z; } -gsl_complex -gsl_complex_arcsin_real (double a) -{ /* z = arcsin(a) */ - gsl_complex z; +gsl_complex gsl_complex_arcsin_real(double a) +{ /* z = arcsin(a) */ + gsl_complex z; - if (fabs (a) <= 1.0) + if (fabs(a) <= 1.0) { - GSL_SET_COMPLEX (&z, asin (a), 0.0); - } - else + GSL_SET_COMPLEX(&z, asin(a), 0.0); + } + else { - if (a < 0.0) - { - GSL_SET_COMPLEX (&z, -M_PI_2, acosh (-a)); - } - else - { - GSL_SET_COMPLEX (&z, M_PI_2, -acosh (a)); - } + if (a < 0.0) + { + GSL_SET_COMPLEX(&z, -M_PI_2, acosh(-a)); + } + else + { + GSL_SET_COMPLEX(&z, M_PI_2, -acosh(a)); + } } - return z; + return z; } -gsl_complex -gsl_complex_arccos (gsl_complex a) -{ /* z = arccos(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); - gsl_complex z; +gsl_complex gsl_complex_arccos(gsl_complex a) +{ /* z = arccos(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); + gsl_complex z; - if (I == 0) + if (I == 0) { - z = gsl_complex_arccos_real (R); + z = gsl_complex_arccos_real(R); } - else + else { - double x = fabs (R), y = fabs (I); - double r = hypot (x + 1, y), s = hypot (x - 1, y); - double A = 0.5 * (r + s); - double B = x / A; - double y2 = y * y; + double x = fabs(R), y = fabs(I); + double r = hypot(x + 1, y), s = hypot(x - 1, y); + double A = 0.5 * (r + s); + double B = x / A; + double y2 = y * y; - double real, imag; + double real, imag; - const double A_crossover = 1.5, B_crossover = 0.6417; + const double A_crossover = 1.5, B_crossover = 0.6417; - if (B <= B_crossover) - { - real = acos (B); - } - else - { - if (x <= 1) - { - double D = 0.5 * (A + x) * (y2 / (r + x + 1) + (s + (1 - x))); - real = atan (sqrt (D) / x); - } - else - { - double Apx = A + x; - double D = 0.5 * (Apx / (r + x + 1) + Apx / (s + (x - 1))); - real = atan ((y * sqrt (D)) / x); - } - } - - if (A <= A_crossover) - { - double Am1; - - if (x < 1) - { - Am1 = 0.5 * (y2 / (r + (x + 1)) + y2 / (s + (1 - x))); - } - else - { - Am1 = 0.5 * (y2 / (r + (x + 1)) + (s + (x - 1))); - } + if (B <= B_crossover) + { + real = acos(B); + } + else + { + if (x <= 1) + { + double D = 0.5 * (A + x) * (y2 / (r + x + 1) + (s + (1 - x))); + real = atan(sqrt(D) / x); + } + else + { + double Apx = A + x; + double D = 0.5 * (Apx / (r + x + 1) + Apx / (s + (x - 1))); + real = atan((y * sqrt(D)) / x); + } + } + + if (A <= A_crossover) + { + double Am1; + + if (x < 1) + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + y2 / (s + (1 - x))); + } + else + { + Am1 = 0.5 * (y2 / (r + (x + 1)) + (s + (x - 1))); + } - imag = log1p (Am1 + sqrt (Am1 * (A + 1))); - } - else - { - imag = log (A + sqrt (A * A - 1)); - } + imag = log1p(Am1 + sqrt(Am1 * (A + 1))); + } + else + { + imag = log(A + sqrt(A * A - 1)); + } - GSL_SET_COMPLEX (&z, (R >= 0) ? real : M_PI - real, (I >= 0) ? -imag : imag); + GSL_SET_COMPLEX(&z, (R >= 0) ? real : M_PI - real, + (I >= 0) ? -imag : imag); } - return z; + return z; } -gsl_complex -gsl_complex_arccos_real (double a) -{ /* z = arccos(a) */ - gsl_complex z; +gsl_complex gsl_complex_arccos_real(double a) +{ /* z = arccos(a) */ + gsl_complex z; - if (fabs (a) <= 1.0) + if (fabs(a) <= 1.0) { - GSL_SET_COMPLEX (&z, acos (a), 0); + GSL_SET_COMPLEX(&z, acos(a), 0); } - else + else { - if (a < 0.0) - { - GSL_SET_COMPLEX (&z, M_PI, -acosh (-a)); - } - else - { - GSL_SET_COMPLEX (&z, 0, acosh (a)); - } + if (a < 0.0) + { + GSL_SET_COMPLEX(&z, M_PI, -acosh(-a)); + } + else + { + GSL_SET_COMPLEX(&z, 0, acosh(a)); + } } - return z; + return z; } -gsl_complex -gsl_complex_arctan (gsl_complex a) -{ /* z = arctan(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); - gsl_complex z; +gsl_complex gsl_complex_arctan(gsl_complex a) +{ /* z = arctan(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); + gsl_complex z; - if (I == 0) + if (I == 0) { - GSL_SET_COMPLEX (&z, atan (R), 0); + GSL_SET_COMPLEX(&z, atan(R), 0); } - else + else { - /* FIXME: This is a naive implementation which does not fully - take into account cancellation errors, overflow, underflow - etc. It would benefit from the Hull et al treatment. */ + /* FIXME: This is a naive implementation which does not fully + take into account cancellation errors, overflow, underflow + etc. It would benefit from the Hull et al treatment. */ - double r = hypot (R, I); + double r = hypot(R, I); - double imag; + double imag; - double u = 2 * I / (1 + r * r); + double u = 2 * I / (1 + r * r); - /* FIXME: the following cross-over should be optimized but 0.1 - seems to work ok */ + /* FIXME: the following cross-over should be optimized but 0.1 + seems to work ok */ - if (fabs (u) < 0.1) - { - imag = 0.25 * (log1p (u) - log1p (-u)); - } - else - { - double A = hypot (R, I + 1); - double B = hypot (R, I - 1); - imag = 0.5 * log (A / B); - } + if (fabs(u) < 0.1) + { + imag = 0.25 * (log1p(u) - log1p(-u)); + } + else + { + double A = hypot(R, I + 1); + double B = hypot(R, I - 1); + imag = 0.5 * log(A / B); + } - if (R == 0) - { - if (I > 1) - { - GSL_SET_COMPLEX (&z, M_PI_2, imag); - } - else if (I < -1) - { - GSL_SET_COMPLEX (&z, -M_PI_2, imag); - } - else - { - GSL_SET_COMPLEX (&z, 0, imag); - }; - } - else - { - GSL_SET_COMPLEX (&z, 0.5 * atan2 (2 * R, ((1 + r) * (1 - r))), imag); - } + if (R == 0) + { + if (I > 1) + { + GSL_SET_COMPLEX(&z, M_PI_2, imag); + } + else if (I < -1) + { + GSL_SET_COMPLEX(&z, -M_PI_2, imag); + } + else + { + GSL_SET_COMPLEX(&z, 0, imag); + }; + } + else + { + GSL_SET_COMPLEX(&z, 0.5 * atan2(2 * R, ((1 + r) * (1 - r))), imag); + } } - return z; + return z; } -gsl_complex -gsl_complex_arcsec (gsl_complex a) -{ /* z = arcsec(a) */ - gsl_complex z = gsl_complex_inverse (a); - return gsl_complex_arccos (z); +gsl_complex gsl_complex_arcsec(gsl_complex a) +{ /* z = arcsec(a) */ + gsl_complex z = gsl_complex_inverse(a); + return gsl_complex_arccos(z); } -gsl_complex -gsl_complex_arcsec_real (double a) -{ /* z = arcsec(a) */ - gsl_complex z; +gsl_complex gsl_complex_arcsec_real(double a) +{ /* z = arcsec(a) */ + gsl_complex z; - if (a <= -1.0 || a >= 1.0) + if (a <= -1.0 || a >= 1.0) { - GSL_SET_COMPLEX (&z, acos (1 / a), 0.0); + GSL_SET_COMPLEX(&z, acos(1 / a), 0.0); } - else + else { - if (a >= 0.0) - { - GSL_SET_COMPLEX (&z, 0, acosh (1 / a)); - } - else - { - GSL_SET_COMPLEX (&z, M_PI, -acosh (-1 / a)); - } + if (a >= 0.0) + { + GSL_SET_COMPLEX(&z, 0, acosh(1 / a)); + } + else + { + GSL_SET_COMPLEX(&z, M_PI, -acosh(-1 / a)); + } } - return z; + return z; } -gsl_complex -gsl_complex_arccsc (gsl_complex a) -{ /* z = arccsc(a) */ - gsl_complex z = gsl_complex_inverse (a); - return gsl_complex_arcsin (z); +gsl_complex gsl_complex_arccsc(gsl_complex a) +{ /* z = arccsc(a) */ + gsl_complex z = gsl_complex_inverse(a); + return gsl_complex_arcsin(z); } -gsl_complex -gsl_complex_arccsc_real (double a) -{ /* z = arccsc(a) */ - gsl_complex z; +gsl_complex gsl_complex_arccsc_real(double a) +{ /* z = arccsc(a) */ + gsl_complex z; - if (a <= -1.0 || a >= 1.0) + if (a <= -1.0 || a >= 1.0) { - GSL_SET_COMPLEX (&z, asin (1 / a), 0.0); + GSL_SET_COMPLEX(&z, asin(1 / a), 0.0); } - else + else { - if (a >= 0.0) - { - GSL_SET_COMPLEX (&z, M_PI_2, -acosh (1 / a)); - } - else - { - GSL_SET_COMPLEX (&z, -M_PI_2, -acosh (-1 / a)); - } + if (a >= 0.0) + { + GSL_SET_COMPLEX(&z, M_PI_2, -acosh(1 / a)); + } + else + { + GSL_SET_COMPLEX(&z, -M_PI_2, -acosh(-1 / a)); + } } - return z; + return z; } -gsl_complex -gsl_complex_arccot (gsl_complex a) -{ /* z = arccot(a) */ - gsl_complex z; +gsl_complex gsl_complex_arccot(gsl_complex a) +{ /* z = arccot(a) */ + gsl_complex z; - if (GSL_REAL (a) == 0.0 && GSL_IMAG (a) == 0.0) + if (GSL_REAL(a) == 0.0 && GSL_IMAG(a) == 0.0) { - GSL_SET_COMPLEX (&z, M_PI_2, 0); + GSL_SET_COMPLEX(&z, M_PI_2, 0); } - else + else { - z = gsl_complex_inverse (a); - z = gsl_complex_arctan (z); + z = gsl_complex_inverse(a); + z = gsl_complex_arctan(z); } - return z; + return z; } /********************************************************************** * Complex Hyperbolic Functions **********************************************************************/ -gsl_complex -gsl_complex_sinh (gsl_complex a) -{ /* z = sinh(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); +gsl_complex gsl_complex_sinh(gsl_complex a) +{ /* z = sinh(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); - gsl_complex z; - GSL_SET_COMPLEX (&z, sinh (R) * cos (I), cosh (R) * sin (I)); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, sinh(R) * cos(I), cosh(R) * sin(I)); + return z; } -gsl_complex -gsl_complex_cosh (gsl_complex a) -{ /* z = cosh(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); +gsl_complex gsl_complex_cosh(gsl_complex a) +{ /* z = cosh(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); - gsl_complex z; - GSL_SET_COMPLEX (&z, cosh (R) * cos (I), sinh (R) * sin (I)); - return z; + gsl_complex z; + GSL_SET_COMPLEX(&z, cosh(R) * cos(I), sinh(R) * sin(I)); + return z; } -gsl_complex -gsl_complex_tanh (gsl_complex a) -{ /* z = tanh(a) */ - double R = GSL_REAL (a), I = GSL_IMAG (a); +gsl_complex gsl_complex_tanh(gsl_complex a) +{ /* z = tanh(a) */ + double R = GSL_REAL(a), I = GSL_IMAG(a); - gsl_complex z; + gsl_complex z; - if (fabs(R) < 1.0) + if (fabs(R) < 1.0) { - double D = pow (cos (I), 2.0) + pow (sinh (R), 2.0); - - GSL_SET_COMPLEX (&z, sinh (R) * cosh (R) / D, 0.5 * sin (2 * I) / D); + double D = pow(cos(I), 2.0) + pow(sinh(R), 2.0); + + GSL_SET_COMPLEX(&z, sinh(R) * cosh(R) / D, 0.5 * sin(2 * I) / D); } - else + else { - double D = pow (cos (I), 2.0) + pow (sinh (R), 2.0); - double F = 1 + pow (cos (I) / sinh (R), 2.0); + double D = pow(cos(I), 2.0) + pow(sinh(R), 2.0); + double F = 1 + pow(cos(I) / sinh(R), 2.0); - GSL_SET_COMPLEX (&z, 1.0 / (tanh (R) * F), 0.5 * sin (2 * I) / D); + GSL_SET_COMPLEX(&z, 1.0 / (tanh(R) * F), 0.5 * sin(2 * I) / D); } - return z; + return z; } -gsl_complex -gsl_complex_sech (gsl_complex a) -{ /* z = sech(a) */ - gsl_complex z = gsl_complex_cosh (a); - return gsl_complex_inverse (z); +gsl_complex gsl_complex_sech(gsl_complex a) +{ /* z = sech(a) */ + gsl_complex z = gsl_complex_cosh(a); + return gsl_complex_inverse(z); } -gsl_complex -gsl_complex_csch (gsl_complex a) -{ /* z = csch(a) */ - gsl_complex z = gsl_complex_sinh (a); - return gsl_complex_inverse (z); +gsl_complex gsl_complex_csch(gsl_complex a) +{ /* z = csch(a) */ + gsl_complex z = gsl_complex_sinh(a); + return gsl_complex_inverse(z); } -gsl_complex -gsl_complex_coth (gsl_complex a) -{ /* z = coth(a) */ - gsl_complex z = gsl_complex_tanh (a); - return gsl_complex_inverse (z); +gsl_complex gsl_complex_coth(gsl_complex a) +{ /* z = coth(a) */ + gsl_complex z = gsl_complex_tanh(a); + return gsl_complex_inverse(z); } /********************************************************************** * Inverse Complex Hyperbolic Functions **********************************************************************/ -gsl_complex -gsl_complex_arcsinh (gsl_complex a) -{ /* z = arcsinh(a) */ - gsl_complex z = gsl_complex_mul_imag(a, 1.0); - z = gsl_complex_arcsin (z); - z = gsl_complex_mul_imag (z, -1.0); - return z; +gsl_complex gsl_complex_arcsinh(gsl_complex a) +{ /* z = arcsinh(a) */ + gsl_complex z = gsl_complex_mul_imag(a, 1.0); + z = gsl_complex_arcsin(z); + z = gsl_complex_mul_imag(z, -1.0); + return z; } -gsl_complex -gsl_complex_arccosh (gsl_complex a) -{ /* z = arccosh(a) */ - gsl_complex z = gsl_complex_arccos (a); - z = gsl_complex_mul_imag (z, GSL_IMAG(z) > 0 ? -1.0 : 1.0); - return z; +gsl_complex gsl_complex_arccosh(gsl_complex a) +{ /* z = arccosh(a) */ + gsl_complex z = gsl_complex_arccos(a); + z = gsl_complex_mul_imag(z, GSL_IMAG(z) > 0 ? -1.0 : 1.0); + return z; } -gsl_complex -gsl_complex_arccosh_real (double a) -{ /* z = arccosh(a) */ - gsl_complex z; +gsl_complex gsl_complex_arccosh_real(double a) +{ /* z = arccosh(a) */ + gsl_complex z; - if (a >= 1) + if (a >= 1) { - GSL_SET_COMPLEX (&z, acosh (a), 0); + GSL_SET_COMPLEX(&z, acosh(a), 0); } - else + else { - if (a >= -1.0) - { - GSL_SET_COMPLEX (&z, 0, acos (a)); - } - else - { - GSL_SET_COMPLEX (&z, acosh (-a), M_PI); - } + if (a >= -1.0) + { + GSL_SET_COMPLEX(&z, 0, acos(a)); + } + else + { + GSL_SET_COMPLEX(&z, acosh(-a), M_PI); + } } - return z; + return z; } -gsl_complex -gsl_complex_arctanh (gsl_complex a) -{ /* z = arctanh(a) */ - if (GSL_IMAG (a) == 0.0) +gsl_complex gsl_complex_arctanh(gsl_complex a) +{ /* z = arctanh(a) */ + if (GSL_IMAG(a) == 0.0) { - return gsl_complex_arctanh_real (GSL_REAL (a)); + return gsl_complex_arctanh_real(GSL_REAL(a)); } - else + else { - gsl_complex z = gsl_complex_mul_imag(a, 1.0); - z = gsl_complex_arctan (z); - z = gsl_complex_mul_imag (z, -1.0); - return z; + gsl_complex z = gsl_complex_mul_imag(a, 1.0); + z = gsl_complex_arctan(z); + z = gsl_complex_mul_imag(z, -1.0); + return z; } } -gsl_complex -gsl_complex_arctanh_real (double a) -{ /* z = arctanh(a) */ - gsl_complex z; +gsl_complex gsl_complex_arctanh_real(double a) +{ /* z = arctanh(a) */ + gsl_complex z; - if (a > -1.0 && a < 1.0) + if (a > -1.0 && a < 1.0) { - GSL_SET_COMPLEX (&z, atanh (a), 0); + GSL_SET_COMPLEX(&z, atanh(a), 0); } - else + else { - GSL_SET_COMPLEX (&z, atanh (1 / a), (a < 0) ? M_PI_2 : -M_PI_2); + GSL_SET_COMPLEX(&z, atanh(1 / a), (a < 0) ? M_PI_2 : -M_PI_2); } - return z; + return z; } -gsl_complex -gsl_complex_arcsech (gsl_complex a) -{ /* z = arcsech(a); */ - gsl_complex t = gsl_complex_inverse (a); - return gsl_complex_arccosh (t); +gsl_complex gsl_complex_arcsech(gsl_complex a) +{ /* z = arcsech(a); */ + gsl_complex t = gsl_complex_inverse(a); + return gsl_complex_arccosh(t); } -gsl_complex -gsl_complex_arccsch (gsl_complex a) -{ /* z = arccsch(a) */ - gsl_complex t = gsl_complex_inverse (a); - return gsl_complex_arcsinh (t); +gsl_complex gsl_complex_arccsch(gsl_complex a) +{ /* z = arccsch(a) */ + gsl_complex t = gsl_complex_inverse(a); + return gsl_complex_arcsinh(t); } -gsl_complex -gsl_complex_arccoth (gsl_complex a) -{ /* z = arccoth(a) */ - gsl_complex t = gsl_complex_inverse (a); - return gsl_complex_arctanh (t); +gsl_complex gsl_complex_arccoth(gsl_complex a) +{ /* z = arccoth(a) */ + gsl_complex t = gsl_complex_inverse(a); + return gsl_complex_arctanh(t); } diff --git a/src/parser/PARSER_symbols.c b/src/parser/PARSER_symbols.c index 6c774a15e2..3efe718946 100644 --- a/src/parser/PARSER_symbols.c +++ b/src/parser/PARSER_symbols.c @@ -17,13 +17,14 @@ 02111-1307, USA. */ -#include -#include -#include -#include #include -#include #include +#include +#include +#include +#include +#include + #include "symbols.h" /* The symbol table: a chain of `struct symrec'. */ @@ -31,195 +32,226 @@ symrec *sym_table = (symrec *)0; char *str_tolower(char *in) { - char *s; - for(s=in; *s; s++) - *s = tolower(*s); - return in; + char *s; + for (s = in; *s; s++) + { + *s = tolower(*s); + } + return in; } -symrec *putsym (char *sym_name, symrec_type sym_type) +symrec *putsym(char *sym_name, symrec_type sym_type) { - symrec *ptr; - ptr = (symrec *)malloc(sizeof(symrec)); - - /* names are always lowercase */ - ptr->name = strdup(sym_name); - str_tolower(ptr->name); - - ptr->type = sym_type; - GSL_SET_COMPLEX(&ptr->value.c, 0, 0); /* set value to 0 even if fctn. */ - ptr->next = (struct symrec *)sym_table; - sym_table = ptr; - return ptr; + symrec *ptr; + ptr = (symrec *)malloc(sizeof(symrec)); + + /* names are always lowercase */ + ptr->name = strdup(sym_name); + str_tolower(ptr->name); + + ptr->type = sym_type; + GSL_SET_COMPLEX(&ptr->value.c, 0, 0); /* set value to 0 even if fctn. */ + ptr->next = (struct symrec *)sym_table; + sym_table = ptr; + return ptr; } -symrec *getsym (char *sym_name) +symrec *getsym(char *sym_name) { - symrec *ptr; - for (ptr = sym_table; ptr != (symrec *) 0; - ptr = (symrec *)ptr->next) - if (strcasecmp(ptr->name,sym_name) == 0) - return ptr; - return (symrec *) 0; + symrec *ptr; + for (ptr = sym_table; ptr != (symrec *)0; ptr = (symrec *)ptr->next) + { + if (strcasecmp(ptr->name, sym_name) == 0) + { + return ptr; + } + } + return (symrec *)0; } -int rmsym (char *sym_name) +int rmsym(char *sym_name) { - symrec *ptr, *prev; - for (prev = (symrec *) 0, ptr = sym_table; ptr != (symrec *) 0; - prev = ptr, ptr = ptr->next) - if (strcasecmp(ptr->name,sym_name) == 0){ - if(prev == (symrec *) 0) - sym_table = ptr->next; - else - prev->next = ptr->next; - free(ptr); - - return 1; - } - - return 0; + symrec *ptr, *prev; + for (prev = (symrec *)0, ptr = sym_table; ptr != (symrec *)0; + prev = ptr, ptr = ptr->next) + { + if (strcasecmp(ptr->name, sym_name) == 0) + { + if (prev == (symrec *)0) + { + sym_table = ptr->next; + } + else + { + prev->next = ptr->next; + } + free(ptr); + + return 1; + } + } + + return 0; } -struct init_fntc{ - char *fname; - gsl_complex (*fnct)(); +struct init_fntc +{ + char *fname; + gsl_complex (*fnct)(); }; -static struct init_fntc arith_fncts[] = { - {"sqrt", gsl_complex_sqrt}, - {"exp", gsl_complex_exp}, - {"ln", gsl_complex_log}, - {"log", gsl_complex_log}, - {"log10", gsl_complex_log10}, - - {"sin", gsl_complex_sin}, - {"cos", gsl_complex_cos}, - {"tan", gsl_complex_tan}, - {"sec", gsl_complex_sec}, - {"csc", gsl_complex_csc}, - {"cot", gsl_complex_cot}, - - {"asin", gsl_complex_arcsin}, - {"acos", gsl_complex_arccos}, - {"atan", gsl_complex_arctan}, - {"asec", gsl_complex_arcsec}, - {"acsc", gsl_complex_arccsc}, - {"acot", gsl_complex_arccot}, - - {"sinh", gsl_complex_sinh}, - {"cosh", gsl_complex_cosh}, - {"tanh", gsl_complex_tanh}, - {"sech", gsl_complex_sech}, - {"csch", gsl_complex_csch}, - {"coth", gsl_complex_coth}, - - {"asinh", gsl_complex_arcsinh}, - {"acosh", gsl_complex_arccosh}, - {"atanh", gsl_complex_arctanh}, - {"asech", gsl_complex_arcsech}, - {"acsch", gsl_complex_arccsch}, - {"acoth", gsl_complex_arccoth}, - - {0, 0} -}; +static struct init_fntc arith_fncts[] = {{"sqrt", gsl_complex_sqrt}, + {"exp", gsl_complex_exp}, + {"ln", gsl_complex_log}, + {"log", gsl_complex_log}, + {"log10", gsl_complex_log10}, -struct init_cnst{ - char *fname; - double c; -}; + {"sin", gsl_complex_sin}, + {"cos", gsl_complex_cos}, + {"tan", gsl_complex_tan}, + {"sec", gsl_complex_sec}, + {"csc", gsl_complex_csc}, + {"cot", gsl_complex_cot}, -static struct init_cnst arith_cnts[] = { - {"pi", M_PI}, {"e", M_E}, - {"true", 1}, {"t", 1}, {"yes", 1}, - {"false", 0}, {"f", 0}, {"no", 0}, - {"sphere", 1}, {"cylinder", 2}, {"minimum", 3}, {"parallelepiped", 4}, - {"real_space", 0}, {"fourier_space", 1}, - {0, 0} -}; + {"asin", gsl_complex_arcsin}, + {"acos", gsl_complex_arccos}, + {"atan", gsl_complex_arctan}, + {"asec", gsl_complex_arcsec}, + {"acsc", gsl_complex_arccsc}, + {"acot", gsl_complex_arccot}, + + {"sinh", gsl_complex_sinh}, + {"cosh", gsl_complex_cosh}, + {"tanh", gsl_complex_tanh}, + {"sech", gsl_complex_sech}, + {"csch", gsl_complex_csch}, + {"coth", gsl_complex_coth}, + + {"asinh", gsl_complex_arcsinh}, + {"acosh", gsl_complex_arccosh}, + {"atanh", gsl_complex_arctanh}, + {"asech", gsl_complex_arcsech}, + {"acsch", gsl_complex_arccsch}, + {"acoth", gsl_complex_arccoth}, -static char *reserved_symbols[] = { - "x", "y", "z", "r", 0 + {0, 0}}; + +struct init_cnst +{ + char *fname; + double c; }; -void sym_init_table () /* puts arithmetic functions in table. */ +static struct init_cnst arith_cnts[] = {{"pi", M_PI}, + {"e", M_E}, + {"true", 1}, + {"t", 1}, + {"yes", 1}, + {"false", 0}, + {"f", 0}, + {"no", 0}, + {"sphere", 1}, + {"cylinder", 2}, + {"minimum", 3}, + {"parallelepiped", 4}, + {"real_space", 0}, + {"fourier_space", 1}, + {0, 0}}; + +static char *reserved_symbols[] = {"x", "y", "z", "r", 0}; + +void sym_init_table() /* puts arithmetic functions in table. */ { - int i; - symrec *ptr; - for (i = 0; arith_fncts[i].fname != 0; i++){ - ptr = putsym (arith_fncts[i].fname, S_FNCT); - ptr->value.fnctptr = arith_fncts[i].fnct; - } - - /* now the constants */ - for (i = 0; arith_cnts[i].fname != 0; i++){ - ptr = putsym(arith_cnts[i].fname, S_CMPLX); - GSL_SET_COMPLEX(&ptr->value.c, arith_cnts[i].c, 0); - } + int i; + symrec *ptr; + for (i = 0; arith_fncts[i].fname != 0; i++) + { + ptr = putsym(arith_fncts[i].fname, S_FNCT); + ptr->value.fnctptr = arith_fncts[i].fnct; + } + + /* now the constants */ + for (i = 0; arith_cnts[i].fname != 0; i++) + { + ptr = putsym(arith_cnts[i].fname, S_CMPLX); + GSL_SET_COMPLEX(&ptr->value.c, arith_cnts[i].c, 0); + } } void sym_clear_reserved() { - int i; - for (i = 0; reserved_symbols[i] != 0; i++){ - rmsym(reserved_symbols[i]); - } + int i; + for (i = 0; reserved_symbols[i] != 0; i++) + { + rmsym(reserved_symbols[i]); + } } void sym_end_table() { - symrec *ptr, *ptr2; - int l, col; - - for (ptr = sym_table; ptr != NULL;){ - free(ptr->name); - switch(ptr->type){ - case S_STR: - free(ptr->value.str); - break; - case S_BLOCK: - if(ptr->value.block->n > 0){ - for(l = 0; l < ptr->value.block->n; l++){ - if(ptr->value.block->lines[l].n > 0){ - for(col = 0; col < ptr->value.block->lines[l].n; col++) - free(ptr->value.block->lines[l].fields[col]); - free(ptr->value.block->lines[l].fields); - } - } - free(ptr->value.block->lines); - } - free(ptr->value.block); - break; - case S_CMPLX: - case S_FNCT: - break; - } - ptr2 = ptr->next; - free(ptr); - ptr = ptr2; - } - - sym_table = NULL; + symrec *ptr, *ptr2; + int l, col; + + for (ptr = sym_table; ptr != NULL;) + { + free(ptr->name); + switch (ptr->type) + { + case S_STR: + free(ptr->value.str); + break; + case S_BLOCK: + if (ptr->value.block->n > 0) + { + for (l = 0; l < ptr->value.block->n; l++) + { + if (ptr->value.block->lines[l].n > 0) + { + for (col = 0; col < ptr->value.block->lines[l].n; + col++) + { + free(ptr->value.block->lines[l].fields[col]); + } + free(ptr->value.block->lines[l].fields); + } + } + free(ptr->value.block->lines); + } + free(ptr->value.block); + break; + case S_CMPLX: + case S_FNCT: + break; + } + ptr2 = ptr->next; + free(ptr); + ptr = ptr2; + } + + sym_table = NULL; } void sym_output_table() { - symrec *ptr; - for(ptr = sym_table; ptr != NULL; ptr = ptr->next){ - printf("%s", ptr->name); - switch(ptr->type){ - case S_CMPLX: - printf(" = (%lf,%lf)\n", GSL_REAL(ptr->value.c), GSL_IMAG(ptr->value.c)); - break; - case S_STR: - printf(" = \"%s\"\n", ptr->value.str); - break; - case S_BLOCK: - printf("%s\n", " <= BLOCK"); - break; - case S_FNCT: - printf("%s\n", " <= FUNCTION"); - break; - } - } + symrec *ptr; + for (ptr = sym_table; ptr != NULL; ptr = ptr->next) + { + printf("%s", ptr->name); + switch (ptr->type) + { + case S_CMPLX: + printf(" = (%lf,%lf)\n", GSL_REAL(ptr->value.c), + GSL_IMAG(ptr->value.c)); + break; + case S_STR: + printf(" = \"%s\"\n", ptr->value.str); + break; + case S_BLOCK: + printf("%s\n", " <= BLOCK"); + break; + case S_FNCT: + printf("%s\n", " <= FUNCTION"); + break; + } + } } diff --git a/src/parser/grammar.c b/src/parser/grammar.c index 7918926f01..760b106315 100644 --- a/src/parser/grammar.c +++ b/src/parser/grammar.c @@ -17,26 +17,25 @@ 02111-1307, USA. */ - /* A Bison parser, made from grammar.y by GNU Bison version 1.28 */ -#define YYBISON 1 /* Identify Bison output. */ +#define YYBISON 1 /* Identify Bison output. */ -#define NUM 257 -#define STR 258 -#define VAR 259 -#define FNCT 260 -#define NEG 261 +#define NUM 257 +#define STR 258 +#define VAR 259 +#define FNCT 260 +#define NEG 261 #line 2 "grammar.y" - #line 5 "grammar.y" -typedef union { - gsl_complex val; /* For returning numbers. */ - char *str; /* For strings */ - symrec *tptr; /* For returning symbol-table pointers */ +typedef union +{ + gsl_complex val; /* For returning numbers. */ + char *str; /* For strings */ + symrec *tptr; /* For returning symbol-table pointers */ } YYSTYPE; #include @@ -46,139 +45,86 @@ typedef union { #endif #endif - - -#define YYFINAL 41 -#define YYFLAG -32768 -#define YYNTBASE 18 +#define YYFINAL 41 +#define YYFLAG -32768 +#define YYNTBASE 18 #define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 22) -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, - 16, 10, 9, 17, 8, 2, 11, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, - 12 -}; +static const char yytranslate[] = { + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 16, 10, 9, + 17, 8, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 12}; #if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 1, 4, 6, 9, 12, 15, 17, 19, 23, - 28, 32, 36, 40, 44, 47, 51, 57, 61, 63 -}; +static const short yyprhs[] = {0, 0, 1, 4, 6, 9, 12, 15, 17, 19, 23, + 28, 32, 36, 40, 44, 47, 51, 57, 61, 63}; -static const short yyrhs[] = { -1, - 18, 19, 0, 14, 0, 20, 14, 0, 21, 14, - 0, 1, 14, 0, 3, 0, 5, 0, 5, 7, - 20, 0, 6, 15, 20, 16, 0, 20, 9, 20, - 0, 20, 8, 20, 0, 20, 10, 20, 0, 20, - 11, 20, 0, 8, 20, 0, 20, 13, 20, 0, - 15, 20, 17, 20, 16, 0, 15, 20, 16, 0, - 4, 0, 5, 7, 4, 0 -}; +static const short yyrhs[] = { + -1, 18, 19, 0, 14, 0, 20, 14, 0, 21, 14, 0, 1, 14, 0, 3, 0, + 5, 0, 5, 7, 20, 0, 6, 15, 20, 16, 0, 20, 9, 20, 0, 20, 8, + 20, 0, 20, 10, 20, 0, 20, 11, 20, 0, 8, 20, 0, 20, 13, 20, 0, + 15, 20, 17, 20, 16, 0, 15, 20, 16, 0, 4, 0, 5, 7, 4, 0}; #endif #if YYDEBUG != 0 -static const short yyrline[] = { 0, - 27, 28, 31, 33, 34, 35, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 51, 52 -}; -#endif - - -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","NUM","STR", -"VAR","FNCT","'='","'-'","'+'","'*'","'/'","NEG","'^'","'\\n'","'('","')'","','", -"input","line","exp","string", NULL -}; -#endif - -static const short yyr1[] = { 0, - 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 21, 21 -}; - -static const short yyr2[] = { 0, - 0, 2, 1, 2, 2, 2, 1, 1, 3, 4, - 3, 3, 3, 3, 2, 3, 5, 3, 1, 3 -}; - -static const short yydefact[] = { 1, - 0, 0, 7, 19, 8, 0, 0, 3, 0, 2, - 0, 0, 6, 0, 0, 8, 15, 0, 0, 0, - 0, 0, 0, 4, 5, 20, 9, 0, 0, 18, - 0, 12, 11, 13, 14, 16, 10, 0, 17, 0, - 0 -}; - -static const short yydefgoto[] = { 1, - 10, 27, 12 -}; - -static const short yypact[] = {-32768, - 23, -13,-32768,-32768, 9, 10, 40,-32768, 40,-32768, - 66, -5,-32768, 36, 40, 25, 4, -6, 40, 40, - 40, 40, 40,-32768,-32768,-32768, 73, 48, 40,-32768, - 40, 2, 2, 4, 4, 4,-32768, 57,-32768, 33, --32768 -}; - -static const short yypgoto[] = {-32768, --32768, -1,-32768 -}; - - -#define YYLAST 86 - - -static const short yytable[] = { 11, - 13, 19, 20, 21, 22, 17, 23, 18, 25, 30, - 31, 21, 22, 28, 23, 14, 23, 32, 33, 34, - 35, 36, 40, 2, 15, 3, 4, 5, 6, 38, - 7, 29, 41, 0, 0, 0, 8, 9, 3, 26, - 16, 6, 3, 7, 16, 6, 0, 7, 0, 0, - 9, 0, 0, 0, 9, 19, 20, 21, 22, 0, - 23, 0, 0, 37, 19, 20, 21, 22, 0, 23, - 0, 0, 39, 19, 20, 21, 22, 0, 23, 24, - 19, 20, 21, 22, 0, 23 -}; - -static const short yycheck[] = { 1, - 14, 8, 9, 10, 11, 7, 13, 9, 14, 16, - 17, 10, 11, 15, 13, 7, 13, 19, 20, 21, - 22, 23, 0, 1, 15, 3, 4, 5, 6, 31, - 8, 7, 0, -1, -1, -1, 14, 15, 3, 4, - 5, 6, 3, 8, 5, 6, -1, 8, -1, -1, - 15, -1, -1, -1, 15, 8, 9, 10, 11, -1, - 13, -1, -1, 16, 8, 9, 10, 11, -1, 13, - -1, -1, 16, 8, 9, 10, 11, -1, 13, 14, - 8, 9, 10, 11, -1, 13 -}; +static const short yyrline[] = {0, 27, 28, 31, 33, 34, 35, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 51, 52}; +#endif + +#if YYDEBUG != 0 || defined(YYERROR_VERBOSE) + +static const char *const yytname[] = { + "$", "error", "$undefined.", "NUM", "STR", "VAR", "FNCT", "'='", + "'-'", "'+'", "'*'", "'/'", "NEG", "'^'", "'\\n'", "'('", + "')'", "','", "input", "line", "exp", "string", NULL}; +#endif + +static const short yyr1[] = {0, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 21, 21}; + +static const short yyr2[] = {0, 0, 2, 1, 2, 2, 2, 1, 1, 3, 4, + 3, 3, 3, 3, 2, 3, 5, 3, 1, 3}; + +static const short yydefact[] = { + 1, 0, 0, 7, 19, 8, 0, 0, 3, 0, 2, 0, 0, 6, 0, 0, 8, 15, 0, 0, 0, + 0, 0, 0, 4, 5, 20, 9, 0, 0, 18, 0, 12, 11, 13, 14, 16, 10, 0, 17, 0, 0}; + +static const short yydefgoto[] = {1, 10, 27, 12}; + +static const short yypact[] = { + -32768, 23, -13, -32768, -32768, 9, 10, 40, -32768, 40, -32768, + 66, -5, -32768, 36, 40, 25, 4, -6, 40, 40, 40, + 40, 40, -32768, -32768, -32768, 73, 48, 40, -32768, 40, 2, + 2, 4, 4, 4, -32768, 57, -32768, 33, -32768}; + +static const short yypgoto[] = {-32768, -32768, -1, -32768}; + +#define YYLAST 86 + +static const short yytable[] = { + 11, 13, 19, 20, 21, 22, 17, 23, 18, 25, 30, 31, 21, 22, 28, 23, 14, 23, + 32, 33, 34, 35, 36, 40, 2, 15, 3, 4, 5, 6, 38, 7, 29, 41, 0, 0, + 0, 8, 9, 3, 26, 16, 6, 3, 7, 16, 6, 0, 7, 0, 0, 9, 0, 0, + 0, 9, 19, 20, 21, 22, 0, 23, 0, 0, 37, 19, 20, 21, 22, 0, 23, 0, + 0, 39, 19, 20, 21, 22, 0, 23, 24, 19, 20, 21, 22, 0, 23}; + +static const short yycheck[] = { + 1, 14, 8, 9, 10, 11, 7, 13, 9, 14, 16, 17, 10, 11, 15, 13, 7, 13, + 19, 20, 21, 22, 23, 0, 1, 15, 3, 4, 5, 6, 31, 8, 7, 0, -1, -1, + -1, 14, 15, 3, 4, 5, 6, 3, 8, 5, 6, -1, 8, -1, -1, 15, -1, -1, + -1, 15, 8, 9, 10, 11, -1, 13, -1, -1, 16, 8, 9, 10, 11, -1, 13, -1, + -1, 16, 8, 9, 10, 11, -1, 13, 14, 8, 9, 10, 11, -1, 13}; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ #line 3 "/usr/lib/bison.simple" /* This file comes from bison-1.28. */ @@ -219,16 +165,17 @@ static const short yycheck[] = { 1, #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) +#if (!defined(__STDC__) && defined(sparc)) || defined(__sparc__) || \ + defined(__sparc) || defined(__sgi) || (defined(__sun) && defined(__i386)) #define YYSTACK_USE_ALLOCA #include #else /* not sparc */ /* We think this test detects Watcom and Microsoft C. */ /* This used to test MSDOS, but that is a bad idea since that symbol is in the user namespace. */ -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -#if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ +#if (defined(_MSDOS) || defined(_MSDOS_)) && !defined(__TURBOC__) +#if 0 /* No need for malloc.h, which pollutes the namespace; \ + instead, just don't use alloca. */ #include #endif #else /* not MSDOS, or __TURBOC__ */ @@ -236,12 +183,12 @@ static const short yycheck[] = { 1, /* I don't know what this was needed for, but it pollutes the namespace. So I turned it off. rms, 2 May 1997. */ /* #include */ - #pragma alloca +#pragma alloca #define YYSTACK_USE_ALLOCA #else /* not MSDOS, or __TURBOC__, or _AIX */ #if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ +#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, \ + and on HPUX 10. Eventually we can turn this on. */ #define YYSTACK_USE_ALLOCA #define alloca __builtin_alloca #endif /* __hpux */ @@ -263,50 +210,54 @@ static const short yycheck[] = { 1, It is replaced by the list of actions, each action as one case of the switch. */ -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY -2 +#define YYEOF 0 +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrlab1 /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYFAIL goto yyerrlab +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(token, value) \ + do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE(yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror("syntax error: cannot back up"); \ + YYERROR; \ + } \ + while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 #ifndef YYPURE -#define YYLEX yylex() +#define YYLEX yylex() #endif #ifdef YYPURE #ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else -#define YYLEX yylex(&yylval, &yylloc) +#define YYLEX yylex(&yylval, &yylloc) #endif #else /* not YYLSP_NEEDED */ #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) +#define YYLEX yylex(&yylval, YYLEX_PARAM) #else -#define YYLEX yylex(&yylval) +#define YYLEX yylex(&yylval) #endif #endif /* not YYLSP_NEEDED */ #endif @@ -315,27 +266,27 @@ while (0) #ifndef YYPURE -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ +/* lookahead symbol */ #ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ +YYLTYPE yylloc; /* location data for the lookahead */ +/* symbol */ #endif -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ #if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ +int yydebug; /* nonzero means print parse trace */ /* Since this is uninitialized, it does not stop multiple parsers from coexisting. */ #endif /* YYINITDEPTH indicates the initial size of the parser's stacks */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH #define YYINITDEPTH 200 #endif @@ -349,51 +300,52 @@ int yydebug; /* nonzero means print parse trace */ #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif - + /* Define __yy_memcpy. Note that the size argument should be passed with type unsigned int, because that is what the non-GCC definitions require. With GCC, __builtin_memcpy takes an arg of type size_t, but it can handle unsigned int. */ -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ +#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ +#define __yy_memcpy(TO, FROM, COUNT) __builtin_memcpy(TO, FROM, COUNT) +#else /* not GNU C or C++ */ #ifndef __cplusplus /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ -static void -__yy_memcpy (to, from, count) - char *to; - char *from; - unsigned int count; +static void __yy_memcpy(to, from, count) char *to; +char *from; +unsigned int count; { - register char *f = from; - register char *t = to; - register int i = count; + register char *f = from; + register char *t = to; + register int i = count; - while (i-- > 0) - *t++ = *f++; + while (i-- > 0) + { + *t++ = *f++; + } } #else /* __cplusplus */ /* This is the most reliable way to avoid incompatibilities in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) +static void __yy_memcpy(char *to, char *from, unsigned int count) { - register char *t = to; - register char *f = from; - register int i = count; + register char *t = to; + register char *f = from; + register int i = count; - while (i-- > 0) - *t++ = *f++; + while (i-- > 0) + { + *t++ = *f++; + } } #endif #endif - + #line 217 "/usr/lib/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed @@ -410,7 +362,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #define YYPARSE_PARAM_ARG YYPARSE_PARAM #define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; #endif /* not __cplusplus */ -#else /* not YYPARSE_PARAM */ +#else /* not YYPARSE_PARAM */ #define YYPARSE_PARAM_ARG #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ @@ -418,76 +370,79 @@ __yy_memcpy (char *to, char *from, unsigned int count) /* Prevent warning if -Wstrict-prototypes. */ #ifdef __GNUC__ #ifdef YYPARSE_PARAM -int yyparse (void *); +int yyparse(void *); #else -int yyparse (void); +int yyparse(void); #endif #endif -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL +int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL { - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + register int yystate; + register int yyn; + register short *yyssp; + register YYSTYPE *yyvsp; + int yyerrstatus; /* number of tokens to shift before error messages enabled + */ + int yychar1 = + 0; /* lookahead token as an internal (translated) token number */ + + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ + + short *yyss = yyssa; /* refer to the stacks thru separate pointers */ + YYSTYPE *yyvs = + yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ #ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else -#define YYPOPSTACK (yyvsp--, yyssp--) +#define YYPOPSTACK (yyvsp--, yyssp--) #endif - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; + int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; #ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; + int yychar; + YYSTYPE yylval; + int yynerrs; #ifdef YYLSP_NEEDED - YYLTYPE yylloc; + YYLTYPE yylloc; #endif #endif - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ - int yylen; + int yylen; #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); + if (yydebug) + { + fprintf(stderr, "Starting parse\n"); + } #endif - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ - yyssp = yyss - 1; - yyvsp = yyvs; + yyssp = yyss - 1; + yyvsp = yyvs; #ifdef YYLSP_NEEDED - yylsp = yyls; + yylsp = yyls; #endif /* Push a new state, which is found in yystate . */ @@ -495,434 +450,547 @@ yyparse(YYPARSE_PARAM_ARG) have just been pushed. so pushing a state here evens the stacks. */ yynewstate: - *++yyssp = yystate; + *++yyssp = yystate; - if (yyssp >= yyss + yystacksize - 1) + if (yyssp >= yyss + yystacksize - 1) { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; + /* Give user a chance to reallocate the stack */ + /* Use copies of these so that the &'s don't force the real ones into + * memory. */ + YYSTYPE *yyvs1 = yyvs; + short *yyss1 = yyss; #ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; + YYLTYPE *yyls1 = yyls; #endif - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; + /* Get the current used size of the three stacks, in elements. */ + int size = yyssp - yyss + 1; #ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ + /* Each stack pointer address is followed by the size of + the data in use in that stack, in bytes. */ #ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); + /* This used to be a conditional around just the two extra args, + but that might be undefined if yyoverflow is a macro. */ + yyoverflow("parser stack overflow", &yyss1, size * sizeof(*yyssp), + &yyvs1, size * sizeof(*yyvsp), &yyls1, size * sizeof(*yylsp), + &yystacksize); #else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); + yyoverflow("parser stack overflow", &yyss1, size * sizeof(*yyssp), + &yyvs1, size * sizeof(*yyvsp), &yystacksize); #endif - yyss = yyss1; yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; #ifdef YYLSP_NEEDED - yyls = yyls1; + yyls = yyls1; #endif #else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - free (yyss); - free (yyvs); + /* Extend the stack our own way. */ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + if (yyfree_stacks) + { + free(yyss); + free(yyvs); #ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; + free(yyls); +#endif + } + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + { + yystacksize = YYMAXDEPTH; + } #ifndef YYSTACK_USE_ALLOCA - yyfree_stacks = 1; -#endif - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, - size * (unsigned int) sizeof (*yyssp)); - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, - size * (unsigned int) sizeof (*yyvsp)); + yyfree_stacks = 1; +#endif + yyss = (short *)YYSTACK_ALLOC(yystacksize * sizeof(*yyssp)); + __yy_memcpy((char *)yyss, (char *)yyss1, + size * (unsigned int)sizeof(*yyssp)); + yyvs = (YYSTYPE *)YYSTACK_ALLOC(yystacksize * sizeof(*yyvsp)); + __yy_memcpy((char *)yyvs, (char *)yyvs1, + size * (unsigned int)sizeof(*yyvsp)); #ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, - size * (unsigned int) sizeof (*yylsp)); + yyls = (YYLTYPE *)YYSTACK_ALLOC(yystacksize * sizeof(*yylsp)); + __yy_memcpy((char *)yyls, (char *)yyls1, + size * (unsigned int)sizeof(*yylsp)); #endif #endif /* no yyoverflow */ - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; #ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; + yylsp = yyls + size - 1; #endif #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); + if (yydebug) + { + fprintf(stderr, "Stack size increased to %d\n", yystacksize); + } #endif - if (yyssp >= yyss + yystacksize - 1) - YYABORT; + if (yyssp >= yyss + yystacksize - 1) + { + YYABORT; + } } #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); + if (yydebug) + { + fprintf(stderr, "Entering state %d\n", yystate); + } #endif - goto yybackup; - yybackup: + goto yybackup; +yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. */ + /* Read a lookahead token if we need one and don't already have one. */ + /* yyresume: */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; + yyn = yypact[yystate]; + if (yyn == YYFLAG) + { + goto yydefault; + } - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ + /* yychar is either YYEMPTY or YYEOF + or a valid token in external form. */ - if (yychar == YYEMPTY) + if (yychar == YYEMPTY) { #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); + if (yydebug) + { + fprintf(stderr, "Reading a token: "); + } #endif - yychar = YYLEX; + yychar = YYLEX; } - /* Convert token to internal form (in yychar1) for indexing tables with */ + /* Convert token to internal form (in yychar1) for indexing tables with */ - if (yychar <= 0) /* This means end of input. */ + if (yychar <= 0) /* This means end of input. */ { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); + if (yydebug) + { + fprintf(stderr, "Now at end of input.\n"); + } #endif } - else + else { - yychar1 = YYTRANSLATE(yychar); + yychar1 = YYTRANSLATE(yychar); #if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ + if (yydebug) + { + fprintf(stderr, "Next token is %d (%s", yychar, yytname[yychar1]); + /* Give the individual parser a way to print the precise meaning + of a token, for further debugging info. */ #ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); + YYPRINT(stderr, yychar, yylval); #endif - fprintf (stderr, ")\n"); - } + fprintf(stderr, ")\n"); + } #endif } - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + { + goto yydefault; + } - yyn = yytable[yyn]; + yyn = yytable[yyn]; - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ + /* yyn is what to do for this token type in this state. + Negative => reduce, -yyn is rule number. + Positive => shift, yyn is new state. + New state is final state => don't bother to shift, + just return success. + 0, or most negative number => error. */ - if (yyn < 0) + if (yyn < 0) { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; + if (yyn == YYFLAG) + { + goto yyerrlab; + } + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + { + goto yyerrlab; } - else if (yyn == 0) - goto yyerrlab; - if (yyn == YYFINAL) - YYACCEPT; + if (yyn == YYFINAL) + { + YYACCEPT; + } - /* Shift the lookahead token. */ + /* Shift the lookahead token. */ #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); + if (yydebug) + { + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); + } #endif - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + { + yychar = YYEMPTY; + } - *++yyvsp = yylval; + *++yyvsp = yylval; #ifdef YYLSP_NEEDED - *++yylsp = yylloc; + *++yylsp = yylloc; #endif - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) + { + yyerrstatus--; + } - yystate = yyn; - goto yynewstate; + yystate = yyn; + goto yynewstate; /* Do the default action for the current state. */ yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; + yyn = yydefact[yystate]; + if (yyn == 0) + { + goto yyerrlab; + } /* Do a reduction. yyn is the number of a rule to reduce with. */ yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ + yylen = yyr2[yyn]; + if (yylen > 0) + { + yyval = yyvsp[1 - yylen]; /* implement default value of the action */ + } #if YYDEBUG != 0 - if (yydebug) + if (yydebug) { - int i; + int i; - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); + fprintf(stderr, "Reducing via rule %d (line %d), ", yyn, yyrline[yyn]); - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); + /* Print the symbols being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + { + fprintf(stderr, "%s ", yytname[yyrhs[i]]); + } + fprintf(stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif - - switch (yyn) { - -case 4: + switch (yyn) + { + case 4: #line 33 "grammar.y" -{ par_res.value.c = yyvsp[-1].val; par_res.type = PR_CMPLX; YYACCEPT;; - break;} -case 5: + { + par_res.value.c = yyvsp[-1].val; + par_res.type = PR_CMPLX; + YYACCEPT; + ; + break; + } + case 5: #line 34 "grammar.y" -{ par_res.value.s = yyvsp[-1].str; par_res.type = PR_STR; YYACCEPT;; - break;} -case 6: + { + par_res.value.s = yyvsp[-1].str; + par_res.type = PR_STR; + YYACCEPT; + ; + break; + } + case 6: #line 35 "grammar.y" -{ yyerrok; YYABORT;; - break;} -case 7: + { + yyerrok; + YYABORT; + ; + break; + } + case 7: #line 38 "grammar.y" -{ yyval.val = yyvsp[0].val; ; - break;} -case 8: + { + yyval.val = yyvsp[0].val; + ; + break; + } + case 8: #line 39 "grammar.y" -{ yyval.val = yyvsp[0].tptr->value.c; ; - break;} -case 9: + { + yyval.val = yyvsp[0].tptr->value.c; + ; + break; + } + case 9: #line 40 "grammar.y" -{ yyval.val = yyvsp[0].val; yyvsp[-2].tptr->value.c = yyvsp[0].val; yyvsp[-2].tptr->type = S_CMPLX;; - break;} -case 10: + { + yyval.val = yyvsp[0].val; + yyvsp[-2].tptr->value.c = yyvsp[0].val; + yyvsp[-2].tptr->type = S_CMPLX; + ; + break; + } + case 10: #line 41 "grammar.y" -{ yyval.val = (*(yyvsp[-3].tptr->value.fnctptr))(yyvsp[-1].val); ; - break;} -case 11: + { + yyval.val = (*(yyvsp[-3].tptr->value.fnctptr))(yyvsp[-1].val); + ; + break; + } + case 11: #line 42 "grammar.y" -{ yyval.val = gsl_complex_add(yyvsp[-2].val, yyvsp[0].val); ; - break;} -case 12: + { + yyval.val = gsl_complex_add(yyvsp[-2].val, yyvsp[0].val); + ; + break; + } + case 12: #line 43 "grammar.y" -{ yyval.val = gsl_complex_sub(yyvsp[-2].val, yyvsp[0].val); ; - break;} -case 13: + { + yyval.val = gsl_complex_sub(yyvsp[-2].val, yyvsp[0].val); + ; + break; + } + case 13: #line 44 "grammar.y" -{ yyval.val = gsl_complex_mul(yyvsp[-2].val, yyvsp[0].val); ; - break;} -case 14: + { + yyval.val = gsl_complex_mul(yyvsp[-2].val, yyvsp[0].val); + ; + break; + } + case 14: #line 45 "grammar.y" -{ yyval.val = gsl_complex_div(yyvsp[-2].val, yyvsp[0].val); ; - break;} -case 15: + { + yyval.val = gsl_complex_div(yyvsp[-2].val, yyvsp[0].val); + ; + break; + } + case 15: #line 46 "grammar.y" -{ yyval.val = gsl_complex_negative(yyvsp[0].val); ; - break;} -case 16: + { + yyval.val = gsl_complex_negative(yyvsp[0].val); + ; + break; + } + case 16: #line 47 "grammar.y" -{ yyval.val = gsl_complex_pow(yyvsp[-2].val, yyvsp[0].val); ; - break;} -case 17: + { + yyval.val = gsl_complex_pow(yyvsp[-2].val, yyvsp[0].val); + ; + break; + } + case 17: #line 48 "grammar.y" -{ GSL_SET_COMPLEX (&yyval.val, GSL_REAL(yyvsp[-3].val), GSL_REAL(yyvsp[-1].val)); ; - break;} -case 18: + { + GSL_SET_COMPLEX(&yyval.val, GSL_REAL(yyvsp[-3].val), + GSL_REAL(yyvsp[-1].val)); + ; + break; + } + case 18: #line 49 "grammar.y" -{ yyval.val = yyvsp[-1].val; ; - break;} -case 19: + { + yyval.val = yyvsp[-1].val; + ; + break; + } + case 19: #line 51 "grammar.y" -{ yyval.str = yyvsp[0].str; ; - break;} -case 20: + { + yyval.str = yyvsp[0].str; + ; + break; + } + case 20: #line 52 "grammar.y" -{ yyval.str = yyvsp[0].str; yyvsp[-2].tptr->value.str = yyvsp[0].str; yyvsp[-2].tptr->type = S_STR; ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ + { + yyval.str = yyvsp[0].str; + yyvsp[-2].tptr->value.str = yyvsp[0].str; + yyvsp[-2].tptr->type = S_STR; + ; + break; + } + } + /* the action file gets copied in in place of this dollarsign */ #line 543 "/usr/lib/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; + + yyvsp -= yylen; + yyssp -= yylen; #ifdef YYLSP_NEEDED - yylsp -= yylen; + yylsp -= yylen; #endif #if YYDEBUG != 0 - if (yydebug) + if (yydebug) { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); + short *ssp1 = yyss - 1; + fprintf(stderr, "state stack now"); + while (ssp1 != yyssp) + { + fprintf(stderr, " %d", *++ssp1); + } + fprintf(stderr, "\n"); } #endif - *++yyvsp = yyval; + *++yyvsp = yyval; #ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) + yylsp++; + if (yylen == 0) { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; + yylsp->first_line = yylloc.first_line; + yylsp->first_column = yylloc.first_column; + yylsp->last_line = (yylsp - 1)->last_line; + yylsp->last_column = (yylsp - 1)->last_column; + yylsp->text = 0; } - else + else { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; + yylsp->last_line = (yylsp + yylen - 1)->last_line; + yylsp->last_column = (yylsp + yylen - 1)->last_column; } #endif - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ + /* Now "shift" the result of the reduction. + Determine what state that goes to, + based on the state we popped back to + and the rule number reduced by. */ - yyn = yyr1[yyn]; + yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + { + yystate = yytable[yystate]; + } + else + { + yystate = yydefgoto[yyn - YYNTBASE]; + } - goto yynewstate; + goto yynewstate; -yyerrlab: /* here on detecting error */ +yyerrlab: /* here on detecting error */ - if (! yyerrstatus) + if (!yyerrstatus) /* If not already recovering from an error, report this error. */ { - ++yynerrs; + ++yynerrs; #ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + { + if (yycheck[x + yyn] == x) + { + size += strlen(yytname[x]) + 15, count++; + } + } + msg = (char *)malloc(size + 15); + if (msg != 0) + { + strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = (yyn < 0 ? -yyn : 0); + x < (sizeof(yytname) / sizeof(char *)); x++) + { + if (yycheck[x + yyn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; + } + } + } + yyerror(msg); + free(msg); + } + else + { + yyerror("parse error; also virtual memory exceeded"); + } + } + else #endif /* YYERROR_VERBOSE */ - yyerror("parse error"); + yyerror("parse error"); } - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ - if (yyerrstatus == 3) + if (yyerrstatus == 3) { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ + /* if just tried and failed to reuse lookahead token after an error, + * discard it. */ - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; + /* return failure if at end of input */ + if (yychar == YYEOF) + { + YYABORT; + } #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); + if (yydebug) + { + fprintf(stderr, "Discarding token %d (%s).\n", yychar, + yytname[yychar1]); + } #endif - yychar = YYEMPTY; + yychar = YYEMPTY; } - /* Else will try to reuse lookahead token - after shifting the error token. */ + /* Else will try to reuse lookahead token + after shifting the error token. */ - yyerrstatus = 3; /* Each real token shifted decrements this */ + yyerrstatus = 3; /* Each real token shifted decrements this */ - goto yyerrhandle; + goto yyerrhandle; -yyerrdefault: /* current state does not do anything special for the error token. */ +yyerrdefault: /* current state does not do anything special for the error token. + */ #if 0 /* This is wrong; only states that explicitly want error tokens @@ -931,86 +999,102 @@ case 20: if (yyn) goto yydefault; #endif -yyerrpop: /* pop the current state because it cannot handle the error token */ +yyerrpop: /* pop the current state because it cannot handle the error token */ - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; + if (yyssp == yyss) + { + YYABORT; + } + yyvsp--; + yystate = *--yyssp; #ifdef YYLSP_NEEDED - yylsp--; + yylsp--; #endif #if YYDEBUG != 0 - if (yydebug) + if (yydebug) { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); + short *ssp1 = yyss - 1; + fprintf(stderr, "Error: state stack now"); + while (ssp1 != yyssp) + { + fprintf(stderr, " %d", *++ssp1); + } + fprintf(stderr, "\n"); } #endif yyerrhandle: - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; + yyn = yypact[yystate]; + if (yyn == YYFLAG) + { + goto yyerrdefault; + } - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; + yyn += YYTERROR; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) + { + goto yyerrdefault; + } - yyn = yytable[yyn]; - if (yyn < 0) + yyn = yytable[yyn]; + if (yyn < 0) { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; + if (yyn == YYFLAG) + { + goto yyerrpop; + } + yyn = -yyn; + goto yyreduce; + } + else if (yyn == 0) + { + goto yyerrpop; } - else if (yyn == 0) - goto yyerrpop; - if (yyn == YYFINAL) - YYACCEPT; + if (yyn == YYFINAL) + { + YYACCEPT; + } #if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); + if (yydebug) + { + fprintf(stderr, "Shifting error token, "); + } #endif - *++yyvsp = yylval; + *++yyvsp = yylval; #ifdef YYLSP_NEEDED - *++yylsp = yylloc; + *++yylsp = yylloc; #endif - yystate = yyn; - goto yynewstate; + yystate = yyn; + goto yynewstate; - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) +yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) { - free (yyss); - free (yyvs); + free(yyss); + free(yyvs); #ifdef YYLSP_NEEDED - free (yyls); + free(yyls); #endif } - return 0; + return 0; - yyabortlab: - /* YYABORT comes here. */ - if (yyfree_stacks) +yyabortlab: + /* YYABORT comes here. */ + if (yyfree_stacks) { - free (yyss); - free (yyvs); + free(yyss); + free(yyvs); #ifdef YYLSP_NEEDED - free (yyls); + free(yyls); #endif } - return 1; + return 1; } #line 54 "grammar.y" - diff --git a/src/tools/c_printing.c b/src/tools/c_printing.c index f620d55644..7f62e72501 100644 --- a/src/tools/c_printing.c +++ b/src/tools/c_printing.c @@ -1,42 +1,65 @@ /* License-Identifier: GPL - + Copyright (C) 2006 The Yambo Team - + Authors (see AUTHORS file for details): AM */ -#include #include +#include #include -#include #include +#include int guess_winsize() { - int width; - struct winsize ws; - if (!isatty(2)) {width=-1;return width;} - if( ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0 ) - width = 79; - else - width = ws.ws_col - 1; - return width; + int width; + struct winsize ws; + if (!isatty(2)) + { + width = -1; + return width; + } + if (ioctl(STDERR_FILENO, TIOCGWINSZ, &ws) == -1 || ws.ws_col == 0) + { + width = 79; + } + else + { + width = ws.ws_col - 1; + } + return width; }; int C_FUNC(win_size, WIN_SIZE)(int *win_width) { - *win_width = 0; - *win_width = guess_winsize(); - return 0; + *win_width = 0; + *win_width = guess_winsize(); + return 0; }; -int C_FUNC(c_fprintf, C_FPRINTF)(char *lfmt, char *msg,char *rfmt, char *sfmt) +int C_FUNC(c_fprintf, C_FPRINTF)(char *lfmt, char *msg, char *rfmt, char *sfmt) { - if (strcmp(lfmt,"r")==0) fprintf(stderr,"\r"); - if (strcmp(lfmt,"n")==0) fprintf(stderr,"\n"); - if (strcmp(lfmt,"nn")==0) fprintf(stderr,"\n\n"); - fprintf(stderr,sfmt,msg); - if (strcmp(rfmt,"n")==0) fprintf(stderr,"\n"); - if (strcmp(rfmt,"nn")==0) fprintf(stderr,"\n\n"); - fflush(stderr); - return 0; + if (strcmp(lfmt, "r") == 0) + { + fprintf(stderr, "\r"); + } + if (strcmp(lfmt, "n") == 0) + { + fprintf(stderr, "\n"); + } + if (strcmp(lfmt, "nn") == 0) + { + fprintf(stderr, "\n\n"); + } + fprintf(stderr, sfmt, msg); + if (strcmp(rfmt, "n") == 0) + { + fprintf(stderr, "\n"); + } + if (strcmp(rfmt, "nn") == 0) + { + fprintf(stderr, "\n\n"); + } + fflush(stderr); + return 0; }; diff --git a/src/tools/ct_cclock.c b/src/tools/ct_cclock.c index 1cd1d5176b..d1c8a83c2b 100644 --- a/src/tools/ct_cclock.c +++ b/src/tools/ct_cclock.c @@ -11,14 +11,14 @@ #include #if defined _irix || defined _ultrix || defined _dec_alpha -void cclock_ (cpu) +void cclock_(cpu) #elif defined _T3E || defined _T3Efhi -void CCLOCK (cpu) /* Apparently MUST be uppercase for Cray */ +void CCLOCK(cpu) /* Apparently MUST be uppercase for Cray */ #else -void cclock (cpu) /* OK for ibm, hp with sppuxOS, ... */ +void cclock(cpu) /* OK for ibm, hp with sppuxOS, ... */ #endif -double* cpu; + double* cpu; { - *cpu = ((double) clock()) / CLOCKS_PER_SEC; + *cpu = ((double)clock()) / CLOCKS_PER_SEC; } diff --git a/src/tools/ct_cptimer.c b/src/tools/ct_cptimer.c index ff636cc782..b39f13ee78 100644 --- a/src/tools/ct_cptimer.c +++ b/src/tools/ct_cptimer.c @@ -8,42 +8,47 @@ #include #if defined(_WIN32) -#include #include +#include #endif -#include #include +#include -double C_FUNC(qe_cclock,QE_CCLOCK)() +double C_FUNC(qe_cclock, QE_CCLOCK)() /* Return the second elapsed since Epoch (00:00:00 UTC, January 1, 1970) */ { - struct timeval tmp; - double sec; - gettimeofday( &tmp, (struct timezone *)0 ); - sec = tmp.tv_sec + ((double)tmp.tv_usec)/1000000.0; - return sec; + struct timeval tmp; + double sec; + gettimeofday(&tmp, (struct timezone *)0); + sec = tmp.tv_sec + ((double)tmp.tv_usec) / 1000000.0; + return sec; } -double C_FUNC(qe_scnds,QE_SCNDS) ( ) -/* - Return the cpu time associated to the current process +double C_FUNC(qe_scnds, QE_SCNDS)() +/* + Return the cpu time associated to the current process */ { - double sec=0.0; + double sec = 0.0; #if defined(_WIN32) - // from MSDN docs. - FILETIME ct,et,kt,ut; - union { FILETIME ft; uint64_t ui; } cpu; - if (GetProcessTimes(GetCurrentProcess(),&ct,&et,&kt,&ut)) { - cpu.ft = ut; - sec = cpu.ui * 0.0000001; - } + // from MSDN docs. + FILETIME ct, et, kt, ut; + union + { + FILETIME ft; + uint64_t ui; + } cpu; + if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) + { + cpu.ft = ut; + sec = cpu.ui * 0.0000001; + } #else - static struct rusage T; - getrusage(RUSAGE_SELF, &T); - sec = ((double)T.ru_utime.tv_sec + ((double)T.ru_utime.tv_usec)/1000000.0); + static struct rusage T; + getrusage(RUSAGE_SELF, &T); + sec = + ((double)T.ru_utime.tv_sec + ((double)T.ru_utime.tv_usec) / 1000000.0); #endif - return sec; + return sec; } - diff --git a/src/tools/ct_etime.c b/src/tools/ct_etime.c index 68fa77a921..248924c152 100644 --- a/src/tools/ct_etime.c +++ b/src/tools/ct_etime.c @@ -5,18 +5,18 @@ or http://www.gnu.org/copyleft/gpl.txt . */ -double F90_FUNC(etime,ETIME)(tt) +double F90_FUNC(etime, ETIME)(tt) #if defined _DOUBLE -double tt[2]; + double tt[2]; #else -float tt[2]; + float tt[2]; #endif { - int who; - struct rusage used; - who = 0; - getrusage(who,&used); - tt[0] = used.ru_utime.tv_sec+((used.ru_utime.tv_usec)/1000000.); - tt[1] = used.ru_stime.tv_sec+((used.ru_stime.tv_usec)/1000000.); - return(tt[0]+tt[1]); + int who; + struct rusage used; + who = 0; + getrusage(who, &used); + tt[0] = used.ru_utime.tv_sec + ((used.ru_utime.tv_usec) / 1000000.); + tt[1] = used.ru_stime.tv_sec + ((used.ru_stime.tv_usec) / 1000000.); + return (tt[0] + tt[1]); } diff --git a/src/tools/io.c b/src/tools/io.c index de56995e77..4e9e299e6c 100644 --- a/src/tools/io.c +++ b/src/tools/io.c @@ -16,83 +16,71 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include -#include #include -#include -#include -#include #include #include +#include +#include +#include +#include -void C_FUNC(imkdir, IMKDIR) - (char *name) +void C_FUNC(imkdir, IMKDIR)(char* name) { - struct stat buf; - if(!*name || stat(name, &buf) == 0) return; - mkdir(name, 0775); -} - -void C_FUNC(ichdir, ICHDIR) - (char *name) -{ - chdir(name); -} - -void C_FUNC(irename, IRENAME) - (char *namein, char *nameout) -{ - rename(namein,nameout); + struct stat buf; + if (!*name || stat(name, &buf) == 0) + { + return; + } + mkdir(name, 0775); } -void C_FUNC(iremove, IREMOVE) - (char *name) -{ - remove(name); -} +void C_FUNC(ichdir, ICHDIR)(char* name) { chdir(name); } -void C_FUNC(isystem, ISSYSTEM) - (char *name, int* ierr) +void C_FUNC(irename, IRENAME)(char* namein, char* nameout) { - *ierr=system(name); + rename(namein, nameout); } -void C_FUNC(igetcwd, IGETCWD) - (char* name, int* ln) +void C_FUNC(iremove, IREMOVE)(char* name) { remove(name); } + +void C_FUNC(isystem, ISSYSTEM)(char* name, int* ierr) { *ierr = system(name); } + +void C_FUNC(igetcwd, IGETCWD)(char* name, int* ln) { - getcwd(name,256); - *ln=strlen(name); + getcwd(name, 256); + *ln = strlen(name); } - -void C_FUNC(igethname, IGETHNAME) - (char* name, int* ln) + +void C_FUNC(igethname, IGETHNAME)(char* name, int* ln) { - gethostname(name,256); - *ln=strlen(name); + gethostname(name, 256); + *ln = strlen(name); } -void C_FUNC(ifolder_list, IFOLDER_LIST) - (char* folder, char* list, int* ln) +void C_FUNC(ifolder_list, IFOLDER_LIST)(char* folder, char* list, int* ln) { - DIR *dir,*subdir; - struct dirent *ent; - char the_list[500000]={'\0'}; - char PWD[256] = "."; - *ln=0; - getcwd(PWD,256); - chdir(folder); - dir = opendir ("."); - if (dir != NULL) { - while ((ent = readdir (dir)) != NULL) - if ( (subdir = opendir (ent->d_name)) != NULL) { - strcat(the_list," "); - strcat(the_list,ent->d_name); - closedir (subdir); + DIR *dir, *subdir; + struct dirent* ent; + char the_list[500000] = {'\0'}; + char PWD[256] = "."; + *ln = 0; + getcwd(PWD, 256); + chdir(folder); + dir = opendir("."); + if (dir != NULL) + { + while ((ent = readdir(dir)) != NULL) + { + if ((subdir = opendir(ent->d_name)) != NULL) + { + strcat(the_list, " "); + strcat(the_list, ent->d_name); + closedir(subdir); + } + } + closedir(dir); + *ln = strlen(the_list); + sprintf(list, "%s", the_list); } - closedir (dir); - *ln=strlen(the_list); - sprintf(list,"%s",the_list); - } - chdir(PWD); + chdir(PWD); } - diff --git a/src/tools/memstat.c b/src/tools/memstat.c index 4cfae2ce93..ed90573afb 100644 --- a/src/tools/memstat.c +++ b/src/tools/memstat.c @@ -6,42 +6,41 @@ or http://www.gnu.org/copyleft/gpl.txt . */ -#include #include +#include -/* - This function return the numer of kilobytes allocated by the calling process. +/* + This function return the numer of kilobytes allocated by the calling process. Author: Carlo Cavazzoni. */ -#if defined (__SVR4) && defined (__sun) +#if defined(__SVR4) && defined(__sun) #define SUN_MALLINFO #endif -#if defined(HAVE_MALLINFO) && !defined(__QK_USER__) && !defined(SUN__MALLINFO) +#if defined(HAVE_MALLINFO) && !defined(__QK_USER__) && !defined(SUN__MALLINFO) #include -void C_FUNC(memstat,MEMSTAT)(int *kilobytes) +void C_FUNC(memstat, MEMSTAT)(int *kilobytes) { - - struct mallinfo info; - info = mallinfo(); + struct mallinfo info; + info = mallinfo(); #if defined(__AIX) - *kilobytes = (info.arena) / 1024 ; + *kilobytes = (info.arena) / 1024; #else -/* - arena+hblkhd total taken from the system - uordblks+usmblks+hblkhd total in use by program - fordblks+fsmblks total free within program + /* + arena+hblkhd total taken from the system + uordblks+usmblks+hblkhd total in use by program + fordblks+fsmblks total free within program -*/ - *kilobytes = (info.arena + info.hblkhd) / 1024 ; + */ + *kilobytes = (info.arena + info.hblkhd) / 1024; #endif #else -void C_FUNC(memstat,MEMSTAT)(int *kilobytes) +void C_FUNC(memstat, MEMSTAT)(int *kilobytes) { - *kilobytes = -1; + *kilobytes = -1; #endif } diff --git a/src/tools/stack.c b/src/tools/stack.c index b955905807..a71bee3db4 100644 --- a/src/tools/stack.c +++ b/src/tools/stack.c @@ -6,16 +6,16 @@ or http://www.gnu.org/copyleft/gpl.txt . */ -#include #include +#include -void C_FUNC(remove_stack_limit,REMOVE_STACK_LIMIT) (void) { - -struct rlimit rlim = { RLIM_INFINITY, RLIM_INFINITY }; - -if ( setrlimit(RLIMIT_STACK, &rlim) == -1 ) { - /* perror("Cannot set stack size to infinity"); - exit(1); */ -} +void C_FUNC(remove_stack_limit, REMOVE_STACK_LIMIT)(void) +{ + struct rlimit rlim = {RLIM_INFINITY, RLIM_INFINITY}; + if (setrlimit(RLIMIT_STACK, &rlim) == -1) + { + /* perror("Cannot set stack size to infinity"); + exit(1); */ + } } From 87fba43df631c0d394795e3855008e7548a69966 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 13 May 2025 11:38:10 +0200 Subject: [PATCH 0957/1367] Version 5.3.0, Revision 24457, Hash 127815080 MODIFIED * configure include/version/version.m4 DELETED * include/headers/parser/.!54618!gsl_complex_math.h Bugs: -Removed useless file Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++---------- .../headers/parser/.!54618!gsl_complex_math.h | 2 -- include/version/version.m4 | 6 ++--- 3 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 include/headers/parser/.!54618!gsl_complex_math.h diff --git a/configure b/configure index 26ee9c9b8b..ba23e55492 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24377 h.1d1cd3f73. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24457 h.127815080. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24377 h.1d1cd3f73' -PACKAGE_STRING='Yambo 5.3.0 r.24377 h.1d1cd3f73' +PACKAGE_VERSION='5.3.0 r.24457 h.127815080' +PACKAGE_STRING='Yambo 5.3.0 r.24457 h.127815080' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24377 h.1d1cd3f73 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24457 h.127815080 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24377 h.1d1cd3f73:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24457 h.127815080:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24377 h.1d1cd3f73 +Yambo configure 5.3.0 r.24457 h.127815080 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24377 h.1d1cd3f73, which was +It was created by Yambo $as_me 5.3.0 r.24457 h.127815080, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24377" -SHASH="1d1cd3f73" +SREVISION="24457" +SHASH="127815080" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24377 h.1d1cd3f73, which was +This file was extended by Yambo $as_me 5.3.0 r.24457 h.127815080, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24377 h.1d1cd3f73 +Yambo config.status 5.3.0 r.24457 h.127815080 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/headers/parser/.!54618!gsl_complex_math.h b/include/headers/parser/.!54618!gsl_complex_math.h deleted file mode 100644 index 25b30ad619..0000000000 --- a/include/headers/parser/.!54618!gsl_complex_math.h +++ /dev/null @@ -1,2 +0,0 @@ -/* complex/gsl_complex_math.h - * diff --git a/include/version/version.m4 b/include/version/version.m4 index 902f6bb2db..1d06dfe9f5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24377 h.1d1cd3f73, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24457 h.127815080, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24377" -SHASH="1d1cd3f73" +SREVISION="24457" +SHASH="127815080" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From dde14bd9ff42ea3447f1b376fabc466d04c3b9e5 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Tue, 13 May 2025 21:08:03 +0200 Subject: [PATCH 0958/1367] Add recommended VS Code settings for Yambo --- .vscode/settings.json | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..2f3169c51d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,47 @@ +{ + // File associations for proper syntax highlighting + "files.associations": { + "*.F": "FortranFreeForm", + "*.F90": "FortranFreeForm", + "*.inc": "FortranFreeForm" + }, + + // GitHub Copilot activation for Fortran + "github.copilot.enable": { + "Fortran": true, + "Fortran77": true + }, + + // Fortran linter configuration + "fortran.linter.compiler": "gfortran", + "fortran.linter.compilerPath": "/usr/bin/gfortran", + "fortran.linter.extraArgs": [ + "-Wall", "-Wextra", "-pedantic", "-std=f2008", "-cpp", + "-D_HDF5_LIB", "-D_HDF5_IO", "-D_MPI", "-DYAMBO_ALLOC", + "-DDEV_SUB_ALT(x)=x##_cpu" + ], + "fortran.linter.includePaths": [ + "${workspaceFolder}/src/modules/", + "${workspaceFolder}/src/parser/", + "${workspaceFolder}/include/", + "${workspaceFolder}/include/headers/common", + "${workspaceFolder}/include/version", + "${workspaceFolder}/include/system", + "${workspaceFolder}/include/headers/parser" + ], + "fortran.fortls.preprocessor.definitions": { + "_HDF5_LIB": "", + "_HDF5_IO": "", + "_MPI": "", + "YAMBO_ALLOC(A,x)": "allocate(A x)" + }, + + // Optional formatter + "fortran.formatting.formatter": "fprettify", + "fortran.formatting.fprettifyExecutable": "/usr/bin/fprettify", + + // Enable verbose logging + "fortran.logging.level": "Debug", + "fortran.experimental.keepInitDiagnostics": false + } + \ No newline at end of file From c2df0f24df3320daf4194c1af6449b5db2391683 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Tue, 13 May 2025 21:58:20 +0200 Subject: [PATCH 0959/1367] update settings.json, linter and fortls work --- .vscode/settings.json | 13 ++++++++----- vscode_yambo.md | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 vscode_yambo.md diff --git a/.vscode/settings.json b/.vscode/settings.json index 2f3169c51d..4cf7a6ecbe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,15 +33,18 @@ "_HDF5_LIB": "", "_HDF5_IO": "", "_MPI": "", - "YAMBO_ALLOC(A,x)": "allocate(A x)" + "YAMBO_ALLOC(A,x)": "allocate(A x)", }, - + "fortran.fortls.executable": "/home/reho0001/.local/bin/fortls", // Optional formatter "fortran.formatting.formatter": "fprettify", "fortran.formatting.fprettifyExecutable": "/usr/bin/fprettify", // Enable verbose logging "fortran.logging.level": "Debug", - "fortran.experimental.keepInitDiagnostics": false - } - \ No newline at end of file + "fortran.experimental.keepInitDiagnostics": false, + //This is needed if fortls is installed via pipx + "terminal.integrated.env.linux": { + "PATH": "${env:HOME}/.local/bin:${env:PATH}" + } + } \ No newline at end of file diff --git a/vscode_yambo.md b/vscode_yambo.md new file mode 100644 index 0000000000..3826fb22f4 --- /dev/null +++ b/vscode_yambo.md @@ -0,0 +1,4 @@ +# Recommended Extensions +`Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. + +You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). From 22e36639fa219c20126a23b40d16aa34b9853df7 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Tue, 13 May 2025 23:20:36 +0200 Subject: [PATCH 0960/1367] start gdb --- .vscode/launch.json | 0 mod_interfaces.tmp_source | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 mod_interfaces.tmp_source diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mod_interfaces.tmp_source b/mod_interfaces.tmp_source new file mode 100644 index 0000000000..709d2ba08a --- /dev/null +++ b/mod_interfaces.tmp_source @@ -0,0 +1,11 @@ + + +! +! License-Identifier: GPL +! +! Copyright (C) 2013 The Yambo Team +! +! Authors (see AUTHORS file for details): AM DS NM +! +! headers +! \ No newline at end of file From ca71782a994b1fd01a9029957d1e83f339482d2e Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Tue, 13 May 2025 23:32:51 +0200 Subject: [PATCH 0961/1367] add gdb --- .vscode/launch.json | 26 ++++++++++++++++++++++++++ vscode_yambo.md | 21 +++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index e69de29bb2..27ad5e5fee 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Yambo", + "type": "cppdbg", + "request": "launch", + "program": "/home/reho0001/codes/lumen/bin/yambo", // Adjust to your Yambo binary path + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "setupCommands": [ + { + "description": "Enable pretty printing", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] + } + \ No newline at end of file diff --git a/vscode_yambo.md b/vscode_yambo.md index 3826fb22f4..fc81e4cbaa 100644 --- a/vscode_yambo.md +++ b/vscode_yambo.md @@ -2,3 +2,24 @@ `Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). + +## GDB-based Fortran debugging + +Make sure you have `gdb`. + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +Enable debugging from VS code with: +- Breakpoints +- Step-by-step execution +- Variable insepction +- GDB support + +### How to Use Debugger in VS code +1) Open the yambo folder in VS code +2) press F5 for `Run & Debug` +3) `Debug Yambo` from the dropdown +4) Set breakpoints by clicking the glutter (left of line numbers) +5) Click run From 8ab7a85b9bbc75f800fe94b0af447704525b3146 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Tue, 13 May 2025 23:59:07 +0200 Subject: [PATCH 0962/1367] add and tested GDB --- .vscode/launch.json | 7 +++---- .vscode/settings.json | 3 ++- vscode_yambo.md | 11 +++++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 27ad5e5fee..23b2943136 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,8 +5,8 @@ "name": "Debug Yambo", "type": "cppdbg", "request": "launch", - "program": "/home/reho0001/codes/lumen/bin/yambo", // Adjust to your Yambo binary path - "args": [], + "program": "/root/codes/lumen/bin/yambo", // Adjust to your Yambo binary path + "args": ["-F", "02_COHSEX", "-J", "debug_run", "-C", "debug_run", "-I", "debug_run"], // Adjust to your Yambo files "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], @@ -22,5 +22,4 @@ ] } ] - } - \ No newline at end of file + } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 4cf7a6ecbe..b3f5de01df 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -35,7 +35,8 @@ "_MPI": "", "YAMBO_ALLOC(A,x)": "allocate(A x)", }, - "fortran.fortls.executable": "/home/reho0001/.local/bin/fortls", + "fortran.fortls.path": "/home/reho0001/.local/bin/fortls", + // Optional formatter "fortran.formatting.formatter": "fprettify", "fortran.formatting.fprettifyExecutable": "/usr/bin/fprettify", diff --git a/vscode_yambo.md b/vscode_yambo.md index fc81e4cbaa..188aaded0e 100644 --- a/vscode_yambo.md +++ b/vscode_yambo.md @@ -19,7 +19,10 @@ Enable debugging from VS code with: ### How to Use Debugger in VS code 1) Open the yambo folder in VS code -2) press F5 for `Run & Debug` -3) `Debug Yambo` from the dropdown -4) Set breakpoints by clicking the glutter (left of line numbers) -5) Click run +2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test +3) Edit the `.vsocde/launch.json` file accordingly +4) press F5 for `Run & Debug` +5) `Debug Yambo` from the dropdown +6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). +7) On the debug menu choose your breakpoints. +8) Click run \ No newline at end of file From b57711396d15a19ef6df2bf416032e2ae99c24b0 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Wed, 14 May 2025 00:05:41 +0200 Subject: [PATCH 0963/1367] change name of file --- vscode_lumen.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vscode_lumen.md diff --git a/vscode_lumen.md b/vscode_lumen.md new file mode 100644 index 0000000000..188aaded0e --- /dev/null +++ b/vscode_lumen.md @@ -0,0 +1,28 @@ +# Recommended Extensions +`Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. + +You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). + +## GDB-based Fortran debugging + +Make sure you have `gdb`. + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +Enable debugging from VS code with: +- Breakpoints +- Step-by-step execution +- Variable insepction +- GDB support + +### How to Use Debugger in VS code +1) Open the yambo folder in VS code +2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test +3) Edit the `.vsocde/launch.json` file accordingly +4) press F5 for `Run & Debug` +5) `Debug Yambo` from the dropdown +6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). +7) On the debug menu choose your breakpoints. +8) Click run \ No newline at end of file From 4f0508c4bff85c6a954a5e4727712f8da6a45ef9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 14 May 2025 00:38:07 +0200 Subject: [PATCH 0964/1367] Trying to address issue of ydiago installation mentioned by @muralidharrsvm7 in MR#208 --- config/m4/yambo_folders.m4 | 8 ++++++++ configure | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/config/m4/yambo_folders.m4 b/config/m4/yambo_folders.m4 index 227d601075..76a11b3613 100644 --- a/config/m4/yambo_folders.m4 +++ b/config/m4/yambo_folders.m4 @@ -107,6 +107,14 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/lib"; then mkdir "$extlibs_pa if ! test -d "$extlibs_path/${FCKIND}/${FC}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/include"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_path/${FCKIND}/${FC}/bin"; fi # +if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi +# +if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi +# if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; BIN_NETCDF=$extlibs_path/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}/bin/* ; diff --git a/configure b/configure index ba23e55492..dab78a6cf3 100755 --- a/configure +++ b/configure @@ -19324,6 +19324,14 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/lib"; then mkdir "$extlibs_pa if ! test -d "$extlibs_path/${FCKIND}/${FC}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/include"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_path/${FCKIND}/${FC}/bin"; fi # +if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi +# +if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi +# if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; BIN_NETCDF=$extlibs_path/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}/bin/* ; From 10029dc2d2ee15013bd1f4dd4423b9d1201d4b86 Mon Sep 17 00:00:00 2001 From: Muralidhar Nalabothula Date: Wed, 14 May 2025 04:13:38 +0530 Subject: [PATCH 0965/1367] Optimize xo --- src/driver/driver.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/driver/driver.c b/src/driver/driver.c index 37d193d7f0..52bed08a89 100644 --- a/src/driver/driver.c +++ b/src/driver/driver.c @@ -28,22 +28,11 @@ int main(int argc, char *argv[]) */ yambo_seed_struct y; tool_struct tool; - struct options_struct *options = - calloc(n_options, sizeof(*options)); //[n_options]; + struct options_struct *options = calloc(n_options, sizeof(*options)); if (!options) { -#if defined _MPI - if (use_mpi == 1) - { - MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE); - } - else - { - exit(EXIT_FAILURE); - } -#else + printf("Failed to allocate options buffer.\n"); exit(EXIT_FAILURE); -#endif } /* TOOL & Version initialization From d2a03611995a25c9720d72ca3ef95e66c7d2be5b Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Wed, 14 May 2025 06:14:08 +0200 Subject: [PATCH 0966/1367] remove accidental file from git tracking --- mod_interfaces.tmp_source | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 mod_interfaces.tmp_source diff --git a/mod_interfaces.tmp_source b/mod_interfaces.tmp_source deleted file mode 100644 index 709d2ba08a..0000000000 --- a/mod_interfaces.tmp_source +++ /dev/null @@ -1,11 +0,0 @@ - - -! -! License-Identifier: GPL -! -! Copyright (C) 2013 The Yambo Team -! -! Authors (see AUTHORS file for details): AM DS NM -! -! headers -! \ No newline at end of file From ba8a5e4836860bd22c828bb8f3a7b3cd9094f8cd Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Wed, 14 May 2025 07:33:49 +0000 Subject: [PATCH 0967/1367] VSCode settings in LUMEN --- .vscode/launch.json | 25 +++++++++++++++++++++ .vscode/settings.json | 51 +++++++++++++++++++++++++++++++++++++++++++ vscode_lumen.md | 28 ++++++++++++++++++++++++ vscode_yambo.md | 28 ++++++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 vscode_lumen.md create mode 100644 vscode_yambo.md diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..23b2943136 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Yambo", + "type": "cppdbg", + "request": "launch", + "program": "/root/codes/lumen/bin/yambo", // Adjust to your Yambo binary path + "args": ["-F", "02_COHSEX", "-J", "debug_run", "-C", "debug_run", "-I", "debug_run"], // Adjust to your Yambo files + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "setupCommands": [ + { + "description": "Enable pretty printing", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] + } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..b3f5de01df --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,51 @@ +{ + // File associations for proper syntax highlighting + "files.associations": { + "*.F": "FortranFreeForm", + "*.F90": "FortranFreeForm", + "*.inc": "FortranFreeForm" + }, + + // GitHub Copilot activation for Fortran + "github.copilot.enable": { + "Fortran": true, + "Fortran77": true + }, + + // Fortran linter configuration + "fortran.linter.compiler": "gfortran", + "fortran.linter.compilerPath": "/usr/bin/gfortran", + "fortran.linter.extraArgs": [ + "-Wall", "-Wextra", "-pedantic", "-std=f2008", "-cpp", + "-D_HDF5_LIB", "-D_HDF5_IO", "-D_MPI", "-DYAMBO_ALLOC", + "-DDEV_SUB_ALT(x)=x##_cpu" + ], + "fortran.linter.includePaths": [ + "${workspaceFolder}/src/modules/", + "${workspaceFolder}/src/parser/", + "${workspaceFolder}/include/", + "${workspaceFolder}/include/headers/common", + "${workspaceFolder}/include/version", + "${workspaceFolder}/include/system", + "${workspaceFolder}/include/headers/parser" + ], + "fortran.fortls.preprocessor.definitions": { + "_HDF5_LIB": "", + "_HDF5_IO": "", + "_MPI": "", + "YAMBO_ALLOC(A,x)": "allocate(A x)", + }, + "fortran.fortls.path": "/home/reho0001/.local/bin/fortls", + + // Optional formatter + "fortran.formatting.formatter": "fprettify", + "fortran.formatting.fprettifyExecutable": "/usr/bin/fprettify", + + // Enable verbose logging + "fortran.logging.level": "Debug", + "fortran.experimental.keepInitDiagnostics": false, + //This is needed if fortls is installed via pipx + "terminal.integrated.env.linux": { + "PATH": "${env:HOME}/.local/bin:${env:PATH}" + } + } \ No newline at end of file diff --git a/vscode_lumen.md b/vscode_lumen.md new file mode 100644 index 0000000000..188aaded0e --- /dev/null +++ b/vscode_lumen.md @@ -0,0 +1,28 @@ +# Recommended Extensions +`Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. + +You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). + +## GDB-based Fortran debugging + +Make sure you have `gdb`. + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +Enable debugging from VS code with: +- Breakpoints +- Step-by-step execution +- Variable insepction +- GDB support + +### How to Use Debugger in VS code +1) Open the yambo folder in VS code +2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test +3) Edit the `.vsocde/launch.json` file accordingly +4) press F5 for `Run & Debug` +5) `Debug Yambo` from the dropdown +6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). +7) On the debug menu choose your breakpoints. +8) Click run \ No newline at end of file diff --git a/vscode_yambo.md b/vscode_yambo.md new file mode 100644 index 0000000000..188aaded0e --- /dev/null +++ b/vscode_yambo.md @@ -0,0 +1,28 @@ +# Recommended Extensions +`Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. + +You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). + +## GDB-based Fortran debugging + +Make sure you have `gdb`. + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` + +Enable debugging from VS code with: +- Breakpoints +- Step-by-step execution +- Variable insepction +- GDB support + +### How to Use Debugger in VS code +1) Open the yambo folder in VS code +2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test +3) Edit the `.vsocde/launch.json` file accordingly +4) press F5 for `Run & Debug` +5) `Debug Yambo` from the dropdown +6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). +7) On the debug menu choose your breakpoints. +8) Click run \ No newline at end of file From a3825bfdd1cc8cf60df28eabb6e9aa69295e147c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 14 May 2025 15:49:22 +0200 Subject: [PATCH 0968/1367] Previous commit fixed --- config/m4/yambo_folders.m4 | 12 ++++++------ configure | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/m4/yambo_folders.m4 b/config/m4/yambo_folders.m4 index 76a11b3613..37dd5a2604 100644 --- a/config/m4/yambo_folders.m4 +++ b/config/m4/yambo_folders.m4 @@ -107,13 +107,13 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/lib"; then mkdir "$extlibs_pa if ! test -d "$extlibs_path/${FCKIND}/${FC}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/include"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_path/${FCKIND}/${FC}/bin"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; diff --git a/configure b/configure index dab78a6cf3..355bbface7 100755 --- a/configure +++ b/configure @@ -19324,13 +19324,13 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/lib"; then mkdir "$extlibs_pa if ! test -d "$extlibs_path/${FCKIND}/${FC}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/include"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_path/${FCKIND}/${FC}/bin"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; From 24ae4815d88fc6efbc09392c4eff80898e97792a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 14 May 2025 15:56:37 +0200 Subject: [PATCH 0969/1367] Fixed compilation issue --- src/exc-ph/EXC_dipole.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 4f4ca1a5c7..ce7d2eeccf 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -102,7 +102,7 @@ subroutine EXC_dipole(Xk,E,q,X) ! Recalculate the residuals ! i_BS_mat=1 - call K_diago_right_residuals("opt1", i_BS_mat,BS_E_in,BS_R_right,BS_mat) + call K_diago_R_res("opt1", i_BS_mat,BS_E_in,BS_R_right,BS_mat) !call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) BS_R_left =conjg(BS_R_right) ! From 00771da241d9f1b1c1cb4edaf59522e52c2750ec Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 16 May 2025 15:51:51 +0200 Subject: [PATCH 0970/1367] Removed checks for older versions in ELPH databases --- src/io/variables_ELPH.F | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 742eec9590..83a8795a54 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -40,9 +40,7 @@ integer function variables_ELPH(ID,what) ! call IO_desc_reset(ELPH_desc) ! - NVAR=6 - if (ver_is_gt_or_eq(ID,revision=18920)) NVAR=7 - if (ver_is_gt_or_eq(ID,revision=21550)) NVAR=9 + NVAR=9 call def_variable_elemental(ID,"PARS",NVAR,SP,0) ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) @@ -51,24 +49,14 @@ integer function variables_ELPH(ID,what) if (l_gFsq) call io_variable_elemental(ID,VAR="[ELPH]",I0=elph_nQ_used,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[used]",DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] K points",I0=elph_nk_bz,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - if (ver_is_gt_or_eq(ID,revision=21550)) then - call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) - if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 - else - call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I0=elph_nb,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - if (read_is_on(ID)) elph_bands=(/1,elph_nb/) - endif + call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) + if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 call io_variable_elemental(ID,VAR="[ELPH] Using the Q-grid",L0=elph_use_q_grid,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - if (ver_is_gt_or_eq(ID,revision=18920)) then - call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& -& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - endif - if (ver_is_gt_or_eq(ID,revision=21550)) then - call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller",L0=l_GKKP_hosts_DW,& -& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - else - l_GKKP_hosts_DW=.true. - endif + call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller",L0=l_GKKP_hosts_DW,& +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + if (l_gFsq) then call def_variable_elemental(ID,"QP_nb_nk_n_states",3,SP,0) call io_variable_elemental(ID,I0=QP_nb) @@ -104,10 +92,8 @@ integer function variables_ELPH(ID,what) enddo endif ! - if (ver_is_gt_or_eq(ID,revision=21550).or.elph_grids_are_expanded) then - call io_bulk(ID,VAR="PH_K",VAR_SZ=(/nkbz,3/) ) - call io_bulk(ID,R2=PH_kpt_bz(:,:)) - endif + call io_bulk(ID,VAR="PH_K",VAR_SZ=(/nkbz,3/) ) + call io_bulk(ID,R2=PH_kpt_bz(:,:)) ! variables_ELPH=io_status(ID) ! From 1b7d5cd133f7a9ba1cb32c013e654b62ea2e8cde Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Fri, 16 May 2025 20:17:53 +0200 Subject: [PATCH 0971/1367] add recommended extensions for vscode --- .vscode/extensions.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..6f4c0f02c0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,18 @@ +{ + "recommendations": [ + // Fortran language support + "krvajal.vscode-fortran-support", + // Linting, IntelliSense, debugging (GDB) + "ms-vscode.cpptools", + // Python tests and helpers + "ms-python.python", + "ms-python.vscode-pylance", + // Debug (LLDB alternative) + "vadimcn.vscode-lldb", + // Color-coded comments (TODO, FIXME, etc.) + "aaron-bond.better-comments", + // Format Fortran code with fprettify + "fortran-lang.fortran-fprettify" + ] + } + \ No newline at end of file From df84be675654fe539a5b8a6b5b664caf9e51771f Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Fri, 16 May 2025 20:26:28 +0200 Subject: [PATCH 0972/1367] remove duplicate file --- vscode_yambo.md | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 vscode_yambo.md diff --git a/vscode_yambo.md b/vscode_yambo.md deleted file mode 100644 index 188aaded0e..0000000000 --- a/vscode_yambo.md +++ /dev/null @@ -1,28 +0,0 @@ -# Recommended Extensions -`Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. - -You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). - -## GDB-based Fortran debugging - -Make sure you have `gdb`. - -You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` - -You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` - -Enable debugging from VS code with: -- Breakpoints -- Step-by-step execution -- Variable insepction -- GDB support - -### How to Use Debugger in VS code -1) Open the yambo folder in VS code -2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test -3) Edit the `.vsocde/launch.json` file accordingly -4) press F5 for `Run & Debug` -5) `Debug Yambo` from the dropdown -6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). -7) On the debug menu choose your breakpoints. -8) Click run \ No newline at end of file From 239ad6930815b06d904ae559f29c8f78c620a322 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Fri, 16 May 2025 22:00:22 +0200 Subject: [PATCH 0973/1367] add options for fprretify --- .fprettifyrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .fprettifyrc diff --git a/.fprettifyrc b/.fprettifyrc new file mode 100644 index 0000000000..348b4ec8bf --- /dev/null +++ b/.fprettifyrc @@ -0,0 +1,6 @@ +[fprettify] +indent = 6 +whitespace_only = true +case = upper +strict_indent = false +align_comments = true From 28e05b1c4cfb64146589d148a7131abc1bfaece8 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Fri, 16 May 2025 22:04:58 +0200 Subject: [PATCH 0974/1367] update settings.json --- .vscode/settings.json | 107 ++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b3f5de01df..78d408d26c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,51 +1,58 @@ { - // File associations for proper syntax highlighting - "files.associations": { - "*.F": "FortranFreeForm", - "*.F90": "FortranFreeForm", - "*.inc": "FortranFreeForm" - }, - - // GitHub Copilot activation for Fortran - "github.copilot.enable": { - "Fortran": true, - "Fortran77": true - }, - - // Fortran linter configuration - "fortran.linter.compiler": "gfortran", - "fortran.linter.compilerPath": "/usr/bin/gfortran", - "fortran.linter.extraArgs": [ - "-Wall", "-Wextra", "-pedantic", "-std=f2008", "-cpp", - "-D_HDF5_LIB", "-D_HDF5_IO", "-D_MPI", "-DYAMBO_ALLOC", - "-DDEV_SUB_ALT(x)=x##_cpu" - ], - "fortran.linter.includePaths": [ - "${workspaceFolder}/src/modules/", - "${workspaceFolder}/src/parser/", - "${workspaceFolder}/include/", - "${workspaceFolder}/include/headers/common", - "${workspaceFolder}/include/version", - "${workspaceFolder}/include/system", - "${workspaceFolder}/include/headers/parser" - ], - "fortran.fortls.preprocessor.definitions": { - "_HDF5_LIB": "", - "_HDF5_IO": "", - "_MPI": "", - "YAMBO_ALLOC(A,x)": "allocate(A x)", - }, - "fortran.fortls.path": "/home/reho0001/.local/bin/fortls", - - // Optional formatter - "fortran.formatting.formatter": "fprettify", - "fortran.formatting.fprettifyExecutable": "/usr/bin/fprettify", - - // Enable verbose logging - "fortran.logging.level": "Debug", - "fortran.experimental.keepInitDiagnostics": false, - //This is needed if fortls is installed via pipx - "terminal.integrated.env.linux": { - "PATH": "${env:HOME}/.local/bin:${env:PATH}" - } - } \ No newline at end of file + // File associations for proper syntax highlighting + "files.associations": { + "*.F": "FortranFreeForm", + "*.F90": "FortranFreeForm", + "*.inc": "FortranFreeForm" + }, + // GitHub Copilot activation for Fortran + "github.copilot.enable": { + "Fortran": true, + "Fortran77": true + }, + // Fortran linter configuration + "fortran.linter.compiler": "gfortran", + "fortran.linter.compilerPath": "/usr/bin/gfortran", + "fortran.linter.extraArgs": [ + "-Wall", + "-Wextra", + "-pedantic", + "-std=f2008", + "-cpp", + "-D_HDF5_LIB", + "-D_HDF5_IO", + "-D_MPI", + "-DYAMBO_ALLOC", + "-DDEV_SUB_ALT(x)=x##_cpu" + ], + "fortran.linter.includePaths": [ + "${workspaceFolder}/src/modules/", + "${workspaceFolder}/src/parser/", + "${workspaceFolder}/include/", + "${workspaceFolder}/include/headers/common", + "${workspaceFolder}/include/version", + "${workspaceFolder}/include/system", + "${workspaceFolder}/include/headers/parser" + ], + "fortran.fortls.preprocessor.definitions": { + "_HDF5_LIB": "", + "_HDF5_IO": "", + "_MPI": "", + "YAMBO_ALLOC(A,x)": "allocate(A x)", + }, + "fortran.fortls.path": "/home/reho0001/.local/bin/fortls", + // Optional formatter + "fortran.formatting.formatter": "fprettify", + "fortran.formatting.fprettifyArgs": [ + "/root/.local/bin/fprettify" + ], + "fortran.formatting.path": "/root/.local/bin/fprettify", // Change me: Path to the fprettify executable + "editor.formatOnSave": true, + // Enable verbose logging + "fortran.logging.level": "Debug", + "fortran.experimental.keepInitDiagnostics": false, + //This is needed if fortls is installed via pipx + "terminal.integrated.env.linux": { + "PATH": "${env:HOME}/.local/bin:${env:PATH}" + } +} \ No newline at end of file From 6c5e3a4c1c7fb064b0ee01aba5b8d54f5ee130d8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 17 May 2025 14:37:03 +0200 Subject: [PATCH 0975/1367] Version 5.3.0, Revision 24462, Hash a3825bfdd MODIFIED * configure include/version/version.m4 sbin/clang_format.sh dipoles/Berry_polarization_EQ.F dipoles/DIPOLE_covariant.F dipoles/POLARIZATION_output.F qp_control/DOUBLE_project.dep qp_control/ELPH_project.dep Bugs: - Additions: -Added more documentation (Doxygen) Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- sbin/clang_format.sh | 0 src/dipoles/Berry_polarization_EQ.F | 13 ++++++++++++- src/dipoles/DIPOLE_covariant.F | 2 +- src/dipoles/POLARIZATION_output.F | 8 ++++++-- src/qp_control/DOUBLE_project.dep | 1 + src/qp_control/ELPH_project.dep | 1 + 8 files changed, 35 insertions(+), 18 deletions(-) mode change 100644 => 100755 sbin/clang_format.sh diff --git a/configure b/configure index 355bbface7..1d375a6404 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24457 h.127815080. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24462 h.a3825bfdd. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24457 h.127815080' -PACKAGE_STRING='Yambo 5.3.0 r.24457 h.127815080' +PACKAGE_VERSION='5.3.0 r.24462 h.a3825bfdd' +PACKAGE_STRING='Yambo 5.3.0 r.24462 h.a3825bfdd' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24457 h.127815080 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24462 h.a3825bfdd to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24457 h.127815080:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24462 h.a3825bfdd:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24457 h.127815080 +Yambo configure 5.3.0 r.24462 h.a3825bfdd generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24457 h.127815080, which was +It was created by Yambo $as_me 5.3.0 r.24462 h.a3825bfdd, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24457" -SHASH="127815080" +SREVISION="24462" +SHASH="a3825bfdd" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24457 h.127815080, which was +This file was extended by Yambo $as_me 5.3.0 r.24462 h.a3825bfdd, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24457 h.127815080 +Yambo config.status 5.3.0 r.24462 h.a3825bfdd configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 1d06dfe9f5..d3fcfdb852 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24457 h.127815080, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24462 h.a3825bfdd, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24457" -SHASH="127815080" +SREVISION="24462" +SHASH="a3825bfdd" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/sbin/clang_format.sh b/sbin/clang_format.sh old mode 100644 new mode 100755 diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index cd1ad3fe82..7120a524a1 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -4,6 +4,17 @@ ! Copyright (C) 2019 The Yambo Team ! ! Authors (see AUTHORS file for details): MG CA +! +!> @brief Calculate polarization in terms of geometric Berry phase +!! +!! @param[in] All_S_det Overlaps determinants +!! @param[in] en KS energies +!! @param[in] Xk k-points sampling +!! @param[in] k_map k-points map +!! @param[in] l_P_periodic force periodicity of pol. respect to the field +!! +!! @param[out] P_Berry_Red Polarization in reduce cord. +! ! subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) ! @@ -12,7 +23,7 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) ! Berry phase is in reduced (crystalline) coordinates ! ! Reference: - ! R.D. King-Smith and D. Vanderbilt, "Theory of polarization of + ! R.D. King-Smith and D. Vanderbilt, "Theory of polarization of ! crystaline solids", Phys Rev B 47, 1651 (1993). ! use pars, ONLY:DP,SP,cZERO,pi,cONE diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index fe925eb748..6af24a7492 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -195,7 +195,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) call live_timing() ! #if defined _NL - if (l_eval_polarization) call POLARIZATION_output(Xen,Xk,Dip) + if (l_eval_polarization) call POLARIZATION_output(Xen,Xk) #endif ! if (any(direction_is_todo)) then diff --git a/src/dipoles/POLARIZATION_output.F b/src/dipoles/POLARIZATION_output.F index fab85952ad..6516c872c9 100644 --- a/src/dipoles/POLARIZATION_output.F +++ b/src/dipoles/POLARIZATION_output.F @@ -5,7 +5,12 @@ ! ! Authors (see AUTHORS file for details): MG CA ! -subroutine POLARIZATION_output(Xen,Xk,Dip) +!> @brief Calculate and print total polarization = electronic + ionic +!! +!! @param[in] Xen KS energies +!! @param[in] Xk k-points sampling +!! +subroutine POLARIZATION_output(Xen,Xk) ! ! Print the intrisic Polarization of the system ! @@ -22,7 +27,6 @@ subroutine POLARIZATION_output(Xen,Xk,Dip) implicit none type(levels) ::Xen type(bz_samp) ::Xk - type(DIPOLE_t)::Dip ! ! Work Space ! diff --git a/src/qp_control/DOUBLE_project.dep b/src/qp_control/DOUBLE_project.dep index 5cbc104b85..b839ec51b1 100644 --- a/src/qp_control/DOUBLE_project.dep +++ b/src/qp_control/DOUBLE_project.dep @@ -12,3 +12,4 @@ QP_fit_widths.o QP_load_DB.o QP_load_GFs.o + diff --git a/src/qp_control/ELPH_project.dep b/src/qp_control/ELPH_project.dep index 0ade97910b..447d6ac6c6 100644 --- a/src/qp_control/ELPH_project.dep +++ b/src/qp_control/ELPH_project.dep @@ -1,2 +1,3 @@ QP_load_DB.o QP_load_GFs.o + From c95ccf8072b91d38517c877dba20bd1bd9fb4d9a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 17 May 2025 21:31:34 +0200 Subject: [PATCH 0976/1367] Version 5.3.0, Revision 24463, Hash 6c5e3a4c1 MODIFIED * configure include/version/version.m4 dipoles/DIPOLE_overlaps.F dipoles/Ionic_polarization.F Bugs: - Additions: -More documentation Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/DIPOLE_overlaps.F | 2 ++ src/dipoles/Ionic_polarization.F | 5 +++++ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 1d375a6404..dbf7f6746c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24462 h.a3825bfdd. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24463 h.6c5e3a4c1. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24462 h.a3825bfdd' -PACKAGE_STRING='Yambo 5.3.0 r.24462 h.a3825bfdd' +PACKAGE_VERSION='5.3.0 r.24463 h.6c5e3a4c1' +PACKAGE_STRING='Yambo 5.3.0 r.24463 h.6c5e3a4c1' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24462 h.a3825bfdd to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24463 h.6c5e3a4c1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24462 h.a3825bfdd:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24463 h.6c5e3a4c1:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24462 h.a3825bfdd +Yambo configure 5.3.0 r.24463 h.6c5e3a4c1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24462 h.a3825bfdd, which was +It was created by Yambo $as_me 5.3.0 r.24463 h.6c5e3a4c1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24462" -SHASH="a3825bfdd" +SREVISION="24463" +SHASH="6c5e3a4c1" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24462 h.a3825bfdd, which was +This file was extended by Yambo $as_me 5.3.0 r.24463 h.6c5e3a4c1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24462 h.a3825bfdd +Yambo config.status 5.3.0 r.24463 h.6c5e3a4c1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d3fcfdb852..53522784f8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24462 h.a3825bfdd, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24463 h.6c5e3a4c1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24462" -SHASH="a3825bfdd" +SREVISION="24463" +SHASH="6c5e3a4c1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index d2f99d41af..32c07bd708 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -7,6 +7,8 @@ ! !> @brief Calculate overlaps between wave-function <\psi_k | \psi_{k+q} > for q = 1,2 ! +!! @param[it] Xk k-points sampling for the xhi +!! @param[it] Dip Dip dipoles range !! @param[out] DIP_S Overlap matrices ! #include diff --git a/src/dipoles/Ionic_polarization.F b/src/dipoles/Ionic_polarization.F index 9aad29bfb0..1821799077 100644 --- a/src/dipoles/Ionic_polarization.F +++ b/src/dipoles/Ionic_polarization.F @@ -5,6 +5,11 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +!> @brief Calculate ionic contribution to the polariation +! +!! @param[it] en KS energies +!! @param[out] I_Berry_RED Ionic polarization in reduced coord. +! subroutine Ionic_polarization(I_Berry_RED,en) ! ! Calculate polarization due to ions From f0d9a70d08a7bef4b49cd1f6ef34e710364b5348 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 18 May 2025 10:53:55 +0200 Subject: [PATCH 0977/1367] Version 5.3.0, Revision 24464, Hash c95ccf807 MODIFIED * configure include/version/version.m4 el-ph/En_k_plus_q_interpolate.F Bugs: - Additions: -More doxygen doc Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/el-ph/En_k_plus_q_interpolate.F | 10 ++++++++++ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/configure b/configure index dbf7f6746c..9575fdd62c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24463 h.6c5e3a4c1. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24464 h.c95ccf807. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24463 h.6c5e3a4c1' -PACKAGE_STRING='Yambo 5.3.0 r.24463 h.6c5e3a4c1' +PACKAGE_VERSION='5.3.0 r.24464 h.c95ccf807' +PACKAGE_STRING='Yambo 5.3.0 r.24464 h.c95ccf807' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24463 h.6c5e3a4c1 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24464 h.c95ccf807 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24463 h.6c5e3a4c1:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24464 h.c95ccf807:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24463 h.6c5e3a4c1 +Yambo configure 5.3.0 r.24464 h.c95ccf807 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24463 h.6c5e3a4c1, which was +It was created by Yambo $as_me 5.3.0 r.24464 h.c95ccf807, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24463" -SHASH="6c5e3a4c1" +SREVISION="24464" +SHASH="c95ccf807" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24463 h.6c5e3a4c1, which was +This file was extended by Yambo $as_me 5.3.0 r.24464 h.c95ccf807, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24463 h.6c5e3a4c1 +Yambo config.status 5.3.0 r.24464 h.c95ccf807 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 53522784f8..209d14f252 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24463 h.6c5e3a4c1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24464 h.c95ccf807, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24463" -SHASH="6c5e3a4c1" +SREVISION="24464" +SHASH="c95ccf807" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/el-ph/En_k_plus_q_interpolate.F b/src/el-ph/En_k_plus_q_interpolate.F index 586938ef5a..4efe42addf 100644 --- a/src/el-ph/En_k_plus_q_interpolate.F +++ b/src/el-ph/En_k_plus_q_interpolate.F @@ -5,6 +5,16 @@ ! ! Authors (see AUTHORS file for details): CA ! +!> @brief This subroutine interpolate energies at k+q for the double-grid q-points +!! +!! @param[in] k k-points sampling +!! @param[in] q q-points sampling +!! @param[in] E KS energies +!! @param[in] iqbz q-point where energies are interpolated +!! +!! @param[out] GKKP%E_dg_kpq(iqbz)%E_kpq interpolated energies at k+q_dbgrid +!! @param[out] GKKP%E_dg_kpq(iqbz)%f_kpq occupations at k+q_dbgrid +! subroutine En_k_plus_q_interpolate(k,q,E,iqbz) ! use pars, ONLY:pi,rZERO From e178db6e2dfc0e21d291ab9b5c17b0dee12684a8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 20 May 2025 14:56:54 +0200 Subject: [PATCH 0978/1367] Fixed bug in internal slepc configuration --- lib/slepc/Makefile.loc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/slepc/Makefile.loc b/lib/slepc/Makefile.loc index fd32d8ad8a..66f9ededf4 100644 --- a/lib/slepc/Makefile.loc +++ b/lib/slepc/Makefile.loc @@ -41,6 +41,10 @@ configure: uncompress echo "unset SLEPC_DIR;" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ unset PETSC_DIR; \ unset SLEPC_DIR; \ + echo "PETSC_DIR=$(LIBPATH)" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ + echo "SLEPC_DIR=$(PWD)/$(PACKAGE)" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ + PETSC_DIR=$(LIBPATH) \ + SLEPC_DIR=$(PWD)/$(PACKAGE) \ echo "python3 ./configure $(CONFFLAGS)" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ python3 ./configure $(CONFFLAGS) >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ cd - ; \ From 6d539f5cef87ffdcb351d021381e2f64fd84a566 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 21 May 2025 14:07:05 +0200 Subject: [PATCH 0979/1367] Fix for issue https://gitlab.com/lumen-code/lumen/-/issues/208 --- lib/slepc/Makefile.loc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/slepc/Makefile.loc b/lib/slepc/Makefile.loc index fd32d8ad8a..1bca1a5f14 100644 --- a/lib/slepc/Makefile.loc +++ b/lib/slepc/Makefile.loc @@ -16,7 +16,7 @@ TARBALL=$(tarball_slepc) include ../config/external_libs_commons.mk include ../config/external_libs_defs.mk # -CONFFLAGS=--prefix="$(LIBPATH)" +CONFFLAGS=--prefix=$(LIBPATH) # # MAIN target # From fa492f1fda6d0d35577e143f1b413c4676f906ac Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 21 May 2025 14:08:03 +0200 Subject: [PATCH 0980/1367] Previous commit reverted. --- lib/slepc/Makefile.loc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/slepc/Makefile.loc b/lib/slepc/Makefile.loc index 929a03f4d6..1bca1a5f14 100644 --- a/lib/slepc/Makefile.loc +++ b/lib/slepc/Makefile.loc @@ -41,10 +41,6 @@ configure: uncompress echo "unset SLEPC_DIR;" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ unset PETSC_DIR; \ unset SLEPC_DIR; \ - echo "PETSC_DIR=$(LIBPATH)" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ - echo "SLEPC_DIR=$(PWD)/$(PACKAGE)" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ - PETSC_DIR=$(LIBPATH) \ - SLEPC_DIR=$(PWD)/$(PACKAGE) \ echo "python3 ./configure $(CONFFLAGS)" >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ python3 ./configure $(CONFFLAGS) >> ${compdir}/log/config_$(PACKAGE).log 2>&1; \ cd - ; \ From 37fbc6c322e2d1349eddebdc1d9cb2e0b57e9731 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 23 May 2025 09:39:03 +0200 Subject: [PATCH 0981/1367] Dipole shifted grids subroutine reverted to default version Version 5.3.0, Revision 24845, Hash 25048768c5 MODIFIED * dipoles/DIPOLE_shifted_grids.F Bugs: - Additions: - Changes: - Patch sent by: Davide Sangalli --- src/dipoles/DIPOLE_shifted_grids.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index f3ba7e43e3..be39d5f3c7 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -7,7 +7,7 @@ ! #include ! -subroutine DIPOLE_shifted_grids_old(Xen,Xk,Dip) +subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! ! Using the wfc at the k,k-q points to construct ! @@ -371,10 +371,10 @@ subroutine set_parms(grid,command) return end subroutine set_parms ! -end subroutine DIPOLE_shifted_grids_old +end subroutine DIPOLE_shifted_grids ! ! -subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) +subroutine DIPOLE_shifted_grids_as_derk(Xen,Xk,Dip) ! ! Using the wfc at the k,k-q points to construct ! @@ -721,4 +721,4 @@ subroutine set_parms(grid,command) return end subroutine set_parms ! - end subroutine DIPOLE_shifted_grids + end subroutine DIPOLE_shifted_grids_as_derk From 29bddcd8ddee446461cce17b8147f8a90c4d4d05 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 23 May 2025 09:53:10 +0200 Subject: [PATCH 0982/1367] Version 5.3.0, Revision 24846, Hash 37fbc6c322 MODIFIED * io/variables_ELPH.F Bugs: - Fixed elph I/O Patch sent by: Davide Sangalli --- src/io/variables_ELPH.F | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 0c7903365f..075f57a4dc 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -27,7 +27,7 @@ integer function variables_ELPH(ID,what) ! !Work Space ! - integer ::iq + integer ::iq,PARS_size logical ::l_gFsq,l_gkkp real(SP) ::v(3) ! @@ -40,9 +40,11 @@ integer function variables_ELPH(ID,what) ! call IO_desc_reset(ELPH_desc) ! - if (.not.ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",6,SP,0) - if ( ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",7,SP,0) - if ( ver_is_gt_or_eq(ID,revision=20495)) call def_variable_elemental(ID,"PARS",8,SP,0) + PARS_size=6 + if ( ver_is_gt_or_eq(ID,revision=18920)) PARS_size=7 + if ( ver_is_gt_or_eq(ID,revision=20495)) PARS_size=8 + call def_variable_elemental(ID,"PARS",PARS_size,SP,0) + ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Q points",I0=elph_nQ,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[avail]",DESCRIPTOR=ELPH_desc) @@ -51,6 +53,7 @@ integer function variables_ELPH(ID,what) call io_variable_elemental(ID,VAR="[ELPH] K points",I0=elph_nk_bz,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I0=elph_nb,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Using the Q-grid",L0=elph_use_q_grid,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + ! if (ver_is_gt_or_eq(ID,revision=18920)) then call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) From bbf60cacc1e703fe5deaa895ace5f6e925d351ea Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 24 May 2025 22:47:18 +0200 Subject: [PATCH 0983/1367] Added comment to RT_small_a --- src/real_time_control/RT_small_a.F | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index 2e96b5c08e..d515b21148 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -19,6 +19,22 @@ ! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) ! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) ! QSFIELD: see below +! +! Linear frequency chirp: +! - expression coded +! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) +! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) +! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) +! +! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) +! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] +! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) +! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] +! +! - possible expression https://www.rp-photonics.com/chirp.html +! ! function small_a(T,dt,E_field,order,envelop_only) ! @@ -169,7 +185,7 @@ function small_a(T,dt,E_field,order,envelop_only) WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) ! each frequency has a different initial phase if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) - if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2._SP + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 ! W_field=field_frequency(E_field,i_fr) W_field_m1=1._SP/W_field From d79d4b3b73432df071dda72d350c3707d1990138 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 May 2025 14:19:49 +0200 Subject: [PATCH 0984/1367] Fixed field chirping --- src/real_time_control/RT_small_a.F | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index d515b21148..91bc10396a 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -176,6 +176,7 @@ function small_a(T,dt,E_field,order,envelop_only) do i_fr=1,n_freqs ! W_field=field_frequency(E_field,i_fr) + W_field_m1=1._SP/W_field if(W_field> 0._SP) W_field_m1=1._SP/W_field if(W_field==0._SP) W_field_m1=0._SP der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) @@ -187,10 +188,6 @@ function small_a(T,dt,E_field,order,envelop_only) if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 ! - W_field=field_frequency(E_field,i_fr) - W_field_m1=1._SP/W_field - WtimesT=W_field*(T-T_0)+fr_shift(i_field) - ! if (envelop_only_) then f0t=cONE ; f1t=cONE else From a83dd4ddd848de0eda0727d744727503c800955b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 May 2025 14:26:47 +0200 Subject: [PATCH 0985/1367] RT_small_a subroutine cleaning --- src/real_time_control/RT_small_a.F | 49 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index 91bc10396a..165bf3ba83 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -19,22 +19,24 @@ ! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) ! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) ! QSFIELD: see below +! FROMFILE: shape of the electric field from file +! +! Linear frequency chirp coded for QSSIN pulse: +! (see also https://www.rp-photonics.com/chirp.html) ! -! Linear frequency chirp: -! - expression coded ! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) ! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) ! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) ! ! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! ! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) ! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] ! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! ! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) ! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] ! -! - possible expression https://www.rp-photonics.com/chirp.html -! ! function small_a(T,dt,E_field,order,envelop_only) ! @@ -253,6 +255,7 @@ function small_a(T,dt,E_field,order,envelop_only) if (order> 0 ) f_now=0._SP ! case('PHHG') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) sarg=pi*(T-T_0)/sigma WT =W_field*T if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then @@ -302,7 +305,7 @@ function small_a(T,dt,E_field,order,envelop_only) if (order==0 ) f_now= f1t *EXPf if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & - & -der_fac*(T-T_0)*f1t/sigma**2 & + & -der_fac*(T-T_0)*f1t/sigma**2 & & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf f_now=f_now/der_fac ! @@ -314,24 +317,24 @@ function small_a(T,dt,E_field,order,envelop_only) if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t - endif - ! - case('SPULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - T_0=sigma - W_0=W_field - f_now=cZERO - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & - & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & - & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & - & W_0**2*sigma**2+24))/W_0**5/sigma**4) - if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t - if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & - & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & - & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t + endif + ! + case('SPULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + T_0=sigma + W_0=W_field + f_now=cZERO + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & + & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & + & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & + & W_0**2*sigma**2+24))/W_0**5/sigma**4) + if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t + if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & + & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & + & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t endif end select ! From 8b6be15465fd449e66020299b68262cb9fac6d0c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 May 2025 23:06:49 +0200 Subject: [PATCH 0986/1367] global renaming Ydiago -> Ldiago --- config/configure.ac | 2 +- config/m4/acx_report.m4 | 24 ++--- config/m4/yambo_diago.m4 | 34 +++---- config/m4/yambo_folders.m4 | 6 +- .../actions/compile_external_libraries.mk | 4 +- .../actions/download_external_libraries.mk | 4 +- config/mk/global/defs.mk.in | 2 +- config/report.in | 4 +- config/setup.in | 6 +- configure | 74 +++++++-------- lib/archive/Makefile.loc | 6 +- lib/archive/git.list.in | 2 +- lib/archive/package.list | 16 ++-- lib/{ydiago => ldiago}/Makefile.loc | 32 +++---- .../make_ldiago.inc.in} | 8 +- sbin/compilation/libraries.sh | 2 +- src/bse/.objects | 4 +- src/bse/DOUBLE_project.dep | 2 +- src/bse/K_diago_driver.F | 92 +++++++++---------- src/bse/K_diago_left_residuals.F | 4 +- src/bse/K_diago_perturbative.F | 2 +- src/bse/K_driver_init.F | 4 +- src/bse/K_fill_block_cyclic.F | 2 +- src/bse/{YDIAGO_driver.F => LDIAGO_driver.F} | 6 +- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 4 +- src/modules/SET_defaults.F | 6 +- src/modules/mod_BS_solvers.F | 10 +- src/modules/mod_interfaces.F | 4 +- 29 files changed, 184 insertions(+), 184 deletions(-) rename lib/{ydiago => ldiago}/Makefile.loc (50%) rename lib/{ydiago/make_ydiago.inc.in => ldiago/make_ldiago.inc.in} (88%) rename src/bse/{YDIAGO_driver.F => LDIAGO_driver.F} (99%) diff --git a/config/configure.ac b/config/configure.ac index 8b42acb9e1..b9bc675a45 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -305,7 +305,7 @@ ACX_LIBCUDA AC_SET_GPU # ============================================================================ # Diago library -AC_YDIAGO +AC_LDIAGO # ============================================================================ # Device XLIB ACX_DEVXLIB diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index e61bbe0291..1c951946f1 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -124,10 +124,10 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # -if test x"$with_ydiago_branch" = "xnone"; then - YDIAGO_check="I"; +if test x"$with_ldiago_branch" = "xnone"; then + LDIAGO_check="I"; else - YDIAGO_check="G"; + LDIAGO_check="G"; fi # PETSC_check="-" @@ -246,7 +246,7 @@ AC_SUBST(LAPACK_check) AC_SUBST(BLACS_check) AC_SUBST(SLK_check) AC_SUBST(ELPA_check) -AC_SUBST(YDIAGO_check) +AC_SUBST(LDIAGO_check) AC_SUBST(PETSC_check) AC_SUBST(SLEPC_check) AC_SUBST(PETSC_info) @@ -264,14 +264,14 @@ AC_SUBST(MPI_info) # # STRIPE [LIB] from paths # -ACX_STRIPE_SUBPATH($YDIAGO_LIBS,"LIB") -#ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") -YDIAGO_LIBS_R=$STRIPE -ACX_STRIPE_SUBPATH($YDIAGO_INCS,"INC") -#ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") -YDIAGO_INCS_R=$STRIPE -AC_SUBST(YDIAGO_LIBS_R) -AC_SUBST(YDIAGO_INCS_R) +ACX_STRIPE_SUBPATH($LDIAGO_LIBS,"LIB") +#ACX_STRIPE_SUBPATH2($LDIAGO_LIBS,"LIB") +LDIAGO_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($LDIAGO_INCS,"INC") +#ACX_STRIPE_SUBPATH2($LDIAGO_INCS,"INC") +LDIAGO_INCS_R=$STRIPE +AC_SUBST(LDIAGO_LIBS_R) +AC_SUBST(LDIAGO_INCS_R) # ACX_STRIPE_SUBPATH($IOTK_LIBS,"LIB") IOTK_LIBS_R=$STRIPE diff --git a/config/m4/yambo_diago.m4 b/config/m4/yambo_diago.m4 index 51d45979d8..c3d6aa4e64 100644 --- a/config/m4/yambo_diago.m4 +++ b/config/m4/yambo_diago.m4 @@ -5,32 +5,32 @@ # # Authors (see AUTHORS file for details): AM # -AC_DEFUN([AC_YDIAGO],[ +AC_DEFUN([AC_LDIAGO],[ # -AC_ARG_WITH(ydiago-branch,[AS_HELP_STRING([--with-ydiago-branch=],[Use the of the ydiago repository.],[32])],,[with_ydiago_branch=none]) +AC_ARG_WITH(ldiago-branch,[AS_HELP_STRING([--with-ldiago-branch=],[Use the of the ldiago repository.],[32])],,[with_ldiago_branch=none]) # -AC_CONFIG_FILES([lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in]) +AC_CONFIG_FILES([lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in]) -# GPU flags are passed to ydiago compilation only if elpa library is available +# GPU flags are passed to ldiago compilation only if elpa library is available if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then - ydiago_opt="$def_gpu $def_elpa" - YDIAGO_GPU_SUPPORT="$GPU_SUPPORT" + ldiago_opt="$def_gpu $def_elpa" + LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" else - ydiago_opt="$def_elpa" - YDIAGO_GPU_SUPPORT="no_gpu" + ldiago_opt="$def_elpa" + LDIAGO_GPU_SUPPORT="no_gpu" fi -YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib/libydiago.a" -YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include/" -#YDIAGO_LIBS="${compdir}/lib/libydiago.a" -#YDIAGO_INCS="$IFLAG${compdir}/include/" +LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" +LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include/" +#LDIAGO_LIBS="${compdir}/lib/libldiago.a" +#LDIAGO_INCS="$IFLAG${compdir}/include/" -AC_SUBST(YDIAGO_LIBS) -AC_SUBST(YDIAGO_INCS) -AC_SUBST(YDIAGO_GPU_SUPPORT) +AC_SUBST(LDIAGO_LIBS) +AC_SUBST(LDIAGO_INCS) +AC_SUBST(LDIAGO_GPU_SUPPORT) -AC_SUBST(ydiago_opt) -AC_SUBST(with_ydiago_branch) +AC_SUBST(ldiago_opt) +AC_SUBST(with_ldiago_branch) ]) diff --git a/config/m4/yambo_folders.m4 b/config/m4/yambo_folders.m4 index 37dd5a2604..0b672c9a8b 100644 --- a/config/m4/yambo_folders.m4 +++ b/config/m4/yambo_folders.m4 @@ -111,9 +111,9 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; fi # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; diff --git a/config/mk/global/actions/compile_external_libraries.mk b/config/mk/global/actions/compile_external_libraries.mk index d00ed979f5..8b1e56f08d 100644 --- a/config/mk/global/actions/compile_external_libraries.mk +++ b/config/mk/global/actions/compile_external_libraries.mk @@ -47,5 +47,5 @@ petsc: @if test "$(do_petsc)" = yes ; then LIBS="petsc" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) petsc-dl; $(mk_external_lib); fi slepc: petsc @if test "$(do_slepc)" = yes ; then LIBS="slepc" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) slepc-dl; $(mk_external_lib); fi -ydiago: scalapack blacs elpa - @if test "$(do_ydiago)" = yes ; then LIBS="ydiago" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) ydiago-dl; $(mk_external_lib); fi +ldiago: scalapack blacs elpa + @if test "$(do_ldiago)" = yes ; then LIBS="ldiago" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) ldiago-dl; $(mk_external_lib); fi diff --git a/config/mk/global/actions/download_external_libraries.mk b/config/mk/global/actions/download_external_libraries.mk index aa3db7e69c..ea091fd8c1 100644 --- a/config/mk/global/actions/download_external_libraries.mk +++ b/config/mk/global/actions/download_external_libraries.mk @@ -43,5 +43,5 @@ petsc-dl: @LIB2DO="petsc"; $(get_external_libraries) slepc-dl: @LIB2DO="slepc"; $(get_external_libraries) -ydiago-dl: - @LIB2DO="ydiago"; $(get_external_libraries) +ldiago-dl: + @LIB2DO="ldiago"; $(get_external_libraries) diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index 21949539e0..bcd62e068a 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -36,7 +36,7 @@ do_libxc = @compile_libxc@ do_devxlib = @compile_devxlib@ do_petsc = @compile_petsc@ do_slepc = @compile_slepc@ -do_ydiago = yes +do_ldiago = yes do_magma = @compile_magma@ do_magma_fmodules = @compile_magma_fmodules@ shell = @SHELL@ diff --git a/config/report.in b/config/report.in index 1842c5777b..94923879e8 100644 --- a/config/report.in +++ b/config/report.in @@ -72,8 +72,8 @@ # # > OTHERs: @DEVXLIB_info@ # -# [@YDIAGO_check@] Ydiago : @YDIAGO_LIBS_R@ -# @YDIAGO_INCS_R@ +# [@LDIAGO_check@] Ldiago : @LDIAGO_LIBS_R@ +# @LDIAGO_INCS_R@ # [@LIBXC_check@] LibXC : @LIBXC_LIBS_R@ # @LIBXC_INCS_R@ # [@DEVXLIB_check@] DevXlib : @DEVXLIB_LIBS_R@ diff --git a/config/setup.in b/config/setup.in index 01350b7271..dbcd32c25a 100644 --- a/config/setup.in +++ b/config/setup.in @@ -94,7 +94,7 @@ drocmlib = @LIBROCM_PATH@ devxlib_flgs= @DEVXLIB_FLAGS@ devxlib_clib= @DEVXLIB_CUDALIBS@ gpu_support = @GPU_SUPPORT@ -ydiago_gpu_support = @YDIAGO_GPU_SUPPORT@ +ldiago_gpu_support = @LDIAGO_GPU_SUPPORT@ lfft = @FFT_LIBS@ ifft = @FFT_INCS@ liotk = @IOTK_LIBS@ @@ -105,8 +105,8 @@ lfutile = @FUTILE_LIBS@ ifutile = @FUTILE_INCS@ letsf = @ETSF_LIBS@ ietsf = @ETSF_INCS@ -lydiago = @YDIAGO_LIBS@ -iydiago = @YDIAGO_INCS@ +lldiago = @LDIAGO_LIBS@ +ildiago = @LDIAGO_INCS@ lmagma = @MAGMA_LIBS@ imagma = @MAGMA_INCS@ mpipath = @MPI_PATH@ diff --git a/configure b/configure index 9575fdd62c..c029800cc1 100755 --- a/configure +++ b/configure @@ -693,8 +693,8 @@ YAML_INCS_R YAML_LIBS_R IOTK_INCS_R IOTK_LIBS_R -YDIAGO_INCS_R -YDIAGO_LIBS_R +LDIAGO_INCS_R +LDIAGO_LIBS_R MPI_info MPI_check LIBCUDA_check @@ -707,7 +707,7 @@ SLEPC_info PETSC_info SLEPC_check PETSC_check -YDIAGO_check +LDIAGO_check ELPA_check SLK_check BLACS_check @@ -745,11 +745,11 @@ internal_devxlib compile_devxlib DEVXLIB_INCS DEVXLIB_LIBS -with_ydiago_branch -ydiago_opt -YDIAGO_GPU_SUPPORT -YDIAGO_INCS -YDIAGO_LIBS +with_ldiago_branch +ldiago_opt +LDIAGO_GPU_SUPPORT +LDIAGO_INCS +LDIAGO_LIBS MKLGPU_LIBS LIBROCM_PATH LIBROCM_INCS @@ -1120,7 +1120,7 @@ with_rocm_libdir with_rocm_includedir with_rocm_path with_mklgpu_libs -with_ydiago_branch +with_ldiago_branch with_devxlib_libs with_devxlib_path with_devxlib_libdir @@ -1918,7 +1918,7 @@ Optional Packages: --with-rocm-includedir= Path to the rocm include directory --with-rocm-path= Path to rocm install directory --with-mklgpu-libs= Use the MKLGPU library - --with-ydiago-branch= Use the of the ydiago repository. + --with-ldiago-branch= Use the of the ldiago repository. --with-devxlib-libs= Use devxlib libraries --with-devxlib-path= Path to devxlib install directory --with-devxlib-libdir= Path to the devxlib lib directory @@ -16626,31 +16626,31 @@ fi # -# Check whether --with-ydiago-branch was given. -if test ${with_ydiago_branch+y} +# Check whether --with-ldiago-branch was given. +if test ${with_ldiago_branch+y} then : - withval=$with_ydiago_branch; + withval=$with_ldiago_branch; else $as_nop - with_ydiago_branch=none + with_ldiago_branch=none fi # -ac_config_files="$ac_config_files lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" +ac_config_files="$ac_config_files lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in" -# GPU flags are passed to ydiago compilation only if elpa library is available +# GPU flags are passed to ldiago compilation only if elpa library is available if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then - ydiago_opt="$def_gpu $def_elpa" - YDIAGO_GPU_SUPPORT="$GPU_SUPPORT" + ldiago_opt="$def_gpu $def_elpa" + LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" else - ydiago_opt="$def_elpa" - YDIAGO_GPU_SUPPORT="no_gpu" + ldiago_opt="$def_elpa" + LDIAGO_GPU_SUPPORT="no_gpu" fi -YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib/libydiago.a" -YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include/" -#YDIAGO_LIBS="${compdir}/lib/libydiago.a" -#YDIAGO_INCS="$IFLAG${compdir}/include/" +LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" +LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include/" +#LDIAGO_LIBS="${compdir}/lib/libldiago.a" +#LDIAGO_INCS="$IFLAG${compdir}/include/" @@ -17248,10 +17248,10 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # -if test x"$with_ydiago_branch" = "xnone"; then - YDIAGO_check="I"; +if test x"$with_ldiago_branch" = "xnone"; then + LDIAGO_check="I"; else - YDIAGO_check="G"; + LDIAGO_check="G"; fi # PETSC_check="-" @@ -17389,7 +17389,7 @@ fi # STRIPE [LIB] from paths # -TMP1=`echo $YDIAGO_LIBS | sed 's/\//+/g'` +TMP1=`echo $LDIAGO_LIBS | sed 's/\//+/g'` TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` STRIPE=`echo $TMP3 | sed 's/+/\//g'` @@ -17397,10 +17397,10 @@ if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi -#ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") -YDIAGO_LIBS_R=$STRIPE +#ACX_STRIPE_SUBPATH2($LDIAGO_LIBS,"LIB") +LDIAGO_LIBS_R=$STRIPE -TMP1=`echo $YDIAGO_INCS | sed 's/\//+/g'` +TMP1=`echo $LDIAGO_INCS | sed 's/\//+/g'` TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` STRIPE=`echo $TMP3 | sed 's/+/\//g'` @@ -17408,8 +17408,8 @@ if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi -#ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") -YDIAGO_INCS_R=$STRIPE +#ACX_STRIPE_SUBPATH2($LDIAGO_INCS,"INC") +LDIAGO_INCS_R=$STRIPE # @@ -18616,7 +18616,7 @@ do "lib/fftqe/c_defs.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" ;; "lib/fftqe/fftqe_defs.h") CONFIG_FILES="$CONFIG_FILES lib/fftqe/fftqe_defs.h:lib/fftqe/fftqe_defs.h.in" ;; "lib/iotk/make_iotk.inc") CONFIG_FILES="$CONFIG_FILES lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" ;; - "lib/ydiago/make_ydiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" ;; + "lib/ldiago/make_ldiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in" ;; "lib/magma/make_magma.inc") CONFIG_FILES="$CONFIG_FILES lib/magma/make_magma.inc:lib/magma/make_magma.inc.in" ;; "include/headers/common/have_malloc.h") CONFIG_HEADERS="$CONFIG_HEADERS include/headers/common/have_malloc.h:include/headers/common/have_malloc.h.in" ;; "config/setup") CONFIG_FILES="$CONFIG_FILES config/setup" ;; @@ -19328,9 +19328,9 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; fi # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; diff --git a/lib/archive/Makefile.loc b/lib/archive/Makefile.loc index 7887c0dc95..64588f97dd 100644 --- a/lib/archive/Makefile.loc +++ b/lib/archive/Makefile.loc @@ -14,8 +14,8 @@ all: $(EXT_LIBS) # # Libraries (GIT + archives) # -ydiago: - @+URL="$(url_Ydiago)" ; GBRANCH="$(branch_Ydiago)" ; GIT="$(git_Ydiago)"; LIB="$(pkgname_Ydiago)"; $(call getsrc_git,"Ydiago"); +ldiago: + @+URL="$(url_Ldiago)" ; GBRANCH="$(branch_Ldiago)" ; GIT="$(git_Ldiago)"; LIB="$(pkgname_Ldiago)"; $(call getsrc_git,"Ldiago"); devxlib: @+URL="$(url_devxlib)" ; GBRANCH="$(branch_devxlib)" ; GIT="$(git_devxlib)"; LIB="$(pkgname_devxlib)" ; $(call getsrc_git,"devxlib") # @@ -67,7 +67,7 @@ clean_git_folders: # clean_tgz: if test ! -e keep-extlibs-stamp ; then \ - if test -s $(tarball_Ydiago) && test "$(keep_Ydiago)" != "yes" ; then rm $(tarball_Ydiago) ; fi ; \ + if test -s $(tarball_Ldiago) && test "$(keep_Ldiago)" != "yes" ; then rm $(tarball_Ldiago) ; fi ; \ if test -s $(tarball_libxc) && test "$(keep_libxc)" != "yes" ; then rm $(tarball_libxc) ; fi ; \ if test -s $(tarball_iotk) && test "$(keep_iotk)" != "yes" ; then rm $(tarball_iotk) ; fi ; \ if test -s $(tarball_netcdf) && test "$(keep_netcdf)" != "yes" ; then rm $(tarball_netcdf) ; fi ; \ diff --git a/lib/archive/git.list.in b/lib/archive/git.list.in index 5701bc7844..57e46b27be 100644 --- a/lib/archive/git.list.in +++ b/lib/archive/git.list.in @@ -5,7 +5,7 @@ # # Authors (see AUTHORS file for details): AM, DS # -branch_Ydiago=@with_ydiago_branch@ +branch_Ldiago=@with_ldiago_branch@ branch_devxlib=@with_devxlib_branch@ branch_slepc=@with_slepc_branch@ branch_petsc=@with_petsc_branch@ diff --git a/lib/archive/package.list b/lib/archive/package.list index 4863b193b5..7d16fa43cb 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -1,11 +1,11 @@ # # Libs list # -EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack elpa magma petsc slepc fftw fftqe ydiago devxlib +EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack elpa magma petsc slepc fftw fftqe ldiago devxlib # # storing options # -keep_Ydiago=yes +keep_Ldiago=yes keep_iotk=yes keep_netcdf=no keep_netcdff=no @@ -27,7 +27,7 @@ keep_hdf5=no # # package versions # -version_Ydiago=0.4.0 +version_Ldiago=0.5.0 version_iotk=y1.2.2 version_netcdf=4.9.0 version_netcdff=4.6.0 @@ -50,7 +50,7 @@ version_devxlib=0.8.5 # # package names # -pkgname_Ydiago=Ydiago-$(version_Ydiago) +pkgname_Ldiago=Ldiago-$(version_Ldiago) pkgname_iotk=iotk-$(version_iotk) pkgname_netcdf=netcdf-c-$(version_netcdf) pkgname_netcdff=netcdf-fortran-$(version_netcdff) @@ -72,7 +72,7 @@ pkgname_devxlib=devicexlib-$(version_devxlib) # # tarball names # -tarball_Ydiago=$(version_Ydiago).tar.gz +tarball_Ldiago=$(version_Ldiago).tar.gz tarball_iotk=$(pkgname_iotk).tar.gz tarball_netcdf=v$(version_netcdf).tar.gz tarball_netcdff=v$(version_netcdff).tar.gz @@ -94,7 +94,6 @@ tarball_devxlib=$(pkgname_devxlib).tar.gz # # External URL's on Github # -url_Ydiago=https://github.com/yambo-code/Ydiago/archive/refs/tags/$(tarball_Ydiago) url_lapack=https://github.com/Reference-LAPACK/lapack/archive/refs/tags/$(tarball_lapack) url_scalapack=https://github.com/Reference-ScaLAPACK/scalapack/archive/refs/tags/$(tarball_scalapack) url_hdf5=https://github.com/HDFGroup/hdf5/archive/refs/tags/$(tarball_hdf5) @@ -103,6 +102,7 @@ url_netcdff=https://github.com/Unidata/netcdf-fortran/archive/refs/tags/$(tarbal # # External URL's on Gitlab # +url_Ldiago=https://gitlab.com/lumen-code/Ldiago/-/archive/$(version_Ldiago)/$(tarball_Ldiago) url_slepc=https://gitlab.com/slepc/slepc/-/archive/v$(version_slepc)/$(tarball_slepc) url_petsc=https://gitlab.com/petsc/petsc/-/archive/v$(version_petsc)/$(tarball_petsc) url_devxlib=https://gitlab.com/max-centre/components/devicexlib/-/archive/$(version_devxlib)/$(tarball_devxlib) @@ -130,14 +130,14 @@ url_futile=$(url_base)/$(tarball_futile) # # git repositories # -git_Ydiago=git@github.com:yambo-code/Ydiago.git +git_Ldiago=git@gitlab.com:lumen-code/Ldiago.git git_devxlib=git@gitlab.com:max-centre/components/devicexlib.git git_slepc=git@gitlab.com:slepc/slepc.git git_petsc=git@gitlab.com:petsc/petsc.git # # git default branches # -branch_Ydiago=none +branch_Ldiago=none branch_devxlib=none branch_slepc=none branch_petsc=none diff --git a/lib/ydiago/Makefile.loc b/lib/ldiago/Makefile.loc similarity index 50% rename from lib/ydiago/Makefile.loc rename to lib/ldiago/Makefile.loc index 4e950a235a..da1a1719a2 100644 --- a/lib/ydiago/Makefile.loc +++ b/lib/ldiago/Makefile.loc @@ -6,12 +6,12 @@ include ../../config/setup include ../archive/package.list # -LIBNAME=libydiago.a -LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/$(ydiago_gpu_support) +LIBNAME=libldiago.a +LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/$(ldiago_gpu_support) #LIBPATH=$(compdir) LIBRARY=$(LIBPATH)/lib/$(LIBNAME) # -PACKAGE=$(pkgname_Ydiago) +PACKAGE=$(pkgname_Ldiago) # include ../config/external_libs_commons.mk include ../config/external_libs_defs.mk @@ -28,30 +28,30 @@ configure: uncompress @if ! test -e configured.stamp; then \ rm -f ${compdir}/log/config_$(PACKAGE).log; \ echo "\t[$(PACKAGE)] configuration"; \ - if test -e ${compdir}/lib/ydiago/make_ydiago.inc ; then \ - echo "cp ${compdir}/lib/ydiago/make_ydiago.inc ${compdir}/lib/ydiago/$(PACKAGE)/src/make.inc" >> ${compdir}/log/config_$(PACKAGE).log ; \ - cp ${compdir}/lib/ydiago/make_ydiago.inc ${compdir}/lib/ydiago/$(PACKAGE)/src/make.inc ; \ + if test -e ${compdir}/lib/ldiago/make_ldiago.inc ; then \ + echo "cp ${compdir}/lib/ldiago/make_ldiago.inc ${compdir}/lib/ldiago/$(PACKAGE)/src/make.inc" >> ${compdir}/log/config_$(PACKAGE).log ; \ + cp ${compdir}/lib/ldiago/make_ldiago.inc ${compdir}/lib/ldiago/$(PACKAGE)/src/make.inc ; \ fi ; \ touch configured.stamp;\ fi # compile: uncompress configure @if ! test -e compiled.stamp ; then \ - cd ${compdir}/lib/ydiago/$(PACKAGE)/src ; make ; \ - cd ${compdir}/lib/ydiago/ ; touch compiled.stamp; \ + cd ${compdir}/lib/ldiago/$(PACKAGE)/src ; make ; \ + cd ${compdir}/lib/ldiago/ ; touch compiled.stamp; \ fi install: uncompress configure compile @if ! test -e installed.stamp ; then \ echo "\t[$(PACKAGE)] installation"; \ - echo "cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libydiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - echo "cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ - echo "chmod +x $(LIBPATH)/lib/libydiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libydiago.a ;\ - cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/ ;\ - chmod +x $(LIBPATH)/lib/libydiago.a ; \ - touch ${compdir}/config/stamps_and_lists/libydiago.a.stamp;\ - echo ydiago_interface >> ${compdir}/src/bse/modules.list;\ + echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ + echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ + echo "chmod +x $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ + cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a ;\ + cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/ ;\ + chmod +x $(LIBPATH)/lib/libldiago.a ; \ + touch ${compdir}/config/stamps_and_lists/libldiago.a.stamp;\ + echo ldiago_interface >> ${compdir}/src/bse/modules.list;\ touch installed.stamp;\ fi # diff --git a/lib/ydiago/make_ydiago.inc.in b/lib/ldiago/make_ldiago.inc.in similarity index 88% rename from lib/ydiago/make_ydiago.inc.in rename to lib/ldiago/make_ldiago.inc.in index 9df1c17724..135562bae1 100644 --- a/lib/ydiago/make_ydiago.inc.in +++ b/lib/ldiago/make_ldiago.inc.in @@ -5,7 +5,7 @@ # # Authors (see AUTHORS file for details): DS -# make.inc from Ydiago repository +# make.inc from Ldiago repository CC = @CC@ FC = @FC@ @@ -13,7 +13,7 @@ AR = @AR@ CPP = @CPP@ CFLAGS = -O3 #@CFLAGS@ #-g -fsanitize=address -fno-omit-frame-pointer -YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @ydiago_opt@ +YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @ldiago_opt@ ELPA_INC = @ELPA_INCS@ @LIBCUDA_INCS@ @GPU_INCS@ @LIBROCM_INCS@ # @@ -60,6 +60,6 @@ RANLIB = echo # libraries # -#LIBS = $(extlibs_prefix)/$(fc_kind)/$(f90)/$(ydiago_gpu_support)/lib/libydiago.a -LIBS = ./libydiago.a +#LIBS = $(extlibs_prefix)/$(fc_kind)/$(f90)/$(ldiago_gpu_support)/lib/libldiago.a +LIBS = ./libldiago.a IFLAGS = -I./ -I../ -I../include diff --git a/sbin/compilation/libraries.sh b/sbin/compilation/libraries.sh index 30db21d6dd..c68584aa79 100755 --- a/sbin/compilation/libraries.sh +++ b/sbin/compilation/libraries.sh @@ -17,7 +17,7 @@ do done # llocal="-lqe_pseudo -lmath77 -lslatec -llocal" -lPLA="\$(lydiago) \$(lelpa) \$(lscalapack) \$(lblacs) \$(lmagma) \$(llapack) \$(lblas)" +lPLA="\$(lldiago) \$(lelpa) \$(lscalapack) \$(lblacs) \$(lmagma) \$(llapack) \$(lblas)" lSL="\$(lslepc) \$(lpetsc)" lIO="\$(liotk) \$(lnetcdff) \$(lnetcdf) \$(lhdf5)" lextlibs="\$(llibxc) \$(lfft) \$(lfutile) \$(lyaml) \$(ldevxlib) \$(llapack) \$(lblas) \$(lcudalib)" diff --git a/src/bse/.objects b/src/bse/.objects index 0dba187efd..f893ee6ced 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -12,12 +12,12 @@ objs = K_blocks.o K_driver_init.o K_dipoles.o K_IP.o K_IP_sort.o \ K_Transitions_setup.o K_Transition_check.o \ K_driver.o BSE_utilities.o K_WF_phases.o \ K_fill_block_cyclic.o \ - YDIAGO_driver.o \ + LDIAGO_driver.o \ K_kernel.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_exchange_kernel.o \ K_restart.o K_solvers.o K_Haydock.o K_Haydock_response.o K_Haydock_gather.o K_Haydock_scatter.o K_screened_interaction.o \ K_inversion_do_it_full.o EPS_via_perturbative_inversion.o \ - K_inversion_driver.o K_diagonal.o K_inversion_Lo.o K_inversion_restart.o K_inversion_engine.o \ + K_diagonal.o K_inversion_driver.o K_inversion_Lo.o K_inversion_restart.o K_inversion_engine.o \ K_diago_driver.o K_diago_left_residuals.o K_diago_right_residuals.o K_diago_overlap_matrix.o \ K_diago_perturbative.o K_diago_response_functions.o K_eps_interpolate.o \ K_observables.o K_multiply_by_V.o K_multiply_by_V_transpose.o K_dot_product.o K_components_folded_in_serial_arrays.o \ diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index fca1371b0b..492bc00bb3 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -53,5 +53,5 @@ K_stored_in_a_slepc_matrix.o PL_diago_residual.o PL_via_perturbative_inversion.o - YDIAGO_driver.o + LDIAGO_driver.o diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index d1fe953344..cb3e05e9c2 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -29,14 +29,14 @@ subroutine K_diago_driver(iq,W,X_static) & BS_res_ares_n_mat,l_BS_optics,l_BS_dichroism,l_BS_ares_from_res !,BS_Blocks_symmetrize_K,& use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize,BSS_n_eig_Input, & & BSS_write_eig_2_db,BSS_eh_W,BSS_n_eig,BS_E,BSS_slepc_pseudo_herm,write_bs_ev_par,& -& BSS_ydiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition +& BSS_ldiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition use X_m, ONLY:X_t,X_OUTPUT_driver use electrons, ONLY:n_sp_pol,n_spinor use frequency, ONLY:w_samp use com, ONLY:isec use LIVE_t, ONLY:live_timing use linear_algebra, ONLY:DIAGO - use interfaces, ONLY:K_diago_response_functions,LINEAR_ALGEBRA_driver,YDIAGO_driver,& + use interfaces, ONLY:K_diago_response_functions,LINEAR_ALGEBRA_driver,LDIAGO_driver,& & PL_diago_residual,K_diago_L_res,K_diago_R_res,& & K_diago_perturbative, K_stored_in_a_big_matrix use IO_int, ONLY:io_control @@ -73,10 +73,10 @@ subroutine K_diago_driver(iq,W,X_static) ! integer :: i_BS_mat,BSS_n_eig_before_solver, BS_mat_dim, neigs_this_cpu, neig_shift, elpa_solver = 2 logical :: K_is_not_hermitian,l_diago,l_slepc,l_dip_more,l_target_erange,l_neig_input, & - & l_ydiago,l_kerr_lft,l_kerr_rgt,l_abs_res + & l_ldiago,l_kerr_lft,l_kerr_rgt,l_abs_res character(1) :: sec character(10) :: Solver - ! Ydiago varibles + ! Ldiago varibles integer, target :: neigs_range(2) real(SP), target :: eigvals_range(2) ! @@ -128,15 +128,15 @@ subroutine K_diago_driver(iq,W,X_static) ! l_diago = index(BSS_mode,'o')/=0 ! old diago l_slepc = index(BSS_mode,'s')/=0 - l_ydiago = index(BSS_mode,'d')/=0 + l_ldiago = index(BSS_mode,'d')/=0 ! #if defined _NL - if (l_ydiago) then + if (l_ldiago) then ! The issue is present if yambo was configured in single precision ! If the coufingure was done in double precision, the issue is not present ! However, at this stage, it is not possible to know how the user configured yambo - call warning("non-linear optics forces DP compilation and breaks Ydiago library interface in SP") - l_ydiago = .false. + call warning("non-linear optics forces DP compilation and breaks Ldiago library interface in SP") + l_ldiago = .false. l_diago = .true. endif #endif @@ -145,7 +145,7 @@ subroutine K_diago_driver(iq,W,X_static) #if defined _SLEPC && !defined _NL if(l_slepc) Solver="Slepc" #endif - if(l_ydiago) Solver="Ydiago" + if(l_ldiago) Solver="Ldiago" ! call timing(trim(Solver)//' Solver',OPR='start') ! @@ -239,7 +239,7 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Allocation (BS_E_real or BS_V) !=============================== - if (.not. l_ydiago) call local_alloc("V") + if (.not. l_ldiago) call local_alloc("V") ! if (io_err<0) then ! @@ -249,15 +249,15 @@ subroutine K_diago_driver(iq,W,X_static) ! if (K_is_not_hermitian) then ! - if (l_ydiago) then + if (l_ldiago) then ! BS_V_left are only referenced in non-hermitian case ! In coupling case, if the user requested n values, ! we compute the first min(n/2,BS_H_dim/2) positive and ! min(n/2,BS_ham/2) negative eigvals and eigvectors, making it a total of min(n,BS_ham) - call YDIAGO_driver(i_BS_mat, BS_E, BS_V_right, neigs_this_cpu, neig_shift, & + call LDIAGO_driver(i_BS_mat, BS_E, BS_V_right, neigs_this_cpu, neig_shift, & & neigs_range=neigs_range, eigvals_range=eigvals_range, & & BS_VL=BS_V_left,BS_overlap=BS_overlap, & - & solver_type=BSS_ydiago_solver, elpasolver=elpa_solver) + & solver_type=BSS_ldiago_solver, elpasolver=elpa_solver) BSS_n_eig = size(BS_E) endif ! @@ -278,10 +278,10 @@ subroutine K_diago_driver(iq,W,X_static) ! else ! - if (l_ydiago) then - call YDIAGO_driver(i_BS_mat, BS_E, BS_V_right, neigs_this_cpu, neig_shift, & + if (l_ldiago) then + call LDIAGO_driver(i_BS_mat, BS_E, BS_V_right, neigs_this_cpu, neig_shift, & & neigs_range=neigs_range, eigvals_range=eigvals_range, & -& solver_type=BSS_ydiago_solver, elpasolver=elpa_solver) +& solver_type=BSS_ldiago_solver, elpasolver=elpa_solver) BSS_n_eig = size(BS_E) endif ! @@ -314,9 +314,9 @@ subroutine K_diago_driver(iq,W,X_static) ! if (l_diago) call live_timing( ) ! - if (l_ydiago) then - ! BSS_n_eig could be lowered by YDIAGO_driver - if (BSS_n_eig_before_solver>BSS_n_eig) call K_ydiago_resize_variables() + if (l_ldiago) then + ! BSS_n_eig could be lowered by LDIAGO_driver + if (BSS_n_eig_before_solver>BSS_n_eig) call K_ldiago_resize_variables() endif ! ! Compute residuals @@ -351,8 +351,8 @@ subroutine K_diago_driver(iq,W,X_static) ! Left residuals needs to be computed only if the kernel is not hermitian if (K_is_not_hermitian) then ! - ! In the ydiago solver, the BS_overlap is an identity matrix. - if (.not.l_ydiago) call K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) + ! In the ldiago solver, the BS_overlap is an identity matrix. + if (.not.l_ldiago) call K_diago_overlap_matrix(BS_V_left,BS_V_right,BS_overlap) ! ! Left residuals if(l_abs_res) then @@ -382,7 +382,7 @@ subroutine K_diago_driver(iq,W,X_static) ! ! DS: this also should be changed according to the general structure if(l_BS_photolum) then - if (l_ydiago) call error("PL not implemented in Ydiago solver") + if (l_ldiago) call error("PL not implemented in Ldiago solver") if (K_is_not_hermitian) then call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) else @@ -418,10 +418,10 @@ subroutine K_diago_driver(iq,W,X_static) call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL,& - & BS_mat=BS_V_right,write_ev=.not.l_ydiago) + & BS_mat=BS_V_right,write_ev=.not.l_ldiago) ! call PP_wait() - if (l_ydiago .and. BSS_write_eig_2_db) call write_bs_ev_par(iq, i_BS_mat, BS_V_right, BS_V_left) + if (l_ldiago .and. BSS_write_eig_2_db) call write_bs_ev_par(iq, i_BS_mat, BS_V_right, BS_V_left) endif ! YAMBO_FREE(BS_E) @@ -521,7 +521,7 @@ subroutine local_free() end subroutine local_free ! ! - subroutine K_ydiago_resize_variables() + subroutine K_ldiago_resize_variables() ! ! We need to realloc as sizes can change. if(allocated(BS_corrections)) call BSS_resize(BS_corrections) @@ -537,7 +537,7 @@ subroutine K_ydiago_resize_variables() if(associated(BS_R_right_magn)) call BSS_resize(BS_R_right_magn) if(associated(BS_R_PL) ) call BSS_resize(BS_R_PL) ! - end subroutine K_ydiago_resize_variables + end subroutine K_ldiago_resize_variables ! #if defined _SLEPC && !defined _NL ! @@ -597,28 +597,28 @@ subroutine K_local_init() call warning('Preconditioning not supported in pseudo-hermitian case. Switching to non-hermitian diagonalization') endif ! - if (l_ydiago) then + if (l_ldiago) then ! - if (BSS_ydiago_solver/="s" .and. BSS_ydiago_solver/="e") then - call warning("Invalid ydiago solver. Switching to default") + if (BSS_ldiago_solver/="s" .and. BSS_ldiago_solver/="e") then + call warning("Invalid ldiago solver. Switching to default") #if defined _ELPA - BSS_ydiago_solver="e" + BSS_ldiago_solver="e" #else - BSS_ydiago_solver="s" + BSS_ldiago_solver="s" #endif endif ! #if defined _GPU && defined _ELPA - if (BSS_ydiago_solver=="s") then + if (BSS_ldiago_solver=="s") then call warning("gpu ported code. Switching to Elpa solver") - BSS_ydiago_solver="e" + BSS_ldiago_solver="e" endif #endif ! #if !defined _ELPA - if (BSS_ydiago_solver=="e") then + if (BSS_ldiago_solver=="e") then call warning("Elpa solver selected, but elpa not linked. Switching to scalapack") - BSS_ydiago_solver="s" + BSS_ldiago_solver="s" endif #endif ! @@ -627,33 +627,33 @@ subroutine K_local_init() ! Here I double the number of n_eig to get correct allocations if (l_neig_input .and. K_is_not_hermitian) BSS_n_eig=BSS_n_eig*2 ! - if (l_target_erange .and. BSS_ydiago_solver=="e") then + if (l_target_erange .and. BSS_ldiago_solver=="e") then #if defined _GPU && defined _ELPA call warning(' energy range not compatible with elpa. Switching it off on gpu') l_target_erange=.false. #else call warning(' energy range not compatible with elpa. Switching to scalapack on cpu') - BSS_ydiago_solver="s" + BSS_ldiago_solver="s" #endif endif ! - if (BSS_first_eig>1 .and. BSS_ydiago_solver=="e") then + if (BSS_first_eig>1 .and. BSS_ldiago_solver=="e") then #if defined _GPU && defined _ELPA call warning(' eigenvalues range not compatible with elpa. Switching it off on gpu') BSS_first_eig=1 #else call warning(' eigenvalues range not compatible with elpa. Switching to scalapack on cpu') - BSS_ydiago_solver="s" + BSS_ldiago_solver="s" #endif endif ! - if (l_neig_input .and. BSS_ydiago_solver=="e" .and. K_is_not_hermitian) then + if (l_neig_input .and. BSS_ldiago_solver=="e" .and. K_is_not_hermitian) then #if defined _GPU && defined _ELPA call warning(' Few eigenvalues not compatible with non hermitian elpa. Switching it off on gpu') l_neig_input=.false. #else call warning(' Few eigenvalues not compatible with non hermitian elpa. Switching to scalapack on cpu') - BSS_ydiago_solver="s" + BSS_ldiago_solver="s" #endif endif ! @@ -685,10 +685,10 @@ subroutine BSS_n_eig_init() ! if(l_diago) BSS_n_eig = BS_mat_dim ! - ! set a Ydiago defaults. - if(l_ydiago) then + ! set a Ldiago defaults. + if(l_ldiago) then ! - ! In case of ydiago, BSS_n_eig will be overwritten after the solver is called + ! In case of ldiago, BSS_n_eig will be overwritten after the solver is called if( BSS_n_eig==0 ) BSS_n_eig = BS_mat_dim ! neigs_range = 0 @@ -708,7 +708,7 @@ subroutine BSS_n_eig_init() eigvals_range= BSS_trange_E ! The following is a good idea but it is the source of many fails in the ! test-suite. Commenting it for now - !else if (BSS_ydiago_solver=="s") then + !else if (BSS_ldiago_solver=="s") then ! ! with scalapack use the energy range needed by default ! neigs_range = 0 ! eigvals_range= BSS_er @@ -722,7 +722,7 @@ subroutine BSS_n_eig_init() neig_shift = 0 neigs_this_cpu = BSS_n_eig ! - ! These will be changed by the YDIAGO_driver routine + ! These will be changed by the LDIAGO_driver routine ! each cpu contains eigen-vectors from [neig_shift + 1, neigs_this_cpu + neig_shift] ! end subroutine BSS_n_eig_init diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index 629ae5dbcd..8380490215 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -38,7 +38,7 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & complex(SP), pointer, optional, intent(in) :: BS_Overlap(:,:) ! ! If BS_Overlap is null(), then it is treated as a identity matrix - ! Incase Ydiago solver is used, BS_Overlap is always null() + ! Incase Ldiago solver is used, BS_Overlap is always null() ! ! Workspace ! @@ -130,7 +130,7 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & ! call live_timing() ! - ! Incase of Ydiago solver Overlap is always identity. + ! Incase of Ldiago solver Overlap is always identity. ! if (trim(scheme)=="hermitian") return ! diff --git a/src/bse/K_diago_perturbative.F b/src/bse/K_diago_perturbative.F index e2f524a991..77f3c9ae36 100644 --- a/src/bse/K_diago_perturbative.F +++ b/src/bse/K_diago_perturbative.F @@ -104,7 +104,7 @@ subroutine K_diago_perturbative(pert_dim, what, i_BS_mat, & ! if (BS_K_coupling .and. associated(BS_Overlap)) then ! - ! NM : If you use Ydiago solver, you should never see this because, Ydiago outputs + ! NM : If you use Ldiago solver, you should never see this because, Ldiago outputs ! left and right eigenvectors with overlap = null() i.e identity. call error(" BS pertubative residuals not implemented in case of Overlap matrix") endif diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 0ace8836ab..07e7235859 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -13,7 +13,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode use stderr, ONLY:STRING_match,STRING_split - use BS_solvers, ONLY:BSS_mode,BSS_slepc_matrix_format,BSS_uses_DbGd,BSS_uses_FKE,BSS_ydiago_solver,& + use BS_solvers, ONLY:BSS_mode,BSS_slepc_matrix_format,BSS_uses_DbGd,BSS_uses_FKE,BSS_ldiago_solver,& & BSS_slepc_pseudo_herm,BSS_slepc_double_grp,run_Slepc,BSS_mode,BSS_first_eig,& & l_abs_prop_chi_bse,l_eels_can_be_computed,l_eels_from_inversion,& & BSS_kernel_IO_on_the_fly,BSS_kernel_stored_size,BSS_slepc_approach @@ -280,7 +280,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) endif ! #if defined _ELPA - if ( index(BSS_mode,'d')/=0 .and. BSS_ydiago_solver=='e' .and. BSS_first_eig>1) then + if ( index(BSS_mode,'d')/=0 .and. BSS_ldiago_solver=='e' .and. BSS_first_eig>1) then call warning('ELPA does not support BSS_First_eig>1') BSS_first_eig=1 endif diff --git a/src/bse/K_fill_block_cyclic.F b/src/bse/K_fill_block_cyclic.F index 8946339b97..155c368145 100644 --- a/src/bse/K_fill_block_cyclic.F +++ b/src/bse/K_fill_block_cyclic.F @@ -19,7 +19,7 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) use gpu_m, ONLY:have_cuda ! !use, intrinsic :: iso_c_binding, only: c_ptr - use ydiago_interface + use ldiago_interface ! implicit none ! diff --git a/src/bse/YDIAGO_driver.F b/src/bse/LDIAGO_driver.F similarity index 99% rename from src/bse/YDIAGO_driver.F rename to src/bse/LDIAGO_driver.F index ad7d437c5f..32714d727c 100644 --- a/src/bse/YDIAGO_driver.F +++ b/src/bse/LDIAGO_driver.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): NM ! -subroutine YDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & +subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & & neigs_this_cpu, neig_shift, neigs_range, eigvals_range, & & BS_VL, BS_overlap, solver_type, elpasolver) ! @@ -30,7 +30,7 @@ subroutine YDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & use openmp, ONLY:n_threads_K use LIVE_t, ONLY:live_timing use com, ONLY:msg - use ydiago_interface + use ldiago_interface ! implicit none ! @@ -421,4 +421,4 @@ subroutine YDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & neigs_this_cpu = evec_fac*neigs_this_cpu neig_shift = evec_fac*neig_shift ! -end subroutine YDIAGO_driver +end subroutine LDIAGO_driver diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index f48e80f730..390a1250f8 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -285,7 +285,7 @@ subroutine INIT_activate() ! if (index(BSS_mode,'i')/=0) call initactivate(1,'BSSInvMode BSEPSInvTrs BSSInvPFratio BSSInvKdiag') if (index(BSS_mode,'d')/=0.or.index(BSS_mode,'s')/=0.or.index(BSS_mode,'o')/=0) call initactivate(1,'WRbsWF BSSPertWidth') - if (index(BSS_mode,'d')/=0) call initactivate(1,'BSSydiaLib BSSNEig BSSEnRange BSSFirstEig') + if (index(BSS_mode,'d')/=0) call initactivate(1,'BSSldiaLib BSSNEig BSSEnRange BSSFirstEig') if (index(BSS_mode,'h')/=0) call initactivate(1,'BSHayTrs BSHayTer BSHayItrIO BSHayItrMAX') if (index(BSS_mode,'s')/=0) then call initactivate(1,'BSSNEig BSSEnTarget BSSSlepcApproach BSSSlepcPrecondition BSSSlepcExtraction') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 7eb459ee21..a47128953f 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -36,7 +36,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,& & BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& -& BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig_Input,BSS_first_eig,Haydock_iterMAX,BSS_ydiago_solver +& BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig_Input,BSS_first_eig,Haydock_iterMAX,BSS_ldiago_solver #if defined _SLEPC && !defined _NL use BS_solvers, ONLY:BSS_slepc_extraction,BSS_slepc_ncv,BSS_slepc_tol,BSS_slepc_maxit,& & BSS_slepc_precondition,BSS_slepc_approach,BSS_slepc_mpd,BSS_slepc_matrix_format @@ -310,7 +310,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt',BSE_prop) call it(defs,'BSEdips', '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry) - call it(defs,'BSSydiaLib','[BSS] Library used with ydiago solver `(s)calapack/(e)lpa`',BSS_ydiago_solver) + call it(defs,'BSSldiaLib','[BSS] Library used with ldiago solver `(s)calapack/(e)lpa`',BSS_ldiago_solver) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',& & K_INV_EPS%PERT_FULL_ratio) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index e058ab9994..6ca883fb89 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -47,7 +47,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use BS_solvers, ONLY:BSS_mode,BSS_n_freqs,BSS_er,BSS_dr,BSS_P_dir,BSS_E_dir,BSS_Q_dir,BSS_first_eig,& & Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,BSS_n_eig,BSS_n_eig_Input,& & BSS_damp_reference,BSS_Vnl_included,BSS_uses_GreenF,BSS_inversion_mode,BSS_target_E,& -& BSS_perturbative_width,K_INV_EPS,K_INV_PL,K_INV_PI_PH,BSS_desc,BSS_ydiago_solver,BSS_trange_E,& +& BSS_perturbative_width,K_INV_EPS,K_INV_PL,K_INV_PI_PH,BSS_desc,BSS_ldiago_solver,BSS_trange_E,& & BSS_kernel_IO_on_the_fly,BSS_kernel_stored_size,BSS_kernel_last_stored_block use descriptors,ONLY:IO_desc_reset #if defined _SLEPC && !defined _NL @@ -439,9 +439,9 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) BS_K_cutoff=0.0000_SP BSS_mode=' ' BSS_inversion_mode='pf' - BSS_ydiago_solver='s' + BSS_ldiago_solver='s' #if defined _ELPA - BSS_ydiago_solver='e' + BSS_ldiago_solver='e' #endif BSS_er=(/0._SP,10._SP/)/HA2EV BSS_dr=0.1_SP/HA2EV diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index cbc83da0ff..a73227ba6d 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -54,11 +54,11 @@ module BS_solvers character(schlen):: BSS_mode complex(SP) :: BSS_Wd integer :: BSS_n_freqs - integer :: BSS_n_eig ! number of eigenvalues to find. Ydiago/Slepc - integer :: BSS_n_eig_Input ! number of eigenvalues requested in input. Ydiago/Slepc - integer :: BSS_first_eig ! index of the first eigenvalue to find. Ydiago + integer :: BSS_n_eig ! number of eigenvalues to find. Ldiago/Slepc + integer :: BSS_n_eig_Input ! number of eigenvalues requested in input. Ldiago/Slepc + integer :: BSS_first_eig ! index of the first eigenvalue to find. Ldiago real(SP) :: BSS_target_E ! find eigenvalues close to this energy. Slepc - real(SP) :: BSS_trange_E(2) ! find eigenvalues in this energy range. Ydiago + real(SP) :: BSS_trange_E(2) ! find eigenvalues in this energy range. Ldiago real(SP) :: BSS_er(2) real(SP) :: BSS_dr(2) real(SP) :: BSS_damp_reference @@ -85,7 +85,7 @@ module BS_solvers ! Solvers (Diago) !========= logical :: BSS_write_eig_2_db - character(1) :: BSS_ydiago_solver ! "s" for scalapack / "e" for elpa + character(1) :: BSS_ldiago_solver ! "s" for scalapack / "e" for elpa ! ! Solvers (Haydock) !========= diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index ab7711bc68..2eca6de2fd 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -111,7 +111,7 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,M,M_slk,M_bse,B,B_slk,C,C_slk,V_ ! end subroutine ! - subroutine YDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & + subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & & neigs_this_cpu, neig_shift, neigs_range, eigvals_range, & & BS_VL, BS_overlap, solver_type, elpasolver) use pars, ONLY:SP @@ -127,7 +127,7 @@ subroutine YDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & character, optional :: solver_type integer, optional :: elpasolver complex(SP),pointer,optional :: BS_overlap(:,:) - end subroutine YDIAGO_driver + end subroutine LDIAGO_driver subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) use pars, ONLY:SP From e8e8dcaa5dbd975a7516d47c4c41689f4c85aa00 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 25 May 2025 23:14:16 +0200 Subject: [PATCH 0987/1367] Deleted unused file --- vscode_yambo.md | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 vscode_yambo.md diff --git a/vscode_yambo.md b/vscode_yambo.md deleted file mode 100644 index 188aaded0e..0000000000 --- a/vscode_yambo.md +++ /dev/null @@ -1,28 +0,0 @@ -# Recommended Extensions -`Modern Fortran`, `CodeLLDB`, `GDB`, `Better Comments`, `fprettify`. - -You have to compile fortls via `pipx` or `python pip`. Subsequently, you might have to specify in `Modern Fortran`'s settings the `Fortran : fortls PATH` (run `which fortls`). - -## GDB-based Fortran debugging - -Make sure you have `gdb`. - -You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` - -You must compile yambo with debug flags `CFLAGS="-g -O0" FFLAGS="-g -O0"` - -Enable debugging from VS code with: -- Breakpoints -- Step-by-step execution -- Variable insepction -- GDB support - -### How to Use Debugger in VS code -1) Open the yambo folder in VS code -2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test -3) Edit the `.vsocde/launch.json` file accordingly -4) press F5 for `Run & Debug` -5) `Debug Yambo` from the dropdown -6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). -7) On the debug menu choose your breakpoints. -8) Click run \ No newline at end of file From 2415422a6a1f493d6150af8398f61c025fcbb6de Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 May 2025 15:05:15 +0200 Subject: [PATCH 0988/1367] Fixed WehCpl input file generation for tdhf case --- src/interface/INIT_activate.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index e343f37654..f48bc0c7e6 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -223,8 +223,8 @@ subroutine INIT_activate() call initactivate(1,'BSENGexx ALLGexx') call initactivate(1,'Qdirection QShiftOrder') ! - if(l_td_hf.or.l_td_sex) call initactivate(1,'BSENGBlk') - if(l_td_sex) call initactivate(1,'WehDiag WehCpl') + if(l_td_hf.or.l_td_sex) call initactivate(1,'BSENGBlk WehCpl') + if(l_td_sex) call initactivate(1,'WehDiag') if(l_alda_fxc) then call initactivate(1,'BSENGfxc FxcLibxc FxcMode UseNLCC') if( (WF_exx_fraction>0.) .or. (WF_exx_screening>0.) ) call initactivate(1,'BSENGBlk WehDiag WehCpl') From d00c5a2577d56a6f0b743af4d1abd64b096bb91d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 May 2025 17:50:33 +0200 Subject: [PATCH 0989/1367] Fixed bug in real time dephasing. Bug was introduced by adding spin polarization --- src/real_time_propagation/RT_Dephasing_step.F | 10 +++++----- src/real_time_propagation/RT_Integrator.F | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/real_time_propagation/RT_Dephasing_step.F b/src/real_time_propagation/RT_Dephasing_step.F index 6e105c86f2..0c6643005e 100644 --- a/src/real_time_propagation/RT_Dephasing_step.F +++ b/src/real_time_propagation/RT_Dephasing_step.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS AM ! -subroutine RT_Dephasing_step(dG_out,dG_in,ik,deltaT) +subroutine RT_Dephasing_step(dG_out,dG_in,ik,i_sp,deltaT) ! use pars, ONLY:SP use real_time, ONLY:RT_is_statically_dephased,RT_Deph_Matrix,RT_deph_range,& @@ -13,10 +13,10 @@ subroutine RT_Dephasing_step(dG_out,dG_in,ik,deltaT) ! implicit none ! - complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - integer, intent(in) :: ik - real(SP), intent(in) :: deltaT + complex(SP), intent(inout) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + integer, intent(in) :: ik,i_sp + real(SP), intent(in) :: deltaT ! ! Note that dG_in is ONLY the coherent part of the equation. It must be added ! to dG_out if we are not using the EXP integrator. This is done here or in RT_apply_RWA diff --git a/src/real_time_propagation/RT_Integrator.F b/src/real_time_propagation/RT_Integrator.F index 65c1b34069..d9ea54607e 100644 --- a/src/real_time_propagation/RT_Integrator.F +++ b/src/real_time_propagation/RT_Integrator.F @@ -35,7 +35,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! G(t),H[G(t)],dt/2 --> G1(t+dt/2) ! G(t),H[G1(t+dt/2)],dt/2 --> G2(t+dt/2) ! G(t),H[G2(t+dt/2)),dt --> G3(t+dt) - ! G(t),H[G3(t+dt)),dtcccc --> G4(t+dt) + ! G(t),H[G3(t+dt)),dt --> G4(t+dt) ! G(t+dt)=G1(t+dt)/6+G2(t+dt)/3+G3(t+dt)/3+G2(t+dt)/6 ! ! In addition the IP oscillations and dephasing are "analytically integrated out" From 757aef6727699b19f54230f335edc71d9eda95e8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 May 2025 20:02:01 +0200 Subject: [PATCH 0990/1367] Configure re-generated after merge --- configure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure b/configure index c029800cc1..5d309056e0 100755 --- a/configure +++ b/configure @@ -730,6 +730,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check internal_magma compile_magma_fmodules @@ -954,6 +955,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -1013,6 +1016,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1778,6 +1782,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3559,6 +3564,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -17137,6 +17156,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -17348,6 +17370,7 @@ fi + # From 3841843878b47298c5f7aff5c68b1a64e2ba47be Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 May 2025 20:04:00 +0200 Subject: [PATCH 0991/1367] get_libraries.c indentation fixed for GAMMA_ONLY line --- src/driver/get_libraries.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/driver/get_libraries.c b/src/driver/get_libraries.c index 86fc2f0992..ddc861e158 100644 --- a/src/driver/get_libraries.c +++ b/src/driver/get_libraries.c @@ -24,8 +24,8 @@ char *running_libraries() strcpy(strings[i_str], "Serial"); #endif #if defined _GAMMA_ONLY - i_str++; - strcpy(strings[i_str], "GAMMA_ONLY"); + i_str++; + strcpy(strings[i_str], "GAMMA_ONLY"); #endif #if defined _GPU i_str++; From 7689465e0c2fc47be3e57d718b5f3c24f59b7aa9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 27 May 2025 20:06:32 +0200 Subject: [PATCH 0992/1367] Removed tab characters --- src/xc_functionals/XC_libxc_driver.F | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 72990d4f9a..314a37508a 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -277,15 +277,15 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) endif case(2) if( l_BS_magnons .or. n_spinor==2 ) then - ! This is needed by XC_eval_lda_kernel to construct F_xc for magnons with n_sp_pol=2 + ! This is needed by XC_eval_lda_kernel to construct F_xc for magnons with n_sp_pol=2 call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) ! V_xc is needed for F_xc_mat in Build_Fxc_mat.F with n_spinor=2, - ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, + ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, ! avoiding the call to XC_eval_lda_kernel ! Howerver but the latter is more precise, since it works with DP quantities forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - ! Needed to build Fxc unless in magnons case with n_sp_pol==2 + ! Needed to build Fxc unless in magnons case with n_sp_pol==2 if( .not.( l_BS_magnons.and.n_sp_pol==2) ) & & call xc_f03_lda_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v2rho2(1,1)) ! Yambo internal for Kxc @@ -319,18 +319,18 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) case(2) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) call error(' Fxc not coded for GAU-PBEP') if( l_BS_magnons .or. n_spinor==2 ) then - ! This is in needed by XC_eval_gga_kernel to construct F_xc for magnons with n_sp_pol=2 - ! For now only v1rho is used by XC_eval_lda_kernel + ! This is in needed by XC_eval_gga_kernel to construct F_xc for magnons with n_sp_pol=2 + ! For now only v1rho is used by XC_eval_lda_kernel call xc_f03_gga_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v1rho(1,1), v1sigma(1,1)) ! V_xc is needed for F_xc_mat in Build_Fxc_mat.F with n_spinor=2, - ! However the GGA potential does not give good results, so below I use the LDA expression - ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, + ! However the GGA potential does not give good results, so below I use the LDA expression + ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, ! avoiding the call to XC_eval_gga_kernel ! Howerver but the latter is more precise, since it works with DP quantities !call XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif - ! Needed to build Fxc unless in magnons case with n_sp_pol==2 + ! Needed to build Fxc unless in magnons case with n_sp_pol==2 if( .not.(l_BS_magnons.and.n_sp_pol==2) ) & & call xc_f03_gga_fxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), sigma(1,1), v2rho2(1,1), v2rhosigma(1,1), v2sigma2(1,1)) ! Yambo internal for Kxc (for now it is just a wrapperr to lda_kernel) From 471e88c6a61d38133473c8b992c0b3ef267a2efd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 May 2025 09:35:46 +0200 Subject: [PATCH 0993/1367] Fixed mispelled libdiago instead of libldiago --- lib/ldiago/Makefile.loc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldiago/Makefile.loc b/lib/ldiago/Makefile.loc index da1a1719a2..67a1c702f2 100644 --- a/lib/ldiago/Makefile.loc +++ b/lib/ldiago/Makefile.loc @@ -47,7 +47,7 @@ install: uncompress configure compile echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ echo "chmod +x $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a ;\ + cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libldiago.a $(LIBPATH)/lib/ ;\ cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/ ;\ chmod +x $(LIBPATH)/lib/libldiago.a ; \ touch ${compdir}/config/stamps_and_lists/libldiago.a.stamp;\ From fa6fdd3ef1503b7948b481208e34de5dba810040 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 May 2025 13:55:11 +0200 Subject: [PATCH 0994/1367] Previous commit reverted --- lib/ldiago/Makefile.loc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldiago/Makefile.loc b/lib/ldiago/Makefile.loc index 67a1c702f2..da1a1719a2 100644 --- a/lib/ldiago/Makefile.loc +++ b/lib/ldiago/Makefile.loc @@ -47,7 +47,7 @@ install: uncompress configure compile echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ echo "chmod +x $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libldiago.a $(LIBPATH)/lib/ ;\ + cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a ;\ cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/ ;\ chmod +x $(LIBPATH)/lib/libldiago.a ; \ touch ${compdir}/config/stamps_and_lists/libldiago.a.stamp;\ From b969da936bc4e0c53c90879901f48bf048491511 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 May 2025 15:26:01 +0200 Subject: [PATCH 0995/1367] Proper fix for compilation with GPUs. Previous fix was not correct. Reverted --- config/m4/yambo_diago.m4 | 4 ++-- config/m4/yambo_folders.m4 | 7 ++++--- config/mk/local/makefile | 2 +- configure | 11 ++++++----- lib/ldiago/Makefile.loc | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/config/m4/yambo_diago.m4 b/config/m4/yambo_diago.m4 index c3d6aa4e64..162fc69cc0 100644 --- a/config/m4/yambo_diago.m4 +++ b/config/m4/yambo_diago.m4 @@ -21,8 +21,8 @@ else LDIAGO_GPU_SUPPORT="no_gpu" fi -LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" -LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include/" +LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" +LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" #LDIAGO_LIBS="${compdir}/lib/libldiago.a" #LDIAGO_INCS="$IFLAG${compdir}/include/" diff --git a/config/m4/yambo_folders.m4 b/config/m4/yambo_folders.m4 index 0b672c9a8b..80b39b6002 100644 --- a/config/m4/yambo_folders.m4 +++ b/config/m4/yambo_folders.m4 @@ -111,9 +111,10 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; fi # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; diff --git a/config/mk/local/makefile b/config/mk/local/makefile index 99d642fb8e..380c96b00a 100644 --- a/config/mk/local/makefile +++ b/config/mk/local/makefile @@ -24,7 +24,7 @@ include $(compdir)/config/setup # idriver=$(IFLAG)$(includedir)/driver $(IFLAG)$(includedir)/version lf90include=$(IFLAG)$(includedir) $(IFLAG)$(includedir)/headers/common $(IFLAG)$(includedir)/headers/parser $(idriver) -lf90libinclude=$(iiotk) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(imagma) $(ihdf5) $(ilibxc) $(idevxlib) $(icudalib) $(ifft) $(ifutile) $(iyaml) $(idriver) +lf90libinclude=$(iiotk) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(imagma) $(ielpa) $(ildiago) $(ihdf5) $(ilibxc) $(idevxlib) $(icudalib) $(ifft) $(ifutile) $(iyaml) $(idriver) mfiles=find . -maxdepth 1 -name '*.mod' # # OBJECTS diff --git a/configure b/configure index c029800cc1..6a164e1348 100755 --- a/configure +++ b/configure @@ -16647,8 +16647,8 @@ else LDIAGO_GPU_SUPPORT="no_gpu" fi -LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" -LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include/" +LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" +LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" #LDIAGO_LIBS="${compdir}/lib/libldiago.a" #LDIAGO_INCS="$IFLAG${compdir}/include/" @@ -19328,9 +19328,10 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi # -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/lib"; fi -if ! test -d "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${LDIAGO_GPU_SUPPORT}/include"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; fi # if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; diff --git a/lib/ldiago/Makefile.loc b/lib/ldiago/Makefile.loc index da1a1719a2..7545f0528e 100644 --- a/lib/ldiago/Makefile.loc +++ b/lib/ldiago/Makefile.loc @@ -7,7 +7,7 @@ include ../../config/setup include ../archive/package.list # LIBNAME=libldiago.a -LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/$(ldiago_gpu_support) +LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/diago/$(ldiago_gpu_support) #LIBPATH=$(compdir) LIBRARY=$(LIBPATH)/lib/$(LIBNAME) # From 93c951d1b949532a0387d775a0e816331dc43d46 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 May 2025 21:46:12 +0200 Subject: [PATCH 0996/1367] Configure re-generated after merge --- configure | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure b/configure index 6a164e1348..774857a396 100755 --- a/configure +++ b/configure @@ -730,6 +730,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check internal_magma compile_magma_fmodules @@ -954,6 +955,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -1013,6 +1016,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1778,6 +1782,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3559,6 +3564,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -17137,6 +17156,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -17348,6 +17370,7 @@ fi + # From 0bf72ffeb8ac46f2cfec9ddc4d534a08bc2dd1b4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 28 May 2025 23:34:12 +0200 Subject: [PATCH 0997/1367] - Handling of diamagnetic term in the current made uniform between yambo_rt and yambo_nl - A^2 term in the hamiltonian in velocity gauge removed also in yambo_rt --- src/nloptics/NL_current.F | 12 ++++++++--- src/nloptics/NL_driver.F | 5 +++-- .../RT_current_AND_polarization.F | 11 ++++++++-- src/real_time_hamiltonian/RT_apply_field.F | 20 +++++++++---------- .../RT_propagate_fields.F | 9 +++++++-- 5 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index 1d9c5c0d2e..abf6dee2f6 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -21,7 +21,6 @@ subroutine NL_current(k,E,V_input,NL_J) use fields, ONLY:A_ext use X_m, ONLY:global_gauge use DIPOLES, ONLY:DIP_v - use real_time, ONLY:l_velocity_gauge_diam use nl_optics, ONLY:NL_bands,l_use_DIPOLES use QP_m, ONLY:QP_nk use NL_interfaces, ONLY:NL_average_operator @@ -53,16 +52,23 @@ subroutine NL_current(k,E,V_input,NL_J) ! if(trim(global_gauge)=='velocity') then ! + ! The diamagnetic term is needed to obtain a gauge invariant current + ! However the below definition of nel_effect would be exact + ! only in the limit NL_bands(2) --> \infty nel_effect=nel-(NL_bands(1)-1)*spin_occ ! ! Velocity gauge I must use the correct definition of the J operator ! - if(l_velocity_gauge_diam) NL_J(4:6)=NL_J(4:6)+A_ext%vecpot(:)*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) - ! ! In velocity gauge J(1:3) is the full current ! while J(4:6) is the current without the diamagnetic term ! + NL_J(1:3)=NL_J(4:6)+A_ext%vecpot(:)*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) + ! else + ! + ! In length gauge J(1:3) is the berry current + ! while J(4:6) is the dipoles current + ! There is no diamagnetic term here, since A(t)=0 in this gauge ! if(l_use_DIPOLES) then NL_J(1:3)=NL_J(4:6) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index d423d71b14..2efbd06d2b 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -32,7 +32,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) & HF,SEX,NL_bands,NL_nbands,NL_alloc_k_distributed,NL_J_t,n_runs,loop_on_frequencies, & & l_pump_and_probe,eval_OSCLL,l_test_OSCLL,LSEX,LHF,Sigma_SEX_EQ,Wk_EQ use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands, & - eval_DFT,eval_HARTREE,RT_P,RT_ind_J + eval_DFT,eval_HARTREE,RT_P,RT_ind_J,l_velocity_gauge_diam use RT_control, ONLY:RT_NAN_found use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index @@ -336,7 +336,8 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) if (l_pump_and_probe) then ! RT_P =real(NL_P(1:3),SP) - RT_ind_J=real(NL_J(1:3),SP) + if ( l_velocity_gauge_diam) RT_ind_J=real(NL_J(1:3),SP) + if (.not.l_velocity_gauge_diam) RT_ind_J=real(NL_J(4:6),SP) ! ! Carriers number !================ diff --git a/src/real_time_control/RT_current_AND_polarization.F b/src/real_time_control/RT_current_AND_polarization.F index 6d2c25adad..bf0ec25dc9 100644 --- a/src/real_time_control/RT_current_AND_polarization.F +++ b/src/real_time_control/RT_current_AND_polarization.F @@ -23,7 +23,7 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) use units, ONLY:SPEED_OF_LIGHT use R_lattice, ONLY:bz_samp use D_lattice, ONLY:DL_vol - use electrons, ONLY:nel,levels,n_spin,n_sp_pol,Spin_magn,Orbital_magn,Itinerant_magn + use electrons, ONLY:nel,levels,n_spin,n_sp_pol,spin_occ,Spin_magn,Orbital_magn,Itinerant_magn use real_time, ONLY:l_NE_dynamics,RT_ind_J,RT_ind_J_prev,RT_bands,& & RT_P,RT_spin_magn,RT_orbt_magn,RT_P_prev,G_lesser_reference,NE_i_time,& & RT_dyn_step,l_P_integrating_J,l_velocity_gauge_diam,integrator_step @@ -44,6 +44,7 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) ! Work Space ! complex(SP) :: RT_M_tmp(3) + integer :: nel_effect ! if ( .not. l_NE_dynamics ) return ! @@ -64,7 +65,13 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) ! (it will be computed from the current in the velocity gauge) ! The proper value is set in RT_propagate_fields ! - if(l_velocity_gauge_diam) RT_ind_J(:)=RT_ind_J(:)+A_input%vecpot(:)*real(nel,SP)/(2._SP*SPEED_OF_LIGHT) + if(l_velocity_gauge_diam) then + ! The diamagnetic term is needed to obtain a gauge invariant current + ! However the below definition of nel_effect would be exact + ! only in the limit RT_bands(2) --> \infty + nel_effect=nel-(RT_bands(1)-1)*spin_occ + RT_ind_J(:)=RT_ind_J(:)+A_input%vecpot(:)*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) + endif ! RT_ind_J=RT_ind_J/DL_vol ! diff --git a/src/real_time_hamiltonian/RT_apply_field.F b/src/real_time_hamiltonian/RT_apply_field.F index 58877cc590..40e767668a 100644 --- a/src/real_time_hamiltonian/RT_apply_field.F +++ b/src/real_time_hamiltonian/RT_apply_field.F @@ -45,6 +45,15 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Velocity gauge !================ ! + ! The velocity gauge is defined by + ! A= int dt' E(t') + ! V= -1/2 A^2(t) + ! + ! The definition of V is usued to remove the term 1/2A^2 from the Hamiltonian + ! It corresponds to a gauge transformation function + ! Lambda = -1/2 int dt' A^2(t') dt + ! see discussion in sec. 4.A of J. of Optical Society B, 39(2), 535 (2022) + ! A_vec_pot=A_input%vecpot/SPEED_OF_LIGHT ! Gaussian units ! ! Add the vector potential to the singular part of the Self-Energy @@ -63,20 +72,11 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Case b: the pseudo-potential is *not* gauged, so A*v enters the hamiltonian. ! A*v accounts for the linear expansion of the gauge correction to the non local potential if (.not.l_velocity_gauge_corr) Jtot(1:3)= -DIP_v(1:3,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) - ! - if(.not.l_nl_optics) then - ! - ! This term can be set to zero with the freedom of the velocity gauge - ! see discussion in sec. 4.A of J. of Optical Society B, 39(2), 535 (2022) - ! we do not include it in yambo_nl - ! - Jtot(1:3)=Jtot(1:3)+A_vec_pot(1:3)/2._SP - ! - endif ! A_dot_J(1)=sum(A_vec_pot(1:3)* Jtot(1:3) ) A_dot_J(2)=sum(A_vec_pot(1:3)*conjg(Jtot(1:3))) H_nl_sc(i1,i1)=H_nl_sc(i1,i1)-real(A_dot_J(1),SP) + ! enddo !$omp end parallel do ! diff --git a/src/real_time_propagation/RT_propagate_fields.F b/src/real_time_propagation/RT_propagate_fields.F index 3a59969f89..604d9dde27 100644 --- a/src/real_time_propagation/RT_propagate_fields.F +++ b/src/real_time_propagation/RT_propagate_fields.F @@ -24,6 +24,7 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! the induced current is included in the dynamics ( RT_propagate_fields ) ! use pars, ONLY:SP,pi + use electrons, ONLY:spin_occ use units, ONLY:SPEED_OF_LIGHT use electrons, ONLY:levels,nel,n_sp_pol use R_lattice, ONLY:bz_samp @@ -31,7 +32,7 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) use parallel_m, ONLY:PAR_G_k_range use real_time, ONLY:RT_ind_J_prev,RT_ind_J,RT_P_prev,RT_P,RT_dyn_step, & & l_RT_induced_field,Integrator_step,Integrator_nsteps,& -& RT_bands +& RT_bands,l_velocity_gauge_diam use fields, ONLY:gauge_field,A_ind,A_ext,A_vecpot_reset,compute_intensity,compute_envelop ! implicit none @@ -45,6 +46,7 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! ! Work space ! + integer :: nel_effect type(gauge_field) :: A_ind_old type(gauge_field) :: A_ind_new type(gauge_field) :: A_null @@ -99,7 +101,10 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! ! Update the current replacing the null vector potential with the real one ! - RT_ind_J=RT_ind_J+(A_ind_new%vecpot(:)+A_ext%vecpot(:))*real(nel,SP)/(2._SP*SPEED_OF_LIGHT) + if(l_velocity_gauge_diam) then + nel_effect=nel-(RT_bands(1)-1)*spin_occ + RT_ind_J=RT_ind_J+(A_ind_new%vecpot(:)+A_ext%vecpot(:))*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) + endif A_ind_new%vecpot_acc = real(RT_ind_J) *4._SP*pi*SPEED_OF_LIGHT endif ! From 59eae30847a354816788a26c8668771bf29beddf Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 May 2025 00:34:28 +0200 Subject: [PATCH 0998/1367] Fixed fily_sync for parallel I/O of collisions --- src/io_parallel/io_COLLISIONS.F | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 5c6edcaf58..f4a1f08c79 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -36,7 +36,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) ! character(1) :: TMP_VAR(1) character(schlen) :: db_name - integer :: i_coll,stat,COLL_chunksize(3),N(3) + integer :: i_coll,i_coll_mem,stat,COLL_chunksize(3),N(3) logical :: def1,def2,io2,io3,io4,file_sync ! call timing('io_COLLISIONS',OPR='start') @@ -141,13 +141,16 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) endif ! #if defined _RT - ! nf90_sync is performed up to LAST_COLL_sync and at steps of 5% of bse kernel - file_sync= i_coll<=LAST_COLL_sync .and. mod(i_coll,max(1,PAR_COLL_min/20))==0 .and. index(trim(db_name),"HXC")/=0 - !file_sync= .false. - ! - if(write_is_on(ID).and.file_sync.and.io3) then - stat = nf90_sync(io_unit(ID)) - call netcdf_call(stat,ID) + if (write_is_on(ID).and.io3 .and. index(trim(db_name),"HXC")/=0) then + ! nf90_sync is performed up to LAST_COLL_sync and at steps of 5% of bse kernel + i_coll_mem=COLL_grp%PAR_map(i_coll) + file_sync= (i_coll<=LAST_COLL_sync .and. mod(i_coll_mem,max(1,PAR_COLL_min/20))==0) .or. i_coll==LAST_COLL_sync + ! + if(file_sync) then + stat = nf90_sync(io_unit(ID)) + call netcdf_call(stat,ID) + endif + ! endif #endif ! From 0302abd9e9365f1baf89d21327bf12005a8b72f2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 May 2025 00:57:10 +0200 Subject: [PATCH 0999/1367] Fix for issue #164 --- src/io_parallel/io_COLLISIONS.F | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 27acf114e0..aa14e78b56 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -34,7 +34,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! character(1) :: TMP_VAR(1) character(schlen) :: db_name - integer :: i_coll,stat,COLL_chunksize(3) + integer :: i_coll,i_coll_mem,stat,COLL_chunksize(3) logical :: def1,def2,io2,io3,io4,file_sync ! call timing('io_COLLISIONS',OPR='start') @@ -128,12 +128,16 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) endif ! #if defined _RT - ! nf90_sync is performed up to LAST_COLL_sync and at steps of 5% of bse kernel - file_sync= i_coll<=LAST_COLL_sync .and. mod(i_coll,max(1,PAR_COLL_min/20))==0 .and. index(trim(db_name),"HXC")/=0 - ! - if(write_is_on(ID).and.file_sync.and.io3) then - stat = nf90_sync(io_unit(ID)) - call netcdf_call(stat,ID) + if (write_is_on(ID).and.io3 .and. index(trim(db_name),"HXC")/=0) then + ! nf90_sync is performed up to LAST_COLL_sync and at steps of 5% of bse kernel + i_coll_mem=COLL%PAR_map(i_coll) + file_sync= (i_coll<=LAST_COLL_sync .and. mod(i_coll_mem,max(1,PAR_COLL_min/20))==0) .or. i_coll==LAST_COLL_sync + ! + if(file_sync) then + stat = nf90_sync(io_unit(ID)) + call netcdf_call(stat,ID) + endif + ! endif #endif ! From f59c5b766ff9d4c9a6017a4c7cc91c7ad8127f07 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 May 2025 01:13:57 +0200 Subject: [PATCH 1000/1367] Code for collisions sync simplified --- src/collisions/COLLISIONS_HXC.F | 62 +++++++++++++++------------------ src/io_parallel/io_COLLISIONS.F | 12 ++++--- src/modules/mod_collision_ext.F | 1 - 3 files changed, 35 insertions(+), 40 deletions(-) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index dc1490481c..40ff818a67 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -30,7 +30,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_HXC_local,COLLISIONS_HXC_MB,& & COLL_bands,HXC_COLL_element,HXC_collisions,COH_COLL_element,COH_collisions,& -& COLLISIONS_HXC_use_TDDFT,LAST_COLL_sync,PAR_COLL_min,COLLISIONS_CV_only +& COLLISIONS_HXC_use_TDDFT,PAR_COLL_min,COLLISIONS_CV_only use timing_m, ONLY:timing use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc use IO_int, ONLY:io_control,IO_and_Messaging_switch @@ -231,39 +231,33 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) first_coll=-1 last_coll =0 ! - do i_loop=1,2 - if (allocated(HXC_collisions%PAR_IND%element_1D)) then - PAR_NC_local=0 - do i_coll=1,HXC_collisions%N - if (.not.HXC_collisions%PAR_IND%element_1D(i_coll)) cycle - last_coll=i_coll - if (allocated(HXC_collisions%IO_status)) then - if (HXC_collisions%IO_status(i_coll)/=-1) cycle - endif - if (first_coll==-1) first_coll=i_coll - PAR_NC_local=PAR_NC_local+1 - if (i_loop==2.and.PAR_NC_local<=PAR_COLL_min) LAST_COLL_sync=i_coll - enddo - else if (allocated(COH_collisions%PAR_IND%element_1D)) then - PAR_NC_local=0 - do i_coll=1,COH_collisions%N - if (.not.COH_collisions%PAR_IND%element_1D(i_coll)) cycle - last_coll=i_coll - if (allocated(COH_collisions%IO_status)) then - if (COH_collisions%IO_status(i_coll)/=-1) cycle - endif - if (first_coll==-1) first_coll=i_coll - PAR_NC_local=PAR_NC_local+1 - if (i_loop==2.and.PAR_NC_local<=PAR_COLL_min) LAST_COLL_sync=i_coll - enddo - endif - if(i_loop==1) then - TMP_VEC=0 - TMP_VEC(myid+1)=PAR_NC_local - call PP_redux_wait(TMP_VEC) - PAR_COLL_min=minval(TMP_VEC) - endif - enddo + if (allocated(HXC_collisions%PAR_IND%element_1D)) then + PAR_NC_local=0 + do i_coll=1,HXC_collisions%N + if (.not.HXC_collisions%PAR_IND%element_1D(i_coll)) cycle + last_coll=i_coll + if (allocated(HXC_collisions%IO_status)) then + if (HXC_collisions%IO_status(i_coll)/=-1) cycle + endif + if (first_coll==-1) first_coll=i_coll + PAR_NC_local=PAR_NC_local+1 + enddo + else if (allocated(COH_collisions%PAR_IND%element_1D)) then + PAR_NC_local=0 + do i_coll=1,COH_collisions%N + if (.not.COH_collisions%PAR_IND%element_1D(i_coll)) cycle + last_coll=i_coll + if (allocated(COH_collisions%IO_status)) then + if (COH_collisions%IO_status(i_coll)/=-1) cycle + endif + if (first_coll==-1) first_coll=i_coll + PAR_NC_local=PAR_NC_local+1 + enddo + endif + TMP_VEC=0 + TMP_VEC(myid+1)=PAR_NC_local + call PP_redux_wait(TMP_VEC) + PAR_COLL_min=minval(TMP_VEC) ! n_steps=0 if (COLLISIONS_HXC_local) n_steps=n_steps+PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements*n_sp_pol diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index f4a1f08c79..f5cb47582f 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -10,7 +10,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) use pars, ONLY:schlen,IP,SP,DP,IP_YIO,CR_YIO use parallel_m, ONLY:master_cpu use iso_c_binding, ONLY:C_LOC,C_F_POINTER - use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,LAST_COLL_sync,PAR_COLL_min,& + use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,PAR_COLL_min,& & COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP use IO_m, ONLY:io_sec,io_status,IO_OUTDATED_DB,read_is_on,IO_mode,io_unit,& & VERIFY,io_extension,write_is_on,nf90_sync,netcdf_call,YAMBO_DEF_CHUNK @@ -36,7 +36,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) ! character(1) :: TMP_VAR(1) character(schlen) :: db_name - integer :: i_coll,i_coll_mem,stat,COLL_chunksize(3),N(3) + integer :: i_coll,i_coll_mem,sync_step,stat,COLL_chunksize(3),N(3) logical :: def1,def2,io2,io3,io4,file_sync ! call timing('io_COLLISIONS',OPR='start') @@ -142,9 +142,11 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) ! #if defined _RT if (write_is_on(ID).and.io3 .and. index(trim(db_name),"HXC")/=0) then - ! nf90_sync is performed up to LAST_COLL_sync and at steps of 5% of bse kernel - i_coll_mem=COLL_grp%PAR_map(i_coll) - file_sync= (i_coll<=LAST_COLL_sync .and. mod(i_coll_mem,max(1,PAR_COLL_min/20))==0) .or. i_coll==LAST_COLL_sync + ! + ! nf90_sync is performed up to PAR_COLL_min and at steps of 5% of bse kernel + i_coll_mem = COLL_grp%PAR_map(i_coll) + sync_step = max(1,PAR_COLL_min/20) + file_sync= (i_coll_mem Date: Fri, 30 May 2025 08:56:50 +0200 Subject: [PATCH 1001/1367] Fixed qp parallelization for collisions generated from BSE --- src/collisions/COLLISIONS_HXC.F | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index 40ff818a67..36f7f190e5 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -464,8 +464,7 @@ subroutine map_BSE_to_HXC_collisions() if ( (i_np> n_met_bands(ip_sp) .and. i_mp> n_met_bands(ip_sp) ) ) cycle if ( (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) ) cycle ! - if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & -& .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle + if ( .not. PAR_IND_Bp_mat%element_1D(B_mat_index(i_np,i_mp,COLL_bands) ) ) cycle ! !i_p_bz_bse=BS_K_io_map(k%k_table(i_p,i_p_s)) i_p_bz_bse=BS_K_io_map(i_p_bz) @@ -476,11 +475,11 @@ subroutine map_BSE_to_HXC_collisions() if (i_BSE==0.or.j_BSE==0) then n_skip_colls=n_skip_colls+1 !DEBUG< - !if(j_BSE==0) write(*,*) "Transition ignored ",i_p_bz_bse,i_mp,i_np,i_sp + !if(j_BSE==0) write(*,*) "Transition ignored ",i_p_bz_bse,i_mp,i_np,i_sp !DEBUG> cycle - else - n_incl_colls=n_incl_colls+1 + else + n_incl_colls=n_incl_colls+1 endif ! if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then From f50297d27688ee182e2f13c0136e080baea121af Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 May 2025 10:37:58 +0200 Subject: [PATCH 1002/1367] Fixed resizing of BS_residuals for case in which the number of eigenvalues is incremented --- src/bse/K_diago_driver.F | 88 ++++++++++++++++--------------- src/bse/K_diago_right_residuals.F | 14 +++-- src/modules/mod_BS_solvers.F | 78 +++++++++++++++++++++++++-- 3 files changed, 129 insertions(+), 51 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index cb3e05e9c2..585a74ec96 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -27,7 +27,7 @@ subroutine K_diago_driver(iq,W,X_static) use units, ONLY:HA2EV use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& & BS_res_ares_n_mat,l_BS_optics,l_BS_dichroism,l_BS_ares_from_res !,BS_Blocks_symmetrize_K,& - use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize,BSS_n_eig_Input, & + use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize_only,BSS_resize_and_save,BSS_n_eig_Input, & & BSS_write_eig_2_db,BSS_eh_W,BSS_n_eig,BS_E,BSS_slepc_pseudo_herm,write_bs_ev_par,& & BSS_ldiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition use X_m, ONLY:X_t,X_OUTPUT_driver @@ -115,8 +115,7 @@ subroutine K_diago_driver(iq,W,X_static) complex(SP),pointer :: BS_R_right_magn(:,:) => null() ! ! Temporary pointer - complex(SP),pointer :: tmp_res_ptrR(:) => null() - complex(SP),pointer :: tmp_res_ptrL(:) => null() + complex(SP),pointer :: tmp_res_ptr(:) => null() ! ! I/O integer :: io_err,ID @@ -301,6 +300,9 @@ subroutine K_diago_driver(iq,W,X_static) ! endif ! + ! Here we are resizing all the residuals which have not been used yet. + ! We could just allocated them here. + ! #if defined _SLEPC && !defined _NL ! if (l_slepc) then @@ -316,12 +318,12 @@ subroutine K_diago_driver(iq,W,X_static) ! if (l_ldiago) then ! BSS_n_eig could be lowered by LDIAGO_driver - if (BSS_n_eig_before_solver>BSS_n_eig) call K_ldiago_resize_variables() + if (BSS_n_eig_before_solver/=BSS_n_eig) call K_ldiago_resize_variables() endif ! ! Compute residuals ! - YAMBO_ALLOC_P(tmp_res_ptrR,(BSS_n_eig)) + YAMBO_ALLOC_P(tmp_res_ptr,(BSS_n_eig)) ! ! Construct the residuals of epsilon !==================================== @@ -333,18 +335,18 @@ subroutine K_diago_driver(iq,W,X_static) endif ! if(l_BS_dichroism) then - call K_diago_R_res("dic1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptrR,BS_V_right) - BS_R_right_dich(:,1) = tmp_res_ptrR - call K_diago_R_res("dic2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptrR,BS_V_right) - BS_R_right_dich(:,2) = tmp_res_ptrR + call K_diago_R_res("dic1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_dich(:,1) = tmp_res_ptr + call K_diago_R_res("dic2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_dich(:,2) = tmp_res_ptr endif ! if(l_BS_magnons) then - call K_diago_R_res("mag1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptrR,BS_V_right) - BS_R_right_magn(:,1) = tmp_res_ptrR + call K_diago_R_res("mag1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_magn(:,1) = tmp_res_ptr if(n_spinor==2) then - call K_diago_R_res("mag2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptrR,BS_V_right) - BS_R_right_magn(:,2) = tmp_res_ptrR + call K_diago_R_res("mag2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_magn(:,2) = tmp_res_ptr endif endif ! @@ -361,11 +363,11 @@ subroutine K_diago_driver(iq,W,X_static) endif ! if(l_BS_magnons) then - call K_diago_L_res("mag1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptrR,BS_V_left,BS_overlap) - BS_R_left_magn(:,1) = tmp_res_ptrR + call K_diago_L_res("mag1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_left,BS_overlap) + BS_R_left_magn(:,1) = tmp_res_ptr if(n_spinor==2) then - call K_diago_L_res("mag2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptrR,BS_V_left,BS_overlap) - BS_R_left_magn(:,2) = tmp_res_ptrR + call K_diago_L_res("mag2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_left,BS_overlap) + BS_R_left_magn(:,2) = tmp_res_ptr endif endif ! @@ -378,7 +380,7 @@ subroutine K_diago_driver(iq,W,X_static) ! endif ! - YAMBO_FREE_P(tmp_res_ptrR) + YAMBO_FREE_P(tmp_res_ptr) ! ! DS: this also should be changed according to the general structure if(l_BS_photolum) then @@ -524,18 +526,18 @@ end subroutine local_free subroutine K_ldiago_resize_variables() ! ! We need to realloc as sizes can change. - if(allocated(BS_corrections)) call BSS_resize(BS_corrections) - if(associated(BS_E_SOC_corr)) call BSS_resize(BS_E_SOC_corr) + if(allocated(BS_corrections)) call BSS_resize_only(BS_corrections) + if(associated(BS_E_SOC_corr)) call BSS_resize_only(BS_E_SOC_corr) ! - if(associated(BS_R_left_abs) ) call BSS_resize(BS_R_left_abs) - if(associated(BS_R_right_abs)) call BSS_resize(BS_R_right_abs) + if(associated(BS_R_left_abs) ) call BSS_resize_only(BS_R_left_abs) + if(associated(BS_R_right_abs)) call BSS_resize_only(BS_R_right_abs) ! - if(associated(BS_R_left_kerr) ) call BSS_resize(BS_R_left_kerr) - if(associated(BS_R_right_kerr)) call BSS_resize(BS_R_right_kerr) - if(associated(BS_R_right_dich)) call BSS_resize(BS_R_right_dich) - if(associated(BS_R_left_magn) ) call BSS_resize(BS_R_left_magn) - if(associated(BS_R_right_magn)) call BSS_resize(BS_R_right_magn) - if(associated(BS_R_PL) ) call BSS_resize(BS_R_PL) + if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) + if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) + if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) + if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) + if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) + if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) ! end subroutine K_ldiago_resize_variables ! @@ -544,26 +546,26 @@ end subroutine K_ldiago_resize_variables subroutine K_slepc_resize_variables() ! call warning(" resizing alla variables whose size depends on BSS_n_eig ") - if(allocated(BS_E)) call BSS_resize(BS_E) + if(allocated(BS_E)) call BSS_resize_and_save(BS_E) ! - if(allocated(BS_corrections)) call BSS_resize(BS_corrections) - if(associated(BS_E_SOC_corr)) call BSS_resize(BS_E_SOC_corr) + if(allocated(BS_corrections)) call BSS_resize_only(BS_corrections) + if(associated(BS_E_SOC_corr)) call BSS_resize_only(BS_E_SOC_corr) ! - if(associated(BS_R_left_abs) ) call BSS_resize(BS_R_left_abs) - if(associated(BS_R_right_abs)) call BSS_resize(BS_R_right_abs) + if(associated(BS_R_left_abs) ) call BSS_resize_only(BS_R_left_abs) + if(associated(BS_R_right_abs)) call BSS_resize_only(BS_R_right_abs) ! - if(associated(BS_R_left_kerr) ) call BSS_resize(BS_R_left_kerr) - if(associated(BS_R_right_kerr)) call BSS_resize(BS_R_right_kerr) - if(associated(BS_R_right_dich)) call BSS_resize(BS_R_right_dich) - if(associated(BS_R_left_magn) ) call BSS_resize(BS_R_left_magn) - if(associated(BS_R_right_magn)) call BSS_resize(BS_R_right_magn) - if(associated(BS_R_PL) ) call BSS_resize(BS_R_PL) + if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) + if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) + if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) + if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) + if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) + if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) ! - if(allocated(BS_V_left)) call BSS_resize(BS_V_left) - if(allocated(BS_V_right)) call BSS_resize(BS_V_right) - if(associated(BS_overlap)) call BSS_resize(BS_overlap,.true.) + if(allocated(BS_V_left)) call BSS_resize_and_save(BS_V_left) + if(allocated(BS_V_right)) call BSS_resize_and_save(BS_V_right) + if(associated(BS_overlap)) call BSS_resize_only(BS_overlap,.true.) ! - if(allocated(BS_E_real)) call BSS_resize(BS_E_real) + if(allocated(BS_E_real)) call BSS_resize_and_save(BS_E_real) ! end subroutine ! diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index 133c46c44b..83d78a1305 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -16,6 +16,7 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) ! use pars, ONLY:SP,cZERO + use stderr, ONLY:intc use wrapper_omp, ONLY:V_dot_V_omp use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset,ncpu use parallel_int, ONLY:PP_redux_wait,PARALLEL_index @@ -38,7 +39,7 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! type(PP_indexes) :: px integer :: i1, i_lambda, neig_total, SL_H_dim, res_range(2), & - & n_steps, step_shift, res_shift, i_res + & n_steps, step_shift, res_shift, i_res, n_size logical :: velocity_correction,l_duplicate_mem_par ! complex(SP), allocatable :: tmp_res(:), BS_R_tmp(:) @@ -49,8 +50,15 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! neig_total = size(BS_E) ! - if (size(BS_R_right) /= neig_total) call error("Size mismatch between eigvals and R.residuals.") - if (size(BS_V_right,dim=2) /= neigs_this_cpu) call error("Size mismatch between eigvecs and R.residuals.") + n_size=size(BS_R_right) + if (n_size /= neig_total) & + & call error("Different size for energ. ("//trim(intc(neig_total))//")"// & + & " and Rres. ("//trim(intc(n_size))//"), mode= "//trim(mode)) + ! + n_size=size(BS_V_right,dim=2) + if (n_size /= neigs_this_cpu) & + & call error("Different size for eigen. ("//trim(intc(neig_total))//")"// & + & " and Rres. ("//trim(intc(n_size))//"), mode= "//trim(mode)) ! velocity_correction=(index(mode,"opt")>0).and.(trim(global_gauge)=="velocity") ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index a73227ba6d..81b298430c 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -196,18 +196,26 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, ! end interface ! - interface BSS_resize + interface BSS_resize_and_save module procedure resizeR1 module procedure resizeR1p, resizeR2p module procedure resizeC1, resizeC2 module procedure resizeC1p, resizeC2p module procedure resizeC22p end interface + ! + interface BSS_resize_only + module procedure resize_onlyR1 + module procedure resize_onlyR1p, resize_onlyR2p + module procedure resize_onlyC1, resize_onlyC2 + module procedure resize_onlyC1p, resize_onlyC2p + module procedure resize_onlyC22p + end interface ! contains ! - ! Start BSS_resize interface + ! Start BSS_resize_and_save interface ! subroutine resizeR1(VAR_R1) ! @@ -227,7 +235,7 @@ subroutine resizeR1p(VAR_R1) real(SP) :: TMP_R1(BSS_n_eig) ! TMP_R1=VAR_R1(:BSS_n_eig) - deallocate(VAR_R1) + deallocate(VAR_R1); nullify(VAR_R1) allocate(VAR_R1(BSS_n_eig)) VAR_R1=TMP_R1 ! @@ -296,7 +304,7 @@ subroutine resizeC2p(VAR_C2) dim1=size(VAR_C2,2) allocate(TMP_C2(BSS_n_eig,dim1)) TMP_C2=VAR_C2(:BSS_n_eig,:) - deallocate(VAR_C2) + deallocate(VAR_C2); nullify(VAR_C2) allocate(VAR_C2(BSS_n_eig,dim1)) VAR_C2=TMP_C2 ! @@ -315,7 +323,67 @@ subroutine resizeC22p(VAR_C22,both) ! end subroutine resizeC22p ! - ! End BSS_resize interface + ! End BSS_resize_and_save interface + ! + ! + ! Start BSS_resize_only interface + ! + subroutine resize_onlyR1(VAR_R1) + real(SP), allocatable, intent(inout) :: VAR_R1(:) + deallocate(VAR_R1) + allocate(VAR_R1(BSS_n_eig)) + end subroutine resize_onlyR1 + ! + subroutine resize_onlyR1p(VAR_R1) + real(SP), pointer, intent(inout) :: VAR_R1(:) + deallocate(VAR_R1); nullify(VAR_R1) + allocate(VAR_R1(BSS_n_eig)) + end subroutine resize_onlyR1p + ! + subroutine resize_onlyR2p(VAR_R2) + real(SP), pointer, intent(inout) :: VAR_R2(:,:) + integer :: dim1 + dim1=size(VAR_R2(:,1)) + deallocate(VAR_r2); nullify(VAR_R2) + allocate(VAR_R2(dim1,BSS_n_eig)) + end subroutine resize_onlyR2p + ! + subroutine resize_onlyC1(VAR_C1) + complex(SP), allocatable, intent(inout) :: VAR_C1(:) + deallocate(VAR_C1) + allocate(VAR_C1(BSS_n_eig)) + end subroutine resize_onlyC1 + ! + subroutine resize_onlyC1p(VAR_C1) + complex(SP), pointer, intent(inout) :: VAR_C1(:) + deallocate(VAR_C1); nullify(VAR_C1) + allocate(VAR_C1(BSS_n_eig)) + end subroutine resize_onlyC1p + ! + subroutine resize_onlyC2(VAR_C2) + complex(SP), allocatable, intent(inout) :: VAR_C2(:,:) + integer :: dim1 + dim1=size(VAR_C2,2) + deallocate(VAR_C2) + allocate(VAR_C2(BSS_n_eig,dim1)) + end subroutine resize_onlyC2 + ! + subroutine resize_onlyC2p(VAR_C2) + complex(SP), pointer, intent(inout) :: VAR_C2(:,:) + integer :: dim1 + dim1=size(VAR_C2,2) + deallocate(VAR_C2); nullify(VAR_C2) + allocate(VAR_C2(BSS_n_eig,dim1)) + end subroutine resize_onlyC2p + ! + subroutine resize_onlyC22p(VAR_C22,both) + logical, intent(in) :: both + complex(SP), pointer, intent(inout) :: VAR_C22(:,:) + deallocate(VAR_C22); nullify(VAR_C22) + allocate(VAR_C22(BSS_n_eig,BSS_n_eig)) + end subroutine resize_onlyC22p + ! + ! End BSS_resize_only interface ! subroutine BSS_alloc( ) use pars, ONLY:IP,cZERO,rZERO From 307c301a32dbf74beaff0777e5fce77deef2c4cd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 30 May 2025 12:46:45 +0200 Subject: [PATCH 1003/1367] Field from file subroutines moved inside real_time_control folder to allow their use in ypp_rt --- src/real_time_control/.objects | 2 +- .../RT_field_from_file.F | 0 src/real_time_initialize/.objects | 2 +- ypp/real_time/RT_X_LRR_real_field.F | 3 +++ ypp/real_time/RT_X_response.F | 5 +++++ 5 files changed, 10 insertions(+), 2 deletions(-) rename src/{real_time_initialize => real_time_control}/RT_field_from_file.F (100%) diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index 7bb981cb13..e46d6cdb05 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -7,5 +7,5 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ - RT_Fluence_and_PI_kind.o RT_Rabi_frequency.o RT_Rabi_frequency_ALL_and_print.o + RT_Fluence_and_PI_kind.o RT_Rabi_frequency.o RT_Rabi_frequency_ALL_and_print.o RT_field_from_file.o #endif diff --git a/src/real_time_initialize/RT_field_from_file.F b/src/real_time_control/RT_field_from_file.F similarity index 100% rename from src/real_time_initialize/RT_field_from_file.F rename to src/real_time_control/RT_field_from_file.F diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index 12a3f65b69..6bc8c2d39e 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -4,6 +4,6 @@ ELPH_objs = RT_ELPH_initialize.o #if defined _RT RT_head_objs = RT_initialize.o RT_start_and_restart.o RT_foot_objs = RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o \ - RT_occupations_update.o RT_field_from_file.o + RT_occupations_update.o #endif objs = $(RT_head_objs) RT_occupations_and_levels_init.o $(RT_foot_objs) $(ELPH_objs) diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 438df76466..51dba64bd4 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -82,6 +82,9 @@ subroutine RT_X_LRR_real_field(en) do i_t=1,RT_conf%T_n_steps ! Field_time=RT_time(i_t)-Efield(i_Probe)%t_initial + ! + if (index(Efield(i_Probe)%ef_name,"FROM_FILE")>0 .and. i_t>Efield(i_Probe)%t_final_indx+2) cycle + ! A_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),0) E_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),1) theta =theta_function(Field_time,RT_conf%delta_T,0) diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index ebf3c7efb8..e2b11c0bfd 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -36,6 +36,11 @@ subroutine RT_X_response(en,k,q) !======================================= call STRING_split(Efield(1)%ef_name,probe_defs,n_non_empty_strings=Ndefs) ! + if ( trim(probe_defs(1))=='FROM_FILE') then + call RT_load_field_from_file_init(trim(probe_defs(2))) + call RT_load_field_from_file(trim(probe_defs(2)),1) + endif + ! l_RT_LRR_real_field= all( (/ N_pumps<=1, N_probes==1, X_order==1/) ) ! l_RT_SHG_qssin = all( (/ trim(probe_defs(1))=="QSSIN" , N_pumps==0, N_probes==1, X_order==2/) ) From 45c88cf55edea99e93fae3841bc45ab2f1accb2f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 3 Jun 2025 14:03:37 +0200 Subject: [PATCH 1004/1367] Version 5.3.0, Revision 24493, Hash 1eda964af MODIFIED * configure include/version/version.m4 nloptics/NL_damping.F Bugs: - Additions: -More doxygen documentation Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_damping.F | 10 ++++++++++ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 6a164e1348..795d4edd4e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24464 h.c95ccf807. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24493 h.1eda964af. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24464 h.c95ccf807' -PACKAGE_STRING='Yambo 5.3.0 r.24464 h.c95ccf807' +PACKAGE_VERSION='5.3.0 r.24493 h.1eda964af' +PACKAGE_STRING='Yambo 5.3.0 r.24493 h.1eda964af' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24464 h.c95ccf807 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24493 h.1eda964af to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24464 h.c95ccf807:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24493 h.1eda964af:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24464 h.c95ccf807 +Yambo configure 5.3.0 r.24493 h.1eda964af generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24464 h.c95ccf807, which was +It was created by Yambo $as_me 5.3.0 r.24493 h.1eda964af, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24464" -SHASH="c95ccf807" +SREVISION="24493" +SHASH="1eda964af" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24464 h.c95ccf807, which was +This file was extended by Yambo $as_me 5.3.0 r.24493 h.1eda964af, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24464 h.c95ccf807 +Yambo config.status 5.3.0 r.24493 h.1eda964af configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 209d14f252..0838d1febd 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24464 h.c95ccf807, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24493 h.1eda964af, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24464" -SHASH="c95ccf807" +SREVISION="24493" +SHASH="1eda964af" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index 29bf6576d4..0a00b066db 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -5,6 +5,16 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +!> @brief Dephasing for the real-time dynamics +!! +!! @param[in] V_bands time-dependent valence bands +!! @param[in] ik k-point index +!! @param[in] i_sp_pol spin-polarization index +!! @param[in] E energies and life-time array +!! +!! @param[out] I_relax relaxation matrix (distributed on k-points) +! +! subroutine NL_damping(E,ik,i_sp_pol,V_bands) ! ! Output: I_relax From 027781afec482ad1f1c2513d80f90f4af16e7708 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 5 Jun 2025 00:15:10 +0200 Subject: [PATCH 1005/1367] Change proposed in https://gitlab.com/lumen-code/lumen/-/issues/194 --- src/coulomb/col_driver.F | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 997ffb19f4..7f4dbd2e0f 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -88,8 +88,7 @@ subroutine col_driver(bare_NG,q) ! if (.not.l_rim) then RIM_ng=0 - call parser('RandQpts',l_RandQpts) - if (.not.l_RandQpts) RIM_n_rand_pts=0 + RIM_n_rand_pts=0 endif ! call parser('QpgFull',RIM_is_diagonal) From b3d89a47dba98ed5b756c34cb83066b2927390d7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 5 Jun 2025 17:18:35 +0200 Subject: [PATCH 1006/1367] Version 5.3.0, Revision 24498, Hash 027781afe MODIFIED * configure include/version/version.m4 DELETED * modules/mod_Overlaps.F Bugs: - Additions: - Changes: -Removed old unused file Patch sent by: Claudio Attaccalite --- configure | 22 ++++++------- include/version/version.m4 | 6 ++-- src/modules/mod_Overlaps.F | 63 -------------------------------------- 3 files changed, 14 insertions(+), 77 deletions(-) delete mode 100644 src/modules/mod_Overlaps.F diff --git a/configure b/configure index 795d4edd4e..ec8de6abf4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24493 h.1eda964af. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24498 h.027781afe. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24493 h.1eda964af' -PACKAGE_STRING='Yambo 5.3.0 r.24493 h.1eda964af' +PACKAGE_VERSION='5.3.0 r.24498 h.027781afe' +PACKAGE_STRING='Yambo 5.3.0 r.24498 h.027781afe' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24493 h.1eda964af to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24498 h.027781afe to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24493 h.1eda964af:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24498 h.027781afe:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24493 h.1eda964af +Yambo configure 5.3.0 r.24498 h.027781afe generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24493 h.1eda964af, which was +It was created by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24493" -SHASH="1eda964af" +SREVISION="24498" +SHASH="027781afe" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24493 h.1eda964af, which was +This file was extended by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24493 h.1eda964af +Yambo config.status 5.3.0 r.24498 h.027781afe configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0838d1febd..44bbd5f071 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24493 h.1eda964af, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24498 h.027781afe, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24493" -SHASH="1eda964af" +SREVISION="24498" +SHASH="027781afe" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_Overlaps.F b/src/modules/mod_Overlaps.F deleted file mode 100644 index 1bfec2272b..0000000000 --- a/src/modules/mod_Overlaps.F +++ /dev/null @@ -1,63 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2015 The Yambo Team -! -! Authors (see AUTHORS file for details): MG CA -! -module Overlaps_m - ! - use pars, ONLY:SP -#include - ! - complex(SP), allocatable :: S_det(:,:) - complex(SP), allocatable :: Sm1_plus(:,:,:,:) - complex(SP), allocatable :: Sm1_minus(:,:,:,:) - ! - interface - ! - integer function io_Overlaps(X,Xen,ID,DIP_S) - ! - use pars, ONLY:SP - use X_m, ONLY:X_t - use electrons, ONLY:levels,n_sp_pol - use R_lattice, ONLY:nXkbz - ! - implicit none - type(X_t) ::X - type(levels)::Xen - integer ::ID - complex(SP), optional :: DIP_S(X%ib(2),X%ib(2),6,Xen%nk,n_sp_pol) - ! - end function io_Overlaps - ! - end interface - ! - contains - ! - subroutine S_alloc(Xen,Xk) - ! - use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels - use drivers, ONLY:l_real_time - ! - type(bz_samp), intent(in) :: Xk - type(levels), intent(in) :: Xen - ! - YAMBO_ALLOC(S_det,(3,Xk%nbz)) - YAMBO_ALLOC(Sm1_plus,(3,maxval(Xen%nbf),maxval(Xen%nbf),Xk%nbz)) - YAMBO_ALLOC(Sm1_minus,(3,maxval(Xen%nbf),maxval(Xen%nbf),Xk%nbz)) - ! - end subroutine S_alloc - ! - subroutine S_dealloc() - ! - use drivers, ONLY:l_real_time - ! - YAMBO_FREE(S_det) - YAMBO_FREE(Sm1_plus) - YAMBO_FREE(Sm1_minus) - ! - end subroutine S_dealloc - ! -end module From 4ec43e3e4cd5c349c669c99fcef0d2ed7d0e5a14 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 7 Jun 2025 11:14:36 +0200 Subject: [PATCH 1007/1367] Number of random points for rim_spherical (mostly elph) has a dedicated variable, different from the one used for rim_cut and rim_w --- src/coulomb/rim_spherical.F | 14 +++++++------- src/interface/INIT_activate.F | 6 +++--- src/interface/INIT_load.F | 3 ++- src/modules/SET_defaults.F | 3 ++- src/modules/mod_R_lattice.F | 1 + src/qp/QED_Sigma_c.F | 4 ++-- ypp/el-ph/ELPH_atomic_amplitude.F | 6 +++--- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/coulomb/rim_spherical.F b/src/coulomb/rim_spherical.F index 13196d5e51..a01ac3bf71 100644 --- a/src/coulomb/rim_spherical.F +++ b/src/coulomb/rim_spherical.F @@ -51,7 +51,7 @@ subroutine rim_spherical(Np,points,p_weight,radius,power,MULTIPLY_BY_Q) use LIVE_t, ONLY:live_timing use vec_operate, ONLY:v_norm use D_lattice, ONLY:alat - use R_lattice, ONLY:RIM_n_rand_pts + use R_lattice, ONLY:RIM_sphe_n_rand_pts implicit none ! integer, intent(in) :: Np,power @@ -62,11 +62,11 @@ subroutine rim_spherical(Np,points,p_weight,radius,power,MULTIPLY_BY_Q) ! Work Space ! integer :: ip,ir,N_out,N_in,ic - real(SP) :: v_rand(3),qr(RIM_n_rand_pts,3),sphere_vol,box_vol,pt_cc(3) + real(SP) :: v_rand(3),qr(RIM_sphe_n_rand_pts,3),sphere_vol,box_vol,pt_cc(3) integer :: iseed(8) real(DP), external :: dlaran ! - if (RIM_n_rand_pts==0)then + if (RIM_sphe_n_rand_pts==0)then do ip=1,Np p_weight(ip)=0. pt_cc=points(ip,:)*2.*pi/alat(:) @@ -92,8 +92,8 @@ subroutine rim_spherical(Np,points,p_weight,radius,power,MULTIPLY_BY_Q) N_in=1 N_out=0 ! - call live_timing('Random points',RIM_n_rand_pts) - loop: do while(.not.N_in==RIM_n_rand_pts+1) + call live_timing('Random points',RIM_sphe_n_rand_pts) + loop: do while(.not.N_in==RIM_sphe_n_rand_pts+1) ! do ic=1,3 v_rand(ic)=( 2.*dlaran(iseed(4:))-1. )*radius*1.2 @@ -115,14 +115,14 @@ subroutine rim_spherical(Np,points,p_weight,radius,power,MULTIPLY_BY_Q) sphere_vol=4./3.*pi*radius**3. ! call msg('r', 'Sphere volume [au]',sphere_vol) - call msg('rn','Integrated volume [au]',box_vol*real(RIM_n_rand_pts)/real(N_out)) + call msg('rn','Integrated volume [au]',box_vol*real(RIM_sphe_n_rand_pts)/real(N_out)) ! call live_timing('Integrals',Np) ! do ip=1,Np p_weight(ip)=0. pt_cc=points(ip,:)*2.*pi/alat(:) - do ir=1,RIM_n_rand_pts + do ir=1,RIM_sphe_n_rand_pts p_weight(ip)=p_weight(ip)+1./v_norm(qr(ir,:)+pt_cc(:))**power*box_vol/real(N_out) enddo p_weight(ip)=p_weight(ip)/sphere_vol/real(Np) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 390a1250f8..b87a22b216 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -366,7 +366,7 @@ subroutine INIT_activate() #if defined _QED if (l_elphoton_corr) then if (l_gw0) then - call initactivate(1,'FFTGvecs RandQpts QEDRLvcs GbndRnge GDamping dScStep DysSolver') + call initactivate(1,'FFTGvecs RandQptsSphe QEDRLvcs GbndRnge GDamping dScStep DysSolver') if (trim(QP_solver)=="g") then call initactivate(1,'GEnSteps GEnRnge GEnMode GDmRnge GreenFTresh GreenF2QP') else @@ -435,7 +435,7 @@ subroutine INIT_activate() if (l_elph_corr) then call INIT_QP_ctl_switch('G') call initactivate(1,'DysSolver') - call initactivate(1,'GphBRnge FANdEtresh DWdEtresh ElPhModes GDamping dScStep ExtendOut ElPhRndNq RandQpts') + call initactivate(1,'GphBRnge FANdEtresh DWdEtresh ElPhModes GDamping dScStep ExtendOut ElPhRndNq RandQptsSphe') call initactivate(1,'GkkpDB WRgFsq NewtDchk OnMassShell') endif if (trim(QP_solver)=="g".and.l_elph_corr) then @@ -537,7 +537,7 @@ subroutine INIT_activate() if (l_elel_scatt .or. l_elph_scatt .or. l_elphoton_scatt) then call initactivate(1,'LifeExtrapolation LifeExtrapSteps LifeFitTemp RelaxTimeApprox RTAtemp RTAchem LifeFitTemp') endif - if (l_elph_scatt) call initactivate(1,'MemTresh RandQpts RT_T_evol ElPhModes UseDebyeE') + if (l_elph_scatt) call initactivate(1,'MemTresh RandQptsSphe RT_T_evol ElPhModes UseDebyeE') if (l_elel_scatt) call initactivate( 1,'EERimPerc') ! call initactivate(1,'RTBands Integrator GrKind TwoAlph RTehEny ScattTresh') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index a47128953f..2f44edd5d7 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -31,7 +31,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& & bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& -& RIM_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff +& RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_core_bands,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,& @@ -395,6 +395,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'IDEm1Ref','[RIM] Dielectric matrix reference component 1(x)/2(y)/3(z)',& & RIM_id_epsm1_reference,verb_level=V_RL) call it(defs,'RandQpts','[RIM] Number of random q-points in the BZ',RIM_n_rand_pts) + call it(defs,'RandQptsSphe','[RIM] Number of random q-points in the BZ',RIM_sphe_n_rand_pts) call it(defs,'RandGvec','[RIM] Coulomb interaction RS components',RIM_ng,G_unit) call it('f',defs,'QpgFull', '[F RIM] Coulomb interaction: Full matrix',verb_level=V_RL) ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 6ca883fb89..9ed299d950 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -33,7 +33,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) use pseudo, ONLY:pp_n_l_times_proj_max,pp_kbv_dim use R_lattice, ONLY:n_g_shells,ng_closed,bse_scattering,coll_scattering,& & Xk_grid_is_uniform,RIM_id_epsm1_reference,RIM_epsm1,& -& RIM_anisotropy,RIM_ng,RIM_W_ng,RIM_n_rand_pts,nqibz,q0_def_norm,& +& RIM_anisotropy,RIM_ng,RIM_W_ng,RIM_n_rand_pts,RIM_sphe_n_rand_pts,nqibz,q0_def_norm,& & cutoff_presets,k_map,qindx_S_max_Go,RIMW_type,eps_env use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,eval_magn use parallel_m, ONLY:ncpu,CPU_str_reset,CREATE_hosts_COMM @@ -282,6 +282,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) RIM_anisotropy=0._SP RIM_ng=0 RIM_n_rand_pts=0 + RIM_sphe_n_rand_pts=0 ! ! RIM-W ! diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index b1c5a34b51..d56afe6b61 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -139,6 +139,7 @@ module R_lattice integer :: RIM_ng integer :: RIM_id_epsm1_reference integer :: RIM_n_rand_pts + integer :: RIM_sphe_n_rand_pts logical :: RIM_is_diagonal real(SP):: RIM_RL_vol real(SP):: RIM_epsm1(3) diff --git a/src/qp/QED_Sigma_c.F b/src/qp/QED_Sigma_c.F index ab57619861..6232481acf 100644 --- a/src/qp/QED_Sigma_c.F +++ b/src/qp/QED_Sigma_c.F @@ -12,7 +12,7 @@ subroutine QED_Sigma_c(E,k,q,qp) use drivers, ONLY:l_elel_corr,l_use_collisions,l_elph_corr,l_elphoton_scatt use electrons, ONLY:levels,spin_occ,n_met_bands use D_lattice, ONLY:DL_vol - use R_lattice, ONLY:qindx_S,bz_samp,nqbz,RL_vol,RIM_n_rand_pts + use R_lattice, ONLY:qindx_S,bz_samp,nqbz,RL_vol,RIM_sphe_n_rand_pts use QP_m, ONLY:QP_t,QP_n_G_bands,QP_Sc,QP_QED_ng,QP_nb,QP_states_simmetrize,& & QP_dSc,QP_time_order_sign,QP_table,QP_n_states use IO_m, ONLY:io_COLLs @@ -67,7 +67,7 @@ subroutine QED_Sigma_c(E,k,q,qp) ! ! RIM !===== - if (RIM_n_rand_pts==0) RIM_n_rand_pts=1000000 + if (RIM_sphe_n_rand_pts==0) RIM_sphe_n_rand_pts=1000000 ! call k_ibz2bz(q,'i',.TRUE.) ! diff --git a/ypp/el-ph/ELPH_atomic_amplitude.F b/ypp/el-ph/ELPH_atomic_amplitude.F index 6757bad96e..4601db10cf 100644 --- a/ypp/el-ph/ELPH_atomic_amplitude.F +++ b/ypp/el-ph/ELPH_atomic_amplitude.F @@ -10,7 +10,7 @@ subroutine ELPH_atomic_amplitude(q) use pars, ONLY:SP use units, ONLY:BO2ANG,pi use com, ONLY:msg - use R_lattice, ONLY:bz_samp,RL_vol,RIM_n_rand_pts + use R_lattice, ONLY:bz_samp,RL_vol,RIM_sphe_n_rand_pts use D_lattice, ONLY:n_atoms use ELPH, ONLY:ph_modes,PH_freqs_sq,elph_nQ,elph_use_q_grid,& & PH_pol_vector,PH_qpt @@ -62,11 +62,11 @@ subroutine ELPH_atomic_amplitude(q) ! YAMBO_ALLOC(q_weight,(nq_to_sum)) ! - RIM_n_rand_pts=100000 + RIM_sphe_n_rand_pts=100000 if (elph_use_q_grid) then q_weight=q%weights else - if (RIM_n_rand_pts>0) call msg('s','Using RIM with '//trim(intc(RIM_n_rand_pts))//' point') + if (RIM_sphe_n_rand_pts>0) call msg('s','Using RIM with '//trim(intc(RIM_sphe_n_rand_pts))//' point') call rim_spherical(nq_to_sum,PH_qpt(1:nq_to_sum,1:3),q_weight,(3.*RL_vol/nq_to_sum/4./pi)**(1./3.),2,.TRUE.) endif ! From 08df85f543a47cf85fcdcfb925104699c36ebd7e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 8 Jun 2025 22:39:11 +0200 Subject: [PATCH 1008/1367] UP_matrix function shifted by 1 --- src/hamiltonian/V_qp_basis_to_H.F | 2 +- src/hamiltonian/V_real_space_to_H.F | 2 +- src/hamiltonian/Vgrad_real_space_to_H.F | 2 +- src/modules/mod_matrix_operate.F | 14 +++++++------- src/parallel/PARALLEL_global_Real_Time.F | 6 +++--- src/qp/XCo_local.F | 4 ++-- src/tddft/TDDFT_BSK_disk_2_FXC.F | 2 +- src/xc_functionals/el_density_matrix.F | 2 +- src/xc_functionals/el_magnetization_matrix.F | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/hamiltonian/V_qp_basis_to_H.F b/src/hamiltonian/V_qp_basis_to_H.F index 294f12abe0..18d5ad7b69 100644 --- a/src/hamiltonian/V_qp_basis_to_H.F +++ b/src/hamiltonian/V_qp_basis_to_H.F @@ -47,7 +47,7 @@ subroutine V_qp_basis_to_H(ik,i_sp_pol,V,H) if (.not.(PAR_IND_QP%element_1D(i1))) cycle endif if (l_par_RT) then - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle endif ! ! In the RT simulation the bands QP_table matrix is not ordered diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index d879b7c202..5b630932ef 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -88,7 +88,7 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) ! do ib=H_ref_bands(1),H_ref_bands(2) do ibp=ib,H_ref_bands(2) - PAR_IND_local(ib,ibp)=PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1) + PAR_IND_local(ib,ibp)=PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) ) enddo enddo ! diff --git a/src/hamiltonian/Vgrad_real_space_to_H.F b/src/hamiltonian/Vgrad_real_space_to_H.F index b125dd026c..34f6d80e36 100644 --- a/src/hamiltonian/Vgrad_real_space_to_H.F +++ b/src/hamiltonian/Vgrad_real_space_to_H.F @@ -43,7 +43,7 @@ subroutine Vgrad_real_space_to_H(ik,H,WF,V_grad) do ib=H_ref_bands(1),H_ref_bands(2) do ibp=ib,H_ref_bands(2) ! - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle ! ! ! diff --git a/src/modules/mod_matrix_operate.F b/src/modules/mod_matrix_operate.F index e537d440b5..b09fd974cc 100644 --- a/src/modules/mod_matrix_operate.F +++ b/src/modules/mod_matrix_operate.F @@ -28,15 +28,15 @@ integer function UP_matrix_index(i1,i2) ! ! Note that: ! - ! UP_matrix_index(1,1)=2 - ! UP_matrix_index(2,2)=3 - ! UP_matrix_index(1,2)=4 - ! UP_matrix_index(3,3)=5 - ! UP_matrix_index(2,3)=6 - ! UP_matrix_index(1,3)=7 + ! UP_matrix_index(1,1)=1 + ! UP_matrix_index(2,2)=2 + ! UP_matrix_index(1,2)=3 + ! UP_matrix_index(3,3)=4 + ! UP_matrix_index(2,3)=5 + ! UP_matrix_index(1,3)=6 ! integer :: i1,i2 - UP_matrix_index=(i2**2+i2)/2-i1+2 + UP_matrix_index=i2*(i2+1)/2-i1+1 ! end function ! diff --git a/src/parallel/PARALLEL_global_Real_Time.F b/src/parallel/PARALLEL_global_Real_Time.F index ee4a31cd95..b5f9762f03 100644 --- a/src/parallel/PARALLEL_global_Real_Time.F +++ b/src/parallel/PARALLEL_global_Real_Time.F @@ -89,12 +89,12 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) call PAR_INDEX_copy(PAR_IND_Xk_ibz,PAR_IND_WF_k) PAR_IND_WF_b_ID=PAR_COM_WF_b_INDEX%CPU_id ! - call PARALLEL_index(PAR_IND_B_mat_ordered,(/ UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1)-1 /),& + call PARALLEL_index(PAR_IND_B_mat_ordered,(/ UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1) /),& & COMM=PAR_COM_WF_b_INDEX,CONSECUTIVE=.TRUE.,NO_EMPTIES=.TRUE.) ! call PARALLEL_live_message("Bands Matrix (ordered)",ENVIRONMENT="Real_Time",& & LOADED=PAR_IND_B_mat_ordered%n_of_elements(PAR_IND_WF_b_ID+1),& -& TOTAL=UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1)-1,& +& TOTAL=UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1),& & NCPU=PAR_COM_WF_b_INDEX%n_CPU) ! YAMBO_ALLOC(PAR_IND_WF_b%n_of_elements,(PAR_COM_WF_b_INDEX%n_CPU)) @@ -104,7 +104,7 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! do ib1=RT_bands(1),RT_bands(2) do ib2=ib1,RT_bands(2) - if (PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1)-1 )) then + if (PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1) )) then if (.not.PAR_IND_WF_b%element_1D(ib1)) then PAR_IND_WF_b%element_1D(ib1)=.TRUE. PAR_IND_WF_b%n_of_elements(PAR_IND_WF_b_ID+1)=PAR_IND_WF_b%n_of_elements(PAR_IND_WF_b_ID+1)+1 diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index 9b27bd033e..f03f0bfd01 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -129,7 +129,7 @@ subroutine XCo_local(E,Xk) endif ! if (.not.PAR_IND_WF_k%element_1D(ik)) cycle - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle ! else #endif @@ -189,7 +189,7 @@ subroutine XCo_local(E,Xk) #if defined _RT if (l_real_time) then if (.not.PAR_IND_WF_k%element_1D(ik)) cycle - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle else #endif if (.not.PAR_IND_WF_linear%element_2D(ib,ik)) cycle diff --git a/src/tddft/TDDFT_BSK_disk_2_FXC.F b/src/tddft/TDDFT_BSK_disk_2_FXC.F index 86b9146506..85c922824d 100644 --- a/src/tddft/TDDFT_BSK_disk_2_FXC.F +++ b/src/tddft/TDDFT_BSK_disk_2_FXC.F @@ -100,7 +100,7 @@ subroutine TDDFT_BSK_disk_2_FXC(iq,Xk,W,X_static) ! ACTION=RD if (ik1==1.and.ik2==nXkibz) ACTION=RD_CL - call io_control(ACTION=ACTION,COM=NONE,SEC=(/UP_matrix_index(ik1,ik2)/),ID=ID) + call io_control(ACTION=ACTION,COM=NONE,SEC=(/UP_matrix_index(ik1,ik2)+1/),ID=ID) io_BS_err=io_BS(iq,X_static,ID) ! if (BS_res_K_exchange) then diff --git a/src/xc_functionals/el_density_matrix.F b/src/xc_functionals/el_density_matrix.F index 32a51d256f..2d3d87d8c4 100644 --- a/src/xc_functionals/el_density_matrix.F +++ b/src/xc_functionals/el_density_matrix.F @@ -85,7 +85,7 @@ subroutine el_density_matrix(G_lesser,en,Xk,rho,lowest_band) do ib2=ib1,RT_bands(2) ! #if !defined _YPP_RT - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1) )) cycle #endif ! f_occ=cZERO diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index cc1690ae81..f6b23ae52b 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -120,7 +120,7 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) do ib2=ib1,RT_bands(2) ! #if !defined _YPP_RT - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1) )) cycle #endif ! f_occ=cZERO From f0dc4be1a9f43145d1bb64515278d43071e91271 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 8 Jun 2025 23:26:38 +0200 Subject: [PATCH 1009/1367] Fixed parallelization of CVonly collisions --- src/modules/mod_hamiltonian.F | 12 +++++- src/modules/mod_parallel_interface.F | 12 +++++- src/parallel/PARALLEL_MATRIX_distribute.F | 45 ++++++++++++++++++++++- src/parallel/PARALLEL_collisions.F | 24 ++++++++++-- src/parallel/PARALLEL_global_Real_Time.F | 44 +++++++++++++++------- 5 files changed, 117 insertions(+), 20 deletions(-) diff --git a/src/modules/mod_hamiltonian.F b/src/modules/mod_hamiltonian.F index 2260c55f8d..c7059a37f6 100644 --- a/src/modules/mod_hamiltonian.F +++ b/src/modules/mod_hamiltonian.F @@ -59,9 +59,19 @@ module hamiltonian integer function B_mat_index(ib1,ib2,nb) integer :: ib1,ib2,nb(2) ! + ! This is identical to + ! B_mat_index = matrix_index(ib1-nb(1)+1,ib2-nb(1)+1,nb(2)-nb(1)+1) B_mat_index=(ib1-nb(1))*(nb(2)-nb(1)+1)+ib2-nb(1)+1 ! - end function + end function B_mat_index + ! + integer function B_mat_index_cv(ib1,ib2,nb1,nb2) + integer :: ib1,ib2,nb1(2),nb2(2) + ! + B_mat_index_cv=(ib1-nb1(1))*(nb2(2)-nb2(1)+1)+ib2-nb2(1)+1 + ! + end function B_mat_index_cv + ! ! subroutine H_QP_table_setup(E) use drivers, ONLY:l_use_collisions diff --git a/src/modules/mod_parallel_interface.F b/src/modules/mod_parallel_interface.F index eb9cf28b18..e392c30c57 100644 --- a/src/modules/mod_parallel_interface.F +++ b/src/modules/mod_parallel_interface.F @@ -97,7 +97,17 @@ subroutine PARALLEL_MATRIX_distribute(COMM,PAR_IND,nb,PAR_index,PAR_ID,PAR_n_ele integer, optional:: PAR_index(:,:) integer, optional:: PAR_ID integer, optional:: PAR_n_elements - end subroutine + end subroutine PARALLEL_MATRIX_distribute + ! + subroutine PARALLEL_MATRIX_distribute_cv(COMM,PAR_IND,nb1,nb2,PAR_index,PAR_ID,PAR_n_elements) + use parallel_m, ONLY:yMPI_comm,PP_indexes + type(yMPI_comm) :: COMM + type(PP_indexes) :: PAR_IND + integer :: nb1(2),nb2(2) + integer, optional:: PAR_index(:,:) + integer, optional:: PAR_ID + integer, optional:: PAR_n_elements + end subroutine PARALLEL_MATRIX_distribute_cv ! subroutine PARALLEL_WF_index(COMM) use parallel_m, ONLY:yMPI_comm diff --git a/src/parallel/PARALLEL_MATRIX_distribute.F b/src/parallel/PARALLEL_MATRIX_distribute.F index cb4c6ccba0..cc93dd625c 100644 --- a/src/parallel/PARALLEL_MATRIX_distribute.F +++ b/src/parallel/PARALLEL_MATRIX_distribute.F @@ -49,4 +49,47 @@ subroutine PARALLEL_MATRIX_distribute(COMM,PAR_IND,nb,PAR_index,PAR_ID,PAR_n_ele PAR_n_elements=PAR_IND%n_of_elements(COMM%CPU_id+1) endif ! -end subroutine +end subroutine PARALLEL_MATRIX_distribute +! +! +subroutine PARALLEL_MATRIX_distribute_cv(COMM,PAR_IND,nb1,nb2,PAR_index,PAR_ID,PAR_n_elements) + ! + use parallel_m, ONLY:yMPI_comm,PP_indexes + use parallel_int, ONLY:PARALLEL_index + use hamiltonian, ONLY:B_mat_index_cv + ! + implicit none + ! + type(yMPI_comm) :: COMM + type(PP_indexes) :: PAR_IND + integer :: nb1(2),nb2(2) + ! + integer, optional:: PAR_index(:,:) + integer, optional:: PAR_ID + integer, optional:: PAR_n_elements + ! + ! Work space + ! + integer :: ib1,ib2,Nel + ! + call PARALLEL_index(PAR_IND,(/ (nb1(2)-nb1(1)+1)*(nb2(2)-nb2(1)+1) /),COMM=COMM,CONSECUTIVE=.TRUE.,NO_EMPTIES=.TRUE.) + ! + if (present(PAR_ID)) PAR_ID=COMM%CPU_id + ! + if (present(PAR_index)) then + Nel=PAR_IND%n_of_elements(COMM%CPU_id+1) + PAR_index=0 + Nel=0 + do ib1=nb1(1),nb1(2) + do ib2=nb2(1),nb2(2) + if (PAR_IND%element_1D( B_mat_index_cv(ib1,ib2,nb1,nb2) ) ) then + Nel=Nel+1 + PAR_index(ib1,ib2)=Nel + endif + enddo + enddo + endif + ! + if (present(PAR_n_elements)) PAR_n_elements=PAR_IND%n_of_elements(COMM%CPU_id+1) + ! +end subroutine PARALLEL_MATRIX_distribute_cv diff --git a/src/parallel/PARALLEL_collisions.F b/src/parallel/PARALLEL_collisions.F index faceb7def4..27c3cc5a90 100644 --- a/src/parallel/PARALLEL_collisions.F +++ b/src/parallel/PARALLEL_collisions.F @@ -128,10 +128,11 @@ subroutine PARALLEL_collisions( k, COLL_grp ) ! use drivers, ONLY:l_eval_collisions use parallel_int, ONLY:PARALLEL_live_message,PARALLEL_check_phase_space - use collision_ext, ONLY:COLLISIONS_group,COLL_bands + use collision_ext, ONLY:COLLISIONS_group,COLL_bands,COLLISIONS_CV_only use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_B_mat,PAR_IND_G_k,PAR_IND_Q_bz,PAR_IND_QP,& & l_par_RT,l_par_SE,l_par_SC,l_par_NL - use hamiltonian, ONLY:B_mat_index + use hamiltonian, ONLY:B_mat_index,B_mat_index_cv + use electrons, ONLY:n_met_bands,n_full_bands use R_lattice, ONLY:bz_samp,qindx_S,nqbz ! #include @@ -141,7 +142,8 @@ subroutine PARALLEL_collisions( k, COLL_grp ) ! ! Work Space ! - integer :: i_coll,i_k,ib1,ib2,NC_tot,i_q,i_p,i_p_bz + integer :: i_coll,i_k,ib1,ib2,NC_tot,i_q,i_p,i_p_bz, & + & blim1(2),blim2(2),nb_cv,i1 ! if ( COLL_grp%N == 0 ) return ! @@ -157,6 +159,12 @@ subroutine PARALLEL_collisions( k, COLL_grp ) COLL_grp%PAR_map=0 NC_tot=0 ! + if (COLLISIONS_CV_only) then + blim1=(/COLL_bands(1),maxval(n_met_bands)/) + blim2=(/minval(n_full_bands),COLL_bands(2)/) + nb_cv=(blim1(2)-blim1(1)+1)*(blim2(2)-blim2(1)+1) + endif + ! do i_coll=1,COLL_grp%N ! ib1 = COLL_grp%state(i_coll,1) @@ -166,7 +174,15 @@ subroutine PARALLEL_collisions( k, COLL_grp ) ! if (l_par_RT) then if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle - if (.not.PAR_IND_B_mat%element_1D( B_mat_index(ib1,ib2,COLL_bands) ) ) cycle + if (COLLISIONS_CV_only) then + if (ib1> blim1(2) .and. ib2> blim1(2) ) cycle + if (ib1< blim1(1) .and. ib2< blim2(1) ) cycle + if (ib1ib2) i1=B_mat_index_cv(ib2,ib1,blim2,blim1)!+nb_cv + else + i1=B_mat_index(ib1,ib2,COLL_bands) + endif + if (.not.PAR_IND_B_mat%element_1D( i1 ) ) cycle endif ! if (l_par_NL) then diff --git a/src/parallel/PARALLEL_global_Real_Time.F b/src/parallel/PARALLEL_global_Real_Time.F index b5f9762f03..10decbdb89 100644 --- a/src/parallel/PARALLEL_global_Real_Time.F +++ b/src/parallel/PARALLEL_global_Real_Time.F @@ -8,15 +8,16 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! use drivers, ONLY:l_eval_collisions - use electrons, ONLY:levels + use electrons, ONLY:levels,n_met_bands,n_full_bands use R_lattice, ONLY:bz_samp use IO_int, ONLY:IO_and_Messaging_switch use openmp, ONLY:n_threads_RT,OPENMP_set_threads use parallel_int, ONLY:PARALLEL_index,PARALLEL_assign_chains_and_COMMs,& -& PARALLEL_live_message,PARALLEL_MATRIX_distribute - use collision_ext, ONLY:COH_collisions,HXC_collisions,GW_NEQ_collisions +& PARALLEL_live_message,PARALLEL_MATRIX_distribute,& +& PARALLEL_MATRIX_distribute_cv + use collision_ext, ONLY:COH_collisions,HXC_collisions,GW_NEQ_collisions,COLLISIONS_CV_only use matrix_operate,ONLY:UP_matrix_index - use hamiltonian, ONLY:B_mat_index + use hamiltonian, ONLY:B_mat_index,B_mat_index_cv use real_time, ONLY:RT_bands,l_RT_uses_E_FineGd use parallel_m, ONLY:ncpu,HEAD_QP_cpu,HEAD_k_cpu,HEAD_q_cpu,COMM_copy,PAR_INDEX_copy,& & PAR_build_index,PP_indexes_reset @@ -42,7 +43,8 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! ! Work space ! - integer :: ib1,ib2,ik,nk_G_IO,nk_SERIAL,i_shift + integer :: ib1,ib2,ik,nk_G_IO,nk_SERIAL,i_shift,& + & blim1(2),blim2(2) logical :: CONSECUTIVE ! CALL PARALLEL_structure(4,(/"k ","b ","q ","qp"/)) @@ -148,7 +150,13 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! endif ! - call PARALLEL_MATRIX_distribute(PAR_COM_G_b_INDEX,PAR_IND_B_mat,RT_bands) + if (COLLISIONS_CV_only) then + blim1=(/RT_bands(1),maxval(n_met_bands)/) + blim2=(/minval(n_full_bands),RT_bands(2)/) + call PARALLEL_MATRIX_distribute_cv(PAR_COM_G_b_INDEX,PAR_IND_B_mat,blim1,blim2) + else + call PARALLEL_MATRIX_distribute(PAR_COM_G_b_INDEX,PAR_IND_B_mat,RT_bands) + endif ! call PAR_INDEX_copy(PAR_IND_Xk_ibz,PAR_IND_DIPk_ibz) PAR_IND_DIPk_ibz_ID=PAR_IND_Xk_ibz_ID @@ -156,14 +164,24 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) call PAR_build_index(PAR_IND_DIPk_ibz,Xk%nibz,PAR_DIPk_ibz_index,PAR_DIPk_nibz) YAMBO_ALLOC(PAR_Xk_ibz_index,(Xk%nibz)) call PAR_build_index(PAR_IND_Xk_ibz,Xk%nibz,PAR_Xk_ibz_index,PAR_Xk_nibz) - do ib1=RT_bands(1),RT_bands(2) - do ib2=RT_bands(1),RT_bands(2) - if (PAR_IND_B_mat%element_1D( B_mat_index(ib1,ib2,RT_bands) ) ) then - PAR_IND_WF_b%element_1D(ib1)=.TRUE. - PAR_IND_WF_b%element_1D(ib2)=.TRUE. - endif + ! + if (COLLISIONS_CV_only) then + do ib1=blim1(1),blim1(2) + do ib2=blim2(1),blim2(2) + if (.not.PAR_IND_B_mat%element_1D( B_mat_index_cv(ib1,ib2,blim1,blim2) ) ) cycle + PAR_IND_WF_b%element_1D(ib1)=.TRUE. + PAR_IND_WF_b%element_1D(ib2)=.TRUE. + enddo enddo - enddo + else + do ib1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + if (.not.PAR_IND_B_mat%element_1D( B_mat_index(ib1,ib2,RT_bands) ) ) cycle + PAR_IND_WF_b%element_1D(ib1)=.TRUE. + PAR_IND_WF_b%element_1D(ib2)=.TRUE. + enddo + enddo + endif ! nk_G_IO=0 PAR_G_k_range=0 From 78105410da9700ae3b8ae98a799327186edddfe2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 9 Jun 2025 12:20:02 +0200 Subject: [PATCH 1010/1367] Minor fix to download of external lib --- config/mk/global/actions/download_external_libraries.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mk/global/actions/download_external_libraries.mk b/config/mk/global/actions/download_external_libraries.mk index ea091fd8c1..2abbe356c8 100644 --- a/config/mk/global/actions/download_external_libraries.mk +++ b/config/mk/global/actions/download_external_libraries.mk @@ -18,7 +18,7 @@ fftw-dl: fftqe-dl: @LIB2DO="fftqe"; $(get_external_libraries) yaml-dl: - @LIB2DO="fftqe"; $(get_external_libraries) + @LIB2DO="yaml"; $(get_external_libraries) futile-dl: @LIB2DO="futile"; $(get_external_libraries) iotk-dl: From 2a805576dbfdf32b38267aa64327b03ac18f46ed Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 9 Jun 2025 16:46:01 +0200 Subject: [PATCH 1011/1367] eval_dG set to true in Pp mode of nonlinear optics (Suggestion 2 by CA) --- src/modules/mod_nl_optics.F | 4 ++-- src/nloptics/NL_Hamiltonian.F | 4 ++-- src/nloptics/NL_initialize.F | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 8b63b9c21a..190001e814 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -197,7 +197,7 @@ subroutine NL_alloc(en) YAMBO_ALLOC(RT_Vnl_xc,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol)) endif ! - if(eval_dG.or.l_pump_and_probe) then + if(eval_dG) then YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol,1)) endif ! @@ -282,7 +282,7 @@ subroutine NL_free if(l_use_Hxc_collisions) then YAMBO_FREE(RT_Vnl_xc) endif - if(eval_dG.or.l_pump_and_probe) then + if(eval_dG) then YAMBO_FREE(dG_lesser) endif ! diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 28062e13d9..418f27b573 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -27,7 +27,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) use xc_functionals, ONLY:V_xc,XC_potential_driver use nl_optics, ONLY:Correlation,V_xc_0,full_rho,IPA,E_full,LRC,JGM,LRCW,l_use_DIPOLES,NL_LRC_alpha, & & NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,eval_dG, & -& NL_bands,VAL_BANDS,NL_P,l_pump_and_probe,LSEX,LHF,Wk_EQ +& NL_bands,VAL_BANDS,NL_P,LSEX,LHF,Wk_EQ use global_XC, ONLY:WF_xc_functional,WF_kind use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index use wrapper_omp, ONLY:M_plus_alpha_M_omp @@ -89,7 +89,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Evaluate the G_lesser for current/polarization and collisions ! ====================================================== - if(eval_dG.or.l_pump_and_probe) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,:,1)) + if(eval_dG) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,:,1)) ! ! Evaluate the Polarization ! =================================================================== diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 971f11d511..f6b239a17b 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -201,6 +201,7 @@ subroutine NL_initialize(E,k) ! if(all(NL_er<0._SP).and.n_angles==0) then l_pump_and_probe=.true. + eval_dG=.true. l_NE_with_fields=.true. call msg('s', '[NL] Variables NLEnSteps,NLEnRange,NLAngSteps,NLrotaxis, are ignored ') call msg('sr','[NL] Pump and probe configuration: verbosity set to high') From b6b807941265e820f5133513843e40d80a00cffc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 9 Jun 2025 16:49:26 +0200 Subject: [PATCH 1012/1367] nw replaced by n_runs in NL_driver --- src/nloptics/NL_driver.F | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 2efbd06d2b..9c8a76cd99 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -55,7 +55,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ! Work Space ! - integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,nw,ik,ik_mem + integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,ik,ik_mem character(schlen) :: l_message logical :: l_dynamics_is_over real(SP) :: OBSERVABLES(25),Time,angle @@ -282,9 +282,8 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) else call error("Wrong input: use pump-probe mode 'yambo_nl -u p' or set a number of frequencie/angles with 'yambo_nl -u n'") endif - nw=PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1) if(.not.l_pump_and_probe) NE_i_time=0 - call live_timing(l_message,nw*(NE_steps-NE_i_time)) + call live_timing(l_message,n_runs*(NE_steps-NE_i_time)) ! do i_f=1,n_runs ! From be316b4981c40a9b831561ab2deaae478cab1b9e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 10 Jun 2025 00:16:16 +0200 Subject: [PATCH 1013/1367] Fixed commit 2a805576dbfdf32b38267aa64327b03ac18f46ed eval_dG is not properly set after the definition of correlations --- src/nloptics/NL_initialize.F | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index f6b239a17b..4098d4feab 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -201,7 +201,6 @@ subroutine NL_initialize(E,k) ! if(all(NL_er<0._SP).and.n_angles==0) then l_pump_and_probe=.true. - eval_dG=.true. l_NE_with_fields=.true. call msg('s', '[NL] Variables NLEnSteps,NLEnRange,NLAngSteps,NLrotaxis, are ignored ') call msg('sr','[NL] Pump and probe configuration: verbosity set to high') @@ -395,6 +394,8 @@ subroutine NL_initialize(E,k) ! endif ! + if (l_pump_and_probe) eval_dG=.true. + ! if(eval_COLLISIONS) then COLLISIONS_load_SP =.not.l_no_compress_COLL COLLISIONS_compr =.not.l_no_compress_COLL From 7f09ee046fec84cfe76382896065a748ace22b05 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 10 Jun 2025 00:29:50 +0200 Subject: [PATCH 1014/1367] Fixed revision number reference for PARS size 8 in variables_ELPH Change done to be compatible with test-suite --- src/io/variables_ELPH.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 075f57a4dc..591556c11d 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -42,7 +42,7 @@ integer function variables_ELPH(ID,what) ! PARS_size=6 if ( ver_is_gt_or_eq(ID,revision=18920)) PARS_size=7 - if ( ver_is_gt_or_eq(ID,revision=20495)) PARS_size=8 + if ( ver_is_gt_or_eq(ID,revision=21400)) PARS_size=8 call def_variable_elemental(ID,"PARS",PARS_size,SP,0) ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) @@ -59,7 +59,7 @@ integer function variables_ELPH(ID,what) & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) endif ! - if (ver_is_gt_or_eq(ID,revision=20495)) then + if (ver_is_gt_or_eq(ID,revision=21400)) then call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller interaction",L0=l_GKKP_DW, & & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) else From f93c6f61f46159b0c6e78aa283976b7b245288ad Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 10 Jun 2025 10:49:57 +0200 Subject: [PATCH 1015/1367] Removed lines of code which are not used anymore --- src/dipoles/DIPOLE_kb_init.F | 3 +- src/hamiltonian/Pseudo_KB_G_to_R_space.F | 3 +- src/io/.objects | 2 +- src/io/io_Vnl.F | 124 ----------------------- src/modules/mod_pseudo.F | 4 - ypp/symmetries/fix_PPs.F | 61 +---------- 6 files changed, 6 insertions(+), 191 deletions(-) delete mode 100644 src/io/io_Vnl.F diff --git a/src/dipoles/DIPOLE_kb_init.F b/src/dipoles/DIPOLE_kb_init.F index a3fd500572..cd8c4ae18c 100644 --- a/src/dipoles/DIPOLE_kb_init.F +++ b/src/dipoles/DIPOLE_kb_init.F @@ -23,7 +23,7 @@ subroutine DIPOLE_kb_init(Xen,Dip,io_err,ID) type(levels), intent(in) :: Xen type(DIPOLE_t),intent(inout) :: Dip ! - integer :: io_err(3) + integer :: io_err(2) integer :: ID ! real(SP) :: j,mj @@ -136,7 +136,6 @@ subroutine DIPOLE_kb_init(Xen,Dip,io_err,ID) ! io_err(1)=io_KB_abinit_err io_err(2)=io_KB_pwscf_err - io_err(3)=-1 ! if ( pp_kbv_dim>0 ) call msg('s','[x,Vnl] computed using '//trim(intc(pp_kbv_dim))//' projectors') if ( pp_kbv_dim>50) call warning(' [x,Vnl] slows the Dipoles computation. To neglect it rename the ns.kb_pp file') diff --git a/src/hamiltonian/Pseudo_KB_G_to_R_space.F b/src/hamiltonian/Pseudo_KB_G_to_R_space.F index 4232aebc97..cc8b02944b 100644 --- a/src/hamiltonian/Pseudo_KB_G_to_R_space.F +++ b/src/hamiltonian/Pseudo_KB_G_to_R_space.F @@ -39,7 +39,7 @@ subroutine Pseudo_KB_G_to_R_space(Xk,Xen) ! ! I / O ! - integer :: IO_ACT_NOW,ID,ID_R,io_err(3),io_KB_pwscf_err,io_KB_abinit_err,io_Vnl_err,io_KB_real_space_err + integer :: IO_ACT_NOW,ID,ID_R,io_err(2),io_KB_pwscf_err,io_KB_abinit_err,io_KB_real_space_err integer, external :: io_KB_abinit,io_KB_pwscf,io_KB_real_space ! ! @@ -51,7 +51,6 @@ subroutine Pseudo_KB_G_to_R_space(Xk,Xen) ! io_KB_abinit_err= io_err(1) io_KB_pwscf_err = io_err(2) - io_Vnl_err = io_err(3) ! if(io_KB_abinit_err/=0.and.io_KB_pwscf_err/=0) return ! diff --git a/src/io/.objects b/src/io/.objects index e61e913b36..c6a1f7bd89 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -20,7 +20,7 @@ COLL_objects = COLL_objects = io_OSCLL.o #endif objs = ver_is_gt_or_eq.o \ - io_Vnl.o io_E_SOC_map.o \ + io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ io_QINDX.o io_kpts.o io_QP_and_GF.o io_X.o io_MPA.o \ io_DB1.o io_WF.o io_KB_abinit.o io_KB_pwscf.o io_HF_and_locXC.o \ diff --git a/src/io/io_Vnl.F b/src/io/io_Vnl.F deleted file mode 100644 index 7fbd86b7f1..0000000000 --- a/src/io/io_Vnl.F +++ /dev/null @@ -1,124 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2011 The Yambo Team -! -! Authors (see AUTHORS file for details): AM -! -integer function io_Vnl(Dip,Xen,ID) - ! - use pars, ONLY:SP,schlen - use DIPOLES, ONLY:DIPOLE_t - use electrons, ONLY:levels,n_sp_pol - use pseudo, ONLY:Vnl - use R_lattice, ONLY:nXkibz - use matrix_operate,ONLY:mat_c2r,mat_r2c - use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header,io_fragment - use IO_m, ONLY:io_sec,io_status,read_is_on,write_is_on,io_extension,frag_WF - use global_XC, ONLY:Dipole_WF_xc_string,loaded_WF_xc_string - ! -#include - ! - type(DIPOLE_t)::Dip - type(levels)::Xen - integer ::ID - ! - ! Work Space - ! - integer :: i1,ixyz,sec_size,i_spin,ID_frag - integer :: db_nbm(2),db_nbf(2),db_nb(2) - character(schlen) :: VAR_name - real(SP),allocatable :: Vnl_disk(:,:,:) ! complex, ic, iv - ! - io_Vnl=io_connect(desc='Vnl',type=0,ID=ID) - ! - if (io_Vnl/=0) goto 1 - ! - if (any((/io_sec(ID,:)==1/))) then - ! - io_Vnl=io_header(ID,IMPOSE_SN=.true.,FRAG=frag_WF) - if (io_Vnl/=0) goto 1 - ! - sec_size=5 - ! - call io_elemental(ID,VAR="PARS",VAR_SZ=sec_size,MENU=0) - call io_elemental(ID,DB_I1=db_nb,& -& VAR=" Dip band range ",I1=Dip%ib,CHECK=.true.,OP=(/">=","<="/)) - if (n_sp_pol==1) then - call io_elemental(ID,DB_I0=db_nbm(1),& -& VAR=" Metallic bands ",I0=Xen%nbm(1),CHECK=.true.,OP=(/"<="/)) - call io_elemental(ID,DB_I0=db_nbf(1),& -& VAR=" Filled bands ",I0=Xen%nbf(1),CHECK=.true.,OP=(/">="/)) - else - call io_elemental(ID,DB_I1=db_nbm,& -& VAR=" Metallic bands ",I1=Xen%nbm,CHECK=.true.,OP=(/"<=","<="/)) - call io_elemental(ID,DB_I1=db_nbf,& -& VAR=" Filled bands ",I1=Xen%nbf,CHECK=.true.,OP=(/">=",">="/)) - endif - call io_elemental(ID,& -& VAR=" RL vectors in the sum ",I0=Dip%ng,WARN=.true.,OP=(/"<="/)) - ! - call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - ! - ! Wavefunctions xc - ! - call io_elemental(ID,VAR='WAVE_FUNC_XC',CH0="",VAR_SZ=1,MENU=0) - call io_elemental(ID,DB_CH0=Dipole_WF_xc_string,CH0=loaded_WF_xc_string,& -& VAR=' Wavefunctions ',CHECK=.true.,OP=(/"=="/)) - call io_elemental(ID,VAR="",VAR_SZ=0) - ! - io_Vnl=io_status(ID) - if (io_Vnl/=0) then - call warning(' The commutator DB cannot be used. Try to lower ElecTemp in the input.') - goto 1 - endif - endif - ! - ! On disk the size is Vnl(3,db_nb(2),maxval(db_nbm),nXkibz) - ! - sec_size=3*db_nb(2)*maxval(db_nbm) - if (any((/io_sec(ID,:)==2/))) then - ! - YAMBO_ALLOC(Vnl_disk,(db_nb(2),maxval(db_nbm),2))!Allocate to exactly the sizeo on disk) - ! - if(read_is_on(ID)) then - ! - ! Fill an array Vnl to size required by yambo, ignore extra elements - ! - YAMBO_ALLOC(Vnl,(3,Dip%ib(2),maxval(db_nbm),nXkibz,n_sp_pol)) - endif - ! - do i1=1,nXkibz - ! - ! Fragmentation - ! - io_extension(ID)='Vnl' - call io_fragment(ID,ID_frag,i_fragment=i1) - ! - do ixyz=1,3 - ! - do i_spin=1,n_sp_pol - ! - if (write_is_on(ID)) call mat_c2r(Vnl(ixyz,:,:,i1,i_spin),Vnl_disk) - ! - write (VAR_name,'(3(a,i4.4))') 'Vnl_k_',i1,'_xyz_',ixyz,'_spin_',i_spin - call io_bulk(ID_frag,VAR=trim(VAR_name),VAR_SZ=shape(Vnl_disk)) - call io_bulk(ID_frag,R3=Vnl_disk) - ! - if (read_is_on(ID)) call mat_r2c(Vnl_disk,Vnl(ixyz,:,:,i1,i_spin)) - ! - enddo - ! - enddo - ! - call io_fragment_disconnect(ID,ID_frag) - ! - enddo - ! - YAMBO_FREE(Vnl_disk) - ! - endif - ! -1 call io_disconnect(ID=ID) - ! -end function diff --git a/src/modules/mod_pseudo.F b/src/modules/mod_pseudo.F index 4ee2823c26..68c202182e 100644 --- a/src/modules/mod_pseudo.F +++ b/src/modules/mod_pseudo.F @@ -64,10 +64,6 @@ module pseudo integer, allocatable:: qe_atoms_map(:,:) type(bec_type), allocatable:: becp(:,:) ! - ! PW (OLD) - !========= - complex(SP), allocatable :: Vnl(:,:,:,:,:) - ! contains ! ! Abinit (OLD) diff --git a/ypp/symmetries/fix_PPs.F b/ypp/symmetries/fix_PPs.F index 0799d4b55b..9de991ca14 100644 --- a/ypp/symmetries/fix_PPs.F +++ b/ypp/symmetries/fix_PPs.F @@ -14,7 +14,7 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont & OP_APP,cp_file,OP_RD_CL,RD_CL,RD,DUMP use electrons, ONLY:n_sp_pol use pseudo, ONLY:pp_kb,pp_kbd,pp_kbs,n_atomic_species,PP_alloc_pwscf,& -& pp_n_l_times_proj_max,PP_free,PP_alloc_abinit,Vnl +& pp_n_l_times_proj_max,PP_free,PP_alloc_abinit use LIVE_t, ONLY:live_timing use DIPOLES, ONLY:DIPOLE_t use stderr, ONLY:intc @@ -44,12 +44,11 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont type(DIPOLE_t) :: Dip character(lchlen) :: core_io_path_save,fragment_name,fragment_name_new integer :: n_steps,ID - integer :: ierr,io_KB_abinit_err,io_KB_pwscf_err,io_Vnl_err + integer :: ierr,io_KB_abinit_err,io_KB_pwscf_err ! real(SP),allocatable :: pp_kb_store(:,:,:,:,:) real(SP),allocatable :: pp_kbd_store(:,:,:,:,:) real(SP),allocatable :: pp_kbs_store(:,:) - complex(SP), allocatable :: Vnl_store(:,:,:,:,:) ! ! Dummies ! @@ -61,13 +60,11 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont ! integer, external :: io_KB_abinit integer, external :: io_KB_pwscf - integer, external :: io_Vnl ! ! Check the presence of PPs DBs ! n_steps=k%nibz-k_save%nibz ! - io_Vnl_err =-1 io_KB_abinit_err=-1 io_KB_pwscf_err =-1 ! @@ -76,9 +73,6 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont Dip%ng=1 ! to overcome check for io nkibz=k_save%nibz ! - call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=VERIFY,ID=ID) - io_Vnl_err=io_Vnl(Dip,E,ID) - ! ! Check for the KB pwscf DB if(.not.io_KB_abinit_err==0) then call io_control(ACTION=OP_RD,COM=NONE,SEC=(/1/),MODE=VERIFY,ID=ID) @@ -91,11 +85,10 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont io_KB_abinit_err=io_KB_abinit(ID) endif ! - if(io_KB_abinit_err/=0.and.io_KB_pwscf_err/=0.and.io_Vnl_err/=0) return + if(io_KB_abinit_err/=0.and.io_KB_pwscf_err/=0) return ! if(io_KB_abinit_err==0) call section('=',"PseudoPotentials KB (Abinit)") if(io_KB_pwscf_err ==0) call section('=',"PseudoPotentials KB (PWscf) ") - if(io_Vnl_err==0) call section('=',"PseudoPotentials old (PWscf)") ! ! Read PP DBs ! @@ -155,19 +148,6 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont ! endif ! - if(io_Vnl_err==0) then - YAMBO_ALLOC(Vnl_store,(3,E%nb,maxval(E%nbm),k_save%nibz,n_sp_pol)) - Vnl_store=(0._SP,0._SP) - ! - call io_control(ACTION=OP_RD_CL,SEC=(/1,2/),ID=ID) - io_Vnl_err=io_Vnl(Dip,E,ID) - ! - Vnl_store=Vnl - ! - YAMBO_FREE(Vnl) - ! - endif - ! core_io_path_save=core_io_path core_io_path=more_io_path ! @@ -379,41 +359,6 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont ! endif ! - if(io_Vnl_err==0) then - ! - YAMBO_ALLOC(Vnl,(3,E%nb,maxval(E%nbm),k%nibz,n_sp_pol)) - ! - Vnl(1:3, 1:E%nb, 1:maxval(E%nbm), 1:k_save%nibz, 1:n_sp_pol)=& - & Vnl_store(1:3, 1:E%nb, 1:maxval(E%nbm), 1:k_save%nibz, 1:n_sp_pol) - ! - if(n_steps>0) call live_timing('PPs rotation',n_steps) - ! - do ik=k_save%nibz+1,k%nibz - ! - ik_save=kpoints_map(1,ik) - is=kpoints_map(2,ik) - ! - forall(ib=1:E%nb,ibm=1:maxval(E%nbm),i_spin=1:n_sp_pol) & - & Vnl(:,ib,ibm,ik,i_spin) = matmul( old_dl_sop(:,:,is), Vnl_store(:,ib,ibm,ik_save,i_spin) ) - ! Vnl is invariant under T-rev as iR and p ?? - if ( S_contains_TR(is) ==1 ) Vnl(:,:,:,ik,:)=conjg( Vnl(:,:,:,ik,:) ) - ! - call live_timing(steps=1) - ! - enddo - ! - Dip%ng=wf_ng - ! - call io_control(ACTION=OP_WR_CL,COM=NONE,SEC=(/1,2/),ID=ID) - io_Vnl_err=io_Vnl(Dip,E,ID) - ! - YAMBO_FREE(Vnl) - YAMBO_FREE(Vnl_store) - ! - if(n_steps>0) call live_timing() - ! - endif - ! ! YAMBO_FREE(wf_nc_k_reduced) YAMBO_FREE(wf_igk_reduced) From 3ade30483e15156e75ddab598446f364d904f422 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 11 Jun 2025 17:13:12 +0200 Subject: [PATCH 1016/1367] Version 5.3.0, Revision 24874, Hash 7f09ee046 MODIFIED * configure include/version/version.m4 dipoles/Berry_polarization_EQ.F interface/INIT_activate.F interface/INIT_load.F modules/SET_defaults.F modules/mod_electric.F nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Removed useless future to force periodic polarization (wrong feature) Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/dipoles/Berry_polarization_EQ.F | 8 ++++---- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 - src/modules/SET_defaults.F | 3 +-- src/modules/mod_electric.F | 2 -- src/nloptics/NL_initialize.F | 5 +---- 8 files changed, 21 insertions(+), 28 deletions(-) diff --git a/configure b/configure index 6a164e1348..1b0cc215b3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24464 h.c95ccf807. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24874 h.7f09ee046. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24464 h.c95ccf807' -PACKAGE_STRING='Yambo 5.3.0 r.24464 h.c95ccf807' +PACKAGE_VERSION='5.3.0 r.24874 h.7f09ee046' +PACKAGE_STRING='Yambo 5.3.0 r.24874 h.7f09ee046' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1699,7 +1699,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24464 h.c95ccf807 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24874 h.7f09ee046 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1765,7 +1765,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24464 h.c95ccf807:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24874 h.7f09ee046:";; esac cat <<\_ACEOF @@ -2019,7 +2019,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24464 h.c95ccf807 +Yambo configure 5.3.0 r.24874 h.7f09ee046 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2648,7 +2648,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24464 h.c95ccf807, which was +It was created by Yambo $as_me 5.3.0 r.24874 h.7f09ee046, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3406,8 +3406,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24464" -SHASH="c95ccf807" +SREVISION="24874" +SHASH="7f09ee046" @@ -18428,7 +18428,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24464 h.c95ccf807, which was +This file was extended by Yambo $as_me 5.3.0 r.24874 h.7f09ee046, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18492,7 +18492,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24464 h.c95ccf807 +Yambo config.status 5.3.0 r.24874 h.7f09ee046 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 209d14f252..bbf300cf92 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24464 h.c95ccf807, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24874 h.7f09ee046, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24464" -SHASH="c95ccf807" +SREVISION="24874" +SHASH="7f09ee046" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/dipoles/Berry_polarization_EQ.F b/src/dipoles/Berry_polarization_EQ.F index 7120a524a1..ca7ae366cf 100644 --- a/src/dipoles/Berry_polarization_EQ.F +++ b/src/dipoles/Berry_polarization_EQ.F @@ -11,7 +11,6 @@ !! @param[in] en KS energies !! @param[in] Xk k-points sampling !! @param[in] k_map k-points map -!! @param[in] l_P_periodic force periodicity of pol. respect to the field !! !! @param[out] P_Berry_Red Polarization in reduce cord. ! @@ -31,7 +30,6 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) use R_lattice, ONLY:bz_samp,bz_map use D_lattice, ONLY:a use vec_operate, ONLY:get_id_perpendicular - use electric, ONLY:l_P_periodic ! implicit none ! @@ -80,7 +78,8 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) ! Do we miss a factor 2? ! imag_zeta=aimag(log(zeta)) - if(l_P_periodic) imag_zeta=imag_zeta-1._DP*pi*nint(imag_zeta/(1._DP*pi)) +! Removed feature: force periodicity is a wrong idea +! if(l_P_periodic) imag_zeta=imag_zeta-1._DP*pi*nint(imag_zeta/(1._DP*pi)) ! P_Berry_RED(id_in)=P_Berry_RED(id_in)+imag_zeta ! @@ -93,6 +92,7 @@ subroutine Berry_polarization_EQ(P_Berry_Red,All_S_det,en,Xk,k_map) ! P_Berry_RED=P_Berry_RED/(2._SP*pi)*spin_occ ! - if(l_P_periodic) P_Berry_RED=real(P_Berry_RED,SP)-spin_occ*NINT(real(P_Berry_RED,SP)/spin_occ) +! Removed feature: force periodicity is a wrong idea +! if(l_P_periodic) P_Berry_RED=real(P_Berry_RED,SP)-spin_occ*NINT(real(P_Berry_RED,SP)/spin_occ) ! end subroutine Berry_polarization_EQ diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index f48bc0c7e6..cff9046906 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -567,7 +567,7 @@ subroutine INIT_activate() if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng') if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL COLLCut EvalCurrent InducedField') - call initactivate(1,'FrPolPerdic TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') + call initactivate(1,'TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') call init_QP_ctl_switch('G') ! do i1=1,n_ext_fields diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 09aa46b822..cef5f33bb1 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -672,7 +672,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'DipBandsALL','[DIP] Compute all bands range, not only valence and conduction',verb_level=V_resp) #if defined _NL || defined _ELECTRIC call it('f',defs,'EvPolarization','[DIP] Evaluate Polarization (require DipApproach=Covariant)',verb_level=V_resp) - call it('f',defs,'FrPolPerdic','[DIP] Force periodicity of polarization respect to the external field') #endif #if defined _RT call it('f',defs,'SPINprojected', '[DIP] Project the spin dipoles in the c/v channels ',verb_level=V_real_time) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 69531da8fd..76447e8cc7 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -109,7 +109,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #if defined _SC use magnetic, ONLY:MAG_B,MAG_radius,MAG_hamiltonian_type,MAG_landau,MAG_pauli,& & MAG_gauge,MAG_psi,MAG_theta,phase_trick - use electric, ONLY:l_P_periodic,l_force_SndOrd + use electric, ONLY:l_force_SndOrd #endif #if defined _YAML_OUTPUT use com, ONLY:depth_yaml @@ -589,7 +589,6 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! call IO_desc_reset(SC_desc) ! - l_P_periodic =.FALSE. l_force_SndOrd =.FALSE. ! #endif diff --git a/src/modules/mod_electric.F b/src/modules/mod_electric.F index 8f53a446cb..0c2d1003bd 100644 --- a/src/modules/mod_electric.F +++ b/src/modules/mod_electric.F @@ -28,8 +28,6 @@ module electric ! ! Polarization ! - logical :: l_P_periodic ! Enforce periodicity in the polarization - ! logical :: l_res_symms=.FALSE. ! Do not use resisual symmetries (default False) ! contains diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 4098d4feab..9cacfb5ecd 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -34,7 +34,7 @@ subroutine NL_initialize(E,k) & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& & l_eval_CURRENT,l_pump_and_probe,DephMult,l_velocity_IPA,n_angles,l_test_OSCLL,LHF,eval_OSCLL, & & NL_ang_step,n_runs,NL_rot_axis,loop_on_frequencies,loop_on_angles,NL_initial_versor,max_angle - use electric, ONLY:l_force_SndOrd,l_P_periodic,l_res_symms + use electric, ONLY:l_force_SndOrd,l_res_symms use parser_m, ONLY:parser use stderr, ONLY:intc ! @@ -57,7 +57,6 @@ subroutine NL_initialize(E,k) call parser('FrSndOrd', l_force_SndOrd) call parser('InducedField' , l_RT_induced_field) call parser('EvalCurrent' , l_eval_CURRENT) - call parser('FrPolPerdic' , l_P_periodic) call parser('TestOSCLL', l_test_OSCLL) call parser('NoComprCOLL', l_no_compress_COLL) call parser('UseSymm', l_res_symms) @@ -77,7 +76,6 @@ subroutine NL_initialize(E,k) endif ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') - if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') ! ! Velocity gauge mode ! ======================================= @@ -529,6 +527,5 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Induced Field ',l_RT_induced_field) call msg( 'r', 'Force Snd Order Dipoles ',l_force_SndOrd) call msg( 'r', 'Evaluate Current ',l_eval_CURRENT) - call msg( 'r', 'Enforce periodic pol. ',l_P_periodic) ! end subroutine NL_initialize From 0ed1aceb6cfffb61da1438d4b427677d1292d291 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 12 Jun 2025 16:17:37 +0200 Subject: [PATCH 1017/1367] merged branch master into phys-dichroism --- config/mk/global/libraries.mk | 2 +- sbin/compilation/check_updated_locks.sh | 10 + src/allocations/DIPOLE_ALLOC_global.F | 1 - src/bse/K_IP.F | 2 +- src/bse/K_Transition_check.F | 22 +- src/bse/K_Transitions_setup.F | 11 +- src/bse/K_correlation_collisions_std.F | 10 +- src/bse/K_driver.F | 18 +- src/bse/K_driver_init.F | 33 +- src/bse/K_kernel.F | 13 +- src/bse/K_stored_in_a_big_matrix.F | 67 +- src/bse/K_stored_in_a_slepc_matrix.F | 4 +- src/bz_ops/bz_samp_indexes.F | 11 +- src/bz_ops/k_map_nearest_by_dir.F | 2 +- src/collisions/Build_LSEX_collisions.F | 13 +- src/collisions/COLLISIONS_HXC.F | 572 +++++++++++++----- src/collisions/COLLISIONS_NEQ_GW_static.F | 12 +- src/collisions/COLLISIONS_alloc_and_free.F | 129 ++-- src/collisions/COLLISIONS_basic_operations.F | 35 +- src/collisions/COLLISIONS_compose_nl.F | 56 +- src/collisions/COLLISIONS_compose_rt.F | 143 +++-- src/collisions/COLLISIONS_compose_sc.F | 25 +- src/collisions/COLLISIONS_compress.F | 46 +- src/collisions/COLLISIONS_eval.F | 275 ++++++++- src/collisions/COLLISIONS_linearize_and_IO.F | 98 +-- src/collisions/COLLISIONS_load.F | 14 +- src/collisions/LSEX_potential.F | 2 +- src/collisions/OSCLL_compose_collision.F | 15 +- src/collisions/OSCLL_compose_nl.F | 11 +- src/collisions/OSCLL_compose_vbands.F | 2 +- src/collisions/OSCLL_eval.F | 8 +- src/common/LEVELS_mirror.F | 34 +- src/common/OCCUPATIONS_Fermi.F | 2 + src/communicate/DESC_compare.F | 15 + src/dipoles/.objects | 4 +- src/dipoles/Build_Overlaps_Det_EQ.F | 2 +- src/dipoles/DIPOLE_IO.F | 77 +-- src/dipoles/DIPOLE_build_der_k.F | 305 ++++++++++ src/dipoles/DIPOLE_covariant.F | 17 +- src/dipoles/DIPOLE_dimensions.F | 2 +- src/dipoles/DIPOLE_driver.F | 50 +- src/dipoles/DIPOLE_g_space.F | 10 +- src/dipoles/DIPOLE_overlaps.F | 32 +- src/dipoles/DIPOLE_setup.F | 15 +- src/dipoles/DIPOLE_shifted_grids.F | 471 ++++++++++++-- src/dipoles/OVERLAPS_IO.F | 153 +++++ src/driver/options_projects.c | 6 +- src/driver/options_ypp.c | 4 +- src/el-ph/ELPH_Sigma_c_engine.F | 4 +- src/hamiltonian/Apply_W_field.F | 22 +- src/hamiltonian/Build_Overlaps_det_NEQ.F | 2 + src/hamiltonian/Build_W_operator.F | 3 +- src/hamiltonian/V_qp_basis_to_H.F | 2 +- src/hamiltonian/V_real_space_to_H.F | 2 +- src/hamiltonian/Vgrad_real_space_to_H.F | 2 +- src/hamiltonian/XC_potentials.F | 9 +- src/interface/.objects | 2 +- src/interface/DOUBLE_project.dep | 1 + src/interface/INIT_activate.F | 58 +- src/interface/INIT_check_databases.F | 4 +- src/interface/INIT_fields.F | 112 ++++ src/interface/INIT_load.F | 90 +-- src/interface/INIT_read_command_line.F | 7 +- .../INIT_read_command_line_potentials.F | 4 +- src/interface/NL_project.dep | 1 + src/interface/RT_project.dep | 1 + src/io/.objects | 4 +- src/io/DOUBLE_project.dep | 2 + src/io/NL_project.dep | 2 + src/io/io_ELPH.F | 14 +- src/io/io_NL.F | 34 +- src/io/io_OSCLL.F | 6 +- src/io/io_RT_components.F | 34 +- src/io/io_RT_components_G_lesser.F | 97 ++- src/io/io_RT_components_Reference.F | 5 +- src/io/io_RT_components_TIME_points.F | 6 +- src/io/io_RT_components_V_bands.F | 81 +++ src/io/io_kpts.F | 72 +++ src/io/variables_ELPH.F | 20 +- src/io/variables_NL.F | 3 +- src/io/variables_Overlaps.F | 12 +- src/io/variables_RT_static.F | 27 +- src/io_parallel/io_BS_PAR_block.F | 75 ++- src/io_parallel/io_BS_PAR_init.F | 20 +- src/io_parallel/io_BS_header.F | 7 +- src/io_parallel/io_COLLISIONS.F | 77 ++- src/io_parallel/io_COLLISIONS_header.F | 28 +- src/io_parallel/variables_BS.F | 8 +- src/io_parallel/variables_BS_more.F | 19 +- src/io_serial/.objects | 3 +- src/linear_algebra/.objects | 2 +- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 4 +- .../{SERIAL_SVD_inversion.F => SERIAL_SVD.F} | 50 +- src/modules/NL_project.dep | 1 + src/modules/SET_defaults.F | 41 +- src/modules/SET_logicals.F | 11 +- src/modules/mod_BS.F | 42 +- src/modules/mod_BS_solvers.F | 1 + src/modules/mod_DIPOLES.F | 14 +- src/modules/mod_ELPH.F | 1 + src/modules/mod_IO.F | 5 +- src/modules/mod_RT_control.F | 45 +- src/modules/mod_RT_occupations.F | 13 +- src/modules/mod_collision_el.F | 1 + src/modules/mod_collision_ext.F | 17 +- src/modules/mod_fields.F | 353 +++-------- src/modules/mod_hamiltonian.F | 14 +- src/modules/mod_matrix_operate.F | 14 +- src/modules/mod_nl_optics.F | 20 +- src/modules/mod_parallel_interface.F | 12 +- src/modules/mod_pars.F | 3 +- src/modules/mod_real_time.F | 13 +- src/modules/mod_wave_func.F | 3 +- src/nloptics/.objects | 3 +- src/nloptics/DOUBLE_project.dep | 1 + src/nloptics/NL_Hamiltonian.F | 18 +- src/nloptics/NL_carriers_number.F | 57 ++ src/nloptics/NL_current.F | 11 +- src/nloptics/NL_databases_IO.F | 2 +- src/nloptics/NL_driver.F | 83 ++- src/nloptics/NL_initialize.F | 50 +- src/nloptics/NL_output.F | 16 +- src/nloptics/NL_project.dep | 1 + src/nloptics/NL_start_and_restart.F | 129 +++- src/nloptics/NL_test_collisions.F | 17 +- src/parallel/PARALLEL_MATRIX_distribute.F | 45 +- src/parallel/PARALLEL_collisions.F | 66 +- src/parallel/PARALLEL_global_Non_Linear.F | 17 +- src/parallel/PARALLEL_global_Real_Time.F | 50 +- .../PARALLEL_global_Response_T_transitions.F | 4 +- src/parallel/PARALLEL_global_indexes.F | 2 +- src/parser/mod_itm.F | 2 +- src/pol_function/X_irredux_residuals.F | 4 +- src/pol_function/X_pre_setup.F | 16 +- src/qp/QP_ppa_cohsex.F | 104 ++-- src/qp/QP_real_axis.F | 1 - src/qp/XCo_Hartree_Fock.F | 19 +- src/qp/XCo_local.F | 4 +- src/real_time_control/.objects | 4 +- src/real_time_control/DOUBLE_project.dep | 1 + src/real_time_control/NL_project.dep | 2 + .../RT_Fluence_and_PI_kind.F | 13 +- src/real_time_control/RT_Observables.F | 4 +- src/real_time_control/RT_alloc.F | 16 +- src/real_time_control/RT_average_operator.F | 4 +- src/real_time_control/RT_carriers_number.F | 16 +- src/real_time_control/RT_carriers_object.F | 9 +- .../RT_current_AND_polarization.F | 15 +- src/real_time_control/RT_databases_IO.F | 58 +- src/real_time_control/RT_do_it.F | 8 +- src/real_time_control/RT_energy_components.F | 8 +- src/real_time_control/RT_entropy.F | 30 +- src/real_time_control/RT_field_from_file.F | 104 ++++ src/real_time_control/RT_free.F | 6 +- src/real_time_control/RT_output.F | 2 + src/real_time_control/RT_output_INIT.F | 1 + src/real_time_control/RT_project.dep | 1 + src/real_time_control/RT_small_a.F | 393 ++++++++++++ src/real_time_drivers/RT_driver.F | 20 +- src/real_time_hamiltonian/.objects | 2 +- src/real_time_hamiltonian/RT_Hamiltonian.F | 38 +- src/real_time_hamiltonian/RT_apply_field.F | 61 +- .../RT_gradk_rho_times_E.F | 452 ++++++++++++++ src/real_time_initialize/.objects | 3 +- src/real_time_initialize/DOUBLE_project.dep | 1 + .../RT_Field_Commensurable_Frequencies.F | 4 +- src/real_time_initialize/RT_G_lesser_init.F | 11 +- src/real_time_initialize/RT_initialize.F | 77 ++- .../RT_occupations_and_levels_init.F | 12 +- .../RT_occupations_update.F | 18 +- src/real_time_initialize/RT_project.dep | 1 + .../RT_start_and_restart.F | 18 +- src/real_time_propagation/RT_Dephasing_step.F | 10 +- src/real_time_propagation/RT_EULER_step.F | 133 +++- .../RT_EXP_step_accurate.F | 10 +- src/real_time_propagation/RT_EXP_step_std.F | 18 +- src/real_time_propagation/RT_Ext_fields.F | 31 +- src/real_time_propagation/RT_Glesser_evolve.F | 44 +- .../RT_INV_step_accurate.F | 18 +- src/real_time_propagation/RT_INV_step_diago.F | 20 +- src/real_time_propagation/RT_INV_step_std.F | 16 +- .../RT_IO_type_time_steps.F | 3 +- src/real_time_propagation/RT_Integrator.F | 65 +- .../RT_Integrator_init.F | 10 +- .../RT_Scattering_step.F | 24 +- src/real_time_propagation/RT_apply_RWA.F | 8 +- .../RT_occupations_eval.F | 30 +- .../RT_propagate_fields.F | 13 +- .../RT_time_step_update.F | 26 +- src/sc/OEP_ApplySigmaCSX.F | 8 +- src/setup/setup.F | 9 +- src/tddft/TDDFT_BSK_disk_2_FXC.F | 2 +- src/wf_and_fft/WF_shift_kpoint.F | 2 +- src/wf_and_fft/WF_symm_kpoint.F | 4 +- src/xc_functionals/el_density_and_current.F | 2 +- src/xc_functionals/el_density_matrix.F | 2 +- src/xc_functionals/el_magnetization_matrix.F | 2 +- ypp/YPPmodules/mod_YPP_real_time.F | 5 + ypp/el-ph/ELPH_databases.F | 7 +- ypp/interface/INIT_load_ypp.F | 10 +- ypp/interface/INIT_ypp.F | 15 +- ypp/real_time/.objects | 2 +- ypp/real_time/DOUBLE_project.dep | 1 + ypp/real_time/RT_1D_Fourier_Transform.F | 50 +- ypp/real_time/RT_G_two_times_build.F | 217 +++---- ypp/real_time/RT_OBSERVABLES_IO.F | 12 +- ypp/real_time/RT_OBSERVABLES_IO_path.F | 30 +- ypp/real_time/RT_OBSERVABLES_damp_and_write.F | 2 + ypp/real_time/RT_Polarization.F | 12 +- ypp/real_time/RT_X_LRR_real_field.F | 43 +- ypp/real_time/RT_X_effective.F | 4 +- ypp/real_time/RT_X_qssin.F | 7 +- ypp/real_time/RT_X_response.F | 58 +- ypp/real_time/RT_damp_it.F | 8 +- ypp/real_time/RT_density.F | 22 +- ypp/real_time/RT_fields.F | 189 ++++++ ypp/real_time/RT_time_configuration_setup.F | 6 +- ypp/real_time/RT_ypp_driver.F | 6 +- ypp/real_time/YPP_RT_project.dep | 1 + 219 files changed, 5827 insertions(+), 2048 deletions(-) create mode 100644 src/dipoles/DIPOLE_build_der_k.F create mode 100644 src/dipoles/OVERLAPS_IO.F create mode 100644 src/interface/INIT_fields.F create mode 100644 src/io/io_RT_components_V_bands.F create mode 100644 src/io/io_kpts.F rename src/linear_algebra/{SERIAL_SVD_inversion.F => SERIAL_SVD.F} (56%) create mode 100644 src/nloptics/NL_carriers_number.F create mode 100644 src/real_time_control/NL_project.dep create mode 100644 src/real_time_control/RT_field_from_file.F create mode 100644 src/real_time_control/RT_small_a.F create mode 100644 src/real_time_hamiltonian/RT_gradk_rho_times_E.F create mode 100644 ypp/real_time/RT_fields.F diff --git a/config/mk/global/libraries.mk b/config/mk/global/libraries.mk index 428babb031..fb7c3a4024 100644 --- a/config/mk/global/libraries.mk +++ b/config/mk/global/libraries.mk @@ -26,7 +26,7 @@ YLIBIO_LD = $(YLIBIO) # BASIC_LIBS = driver tools modules memory allocations matrices linear_algebra parallel parser communicate output common timing Yio io $(IO_MODE) \ xc_functionals interface stop_and_restart wf_and_fft bz_ops coulomb -BASIC_LIBS_LD= driver tools memory allocations communicate modules matrices linear_algebra bz_ops parallel parser output common timing Yio io $(IO_MODE) \ +BASIC_LIBS_LD= driver tools memory allocations communicate modules matrices linear_algebra Yio io $(IO_MODE) bz_ops parallel parser output common timing \ xc_functionals interface stop_and_restart wf_and_fft coulomb MAIN_LIBS = $(BASIC_LIBS) interpolate qp_control setup tddft dipoles pol_function qp acfdt bse diff --git a/sbin/compilation/check_updated_locks.sh b/sbin/compilation/check_updated_locks.sh index 7c9ac7c8d7..6de5f680e3 100755 --- a/sbin/compilation/check_updated_locks.sh +++ b/sbin/compilation/check_updated_locks.sh @@ -63,15 +63,24 @@ fi if [ "$DIR_restored" == "yes" ] ; then source ./sbin/compilation/verbosity.sh "check_updated_locks.sh: $dir has been restored" fi + + +if [[ "$unmatched" == *"DOUBLE"* ]]; then + # in this case I already recompile the whole + # source, no need to check for other locks + unmatched="DOUBLE"; +fi # # tag new objects to be compiled # +files_done="" for lock in $unmatched do # if test -f "$dir/${lock}_project.dep"; then deps=`cat $dir/${lock}_project.dep` for dep_file in $deps; do + if [[ "$files_done" == *"$dep_file"* ]]; then continue; fi source ./sbin/compilation/verbosity.sh "check_updated_locks.sh: $dep_file must be recompiled" source ./sbin/compilation/name_me.sh $dir/$dep_file "no_search" if [ ! "$DIR_restored" == "yes" ] ; then @@ -81,6 +90,7 @@ do source ./sbin/compilation/object_remove.sh "remove" "locks" continue; fi + files_done="$file $files_done" source ./sbin/compilation/check_object_childs.sh "locks" done fi diff --git a/src/allocations/DIPOLE_ALLOC_global.F b/src/allocations/DIPOLE_ALLOC_global.F index ae55d9e2c5..6a1072081a 100644 --- a/src/allocations/DIPOLE_ALLOC_global.F +++ b/src/allocations/DIPOLE_ALLOC_global.F @@ -25,7 +25,6 @@ subroutine DIPOLE_ALLOC_global(D,NK) call DIPOLE_ALLOC_elemental('DIP_orbital') call DIPOLE_ALLOC_elemental('DIP_spin') call DIPOLE_ALLOC_elemental('DIP_P_spinor') - call DIPOLE_ALLOC_elemental('DIP_S') call DIPOLE_ALLOC_elemental('P_square') return endif diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 10637549b2..458fbf1947 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -229,7 +229,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif ! - if ( abs(real(E_plus_W0)) < Dip%Energy_treshold .and. iq==1 .and. dip_r ) then + if ( abs(real(E_plus_W0)) < Dip%Energy_threshold .and. iq==1 .and. dip_r ) then res_abs =0._SP res_kerr=0._SP res_PL =0._SP diff --git a/src/bse/K_Transition_check.F b/src/bse/K_Transition_check.F index 68828e57a1..0cfaa8e5c8 100644 --- a/src/bse/K_Transition_check.F +++ b/src/bse/K_Transition_check.F @@ -15,7 +15,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& use BS, ONLY:BS_not_const_eh_f,BS_perturbative_SOC,BS_eh_en,l_BS_magnons,l_BS_photolum #if defined _RT use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,EQ_NoOcc + use RT_control, ONLY:NEQ_Residuals,NEQ_Kernel,EQ_Transitions,ALL_NoOcc,EQ_NoOcc #endif ! implicit none @@ -41,7 +41,7 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& ! ! Small energy transitions. Dipoles in length gauge are not defined if ((.not.l_BS_magnons).and.iq==1) then - if ( abs(Eo_eh) < Dip%Energy_treshold .and. trim(global_gauge)=="length") K_Transition_check=.FALSE. + if ( abs(Eo_eh) < Dip%Energy_threshold .and. trim(global_gauge)=="length") K_Transition_check=.FALSE. endif ! Null energy transitions are always removed if ( abs(E_eh) == 0._SP ) K_Transition_check=.FALSE. @@ -93,13 +93,13 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& if ( E_eh< 0._SP ) f_eh_PL = -Ken%f(iv,ik ,i_sp_v)*(spin_occ-Ken%f(ic,ikp,i_sp_c))/spin_occ/spin_occ ! #if defined _RT - if(EQ_NoOcc) then - f_eh_REF=1._SP - f_eh =1._SP - f_eh_RES=1._SP - f_eh_EQ =1._SP - f_e =1._SP - f_h =1._SP + if(EQ_NoOcc.or.ALL_NoOcc) then + f_eh_REF=spin_occ + f_eh =spin_occ + f_eh_RES=spin_occ + f_eh_EQ =spin_occ + f_e =spin_occ + f_h =spin_occ endif #endif ! @@ -143,4 +143,8 @@ logical function K_Transition_check(Ken,Dip,iq,ik,ikp,iv,ic,i_sp_c,i_res_ares,& if (any((/abs(E_eh)0._SP,& & abs(E_eh)>BS_eh_en(2).and.BS_eh_en(2)>0._SP/))) K_Transition_check=.FALSE. ! +#if defined _RT + if(ALL_NoOcc) K_Transition_check=All_NoOcc +#endif + ! end function diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 47641c774c..2f7a785923 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -244,7 +244,7 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) #if defined _RT use electrons, ONLY:n_full_bands,n_met_bands use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:EQ_Transitions,EQ_NoOcc + use RT_control, ONLY:EQ_Transitions,ALL_NoOcc #endif ! #include @@ -294,10 +294,11 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) V_bands=(/BS_bands(1),maxval(n_met_bands)/) C_bands=(/minval(n_full_bands)+1,BS_bands(2)/) endif - if (EQ_NoOcc) then - V_bands=BS_bands - C_bands=BS_bands - endif + !if (ALL_NoOcc) then + ! l_skip_unoccupied=.false. + ! V_bands=BS_bands + ! C_bands=BS_bands + !endif #endif ! do i_res_ares=1,BS_n_eh_spaces diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index 9aa18494dc..dd14c8d303 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -37,7 +37,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:O_ng,BS_bands,BS_res_K_corr,BS_blk,& & K_CORR_collision,BS_T_grp,& -& BS_K_dim,l_BS_ares_from_res +& BS_K_dim,l_BS_ares_from_res,l_BSE_kernel_full use electrons, ONLY:n_sp_pol use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc use openmp, ONLY:OPENMP_update,master_thread @@ -140,7 +140,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & @@ -175,7 +175,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & @@ -229,7 +229,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & @@ -267,7 +267,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! call fill_indexes(i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,i_block,iq, & & i_kp_s,i_s_star,i_kp_mq_s,i_s_mq_star, & diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index 02d897c18a..7a7dd31367 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -19,7 +19,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use BS_solvers, ONLY:BSS_n_freqs,BSS_er,BSS_dr,BSS_mode,BSS_damp_reference,BSS_q0,& & BSS_Q_dir,BSS_E_dir use BS, ONLY:BS_bands,BS_q,BS_n_g_exch,BS_res_K_corr,BS_n_g_W,BS_cpl_K_corr,& -& BS_Blocks_and_Transitions_free,BSqpts,O_ng,BS_iq_now +& BS_Blocks_and_Transitions_free,BSqpts,BS_kpt_bz,BS_kpt_ibz,O_ng,& +& BS_iq_now use TDDFT, ONLY:FXC_per_memstps,FXC_n_mem_freqs,FXC_is_retarded use drivers, ONLY:l_rpa_IP,l_bs_fxc,l_bss use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_K_scheme,PARALLEL_default_mode @@ -45,7 +46,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! I/O ! integer, allocatable :: qindx_B_max_CPU(:) - integer :: io_err,ID + integer :: io_err,ID,ik integer, external :: io_QINDX ! call section('*','Bethe Salpeter Equation driver') @@ -116,6 +117,17 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) ! endif ! + YAMBO_ALLOC(BS_kpt_ibz,(3,Xk%nibz)) + do ik=1,Xk%nibz + BS_kpt_ibz(:,ik)=Xk%pt(ik,:) + enddo + call k_ibz2bz(Xk,'i',.false.) + YAMBO_ALLOC(BS_kpt_bz,(3,Xk%nbz)) + do ik=1,Xk%nbz + BS_kpt_bz(:,ik)=Xk%ptbz(ik,:) + enddo + call k_ibz2bz(Xk,'d',.false.) + ! ! Tranferred momentum !====================== YAMBO_ALLOC(BSqpts,(3,BS_q(1):BS_q(2))) @@ -239,6 +251,8 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) call PARALLEL_global_indexes(Ken,Xk,q,"Response_T_space",X=X_oscillators,RESET=.TRUE.) ! YAMBO_FREE(BSqpts) + YAMBO_FREE(BS_kpt_bz) + YAMBO_FREE(BS_kpt_ibz) call qindx_free('B') ! end subroutine diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 07e7235859..55de257a46 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2021 The Yambo Team ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM DS ! subroutine K_driver_init(what,iq,Ken,Xk) ! @@ -18,7 +18,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) & l_abs_prop_chi_bse,l_eels_can_be_computed,l_eels_from_inversion,& & BSS_kernel_IO_on_the_fly,BSS_kernel_stored_size,BSS_slepc_approach use BS, ONLY:BSE_L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& -& BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,BSK_IO_mode,& +& BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,BSK_IO_mode,l_BSE_kernel_full,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& & BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr,l_Fxc_from_Vxc @@ -26,7 +26,10 @@ subroutine K_driver_init(what,iq,Ken,Xk) use D_lattice, ONLY:i_time_rev,i_space_inv,l_3D #if defined _RT use drivers, ONLY:l_rt_carriers_in_use - use RT_control, ONLY:NEQ_Kernel,EQ_Transitions,EQ_NoOcc,NEQ_Residuals,RT_BSE_Occ_Mode + use RT_control, ONLY:NEQ_Kernel,EQ_Transitions,EQ_NoOcc,ALL_NoOcc,NEQ_Residuals,RT_BSE_Occ_Mode +#endif +#if defined _CUDA + use TDDFT, ONLY:FXC_mode #endif #if defined _CUDA use TDDFT, ONLY:FXC_mode @@ -144,15 +147,20 @@ subroutine K_driver_init(what,iq,Ken,Xk) !----------------------------- ! Developer options. Without the code works in default mode ! With the user can switch to experimental coding - call parser('ImposeAsym',l_flag) - if (l_flag) l_BS_ares_from_res=.FALSE. - ! - if (iq/=1.and.i_time_rev==0.and.i_space_inv==0 ) l_BS_ares_from_res=.FALSE. - if (l_BS_photolum) l_BS_ares_from_res=.FALSE. - if (l_BS_magnons.and.n_sp_pol==2) l_BS_ares_from_res=.FALSE. - ! The next line is to switch off sections of the code due to the calculation - ! of the ARES part without checking the BSE_mode (see io_BS_PAR_init for example) - if (trim(BSE_mode)=="resonant") l_BS_ares_from_res=.TRUE. + call parser('ImposeFullBSE',l_BSE_kernel_full) + call parser('ImposeAsymBSE',l_flag) + + ! In the resonat only case l_BSE_ares_from_res=.true. + ! This is needed to switch off all the lines related to the excplicit calculation of the ARES part + ! (see io_BS_PAR_init for example) + ! + ! In all other cases the code checks what to do + if (.not.trim(BSE_mode)=="resonant") then + if (l_flag) l_BS_ares_from_res=.FALSE. + if (iq/=1.and.i_time_rev==0.and.i_space_inv==0 ) l_BS_ares_from_res=.FALSE. + if (l_BS_photolum) l_BS_ares_from_res=.FALSE. + if (l_BS_magnons.and.n_sp_pol==2) l_BS_ares_from_res=.FALSE. + endif ! ! I need ARES and I cannot get it from RES ! @@ -240,6 +248,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) NEQ_Residuals=STRING_match(RT_BSE_Occ_Mode,"r").and.allocated(Ken%fo) call parser('ForceEqTrans',EQ_Transitions) call parser('ForceEqNoOcc',EQ_NoOcc) + call parser('ForceAllNoOcc',ALL_NoOcc) #endif ! ! SLEPC diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 6757958c82..f0a656803a 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -28,7 +28,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use QP_m, ONLY:QP_ng_Vxc use BS_solvers, ONLY:BSS_kernel_last_stored_block use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,BS_ID,& -& BS_res_K_exchange,BS_Block_size,BS_n_g_W,& +& BS_res_K_exchange,BS_Block_size,l_BSE_kernel_full,BS_n_g_W,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& & BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& @@ -593,12 +593,21 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if (BS_blk(i_block)%done(i_Tk,i_Tp)=="t".and.l_BSE_restart) cycle ! + ! H_pos defines the position inside the full bse matrix when + ! l_BS_ares_from_res=.false. Otherwise it defines the position + ! inside the R/C blocks + ! H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) ! - if (H_pos(1)>H_pos(2)) cycle + ! When l_BS_ares_from_res=.false., the full coupling block, and + ! the upper part of the anti-resonant blocks are also computed + ! + ! When l_BSE_kernel_full the full blocks are computed + ! + if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! i_k_bz = BS_T_grp(i_Tgrp_k)%table(i_Tk,1) i_p_bz = BS_T_grp(i_Tgrp_p)%table(i_Tp,1) diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 9da817778e..e91bce08bd 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -10,10 +10,27 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,BS_mat_dim,BS_mat,iq,what) ! Here I fill the kernel (coupling included) in an entire BIG matrix to be ! used for diagonalization and/or invertion ! + ! Below how the matrix is computed + ! - coupling (c) and anti-coupling (q) blocks are computed only if coupling is requested + ! - in case 2 the diagonal terms of coupling and anti-coupling are both computed, although this is not needed + ! - cases 3 and 4 are for debugging purposes only + ! + ! Case 1 Case 2 Case 3 Case 4 + ! l_BS_ares_from_res=.true. l_BS_ares_from_res=.false. l_BS_ares_from_res=.true. l_BS_ares_from_res=.false. + ! l_BSE_matrix_full=.false. l_BSE_matrix_full=.false. l_BSE_matrix_full=.true. l_BSE_matrix_full=.true. + ! coupling block is a square coupling block maybe rectangular coupling block is a square coupling block maybe rectangular + ! + ! (r r r c c c) (r r r c c) (r r r c c c) (r r r c c) + ! (- r r - c c) (- r r c c) (r r r c c c) (r r r c c) + ! (- - r - - c) (- - r c c) (r r r c c c) (r r r c c) + ! (- - - - - -) (- - - a a) (- - - - - -) (q q q a a) + ! (- - - - - -) (- - - - a) (- - - - - -) (q q q a a) + ! (- - - - - -) (- - - - - -) + ! use pars, ONLY:SP,cI,cZERO,cONE use parallel_int, ONLY:PP_redux_wait use BS, ONLY:BS_K_coupling,n_BS_blks,BS_res_ares_n_mat,& -& l_BS_ares_from_res +& l_BS_ares_from_res,l_BSE_kernel_full use BS_solvers, ONLY:BS_blk,BS_H_dim,BS_K_dim,& & BSS_perturbative_width,run_inversion,run_Haydock,& & BSS_eh_E,BSS_eh_W @@ -46,8 +63,15 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,BS_mat_dim,BS_mat,iq,what) ! H_shift=0 if(BS_blk(i_B)%mode=="C") H_shift(2)=BS_K_dim(1) + if(BS_blk(i_B)%mode=="Q") H_shift(1)=BS_K_dim(1) if(BS_blk(i_B)%mode=="A") H_shift(:)=BS_K_dim(1) ! + ! Skip Q and A block + if ( l_BS_ares_from_res .and. H_shift(1)>0) cycle + ! + ! Skip Q block + if ((.not.l_BSE_kernel_full).and. H_shift(1)>H_shift(2)) cycle + ! do i_r=1,BS_blk(i_B)%size(1) ! H_pos(1)=BS_blk(i_B)%coordinate(1)+i_r-1 @@ -56,10 +80,13 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,BS_mat_dim,BS_mat,iq,what) ! H_pos(2)=BS_blk(i_B)%coordinate(2)+i_c-1 ! - ! Then the upper triangle of each block and direct symmetrization - ! - if (H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle - if (l_BS_ares_from_res.and.H_pos(1)>H_pos(2)) cycle + if ( .not.l_BSE_kernel_full) then + ! The upper triangle only of the whole matrix + if( H_pos(1)+H_shift(1)>H_pos(2)+H_shift(2)) cycle + ! + ! The upper triangle only of each block + if (l_BS_ares_from_res .and. H_pos(1)>H_pos(2)) cycle + endif ! if( allocated(BS_blk(i_B)%mat)) Mij=BS_blk(i_B)%mat(i_r,i_c) if(.not.allocated(BS_blk(i_B)%mat)) Mij=cZERO @@ -77,35 +104,47 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,BS_mat_dim,BS_mat,iq,what) case("R") BS_mat(H_pos(1) ,H_pos(2) )= Mij ! The resonant block is hermitial - BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) if (l_BS_ares_from_res.and.BS_K_coupling) then ! The anti-resonant block is A=-R* BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2)+BS_K_dim(1))=-conjg(Mij) ! The anti-resonant block is hermitian - BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= -Mij + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= -Mij endif case("C") BS_mat(H_pos(1) ,H_pos(2)+BS_K_dim(1))= Mij - ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-HErmitian - BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1) )=-conjg(Mij) + ! Anti-coupling from coupling: the whole BSE matrix is Pseudo-Hermitian + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1) )=-conjg(Mij) + ! In case l_BS_ares_from_res=.false. the coupling an anti-couling + ! bocks maybe rectangular and I cannot symmetrize them if (l_BS_ares_from_res) then ! The coupling block and the anti-coupling block are symmetric BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))= Mij - BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )=-conjg(Mij) + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )=-conjg(Mij) endif case("A") - ! The anti-resonant block is hermitial if(BS_res_ares_n_mat==1) then + ! Case with coupling BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2)+BS_K_dim(1))= Mij - BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= conjg(Mij) + ! The anti-resonant block is hermitial + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2)+BS_K_dim(1),H_pos(1)+BS_K_dim(1))= conjg(Mij) else + ! Case without coupling, there are two BS_mat BS_mat(H_pos(1) ,H_pos(2) )= Mij - BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) + ! The anti-resonant block is hermitial + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2) ,H_pos(1) )= conjg(Mij) endif case("Q") BS_mat(H_pos(1)+BS_K_dim(1),H_pos(2) )= Mij ! Coupling from anti-coupling: the whole BSE matrix is Pseudo-HErmitian - BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))=-conjg(Mij) + if (.not.l_BSE_kernel_full) & + & BS_mat(H_pos(2) ,H_pos(1)+BS_K_dim(1))=-conjg(Mij) end select ! enddo diff --git a/src/bse/K_stored_in_a_slepc_matrix.F b/src/bse/K_stored_in_a_slepc_matrix.F index 6b3b73d826..3660c3d87d 100644 --- a/src/bse/K_stored_in_a_slepc_matrix.F +++ b/src/bse/K_stored_in_a_slepc_matrix.F @@ -24,7 +24,7 @@ subroutine K_stored_in_a_slepc_matrix(i_BS_mat,iq,slepc_mat) ! use pars, ONLY:cI,cONE,lchlen use BS, ONLY:BS_K_dim,BS_H_dim,BS_blk,n_BS_blks,BS_K_coupling,& - & BS_res_ares_n_mat,l_BS_ares_from_res,BS_ID + & BS_res_ares_n_mat,l_BSE_kernel_full,l_BS_ares_from_res,BS_ID use BS_solvers, ONLY:BSS_eh_E,BSS_eh_W,BSS_perturbative_width,& & run_inversion,run_Haydock,BSS_kernel_last_stored_block use IO_int, ONLY:io_control @@ -49,6 +49,8 @@ subroutine K_stored_in_a_slepc_matrix(i_BS_mat,iq,slepc_mat) ! call timing('BSE mat slepc redist',OPR='start') ! + if (l_BSE_kernel_full) call error("Slepc with matrix not coded with full BSE mode") + ! if( BS_K_coupling) SL_H_dim=BS_H_dim if(.not.BS_K_coupling) SL_H_dim=BS_K_dim(i_BS_mat) SL_K_dim=BS_K_dim diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 971cd4a298..cca4600f5f 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -71,7 +71,8 @@ subroutine bz_samp_indexes(en,k,Xk,q) character(lchlen) :: string(2) integer, allocatable :: q_map(:,:,:),q_iptbz(:,:) type(PP_indexes) :: PAR_IND_Xk,PAR_IND_k - integer, external :: io_QINDX + integer, external :: io_QINDX + integer, external :: io_kpts ! call section('*','Transferred momenta grid and indexing') !======================================================== @@ -115,6 +116,14 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! q%description='q' ! + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) + io_err=io_kpts(k,Xk,q,io_db) + ! + if (io_err/=0) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) + io_err=io_kpts(k,Xk,q,io_db) + endif + ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2,3,4,6/),MODE=VERIFY,ID=io_db) ! io_err=io_QINDX(Xk,q,io_db) diff --git a/src/bz_ops/k_map_nearest_by_dir.F b/src/bz_ops/k_map_nearest_by_dir.F index eeff76072b..5a9a95d2d1 100644 --- a/src/bz_ops/k_map_nearest_by_dir.F +++ b/src/bz_ops/k_map_nearest_by_dir.F @@ -67,7 +67,7 @@ subroutine k_map_nearest_by_dir(Xk,k_map) if(dshift>zero_dfl) then write(dump_ch,'(a,3f12.6)') " Shifted grid: ",k_shift call msg("sr",dump_ch) - call error(' Shifted grids not implemented yet in covariant dipoles ') + call warning('Yambo_nl works only with a single-shift k-point grid! ') else k_shift=0._SP endif diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F index 32cae39518..d90fdea431 100644 --- a/src/collisions/Build_LSEX_collisions.F +++ b/src/collisions/Build_LSEX_collisions.F @@ -9,7 +9,7 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) ! ! This subroutine calculate the long-range part of the Screened exchange ! - use electrons, ONLY:n_sp_pol + use electrons, ONLY:n_sp_pol,spin use pars, ONLY:SP,cI,cZERO use collision_ext, ONLY:OSCLL,W,ng_oscll,COLL_bands use QP_m, ONLY:QP_table,QP_nk,QP_n_states @@ -26,17 +26,18 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) integer :: i_np,iqbz,i_kmq ! self-energy internal indexes integer :: ig1,ig2 integer :: i_n,i_m - integer :: i_k + integer :: i_k,i_sp ! ! Collisions output ! - complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + complex(SP), intent(out) :: COLL(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk,n_sp_pol) ! ! Coll indexes ! i_n=QP_table(i_qp,1) i_m=QP_table(i_qp,2) i_k=QP_table(i_qp,3) + i_sp=spin(QP_table(i_qp,:)) ! ! Build Collisions from the Oscillators ! @@ -45,7 +46,7 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) do i_mp=COLL_bands(1),COLL_bands(2) do i_np=COLL_bands(1),COLL_bands(2) ! - COLL(i_np,i_mp,:)=cZERO + COLL(i_np,i_mp,:,i_sp)=cZERO ! do iqbz=1,q%nbz i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) @@ -54,8 +55,8 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) ! do ig1=1,ng_oscll do ig2=1,ng_oscll - COLL(i_np,i_mp,i_kmq)=COLL(i_np,i_mp,i_kmq)+OSCLL(i_n,i_np,i_k,iqbz,ig2) & -& *conjg(OSCLL(i_m,i_mp,i_k,iqbz,ig1))*W(iqbz,ig2,ig1) + COLL(i_np,i_mp,i_kmq,i_sp)=COLL(i_np,i_mp,i_kmq,i_sp)+OSCLL(i_n,i_np,i_k,i_sp,iqbz,ig2) & +& *conjg(OSCLL(i_m,i_mp,i_k,i_sp,iqbz,ig1))*W(iqbz,ig2,ig1) enddo enddo ! diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index e8a6e9885d..4045ae2872 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -5,38 +5,41 @@ ! ! Authors (see AUTHORS file for details): AM DS ! -subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) +subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) ! ! HXC collisions ! use drivers, ONLY:l_use_COH_collisions use pars, ONLY:SP,pi,cZERO + use parser_m, ONLY:parser use com, ONLY:msg use frequency, ONLY:w_samp - use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor + use electrons, ONLY:levels,spin_occ,spin,n_spin,n_spinor,n_full_bands,n_met_bands,n_sp_pol use LIVE_t, ONLY:live_timing use hamiltonian, ONLY:H_potential + use BS, ONLY:BS_blk,n_BS_blks use D_lattice, ONLY:DL_vol,sop_inv use tddft, ONLY:tddft_wf_t use xc_functionals,ONLY:F_xc,V_xc,F_xc_mat,magn,XC_potential_driver use global_XC, ONLY:WF_kind,WF_xc_functional - use parallel_int, ONLY:PP_redux_wait,PP_wait + use stderr, ONLY:intc + use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_IND_Q_bz,MPI_COMM_NULL,ncpu,myid,COMM_copy,yMPI_COMM,& & PAR_n_Bp_mat_elements,PAR_COM_QP_A2A,PAR_COM_QP_INDEX,PAR_COM_Q_INDEX,& & PAR_IND_Bp_mat,PAR_nQ_bz,PAR_COM_G_b_A2A,PAR_COM_G_b_index_global use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_HXC_local,COLLISIONS_HXC_MB,& & COLL_bands,HXC_COLL_element,HXC_collisions,COH_COLL_element,COH_collisions,& -& COLLISIONS_HXC_use_TDDFT,LAST_COLL_sync,PAR_COLL_min +& COLLISIONS_HXC_use_TDDFT,PAR_COLL_min,COLLISIONS_CV_only use timing_m, ONLY:timing use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc use IO_int, ONLY:io_control,IO_and_Messaging_switch use IO_m, ONLY:OP_RD_CL,REP,VERIFY,NONE,io_COLLs use ALLOC, ONLY:X_ALLOC_elemental use X_m, ONLY:X_mat,X_t - use interfaces, ONLY:WF_load,TDDFT_ALDA_eh_space_R_kernel + use interfaces, ONLY:WF_load,TDDFT_ALDA_eh_space_R_kernel!,eval_G_minus_G use wave_func, ONLY:WF,WF_buffer,WF_buffered_IO - use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G + use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G,G_m_G use hamiltonian, ONLY:B_mat_index use fft_m, ONLY:fft_size ! @@ -46,12 +49,15 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) type(bz_samp) ::k,q,Xk type(X_t) ::X type(w_samp) ::Xw + integer ::ID_BS + integer, intent(in) ::IO_BS_err ! ! Work Space ! integer :: i_coll,first_coll,last_coll,ig1,ig2,iqbz,iqibz,alloc_err,iqs,iGo_max,NG_max,NG_XC,LOCAL_COMM(2),& -& i_n,i_k,i_k_s,i_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,& -& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,bands_to_load(2),n_colls +& i_n,i_k,i_k_s,i_sp,ip_sp,i_m,i_mp,N_g_vecs_H,N_g_vecs_X,N_g_vecs_C,i_star,i_p,i_p_s,i_loop,iB,& +& i_np,i_kmq,i_kmq_bz,i_kmq_s,i_kmq_G0,PAR_NC_local,n_steps,i_steps,bands_to_load(2),n_colls,n_GmG,& +& n_skip_colls,n_incl_colls logical :: l_HXC_collisions,eval_coll,l_compute_screening ! type(elemental_collision):: isc_XC,iscp_XC,isc_H,iscp_H @@ -62,6 +68,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! complex(SP), allocatable :: EM1s(:,:),rhotw_tmp(:) integer :: io_err,ID_X,ID_HXC,ID_COH,TMP_VEC(ncpu) + logical :: doing_cv_colls,cc_vv_prime_only integer, external :: io_X ! call timing(trim(H_potential)//' Collisions',OPR='start') @@ -78,6 +85,8 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! ! Setup ! + n_skip_colls = 0 + n_incl_colls = 0 l_compute_screening = index(H_potential,"COH")>0 .or. index(H_potential,"SEX")>0 l_HXC_collisions = COLLISIONS_HXC_local .or. COLLISIONS_HXC_MB ! @@ -85,7 +94,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) call k_build_up_BZ_tables(q) call k_expand(k) ! - if (l_compute_screening) then + if (l_compute_screening.and.(IO_BS_err/=0.or.(.not.COLLISIONS_CV_only))) then ! ! Plasmon-Pole/Static interaction DB I/O ! @@ -94,8 +103,12 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) if (io_err<0) call error(' Incomplete and/or broken PPA/Static diel. fun. database') ! if (X%ng + ! call msg('s', '['//trim(H_potential)//'] Plane waves (H,X,C) ',(/N_g_vecs_H,N_g_vecs_X,N_g_vecs_C/)) ! ! WFs @@ -130,73 +161,60 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) bands_to_load(2)=max(COLL_bands(2),maxval(E%nbm)) endif ! - if (WF_buffered_IO) call WF_load(WF_buffer,0,1,bands_to_load,(/1,k%nibz/),space='B',title='-BUFFER') - ! - call WF_load(WF,NG_max,iGo_max,bands_to_load,(/1,k%nibz/),title='-'//trim(H_potential)//' Collisions') - ! - if (COLLISIONS_HXC_local) then - ! - iscp_H%qs =1 - iscp_H%iqref=0 - iscp_H%ngrho=N_g_vecs_H - ! - isc_H%qs =1 - isc_H%iqref =0 - isc_H%ngrho =N_g_vecs_H - ! - call elemental_collision_alloc(isc_H ,NG=N_g_vecs_H,GAMP_NG=(/N_g_vecs_H, 1 /),TITLE='HARTREE') - call elemental_collision_alloc(iscp_H,NG=N_g_vecs_H, TITLE='HARTREE') - ! - YAMBO_ALLOC(rhotw_tmp,(N_g_vecs_H)) - ! - endif - ! - iscp_XC%qs =1 - iscp_XC%iqref=0 - iscp_XC%ngrho=NG_XC - ! - isc_XC%qs =1 - isc_XC%iqref =0 - isc_XC%ngrho =NG_XC - ! - call elemental_collision_alloc(iscp_XC,NG=NG_XC,GAMP_NG=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) - ! - if (l_compute_screening) then + if (IO_BS_err/=0.or.(.not.COLLISIONS_CV_only)) then ! - ! Allocation (EM1S can be bigger than N_g_vecs_C) + if (WF_buffered_IO) call WF_load(WF_buffer,0,1,bands_to_load,(/1,k%nibz/),space='B',title='-BUFFER') + call WF_load(WF,NG_max,iGo_max,bands_to_load,(/1,k%nibz/),title='-'//trim(H_potential)//' Collisions') ! - call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) - YAMBO_ALLOC(EM1s,(N_g_vecs_C,N_g_vecs_C)) - ! - call elemental_collision_alloc(isc_XC, NG=NG_XC,GAMP_NG=(/N_g_vecs_C,N_g_vecs_C/),TITLE=trim(H_potential)) - ! - else + if (COLLISIONS_HXC_local) then + ! + call elemental_collision_alloc(isc_H ,NG=N_g_vecs_H,GAMP_NG=(/N_g_vecs_H, 1 /),TITLE='HARTREE') + call elemental_collision_alloc(iscp_H,NG=N_g_vecs_H, TITLE='HARTREE') + ! + YAMBO_ALLOC(rhotw_tmp,(N_g_vecs_H)) + ! + endif ! - call elemental_collision_alloc(isc_XC, NG=NG_XC, TITLE=trim(H_potential)) + call elemental_collision_alloc(iscp_XC,NG=NG_XC,GAMP_NG=(/N_g_vecs_X, 1 /),TITLE=trim(H_potential)) ! - endif - ! - Co=1._SP - if (COLLISIONS_HXC_use_TDDFT) then - Co=4._SP*pi/DL_vol/real(q%nbz,SP) - YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) - YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size*n_spinor*n_spinor)) - YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) - YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) - YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) - YAMBO_ALLOC(V_xc,(fft_size,n_spin)) - V_xc=0._SP - if(n_spin>1) then - YAMBO_ALLOC(magn,(fft_size,3)) + if (l_compute_screening) then + ! + ! Allocation (EM1S can be bigger than N_g_vecs_C) + ! + call X_ALLOC_elemental('X',(/X%ng,X%ng,1/)) + YAMBO_ALLOC(EM1s,(N_g_vecs_C,N_g_vecs_C)) + ! + call elemental_collision_alloc(isc_XC, NG=NG_XC,GAMP_NG=(/N_g_vecs_C,N_g_vecs_C/),TITLE=trim(H_potential)) + ! + else + ! + call elemental_collision_alloc(isc_XC, NG=NG_XC, TITLE=trim(H_potential)) + ! endif - call XC_potential_driver(E,K,WF_kind,WF_xc_functional,2) - YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) - call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) - YAMBO_FREE(F_xc) - YAMBO_FREE(V_xc) - if(n_spin>1) then - YAMBO_FREE(magn) + ! + Co=1._SP + if (COLLISIONS_HXC_use_TDDFT) then + Co=4._SP*pi/DL_vol/real(q%nbz,SP) + YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) + YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size*n_spinor*n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) + YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) + YAMBO_ALLOC(V_xc,(fft_size,n_spin)) + V_xc=0._SP + if(n_spin>1) then + YAMBO_ALLOC(magn,(fft_size,3)) + endif + call XC_potential_driver(E,K,WF_kind,WF_xc_functional,2) + YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) + call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) + YAMBO_FREE(F_xc) + YAMBO_FREE(V_xc) + if(n_spin>1) then + YAMBO_FREE(magn) + endif endif + ! endif ! n_colls=max(HXC_collisions%N,COH_collisions%N) @@ -209,43 +227,45 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) first_coll=-1 last_coll =0 ! - do i_loop=1,2 - if (allocated(HXC_collisions%PAR_IND%element_1D)) then - PAR_NC_local=0 - do i_coll=1,HXC_collisions%N - if (.not.HXC_collisions%PAR_IND%element_1D(i_coll)) cycle - last_coll=i_coll - if (allocated(HXC_collisions%IO_status)) then - if (HXC_collisions%IO_status(i_coll)/=-1) cycle - endif - if (first_coll==-1) first_coll=i_coll - PAR_NC_local=PAR_NC_local+1 - if (i_loop==2.and.PAR_NC_local<=PAR_COLL_min) LAST_COLL_sync=i_coll - enddo - else if (allocated(COH_collisions%PAR_IND%element_1D)) then - PAR_NC_local=0 - do i_coll=1,COH_collisions%N - if (.not.COH_collisions%PAR_IND%element_1D(i_coll)) cycle - last_coll=i_coll - if (allocated(COH_collisions%IO_status)) then - if (COH_collisions%IO_status(i_coll)/=-1) cycle - endif - if (first_coll==-1) first_coll=i_coll - PAR_NC_local=PAR_NC_local+1 - if (i_loop==2.and.PAR_NC_local<=PAR_COLL_min) LAST_COLL_sync=i_coll - enddo - endif - if(i_loop==1) then - TMP_VEC=0 - TMP_VEC(myid+1)=PAR_NC_local - call PP_redux_wait(TMP_VEC) - PAR_COLL_min=minval(TMP_VEC) - endif - enddo + if (allocated(HXC_collisions%PAR_IND%element_1D)) then + PAR_NC_local=0 + do i_coll=1,HXC_collisions%N + if (.not.HXC_collisions%PAR_IND%element_1D(i_coll)) cycle + last_coll=i_coll + if (allocated(HXC_collisions%IO_status)) then + if (HXC_collisions%IO_status(i_coll)/=-1) cycle + endif + if (first_coll==-1) first_coll=i_coll + PAR_NC_local=PAR_NC_local+1 + enddo + else if (allocated(COH_collisions%PAR_IND%element_1D)) then + PAR_NC_local=0 + do i_coll=1,COH_collisions%N + if (.not.COH_collisions%PAR_IND%element_1D(i_coll)) cycle + last_coll=i_coll + if (allocated(COH_collisions%IO_status)) then + if (COH_collisions%IO_status(i_coll)/=-1) cycle + endif + if (first_coll==-1) first_coll=i_coll + PAR_NC_local=PAR_NC_local+1 + enddo + endif + TMP_VEC=0 + TMP_VEC(myid+1)=PAR_NC_local + call PP_redux_wait(TMP_VEC) + PAR_COLL_min=minval(TMP_VEC) ! n_steps=0 - if (COLLISIONS_HXC_local) n_steps=n_steps+PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements - if (COLLISIONS_HXC_MB.or.l_use_COH_collisions) n_steps=n_steps+PAR_NC_local*PAR_nQ_bz*PAR_n_Bp_mat_elements + if (COLLISIONS_HXC_local) n_steps=n_steps+PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements*n_sp_pol + if (COLLISIONS_HXC_MB.or.l_use_COH_collisions) n_steps=n_steps+PAR_NC_local*PAR_nQ_bz*PAR_n_Bp_mat_elements*n_sp_pol + ! + if (IO_BS_err==0) then + i_steps=2 + if (COLLISIONS_CV_only) then + i_steps=1 + n_steps=PAR_NC_local*K%nibz*PAR_n_Bp_mat_elements*n_sp_pol + endif + endif ! ! Define the local COMM ! @@ -293,18 +313,40 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) i_m = COH_collisions%state(i_coll,2) i_k = COH_collisions%state(i_coll,3) i_sp = COH_collisions%state(i_coll,4) - endif + endif + ! + i_k_s = 1 ! if( l_HXC_collisions ) HXC_COLL_element(1)%v3_c=cZERO if( l_use_COH_collisions ) COH_COLL_element(1)%v3_c=cZERO ! - ! HARTREE collisions - ! - if ( COLLISIONS_HXC_local ) call compute_loc_HXC_collisions() - ! - ! XC collisions within MBPT - ! - if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions() + if (IO_BS_err==0) then + ! + doing_cv_colls=.not.((i_n> n_met_bands(i_sp) .and. i_m>n_met_bands(i_sp) ) .or. & + & (i_n<=n_full_bands(i_sp) .and. i_m<=n_full_bands(i_sp)) ) + ! + ! HXC collisions from BSE kernel if in the cv channel + if (doing_cv_colls) call map_BSE_to_HXC_collisions() + ! + if (.not.COLLISIONS_CV_only) then + ! + ! If (in,im) is in the cv channel, I need (inp,imp) only in the cc/vv channel + ! If (in,im) is not in the cv channel, I need (inp,imp) everywhere + cc_vv_prime_only=doing_cv_colls + ! Hartree collisions + if ( COLLISIONS_HXC_local ) call compute_Hartree_collisions(cc_vv_prime_only) + ! XC collisions within MBPT + if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions(cc_vv_prime_only) + endif + ! + else + ! + ! Hartree collisions + if ( COLLISIONS_HXC_local ) call compute_Hartree_collisions(.false.) + ! XC collisions within MBPT + if ( COLLISIONS_HXC_MB.or.l_use_COH_collisions ) call compute_MBPT_XC_collisions(.false.) + ! + endif ! if(l_HXC_collisions) then call PP_redux_wait(HXC_COLL_element(1)%v3_c,COMM=LOCAL_COMM(1)) @@ -322,6 +364,9 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! enddo ! loop on i_coll ! + if(n_skip_colls>0) call warning(" BSE conversion, ignored "//& + & trim(intc(n_skip_colls))//"/"//trim(intc(n_incl_colls))//" collisions") + ! call live_timing() ! ! CLEAN @@ -348,19 +393,210 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw) ! contains ! - subroutine compute_loc_HXC_collisions() + subroutine map_BSE_to_HXC_collisions() + ! + ! Yambo uses the BSE matrix with the square root of the occupations + ! The real time collisions must be constructed with the standard form + ! This requires a cI factor in the coupling terms. + ! Moreover, since the occupation factors are contained in the density matrix, + ! there is a -1 factor for "Q" and "A" + ! + ! The excitonic matrix contains the occupations and it is pseudo-hermitian. + ! R iC R iC + ! -(iC)* -R* = iC* -R* + ! + ! The collisions do not contain the occupations and the matrix is hermitian. + ! R C + ! C* R* + ! + use electrons, ONLY:spin_occ + use pars, ONLY:cI,cZERO + use BS, ONLY:BS_blk,BS_K_dim,BS_K_io_map,l_BSE_kernel_full + use BS_solvers, ONLY:BSS_eh_table_m1 + use IO_int, ONLY:io_control + use IO_m, ONLY:RD + ! + complex(SP) :: M_ij + integer :: i_BSE,j_BSE,i_k_bz_bse,i_p_bz_bse,iB,jB,i_q_fake,i_p_bz + logical :: l_use_mat,l_conj,l_cI,l_m1 + ! + iB=-1 + jB=-1 + ! + i_k_bz_bse=BS_K_io_map(k%k_table(i_k,1)) + ! + i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) + iB=mod(i_BSE-1,BS_K_dim(1))+1 + ! + if (i_BSE>0) then + ! + do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) + allocate(BS_blk(jB)%mat (BS_blk(jB)%size(1),BS_blk(jB)%size(2))) + allocate(BS_blk(jB)%tam (BS_blk(jB)%zise(1),BS_blk(jB)%zise(2))) + BS_blk(jB)%mat=cZERO + BS_blk(jB)%tam=cZERO + call io_control(ACTION=RD,ID=ID_BS) + call read_BS_par_collisions(1,jB,ID_BS) + enddo + ! + else + !DEBUG< + !write(*,*) "Block ignored ",i_k_bz_bse,i_m,i_n,i_sp,i_sp + !DEBUG> + endif + ! + do ip_sp=1,n_sp_pol + do i_q_fake=1,q%nbz + ! + if (.not.PAR_IND_Q_bz%element_1D(i_q_fake)) cycle + ! + i_p_bz=qindx_S(i_k,i_q_fake,1) + i_p =k%sstar(i_p_bz,1) + !i_p_s =k%sstar(i_p_bz,2) + ! + do i_mp=COLL_bands(1),COLL_bands(2) + do i_np=COLL_bands(1),COLL_bands(2) + ! + if ( (i_np> n_met_bands(ip_sp) .and. i_mp> n_met_bands(ip_sp) ) ) cycle + if ( (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) ) cycle + ! + if ( .not. PAR_IND_Bp_mat%element_1D(B_mat_index(i_np,i_mp,COLL_bands) ) ) cycle + ! + !i_p_bz_bse=BS_K_io_map(k%k_table(i_p,i_p_s)) + i_p_bz_bse=BS_K_io_map(i_p_bz) + ! + i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) + j_BSE=BSS_eh_table_m1(i_p_bz_bse,i_mp,i_np,ip_sp,ip_sp) + ! + if (i_BSE==0.or.j_BSE==0) then + n_skip_colls=n_skip_colls+1 + !DEBUG< + !if(j_BSE==0) write(*,*) "Transition ignored ",i_p_bz_bse,i_mp,i_np,i_sp + !DEBUG> + cycle + else + n_incl_colls=n_incl_colls+1 + endif + ! + if (i_BSE<=BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then + ! + l_cI=.false. + l_m1=.false. + if (l_BSE_kernel_full) then + ! Resonant block + iB=i_BSE ; jB=j_BSE; l_conj=.false. + l_use_mat=.true. + else + iB=i_BSE + ! Resonant block + if(j_BSE>=i_BSE) then; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; l_conj=.false.; endif + ! Resonant is hermitian + if(j_BSE< i_BSE) then; l_use_mat=.false.; jB=j_BSE ; l_conj=.true. ; endif + endif + ! + else if(i_BSE<=BS_K_dim(1) .and. j_BSE>BS_K_dim(1)) then + ! + l_cI=.true. + l_m1=.false. + l_conj=.false. + j_BSE=j_BSE-BS_K_dim(1) + if (l_BSE_kernel_full) then + ! Coupling block + iB=i_BSE+BS_K_dim(1) ; jB=j_BSE + l_use_mat=.true. + else + iB=i_BSE+BS_K_dim(1) + ! Coupling block + if(j_BSE>=i_BSE) then ; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; endif + ! Coupling is symmetric + if(j_BSE< i_BSE) then ; l_use_mat=.false.; jB=j_BSE ; endif + endif + ! + else if(i_BSE> BS_K_dim(1) .and. j_BSE<=BS_K_dim(1)) then + ! + l_cI=.true. + l_m1=.true. + l_conj=.true. + i_BSE=i_BSE-BS_K_dim(1) + if (l_BSE_kernel_full) then + ! Anti-Coupling + iB=j_BSE+BS_K_dim(1); jB=i_BSE + l_use_mat=.true. + else + iB=i_BSE+BS_K_dim(1) + ! Anti-Coupling from coupling: the whole BSE matrix is Pseudo-Hermitian + if(j_BSE>=i_BSE) then; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; endif + ! Anti-Coupling is symmetric + if(j_BSE< i_BSE) then; l_use_mat=.false.; jB=j_BSE ; endif + endif + ! + else if(i_BSE> BS_K_dim(1) .and. j_BSE> BS_K_dim(1)) then + ! + l_cI=.false. + l_m1=.true. + i_BSE=i_BSE-BS_K_dim(1) + j_BSE=j_BSE-BS_K_dim(1) + if (l_BSE_kernel_full) then + ! Anti-resonant from Resonant + iB=j_BSE; jB=i_BSE-j_BSE+1; l_conj=.true. + l_use_mat=.true. + else + iB=i_BSE + ! Anti-resonant from Resonant: the whole BSE matrix is Pseudo-Hermitian + if(j_BSE>=i_BSE) then; l_use_mat=.true. ; jB=j_BSE-i_BSE+1; l_conj=.true.; endif + ! Anti-resonant is hermitian + if(j_BSE< i_BSE) then; l_use_mat=.false.; jB=j_BSE ; l_conj=.false.; endif + endif + ! + endif + ! + if ( l_use_mat) M_ij= BS_blk(iB)%mat(1,jB) + if (.not.l_use_mat) M_ij= BS_blk(iB)%tam(jB,1) + ! + if(l_conj) M_ij= conjg(M_ij) + if(l_cI) M_ij= cI * M_ij + if(l_m1) M_ij= - M_ij + ! + ! - The occupation factor here is already contained in the density matrix + ! - Compared to the BSE case, the collisions are summed over the points in the star of i_p + ! + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)-M_ij/spin_occ + ! + call live_timing(steps=i_steps) + ! + enddo + enddo + enddo + enddo + ! + i_BSE=BSS_eh_table_m1(i_k_bz_bse,i_m,i_n,i_sp,i_sp) + iB=mod(i_BSE-1,BS_K_dim(1))+1 + ! + if (i_BSE>0) then + do jB=iB,iB+BS_K_dim(1),BS_K_dim(1) + deallocate(BS_blk(jB)%mat) + deallocate(BS_blk(jB)%tam) + enddo + endif + ! + end subroutine map_BSE_to_HXC_collisions + ! + subroutine compute_Hartree_collisions(cc_vv_only) ! ! Scattering geometry !===================== _ \ _ ! / / \ - ! G_p{np,mp} | | (i_p,i_p_s) + ! G_p{np,mp,ip_sp} | | (i_p,i_p_s) ! \_ _ _/ ! | ! | W(q=0) ! | - ! (i_n,i_k,1)------>----------.---------->----(i_m,i_k,1) - ! + ! (i_n,i_k,i_sp)------>----------.---------->----(i_m,i_k,i_sp) ! + ! + logical, intent(in) :: cc_vv_only + ! + logical :: cc_vv_colls integer :: i_q_fake, i_p_bz ! isc_H%qs = 1 @@ -368,13 +604,12 @@ subroutine compute_loc_HXC_collisions() ! call scatter_Gamp(isc_H,'x') ! - i_k_s = 1 - ! isc_H%is =(/i_n,i_k,i_k_s,i_sp/) isc_H%os =(/i_m,i_k,i_k_s,i_sp/) ! call scatter_Bamp(isc_H) ! + do ip_sp=1,n_sp_pol do i_q_fake=1,q%nbz ! if (.not.PAR_IND_Q_bz%element_1D(i_q_fake)) cycle @@ -386,12 +621,18 @@ subroutine compute_loc_HXC_collisions() ! do i_mp=COLL_bands(1),COLL_bands(2) do i_np=i_mp,COLL_bands(2) + ! + cc_vv_colls=(i_np> n_met_bands(ip_sp) .and. i_mp>n_met_bands(ip_sp) ) .or. & + & (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) + ! + if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle + if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle ! if ( .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_np,i_mp,COLL_bands) ) .and. & & .not. PAR_IND_Bp_mat%element_1D( B_mat_index(i_mp,i_np,COLL_bands) ) ) cycle ! - iscp_H%is =(/i_np,i_p,1,i_sp/) - iscp_H%os =(/i_mp,i_p,1,i_sp/) + iscp_H%is =(/i_np,i_p,1,ip_sp/) + iscp_H%os =(/i_mp,i_p,1,ip_sp/) ! eval_coll=.not.all((/i_n==i_np,i_m==i_mp,i_k==i_p/)) if ( eval_coll) call scatter_Bamp(iscp_H) @@ -432,7 +673,11 @@ subroutine compute_loc_HXC_collisions() enddo endif ! - HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p)=4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp) & + & +4._SP*pi*pre_factor1+Co*pre_factor2 + ! DS: 2023/10/25 Merge Check + !HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_p,ip_sp) & + !& +4._SP*pi*conjg(pre_factor1)+Co*pre_factor2 ! call live_timing(steps=1) ! @@ -461,7 +706,8 @@ subroutine compute_loc_HXC_collisions() enddo endif ! - HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p)=4._SP*pi*pre_factor1+Co*pre_factor2 + HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p,ip_sp)=HXC_COLL_element(1)%v3_c(i_mp,i_np,i_p,ip_sp) & + & +4._SP*pi*pre_factor1+Co*pre_factor2 ! call live_timing(steps=1) ! @@ -472,10 +718,11 @@ subroutine compute_loc_HXC_collisions() enddo ! enddo + enddo ! - end subroutine compute_loc_HXC_collisions + end subroutine compute_Hartree_collisions ! - subroutine compute_MBPT_XC_collisions() + subroutine compute_MBPT_XC_collisions(cc_vv_only) ! ! Scattering geometry !===================== @@ -486,11 +733,13 @@ subroutine compute_MBPT_XC_collisions() ! _ _ _ _ \ _ _ _ _ ! / / \ ! / \ - ! / G_{np,mp} \ - ! (i_n,i_k,1)-->--.---------->----------.---->----(i_m,i_k,1) + ! / G_{np,mp,i_sp} \ + ! (i_n,i_k,i_sp)-->--.----------->---------.---->----(i_m,i_k,i_sp) ! (i_kmq,i_kmq_s) ! + logical, intent(in) :: cc_vv_only ! + logical :: cc_vv_colls integer :: TMP_INDEX(COLL_bands(1):COLL_bands(2)) ! if (l_compute_screening.and.i_coll==first_coll) then @@ -505,27 +754,39 @@ subroutine compute_MBPT_XC_collisions() iqibz =q%sstar(iqbz,1) iqs =q%sstar(iqbz,2) ! - isc_XC%qs =(/0,iqibz,iqs/) - iscp_XC%qs =(/0,iqibz,iqs/) - ! - i_k_s = 1 - ! i_kmq_bz =qindx_S(i_k,iqbz,1) i_kmq_G0 =qindx_S(i_k,iqbz,2) ! i_kmq = k%sstar(i_kmq_bz,1) i_kmq_s = k%sstar(i_kmq_bz,2) ! + isc_XC%qs =(/i_kmq_G0,iqibz,iqs/) isc_XC%is =(/i_n,i_k, i_k_s, i_sp/) isc_XC%os =(/0 ,i_kmq,i_kmq_s,i_sp/) ! + iscp_XC%qs =(/i_kmq_G0,iqibz,iqs/) iscp_XC%is =(/i_m,i_k, i_k_s, i_sp/) iscp_XC%os =(/0, i_kmq,i_kmq_s,i_sp/) ! - isc_XC%qs(1) =i_kmq_G0 - iscp_XC%qs(1)=i_kmq_G0 + ! DS 2022/07/29 + ! The G shifts "i_kmq_G0" are need to construct M_{k,p}. + ! The same procedure is applyed in the BSE subroutines. + ! + ! However, for some reason, I get a non hermitian matrix, i.e. K_{nmk,n'm'k'} /= K^*_{n'm'k',nmk} + ! due to a "-1" factor in the real part of some matrix elements. + ! This issue was never seen in the BSE, since the hermiticity is imposed there. + ! However, implementing the option to compute the full BSE blocks, i.e. without imposing + ! the hermiticity, the issue is there as well. + ! + ! Without them the matrix M_{k,k+q}=M_{k,p+G} would be obtained + ! Indeed setting i_kmq_G0=1 (i.e. G=0) the results are very bad. + ! Both in the BSE and in the collisions, i.e. the matrix is not at all hermitian. ! - if (iqibz/=isc_XC%iqref) call scatter_Gamp(iscp_XC,'x') + ! In the subrtouine QP_ppa_cohsex and XCo_Hartree_Fock. + ! There the difference M_{k,k+q} vs M_{k,p} maybe non crucial, since + ! the matrix is multiplied by a quantity (the occupaitons) which are invariant under G0 shift + ! + if (iqibz/=iscp_XC%iqref) call scatter_Gamp(iscp_XC,'x') ! if( iqibz/=isc_XC%iqref .and. l_compute_screening) then ! @@ -565,6 +826,12 @@ subroutine compute_MBPT_XC_collisions() call scatter_Bamp(iscp_XC) ! do i_np=COLL_bands(1),COLL_bands(2) + ! + cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & + & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) + ! + if ( COLLISIONS_CV_only .and. cc_vv_colls ) cycle + if ( cc_vv_only .and. (.not.cc_vv_colls) ) cycle ! ! COLLISIONS(n,n',qp_n_states) = \sum_{G,G',q} ( rho(m,n,G,q,k) x EM1s(G ,G') x rho*(m',n',G',q,k) /|q+G|/|q+G'| ) ! @@ -572,6 +839,8 @@ subroutine compute_MBPT_XC_collisions() ! isc_XC%os(1)=i_np ! + ! DS: 2023/10/25 Merge Check + !if (any(isc_XC%is/=iscp_XC%is).or.any(isc_XC%os/=iscp_XC%os).or.any(isc_XC%qs/=iscp_XC%qs)) then if (any(isc_XC%is/=iscp_XC%is).or.any(isc_XC%os/=iscp_XC%os)) then call scatter_Bamp(isc_XC) else @@ -583,26 +852,39 @@ subroutine compute_MBPT_XC_collisions() !$omp parallel do default(shared), private(ig1), reduction(+:pre_factor1) do ig1=1,N_g_vecs_X pre_factor1=pre_factor1+isc_XC%rhotw(ig1)*iscp_XC%gamp(ig1,1)*conjg(iscp_XC%rhotw(ig1)) + ! DS: 2023/10/25 Merge Check + !ig2=G_m_G(ig1,minus_G(i_kmq_G0)) + !pre_factor1=pre_factor1+conjg(isc_XC%rhotw(ig2))*iscp_XC%gamp(ig2,1)*iscp_XC%rhotw(ig2) enddo !$omp end parallel do endif ! + ! DEBUG < + !ig2=G_m_G(1,minus_G(i_kmq_G0)) + !if ( (i_n==5 .and. i_m==9 .and. i_k==2 .and. i_np==5 .and. i_mp==10 .and. i_kmq==1) .or. & + !& (i_n==5 .and. i_m==10 .and. i_k==1 .and. i_np==5 .and. i_mp==9 .and. i_kmq==2) ) & + !& write(201,*) i_n,i_m,i_k,i_np,i_mp,i_kmq,iqbz,iqibz,i_kmq_G0, & + !& conjg(isc_XC%rhotw(ig2)),iscp_XC%gamp(ig2,1),iscp_XC%rhotw(ig2) + ! DEBUG > + ! pre_factor2=cZERO if(index(H_potential,"COH")>0.or.index(H_potential,"SEX")>0) then !$omp parallel do default(shared), private(ig1,ig2), reduction(+:pre_factor2) do ig1=1,N_g_vecs_C do ig2=1,N_g_vecs_C pre_factor2=pre_factor2+isc_XC%rhotw(ig2)*EM1s(ig2,ig1)*conjg(iscp_XC%rhotw(ig1)) + ! DS: 2023/10/25 Merge Check + !pre_factor2=pre_factor2+conjg(isc_XC%rhotw(ig2))*EM1s(ig2,ig1)*conjg(iscp_XC%rhotw(ig1)) enddo enddo !$omp end parallel do endif ! if(index(H_potential,"SEX")>0 .or. index(H_potential,"FOCK")>0) & -& HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq) & +& HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp)=HXC_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp) & & -4._SP/spin_occ*pi*(pre_factor1+pre_factor2) if(index(H_potential,"COH")>0 ) & -& COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq)=COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq) & +& COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp)=COH_COLL_element(1)%v3_c(i_np,i_mp,i_kmq,i_sp) & & +2._SP *pi* pre_factor2 ! call live_timing(steps=1) diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index cb0620ea11..6d82ff580c 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -189,9 +189,7 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! Spins ! i_k_sp = GW_NEQ_collisions%state(i_coll1,4) - i_p_sp = i_k_sp i_kmq_sp= i_k_sp - i_pmq_sp= i_k_sp ! isc%is =(/i_n ,i_k,i_k_s,i_k_sp/) isc%os =(/i_np,i_kmq,i_kmq_s,i_kmq_sp/) @@ -205,6 +203,8 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) i_m = GW_NEQ_collisions%state(i_coll2,1) i_mp = GW_NEQ_collisions%state(i_coll2,2) i_p = GW_NEQ_collisions%state(i_coll2,3) + i_p_sp = GW_NEQ_collisions%state(i_coll2,4) + i_pmq_sp= i_k_sp ! do i_p_star=1,k%nstar(i_p) ! @@ -256,13 +256,13 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! if (io_COLLs) then ! - GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz)=& -& GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz) +abs(pre_factor)**2 + GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz,i_p_sp)=& +& GW_NEQ_COLL_element(1)%v3_r(i_J,1,iqbz,i_p_sp) +abs(pre_factor)**2 ! else ! - GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem)=& -& GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem)+abs(pre_factor)**2 + GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem,i_p_sp)=& +& GW_NEQ_COLL_element(i_coll1_mem)%v3_r(i_J_mem,1,i_q_mem,i_p_sp)+abs(pre_factor)**2 ! endif ! diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index d7f3faf098..3487334e20 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -10,10 +10,12 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use pars, ONLY:cZERO,rZERO,DP,SP use plasma, ONLY:N_plasma_poles_global use R_lattice, ONLY:nqbz,nkibz + use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol use parallel_m, ONLY:PAR_nPlasma,PAR_nQ_bz use collision_ext, ONLY:COLLISIONS_element,COH_COLL_element,HXC_COLL_element,GW_NEQ_COLL_element,& -& COLL_bands,COLLISIONS_load_SP,& -& GW_NEQ_collisions,COH_collisions,HXC_collisions,P_collisions,COLLISIONS_group +& COLL_bands,COLLISIONS_load_SP,COLLISIONS_CV_only,COLLISIONS_FEW_only,& +& GW_NEQ_collisions,COH_collisions,HXC_collisions,P_collisions,COLLISIONS_group,& +& COLL_hole_bands,COLL_elec_bands #if defined _QED use QP_m, ONLY:QP_QED_ng use collision_ext, ONLY:P_COLL_element @@ -26,7 +28,7 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! ! Work Space ! - integer :: D(3,2),COLL_range(2),J,K,mem_size(5),size_ + integer :: D(3,4),COLL_range(2),J,K,mem_size(5),size_ logical :: l_COH,l_HXC,l_GW_NEQ,l_v3,l_v1,l_table,l_all,l_alloc,& & l_clean,l_collision,l_distribute,l_Momentum,l_complex,l_real ! @@ -68,10 +70,12 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) l_clean =index(actions,"clean")>0 l_distribute=index(actions,"distribute")>0 ! + D=0 + ! if (l_COH) then - D(1,:)=COLL_bands - D(2,:)=COLL_bands - D(3,:)=(/1,nkibz/) + D(1,1:2)=COLL_bands + D(2,1:2)=COLL_bands + D(3,1:2)=(/1,nkibz/) if (l_collision.and.l_alloc) then allocate(COH_COLL_element(size_)) COH_COLL_element%N=size_ @@ -86,9 +90,36 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) endif ! if (l_HXC) then - D(1,:)=COLL_bands - D(2,:)=COLL_bands - D(3,:)=(/1,nkibz/) + ! These numbers are used in: + ! (i) src/io_parallel/io_COLLISIONS.F (all components of D in case CV_only) + ! * COLLISIONS_CV_only case + ! ! This one only defines the I/O dimension. The factor 2 on the kpts + ! ! exist because, for each k, there is the cv and the vc block + ! N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk + ! N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nc + ! N(3)=COLL_grp%D(1,4)-COLL_grp%D(1,1)+1 ! Nv + ! * General case + ! N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk + ! N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1) ! Nc + ! N(3)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 ! Nv + ! (ii) src/collisions/COLLISIONS_linearize_and_IO.F (only components D(1:3,:)) + ! do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik + ! do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 + ! do i1=COLL_grp%D(1,1),COLL_grp%D(1,2) ! ib2 + D(1,1:2)=COLL_bands + D(2,1:2)=COLL_bands + D(3,1:2)=(/1,nkibz/) + D(:,3:4)=-1 ! unused + if (COLLISIONS_CV_only) then + D(1,3)=-1 ! unused + D(2,3)=minval(n_full_bands) ! lower bound for conduction + D(1,4)=maxval(n_met_bands) ! upper bound for valence + D(2,4)=-1 ! unused + endif + if (COLLISIONS_FEW_only) then + D(1,3:4)=COLL_hole_bands ! update upper (and lower) bound for valence + D(2,3:4)=COLL_elec_bands ! update lower (and upper) bound for conduction + endif if (l_collision.and.l_alloc) then allocate(HXC_COLL_element(size_)) HXC_COLL_element%N=size_ @@ -105,9 +136,9 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) #if defined _QED ! if (l_Momentum) then - D(1,:)=(/1,QP_QED_ng/) - D(2,:)=COLL_bands - D(3,:)=(/1,nqbz/) + D(1,1:2)=(/1,QP_QED_ng/) + D(2,1:2)=COLL_bands + D(3,1:2)=(/1,nqbz/) if (l_collision.and.l_alloc) then allocate(P_COLL_element(size_)) P_COLL_element%N=size_ @@ -124,12 +155,12 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) #endif ! if (l_GW_NEQ) then - D(1,:)=(/1,N_plasma_poles_global/) - D(2,:)=(/1,1/) - D(3,:)=(/1,nqbz/) + D(1,1:2)=(/1,N_plasma_poles_global/) + D(2,1:2)=(/1,1/) + D(3,1:2)=(/1,nqbz/) if (l_distribute.and.(l_v3.or.l_table)) then - D(1,:)=(/1,PAR_nPlasma/) - D(3,:)=(/1,PAR_nQ_bz/) + D(1,1:2)=(/1,PAR_nPlasma/) + D(3,1:2)=(/1,PAR_nQ_bz/) endif if (l_collision.and.l_alloc) then allocate(GW_NEQ_COLL_element(size_)) @@ -146,9 +177,9 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! contains ! - subroutine local_alloc_and_free(COLL,COLL_grp) + subroutine local_alloc_and_free(COLL_element,COLL_grp) type(COLLISIONS_group) :: COLL_grp - type(COLLISIONS_element) :: COLL(COLL_grp%N) + type(COLLISIONS_element) :: COLL_element(COLL_grp%N) if(COLL_grp%N==0) return mem_size=0 do J=COLL_range(1),COLL_range(2) @@ -157,64 +188,64 @@ subroutine local_alloc_and_free(COLL,COLL_grp) ! allocated. This is because J runs on the parallel components and not on the real ones. ! do K=1,COLL_grp%N - if (COLL_grp%PAR_map(K)==J) COLL(J)%I=K + if (COLL_grp%PAR_map(K)==J) COLL_element(J)%I=K enddo ! if (l_alloc.and.(l_v3.or.l_all)) then if(l_real) then - YAMBO_ALLOC(COLL(J)%v3_r,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - COLL(J)%v3_r=rZERO - mem_size(1)=mem_size(1)+size(COLL(J)%v3_r) + YAMBO_ALLOC(COLL_element(J)%v3_r,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2),n_sp_pol)) + COLL_element(J)%v3_r=rZERO + mem_size(1)=mem_size(1)+size(COLL_element(J)%v3_r) endif if(l_complex) then - YAMBO_ALLOC(COLL(J)%v3_c,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - COLL(J)%v3_c=cZERO - mem_size(2)=mem_size(2)+size(COLL(J)%v3_c) + YAMBO_ALLOC(COLL_element(J)%v3_c,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2),n_sp_pol)) + COLL_element(J)%v3_c=cZERO + mem_size(2)=mem_size(2)+size(COLL_element(J)%v3_c) endif COLL_grp%D=D endif if (l_clean.and.(l_v3.or.l_all)) then - if (l_real .and.allocated(COLL(J)%v3_r)) then - YAMBO_FREE(COLL(J)%v3_r) + if (l_real .and.allocated(COLL_element(J)%v3_r)) then + YAMBO_FREE(COLL_element(J)%v3_r) endif - if (l_complex.and.allocated(COLL(J)%v3_c)) then - YAMBO_FREE(COLL(J)%v3_c) + if (l_complex.and.allocated(COLL_element(J)%v3_c)) then + YAMBO_FREE(COLL_element(J)%v3_c) endif endif if (l_alloc.and.(l_v1.or.l_all)) then if(l_real) then - YAMBO_ALLOC(COLL(J)%v_r,(COLL(J)%N)) - COLL(J)%v_r=rZERO - mem_size(3)=mem_size(3)+size(COLL(J)%v_r) + YAMBO_ALLOC(COLL_element(J)%v_r,(COLL_element(J)%N)) + COLL_element(J)%v_r=rZERO + mem_size(3)=mem_size(3)+size(COLL_element(J)%v_r) endif if(l_complex) then - YAMBO_ALLOC(COLL(J)%v_c,(COLL(J)%N)) - COLL(J)%v_c=cZERO - mem_size(4)=mem_size(4)+size(COLL(J)%v_c) + YAMBO_ALLOC(COLL_element(J)%v_c,(COLL_element(J)%N)) + COLL_element(J)%v_c=cZERO + mem_size(4)=mem_size(4)+size(COLL_element(J)%v_c) if(SP==DP.and.COLLISIONS_load_SP) then - YAMBO_ALLOC(COLL(J)%v_c_SP,(COLL(J)%N)) - COLL(J)%v_c_SP=cZERO - mem_size(4)=mem_size(4)+size(COLL(J)%v_c_SP) + YAMBO_ALLOC(COLL_element(J)%v_c_SP,(COLL_element(J)%N)) + COLL_element(J)%v_c_SP=cZERO + mem_size(4)=mem_size(4)+size(COLL_element(J)%v_c_SP) endif endif endif if (l_clean.and.(l_v1.or.l_all)) then - YAMBO_FREE(COLL(J)%v_c) - if(SP==DP.and.allocated(COLL(J)%v_c_SP)) then - YAMBO_FREE(COLL(J)%v_c_SP) + YAMBO_FREE(COLL_element(J)%v_c) + if(SP==DP.and.allocated(COLL_element(J)%v_c_SP)) then + YAMBO_FREE(COLL_element(J)%v_c_SP) endif - YAMBO_FREE(COLL(J)%v_r) + YAMBO_FREE(COLL_element(J)%v_r) endif if (l_alloc.and.(l_table.or.l_all)) then - !AMBO_ALLOC(COLL(J)%table,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - allocate(COLL(J)%table(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) - COLL(J)%table='f' + !AMBO_ALLOC(COLL_element(J)%table,(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2))) + allocate(COLL_element(J)%table(D(1,1):D(1,2),D(2,1):D(2,2),D(3,1):D(3,2),n_sp_pol)) + COLL_element(J)%table='f' COLL_grp%D=D - mem_size(5)=mem_size(5)+size(COLL(J)%table) + mem_size(5)=mem_size(5)+size(COLL_element(J)%table) endif if (l_clean.and.(l_table.or.l_all)) then - !AMBO_FREE(COLL(J)%table) - deallocate(COLL(J)%table) + !AMBO_FREE(COLL_element(J)%table) + deallocate(COLL_element(J)%table) endif enddo ! diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index 7c1468711a..30acbe453e 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -17,7 +17,8 @@ subroutine COLLISIONS_basic_operations( what, COLL ) ! integer, pointer :: IO_status(:) => null() ! end type ! - use collision_ext, ONLY:COLLISIONS_group,COLL_bands,COLLISIONS_CV_only + use collision_ext, ONLY:COLLISIONS_group,COLLISIONS_CV_only,COLLISIONS_FEW_only,& + & COLL_bands,COLL_hole_bands,COLL_elec_bands use R_lattice, ONLY:nXkibz use electrons, ONLY:n_sp_pol,n_full_bands,n_met_bands use wave_func, ONLY:states_to_load @@ -77,22 +78,29 @@ subroutine COLLISIONS_basic_operations( what, COLL ) ! COLL%N=0 ! - do i_k=1,nXkibz - do i_n=COLL_bands(1),COLL_bands(2) - do i_mix=0,COLL_bands(2)-COLL_bands(1) + do i_sp=1,n_sp_pol + do i_k=1,nXkibz + do i_n=COLL_bands(1),COLL_bands(2) ! - i_m=i_n+i_mix + if ( COLLISIONS_CV_only .and. i_n> n_met_bands(i_sp) ) cycle + if ( COLLISIONS_FEW_only .and. i_nCOLL_hole_bands(2) .and. i_nCOLL_elec_bands(2) ) cycle ! - ! No Off-diagonal elements in the case of P collisions - ! - if (trim(COLL%name)=="Momentum".and.i_mix>0) cycle - ! - if (i_m>COLL_bands(2)) cycle - ! - do i_sp=1,n_sp_pol + do i_mix=0,COLL_bands(2)-COLL_bands(1) + ! + i_m=i_n+i_mix ! - if ( COLLISIONS_CV_only .and. i_n> n_met_bands(i_sp) ) cycle if ( COLLISIONS_CV_only .and. i_m<=n_full_bands(i_sp) ) cycle + if ( COLLISIONS_FEW_only .and. i_mCOLL_hole_bands(2) .and. i_mCOLL_elec_bands(2) ) cycle + ! + if (i_m>COLL_bands(2)) cycle + ! + ! No Off-diagonal elements in the case of P collisions + ! + if (trim(COLL%name)=="Momentum".and.i_mix>0) cycle ! COLL%N=COLL%N+1 if (i_c==2) then @@ -104,6 +112,7 @@ subroutine COLLISIONS_basic_operations( what, COLL ) COLL%state(COLL%N,:4)=(/i_m,i_n,i_k,i_sp/) endif endif + ! enddo enddo enddo diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 01430ecef7..62fb244da1 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -11,8 +11,9 @@ subroutine COLLISIONS_compose_nl(G_in) ! use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree!l_sc_hf,l_sc_cohsex,l_sc_exx - use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_load_SP - use electrons, ONLY:spin + use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_load_SP,& + & COLLISIONS_CV_only,COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands + use electrons, ONLY:spin,n_met_bands,n_full_bands,n_sp_pol use R_lattice, ONLY:nXkibz use parallel_m, ONLY:HEAD_QP_cpu,PAR_COM_Xk_ibz_INDEX use parallel_int, ONLY:PP_redux_wait @@ -23,19 +24,39 @@ subroutine COLLISIONS_compose_nl(G_in) ! implicit none ! - complex(SP), intent(in) :: G_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + complex(SP), intent(in) :: G_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol) ! ! Work Space ! - integer :: i_coll,ib,ibp,i_k,i_k_NL,i_kmq,i_comp,i_coll_mem,i_spin + integer :: i_coll,ib,ibp,i_k,i_k_NL,i_kmq,i_comp,i_coll_mem,i_sp,ip_sp integer :: i_n,i_m complex(SP) :: COLL + logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),n_sp_pol),coll_sp ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return ! #if defined _TIMING call timing('NL COLL_compose',OPR='start') #endif + ! + do_collisions=.false. + coll_sp=COLLISIONS_load_SP + ! + do i_sp=1,n_sp_pol + do ibp=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle + do ib=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle + if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + do_collisions(ib,ibp,i_sp)=.true. + enddo + enddo + enddo ! RT_Vnl_xc=cZERO ! @@ -46,31 +67,35 @@ subroutine COLLISIONS_compose_nl(G_in) i_k =HXC_collisions%state(i_coll,3) i_n =HXC_collisions%state(i_coll,1) i_m =HXC_collisions%state(i_coll,2) - i_spin =HXC_collisions%state(i_coll,4) + i_sp =HXC_collisions%state(i_coll,4) i_coll_mem=HXC_collisions%PAR_map(i_coll) ! i_comp=1 ! i_k_NL=i_k ! + do ip_sp=1,n_sp_pol do i_kmq=1,nXkibz ! do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then - if(COLLISIONS_load_SP) then - COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c_SP(i_comp),kind=SP) - else - COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c(i_comp),kind=SP) - endif - RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_spin)-cI*COLL*G_in(ib,ibp,i_kmq) - i_comp=i_comp+1 + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,ip_sp)=='f') cycle + ! + if ( .not.do_collisions(ib,ibp,ip_sp) ) cycle + ! + if(coll_sp) then + COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c_SP(i_comp),kind=SP) + else + COLL=cmplx(HXC_COLL_element(i_coll_mem)%v_c(i_comp),kind=SP) endif + RT_Vnl_xc(i_n,i_m,i_k_NL,i_sp)=RT_Vnl_xc(i_n,i_m,i_k_NL,i_sp)-cI*COLL*G_in(ib,ibp,i_kmq,ip_sp) + i_comp=i_comp+1 ! enddo enddo enddo + enddo ! enddo ! @@ -82,9 +107,10 @@ subroutine COLLISIONS_compose_nl(G_in) i_k =HXC_collisions%state(i_coll,3) i_n =HXC_collisions%state(i_coll,1) i_m =HXC_collisions%state(i_coll,2) + i_sp =HXC_collisions%state(i_coll,4) ! - RT_Vnl_xc(i_n,i_n,i_k,:) =real(RT_Vnl_xc(i_n,i_n,i_k,:),SP) - RT_Vnl_xc(i_m,i_n,i_k,:)=conjg(RT_Vnl_xc(i_n,i_m,i_k,:)) + RT_Vnl_xc(i_n,i_n,i_k,i_sp) =real(RT_Vnl_xc(i_n,i_n,i_k,i_sp),SP) + RT_Vnl_xc(i_m,i_n,i_k,i_sp)=conjg(RT_Vnl_xc(i_n,i_m,i_k,i_sp)) ! enddo ! diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 63f05bb381..30689cee30 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -5,31 +5,30 @@ ! ! Authors (see AUTHORS file for details): CA AM DS ! -subroutine COLLISIONS_compose_rt(dG_in) +subroutine COLLISIONS_compose_rt(dG_avg) ! ! HF/SEX(state) = - (0.,1.) * \sum_{n,n',q} COLLISIONS(n,n',q,state) x G_lesser(n,n',k-q) ! use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree - use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions - use electrons, ONLY:spin + use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only,& + & COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands + use electrons, ONLY:spin,n_met_bands,n_full_bands,n_sp_pol use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait - use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_COM_Q_INDEX,& -& PAR_IND_Xk_ibz,PAR_IND_Bp_mat,PAR_G_k_range + use parallel_m, ONLY:PAR_COM_Xk_ibz_A2A,PAR_IND_Xk_ibz,PAR_IND_Bp_mat use hamiltonian, ONLY:B_mat_index - use real_time, ONLY:RTibz,RT_Vnl_xc,RT_bands + use real_time, ONLY:RT_Vnl_xc,RT_bands use timing_m, ONLY:timing ! implicit none ! - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol) ! ! Work Space ! - integer :: i_coll,i_comp,i_coll_mem,i_spin,i_n,i_m,i_kmq,ib,ibp,i_k,i_k_RT - logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2)) - complex(SP) :: G_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz) + integer :: i_coll,i_comp,i_coll_mem,i_sp,ip_sp,i_n,i_m,i_kmq,ib,ibp,i_k + logical :: do_collisions(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),n_sp_pol,2) ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return ! @@ -37,40 +36,24 @@ subroutine COLLISIONS_compose_rt(dG_in) ! do_collisions=.false. ! + do i_sp=1,n_sp_pol do ibp=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle do ib=COLL_bands(1),COLL_bands(2) + if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle + if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + do_collisions(ib,ibp,i_sp,1)=.true. if (.not.PAR_IND_Bp_mat%element_1D( B_mat_index(ib,ibp,COLL_bands) ) ) cycle - do_collisions(ib,ibp)=.true. + do_collisions(ib,ibp,i_sp,2)=.true. enddo enddo - ! - G_avg=cZERO - ! - do i_k=1,nXkibz - ! - if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle - ! - do i_k_RT=RTibz%k_range(i_k,1),RTibz%k_range(i_k,2) - G_avg(:,:,i_k)=G_avg(:,:,i_k)+dG_in(:,:,i_k_RT) - enddo - ! - ! The 1/real(RT_k_FT%N_mapped(i_k),SP) factor is needed here because I'm integrating - ! over kmq. With the DbGd the size of the integrating factor has to be reduced - ! - G_avg(:,:,i_k)=G_avg(:,:,i_k)/real(RTibz%N_mapped(i_k),SP)/real(PAR_COM_Q_INDEX%n_CPU) - ! enddo ! - call timing('COLLISIONS (compose)',OPR='stop') - ! - call timing('COLLISIONS (redux)',OPR='start') - ! - call PP_redux_wait(G_avg,COMM=PAR_COM_Xk_ibz_INDEX%COMM) - ! - call timing('COLLISIONS (redux)',OPR='stop') - ! - call timing('COLLISIONS (compose)',OPR='start') - ! RT_Vnl_xc=cZERO ! do i_coll=1,HXC_collisions%N @@ -80,7 +63,7 @@ subroutine COLLISIONS_compose_rt(dG_in) i_k =HXC_collisions%state(i_coll,3) i_n =HXC_collisions%state(i_coll,1) i_m =HXC_collisions%state(i_coll,2) - i_spin =HXC_collisions%state(i_coll,4) + i_sp =HXC_collisions%state(i_coll,4) i_coll_mem=HXC_collisions%PAR_map(i_coll) ! ! If the COLLISIONS are read from a DB with more bands than RT_bands: @@ -90,43 +73,107 @@ subroutine COLLISIONS_compose_rt(dG_in) ! i_comp=0 ! + do ip_sp=1,n_sp_pol do i_kmq=1,nXkibz ! do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='f') cycle + if (.not.do_collisions(ib,ibp,ip_sp,1)) cycle + ! + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,ip_sp)=='f') cycle ! i_comp=i_comp+1 ! - if (.not.do_collisions(ib,ibp)) cycle + if (.not.do_collisions(ib,ibp,ip_sp,2)) cycle ! - RT_Vnl_xc(i_n,i_m,i_k,i_spin)=RT_Vnl_xc(i_n,i_m,i_k,i_spin) & -& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*G_avg(ib,ibp,i_kmq) + RT_Vnl_xc(i_n,i_m,i_k,i_sp)=RT_Vnl_xc(i_n,i_m,i_k,i_sp) & +& -cI*HXC_COLL_element(i_coll_mem)%v_c(i_comp)*dG_avg(ib,ibp,i_kmq,ip_sp) ! enddo enddo ! enddo + enddo ! enddo ! - ! All 2 All - !=========== + call timing('COLLISIONS (compose)',OPR='stop') + ! + call timing('COLLISIONS (sym-red)',OPR='start') ! - call PP_redux_wait(RT_Vnl_xc) + ! Redux over bands + !================== + call PP_redux_wait(RT_Vnl_xc,COMM=PAR_COM_Xk_ibz_A2A%COMM) ! ! Symmetrization !================ + do i_sp=1,n_sp_pol do i_k=1,nXkibz + if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle do i_n=COLL_bands(1),COLL_bands(2) - RT_Vnl_xc(i_n,i_n,i_k,:)= real(RT_Vnl_xc(i_n,i_n,i_k,:)) + RT_Vnl_xc(i_n,i_n,i_k,i_sp)= real(RT_Vnl_xc(i_n,i_n,i_k,i_sp)) do i_m=i_n+1,COLL_bands(2) - RT_Vnl_xc(i_m,i_n,i_k,:)=conjg(RT_Vnl_xc(i_n,i_m,i_k,:)) + RT_Vnl_xc(i_m,i_n,i_k,i_sp)=conjg(RT_Vnl_xc(i_n,i_m,i_k,i_sp)) enddo enddo enddo + enddo ! - call timing('COLLISIONS (compose)',OPR='stop') + ! Redux over kpts (is this needed?) + !==================================== + !call PP_redux_wait(RT_Vnl_xc,COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! + call timing('COLLISIONS (sym-red)',OPR='stop') ! end subroutine COLLISIONS_compose_rt +! +! +subroutine Build_dG_avg(dG_in,dG_avg) + ! + use pars, ONLY:SP,cZERO + use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree + use electrons, ONLY:n_sp_pol + use R_lattice, ONLY:nXkibz + use parallel_int, ONLY:PP_redux_wait + use parallel_m, ONLY:PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz,PAR_G_k_range + use real_time, ONLY:RTibz,RT_bands + use timing_m, ONLY:timing + ! + implicit none + ! + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(out) :: dG_avg(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol) + ! + ! Work Space + ! + integer :: i_k,i_k_RT,i_sp + ! + if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and..not.l_sc_hartree) return + ! + call timing('COLLISIONS (G average)',OPR='start') + ! + dG_avg=cZERO + ! + do i_sp=1,n_sp_pol + do i_k=1,nXkibz + ! + if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle + ! + do i_k_RT=RTibz%k_range(i_k,1),RTibz%k_range(i_k,2) + dG_avg(:,:,i_k,i_sp)=dG_avg(:,:,i_k,i_sp)+dG_in(:,:,i_k_RT,i_sp) + enddo + ! + ! The 1/real(RT_k_FT%N_mapped(i_k),SP) factor is needed here because I'm integrating + ! over kmq. With the DbGd the size of the integrating factor has to be reduced + ! + dG_avg(:,:,i_k,i_sp)=dG_avg(:,:,i_k,i_sp)/real(RTibz%N_mapped(i_k),SP)/real(PAR_COM_Q_INDEX%n_CPU) + ! + enddo + enddo + ! + call PP_redux_wait(dG_avg,COMM=PAR_COM_Xk_ibz_INDEX%COMM) + ! + call timing('COLLISIONS (G average)',OPR='stop') + ! +end subroutine Build_dG_avg diff --git a/src/collisions/COLLISIONS_compose_sc.F b/src/collisions/COLLISIONS_compose_sc.F index 415a859437..296b8fb388 100644 --- a/src/collisions/COLLISIONS_compose_sc.F +++ b/src/collisions/COLLISIONS_compose_sc.F @@ -10,21 +10,22 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! HF(qp_state) = - (0.,1.) * \sum_{n,n',q} Collisions(n,n',q,qp_state) x G_sex/coh(n,n',k-q) ! use pars, ONLY:SP,cZERO,cI + use electrons, ONLY:n_sp_pol use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree use QP_m, ONLY:QP_nk,QP_nb,QP_n_states,QP_Sc,QP_Vnl_xc use collision_ext, ONLY:COH_COLL_element,HXC_COLL_element,COLL_bands,HXC_collisions,& -& COH_collisions,COLLISIONS_have_HARTREE +& COH_collisions,COLLISIONS_have_HARTREE,COLLISIONS_CV_only use parallel_m, ONLY:PAR_IND_QP,HEAD_b_cpu,PAR_IND_G_k use parallel_int, ONLY:PP_redux_wait use timing_m, ONLY:timing implicit none ! - complex(SP), intent(in) :: G_sex(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) - complex(SP), intent(in) :: G_coh(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk) + complex(SP), intent(in) :: G_sex(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk,n_sp_pol) + complex(SP), intent(in) :: G_coh(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),QP_nk,n_sp_pol) ! ! Work Space ! - integer :: i_qp,ib,ibp,i_kmq,ic1,ic2,i_coll_mem + integer :: i_qp,ib,ibp,i_kmq,ic1,ic2,i_coll_mem,i_sp logical :: l_sex ! if(.not.l_sc_fock.and..not.l_sc_coh.and..not.l_sc_sex.and..not.l_sc_exx.and.& @@ -37,6 +38,8 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! if (.not.allocated(QP_Vnl_xc)) allocate(QP_Vnl_xc(QP_n_states)) ! + if (COLLISIONS_CV_only) call error(" cannot use cv only collisions in yambo_sc") + ! l_sex =l_sc_sex.or.l_sc_fock.or.(l_sc_hartree.and.COLLISIONS_have_HARTREE) QP_Vnl_xc=cZERO ! @@ -55,14 +58,15 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ic1=1 ic2=1 ! + do i_sp=1,n_sp_pol do i_kmq=1,QP_nk ! if (.not.PAR_IND_G_k%element_1D(i_kmq)) then if (l_sc_coh) then - ic1=ic1+count(COH_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq)=='t') + ic1=ic1+count(COH_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq,i_sp)=='t') endif if (l_sex) then - ic2=ic2+count(HXC_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq)=='t') + ic2=ic2+count(HXC_COLL_element(i_coll_mem)%table(COLL_bands(1):QP_nb,COLL_bands(1):QP_nb,i_kmq,i_sp)=='t') endif cycle endif @@ -73,8 +77,8 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! COH part ! if (l_sc_coh) then - if (COH_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then - QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*COH_COLL_element(i_coll_mem)%v_c(ic1)*G_coh(ib,ibp,i_kmq) + if (COH_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,i_sp)=='t') then + QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*COH_COLL_element(i_coll_mem)%v_c(ic1)*G_coh(ib,ibp,i_kmq,i_sp) ic1=ic1+1 endif endif @@ -82,8 +86,8 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) ! SEX/HF/HARTREE parts ! if (l_sex) then - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=='t') then - QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*HXC_COLL_element(i_coll_mem)%v_c(ic2)*G_sex(ib,ibp,i_kmq) + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,i_sp)=='t') then + QP_Vnl_xc(i_qp)=QP_Vnl_xc(i_qp)-cI*HXC_COLL_element(i_coll_mem)%v_c(ic2)*G_sex(ib,ibp,i_kmq,i_sp) ic2=ic2+1 endif endif @@ -92,6 +96,7 @@ subroutine COLLISIONS_compose_sc(G_sex,G_coh) enddo ! enddo + enddo enddo ! call PP_redux_wait(QP_Vnl_xc) diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index 3999aeba6e..1e5702b111 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -11,8 +11,10 @@ subroutine COLLISIONS_compress(COLL) ! use pars, ONLY:SP,DP,SP6,cZERO - use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff + use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff,COLLISIONS_CV_only,& + & COLLISIONS_FEW_only,COLL_elec_bands,COLL_hole_bands use R_lattice, ONLY:nXkibz + use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol ! #include ! @@ -21,7 +23,7 @@ subroutine COLLISIONS_compress(COLL) ! Work Space ! real(SP) :: COLLISIONS_max - integer :: ib,ibp,i_kmq,ic + integer :: ib,ibp,i_kmq,ic,i_sp logical :: l_coll_SP ! if(allocated(COLL%v_c_SP)) then @@ -35,27 +37,42 @@ subroutine COLLISIONS_compress(COLL) ! ! Search for non-zero collisions ! - YAMBO_ALLOC(COLL%v3_c,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),1:nXkibz)) + YAMBO_ALLOC(COLL%v3_c,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),1:nXkibz,n_sp_pol)) ! ic=0 ! - COLL%table='t' + COLL%table='f' + ! + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) + ! + if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + ! do ib=COLL_bands(1),COLL_bands(2) ! + if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle + if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle + ! + if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle + ! ic=ic+1 ! - if(l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=cmplx(COLL%v_c_SP(ic),kind=SP) - if(.not.l_coll_SP) COLL%v3_c(ib,ibp,i_kmq)=COLL%v_c(ic) + if( l_coll_SP) COLL%v3_c(ib,ibp,i_kmq,i_sp)=cmplx(COLL%v_c_SP(ic),kind=SP) + if(.not.l_coll_SP) COLL%v3_c(ib,ibp,i_kmq,i_sp)= COLL%v_c(ic) ! - if(abs(COLL%v3_c(ib,ibp,i_kmq))=COLLISIONS_max*COLLISIONS_cutoff) COLL%table(ib,ibp,i_kmq,i_sp)='t' ! enddo enddo enddo + enddo ! - COLL%N=count(COLL%table(:,:,:)=='t') + COLL%N=count(COLL%table(:,:,:,:)=='t') ! if(l_coll_SP) then YAMBO_FREE(COLL%v_c_SP) @@ -68,20 +85,21 @@ subroutine COLLISIONS_compress(COLL) ! Fill collisions again ! ic=0 + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) do ib=COLL_bands(1),COLL_bands(2) ! - if(COLL%table(ib,ibp,i_kmq)=='t') then - ic=ic+1 - if(l_coll_SP) COLL%v_c_SP(ic)=cmplx(COLL%v3_c(ib,ibp,i_kmq),kind=SP6) - if(.not.l_coll_SP) COLL%v_c(ic) =COLL%v3_c(ib,ibp,i_kmq) - ! - endif + if(.not.COLL%table(ib,ibp,i_kmq,i_sp)=='t') cycle + ! + ic=ic+1 + if(l_coll_SP) COLL%v_c_SP(ic)=cmplx(COLL%v3_c(ib,ibp,i_kmq,i_sp),kind=SP6) + if(.not.l_coll_SP) COLL%v_c(ic) =COLL%v3_c(ib,ibp,i_kmq,i_sp) ! enddo enddo enddo + enddo ! YAMBO_FREE(COLL%v3_c) ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 939ba28555..3669f7e5f3 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -30,13 +30,16 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use wave_func, ONLY:WF use hamiltonian, ONLY:H_potential,H_kind use global_XC, ONLY:QP_SE_GW_NEQ,QP_SE_GW_QED - use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,& -& COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming + use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,COLLISIONS_from_BSE,& +& COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming,& +& COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands use X_m, ONLY:X_t use plasma, ONLY:EH_gas use frequency, ONLY:w_samp + use BS, ONLY:BS_kpt_bz,BS_kpt_ibz use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL_IF_END,VERIFY,REP,io_COLLs,manage_action + use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,RD_CL_IF_END,VERIFY,REP,NONE,DUMP,& +& io_COLLs,manage_action,netcdf_dim_size use parallel_m, ONLY:PAR_IND_G_k,PAR_IND_Bp_mat,PAR_IND_Plasma use parallel_int, ONLY:PP_wait,PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interfaces, ONLY:WF_free @@ -51,9 +54,13 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! ! WorkSpace ! - integer :: ID,IO_err,IO_ACT + logical :: l_collisions_from_bse,l_tmp + integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr,& + & BS_nk_bz,BS_nk_ibz character(20) :: PAR_ch,FREE_ch ! + integer, external :: io_BS_header,io_BS_PAR_init + ! call timing('COLLISIONS_eval',OPR='start') ! call section('*','Extended collisions') @@ -63,6 +70,8 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! l_use_collisions=.TRUE. ! + COLLISIONS_FEW_only=all((/COLL_hole_bands/=-1,COLL_elec_bands/=-1/)) + ! ! XC Potentials !=============== ! @@ -123,9 +132,37 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) if(l_use_Hxc_collisions) call CHECK_and_ALLOC(HXC_collisions) if(l_use_COH_collisions) call CHECK_and_ALLOC(COH_collisions) ! + if (.not.COLLISIONS_from_BSE) IO_err_BS=-1 + ! + if (l_use_Hxc_collisions.and.COLLISIONS_from_BSE) then + ! + ! Check if I can use the BSE kernel for the collisions + ! + call io_control(ACTION=OP_RD,COM=NONE,MODE=DUMP,ID=ID_head) + IO_err_BS=io_BS_header(1,X(2),ID_head,"connect") + BS_nk_bz =netcdf_dim_size(ID_head,"n_kpt_bz") + BS_nk_ibz=netcdf_dim_size(ID_head,"n_kpt_ibz") + allocate(BS_kpt_bz(3,BS_nk_bz)) + allocate(BS_kpt_ibz(3,BS_nk_ibz)) + call io_control(ACTION=RD_CL,COM=NONE,MODE=DUMP,ID=ID_head) + IO_err_BS=io_BS_header(1,X(2),ID_head,"full") + ! + if (IO_err_BS==0) then + call set_BS_blks(Xk) + call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,ID=ID_mat) + IO_err_BS=io_BS_PAR_init(1,ID_mat,"full") + call build_inverse_BS_eh_table(Xk,ID_mat)!,BS_nk_bz) + call check_BS_parameters_consistency(Xk,BS_nk_bz,BS_nk_ibz) + call build_BS_kpt_map(Xk) + endif + deallocate(BS_kpt_bz) + deallocate(BS_kpt_ibz) + ! + endif + ! if (IO_err/=0) then ! - call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2)) + call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2),IO_err_BS,ID_mat) ! ! COHSEX clean !-------------- @@ -135,6 +172,11 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! endif ! + if (l_use_Hxc_collisions.and.IO_err_BS==0) then + call io_control(ACTION=RD_CL,COM=REP,ID=ID_mat) + call io_BS_PAR_free(ID_head,ID_mat,"full",.true.) + endif + ! endif ! #if defined _QED @@ -230,7 +272,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! contains ! - subroutine CHECK_and_ALLOC(COLL) + subroutine CHECK_and_ALLOC(COLL_grp) ! #include ! @@ -243,27 +285,27 @@ subroutine CHECK_and_ALLOC(COLL) ! integer :: i_coll ! - type(COLLISIONS_group) :: COLL + type(COLLISIONS_group) :: COLL_grp ! IO_err=-1 ! if (io_COLLs) then - COLL%IO_status=-1 + COLL_grp%IO_status=-1 call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - IO_err=io_COLLs_header(ID,COLL) + IO_err=io_COLLs_header(ID,COLL_grp) #if defined _PAR_IO call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) - io_err=io_COLLISIONS(ID,COLL) + io_err=io_COLLISIONS(ID,COLL_grp) if(io_err==0) then call warning(" Restarting from previous database") - do i_coll=1,COLL%N - IO_ACT=manage_action(RD_CL_IF_END,i_coll,1,COLL%N) + do i_coll=1,COLL_grp%N + IO_ACT=manage_action(RD_CL_IF_END,i_coll,1,COLL_grp%N) call io_control(ACTION=IO_ACT,COM=REP,SEC=(/4/),ID=ID) - io_err=io_COLLISIONS(ID,COLL,i_coll=i_coll) + io_err=io_COLLISIONS(ID,COLL_grp,i_coll=i_coll) enddo endif #endif - if (any(COLL%IO_status/=1)) IO_err=-1 + if (any(COLL_grp%IO_status/=1)) IO_err=-1 endif ! ! In case io_Colls is /=0 all CPU have to sincronize before starting @@ -274,18 +316,205 @@ subroutine CHECK_and_ALLOC(COLL) if (IO_err==0) return ! if (io_COLLs) then - call COLLISIONS_alloc_and_free(trim(COLL%name),"collision","alloc",1) - call COLLISIONS_alloc_and_free(trim(COLL%name),"v3 table","alloc",1) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"collision","alloc",1) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"v3 table","alloc",1) else - call COLLISIONS_alloc_and_free(trim(COLL%name),"collision","alloc",0) - if (COLL%kind==QP_SE_GW_NEQ.or.COLL%kind==QP_SE_GW_QED) then - call COLLISIONS_alloc_and_free(trim(COLL%name),"v3","alloc distribute",0) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"collision","alloc",0) + if (COLL_grp%kind==QP_SE_GW_NEQ.or.COLL_grp%kind==QP_SE_GW_QED) then + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"v3","alloc distribute",0) else - call COLLISIONS_alloc_and_free(trim(COLL%name),"v3","alloc",1) - call COLLISIONS_alloc_and_free(trim(COLL%name),"table","alloc",0) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"v3","alloc",1) + call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"table","alloc",0) endif endif ! - end subroutine + end subroutine CHECK_and_ALLOC + ! +end subroutine COLLISIONS_eval +! +! +subroutine set_BS_blks(Xk) + ! + use pars, ONLY:cZERO + use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat, & +& BSK_IO_mode,l_BSE_kernel_full + use R_lattice, ONLY:bz_samp + ! +#include + ! + type(bz_samp), intent(in) :: Xk + ! + integer :: iB + ! + BS_res_ares_n_mat=1 + n_BS_blks=BS_K_dim(1)*2 + n_BS_blks_min=n_BS_blks + ! + allocate(BS_blk(n_BS_blks)) + BS_blk(:)%size(1)=1 + ! dual part + BS_blk(:)%zise(2)=1 + ! + do iB=1,BS_K_dim(1) + BS_blk(iB )%coordinate(1)=iB + BS_blk(iB+BS_K_dim(1))%coordinate(1)=iB + ! dual part + BS_blk(iB )%poordinate(1)=1 + BS_blk(iB+BS_K_dim(1))%poordinate(1)=1 + ! mode + BS_blk(iB )%mode="R" + BS_blk(iB+BS_K_dim(1))%mode="C" + enddo + ! + if (l_BSE_kernel_full) then + BS_blk(:)%size(2)=BS_K_dim(1) + BS_blk(:)%coordinate(2)=1 + else + do iB=1,BS_K_dim(1) + BS_blk(iB )%size(2)=BS_K_dim(1)-iB+1 + BS_blk(iB+BS_K_dim(1))%size(2)=BS_K_dim(1)-iB+1 + BS_blk(iB )%coordinate(2)=iB + BS_blk(iB+BS_K_dim(1))%coordinate(2)=iB + ! dual part + BS_blk(iB )%zise(1)=BS_K_dim(1)-BS_blk(iB)%size(2) + BS_blk(iB+BS_K_dim(1))%zise(1)=BS_K_dim(1)-BS_blk(iB)%size(2) + BS_blk(iB )%poordinate(2)=iB + BS_blk(iB+BS_K_dim(1))%poordinate(2)=iB + enddo + endif + ! +end subroutine set_BS_blks +! +! +subroutine check_BS_parameters_consistency(Xk,BS_nk_bz,BS_nk_ibz) + ! + use R_lattice, ONLY:bz_samp + use D_lattice, ONLY:nsym + use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc + use BS, ONLY:BS_blk,BS_n_g_W,BS_n_g_exch,BS_K_dim,BS_bands + use collision_ext, ONLY:COLL_bands + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + integer, intent(in) :: BS_nk_bz,BS_nk_ibz + ! + integer :: i_H + ! + if ( Xk%nbz/=BS_nk_bz ) & + & call error(" Different number of k-points between bse kernel and SAVE folder") + ! + if ( Xk%nibz/=BS_nk_ibz .and. BS_nk_ibz/=0 ) then + ! This will lead to wrong results due to phases issues. Indeed the k-pts + ! outside the new IBZ maybe reached by a new sym, if the original one + ! is not available anymore + if ( nsym>1 ) call error("nsym>1 and BSE kernel generated with more syms then SAVE") + ! This works only if the SAVE without symmetries has been generated by + ! directly expanding the SAVE used of the BSE run + if ( nsym==1 ) call warning("nsym=1 and BSE kernel generated with syms") + endif + ! + if (BS_n_g_exch/=QP_ng_SH) & + & call error(" Different cutoff between coll(hartree) and bse(exch)") + ! + if (BS_n_g_W /=QP_ng_Sx) & + & call error(" Different cutoff between coll(fock) and bse(direct)") + ! + if (BS_n_g_W /=QP_ng_Sc) & + & call error(" Different cutoff between coll(corr) and bse(direct)") + ! + if ( any(BS_bands/=COLL_bands) ) then + if ( BS_bands(1)>COLL_bands(1) .or. BS_bands(2) ! #if defined _PAR_IO integer, external :: io_COLLs_header @@ -42,7 +49,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C if(master_cpu) then !Only the master writes the header call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),ID=COLL_ID) - io_err=io_COLLs_header(COLL_ID,COLL) + io_err=io_COLLs_header(COLL_ID,COLL_grp) endif call PP_wait() #if defined _PAR_IO @@ -51,7 +58,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C !However, since there is a partial redux of the collisions, only few in practice are writing !Setting DO_IT=.true. would also work. However some info would be written twice in the same place call io_control(ACTION=OP_APP,COM=REP,SEC=(/1,2/),ID=COLL_ID,COMM=COMM) - io_err=io_COLLISIONS(COLL_ID,COLL,COLL_element=COLL_element(1),i_coll=i_coll) + io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) #endif endif call PP_wait() @@ -66,50 +73,77 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C l_QED_P = index(what,"Momentum")>0 ! i_ref=1 - if (.not.io_COLLs) i_ref=COLL%PAR_map(i_coll) + if (.not.io_COLLs) i_ref=COLL_grp%PAR_map(i_coll) ! ! Reference value for the reduction of the tiny elements of COHSEX/HF collision ! integrals. ! - if ( l_HXC .or. l_COH ) COLLISIONS_max=maxval(abs(COLL_element(1)%v3_c(:,:,:))) + if ( l_HXC .or. l_COH ) COLLISIONS_max=maxval(abs(COLL_element(1)%v3_c(:,:,:,:))) ! - COLL_element(i_ref)%table(:,:,:)='f' + COLL_element(i_ref)%table(:,:,:,:)='f' store_it=.true. ! do i_cycle=1,2 ! ic=0 ! - do i3=COLL%D(3,1),COLL%D(3,2) - do i2=COLL%D(2,1),COLL%D(2,2) - do i1=COLL%D(1,1),COLL%D(1,2) + do i4=1,n_sp_pol ! i_sp_pol + do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik + do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 + if ( COLLISIONS_FEW_only .and. i2COLL_hole_bands(2) .and. i2COLL_elec_bands(2) ) cycle + do i1=COLL_grp%D(1,1),COLL_grp%D(1,2) ! ib2 + ! + if ( COLLISIONS_CV_only .and. (i1> n_met_bands(i4) .and. i2> n_met_bands(i4) ) ) cycle + if ( COLLISIONS_CV_only .and. (i1<=n_full_bands(i4) .and. i2<=n_full_bands(i4)) ) cycle + ! + if ( COLLISIONS_FEW_only .and. i1COLL_hole_bands(2) .and. i1COLL_elec_bands(2) ) cycle ! ! In the COHSEX/HF case a cutoff can be applied ! if (l_HXC.or.l_COH) then - store_it=abs(COLL_element(1)%v3_c(i1,i2,i3))>=COLLISIONS_max*COLLISIONS_cutoff .or. COLLISIONS_cutoff<0.0 + store_it=abs(COLL_element(1)%v3_c(i1,i2,i3,i4))>=COLLISIONS_max*COLLISIONS_cutoff .or. COLLISIONS_cutoff<0.0 endif -#if defined _PAR_IO - if (.not.store_it) then - COLL_element(1)%v3_c(i1,i2,i3)=cZERO + if ((.not.store_it).and.io_COLLs) then + COLL_element(1)%v3_c(i1,i2,i3,i4)=cZERO store_it=.true. endif -#endif ! - if (store_it) then - ic=ic+1 - if (i_cycle==2) then - ! - COLL_element(i_ref)%table(i1,i2,i3)='t' - if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3) - if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3) - ! - endif + if (.not.store_it) cycle + ic=ic+1 + ! + if (i_cycle==2) then + ! + COLL_element(i_ref)%table(i1,i2,i3,i4)='t' + if (l_HXC .or.l_COH ) COLL_element(i_ref)%v_c(ic) = COLL_element(1)%v3_c(i1,i2,i3,i4) + if (l_GW_NEQ.or.l_QED_P ) COLL_element(i_ref)%v_r(ic) = COLL_element(1)%v3_r(i1,i2,i3,i4) + ! + ! DEBUG < + !Mij=COLL_element(1)%v3_c(i1,i2,i3,i4) + !if (abs( real(Mij))<1.e-10) Mij=cmplx(0._SP,aimag(Mij),kind=SP) + !if (abs(aimag(Mij))<1.e-10) Mij=cmplx(real(Mij),0._SP,kind=SP) + !str="N" + !if (COLL_grp%state(i_coll,1)COLL_grp%state(i_coll,2) .and. i1i2 ) str="C" + !if (COLL_grp%state(i_coll,1)>COLL_grp%state(i_coll,2) .and. i1>i2 ) str="A" + !! + ! write(100,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="R") write(101,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="C") write(102,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="Q") write(103,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + !if (str=="A") write(104,*) COLL_grp%state(i_coll,1:3),i1,i2,i3,i4,str,real(Mij),aimag(Mij) + ! DEBUG > + ! endif ! enddo enddo enddo + enddo ! COLL_element(i_ref)%N=ic ! @@ -119,22 +153,16 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL,COLL_element,C ! if (IO_colls) then ! -#if defined _PAR_IO call io_control(ACTION=WR,SEC=(/3,4/),ID=COLL_ID) -#else - call io_control(ACTION=OP_APP_CL,SEC=(/2,3/),ID=COLL_ID) -#endif - io_err=io_COLLISIONS(COLL_ID,COLL,COLL_element=COLL_element(1),i_coll=i_coll) + io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) ! call COLLISIONS_alloc_and_free(what,"v1","clean",1) ! -#if defined _PAR_IO if(i_coll==last_coll) then call PP_wait() call io_control(ACTION=WR_CL,SEC=(/5/),ID=COLL_ID) - io_err=io_COLLISIONS(COLL_ID,COLL,COLL_element=COLL_element(1),i_coll=i_coll) + io_err=io_COLLISIONS(COLL_ID,COLL_grp,COLL_element=COLL_element(1),i_coll=i_coll) endif -#endif ! endif ! diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index d00322cae5..cd62a2e349 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -16,6 +16,7 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) use LIVE_t, ONLY:live_timing use QP_m, ONLY:QP_QED_ng use R_lattice, ONLY:nqbz + use electrons, ONLY:n_sp_pol use plasma, ONLY:N_plasma_poles_global use hamiltonian, ONLY:H_kind use global_XC, ONLY:H_SE_FOCK,H_SE_COH,H_SE_SEX,QP_SE_GW_NEQ,H_SE_HARTREE @@ -36,7 +37,10 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) & GW_NEQ_COLL_element #endif ! - ! Define io_COLLs_header to handle either serial or parallel I/O + ! Inside collisions.h, io_COLLs_header is defined as either + ! - io_COLLISIONS (serial I/O) or + ! - io_COLLISIONS_header (parallel I/O case) + ! #include ! implicit none @@ -168,7 +172,7 @@ subroutine local_IO( COLL ) ! type(COLLISIONS_group) :: COLL integer :: iqbz,i_J,ic,i_coll,& -& i_coll_mem,i_q_mem,i_J_mem,i_b,i_g +& i_coll_mem,i_q_mem,i_J_mem,i_b,i_g,i_sp logical :: l_COH,l_HXC,l_NGW,l_QED,l_NGW_init,l_QED_init ! call live_timing(trim(COLL%name)//' collisions I/O',COLL%PAR_N) @@ -285,6 +289,7 @@ subroutine local_IO( COLL ) ! ic=0 ! + do i_sp=1,n_sp_pol do iqbz=1,nqbz ! i_q_mem=PAR_Q_bz_index(iqbz) @@ -299,18 +304,19 @@ subroutine local_IO( COLL ) ic=ic+1 if (.not.PAR_IND_Plasma%element_1D(i_J)) cycle i_J_mem =PAR_PLASMA_index(i_J) - GW_NEQ_COLL_element(i_coll_mem)%v3_r(i_J_mem,1,i_q_mem)=GW_NEQ_COLL_element(1)%v_r(ic) + GW_NEQ_COLL_element(i_coll_mem)%v3_r(i_J_mem,1,i_q_mem,i_sp)=GW_NEQ_COLL_element(1)%v_r(ic) enddo else do i_b=COLL_bands(1),COLL_bands(2) do i_g=1,QP_QED_ng ic=ic+1 - P_COLL_element(i_coll_mem)%v3_r(i_g,i_b,iqbz)=P_COLL_element(1)%v_r(ic) + P_COLL_element(i_coll_mem)%v3_r(i_g,i_b,iqbz,i_sp)=P_COLL_element(1)%v_r(ic) enddo enddo endif ! enddo + enddo endif #endif ! diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index e1dbf75cb8..79eafe74a2 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -60,7 +60,7 @@ subroutine LSEX_potential(q,X,Xw) if(Correlation==LSEX) then call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) io_err=io_X(X,Xw,ID) - if (io_err<0) call error('Incomplete and/or broken tatic diel. fun. database') + if (io_err<0) call error('Incomplete and/or broken static diel. fun. database') endif ! YAMBO_ALLOC(W,(q%nbz,ng_oscll,ng_oscll)) diff --git a/src/collisions/OSCLL_compose_collision.F b/src/collisions/OSCLL_compose_collision.F index 70ef858e7e..c223dce761 100644 --- a/src/collisions/OSCLL_compose_collision.F +++ b/src/collisions/OSCLL_compose_collision.F @@ -20,7 +20,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) +subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,i_sp,COLL) ! ! This subroutine use long-range part of the Screened exchange ! and the oscillators to reconstruct the collisions @@ -30,6 +30,7 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) use nl_optics, ONLY:NL_bands,Correlation,LSEX,LHF use collision_ext, ONLY:OSCLL,W,ng_oscll use QP_m, ONLY:QP_nk + use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp,qindx_S use parallel_m, ONLY:PAR_Xk_ibz_index use wrapper, ONLY:V_dot_V,M_by_V @@ -42,7 +43,7 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) type(bz_samp), intent(in) :: k,q ! ! Collision indexes - integer, intent(in) :: i_n,i_m,i_k + integer, intent(in) :: i_n,i_m,i_k,i_sp ! ! Work Space ! @@ -53,7 +54,7 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) ! ! Collisions output ! - complex(SP), intent(out) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP), intent(out) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) ! #if defined _TIMING call timing('OSCLL compose',OPR='start') @@ -76,8 +77,8 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) do ig2=1,ng_oscll !$OMP WORKSHARE forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) - COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+OSCLL(i_n,ib ,ik_mem,iqbz,ig2)*conjg(OSCLL(i_m,ibp,ik_mem,iqbz,ig1)) & -& *W(iqbz,ig2,ig1) + COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib ,ik_mem,i_sp,iqbz,ig2)* & + & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig2,ig1) end forall !$OMP END WORKSHARE enddo @@ -87,8 +88,8 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) do ig1=1,ng_oscll !$OMP WORKSHARE forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) - COLL(ib,ibp,i_kmq)=COLL(ib,ibp,i_kmq)+OSCLL(i_n,ib ,ik_mem,iqbz,ig1)*conjg(OSCLL(i_m,ibp,ik_mem,iqbz,ig1)) & -& *W(iqbz,ig1,ig1) + COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib,ik_mem,i_sp,iqbz,ig1)* & + & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig1,ig1) end forall !$OMP END WORKSHARE enddo diff --git a/src/collisions/OSCLL_compose_nl.F b/src/collisions/OSCLL_compose_nl.F index 5e952b6eca..499871c1b9 100644 --- a/src/collisions/OSCLL_compose_nl.F +++ b/src/collisions/OSCLL_compose_nl.F @@ -15,6 +15,7 @@ subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) use nl_optics, ONLY:NL_bands,NL_nbands use collision_ext, ONLY:ng_oscll,OSCLL,W use QP_m, ONLY:QP_nk + use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp,qindx_S,nXkibz use wrapper_omp, ONLY:V_dot_V use parallel_m, ONLY:PAR_Xk_ibz_index @@ -28,11 +29,11 @@ subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) integer, intent(in) :: i_k,i_sp_pol type(bz_samp), intent(in) :: k,q type(levels), intent(in) :: E - complex(SP), intent(in) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP), intent(in) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) ! ! Work Space ! - complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) #if defined _DOUBLE complex(SP), external :: ZDOTU #else @@ -47,12 +48,12 @@ subroutine OSCLL_compose_nl(dG,H_nl_sc,k,q,E,i_k,i_sp_pol) do i_n=NL_bands(1),NL_bands(2) do i_m=i_n,NL_bands(2) ! - call OSCLL_compose_collision(k,q,i_n,i_m,i_k,COLL) + call OSCLL_compose_collision(k,q,i_n,i_m,i_k,i_sp_pol,COLL) ! #if defined _DOUBLE - H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*ZDOTU(NL_nbands**2*QP_nk,COLL,1,dG,1) + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*ZDOTU(NL_nbands**2*QP_nk*n_sp_pol,COLL,1,dG,1) #else - H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*CDOTU(NL_nbands**2*QP_nk,COLL,1,dG,1) + H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)-cI*CDOTU(NL_nbands**2*QP_nk*n_sp_pol,COLL,1,dG,1) #endif ! enddo diff --git a/src/collisions/OSCLL_compose_vbands.F b/src/collisions/OSCLL_compose_vbands.F index d83534cdf4..3245d7a292 100644 --- a/src/collisions/OSCLL_compose_vbands.F +++ b/src/collisions/OSCLL_compose_vbands.F @@ -77,7 +77,7 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) ! !$OMP WORKSHARE forall(iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) - OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) + OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,i_sp_pol,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) end forall !$OMP END WORKSHARE ! diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F index da9a126a6e..e7a6e130ee 100644 --- a/src/collisions/OSCLL_eval.F +++ b/src/collisions/OSCLL_eval.F @@ -125,6 +125,7 @@ subroutine OSCLL_eval(q,k,en) ! COLL_nbands=COLL_bands(2)-COLL_bands(1)+1 ! + do i_sp_pol=1,n_sp_pol do i_k=1,QP_nk ! if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle @@ -149,10 +150,8 @@ subroutine OSCLL_eval(q,k,en) i_kmq = k%sstar(qindx_S(i_k,iqbz,1),1) i_kmq_s = k%sstar(qindx_S(i_k,iqbz,1),2) ! - ! Spin-Polarization not supported!! - ! - i_k_sp = 1 - i_kmq_sp= 1 + i_k_sp = i_sp_pol + i_kmq_sp= i_sp_pol ! ! Load only two k-points ! @@ -194,6 +193,7 @@ subroutine OSCLL_eval(q,k,en) call live_timing(steps=1) ! enddo + enddo ! call IO_and_Messaging_switch("RESTORE") ! diff --git a/src/common/LEVELS_mirror.F b/src/common/LEVELS_mirror.F index 6a6e9cc51f..00e8d79b41 100644 --- a/src/common/LEVELS_mirror.F +++ b/src/common/LEVELS_mirror.F @@ -19,14 +19,14 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) use SC, ONLY:SC_bands #endif #if defined _RT || defined _QED || defined _NL - use real_time, ONLY:RT_bands + use real_time, ONLY:RT_bands,RT_hole_bands,RT_elec_bands #endif #if defined _SC || defined _RT || defined _QED || defined _NL - use collision_ext, ONLY:COLL_bands - use hamiltonian, ONLY:H_ref_bands + use collision_ext, ONLY:COLL_bands,COLL_hole_bands,COLL_elec_bands + use hamiltonian, ONLY:H_ref_bands,H_ref_hole_bands,H_ref_elec_bands #endif #if defined _NL - use nl_optics, ONLY:NL_bands + use nl_optics, ONLY:NL_bands,NL_hole_bands,NL_elec_bands #endif ! implicit none @@ -37,7 +37,7 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) type(X_t) ::X(5) logical ::l_USER_field(16),dip_bands_defined ! - integer :: i1,SCATT_bands(2),DIP_bands(2) + integer :: i1,SCATT_bands(2),SCATT_hole_bands(2),SCATT_elec_bands(2),DIP_bands(2) ! if (STRING_same(what,"USER_fields")) then ! @@ -81,17 +81,27 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) ! Bands (Electronic levels) !--------------------------- SCATT_bands=-1 + SCATT_hole_bands=-1 + SCATT_elec_bands=-1 do i1=8,12 if(.not.(l_USER_field(i1))) cycle ! #if defined _RT || defined _QED || defined _NL - if(i1==8) SCATT_bands=RT_bands + if(i1==8) then + SCATT_bands=RT_bands + SCATT_hole_bands=RT_hole_bands + SCATT_elec_bands=RT_elec_bands + endif #endif #if defined _SC if(i1==9) SCATT_bands=SC_bands #endif #if defined _NL - if(i1==10) SCATT_bands=NL_bands + if(i1==10) then + SCATT_bands=NL_bands + SCATT_hole_bands=NL_hole_bands + SCATT_elec_bands=NL_elec_bands + endif #endif #if defined _SC if(i1==11) then @@ -102,7 +112,11 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) #if defined _RT || defined _QED || defined _NL if(i1==11) then RT_bands =COLL_bands + RT_hole_bands =COLL_hole_bands + RT_elec_bands =COLL_elec_bands SCATT_bands=COLL_bands + SCATT_hole_bands=COLL_hole_bands + SCATT_elec_bands=COLL_elec_bands endif #endif #if defined _QED @@ -139,11 +153,15 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) call fix_me(SCATT_bands) call fix_me(DIP_bands) ! - ! Now MIRROR in related bands ranges! + ! Now MIRROR in related bands ranges !------------------------------------ #if defined _SC || defined _RT || defined _QED || defined _NL COLL_bands =SCATT_bands + COLL_hole_bands =SCATT_hole_bands + COLL_elec_bands =SCATT_elec_bands H_ref_bands=SCATT_bands + H_ref_hole_bands=SCATT_hole_bands + H_ref_elec_bands=SCATT_elec_bands #endif Dip%ib=DIP_bands ! diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index bc1d6836c5..2a4cc19cdb 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -118,6 +118,8 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! Start Loop ! i_trials=1 + ! Setting this to 1.E-4 is needed for CrI3, + ! however, it make Benzene tests fail nel_diff_zero=1.E-5 Fermi_is_converged=.false. ! diff --git a/src/communicate/DESC_compare.F b/src/communicate/DESC_compare.F index f8e19c3ab7..577c88375a 100644 --- a/src/communicate/DESC_compare.F +++ b/src/communicate/DESC_compare.F @@ -39,14 +39,29 @@ subroutine DESC_compare(D1,D2,i_err,exclude,only) do i_v=1,D1%size(i_d) if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) i_err=(/i_d,i_dp/) if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) i_err=(/i_d,i_dp/) + ! DEBUG < + !if (D1%kind(i_d)=='i'.and.D1%ival(i_v,i_d)/=D2%ival(i_v,i_dp)) write(*,*) D1%ival(i_v,i_d),D2%ival(i_v,i_dp) + !if (D1%kind(i_d)=='r'.and.D1%rval(i_v,i_d)/=D2%rval(i_v,i_dp)) write(*,*) D1%rval(i_v,i_d),D2%rval(i_v,i_dp) + ! DEBUG > enddo if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) i_err=(/i_d,i_dp/) + ! DEBUG < + !if (D1%kind(i_d)=='d'.and.real(D1%dval(i_d))/=real(D2%dval(i_dp))) write(*,*) real(D1%dval(i_d)),real(D2%dval(i_dp)) + ! DEBUG > if (D1%kind(i_d)=='c') then if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) i_err=(/i_d,i_dp/) if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) i_err=(/i_d,i_dp/) + ! DEBUG < + !if (real(D1%cval(i_d)) /= real(D2%cval(i_dp))) write(*,*) real(D1%cval(i_d)),real(D2%cval(i_dp)) + !if (aimag(D1%cval(i_d))/=aimag(D2%cval(i_dp))) write(*,*) aimag(D1%cval(i_d)),aimag(D2%cval(i_dp)) + ! DEBUG > endif if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) i_err=(/i_d,i_dp/) if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) i_err=(/i_d,i_dp/) + ! DEBUG > + !if (D1%kind(i_d)=='s'.and..not.STRING_same(D1%sval(i_d),D2%sval(i_dp))) write(*,*) trim(D1%sval(i_d)),trim(D2%sval(i_dp)) + !if (D1%kind(i_d)=='l'.and.D1%lval(i_d).neqv.D2%lval(i_dp)) write(*,*) D1%lval(i_d),D2%lval(i_dp) + ! DEBUG < enddo enddo ! diff --git a/src/dipoles/.objects b/src/dipoles/.objects index 5203873f89..7db8e515e5 100644 --- a/src/dipoles/.objects +++ b/src/dipoles/.objects @@ -6,8 +6,8 @@ SC_objects = DIPOLE_SC_rotate.o NL_objects = Berry_polarization_EQ.o Ionic_polarization.o POLARIZATION_output.o #endif objs = Build_Overlaps_Det_EQ.o $(SC_objects) $(MAGN_objects) $(NL_objects) \ - DIPOLE_setup.o \ + DIPOLE_setup.o OVERLAPS_IO.o \ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_covariant.o DIPOLE_x_real_space.o DIPOLE_spin_magnetization.o \ DIPOLE_kb_abinit_def_dim.o DIPOLE_kb_abinit_comp.o DIPOLE_kb_sum.o DIPOLE_kb_Ylm.o DIPOLE_dimensions.o \ DIPOLE_kb_pwscf_def_dim.o DIPOLE_kb_pwscf_comp.o DIPOLE_kb_init.o DIPOLE_p_matrix_elements.o DIPOLE_overlaps.o \ - DIPOLE_g_space.o DIPOLE_shifted_grids.o DIPOLE_check_shifted_grids.o DIPOLE_rotate.o + DIPOLE_g_space.o DIPOLE_shifted_grids.o DIPOLE_check_shifted_grids.o DIPOLE_build_der_k.o DIPOLE_rotate.o diff --git a/src/dipoles/Build_Overlaps_Det_EQ.F b/src/dipoles/Build_Overlaps_Det_EQ.F index d3c5694f3a..8ad0f8ecaf 100644 --- a/src/dipoles/Build_Overlaps_Det_EQ.F +++ b/src/dipoles/Build_Overlaps_Det_EQ.F @@ -50,7 +50,7 @@ subroutine Build_Overlaps_Det_EQ(Xen,i_sp_pol,ikbz,Sm1_plus,Sm1_minus,S_det) ! nb=Xen%nbm(i_sp_pol) ! - ! Overlap S(k, k-dk) + ! Overlap S(k, k-dk)=S^\dag(k-dk,k) ! S_val=hermitian(DIP_S(1:nb,1:nb,id+(istep-1)*3,ikm,i_sp_pol)) call SERIAL_inversion(nb,S_val,det,.false.) diff --git a/src/dipoles/DIPOLE_IO.F b/src/dipoles/DIPOLE_IO.F index 7f1fe1afc5..1bf0fb832c 100644 --- a/src/dipoles/DIPOLE_IO.F +++ b/src/dipoles/DIPOLE_IO.F @@ -14,7 +14,7 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,covariant_obs + use DIPOLES, ONLY:DIPOLE_t,covariant_obs,der_k_obs use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,VERIFY,DUMP,REP,OP_WR_CL,OP_WR,OP_RD_CL,& & OP_IF_START_APP_CL_IF_END,OP_IF_START_RD_CL_IF_END @@ -35,11 +35,9 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) ! ! Work space ! - logical :: write_header, read_header, check,reading,writing,& -& write_header_ovlp,read_header_ovlp,l_project_dipoles,IO_do_it - integer :: ID,ID_S,IO_ACTION,IO_ACT_NOW,IO_MODE,ik_mem,ik,i_sp_pol,i_fragment,iv,ic,max_count,i_count + logical :: write_header,read_header,check,reading,writing,l_project_dipoles,IO_do_it + integer :: ID,IO_ACTION,IO_ACT_NOW,IO_MODE,ik_mem,ik,i_sp_pol,i_fragment,iv,ic,max_count,i_count integer, external :: io_DIPOLES - integer, external :: io_Overlaps #if !defined _PAR_IO type(PP_indexes) :: IO_par_index #endif @@ -60,32 +58,22 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) call PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) ! ID=0 - ID_S=0 io_err=0 ! write_header = (master_cpu.and.writing) read_header = .not.write_header ! - write_header_ovlp =write_header.and.len_trim(covariant_obs)>0 - read_header_ovlp = read_header.and.len_trim(covariant_obs)>0 - ! if(write_header) then call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) io_err=io_DIPOLES(Dip,ID) endif - ! - if(write_header_ovlp) then - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_S) - io_err=io_err+io_Overlaps(Dip,ID_S) - endif - ! ! To fix problems with asynchronous I/O ! call PP_wait(COMM=PAR_K_scheme%comm_world) ! IO_MODE=VERIFY - if((read_header.or.read_header_ovlp).and.writing) IO_MODE=DUMP + if(read_header.and.writing) IO_MODE=DUMP ! if(read_header) then ! @@ -101,10 +89,6 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) do while(io_err/=0) call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=IO_MODE,ID=ID) io_err=io_DIPOLES(Dip,ID) - if(read_header_ovlp) then - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=IO_MODE,ID=ID_S) - io_err=io_err+io_Overlaps(Dip,ID_S) - endif if(io_err/=0) call sleep(1) i_count=i_count+1 if((i_count==max_count).and.io_err/=0) then @@ -169,55 +153,6 @@ subroutine DIPOLE_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/2+Xk%nibz*n_sp_pol/),ID=ID) io_err=io_DIPOLES(Dip,ID) #endif - ! - ! OVERLAPS I/O - !============== - ! - if(len_trim(covariant_obs)>0) then - ! -#if !defined _PAR_IO - ! IO parallel indexes needed below by manage_action - !--------------------- - call PP_indexes_reset(IO_par_index) - allocate(IO_par_index%element_1D(n_sp_pol*Xk%nbz)) - IO_par_index%element_1D=.FALSE. - do i_sp_pol=1,n_sp_pol - do ik=1,Xk%nbz - i_fragment=ik+(i_sp_pol-1)*Xk%nbz - if ( .not.PAR_K_scheme%IND_bz%element_1D(ik)) cycle - IO_par_index%element_1D(i_fragment)=.TRUE. - enddo - enddo -#endif - ! -#if defined _PAR_IO - IO_ACT_NOW=manage_action(IO_ACTION,0,0,2) - call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/0/),ID=ID_S,COMM=PAR_K_scheme%COM_ibz_index,DO_IT=IO_do_it) - io_err=io_Overlaps(Dip,ID_S) - IO_ACT_NOW=manage_action(IO_ACTION,1,0,2) -#endif - do i_sp_pol=1,n_sp_pol - do ik=1,Xk%nbz - i_fragment=ik+(i_sp_pol-1)*Xk%nbz - if (.not.PAR_K_scheme%IND_bz%element_1D(ik).and.writing) cycle -#if !defined _PAR_IO - if (.not.PAR_K_scheme%COM_ibz_A2A%CPU_id==0 .and.writing) cycle - if (writing) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol,IO_par_index) - if (reading) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol) -#endif - call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/1+i_fragment/),ID=ID_S) - io_err=io_Overlaps(Dip,ID_S) - if (io_err/=0.and.IO_do_it) then - call error(" OVERLAPS I/O error when (i_sp_pol,ik)= ("//trim(intc(i_sp_pol))//","//trim(intc(ik))//")") - endif - enddo - enddo -#if defined _PAR_IO - IO_ACT_NOW=manage_action(IO_ACTION,2,0,2) - call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/2+Xk%nbz*n_sp_pol/),ID=ID_S) - io_err=io_Overlaps(Dip,ID_S) -#endif - endif ! call PP_wait(COMM=PAR_K_scheme%comm_world) ! @@ -287,8 +222,8 @@ subroutine fix_velocity(Dip,dir) den=Ev_m_Ec_QP endif ! - if (abs(den)<=Dip%Energy_treshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=cZERO - if (abs(den)> Dip%Energy_treshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=DIP_v(:,ic,iv,ik_mem,i_sp_pol)*(num/den) + if (abs(den)<=Dip%Energy_threshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=cZERO + if (abs(den)> Dip%Energy_threshold) DIP_v(:,ic,iv,ik_mem,i_sp_pol)=DIP_v(:,ic,iv,ik_mem,i_sp_pol)*(num/den) ! enddo enddo diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F new file mode 100644 index 0000000000..d2e1b606f7 --- /dev/null +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -0,0 +1,305 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): MG, CA, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) + ! + ! Build the dipole as k-derivative using + ! the overlaps to construct local rotation matrices + ! see Phys. Rev. B 76, 035213 (2007) and Phys. Rev. Research 2, 013357 (2020) + ! + use pars, ONLY:SP,cI,cZERO,pi,cONE + use units, ONLY:HA2EV + use LIVE_t, ONLY:live_timing + use electrons, ONLY:levels,n_sp_pol + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,l_force_SndOrd,& + der_k_obs,x_space_obs + use R_lattice, ONLY:bz_samp,k_map + use vec_operate, ONLY:k_periodic_idx,degeneration_finder + use matrix_operate, ONLY:hermitian + use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& +& PAR_DIPk_nbz,PAR_IND_CON_BANDS_DIP, PAR_IND_VAL_BANDS_DIP, & +& PAR_IND_DIPk_bz,PAR_DIPk_bz_index,PAR_IND_DIPk_bz_ID,PAR_COM_DIPk_ibz_INDEX + use parallel_int, ONLY:PP_redux_wait + use com, ONLY:msg + use D_lattice, ONLY:a + use parser_m, ONLY:parser + use timing_m, ONLY:timing + use stderr, ONLY:STRING_match + ! +#include + + type(levels), intent(in) :: Xen + type(bz_samp), intent(inout) :: Xk + type(DIPOLE_t), intent(inout) :: Dip + logical, intent(out) :: direction_is_todo(3) + ! + ! Work Space + ! + integer :: ik,i_sp_pol,id_red,idx(3),idir,ic,ik_mem,ikbz,iv + integer :: istep,max_step,ikm1,ikp1 + complex(SP), allocatable :: U_l(:,:,:),U_r(:,:,:),Der_k_red(:,:,:),Der_k_cart(:,:,:),delta(:,:) + ! + logical :: deg_table_k(Dip%ib(2),Dip%ib(2)),deg_table_kp(Dip%ib(2),Dip%ib(2)),deg_table_km(Dip%ib(2),Dip%ib(2)) + integer :: ib,ibp,i_grp,first_el_k(Dip%ib(2)),n_of_el_k(Dip%ib(2)),n_deg_grp_k + real(SP) :: Ev_m_Ec_KS,deg_thresh + character(1)::str(3)=(/'x','y','z'/) + ! + call timing("DIPOLE_buil_derk",OPR="start") + ! + if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. + ! + if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) + if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) + ! + direction_is_todo(:)= (k_map%max_kdir(:)==1) + ! + if(any(direction_is_todo)) call warning(' Der-k Dipoles not in 3d. Assuming non periodic system.') + ! + if(any(k_map%max_kdir(:)>=6.and..not.l_force_SndOrd)) & + & call msg('rs','Using forth order approximation for der-k dipoles') + ! + ! Notice that DIP_iR/DIP_v are defined only in the IBZ + ! while the overlaps are in the BZ + ! + call live_timing("Build Rotation Matrices:",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) + ! + YAMBO_ALLOC(U_l,(Dip%ib(2),Dip%ib(2),3)) + YAMBO_ALLOC(U_r,(Dip%ib(2),Dip%ib(2),3)) + YAMBO_ALLOC(Der_k_cart,(Dip%ib(2),Dip%ib(2),3)) + YAMBO_ALLOC(Der_k_red,(Dip%ib(2),Dip%ib(2),2)) + YAMBO_ALLOC(delta,(Dip%ib(2),Dip%ib(2))) + ! + delta=cZERO + do ib=1,Dip%ib(2) + delta(ib,ib)=cONE + enddo + ! + Dip%Energy_threshold=max(Dip%Energy_threshold,0.001/HA2EV) + deg_thresh=Dip%Energy_threshold + ! + do i_sp_pol=1,n_sp_pol + ! + do ik=1,Xk%nibz + ! + if (.not.PAR_IND_DIPk_ibz%element_1D(ik)) cycle + ! + ik_mem=PAR_DIPk_ibz_index(ik) + ! + ikbz=Xk%k_table(ik,1) + ! + call degeneration_finder(Xen%E(1:Dip%ib(2),ik,i_sp_pol),Dip%ib(2),& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp_k + do ib=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + do ibp=first_el_k(i_grp),first_el_k(i_grp)+n_of_el_k(i_grp)-1 + deg_table_k(ib,ibp)=.true. + deg_table_k(ibp,ib)=.true. + enddo + enddo + enddo + ! + U_l =cZERO + U_r =cZERO + ! + Der_k_cart=cZERO + Der_k_red =cZERO + ! + do id_red=1,3 ! Loop on the three crystal directions in the BZ + ! + if(k_map%max_kdir(id_red)==1) cycle ! Non-periodic direction, skip calculation + ! + max_step=1 ! Only the first neighbor + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 + ! + do istep=1,max_step + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)+istep + idx=k_periodic_idx(idx,k_map) + ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)-istep + idx=k_periodic_idx(idx,k_map) + ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + U_r(:,:,1)= DIP_S(:,:,id_red+(istep-1)*3,ikbz,i_sp_pol) + call zeroing_disconnected_blocks(Xen,Xk,(/1,Dip%ib(2)/),ikp1,i_sp_pol,& + & deg_table_k,deg_thresh,U_r(:,:,1),U_r(:,:,2)) + U_r(:,:,3)=U_r(:,:,2) + call SERIAL_SVD(Dip%ib(2),U_r(:,:,3),'uni',0) + ! + U_l(:,:,1)=hermitian(DIP_S(:,:,id_red+(istep-1)*3,ikm1,i_sp_pol)) + call zeroing_disconnected_blocks(Xen,Xk,(/1,Dip%ib(2)/),ikm1,i_sp_pol,& + & deg_table_k,deg_thresh,U_l(:,:,1),U_l(:,:,2)) + U_l(:,:,3)=U_l(:,:,2) + call SERIAL_SVD(Dip%ib(2),U_l(:,:,3),'uni',0) + ! + ! Yambo version + Der_k_red(:,:,istep)=+matmul(U_r(:,:,1),hermitian(U_r(:,:,3)) ) & + & -matmul(U_l(:,:,1),hermitian(U_l(:,:,3)) ) + ! Virk-Sipe version + !Der_k_red(:,:,istep)=+matmul((U_r(:,:,1)-U_r(:,:,2)),hermitian(U_r(:,:,3)) ) & + !& -matmul((U_l(:,:,1)-U_l(:,:,2)),hermitian(U_l(:,:,3)) ) + ! + ! This contains the i/2q factor + ! 1/q=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + Der_k_red(:,:,istep)=Der_k_red(:,:,istep)*cI*k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP))/2._SP + ! + enddo + ! + ! Transform in cartesian coordinates + ! + if(max_step==1) then + ! + ! First order formula D(dk) + ! + do idir=1,3 + Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(Der_k_red(:,:,1))*a(id_red,idir) + enddo + ! + else + ! + ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 + ! + do idir=1,3 + Der_k_cart(:,:,idir)=Der_k_cart(:,:,idir)+transpose(4._SP*Der_k_red(:,:,1)-Der_k_red(:,:,2))/3._SP*a(id_red,idir) + enddo + ! + endif + ! + enddo ! id_red loop on crystal directions + ! + !====== + ! + !====== + do iv=Dip%ib(1),Dip%ib_lim(1) + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv)) cycle + do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) + if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle + do idir=1,3 + DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)=(Der_k_cart(ic,iv,idir)+conjg(Der_k_cart(iv,ic,idir)))*cI + enddo + enddo + enddo + ! + !===== + ! + !===== + if(STRING_match(der_k_obs,"V")) then + do iv=Dip%ib(1),Dip%ib_lim(1) + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv)) cycle + do ic=max(iv,Dip%ib_lim(2)),Dip%ib(2) + if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle + Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) + if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) + do idir=1,3 + DIP_v(idir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(idir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS + enddo + ! + enddo + enddo + ! + endif + ! + call live_timing(steps=1) + ! + enddo ! ik iiBZ loop + ! + enddo ! i_sp_pol + ! + call live_timing() + ! + YAMBO_FREE(U_l) + YAMBO_FREE(U_r) + YAMBO_FREE(Der_k_red) + YAMBO_FREE(Der_k_cart) + YAMBO_FREE(delta) + ! + ! Build non-periodic directions if necessary + ! + if (any(direction_is_todo)) then + do ic=1,3 + if (direction_is_todo(ic)) then + x_space_obs=trim(x_space_obs)//" R_"//str(ic) + if (STRING_match(der_k_obs,"V")) x_space_obs=trim(x_space_obs)//" V_"//str(ic) + endif + enddo + Dip%computed=trim(Dip%computed)//trim(x_space_obs)//" [X-space]" + endif + ! + call timing("DIPOLE_buil_derk",OPR="stop") + return + ! +end subroutine DIPOLE_build_der_k +! +! +subroutine zeroing_disconnected_blocks(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_thresh,U_in,U_out) + ! + use pars, ONLY:SP,cZERO + use R_lattice, ONLY:bz_samp + use electrons, ONLY:levels + use vec_operate, ONLY:degeneration_finder + ! + implicit none + ! + type(levels), intent(in) :: Xen + type(bz_samp), intent(in) :: Xk + ! + integer, intent(in) :: nb(2),ikpbz,i_sp_pol + logical, intent(in) :: deg_table_k(nb(1):nb(2),nb(1):nb(2)) + real(SP),intent(in) :: deg_thresh + ! + complex(SP), intent(in) :: U_in(nb(1):nb(2),nb(1):nb(2)) + complex(SP), intent(out) :: U_out(nb(1):nb(2),nb(1):nb(2)) + ! + ! Workspace + ! + integer :: ib,ibp,i_grp,first_el_k(nb(2)-nb(1)+1),n_of_el_k(nb(2)-nb(1)+1),n_deg_grp_k + logical :: deg_table_kp(nb(1):nb(2),nb(1):nb(2)) + ! + call degeneration_finder(Xen%E(nb(1):nb(2),Xk%sstar(ikpbz,1),i_sp_pol),nb(2)-nb(1)+1,& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_kp=.false. + do i_grp=1,n_deg_grp_k + do ib=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + deg_table_kp(ib,ibp)=.true. + deg_table_kp(ibp,ib)=.true. + enddo + enddo + enddo + ! + U_out=U_in + ! + do ib=nb(1),nb(2) + do ibp=nb(1),nb(2) + if(deg_table_k(ibp,ib).or.deg_table_kp(ibp,ib)) cycle + U_out(ib,ibp)=cZERO + enddo + enddo + ! +end subroutine diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index 6af24a7492..f03d41acdc 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -13,7 +13,8 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) use pars, ONLY:SP,cI,cZERO,pi use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,covariant_obs,x_space_obs + use DIPOLES, ONLY:DIPOLE_t,DIP_S,DIP_iR,DIP_v,l_force_SndOrd,& + & covariant_obs,x_space_obs use ALLOC, ONLY:DIPOLE_ALLOC_elemental use R_lattice, ONLY:bz_samp,k_map use vec_operate, ONLY:k_periodic_idx @@ -35,7 +36,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) ! ! Work Space ! - logical ::l_eval_polarization,l_force_SndOrd + logical ::l_eval_polarization integer ::ik,iv,ic,ic_min,iv_max,i_sp_pol,ikm1,id_red,idir,idx(3),ikbz,ik_mem,istep,max_step real(SP) ::Ev_m_Ec_KS complex(SP), allocatable :: Sm1_plus (:,:,:),Sm1_minus(:,:,:) @@ -46,20 +47,12 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) ! if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. ! - if (any(Xen%nbf/=Xen%nbm)) call error(' Covariant dipoles not implemented for metals') - ! - call parser('EvPolarization' ,l_eval_polarization) - call parser('FrSndOrd' ,l_force_SndOrd) - ! if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) ! - ! Notice that DIP_S is defined in the BZ - ! - call DIPOLE_ALLOC_elemental('DIP_S',(/Dip%ib(2),Dip%ib(2),6,Xk%nbz/)) - DIP_S=cZERO + if (any(Xen%nbf/=Xen%nbm)) call error(' Covariant dipoles not implemented for metals') ! - call DIPOLE_overlaps(Xk,Dip) + call parser('EvPolarization' ,l_eval_polarization) ! direction_is_todo(:)= (k_map%max_kdir(:)==1) ! diff --git a/src/dipoles/DIPOLE_dimensions.F b/src/dipoles/DIPOLE_dimensions.F index 9b5be729e1..95f3cbaec7 100644 --- a/src/dipoles/DIPOLE_dimensions.F +++ b/src/dipoles/DIPOLE_dimensions.F @@ -37,7 +37,7 @@ subroutine DIPOLE_dimensions(Xen,Dip,bands,q0) ! ! Set up band limits ! - if (Dip%bands_ordered.or.Dip%Energy_treshold<0._SP) then + if (Dip%bands_ordered.or.Dip%Energy_threshold<0._SP) then Dip%ib_lim(1)=maxval(Xen%nbm) Dip%ib_lim(2)=minval(Xen%nbf)+1 if (l_X_terminator) Dip%ib_lim(2)=Dip%ib(1) diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index 18d4df6c27..f1e0cf3a2c 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -22,17 +22,21 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! 4) covariant approach --> computes in reciprocal space as ! takes into account the phases. symmetries not yet implemented ! and then as *DeltaE + ! 4) der_k approach --> computes in reciprocal space as + ! takes into account the phases. symmetries not yet implemented + ! and then as *DeltaE ! - ! Note that

is ALWAYS calculated using the g_space approach + ! Note that

are ALWAYS calculated using the g_space approach ! use drivers, ONLY:l_optics use pars, ONLY:SP,schlen use electrons, ONLY:levels,n_sp_pol use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp - use DIPOLES, ONLY:DIPOLE_t,DIP_iR,x_space_obs,g_space_obs,covariant_obs,shifted_grids_obs,& -& Vnl_commutator_warning,DIP_P,DIP_v,DIP_spin,DIP_orbital,P_square - use ALLOC, ONLY:DIPOLE_ALLOC_global + use DIPOLES, ONLY:DIPOLE_t,DIP_iR,DIP_P,DIP_v,DIP_spin,DIP_orbital,P_square,& +& x_space_obs,g_space_obs,covariant_obs,der_k_obs,shifted_grids_obs,& +& Vnl_commutator_warning,eval_OVERLAPS,l_force_SndOrd + use ALLOC, ONLY:DIPOLE_ALLOC_global,DIPOLE_ALLOC_elemental use IO_int, ONLY:IO_and_Messaging_switch use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_nibz,PAR_COM_DIPk_ibz_A2A,& & PAR_IND_CON_BANDS_DIP,PAR_IND_VAL_BANDS_DIP @@ -51,7 +55,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! ! Work Space ! - integer :: ik,io_err + integer :: ik,io_err,io_err_Overlaps character(schlen) :: msg logical :: l_warning,direction_is_todo(3) ! @@ -77,9 +81,15 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) io_err=-1 call DIPOLE_IO(Xk,Xen,Dip,'check',io_err,'DIP') ! + io_err_Overlaps=-1 + if (eval_OVERLAPS) then + call OVERLAPS_IO(Xk,Xen,Dip,'check',io_err_Overlaps,'DIP') + if (io_err_Overlaps==0) call OVERLAPS_IO(Xk,Xen,Dip,'read',io_err_Overlaps,'DIP') + endif + ! ! In case dipoles were not found/ok then I need to compute them !============================================================== - if (io_err/=0) then + if (io_err/=0 .or. (eval_Overlaps.and.io_err_Overlaps/=0) ) then ! ! I/O privilegies: temporarly switch it on ! @@ -95,16 +105,34 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! call PARALLEL_WF_index(COMM=PAR_COM_DIPk_ibz_A2A) ! + endif + ! + ! Overlaps (DIP_S) + ! + if (eval_Overlaps.and.io_err_Overlaps/=0) then + ! + ! Notice that DIP_S is defined in the BZ + ! + call DIPOLE_ALLOC_elemental('DIP_S',(/Dip%ib(2),Dip%ib(2),6,Xk%nbz/)) + ! + call DIPOLE_overlaps(Xk,Dip) + ! + endif + ! + if (io_err/=0) then + ! + ! , ,

, , + ! ! Allocation ! call DIPOLE_ALLOC_global(Dip,PAR_DIPk_nibz) ! - ! , ,

, , S_overlap - ! if (len_trim(shifted_grids_obs)>0) call DIPOLE_shifted_grids(Xen,Xk,Dip) ! if (len_trim(covariant_obs)>0) call DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) ! + if (len_trim(der_k_obs)>0) call DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) + ! if (len_trim(x_space_obs)>0) call DIPOLE_x_real_space(Xen,Xk,Dip,direction_is_todo) ! if (len_trim(g_space_obs)>0) call DIPOLE_g_space(Xen,Xk,Dip) @@ -123,6 +151,8 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! call DIPOLE_IO(Xk,Xen,Dip,'write',io_err,'DIP') ! + if (eval_Overlaps.and.io_err_Overlaps/=0) call OVERLAPS_IO(Xk,Xen,Dip,'write',io_err_Overlaps,'DIP') + ! ! I/O privilegies: RESTORE to previous values ! call IO_and_Messaging_switch("RESTORE") @@ -159,6 +189,10 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! if (.not.io_DIP) return ! + ! Overlaps + call DIPOLE_ALLOC_elemental('DIP_S') + ! + ! Dipoles call DIPOLE_ALLOC_global() ! contains diff --git a/src/dipoles/DIPOLE_g_space.F b/src/dipoles/DIPOLE_g_space.F index a761634b0f..5cf674523e 100644 --- a/src/dipoles/DIPOLE_g_space.F +++ b/src/dipoles/DIPOLE_g_space.F @@ -49,7 +49,7 @@ subroutine DIPOLE_g_space(Xen,Xk,Dip) complex(SP), allocatable DEV_ATTR :: kbv_d(:,:,:,:) complex(SP), allocatable DEV_ATTR :: XX(:,:,:,:,:) complex(SP) :: rho_spinor(3,n_spinor,n_spinor),rho(3),P2 - real(SP) :: Ev_m_Ev_KS,Dipole_Energy_treshold + real(SP) :: Ev_m_Ev_KS,Dipole_Energy_threshold logical :: LT_msg=.FALSE. ! !I/O and external functions @@ -272,9 +272,9 @@ subroutine DIPOLE_g_space(Xen,Xk,Dip) ! define a different thr for val-val transitions ! used for XTerm (here Ev_m_Ev_KS may become very large) ! - Dipole_Energy_treshold=Dip%Energy_treshold + Dipole_Energy_threshold=Dip%Energy_threshold ! DEBUG < - ! if(l_X_terminator.and.ic<=Dip%ib_lim(1)) Dipole_Energy_treshold=Dip%Energy_treshold_vv + ! if(l_X_terminator.and.ic<=Dip%ib_lim(1)) Dipole_Energy_threshold=Dip%Energy_threshold_vv ! DEBUG > ! !===== @@ -307,8 +307,8 @@ subroutine DIPOLE_g_space(Xen,Xk,Dip) if (.not.allocated(Xen%Eo)) Ev_m_Ev_KS=Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) if ( allocated(Xen%Eo)) Ev_m_Ev_KS=Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) ! - if (abs(Ev_m_Ev_KS)> Dipole_Energy_treshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=rho/Ev_m_Ev_KS - if (abs(Ev_m_Ev_KS)<=Dipole_Energy_treshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=cZERO + if (abs(Ev_m_Ev_KS)> Dipole_Energy_threshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=rho/Ev_m_Ev_KS + if (abs(Ev_m_Ev_KS)<=Dipole_Energy_threshold) DIP_iR(:,ic,iv,ik_mem,i_sp_pol)=cZERO ! endif ! diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 32c07bd708..22a04a4c53 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -18,9 +18,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) use pars, ONLY:SP,cZERO,pi use LIVE_t, ONLY:live_timing use R_lattice, ONLY:k_map,bz_samp,WF_shifts,G_m_G - use wave_func, ONLY:WF + use wave_func, ONLY:WF,WF_load_mode use vec_operate, ONLY:k_periodic_idx use DIPOLES, ONLY:DIPOLE_t,DIP_S + use ALLOC, ONLY:DIPOLE_ALLOC_elemental use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V_gpu use wave_func, ONLY:wf_ng_1st_BZ,wf_ng_overlaps,wf_ng @@ -53,6 +54,11 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! call timing("DIPOLE_overlaps",OPR="start") ! + if(.not.allocated(k_map%k_map_dir)) call k_map_nearest_by_dir(Xk,k_map) + if(.not.allocated(Xk%k_table)) call k_build_up_BZ_tables(Xk) + ! + DIP_S=cZERO + ! call k_find_smallest_g0(g0_idx,g0_length) iG0=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) ! @@ -77,6 +83,9 @@ subroutine DIPOLE_overlaps(Xk,Dip) call PARALLEL_WF_distribute(K_index=PAR_IND_OVLPk_ibz,CLEAN_UP=.TRUE.) ! call PARALLEL_WF_index( ) + ! + if (trim(WF_load_mode)=="all") call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/1,Xk%nibz/),space='G',title='-Overlaps') + ! YAMBO_ALLOC_GPU(WF_symm, (wf_ng_1st_BZ,n_spinor,1)) YAMBO_ALLOC_GPU(WF_ikp, (wf_ng_overlaps,n_spinor,1)) @@ -99,8 +108,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) ! - call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ik,ik/),(/i_sp_pol,i_sp_pol/),& - & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + if (trim(WF_load_mode)=="on-the-fly") then + call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ik,ik/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + endif ! do ib=1,Dip%ib(2) ! @@ -114,7 +125,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! enddo ! - call WF_free(WF) + if (trim(WF_load_mode)=="on-the-fly") call WF_free(WF) ! do id=1,3 ! Loop on the three crystal directions in the BZ ! @@ -138,8 +149,10 @@ subroutine DIPOLE_overlaps(Xk,Dip) ikp = Xk%sstar(ikbzp,1) isp = Xk%sstar(ikbzp,2) ! - call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ikp,ikp/),(/i_sp_pol,i_sp_pol/),& - & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + if (trim(WF_load_mode)=="on-the-fly") then + call WF_load(WF,0,1,(/1,Dip%ib(2)/),(/ikp,ikp/),(/i_sp_pol,i_sp_pol/),& + & space='G',title='-Oscill/G space/Overlaps',quiet=.true.) + endif ! ! Shift the wave-function by a G-vector if the neighbor is out of the BZ (USE_shifed_wf=.true.) shift=WF_shifts(ikbzp,:) @@ -159,8 +172,11 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! ! see also comments in src/bz_ops/k_map_nearest_by_dir.F ! + ! WF_shifts==1 --> kpt(id) < 0 if(WF_shifts(ikbzp,id)==1) shift(id)=1 + ! WF_shifts==0 --> 0 < kpt(id) < 1 if(WF_shifts(ikbzp,id)==0) shift(id)=1 + ! WF_shifts==-1 --> kpt(id) > 1 if(WF_shifts(ikbzp,id)==-1) shift(id)=0 ! endif @@ -178,7 +194,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) enddo ! ibp enddo ! ib ! - call WF_free(WF) + if (trim(WF_load_mode)=="on-the-fly") call WF_free(WF) ! enddo ! istep enddo ! idir @@ -212,7 +228,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) YAMBO_FREE(WF_ik) YAMBO_FREE(WF_ikp) ! - call WF_free(WF) + if (trim(WF_load_mode)=="all") call WF_free(WF) ! call timing("DIPOLE_overlaps",OPR="stop") ! diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 7f620e6817..b418ecdc34 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -9,7 +9,7 @@ subroutine DIPOLE_setup(Dip) ! use drivers, ONLY:l_real_time,l_sc_run,l_nl_optics use DIPOLES, ONLY:DIPOLE_t,x_space_obs,g_space_obs,covariant_obs,shifted_grids_obs,& -& specific_obs,eval_OVERLAPS +& der_k_obs,specific_obs,eval_OVERLAPS use IO_m, ONLY:io_DIP use BS, ONLY:BSE_prop,l_BS_magnons,l_BS_dichroism,l_BS_photolum use electrons, ONLY:n_spin,n_spinor @@ -97,6 +97,10 @@ subroutine DIPOLE_setup(Dip) covariant_obs="S R V" if (Dip%force_v_g_space) covariant_obs="S R" eval_OVERLAPS=.true. + else if (STRING_same(Dip%approach,"derk")) then + der_k_obs="S R V" + if (Dip%force_v_g_space) der_k_obs="S R" + eval_OVERLAPS=.true. else if (STRING_same(Dip%approach,"shifted grids")) then shifted_grids_obs="R V" if (Dip%force_v_g_space) shifted_grids_obs="R" @@ -114,9 +118,11 @@ subroutine DIPOLE_setup(Dip) #if defined _RT if (l_real_time) then g_space_obs=trim(g_space_obs)//" P2" + else +#endif + if (STRING_match(Dip%computed,"p2")) g_space_obs=trim(g_space_obs)//" P2" +#if defined _RT endif -#else - if (STRING_match(Dip%computed,"p2")) g_space_obs=trim(g_space_obs)//" P2" #endif ! ! ... P_spinor @@ -143,7 +149,8 @@ subroutine DIPOLE_setup(Dip) !--------------------- Dip%computed=" " if (len_trim(x_space_obs ) >0) Dip%computed=trim(x_space_obs)//" [X-space]" - if (len_trim(covariant_obs) >0) Dip%computed=trim(covariant_obs)//" [covarian]" + if (len_trim(covariant_obs) >0) Dip%computed=trim(covariant_obs)//" [covariant]" + if (len_trim(der_k_obs) >0) Dip%computed=trim(der_k_obs)//" [derk]" if (len_trim(shifted_grids_obs)>0) Dip%computed=trim(shifted_grids_obs)//" [shift-grids]" if (len_trim(Dip%computed)==0) then Dip%computed=trim(g_space_obs)//" [G-space]" diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 8e626eb522..be39d5f3c7 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -61,16 +61,16 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! character(schlen) :: grid_paths_vector(3) logical :: idir_not_done(3) - integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,iv_sh,iq,n_LT_steps,& -& i_spin,i_spinor,i_sp_pol,ir,grid_order(3),ic_min + integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,in_d,iq,n_LT_steps,& +& i_spinor,i_sp_pol,ir,grid_order(3),ic_min integer :: first_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_of_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_deg_grp - complex(SP) :: rho,DIP_rotate(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& -& DIP_tmp(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)) + complex(SP) :: rho,DIP_O(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& +& DIP_S(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)),DIP_D(2) real(SP) :: Ev_m_Ec_KS,q_mod(3) ! !ioDB1 shifted grids ! - type(levels) :: E_shift + type(levels) :: E_shift(3) type(bz_samp) :: Xk_shift type(WAVEs) :: WF_shifted ! @@ -100,6 +100,7 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) grid_order=0 ! if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. + ! if (STRING_match(shifted_grids_obs,"V")) Dip%Vnl_included=.true. ! if ( .not.all(PAR_IND_VAL_BANDS_DIP%element_1D(Dip%ib(1):Dip%ib_lim(1))) ) & & call error(' DIPOLES Parallelization over v bands not accepted') @@ -110,9 +111,11 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! call msg('s','loading info from '//trim(grid_paths_vector(iq))//' ') ! - io_err(iq)=io_DB1_selective_scan('all',trim(grid_paths_vector(iq)),E_shift,Xk_shift) + io_err(iq)=io_DB1_selective_scan('all',trim(grid_paths_vector(iq)),E_shift(iq),Xk_shift) call set_parms(grid='shifted',command=' define') ! + E_shift(iq)%E=E_shift(iq)%E-Xen%E_Fermi + ! if (io_err(iq)/=0) call error(' Shifted grid not found in folder "'//trim(grid_paths_vector(iq))//'" ') ! if (nkibz_save/=nkibz_shifted) & @@ -162,19 +165,19 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) wf_ng_eff = min(wf_ng_save,wf_ng_shifted) ! call degeneration_finder(Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),Dip%ib_lim(1)-Dip%ib(1)+1,& - & first_el,n_of_el,n_deg_grp,0.0001/HA2EV,Include_single_values=.true.) + & first_el,n_of_el,n_deg_grp,Dip%Energy_threshold,Include_single_values=.true.) ! ! Notice that here I sum over the shifted subspace, assuming that it has equal or less degeneracies than the non shifted subspace ! - DIP_tmp=cZERO - DIP_rotate=cZERO + DIP_S=cZERO + DIP_O=cZERO ! do i_grp=1,n_deg_grp - do iv_sh=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 ! - if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv_sh)) cycle + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(in_d)) cycle ! - iv_wf_sh=WF_shifted%index(iv_sh,ik,i_sp_pol) + iv_wf_sh=WF_shifted%index(in_d,ik,i_sp_pol) ! if (iv_wf_sh==0) call error(" Error in parallel wf_shifted distribution (Dipole iv)") ! @@ -186,25 +189,25 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! if (iv_wf==0) call error(" Error in parallel wf distribution (Dipole iv)") ! - ! DIP_rotate = < v,k+q | v,k > + ! DIP_O = < n,k+q | n,k > between connected bands only ! do i_spinor=1,n_spinor ! rho = Vstar_dot_V_gpu(wf_ng_eff,DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh), & & DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,iv_wf)) ! - if(abs(rho)>1.E-3) DIP_rotate(iv_sh,iv)=DIP_rotate(iv_sh,iv)+conjg(rho) + if(abs(rho)>1.E-3) DIP_O(in_d,iv)=DIP_O(in_d,iv)+conjg(rho) ! enddo ! enddo ! - iv=iv_sh + iv=in_d ! ! loop over conduction ! - ic_min=max(iv_sh,Dip%ib_lim(2)) - if (l_X_terminator) ic_min=iv_sh + ic_min=max(in_d,Dip%ib_lim(2)) + if (l_X_terminator) ic_min=in_d ! do ic=ic_min,Dip%ib(2) ! @@ -212,14 +215,6 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! rho=cZERO ! - Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) - if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) - ! - if (abs(Ev_m_Ec_KS)<=Dip%Energy_treshold .or. iv==ic) then - call live_timing(steps=1) - cycle - endif - ! ic_wf=WF%index(ic,ik,i_sp_pol) ! if (ic_wf==0) call error(" Error in parallel wf distribution (Dipole ic)") @@ -233,12 +228,12 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! enddo ! - DIP_tmp(ic,iv_sh)=rho/q0_shift_norm + DIP_S(ic,in_d)=rho ! call live_timing(steps=1) ! enddo ! ic - enddo ! iv_sh in i_grp + enddo ! in_d in i_grp enddo ! i_grp ! do i_grp=1,n_deg_grp @@ -249,30 +244,60 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! ! DEBUG < !rho=cZERO - !do iv_sh=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - ! rho=rho+abs(DIP_rotate(iv_sh,iv))**2 + !do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + ! rho=rho+abs(DIP_O(in_d,iv))**2 !enddo - !write(*,*) i_sp_pol,ik,iq,iv,rho + !ic=(first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1))-(first_el(i_grp)+Dip%ib(1)) + !if (abs(ic)<=0) write(*,*) i_sp_pol,ik,iq,iv,ic+1,abs(rho) + !if (abs(ic)> 0) write(*,*) i_sp_pol,ik,iq,iv,ic+1,abs(rho)," OK " ! DEBUG > ! - !====== - ! - !====== - do iv_sh=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 - DIP_iR(ir,:,iv,ik_mem,i_sp_pol)=DIP_iR(ir,:,iv,ik_mem,i_sp_pol)+DIP_tmp(:,iv_sh)*DIP_rotate(iv_sh,iv) - enddo - ! - !===== - ! - !===== - if(.not.Dip%force_v_g_space) then - do ic=ic_min,Dip%ib(2) - Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) - if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) - if (abs(Ev_m_Ec_KS)<=Dip%Energy_treshold .or. iv==ic) cycle + do ic=ic_min,Dip%ib(2) + ! + !====== + ! + !====== + Ev_m_Ec_KS =Xen%E (iv,ik,i_sp_pol)-Xen%E (ic,ik,i_sp_pol) + if (allocated(Xen%Eo)) Ev_m_Ec_KS =Xen%Eo(iv,ik,i_sp_pol)-Xen%Eo(ic,ik,i_sp_pol) + ! + if (abs(Ev_m_Ec_KS)>Dip%Energy_threshold) then + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)+DIP_S(ic,in_d)*DIP_O(in_d,iv)/q0_shift_norm + enddo + else + ! This part needs to be fixed + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=cZERO + !DIP_D(1)=DIP_S(ic,in_d)-DIP_O(ic,in_d) + !DIP_D(2)=DIP_S(iv,in_d)-DIP_O(iv,in_d) + !DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol) & + !& +(DIP_D(1)*DIP_O(in_d,iv)-conjg(DIP_O(in_d,ic)*DIP_D(2)))/2._SP/q0_shift_norm + !! This is the equation according to the notes. + !! However it looks like here DIP_O = O^\dag + !! In case the above equation is the correct one + !!& +(DIP_D(1)*conjg(DIP_O(iv,in_d))-DIP_O(ic,in_d)*conjg(DIP_D(2)))/2._SP/q0_shift_norm + enddo + endif + ! + !===== + ! + !===== + if(.not.Dip%force_v_g_space) then DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS - enddo - endif + if (iv==ic) then + DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm + endif + ! All the diagonal dipoles are identical to the case where the evaluation is directly done in G-space + ! The only exception are the degenerate subspaces which in G-space have an extra contribution + ! To check if something on the line below here can give that + !if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold) then + ! DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + ! & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm*abs(DIP_O(ic,iv))**2 + !endif + endif + ! + enddo ! enddo enddo @@ -308,7 +333,7 @@ subroutine DB1_reset() ! not rewritten. ! core_io_path = core_io_path_save - io_err(1)=io_DB1_selective_scan('all',trim(core_io_path),E_shift,Xk_shift) + io_err(1)=io_DB1_selective_scan('all',trim(core_io_path),E_shift(1),Xk_shift) ! call set_parms(grid=' local', command=' reset') ! @@ -347,3 +372,353 @@ subroutine set_parms(grid,command) end subroutine set_parms ! end subroutine DIPOLE_shifted_grids +! +! +subroutine DIPOLE_shifted_grids_as_derk(Xen,Xk,Dip) + ! + ! Using the wfc at the k,k-q points to construct + ! + ! i q. = \sum_i=1,3 q(i) /q0(i) + ! + use units, ONLY:HA2EV + use pars, ONLY:SP,cZERO,cONE,cI,lchlen,schlen + use drivers, ONLY:l_sc_run + use com, ONLY:msg,core_io_path,grid_paths + use stderr, ONLY:intc,STRING_split + use LIVE_t, ONLY:live_timing + use electrons, ONLY:levels,n_spinor,n_sp_pol + use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& + & PAR_IND_VAL_BANDS_DIP,PAR_IND_VAL_BANDS_DIP_ID,& + & PAR_IND_CON_BANDS_DIP,PAR_IND_CON_BANDS_DIP_ID + use interfaces, ONLY:WF_load,WF_free,io_DB1_selective_scan + use R_lattice, ONLY:bz_samp,nkibz,q0_shift_norm + use X_m, ONLY:l_X_terminator + use DIPOLES, ONLY:DIPOLE_t,DIP_iR,DIP_v,num_shifted_grids,shifted_grids_obs + use vec_operate, ONLY:degeneration_finder + use matrix_operate, ONLY:hermitian + use timing_m, ONLY:timing + use wrapper, ONLY:Vstar_dot_V_gpu + use wave_func, ONLY:wf_ng,wf_igk,WF,wf_ncx,WAVEs +#if defined _SC + use SC, ONLY:SC_bands +#endif +#if defined _RT + use real_time, ONLY:RT_bands +#endif + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + type(DIPOLE_t),intent(inout) :: Dip + ! + ! Saves + ! + integer :: wf_ng_save + character(lchlen) :: core_io_path_save + integer :: nkibz_save, wf_ncx_save, wf_ncx_shifted, nkibz_shifted + integer :: wf_ng_eff, wf_ng_shifted +#if defined _SC + integer :: SC_bands_save(2) +#endif +#if defined _RT + integer :: RT_bands_save(2) +#endif + ! + ! Work Space + ! + character(schlen) :: grid_paths_vector(3) + logical :: idir_not_done(3) + integer :: ik,ik_mem,ic_wf,iv_wf,iv_wf_sh,i_grp,ic,iv,in_d,in_dp,iq,n_LT_steps,& + & i_spinor,i_sp_pol,ir,grid_order(3),ic_min + integer :: first_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_of_el(Dip%ib_lim(1)-Dip%ib(1)+1),n_deg_grp + complex(SP) :: rho,& + & Identity(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& + & DIP_S(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)),& + & DIP_O(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)),& + & DIP_Q(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)),& + & Der_k(Dip%ib_lim(2):Dip%ib(2),Dip%ib(1):Dip%ib_lim(1)) + real(SP) :: Ev_m_Ec_KS,q_mod(3) + logical :: deg_table_k(Dip%ib(1):Dip%ib_lim(1),Dip%ib(1):Dip%ib_lim(1)) + ! + !ioDB1 shifted grids + ! + type(levels) :: E_shift(3) + type(bz_samp) :: Xk_shift + type(WAVEs) :: WF_shifted + ! + !I/O and external functions + ! + integer :: io_err(3) + ! + call timing("DIPOLE_shifted_grids",OPR="start") + ! + call set_parms(grid=' local', command=' define') + ! + if (wf_ng.lt.0.8_SP*maxval(wf_igk)) & + & call warning('All/most WF G-vectors should be used in the case of shifted grids') + ! + grid_paths_vector=' ' + call STRING_split(grid_paths,grid_paths_vector) + ! + num_shifted_grids=0 + do iq=1,3 + if(trim(grid_paths_vector(iq))/=' ') num_shifted_grids=num_shifted_grids+1 + enddo + ! + if(num_shifted_grids==0) call error(' No shifted grid specified in input') + ! + ! Check grids and determine grid displacement + ! + grid_order=0 + ! + if(.not.Dip%force_v_g_space) Dip%Vnl_included=.true. + ! if (STRING_match(shifted_grids_obs,"V")) Dip%Vnl_included=.true. + ! + if ( .not.all(PAR_IND_VAL_BANDS_DIP%element_1D(Dip%ib(1):Dip%ib_lim(1))) ) & + & call error(' DIPOLES Parallelization over v bands not accepted') + ! + idir_not_done=.true. + ! + do iq =1,num_shifted_grids + ! + call msg('s','loading info from '//trim(grid_paths_vector(iq))//' ') + ! + io_err(iq)=io_DB1_selective_scan('all',trim(grid_paths_vector(iq)),E_shift(iq),Xk_shift) + call set_parms(grid='shifted',command=' define') + ! + E_shift(iq)%E=E_shift(iq)%E-Xen%E_Fermi + ! + if (io_err(iq)/=0) call error(' Shifted grid not found in folder "'//trim(grid_paths_vector(iq))//'" ') + ! + if (nkibz_save/=nkibz_shifted) & + & call error(' Shifted grid in folder "'//trim(grid_paths_vector(iq))//'": k-points not consistent') + ! + if (wf_ncx_save/=wf_ncx_shifted) & + & call warning(' Shifted grid in folder "'//trim(grid_paths_vector(iq))//'": change in number of WFs components') + ! + call DIPOLE_check_shifted_grids( Xk_shift, Xk, iq, num_shifted_grids, q_mod, grid_order) + ! + idir_not_done(grid_order(iq))=.false. + ! + enddo + ! + call msg('r','Shifted grids found '//trim(intc(num_shifted_grids))) + ! + if (num_shifted_grids<3) call warning(' Shifted grids are '//trim(intc(num_shifted_grids))//'. Assuming non periodic system.') + ! + n_LT_steps=n_sp_pol*PAR_IND_DIPk_ibz%n_of_elements(PAR_IND_DIPk_ibz_ID+1)*& + & PAR_IND_VAL_BANDS_DIP%n_of_elements(PAR_IND_VAL_BANDS_DIP_ID+1)*& + & PAR_IND_CON_BANDS_DIP%n_of_elements(PAR_IND_CON_BANDS_DIP_ID+1)*num_shifted_grids + ! + call live_timing(trim(shifted_grids_obs)//" [shifted grids]",n_LT_steps) + ! + Identity=cZERO + do in_d=Dip%ib(1),Dip%ib_lim(1) + Identity(in_d,in_d)=cONE + enddo + ! + do i_sp_pol = 1,n_sp_pol + ! + do ik = 1, Xk%nibz + ! + if (.not.PAR_IND_DIPk_ibz%element_1D(ik)) cycle + ! + ik_mem=PAR_DIPk_ibz_index(ik) + ! + ! Load WFs first at k and then at k+q_iq + ! + call WF_load(WF,0,1,Dip%ib,(/ik,ik/),sp_pol_to_load=(/i_sp_pol,i_sp_pol/),space='G',& + & title='-Oscillators/G space/Shifted',force_WFo=l_sc_run,keep_states_to_load=.TRUE.) + ! + call degeneration_finder(Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),Dip%ib_lim(1)-Dip%ib(1)+1,& + & first_el,n_of_el,n_deg_grp,Dip%Energy_threshold,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+Dip%ib(1)-1+n_of_el(i_grp)-1 + do in_dp=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+Dip%ib(1)-1+n_of_el(i_grp)-1 + deg_table_k(in_d,in_dp)=.true. + deg_table_k(in_dp,in_d)=.true. + enddo + enddo + enddo + ! + do iq = 1, num_shifted_grids + ! + ir = grid_order(iq) + ! + core_io_path = trim(grid_paths_vector(iq)) + ! + call WF_load(WF_shifted,0,1,(/Dip%ib(1),Dip%ib_lim(1)/),(/ik,ik/),space='G',& + & title='-Oscillators/G space (shifted grid)',keep_states_to_load=.TRUE.) + ! + wf_ng_eff = min(wf_ng_save,wf_ng_shifted) + ! + DIP_S=cZERO + ! + ! Notice that here I sum over the shifted subspace, assuming that it has equal or less degeneracies than the non shifted subspace + ! + do i_grp=1,n_deg_grp + do in_d=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + ! + if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(in_d)) cycle + ! + iv_wf_sh=WF_shifted%index(in_d,ik,i_sp_pol) + ! + if (iv_wf_sh==0) call error(" Error in parallel wf_shifted distribution (Dipole iv)") + ! + iv=in_d + ! + ! loop over conduction + ! + ic_min=max(in_d,Dip%ib_lim(2)) + if (l_X_terminator) ic_min=in_d + ! + do ic=ic_min,Dip%ib(2) + ! + if(.not.PAR_IND_CON_BANDS_DIP%element_1D(ic)) cycle + ! + rho=cZERO + ! + ic_wf=WF%index(ic,ik,i_sp_pol) + ! + if (ic_wf==0) call error(" Error in parallel wf distribution (Dipole ic)") + ! + ! S_{cv}(k,k+q) = < c k | v k+q > + ! + do i_spinor=1,n_spinor + ! + rho = rho + Vstar_dot_V_gpu(wf_ng_eff,DEV_VAR(WF%c)(1:wf_ng_eff,i_spinor,ic_wf), & + & DEV_VAR(WF_shifted%c)(1:wf_ng_eff,i_spinor,iv_wf_sh)) + ! + enddo + ! + DIP_S(ic,in_d)=rho + ! + call live_timing(steps=1) + ! + enddo ! ic + enddo ! in_d in i_grp + enddo ! i_grp + ! + DIP_O=DIP_S + do in_d=Dip%ib(1),Dip%ib_lim(1) + do in_dp=Dip%ib(1),Dip%ib_lim(1) + if(deg_table_k(in_d,in_dp)) cycle + DIP_O(in_d,in_dp)=cZERO + enddo + enddo + DIP_Q=DIP_O + call SERIAL_SVD(Dip%ib(2)-Dip%ib_lim(2),DIP_Q,'uni',0) + ! + ! Yambo version + Der_k=-cI*(matmul(DIP_S,hermitian(DIP_Q) )-Identity)/q0_shift_norm + ! Virk-Sipe version + !Der_k=-cI*(matmul((DIP_S-DIP_O),hermitian(DIP_Q) )-Identity)/q0_shift_norm + ! + do i_grp=1,n_deg_grp + do iv=first_el(i_grp)+Dip%ib(1)-1,first_el(i_grp)+n_of_el(i_grp)-1+Dip%ib(1)-1 + ! + ic_min=max(iv,Dip%ib_lim(2)) + if (l_X_terminator) ic_min=iv + ! + do ic=ic_min,Dip%ib(2) + ! + ! In yambo there is a band inversion in the definition of the dipoels + ! which results in a conjg factor + DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)=conjg(cI*Der_k(ic,iv)) + ! + !===== + ! + !===== + if(.not.Dip%force_v_g_space) then + DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_iR(ir,ic,iv,ik_mem,i_sp_pol)*Ev_m_Ec_KS + if (iv==ic) then + DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm + endif + ! All the diagonal dipoles are identical to the case where the evaluation is directly done in G-space + ! The only exception are the degenerate subspaces which in G-space have an extra contribution + ! To check if something on the line below here can give that + !if (abs(Ev_m_Ec_KS)<=Dip%Energy_threshold) then + ! DIP_v(ir,ic,iv,ik_mem,i_sp_pol)=DIP_v(ir,ic,iv,ik_mem,i_sp_pol)+& + ! & (E_shift(iq)%E(ic,ik,i_sp_pol)-Xen%E(iv,ik,i_sp_pol))/q0_shift_norm*abs(DIP_O(ic,iv))**2 + !endif + endif + ! + enddo + ! + enddo + enddo + ! + call WF_free(WF_shifted) + ! + enddo ! iq / ir + ! + core_io_path = trim(core_io_path_save) + ! + call WF_free(WF) + ! + enddo ! ik + ! + enddo ! i_sp_pol + ! + call live_timing() + ! + ! CLEAN + ! + call DB1_reset() + ! + if (any(idir_not_done)) call DIPOLE_x_real_space(Xen,Xk,Dip,idir_not_done) + ! + call timing("DIPOLE_shifted_grids",OPR="stop") + ! + contains + ! + subroutine DB1_reset() + ! + ! Reload g_vec, dl_sop ... from db1 using _shift types + ! so that all type components (like occupations) are + ! not rewritten. + ! + core_io_path = core_io_path_save + io_err(1)=io_DB1_selective_scan('all',trim(core_io_path),E_shift(1),Xk_shift) + ! + call set_parms(grid=' local', command=' reset') + ! + end subroutine + ! + subroutine set_parms(grid,command) + implicit none + character(len=7), intent(in), optional :: grid, command + ! + if( grid.eq.' local'.and. command.eq.' define') then + nkibz_save = nkibz + wf_ncx_save = wf_ncx + wf_ng_save = wf_ng + core_io_path_save = core_io_path +#if defined _SC + SC_bands_save = SC_bands +#endif +#if defined _RT + RT_bands_save = RT_bands +#endif + else if( grid.eq.'shifted'.and. command.eq.' define') then + nkibz_shifted = nkibz + wf_ncx_shifted = wf_ncx + wf_ng_shifted = wf_ng + else if( grid.eq.' local'.and. command.eq.' reset') then + core_io_path = core_io_path_save + wf_ng = wf_ng_save +#if defined _SC + SC_bands = SC_bands_save +#endif +#if defined _RT + RT_bands = RT_bands_save +#endif + endif + return + end subroutine set_parms + ! + end subroutine DIPOLE_shifted_grids_as_derk diff --git a/src/dipoles/OVERLAPS_IO.F b/src/dipoles/OVERLAPS_IO.F new file mode 100644 index 0000000000..f4c0933fff --- /dev/null +++ b/src/dipoles/OVERLAPS_IO.F @@ -0,0 +1,153 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2016 The Yambo Team +! +! Authors (see AUTHORS file for details): DS AM +! +subroutine OVERLAPS_IO(Xk,Xen,Dip,check_read_or_write,io_err,PAR_K_scheme_kind) + ! + use pars, ONLY:SP,cI,cZERO + use parser_m, ONLY:parser + use stderr, ONLY:intc + use com, ONLY:msg + use IO_m, ONLY:io_DIP + use R_lattice, ONLY:bz_samp + use electrons, ONLY:levels,n_sp_pol + use DIPOLES, ONLY:DIPOLE_t,covariant_obs,der_k_obs + use IO_int, ONLY:io_control + use IO_m, ONLY:manage_action,VERIFY,DUMP,REP,OP_WR_CL,OP_WR,OP_RD_CL,& +& OP_IF_START_APP_CL_IF_END,OP_IF_START_RD_CL_IF_END + use parallel_int,ONLY:PP_wait + use parallel_m, ONLY:master_cpu,PAR_K_scheme,PP_indexes,PP_indexes_reset + ! + implicit none + ! + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + type(DIPOLE_t),intent(inout) :: Dip + character(*), intent(in) :: check_read_or_write + character(*), intent(in) :: PAR_K_scheme_kind + integer, intent(out) :: io_err + ! + ! Work space + ! + logical :: write_header,read_header,check,reading,writing,IO_do_it + integer :: ID_S,IO_ACTION,IO_ACT_NOW,IO_MODE,ik_mem,ik,i_sp_pol,i_fragment,iv,ic,max_count,i_count + integer, external :: io_Overlaps +#if !defined _PAR_IO + type(PP_indexes) :: IO_par_index +#endif + ! + if (.not.IO_dip) return + ! + check =trim(check_read_or_write)=="check" + reading=trim(check_read_or_write)=="read" + writing=trim(check_read_or_write)=="write" + ! + if(.not.any((/check,reading,writing/))) call error("Wrong call to DIPOLES_IO") + ! + ID_S=0 + io_err=0 + ! + write_header = (master_cpu.and.writing) + read_header = .not.write_header + ! + if(write_header) then + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) + endif + ! + ! To fix problems with asynchronous I/O + ! + call PP_wait(COMM=PAR_K_scheme%comm_world) + ! + IO_MODE=VERIFY + if(read_header.and.writing) IO_MODE=DUMP + ! + if(read_header) then + ! + io_err=-1 + i_count=0 + ! + ! Wait until the ndb.dipoles file is available to all cores + ! In writing mode the loop is needed to fix for asynchronous I/O + ! + if(writing) max_count=120 + if(reading.or.check) max_count=1 + ! + do while(io_err/=0) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=IO_MODE,ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) + if(io_err/=0) call sleep(1) + i_count=i_count+1 + if((i_count==max_count).and.io_err/=0) then + if(writing) call error(" [OVLPs] Header not found while writing overlaps ") + if(reading) call error(" [OVLPs] Header not correct or missing while reading overlaps ") + if( check) call msg("s","[OVLPs] Overlaps not correct or missing. To be computed") + return + endif + enddo + endif + ! + if (check) return + if (writing) call PP_wait(COMM=PAR_K_scheme%comm_world) + ! + if(reading) IO_ACTION=OP_IF_START_RD_CL_IF_END + if(writing) IO_ACTION=OP_IF_START_APP_CL_IF_END + ! + IO_do_it = reading .or. (writing.and.PAR_K_scheme%COM_ibz_A2A%CPU_id==0) + ! + ! DIPOLES I/O + !============== + ! +#if !defined _PAR_IO + ! IO parallel indexes needed below by manage_action + !--------------------- + call PP_indexes_reset(IO_par_index) + allocate(IO_par_index%element_1D(n_sp_pol*Xk%nibz)) + IO_par_index%element_1D=.FALSE. + do i_sp_pol=1,n_sp_pol + do ik=1,Xk%nibz + i_fragment=ik+(i_sp_pol-1)*Xk%nibz + if ( .not.PAR_K_scheme%IND_ibz%element_1D(ik)) cycle + IO_par_index%element_1D(i_fragment)=.TRUE. + enddo + enddo +#endif + ! +#if defined _PAR_IO + IO_ACT_NOW=manage_action(IO_ACTION,0,0,2) + call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/0/),ID=ID_S,COMM=PAR_K_scheme%COM_ibz_index,DO_IT=IO_do_it) + io_err=io_Overlaps(Dip,ID_S) + IO_ACT_NOW=manage_action(IO_ACTION,1,0,2) +#endif + do i_sp_pol=1,n_sp_pol + do ik=1,Xk%nbz + i_fragment=ik+(i_sp_pol-1)*Xk%nbz + if (.not.PAR_K_scheme%IND_bz%element_1D(ik).and.writing) cycle +#if !defined _PAR_IO + if (.not.PAR_K_scheme%COM_ibz_A2A%CPU_id==0 .and.writing) cycle + if (writing) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol,IO_par_index) + if (reading) IO_ACT_NOW=manage_action(IO_ACTION,i_fragment,1,Xk%nbz*n_sp_pol) +#endif + call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/1+i_fragment/),ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) + if (io_err/=0.and.IO_do_it) then + call error(" OVERLAPS I/O error when (i_sp_pol,ik)= ("//trim(intc(i_sp_pol))//","//trim(intc(ik))//")") + endif + enddo + enddo +#if defined _PAR_IO + IO_ACT_NOW=manage_action(IO_ACTION,2,0,2) + call io_control(ACTION=IO_ACT_NOW,COM=REP,SEC=(/2+Xk%nbz*n_sp_pol/),ID=ID_S) + io_err=io_Overlaps(Dip,ID_S) +#endif + ! + call PP_wait(COMM=PAR_K_scheme%comm_world) + ! +#if !defined _PAR_IO + call PP_indexes_reset(IO_par_index) +#endif + ! +end subroutine OVERLAPS_IO diff --git a/src/driver/options_projects.c b/src/driver/options_projects.c index 4916341180..ac8a05f96d 100644 --- a/src/driver/options_projects.c +++ b/src/driver/options_projects.c @@ -38,8 +38,10 @@ void options_projects(struct options_struct *options, int *i_opt) strcpy(options[*i_opt].long_desc[11], "GS => =gs"); strcpy(options[*i_opt].long_desc[12], "CVONLY => =cvonly (compute only cv collisions)"); - strcpy(options[*i_opt].long_desc[13], " "); - strcpy(options[*i_opt].long_desc[14], + strcpy(options[*i_opt].long_desc[13], + "KBSE => =kbse (compute collisions from bse)"); + strcpy(options[*i_opt].long_desc[14], " "); + strcpy(options[*i_opt].long_desc[15], "Potentials can be combined. Example: use hf for Hartree-Fock"); options[*i_opt].long_opt = "potential"; options[*i_opt].short_opt = 'v'; diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index 42af258639..8e26106893 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -208,7 +208,7 @@ void options_ypp(struct options_struct *options, int *i_opt) options[*i_opt].section = "Real-Time"; strcpy(options[*i_opt].long_desc[0], "=(X)response,(a)bsorption,(o)ccupations,(l)ifetimes,(d)" - "ensity,(p)olariazion,(g)reen-function"); + "ensity,(p)olarization,(f)ields,(g)reen-function"); strcpy(options[*i_opt].long_desc[1], " "); strcpy(options[*i_opt].long_desc[2], "(X) response calculates the response via the time-resolved " @@ -220,6 +220,8 @@ void options_ypp(struct options_struct *options, int *i_opt) "(p) polarization evaluates the k-resolved components of the " "time-dependent polarization"); strcpy(options[*i_opt].long_desc[5], + "(f) generate and manupulate fields file"); + strcpy(options[*i_opt].long_desc[6], "(g) evaluates the two-times Green`s function"); *i_opt = *i_opt + 1; options[*i_opt].short_desc = "TD plot control"; diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index ee354eb96e..0574475bf6 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -29,7 +29,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en use ELPH, ONLY:gsqF_fan,gsqF_dw,gsqF_ca_corr,gsqF_life_bose,gsqF_life_f,GKKP,& & gsqF_energy_steps,gsqF_dw,eval_G_using_KK,elph_use_q_grid,PH_freqs,& & FAN_deltaE_treshold,DW_deltaE_treshold,PH_freqs_sq,use_PH_DbGd, & -& elph_grids_are_expanded,Efermi_DbGd +& elph_grids_are_expanded,Efermi_DbGd,l_GKKP_DW use QP_m, ONLY:QP_table,QP_time_order_sign use R_lattice, ONLY:bz_samp use D_lattice, ONLY:Tel @@ -167,7 +167,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en delta_E_at_gamma=GKKP%E_kpq(1)%E(ib,ik_bz,1) -GKKP%E_kpq(1)%E(ob,ik_bz,1) endif ! - eval_DW=(.not.abs(delta_E_at_gamma)H_ref_hole_bands(2) .and. i1H_ref_elec_bands(2) ) cycle + do i2=H_ref_bands(1),H_ref_bands(2) + if ( l_selective_coupling .and. i2H_ref_hole_bands(2) .and. i2H_ref_elec_bands(2) ) cycle + do id=1,3 + H_nl_sc(i1,i2)=H_nl_sc(i1,i2)+E_vec_pot(id)*Wk(id,i1,i2) + enddo enddo enddo !$omp end parallel do diff --git a/src/hamiltonian/Build_Overlaps_det_NEQ.F b/src/hamiltonian/Build_Overlaps_det_NEQ.F index 746f19a003..17113e8e35 100644 --- a/src/hamiltonian/Build_Overlaps_det_NEQ.F +++ b/src/hamiltonian/Build_Overlaps_det_NEQ.F @@ -126,6 +126,8 @@ subroutine Build_overlaps_det_NEQ(en,Xk,i_sp,ikbz,V_bands,Sm1_plus,Sm1_minus,S_d ! ! Matrix core ! + ! Sm1(k,k-dk)_{n,m} =sum_{i,j} V^\dag(k)_(n,i) S^\dag(k-dk,k)_{i,j} V(k-dk)_(j,n) + ! !$omp parallel do default(shared), private(i2,vtmp) do i2=H_ref_bands(1),en%nbf(i_sp) call M_by_V('C',H_ref_bands(2),DIP_S(:,:,id+(istep-1)*3,ikm,i_sp),V_bands(:,i2,ikm_ibz),vtmp) diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 402527cd41..8721648f2f 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -34,11 +34,12 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) ! integer :: i1,i2,im,id,id_red integer :: ikbz,istep,max_step + ! complex(SP) :: Wop(H_ref_bands(1):H_ref_bands(2),H_ref_bands(1):H_ref_bands(2),2) complex(SP) :: V_tilde(en%nbf(i_sp),H_ref_bands(1):H_ref_bands(2),2) complex(SP) :: delta_V_tilde(en%nbf(i_sp),H_ref_bands(1):H_ref_bands(2)) complex(SP) :: V_tmp(H_ref_bands(1):H_ref_bands(2),en%nbf(i_sp)) - complex(SP) :: E_vec_pot(3),alpha + complex(SP) :: alpha ! Wk=cZERO ! diff --git a/src/hamiltonian/V_qp_basis_to_H.F b/src/hamiltonian/V_qp_basis_to_H.F index 294f12abe0..18d5ad7b69 100644 --- a/src/hamiltonian/V_qp_basis_to_H.F +++ b/src/hamiltonian/V_qp_basis_to_H.F @@ -47,7 +47,7 @@ subroutine V_qp_basis_to_H(ik,i_sp_pol,V,H) if (.not.(PAR_IND_QP%element_1D(i1))) cycle endif if (l_par_RT) then - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle endif ! ! In the RT simulation the bands QP_table matrix is not ordered diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index c2d1f2676b..776ff82ae7 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -88,7 +88,7 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) ! do ib=H_ref_bands(1),H_ref_bands(2) do ibp=ib,H_ref_bands(2) - PAR_IND_local(ib,ibp)=PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1) + PAR_IND_local(ib,ibp)=PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) ) enddo enddo ! diff --git a/src/hamiltonian/Vgrad_real_space_to_H.F b/src/hamiltonian/Vgrad_real_space_to_H.F index a6bf6fc12f..b072375bcc 100644 --- a/src/hamiltonian/Vgrad_real_space_to_H.F +++ b/src/hamiltonian/Vgrad_real_space_to_H.F @@ -43,7 +43,7 @@ subroutine Vgrad_real_space_to_H(ik,H,WF,V_grad) do ib=H_ref_bands(1),H_ref_bands(2) do ibp=ib,H_ref_bands(2) ! - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle ! ! ! diff --git a/src/hamiltonian/XC_potentials.F b/src/hamiltonian/XC_potentials.F index 772f133d07..9cca704b3c 100644 --- a/src/hamiltonian/XC_potentials.F +++ b/src/hamiltonian/XC_potentials.F @@ -16,7 +16,7 @@ subroutine XC_potentials(POTENTIALS_string) use xc_functionals, ONLY:XC_LDA_X,XC_LDA_C_PZ,XC_EXCHANGE_CORRELATION,XC_EXCHANGE,& & GS_xc_KIND,GS_xc_FUNCTIONAL use collision_ext, ONLY:COLLISIONS_have_HARTREE,COLLISIONS_HXC_local,COLLISIONS_HXC_MB,COLLISIONS_HXC_use_TDDFT,& -& COLLISIONS_CV_only +& COLLISIONS_CV_only,COLLISIONS_from_BSE use electrons, ONLY:n_full_bands,n_met_bands use stderr, ONLY:STRING_split,STRING_same ! @@ -55,6 +55,11 @@ subroutine XC_potentials(POTENTIALS_string) if (.not.index(POTENTIALS_string,'CVONLY')>0) POTENTIALS_string=trim(POTENTIALS_string)//" CVONLY" endif ! + if (STRING_same(trim(potentials(i_c)),'KBSE')) then + COLLISIONS_from_BSE=.true. + if (.not.index(POTENTIALS_string,'KBSE')>0) POTENTIALS_string=trim(POTENTIALS_string)//" KBSE" + endif + ! if (STRING_same(trim(potentials(i_c)),'IP')) then ! This means Hartree and V_xc are frozed: IP=KS-IP l_sc_ip=.true. @@ -159,6 +164,8 @@ subroutine XC_potentials(POTENTIALS_string) call warning("NULL SC potential! ") else if (STRING_same(trim(potentials(i_c)),'CVONLY')) then call warning("Only CV components included ") + else if (STRING_same(trim(potentials(i_c)),'KBSE')) then + call warning("Loading BSE kernel instead of computing collisions ") else call error("Unknown SC potential! ") endif diff --git a/src/interface/.objects b/src/interface/.objects index 51c0b18547..8d5ea6f74e 100644 --- a/src/interface/.objects +++ b/src/interface/.objects @@ -7,5 +7,5 @@ RT_SC_objects= INIT_read_command_line_potentials.o #endif objs = INIT_C_driver_runlevels.o INIT_load.o INIT.o INIT_read_command_line.o INIT_check_databases.o INIT_activate.o INIT_read_command_line_corr_scatt.o \ $(RT_SC_objects) \ - INIT_QP.o INIT_report_and_log_files.o INIT_input_file.o \ + INIT_QP.o INIT_report_and_log_files.o INIT_input_file.o INIT_fields.o \ INIT_q_points.o INIT_barriers.o INIT_QP_ctl_load.o INIT_QP_ctl_switch.o $(RT_objects) diff --git a/src/interface/DOUBLE_project.dep b/src/interface/DOUBLE_project.dep index de74fe71b9..d5653f7beb 100644 --- a/src/interface/DOUBLE_project.dep +++ b/src/interface/DOUBLE_project.dep @@ -9,6 +9,7 @@ INIT_activate.o INIT_barriers.o INIT_check_databases.o + INIT_fields.o INIT_input_file.o INIT_load.o INIT_q_points.o diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 4708d3080e..79594adac7 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -9,7 +9,7 @@ subroutine INIT_activate() ! use BS_solvers, ONLY:BSS_mode use QP_m, ONLY:QP_solver,COHSEX_use_empties - use stderr, ONLY:intc,STRING_match + use stderr, ONLY:STRING_match use global_XC, ONLY:WF_exx_fraction,WF_exx_screening use drivers, ONLY:l_em1s,l_acfdt,l_HF_and_locXC,l_col_cut,l_alda_fxc,l_bs_fxc,l_optics,l_bse,l_bss,& & l_chi,l_cohsex,l_life,l_rpa_IP,l_td_hf,l_setup,l_sc_run,l_rim,l_rim_w,& @@ -223,8 +223,8 @@ subroutine INIT_activate() call initactivate(1,'BSENGexx ALLGexx') call initactivate(1,'Qdirection QShiftOrder') ! - if(l_td_hf.or.l_td_sex) call initactivate(1,'BSENGBlk') - if(l_td_sex) call initactivate(1,'WehDiag WehCpl') + if(l_td_hf.or.l_td_sex) call initactivate(1,'BSENGBlk WehCpl') + if(l_td_sex) call initactivate(1,'WehDiag') if(l_alda_fxc) then call initactivate(1,'BSENGfxc FxcLibxc FxcMode UseNLCC') if( (WF_exx_fraction>0.) .or. (WF_exx_screening>0.) ) call initactivate(1,'BSENGBlk WehDiag WehCpl') @@ -378,21 +378,25 @@ subroutine INIT_activate() endif endif #endif + ! + if (l_HF_and_locXC.or.l_elel_corr) then + call INIT_QP_ctl_switch('G') +#if defined _RT + call INIT_RT_ctl_switch('G') +#endif + endif ! if (l_elel_corr) then ! call INIT_QP_ctl_switch('X') - call INIT_QP_ctl_switch('G') - ! #if defined _RT call INIT_RT_ctl_switch('X') - call INIT_RT_ctl_switch('G') #endif ! call initactivate(1,'BoseCut ShiftedPaths') ! if (l_gw0) then - if (.not.l_cohsex.or.COHSEX_use_empties) call initactivate(1,'GbndRnge') + if ((.not.l_cohsex).or.COHSEX_use_empties) call initactivate(1,'GbndRnge') if (.not.l_cohsex.and.trim(QP_solver)/='g') call initactivate(1,'GDamping') if (.not.l_cohsex) call initactivate(1,'dScStep') if (.not.l_elphoton_corr) then @@ -464,7 +468,7 @@ subroutine INIT_activate() ! ! Collisions ! - if (l_eval_collisions) call initactivate( 0,'COLLBands') + if (l_eval_collisions) call initactivate( 0,'COLLBands COLLHoleBands COLLElecBands COLLBseMem') ! if ( (l_eval_collisions.or.l_real_time).and.l_elel_scatt ) call initactivate(1,'PlasmaPerc') ! @@ -531,7 +535,7 @@ subroutine INIT_activate() call INIT_RT_ctl_switch('G') ! call initactivate(1,'RTskipImposeN RTeeImposeE InducedField') - call initactivate(1,'Gauge VelGaugeCorr VelGaugeDiam PfromJ RTUpdateSOC RTUpdateE SaveGhistory') + call initactivate(1,'Gauge VelGaugeCorr VelGaugeNoDiam PfromJ RTgradk RTUpdateSOC RTUpdateE SaveGhistory') call initactivate(1,'RTEqScatt RTImpForMet RTzeroTempRef RTskipPHabs RTEvalEnergy RTEvalEntropy') call initactivate(1,'dTupdateTime dTupdateTimeSet dTupdateJump dTupdateTresh dT_MAX dT_SET') if (l_elel_scatt .or. l_elph_scatt .or. l_elphoton_scatt) then @@ -540,7 +544,7 @@ subroutine INIT_activate() if (l_elph_scatt) call initactivate(1,'MemTresh RandQpts RT_T_evol ElPhModes UseDebyeE') if (l_elel_scatt) call initactivate( 1,'EERimPerc') ! - call initactivate(1,'RTBands Integrator GrKind TwoAlph RTehEny ScattTresh') + call initactivate(1,'RTBands RTHoleBands RTElecBands Integrator GrKind TwoAlph RTehEny ScattTresh') call initactivate(1,'RADLifeTime RADmagnific PhLifeTime DephCVonly DephEThresh DephTRange') call initactivate(1,'RTstep NEsteps NETime DipoleEtresh SPINprojected') call initactivate(1,'IOtime IOCachetime') @@ -558,18 +562,20 @@ subroutine INIT_activate() ! #if defined _NL if (l_nl_optics) then - call initactivate(1,'FFTGvecs NLBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') - call initactivate(1,'TestOSCLL UseSymm') + call initactivate(1,'FFTGvecs NLBands NLHoleBands NLElecBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') + call initactivate(1,'TestOSCLL UseSymm VelGaugeNoDiam') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng') + if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL COLLCut EvalCurrent InducedField') call initactivate(1,'FrPolPerdic TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') call init_QP_ctl_switch('G') + ! + do i1=1,n_ext_fields + call Afield_activate(i1) + enddo + ! endif ! - do i1=1,n_ext_fields - call Afield_activate(i1) - enddo - ! #endif ! #if defined _SC @@ -591,26 +597,6 @@ subroutine INIT_activate() ! contains ! -#if defined _RT || defined _NL - ! - subroutine Afield_activate(i1) - integer ::i1 - character(6)::field - field='Field'//trim(intc(i1)) - call initactivate(1,field//'_Freq') - call initactivate(1,field//'_NFreqs') - call initactivate(1,field//'_DFreq') - call initactivate(1,field//'_Int') - call initactivate(1,field//'_Width') - call initactivate(1,field//'_FWHM') - call initactivate(1,field//'_kind') - call initactivate(1,field//'_pol') - call initactivate(1,field//'_Dir') - call initactivate(1,field//'_Dir_circ') - call initactivate(1,field//'_Tstart') - end subroutine - ! -#endif ! subroutine CPU_activate(what) character(*) :: what diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index 759b1dfce1..6310e0ea9a 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -30,7 +30,9 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I # endif #endif ! - ! Define io_COLLs_header to handle either serial or parallel I/O + ! Inside collisions.h, io_COLLs_header is defined as either + ! - io_COLLISIONS (serial I/O) or + ! - io_COLLISIONS_header (parallel I/O case) ! #include ! diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F new file mode 100644 index 0000000000..8c1746e242 --- /dev/null +++ b/src/interface/INIT_fields.F @@ -0,0 +1,112 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +#if defined _RT || defined _NL +! +subroutine Afield_activate(i1) + use stderr, ONLY:intc + ! + implicit none + ! + integer, intent(in) ::i1 + ! + character(6)::field + field='Field'//trim(intc(i1)) + call initactivate(1,field//'_Freq') + call initactivate(1,field//'_NFreqs') + call initactivate(1,field//'_DFreq') + call initactivate(1,field//'_Int') + call initactivate(1,field//'_Width') + call initactivate(1,field//'_Chirp') + call initactivate(1,field//'_FWHM') + call initactivate(1,field//'_kind') + call initactivate(1,field//'_pol') + call initactivate(1,field//'_Dir') + call initactivate(1,field//'_Dir_circ') + call initactivate(1,field//'_Tstart') +end subroutine +! +! +subroutine Afield(defs,i_field) + ! + use it_tools, ONLY:it + use pars, ONLY:SP + use drivers, ONLY:infile_editing + use C_driver, ONLY:code_bin + use fields, ONLY:Efield,n_ext_fields + use units, ONLY:AU2KWCMm2 + use parser_m, ONLY:parser + use stderr, ONLY:intc + use it_m, ONLY:E_unit,I_unit,Time_unit,V_real_time, & + & initmode,initdefs + ! + implicit none + ! + integer, intent(in):: i_field + type(initdefs) :: defs + ! + ! Workspace + ! + character(10) :: name + logical :: is_def + ! + name='Field'//trim(intc(i_field)) + ! + call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%frequency,unit=E_unit) + call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%n_frequencies) + call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& +& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) + call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& +& Efield(i_field)%intensity,unit=I_unit) + call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& +& Efield(i_field)%width,unit=Time_unit(1)) + call it(defs,trim(name)//'_Chirp', '[RT '//trim(name)//'] Width',& +& Efield(i_field)%chirp,unit=Time_unit(1),verb_level=V_real_time) + call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& +& Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) + call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& +& Efield(i_field)%ef_name) + call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& +& Efield(i_field)%ef_pol) + call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& +& Efield(i_field)%versor) + call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& +& Efield(i_field)%versor_circ,verb_level=V_real_time) + call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& +& Efield(i_field)%t_initial,unit=Time_unit(1)) + ! + if (initmode==4.and..not.infile_editing) then + ! + call parser(trim(name)//'_FWHM',is_def) + if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) + if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) + ! + if (trim(Efield(i_field)%ef_name)/='none'.and.index(code_bin,'ypp')==0) n_ext_fields=n_ext_fields+1 + ! + endif + ! +end subroutine +! +#endif diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 3c65cd56a4..244bcc7002 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -27,7 +27,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & QP_G_er,QP_G_ir,QP_G_dr,QP_Sc_steps,QP_G_solver,& & QP_dSc_delta,QP_G_Zoom_treshold,GF_energy_range_mode use LIVE_t, ONLY:nhash - use wave_func, ONLY:wf_ng,rho_map_thresh + use wave_func, ONLY:wf_ng,rho_map_thresh,WF_load_mode use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& & bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& @@ -52,7 +52,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _SC || defined _RT || defined _QED use hamiltonian, ONLY:H_potential - use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands + use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLL_hole_bands,COLL_elec_bands #endif use QP_m, ONLY:SC_E_threshold #if defined _SC @@ -64,24 +64,23 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif #if defined _RT use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t, & -& CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t - use stderr, ONLY:intc +& CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t,Vbands_RT_IO_t use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem use RT_lifetimes, ONLY:RT_life_extrap_times_INPUT use real_time, ONLY:RT_step, Integrator_name, RAD_LifeTime, Phase_LifeTime, & -& NE_tot_time,RT_bands,RT_deph_range, & +& NE_tot_time,RT_bands,RT_hole_bands,RT_elec_bands,RT_deph_range, & & RT_ave_dephasing,RT_eh_en,RT_scatt_tresh,Gr_kind, & & NE_MEM_treshold,NE_time_step_update_jump_INPUT, & & two_alpha,DbGd_EE_percent,NE_time_step_update_jump, & & NE_initial_time_step_update,NE_step_update_treshold, & & RT_MAX_step,RAD_magnification, & & RT_deph_deg_thresh,RT_step_manual_prefactor,NE_time_step_update_manual - use fields, ONLY:Efield,n_ext_fields_max,n_ext_fields + use fields, ONLY:n_ext_fields_max,n_ext_fields use plasma, ONLY:PLASMA_redux_percent #endif #if defined _NL use nl_optics, ONLY:NL_bands,NL_damping,NL_correlation,NL_er,n_frequencies,NL_LRC_alpha, & -& NL_verb_name,n_angles,NL_rot_axis,max_angle +& NL_verb_name,n_angles,NL_rot_axis,NL_hole_bands,NL_elec_bands,max_angle #endif #if defined _NL | defined _SC use fields, ONLY:Efield @@ -232,6 +231,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'DBsFRAGpm', & & '[IO] Space-separated list of +DB to FRAG and -DB to NOT FRAG. DB=(DIP,X,W,HF,COLLS,K,BS,QINDX,RT,ELPH,SC,ALL)',& & DBs_FRAG_control_string,verb_level=V_io) + call it(defs,"WF_load_mode",'[WF-IO] Default distribution mode ("all"/"on-the-fly")',& +& WF_load_mode,verb_level=V_io) ! ! S_xc ! @@ -425,6 +426,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! Real Time dynamics ! call it(defs,'RTBands', '[RT] Bands',RT_bands) + call it(defs,'RTHoleBands','[RT] Active Bands range in valence',RT_hole_bands,Verb_level=V_real_time) + call it(defs,'RTElecBands','[RT] Active Bands range in conduct',RT_elec_bands,Verb_level=V_real_time) ! ! This call is a temporary fix due to the multiple definition of energy ranges. ! The call is needed to align the different values based on the USER definition. @@ -455,11 +458,16 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'Integrator', '[RT] Integrator. Use keywords space separated ( "EULER/EXPn/INV" "SIMPLE/RK2/RK4/HEUN" "RWA") ',& & Integrator_name) ! +#if defined _NL + IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Vbands_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/) +#elif defined _RT IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/) - call it(defs,'IOtime', '[RT] Time between two consecutive I/O (CARRIERs - GF - OUTPUT)',IO_times,unit=Time_unit(1)) +#endif + call it(defs,'IOtime', '[RT] Time between two consecutive I/O (CARRIERs - GF/WF - OUTPUT)',IO_times,unit=Time_unit(1)) CARR_RT_IO_t%INTERVAL_time_INPUT =IO_times(1) Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) Gless_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) + Vbands_RT_IO_t%INTERVAL_time_INPUT =IO_times(2) OUTPUT_RT_IO_t%INTERVAL_time_INPUT =IO_times(3) ! IO_times(1:2)=(/CACHE_OBS_INTERVAL_time_INPUT,OBS_RT_IO_t%INTERVAL_time_INPUT/) @@ -476,6 +484,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'RTEvalEnergy', '[RT] Energy variation computed on the fly',Verb_level=V_real_time) call it('f',defs,'RTEvalEntropy', '[RT] Entropy variation computed on the fly',Verb_level=V_real_time) call it('f',defs,'SaveGhistory', '[RT] Save the history of the green function',Verb_level=V_real_time) + call it('f',defs,'RTgradk', '[RT] Compute the term grad_k(rho).E',Verb_level=V_real_time) ! ! ... updates ... call it('f',defs,'RTUpdateSOC', '[RT] Update the SOC interaction',Verb_level=V_real_time) @@ -528,6 +537,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! Non-linear Optics ! call it(defs,'NLBands', '[NL] Bands range',NL_bands) + call it(defs,'NLHoleBands', '[NL] Active Bands range in valence',NL_hole_bands,Verb_level=V_nl_optics) + call it(defs,'NLElecBands', '[NL] Active Bands range in conduct',NL_elec_bands,Verb_level=V_nl_optics) call it(defs,'NLverbosity', '[NL] Verbosity level (low | high)',NL_verb_name) call it(defs,'NLstep', '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics) call it(defs,'NLtime', '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1)) @@ -548,6 +559,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'UseSymm','[NL] Use full-symms for dipoles and residual-symms for polar/current (def false)', & & verb_level=V_nl_optics) call it('f',defs,'EvalCurrent','[NL] Evaluate the current') + call it('f',defs,'SaveVbhistory', '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics) ! #endif ! @@ -557,7 +569,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! if (initmode==4.and..not.infile_editing) n_ext_fields=0 do i_field=1,n_ext_fields_max - call Afield(i_field) + call Afield(defs,i_field) enddo ! #endif @@ -652,9 +664,9 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! call it(defs,'DipBands', '[DIP] Bands range for dipoles',Dip%ib,verb_level=V_resp) call it(defs,'DipQpts', '[DIP] Qpts range for dipoles',Dip%iq,verb_level=V_resp) - call it(defs,'DipoleEtresh', '[DIP] Treshold in the definition of R=P/deltaE',Dip%Energy_treshold,& + call it(defs,'DipoleEtresh', '[DIP] Treshold in the definition of R=P/deltaE',Dip%Energy_threshold,& & verb_level=V_resp,unit=E_unit) - call it(defs,'DipApproach', '[DIP] [G-space v/R-space x/Covariant/Shifted grids]',Dip%approach,verb_level=V_resp) + call it(defs,'DipApproach', '[DIP] [G-space v/R-space x/Covariant/Shifted grids/derk]',Dip%approach,verb_level=V_resp) call it(defs,'DipComputed', '[DIP] [default R P V; extra P2 Spin Orb]',Dip%computed,verb_level=V_resp) call it(defs,'ShiftedPaths', '[DIP] Shifted grids paths (separated by a space)',grid_paths,verb_level=V_resp) call it('f',defs,'DipPDirect', '[DIP] Directly compute also when using other approaches for dipoles',verb_level=V_resp) @@ -716,9 +728,13 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! SC and RT common ! call it(defs,'COLLBands', '[COLL] Bands for the collisions',COLL_bands) + call it(defs,'COLLHoleBands','[COLL] Active Bands range in valence',COLL_hole_bands,Verb_level=V_sc) + call it(defs,'COLLElecBands','[COLL] Active Bands range in conduct',COLL_elec_bands,Verb_level=V_sc) ! - call it(defs,'HXC_Potential', '[SC] SC HXC Potential',H_potential,protect=.FALSE.,case="A") - call it(defs,'COLLCut', '[SC,RT] Cutoff on the collisions, 0=full(default =0.0005)',COLLISIONS_cutoff,verb_level=V_sc) + call it(defs,'HXC_Potential', '[SC] SC HXC Potential',H_potential,protect=.FALSE.,case="A") + call it(defs,'COLLCut', '[SC,RT] Cutoff on the collisions, 0=full 1=none (default =0.0005)',& + & COLLISIONS_cutoff,verb_level=V_sc) + call it('f',defs,'COLLBseMem', '[SC,RT] Minimize memory use in bse kernel conversion',verb_level=V_sc) ! #endif ! @@ -737,54 +753,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! contains ! -#if defined _RT || defined _NL - ! - subroutine Afield(i_field) - use units, ONLY :AU2KWCMm2 - use parser_m, ONLY : parser - character(10) :: name - integer :: i_field - logical :: is_def - ! - name='Field'//trim(intc(i_field)) - ! - call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%frequency,unit=E_unit) - call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies) - call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& -& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) - call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& -& Efield(i_field)%intensity,unit=I_unit) - call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& -& Efield(i_field)%width,unit=Time_unit(1)) - call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& -& Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) - call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|SOFTSIN| see more on src/modules/mod_fields.F)',& -& Efield(i_field)%ef_name) - call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& -& Efield(i_field)%ef_pol) - call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& -& Efield(i_field)%versor) - call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& -& Efield(i_field)%versor_circ,verb_level=V_real_time) - call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& -& Efield(i_field)%t_initial,unit=Time_unit(1)) - ! - if (initmode==4.and..not.infile_editing) then - ! - call parser(trim(name)//'_FWHM',is_def) - if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) - if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) - ! - if (trim(Efield(i_field)%ef_name)/='none') n_ext_fields=n_ext_fields+1 - ! - endif - ! - end subroutine - ! -#endif - ! #if defined _MPI ! subroutine CPU_structure_load() diff --git a/src/interface/INIT_read_command_line.F b/src/interface/INIT_read_command_line.F index 30ab9e718f..95189498de 100644 --- a/src/interface/INIT_read_command_line.F +++ b/src/interface/INIT_read_command_line.F @@ -337,6 +337,7 @@ subroutine INIT_read_command_line(rstr,init_) V_is_defined=INIT_read_command_line_potentials(V_string,"f") V_is_defined=INIT_read_command_line_potentials(V_string,"h") V_is_defined=INIT_read_command_line_potentials(V_string,"cvonly") + V_is_defined=INIT_read_command_line_potentials(V_string,"kbse") ! endif #endif @@ -357,6 +358,7 @@ subroutine INIT_read_command_line(rstr,init_) V_is_defined=INIT_read_command_line_potentials(V_string,"f") V_is_defined=INIT_read_command_line_potentials(V_string,"h") V_is_defined=INIT_read_command_line_potentials(V_string,"cvonly") + V_is_defined=INIT_read_command_line_potentials(V_string,"kbse") ! endif #endif @@ -426,8 +428,9 @@ subroutine INIT_read_command_line(rstr,init_) ! COLLISIONS ! if (runlevel_is_on('collisions')) then - if ( l_elel_scatt.or.trim(H_potential)=='COH+SEX'.or.& -& trim(H_potential)=='COH'.or.trim(H_potential)=='SEX' ) call initactivate(1,'em1s') + if ( l_elel_scatt.or.index(H_potential,'SEX')>0 .or.& +& index(H_potential,'COH')>0 ) call initactivate( 1,'em1s') + if ( index(H_potential,'KBSE')>0 ) call initactivate(-1,'em1s') endif ! #endif diff --git a/src/interface/INIT_read_command_line_potentials.F b/src/interface/INIT_read_command_line_potentials.F index c5b45b8b06..9c5b1f930a 100644 --- a/src/interface/INIT_read_command_line_potentials.F +++ b/src/interface/INIT_read_command_line_potentials.F @@ -47,7 +47,9 @@ logical function INIT_read_command_line_potentials(string,potential_user_string) H_potential=trim(H_potential)//"IP" case('cvonly') H_potential=trim(H_potential)//"CVONLY" - end select + case('kbse') + H_potential=trim(H_potential)//"KBSE" + end select ! string=STRING_remove(string,trim(potential_user_string),replace=" ") ! diff --git a/src/interface/NL_project.dep b/src/interface/NL_project.dep index 762c81e5ad..aecba3ab0f 100644 --- a/src/interface/NL_project.dep +++ b/src/interface/NL_project.dep @@ -1,5 +1,6 @@ INIT.o INIT_activate.o + INIT_fields.o INIT_load.o INIT_read_command_line.o diff --git a/src/interface/RT_project.dep b/src/interface/RT_project.dep index a91a355ec5..2dcbc4fc2c 100644 --- a/src/interface/RT_project.dep +++ b/src/interface/RT_project.dep @@ -4,6 +4,7 @@ INIT_RT_ctl_switch.o INIT_activate.o INIT_check_databases.o + INIT_fields.o INIT_load.o INIT_read_command_line.o INIT_read_command_line_potentials.o diff --git a/src/io/.objects b/src/io/.objects index cc8b94d070..e61e913b36 100644 --- a/src/io/.objects +++ b/src/io/.objects @@ -7,7 +7,7 @@ RT_objects = io_RT_components.o io_RT_components_G_lesser.o io_RT_components_hea variables_RT_static.o variables_RT_dynamic.o io_KB_real_space.o #endif #if defined _NL -NL_objects = variables_NL.o io_NL.o +NL_objects = variables_NL.o io_NL.o io_RT_components_V_bands.o #endif #if defined _ELPH ELPH_objects = variables_ELPH.o io_ELPH.o io_gFsq.o @@ -22,7 +22,7 @@ COLL_objects = io_OSCLL.o objs = ver_is_gt_or_eq.o \ io_Vnl.o io_E_SOC_map.o \ io_RIM.o io_RIM_W.o io_GROT.o $(ELPH_objects) $(PHEL_objects) \ - io_QINDX.o io_QP_and_GF.o io_X.o io_MPA.o \ + io_QINDX.o io_kpts.o io_QP_and_GF.o io_X.o io_MPA.o \ io_DB1.o io_WF.o io_KB_abinit.o io_KB_pwscf.o io_HF_and_locXC.o \ io_BS_Fxc.o io_NLCC_pwscf.o \ io_ATMPROJ_pwscf.o io_descriptors.o \ diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index 92284ef9ea..9bb4002056 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -28,6 +28,7 @@ io_RT_components_OBS.o io_RT_components_Reference.o io_RT_components_TIME_points.o + io_RT_components_V_bands.o io_RT_components_header.o io_SC_components.o io_USPP_pwscf.o @@ -38,6 +39,7 @@ io_full_SYMMs.o io_gFsq.o io_header.o + io_kpts.o io_out_of_date.o load_SC_components.o variables_DIPOLES.o diff --git a/src/io/NL_project.dep b/src/io/NL_project.dep index 889b62b3a1..6112a00d93 100644 --- a/src/io/NL_project.dep +++ b/src/io/NL_project.dep @@ -1,4 +1,6 @@ io_DB1.o io_NL.o + io_RT_components.o + io_RT_components_V_bands.o variables_NL.o diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index ad11d2c023..cadc648e5a 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -11,7 +11,7 @@ integer function io_ELPH(ID,what) use IO_m, ONLY:io_sec,read_is_on,frag_ELPH use IO_int, ONLY:io_connect,io_disconnect,io_fragment,& & io_bulk,io_header - use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,& + use ELPH, ONLY:ph_modes,elph_nb,PH_freqs_sq,l_GKKP_hosts_bare_dV,l_GKKP_DW,& & PH_pol_vector,GKKP,elph_grids_are_expanded,GKKP,GKKP_bare use stderr, ONLY:intc use ALLOC, ONLY:ELPH_alloc @@ -124,10 +124,14 @@ integer function io_ELPH(ID,what) ! endif ! - ! ELPH_DW - ! - call io_bulk(ID_frag,VAR="ELPH_DW_Q"//trim(intc(iq)),VAR_SZ=(/ph_modes,elph_nb,elph_nb,nkbz/)) - call io_bulk(ID_frag,R4=GKKP%dVr(:,:,:,:,1)) + if(l_GKKP_DW) then + ! + ! ELPH_DW + ! + call io_bulk(ID_frag,VAR="ELPH_DW_Q"//trim(intc(iq)),VAR_SZ=(/ph_modes,elph_nb,elph_nb,nkbz/)) + call io_bulk(ID_frag,R4=GKKP%dVr(:,:,:,:,1)) + ! + endif ! 1 call io_fragment_disconnect(ID,ID_frag) ! diff --git a/src/io/io_NL.F b/src/io/io_NL.F index 39ef184d39..65986f6d2f 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -9,9 +9,9 @@ integer function io_NL(what,ID) ! use pars, ONLY:schlen,SP,IP,CR_YIO,IP_YIO use units, ONLY:HA2EV, AU2KWCMm2, AUT2FS - use nl_optics, ONLY:E_tot_t,E_ext_t,E_ks_t,NL_P_t, & -& n_frequencies,NL_J_t - use real_time, ONLY:NE_steps + use nl_optics, ONLY:E_tot_t,E_ext_t,E_ks_t,NL_P_t,NL_J_t, & +& n_frequencies,l_pump_and_probe + use real_time, ONLY:NE_steps,RT_step use fields, ONLY:n_ext_fields use RT_control, ONLY:OBS_RT_IO_t use fields, ONLY:Efield @@ -35,7 +35,8 @@ integer function io_NL(what,ID) ! integer :: i_fragment,ID_frag character(schlen) :: VAR_name - integer :: i_Prb + integer :: i_Prb,i_time,N_IO,last_point_IO + real(SP) :: Time_IO(NE_steps) ! #if defined _TIMING call timing('io_NL',OPR='start') @@ -60,18 +61,27 @@ integer function io_NL(what,ID) ! Time variable (just for compatibility reasons) ! if(write_is_on(ID)) then - OBS_RT_IO_t%N =NE_steps - OBS_RT_IO_t%last_point=NE_steps + N_IO =NE_steps + last_point_IO=NE_steps + do i_time=1,NE_steps + Time_IO(i_time)=real(i_time-1,SP)*RT_step + enddo endif ! call io_elemental(ID,VAR="IO_TIME_N_points",VAR_SZ=1,MENU=0) - call io_elemental(ID,I0=OBS_RT_IO_t%N) + call io_elemental(ID,I0=N_IO) call io_elemental(ID,VAR="IO_TIME_LAST_POINT",VAR_SZ=1,MENU=0) - call io_elemental(ID,I0=OBS_RT_IO_t%last_point) + call io_elemental(ID,I0=last_point_IO) call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) - if(read_is_on(ID).and..not.allocated(OBS_RT_IO_t%Time)) allocate(OBS_RT_IO_t%Time(NE_steps)) - call io_bulk(ID,VAR="IO_TIME_points",VAR_SZ=(/OBS_RT_IO_t%N/)) - call io_bulk(ID,R1=OBS_RT_IO_t%Time) + call io_bulk(ID,VAR="IO_TIME_points",VAR_SZ=(/N_IO/)) + call io_bulk(ID,R1=Time_IO) + ! + if(read_is_on(ID)) then + OBS_RT_IO_t%N =N_IO + OBS_RT_IO_t%last_point=last_point_IO + if(.not.allocated(OBS_RT_IO_t%Time)) allocate(OBS_RT_IO_t%Time(NE_steps)) + OBS_RT_IO_t%Time=Time_IO + endif ! if (io_NL/=0) goto 1 ! @@ -134,6 +144,8 @@ integer function io_NL(what,ID) enddo ! + call def_variable_elemental(ID,VAR="",VAR_SZ=0,VAR_KIND=CR_YIO,MENU=1) + ! ! Polarization ! 2 write (VAR_name,'(a,i4.4)') 'NL_P_freq_',i_fragment diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F index dd069b708d..53a4fd6ac1 100644 --- a/src/io/io_OSCLL.F +++ b/src/io/io_OSCLL.F @@ -8,7 +8,7 @@ integer function io_OSCLL(q,ID) ! use pars, ONLY:SP,schlen,IP_YIO - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use matrix_operate,ONLY:mat_c2r,mat_r2c use R_lattice, ONLY:nXkibz,bz_samp use QP_m, ONLY:QP_nk @@ -83,7 +83,7 @@ integer function io_OSCLL(q,ID) ! if (read_is_on(ID)) then if(.not.allocated(OSCLL)) then - YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,q%nbz,ng_oscll)) + YAMBO_ALLOC(OSCLL,(COLL_bands(1):COLL_bands(2),COLL_bands(1):COLL_bands(2),PAR_Xk_nibz,n_sp_pol,q%nbz,ng_oscll)) endif endif ! @@ -107,7 +107,7 @@ integer function io_OSCLL(q,ID) io_OSCLL=io_status(ID) if (io_OSCLL/=0) goto 1 ! - if (read_is_on(ID)) OSCLL(ib,:,ik_mem,:,ig)=disk_data + if (read_is_on(ID)) OSCLL(ib,:,ik_mem,i_sp_pol,:,ig)=disk_data ! enddo enddo diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index 569ae6a7b4..3155ae01a0 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -55,7 +55,7 @@ integer function io_RT_components(what,ID) use IO_m, ONLY:io_sec,read_is_on,write_is_on,io_file use real_time, ONLY:NE_i_time,RT_step,RT_dyn_step,RT_carriers,RT_nbands,G_MEM_steps use RT_control, ONLY:RT_carriers_object,CARR_RT_IO_t,Gless_RESTART_RT_IO_t,OBS_RT_IO_t,CACHE_OBS_steps_now,& -& CACHE_OBS_steps,RT_DB_file_name,Gless_RT_IO_t,& +& Vbands_RT_IO_t,CACHE_OBS_steps,RT_DB_file_name,Gless_RT_IO_t,SAVE_Vb_history,& & RT_DB_name,RT_define_the_IO_DB_identifier,RT_do_IO,RT_current_DB_identifier,RT_return_db_ID #if defined _PAR_IO #endif @@ -73,7 +73,7 @@ integer function io_RT_components(what,ID) ! ! Work Space character(schlen) ::db_name - integer ::ik,db_kind,T_size,G_IO_steps,ID_frag + integer ::ik,db_kind,T_size,G_IO_steps logical ::loading_carr_before_neq integer, external ::variables_RT_dynamic ! @@ -99,7 +99,7 @@ integer function io_RT_components(what,ID) ! ! ACTION !======== - if (RT_do_IO("ANY_G")) then + if (RT_do_IO("ANY_G").or.RT_do_IO("ANY_Vb")) then io_RT_components=io_connect(desc="RT_"//trim(RT_DB_name(RT_current_DB_identifier)),type=db_kind,ID=ID) if (io_RT_components/=0) goto 1 else @@ -150,6 +150,8 @@ integer function io_RT_components(what,ID) if (io_RT_components/=0) goto 1 endif ! + if (RT_do_IO("V_bands")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,SAVE_Vb_history,Vbands_RT_IO_t) + ! if (RT_do_IO("G_lesser")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,.TRUE.,Gless_RT_IO_t) ! if (RT_do_IO("G_lesser_RESTART")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,.FALSE.,Gless_RESTART_RT_IO_t) @@ -164,15 +166,6 @@ integer function io_RT_components(what,ID) ! ! 3rd SECTION !============= - if (RT_do_IO("K_SECTION")) then -#if defined _PAR_IO - ID_frag=ID -#else - ! === deal with K-fragments === - ik = max(1,maxval(io_sec(ID,:))-2) - call io_fragment(ID,ID_frag,i_fragment=ik) -#endif - endif ! #if defined _ELPH_ITERATIVE ! @@ -182,15 +175,23 @@ integer function io_RT_components(what,ID) ! ! This should be replaced by call THETA_IO ! - call def_variable_bulk(ID_frag,"RT_THETA_K"//trim(intc(ik)),4,(/2,2*nqbz*ph_modes,RT_nbands,RT_nbands/),SP) - call io_variable_bulk(ID_frag,4,C3=THETA_matrix(:,:,:,ik)) + call def_variable_bulk(ID,"RT_THETA_K"//trim(intc(ik)),4,(/2,2*nqbz*ph_modes,RT_nbands,RT_nbands/),SP) + call io_variable_bulk(ID,4,C3=THETA_matrix(:,:,:,ik)) endif ! #endif ! ! Lesser Green Function !======================= - if (RT_do_IO("ANY_G")) call io_RT_components_G_lesser(ID_frag,T_size) + if (RT_do_IO("ANY_G")) call io_RT_components_G_lesser(ID,T_size) + ! +#if defined _NL + ! + ! Vbands + !======== + if (RT_do_IO("ANY_Vb")) call io_RT_components_V_bands(ID,T_size) + ! +#endif ! ! Carrier components !==================== @@ -212,9 +213,6 @@ integer function io_RT_components(what,ID) ! ! End !===== -#if !defined _PAR_IO - if (RT_do_IO("K_SECTION")) call io_fragment_disconnect(ID,ID_frag) -#endif 1 call io_disconnect(ID=ID) call timing('io_RT_components',OPR='stop') ! diff --git a/src/io/io_RT_components_G_lesser.F b/src/io/io_RT_components_G_lesser.F index 527d5cef8c..357ba4cfd7 100644 --- a/src/io/io_RT_components_G_lesser.F +++ b/src/io/io_RT_components_G_lesser.F @@ -8,11 +8,12 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! use pars, ONLY:SP,schlen - use drivers, ONLY:l_real_time + use drivers, ONLY:l_real_time,l_nl_optics use R_lattice, ONLY:nkibz + use electrons, ONLY:n_sp_pol use stderr, ONLY:intc use IO_int, ONLY:def_variable_bulk,io_variable_bulk - use IO_m, ONLY:variable_exist,write_is_on,read_is_on,io_sec,io_unit,netcdf_call,nf90_sync + use IO_m, ONLY:variable_exist,write_is_on,read_is_on,io_unit,netcdf_call,nf90_sync use hamiltonian, ONLY:H_rotation use RT_control, ONLY:Gless_RT_IO_t,NE_i_start_time,RT_do_IO use real_time, ONLY:dG_lesser,G_MEM_steps,RT_bands,RT_nbands,RT_nk,l_RT_rotate_DM,& @@ -28,57 +29,38 @@ subroutine io_RT_components_G_lesser(ID,T_size) integer, intent(in) :: ID,T_size ! logical :: l_H_rot,l_H_sig,l_H_EQ - integer :: ib,ik,ikibz,i_sp_pol,i_mem,i_mem_sorted,G_IO_steps,VAR_SZ(5),IPOS(5),& + integer :: ib,ik,ikibz,i_sp_pol,i_mem,i_mem_sorted,G_IO_steps,VAR_SZ(6),IPOS(6),& & PAR_G_k_range_ibz(2),k_range(2),ip,TMP_VAR_SZ - character(schlen) :: dim_names(5),dim_name_ibz,G_var_name,Sigma_var_name,H_var_name,ROT_var_name - complex(SP), allocatable ::Delta_Sigma(:,:,:,:) + character(schlen) :: dim_names(6),dim_name_ibz,G_var_name,Sigma_var_name,H_var_name,ROT_var_name + complex(SP), allocatable ::Delta_Sigma(:,:,:,:,:) ! ! Setup !======= ! ! Variables SIZE and strings... !------------------------------- - VAR_SZ(1:4)=(/2,RT_nbands,RT_nbands,1/) - dim_names(1:4) =[character(schlen) :: 'complex', 'RT_nbands','RT_nbands','k_fragment'] - dim_name_ibz ='k_fragment' - IPOS(1:4)=1 -#if defined _PAR_IO - VAR_SZ(4) = RT_nk - dim_names(4) ='RT_nk' - IPOS(4) =PAR_G_k_range(1) + VAR_SZ =(/2,RT_nbands,RT_nbands,RT_nk,n_sp_pol,G_MEM_steps/) + dim_names =[character(schlen) :: 'complex', 'RT_nbands','RT_nbands','RT_nk','n_sp_pol','G_MEM_steps'] + IPOS =(/1,1,1,PAR_G_k_range(1),1,1/) + ! dim_name_ibz ='nkibz' -#endif - VAR_SZ(5) = G_MEM_steps - dim_names(5) ='G_MEM_steps' + ! if (RT_do_IO("G_lesser_K_section")) then - VAR_SZ(5) = NF90_UNLIMITED - dim_names(5) ='G_IO_time_step' + VAR_SZ(6) = NF90_UNLIMITED + dim_names(6) ='G_IO_time_step' endif ! ! Sizes... !---------- - i_sp_pol=1 - ik = maxval(io_sec(ID,:))-2 - k_range =(/ik,ik/) - G_IO_steps =1 -#if defined _PAR_IO k_range =PAR_G_k_range G_IO_steps =Gless_RT_IO_t%INTERVAL_steps/nint(RT_dyn_step/RT_step) -#endif - ! + ! ! Variables... !-------------- G_var_name="dG_lesser" Sigma_var_name="Delta_Sigma" ROT_var_name="H_rotation" H_var_name="H_equilibrium" -#if !defined _PAR_IO - G_var_name="dG_lesser_K"//trim(intc(ik))//"_SP_POL"//trim(intc(i_sp_pol)) - ikibz=RTibz%k_map(ik) - Sigma_var_name="Delta_Sigma_K"//trim(intc(ikibz))//"_SP_POL"//trim(intc(i_sp_pol)) - H_var_name="H_equilibrium_K"//trim(intc(ikibz))//"_SP_POL"//trim(intc(i_sp_pol)) - ROT_var_name="H_rotation_K"//trim(intc(ikibz))//"_SP_POL"//trim(intc(i_sp_pol)) -#endif ! ! H_sig/H_rot... !---------------- @@ -92,72 +74,61 @@ subroutine io_RT_components_G_lesser(ID,T_size) ! ! Variable Definitions... !------------------------- -#if defined _PAR_IO - if( NE_i_time==NE_i_start_time.or..not.l_real_time) then -#endif + if( NE_i_time==NE_i_start_time.or..not.(l_real_time.or.l_nl_optics)) then call def_variable_bulk(ID,trim(G_var_name),4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) if (l_H_sig) then - TMP_VAR_SZ=1 -#if defined _PAR_IO TMP_VAR_SZ=nkibz -#endif - call def_variable_bulk(ID,trim(Sigma_var_name),5,(/VAR_SZ(:3),TMP_VAR_SZ,VAR_SZ(5)/),SP,& -& dim_names=(/dim_names(:3),dim_name_ibz,dim_names(5)/),par_io_kind='collective',silent=.true.) + call def_variable_bulk(ID,trim(Sigma_var_name),5,(/VAR_SZ(:3),TMP_VAR_SZ,VAR_SZ(5:6)/),SP,& +& dim_names=(/dim_names(:3),dim_name_ibz,dim_names(5:6)/),par_io_kind='collective',silent=.true.) endif - if (l_H_rot) call def_variable_bulk(ID,trim(ROT_var_name),6,VAR_SZ(1:4),SP,& -& dim_names=dim_names(1:4),par_io_kind='collective',silent=.true.) - if (l_H_EQ) call def_variable_bulk(ID,trim(H_var_name),7,VAR_SZ(1:4),SP,& -& dim_names=dim_names(1:4),par_io_kind='collective',silent=.true.) -#if defined _PAR_IO + if (l_H_rot) call def_variable_bulk(ID,trim(ROT_var_name),6,VAR_SZ(1:5),SP,& +& dim_names=dim_names(1:5),par_io_kind='collective',silent=.true.) + if (l_H_EQ) call def_variable_bulk(ID,trim(H_var_name),7,VAR_SZ(1:5),SP,& +& dim_names=dim_names(1:5),par_io_kind='collective',silent=.true.) endif -#endif ! ! Variable I/O... !----------------- - if (l_real_time) then + if (l_real_time.or.l_nl_optics) then do i_mem_sorted=G_MEM_steps-T_size+1,G_MEM_steps - if (RT_do_IO("G_lesser_K_section")) IPOS(5)=Gless_RT_IO_t%N+(i_mem_sorted-G_MEM_steps) - if (RT_do_IO("G_lesser_RESTART_K_section")) IPOS(5)= T_size+(i_mem_sorted-G_MEM_steps) + if (RT_do_IO("G_lesser_K_section")) IPOS(6)=Gless_RT_IO_t%N+(i_mem_sorted-G_MEM_steps) + if (RT_do_IO("G_lesser_RESTART_K_section")) IPOS(6)= T_size+(i_mem_sorted-G_MEM_steps) if (i_mem_sorted==G_MEM_steps ) i_mem=i_MEM_now if (i_mem_sorted==G_MEM_steps-1) i_mem=i_MEM_prev if (i_mem_sorted==G_MEM_steps-2) i_mem=i_MEM_old - call io_variable_bulk(ID,4,C4=dG_lesser(:,:,k_range(1):k_range(2),i_mem:i_mem),IPOS=IPOS) + call io_variable_bulk(ID,4,C5=dG_lesser(:,:,k_range(1):k_range(2),:,i_mem:i_mem),IPOS=IPOS) enddo else - IPOS(5)=Gless_RT_IO_t%N - call io_variable_bulk(ID,4,C4=dG_lesser(:,:,k_range(1):k_range(2),1:1),IPOS=IPOS) + IPOS(6)=Gless_RT_IO_t%N + call io_variable_bulk(ID,4,C5=dG_lesser(:,:,k_range(1):k_range(2),:,1:1),IPOS=IPOS) endif ! if (l_H_sig) then PAR_G_k_range_ibz(1)=RTibz%k_map(k_range(1)) PAR_G_k_range_ibz(2)=RTibz%k_map(k_range(2)) - allocate(Delta_Sigma(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range_ibz(1):PAR_G_k_range_ibz(2),1)) + allocate(Delta_Sigma(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range_ibz(1):PAR_G_k_range_ibz(2),n_sp_pol,1)) if(write_is_on(ID)) then do ikibz=PAR_G_k_range_ibz(1),PAR_G_k_range_ibz(2) ik=RTibz%k_range(ikibz,1) - if( l_RT_RWA) Delta_Sigma(:,:,ikibz,1:1)=Ho_plus_sigma(:,:,ik,1:1) - if(.not.l_RT_RWA) Delta_Sigma(:,:,ikibz,1:1)=Ho_plus_sigma(:,:,ik,1:1)-H_EQ(:,:,ik,1:1) + if( l_RT_RWA) Delta_Sigma(:,:,ikibz,:,1)=Ho_plus_sigma(:,:,ik,:) + if(.not.l_RT_RWA) Delta_Sigma(:,:,ikibz,:,1)=Ho_plus_sigma(:,:,ik,:)-H_EQ(:,:,ik,:) enddo endif -#if defined _PAR_IO IPOS(4)=PAR_G_k_range_ibz(1) -#endif - call io_variable_bulk(ID,5,C4=Delta_Sigma,IPOS=IPOS) -#if defined _PAR_IO + call io_variable_bulk(ID,5,C5=Delta_Sigma,IPOS=IPOS) IPOS(4)=PAR_G_k_range(1) -#endif if(read_is_on(ID)) then do ip=PAR_G_k_range_ibz(1),PAR_G_k_range_ibz(2) ikibz=RTibz%k_map(ip) - Ho_plus_sigma(:,:,ip,1:1)=Delta_Sigma(:,:,ikibz,1:1) + Ho_plus_sigma(:,:,ip,:)=Delta_Sigma(:,:,ikibz,:,1) enddo endif deallocate(Delta_Sigma) endif ! - if (l_H_rot) call io_variable_bulk(ID,6,C3=H_rotation(:,:,k_range(1):k_range(2),1),IPOS=IPOS(1:4)) + if (l_H_rot) call io_variable_bulk(ID,6,C4=H_rotation(:,:,k_range(1):k_range(2),:),IPOS=IPOS(1:5)) ! - if (l_H_EQ) call io_variable_bulk(ID,7,C3=H_EQ(:,:,k_range(1):k_range(2),1),IPOS=IPOS(1:4)) + if (l_H_EQ) call io_variable_bulk(ID,7,C4=H_EQ(:,:,k_range(1):k_range(2),:),IPOS=IPOS(1:5)) ! ! In case of frequent I/O this gives a significant slowdown of the simulation if (G_IO_steps>=10) call netcdf_call(nf90_sync(io_unit(ID)),ID) diff --git a/src/io/io_RT_components_Reference.F b/src/io/io_RT_components_Reference.F index b32dc54960..2e8a6bc5b3 100644 --- a/src/io/io_RT_components_Reference.F +++ b/src/io/io_RT_components_Reference.F @@ -10,6 +10,7 @@ subroutine io_RT_components_Reference(ID) use pars, ONLY:SP use drivers, ONLY:l_elph_scatt use R_lattice, ONLY:nqbz + use electrons, ONLY:n_sp_pol use IO_m, ONLY:read_is_on use IO_int, ONLY:def_variable_bulk,io_variable_bulk use RT_lifetimes, ONLY:RT_lifetime,RT_EE_REF_life,RT_EP_emit_REF_life,RT_EP_abs_REF_life,& @@ -60,8 +61,8 @@ subroutine io_RT_components_Reference(ID) ! if (allocated(G_lesser_reference)) then ! - call def_variable_bulk(ID,"G_lesser_reference",4,(/2,RT_nbands,RT_nbands,RT_nk/),SP) - call io_variable_bulk(ID,4,C3=G_lesser_reference) + call def_variable_bulk(ID,"G_lesser_reference",4,(/2,RT_nbands,RT_nbands,RT_nk,n_sp_pol/),SP) + call io_variable_bulk(ID,4,C4=G_lesser_reference) ! endif ! diff --git a/src/io/io_RT_components_TIME_points.F b/src/io/io_RT_components_TIME_points.F index e4c4185c0c..ad6c757862 100644 --- a/src/io/io_RT_components_TIME_points.F +++ b/src/io/io_RT_components_TIME_points.F @@ -66,12 +66,14 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti ! IPOS=TYP%N-VAR_SZ+1 IO_LIM=(/TYP%N-VAR_SZ+1,TYP%N/) - if(TYP%first_IO(2).or.RT_do_IO("ANY_G").or.read_is_on(ID)) then + if(TYP%first_IO(2).or.RT_do_IO("ANY_G").or.RT_do_IO("ANY_Vb").or.read_is_on(ID)) then dim_name="IO_TIME_n_points" if (UNLIMITED_time) then call def_variable_bulk(ID,"IO_TIME_points",3,(/NF90_UNLIMITED/),SP,dim_name,silent=.true.,par_io_kind="collective") - else + else if (RT_do_IO("ANY_G")) then call def_variable_bulk(ID,"IO_TIME_points",3,(/G_MEM_steps/), SP,dim_name,silent=.true.,par_io_kind="collective") + else if (RT_do_IO("ANY_Vb")) then + call def_variable_bulk(ID,"IO_TIME_points",3,(/1/), SP,dim_name,silent=.true.,par_io_kind="collective") endif endif ! diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F new file mode 100644 index 0000000000..d499ad9cf8 --- /dev/null +++ b/src/io/io_RT_components_V_bands.F @@ -0,0 +1,81 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM, DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine io_RT_components_V_bands(ID,T_size) + ! + use pars, ONLY:SP,schlen + use drivers, ONLY:l_nl_p_and_p + use iso_c_binding, ONLY:C_LOC,C_F_POINTER + use IO_m, ONLY:read_is_on,write_is_on + use IO_int, ONLY:def_variable_bulk,io_variable_bulk + use electrons, ONLY:n_sp_pol,n_full_bands + use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,SAVE_Vb_history + use real_time, ONLY:RT_bands,RT_nbands,NE_i_time!,RT_dyn_step,RT_step + use nl_optics, ONLY:V_bands + use netcdf, ONLY:NF90_UNLIMITED + use QP_m, ONLY:QP_nk + ! + implicit none + ! + integer, intent(in) :: ID,T_size + ! + integer :: VAR_SZ(6),IPOS(6),nbf + character(schlen) :: dim_names(6) + !complex(SP),pointer :: tmp_link(:,:,:,:,:) + complex(SP) :: tmp_var(RT_nbands,maxval(n_full_bands),QP_nk,n_sp_pol,1) + ! + ! Setup + !======= + ! + ! Variables SIZE and names... + !---------------------------- + nbf=maxval(n_full_bands) + VAR_SZ(1:5)=(/2,RT_nbands,nbf,QP_nk,n_sp_pol/) + dim_names(1:5) =[character(schlen) :: 'complex', 'RT_nbands','nb_full','QP_nk','n_sp_pol'] + IPOS(1:5)=1 + ! + VAR_SZ(6) = T_size + dim_names(6) ='V_bands_IO_time_step' + IPOS(6) = Vbands_RT_IO_t%N + ! + ! Variable Definitions... + !------------------------- + if( NE_i_time==NE_i_start_time .or. .not.l_nl_p_and_p) then + if (SAVE_Vb_history) VAR_SZ(6) = NF90_UNLIMITED + !call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) + call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,silent=.true.) + VAR_SZ(6) = T_size + endif + ! + ! Variable I/O... + !----------------- + ! This does not work since the variable is not contiguous + !call C_F_POINTER(C_LOC(V_bands(RT_bands(1):RT_bands(2),1:nbf,1:QP_nk,1:n_sp_pol)),tmp_link,VAR_SZ(2:6)) + !call io_variable_bulk(ID,4,C5=tmp_link,IPOS=IPOS) + !nullify(tmp_link) + ! + if (write_is_on(ID)) tmp_var(:,:,:,:,1) = V_bands(RT_bands(1):RT_bands(2),1:nbf,1:QP_nk,1:n_sp_pol) + call io_variable_bulk(ID,4,C5=tmp_var,IPOS=IPOS) + if (read_is_on(ID)) V_bands(RT_bands(1):RT_bands(2),1:nbf,1:QP_nk,1:n_sp_pol) = tmp_var(:,:,:,:,1) + ! +end subroutine io_RT_components_V_bands diff --git a/src/io/io_kpts.F b/src/io/io_kpts.F new file mode 100644 index 0000000000..5e8d971080 --- /dev/null +++ b/src/io/io_kpts.F @@ -0,0 +1,72 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2014 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +!> @brief Write info about k-points +! +! io_sec=1 general parameters +! io_sec=2 k-points +! +integer function io_kpts(k,Xk,q,io_db) + ! + use pars, ONLY:IP_YIO + use R_lattice, ONLY:bz_samp + use IO_m, ONLY:io_sec,io_status + use IO_int, ONLY:io_connect,io_disconnect,& +& io_variable_elemental,def_variable_elemental,io_header,& +& def_variable_bulk,io_variable_bulk + use timing_m, ONLY:timing + ! +#include + ! + type(bz_samp)::k,q,Xk + integer ::io_db + ! + call timing('io_kpts',OPR='start') + ! + io_kpts=io_connect(desc='kpts',type=1,ID=io_db) + if (io_kpts/=0) goto 1 + ! + if (any((/io_sec(io_db,:)==1/))) then + ! + io_kpts=io_header(io_db,IMPOSE_SN=.true.) + ! + call def_variable_elemental(io_db,"k_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=k%nibz) + ! + call def_variable_elemental(io_db,"k_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=k%nbz) + ! + call def_variable_elemental(io_db,"Xk_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Number of kpts for polarization (ibz)",I0=Xk%nibz) + ! + call def_variable_elemental(io_db,"Xk_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,VAR="Number of kpts for polarization ( bz)",I0=Xk%nbz) + ! + call def_variable_elemental(io_db,"q_nibz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=q%nibz) + ! + call def_variable_elemental(io_db,"q_nbz",1,IP_YIO,0) + call io_variable_elemental(io_db,I0=q%nbz) + ! + call def_variable_elemental(io_db,"",0,0,1) + ! + if (io_kpts/=0) goto 1 + ! + endif + ! + if (any((/io_sec(io_db,:)==2/))) then + ! + call def_variable_bulk(io_db,"Xk_sstar",1,shape(Xk%sstar),IP_YIO) + call io_variable_bulk(io_db,1,I2=Xk%sstar) + ! + endif + ! +1 call io_disconnect(ID=io_db) + ! + call timing('io_kpts',OPR='stop') + ! +end function io_kpts diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index a1a1eacdb9..591556c11d 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -11,7 +11,7 @@ integer function variables_ELPH(ID,what) use IO_m, ONLY:io_status,read_is_on,write_is_on,io_mode,DUMP,IO_INCOMPATIBLE_VAR use IO_int, ONLY:ver_is_gt_or_eq,io_variable_elemental,io_bulk,def_variable_elemental use ELPH, ONLY:ph_modes,elph_nb,elph_nk_bz,ELPH_desc,elph_grids_are_expanded, & -& QP_PH_n_G_bands,PH_W_debye,elph_nQ,PH_kpt_bz,l_GKKP_hosts_bare_dV,& +& QP_PH_n_G_bands,PH_W_debye,elph_nQ,PH_kpt_bz,l_GKKP_hosts_bare_dV,l_GKKP_DW,& & elph_use_q_grid,PH_qpt,elph_nQ_used,elph_Ham_bands,elph_branches use ALLOC, ONLY:ELPH_alloc use R_lattice, ONLY:nkbz,nqibz,q_pt @@ -27,7 +27,7 @@ integer function variables_ELPH(ID,what) ! !Work Space ! - integer ::iq + integer ::iq,PARS_size logical ::l_gFsq,l_gkkp real(SP) ::v(3) ! @@ -40,8 +40,11 @@ integer function variables_ELPH(ID,what) ! call IO_desc_reset(ELPH_desc) ! - if (.not.ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",6,SP,0) - if ( ver_is_gt_or_eq(ID,revision=18920)) call def_variable_elemental(ID,"PARS",7,SP,0) + PARS_size=6 + if ( ver_is_gt_or_eq(ID,revision=18920)) PARS_size=7 + if ( ver_is_gt_or_eq(ID,revision=21400)) PARS_size=8 + call def_variable_elemental(ID,"PARS",PARS_size,SP,0) + ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Q points",I0=elph_nQ,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[avail]",DESCRIPTOR=ELPH_desc) @@ -50,10 +53,19 @@ integer function variables_ELPH(ID,what) call io_variable_elemental(ID,VAR="[ELPH] K points",I0=elph_nk_bz,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I0=elph_nb,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] Using the Q-grid",L0=elph_use_q_grid,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + ! if (ver_is_gt_or_eq(ID,revision=18920)) then call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) endif + ! + if (ver_is_gt_or_eq(ID,revision=21400)) then + call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller interaction",L0=l_GKKP_DW, & +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + else + l_GKKP_DW=.TRUE. + endif + ! if (l_gFsq) then call def_variable_elemental(ID,"QP_nb_nk_n_states",3,SP,0) call io_variable_elemental(ID,I0=QP_nb) diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 5511479d36..cea489bec6 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -15,8 +15,7 @@ integer function variables_NL(ID) use QP_m, ONLY:QP_ng_SH,QP_ng_Sx use real_time, ONLY:Integrator_name,NE_steps,RT_step,l_RT_induced_field,RT_bands,RAD_LifeTime use electric, ONLY:l_force_SndOrd - use fields, ONLY:n_ext_fields - use fields, ONLY:Efield + use fields, ONLY:n_ext_fields,Efield use IO_m, ONLY:io_status use IO_int, ONLY:io_variable_elemental,def_variable_elemental,ver_is_gt_or_eq use descriptors, ONLY:IO_desc_reset diff --git a/src/io/variables_Overlaps.F b/src/io/variables_Overlaps.F index 6b3d4b86ef..6cb6574bd1 100644 --- a/src/io/variables_Overlaps.F +++ b/src/io/variables_Overlaps.F @@ -23,16 +23,8 @@ integer function variables_Overlaps(Dip,ID) ! call IO_desc_reset(DIP_desc) ! - call def_variable_elemental(ID,"Bands",2,IP_YIO,0) - call io_variable_elemental(ID,DB_I1=Dip%db_ib,VAR="DIP band range",I1=Dip%ib,CHECK=.true.,OP=(/">=","<="/),& -& DESCRIPTOR=DIP_desc) - ! - call def_variable_elemental(ID,"Bands_limits",2,IP_YIO,0) - call io_variable_elemental(ID,DB_I1=Dip%db_ib_lim,VAR="DIP band range limits",I1=Dip%ib_lim,CHECK=.true.,OP=(/"<=",">="/),& -& DESCRIPTOR=DIP_desc) - ! - call def_variable_elemental(ID,"Bands_ordered",1,LP_YIO,0) - call io_variable_elemental(ID,VAR="Bands ordered",L0=Dip%bands_ordered,CHECK=.true.,OP=(/">="/),& + call def_variable_elemental(ID,"Bands",1,IP_YIO,0) + call io_variable_elemental(ID,DB_I0=Dip%db_ib(2),VAR="DIP nbands",I0=Dip%ib(2),CHECK=.true.,OP=(/"<="/),& & DESCRIPTOR=DIP_desc) ! call def_variable_elemental(ID,"NG",1,IP_YIO,0) diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index 967d2ec737..316c11940e 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -55,16 +55,18 @@ integer function variables_RT_static(ID) ! ! ELPH_vars ! -#if defined _ELPH - call def_variable_elemental(ID,VAR="ELPH_vars",VAR_SZ=5,VAR_KIND=IP_YIO,MENU=0) - call io_variable_elemental(ID,L0=l_elph_scatt,& -& VAR=" [E-P] Electron-phonon", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) - call io_variable_elemental(ID,L0=l_RT_iterative_ELPH_lifetimes,& -& VAR=" [E-P] Iterative time evolution ", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) - call io_variable_elemental(ID, & -& VAR=" [E-P] Branches",I1=elph_branches,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=RT_desc) - call io_variable_elemental(ID, & -& VAR=" [E-P] GF`s Memory steps",I0=G_MEM_steps,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) +#if defined _ELPH + if ( write_is_on(ID) .or. variable_exist(ID,"ELPH_vars") ) then + call def_variable_elemental(ID,VAR="ELPH_vars",VAR_SZ=5,VAR_KIND=IP_YIO,MENU=0) + call io_variable_elemental(ID,L0=l_elph_scatt,& +& VAR=" [E-P] Electron-phonon", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + call io_variable_elemental(ID,L0=l_RT_iterative_ELPH_lifetimes,& +& VAR=" [E-P] Iterative time evolution ", CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + call io_variable_elemental(ID, & +& VAR=" [E-P] Branches",I1=elph_branches,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=RT_desc) + call io_variable_elemental(ID, & +& VAR=" [E-P] GF`s Memory steps",I0=G_MEM_steps,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc) + endif #endif ! ! E-E_vars @@ -157,12 +159,13 @@ integer function variables_RT_static(ID) call def_variable_elemental(ID,VAR="FIELD_POL"//trim(intc(i1)),VAR_SZ=1,VAR_KIND=0,MENU=0) call io_variable_elemental(ID,CH0=Efield(i1)%ef_pol,VAR=' [FIELDs] Polarization',DESCRIPTOR=RT_desc) ! - call def_variable_elemental(ID,VAR="EXTERNAL_FIELD"//trim(intc(i1)),VAR_SZ=13,VAR_KIND=SP,MENU=0) + call def_variable_elemental(ID,VAR="EXTERNAL_FIELD"//trim(intc(i1)),VAR_SZ=14,VAR_KIND=SP,MENU=0) call io_variable_elemental(ID,R1=Efield(i1)%versor,VAR=" [FIELDs] Versor",DESCRIPTOR=RT_desc) call io_variable_elemental(ID,R1=Efield(i1)%versor_circ,VAR=" [FIELDs] Versor_circ",DESCRIPTOR=RT_desc) call io_variable_elemental(ID,VAR=" [FIELDs] Intensity",R0=Efield(i1)%intensity,& & DESCRIPTOR=RT_desc,UNIT=AU2KWCMm2,TERMINATOR="[kWCMm2]") - call io_variable_elemental(ID,VAR=" [FIELDs] Damping",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") + call io_variable_elemental(ID,VAR=" [FIELDs] Width ",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") + call io_variable_elemental(ID,VAR=" [FIELDs] Chirp ",R0=Efield(i1)%chirp,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R1=Efield(i1)%frequency,& & DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") call io_variable_elemental(ID,VAR=" [FIELDs] Frequency steps",I0=Efield(i1)%n_frequencies,DESCRIPTOR=RT_desc) diff --git a/src/io_parallel/io_BS_PAR_block.F b/src/io_parallel/io_BS_PAR_block.F index c7b98f61be..dadbe49b85 100644 --- a/src/io_parallel/io_BS_PAR_block.F +++ b/src/io_parallel/io_BS_PAR_block.F @@ -14,7 +14,6 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) ! Each block has a status variables indicating if the matrix element was already calculated ! use pars, ONLY:IP,IPL,SP,schlen,max_io_vars_open - use iso_c_binding, ONLY:C_LOC,C_F_POINTER use stderr, ONLY:STRING_split use BS, ONLY:BS_blk,BSK_IO_mode,MAX_BSK_LIN_size,n_BS_blks_min,BS_K_dim,BSK_IO_sum_value use timing_m, ONLY:timing @@ -33,7 +32,7 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) integer, parameter :: n_max_tot_vars=6 ! see io_BS_PAR_init ! character(schlen) :: BSK_IO_local,BSK_IO_split(3) - logical :: lwrite(3),file_sync + logical :: lwrite(3),file_sync,do_table,do_energ integer :: x1,x2,VAR_IDs(2),ID_table,ID_energ,stat,ID_now(2) integer :: n2,i1,i2,idx1,idx2,imax,i_rep(2),ilast integer(IPL) :: idx @@ -206,10 +205,13 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) end select ! if ((x1==x2.or.BS_blk(i_block)%size(2)==BS_K_dim(1)) .and. .not.trim(mode)=="matonly") then - if ( write_is_on(ID) .or. variable_exist(ID,"BS_TABLE") ) then + ! logicals for back compatibility + do_table=variable_exist(ID,"BS_TABLE").or.write_is_on(ID) + do_energ=variable_exist(ID,"BS_EH_ENERGIES").or.write_is_on(ID) + if ( do_table .or. do_energ ) then if (BS_blk(i_block)%mode=="C" .or. BS_blk(i_block)%mode=="A") x1=x1+BS_K_dim(1) - call io_variable_bulk(ID, ID_energ, R1=BS_blk(i_block)%E, IPOS=(/x1/) ) - call io_variable_bulk(ID, ID_table, I2=BS_blk(i_block)%table, IPOS=(/1,x1/) ) + if(do_table) call io_variable_bulk(ID, ID_energ, R1=BS_blk(i_block)%E, IPOS=(/x1/) ) + if(do_energ) call io_variable_bulk(ID, ID_table, I2=BS_blk(i_block)%table, IPOS=(/1,x1/) ) endif endif ! @@ -224,3 +226,66 @@ subroutine io_BS_PAR_block(iq,i_block,ID,mode) call timing('io_BS',OPR='stop') ! end subroutine +! +! +subroutine read_BS_PAR_collisions(iq,i_block,ID) + ! + use BS, ONLY:BS_blk + use timing_m, ONLY:timing + use IO_int, ONLY:io_variable_bulk + ! + implicit none + ! + integer, intent(in) :: ID + integer, intent(in) :: iq,i_block + ! + ! Work Space + ! + integer :: x1,x2,y1,y2,VAR_IDs(2) + ! + ! + ! Get the type of block that we want to write + ! + select case(BS_blk(i_block)%mode) + case("R") + VAR_IDs=(/1,2/) + case("C") + VAR_IDs=(/3,4/) + case("A") + VAR_IDs=(/5,6/) + end select + ! + ! Get lower bound coordinates in 2D matrix + x1=BS_blk(i_block)%coordinate(1) + x2=BS_blk(i_block)%coordinate(2) + ! + y1=BS_blk(i_block)%poordinate(1) + y2=BS_blk(i_block)%poordinate(2) + ! + call timing('read_BS_coll_row',OPR='start') + call io_variable_bulk(ID, VAR_IDs(1), C2=BS_blk(i_block)%mat , IPOS=(/1,x1,x2/) ) + call timing('read_BS_coll_row',OPR='stop') + call timing('read_BS_coll_col',OPR='start') + call io_variable_bulk(ID, VAR_IDs(1), C2=BS_blk(i_block)%tam , IPOS=(/1,y1,y2/) ) + call timing('read_BS_coll_col',OPR='stop') + ! +end subroutine read_BS_PAR_collisions +! +! +subroutine read_BS_table(iq,ID) + ! + use pars, ONLY:max_io_vars_open + use IO_int, ONLY:io_variable_bulk + use BS, ONLY:BS_blk,BS_K_dim + ! + implicit none + ! + integer, intent(in) :: iq,ID + ! + integer :: ID_table + ! + ID_table=max_io_vars_open + call io_variable_bulk(ID, ID_table, I2=BS_blk(1)%table, IPOS=(/1,1/) ) + call io_variable_bulk(ID, ID_table, I2=BS_blk(2)%table, IPOS=(/1,BS_K_dim(1)+1/) ) + ! +end subroutine read_BS_table diff --git a/src/io_parallel/io_BS_PAR_init.F b/src/io_parallel/io_BS_PAR_init.F index 70b759fdf9..1ab13123c3 100644 --- a/src/io_parallel/io_BS_PAR_init.F +++ b/src/io_parallel/io_BS_PAR_init.F @@ -29,7 +29,7 @@ integer function io_BS_PAR_init(iq,ID,mode) ! character(schlen) :: db_name,ch_tmp,dim_names(3,n_max_vars),BSK_IO_local,BSK_IO_split(3) character(lchlen) :: ch(n_max_vars,max_io_vars_open-1) - logical :: def_var, io_var + logical :: def_var, io_var, do_table, do_energ integer(IPL) :: BS_lin_size integer :: n_vars, i1,i2, i_rep,i_var, BSK_n_dims,n_replica integer :: chunksize(3) @@ -181,12 +181,18 @@ integer function io_BS_PAR_init(iq,ID,mode) enddo enddo ! - if( (trim(mode)=="full" .or. trim(mode)=="compressed_mat") .and. & - & ( write_is_on(ID) .or. variable_exist(ID,"BS_TABLE")) ) then - dim_names(1,1)="BS_H_dim" - call def_variable_bulk(ID,"BS_EH_ENERGIES",max_io_vars_open-1,[BS_H_dim],SP_YIO,dim_names(1:1,1),par_io_kind='independent') - dim_names(1:2,1)=[character(schlen) :: "n_transition_variables","BS_H_dim"] - call def_variable_bulk(ID,"BS_TABLE",max_io_vars_open,[5,BS_H_dim],IP_YIO,dim_names(1:2,1),par_io_kind='independent') + if( (trim(mode)=="full" .or. trim(mode)=="compressed_mat") ) then + ! logicals for back compatibility + do_table=variable_exist(ID,"BS_TABLE").or.write_is_on(ID) + do_energ=variable_exist(ID,"BS_EH_ENERGIES").or.write_is_on(ID) + if ( do_energ ) then + dim_names(1,1)="BS_H_dim" + call def_variable_bulk(ID,"BS_EH_ENERGIES",max_io_vars_open-1,[BS_H_dim],SP_YIO,dim_names(1:1,1),par_io_kind='independent') + endif + if ( do_table ) then + dim_names(1:2,1)=[character(schlen) :: "n_transition_variables","BS_H_dim"] + call def_variable_bulk(ID,"BS_TABLE",max_io_vars_open,[5,BS_H_dim],IP_YIO,dim_names(1:2,1),par_io_kind='independent') + endif endif ! end function io_BS_PAR_init diff --git a/src/io_parallel/io_BS_header.F b/src/io_parallel/io_BS_header.F index b1d97b6782..09b7342aa6 100644 --- a/src/io_parallel/io_BS_header.F +++ b/src/io_parallel/io_BS_header.F @@ -11,6 +11,7 @@ integer function io_BS_header(iq,X,ID,mode) ! use parallel_int, ONLY:PP_wait use com, ONLY:msg + use drivers, ONLY:l_eval_collisions use pars, ONLY:schlen,lchlen use stderr, ONLY:intc use X_m, ONLY:X_t @@ -68,8 +69,12 @@ integer function io_BS_header(iq,X,ID,mode) ! ! Check if the file already contains data and it is consistent ! - io_BS_header=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.true.,& + if (l_eval_collisions) then + io_BS_header=io_header(ID,R_LATT=.true.,WF=.true.,CUTOFF=.true.) + else + io_BS_header=io_header(ID,QPTS=.true.,R_LATT=.true.,WF=.true.,& & IMPOSE_SN=.true.,XC_KIND="K_WF force Xs",CUTOFF=.true.,FRAG=frag_BS_K) + endif ! io_BS_header=variables_BS(ID,iq,local_desc,.TRUE.,X=X) ! diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 27acf114e0..f5cb47582f 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -5,12 +5,13 @@ ! ! Authors (see AUTHORS file for details): AM CA DS ! -integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) +integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) ! use pars, ONLY:schlen,IP,SP,DP,IP_YIO,CR_YIO use parallel_m, ONLY:master_cpu use iso_c_binding, ONLY:C_LOC,C_F_POINTER - use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,LAST_COLL_sync,PAR_COLL_min,COLLISIONS_load_SP + use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,PAR_COLL_min,& +& COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP use IO_m, ONLY:io_sec,io_status,IO_OUTDATED_DB,read_is_on,IO_mode,io_unit,& & VERIFY,io_extension,write_is_on,nf90_sync,netcdf_call,YAMBO_DEF_CHUNK use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq,io_fragment, & @@ -19,13 +20,14 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) use plasma, ONLY:N_plasma_poles_global,PLASMA_redux_percent use QP_m, ONLY:QP_ng_Sx,QP_ng_SH,SC_band_mixing,QP_QED_ng use X_m, ONLY:X_desc + use electrons, ONLY:n_sp_pol use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing ! #include ! integer, intent(inout) ::ID - type(COLLISIONS_group) ::COLL + type(COLLISIONS_group) ::COLL_grp type(COLLISIONS_element),optional, target :: COLL_element integer, intent(in) ,optional :: i_coll_ ! @@ -34,7 +36,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! character(1) :: TMP_VAR(1) character(schlen) :: db_name - integer :: i_coll,stat,COLL_chunksize(3) + integer :: i_coll,i_coll_mem,sync_step,stat,COLL_chunksize(3),N(3) logical :: def1,def2,io2,io3,io4,file_sync ! call timing('io_COLLISIONS',OPR='start') @@ -45,7 +47,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) if (present(COLL_element)) i_coll=COLL_element%I if (present(i_coll_)) i_coll=i_coll_ ! - call COLLISIONS_dbname(COLL%kind,db_name) + call COLLISIONS_dbname(COLL_grp%kind,db_name) ! io_COLLISIONS=io_connect(desc=trim(db_name),type=2,ID=ID) ! @@ -60,7 +62,18 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! if (def1) then call def_variable_bulk(ID,'N_COLLISIONS_STATES',1,(/1/),IP_YIO,par_io_kind='independent') - if (write_is_on(ID)) COLL_element%N=(COLL%D(3,2)-COLL%D(3,1)+1)*(COLL%D(2,2)-COLL%D(2,1)+1)*(COLL%D(1,2)-COLL%D(1,1)+1) + if (write_is_on(ID)) then + if (COLLISIONS_CV_only.or.COLLISIONS_FEW_only) then + N(3)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk + N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nc + N(1)=COLL_grp%D(1,4)-COLL_grp%D(1,1)+1 ! Nv + else + N(3)=COLL_grp%D(3,2)-COLL_grp%D(3,1)+1 + N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1)+1 + N(1)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 + endif + COLL_element%N=N(1)*N(2)*N(3)*n_sp_pol + endif endif ! ! Despite all processors write to file (and also define the variable), only the master fills it @@ -71,17 +84,17 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_) ! if (io3.or.def2) then ! - if(COLL%kind==QP_SE_GW_NEQ.or.COLL%kind==QP_SE_GW_QED) then + if(COLL_grp%kind==QP_SE_GW_NEQ.or.COLL_grp%kind==QP_SE_GW_QED) then ! Real collisions if(def2) then COLL_chunksize(1:2)=YAMBO_DEF_CHUNK if (COLL_element%N ! integer, intent(inout) ::ID @@ -54,7 +59,7 @@ integer function io_COLLISIONS_header(ID,COLL) if (COLL%kind==QP_SE_GW_NEQ) SIZE_=SIZE_+3 if (COLL%kind==QP_SE_GW_QED) SIZE_=SIZE_+2 if (ver_is_gt_or_eq(ID,revision=21128)) then - SIZE_ = SIZE_+1 + SIZE_ = SIZE_+2 endif call io_elemental(ID,VAR="PARAMETERS",VAR_SZ=SIZE_,MENU=0) ! @@ -92,6 +97,19 @@ integer function io_COLLISIONS_header(ID,COLL) endif call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) ! + if (variable_exist(ID,'COLLISIONS_FEW_only').or.write_is_on(ID)) then + call def_variable_elemental(ID,VAR="FEW_only_scattering",VAR_SZ=1,VAR_KIND=LP_YIO,MENU=0) + call io_variable_elemental(ID,L0=COLLISIONS_FEW_only,VAR='FEW only scattering ',WARN=.true.,OP=(/"=="/)) + call def_variable_elemental(ID,VAR="COLL_hole_bands",VAR_SZ=2,VAR_KIND=IP_YIO,MENU=0) + call io_variable_elemental(ID,I1=COLL_hole_bands, VAR='COLL bands holes ',WARN=.true.,OP=(/"==","=="/)) + call def_variable_elemental(ID,VAR="COLL_elec_bands",VAR_SZ=2,VAR_KIND=IP_YIO,MENU=0) + call io_variable_elemental(ID,I1=COLL_elec_bands, VAR='COLL bands elecs ',WARN=.true.,OP=(/"==","=="/)) + else + COLLISIONS_FEW_only=.false. + COLL_hole_bands=-1 + COLL_elec_bands=-1 + endif + ! if(COLL%kind==H_SE_HARTREE.or.COLL%kind==H_SE_FOCK.or.COLL%kind==H_SE_SEX.or.COLL%kind>=H_SE_HARTREE) then ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) diff --git a/src/io_parallel/variables_BS.F b/src/io_parallel/variables_BS.F index 648ffe53a7..4cbf404cca 100644 --- a/src/io_parallel/variables_BS.F +++ b/src/io_parallel/variables_BS.F @@ -44,8 +44,8 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) call io_variable_elemental(ID,VAR="[K] Identifier",I0=BS_identifier,DESCRIPTOR=desc) ! if(iq>1) then - call def_variable_elemental(ID,"Q-point",3,SP,0) - call io_variable_elemental(ID,VAR="[K] Q-point",& + call def_variable_elemental(ID,"BS_Q",3,SP,0) + call io_variable_elemental(ID,VAR="[K] BS Q-point",& & R1=BSqpts(:,iq),CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=desc) endif ! @@ -173,8 +173,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) ! endif ! -#if defined _PAR_IO - ! ! Check if BSE kernel is written in triangular form ! if (write_is_on(ID).or.variable_exist(ID,"BSE_KERNEL_IO_MODE")) then @@ -184,8 +182,6 @@ integer function variables_BS(ID,iq,desc,CLOSE_the_menu,X) BSK_IO_mode="2D_standard" endif ! -#endif - ! if (write_is_on(ID).or.variable_exist(ID,"X_kind")) then call def_variable_elemental(ID,"X_kind",1,CR_YIO,0) call io_variable_elemental(ID,VAR="[X] Response Kind",CH0=BSE_L_kind,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=desc) diff --git a/src/io_parallel/variables_BS_more.F b/src/io_parallel/variables_BS_more.F index 137875c598..a39e129727 100644 --- a/src/io_parallel/variables_BS_more.F +++ b/src/io_parallel/variables_BS_more.F @@ -8,7 +8,8 @@ integer function variables_BS_more(ID,mode) ! use pars, ONLY:IP,SP,LP,schlen,LP_YIO - use BS, ONLY:BS_K_cutoff,BS_K_cutoff_done,BS_max_val,l_BSE_kernel_complete + use BS, ONLY:BS_K_cutoff,BS_K_cutoff_done,BS_max_val,l_BSE_kernel_complete,& +& BS_kpt_bz,BS_kpt_ibz use IO_m, ONLY:nf90_sync,io_unit,write_is_on,read_is_on,& & variable_exist,NF90_unlimited,netcdf_dim_size use IO_int, ONLY:def_variable_elemental,io_variable_elemental,& @@ -23,7 +24,7 @@ integer function variables_BS_more(ID,mode) integer :: N_cutoff,stat logical :: io_var real(SP) :: BS_K_cutoff_IO(1) - character(schlen) :: kernel_dim_name(1) + character(schlen) :: kernel_dim_name(1),kpt_dim_names(2) ! variables_BS_more=0 ! @@ -56,6 +57,20 @@ integer function variables_BS_more(ID,mode) endif endif ! + if(write_is_on(ID)) io_var=trim(mode)=="start" + if( read_is_on(ID)) io_var=trim(mode)=="start".and.variable_exist(ID,"BS_K_BZ") + if (io_var) then + kpt_dim_names=[character(schlen) :: "xyz","n_kpt_bz"] + call def_variable_bulk(ID,"BS_K_BZ",2,shape(BS_kpt_bz),SP,kpt_dim_names) + call io_variable_bulk(ID,2,R2=BS_kpt_bz) + endif + if( read_is_on(ID)) io_var=trim(mode)=="start".and.variable_exist(ID,"BS_K_IBZ") + if (io_var) then + kpt_dim_names=[character(schlen) :: "xyz","n_kpt_ibz"] + call def_variable_bulk(ID,"BS_K_IBZ",2,shape(BS_kpt_ibz),SP,kpt_dim_names) + call io_variable_bulk(ID,2,R2=BS_kpt_ibz) + endif + ! if(write_is_on(ID)) stat = nf90_sync(io_unit(ID)) ! variables_BS_more=io_status(ID) diff --git a/src/io_serial/.objects b/src/io_serial/.objects index a43913ec15..6b18a8d628 100644 --- a/src/io_serial/.objects +++ b/src/io_serial/.objects @@ -1,4 +1,5 @@ +COLL_objects = #if defined _SC || _RT || _QED -COLL_objects = io_COLLISIONS.o +COLL_objects = io_COLLISIONS.o #endif objs = io_BS.o io_DIPOLES.o variables_BS.o io_Overlaps.o $(COLL_objects) diff --git a/src/linear_algebra/.objects b/src/linear_algebra/.objects index a3c9bfe4bc..ce3436cd7f 100644 --- a/src/linear_algebra/.objects +++ b/src/linear_algebra/.objects @@ -9,5 +9,5 @@ SLEPC_objs = MATRIX_slepc.o #if defined _GPU && defined _PGI GPU_objs = SERIAL_lin_system_gpu.o #endif -objs = LINEAR_ALGEBRA_driver.o SERIAL_SVD_inversion.o SERIAL_inversion.o SERIAL_diagonalization.o \ +objs = LINEAR_ALGEBRA_driver.o SERIAL_SVD.o SERIAL_inversion.o SERIAL_diagonalization.o \ SERIAL_HERMITIAN_diagonalization.o SERIAL_lin_system.o $(SLK_objs) $(SLEPC_objs) $(GPU_objs) diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index f78870ff16..76cd590fbd 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -205,9 +205,9 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& ! if (idriver==SVD_INV) then if (present(M_slk)) then - call SERIAL_SVD_inversion(N,M_slk%blc(:,:,M_slk%I),SVD_digits) + call SERIAL_SVD(N,M_slk%blc(:,:,M_slk%I),'inv',SVD_digits) else - call SERIAL_SVD_inversion(N,M,SVD_digits) + call SERIAL_SVD(N,M,'inv',SVD_digits) endif endif ! diff --git a/src/linear_algebra/SERIAL_SVD_inversion.F b/src/linear_algebra/SERIAL_SVD.F similarity index 56% rename from src/linear_algebra/SERIAL_SVD_inversion.F rename to src/linear_algebra/SERIAL_SVD.F index fb95c78e95..43bcf04d89 100644 --- a/src/linear_algebra/SERIAL_SVD_inversion.F +++ b/src/linear_algebra/SERIAL_SVD.F @@ -5,25 +5,26 @@ ! ! Authors (see AUTHORS file for details): AM ! -subroutine SERIAL_SVD_inversion(n,M,SVD_digits) +subroutine SERIAL_SVD(n,M,mode,SVD_digits) ! - use pars, ONLY:SP,cZERO + use pars, ONLY:SP,cZERO,cONE use wrapper, ONLY:M_by_M use linear_algebra, ONLY:LINEAR_ALGEBRA_error,la_xgesvd,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing #include ! - integer :: n - complex(SP) :: M(n,n) - integer :: SVD_digits + integer, intent(in) :: n + complex(SP), intent(inout) :: M(n,n) + character(3),intent(in) :: mode + integer, intent(in) :: SVD_digits ! !ws integer :: i_loop real(SP) :: SV_min type(LALGEBRA_WS) :: WS ! - call timing('SERIAL_SVD_inversion',OPR='start') + call timing('SERIAL_SVD',OPR='start') ! YAMBO_ALLOC(WS%v_real,(5*n)) YAMBO_ALLOC(WS%vp_real,(n)) @@ -45,20 +46,33 @@ subroutine SERIAL_SVD_inversion(n,M,SVD_digits) ! if(WS%i_fail/=0) call LINEAR_ALGEBRA_error('GESVD (SVD)','failed') ! - SV_min=10._SP**(-SVD_digits) - ! - do i_loop=1,n - if (abs(WS%vp_real(i_loop)) no coupling = 2 BSE matrices (K_r,R(q) and K_r,A^*(q)) --> BS_res_ares_n_mat=2 - ! --> coupling = 1 BSE matrix with all 4 blocks in (1) --> BS_res_ares_n_mat=1 + ! --> no coupling = 2 BSE matrices (K_R(q) and K_A^*(q)) --> BS_res_ares_n_mat=2 + ! --> coupling = 1 BSE matrix with all 4 blocks in (1) --> BS_res_ares_n_mat=1 ! ! Summary !========= @@ -235,10 +249,16 @@ module BS ! Matrix Block !-------------- complex(SP), allocatable :: mat(:,:) - character, allocatable :: done(:,:) - integer, allocatable :: table(:,:) + character, allocatable :: done(:,:) + integer, allocatable :: table(:,:) real(SP), allocatable :: E(:) ! + ! For collisions only + !-------------------- + integer :: zise(2) ! dual of %size + integer :: poordinate(2) ! dual of %coordinate + complex(SP), allocatable :: tam(:,:) ! dual of %mat + ! ! Oscillators... ! ! ... correlation diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 81b298430c..2089b5fc90 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -137,6 +137,7 @@ module BS_solvers ! Solvers (Temporary (LARGE) arrays to be used in solvers ONLY) !========= integer , allocatable :: BSS_eh_table(:,:) + integer , allocatable :: BSS_eh_table_m1(:,:,:,:,:) real(SP) , allocatable :: BSS_eh_E(:) real(SP) , allocatable :: BSS_eh_f(:) real(SP) , allocatable :: BSS_eh_W(:) diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index fa94f55380..aaab940ae1 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -23,6 +23,7 @@ module DIPOLES ! character(schlen) :: shifted_grids_obs="" character(schlen) :: covariant_obs ="" + character(schlen) :: der_k_obs ="" character(schlen) :: g_space_obs ="" character(schlen) :: x_space_obs ="" character(schlen) :: specific_obs ="" @@ -31,6 +32,7 @@ module DIPOLES ! integer :: num_shifted_grids logical :: eval_OVERLAPS + logical :: l_force_SndOrd ! ! Descriptor ! @@ -63,8 +65,8 @@ module DIPOLES integer :: ng real(SP) :: ehe(2) real(SP) :: q0(3) - real(SP) :: Energy_treshold - real(SP) :: Energy_treshold_vv + real(SP) :: Energy_threshold + real(SP) :: Energy_threshold_vv logical :: v_eff logical :: Vnl_included logical :: bands_ordered @@ -91,8 +93,8 @@ subroutine DIPOLES_duplicate(Dip_in,Dip_out) Dip_out%ng = Dip_in%ng Dip_out%ehe = Dip_in%ehe Dip_out%q0 = Dip_in%q0 - Dip_out%Energy_treshold = Dip_in%Energy_treshold - Dip_out%Energy_treshold_vv = Dip_in%Energy_treshold_vv + Dip_out%Energy_threshold = Dip_in%Energy_threshold + Dip_out%Energy_threshold_vv = Dip_in%Energy_threshold_vv Dip_out%v_eff = Dip_in%v_eff Dip_out%Vnl_included = Dip_in%Vnl_included Dip_out%bands_ordered = Dip_in%bands_ordered @@ -111,8 +113,8 @@ subroutine DIPOLES_reset(Dip) Dip%ng=0 Dip%ehe=(/-1._SP,-1._SP/)/HA2EV Dip%q0=(/1._SP,0._SP,0._SP/) - Dip%Energy_treshold=1.E-5_SP/HA2EV - Dip%Energy_treshold_vv=1.E+5_SP/HA2EV + Dip%Energy_threshold=1.E-5_SP/HA2EV + Dip%Energy_threshold_vv=1.E+5_SP/HA2EV Dip%v_eff=.false. Dip%Vnl_included=.false. Dip%bands_ordered=.true. diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 1f7a81845f..98faa6890c 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -115,6 +115,7 @@ module ELPH logical :: l_GKKP_hosts_bare_dV=.FALSE. logical :: l_GKKP_DB_exists=.FALSE. logical :: l_GKKP_expanded_DB_exists=.FALSE. + logical :: l_GKKP_DW=.TRUE. character(schlen) :: gkkp_db ! Database type for el-ph calculation (gkkp | expanded | genFroh ) ! contains diff --git a/src/modules/mod_IO.F b/src/modules/mod_IO.F index a711fd0675..38cad3c48c 100644 --- a/src/modules/mod_IO.F +++ b/src/modules/mod_IO.F @@ -38,6 +38,7 @@ module IO_m logical :: io_OBSERVABLES logical :: io_CARRIERs logical :: io_GF + logical :: io_V_bands logical :: io_SC logical :: io_BS_K logical :: io_SCREEN @@ -452,12 +453,12 @@ subroutine netcdf_call(status,ID,VAR,ID_VAR) integer function netcdf_dim_size(ID,DIMNAME) ! Returns the value of the specified dim of a variable integer, intent(in) :: ID - character(*), intent(inout) :: DIMNAME + character(*), intent(in) :: DIMNAME integer :: nf90_err,NF90_DIM_ID netcdf_dim_size=0 nf90_err=nf90_inq_dimid(io_unit(ID),DIMNAME,NF90_DIM_ID) if(nf90_err/=NF90_NOERR) return - nf90_err=nf90_inquire_dimension(io_unit(ID),NF90_DIM_ID, name = dimname, len = netcdf_dim_size) + nf90_err=nf90_inquire_dimension(io_unit(ID),NF90_DIM_ID, len = netcdf_dim_size) end function ! integer function netcdf_dim(ID,DIM,dim_name) diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index b59bc48756..fdbd7e488d 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -19,7 +19,7 @@ module RT_control integer :: CACHE_OBS_steps integer :: CACHE_OBS_steps_now ! - integer,parameter :: N_RT_databases=11 + integer,parameter :: N_RT_databases=13 integer :: RT_DB_ID(N_RT_databases)= 0 integer :: RT_current_DB_identifier ! \in [1,...] pointing to the DB under I/O character(lchlen) :: RT_DB_file_name(N_RT_databases) = " " @@ -29,12 +29,14 @@ module RT_control "none ",& "OBSERVABLES ",& "G_lesser_RESTART ",& - "G_lesser ",& + "G_lesser_RESTART_K_section",& "carriers ",& "THETA ",& "REFERENCE ",& - "G_lesser_RESTART_K_section",& - "G_lesser_K_section "/) + "G_lesser ",& + "G_lesser_K_section ",& + "V_bands ",& + "V_bands_K_section "/) integer :: NE_i_start_time = 1 ! restart point integer :: last_it_evaluated = 0 ! When RT_dynamics_jumps are non zero this is ! ! the last evaluated point @@ -59,9 +61,11 @@ module RT_control type(RT_IO_t),save :: OUTPUT_RT_IO_t type(RT_IO_t),save :: Gless_RESTART_RT_IO_t type(RT_IO_t),save :: Gless_RT_IO_t + type(RT_IO_t),save :: Vbands_RT_IO_t ! ! G_lesser I/O logical :: SAVE_G_history + logical :: SAVE_Vb_history ! ! J, P and M (spin) cache ! @@ -77,6 +81,7 @@ module RT_control logical :: NEQ_Residuals=.FALSE. logical :: EQ_Transitions=.TRUE. logical :: EQ_NoOcc=.FALSE. + logical :: ALL_NoOcc=.FALSE. integer, parameter :: N_RT_ctl_controls=3 character(schlen) :: RT_BSE_Occ_Mode="K" character(schlen) :: RT_ctl_db(N_RT_ctl_controls) @@ -132,12 +137,14 @@ integer function RT_return_db_ID(what) if (what=="M") RT_return_db_ID=4 if (what=="OBSERVABLES") RT_return_db_ID=4 if (what=="G_lesser_RESTART") RT_return_db_ID=5 - if (what=="G_lesser") RT_return_db_ID=6 + if (what=="G_lesser_RESTART_K_section") RT_return_db_ID=6 if (what=="carriers") RT_return_db_ID=7 if (what=="THETA") RT_return_db_ID=8 if (what=="REFERENCE") RT_return_db_ID=9 - if (what=="G_lesser_RESTART_K_section") RT_return_db_ID=10 + if (what=="G_lesser") RT_return_db_ID=10 if (what=="G_lesser_K_section") RT_return_db_ID=11 + if (what=="V_bands") RT_return_db_ID=12 + if (what=="V_bands_K_section") RT_return_db_ID=13 end function ! logical function RT_do_IO(what) @@ -156,19 +163,23 @@ logical function RT_do_IO(what) if (what=="REFERENCE".and.RT_current_DB_identifier==9) RT_do_IO=.TRUE. ! if (what=="DYN_VARS".and.(RT_current_DB_identifier>=4.and.RT_current_DB_identifier<=8)) RT_do_IO=.TRUE. - if (what=="DYN_VARS".and.(RT_current_DB_identifier==10.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. + if (what=="DYN_VARS".and.(RT_current_DB_identifier>=10) ) RT_do_IO=.TRUE. if (what=="K_SECTION".and.(RT_current_DB_identifier==5.or.RT_current_DB_identifier==6& -& .or.RT_current_DB_identifier==8.or.RT_current_DB_identifier==10& -& .or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. +& .or.RT_current_DB_identifier==8.or.RT_current_DB_identifier>=10)) RT_do_IO=.TRUE. ! if (what=="ANY_G".and.(RT_current_DB_identifier==5.or.RT_current_DB_identifier==6)) RT_do_IO=.TRUE. if (what=="ANY_G".and.(RT_current_DB_identifier==10.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. - if (what=="ANY_K_section".and.(RT_current_DB_identifier==10.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. + if (what=="ANY_K_section".and.(RT_current_DB_identifier==6.or.RT_current_DB_identifier==11)) RT_do_IO=.TRUE. if (what=="G_lesser_RESTART".and.RT_current_DB_identifier==5) RT_do_IO=.TRUE. - if (what=="G_lesser".and. RT_current_DB_identifier==6) RT_do_IO=.TRUE. - if (what=="G_lesser_RESTART_K_section".and.RT_current_DB_identifier==10) RT_do_IO=.TRUE. + if (what=="G_lesser_RESTART_K_section".and.RT_current_DB_identifier==6) RT_do_IO=.TRUE. + if (what=="G_lesser".and. RT_current_DB_identifier==10) RT_do_IO=.TRUE. if (what=="G_lesser_K_section".and. RT_current_DB_identifier==11) RT_do_IO=.TRUE. ! + if (what=="ANY_Vb".and.(RT_current_DB_identifier==12.or.RT_current_DB_identifier==13)) RT_do_IO=.TRUE. + if (what=="ANY_K_section".and. RT_current_DB_identifier==13) RT_do_IO=.TRUE. + if (what=="V_bands".and. RT_current_DB_identifier==12) RT_do_IO=.TRUE. + if (what=="V_bands_K_section".and. RT_current_DB_identifier==13) RT_do_IO=.TRUE. + ! end function ! subroutine RT_define_the_IO_DB_identifier(what) @@ -178,12 +189,14 @@ subroutine RT_define_the_IO_DB_identifier(what) (what=="M" .or.what=="OBSERVABLES") .or. & (what=="D" .or.what=="OBSERVABLES") ) RT_current_DB_identifier=4 if (what=="G_lesser_RESTART") RT_current_DB_identifier=5 - if (what=="G_lesser") RT_current_DB_identifier=6 + if (what=="G_lesser_RESTART_K_section") RT_current_DB_identifier=6 if (what=="carriers") RT_current_DB_identifier=7 if (what=="THETA") RT_current_DB_identifier=8 if (what=="REFERENCE") RT_current_DB_identifier=9 - if (what=="G_lesser_RESTART_K_section") RT_current_DB_identifier=10 + if (what=="G_lesser") RT_current_DB_identifier=10 if (what=="G_lesser_K_section") RT_current_DB_identifier=11 + if (what=="V_bands") RT_current_DB_identifier=12 + if (what=="V_bands_K_section") RT_current_DB_identifier=13 end subroutine ! subroutine RT_control_alloc(what) @@ -231,6 +244,9 @@ subroutine RT_control_alloc(what) Gless_RT_IO_t%Time=rZERO endif ! + YAMBO_ALLOC(Vbands_RT_IO_t%Time,(NE_steps)) + Vbands_RT_IO_t%Time=rZERO + ! endif ! end subroutine RT_control_alloc @@ -250,6 +266,7 @@ subroutine RT_control_free(what) YAMBO_FREE(OBS_RT_IO_t%Time) YAMBO_FREE(CARR_RT_IO_t%Time) YAMBO_FREE(Gless_RESTART_RT_IO_t%Time) + YAMBO_FREE(Vbands_RT_IO_t%Time) endif ! end subroutine RT_control_free diff --git a/src/modules/mod_RT_occupations.F b/src/modules/mod_RT_occupations.F index 42b08c54fd..00d13bdf51 100644 --- a/src/modules/mod_RT_occupations.F +++ b/src/modules/mod_RT_occupations.F @@ -8,6 +8,7 @@ module RT_occupations ! use pars, ONLY:SP,rZERO,schlen + use electrons, ONLY:n_sp_pol use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elphoton_scatt,& & l_phel_scatt,l_phel_corr ! @@ -18,9 +19,9 @@ module RT_occupations logical :: active integer :: D1(2) integer :: D2 - real(SP), allocatable :: N(:,:) - real(SP), allocatable :: N_ref(:,:) - real(SP), allocatable :: dN(:,:) + real(SP), allocatable :: N(:,:,:) + real(SP), allocatable :: N_ref(:,:,:) + real(SP), allocatable :: dN(:,:,:) end type RT_occupation ! type(RT_occupation) :: RT_el_occ,RT_ho_occ,RT_ph_occ,RT_life_occ @@ -84,12 +85,12 @@ subroutine RT_occupation_alloc(KIND,OCC,D1,D2) OCC%D1=D1 OCC%D2=D2 if (KIND=="electrons".or.KIND=="life") then - YAMBO_ALLOC(OCC%dN,(D1(1):D1(2),D2)) + YAMBO_ALLOC(OCC%dN,(D1(1):D1(2),D2,n_sp_pol)) OCC%dN=rZERO endif if (KIND=="electrons".or.KIND=="holes".or.KIND=="phonons") then - YAMBO_ALLOC(OCC%N,(D1(1):D1(2),D2)) - YAMBO_ALLOC(OCC%N_ref,(D1(1):D1(2),D2)) + YAMBO_ALLOC(OCC%N,(D1(1):D1(2),D2,n_sp_pol)) + YAMBO_ALLOC(OCC%N_ref,(D1(1):D1(2),D2,n_sp_pol)) OCC%N=rZERO OCC%N_ref=rZERO endif diff --git a/src/modules/mod_collision_el.F b/src/modules/mod_collision_el.F index efc94a800e..b5203686ac 100644 --- a/src/modules/mod_collision_el.F +++ b/src/modules/mod_collision_el.F @@ -155,6 +155,7 @@ subroutine elemental_collision_alloc(ggw,NG,GAMP_NG,GAMP_ROWS,GAMP_COLS,& ! endif ggw%ngrho=NG + ggw%iqref=0 endif ! ! GAMP diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index 4acae16c12..bfb81471c0 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -17,8 +17,9 @@ module collision_ext implicit none ! integer :: COLL_bands(2) + integer :: COLL_hole_bands(2) + integer :: COLL_elec_bands(2) integer :: COLL_ID - integer :: LAST_COLL_sync = 0 integer :: PAR_COLL_min = 0 ! ! Cut off on exchange matrix elements @@ -33,6 +34,8 @@ module collision_ext logical :: COLLISIONS_HXC_MB=.FALSE. logical :: COLLISIONS_HXC_use_TDDFT=.FALSE. logical :: COLLISIONS_CV_only=.FALSE. + logical :: COLLISIONS_FEW_only=.FALSE. + logical :: COLLISIONS_from_BSE=.FALSE. logical :: COLLISIONS_load_SP=.FALSE. ! Force loading of collision in single precision logical :: COLLISIONS_compr =.FALSE. ! If parallel-io is used collisions in memory are compressed ! @@ -51,16 +54,16 @@ module collision_ext type COLLISIONS_element integer :: I=0 ! State Index integer :: N=0 ! Linear Dimension - character, allocatable :: table(:,:,:) + character, allocatable :: table(:,:,:,:) complex(SP), allocatable :: v_c(:) complex(SP6), allocatable :: v_c_SP(:) ! SEX and HF only in single precision - complex(SP), allocatable :: v3_c(:,:,:) + complex(SP), allocatable :: v3_c(:,:,:,:) real(SP) , allocatable :: v_r(:) ! GW NEQ collisions - real(SP) , allocatable :: v3_r(:,:,:) + real(SP) , allocatable :: v3_r(:,:,:,:) end type ! type COLLISIONS_group - integer :: D(3,2)=0 ! Dimension (v3 of corresponding COLLISIONS_element) + integer :: D(3,4)=0 ! Dimension (v3 of corresponding COLLISIONS_element) character(schlen) :: name="none" integer :: kind=0 integer :: N=0 ! # of collisions (dimension of linked COLLISIONS_element) @@ -96,8 +99,8 @@ module collision_ext ! ==================================== integer :: ng_oscll ! number of G-vectors in the Oscillators complex(SP), allocatable :: W(:,:,:) ! screened interaction - complex(SP), allocatable :: OSCLL(:,:,:,:,:) ! Oscillators - complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in k, just for the evaluation + complex(SP), allocatable :: OSCLL(:,:,:,:,:,:) ! Oscillators + complex(SP), allocatable :: OSCLL_k(:,:,:,:) ! Oscillators in (i_sp_pol,ik), just for the evaluation ! contains ! diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index c55d4837e0..4495f858a6 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2006 The Yambo Team ! -! Authors (see AUTHORS file for details): AM, CA +! Authors (see AUTHORS file for details): AM CA DS ! ! External fields: ! @@ -22,8 +22,8 @@ ! module fields ! - use pars, ONLY:SP,DP,schlen,lchlen,pi,n_ext_fields_max - use stderr,ONLY:STRING_split + use pars, ONLY:SP,DP,schlen,lchlen,pi, & +& n_ext_fields_max,n_fields_defs_max use units, ONLY:FS2AUT ! implicit none @@ -41,6 +41,7 @@ module fields integer :: n_frequencies real(SP) :: frequency(2) real(SP) :: width + real(SP) :: chirp real(SP) :: FWHM real(SP) :: fluence real(SP) :: pi_kind @@ -54,6 +55,10 @@ module fields integer :: n_ext_fields =0 type(ext_field), save :: Efield(n_ext_fields_max) ! + real(SP), allocatable :: field_from_file(:,:,:) + character(schlen) :: field_from_file_fname(n_ext_fields_max) + integer :: field_from_file_steps + ! ! Vector potential ! type gauge_field @@ -72,17 +77,23 @@ module fields contains ! logical function field_is_ok(E_field) - use stderr, ONLY:STRING_same - type(ext_field) ::E_field - field_is_ok= any((/ STRING_same(E_field%ef_name,'SIN') ,& -& STRING_same(E_field%ef_name,'SOFTSIN') ,& -& STRING_same(E_field%ef_name,'DELTA') ,& -& STRING_same(E_field%ef_name,'GAUSS') ,& -& STRING_same(E_field%ef_name,'THETA') ,& -& STRING_same(E_field%ef_name,'PULSE') ,& -& STRING_same(E_field%ef_name,'QSSIN') ,& -& STRING_same(E_field%ef_name,'SPULSE'),& -& STRING_same(E_field%ef_name,'QSFIELD') /)) .and. & + use stderr, ONLY:STRING_same,STRING_split + type(ext_field), intent(in) :: E_field + character(schlen) :: ef_name(n_fields_defs_max) + call STRING_split(E_field%ef_name,ef_name) + field_is_ok= any((/ STRING_same(ef_name(1),'SIN') ,& +& STRING_same(ef_name(1),'SOFTSIN') ,& +& STRING_same(ef_name(1),'DELTA') ,& +& STRING_same(ef_name(1),'RECT') ,& +& STRING_same(ef_name(1),'RECTSIN'),& +& STRING_same(ef_name(1),'GAUSS') ,& +& STRING_same(ef_name(1),'THETA') ,& +& STRING_same(ef_name(1),'PULSE') ,& +& STRING_same(ef_name(1),'QSSIN') ,& +& STRING_same(ef_name(1),'SPULSE'),& +& STRING_same(ef_name(1),'PHHG') ,& +& STRING_same(ef_name(1),'QSFIELD'),& +& STRING_same(ef_name(1),'FROM_FILE') /)) .and. & & any((/ STRING_same(E_field%ef_pol,'linear') ,& & STRING_same(E_field%ef_pol,'circular') /)) end function @@ -99,269 +110,21 @@ real(SP) function field_frequency(E_field,i_f) integer ::i_f type(ext_field) ::E_field field_frequency=E_field%frequency(1) - if (i_f>1.and.E_field%n_frequencies>1) field_frequency=E_field%frequency(1)+& + if (i_f<=1.or.E_field%n_frequencies<=1) return + field_frequency=E_field%frequency(1)+& & (E_field%frequency(2)-E_field%frequency(1))/(E_field%n_frequencies-1)*(i_f-1) end function ! - function small_a(T,E_field,order,envelop_only) - ! - ! The vector potential is generally written as - ! - ! order=0 A (t)=-cEo a (t) theta(t) - ! order=1 A'(t)=-cEo (a'(t) theta(t)+a (t) delta(t)) - ! order=2 A"(t)=-cEo (a"(t) theta(t)+a'(t) delta(t)-a(t) sign(t)) - ! - ! the functions theta,delta and sign can be the standard distributions - ! or more fancy functions that can mimic the distributions. - ! - ! Note that A is evolved using A''(t) starting from A(0) and A'(0). - ! - use X_m, ONLY:global_gauge - use pars, ONLY:cI,cONE,cZERO,pi,schlen - use wrapper, ONLY:FADEVA - ! - type(ext_field), intent(inout) ::E_field - ! - real(SP), intent(in) ::T - integer, intent(in) ::order - logical, intent(in), optional :: envelop_only - ! - ! Workspace - ! - real(SP) ::damp_func,a,b,c,sarg,WT,Tl - complex(SP), dimension(2) :: small_a - ! - integer ::i_fr,i_field,n_fields - real(SP) ::T_0,W_0,sigma,WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt - complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z - character(schlen) ::field_defs(3) - logical ::envelop_only_ - ! - ! Zeroing - ! - small_a=cZERO - f_t=cZERO - damp_func=1._SP - ! - envelop_only_=.false. - if(present(envelop_only)) envelop_only_=envelop_only - ! - if(trim(E_field%ef_pol)=="linear" ) n_fields=1 - if(trim(E_field%ef_pol)=="circular") n_fields=2 - ! - ! Field parameters - ! - sigma=E_field%width - fr_shift(1)=0._SP - fr_shift(2)=pi/2._SP - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - select case( trim(field_defs(1)) ) - case('STATIC','SIN','ANTIRES','RES','DELTA') - ! Fields which do not need T_0 - W_0=0._SP - T_0=0._SP - damp_func=1._SP - ! DEBUG < - ! damping for sin - !if (sigma>0._SP) then - ! T_0=5*sigma - ! damp_func=1._SP - ! if (TNE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) - !endif - ! DEBUG > - case('SOFTSIN','THETA') - ! Fields which do not need T_0 and with damp_func - W_0=0._SP - T_0=0._SP - a = 3._SP/sigma**4 - b = -8._SP/sigma**3 - c = 6._SP/sigma**2 - damp_func=1._SP - if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) - case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') - ! Fields which need T_0 - W_0=field_frequency(E_field,1) - T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) - if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0=2._SP*sigma - if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0=3._SP*sigma - if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0=4._SP*sigma - if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0=5._SP*sigma - end select - ! - E_field%To=T_0 - ! - do i_field=1,n_fields - do i_fr=1,max(1,E_field%n_frequencies) - ! - W_field=field_frequency(E_field,i_fr) - W_field_m1=1._SP/W_field - WtimesT=W_field*(T-T_0)+fr_shift(i_field) - ! - if (envelop_only_) then - f0t=cONE ; f1t=cONE - else - cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt - f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) - if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif - if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif - endif - ! - EXPf=exp(-(T-T_0)**2/(2._SP*sigma**2) ) - ! - select case( trim(field_defs(1)) ) - case('STATIC') - if (order==0 ) f_now=T - if (order==1 ) f_now=1._SP - if (order==2 ) f_now=0._SP - ! - case('SIN') - if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now=+damp_func* f1t - if (order==2 ) f_now=+damp_func* f0t *W_field - ! - case('SOFTSIN') - if (order==-1) f_now=-2 - if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order== 1) f_now=+damp_func* f1t - if (order== 2) f_now=+damp_func* f0t *W_field - ! - case('THETA') - if (order==0 ) f_now=damp_func*T - if (order==1 ) f_now=damp_func - if (order==2 ) f_now=0._SP - ! - case('DELTA') - if (order==0 ) f_now=1._SP - if (order> 0 ) f_now=0._SP - if (order==-1) f_now=1._SP - ! - case('PHHG') - sarg=pi*(T-T_0)/sigma - WT =W_field*T - if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then - f_now=0.0 - elseif(T-T_0>=sigma.and.order==0) then - Tl=sigma+T_0 - WT =W_field*Tl - f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & -& -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - else - if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & -& -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - if (order==1 ) f_now=sin(sarg)**2*cos(WT) - if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 - endif - ! - case('GAUSS') - if (order==0 ) f_now= sigma*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma*sqrt(2._SP)) )+1._SP ) - if (order==1 ) f_now= Expf - if (order==2 ) f_now=-Expf*(T-T_0)/sigma**2 - ! - case('QSSIN') - ! - ! W =FADEVA function - ! W(-z)=exp(-z^2)*(1- erf (i*z)) - ! =exp(-z^2)*(1-i*erfi( z )) - ! - ! ERFI(z)=i*(exp(z^2)*W(-z)-1) - ! - cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) - cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) - ! - if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & -& cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & -& (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) - if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO - ! - if (order==0 ) f_now= erfi_z - if (order==1 ) f_now= f1t *EXPf - if (order==2 ) f_now=(W_field*f0t-(T-T_0)*f1t/sigma**2)*EXPf - ! - case('QSFIELD') - ! - if (order==0 ) f_now= f1t *EXPf - if (order==1 ) f_now=( W_field*f0t-(T-T_0)*f1t/sigma**2)*EXPf - if (order==2 ) f_now=(-W_field*f1t-f1t/sigma**2 & - & -W_field*(T-T_0)*f1t/sigma**2 & - & -(T-T_0)*(W_field*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf - f_now=f_now/W_field - ! - case('PULSE') - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now= 0._SP - if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t - if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & -& -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t - endif - ! - case('SPULSE') - T_0=sigma - W_0=W_field - f_now=cZERO - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & -& +f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & -& W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & -& ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & -& +f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & -& W_0**2*sigma**2+24))/W_0**5/sigma**4) - if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t - if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & -& +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & -& - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t - endif - end select - ! - f_t(i_field)=f_t(i_field)+f_now - ! - enddo + integer function get_field_file_index(filename) + character(*) ::filename + integer ::i1 + get_field_file_index=-1 + do i1=1,n_ext_fields_max + if ( trim(filename)/=trim(field_from_file_fname(i1)) ) cycle + get_field_file_index=i1 + return enddo - ! - small_a=f_t - ! - end function small_a - ! - complex(SP) function small_a_frequency(W_i,E_field,iErr) - ! - use pars, ONLY:cZERO,cI,pi,schlen - type(ext_field) ::E_field - complex(SP) ::W_i - integer ::iErr - ! - integer ::i_f - real(SP) ::W_0 - complex(SP) ::local_a(2) - character(schlen) ::field_defs(3) - ! - iErr=-1 - local_a=cZERO - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - do i_f=1,E_field%n_frequencies - W_0=field_frequency(E_field,i_f) - select case( trim(field_defs(1)) ) - case('SIN') - iErr=0 - local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES - local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES - case('DELTA') - iErr=0 - local_a=1._SP/2._SP - end select - enddo - ! - if(trim(field_defs(2))== 'RES') local_a(2)=0._SP - if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP - ! - small_a_frequency=local_a(1)+local_a(2) - ! - end function small_a_frequency + end function ! subroutine Efield_duplicate(E1,E2) type(ext_field) :: E1,E2 @@ -373,6 +136,7 @@ subroutine Efield_duplicate(E1,E2) E2%n_frequencies=E1%n_frequencies E2%W_step=E1%W_step E2%width=E1%width + E2%chirp=E1%chirp E2%FWHM=E1%FWHM E2%amplitude=E1%amplitude E2%intensity=E1%intensity @@ -398,6 +162,7 @@ subroutine Efield_reset(E) E%fluence =0._SP E%pi_kind =0._SP E%width =0._SP + E%chirp =0._SP E%ef_name ='none' E%ef_pol ='none' E%versor =(/1._SP,0._SP,0._SP/) @@ -431,12 +196,13 @@ end subroutine compute_envelop complex(SP) function Divide_by_Field(Field,order) ! use pars, ONLY: cI,cONE,pi,schlen + use stderr,ONLY:STRING_split type(ext_field):: Field integer :: order ! work space complex(SP) :: E_w real(SP) :: T_0, sigma, W_0, T - character(schlen) ::field_defs(3) + character(schlen) ::field_defs(n_fields_defs_max) ! call STRING_split(trim(Field%ef_name),field_defs) ! @@ -532,4 +298,41 @@ real(SP) function Efield_strength(Intensity,unit_system) ! end function ! -end module +end module fields +! +! +module fields_int + ! + interface + ! + function small_a(T,dt,E_field,order,envelop_only) + ! + use pars, ONLY:SP + use fields, ONLY:ext_field + ! + type(ext_field), intent(inout) ::E_field + ! + real(SP), intent(in) ::T,dt + integer, intent(in) ::order + logical, intent(in), optional :: envelop_only + ! + complex(SP), dimension(2) :: small_a + ! + end function small_a + ! + function small_a_frequency(W_i,E_field,iErr) + ! + use pars, ONLY:SP + use fields, ONLY:ext_field + ! + type(ext_field) ::E_field + complex(SP) ::W_i + integer ::iErr + ! + complex(SP) :: small_a_frequency + ! + end function small_a_frequency + ! + end interface + ! +end module fields_int diff --git a/src/modules/mod_hamiltonian.F b/src/modules/mod_hamiltonian.F index 03b5a8b436..c7059a37f6 100644 --- a/src/modules/mod_hamiltonian.F +++ b/src/modules/mod_hamiltonian.F @@ -13,6 +13,8 @@ module hamiltonian #include ! integer :: H_ref_bands(2) + integer :: H_ref_hole_bands(2) + integer :: H_ref_elec_bands(2) integer :: H_ref_nbands ! character(schlen) :: H_potential @@ -57,9 +59,19 @@ module hamiltonian integer function B_mat_index(ib1,ib2,nb) integer :: ib1,ib2,nb(2) ! + ! This is identical to + ! B_mat_index = matrix_index(ib1-nb(1)+1,ib2-nb(1)+1,nb(2)-nb(1)+1) B_mat_index=(ib1-nb(1))*(nb(2)-nb(1)+1)+ib2-nb(1)+1 ! - end function + end function B_mat_index + ! + integer function B_mat_index_cv(ib1,ib2,nb1,nb2) + integer :: ib1,ib2,nb1(2),nb2(2) + ! + B_mat_index_cv=(ib1-nb1(1))*(nb2(2)-nb2(1)+1)+ib2-nb2(1)+1 + ! + end function B_mat_index_cv + ! ! subroutine H_QP_table_setup(E) use drivers, ONLY:l_use_collisions diff --git a/src/modules/mod_matrix_operate.F b/src/modules/mod_matrix_operate.F index e537d440b5..b09fd974cc 100644 --- a/src/modules/mod_matrix_operate.F +++ b/src/modules/mod_matrix_operate.F @@ -28,15 +28,15 @@ integer function UP_matrix_index(i1,i2) ! ! Note that: ! - ! UP_matrix_index(1,1)=2 - ! UP_matrix_index(2,2)=3 - ! UP_matrix_index(1,2)=4 - ! UP_matrix_index(3,3)=5 - ! UP_matrix_index(2,3)=6 - ! UP_matrix_index(1,3)=7 + ! UP_matrix_index(1,1)=1 + ! UP_matrix_index(2,2)=2 + ! UP_matrix_index(1,2)=3 + ! UP_matrix_index(3,3)=4 + ! UP_matrix_index(2,3)=5 + ! UP_matrix_index(1,3)=6 ! integer :: i1,i2 - UP_matrix_index=(i2**2+i2)/2-i1+2 + UP_matrix_index=i2*(i2+1)/2-i1+1 ! end function ! diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index adb3e99839..190001e814 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -10,8 +10,7 @@ module nl_optics use descriptors, ONLY:IO_desc use pars, ONLY:SP,schlen,lchlen use electrons, ONLY:levels - use real_time, ONLY:NE_steps - use R_lattice, ONLY:bz_samp + use real_time, ONLY:NE_steps,dG_lesser ! #include ! @@ -55,16 +54,13 @@ module nl_optics ! WFs and Density ! ! Bands in terms of Kohn-Sham orbitals - complex(SP), allocatable :: V_bands(:,:,:,:) ! time-dependent valence bands + complex(SP), allocatable, target :: V_bands(:,:,:,:) ! time-dependent valence bands ! ! Time-dependent Valence bands in real-space complex(SP), allocatable :: VAL_BANDS(:,:,:,:) ! real(SP), allocatable :: full_rho(:) ! density of all bands from 1:SC_bands(2) ! - ! Density matrix - complex(SP), allocatable :: dG(:,:,:) - ! ! Sigma sex at equilibrium (for oscillators) complex(SP), allocatable :: Sigma_SEX_EQ(:,:,:,:) ! @@ -116,6 +112,8 @@ module nl_optics real(SP) :: NL_estep real(SP) :: NL_ang_step integer :: NL_bands(2) + integer :: NL_elec_bands(2) + integer :: NL_hole_bands(2) integer :: NL_nbands integer :: n_angles real(SP) :: max_angle @@ -193,14 +191,14 @@ subroutine NL_alloc(en) ! if(Correlation==TDDFT.or.Correlation==JGM) then YAMBO_ALLOC(V_xc_0,(fft_size,n_spin)) - endif + endif ! if(l_use_Hxc_collisions) then YAMBO_ALLOC(RT_Vnl_xc,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol)) endif ! if(eval_dG) then - YAMBO_ALLOC(dG,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk)) + YAMBO_ALLOC(dG_lesser,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol,1)) endif ! ! Reference energies @@ -281,15 +279,11 @@ subroutine NL_free YAMBO_FREE(E_ext_t) YAMBO_FREE(E_ks_t) ! - if(eval_dG) then - YAMBO_FREE(dG) - endif - ! if(l_use_Hxc_collisions) then YAMBO_FREE(RT_Vnl_xc) endif if(eval_dG) then - YAMBO_FREE(dG) + YAMBO_FREE(dG_lesser) endif ! if(Correlation==LSEX.or.Correlation==LHF) then diff --git a/src/modules/mod_parallel_interface.F b/src/modules/mod_parallel_interface.F index eb9cf28b18..e392c30c57 100644 --- a/src/modules/mod_parallel_interface.F +++ b/src/modules/mod_parallel_interface.F @@ -97,7 +97,17 @@ subroutine PARALLEL_MATRIX_distribute(COMM,PAR_IND,nb,PAR_index,PAR_ID,PAR_n_ele integer, optional:: PAR_index(:,:) integer, optional:: PAR_ID integer, optional:: PAR_n_elements - end subroutine + end subroutine PARALLEL_MATRIX_distribute + ! + subroutine PARALLEL_MATRIX_distribute_cv(COMM,PAR_IND,nb1,nb2,PAR_index,PAR_ID,PAR_n_elements) + use parallel_m, ONLY:yMPI_comm,PP_indexes + type(yMPI_comm) :: COMM + type(PP_indexes) :: PAR_IND + integer :: nb1(2),nb2(2) + integer, optional:: PAR_index(:,:) + integer, optional:: PAR_ID + integer, optional:: PAR_n_elements + end subroutine PARALLEL_MATRIX_distribute_cv ! subroutine PARALLEL_WF_index(COMM) use parallel_m, ONLY:yMPI_comm diff --git a/src/modules/mod_pars.F b/src/modules/mod_pars.F index 426c7f8969..9b2e7276dc 100644 --- a/src/modules/mod_pars.F +++ b/src/modules/mod_pars.F @@ -32,6 +32,7 @@ module pars ! !...RT integer, parameter :: n_ext_fields_max=4 + integer, parameter :: n_fields_defs_max=6 ! !...Input file analyze integer, parameter :: n_max_DB_IO_off_fields=20 @@ -95,7 +96,7 @@ module pars ! STRINGs !========= integer, parameter :: schlen=100 - integer, parameter :: lchlen=300 + integer, parameter :: lchlen=500 integer, parameter :: msg_len=50 integer, parameter :: DB_menu_length=30+msg_len ! diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 48674f4e87..25ac083c01 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -49,6 +49,7 @@ module real_time logical :: l_P_integrating_J logical :: l_velocity_gauge_corr logical :: l_velocity_gauge_diam + logical :: l_length_grad_k ! ! Specific flag for when Yambo libraries are called to perform TRabs via YPP ! @@ -75,6 +76,7 @@ module real_time ! integer :: NE_i_time=1 ! = NE_time/RT_step+1 integer :: NE_steps ! Still relative to RT_step + integer :: NE_i_last_field ! ! Lifetimes Extrapolation Time status ! @@ -133,6 +135,8 @@ module real_time ! integer :: RT_nk integer :: RT_bands(2) + integer :: RT_elec_bands(2) + integer :: RT_hole_bands(2) integer :: RT_nbands ! ! Equilibrium V_xc and V_hartree in real space @@ -182,9 +186,10 @@ module real_time ! ! GFs !----- - complex(SP), allocatable :: G_lesser(:,:,:,:) ! Band, Band, K, Time - complex(SP), allocatable :: dG_lesser(:,:,:,:) - complex(SP), allocatable :: G_lesser_reference(:,:,:) ! Band, Band, K + complex(SP), allocatable :: G_lesser(:,:,:,:,:) ! Band, Band, K, Spin, Time + complex(SP), allocatable :: dG_lesser(:,:,:,:,:) + complex(SP), allocatable :: dG_avg(:,:,:,:) + complex(SP), allocatable :: G_lesser_reference(:,:,:,:) ! Band, Band, K, Spin complex(SP), allocatable :: I1_matrix(:,:) ! ! RT_Hamiltonian @@ -192,6 +197,7 @@ module real_time ! complex(SP), allocatable :: Ho_plus_Sigma(:,:,:,:) complex(SP), allocatable :: H_EQ(:,:,:,:) + complex(SP), allocatable :: H_field(:,:,:,:) complex(SP), allocatable :: H_pseudo_eq(:,:,:,:) complex(SP), allocatable :: RT_Vnl_xc(:,:,:,:) ! @@ -210,6 +216,7 @@ module real_time logical :: l_RT_RWA logical :: l_RT_ACC logical :: l_RT_PERT + logical :: l_RT_FRES logical :: l_RT_DIAG ! logical :: l_RT_SIMPLE diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 9c3b564931..250a182d97 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -7,7 +7,7 @@ ! module wave_func ! - use pars, ONLY:SP + use pars, ONLY:SP,schlen use devxlib, ONLY:devxlib_mapped use gpu_m, ONLY:have_gpu ! @@ -48,6 +48,7 @@ module wave_func ! Real components ? ! logical :: real_wavefunctions + character(schlen) :: WF_load_mode="all" ! "all"/"on-the-fly"/"on-the-fly-kq" ! ! Bands block size ! diff --git a/src/nloptics/.objects b/src/nloptics/.objects index 0f742a4561..b02552966d 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -3,5 +3,6 @@ objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL NL_damping.o NL_test_collisions.o DIPOLE_symmetrize.o \ NL_Hamiltonian.o NL_output.o DIP_polarization.o NL_average_operator.o EXC_macroscopic_JGM.o \ NL_databases_IO.o NL_build_dG_lesser.o NL_build_valence_bands.o EXP_step.o \ - NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o + NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o \ + NL_carriers_number.o #endif diff --git a/src/nloptics/DOUBLE_project.dep b/src/nloptics/DOUBLE_project.dep index ab54f3ef9b..6fa71a60f3 100644 --- a/src/nloptics/DOUBLE_project.dep +++ b/src/nloptics/DOUBLE_project.dep @@ -10,6 +10,7 @@ NL_average_operator.o NL_build_dG_lesser.o NL_build_valence_bands.o + NL_carriers_number.o NL_current.o NL_damping.o NL_databases_IO.o diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index f8c6f75202..418f27b573 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -22,11 +22,11 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) use X_m, ONLY:global_gauge,X_t use fields, ONLY:A_ext,A_tot,Efield use real_time, ONLY:eval_DFT,eval_HARTREE,l_RT_induced_Field,rho_reference,& -& Ho_plus_Sigma,RT_Vnl_xc,RT_nbands +& Ho_plus_Sigma,RT_Vnl_xc,RT_nbands,dG_lesser use wave_func, ONLY:WF use xc_functionals, ONLY:V_xc,XC_potential_driver use nl_optics, ONLY:Correlation,V_xc_0,full_rho,IPA,E_full,LRC,JGM,LRCW,l_use_DIPOLES,NL_LRC_alpha, & -& NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,dG,eval_dG, & +& NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,eval_dG, & & NL_bands,VAL_BANDS,NL_P,LSEX,LHF,Wk_EQ use global_XC, ONLY:WF_xc_functional,WF_kind use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -89,7 +89,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Evaluate the G_lesser for current/polarization and collisions ! ====================================================== - if(eval_dG) call NL_build_dG_lesser(E,V_bands,dG) + if(eval_dG) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,:,1)) ! ! Evaluate the Polarization ! =================================================================== @@ -117,7 +117,9 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! call RT_Ext_fields_sum(A_ext,Time) ! - A_tot=A_ext + A_tot%vecpot =A_ext%vecpot + A_tot%vecpot_vel=A_ext%vecpot_vel + A_tot%vecpot_acc=A_ext%vecpot_acc ! E_ext=-A_ext%vecpot_vel/SPEED_OF_LIGHT ! @@ -163,9 +165,9 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! endif ! - ! Calculate collisions - ! ======================================= - if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG) + ! Calculate collisions if doing TD-SEX or TD-HF + ! ============================================= + if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG_lesser(:,:,:,:,1)) ! ! Build the Hamiltonian ! ===================== @@ -230,7 +232,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! endif ! -! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG,H_nl_sc,k,q,E,ik,i_sp_pol) +! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG_lesser(:,:,:,:,1),H_nl_sc,k,q,E,ik,i_sp_pol) if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_vbands(V_bands,H_nl_sc,k,q,E,ik,i_sp_pol) ! if(l_use_Hxc_collisions) then diff --git a/src/nloptics/NL_carriers_number.F b/src/nloptics/NL_carriers_number.F new file mode 100644 index 0000000000..0d84e2165e --- /dev/null +++ b/src/nloptics/NL_carriers_number.F @@ -0,0 +1,57 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS AM +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine NL_carriers_number(en,k,Ncarr) + ! + use pars, ONLY:SP + use R_lattice, ONLY:bz_samp + use electrons, ONLY:levels,n_sp_pol + use nl_optics, ONLY:NL_bands + use real_time, ONLY:dG_lesser + ! + implicit none + ! + type(levels), intent(in) :: en + type(bz_samp), intent(in) :: k + real(SP), intent(out):: Ncarr(3) + ! + ! Workspace + ! + integer :: ib,ik,i_sp_pol + ! + ! Electrons and holes number + ! + Ncarr = 0._SP + ! + do i_sp_pol=1,n_sp_pol + do ik=1,en%nk + do ib=NL_bands(1),NL_bands(2) + if ( en%E(ib,ik,i_sp_pol)<=0._SP ) Ncarr(2)=Ncarr(2)-aimag(dG_lesser(ib,ib,ik,i_sp_pol,1))*k%weights(ik) + if ( en%E(ib,ik,i_sp_pol)> 0._SP ) Ncarr(3)=Ncarr(3)+aimag(dG_lesser(ib,ib,ik,i_sp_pol,1))*k%weights(ik) + enddo + enddo + enddo + ! + Ncarr(1)=Ncarr(2)-Ncarr(3) + ! +end subroutine NL_carriers_number diff --git a/src/nloptics/NL_current.F b/src/nloptics/NL_current.F index ef7a33c2da..abf6dee2f6 100644 --- a/src/nloptics/NL_current.F +++ b/src/nloptics/NL_current.F @@ -52,16 +52,23 @@ subroutine NL_current(k,E,V_input,NL_J) ! if(trim(global_gauge)=='velocity') then ! + ! The diamagnetic term is needed to obtain a gauge invariant current + ! However the below definition of nel_effect would be exact + ! only in the limit NL_bands(2) --> \infty nel_effect=nel-(NL_bands(1)-1)*spin_occ ! ! Velocity gauge I must use the correct definition of the J operator ! - NL_J(1:3)=NL_J(4:6)+A_ext%vecpot(:)*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) - ! ! In velocity gauge J(1:3) is the full current ! while J(4:6) is the current without the diamagnetic term ! + NL_J(1:3)=NL_J(4:6)+A_ext%vecpot(:)*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) + ! else + ! + ! In length gauge J(1:3) is the berry current + ! while J(4:6) is the dipoles current + ! There is no diamagnetic term here, since A(t)=0 in this gauge ! if(l_use_DIPOLES) then NL_J(1:3)=NL_J(4:6) diff --git a/src/nloptics/NL_databases_IO.F b/src/nloptics/NL_databases_IO.F index efbe120c62..a32cfbdf77 100644 --- a/src/nloptics/NL_databases_IO.F +++ b/src/nloptics/NL_databases_IO.F @@ -9,7 +9,7 @@ subroutine NL_databases_IO(i_f,read_or_write) ! use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR_CL,VERIFY,OP_APP_CL,OP_RD_CL - use nl_optics, ONLY:ID + use nl_optics, ONLY:ID,NL_P_t use parallel_m, ONLY:master_cpu ! implicit none diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 3887874f01..9c8a76cd99 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -14,7 +14,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) use QP_m, ONLY: QP_ng_SH,QP_ng_Sx use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use collision_ext, ONLY:COLLISIONS_CV_only,HXC_collisions + use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_FEW_only,HXC_collisions use X_m, ONLY:global_gauge,X_t use DIPOLES, ONLY:DIPOLE_t,DIP_S use ALLOC, ONLY:DIPOLE_ALLOC_elemental,DIPOLE_ALLOC_global @@ -31,7 +31,9 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,runs_done,n_runs_todo,l_eval_CURRENT,NL_rot_axis,& & HF,SEX,NL_bands,NL_nbands,NL_alloc_k_distributed,NL_J_t,n_runs,loop_on_frequencies, & & l_pump_and_probe,eval_OSCLL,l_test_OSCLL,LSEX,LHF,Sigma_SEX_EQ,Wk_EQ - use real_time, ONLY:RT_step,NE_steps,NE_i_time,RT_nbands,RT_bands,eval_DFT,eval_HARTREE + use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands, & + eval_DFT,eval_HARTREE,RT_P,RT_ind_J,l_velocity_gauge_diam + use RT_control, ONLY:RT_NAN_found use IO_m, ONLY:io_COLLs use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -56,7 +58,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,ik,ik_mem character(schlen) :: l_message logical :: l_dynamics_is_over - real(SP) :: Time,angle + real(SP) :: OBSERVABLES(25),Time,angle ! ! In Non-Linear NL_bands always equal to RT_bands ! ============================================== @@ -98,7 +100,9 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ======================================== call DIPOLE_dimensions(E,Dip,NL_bands,(/0._SP,0._SP,0._SP/)) call DIPOLE_IO(k,E,Dip,'read ',io_err,'NL') - if(io_err/=0) call error("Error in DIPOLES! ") + if(io_err/=0) call error("Error in Dipoles I/O") + call OVERLAPS_IO(k,E,Dip,'read',io_err,'NL') + if(io_err/=0) call error("Error in Overlaps I/O") ! ! Symmetrize dipoles if old-symmetries are present ! ================================================= @@ -118,13 +122,9 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) endif ! call DIPOLE_ALLOC_elemental('P_square') - if(l_use_DIPOLES) then - call DIPOLE_ALLOC_elemental('DIP_S') - else - if(.not.l_eval_CURRENT) then - call DIPOLE_ALLOC_elemental('DIP_v') - endif - endif + ! Deallocate what is not needed + if(l_use_DIPOLES) call DIPOLE_ALLOC_elemental('DIP_S') + if(.not.l_eval_CURRENT) call DIPOLE_ALLOC_elemental('DIP_v') ! ! WFs loading !============= @@ -169,6 +169,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) if(l_use_Hxc_collisions.and..not.COLLISIONS_have_HARTREE) eval_HARTREE=.TRUE. ! if(COLLISIONS_CV_only) call msg('rs','Collisions contains C<->V ONLY scatterings') + if(COLLISIONS_FEW_only) call msg('rs','Collisions contains ONLY selected scatterings') ! endif ! @@ -256,6 +257,16 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ===================================== if(n_runs_todo==0) return ! + if (l_pump_and_probe) then + ! + ! Initialize output files + !========================== + call RT_output_INIT( ) + ! + call RT_output_and_IO_driver('open',E,k,OBSERVABLES) + ! + endif + ! ! Initialize IO ! ================== call NL_databases_IO(0,'write') @@ -271,7 +282,8 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) else call error("Wrong input: use pump-probe mode 'yambo_nl -u p' or set a number of frequencie/angles with 'yambo_nl -u n'") endif - call live_timing(l_message,PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1)*NE_steps) + if(.not.l_pump_and_probe) NE_i_time=0 + call live_timing(l_message,n_runs*(NE_steps-NE_i_time)) ! do i_f=1,n_runs ! @@ -282,12 +294,16 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) cycle endif ! - ! Re-initialization - ! ================ - V_bands=cZERO - do i_sp_pol=1,n_sp_pol - forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE - enddo + if (.not.l_pump_and_probe) then + ! + ! Re-initialization + ! ================ + V_bands=cZERO + do i_sp_pol=1,n_sp_pol + forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE + enddo + ! + endif ! ! Update Efield ! ================ @@ -299,15 +315,14 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! l_dynamics_is_over=.false. ! - NE_i_time=0 + if(.not.l_pump_and_probe) NE_i_time=0 ! do while(.not.l_dynamics_is_over) ! NE_i_time=NE_i_time+1 + NE_time=real(NE_i_time-1,SP)*RT_step ! - Time=real(NE_i_time-1,SP)*RT_step - ! - call NL_Hamiltonian(E,k,q,X(1),Time,NE_i_time,V_bands) + call NL_Hamiltonian(E,k,q,X(1),NE_time,NE_i_time,V_bands) ! ! I evaluate current after the Hamiltonian because I need ! time-dependent overlaps Sm1_plus, and Sm1_mins @@ -316,6 +331,22 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) call NL_current(k,E,V_bands,NL_J) NL_J=NL_J-NL_initial_J endif + ! + if (l_pump_and_probe) then + ! + RT_P =real(NL_P(1:3),SP) + if ( l_velocity_gauge_diam) RT_ind_J=real(NL_J(1:3),SP) + if (.not.l_velocity_gauge_diam) RT_ind_J=real(NL_J(4:6),SP) + ! + ! Carriers number + !================ + call NL_carriers_number(E,k,OBSERVABLES(1:3)) + ! + ! Write DBs and output + !===================== + call RT_output_and_IO_driver('write',E,k,OBSERVABLES) + ! + endif ! ! Store Variables ! @@ -325,16 +356,20 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) E_tot_t(NE_i_time,:)=E_tot E_ks_t (NE_i_time,:)=E_ks ! - call NL_output(NE_i_time,i_f) + call NL_output(NE_i_time,i_f) ! call NL_Integrator(E,k,q,X(1),Integrator,NE_i_time,V_bands) ! call live_timing(steps=1) ! - l_dynamics_is_over= (NE_i_time>=NE_steps) .or. stop_now(.false.) + l_dynamics_is_over= (NE_i_time>=NE_steps) .or. stop_now(.false.) .or. RT_NAN_found ! enddo ! + if (l_pump_and_probe) then + call RT_output_and_IO_driver('close',E,k,OBSERVABLES) + endif + ! call NL_databases_IO(i_f,'write') ! if(stop_now(.false.)) exit diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index f979668ea7..4098d4feab 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -10,7 +10,7 @@ subroutine NL_initialize(E,k) use pars, ONLY:SP,DP,pi use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_hartree use vec_operate, ONLY:normalize_v,v_norm,cross_product - use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_load_SP,COLLISIONS_compr + use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP,COLLISIONS_compr use hamiltonian, ONLY:H_potential use units, ONLY:AU2VMm1,AUT2FS,HA2EV use electrons, ONLY:levels,n_sp_pol @@ -21,10 +21,14 @@ subroutine NL_initialize(E,k) use QP_m, ONLY:QP_ng_Sc,QP_ng_Sx,QP_ng_Sh use collision_ext, ONLY:ng_oscll,COLLISIONS_cutoff use R_lattice, ONLY:bz_samp,k_map - use fields, ONLY:Efield,Efield_strength,n_ext_fields,EtoT + use IO_m, ONLY:io_GF + use X_m, ONLY:global_gauge + use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & -& Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime - use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t +& Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& +& l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now + use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& +& SAVE_Vb_history,SAVE_G_history use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& @@ -43,6 +47,7 @@ subroutine NL_initialize(E,k) ! real(SP) :: Time,W_0,T_0,sigma,E_dot_rot_axis integer :: i1,n_active_fields + logical :: l_velocity_gauge_tmp real(SP) :: Sampling_Time logical :: l_no_compress_COLL ! @@ -56,6 +61,20 @@ subroutine NL_initialize(E,k) call parser('TestOSCLL', l_test_OSCLL) call parser('NoComprCOLL', l_no_compress_COLL) call parser('UseSymm', l_res_symms) + call parser('SaveVbhistory', SAVE_Vb_history) + call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) + call parser('UseDipoles', l_use_DIPOLES) + call parser('SaveGhistory', SAVE_G_history) + ! + l_velocity_gauge_corr=.false. + l_velocity_gauge_diam=.not.l_velocity_gauge_tmp + ! + if (SAVE_G_history) then + io_GF=.true. + RT_nk=k%nibz + G_MEM_steps=1 + i_MEM_now=1 + endif ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') if(l_P_periodic) call msg('sr','[NL] Enforce periodicity of the polarization repect to Efield') @@ -141,10 +160,9 @@ subroutine NL_initialize(E,k) ! ! This part of the code works with only one field ! - n_ext_fields=3 n_active_fields=0 ! - do i1=1,n_ext_fields + do i1=1,n_ext_fields_max ! Efield(i1)%ef_name=trim(Efield(i1)%ef_name) if((Efield(i1)%ef_name=='none')) cycle @@ -170,8 +188,6 @@ subroutine NL_initialize(E,k) ! see definition of "step_case" in function "theta_function" in src/modules/mod_functions.F Efield(i1)%t_initial_indx=max(nint(Efield(i1)%t_initial/RT_step)+1,2) Efield(i1)%t_initial =real(Efield(i1)%t_initial_indx-1)*RT_step - if(Efield(i1)%ef_pol/="linear") call error("Only 'linear' polarization has been implemented and tested ") - Efield(i1)%ef_pol ="linear" ! call Check_symmetries(Efield(i1)%versor,"electric") ! @@ -378,6 +394,8 @@ subroutine NL_initialize(E,k) ! endif ! + if (l_pump_and_probe) eval_dG=.true. + ! if(eval_COLLISIONS) then COLLISIONS_load_SP =.not.l_no_compress_COLL COLLISIONS_compr =.not.l_no_compress_COLL @@ -403,6 +421,7 @@ subroutine NL_initialize(E,k) if(eval_COLLISIONS) then ! if(COLLISIONS_CV_only) call warning(' ONLY cv scattering in COLLISIONS! ') + if(COLLISIONS_FEW_only) call warning(' ONLY selected scattering in COLLISIONS! ') ! if(l_no_compress_COLL) then call msg('sr','Full collisions in double-precision ') @@ -464,14 +483,19 @@ subroutine NL_initialize(E,k) ! frequencies is supported ! RT_dyn_step=RT_step - OBS_RT_IO_t%INTERVAL_time =RT_step - OBS_RT_IO_t%INTERVAL_time_INPUT=RT_step - call SETUP_RT_IO_type(OBS_RT_IO_t,who="OBS",what="INIT") - YAMBO_ALLOC(OBS_RT_IO_t%Time,(NE_steps)) + ! + ! I/O steps + !=========== + call RT_IO_type_time_steps("INIT") + ! + call RT_control_alloc("all") + ! +! if(.not.l_pump_and_probe) then do NE_i_time=1,NE_steps Time=real(NE_i_time-1,SP)*RT_step OBS_RT_IO_t%Time(NE_i_time)=Time enddo + !endif ! ! LOG ! === @@ -491,6 +515,8 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) + call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) + call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) enddo call msg( 'r', 'Efield T_0 ',T_0,"[fs]") call msg( 'r', 'Frequencies range ',NL_er*HA2EV) diff --git a/src/nloptics/NL_output.F b/src/nloptics/NL_output.F index 67212970d4..4782bfc597 100644 --- a/src/nloptics/NL_output.F +++ b/src/nloptics/NL_output.F @@ -30,26 +30,26 @@ subroutine NL_output(i_time,i_run) ! if(NL_verbosity==VERB_LOW) return ! - file_name(1)='external_potential_F'//intc(i_run) - file_name(2)='polarization_F'//intc(i_run) - file_name(3)='e_total_F'//intc(i_run) - file_name(4)='current_F'//intc(i_run) + file_name(1)='NL_ext_pot_F'//intc(i_run) + file_name(2)='NL_pol_F'//intc(i_run) + file_name(3)='NL_Etot_F'//intc(i_run) + file_name(4)='NL_curr_F'//intc(i_run) ! n_files=1 - short_file_name(n_files)='external_potential' + short_file_name(n_files)='NL_ext_pot' n_headings(n_files)=10 ! n_files=n_files+1 - short_file_name(n_files)='polarization' + short_file_name(n_files)='NL_pol' n_headings(n_files)=7 ! n_files=n_files+1 - short_file_name(n_files)='e_total' + short_file_name(n_files)='NL_Etot' n_headings(n_files)=4 ! if(l_eval_CURRENT) then n_files=n_files+1 - short_file_name(n_files)='current' + short_file_name(n_files)='NL_curr' n_headings(n_files)=7 endif ! diff --git a/src/nloptics/NL_project.dep b/src/nloptics/NL_project.dep index ab54f3ef9b..6fa71a60f3 100644 --- a/src/nloptics/NL_project.dep +++ b/src/nloptics/NL_project.dep @@ -10,6 +10,7 @@ NL_average_operator.o NL_build_dG_lesser.o NL_build_valence_bands.o + NL_carriers_number.o NL_current.o NL_damping.o NL_databases_IO.o diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index 572632844a..aa114aea9f 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -17,10 +17,15 @@ subroutine NL_start_and_restart(E,k,Dip) ! [4] Initialize the bare Hartree and XC ! [5] Initialize the fields ! - use pars, ONLY:cZERO,rZERO,cONE + use pars, ONLY:cZERO,rZERO,cONE,SP use com, ONLY:msg + use units, ONLY:AUT2FS use electrons, ONLY:levels,n_sp_pol - use real_time, ONLY:rho_reference,eval_HARTREE,eval_DFT + use real_time, ONLY:rho_reference,RT_time_status,NE_i_time,RT_step,RT_dyn_step,NE_steps,& +& eval_HARTREE,eval_DFT + use RT_control, ONLY:Vbands_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,CACHE_OBS_INTERVAL_time,& +& N_RT_databases,NE_i_start_time,RT_return_db_ID,RT_DB_ID,RT_DB_name,& +& RT_control_alloc,RT_control_free use R_lattice, ONLY:bz_samp use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t @@ -33,10 +38,10 @@ subroutine NL_start_and_restart(E,k,Dip) use parallel_m, ONLY:master_cpu use nl_optics, ONLY:Correlation,IPA,E_full,full_rho,V_bands,TDDFT,n_runs_todo,NL_LRC_alpha,NL_bands, & & V_xc_0,NL_initial_P,l_use_DIPOLES,n_runs,runs_done,JGM,E_xc_0,I_relax,l_use_DIPOLES,& -& VAL_BANDS,l_eval_CURRENT,NL_initial_J,NL_P +& VAL_BANDS,l_eval_CURRENT,NL_initial_J,NL_P,l_pump_and_probe use IO_int, ONLY:io_control - use IO_m, ONLY:OP_RD_CL,NONE,file_is_present,VERIFY - use parallel_int, ONLY:PP_redux_wait + use IO_m, ONLY:OP_RD_CL,NONE,file_is_present,VERIFY,DUMP,REP + use parallel_int, ONLY:PP_wait,PP_redux_wait use stderr, ONLY:intc use collision_ext, ONLY:COLLISIONS_have_HARTREE ! @@ -49,9 +54,10 @@ subroutine NL_start_and_restart(E,k,Dip) ! ! Working space ! - integer :: i1,ib,i_f,i_sp_pol - integer :: ID,io_NonLinear - integer, external::io_NL + logical :: RESTART + integer :: i1,ib,i_f,i_sp_pol,i_db + integer :: ID,io_NonLinear,COM_MODE,io_err(N_RT_databases) + integer, external :: io_NL,io_RT_components ! ! ! Initialize the Gf and potentials @@ -149,26 +155,105 @@ subroutine NL_start_and_restart(E,k,Dip) ! Restart ! ==================================== YAMBO_ALLOC(runs_done,(n_runs)) - ! runs_done=.false. ! - if(master_cpu) then - ! - call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=VERIFY,ID=ID) - io_NonLinear=io_NL("Nonlinear",ID) - ! - if(io_NonLinear==0) then - do i_f=1,n_runs - if(file_is_present('Nonlinear_fragment_'//intc(i_f))) runs_done(i_f)=.true. - enddo - endif - ! - endif + RESTART=.FALSE. ! - call PP_redux_wait(runs_done,imode=3) + if (.not.l_pump_and_probe) then + ! + if(master_cpu) then + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1/),MODE=VERIFY,ID=ID) + io_NonLinear=io_NL("Nonlinear",ID) + ! + if(io_NonLinear==0) then + do i_f=1,n_runs + if(file_is_present('Nonlinear_fragment_'//intc(i_f))) runs_done(i_f)=.true. + enddo + endif + ! + endif + ! + call PP_redux_wait(runs_done,imode=3) + ! + else + ! + NE_i_time=0 + ! + call msg('s','Checking for RESTART in pump and probe mode ') + ! + ! Perform a first I/O to check which DBs are present. + !===================================================== + do i_db=1,N_RT_databases + COM_MODE=NONE + if (i_db==RT_return_db_ID("ANY_Vb")) COM_MODE=REP + call io_control(ACTION=OP_RD_CL,COM=COM_MODE,SEC=(/1/),MODE=VERIFY,ID=RT_DB_ID(i_db)) + io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) + enddo + ! + ! To restart I need: + ! + ! 1. The Vbands -> wave-functions + ! 2. The OBSERVABLES -> RT_IO_t + ! + RESTART = io_err(RT_return_db_ID("V_bands"))==0.and.io_err(RT_return_db_ID("OBSERVABLES"))==0 + ! + endif ! n_runs_todo=n_runs-count(runs_done) if(n_runs_todo/=n_runs) call msg('s','RESTART, remaining frequencies/angles ',n_runs_todo) ! + if (l_pump_and_probe.and.RESTART) then + ! + call msg('s','RESTART in pump and probe mode ') + ! + do i_db=1,N_RT_databases + call RT_RESTART_database_copy( trim(RT_DB_name(i_db)) ) + enddo + ! + call PP_wait() + ! + do i_db=1,N_RT_databases + if (i_db==RT_return_db_ID("V_bands_K_section")) cycle + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2/),MODE=DUMP,ID=RT_DB_ID(i_db)) + io_err(i_db)=io_RT_components(trim(RT_DB_name(i_db)),RT_DB_ID(i_db)) + enddo + ! + NE_i_start_time=NE_i_time + ! + call RT_control_free("all") + call RT_control_alloc("all") + ! + YAMBO_FREE(RT_TIME_status) + ! + ! I use G_lesser(:,:,:) to reconstruct everything + ! Note that the databases must be loaded at the RESTART time (NE_time) + ! + i_db=RT_return_db_ID("V_bands_K_section") + ! + call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),MODE=DUMP,ID=RT_DB_ID(i_db)) + io_err(i_db)=io_RT_components('V_bands_K_section',RT_DB_ID(i_db)) + ! + call RT_IO_type_time_steps("RESTART") + ! + call msg( 'nr','---RESTART report---') + ! + call msg('s','[RESTART] Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") + call msg('r','Number of steps done ',real(NE_i_time)/real(NE_steps)*100._SP,"[o/o]") + call msg('r','Time reached ',real(NE_i_time-1)*RT_step*AUT2FS,"[fs]") + call msg('r','Time step ',RT_dyn_step*AUT2FS,"[fs]") + ! + !call msg('r', 'dT Update Interval ',NE_time_step_update_jump*AUT2FS,"[fs]") + !call msg('r', 'Lifetimes inter/intr times ',RT_life_extrap_times*AUT2FS,"[fs]") + call msg('r', 'T cache step of J,P,M ',CACHE_OBS_INTERVAL_time*AUT2FS,"[fs]") + call msg('r', 'T between I/O of J,P,M ',OBS_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + !call msg('r', ' I/O of carriers ',CARR_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + call msg('r', ' I/O of WFs ',Vbands_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + call msg('r', ' outputs ',OUTPUT_RT_IO_t%INTERVAL_time*AUT2FS,"[fs]") + ! + NE_i_time=NE_i_time-1 + ! + endif + ! end subroutine NL_start_and_restart diff --git a/src/nloptics/NL_test_collisions.F b/src/nloptics/NL_test_collisions.F index 56f0be55f7..e860fdb94a 100644 --- a/src/nloptics/NL_test_collisions.F +++ b/src/nloptics/NL_test_collisions.F @@ -15,6 +15,7 @@ subroutine NL_test_collisions(k,q) use R_lattice, ONLY:nXkibz,bz_samp,qindx_S use collision_ext, ONLY:HXC_COLL_element,HXC_collisions use nl_optics, ONLY:NL_bands + use electrons, ONLY:n_sp_pol use com, ONLY:msg ! implicit none @@ -22,10 +23,10 @@ subroutine NL_test_collisions(k,q) type(bz_samp), intent(in) :: k,q ! integer :: i_kmq,i_qp,ib,ibp,i_coll,i_coll_mem - integer :: i_k,i_n,i_m,i_spin + integer :: i_k,i_n,i_m,i_spin,i_sp integer :: ic1 - complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz) - complex(SP) :: COLL_OSCLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz) + complex(SP) :: COLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz,n_sp_pol) + complex(SP) :: COLL_OSCLL(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nXkibz,n_sp_pol) ! real(SP) :: max_diff,diff ! @@ -50,23 +51,25 @@ subroutine NL_test_collisions(k,q) ! COLL=cZERO ! + do i_sp=1,n_sp_pol do i_kmq=1,nXkibz ! do ibp=NL_bands(1),NL_bands(2) do ib=NL_bands(1),NL_bands(2) - if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq)=="t") then - COLL(ib,ibp,i_kmq)=HXC_COLL_element(i_coll_mem)%v_c(ic1) + if (HXC_COLL_element(i_coll_mem)%table(ib,ibp,i_kmq,i_sp)=="t") then + COLL(ib,ibp,i_kmq,i_sp)=HXC_COLL_element(i_coll_mem)%v_c(ic1) ic1=ic1+1 endif ! - diff=abs(COLL(ib,ibp,i_kmq)-COLL_OSCLL(ib,ibp,i_kmq)) - write(*,'(6i5,2e14.6)') i_k,i_m,i_n,i_kmq,ib,ibp,abs(COLL(ib,ibp,i_kmq)),abs(COLL_OSCLL(ib,ibp,i_kmq)) + diff=abs(COLL(ib,ibp,i_kmq,i_sp)-COLL_OSCLL(ib,ibp,i_kmq,i_sp)) + write(*,'(7i5,2e14.6)') i_sp,i_k,i_m,i_n,i_kmq,ib,ibp,abs(COLL(ib,ibp,i_kmq,i_sp)),abs(COLL_OSCLL(ib,ibp,i_kmq,i_sp)) if(max_diff<=diff) max_diff=diff ! enddo enddo ! enddo + enddo ! enddo ! diff --git a/src/parallel/PARALLEL_MATRIX_distribute.F b/src/parallel/PARALLEL_MATRIX_distribute.F index cb4c6ccba0..cc93dd625c 100644 --- a/src/parallel/PARALLEL_MATRIX_distribute.F +++ b/src/parallel/PARALLEL_MATRIX_distribute.F @@ -49,4 +49,47 @@ subroutine PARALLEL_MATRIX_distribute(COMM,PAR_IND,nb,PAR_index,PAR_ID,PAR_n_ele PAR_n_elements=PAR_IND%n_of_elements(COMM%CPU_id+1) endif ! -end subroutine +end subroutine PARALLEL_MATRIX_distribute +! +! +subroutine PARALLEL_MATRIX_distribute_cv(COMM,PAR_IND,nb1,nb2,PAR_index,PAR_ID,PAR_n_elements) + ! + use parallel_m, ONLY:yMPI_comm,PP_indexes + use parallel_int, ONLY:PARALLEL_index + use hamiltonian, ONLY:B_mat_index_cv + ! + implicit none + ! + type(yMPI_comm) :: COMM + type(PP_indexes) :: PAR_IND + integer :: nb1(2),nb2(2) + ! + integer, optional:: PAR_index(:,:) + integer, optional:: PAR_ID + integer, optional:: PAR_n_elements + ! + ! Work space + ! + integer :: ib1,ib2,Nel + ! + call PARALLEL_index(PAR_IND,(/ (nb1(2)-nb1(1)+1)*(nb2(2)-nb2(1)+1) /),COMM=COMM,CONSECUTIVE=.TRUE.,NO_EMPTIES=.TRUE.) + ! + if (present(PAR_ID)) PAR_ID=COMM%CPU_id + ! + if (present(PAR_index)) then + Nel=PAR_IND%n_of_elements(COMM%CPU_id+1) + PAR_index=0 + Nel=0 + do ib1=nb1(1),nb1(2) + do ib2=nb2(1),nb2(2) + if (PAR_IND%element_1D( B_mat_index_cv(ib1,ib2,nb1,nb2) ) ) then + Nel=Nel+1 + PAR_index(ib1,ib2)=Nel + endif + enddo + enddo + endif + ! + if (present(PAR_n_elements)) PAR_n_elements=PAR_IND%n_of_elements(COMM%CPU_id+1) + ! +end subroutine PARALLEL_MATRIX_distribute_cv diff --git a/src/parallel/PARALLEL_collisions.F b/src/parallel/PARALLEL_collisions.F index 7b2aa2fded..27c3cc5a90 100644 --- a/src/parallel/PARALLEL_collisions.F +++ b/src/parallel/PARALLEL_collisions.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM ! -subroutine PARALLEL_collisions( k, COLL ) +subroutine PARALLEL_collisions( k, COLL_grp ) ! ! SC !==== @@ -128,45 +128,61 @@ subroutine PARALLEL_collisions( k, COLL ) ! use drivers, ONLY:l_eval_collisions use parallel_int, ONLY:PARALLEL_live_message,PARALLEL_check_phase_space - use collision_ext, ONLY:COLLISIONS_group,COLL_bands + use collision_ext, ONLY:COLLISIONS_group,COLL_bands,COLLISIONS_CV_only use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_B_mat,PAR_IND_G_k,PAR_IND_Q_bz,PAR_IND_QP,& & l_par_RT,l_par_SE,l_par_SC,l_par_NL - use hamiltonian, ONLY:B_mat_index + use hamiltonian, ONLY:B_mat_index,B_mat_index_cv + use electrons, ONLY:n_met_bands,n_full_bands use R_lattice, ONLY:bz_samp,qindx_S,nqbz ! #include ! type(bz_samp) :: k - type(COLLISIONS_group) :: COLL + type(COLLISIONS_group) :: COLL_grp ! ! Work Space ! - integer :: i_coll,i_k,ib1,ib2,NC_tot,i_q,i_p,i_p_bz + integer :: i_coll,i_k,ib1,ib2,NC_tot,i_q,i_p,i_p_bz, & + & blim1(2),blim2(2),nb_cv,i1 ! - if ( COLL%N == 0 ) return + if ( COLL_grp%N == 0 ) return ! - YAMBO_ALLOC(COLL%PAR_map,(COLL%N)) - YAMBO_ALLOC(COLL%PAR_IND%element_1D,(COLL%N)) + YAMBO_ALLOC(COLL_grp%PAR_map,(COLL_grp%N)) + YAMBO_ALLOC(COLL_grp%PAR_IND%element_1D,(COLL_grp%N)) ! if (.not.allocated(PAR_IND_G_k%element_1D).and.l_eval_collisions ) then YAMBO_ALLOC(PAR_IND_G_k%element_1D,(k%nibz)) PAR_IND_G_k%element_1D=.FALSE. endif - COLL%PAR_IND%element_1D=.FALSE. - COLL%PAR_N=0 - COLL%PAR_map=0 + COLL_grp%PAR_IND%element_1D=.FALSE. + COLL_grp%PAR_N=0 + COLL_grp%PAR_map=0 NC_tot=0 ! - do i_coll=1,COLL%N + if (COLLISIONS_CV_only) then + blim1=(/COLL_bands(1),maxval(n_met_bands)/) + blim2=(/minval(n_full_bands),COLL_bands(2)/) + nb_cv=(blim1(2)-blim1(1)+1)*(blim2(2)-blim2(1)+1) + endif + ! + do i_coll=1,COLL_grp%N ! - ib1 = COLL%state(i_coll,1) - ib2 = COLL%state(i_coll,2) - i_k = COLL%state(i_coll,3) + ib1 = COLL_grp%state(i_coll,1) + ib2 = COLL_grp%state(i_coll,2) + i_k = COLL_grp%state(i_coll,3) NC_tot=NC_tot+1 ! if (l_par_RT) then if (.not.PAR_IND_Xk_ibz%element_1D(i_k)) cycle - if (.not.PAR_IND_B_mat%element_1D( B_mat_index(ib1,ib2,COLL_bands) ) ) cycle + if (COLLISIONS_CV_only) then + if (ib1> blim1(2) .and. ib2> blim1(2) ) cycle + if (ib1< blim1(1) .and. ib2< blim2(1) ) cycle + if (ib1ib2) i1=B_mat_index_cv(ib2,ib1,blim2,blim1)!+nb_cv + else + i1=B_mat_index(ib1,ib2,COLL_bands) + endif + if (.not.PAR_IND_B_mat%element_1D( i1 ) ) cycle endif ! if (l_par_NL) then @@ -178,9 +194,9 @@ subroutine PARALLEL_collisions( k, COLL ) if (.not.PAR_IND_QP%element_1D(i_coll)) cycle endif ! - COLL%PAR_N=COLL%PAR_N+1 - COLL%PAR_map(i_coll)=COLL%PAR_N - COLL%PAR_IND%element_1D(i_coll)=.TRUE. + COLL_grp%PAR_N=COLL_grp%PAR_N+1 + COLL_grp%PAR_map(i_coll)=COLL_grp%PAR_N + COLL_grp%PAR_IND%element_1D(i_coll)=.TRUE. ! if (l_eval_collisions) then ! @@ -203,22 +219,22 @@ subroutine PARALLEL_collisions( k, COLL ) ! enddo ! - call PARALLEL_live_message(trim(COLL%name)//" Number of Collisions",LOADED=COLL%PAR_N,TOTAL=NC_tot) + call PARALLEL_live_message(trim(COLL_grp%name)//" Number of Collisions",LOADED=COLL_grp%PAR_N,TOTAL=NC_tot) ! - call PARALLEL_check_phase_space(COLL%PAR_N,MSG=trim(COLL%name)//" COLLISIONS") + call PARALLEL_check_phase_space(COLL_grp%PAR_N,MSG=trim(COLL_grp%name)//" COLLISIONS") ! end subroutine PARALLEL_collisions ! ! -subroutine PARALLEL_collisions_reset(COLL) +subroutine PARALLEL_collisions_reset(COLL_grp) ! use collision_ext, ONLY:COLLISIONS_group ! #include ! - type(COLLISIONS_group), intent(inout) :: COLL + type(COLLISIONS_group), intent(inout) :: COLL_grp ! - YAMBO_FREE(COLL%PAR_map) - YAMBO_FREE(COLL%PAR_IND%element_1D) + YAMBO_FREE(COLL_grp%PAR_map) + YAMBO_FREE(COLL_grp%PAR_IND%element_1D) ! end subroutine PARALLEL_collisions_reset diff --git a/src/parallel/PARALLEL_global_Non_Linear.F b/src/parallel/PARALLEL_global_Non_Linear.F index e18fd65e70..fbf6d1c135 100644 --- a/src/parallel/PARALLEL_global_Non_Linear.F +++ b/src/parallel/PARALLEL_global_Non_Linear.F @@ -11,6 +11,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) use R_lattice, ONLY:bz_samp use collision_ext, ONLY:HXC_collisions use nl_optics, ONLY:NL_bands + use RT_control, ONLY:SAVE_G_history use IO_int, ONLY:IO_and_Messaging_switch use parallel_int, ONLY:PARALLEL_index,PARALLEL_assign_chains_and_COMMs,PARALLEL_live_message use parallel_m, ONLY:ncpu,COMM_copy,PAR_build_index,PAR_INDEX_copy @@ -23,7 +24,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! INDEX use parallel_m, ONLY:PAR_freqs_index,PAR_Xk_ibz_index,PAR_Xk_bz_index,PAR_QP_index ! DIMENSIONS - use parallel_m, ONLY:PAR_n_freqs,PAR_nQP,PAR_Xk_nbz,PAR_Xk_nibz + use parallel_m, ONLY:PAR_n_freqs,PAR_nQP,PAR_Xk_nbz,PAR_Xk_nibz,PAR_G_k_range ! ID's use parallel_m, ONLY:PAR_IND_freqs_ID,PAR_IND_Q_ibz_ID,PAR_IND_WF_k_ID,& & PAR_IND_Xk_bz_ID,PAR_IND_Xk_ibz_ID @@ -38,7 +39,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! ! Work space ! - integer :: i_qp,ib1,ib2,i_k + integer :: i_qp,ib1,ib2,i_k,nk_G_IO ! CALL PARALLEL_structure(2,(/"w ","k "/)) ! @@ -67,7 +68,7 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) ! ! K-points ! - call PARALLEL_index(PAR_IND_Xk_ibz,(/Xk%nibz/),COMM=PAR_COM_Xk_ibz_INDEX) + call PARALLEL_index(PAR_IND_Xk_ibz,(/Xk%nibz/),CONSECUTIVE=SAVE_G_history,COMM=PAR_COM_Xk_ibz_INDEX) PAR_IND_Xk_ibz_ID=PAR_COM_Xk_ibz_INDEX%CPU_id PAR_Xk_nibz=PAR_IND_Xk_ibz%n_of_elements(PAR_IND_Xk_ibz_ID+1) ! @@ -82,7 +83,15 @@ subroutine PARALLEL_global_Non_Linear(E,Xk,q) call PARALLEL_distribute_BZk_using_IBZk(PAR_COM_Xk_ibz_INDEX,Xk,PAR_IND_Xk_ibz,PAR_IND_Xk_ibz_ID,& & PAR_IND_Xk_bz, PAR_IND_Xk_bz_ID,& & PAR_Xk_bz_index,PAR_Xk_nbz) - + ! + nk_G_IO=0 + PAR_G_k_range=0 + do i_k = 1, Xk%nibz + if (.not.PAR_IND_Xk_ibz%element_1D(i_k) ) cycle + if (nk_G_IO==0) PAR_G_k_range=i_k + if (nk_G_IO >0) PAR_G_k_range(2)=i_k + nk_G_IO=nk_G_IO+1 + enddo ! ! Overlap indeces for WF distribution ! diff --git a/src/parallel/PARALLEL_global_Real_Time.F b/src/parallel/PARALLEL_global_Real_Time.F index ee4a31cd95..10decbdb89 100644 --- a/src/parallel/PARALLEL_global_Real_Time.F +++ b/src/parallel/PARALLEL_global_Real_Time.F @@ -8,15 +8,16 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! use drivers, ONLY:l_eval_collisions - use electrons, ONLY:levels + use electrons, ONLY:levels,n_met_bands,n_full_bands use R_lattice, ONLY:bz_samp use IO_int, ONLY:IO_and_Messaging_switch use openmp, ONLY:n_threads_RT,OPENMP_set_threads use parallel_int, ONLY:PARALLEL_index,PARALLEL_assign_chains_and_COMMs,& -& PARALLEL_live_message,PARALLEL_MATRIX_distribute - use collision_ext, ONLY:COH_collisions,HXC_collisions,GW_NEQ_collisions +& PARALLEL_live_message,PARALLEL_MATRIX_distribute,& +& PARALLEL_MATRIX_distribute_cv + use collision_ext, ONLY:COH_collisions,HXC_collisions,GW_NEQ_collisions,COLLISIONS_CV_only use matrix_operate,ONLY:UP_matrix_index - use hamiltonian, ONLY:B_mat_index + use hamiltonian, ONLY:B_mat_index,B_mat_index_cv use real_time, ONLY:RT_bands,l_RT_uses_E_FineGd use parallel_m, ONLY:ncpu,HEAD_QP_cpu,HEAD_k_cpu,HEAD_q_cpu,COMM_copy,PAR_INDEX_copy,& & PAR_build_index,PP_indexes_reset @@ -42,7 +43,8 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! ! Work space ! - integer :: ib1,ib2,ik,nk_G_IO,nk_SERIAL,i_shift + integer :: ib1,ib2,ik,nk_G_IO,nk_SERIAL,i_shift,& + & blim1(2),blim2(2) logical :: CONSECUTIVE ! CALL PARALLEL_structure(4,(/"k ","b ","q ","qp"/)) @@ -89,12 +91,12 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) call PAR_INDEX_copy(PAR_IND_Xk_ibz,PAR_IND_WF_k) PAR_IND_WF_b_ID=PAR_COM_WF_b_INDEX%CPU_id ! - call PARALLEL_index(PAR_IND_B_mat_ordered,(/ UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1)-1 /),& + call PARALLEL_index(PAR_IND_B_mat_ordered,(/ UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1) /),& & COMM=PAR_COM_WF_b_INDEX,CONSECUTIVE=.TRUE.,NO_EMPTIES=.TRUE.) ! call PARALLEL_live_message("Bands Matrix (ordered)",ENVIRONMENT="Real_Time",& & LOADED=PAR_IND_B_mat_ordered%n_of_elements(PAR_IND_WF_b_ID+1),& -& TOTAL=UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1)-1,& +& TOTAL=UP_matrix_index(1,RT_bands(2)-RT_bands(1)+1),& & NCPU=PAR_COM_WF_b_INDEX%n_CPU) ! YAMBO_ALLOC(PAR_IND_WF_b%n_of_elements,(PAR_COM_WF_b_INDEX%n_CPU)) @@ -104,7 +106,7 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! do ib1=RT_bands(1),RT_bands(2) do ib2=ib1,RT_bands(2) - if (PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1)-1 )) then + if (PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib1-RT_bands(1)+1,ib2-RT_bands(1)+1) )) then if (.not.PAR_IND_WF_b%element_1D(ib1)) then PAR_IND_WF_b%element_1D(ib1)=.TRUE. PAR_IND_WF_b%n_of_elements(PAR_IND_WF_b_ID+1)=PAR_IND_WF_b%n_of_elements(PAR_IND_WF_b_ID+1)+1 @@ -148,7 +150,13 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! endif ! - call PARALLEL_MATRIX_distribute(PAR_COM_G_b_INDEX,PAR_IND_B_mat,RT_bands) + if (COLLISIONS_CV_only) then + blim1=(/RT_bands(1),maxval(n_met_bands)/) + blim2=(/minval(n_full_bands),RT_bands(2)/) + call PARALLEL_MATRIX_distribute_cv(PAR_COM_G_b_INDEX,PAR_IND_B_mat,blim1,blim2) + else + call PARALLEL_MATRIX_distribute(PAR_COM_G_b_INDEX,PAR_IND_B_mat,RT_bands) + endif ! call PAR_INDEX_copy(PAR_IND_Xk_ibz,PAR_IND_DIPk_ibz) PAR_IND_DIPk_ibz_ID=PAR_IND_Xk_ibz_ID @@ -156,14 +164,24 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) call PAR_build_index(PAR_IND_DIPk_ibz,Xk%nibz,PAR_DIPk_ibz_index,PAR_DIPk_nibz) YAMBO_ALLOC(PAR_Xk_ibz_index,(Xk%nibz)) call PAR_build_index(PAR_IND_Xk_ibz,Xk%nibz,PAR_Xk_ibz_index,PAR_Xk_nibz) - do ib1=RT_bands(1),RT_bands(2) - do ib2=RT_bands(1),RT_bands(2) - if (PAR_IND_B_mat%element_1D( B_mat_index(ib1,ib2,RT_bands) ) ) then - PAR_IND_WF_b%element_1D(ib1)=.TRUE. - PAR_IND_WF_b%element_1D(ib2)=.TRUE. - endif + ! + if (COLLISIONS_CV_only) then + do ib1=blim1(1),blim1(2) + do ib2=blim2(1),blim2(2) + if (.not.PAR_IND_B_mat%element_1D( B_mat_index_cv(ib1,ib2,blim1,blim2) ) ) cycle + PAR_IND_WF_b%element_1D(ib1)=.TRUE. + PAR_IND_WF_b%element_1D(ib2)=.TRUE. + enddo enddo - enddo + else + do ib1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + if (.not.PAR_IND_B_mat%element_1D( B_mat_index(ib1,ib2,RT_bands) ) ) cycle + PAR_IND_WF_b%element_1D(ib1)=.TRUE. + PAR_IND_WF_b%element_1D(ib2)=.TRUE. + enddo + enddo + endif ! nk_G_IO=0 PAR_G_k_range=0 diff --git a/src/parallel/PARALLEL_global_Response_T_transitions.F b/src/parallel/PARALLEL_global_Response_T_transitions.F index 329565d15d..016087dc8f 100644 --- a/src/parallel/PARALLEL_global_Response_T_transitions.F +++ b/src/parallel/PARALLEL_global_Response_T_transitions.F @@ -8,7 +8,7 @@ subroutine PARALLEL_global_Response_T_transitions(Xk) ! use R_lattice, ONLY:bz_samp,nXkibz - use BS, ONLY:BS_nT_at_k,BS_nT_grps,BS_n_eh_spaces + use BS, ONLY:BS_nT_at_k,BS_nT_grps,BS_n_eh_spaces,l_BSE_kernel_full use IO_int, ONLY:IO_and_Messaging_switch use parallel_int, ONLY:PARALLEL_index,PARALLEL_live_message use parallel_m, ONLY:PAR_n_c_bands,PAR_n_v_bands,PP_indexes_reset,master_cpu @@ -70,7 +70,7 @@ subroutine PARALLEL_global_Response_T_transitions(Xk) call PP_indexes_reset(PAR_IND_T_ordered) ! call PARALLEL_index(PAR_IND_T_ordered,(/BS_nT_grps,BS_nT_grps/),COMM=PAR_COM_T_INDEX,& -& MASK=PAR_IND_T_groups%element_1D,ORDERED=.TRUE.,NO_EMPTIES=.FALSE.) +& MASK=PAR_IND_T_groups%element_1D,ORDERED=.not.l_BSE_kernel_full,NO_EMPTIES=.FALSE.) ! call PARALLEL_live_message("(e/h)->(e/h)' Transitions (ordered)",ENVIRONMENT="Response_T_space",& & LOADED=PAR_IND_T_ordered%n_of_elements(PAR_COM_T_INDEX%CPU_id+1),& diff --git a/src/parallel/PARALLEL_global_indexes.F b/src/parallel/PARALLEL_global_indexes.F index a9abc93a46..173cfc66b1 100644 --- a/src/parallel/PARALLEL_global_indexes.F +++ b/src/parallel/PARALLEL_global_indexes.F @@ -108,7 +108,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre Do_dip_limits=.not.Dip_limits_pre_defined endif if (Do_dip_limits) then - if (Dip%bands_ordered.or.Dip%Energy_treshold<0._SP) then + if (Dip%bands_ordered.or.Dip%Energy_threshold<0._SP) then Dip%ib_lim(1)=maxval(E%nbm) Dip%ib_lim(2)=minval(E%nbf)+1 if (l_X_terminator) Dip%ib_lim(2)=Dip%ib(1) diff --git a/src/parser/mod_itm.F b/src/parser/mod_itm.F index a42d011529..fd1509a016 100644 --- a/src/parser/mod_itm.F +++ b/src/parser/mod_itm.F @@ -41,7 +41,7 @@ module it_m integer, parameter :: V_all=99 ! integer, parameter :: maxrnlvls=60 - integer, parameter :: maxflags =60 + integer, parameter :: maxflags =70 integer, parameter :: maxi1vars=100 integer, parameter :: maxi2vars=50 integer, parameter :: maxi3vars=50 diff --git a/src/pol_function/X_irredux_residuals.F b/src/pol_function/X_irredux_residuals.F index f4776520c6..b8a3e6e4a9 100644 --- a/src/pol_function/X_irredux_residuals.F +++ b/src/pol_function/X_irredux_residuals.F @@ -111,7 +111,7 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt,work,lwork) ! Z_eh_occ = Xen%f(iv,ikp,i_spin)*(spin_occ-Xen%f(ic,ik,i_spin))/spin_occ/real(Xk%nbz,SP)/DL_vol*real(Z_) ! - if (iq==1.and.abs(coarse_grid_Pt(i_cg))'//intc(int(1000.*G2E(Xng_tmp)))//' mHa)' + call warning(trim(mesg)) + X%ng=Xng_tmp + endif endif ! ! Fxc Checks diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 74ac9f3ac5..b6aa478c58 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -34,7 +34,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & l_rt_carriers_in_use,l_rim_w use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_global_indexes,PARALLEL_WF_index,& & PARALLEL_WF_distribute - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,& + use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,PAR_COM_QP_A2A,& & PAR_IND_Q_ibz,PAR_IND_Q_ibz_ID,PAR_IND_QP_ID,& & PAR_Q_ibz_index,n_WF_bands_to_load,HEAD_QP_cpu use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc @@ -79,14 +79,15 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! Work Space ! type(w_samp) :: Sc_W(qp%n_states) - integer :: i_qp,i_w,iqbz,iqibz,ib,ig1,ig2,alloc_err,iqs,iscs_save(2,4),& -& i_qp_to_start,iq_to_start,is,iq_mem,io_err,ID,IO_ACT,timing_steps + integer :: i_qp,i_w,iqbz,iqibz,ib,i_v,i_c,i_k,i_kmq,i_kmq_Go,i_kmq_bz,i_kmq_s,& +& i_sp_pol,ig1,ig2,iqs,i_qp_to_start,iq_to_start,is,iq_mem,& +& alloc_err,iscs_save(2,4),io_err,ID,IO_ACT,timing_steps integer :: iw integer :: X_range1,X_range2 integer :: X_rows1,X_rows2,X_cols1,X_cols2,X_nrows,X_ncols ! character(schlen):: ch,SECTION_name,W_name - logical :: X_is_TR_rotated,l_X_ALLOC_elemental,l_RIM_W_g + logical :: X_is_TR_rotated,l_X_ALLOC_elemental,fill_QP_sc,l_RIM_W_g real(SP) :: eet_cutoff0_sp(n_sp_pol),eet_cutoff0,eet_cutoff1_sp(n_sp_pol),eet_cutoff1 real(SP) :: X_ppaE,bose_PPA_E,eet_energy real(SP) :: E_kmq,f_kmq,PPA_E @@ -197,27 +198,25 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! WF distributed & load !======================= ! - if ( .not.l_sc_run ) call PARALLEL_global_indexes(E,k,q,"Self_Energy") + if ( .not.l_sc_run ) then + call PARALLEL_global_indexes(E,k,q,"Self_Energy") + call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_G_b,CLEAN_UP=.TRUE.) + call PARALLEL_WF_distribute(QP_index=PAR_IND_QP) + call PARALLEL_WF_index( ) + endif + ! + if(.not.l_sc_run) ch='-GW' + if( l_sc_run) ch='-SC' ! ! Redefine iq_to_start to be CPU-dependent ! do iqbz=1,q%nbz - if (PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) then + iqibz=q%sstar(iqbz,1) + if (PAR_IND_Q_ibz%element_1D(iqibz)) then iq_to_start=iqbz exit endif enddo - ! - if( .not.l_sc_run ) then - call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_G_b,CLEAN_UP=.TRUE.) - call PARALLEL_WF_distribute(QP_index=PAR_IND_QP) - call PARALLEL_WF_index( ) - endif - ! - ch='-GW' -#if defined _SC - if(l_sc_run) ch='-SC' -#endif ! ! wf and collisions dimension !----------------------------- @@ -261,7 +260,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! Elemental Collisions !====================== - isc%iqref=0 call elemental_collision_alloc(isc,NG=isc%ngrho,TITLE="GW") call elemental_collision_alloc(iscp,NG=isc%ngrho,TITLE="GW") ! @@ -275,9 +273,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) & PAR_IND_Q_ibz%n_of_elements(PAR_IND_Q_ibz_ID+1)*& & count( PAR_IND_G_b%element_1D(QP_n_G_bands(1):QP_n_G_bands(2)) ) ! - ch=trim(SECTION_name) + if (.not.l_sc_run) ch=trim(SECTION_name) #if defined _SC - if (l_sc_run) ch=trim(SECTION_name)//'@it'//trim(intc(it_now)) + if ( l_sc_run) ch=trim(SECTION_name)//'@it'//trim(intc(it_now)) #endif call live_timing(trim(ch),timing_steps) ! @@ -295,11 +293,12 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! Q_loop: do iqbz=iq_to_start,q%nbz ! - if (.not.PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) cycle + iqs =q%sstar(iqbz,2) + iqibz=q%sstar(iqbz,1) + ! + if (.not.PAR_IND_Q_ibz%element_1D(iqibz)) cycle ! - isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) - iqibz=isc%qs(2) - iqs =isc%qs(3) + isc%qs(2:)=(/iqibz,iqs/) ! if (iqibz/=isc%iqref) then ! @@ -461,6 +460,17 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (i_qp==QP_n_states) i_qp_to_start=1 ! + i_v=QP_table(i_qp,1) + i_c=QP_table(i_qp,2) + i_k=QP_table(i_qp,3) + i_sp_pol=spin(QP_table(i_qp,:)) + ! + i_kmq_Go=qindx_S(i_k,iqbz,2) + i_kmq_bz=qindx_S(i_k,iqbz,1) + ! + i_kmq =k%sstar(i_kmq_bz,1) + i_kmq_s=k%sstar(i_kmq_bz,2) + ! !#if defined _SC ! ! ! ! In OEP only vc matrix elements so ... no cc' no vv' @@ -469,11 +479,11 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (l_sc_srpa.and.(QP_table(i_qp,1)>E%nbf.or.QP_table(i_qp,2)<=E%nbf)) cycle !#endif ! - isc%is=(/QP_table(i_qp,1),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) - isc%os(2:)=(/k%sstar(qindx_S(isc%is(2),iqbz,1),:),spin(QP_table(i_qp,:))/) - isc%qs(1)=qindx_S(QP_table(i_qp,3),iqbz,2) + isc%is=(/i_v,i_k, 1, i_sp_pol/) + isc%os=(/0, i_kmq,i_kmq_s,i_sp_pol/) + isc%qs(1)=i_kmq_Go ! - iscp%is=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + iscp%is=(/i_c,i_k,1,i_sp_pol/) iscp%qs=isc%qs ! dc=cZERO @@ -481,10 +491,13 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! COH (using completeness relation) ! if (((l_sc_srpa.or.l_sc_coh.or.l_cohsex).and..not.COHSEX_use_empties).or.l_GW_terminator) then + ! + ! Why this is inside a iq loop if nothing depends on q ?? ! iscs_save(1,: )=isc%os iscs_save(2,:3)=isc%qs - isc%os=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + ! + isc%os=(/i_c,i_k,1,i_sp_pol/) isc%qs=(/1,1,1/) ! call scatter_Bamp_gpu(isc) @@ -616,16 +629,10 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! AF: for the time being, the SC case is treated as if g-parallelism is ! disabled ! -#if defined _SC - if (l_sc_run) then - if (PAR_COM_QP_A2A%CPU_id==0) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) - else -#endif -! if (HEAD_QP_cpu) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) - if (PAR_COM_G_b_INDEX%CPU_id==0) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) -#if defined _SC - endif -#endif + if ( l_sc_run) fill_QP_Sc=PAR_COM_QP_A2A%CPU_id==0 + if (.not.l_sc_run) fill_QP_Sc=PAR_COM_G_b_INDEX%CPU_id==0 + ! + if (fill_QP_Sc) QP_Sc(i_qp,:)=QP_Sc(i_qp,:)+dc(1) ! dc=cZERO ! @@ -640,7 +647,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (.not.PAR_IND_G_b%element_1D(ib)) cycle ! - if (q%sstar(iqbz,2)==1) call live_timing(steps=1) + if (iqs==1) call live_timing(steps=1) ! isc%os(1)=ib ! @@ -683,8 +690,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! DALV: here the grid is center in E0 forall (i_w=1:QP_dSc_steps) W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp ! - E_kmq=E%E(isc%os(1),isc%os(2),isc%os(4)) - f_kmq=E%f(isc%os(1),isc%os(2),isc%os(4)) + E_kmq=E%E(ib,i_kmq,i_sp_pol) + f_kmq=E%f(ib,i_kmq,i_sp_pol) ! ! do i_w=1,QP_dSc_steps @@ -772,7 +779,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! ! SEX ! - if (l_sc_sex.or.l_cohsex) dc(1)=-4._SP/spin_occ*pi*pre_factor*e%f(isc%os(1),isc%os(2),isc%os(4)) + if (l_sc_sex.or.l_cohsex) dc(1)=-4._SP/spin_occ*pi*pre_factor*e%f(ib,i_kmq,i_sp_pol) ! ! COH (when no empties are used the COH part is indeed calculated above) ! @@ -807,7 +814,6 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) !DEV_OMPGPU & reduction(+:dp_dummy_r,dp_dummy_i) !DEV_OMP parallel do default(shared), private(ig1,ig2,PPA_E,PPA_R,QP_ppa_EET,ctmp), & !DEV_OMP & reduction(+:dp_dummy), collapse(2) - ! do ig2=X_cols1,X_cols2 do ig1=X_rows1,X_rows2 ! @@ -820,7 +826,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if (Finite_Tel) lW=conjg(W_i) QP_ppa_EET=real(spin_occ)/(lW-eet_energy-PPA_E) #else - QP_ppa_EET= QP_ppa_EET_terminator(W_i,E,isc%is,PPA_E,ig1,ig2,isc%qs(2),& + QP_ppa_EET= QP_ppa_EET_terminator(W_i,E,isc%is,PPA_E,ig1,ig2,iqs,& & eet_cutoff0,eet_cutoff1) #endif ! @@ -869,10 +875,8 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) YAMBO_FREE_GPU(conjg_iscp_rhotw) YAMBO_FREE(conjg_iscp_rhotw) ! - l_X_ALLOC_elemental=.true. -#if defined _SC - l_X_ALLOC_elemental=l_sc_run.and.io_RESPONSE -#endif + if(.not.l_sc_run) l_X_ALLOC_elemental=.true. + if( l_sc_run) l_X_ALLOC_elemental=io_RESPONSE if(l_X_ALLOC_elemental) then do iq_mem = 1,size(X_par) call MATRIX_reset(X_par(iq_mem)) @@ -897,7 +901,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) ! AM, Sept 2019. The COH potential seems to break (in some case of a large amount) the ! energy degenerations. ! - if (.not.l_sc_run.and..not.l_rt_carriers_in_use.and.l_QP_symmetrize) then + if (.not.l_sc_run.and.(.not.l_rt_carriers_in_use).and.l_QP_symmetrize) then do i_w=1,QP_dSc_steps if (i_w==1) call QP_states_simmetrize(E,what="COHSEX Sc",V_complex=QP_Sc(:,1),warn_me=.TRUE.) if (i_w> 1) call QP_states_simmetrize(E,V_complex=QP_Sc(:,i_w)) diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 1fce02d86e..df2f8f077b 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -270,7 +270,6 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) call elemental_collision_alloc(scattering_prime,NG=X%ng,TITLE="GW") ! QP_Sc=cZERO - scattering_main%iqref=0 ! ! Main Loop !=========== diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index cd74be3e4d..c5addfede6 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -53,7 +53,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:), iscp_rhotw_p(:) ! integer :: iq,iq_ibz,is_ibz,ib,ibp,jb,i_qp - integer :: ik,ikp,iGp,i_sp_pol ! QP list + integer :: ik,ikp,ikp_Go,ikp_s,ikp_bz,i_sp_pol integer :: Sx_lower_band,Sx_upper_band(2),n_lt_bands,n_lt_steps integer :: ig_first,ig_last complex(DP) :: DP_Sx, DP_Sx_l @@ -152,7 +152,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! !!! num_threads(n_outthr) !DEV_OMP parallel default(shared), & !DEV_OMP private(isc,iscp,gamp_p,isc_rhotw_p,iscp_rhotw_p,& - !DEV_OMP & iq,iq_ibz,is_ibz,ikp,iGp,jb,DP_Sx_l), reduction(+:DP_sx) + !DEV_OMP & iq,iq_ibz,is_ibz,ikp_Go,ikp_s,ikp_bz,jb,DP_Sx_l), reduction(+:DP_sx) ! call OPENMP_update(master_thread) ! @@ -203,14 +203,17 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) ! m =QP_table(i_qp,2) ! k =QP_table(i_qp,3) ! - ikp=k%sstar(qindx_S(ik,iq,1),1) - iGp=k%sstar(qindx_S(ik,iq,1),2) + ikp_Go=qindx_S(ik,iq,2) + ikp_bz=qindx_S(ik,iq,1) ! - isc%is =(/ib, ik , 1 ,i_sp_pol/) - isc%os(2:)=(/ ikp,iGp,i_sp_pol/) - iscp%is=(/ibp,ik , 1 ,i_sp_pol/) + ikp =k%sstar(ikp_bz,1) + ikp_s=k%sstar(ikp_bz,2) ! - isc%qs(1)=qindx_S(ik,iq,2) + isc%is =(/ib, ik , 1 ,i_sp_pol/) + isc%os(2:)=(/ ikp,ikp_s,i_sp_pol/) + iscp%is=(/ibp,ik , 1 ,i_sp_pol/) + ! + isc%qs(1)=ikp_Go iscp%qs=isc%qs ! if (pp_is_uspp) then diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index 93dd1da437..053812ab29 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -129,7 +129,7 @@ subroutine XCo_local(E,Xk) endif ! if (.not.PAR_IND_WF_k%element_1D(ik)) cycle - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle ! else #endif @@ -189,7 +189,7 @@ subroutine XCo_local(E,Xk) #if defined _RT if (l_real_time) then if (.not.PAR_IND_WF_k%element_1D(ik)) cycle - if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1)-1 )) cycle + if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib-H_ref_bands(1)+1,ibp-H_ref_bands(1)+1) )) cycle else #endif if (.not.PAR_IND_WF_linear%element_2D(ib,ik)) cycle diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index 52d48c2a5e..e46d6cdb05 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,9 +3,9 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o RT_small_a.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ - RT_Fluence_and_PI_kind.o RT_Rabi_frequency.o RT_Rabi_frequency_ALL_and_print.o + RT_Fluence_and_PI_kind.o RT_Rabi_frequency.o RT_Rabi_frequency_ALL_and_print.o RT_field_from_file.o #endif diff --git a/src/real_time_control/DOUBLE_project.dep b/src/real_time_control/DOUBLE_project.dep index db06478179..eafede5b35 100644 --- a/src/real_time_control/DOUBLE_project.dep +++ b/src/real_time_control/DOUBLE_project.dep @@ -27,5 +27,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o + RT_small_a.o RT_update_TIME_CONF_descriptions.o diff --git a/src/real_time_control/NL_project.dep b/src/real_time_control/NL_project.dep new file mode 100644 index 0000000000..bbbad1cf24 --- /dev/null +++ b/src/real_time_control/NL_project.dep @@ -0,0 +1,2 @@ + RT_databases_IO.o + diff --git a/src/real_time_control/RT_Fluence_and_PI_kind.F b/src/real_time_control/RT_Fluence_and_PI_kind.F index b7b1142f35..e4a77cacef 100644 --- a/src/real_time_control/RT_Fluence_and_PI_kind.F +++ b/src/real_time_control/RT_Fluence_and_PI_kind.F @@ -24,7 +24,7 @@ subroutine RT_Fluence_and_PI_kind(En,i_field) type(gauge_field) :: A ! logical :: l_print_rabi - integer :: it0,it,last_it_evaluated,NE_i_time_save + integer :: it0,itmax,it,last_it_evaluated,NE_i_time_save real(SP) :: I(NE_steps),Omega(NE_steps),T(NE_steps) ! real(SP),external :: RIntegrate,RT_Rabi_frequency @@ -58,12 +58,21 @@ subroutine RT_Fluence_and_PI_kind(En,i_field) Efield(i_field)%pi_kind=0._SP ! it0=Efield(i_field)%t_initial_indx + itmax=nint(Efield(i_field)%width/RT_step) + ! + if ( index(Efield(i_field)%ef_name,'QSSIN')>0 .or. & + & index(Efield(i_field)%ef_name,'QSFIELD')>0 .or. & + & index(Efield(i_field)%ef_name,'GAUSS')>0 ) then + itmax=10*itmax + else + itmax=itmax+10 + endif ! do it=it0,NE_steps ! T(it)=it*RT_step ! - if ((it-it0)>6*nint(Efield(i_field)%width/RT_step)) exit + if ((it-it0)>itmax) exit ! NE_i_time=it ! diff --git a/src/real_time_control/RT_Observables.F b/src/real_time_control/RT_Observables.F index 8b3e250b0d..1d2b89638a 100644 --- a/src/real_time_control/RT_Observables.F +++ b/src/real_time_control/RT_Observables.F @@ -14,7 +14,7 @@ subroutine RT_Observables(en,k,dG_lesser,OBSERVABLES) ! use pars, ONLY:SP use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use real_time, ONLY:RT_nk,RT_bands use fields, ONLY:A_tot use timing_m, ONLY:timing @@ -23,7 +23,7 @@ subroutine RT_Observables(en,k,dG_lesser,OBSERVABLES) ! type(levels), intent(inout) :: en type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk) + complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol) real(SP), intent(inout) :: OBSERVABLES(25) ! ! Workspace diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index 53141f5f30..38de787447 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -22,10 +22,10 @@ subroutine RT_alloc(en,what) & RT_RTA_H_occ_infty,l_RT_relax_time_approx use RT_lifetimes, ONLY:RT_EL_lifetimes_alloc,RT_PH_lifetimes_alloc use real_time, ONLY:RT_levels,RT_is_dynamically_dephased,& -& Ho_plus_Sigma,H_EQ,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& +& Ho_plus_Sigma,H_EQ,H_field,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& & dG_lesser,G_lesser,MEM_pointer,G_MEM_steps,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,RT_bands,RT_nk,l_RT_is_WFfree,l_RT_rotate_DM,& -& l_velocity_gauge_corr +& l_velocity_gauge_corr,dG_avg ! #include ! @@ -72,13 +72,17 @@ subroutine RT_alloc(en,what) ! YAMBO_ALLOC(H_EQ,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol)) ! + YAMBO_ALLOC(H_field,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol)) + ! if (l_velocity_gauge_corr) then YAMBO_ALLOC(H_pseudo_eq,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) endif ! if(l_use_Hxc_collisions) then YAMBO_ALLOC(RT_Vnl_xc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) - RT_Vnl_xc=(0._SP,0._SP) + RT_Vnl_xc=cZERO + YAMBO_ALLOC(dG_avg,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) + dG_avg=cZERO endif ! YAMBO_ALLOC(HARTREE0,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nXkibz,n_sp_pol)) @@ -88,9 +92,9 @@ subroutine RT_alloc(en,what) XC0=cZERO ! ! G's ... - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),G_MEM_steps)) - YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),G_MEM_steps)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol,G_MEM_steps)) + YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nk(1):nk(2),n_sp_pol,G_MEM_steps)) G_lesser_reference=cZERO dG_lesser =cZERO G_lesser =cZERO diff --git a/src/real_time_control/RT_average_operator.F b/src/real_time_control/RT_average_operator.F index f4fa0c2d1e..979564e530 100644 --- a/src/real_time_control/RT_average_operator.F +++ b/src/real_time_control/RT_average_operator.F @@ -26,7 +26,7 @@ subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& ! type(bz_samp), intent(in) :: k type(levels), intent(in) :: en - complex(SP), intent(in) :: G(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: G(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) integer, intent(in) :: nK_mem,N_V ! ! Optionals @@ -107,7 +107,7 @@ subroutine RT_average_operator(N_V,O_VALUE,V_VALUE,O_REAL,O_QP,O_MATRIX,& if(N_V> 1) Hk(:,:,i_cmp)=Hk_vec_tmp(i_cmp,:,:) endif ! - VALUE_tmp(i_cmp)=VALUE_tmp(i_cmp)-cI*Vstar_dot_V_omp(RT_bands2,Hk(:,:,i_cmp),G(:,:,ik))*RTibz%weights(ik) + VALUE_tmp(i_cmp)=VALUE_tmp(i_cmp)-cI*Vstar_dot_V_omp(RT_bands2,Hk(:,:,i_cmp),G(:,:,ik,i_sp_pol))*RTibz%weights(ik) ! enddo ! diff --git a/src/real_time_control/RT_carriers_number.F b/src/real_time_control/RT_carriers_number.F index 2af013e03d..05f4fa4a79 100644 --- a/src/real_time_control/RT_carriers_number.F +++ b/src/real_time_control/RT_carriers_number.F @@ -9,7 +9,7 @@ subroutine RT_carriers_number(en,k,Ncarr) ! use pars, ONLY:SP use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use RT_control, ONLY:NE_i_start_time use RT_occupations, ONLY:RT_el_occ,RT_ho_occ use real_time, ONLY:RTibz,NE_i_time,RT_levels,RT_bands @@ -22,28 +22,30 @@ subroutine RT_carriers_number(en,k,Ncarr) ! ! Workspace ! - integer :: ib,ik,ik_RT + integer :: ib,ik,ik_RT,i_Sp real(SP) :: VALUE_tmp(2) ! ! Electrons and holes number ! Ncarr = 0._SP ! + do i_sp=1,n_sp_pol do ik=1,en%nk do ib=RT_bands(1),RT_bands(2) VALUE_tmp=0._SP do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) - if ( RT_levels%E(ib,ik_RT,1)<=0._SP ) then - if (NE_i_time==NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)+RT_ho_occ%N(ib,ik_RT)*RTibz%weights(ik_RT) - if (NE_i_time/=NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)-RT_el_occ%dN(ib,ik_RT)*RTibz%weights(ik_RT) + if ( RT_levels%E(ib,ik_RT,i_sp)<=0._SP ) then + if (NE_i_time==NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)+RT_ho_occ%N(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) + if (NE_i_time/=NE_i_start_time) VALUE_tmp(1)=VALUE_tmp(1)-RT_el_occ%dN(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) else - if (NE_i_time==NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%N(ib,ik_RT)*RTibz%weights(ik_RT) - if (NE_i_time/=NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%dN(ib,ik_RT)*RTibz%weights(ik_RT) + if (NE_i_time==NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%N(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) + if (NE_i_time/=NE_i_start_time) VALUE_tmp(2)=VALUE_tmp(2)+RT_el_occ%dN(ib,ik_RT,i_sp)*RTibz%weights(ik_RT) endif enddo Ncarr(2:3)=Ncarr(2:3)+VALUE_tmp enddo enddo + enddo ! Ncarr(1)=Ncarr(2)-Ncarr(3) ! diff --git a/src/real_time_control/RT_carriers_object.F b/src/real_time_control/RT_carriers_object.F index d736640658..2d137d3bd0 100644 --- a/src/real_time_control/RT_carriers_object.F +++ b/src/real_time_control/RT_carriers_object.F @@ -53,6 +53,7 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) i_b =RT%table(i_RT,1) i_k =RT%table(i_RT,2) i_k_RT =RT%table(i_RT,3) + i_spin =RT%table(i_RT,4) call RT_lifetime_to_RT_obj(WHAT,i_b,i_k_RT,i_RT,RT_EH_life,RT_EH_ref_life,RT%GAMMA_EH) call RT_lifetime_to_RT_obj(WHAT,i_b,i_k_RT,i_RT,RT_EE_life,RT_EE_ref_life,RT%GAMMA_EE) call RT_lifetime_to_RT_obj(WHAT,i_b,i_k_RT,i_RT,RT_EP_emit_life,RT_EP_emit_ref_life,RT%GAMMA_EP_emit) @@ -68,7 +69,7 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! RT%nk=RT_nk RT%nb=RT_bands - RT%nstates=RT_nk*(RT_bands(2)-RT_bands(1)+1) + RT%nstates=RT_nk*(RT_bands(2)-RT_bands(1)+1)*n_sp_pol ! call RT_obj_alloc(RT) ! @@ -115,8 +116,8 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! ! Occupations & Energies ! - if (allocated(RT_el_occ%dN)) RT_el_occ%dN(i_b,i_k_RT) =RT%OCC_el%dN(i_RT) - if (allocated(RT_levels%E) ) RT_levels%E(i_b,i_k_RT,i_spin)=RT%delta_E(i_RT)+RT%E_bare(i_RT) + if (allocated(RT_el_occ%dN)) RT_el_occ%dN(i_b,i_k_RT,i_spin)=RT%OCC_el%dN(i_RT) + if (allocated(RT_levels%E) ) RT_levels%E(i_b,i_k_RT,i_spin) =RT%delta_E(i_RT)+RT%E_bare(i_RT) ! enddo ! @@ -131,7 +132,7 @@ subroutine RT_carriers_object(RT,E,K,DB_id,WHAT) ! ! Occupations & Energies ! - RT%OCC_el%dN(i_RT)=RT_el_occ%dN(i_b,i_k_RT) + RT%OCC_el%dN(i_RT)=RT_el_occ%dN(i_b,i_k_RT,i_spin) RT%delta_E(i_RT) =RT_levels%E(i_b,i_k_RT,i_spin)-RT%E_bare(i_RT) ! f_occ =RT%OCC_el%N_ref(i_RT)/spin_occ diff --git a/src/real_time_control/RT_current_AND_polarization.F b/src/real_time_control/RT_current_AND_polarization.F index c6a039bf83..bf0ec25dc9 100644 --- a/src/real_time_control/RT_current_AND_polarization.F +++ b/src/real_time_control/RT_current_AND_polarization.F @@ -23,7 +23,7 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) use units, ONLY:SPEED_OF_LIGHT use R_lattice, ONLY:bz_samp use D_lattice, ONLY:DL_vol - use electrons, ONLY:nel,levels,n_spin,Spin_magn,Orbital_magn,Itinerant_magn + use electrons, ONLY:nel,levels,n_spin,n_sp_pol,spin_occ,Spin_magn,Orbital_magn,Itinerant_magn use real_time, ONLY:l_NE_dynamics,RT_ind_J,RT_ind_J_prev,RT_bands,& & RT_P,RT_spin_magn,RT_orbt_magn,RT_P_prev,G_lesser_reference,NE_i_time,& & RT_dyn_step,l_P_integrating_J,l_velocity_gauge_diam,integrator_step @@ -37,13 +37,14 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) ! type(bz_samp), intent(in) :: k type(levels), intent(in) :: E - complex(SP), intent(in) :: G_input(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) type(gauge_field), intent(in) :: A_input - real(SP), intent(in) :: Ncarr(3) + real(SP), intent(in) :: Ncarr(3) + complex(SP), intent(in) :: G_input(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work Space ! complex(SP) :: RT_M_tmp(3) + integer :: nel_effect ! if ( .not. l_NE_dynamics ) return ! @@ -64,7 +65,13 @@ subroutine RT_current_AND_polarization(k,E,G_input,A_input,Ncarr) ! (it will be computed from the current in the velocity gauge) ! The proper value is set in RT_propagate_fields ! - if(l_velocity_gauge_diam) RT_ind_J(:)=RT_ind_J(:)+A_input%vecpot(:)*real(nel,SP)/(2._SP*SPEED_OF_LIGHT) + if(l_velocity_gauge_diam) then + ! The diamagnetic term is needed to obtain a gauge invariant current + ! However the below definition of nel_effect would be exact + ! only in the limit RT_bands(2) --> \infty + nel_effect=nel-(RT_bands(1)-1)*spin_occ + RT_ind_J(:)=RT_ind_J(:)+A_input%vecpot(:)*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) + endif ! RT_ind_J=RT_ind_J/DL_vol ! diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index 24f4aa0be0..4f47e7c1d7 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -8,24 +8,24 @@ subroutine RT_databases_IO(E,DO_IT) ! use electrons, ONLY:n_spin,levels - use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,& + use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,Vbands_RT_IO_t,& & Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_steps_now,CACHE_OBS_steps, & & SAVE_G_history,NE_i_start_time,CACHE_OBS_last_point,Gless_RT_IO_t,RT_DB_ID,& -& RT_return_db_ID,RT_DB_name +& RT_return_db_ID,RT_DB_name,SAVE_Vb_history #if defined _ELPH_ITERATIVE use RT_lifetimes, ONLY:l_RT_iterative_ELPH_lifetimes #endif use real_time, ONLY:NE_i_time,NE_steps,RT_nk,RT_ind_J,RT_P,RT_spin_magn,RT_orbt_magn,& & l_NE_with_fields,RT_step,RT_dyn_step,NE_time,RT_carriers,G_MEM_steps use IO_int, ONLY:io_control,IO_and_Messaging_switch - use IO_m, ONLY:manage_action,NONE,io_GF,io_CARRIERs,io_OBSERVABLES,OP_APP_CL,OP_WR_CL,& + use IO_m, ONLY:manage_action,NONE,io_GF,io_CARRIERs,io_OBSERVABLES,io_V_bands,OP_APP_CL,OP_WR_CL,& & OP_IF_START_APP_CL_IF_END,WR_CL_IF_END,OP_APP,WR_CL,WR,OP_APP,OP_WR use parallel_m, ONLY:PAR_G_k_range,myid,HEAD_k_cpu use parallel_int, ONLY:PP_wait,PP_redux_wait,PP_bcast use timing_m, ONLY:timing use fields, ONLY:A_tot #if defined _PAR_IO - use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX + use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,master_cpu #else use real_time, ONLY:RTibz use parallel_m, ONLY:PAR_IND_Xk_ibz,ncpu,myid @@ -47,7 +47,7 @@ subroutine RT_databases_IO(E,DO_IT) ! ! ... G_lesser ! - integer :: ik,G_IO_steps,io_G,i_cpu,i_G_db,i_G_k_db,i_G_RES_db,i_G_RES_k_db + integer :: ik,G_IO_steps,io_G,io_Vb,i_cpu,i_G_db,i_G_k_db,i_G_RES_db,i_G_RES_k_db,idb_Vb,idb_Vb_k #if defined _ELPH_ITERATIVE integer :: io_THETA #endif @@ -253,8 +253,56 @@ subroutine RT_databases_IO(E,DO_IT) ! endif ! +#if defined _NL + ! + ! V_bands + !==================== + if (io_V_bands) then + ! +#if !defined _PAR_IO + call error(" Vbands restart not coded for serial I/O") +#endif + ! + idb_Vb =RT_return_db_ID("V_bands") + idb_Vb_k =RT_return_db_ID("V_bands_K_section") + ! + ! Serial SECTION 1 + ! + if(NE_i_time==NE_i_start_time) then + if (NE_i_time==1) IO_ACT=OP_WR_CL + if (NE_i_time> 1) IO_ACT=OP_APP_CL + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/1/),ID=RT_DB_ID(idb_Vb)) + io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb)) + endif + ! + if (RT_do_it('Vb').or.DO_IT) then + ! + if (.not.SAVE_Vb_history) Vbands_RT_IO_t%N=1 + if ( SAVE_Vb_history) Vbands_RT_IO_t%N=Vbands_RT_IO_t%N+1 + Vbands_RT_IO_t%Time(Vbands_RT_IO_t%N)=NE_time + ! + IO_ACT=manage_action(OP_IF_START_APP_CL_IF_END,NE_i_time,NE_i_start_time,NE_steps) + ! + ! SERIAL SECTION 2 + ! + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/2/),ID=RT_DB_ID(idb_Vb)) + io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb)) + ! + ! (PARALLEL) k-SECTION 3 + ! + !call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k),COMM=PAR_COM_Xk_ibz_INDEX,DO_IT=HEAD_k_CPU) + call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/3/),ID=RT_DB_ID(idb_Vb_k)) + io_Vb=io_RT_components("V_bands_K_section",RT_DB_ID(idb_Vb_k)) + ! + endif + ! + endif + ! +#endif + ! if (RT_do_it('OBS').or.DO_IT ) call PP_bcast( OBS_RT_IO_t%last_point,0) if (RT_do_it('CARR').or.DO_IT) call PP_bcast(CARR_RT_IO_t%last_point,0) + if (RT_do_it('Vb').or.DO_IT) call PP_bcast(Vbands_RT_IO_t%last_point,0) if (RT_do_it('G').or.DO_IT) call PP_bcast(Gless_RESTART_RT_IO_t%last_point,0) if (RT_do_it('G').or.DO_IT) call PP_bcast(Gless_RT_IO_t%last_point,0) ! diff --git a/src/real_time_control/RT_do_it.F b/src/real_time_control/RT_do_it.F index a65deb92ed..6fab85cabe 100644 --- a/src/real_time_control/RT_do_it.F +++ b/src/real_time_control/RT_do_it.F @@ -7,7 +7,7 @@ ! logical function RT_do_it(what) ! - use RT_control, ONLY:OBS_RT_IO_t,Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_INTERVAL_time,& + use RT_control, ONLY:OBS_RT_IO_t,Gless_RESTART_RT_IO_t,Vbands_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_INTERVAL_time,& & CACHE_OBS_last_point,OUTPUT_RT_IO_t,NE_i_start_time,STOP_the_dynamics_NOW use real_time, ONLY:NE_i_time,RT_step,NE_time_step_update_jump,NE_time_step_update_last_point ! @@ -41,6 +41,10 @@ logical function RT_do_it(what) INTERVAL_steps=Gless_RESTART_RT_IO_t%INTERVAL_steps last_point =Gless_RESTART_RT_IO_t%last_point endif + if (what=="Vb") then + INTERVAL_steps=Vbands_RT_IO_t%INTERVAL_steps + last_point =Vbands_RT_IO_t%last_point + endif if (what=="OBS_cache") then INTERVAL_steps=nint(CACHE_OBS_INTERVAL_time/RT_step) last_point =CACHE_OBS_last_point @@ -58,7 +62,7 @@ logical function RT_do_it(what) ! ! Do we STOP now ? !================== - if (what=="G".and.RT_do_it) then + if ((what=="G".or.what=="Vb").and.RT_do_it) then STOP_the_dynamics_NOW=STOP_now(.FALSE.) endif ! diff --git a/src/real_time_control/RT_energy_components.F b/src/real_time_control/RT_energy_components.F index f37fcf6c83..f139d1a8c5 100644 --- a/src/real_time_control/RT_energy_components.F +++ b/src/real_time_control/RT_energy_components.F @@ -10,7 +10,7 @@ subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) use pars, ONLY:SP,cZERO use DIPOLES, ONLY:P_square use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels,n_spin + use electrons, ONLY:levels,n_spin,n_sp_pol use hamiltonian, ONLY:V_hartree_sc,Hzero use units, ONLY:HA2EV use FFT_m, ONLY:fft_size @@ -26,12 +26,12 @@ subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) ! type(levels), intent(in) :: en type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) real(SP), intent(out):: Energies(5),dE_IP character(3), intent(in) :: what ! real(SP) , allocatable :: E_xc_rt(:,:) - complex(SP) :: G_full(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)), & + complex(SP) :: G_full(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol), & & dE_tot,dE_kin,dE_ion,dE_h,dE_xc,dE_hxc,dE_h_sc,E_xc_sc,E_xc_ref,dE_xc_sc,dE_hxc_sc ! if(.not.eval_energy) return @@ -51,7 +51,7 @@ subroutine RT_energy_components(en,k,dG_lesser,Energies,dE_IP,what) dE_hxc_sc =cZERO ! if( trim(what)=='el') G_full=dG_lesser - if(.not.trim(what)=='el') G_full=dG_lesser+G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2)) + if(.not.trim(what)=='el') G_full=dG_lesser+G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:) ! ! Non-interacting energy variation ! diff --git a/src/real_time_control/RT_entropy.F b/src/real_time_control/RT_entropy.F index 5f54f0c15f..91ab0b5a75 100644 --- a/src/real_time_control/RT_entropy.F +++ b/src/real_time_control/RT_entropy.F @@ -10,7 +10,7 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) use pars, ONLY:SP,cZERO,rZERO use R_lattice, ONLY:bz_samp use units, ONLY:HA2KEL - use electrons, ONLY:levels,spin_occ + use electrons, ONLY:levels,spin_occ,n_sp_pol use RT_occupations, ONLY:RT_el_occ,RT_ho_occ use real_time, ONLY:RT_bands,eval_entropy,RT_levels,RTibz use parallel_m, ONLY:PAR_G_k_range @@ -19,18 +19,18 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) ! type(levels), intent(in) :: en type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_lesser(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) real(SP), intent(in) :: E_IP real(SP), intent(out) :: TEntr(3) real(SP), intent(inout) :: Entr(3),EnEntr(3) ! ! Workspace ! - integer :: ib1,ib2,ik,ik_RT,i1 + integer :: ib1,ib2,ik,ik_RT,i1,i_sp real(SP) :: Energies_e(5),Energies_h(5),tmp_E(2),Entr_prev(3),EnEntr_prev(3), & & S_e,S_h,VALUE_tmp(3),one_over_T - complex(SP) :: dG_lesser_h(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)), & -& dG_lesser_e(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP) :: dG_lesser_h(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol), & +& dG_lesser_e(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! TEntr=rZERO Entr=rZERO @@ -48,17 +48,19 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) dG_lesser_h=cZERO dG_lesser_e=cZERO ! + do i_sp=1,n_sp_pol do ik_RT=PAR_G_k_range(1),PAR_G_k_range(2) do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) - if ( RT_levels%E(ib1,ik_RT,1)<=0._SP .and. RT_levels%E(ib2,ik_RT,1)<=0._SP ) then - dG_lesser_h(ib1,ib2,ik_RT)=dG_lesser(ib1,ib2,ik_RT) - else if ( RT_levels%E(ib1,ik_RT,1)> 0._SP .and. RT_levels%E(ib2,ik_RT,1)> 0._SP ) then - dG_lesser_e(ib1,ib2,ik_RT)=dG_lesser(ib1,ib2,ik_RT) + if ( RT_levels%E(ib1,ik_RT,i_sp)<=0._SP .and. RT_levels%E(ib2,ik_RT,i_sp)<=0._SP ) then + dG_lesser_h(ib1,ib2,ik_RT,i_sp)=dG_lesser(ib1,ib2,ik_RT,i_sp) + else if ( RT_levels%E(ib1,ik_RT,i_sp)> 0._SP .and. RT_levels%E(ib2,ik_RT,i_sp)> 0._SP ) then + dG_lesser_e(ib1,ib2,ik_RT,i_sp)=dG_lesser(ib1,ib2,ik_RT,i_sp) endif enddo enddo enddo + enddo ! ! ! Compute IP energy @@ -71,22 +73,24 @@ subroutine RT_entropy(en,k,dG_lesser,Entr,TEntr,EnEntr,E_IP) ! Entr= 0._SP ! + do i_sp=1,n_sp_pol do ik=1,en%nk do ib1=RT_bands(1),RT_bands(2) VALUE_tmp=0._SP do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) S_h=0._SP S_e=0._SP - if(RT_ho_occ%N(ib1,ik_RT)>0._SP) S_h=-RT_ho_occ%N(ib1,ik_RT)*log(RT_ho_occ%N(ib1,ik_RT)/spin_occ) - if(RT_el_occ%N(ib1,ik_RT)>0._SP) S_e=-RT_el_occ%N(ib1,ik_RT)*log(RT_el_occ%N(ib1,ik_RT)/spin_occ) + if(RT_ho_occ%N(ib1,ik_RT,i_sp)>0._SP) S_h=-RT_ho_occ%N(ib1,ik_RT,i_sp)*log(RT_ho_occ%N(ib1,ik_RT,i_sp)/spin_occ) + if(RT_el_occ%N(ib1,ik_RT,i_sp)>0._SP) S_e=-RT_el_occ%N(ib1,ik_RT,i_sp)*log(RT_el_occ%N(ib1,ik_RT,i_sp)/spin_occ) VALUE_tmp(1)=VALUE_tmp(1)+S_e+S_h - if ( RT_levels%E(ib1,ik_RT,1)<=0._SP ) VALUE_tmp(2)=VALUE_tmp(2)+S_h - if ( RT_levels%E(ib1,ik_RT,1)> 0._SP ) VALUE_tmp(3)=VALUE_tmp(3)+S_e + if ( RT_levels%E(ib1,ik_RT,i_sp)<=0._SP ) VALUE_tmp(2)=VALUE_tmp(2)+S_h + if ( RT_levels%E(ib1,ik_RT,i_sp)> 0._SP ) VALUE_tmp(3)=VALUE_tmp(3)+S_e VALUE_tmp=VALUE_tmp*RTibz%weights(ik_RT) enddo Entr=Entr+VALUE_tmp enddo enddo + enddo ! ! Temperature derived from Entropy to Energy variation ratio ! diff --git a/src/real_time_control/RT_field_from_file.F b/src/real_time_control/RT_field_from_file.F new file mode 100644 index 0000000000..1ebd984dc6 --- /dev/null +++ b/src/real_time_control/RT_field_from_file.F @@ -0,0 +1,104 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine RT_load_field_from_file_init(filename) + ! + use com, ONLY:com_path + use fields, ONLY:field_from_file_steps + ! + implicit none + ! + character(*), intent(in) :: filename + ! + integer :: n_time_steps + ! + open(unit=99,file=trim(filename)) + read(99,*) n_time_steps + close(99) + field_from_file_steps=max(field_from_file_steps,n_time_steps) + ! +end subroutine RT_load_field_from_file_init +! +! +subroutine RT_load_field_from_file(filename,i_field) + ! + use real_time, ONLY:RT_step + use com, ONLY:com_path + use pars, ONLY:n_ext_fields_max,SP + use fields, ONLY:Efield,field_from_file,field_from_file_fname,field_from_file_steps + ! + implicit none + ! + character(*), intent(in) :: filename + integer, intent(in) :: i_field + ! + integer :: i1,i_field_file,n_time_steps + ! + i_field_file=-1 + do i1=1,n_ext_fields_max + if ( field_from_file_fname(i1)/="" ) cycle + i_field_file=i1 + exit + enddo + ! + field_from_file_fname(i_field_file)=filename + ! + if(i_field_file==1) then + allocate(field_from_file(field_from_file_steps,7,n_ext_fields_max)) + field_from_file=0._SP + endif + open(unit=99,file=trim(filename)) + read(99,*) n_time_steps + do i1=1,n_time_steps + read(99,*) field_from_file(i1,:,i_field_file) + enddo + close(99) + ! + Efield(i_field)%t_final_indx=(n_time_steps-8)/2+Efield(i_field)%t_initial_indx-1 + Efield(i_field)%t_final=RT_step*(Efield(i_field)%t_final_indx-1) + ! +end subroutine RT_load_field_from_file +! +! +subroutine RT_print_field_to_file_init(i_field) + ! + use stderr, ONLY:intc + use com, ONLY:com_path + use pars, ONLY:schlen + use fields, ONLY:Efield + ! + implicit none + ! + integer, intent(in) :: i_field + ! + integer :: n_time_steps + character(schlen) :: filename + ! + filename="RT_EXTFIELD_"//trim(intc(i_field))//".time" + ! + n_time_steps=(Efield(i_field)%t_final_indx-Efield(i_field)%t_initial_indx+1)*2+8 + ! + open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) + write(99+i_field,*) n_time_steps + ! +end subroutine RT_print_field_to_file_init diff --git a/src/real_time_control/RT_free.F b/src/real_time_control/RT_free.F index 0a2ed16823..80a66e0864 100644 --- a/src/real_time_control/RT_free.F +++ b/src/real_time_control/RT_free.F @@ -15,8 +15,8 @@ subroutine RT_free( ) #endif use hamiltonian, ONLY:H_free use xc_functionals, ONLY:E_xc - use real_time, ONLY:DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,& -& Ho_plus_Sigma,H_EQ,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& + use real_time, ONLY:DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,dG_avg,& +& Ho_plus_Sigma,H_EQ,H_field,H_pseudo_eq,RT_Vnl_xc,HARTREE0,XC0,G_lesser_reference,& & dG_lesser,G_lesser,MEM_pointer,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,DbGd_EE_scatt_table,RT_TIME_status,REF_V_xc_sc,& & RT_levels,I1_matrix,RT_Deph_Matrix,RTibz @@ -46,8 +46,10 @@ subroutine RT_free( ) ! YAMBO_FREE(Ho_plus_Sigma) YAMBO_FREE(H_EQ) + YAMBO_FREE(H_field) YAMBO_FREE(H_pseudo_eq) YAMBO_FREE(RT_Vnl_xc) + YAMBO_FREE(dG_avg) ! YAMBO_FREE(HARTREE0) YAMBO_FREE(XC0) diff --git a/src/real_time_control/RT_output.F b/src/real_time_control/RT_output.F index 1bd1c9825a..2d6db4477e 100644 --- a/src/real_time_control/RT_output.F +++ b/src/real_time_control/RT_output.F @@ -176,6 +176,8 @@ subroutine RT_output(what,VALUES,TIME,E) case('total_field') data_to_dump(2:4) = -real(A_tot%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 data_to_dump(5:7) =-aimag(A_tot%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 + case('YPP-Field') + data_to_dump(2) = -real(A_ext%vecpot_vel(1))*AU2VMm1 !/SPEED_OF_LIGHT case('external_field') data_to_dump(2:4) = -real(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 data_to_dump(5:7) =-aimag(A_ext%vecpot_vel(:))/SPEED_OF_LIGHT*AU2VMm1 diff --git a/src/real_time_control/RT_output_INIT.F b/src/real_time_control/RT_output_INIT.F index 28b046518f..ca3fe51de0 100644 --- a/src/real_time_control/RT_output_INIT.F +++ b/src/real_time_control/RT_output_INIT.F @@ -43,6 +43,7 @@ subroutine RT_output_INIT( ) call RT_FILE_add(name='probe-polarization',TITLES=(/"Time[fs]","Pol_x ","Pol_y ","Pol_z "/)) call RT_FILE_add(name='pump-current',TITLES=(/"Time[fs]","j_x ","j_y ","j_z "/)) call RT_FILE_add(name='pump-polarization',TITLES=(/"Time[fs]","Pol_x ","Pol_y ","Pol_z "/)) + call RT_FILE_add(name='Field',TITLES=(/"Time[fs]"," E(t) "/)) ! do i_fp=1,3 if (i_fp==1) dumb_ch="external_field" diff --git a/src/real_time_control/RT_project.dep b/src/real_time_control/RT_project.dep index db06478179..eafede5b35 100644 --- a/src/real_time_control/RT_project.dep +++ b/src/real_time_control/RT_project.dep @@ -27,5 +27,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o + RT_small_a.o RT_update_TIME_CONF_descriptions.o diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F new file mode 100644 index 0000000000..165bf3ba83 --- /dev/null +++ b/src/real_time_control/RT_small_a.F @@ -0,0 +1,393 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM CA DS +! +! External fields: +! +! SIN: E(t)=\theta(t) * sin(t) +! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 +! DELTA: E(t)= \delta(t) +! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) +! THETA: E(t)= \theta(t) +! RES: E(t)= \theta(t)*exp(-i\omega t) +! ANTIRES: E(t)= \theta(t)*exp(i\omega t) +! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) +! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) +! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) +! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) +! QSFIELD: see below +! FROMFILE: shape of the electric field from file +! +! Linear frequency chirp coded for QSSIN pulse: +! (see also https://www.rp-photonics.com/chirp.html) +! +! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) +! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) +! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) +! +! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! +! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) +! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] +! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! +! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) +! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] +! +! +function small_a(T,dt,E_field,order,envelop_only) + ! + ! The vector potential is generally written as + ! + ! order=0 A (t)=-cEo a (t) theta(t) + ! order=1 A'(t)=-cEo (a'(t) theta(t)+a (t) delta(t)) + ! order=2 A"(t)=-cEo (a"(t) theta(t)+a'(t) delta(t)-a(t) sign(t)) + ! + ! the functions theta,delta and sign can be the standard distributions + ! or more fancy functions that can mimic the distributions. + ! + ! Note that A is evolved using A''(t) starting from A(0) and A'(0). + ! + use X_m, ONLY:global_gauge + use pars, ONLY:SP,cI,cONE,cZERO,pi,schlen + use units, ONLY:FS2AUT + use stderr, ONLY:STRING_split + use wrapper, ONLY:FADEVA + use functions, ONLY:theta_function + use fields, ONLY:ext_field,get_field_file_index,field_frequency,& + & field_from_file,n_fields_defs_max + ! + implicit none + ! + complex(SP), dimension(2) :: small_a + ! + type(ext_field), intent(inout) ::E_field + ! + real(SP), intent(in) ::T,dt + integer, intent(in) ::order + logical, intent(in), optional :: envelop_only + ! + ! Workspace + ! + real(SP) ::damp_func,a,b,c,sarg,WT,Tl + ! + integer ::i1,i_fr,i_T,i_field,i_file,n_fields,n_freqs + real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & + & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt + complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z + character(schlen) ::field_defs(n_fields_defs_max) + logical ::l_multi_phase,envelop_only_ + ! + ! Zeroing + ! + small_a=cZERO + f_t=cZERO + damp_func=1._SP + ! + envelop_only_=.false. + if(present(envelop_only)) envelop_only_=envelop_only + ! + if(trim(E_field%ef_pol)=="linear" ) n_fields=1 + if(trim(E_field%ef_pol)=="circular") n_fields=2 + ! + ! Field parameters + ! + sigma=E_field%width + chirp=E_field%chirp + ! + s_sigma_chirp=cZERO + c_sigma_chirp=cZERO + ! + if (abs(sigma)>0._SP .or. abs(chirp)>0._SP) then + s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) + c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) + endif + ! + sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) + ! + n_freqs=max(1,E_field%n_frequencies) + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + Tloc=T + if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma + ! + select case( trim(field_defs(1)) ) + case('STATIC','RECT','RECTSIN','SIN','DELTA') + ! Fields which do not need T_0 + W_0=0._SP + T_0=0._SP + damp_func=1._SP + ! DEBUG < + ! damping for sin + !if (sigma>0._SP) then + ! T_0=5*sigma + ! damp_func=1._SP + ! if (TNE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) + !endif + ! DEBUG > + case('FROM_FILE') + i_file=get_field_file_index(field_defs(2)) + T_0=field_from_file(1,1,i_file)*FS2AUT + W_0=0._SP + damp_func=1._SP + case('SOFTSIN','THETA') + ! Fields which do not need T_0 and with damp_func + W_0=0._SP + T_0=0._SP + a = 3._SP/sigma**4 + b = -8._SP/sigma**3 + c = 6._SP/sigma**2 + damp_func=1._SP + if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) + case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') + ! Fields which need T_0 + W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP + T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff + if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff + if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff + if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff + T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) + if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac + end select + ! + ! Initial and relative phases control + l_multi_phase=.false. + fr_shift(1)=0._SP + fr_shift(2)=pi/2._SP + do i1=1,n_fields_defs_max + if( trim(field_defs(i1))=="PHPI180") fr_shift(:)=fr_shift(:)+pi ! 180 deg + if( trim(field_defs(i1))=="PHPI120") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 120 deg + if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi/2._SP ! 90 deg + if( trim(field_defs(i1))=="PHPI60") fr_shift(:)=fr_shift(:)+pi/3._SP ! 60 deg + if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/6._SP ! 30 deg + if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi/9._SP ! 20 deg + if( trim(field_defs(i1))=="PHMULT" .and. n_freqs>1) l_multi_phase=.true. + enddo + ! + E_field%To=T_0 + ! + do i_field=1,n_fields + do i_fr=1,n_freqs + ! + W_field=field_frequency(E_field,i_fr) + W_field_m1=1._SP/W_field + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and + WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase + if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 + ! + if (envelop_only_) then + f0t=cONE ; f1t=cONE + else + ! CONTROL RES / ANTIRES case + cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt + ! f1t=-f0t' + f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) + if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif + if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif + endif + ! + EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) + ! + select case( trim(field_defs(1)) ) + case('FROM_FILE') + i_T=nint((T-T_0)/(dT/2._SP))+1 + if (i_T<=0.or.envelop_only_) then + f_now=0 + else + if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) + if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) + if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) + endif + ! + case('STATIC') + if (order==0 ) f_now=T + if (order==1 ) f_now=1._SP + if (order==2 ) f_now=0._SP + ! + case('RECT') + if (order==0 ) f_now= Tloc + if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function + ! + case('RECTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function + &+theta_function(sigma-T,dT,0)*f0t*der_fac + ! + case('SIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now=+damp_func* f1t + if (order==2 ) f_now=+damp_func* f0t *der_fac + ! + case('SOFTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==-1) f_now=-2 + if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order== 1) f_now=+damp_func* f1t + if (order== 2) f_now=+damp_func* f0t *der_fac + ! + case('THETA') + if (order==0 ) f_now=damp_func*T + if (order==1 ) f_now=damp_func + if (order==2 ) f_now=0._SP + ! + case('DELTA') + if (order==-1) f_now=1._SP + if (order==0 ) f_now=1._SP + if (order> 0 ) f_now=0._SP + ! + case('PHHG') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + sarg=pi*(T-T_0)/sigma + WT =W_field*T + if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then + f_now=0.0 + elseif(T-T_0>=sigma.and.order==0) then + Tl=sigma+T_0 + WT =W_field*Tl + f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + else + if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + if (order==1 ) f_now=sin(sarg)**2*cos(WT) + if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 + endif + ! + case('GAUSS') + if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) + if (order==1 ) f_now= Expf + if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 + ! + case('QSSIN') + ! + ! W =FADEVA function + ! W(-z)=exp(-z^2)*(1- erf (i*z)) + ! =exp(-z^2)*(1-i*erfi( z )) + ! + ! ERFI(z)=i*(exp(z^2)*W(-z)-1) + ! + if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & + & call error("chirp not implemented with QSSIN and velocity gauge") + ! + cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) + cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) + ! + if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & + & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & + & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) + if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO + ! + if (order==0 ) f_now= erfi_z + if (order==1 ) f_now= f1t *EXPf + if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf + ! + case('QSFIELD') + ! + if (order==0 ) f_now= f1t *EXPf + if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf + if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & + & -der_fac*(T-T_0)*f1t/sigma**2 & + & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf + f_now=f_now/der_fac + ! + case('PULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + ! + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now= 0._SP + if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t + if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & + & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t + endif + ! + case('SPULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + T_0=sigma + W_0=W_field + f_now=cZERO + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & + & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & + & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & + & W_0**2*sigma**2+24))/W_0**5/sigma**4) + if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t + if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & + & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & + & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t + endif + end select + ! + f_t(i_field)=f_t(i_field)+f_now + ! + enddo + enddo + ! + small_a=f_t/real(n_freqs,SP) + ! +end function small_a +! +function small_a_frequency(W_i,E_field,iErr) + ! + use pars, ONLY:SP,cZERO,cI,pi,schlen + use stderr, ONLY:STRING_split + use fields, ONLY:ext_field,n_fields_defs_max,field_frequency + ! + implicit none + ! + complex(SP) :: small_a_frequency + ! + type(ext_field) :: E_field + complex(SP) :: W_i + integer :: iErr + ! + integer ::i_f + real(SP) ::W_0 + complex(SP) ::local_a(2) + character(schlen) ::field_defs(n_fields_defs_max) + ! + iErr=-1 + local_a=cZERO + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + do i_f=1,E_field%n_frequencies + W_0=field_frequency(E_field,i_f) + select case( trim(field_defs(1)) ) + case('SIN') + iErr=0 + local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES + local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES + case('DELTA') + iErr=0 + local_a=1._SP/2._SP + end select + enddo + ! + if(trim(field_defs(2))== 'RES') local_a(2)=0._SP + if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP + ! + small_a_frequency=local_a(1)+local_a(2) + ! +end function small_a_frequency diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index 9dbf7f9f2e..8e98d318be 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -32,7 +32,7 @@ subroutine RT_driver(E,X,k,q,Dip) & NE_steps,RT_step,G_lesser,RT_bands,& & NE_i_time,eval_energy,rho_reference,magn_reference,RT_nk, & & NE_time,RT_carriers,RT_dyn_step,l_RT_is_WFfree,& -& dG_lesser,NE_tot_time,& +& dG_lesser,NE_tot_time,l_length_grad_k,& & i_MEM_prev,i_MEM_now,RT_is_dynamically_dephased,& & l_RT_update_Energies,l_NE_with_fields,l_update_SOC,l_velocity_gauge_corr use plasma, ONLY:PLASMA_free,EH_gas @@ -121,6 +121,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! call DIPOLE_dimensions(E,Dip,RT_bands,(/0._SP,0._SP,0._SP/)) call DIPOLE_IO(k,E,Dip,'read ',io_err,'RT') + if(io_err/=0) call error("Error in Dipoles I/O") ! ! In dipole_driver the IO is k-dictated. Here I want only the master to write ! @@ -130,7 +131,12 @@ subroutine RT_driver(E,X,k,q,Dip) ! call section('=','Initialization') !################################# - call RT_initialize(E,k,q) + call RT_initialize(E,k,q,Dip) + ! + if (l_length_grad_k) then + call OVERLAPS_IO(k,E,Dip,'read',io_err,'RT') + if(io_err/=0) call error("Error in Overlaps I/O") + endif ! ! Dipoles & WF dimensions !========================= @@ -269,7 +275,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Calculate the RT Hamiltonian Ho_plus_Sigma !============================================ - call RT_Hamiltonian(dG_lesser(:,:,:,i_MEM_now),A_tot,E,k) + call RT_Hamiltonian(dG_lesser(:,:,:,:,i_MEM_now),A_tot,E,k) ! ! Rotation in the Coherent Hamiltonian basis !============================================ @@ -277,7 +283,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Energy, number of carriers, fit of electronic temperatures !============================================================= - call RT_Observables(E,k,dG_lesser(:,:,:,i_MEM_now),OBSERVABLES) + call RT_Observables(E,k,dG_lesser(:,:,:,:,i_MEM_now),OBSERVABLES) ! ! Calculate all relaxation and dissipation terms !=============================================== @@ -307,7 +313,7 @@ subroutine RT_driver(E,X,k,q,Dip) ! ! Integration !============= - call RT_Integrator(G_lesser(:,:,:,i_MEM_now),dG_lesser(:,:,:,i_MEM_now),dG_lesser(:,:,:,i_MEM_prev),A_tot,A_tot,E,k,q) + call RT_Integrator(G_lesser(:,:,:,:,i_MEM_now),dG_lesser(:,:,:,:,i_MEM_now),dG_lesser(:,:,:,:,i_MEM_prev),A_tot,A_tot,E,k,q) ! enddo ! @@ -335,7 +341,7 @@ subroutine CLOSE_and_clean( ) ! subroutine RT_timing(steps) ! - integer :: steps + integer, intent(in) :: steps ! if (steps==0) then ! @@ -359,7 +365,7 @@ subroutine RT_timing(steps) if (NE_i_time>LT_pump_steps+1.and.LT_pump) then LT_pump=.FALSE. call live_timing( ) - call live_timing('[RT] Dynamics (pump-free region) ',NE_steps-LT_pump_steps-NE_i_start_time+1,DEPTH=0.01_SP) + call live_timing('[RT] Dynamics (pump-free region) ',NE_steps-max(LT_pump_steps,NE_i_start_time)+1,DEPTH=0.01_SP) endif call live_timing(steps=steps) ! diff --git a/src/real_time_hamiltonian/.objects b/src/real_time_hamiltonian/.objects index 2574475c03..14f3d23b5b 100644 --- a/src/real_time_hamiltonian/.objects +++ b/src/real_time_hamiltonian/.objects @@ -1,3 +1,3 @@ #if defined _RT -objs = RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o +objs = RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o RT_gradk_rho_times_E.o #endif diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 2d69bd14f9..866c86de09 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -36,16 +36,15 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! use pars, ONLY:SP,cONE,cZERO use wrapper_omp, ONLY:M_plus_alpha_M_omp - use electrons, ONLY:levels,n_spinor,n_spin + use electrons, ONLY:levels,n_spinor,n_spin,n_sp_pol use FFT_m, ONLY:fft_size use drivers, ONLY:l_use_Hxc_collisions use R_lattice, ONLY:bz_samp,nXkibz use hamiltonian, ONLY:V_hartree_sc,H_nl_sc,rho_n,magn_n,V_xc_sc use real_time, ONLY:Ho_plus_Sigma,l_NE_with_fields,REF_V_xc_sc, & -& rho_reference,magn_reference,RT_Vnl_xc,H_EQ, & +& rho_reference,magn_reference,RT_Vnl_xc,H_field,H_EQ, & & l_RT_RWA,eval_HARTREE,eval_DFT,RTibz,RT_potential, & -& RT_bands,RT_nbands, & -& l_update_SOC,l_velocity_gauge_corr +& RT_bands,RT_nbands,dG_avg,l_update_SOC,l_velocity_gauge_corr use fields, ONLY:gauge_field use wave_func, ONLY:WF use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_A2A,PAR_G_k_range @@ -60,12 +59,12 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! type(levels), intent(inout) :: E type(bz_samp), intent(in) :: k - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) type(gauge_field), intent(in):: A_input ! ! Work Space ! - integer :: ik,ik_RT,ib + integer :: ik,ik_RT,ib,i_sp_pol logical :: l_H_contains_Hartree real(SP), allocatable :: delta_rho(:),delta_magn(:,:) complex(SP), allocatable :: V_scf(:),V_scf_grad(:,:),V_xc_mat(:,:,:) @@ -142,20 +141,22 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! ! Add H_nl_sc to Ho_plus_Sigma !--------------------------------- + do i_sp_pol=1,n_sp_pol do ik=1,nXkibz ! H_nl_sc=cZERO ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - call V_real_space_to_H(ik,1,H_nl_sc,WF,'def+xc',V=V_hartree_sc,Vxc=V_xc_sc) + call V_real_space_to_H(ik,i_sp_pol,H_nl_sc,WF,'def+xc',V=V_hartree_sc,Vxc=V_xc_sc) if(n_spinor==2.and.l_update_soc) call Vgrad_real_space_to_H(ik,H_nl_sc,WF,V_scf_grad) ! call PP_redux_wait(H_nl_sc,COMM=PAR_COM_Xk_ibz_A2A%COMM) ! - forall(ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) Ho_plus_Sigma(:,:,ik_RT,1)=H_nl_sc + forall(ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=H_nl_sc ! enddo + enddo ! l_H_contains_Hartree=index(trim(RT_potential),"HARTREE")>0 if(allocated(V_scf_grad)) deallocate(V_scf_grad) @@ -166,22 +167,25 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) !====================================================== if (l_use_Hxc_collisions) then ! - call COLLISIONS_compose_rt(dG_in) + call Build_dG_avg(dG_in,dG_avg) + call COLLISIONS_compose_rt(dG_avg) ! ! Add RT_Vnl_xc to Ho_plus_Sigma !--------------------------------- - do ik=1,nXkibz + do i_sp_pol=1,n_sp_pol + do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle if (l_H_contains_HARTREE) then do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) - Ho_plus_Sigma(:,:,ik_RT,1)=Ho_plus_Sigma(:,:,ik_RT,1)+RT_Vnl_xc(:,:,ik,1) + Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)+RT_Vnl_xc(:,:,ik,i_sp_pol) enddo else do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) - Ho_plus_Sigma(:,:,ik_RT,1)=RT_Vnl_xc(:,:,ik,1) + Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=RT_Vnl_xc(:,:,ik,i_sp_pol) enddo endif enddo + enddo ! endif ! @@ -191,14 +195,20 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! call timing('RT Apply Field',OPR='start') ! + H_field=cZERO + do i_sp_pol=1,n_sp_pol do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle H_nl_sc=cZERO - call RT_apply_field(ik,1,H_nl_sc,A_input) + call RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) + call RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,k,E) do ik_RT =RTibz%k_range(ik,1),RTibz%k_range(ik,2) - call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,1)) + H_field(:,:,ik_RT,i_sp_pol)=H_nl_sc + call M_plus_alpha_M_omp(RT_nbands,cONE,H_nl_sc,Ho_plus_sigma(:,:,ik_RT,i_sp_pol)) enddo enddo + enddo + ! ! call timing('RT Apply Field',OPR='stop') ! diff --git a/src/real_time_hamiltonian/RT_apply_field.F b/src/real_time_hamiltonian/RT_apply_field.F index 9f3f762250..40e767668a 100644 --- a/src/real_time_hamiltonian/RT_apply_field.F +++ b/src/real_time_hamiltonian/RT_apply_field.F @@ -7,7 +7,8 @@ ! subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! - ! This subroutine add the vector potential to the Hamiltonian + ! This subroutine adds the external field to the Hamiltonian, + ! either as A*j (velocity gauge) or as E*r (length gauge) ! use pars, ONLY:SP,cI use drivers, ONLY:l_nl_optics @@ -16,7 +17,7 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) use fields, ONLY:gauge_field use DIPOLES, ONLY:DIP_iR,DIP_P,DIP_v,DIP_P_spinor use X_m, ONLY:global_gauge - use real_time, ONLY:RT_bands,l_update_SOC,l_velocity_gauge_corr + use real_time, ONLY:RT_bands,RT_hole_bands,RT_elec_bands,l_update_SOC,l_velocity_gauge_corr use vec_operate, ONLY:cross_product use D_lattice, ONLY:sigma_x,sigma_y,sigma_z use parallel_m, ONLY:PAR_Xk_ibz_index @@ -29,10 +30,13 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! ! Work Space ! + logical :: l_selective_coupling integer :: i1,i2,i_spinor,j_spinor complex(SP) :: A_dot_J(2),E_dot_P(2),& & ExJs(3,n_spinor,n_spinor),A_vec_pot(3),E_vec_pot(3),& & POL(3),Jtot(3),Jspinor(3,n_spinor,n_spinor),sigma_dot_ExJs + ! + l_selective_coupling=all((/RT_hole_bands/=-1,RT_elec_bands/=-1/)) ! select case(trim(global_gauge)) ! @@ -41,40 +45,53 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Velocity gauge !================ ! + ! The velocity gauge is defined by + ! A= int dt' E(t') + ! V= -1/2 A^2(t) + ! + ! The definition of V is usued to remove the term 1/2A^2 from the Hamiltonian + ! It corresponds to a gauge transformation function + ! Lambda = -1/2 int dt' A^2(t') dt + ! see discussion in sec. 4.A of J. of Optical Society B, 39(2), 535 (2022) + ! A_vec_pot=A_input%vecpot/SPEED_OF_LIGHT ! Gaussian units ! ! Add the vector potential to the singular part of the Self-Energy ! in case of complex Efield puts the correct Hermitian matrix ! and the intraband optical matrix elements have been set to zero ! -!$omp parallel do default(shared), private(i1,Jtot,A_dot_J) + !$omp parallel do default(shared), private(i1,Jtot,A_dot_J) do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle ! ! Case A: the pseudo-potential is correctly gauged, so A*p enters the hamiltonian if ( l_velocity_gauge_corr) Jtot(1:3)= -DIP_P(1:3,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) ! Case b: the pseudo-potential is *not* gauged, so A*v enters the hamiltonian. ! A*v accounts for the linear expansion of the gauge correction to the non local potential if (.not.l_velocity_gauge_corr) Jtot(1:3)= -DIP_v(1:3,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) - ! - if(.not.l_nl_optics) then - ! - ! This term can be set to zero with the freedom of the velocity gauge - ! see discussion in sec. 4.A of J. of Optical Society B, 39(2), 535 (2022) - ! we do not include it in yambo_nl - ! - Jtot(1:3)=Jtot(1:3)+A_vec_pot(1:3)/2._SP - ! - endif ! A_dot_J(1)=sum(A_vec_pot(1:3)* Jtot(1:3) ) A_dot_J(2)=sum(A_vec_pot(1:3)*conjg(Jtot(1:3))) H_nl_sc(i1,i1)=H_nl_sc(i1,i1)-real(A_dot_J(1),SP) + ! enddo -!$omp end parallel do + !$omp end parallel do ! -!$omp parallel do default(shared), private(i1,i2,Jtot,A_dot_J) + !$omp parallel do default(shared), private(i1,i2,Jtot,A_dot_J) do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + ! do i2=i1+1,RT_bands(2) + ! + if ( l_selective_coupling .and. i2RT_hole_bands(2) .and. i2RT_elec_bands(2) ) cycle ! ! Note that (P)_cv = DIP_P (:,iv,ic,:,:) ! the off-diagonal diamagnetic term is zero @@ -104,6 +121,11 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Intraband terms ! do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + ! POL(:)=cI*DIP_iR(:,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) E_dot_P(1)=sum(E_vec_pot(1:3)* POL(1:3) ) E_dot_P(2)=sum(E_vec_pot(1:3)*conjg(POL(1:3))) @@ -131,7 +153,16 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! Inter-band terms ! do i1=RT_bands(1),RT_bands(2) + ! + if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + ! do i2=i1+1,RT_bands(2) + ! + if ( l_selective_coupling .and. i2RT_hole_bands(2) .and. i2RT_elec_bands(2) ) cycle ! ! Note that (iR)_cv = DIP_iR (:,iv,ic,:,:) ! diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F new file mode 100644 index 0000000000..7145d8ebe3 --- /dev/null +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -0,0 +1,452 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2025 The Yambo Team +! +! Authors (see AUTHORS file for details): DS +! +subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) + ! + ! This subroutine computes the k-gradient of the density matrix, + ! and multiplies it by the electric field. + ! See Phys. Rev. B 76, 035213 (2007) + ! + ! To guage the density matrix it uses the phases matrixi of the dipoles + ! defined in Phys. Rev. Lett. 131, 236902 (2023) + ! In doing so we move into a gauge where the dipoles projected along E are real. + ! Not sure if such gauge really makes sense ... + ! + use pars, ONLY:SP,cI,cZERO,cONE,pi + use units, ONLY:SPEED_OF_LIGHT,HA2EV + use real_time, ONLY:l_length_grad_k,RT_bands + use fields, ONLY:gauge_field + use real_time, ONLY:RT_bands,NE_i_time,NE_i_last_field + use vec_operate, ONLY:k_periodic_idx,degeneration_finder + use matrix_operate, ONLY:hermitian + use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd + use electrons, ONLY:levels,n_sp_pol + use R_lattice, ONLY:bz_samp,k_map + use D_lattice, ONLY:a + use parallel_m, ONLY:PAR_G_k_range + use parser_m, ONLY:parser + ! + implicit none + ! + integer, intent(in) :: ik,i_sp_pol + complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + type(gauge_field), intent(in) :: A_input + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + ! + ! Workspace + ! + logical :: l_dips_term + integer :: id_red,max_step,istep,idx(3),idir,ib1,jb1,nb(2),& + ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is + real(SP) :: q_fac,E_field(3) + complex(SP) :: DIP_kp_c(3),DIP_km_c(3),DIP_k_c(3) + real(SP) :: DIP_kp_mod,DIP_km_mod,DIP_k_mod + ! + complex(SP), allocatable :: DIP_kp(:,:),DIP_km(:,:) + ! + complex(SP) :: gradk_rho(RT_Bands(1):RT_bands(2),RT_bands(1):RT_bands(2),3),& + & gradk_rho_red(RT_Bands(1):RT_bands(2),RT_Bands(1):RT_bands(2),2) + ! + ! Warning: kpts parallelization to be fixed, since rho is distributed + ! + if (.not.l_length_grad_k) return + ! + ! Length gauge + !=============== + E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units + ! + if (NE_i_time>NE_i_last_field) return + ! + nb=RT_bands + call parser("RTgradkDips",l_dips_term) + ! + allocate(DIP_kp(nb(1):nb(2),nb(1):nb(2))) + allocate(DIP_km(nb(1):nb(2),nb(1):nb(2))) + ! + ikbz=Xk%k_table(ik,1) + ! + gradk_rho=cZERO + ! + do id_red=1,3 ! loop on reciprocal lattice + ! + if(k_map%max_kdir(id_red)==1) cycle + ! + max_step=1 + ! + ! I need at leat 5 k-points in the line to + ! use the second order formula + ! + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 + ! + gradk_rho_red=cZERO + ! + do istep=1,max_step + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)-istep + idx=k_periodic_idx(idx,k_map) + ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + ikm1_ibz=Xk%sstar(ikm1,1) + ikm1_is =Xk%sstar(ikm1,2) + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)+istep + idx=k_periodic_idx(idx,k_map) + ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + ikp1_ibz=Xk%sstar(ikp1,1) + ikp1_is =Xk%sstar(ikp1,2) + ! + if (l_dips_term) then + DIP_km=cZERO + DIP_kp=cZERO + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + call DIPOLE_rotate(jb1,ib1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) + call DIPOLE_rotate(jb1,ib1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles + DIP_km_mod=sqrt(abs(DIP_km_c(1))**2+abs(DIP_km_c(2))**2+abs(DIP_km_c(3))**2) + DIP_kp_mod=sqrt(abs(DIP_kp_c(1))**2+abs(DIP_kp_c(2))**2+abs(DIP_kp_c(3))**2) + do idir=1,3 + DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir)/DIP_km_mod + DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir)/DIP_kp_mod + enddo + enddo + enddo + else + DIP_km=cONE + DIP_kp=cONE + endif + ! + ! 1/q factor = k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & + & -cI*(dG_in(ib1,jb1,ikp1_ibz,i_sp_pol)*conjg(DIP_km(ib1,jb1))+ & + & -dG_in(ib1,jb1,ikm1_ibz,i_sp_pol)*conjg(DIP_kp(ib1,jb1)) ) + enddo + enddo + ! + gradk_rho_red(:,:,istep)=gradk_rho_red(:,:,istep)*q_fac/2._SP + ! + enddo ! istep + ! + ! Rotate in cartesian coordinates + ! + if(max_step==1) then + ! + ! First order formula D(dk) + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(gradk_rho_red(:,:,1))*a(id_red,idir) + enddo + ! + else + ! + ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(4._SP*gradk_rho_red(:,:,1)-gradk_rho_red(:,:,2))/3._SP*a(id_red,idir) + enddo + ! + endif + ! + enddo ! id_red + ! + l_dips_term=.false. + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + if (l_dips_term) then + call DIPOLE_rotate(jb1,ib1,ikbz,i_sp_pol,"DIP_iR",Xk,DIP_k_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles + DIP_k_mod =sqrt(abs(DIP_k_c(1))**2+abs(DIP_k_c(2))**2+abs(DIP_k_c(3))**2) + DIP_k_c=-cI*DIP_kp_c/DIP_k_mod + else + DIP_k_c=cONE + endif + do idir=1,3 + H_nl_sc(ib1,jb1)=H_nl_sc(ib1,jb1)-gradk_rho(ib1,jb1,idir)*E_field(idir)*DIP_k_c(idir) + enddo + enddo + enddo + ! + ! +end subroutine RT_gradk_rho_times_E_wrong +! +! +subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) + ! + ! This subroutine computes the k-gradient of the density matrix, + ! and multiplies it by the electric field. + ! See Phys. Rev. B 76, 035213 (2007) + ! + use pars, ONLY:SP,cI,cZERO,pi + use units, ONLY:SPEED_OF_LIGHT,HA2EV + use real_time, ONLY:l_length_grad_k,RT_bands + use fields, ONLY:gauge_field + use real_time, ONLY:RT_bands,NE_i_time,NE_i_last_field + use vec_operate, ONLY:k_periodic_idx,degeneration_finder + use matrix_operate, ONLY:hermitian + use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd + use electrons, ONLY:levels,n_sp_pol + use R_lattice, ONLY:bz_samp,k_map + use D_lattice, ONLY:a + use parallel_m, ONLY:PAR_G_k_range + use parser_m, ONLY:parser + ! + implicit none + ! + integer, intent(in) :: ik,i_sp_pol + complex(SP), intent(inout) :: H_nl_sc(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + type(gauge_field), intent(in) :: A_input + type(bz_samp), intent(in) :: Xk + type(levels), intent(in) :: Xen + ! + ! Workspace + ! + logical :: l_dips_term,l_svd + integer :: id_red,max_step,istep,idx(3),idir,ib1,ib2,jb1,jb2,nb(2),& + ikm1,ikp1,ikbz,ikm1_ibz,ikm1_is,ikp1_ibz,ikp1_is + real(SP) :: q_fac,E_field(3) + complex(SP) :: DIP_kp_c(3),DIP_km_c(3) + integer :: ib,ibp,i_grp,first_el_k(RT_bands(2)-RT_bands(1)+1),n_of_el_k(RT_bands(2)-RT_bands(1)+1),n_deg_grp_k + logical :: deg_table_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + real(SP) :: deg_thresh + ! + !complex(SP) :: Mp_kmq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& + !& Mm_kpq(RT_bands(2),RT_bands(2),RT_bands(2),RT_bands(2)),& + !& Sp_kmq(RT_bands(2),RT_bands(2)),Sm_kpq(RT_bands(2),RT_bands(2)),& + !& A1p_kmq(RT_bands(2),RT_bands(2)),A1m_kpq(RT_bands(2),RT_bands(2)),& + !& A2p_kmq(RT_bands(2),RT_bands(2)),A2m_kpq(RT_bands(2),RT_bands(2)),& + !& DIP_kp(RT_bands(2),RT_bands(2)),DIP_km(RT_bands(2),RT_bands(2)) + ! + complex(SP), allocatable :: Mp_kmq(:,:,:,:),Mm_kpq(:,:,:,:),& + & Sp_kmq(:,:),Sm_kpq(:,:),gp_kmq(:,:),gm_kpq(:,:),& + & A1p_kmq(:,:),A1m_kpq(:,:),A2p_kmq(:,:),A2m_kpq(:,:),& + & DIP_kp(:,:),DIP_km(:,:) + ! + complex(SP) :: gradk_rho(RT_Bands(1):RT_bands(2),RT_bands(1):RT_bands(2),3),& + & gradk_rho_red(RT_Bands(1):RT_bands(2),RT_Bands(1):RT_bands(2),2) + ! + ! Warning: kpts parallelization to be fixed, since rho is distributed + ! + if (.not.l_length_grad_k) return + ! + ! Length gauge + !=============== + E_field=-A_input%vecpot_vel/SPEED_OF_LIGHT ! Gaussian units + ! + if (NE_i_time>NE_i_last_field) return + ! + call parser("RTgradkDips",l_dips_term) + l_svd=.true. + deg_thresh=1.E-5/HA2EV + ! + nb=RT_bands + ! + allocate(Mp_kmq(nb(1):nb(2),nb(1):nb(2),nb(1):nb(2),nb(1):nb(2))) + allocate(Mm_kpq(nb(1):nb(2),nb(1):nb(2),nb(1):nb(2),nb(1):nb(2))) + ! + allocate(Sp_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(Sm_kpq(nb(1):nb(2),nb(1):nb(2))) + ! + allocate(gp_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(gm_kpq(nb(1):nb(2),nb(1):nb(2))) + ! + allocate(A1p_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(A1m_kpq(nb(1):nb(2),nb(1):nb(2))) + ! + allocate(A2p_kmq(nb(1):nb(2),nb(1):nb(2))) + allocate(A2m_kpq(nb(1):nb(2),nb(1):nb(2))) + + allocate(DIP_kp(nb(1):nb(2),nb(1):nb(2))) + allocate(DIP_km(nb(1):nb(2),nb(1):nb(2))) + ! + ikbz=Xk%k_table(ik,1) + ! + ! define degeneration table at ik + ! + call degeneration_finder(Xen%E(nb(1):nb(2),ik,i_sp_pol),nb(2)-nb(1)+1,& + & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + ! + deg_table_k=.false. + do i_grp=1,n_deg_grp_k + do ib=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + do ibp=nb(1)+first_el_k(i_grp)-1,nb(1)+first_el_k(i_grp)+n_of_el_k(i_grp)-2 + deg_table_k(ib,ibp)=.true. + deg_table_k(ibp,ib)=.true. + enddo + enddo + enddo + ! + gradk_rho=cZERO + ! + do id_red=1,3 ! loop on reciprocal lattice + ! + if(k_map%max_kdir(id_red)==1) cycle + ! + max_step=1 + ! + ! I need at leat 5 k-points in the line to + ! use the second order formula + ! + if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 + ! + gradk_rho_red=cZERO + ! + do istep=1,max_step + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)-istep + idx=k_periodic_idx(idx,k_map) + ikm1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + ikm1_ibz=Xk%sstar(ikm1,1) + ikm1_is =Xk%sstar(ikm1,2) + ! + idx=k_map%k_map_inv(ikbz,:) + idx(id_red)=idx(id_red)+istep + idx=k_periodic_idx(idx,k_map) + ikp1=k_map%k_map_dir(idx(1),idx(2),idx(3)) + ! + ikp1_ibz=Xk%sstar(ikp1,1) + ikp1_is =Xk%sstar(ikp1,2) + ! + Sm_kpq(:,:)=hermitian(DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikbz,i_sp_pol)) ! (g-(k+q))= g+(k)\dag + Sp_kmq(:,:)= DIP_S(nb(1):,nb(1):,id_red+(istep-1)*3,ikm1,i_sp_pol) ! g+(k-q) =(g-(k)\dag) + ! + ! k+q part + ! Disconnect non connected blocks + call zeroing_disconnected_blocks(Xen,Xk,RT_bands,ikp1,i_sp_pol,& + & deg_table_k,deg_thresh,Sm_kpq,gm_kpq) + ! Perform SVD + call SERIAL_SVD(nb(2)-nb(1)+1,Sm_kpq,'uni',0) + ! + ! k-q part + ! Disconnect non connected blocks + call zeroing_disconnected_blocks(Xen,Xk,RT_Bands,ikm1,i_sp_pol,& + & deg_table_k,deg_thresh,Sp_kmq,gp_kmq) + ! Perform SVD + call SERIAL_SVD(nb(2)-nb(1)+1,Sp_kmq,'uni',0) + ! + ! define M matrix + do ib1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + Mp_kmq(ib1,ib2,:,:)=conjg(gp_kmq(ib1,ib2))*gp_kmq(:,:) + Mm_kpq(ib1,ib2,:,:)=conjg(gm_kpq(ib1,ib2))*gm_kpq(:,:) + enddo + enddo + ! + if (l_dips_term) then + ! + ! I need to rotate the dipoles in k-space, + ! and then project them along the id_red direction + ! Note: this term is quitre slow. + ! Pre-expanding the dipoles with the old + ! DIPOLE expand wuold speed-up this part + ! + DIP_km=cZERO + DIP_kp=cZERO + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + call DIPOLE_rotate(jb1,ib1,ikm1,i_sp_pol,"DIP_iR",Xk,DIP_km_c) + call DIPOLE_rotate(jb1,ib1,ikp1,i_sp_pol,"DIP_iR",Xk,DIP_kp_c) + ! DEBUG lines to verify the time gain when non-expanding on the fly + !DIP_km_c=DIP_iR(:,ib1,jb1,ikm1_ibz,i_sp_pol) + !DIP_kp_c=DIP_iR(:,ib1,jb1,ikp1_ibz,i_sp_pol) + ! As always in yambo, band indexes are inverted in the dipoles + do idir=1,3 + DIP_km(ib1,jb1)=DIP_km(ib1,jb1)-cI*DIP_km_c(idir)*a(id_red,idir) + DIP_kp(ib1,jb1)=DIP_kp(ib1,jb1)-cI*DIP_kp_c(idir)*a(id_red,idir) + enddo + enddo + enddo + ! + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + !A1_ll' ib1=l jb1=l' ib2=s + A1p_kmq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikm1_ibz,i_sp_pol)*conjg(DIP_km(ib2,ib1)) + A1m_kpq(ib1,jb1)=-cI*dG_in(ib2,jb1,ikp1_ibz,i_sp_pol)*conjg(DIP_kp(ib2,ib1)) + !A2_ll' ib1=l jb1=l' ib2=s + A2p_kmq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikm1_ibz,i_sp_pol)* DIP_km(ib2,jb1) + A2m_kpq(ib1,jb1)=-cI*dG_in(ib1,ib2,ikp1_ibz,i_sp_pol)* DIP_kp(ib2,jb1) + enddo + enddo + enddo + ! + else + ! + A1p_kmq=cZERO + A1m_kpq=cZERO + A2p_kmq=cZERO + A2m_kpq=cZERO + ! + endif + ! + ! 1/q factor = k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + q_fac=k_map%max_kdir(id_red)/(4._SP*pi*real(istep,SP)) + ! + do ib1=RT_bands(1),RT_bands(2) + do jb1=RT_bands(1),RT_bands(2) + do ib2=RT_bands(1),RT_bands(2) + do jb2=RT_bands(1),RT_bands(2) + ! ib1=n, jb1=m, ib2=l, jb2=l' + gradk_rho_red(ib1,jb1,istep)=gradk_rho_red(ib1,jb1,istep)+ & + & -cI*Mm_kpq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikp1_ibz,i_sp_pol)+ & + & +cI*Mp_kmq(ib2,ib1,jb2,jb1)*dG_in(ib2,jb2,ikm1_ibz,i_sp_pol)+ & + & -cI/q_fac*Mm_kpq(ib2,ib1,jb2,jb1)*(A1m_kpq(ib2,jb2)-A2m_kpq(ib2,jb2))+ & + & -cI/q_fac*Mp_kmq(ib2,ib1,jb2,jb1)*(A1p_kmq(ib2,jb2)-A2p_kmq(ib2,jb2)) + enddo + enddo + enddo + enddo + ! + gradk_rho_red(:,:,istep)=gradk_rho_red(:,:,istep)*q_fac/2._SP + ! + enddo ! istep + ! + ! Rotate in cartesian coordinates + ! + if(max_step==1) then + ! + ! First order formula D(dk) + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(gradk_rho_red(:,:,1))*a(id_red,idir) + enddo + ! + else + ! + ! Second order formula ( 4*D(dk) - D(2*dk) ) / 3 + ! + do idir=1,3 + gradk_rho(:,:,idir)=gradk_rho(:,:,idir)+transpose(4._SP*gradk_rho_red(:,:,1)-gradk_rho_red(:,:,2))/3._SP*a(id_red,idir) + enddo + ! + endif + ! + enddo ! id_red + ! + do idir=1,3 + H_nl_sc(:,:)=H_nl_sc(:,:)-gradk_rho(:,:,idir)*E_field(idir) + enddo + ! +end subroutine RT_gradk_rho_times_E diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index 7f63c40398..6bc8c2d39e 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -3,6 +3,7 @@ ELPH_objs = RT_ELPH_initialize.o #endif #if defined _RT RT_head_objs = RT_initialize.o RT_start_and_restart.o -RT_foot_objs = RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o RT_occupations_update.o +RT_foot_objs = RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o \ + RT_occupations_update.o #endif objs = $(RT_head_objs) RT_occupations_and_levels_init.o $(RT_foot_objs) $(ELPH_objs) diff --git a/src/real_time_initialize/DOUBLE_project.dep b/src/real_time_initialize/DOUBLE_project.dep index c350f2f4de..ee8a36165b 100644 --- a/src/real_time_initialize/DOUBLE_project.dep +++ b/src/real_time_initialize/DOUBLE_project.dep @@ -2,6 +2,7 @@ RT_ELPH_initialize.o RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o + RT_field_from_file.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o diff --git a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F index 357cde4366..0f4d3a79a1 100644 --- a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F +++ b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F @@ -14,7 +14,7 @@ subroutine RT_Field_Commensurable_Frequencies() ! Moreover to extract the Fourier coefficients I need to integrate over aa Time range ! equal to 2*pi/deltaW. This must be not larger then NE_tot_time ! - use pars, ONLY:SP,schlen + use pars, ONLY:SP,schlen,n_fields_defs_max use stderr, ONLY:STRING_split use fields, ONLY:Efield,n_ext_fields,EtoT use real_time, ONLY:NE_tot_time @@ -24,7 +24,7 @@ subroutine RT_Field_Commensurable_Frequencies() integer :: i_master_field,i_f,i_Pump,i_Probe real(SP) :: W_step,T_treshold,T_step real(SP), parameter :: treshold=0.8 - character(schlen) ::pump_defs(3),probe_defs(3) + character(schlen) :: pump_defs(n_fields_defs_max),probe_defs(n_fields_defs_max) ! if (n_ext_fields<2) return ! diff --git a/src/real_time_initialize/RT_G_lesser_init.F b/src/real_time_initialize/RT_G_lesser_init.F index 6a0edfd630..7a57f49c10 100644 --- a/src/real_time_initialize/RT_G_lesser_init.F +++ b/src/real_time_initialize/RT_G_lesser_init.F @@ -12,26 +12,29 @@ subroutine RT_G_lesser_init( ) use parallel_m, ONLY:PAR_IND_Xk_ibz use real_time, ONLY:dG_lesser,G_lesser_reference,RTibz,RT_bands,G_lesser use R_lattice, ONLY:nkibz + use electrons, ONLY:n_sp_pol ! implicit none ! ! Work Space ! - integer :: ik,ik_RT,ib + integer :: ik,ik_RT,ib,i_sp_pol ! do ib=RT_bands(1),RT_bands(2) + do i_sp_pol=1,n_sp_pol do ik=1,nkibz do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) ! - G_lesser_reference(ib,ib,ik_RT) = cmplx(rZERO,RT_el_occ%N_ref(ib,ik_RT),SP) + G_lesser_reference(ib,ib,ik_RT,i_sp_pol) = cmplx(rZERO,RT_el_occ%N_ref(ib,ik_RT,i_sp_pol),SP) ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - G_lesser(ib,ib,ik_RT,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT),SP) - dG_lesser(ib,ib,ik_RT,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT)-RT_el_occ%N_ref(ib,ik_RT),SP) + G_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT,i_sp_pol),SP) + dG_lesser(ib,ib,ik_RT,i_sp_pol,1) = cmplx(rZERO,RT_el_occ%N(ib,ik_RT,i_sp_pol)-RT_el_occ%N_ref(ib,ik_RT,i_sp_pol),SP) ! enddo enddo + enddo enddo ! end subroutine RT_G_lesser_init diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index d981ed9b37..a8eccc7e1b 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -5,14 +5,14 @@ ! ! Authors (see AUTHORS file for details): ! -subroutine RT_initialize(E,k,q) +subroutine RT_initialize(E,k,q,Dip) ! use drivers, ONLY:l_use_collisions,l_elph_scatt,l_elel_scatt,l_sc_hartree,l_use_Hxc_collisions,& & l_sc_is_libDFT,l_sc_sex,l_sc_fock,l_elphoton_scatt,l_rt_carriers_in_use,l_phel_scatt #if defined _PHEL use drivers, ONLY:l_phel_scatt #endif - use pars, ONLY:SP,pi,schlen + use pars, ONLY:SP,pi,schlen,n_fields_defs_max use stderr, ONLY:STRING_split use units, ONLY:HA2EV,HBAR_eVfs,AU2VMm1,AU2KWCMm2,AUT2FS use stderr, ONLY:intc @@ -20,6 +20,7 @@ subroutine RT_initialize(E,k,q) use QP_CTL_m, ONLY:QP_ctl_user use vec_operate, ONLY:normalize_v use plasma, ONLY:EH_gas + use DIPOLES, ONLY:DIPOLE_t use X_m, ONLY:global_gauge use electrons, ONLY:levels use collision_ext, ONLY:COLLISIONS_have_HARTREE @@ -30,7 +31,7 @@ subroutine RT_initialize(E,k,q) & Life_MEM_steps,l_RT_lifetimes_Tfit,l_RT_skip_ph_abs_lifetimes,l_RT_iterative_ELPH_lifetimes use real_time, ONLY:RT_potential,RT_step,l_NE_with_fields,RT_bands,RT_dyn_step,RT_nk, & & NE_steps,NE_tot_time,l_RT_induced_field,Gr_kind, & -& RAD_LifeTime,Phase_LifeTime, & +& RAD_LifeTime,Phase_LifeTime,l_length_grad_k,NE_i_last_field, & & NE_MEM_treshold,G_MEM_steps,l_RT_uses_E_FineGd,DbGd_EE_Nk_table, & & l_RT_impose_N_dN,Integrator_name,l_RT_impose_E,DbGd_EE_percent, & & l_RT_update_Energies,eval_HARTREE,eval_DFT,l_NE_dynamics, & @@ -53,13 +54,14 @@ subroutine RT_initialize(E,k,q) #include ! type(levels), intent(inout) :: E - type(bz_samp),intent(in) :: q,k + type(bz_samp), intent(in) :: q,k + type(DIPOLE_t), intent(in) :: Dip ! ! Work space ! - integer :: i1,N_T_samplings,ik,NK_cpu(PAR_COM_Xk_ibz_INDEX%n_CPU) - character(schlen) :: MSG_ch,field_defs(3) - real(SP) :: T_memory + integer :: i1,i_defs,N_T_samplings,ik,NK_cpu(PAR_COM_Xk_ibz_INDEX%n_CPU) + character(schlen) :: MSG_ch,field_defs(n_fields_defs_max) + real(SP) :: T_memory,sigma_eff,U_pond logical :: l_Full_RT_T_evolution,l_skip_it,l_velocity_gauge_tmp real(SP), parameter :: thresh=1.E-5_SP #if defined _RT_SCATT @@ -98,6 +100,7 @@ subroutine RT_initialize(E,k,q) call parser('RTzeroTempRef', l_RT_eq_is_zero_temp) call parser('RTEqScatt', l_RT_include_eq_scatt) call parser('RTskipPHabs', l_RT_skip_ph_abs_lifetimes) + call parser('RTgradk', l_length_grad_k) ! if (.not.l_RT_skip_ph_abs_lifetimes) l_RT_skip_ph_abs_lifetimes=.not.(Bose_Temp>0..or.l_phel_scatt) ! @@ -127,6 +130,8 @@ subroutine RT_initialize(E,k,q) PAR_G_k_range(2)=RTibz%k_range(PAR_G_k_range(2),2) endif ! + if (l_length_grad_k .and. .not.allocated(k%k_table)) call k_build_up_BZ_tables(k) + ! ! Integrator FLAGS !================== call RT_Integrator_init() @@ -220,38 +225,50 @@ subroutine RT_initialize(E,k,q) ! l_NE_with_fields=.false. ! + ! Initial check for fields defined from file + do i1=1,n_ext_fields + Efield(i1)%ef_name=trim(Efield(i1)%ef_name) + call STRING_split(Efield(i1)%ef_name,field_defs) + if ( field_defs(1)/='FROM_FILE') cycle + call RT_load_field_from_file_init(field_defs(2)) + enddo + ! + NE_i_last_field=0 + ! do i1=1,n_ext_fields ! Efield(i1)%ef_name=trim(Efield(i1)%ef_name) ! MSG_ch="Field#"//trim(intc(i1))//" "//trim(Efield(i1)%ef_name) ! - if(trim(Efield(i1)%ef_name)/='none') then + call STRING_split(Efield(i1)%ef_name,field_defs) + ! + if(trim(field_defs(1))=='none') cycle ! - if (.not.field_is_ok( Efield(i1)) ) call error(trim(MSG_ch)//' not supported or polarization is wrong') + if (.not.field_is_ok( Efield(i1) ) ) call error(trim(MSG_ch)//' not supported or polarization is wrong') ! l_NE_with_fields=.true. ! - call STRING_split(Efield(i1)%ef_name,field_defs) - ! - if(field_defs(1)/='DELTA'.and.Efield(i1)%frequency(1)==0._SP) & + if( (field_defs(1)/='DELTA'.and.field_defs(1)/='GAUSS'.and. & +& field_defs(1)/='RECT' .and.field_defs(1)/='FROM_FILE') & +& .and. Efield(i1)%frequency(1)==0._SP) & & call error(trim(MSG_ch)//" field has zero frequency.") ! if(Efield(i1)%intensity==0._SP) & & call warning(trim(MSG_ch)//" field has zero intensity.") ! - if( all( abs(Efield(i1)%versor(:)) + ! + NE_i_last_field=max(NE_i_last_field,Efield(i1)%t_final_indx) ! enddo ! @@ -454,14 +483,20 @@ subroutine RT_initialize(E,k,q) & 2._SP*pi*HBAR_evfs/(Efield(i1)%frequency*HA2EV)/),'[eV/fs]') call msg('r', trim(MSG_ch)//' elemental oscillation ',EtoT(E=Efield(i1)%frequency(2)-& & Efield(i1)%frequency(1))*AUT2FS,'[fs]') - call msg('r', trim(MSG_ch)//' width ',Efield(i1)%width*AUT2FS,'[fs]') + sigma_eff=sqrt((Efield(i1)%width**4+Efield(i1)%chirp**4)/Efield(i1)%width**2) + call msg('r', trim(MSG_ch)//' Fourier limited width ',Efield(i1)%width*AUT2FS,'[fs]') + call msg('r', trim(MSG_ch)//' Real time width ',sigma_eff*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' start time ',Efield(i1)%t_initial*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' energy steps ',Efield(i1)%n_frequencies) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! + U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 + call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') + call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') + ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then - call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence,'[nJ/cm^2]') + call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') call msg('r', trim(MSG_ch)//' area at selected Rabi trans.',Efield(i1)%pi_kind ) call msg('r', trim(MSG_ch)//' final time ',Efield(i1)%t_final*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' half maximum full width ',Efield(i1)%width*2.*sqrt(2.*log(2.))*AUT2FS,'[fs]') diff --git a/src/real_time_initialize/RT_occupations_and_levels_init.F b/src/real_time_initialize/RT_occupations_and_levels_init.F index 698ff51556..a8a4c9492d 100644 --- a/src/real_time_initialize/RT_occupations_and_levels_init.F +++ b/src/real_time_initialize/RT_occupations_and_levels_init.F @@ -95,8 +95,8 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) k_FG%pt(ik_RT,:) = kpt ! ! .. occ - RT_el_occ%N_ref(ib,ik_RT) = f_occ_ref(1) - RT_ho_occ%N_ref(ib,ik_RT) = spin_occ-f_occ_ref(1) + RT_el_occ%N_ref(ib,ik_RT,:) = f_occ_ref(:) + RT_ho_occ%N_ref(ib,ik_RT,:) = spin_occ-f_occ_ref(:) ! if (l_RT_relax_time_approx) then RT_RTA_E_occ_infty(ib,ik_FG)= Fermi_fnc( Energy(1)-E%E_CBm(1)-RT_RTA_chem(1) ,RT_RTA_temp(1))*spin_occ @@ -107,13 +107,13 @@ subroutine RT_occupations_and_levels_init(bands,E,k,q,k_FG,E_FG) if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle #endif ! - RT_el_occ%dN(ib,ik_RT) = f_occ(1)-f_occ_ref(1) - RT_el_occ%N(ib,ik_RT) = f_occ(1) - RT_ho_occ%N(ib,ik_RT) = spin_occ-f_occ(1) + RT_el_occ%dN(ib,ik_RT,:) = f_occ(:)-f_occ_ref(:) + RT_el_occ%N(ib,ik_RT,:) = f_occ(:) + RT_ho_occ%N(ib,ik_RT,:) = spin_occ-f_occ(:) ! if (.not.RT_is_dynamically_dephased) cycle ! - RT_life_occ%dN(ib,ik_RT) = f_occ(1)-f_occ_ref(1) + RT_life_occ%dN(ib,ik_RT,:) = f_occ(:)-f_occ_ref(:) ! enddo enddo diff --git a/src/real_time_initialize/RT_occupations_update.F b/src/real_time_initialize/RT_occupations_update.F index 6c1ceb6304..110df9bb56 100644 --- a/src/real_time_initialize/RT_occupations_update.F +++ b/src/real_time_initialize/RT_occupations_update.F @@ -11,14 +11,14 @@ subroutine RT_occupations_update( ) use parallel_int, ONLY:PP_redux_wait use real_time, ONLY:dG_lesser,G_lesser_reference,RT_bands,RT_is_dynamically_dephased,RTibz use RT_occupations, ONLY:RT_el_occ,RT_ho_occ,RT_life_occ,RT_occupation_clean - use electrons, ONLY:spin_occ + use electrons, ONLY:spin_occ,n_sp_pol use R_lattice, ONLY:nkibz ! implicit none ! ! Work Space ! - integer :: ib,ik,ik_RT + integer :: ib,ik,ik_RT,i_sp ! ! El/Ho Occupations are defined from G_lesser and G_lesser_reference !=================== @@ -27,25 +27,27 @@ subroutine RT_occupations_update( ) call RT_occupation_clean(RT_life_occ) ! do ib=RT_bands(1),RT_bands(2) + do i_sp=1,n_sp_pol do ik=1,nkibz do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) ! - RT_el_occ%N_ref(ib,ik_RT) = aimag(G_lesser_reference(ib,ib,ik_RT)) - RT_ho_occ%N_ref(ib,ik_RT) = spin_occ-aimag(G_lesser_reference(ib,ib,ik_RT)) + RT_el_occ%N_ref(ib,ik_RT,i_sp) = aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) + RT_ho_occ%N_ref(ib,ik_RT,i_sp) = spin_occ-aimag(G_lesser_reference(ib,ib,ik_RT,i_sp)) ! if (.not.PAR_IND_Xk_ibz%element_1D(ik) ) cycle ! - RT_el_occ%dN(ib,ik_RT)= aimag(dG_lesser(ib,ib,ik_RT,1)) + RT_el_occ%dN(ib,ik_RT,i_sp)= aimag(dG_lesser(ib,ib,ik_RT,i_sp,1)) ! - RT_el_occ%N(ib,ik_RT) = RT_el_occ%N_ref(ib,ik_RT)+RT_el_occ%dN(ib,ik_RT) - RT_ho_occ%N(ib,ik_RT) = RT_ho_occ%N_ref(ib,ik_RT)-RT_el_occ%dN(ib,ik_RT) + RT_el_occ%N(ib,ik_RT,i_sp) = RT_el_occ%N_ref(ib,ik_RT,i_sp)+RT_el_occ%dN(ib,ik_RT,i_sp) + RT_ho_occ%N(ib,ik_RT,i_sp) = RT_ho_occ%N_ref(ib,ik_RT,i_sp)-RT_el_occ%dN(ib,ik_RT,i_sp) ! if (.not.RT_is_dynamically_dephased) cycle ! - RT_life_occ%dN(ib,ik_RT) = RT_el_occ%dN(ib,ik_RT) + RT_life_occ%dN(ib,ik_RT,i_sp) = RT_el_occ%dN(ib,ik_RT,i_sp) ! enddo enddo + enddo enddo ! call PP_redux_wait(RT_el_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index 7d13d8b4e4..f4e45a6b39 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,6 +1,7 @@ RT_Dephasing_Matrix.o RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o + RT_field_from_file.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index e9229f2ad2..ee476ea86d 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -74,24 +74,26 @@ subroutine RT_start_and_restart(E,k,q) ! The Equilibrium Hamiltonian !========================= H_EQ=cZERO + do i_sp_pol=1,n_sp_pol do ik=1,nXkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle do ik_RT=RTibz%k_range(ik,1),RTibz%k_range(ik,2) do ib=RT_bands(1),RT_bands(2) if (ik_RT/=RTibz%k_range(ik,1)) then iE_fg=RTibz%E_map(ik_RT) - H_EQ(ib,ib,ik_RT,1)=E_reference%FG%E(ib,iE_fg,1) + H_EQ(ib,ib,ik_RT,i_sp_pol)=E_reference%FG%E(ib,iE_fg,i_sp_pol) else - H_EQ(ib,ib,ik_RT,1)=E_reference%E(ib,ik,1) + H_EQ(ib,ib,ik_RT,i_sp_pol)=E_reference%E(ib,ik,i_sp_pol) endif enddo enddo enddo + enddo ! if(.not.l_RT_is_WFfree) then ! - call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2)),E,k,rho_reference,1) - if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2)),E,k,magn_reference,1) + call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) + if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,magn_reference,1) ! call Bare_Hamiltonian(E,k,k) ! @@ -119,7 +121,7 @@ subroutine RT_start_and_restart(E,k,q) ! Perform a first I/O to check which DBs are present. !===================================================== RESTART=.FALSE. - do i_db=1,N_RT_databases + do i_db=1,N_RT_databases-2 COM_MODE=NONE if (i_db==RT_return_db_ID("ANY_G")) COM_MODE=REP call io_control(ACTION=OP_RD_CL,COM=COM_MODE,SEC=(/1/),MODE=VERIFY,ID=RT_DB_ID(i_db)) @@ -171,7 +173,7 @@ subroutine RT_start_and_restart(E,k,q) ! !AMBO_FREE(RT_TIME_status) ! - ! I use G_lesser(:,:,:) to reconstruct everything + ! I use G_lesser to reconstruct everything ! Note that the databases must be loaded at the RESTART time (NE_time) ! i_db=RT_return_db_ID("G_lesser_RESTART_K_section") @@ -190,7 +192,7 @@ subroutine RT_start_and_restart(E,k,q) ! The G_lesser must be now rebuild from the reference (T=0) and latest dG components ! do i_mem=1,G_MEM_steps - G_lesser(:,:,:,i_mem)=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2))+dG_lesser(:,:,:,i_mem) + G_lesser(:,:,:,:,i_mem)=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:)+dG_lesser(:,:,:,:,i_mem) enddo ! #if defined _ELPH_ITERATIVE @@ -250,7 +252,7 @@ subroutine RT_start_and_restart(E,k,q) ! Initialize the Vector Potential !================================= ! - if (l_NE_with_fields) call RT_propagate_fields(E,k,A_tot,A_tot,dG_lesser(:,:,:,1),NE_time-RT_step,RT_step) + if (l_NE_with_fields) call RT_propagate_fields(E,k,A_tot,A_tot,dG_lesser(:,:,:,:,1),NE_time-RT_step,RT_step) ! ! Pseudo potential terms needed for velocity gauge !================================================== diff --git a/src/real_time_propagation/RT_Dephasing_step.F b/src/real_time_propagation/RT_Dephasing_step.F index 6e105c86f2..0c6643005e 100644 --- a/src/real_time_propagation/RT_Dephasing_step.F +++ b/src/real_time_propagation/RT_Dephasing_step.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS AM ! -subroutine RT_Dephasing_step(dG_out,dG_in,ik,deltaT) +subroutine RT_Dephasing_step(dG_out,dG_in,ik,i_sp,deltaT) ! use pars, ONLY:SP use real_time, ONLY:RT_is_statically_dephased,RT_Deph_Matrix,RT_deph_range,& @@ -13,10 +13,10 @@ subroutine RT_Dephasing_step(dG_out,dG_in,ik,deltaT) ! implicit none ! - complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - integer, intent(in) :: ik - real(SP), intent(in) :: deltaT + complex(SP), intent(inout) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + integer, intent(in) :: ik,i_sp + real(SP), intent(in) :: deltaT ! ! Note that dG_in is ONLY the coherent part of the equation. It must be added ! to dG_out if we are not using the EXP integrator. This is done here or in RT_apply_RWA diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index 64d7e91957..a6c98d6644 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -5,46 +5,61 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,deltaT) +subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! use pars, ONLY:SP,cZERO,cI - use real_time, ONLY:l_RT_PERT - use wrapper_omp, ONLY:M_by_M_omp - use real_time, ONLY:Ho_plus_Sigma,RT_bands,RT_nbands, & -& G_lesser_reference + use real_time, ONLY:l_RT_PERT,l_RT_FRES,l_RT_RWA,& + & H_EQ,H_field,Ho_plus_Sigma, & + & G_lesser_reference,RT_bands ! implicit none ! - integer, intent(in) :: ik,nbf - real(SP), intent(in) :: deltaT + integer, intent(in) :: ik,i_sp_pol,nbf + real(SP), intent(in) :: dT complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) ! ! Workspace ! - complex(SP) :: I1_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - complex(SP) :: I2_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP) :: G_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP) :: G_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP) :: H_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) ! integer :: ib1,ib2 ! - ! I1 = Ho_plus_Sigma*G - ! I2 = G*Ho_plus_Sigma + if (.not. l_RT_pert) then + ! + G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) + H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") + ! + return + ! + endif ! - if (.not.l_RT_PERT) G_k=dG_in+G_lesser_reference(:,:,ik) - if ( l_RT_PERT) G_k= G_lesser_reference(:,:,ik) + ! Part of the hamiltonina multiplied by rho0+rho1 ! - call M_by_M_omp('n','n',RT_nbands,Ho_plus_Sigma(:,:,ik,1),G_k,I1_k) - call M_by_M_omp('n','n',RT_nbands,G_k,Ho_plus_Sigma(:,:,ik,1),I2_k) + H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) + if(.not.l_RT_RWA) H_k=H_k-H_EQ(:,:,ik,i_sp_pol) + if( l_RT_FRES ) H_k=H_k-H_field(:,:,ik,i_sp_pol) ! - ! dG_out = G(T0+dt) -G(T0)= -i dt * ( I1(T0)-I2(T0) ) + ! First the rho0 term. This gives rho1. + ! + G_k=G_lesser_reference(:,:,ik,i_sp_pol) + ! + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") ! - dG_out=-cI*deltaT*(I1_k-I2_k) + ! Then the rho1 term. This gives rho2. ! - if (.not.l_RT_PERT) return + ! The first order rho is zero in the vv' and cc' channel + ! Thus I compute the second order rho, constructed using the + ! first order rho from the cv channel ! - I1_k=cZERO - I2_k=cZERO + ! N.B. In the case l_RT_FRES the above sentence is not true anymore + ! However I still want only the cv channel to enter here + ! to avoid energy shifts due to repulsion + ! + ! Take in input only the cv channel ! G_k=cZERO do ib1=RT_bands(1),nbf @@ -54,19 +69,73 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,nbf,deltaT) enddo enddo ! - call M_by_M_omp('n','n',RT_nbands,Ho_plus_Sigma(:,:,ik,1),G_k,I1_k) - call M_by_M_omp('n','n',RT_nbands,G_k,Ho_plus_Sigma(:,:,ik,1),I2_k) + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"pop") ! - do ib1=RT_bands(1),nbf - do ib2=RT_bands(1),nbf - dG_out(ib1,ib2)=-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) - enddo - enddo + if( l_RT_RWA .and. (.not.l_RT_FRES) ) return ! - do ib1=nbf+1,RT_bands(2) - do ib2=nbf+1,RT_bands(2) - dG_out(ib1,ib2)=-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) - enddo - enddo + ! Part of the hamiltonian multiplied by the full rho + ! + H_k=cZERO + if(.not.l_RT_RWA) H_k=H_EQ(:,:,ik,i_sp_pol) + if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,i_sp_pol) + G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) + ! + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") ! end subroutine RT_EULER_step +! +! +subroutine RT_EULER_step_apply(G_k,H_k,dG_out,nbf,deltaT,mode) + ! + use pars, ONLY:SP,cI + use wrapper_omp, ONLY:M_by_M_omp + use real_time, ONLY:RT_bands,RT_nbands + ! + implicit none + ! + character(*),intent(in) :: mode + integer, intent(in) :: nbf + real(SP), intent(in) :: deltaT + complex(SP), intent(in) :: G_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(in) :: H_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + ! + ! Workspace + ! + complex(SP) :: I1_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + complex(SP) :: I2_k(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) + ! + integer :: ib1,ib2 + ! + ! I1 = Ho_plus_Sigma*G + ! I2 = G*Ho_plus_Sigma + ! + call M_by_M_omp('n','n',RT_nbands,H_k,G_k,I1_k) + call M_by_M_omp('n','n',RT_nbands,G_k,H_k,I2_k) + ! + ! dG_out = G(T0+dt) -G(T0)= -i dt * ( I1(T0)-I2(T0) ) + ! + if(mode=="def") dG_out=-cI*deltaT*(I1_k-I2_k) + ! + if(mode=="add") dG_out=dG_out-cI*deltaT*(I1_k-I2_k) + ! + if(mode=="pop") then + ! + ! Save in output only the vv' and cc' channels + ! This will control the normalization of the residuals + ! + do ib1=RT_bands(1),nbf + do ib2=RT_bands(1),nbf + dG_out(ib1,ib2)=dG_out(ib1,ib2)-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) + enddo + enddo + ! + do ib1=nbf+1,RT_bands(2) + do ib2=nbf+1,RT_bands(2) + dG_out(ib1,ib2)=dG_out(ib1,ib2)-cI*deltaT*(I1_k(ib1,ib2)-I2_k(ib1,ib2)) + enddo + enddo + ! + endif + ! +end subroutine RT_EULER_step_apply diff --git a/src/real_time_propagation/RT_EXP_step_accurate.F b/src/real_time_propagation/RT_EXP_step_accurate.F index 0ce62016b9..114abb2244 100644 --- a/src/real_time_propagation/RT_EXP_step_accurate.F +++ b/src/real_time_propagation/RT_EXP_step_accurate.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The EXP integrator is better than the EULER integrator if Ho_plus_Sigma ! changes in time more slowly that G @@ -19,7 +19,7 @@ subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -34,12 +34,12 @@ subroutine RT_EXP_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! dG_out=cZERO ! - G_comm=dG_inp+G_lesser_reference(:,:,ik) + G_comm=dG_inp+G_lesser_reference(:,:,ik,i_sp_pol) ! do i_order=1,Integrator_exp_order ! - call M_by_M_omp('n','n',RT_nbands,-cI*deltaT*Ho_plus_Sigma(:,:,ik,1)/real(i_order,SP),G_comm,U1_k) - call M_by_M_omp('n','n',RT_nbands,G_comm,+cI*deltaT*Ho_plus_Sigma(:,:,ik,1)/real(i_order,SP),U2_k) + call M_by_M_omp('n','n',RT_nbands,-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol)/real(i_order,SP),G_comm,U1_k) + call M_by_M_omp('n','n',RT_nbands,G_comm,+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol)/real(i_order,SP),U2_k) ! ! dG_out = G(T0+dt) -G(T0)= U1(T0)+U2(T0) ! diff --git a/src/real_time_propagation/RT_EXP_step_std.F b/src/real_time_propagation/RT_EXP_step_std.F index 5fe1bbd3d4..286b02cd5a 100644 --- a/src/real_time_propagation/RT_EXP_step_std.F +++ b/src/real_time_propagation/RT_EXP_step_std.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The EXP integrator is better than the EULER integrator if Ho_plus_Sigma ! changes in time more slowly that G @@ -17,7 +17,7 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -47,8 +47,8 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! U1 = exp ( -i * Ho_plus_Sigma * dt) ! U2 = exp ( +i + Ho_plus_Sigma * dt) ! - U1_km1=-cI*deltaT*Ho_plus_Sigma(:,:,ik,1) - U2_km1=+cI*deltaT*Ho_plus_Sigma(:,:,ik,1) + U1_km1=-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + U2_km1=+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! if(integrator_exp_order>1) then M1_tmp=U2_km1 @@ -82,11 +82,11 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) call M_by_M_omp('n','n',RT_nbands,U1_k,dG_inp,M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,U2_k,dG_out) ! - call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),U2_km1,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),U2_km1,M2_tmp) dG_out=dG_out+(M1_tmp+M2_tmp) ! - call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik),M2_tmp) + call M_by_M_omp('n','n',RT_nbands,U1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M2_tmp) call M_by_M_omp('n','n',RT_nbands,M2_tmp,U2_km1,M1_tmp) dG_out=dG_out+M1_tmp-dG_inp ! @@ -94,9 +94,9 @@ subroutine RT_EXP_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! ! dG_out = G(T0+dt) -G(T0) = U1(T;dt) G(T0) U2(T;-dt) - G(T0) ! - call M_by_M_omp('n','n',RT_nbands,U1_k,dG_inp+G_lesser_reference(:,:,ik),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,U1_k,dG_inp+G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,U2_k,dG_out) - dG_out=dG_out-dG_inp-G_lesser_reference(:,:,ik) + dG_out=dG_out-dG_inp-G_lesser_reference(:,:,ik,i_sp_pol) ! endif ! diff --git a/src/real_time_propagation/RT_Ext_fields.F b/src/real_time_propagation/RT_Ext_fields.F index ed92e83437..17dadefe2f 100644 --- a/src/real_time_propagation/RT_Ext_fields.F +++ b/src/real_time_propagation/RT_Ext_fields.F @@ -26,10 +26,12 @@ subroutine RT_Ext_fields(A,time,i_f) ! the induced current is included in the dynamics ( RT_propagate_fields ) ! use pars, ONLY:SP - use units, ONLY:SPEED_OF_LIGHT + use units, ONLY:SPEED_OF_LIGHT,FS2AUT use real_time, ONLY:RT_dyn_step,NE_i_time use functions, ONLY:theta_function - use fields, ONLY:Efield,small_a,gauge_field,compute_intensity,compute_envelop,A_vecpot_reset + use fields_int, ONLY:small_a + use fields, ONLY:Efield,gauge_field,A_vecpot_reset,& +& compute_envelop,compute_intensity ! implicit none ! @@ -39,26 +41,43 @@ subroutine RT_Ext_fields(A,time,i_f) ! ! Work Space ! + ! DEBUG < + logical :: l_print_to_file + ! DEBUG > integer :: ikind real(SP) :: Field_time,A_coeff complex(SP) :: A_of_t(2),E_of_t(2),J_of_t(2),theta,delta,signf ! Field_time=time-Efield(i_f)%t_initial ! - if (Efield(i_f)%ef_name=="none" .or. Efield(i_f)%t_initial_indx>(NE_i_time+2) ) then + if (Efield(i_f)%ef_name=="none" .or. NE_i_time0 .and. NE_i_time>Efield(i_f)%t_final_indx+2) ) then call A_vecpot_reset(A) return endif ! + ! DEBUG < + inquire ( unit=99+i_f,opened=l_print_to_file) + if (l_print_to_file) l_print_to_file=Efield(i_f)%t_final_indx>=NE_i_time-2 + if (l_print_to_file.and.Efield(i_f)%t_initial_indx<4) call error('writing field to file requires initial index>3') + ! DEBUG > + ! theta=theta_function(Field_time,RT_dyn_step,0) delta=theta_function(Field_time,RT_dyn_step,1) signf=theta_function(Field_time,RT_dyn_step,2) ! do ikind=1,2 ! - A_of_t=small_a(Field_time,Efield(i_f),0,envelop_only=(ikind==1)) - E_of_t=small_a(Field_time,Efield(i_f),1,envelop_only=(ikind==1)) - J_of_t=small_a(Field_time,Efield(i_f),2,envelop_only=(ikind==1)) + A_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),0,envelop_only=(ikind==1)) + E_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),1,envelop_only=(ikind==1)) + J_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),2,envelop_only=(ikind==1)) + ! + ! DEBUG < + if (ikind==2.and.l_print_to_file) then + write(99+i_f,*) Field_time/FS2AUT,real(A_of_t(1),SP),real(E_of_t(1),SP),real(J_of_t(1),SP),& + real(A_of_t(2),SP),real(E_of_t(2),SP),real(J_of_t(2),SP) + endif + ! DEBUG > ! select case(Efield(i_f)%ef_pol) case("linear") diff --git a/src/real_time_propagation/RT_Glesser_evolve.F b/src/real_time_propagation/RT_Glesser_evolve.F index c25d78ec21..ab7d0343a5 100644 --- a/src/real_time_propagation/RT_Glesser_evolve.F +++ b/src/real_time_propagation/RT_Glesser_evolve.F @@ -14,7 +14,7 @@ subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) ! T0+dt = T+dt' ! use pars, ONLY:SP,cZERO - use electrons, ONLY:levels,spin_occ + use electrons, ONLY:levels,spin_occ,n_sp_pol use R_lattice, ONLY:bz_samp use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_G_k_range use real_time, ONLY:l_RT_EULER,l_RT_EXP,l_RT_INV, & @@ -27,31 +27,32 @@ subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) type(levels), intent(in) :: En ! real(SP), intent(in) :: dT,dTp - complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work space ! logical :: l_RT_STD - integer :: ik + integer :: ik,i_sp ! dG_out=cZERO ! l_RT_STD=.not.(l_RT_ACC.or.l_RT_DIAG) ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if( .not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! - if (l_RT_EXP.and.l_RT_ACC ) call RT_EXP_step_accurate(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) - if (l_RT_EXP.and.l_RT_STD ) call RT_EXP_step_std(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) + if (l_RT_EXP.and.l_RT_ACC ) call RT_EXP_step_accurate(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) + if (l_RT_EXP.and.l_RT_STD ) call RT_EXP_step_std(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) ! - if (l_RT_EULER ) call RT_EULER_step(dG_in(:,:,ik),dG_out(:,:,ik),ik,En%nbf,dT) + if (l_RT_EULER ) call RT_EULER_step(dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,En%nbf,dT) ! - if (l_RT_INV.and.l_RT_ACC ) call RT_INV_step_accurate(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) - if (l_RT_INV.and.l_RT_DIAG) call RT_INV_step_diago(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) - if (l_RT_INV.and.l_RT_STD ) call RT_INV_step_std(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) + if (l_RT_INV.and.l_RT_ACC ) call RT_INV_step_accurate(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) + if (l_RT_INV.and.l_RT_DIAG) call RT_INV_step_diago(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) + if (l_RT_INV.and.l_RT_STD ) call RT_INV_step_std(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) ! ! Here the term G(T0) [dG_old] is added to dG(t) ! @@ -59,25 +60,26 @@ subroutine RT_Glesser_evolve(En,kpt,dG_old,dG_in,dG_out,dT,dTp) ! ! Dephasing is integrated analitically in this case. ! - if( l_RT_RWA) call RT_apply_RWA(ik,En,kpt,dT,dTp,dG_out(:,:,ik),dG_old(:,:,ik)) + if( l_RT_RWA) call RT_apply_RWA(ik,i_sp,En,kpt,dT,dTp,dG_out(:,:,ik,i_sp),dG_old(:,:,ik,i_sp)) ! - if(.not.l_RT_RWA) call RT_Dephasing_step(dG_out(:,:,ik),dG_old(:,:,ik),ik,dT) + if(.not.l_RT_RWA) call RT_Dephasing_step(dG_out(:,:,ik,i_sp),dG_old(:,:,ik,i_sp),ik,i_sp,dT) ! ! Carriers relaxation step: ! ! G(T0+dt) = G(T0) - i dt * Sigma_relax(T) ! - call RT_Scattering_step(dG_old(:,:,ik),dG_in(:,:,ik),dG_out(:,:,ik),ik,dT) + call RT_Scattering_step(dG_old(:,:,ik,i_sp),dG_in(:,:,ik,i_sp),dG_out(:,:,ik,i_sp),ik,i_sp,dT) ! - call RT_G_symmetrization(dG_out(:,:,ik),ik) + call RT_G_symmetrization(dG_out(:,:,ik,i_sp),ik,i_sp) ! enddo + enddo ! contains ! - subroutine RT_G_symmetrization(G_inout,ik) + subroutine RT_G_symmetrization(G_inout,ik,i_sp) ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp complex(SP), intent(inout) :: G_inout(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) ! integer :: ib,ibp @@ -88,11 +90,11 @@ subroutine RT_G_symmetrization(G_inout,ik) ! G_inout(ib,ib)=cmplx(0._SP,aimag(G_inout(ib,ib))) ! - E_occ_tmp= aimag(G_inout(ib,ib))+ aimag(G_lesser_reference(ib,ib,ik)) - H_occ_tmp=-aimag(G_inout(ib,ib))+ ( spin_occ-aimag(G_lesser_reference(ib,ib,ik)) ) + E_occ_tmp= aimag(G_inout(ib,ib))+ aimag(G_lesser_reference(ib,ib,ik,i_sp)) + H_occ_tmp=-aimag(G_inout(ib,ib))+ ( spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp)) ) ! - if ( E_occ_tmp<0._SP .or. H_occ_tmp>spin_occ ) G_inout(ib,ib)= G_lesser_reference(ib,ib,ik) - if ( H_occ_tmp<0._SP .or. E_occ_tmp>spin_occ ) G_inout(ib,ib)=cmplx(0._SP,spin_occ)-G_lesser_reference(ib,ib,ik) + if ( E_occ_tmp<0._SP .or. H_occ_tmp>spin_occ ) G_inout(ib,ib)= G_lesser_reference(ib,ib,ik,i_sp) + if ( H_occ_tmp<0._SP .or. E_occ_tmp>spin_occ ) G_inout(ib,ib)=cmplx(0._SP,spin_occ)-G_lesser_reference(ib,ib,ik,i_sp) ! do ibp=ib+1,RT_bands(2) ! diff --git a/src/real_time_propagation/RT_INV_step_accurate.F b/src/real_time_propagation/RT_INV_step_accurate.F index 994d317f40..39b33bc326 100644 --- a/src/real_time_propagation/RT_INV_step_accurate.F +++ b/src/real_time_propagation/RT_INV_step_accurate.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The last term in the following come from the fact that G0=G_reference ! is not included in G(t) nor in G(t+dt) @@ -31,7 +31,7 @@ subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -49,22 +49,22 @@ subroutine RT_INV_step_accurate(dG_old,dG_inp,dG_out,ik,deltaT) ! complex(SP), pointer :: vec_dG_out(:) ! - H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! - call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),H2_k,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),H2_k,M2_tmp) G_com=M1_tmp+M2_tmp ! - H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! call M_by_M_omp('n','n',RT_nbands,H1_k,dG_old,M1_tmp) call M_by_M_omp('n','n',RT_nbands,dG_old,H2_k,M2_tmp) dG_out=G_com+M1_tmp+M2_tmp ! !******************************************************* - !U_k=Ho_plus_Sigma(:,:,ik,1) + !U_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) !call SERIAL_HERMITIAN_diagonalization(RT_nbands,U_k,En) !! !! Generate the matrix diff --git a/src/real_time_propagation/RT_INV_step_diago.F b/src/real_time_propagation/RT_INV_step_diago.F index f940851435..0e89948fcd 100644 --- a/src/real_time_propagation/RT_INV_step_diago.F +++ b/src/real_time_propagation/RT_INV_step_diago.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! G(T+dt)-G(T)=-idt/2[H,G(T+dt)+G(T)]-idt[H,G0] ! @@ -27,7 +27,7 @@ subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -46,15 +46,15 @@ subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! logical :: l_use_superindex=.true. ! - H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=-cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=+cI*2*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! - call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),H2_k,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,H1_k,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),H2_k,M2_tmp) G_com=M1_tmp+M2_tmp ! - H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,1) - H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,1) + H1_k=I1_matrix-cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) + H2_k=I1_matrix+cI*deltaT*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! call M_by_M_omp('n','n',RT_nbands,H1_k,dG_old,M1_tmp) call M_by_M_omp('n','n',RT_nbands,dG_old,H2_k,M2_tmp) @@ -62,12 +62,12 @@ subroutine RT_INV_step_diago(dG_old,dG_inp,dG_out,ik,deltaT) ! ! Diagonalize U_k ! - U_k=Ho_plus_Sigma(:,:,ik,1) + U_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) call SERIAL_HERMITIAN_diagonalization(RT_nbands,U_k,En) ! ! Implementation works, and it is much faster than before ! However it is not sensitive - !U_k=cmplx(Ho_plus_Sigma(:,:,ik,1),kind=DP) + !U_k=cmplx(Ho_plus_Sigma(:,:,ik,i_sp_pol),kind=DP) !call ZHEEV('V','U',RT_nbands,U_k,RT_nbands,En,v_cmplx,lwork,v_real,i_fail) ! ! Rotate G_com in the new basis set diff --git a/src/real_time_propagation/RT_INV_step_std.F b/src/real_time_propagation/RT_INV_step_std.F index 9eca8f06f6..921055bf13 100644 --- a/src/real_time_propagation/RT_INV_step_std.F +++ b/src/real_time_propagation/RT_INV_step_std.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): CA DS ! -subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! use pars, ONLY:SP,cI use wrapper_omp, ONLY:M_by_M_omp @@ -16,7 +16,7 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -40,7 +40,7 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! ! Taylor expansion ! - H_k=cI*deltaT/2._SP*Ho_plus_Sigma(:,:,ik,1) + H_k=cI*deltaT/2._SP*Ho_plus_Sigma(:,:,ik,i_sp_pol) ! if(l_use_lin_sys) then ! @@ -95,11 +95,11 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) call M_by_M_omp('n','n',RT_nbands,T1_k,dG_old,M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,T2_k,dG_out) ! - call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik),M1_tmp) - call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik),T2_km1,M2_tmp) + call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,G_lesser_reference(:,:,ik,i_sp_pol),T2_km1,M2_tmp) dG_out=dG_out+(M1_tmp+M2_tmp) ! - call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik),M2_tmp) + call M_by_M_omp('n','n',RT_nbands,T1_km1,G_lesser_reference(:,:,ik,i_sp_pol),M2_tmp) call M_by_M_omp('n','n',RT_nbands,M2_tmp,T2_km1,M1_tmp) dG_out=dG_out+M1_tmp-dG_old ! @@ -107,9 +107,9 @@ subroutine RT_INV_step_std(dG_old,dG_inp,dG_out,ik,deltaT) ! ! dG_out = G(T0+dt) -G(T0) = U1(T;dt) G(T0) U2(T;-dt) - G(T0) ! - call M_by_M_omp('n','n',RT_nbands,T1_k,dG_old+G_lesser_reference(:,:,ik),M1_tmp) + call M_by_M_omp('n','n',RT_nbands,T1_k,dG_old+G_lesser_reference(:,:,ik,i_sp_pol),M1_tmp) call M_by_M_omp('n','n',RT_nbands,M1_tmp,T2_k,dG_out) - dG_out=dG_out-dG_old-G_lesser_reference(:,:,ik) + dG_out=dG_out-dG_old-G_lesser_reference(:,:,ik,i_sp_pol) ! endif ! diff --git a/src/real_time_propagation/RT_IO_type_time_steps.F b/src/real_time_propagation/RT_IO_type_time_steps.F index 524e07a1cf..f897aaa165 100644 --- a/src/real_time_propagation/RT_IO_type_time_steps.F +++ b/src/real_time_propagation/RT_IO_type_time_steps.F @@ -11,7 +11,7 @@ subroutine RT_IO_type_time_steps(what) use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,RT_IO_t,Gless_RESTART_RT_IO_t,OUTPUT_RT_IO_t,& & SETUP_RT_IO_type,CACHE_OBS_INTERVAL_time_INPUT,TIME_adjust,& & CACHE_OBS_INTERVAL_time,CACHE_OBS_steps,RT_control_free,& -& RT_control_alloc,Gless_RT_IO_t,SAVE_G_history +& RT_control_alloc,Vbands_RT_IO_T,Gless_RT_IO_t,SAVE_G_history ! implicit none ! @@ -22,6 +22,7 @@ subroutine RT_IO_type_time_steps(what) call SETUP_RT_IO_type(CARR_RT_IO_t,who="CARR",what=what) call SETUP_RT_IO_type(OUTPUT_RT_IO_t,who="OUTPUT",what=what) call SETUP_RT_IO_type(Gless_RESTART_RT_IO_t,who="GF",what=what) + call SETUP_RT_IO_type(Vbands_RT_IO_t,who="Vb",what=what) call SETUP_RT_IO_type(OBS_RT_IO_t,who="OBS",what=what) if (SAVE_G_history) call SETUP_RT_IO_type(Gless_RT_IO_t,who="GF_history",what=what) ! diff --git a/src/real_time_propagation/RT_Integrator.F b/src/real_time_propagation/RT_Integrator.F index 02d7370f43..d9ea54607e 100644 --- a/src/real_time_propagation/RT_Integrator.F +++ b/src/real_time_propagation/RT_Integrator.F @@ -35,7 +35,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! G(t),H[G(t)],dt/2 --> G1(t+dt/2) ! G(t),H[G1(t+dt/2)],dt/2 --> G2(t+dt/2) ! G(t),H[G2(t+dt/2)),dt --> G3(t+dt) - ! G(t),H[G3(t+dt)),dtcccc --> G4(t+dt) + ! G(t),H[G3(t+dt)),dt --> G4(t+dt) ! G(t+dt)=G1(t+dt)/6+G2(t+dt)/3+G3(t+dt)/3+G2(t+dt)/6 ! ! In addition the IP oscillations and dephasing are "analytically integrated out" @@ -47,10 +47,10 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) use R_lattice, ONLY:bz_samp use RT_control, ONLY:TIME_adjust use real_time, ONLY:Integrator_step,RT_nk,RT_bands,a_tableau,b_tableau,& -& c_tableau,RWA_table,Integrator_nsteps,G_lesser_reference,& +& c_tableau,RWA_table,Int_Ns=>Integrator_nsteps,G_lesser_reference,& & NE_time,NE_i_time,RT_step,RT_dyn_step use fields, ONLY:gauge_field - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use timing_m, ONLY:timing use parallel_m, ONLY:PAR_G_k_range ! @@ -58,9 +58,9 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! type(bz_samp), intent(in) :: k,q type(levels), intent(inout) :: E - complex(SP), intent(inout) :: G_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) - complex(SP), intent(out) :: dG_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(inout) :: G_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) + complex(SP), intent(out) :: dG_new(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) type(gauge_field), intent(in) :: A_old type(gauge_field), intent(out) :: A_new ! @@ -68,18 +68,18 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! integer :: i_step real(SP) :: delta_T1,delta_T2,delta_T3 - complex(SP) :: dG_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),Integrator_nsteps+1) + complex(SP) :: dG_tmp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol,Int_Ns+1) ! - type(gauge_field) :: A_tmp(Integrator_nsteps+1) + type(gauge_field) :: A_tmp(Int_Ns+1) ! call timing('RT integrator',OPR='start') ! - dG_tmp(:,:,:,1)=dG_old - A_tmp(1) =A_old + dG_tmp(:,:,:,:,1)=dG_old + A_tmp(1) =A_old ! Integrator_step=1 ! - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns ! if (a_tableau(i_step)==0._SP) cycle ! @@ -89,7 +89,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! Evaluate @ T+dt1 ! - call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,i_step-1),dG_tmp(:,:,:,i_step),delta_T1,delta_T3) + call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,:,i_step-1),dG_tmp(:,:,:,:,i_step),delta_T1,delta_T3) ! ! ... Update of logicals before the occupations update ! @@ -97,11 +97,11 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) call RT_relaxation_logicals( ) #endif ! - call RT_occupations_eval(dG_tmp(:,:,:,i_step)) + call RT_occupations_eval(dG_tmp(:,:,:,:,i_step)) ! ! Fields @ T+dt2 ! - call RT_propagate_fields(E,k,A_old,A_tmp(i_step),dG_tmp(:,:,:,i_step),NE_time,delta_T2) + call RT_propagate_fields(E,k,A_old,A_tmp(i_step),dG_tmp(:,:,:,:,i_step),NE_time,delta_T2) ! Integrator_step=Integrator_step+1 ! @@ -109,7 +109,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! Recalculate H and S using G(t+dt1) ! - call RT_Hamiltonian(dG_tmp(:,:,:,i_step),A_tmp(i_step),E,k) ! The time specifications here is useless + call RT_Hamiltonian(dG_tmp(:,:,:,:,i_step),A_tmp(i_step),E,k) ! The time specifications here is useless ! #if defined _RT_SCATT call RT_relaxation(E,k,q,NE_time+delta_T1) ! since nothing explicitely depends on time @@ -121,8 +121,8 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! final step @ T+dt ! - call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,Integrator_nsteps),dG_tmp(:,:,:,Integrator_nsteps+1), & -& RT_dyn_step,RT_dyn_step*RWA_table(Integrator_nsteps+1)) + call RT_Glesser_evolve(E,k,dG_old,dG_tmp(:,:,:,:,Int_Ns),dG_tmp(:,:,:,:,Int_Ns+1), & +& RT_dyn_step,RT_dyn_step*RWA_table(Int_Ns+1)) ! call RT_build_dG_new() ! @@ -136,7 +136,7 @@ subroutine RT_Integrator(G_new,dG_new,dG_old,A_new,A_old,E,k,q) ! ! Fields @ T+dT ! - call RT_propagate_fields(E,k,A_old,A_tmp(Integrator_nsteps+1),dG_new,NE_time,RT_dyn_step) + call RT_propagate_fields(E,k,A_old,A_tmp(Int_Ns+1),dG_new,NE_time,RT_dyn_step) ! call RT_build_A_new() ! @@ -156,50 +156,53 @@ subroutine RT_build_dG_new() ! use parallel_m, ONLY:PAR_IND_Xk_ibz use real_time, ONLY:RTibz + use electrons, ONLY:n_sp_pol ! ! Now I remove dG_old from dG_tmp and rescale to a_tableau ! - integer :: ik + integer :: ik,i_sp ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if (.not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns if (a_tableau(i_step)==0._SP) cycle - dG_tmp(:,:,ik,i_step)=(dG_tmp(:,:,ik,i_step)-dG_old(:,:,ik))/a_tableau(i_step) + dG_tmp(:,:,ik,i_sp,i_step)=(dG_tmp(:,:,ik,i_sp,i_step)-dG_old(:,:,ik,i_sp))/a_tableau(i_step) enddo - dG_tmp(:,:,ik,Integrator_nsteps+1)=dG_tmp(:,:,ik,Integrator_nsteps+1)-dG_old(:,:,ik) + dG_tmp(:,:,ik,i_sp,Int_Ns+1)=dG_tmp(:,:,ik,i_sp,Int_Ns+1)-dG_old(:,:,ik,i_sp) ! ! Finally I average using b_tableau ! - dG_new(:,:,ik)=dG_old(:,:,ik) - do i_step=1,Integrator_nsteps - dG_new(:,:,ik)=dG_new(:,:,ik)+dG_tmp(:,:,ik,i_step+1)*b_tableau(i_step) + dG_new(:,:,ik,i_sp)=dG_old(:,:,ik,i_sp) + do i_step=1,Int_Ns + dG_new(:,:,ik,i_sp)=dG_new(:,:,ik,i_sp)+dG_tmp(:,:,ik,i_sp,i_step+1)*b_tableau(i_step) enddo ! enddo + enddo ! - G_new=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2))+dG_new + G_new=G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:)+dG_new ! end subroutine RT_build_dG_new ! subroutine RT_build_A_new() ! - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns if (a_tableau(i_step)==0._SP) cycle A_tmp(i_step)%vecpot =(A_tmp(i_step)%vecpot -A_old%vecpot)/a_tableau(i_step) A_tmp(i_step)%vecpot_vel=(A_tmp(i_step)%vecpot_vel-A_old%vecpot_vel)/a_tableau(i_step) A_tmp(i_step)%vecpot_acc=(A_tmp(i_step)%vecpot_acc-A_old%vecpot_acc)/a_tableau(i_step) enddo - A_tmp(Integrator_nsteps+1)%vecpot =A_tmp(Integrator_nsteps+1)%vecpot -A_old%vecpot - A_tmp(Integrator_nsteps+1)%vecpot_vel=A_tmp(Integrator_nsteps+1)%vecpot_vel-A_old%vecpot_vel - A_tmp(Integrator_nsteps+1)%vecpot_acc=A_tmp(Integrator_nsteps+1)%vecpot_acc-A_old%vecpot_acc + A_tmp(Int_Ns+1)%vecpot =A_tmp(Int_Ns+1)%vecpot -A_old%vecpot + A_tmp(Int_Ns+1)%vecpot_vel=A_tmp(Int_Ns+1)%vecpot_vel-A_old%vecpot_vel + A_tmp(Int_Ns+1)%vecpot_acc=A_tmp(Int_Ns+1)%vecpot_acc-A_old%vecpot_acc ! ! Finally I average using b_tableau ! A_new=A_old - do i_step=1,Integrator_nsteps + do i_step=1,Int_Ns A_new%vecpot =A_new%vecpot +A_tmp(i_step+1)%vecpot *b_tableau(i_step) A_new%vecpot_vel=A_new%vecpot_vel+A_tmp(i_step+1)%vecpot_vel*b_tableau(i_step) A_new%vecpot_acc=A_new%vecpot_acc+A_tmp(i_step+1)%vecpot_acc*b_tableau(i_step) diff --git a/src/real_time_propagation/RT_Integrator_init.F b/src/real_time_propagation/RT_Integrator_init.F index a8e7ab3057..4699d6c983 100644 --- a/src/real_time_propagation/RT_Integrator_init.F +++ b/src/real_time_propagation/RT_Integrator_init.F @@ -10,7 +10,7 @@ subroutine RT_Integrator_init() use pars, ONLY:SP,cONE,cZERO use com, ONLY:msg use stderr, ONLY:intc - use real_time, ONLY:l_RT_EULER,l_RT_EXP,l_RT_INV, & + use real_time, ONLY:l_RT_EULER,l_RT_EXP,l_RT_INV,l_RT_FRES, & & l_RT_RWA,l_RT_ACC,l_RT_DIAG,l_RT_PERT, & & l_RT_HEUN,l_RT_RK2,l_RT_RK4,l_RT_SIMPLE, & & Integrator_name,integrator_exp_order, & @@ -61,8 +61,11 @@ subroutine RT_Integrator_init() l_RT_DIAG= l_RT_INV .and. & & index(Integrator_name,'DIAG' )/=0.or.index(Integrator_name,'diag' )/=0 ! - l_RT_PERT= (l_RT_EULER.and.l_RT_RWA) .and. & -& index(Integrator_name,'PERT' )/=0.or.index(Integrator_name,'pert' )/=0 + l_RT_PERT= l_RT_EULER .and. & +& index(Integrator_name,'PERT' )/=0.or.index(Integrator_name,'pert' )/=0 + ! + l_RT_FRES= l_RT_PERT .and. & +& index(Integrator_name,'FRES' )/=0.or.index(Integrator_name,'fres' )/=0 ! ! d) Reset integrator name ! @@ -80,6 +83,7 @@ subroutine RT_Integrator_init() if (l_RT_ACC ) Integrator_name = trim(Integrator_name)//" + ACC" if (l_RT_DIAG ) Integrator_name = trim(Integrator_name)//" + DIAG" if (l_RT_PERT ) Integrator_name = trim(Integrator_name)//" + PERT" + if (l_RT_FRES ) Integrator_name = trim(Integrator_name)//" + FRES" ! call msg('s','Integrator '//trim(Integrator_name)) ! diff --git a/src/real_time_propagation/RT_Scattering_step.F b/src/real_time_propagation/RT_Scattering_step.F index cb8e9427f8..0f6ecfb1e9 100644 --- a/src/real_time_propagation/RT_Scattering_step.F +++ b/src/real_time_propagation/RT_Scattering_step.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM DS ! -subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) +subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,i_sp_pol,deltaT) ! ! The propagation of the scattering part is done in terms of electrons and holes occupations. ! The lifetimes used (computed by RT_relaxation) are all constructed in terms of f_e and f_h @@ -32,7 +32,7 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) ! Here remember that the occupations stored in the module are always equal to dG_inp ! use pars, ONLY:SP,cI,rZERO - use electrons, ONLY:spin_occ + use electrons, ONLY:spin_occ,n_sp_pol use real_time, ONLY:RT_bands,RTibz,l_RT_include_eq_scatt,RT_is_statically_dephased,& & RT_is_dynamically_dephased,RT_Deph_Matrix,G_lesser_reference use RT_occupations, ONLY:RT_el_occ,RT_ho_occ,l_RT_relax_time_approx,RT_RTA_E_occ_infty,RT_RTA_H_occ_infty @@ -43,7 +43,7 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) complex(SP), intent(in) :: dG_old(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(in) :: dG_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(inout) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp_pol real(SP), intent(in) :: deltaT ! integer :: ib @@ -52,18 +52,20 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) ! if( .not. RT_is_dynamically_dephased) return ! + if (n_sp_pol==2) call error("RT_Scattering step not fully ported for n_sp_pol=2") + ! do ib=RT_bands(1),RT_bands(2) ! ! 1=electrons ! 2=holes ! - f_(1)=RT_el_occ%N(ib,ik) - f_(2)=RT_ho_occ%N(ib,ik) + f_(1)=RT_el_occ%N(ib,ik,i_sp_pol) + f_(2)=RT_ho_occ%N(ib,ik,i_sp_pol) ! - f0(1)= aimag(G_lesser_reference(ib,ib,ik)) - f0(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik)) - df(1)= RT_el_occ%dN(ib,ik) - df(2)=-RT_el_occ%dN(ib,ik) + f0(1)= aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) + f0(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) + df(1)= RT_el_occ%dN(ib,ik,i_sp_pol) + df(2)=-RT_el_occ%dN(ib,ik,i_sp_pol) ! ! The GAMMA0 term could be moved inside RT_apply_RWA.F ! For the moment I keep it here, together with the rest of the relaxation term @@ -111,8 +113,8 @@ subroutine RT_Scattering_step(dG_old,dG_inp,dG_out,ik,deltaT) ! f_inf(2)= GAMMA_(1)/GAMMA__TOT*spin_occ !endif !if( GAMMA__TOT<=0._SP ) then - ! f_inf(1)= aimag(G_lesser_reference(ib,ib,ik)) - ! f_inf(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik)) + ! f_inf(1)= aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) + ! f_inf(2)=spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp_pol)) !endif !df_out(:) = -deltaT*(GAMMA0_TOT*df(:) + GAMMA0_TOT*(f0(:)-f_inf(:)) + & !& dGAMMA_TOT*df(:) + dGAMMA_TOT*(f0(:)-f_inf(:)) ) diff --git a/src/real_time_propagation/RT_apply_RWA.F b/src/real_time_propagation/RT_apply_RWA.F index 2b011f2c9e..3c3a06d53f 100644 --- a/src/real_time_propagation/RT_apply_RWA.F +++ b/src/real_time_propagation/RT_apply_RWA.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): AM DS ! -subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) +subroutine RT_apply_RWA(ik,i_sp,E,k,dT,dTp,dG_out,dG_in) ! use pars, ONLY:SP,cONE use electrons, ONLY:levels @@ -15,7 +15,7 @@ subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) ! implicit none ! - integer, intent(in) :: ik + integer, intent(in) :: ik,i_sp type(levels), intent(in) :: E type(bz_samp),intent(in) :: k real(SP), intent(in) :: dT,dTp @@ -44,7 +44,7 @@ subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) if (NE_time0._SP) sumGAMMA=0._SP if (NE_time>RT_deph_range(2).and.RT_deph_range(2)>0._SP) sumGAMMA=0._SP ! - deltaE=RT_levels%E(i_n,ik,1)-RT_levels%E(i_np,ik,1) + deltaE=RT_levels%E(i_n,ik,i_sp)-RT_levels%E(i_np,ik,i_sp) ! if (l_RT_EXP) then ! @@ -88,7 +88,7 @@ subroutine RT_apply_RWA(ik,E,k,dT,dTp,dG_out,dG_in) ! It is higly non satisfactory that ! Gamma_neq[f_eq] /= Gamma_eq (1) ! This explains the need for the special definition - ! sumGAMMA=abs(E%W(i_n,ik,1))+abs(E%W(i_np,ik,1)) (2) + ! sumGAMMA=abs(E%W(i_n,ik,i_sp))+abs(E%W(i_np,ik,i_sp)) (2) ! instead of ! sumGAMMA=sum(REF_lifetime(i_n,ik,:)) (3) ! with i_n=i_np. diff --git a/src/real_time_propagation/RT_occupations_eval.F b/src/real_time_propagation/RT_occupations_eval.F index 76f066b011..17b5a8ecc8 100644 --- a/src/real_time_propagation/RT_occupations_eval.F +++ b/src/real_time_propagation/RT_occupations_eval.F @@ -13,15 +13,15 @@ subroutine RT_occupations_eval(dG) use RT_occupations, ONLY:RT_el_occ,RT_ho_occ use real_time, ONLY:RTibz,RT_bands,RT_nk,RT_nbands,G_lesser_reference,l_RT_rotate_DM use hamiltonian, ONLY:H_rotation - use electrons, ONLY:spin_occ + use electrons, ONLY:spin_occ,n_sp_pol ! implicit none ! - complex(SP), intent(in) :: dG(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: dG(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work Space ! - integer :: ik,ib + integer :: ik,ib,i_sp real(SP) :: df_H complex(SP) :: G_rot(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)),& & G_ref(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -36,42 +36,44 @@ subroutine RT_occupations_eval(dG) RT_ho_occ%N=0._SP RT_el_occ%dN=0._SP ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if (.not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! if (l_RT_rotate_DM.and.(RT_do_it('OUT').or.RT_do_it('CARR'))) then - G_rot=G_lesser_reference(:,:,ik)+dG(:,:,ik) - call OBS_rotate(H_rotation(:,:,ik,1),G_rot,RT_nbands,1) - G_ref=G_lesser_reference(:,:,ik) - call OBS_rotate(H_rotation(:,:,ik,1),G_ref,RT_nbands,1) + G_rot=G_lesser_reference(:,:,ik,i_sp)+dG(:,:,ik,i_sp) + call OBS_rotate(H_rotation(:,:,ik,i_sp),G_rot,RT_nbands,1) + G_ref=G_lesser_reference(:,:,ik,i_sp) + call OBS_rotate(H_rotation(:,:,ik,i_sp),G_ref,RT_nbands,1) endif ! if (l_RT_rotate_DM.and.(RT_do_it('OUT').or.RT_do_it('CARR'))) then do ib=RT_bands(1),RT_bands(2) - RT_el_occ%N(ib,ik)= aimag(G_rot(ib,ib)) - RT_ho_occ%N(ib,ik)=-aimag(G_rot(ib,ib))+spin_occ + RT_el_occ%N(ib,ik,i_sp)= aimag(G_rot(ib,ib)) + RT_ho_occ%N(ib,ik,i_sp)=-aimag(G_rot(ib,ib))+spin_occ ! This would be the correct definition ! RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_ref(ib,ib)) ! but I use this definition to consistently reconstruct f from df in ypp - RT_el_occ%dN(ib,ik)=aimag(G_rot(ib,ib)-G_lesser_reference(ib,ib,ik)) + RT_el_occ%dN(ib,ik,i_sp)=aimag(G_rot(ib,ib)-G_lesser_reference(ib,ib,ik,i_sp)) enddo else do ib=RT_bands(1),RT_bands(2) ! - RT_el_occ%N(ib,ik)= aimag(dG(ib,ib,ik))+aimag(G_lesser_reference(ib,ib,ik)) + RT_el_occ%N(ib,ik,i_sp)= aimag(dG(ib,ib,ik,i_sp))+aimag(G_lesser_reference(ib,ib,ik,i_sp)) ! ! AM, July 2015. Intel compilers nest in ordered way the mathematical parenthesis. By using ! df_H this problem is solved. ! - df_H =spin_occ-aimag(G_lesser_reference(ib,ib,ik)) - RT_ho_occ%N(ib,ik)=-aimag(dG(ib,ib,ik))+ df_H + df_H =spin_occ-aimag(G_lesser_reference(ib,ib,ik,i_sp)) + RT_ho_occ%N(ib,ik,i_sp)=-aimag(dG(ib,ib,ik,i_sp))+ df_H ! - RT_el_occ%dN(ib,ik)=aimag(dG(ib,ib,ik)) + RT_el_occ%dN(ib,ik,i_sp)=aimag(dG(ib,ib,ik,i_sp)) enddo endif ! enddo + enddo ! call PP_redux_wait(RT_el_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) call PP_redux_wait(RT_ho_occ%N,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/src/real_time_propagation/RT_propagate_fields.F b/src/real_time_propagation/RT_propagate_fields.F index e81777bb80..604d9dde27 100644 --- a/src/real_time_propagation/RT_propagate_fields.F +++ b/src/real_time_propagation/RT_propagate_fields.F @@ -24,14 +24,15 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! the induced current is included in the dynamics ( RT_propagate_fields ) ! use pars, ONLY:SP,pi + use electrons, ONLY:spin_occ use units, ONLY:SPEED_OF_LIGHT - use electrons, ONLY:levels,nel + use electrons, ONLY:levels,nel,n_sp_pol use R_lattice, ONLY:bz_samp use X_m, ONLY:global_gauge use parallel_m, ONLY:PAR_G_k_range use real_time, ONLY:RT_ind_J_prev,RT_ind_J,RT_P_prev,RT_P,RT_dyn_step, & & l_RT_induced_field,Integrator_step,Integrator_nsteps,& -& RT_bands +& RT_bands,l_velocity_gauge_diam use fields, ONLY:gauge_field,A_ind,A_ext,A_vecpot_reset,compute_intensity,compute_envelop ! implicit none @@ -41,10 +42,11 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) real(SP), intent(in) :: T,T_step type(gauge_field), intent(in) :: A_old type(gauge_field), intent(out) :: A_new - complex(SP), intent(in) :: G_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2)) + complex(SP), intent(in) :: G_inp(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),PAR_G_k_range(1):PAR_G_k_range(2),n_sp_pol) ! ! Work space ! + integer :: nel_effect type(gauge_field) :: A_ind_old type(gauge_field) :: A_ind_new type(gauge_field) :: A_null @@ -99,7 +101,10 @@ subroutine RT_propagate_fields(E,k,A_old,A_new,G_inp,T,T_step) ! ! Update the current replacing the null vector potential with the real one ! - RT_ind_J=RT_ind_J+(A_ind_new%vecpot(:)+A_ext%vecpot(:))*real(nel,SP)/(2._SP*SPEED_OF_LIGHT) + if(l_velocity_gauge_diam) then + nel_effect=nel-(RT_bands(1)-1)*spin_occ + RT_ind_J=RT_ind_J+(A_ind_new%vecpot(:)+A_ext%vecpot(:))*real(nel_effect,SP)/(2._SP*SPEED_OF_LIGHT) + endif A_ind_new%vecpot_acc = real(RT_ind_J) *4._SP*pi*SPEED_OF_LIGHT endif ! diff --git a/src/real_time_propagation/RT_time_step_update.F b/src/real_time_propagation/RT_time_step_update.F index d1c3e6e40a..45a411ec25 100644 --- a/src/real_time_propagation/RT_time_step_update.F +++ b/src/real_time_propagation/RT_time_step_update.F @@ -19,7 +19,7 @@ subroutine RT_time_step_update( E ) use RT_control, ONLY:TIME_adjust use RT_output_m, ONLY:TIME_STEP_desc use com, ONLY:msg - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use parallel_m, ONLY:PAR_COM_Xk_ibz_INDEX,PAR_IND_Xk_ibz use parallel_int, ONLY:PP_redux_wait use interfaces, ONLY:DESC_write @@ -32,7 +32,7 @@ subroutine RT_time_step_update( E ) ! Work Space ! logical :: l_Update_Time_Step_Manual - integer :: ib,ibp,ik,nT_updated,i_desc_ref + integer :: ib,ibp,ik,i_sp_pol,nT_updated,i_desc_ref complex(SP) :: dG_dT_max(2),dG_dT(2),ERROR,dG(3) real(SP) :: dT_now,dT_previous,dT_next #if defined _RT_SCATT @@ -54,19 +54,21 @@ subroutine RT_time_step_update( E ) ! if(l_update_time_step_manual) then ! + do i_sp_pol=1,n_sp_pol do ik=1,RT_nk ! if( .not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle do ib=RT_bands(1),E%nbf(1) do ibp=E%nbf(1)+1,RT_bands(2) - dG_lesser(ib,ibp,ik,:)=cZERO - dG_lesser(ibp,ib,ik,:)=cZERO - G_lesser(ib,ibp,ik,:)=cZERO - G_lesser(ibp,ib,ik,:)=cZERO + dG_lesser(ib,ibp,ik,i_sp_pol,:)=cZERO + dG_lesser(ibp,ib,ik,i_sp_pol,:)=cZERO + G_lesser(ib,ibp,ik,i_sp_pol,:)=cZERO + G_lesser(ibp,ib,ik,i_sp_pol,:)=cZERO enddo enddo ! enddo + enddo ! dT_next=dT_now*RT_step_manual_prefactor ! @@ -77,23 +79,25 @@ subroutine RT_time_step_update( E ) dG_dT_max =cZERO dG =cZERO ! + do i_sp_pol=1,n_sp_pol do ik=1,RT_nk ! if( .not.PAR_IND_Xk_ibz%element_1D(RTibz%k_map(ik)) ) cycle ! do ib=RT_bands(1),RT_bands(2) do ibp=RT_bands(1),RT_bands(2) - dG_dT(1)=(dG_lesser(ib,ibp,ik,i_MEM_prev)-dG_lesser(ib,ibp,ik,i_MEM_old))/dT_previous - dG_dT(2)=(dG_lesser(ib,ibp,ik,i_MEM_now)-dG_lesser(ib,ibp,ik,i_MEM_prev))/dT_now + dG_dT(1)=(dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_prev)-dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_old))/dT_previous + dG_dT(2)=(dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_now)-dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_prev))/dT_now if ( abs(dG_dT(2)) > abs(dG_dT_max(2)) ) then - dG(1)=dG_lesser(ib,ibp,ik,i_MEM_old) - dG(2)=dG_lesser(ib,ibp,ik,i_MEM_prev) - dG(3)=dG_lesser(ib,ibp,ik,i_MEM_now) + dG(1)=dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_old) + dG(2)=dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_prev) + dG(3)=dG_lesser(ib,ibp,ik,i_sp_pol,i_MEM_now) dG_dT_max=dG_dT endif enddo enddo enddo + enddo ! call PP_redux_wait(dG,COMM=PAR_COM_Xk_ibz_INDEX%COMM) call PP_redux_wait(dG_dT_max,COMM=PAR_COM_Xk_ibz_INDEX%COMM) diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 0cdbeeab30..e5d3d4b93d 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -67,10 +67,6 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) call elemental_collision_free(isc) call PP_indexes_reset(px) ! - isc%ngrho=maxval(G_m_G) - isc%iqref=0 - ! - ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=ID) io_err=io_X(X,Xw,ID) if (io_err<0) call error('Incomplete and/or broken static diel. fun. database') @@ -79,6 +75,10 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) YAMBO_ALLOC(PPaR_ws,(X%ng,X%ng)) YAMBO_ALLOC(PPaR,(X%ng,X%ng)) ! + ! 2022/06/30 DS: + ! should it be NG=maxval(G_m_G)? In the old version of the code, + ! isc%ngrho=maxval(G_m_G) + ! was set few lines before. However the call to elemental owrites it call elemental_collision_alloc(isc,TITLE="OEP_SigmaCSX",NG=X%ng,GAMP_NG=(/X%ng,X%ng/)) YAMBO_ALLOC(local_u,(fft_size)) YAMBO_ALLOC(u,(X%ng)) diff --git a/src/setup/setup.F b/src/setup/setup.F index c1c063175b..7e11f9c7a5 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -19,7 +19,7 @@ subroutine setup(en,q,Xen,Ken,k,Xk) & inv_index,atoms_string,load_PT_elements,n_atoms_species,Z_species,& & n_atomic_species,PT_elements,non_periodic_directions,lattice,& & symmetry_group_table,mag_syms,idt_index,symmetry_equiv_atoms - use R_lattice, ONLY:RL_vol,b,n_g_shells,ng_in_shell,Xk_grid_new_mapping,FineGd_desc,& + use R_lattice, ONLY:RL_vol,b,n_g_shells,ng_in_shell,Xk_grid_new_mapping,FineGd_desc,g_rot,& & rl_sop,bz_samp,g_vec,E_of_shell,ng_closed,bz_samp_duplicate_Fg,MAX_kpts_to_report use com, ONLY:msg,fat_log use stderr, ONLY:intc @@ -272,12 +272,7 @@ subroutine setup(en,q,Xen,Ken,k,Xk) enddo if (n_to_print/G(r)/G(a)/A(t,tp) from rho within GKBA') ! @@ -299,6 +301,7 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'TestPHDGrid','Test double-grid: set all values of the fine grid equal to the couse ones') call it('f',defs,'GkkpReadBare','Read the bare gkkp') call it('f',defs,'GkkpExpand','Expand the gkkp in the whole BZ') + call it('f',defs,'GkkpNoDW','Do not store the DW part (for testing purposes)') call it('f',defs,'UseQindxB','Use qindx_B to expand gkkp (for testing purposes)') ! #endif @@ -364,7 +367,10 @@ subroutine INIT_ypp_load(defs) call it('f',defs,'SkipOBS_IO','Do not dump on file the RT observables (P(t),J(t),D(t)...)') call it('f',defs,'RmAsymLim','Remove Asymptotic limit from P or J',verb_level=V_real_time) ! - call it('f',defs,'STD_style','Print occupations using the standard style',verb_level=V_real_time) + call it('f',defs,'STD_style','Print occupations using the standard style',verb_level=V_real_time) + ! + call it(defs,'ChirpFac','Prefactor for linear chirping in frequency space',ypp_chirp,unit=Time_unit(1)) + call Afield(defs,1) ! #endif ! diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 726a2f42f2..ca8c467a2e 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -42,7 +42,8 @@ subroutine INIT_ypp(E,instr,FINALIZE) use YPP_real_time, ONLY:l_RealTime,l_RT_dos,l_RT_abs,l_RT_bands,l_RT_DBs,l_RT_density,l_RT_G_two_times,& & l_RT_energy,l_RT_lifetimes,l_RT_occupations,l_RT_time,l_RT_X,l_RTpump_Fermi,& & l_RTpump_energy,Eh_pumped_pair_n_BZ_regions,Eh_pumped_pair_BZ_regions,& -& l_NL_X,l_NL_exc,RT_conf,l_RT_pol +& l_NL_X,l_NL_exc,RT_conf,l_RT_pol,l_RT_fields + use fields, ONLY:n_ext_fields use real_time, ONLY:RT_bands #endif #if defined _YPP_NL @@ -321,6 +322,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_RT_G_two_times =STRING_match(rstr_piece(i1+1),'g') l_RT_abs =STRING_match(rstr_piece(i1+1),'a') l_RT_pol =STRING_match(rstr_piece(i1+1),'p') + l_RT_fields =STRING_match(rstr_piece(i1+1),'f') ! l_rtplot=.TRUE. ! @@ -364,6 +366,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) if (l_RT_energy) call initactivate(1,'RTenergy') if (l_RT_dos) call initactivate(1,'RTdos') if (l_RT_pol) call initactivate(1,'RTpol') + if (l_RT_fields) call initactivate(1,'RTfields') ! #endif ! @@ -451,6 +454,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_RTpump_Fermi = runlevel_is_on('Select_Fermi') ! l_RT_pol = runlevel_is_on('RTpol') + l_RT_fields = runlevel_is_on('RTfields') l_RT_abs = runlevel_is_on('RTabs') l_RT_occupations = runlevel_is_on('RToccupations') l_RT_lifetimes = runlevel_is_on('RTlifetimes') @@ -622,7 +626,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) ! l_flag=l_RT_occupations.or.l_RT_abs.or.l_RT_pol if (l_flag) call init_RT_ctl_switch('G') - l_flag=l_RT_occupations.or.l_RT_density.or.l_RT_lifetimes.or.l_RT_abs.or.l_RT_pol.or.l_RT_G_two_times + l_flag=l_RT_occupations.or.l_RT_density.or.l_RT_lifetimes.or.l_RT_abs.or.l_RT_pol.or.l_RT_G_two_times.or.l_RT_fields if (l_flag) call initactivate(1,"TimeStep TimeRange") ! if (l_RT_pol) call initactivate(1,"PolMode EnRngeRt ETStpsRt DampFactor") @@ -649,6 +653,11 @@ subroutine INIT_ypp(E,instr,FINALIZE) call initactivate(1,"BSQindex EnRngeRt ETStpsRt DampFactor") call initactivate(1,"TRabsOBS TRabsDIPdir TRabsDIPplane TRabsMODE TRabsEtresh") endif + if (l_RT_fields) then + call initactivate(1,"EnRngeRt ETStpsRt ChirpFac") + n_ext_fields=1 + call Afield_activate(1) + endif ! endif #endif @@ -701,7 +710,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) endif ! #if defined _YPP_ELPH - if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand UseQindxB") + if (l_gkkp_db) call initactivate(1,"GkkpReadBare DBsPATH PHfreqF PHmodeF GkkpExpand GkkpNoDW UseQindxB") if (l_gkkp_dg.or.l_gkkp_db) call initactivate(1,"PHfreqF PHmodeF") if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") if (l_gkkp_plot) call initactivate(1,"Degen_Step cooOut") diff --git a/ypp/real_time/.objects b/ypp/real_time/.objects index 01a0a9c4bd..21daf3b4f7 100644 --- a/ypp/real_time/.objects +++ b/ypp/real_time/.objects @@ -1,7 +1,7 @@ #if defined _YPP_RT RT_objects = RT_ypp_driver.o \ RT_OBSERVABLES_IO_path.o RT_OBSERVABLES_IO.o \ - RT_TRabs_driver.o RT_TRabs_residuals.o RT_TRabs_output.o \ + RT_TRabs_driver.o RT_TRabs_residuals.o RT_TRabs_output.o RT_fields.o \ RT_X_LRR_real_field.o RT_X_response.o RT_manual_excitation.o RT_DBs_carriers_setup.o \ RT_OBSERVABLES_damp_and_write.o RT_1D_Fourier_setup.o RT_1D_Fourier_Transform.o \ RT_occupations_driver.o RT_components_energy_plot.o RT_occ_time_plot.o RT_density.o \ diff --git a/ypp/real_time/DOUBLE_project.dep b/ypp/real_time/DOUBLE_project.dep index e1f722a192..538a897ae5 100644 --- a/ypp/real_time/DOUBLE_project.dep +++ b/ypp/real_time/DOUBLE_project.dep @@ -26,6 +26,7 @@ RT_damp_it.o RT_density.o RT_dos_time_plot.o + RT_fields.o RT_manual_excitation.o RT_occ_bands_interpolation.o RT_occ_time_plot.o diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 5b2839e7bb..0108478fba 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2016 The Yambo Team ! -! Authors (see AUTHORS file for details): AM CA +! Authors (see AUTHORS file for details): AM CA DS ! subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! @@ -44,7 +44,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) !=================== if (mode=="T2W") then ! - if (l_live_timing) call live_timing('FT@'//trim(FT%title)//'',RT%W_n_steps*FT%N) + if (l_live_timing) call live_timing('FT-'//mode//'@'//trim(FT%title)//'',RT%W_n_steps*FT%N) ! FT%F_w=cZERO_DP ! @@ -90,7 +90,7 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) ! FT%F_t=cZERO_DP ! - if (l_live_timing) call live_timing('FT'//trim(FT%title)//'',RT%T_n_steps*FT%N) + if (l_live_timing) call live_timing('FT-'//mode//'@'//trim(FT%title)//'',RT%T_n_steps*FT%N) do i_c=1,FT%N do i_t = 1, RT%T_n_steps do i_w = 1, RT%W_n_steps @@ -104,4 +104,46 @@ subroutine RT_1D_Fourier_Transform(mode,FT,RT,I_sign) endif ! end subroutine RT_1D_Fourier_Transform - +! +! +subroutine RT_1D_Fourier_Chirp(FT,RT) + ! + ! This subroutine adds a chirp in frequency space + ! + use fields, ONLY:Efield + use YPP_real_time, ONLY:RT_time,Use_FFT,OBS_el,RT_ctl,ypp_chirp + use pars, ONLY:DP,cI,cZERO_DP,pi + use LIVE_t, ONLY:live_timing + ! + implicit none + ! + type(OBS_el),intent(inout)::FT + type(RT_ctl),intent(in) ::RT + ! + ! Work Space + ! + integer :: i_w,i_t,i_c + logical :: l_live_timing + complex(DP):: chirp_phase(RT%W_n_steps),dw + ! + l_live_timing=len_trim(FT%title)>0 + ! + FT%F_t=cZERO_DP + dw=(FT%W(2)-FT%W(1)) + do i_w = 1, RT%W_n_steps + chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency(1))**2) + enddo + ! + if (l_live_timing) call live_timing('FT-CHIRP@'//trim(FT%title)//'',RT%T_n_steps*FT%N) + do i_c=1,FT%N + do i_t = 1, RT%T_n_steps + do i_w = 1, RT%W_n_steps + FT%F_t(i_t,i_c) = FT%F_t(i_t,i_c)+FT%F_w(i_w,i_c)*chirp_phase(i_w)*exp(-cI*FT%W(i_w)*RT_time(i_t)) + enddo + if (l_live_timing) call live_timing(steps=1) + enddo + enddo + FT%F_t=FT%F_t*dw/pi + if (l_live_timing) call live_timing() + ! +end subroutine RT_1D_Fourier_Chirp diff --git a/ypp/real_time/RT_G_two_times_build.F b/ypp/real_time/RT_G_two_times_build.F index 2fe03ba163..95ec47cf24 100644 --- a/ypp/real_time/RT_G_two_times_build.F +++ b/ypp/real_time/RT_G_two_times_build.F @@ -10,10 +10,10 @@ subroutine RT_G_two_times_build(en,kpt,qpt) use pars, ONLY:SP,DP,cZERO,cI,cONE,cZERO,schlen use units, ONLY:FS2AUT,HA2EV use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels + use electrons, ONLY:levels,n_sp_pol use parser_m, ONLY:parser use matrix_operate, ONLY:hermitian - use stderr, ONLY:real2ch + use stderr, ONLY:real2ch,intc use wrapper, ONLY:M_by_M use com, ONLY:msg,of_open_close use IO_int, ONLY:io_control @@ -35,10 +35,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! Workspace ! real(SP) :: T_c,REF_diff,TIME_diff,deph_factor -#if !defined _PAR_IO - integer :: IO_ACT -#endif - integer :: ID,ik,ik_RT,ib1,ib2,io_err,i_T(2),i_w,i_T1,i_T2,i_Tc,i_kind,i_t_tmp,Nt + integer :: ID,i_sp,ik,ik_RT,ib1,ib2,io_err,i_T(2),i_w,i_T1,i_T2,i_Tc,i_kind,i_t_tmp,Nt character(2) :: function_name logical :: include_eq_occ,keep_cc,keep_vv,keep_cv,keep_vc,& & build_G_ret,build_G_adv,build_G_les,build_G_grt,build_Spect,& @@ -48,8 +45,8 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! Allocs ! - complex(SP), allocatable :: rho_T(:,:,:),b_rho_T(:,:,:),H_rho_T(:,:,:,:),& -& F_k_tmtp(:,:),G_ret(:,:,:),G_tmp(:,:),TMP_M(:,:,:),& + complex(SP), allocatable :: rho_T(:,:,:,:),b_rho_T(:,:,:,:),H_rho_T(:,:,:,:,:),& +& F_k_tmtp(:,:,:),G_ret(:,:,:,:),G_tmp(:,:),TMP_M(:,:,:),& & G_w(:) ! integer, external :: io_RT_components @@ -95,32 +92,32 @@ subroutine RT_G_two_times_build(en,kpt,qpt) YAMBO_ALLOC(G_tmp,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2))) G_tmp=cZERO ! - YAMBO_ALLOC( rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) - YAMBO_ALLOC(b_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) - YAMBO_ALLOC(H_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,4)) + YAMBO_ALLOC( rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) + YAMBO_ALLOC(b_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) + YAMBO_ALLOC(H_rho_T,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,4)) rho_T=cZERO b_rho_T=cZERO H_rho_T=cZERO ! - YAMBO_ALLOC(Ho_plus_Sigma,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(Ho_plus_Sigma,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) Ho_plus_Sigma=cZERO - YAMBO_ALLOC(H_EQ,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(H_EQ,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) H_EQ=cZERO - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,1)) dG_lesser=cZERO ! if(include_eq_occ) then - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/1,2/),ID=ID) io_err=io_RT_components('REF',ID) endif ! - YAMBO_ALLOC(G_ret,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_ret,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) G_ret=cZERO ! ! I need to keep k resolution to interpolate on a path ! - YAMBO_ALLOC(F_k_tmtp,(RT_nk,RT_conf%T_n_steps)) ! F(k,t-t') for a given T + YAMBO_ALLOC(F_k_tmtp,(RT_nk,n_sp_pol,RT_conf%T_n_steps)) ! F(k,t-t') for a given T F_k_tmtp=cZERO ! YAMBO_ALLOC(TMP_M, (RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),2)) @@ -151,59 +148,51 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! Load rho and H[rho] ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser_K_section',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+1/),ID=ID) - io_err=io_RT_components('G_lesser_K_section',ID) - enddo -#endif ! ! rho and 1-rho ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! - if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik) + if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik,i_sp) if(.not.include_eq_occ) TMP_M(:,:,1)= cZERO ! - if( include_eq_occ) TMP_M(:,:,2)=( I1_matrix+cI*G_lesser_reference(:,:,ik) ) - if(.not.include_eq_occ) TMP_M(:,:,2)=( I1_matrix ) + if( include_eq_occ) TMP_M(:,:,2)= I1_matrix+cI*G_lesser_reference(:,:,ik,i_sp) + if(.not.include_eq_occ) TMP_M(:,:,2)= I1_matrix ! - b_rho_T(:,:,ik)= TMP_M(:,:,2)-rho_T(:,:,ik) - rho_T(:,:,ik)= TMP_M(:,:,1)+rho_T(:,:,ik) + b_rho_T(:,:,ik,i_sp)= TMP_M(:,:,2)-rho_T(:,:,ik,i_sp) + rho_T(:,:,ik,i_sp)= TMP_M(:,:,1)+rho_T(:,:,ik,i_sp) + ! + ! Build G_ret + ! + G_ret(:,:,ik,i_sp)=-cI*I1_matrix(:,:) + ! + H_rho_T(:,:,ik,i_sp,3)=H_EQ(:,:,ik,i_sp)+Ho_plus_sigma(:,:,ik,i_sp) + H_rho_T(:,:,ik,i_sp,4)=H_EQ(:,:,ik,i_sp)+Ho_plus_sigma(:,:,ik,i_sp) ! - enddo - ! - ! Build G_ret - ! - do ik=1,RT_nk - G_ret(:,:,ik)=-cI*I1_matrix(:,:) enddo - ! - H_rho_T(:,:,:,3)=H_EQ(:,:,:,1)+Ho_plus_sigma(:,:,:,1) - H_rho_T(:,:,:,4)=H_EQ(:,:,:,1)+Ho_plus_sigma(:,:,:,1) - ! + enddo ! ! Build G_lesser / G_ret / Spectr ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if(build_G_les) then - call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik),rho_T(:,:,ik),cZERO,G_tmp) - call M_by_M('n','c',RT_nbands,+rho_T(:,:,ik),G_ret(:,:,ik),cONE ,G_tmp) + call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik,i_sp),rho_T(:,:,ik,i_sp),cZERO,G_tmp) + call M_by_M('n','c',RT_nbands,+rho_T(:,:,ik,i_sp),G_ret(:,:,ik,i_sp),cONE ,G_tmp) endif ! if(build_G_grt) then - call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik),b_rho_T(:,:,ik),G_tmp) - call M_by_M('n','c',RT_nbands,-b_rho_T(:,:,ik),G_ret(:,:,ik),G_tmp) + call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik,i_sp),b_rho_T(:,:,ik,i_sp),G_tmp) + call M_by_M('n','c',RT_nbands,-b_rho_T(:,:,ik,i_sp),G_ret(:,:,ik,i_sp),G_tmp) endif ! - if(build_G_ret) G_tmp=G_ret(:,:,ik) - if(build_G_adv) G_tmp= hermitian(G_ret(:,:,ik)) - if(build_Spect) G_tmp=G_ret(:,:,ik)-hermitian(G_ret(:,:,ik)) + if(build_G_ret) G_tmp=G_ret(:,:,ik,i_sp) + if(build_G_adv) G_tmp= hermitian(G_ret(:,:,ik,i_sp)) + if(build_Spect) G_tmp=G_ret(:,:,ik,i_sp)-hermitian(G_ret(:,:,ik,i_sp)) ! do ib1=RT_bands(1),RT_bands(2) do ib2=RT_bands(1),RT_bands(2) @@ -213,11 +202,12 @@ subroutine RT_G_two_times_build(en,kpt,qpt) if((ib1<=en%nbf(1).and.ib2> en%nbf(1)).and.(.not.keep_vc) ) cycle !if ( build_G_ret .and. (ib1> en%nbf(1).and.ib2<=en%nbf(1)).and. keep_cv ) G_tmp(ib1,ib2)=G_tmp(ib1,ib2)*rho_T(ib2,ib1,ik) !if ( build_G_ret .and. (ib1<=en%nbf(1).and.ib2> en%nbf(1)).and. keep_vc ) G_tmp(ib1,ib2)=G_tmp(ib1,ib2)*rho_T(ib2,ib1,ik) - F_k_tmtp(ik,i_Tc)=F_k_tmtp(ik,i_Tc)+G_tmp(ib1,ib2) + F_k_tmtp(ik,i_sp,i_Tc)=F_k_tmtp(ik,i_sp,i_Tc)+G_tmp(ib1,ib2) enddo enddo ! enddo + enddo ! deph_factor=1._SP ! @@ -246,19 +236,12 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! Load rho and H[rho] ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser_K_section',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+2/),ID=ID) - io_err=io_RT_components('G_lesser_K_section',ID) - enddo -#endif + ! ! exp(-abs(RT_time(i_t)*damp_factor)) ! - if(.not.l_dephase_rho) H_rho_T(:,:,:,i_kind)=H_EQ(:,:,:,1)+Ho_plus_sigma(:,:,:,1) + if(.not.l_dephase_rho) H_rho_T(:,:,:,:,i_kind)=H_EQ+Ho_plus_sigma ! if(l_dephase_rho) then ! @@ -267,7 +250,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) deph_factor=1._SP if((ib1> en%nbf(1).and.ib2<=en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) if((ib1<=en%nbf(1).and.ib2> en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) - H_rho_T(ib1,ib2,:,i_kind)=H_EQ(ib1,ib2,:,1)+Ho_plus_sigma(ib1,ib2,:,1)*deph_factor + H_rho_T(ib1,ib2,:,:,i_kind)=H_EQ(ib1,ib2,:,:)+Ho_plus_sigma(ib1,ib2,:,:)*deph_factor enddo enddo ! @@ -275,7 +258,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! if(i_kind==2) then ! - if(.not.l_dephase_rho) rho_T(:,:,:)=-cI*dG_lesser(:,:,:,1) + if(.not.l_dephase_rho) rho_T(:,:,:,:)=-cI*dG_lesser(:,:,:,:,1) ! if(l_dephase_rho) then ! @@ -284,7 +267,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) deph_factor=1._SP if((ib1> en%nbf(1).and.ib2<=en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) if((ib1<=en%nbf(1).and.ib2> en%nbf(1))) deph_factor=exp(-Rho_deph*RT_time(i_T(i_kind))) - rho_T(ib1,ib2,:)=-cI*dG_lesser(ib1,ib2,:,1)*deph_factor + rho_T(ib1,ib2,:,:)=-cI*dG_lesser(ib1,ib2,:,:,1)*deph_factor enddo enddo ! @@ -292,18 +275,20 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! rho and 1-rho ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! - if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik) + if( include_eq_occ) TMP_M(:,:,1)= -cI*G_lesser_reference(:,:,ik,i_sp) if(.not.include_eq_occ) TMP_M(:,:,1)= cZERO ! - if( include_eq_occ) TMP_M(:,:,2)=( I1_matrix+cI*G_lesser_reference(:,:,ik) ) - if(.not.include_eq_occ) TMP_M(:,:,2)=( I1_matrix ) + if( include_eq_occ) TMP_M(:,:,2)= I1_matrix+cI*G_lesser_reference(:,:,ik,i_sp) + if(.not.include_eq_occ) TMP_M(:,:,2)= I1_matrix ! - b_rho_T(:,:,ik)= TMP_M(:,:,2)-rho_T(:,:,ik) - rho_T(:,:,ik)= TMP_M(:,:,1)+rho_T(:,:,ik) + b_rho_T(:,:,ik,i_sp)= TMP_M(:,:,2)-rho_T(:,:,ik,i_sp) + rho_T(:,:,ik,i_sp)= TMP_M(:,:,1)+rho_T(:,:,ik,i_sp) ! enddo + enddo ! endif ! @@ -311,17 +296,20 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! ! G^{(r)}(t+dt,t'-dt) = e^{-ih_{HSEX}[rho(t+dt)]dt} G^{(r)}(t,t') e^{-ih_{HSEX}[rho(t'-dt)]dt} ! + do i_sp=1,n_sp_pol do ik=1,RT_nk - TMP_M(:,:,1)=(H_rho_T(:,:,ik,1)+H_rho_T(:,:,ik,3))/2._SP - TMP_M(:,:,2)=(H_rho_T(:,:,ik,2)+H_rho_T(:,:,ik,4))/2._SP - call RT_apply_Texp(TMP_M(:,:,1),G_ret(:,:,ik),TMP_M(:,:,2),RT_conf%delta_T,RT_conf%damp_factor,5) + TMP_M(:,:,1)=(H_rho_T(:,:,ik,i_sp,1)+H_rho_T(:,:,ik,i_sp,3))/2._SP + TMP_M(:,:,2)=(H_rho_T(:,:,ik,i_sp,2)+H_rho_T(:,:,ik,i_sp,4))/2._SP + call RT_apply_Texp(TMP_M(:,:,1),G_ret(:,:,ik,i_sp),TMP_M(:,:,2),RT_conf%delta_T,RT_conf%damp_factor,5) + enddo enddo ! ! Store previous H_rho_T ! - H_rho_T(:,:,:,3)=H_rho_T(:,:,:,1) - H_rho_T(:,:,:,4)=H_rho_T(:,:,:,2) + H_rho_T(:,:,:,:,3)=H_rho_T(:,:,:,:,1) + H_rho_T(:,:,:,:,4)=H_rho_T(:,:,:,:,2) ! + do i_sp=1,n_sp_pol do ik=1,RT_nk ! if( build_G_les ) then @@ -329,7 +317,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! Build G<(t,t') = -G(r)(t,t') rho(t') for t>t' ! PRA 92, 033419 (2015), Eq.(19a) ! - call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik),rho_T(:,:,ik),G_tmp) + call M_by_M('n','n',RT_nbands,-G_ret(:,:,ik,i_sp),rho_T(:,:,ik,i_sp),G_tmp) ! endif ! @@ -338,13 +326,13 @@ subroutine RT_G_two_times_build(en,kpt,qpt) ! Build G>(t,t') = +G(r)(t,t') (1-rho(t')) for t>t' ! PRA 92, 033419 (2015), Eq.(19b) ! - call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik),b_rho_T(:,:,ik),G_tmp) + call M_by_M('n','n',RT_nbands,+G_ret(:,:,ik,i_sp),b_rho_T(:,:,ik,i_sp),G_tmp) ! endif ! - if( build_G_ret ) G_tmp= G_ret(:,:,ik) - if( build_G_adv ) G_tmp=-G_ret(:,:,ik) - if( build_Spect ) G_tmp= G_ret(:,:,ik) + if( build_G_ret ) G_tmp= G_ret(:,:,ik,i_sp) + if( build_G_adv ) G_tmp=-G_ret(:,:,ik,i_sp) + if( build_Spect ) G_tmp= G_ret(:,:,ik,i_sp) ! ! PRA 92, 033419 (2015), Below Eq.(19) ! @@ -364,13 +352,14 @@ subroutine RT_G_two_times_build(en,kpt,qpt) !if ( build_G_adv .and. (ib1> en%nbf(1).and.ib2<=en%nbf(1)).and. keep_cv ) G_tmp(ib2,ib1)=rho_T(ib1,ib2,ik)*G_tmp(ib1,ib2) !if ( build_G_adv .and. (ib1<=en%nbf(1).and.ib2> en%nbf(1)).and. keep_vc ) G_tmp(ib2,ib1)=rho_T(ib1,ib2,ik)*G_tmp(ib1,ib2) ! - if( .not.build_G_adv ) F_k_tmtp(ik,i_T(1))=F_k_tmtp(ik,i_T(1))+ G_tmp(ib1,ib2) ! G_adv is zero for t>t' - if( .not.build_G_ret ) F_k_tmtp(ik,i_T(2))=F_k_tmtp(ik,i_T(2))-conjg(G_tmp(ib2,ib1)) ! G_ret is zero for tt' + if( .not.build_G_ret ) F_k_tmtp(ik,i_sp,i_T(2))=F_k_tmtp(ik,i_sp,i_T(2))-conjg(G_tmp(ib2,ib1)) ! G_ret is zero for t1) file_name=trim(file_name)//"_sp"//trim(intc(i_sp)) + call of_open_close(trim(file_name),'ot') + headings=(/" E[eV] ","Im[G(w)]","Re[G(w)]"/) + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + ! + G_w=cZERO + do ik_RT=1,RT_nk + G_w(:)=G_w(:)+GreenF_T_and_W%F_W(:,ik_RT+RT_nk*(i_sp-1))*RTibz%weights(ik_RT) + enddo + ! + do i_w=1,RT_conf%W_n_steps + odata=(/real(GreenF_T_and_W%W(i_w),SP)*HA2EV,real(-cI*G_w(i_w),SP),real(G_w(i_w),SP)/) + call msg('o '//trim(file_name),'',odata,INDENT=-2,USE_TABS=.true.) + enddo + ! + call of_open_close(trim(file_name)) + ! enddo ! - call of_open_close(trim(file_name)) - ! YAMBO_FREE(G_w) ! ! Print G(w,k) for specific k (only gamma for now) ! - file_name="G_k1_w" - call of_open_close(trim(file_name),'ot') - headings=(/" E[eV] ","Im[G(w)]","Re[G(w)]"/) - call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) - ! - do i_w=1,RT_conf%W_n_steps - odata=(/real(GreenF_T_and_W%W(i_w),SP)*HA2EV, & - & -real(cI*GreenF_T_and_W%F_W(i_w,1),SP), & - & real( GreenF_T_and_W%F_W(i_w,1),SP) /) - call msg('o '//trim(file_name),'',odata,INDENT=-2,USE_TABS=.true.) + do i_sp=1,n_sp_pol + ! + file_name="G_k1_w" + if (n_sp_pol>1) file_name="G_k1_sp"//trim(intc(i_sp))//"_w" + call of_open_close(trim(file_name),'ot') + headings=(/" E[eV] ","Im[G(w)]","Re[G(w)]"/) + call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) + ! + do i_w=1,RT_conf%W_n_steps + odata=(/real(GreenF_T_and_W%W(i_w),SP)*HA2EV, & + & -real(cI*GreenF_T_and_W%F_W(i_w,1+RT_nk*(i_sp-1)),SP), & + & real( GreenF_T_and_W%F_W(i_w,1+RT_nk*(i_sp-1)),SP) /) + call msg('o '//trim(file_name),'',odata,INDENT=-2,USE_TABS=.true.) + enddo + ! + call of_open_close(trim(file_name)) + ! enddo ! - call of_open_close(trim(file_name)) - ! ! DEBUG < + !do i_sp=1,n_sp_pol !do ik=1,RT_nk ! ! ! if(ik>99) cycle ! ! ! do i_dT=1,RT_conf%T_n_steps ! write(100+ik,*) RT_time(i_dT)/FS2AUT,& - ! & real(GreenF_T_and_W%F_T(i_dT,ik),SP),real(-cI*GreenF_T_and_W%F_T(i_dT,ik),SP) + ! & real(GreenF_T_and_W%F_T(i_dT,ik+RT_nk*(i_sp-1)),SP),real(-cI*GreenF_T_and_W%F_T(i_dT,ik+RT_nk*(i_sp-1)),SP) ! enddo ! ! ! do i_w=1,RT_conf%W_n_steps ! write(200+ik,*) real(GreenF_T_and_W%W(i_w))*HA2EV,& - ! & real(-cI*GreenF_T_and_W%F_W(i_w,ik),SP),real(GreenF_T_and_W%F_W(i_w,ik),SP) + ! & real(-cI*GreenF_T_and_W%F_W(i_w,ik+RT_nk*(i_sp-1)),SP),real(GreenF_T_and_W%F_W(i_w,ik+RT_nk*(i_sp-1)),SP) ! enddo ! ! !enddo + !enddo ! DEBUG > ! end subroutine RT_G_two_times_build diff --git a/ypp/real_time/RT_OBSERVABLES_IO.F b/ypp/real_time/RT_OBSERVABLES_IO.F index b25c2a6604..dc5cd9458a 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO.F +++ b/ypp/real_time/RT_OBSERVABLES_IO.F @@ -10,6 +10,7 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only use YPP_real_time, ONLY:RT_conf,OBS_el use pars, ONLY:DP,cZERO_DP,cZERO use R_lattice, ONLY:nkibz + use electrons, ONLY:n_sp_pol use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD,RD_CL,OP_RD_CL,manage_action,NONE,DUMP,LOG,OP_IF_START_RD_CL_IF_END use RT_control, ONLY:RT_control_alloc,RT_control_free,J_cache,P_cache,CACHE_OBS_steps,CACHE_OBS_steps_now @@ -37,9 +38,9 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only ! if (G_lesser_only) then ! - YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz,1)) + YAMBO_ALLOC(G_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz,n_sp_pol,1)) ! - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),nkibz,n_sp_pol)) ! call io_control(ACTION=OP_RD_CL,COM=COM_here,MODE=DUMP,SEC=(/1,2/),ID=ID) io_G=io_RT_components('G_lesser_RESTART',ID) @@ -47,11 +48,8 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only if (present(IO_error)) IO_error=io_G/=0 if (io_G/=0) return ! - do ik=1,nkibz - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,nkibz) - call io_control(ACTION=IO_ACT,COM=COM_here,SEC=(/ik+2/),MODE=DUMP,ID=ID) - io_G=io_RT_components('G_lesser_RESTART_K_section',ID) - enddo + call io_control(ACTION=OP_RD_CL,COM=COM_here,SEC=(/3/),MODE=DUMP,ID=ID) + io_G=io_RT_components('G_lesser_RESTART_K_section',ID) ! endif ! diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index a0713c7aa9..e7739aace2 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -9,7 +9,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! use YPP_interfaces, ONLY:RT_OBSERVABLES_IO use YPP_real_time, ONLY:Probe_Keyword,Pump_Keyword,max_n_of_paths,Pump_path,Probe_path,& -& N_pumps,N_probes,N_probe_frequencies +& N_pumps,N_probes,N_probe_frequencies,X_order use RT_output_m, ONLY:RT_desc use com, ONLY:core_io_path,msg,jobstr use IO_m, ONLY:NONE @@ -57,12 +57,13 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! Remove "." and ".." ! i_f=1 - do while (i_f0)) then N_probes =N_probes+1 i_f=i_f+1 + cycle else if ( index(trim(Probe_path(i_f)),trim(Pump_Keyword))>0 ) then + call msg('s',' Candidate pump found in ',trim(Probe_path(i_f))) Pump_path=Probe_path(i_f) N_pumps=1 endif @@ -115,6 +118,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) call IO_desc_duplicate(RT_desc,Pump_RT_desc) if (N_pump_frequencies>1) call error('Pumps with multiple frequencies still not supported') else + call warning('Pump discarded due to IO_error in RT_OBSERVABLES') N_pumps=0 endif endif @@ -131,14 +135,20 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! Pump & Probe comparison ! if (N_pumps>0) then - call DESC_compare(RT_desc,Pump_RT_desc,i_desc_err,exclude="FIELDs") - if (any(i_desc_err/=0)) call error("Probe and Pump runs are not compatible") + !call DESC_compare(RT_desc,Pump_RT_desc,i_desc_err,exclude="FIELDs") + !if (any(i_desc_err/=0)) call warning("Probe and Pump runs differ") if (n_ext_fields/=2) call warning("Probe run has only one field. Pump ignored") endif ! ! In case of several probe_frequencies only one probe is supported ! - if (N_probes>1.and.N_probe_frequencies>1) N_probes=0 + if (N_probes>1.and.N_probe_frequencies>1) then + if (X_order==1) call warning("Using multi-frequency probe") + if (X_order/=1) then + call warning("Multi-frequency probe not supported for NL optics") + N_probes=0 + endif + endif ! call IO_temporary_jobdir_and_strings("ALL","RESTORE") ! @@ -158,7 +168,13 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! I can use ANTIRES/RES probes with multiple frequencies only by using ! ProbeKey in the input file. This is because of the procedures defined in X_effective/X_inversion. ! - if (Efield(i_Probe)%n_frequencies>1) IO_error=.TRUE. + if (Efield(i_Probe)%n_frequencies>1) then + if (X_order==1) call warning("Using multi-frequency probe") + if (X_order/=1) then + call warning("Multi-frequency probe not supported for NL optics") + IO_error=.TRUE. + endif + endif if (.not.IO_error) N_probes=1 ! ! If no Probes using the Keyword try using jobstr diff --git a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F index 4cf74d2530..3e6edc7999 100644 --- a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F +++ b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F @@ -12,6 +12,7 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) use pars, ONLY:pi,SP use units, ONLY:AUT2FS use RT_control, ONLY:RT_output + use fields, ONLY:A_ext use real_time, ONLY:RT_ind_J,RT_P ! #include @@ -59,6 +60,7 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) do i_t=1,RT%T_n_steps if (STRING_match(OBS%title,"polarization")) RT_P=OBS%F_t(i_t,1:3) if (STRING_match(OBS%title,"current") ) RT_ind_J=OBS%F_t(i_t,1:3) + if (STRING_match(OBS%title,"Field") ) A_ext%vecpot_vel(1)=OBS%F_t(i_t,1) call RT_output(trim(OBS%title),TIME=RT_time(i_t)*AUT2FS) enddo call RT_output(what="close "//trim(OBS%title)) diff --git a/ypp/real_time/RT_Polarization.F b/ypp/real_time/RT_Polarization.F index c2385c555d..b2dfe6c03e 100644 --- a/ypp/real_time/RT_Polarization.F +++ b/ypp/real_time/RT_Polarization.F @@ -70,7 +70,7 @@ subroutine RT_Polarization(en,k,q) ! Alloc !------- if (STRING_same(RT_pol_mode,"slice")) then - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,1)) dG_lesser=cZERO ! ! Time conf @@ -99,16 +99,8 @@ subroutine RT_Polarization(en,k,q) ! call gimme_a_G_Time_Point(i_T) ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+2/),ID=ID) - io_err=io_RT_components('G_lesser',ID) - enddo -#endif ! RT_P=cZERO ! @@ -143,7 +135,7 @@ subroutine RT_Polarization(en,k,q) enddo endif if (STRING_same(RT_pol_mode,"slice")) then - RT_P=RT_P+DIP_iR(ic,i_n,i_m,ik_mem,i_sp_pol)*dG_lesser(i_m,i_n,ik,1)/DL_vol*k%weights(ik) + RT_P=RT_P+DIP_iR(ic,i_n,i_m,ik_mem,i_sp_pol)*dG_lesser(i_m,i_n,ik,i_sp_pol,1)/DL_vol*k%weights(ik) endif enddo K_LOOP enddo diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 20429d3f18..51dba64bd4 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -12,14 +12,15 @@ subroutine RT_X_LRR_real_field(en) ! use YPP_real_time, ONLY:RT_conf,Use_FFT,l_force_min_damp,RT_time,Pol,Curr,ElField,& -& OBS_el_free,X_kind,N_pumps +& OBS_el_free,X_kind,N_pumps,l_skip_OBS_IO use pars, ONLY:SP,pi,cI,cZERO,schlen use units, ONLY:HA2EV use electrons, ONLY:levels use vec_operate, ONLY:v_norm use RT_control, ONLY:RT_output use real_time, ONLY:l_RT_induced_field - use fields, ONLY:Efield,small_a_frequency,small_a + use fields, ONLY:Efield + use fields_int, ONLY:small_a_frequency,small_a use com, ONLY:of_open_close,msg use functions, ONLY:theta_function use parser_m, ONLY:parser @@ -30,10 +31,10 @@ subroutine RT_X_LRR_real_field(en) ! ! Work Space ! - integer :: i_t,i_w,i_p_dir,iE_err,i_Probe,i_field,n_fields,NW + integer :: i_t,i_w,i_p_dir,iE_err,i_Probe,i_field,n_fields,n_freqs,NW logical :: l_rm_asympt_limit real(SP) :: W_reached,Field_time,outdata(6),E_ver(3,3),Fac - complex(SP) :: OBS_proj,OBS_vec(3),E_w_SP(3),Field,E_of_t(2),A_of_t(2),theta,delta,Field_freq + complex(SP) :: OBS_proj,OBS_vec(3),E_w_SP(3),Field,E_ver_cmplx(3,3),E_of_t(2),A_of_t(2),theta,delta,Field_freq complex(SP), allocatable :: EELS(:,:),EPS(:,:) ! #if defined _YPP_NL @@ -46,17 +47,10 @@ subroutine RT_X_LRR_real_field(en) call parser('RmAsymLim',l_rm_asympt_limit) ! i_Probe=1 - if(trim(Efield(i_Probe)%ef_pol)=="linear" ) n_fields=1 + n_freqs=1 + n_fields=1 if(trim(Efield(i_Probe)%ef_pol)=="circular") n_fields=2 - ! - ! Pump removal (if any) - !----------------------- - if (N_pumps==1) then - do i_t=1,RT_conf%T_n_steps - Curr(i_Probe)%F_t(i_t,:)=Curr(i_Probe)%F_t(i_t,:)-Curr(i_Probe+1)%F_t(i_t,:) - Pol(i_Probe)%F_t(i_t,:)=Pol(i_Probe)%F_t(i_t,:)-Pol(i_Probe+1)%F_t(i_t,:) - enddo - endif + if( Efield(i_Probe)%n_frequencies > 1 ) n_freqs=Efield(i_Probe)%n_frequencies ! ! 1D FFT setup !-------------- @@ -88,10 +82,13 @@ subroutine RT_X_LRR_real_field(en) do i_t=1,RT_conf%T_n_steps ! Field_time=RT_time(i_t)-Efield(i_Probe)%t_initial - A_of_t =small_a(Field_time,Efield(i_Probe),0) - E_of_t =small_a(Field_time,Efield(i_Probe),1) - theta =theta_function(Field_time,RT_time(2)-RT_time(1),0) - delta =theta_function(Field_time,RT_time(2)-RT_time(1),1) + ! + if (index(Efield(i_Probe)%ef_name,"FROM_FILE")>0 .and. i_t>Efield(i_Probe)%t_final_indx+2) cycle + ! + A_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),0) + E_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),1) + theta =theta_function(Field_time,RT_conf%delta_T,0) + delta =theta_function(Field_time,RT_conf%delta_T,1) ! do i_field=1,n_fields Fac=Efield(i_Probe)%amplitude @@ -104,12 +101,12 @@ subroutine RT_X_LRR_real_field(en) ! ... FT !-------- ! - call RT_OBSERVABLES_damp_and_write(ElField,RT_conf,.TRUE.) + call RT_OBSERVABLES_damp_and_write(ElField,RT_conf,(l_skip_OBS_IO.or.N_pumps==0)) ! !... Analytic ... ! iE_err=-1 - if (n_fields==1.and.trim(X_kind)=="rhorho") then + if (n_fields==1.and.n_freqs==1.and.trim(X_kind)=="rhorho") then do i_w = 1, RT_conf%W_n_steps ! if(trim(RT_conf%damping) /= "NONE") Field_freq=ElField%W(i_w)-cI*RT_conf%damp_factor @@ -222,13 +219,15 @@ subroutine RT_X_LRR_real_field(en) E_ver(:,1)=abs(E_w_SP/v_norm(abs(E_w_SP))) endif ! + E_ver_cmplx=cmplx(E_ver,kind=SP) + ! do i_p_dir=1,3 ! if(trim(X_kind)=="rhorho") OBS_vec=cmplx( Pol(1)%F_w(i_w,:),kind=SP) if(trim(X_kind)=="jj") OBS_vec=cmplx(Curr(1)%F_w(i_w,:),kind=SP)/ElField%W(i_w)**2 ! - OBS_proj=dot_product(E_ver(:,i_p_dir),OBS_vec) - if(Efield(i_Probe)%ef_pol=="circular") Field=dot_product(E_ver(:,i_p_dir),E_w_SP ) + OBS_proj=dot_product(E_ver_cmplx(:,i_p_dir),OBS_vec) + if(Efield(i_Probe)%ef_pol=="circular") Field=dot_product(E_ver_cmplx(:,i_p_dir),E_w_SP ) ! if( l_RT_induced_field) EELS(i_w,i_p_dir) = 4._SP*pi*OBS_proj/Field if(.not.l_RT_induced_field) EPS( i_w,i_p_dir) = 4._SP*pi*OBS_proj/Field diff --git a/ypp/real_time/RT_X_effective.F b/ypp/real_time/RT_X_effective.F index 81d9a9a261..5aa9d9dd78 100644 --- a/ypp/real_time/RT_X_effective.F +++ b/ypp/real_time/RT_X_effective.F @@ -7,7 +7,7 @@ ! subroutine RT_X_effective(en) ! - use pars, ONLY:SP,lchlen,pi,schlen,cZERO + use pars, ONLY:SP,lchlen,pi,schlen,cZERO,n_fields_defs_max use YPP_real_time, ONLY:RT_P_t,Pump_path,N_probes,Probe_path,RT_IO_J_and_P,& & max_n_of_paths,Use_FFT,RT_conf,N_pumps,N_probe_frequencies,X_order,& & l_RT_X_inversion,l_skip_pol_and_curr_IO @@ -28,7 +28,7 @@ subroutine RT_X_effective(en) type(levels) :: en ! character(lchlen) :: jobstr_save - character(schlen) :: X_file_name,field_defs(3) + character(schlen) :: X_file_name,field_defs(n_fields_defs_max) integer :: i_f,i_fp,f_indx(max_n_of_paths),i_order,min_X_order,i_c,i_t,i_conv,& & i_p,N_periods,i_Pump,i_Probe real(SP) :: Pump_Frequency(1),Unit_of_Measure diff --git a/ypp/real_time/RT_X_qssin.F b/ypp/real_time/RT_X_qssin.F index efa2f2de9d..0510cc4f0b 100644 --- a/ypp/real_time/RT_X_qssin.F +++ b/ypp/real_time/RT_X_qssin.F @@ -12,7 +12,8 @@ subroutine RT_X_qssin use units, ONLY:HA2EV,SVCMm12VMm1,AU2VMm1 use com, ONLY:error use RT_control, ONLY:RT_output - use fields, ONLY:Efield,small_a + use fields, ONLY:Efield + use fields_int, ONLY:small_a use functions, ONLY:theta_function use LIVE_t, ONLY:live_timing ! @@ -48,8 +49,8 @@ subroutine RT_X_qssin YAMBO_ALLOC(E_t,(RT_conf%T_n_steps)) do i_t=1,RT_conf%T_n_steps Field_time=(i_t-1)*RT_conf%delta_T-Efield(i_Probe)%t_initial - A_of_t =small_a(Field_time,Efield(i_Probe),0) - E_of_t =small_a(Field_time,Efield(i_Probe),1) + A_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),0) + E_of_t =small_a(Field_time,RT_conf%delta_T,Efield(i_Probe),1) theta =theta_function(Field_time,RT_conf%delta_T,0) delta =theta_function(Field_time,RT_conf%delta_T,1) select case(Efield(i_Probe)%ef_pol) diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 8d28ea74b7..e2b11c0bfd 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -12,7 +12,7 @@ subroutine RT_X_response(en,k,q) & l_RT_X_inversion,Probe_path,Pump_path,N_probes,RT_conf,l_skip_OBS_IO use YPP_interfaces, ONLY:RT_OBSERVABLES_IO use RT_control, ONLY:OBS_RT_IO_t - use pars, ONLY:schlen + use pars, ONLY:schlen,n_fields_defs_max use stderr, ONLY:STRING_split,STRING_same use R_lattice, ONLY:bz_samp use electrons, ONLY:levels @@ -27,7 +27,7 @@ subroutine RT_X_response(en,k,q) ! Work Space ! integer :: Ndefs,i_o - character(schlen) :: probe_defs(3) + character(schlen) :: probe_defs(n_fields_defs_max) logical :: l_RT_LRR_real_field,l_RT_X_effective,l_RT_SHG_qssin,IO_error ! call RT_OBSERVABLES_IO_paths('JP',en) @@ -36,7 +36,12 @@ subroutine RT_X_response(en,k,q) !======================================= call STRING_split(Efield(1)%ef_name,probe_defs,n_non_empty_strings=Ndefs) ! - l_RT_LRR_real_field= all( (/ Ndefs==1 ,N_pumps<=1, N_probes==1, X_order==1/) ) + if ( trim(probe_defs(1))=='FROM_FILE') then + call RT_load_field_from_file_init(trim(probe_defs(2))) + call RT_load_field_from_file(trim(probe_defs(2)),1) + endif + ! + l_RT_LRR_real_field= all( (/ N_pumps<=1, N_probes==1, X_order==1/) ) ! l_RT_SHG_qssin = all( (/ trim(probe_defs(1))=="QSSIN" , N_pumps==0, N_probes==1, X_order==2/) ) ! @@ -58,38 +63,67 @@ subroutine RT_X_response(en,k,q) !-------------------------------------------------- ! Database ! - allocate(Pol(N_pumps+N_probes)) - allocate(Curr(N_pumps+N_probes)) + allocate(Pol(N_pumps+N_probes+1)) + allocate(Curr(N_pumps+N_probes+1)) ! call IO_temporary_jobdir_and_strings("ALL","SAVE") ! - if (N_pumps==0) then - Pol(1)%title ="polarization" - Curr(1)%title="current" - else - Pol(1)%title ="probe-polarization" - Curr(1)%title="probe-current" + if (N_pumps>0) then + ! + ! Here the assumption is that + ! - run 1 contains both the pump(s) and the probe. Probe is Field1 + ! - run 2 contains only the pump(s) + ! Pol(2)%title ="pump-polarization" Curr(2)%title="pump-current" if (.not.STRING_same(Pump_path,"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Pump_path) call RT_OBSERVABLES_IO( what='JP',J=Curr(2),P=Pol(2),IO_error=IO_error) if (.not.allocated(Curr(2)%F_t)) call error('Pump databases missing/corrupt') + ! + call IO_temporary_jobdir_and_strings("ALL","RESTORE") + ! endif ! - if ( STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("ALL","RESTORE") + ! NB: the full run needs to be loaded as last, + ! otherwise the wrong fields are stored + ! + Pol(1)%title ="polarization" + Curr(1)%title="current" if (.not.STRING_same(Probe_path(1),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(1)) call RT_OBSERVABLES_IO( what='JP',J=Curr(1),P=Pol(1),IO_error=IO_error) if (.not.allocated(Curr(1)%F_t)) call error('Probe databases missing/corrupt') ! call IO_temporary_jobdir_and_strings("ALL","RESTORE") ! + if (N_pumps>0) then + ! + Pol(3)%title ="probe-polarization" + Curr(3)%title="probe-current" + Pol(3)%N=3 + Curr(3)%N=3 + YAMBO_ALLOC(Pol(3)%F_t,(RT_conf%T_n_steps,3)) + YAMBO_ALLOC(Curr(3)%F_t,(RT_conf%T_n_steps,3)) + Pol(3)%F_t =Pol(1)%F_t -Pol(2)%F_t + Curr(3)%F_t=Curr(1)%F_t-Curr(2)%F_t + ! + endif + ! ! Damping and output !--------------------- call RT_OBSERVABLES_damp_and_write(Pol(1),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(1),RT_conf,l_skip_OBS_IO) + ! if (N_pumps>0) then + ! call RT_OBSERVABLES_damp_and_write(Pol(2),RT_conf,l_skip_OBS_IO) call RT_OBSERVABLES_damp_and_write(Curr(2),RT_conf,l_skip_OBS_IO) + ! + call RT_OBSERVABLES_damp_and_write(Pol(3),RT_conf,l_skip_OBS_IO) + call RT_OBSERVABLES_damp_and_write(Curr(3),RT_conf,l_skip_OBS_IO) + ! + Pol(1)%F_t =Pol(1)%F_t -Pol(2)%F_t + Curr(1)%F_t=Curr(1)%F_t-Curr(2)%F_t + ! endif ! if ( l_RT_pol ) then diff --git a/ypp/real_time/RT_damp_it.F b/ypp/real_time/RT_damp_it.F index 87a55eb62f..0a5380a022 100644 --- a/ypp/real_time/RT_damp_it.F +++ b/ypp/real_time/RT_damp_it.F @@ -8,6 +8,7 @@ subroutine RT_damp_it(damp_type,damp_factor,ft,lda) ! use YPP_real_time, ONLY:RT_time,RT_conf + use units, ONLY:FS2AUT use pars, ONLY:SP,DP use fields, ONLY:Efield ! @@ -28,7 +29,7 @@ subroutine RT_damp_it(damp_type,damp_factor,ft,lda) ! select case ( trim(damp_type) ) case("LORENTZIAN") - forall(i_t=1:RT_conf%T_n_steps) damp_function(i_t) = exp(-abs((RT_time(i_t)-T_ref)*damp_factor)) + forall(i_t=1:RT_conf%T_n_steps) damp_function(i_t) = exp(-(RT_time(i_t)-T_ref)*damp_factor) case("GAUSSIAN") forall(i_t=1:RT_conf%T_n_steps) damp_function(i_t) = exp(-(RT_time(i_t)-T_ref)**2*damp_factor**2) case("NONE") @@ -38,7 +39,10 @@ subroutine RT_damp_it(damp_type,damp_factor,ft,lda) return end select ! - forall(i_t=1:RT_conf%T_n_steps) ft(i_t,:)=ft(i_t,:)*damp_function(i_t) + do i_t=1,RT_conf%T_n_steps + if( (RT_time(i_t)-T_ref)<0._SP) cycle + ft(i_t,:)=ft(i_t,:)*damp_function(i_t) + enddo ! end subroutine RT_damp_it diff --git a/ypp/real_time/RT_density.F b/ypp/real_time/RT_density.F index 54704a457b..0ea11ba8c1 100644 --- a/ypp/real_time/RT_density.F +++ b/ypp/real_time/RT_density.F @@ -11,7 +11,7 @@ subroutine RT_density(en,kpt,qpt) use units, ONLY:FS2AUT use R_lattice, ONLY:bz_samp use FFT_m, ONLY:fft_size,fft_dim - use electrons, ONLY:levels,n_spin + use electrons, ONLY:levels,n_spin,n_sp_pol use parser_m, ONLY:parser use stderr, ONLY:intc,real2ch use com, ONLY:msg,of_open_close @@ -41,7 +41,7 @@ subroutine RT_density(en,kpt,qpt) ! Allocs ! real(SP), allocatable :: drho(:),delta_magn(:,:) - complex(SP), allocatable :: G_loc(:,:,:) + complex(SP), allocatable :: G_loc(:,:,:,:) ! integer, external :: io_RT_components ! @@ -65,12 +65,12 @@ subroutine RT_density(en,kpt,qpt) ! if(load_G_history) then ch_ws(1)="Computing the density from the G lesser" - YAMBO_ALLOC(G_loc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_loc,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) G_loc=cZERO - YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,1)) + YAMBO_ALLOC(dG_lesser,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol,1)) dG_lesser=cZERO if(include_eq_occ) then - YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk)) + YAMBO_ALLOC(G_lesser_reference,(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2),RT_nk,n_sp_pol)) G_lesser_reference=cZERO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2/),ID=ID) io_err=io_RT_components('REFERENCE',ID) @@ -117,19 +117,11 @@ subroutine RT_density(en,kpt,qpt) ! call gimme_a_G_Time_Point(i_T) ! -#if defined _PAR_IO call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/3/),ID=ID) io_err=io_RT_components('G_lesser_K_section',ID) -#else - do ik = 1, RT_nk - IO_ACT=manage_action(OP_IF_START_RD_CL_IF_END,ik,1,RT_nk) - call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/ik+2/),ID=ID) - io_err=io_RT_components('G_lesser_K_section',ID) - enddo -#endif ! - if( include_eq_occ) G_loc=dG_lesser(:,:,:,1)+G_lesser_reference - if(.not.include_eq_occ) G_loc=dG_lesser(:,:,:,1) + if( include_eq_occ) G_loc=dG_lesser(:,:,:,:,1)+G_lesser_reference + if(.not.include_eq_occ) G_loc=dG_lesser(:,:,:,:,1) ! call el_density_matrix(G_loc,en,kpt,drho,RT_bands(1)) ! diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F new file mode 100644 index 0000000000..bcf1826d5e --- /dev/null +++ b/ypp/real_time/RT_fields.F @@ -0,0 +1,189 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine RT_fields() + ! + use units, ONLY:AUT2FS + use stderr, ONLY:intc + use com, ONLY:msg + use pars, ONLY:SP,schlen,pi,n_fields_defs_max + use com, ONLY:com_path + use YPP_real_time, ONLY:RT_conf,ElField,RT_time + use fields, ONLY:Efield + use stderr, ONLY:STRING_split + ! +#include + ! + ! Work Space + ! + integer :: i_field,i_t + logical :: l_load_from_file,l_from_time_fft + character(schlen) :: field_defs(n_fields_defs_max),filename + real(SP) :: field_data(7),Field_time + ! + RT_conf%T_n_steps=nint( (RT_conf%T_range(2)-RT_conf%T_range(1))/RT_conf%delta_T )+1 + ! + ! Time Initialization from input + !call RT_time_configuration_setup('FIELDS',OBS_RT_IO_t) + YAMBO_ALLOC(RT_time,(RT_conf%T_n_steps)) + do i_t=1,RT_conf%T_n_steps + RT_time(i_t)=(i_t-1)*RT_conf%delta_T+RT_conf%T_range(1) + enddo + ! + call msg('s',' Time range :',(/minval(RT_time),maxval(RT_time)/)*AUT2FS,"[fs]") + call msg('s',' Time step :',RT_conf%delta_T*AUT2FS,"[fs]") + call msg('s',' Time steps :',RT_conf%T_n_steps) + ! + ! Analize the input variables for the external field + call STRING_split(Efield(1)%ef_name,field_defs) + ! + i_field=1 + ! + ! Field in frequency space from external file + if ( field_defs(1)=='FROM_W_FILE') call RT_Field_w_load(i_field) + ! + ! Field in frequency space from FT of real time expression + if ( field_defs(1)/='FROM_W_FILE') call RT_Field_t_to_w(i_field) + ! + ! Chirp the field and convert back into real time + call RT_1D_Fourier_Chirp(ElField,RT_conf) + ! + call RT_print_Elfield(1,"time-chirped",Elfield) + ! + call RT_1D_Fourier_Transform('T2W',ElField,RT_conf,1) + ! + call RT_print_Elfield(1,"freq-chirped",Elfield) + ! +end subroutine RT_fields +! +! +subroutine RT_Field_w_load(i_field) + ! + use YPP_real_time, ONLY:RT_conf,ElField + ! + ! TODO + ! + implicit none + ! + integer, intent(in) :: i_field + ! + call error(' Loading field frequency from file not yet coded') + ! + call RT_print_Elfield(1,"freq",Elfield) + ! +end subroutine RT_Field_w_load +! +! +subroutine RT_Field_t_to_w(i_field) + ! + use units, ONLY:FS2AUT + use pars, ONLY:SP,schlen + use fields_int, ONLY:small_a + use fields, ONLY:Efield + use YPP_real_time, ONLY:RT_conf,ElField,RT_time + ! + implicit none + ! + integer, intent(in) :: i_field + ! + integer :: i_t + real(SP) :: Field_time,dT + ! + ElField%title="Field" + ElField%N =6 + call RT_1D_Fourier_setup(ElField,RT_conf,6) + ! + dT=RT_conf%delta_T + ! + do i_t=1,RT_conf%T_n_steps + Field_time=RT_time(i_t)-Efield(i_field)%t_initial + ElField%F_t(i_t,1:2) =small_a(Field_time,dT,Efield(i_field),0) + ElField%F_t(i_t,3:4) =small_a(Field_time,dT,Efield(i_field),1) + ElField%F_t(i_t,5:6) =small_a(Field_time,dT,Efield(i_field),2) + enddo + ! + call RT_print_Elfield(1,"time",Elfield) + ! + call RT_1D_Fourier_Transform('T2W',ElField,RT_conf,1) + ! + call RT_print_Elfield(1,"freq",Elfield) + ! +end subroutine RT_Field_t_to_w +! +! +subroutine RT_print_Elfield(i_field,mode,Elfield) + ! + use units, ONLY:FS2AUT + use YPP_real_time, ONLY:RT_conf,OBS_el + use pars, ONLY:SP,schlen + use stderr, ONLY:intc + use com, ONLY:com_path + ! + implicit none + ! + integer, intent(in) :: i_field + character(*), intent(in) :: mode + type(OBS_el), intent(in) :: ElField + ! + integer :: i_t,i_w,idata + character(schlen) :: filename + real(SP) :: field_data(7),Field_t,Field_w + ! + if (mode=="time") filename="YPP_EXTFIELD_"//trim(intc(i_field))//".time" + if (mode=="time-chirped") filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".time" + if (mode=="freq") filename="YPP_EXTFIELD_"//trim(intc(i_field))//".freq" + if (mode=="freq-chirped") filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".freq" + ! + open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) + ! + if (index(mode,"time")>0) then + ! + write(99+i_field,*) RT_conf%T_n_steps + ! + do i_t=1,RT_conf%T_n_steps + Field_t=RT_conf%T_range(1)+(i_t-1)*RT_conf%delta_t !-Efield%t_initial + field_data(1)=Field_t/FS2AUT + do idata=1,6 + field_data(idata+1)=real(ElField%F_t(i_t,idata)) + enddo + write(99+i_field,*) field_data + enddo + ! + else if (index(mode,"freq")>0) then + ! + write(99+i_field,*) RT_conf%W_n_steps + ! + do i_w=1,RT_conf%W_n_steps + Field_w=RT_conf%X_w_range(1)+(i_w-1)*RT_conf%delta_W + field_data(1)=Field_w !/FS2AUT + do idata=1,6 + field_data(idata+1)=real(ElField%F_w(i_w,idata)) + enddo + write(99+i_field,*) field_data + enddo + ! + endif + ! + close(99+i_field) + ! +end subroutine RT_print_Elfield diff --git a/ypp/real_time/RT_time_configuration_setup.F b/ypp/real_time/RT_time_configuration_setup.F index db3c324e70..b521b48041 100644 --- a/ypp/real_time/RT_time_configuration_setup.F +++ b/ypp/real_time/RT_time_configuration_setup.F @@ -142,14 +142,14 @@ subroutine RT_time_configuration_setup(what,GENERAL_RT_IO_t) ! else RT_conf%T_n_steps=1 - YAMBO_ALLOC(RT_time,(RT_conf%T_n_steps)) + YAMBO_ALLOC(RT_time,(1)) RT_time=0._SP RT_conf%delta_T=0._SP endif else - RT_conf%T_n_steps = GENERAL_RT_IO_t%N + RT_conf%T_n_steps = RT_conf%T_n_range(2)-RT_conf%T_n_range(1)+1 YAMBO_ALLOC(RT_time,(RT_conf%T_n_steps)) - RT_time=GENERAL_RT_IO_t%Time + RT_time=GENERAL_RT_IO_t%Time(RT_conf%T_n_range(1):RT_conf%T_n_range(2)) RT_conf%delta_T = STEP endif ! diff --git a/ypp/real_time/RT_ypp_driver.F b/ypp/real_time/RT_ypp_driver.F index 97b6f604d5..a2413a479c 100644 --- a/ypp/real_time/RT_ypp_driver.F +++ b/ypp/real_time/RT_ypp_driver.F @@ -10,7 +10,7 @@ subroutine RT_ypp_driver(en,k,q) use R_lattice, ONLY:bz_samp use electrons, ONLY:levels use YPP_real_time, ONLY:l_RT_X,l_RT_occupations,l_RT_lifetimes,l_RT_density,& -& l_RT_G_two_times,l_skip_OBS_IO,l_force_min_damp,l_RT_pol +& l_RT_G_two_times,l_skip_OBS_IO,l_force_min_damp,l_RT_pol,l_RT_fields use YPPm, ONLY:PROJECT_mode,l_PROJECT_atom,l_PROJECT_line,l_PROJECT_plane,& & l_add_EQ_occ,l_separate_eh,l_skip_occ use interpolate, ONLY:l_integral_respect @@ -60,4 +60,8 @@ subroutine RT_ypp_driver(en,k,q) !==================== if ( l_RT_X .or. l_RT_pol ) call RT_X_response(en,k,q) ! + ! Response Functions + !==================== + if ( l_RT_fields ) call RT_fields() + ! end subroutine diff --git a/ypp/real_time/YPP_RT_project.dep b/ypp/real_time/YPP_RT_project.dep index b1463c24d6..2ec8a939e6 100644 --- a/ypp/real_time/YPP_RT_project.dep +++ b/ypp/real_time/YPP_RT_project.dep @@ -19,6 +19,7 @@ RT_damp_it.o RT_density.o RT_dos_time_plot.o + RT_fields.o RT_manual_excitation.o RT_occ_bands_interpolation.o RT_occ_time_plot.o From e506907a824f0110a22473459d0de3a63647fe18 Mon Sep 17 00:00:00 2001 From: Murali Date: Sat, 14 Jun 2025 19:38:40 +0200 Subject: [PATCH 1018/1367] fix partial diagonalization --- src/bse/K_diago_driver.F | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index cb3e05e9c2..9bb24fb1e8 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -171,7 +171,7 @@ subroutine K_diago_driver(iq,W,X_static) if(.not.BS_K_coupling) BS_mat_dim = BS_K_dim(i_BS_mat) if( BS_K_coupling) BS_mat_dim = BS_H_dim ! - call BSS_n_eig_init() + ! call BSS_n_eig_init() ! ! Allocation (BS_R and BS_E) !=========================== @@ -570,6 +570,9 @@ subroutine K_slepc_resize_variables() #endif ! subroutine K_local_init() + ! + call BSS_n_eig_init() + ! ! K_is_not_hermitian=BS_K_coupling.or.(allocated(BSS_eh_W).and..not.BSS_perturbative_width) ! From a03299b1fc2835182c5815f3fd43939b22e212da Mon Sep 17 00:00:00 2001 From: Murali Date: Sat, 14 Jun 2025 19:45:14 +0200 Subject: [PATCH 1019/1367] fix partial diagonalization --- src/bse/K_diago_driver.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 9bb24fb1e8..f49d6614a2 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -171,7 +171,7 @@ subroutine K_diago_driver(iq,W,X_static) if(.not.BS_K_coupling) BS_mat_dim = BS_K_dim(i_BS_mat) if( BS_K_coupling) BS_mat_dim = BS_H_dim ! - ! call BSS_n_eig_init() + call BSS_n_eig_init() ! ! Allocation (BS_R and BS_E) !=========================== @@ -571,7 +571,7 @@ subroutine K_slepc_resize_variables() ! subroutine K_local_init() ! - call BSS_n_eig_init() + BSS_n_eig=BSS_n_eig_Input ! ! K_is_not_hermitian=BS_K_coupling.or.(allocated(BSS_eh_W).and..not.BSS_perturbative_width) From ad40fa998caf1698f258dd61b05977fabf50d9aa Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 18 Jun 2025 15:29:09 +0200 Subject: [PATCH 1020/1367] Removed useless modules imports from mod_interfaces --- src/modules/mod_interfaces.F | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 6df91bf7f4..3deca12a5f 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -278,12 +278,7 @@ end subroutine K_stored_in_a_big_matrix ! subroutine K_diago_perturbative(pert_dim, what, i_BS_mat, & & BS_corrections, BS_VR, neigs_this_cpu, neig_shift, BS_VL, BS_Overlap) - use pars, ONLY:SP,cZERO - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use LIVE_t, ONLY:live_timing - use BS_solvers, ONLY:BSS_eh_E_SOC_corr,BSS_eh_W,BSS_eh_E,BSS_n_eig - use BS, ONLY:BS_K_coupling,BS_K_dim,BS_H_dim + use pars, ONLY:SP implicit none integer, intent(in) :: pert_dim character(3),intent(in) :: what From 2953894e53466b92ac1a900b8d499d059b456e66 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 19 Jun 2025 12:55:52 +0200 Subject: [PATCH 1021/1367] small aestetic fixes --- src/bse/LDIAGO_driver.F | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bse/LDIAGO_driver.F b/src/bse/LDIAGO_driver.F index 32714d727c..0fb05b5f7c 100644 --- a/src/bse/LDIAGO_driver.F +++ b/src/bse/LDIAGO_driver.F @@ -97,7 +97,7 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & neig_tmp=neigs_range(2)-neigs_range(1)+1 neigs_range_y(1) = neigs_range(1) neigs_range_y(2) = neigs_range(2) - ! DS: I need to divide by 2 the nnumber of requested eigenv in the + ! DS: I need to divide by 2 the number of requested eigenv in the ! coupling case, otherwise dimensions do not match if (BS_K_coupling) neigs_range_y(2) = neigs_range_y(1) + neig_tmp/2-1 neigs_range_tmp = c_loc(neigs_range_y) @@ -266,8 +266,6 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & ! ! Elpa always gives full spectrum neig_found = SL_H_dim/2 ! Only +ve eigenvalues computes and rest are retreived - if (solver_type_aux .eq. 's' .and. present(neigs_range)) then - endif ! if (solver_type_aux .eq. 'e') then #if defined _ELPA From 0861a196202aea9a366eb05680e209fbdf691527 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Jun 2025 16:11:52 +0200 Subject: [PATCH 1022/1367] USE_MEMORY macro changed in actual module use y_memory_alloc Version 5.3.0, Revision 24905, Hash f83c3b9a53 MODIFIED * include/headers/common/parallel_memory.h include/headers/common/y_memory.h a2y/a2y_db1.F c2y/c2y.F c2y/c2y_db1.F p2y/mod_p2y.F p2y/p2y.F p2y/p2y_atmproj.F p2y/p2y_db1.F p2y/p2y_wf.F p2y/qe_pseudo_init.F acfdt/acfdt_tot_energy.F allocations/DIPOLE_ALLOC_elemental.F allocations/ELPH_alloc.F allocations/MPA_ALLOC_parallel.F allocations/X_ALLOC_elemental.F allocations/X_ALLOC_global.F allocations/X_ALLOC_parallel.F bse/BSE_utilities.F bse/K_Haydock.F bse/K_IP.F bse/K_IP_sort.F bse/K_Transitions_setup.F bse/K_WF_phases.F bse/K_blocks.F bse/K_correlation_collisions_dir.F bse/K_correlation_collisions_std.F bse/K_correlation_kernel_std.F bse/K_diago_driver.F bse/K_diagonal.F bse/K_dipoles.F bse/K_driver.F bse/K_inversion_Lo.F bse/K_inversion_driver.F bse/K_inversion_engine.F bse/K_inversion_restart.F bse/K_kernel.F bse/K_screened_interaction.F bse/K_shell_matrix.F bse/K_solvers.F bse/K_stored_in_a_big_matrix.F bz_ops/bz_samp_indexes.F bz_ops/k_build_up_BZ_tables.F bz_ops/k_expand.F bz_ops/k_ibz2bz.F bz_ops/k_lattice.F bz_ops/k_map_nearest_by_dir.F bz_ops/k_reduce.F collisions/Build_LSEX_collisions.F collisions/COLLISIONS_HXC.F collisions/COLLISIONS_NEQ_GW_static.F collisions/COLLISIONS_alloc_and_free.F collisions/COLLISIONS_basic_operations.F collisions/COLLISIONS_compress.F collisions/COLLISIONS_eval.F collisions/COLLISIONS_map_to_QP_table.F collisions/LSEX_potential.F collisions/OSCLL_eval.F collisions/OSCLL_load.F collisions/PLASMA_parallel_setup.F collisions/PLASMA_tables_and_dimensions.F common/FREQUENCIES_coarse_grid.F common/FREQUENCIES_merge.F common/FREQUENCIES_reset.F common/FREQUENCIES_setup.F common/G_rot_grid.F common/OCCUPATIONS_Extend.F common/OCCUPATIONS_Fermi.F common/QP_state_print.F common/eval_G_minus_G.F common/eval_Gradient.F common/eval_Gradient_gpu.F coulomb/col_driver.F coulomb/cutoff_box.F coulomb/cutoff_cylinder.F coulomb/rim.F dipoles/DIPOLE_build_der_k.F dipoles/DIPOLE_covariant.F dipoles/DIPOLE_g_space.F dipoles/DIPOLE_kb_init.F dipoles/DIPOLE_overlaps.F dipoles/DIPOLE_x_real_space.F el-ph/ELPH_Hamiltonian.F el-ph/ELPH_Sigma_c.F el-ph/ELPH_Sigma_c_engine.F el-ph/ELPH_databases_grids_map.F el-ph/ELPH_databases_load.F el-ph/En_k_plus_q_interpolate.F el-ph/Eval_Efermi_DbGd.F el-ph/get_ph_E_DbGd.F hamiltonian/Bare_Hamiltonian.F hamiltonian/MAG_Hamiltonian.F hamiltonian/MAG_common_build_A.F hamiltonian/Pseudo_Hamiltonian.F hamiltonian/Pseudo_KB_FFT.F hamiltonian/Pseudo_KB_G_to_R_space.F hamiltonian/Pseudo_KB_gauge_factor.F interface/INIT.F interface/INIT_DephMatrix.F interface/INIT_QP.F interface/INIT_check_databases.F interface/INIT_q_points.F interpolate/INTERPOLATION_BZ.F interpolate/INTERPOLATION_BZ_coeff.F interpolate/INTERPOLATION_BZ_setup.F interpolate/INTERPOLATION_coefficients.F interpolate/INTERPOLATION_driver_do.F interpolate/INTERPOLATION_driver_end.F interpolate/INTERPOLATION_fourier.F interpolate/INTERPOLATION_nearest_k.F io/io_ATMPROJ_pwscf.F io/io_BSS_invert.F io/io_BS_Fxc.F io/io_COL_CUT.F io/io_DB1.F io/io_DB1_selective_scan.F io/io_Double_Grid.F io/io_ELPH.F io/io_E_SOC_map.F io/io_GROT.F io/io_HF_and_locXC.F io/io_KB_abinit.F io/io_KB_pwscf.F io/io_KB_real_space.F io/io_MPA.F io/io_NL.F io/io_OSCLL.F io/io_PH.F io/io_QINDX.F io/io_QP_and_GF.F io/io_RIM.F io/io_RIM_W.F io/io_RT_components_OBS.F io/io_RT_components_Reference.F io/io_RT_components_TIME_points.F io/io_SC_components.F io/io_X.F io/io_full_SYMMs.F io/io_gFsq.F io/io_kpts.F io/load_SC_components.F io/variables_ELPH.F io_parallel/io_COLLISIONS.F io_parallel/io_COLLISIONS_header.F io_serial/io_BS.F io_serial/io_COLLISIONS.F linear_algebra/LINEAR_ALGEBRA_driver.F linear_algebra/PARALLEL_HERMITIAN_diagonalization.F linear_algebra/PARALLEL_inversion.F linear_algebra/PARALLEL_lin_system.F linear_algebra/SERIAL_HERMITIAN_diagonalization.F linear_algebra/SERIAL_SVD.F linear_algebra/SERIAL_diagonalization.F linear_algebra/SERIAL_inversion.F linear_algebra/SERIAL_lin_system.F linear_algebra/SERIAL_lin_system_gpu.F linear_algebra/SLK_test.F matrices/MATRIX_duplicate.F matrices/MATRIX_init.F matrices/MATRIX_transfer.F matrices/MATRIX_transpose.F matrices/SLK_matrix_init.F modules/mod_BS.F modules/mod_BS_solvers.F modules/mod_DICHROISM.F modules/mod_DIPOLES.F modules/mod_D_lattice.F modules/mod_ELPH.F modules/mod_MAGNONS.F modules/mod_MPA.F modules/mod_PHOTOLUM.F modules/mod_POL_FIT.F modules/mod_QP.F modules/mod_QP_CTL.F modules/mod_RT_control.F modules/mod_RT_lifetimes.F modules/mod_RT_occupations.F modules/mod_RT_output.F modules/mod_R_lattice.F modules/mod_SC.F modules/mod_SLK.F modules/mod_X.F modules/mod_collision_el.F modules/mod_electric.F modules/mod_electrons.F modules/mod_frequency.F modules/mod_hamiltonian.F modules/mod_interpolate_tools.F modules/mod_linear_algebra.F modules/mod_matrix.F modules/mod_memory.F modules/mod_mklfft_gpu.F modules/mod_nl_optics.F modules/mod_parallel.F modules/mod_parallel_interface.F modules/mod_plasma.F modules/mod_pseudo.F modules/mod_real_time.F modules/mod_wave_func.F nloptics/DIPOLE_symmetrize.F nloptics/NL_driver.F nloptics/NL_initialize.F nloptics/NL_start_and_restart.F parallel/PARALLEL_FREQS_setup.F parallel/PARALLEL_Haydock_VEC_COMMs.F parallel/PARALLEL_Transitions_grouping.F parallel/PARALLEL_WF_distribute.F parallel/PARALLEL_WF_index.F parallel/PARALLEL_add_Q_to_K_list.F parallel/PARALLEL_collisions.F parallel/PARALLEL_distribute_BZk_using_IBZk.F parallel/PARALLEL_global_Oscillators.F parallel/PARALLEL_global_Real_Time.F parallel/PARALLEL_global_Response_G.F parallel/PARALLEL_global_Response_T.F parallel/PARALLEL_global_Response_T_transitions.F parallel/PARALLEL_global_Self_Energy.F parallel/PARALLEL_global_dimensions.F parallel/PARALLEL_global_indexes.F parallel/PARALLEL_global_reset.F parallel/PARALLEL_index.F parallel/PARALLEL_scheme_initialize.F pol_function/OPTICS_driver.F pol_function/X_Double_Grid_setup.F pol_function/X_GreenF_analytical.F pol_function/X_GreenF_remap.F pol_function/X_dielectric_matrix.F pol_function/X_eh_setup.F pol_function/X_irredux.F pol_function/X_redux.F qp/QED_Sigma_c.F qp/QP_driver.F qp/QP_expand.F qp/QP_interpolate_W.F qp/QP_life_transitions.F qp/QP_mpa.F qp/QP_ppa_cohsex.F qp/QP_real_axis.F qp/QP_secant_driver.F qp/XCo_Hartree_Fock.F qp/XCo_driver.F qp/XCo_local.F qp/XCo_report.F qp_control/QP_DBs_add_me.F qp_control/QP_DBs_merge.F qp_control/QP_apply.F qp_control/QP_apply_QP.F qp_control/QP_apply_dump_user_CTLs.F qp_control/QP_apply_interpolate_QP.F qp_control/QP_apply_the_ACTION.F qp_control/QP_load_DB.F qp_control/QP_load_GFs.F real_time_control/RT_alloc.F real_time_control/RT_free.F real_time_control/RT_interpolation_driver.F real_time_control/RT_k_grid.F real_time_drivers/RT_driver.F real_time_initialize/RT_Dephasing_Matrix.F real_time_initialize/RT_ELPH_initialize.F real_time_initialize/RT_initialize.F real_time_initialize/RT_start_and_restart.F real_time_propagation/RT_Integrator_init.F sc/OEP_ApplySigmaCSX.F sc/OEP_ApplySigmaX.F sc/OEP_app_inversion.F sc/OEP_driver.F sc/OEP_exact_inversion.F sc/SC_driver.F sc/SC_start_and_restart.F setup/G_shells_finder.F setup/QP_state_table_setup.F setup/build_spin_sop.F setup/eval_Mtot.F setup/eval_minus_G.F setup/setup.F tddft/TDDFT_ALDA_G_space.F tddft/TDDFT_BSK_2_FXC.F tddft/TDDFT_BSK_disk_2_FXC.F tddft/TDDFT_do_X_W_typs.F wf_and_fft/PP_compute_becp.F wf_and_fft/PP_rotate_becp.F wf_and_fft/PP_scatterBamp_init.F wf_and_fft/PP_uspp_init.F wf_and_fft/PP_vloc_augment.F wf_and_fft/WF_alloc.F wf_and_fft/WF_derivative.F wf_and_fft/WF_free.F wf_and_fft/WF_load.F wf_and_fft/WF_shift_kpoint.F wf_and_fft/eval_GradOperator.F wf_and_fft/eval_R_minus_R.F wf_and_fft/fft_3d_cuda.F wf_and_fft/fft_3d_hip.F wf_and_fft/fft_free.F wf_and_fft/fft_setup.F wf_and_fft/scatter_Gamp.F xc_functionals/XC_libxc_driver.F xc_functionals/XC_nlcc_setup.F xc_functionals/el_density_and_current.F ypp/YPPmodules/mod_YPP_ELPH.F ypp/YPPmodules/mod_YPP_real_time.F ypp/bits/WANNIER_driver.F ypp/bits/WF_map_perturbative_SOC.F ypp/dipoles/DIPOLE_ypp_driver.F ypp/el-ph/ELPH_atomic_amplitude.F ypp/el-ph/ELPH_databases.F ypp/el-ph/ELPH_double_grid.F ypp/el-ph/ELPH_eliashberg_dos.F ypp/el-ph/ELPH_excitonic_gkkp.F ypp/el-ph/ELPH_general_gFsq.F ypp/el-ph/ELPH_plot_gkkp.F ypp/el-ph/Eliashberg_Dos_Func.F ypp/electrons/electrons_WFs.F ypp/electrons/electrons_angular_momentum.F ypp/electrons/electrons_bands.F ypp/electrons/electrons_dos.F ypp/electrons/electrons_driver.F ypp/electrons/electrons_magnetization.F ypp/electrons/electrons_position.F ypp/excitons/excitons_WFs.F ypp/excitons/excitons_bands.F ypp/excitons/excitons_driver.F ypp/excitons/excitons_interpolate_setup.F ypp/excitons/excitons_ph_ass_dos.F ypp/excitons/excitons_read.F ypp/excitons/excitons_spin.F ypp/interface/INIT_ypp.F ypp/interface/QP_DBs_initialize.F ypp/k-points/k_circuit_driver.F ypp/k-points/k_circuit_made_of_special_points.F ypp/k-points/k_circuit_made_of_user_points.F ypp/k-points/k_find_border_and_merge.F ypp/k-points/k_grids.F ypp/k-points/k_map_fine_to_coarse.F ypp/k-points/k_map_fine_to_coarse_driver.F ypp/k-points/k_map_fine_to_coarse_engine.F ypp/k-points/k_map_fine_to_coarse_init.F ypp/k-points/k_map_fine_to_coarse_reduce.F ypp/k-points/k_random.F ypp/k-points/k_special.F ypp/plotting/PROJECTION_plot.F ypp/plotting/plot_gnuplot.F ypp/plotting/plot_interpolated_values.F ypp/plotting/plot_xcrysden.F ypp/qp/QP_DB_expand.F ypp/qp/QP_DBs_create_and_modify.F ypp/qp/QP_DBs_manipulate.F ypp/real_time/NL_exc_driver.F ypp/real_time/NL_ypp_driver.F ypp/real_time/RT_1D_Fourier_setup.F ypp/real_time/RT_G_two_times_build.F ypp/real_time/RT_G_two_times_interp_and_plot.F ypp/real_time/RT_OBSERVABLES_IO.F ypp/real_time/RT_OBSERVABLES_damp_and_write.F ypp/real_time/RT_Polarization.F ypp/real_time/RT_TRabs_driver.F ypp/real_time/RT_TRabs_output.F ypp/real_time/RT_TRabs_residuals.F ypp/real_time/RT_X_LRR_real_field.F ypp/real_time/RT_X_effective.F ypp/real_time/RT_X_inversion.F ypp/real_time/RT_X_qssin.F ypp/real_time/RT_X_response.F ypp/real_time/RT_coefficients_Fourier.F ypp/real_time/RT_coefficients_Inversion.F ypp/real_time/RT_components_energy_plot.F ypp/real_time/RT_density.F ypp/real_time/RT_dos_time_plot.F ypp/real_time/RT_fields.F ypp/real_time/RT_occ_bands_interpolation.F ypp/real_time/RT_occ_time_plot.F ypp/real_time/RT_occupations_driver.F ypp/real_time/RT_split_Polarization.F ypp/real_time/RT_time_configuration_setup.F ypp/symmetries/fix_ATOMPROJs.F ypp/symmetries/fix_PPs.F ypp/symmetries/fix_QP_DBs.F ypp/symmetries/fix_SC_DBs.F ypp/symmetries/fix_WFs_Gshells.F ypp/symmetries/fix_WFs_and_E.F ypp/symmetries/fix_symmetries.F ypp/symmetries/symmetries_driver.F DELETED * sbin/move_include_files.sh Bugs: - Additions: - Changes: - Patch sent by: Davide Sangalli --- include/headers/common/parallel_memory.h | 4 -- include/headers/common/y_memory.h | 11 ---- interfaces/a2y/a2y_db1.F | 7 +-- interfaces/c2y/c2y.F | 3 +- interfaces/c2y/c2y_db1.F | 2 +- interfaces/p2y/mod_p2y.F | 11 ++-- interfaces/p2y/p2y.F | 3 +- interfaces/p2y/p2y_atmproj.F | 3 +- interfaces/p2y/p2y_db1.F | 2 +- interfaces/p2y/p2y_wf.F | 3 +- interfaces/p2y/qe_pseudo_init.F | 3 +- sbin/move_include_files.sh | 59 ------------------- src/acfdt/acfdt_tot_energy.F | 3 +- src/allocations/DIPOLE_ALLOC_elemental.F | 2 +- src/allocations/ELPH_alloc.F | 3 +- src/allocations/MPA_ALLOC_parallel.F | 3 +- src/allocations/X_ALLOC_elemental.F | 3 +- src/allocations/X_ALLOC_global.F | 3 +- src/allocations/X_ALLOC_parallel.F | 3 +- src/bse/BSE_utilities.F | 16 ++--- src/bse/K_Haydock.F | 3 +- src/bse/K_IP.F | 3 +- src/bse/K_IP_sort.F | 3 +- src/bse/K_Transitions_setup.F | 6 +- src/bse/K_WF_phases.F | 3 +- src/bse/K_blocks.F | 10 ++-- src/bse/K_correlation_collisions_dir.F | 3 +- src/bse/K_correlation_collisions_std.F | 3 +- src/bse/K_correlation_kernel_std.F | 3 +- src/bse/K_diago_driver.F | 3 +- src/bse/K_diagonal.F | 3 +- src/bse/K_dipoles.F | 3 +- src/bse/K_driver.F | 3 +- src/bse/K_inversion_Lo.F | 3 +- src/bse/K_inversion_driver.F | 3 +- src/bse/K_inversion_engine.F | 3 +- src/bse/K_inversion_restart.F | 3 +- src/bse/K_kernel.F | 3 +- src/bse/K_screened_interaction.F | 3 +- src/bse/K_shell_matrix.F | 3 +- src/bse/K_solvers.F | 3 +- src/bse/K_stored_in_a_big_matrix.F | 3 +- src/bz_ops/bz_samp_indexes.F | 3 +- src/bz_ops/k_build_up_BZ_tables.F | 2 +- src/bz_ops/k_expand.F | 2 +- src/bz_ops/k_ibz2bz.F | 3 +- src/bz_ops/k_lattice.F | 3 +- src/bz_ops/k_map_nearest_by_dir.F | 3 +- src/bz_ops/k_reduce.F | 3 +- src/collisions/Build_LSEX_collisions.F | 3 +- src/collisions/COLLISIONS_HXC.F | 3 +- src/collisions/COLLISIONS_NEQ_GW_static.F | 3 +- src/collisions/COLLISIONS_alloc_and_free.F | 3 +- src/collisions/COLLISIONS_basic_operations.F | 3 +- src/collisions/COLLISIONS_compress.F | 3 +- src/collisions/COLLISIONS_eval.F | 2 +- src/collisions/COLLISIONS_map_to_QP_table.F | 3 +- src/collisions/LSEX_potential.F | 3 +- src/collisions/OSCLL_eval.F | 3 +- src/collisions/OSCLL_load.F | 3 +- src/collisions/PLASMA_parallel_setup.F | 3 +- src/collisions/PLASMA_tables_and_dimensions.F | 3 +- src/common/FREQUENCIES_coarse_grid.F | 3 +- src/common/FREQUENCIES_merge.F | 2 +- src/common/FREQUENCIES_reset.F | 2 +- src/common/FREQUENCIES_setup.F | 2 +- src/common/G_rot_grid.F | 2 +- src/common/OCCUPATIONS_Extend.F | 3 +- src/common/OCCUPATIONS_Fermi.F | 3 +- src/common/QP_state_print.F | 3 +- src/common/eval_G_minus_G.F | 3 +- src/common/eval_Gradient.F | 3 +- src/common/eval_Gradient_gpu.F | 3 +- src/coulomb/col_driver.F | 3 +- src/coulomb/cutoff_box.F | 3 +- src/coulomb/cutoff_cylinder.F | 3 +- src/coulomb/rim.F | 3 +- src/dipoles/DIPOLE_build_der_k.F | 2 +- src/dipoles/DIPOLE_covariant.F | 3 +- src/dipoles/DIPOLE_g_space.F | 3 +- src/dipoles/DIPOLE_kb_init.F | 3 +- src/dipoles/DIPOLE_overlaps.F | 3 +- src/dipoles/DIPOLE_x_real_space.F | 3 +- src/el-ph/ELPH_Hamiltonian.F | 3 +- src/el-ph/ELPH_Sigma_c.F | 3 +- src/el-ph/ELPH_Sigma_c_engine.F | 3 +- src/el-ph/ELPH_databases_grids_map.F | 3 +- src/el-ph/ELPH_databases_load.F | 3 +- src/el-ph/En_k_plus_q_interpolate.F | 3 +- src/el-ph/Eval_Efermi_DbGd.F | 3 +- src/el-ph/get_ph_E_DbGd.F | 3 +- src/hamiltonian/Bare_Hamiltonian.F | 2 +- src/hamiltonian/MAG_Hamiltonian.F | 3 +- src/hamiltonian/MAG_common_build_A.F | 2 +- src/hamiltonian/Pseudo_Hamiltonian.F | 3 +- src/hamiltonian/Pseudo_KB_FFT.F | 3 +- src/hamiltonian/Pseudo_KB_G_to_R_space.F | 3 +- src/hamiltonian/Pseudo_KB_gauge_factor.F | 3 +- src/interface/INIT.F | 3 +- src/interface/INIT_DephMatrix.F | 3 +- src/interface/INIT_QP.F | 3 +- src/interface/INIT_check_databases.F | 3 +- src/interface/INIT_q_points.F | 3 +- src/interpolate/INTERPOLATION_BZ.F | 3 +- src/interpolate/INTERPOLATION_BZ_coeff.F | 3 +- src/interpolate/INTERPOLATION_BZ_setup.F | 3 +- src/interpolate/INTERPOLATION_coefficients.F | 3 +- src/interpolate/INTERPOLATION_driver_do.F | 3 +- src/interpolate/INTERPOLATION_driver_end.F | 3 +- src/interpolate/INTERPOLATION_fourier.F | 3 +- src/interpolate/INTERPOLATION_nearest_k.F | 3 +- src/io/io_ATMPROJ_pwscf.F | 3 +- src/io/io_BSS_invert.F | 2 +- src/io/io_BS_Fxc.F | 2 +- src/io/io_COL_CUT.F | 2 +- src/io/io_DB1.F | 3 +- src/io/io_DB1_selective_scan.F | 3 +- src/io/io_Double_Grid.F | 3 +- src/io/io_ELPH.F | 3 +- src/io/io_E_SOC_map.F | 3 +- src/io/io_GROT.F | 3 +- src/io/io_HF_and_locXC.F | 2 +- src/io/io_KB_abinit.F | 2 +- src/io/io_KB_pwscf.F | 3 +- src/io/io_KB_real_space.F | 3 +- src/io/io_MPA.F | 3 +- src/io/io_NL.F | 3 +- src/io/io_OSCLL.F | 3 +- src/io/io_PH.F | 3 +- src/io/io_QINDX.F | 3 +- src/io/io_QP_and_GF.F | 3 +- src/io/io_RIM.F | 3 +- src/io/io_RIM_W.F | 3 +- src/io/io_RT_components_OBS.F | 3 +- src/io/io_RT_components_Reference.F | 3 +- src/io/io_RT_components_TIME_points.F | 3 +- src/io/io_SC_components.F | 2 +- src/io/io_X.F | 3 +- src/io/io_full_SYMMs.F | 3 +- src/io/io_gFsq.F | 3 +- src/io/io_kpts.F | 2 +- src/io/load_SC_components.F | 2 +- src/io/variables_ELPH.F | 3 +- src/io_parallel/io_COLLISIONS.F | 3 +- src/io_parallel/io_COLLISIONS_header.F | 2 +- src/io_serial/io_BS.F | 3 +- src/io_serial/io_COLLISIONS.F | 2 +- src/linear_algebra/LINEAR_ALGEBRA_driver.F | 3 +- .../PARALLEL_HERMITIAN_diagonalization.F | 2 +- src/linear_algebra/PARALLEL_inversion.F | 2 +- src/linear_algebra/PARALLEL_lin_system.F | 2 +- .../SERIAL_HERMITIAN_diagonalization.F | 2 +- src/linear_algebra/SERIAL_SVD.F | 2 +- src/linear_algebra/SERIAL_diagonalization.F | 2 +- src/linear_algebra/SERIAL_inversion.F | 2 +- src/linear_algebra/SERIAL_lin_system.F | 3 +- src/linear_algebra/SERIAL_lin_system_gpu.F | 3 +- src/linear_algebra/SLK_test.F | 5 +- src/matrices/MATRIX_duplicate.F | 2 +- src/matrices/MATRIX_init.F | 2 +- src/matrices/MATRIX_transfer.F | 2 +- src/matrices/MATRIX_transpose.F | 2 +- src/matrices/SLK_matrix_init.F | 2 +- src/modules/mod_BS.F | 3 +- src/modules/mod_BS_solvers.F | 3 +- src/modules/mod_DICHROISM.F | 3 +- src/modules/mod_DIPOLES.F | 2 +- src/modules/mod_D_lattice.F | 3 +- src/modules/mod_ELPH.F | 3 +- src/modules/mod_MAGNONS.F | 3 +- src/modules/mod_MPA.F | 3 +- src/modules/mod_PHOTOLUM.F | 2 +- src/modules/mod_POL_FIT.F | 3 +- src/modules/mod_QP.F | 3 +- src/modules/mod_QP_CTL.F | 2 +- src/modules/mod_RT_control.F | 3 +- src/modules/mod_RT_lifetimes.F | 3 +- src/modules/mod_RT_occupations.F | 3 +- src/modules/mod_RT_output.F | 3 +- src/modules/mod_R_lattice.F | 3 +- src/modules/mod_SC.F | 3 +- src/modules/mod_SLK.F | 2 +- src/modules/mod_X.F | 3 +- src/modules/mod_collision_el.F | 3 +- src/modules/mod_electric.F | 3 +- src/modules/mod_electrons.F | 3 +- src/modules/mod_frequency.F | 3 +- src/modules/mod_hamiltonian.F | 3 +- src/modules/mod_interpolate_tools.F | 3 +- src/modules/mod_linear_algebra.F | 3 +- src/modules/mod_matrix.F | 3 +- src/modules/mod_memory.F | 12 ++++ src/modules/mod_mklfft_gpu.F | 3 +- src/modules/mod_nl_optics.F | 3 +- src/modules/mod_parallel.F | 3 +- src/modules/mod_parallel_interface.F | 6 ++ src/modules/mod_plasma.F | 2 +- src/modules/mod_pseudo.F | 2 +- src/modules/mod_real_time.F | 3 +- src/modules/mod_wave_func.F | 3 +- src/nloptics/DIPOLE_symmetrize.F | 2 +- src/nloptics/NL_driver.F | 3 +- src/nloptics/NL_initialize.F | 3 +- src/nloptics/NL_start_and_restart.F | 3 +- src/parallel/PARALLEL_FREQS_setup.F | 3 +- src/parallel/PARALLEL_Haydock_VEC_COMMs.F | 2 +- src/parallel/PARALLEL_Transitions_grouping.F | 3 +- src/parallel/PARALLEL_WF_distribute.F | 2 +- src/parallel/PARALLEL_WF_index.F | 2 +- src/parallel/PARALLEL_add_Q_to_K_list.F | 3 +- src/parallel/PARALLEL_collisions.F | 6 +- .../PARALLEL_distribute_BZk_using_IBZk.F | 3 +- src/parallel/PARALLEL_global_Oscillators.F | 3 +- src/parallel/PARALLEL_global_Real_Time.F | 3 +- src/parallel/PARALLEL_global_Response_G.F | 3 +- src/parallel/PARALLEL_global_Response_T.F | 3 +- .../PARALLEL_global_Response_T_transitions.F | 3 +- src/parallel/PARALLEL_global_Self_Energy.F | 3 +- src/parallel/PARALLEL_global_dimensions.F | 2 +- src/parallel/PARALLEL_global_indexes.F | 3 +- src/parallel/PARALLEL_global_reset.F | 3 +- src/parallel/PARALLEL_index.F | 3 +- src/parallel/PARALLEL_scheme_initialize.F | 3 +- src/pol_function/OPTICS_driver.F | 3 +- src/pol_function/X_Double_Grid_setup.F | 3 +- src/pol_function/X_GreenF_analytical.F | 3 +- src/pol_function/X_GreenF_remap.F | 2 +- src/pol_function/X_dielectric_matrix.F | 3 +- src/pol_function/X_eh_setup.F | 3 +- src/pol_function/X_irredux.F | 3 +- src/pol_function/X_redux.F | 3 +- src/qp/QED_Sigma_c.F | 3 +- src/qp/QP_driver.F | 5 +- src/qp/QP_expand.F | 3 +- src/qp/QP_interpolate_W.F | 6 +- src/qp/QP_life_transitions.F | 3 +- src/qp/QP_mpa.F | 3 +- src/qp/QP_ppa_cohsex.F | 3 +- src/qp/QP_real_axis.F | 3 +- src/qp/QP_secant_driver.F | 3 +- src/qp/XCo_Hartree_Fock.F | 3 +- src/qp/XCo_driver.F | 3 +- src/qp/XCo_local.F | 3 +- src/qp/XCo_report.F | 3 +- src/qp_control/QP_DBs_add_me.F | 3 +- src/qp_control/QP_DBs_merge.F | 3 +- src/qp_control/QP_apply.F | 3 +- src/qp_control/QP_apply_QP.F | 3 +- src/qp_control/QP_apply_dump_user_CTLs.F | 3 +- src/qp_control/QP_apply_interpolate_QP.F | 3 +- src/qp_control/QP_apply_the_ACTION.F | 3 +- src/qp_control/QP_load_DB.F | 3 +- src/qp_control/QP_load_GFs.F | 3 +- src/real_time_control/RT_alloc.F | 3 +- src/real_time_control/RT_free.F | 3 +- .../RT_interpolation_driver.F | 3 +- src/real_time_control/RT_k_grid.F | 3 +- src/real_time_drivers/RT_driver.F | 3 +- .../RT_Dephasing_Matrix.F | 3 +- src/real_time_initialize/RT_ELPH_initialize.F | 3 +- src/real_time_initialize/RT_initialize.F | 3 +- .../RT_start_and_restart.F | 3 +- .../RT_Integrator_init.F | 3 +- src/sc/OEP_ApplySigmaCSX.F | 3 +- src/sc/OEP_ApplySigmaX.F | 3 +- src/sc/OEP_app_inversion.F | 3 +- src/sc/OEP_driver.F | 3 +- src/sc/OEP_exact_inversion.F | 3 +- src/sc/SC_driver.F | 3 +- src/sc/SC_start_and_restart.F | 3 +- src/setup/G_shells_finder.F | 3 +- src/setup/QP_state_table_setup.F | 3 +- src/setup/build_spin_sop.F | 3 +- src/setup/eval_Mtot.F | 3 +- src/setup/eval_minus_G.F | 3 +- src/setup/setup.F | 3 +- src/tddft/TDDFT_ALDA_G_space.F | 3 +- src/tddft/TDDFT_BSK_2_FXC.F | 2 +- src/tddft/TDDFT_BSK_disk_2_FXC.F | 2 +- src/tddft/TDDFT_do_X_W_typs.F | 3 +- src/wf_and_fft/PP_compute_becp.F | 3 +- src/wf_and_fft/PP_rotate_becp.F | 3 +- src/wf_and_fft/PP_scatterBamp_init.F | 3 +- src/wf_and_fft/PP_uspp_init.F | 3 +- src/wf_and_fft/PP_vloc_augment.F | 3 +- src/wf_and_fft/WF_alloc.F | 3 +- src/wf_and_fft/WF_derivative.F | 3 +- src/wf_and_fft/WF_free.F | 3 +- src/wf_and_fft/WF_load.F | 3 +- src/wf_and_fft/WF_shift_kpoint.F | 3 +- src/wf_and_fft/eval_GradOperator.F | 2 +- src/wf_and_fft/eval_R_minus_R.F | 2 +- src/wf_and_fft/fft_3d_cuda.F | 3 +- src/wf_and_fft/fft_3d_hip.F | 3 +- src/wf_and_fft/fft_free.F | 3 +- src/wf_and_fft/fft_setup.F | 3 +- src/wf_and_fft/scatter_Gamp.F | 3 +- src/xc_functionals/XC_libxc_driver.F | 3 +- src/xc_functionals/XC_nlcc_setup.F | 2 +- src/xc_functionals/el_density_and_current.F | 3 +- ypp/YPPmodules/mod_YPP_ELPH.F | 3 +- ypp/YPPmodules/mod_YPP_real_time.F | 3 +- ypp/bits/WANNIER_driver.F | 5 +- ypp/bits/WF_map_perturbative_SOC.F | 3 +- ypp/dipoles/DIPOLE_ypp_driver.F | 3 +- ypp/el-ph/ELPH_atomic_amplitude.F | 3 +- ypp/el-ph/ELPH_databases.F | 3 +- ypp/el-ph/ELPH_double_grid.F | 3 +- ypp/el-ph/ELPH_eliashberg_dos.F | 3 +- ypp/el-ph/ELPH_excitonic_gkkp.F | 3 +- ypp/el-ph/ELPH_general_gFsq.F | 3 +- ypp/el-ph/ELPH_plot_gkkp.F | 3 +- ypp/el-ph/Eliashberg_Dos_Func.F | 3 +- ypp/electrons/electrons_WFs.F | 3 +- ypp/electrons/electrons_angular_momentum.F | 3 +- ypp/electrons/electrons_bands.F | 3 +- ypp/electrons/electrons_dos.F | 3 +- ypp/electrons/electrons_driver.F | 3 +- ypp/electrons/electrons_magnetization.F | 3 +- ypp/electrons/electrons_position.F | 3 +- ypp/excitons/excitons_WFs.F | 5 +- ypp/excitons/excitons_bands.F | 3 +- ypp/excitons/excitons_driver.F | 3 +- ypp/excitons/excitons_interpolate_setup.F | 3 +- ypp/excitons/excitons_ph_ass_dos.F | 3 +- ypp/excitons/excitons_read.F | 3 +- ypp/excitons/excitons_spin.F | 3 +- ypp/interface/INIT_ypp.F | 3 +- ypp/interface/QP_DBs_initialize.F | 3 +- ypp/k-points/k_circuit_driver.F | 3 +- .../k_circuit_made_of_special_points.F | 3 +- ypp/k-points/k_circuit_made_of_user_points.F | 3 +- ypp/k-points/k_find_border_and_merge.F | 3 +- ypp/k-points/k_grids.F | 3 +- ypp/k-points/k_map_fine_to_coarse.F | 3 +- ypp/k-points/k_map_fine_to_coarse_driver.F | 3 +- ypp/k-points/k_map_fine_to_coarse_engine.F | 3 +- ypp/k-points/k_map_fine_to_coarse_init.F | 3 +- ypp/k-points/k_map_fine_to_coarse_reduce.F | 3 +- ypp/k-points/k_random.F | 3 +- ypp/k-points/k_special.F | 3 +- ypp/plotting/PROJECTION_plot.F | 3 +- ypp/plotting/plot_gnuplot.F | 3 +- ypp/plotting/plot_interpolated_values.F | 5 +- ypp/plotting/plot_xcrysden.F | 3 +- ypp/qp/QP_DB_expand.F | 3 +- ypp/qp/QP_DBs_create_and_modify.F | 3 +- ypp/qp/QP_DBs_manipulate.F | 3 +- ypp/real_time/NL_exc_driver.F | 3 +- ypp/real_time/NL_ypp_driver.F | 3 +- ypp/real_time/RT_1D_Fourier_setup.F | 3 +- ypp/real_time/RT_G_two_times_build.F | 3 +- .../RT_G_two_times_interp_and_plot.F | 3 +- ypp/real_time/RT_OBSERVABLES_IO.F | 3 +- ypp/real_time/RT_OBSERVABLES_damp_and_write.F | 3 +- ypp/real_time/RT_Polarization.F | 3 +- ypp/real_time/RT_TRabs_driver.F | 3 +- ypp/real_time/RT_TRabs_output.F | 3 +- ypp/real_time/RT_TRabs_residuals.F | 3 +- ypp/real_time/RT_X_LRR_real_field.F | 3 +- ypp/real_time/RT_X_effective.F | 3 +- ypp/real_time/RT_X_inversion.F | 2 +- ypp/real_time/RT_X_qssin.F | 3 +- ypp/real_time/RT_X_response.F | 3 +- ypp/real_time/RT_coefficients_Fourier.F | 2 +- ypp/real_time/RT_coefficients_Inversion.F | 2 +- ypp/real_time/RT_components_energy_plot.F | 3 +- ypp/real_time/RT_density.F | 3 +- ypp/real_time/RT_dos_time_plot.F | 3 +- ypp/real_time/RT_fields.F | 2 +- ypp/real_time/RT_occ_bands_interpolation.F | 3 +- ypp/real_time/RT_occ_time_plot.F | 3 +- ypp/real_time/RT_occupations_driver.F | 3 +- ypp/real_time/RT_split_Polarization.F | 3 +- ypp/real_time/RT_time_configuration_setup.F | 3 +- ypp/symmetries/fix_ATOMPROJs.F | 3 +- ypp/symmetries/fix_PPs.F | 3 +- ypp/symmetries/fix_QP_DBs.F | 3 +- ypp/symmetries/fix_SC_DBs.F | 3 +- ypp/symmetries/fix_WFs_Gshells.F | 3 +- ypp/symmetries/fix_WFs_and_E.F | 6 +- ypp/symmetries/fix_symmetries.F | 3 +- ypp/symmetries/symmetries_driver.F | 3 +- 383 files changed, 420 insertions(+), 804 deletions(-) delete mode 100755 sbin/move_include_files.sh diff --git a/include/headers/common/parallel_memory.h b/include/headers/common/parallel_memory.h index ba85e0879a..278bc42da4 100644 --- a/include/headers/common/parallel_memory.h +++ b/include/headers/common/parallel_memory.h @@ -7,10 +7,6 @@ */ -#define USE_PAR_MEMORY \ - use parallel_m, ONLY:PAR_COM_HOST NEWLINE \ - use parallel_int, ONLY:PP_redux_wait,PP_wait - #if defined _MPI diff --git a/include/headers/common/y_memory.h b/include/headers/common/y_memory.h index d7e4ee0c19..029f2b3d46 100644 --- a/include/headers/common/y_memory.h +++ b/include/headers/common/y_memory.h @@ -7,17 +7,6 @@ */ -#if defined _OPENACC || defined _OPENMP_GPU -#define USE_MEMORY \ - use pars, ONLY:IPL NEWLINE \ - use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_count_d,MEM_global_mesg,IPL NEWLINE \ - use devxlib, ONLY:devxlib_map,devxlib_unmap,devxlib_mapped,devxlib_memcpy_h2d -#else -#define USE_MEMORY \ - use pars, ONLY:IPL NEWLINE \ - use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg -#endif - #define YAMBO_ALLOC1(x,SIZE) \ YAMBO_ALLOC(x,(SIZE(1))) #define YAMBO_ALLOC2(x,SIZE) \ diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 5d13d05373..179ae543a9 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -21,8 +21,7 @@ subroutine a2y_db1(en,k,ncid) use R_lattice, only : ng_vec, bz_samp, nkibz use D_lattice, only : nsym, n_atoms, n_atomic_species, atom_mass use mod_com2y, only : print_interface_dimensions, artificial_spin_pol - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -650,7 +649,7 @@ subroutine import_gwdata_group_kss use pseudo, only : PP_alloc_abinit, pp_n_l_times_proj_max,& & pp_n_l_comp, pp_kbs,pp_kb,pp_kbd,& & pp_table,l_many_proj,pp_n_l_max - USE_MEMORY + use y_memory_alloc ! implicit none real(SP),allocatable :: pp_kbs_(:,:) @@ -711,7 +710,7 @@ subroutine import_gwdata_group_wfk use pseudo, only : PP_alloc_abinit, pp_n_l_times_proj_max,& & pp_n_l_comp, pp_kbs,pp_kb,pp_kbd,& & pp_table,l_many_proj,pp_n_l_max - USE_MEMORY + use y_memory_alloc ! implicit none real(SP),allocatable :: pp_kbs_(:,:) diff --git a/interfaces/c2y/c2y.F b/interfaces/c2y/c2y.F index 45a41f63fb..6dee2f3ec3 100644 --- a/interfaces/c2y/c2y.F +++ b/interfaces/c2y/c2y.F @@ -23,8 +23,7 @@ integer function c2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use mod_com2y, ONLY:interface_presets,force_noWFs use mod_wf2y, ONLY:WF_splitter use parallel_int, ONLY:PARALLEL_live_message - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(levels) :: en diff --git a/interfaces/c2y/c2y_db1.F b/interfaces/c2y/c2y_db1.F index d993426ded..3945690522 100644 --- a/interfaces/c2y/c2y_db1.F +++ b/interfaces/c2y/c2y_db1.F @@ -25,7 +25,7 @@ subroutine c2y_db1(en,k,file_name_) use xc_functionals, ONLY: XC_EXCHANGE_CORRELATION,XC_LDA_C_PW use mod_com2y, ONLY: print_interface_dimensions,symmetries_check_and_load,& & alat_mult_factor - USE_MEMORY + use y_memory_alloc ! implicit none character(*) :: file_name_ diff --git a/interfaces/p2y/mod_p2y.F b/interfaces/p2y/mod_p2y.F index b4280fd8f2..cd30b58aa1 100644 --- a/interfaces/p2y/mod_p2y.F +++ b/interfaces/p2y/mod_p2y.F @@ -22,8 +22,7 @@ module P2Ym use parallel_m, ONLY : myid use parallel_int, ONLY : PP_bcast use units, ONLY : Da2AU - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -315,8 +314,7 @@ end subroutine get_dimensions subroutine get_atoms use D_lattice, ONLY:n_atoms_species_max,n_atomic_species,n_atoms_species, & & atom_pos, Z_species,atomic_number,atom_mass,atoms_map - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -555,8 +553,7 @@ subroutine get_k_points(k) use R_lattice, ONLY:bz_samp use D_lattice, ONLY:alat use vec_operate, ONLY:v_is_zero - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -627,7 +624,7 @@ subroutine get_R_vectors use pars, only: pi use R_lattice, ONLY: b, ng_vec, g_vec use D_lattice, ONLY: alat - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/interfaces/p2y/p2y.F b/interfaces/p2y/p2y.F index 87bacec68e..10bb640719 100644 --- a/interfaces/p2y/p2y.F +++ b/interfaces/p2y/p2y.F @@ -29,8 +29,7 @@ integer function p2y(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use mod_com2y, ONLY:interface_presets,force_noWFs,verboseIO use stderr, ONLY:intc use qexml_module - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/interfaces/p2y/p2y_atmproj.F b/interfaces/p2y/p2y_atmproj.F index 40a6e508b3..fbec1e7819 100644 --- a/interfaces/p2y/p2y_atmproj.F +++ b/interfaces/p2y/p2y_atmproj.F @@ -20,8 +20,7 @@ subroutine p2y_atmproj(filename,k) ! use atmproj_tools_module, ONLY:atmproj_read_ext !,nwfcx use qe_pseudo_m, ONLY:nsp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/interfaces/p2y/p2y_db1.F b/interfaces/p2y/p2y_db1.F index d6001d15d2..898dd13f5e 100644 --- a/interfaces/p2y/p2y_db1.F +++ b/interfaces/p2y/p2y_db1.F @@ -20,7 +20,7 @@ subroutine p2y_db1(en,k) use R_lattice, ONLY : ng_vec,g_vec,bz_samp use wave_func, ONLY : wf_ng, wf_nc_k, wf_ncx, wf_igk use mod_com2y, ONLY : force_noWFs - USE_MEMORY + use y_memory_alloc ! implicit none type(levels), intent(out) :: en ! Energies diff --git a/interfaces/p2y/p2y_wf.F b/interfaces/p2y/p2y_wf.F index 3092327166..6ab68b47e5 100644 --- a/interfaces/p2y/p2y_wf.F +++ b/interfaces/p2y/p2y_wf.F @@ -22,8 +22,7 @@ subroutine p2y_wf(wf_disk,i_sp_pol,ikibz, ib_grp) use pw_data, ONLY: n_spin_pw_, gamma_only_, noncolin_, igkv_ use qexml_module use qexsd_module - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/interfaces/p2y/qe_pseudo_init.F b/interfaces/p2y/qe_pseudo_init.F index d7a9f4b4eb..8e99cb7aae 100644 --- a/interfaces/p2y/qe_pseudo_init.F +++ b/interfaces/p2y/qe_pseudo_init.F @@ -34,8 +34,7 @@ subroutine qe_pseudo_init() use gvecw, ONLY: qe_ecutwfc => ecutwfc, qe_gcutw => gcutw ! use matrix_inversion, ONLY: invmat - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/sbin/move_include_files.sh b/sbin/move_include_files.sh deleted file mode 100755 index c8b10b32a8..0000000000 --- a/sbin/move_include_files.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -for file in */*/*.F; do - - if [ "$file" == "interfaces/p2y/num_interpolation_module.F" ]; then continue; fi - if [ "$file" == "interfaces/p2y/pw_pseudo_module.F" ]; then continue; fi - if [ "$file" == "src/Ymodules/mod_cufft.F" ]; then continue; fi - if [ "$file" == "src/Ymodules/mod_cusolverdn_y.F" ]; then continue; fi - if [ "$file" == "src/Ymodules/mod_interfaces.F" ]; then continue; fi - if [ "$file" == "src/bse/K_diago_driver.F" ]; then continue; fi - if [[ "$file" == *"_incl.F"* ]]; then continue; fi - - echo "Checking file $file" - -awk ' -{ - lines[NR] = $0; # Store each line in an array -} -END { - for (i = 1; i <= NR; i++) { - if (lines[i] ~ /! Authors/) { - print lines[i]; # Print the line with ! Authors - k = 0; - for (j = 1; j <= NR; j++) { - if (lines[j] ~ /#include/) { - k++ ; - if (k == 1) { - print "!"; - print "! headers"; - print "!"; - print lines[j]; # Print #include lines - line_printed[k++]=lines[j] - } else { - print_line = 1; - for (kp = 1; kp < k; kp++) { - if ( lines[j] == line_printed[kp] ){ print_line = 0 } - } - if (print_line == 1){ - print lines[j] - line_printed[k++]=lines[j] - } - } - } - } - } - if (lines[i] !~ /! Authors/ && lines[i] !~ /#include/) { - print lines[i]; # Print other lines - } - if (lines[i] ~ /#include/ || lines[i] ~ /#include /) { - print " USE_MEMORY" ; - print " !"; - print " implicit none"; # Resume implicit none - } - } -} -' $file > $file.tmp -mv $file.tmp $file -done - diff --git a/src/acfdt/acfdt_tot_energy.F b/src/acfdt/acfdt_tot_energy.F index 97b65e9221..314074d1b0 100644 --- a/src/acfdt/acfdt_tot_energy.F +++ b/src/acfdt/acfdt_tot_energy.F @@ -36,8 +36,7 @@ subroutine acfdt_tot_energy(Xen,Xk,En,k,q,X,Dip) use xc_functionals, ONLY:E_xc,XC_EXCHANGE_CORRELATION,XC_LDA_C_KP,XC_EXCHANGE,& & XC_LDA_X,XC_CORRELATION,XC_potential_driver use global_XC, ONLY:WF_xc_functional - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/allocations/DIPOLE_ALLOC_elemental.F b/src/allocations/DIPOLE_ALLOC_elemental.F index 35278682d5..c465aa13d4 100644 --- a/src/allocations/DIPOLE_ALLOC_elemental.F +++ b/src/allocations/DIPOLE_ALLOC_elemental.F @@ -15,7 +15,7 @@ subroutine DIPOLE_ALLOC_elemental(what,d) use electrons, ONLY:n_sp_pol,n_spinor use pars, ONLY:cZERO use gpu_m, ONLY:have_gpu - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/allocations/ELPH_alloc.F b/src/allocations/ELPH_alloc.F index 1143f2c38b..3b6f9daeae 100644 --- a/src/allocations/ELPH_alloc.F +++ b/src/allocations/ELPH_alloc.F @@ -22,8 +22,7 @@ subroutine ELPH_alloc(what,GKKP,Nb,Nm,Nk_mem,Nq_mem) & gsqF_energy_steps,PH_kpt_bz,elph_nk_bz,elph_use_q_grid,FineGd_E_kpq_components_reset use parallel_m, ONLY:PAR_nQ_bz use stderr, ONLY:STRING_split - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F index 23ec8f4c48..c9ae9d6ceb 100644 --- a/src/allocations/MPA_ALLOC_parallel.F +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -15,8 +15,7 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) use matrix, ONLY:MATRIX_reset,PAR_matrix use parallel_int, ONLY:PARALLEL_live_message use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 717e3da951..635f83e512 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -19,8 +19,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) & X_fxc,EEL,Alpha,X_mat,DEV_VAR(X_mat),X_drude_term,X_RLcomp_ig use PHOTOLUM, ONLY:PL use stderr, ONLY:STRING_match - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index c1e8a3dad9..2f2c443eec 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -19,8 +19,7 @@ subroutine X_ALLOC_global(WHAT,W) use drivers, ONLY:l_optics use BS_solvers, ONLY:B_Hall use PHOTOLUM, ONLY:PL,PL_init - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 02564729ef..c15feb1f49 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -20,8 +20,7 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) use parallel_int, ONLY:PARALLEL_live_message use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_memset_d - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index e97fa3e614..7e877f2af5 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -14,7 +14,7 @@ subroutine BS_exchange_oscillators_alloc(iG) use BS, ONLY:BS_T_grp,BS_n_g_exch use gpu_m, ONLY:have_gpu - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iG @@ -29,7 +29,7 @@ end subroutine BS_exchange_oscillators_alloc subroutine BS_correlation_oscillators_alloc(iB) use BS, ONLY:BS_blk,O_ng use gpu_m, ONLY:have_gpu - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iB @@ -43,7 +43,7 @@ end subroutine BS_correlation_oscillators_alloc ! subroutine BS_exchange_oscillators_free(iG_ref) use BS, ONLY:BS_T_grp - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iG_ref @@ -57,7 +57,7 @@ end subroutine BS_exchange_oscillators_free ! subroutine BS_correlation_oscillators_free(iB_ref,l_std_alg) use BS, ONLY:BS_T_grp,l_BSE_minimize_memory,BS_blk,n_BS_blks - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iB_ref @@ -88,7 +88,7 @@ subroutine TDDFT_oscillators_alloc_L(iGL) use electrons, ONLY:n_spin,n_spinor use BS, ONLY:BS_T_grp,BS_n_g_fxc use gpu_m, ONLY:have_gpu - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iGL @@ -105,7 +105,7 @@ subroutine TDDFT_oscillators_alloc_R(iGR) use electrons, ONLY:n_spin,n_spinor use BS, ONLY:BS_T_grp,BS_n_g_fxc use gpu_m, ONLY:have_gpu - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iGR @@ -120,7 +120,7 @@ end subroutine TDDFT_oscillators_alloc_R ! subroutine TDDFT_oscillators_free_L(iG_ref) use BS, ONLY:BS_T_grp - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iG_ref @@ -134,7 +134,7 @@ end subroutine TDDFT_oscillators_free_L ! subroutine TDDFT_oscillators_free_R(iG_ref) use BS, ONLY:BS_T_grp - USE_MEMORY + use y_memory_alloc ! implicit none integer, intent(in) :: iG_ref diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 1b8e8d62ee..16bda1a81e 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -34,8 +34,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) use timing_m, ONLY:timing use descriptors, ONLY:IO_desc_add use R_lattice, ONLY:bz_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index a5bf8d6240..5a74f8f45a 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -36,8 +36,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) use BS_solvers, ONLY:B_Hall use PHOTOLUM, ONLY:PL,PL_prefactor,PL_weights use units, ONLY:SPEED_OF_LIGHT - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index aff4471da1..cb20f3311d 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -18,8 +18,7 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) use vec_operate, ONLY:sort,degeneration_finder use units, ONLY:HA2EV use parallel_int, ONLY:PP_redux_wait - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index a35de5fad1..668d8322e9 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -42,8 +42,7 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) use drivers, ONLY:l_rt_carriers_in_use use RT_control, ONLY:EQ_Transitions,EQ_NoOcc #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -252,8 +251,7 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) use drivers, ONLY:l_rt_carriers_in_use use RT_control, ONLY:EQ_Transitions,ALL_NoOcc #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_WF_phases.F b/src/bse/K_WF_phases.F index 531199c355..44bda05e80 100644 --- a/src/bse/K_WF_phases.F +++ b/src/bse/K_WF_phases.F @@ -39,8 +39,7 @@ subroutine K_WF_phases(Xk) use electrons, ONLY:n_sp_pol,n_spinor use interfaces, ONLY:WF_apply_symm use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index 4e1bec216e..8d8c40cd4c 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -31,9 +31,8 @@ subroutine K_blocks( ) & BS_K_dim,BS_Block_size,BS_LiveTiming_steps,BS_H_dim,n_BS_blks_min,& & BS_n_eh_spaces,BS_res_ares_n_mat,BS_IO_dim,l_BS_ares_from_res use com, ONLY:msg - ! - USE_MEMORY - USE_PAR_MEMORY + use y_memory_alloc + use y_memory_alloc_par ! implicit none ! @@ -170,8 +169,7 @@ subroutine K_block_alloc( iB, mode ) use pars, ONLY:SP,cZERO use BS, ONLY:BS_blk,l_BSE_kernel_complete use BS_solvers, ONLY:BSS_kernel_IO_on_the_fly - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -203,7 +201,7 @@ subroutine K_block_free( iB, mode ) ! use BS, ONLY:BS_blk,l_BSE_kernel_complete use BS_solvers, ONLY:BSS_kernel_IO_on_the_fly - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 9e55de5724..8a7a24294d 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -25,8 +25,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index 0385b89131..bab7806e80 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -47,8 +47,7 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) use collision_el, ONLY:elemental_collision_free,elemental_collision_alloc use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_correlation_kernel_std.F b/src/bse/K_correlation_kernel_std.F index 7077e6deff..fd0bbf7bad 100644 --- a/src/bse/K_correlation_kernel_std.F +++ b/src/bse/K_correlation_kernel_std.F @@ -32,8 +32,7 @@ function K_correlation_kernel_std(i_block,i_p,i_pmq, use R_lattice, ONLY:DEV_VAR(G_m_G),DEV_VAR(g_rot) use wrapper, ONLY:V_by_V_pwise_gpu,Vstar_dot_V_gpu use devxlib, ONLY:devxlib_conjg_d,devxlib_xgemv_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 6a1adc5dd1..42031c5266 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -64,8 +64,7 @@ subroutine K_diago_driver(iq,W,X_static) use petscmat, ONLY:PETSC_NULL_CHARACTER use petscmatdef, ONLY:tMat #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_diagonal.F b/src/bse/K_diagonal.F index ec5f38aa00..71bd4bd6ee 100644 --- a/src/bse/K_diagonal.F +++ b/src/bse/K_diagonal.F @@ -17,8 +17,7 @@ subroutine K_diagonal(iq,what) use BS, ONLY:BS_K_dim,BSE_mode,BS_H_dim use SLK_m, ONLY:SLK_POOL use parallel_int, ONLY:PP_redux_wait - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index ea64c045c9..3c7d195bca 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -36,8 +36,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use timing_m, ONLY:timing use vec_operate, ONLY:v_rotate,cross_product - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index e6076d1def..e94c155c4f 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -32,8 +32,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) use interfaces, ONLY:eval_G_minus_G use vec_operate, ONLY:v_norm use R_lattice, ONLY:bz_samp,qindx_B,qindx_X,qindx_B_max,qindx_free,G_m_G_maxval,q0_def_norm - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index 6d5df29a2a..a436f55167 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -32,8 +32,7 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo_n_loop,Lo) #endif use BS, ONLY:l_BS_photolum use PHOTOLUM, ONLY:BSS_PL_f,BSS_dipoles_PL,PL,PL_prefactor - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_inversion_driver.F b/src/bse/K_inversion_driver.F index 4c1b307b91..502df3c029 100644 --- a/src/bse/K_inversion_driver.F +++ b/src/bse/K_inversion_driver.F @@ -40,8 +40,7 @@ subroutine K_inversion_driver(iq,W,E,k,q) use stderr, ONLY:intc use descriptors, ONLY:IO_desc_add use PHOTOLUM, ONLY:BSS_PL_free,PL - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_inversion_engine.F b/src/bse/K_inversion_engine.F index f27c6fc624..d05ee48a1c 100644 --- a/src/bse/K_inversion_engine.F +++ b/src/bse/K_inversion_engine.F @@ -21,8 +21,7 @@ subroutine K_inversion_engine(what,iw_2start,iw_2do,px,W,Lo,Lo_dim,Lo_n_loop,do_ use BS, ONLY:BS_H_dim,l_BS_photolum use BS_solvers, ONLY:Co_factor,K_INV_EPS,BSS_dipoles_opt,Co_factor,K_inv_slk,K_slk,K_INV_PL use PHOTOLUM, ONLY:PL,PL_prefactor,BSS_dipoles_PL - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_inversion_restart.F b/src/bse/K_inversion_restart.F index e018b12539..e82677e2a9 100644 --- a/src/bse/K_inversion_restart.F +++ b/src/bse/K_inversion_restart.F @@ -23,8 +23,7 @@ subroutine K_inversion_restart(iq,W) use BS, ONLY:l_BS_photolum use BS_solvers, ONLY:K_INV_PL use PHOTOLUM, ONLY:PL - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 4c7e71f0a9..286e917f3e 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -56,8 +56,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free use parser_m, ONLY:parser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index 38a4c542d9..d71737cb8f 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -30,8 +30,7 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) & OP_RD,RD,RD_CL,RD_CL_IF_END use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_memcpy_h2d,devxlib_memcpy_d2h use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_shell_matrix.F b/src/bse/K_shell_matrix.F index 9e00cf43d7..2a31dc7507 100644 --- a/src/bse/K_shell_matrix.F +++ b/src/bse/K_shell_matrix.F @@ -34,8 +34,7 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) use slepceps use petscmatdef use slepcepsdef - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 347210660b..358da5c3c1 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -26,8 +26,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use PHOTOLUM, ONLY:BSS_PL_free use MAGNONS, ONLY:BSS_MAGN_free use DICHROISM, ONLY:BSS_DICH_free - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bse/K_stored_in_a_big_matrix.F b/src/bse/K_stored_in_a_big_matrix.F index 0dab27219c..0fc933d7eb 100644 --- a/src/bse/K_stored_in_a_big_matrix.F +++ b/src/bse/K_stored_in_a_big_matrix.F @@ -39,8 +39,7 @@ subroutine K_stored_in_a_big_matrix(i_BS_mat,BS_mat_dim,BS_mat,iq,what) & BSS_perturbative_width,run_inversion,run_Haydock,& & BSS_eh_E,BSS_eh_W use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index bba875665b..0e08452881 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -55,8 +55,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) #if defined _ELPH use ELPH, ONLY:elph_use_q_grid #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/k_build_up_BZ_tables.F b/src/bz_ops/k_build_up_BZ_tables.F index f26e36a2ac..63d7eacaaf 100644 --- a/src/bz_ops/k_build_up_BZ_tables.F +++ b/src/bz_ops/k_build_up_BZ_tables.F @@ -23,7 +23,7 @@ subroutine k_build_up_BZ_tables(k) use D_lattice, ONLY:nsym use R_lattice, ONLY:rl_sop,bz_samp use zeros, ONLY:k_rlu_zero - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/k_expand.F b/src/bz_ops/k_expand.F index 721f3ed3b4..410fce1583 100644 --- a/src/bz_ops/k_expand.F +++ b/src/bz_ops/k_expand.F @@ -53,7 +53,7 @@ subroutine k_expand(k) use D_lattice, ONLY:nsym use R_lattice, ONLY:rl_sop,bz_samp use zeros, ONLY:k_rlu_zero - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/k_ibz2bz.F b/src/bz_ops/k_ibz2bz.F index f13818b9ed..49cb6b98c3 100644 --- a/src/bz_ops/k_ibz2bz.F +++ b/src/bz_ops/k_ibz2bz.F @@ -18,8 +18,7 @@ subroutine k_ibz2bz(k,units,FORCE_BZ) use pars, ONLY:SP,schlen use vec_operate, ONLY:c2a,k2bz use R_lattice, ONLY:rl_sop,bz_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/k_lattice.F b/src/bz_ops/k_lattice.F index aa36540ce9..c07a9d6709 100644 --- a/src/bz_ops/k_lattice.F +++ b/src/bz_ops/k_lattice.F @@ -25,8 +25,7 @@ integer function k_lattice(k,Xk,G_shell,be_verbose) & bz_samp,g_vec,ng_in_shell,Xk_grid_new_mapping use zeros, ONLY:k_rlu_zero use drivers, ONLY:l_rim_w - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/k_map_nearest_by_dir.F b/src/bz_ops/k_map_nearest_by_dir.F index 8d061af0f1..0bbbfb67ca 100644 --- a/src/bz_ops/k_map_nearest_by_dir.F +++ b/src/bz_ops/k_map_nearest_by_dir.F @@ -17,8 +17,7 @@ subroutine k_map_nearest_by_dir(Xk,k_map) use R_lattice, ONLY:bz_samp,bz_map,WF_shifts use com, ONLY:msg use pars, ONLY:zero_dfl - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/bz_ops/k_reduce.F b/src/bz_ops/k_reduce.F index 683301444a..b885eadd4e 100644 --- a/src/bz_ops/k_reduce.F +++ b/src/bz_ops/k_reduce.F @@ -25,8 +25,7 @@ subroutine k_reduce(k,FORCE_BZ) use D_lattice, ONLY:nsym use R_lattice, ONLY:b,rl_sop,bz_samp use zeros, ONLY:k_rlu_zero - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/Build_LSEX_collisions.F b/src/collisions/Build_LSEX_collisions.F index 1153515575..44ed8dc4ed 100644 --- a/src/collisions/Build_LSEX_collisions.F +++ b/src/collisions/Build_LSEX_collisions.F @@ -18,8 +18,7 @@ subroutine Build_LSEX_collisions(k,q,i_qp,COLL) use collision_ext, ONLY:OSCLL,W,ng_oscll,COLL_bands use QP_m, ONLY:QP_table,QP_nk,QP_n_states use R_lattice, ONLY:bz_samp,qindx_S - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index c6e9fd332f..af6383d380 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -46,8 +46,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) use R_lattice, ONLY:qindx_S,bz_samp,g_rot,minus_G,G_m_G use hamiltonian, ONLY:B_mat_index use fft_m, ONLY:fft_size - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index 70d0b18b70..d0c56befde 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -35,8 +35,7 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) use R_lattice, ONLY:qindx_S,qindx_C,bz_samp use D_lattice, ONLY:DL_vol use wrapper, ONLY:M_by_V - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index d1dbf59c09..2584f55328 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -24,8 +24,7 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use QP_m, ONLY:QP_QED_ng use collision_ext, ONLY:P_COLL_element #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index 5f8c563bfc..1b74bcfbfa 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -27,8 +27,7 @@ subroutine COLLISIONS_basic_operations( what, COLL ) use electrons, ONLY:n_sp_pol,n_full_bands,n_met_bands use wave_func, ONLY:states_to_load use IO_m, ONLY:io_COLLs - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index f43cf18aae..26f0b982c2 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -19,8 +19,7 @@ subroutine COLLISIONS_compress(COLL) & COLLISIONS_FEW_only,COLL_elec_bands,COLL_hole_bands use R_lattice, ONLY:nXkibz use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 3e4a5effc8..227e15856f 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -343,7 +343,7 @@ subroutine set_BS_blks(Xk) use BS, ONLY:BS_K_dim,n_BS_blks,n_BS_blks_min,BS_blk,BS_res_ares_n_mat, & & BSK_IO_mode,l_BSE_kernel_full use R_lattice, ONLY:bz_samp - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/COLLISIONS_map_to_QP_table.F b/src/collisions/COLLISIONS_map_to_QP_table.F index 810a2b2580..3f19a897d4 100644 --- a/src/collisions/COLLISIONS_map_to_QP_table.F +++ b/src/collisions/COLLISIONS_map_to_QP_table.F @@ -15,8 +15,7 @@ subroutine COLLISIONS_map_to_QP_table(what,COLL) use QP_m, ONLY:QP_nk,QP_nb,QP_table,QP_n_states use electrons, ONLY:n_sp_pol use R_lattice, ONLY:nXkibz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index fa7cbb19fe..588c3b8459 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -32,8 +32,7 @@ subroutine LSEX_potential(q,X,Xw) use collision_ext, ONLY:ng_oscll use stderr, ONLY:intc use parallel_int, ONLY:PP_wait - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/OSCLL_eval.F b/src/collisions/OSCLL_eval.F index 44bad091cc..b73619a115 100644 --- a/src/collisions/OSCLL_eval.F +++ b/src/collisions/OSCLL_eval.F @@ -38,8 +38,7 @@ subroutine OSCLL_eval(q,k,en) use parallel_int, ONLY:PP_redux_wait,PP_wait use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,master_cpu,PAR_IND_G_b, & & PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_A2A,PAR_COM_G_b_INDEX - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/OSCLL_load.F b/src/collisions/OSCLL_load.F index 7c1fd69327..b30b2d5a2f 100644 --- a/src/collisions/OSCLL_load.F +++ b/src/collisions/OSCLL_load.F @@ -21,8 +21,7 @@ subroutine OSCLL_load(q,k) use IO_m, ONLY:OP_RD,RD_CL_IF_END,VERIFY,REP,manage_action,deliver_IO_error_message use IO_int, ONLY:io_control,IO_and_Messaging_switch use com, ONLY:msg - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/PLASMA_parallel_setup.F b/src/collisions/PLASMA_parallel_setup.F index dec741f6ec..54c927101e 100644 --- a/src/collisions/PLASMA_parallel_setup.F +++ b/src/collisions/PLASMA_parallel_setup.F @@ -15,8 +15,7 @@ subroutine PLASMA_parallel_setup(EH_gas) & PAR_nPlasma use parallel_int, ONLY:PARALLEL_live_message,PARALLEL_index use plasma, ONLY:plasma_gas - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/collisions/PLASMA_tables_and_dimensions.F b/src/collisions/PLASMA_tables_and_dimensions.F index 270ed0339c..bf01a00871 100644 --- a/src/collisions/PLASMA_tables_and_dimensions.F +++ b/src/collisions/PLASMA_tables_and_dimensions.F @@ -18,8 +18,7 @@ integer function PLASMA_tables_and_dimensions(iqbz,E,k,q,poles,N) use plasma, ONLY:EH_gas use parallel_m, ONLY:PAR_nQ_bz,PAR_Q_bz_index,PAR_IND_Q_bz use collision_ext, ONLY:GW_NEQ_collisions - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/FREQUENCIES_coarse_grid.F b/src/common/FREQUENCIES_coarse_grid.F index 77b6d9cdb5..dc4a83cda2 100644 --- a/src/common/FREQUENCIES_coarse_grid.F +++ b/src/common/FREQUENCIES_coarse_grid.F @@ -35,8 +35,7 @@ subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) use com, ONLY:msg use frequency, ONLY:bare_grid_N,coarse_grid_N,coarse_grid_Pt,ordered_grid_index,coarse_grid_index use vec_operate, ONLY:sort - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/FREQUENCIES_merge.F b/src/common/FREQUENCIES_merge.F index bb901a05f9..bd376d0620 100644 --- a/src/common/FREQUENCIES_merge.F +++ b/src/common/FREQUENCIES_merge.F @@ -17,7 +17,7 @@ subroutine FREQUENCIES_merge(W1,W2,table) ! use pars, ONLY:SP,cZERO use frequency, ONLY:w_samp,W_reset - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/FREQUENCIES_reset.F b/src/common/FREQUENCIES_reset.F index a26f90014b..d88aed251b 100644 --- a/src/common/FREQUENCIES_reset.F +++ b/src/common/FREQUENCIES_reset.F @@ -22,7 +22,7 @@ subroutine FREQUENCIES_reset(Xw,what) ! use frequency, ONLY:w_samp,bare_grid_N,coarse_grid_Pt,ordered_grid_index,coarse_grid_index use X_m, ONLY:X_poles_tab - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/FREQUENCIES_setup.F b/src/common/FREQUENCIES_setup.F index 6c8588ce99..df5d4fcdb6 100644 --- a/src/common/FREQUENCIES_setup.F +++ b/src/common/FREQUENCIES_setup.F @@ -16,7 +16,7 @@ subroutine FREQUENCIES_setup(W) use pars, ONLY:SP,cI use frequency, ONLY:w_samp use parser_m, ONLY:parser - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/G_rot_grid.F b/src/common/G_rot_grid.F index 5eca9d02ef..a5a694ddc9 100644 --- a/src/common/G_rot_grid.F +++ b/src/common/G_rot_grid.F @@ -16,7 +16,7 @@ subroutine G_rot_grid(is,call_kind) use D_lattice, ONLY:dl_sop,alat use zeros, ONLY:G_iku_zero use vec_operate, ONLY:v_is_zero - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/OCCUPATIONS_Extend.F b/src/common/OCCUPATIONS_Extend.F index a8bf2da09a..bb3e8dca73 100644 --- a/src/common/OCCUPATIONS_Extend.F +++ b/src/common/OCCUPATIONS_Extend.F @@ -24,8 +24,7 @@ subroutine OCCUPATIONS_Extend(Xe,E,k) use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp use interfaces, ONLY:OCCUPATIONS_Gaps - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index 7986883e5e..0cac67b854 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -35,8 +35,7 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) #if defined _SC use SC, ONLY:SC_neq_kind,SC_mu,SC_occ #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/QP_state_print.F b/src/common/QP_state_print.F index d4ea37afde..80d566e913 100644 --- a/src/common/QP_state_print.F +++ b/src/common/QP_state_print.F @@ -18,8 +18,7 @@ subroutine QP_state_print(qp) use com, ONLY:msg use stderr, ONLY:intc use descriptors, ONLY:IO_desc_add - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index e7d5a451c7..9ac39a5551 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -27,8 +27,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) use R_lattice, ONLY:G_m_G,DEV_VAR(G_m_G),G_m_G_maxval,g_vec,ng_in_shell,n_g_shells,E_of_shell use gpu_m, ONLY:have_gpu use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 19c5dad289..fa5c31f3ad 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -26,8 +26,7 @@ subroutine eval_Gradient(f,f_gradient,ng_) #endif use R_lattice, ONLY:g_vec,ng_vec use wave_func, ONLY:wf_ng - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/common/eval_Gradient_gpu.F b/src/common/eval_Gradient_gpu.F index 12be20323f..5a641a10ec 100644 --- a/src/common/eval_Gradient_gpu.F +++ b/src/common/eval_Gradient_gpu.F @@ -39,8 +39,7 @@ subroutine eval_Gradient(f,f_gradient,spinor_size,f_type) use mkl_dfti_omp_offload #endif use timing_m - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/coulomb/col_driver.F b/src/coulomb/col_driver.F index 33f39cefcb..1207b3b5e1 100644 --- a/src/coulomb/col_driver.F +++ b/src/coulomb/col_driver.F @@ -50,8 +50,7 @@ subroutine col_driver(bare_NG,q) use wave_func, ONLY:wf_ng use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_WR_CL,REP,VERIFY - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/coulomb/cutoff_box.F b/src/coulomb/cutoff_box.F index fedf43f4bf..0efe933aa2 100644 --- a/src/coulomb/cutoff_box.F +++ b/src/coulomb/cutoff_box.F @@ -29,8 +29,7 @@ subroutine cutoff_box(q,is_cut) use LIVE_t, ONLY:live_timing use zeros, ONLY:k_iku_zero,G_iku_zero use openmp, ONLY:OPENMP_update,n_threads,master_thread,OPENMP_set_threads - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index 4808a48bf0..6ca748dd24 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -20,8 +20,7 @@ subroutine cutoff_cylinder(q,is_cut) use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use com, ONLY:msg - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(bz_samp) ::q diff --git a/src/coulomb/rim.F b/src/coulomb/rim.F index f251d61a00..701fad3379 100644 --- a/src/coulomb/rim.F +++ b/src/coulomb/rim.F @@ -25,8 +25,7 @@ subroutine rim(mode,Xw) & cut_is_slab,idir use timing_m, ONLY:timing use frequency, ONLY:w_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index e4f34d0f30..1058ae1ef3 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -33,7 +33,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) use parser_m, ONLY:parser use timing_m, ONLY:timing use stderr, ONLY:STRING_match - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/dipoles/DIPOLE_covariant.F b/src/dipoles/DIPOLE_covariant.F index 8003ea2f16..71fa9365d2 100644 --- a/src/dipoles/DIPOLE_covariant.F +++ b/src/dipoles/DIPOLE_covariant.F @@ -30,8 +30,7 @@ subroutine DIPOLE_covariant(Xen,Xk,Dip,direction_is_todo) use parser_m, ONLY:parser use timing_m, ONLY:timing use stderr, ONLY:STRING_match - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/dipoles/DIPOLE_g_space.F b/src/dipoles/DIPOLE_g_space.F index f836b94e0c..4e61898d18 100644 --- a/src/dipoles/DIPOLE_g_space.F +++ b/src/dipoles/DIPOLE_g_space.F @@ -36,8 +36,7 @@ subroutine DIPOLE_g_space(Xen,Xk,Dip) use gpu_m, ONLY:have_gpu,gpu_devsync use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memset_d use stderr, ONLY:STRING_match - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/dipoles/DIPOLE_kb_init.F b/src/dipoles/DIPOLE_kb_init.F index 1e10c31b87..24ac4a302f 100644 --- a/src/dipoles/DIPOLE_kb_init.F +++ b/src/dipoles/DIPOLE_kb_init.F @@ -21,8 +21,7 @@ subroutine DIPOLE_kb_init(Xen,Dip,io_err,ID) use D_lattice, ONLY:n_atomic_species,n_atoms_species use pseudo, ONLY:pp_kbv_dim,pp_n_l_times_proj_max,pp_table, & & pp_factor,pp_n_l_max - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 32d416c8d1..3018f8834a 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -36,8 +36,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) use interfaces, ONLY:WF_shift_kpoint,eval_G_minus_G,WF_load,WF_free use gpu_m, ONLY:have_gpu use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/dipoles/DIPOLE_x_real_space.F b/src/dipoles/DIPOLE_x_real_space.F index 2773eeb35b..2d9e3b5789 100644 --- a/src/dipoles/DIPOLE_x_real_space.F +++ b/src/dipoles/DIPOLE_x_real_space.F @@ -27,8 +27,7 @@ subroutine DIPOLE_x_real_space(Xen,Xk,Dip,idir_todo) use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_DIPk_ibz_index,PAR_IND_DIPk_ibz_ID,& & PAR_IND_VAL_BANDS_DIP,PAR_IND_VAL_BANDS_DIP_ID,& & PAR_IND_CON_BANDS_DIP,PAR_IND_CON_BANDS_DIP_ID - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/ELPH_Hamiltonian.F b/src/el-ph/ELPH_Hamiltonian.F index f57498f0fc..ec0278e9c5 100644 --- a/src/el-ph/ELPH_Hamiltonian.F +++ b/src/el-ph/ELPH_Hamiltonian.F @@ -29,8 +29,7 @@ subroutine ELPH_Hamiltonian(en,k,q) use stderr, ONLY:intc use QP_m, ONLY:QP_G_damp use parser_m, ONLY:parser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index 5b7ac93742..70f27b2392 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -50,8 +50,7 @@ subroutine ELPH_Sigma_c(en,k,q,qp) #if defined _RT use RT_control, ONLY:RT_apply #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/ELPH_Sigma_c_engine.F b/src/el-ph/ELPH_Sigma_c_engine.F index 6b31c449ba..290b4de5c2 100644 --- a/src/el-ph/ELPH_Sigma_c_engine.F +++ b/src/el-ph/ELPH_Sigma_c_engine.F @@ -38,8 +38,7 @@ subroutine ELPH_Sigma_c_engine(i_qp,ob,ok,iq_bz,iq_ibz,iq_mem,il,elph_gkkp_sq,en use R_lattice, ONLY:bz_samp use D_lattice, ONLY:Tel use functions, ONLY:Fermi_fnc_derivative,Fermi_fnc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/ELPH_databases_grids_map.F b/src/el-ph/ELPH_databases_grids_map.F index a028a360ff..dde7836393 100644 --- a/src/el-ph/ELPH_databases_grids_map.F +++ b/src/el-ph/ELPH_databases_grids_map.F @@ -18,8 +18,7 @@ subroutine ELPH_databases_grids_map(k,q) & l_GKKP_expanded_DB_exists,l_GKKP_DB_exists use vec_operate, ONLY:v_is_zero,rlu_v_is_zero,c2a use zeros, ONLY:k_rlu_zero - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/ELPH_databases_load.F b/src/el-ph/ELPH_databases_load.F index 0e3edb6ed4..de8eb7ed00 100644 --- a/src/el-ph/ELPH_databases_load.F +++ b/src/el-ph/ELPH_databases_load.F @@ -27,8 +27,7 @@ subroutine ELPH_databases_load(GKKP_sq,E,k,q,n_bands,q_range,K_mode,SCATT_mode) use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PAR_Q_bz_index,PAR_IND_Q_bz,PAR_nQ_bz,PAR_Xk_nibz,PAR_Xk_ibz_index,PAR_IND_Xk_ibz,& & PAR_COM_Q_INDEX,PAR_COM_Xk_ibz_INDEX,PARs_PH_Q_ibz,PARs_PH_Q_ibz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/En_k_plus_q_interpolate.F b/src/el-ph/En_k_plus_q_interpolate.F index 13ccbf1ff4..b35cf8f46c 100644 --- a/src/el-ph/En_k_plus_q_interpolate.F +++ b/src/el-ph/En_k_plus_q_interpolate.F @@ -26,8 +26,7 @@ subroutine En_k_plus_q_interpolate(k,q,E,iqbz) use R_lattice, ONLY:bz_samp,bz_samp_reset use ELPH, ONLY:elph_nb,ID_E_kpq,GKKP,FineGd_E_kpq_alloc,Efermi_DbGd use interpolate, ONLY:INTERPOLATION_BZ - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/Eval_Efermi_DbGd.F b/src/el-ph/Eval_Efermi_DbGd.F index 7c4dad3075..39bb7cb0cb 100644 --- a/src/el-ph/Eval_Efermi_DbGd.F +++ b/src/el-ph/Eval_Efermi_DbGd.F @@ -23,8 +23,7 @@ function Eval_Efermi_DbGd(k,q,en) use interpolate, ONLY:INTERPOLATION_BZ use interfaces, ONLY:OCCUPATIONS_Fermi use com, ONLY:msg - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/el-ph/get_ph_E_DbGd.F b/src/el-ph/get_ph_E_DbGd.F index 93cfbe9235..bc02b0032a 100644 --- a/src/el-ph/get_ph_E_DbGd.F +++ b/src/el-ph/get_ph_E_DbGd.F @@ -23,8 +23,7 @@ function get_ph_E_DbGd(il,iq_fg,iq_bz,q) use pars, ONLY:SP use R_lattice, ONLY:bz_samp use ELPH, ONLY:PH_freqs,PH_freqs_sq - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/Bare_Hamiltonian.F b/src/hamiltonian/Bare_Hamiltonian.F index 1e3f10a447..fc8f172984 100644 --- a/src/hamiltonian/Bare_Hamiltonian.F +++ b/src/hamiltonian/Bare_Hamiltonian.F @@ -34,7 +34,7 @@ subroutine Bare_Hamiltonian(E,Xk,k) #if defined _SC use drivers, ONLY:l_sc_magnetic #endif - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/MAG_Hamiltonian.F b/src/hamiltonian/MAG_Hamiltonian.F index 46329ffbed..bcc782a942 100644 --- a/src/hamiltonian/MAG_Hamiltonian.F +++ b/src/hamiltonian/MAG_Hamiltonian.F @@ -58,8 +58,7 @@ subroutine MAG_Hamiltonian() use wrapper, ONLY:Vstar_dot_V use parallel_m, ONLY:PAR_IND_QP,HEAD_QP_cpu use QP_m, ONLY:QP_table,QP_n_states - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/MAG_common_build_A.F b/src/hamiltonian/MAG_common_build_A.F index 2beb2b2e7f..610afa7411 100644 --- a/src/hamiltonian/MAG_common_build_A.F +++ b/src/hamiltonian/MAG_common_build_A.F @@ -45,7 +45,7 @@ subroutine MAG_common_build_A(build) & A_magn_x,A_magn_y,A_magn_z,gauge_factors, & & phase_trick,phase_radius,n_loops use vec_operate, ONLY:v_norm - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/Pseudo_Hamiltonian.F b/src/hamiltonian/Pseudo_Hamiltonian.F index 9fe1f29bfd..70a119ceae 100644 --- a/src/hamiltonian/Pseudo_Hamiltonian.F +++ b/src/hamiltonian/Pseudo_Hamiltonian.F @@ -49,8 +49,7 @@ subroutine Pseudo_Hamiltonian(Xk,Xen,l_equilibrium) use parallel_m, ONLY:PAR_G_k_range use real_time, ONLY:Ho_plus_sigma,H_pseudo_eq #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/Pseudo_KB_FFT.F b/src/hamiltonian/Pseudo_KB_FFT.F index e3c48ee757..86575ce5ec 100644 --- a/src/hamiltonian/Pseudo_KB_FFT.F +++ b/src/hamiltonian/Pseudo_KB_FFT.F @@ -17,8 +17,7 @@ subroutine Pseudo_KB_FFT(kbv,kbv_real_space,kpt,pp_range,npp,i_atom,is,ia,ik) use wave_func, ONLY:wf_ncx,wf_igk,wf_nc_k use FFT_m, ONLY:fft_size,fft_dim,fft_g_table,fft_norm,fftw_plan use D_lattice, ONLY:atom_pos,x_cc,a,n_atoms - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/Pseudo_KB_G_to_R_space.F b/src/hamiltonian/Pseudo_KB_G_to_R_space.F index 9aba63e870..ec3a0c7b52 100644 --- a/src/hamiltonian/Pseudo_KB_G_to_R_space.F +++ b/src/hamiltonian/Pseudo_KB_G_to_R_space.F @@ -26,8 +26,7 @@ subroutine Pseudo_KB_G_to_R_space(Xk,Xen) use timing_m, ONLY:timing use parallel_int, ONLY:PP_wait use parallel_m, ONLY:master_cpu,PAR_IND_Xk_ibz_ID,PAR_IND_Xk_ibz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/hamiltonian/Pseudo_KB_gauge_factor.F b/src/hamiltonian/Pseudo_KB_gauge_factor.F index 421e2c966e..fc72863f94 100644 --- a/src/hamiltonian/Pseudo_KB_gauge_factor.F +++ b/src/hamiltonian/Pseudo_KB_gauge_factor.F @@ -24,8 +24,7 @@ subroutine Pseudo_KB_gauge_factor(gauge_factor) use drivers, ONLY:l_real_time use fields, ONLY:A_tot #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interface/INIT.F b/src/interface/INIT.F index 60ec6a499d..37b9d89680 100644 --- a/src/interface/INIT.F +++ b/src/interface/INIT.F @@ -64,8 +64,7 @@ integer function INIT(en,q,k,X,Xw,Dip,instr,lnstr,CLOSE_Gs,FINALIZE) use com, ONLY:of_yaml_IDs use yaml_output, ONLY:yaml_close_stream #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interface/INIT_DephMatrix.F b/src/interface/INIT_DephMatrix.F index be3075d20e..5f8d5e7c24 100644 --- a/src/interface/INIT_DephMatrix.F +++ b/src/interface/INIT_DephMatrix.F @@ -16,8 +16,7 @@ subroutine INIT_DephMatrix() use pars, ONLY:SP use parser_m, ONLY:PARSER_array use real_time, ONLY:RT_INPUT_Deph_limits - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interface/INIT_QP.F b/src/interface/INIT_QP.F index f6244cb281..38feedd268 100644 --- a/src/interface/INIT_QP.F +++ b/src/interface/INIT_QP.F @@ -17,8 +17,7 @@ subroutine INIT_QP(comment) use QP_m, ONLY:QP_nk,QP_nb,QP_state use parser_m, ONLY:PARSER_array use it_tools, ONLY:check_verbosity - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interface/INIT_check_databases.F b/src/interface/INIT_check_databases.F index d509d1a69e..3e4dcf3693 100644 --- a/src/interface/INIT_check_databases.F +++ b/src/interface/INIT_check_databases.F @@ -39,8 +39,7 @@ subroutine INIT_check_databases(X,Xbsk,qp,Xxcw,Xw,q,k,en,en_sc,Dip,lnstr,instr,I ! - io_COLLISIONS (serial I/O) or ! - io_COLLISIONS_header (parallel I/O case) ! - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interface/INIT_q_points.F b/src/interface/INIT_q_points.F index 3305042bb3..e85810ee6c 100644 --- a/src/interface/INIT_q_points.F +++ b/src/interface/INIT_q_points.F @@ -25,8 +25,7 @@ subroutine INIT_q_points( ) use ELPH, ONLY:PH_qpt,elph_use_q_grid,elph_nQ,elph_grids_are_expanded #endif use parser_m, ONLY:PARSER_array - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_BZ.F b/src/interpolate/INTERPOLATION_BZ.F index 0c684f39a5..3060090a43 100644 --- a/src/interpolate/INTERPOLATION_BZ.F +++ b/src/interpolate/INTERPOLATION_BZ.F @@ -15,8 +15,7 @@ subroutine INTERPOLATION_BZ(K,NK,ID,R1D,R2D,C1D,C2D,E) use electrons, ONLY:levels use interpolate, ONLY:interpls,REAL1D,REAL2D,CMPLX1D,CMPLX2D use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_BZ_coeff.F b/src/interpolate/INTERPOLATION_BZ_coeff.F index b46db642f8..9edb722737 100644 --- a/src/interpolate/INTERPOLATION_BZ_coeff.F +++ b/src/interpolate/INTERPOLATION_BZ_coeff.F @@ -28,8 +28,7 @@ subroutine INTERPOLATION_BZ_coeff(Xk,VALUEs,engre,nvalues,Nk,ID) use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PP_indexes,PP_indexes_reset,myid,PAR_build_index,ncpu use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_BZ_setup.F b/src/interpolate/INTERPOLATION_BZ_setup.F index b578ddec0f..4cd509b804 100644 --- a/src/interpolate/INTERPOLATION_BZ_setup.F +++ b/src/interpolate/INTERPOLATION_BZ_setup.F @@ -23,8 +23,7 @@ subroutine INTERPOLATION_BZ_setup(Xk) use vec_operate, ONLY:sort use matrix_operate, ONLY:m3inv use com, ONLY:msg - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_coefficients.F b/src/interpolate/INTERPOLATION_coefficients.F index d18dc4dcc3..81fee6287a 100644 --- a/src/interpolate/INTERPOLATION_coefficients.F +++ b/src/interpolate/INTERPOLATION_coefficients.F @@ -20,8 +20,7 @@ subroutine INTERPOLATION_coefficients(R1D,R2D,C1D,C2D,E,k,Nk,ID,ID_obj) use electrons, ONLY:levels use interpolate, ONLY:interpls,REAL1D,REAL2D,CMPLX1D,CMPLX2D,nshells,INTERP_FineGd use interpolate_tools, ONLY:get_ID - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_driver_do.F b/src/interpolate/INTERPOLATION_driver_do.F index 3a87cd4d8c..2a84f3661b 100644 --- a/src/interpolate/INTERPOLATION_driver_do.F +++ b/src/interpolate/INTERPOLATION_driver_do.F @@ -31,8 +31,7 @@ subroutine INTERPOLATION_driver_do(operation,ID,OUT_k,OUT_E,FineGrid) & l_INTERP_f,l_INTERP_E,l_INTERP_dE,INTERP_FineGd,& & l_integral_respect,OUT_k_nk use IO_int, ONLY:IO_and_Messaging_switch - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_driver_end.F b/src/interpolate/INTERPOLATION_driver_end.F index ceda83fc28..bb5559bcd7 100644 --- a/src/interpolate/INTERPOLATION_driver_end.F +++ b/src/interpolate/INTERPOLATION_driver_end.F @@ -14,8 +14,7 @@ subroutine INTERPOLATION_driver_end(ID) use interpolate_tools, ONLY:INTERPOLATION_reset use interpolate, ONLY:INTERPOLATE_msg_fmt,INTERPOLATE_initialized,& & lattice_vectors,INTERP_obj,max_interpls,int_sop,NN_nk_exact - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_fourier.F b/src/interpolate/INTERPOLATION_fourier.F index 13049b3030..b7d4def0fc 100644 --- a/src/interpolate/INTERPOLATION_fourier.F +++ b/src/interpolate/INTERPOLATION_fourier.F @@ -22,8 +22,7 @@ subroutine INTERPOLATION_fourier(K,VALUES,engre,nvalues,NK,ID) use LIVE_t, ONLY:live_timing use parallel_m, ONLY:PP_indexes,PP_indexes_reset,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/interpolate/INTERPOLATION_nearest_k.F b/src/interpolate/INTERPOLATION_nearest_k.F index c72d402c56..e81b788c0b 100644 --- a/src/interpolate/INTERPOLATION_nearest_k.F +++ b/src/interpolate/INTERPOLATION_nearest_k.F @@ -17,8 +17,7 @@ subroutine INTERPOLATION_nearest_k(K_in,V_in,K_out,V_out) use vec_operate, ONLY:sort use parallel_m, ONLY:PP_indexes,PP_indexes_reset,ncpu,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_ATMPROJ_pwscf.F b/src/io/io_ATMPROJ_pwscf.F index 10acb26167..3a9cc305d9 100644 --- a/src/io/io_ATMPROJ_pwscf.F +++ b/src/io/io_ATMPROJ_pwscf.F @@ -21,8 +21,7 @@ integer function io_ATMPROJ_pwscf(ID) & io_elemental,io_variable_bulk,def_variable_bulk, & & io_header,io_fragment use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_BSS_invert.F b/src/io/io_BSS_invert.F index bcc1239cea..1055ca6e56 100644 --- a/src/io/io_BSS_invert.F +++ b/src/io/io_BSS_invert.F @@ -19,7 +19,7 @@ integer function io_BSS_invert(iq,W,ID) use IO_m, ONLY:io_sec,io_status,read_is_on use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none integer :: iq diff --git a/src/io/io_BS_Fxc.F b/src/io/io_BS_Fxc.F index 95d02e7da6..a4e7f49014 100644 --- a/src/io/io_BS_Fxc.F +++ b/src/io/io_BS_Fxc.F @@ -26,7 +26,7 @@ integer function io_BS_Fxc(iq,FXC_W,ID,X) & io_elemental,def_variable_elemental,io_variable_elemental,& & io_bulk,io_header use descriptors, ONLY:IO_desc,IO_desc_duplicate,IO_desc_reset - USE_MEMORY + use y_memory_alloc ! implicit none type(w_samp) ::FXC_W diff --git a/src/io/io_COL_CUT.F b/src/io/io_COL_CUT.F index 47160889d5..b3d087161d 100644 --- a/src/io/io_COL_CUT.F +++ b/src/io/io_COL_CUT.F @@ -18,7 +18,7 @@ integer function io_COL_CUT(ID) use IO_m, ONLY:io_sec,io_status use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_DB1.F b/src/io/io_DB1.F index 80df91e2f4..1fe6bfc951 100644 --- a/src/io/io_DB1.F +++ b/src/io/io_DB1.F @@ -47,8 +47,7 @@ integer function io_DB1(E,k,ID) #if defined _RT use real_time, ONLY:RT_bands #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_DB1_selective_scan.F b/src/io/io_DB1_selective_scan.F index 6d60aace68..c16d360b3a 100644 --- a/src/io/io_DB1_selective_scan.F +++ b/src/io/io_DB1_selective_scan.F @@ -26,8 +26,7 @@ integer function io_DB1_selective_scan(what,DB1_path,E,k,db1_alat,db1_a,COM_mode use com, ONLY:core_io_path use IO_m, ONLY:OP_RD_CL,NONE,DUMP use IO_int, ONLY:io_control,io_connect,io_disconnect,io_elemental,io_bulk - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_Double_Grid.F b/src/io/io_Double_Grid.F index 5749d96f18..a43652a1a3 100644 --- a/src/io/io_Double_Grid.F +++ b/src/io/io_Double_Grid.F @@ -23,8 +23,7 @@ integer function io_Double_Grid(E,Xk,ID,what) #if defined _ELPH use ELPH, ONLY:EkplusQ_mode #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_ELPH.F b/src/io/io_ELPH.F index 694a720bd0..4e16a26027 100644 --- a/src/io/io_ELPH.F +++ b/src/io/io_ELPH.F @@ -22,8 +22,7 @@ integer function io_ELPH(ID,what) use R_lattice, ONLY:nkbz use D_lattice, ONLY:n_atoms use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_E_SOC_map.F b/src/io/io_E_SOC_map.F index 81e7de7ff9..2c86403f90 100644 --- a/src/io/io_E_SOC_map.F +++ b/src/io/io_E_SOC_map.F @@ -15,8 +15,7 @@ integer function io_E_SOC_map(En,kpt,ID) use R_lattice, ONLY:bz_samp use IO_m, ONLY:read_is_on,write_is_on,file_is_present use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_GROT.F b/src/io/io_GROT.F index 315b856393..eed126e027 100644 --- a/src/io/io_GROT.F +++ b/src/io/io_GROT.F @@ -20,8 +20,7 @@ integer function io_GROT(io_db) use IO_int, ONLY:io_connect,io_disconnect,io_elemental,& & io_bulk,io_header,ver_is_gt_or_eq use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_HF_and_locXC.F b/src/io/io_HF_and_locXC.F index 8ededd4bc5..7f8b4f2abd 100644 --- a/src/io/io_HF_and_locXC.F +++ b/src/io/io_HF_and_locXC.F @@ -22,7 +22,7 @@ integer function io_HF_and_locXC(ID) use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk,& & ver_is_gt_or_eq use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none integer :: ID diff --git a/src/io/io_KB_abinit.F b/src/io/io_KB_abinit.F index 798605c3d6..e71beb00e3 100644 --- a/src/io/io_KB_abinit.F +++ b/src/io/io_KB_abinit.F @@ -23,7 +23,7 @@ integer function io_KB_abinit(ID) use IO_int, ONLY:io_connect,io_disconnect,io_fragment, & & io_elemental,io_bulk,io_header,ver_is_gt_or_eq use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_KB_pwscf.F b/src/io/io_KB_pwscf.F index db8d288a93..1e0641250d 100644 --- a/src/io/io_KB_pwscf.F +++ b/src/io/io_KB_pwscf.F @@ -23,8 +23,7 @@ integer function io_KB_pwscf(ID) & pp_n_l_comp,pp_kbs,pp_kb,pp_kbd, & & PP_alloc_pwscf use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_KB_real_space.F b/src/io/io_KB_real_space.F index c098547edb..226d72b7f3 100644 --- a/src/io/io_KB_real_space.F +++ b/src/io/io_KB_real_space.F @@ -20,8 +20,7 @@ integer function io_KB_real_space(ID,kbv_real_space,kbv_real_space_table) use IO_m, ONLY:io_sec,frag_WF use IO_int, ONLY:io_connect,io_disconnect,io_fragment, & & io_elemental,io_bulk,io_header - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 0d67d214bb..97ab247b3e 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -22,8 +22,7 @@ integer function io_MPA(X,Xw,ID) use stderr, ONLY:intc use timing_m, ONLY:timing use mpa_m, ONLY:MPA_freqs,MPA_alloc,MPA_E_par,MPA_R_par - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_NL.F b/src/io/io_NL.F index 60bb7606cf..26ba727350 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -27,8 +27,7 @@ integer function io_NL(what,ID) #if defined _TIMING use timing_m, ONLY:timing #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_OSCLL.F b/src/io/io_OSCLL.F index d2c9c62f43..9e01b8ead1 100644 --- a/src/io/io_OSCLL.F +++ b/src/io/io_OSCLL.F @@ -26,8 +26,7 @@ integer function io_OSCLL(q,ID) #if defined _TIMING use timing_m, ONLY:timing #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_PH.F b/src/io/io_PH.F index ec54cf1d33..3e60b81301 100644 --- a/src/io/io_PH.F +++ b/src/io/io_PH.F @@ -24,8 +24,7 @@ integer function io_PH(ID) use IO_m, ONLY:io_sec,io_status,read_is_on,DB_is_OK use RT_lifetimes, ONLY:RT_PE_life,RT_lifetime_alloc,Life_MEM_steps use descriptors, ONLY:IO_desc_reset - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_QINDX.F b/src/io/io_QINDX.F index 4389056f31..d4ce8d4387 100644 --- a/src/io/io_QINDX.F +++ b/src/io/io_QINDX.F @@ -33,8 +33,7 @@ integer function io_QINDX(Xk,q,io_db) & ver_is_gt_or_eq,io_fragment,def_variable_bulk,io_variable_bulk use timing_m, ONLY:timing use parallel_m, ONLY:PAR_K_scheme - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_QP_and_GF.F b/src/io/io_QP_and_GF.F index b69b058cfe..8e8bd609a9 100644 --- a/src/io/io_QP_and_GF.F +++ b/src/io/io_QP_and_GF.F @@ -27,8 +27,7 @@ integer function io_QP_and_GF(what,qp,ID) #if _ELPH use ELPH, ONLY:ELPH_desc,use_PH_DbGd #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_RIM.F b/src/io/io_RIM.F index 04aaf6d27d..421fd6076e 100644 --- a/src/io/io_RIM.F +++ b/src/io/io_RIM.F @@ -17,8 +17,7 @@ integer function io_RIM(ID) & nqibz use IO_m, ONLY:io_sec,read_is_on,io_status,write_is_on use IO_int, ONLY:io_connect,io_disconnect,io_header,io_elemental,io_bulk,ver_is_gt_or_eq - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_RIM_W.F b/src/io/io_RIM_W.F index ffc5ff1878..ac6c58a93b 100644 --- a/src/io/io_RIM_W.F +++ b/src/io/io_RIM_W.F @@ -19,8 +19,7 @@ integer function io_RIM_W(ID,mode,Xw) use IO_int, ONLY:io_connect,io_disconnect,io_header,& & io_elemental,io_bulk use frequency, ONLY:w_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_RT_components_OBS.F b/src/io/io_RT_components_OBS.F index b6e6ebb31e..e4779893c5 100644 --- a/src/io/io_RT_components_OBS.F +++ b/src/io/io_RT_components_OBS.F @@ -19,8 +19,7 @@ subroutine io_RT_components_OBS(ID,what) use netcdf, ONLY:NF90_UNLIMITED use RT_control, ONLY:J_cache,P_cache,Ms_cache,Ml_cache,A_cache,& & CACHE_OBS_steps_now,OBS_RT_IO_t,RT_do_IO - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_RT_components_Reference.F b/src/io/io_RT_components_Reference.F index 5ac503cad2..f8f54fdaab 100644 --- a/src/io/io_RT_components_Reference.F +++ b/src/io/io_RT_components_Reference.F @@ -23,8 +23,7 @@ subroutine io_RT_components_Reference(ID) #if defined _ELPH use ELPH, ONLY:elph_branches #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_RT_components_TIME_points.F b/src/io/io_RT_components_TIME_points.F index 4f5b960973..3527ac0a23 100644 --- a/src/io/io_RT_components_TIME_points.F +++ b/src/io/io_RT_components_TIME_points.F @@ -21,8 +21,7 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti & RT_dyn_step,RT_step use IO_m, ONLY:write_is_on,read_is_on use IO_int, ONLY:def_variable_bulk,io_variable_bulk,def_variable_elemental,io_variable_elemental - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_SC_components.F b/src/io/io_SC_components.F index 19869e054f..cb4fa2181c 100644 --- a/src/io/io_SC_components.F +++ b/src/io/io_SC_components.F @@ -27,7 +27,7 @@ integer function io_SC_components(what,E_sc,ID) use FFT_m, ONLY:fft_size use electrons, ONLY:levels,n_sp_pol,n_spin use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_X.F b/src/io/io_X.F index 1ad4408ad9..b06d8f1db7 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -25,8 +25,7 @@ integer function io_X(X,Xw,ID) & IO_OUTDATED_DB,frag_RESPONSE,IO_NO_DATABASE,io_mode,DUMP use stderr, ONLY:intc,STRING_same use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_full_SYMMs.F b/src/io/io_full_SYMMs.F index e1fbfecc21..2bd4c31d11 100644 --- a/src/io/io_full_SYMMs.F +++ b/src/io/io_full_SYMMs.F @@ -21,8 +21,7 @@ integer function io_full_SYMMs(k,ID) #if defined _TIMING use timing_m, ONLY:timing #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_gFsq.F b/src/io/io_gFsq.F index 9f0ad6caff..7b4a63aa16 100644 --- a/src/io/io_gFsq.F +++ b/src/io/io_gFsq.F @@ -22,8 +22,7 @@ integer function io_gFsq(ID) use QP_m, ONLY:QP_n_states,QP_table use parallel_m, ONLY:PAR_Q_bz_index use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/io_kpts.F b/src/io/io_kpts.F index e9f54d2eb4..b700e972cf 100644 --- a/src/io/io_kpts.F +++ b/src/io/io_kpts.F @@ -23,7 +23,7 @@ integer function io_kpts(k,Xk,q,io_db) & io_variable_elemental,def_variable_elemental,io_header,& & def_variable_bulk,io_variable_bulk use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/load_SC_components.F b/src/io/load_SC_components.F index bbe0473e32..6026b95d98 100644 --- a/src/io/load_SC_components.F +++ b/src/io/load_SC_components.F @@ -21,7 +21,7 @@ subroutine load_SC_components(what,E,COM_,MODE_,ik,i_sp_pol,n_bands,kind,& use IO_int, ONLY:io_control use IO_m, ONLY:manage_action,OP_RD_CL,RD_CL_IF_END,OP_RD,RD_CL,& & DUMP,OP_RD_CL,NONE,IO_NO_DATABASE - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index d5b8aa3401..cf564ccc9e 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -23,8 +23,7 @@ integer function variables_ELPH(ID,what) use vec_operate, ONLY:rlu_v_is_zero,c2a use zeros, ONLY:k_rlu_zero use descriptors, ONLY:IO_desc_reset - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index f2f2993b4a..241954db18 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -27,8 +27,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) use electrons, ONLY:n_sp_pol use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io_parallel/io_COLLISIONS_header.F b/src/io_parallel/io_COLLISIONS_header.F index c9d81f2dac..aefa3adedb 100644 --- a/src/io_parallel/io_COLLISIONS_header.F +++ b/src/io_parallel/io_COLLISIONS_header.F @@ -28,7 +28,7 @@ integer function io_COLLISIONS_header(ID,COLL) use X_m, ONLY:X_desc use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io_serial/io_BS.F b/src/io_serial/io_BS.F index 85e8730820..16738e164b 100644 --- a/src/io_serial/io_BS.F +++ b/src/io_serial/io_BS.F @@ -29,8 +29,7 @@ integer function io_BS(iq,X,ID) & def_variable_bulk,io_variable_bulk,io_header,io_fragment use descriptors, ONLY:IO_desc,IO_desc_reset,IO_desc_duplicate use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/io_serial/io_COLLISIONS.F b/src/io_serial/io_COLLISIONS.F index 8effb20f00..8af5f4802a 100644 --- a/src/io_serial/io_COLLISIONS.F +++ b/src/io_serial/io_COLLISIONS.F @@ -26,7 +26,7 @@ integer function io_COLLISIONS(ID,COLL,COLL_element,i_coll_,COMM) use X_m, ONLY:X_desc use drivers, ONLY:l_elel_scatt,l_elphoton_scatt use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/LINEAR_ALGEBRA_driver.F b/src/linear_algebra/LINEAR_ALGEBRA_driver.F index 6e4a9062cc..84f0f5c329 100644 --- a/src/linear_algebra/LINEAR_ALGEBRA_driver.F +++ b/src/linear_algebra/LINEAR_ALGEBRA_driver.F @@ -38,8 +38,7 @@ subroutine LINEAR_ALGEBRA_driver(idriver,lib_in,& use timing_m, ONLY:timing use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_mapped - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F b/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F index 900c549f1d..766d58240a 100644 --- a/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/PARALLEL_HERMITIAN_diagonalization.F @@ -20,7 +20,7 @@ subroutine PARALLEL_HERMITIAN_diagonalization(M, V, N, E) use linear_algebra, ONLY:LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/PARALLEL_inversion.F b/src/linear_algebra/PARALLEL_inversion.F index 0f41f5f5b4..11b5a8d2f5 100644 --- a/src/linear_algebra/PARALLEL_inversion.F +++ b/src/linear_algebra/PARALLEL_inversion.F @@ -33,7 +33,7 @@ subroutine PARALLEL_inversion(M,N) & LINEAR_ALGEBRA_WS_reset use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/PARALLEL_lin_system.F b/src/linear_algebra/PARALLEL_lin_system.F index 3ce6973ffa..550eabd329 100644 --- a/src/linear_algebra/PARALLEL_lin_system.F +++ b/src/linear_algebra/PARALLEL_lin_system.F @@ -22,7 +22,7 @@ subroutine PARALLEL_lin_system(A,B,n,nrhs) & LINEAR_ALGEBRA_WS_reset use matrix, ONLY:PAR_matrix use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F index 9a02fd3759..799d6b60be 100644 --- a/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F +++ b/src/linear_algebra/SERIAL_HERMITIAN_diagonalization.F @@ -23,7 +23,7 @@ subroutine SERIAL_HERMITIAN_diagonalization(n,M,E) #ifdef _OPENMP use omp_lib #endif - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SERIAL_SVD.F b/src/linear_algebra/SERIAL_SVD.F index 27f91d8539..6a5953c609 100644 --- a/src/linear_algebra/SERIAL_SVD.F +++ b/src/linear_algebra/SERIAL_SVD.F @@ -16,7 +16,7 @@ subroutine SERIAL_SVD(n,M,mode,SVD_digits) use linear_algebra, ONLY:LINEAR_ALGEBRA_error,la_xgesvd,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SERIAL_diagonalization.F b/src/linear_algebra/SERIAL_diagonalization.F index 8a199321e7..dee7ae9342 100644 --- a/src/linear_algebra/SERIAL_diagonalization.F +++ b/src/linear_algebra/SERIAL_diagonalization.F @@ -30,7 +30,7 @@ subroutine SERIAL_diagonalization(n,M,E,V_left,V_right) #ifdef _OPENMP use omp_lib #endif - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SERIAL_inversion.F b/src/linear_algebra/SERIAL_inversion.F index b7e8401a4c..44fa4598c3 100644 --- a/src/linear_algebra/SERIAL_inversion.F +++ b/src/linear_algebra/SERIAL_inversion.F @@ -16,7 +16,7 @@ subroutine SERIAL_inversion(n,M,det,eval_det) use linear_algebra, ONLY: LINEAR_ALGEBRA_error,la_xgetrf,la_xgetri,& & LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY: timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SERIAL_lin_system.F b/src/linear_algebra/SERIAL_lin_system.F index c11b87846a..6dc54da9ca 100644 --- a/src/linear_algebra/SERIAL_lin_system.F +++ b/src/linear_algebra/SERIAL_lin_system.F @@ -19,8 +19,7 @@ subroutine SERIAL_lin_system(n,nrhs,A,B) use drivers, ONLY:l_nl_optics,l_real_time use linear_algebra, ONLY:LINEAR_ALGEBRA_error,LINEAR_ALGEBRA_WS_reset,LALGEBRA_WS use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SERIAL_lin_system_gpu.F b/src/linear_algebra/SERIAL_lin_system_gpu.F index c5c7ecc903..d3fa4c4021 100644 --- a/src/linear_algebra/SERIAL_lin_system_gpu.F +++ b/src/linear_algebra/SERIAL_lin_system_gpu.F @@ -24,8 +24,7 @@ subroutine SERIAL_lin_system_gpu(n,nrhs,A_d,B_d) #if defined _CUDA use cublas, ONLY:CUBLAS_OP_N #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/linear_algebra/SLK_test.F b/src/linear_algebra/SLK_test.F index 7e3c533fc9..49bf0b0236 100644 --- a/src/linear_algebra/SLK_test.F +++ b/src/linear_algebra/SLK_test.F @@ -36,8 +36,7 @@ subroutine SLK_test(E,k,q) use parallel_int, ONLY:PARALLEL_global_indexes use linear_algebra, ONLY:INV,DIAGO,LIN_SYS,MAT_MUL,USE_LK,USE_SLK use matrix_operate, ONLY:hermitian - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -201,7 +200,7 @@ subroutine inverse_check( ndim, Amat, Ainv ) use com, ONLY:msg use parallel_m, ONLY:mpi_comm_world use wrapper, ONLY:M_by_M - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/matrices/MATRIX_duplicate.F b/src/matrices/MATRIX_duplicate.F index 4589d00f7f..7ff9cddb80 100644 --- a/src/matrices/MATRIX_duplicate.F +++ b/src/matrices/MATRIX_duplicate.F @@ -16,7 +16,7 @@ subroutine MATRIX_duplicate( operation, M_in, INDEX_in, M_out ) use parallel_m, ONLY:COMM_copy use pars, ONLY:cZERO,SP use matrix, ONLY:PAR_matrix,MATRIX_reset - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/matrices/MATRIX_init.F b/src/matrices/MATRIX_init.F index 3cbbf06669..61a5fec13f 100644 --- a/src/matrices/MATRIX_init.F +++ b/src/matrices/MATRIX_init.F @@ -26,7 +26,7 @@ subroutine MATRIX_init( what, M_par, N, Nb) use matrix, ONLY:PAR_matrix,MATRIX_reset use parallel_m, ONLY:COMM_copy,PAR_COM_SLK,PAR_COM_SLK_INDEX_local,& & PAR_COM_RL_INDEX,PAR_COM_RL_A2A,ncpu - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/matrices/MATRIX_transfer.F b/src/matrices/MATRIX_transfer.F index 1ef0b4dd5c..fbfe29abb3 100644 --- a/src/matrices/MATRIX_transfer.F +++ b/src/matrices/MATRIX_transfer.F @@ -21,7 +21,7 @@ subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV use D_lattice, ONLY:i_space_inv use matrix, ONLY:PAR_matrix,I_do_SND,I_do_RCV,TRANSFER_world,PAR_to_PAR_comm_NAME use timing_m, ONLY:timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/matrices/MATRIX_transpose.F b/src/matrices/MATRIX_transpose.F index ba33ea856b..a9a250fd55 100644 --- a/src/matrices/MATRIX_transpose.F +++ b/src/matrices/MATRIX_transpose.F @@ -20,7 +20,7 @@ subroutine MATRIX_transpose( operation, M_in, M_out ) ! use interfaces, ONLY:MATRIX_duplicate use matrix, ONLY:PAR_matrix,MATRIX_reset - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/matrices/SLK_matrix_init.F b/src/matrices/SLK_matrix_init.F index 3ec20b6b9d..ba0777f8f6 100644 --- a/src/matrices/SLK_matrix_init.F +++ b/src/matrices/SLK_matrix_init.F @@ -28,7 +28,7 @@ subroutine SLK_matrix_init(M_slk, N, N_blocks) ! use SLK_m, ONLY:SLK_ORTHO use matrix, ONLY:PAR_matrix - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 7fcc748d2d..707854b074 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -15,8 +15,7 @@ module BS use pars, ONLY: IP,IPL,SP,schlen,lchlen use collision_el, ONLY: elemental_collision use gpu_m, ONLY: have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index f12ca269ac..eace360b11 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -15,8 +15,7 @@ module BS_solvers use pars, ONLY:SP,schlen,lchlen use BS, ONLY:BS_T_grp,BS_nT_grps,BS_K_dim,BS_H_dim,BS_block,n_BS_blks,BS_blk use matrix, ONLY:PAR_matrix - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_DICHROISM.F b/src/modules/mod_DICHROISM.F index 2c648a0c35..d32bf634dd 100644 --- a/src/modules/mod_DICHROISM.F +++ b/src/modules/mod_DICHROISM.F @@ -13,8 +13,7 @@ module DICHROISM ! use pars, ONLY:SP use BS, ONLY:l_BS_dichroism - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_DIPOLES.F b/src/modules/mod_DIPOLES.F index 365b18540e..ca393c4079 100644 --- a/src/modules/mod_DIPOLES.F +++ b/src/modules/mod_DIPOLES.F @@ -16,7 +16,7 @@ module DIPOLES use units, ONLY:HA2EV use descriptors, ONLY:IO_desc use gpu_m, ONLY:have_gpu - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_D_lattice.F b/src/modules/mod_D_lattice.F index 2c47ac877e..7f67a0369f 100644 --- a/src/modules/mod_D_lattice.F +++ b/src/modules/mod_D_lattice.F @@ -14,8 +14,7 @@ module D_lattice ! use pars, ONLY:LP,SP,lchlen,cONE,cZERO,cI,schlen use devxlib - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_ELPH.F b/src/modules/mod_ELPH.F index 9b3c2d6cbe..744f93d4a3 100644 --- a/src/modules/mod_ELPH.F +++ b/src/modules/mod_ELPH.F @@ -14,8 +14,7 @@ module ELPH use pars, ONLY:SP,rZERO,schlen use electrons, ONLY:levels,E_reset use descriptors, ONLY:IO_desc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_MAGNONS.F b/src/modules/mod_MAGNONS.F index 3f1a0637ff..b2331f5ee4 100644 --- a/src/modules/mod_MAGNONS.F +++ b/src/modules/mod_MAGNONS.F @@ -13,8 +13,7 @@ module MAGNONS ! use pars, ONLY:SP use BS, ONLY:l_BS_magnons - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_MPA.F b/src/modules/mod_MPA.F index 6c79e6bd09..f3e4dce818 100644 --- a/src/modules/mod_MPA.F +++ b/src/modules/mod_MPA.F @@ -39,8 +39,7 @@ module mpa_m use functions, ONLY:NAN use matrix, ONLY:PAR_matrix use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none diff --git a/src/modules/mod_PHOTOLUM.F b/src/modules/mod_PHOTOLUM.F index 4a7706bff5..c160f4a7f2 100644 --- a/src/modules/mod_PHOTOLUM.F +++ b/src/modules/mod_PHOTOLUM.F @@ -13,7 +13,7 @@ module PHOTOLUM ! use BS, ONLY:l_BS_photolum use pars, ONLY:SP - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_POL_FIT.F b/src/modules/mod_POL_FIT.F index a8fd71e183..2c172d16d0 100644 --- a/src/modules/mod_POL_FIT.F +++ b/src/modules/mod_POL_FIT.F @@ -120,8 +120,7 @@ subroutine POL_Gilbreth_fit(x,y,sig,a) ! The estimated error in a(i) is sqrt(Cov(a(i),a(i))). ! Notes: ! This routine uses a QR decomposition method, which should be more - ! numerically stable than solving the normal equations. - USE_MEMORY + use y_memory_alloc ! implicit none real(DP), intent(in) :: x(:), y(:), sig(:) diff --git a/src/modules/mod_QP.F b/src/modules/mod_QP.F index b31e1e8b30..efdd4bff43 100644 --- a/src/modules/mod_QP.F +++ b/src/modules/mod_QP.F @@ -13,8 +13,7 @@ module QP_m ! use descriptors, ONLY:IO_desc,IO_desc_duplicate,IO_desc_reset use pars, ONLY:SP,schlen,cZERO - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_QP_CTL.F b/src/modules/mod_QP_CTL.F index 5f5de82d0e..a34cc3582c 100644 --- a/src/modules/mod_QP_CTL.F +++ b/src/modules/mod_QP_CTL.F @@ -184,7 +184,7 @@ subroutine QP_CTL_fill(iA,i_spin,ID,i_field,CBm,VBM) end subroutine ! subroutine QP_actions_reset - USE_MEMORY + use y_memory_alloc ! implicit none integer :: i_a diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index 0986bb247c..aeccc20f64 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -14,8 +14,7 @@ module RT_control use pars, ONLY:SP,lchlen,schlen,rZERO use units, ONLY:AUT2FS use real_time, ONLY:l_NE_dynamics,l_NE_with_fields,l_elph_scatt - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_RT_lifetimes.F b/src/modules/mod_RT_lifetimes.F index 732c69b127..49be3fe6f9 100644 --- a/src/modules/mod_RT_lifetimes.F +++ b/src/modules/mod_RT_lifetimes.F @@ -13,8 +13,7 @@ module RT_lifetimes ! use pars, ONLY:SP,rZERO,schlen use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elphoton_scatt,l_phel_scatt - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_RT_occupations.F b/src/modules/mod_RT_occupations.F index 4e88144c22..4f2b5b3bb4 100644 --- a/src/modules/mod_RT_occupations.F +++ b/src/modules/mod_RT_occupations.F @@ -15,8 +15,7 @@ module RT_occupations use electrons, ONLY:n_sp_pol use drivers, ONLY:l_elph_scatt,l_elel_scatt,l_elphoton_scatt,& & l_phel_scatt,l_phel_corr - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_RT_output.F b/src/modules/mod_RT_output.F index 58e4008215..fb26102f01 100644 --- a/src/modules/mod_RT_output.F +++ b/src/modules/mod_RT_output.F @@ -16,8 +16,7 @@ module RT_output_m use units, ONLY:FS2AUT use global_XC, ONLY:QP_SE_NONE use descriptors,ONLY:IO_desc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_R_lattice.F b/src/modules/mod_R_lattice.F index b6ebd62814..83ba0d2f88 100644 --- a/src/modules/mod_R_lattice.F +++ b/src/modules/mod_R_lattice.F @@ -14,8 +14,7 @@ module R_lattice ! use pars, ONLY:SP,DP,schlen, IP use descriptors, ONLY:IO_desc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_SC.F b/src/modules/mod_SC.F index b020ed1c46..734ee31aa7 100644 --- a/src/modules/mod_SC.F +++ b/src/modules/mod_SC.F @@ -13,8 +13,7 @@ module SC ! use descriptors, ONLY:IO_desc use pars, ONLY:SP,schlen,lchlen - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_SLK.F b/src/modules/mod_SLK.F index e4928e3e1e..f10067180c 100644 --- a/src/modules/mod_SLK.F +++ b/src/modules/mod_SLK.F @@ -13,7 +13,7 @@ module SLK_m ! use pars, ONLY: SP use parallel_m, ONLY: yMPI_comm - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 048dd50141..1c8b654d9a 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -18,8 +18,7 @@ module X_m use matrix, ONLY:PAR_matrix use OUTPUT, ONLY:N_MAX_columns use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_collision_el.F b/src/modules/mod_collision_el.F index 81cece0c29..eccf945f00 100644 --- a/src/modules/mod_collision_el.F +++ b/src/modules/mod_collision_el.F @@ -20,8 +20,7 @@ module collision_el use parallel_m, ONLY:PP_indexes use qe_pseudo_m, ONLY:bec_type,deallocate_bec_type use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_electric.F b/src/modules/mod_electric.F index 44eadad757..e819524b8e 100644 --- a/src/modules/mod_electric.F +++ b/src/modules/mod_electric.F @@ -13,8 +13,7 @@ module electric ! use pars, ONLY:SP,schlen,lchlen use electrons, ONLY:levels - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_electrons.F b/src/modules/mod_electrons.F index 4b63ecc6c7..30f0165ed3 100644 --- a/src/modules/mod_electrons.F +++ b/src/modules/mod_electrons.F @@ -12,8 +12,7 @@ module electrons ! use pars, ONLY:SP,rZERO - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_frequency.F b/src/modules/mod_frequency.F index 6f8a42b132..1bdc0aee4c 100644 --- a/src/modules/mod_frequency.F +++ b/src/modules/mod_frequency.F @@ -13,8 +13,7 @@ module frequency ! use pars, ONLY:SP use units, ONLY:HA2EV - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_hamiltonian.F b/src/modules/mod_hamiltonian.F index 92ac2fbcc7..14b32d26cf 100644 --- a/src/modules/mod_hamiltonian.F +++ b/src/modules/mod_hamiltonian.F @@ -13,8 +13,7 @@ module hamiltonian ! use pars, ONLY:SP,schlen use electrons, ONLY:levels - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_interpolate_tools.F b/src/modules/mod_interpolate_tools.F index 164f1a3409..e7e3791b21 100644 --- a/src/modules/mod_interpolate_tools.F +++ b/src/modules/mod_interpolate_tools.F @@ -16,8 +16,7 @@ module interpolate_tools & l_INTERP_W,NN_nk_exact,NN_nk_border,NN_MAX_real_nearest,NN_n_of_nearest,l_INTERP_Z,& & INTERPOLATE_msg_fmt,OUT_k_nk,INTERP_FineGd use electrons, ONLY:n_sp_pol - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_linear_algebra.F b/src/modules/mod_linear_algebra.F index 9852112bf1..c313f75fe6 100644 --- a/src/modules/mod_linear_algebra.F +++ b/src/modules/mod_linear_algebra.F @@ -20,8 +20,7 @@ module linear_algebra use magma, ONLY: magmaf_init,magmaf_queue_create,& & magmaf_cgeev_m,magmaf_zgeev_m,MagmaVec #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_matrix.F b/src/modules/mod_matrix.F index 74b5474796..4f5f54e7e4 100644 --- a/src/modules/mod_matrix.F +++ b/src/modules/mod_matrix.F @@ -15,8 +15,7 @@ module matrix use pars, ONLY:schlen,SP use parallel_m, ONLY:yMPI_comm use devxlib, ONLY:devxlib_mapped,devxlib_memset_d - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_memory.F b/src/modules/mod_memory.F index 89c7c8d3bd..d9885f3bf2 100644 --- a/src/modules/mod_memory.F +++ b/src/modules/mod_memory.F @@ -524,3 +524,15 @@ subroutine MEM_l6(name,l) call MEM_manager_alloc(name,size(l,KIND=IPL),kind(l(1,1,1,1,1,1)),HOST_) end subroutine end module y_memory + + +module y_memory_alloc +#if defined _OPENACC || defined _OPENMP_GPU + use pars, ONLY:IPL + use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_count_d,MEM_global_mesg,IPL + use devxlib, ONLY:devxlib_map,devxlib_unmap,devxlib_mapped,devxlib_memcpy_h2d +#else + use pars, ONLY:IPL + use y_memory, ONLY:MEM_err,MEM_msg,MEM_count,MEM_global_mesg +#endif +end module y_memory_alloc diff --git a/src/modules/mod_mklfft_gpu.F b/src/modules/mod_mklfft_gpu.F index d90733592f..887fc25e97 100644 --- a/src/modules/mod_mklfft_gpu.F +++ b/src/modules/mod_mklfft_gpu.F @@ -46,8 +46,7 @@ module mklfft_gpu contains subroutine fft_3d_mklgpu(c_d,n,fft_sign,mklgpu_desc) - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 12f1d12128..14abe6f70e 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -15,8 +15,7 @@ module nl_optics use pars, ONLY:SP,schlen,lchlen use electrons, ONLY:levels use real_time, ONLY:NE_steps,dG_lesser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_parallel.F b/src/modules/mod_parallel.F index 588e1430ee..7b21dbbfde 100644 --- a/src/modules/mod_parallel.F +++ b/src/modules/mod_parallel.F @@ -47,7 +47,7 @@ module parallel_m #endif ! #if !defined _io_lib - USE_MEMORY + use y_memory_alloc ! implicit none #endif @@ -760,4 +760,3 @@ subroutine par_distribute_set(nsets, nsets_this_cpu, nset_shift, comm) end subroutine par_distribute_set ! end module parallel_m -! diff --git a/src/modules/mod_parallel_interface.F b/src/modules/mod_parallel_interface.F index e392c30c57..eb08238c33 100644 --- a/src/modules/mod_parallel_interface.F +++ b/src/modules/mod_parallel_interface.F @@ -1290,3 +1290,9 @@ subroutine PP_snd_rcv_c1(mode,array,node,COMM,TAG) end subroutine ! end module parallel_int + + +module y_memory_alloc_par + use parallel_m, ONLY:PAR_COM_HOST + use parallel_int, ONLY:PP_redux_wait,PP_wait +end module y_memory_alloc_par diff --git a/src/modules/mod_plasma.F b/src/modules/mod_plasma.F index b4d97b9792..3284bcb587 100644 --- a/src/modules/mod_plasma.F +++ b/src/modules/mod_plasma.F @@ -12,7 +12,7 @@ module plasma ! use pars, ONLY :SP - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_pseudo.F b/src/modules/mod_pseudo.F index 260c5fe61c..5450edd065 100644 --- a/src/modules/mod_pseudo.F +++ b/src/modules/mod_pseudo.F @@ -17,7 +17,7 @@ module pseudo use D_lattice, ONLY:n_atomic_species,n_atoms_species use qe_pseudo_m, ONLY:qe_pseudo_deallocate, qe_pseudo_allocate,& & bec_type, deallocate_bec_type - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index f96fadb17e..1c85872273 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -19,8 +19,7 @@ module real_time use RT_lifetimes, ONLY:RT_obj_lifetime,RT_obj_lifetime_alloc,RT_obj_lifetime_free use RT_occupations, ONLY:RT_obj_occupation,RT_obj_occupation_alloc,RT_obj_occupation_free use electrons, ONLY:E_fine_grid - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index c62e06a4e2..3821280cc7 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -15,8 +15,7 @@ module wave_func use pars, ONLY:SP,schlen use devxlib, ONLY:devxlib_mapped use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/nloptics/DIPOLE_symmetrize.F b/src/nloptics/DIPOLE_symmetrize.F index d4aa3e0b21..645deb5c50 100644 --- a/src/nloptics/DIPOLE_symmetrize.F +++ b/src/nloptics/DIPOLE_symmetrize.F @@ -22,7 +22,7 @@ subroutine DIPOLE_symmetrize(k) use com, ONLY:msg use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_INDEX use parallel_int, ONLY:PP_redux_wait - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 6640e34e1f..7f7ac9a3a9 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -44,8 +44,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) use collision_ext, ONLY:COLLISIONS_have_HARTREE use collision_ext, ONLY:ng_oscll,OSCLL,W use electric, ONLY:l_res_symms - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 268a9a44cf..32c595406d 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -41,8 +41,7 @@ subroutine NL_initialize(E,k) use electric, ONLY:l_force_SndOrd,l_res_symms use parser_m, ONLY:parser use stderr, ONLY:intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index 76ef498b06..c1c70797ca 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -48,8 +48,7 @@ subroutine NL_start_and_restart(E,k,Dip) use parallel_int, ONLY:PP_wait,PP_redux_wait use stderr, ONLY:intc use collision_ext, ONLY:COLLISIONS_have_HARTREE - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_FREQS_setup.F b/src/parallel/PARALLEL_FREQS_setup.F index affafc3485..3dcd789b7b 100644 --- a/src/parallel/PARALLEL_FREQS_setup.F +++ b/src/parallel/PARALLEL_FREQS_setup.F @@ -15,8 +15,7 @@ subroutine PARALLEL_FREQS_setup(W,IND,COMM) use parallel_m, ONLY:PP_indexes,yMPI_comm,PAR_IND_FREQ_ID,PAR_n_freqs,PP_indexes_reset,& & PAR_build_index,PAR_FREQS_index use parallel_int,ONLY:PARALLEL_index,PARALLEL_live_message - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_Haydock_VEC_COMMs.F b/src/parallel/PARALLEL_Haydock_VEC_COMMs.F index 512533ab56..410e9bee73 100644 --- a/src/parallel/PARALLEL_Haydock_VEC_COMMs.F +++ b/src/parallel/PARALLEL_Haydock_VEC_COMMs.F @@ -15,7 +15,7 @@ subroutine PARALLEL_Haydock_VEC_COMMs(what) use BS, ONLY:BS_nT_grps use parallel_m, ONLY:PAR_IND_T_groups,PAR_IND_T_Haydock,& & PAR_COM_T_Haydock,PAR_COM_WORLD,CREATE_the_COMM,ncpu - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_Transitions_grouping.F b/src/parallel/PARALLEL_Transitions_grouping.F index 6591271190..4680425938 100644 --- a/src/parallel/PARALLEL_Transitions_grouping.F +++ b/src/parallel/PARALLEL_Transitions_grouping.F @@ -20,8 +20,7 @@ subroutine PARALLEL_Transitions_grouping() & PAR_COM_Xk_ibz_INDEX,PAR_IND_T_Haydock,PP_indexes_reset use R_lattice, ONLY:nXkibz use vec_operate, ONLY:sort - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_WF_distribute.F b/src/parallel/PARALLEL_WF_distribute.F index 0700dd6d9b..5ad7b5c9af 100644 --- a/src/parallel/PARALLEL_WF_distribute.F +++ b/src/parallel/PARALLEL_WF_distribute.F @@ -26,7 +26,7 @@ subroutine PARALLEL_WF_distribute(B_index,Bp_index,K_index,B_and_K_index,& use R_lattice, ONLY:nkbz use collision_ext, ONLY:GW_NEQ_collisions #endif - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_WF_index.F b/src/parallel/PARALLEL_WF_index.F index e2c6649cd4..2de44020e7 100644 --- a/src/parallel/PARALLEL_WF_index.F +++ b/src/parallel/PARALLEL_WF_index.F @@ -20,7 +20,7 @@ subroutine PARALLEL_WF_index(COMM) & COMM_copy,PAR_COM_density use wave_func, ONLY:states_to_load use parallel_int, ONLY:PP_redux_wait - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_add_Q_to_K_list.F b/src/parallel/PARALLEL_add_Q_to_K_list.F index a7f6348f82..212133bf8f 100644 --- a/src/parallel/PARALLEL_add_Q_to_K_list.F +++ b/src/parallel/PARALLEL_add_Q_to_K_list.F @@ -17,8 +17,7 @@ subroutine PARALLEL_add_Q_to_K_list(ZONE,IND_in,IND_in_ID,IND_k_out,IND_k_out_ID use QP_m, ONLY:QP_n_states,QP_table use R_lattice, ONLY:k_map use vec_operate, ONLY:k_periodic_idx - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_collisions.F b/src/parallel/PARALLEL_collisions.F index fc0b612676..2e1ea10497 100644 --- a/src/parallel/PARALLEL_collisions.F +++ b/src/parallel/PARALLEL_collisions.F @@ -138,8 +138,7 @@ subroutine PARALLEL_collisions( k, COLL_grp ) use hamiltonian, ONLY:B_mat_index,B_mat_index_cv use electrons, ONLY:n_met_bands,n_full_bands use R_lattice, ONLY:bz_samp,qindx_S,nqbz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -235,8 +234,7 @@ end subroutine PARALLEL_collisions subroutine PARALLEL_collisions_reset(COLL_grp) ! use collision_ext, ONLY:COLLISIONS_group - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F b/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F index c4b1293836..33ab88c721 100644 --- a/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F +++ b/src/parallel/PARALLEL_distribute_BZk_using_IBZk.F @@ -13,8 +13,7 @@ subroutine PARALLEL_distribute_BZk_using_IBZk(COMM,K,IND_ibz,IBZ_id,IND_out,BZ_i ! use R_lattice, ONLY:bz_samp use parallel_m, ONLY:PP_indexes,yMPI_comm - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_Oscillators.F b/src/parallel/PARALLEL_global_Oscillators.F index 9265143283..8daba10839 100644 --- a/src/parallel/PARALLEL_global_Oscillators.F +++ b/src/parallel/PARALLEL_global_Oscillators.F @@ -31,8 +31,7 @@ subroutine PARALLEL_global_Oscillators(E,Xk,q) & PAR_IND_Xk_bz_ID,PAR_IND_Xk_ibz_ID use openmp, ONLY:n_threads_OSCLL,OPENMP_set_threads use QP_m, ONLY:QP_n_states,QP_table - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_Real_Time.F b/src/parallel/PARALLEL_global_Real_Time.F index e3f46d98db..2321a58dea 100644 --- a/src/parallel/PARALLEL_global_Real_Time.F +++ b/src/parallel/PARALLEL_global_Real_Time.F @@ -38,8 +38,7 @@ subroutine PARALLEL_global_Real_Time(E,Xk,q,X_type) ! ID's use parallel_m, ONLY:PAR_IND_Xk_ibz_ID,PAR_IND_Xk_ibz_ID,PAR_IND_Xk_ibz_ID,& & PAR_IND_DIPk_ibz_ID,PAR_IND_Q_bz_ID,PAR_IND_WF_b_ID - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_Response_G.F b/src/parallel/PARALLEL_global_Response_G.F index 1d150bbd25..5e61afd875 100644 --- a/src/parallel/PARALLEL_global_Response_G.F +++ b/src/parallel/PARALLEL_global_Response_G.F @@ -34,8 +34,7 @@ subroutine PARALLEL_global_Response_G(E,Xk,q,ENVIRONMENT,X_type) use parallel_m, ONLY:PAR_nQ_ibz,PAR_Xk_nbz,PAR_Xk_nibz ! ID's use parallel_m, ONLY:PAR_IND_Xk_ibz_ID,PAR_IND_Xk_bz_ID,PAR_IND_Q_ibz_ID - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_Response_T.F b/src/parallel/PARALLEL_global_Response_T.F index 9860da660e..7a2e6cf17a 100644 --- a/src/parallel/PARALLEL_global_Response_T.F +++ b/src/parallel/PARALLEL_global_Response_T.F @@ -28,8 +28,7 @@ subroutine PARALLEL_global_Response_T_base(Xk) use parallel_m, ONLY:PAR_Kk_nibz,PAR_Xk_nbz,PAR_Xk_nibz ! ID's use parallel_m, ONLY:PAR_IND_Kk_ibz_ID,PAR_IND_Xk_ibz_ID,PAR_IND_Xk_bz_ID - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_Response_T_transitions.F b/src/parallel/PARALLEL_global_Response_T_transitions.F index 8306363670..a683f482ab 100644 --- a/src/parallel/PARALLEL_global_Response_T_transitions.F +++ b/src/parallel/PARALLEL_global_Response_T_transitions.F @@ -26,8 +26,7 @@ subroutine PARALLEL_global_Response_T_transitions(Xk) use parallel_m, ONLY:PAR_BS_nT_col_grps ! ID's use parallel_m, ONLY:PAR_IND_CON_BANDS_DIP_ID,PAR_IND_VAL_BANDS_DIP_ID - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index 4f11150a5b..b617f4f147 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -55,8 +55,7 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q) use drivers, ONLY:l_elph_corr use ELPH, ONLY:elph_use_q_grid #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_dimensions.F b/src/parallel/PARALLEL_global_dimensions.F index ad74f22583..a043acf9ba 100644 --- a/src/parallel/PARALLEL_global_dimensions.F +++ b/src/parallel/PARALLEL_global_dimensions.F @@ -39,7 +39,7 @@ subroutine PARALLEL_global_dimensions(E,Xk,q,ENVIRONMENT) use electrons, ONLY:levels use R_lattice, ONLY:bz_samp,nqibz,nqbz use QP_m, ONLY:QP_n_states,QP_nb,QP_n_G_bands - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_indexes.F b/src/parallel/PARALLEL_global_indexes.F index 24faf8ec2c..cf6c8ab350 100644 --- a/src/parallel/PARALLEL_global_indexes.F +++ b/src/parallel/PARALLEL_global_indexes.F @@ -30,8 +30,7 @@ subroutine PARALLEL_global_indexes(E,Xk,q,ENVIRONMENT,X,Dip,RESET,Dip_limits_pre use electrons, ONLY:levels use R_lattice, ONLY:bz_samp use pars, ONLY:SP - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_global_reset.F b/src/parallel/PARALLEL_global_reset.F index 12808e08d7..8bdfe661e1 100644 --- a/src/parallel/PARALLEL_global_reset.F +++ b/src/parallel/PARALLEL_global_reset.F @@ -58,8 +58,7 @@ subroutine PARALLEL_global_reset(ENVIRONMENT,X_type) #if defined _SCALAPACK use SLK_m, ONLY:SLK_COM_INDEX,SLK_COM_A2A #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_index.F b/src/parallel/PARALLEL_index.F index a41e055075..f51cfabdb9 100644 --- a/src/parallel/PARALLEL_index.F +++ b/src/parallel/PARALLEL_index.F @@ -17,8 +17,7 @@ subroutine PARALLEL_index(px,uplim,low_range,COMM,CONSECUTIVE,ORDERED,NO_EMPTIES use parallel_int,ONLY:PP_redux_wait use stderr, ONLY:intc use vec_operate, ONLY:sort - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/parallel/PARALLEL_scheme_initialize.F b/src/parallel/PARALLEL_scheme_initialize.F index 60b532585c..d2d4bf1eed 100644 --- a/src/parallel/PARALLEL_scheme_initialize.F +++ b/src/parallel/PARALLEL_scheme_initialize.F @@ -13,8 +13,7 @@ subroutine PARALLEL_scheme_initialize(WHAT,ENVIRONMENT,PARALL_PARs,N,TABLE,MATRI ! use parallel_m, ONLY:PAR_scheme use parallel_int, ONLY:PARALLEL_live_message,PARALLEL_index,PARALLEL_MATRIX_distribute - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/OPTICS_driver.F b/src/pol_function/OPTICS_driver.F index 7995584b63..8ee7492595 100644 --- a/src/pol_function/OPTICS_driver.F +++ b/src/pol_function/OPTICS_driver.F @@ -31,8 +31,7 @@ subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) use TDDFT, ONLY:F_xc_gspace,FXC_K_diagonal use interfaces, ONLY:WF_load,WF_free,WF_load use matrix, ONLY:MATRIX_reset - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/X_Double_Grid_setup.F b/src/pol_function/X_Double_Grid_setup.F index b174afa5f3..c19374b2a9 100644 --- a/src/pol_function/X_Double_Grid_setup.F +++ b/src/pol_function/X_Double_Grid_setup.F @@ -33,8 +33,7 @@ subroutine X_Double_Grid_setup(iq,k,k_FGbz,nTrans_percent,Radius) #if defined _RT use real_time, ONLY:l_RT_uses_E_FineGd #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/X_GreenF_analytical.F b/src/pol_function/X_GreenF_analytical.F index dd008081e2..6c17d99791 100644 --- a/src/pol_function/X_GreenF_analytical.F +++ b/src/pol_function/X_GreenF_analytical.F @@ -27,8 +27,7 @@ subroutine X_GreenF_analytical(iq,transitions,Xw,Xen,Xk,GreenF,ordering,space,no use R_lattice, ONLY:qindx_X,bz_samp use frequency, ONLY:w_samp use parallel_m, ONLY:PAR_Xk_bz_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/X_GreenF_remap.F b/src/pol_function/X_GreenF_remap.F index 03eb65f70a..a0236e171e 100644 --- a/src/pol_function/X_GreenF_remap.F +++ b/src/pol_function/X_GreenF_remap.F @@ -16,7 +16,7 @@ subroutine X_GreenF_remap(bands,E,W) use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol,E_reset use frequency, ONLY:w_samp,W_reset - USE_MEMORY + use y_memory_alloc ! implicit none integer :: bands(2) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index ef6788f41c..a07f73a7e5 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -36,8 +36,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) use interfaces, ONLY:WF_load,WF_free use QP_m, ONLY:QP_n_W_freqs_redux use matrix, ONLY:MATRIX_reset,MATRIX_copy - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/X_eh_setup.F b/src/pol_function/X_eh_setup.F index bb6a1ac825..c1ade61e72 100644 --- a/src/pol_function/X_eh_setup.F +++ b/src/pol_function/X_eh_setup.F @@ -17,8 +17,7 @@ integer function X_eh_setup(iq,X,Xen,Xk,minmax_ehe) use electrons, ONLY:levels,n_sp_pol,spin_occ use frequency, ONLY:ordered_grid_index use parallel_m, ONLY:PAR_IND_CON_BANDS_X,PAR_IND_Xk_bz,PAR_IND_VAL_BANDS_X - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/X_irredux.F b/src/pol_function/X_irredux.F index 0530d79ecd..9c82d1cbd6 100644 --- a/src/pol_function/X_irredux.F +++ b/src/pol_function/X_irredux.F @@ -60,8 +60,7 @@ subroutine X_irredux(iq,what,X_par,Xen,Xk,Xw,X,Dip) use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_memcpy_d2h,devxlib_memcpy_h2d use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index fc02b4f89b..0f3c6e41a4 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -45,8 +45,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) devxlib_memcpy_d2h use devxlib_async, ONLY:devxlib_async_synchronize use gpu_m - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QED_Sigma_c.F b/src/qp/QED_Sigma_c.F index eb5726cb92..424b708ac2 100644 --- a/src/qp/QED_Sigma_c.F +++ b/src/qp/QED_Sigma_c.F @@ -32,8 +32,7 @@ subroutine QED_Sigma_c(E,k,q,qp) use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_IND_G_b,PAR_IND_QP,PAR_IND_Q_ibz,PAR_nQ_ibz,PAR_nQP use functions, ONLY:theta_function use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_driver.F b/src/qp/QP_driver.F index 372d29f9b2..7ec29b01bc 100644 --- a/src/qp/QP_driver.F +++ b/src/qp/QP_driver.F @@ -39,8 +39,7 @@ subroutine QP_driver(X,Xen,Xk,en,k,q,Xw,Dip) use parallel_m, ONLY:PAR_COM_WORLD,PAR_IND_WF_linear use stderr, ONLY:intc use descriptors, ONLY:IO_desc,IO_desc_reset,IO_desc_add - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -440,7 +439,7 @@ subroutine check_qp_states(QP_table,QP_state,qp,en,Xen) ! use QP_m, ONLY:QP_t use electrons, ONLY:n_sp_pol,levels - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_expand.F b/src/qp/QP_expand.F index 26ea4ee0e1..634f3a26f9 100644 --- a/src/qp/QP_expand.F +++ b/src/qp/QP_expand.F @@ -16,8 +16,7 @@ subroutine QP_expand(k,qp,qp_expanded) use R_lattice, ONLY:bz_samp use electrons, ONLY:n_sp_pol use descriptors, ONLY:IO_desc_duplicate - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_interpolate_W.F b/src/qp/QP_interpolate_W.F index 49bad959fb..6fa12630db 100644 --- a/src/qp/QP_interpolate_W.F +++ b/src/qp/QP_interpolate_W.F @@ -28,8 +28,7 @@ subroutine QP_interpolate_W(X,Xw,q,mode) use D_lattice, ONLY:alat,a use timing_m, ONLY:timing use parallel_m, ONLY:master_cpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -398,8 +397,7 @@ subroutine find_q_nns(q,q_grid_b_iku,idx_q,idx_is,idx_G) use pars, ONLY:SP use R_lattice, ONLY:bz_samp,RIM_W_ng,g_vec,ng_vec,rl_sop use vec_operate, ONLY:v_is_zero - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_life_transitions.F b/src/qp/QP_life_transitions.F index 87f46464b0..48358e01ea 100644 --- a/src/qp/QP_life_transitions.F +++ b/src/qp/QP_life_transitions.F @@ -17,8 +17,7 @@ integer function QP_life_transitions(iqibz_in,E,k,q,X_life_W) use frequency, ONLY:w_samp,bare_grid_N,coarse_grid_N,coarse_grid_Pt,ordered_grid_index use electrons, ONLY:levels,spin use R_lattice, ONLY:qindx_S,bz_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(levels) ::E diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index 214db6c2a6..a6132521ff 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -50,8 +50,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) use functions, ONLY:bose_E_cut use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memcpy_d2h,devxlib_memcpy_d2d use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index fda3d53490..4be6602d2e 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -75,8 +75,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) use drivers, ONLY:Finite_Tel use D_lattice, ONLY:Bose_Temp use functions, ONLY:bose_E_cut - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 1f1701e307..2e4e40ed3b 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -52,8 +52,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) use wrapper, ONLY:Vstar_dot_V,V_dot_V use wrapper_omp, ONLY:Vstar_dot_V_omp,V_dot_V_omp use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/QP_secant_driver.F b/src/qp/QP_secant_driver.F index 74b18bb3dc..e2e7cfc3da 100644 --- a/src/qp/QP_secant_driver.F +++ b/src/qp/QP_secant_driver.F @@ -51,8 +51,7 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) use IO_int, ONLY:io_control use IO_m, ONLY:NONE,RD,RD_CL,OP_RD,OP_RD_CL,io_SCREEN use stderr, ONLY:intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(levels)::en,Xen diff --git a/src/qp/XCo_Hartree_Fock.F b/src/qp/XCo_Hartree_Fock.F index 1757b087fd..184fbee5e7 100644 --- a/src/qp/XCo_Hartree_Fock.F +++ b/src/qp/XCo_Hartree_Fock.F @@ -43,8 +43,7 @@ subroutine XCo_Hartree_Fock(E,k,Xk,q,mode) use pseudo, ONLY:becp, pp_is_uspp use qe_pseudo_m, ONLY:beccopy use devxlib, ONLY:devxlib_memcpy_d2d - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/XCo_driver.F b/src/qp/XCo_driver.F index 692704c5a8..685f1b107f 100644 --- a/src/qp/XCo_driver.F +++ b/src/qp/XCo_driver.F @@ -28,8 +28,7 @@ subroutine XCo_driver(E,k,Xk,q) use hamiltonian, ONLY:l_sc_V_is_local use global_XC, ONLY:H_SE_FOCK,H_SE_HARTREE,H_SE_COH,H_SE_SEX #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/XCo_local.F b/src/qp/XCo_local.F index e77ced9f26..96fc65c629 100644 --- a/src/qp/XCo_local.F +++ b/src/qp/XCo_local.F @@ -40,8 +40,7 @@ subroutine XCo_local(E,Xk) use SC, ONLY:load_SC_components,SC_fft_size,compatible_SC_DB #endif use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp/XCo_report.F b/src/qp/XCo_report.F index 4538b06a85..013f6b39bc 100644 --- a/src/qp/XCo_report.F +++ b/src/qp/XCo_report.F @@ -22,8 +22,7 @@ subroutine XCo_report(qp,E,k) use com, ONLY:msg use stderr, ONLY:intc,real2ch use xc_functionals,ONLY:E_xc_val - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_DBs_add_me.F b/src/qp_control/QP_DBs_add_me.F index 0dc46c11ad..1f66bccb5d 100644 --- a/src/qp_control/QP_DBs_add_me.F +++ b/src/qp_control/QP_DBs_add_me.F @@ -16,8 +16,7 @@ subroutine QP_DBs_add_me(qp_base,qp2add,plan_EWZG,SAME_states,SAME_desc,OP,PRE_F use pars, ONLY:cZERO,rZERO,cI,SP,rONE use QP_m, ONLY:QP_t,QP_reset,QP_copy,QP_alloc use electrons, ONLY:n_sp_pol - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_DBs_merge.F b/src/qp_control/QP_DBs_merge.F index 81ddb8ec21..a6e26499f4 100644 --- a/src/qp_control/QP_DBs_merge.F +++ b/src/qp_control/QP_DBs_merge.F @@ -18,8 +18,7 @@ subroutine QP_DBs_merge(n_dbs,qp2merge,plan_EWZG,n_GROUNDS,qp,OP,PRE_FAC,FILES) use C_driver, ONLY:code_bin use vec_operate, ONLY:v_is_zero use descriptors, ONLY:IO_desc_duplicate - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_apply.F b/src/qp_control/QP_apply.F index 44a3f69f8d..d02560ca76 100644 --- a/src/qp_control/QP_apply.F +++ b/src/qp_control/QP_apply.F @@ -41,8 +41,7 @@ subroutine QP_apply(bands,en,k,object,msg_fmt,qp_impose,QP_ctl_impose,main_secti & QP_ctl_ID,QP_ctl_t,QP_ctl_msg_fmt,QP_ctl_xc_STRING,QP_ctl_what,& & At_least_one_band_corrected use global_XC, ONLY:correct_global_XC - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_apply_QP.F b/src/qp_control/QP_apply_QP.F index 274a5a3398..84a0302e3d 100644 --- a/src/qp_control/QP_apply_QP.F +++ b/src/qp_control/QP_apply_QP.F @@ -16,8 +16,7 @@ subroutine QP_apply_QP(i_ACTION,bands,en,k,qp) use R_lattice, ONLY:bz_samp use electrons, ONLY:levels,n_sp_pol use QP_CTL_m, ONLY:QP_action - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_apply_dump_user_CTLs.F b/src/qp_control/QP_apply_dump_user_CTLs.F index 6fc03d1fb2..ff3cb22947 100644 --- a/src/qp_control/QP_apply_dump_user_CTLs.F +++ b/src/qp_control/QP_apply_dump_user_CTLs.F @@ -18,8 +18,7 @@ subroutine QP_apply_dump_user_CTLs( E, object ) use QP_CTL_m, ONLY:QP_action,n_QP_actions,QP_ctl_what,QP_ctl_DB_user,& & QP_ctl_ID,QP_CTL_is_active,QP_CTL_fill use stderr, ONLY:STRING_split,STRING_same - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_apply_interpolate_QP.F b/src/qp_control/QP_apply_interpolate_QP.F index 5a7a9473c8..e304927964 100644 --- a/src/qp_control/QP_apply_interpolate_QP.F +++ b/src/qp_control/QP_apply_interpolate_QP.F @@ -34,8 +34,7 @@ subroutine QP_apply_interpolate_QP(i_ACTION,bands,en,k,qp) use QP_CTL_m, ONLY:QP_action,QP_ctl_msg_fmt,QP_ctl_xc_STRING,At_least_one_band_corrected use interpolate, ONLY:NN_n_of_nearest,INTERP_obj,INTERPOLATE_msg_fmt,& & INTERPOLATION_driver_seed,INTERPOLATION_driver_do,INTERP_shell_factor - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_apply_the_ACTION.F b/src/qp_control/QP_apply_the_ACTION.F index 886549deb8..d37d5ffbc6 100644 --- a/src/qp_control/QP_apply_the_ACTION.F +++ b/src/qp_control/QP_apply_the_ACTION.F @@ -17,8 +17,7 @@ subroutine QP_apply_the_ACTION(i_ACTION,bands,E,k) use electrons, ONLY:levels,n_sp_pol use R_lattice, ONLY:bz_samp use QP_CTL_m, ONLY:QP_action,QP_ctl_xc_STRING,At_least_one_band_corrected - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_load_DB.F b/src/qp_control/QP_load_DB.F index a43c1672ee..3160259597 100644 --- a/src/qp_control/QP_load_DB.F +++ b/src/qp_control/QP_load_DB.F @@ -18,8 +18,7 @@ subroutine QP_load_DB(i_ACTION,bands,en,k) use QP_CTL_m, ONLY:QP_action use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,DUMP,REP - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/qp_control/QP_load_GFs.F b/src/qp_control/QP_load_GFs.F index 5d4cdf43a8..07a6217743 100644 --- a/src/qp_control/QP_load_GFs.F +++ b/src/qp_control/QP_load_GFs.F @@ -15,8 +15,7 @@ subroutine QP_load_GFs(bands,qp,E) ! use electrons, ONLY:n_sp_pol,spin,levels use QP_m, ONLY:QP_t,GF_is_causal - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_control/RT_alloc.F b/src/real_time_control/RT_alloc.F index fe610e7366..464a3f1ff0 100644 --- a/src/real_time_control/RT_alloc.F +++ b/src/real_time_control/RT_alloc.F @@ -30,8 +30,7 @@ subroutine RT_alloc(en,what) & dG_lesser,G_lesser,MEM_pointer,G_MEM_steps,REF_V_xc_sc,REF_V_hartree_sc,rho_reference,& & magn_reference,RT_bands,RT_nk,l_RT_is_WFfree,l_RT_rotate_DM,& & l_velocity_gauge_corr,dG_avg - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_control/RT_free.F b/src/real_time_control/RT_free.F index 5c09919912..ea37a6ac22 100644 --- a/src/real_time_control/RT_free.F +++ b/src/real_time_control/RT_free.F @@ -29,8 +29,7 @@ subroutine RT_free( ) use RT_iterative, ONLY:THETA_matrix,THETA_matrix_index #endif use RT_lifetimes, ONLY:RT_ALL_lifetimes_free,q_weight_RT - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_control/RT_interpolation_driver.F b/src/real_time_control/RT_interpolation_driver.F index 9e7cc70bc8..07053e1526 100644 --- a/src/real_time_control/RT_interpolation_driver.F +++ b/src/real_time_control/RT_interpolation_driver.F @@ -19,8 +19,7 @@ subroutine RT_interpolation_driver(bands,E,K,what,Time,l_f,l_E,l_W,l_B,NN,VERB) use real_time, ONLY:RT_carriers,l_TRabs_YPP use com, ONLY:msg use interpolate, ONLY:l_integral_respect,NN_n_of_nearest - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_control/RT_k_grid.F b/src/real_time_control/RT_k_grid.F index 65f3745738..361c4cd9b7 100644 --- a/src/real_time_control/RT_k_grid.F +++ b/src/real_time_control/RT_k_grid.F @@ -21,8 +21,7 @@ subroutine RT_k_grid(E,k,q) use R_lattice, ONLY:bz_samp,bz_samp_FineGd_alloc,bz_samp_duplicate_Fg,& & bz_samp_FineGd_default use parallel_m, ONLY:PAR_IND_Xk_ibz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_drivers/RT_driver.F b/src/real_time_drivers/RT_driver.F index 99cae62514..5971283a9f 100644 --- a/src/real_time_drivers/RT_driver.F +++ b/src/real_time_drivers/RT_driver.F @@ -48,8 +48,7 @@ subroutine RT_driver(E,X,k,q,Dip) use parallel_m, ONLY:PAR_IND_WF_b,PAR_IND_WF_k,PAR_IND_DIPk_ibz,PAR_IND_B_mat,PAR_COM_Xk_ibz_INDEX use units, ONLY:FS2AUT use RT_lifetimes, ONLY:l_initial_equilibrium - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_initialize/RT_Dephasing_Matrix.F b/src/real_time_initialize/RT_Dephasing_Matrix.F index bdc968d316..03188e6982 100644 --- a/src/real_time_initialize/RT_Dephasing_Matrix.F +++ b/src/real_time_initialize/RT_Dephasing_Matrix.F @@ -19,8 +19,7 @@ subroutine RT_Dephasing_Matrix(E) use real_time, ONLY:RT_Deph_Matrix,RT_is_statically_dephased,Phase_LifeTime,& & RAD_LifeTime,RT_bands,RT_INPUT_Deph_limits,RT_deph_cv_only, & & RT_deph_deg_thresh - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_initialize/RT_ELPH_initialize.F b/src/real_time_initialize/RT_ELPH_initialize.F index b2dd92efa6..d223c91426 100644 --- a/src/real_time_initialize/RT_ELPH_initialize.F +++ b/src/real_time_initialize/RT_ELPH_initialize.F @@ -17,8 +17,7 @@ subroutine RT_ELPH_initialize(E,k,q) use drivers, ONLY:l_elph_scatt,l_phel_scatt use R_lattice, ONLY:bz_samp use ELPH, ONLY:PH_freqs_sq,PH_W_debye,GKKP_ep_sq,GKKP_pe_sq,l_GKKP_expanded_DB_exists,elph_nQ - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 49a846b31f..e111578219 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -54,8 +54,7 @@ subroutine RT_initialize(E,k,q,Dip) use parser_m, ONLY:parser use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_COM_Xk_ibz_INDEX,PAR_G_k_range use parallel_int, ONLY:PP_redux_wait - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 5013c529de..86592f4747 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -54,8 +54,7 @@ subroutine RT_start_and_restart(E,k,q) use parallel_m, ONLY:PAR_G_k_range,PAR_IND_Xk_ibz use parallel_int, ONLY:PP_wait,PP_redux_wait use RT_output_m, ONLY:RT_desc,TIME_STEP_desc,Gr_desc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/real_time_propagation/RT_Integrator_init.F b/src/real_time_propagation/RT_Integrator_init.F index 756ddb2f68..09a7008f0f 100644 --- a/src/real_time_propagation/RT_Integrator_init.F +++ b/src/real_time_propagation/RT_Integrator_init.F @@ -20,8 +20,7 @@ subroutine RT_Integrator_init() & Integrator_name,integrator_exp_order, & & a_tableau,b_tableau,c_tableau,RWA_table, & & I1_matrix,Integrator_nsteps,RT_bands - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 59b742a734..66d38ba693 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -46,8 +46,7 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) use X_m, ONLY:X_mat,X_t ! ! I/O - ! - USE_MEMORY + use y_memory_alloc ! implicit none complex(SP),intent(inout) :: U_csx(nkibz,maxval(n_met_bands),fft_size) diff --git a/src/sc/OEP_ApplySigmaX.F b/src/sc/OEP_ApplySigmaX.F index 591830c560..d7dfb9dd7d 100644 --- a/src/sc/OEP_ApplySigmaX.F +++ b/src/sc/OEP_ApplySigmaX.F @@ -39,8 +39,7 @@ subroutine OEP_ApplySigmaX(E,k,q,U_x) use SC, ONLY:it_now ! ! I/O - ! - USE_MEMORY + use y_memory_alloc ! implicit none complex(SP),intent(out) :: U_x(nkibz,maxval(n_met_bands),fft_size) diff --git a/src/sc/OEP_app_inversion.F b/src/sc/OEP_app_inversion.F index 449f13a436..b5575a15e0 100644 --- a/src/sc/OEP_app_inversion.F +++ b/src/sc/OEP_app_inversion.F @@ -41,8 +41,7 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) use stderr, ONLY:intc ! ! I/O - ! - USE_MEMORY + use y_memory_alloc ! implicit none real(SP), intent(out):: Vkli(fft_size) diff --git a/src/sc/OEP_driver.F b/src/sc/OEP_driver.F index f823c4aa25..9965e9472d 100644 --- a/src/sc/OEP_driver.F +++ b/src/sc/OEP_driver.F @@ -37,8 +37,7 @@ subroutine OEP_driver(X,Xw,E,k,q,V_oep) use drivers, ONLY:l_oep_exact,l_oep_slater,l_sc_srpa use SC, ONLY:it_now,l_oep_iterative,l_oep_EWeight use frequency, ONLY:w_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none real(SP),intent(inout) :: V_oep(fft_size) diff --git a/src/sc/OEP_exact_inversion.F b/src/sc/OEP_exact_inversion.F index 736d25e5db..51d3700c42 100644 --- a/src/sc/OEP_exact_inversion.F +++ b/src/sc/OEP_exact_inversion.F @@ -35,8 +35,7 @@ subroutine OEP_exact_inversion(X,E,k,Voep,W_x) use wave_func, ONLY:WF ! ! I/O - ! - USE_MEMORY + use y_memory_alloc ! implicit none real(SP),intent(out) :: Voep(fft_size) diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index a23302762a..2f83ad6d4a 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -52,8 +52,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) use collision_ext, ONLY:COH_COLL_element,HXC_COLL_element,COLLISIONS_have_HARTREE use electrons, ONLY:Spin_magn use electric, ONLY:ELECTRIC_alloc,ELECTRIC_free,W_electric - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/sc/SC_start_and_restart.F b/src/sc/SC_start_and_restart.F index a7fa0104e2..8cc5035380 100644 --- a/src/sc/SC_start_and_restart.F +++ b/src/sc/SC_start_and_restart.F @@ -38,8 +38,7 @@ subroutine SC_start_and_restart(X,E,Xk,Dip) use FFT_m, ONLY:fft_size use collision_ext, ONLY:COLLISIONS_naming,COLLISIONS_have_HARTREE use descriptors, ONLY:IO_desc_reset - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/setup/G_shells_finder.F b/src/setup/G_shells_finder.F index 1fbf8eec47..3229a73a3f 100644 --- a/src/setup/G_shells_finder.F +++ b/src/setup/G_shells_finder.F @@ -30,8 +30,7 @@ subroutine G_shells_finder() use zeros, ONLY:G_iku_zero,G_mod_zero use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/setup/QP_state_table_setup.F b/src/setup/QP_state_table_setup.F index 81ecaf9cc6..3a3d977159 100644 --- a/src/setup/QP_state_table_setup.F +++ b/src/setup/QP_state_table_setup.F @@ -36,8 +36,7 @@ subroutine QP_state_table_setup(en) #if defined _SC use SC, ONLY:l_SC_diagonal #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(levels)::en diff --git a/src/setup/build_spin_sop.F b/src/setup/build_spin_sop.F index ed78d7d037..560f739f02 100644 --- a/src/setup/build_spin_sop.F +++ b/src/setup/build_spin_sop.F @@ -20,8 +20,7 @@ subroutine build_spin_sop() use D_lattice, ONLY:DEV_VAR(spin_sop) use electrons, ONLY:n_spinor use gpu_m, ONLY:have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/setup/eval_Mtot.F b/src/setup/eval_Mtot.F index 1747addfb6..e4f9c020c6 100644 --- a/src/setup/eval_Mtot.F +++ b/src/setup/eval_Mtot.F @@ -21,8 +21,7 @@ subroutine eval_Mtot(en,k,q) use interfaces, ONLY:WF_load,el_magnetization use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,& & PARALLEL_WF_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/setup/eval_minus_G.F b/src/setup/eval_minus_G.F index 1229452af7..1a4eaed025 100644 --- a/src/setup/eval_minus_G.F +++ b/src/setup/eval_minus_G.F @@ -20,8 +20,7 @@ subroutine eval_minus_G() use D_lattice, ONLY:inv_index use R_lattice, ONLY:ng_closed,g_rot,minus_G use R_lattice, ONLY:DEV_VAR(minus_G) - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/setup/setup.F b/src/setup/setup.F index 461a2e7041..aec94b9da7 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -48,8 +48,7 @@ subroutine setup(en,Xen,Ken,k,Xk) ! For I/O debug, see below !use IO_m, ONLY:netcdf_call #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/tddft/TDDFT_ALDA_G_space.F b/src/tddft/TDDFT_ALDA_G_space.F index 8a2c43e3b2..1568ec02cf 100644 --- a/src/tddft/TDDFT_ALDA_G_space.F +++ b/src/tddft/TDDFT_ALDA_G_space.F @@ -21,8 +21,7 @@ subroutine TDDFT_ALDA_G_space(E,k) use xc_functionals,ONLY:V_xc,F_xc,magn,XC_potential_driver use global_XC, ONLY:WF_xc_functional,WF_kind use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/tddft/TDDFT_BSK_2_FXC.F b/src/tddft/TDDFT_BSK_2_FXC.F index 96648bdea2..f995f71a75 100644 --- a/src/tddft/TDDFT_BSK_2_FXC.F +++ b/src/tddft/TDDFT_BSK_2_FXC.F @@ -26,7 +26,7 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) use IO_m, ONLY:OP_RD_CL,OP_RD,RD_CL,& & NONE,OP_WR_CL,REP,VERIFY use frequency, ONLY:w_samp - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/tddft/TDDFT_BSK_disk_2_FXC.F b/src/tddft/TDDFT_BSK_disk_2_FXC.F index 4bdbf8c4ed..ee745d4456 100644 --- a/src/tddft/TDDFT_BSK_disk_2_FXC.F +++ b/src/tddft/TDDFT_BSK_disk_2_FXC.F @@ -28,7 +28,7 @@ subroutine TDDFT_BSK_disk_2_FXC(iq,Xk,W,X_static) use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD,RD,NONE,RD_CL,VERIFY,OP_RD_CL,REP use TDDFT, ONLY:F_xc_gspace,FXC_n_g_corr,FXC_K_diagonal,io_BS_Fxc - USE_MEMORY + use y_memory_alloc ! implicit none type(bz_samp) ::Xk diff --git a/src/tddft/TDDFT_do_X_W_typs.F b/src/tddft/TDDFT_do_X_W_typs.F index 8f24aa5de2..35e1075265 100644 --- a/src/tddft/TDDFT_do_X_W_typs.F +++ b/src/tddft/TDDFT_do_X_W_typs.F @@ -24,8 +24,7 @@ subroutine TDDFT_do_X_W_typs(iq,X,wv) & FXC_LRC_alpha,FXC_LRC_beta,io_BS_Fxc use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,VERIFY,REP - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/PP_compute_becp.F b/src/wf_and_fft/PP_compute_becp.F index df8b337445..bfeadc0c8e 100644 --- a/src/wf_and_fft/PP_compute_becp.F +++ b/src/wf_and_fft/PP_compute_becp.F @@ -21,8 +21,7 @@ subroutine PP_compute_becp(becp, npwk, wf_nb, wf_c, wf_b_indx) use qe_pseudo_m, ONLY:nkb,vkb,bec_type,is_allocated_bec_type,& & allocate_bec_type,calbec use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/PP_rotate_becp.F b/src/wf_and_fft/PP_rotate_becp.F index d7047c480e..fc4d9e1fef 100644 --- a/src/wf_and_fft/PP_rotate_becp.F +++ b/src/wf_and_fft/PP_rotate_becp.F @@ -29,8 +29,7 @@ subroutine PP_rotate_becp(isc,ibec,obec) & irt,atom_pos,n_atoms_species,n_atomic_species use R_lattice, ONLY:k_pt,b use qe_pseudo_m, ONLY:bec_type,beccopy,d1,d2,d3,nh,upf,indv_ijkb0 - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/PP_scatterBamp_init.F b/src/wf_and_fft/PP_scatterBamp_init.F index a2cc8a1743..c657c46165 100644 --- a/src/wf_and_fft/PP_scatterBamp_init.F +++ b/src/wf_and_fft/PP_scatterBamp_init.F @@ -19,8 +19,7 @@ subroutine PP_scatterBamp_init(isc) use R_lattice, ONLY:q_pt,b,rl_sop use vec_operate, ONLY:c2a use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/PP_uspp_init.F b/src/wf_and_fft/PP_uspp_init.F index a455285e3b..5c01bba052 100644 --- a/src/wf_and_fft/PP_uspp_init.F +++ b/src/wf_and_fft/PP_uspp_init.F @@ -29,8 +29,7 @@ subroutine PP_uspp_init() use gvect, ONLY:qe_eigts1=>eigts1, qe_eigts2=>eigts2, qe_eigts3=>eigts3,& & qe_g=>g, qe_gg=>gg, qe_ngm=>ngm, qe_mill=>mill use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/PP_vloc_augment.F b/src/wf_and_fft/PP_vloc_augment.F index 637c494441..a3b7067804 100644 --- a/src/wf_and_fft/PP_vloc_augment.F +++ b/src/wf_and_fft/PP_vloc_augment.F @@ -22,8 +22,7 @@ subroutine PP_vloc_augment(QP_Vloc,Vloc,ik,ib,ibp) use FFT_m, ONLY:fftw_plan #endif use qe_pseudo_m, ONLY:qe_omega=>omega,qe_ngm=>ngm,becprod - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/WF_alloc.F b/src/wf_and_fft/WF_alloc.F index 5b757a8943..d0c15d9fbc 100644 --- a/src/wf_and_fft/WF_alloc.F +++ b/src/wf_and_fft/WF_alloc.F @@ -19,8 +19,7 @@ subroutine WF_alloc(WF,k_extrema_only) use parallel_int, ONLY:PARALLEL_live_message use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_memset_d - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/WF_derivative.F b/src/wf_and_fft/WF_derivative.F index fe71ae859c..1e21e66bc4 100644 --- a/src/wf_and_fft/WF_derivative.F +++ b/src/wf_and_fft/WF_derivative.F @@ -28,8 +28,7 @@ subroutine WF_derivative(derivative_bands,derivative_kpt,derivative_sppol,do_der #if defined _SC use SC, ONLY:SC_bands,found_SC_DB #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! Input variables diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index 2865a84803..4c4f576f14 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -16,8 +16,7 @@ subroutine WF_free(WF,keep_fft,keep_states_to_load) use pseudo, ONLY:pp_is_uspp,PP_uspp_free use gpu_m, ONLY:have_gpu use devxlib, ONLY:devxlib_mapped - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 764ef22a54..0faa50105b 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -60,8 +60,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load use gpu_m, ONLY:have_gpu, gpu_devsync, gpu_getstat use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memcpy_d2h,devxlib_memcpy_d2d,& devxlib_allocated,devxlib_memset_d - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/WF_shift_kpoint.F b/src/wf_and_fft/WF_shift_kpoint.F index 3d253d6bf1..bfe5b81f65 100644 --- a/src/wf_and_fft/WF_shift_kpoint.F +++ b/src/wf_and_fft/WF_shift_kpoint.F @@ -20,8 +20,7 @@ subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_ use wave_func, ONLY: wf_ng_1st_BZ,wf_ng_overlaps use devxlib, ONLY: devxlib_memcpy_d2d, devxlib_memset_d use gpu_m, ONLY: have_gpu - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/eval_GradOperator.F b/src/wf_and_fft/eval_GradOperator.F index d23783ee56..d19c4439c2 100644 --- a/src/wf_and_fft/eval_GradOperator.F +++ b/src/wf_and_fft/eval_GradOperator.F @@ -27,7 +27,7 @@ subroutine eval_GradOperator() use FFT_m, ONLY:fft_size,fft_dim,fftw_plan,fft_g_table use D_lattice, ONLY:R_m_R,Grad_R use R_lattice, ONLY:ng_vec,g_vec - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/eval_R_minus_R.F b/src/wf_and_fft/eval_R_minus_R.F index 37d7c35e8f..cc0cd57f34 100644 --- a/src/wf_and_fft/eval_R_minus_R.F +++ b/src/wf_and_fft/eval_R_minus_R.F @@ -15,7 +15,7 @@ subroutine eval_R_minus_R() ! use FFT_m, ONLY:fft_size,fft_dim,modx use D_lattice, ONLY:R_m_R - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/fft_3d_cuda.F b/src/wf_and_fft/fft_3d_cuda.F index a061f69a5c..150bdb3a62 100644 --- a/src/wf_and_fft/fft_3d_cuda.F +++ b/src/wf_and_fft/fft_3d_cuda.F @@ -45,8 +45,7 @@ subroutine fft_3d_cuda(c_d,n,fft_sign,cufft_plan) use openacc #endif use gpu_m, only: gpu_devsync - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/fft_3d_hip.F b/src/wf_and_fft/fft_3d_hip.F index ce8fcfa167..c3cf58c3b1 100644 --- a/src/wf_and_fft/fft_3d_hip.F +++ b/src/wf_and_fft/fft_3d_hip.F @@ -40,8 +40,7 @@ subroutine fft_3d_hip(c_d,n,fft_sign,hipfft_plan) use gpu_m, only: gpu_devsync use devxlib_environment use hipfft_m - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/fft_free.F b/src/wf_and_fft/fft_free.F index 18ca6b5b48..ab200c389e 100644 --- a/src/wf_and_fft/fft_free.F +++ b/src/wf_and_fft/fft_free.F @@ -33,8 +33,7 @@ subroutine fft_free() use FFT_m, ONLY:mklgpu_desc # endif #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index e5d90cb60b..353b896dcf 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -33,8 +33,7 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) use mkl_dfti_omp_offload use FFT_m, ONLY:mklgpu_desc #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/wf_and_fft/scatter_Gamp.F b/src/wf_and_fft/scatter_Gamp.F index 384a440b18..388a8d81a8 100644 --- a/src/wf_and_fft/scatter_Gamp.F +++ b/src/wf_and_fft/scatter_Gamp.F @@ -29,8 +29,7 @@ subroutine DEV_SUB(scatter_Gamp)(isc,mode) use devxlib, ONLY:devxlib_mapped use gpu_m use timing_m - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 3bb00817ca..44a19f0772 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -41,8 +41,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) & xc_f03_gga_exc,xc_f03_gga_vxc,xc_f03_gga_fxc use interfaces, ONLY:el_density_and_current,el_magnetization use pseudo, ONLY:pp_rho_nlcc,pp_has_nlcc,PP_nlcc_free - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/xc_functionals/XC_nlcc_setup.F b/src/xc_functionals/XC_nlcc_setup.F index 02ef46976a..fcf0ee5427 100644 --- a/src/xc_functionals/XC_nlcc_setup.F +++ b/src/xc_functionals/XC_nlcc_setup.F @@ -27,7 +27,7 @@ subroutine XC_nlcc_setup() use parser_m, ONLY:parser use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,REP - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 2234852b0d..a27b6bb911 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -64,8 +64,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) use RT_occupations,ONLY:RT_el_occ use real_time, ONLY:RTibz #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/YPPmodules/mod_YPP_ELPH.F b/ypp/YPPmodules/mod_YPP_ELPH.F index fa2bbefe8f..348cd5790c 100644 --- a/ypp/YPPmodules/mod_YPP_ELPH.F +++ b/ypp/YPPmodules/mod_YPP_ELPH.F @@ -14,8 +14,7 @@ module YPP_ELPH use pars, ONLY:SP,schlen,DP use D_lattice, ONLY:n_atoms use R_lattice, ONLY:nkbz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/YPPmodules/mod_YPP_real_time.F b/ypp/YPPmodules/mod_YPP_real_time.F index 62ae412d5b..3dbecc93a5 100644 --- a/ypp/YPPmodules/mod_YPP_real_time.F +++ b/ypp/YPPmodules/mod_YPP_real_time.F @@ -13,8 +13,7 @@ module YPP_real_time ! use units, ONLY:HA2EV use pars, ONLY:schlen,SP,DP,rZERO - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/bits/WANNIER_driver.F b/ypp/bits/WANNIER_driver.F index 3670aaae12..c90a39979f 100644 --- a/ypp/bits/WANNIER_driver.F +++ b/ypp/bits/WANNIER_driver.F @@ -26,7 +26,7 @@ subroutine WANNIER_driver(k,E) use QP_m, ONLY:QP_t,QP_reset use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,LOG,DUMP - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -90,8 +90,7 @@ subroutine scan_file_to(keyword,found,iun_nnkp) !----------------------------------------------------------------------- !---Subroutine from Wannier90, GPL license------------------------------ !----------------------------------------------------------------------- - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index fa2cf646b4..a923946ef4 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -28,8 +28,7 @@ subroutine WF_map_perturbative_SOC(kpt,En) use electrons, ONLY:levels,n_sp_pol,n_spinor,n_spin use LIVE_t, ONLY:live_timing use interfaces, ONLY:io_DB1_selective_scan - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/dipoles/DIPOLE_ypp_driver.F b/ypp/dipoles/DIPOLE_ypp_driver.F index 2152bf8158..8cda2a531c 100644 --- a/ypp/dipoles/DIPOLE_ypp_driver.F +++ b/ypp/dipoles/DIPOLE_ypp_driver.F @@ -30,8 +30,7 @@ subroutine DIPOLE_ypp_driver(k,E,q) use YPP_interfaces, ONLY:PROJECTION_setup,PROJECTION_plot use parser_m, ONLY:parser use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do,GRID_k,INTERP_obj - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/el-ph/ELPH_atomic_amplitude.F b/ypp/el-ph/ELPH_atomic_amplitude.F index 52a627e109..64b4598a8f 100644 --- a/ypp/el-ph/ELPH_atomic_amplitude.F +++ b/ypp/el-ph/ELPH_atomic_amplitude.F @@ -26,8 +26,7 @@ subroutine ELPH_atomic_amplitude(q) use ALLOC, ONLY:ELPH_alloc use linear_algebra, ONLY:DIAGO,USE_LK use stderr, ONLY:intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(bz_samp)::q diff --git a/ypp/el-ph/ELPH_databases.F b/ypp/el-ph/ELPH_databases.F index d6e2d59246..a6f91bc0d6 100644 --- a/ypp/el-ph/ELPH_databases.F +++ b/ypp/el-ph/ELPH_databases.F @@ -31,8 +31,7 @@ subroutine ELPH_databases(k,E,q) use IO_int, ONLY:io_control use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL use parallel_int, ONLY:PARALLEL_global_indexes - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/el-ph/ELPH_double_grid.F b/ypp/el-ph/ELPH_double_grid.F index 33737c9584..40c2a98e88 100644 --- a/ypp/el-ph/ELPH_double_grid.F +++ b/ypp/el-ph/ELPH_double_grid.F @@ -23,8 +23,7 @@ subroutine ELPH_double_grid(k,E,q) use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,REP,DUMP,OP_WR_CL use parser_m, ONLY:parser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/el-ph/ELPH_eliashberg_dos.F b/ypp/el-ph/ELPH_eliashberg_dos.F index 25d748286b..5f2348027b 100644 --- a/ypp/el-ph/ELPH_eliashberg_dos.F +++ b/ypp/el-ph/ELPH_eliashberg_dos.F @@ -29,8 +29,7 @@ subroutine ELPH_eliashberg_dos(k,en,q) use parallel_m, ONLY:PP_indexes,myid use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use functions, ONLY:Fermi_fnc_derivative - ! - USE_MEMORY + use y_memory_alloc ! implicit none type(levels) ::en diff --git a/ypp/el-ph/ELPH_excitonic_gkkp.F b/ypp/el-ph/ELPH_excitonic_gkkp.F index 3b1674c430..9e47cc8fb7 100644 --- a/ypp/el-ph/ELPH_excitonic_gkkp.F +++ b/ypp/el-ph/ELPH_excitonic_gkkp.F @@ -27,8 +27,7 @@ subroutine ELPH_excitonic_gkkp(Xk) use com, ONLY:msg,of_open_close use stderr, ONLY:intc use YPPm, ONLY:EXCITONS_user_indexes,EXCITONS_n_user_states - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/el-ph/ELPH_general_gFsq.F b/ypp/el-ph/ELPH_general_gFsq.F index 4d6e9b7b47..b540836b7c 100644 --- a/ypp/el-ph/ELPH_general_gFsq.F +++ b/ypp/el-ph/ELPH_general_gFsq.F @@ -33,8 +33,7 @@ subroutine ELPH_general_gFsq(k,en,Xk,Xen,q,BS_E_degs) use parallel_m, ONLY:PP_indexes,PP_indexes_reset,myid,PAR_nQ_bz use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use functions, ONLY:Fermi_fnc_derivative - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/el-ph/ELPH_plot_gkkp.F b/ypp/el-ph/ELPH_plot_gkkp.F index c52ed987ff..3905a612ec 100644 --- a/ypp/el-ph/ELPH_plot_gkkp.F +++ b/ypp/el-ph/ELPH_plot_gkkp.F @@ -23,8 +23,7 @@ subroutine ELPH_plot_gkkp(k,E,q) use IO_m, ONLY:REP,deliver_IO_error_message,DUMP,manage_action,RD_CL_IF_END,OP_RD use stderr, ONLY:intc use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/el-ph/Eliashberg_Dos_Func.F b/ypp/el-ph/Eliashberg_Dos_Func.F index 1c20218438..65dd34fff2 100644 --- a/ypp/el-ph/Eliashberg_Dos_Func.F +++ b/ypp/el-ph/Eliashberg_Dos_Func.F @@ -16,8 +16,7 @@ real(SP) function Eliashberg_Dos_Func(iq,im,ph_en, ph_broad, PH_E, q) use R_lattice, ONLY:bz_samp use functions, ONLY:Fermi_fnc_derivative use ELPH, ONLY:PH_freqs_sq,use_PH_DbGd - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_WFs.F b/ypp/electrons/electrons_WFs.F index 17f6ec3f3b..4b98eb7740 100644 --- a/ypp/electrons/electrons_WFs.F +++ b/ypp/electrons/electrons_WFs.F @@ -38,8 +38,7 @@ subroutine electrons_WFs(Xen) use com, ONLY:jobstr use R_lattice, ONLY:nkibz #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_angular_momentum.F b/ypp/electrons/electrons_angular_momentum.F index 6d66d868aa..cbc50f65eb 100644 --- a/ypp/electrons/electrons_angular_momentum.F +++ b/ypp/electrons/electrons_angular_momentum.F @@ -32,8 +32,7 @@ subroutine electrons_angular_momentum(nkpt_angular,nband_angular) use LIVE_t, ONLY:live_timing use units, ONLY:SPEED_OF_LIGHT use com, ONLY:msg,of_open_close - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_bands.F b/ypp/electrons/electrons_bands.F index f73d27053d..c48be0f0c2 100644 --- a/ypp/electrons/electrons_bands.F +++ b/ypp/electrons/electrons_bands.F @@ -36,8 +36,7 @@ subroutine electrons_bands(Xk,Xen) #if defined _YPP_SC use SC, ONLY:SC_neq_kind #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_dos.F b/ypp/electrons/electrons_dos.F index 7e3d982215..2b982b2690 100644 --- a/ypp/electrons/electrons_dos.F +++ b/ypp/electrons/electrons_dos.F @@ -25,8 +25,7 @@ subroutine electrons_dos(Xk,Xen) use QP_CTL_m, ONLY:QP_apply use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do,GRID_k,INTERP_obj use stderr, ONLY:intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_driver.F b/ypp/electrons/electrons_driver.F index fe9c5e36e0..b1a192705e 100644 --- a/ypp/electrons/electrons_driver.F +++ b/ypp/electrons/electrons_driver.F @@ -25,8 +25,7 @@ subroutine electrons_driver(Xk,Xen,Xq) use interfaces, ONLY:WF_load,WF_free use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index use interpolate, ONLY:INTERP_mode - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_magnetization.F b/ypp/electrons/electrons_magnetization.F index 0b23f1005f..788a226b04 100644 --- a/ypp/electrons/electrons_magnetization.F +++ b/ypp/electrons/electrons_magnetization.F @@ -21,8 +21,7 @@ subroutine electrons_magnetization(Xk,Xen) & use_gnuplot,use_cube,plot_title,l_density,mag_dir use com, ONLY:msg,of_open_close use xc_functionals, ONLY:magn - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/electrons/electrons_position.F b/ypp/electrons/electrons_position.F index a713282336..35c765fb3b 100644 --- a/ypp/electrons/electrons_position.F +++ b/ypp/electrons/electrons_position.F @@ -23,8 +23,7 @@ subroutine electrons_position(nkpt_pos,nband_pos,power,what,format) use wrapper, ONLY:Vstar_dot_V use stderr, ONLY:intc use interfaces, ONLY:WF_load,WF_free - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 1c5d437caa..c2fdbde762 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -33,8 +33,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use LIVE_t, ONLY:live_timing use wrapper, ONLY:V_dot_V use vec_operate, ONLY:c2a - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -310,7 +309,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) subroutine expand_grid() ! use FFT_m, ONLY:fft_size - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_bands.F b/ypp/excitons/excitons_bands.F index 025d641656..35077368df 100644 --- a/ypp/excitons/excitons_bands.F +++ b/ypp/excitons/excitons_bands.F @@ -29,8 +29,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_driver.F b/ypp/excitons/excitons_driver.F index 97531103d5..226d0c426f 100644 --- a/ypp/excitons/excitons_driver.F +++ b/ypp/excitons/excitons_driver.F @@ -25,8 +25,7 @@ subroutine excitons_driver(k,Xk,en,Xen,q) #if defined _YPP_RT use YPP_real_time, ONLY:l_RT_abs #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 192d3d3172..3d6f0e899b 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -21,8 +21,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,repor use YPPm, ONLY:BS_E,EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out,K_transform use com, ONLY:msg use stderr, ONLY:intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_ph_ass_dos.F b/ypp/excitons/excitons_ph_ass_dos.F index 906ab33e40..60d9ffd4f5 100644 --- a/ypp/excitons/excitons_ph_ass_dos.F +++ b/ypp/excitons/excitons_ph_ass_dos.F @@ -28,8 +28,7 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) use ELPH, ONLY:FAN_deltaE_treshold,elph_branches use functions, ONLY:Lorentzian_func,boltzman_f,bose_f use stderr, ONLY:STRING_same,intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index 828a54a2be..2d3fd32ca1 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -22,8 +22,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) use BS_solvers, ONLY:BSS_eh_table,BSS_write_eig_2_db,io_BSS_diago,BS_mat,BSS_n_eig use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BSqpts use YPPm, ONLY:BS_R_left,BS_R_right,BS_E,BS_E_SOC_corr,BS_R_PL,BS_R_kerr,Xbsk - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/excitons/excitons_spin.F b/ypp/excitons/excitons_spin.F index 9f49497f9e..1cb5bc4895 100644 --- a/ypp/excitons/excitons_spin.F +++ b/ypp/excitons/excitons_spin.F @@ -26,8 +26,7 @@ subroutine excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) & EXCITON_kin,excitons_degeneracy_average,EXCITON_spin,BSiq use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 8044fef441..518354ceea 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -63,8 +63,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) use com, ONLY:of_yaml_IDs use yaml_output, ONLY:yaml_close_stream #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/interface/QP_DBs_initialize.F b/ypp/interface/QP_DBs_initialize.F index 5836777407..4853fd1e35 100644 --- a/ypp/interface/QP_DBs_initialize.F +++ b/ypp/interface/QP_DBs_initialize.F @@ -21,8 +21,7 @@ subroutine QP_DBs_initialize() use units, ONLY:HA2EV use YPPm, ONLY:l_QP_DBs_create_and_modify,n_QP_dbs,& & QP_user_corrections,QP_db_input_control,l_QP_DBs_manipulate - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_circuit_driver.F b/ypp/k-points/k_circuit_driver.F index 34054ec65b..a4e2e79d8e 100644 --- a/ypp/k-points/k_circuit_driver.F +++ b/ypp/k-points/k_circuit_driver.F @@ -22,8 +22,7 @@ subroutine k_circuit_driver(PATH,n_points) & CIRCUIT_E_DB_path,CIRCUIT_E_db,USER_k,CIRCUIT_k,& & CIRCUIT_made_of_SPECIAL_k,BANDS_from_db,SPECIAL_k,& & BANDS_path,CIRCUIT_k_label,SPECIAL_k_label - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_circuit_made_of_special_points.F b/ypp/k-points/k_circuit_made_of_special_points.F index 78f03cd13a..272c60e959 100644 --- a/ypp/k-points/k_circuit_made_of_special_points.F +++ b/ypp/k-points/k_circuit_made_of_special_points.F @@ -20,8 +20,7 @@ subroutine k_circuit_made_of_special_points( PATH, n_points ) & SPECIAL_k,n_SPECIAL_k_MAX,CIRCUIT_k,SPECIAL_k_label,& & n_SPECIAL_k_MAX,CIRCUIT_k_label,CIRCUIT_k_norm,CIRCUIT_made_of_SPECIAL_k use stderr, ONLY:STRING_split,STRING_same,intc - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_circuit_made_of_user_points.F b/ypp/k-points/k_circuit_made_of_user_points.F index 66b957a852..e48787a7fc 100644 --- a/ypp/k-points/k_circuit_made_of_user_points.F +++ b/ypp/k-points/k_circuit_made_of_user_points.F @@ -16,8 +16,7 @@ subroutine k_circuit_made_of_user_points( ) use vec_operate, ONLY:c2a,v_norm use parser_m, ONLY:PARSER_array use YPPm, ONLY:BANDS_steps,USER_k,CIRCUIT_k,coo_in,coo_out,K_transform,PROJECT_mode - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_find_border_and_merge.F b/ypp/k-points/k_find_border_and_merge.F index 2e5e1b9e43..97050e7264 100644 --- a/ypp/k-points/k_find_border_and_merge.F +++ b/ypp/k-points/k_find_border_and_merge.F @@ -15,8 +15,7 @@ subroutine k_find_border_and_merge(FineGd_E,FineGd_k,n_FineGd_DBs,FineGd_io_E,Fi use electrons, ONLY:levels,E_reset use stderr, ONLY:intc use com, ONLY:msg - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_grids.F b/ypp/k-points/k_grids.F index 7fc4ab9292..86548bb1fe 100644 --- a/ypp/k-points/k_grids.F +++ b/ypp/k-points/k_grids.F @@ -26,8 +26,7 @@ subroutine k_grids(en,k,Xk,q) use LIVE_t, ONLY:live_timing_is_on use zeros, ONLY:k_iku_zero use YPP_interfaces, ONLY:k_special - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_map_fine_to_coarse.F b/ypp/k-points/k_map_fine_to_coarse.F index cab188d79e..fc6896dc9b 100644 --- a/ypp/k-points/k_map_fine_to_coarse.F +++ b/ypp/k-points/k_map_fine_to_coarse.F @@ -16,8 +16,7 @@ subroutine k_map_fine_to_coarse(zone,Xk,FG,FineGd_k,Xen) use electrons, ONLY:levels use R_lattice, ONLY:bz_samp,bz_fine_grid,bz_samp_FineGd_alloc use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_map_fine_to_coarse_driver.F b/ypp/k-points/k_map_fine_to_coarse_driver.F index 79d9891fb7..0f8f618fe1 100644 --- a/ypp/k-points/k_map_fine_to_coarse_driver.F +++ b/ypp/k-points/k_map_fine_to_coarse_driver.F @@ -19,8 +19,7 @@ subroutine k_map_fine_to_coarse_driver(Xk,Xen) use electrons, ONLY:levels,FineGd_E_components_reset use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR_CL - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_map_fine_to_coarse_engine.F b/ypp/k-points/k_map_fine_to_coarse_engine.F index 496a1bcf21..ab0d26679b 100644 --- a/ypp/k-points/k_map_fine_to_coarse_engine.F +++ b/ypp/k-points/k_map_fine_to_coarse_engine.F @@ -18,8 +18,7 @@ subroutine k_map_fine_to_coarse_engine(zone,pts_fg,N_pts_fg,pts_cg,N_pts_cg,MAP) use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use com, ONLY:msg - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_map_fine_to_coarse_init.F b/ypp/k-points/k_map_fine_to_coarse_init.F index 370494f692..cffafd1b3e 100644 --- a/ypp/k-points/k_map_fine_to_coarse_init.F +++ b/ypp/k-points/k_map_fine_to_coarse_init.F @@ -29,8 +29,7 @@ subroutine k_map_fine_to_coarse_init(Xk,Xen,FineGd_k,FineGd_is_expanded,PH_grid) use stderr, ONLY:STRING_same use vec_operate, ONLY:c2a,v_is_zero #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_map_fine_to_coarse_reduce.F b/ypp/k-points/k_map_fine_to_coarse_reduce.F index 1e423b2d4e..58c80d3eb6 100644 --- a/ypp/k-points/k_map_fine_to_coarse_reduce.F +++ b/ypp/k-points/k_map_fine_to_coarse_reduce.F @@ -16,8 +16,7 @@ logical function k_map_fine_to_coarse_reduce(FineGd_k) use vec_operate, ONLY:c2a,rlu_v_is_zero use R_lattice, ONLY:bz_samp use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_random.F b/ypp/k-points/k_random.F index 34c1909df8..592b2301a9 100644 --- a/ypp/k-points/k_random.F +++ b/ypp/k-points/k_random.F @@ -21,8 +21,7 @@ subroutine k_random(Xk,No_Weight) use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use parser_m, ONLY:parser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/k-points/k_special.F b/ypp/k-points/k_special.F index 79d229e166..1d354ed646 100644 --- a/ypp/k-points/k_special.F +++ b/ypp/k-points/k_special.F @@ -30,8 +30,7 @@ subroutine k_special(LIST_only) use vec_operate, ONLY:c2a use YPPm, ONLY:K_transform,SPECIAL_k,n_SPECIAL_k_MAX,SPECIAL_k_label,coo_out use LIVE_t, ONLY:live_timing_is_on - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/plotting/PROJECTION_plot.F b/ypp/plotting/PROJECTION_plot.F index abbf069583..295da90a7d 100644 --- a/ypp/plotting/PROJECTION_plot.F +++ b/ypp/plotting/PROJECTION_plot.F @@ -23,8 +23,7 @@ subroutine PROJECTION_plot( what, N, Ns, bands, W, TIME, OBS_K, OBS_B) & l_PROJECT_plane,PROJECT_plane_X,PROJECT_plane_Y,PROJECT_steps use interpolate, ONLY:GRID_k use stderr, ONLY:intc,real2ch,STRING_remove - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/plotting/plot_gnuplot.F b/ypp/plotting/plot_gnuplot.F index e3be7d91c2..ced3d42582 100644 --- a/ypp/plotting/plot_gnuplot.F +++ b/ypp/plotting/plot_gnuplot.F @@ -18,8 +18,7 @@ subroutine plot_gnuplot(eval_only) & plot_title,output_string,l_wavefunction,l_current,use_xcrysden,& & plot_is_1D,plot_is_2D,l_free_hole,l_average_eh use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none logical :: eval_only diff --git a/ypp/plotting/plot_interpolated_values.F b/ypp/plotting/plot_interpolated_values.F index 3d9ca03d9a..954fe5f505 100644 --- a/ypp/plotting/plot_interpolated_values.F +++ b/ypp/plotting/plot_interpolated_values.F @@ -26,8 +26,7 @@ subroutine plot_interpolated_values(Xk,Xen,Ef,LOCAL_k,IDs,dims,nquantities,nfile #if defined _YPP_RT use YPP_real_time, ONLY:GreenF_T_and_W #endif - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -298,7 +297,7 @@ subroutine define_grid_map(Xk,Local_k,Grid_to_path_map,n_points_max) use pars, ONLY:SP use R_lattice, ONLY:bz_samp use vec_operate, ONLY:v_norm,iku_v_norm - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/plotting/plot_xcrysden.F b/ypp/plotting/plot_xcrysden.F index e44823a2ad..f57bc06c55 100644 --- a/ypp/plotting/plot_xcrysden.F +++ b/ypp/plotting/plot_xcrysden.F @@ -19,8 +19,7 @@ subroutine plot_xcrysden() & l_norm_to_one,WF_multiplier,l_exc_wf,plot_title,output_string,plot_is_2D use D_lattice, ONLY:n_atomic_species,n_atoms_species,a,atom_pos,Z_species,n_atoms use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/qp/QP_DB_expand.F b/ypp/qp/QP_DB_expand.F index 388addde69..85a85ede33 100644 --- a/ypp/qp/QP_DB_expand.F +++ b/ypp/qp/QP_DB_expand.F @@ -17,8 +17,7 @@ subroutine QP_DB_expand( k ) use IO_int, ONLY:io_control use IO_m, ONLY:OP_WR_CL,DUMP,OP_RD_CL,LOG use QP_m, ONLY:QP_t,QP_reset - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/qp/QP_DBs_create_and_modify.F b/ypp/qp/QP_DBs_create_and_modify.F index 1135ed5464..683204d2cd 100644 --- a/ypp/qp/QP_DBs_create_and_modify.F +++ b/ypp/qp/QP_DBs_create_and_modify.F @@ -19,8 +19,7 @@ subroutine QP_DBs_create_and_modify(en,k) use QP_m, ONLY:QP_t,QP_reset,QP_state,QP_nb,QP_nk,QP_n_states,QP_alloc use R_lattice, ONLY:bz_samp use YPPm, ONLY:QP_user_corrections - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/qp/QP_DBs_manipulate.F b/ypp/qp/QP_DBs_manipulate.F index ad09c57447..0cbe963015 100644 --- a/ypp/qp/QP_DBs_manipulate.F +++ b/ypp/qp/QP_DBs_manipulate.F @@ -20,8 +20,7 @@ subroutine QP_DBs_manipulate( E ) use QP_m, ONLY:QP_t,QP_reset,QP_solver,QP_table,QP_n_states use interfaces, ONLY:QP_DBs_merge,DESC_write use electrons, ONLY:levels,n_sp_pol - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/NL_exc_driver.F b/ypp/real_time/NL_exc_driver.F index fa85d22192..f48d845c1d 100644 --- a/ypp/real_time/NL_exc_driver.F +++ b/ypp/real_time/NL_exc_driver.F @@ -13,8 +13,7 @@ subroutine NL_exc_driver(en,k) ! use R_lattice, ONLY:bz_samp use electrons, ONLY:levels - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index 8a426ad8e0..9237684d43 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -26,8 +26,7 @@ subroutine NL_ypp_driver(en,k) use stderr, ONLY:intc,real2ch use RT_control, ONLY:OBS_RT_IO_t use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_1D_Fourier_setup.F b/ypp/real_time/RT_1D_Fourier_setup.F index faf0a8683e..2fffff7318 100644 --- a/ypp/real_time/RT_1D_Fourier_setup.F +++ b/ypp/real_time/RT_1D_Fourier_setup.F @@ -13,8 +13,7 @@ subroutine RT_1D_Fourier_setup(FT,RT,N) ! use YPP_real_time, ONLY:OBS_el,Use_FFT,RT_ctl use pars, ONLY:SP,cZERO_DP,cZERO - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_G_two_times_build.F b/ypp/real_time/RT_G_two_times_build.F index c553ccd42f..3ff2d3101d 100644 --- a/ypp/real_time/RT_G_two_times_build.F +++ b/ypp/real_time/RT_G_two_times_build.F @@ -30,8 +30,7 @@ subroutine RT_G_two_times_build(en,kpt,qpt) & RT_dyn_step,G_MEM_steps,Ho_plus_Sigma,H_EQ,I1_matrix,RTibz use YPP_real_time, ONLY:RT_time,RT_conf,GreenF_T_and_W,Rho_deph use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_G_two_times_interp_and_plot.F b/ypp/real_time/RT_G_two_times_interp_and_plot.F index ce61450d24..503ed91e9d 100644 --- a/ypp/real_time/RT_G_two_times_interp_and_plot.F +++ b/ypp/real_time/RT_G_two_times_interp_and_plot.F @@ -21,8 +21,7 @@ subroutine RT_G_two_times_interp_and_plot(en,kpt,qpt) use R_lattice, ONLY:bz_samp use D_lattice, ONLY:lattice use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_OBSERVABLES_IO.F b/ypp/real_time/RT_OBSERVABLES_IO.F index a1f552a4a8..ead5ceb4df 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO.F +++ b/ypp/real_time/RT_OBSERVABLES_IO.F @@ -20,8 +20,7 @@ subroutine RT_OBSERVABLES_IO(what,Curr,Pol,IO_error,first_sec_only,G_lesser_only use RT_control, ONLY:RT_control_alloc,RT_control_free,J_cache,P_cache,CACHE_OBS_steps,CACHE_OBS_steps_now use real_time, ONLY:NE_steps,NE_i_time,G_lesser,G_lesser_reference,RT_bands,RT_dyn_step,RT_step use fields, ONLY:Efield,n_ext_fields,Efield_strength - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F index 7f95f80835..de5ff8640b 100644 --- a/ypp/real_time/RT_OBSERVABLES_damp_and_write.F +++ b/ypp/real_time/RT_OBSERVABLES_damp_and_write.F @@ -18,8 +18,7 @@ subroutine RT_OBSERVABLES_damp_and_write(OBS,RT,IO_skip) use RT_control, ONLY:RT_output use fields, ONLY:A_ext use real_time, ONLY:RT_ind_J,RT_P - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_Polarization.F b/ypp/real_time/RT_Polarization.F index 3be8105e24..cb4fa6c96b 100644 --- a/ypp/real_time/RT_Polarization.F +++ b/ypp/real_time/RT_Polarization.F @@ -28,8 +28,7 @@ subroutine RT_Polarization(en,k,q) use parallel_int, ONLY:PP_redux_wait use DIPOLES, ONLY:DIP_iR use functions, ONLY:Fermi_fnc_derivative - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_TRabs_driver.F b/ypp/real_time/RT_TRabs_driver.F index 8f04ae434a..b0d1c3f5b9 100644 --- a/ypp/real_time/RT_TRabs_driver.F +++ b/ypp/real_time/RT_TRabs_driver.F @@ -32,8 +32,7 @@ subroutine RT_transient_absorption(Xen,Xk,Xq) use stderr, ONLY:STRING_match,STRING_same,STRING_remove use com, ONLY:msg use interpolate, ONLY:INTERPOLATE_is_quiet - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_TRabs_output.F b/ypp/real_time/RT_TRabs_output.F index 234d488041..91538c8323 100644 --- a/ypp/real_time/RT_TRabs_output.F +++ b/ypp/real_time/RT_TRabs_output.F @@ -22,8 +22,7 @@ subroutine RT_TRabs_output(what,how,ofile,N_files,W,TIME) use BS, ONLY:BS_K_dim use BS_solvers, ONLY:BSS_desc use stderr, ONLY:STRING_match,set_real_printed_length - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_TRabs_residuals.F b/ypp/real_time/RT_TRabs_residuals.F index 6bb0d3c55b..ff1ff87a42 100644 --- a/ypp/real_time/RT_TRabs_residuals.F +++ b/ypp/real_time/RT_TRabs_residuals.F @@ -21,8 +21,7 @@ subroutine RT_TRabs_residuals(what,N_trans,N_dirs,DIP_dir,Xen,Xk,nb,l_EQ) use YPPm, ONLY:BS_E use real_time, ONLY:RT_bands use parallel_m, ONLY:PAR_IND_DIPk_ibz,PAR_IND_VAL_BANDS_DIP,PAR_IND_CON_BANDS_DIP - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 108e6d2a98..f49ffb211b 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -28,8 +28,7 @@ subroutine RT_X_LRR_real_field(en) use com, ONLY:of_open_close,msg use functions, ONLY:theta_function use parser_m, ONLY:parser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_X_effective.F b/ypp/real_time/RT_X_effective.F index 5d61a6d132..368da1bf94 100644 --- a/ypp/real_time/RT_X_effective.F +++ b/ypp/real_time/RT_X_effective.F @@ -26,8 +26,7 @@ subroutine RT_X_effective(en) use vec_operate, ONLY:sort use LIVE_t, ONLY:live_timing use stderr, ONLY:intc,real2ch,STRING_split - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_X_inversion.F b/ypp/real_time/RT_X_inversion.F index 9e11003430..b2f1c84998 100644 --- a/ypp/real_time/RT_X_inversion.F +++ b/ypp/real_time/RT_X_inversion.F @@ -19,7 +19,7 @@ subroutine RT_X_inversion(RT_P_Probe,Susceptibility,Harmonic_Frequency,X_effecti use units, ONLY:AUT2FS use com, ONLY:msg use LIVE_t, ONLY:live_timing - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_X_qssin.F b/ypp/real_time/RT_X_qssin.F index 921b1384f4..53a15a1c35 100644 --- a/ypp/real_time/RT_X_qssin.F +++ b/ypp/real_time/RT_X_qssin.F @@ -20,8 +20,7 @@ subroutine RT_X_qssin use fields_int, ONLY:small_a use functions, ONLY:theta_function use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index ddc6ea9837..26bec762d7 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -22,8 +22,7 @@ subroutine RT_X_response(en,k,q) use electrons, ONLY:levels use fields, ONLY:Efield use parser_m, ONLY:parser - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_coefficients_Fourier.F b/ypp/real_time/RT_coefficients_Fourier.F index 7a211c83b1..d2d28a7290 100644 --- a/ypp/real_time/RT_coefficients_Fourier.F +++ b/ypp/real_time/RT_coefficients_Fourier.F @@ -17,7 +17,7 @@ subroutine RT_coefficients_Fourier(nt,P,nw,W,X,X_err,deltaW) use YPP_real_time, ONLY:i_t_start,RT_conf use fields, ONLY:EtoT use real_time, ONLY:RT_step - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_coefficients_Inversion.F b/ypp/real_time/RT_coefficients_Inversion.F index 6e1321c2e0..415e7a5d56 100644 --- a/ypp/real_time/RT_coefficients_Inversion.F +++ b/ypp/real_time/RT_coefficients_Inversion.F @@ -26,7 +26,7 @@ subroutine RT_coefficients_Inversion(NW,NX,P,X,W,T_period) use fields, ONLY:Efield use interfaces, ONLY:LINEAR_ALGEBRA_driver use linear_algebra, ONLY:INV - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_components_energy_plot.F b/ypp/real_time/RT_components_energy_plot.F index 60ecbbc291..662474bc6f 100644 --- a/ypp/real_time/RT_components_energy_plot.F +++ b/ypp/real_time/RT_components_energy_plot.F @@ -28,8 +28,7 @@ subroutine RT_components_energy_plot(En,kpt,n_T_steps) use real_time, ONLY:RT_carriers,RT_bands use QP_m, ONLY:QP_table,QP_n_states use interfaces, ONLY:DESC_write - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_density.F b/ypp/real_time/RT_density.F index 9438de871c..3d03d087ae 100644 --- a/ypp/real_time/RT_density.F +++ b/ypp/real_time/RT_density.F @@ -30,8 +30,7 @@ subroutine RT_density(en,kpt,qpt) use interfaces, ONLY:WF_load,WF_free,el_density_and_current use wave_func, ONLY:WF,wf_ng use parallel_int, ONLY:PARALLEL_global_indexes,PARALLEL_WF_distribute,PARALLEL_WF_index - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_dos_time_plot.F b/ypp/real_time/RT_dos_time_plot.F index 7a03ea205f..20af189709 100644 --- a/ypp/real_time/RT_dos_time_plot.F +++ b/ypp/real_time/RT_dos_time_plot.F @@ -27,8 +27,7 @@ subroutine RT_dos_time_plot(En,k,n_T_steps) use RT_control, ONLY:RT_output,RT_apply,RT_carriers_to_RT_k,RT_carriers_to_RT_E use real_time, ONLY:RT_carriers,RT_bands use interpolate, ONLY:GRID_k,INTERPOLATION_driver_seed,INTERPOLATION_driver_do - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F index 4d042677e6..f3f4225045 100644 --- a/ypp/real_time/RT_fields.F +++ b/ypp/real_time/RT_fields.F @@ -35,7 +35,7 @@ subroutine RT_fields() use YPP_real_time, ONLY:RT_conf,ElField,RT_time use fields, ONLY:Efield use stderr, ONLY:STRING_split - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_occ_bands_interpolation.F b/ypp/real_time/RT_occ_bands_interpolation.F index 990d514689..88306899f2 100644 --- a/ypp/real_time/RT_occ_bands_interpolation.F +++ b/ypp/real_time/RT_occ_bands_interpolation.F @@ -27,8 +27,7 @@ subroutine RT_occ_bands_interpolation(en,k,q,n_T_steps) use interpolate, ONLY:INTERPOLATION_driver_seed,INTERPOLATION_driver_do,electrons_bands_interpolate,& & INTERP_obj,INTERP_mode,GRID_k use LIVE_t, ONLY:live_timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_occ_time_plot.F b/ypp/real_time/RT_occ_time_plot.F index 06dbcd40ee..b889767f27 100644 --- a/ypp/real_time/RT_occ_time_plot.F +++ b/ypp/real_time/RT_occ_time_plot.F @@ -31,8 +31,7 @@ subroutine RT_occ_time_plot(En,kpt,n_T_steps) use OUTPUT, ONLY:OUTPUT_driver use interfaces, ONLY:DESC_write use timing_m, ONLY:timing - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_occupations_driver.F b/ypp/real_time/RT_occupations_driver.F index 1d71a9d9ed..ac614e2731 100644 --- a/ypp/real_time/RT_occupations_driver.F +++ b/ypp/real_time/RT_occupations_driver.F @@ -21,8 +21,7 @@ subroutine RT_occupations_driver(k,q,en) use real_time, ONLY:RT_bands use YPPm, ONLY:DIPs_mask,l_dipoles,DIPs,DIPs_V_bands use YPP_real_time, ONLY:l_RT_time,l_RT_energy,l_RT_bands,l_RT_dos,RT_conf - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_split_Polarization.F b/ypp/real_time/RT_split_Polarization.F index a60d2f5b14..1a1dfb435e 100644 --- a/ypp/real_time/RT_split_Polarization.F +++ b/ypp/real_time/RT_split_Polarization.F @@ -20,8 +20,7 @@ subroutine RT_split_Polarization(nh,nt,W,X,P,what) use LIVE_t, ONLY:live_timing ! ! Fourier - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/real_time/RT_time_configuration_setup.F b/ypp/real_time/RT_time_configuration_setup.F index d39ab4b5f5..be4e72be4f 100644 --- a/ypp/real_time/RT_time_configuration_setup.F +++ b/ypp/real_time/RT_time_configuration_setup.F @@ -17,8 +17,7 @@ subroutine RT_time_configuration_setup(what,GENERAL_RT_IO_t) use com, ONLY:msg use real_time, ONLY:RT_step use RT_control, ONLY:TIME_adjust,RT_IO_t - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_ATOMPROJs.F b/ypp/symmetries/fix_ATOMPROJs.F index a8d38cf760..5e445019ce 100644 --- a/ypp/symmetries/fix_ATOMPROJs.F +++ b/ypp/symmetries/fix_ATOMPROJs.F @@ -22,8 +22,7 @@ subroutine fix_ATOMPROJs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv, use R_lattice, ONLY:bz_samp use electrons, ONLY:levels use atom_proj - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_PPs.F b/ypp/symmetries/fix_PPs.F index 7fd5a64ee7..89ff134104 100644 --- a/ypp/symmetries/fix_PPs.F +++ b/ypp/symmetries/fix_PPs.F @@ -29,8 +29,7 @@ subroutine fix_PPs(E,k,k_save,kpoints_map,old_nsym,old_dl_sop,old_sop_inv,S_cont use YPP_symm, ONLY:wf_nc_k_save,wf_igk_save,wf_nc_k_reduced,wf_igk_reduced,& & wf_nc_k_new,wf_igk_new,& & wf_nc_k_new,wf_ncx_new,wf_ncx_save - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_QP_DBs.F b/ypp/symmetries/fix_QP_DBs.F index 1643043799..222adbf355 100644 --- a/ypp/symmetries/fix_QP_DBs.F +++ b/ypp/symmetries/fix_QP_DBs.F @@ -21,8 +21,7 @@ subroutine fix_QP_DBs(k,k_save,kpoints_map) use descriptors, ONLY:IO_desc_duplicate use electrons, ONLY:n_sp_pol use R_lattice, ONLY:bz_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_SC_DBs.F b/ypp/symmetries/fix_SC_DBs.F index d7a1420d57..6d806047d8 100644 --- a/ypp/symmetries/fix_SC_DBs.F +++ b/ypp/symmetries/fix_SC_DBs.F @@ -21,8 +21,7 @@ subroutine fix_SC_DBs(k,k_save,kpoints_map) use hamiltonian, ONLY:H_rotation,H_nl_sc,l_sc_V_is_local,H_potential use electrons, ONLY:levels,E_reset,n_sp_pol use R_lattice, ONLY:bz_samp,nkibz - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_WFs_Gshells.F b/ypp/symmetries/fix_WFs_Gshells.F index 7cbca3b02c..fadab5983d 100644 --- a/ypp/symmetries/fix_WFs_Gshells.F +++ b/ypp/symmetries/fix_WFs_Gshells.F @@ -23,8 +23,7 @@ subroutine fix_WFs_Gshells(k,k_save,kpoints_map,old_nsym) use YPP_symm, ONLY:wf_nc_k_save,wf_igk_save,wf_nc_k_reduced,wf_igk_reduced,& & wf_nc_k_new,l_wf_nc_k_red,ng_vec_new,ng_vec_save,wf_igk_new,& & wf_nc_k_new,wf_ncx_new,wf_ncx_save,wf_ng_new,wf_ng_save,wf_ng_cut - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_WFs_and_E.F b/ypp/symmetries/fix_WFs_and_E.F index a7adb39f13..e11cf6fbfb 100644 --- a/ypp/symmetries/fix_WFs_and_E.F +++ b/ypp/symmetries/fix_WFs_and_E.F @@ -28,8 +28,7 @@ subroutine fix_WFs_and_E(E,k,k_save,kpoints_map,old_nsym,S_contains_TR) use YPP_symm, ONLY:wf_nc_k_save,wf_igk_save,wf_nc_k_reduced,wf_igk_reduced,& & wf_nc_k_new,wf_igk_new,& & wf_nc_k_new,wf_ncx_new,wf_ncx_save,wf_ng_new,wf_ng_save - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! @@ -287,8 +286,7 @@ subroutine map_energies(E,E_new,k,kpoints_map) ! use electrons, ONLY:levels,E_reset,n_sp_pol use R_lattice, ONLY:bz_samp - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/fix_symmetries.F b/ypp/symmetries/fix_symmetries.F index d3b14d8b5f..f093106da1 100644 --- a/ypp/symmetries/fix_symmetries.F +++ b/ypp/symmetries/fix_symmetries.F @@ -22,8 +22,7 @@ subroutine fix_symmetries(old_nsym,old_dl_sop,old_sop_inv,S_contains_TR) use vec_operate, ONLY:v_norm use D_lattice, ONLY:nsym,dl_sop,i_time_rev,alat,mag_syms,& & i_space_inv,sop_inv,inv_index,symmetry_group_table - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index f23ff08edd..ed0df7ec36 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -26,8 +26,7 @@ subroutine symmetries_driver(E,Xk) use IO_m, ONLY:REP,OP_WR_CL,VERIFY use parser_m, ONLY:parser use D_lattice, ONLY:kpoints_map,old_nsym,old_dl_sop,old_S_contains_TR - ! - USE_MEMORY + use y_memory_alloc ! implicit none ! From 58e03246920acfccaddd14d1778fd5ae9a4e86c7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Jun 2025 16:22:28 +0200 Subject: [PATCH 1023/1367] Few more improvements --- interfaces/a2y/a2y_db1.F | 12 ++++++------ interfaces/p2y/mod_p2y.F | 18 +++++++++--------- src/allocations/MPA_ALLOC_parallel.F | 6 +++--- src/gpu_test/GPU_test.F | 1 + src/gpu_test/saxpy_explicit.F | 1 + src/gpu_test_mod/mod_data.F | 1 + src/gpu_test_mod/mod_dev_linalg.F | 1 + src/gpu_test_mod/mod_dev_memory.F | 1 + 8 files changed, 23 insertions(+), 18 deletions(-) diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 179ae543a9..8b8d523dfe 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -649,9 +649,9 @@ subroutine import_gwdata_group_kss use pseudo, only : PP_alloc_abinit, pp_n_l_times_proj_max,& & pp_n_l_comp, pp_kbs,pp_kb,pp_kbd,& & pp_table,l_many_proj,pp_n_l_max - use y_memory_alloc - ! - implicit none + use y_memory_alloc + ! + implicit none real(SP),allocatable :: pp_kbs_(:,:) integer :: max_number_of_angular_momenta,max_number_of_projectors integer :: ia, nproj, ip, il, varid, start(3), count(3) @@ -710,9 +710,9 @@ subroutine import_gwdata_group_wfk use pseudo, only : PP_alloc_abinit, pp_n_l_times_proj_max,& & pp_n_l_comp, pp_kbs,pp_kb,pp_kbd,& & pp_table,l_many_proj,pp_n_l_max - use y_memory_alloc - ! - implicit none + use y_memory_alloc + ! + implicit none real(SP),allocatable :: pp_kbs_(:,:) integer :: lmnmax integer, allocatable :: indlmn(:,:,:) diff --git a/interfaces/p2y/mod_p2y.F b/interfaces/p2y/mod_p2y.F index cd30b58aa1..69ac65a6e4 100644 --- a/interfaces/p2y/mod_p2y.F +++ b/interfaces/p2y/mod_p2y.F @@ -314,9 +314,9 @@ end subroutine get_dimensions subroutine get_atoms use D_lattice, ONLY:n_atoms_species_max,n_atomic_species,n_atoms_species, & & atom_pos, Z_species,atomic_number,atom_mass,atoms_map - use y_memory_alloc - ! - implicit none + use y_memory_alloc + ! + implicit none ! ! Work Space ! @@ -553,9 +553,9 @@ subroutine get_k_points(k) use R_lattice, ONLY:bz_samp use D_lattice, ONLY:alat use vec_operate, ONLY:v_is_zero - use y_memory_alloc - ! - implicit none + use y_memory_alloc + ! + implicit none ! type(bz_samp) :: k ! @@ -624,9 +624,9 @@ subroutine get_R_vectors use pars, only: pi use R_lattice, ONLY: b, ng_vec, g_vec use D_lattice, ONLY: alat - use y_memory_alloc - ! - implicit none + use y_memory_alloc + ! + implicit none ! YAMBO_ALLOC(g_vec,(ng_vec,3)) ! The YAMBO array ! diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F index c9ae9d6ceb..be1f2ac853 100644 --- a/src/allocations/MPA_ALLOC_parallel.F +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -15,9 +15,9 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) use matrix, ONLY:MATRIX_reset,PAR_matrix use parallel_int, ONLY:PARALLEL_live_message use gpu_m, ONLY:have_gpu - use y_memory_alloc - ! - implicit none + use y_memory_alloc + ! + implicit none ! type(PAR_matrix) :: MPA_E_par,MPA_R_par integer :: NG,NW diff --git a/src/gpu_test/GPU_test.F b/src/gpu_test/GPU_test.F index be5957be6f..f697fc7581 100644 --- a/src/gpu_test/GPU_test.F +++ b/src/gpu_test/GPU_test.F @@ -1,5 +1,6 @@ +#include subroutine GPU_test(N) use iso_c_binding diff --git a/src/gpu_test/saxpy_explicit.F b/src/gpu_test/saxpy_explicit.F index b34061ec40..78f798af06 100644 --- a/src/gpu_test/saxpy_explicit.F +++ b/src/gpu_test/saxpy_explicit.F @@ -1,4 +1,5 @@ +#include !================================ subroutine saxpy_cpu(N, a, x, y) diff --git a/src/gpu_test_mod/mod_data.F b/src/gpu_test_mod/mod_data.F index bb4cff94d1..4c248f2ce3 100644 --- a/src/gpu_test_mod/mod_data.F +++ b/src/gpu_test_mod/mod_data.F @@ -1,4 +1,5 @@ +#include !==================== module data_m diff --git a/src/gpu_test_mod/mod_dev_linalg.F b/src/gpu_test_mod/mod_dev_linalg.F index 93f6c34c2d..cdd249e5dd 100644 --- a/src/gpu_test_mod/mod_dev_linalg.F +++ b/src/gpu_test_mod/mod_dev_linalg.F @@ -1,4 +1,5 @@ +#include !==================== module dev_linalg_m diff --git a/src/gpu_test_mod/mod_dev_memory.F b/src/gpu_test_mod/mod_dev_memory.F index 7cbc42c855..852f159fc0 100644 --- a/src/gpu_test_mod/mod_dev_memory.F +++ b/src/gpu_test_mod/mod_dev_memory.F @@ -1,4 +1,5 @@ +#include !==================== module dev_memory_m From 5ab1329eefd83540ee255720894706eb7f79aa5d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Jun 2025 16:35:35 +0200 Subject: [PATCH 1024/1367] Definitions for parallel allocation moved from y_memory.h into parallel_memory.h --- include/headers/common/parallel_memory.h | 16 ++++++++++++++++ include/headers/common/y_memory.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/headers/common/parallel_memory.h b/include/headers/common/parallel_memory.h index 278bc42da4..9a76bd8ba8 100644 --- a/include/headers/common/parallel_memory.h +++ b/include/headers/common/parallel_memory.h @@ -74,6 +74,19 @@ #endif +#define YAMBO_ALLOC1(x,SIZE) \ + YAMBO_ALLOC(x,(SIZE(1))) +#define YAMBO_ALLOC2(x,SIZE) \ + YAMBO_ALLOC(x,(SIZE(1),SIZE(2))) +#define YAMBO_ALLOC3(x,SIZE) \ + YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3))) +#define YAMBO_ALLOC4(x,SIZE) \ + YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3),SIZE(4))) +#define YAMBO_ALLOC5(x,SIZE) \ + YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3),SIZE(4),SIZE(5))) +#define YAMBO_ALLOC6(x,SIZE) \ + YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3),SIZE(4),SIZE(5),SIZE(6))) + #define YAMBO_PAR_ALLOC1(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK1(x,SIZE) NEWLINE \ YAMBO_ALLOC1(x,LOCAL_SIZE) @@ -93,6 +106,9 @@ YAMBO_PAR_ALLOC_CHECK6(x,SIZE) NEWLINE \ YAMBO_ALLOC6(x,LOCAL_SIZE) +#define SIMPLE_ALLOC(x,SIZE) \ + allocate(x SIZE, &NEWLINE& stat=MEM_err,errmsg=MEM_msg) + #define SIMPLE_ALLOC1(x,SIZE) \ SIMPLE_ALLOC(x,(SIZE(1))) #define SIMPLE_ALLOC2(x,SIZE) \ diff --git a/include/headers/common/y_memory.h b/include/headers/common/y_memory.h index 029f2b3d46..80a8a77d62 100644 --- a/include/headers/common/y_memory.h +++ b/include/headers/common/y_memory.h @@ -7,22 +7,6 @@ */ -#define YAMBO_ALLOC1(x,SIZE) \ - YAMBO_ALLOC(x,(SIZE(1))) -#define YAMBO_ALLOC2(x,SIZE) \ - YAMBO_ALLOC(x,(SIZE(1),SIZE(2))) -#define YAMBO_ALLOC3(x,SIZE) \ - YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3))) -#define YAMBO_ALLOC4(x,SIZE) \ - YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3),SIZE(4))) -#define YAMBO_ALLOC5(x,SIZE) \ - YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3),SIZE(4),SIZE(5))) -#define YAMBO_ALLOC6(x,SIZE) \ - YAMBO_ALLOC(x,(SIZE(1),SIZE(2),SIZE(3),SIZE(4),SIZE(5),SIZE(6))) - -#define SIMPLE_ALLOC(x,SIZE) \ - allocate(x SIZE, &NEWLINE& stat=MEM_err,errmsg=MEM_msg) - #define YAMBO_ALLOC_P(x,SIZE) \ allocate(x SIZE, &NEWLINE& stat=MEM_err,errmsg=MEM_msg)NEWLINE \ if ( associated(x)) &NEWLINE& call MEM_count(QUOTES x QUOTES,x)NEWLINE \ From 0b1135f2ce6419200266a2b36757e00b272bf852 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 28 Jun 2025 16:39:01 +0200 Subject: [PATCH 1025/1367] Code cleaning --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 67dfc3d26d..9af29d6eb9 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,6 @@ changelog: ./sbin/gitchangelog.py > ChangeLog interfaces: @for target in $(INTERFCS) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done -gpl: - @for target in $(GPL) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done core: @for target in $(CORE) ; do $(MAKE) $(MAKEFLAGS) $$target; if test ! -f "$(bindir)/$$target"; then echo "$$target build failed"; exit 1;fi ; done ph-project: From 60a8f850d18ef904988886e4740d2fd15d6da842 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 30 Jun 2025 11:41:01 +0200 Subject: [PATCH 1026/1367] PARALLEL_global_indexes moved outside q-loop --- src/pol_function/OPTICS_driver.F | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/pol_function/OPTICS_driver.F b/src/pol_function/OPTICS_driver.F index c88df4d9d1..9f7dba56a9 100644 --- a/src/pol_function/OPTICS_driver.F +++ b/src/pol_function/OPTICS_driver.F @@ -51,20 +51,20 @@ subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) ! allocate(X_par(1)) ! - do iq=X%iq(1),X%iq(2) - ! - ! PARALLEL indexes - !================== - call PARALLEL_global_indexes(Xen,Xk,q,"Response_G_space",X=X) - ! - ! WF distribution - !================= - call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_CON_BANDS_X(X%whoami),& + ! PARALLEL indexes + !================== + call PARALLEL_global_indexes(Xen,Xk,q,"Response_G_space",X=X) + ! + ! WF distribution + !================= + call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_CON_BANDS_X(X%whoami),& & Bp_index=PAR_IND_VAL_BANDS_X(X%whoami),CLEAN_UP=.TRUE.) - ! - call PARALLEL_WF_index(COMM=PAR_COM_Q_A2A) - ! - if (WF_buffered_IO) call WF_load(WF_buffer,0,1,X%ib,(/1,Xk%nibz/),space='B',title='-BUFFER') + ! + call PARALLEL_WF_index(COMM=PAR_COM_Q_A2A) + ! + if (WF_buffered_IO) call WF_load(WF_buffer,0,1,X%ib,(/1,Xk%nibz/),space='B',title='-BUFFER') + ! + do iq=X%iq(1),X%iq(2) ! ! TDDFT setup call TDDFT_do_X_W_typs(iq,X,wv) @@ -163,6 +163,8 @@ subroutine OPTICS_driver(Xen,Xk,q,wv,X,Dip) ! enddo ! + call PARALLEL_global_reset("Response_G_space",X%whoami) + ! ! CLEAN ! call MATRIX_reset(X_par_lower_triangle) From 38a11537ba0910fb71499b5444c86e329b38f507 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 30 Jun 2025 11:44:30 +0200 Subject: [PATCH 1027/1367] yambo_nl: info on angle and frequency loop not printed in P&p mode --- src/nloptics/NL_initialize.F | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 9cacfb5ecd..c71e2759c8 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -488,7 +488,7 @@ subroutine NL_initialize(E,k) ! call RT_control_alloc("all") ! -! if(.not.l_pump_and_probe) then + !if(.not.l_pump_and_probe) then do NE_i_time=1,NE_steps Time=real(NE_i_time-1,SP)*RT_step OBS_RT_IO_t%Time(NE_i_time)=Time @@ -517,12 +517,14 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) enddo call msg( 'r', 'Efield T_0 ',T_0,"[fs]") - call msg( 'r', 'Frequencies range ',NL_er*HA2EV) - call msg( 'sr','Frequencies steps ',n_frequencies) - call msg( 'r', 'Frequency step ',NL_estep*HA2EV) - call msg( 'sr','Number of angles ',n_angles) - call msg( 'sr','Max angle (degree) ',max_angle) - call msg( 'r', 'Rotation axis ',NL_rot_axis) + if (.not.l_pump_and_probe) then + call msg( 'r', 'Frequencies range ',NL_er*HA2EV) + call msg( 'sr','Frequencies steps ',n_frequencies) + call msg( 'r', 'Frequency step ',NL_estep*HA2EV) + call msg( 'sr','Number of angles ',n_angles) + call msg( 'sr','Max angle (degree) ',max_angle) + call msg( 'r', 'Rotation axis ',NL_rot_axis) + endif call msg( 'r', 'Use Dipoles ',l_use_DIPOLES) call msg( 'r', 'Induced Field ',l_RT_induced_field) call msg( 'r', 'Force Snd Order Dipoles ',l_force_SndOrd) From 991de84da6ed90238a3beddc4edb7637899d8462 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 2 Jul 2025 10:51:32 +0200 Subject: [PATCH 1028/1367] - fixed field from file in both ypp_rt and yambo_rt - removed DEBUG lines for printing field in yambo_rt --- src/real_time_control/RT_field_from_file.F | 70 +++++++++++++------ .../RT_output_and_IO_driver.F | 1 + src/real_time_initialize/RT_initialize.F | 12 +--- src/real_time_propagation/RT_Ext_fields.F | 16 ----- ypp/real_time/RT_fields.F | 65 ++++++++++++----- 5 files changed, 102 insertions(+), 62 deletions(-) diff --git a/src/real_time_control/RT_field_from_file.F b/src/real_time_control/RT_field_from_file.F index 1ebd984dc6..ae4719df4a 100644 --- a/src/real_time_control/RT_field_from_file.F +++ b/src/real_time_control/RT_field_from_file.F @@ -21,26 +21,34 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine RT_load_field_from_file_init(filename) +subroutine RT_load_field_from_file_init(filename1,filename2) ! use com, ONLY:com_path use fields, ONLY:field_from_file_steps ! implicit none ! - character(*), intent(in) :: filename + character(*), intent(in) :: filename1,filename2 ! - integer :: n_time_steps + integer :: n_time_steps1,n_time_steps2 + ! + call warning(" Loading Field from file"//trim(filename1)//" [experimental]") ! - open(unit=99,file=trim(filename)) - read(99,*) n_time_steps + open(unit=99,file=trim(filename1)) + read(99,*) n_time_steps1 close(99) - field_from_file_steps=max(field_from_file_steps,n_time_steps) + if (filename2/="") then + open(unit=99,file=trim(filename2)) + read(99,*) n_time_steps2 + close(99) + if(n_time_steps1/=n_time_steps2) call error(" Field from file, polarizations with different dimensions") + endif + field_from_file_steps=max(field_from_file_steps,n_time_steps1) ! end subroutine RT_load_field_from_file_init ! ! -subroutine RT_load_field_from_file(filename,i_field) +subroutine RT_load_field_from_file(filename1,filename2,i_field) ! use real_time, ONLY:RT_step use com, ONLY:com_path @@ -49,10 +57,11 @@ subroutine RT_load_field_from_file(filename,i_field) ! implicit none ! - character(*), intent(in) :: filename + character(*), intent(in) :: filename1,filename2 integer, intent(in) :: i_field ! - integer :: i1,i_field_file,n_time_steps + integer :: i1,i_field_file,n_time_steps1,n_time_steps2,idata,i_pol1_data,i_pol2_data + real(SP) :: tmp_data(4,2) ! i_field_file=-1 do i1=1,n_ext_fields_max @@ -61,20 +70,34 @@ subroutine RT_load_field_from_file(filename,i_field) exit enddo ! - field_from_file_fname(i_field_file)=filename + field_from_file_fname(i_field_file)=filename1 + tmp_data=0._SP ! if(i_field_file==1) then allocate(field_from_file(field_from_file_steps,7,n_ext_fields_max)) field_from_file=0._SP endif - open(unit=99,file=trim(filename)) - read(99,*) n_time_steps - do i1=1,n_time_steps - read(99,*) field_from_file(i1,:,i_field_file) + open(unit= 99,file=trim(filename1)) + read( 99,*) n_time_steps1 + if (filename2/="") then + open(unit=100,file=trim(filename2)) + read(100,*) n_time_steps2 + endif + do i1=1,n_time_steps1 + read( 99,*) tmp_data(:,1) + if (filename2/="") read(100,*) tmp_data(:,2) + field_from_file(i1,1,i_field_file)=tmp_data(1,1) + do idata=2,4 + i_pol1_data=2*idata-2 + i_pol2_data=2*idata-1 + field_from_file(i1,i_pol1_data,i_field_file)=tmp_data(idata,1) + field_from_file(i1,i_pol2_data,i_field_file)=tmp_data(idata,2) + enddo enddo - close(99) + close( 99) + if (filename2/="") close(100) ! - Efield(i_field)%t_final_indx=(n_time_steps-8)/2+Efield(i_field)%t_initial_indx-1 + Efield(i_field)%t_final_indx=(n_time_steps1-8)/2+Efield(i_field)%t_initial_indx-1 Efield(i_field)%t_final=RT_step*(Efield(i_field)%t_final_indx-1) ! end subroutine RT_load_field_from_file @@ -92,13 +115,20 @@ subroutine RT_print_field_to_file_init(i_field) integer, intent(in) :: i_field ! integer :: n_time_steps - character(schlen) :: filename + character(schlen) :: filename1,filename2 ! - filename="RT_EXTFIELD_"//trim(intc(i_field))//".time" + filename1="RT_EXTFIELD"//trim(intc(i_field))//"_P1.time" + filename2="" + if ( trim(Efield(i_field)%ef_pol) == "circular" ) filename2="RT_EXTFIELD"//trim(intc(i_field))//"_P2.time" ! n_time_steps=(Efield(i_field)%t_final_indx-Efield(i_field)%t_initial_indx+1)*2+8 ! - open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) - write(99+i_field,*) n_time_steps + open(unit=100+i_field,file=trim(com_path)//"/"//trim(filename1)) + write(100+i_field,*) n_time_steps + ! + if (filename2/="") then + open(unit=200+i_field,file=trim(com_path)//"/"//trim(filename2)) + write(200+i_field,*) n_time_steps + endif ! end subroutine RT_print_field_to_file_init diff --git a/src/real_time_control/RT_output_and_IO_driver.F b/src/real_time_control/RT_output_and_IO_driver.F index d6482a0585..8af05497f1 100644 --- a/src/real_time_control/RT_output_and_IO_driver.F +++ b/src/real_time_control/RT_output_and_IO_driver.F @@ -58,6 +58,7 @@ subroutine RT_output_and_IO_driver(what,E,k,OBSERVABLES) if(l_RT_induced_field) call RT_output(what=trim(what)//" tot ind") endif ! + ! if(trim(what)=="close") then do i_ID=1,N_RT_databases if (RT_DB_ID(i_ID)==0) cycle diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index a8eccc7e1b..1ccd30cc25 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -227,10 +227,11 @@ subroutine RT_initialize(E,k,q,Dip) ! ! Initial check for fields defined from file do i1=1,n_ext_fields + field_defs="" Efield(i1)%ef_name=trim(Efield(i1)%ef_name) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle - call RT_load_field_from_file_init(field_defs(2)) + call RT_load_field_from_file_init(field_defs(2),field_defs(3)) enddo ! NE_i_last_field=0 @@ -284,19 +285,12 @@ subroutine RT_initialize(E,k,q,Dip) ! The time dependent fluence is evaluated during the dynamics call RT_Fluence_and_PI_kind(E,i1) else if ( field_defs(1)=='FROM_FILE') then - call RT_load_field_from_file(field_defs(2),i1) + call RT_load_field_from_file(field_defs(2),field_defs(3),i1) else Efield(i1)%t_final_indx= NE_steps Efield(i1)%t_final=RT_step*(NE_steps-1) endif ! - ! DEBUG < - do i_defs=1,n_fields_defs_max - if ( field_defs(i_defs)/="PRINT_TO_FILE" ) cycle - call RT_print_field_to_file_init(i1) - enddo - ! DEBUG > - ! NE_i_last_field=max(NE_i_last_field,Efield(i1)%t_final_indx) ! enddo diff --git a/src/real_time_propagation/RT_Ext_fields.F b/src/real_time_propagation/RT_Ext_fields.F index 17dadefe2f..00050a39db 100644 --- a/src/real_time_propagation/RT_Ext_fields.F +++ b/src/real_time_propagation/RT_Ext_fields.F @@ -41,9 +41,6 @@ subroutine RT_Ext_fields(A,time,i_f) ! ! Work Space ! - ! DEBUG < - logical :: l_print_to_file - ! DEBUG > integer :: ikind real(SP) :: Field_time,A_coeff complex(SP) :: A_of_t(2),E_of_t(2),J_of_t(2),theta,delta,signf @@ -56,12 +53,6 @@ subroutine RT_Ext_fields(A,time,i_f) return endif ! - ! DEBUG < - inquire ( unit=99+i_f,opened=l_print_to_file) - if (l_print_to_file) l_print_to_file=Efield(i_f)%t_final_indx>=NE_i_time-2 - if (l_print_to_file.and.Efield(i_f)%t_initial_indx<4) call error('writing field to file requires initial index>3') - ! DEBUG > - ! theta=theta_function(Field_time,RT_dyn_step,0) delta=theta_function(Field_time,RT_dyn_step,1) signf=theta_function(Field_time,RT_dyn_step,2) @@ -72,13 +63,6 @@ subroutine RT_Ext_fields(A,time,i_f) E_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),1,envelop_only=(ikind==1)) J_of_t=small_a(Field_time,RT_dyn_step,Efield(i_f),2,envelop_only=(ikind==1)) ! - ! DEBUG < - if (ikind==2.and.l_print_to_file) then - write(99+i_f,*) Field_time/FS2AUT,real(A_of_t(1),SP),real(E_of_t(1),SP),real(J_of_t(1),SP),& - real(A_of_t(2),SP),real(E_of_t(2),SP),real(J_of_t(2),SP) - endif - ! DEBUG > - ! select case(Efield(i_f)%ef_pol) case("linear") A_coeff=SPEED_OF_LIGHT*Efield(i_f)%amplitude diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F index bcf1826d5e..4005fbc7d8 100644 --- a/ypp/real_time/RT_fields.F +++ b/ypp/real_time/RT_fields.F @@ -28,7 +28,7 @@ subroutine RT_fields() use com, ONLY:msg use pars, ONLY:SP,schlen,pi,n_fields_defs_max use com, ONLY:com_path - use YPP_real_time, ONLY:RT_conf,ElField,RT_time + use YPP_real_time, ONLY:RT_conf,ElField,RT_time,ypp_chirp use fields, ONLY:Efield use stderr, ONLY:STRING_split ! @@ -65,6 +65,8 @@ subroutine RT_fields() ! Field in frequency space from FT of real time expression if ( field_defs(1)/='FROM_W_FILE') call RT_Field_t_to_w(i_field) ! + if (.not. ypp_chirp>0._SP) return + ! ! Chirp the field and convert back into real time call RT_1D_Fourier_Chirp(ElField,RT_conf) ! @@ -145,45 +147,74 @@ subroutine RT_print_Elfield(i_field,mode,Elfield) character(*), intent(in) :: mode type(OBS_el), intent(in) :: ElField ! - integer :: i_t,i_w,idata - character(schlen) :: filename + integer :: i_t,i_w,idata,i_re_data,i_im_data,i_pol_data + character(schlen) :: filename1,filename2,basename real(SP) :: field_data(7),Field_t,Field_w ! - if (mode=="time") filename="YPP_EXTFIELD_"//trim(intc(i_field))//".time" - if (mode=="time-chirped") filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".time" - if (mode=="freq") filename="YPP_EXTFIELD_"//trim(intc(i_field))//".freq" - if (mode=="freq-chirped") filename="YPP_EXTFIELD_LINCHIRP_"//trim(intc(i_field))//".freq" + basename="YPP_EXTFIELD"//trim(intc(i_field)) + ! + if (mode=="time") filename1=trim(basename)//"_P1.time" + if (mode=="time-chirped") filename1=trim(basename)//"_P1_LINCHIRP.time" + if (mode=="freq") filename1=trim(basename)//"_P1.freq" + if (mode=="freq-chirped") filename1=trim(basename)//"_P1_LINCHIRP.freq" ! - open(unit=99+i_field,file=trim(com_path)//"/"//trim(filename)) + if (mode=="time") filename2=trim(basename)//"_P2.time" + if (mode=="time-chirped") filename2=trim(basename)//"_P2_LINCHIRP.time" + if (mode=="freq") filename2=trim(basename)//"_P2.freq" + if (mode=="freq-chirped") filename2=trim(basename)//"_P2_LINCHIRP.freq" + ! + open(unit=100+i_field,file=trim(com_path)//"/"//trim(filename1)) + open(unit=200+i_field,file=trim(com_path)//"/"//trim(filename2)) ! if (index(mode,"time")>0) then ! - write(99+i_field,*) RT_conf%T_n_steps + write(100+i_field,*) RT_conf%T_n_steps + write(200+i_field,*) RT_conf%T_n_steps ! do i_t=1,RT_conf%T_n_steps Field_t=RT_conf%T_range(1)+(i_t-1)*RT_conf%delta_t !-Efield%t_initial field_data(1)=Field_t/FS2AUT - do idata=1,6 - field_data(idata+1)=real(ElField%F_t(i_t,idata)) + do idata=1,3 + i_pol_data=2*idata-1 + field_data(idata+1)=real(ElField%F_t(i_t,i_pol_data)) + enddo + write(100+i_field,*) field_data(1:4) + do idata=1,3 + i_pol_data=2*idata + field_data(idata+1)=real(ElField%F_t(i_t,i_pol_data)) enddo - write(99+i_field,*) field_data + write(200+i_field,*) field_data(1:4) enddo ! else if (index(mode,"freq")>0) then ! - write(99+i_field,*) RT_conf%W_n_steps + write(100+i_field,*) RT_conf%W_n_steps + write(200+i_field,*) RT_conf%W_n_steps ! do i_w=1,RT_conf%W_n_steps Field_w=RT_conf%X_w_range(1)+(i_w-1)*RT_conf%delta_W field_data(1)=Field_w !/FS2AUT - do idata=1,6 - field_data(idata+1)=real(ElField%F_w(i_w,idata)) + do idata=1,3 + i_pol_data=2*idata-1 + i_re_data=2*idata-1 + i_im_data=2*idata + field_data(i_re_data+1)=real(ElField%F_w(i_w,i_pol_data)) + field_data(i_im_data+1)=aimag(ElField%F_w(i_w,i_pol_data)) + enddo + write(100+i_field,*) field_data + do idata=1,3 + i_pol_data=2*idata + i_re_data=2*idata-1 + i_im_data=2*idata + field_data(i_re_data+1)=real(ElField%F_w(i_w,i_pol_data)) + field_data(i_im_data+1)=aimag(ElField%F_w(i_w,i_pol_data)) enddo - write(99+i_field,*) field_data + write(200+i_field,*) field_data enddo ! endif ! - close(99+i_field) + close(100+i_field) + close(200+i_field) ! end subroutine RT_print_Elfield From f1d862a688fdc94c9688025a1e302c407533bdb1 Mon Sep 17 00:00:00 2001 From: Riccardo Reho Date: Thu, 3 Jul 2025 17:40:01 +0200 Subject: [PATCH 1029/1367] change file extensions --- .vscode/{extensions.json => extensions.json_suggested} | 0 .vscode/{launch.json => launch.json_suggested} | 0 .vscode/{settings.json => settings.json_suggested} | 0 vscode_lumen.md | 4 ++-- 4 files changed, 2 insertions(+), 2 deletions(-) rename .vscode/{extensions.json => extensions.json_suggested} (100%) rename .vscode/{launch.json => launch.json_suggested} (100%) rename .vscode/{settings.json => settings.json_suggested} (100%) diff --git a/.vscode/extensions.json b/.vscode/extensions.json_suggested similarity index 100% rename from .vscode/extensions.json rename to .vscode/extensions.json_suggested diff --git a/.vscode/launch.json b/.vscode/launch.json_suggested similarity index 100% rename from .vscode/launch.json rename to .vscode/launch.json_suggested diff --git a/.vscode/settings.json b/.vscode/settings.json_suggested similarity index 100% rename from .vscode/settings.json rename to .vscode/settings.json_suggested diff --git a/vscode_lumen.md b/vscode_lumen.md index 188aaded0e..831e1f59c5 100644 --- a/vscode_lumen.md +++ b/vscode_lumen.md @@ -20,9 +20,9 @@ Enable debugging from VS code with: ### How to Use Debugger in VS code 1) Open the yambo folder in VS code 2) Create a folder `debug_run` and copy inside a SAVE folder and the input files you want to test -3) Edit the `.vsocde/launch.json` file accordingly +3) Edit the `.vsocde/launch.json_suggested` file accordingly and rename it `.vscode/launch.json` 4) press F5 for `Run & Debug` 5) `Debug Yambo` from the dropdown 6) Open a given file in VS Code, for example `DIPOLE_driver.F` and hover your mouse on a line, then click left of line number to set a red dot (breakpoint). In this way you set breakpoints by clicking the glutter (left of line numbers). 7) On the debug menu choose your breakpoints. -8) Click run \ No newline at end of file +8) Click run From e832e63d4b4e18398f4964d7b76499d96a811c3b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 3 Jul 2025 20:43:51 +0200 Subject: [PATCH 1030/1367] .vscode/*.json files are ignored --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index bec4da83bf..a3570aeeb5 100644 --- a/.gitignore +++ b/.gitignore @@ -140,3 +140,6 @@ gfortran*.sh pgi*.sh nvidia*.sh git_nmd.sh + +#Configuation files +.vscode/*.json From 5c76546bd1e2f09cf5f183da0b43da439115024e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 4 Jul 2025 07:01:49 +0200 Subject: [PATCH 1031/1367] Freezing of some BSE bands re-coded. In place of BSEElecBands and BSEHoleBands, now BSEFrozeBands is used --- src/bse/K_Transitions_setup.F | 46 ++++++++++++++++++++++------------- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 7 ++---- src/modules/mod_BS.F | 8 ++---- 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 668d8322e9..97639c5df2 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -29,7 +29,7 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) use BS_solvers, ONLY:BSS_mode,BSS_uses_DbGd use BS, ONLY:T_group,BS_bands,BS_T_grp,BS_nT_grps,BS_n_eh_spaces,& & BS_Blocks_and_Transitions_alloc,BS_perturbative_SOC,& -& BS_nkFGbz_in_Tgrp +& BS_nkFGbz_in_Tgrp,BS_bands_frozen use DIPOLES, ONLY:DIPOLE_t use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_IND_T_ordered,PAR_IND_T_groups,& & PAR_IND_T_Haydock,PP_indexes_reset @@ -113,7 +113,12 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! since i_k_bz and i_p_bz change at each iteration of the loop ! do iv=V_bands(1),V_bands(2) + ! + if (BS_bands_frozen(iv)) cycle + ! do ic=C_bands(1),C_bands(2) + ! + if (BS_bands_frozen(ic)) cycle ! do i_sp_c=1,n_sp_pol i_sp_v=i_sp_c @@ -235,12 +240,12 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) ! BS_H_dim ! BS_nT_at_k ! - use pars, ONLY:SP - use stderr, ONLY:intc + use pars, ONLY:SP,schlen + use stderr, ONLY:intc,STRING_split use parser_m, ONLY:parser use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & & l_BS_ares_from_res,BS_res_ares_n_mat,BS_bands,& -& BS_n_eh_spaces,BS_core_bands,l_BS_fix_holes,l_BS_fix_elecs +& BS_n_eh_spaces,BS_bands_frozen_ch,BS_bands_frozen use DIPOLES, ONLY:DIPOLE_t use electrons, ONLY:levels,n_sp_pol use com, ONLY:msg @@ -263,13 +268,14 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) ! ! Work Space ! + character(schlen) :: BS_bands_frozen_list(BS_bands(2)) + logical :: l_BS_freeze_bands real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2, & & i_res_ares,BS_nT_at_k_tmp(Xk%nibz*2) ! logical, external :: K_Transition_check ! - ! call section("+P",'Transition pre-analysis @q'//trim(intc(iq))) ! call k_build_up_BZ_tables(Xk) @@ -280,18 +286,19 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) V_bands=(/BS_bands(1),maxval(Ken%nbm)/) C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) ! - call parser('BSEHoleBands', l_BS_fix_holes) - call parser('BSEElecBands', l_BS_fix_elecs) - if (l_BS_fix_holes.and.all(BS_core_bands(1:2)/=0)) then - if (BS_core_bands(1)V_bands(2)) & - & call error(" BSECoreBands range must fit in BSEbands range for holes") - V_bands=(/BS_core_bands(1),BS_core_bands(2)/) - endif - ! - if (l_BS_fix_elecs.and.all(BS_core_bands(3:4)/=0)) then - if (BS_core_bands(3)C_bands(2)) & - & call error(" BSECoreBands range must fit in BSEbands range for elecs") - C_bands=(/BS_core_bands(3),BS_core_bands(4)/) + allocate(BS_bands_frozen(BS_bands(1):BS_bands(2))) + BS_bands_frozen=.false. + ! + call parser('BSEFrozenBands', l_BS_freeze_bands) + if (l_BS_freeze_bands) then + call STRING_split(BS_bands_frozen_ch,BS_bands_frozen_list) + ic=1 + do iv=BS_bands(1),BS_bands(2) + write(*,*) iv,ic,trim(intc(iv))," ",trim(BS_bands_frozen_list(ic)),trim(intc(iv))==trim(BS_bands_frozen_list(ic)) + if( .not. trim(intc(iv))==trim(BS_bands_frozen_list(ic)) ) cycle + BS_bands_frozen(iv)=.true. + ic=ic+1 + enddo endif ! #if defined _RT @@ -326,7 +333,12 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) ikp =Xk%sstar(ikpbz,1) ! do iv=V_bands(1),V_bands(2) + ! + if (BS_bands_frozen(iv)) cycle + ! do ic=C_bands(1),C_bands(2) + ! + if (BS_bands_frozen(ic)) cycle ! if (i_res_ares==1) then; ib1=iv; ib2=ic; endif if (i_res_ares==2) then; ib1=ic; ib2=iv; endif diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 9416e8ddaa..e269f019ac 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -261,7 +261,7 @@ subroutine INIT_activate() ! call initactivate(1,'DrudeWBS Reflectivity') call initactivate(1,'BoseCut ShiftedPaths') - call initactivate(1,'BSEQptR BSEBands BSEHoleBands BSEElecBands BSKCut BSKIOmode BSEEhEny BSehWind NoDiagSC') + call initactivate(1,'BSEQptR BSEBands BSEFrozenBands BSKCut BSKIOmode BSEEhEny BSehWind NoDiagSC') ! #if defined _RT call initactivate(1,'RTOccMode ForceEqTrans') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 5d89f1928a..5f3f075b5b 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -32,7 +32,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& & bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& & RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff - use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_core_bands,& + use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_bands_frozen_ch,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,& & BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& @@ -293,10 +293,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'BSEmod', '[BSE] resonant/retarded/coupling',BSE_mode,case="a") call it(defs,'Lkind', '[BSE,X] bar(default)/full/tilde',BSE_L_kind,verb_level=V_resp) call it(defs,'BSEBands','[BSK] Bands range',BS_bands) - call it(defs,'BSEHoleBands','[BSK] Bands range for Hole. If set, other bands are ignored in the hole channel',& -& BS_core_bands(1:2),verb_level=V_resp) - call it(defs,'BSEElecBands','[BSK] Bands range for Electrons. If set other bands are ignored in the electrons channel',& -& BS_core_bands(3:4),verb_level=V_resp) + call it(defs,'BSEFrozenBands','[BSK] Bands expluded from BSE construction',BS_bands_frozen_ch,verb_level=V_resp) call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W(q,G,Gp)]',BS_n_g_W,G_unit) call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit) call it(defs,'BSENGfxc','[BSK] Fxc components', BS_n_g_fxc,G_unit,verb_level=V_resp) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 707854b074..7ad56d6eb3 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -43,11 +43,7 @@ module BS character(schlen) :: BSE_dipole_geometry="none" character(schlen) :: BSK_mode character(schlen) :: BSK_IO_mode - ! - ! Kind of response function - !=========================== - logical :: l_BS_fix_holes - logical :: l_BS_fix_elecs + character(schlen) :: BS_bands_frozen_ch="" ! ! Dipoles tracing !================= @@ -77,7 +73,6 @@ module BS integer :: BS_IO_dim(2,4) integer :: MAX_BSK_LIN_size integer :: BS_bands(2) - integer :: BS_core_bands(4) integer :: BS_q(2) integer :: BS_iq_now integer :: BS_identifier @@ -92,6 +87,7 @@ module BS real(SP),allocatable :: BS_kpt_bz(:,:) real(SP),allocatable :: BS_kpt_ibz(:,:) integer,allocatable :: BS_K_io_map(:) + logical,allocatable :: BS_bands_frozen(:) ! ! Resonant/Antiresonant handling !================================ From 2b30b096b7126399e4e2e85f2c38932612c51d23 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 4 Jul 2025 11:20:25 +0200 Subject: [PATCH 1032/1367] real-time propagation with frozen bands re-done --- src/bse/K_Transitions_setup.F | 22 ++----- src/collisions/COLLISIONS_alloc_and_free.F | 9 +-- src/collisions/COLLISIONS_basic_operations.F | 12 ++-- src/collisions/COLLISIONS_compose_nl.F | 10 +-- src/collisions/COLLISIONS_compose_rt.F | 10 +-- src/collisions/COLLISIONS_compress.F | 12 ++-- src/collisions/COLLISIONS_eval.F | 5 +- src/collisions/COLLISIONS_linearize_and_IO.F | 13 ++-- src/common/LEVELS_mirror.F | 69 ++++++++++++++------ src/hamiltonian/Apply_W_field.F | 13 +--- src/interface/INIT_load.F | 42 ++++++++---- src/io_parallel/io_COLLISIONS.F | 24 ++++--- src/io_parallel/io_COLLISIONS_header.F | 27 +++----- src/modules/SET_defaults.F | 18 ++--- src/modules/mod_BS.F | 4 +- src/modules/mod_SC.F | 5 +- src/modules/mod_collision_ext.F | 6 +- src/modules/mod_hamiltonian.F | 7 +- src/modules/mod_nl_optics.F | 7 +- src/modules/mod_real_time.F | 4 +- src/nloptics/NL_driver.F | 4 +- src/nloptics/NL_initialize.F | 4 +- src/real_time_hamiltonian/RT_apply_field.F | 29 ++------ 23 files changed, 169 insertions(+), 187 deletions(-) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 97639c5df2..9435f1727b 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -114,11 +114,11 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! do iv=V_bands(1),V_bands(2) ! - if (BS_bands_frozen(iv)) cycle + if (BS_bands_frozen(iv)==1) cycle ! do ic=C_bands(1),C_bands(2) ! - if (BS_bands_frozen(ic)) cycle + if (BS_bands_frozen(ic)==1) cycle ! do i_sp_c=1,n_sp_pol i_sp_v=i_sp_c @@ -287,19 +287,7 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) ! allocate(BS_bands_frozen(BS_bands(1):BS_bands(2))) - BS_bands_frozen=.false. - ! - call parser('BSEFrozenBands', l_BS_freeze_bands) - if (l_BS_freeze_bands) then - call STRING_split(BS_bands_frozen_ch,BS_bands_frozen_list) - ic=1 - do iv=BS_bands(1),BS_bands(2) - write(*,*) iv,ic,trim(intc(iv))," ",trim(BS_bands_frozen_list(ic)),trim(intc(iv))==trim(BS_bands_frozen_list(ic)) - if( .not. trim(intc(iv))==trim(BS_bands_frozen_list(ic)) ) cycle - BS_bands_frozen(iv)=.true. - ic=ic+1 - enddo - endif + call LEVELS_frozen(BS_bands,BS_bands_frozen,BS_bands_frozen_ch,"BSE",BS_bands(2)-BS_bands(1)+1) ! #if defined _RT ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. @@ -334,11 +322,11 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) ! do iv=V_bands(1),V_bands(2) ! - if (BS_bands_frozen(iv)) cycle + if (BS_bands_frozen(iv)==1) cycle ! do ic=C_bands(1),C_bands(2) ! - if (BS_bands_frozen(ic)) cycle + if (BS_bands_frozen(ic)==1) cycle ! if (i_res_ares==1) then; ib1=iv; ib2=ic; endif if (i_res_ares==2) then; ib1=ic; ib2=iv; endif diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 2584f55328..5815865471 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -17,9 +17,8 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol use parallel_m, ONLY:PAR_nPlasma,PAR_nQ_bz use collision_ext, ONLY:COLLISIONS_element,COH_COLL_element,HXC_COLL_element,GW_NEQ_COLL_element,& -& COLL_bands,COLLISIONS_load_SP,COLLISIONS_CV_only,COLLISIONS_FEW_only,& -& GW_NEQ_collisions,COH_collisions,HXC_collisions,P_collisions,COLLISIONS_group,& -& COLL_hole_bands,COLL_elec_bands +& COLL_bands,COLLISIONS_load_SP,COLLISIONS_CV_only,& +& GW_NEQ_collisions,COH_collisions,HXC_collisions,P_collisions,COLLISIONS_group #if defined _QED use QP_m, ONLY:QP_QED_ng use collision_ext, ONLY:P_COLL_element @@ -121,10 +120,6 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) D(1,4)=maxval(n_met_bands) ! upper bound for valence D(2,4)=-1 ! unused endif - if (COLLISIONS_FEW_only) then - D(1,3:4)=COLL_hole_bands ! update upper (and lower) bound for valence - D(2,3:4)=COLL_elec_bands ! update lower (and upper) bound for conduction - endif if (l_collision.and.l_alloc) then allocate(HXC_COLL_element(size_)) HXC_COLL_element%N=size_ diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index 1b74bcfbfa..b311684769 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -21,8 +21,8 @@ subroutine COLLISIONS_basic_operations( what, COLL ) ! integer, pointer :: IO_status(:) => null() ! end type ! - use collision_ext, ONLY:COLLISIONS_group,COLLISIONS_CV_only,COLLISIONS_FEW_only,& - & COLL_bands,COLL_hole_bands,COLL_elec_bands + use collision_ext, ONLY:COLLISIONS_group,COLLISIONS_CV_only,& + & COLL_bands,COLL_bands_frozen use R_lattice, ONLY:nXkibz use electrons, ONLY:n_sp_pol,n_full_bands,n_met_bands use wave_func, ONLY:states_to_load @@ -88,18 +88,14 @@ subroutine COLLISIONS_basic_operations( what, COLL ) do i_n=COLL_bands(1),COLL_bands(2) ! if ( COLLISIONS_CV_only .and. i_n> n_met_bands(i_sp) ) cycle - if ( COLLISIONS_FEW_only .and. i_nCOLL_hole_bands(2) .and. i_nCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(i_n)==1 ) cycle ! do i_mix=0,COLL_bands(2)-COLL_bands(1) ! i_m=i_n+i_mix ! if ( COLLISIONS_CV_only .and. i_m<=n_full_bands(i_sp) ) cycle - if ( COLLISIONS_FEW_only .and. i_mCOLL_hole_bands(2) .and. i_mCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(i_m)==1 ) cycle ! if (i_m>COLL_bands(2)) cycle ! diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 62fb244da1..ab683cf436 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -12,7 +12,7 @@ subroutine COLLISIONS_compose_nl(G_in) use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree!l_sc_hf,l_sc_cohsex,l_sc_exx use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_load_SP,& - & COLLISIONS_CV_only,COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands + & COLLISIONS_CV_only,COLL_bands_frozen use electrons, ONLY:spin,n_met_bands,n_full_bands,n_sp_pol use R_lattice, ONLY:nXkibz use parallel_m, ONLY:HEAD_QP_cpu,PAR_COM_Xk_ibz_INDEX @@ -44,15 +44,11 @@ subroutine COLLISIONS_compose_nl(G_in) ! do i_sp=1,n_sp_pol do ibp=COLL_bands(1),COLL_bands(2) - if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(ibp)==1 ) cycle do ib=COLL_bands(1),COLL_bands(2) if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle - if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(ib)==1 ) cycle do_collisions(ib,ibp,i_sp)=.true. enddo enddo diff --git a/src/collisions/COLLISIONS_compose_rt.F b/src/collisions/COLLISIONS_compose_rt.F index 30689cee30..467b37d6c6 100644 --- a/src/collisions/COLLISIONS_compose_rt.F +++ b/src/collisions/COLLISIONS_compose_rt.F @@ -12,7 +12,7 @@ subroutine COLLISIONS_compose_rt(dG_avg) use pars, ONLY:SP,cZERO,cI use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_exx,l_sc_hartree use collision_ext, ONLY:HXC_COLL_element,COLL_bands,HXC_collisions,COLLISIONS_CV_only,& - & COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands + & COLL_bands_frozen use electrons, ONLY:spin,n_met_bands,n_full_bands,n_sp_pol use R_lattice, ONLY:nXkibz use parallel_int, ONLY:PP_redux_wait @@ -38,15 +38,11 @@ subroutine COLLISIONS_compose_rt(dG_avg) ! do i_sp=1,n_sp_pol do ibp=COLL_bands(1),COLL_bands(2) - if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(ibp)==1 ) cycle do ib=COLL_bands(1),COLL_bands(2) if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle - if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(ib)==1 ) cycle do_collisions(ib,ibp,i_sp,1)=.true. if (.not.PAR_IND_Bp_mat%element_1D( B_mat_index(ib,ibp,COLL_bands) ) ) cycle do_collisions(ib,ibp,i_sp,2)=.true. diff --git a/src/collisions/COLLISIONS_compress.F b/src/collisions/COLLISIONS_compress.F index 26f0b982c2..72ad22cefd 100644 --- a/src/collisions/COLLISIONS_compress.F +++ b/src/collisions/COLLISIONS_compress.F @@ -16,7 +16,7 @@ subroutine COLLISIONS_compress(COLL) ! use pars, ONLY:SP,DP,SP6,cZERO use collision_ext, ONLY:COLLISIONS_element,COLL_bands,COLLISIONS_cutoff,COLLISIONS_CV_only,& - & COLLISIONS_FEW_only,COLL_elec_bands,COLL_hole_bands + & COLL_bands_frozen use R_lattice, ONLY:nXkibz use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol use y_memory_alloc @@ -52,19 +52,15 @@ subroutine COLLISIONS_compress(COLL) do i_kmq=1,nXkibz do ibp=COLL_bands(1),COLL_bands(2) ! - if ( COLLISIONS_FEW_only .and. ibpCOLL_hole_bands(2) .and. ibpCOLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(ibp)==1 ) cycle ! do ib=COLL_bands(1),COLL_bands(2) ! if ( COLLISIONS_CV_only .and. (ib> n_met_bands(i_sp) .and. ibp> n_met_bands(i_sp) ) ) cycle if ( COLLISIONS_CV_only .and. (ib<=n_full_bands(i_sp) .and. ibp<=n_full_bands(i_sp)) ) cycle ! - if ( COLLISIONS_FEW_only .and. ibCOLL_hole_bands(2) .and. ibCOLL_elec_bands(2) ) cycle - ! + if ( COLL_bands_frozen(ib)==1 ) cycle + ! ic=ic+1 ! if( l_coll_SP) COLL%v3_c(ib,ibp,i_kmq,i_sp)=cmplx(COLL%v_c_SP(ic),kind=SP) diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 227e15856f..4d92dfda37 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -36,8 +36,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) use hamiltonian, ONLY:H_potential,H_kind use global_XC, ONLY:QP_SE_GW_NEQ,QP_SE_GW_QED use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_group,COLLISIONS_from_BSE,& -& COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming,& -& COLLISIONS_FEW_only,COLL_hole_bands,COLL_elec_bands +& COH_collisions,HXC_collisions,P_collisions,GW_NEQ_collisions,COLLISIONS_naming use X_m, ONLY:X_t use plasma, ONLY:EH_gas use frequency, ONLY:w_samp @@ -75,8 +74,6 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! l_use_collisions=.TRUE. ! - COLLISIONS_FEW_only=all((/COLL_hole_bands/=-1,COLL_elec_bands/=-1/)) - ! ! XC Potentials !=============== ! diff --git a/src/collisions/COLLISIONS_linearize_and_IO.F b/src/collisions/COLLISIONS_linearize_and_IO.F index ce369eea48..0ead5a424d 100644 --- a/src/collisions/COLLISIONS_linearize_and_IO.F +++ b/src/collisions/COLLISIONS_linearize_and_IO.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2013 The Yambo Team ! -! Authors (see AUTHORS file for details): CA AM +! Authors (see AUTHORS file for details): CA AM DS ! ! headers ! @@ -16,8 +16,7 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme use parallel_int, ONLY:PP_wait use electrons, ONLY:n_met_bands,n_full_bands,n_sp_pol use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_cutoff,COLLISIONS_group,& -& COLLISIONS_CV_only,COLLISIONS_FEW_only,& -& COLL_hole_bands,COLL_elec_bands +& COLLISIONS_CV_only,COLL_bands_frozen use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_APP_CL,OP_WR_CL,OP_APP,WR,WR_CL,io_COLLs use COLL_interfaces, ONLY:io_COLLISIONS @@ -93,17 +92,13 @@ subroutine COLLISIONS_linearize_and_IO(what,i_coll,last_coll,COLL_grp,COLL_eleme do i4=1,n_sp_pol ! i_sp_pol do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 - if ( COLLISIONS_FEW_only .and. i2COLL_hole_bands(2) .and. i2COLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(i2)==1 ) cycle do i1=COLL_grp%D(1,1),COLL_grp%D(1,2) ! ib2 ! if ( COLLISIONS_CV_only .and. (i1> n_met_bands(i4) .and. i2> n_met_bands(i4) ) ) cycle if ( COLLISIONS_CV_only .and. (i1<=n_full_bands(i4) .and. i2<=n_full_bands(i4)) ) cycle ! - if ( COLLISIONS_FEW_only .and. i1COLL_hole_bands(2) .and. i1COLL_elec_bands(2) ) cycle + if ( COLL_bands_frozen(i1)==1 ) cycle ! ! In the COHSEX/HF case a cutoff can be applied ! diff --git a/src/common/LEVELS_mirror.F b/src/common/LEVELS_mirror.F index 00e8d79b41..f9dfd827d1 100644 --- a/src/common/LEVELS_mirror.F +++ b/src/common/LEVELS_mirror.F @@ -16,17 +16,17 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) use stderr, ONLY:STRING_same use QP_m, ONLY:QP_n_G_bands #if defined _SC - use SC, ONLY:SC_bands + use SC, ONLY:SC_bands,SC_bands_frozen #endif #if defined _RT || defined _QED || defined _NL - use real_time, ONLY:RT_bands,RT_hole_bands,RT_elec_bands + use real_time, ONLY:RT_bands,RT_bands_frozen #endif #if defined _SC || defined _RT || defined _QED || defined _NL - use collision_ext, ONLY:COLL_bands,COLL_hole_bands,COLL_elec_bands - use hamiltonian, ONLY:H_ref_bands,H_ref_hole_bands,H_ref_elec_bands + use collision_ext, ONLY:COLL_bands,COLL_bands_frozen + use hamiltonian, ONLY:H_ref_bands,H_ref_bands_frozen #endif #if defined _NL - use nl_optics, ONLY:NL_bands,NL_hole_bands,NL_elec_bands + use nl_optics, ONLY:NL_bands,NL_bands_frozen #endif ! implicit none @@ -37,7 +37,8 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) type(X_t) ::X(5) logical ::l_USER_field(16),dip_bands_defined ! - integer :: i1,SCATT_bands(2),SCATT_hole_bands(2),SCATT_elec_bands(2),DIP_bands(2) + integer :: i1,SCATT_bands(2),SCATT_hole_bands(2),DIP_bands(2) + logical :: SCATT_bands_frozen(E%nb) ! if (STRING_same(what,"USER_fields")) then ! @@ -81,16 +82,14 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) ! Bands (Electronic levels) !--------------------------- SCATT_bands=-1 - SCATT_hole_bands=-1 - SCATT_elec_bands=-1 + SCATT_bands_frozen=.false. do i1=8,12 if(.not.(l_USER_field(i1))) cycle ! #if defined _RT || defined _QED || defined _NL if(i1==8) then SCATT_bands=RT_bands - SCATT_hole_bands=RT_hole_bands - SCATT_elec_bands=RT_elec_bands + SCATT_bands_frozen=RT_bands_frozen endif #endif #if defined _SC @@ -99,8 +98,7 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) #if defined _NL if(i1==10) then SCATT_bands=NL_bands - SCATT_hole_bands=NL_hole_bands - SCATT_elec_bands=NL_elec_bands + SCATT_bands_frozen=NL_bands_frozen endif #endif #if defined _SC @@ -112,11 +110,9 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) #if defined _RT || defined _QED || defined _NL if(i1==11) then RT_bands =COLL_bands - RT_hole_bands =COLL_hole_bands - RT_elec_bands =COLL_elec_bands + RT_bands_frozen=COLL_bands_frozen SCATT_bands=COLL_bands - SCATT_hole_bands=COLL_hole_bands - SCATT_elec_bands=COLL_elec_bands + SCATT_bands_frozen=COLL_bands_frozen endif #endif #if defined _QED @@ -157,11 +153,9 @@ subroutine LEVELS_mirror(what,E,X,Dip,l_USER_field) !------------------------------------ #if defined _SC || defined _RT || defined _QED || defined _NL COLL_bands =SCATT_bands - COLL_hole_bands =SCATT_hole_bands - COLL_elec_bands =SCATT_elec_bands + COLL_bands_frozen=SCATT_bands_frozen H_ref_bands=SCATT_bands - H_ref_hole_bands=SCATT_hole_bands - H_ref_elec_bands=SCATT_elec_bands + H_ref_bands_frozen=SCATT_bands_frozen #endif Dip%ib=DIP_bands ! @@ -189,3 +183,38 @@ subroutine def_dip_bands(bands_in) end subroutine def_dip_bands ! end subroutine +! +! +subroutine LEVELS_frozen(TMP_bands,TMP_bands_frozen,TMP_bands_frozen_ch,TMP_kind,nb) + ! + use pars, ONLY:LP,schlen + use parser_m, ONLY:parser + use stderr, ONLY:STRING_split,intc + ! + implicit none + ! + integer, intent(in) :: TMP_bands(2),nb + character(schlen), intent(in) :: TMP_bands_frozen_ch + character(*), intent(in) :: TMP_kind + integer(LP), intent(out) :: TMP_bands_frozen(nb) + ! + integer :: ib1,ib2 + logical :: l_freeze_bands + character(schlen) :: TMP_bands_frozen_list(nb) + ! + TMP_bands_frozen=0 + ! + call parser(trim(TMP_kind)//'FrozenBands', l_freeze_bands) + if (l_freeze_bands) then + call STRING_split(TMP_bands_frozen_ch,TMP_bands_frozen_list) + ib1=1 + do ib2=TMP_bands(1),TMP_bands(2) + !write(*,*) ib1,ib2,trim(intc(ib2))," ",trim(TMP_bands_frozen_list(ib1)),& + !& trim(intc(ib2))==trim(TMP_bands_frozen_list(ib1)) + if( .not. trim(intc(ib2))==trim(TMP_bands_frozen_list(ib1)) ) cycle + TMP_bands_frozen(ib2-TMP_bands(1)+1)=1 + ib1=ib1+1 + enddo + endif + ! +end subroutine LEVELS_frozen diff --git a/src/hamiltonian/Apply_W_field.F b/src/hamiltonian/Apply_W_field.F index 2e98554994..a8ced57be1 100644 --- a/src/hamiltonian/Apply_W_field.F +++ b/src/hamiltonian/Apply_W_field.F @@ -9,7 +9,7 @@ subroutine Apply_W_field(A_input,Wk,H_nl_sc) ! use pars, ONLY:SP,cZERO use units, ONLY:SPEED_OF_LIGHT - use hamiltonian, ONLY:H_ref_bands,H_ref_hole_bands,H_ref_elec_bands + use hamiltonian, ONLY:H_ref_bands,H_ref_bands_frozen use fields, ONLY:gauge_field ! implicit none @@ -21,22 +21,15 @@ subroutine Apply_W_field(A_input,Wk,H_nl_sc) ! Work Space ! integer :: i1,i2,id - logical :: l_selective_coupling complex(SP) :: E_vec_pot(3) ! - l_selective_coupling=all((/H_ref_hole_bands/=-1,H_ref_elec_bands/=-1/)) - ! E_vec_pot=-A_input%vecpot_vel/SPEED_OF_LIGHT ! !$omp parallel do default(shared), private(i1,i2,id) do i1=H_ref_bands(1),H_ref_bands(2) - if ( l_selective_coupling .and. i1H_ref_hole_bands(2) .and. i1H_ref_elec_bands(2) ) cycle + if ( H_ref_bands_frozen(i1)==1 ) cycle do i2=H_ref_bands(1),H_ref_bands(2) - if ( l_selective_coupling .and. i2H_ref_hole_bands(2) .and. i2H_ref_elec_bands(2) ) cycle + if ( H_ref_bands_frozen(i2)==1 ) cycle do id=1,3 H_nl_sc(i1,i2)=H_nl_sc(i1,i2)+E_vec_pot(id)*Wk(id,i1,i2) enddo diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 5f3f075b5b..3261bd3233 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -51,8 +51,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use QP_m, ONLY:QP_QED_ng #endif #if defined _SC || defined _RT || defined _QED - use hamiltonian, ONLY:H_potential - use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLL_hole_bands,COLL_elec_bands + use hamiltonian, ONLY:H_potential,H_ref_bands_frozen + use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLL_bands_frozen,COLL_bands_frozen_ch #endif use QP_m, ONLY:SC_E_threshold #if defined _SC @@ -60,7 +60,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use SC, ONLY:SC_iterations,SC_up_W_iters,& & SC_rho_threshold,SC_cycle_mixing,& & SC_bands,SC_preconditioning,OEP_approx,& -& SC_neq_kind,SC_mu,SC_last_coh_it +& SC_neq_kind,SC_mu,SC_last_coh_it,& +& SC_bands_frozen,SC_bands_frozen_ch #endif #if defined _RT use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t, & @@ -68,19 +69,19 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem use RT_lifetimes, ONLY:RT_life_extrap_times_INPUT use real_time, ONLY:RT_step, Integrator_name, RAD_LifeTime, Phase_LifeTime, & -& NE_tot_time,RT_bands,RT_hole_bands,RT_elec_bands,RT_deph_range, & +& NE_tot_time,RT_bands,RT_bands_frozen_ch,RT_deph_range, & & RT_ave_dephasing,RT_eh_en,RT_scatt_tresh,Gr_kind, & & NE_MEM_treshold,NE_time_step_update_jump_INPUT, & & two_alpha,DbGd_EE_percent,NE_time_step_update_jump, & & NE_initial_time_step_update,NE_step_update_treshold, & -& RT_MAX_step,RAD_magnification, & +& RT_MAX_step,RAD_magnification,RT_bands_frozen, & & RT_deph_deg_thresh,RT_step_manual_prefactor,NE_time_step_update_manual use fields, ONLY:n_ext_fields_max,n_ext_fields use plasma, ONLY:PLASMA_redux_percent #endif #if defined _NL use nl_optics, ONLY:NL_bands,NL_damping,NL_correlation,NL_er,n_frequencies,NL_LRC_alpha, & -& NL_verb_name,n_angles,NL_rot_axis,NL_hole_bands,NL_elec_bands,max_angle +& NL_verb_name,n_angles,NL_rot_axis,NL_bands_frozen,NL_bands_frozen_ch,max_angle #endif #if defined _NL | defined _SC use fields, ONLY:Efield @@ -423,8 +424,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! Real Time dynamics ! call it(defs,'RTBands', '[RT] Bands',RT_bands) - call it(defs,'RTHoleBands','[RT] Active Bands range in valence',RT_hole_bands,Verb_level=V_real_time) - call it(defs,'RTElecBands','[RT] Active Bands range in conduct',RT_elec_bands,Verb_level=V_real_time) + call it(defs,'RTFrozenBands','[RT] Frozen Bands list',RT_bands_frozen_ch,Verb_level=V_real_time) ! ! This call is a temporary fix due to the multiple definition of energy ranges. ! The call is needed to align the different values based on the USER definition. @@ -534,8 +534,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! Non-linear Optics ! call it(defs,'NLBands', '[NL] Bands range',NL_bands) - call it(defs,'NLHoleBands', '[NL] Active Bands range in valence',NL_hole_bands,Verb_level=V_nl_optics) - call it(defs,'NLElecBands', '[NL] Active Bands range in conduct',NL_elec_bands,Verb_level=V_nl_optics) + call it(defs,'NLFrozenBands','[NL] Frozen Bands list',NL_bands_frozen_ch,Verb_level=V_nl_optics) call it(defs,'NLverbosity', '[NL] Verbosity level (low | high)',NL_verb_name) call it(defs,'NLstep', '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics) call it(defs,'NLtime', '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1)) @@ -724,8 +723,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! SC and RT common ! call it(defs,'COLLBands', '[COLL] Bands for the collisions',COLL_bands) - call it(defs,'COLLHoleBands','[COLL] Active Bands range in valence',COLL_hole_bands,Verb_level=V_sc) - call it(defs,'COLLElecBands','[COLL] Active Bands range in conduct',COLL_elec_bands,Verb_level=V_sc) + call it(defs,'COLLFrozenBands','[COLL] Frozen Bands list',COLL_bands_frozen_ch,Verb_level=V_sc) ! call it(defs,'HXC_Potential', '[SC] SC HXC Potential',H_potential,protect=.FALSE.,case="A") call it(defs,'COLLCut', '[SC,RT] Cutoff on the collisions, 0=full 1=none (default =0.0005)',& @@ -734,8 +732,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! #endif ! -#if defined _RT -#endif ! #if defined _SC call it('f',defs,'OEPItSolver','[SC] Iterative solution instead of inversion of OEP') @@ -743,6 +739,24 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif ! if (initmode==4) then +#if defined _SC || defined _RT || defined _NL + allocate(H_ref_bands_frozen(en%nb)) + H_ref_bands_frozen=0 + allocate(COLL_bands_frozen(en%nb)) + call LEVELS_frozen(COLL_bands,COLL_bands_frozen,COLL_bands_frozen_ch,"COLL",en%nb) +#endif +#if defined _RT + allocate(RT_bands_frozen(en%nb)) + call LEVELS_frozen(RT_bands,RT_bands_frozen,RT_bands_frozen_ch,"RT",en%nb) +#endif +#if defined _SC + allocate(SC_bands_frozen(en%nb)) + call LEVELS_frozen(SC_bands,SC_bands_frozen,SC_bands_frozen_ch,"SC",en%nb) +#endif +#if defined _NL + allocate(NL_bands_frozen(en%nb)) + call LEVELS_frozen(NL_bands,NL_bands_frozen,NL_bands_frozen_ch,"NL",en%nb) +#endif call LEVELS_mirror("MIRROR_q",en,X,Dip,l_USER_fields) call LEVELS_mirror("MIRROR_bands",en,X,Dip,l_USER_fields) endif diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 241954db18..528ee599c9 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -15,7 +15,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) use parallel_m, ONLY:master_cpu use iso_c_binding, ONLY:C_LOC,C_F_POINTER use collision_ext, ONLY:COLLISIONS_element,COLLISIONS_group,PAR_COLL_min,& -& COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP +& COLLISIONS_CV_only,COLL_bands_frozen,COLLISIONS_load_SP use IO_m, ONLY:io_sec,io_status,IO_OUTDATED_DB,read_is_on,IO_mode,io_unit,& & VERIFY,io_extension,write_is_on,nf90_sync,netcdf_call,YAMBO_DEF_CHUNK use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq,io_fragment, & @@ -42,6 +42,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) character(1) :: TMP_VAR(1) character(schlen) :: db_name integer :: i_coll,i_coll_mem,sync_step,stat,COLL_chunksize(3),N(3) + integer :: Nbv,Nbc,Nb1,Nb2,Nk logical :: def1,def2,io2,io3,io4,file_sync ! call timing('io_COLLISIONS',OPR='start') @@ -68,14 +69,21 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) if (def1) then call def_variable_bulk(ID,'N_COLLISIONS_STATES',1,(/1/),IP_YIO,par_io_kind='independent') if (write_is_on(ID)) then - if (COLLISIONS_CV_only.or.COLLISIONS_FEW_only) then - N(3)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk - N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nc - N(1)=COLL_grp%D(1,4)-COLL_grp%D(1,1)+1 ! Nv + Nk=COLL_grp%D(3,2)-COLL_grp%D(3,1)+1 + Nbc=COLL_grp%D(2,2)-COLL_grp%D(2,3)+1 + Nbv=COLL_grp%D(1,4)-COLL_grp%D(1,1)+1 + Nb2=COLL_grp%D(2,2)-COLL_grp%D(2,1)+1 + Nb1=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 + if (any((/COLL_bands_frozen==1/))) then + Nb2=count(COLL_bands_frozen(COLL_grp%D(2,1):COLL_grp%D(2,2))==0) + Nb1=count(COLL_bands_frozen(COLL_grp%D(1,1):COLL_grp%D(1,2))==0) + Nbc=count(COLL_bands_frozen(COLL_grp%D(2,2):COLL_grp%D(2,3))==0) + Nbv=count(COLL_bands_frozen(COLL_grp%D(1,1):COLL_grp%D(1,4))==0) + endif + if (COLLISIONS_CV_only) then + N=(/Nbv,Nbc,2*Nk/) else - N(3)=COLL_grp%D(3,2)-COLL_grp%D(3,1)+1 - N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1)+1 - N(1)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 + N=(/Nb1,Nb2,Nk/) endif COLL_element%N=N(1)*N(2)*N(3)*n_sp_pol endif diff --git a/src/io_parallel/io_COLLISIONS_header.F b/src/io_parallel/io_COLLISIONS_header.F index aefa3adedb..d20c3ab0c7 100644 --- a/src/io_parallel/io_COLLISIONS_header.F +++ b/src/io_parallel/io_COLLISIONS_header.F @@ -14,8 +14,7 @@ integer function io_COLLISIONS_header(ID,COLL) use pars, ONLY:schlen,IP,IP_YIO,LP_YIO use R_lattice, ONLY:RIM_ng,RIM_n_rand_pts use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLLISIONS_group,& -& COLLISIONS_CV_only,COLLISIONS_FEW_only,& -& COLL_hole_bands,COLL_elec_bands +& COLLISIONS_CV_only,COLL_bands_frozen use IO_m, ONLY:variable_exist,write_is_on,io_status,IO_OUTDATED_DB,read_is_on use IO_int, ONLY:io_connect,io_header,io_elemental,ver_is_gt_or_eq, & & io_variable_bulk,def_variable_bulk,io_disconnect, & @@ -102,19 +101,6 @@ integer function io_COLLISIONS_header(ID,COLL) endif call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) ! - if (variable_exist(ID,'COLLISIONS_FEW_only').or.write_is_on(ID)) then - call def_variable_elemental(ID,VAR="FEW_only_scattering",VAR_SZ=1,VAR_KIND=LP_YIO,MENU=0) - call io_variable_elemental(ID,L0=COLLISIONS_FEW_only,VAR='FEW only scattering ',WARN=.true.,OP=(/"=="/)) - call def_variable_elemental(ID,VAR="COLL_hole_bands",VAR_SZ=2,VAR_KIND=IP_YIO,MENU=0) - call io_variable_elemental(ID,I1=COLL_hole_bands, VAR='COLL bands holes ',WARN=.true.,OP=(/"==","=="/)) - call def_variable_elemental(ID,VAR="COLL_elec_bands",VAR_SZ=2,VAR_KIND=IP_YIO,MENU=0) - call io_variable_elemental(ID,I1=COLL_elec_bands, VAR='COLL bands elecs ',WARN=.true.,OP=(/"==","=="/)) - else - COLLISIONS_FEW_only=.false. - COLL_hole_bands=-1 - COLL_elec_bands=-1 - endif - ! if(COLL%kind==H_SE_HARTREE.or.COLL%kind==H_SE_FOCK.or.COLL%kind==H_SE_SEX.or.COLL%kind>=H_SE_HARTREE) then ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=0) @@ -162,13 +148,20 @@ integer function io_COLLISIONS_header(ID,COLL) ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) ! + if (variable_exist(ID,'COLL_bands_frozen').or.write_is_on(ID)) then + call def_variable_bulk(ID,"COLL_bands_frozen",1,shape(COLL_bands_frozen),LP_YIO) + call io_variable_bulk(ID,1,L1=COLL_bands_frozen) + else + COLL_bands_frozen=.false. + endif + ! ! States ! if (read_is_on(ID).and..not.allocated(COLL%state)) then YAMBO_ALLOC(COLL%state,(COLL%N,4)) endif - call def_variable_bulk(ID,'COLLISIONS_STATE',1,(/COLL%N,4/),IP_YIO) - call io_variable_bulk(ID,1,I2=COLL%state) + call def_variable_bulk(ID,'COLLISIONS_STATE',2,(/COLL%N,4/),IP_YIO) + call io_variable_bulk(ID,2,I2=COLL%state) ! io_COLLISIONS_header=io_status(ID) ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index bb934839e9..7e6f7c94e4 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -78,8 +78,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & l_SC_nl_mix,SC_kind,SC_perturbation,SC_desc,SC_neq_kind,SC_last_coh_it #endif #if defined _SC || defined _RT || defined _QED || defined _NL - use collision_ext, ONLY:COLLISIONS_naming,COLLISIONS_cutoff,COLLISIONS_CV_only,COLLISIONS_FEW_only, & -& COLLISIONS_load_SP,COLLISIONS_compr,COLL_hole_bands,COLL_elec_bands + use collision_ext, ONLY:COLLISIONS_naming,COLLISIONS_cutoff,COLLISIONS_CV_only, & +& COLLISIONS_load_SP,COLLISIONS_compr,COLL_bands_frozen_ch use hamiltonian, ONLY:H_potential #endif #if defined _RT || defined _YPP_RT @@ -90,7 +90,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history use RT_lifetimes,ONLY:RT_life_extrap_times use real_time, ONLY:RT_step,NE_steps,NE_time,Integrator_name,RT_deph_range,& -& Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,RT_elec_bands,RT_hole_bands,& +& Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,RT_bands_frozen_ch,& & NE_tot_time,NE_MEM_treshold,RT_eh_en,l_update_SOC,& & DbGd_EE_percent,RT_scatt_tresh,integrator_step,RT_nk,& & i_MEM_old,i_MEM_prev,i_MEM_now,G_MEM_steps,RT_step_manual_prefactor,& @@ -103,7 +103,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) #endif #if defined _NL use nl_optics, ONLY:NL_correlation,NL_er,n_frequencies,NL_damping,NL_LRC_alpha,NL_initial_versor, & -& NL_verb_name,NL_bands,NL_desc,n_angles,NL_rot_axis,NL_hole_bands,NL_elec_bands,max_angle +& NL_verb_name,NL_bands,NL_desc,n_angles,NL_rot_axis,NL_bands_frozen_ch,max_angle use fields, ONLY:Efield,Efield_reset #endif #if defined _SC @@ -555,12 +555,10 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) # endif ! COLLISIONS_CV_only=.FALSE. - COLLISIONS_FEW_only=.FALSE. COLLISIONS_load_SP=.FALSE. COLLISIONS_compr =.FALSE. ! - COLL_hole_bands=-1 - COLL_elec_bands=-1 + COLL_bands_frozen_ch="" ! H_potential="NONE" ! @@ -622,8 +620,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) NE_time=0._SP NE_tot_time= 1000._SP*FS2AUT ! - RT_hole_bands=-1 - RT_elec_bands=-1 + RT_bands_frozen_ch="" ! NE_time_step_update_last_point = 1 NE_time_step_update_jump = 0._SP @@ -704,8 +701,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) NE_tot_time = -1._SP*FS2AUT Integrator_name='INVINT' NL_bands =(/0,0/) - NL_hole_bands =-1 - NL_elec_bands =-1 + NL_bands_frozen_ch="" NL_correlation="IPA" NL_er =(/-1._SP,-1._SP/)/HA2EV n_frequencies =0 diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 7ad56d6eb3..c37d47832e 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -12,7 +12,7 @@ ! module BS ! - use pars, ONLY: IP,IPL,SP,schlen,lchlen + use pars, ONLY: IP,IPL,LP,SP,schlen,lchlen use collision_el, ONLY: elemental_collision use gpu_m, ONLY: have_gpu use y_memory_alloc @@ -87,7 +87,7 @@ module BS real(SP),allocatable :: BS_kpt_bz(:,:) real(SP),allocatable :: BS_kpt_ibz(:,:) integer,allocatable :: BS_K_io_map(:) - logical,allocatable :: BS_bands_frozen(:) + integer(LP),allocatable :: BS_bands_frozen(:) ! ! Resonant/Antiresonant handling !================================ diff --git a/src/modules/mod_SC.F b/src/modules/mod_SC.F index 734ee31aa7..2cf8f146d2 100644 --- a/src/modules/mod_SC.F +++ b/src/modules/mod_SC.F @@ -12,7 +12,7 @@ module SC ! use descriptors, ONLY:IO_desc - use pars, ONLY:SP,schlen,lchlen + use pars, ONLY:SP,LP,schlen,lchlen use y_memory_alloc ! implicit none @@ -33,6 +33,9 @@ module SC real(SP) :: SC_rho_threshold real(SP) :: SC_cycle_mixing ! + character(schlen) :: SC_bands_frozen_ch + integer(LP), allocatable:: SC_bands_frozen(:) + ! character(schlen) :: SC_preconditioning="simple" character(schlen) :: SC_potential logical :: compatible_SC_DB diff --git a/src/modules/mod_collision_ext.F b/src/modules/mod_collision_ext.F index bfb81471c0..b26e02ff8c 100644 --- a/src/modules/mod_collision_ext.F +++ b/src/modules/mod_collision_ext.F @@ -17,11 +17,12 @@ module collision_ext implicit none ! integer :: COLL_bands(2) - integer :: COLL_hole_bands(2) - integer :: COLL_elec_bands(2) integer :: COLL_ID integer :: PAR_COLL_min = 0 ! + character(schlen) :: COLL_bands_frozen_ch + integer(LP), allocatable:: COLL_bands_frozen(:) + ! ! Cut off on exchange matrix elements ! Sx_cutoff=0 all, (Sx_cutoff>1 or Sx_cutoff<0)=none ! @@ -34,7 +35,6 @@ module collision_ext logical :: COLLISIONS_HXC_MB=.FALSE. logical :: COLLISIONS_HXC_use_TDDFT=.FALSE. logical :: COLLISIONS_CV_only=.FALSE. - logical :: COLLISIONS_FEW_only=.FALSE. logical :: COLLISIONS_from_BSE=.FALSE. logical :: COLLISIONS_load_SP=.FALSE. ! Force loading of collision in single precision logical :: COLLISIONS_compr =.FALSE. ! If parallel-io is used collisions in memory are compressed diff --git a/src/modules/mod_hamiltonian.F b/src/modules/mod_hamiltonian.F index 14b32d26cf..de0fda624f 100644 --- a/src/modules/mod_hamiltonian.F +++ b/src/modules/mod_hamiltonian.F @@ -11,17 +11,18 @@ ! module hamiltonian ! - use pars, ONLY:SP,schlen + use pars, ONLY:LP,SP,schlen use electrons, ONLY:levels use y_memory_alloc ! implicit none ! integer :: H_ref_bands(2) - integer :: H_ref_hole_bands(2) - integer :: H_ref_elec_bands(2) integer :: H_ref_nbands ! + character(schlen) :: H_ref_bands_frozen_ch + integer(LP), allocatable:: H_ref_bands_frozen(:) + ! character(schlen) :: H_potential ! ! Possible Kinds, functionals and external perturbations diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 14abe6f70e..075fab2cf7 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -12,7 +12,7 @@ module nl_optics ! use descriptors, ONLY:IO_desc - use pars, ONLY:SP,schlen,lchlen + use pars, ONLY:SP,LP,schlen,lchlen use electrons, ONLY:levels use real_time, ONLY:NE_steps,dG_lesser use y_memory_alloc @@ -117,8 +117,6 @@ module nl_optics real(SP) :: NL_estep real(SP) :: NL_ang_step integer :: NL_bands(2) - integer :: NL_elec_bands(2) - integer :: NL_hole_bands(2) integer :: NL_nbands integer :: n_angles real(SP) :: max_angle @@ -131,6 +129,9 @@ module nl_optics logical :: Loop_on_frequencies logical :: Loop_on_angles ! + character(schlen) :: NL_bands_frozen_ch + integer(LP), allocatable:: NL_bands_frozen(:) + ! ! Velocity gauge in indepdent particle ! logical :: l_velocity_IPA=.FALSE. diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 1c85872273..58ca905920 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -140,9 +140,9 @@ module real_time ! integer :: RT_nk integer :: RT_bands(2) - integer :: RT_elec_bands(2) - integer :: RT_hole_bands(2) integer :: RT_nbands + character(schlen) :: RT_bands_frozen_ch + integer(LP), allocatable:: RT_bands_frozen(:) ! ! Equilibrium V_xc and V_hartree in real space ! Presently REF_V_hartree_sc is not used diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 7f7ac9a3a9..faddd593a2 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -18,7 +18,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) use QP_m, ONLY: QP_ng_SH,QP_ng_Sx use LIVE_t, ONLY:live_timing use electrons, ONLY:levels,n_sp_pol - use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_FEW_only,HXC_collisions + use collision_ext, ONLY:COLLISIONS_CV_only,COLL_bands_frozen,HXC_collisions use X_m, ONLY:global_gauge,X_t use DIPOLES, ONLY:DIPOLE_t,DIP_S use ALLOC, ONLY:DIPOLE_ALLOC_elemental,DIPOLE_ALLOC_global @@ -174,7 +174,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) if(l_use_Hxc_collisions.and..not.COLLISIONS_have_HARTREE) eval_HARTREE=.TRUE. ! if(COLLISIONS_CV_only) call msg('rs','Collisions contains C<->V ONLY scatterings') - if(COLLISIONS_FEW_only) call msg('rs','Collisions contains ONLY selected scatterings') + if(any((/COLL_bands_frozen==1/))) call msg('rs','Collisions contains ONLY selected scatterings') ! endif ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 32c595406d..7b8fc1409f 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -14,7 +14,7 @@ subroutine NL_initialize(E,k) use pars, ONLY:SP,DP,pi use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_hartree use vec_operate, ONLY:normalize_v,v_norm,cross_product - use collision_ext, ONLY:COLLISIONS_CV_only,COLLISIONS_FEW_only,COLLISIONS_load_SP,COLLISIONS_compr + use collision_ext, ONLY:COLLISIONS_CV_only,COLL_bands_frozen,COLLISIONS_load_SP,COLLISIONS_compr use hamiltonian, ONLY:H_potential use units, ONLY:AU2VMm1,AUT2FS,HA2EV use electrons, ONLY:levels,n_sp_pol @@ -424,7 +424,7 @@ subroutine NL_initialize(E,k) if(eval_COLLISIONS) then ! if(COLLISIONS_CV_only) call warning(' ONLY cv scattering in COLLISIONS! ') - if(COLLISIONS_FEW_only) call warning(' ONLY selected scattering in COLLISIONS! ') + if( any((/COLL_bands_frozen==1/)) ) call warning(' ONLY selected scattering in COLLISIONS! ') ! if(l_no_compress_COLL) then call msg('sr','Full collisions in double-precision ') diff --git a/src/real_time_hamiltonian/RT_apply_field.F b/src/real_time_hamiltonian/RT_apply_field.F index 40e767668a..9750e51d4e 100644 --- a/src/real_time_hamiltonian/RT_apply_field.F +++ b/src/real_time_hamiltonian/RT_apply_field.F @@ -17,7 +17,7 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) use fields, ONLY:gauge_field use DIPOLES, ONLY:DIP_iR,DIP_P,DIP_v,DIP_P_spinor use X_m, ONLY:global_gauge - use real_time, ONLY:RT_bands,RT_hole_bands,RT_elec_bands,l_update_SOC,l_velocity_gauge_corr + use real_time, ONLY:RT_bands,RT_bands_frozen,l_update_SOC,l_velocity_gauge_corr use vec_operate, ONLY:cross_product use D_lattice, ONLY:sigma_x,sigma_y,sigma_z use parallel_m, ONLY:PAR_Xk_ibz_index @@ -30,13 +30,10 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! ! Work Space ! - logical :: l_selective_coupling integer :: i1,i2,i_spinor,j_spinor complex(SP) :: A_dot_J(2),E_dot_P(2),& & ExJs(3,n_spinor,n_spinor),A_vec_pot(3),E_vec_pot(3),& & POL(3),Jtot(3),Jspinor(3,n_spinor,n_spinor),sigma_dot_ExJs - ! - l_selective_coupling=all((/RT_hole_bands/=-1,RT_elec_bands/=-1/)) ! select case(trim(global_gauge)) ! @@ -63,9 +60,7 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) !$omp parallel do default(shared), private(i1,Jtot,A_dot_J) do i1=RT_bands(1),RT_bands(2) ! - if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + if ( RT_bands_frozen(i1)==1 ) cycle ! ! Case A: the pseudo-potential is correctly gauged, so A*p enters the hamiltonian if ( l_velocity_gauge_corr) Jtot(1:3)= -DIP_P(1:3,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) @@ -83,15 +78,11 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) !$omp parallel do default(shared), private(i1,i2,Jtot,A_dot_J) do i1=RT_bands(1),RT_bands(2) ! - if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + if ( RT_bands_frozen(i1)==1 ) cycle ! do i2=i1+1,RT_bands(2) ! - if ( l_selective_coupling .and. i2RT_hole_bands(2) .and. i2RT_elec_bands(2) ) cycle + if ( RT_bands_frozen(i2)==1 ) cycle ! ! Note that (P)_cv = DIP_P (:,iv,ic,:,:) ! the off-diagonal diamagnetic term is zero @@ -122,9 +113,7 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! do i1=RT_bands(1),RT_bands(2) ! - if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + if ( RT_bands_frozen(i1)==1 ) cycle ! POL(:)=cI*DIP_iR(:,i1,i1,PAR_Xk_ibz_index(ik),i_sp_pol) E_dot_P(1)=sum(E_vec_pot(1:3)* POL(1:3) ) @@ -154,15 +143,11 @@ subroutine RT_apply_field(ik,i_sp_pol,H_nl_sc,A_input) ! do i1=RT_bands(1),RT_bands(2) ! - if ( l_selective_coupling .and. i1RT_hole_bands(2) .and. i1RT_elec_bands(2) ) cycle + if ( RT_bands_frozen(i1)==1 ) cycle ! do i2=i1+1,RT_bands(2) ! - if ( l_selective_coupling .and. i2RT_hole_bands(2) .and. i2RT_elec_bands(2) ) cycle + if ( RT_bands_frozen(i2)==1 ) cycle ! ! Note that (iR)_cv = DIP_iR (:,iv,ic,:,:) ! From 85b1abde9be4b5510ee5ade6e8a8da4d23922551 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 4 Jul 2025 11:35:24 +0200 Subject: [PATCH 1033/1367] - Fixed levels freezing of states in collisions / real-time simulations --- src/interface/INIT_load.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 3261bd3233..be4890887d 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -743,19 +743,19 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) allocate(H_ref_bands_frozen(en%nb)) H_ref_bands_frozen=0 allocate(COLL_bands_frozen(en%nb)) - call LEVELS_frozen(COLL_bands,COLL_bands_frozen,COLL_bands_frozen_ch,"COLL",en%nb) + call LEVELS_frozen((/1,COLL_bands(2)/),COLL_bands_frozen,COLL_bands_frozen_ch,"COLL",en%nb) #endif #if defined _RT allocate(RT_bands_frozen(en%nb)) - call LEVELS_frozen(RT_bands,RT_bands_frozen,RT_bands_frozen_ch,"RT",en%nb) + call LEVELS_frozen((/1,RT_bands(2)/),RT_bands_frozen,RT_bands_frozen_ch,"RT",en%nb) #endif #if defined _SC allocate(SC_bands_frozen(en%nb)) - call LEVELS_frozen(SC_bands,SC_bands_frozen,SC_bands_frozen_ch,"SC",en%nb) + call LEVELS_frozen((/1,SC_bands(2)/),SC_bands_frozen,SC_bands_frozen_ch,"SC",en%nb) #endif #if defined _NL allocate(NL_bands_frozen(en%nb)) - call LEVELS_frozen(NL_bands,NL_bands_frozen,NL_bands_frozen_ch,"NL",en%nb) + call LEVELS_frozen((/1,NL_bands(2)/),NL_bands_frozen,NL_bands_frozen_ch,"NL",en%nb) #endif call LEVELS_mirror("MIRROR_q",en,X,Dip,l_USER_fields) call LEVELS_mirror("MIRROR_bands",en,X,Dip,l_USER_fields) From fe082557693513f97405bfe979741c4c5aa79383 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 5 Jul 2025 12:05:35 +0200 Subject: [PATCH 1034/1367] Addressed issue https://gitlab.com/lumen-code/lumen/-/issues/209 --- config/m4/acx_report.m4 | 10 ++++++--- config/m4/yambo_diago.m4 | 36 ++++++++++++++++++++--------- config/mk/global/defs.mk.in | 2 +- configure | 45 ++++++++++++++++++++++++++----------- src/bse/.objects | 4 +--- src/bse/K_diago_driver.F | 18 ++++++++++++++- 6 files changed, 83 insertions(+), 32 deletions(-) diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index 1c951946f1..bec78d1284 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -124,10 +124,14 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # -if test x"$with_ldiago_branch" = "xnone"; then - LDIAGO_check="I"; +if test "$compile_ldiago" = "yes"; then + if test x"$with_ldiago_branch" = "xnone"; then + LDIAGO_check="I"; + else + LDIAGO_check="G"; + fi else - LDIAGO_check="G"; + LDIAGO_check="-"; fi # PETSC_check="-" diff --git a/config/m4/yambo_diago.m4 b/config/m4/yambo_diago.m4 index 162fc69cc0..952a32e3ba 100644 --- a/config/m4/yambo_diago.m4 +++ b/config/m4/yambo_diago.m4 @@ -12,24 +12,38 @@ AC_ARG_WITH(ldiago-branch,[AS_HELP_STRING([--with-ldiago-branch=],[Use t # AC_CONFIG_FILES([lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in]) -# GPU flags are passed to ldiago compilation only if elpa library is available -if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then - ldiago_opt="$def_gpu $def_elpa" - LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" +if test "$def_scalapack" = "-D_SCALAPACK" ; then + + compile_ldiago="yes" + + # GPU flags are passed to ldiago compilation only if elpa library is available + if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then + ldiago_opt="$def_gpu $def_elpa" + LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" + else + ldiago_opt="$def_elpa" + LDIAGO_GPU_SUPPORT="no_gpu" + fi + + LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" + LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" + #LDIAGO_LIBS="${compdir}/lib/libldiago.a" + #LDIAGO_INCS="$IFLAG${compdir}/include/" + else - ldiago_opt="$def_elpa" - LDIAGO_GPU_SUPPORT="no_gpu" -fi -LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" -LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" -#LDIAGO_LIBS="${compdir}/lib/libldiago.a" -#LDIAGO_INCS="$IFLAG${compdir}/include/" + compile_ldiago="no" + ldiago_opt="" + LDIAGO_LIBS="" + LDIAGO_INCS="" + +fi AC_SUBST(LDIAGO_LIBS) AC_SUBST(LDIAGO_INCS) AC_SUBST(LDIAGO_GPU_SUPPORT) +AC_SUBST(compile_ldiago) AC_SUBST(ldiago_opt) AC_SUBST(with_ldiago_branch) diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index bcd62e068a..f093ea3670 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -36,7 +36,7 @@ do_libxc = @compile_libxc@ do_devxlib = @compile_devxlib@ do_petsc = @compile_petsc@ do_slepc = @compile_slepc@ -do_ldiago = yes +do_ldiago = @compile_ldiago@ do_magma = @compile_magma@ do_magma_fmodules = @compile_magma_fmodules@ shell = @SHELL@ diff --git a/configure b/configure index ec8de6abf4..2611b9255e 100755 --- a/configure +++ b/configure @@ -747,6 +747,7 @@ DEVXLIB_INCS DEVXLIB_LIBS with_ldiago_branch ldiago_opt +compile_ldiago LDIAGO_GPU_SUPPORT LDIAGO_INCS LDIAGO_LIBS @@ -16638,19 +16639,33 @@ fi ac_config_files="$ac_config_files lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in" -# GPU flags are passed to ldiago compilation only if elpa library is available -if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then - ldiago_opt="$def_gpu $def_elpa" - LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" +if test "$def_scalapack" = "-D_SCALAPACK" ; then + + compile_ldiago="yes" + + # GPU flags are passed to ldiago compilation only if elpa library is available + if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then + ldiago_opt="$def_gpu $def_elpa" + LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" + else + ldiago_opt="$def_elpa" + LDIAGO_GPU_SUPPORT="no_gpu" + fi + + LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" + LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" + #LDIAGO_LIBS="${compdir}/lib/libldiago.a" + #LDIAGO_INCS="$IFLAG${compdir}/include/" + else - ldiago_opt="$def_elpa" - LDIAGO_GPU_SUPPORT="no_gpu" + + compile_ldiago="no" + ldiago_opt="" + LDIAGO_LIBS="" + LDIAGO_INCS="" + fi -LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" -LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" -#LDIAGO_LIBS="${compdir}/lib/libldiago.a" -#LDIAGO_INCS="$IFLAG${compdir}/include/" @@ -17248,10 +17263,14 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # -if test x"$with_ldiago_branch" = "xnone"; then - LDIAGO_check="I"; +if test "$compile_ldiago" = "yes"; then + if test x"$with_ldiago_branch" = "xnone"; then + LDIAGO_check="I"; + else + LDIAGO_check="G"; + fi else - LDIAGO_check="G"; + LDIAGO_check="-"; fi # PETSC_check="-" diff --git a/src/bse/.objects b/src/bse/.objects index f893ee6ced..9a29d99f58 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -6,13 +6,11 @@ SLEPC_objects = K_stored_in_a_slepc_matrix.o K_shell_matrix.o K_stored_in_a_nest PARIO_objects = K_compress.o #endif #if defined _SCALAPACK -SLK_objects = K_inversion_do_it_SLK.o +SLK_objects = K_inversion_do_it_SLK.o LDIAGO_driver.o K_fill_block_cyclic.o #endif objs = K_blocks.o K_driver_init.o K_dipoles.o K_IP.o K_IP_sort.o \ K_Transitions_setup.o K_Transition_check.o \ K_driver.o BSE_utilities.o K_WF_phases.o \ - K_fill_block_cyclic.o \ - LDIAGO_driver.o \ K_kernel.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_exchange_kernel.o \ K_restart.o K_solvers.o K_Haydock.o K_Haydock_response.o K_Haydock_gather.o K_Haydock_scatter.o K_screened_interaction.o \ diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 42031c5266..3f7014f6f0 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -128,9 +128,13 @@ subroutine K_diago_driver(iq,W,X_static) l_kerr_lft=l_BS_kerr_asymm.or.l_BS_dichroism l_kerr_rgt=l_BS_kerr .or.l_BS_dichroism ! - l_diago = index(BSS_mode,'o')/=0 ! old diago l_slepc = index(BSS_mode,'s')/=0 +#if defined _SCALAPACK + l_diago = index(BSS_mode,'o')/=0 ! old diago l_ldiago = index(BSS_mode,'d')/=0 +#else + l_diago = index(BSS_mode,'o')/=0 .or. index(BSS_mode,'d')/=0 +#endif ! #if defined _NL if (l_ldiago) then @@ -251,6 +255,7 @@ subroutine K_diago_driver(iq,W,X_static) ! if (K_is_not_hermitian) then ! +#if defined _SCALAPACK if (l_ldiago) then ! BS_V_left are only referenced in non-hermitian case ! In coupling case, if the user requested n values, @@ -262,6 +267,7 @@ subroutine K_diago_driver(iq,W,X_static) & solver_type=BSS_ldiago_solver, elpasolver=elpa_solver) BSS_n_eig = size(BS_E) endif +#endif ! if(l_diago) then ! call LINEAR_ALGEBRA_driver(DIAGO,M=BS_V_right,E_cmpl=BS_E,V_left=BS_V_left) @@ -280,12 +286,14 @@ subroutine K_diago_driver(iq,W,X_static) ! else ! +#if defined _SCALAPACK if (l_ldiago) then call LDIAGO_driver(i_BS_mat, BS_E, BS_V_right, neigs_this_cpu, neig_shift, & & neigs_range=neigs_range, eigvals_range=eigvals_range, & & solver_type=BSS_ldiago_solver, elpasolver=elpa_solver) BSS_n_eig = size(BS_E) endif +#endif ! if(l_diago) then call LINEAR_ALGEBRA_driver(DIAGO,M=BS_V_right,E_real=BS_E_real) @@ -316,10 +324,12 @@ subroutine K_diago_driver(iq,W,X_static) ! if (l_diago) call live_timing( ) ! +#if defined _SCALAPACK if (l_ldiago) then ! BSS_n_eig could be lowered by LDIAGO_driver if (BSS_n_eig_before_solver>BSS_n_eig) call K_ldiago_resize_variables() endif +#endif ! ! Compute residuals ! @@ -423,7 +433,9 @@ subroutine K_diago_driver(iq,W,X_static) & BS_mat=BS_V_right,write_ev=.not.l_ldiago) ! call PP_wait() +#if defined _SCALAPACK if (l_ldiago .and. BSS_write_eig_2_db) call write_bs_ev_par(iq, i_BS_mat, BS_V_right, BS_V_left) +#endif endif ! YAMBO_FREE(BS_E) @@ -602,6 +614,7 @@ subroutine K_local_init() call warning('Preconditioning not supported in pseudo-hermitian case. Switching to non-hermitian diagonalization') endif ! +#if defined _SCALAPACK if (l_ldiago) then ! if (BSS_ldiago_solver/="s" .and. BSS_ldiago_solver/="e") then @@ -663,6 +676,7 @@ subroutine K_local_init() endif ! endif +#endif ! end subroutine K_local_init ! @@ -690,6 +704,7 @@ subroutine BSS_n_eig_init() ! if(l_diago) BSS_n_eig = BS_mat_dim ! +#if defined _SCALAPACK ! set a Ldiago defaults. if(l_ldiago) then ! @@ -720,6 +735,7 @@ subroutine BSS_n_eig_init() endif ! endif +#endif ! BSS_n_eig_before_solver=BSS_n_eig ! From cf1bf151998a8bc6c6d704c4b41160bacfcedd9e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 5 Jul 2025 12:14:48 +0200 Subject: [PATCH 1035/1367] if yambo is compiled in serial, internally compiled parallel HDF5 and NETCDF are not accepted --- config/m4/hdf5_f90.m4 | 2 +- config/m4/netcdf_f90.m4 | 2 +- configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/m4/hdf5_f90.m4 b/config/m4/hdf5_f90.m4 index 95d2ff5934..7f1b4793b8 100644 --- a/config/m4/hdf5_f90.m4 +++ b/config/m4/hdf5_f90.m4 @@ -256,7 +256,7 @@ if test x"$enable_hdf5" = "xyes"; then compile_hdf5="no" ; AC_MSG_RESULT([already compiled]) ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; IO_LIB_VER="parallel"; diff --git a/config/m4/netcdf_f90.m4 b/config/m4/netcdf_f90.m4 index 7e1cb7b1cd..57393cc4de 100644 --- a/config/m4/netcdf_f90.m4 +++ b/config/m4/netcdf_f90.m4 @@ -263,7 +263,7 @@ if test x"$enable_hdf5" = "xyes"; then compile_netcdf="no" ; AC_MSG_RESULT([already compiled]) ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_netcdf="no" ; IO_LIB_VER="parallel"; diff --git a/configure b/configure index 2611b9255e..2fa23aa33a 100755 --- a/configure +++ b/configure @@ -14522,7 +14522,7 @@ printf %s "checking for internal HDF5 library... " >&6; }; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 printf "%s\n" "already compiled" >&6; } ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; IO_LIB_VER="parallel"; @@ -14966,7 +14966,7 @@ printf %s "checking for internal NETCDF library... " >&6; }; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 printf "%s\n" "already compiled" >&6; } ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_netcdf="no" ; IO_LIB_VER="parallel"; From a621594f61d0df89d52496b3ea66f88251bd623c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 5 Jul 2025 12:23:05 +0200 Subject: [PATCH 1036/1367] Fixed compilation with --disable-mpi --- src/bse/K_kernel.F | 2 ++ src/bse/K_multiply_by_V.F | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 286e917f3e..a36781bb1f 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -305,7 +305,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) l_matrix_init=.true. l_load_kernel=.true. l_write_kernel=.false. +#if defined _MPI l_write_kernel_step= index(BSK_IO_mode,"write_all_steps")/=0 +#endif ! if (l_write_kernel_step) then call warning("Experimental mode, IO at every step. Restart not possible") diff --git a/src/bse/K_multiply_by_V.F b/src/bse/K_multiply_by_V.F index df5ecd2bcd..50e84d308b 100644 --- a/src/bse/K_multiply_by_V.F +++ b/src/bse/K_multiply_by_V.F @@ -57,11 +57,13 @@ subroutine K_multiply_by_V(Vi,Vo,iter_par,iq,mode) ColsFG_Tk = size(Vi(i_Tk)%fragment,2) ColsFG_Tp = size(Vi(i_Tp)%fragment,2) ! +#if defined _MPI if (i_B>BSS_kernel_last_stored_block) then call io_control(ACTION=RD,ID=BS_ID(2)) call io_BS_PAR_block(iq,i_B,BS_ID(2),"matonly") call K_block_symmetrize(i_B) endif +#endif ! select case(BS_blk(i_B)%mode) case("R") From 849701e9e29b896059d0227ca3488b979ae3ad6b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 6 Jul 2025 22:58:59 +0200 Subject: [PATCH 1037/1367] DOUBLE_project.dep files updated --- src/bse/DOUBLE_project.dep | 2 +- src/dipoles/DOUBLE_project.dep | 2 ++ src/io/DOUBLE_project.dep | 1 - src/linear_algebra/DOUBLE_project.dep | 2 +- src/modules/DOUBLE_project.dep | 1 - src/real_time_control/DOUBLE_project.dep | 1 + src/real_time_control/RT_project.dep | 1 + src/real_time_hamiltonian/DOUBLE_project.dep | 1 + src/real_time_hamiltonian/RT_project.dep | 1 + src/real_time_initialize/DOUBLE_project.dep | 1 - src/real_time_initialize/RT_project.dep | 1 - 11 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 492bc00bb3..274f365e98 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -51,7 +51,7 @@ K_stored_in_a_big_matrix.o K_stored_in_a_nest_matrix.o K_stored_in_a_slepc_matrix.o + LDIAGO_driver.o PL_diago_residual.o PL_via_perturbative_inversion.o - LDIAGO_driver.o diff --git a/src/dipoles/DOUBLE_project.dep b/src/dipoles/DOUBLE_project.dep index 2859c70e1f..b3a485972a 100644 --- a/src/dipoles/DOUBLE_project.dep +++ b/src/dipoles/DOUBLE_project.dep @@ -2,6 +2,7 @@ Build_Overlaps_Det_EQ.o DIPOLE_IO.o DIPOLE_SC_rotate.o + DIPOLE_build_der_k.o DIPOLE_check_shifted_grids.o DIPOLE_covariant.o DIPOLE_dimensions.o @@ -24,5 +25,6 @@ DIPOLE_spin_magnetization.o DIPOLE_x_real_space.o Ionic_polarization.o + OVERLAPS_IO.o POLARIZATION_output.o diff --git a/src/io/DOUBLE_project.dep b/src/io/DOUBLE_project.dep index 9bb4002056..955f2675b8 100644 --- a/src/io/DOUBLE_project.dep +++ b/src/io/DOUBLE_project.dep @@ -32,7 +32,6 @@ io_RT_components_header.o io_SC_components.o io_USPP_pwscf.o - io_Vnl.o io_WF.o io_X.o io_descriptors.o diff --git a/src/linear_algebra/DOUBLE_project.dep b/src/linear_algebra/DOUBLE_project.dep index 01c2bbd778..ac3bcff9d9 100644 --- a/src/linear_algebra/DOUBLE_project.dep +++ b/src/linear_algebra/DOUBLE_project.dep @@ -6,7 +6,7 @@ PARALLEL_inversion.o PARALLEL_lin_system.o SERIAL_HERMITIAN_diagonalization.o - SERIAL_SVD_inversion.o + SERIAL_SVD.o SERIAL_diagonalization.o SERIAL_inversion.o SERIAL_lin_system.o diff --git a/src/modules/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index 7041bb894b..bd886c01f9 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -18,7 +18,6 @@ mod_MPA.o mod_NL_interfaces.o mod_OUTPUT.o - mod_Overlaps.o mod_PHOTOLUM.o mod_POL_FIT.o mod_QP.o diff --git a/src/real_time_control/DOUBLE_project.dep b/src/real_time_control/DOUBLE_project.dep index eafede5b35..07a445dff3 100644 --- a/src/real_time_control/DOUBLE_project.dep +++ b/src/real_time_control/DOUBLE_project.dep @@ -18,6 +18,7 @@ RT_do_it.o RT_energy_components.o RT_entropy.o + RT_field_from_file.o RT_free.o RT_interpolation_doit_and_transfer.o RT_interpolation_driver.o diff --git a/src/real_time_control/RT_project.dep b/src/real_time_control/RT_project.dep index eafede5b35..07a445dff3 100644 --- a/src/real_time_control/RT_project.dep +++ b/src/real_time_control/RT_project.dep @@ -18,6 +18,7 @@ RT_do_it.o RT_energy_components.o RT_entropy.o + RT_field_from_file.o RT_free.o RT_interpolation_doit_and_transfer.o RT_interpolation_driver.o diff --git a/src/real_time_hamiltonian/DOUBLE_project.dep b/src/real_time_hamiltonian/DOUBLE_project.dep index bb99b1bcd7..8321226358 100644 --- a/src/real_time_hamiltonian/DOUBLE_project.dep +++ b/src/real_time_hamiltonian/DOUBLE_project.dep @@ -1,4 +1,5 @@ RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o + RT_gradk_rho_times_E.o diff --git a/src/real_time_hamiltonian/RT_project.dep b/src/real_time_hamiltonian/RT_project.dep index bb99b1bcd7..8321226358 100644 --- a/src/real_time_hamiltonian/RT_project.dep +++ b/src/real_time_hamiltonian/RT_project.dep @@ -1,4 +1,5 @@ RT_Hamiltonian.o RT_Hamiltonian_diagonalize.o RT_apply_field.o + RT_gradk_rho_times_E.o diff --git a/src/real_time_initialize/DOUBLE_project.dep b/src/real_time_initialize/DOUBLE_project.dep index ee8a36165b..c350f2f4de 100644 --- a/src/real_time_initialize/DOUBLE_project.dep +++ b/src/real_time_initialize/DOUBLE_project.dep @@ -2,7 +2,6 @@ RT_ELPH_initialize.o RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o - RT_field_from_file.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index f4e45a6b39..7d13d8b4e4 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,7 +1,6 @@ RT_Dephasing_Matrix.o RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o - RT_field_from_file.o RT_initialize.o RT_occupations_and_levels_init.o RT_occupations_update.o From c21d7257845143698533e066a38c6d3524d50ae7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 7 Jul 2025 14:20:26 +0200 Subject: [PATCH 1038/1367] Fix for issue encountered when running td-hartree without collisions --- src/hamiltonian/WF_and_dipole_dimensions.F | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hamiltonian/WF_and_dipole_dimensions.F b/src/hamiltonian/WF_and_dipole_dimensions.F index 6189135ca2..f2a409df3b 100644 --- a/src/hamiltonian/WF_and_dipole_dimensions.F +++ b/src/hamiltonian/WF_and_dipole_dimensions.F @@ -80,12 +80,19 @@ subroutine WF_and_dipole_dimensions(X,Xk) ! endif ! - ! The following lines should be unified moving eval_HARTREE and eval_DFT - ! inside the hamoltonian module and using them also with yambo_sc + ! Instead of setting a WF_G_max, it would be better to directly load the WFs with the proper cutoff ! #if defined _RT || defined _NL + ! + ! If I'm running TD-HARTREE with lower cutoff, I likely to not put the Vxc cutoff in input + ! The DFT subroutines are called just to evaluate the equilibrium term with QP_ng_Vxc at the defaul (=mximum) + ! since WF_load is done with QP_ng_SH this makes the code crash. This prevents the code from crashing + ! + if (eval_HARTREE.and..not.eval_DFT) QP_ng_Vxc=QP_ng_SH + ! if (eval_HARTREE.or.eval_energy.or.l_velocity_gauge_corr.or..not.l_RT_is_WFfree) WF_G_max=max(QP_ng_SH, WF_G_max) if (eval_DFT .or.eval_energy.or.l_velocity_gauge_corr) WF_G_max=max(QP_ng_Vxc,WF_G_max) + ! #endif ! #if defined _SC From b121bb99218100cc2e25a4505bd00eb811b229f1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 9 Jul 2025 01:16:37 +0200 Subject: [PATCH 1039/1367] More proper fix for compilation, works also for serial IO, not only in serial --- src/bse/K_multiply_by_V.F | 2 +- src/bse/K_multiply_by_V_transpose.F | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bse/K_multiply_by_V.F b/src/bse/K_multiply_by_V.F index 50e84d308b..234f010900 100644 --- a/src/bse/K_multiply_by_V.F +++ b/src/bse/K_multiply_by_V.F @@ -57,7 +57,7 @@ subroutine K_multiply_by_V(Vi,Vo,iter_par,iq,mode) ColsFG_Tk = size(Vi(i_Tk)%fragment,2) ColsFG_Tp = size(Vi(i_Tp)%fragment,2) ! -#if defined _MPI +#if defined _PAR_IO if (i_B>BSS_kernel_last_stored_block) then call io_control(ACTION=RD,ID=BS_ID(2)) call io_BS_PAR_block(iq,i_B,BS_ID(2),"matonly") diff --git a/src/bse/K_multiply_by_V_transpose.F b/src/bse/K_multiply_by_V_transpose.F index 4fef484e87..c5a8b7fcbe 100644 --- a/src/bse/K_multiply_by_V_transpose.F +++ b/src/bse/K_multiply_by_V_transpose.F @@ -49,11 +49,13 @@ subroutine K_multiply_by_V_transpose(Vi,Vo,iter_par,iq) i_Tk =BS_blk(i_B)%iT_k i_Tp =BS_blk(i_B)%iT_p ! +#if defined _PAR_IO if (i_B>BSS_kernel_last_stored_block) then call io_control(ACTION=RD,ID=BS_ID(2)) call io_BS_PAR_block(iq,i_B,BS_ID(2),"matonly") call K_block_symmetrize(i_B) endif +#endif ! select case(BS_blk(i_B)%mode) case("R") From ad3c5b013417be4ee96f029d30c89ca54c88da66 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 9 Jul 2025 09:15:56 +0200 Subject: [PATCH 1040/1367] Script add to report --- sbin/developer_tools/move_include_files.sh | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 sbin/developer_tools/move_include_files.sh diff --git a/sbin/developer_tools/move_include_files.sh b/sbin/developer_tools/move_include_files.sh new file mode 100755 index 0000000000..c8b10b32a8 --- /dev/null +++ b/sbin/developer_tools/move_include_files.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +for file in */*/*.F; do + + if [ "$file" == "interfaces/p2y/num_interpolation_module.F" ]; then continue; fi + if [ "$file" == "interfaces/p2y/pw_pseudo_module.F" ]; then continue; fi + if [ "$file" == "src/Ymodules/mod_cufft.F" ]; then continue; fi + if [ "$file" == "src/Ymodules/mod_cusolverdn_y.F" ]; then continue; fi + if [ "$file" == "src/Ymodules/mod_interfaces.F" ]; then continue; fi + if [ "$file" == "src/bse/K_diago_driver.F" ]; then continue; fi + if [[ "$file" == *"_incl.F"* ]]; then continue; fi + + echo "Checking file $file" + +awk ' +{ + lines[NR] = $0; # Store each line in an array +} +END { + for (i = 1; i <= NR; i++) { + if (lines[i] ~ /! Authors/) { + print lines[i]; # Print the line with ! Authors + k = 0; + for (j = 1; j <= NR; j++) { + if (lines[j] ~ /#include/) { + k++ ; + if (k == 1) { + print "!"; + print "! headers"; + print "!"; + print lines[j]; # Print #include lines + line_printed[k++]=lines[j] + } else { + print_line = 1; + for (kp = 1; kp < k; kp++) { + if ( lines[j] == line_printed[kp] ){ print_line = 0 } + } + if (print_line == 1){ + print lines[j] + line_printed[k++]=lines[j] + } + } + } + } + } + if (lines[i] !~ /! Authors/ && lines[i] !~ /#include/) { + print lines[i]; # Print other lines + } + if (lines[i] ~ /#include/ || lines[i] ~ /#include /) { + print " USE_MEMORY" ; + print " !"; + print " implicit none"; # Resume implicit none + } + } +} +' $file > $file.tmp +mv $file.tmp $file +done + From 3e5933328404b96129bcc2fd30c3928535f43660 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 9 Jul 2025 16:31:54 +0200 Subject: [PATCH 1041/1367] Fix to new script --- sbin/developer_tools/move_include_files.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/developer_tools/move_include_files.sh b/sbin/developer_tools/move_include_files.sh index c8b10b32a8..89dc04da43 100755 --- a/sbin/developer_tools/move_include_files.sh +++ b/sbin/developer_tools/move_include_files.sh @@ -47,7 +47,7 @@ END { print lines[i]; # Print other lines } if (lines[i] ~ /#include/ || lines[i] ~ /#include /) { - print " USE_MEMORY" ; + print " use y_memory_alloc" ; print " !"; print " implicit none"; # Resume implicit none } From 125a7da38aca9e88ce1355ff75111ed40065ce24 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 10 Jul 2025 10:11:01 +0200 Subject: [PATCH 1042/1367] gitignore updated for ldiago lib --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a3570aeeb5..b5153a7fde 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,7 @@ include/system/* lib/install/make_iotk.inc lib/iotk/make.sys lib/iotk/make_iotk.inc -lib/ydiago/make_ydiago.inc +lib/ldiago/make_ldiago.inc lib/yambo lib/*/*stamp lib/*/package-installed @@ -83,7 +83,7 @@ lib/*/petsc-* lib/*/slepc-* lib/*/futile* lib/*/yaml* -lib/*/Ydiago* +lib/*/Ldiago* lib/*/devicexlib* lib/hdf5/hdf5* lib/external/* From cc0a2095b70cc681a08ce0789c983fef707ab2e0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 11 Jul 2025 10:32:11 +0200 Subject: [PATCH 1043/1367] Fixed bug introduced in src/wf_and_fft/EXC_WF_symm_qpoint.F by shifting EXC_WF indexes --- src/wf_and_fft/EXC_WF_symm_qpoint.F | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wf_and_fft/EXC_WF_symm_qpoint.F b/src/wf_and_fft/EXC_WF_symm_qpoint.F index 28f8f91f4b..b0efc668ff 100644 --- a/src/wf_and_fft/EXC_WF_symm_qpoint.F +++ b/src/wf_and_fft/EXC_WF_symm_qpoint.F @@ -30,7 +30,7 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& integer, intent(in) :: first_state,nstates integer, intent(in) :: iq,isq,igq integer, intent(inout):: ID - complex(SP), intent(out) :: EXC_WFs(BS_H_dim,first_state:nstates) + complex(SP), intent(out) :: EXC_WFs(BS_H_dim,nstates) integer, intent(in) :: S_index(BSS_n_eig) logical, intent(in) :: l_min_mem ! @@ -45,8 +45,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& complex(SP), allocatable :: WF_phases_cc(:,:,:,:,:),WF_phases_vv(:,:,:,:,:) ! if(isq==idt_index) then - do iexc=first_state,nstates - il=S_index(iexc) + do iexc=1,nstates + il=S_index(iexc+first_state-1) EXC_WFs(:,iexc)=BS_mat(:,il) enddo return @@ -137,8 +137,8 @@ subroutine EXC_WF_symm_qpoint(Xk,qpt,first_state,nstates,iq,isq,igq,& ! endif ! - do iexc=first_state,nstates - il=S_index(iexc) + do iexc=1,nstates + il=S_index(iexc+first_state-1) ! do iv1 = BS_bands(1),BS_bands(2) ! From 670217dcf547110c6b5057fcb42730248a17e6b1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 11 Jul 2025 14:27:51 +0200 Subject: [PATCH 1044/1367] imported changes from branch phys-excitons: - Fixed bug introduced in WF_phase_matrices (wrong iG shift) - Removed WF_symm_kpoint_g_ssop and handled via optional argument in WF_symm_kpoint_g --- .../project_dependencies.stamp | 0 src/modules/mod_interfaces.F | 11 ++--------- src/wf_and_fft/WF_phase_matrices.F | 4 ++-- src/wf_and_fft/WF_symm_kpoint_g.F | 18 +++++++++++++----- 4 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index cf9ef103b2..72cd278bea 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -334,20 +334,13 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) type(tddft_wf_t), target, intent(inout) :: tddft_wf end function TDDFT_ALDA_eh_space_R_kernel ! - subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) - use pars, ONLY:SP - use wave_func, ONLY:WAVEs - integer, intent(in) :: b_to_load(2) - integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - complex(SP) DEV_ATTR, intent(in) :: ssop(2,2) - type (WAVEs), target, intent(inout) :: WF - end subroutine WF_symm_kpoint_g_ssop - ! subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) + use pars, ONLY:SP use wave_func, ONLY:WAVEs integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 type (WAVEs), target, intent(inout) :: WF + complex(SP) DEV_ATTR, optional, intent(in) :: ssop(2,2) end subroutine WF_symm_kpoint_g ! subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index d78be5a379..6d7b651f39 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -34,7 +34,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use vec_operate, ONLY:degeneration_finder use parallel_m, ONLY:PAR_IND_WF_k,PAR_IND_WF_b,PAR_IND_B_mat use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute - use interfaces, ONLY:WF_symm_kpoint_g,WF_symm_kpoint_g_BZ,WF_symm_kpoint_g_ssop,WF_load,WF_free,eval_G_minus_G + use interfaces, ONLY:WF_symm_kpoint_g,WF_symm_kpoint_g_BZ,WF_load,WF_free,eval_G_minus_G use IO_int, ONLY:io_control use IO_m, ONLY:VERIFY,DUMP,REP,OP_WR,WR,WR_CL,OP_RD_CL use timing_m, ONLY:timing @@ -179,7 +179,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! ! OPTION 2: Use the composed symmetry, importing the composed spin soc !call WF_copy(WF_k,WF_Rk_c) - !call WF_symm_kpoint_g_ssop(blim,ik,i_sp_pol,isk_c,iGk_c,spin_sop_composed,WF_Rk_c) + !call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c,ssop=spin_sop_composed) ! call WF_copy(WF_k,WF_Rk_y) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_y,iGk_y,WF_Rk_y) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 19ec076b71..2bea5e9ab1 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -7,7 +7,7 @@ ! #include ! -subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) +subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor @@ -24,11 +24,13 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 type (WAVEs), target, intent(inout) :: WF + complex(SP) DEV_ATTR, optional, intent(in) :: ssop(2,2) ! ! Work space ! complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) complex(SP), pointer DEV_ATTR :: WF_p(:,:) + complex(SP) DEV_ATTR :: ssop_loc(2,2) ! real(SP) :: krot(3),G_cc(3) ! @@ -43,6 +45,14 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ! isymm_m1=sop_inv(isymm) ! + if (n_spinor==2) then + if(present(ssop)) then + ssop_loc=ssop + else + ssop_loc=DEV_VAR(spin_sop)(:,:,isymm) + endif + endif + ! do ib=b_to_load(1),b_to_load(2) ! WF_k_tmp=cZERO @@ -75,10 +85,8 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1)+ & -& DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2) - WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1)+ & -& DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2) + WF_k_tmp(igs,1)=ssop_loc(1,1)*WF_p(ig,1)+ssop_loc(1,2)*WF_p(ig,2) + WF_k_tmp(igs,2)=ssop_loc(2,1)*WF_p(ig,1)+ssop_loc(2,2)*WF_p(ig,2) enddo endif ! From 022233a7a9bc9f56098c3f46680f673c2216a9f0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 11 Jul 2025 14:39:22 +0200 Subject: [PATCH 1045/1367] Fixed small bug introduced with last commit --- src/modules/mod_interfaces.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 72cd278bea..9306ffd834 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -334,7 +334,7 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) type(tddft_wf_t), target, intent(inout) :: tddft_wf end function TDDFT_ALDA_eh_space_R_kernel ! - subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF) + subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) use pars, ONLY:SP use wave_func, ONLY:WAVEs integer, intent(in) :: b_to_load(2) From 4545677bf968465d75d46f0128d0a1cab448d9d2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 10 Jul 2025 23:57:12 +0200 Subject: [PATCH 1046/1367] variables_ELPH: restored code for old databases. Nedeed for exc-ph tests --- src/io/variables_ELPH.F | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/io/variables_ELPH.F b/src/io/variables_ELPH.F index 127d6a2cbe..ed9b85350e 100644 --- a/src/io/variables_ELPH.F +++ b/src/io/variables_ELPH.F @@ -45,7 +45,9 @@ integer function variables_ELPH(ID,what) ! call IO_desc_reset(ELPH_desc) ! - NVAR=9 + NVAR=6 + if (ver_is_gt_or_eq(ID,revision=18920)) NVAR=7 + if (ver_is_gt_or_eq(ID,revision=21550)) NVAR=9 call def_variable_elemental(ID,"PARS",NVAR,SP,0) ! call io_variable_elemental(ID,VAR="[ELPH] Phonon modes",I0=ph_modes,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) @@ -54,14 +56,24 @@ integer function variables_ELPH(ID,what) if (l_gFsq) call io_variable_elemental(ID,VAR="[ELPH]",I0=elph_nQ_used,CHECK=.true.,OP=(/"=="/),& & TERMINATOR="[used]",DESCRIPTOR=ELPH_desc) call io_variable_elemental(ID,VAR="[ELPH] K points",I0=elph_nk_bz,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) - if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 + if (ver_is_gt_or_eq(ID,revision=21550)) then + call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I1=elph_bands,CHECK=.true.,OP=(/"==","=="/),DESCRIPTOR=ELPH_desc) + if (read_is_on(ID)) elph_nb=elph_bands(2)-elph_bands(1)+1 + else + call io_variable_elemental(ID,VAR="[ELPH] El-PH bands",I0=elph_nb,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + if (read_is_on(ID)) elph_bands=(/1,elph_nb/) + endif call io_variable_elemental(ID,VAR="[ELPH] Using the Q-grid",L0=elph_use_q_grid,CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& -& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller",L0=l_GKKP_hosts_DW,& -& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) - + if (ver_is_gt_or_eq(ID,revision=18920)) then + call io_variable_elemental(ID,VAR="[ELPH] Bare interaction",L0=l_GKKP_hosts_bare_dV,& +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + endif + if (ver_is_gt_or_eq(ID,revision=21550)) then + call io_variable_elemental(ID,VAR="[ELPH] Debye-Waller",L0=l_GKKP_hosts_DW,& +& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=ELPH_desc) + else + l_GKKP_hosts_DW=.true. + endif if (l_gFsq) then call def_variable_elemental(ID,"QP_nb_nk_n_states",3,SP,0) call io_variable_elemental(ID,I0=QP_nb) @@ -97,8 +109,10 @@ integer function variables_ELPH(ID,what) enddo endif ! - call io_bulk(ID,VAR="PH_K",VAR_SZ=(/nkbz,3/) ) - call io_bulk(ID,R2=PH_kpt_bz(:,:)) + if (ver_is_gt_or_eq(ID,revision=21550).or.elph_grids_are_expanded) then + call io_bulk(ID,VAR="PH_K",VAR_SZ=(/nkbz,3/) ) + call io_bulk(ID,R2=PH_kpt_bz(:,:)) + endif ! variables_ELPH=io_status(ID) ! From f7aa21f81f047b48c0536701513f6ae8b765788b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 11 Jul 2025 16:12:20 +0200 Subject: [PATCH 1047/1367] Farther simplification to WF_shift k-point interface --- src/modules/mod_interfaces.F | 10 +- src/wf_and_fft/WF_phase_matrices.F | 4 +- src/wf_and_fft/WF_symm_kpoint_g.F | 190 ++++------------------------- 3 files changed, 27 insertions(+), 177 deletions(-) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 9306ffd834..3922a6089b 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -334,22 +334,16 @@ function TDDFT_ALDA_eh_space_R_kernel(is,os,isp,osp,tddft_wf,mode) result(H_x) type(tddft_wf_t), target, intent(inout) :: tddft_wf end function TDDFT_ALDA_eh_space_R_kernel ! - subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) + subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) use pars, ONLY:SP use wave_func, ONLY:WAVEs integer, intent(in) :: b_to_load(2) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 type (WAVEs), target, intent(inout) :: WF complex(SP) DEV_ATTR, optional, intent(in) :: ssop(2,2) + integer, optional, intent(in) :: isref,igref end subroutine WF_symm_kpoint_g ! - subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) - use wave_func, ONLY:WAVEs - integer, intent(in) :: b_to_load(2) - integer, intent(in) :: ik,i_sp_pol,isymm,ig0,isref,igref - type (WAVEs), target, intent(inout) :: WF - end subroutine WF_symm_kpoint_g_BZ - ! subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_out) use pars, ONLY:SP use electrons, ONLY:n_spinor diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 6d7b651f39..fc57925b40 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -34,7 +34,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use vec_operate, ONLY:degeneration_finder use parallel_m, ONLY:PAR_IND_WF_k,PAR_IND_WF_b,PAR_IND_B_mat use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute - use interfaces, ONLY:WF_symm_kpoint_g,WF_symm_kpoint_g_BZ,WF_load,WF_free,eval_G_minus_G + use interfaces, ONLY:WF_symm_kpoint_g,WF_load,WF_free,eval_G_minus_G use IO_int, ONLY:io_control use IO_m, ONLY:VERIFY,DUMP,REP,OP_WR,WR,WR_CL,OP_RD_CL use timing_m, ONLY:timing @@ -175,7 +175,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! ! OPTION 1: Apply second symmetry operatio to the WF already expanded in the BZ call WF_copy(WF_Rk,WF_Rk_c) - call WF_symm_kpoint_g_BZ(blim,ik,i_sp_pol,isloop,iGloop,isk,iGk,WF_Rk_c) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isloop,iGloop,WF_Rk_c,isref=isk,iGref=iGk) ! ! OPTION 2: Use the composed symmetry, importing the composed spin soc !call WF_copy(WF_k,WF_Rk_c) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 2bea5e9ab1..a5d3050598 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -7,7 +7,7 @@ ! #include ! -subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) +subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) ! use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor @@ -25,12 +25,14 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) integer, intent(in) :: ik,i_sp_pol,isymm,ig0 type (WAVEs), target, intent(inout) :: WF complex(SP) DEV_ATTR, optional, intent(in) :: ssop(2,2) + integer, optional, intent(in) :: isref,igref ! ! Work space ! complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) complex(SP), pointer DEV_ATTR :: WF_p(:,:) complex(SP) DEV_ATTR :: ssop_loc(2,2) + integer DEV_ATTR :: wf_tab_loc(wf_ng) ! real(SP) :: krot(3),G_cc(3) ! @@ -53,6 +55,24 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) endif endif ! + if (present(igref).or.present(isref)) then + if (.not.present(isref)) call error("WF_symm_kpoint_g: igref provided, but not isref") + if (.not.present(igref)) call error("WF_symm_kpoint_g: isref provided, but not igref") + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(wf_igk)(ic,ik) + igp=DEV_VAR(g_rot)(ig,isref) + igs=DEV_VAR(G_m_G)(igp,igref) + igr=DEV_VAR(g_rot)(igs,isymm) + wf_tab_loc(ic)=DEV_VAR(G_m_G)(igr,ig0) + enddo + else + do ic=1,wf_nc_k(ik) + ig=DEV_VAR(wf_igk)(ic,ik) + igr=DEV_VAR(g_rot)(ig,isymm) + wf_tab_loc(ic)=DEV_VAR(G_m_G)(igr,ig0) + enddo + endif + ! do ib=b_to_load(1),b_to_load(2) ! WF_k_tmp=cZERO @@ -68,9 +88,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) !DEV_OMPGPU target map(present,alloc:WF_k_tmp,g_rot,WF_p) !DEV_OMPGPU teams loop do ic=1,wf_nc_k(ik) - ig=DEV_VAR(wf_igk)(ic,ik) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) + igs=wf_tab_loc(ic) WF_k_tmp(igs,1)=WF_p(ig,1) enddo ! @@ -82,9 +100,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) !DEV_OMPGPU target map(present,alloc:WF_k_tmp,g_rot,WF_p) !DEV_OMPGPU teams loop do ic=1,wf_nc_k(ik) - ig=DEV_VAR(wf_igk)(ic,ik) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) + igs=wf_tab_loc(ic) WF_k_tmp(igs,1)=ssop_loc(1,1)*WF_p(ig,1)+ssop_loc(1,2)*WF_p(ig,2) WF_k_tmp(igs,2)=ssop_loc(2,1)*WF_p(ig,1)+ssop_loc(2,2)*WF_p(ig,2) enddo @@ -102,163 +118,3 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop) enddo ! end subroutine WF_symm_kpoint_g -! -! -subroutine WF_symm_kpoint_g_BZ(b_to_load,ik,i_sp_pol,isymm,ig0,isref,igref,WF) - ! - use pars, ONLY:SP,cZERO - use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) - use wave_func, ONLY:wf_ng,wf_ng_1st_BZ - use vec_operate, ONLY:c2a - use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& - & k_pt,rl_sop,g_vec - use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & - & dl_sop,i_time_rev,nsym - ! - implicit none - ! - integer, intent(in) :: b_to_load(2) - integer, intent(in) :: ik,i_sp_pol,isymm,ig0,isref,igref - type (WAVEs), target, intent(inout) :: WF - ! - ! Work space - ! - complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:) - ! - real(SP) :: krot(3),G_cc(3) - ! - integer :: ib,i_wf,isymm_m1 - integer :: ic,ig,igp,igr,igs,i_spinor - ! - if(isymm==idt_index) return - ! -#if defined _GPU - call error("subroutine WF_symm_kpoint_g_BZ is not gpu ported") -#endif - ! - isymm_m1=sop_inv(isymm) - ! - do ib=b_to_load(1),b_to_load(2) - ! - WF_k_tmp=cZERO - ! - i_wf=WF%index(ib,ik,i_sp_pol) - WF_p => DEV_VAR(WF%c)(:,:,i_wf) - ! - if (n_spinor==1) then - ! - do ic=1,wf_nc_k(ik) - ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1) - enddo - ! - else - ! - do ic=1,wf_nc_k(ik) - ig=DEV_VAR(G_m_G)(DEV_VAR(g_rot)(DEV_VAR(wf_igk)(ic,ik),isref),igref) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ig,1)+ & - & DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ig,2) - WF_k_tmp(igs,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ig,1)+ & - & DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ig,2) - enddo - endif - ! - ! take care of time reversal if needed - !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) - if(isymm>nsym/(1+i_time_rev)) WF_k_tmp=conjg(WF_k_tmp) - ! - !call dev_memcpy(WF_p,WF_k_tmp) - WF_p=WF_k_tmp - ! - nullify(WF_p) - ! - enddo - ! -end subroutine WF_symm_kpoint_g_BZ -! -! -subroutine WF_symm_kpoint_g_ssop(b_to_load,ik,i_sp_pol,isymm,ig0,ssop,WF) - ! - use pars, ONLY:SP,cZERO - use electrons, ONLY:n_spinor - use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) - use wave_func, ONLY:wf_ng,wf_ng_1st_BZ - use vec_operate, ONLY:c2a - use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& - & k_pt,rl_sop,g_vec - use D_lattice, ONLY:idt_index,DEV_VAR(spin_sop),sop_inv, & - & dl_sop,i_time_rev,nsym - ! - implicit none - ! - integer, intent(in) :: b_to_load(2) - integer, intent(in) :: ik,i_sp_pol,isymm,ig0 - complex(SP) DEV_ATTR, intent(in) :: ssop(2,2) - type (WAVEs), target, intent(inout) :: WF - ! - ! Work space - ! - complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) - complex(SP), pointer DEV_ATTR :: WF_p(:,:) - ! - real(SP) :: krot(3),G_cc(3) - ! - integer :: ib,i_wf,isymm_m1 - integer :: ic,ig,igp,igr,igs,i_spinor - ! - if(isymm==idt_index) return - ! -#if defined _GPU - call error("subroutine WF_symm_kpoint_g_ssop is not gpu ported") -#endif - ! - isymm_m1=sop_inv(isymm) - ! - do ib=b_to_load(1),b_to_load(2) - ! - WF_k_tmp=cZERO - ! - i_wf=WF%index(ib,ik,i_sp_pol) - WF_p => DEV_VAR(WF%c)(:,:,i_wf) - ! - if (n_spinor==1) then - ! - do ic=1,wf_nc_k(ik) - ig=DEV_VAR(wf_igk)(ic,ik) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=WF_p(ig,1) - enddo - ! - else - ! - do ic=1,wf_nc_k(ik) - ig=DEV_VAR(wf_igk)(ic,ik) - igr=DEV_VAR(g_rot)(ig,isymm) - igs=DEV_VAR(G_m_G)(igr,ig0) - WF_k_tmp(igs,1)=ssop(1,1)*WF_p(ig,1)+ & - & ssop(1,2)*WF_p(ig,2) - WF_k_tmp(igs,2)=ssop(2,1)*WF_p(ig,1)+ & - & ssop(2,2)*WF_p(ig,2) - enddo - endif - ! - ! - ! take care of time reversal if needed - !if(isymm>nsym/(1+i_time_rev)) call dev_conjg(WF_k_tmp) - if(isymm>nsym/(1+i_time_rev)) WF_k_tmp=conjg(WF_k_tmp) - ! - !call dev_memcpy(WF_p,WF_k_tmp) - WF_p=WF_k_tmp - ! - nullify(WF_p) - ! - enddo - ! - end subroutine WF_symm_kpoint_g_ssop From 0baca514a5a202ebdeedf888c437f160c71e5908 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 00:41:05 +0200 Subject: [PATCH 1048/1367] Fixed issue with collisions dimensions introduced with previous commit --- src/collisions/COLLISIONS_alloc_and_free.F | 10 +++++----- src/io_parallel/io_COLLISIONS.F | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/collisions/COLLISIONS_alloc_and_free.F b/src/collisions/COLLISIONS_alloc_and_free.F index 5815865471..c41ef5af4d 100644 --- a/src/collisions/COLLISIONS_alloc_and_free.F +++ b/src/collisions/COLLISIONS_alloc_and_free.F @@ -103,9 +103,9 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) ! N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,3) ! Nc ! N(3)=COLL_grp%D(1,4)-COLL_grp%D(1,1)+1 ! Nv ! * General case - ! N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1)*2 ! 2*Nk - ! N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1) ! Nc - ! N(3)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 ! Nv + ! N(1)=(COLL_grp%D(3,2)-COLL_grp%D(3,1)+1) ! Nk + ! N(2)=COLL_grp%D(2,2)-COLL_grp%D(2,1) ! Nb1 + ! N(3)=COLL_grp%D(1,2)-COLL_grp%D(1,1)+1 ! Nb2 ! (ii) src/collisions/COLLISIONS_linearize_and_IO.F (only components D(1:3,:)) ! do i3=COLL_grp%D(3,1),COLL_grp%D(3,2) ! ik ! do i2=COLL_grp%D(2,1),COLL_grp%D(2,2) ! ib1 @@ -116,8 +116,8 @@ subroutine COLLISIONS_alloc_and_free(what,elements,actions,I) D(:,3:4)=-1 ! unused if (COLLISIONS_CV_only) then D(1,3)=-1 ! unused - D(2,3)=minval(n_full_bands) ! lower bound for conduction - D(1,4)=maxval(n_met_bands) ! upper bound for valence + D(2,3)=minval(n_full_bands)+1 ! lower bound for conduction + D(1,4)=maxval(n_met_bands) ! upper bound for valence D(2,4)=-1 ! unused endif if (l_collision.and.l_alloc) then diff --git a/src/io_parallel/io_COLLISIONS.F b/src/io_parallel/io_COLLISIONS.F index 528ee599c9..82b05b47d6 100644 --- a/src/io_parallel/io_COLLISIONS.F +++ b/src/io_parallel/io_COLLISIONS.F @@ -77,7 +77,7 @@ integer function io_COLLISIONS(ID,COLL_grp,COLL_element,i_coll_) if (any((/COLL_bands_frozen==1/))) then Nb2=count(COLL_bands_frozen(COLL_grp%D(2,1):COLL_grp%D(2,2))==0) Nb1=count(COLL_bands_frozen(COLL_grp%D(1,1):COLL_grp%D(1,2))==0) - Nbc=count(COLL_bands_frozen(COLL_grp%D(2,2):COLL_grp%D(2,3))==0) + Nbc=count(COLL_bands_frozen(COLL_grp%D(2,3):COLL_grp%D(2,2))==0) Nbv=count(COLL_bands_frozen(COLL_grp%D(1,1):COLL_grp%D(1,4))==0) endif if (COLLISIONS_CV_only) then From 8d5fe3bac7f050d3cab42c8a1039c1340d2f7532 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 00:50:15 +0200 Subject: [PATCH 1049/1367] Frozen collisions do not need to be computed --- src/collisions/COLLISIONS_HXC.F | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/collisions/COLLISIONS_HXC.F b/src/collisions/COLLISIONS_HXC.F index af6383d380..e6bfc14d46 100644 --- a/src/collisions/COLLISIONS_HXC.F +++ b/src/collisions/COLLISIONS_HXC.F @@ -34,7 +34,7 @@ subroutine COLLISIONS_HXC(X,Xk,E,k,q,Xw,IO_BS_err,ID_BS) use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use collision_ext, ONLY:COLLISIONS_parallel_SC_structure,COLLISIONS_HXC_local,COLLISIONS_HXC_MB,& & COLL_bands,HXC_COLL_element,HXC_collisions,COH_COLL_element,COH_collisions,& -& COLLISIONS_HXC_use_TDDFT,PAR_COLL_min,COLLISIONS_CV_only +& COLL_bands_frozen,COLLISIONS_HXC_use_TDDFT,PAR_COLL_min,COLLISIONS_CV_only use timing_m, ONLY:timing use QP_m, ONLY:QP_ng_SH,QP_ng_Sx,QP_ng_Sc use IO_int, ONLY:io_control,IO_and_Messaging_switch @@ -464,7 +464,12 @@ subroutine map_BSE_to_HXC_collisions() !i_p_s =k%sstar(i_p_bz,2) ! do i_mp=COLL_bands(1),COLL_bands(2) + ! + if ( COLL_bands_frozen(i_mp)==1 ) cycle + ! do i_np=COLL_bands(1),COLL_bands(2) + ! + if ( COLL_bands_frozen(i_mp)==1 ) cycle ! if ( (i_np> n_met_bands(ip_sp) .and. i_mp> n_met_bands(ip_sp) ) ) cycle if ( (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) ) cycle @@ -629,7 +634,12 @@ subroutine compute_Hartree_collisions(cc_vv_only) if (k%sstar(i_p_bz,2)/=1) cycle ! do i_mp=COLL_bands(1),COLL_bands(2) + ! + if ( COLL_bands_frozen(i_mp)==1 ) cycle + ! do i_np=i_mp,COLL_bands(2) + ! + if ( COLL_bands_frozen(i_np)==1 ) cycle ! cc_vv_colls=(i_np> n_met_bands(ip_sp) .and. i_mp>n_met_bands(ip_sp) ) .or. & & (i_np<=n_full_bands(ip_sp) .and. i_mp<=n_full_bands(ip_sp)) @@ -823,6 +833,8 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) endif ! do i_mp=COLL_bands(1),COLL_bands(2) + ! + if ( COLL_bands_frozen(i_mp)==1 ) cycle ! do i_np=COLL_bands(1),COLL_bands(2) TMP_index(i_np)=B_mat_index(i_np,i_mp,COLL_bands) @@ -835,6 +847,8 @@ subroutine compute_MBPT_XC_collisions(cc_vv_only) call scatter_Bamp(iscp_XC) ! do i_np=COLL_bands(1),COLL_bands(2) + ! + if ( COLL_bands_frozen(i_np)==1 ) cycle ! cc_vv_colls=(i_np> n_met_bands(i_sp) .and. i_mp>n_met_bands(i_sp) ) .or. & & (i_np<=n_full_bands(i_sp) .and. i_mp<=n_full_bands(i_sp)) From c69a1a92160b6bd230d7f7db3bddfd1b0d5de3f1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 03:27:27 +0200 Subject: [PATCH 1050/1367] Re-coded excitons_WFs for speeding up plot of excitonic WFs --- ypp/excitons/excitons_WFs.F | 154 ++++++++++++++++++------------------ 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index c2fdbde762..e4b988606a 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -16,7 +16,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use units, ONLY:BO2ANG use stderr, ONLY:intc use D_lattice, ONLY:a,alat - use FFT_m, ONLY:fft_dim + use FFT_m, ONLY:fft_dim,fft_size use com, ONLY:msg,of_open_close use electrons, ONLY:spin,n_spinor use YPPm, ONLY:v2plot,ncell,r_hole,l_free_hole,AVE_exc,& @@ -44,13 +44,14 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! type(PP_indexes) :: px integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_l,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& -& n_lambda_deg,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 +& n_lambda_deg,n_deg_max,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 integer :: ikpbz,ikp,isp - real(SP) :: r_hole_rlu(3),kp_dot_r_h,k_dot_r_e - complex(SP) :: wf_,wf_vc(BS_H_dim),WF1_ir(n_spinor),WF2_ir(n_spinor),phase,B_coeff + real(SP) :: alpha,r_hole_rlu(3) + complex(SP) :: phase,B_coeff ! integer, allocatable :: rindex(:) - real(SP), allocatable :: r_cell_cc(:,:) + real(SP), allocatable :: r_cell_cc(:,:),kp_dot_r_h(:),k_dot_r_e(:) + complex(SP), allocatable :: wf_(:,:),wf_vc(:),WF1(:,:),WF2(:,:) ! call section('+','Excitonic Wave Function') ! @@ -117,10 +118,24 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! YAMBO_ALLOC(v2plot,(nr_tot)) ! + YAMBO_ALLOC(WF1,(fft_size,n_spinor)) + YAMBO_ALLOC(WF2,(fft_size,n_spinor)) + ! + YAMBO_ALLOC( k_dot_r_e,(nr_tot)) + YAMBO_ALLOC(kp_dot_r_h,(nr_tot)) + ! + n_deg_max=0 + do i_lambda=1,EXCITONS_n_user_states + j_lambda=EXCITONS_user_indexes(i_lambda) + n_deg_max=max(n_deg_max,count(BS_E_degs==BS_E_degs(j_lambda))) + enddo + YAMBO_ALLOC(wf_vc,(nr_tot)) + YAMBO_ALLOC(wf_,(nr_tot,n_deg_max)) + ! ! Par Proc ! call PP_indexes_reset(px) - call PARALLEL_index(px,(/nr_tot/)) + call PARALLEL_index(px,(/EXCITONS_n_user_states/)) call PP_wait() ! ! Loop on exc states @@ -129,6 +144,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) call msg('s','Processing '//trim(intc(EXCITONS_n_user_states))//' states') ! do i_lambda=1,EXCITONS_n_user_states + ! + if (.not.px%element_1D(i_lambda)) cycle ! j_lambda=EXCITONS_user_indexes(i_lambda) ! @@ -143,13 +160,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) v2plot =0._SP ! if(l_average_eh) then - ! - do ir=1,nr_tot ! - if (.not.px%element_1D(ir)) cycle - ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - ! do neh = 1,BS_H_dim ! ikbz = BSS_eh_table(neh,1) @@ -170,63 +181,41 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikibz1 = Xk%sstar(ikbz1,1) is1 = Xk%sstar(ikbz1,2) ! - if(ikbz==ikbz1) then + if(ikbz/=ikbz1) cycle ! ! Build the B_{vvk} (or B_{cck} ) matrix ! if (ic1==ic.and.trim(AVE_exc)=='h') then - ! - B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) - ! - WF1_ir=WF_symm(rindex(ir),(/iv, ikibz,is,i_sp_pol/)) - WF2_ir=WF_symm(rindex(ir),(/iv1,ikibz1,is1,i_sp_pol1/)) ! - v2plot(ir) = v2plot(ir)+B_coeff*WF1_ir(1)*conjg(WF2_ir(1)) - if(n_spinor==2) v2plot(ir) = v2plot(ir)+B_coeff*WF1_ir(2)*conjg(WF2_ir(2)) + call WF_apply_symm((/iv, ikibz, is, i_sp_pol /),WF1) + call WF_apply_symm((/iv1,ikibz1,is1,i_sp_pol1/),WF2) ! elseif(iv1==iv.and.trim(AVE_exc)=='e') then - ! - B_coeff = conjg(BS_mat(neh, i_l))*BS_mat(neh1, i_l) ! - WF1_ir=WF_symm(rindex(ir),(/ic, ikibz,is,i_sp_pol/)) - WF2_ir=WF_symm(rindex(ir),(/ic1,ikibz1,is1,i_sp_pol1/)) + call WF_apply_symm((/ic, ikibz, is, i_sp_pol /),WF1) + call WF_apply_symm((/ic1,ikibz1,is1,i_sp_pol1/),WF2) + ! + endif + ! + do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 + ! + B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) ! - v2plot(ir) = v2plot(ir)+B_coeff*conjg(WF1_ir(1))*WF2_ir(1) - if(n_spinor==2) v2plot(ir) = v2plot(ir)+B_coeff*conjg(WF1_ir(2))*WF2_ir(2) + v2plot(:) = v2plot(:)+B_coeff*WF1(:,1)*conjg(WF2(:,1)) + if(n_spinor==2) v2plot(:) = v2plot(:)+B_coeff*WF1(:,2)*conjg(WF2(:,2)) ! - endif + enddo ! - endif ! enddo ! loop on neh1 ! enddo ! loop on neh ! - enddo ! loop on degenerate excitons - ! - if (master_thread) call live_timing(steps=1) - ! - enddo ! loop on i_r + !if (master_thread) call live_timing(steps=1) ! else - ! - !$omp parallel default(shared), firstprivate(ir_hole,r_hole), & - !$omp private(wf_vc, ir,neh, ikbz,iv,ic,i_sp_pol,ikibz,is, ikpbz,ikp,isp, & - !$omp & k_dot_r_e,kp_dot_r_h, WF1_ir,WF2_ir,phase, i_l,wf_ ) - ! - call OPENMP_update(master_thread) ! - !$omp do schedule(dynamic) - do ir=1,nr_tot - ! - if (.not.px%element_1D(ir)) cycle - wf_vc =cZERO - ! - if (l_free_hole) then - ir_hole=ir - r_hole=r_cell_cc(:,ir) - endif - ! + wf_=cZERO do neh = 1,BS_H_dim ! ikbz = BSS_eh_table(neh,1) @@ -241,40 +230,45 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikp = Xk%sstar(ikpbz,1) isp = Xk%sstar(ikpbz,2) ! - k_dot_r_e = dot_product(r_cell_cc(:,ir),Xk%ptbz(ikbz,:)/alat(:))*2._SP*pi - kp_dot_r_h = dot_product(r_hole,Xk%ptbz(ikpbz,:)/alat(:))*2._SP*pi - ! - WF1_ir=WF_symm(rindex(ir_hole),(/iv,ikp,isp,i_sp_pol/)) - WF2_ir=WF_symm(rindex(ir ),(/ic,ikibz,is,i_sp_pol/)) + do ir=1,nr_tot + if (l_free_hole) ir_hole=ir + k_dot_r_e(ir) = dot_product(r_cell_cc(:,ir), Xk%ptbz(ikbz,:)/alat(:))*2._SP*pi + kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(:,ir_hole),Xk%ptbz(ikpbz,:)/alat(:))*2._SP*pi + enddo ! - wf_vc(neh) = conjg(WF1_ir(1))*WF2_ir(1) - if(n_spinor==2) wf_vc(neh) = wf_vc(neh) + conjg(WF1_ir(2))*WF2_ir(2) + call WF_apply_symm((/iv,ikp, isp,i_sp_pol/),WF1) + call WF_apply_symm((/ic,ikibz,is, i_sp_pol/),WF2) ! - phase=cmplx(cos(k_dot_r_e-kp_dot_r_h),sin(k_dot_r_e-kp_dot_r_h),kind=SP) - wf_vc(neh) = wf_vc(neh)*phase - ! - enddo !Matrix elements - ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - ! - wf_ = V_dot_V(BS_H_dim,BS_mat(:,i_l),wf_vc) + do ir=1,nr_tot + if (l_free_hole) ir_hole=ir + wf_vc(ir) = conjg(WF1(rindex(ir),1))*WF2(rindex(ir_hole),1) + if(n_spinor==2) wf_vc(ir) = wf_vc(ir) + conjg(WF1(rindex(ir),2))*WF2(rindex(ir_hole),2) + ! + alpha=k_dot_r_e(ir)-kp_dot_r_h(ir_hole) + phase=cmplx(cos(alpha),sin(alpha),kind=SP) + wf_vc(ir) = wf_vc(ir)*phase + enddo ! - v2plot(ir) = v2plot(ir)+abs(wf_)**2 + do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 + i1=i_l-BS_E_degs(j_lambda)+1 + wf_(:,i1) = wf_(:,i1)+BS_mat(neh,i_l)*wf_vc(:) + enddo ! enddo ! - if (master_thread) call live_timing(steps=1) + do i1=1,n_lambda_deg + ! + v2plot(:) = v2plot(:)+abs(wf_(:,i1))**2 + ! + enddo ! - enddo !grid points - ! - !$omp end do - !$omp end parallel + !if (master_thread) call live_timing(steps=1) ! endif ! - call live_timing() + !call live_timing() ! - call PP_redux_wait(v2plot) + !call PP_redux_wait(v2plot) ! ! ! PLOT @@ -302,16 +296,22 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) YAMBO_FREE(r_cell_cc) YAMBO_FREE(rindex) ! + YAMBO_FREE( k_dot_r_e) + YAMBO_FREE(kp_dot_r_h) + ! + YAMBO_FREE(WF1) + YAMBO_FREE(WF2) + ! + YAMBO_FREE(wf_vc) + YAMBO_FREE(wf_) + ! call WF_free(WF) ! contains ! subroutine expand_grid() ! - use FFT_m, ONLY:fft_size - use y_memory_alloc - ! - implicit none + implicit none ! ! Work Space ! From 016fa0b6adec18cb55db1abb1095458542713598 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 09:55:24 +0200 Subject: [PATCH 1051/1367] Allocation and initialization of BS_bands_frozen moved in INIT This avoids fails due to attemps to re-allocate the variable --- src/bse/K_Transitions_setup.F | 7 +------ src/interface/INIT_load.F | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 9435f1727b..5d3786b540 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -245,7 +245,7 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) use parser_m, ONLY:parser use BS, ONLY:BS_K_dim,BS_H_dim,BS_nT_at_k,BS_K_coupling, & & l_BS_ares_from_res,BS_res_ares_n_mat,BS_bands,& -& BS_n_eh_spaces,BS_bands_frozen_ch,BS_bands_frozen +& BS_n_eh_spaces,BS_bands_frozen use DIPOLES, ONLY:DIPOLE_t use electrons, ONLY:levels,n_sp_pol use com, ONLY:msg @@ -268,8 +268,6 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) ! ! Work Space ! - character(schlen) :: BS_bands_frozen_list(BS_bands(2)) - logical :: l_BS_freeze_bands real(SP) :: E_eh,E_eh_SOC_corr(2/n_sp_pol),f_eh,f_eh_RES,f_eh_PL integer :: ikbz,ikpbz,iv,ic,ik,ikp,i_sp_v,i_sp_c,i_star,ib1,ib2, & & i_res_ares,BS_nT_at_k_tmp(Xk%nibz*2) @@ -286,9 +284,6 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) V_bands=(/BS_bands(1),maxval(Ken%nbm)/) C_bands=(/minval(Ken%nbf)+1,BS_bands(2)/) ! - allocate(BS_bands_frozen(BS_bands(1):BS_bands(2))) - call LEVELS_frozen(BS_bands,BS_bands_frozen,BS_bands_frozen_ch,"BSE",BS_bands(2)-BS_bands(1)+1) - ! #if defined _RT ! Bands range. In the _RT case %nbf and %nbm turn metallic when carriers are used. if (l_rt_carriers_in_use.and.EQ_Transitions) then diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index be4890887d..e045640d3c 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -33,7 +33,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& & RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_bands_frozen_ch,& -& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry +& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry,& +& BS_bands_frozen use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,& & BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& & BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig_Input,BSS_first_eig,Haydock_iterMAX,BSS_ldiago_solver @@ -739,6 +740,10 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif ! if (initmode==4) then + ! + allocate(BS_bands_frozen(BS_bands(1):BS_bands(2))) + call LEVELS_frozen(BS_bands,BS_bands_frozen,BS_bands_frozen_ch,"BSE",BS_bands(2)-BS_bands(1)+1) + ! #if defined _SC || defined _RT || defined _NL allocate(H_ref_bands_frozen(en%nb)) H_ref_bands_frozen=0 From 71346d7bbff2e0b89738992d4499cc3721afd4d9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 10:24:47 +0200 Subject: [PATCH 1052/1367] Few fixing in new coding for plotting excitonic WF --- ypp/excitons/excitons_WFs.F | 194 +++++++++++++++++++----------------- 1 file changed, 103 insertions(+), 91 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index e4b988606a..d3d4ec56b0 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -135,7 +135,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Par Proc ! call PP_indexes_reset(px) - call PARALLEL_index(px,(/EXCITONS_n_user_states/)) + call PARALLEL_index(px,(/BS_H_dim/)) call PP_wait() ! ! Loop on exc states @@ -144,8 +144,6 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) call msg('s','Processing '//trim(intc(EXCITONS_n_user_states))//' states') ! do i_lambda=1,EXCITONS_n_user_states - ! - if (.not.px%element_1D(i_lambda)) cycle ! j_lambda=EXCITONS_user_indexes(i_lambda) ! @@ -160,116 +158,130 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) v2plot =0._SP ! if(l_average_eh) then + ! + do neh = 1,BS_H_dim ! - do neh = 1,BS_H_dim - ! - ikbz = BSS_eh_table(neh,1) - iv = BSS_eh_table(neh,2) - ic = BSS_eh_table(neh,3) - i_sp_pol = spin(BSS_eh_table(neh,:)) + if (.not.px%element_1D(neh)) cycle + ! + ikbz = BSS_eh_table(neh,1) + iv = BSS_eh_table(neh,2) + ic = BSS_eh_table(neh,3) + i_sp_pol = spin(BSS_eh_table(neh,:)) + ! + ikibz = Xk%sstar(ikbz,1) + is = Xk%sstar(ikbz,2) + ! + do neh1 = 1,BS_H_dim + ! + ikbz1 = BSS_eh_table(neh1,1) + iv1 = BSS_eh_table(neh1,2) + ic1 = BSS_eh_table(neh1,3) + i_sp_pol1 = spin(BSS_eh_table(neh1,:)) + ! + ikibz1 = Xk%sstar(ikbz1,1) + is1 = Xk%sstar(ikbz1,2) + ! + if(ikbz/=ikbz1) cycle + ! + ! Build the B_{vvk} (or B_{cck} ) matrix + ! + if (ic1==ic.and.trim(AVE_exc)=='h') then ! - ikibz = Xk%sstar(ikbz,1) - is = Xk%sstar(ikbz,2) + call WF_apply_symm((/iv, ikibz, is, i_sp_pol /),WF1) + call WF_apply_symm((/iv1,ikibz1,is1,i_sp_pol1/),WF2) ! - do neh1 = 1,BS_H_dim + do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 + ! + B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) ! - ikbz1 = BSS_eh_table(neh1,1) - iv1 = BSS_eh_table(neh1,2) - ic1 = BSS_eh_table(neh1,3) - i_sp_pol1 = spin(BSS_eh_table(neh1,:)) + v2plot(:) = v2plot(:)+B_coeff*WF1(:,1)*conjg(WF2(:,1)) + if(n_spinor==2) v2plot(:) = v2plot(:)+B_coeff*WF1(:,2)*conjg(WF2(:,2)) ! - ikibz1 = Xk%sstar(ikbz1,1) - is1 = Xk%sstar(ikbz1,2) + enddo + ! + elseif(iv1==iv.and.trim(AVE_exc)=='e') then + ! + call WF_apply_symm((/ic, ikibz, is, i_sp_pol /),WF1) + call WF_apply_symm((/ic1,ikibz1,is1,i_sp_pol1/),WF2) + ! + do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 + ! + B_coeff = conjg(BS_mat(neh, i_l))* BS_mat(neh1, i_l) ! - if(ikbz/=ikbz1) cycle - ! - ! Build the B_{vvk} (or B_{cck} ) matrix - ! - if (ic1==ic.and.trim(AVE_exc)=='h') then - ! - call WF_apply_symm((/iv, ikibz, is, i_sp_pol /),WF1) - call WF_apply_symm((/iv1,ikibz1,is1,i_sp_pol1/),WF2) - ! - elseif(iv1==iv.and.trim(AVE_exc)=='e') then - ! - call WF_apply_symm((/ic, ikibz, is, i_sp_pol /),WF1) - call WF_apply_symm((/ic1,ikibz1,is1,i_sp_pol1/),WF2) - ! - endif - ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - ! - B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) - ! - v2plot(:) = v2plot(:)+B_coeff*WF1(:,1)*conjg(WF2(:,1)) - if(n_spinor==2) v2plot(:) = v2plot(:)+B_coeff*WF1(:,2)*conjg(WF2(:,2)) - ! - enddo - ! + v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,1))*WF2(:,1) + if(n_spinor==2) v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,2))*WF2(:,2) ! - enddo ! loop on neh1 + enddo ! - enddo ! loop on neh + endif ! + enddo ! loop on neh1 + ! !if (master_thread) call live_timing(steps=1) + call live_timing(steps=1) + ! + enddo ! loop on neh + ! + call live_timing() ! else ! - wf_=cZERO - do neh = 1,BS_H_dim - ! - ikbz = BSS_eh_table(neh,1) - iv = BSS_eh_table(neh,2) - ic = BSS_eh_table(neh,3) - i_sp_pol = spin(BSS_eh_table(neh,:)) - ! - ikibz = Xk%sstar(ikbz,1) - is = Xk%sstar(ikbz,2) - ! - ikpbz = qindx_X(iq,ikbz,1) - ikp = Xk%sstar(ikpbz,1) - isp = Xk%sstar(ikpbz,2) - ! - do ir=1,nr_tot - if (l_free_hole) ir_hole=ir - k_dot_r_e(ir) = dot_product(r_cell_cc(:,ir), Xk%ptbz(ikbz,:)/alat(:))*2._SP*pi - kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(:,ir_hole),Xk%ptbz(ikpbz,:)/alat(:))*2._SP*pi - enddo - ! - call WF_apply_symm((/iv,ikp, isp,i_sp_pol/),WF1) - call WF_apply_symm((/ic,ikibz,is, i_sp_pol/),WF2) - ! - do ir=1,nr_tot - if (l_free_hole) ir_hole=ir - wf_vc(ir) = conjg(WF1(rindex(ir),1))*WF2(rindex(ir_hole),1) - if(n_spinor==2) wf_vc(ir) = wf_vc(ir) + conjg(WF1(rindex(ir),2))*WF2(rindex(ir_hole),2) - ! - alpha=k_dot_r_e(ir)-kp_dot_r_h(ir_hole) - phase=cmplx(cos(alpha),sin(alpha),kind=SP) - wf_vc(ir) = wf_vc(ir)*phase - enddo - ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - i1=i_l-BS_E_degs(j_lambda)+1 - wf_(:,i1) = wf_(:,i1)+BS_mat(neh,i_l)*wf_vc(:) - enddo - ! + wf_=cZERO + ! + do neh = 1,BS_H_dim + ! + if (.not.px%element_1D(neh)) cycle + ! + ikbz = BSS_eh_table(neh,1) + iv = BSS_eh_table(neh,2) + ic = BSS_eh_table(neh,3) + i_sp_pol = spin(BSS_eh_table(neh,:)) + ! + ikibz = Xk%sstar(ikbz,1) + is = Xk%sstar(ikbz,2) + ! + ikpbz = qindx_X(iq,ikbz,1) + ikp = Xk%sstar(ikpbz,1) + isp = Xk%sstar(ikpbz,2) + ! + do ir=1,nr_tot + if (l_free_hole) ir_hole=ir + k_dot_r_e(ir) = dot_product(r_cell_cc(:,ir), Xk%ptbz(ikbz,:)/alat(:))*2._SP*pi + kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(:,ir_hole),Xk%ptbz(ikpbz,:)/alat(:))*2._SP*pi enddo ! - do i1=1,n_lambda_deg + call WF_apply_symm((/iv,ikp, isp,i_sp_pol/),WF1) + call WF_apply_symm((/ic,ikibz,is, i_sp_pol/),WF2) + ! + do ir=1,nr_tot + if (l_free_hole) ir_hole=ir + wf_vc(ir) = conjg(WF1(rindex(ir_hole),1))*WF2(rindex(ir),1) + if(n_spinor==2) wf_vc(ir) = wf_vc(ir) + conjg(WF1(rindex(ir_hole),2))*WF2(rindex(ir),2) ! - v2plot(:) = v2plot(:)+abs(wf_(:,i1))**2 - ! + alpha=k_dot_r_e(ir)-kp_dot_r_h(ir_hole) + phase=cmplx(cos(alpha),sin(alpha),kind=SP) + wf_vc(ir) = wf_vc(ir)*phase + enddo + ! + do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 + i1=i_l-BS_E_degs(j_lambda)+1 + wf_(:,i1) = wf_(:,i1)+BS_mat(neh,i_l)*wf_vc(:) enddo ! !if (master_thread) call live_timing(steps=1) + call live_timing(steps=1) + ! + enddo + ! + call live_timing() + ! + do i1=1,n_lambda_deg + v2plot(:) = v2plot(:)+abs(wf_(:,i1))**2 + enddo ! endif ! - !call live_timing() - ! - !call PP_redux_wait(v2plot) - ! + call PP_redux_wait(v2plot) ! ! PLOT ! From 4cd64bd92861f1ffc2cc30bc04e21692fe3bee66 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 10:27:50 +0200 Subject: [PATCH 1053/1367] Function WF_symm removed. It was very slow and it is not needed anymore --- src/wf_and_fft/.objects | 2 +- src/wf_and_fft/WF_symm.F | 43 ------------------------------------- ypp/excitons/excitons_WFs.F | 2 +- 3 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 src/wf_and_fft/WF_symm.F diff --git a/src/wf_and_fft/.objects b/src/wf_and_fft/.objects index c48017aa5c..8360b5bb73 100644 --- a/src/wf_and_fft/.objects +++ b/src/wf_and_fft/.objects @@ -31,7 +31,7 @@ FFT_gpu = fft_3d_hip.o objs = fft_setup.o fft_free.o $(FFT_object) $(FFT_more) $(FFT_gpu) scatter_Bamp_using_the_gradient.o \ fft_check_size.o WF_free.o WF_alloc.o WF_shift_kpoint.o WF_symm_kpoint_incl.o \ scatter_Bamp_spin.o scatter_Bamp_incl.o scatter_Gamp_incl.o WF_spatial_inversion.o \ - WF_load.o WF_symm.o WF_apply_symm_incl.o $(WF_rot_object) \ + WF_load.o WF_apply_symm_incl.o $(WF_rot_object) \ $(WF_der_objects) eval_R_minus_R.o scatter_Modscr.o load_cc.o \ PP_uspp_init.o PP_addus_vloc_aug.o PP_vloc_augment.o PP_compute_becp.o \ PP_becprod_calc.o PP_scatterBamp_init.o PP_rotate_becp.o PP_addus_rhotw_aug.o diff --git a/src/wf_and_fft/WF_symm.F b/src/wf_and_fft/WF_symm.F deleted file mode 100644 index 16249535dd..0000000000 --- a/src/wf_and_fft/WF_symm.F +++ /dev/null @@ -1,43 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2013 The Yambo Team -! -! Authors (see AUTHORS file for details): DS -! -function WF_symm(ifft,isc) - ! - use pars, ONLY:SP - use wave_func, ONLY:WF - use FFT_m, ONLY:fft_rot_r - use electrons, ONLY:n_spinor - use D_lattice, ONLY:nsym,spin_sop,i_time_rev,idt_index - ! - implicit none - ! - complex(SP), dimension(n_spinor) :: WF_symm - ! - integer :: isc(4) - ! - integer :: ifft - integer :: i_wf - ! - i_wf=WF%index(isc(1),isc(2),isc(4)) - ! - if(isc(3)==idt_index) then - WF_symm(:)=WF%c(ifft,:,i_wf) - return - endif - ! - if(n_spinor==1) WF_symm(1)=WF%c(fft_rot_r(ifft,isc(3)),1,i_wf) - ! - if (n_spinor==2) then - WF_symm(1)=spin_sop(1,1,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),1,i_wf)+ & -& spin_sop(1,2,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),2,i_wf) - WF_symm(2)=spin_sop(2,1,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),1,i_wf)+ & -& spin_sop(2,2,isc(3))*WF%c(fft_rot_r(ifft,isc(3)),2,i_wf) - endif - ! - if(isc(3)>nsym/(i_time_rev+1)) WF_symm=conjg(WF_symm) - ! -end function diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index d3d4ec56b0..58f3ebf608 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -26,7 +26,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use BS_solvers, ONLY:BSS_eh_table,BS_mat,BSS_desc,BSS_n_eig use BS, ONLY:BS_bands,BS_H_dim use interfaces, ONLY:WF_load,WF_free,DESC_write - use wave_func, ONLY:WF,WF_symm,wf_ng + use wave_func, ONLY:WF,wf_ng use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use openmp, ONLY:OPENMP_update,master_thread From 2e875acbcb97d2c7703bcbf366e90396f5b48565 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 10:45:40 +0200 Subject: [PATCH 1054/1367] Removed old comment in italian --- ypp/plotting/plot_gnuplot.F | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ypp/plotting/plot_gnuplot.F b/ypp/plotting/plot_gnuplot.F index ced3d42582..ed59b09983 100644 --- a/ypp/plotting/plot_gnuplot.F +++ b/ypp/plotting/plot_gnuplot.F @@ -80,14 +80,6 @@ subroutine plot_gnuplot(eval_only) enddo v_max=maxval(v2plot2D(:,1)) ! - ! Daniele [15/7/2007] - ! Questo e' corretto, e' la normalizzazione. Io in una versione precedente - ! di questa subroutine, la parte 1d di gnuplot non la avevo normalizzata - ! a proposito. Siccome e' il plot piu' veloce, lo usavo per vedere il - ! valore assoluto. Quando si mette la hole, magari un po' casaccio, cosi' - ! vedi se stai pescando valori della wf, oppure no. Appunto nel caso che - ! uno mette la hole in un punto con poca densita'. - ! if (l_norm_to_one) v2plot2D=v2plot2D/v_max v2plot2D=v2plot2D*WF_multiplier ! From 7c142cc65e8387ad35e397b189777aea9b64fb44 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 14:34:14 +0200 Subject: [PATCH 1055/1367] Fixed clash bewteen levels mirroring and levels fix of degeneracies --- src/common/LEVELS_mirror.F | 57 ++++++++++++++++++++++- src/common/LEVELS_respect_degenerations.F | 3 +- src/interface/INIT_load.F | 25 +--------- 3 files changed, 59 insertions(+), 26 deletions(-) diff --git a/src/common/LEVELS_mirror.F b/src/common/LEVELS_mirror.F index f9dfd827d1..759764b4ed 100644 --- a/src/common/LEVELS_mirror.F +++ b/src/common/LEVELS_mirror.F @@ -185,7 +185,60 @@ end subroutine def_dip_bands end subroutine ! ! -subroutine LEVELS_frozen(TMP_bands,TMP_bands_frozen,TMP_bands_frozen_ch,TMP_kind,nb) +subroutine LEVELS_frozen(en) + ! + use electrons, ONLY:levels + use BS, ONLY:BS_bands,BS_bands_frozen,BS_bands_frozen_ch +#if defined _SC + use SC, ONLY:SC_bands,SC_bands_frozen,SC_bands_frozen_ch +#endif +#if defined _RT || defined _QED || defined _NL + use real_time, ONLY:RT_bands,RT_bands_frozen,RT_bands_frozen_ch +#endif +#if defined _SC || defined _RT || defined _QED || defined _NL + use collision_ext, ONLY:COLL_bands,COLL_bands_frozen,COLL_bands_frozen_ch + use hamiltonian, ONLY:H_ref_bands,H_ref_bands_frozen +#endif +#if defined _NL + use nl_optics, ONLY:NL_bands,NL_bands_frozen,NL_bands_frozen_ch +#endif + ! + implicit none + ! + type(levels), intent(in) :: en + ! + if(allocated(BS_bands_frozen)) deallocate(BS_bands_frozen) + allocate(BS_bands_frozen(BS_bands(1):BS_bands(2))) + call LEVELS_frozen_local(BS_bands,BS_bands_frozen,BS_bands_frozen_ch,"BSE",BS_bands(2)-BS_bands(1)+1) + ! +#if defined _SC || defined _RT || defined _NL + if(allocated(H_ref_bands_frozen)) deallocate(H_ref_bands_frozen) + allocate(H_ref_bands_frozen(en%nb)) + H_ref_bands_frozen=0 + if(allocated(COLL_bands_frozen)) deallocate(COLL_bands_frozen) + allocate(COLL_bands_frozen(en%nb)) + call LEVELS_frozen_local((/1,COLL_bands(2)/),COLL_bands_frozen,COLL_bands_frozen_ch,"COLL",en%nb) +#endif +#if defined _RT + if(allocated(RT_bands_frozen)) deallocate(RT_bands_frozen) + allocate(RT_bands_frozen(en%nb)) + call LEVELS_frozen_local((/1,RT_bands(2)/),RT_bands_frozen,RT_bands_frozen_ch,"RT",en%nb) +#endif +#if defined _SC + if(allocated(SC_bands_frozen)) deallocate(SC_bands_frozen) + allocate(SC_bands_frozen(en%nb)) + call LEVELS_frozen_local((/1,SC_bands(2)/),SC_bands_frozen,SC_bands_frozen_ch,"SC",en%nb) +#endif +#if defined _NL + if(allocated(NL_bands_frozen)) deallocate(NL_bands_frozen) + allocate(NL_bands_frozen(en%nb)) + call LEVELS_frozen_local((/1,NL_bands(2)/),NL_bands_frozen,NL_bands_frozen_ch,"NL",en%nb) +#endif + ! +end subroutine LEVELS_frozen +! +! +subroutine LEVELS_frozen_local(TMP_bands,TMP_bands_frozen,TMP_bands_frozen_ch,TMP_kind,nb) ! use pars, ONLY:LP,schlen use parser_m, ONLY:parser @@ -217,4 +270,4 @@ subroutine LEVELS_frozen(TMP_bands,TMP_bands_frozen,TMP_bands_frozen_ch,TMP_kind enddo endif ! -end subroutine LEVELS_frozen +end subroutine LEVELS_frozen_local diff --git a/src/common/LEVELS_respect_degenerations.F b/src/common/LEVELS_respect_degenerations.F index daff75a6f3..bd33abe985 100644 --- a/src/common/LEVELS_respect_degenerations.F +++ b/src/common/LEVELS_respect_degenerations.F @@ -10,7 +10,7 @@ subroutine LEVELS_respect_degenerations(E,Dip,X) use electrons, ONLY:levels use stderr, ONLY:intc use vec_operate, ONLY:degeneration_finder - use BS, ONLY:BS_bands + use BS, ONLY:BS_bands,BS_bands_frozen use X_m, ONLY:X_t use DIPOLES, ONLY:DIPOLE_t use QP_m, ONLY:QP_n_G_bands @@ -107,6 +107,7 @@ subroutine LEVELS_respect_degenerations(E,Dip,X) ! ! MIRROR !-------- + call LEVELS_frozen(E) call LEVELS_mirror("MIRROR_bands",E,X,Dip,l_USER_fields) ! contains diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index e045640d3c..bc28f5c077 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -33,8 +33,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& & RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cyl_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_bands_frozen_ch,& -& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry,& -& BS_bands_frozen +& BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry use BS_solvers, ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,& & BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,& & BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig_Input,BSS_first_eig,Haydock_iterMAX,BSS_ldiago_solver @@ -741,27 +740,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! if (initmode==4) then ! - allocate(BS_bands_frozen(BS_bands(1):BS_bands(2))) - call LEVELS_frozen(BS_bands,BS_bands_frozen,BS_bands_frozen_ch,"BSE",BS_bands(2)-BS_bands(1)+1) - ! -#if defined _SC || defined _RT || defined _NL - allocate(H_ref_bands_frozen(en%nb)) - H_ref_bands_frozen=0 - allocate(COLL_bands_frozen(en%nb)) - call LEVELS_frozen((/1,COLL_bands(2)/),COLL_bands_frozen,COLL_bands_frozen_ch,"COLL",en%nb) -#endif -#if defined _RT - allocate(RT_bands_frozen(en%nb)) - call LEVELS_frozen((/1,RT_bands(2)/),RT_bands_frozen,RT_bands_frozen_ch,"RT",en%nb) -#endif -#if defined _SC - allocate(SC_bands_frozen(en%nb)) - call LEVELS_frozen((/1,SC_bands(2)/),SC_bands_frozen,SC_bands_frozen_ch,"SC",en%nb) -#endif -#if defined _NL - allocate(NL_bands_frozen(en%nb)) - call LEVELS_frozen((/1,NL_bands(2)/),NL_bands_frozen,NL_bands_frozen_ch,"NL",en%nb) -#endif + call LEVELS_frozen(en) call LEVELS_mirror("MIRROR_q",en,X,Dip,l_USER_fields) call LEVELS_mirror("MIRROR_bands",en,X,Dip,l_USER_fields) endif From 4142264b6ff8277573a32a8d992d095cfdec46dc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 14:39:54 +0200 Subject: [PATCH 1056/1367] Small fix in collisions basic operations --- src/collisions/COLLISIONS_basic_operations.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collisions/COLLISIONS_basic_operations.F b/src/collisions/COLLISIONS_basic_operations.F index b311684769..04e86a45d6 100644 --- a/src/collisions/COLLISIONS_basic_operations.F +++ b/src/collisions/COLLISIONS_basic_operations.F @@ -95,9 +95,9 @@ subroutine COLLISIONS_basic_operations( what, COLL ) i_m=i_n+i_mix ! if ( COLLISIONS_CV_only .and. i_m<=n_full_bands(i_sp) ) cycle - if ( COLL_bands_frozen(i_m)==1 ) cycle ! if (i_m>COLL_bands(2)) cycle + if ( COLL_bands_frozen(i_m)==1 ) cycle ! ! No Off-diagonal elements in the case of P collisions ! From 51b939d8817704189a3fb687f7d04965f889416b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 12 Jul 2025 15:35:44 +0200 Subject: [PATCH 1057/1367] Fixed parallelization of new implementation for computin excitonic wave-function --- ypp/excitons/excitons_WFs.F | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 58f3ebf608..f598ddaeb4 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -224,6 +224,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! call live_timing() ! + call PP_redux_wait(v2plot) + ! else ! wf_=cZERO @@ -275,14 +277,14 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! call live_timing() ! + call PP_redux_wait(wf_) + ! do i1=1,n_lambda_deg v2plot(:) = v2plot(:)+abs(wf_(:,i1))**2 enddo ! endif ! - call PP_redux_wait(v2plot) - ! ! PLOT ! if (use_cube) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(j_lambda))//'.cube' From 6c5106de77a4f3b0d94d3eee0aef64aeae717b79 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 13 Jul 2025 01:54:30 +0200 Subject: [PATCH 1058/1367] Few more changes to firther optimize ypp coding --- ypp/excitons/excitons_WFs.F | 79 +++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 58f3ebf608..bf1238fc35 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -43,15 +43,16 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Workspace ! type(PP_indexes) :: px + logical :: l_free_hole_loc integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_l,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& -& n_lambda_deg,n_deg_max,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 +& n_lambda_deg,BS_E_deg_done,n_deg_max,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 integer :: ikpbz,ikp,isp - real(SP) :: alpha,r_hole_rlu(3) - complex(SP) :: phase,B_coeff + real(SP) :: r_hole_rlu(3),k1(3),k2(3) + complex(SP) :: B_coeff ! integer, allocatable :: rindex(:) - real(SP), allocatable :: r_cell_cc(:,:),kp_dot_r_h(:),k_dot_r_e(:) - complex(SP), allocatable :: wf_(:,:),wf_vc(:),WF1(:,:),WF2(:,:) + real(SP), allocatable :: r_cell_cc(:,:),kp_dot_r_h(:),k_dot_r_e(:),alpha(:) + complex(SP), allocatable :: wf_(:,:),wf_vc(:),WF1(:,:),WF2(:,:),phase(:) ! call section('+','Excitonic Wave Function') ! @@ -91,7 +92,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) r_hole_rlu(:)=nint(r_hole_rlu(:)*fft_dim(:)) ir_hole=1+r_hole_rlu(1)+ r_hole_rlu(2)*nr(1)+ r_hole_rlu(3)*nr(1)*nr(2) if (ir_hole.lt.0) call error(' Hole coordinates in input must be positive') - call msg('s',' position in the FFT grid ',r_cell_cc(:,ir_hole),"[c.c.]") + call msg('s',' position in the FFT grid ',r_cell_cc(ir_hole,:),"[c.c.]") ! ! [3] Translation in the center of the Big grid ! @@ -107,7 +108,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! enddo ir_hole=1+r_hole_rlu(1)+ r_hole_rlu(2)*nr(1)+ r_hole_rlu(3)*nr(1)*nr(2) - r_hole=r_cell_cc(:,ir_hole) + r_hole=r_cell_cc(ir_hole,:) ! call msg('s',' translated position ',r_hole,"[c.c.]") call msg('s',' ',r_hole*BO2ANG,"[A]") @@ -127,9 +128,12 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) n_deg_max=0 do i_lambda=1,EXCITONS_n_user_states j_lambda=EXCITONS_user_indexes(i_lambda) - n_deg_max=max(n_deg_max,count(BS_E_degs==BS_E_degs(j_lambda))) + n_lambda_deg=count(BS_E_degs==BS_E_degs(j_lambda)) + n_deg_max=max(n_deg_max,n_lambda_deg) enddo - YAMBO_ALLOC(wf_vc,(nr_tot)) + YAMBO_ALLOC(wf_vc,(fft_size)) + YAMBO_ALLOC(alpha,(nr_tot)) + YAMBO_ALLOC(phase,(nr_tot)) YAMBO_ALLOC(wf_,(nr_tot,n_deg_max)) ! ! Par Proc @@ -143,12 +147,21 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! call msg('s','Processing '//trim(intc(EXCITONS_n_user_states))//' states') ! + BS_E_deg_done=-1 + ! + l_free_hole_loc=l_free_hole + ! do i_lambda=1,EXCITONS_n_user_states ! j_lambda=EXCITONS_user_indexes(i_lambda) ! + if (BS_E_degs(j_lambda)==BS_E_deg_done) cycle + ! + BS_E_deg_done=BS_E_degs(j_lambda) + ! n_lambda_deg=count(BS_E_degs==BS_E_degs(j_lambda)) ! + ! if (n_lambda_deg>1) call msg('s',' State '//trim(intc(j_lambda))//' Merged with states '//& & trim(intc(BS_E_degs(j_lambda)))//' -> '//& & trim(intc(BS_E_degs(j_lambda)+n_lambda_deg-1))) @@ -226,7 +239,11 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! else ! - wf_=cZERO + wf_= cZERO + k_dot_r_e = 1._SP + kp_dot_r_h = 1._SP + WF1 = cZERO + WF2 = cZERO ! do neh = 1,BS_H_dim ! @@ -244,28 +261,32 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikp = Xk%sstar(ikpbz,1) isp = Xk%sstar(ikpbz,2) ! - do ir=1,nr_tot - if (l_free_hole) ir_hole=ir - k_dot_r_e(ir) = dot_product(r_cell_cc(:,ir), Xk%ptbz(ikbz,:)/alat(:))*2._SP*pi - kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(:,ir_hole),Xk%ptbz(ikpbz,:)/alat(:))*2._SP*pi - enddo - ! call WF_apply_symm((/iv,ikp, isp,i_sp_pol/),WF1) call WF_apply_symm((/ic,ikibz,is, i_sp_pol/),WF2) ! - do ir=1,nr_tot - if (l_free_hole) ir_hole=ir - wf_vc(ir) = conjg(WF1(rindex(ir_hole),1))*WF2(rindex(ir),1) - if(n_spinor==2) wf_vc(ir) = wf_vc(ir) + conjg(WF1(rindex(ir_hole),2))*WF2(rindex(ir),2) - ! - alpha=k_dot_r_e(ir)-kp_dot_r_h(ir_hole) - phase=cmplx(cos(alpha),sin(alpha),kind=SP) - wf_vc(ir) = wf_vc(ir)*phase - enddo + k1=Xk%ptbz(ikbz,:)/alat(:)*2._SP*pi + k2=Xk%ptbz(ikpbz,:)/alat(:)*2._SP*pi + ! + k_dot_r_e(:) = r_cell_cc(:,1)*k1(1)+r_cell_cc(:,2)*k1(2)+r_cell_cc(:,3)*k1(3) + ! + if (l_free_hole_loc) then + wf_vc(:) = conjg(WF1(:,1))*WF2(:,1) + if(n_spinor==2) wf_vc(:) = wf_vc(:) + conjg(WF1(:,2))*WF2(:,2) + kp_dot_r_h(:) = r_cell_cc(:,1)*k2(1)+r_cell_cc(:,2)*k2(2)+r_cell_cc(:,3)*k2(3) + alpha(:)=k_dot_r_e(:)-kp_dot_r_h(:) + else + wf_vc(:) = WF1(rindex(ir_hole),1)*WF2(:,1) + if(n_spinor==2) wf_vc(:) = wf_vc(:) + WF1(rindex(ir_hole),2)*WF2(:,2) + kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(ir_hole,:),k2(:)) + alpha(:)=k_dot_r_e(:)-kp_dot_r_h(ir_hole) + endif + ! + phase(:)=cmplx(cos(alpha(:)),sin(alpha(:)),kind=SP) + !phase(:)=alpha(:) ! do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - i1=i_l-BS_E_degs(j_lambda)+1 - wf_(:,i1) = wf_(:,i1)+BS_mat(neh,i_l)*wf_vc(:) + i1=i_l-BS_E_degs(j_lambda)+1 + wf_(:,i1) = wf_(:,i1)+BS_mat(neh,i_l)*wf_vc(rindex(:))*phase(:) enddo ! !if (master_thread) call live_timing(steps=1) @@ -346,7 +367,7 @@ subroutine expand_grid() enddo ! nr_tot = fft_size*ncell(1)*ncell(2)*ncell(3) - YAMBO_ALLOC(r_cell_cc,(3,nr_tot)) + YAMBO_ALLOC(r_cell_cc,(nr_tot,3)) YAMBO_ALLOC(rindex,(nr_tot)) ! nr=(/ncell(1)*fft_dim(1),ncell(2)*fft_dim(2),ncell(3)*fft_dim(3)/) @@ -364,7 +385,7 @@ subroutine expand_grid() j2=ir2/fft_dim(2) j3=ir3/fft_dim(3) rindex(ir)=i1+fft_dim(1)*i2+fft_dim(1)*fft_dim(2)*i3+1 - r_cell_cc(:,ir) = ir1*a(1,:)/fft_dim(1) +& + r_cell_cc(ir,:) = ir1*a(1,:)/fft_dim(1) +& & ir2*a(2,:)/fft_dim(2) +& & ir3*a(3,:)/fft_dim(3) end do From d792e2f9d6ffaabb4d9178a9135ede204bafdec5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Jul 2025 01:16:10 +0200 Subject: [PATCH 1059/1367] Saving excitons_WF version A. Works with MPI, does not work with OpenMP --- ypp/excitons/excitons_WFs.F | 130 +++++++++++++++++++++++------------- 1 file changed, 85 insertions(+), 45 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index d23e22aa46..5afc7e74ee 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -43,10 +43,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Workspace ! type(PP_indexes) :: px - logical :: l_free_hole_loc integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_l,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& & n_lambda_deg,BS_E_deg_done,n_deg_max,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 - integer :: ikpbz,ikp,isp + integer :: ikpbz,ikp,isp,i_spinor,rh_size,ir_hole_rlu(3) real(SP) :: r_hole_rlu(3),k1(3),k2(3) complex(SP) :: B_coeff ! @@ -89,8 +88,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! [2] Bare position in the FFT grid ! call c2a(b_in=a,v_in=r_hole,v_out=r_hole_rlu,mode='kc2a') - r_hole_rlu(:)=nint(r_hole_rlu(:)*fft_dim(:)) - ir_hole=1+r_hole_rlu(1)+ r_hole_rlu(2)*nr(1)+ r_hole_rlu(3)*nr(1)*nr(2) + ir_hole_rlu(:)=nint(r_hole_rlu(:)*fft_dim(:)) + ir_hole=1+ir_hole_rlu(1)+ ir_hole_rlu(2)*nr(1)+ ir_hole_rlu(3)*nr(1)*nr(2) if (ir_hole.lt.0) call error(' Hole coordinates in input must be positive') call msg('s',' position in the FFT grid ',r_cell_cc(ir_hole,:),"[c.c.]") ! @@ -99,15 +98,13 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) do j1=1,3 if (ncell(j1)==1) cycle ! - ! (***) Daniele 15/7/07 rev Andrea 12/07: - ! ! The number of cells is always odd so that the hole can ! be placed in the middle. ! - r_hole_rlu(j1)=r_hole_rlu(j1)+ncell(j1)/2*fft_dim(j1) + ir_hole_rlu(j1)=ir_hole_rlu(j1)+ncell(j1)/2*fft_dim(j1) ! enddo - ir_hole=1+r_hole_rlu(1)+ r_hole_rlu(2)*nr(1)+ r_hole_rlu(3)*nr(1)*nr(2) + ir_hole=1+ir_hole_rlu(1)+ir_hole_rlu(2)*nr(1)+ir_hole_rlu(3)*nr(1)*nr(2) r_hole=r_cell_cc(ir_hole,:) ! call msg('s',' translated position ',r_hole,"[c.c.]") @@ -122,8 +119,10 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) YAMBO_ALLOC(WF1,(fft_size,n_spinor)) YAMBO_ALLOC(WF2,(fft_size,n_spinor)) ! - YAMBO_ALLOC( k_dot_r_e,(nr_tot)) - YAMBO_ALLOC(kp_dot_r_h,(nr_tot)) + rh_size=1 + if (l_free_hole) rh_size=nr_tot + YAMBO_ALLOC(k_dot_r_e,(nr_tot)) + YAMBO_ALLOC(kp_dot_r_h,(rh_size)) ! n_deg_max=0 do i_lambda=1,EXCITONS_n_user_states @@ -149,8 +148,6 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! BS_E_deg_done=-1 ! - l_free_hole_loc=l_free_hole - ! do i_lambda=1,EXCITONS_n_user_states ! j_lambda=EXCITONS_user_indexes(i_lambda) @@ -165,12 +162,12 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) if (n_lambda_deg>1) call msg('s',' State '//trim(intc(j_lambda))//' Merged with states '//& & trim(intc(BS_E_degs(j_lambda)))//' -> '//& & trim(intc(BS_E_degs(j_lambda)+n_lambda_deg-1))) - ! - call live_timing('ExcWF@'//trim(intc(j_lambda)),px%n_of_elements(myid+1)) - ! - v2plot =0._SP ! if(l_average_eh) then + ! + v2plot =0._SP + ! + call live_timing('ExcWF@'//trim(intc(j_lambda)),px%n_of_elements(myid+1)) ! do neh = 1,BS_H_dim ! @@ -205,11 +202,12 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 ! - B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) - ! - v2plot(:) = v2plot(:)+B_coeff*WF1(:,1)*conjg(WF2(:,1)) - if(n_spinor==2) v2plot(:) = v2plot(:)+B_coeff*WF1(:,2)*conjg(WF2(:,2)) + B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) ! + do i_spinor=1,n_spinor + v2plot(:) = v2plot(:)+B_coeff*WF1(:,i_spinor)*conjg(WF2(:,i_spinor)) + enddo + ! enddo ! elseif(iv1==iv.and.trim(AVE_exc)=='e') then @@ -219,10 +217,11 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 ! - B_coeff = conjg(BS_mat(neh, i_l))* BS_mat(neh1, i_l) + B_coeff = conjg(BS_mat(neh, i_l))* BS_mat(neh1, i_l) ! - v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,1))*WF2(:,1) - if(n_spinor==2) v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,2))*WF2(:,2) + do i_spinor=1,n_spinor + v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,i_spinor))*WF2(:,i_spinor) + enddo ! enddo ! @@ -230,7 +229,6 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! enddo ! loop on neh1 ! - !if (master_thread) call live_timing(steps=1) call live_timing(steps=1) ! enddo ! loop on neh @@ -241,12 +239,23 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! else ! - wf_= cZERO - k_dot_r_e = 1._SP - kp_dot_r_h = 1._SP + call live_timing('ExcWF@'//trim(intc(j_lambda)),px%n_of_elements(myid+1)) + ! WF1 = cZERO WF2 = cZERO ! + ! The following omp implementation assumes that, at all + ! "omp do" instructions the variables are split in the same way + ! among the omp threads + ! + call OPENMP_update(master_thread) + ! + wf_= cZERO + ! + !$omp parallel default(shared), & + !$omp private(k_dot_r_e,alpha,phase,ir), & + !$omp reduction(+:wf_) + ! do neh = 1,BS_H_dim ! if (.not.px%element_1D(neh)) cycle @@ -266,43 +275,74 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) call WF_apply_symm((/iv,ikp, isp,i_sp_pol/),WF1) call WF_apply_symm((/ic,ikibz,is, i_sp_pol/),WF2) ! + ! All the following operations are only up to fft_size + wf_vc=cZERO + if (l_free_hole) then + do i_spinor=1,n_spinor + wf_vc(:) = wf_vc(:) + conjg(WF1(:,i_spinor))*WF2(:,i_spinor) + enddo + else + do i_spinor=1,n_spinor + wf_vc(:) = wf_vc(:) + conjg(WF1(rindex(ir_hole),i_spinor))*WF2(:,i_spinor) + enddo + endif + ! k1=Xk%ptbz(ikbz,:)/alat(:)*2._SP*pi k2=Xk%ptbz(ikpbz,:)/alat(:)*2._SP*pi ! - k_dot_r_e(:) = r_cell_cc(:,1)*k1(1)+r_cell_cc(:,2)*k1(2)+r_cell_cc(:,3)*k1(3) - ! - if (l_free_hole_loc) then - wf_vc(:) = conjg(WF1(:,1))*WF2(:,1) - if(n_spinor==2) wf_vc(:) = wf_vc(:) + conjg(WF1(:,2))*WF2(:,2) - kp_dot_r_h(:) = r_cell_cc(:,1)*k2(1)+r_cell_cc(:,2)*k2(2)+r_cell_cc(:,3)*k2(3) - alpha(:)=k_dot_r_e(:)-kp_dot_r_h(:) + if (l_free_hole) then + ! + !$omp do + do ir=1,nr_tot + k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) + kp_dot_r_h(ir)=r_cell_cc(ir,1)*k2(1)+r_cell_cc(ir,2)*k2(2)+r_cell_cc(ir,3)*k2(3) + alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(ir) + phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + enddo + !$omp end do + ! else - wf_vc(:) = WF1(rindex(ir_hole),1)*WF2(:,1) - if(n_spinor==2) wf_vc(:) = wf_vc(:) + WF1(rindex(ir_hole),2)*WF2(:,2) - kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(ir_hole,:),k2(:)) - alpha(:)=k_dot_r_e(:)-kp_dot_r_h(ir_hole) + ! + kp_dot_r_h(1) = dot_product(r_cell_cc(ir_hole,:),k2(:)) + ! + !$omp do + do ir=1,nr_tot + k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) + alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(1) + phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + enddo + !$omp end do + ! endif ! - phase(:)=cmplx(cos(alpha(:)),sin(alpha(:)),kind=SP) - !phase(:)=alpha(:) - ! do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 i1=i_l-BS_E_degs(j_lambda)+1 - wf_(:,i1) = wf_(:,i1)+BS_mat(neh,i_l)*wf_vc(rindex(:))*phase(:) + !$omp do + do ir=1,nr_tot + wf_(ir,i1) = wf_(ir,i1)+BS_mat(neh,i_l)*wf_vc(rindex(ir))*phase(ir) + enddo + !$omp end do enddo ! - !if (master_thread) call live_timing(steps=1) - call live_timing(steps=1) + if (master_thread) call live_timing(steps=1) ! enddo + !$omp end parallel ! call live_timing() ! call PP_redux_wait(wf_) ! + v2plot= 0._SP + ! + !$omp parallel do default(shared), collapse(2) & + !$omp private(i1,ir), reduction(+:v2plot) do i1=1,n_lambda_deg - v2plot(:) = v2plot(:)+abs(wf_(:,i1))**2 + do ir=1,nr_tot + v2plot(ir) = v2plot(ir)+abs(wf_(ir,i1))**2 + enddo enddo + !$omp end parallel do ! endif ! From 1a52e52a23130a9757970c0aa984f22d48dd5652 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Jul 2025 09:57:39 +0200 Subject: [PATCH 1060/1367] Fixed missing conjg in plotting of exc WFs --- ypp/excitons/excitons_WFs.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index d23e22aa46..0427c6056b 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -277,8 +277,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) kp_dot_r_h(:) = r_cell_cc(:,1)*k2(1)+r_cell_cc(:,2)*k2(2)+r_cell_cc(:,3)*k2(3) alpha(:)=k_dot_r_e(:)-kp_dot_r_h(:) else - wf_vc(:) = WF1(rindex(ir_hole),1)*WF2(:,1) - if(n_spinor==2) wf_vc(:) = wf_vc(:) + WF1(rindex(ir_hole),2)*WF2(:,2) + wf_vc(:) = conjg(WF1(rindex(ir_hole),1))*WF2(:,1) + if(n_spinor==2) wf_vc(:) = wf_vc(:) + conjg(WF1(rindex(ir_hole),2))*WF2(:,2) kp_dot_r_h(ir_hole) = dot_product(r_cell_cc(ir_hole,:),k2(:)) alpha(:)=k_dot_r_e(:)-kp_dot_r_h(ir_hole) endif From 3fd8b4ee4a79f44a92fae18ffc799fdb83e52c75 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Jul 2025 11:02:21 +0200 Subject: [PATCH 1061/1367] Fixed omp implementation for excitons plotting --- ypp/excitons/excitons_WFs.F | 123 +++++++++++++++-------------------- ypp/excitons/excitons_read.F | 2 +- 2 files changed, 53 insertions(+), 72 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 5afc7e74ee..a0aa7a3364 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -18,7 +18,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use D_lattice, ONLY:a,alat use FFT_m, ONLY:fft_dim,fft_size use com, ONLY:msg,of_open_close - use electrons, ONLY:spin,n_spinor + use electrons, ONLY:n_spinor use YPPm, ONLY:v2plot,ncell,r_hole,l_free_hole,AVE_exc,& & nr,nr_tot,output_fname,l_average_eh,& & use_xcrysden,use_gnuplot,use_cube,plot_dim,& @@ -43,15 +43,15 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Workspace ! type(PP_indexes) :: px - integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_l,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& -& n_lambda_deg,BS_E_deg_done,n_deg_max,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 - integer :: ikpbz,ikp,isp,i_spinor,rh_size,ir_hole_rlu(3) + integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& +& n_lambda_deg,BS_E_deg_done,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 + integer :: ikpbz,ikp,isp,i_spinor,rh_size,ir_hole_rlu(3),i_plot real(SP) :: r_hole_rlu(3),k1(3),k2(3) complex(SP) :: B_coeff ! integer, allocatable :: rindex(:) real(SP), allocatable :: r_cell_cc(:,:),kp_dot_r_h(:),k_dot_r_e(:),alpha(:) - complex(SP), allocatable :: wf_(:,:),wf_vc(:),WF1(:,:),WF2(:,:),phase(:) + complex(SP), allocatable :: wf_tmp(:),wf_vc(:),WF1(:,:),WF2(:,:),phase(:) ! call section('+','Excitonic Wave Function') ! @@ -124,16 +124,10 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) YAMBO_ALLOC(k_dot_r_e,(nr_tot)) YAMBO_ALLOC(kp_dot_r_h,(rh_size)) ! - n_deg_max=0 - do i_lambda=1,EXCITONS_n_user_states - j_lambda=EXCITONS_user_indexes(i_lambda) - n_lambda_deg=count(BS_E_degs==BS_E_degs(j_lambda)) - n_deg_max=max(n_deg_max,n_lambda_deg) - enddo YAMBO_ALLOC(wf_vc,(fft_size)) YAMBO_ALLOC(alpha,(nr_tot)) YAMBO_ALLOC(phase,(nr_tot)) - YAMBO_ALLOC(wf_,(nr_tot,n_deg_max)) + YAMBO_ALLOC(wf_tmp,(nr_tot)) ! ! Par Proc ! @@ -152,20 +146,17 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! j_lambda=EXCITONS_user_indexes(i_lambda) ! - if (BS_E_degs(j_lambda)==BS_E_deg_done) cycle + if (BS_E_degs(j_lambda)/=BS_E_deg_done) i1=0 ! BS_E_deg_done=BS_E_degs(j_lambda) ! - n_lambda_deg=count(BS_E_degs==BS_E_degs(j_lambda)) - ! + i1=i1+1 ! - if (n_lambda_deg>1) call msg('s',' State '//trim(intc(j_lambda))//' Merged with states '//& -& trim(intc(BS_E_degs(j_lambda)))//' -> '//& -& trim(intc(BS_E_degs(j_lambda)+n_lambda_deg-1))) + n_lambda_deg=count(BS_E_degs==BS_E_degs(j_lambda)) ! if(l_average_eh) then ! - v2plot =0._SP + if(i1==1) v2plot =0._SP ! call live_timing('ExcWF@'//trim(intc(j_lambda)),px%n_of_elements(myid+1)) ! @@ -176,7 +167,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikbz = BSS_eh_table(neh,1) iv = BSS_eh_table(neh,2) ic = BSS_eh_table(neh,3) - i_sp_pol = spin(BSS_eh_table(neh,:)) + i_sp_pol = BSS_eh_table(neh,4) ! ikibz = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -186,7 +177,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikbz1 = BSS_eh_table(neh1,1) iv1 = BSS_eh_table(neh1,2) ic1 = BSS_eh_table(neh1,3) - i_sp_pol1 = spin(BSS_eh_table(neh1,:)) + i_sp_pol1 = BSS_eh_table(neh1,4) ! ikibz1 = Xk%sstar(ikbz1,1) is1 = Xk%sstar(ikbz1,2) @@ -200,14 +191,10 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) call WF_apply_symm((/iv, ikibz, is, i_sp_pol /),WF1) call WF_apply_symm((/iv1,ikibz1,is1,i_sp_pol1/),WF2) ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - ! - B_coeff = BS_mat(neh, i_l)* conjg(BS_mat(neh1, i_l)) - ! - do i_spinor=1,n_spinor - v2plot(:) = v2plot(:)+B_coeff*WF1(:,i_spinor)*conjg(WF2(:,i_spinor)) - enddo - ! + B_coeff = BS_mat(neh, j_lambda)* conjg(BS_mat(neh1, j_lambda)) + ! + do i_spinor=1,n_spinor + v2plot(:) = v2plot(:)+B_coeff*WF1(:,i_spinor)*conjg(WF2(:,i_spinor)) enddo ! elseif(iv1==iv.and.trim(AVE_exc)=='e') then @@ -215,14 +202,10 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) call WF_apply_symm((/ic, ikibz, is, i_sp_pol /),WF1) call WF_apply_symm((/ic1,ikibz1,is1,i_sp_pol1/),WF2) ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - ! - B_coeff = conjg(BS_mat(neh, i_l))* BS_mat(neh1, i_l) - ! - do i_spinor=1,n_spinor - v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,i_spinor))*WF2(:,i_spinor) - enddo - ! + B_coeff = conjg(BS_mat(neh,j_lambda))* BS_mat(neh1,j_lambda) + ! + do i_spinor=1,n_spinor + v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,i_spinor))*WF2(:,i_spinor) enddo ! endif @@ -244,17 +227,13 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) WF1 = cZERO WF2 = cZERO ! - ! The following omp implementation assumes that, at all - ! "omp do" instructions the variables are split in the same way - ! among the omp threads - ! - call OPENMP_update(master_thread) - ! - wf_= cZERO + wf_tmp= cZERO ! !$omp parallel default(shared), & - !$omp private(k_dot_r_e,alpha,phase,ir), & - !$omp reduction(+:wf_) + !$omp private(k_dot_r_e,kp_dot_r_h,alpha,phase,ir), & + !$omp reduction(+:wf_tmp) + ! + call OPENMP_update(master_thread) ! do neh = 1,BS_H_dim ! @@ -263,7 +242,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikbz = BSS_eh_table(neh,1) iv = BSS_eh_table(neh,2) ic = BSS_eh_table(neh,3) - i_sp_pol = spin(BSS_eh_table(neh,:)) + i_sp_pol = BSS_eh_table(neh,4) ! ikibz = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -298,8 +277,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) kp_dot_r_h(ir)=r_cell_cc(ir,1)*k2(1)+r_cell_cc(ir,2)*k2(2)+r_cell_cc(ir,3)*k2(3) alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(ir) phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + wf_tmp(ir) = wf_tmp(ir)+BS_mat(neh,j_lambda)*wf_vc(rindex(ir))*phase(ir) enddo - !$omp end do ! else ! @@ -310,47 +289,49 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(1) phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + wf_tmp(ir) = wf_tmp(ir)+BS_mat(neh,j_lambda)*wf_vc(rindex(ir))*phase(ir) enddo - !$omp end do ! endif ! - do i_l=BS_E_degs(j_lambda),BS_E_degs(j_lambda)+n_lambda_deg-1 - i1=i_l-BS_E_degs(j_lambda)+1 - !$omp do - do ir=1,nr_tot - wf_(ir,i1) = wf_(ir,i1)+BS_mat(neh,i_l)*wf_vc(rindex(ir))*phase(ir) - enddo - !$omp end do - enddo - ! if (master_thread) call live_timing(steps=1) + !write(*,*) neh,wf_tmp(1:10) ! enddo !$omp end parallel + !write(*,*) "after redux ",wf_tmp(1:10) ! call live_timing() ! - call PP_redux_wait(wf_) + call PP_wait() + ! + call PP_redux_wait(wf_tmp) ! - v2plot= 0._SP + if (i1==1) v2plot= 0._SP ! - !$omp parallel do default(shared), collapse(2) & - !$omp private(i1,ir), reduction(+:v2plot) - do i1=1,n_lambda_deg - do ir=1,nr_tot - v2plot(ir) = v2plot(ir)+abs(wf_(ir,i1))**2 - enddo + do ir=1,nr_tot + v2plot(ir) = v2plot(ir)+abs(wf_tmp(ir))**2 enddo - !$omp end parallel do ! endif ! + if (i1/=n_lambda_deg) cycle + ! + if (n_lambda_deg==1) then + call msg('s','Plotting single state '//trim(intc(j_lambda))) + i_plot=j_lambda + else if (n_lambda_deg>1) then + call msg('s','Plotting merged states '//& + & trim(intc(BS_E_degs(j_lambda)))//' -> '//& + & trim(intc(BS_E_degs(j_lambda)+n_lambda_deg-1))) + i_plot=BS_E_degs(j_lambda) + endif + ! ! PLOT ! - if (use_cube) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(j_lambda))//'.cube' - if (use_xcrysden) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(j_lambda))//'.xsf' - if (use_gnuplot) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(j_lambda)) + if (use_cube) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(i_plot))//'.cube' + if (use_xcrysden) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(i_plot))//'.xsf' + if (use_gnuplot) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(i_plot)) ! if (use_cube) then call of_open_close(trim(output_fname),'o') @@ -378,7 +359,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) YAMBO_FREE(WF2) ! YAMBO_FREE(wf_vc) - YAMBO_FREE(wf_) + YAMBO_FREE(wf_tmp) ! call WF_free(WF) ! diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index 2d3fd32ca1..43e77d97ea 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -119,7 +119,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) ! ! Loading tables and eigenvectors ! - YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,3+n_sp_pol-1)) + YAMBO_ALLOC(BSS_eh_table,(BS_H_dim,5)) YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) ! call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/3/),ID=io_ID) From 921f8b5a86274aaa2fc45c470c0c9b33e7811ba4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Jul 2025 11:21:19 +0200 Subject: [PATCH 1062/1367] Comments only: - removed commented debug lines - added comment on possible speed-up of the coding --- ypp/excitons/excitons_WFs.F | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index a0aa7a3364..feb694f75c 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -229,6 +229,16 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! wf_tmp= cZERO ! + ! DS note: 2025/07/14 + ! The simulation is demading due to the huge loop on the nr_tot, + ! multiplied by a large loop on BS_H_dim. All other operations are irrelevant. + ! The present strategy emplois MPI distribution over BS_H_dim, OpenMP over nr_tot + ! A simplification would be possible, since the large nr_tot loop should be + ! multiplied only by nkbz. This is the sole term which is not periodic in the extended supercell. + ! This could be achieved by replacing hte neh loop with a multiple loop over + ! nbkbz, n_sp_pol, nbv, nbc with a partial internal accumulation over nvb, nbc, n_sp_pol + ! For a system with many bands it would lead to a speed-up of a factor nbv*nbc*n_sp_pol + ! !$omp parallel default(shared), & !$omp private(k_dot_r_e,kp_dot_r_h,alpha,phase,ir), & !$omp reduction(+:wf_tmp) @@ -295,11 +305,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) endif ! if (master_thread) call live_timing(steps=1) - !write(*,*) neh,wf_tmp(1:10) ! enddo !$omp end parallel - !write(*,*) "after redux ",wf_tmp(1:10) ! call live_timing() ! From 9f39b5f329cd71ce0bbcc4cd2063aa567f4fdf22 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 14 Jul 2025 20:52:00 +0200 Subject: [PATCH 1063/1367] Coded what discussin here: https://gitlab.com/lumen-code/lumen/-/merge_requests/238#note_2626141469 --- ypp/YPPmodules/YPP_SET_defaults.F | 4 +- ypp/YPPmodules/mod_YPP.F | 2 + ypp/excitons/excitons_WFs.F | 154 +++++++++++++++++++++++------- ypp/interface/INIT_load_ypp.F | 4 +- ypp/interface/INIT_ypp.F | 1 + 5 files changed, 130 insertions(+), 35 deletions(-) diff --git a/ypp/YPPmodules/YPP_SET_defaults.F b/ypp/YPPmodules/YPP_SET_defaults.F index 9c00aad6cc..c9145cc798 100644 --- a/ypp/YPPmodules/YPP_SET_defaults.F +++ b/ypp/YPPmodules/YPP_SET_defaults.F @@ -8,7 +8,7 @@ subroutine YPP_SET_defaults() ! use YPPm, ONLY:DOS_broadening,DOS_E_range,r_hole,deg_energy ,EXCITON_weight_treshold,& - WF_multiplier,SOC_split,BANDS_bands,BANDS_steps,& + WF_multiplier,SOC_split,BANDS_bands,BANDS_steps,elec_spin,hole_spin,& & coo_in,coo_out,DOS_E_steps,INTERP_grid ,l_amplitude,l_bands,l_current,l_density ,& & l_dos,l_exc_wf ,l_mag,l_norm_to_one,l_sort,l_sp_wf,l_spin,l_wannier,mag_dir ,& & N_path_pts,ncell ,output_fname,p_dir,p_format ,perturbative_SOC_path,& @@ -151,6 +151,8 @@ subroutine YPP_SET_defaults() l_interp=.false. ncell = (/1, 1, 1/) r_hole= (/0._SP,0._SP,0._SP/) + hole_spin="average" + elec_spin="average" state_ctl = '0 - 0' deg_energy =0.01_SP/HA2EV EXCITON_Res_treshold =0.0_SP diff --git a/ypp/YPPmodules/mod_YPP.F b/ypp/YPPmodules/mod_YPP.F index 405c4b8d69..dc30f6ac8a 100644 --- a/ypp/YPPmodules/mod_YPP.F +++ b/ypp/YPPmodules/mod_YPP.F @@ -129,6 +129,8 @@ module YPPm character(1) ::p_format character(1) ::mag_dir character(3) ::p_dir + character(7) ::elec_spin + character(7) ::hole_spin character(lchlen) ::output_fname character(schlen) ::plot_title character(schlen) ::V_value diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index feb694f75c..37866b70f6 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -18,9 +18,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use D_lattice, ONLY:a,alat use FFT_m, ONLY:fft_dim,fft_size use com, ONLY:msg,of_open_close - use electrons, ONLY:n_spinor + use electrons, ONLY:n_spinor,n_sp_pol use YPPm, ONLY:v2plot,ncell,r_hole,l_free_hole,AVE_exc,& -& nr,nr_tot,output_fname,l_average_eh,& +& nr,nr_tot,output_fname,l_average_eh,elec_spin,hole_spin,& & use_xcrysden,use_gnuplot,use_cube,plot_dim,& & EXCITONS_user_indexes,EXCITONS_n_user_states use BS_solvers, ONLY:BSS_eh_table,BS_mat,BSS_desc,BSS_n_eig @@ -44,14 +44,15 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! type(PP_indexes) :: px integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& -& n_lambda_deg,BS_E_deg_done,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1 - integer :: ikpbz,ikp,isp,i_spinor,rh_size,ir_hole_rlu(3),i_plot +& n_lambda_deg,BS_E_deg_done,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1,& +& i_spin_hole,i_spin_elec + integer :: ikpbz,ikp,isp,i_spinor,j_spinor,rh_size,ir_hole_rlu(3),i_plot real(SP) :: r_hole_rlu(3),k1(3),k2(3) complex(SP) :: B_coeff ! integer, allocatable :: rindex(:) real(SP), allocatable :: r_cell_cc(:,:),kp_dot_r_h(:),k_dot_r_e(:),alpha(:) - complex(SP), allocatable :: wf_tmp(:),wf_vc(:),WF1(:,:),WF2(:,:),phase(:) + complex(SP), allocatable :: wf_tmp(:,:,:),wf_vc(:,:,:),WF1(:,:),WF2(:,:),phase(:) ! call section('+','Excitonic Wave Function') ! @@ -112,6 +113,37 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! endif ! + i_spin_hole=-1 + if(trim(hole_spin)=="up") i_spin_hole=1 + if(trim(hole_spin)=="dn") i_spin_hole=2 + if(trim(hole_spin)=="average") i_spin_hole=0 + if(trim(hole_spin)=="diag") i_spin_hole=-10 + ! + i_spin_elec=-1 + if(trim(elec_spin)=="up") i_spin_elec=1 + if(trim(elec_spin)=="dn") i_spin_elec=2 + if(trim(elec_spin)=="average") i_spin_elec=0 + if(trim(elec_spin)=="diag") i_spin_elec=-10 + ! + if (i_spin_elec==-1) call error(" wrong electron spin in input") + if (i_spin_hole==-1) call error(" wrong hole spin in input") + ! + ! DS note: to change this for magnons + if (n_sp_pol==2 .and. (i_spin_elec+i_spin_hole)==3) then + call error("Spin polarized case: electron and hole cannot have opposite spin") + endif + ! + if (n_spinor==2 .and. (i_spin_elec+i_spin_hole)<0) then + call warning("Spinorial case: diagonal approximation in spin space") + i_spin_elec=-10 + i_spin_hole=-10 + endif + ! + if (l_free_hole) then + call warning("Free hole case, imposing elec spin to be identical to hole spin") + i_spin_elec=i_spin_hole + endif + ! ! Allocation ! YAMBO_ALLOC(v2plot,(nr_tot)) @@ -119,15 +151,19 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) YAMBO_ALLOC(WF1,(fft_size,n_spinor)) YAMBO_ALLOC(WF2,(fft_size,n_spinor)) ! - rh_size=1 - if (l_free_hole) rh_size=nr_tot - YAMBO_ALLOC(k_dot_r_e,(nr_tot)) - YAMBO_ALLOC(kp_dot_r_h,(rh_size)) - ! - YAMBO_ALLOC(wf_vc,(fft_size)) - YAMBO_ALLOC(alpha,(nr_tot)) - YAMBO_ALLOC(phase,(nr_tot)) - YAMBO_ALLOC(wf_tmp,(nr_tot)) + if(.not.l_average_eh) then + rh_size=1 + if (l_free_hole) rh_size=nr_tot + YAMBO_ALLOC(k_dot_r_e,(nr_tot)) + YAMBO_ALLOC(kp_dot_r_h,(rh_size)) + ! + i1=n_spinor + if(l_free_hole) i1=1 + YAMBO_ALLOC(wf_vc,(fft_size,n_spinor,i1)) + YAMBO_ALLOC(alpha,(nr_tot)) + YAMBO_ALLOC(phase,(nr_tot)) + YAMBO_ALLOC(wf_tmp,(nr_tot,n_spinor,i1)) + endif ! ! Par Proc ! @@ -187,6 +223,11 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Build the B_{vvk} (or B_{cck} ) matrix ! if (ic1==ic.and.trim(AVE_exc)=='h') then + ! + if (n_sp_pol==2 .and. i_spin_hole>0) then + if (i_sp_pol /=i_spin_hole) cycle + if (i_sp_pol1/=i_spin_hole) cycle + endif ! call WF_apply_symm((/iv, ikibz, is, i_sp_pol /),WF1) call WF_apply_symm((/iv1,ikibz1,is1,i_sp_pol1/),WF2) @@ -194,10 +235,22 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) B_coeff = BS_mat(neh, j_lambda)* conjg(BS_mat(neh1, j_lambda)) ! do i_spinor=1,n_spinor - v2plot(:) = v2plot(:)+B_coeff*WF1(:,i_spinor)*conjg(WF2(:,i_spinor)) + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0) then + if(i_spinor /= i_spin_hole) cycle + if(j_spinor /= i_spin_hole) cycle + if(i_spinor /= j_spinor .and. i_spin_hole==-10) cycle + endif + v2plot(:) = v2plot(:)+B_coeff*WF1(:,i_spinor)*conjg(WF2(:,i_spinor)) + enddo enddo ! elseif(iv1==iv.and.trim(AVE_exc)=='e') then + ! + if (n_sp_pol==2 .and. i_spin_elec>0) then + if (i_sp_pol /=i_spin_elec) cycle + if (i_sp_pol1/=i_spin_elec) cycle + endif ! call WF_apply_symm((/ic, ikibz, is, i_sp_pol /),WF1) call WF_apply_symm((/ic1,ikibz1,is1,i_sp_pol1/),WF2) @@ -205,7 +258,14 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) B_coeff = conjg(BS_mat(neh,j_lambda))* BS_mat(neh1,j_lambda) ! do i_spinor=1,n_spinor - v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,i_spinor))*WF2(:,i_spinor) + do j_spinor=1,n_spinor + if (n_spinor==2) then + if(i_spinor /= i_spin_elec .and. i_spin_elec>0) cycle + if(j_spinor /= i_spin_elec .and. i_spin_elec>0) cycle + if(i_spinor /= j_spinor .and. i_spin_elec==-10) cycle + endif + v2plot(:) = v2plot(:)+B_coeff*conjg(WF1(:,i_spinor))*WF2(:,j_spinor) + enddo enddo ! endif @@ -254,6 +314,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ic = BSS_eh_table(neh,3) i_sp_pol = BSS_eh_table(neh,4) ! + if (n_sp_pol==2 .and. i_spin_hole>0 .and. i_sp_pol /=i_spin_hole) cycle + ! ikibz = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) ! @@ -268,11 +330,18 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) wf_vc=cZERO if (l_free_hole) then do i_spinor=1,n_spinor - wf_vc(:) = wf_vc(:) + conjg(WF1(:,i_spinor))*WF2(:,i_spinor) + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + wf_vc(:,i_spinor,1) = wf_vc(:,i_spinor,1) + conjg(WF1(:,i_spinor))*WF2(:,i_spinor) enddo else do i_spinor=1,n_spinor - wf_vc(:) = wf_vc(:) + conjg(WF1(rindex(ir_hole),i_spinor))*WF2(:,i_spinor) + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle + if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle + wf_vc(:,i_spinor,j_spinor) = wf_vc(:,i_spinor,j_spinor) + & + & conjg(WF1(rindex(ir_hole),i_spinor))*WF2(:,j_spinor) + enddo enddo endif ! @@ -281,25 +350,37 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! if (l_free_hole) then ! - !$omp do - do ir=1,nr_tot - k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) - kp_dot_r_h(ir)=r_cell_cc(ir,1)*k2(1)+r_cell_cc(ir,2)*k2(2)+r_cell_cc(ir,3)*k2(3) - alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(ir) - phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) - wf_tmp(ir) = wf_tmp(ir)+BS_mat(neh,j_lambda)*wf_vc(rindex(ir))*phase(ir) + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + !$omp do + do ir=1,nr_tot + k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) + kp_dot_r_h(ir)=r_cell_cc(ir,1)*k2(1)+r_cell_cc(ir,2)*k2(2)+r_cell_cc(ir,3)*k2(3) + alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(ir) + phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + wf_tmp(ir,i_spinor,i_spinor) = wf_tmp(ir,i_spinor,i_spinor)+ & + & BS_mat(neh,j_lambda)*wf_vc(rindex(ir),i_spinor,1)*phase(ir) + enddo enddo ! else ! kp_dot_r_h(1) = dot_product(r_cell_cc(ir_hole,:),k2(:)) ! - !$omp do - do ir=1,nr_tot - k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) - alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(1) - phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) - wf_tmp(ir) = wf_tmp(ir)+BS_mat(neh,j_lambda)*wf_vc(rindex(ir))*phase(ir) + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle + if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle + !$omp do + do ir=1,nr_tot + k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) + alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(1) + phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + wf_tmp(ir,i_spinor,j_spinor) = wf_tmp(ir,i_spinor,j_spinor)+& + & BS_mat(neh,j_lambda)*wf_vc(rindex(ir),i_spinor,j_spinor)*phase(ir) + enddo + enddo enddo ! endif @@ -317,8 +398,15 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! if (i1==1) v2plot= 0._SP ! - do ir=1,nr_tot - v2plot(ir) = v2plot(ir)+abs(wf_tmp(ir))**2 + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle + if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle + do ir=1,nr_tot + v2plot(ir) = v2plot(ir)+abs(wf_tmp(ir,i_spinor,j_spinor))**2 + enddo + enddo enddo ! endif diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index 916ab4a562..cf73d78f18 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -20,7 +20,7 @@ subroutine INIT_ypp_load(defs) & BZ_FineGd_nkpts_to_use,BZ_random_nkpts,CIRCUIT_E_DB_path,coo_in,coo_out,current_dir,& & deg_energy,BANDS_steps,DOS_bands,DOS_broadening,PROJECT_path,QP_DB_to_expand,& & DOS_E_range,DOS_E_steps,EXCITON_E_treshold,EXCITON_Res_treshold,EXCITON_weight_treshold,& -& INTERP_grid,mag_dir,N_path_pts,ncell,p_dir,p_format,PDOS_atoms,& +& INTERP_grid,mag_dir,N_path_pts,ncell,p_dir,p_format,PDOS_atoms,elec_spin,hole_spin,& & PDOS_j,PDOS_wfcs,PDOS_kinds,PDOS_l,PDOS_m,perturbative_SOC_path,PtsPath,r_hole,seed_name,& & SOC_bands_buffer,SOC_bands_to_map,SOC_split,state_ctl,AVE_exc,BSiq_via_command_line,& & WF_multiplier,WF_ref,what_to_write,BSiq,PROJECT_mode,PROJECT_N_perp,PROJECT_steps,PROJECT_threshold,& @@ -254,6 +254,8 @@ subroutine INIT_ypp_load(defs) call it(defs,'EHdensity', 'Calculate (h)ole/(e)lectron density from BSE wave-function',AVE_exc,case="a") call it(defs,'Cells', 'Number of cell repetitions in each direction (odd or 1)',ncell) call it(defs,'Hole', '[cc] Hole position in unit cell (positive)',r_hole) + call it(defs,'HoleSpin', '[cc] The spin of the hole can be "up" "dn" "average" "diag"',hole_spin) + call it(defs,'ElecSpin', '[cc] The spin of the elec can be "up" "dn" "average" "diag"',elec_spin) call it('f',defs,'PrtDOS', 'Print Exciton Density of States') ! ! WFs diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index 518354ceea..1069015401 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -696,6 +696,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) if (l_exc_wf.and.(.not.l_free_hole.and..not.l_average_eh)) call initactivate(1,"Cells Hole Dimension") if (l_exc_wf.and.(l_free_hole.or.l_average_eh)) call initactivate(1,"WFMult") if (l_exc_wf.and.l_average_eh) call initactivate(1,"EHdensity") + if (l_exc_wf.and.n_spin>1) call initactivate(1,"ElecSpin HoleSpin") if (l_spin) call initactivate(1,"Degen_Step") #if defined _YPP_ELPH if (l_eliashberg) call initactivate(1,"Degen_Step") From 2ac8117a6ca5a7bb12d59a2100fb217dba573f8c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 16 Jul 2025 00:45:17 +0200 Subject: [PATCH 1064/1367] Deleted unused interface --- src/modules/mod_wave_func.F | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 3821280cc7..1918edb9fe 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -93,22 +93,6 @@ integer function io_WF(ID,wf) complex(SP), optional :: wf(:,:,:) end function ! - function WF_symm(ifft,isc) - use pars, ONLY: SP - use electrons, ONLY: n_spinor - integer :: ifft,isc(4) - complex(SP),dimension(n_spinor) :: WF_symm - end function - ! -#if defined _GPU - function WF_symm_gpu(ifft,isc) - use pars, ONLY: SP - use electrons, ONLY: n_spinor - integer :: ifft,isc(4) - complex(SP),dimension(n_spinor) DEV_ATTR :: WF_symm_gpu - end function -#endif - ! end interface ! contains From a18473efc8744a454ef3c866d2b964697b1695f6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 16 Jul 2025 01:29:12 +0200 Subject: [PATCH 1065/1367] Fixed source file left unmerged --- src/bse/K_diago_right_residuals.F | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index e503532ae2..f003b0b086 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -21,14 +21,9 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & use parallel_int, ONLY:PP_redux_wait,PARALLEL_index use LIVE_t, ONLY:live_timing use X_m, ONLY:global_gauge -<<<<<<< HEAD - use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_n_eig,BSS_dipoles_opt + use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_dipoles_opt use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& & l_BS_res_from_E,BS_not_const_eh_f -======= - use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_dipoles_opt - use BS, ONLY:BS_K_dim,BS_H_dim,BS_K_coupling ->>>>>>> develop use MAGNONS, ONLY:BSS_dipoles_magn use DICHROISM, ONLY:BSS_dipoles_dich ! @@ -49,13 +44,9 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! complex(SP), allocatable :: tmp_res(:), BS_R_tmp(:) ! -<<<<<<< HEAD if (l_BS_res_from_E.and.BS_not_const_eh_f) & & call error(" To be fixed, since sqrt of BSS_eh_f takes a conjg and it should not") ! - call PP_indexes_reset(px) - call PARALLEL_index(px,(/BSS_n_eig/)) -======= ! Sanity checks if (.not. allocated(BS_E)) return if (.not. associated(BS_R_right) .or. .not. allocated(BS_V_right)) return @@ -64,7 +55,6 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! if (size(BS_R_right) /= neig_total) call error("Size mismatch between eigvals and R.residuals.") if (size(BS_V_right,dim=2) /= neigs_this_cpu) call error("Size mismatch between eigvecs and R.residuals.") ->>>>>>> develop ! velocity_correction=(index(mode,"opt")>0).and.(trim(global_gauge)=="velocity") ! From 8b80e9ff56b32012c865fa3ee37413d30fdd2073 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 16 Jul 2025 16:42:38 +0200 Subject: [PATCH 1066/1367] configure restored --- configure | 3517 +++++++++++++---------------------------------------- 1 file changed, 838 insertions(+), 2679 deletions(-) diff --git a/configure b/configure index 1fb812abe6..2fa23aa33a 100755 --- a/configure +++ b/configure @@ -1,7 +1,6 @@ #! /bin/sh -#! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.23907 h.62e34e66bf. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24498 h.027781afe. # # Report bugs to . # @@ -12,117 +11,6 @@ # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# -# -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. -as_nl=' -' -export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi - -# The user is always right. -if ${PATH_SEPARATOR+false} :; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - - ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -394,212 +282,44 @@ export SHELL CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null -then : - as_have_required=yes -else $as_nop - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : - break 2 -fi -fi - done;; - esac - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi - - - if test "x$CONFIG_SHELL" != x -then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." - else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and -$0: yambo@yambo-code.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -693,9 +413,6 @@ else $as_nop } fi # as_fn_arith -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. @@ -721,7 +438,6 @@ as_fn_error () as_fn_exit $as_status } # as_fn_error - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -894,37 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23907 h.62e34e66bf' -PACKAGE_STRING='Yambo 5.3.0 r.23907 h.62e34e66bf' -PACKAGE_BUGREPORT='yambo@yambo-code.org' -PACKAGE_URL='' - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='Yambo' -PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.23907 h.62e34e66bf' -PACKAGE_STRING='Yambo 5.3.0 r.23907 h.62e34e66bf' +PACKAGE_VERSION='5.3.0 r.24498 h.027781afe' +PACKAGE_STRING='Yambo 5.3.0 r.24498 h.027781afe' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1466,154 +1153,6 @@ MPIFC MPIF77 MPICC' -ac_subst_vars='' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -with_extlibs_path -enable_keep_objects -enable_keep_src -enable_keep_extlibs -enable_dp -enable_time_profile -enable_uspp -enable_memory_profile -enable_msgs_comps -with_editor -with_echo -enable_options_check -with_f90ext -enable_debug_flags -enable_cuda_fortran -enable_openacc -enable_openmp5 -enable_open_mp -enable_mpi -with_mpi_libs -with_mpi_path -with_mpi_libdir -with_mpi_includedir -enable_ydb -with_blas_libs -enable_int_linalg -enable_openmp_int_linalg -with_lapack_libs -with_fft_libs -with_fft_path -with_fft_libdir -with_fft_includedir -enable_internal_fftqe -enable_internal_fftsg -enable_3d_fft -with_fftsg_fac -enable_slepc_linalg -with_slepc_libs -with_slepc_incs -with_slepc_path -with_slepc_libdir -with_slepc_includedir -with_petsc_libs -with_petsc_incs -with_petsc_path -with_petsc_libdir -with_petsc_includedir -with_slepc_branch -with_petsc_branch -enable_par_linalg -with_blacs_libs -with_scalapack_libs -with_elpa_libs -with_elpa_includedir -with_hdf5_libs -with_hdf5_path -with_hdf5_libdir -with_hdf5_includedir -enable_hdf5_compression -enable_hdf5_par_io -enable_hdf5_p2y_support -with_netcdf_libs -with_netcdf_path -with_netcdf_libdir -with_netcdf_includedir -with_netcdff_libs -with_netcdff_path -with_netcdff_libdir -with_netcdff_includedir -enable_netcdf_classic -enable_netcdf_par_io -enable_netcdf_v3 -enable_netcdf_output -enable_yaml_output -with_yaml_libs -with_yaml_libdir -with_yaml_includedir -with_futile_libs -with_futile_libdir -with_futile_includedir -enable_iotk -with_iotk_libs -with_iotk_path -with_iotk_libdir -with_iotk_includedir -enable_etsf_io -with_etsf_io_libs -with_etsf_io_path -with_etsf_io_libdir -with_etsf_io_includedir -with_libxc_libs -with_libxc_path -with_libxc_libdir -with_libxc_includedir -with_cuda_libs -with_cuda_incs -with_cuda_libdir -with_cuda_includedir -with_cuda_path -enable_cuda_libs_check -with_cuda_cc -with_cuda_runtime -with_cuda_int_libs -enable_nvtx -with_gpu_libs -with_gpu_incs -with_rocm_libs -with_rocm_incs -with_rocm_libdir -with_rocm_includedir -with_rocm_path -with_mklgpu_libs -with_ldiago_branch -with_devxlib_libs -with_devxlib_path -with_devxlib_libdir -with_devxlib_includedir -with_devxlib_branch -enable_magma -with_magma_libs -with_magma_incs -with_magma_path -with_magma_libdir -with_magma_includedir -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -FC -FCFLAGS -UFLAGS -CPP -FPP -F77 -FFLAGS -MPIFC -MPIF77 -MPICC' - # Initialize some variables set by options. ac_init_help= @@ -2147,1455 +1686,358 @@ fi case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures Yambo 5.3.0 r.24498 h.027781afe to adapt to many kinds of systems. -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi +Usage: $0 [OPTION]... [VAR=VALUE]... - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; +Defaults for the options are specified in brackets. - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. - --config-cache | -C) - cache_file=config.cache ;; +For better control, use the options below. - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/yambo] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; + cat <<\_ACEOF - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" "$LINENO" 5 - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24498 h.027781afe:";; + esac + cat <<\_ACEOF - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-keep-objects Objects are not removed but saved in appropriate + directories. Default is yes. + --enable-keep-src Keep preprocessed.f90 file. Default is yes. + --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. + --enable-dp Double-precision build. Default is no. + --enable-time-profile Extended timing profile of specific sections. + Default is yes. + --enable-uspp Enable Ultrasoft PP support + --enable-memory-profile Extended Memory profile of specific sections + --enable-msgs-comps Verbose compilation log + --enable-options-check Enable the command line options check in driver.c. + Default is yes. + --enable-debug-flags Debug flags are set for compilation. Default is no. + --enable-cuda-fortran Enable CUDA support [default=no] + --enable-openacc Enable OPENACC support [default=no] + --enable-openmp5 Enable OPENMP5 support [default=no] + --enable-open-mp Enable OpenMP support + --enable-mpi Enable mpi parallelization . Default is yes. + --enable-ydb Activate the YDB support + --enable-int-linalg Force internal linear algebra. Default is no + --enable-openmp-int-linalg + Use openmp internal linear algebra for few selected + operations. Default is no + --enable-internal-fftqe Use internal QE FFT library + --enable-internal-fftsg Use internal Goedecker FFT library + --enable-3d-fft Use 3D FFT + --enable-slepc-linalg Enable suport for the diagonalization of BSE using + SLEPC. Default is no + --enable-par-linalg Use parallel linear algebra. Default is no + --enable-hdf5-compression + Activate the HDF5 data compression. Default is no. + --enable-hdf5-par-io Enable the HDF5 parallel I/O. Default is yes + --enable-hdf5-p2y-support + Activate HDF5 support in p2y. Default is no unless + parallel HDF5 libs are linked. + --enable-netcdf-classic Switch to OLD NetCDF classic. Default is no. + --enable-netcdf-par-io Activate the NETCDF parallel io. Default is no. + --enable-netcdf-v3 Switch to OLD NETCD v3 format. Default is no. + --enable-netcdf-output Activate the netcdf copy for some output files. + Default is no. + --enable-yaml-output Activate the YAML output support. Default is + no + --enable-iotk Activate the IOTK support + --enable-etsf-io Activate the ETSF_IO support + --enable-cuda-libs-check=yes + The configure script will check CUDA installation + and report problems [default=yes] + --enable-nvtx= Enable NVTX support [default=no] + --enable-magma Enable suport for the BSE diagonalization using + MAGMA. Default is no - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" "$LINENO" 5 - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" "$LINENO" 5 - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" "$LINENO" 5 - ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" "$LINENO" 5 - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" "$LINENO" 5 ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: you should use --build, --host, --target" >&5 -printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2;} - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid host type: $ac_option" >&5 -printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2;} - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" "$LINENO" 5 -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" "$LINENO" 5 ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" "$LINENO" 5 -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" "$LINENO" 5 -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" "$LINENO" 5 - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" "$LINENO" 5 -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" "$LINENO" 5 - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23907 h.62e34e66bf to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/yambo] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.23907 h.62e34e66bf to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/yambo] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23907 h.62e34e66bf:";; - esac - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.23907 h.62e34e66bf:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-keep-objects Objects are not removed but saved in appropriate - directories. Default is yes. - --enable-keep-src Keep preprocessed.f90 file. Default is yes. - --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. - --enable-dp Double-precision build. Default is no. - --enable-time-profile Extended timing profile of specific sections. - Default is yes. - --enable-uspp Enable Ultrasoft PP support - --enable-memory-profile Extended Memory profile of specific sections - --enable-msgs-comps Verbose compilation log - --enable-options-check Enable the command line options check in driver.c. - Default is yes. - --enable-debug-flags Debug flags are set for compilation. Default is no. - --enable-cuda-fortran Enable CUDA support [default=no] - --enable-openacc Enable OPENACC support [default=no] - --enable-openmp5 Enable OPENMP5 support [default=no] - --enable-open-mp Enable OpenMP support - --enable-mpi Enable mpi parallelization . Default is yes. - --enable-ydb Activate the YDB support - --enable-int-linalg Force internal linear algebra. Default is no - --enable-openmp-int-linalg - Use openmp internal linear algebra for few selected - operations. Default is no - --enable-internal-fftqe Use internal QE FFT library - --enable-internal-fftsg Use internal Goedecker FFT library - --enable-3d-fft Use 3D FFT - --enable-slepc-linalg Enable suport for the diagonalization of BSE using - SLEPC. Default is no - --enable-par-linalg Use parallel linear algebra. Default is no - --enable-hdf5-compression - Activate the HDF5 data compression. Default is no. - --enable-hdf5-par-io Enable the HDF5 parallel I/O. Default is yes - --enable-hdf5-p2y-support - Activate HDF5 support in p2y. Default is no unless - parallel HDF5 libs are linked. - --enable-netcdf-classic Switch to OLD NetCDF classic. Default is no. - --enable-netcdf-par-io Activate the NETCDF parallel io. Default is no. - --enable-netcdf-v3 Switch to OLD NETCD v3 format. Default is no. - --enable-netcdf-output Activate the netcdf copy for some output files. - Default is no. - --enable-yaml-output Activate the YAML output support. Default is - no - --enable-iotk Activate the IOTK support - --enable-etsf-io Activate the ETSF_IO support - --enable-cuda-libs-check=yes - The configure script will check CUDA installation - and report problems [default=yes] - --enable-nvtx= Enable NVTX support [default=no] - --enable-magma Enable suport for the BSE diagonalization using - MAGMA. Default is no - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-extlibs-path= - Path to the external libs - --with-editor= User-defined editor (none for no editor) - --with-echo= User-defined echo - --with-f90ext= Use . Fortran 90 extension - --with-mpi-libs= Use MPI libraries - --with-mpi-path= Path to the MPI install directory - --with-mpi-libdir= Path to the MPI lib directory - --with-mpi-includedir= Path to the MPI include directory - --with-blas-libs= Use BLAS libraries - --with-lapack-libs= Use LAPACK libraries - --with-fft-libs= Link to FFT libraries - --with-fft-path= Path to the FFT install directory - --with-fft-libdir= Path to the FFT lib directory - --with-fft-includedir= Path to the FFT include directory - --with-fftsg-fac= Change default Goedecker FFT cache factor - --with-slepc-libs= Use Slepc libraries - --with-slepc-incs= Use Slepc includes - --with-slepc-path= Path to the Slepc install directory - --with-slepc-libdir= Path to the Slepc lib directory - --with-slepc-includedir= - Path to the Slepc include directory - --with-petsc-libs= Use Petsc libraries - --with-petsc-incs= Use Petsc includes - --with-petsc-path= Path to the Petsc install directory - --with-petsc-libdir= Path to the Petsc lib directory - --with-petsc-includedir= - Path to the Petsc include directory - --with-slepc-branch= Use the of the slepc repository. - --with-petsc-branch= Use the of the petsc repository. - --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL - --with-scalapack-libs=(libs|mkl) - Use SCALAPACK libraries or setup MKL - --with-elpa-libs=(libs) Use ELPA libraries - --with-elpa-includedir= Path to the elpa include directory - --with-hdf5-libs= Use HDF5 libraries - --with-hdf5-path= Path to the HDF5 install directory - --with-hdf5-libdir= Path to the HDF5 lib directory - --with-hdf5-includedir= Path to the HDF5 include directory - --with-netcdf-libs= Use NetCDF libraries - --with-netcdf-path= Path to the NetCDF install directory - --with-netcdf-libdir= Path to the NetCDF lib directory - --with-netcdf-includedir= - Path to the NetCDF include directory - --with-netcdff-libs= Use NetCDFF libraries - --with-netcdff-path= Path to the NetCDFF install directory - --with-netcdff-libdir= Path to the NetCDFF lib directory - --with-netcdff-includedir= - Path to the NetCDFF include directory - --with-yaml-libs= Use the FUTILE library in - --with-yaml-libdir= Path to the FUTILE lib directory - --with-yaml-includedir= Path to the FUTILE include directory - --with-futile-libs= Use the FUTILE library in - --with-futile-libdir= Path to the FUTILE lib directory - --with-futile-includedir= - Path to the FUTILE include directory - --with-iotk-libs= Use the IOTK library in - --with-iotk-path= Path to the IOTK install directory - --with-iotk-libdir= Path to the IOTK lib directory - --with-iotk-includedir= Path to the IOTK include directory - --with-etsf-io-libs= Use the ETSF_IO libraries in - --with-etsf-io-path= Path to the ETSF_IO install directory - --with-etsf-io-libdir= Path to the ETSF_IO lib directory - --with-etsf-io-includedir= - Path to the ETSF_IO include directory - --with-libxc-libs= Use libxc libraries - --with-libxc-path= Path to libxc install directory - --with-libxc-libdir= Path to the libxc lib directory - --with-libxc-includedir= - Path to the libxc include directory - --with-cuda-libs= Use libcuda libraries - --with-cuda-incs= Use libcuda include options - --with-cuda-libdir= Path to the libcuda lib directory - --with-cuda-includedir= Path to the libcuda include directory - --with-cuda-path= Path to libcuda install directory - --with-cuda-cc=VAL GPU architecture (Kepler: 35, Pascal: 60, Volta: 70, - Ampere: 80) [default=70] - --with-cuda-runtime=VAL CUDA runtime (Pascal: 8+, Volta: 9+) [default=none, - checks if the NVHPC_CUDA_HOME variable is set.] - --with-cuda-int-libs=VAL - CUDA internal libraries () - [default=cuda,cufft,cublas,cusolver,cudart] - --with-gpu-libs= Use extra GPU-specific libraries - --with-gpu-incs= Includes for extra GPU-specific libraries - - --with-rocm-libs= Use librocm library - --with-rocm-incs= Use librocm include options - --with-rocm-libdir= Path to the rocm lib directory - --with-rocm-includedir= Path to the rocm include directory - --with-rocm-path= Path to rocm install directory - --with-mklgpu-libs= Use the MKLGPU library - --with-ldiago-branch= Use the of the ldiago repository. - --with-devxlib-libs= Use devxlib libraries - --with-devxlib-path= Path to devxlib install directory - --with-devxlib-libdir= Path to the devxlib lib directory - --with-devxlib-includedir= - Path to the devxlib include directory - --with-devxlib-branch= - Use the of the devxlib repository. - --with-magma-libs= Use Magma libraries - --with-magma-incs= Use Magma includes - --with-magma-path= Path to the Magma install directory - --with-magma-libdir= Path to the Magma lib directory - --with-magma-includedir= - Path to the Magma include directory - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - FC Fortran compiler command - FCFLAGS Fortran compiler flags - UFLAGS Unoptimized Fortran flags - CPP C preprocessor - FPP Fortran preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags - MPIFC Parallel Fortran compiler command - MPIF77 Parallel Fortran 77 compiler command - MPICC Parallel C compiler command - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -Yambo configure 5.3.0 r.23907 h.62e34e66bf -generated by GNU Autoconf 2.71 -if $ac_init_version; then - cat <<\_ACEOF -Yambo configure 5.3.0 r.23907 h.62e34e66bf -generated by GNU Autoconf 2.71 - -Copyright (C) 2021 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. - -Copyright (C) 2021 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main (void) -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main (void) -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$4=yes" -else $as_nop - eval "$4=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main (void) -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-extlibs-path= + Path to the external libs + --with-editor= User-defined editor (none for no editor) + --with-echo= User-defined echo + --with-f90ext= Use . Fortran 90 extension + --with-mpi-libs= Use MPI libraries + --with-mpi-path= Path to the MPI install directory + --with-mpi-libdir= Path to the MPI lib directory + --with-mpi-includedir= Path to the MPI include directory + --with-blas-libs= Use BLAS libraries + --with-lapack-libs= Use LAPACK libraries + --with-fft-libs= Link to FFT libraries + --with-fft-path= Path to the FFT install directory + --with-fft-libdir= Path to the FFT lib directory + --with-fft-includedir= Path to the FFT include directory + --with-fftsg-fac= Change default Goedecker FFT cache factor + --with-slepc-libs= Use Slepc libraries + --with-slepc-incs= Use Slepc includes + --with-slepc-path= Path to the Slepc install directory + --with-slepc-libdir= Path to the Slepc lib directory + --with-slepc-includedir= + Path to the Slepc include directory + --with-petsc-libs= Use Petsc libraries + --with-petsc-incs= Use Petsc includes + --with-petsc-path= Path to the Petsc install directory + --with-petsc-libdir= Path to the Petsc lib directory + --with-petsc-includedir= + Path to the Petsc include directory + --with-slepc-branch= Use the of the slepc repository. + --with-petsc-branch= Use the of the petsc repository. + --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL + --with-scalapack-libs=(libs|mkl) + Use SCALAPACK libraries or setup MKL + --with-elpa-libs=(libs) Use ELPA libraries + --with-elpa-includedir= Path to the elpa include directory + --with-hdf5-libs= Use HDF5 libraries + --with-hdf5-path= Path to the HDF5 install directory + --with-hdf5-libdir= Path to the HDF5 lib directory + --with-hdf5-includedir= Path to the HDF5 include directory + --with-netcdf-libs= Use NetCDF libraries + --with-netcdf-path= Path to the NetCDF install directory + --with-netcdf-libdir= Path to the NetCDF lib directory + --with-netcdf-includedir= + Path to the NetCDF include directory + --with-netcdff-libs= Use NetCDFF libraries + --with-netcdff-path= Path to the NetCDFF install directory + --with-netcdff-libdir= Path to the NetCDFF lib directory + --with-netcdff-includedir= + Path to the NetCDFF include directory + --with-yaml-libs= Use the FUTILE library in + --with-yaml-libdir= Path to the FUTILE lib directory + --with-yaml-includedir= Path to the FUTILE include directory + --with-futile-libs= Use the FUTILE library in + --with-futile-libdir= Path to the FUTILE lib directory + --with-futile-includedir= + Path to the FUTILE include directory + --with-iotk-libs= Use the IOTK library in + --with-iotk-path= Path to the IOTK install directory + --with-iotk-libdir= Path to the IOTK lib directory + --with-iotk-includedir= Path to the IOTK include directory + --with-etsf-io-libs= Use the ETSF_IO libraries in + --with-etsf-io-path= Path to the ETSF_IO install directory + --with-etsf-io-libdir= Path to the ETSF_IO lib directory + --with-etsf-io-includedir= + Path to the ETSF_IO include directory + --with-libxc-libs= Use libxc libraries + --with-libxc-path= Path to libxc install directory + --with-libxc-libdir= Path to the libxc lib directory + --with-libxc-includedir= + Path to the libxc include directory + --with-cuda-libs= Use libcuda libraries + --with-cuda-incs= Use libcuda include options + --with-cuda-libdir= Path to the libcuda lib directory + --with-cuda-includedir= Path to the libcuda include directory + --with-cuda-path= Path to libcuda install directory + --with-cuda-cc=VAL GPU architecture (Kepler: 35, Pascal: 60, Volta: 70, + Ampere: 80) [default=70] + --with-cuda-runtime=VAL CUDA runtime (Pascal: 8+, Volta: 9+) [default=none, + checks if the NVHPC_CUDA_HOME variable is set.] + --with-cuda-int-libs=VAL + CUDA internal libraries () + [default=cuda,cufft,cublas,cusolver,cudart] + --with-gpu-libs= Use extra GPU-specific libraries + --with-gpu-incs= Includes for extra GPU-specific libraries + + --with-rocm-libs= Use librocm library + --with-rocm-incs= Use librocm include options + --with-rocm-libdir= Path to the rocm lib directory + --with-rocm-includedir= Path to the rocm include directory + --with-rocm-path= Path to rocm install directory + --with-mklgpu-libs= Use the MKLGPU library + --with-ldiago-branch= Use the of the ldiago repository. + --with-devxlib-libs= Use devxlib libraries + --with-devxlib-path= Path to devxlib install directory + --with-devxlib-libdir= Path to the devxlib lib directory + --with-devxlib-includedir= + Path to the devxlib include directory + --with-devxlib-branch= + Use the of the devxlib repository. + --with-magma-libs= Use Magma libraries + --with-magma-incs= Use Magma includes + --with-magma-path= Path to the Magma install directory + --with-magma-libdir= Path to the Magma lib directory + --with-magma-includedir= + Path to the Magma include directory -} # ac_fn_c_try_link +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + FC Fortran compiler command + FCFLAGS Fortran compiler flags + UFLAGS Unoptimized Fortran flags + CPP C preprocessor + FPP Fortran preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + MPIFC Parallel Fortran compiler command + MPIF77 Parallel Fortran 77 compiler command + MPICC Parallel C compiler command -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. - ac_retval=$ac_status +Report bugs to . +_ACEOF +ac_status=$? fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_c_try_run +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. -# ac_fn_fc_try_compile LINENO -# --------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_compile +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix -# ac_fn_fc_try_link LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_fc_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - ac_retval=1 + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_fc_try_link -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +Yambo configure 5.3.0 r.24498 h.027781afe +generated by GNU Autoconf 2.71 - ac_retval=1 +Copyright (C) 2021 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -# ac_fn_f77_try_compile LINENO -# ---------------------------- +# ac_fn_c_try_compile LINENO +# -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_f77_try_compile () +ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam @@ -3615,7 +2057,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : @@ -3629,12 +2071,162 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_f77_try_compile +} # ac_fn_c_try_compile -# ac_fn_f77_try_link LINENO -# ------------------------- +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main (void) +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$4=yes" +else $as_nop + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$4 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_member + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_try_link LINENO +# ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_f77_try_link () +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext @@ -3654,7 +2246,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || + test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -3676,405 +2268,363 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_f77_try_link +} # ac_fn_c_try_link -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ - -#include -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -#ifdef FC_DUMMY_MAIN -#ifndef FC_DUMMY_MAIN_EQ_F77 -# ifdef __cplusplus - extern "C" -# endif - int FC_DUMMY_MAIN() { return 1; } -#endif -#endif -int -main (void) -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } then : - eval "$3=yes" + ac_retval=0 else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_c_check_func +} # ac_fn_c_try_run -# ac_fn_fc_check_func LINENO FUNC VAR -# ----------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_fc_check_func () +# ac_fn_fc_try_compile LINENO +# --------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF - program main -call $2 - end -_ACEOF -if ac_fn_fc_try_link "$LINENO" + rm -f conftest.$ac_objext conftest.beam + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext then : - eval "$3=yes" + ac_retval=0 else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -} # ac_fn_fc_check_func -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by Yambo $as_me 5.3.0 r.23907 h.62e34e66bf, which was -generated by GNU Autoconf 2.71. Invocation command line was - - $ $0$ac_configure_args_raw +} # ac_fn_fc_try_compile -_ACEOF -exec 5>>config.log +# ac_fn_fc_try_link LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_fc_try_link () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" - # Save into config.log some information that might help in debugging. - { - echo - - printf "%s\n" "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - printf "%s\n" "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - printf "%s\n" "$ac_var='\''$ac_val'\''" - done | sort - echo + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval - if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - printf "%s\n" "$ac_var='\''$ac_val'\''" - done | sort - echo - fi +} # ac_fn_fc_try_link - if test -s confdefs.h; then - printf "%s\n" "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -printf "%s\n" "/* confdefs.h */" > confdefs.h +} # ac_fn_c_try_cpp -# Predefined preprocessor variables. +# ac_fn_f77_try_compile LINENO +# ---------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_f77_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +} # ac_fn_f77_try_compile -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +# ac_fn_f77_try_link LINENO +# ------------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_f77_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +} # ac_fn_f77_try_link -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. */ +#include +#undef $2 -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" -else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main (void) +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -for ac_site_file in $ac_site_files -do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done +} # ac_fn_c_check_func -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} - >$cache_file +# ac_fn_fc_check_func LINENO FUNC VAR +# ----------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_fc_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat > conftest.$ac_ext <<_ACEOF + program main +call $2 + end +_ACEOF +if ac_fn_fc_try_link "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno +} # ac_fn_fc_check_func ac_configure_args_raw= for ac_arg do @@ -4099,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.23907 h.62e34e66bf, which was +It was created by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4843,396 +3393,6 @@ printf "%s\n" "$as_me: error: changes in the environment can compromise the buil as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -SVERSION="5" -SSUBVERSION="3" -SPATCHLEVEL="0" -SREVISION="23907" -SHASH="62e34e66bf" -======= -# Forbidden tokens and exceptions. - - - -# Actually reserved by M4sh. - -# So that the autoconf-generated scripts will always re-execute -# themselves with $CONFIG_SHELL, if that's set in the environment. - -# Wrap our cleanup prior to m4sugar's cleanup. - -# All the M4sugar macros start with `m4_', except `dnl' kept as is -# for sake of simplicity. - - - -# If __m4_version__ is defined, we assume that we are being run by M4 -# 1.6 or newer, thus recursion is linear, and debugmode(+do) -# is available for faster checks of dereferencing undefined macros -# and forcing dumpdef to print to stderr regardless of debugfile. -# But if it is missing, we assume we are being run by M4 1.4.x, that -# recursion is quadratic, and that we need foreach-based -# replacement macros. Also, m4 prior to 1.4.8 loses track of location -# during m4wrap text; __line__ should never be 0. -# -# Use the raw builtin to avoid tripping up include tracing. -# Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn. -# -*- Autoconf -*- -# This file is part of Autoconf. -# foreach-based replacements for recursive functions. -# Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes -# GNU M4 1.6 by requiring more memory and macro expansions. -# -# Copyright (C) 2008-2017, 2020-2021 Free Software Foundation, Inc. - -# This file is part of Autoconf. This program is free -# software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# Under Section 7 of GPL version 3, you are granted additional -# permissions described in the Autoconf Configure Script Exception, -# version 3.0, as published by the Free Software Foundation. -# -# You should have received a copy of the GNU General Public License -# and a copy of the Autoconf Configure Script Exception along with -# this program; see the files COPYINGv3 and COPYING.EXCEPTION -# respectively. If not, see . - -# Written by Eric Blake. - -# In M4 1.4.x, every byte of $@ is rescanned. This means that an -# algorithm on n arguments that recurses with one less argument each -# iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In -# M4 1.6, this was fixed so that $@ is only scanned once, then -# back-references are made to information stored about the scan. -# Thus, n iterations need only scan n arguments, for O(n) time. -# Additionally, in M4 1.4.x, recursive algorithms did not clean up -# memory very well, requiring O(n^2) memory rather than O(n) for n -# iterations. -# -# This file is designed to overcome the quadratic nature of $@ -# recursion by writing a variant of m4_foreach that uses m4_for rather -# than $@ recursion to operate on the list. This involves more macro -# expansions, but avoids the need to rescan a quadratic number of -# arguments, making these replacements very attractive for M4 1.4.x. -# On the other hand, in any version of M4, expanding additional macros -# costs additional time; therefore, in M4 1.6, where $@ recursion uses -# fewer macros, these replacements actually pessimize performance. -# Additionally, the use of $10 to mean the tenth argument violates -# POSIX; although all versions of m4 1.4.x support this meaning, a -# future m4 version may switch to take it as the first argument -# concatenated with a literal 0, so the implementations in this file -# are not future-proof. Thus, this file is conditionally included as -# part of m4_init(), only when it is detected that M4 probably has -# quadratic behavior (ie. it lacks the macro __m4_version__). -# -# Please keep this file in sync with m4sugar.m4. - -# _m4_foreach(PRE, POST, IGNORED, ARG...) -# --------------------------------------- -# Form the common basis of the m4_foreach and m4_map macros. For each -# ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion -# easier, and must be supplied rather than implicit. -# -# This version minimizes the number of times that $@ is evaluated by -# using m4_for to generate a boilerplate into _m4_f then passing $@ to -# that temporary macro. Thus, the recursion is done in m4_for without -# reparsing any user input, and is not quadratic. For an idea of how -# this works, note that m4_foreach(i,[1,2],[i]) calls -# _m4_foreach([m4_define([i],],[)i],[],[1],[2]) -# which defines _m4_f: -# $1[$4]$2[]$1[$5]$2[]_m4_popdef([_m4_f]) -# then calls _m4_f([m4_define([i],],[)i],[],[1],[2]) for a net result: -# m4_define([i],[1])i[]m4_define([i],[2])i[]_m4_popdef([_m4_f]). - - - - -# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT) -# ----------------------------------------------------------- -# Find the first VAL that SWITCH matches, and expand the corresponding -# IF-VAL. If there are no matches, expand DEFAULT. -# -# Use m4_for to create a temporary macro in terms of a boilerplate -# m4_if with final cleanup. If $# is even, we have DEFAULT; if it is -# odd, then rounding the last $# up in the temporary macro is -# harmless. For example, both m4_case(1,2,3,4,5) and -# m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being -# m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6]) - - - - - - -# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT) -# ----------------------------------------------------- -# m4 equivalent of -# -# if (SWITCH =~ RE1) -# VAL1; -# elif (SWITCH =~ RE2) -# VAL2; -# elif ... -# ... -# else -# DEFAULT -# -# We build the temporary macro _m4_b: -# m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])... -# _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b])) -# then invoke m4_unquote(_m4_b($@)), for concatenation with later text. - - - - - - - - - -# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT]) -# ------------------------------------------------------------------- -# Similar to m4_if, except that each TEST is expanded when encountered. -# If the expansion of TESTn matches the string VALn, the result is IF-VALn. -# The result is DEFAULT if no tests passed. This macro allows -# short-circuiting of expensive tests, where it pays to arrange quick -# filter tests to run first. -# -# m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n. -# We only have to speed up _m4_cond, by building the temporary _m4_c: -# m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)], -# [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)], -# [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)], -# [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c])) -# We invoke m4_unquote(_m4_c($@)), for concatenation with later text. - - - - - - -# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...) -# ---------------------------------------------------- -# m4 equivalent of -# -# $_ = STRING; -# s/RE1/SUBST1/g; -# s/RE2/SUBST2/g; -# ... -# -# m4_bpatsubsts already validated an odd number of arguments; we only -# need to speed up _m4_bpatsubsts. To avoid nesting, we build the -# temporary _m4_p: -# m4_define([_m4_p], [$1])m4_define([_m4_p], -# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p], -# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],... -# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote( -# _m4_defn([_m4_p])_m4_popdef([_m4_p])) - - - - - - -# m4_shiftn(N, ...) -# ----------------- -# Returns ... shifted N times. Useful for recursive "varargs" constructs. -# -# m4_shiftn already validated arguments; we only need to speed up -# _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as -# ,[$5],[$6],...,[$m]_m4_popdef([_m4_s]) -# before calling m4_shift(_m4_s($@)). - - -# m4_do(STRING, ...) -# ------------------ -# This macro invokes all its arguments (in sequence, of course). It is -# useful for making your macros more structured and readable by dropping -# unnecessary dnl's and have the macros indented properly. -# -# Here, we use the temporary macro _m4_do, defined as -# $1[]$2[]...[]$n[]_m4_popdef([_m4_do]) - - -# m4_dquote_elt(ARGS) -# ------------------- -# Return ARGS as an unquoted list of double-quoted arguments. -# -# _m4_foreach to the rescue. - - -# m4_reverse(ARGS) -# ---------------- -# Output ARGS in reverse order. -# -# Invoke _m4_r($@) with the temporary _m4_r built as -# [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r]) - - - -# m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...) -# ------------------------------------------------------------- -# Perform a pairwise grouping of consecutive ARGs, by expanding -# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the -# final argument is expanded with END-EXPR([ARGn]). -# -# Build the temporary macro _m4_map_args_pair, with the $2([$m+1]) -# only output if $# is odd: -# $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1], -# [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_map_args_pair]) - - - - - - - - -# m4_join(SEP, ARG1, ARG2...) -# --------------------------- -# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG -# is the empty string. No expansion is performed on SEP or ARGs. -# -# Use a self-modifying separator, since we don't know how many -# arguments might be skipped before a separator is first printed, but -# be careful if the separator contains $. _m4_foreach to the rescue. - - - - -# m4_joinall(SEP, ARG1, ARG2...) -# ------------------------------ -# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP. -# No expansion is performed on SEP or ARGs. -# -# A bit easier than m4_join. _m4_foreach to the rescue. - - -# m4_list_cmp(A, B) -# ----------------- -# Compare the two lists of integer expressions A and B. -# -# m4_list_cmp takes care of any side effects; we only override -# _m4_list_cmp_raw, where we can safely expand lists multiple times. -# First, insert padding so that both lists are the same length; the -# trailing +0 is necessary to handle a missing list. Next, create a -# temporary macro to perform pairwise comparisons until an inequality -# is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as -# m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])], -# m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])], -# [0]_m4_popdef([_m4_cmp])) -# then calls _m4_cmp([1+0], [0*2], [1], [2+0]) - - - - - - - - - - -# m4_max(EXPR, ...) -# m4_min(EXPR, ...) -# ----------------- -# Return the decimal value of the maximum (or minimum) in a series of -# integer expressions. -# -# _m4_foreach to the rescue; we only need to replace _m4_minmax. Here, -# we need a temporary macro to track the best answer so far, so that -# the foreach expression is tractable. - - -# m4_set_add_all(SET, VALUE...) -# ----------------------------- -# Add each VALUE into SET. This is O(n) in the number of VALUEs, and -# can be faster than calling m4_set_add for each VALUE. -# -# _m4_foreach to the rescue. If no deletions have occurred, then -# avoid the speed penalty of m4_set_add. - - - - - - -# Rewrite the first entry of the diversion stack. ## -------------------- ## ## Main body of script. ## ## -------------------- ## @@ -5249,7 +3409,6 @@ SSUBVERSION="3" SPATCHLEVEL="0" SREVISION="24498" SHASH="027781afe" ->>>>>>> develop @@ -20288,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.23907 h.62e34e66bf, which was +This file was extended by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20352,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.23907 h.62e34e66bf +Yambo config.status 5.3.0 r.24498 h.027781afe configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" From 5fd68d0fb60a66c41af63d2358e7226ee03f9a1a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 16 Jul 2025 16:59:14 +0200 Subject: [PATCH 1067/1367] Fixed yambo compilatio Fixed yambo compilationn --- src/bse/K_diago_driver.F | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 306862a7ba..a2f6f6e854 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -128,8 +128,8 @@ subroutine K_diago_driver(iq,W,X_static) ! l_slepc = index(BSS_mode,'s')/=0 #if defined _SCALAPACK - l_diago = index(BSS_mode,'o')/=0 ! old diago - l_ldiago = index(BSS_mode,'d')/=0 + l_diago = index(BSS_mode,'o')/=0.or. l_BS_photolum ! old diago + l_ldiago = index(BSS_mode,'d')/=0.and..not.l_BS_photolum #else l_diago = index(BSS_mode,'o')/=0 .or. index(BSS_mode,'d')/=0 #endif @@ -379,9 +379,6 @@ subroutine K_diago_driver(iq,W,X_static) endif endif ! - ! DS: this also should be changed according to the general structure - if(l_BS_photolum) call PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) - ! else ! ! Left residuals @@ -389,8 +386,6 @@ subroutine K_diago_driver(iq,W,X_static) if( l_kerr_lft ) BS_R_left_kerr=conjg(BS_R_right_kerr) if(l_BS_magnons) BS_R_left_magn=conjg(BS_R_right_magn) ! - if(l_BS_photolum) call PL_diago_herm_residual(BS_mat,BS_R_PL) - ! endif ! YAMBO_FREE_P(tmp_res_ptrR) @@ -399,9 +394,9 @@ subroutine K_diago_driver(iq,W,X_static) if(l_BS_photolum) then if (l_ldiago) call error("PL not implemented in Ldiago solver") if (K_is_not_hermitian) then - call PL_diago_residual(BS_V_left,BS_V_right,BS_R_PL,K_is_not_hermitian,BS_overlap) + call PL_diago_non_herm_residual(BS_V_left,BS_V_right,BS_R_PL,BS_overlap) else - call PL_diago_residual(BS_V_right,BS_V_right,BS_R_PL,K_is_not_hermitian) + call PL_diago_herm_residual(BS_V_right,BS_R_PL) endif endif ! From f0224bb008931ff64ba8e9da9f3b0ac9dfede327 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 16 Jul 2025 16:59:54 +0200 Subject: [PATCH 1068/1367] Remmoved old ignored Ydriver --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 55c1f81bd9..21a56eef8c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ objects.mk ################## config/compilation_helper.sh.inc lib/archive/git.list -lib/archive/Ydriver-src # Compiled source # ################### *.com From 8913b80290355ed7e116c750471ccc06ddbd3739 Mon Sep 17 00:00:00 2001 From: Myrta Gruening <3047912@node161.pri.kelvin2.alces.network> Date: Thu, 17 Jul 2025 09:59:50 +0100 Subject: [PATCH 1069/1367] Version 5.3.0, Revision 24923, Hash 0a48a9707 MODIFIED * interface/INIT_activate.F interface/INIT_load.F io/io_RT_components.F io/io_RT_components_V_bands.F modules/SET_defaults.F modules/mod_RT_control.F nloptics/NL_initialize.F real_time_control/RT_databases_IO.F Bugs: - Additions: - Changes: Introduced variable SAVE_Vb_floquet, similarly to SAVE_Vb_history. The latter is activated with p&P, the former with nl and it is meant to save the Vb for anlaysis purposes (Floquet quasienergy and harmonic contribution from e-h pairs) - Patch sent by: myrta --- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 1 + src/io/io_RT_components.F | 4 ++-- src/io/io_RT_components_V_bands.F | 2 +- src/modules/SET_defaults.F | 3 ++- src/modules/mod_RT_control.F | 1 + src/nloptics/NL_initialize.F | 3 ++- src/real_time_control/RT_databases_IO.F | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 9416e8ddaa..e23c09d3eb 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -564,7 +564,7 @@ subroutine INIT_activate() if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLHoleBands NLElecBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') call initactivate(1,'TestOSCLL UseSymm VelGaugeNoDiam') - if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng') + if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng SaveVbfloquet') if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL COLLCut EvalCurrent InducedField') call initactivate(1,'TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 5d89f1928a..5d7a8a2a16 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -560,6 +560,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & verb_level=V_nl_optics) call it('f',defs,'EvalCurrent','[NL] Evaluate the current') call it('f',defs,'SaveVbhistory', '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics) + call it('f',defs,'SaveVbfloquet', '[RT] Save wave-functions for Floquet Analysis',Verb_level=V_nl_optics) ! #endif ! diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index 3155ae01a0..52a41ec903 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -55,7 +55,7 @@ integer function io_RT_components(what,ID) use IO_m, ONLY:io_sec,read_is_on,write_is_on,io_file use real_time, ONLY:NE_i_time,RT_step,RT_dyn_step,RT_carriers,RT_nbands,G_MEM_steps use RT_control, ONLY:RT_carriers_object,CARR_RT_IO_t,Gless_RESTART_RT_IO_t,OBS_RT_IO_t,CACHE_OBS_steps_now,& -& Vbands_RT_IO_t,CACHE_OBS_steps,RT_DB_file_name,Gless_RT_IO_t,SAVE_Vb_history,& +& Vbands_RT_IO_t,CACHE_OBS_steps,RT_DB_file_name,Gless_RT_IO_t,SAVE_Vb_history,SAVE_Vb_floquet,& & RT_DB_name,RT_define_the_IO_DB_identifier,RT_do_IO,RT_current_DB_identifier,RT_return_db_ID #if defined _PAR_IO #endif @@ -150,7 +150,7 @@ integer function io_RT_components(what,ID) if (io_RT_components/=0) goto 1 endif ! - if (RT_do_IO("V_bands")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,SAVE_Vb_history,Vbands_RT_IO_t) + if (RT_do_IO("V_bands")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,(SAVE_Vb_history.or.SAVE_Vb_floquet),Vbands_RT_IO_t) ! if (RT_do_IO("G_lesser")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,.TRUE.,Gless_RT_IO_t) ! diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F index d499ad9cf8..9bd95dbcac 100644 --- a/src/io/io_RT_components_V_bands.F +++ b/src/io/io_RT_components_V_bands.F @@ -29,7 +29,7 @@ subroutine io_RT_components_V_bands(ID,T_size) use IO_m, ONLY:read_is_on,write_is_on use IO_int, ONLY:def_variable_bulk,io_variable_bulk use electrons, ONLY:n_sp_pol,n_full_bands - use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,SAVE_Vb_history + use RT_control, ONLY:Vbands_RT_IO_t,NE_i_start_time,SAVE_Vb_history, SAVE_Vb_floquet use real_time, ONLY:RT_bands,RT_nbands,NE_i_time!,RT_dyn_step,RT_step use nl_optics, ONLY:V_bands use netcdf, ONLY:NF90_UNLIMITED diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index bb934839e9..291ef2ff68 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -87,7 +87,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & RT_headings,YPP_append,Gr_desc,TIME_STEP_desc,RT_desc use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t,SAVE_G_history,RT_ctl_db,& & Vbands_RT_IO_t,CACHE_OBS_last_point,CACHE_OBS_INTERVAL_time,CACHE_OBS_INTERVAL_time_INPUT, & -& CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history +& CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history, SAVE_Vb_floquet use RT_lifetimes,ONLY:RT_life_extrap_times use real_time, ONLY:RT_step,NE_steps,NE_time,Integrator_name,RT_deph_range,& & Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,RT_elec_bands,RT_hole_bands,& @@ -681,6 +681,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Vbands_RT_IO_t%INTERVAL_time_INPUT =5.0_SP*FS2AUT SAVE_G_history=.FALSE. SAVE_Vb_history=.FALSE. + SAVE_Vb_floquet=.FALSE. RT_NAN_found =.FALSE. ! ! RT_output diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index aeccc20f64..f15f078434 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -71,6 +71,7 @@ module RT_control ! G_lesser I/O logical :: SAVE_G_history logical :: SAVE_Vb_history + logical :: SAVE_Vb_floquet ! ! J, P and M (spin) cache ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index d3d52338c6..527f8f1bd9 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -32,7 +32,7 @@ subroutine NL_initialize(E,k) & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& -& SAVE_Vb_history,SAVE_G_history +& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& @@ -66,6 +66,7 @@ subroutine NL_initialize(E,k) call parser('NoComprCOLL', l_no_compress_COLL) call parser('UseSymm', l_res_symms) call parser('SaveVbhistory', SAVE_Vb_history) + call parser('SaveVbfloquet', SAVE_Vb_floquet) call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) call parser('UseDipoles', l_use_DIPOLES) call parser('SaveGhistory', SAVE_G_history) diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index 4f47e7c1d7..6430825645 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -11,7 +11,7 @@ subroutine RT_databases_IO(E,DO_IT) use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,Vbands_RT_IO_t,& & Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_steps_now,CACHE_OBS_steps, & & SAVE_G_history,NE_i_start_time,CACHE_OBS_last_point,Gless_RT_IO_t,RT_DB_ID,& -& RT_return_db_ID,RT_DB_name,SAVE_Vb_history +& RT_return_db_ID,RT_DB_name,SAVE_Vb_history, SAVE_Vb_floquet #if defined _ELPH_ITERATIVE use RT_lifetimes, ONLY:l_RT_iterative_ELPH_lifetimes #endif From 0ed4f7b51a783b45252655bbe85e9005746d168f Mon Sep 17 00:00:00 2001 From: Myrta Gruening <3047912@login4.pri.kelvin2.alces.network> Date: Thu, 17 Jul 2025 12:23:57 +0100 Subject: [PATCH 1070/1367] Version 5.3.0, Revision 24924, Hash 8913b8029 MODIFIED * nloptics/NL_initialize.F Bugs: - Additions: - Changes: Verified whether there are the conditions for Floquet analysis and in case switched off the Floquet analysis. Defined the simulation time if Floquet analysis is ON. - --- src/nloptics/NL_initialize.F | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 527f8f1bd9..1d783513a5 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -247,6 +247,19 @@ subroutine NL_initialize(E,k) endif ! if(all(NL_er>0._SP).and.n_frequencies>=1) NL_estep=(NL_er(2)-NL_er(1))/real(n_frequencies,SP) + ! + ! Check if there are condintions for Floquet analysis + ! + if (SAVE_Vb_floquet) then + if (.not.(Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN')) then + call warning(' Floquet analysis implemented only for pure periodic signal. Switching it off ') + SAVE_Vb_floquet = .FALSE. + endif + if (NE_tot_time < 4._SP*EtoT(E=NL_er(1))+Phase_LifeTime*DephMult) then + call warning(' Total time too short for Floquet Analysis. Switching it off ') + SAVE_Vb_floquet = .FALSE. + endif + endif ! ! Determine the total time from the damping or from T_0 ! @@ -273,6 +286,7 @@ subroutine NL_initialize(E,k) & Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency(1))+5._SP*RT_step/)) endif ! + if (SAVE_Vb_floquet) Sampling_Time = Sampling_Time + 3._SP*EtoT(E=NL_er(1)) ! Try this NE_tot_time=NE_tot_time+Sampling_Time ! call msg('sr','Dephasing Time ',DephMult*Phase_LifeTime*AUT2FS,"[fs]") @@ -290,7 +304,7 @@ subroutine NL_initialize(E,k) endif ! else - call msg('s','Total simulation time read from input') + call msg('s','Total simulation time read from input') endif ! call msg('sr','Total simulation time ',NE_tot_time*AUT2FS,"[fs]") From 49335b5f002776d14786f4fa45cb3c9583e0a94e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 17 Jul 2025 23:07:28 +0200 Subject: [PATCH 1071/1367] Few refinement to evaluation of F_xc for spinorial case --- src/xc_functionals/Build_F_xc_mat.F | 25 ++++++++++++++++++------- src/xc_functionals/XC_libxc_driver.F | 2 +- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index fa3c8998a8..d80df8f1ff 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -69,15 +69,21 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) else ! ! The following is in principle ok, but slightly less precise + ! than the same operation done in XC_eval_LDA_kernel with DP quantities + ! There F_xc(:,1:2,1:2) is filled and directly used here + ! However, XC_eval_LDA_kernel works for LDA alone. The code below + ! would work also for GGA ! ! DEBUG< - Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP - ! - do ifft=1,fft_size - mod_mag=abs(magn(ifft,3)) - if(mod_mag< 1.E-6_SP) magn_inv(ifft)=0._SP - if(mod_mag>=1.E-6_SP) magn_inv(ifft)=1._SP/mod_mag - enddo + !Vxc_mag(:) =(V_xc(:,1)-V_xc(:,2))/2._SP + !! + !do ifft=1,fft_size + ! mod_mag=abs(magn(ifft,3)) + ! !The same factor is also used in XC_eval_LDA_kernel + ! mod_mag=mod_mag_n*real(fft_size,SP)/DL_vol + ! if(mod_mag< 1.E-6_SP) magn_inv(ifft)=0._SP + ! if(mod_mag>=1.E-6_SP) magn_inv(ifft)=1._SP/mod_mag + !enddo !! !F_xc_mat(:,1,2,1,2)= cZERO !F_xc_mat(:,1,2,2,1)= 2*Vxc_mag*magn_inv @@ -93,10 +99,15 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) endif ! else if (n_spinor==2) then + ! + ! At variance with the case n_sp_pol=2, here F_xc(:,1:2,1:2 from XC_eval_LDA_kernel + ! here contains v2rho2, e.g. the second order derivative w.r.t. the density + ! Accordingly, the term proportional to the V_xc(:,1)-V_xc(:,2) is added here ! magn_versor=0._SP do ifft=1,fft_size mod_mag_n=v_norm(magn(ifft,:)) + ! The same factor is also used in XC_eval_LDA_kernel mod_mag=mod_mag_n*real(fft_size,SP)/DL_vol if(mod_mag< 1.E-6_SP) magn_versor(ifft,:)=0._SP if(mod_mag>=1.E-6_SP) magn_versor(ifft,:)=magn(ifft,:)/mod_mag_n diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 519022c694..41d3331ce1 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -287,7 +287,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! V_xc is needed for F_xc_mat in Build_Fxc_mat.F with n_spinor=2, ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, ! avoiding the call to XC_eval_lda_kernel - ! Howerver but the latter is more precise, since it works with DP quantities + ! Howerver, the latter is more precise, since it works with DP quantities forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) endif ! Needed to build Fxc unless in magnons case with n_sp_pol==2 From 1b65d062b462eb58b0dfbfd4c93933e477ea7c17 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 17 Jul 2025 23:22:35 +0200 Subject: [PATCH 1072/1367] Fixed factor in (DEBUG code) --- src/xc_functionals/Build_F_xc_mat.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xc_functionals/Build_F_xc_mat.F b/src/xc_functionals/Build_F_xc_mat.F index d80df8f1ff..1466ab2d89 100644 --- a/src/xc_functionals/Build_F_xc_mat.F +++ b/src/xc_functionals/Build_F_xc_mat.F @@ -80,7 +80,7 @@ subroutine Build_F_xc_mat(V_xc,F_xc,F_xc_mat) !do ifft=1,fft_size ! mod_mag=abs(magn(ifft,3)) ! !The same factor is also used in XC_eval_LDA_kernel - ! mod_mag=mod_mag_n*real(fft_size,SP)/DL_vol + ! mod_mag=mod_mag*real(fft_size,SP)/DL_vol ! if(mod_mag< 1.E-6_SP) magn_inv(ifft)=0._SP ! if(mod_mag>=1.E-6_SP) magn_inv(ifft)=1._SP/mod_mag !enddo From dd4b90828f3daac7e7dcd9cde5e8788006a46453 Mon Sep 17 00:00:00 2001 From: Myrta Gruening <3047912@node181.pri.kelvin2.alces.network> Date: Fri, 18 Jul 2025 14:02:09 +0100 Subject: [PATCH 1073/1367] Version 5.3.0, Revision 24925, Hash 0ed4f7b51 MODIFIED * nloptics/NL_initialize.F Bugs: - Additions: - Changes: Continuing to implement the Floquet analysis. - --- src/nloptics/NL_initialize.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1d783513a5..07aad90930 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -286,7 +286,7 @@ subroutine NL_initialize(E,k) & Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency(1))+5._SP*RT_step/)) endif ! - if (SAVE_Vb_floquet) Sampling_Time = Sampling_Time + 3._SP*EtoT(E=NL_er(1)) ! Try this + if (SAVE_Vb_floquet) Sampling_Time = 4._SP*EtoT(E=NL_er(1))+5._SP*RT_step ! That is the max tot time - I keep it the same for all freqs NE_tot_time=NE_tot_time+Sampling_Time ! call msg('sr','Dephasing Time ',DephMult*Phase_LifeTime*AUT2FS,"[fs]") From 0bef7da56f39ae4115bea88dcc5fb954f8431a8e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 19 Jul 2025 10:01:32 +0200 Subject: [PATCH 1074/1367] Version 5.3.0, Revision 24951, Hash e2e0007d3 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F wf_and_fft/DOUBLE_project.dep Bugs: - Additions: -Added check on bands range Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 2 ++ src/wf_and_fft/DOUBLE_project.dep | 1 - 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 2fa23aa33a..2120380fe0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24498 h.027781afe. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24951 h.e2e0007d3. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24498 h.027781afe' -PACKAGE_STRING='Yambo 5.3.0 r.24498 h.027781afe' +PACKAGE_VERSION='5.3.0 r.24951 h.e2e0007d3' +PACKAGE_STRING='Yambo 5.3.0 r.24951 h.e2e0007d3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24498 h.027781afe to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.24951 h.e2e0007d3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24498 h.027781afe:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.24951 h.e2e0007d3:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24498 h.027781afe +Yambo configure 5.3.0 r.24951 h.e2e0007d3 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was +It was created by Yambo $as_me 5.3.0 r.24951 h.e2e0007d3, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24498" -SHASH="027781afe" +SREVISION="24951" +SHASH="e2e0007d3" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was +This file was extended by Yambo $as_me 5.3.0 r.24951 h.e2e0007d3, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24498 h.027781afe +Yambo config.status 5.3.0 r.24951 h.e2e0007d3 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 44bbd5f071..94ca177c37 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24498 h.027781afe, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.24951 h.e2e0007d3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24498" -SHASH="027781afe" +SREVISION="24951" +SHASH="e2e0007d3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 5e714c8a6c..805e5b0ab3 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -114,6 +114,8 @@ subroutine NL_initialize(E,k) if(DP/=SP) call error(" Non-linear optics works only in double precision, configure with --enable-dp flag") if(n_sp_pol/=1) call error(" Spin-polarized systems not yet implemented") if(any(NL_bands(:)==0)) call error("Any of the NLBands limits is 0, change to nv|nc with 0E%nbf)) call error("You should include at least a valence band") + if(any(NL_bands(2) Date: Wed, 23 Jul 2025 09:27:09 +0100 Subject: [PATCH 1075/1367] Version 5.3.0, Revision 24926, Hash dd4b90828 MODIFIED * interface/INIT_activate.F io/io_RT_components_V_bands.F modules/mod_RT_control.F nloptics/NL_initialize.F real_time_control/RT_databases_IO.F Bugs: - Additions: - Changes: The SAVE_Vb-floquet option seems to work as expected so far - --- src/interface/INIT_activate.F | 4 +-- src/io/io_RT_components_V_bands.F | 5 ++-- src/modules/mod_RT_control.F | 27 ++++++++++++++++++ src/nloptics/NL_initialize.F | 37 ++++++++++++++++++------- src/real_time_control/RT_databases_IO.F | 18 ++++++++---- 5 files changed, 72 insertions(+), 19 deletions(-) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index e23c09d3eb..aed1456881 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -564,8 +564,8 @@ subroutine INIT_activate() if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLHoleBands NLElecBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') call initactivate(1,'TestOSCLL UseSymm VelGaugeNoDiam') - if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng SaveVbfloquet') - if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') + if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng') + if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory SaveVbfloquet') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL COLLCut EvalCurrent InducedField') call initactivate(1,'TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') call init_QP_ctl_switch('G') diff --git a/src/io/io_RT_components_V_bands.F b/src/io/io_RT_components_V_bands.F index 9bd95dbcac..faec1554d3 100644 --- a/src/io/io_RT_components_V_bands.F +++ b/src/io/io_RT_components_V_bands.F @@ -57,11 +57,12 @@ subroutine io_RT_components_V_bands(ID,T_size) VAR_SZ(6) = T_size dim_names(6) ='V_bands_IO_time_step' IPOS(6) = Vbands_RT_IO_t%N - ! + ! + ! Variable Definitions... !------------------------- if( NE_i_time==NE_i_start_time .or. .not.l_nl_p_and_p) then - if (SAVE_Vb_history) VAR_SZ(6) = NF90_UNLIMITED + if (SAVE_Vb_history.or.SAVE_Vb_floquet) VAR_SZ(6) = NF90_UNLIMITED !call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,par_io_kind='collective',silent=.true.) call def_variable_bulk(ID,"V_bands",4,VAR_SZ,SP,dim_names=dim_names,silent=.true.) VAR_SZ(6) = T_size diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index f15f078434..9be8da5738 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -72,6 +72,7 @@ module RT_control logical :: SAVE_G_history logical :: SAVE_Vb_history logical :: SAVE_Vb_floquet + real(SP) :: Vbands_IO_starttime ! ! J, P and M (spin) cache ! @@ -464,4 +465,30 @@ subroutine RT_carriers_to_RT_E(E_eq,E,what) enddo end subroutine ! + ! I put this here for the moment... not sure this is the best solution => not so + ! + subroutine RT_setup_Floquet_analysis(freq) + ! + use QP_m, ONLY:Time_of + use pars, ONLY:pi + use real_time, ONLY:RT_step + ! + implicit none + ! + real(SP), intent(in) :: freq + ! + ! Workspace + real(SP) :: period + ! + if (.not.SAVE_Vb_floquet) return + ! + ! Set up the interval + ! + period = 2._SP*pi/freq + Vbands_RT_IO_t%INTERVAL_steps = nint((Period/10._SP)/RT_step) + ! + call warning(' WF IO time changed to perform Floquet analysis ') + ! + end subroutine + ! end module RT_control diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 07aad90930..87cc7e7068 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -31,8 +31,8 @@ subroutine NL_initialize(E,k) use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now - use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time,RT_control_alloc,RT_control_free,l_NE_with_fields,& -& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet + use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time, RT_control_alloc,RT_control_free,l_NE_with_fields,& +& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet, RT_setup_Floquet_analysis, Vbands_IO_starttime use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& @@ -248,16 +248,27 @@ subroutine NL_initialize(E,k) ! if(all(NL_er>0._SP).and.n_frequencies>=1) NL_estep=(NL_er(2)-NL_er(1))/real(n_frequencies,SP) ! - ! Check if there are condintions for Floquet analysis - ! + !call RT_setup_Floquet_analysis(n_active_fields,W_0) if (SAVE_Vb_floquet) then - if (.not.(Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN')) then + if (.not.(Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN')) then call warning(' Floquet analysis implemented only for pure periodic signal. Switching it off ') SAVE_Vb_floquet = .FALSE. - endif - if (NE_tot_time < 4._SP*EtoT(E=NL_er(1))+Phase_LifeTime*DephMult) then - call warning(' Total time too short for Floquet Analysis. Switching it off ') - SAVE_Vb_floquet = .FALSE. + endif + if (NE_tot_time > 0._SP) then + call warning(' Recalculating time for Floquet analysis ') + NE_tot_time = -1._SP + endif + if ((Efield(2)%ef_name/='none').or.(Efield(3)%ef_name/='none')) then + call warning(' Floquet analysis only with one external field. Switching it off ') + SAVE_Vb_floquet = .FALSE. + endif + if (SAVE_Vb_history) then + call warning(' Floquet Analysis not compatible with saving WF history. Switching it off ') + SAVE_Vb_floquet = .FALSE. + endif + if (n_active_fields>1) then + call warning(' Floquet Analysis not compatible with multiple fieldis. Switching it off ') + SAVE_Vb_floquet = .FALSE. endif endif ! @@ -286,7 +297,13 @@ subroutine NL_initialize(E,k) & Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency(1))+5._SP*RT_step/)) endif ! - if (SAVE_Vb_floquet) Sampling_Time = 4._SP*EtoT(E=NL_er(1))+5._SP*RT_step ! That is the max tot time - I keep it the same for all freqs + if (SAVE_Vb_floquet) then + Sampling_Time = 4._SP*EtoT(E=W_0)+5._SP*RT_step ! That is the max tot time - I keep it the same for all freqs + Vbands_IO_starttime = int(NE_tot_time/RT_step) + call RT_setup_Floquet_analysis(W_0) + call msg('sr','WF IO is starting at ', Vbands_IO_starttime,"[steps]") + endif + ! NE_tot_time=NE_tot_time+Sampling_Time ! call msg('sr','Dephasing Time ',DephMult*Phase_LifeTime*AUT2FS,"[fs]") diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index 6430825645..c2afeb1549 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -11,7 +11,7 @@ subroutine RT_databases_IO(E,DO_IT) use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,Vbands_RT_IO_t,& & Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_steps_now,CACHE_OBS_steps, & & SAVE_G_history,NE_i_start_time,CACHE_OBS_last_point,Gless_RT_IO_t,RT_DB_ID,& -& RT_return_db_ID,RT_DB_name,SAVE_Vb_history, SAVE_Vb_floquet +& RT_return_db_ID,RT_DB_name,SAVE_Vb_history, SAVE_Vb_floquet, Vbands_IO_starttime #if defined _ELPH_ITERATIVE use RT_lifetimes, ONLY:l_RT_iterative_ELPH_lifetimes #endif @@ -37,7 +37,7 @@ subroutine RT_databases_IO(E,DO_IT) implicit none ! type(levels) :: E - logical :: DO_IT + logical :: DO_IT ! ! Work Space ! @@ -48,6 +48,7 @@ subroutine RT_databases_IO(E,DO_IT) ! ... G_lesser ! integer :: ik,G_IO_steps,io_G,io_Vb,i_cpu,i_G_db,i_G_k_db,i_G_RES_db,i_G_RES_k_db,idb_Vb,idb_Vb_k + logical :: Start_sampling #if defined _ELPH_ITERATIVE integer :: io_THETA #endif @@ -275,10 +276,17 @@ subroutine RT_databases_IO(E,DO_IT) io_Vb=io_RT_components("V_bands",RT_DB_ID(idb_Vb)) endif ! - if (RT_do_it('Vb').or.DO_IT) then + Start_sampling = .true. + if (SAVE_Vb_floquet) then + if (NE_i_time < Vbands_IO_starttime) Start_sampling = .false. + if (NE_i_time==NE_i_start_time) Start_sampling = .true. + endif + ! + if ((RT_do_it('Vb').or.DO_IT) .and.Start_sampling) then + ! + if ((.not.SAVE_Vb_history).and.(.not.SAVE_Vb_floquet)) Vbands_RT_IO_t%N=1 + if (SAVE_Vb_history.or.SAVE_Vb_floquet) Vbands_RT_IO_t%N=Vbands_RT_IO_t%N+1 ! - if (.not.SAVE_Vb_history) Vbands_RT_IO_t%N=1 - if ( SAVE_Vb_history) Vbands_RT_IO_t%N=Vbands_RT_IO_t%N+1 Vbands_RT_IO_t%Time(Vbands_RT_IO_t%N)=NE_time ! IO_ACT=manage_action(OP_IF_START_APP_CL_IF_END,NE_i_time,NE_i_start_time,NE_steps) From 2f46ca13e0c56d9784084c884b2202a3cbf103e2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 23 Jul 2025 17:08:16 +0200 Subject: [PATCH 1076/1367] Tentative fix for issue #215 https://gitlab.com/lumen-code/lumen/-/issues/215 https://github.com/yambo-code/yambo/issues/210 --- src/bse/K_kernel.F | 6 +-- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 56 +++++++++++++++++++++++- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index a36781bb1f..eacef5961d 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -96,7 +96,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), allocatable DEV_ATTR :: O1(:),O2(:),O_times_W(:) ! complex(SP), external :: K_correlation_kernel_std,K_correlation_kernel_dir - complex(SP), external :: TDDFT_ALDA_eh_space_G_kernel + complex(SP), external :: TDDFT_ALDA_eh_space_G_kernel_resonant,TDDFT_ALDA_eh_space_G_kernel_coupling complex(SP), external :: K_exchange_kernel_resonant,K_exchange_kernel_coupling ! logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,BS_blk_todo,& @@ -735,7 +735,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'RES') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_resonant(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! @@ -765,7 +765,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'CPL') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_coupling(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 94e0378420..7cb1b0873f 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): DS ! -function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) +function TDDFT_ALDA_eh_space_G_kernel_resonant(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) ! ! Calculates the F_xc scattering ! @@ -51,4 +51,56 @@ function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik ! H_x=H_x/4._SP/pi ! -end function TDDFT_ALDA_eh_space_G_kernel +end function TDDFT_ALDA_eh_space_G_kernel_resonant +! +! +! +! +function TDDFT_ALDA_eh_space_G_kernel_coupling(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) + ! + ! Calculates the F_xc scattering + ! + ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) + ! :Fxc: + ! (iv(1),ik(3),is(3)) -->--:...:-->-- (iv(2),ik(4),is(4)) + ! + use pars, ONLY:SP,pi,cZERO + use FFT_m, ONLY:fft_size + use R_lattice, ONLY:minus_G + use BS, ONLY:BS_T_group + use wrapper_omp, ONLY:V_dot_V_omp + use electrons, ONLY:n_spinor,spin_occ + ! + implicit none + ! + integer, intent(in) :: BS_n_g_fxc,i_Tp,i_Tk + type(BS_T_group), target, intent(in) :: BS_T_grp_ip,BS_T_grp_ik + ! + complex(SP) :: H_x + ! + integer :: i_sp_xc,o_sp_xc,i_sp_c,i_sp_v + ! + i_sp_c=BS_T_grp_ik%table(i_Tk,4) + i_sp_v=BS_T_grp_ik%table(i_Tk,5) + ! + if (n_spinor==1) then + H_x=V_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(minus_G(:BS_n_g_fxc),i_Tk, 1 , 1 ),& + & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_c,i_sp_v) ) + else if (n_spinor==2) then + H_x=cZERO + do i_sp_xc=1,n_spinor + do o_sp_xc=1,n_spinor + H_x=H_x+V_dot_V_omp(BS_n_g_fxc,BS_T_grp_ik%O_tddft_L(minus_G(:BS_n_g_fxc),i_Tk,i_sp_xc,o_sp_xc),& + & BS_T_grp_ip%O_tddft_R(:,i_Tp,i_sp_xc,o_sp_xc) ) + enddo + enddo + endif + ! + ! tddft_alda_r_space should be mutiplied by X, it is mutiplied by Co in K + ! X = spin_occ/DL_vol/Nq + ! Co = 4*pi*spin_occ/DL_vol/Nq + ! --> X/Co = 1/4/pi + ! + H_x=H_x/4._SP/pi + ! +end function TDDFT_ALDA_eh_space_G_kernel_coupling From fb7d6eed74cc8b8f73ff7c8baea955f90d8133ac Mon Sep 17 00:00:00 2001 From: Myrta Gruening <3047912@login3.pri.kelvin2.alces.network> Date: Wed, 23 Jul 2025 21:42:50 +0100 Subject: [PATCH 1077/1367] Version 5.3.0, Revision 24927, Hash 161efe3ca MODIFIED * modules/mod_RT_control.F nloptics/NL_initialize.F real_time_control/RT_databases_IO.F Bugs: - Additions: - Changes: Previous commit did not work as intented. Corrected + aestetic changes. - --- src/modules/mod_RT_control.F | 26 ------------------------- src/nloptics/NL_initialize.F | 11 +++++------ src/real_time_control/RT_databases_IO.F | 1 + 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index 9be8da5738..bfeed1636f 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -465,30 +465,4 @@ subroutine RT_carriers_to_RT_E(E_eq,E,what) enddo end subroutine ! - ! I put this here for the moment... not sure this is the best solution => not so - ! - subroutine RT_setup_Floquet_analysis(freq) - ! - use QP_m, ONLY:Time_of - use pars, ONLY:pi - use real_time, ONLY:RT_step - ! - implicit none - ! - real(SP), intent(in) :: freq - ! - ! Workspace - real(SP) :: period - ! - if (.not.SAVE_Vb_floquet) return - ! - ! Set up the interval - ! - period = 2._SP*pi/freq - Vbands_RT_IO_t%INTERVAL_steps = nint((Period/10._SP)/RT_step) - ! - call warning(' WF IO time changed to perform Floquet analysis ') - ! - end subroutine - ! end module RT_control diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 87cc7e7068..feebc540e4 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -31,8 +31,8 @@ subroutine NL_initialize(E,k) use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now - use RT_control, ONLY:SETUP_RT_IO_type,OBS_RT_IO_t,NE_i_start_time, RT_control_alloc,RT_control_free,l_NE_with_fields,& -& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet, RT_setup_Floquet_analysis, Vbands_IO_starttime + use RT_control, ONLY:OBS_RT_IO_t, NE_i_start_time, RT_control_alloc,RT_control_free,l_NE_with_fields,Vbands_RT_IO_t,& +& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet, Vbands_IO_starttime use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& @@ -248,7 +248,6 @@ subroutine NL_initialize(E,k) ! if(all(NL_er>0._SP).and.n_frequencies>=1) NL_estep=(NL_er(2)-NL_er(1))/real(n_frequencies,SP) ! - !call RT_setup_Floquet_analysis(n_active_fields,W_0) if (SAVE_Vb_floquet) then if (.not.(Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN')) then call warning(' Floquet analysis implemented only for pure periodic signal. Switching it off ') @@ -298,10 +297,9 @@ subroutine NL_initialize(E,k) endif ! if (SAVE_Vb_floquet) then - Sampling_Time = 4._SP*EtoT(E=W_0)+5._SP*RT_step ! That is the max tot time - I keep it the same for all freqs + Sampling_Time = 4._SP*EtoT(E=W_0)+5._SP*RT_step Vbands_IO_starttime = int(NE_tot_time/RT_step) - call RT_setup_Floquet_analysis(W_0) - call msg('sr','WF IO is starting at ', Vbands_IO_starttime,"[steps]") + Vbands_RT_IO_t%INTERVAL_time_INPUT = (2._SP*pi/W_0)/10._SP endif ! NE_tot_time=NE_tot_time+Sampling_Time @@ -521,6 +519,7 @@ subroutine NL_initialize(E,k) ! ! I/O steps !=========== + ! call RT_IO_type_time_steps("INIT") ! call RT_control_alloc("all") diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index c2afeb1549..b8803150bd 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -280,6 +280,7 @@ subroutine RT_databases_IO(E,DO_IT) if (SAVE_Vb_floquet) then if (NE_i_time < Vbands_IO_starttime) Start_sampling = .false. if (NE_i_time==NE_i_start_time) Start_sampling = .true. + if (NE_i_time == Vbands_IO_starttime) Vbands_RT_IO_t%last_point = Vbands_IO_starttime - Vbands_RT_IO_t%INTERVAL_steps endif ! if ((RT_do_it('Vb').or.DO_IT) .and.Start_sampling) then From 46743948876a2ea23865d896003c7493e6dbd010 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 25 Jul 2025 10:45:31 +0200 Subject: [PATCH 1078/1367] Further change related to issue #215 To check if this is more correct, or if the old one is more correct --- .../TDDFT_ALDA_eh_space_G_collisions_L.F | 20 +++++++++---------- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 16 +++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index e7cde0d870..2af68bdd0e 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -88,18 +88,18 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ i_sp_c=BS_T_grp(i_T_grp)%table(i_T_el,4) i_sp_v=BS_T_grp(i_T_grp)%table(i_T_el,5) ! - is=(/0,i_k,i_s ,i_sp_c/) - os=(/0,i_p,i_sp,i_sp_v/) + is=(/i_c,i_k,i_s ,i_sp_c/) + os=(/i_v,i_p,i_sp,i_sp_v/) qs=(/minus_G(i_g_p),iq,1/) ! - if (mode=="R".or.mode=="C".or.mode=="F") then - is(1)=i_c - os(1)=i_v - else if (mode=="A".or.mode=="Q") then - ! Same momenta and spin indexes, inverted bands - is(1)=i_v - os(1)=i_c - endif + !if (mode=="R".or.mode=="C".or.mode=="F") then + ! is(1)=i_c + ! os(1)=i_v + !else if (mode=="A".or.mode=="Q") then + ! ! Same momenta and spin indexes, inverted bands + ! is(1)=i_v + ! os(1)=i_c + !endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index bd5feda5fc..18e4cd08a2 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -102,14 +102,14 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ os=(/i_v,i_p,i_sp,i_sp_v/) qs=(/minus_G(i_g_p),iq,1/) ! - if (mode=="R".or.mode=="Q".or.mode=="F") then - is(1)=i_c - os(1)=i_v - else if (mode=="A".or.mode=="C") then - ! Same momenta and spin indexes, inverted bands - is(1)=i_v - os(1)=i_c - endif + !if (mode=="R".or.mode=="Q".or.mode=="F") then + ! is(1)=i_c + ! os(1)=i_v + !else if (mode=="A".or.mode=="C") then + ! ! Same momenta and spin indexes, inverted bands + ! is(1)=i_v + ! os(1)=i_c + !endif ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then From d9027f996123327359b196bd75f70f31f351949f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 25 Jul 2025 10:52:37 +0200 Subject: [PATCH 1079/1367] Improvement for plotting excitonic WFs imported from phys-excitons --- src/bse/BSE_utilities.F | 73 ++++++++++++++- ypp/excitons/excitons_WFs.F | 179 ++++++++++++++++++++++-------------- 2 files changed, 183 insertions(+), 69 deletions(-) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index 7e877f2af5..58b5e2ce87 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -11,6 +11,75 @@ #include ! ! +subroutine build_inverse_BS_eh_table_from_BSS_table(nk) + ! + use electrons, ONLY:n_sp_pol + use BS, ONLY:BS_H_dim,BS_bands + use BS_solvers, ONLY:BSS_eh_table,BSS_eh_table_m1 + ! + implicit none + ! + integer, intent(in) :: nk + ! + integer :: iv,ic,i_H,ik_bz,i_sp_c,i_sp_v + ! + if (.not.allocated(BSS_eh_table_m1)) then + allocate(BSS_eh_table_m1(nk,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) + BSS_eh_table_m1=0 + endif + !call live_timing('BSE inverse eh-table',BS_H_dim) + ! + do i_H=1,BS_H_dim + ! + ik_bz = BSS_eh_table(i_H,1) + iv = BSS_eh_table(i_H,2) + ic = BSS_eh_table(i_H,3) + i_sp_c= BSS_eh_table(i_H,4) + i_sp_v= BSS_eh_table(i_H,5) + ! + BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H + !call live_timing(steps=1) + ! + enddo + !call live_timing( ) + ! +end subroutine build_inverse_BS_eh_table_from_BSS_table +! +! +subroutine build_inverse_BS_eh_table_from_BS_kernel(nk) + ! + use electrons, ONLY:n_sp_pol + use BS, ONLY:BS_bands,BS_K_dim,BS_blk + use BS_solvers, ONLY:BSS_eh_table_m1 + ! + implicit none + ! + integer, intent(in) :: nk + ! + integer :: i_H,ik_bz,iv,ic,i_sp_c,i_sp_v + ! + allocate(BSS_eh_table_m1(nk,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) + BSS_eh_table_m1=0 + !call live_timing('BSE inverse eh-table',BS_H_dim) + ! + do i_H=1,2*BS_K_dim(1) + ! + ik_bz = BS_blk(i_H)%table(1,1) + iv = BS_blk(i_H)%table(2,1) + ic = BS_blk(i_H)%table(3,1) + i_sp_c = BS_blk(i_H)%table(4,1) + i_sp_v = BS_blk(i_H)%table(5,1) + ! + BSS_eh_table_m1(ik_bz,iv,ic,i_sp_c,i_sp_v)=i_H + ! + !call live_timing(steps=1) + ! + enddo + !call live_timing( ) + ! +end subroutine build_inverse_BS_eh_table_from_BS_kernel +! +! subroutine BS_exchange_oscillators_alloc(iG) use BS, ONLY:BS_T_grp,BS_n_g_exch use gpu_m, ONLY:have_gpu @@ -23,7 +92,7 @@ subroutine BS_exchange_oscillators_alloc(iG) YAMBO_ALLOC(BS_T_grp(iG)%O_x,(BS_n_g_exch,BS_T_grp(iG)%size)) if (have_gpu) then YAMBO_ALLOC_GPU(DEV_VAR(BS_T_grp(iG)%O_x),(BS_n_g_exch,BS_T_grp(iG)%size)) - endif + endif end subroutine BS_exchange_oscillators_alloc ! subroutine BS_correlation_oscillators_alloc(iB) @@ -38,7 +107,7 @@ subroutine BS_correlation_oscillators_alloc(iB) YAMBO_ALLOC(BS_blk(iB)%O_c,(O_ng,BS_blk(iB)%N_oscillators)) if (have_gpu) then YAMBO_ALLOC_GPU(DEV_VAR(BS_blk(iB)%O_c),(O_ng,BS_blk(iB)%N_oscillators)) - endif + endif end subroutine BS_correlation_oscillators_alloc ! subroutine BS_exchange_oscillators_free(iG_ref) diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 37866b70f6..3ef09dfa2c 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -11,7 +11,7 @@ ! subroutine exciton_WFs(Xk,BS_E_degs,iq) ! - use pars, ONLY:SP,cZERO,pi + use pars, ONLY:SP,cZERO,pi,schlen use R_lattice, ONLY:bz_samp,qindx_X use units, ONLY:BO2ANG use stderr, ONLY:intc @@ -23,7 +23,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) & nr,nr_tot,output_fname,l_average_eh,elec_spin,hole_spin,& & use_xcrysden,use_gnuplot,use_cube,plot_dim,& & EXCITONS_user_indexes,EXCITONS_n_user_states - use BS_solvers, ONLY:BSS_eh_table,BS_mat,BSS_desc,BSS_n_eig + use BS_solvers, ONLY:BSS_eh_table,BSS_eh_table_m1,BS_mat,BSS_desc,BSS_n_eig use BS, ONLY:BS_bands,BS_H_dim use interfaces, ONLY:WF_load,WF_free,DESC_write use wave_func, ONLY:WF,wf_ng @@ -43,16 +43,17 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Workspace ! type(PP_indexes) :: px - integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_lambda,j_lambda,i_sp_pol,ir,ir_hole,j1,& -& n_lambda_deg,BS_E_deg_done,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_pol1,is1,& -& i_spin_hole,i_spin_elec - integer :: ikpbz,ikp,isp,i_spinor,j_spinor,rh_size,ir_hole_rlu(3),i_plot + integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_lambda,j_lambda,i_sp_c,i_sp_v,ir,ir_hole,j1,& +& n_lambda_deg,BS_E_deg_done,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_c1,i_sp_v1,is1,& +& i_spin_hole,i_spin_elec,n1_lambda,n2_lambda + integer :: ikpbz,ikp,isp,i_spinor,j_spinor,rh_size,ir_hole_rlu(3) + character(schlen) :: exc_index_msg real(SP) :: r_hole_rlu(3),k1(3),k2(3) complex(SP) :: B_coeff ! integer, allocatable :: rindex(:) real(SP), allocatable :: r_cell_cc(:,:),kp_dot_r_h(:),k_dot_r_e(:),alpha(:) - complex(SP), allocatable :: wf_tmp(:,:,:),wf_vc(:,:,:),WF1(:,:),WF2(:,:),phase(:) + complex(SP), allocatable :: wf_tmp(:,:,:),wf_tmp_uc(:,:,:),wf_vc(:,:,:),WF1(:,:),WF2(:,:),phase(:) ! call section('+','Excitonic Wave Function') ! @@ -160,16 +161,25 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) i1=n_spinor if(l_free_hole) i1=1 YAMBO_ALLOC(wf_vc,(fft_size,n_spinor,i1)) + YAMBO_ALLOC(wf_tmp_uc,(fft_size,n_spinor,i1)) YAMBO_ALLOC(alpha,(nr_tot)) YAMBO_ALLOC(phase,(nr_tot)) YAMBO_ALLOC(wf_tmp,(nr_tot,n_spinor,i1)) endif ! + call build_inverse_BS_eh_table_from_BSS_table(Xk%nbz) + ! ! Par Proc ! - call PP_indexes_reset(px) - call PARALLEL_index(px,(/BS_H_dim/)) - call PP_wait() + if(l_average_eh.or.Xk%nbz==1) then + call PP_indexes_reset(px) + call PARALLEL_index(px,(/BS_H_dim/)) + call PP_wait() + else + call PP_indexes_reset(px) + call PARALLEL_index(px,(/Xk%nbz/)) + call PP_wait() + endif ! ! Loop on exc states !=================== @@ -190,6 +200,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! n_lambda_deg=count(BS_E_degs==BS_E_degs(j_lambda)) ! + n1_lambda=BS_E_degs(j_lambda) + n2_lambda=BS_E_degs(j_lambda)+n_lambda_deg-1 + ! if(l_average_eh) then ! if(i1==1) v2plot =0._SP @@ -203,7 +216,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikbz = BSS_eh_table(neh,1) iv = BSS_eh_table(neh,2) ic = BSS_eh_table(neh,3) - i_sp_pol = BSS_eh_table(neh,4) + i_sp_c= BSS_eh_table(neh,4) + i_sp_v= BSS_eh_table(neh,5) ! ikibz = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -213,7 +227,8 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikbz1 = BSS_eh_table(neh1,1) iv1 = BSS_eh_table(neh1,2) ic1 = BSS_eh_table(neh1,3) - i_sp_pol1 = BSS_eh_table(neh1,4) + i_sp_c1= BSS_eh_table(neh1,4) + i_sp_v1= BSS_eh_table(neh1,5) ! ikibz1 = Xk%sstar(ikbz1,1) is1 = Xk%sstar(ikbz1,2) @@ -225,12 +240,12 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) if (ic1==ic.and.trim(AVE_exc)=='h') then ! if (n_sp_pol==2 .and. i_spin_hole>0) then - if (i_sp_pol /=i_spin_hole) cycle - if (i_sp_pol1/=i_spin_hole) cycle + if (i_sp_v /=i_spin_hole) cycle + if (i_sp_v1/=i_spin_hole) cycle endif ! - call WF_apply_symm((/iv, ikibz, is, i_sp_pol /),WF1) - call WF_apply_symm((/iv1,ikibz1,is1,i_sp_pol1/),WF2) + call WF_apply_symm((/iv, ikibz, is, i_sp_v /),WF1) + call WF_apply_symm((/iv1,ikibz1,is1,i_sp_v1/),WF2) ! B_coeff = BS_mat(neh, j_lambda)* conjg(BS_mat(neh1, j_lambda)) ! @@ -248,12 +263,12 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) elseif(iv1==iv.and.trim(AVE_exc)=='e') then ! if (n_sp_pol==2 .and. i_spin_elec>0) then - if (i_sp_pol /=i_spin_elec) cycle - if (i_sp_pol1/=i_spin_elec) cycle + if (i_sp_c /=i_spin_elec) cycle + if (i_sp_c1/=i_spin_elec) cycle endif ! - call WF_apply_symm((/ic, ikibz, is, i_sp_pol /),WF1) - call WF_apply_symm((/ic1,ikibz1,is1,i_sp_pol1/),WF2) + call WF_apply_symm((/ic, ikibz, is, i_sp_c /),WF1) + call WF_apply_symm((/ic1,ikibz1,is1,i_sp_c1/),WF2) ! B_coeff = conjg(BS_mat(neh,j_lambda))* BS_mat(neh1,j_lambda) ! @@ -284,37 +299,24 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! call live_timing('ExcWF@'//trim(intc(j_lambda)),px%n_of_elements(myid+1)) ! - WF1 = cZERO - WF2 = cZERO - ! wf_tmp= cZERO ! - ! DS note: 2025/07/14 - ! The simulation is demading due to the huge loop on the nr_tot, - ! multiplied by a large loop on BS_H_dim. All other operations are irrelevant. - ! The present strategy emplois MPI distribution over BS_H_dim, OpenMP over nr_tot - ! A simplification would be possible, since the large nr_tot loop should be - ! multiplied only by nkbz. This is the sole term which is not periodic in the extended supercell. - ! This could be achieved by replacing hte neh loop with a multiple loop over - ! nbkbz, n_sp_pol, nbv, nbc with a partial internal accumulation over nvb, nbc, n_sp_pol - ! For a system with many bands it would lead to a speed-up of a factor nbv*nbc*n_sp_pol - ! !$omp parallel default(shared), & - !$omp private(k_dot_r_e,kp_dot_r_h,alpha,phase,ir), & + !$omp private(k_dot_r_e,kp_dot_r_h,alpha,phase,ir,neh,& + !$omp wf_tmp_uc,WF1,WF2,wf_vc,ikibz,is,ikpbz,ikp,isp,k1,k2,& + !$omp ikbz,iv,ic,i_sp_c,i_sp_v,i_spinor,j_spinor), & !$omp reduction(+:wf_tmp) ! + WF1 = cZERO + WF2 = cZERO + ! call OPENMP_update(master_thread) ! - do neh = 1,BS_H_dim - ! - if (.not.px%element_1D(neh)) cycle + do ikbz = 1,Xk%nbz ! - ikbz = BSS_eh_table(neh,1) - iv = BSS_eh_table(neh,2) - ic = BSS_eh_table(neh,3) - i_sp_pol = BSS_eh_table(neh,4) - ! - if (n_sp_pol==2 .and. i_spin_hole>0 .and. i_sp_pol /=i_spin_hole) cycle + if (Xk%nbz>1) then + if (.not.px%element_1D(ikbz)) cycle + endif ! ikibz = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -323,8 +325,27 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ikp = Xk%sstar(ikpbz,1) isp = Xk%sstar(ikpbz,2) ! - call WF_apply_symm((/iv,ikp, isp,i_sp_pol/),WF1) - call WF_apply_symm((/ic,ikibz,is, i_sp_pol/),WF2) + k1=Xk%ptbz(ikbz,:)/alat(:)*2._SP*pi + k2=Xk%ptbz(ikpbz,:)/alat(:)*2._SP*pi + ! + wf_tmp_uc= cZERO + ! + do iv = BS_bands(1),BS_bands(2) + do ic = BS_bands(1),BS_bands(2) + do i_sp_c= 1,n_sp_pol + do i_sp_v= 1,n_sp_pol + ! + neh=BSS_eh_table_m1(ikbz,iv,ic,i_sp_c,i_sp_v) + if (neh==0) cycle + ! + if (Xk%nbz==1) then + if (.not.px%element_1D(neh)) cycle + endif + ! + if (n_sp_pol==2 .and. i_spin_hole>0 .and. i_sp_v /=i_spin_hole) cycle + ! + call WF_apply_symm((/iv,ikp, isp,i_sp_v/),WF1) + call WF_apply_symm((/ic,ikibz,is, i_sp_c/),WF2) ! ! All the following operations are only up to fft_size wf_vc=cZERO @@ -345,8 +366,34 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) enddo endif ! - k1=Xk%ptbz(ikbz,:)/alat(:)*2._SP*pi - k2=Xk%ptbz(ikpbz,:)/alat(:)*2._SP*pi + if (l_free_hole) then + ! + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + wf_tmp_uc(:,i_spinor,i_spinor) = wf_tmp_uc(:,i_spinor,i_spinor)+ & + & BS_mat(neh,j_lambda)*wf_vc(:,i_spinor,1) + enddo + ! + else + ! + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle + if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle + wf_tmp_uc(:,i_spinor,j_spinor) = wf_tmp_uc(:,i_spinor,j_spinor)+& + & BS_mat(neh,j_lambda)*wf_vc(:,i_spinor,j_spinor) + enddo + enddo + ! + endif + ! + if (master_thread.and.Xk%nbz==1) call live_timing(steps=1) + ! + enddo + enddo + enddo + enddo ! if (l_free_hole) then ! @@ -359,7 +406,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(ir) phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) wf_tmp(ir,i_spinor,i_spinor) = wf_tmp(ir,i_spinor,i_spinor)+ & - & BS_mat(neh,j_lambda)*wf_vc(rindex(ir),i_spinor,1)*phase(ir) + & wf_tmp_uc(rindex(ir),i_spinor,1)*phase(ir) enddo enddo ! @@ -373,19 +420,19 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle !$omp do - do ir=1,nr_tot - k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) - alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(1) - phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) - wf_tmp(ir,i_spinor,j_spinor) = wf_tmp(ir,i_spinor,j_spinor)+& - & BS_mat(neh,j_lambda)*wf_vc(rindex(ir),i_spinor,j_spinor)*phase(ir) + do ir=1,nr_tot + k_dot_r_e(ir) =r_cell_cc(ir,1)*k1(1)+r_cell_cc(ir,2)*k1(2)+r_cell_cc(ir,3)*k1(3) + alpha(ir)=k_dot_r_e(ir)-kp_dot_r_h(1) + phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + wf_tmp(ir,i_spinor,j_spinor) = wf_tmp(ir,i_spinor,j_spinor)+& + & wf_tmp_uc(rindex(ir),i_spinor,j_spinor)*phase(ir) enddo enddo enddo ! endif ! - if (master_thread) call live_timing(steps=1) + if (master_thread.and.Xk%nbz>1) call live_timing(steps=1) ! enddo !$omp end parallel @@ -413,21 +460,18 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! if (i1/=n_lambda_deg) cycle ! - if (n_lambda_deg==1) then - call msg('s','Plotting single state '//trim(intc(j_lambda))) - i_plot=j_lambda - else if (n_lambda_deg>1) then - call msg('s','Plotting merged states '//& - & trim(intc(BS_E_degs(j_lambda)))//' -> '//& - & trim(intc(BS_E_degs(j_lambda)+n_lambda_deg-1))) - i_plot=BS_E_degs(j_lambda) - endif + if (n_lambda_deg==1) exc_index_msg=trim(intc(j_lambda)) + if (n_lambda_deg> 1) exc_index_msg=trim(intc(n1_lambda))//'-'//trim(intc(n2_lambda)) + ! + call msg('s','Plotting state(s) '//trim(exc_index_msg)) ! ! PLOT ! - if (use_cube) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(i_plot))//'.cube' - if (use_xcrysden) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(i_plot))//'.xsf' - if (use_gnuplot) output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(intc(i_plot)) + output_fname='exc_qpt'//trim(intc(iq))//"_"//trim(intc(plot_dim))//'d_'//trim(exc_index_msg) + ! + if (use_cube) output_fname=trim(output_fname)//'.cube' + if (use_xcrysden) output_fname=trim(output_fname)//'.xsf' + if (use_gnuplot) output_fname=trim(output_fname) ! if (use_cube) then call of_open_close(trim(output_fname),'o') @@ -456,6 +500,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! YAMBO_FREE(wf_vc) YAMBO_FREE(wf_tmp) + YAMBO_FREE(wf_tmp_uc) ! call WF_free(WF) ! From 2013c4a8176fd74c4b3225aaf1e275b72f619cfc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 25 Jul 2025 23:47:10 +0200 Subject: [PATCH 1080/1367] Fixed loading of EXCPH WFs via io_BSS_diago --- src/exc-ph/EXCPH_gkkp_eval.F | 18 ------------------ src/exc-ph/EXCPH_load_L.F | 6 +++--- src/io/io_BSS_diago.F | 3 ++- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 9ad12e49bf..aa66867f83 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -8,24 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -! ====================================================================== ! GKKP formulation following the F. Paleari PhD thesis (Pg. 109, Eq : 4.25) ! The exciton phonon matrix elements are defined as ! These is for phonon absorption diff --git a/src/exc-ph/EXCPH_load_L.F b/src/exc-ph/EXCPH_load_L.F index fc473f3517..9662a52097 100644 --- a/src/exc-ph/EXCPH_load_L.F +++ b/src/exc-ph/EXCPH_load_L.F @@ -32,7 +32,7 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! use pars, ONLY:lchlen - use BS_solvers, ONLY:io_BSS_diago,BSS_n_eig,BSS_free,BSS_write_eig_2_db,BSS_n_eig + use BS_solvers, ONLY:io_BSS_diago,BS_mat,BSS_n_eig,BSS_free,BSS_write_eig_2_db use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message use R_lattice, ONLY:bz_samp use BS, ONLY:BS_H_dim,BSE_L_kind,BS_res_ares_n_mat,BS_K_dim @@ -112,9 +112,9 @@ subroutine EXCPH_load_L(iq_bse,X,what,Ltype) ! call io_control(ACTION=OP_RD_CL,COM=NONE,SEC=(/2,3/),ID=ID_BS) if(l_read_residuals) then - io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E,bsRr=BS_R_right,bsRl=BS_R_left) + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E,BS_mat=BS_mat,bsRr=BS_R_right,bsRl=BS_R_left) else - io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E) + io_err=io_BSS_diago(iq_bse,1,ID_BS,X,bsE=BS_E,BS_mat=BS_mat) endif if(io_err/=0) call error(" Error loading "//trim(Ltype)//" for q = "//trim(intc(iq_bse))) ! diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 334105a23f..b7598fbc41 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -167,7 +167,8 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! ! Eigenstates (resonant only matrix) ! - if (read_is_on(ID) .or. dump_ev) then + if (read_is_on(ID) .or. dump_ev) then + if (.not.present(BS_mat)) call error(" io_BSS_diago: io of BS_mat without providing it in input") call io_bulk(ID,'BS_EIGENSTATES',VAR_SZ=(/2,BS_H_dim,BSS_n_eig/)) call io_bulk(ID,C2=BS_mat,IPOS=(/1,1,1/)) endif From daf26f57f2c130183b1f4b5b86d8adc90967f25f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 25 Jul 2025 23:51:05 +0200 Subject: [PATCH 1081/1367] Fixed licence --- src/exc-ph/EXCPH_X_phass.F | 20 -------------------- src/exc-ph/EXCPH_X_phass_from_Hpert.F | 20 -------------------- src/exc-ph/EXCPH_ave_sat_DbGrid.F | 18 ------------------ src/exc-ph/EXCPH_double_grid_setup.F | 17 ----------------- src/exc-ph/EXCPH_eval_renorm.F | 20 -------------------- src/exc-ph/EXCPH_eval_sat.F | 17 ----------------- src/exc-ph/EXCPH_gkkp_driver.F | 17 ----------------- src/exc-ph/EXCPH_lifetime.F | 17 ----------------- src/exc-ph/EXCPH_load_L.F | 17 ----------------- src/exc-ph/EXCPH_optics.F | 19 +------------------ 10 files changed, 1 insertion(+), 181 deletions(-) diff --git a/src/exc-ph/EXCPH_X_phass.F b/src/exc-ph/EXCPH_X_phass.F index d5bfdc47ec..a586ca3199 100644 --- a/src/exc-ph/EXCPH_X_phass.F +++ b/src/exc-ph/EXCPH_X_phass.F @@ -8,26 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -! This subroutine is a simple version do not use double-grid -! neigther better integrations at gamma -! !> @brief Calculate X(w) including ph-assisted transitions ! ! @param[in] wv frequencies range diff --git a/src/exc-ph/EXCPH_X_phass_from_Hpert.F b/src/exc-ph/EXCPH_X_phass_from_Hpert.F index f8635cce55..5cc7bfed4d 100644 --- a/src/exc-ph/EXCPH_X_phass_from_Hpert.F +++ b/src/exc-ph/EXCPH_X_phass_from_Hpert.F @@ -8,26 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -! This subroutine is a simple version do not use double-grid -! neigther better integrations at gamma -! !> @brief Calculate PL(w) satellites including ph-assisted transitions ! ! @param[in] wv frequencies range diff --git a/src/exc-ph/EXCPH_ave_sat_DbGrid.F b/src/exc-ph/EXCPH_ave_sat_DbGrid.F index fdbf5b4a6e..751d78a662 100644 --- a/src/exc-ph/EXCPH_ave_sat_DbGrid.F +++ b/src/exc-ph/EXCPH_ave_sat_DbGrid.F @@ -8,24 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -! subroutine EXCPH_ave_sat_DbGrid(iq_bz,q) ! use pars, ONLY:SP,cZERO,rZERO,cI diff --git a/src/exc-ph/EXCPH_double_grid_setup.F b/src/exc-ph/EXCPH_double_grid_setup.F index d0896f8f4f..03a1e0dcb5 100644 --- a/src/exc-ph/EXCPH_double_grid_setup.F +++ b/src/exc-ph/EXCPH_double_grid_setup.F @@ -8,23 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! !> @brief Calculate phonon-assisted absorption and emission (see PRL 122, 187401 ) ! subroutine EXCPH_double_grid_setup(q) diff --git a/src/exc-ph/EXCPH_eval_renorm.F b/src/exc-ph/EXCPH_eval_renorm.F index befc71ddc3..6884be87de 100644 --- a/src/exc-ph/EXCPH_eval_renorm.F +++ b/src/exc-ph/EXCPH_eval_renorm.F @@ -8,25 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -!> @brief This subroutine add the contribution of the iq satellites -! to the renormalization factor R and R_PH_abs ! ! @param[in] iq_bz iq_bz index ! @param[in] q bz sampling @@ -35,7 +16,6 @@ ! @param[out] R_PH_abs renormalization factor for phonon-absorption ! @param[out] R_PL luminescence renormalization factor ! @param[out] R_PL_PH_abs luminescence renormalization factor for phonon-absorption - ! subroutine EXCPH_eval_renorm(iq_bz,q,R,R_PH_abs,R_PL,R_PL_PH_abs) ! diff --git a/src/exc-ph/EXCPH_eval_sat.F b/src/exc-ph/EXCPH_eval_sat.F index 76d4a0ac97..d739d1168a 100644 --- a/src/exc-ph/EXCPH_eval_sat.F +++ b/src/exc-ph/EXCPH_eval_sat.F @@ -8,23 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! ! subroutine EXCPH_eval_sat(iq_bz,q) ! diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index c3669e9830..0ef75bdfb6 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -8,23 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! !> @brief Calculate exciton-phonon matrix elements and satellites renormalizations !! !! @param[in] E quasi-particle index diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index fa4b155995..732a18f63d 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -8,23 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! !> @brief Calculate exciton non-radiative life-time induced by phonon-scattering !! subroutine EXCPH_lifetime(k,q,X) diff --git a/src/exc-ph/EXCPH_load_L.F b/src/exc-ph/EXCPH_load_L.F index 9662a52097..150db6ed92 100644 --- a/src/exc-ph/EXCPH_load_L.F +++ b/src/exc-ph/EXCPH_load_L.F @@ -8,23 +8,6 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! ! --- Theory --- ! (5) Figure out rotations/symmetry of exciton eigenvectors and EPC m.e. ! - FP diff --git a/src/exc-ph/EXCPH_optics.F b/src/exc-ph/EXCPH_optics.F index 97932d11b8..c67fbf8a51 100644 --- a/src/exc-ph/EXCPH_optics.F +++ b/src/exc-ph/EXCPH_optics.F @@ -8,25 +8,8 @@ ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! !> @brief Calculate phonon-assisted absorption and emission (see PRL 122, 187401 ) -!! +! subroutine EXCPH_optics(E,k,q,X,wv) ! use units, ONLY:HA2EV From cb856bab79f9d1ea3ec2a31868b50c8758dede63 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Jul 2025 22:41:53 +0200 Subject: [PATCH 1082/1367] Imported upgraded version of move_include_files --- sbin/developer_tools/move_include_files.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/developer_tools/move_include_files.sh b/sbin/developer_tools/move_include_files.sh index 89dc04da43..d43658e032 100755 --- a/sbin/developer_tools/move_include_files.sh +++ b/sbin/developer_tools/move_include_files.sh @@ -10,6 +10,8 @@ for file in */*/*.F; do if [ "$file" == "src/bse/K_diago_driver.F" ]; then continue; fi if [[ "$file" == *"_incl.F"* ]]; then continue; fi + if grep -q "! headers" "$file"; then continue; fi + echo "Checking file $file" awk ' From fb9334f79d5048192c1f9a2c7f69bbc9cb40b37c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 28 Jul 2025 22:44:02 +0200 Subject: [PATCH 1083/1367] Fixed few non correct y_memory.h headers --- interfaces/a2y/a2y_gkkp.F | 12 ++++++++++-- src/allocations/DIPOLE_ALLOC_elemental.F | 3 +++ src/io/io_EXCPH_SE.F | 8 +++++++- src/io/io_EXCPH_gkkp.F | 8 +++++++- src/wf_and_fft/WF_symm_kpoint_g.F | 3 +++ ypp/el-ph/ELPH_load_indexes.F | 8 +++++++- ypp/el-ph/ELPH_sngl_db.F | 8 +++++++- 7 files changed, 44 insertions(+), 6 deletions(-) diff --git a/interfaces/a2y/a2y_gkkp.F b/interfaces/a2y/a2y_gkkp.F index fe74404c2d..884d4ea8bd 100644 --- a/interfaces/a2y/a2y_gkkp.F +++ b/interfaces/a2y/a2y_gkkp.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): DS +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -35,7 +39,9 @@ subroutine a2y_gkkp_header(i_sp_pol,ncid,grpid) & elph_nQ,elph_nk_bz,elph_grids_are_expanded,elph_use_q_grid,& & PH_qpt,PH_kpt_bz,GKKP,PH_freqs_sq ! -#include + use y_memory_alloc + ! + implicit none ! integer, intent(in) :: i_sp_pol,ncid integer, intent(out) :: grpid @@ -258,7 +264,9 @@ subroutine a2y_gkkp(iq,i_sp_pol,ncid,grpid) use pars, ONLY: DP,SP use elph, ONLY: GKKP,elph_nb,ph_modes,elph_nQ,elph_nk_bz,PH_pol_vector ! -#include + use y_memory_alloc + ! + implicit none ! integer, intent(in) :: iq,i_sp_pol,ncid,grpid ! diff --git a/src/allocations/DIPOLE_ALLOC_elemental.F b/src/allocations/DIPOLE_ALLOC_elemental.F index c465aa13d4..48b071a77d 100644 --- a/src/allocations/DIPOLE_ALLOC_elemental.F +++ b/src/allocations/DIPOLE_ALLOC_elemental.F @@ -5,9 +5,12 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! #include #include ! +! subroutine DIPOLE_ALLOC_elemental(what,d) ! use DIPOLES, ONLY:DIP_iR,DIP_v,DIP_P,DIP_orbital,DIP_spin,DIP_P_spinor,P_square,DIP_S,& diff --git a/src/io/io_EXCPH_SE.F b/src/io/io_EXCPH_SE.F index 27f8b1e921..038674360a 100644 --- a/src/io/io_EXCPH_SE.F +++ b/src/io/io_EXCPH_SE.F @@ -4,6 +4,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or ! modify it under the terms of the GNU General Public @@ -34,7 +38,9 @@ integer function io_EXCPH_SE(ID,what) use stderr, ONLY:intc use R_lattice, ONLY:nqibz use timing_m, ONLY:timing -#include + use y_memory_alloc + ! + implicit none ! integer ::ID character(*) ::what diff --git a/src/io/io_EXCPH_gkkp.F b/src/io/io_EXCPH_gkkp.F index 6aec7dac10..2928fc5b2f 100644 --- a/src/io/io_EXCPH_gkkp.F +++ b/src/io/io_EXCPH_gkkp.F @@ -4,6 +4,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or ! modify it under the terms of the GNU General Public @@ -36,7 +40,9 @@ integer function io_EXCPH_gkkp(ID) use R_lattice, ONLY:nqbz use timing_m, ONLY:timing ! -#include + use y_memory_alloc + ! + implicit none ! integer ::ID ! diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index a5d3050598..db3bb12386 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -5,8 +5,11 @@ ! ! Authors (see AUTHORS file for details): MG CA DS AF ! +! headers +! #include ! +! subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) ! use pars, ONLY:SP,cZERO diff --git a/ypp/el-ph/ELPH_load_indexes.F b/ypp/el-ph/ELPH_load_indexes.F index 42b64fb8da..771ecc8e9b 100644 --- a/ypp/el-ph/ELPH_load_indexes.F +++ b/ypp/el-ph/ELPH_load_indexes.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): AM DS +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -35,7 +39,9 @@ subroutine ELPH_load_indexes(k,E,q,qindx_ID,qindx_ID_frag) use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL use parallel_int, ONLY:PARALLEL_global_indexes ! -#include + use y_memory_alloc + ! + implicit none ! type(bz_samp) ::k,q type(levels) ::E diff --git a/ypp/el-ph/ELPH_sngl_db.F b/ypp/el-ph/ELPH_sngl_db.F index 56e79d4268..ce13ef83da 100644 --- a/ypp/el-ph/ELPH_sngl_db.F +++ b/ypp/el-ph/ELPH_sngl_db.F @@ -3,6 +3,10 @@ ! http://www.yambo-code.org ! ! Authors (see AUTHORS file for details): AM +! +! headers +! +#include ! ! This file is distributed under the terms of the GNU ! General Public License. You can redistribute it and/or @@ -41,7 +45,9 @@ subroutine ELPH_sngl_db(k,E,q) use IO_m, ONLY:REP,OP_WR_CL,VERIFY,OP_APP_CL,OP_RD_CL use IO_int, ONLY:io_control ! -#include + use y_memory_alloc + ! + implicit none ! type(bz_samp) :: k,q type(levels) :: E From ff420325b3eef6e69abdab20a9e7f2ce3c7fa6c4 Mon Sep 17 00:00:00 2001 From: Myrta Gruening <3047912@login4.pri.kelvin2.alces.network> Date: Tue, 29 Jul 2025 11:02:29 +0100 Subject: [PATCH 1084/1367] Version 5.3.0, Revision 24928, Hash fb7d6eed7 MODIFIED * interface/INIT_activate.F interface/INIT_load.F io/io_RT_components_TIME_points.F modules/SET_defaults.F modules/mod_RT_control.F nloptics/NL_initialize.F real_time_control/RT_databases_IO.F Bugs: - Additions: - Changes: 1. the save of the wfs for Floquet analysis is regulated by FloquetOrder integer rather than SaveFloquet logical. The integer is set to -1 by default. Inputting a value larger than 0 activate the save of the wfs. Note that FloquetOrder is limited to 5. 2. the Floquet_order variable is written in ndb.RT_V_bands. 3. Rather than time points for the last 3 periods, only one period (+ first 7 last time steps) is stored - --- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 5 +++-- src/io/io_RT_components_TIME_points.F | 5 ++++- src/modules/SET_defaults.F | 5 +++-- src/modules/mod_RT_control.F | 3 ++- src/nloptics/NL_initialize.F | 12 ++++++++---- src/real_time_control/RT_databases_IO.F | 10 +++++----- 7 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index aed1456881..6d3b2b82ff 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -565,7 +565,7 @@ subroutine INIT_activate() call initactivate(1,'FFTGvecs NLBands NLHoleBands NLElecBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') call initactivate(1,'TestOSCLL UseSymm VelGaugeNoDiam') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng') - if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory SaveVbfloquet') + if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory FLOrder') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL COLLCut EvalCurrent InducedField') call initactivate(1,'TestOSCLL Gauge RADLifeTime HARRLvcs EXXRLvcs CORRLvcs') call init_QP_ctl_switch('G') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 5d7a8a2a16..a2a00394c9 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -63,7 +63,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & SC_neq_kind,SC_mu,SC_last_coh_it #endif #if defined _RT - use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t, & + use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t,Floquet_order,& & CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t,Vbands_RT_IO_t use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem use RT_lifetimes, ONLY:RT_life_extrap_times_INPUT @@ -560,7 +560,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & verb_level=V_nl_optics) call it('f',defs,'EvalCurrent','[NL] Evaluate the current') call it('f',defs,'SaveVbhistory', '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics) - call it('f',defs,'SaveVbfloquet', '[RT] Save wave-functions for Floquet Analysis',Verb_level=V_nl_optics) + call it(defs,'FLOrder', '[NL] Fourier Order of Floquet Analysis',Floquet_order, Verb_level=V_nl_optics) +! call it('f',defs,'SaveVbfloquet', '[RT] Save wave-functions for Floquet Analysis',Verb_level=V_nl_optics) ! #endif ! diff --git a/src/io/io_RT_components_TIME_points.F b/src/io/io_RT_components_TIME_points.F index 3527ac0a23..fdc38f6367 100644 --- a/src/io/io_RT_components_TIME_points.F +++ b/src/io/io_RT_components_TIME_points.F @@ -15,7 +15,7 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti use drivers, ONLY:l_real_time use units, ONLY:AUT2FS use RT_output_m, ONLY:RT_desc - use RT_control, ONLY:RT_IO_t,RT_do_IO + use RT_control, ONLY:RT_IO_t,RT_do_IO,Floquet_order use netcdf, ONLY:NF90_UNLIMITED use real_time, ONLY:MEM_pointer,G_MEM_steps,NE_i_time,i_MEM_now,i_MEM_prev,i_MEM_old,& & RT_dyn_step,RT_step @@ -45,6 +45,9 @@ subroutine io_RT_components_TIME_points(ID,VAR_SZ,load_RESTART_info,UNLIMITED_ti & DESCRIPTOR=RT_desc,UNIT=AUT2FS) endif ! + call def_variable_elemental(ID,"IO_Floquet_order",1,IP_YIO,0) + call io_variable_elemental(ID,I0=Floquet_order) + ! call def_variable_elemental(ID,"IO_TIME_steps_last_nsteps",3,IP_YIO,0) call io_variable_elemental(ID,I0=TYP%INTERVAL_steps) call io_variable_elemental(ID,I0=TYP%last_point) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 291ef2ff68..a3e9377967 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -87,7 +87,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & RT_headings,YPP_append,Gr_desc,TIME_STEP_desc,RT_desc use RT_control, ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t,SAVE_G_history,RT_ctl_db,& & Vbands_RT_IO_t,CACHE_OBS_last_point,CACHE_OBS_INTERVAL_time,CACHE_OBS_INTERVAL_time_INPUT, & -& CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history, SAVE_Vb_floquet +& CACHE_OBS_steps,CACHE_OBS_steps_now,RT_NAN_found,SAVE_Vb_history, SAVE_Vb_floquet, Floquet_order use RT_lifetimes,ONLY:RT_life_extrap_times use real_time, ONLY:RT_step,NE_steps,NE_time,Integrator_name,RT_deph_range,& & Gr_kind,two_alpha,RAD_LifeTime,Phase_LifeTime,RT_elec_bands,RT_hole_bands,& @@ -681,7 +681,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) Vbands_RT_IO_t%INTERVAL_time_INPUT =5.0_SP*FS2AUT SAVE_G_history=.FALSE. SAVE_Vb_history=.FALSE. - SAVE_Vb_floquet=.FALSE. + SAVE_Vb_floquet=.FALSE. ! this default setting may not be needed as I defined Floquet order + Floquet_order = -1 RT_NAN_found =.FALSE. ! ! RT_output diff --git a/src/modules/mod_RT_control.F b/src/modules/mod_RT_control.F index bfeed1636f..7667ca5b4f 100644 --- a/src/modules/mod_RT_control.F +++ b/src/modules/mod_RT_control.F @@ -72,7 +72,8 @@ module RT_control logical :: SAVE_G_history logical :: SAVE_Vb_history logical :: SAVE_Vb_floquet - real(SP) :: Vbands_IO_starttime + integer :: Floquet_order + integer :: Vbands_IO_time(2) ! ! J, P and M (spin) cache ! diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index feebc540e4..d6f1bddbc4 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -32,7 +32,7 @@ subroutine NL_initialize(E,k) & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now use RT_control, ONLY:OBS_RT_IO_t, NE_i_start_time, RT_control_alloc,RT_control_free,l_NE_with_fields,Vbands_RT_IO_t,& -& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet, Vbands_IO_starttime +& SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet, Vbands_IO_time, Floquet_order use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& @@ -66,7 +66,7 @@ subroutine NL_initialize(E,k) call parser('NoComprCOLL', l_no_compress_COLL) call parser('UseSymm', l_res_symms) call parser('SaveVbhistory', SAVE_Vb_history) - call parser('SaveVbfloquet', SAVE_Vb_floquet) + !call parser('SaveVbfloquet', SAVE_Vb_floquet) call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) call parser('UseDipoles', l_use_DIPOLES) call parser('SaveGhistory', SAVE_G_history) @@ -83,6 +83,9 @@ subroutine NL_initialize(E,k) ! if(l_use_DIPOLES) call warning(' Fixed dipoles: only linear response properties are correct!') ! + Floquet_order = min(5,Floquet_order) + SAVE_Vb_floquet = (Floquet_order > 0) + ! ! Velocity gauge mode ! ======================================= l_velocity_IPA=.FALSE. @@ -298,8 +301,9 @@ subroutine NL_initialize(E,k) ! if (SAVE_Vb_floquet) then Sampling_Time = 4._SP*EtoT(E=W_0)+5._SP*RT_step - Vbands_IO_starttime = int(NE_tot_time/RT_step) - Vbands_RT_IO_t%INTERVAL_time_INPUT = (2._SP*pi/W_0)/10._SP + Vbands_RT_IO_t%INTERVAL_time_INPUT = (2._SP*pi/W_0)/(2._SP*Floquet_order + 1._SP) + Vbands_IO_time(1) = int(NE_tot_time/RT_step) + Vbands_IO_time(2) = int((NE_tot_time+2._SP*pi/W_0)/RT_step) endif ! NE_tot_time=NE_tot_time+Sampling_Time diff --git a/src/real_time_control/RT_databases_IO.F b/src/real_time_control/RT_databases_IO.F index b8803150bd..0a938cbac4 100644 --- a/src/real_time_control/RT_databases_IO.F +++ b/src/real_time_control/RT_databases_IO.F @@ -11,7 +11,7 @@ subroutine RT_databases_IO(E,DO_IT) use RT_control, ONLY:RT_carriers_object,J_cache,P_cache,Ms_cache,Ml_cache,A_cache,OBS_RT_IO_t,Vbands_RT_IO_t,& & Gless_RESTART_RT_IO_t,CARR_RT_IO_t,CACHE_OBS_steps_now,CACHE_OBS_steps, & & SAVE_G_history,NE_i_start_time,CACHE_OBS_last_point,Gless_RT_IO_t,RT_DB_ID,& -& RT_return_db_ID,RT_DB_name,SAVE_Vb_history, SAVE_Vb_floquet, Vbands_IO_starttime +& RT_return_db_ID,RT_DB_name,SAVE_Vb_history, SAVE_Vb_floquet, Vbands_IO_time #if defined _ELPH_ITERATIVE use RT_lifetimes, ONLY:l_RT_iterative_ELPH_lifetimes #endif @@ -43,7 +43,7 @@ subroutine RT_databases_IO(E,DO_IT) ! integer :: i_mem,io_OBS,io_carr,IO_ACT,i_time,i_db integer, external :: io_RT_components - logical, external :: RT_do_it + logical, external :: RT_do_it,RT_Dynamics_is_over ! ! ... G_lesser ! @@ -278,9 +278,9 @@ subroutine RT_databases_IO(E,DO_IT) ! Start_sampling = .true. if (SAVE_Vb_floquet) then - if (NE_i_time < Vbands_IO_starttime) Start_sampling = .false. - if (NE_i_time==NE_i_start_time) Start_sampling = .true. - if (NE_i_time == Vbands_IO_starttime) Vbands_RT_IO_t%last_point = Vbands_IO_starttime - Vbands_RT_IO_t%INTERVAL_steps + if (NE_i_time < Vbands_IO_time(1).or.NE_i_time > Vbands_IO_time(2)) Start_sampling = .false. + if (NE_i_time==NE_i_start_time.or.RT_Dynamics_is_over()) Start_sampling = .true. + if (NE_i_time == Vbands_IO_time(1)) Vbands_RT_IO_t%last_point = Vbands_IO_time(1) - Vbands_RT_IO_t%INTERVAL_steps endif ! if ((RT_do_it('Vb').or.DO_IT) .and.Start_sampling) then From 28cf45d47c868764515b826f52b78c9b141d6784 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 29 Jul 2025 22:46:28 +0200 Subject: [PATCH 1085/1367] Fixed activation of developers options in BSE --- src/bse/K_driver_init.F | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 47bbd85448..ec17977994 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -142,13 +142,6 @@ subroutine K_driver_init(what,iq,Ken,Xk) #if defined _RT if (l_rt_carriers_in_use) BS_K_anti_resonant=.TRUE. #endif - ! - ! Is ARES derivable from RES? - !----------------------------- - ! Developer options. Without the code works in default mode - ! With the user can switch to experimental coding - call parser('ImposeFullBSE',l_BSE_kernel_full) - call parser('ImposeAsymBSE',l_flag) ! In the resonat only case l_BSE_ares_from_res=.true. ! This is needed to switch off all the lines related to the excplicit calculation of the ARES part @@ -161,6 +154,13 @@ subroutine K_driver_init(what,iq,Ken,Xk) call parser('SelectResFromF',l_flag) if (l_flag) l_BS_res_from_E=.FALSE. ! + ! Is ARES derivable from RES? + !----------------------------- + ! Developer options. Without the code works in default mode + ! With the user can switch to experimental coding + call parser('ImposeFullBSE',l_BSE_kernel_full) + call parser('ImposeAsymBSE',l_flag) + ! ! In all other cases the code checks what to do if (.not.trim(BSE_mode)=="resonant") then if (l_flag) l_BS_ares_from_res=.FALSE. From e9d8c607b24d1920d79d68d5403d47062f1c7d46 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 29 Jul 2025 23:13:26 +0200 Subject: [PATCH 1086/1367] Adapted DIPOLES_setup to BSE dev flags --- src/dipoles/DIPOLE_setup.F | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index d4d487db62..0e84ec256b 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -25,6 +25,7 @@ subroutine DIPOLE_setup(Dip) ! ! Work Space ! + logical :: l_flag #if defined _NL logical :: l_dip_appr_from_user #endif @@ -45,10 +46,11 @@ subroutine DIPOLE_setup(Dip) l_BS_magnons= (index(BSE_prop,'magn')/=0) l_BS_dichroism= (index(BSE_prop,'dich')/=0) l_BS_photolum= (index(BSE_prop,'photolum')/=0) + call parser('ImposeAsymBSE',l_flag) ! ! Bands ordering !---------------- - if (l_BS_dichroism.or.l_BS_magnons .or. l_BS_photolum) Dip%bands_ordered=.false. + if (l_BS_dichroism.or.l_BS_magnons .or. l_BS_photolum .or. l_flag) Dip%bands_ordered=.false. #if defined _SLEPC && !defined _NL !if ( index(BSS_mode,'s')/=0 ) Dip%bands_ordered=.false. #endif From 81e578a0c2b0567c4c6836ae02da607459615b27 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 30 Jul 2025 10:25:20 +0200 Subject: [PATCH 1087/1367] working on issue #215 --- src/bse/BSE_utilities.F | 1 + src/bse/K_IP.F | 2 + src/bse/K_blocks.F | 28 ++++++++---- .../K_components_folded_in_serial_arrays.F | 23 +++++----- src/bse/K_driver.F | 2 +- src/bse/K_driver_init.F | 19 +++++--- src/bse/K_kernel.F | 44 ++++++++++++------- src/io_parallel/io_BS_PAR_init.F | 8 +++- src/modules/mod_BS.F | 12 ++--- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 3 ++ 10 files changed, 89 insertions(+), 53 deletions(-) diff --git a/src/bse/BSE_utilities.F b/src/bse/BSE_utilities.F index 7e877f2af5..57d4aba822 100644 --- a/src/bse/BSE_utilities.F +++ b/src/bse/BSE_utilities.F @@ -92,6 +92,7 @@ subroutine TDDFT_oscillators_alloc_L(iGL) ! implicit none integer, intent(in) :: iGL + ! if (BS_T_grp(iGL)%size>0) then !DEV_ACC enter data copyin(BS_T_grp(iGL)) YAMBO_ALLOC(BS_T_grp(iGL)%O_tddft_L,(BS_n_g_fxc,BS_T_grp(iGL)%size,n_spinor,n_spinor)) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 5db045fb04..3551ca8ef7 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -128,6 +128,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! i_res_ares=BS_T_grp(i_T_g)%i_res_ares ! + if (l_BS_ares_from_res .and. i_res_ares==2) cycle + ! do i_T=1,BS_T_grp(i_T_g)%size ! i_sort =sum(BS_T_grp(BS_T_grp(i_T_g)%i_T_ref:i_T_g-1)%size)+i_T diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index 8d8c40cd4c..da0252320b 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -10,7 +10,7 @@ #include #include ! -subroutine K_blocks( ) +subroutine K_blocks(iq) ! ! Create and Fill the BSK blocks ! @@ -36,13 +36,15 @@ subroutine K_blocks( ) ! implicit none ! + integer, intent(in) :: iq + ! complex(SP), allocatable :: BS_MAT(:) ! ! Work Space ! integer(IPL) :: HOST_SIZE(1),TMP_SIZE,LOCAL_SIZE(1) integer :: i_T,j_T,i_T_start,j_T_start,i_block,diag_size,iB - integer :: i_res_ares,j_res_ares,n_new_blocks,n_BS_blks_CPUs(ncpu) + integer :: i_res_ares,j_res_ares,n_blocks_per_grp,n_BS_blks_CPUs(ncpu) integer(IPL) :: local_steps real(SP) :: N_Ts_total,N_Ts_local ! @@ -50,8 +52,8 @@ subroutine K_blocks( ) ! and the anti-res block can be derived from the res. In this case ! only the resonant transitions are included and we need for each pair 2 blocks ! - n_new_blocks=1 - if (BS_K_coupling.and.l_BS_ares_from_res) n_new_blocks=2 + n_blocks_per_grp=1 + if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) n_blocks_per_grp=2 ! ! Count the blocks n_BS_blks=0 @@ -60,10 +62,15 @@ subroutine K_blocks( ) ! i_res_ares=BS_T_grp(i_T)%i_res_ares j_res_ares=BS_T_grp(j_T)%i_res_ares + ! + ! Without coupling only R (and A if not l_BS_ares_from_res) are computed if((.not.BS_K_coupling) .and. i_res_ares/=j_res_ares) cycle ! + ! With coupling and l_BS_ares_from_res only A and C are computed + if (l_BS_ares_from_res.and.i_res_ares>1) cycle + ! if (.not.PAR_IND_T_ordered%element_2D(i_T,j_T)) cycle - n_BS_blks=n_BS_blks+n_new_blocks + n_BS_blks=n_BS_blks+n_blocks_per_grp ! enddo enddo @@ -85,18 +92,23 @@ subroutine K_blocks( ) ! i_res_ares=BS_T_grp(i_T)%i_res_ares j_res_ares=BS_T_grp(j_T)%i_res_ares + ! + ! Without coupling only R (and A if not l_BS_ares_from_res) are computed if((.not.BS_K_coupling) .and. i_res_ares/=j_res_ares) cycle ! + ! With l_BS_ares_from_res only R (and C if coupling) are computed + if (l_BS_ares_from_res.and.i_res_ares>1) cycle + ! i_T_start=BS_T_grp(i_T)%i_T_ref j_T_start=BS_T_grp(j_T)%i_T_ref ! if (.not.PAR_IND_T_ordered%element_2D(i_T,j_T)) cycle ! - do i_block=1,n_new_blocks + do i_block=1,n_blocks_per_grp iB = n_BS_blks + i_block BS_blk(iB)%size=(/BS_T_grp(i_T)%size,BS_T_grp(j_T)%size/) TMP_SIZE=TMP_SIZE+int(BS_T_grp(i_T)%size*BS_T_grp(j_T)%size,IPL) - if (l_BS_ares_from_res) then + if (l_BS_ares_from_res.and.BS_n_eh_spaces==1) then if (i_block==1) BS_blk(iB)%mode="R" if (i_block==2) BS_blk(iB)%mode="C" else @@ -121,7 +133,7 @@ subroutine K_blocks( ) BS_blk(iB)%coordinate=(/sum(BS_T_grp(i_T_start:i_T-1)%size)+1,sum(BS_T_grp(j_T_start:j_T-1)%size)+1/) enddo ! - n_BS_blks=n_BS_blks+n_new_blocks + n_BS_blks=n_BS_blks+n_blocks_per_grp ! enddo enddo diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index e1fbcfa528..51cd59a30f 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -18,7 +18,7 @@ subroutine K_components_folded_in_serial_arrays(iq) & BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& & BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BS_dip_size,BS_H_dim +& BS_dip_size,BS_H_dim,l_BS_ares_from_res use timing_m, ONLY:timing use LIVE_t, ONLY:live_timing use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc @@ -33,7 +33,7 @@ subroutine K_components_folded_in_serial_arrays(iq) ! Work Space ! integer :: i_Tr,H_pos,i_g,i_g_start,i_k_bz,i_v,i_c,i_sp_c,i_sp_v,& -& BS_n_eh_spaces_solver,i_res_ares,i_res_ares_solver,ares_fac +& n_blocks_per_grp,i_res_ares,i_res_ares_solver,ares_fac ! !======================== ! BSS COMPONENTS SECTION @@ -53,8 +53,11 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) ! - BS_n_eh_spaces_solver=1 - if(BS_n_eh_spaces==1.and.BS_K_coupling) BS_n_eh_spaces_solver=2 + ! In the coulping case at q=1 when there are 2 blocks per group + ! See also src/bse/K_blocks.F + ! + n_blocks_per_grp=1 + if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) n_blocks_per_grp=2 ! ! FILLING BSS_eh_* and BSS_dipoles !================================== @@ -65,7 +68,7 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle ! - if(BS_n_eh_spaces==2) then + if(n_blocks_per_grp==1) then i_res_ares=BS_T_grp(i_g)%i_res_ares i_g_start =BS_T_grp(i_g)%i_T_ref endif @@ -78,12 +81,7 @@ subroutine K_components_folded_in_serial_arrays(iq) i_sp_c=BS_T_grp(i_g)%table(i_Tr,4) i_sp_v=BS_T_grp(i_g)%table(i_Tr,5) ! - ! This loop is for the case - ! R/A symm RES/RET/CPL BSS_f/BSS_E/BSS_dip res_ares_dim BS_mats_to_solve BS_mat_size - ! S CPL BS_H_dim 1 1 BS_H_dim - ! where the antiresonant transitions are not in the groups - ! - do i_res_ares_solver=1,BS_n_eh_spaces_solver + do i_res_ares_solver=1,n_blocks_per_grp ! H_pos=sum(BS_T_grp(i_g_start:I_g-1)%size)+i_Tr+(max(i_res_ares_solver,i_res_ares)-1)*BS_K_dim(1) ares_fac=(-1)**(i_res_ares_solver-1) @@ -91,12 +89,11 @@ subroutine K_components_folded_in_serial_arrays(iq) BSS_eh_table(H_pos,:)=(/i_k_bz,i_v,i_c,i_sp_c,i_sp_v/) ! BSS_eh_E(H_pos)=BS_T_grp(i_g)%E(i_Tr,1)*ares_fac - !write(*,*) 'BS_T_grp(i_g)%f(i_Tr)', BS_T_grp(i_g)%f(i_Tr), i_g, i_Tr BSS_eh_f(H_pos)=BS_T_grp(i_g)%f(i_Tr)*ares_fac BSS_eh_f_RES(H_pos)=BS_T_grp(i_g)%f_RES(i_Tr)*ares_fac if (l_BS_photolum) then BSS_PL_f(H_pos,i_res_ares_solver)=BS_T_grp(i_g)%f_PL(i_Tr,i_res_ares_solver) - if (BS_n_eh_spaces==1.and.BS_n_eh_spaces_solver==1) & + if (BS_n_eh_spaces==1.and.n_blocks_per_grp==1) & & BSS_PL_f(H_pos,2)=BS_T_grp(i_g)%f_PL(i_Tr,2) endif ! diff --git a/src/bse/K_driver.F b/src/bse/K_driver.F index e94c155c4f..f7bbd7325a 100644 --- a/src/bse/K_driver.F +++ b/src/bse/K_driver.F @@ -197,7 +197,7 @@ subroutine K_driver(Xen,Ken,Xk,q,X_static_pp,Xw,Dip) call K_Transitions_setup(iq,Ken,Xk,Dip,VB,CB) ! !... Blocks build-up - if (.not.l_rpa_IP) call K_blocks() + if (.not.l_rpa_IP) call K_blocks(iq) ! ! Wave Functions distribution !============================= diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 47bbd85448..2b362965b1 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -142,13 +142,6 @@ subroutine K_driver_init(what,iq,Ken,Xk) #if defined _RT if (l_rt_carriers_in_use) BS_K_anti_resonant=.TRUE. #endif - ! - ! Is ARES derivable from RES? - !----------------------------- - ! Developer options. Without the code works in default mode - ! With the user can switch to experimental coding - call parser('ImposeFullBSE',l_BSE_kernel_full) - call parser('ImposeAsymBSE',l_flag) ! In the resonat only case l_BSE_ares_from_res=.true. ! This is needed to switch off all the lines related to the excplicit calculation of the ARES part @@ -161,6 +154,13 @@ subroutine K_driver_init(what,iq,Ken,Xk) call parser('SelectResFromF',l_flag) if (l_flag) l_BS_res_from_E=.FALSE. ! + ! Is ARES derivable from RES? + !----------------------------- + ! Developer options. Without the code works in default mode + ! With the user can switch to experimental coding + call parser('ImposeFullBSE',l_BSE_kernel_full) + call parser('ImposeAsymBSE',l_flag) + ! ! In all other cases the code checks what to do if (.not.trim(BSE_mode)=="resonant") then if (l_flag) l_BS_ares_from_res=.FALSE. @@ -176,6 +176,9 @@ subroutine K_driver_init(what,iq,Ken,Xk) if (.not.BS_K_coupling) BS_res_ares_n_mat=2 endif ! + ! In this case the anti-resonant space is used to build the coupling matrix + if (BS_K_coupling.and.iq/=1) BS_n_eh_spaces=2 + ! if (what=="loop-init") return ! ! BSE_L_kind check @@ -285,6 +288,8 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! call parser('BSS_FKE',BSS_uses_FKE) ! + ! I/O structure + !=============== BSS_kernel_IO_on_the_fly=index(BSK_IO_mode,"read_on_the_fly")>0 .and. (index(BSS_mode,'h')/=0 .or. index(BSS_mode,'s')/=0) if (BSS_kernel_IO_on_the_fly) then call STRING_split(BSK_IO_mode,BSK_IO_strings,n_non_empty_strings=BSK_IO_n_strings) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index eacef5961d..7a05a8d09f 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -35,12 +35,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,BS_ID,& & BS_res_K_exchange,BS_Block_size,l_BSE_kernel_full,BS_n_g_W,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& -& BS_K_dim,BS_K_is_ALDA,BS_cpl_K_exchange,& +& BS_K_dim,BS_K_is_ALDA,BS_K_coupling,BS_cpl_K_exchange,& & BS_cpl_K_corr,K_EXCH_collision,K_CORR_collision,& & WF_phase,n_BS_blks,BS_blk,BS_T_grp,BSK_IO_mode,BSK_IO_sum_value,& -& BS_nT_grps,l_BS_ares_from_res,BS_K_has_been_calculated_loaded,& +& BS_nT_grps,BS_n_eh_spaces,BS_K_has_been_calculated_loaded,& & l_BSE_minimize_memory,l_BSE_restart,l_BSE_kernel_complete,& -& BS_perturbative_SOC,BS_K_cutoff,BS_max_val,l_BS_magnons +& BS_perturbative_SOC,BS_K_cutoff,BS_max_val,l_BS_magnons,& +& l_BS_ares_from_res use collision_el, ONLY:elemental_collision_free use IO_int, ONLY:io_control use IO_m, ONLY:REP,OP_WR,RD,WR,WR_CL,OP_APP,io_BS_K,deliver_IO_error_message @@ -472,8 +473,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) block_loop:& do i_block=1,n_BS_blks ! + ! BS_blk(i_block)%mode can have 4 values: "R", "C", "A", "Q" + ! However modes "A" and "Q" are expliciltly needed only when l_BS_ares_from_res=.false. + ! In such case the present subroutine switches to moden_now="F" mode_now=BS_blk(i_block)%mode - if (.not.l_BS_ares_from_res) mode_now="F" + if (BS_n_eh_spaces==2) mode_now="F" ! if (iHxc==1) l_write_kernel=.not.(BS_K_is_ALDA.or.l_bs_corr) if (iHxc==2) l_write_kernel=.not. l_bs_corr @@ -591,13 +595,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (BS_blk(i_block)%done(i_Tk,i_Tp)=="t".and.l_BSE_restart) cycle ! ! H_pos defines the position inside the full bse matrix when - ! l_BS_ares_from_res=.false. Otherwise it defines the position - ! inside the R/C blocks + ! l_BS_ares_from_res. Otherwise it defines the position inside the R/C blocks ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& - & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& - & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk + H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp + ! + if (.not.l_BS_ares_from_res) then + H_pos(1) = H_pos(1)+(BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) + H_pos(2) = H_pos(2)+(BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + endif ! ! When l_BS_ares_from_res=.false., the full coupling block, and ! the upper part of the anti-resonant blocks are also computed @@ -723,7 +729,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! select case (mode_now) ! - case ("R","A","F") + case ("R","F") ! ! :::RESONANT/ANTI-RESONANT TERM::: !=================================== @@ -753,11 +759,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) & BS_n_g_W,O1,O2,O_times_W) endif ! - case ("C","Q") + case ("C") ! ! :::COUPLING TERM::: !============================= ! + ! This implementation is used only at iq=1 when l_BS_ares_from_res=.true. + ! It uses only hald of the BS_T_grps, saving memory & cpu time for the oscillators + ! Otherwise the exchange and tddft implementation are not corret + ! The correlation imlpementation instead should be correct (since iv,ic + ! indexes are properly inverted). + ! ! Exchange if (iHxc==1) H_x=K_exchange_kernel_coupling(iq, BS_n_g_exch, & & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) @@ -810,12 +822,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) i_p_sp_pol_v=BS_T_grp(i_Tgrp_p)%table(i_Tp,5) if (H_pos(1)==H_pos(2)) then - BS_blk(i_block)%table(:,i_Tk)=BS_T_grp(i_Tgrp_k)%table(i_Tk,:) - BS_blk(i_block)%E(i_Tk) =BS_T_grp(i_Tgrp_k)%E(i_Tk,1) + BS_blk(i_block)%table(:,i_Tp)=BS_T_grp(i_Tgrp_p)%table(i_Tp,:) + BS_blk(i_block)%E(i_Tp) =BS_T_grp(i_Tgrp_p)%E(i_Tp,1) if (mode_now=="C") then ! Swap c and v - BS_blk(i_block)%table(2,i_Tk)=BS_T_grp(i_Tgrp_k)%table(i_Tk,3) - BS_blk(i_block)%table(3,i_Tk)=BS_T_grp(i_Tgrp_k)%table(i_Tk,2) + BS_blk(i_block)%table(2,i_Tp)=BS_T_grp(i_Tgrp_p)%table(i_Tp,3) + BS_blk(i_block)%table(3,i_Tp)=BS_T_grp(i_Tgrp_p)%table(i_Tp,2) endif endif ! diff --git a/src/io_parallel/io_BS_PAR_init.F b/src/io_parallel/io_BS_PAR_init.F index 1ab13123c3..71736093d2 100644 --- a/src/io_parallel/io_BS_PAR_init.F +++ b/src/io_parallel/io_BS_PAR_init.F @@ -139,15 +139,19 @@ integer function io_BS_PAR_init(iq,ID,mode) BSK_n_dims=2 n_replica=1 ! + ! Resonant block dim_names(2:3,1) = [character(schlen) :: 'BS_K_dim', 'BS_K_dim'] BS_IO_dim(:,1) = (/BS_K_dim(1),BS_K_dim(1)/) ! - if(BS_n_eh_spaces==2) then + if(.not.l_BS_ares_from_res) then + ! Coupling block dim_names(2:3,2) = [character(schlen) :: 'BS_K_dim', 'BS_K_dim_A'] BS_IO_dim(:,2) = (/BS_K_dim(1),BS_K_dim(2)/) + ! Anti-resonant block dim_names(2:3,3) = [character(schlen) :: 'BS_K_dim_A', 'BS_K_dim_A'] BS_IO_dim(:,3) = (/BS_K_dim(2),BS_K_dim(2)/) else if (BS_K_coupling) then + ! Coupling block dim_names(2:3,2) = [character(schlen) :: 'BS_K_dim', 'BS_K_dim'] BS_IO_dim(:,2) = (/BS_K_dim(1),BS_K_dim(1)/) endif @@ -157,7 +161,7 @@ integer function io_BS_PAR_init(iq,ID,mode) chunksize(3) = YAMBO_DEF_CHUNK ! If BSE matrix is Date: Wed, 30 Jul 2025 16:23:54 +0200 Subject: [PATCH 1088/1367] This finally fixes issue #215 --- src/bse/K_exchange_kernel.F | 4 +-- src/bse/K_kernel.F | 25 +++++++++++++------ src/dipoles/DIPOLE_setup.F | 1 + .../TDDFT_ALDA_eh_space_G_collisions_L.F | 9 ------- .../TDDFT_ALDA_eh_space_G_collisions_R.F | 12 --------- src/tddft/TDDFT_ALDA_eh_space_G_kernel.F | 22 ++++++++-------- 6 files changed, 31 insertions(+), 42 deletions(-) diff --git a/src/bse/K_exchange_kernel.F b/src/bse/K_exchange_kernel.F index 626381412a..8517bd400f 100644 --- a/src/bse/K_exchange_kernel.F +++ b/src/bse/K_exchange_kernel.F @@ -10,7 +10,7 @@ #include ! ! -function K_exchange_kernel_resonant(iq, BS_n_g_exch, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) +function K_exchange_kernel(iq, BS_n_g_exch, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) !============================== ! ! :::EXCHANGE (resonant)::: @@ -65,7 +65,7 @@ function K_exchange_kernel_resonant(iq, BS_n_g_exch, BS_T_grp_ip, i_Tp, BS_T_grp BS_T_grp_ik%O_x(:,i_Tk)/bare_qpg(iq,:BS_n_g_exch)**2) #endif ! -end function K_exchange_kernel_resonant +end function K_exchange_kernel ! ! ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 7a05a8d09f..39bae14f05 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -97,8 +97,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), allocatable DEV_ATTR :: O1(:),O2(:),O_times_W(:) ! complex(SP), external :: K_correlation_kernel_std,K_correlation_kernel_dir - complex(SP), external :: TDDFT_ALDA_eh_space_G_kernel_resonant,TDDFT_ALDA_eh_space_G_kernel_coupling - complex(SP), external :: K_exchange_kernel_resonant,K_exchange_kernel_coupling + complex(SP), external :: TDDFT_ALDA_eh_space_G_kernel,TDDFT_ALDA_eh_space_G_kernel_coupling + complex(SP), external :: K_exchange_kernel,K_exchange_kernel_coupling ! logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,BS_blk_todo,& & l_load_kernel,l_write_kernel,l_write_kernel_step,l_skip_phases,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum @@ -474,8 +474,16 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) do i_block=1,n_BS_blks ! ! BS_blk(i_block)%mode can have 4 values: "R", "C", "A", "Q" - ! However modes "A" and "Q" are expliciltly needed only when l_BS_ares_from_res=.false. - ! In such case the present subroutine switches to moden_now="F" + ! - The resonant block "R" is always computed + ! - The coupling block "C": + ! (i) It is computed using the indexes of the resonant block when BS_n_eh_space=1 + ! In this case some relations are used, which holds at q=0 only and + ! if l_BS_ares_from_res=.true. + ! (ii) It is directly computed using the indexes of the coupling block BS_n_eh_space=2 + ! In this case the code switches to mode_now="F"(ull) and standard relations are used + ! - The anti-resonant "A" and anti-coupling "Q" blocks are expliciltly needed only when l_BS_ares_from_res=.false. + ! also in this case the code switches to mode_now="F"(ull) and standard relations are used + ! mode_now=BS_blk(i_block)%mode if (BS_n_eh_spaces==2) mode_now="F" ! @@ -735,13 +743,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !=================================== ! ! Exchange - if (iHxc==1) H_x=K_exchange_kernel_resonant(iq, BS_n_g_exch, & + if (iHxc==1) H_x=K_exchange_kernel(iq, BS_n_g_exch, & & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) ! ! ALDA if (iHxc==2) then if(l_tddft_rsum) H_x=H_x+TDDFT_ALDA_eh_space_R_kernel(is_k,os_k,is_p,os_p,tddft_wf,'RES') - if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel_resonant(BS_n_g_fxc,& + if(l_tddft_gsum) H_x=H_x+TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc,& & BS_T_grp(i_Tgrp_p),i_Tp, BS_T_grp(i_Tgrp_k),i_Tk) endif ! @@ -763,7 +771,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! :::COUPLING TERM::: !============================= - ! + ! ! This implementation is used only at iq=1 when l_BS_ares_from_res=.true. ! It uses only hald of the BS_T_grps, saving memory & cpu time for the oscillators ! Otherwise the exchange and tddft implementation are not corret @@ -783,6 +791,9 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! Correlations if (iHxc==3) then + ! To check for magnons + ! When doing correlation i invert i_c_p and i_v_p + ! Here also i_p_sp_pol_c and i_p_sp_pol_v are inverted ... if (l_std_alg) H_c=K_correlation_kernel_std(i_block,i_p,i_pmq, & & i_k_s,i_kp_s,i_c_k,i_v_p,i_kmq_s,i_kp_mq_s,i_v_k,i_c_p, & & i_kmq_t,i_pmq_t,i_k_sp_pol_c,i_p_sp_pol_v,i_k_sp_pol_v,i_p_sp_pol_c, & diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 0e84ec256b..4d6a7179a2 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -47,6 +47,7 @@ subroutine DIPOLE_setup(Dip) l_BS_dichroism= (index(BSE_prop,'dich')/=0) l_BS_photolum= (index(BSE_prop,'photolum')/=0) call parser('ImposeAsymBSE',l_flag) + if(.not.l_flag) call parser('ImposeFullBSE',l_flag) ! ! Bands ordering !---------------- diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F index 2af68bdd0e..99cf093bb5 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_L.F @@ -92,15 +92,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ os=(/i_v,i_p,i_sp,i_sp_v/) qs=(/minus_G(i_g_p),iq,1/) ! - !if (mode=="R".or.mode=="C".or.mode=="F") then - ! is(1)=i_c - ! os(1)=i_v - !else if (mode=="A".or.mode=="Q") then - ! ! Same momenta and spin indexes, inverted bands - ! is(1)=i_v - ! os(1)=i_c - !endif - ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then #if defined(__NOTNOW) && ! defined(_CUDA) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F index c3d0ec1bae..415d82ceb7 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_collisions_R.F @@ -102,18 +102,6 @@ subroutine TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_T_grp,NG,l_bs_tddft_wf_in_ os=(/i_v,i_p,i_sp,i_sp_v/) qs=(/minus_G(i_g_p),iq,1/) ! - ! To test if I want to use this only for q=0, - ! or if I use the same prcedure of exchange - ! - !if (mode=="R".or.mode=="Q".or.mode=="F") then - ! is(1)=i_c - ! os(1)=i_v - !else if (mode=="A".or.mode=="C") then - ! ! Same momenta and spin indexes, inverted bands - ! is(1)=i_v - ! os(1)=i_c - !endif - ! l_load_WFs= l_bs_tddft_wf_in_loop .and. (NK(1)/=min(i_k,i_p).or.NK(2)/=max(i_k,i_p)) if (l_load_WFs) then #if defined(__NOTNOW) && ! defined(_CUDA) diff --git a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F index 7cb1b0873f..c350401706 100644 --- a/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F +++ b/src/tddft/TDDFT_ALDA_eh_space_G_kernel.F @@ -5,13 +5,9 @@ ! ! Authors (see AUTHORS file for details): DS ! -function TDDFT_ALDA_eh_space_G_kernel_resonant(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) +function TDDFT_ALDA_eh_space_G_kernel(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) ! - ! Calculates the F_xc scattering - ! - ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) - ! :Fxc: - ! (iv(1),ik(3),is(3)) -->--:...:-->-- (iv(2),ik(4),is(4)) + ! It calculates the F_xc matrix elements from the product O_L(k)*O_R(p) ! use pars, ONLY:SP,pi,cZERO use FFT_m, ONLY:fft_size @@ -51,18 +47,18 @@ function TDDFT_ALDA_eh_space_G_kernel_resonant(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS ! H_x=H_x/4._SP/pi ! -end function TDDFT_ALDA_eh_space_G_kernel_resonant +end function TDDFT_ALDA_eh_space_G_kernel ! ! ! ! function TDDFT_ALDA_eh_space_G_kernel_coupling(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS_T_grp_ik, i_Tk) result(H_x) ! - ! Calculates the F_xc scattering + ! This is used only at q=0 + ! + ! It calculates the F_xc matrix elements from the product O_L(k)*Coupling(O_R(p)) ! - ! (ic(1),ik(1),is(1)) --<--:...:--<-- (ic(2),ik(2),is(2)) - ! :Fxc: - ! (iv(1),ik(3),is(3)) -->--:...:-->-- (iv(2),ik(4),is(4)) + ! The Coupling(O) operation uses the relation O_{cvk}(G)=O*_{vck}(-G) ! use pars, ONLY:SP,pi,cZERO use FFT_m, ONLY:fft_size @@ -101,6 +97,8 @@ function TDDFT_ALDA_eh_space_G_kernel_coupling(BS_n_g_fxc, BS_T_grp_ip, i_Tp, BS ! Co = 4*pi*spin_occ/DL_vol/Nq ! --> X/Co = 1/4/pi ! - H_x=H_x/4._SP/pi + ! Compared to the implementation of the exchange, there is a conjg operation. + ! This is due to the use of ik "on the left", and ip "on the right", which gives a conjg + H_x=conjg(H_x)/4._SP/pi ! end function TDDFT_ALDA_eh_space_G_kernel_coupling From 4c4bbd50928df04a4f8d930819c5d85431f50626 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 3 Aug 2025 22:21:27 +0200 Subject: [PATCH 1089/1367] Fix for issue #216 --- src/bz_ops/bz_samp_indexes.F | 2 +- src/io/io_kpts.F | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index 0e08452881..64599bece2 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -121,7 +121,7 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! q%description='q' ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) + call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=io_db) io_err=io_kpts(k,Xk,q,io_db) ! if (io_err/=0) then diff --git a/src/io/io_kpts.F b/src/io/io_kpts.F index b700e972cf..6c5694fdac 100644 --- a/src/io/io_kpts.F +++ b/src/io/io_kpts.F @@ -40,25 +40,29 @@ integer function io_kpts(k,Xk,q,io_db) io_kpts=io_header(io_db,IMPOSE_SN=.true.) ! call def_variable_elemental(io_db,"k_nibz",1,IP_YIO,0) - call io_variable_elemental(io_db,I0=k%nibz) + call io_variable_elemental(io_db,I0=k%nibz,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(io_db,"k_nbz",1,IP_YIO,0) - call io_variable_elemental(io_db,I0=k%nbz) + call io_variable_elemental(io_db,I0=k%nbz,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(io_db,"Xk_nibz",1,IP_YIO,0) - call io_variable_elemental(io_db,VAR="Number of kpts for polarization (ibz)",I0=Xk%nibz) + call io_variable_elemental(io_db,VAR="Number of kpts for polarization (ibz)",& + & I0=Xk%nibz,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(io_db,"Xk_nbz",1,IP_YIO,0) - call io_variable_elemental(io_db,VAR="Number of kpts for polarization ( bz)",I0=Xk%nbz) + call io_variable_elemental(io_db,VAR="Number of kpts for polarization (bz)",& + & I0=Xk%nbz,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(io_db,"q_nibz",1,IP_YIO,0) - call io_variable_elemental(io_db,I0=q%nibz) + call io_variable_elemental(io_db,I0=q%nibz,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(io_db,"q_nbz",1,IP_YIO,0) - call io_variable_elemental(io_db,I0=q%nbz) + call io_variable_elemental(io_db,I0=q%nbz,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(io_db,"",0,0,1) ! + io_kpts=io_status(io_db) + ! if (io_kpts/=0) goto 1 ! endif From e38a2679f97d5a45c459a76be8933341d14be9fc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 4 Aug 2025 10:52:37 +0200 Subject: [PATCH 1090/1367] cutoff cylinder logic slightly changed --- src/coulomb/cutoff_cylinder.F | 22 +++++++++++++++------- src/coulomb/cutoff_driver.F | 14 +++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index 6ca748dd24..2a6f7f8e30 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -11,7 +11,7 @@ ! subroutine cutoff_cylinder(q,is_cut) ! - use pars, ONLY:SP,pi + use pars, ONLY:SP,pi,schlen use wave_func, ONLY:wf_ng use D_lattice, ONLY:alat use R_lattice, ONLY:cyl_ph_radius,bare_qpg,cyl_length,cyl_cut,g_vec,& @@ -32,6 +32,7 @@ subroutine cutoff_cylinder(q,is_cut) & lenw2,limit,leniw,maxp1 real(SP) ::cyl_ph_radius2,cyl_cut2,c1,c2,Vd,abserr,epsabs complex(SP) ::V_cut(q%nibz,wf_ng) + character(schlen) :: cyl_direction logical ::infcyl #if defined _DOUBLE real(SP), external ::DBESJ1_ @@ -49,19 +50,26 @@ subroutine cutoff_cylinder(q,is_cut) ! ! Check cylinder axis in along one principal axis ! - if(is_cut(1).and.is_cut(2)) call error('Check cylinder axis direction') - if(is_cut(2).and.is_cut(3)) call error('Check cylinder axis direction') - if(is_cut(1).and.is_cut(3)) call error('Check cylinder axis direction') + if (infcyl) then + if(all(is_cut)) call error('Infinite cylinder, but cutoff in all direction') + cyl_direction="unknonw" + if(is_cut(2).and.is_cut(3)) cyl_direction="x" + if(is_cut(1).and.is_cut(3)) cyl_direction="y" + if(is_cut(1).and.is_cut(2)) cyl_direction="z" + if(trim(cyl_direction)=="unkonwn") call error('Unknown cylinder direction') + else + if(.not.all(is_cut)) call error('Finite cylinder, but cutoff not in all directions') + endif ! - if(is_cut(1)) then + if(trim(cyl_direction)=="x") then ipar=1 iort1=2 iort2=3 - elseif(is_cut(2)) then + elseif(trim(cyl_direction)=="y") then ipar=2 iort1=1 iort2=3 - elseif(is_cut(3)) then + elseif(trim(cyl_direction)=="z") then ipar=3 iort1=2 iort2=1 diff --git a/src/coulomb/cutoff_driver.F b/src/coulomb/cutoff_driver.F index 3c7cd0e2e0..e5a8acaf75 100644 --- a/src/coulomb/cutoff_driver.F +++ b/src/coulomb/cutoff_driver.F @@ -131,7 +131,7 @@ subroutine cutoff_driver(q) call section('*',trim(ch1)) ! ch1= 'Cut directions ' - ch2=' ' + ch2= ' ' if (is_cut(1)) ch1=STRING_pack(ch1,'X') if (is_cut(1)) ch2=STRING_pack(ch2,'x') if (is_cut(2)) ch1=STRING_pack(ch1,'Y') @@ -192,12 +192,12 @@ subroutine cutoff_driver(q) ! sym_points=0. if (cut_is_cyl) then - do i1=1,3 - if (is_cut(i1)) then - sym_points(1,i1)=-cyl_length/2. - sym_points(2,i1)= cyl_length/2. - endif - enddo + !do i1=1,3 + ! if (is_cut(i1)) then + ! sym_points(1,i1)=-cyl_length/2. + ! sym_points(2,i1)= cyl_length/2. + ! endif + !enddo else if (cut_is_box) then i4=0 do i1=-1,1,2 From 01858cc0e20e04e666686273a452aebe0107ad03 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 5 Aug 2025 10:27:12 +0200 Subject: [PATCH 1091/1367] Finite cylinder cutoff removed. Only infinite kept --- src/coulomb/cutoff_cylinder.F | 91 ++++------------------------------- src/coulomb/cutoff_driver.F | 26 ++-------- src/coulomb/cutoff_test.F | 17 ++----- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 3 +- src/io/io_COL_CUT.F | 5 +- src/modules/mod_R_lattice.F | 2 - 7 files changed, 26 insertions(+), 120 deletions(-) diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index 2a6f7f8e30..1a5de6b031 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -14,7 +14,7 @@ subroutine cutoff_cylinder(q,is_cut) use pars, ONLY:SP,pi,schlen use wave_func, ONLY:wf_ng use D_lattice, ONLY:alat - use R_lattice, ONLY:cyl_ph_radius,bare_qpg,cyl_length,cyl_cut,g_vec,& + use R_lattice, ONLY:cyl_ph_radius,bare_qpg,cyl_cut,g_vec,& & bz_samp,cyl_vr_save,cyl_vz_save use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset use parallel_int, ONLY:PP_redux_wait,PARALLEL_index @@ -33,7 +33,6 @@ subroutine cutoff_cylinder(q,is_cut) real(SP) ::cyl_ph_radius2,cyl_cut2,c1,c2,Vd,abserr,epsabs complex(SP) ::V_cut(q%nibz,wf_ng) character(schlen) :: cyl_direction - logical ::infcyl #if defined _DOUBLE real(SP), external ::DBESJ1_ #else @@ -46,20 +45,14 @@ subroutine cutoff_cylinder(q,is_cut) ! call PP_indexes_reset(px) ! - infcyl=cyl_length==0. - ! ! Check cylinder axis in along one principal axis ! - if (infcyl) then - if(all(is_cut)) call error('Infinite cylinder, but cutoff in all direction') - cyl_direction="unknonw" - if(is_cut(2).and.is_cut(3)) cyl_direction="x" - if(is_cut(1).and.is_cut(3)) cyl_direction="y" - if(is_cut(1).and.is_cut(2)) cyl_direction="z" - if(trim(cyl_direction)=="unkonwn") call error('Unknown cylinder direction') - else - if(.not.all(is_cut)) call error('Finite cylinder, but cutoff not in all directions') - endif + if(all(is_cut)) call error('Infinite cylinder, but cutoff in all direction') + cyl_direction="unknonw" + if(is_cut(2).and.is_cut(3)) cyl_direction="x" + if(is_cut(1).and.is_cut(3)) cyl_direction="y" + if(is_cut(1).and.is_cut(2)) cyl_direction="z" + if(trim(cyl_direction)=="unkonwn") call error('Unknown cylinder direction') ! if(trim(cyl_direction)=="x") then ipar=1 @@ -75,11 +68,8 @@ subroutine cutoff_cylinder(q,is_cut) iort2=1 endif ! - cyl_cut=cyl_length - if (infcyl) then - cyl_cut=abs(1/(q%pt(2,ipar))*alat(ipar))-1. - call msg('r','Infinite cylinder: Length set to 1/dq ',cyl_cut,"[a.u.]") - endif + cyl_cut=abs(1/(q%pt(2,ipar))*alat(ipar))-1. + call msg('r','Infinite cylinder: Length set to 1/dq ',cyl_cut,"[a.u.]") ! cyl_cut2 = cyl_cut**2 cyl_ph_radius2 = cyl_ph_radius**2 @@ -90,68 +80,8 @@ subroutine cutoff_cylinder(q,is_cut) ! call live_timing('Cylinder',px%n_of_elements(myid+1)) ! - ! finite cylinder + ! infinite cylinder ! - if (.not.infcyl) then - epsabs=8e-1 - key=4 - limit=2 - lenw=limit*4 - leniw=8 - maxp1=2 - lenw2=leniw*2+maxp1*25 - allocate (iwork(limit),work(lenw)) - allocate (iwork2(leniw),work2(lenw2)) - do ig=1,wf_ng - do iq=1,q%nibz - if (.not.px%element_2D(iq,ig)) cycle - cyl_vz_save=(q%pt(iq,ipar)+g_vec(ig,ipar) )*2.*pi/alat(ipar) - cyl_vr_save=sqrt(((q%pt(iq,iort1)+g_vec(ig,iort1))*2.*pi/alat(iort1))**2+& -& ((q%pt(iq,iort2)+g_vec(ig,iort2))*2.*pi/alat(iort2))**2) - ! - if (cyl_vr_save==0..and.cyl_vz_save/=0) then - c1=1./cyl_vz_save**2-cos(cyl_vz_save*cyl_cut)/cyl_vz_save**2-& -& cyl_cut*sin(cyl_vz_save*cyl_cut)/cyl_vz_save - c2=sin(cyl_vz_save*cyl_cut)*sqrt(cyl_ph_radius2+cyl_cut2) -#if defined _DOUBLE - call dqawo (bessel_F3,0.,cyl_cut,cyl_vz_save,2,epsabs,0.,Vd,& -& abserr,neval,ier,leniw,maxp1,lenw2,last,iwork2,work2) -#else - call qawo (bessel_F3,0.,cyl_cut,cyl_vz_save,2,epsabs,0.,Vd,& -& abserr,neval,ier,leniw,maxp1,lenw2,last,iwork2,work2) -#endif - V_cut(iq,ig)=c1+(c2-Vd)/cyl_vz_save - elseif (cyl_vz_save==0.) then -#if defined _DOUBLE - call dqag(bessel_F4,0.,cyl_ph_radius,epsabs,0.,key,Vd,abserr, & -& neval,ier,limit,lenw,last,iwork,work) -#else - call qag(bessel_F4,0.,cyl_ph_radius,epsabs,0.,key,Vd,abserr, & -& neval,ier,limit,lenw,last,iwork,work) -#endif - V_cut(iq,ig)=Vd - else -#if defined _DOUBLE - call dqawo(bessel_F2,0.,cyl_cut,cyl_vz_save,1,epsabs,0.,Vd, & -& abserr,neval,ier,leniw,maxp1,lenw2,last,iwork2,work2) -#else - call qawo(bessel_F2,0.,cyl_cut,cyl_vz_save,1,epsabs,0.,Vd, & -& abserr,neval,ier,leniw,maxp1,lenw2,last,iwork2,work2) -#endif - - V_cut(iq,ig)=Vd - endif - call live_timing(steps=1) - enddo - enddo - YAMBO_FREE(iwork) - YAMBO_FREE(iwork2) - YAMBO_FREE(work) - YAMBO_FREE(work2) - ! - ! infinite - ! - else ! limit=2 lenw=limit*4 @@ -184,7 +114,6 @@ subroutine cutoff_cylinder(q,is_cut) enddo enddo YAMBO_FREE(work) - endif ! ! MPI 2 all ! diff --git a/src/coulomb/cutoff_driver.F b/src/coulomb/cutoff_driver.F index e5a8acaf75..8e3149968d 100644 --- a/src/coulomb/cutoff_driver.F +++ b/src/coulomb/cutoff_driver.F @@ -30,7 +30,7 @@ subroutine cutoff_driver(q) use pars, ONLY:SP,schlen,lchlen use vec_operate, ONLY:v_is_zero use com, ONLY:msg - use R_lattice, ONLY:cyl_ph_radius,box_length,cyl_length,cut_geometry,bz_samp,cut_description,ws_cutoff,& + use R_lattice, ONLY:cyl_ph_radius,box_length,cut_geometry,bz_samp,cut_description,ws_cutoff,& cut_is_slab use stderr, ONLY:STRING_split,STRING_pack use IO_int, ONLY:io_control @@ -94,7 +94,6 @@ subroutine cutoff_driver(q) ! if (.not.cut_is_box) box_length=0. if (.not.cut_is_sphere.and..not.cut_is_cyl) cyl_ph_radius=0. - if (.not.cut_is_cyl) cyl_length=0. if (.not.is_cut(1)) box_length(1)=0. if (.not.is_cut(2)) box_length(2)=0. if (.not.is_cut(3)) box_length(3)=0. @@ -170,17 +169,9 @@ subroutine cutoff_driver(q) call msg('r','Box sides ',length(:i1),"[a.u.]") write (cut_description,'(a,3f6.3)') trim(cut_geometry)//' ', length(:i1) else if (cut_is_cyl) then - if (cyl_length > 0.) then - call msg('r','Cyl. length ',cyl_length,"[a.u.]") - else - call msg('r','Cyl. length : infinite') - endif - call msg('r', 'Cyl. radius ',cyl_ph_radius,"[a.u.]") - if (cyl_length > 0.) then - write (cut_description,'(a,f6.3,a,f6.3)') trim(cut_geometry)//' ',cyl_length,' ',cyl_ph_radius - else - write (cut_description,'(a,a,a,f6.3)') trim(cut_geometry)//' ','infinite',' ',cyl_ph_radius - endif + call msg('r','Cyl. length : infinite') + call msg('r','Cyl. radius ',cyl_ph_radius,"[a.u.]") + write (cut_description,'(a,a,a,f6.3)') trim(cut_geometry)//' ','infinite',' ',cyl_ph_radius endif ! ! Checking geometry symmetry @@ -191,14 +182,7 @@ subroutine cutoff_driver(q) ! symmetry operations. ! sym_points=0. - if (cut_is_cyl) then - !do i1=1,3 - ! if (is_cut(i1)) then - ! sym_points(1,i1)=-cyl_length/2. - ! sym_points(2,i1)= cyl_length/2. - ! endif - !enddo - else if (cut_is_box) then + if (cut_is_box) then i4=0 do i1=-1,1,2 do i2=-1,1,2 diff --git a/src/coulomb/cutoff_test.F b/src/coulomb/cutoff_test.F index e1e3f9dd16..fbc3926845 100644 --- a/src/coulomb/cutoff_test.F +++ b/src/coulomb/cutoff_test.F @@ -3,14 +3,14 @@ ! ! Copyright (C) 2006 The Yambo Team ! -! Authors (see AUTHORS file for details): AMDV +! Authors (see AUTHORS file for details): AM DV ! subroutine cutoff_test(cut_is_sphere,cut_is_box,cut_is_cyl,cut_is_ws,cut_is_slab,is_cut,q) ! use pars, ONLY:SP,schlen,pi use vec_operate, ONLY:v_norm use D_lattice, ONLY:alat,sop_inv,a,DL_vol - use R_lattice, ONLY:bz_samp,cyl_ph_radius,bare_qpg,cyl_length,box_length,& + use R_lattice, ONLY:bz_samp,cyl_ph_radius,bare_qpg,box_length,& & g_vec,g_rot,nqibz use wave_func, ONLY:wf_ng use com, ONLY:msg,of_open_close @@ -75,9 +75,9 @@ subroutine cutoff_test(cut_is_sphere,cut_is_box,cut_is_cyl,cut_is_ws,cut_is_slab ! if (cut_is_cyl) then dummy=(/v_norm(a(1,:)),v_norm(a(2,:)),v_norm(a(3,:))/) - if (is_cut(1).and.cyl_length==0) dummy(1)=2.0_SP*plot_factor*dummy(1)*10.0 - if (is_cut(2).and.cyl_length==0) dummy(2)=2.0_SP*plot_factor*dummy(2)*10.0 - if (is_cut(3).and.cyl_length==0) dummy(3)=2.0_SP*plot_factor*dummy(3)*10.0 + if (is_cut(1)) dummy(1)=2.0_SP*plot_factor*dummy(1)*10.0 + if (is_cut(2)) dummy(2)=2.0_SP*plot_factor*dummy(2)*10.0 + if (is_cut(3)) dummy(3)=2.0_SP*plot_factor*dummy(3)*10.0 endif if (cut_is_box) then if (is_cut(1)) dummy(1)=2.0_SP*plot_factor*box_length(1) @@ -245,16 +245,9 @@ real(SP) function V_in_box(r) real(SP) function V_in_cyl(r) real(SP) :: r(3) V_in_cyl=0. - if (cyl_length>0) then - if ((is_cut(1).and.abs(r(1)) Date: Thu, 7 Aug 2025 01:16:17 +0200 Subject: [PATCH 1092/1367] Updated AUTHORS file --- AUTHORS | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 7303ea16f3..890d3bdc4b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,7 +4,6 @@ ACTIVE DEVELOPERS NAME SURNAME (INITIALS) (since year) ------------ ---------- ------------ - * Andrea Marini (AM) (2001) * Myrta Gruening (MG) (2004) * Daniele Varsano (DV) (2004) * Conor Hogan (CH) (2005) @@ -22,7 +21,6 @@ ACTIVE DEVELOPERS * Alberto Guandalini (AG) (2020) * Riccardo Reho (RR) (2022) * Giacomo Sesti (GS) (2022) - * Blanca Mellado Pinto (BM) (2023) * Nalabothula Muralidhar (NM) (2024) FORMER DEVELOPERS @@ -30,6 +28,7 @@ FORMER DEVELOPERS NAME SURNAME (INITIALS) (period of activity) ------------ ---------- -------------------- + * Andrea Marini (AM) (2001-2025) * David Kammerlader (DK) (2010-2012) * Fabio Affinito (FA) (2013-2019) * Pedro Melo (PM) (2013-2022) @@ -42,14 +41,18 @@ FORMER DEVELOPERS * Henrique Miranda (HM) (2016-2018) * Elena Molteni (EM) (2019-2021) * Ignacio Martin Alliati (IMA) (2020-2024) + * Blanca Mellado Pinto (BM) (2023-2025) ACKNOWLEDGEMENTS ================= -In all source files the Yambo developers are included with their initials. -Andrea Marini is the original developer of the code and still the main responsible for the code development. +In all source files the developers are included with their initials. -For aknowledging the Yambo Team please refer to the following published articles: +Andrea Marini is the original developer of the Yambo code + +Davide Sangallli and Claudio Attaccalite are the founders of the Lumen fork + +For aknowledging the developers Team please refer to the following published articles: - A Marini, et al. "Yambo: an ab initio tool for excited state calculations", Computer Physics Communications 180 (8), 1392 (2009) From b7b9f05f9ea9aa53608533b6eec242207b25dc42 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 8 Aug 2025 15:42:18 +0200 Subject: [PATCH 1093/1367] Version 5.3.0, Revision 25029, Hash 0d010afe9d MODIFIED * configure include/version/version.m4 bse/RT_project.dep Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/RT_project.dep | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 2fa23aa33a..dd3f9cfb44 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.24498 h.027781afe. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25029 h.0d010afe9d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.24498 h.027781afe' -PACKAGE_STRING='Yambo 5.3.0 r.24498 h.027781afe' +PACKAGE_VERSION='5.3.0 r.25029 h.0d010afe9d' +PACKAGE_STRING='Yambo 5.3.0 r.25029 h.0d010afe9d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.24498 h.027781afe to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25029 h.0d010afe9d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.24498 h.027781afe:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25029 h.0d010afe9d:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.24498 h.027781afe +Yambo configure 5.3.0 r.25029 h.0d010afe9d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was +It was created by Yambo $as_me 5.3.0 r.25029 h.0d010afe9d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24498" -SHASH="027781afe" +SREVISION="25029" +SHASH="0d010afe9d" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.24498 h.027781afe, which was +This file was extended by Yambo $as_me 5.3.0 r.25029 h.0d010afe9d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.24498 h.027781afe +Yambo config.status 5.3.0 r.25029 h.0d010afe9d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 44bbd5f071..bf5a59ab0e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.24498 h.027781afe, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25029 h.0d010afe9d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="24498" -SHASH="027781afe" +SREVISION="25029" +SHASH="0d010afe9d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/RT_project.dep b/src/bse/RT_project.dep index ba43b0f31e..053b62454a 100644 --- a/src/bse/RT_project.dep +++ b/src/bse/RT_project.dep @@ -2,4 +2,5 @@ K_Transitions_setup.o K_driver_init.o K_inversion_driver.o + PL_diago_residual.o From b91de24d419fffa8cdf5bcc2e57c705f2a4d29ec Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 8 Aug 2025 15:45:49 +0200 Subject: [PATCH 1094/1367] Version 5.3.0, Revision 25030, Hash b7b9f05f9e MODIFIED * configure include/version/version.m4 ypp/real_time/NL_ypp_driver.F Bugs: - Additions: -Changed output for xhi(\omega) Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- ypp/real_time/NL_ypp_driver.F | 18 ++++++++++++------ 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/configure b/configure index dd3f9cfb44..02d5a4d82d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25029 h.0d010afe9d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25030 h.b7b9f05f9e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25029 h.0d010afe9d' -PACKAGE_STRING='Yambo 5.3.0 r.25029 h.0d010afe9d' +PACKAGE_VERSION='5.3.0 r.25030 h.b7b9f05f9e' +PACKAGE_STRING='Yambo 5.3.0 r.25030 h.b7b9f05f9e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25029 h.0d010afe9d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25030 h.b7b9f05f9e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25029 h.0d010afe9d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25030 h.b7b9f05f9e:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25029 h.0d010afe9d +Yambo configure 5.3.0 r.25030 h.b7b9f05f9e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25029 h.0d010afe9d, which was +It was created by Yambo $as_me 5.3.0 r.25030 h.b7b9f05f9e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25029" -SHASH="0d010afe9d" +SREVISION="25030" +SHASH="b7b9f05f9e" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25029 h.0d010afe9d, which was +This file was extended by Yambo $as_me 5.3.0 r.25030 h.b7b9f05f9e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25029 h.0d010afe9d +Yambo config.status 5.3.0 r.25030 h.b7b9f05f9e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index bf5a59ab0e..09ff8705c3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25029 h.0d010afe9d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25030 h.b7b9f05f9e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25029" -SHASH="0d010afe9d" +SREVISION="25030" +SHASH="b7b9f05f9e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index 9237684d43..9a1e0a6dec 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -220,13 +220,13 @@ subroutine NL_ypp_driver(en,k) ! if(.not.runs_ok(i_f)) cycle ! - if (i_order==1) then - Susceptibility(i_order,i_f,1)=4._SP*pi*dot_product( Efield(i_Probe)%versor(:),X_effective(i_order,i_f,:) )*& -& Divide_by_Field(Efield(i_Probe),i_order) - Susceptibility(i_order,i_f,2:3)=cZERO - else +! if (i_order==1) then +! Susceptibility(i_order,i_f,1)=4._SP*pi*dot_product( Efield(i_Probe)%versor(:),X_effective(i_order,i_f,:) )*& +!& Divide_by_Field(Efield(i_Probe),i_order) +! Susceptibility(i_order,i_f,2:3)=cZERO +! else Susceptibility(i_order,i_f,:)=X_effective(i_order,i_f,:)*Divide_by_Field(Efield(i_Probe),i_order) - end if +! end if ! enddo ! @@ -405,6 +405,12 @@ subroutine plot_X_effective() ! call DESC_write('o probe','#',NL_desc) ! + if (X_order==1) then + call msg('o probe','#') + call msg('o probe','#',"xhi_ab(\omega)") + call msg('o probe','#',"multiply by 4 \pi and field versor to compare with epsilon") + call msg('o probe','#') + endif call msg('o probe','#') call msg('o probe','#',headings(1:n_headings,i_order),INDENT=0,USE_TABS=.TRUE.) call msg('o probe','#') From 7e9d585537e8cc56392b7dfa572ac997d58fd29c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Aug 2025 16:40:17 +0200 Subject: [PATCH 1095/1367] Version 5.3.0, Revision 25031, Hash b91de24d41 MODIFIED * configure include/version/version.m4 bse/DOUBLE_project.dep hamiltonian/Build_tilde_vbands.F nloptics/NL_Berry_current.F wf_and_fft/DOUBLE_project.dep Bugs: - Additions: -Small change in the code, more estetic Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/DOUBLE_project.dep | 1 - src/hamiltonian/Build_tilde_vbands.F | 6 ++++-- src/nloptics/NL_Berry_current.F | 4 ++-- src/wf_and_fft/DOUBLE_project.dep | 1 - 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/configure b/configure index 02d5a4d82d..a517550b55 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25030 h.b7b9f05f9e. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25031 h.b91de24d41. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25030 h.b7b9f05f9e' -PACKAGE_STRING='Yambo 5.3.0 r.25030 h.b7b9f05f9e' +PACKAGE_VERSION='5.3.0 r.25031 h.b91de24d41' +PACKAGE_STRING='Yambo 5.3.0 r.25031 h.b91de24d41' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25030 h.b7b9f05f9e to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25031 h.b91de24d41 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25030 h.b7b9f05f9e:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25031 h.b91de24d41:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25030 h.b7b9f05f9e +Yambo configure 5.3.0 r.25031 h.b91de24d41 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25030 h.b7b9f05f9e, which was +It was created by Yambo $as_me 5.3.0 r.25031 h.b91de24d41, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25030" -SHASH="b7b9f05f9e" +SREVISION="25031" +SHASH="b91de24d41" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25030 h.b7b9f05f9e, which was +This file was extended by Yambo $as_me 5.3.0 r.25031 h.b91de24d41, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25030 h.b7b9f05f9e +Yambo config.status 5.3.0 r.25031 h.b91de24d41 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 09ff8705c3..368ee86afa 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25030 h.b7b9f05f9e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25031 h.b91de24d41, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25030" -SHASH="b7b9f05f9e" +SREVISION="25031" +SHASH="b91de24d41" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 9451b883b9..274f365e98 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -53,6 +53,5 @@ K_stored_in_a_slepc_matrix.o LDIAGO_driver.o PL_diago_residual.o - PL_diago_residual_old.o PL_via_perturbative_inversion.o diff --git a/src/hamiltonian/Build_tilde_vbands.F b/src/hamiltonian/Build_tilde_vbands.F index 736d581932..844b626e9a 100644 --- a/src/hamiltonian/Build_tilde_vbands.F +++ b/src/hamiltonian/Build_tilde_vbands.F @@ -37,6 +37,8 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) complex(SP) :: tmp_Vp(H_ref_bands(1):H_ref_bands(2),en%nbf(i_sp)),tmp_Vm(H_ref_bands(1):H_ref_bands(2),en%nbf(i_sp)) ! V_tilde=cZERO + tmp_Vm =cZERO + tmp_Vp =cZERO nbf=en%nbf(i_sp) ! if(k_map%max_kdir(id_red)==1) return @@ -72,11 +74,11 @@ subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) ! call M_by_M_omp('N','N',H_ref_nbands,nbf,H_ref_bands(2),cONE, & & DIP_S(H_ref_bands(1):,:,id_red+(istep-1)*3,ikbz,i_sp),H_ref_nbands, & -& V_bands(:,:nbf,ikp_ibz),H_ref_bands(2),cZERO,tmp_Vp(H_ref_bands(1):,:en%nbf(i_sp)),H_ref_nbands) +& V_bands(:,:nbf,ikp_ibz),H_ref_bands(2),cZERO,tmp_Vp(H_ref_bands(1):,:nbf),H_ref_nbands) ! call M_by_M_omp('C','N',H_ref_nbands,nbf,H_ref_bands(2),cONE, & & DIP_S(:,H_ref_bands(1):,id_red+(istep-1)*3,ikm ,i_sp),H_ref_bands(2), & -& V_bands(:,:nbf,ikm_ibz),H_ref_bands(2),cZERO,tmp_Vm(H_ref_bands(1):,:en%nbf(i_sp)),H_ref_nbands) +& V_bands(:,:nbf,ikm_ibz),H_ref_bands(2),cZERO,tmp_Vm(H_ref_bands(1):,:nbf),H_ref_nbands) ! ! Eq. (53) in PRB 69, 085106 (2004), derived in appendix (C), see eq. C(11) ! diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index 3894083879..64a624c3e1 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -119,7 +119,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! ! Notice that the 2.0 originates from H i\der_k +i \der_k H = 2 * Re[H i\der_k] ! - NL_J_red(id_red)=2.0*spin_occ*real(NL_J_red(id_red),SP)/dble(Nperpend) + NL_J_red(id_red)=2.0_SP*spin_occ*real(NL_J_red(id_red),SP)/dble(Nperpend) ! enddo ! @@ -129,7 +129,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! !$omp parallel do default(shared), private(i1) do id=1,3 - NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0*pi) + NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0_SP*pi) enddo !$omp end parallel do ! diff --git a/src/wf_and_fft/DOUBLE_project.dep b/src/wf_and_fft/DOUBLE_project.dep index 6ab9e156fb..3168f6d3ae 100644 --- a/src/wf_and_fft/DOUBLE_project.dep +++ b/src/wf_and_fft/DOUBLE_project.dep @@ -15,7 +15,6 @@ WF_rotate.o WF_shift_kpoint.o WF_spatial_inversion.o - WF_symm.o WF_symm_kpoint.o WF_symm_kpoint_incl.o eval_GradOperator.o From 34c5842cdc2e84f06ef241571e40ed6f9b1fdcca Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 10 Aug 2025 19:33:23 +0200 Subject: [PATCH 1096/1367] Version 5.3.0, Revision 25032, Hash 7e9d585537 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Better report Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 6 ++++-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/configure b/configure index a517550b55..f1b9c6d0d7 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25031 h.b91de24d41. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25033 h.7e9d585537. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25031 h.b91de24d41' -PACKAGE_STRING='Yambo 5.3.0 r.25031 h.b91de24d41' +PACKAGE_VERSION='5.3.0 r.25033 h.7e9d585537' +PACKAGE_STRING='Yambo 5.3.0 r.25033 h.7e9d585537' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25031 h.b91de24d41 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25033 h.7e9d585537 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25031 h.b91de24d41:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25033 h.7e9d585537:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25031 h.b91de24d41 +Yambo configure 5.3.0 r.25033 h.7e9d585537 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25031 h.b91de24d41, which was +It was created by Yambo $as_me 5.3.0 r.25033 h.7e9d585537, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25031" -SHASH="b91de24d41" +SREVISION="25033" +SHASH="7e9d585537" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25031 h.b91de24d41, which was +This file was extended by Yambo $as_me 5.3.0 r.25033 h.7e9d585537, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25031 h.b91de24d41 +Yambo config.status 5.3.0 r.25033 h.7e9d585537 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 368ee86afa..b914be8eaf 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25031 h.b91de24d41, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25033 h.7e9d585537, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25031" -SHASH="b91de24d41" +SREVISION="25033" +SHASH="7e9d585537" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 5e714c8a6c..c428bd3da2 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -527,8 +527,10 @@ subroutine NL_initialize(E,k) call msg( 'sr','Frequencies steps ',n_frequencies) call msg( 'r', 'Frequency step ',NL_estep*HA2EV) call msg( 'sr','Number of angles ',n_angles) - call msg( 'sr','Max angle (degree) ',max_angle) - call msg( 'r', 'Rotation axis ',NL_rot_axis) + if(n_angles>0) then + call msg( 'sr','Max angle (degree) ',max_angle) + call msg( 'r', 'Rotation axis ',NL_rot_axis) + endif endif call msg( 'r', 'Use Dipoles ',l_use_DIPOLES) call msg( 'r', 'Induced Field ',l_RT_induced_field) From 77ee34b3c385443bc5c2a5fc270191e06da5d698 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 11 Aug 2025 09:38:24 +0200 Subject: [PATCH 1097/1367] Version 5.3.0, Revision 25033, Hash 34c5842cdc MODIFIED * configure include/version/version.m4 nloptics/NL_driver.F Bugs: - Additions: -Fixed wrong live_timing when parallelization is on Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_driver.F | 5 +++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/configure b/configure index f1b9c6d0d7..7e0cc662ce 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25033 h.7e9d585537. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25034 h.34c5842cdc. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25033 h.7e9d585537' -PACKAGE_STRING='Yambo 5.3.0 r.25033 h.7e9d585537' +PACKAGE_VERSION='5.3.0 r.25034 h.34c5842cdc' +PACKAGE_STRING='Yambo 5.3.0 r.25034 h.34c5842cdc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25033 h.7e9d585537 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25034 h.34c5842cdc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25033 h.7e9d585537:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25034 h.34c5842cdc:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25033 h.7e9d585537 +Yambo configure 5.3.0 r.25034 h.34c5842cdc generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25033 h.7e9d585537, which was +It was created by Yambo $as_me 5.3.0 r.25034 h.34c5842cdc, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25033" -SHASH="7e9d585537" +SREVISION="25034" +SHASH="34c5842cdc" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25033 h.7e9d585537, which was +This file was extended by Yambo $as_me 5.3.0 r.25034 h.34c5842cdc, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25033 h.7e9d585537 +Yambo config.status 5.3.0 r.25034 h.34c5842cdc configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index b914be8eaf..8f0ff6b71d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25033 h.7e9d585537, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25034 h.34c5842cdc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25033" -SHASH="7e9d585537" +SREVISION="25034" +SHASH="34c5842cdc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index faddd593a2..603723d153 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -60,7 +60,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ! Work Space ! - integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,ik,ik_mem + integer :: i_f,i1,i_sp_pol,wf_ng_save,io_err,ik,ik_mem,my_runs character(schlen) :: l_message logical :: l_dynamics_is_over real(SP) :: OBSERVABLES(25),Time,angle @@ -288,7 +288,8 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) call error("Wrong input: use pump-probe mode 'yambo_nl -u p' or set a number of frequencie/angles with 'yambo_nl -u n'") endif if(.not.l_pump_and_probe) NE_i_time=0 - call live_timing(l_message,n_runs*(NE_steps-NE_i_time)) + my_runs=PAR_IND_freqs%n_of_elements(PAR_IND_freqs_ID+1) + call live_timing(l_message,my_runs*(NE_steps-NE_i_time)) ! do i_f=1,n_runs ! From edb67f5868650d7fd18c7cc48214f799068be329 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 11 Aug 2025 18:30:05 +0200 Subject: [PATCH 1098/1367] Version 5.3.0, Revision 25034, Hash 77ee34b3c3 MODIFIED * configure include/version/version.m4 nloptics/NL_Berry_current.F Bugs: -Fixed bug in current Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_Berry_current.F | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 7e0cc662ce..56f06cd74a 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25034 h.34c5842cdc. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25035 h.77ee34b3c3. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25034 h.34c5842cdc' -PACKAGE_STRING='Yambo 5.3.0 r.25034 h.34c5842cdc' +PACKAGE_VERSION='5.3.0 r.25035 h.77ee34b3c3' +PACKAGE_STRING='Yambo 5.3.0 r.25035 h.77ee34b3c3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25034 h.34c5842cdc to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25035 h.77ee34b3c3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25034 h.34c5842cdc:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25035 h.77ee34b3c3:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25034 h.34c5842cdc +Yambo configure 5.3.0 r.25035 h.77ee34b3c3 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25034 h.34c5842cdc, which was +It was created by Yambo $as_me 5.3.0 r.25035 h.77ee34b3c3, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25034" -SHASH="34c5842cdc" +SREVISION="25035" +SHASH="77ee34b3c3" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25034 h.34c5842cdc, which was +This file was extended by Yambo $as_me 5.3.0 r.25035 h.77ee34b3c3, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25034 h.34c5842cdc +Yambo config.status 5.3.0 r.25035 h.77ee34b3c3 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 8f0ff6b71d..53b614a377 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25034 h.34c5842cdc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25035 h.77ee34b3c3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25034" -SHASH="34c5842cdc" +SREVISION="25035" +SHASH="77ee34b3c3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index 64a624c3e1..f87cc0e7a2 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -88,7 +88,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! Using higher order for the k-derivative gives a worst result ! when compared with dP/dt for this reason this line is commented ! - if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 +! if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 ! ! do ikbz=1,nXkbz From f6545fe8273749c016316d8d03a21d00e71384c5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 28 Aug 2025 10:33:55 +0200 Subject: [PATCH 1099/1367] Message that [r,Vnl] is included is just a log output, not a warning anymore A warning is reported only if such term is neglected --- src/dipoles/DIPOLE_driver.F | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/dipoles/DIPOLE_driver.F b/src/dipoles/DIPOLE_driver.F index faafd6e397..df801bc90a 100644 --- a/src/dipoles/DIPOLE_driver.F +++ b/src/dipoles/DIPOLE_driver.F @@ -30,6 +30,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! use drivers, ONLY:l_optics use pars, ONLY:SP,schlen + use com, ONLY:msg use electrons, ONLY:levels,n_sp_pol use IO_m, ONLY:io_DIP use R_lattice, ONLY:bz_samp @@ -56,7 +57,7 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! Work Space ! integer :: ik,io_err,io_err_Overlaps - character(schlen) :: msg + character(schlen) :: message logical :: l_warning,direction_is_todo(3) ! call section('*','Dipoles') @@ -168,10 +169,10 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! Warn about missing [Sigma,r] commutator ! if ( Dip%Vnl_included .and.l_warning.and.(len_trim(g_space_obs)>0.or.Dip%force_v_g_space)) then - msg=' [r,Vnl^pseudo] included in' - if (.not.len_trim(g_space_obs)>0) msg=trim(msg)//' velocity dipoles.' - if ( len_trim(g_space_obs)>0) msg=trim(msg)//' position and velocity dipoles.' - call warning(trim(msg)) + message='[r,Vnl^pseudo] included in' + if (.not.len_trim(g_space_obs)>0) message=trim(message)//' velocity dipoles.' + if ( len_trim(g_space_obs)>0) message=trim(message)//' position and velocity dipoles.' + call msg('s',trim(message)) call warning(' In case H contains other non local terms, these are neglected ') Vnl_commutator_warning=.TRUE. endif @@ -179,10 +180,10 @@ subroutine DIPOLE_driver(Xen,Xk,Xq,Dip) ! Warn about missing [Vnl,r] commutator ! if ((.not.Dip%Vnl_included).and.l_warning) then - msg=' [r,Vnl^pseudo] not included in' - if (.not.len_trim(g_space_obs)>0) msg=trim(msg)//' velocity dipoles' - if ( len_trim(g_space_obs)>0) msg=trim(msg)//' position and velocity dipoles' - call warning(trim(msg)) + message=' [r,Vnl^pseudo] not included in' + if (.not.len_trim(g_space_obs)>0) message=trim(message)//' velocity dipoles' + if ( len_trim(g_space_obs)>0) message=trim(message)//' position and velocity dipoles' + call warning(trim(message)) call warning(' In case H contains other non local terms, also these are neglected ') Vnl_commutator_warning=.TRUE. endif From 68a3b81c52c21ca94cc709d58f99cc27c5a39eb2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 28 Aug 2025 15:29:37 +0200 Subject: [PATCH 1100/1367] Added barrier for Haydock and Inversion BSE solvers with perturbative SOC --- src/bse/K_solvers.F | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 358da5c3c1..dba242f76c 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -18,7 +18,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use X_m, ONLY:X_t use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& & run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly - use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,& + use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,BS_perturbative_SOC,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_jdos use parallel_m, ONLY:master_cpu,CPU_structure use IO_int, ONLY:IO_and_Messaging_switch @@ -38,6 +38,9 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! logical :: l_partial_kernel_loaded ! + if ( (run_Haydock.or.run_inversion) .and. BS_perturbative_SOC) & + & call error("Perturbative SOC requires eigenvectors. Use diago or slec solver") + ! ! If the BS database was not loaded in memory, call K_restart ! if (.not. BS_K_has_been_calculated_loaded ) call K_restart(iq,X_static,BS_ID(1),BS_ID(2),BS_ID(3),l_partial_kernel_loaded) From a7fac0836772fe7afb29f1529811f11e446e654a Mon Sep 17 00:00:00 2001 From: Murali Date: Tue, 2 Sep 2025 13:47:20 +0200 Subject: [PATCH 1101/1367] fix bug when writing write BS eigvectors in parallel mode for coupling case --- src/bse/K_diago_driver.F | 3 ++- src/io/io_BSS_diago.F | 9 +++------ src/modules/mod_BS_solvers.F | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index a2f6f6e854..79268c9a50 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -432,7 +432,8 @@ subroutine K_diago_driver(iq,W,X_static) ! call PP_wait() #if defined _SCALAPACK - if (l_ldiago .and. BSS_write_eig_2_db) call write_bs_ev_par(iq, i_BS_mat, BS_V_right, BS_V_left) + if (l_ldiago .and. BSS_write_eig_2_db) call write_bs_ev_par(iq, i_BS_mat, & +& BS_V_right, BS_V_left, neigs_this_cpu, neig_shift) #endif endif ! diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 334105a23f..1e626ef0b4 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -180,11 +180,10 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! end function -subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL) +subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL, neigs_this_cpu, neig_shift) ! use pars, ONLY:SP,schlen use BS, ONLY:BS_K_dim, BS_H_dim,BS_K_coupling,BS_res_ares_n_mat - use parallel_m, ONLY:par_distribute_set use BS_solvers, ONLY:BSS_n_eig use IO_m, ONLY:REP,OP_APP_CL,YAMBO_DEF_CHUNK use stderr, ONLY:intc @@ -194,10 +193,10 @@ subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL) ! implicit none ! - integer, intent(in) :: i_BS_mat, iq + integer, intent(in) :: i_BS_mat, iq, neigs_this_cpu, neig_shift complex(SP),allocatable, target, optional ::BS_VR(:,:),BS_VL(:,:) ! workspace - integer :: SL_H_dim, neigs_this_cpu, neig_shift, ID, io_BSS_diago, chunksize(3), varid + integer :: SL_H_dim, ID, io_BSS_diago, chunksize(3), varid character(schlen):: db_name character(schlen) :: dim_names(3) @@ -216,8 +215,6 @@ subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL) db_name='BS_diago_Q'//trim(intc(iq)) endif ! - call par_distribute_set(BSS_n_eig, neigs_this_cpu, neig_shift) - ! call io_control(ACTION=OP_APP_CL,COM=REP,ID=ID,DO_IT=.TRUE.) io_BSS_diago=io_connect(desc=trim(db_name),type=2,ID=ID) diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index eace360b11..28c56ddde2 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -183,10 +183,10 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& logical, optional :: write_ev end function - subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL) + subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL, neigs_this_cpu, neig_shift) use pars, ONLY:SP implicit none - integer, intent(in) :: i_BS_mat, iq + integer, intent(in) :: i_BS_mat, iq, neigs_this_cpu, neig_shift complex(SP),allocatable, target, optional ::BS_VR(:,:),BS_VL(:,:) end subroutine write_bs_ev_par ! From 52bbc7faa5b054f8c8282004e51400cd39bf3f83 Mon Sep 17 00:00:00 2001 From: Murali Date: Tue, 2 Sep 2025 14:22:32 +0200 Subject: [PATCH 1102/1367] fix wrong fortran coding --- src/bse/K_diago_driver.F | 2 +- src/io/io_BSS_diago.F | 2 +- src/modules/mod_BS_solvers.F | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 79268c9a50..3357d52fa8 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -433,7 +433,7 @@ subroutine K_diago_driver(iq,W,X_static) call PP_wait() #if defined _SCALAPACK if (l_ldiago .and. BSS_write_eig_2_db) call write_bs_ev_par(iq, i_BS_mat, & -& BS_V_right, BS_V_left, neigs_this_cpu, neig_shift) +& neigs_this_cpu, neig_shift, BS_V_right, BS_V_left) #endif endif ! diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 1e626ef0b4..4f6a45c895 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -180,7 +180,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& ! end function -subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL, neigs_this_cpu, neig_shift) +subroutine write_bs_ev_par(iq, i_BS_mat, neigs_this_cpu, neig_shift, BS_VR, BS_VL) ! use pars, ONLY:SP,schlen use BS, ONLY:BS_K_dim, BS_H_dim,BS_K_coupling,BS_res_ares_n_mat diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 28c56ddde2..b9d6f0c16a 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -183,7 +183,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& logical, optional :: write_ev end function - subroutine write_bs_ev_par(iq, i_BS_mat, BS_VR, BS_VL, neigs_this_cpu, neig_shift) + subroutine write_bs_ev_par(iq, i_BS_mat, neigs_this_cpu, neig_shift, BS_VR, BS_VL) use pars, ONLY:SP implicit none integer, intent(in) :: i_BS_mat, iq, neigs_this_cpu, neig_shift From cbc32781035b65ed54792f4e5c2fca8f4d5684c3 Mon Sep 17 00:00:00 2001 From: Myrta Gruening <3047912@login2.pri.kelvin2.alces.network> Date: Thu, 4 Sep 2025 16:35:18 +0100 Subject: [PATCH 1103/1367] Version 5.3.0, Revision 25060, Hash 68a3b81c5 MODIFIED * modules/mod_fields.F nloptics/NL_initialize.F Bugs: nloptics/NL_initialize.F => T_0 written in the report without multiplying by AUTFS modules/mod_fields.F => in Divide_by_Field the T_0 did not correspond to its definition in nloptics/NL_initialize.F - Additions: - Changes: - Found by Anna Romani --- src/modules/mod_fields.F | 4 ++-- src/nloptics/NL_initialize.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 4495f858a6..45c3b61c8d 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -195,7 +195,7 @@ end subroutine compute_envelop ! complex(SP) function Divide_by_Field(Field,order) ! - use pars, ONLY: cI,cONE,pi,schlen + use pars, ONLY: SP,cI,cONE,pi,schlen use stderr,ONLY:STRING_split type(ext_field):: Field integer :: order @@ -212,8 +212,8 @@ complex(SP) function Divide_by_Field(Field,order) if (order==0) Divide_by_Field = 4._SP*cONE/Field%amplitude**2 case('QSSIN') !Approximate relations/does not work yet sigma=Field%width - T_0=10._SP*sigma W_0=Field%frequency(1) + T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) T = 2._SP*pi/W_0 E_w= sqrt(pi/2._SP)*Field%amplitude*sigma*exp(-cI*W_0*T_0)*& &(erf((T-T_0)/sqrt(2._SP)/sigma)+erf(T_0/sqrt(2._SP)/sigma)) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 2eac419648..ba12bf4ebb 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -523,7 +523,7 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) enddo - call msg( 'r', 'Efield T_0 ',T_0,"[fs]") + call msg( 'r', 'Efield T_0 ',T_0*AUTFS,"[fs]") if (.not.l_pump_and_probe) then call msg( 'r', 'Frequencies range ',NL_er*HA2EV) call msg( 'sr','Frequencies steps ',n_frequencies) From 17190321f1a7024f91cf6c69e40b2ce8106d4f5d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 8 Sep 2025 14:33:22 +0200 Subject: [PATCH 1104/1367] Addressing last comment from Murali in issue #217 --- src/bse/K_components_folded_in_serial_arrays.F | 2 +- src/bse/K_dipoles.F | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 51cd59a30f..eca8d9ed20 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -54,7 +54,7 @@ subroutine K_components_folded_in_serial_arrays(iq) if (BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) ! ! In the coulping case at q=1 when there are 2 blocks per group - ! See also src/bse/K_blocks.F + ! See also src/bse/K_blocks.F and K_dipoles.F ! n_blocks_per_grp=1 if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) n_blocks_per_grp=2 diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 3c7d195bca..d61836152e 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -174,7 +174,10 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) endif ! BS_T_grp(i_T_g)%dipoles_opt(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) - if (BS_K_coupling.and.l_BS_ares_from_res) then + if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) then + ! In the coulping case at q=1 when there are 2 blocks per group + ! See also src/bse/K_blocks.F and K_components_folded_in_serial_arrays.F + ! Possibly to be extended also to i_G_shift==1 BS_T_grp(i_T_g)%dipoles_opt(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) endif ! @@ -191,7 +194,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) call error(' finite q not implemented for dichroism') endif BS_T_grp(i_T_g)%dipoles_dic(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) - if (BS_K_coupling.and.l_BS_ares_from_res) then + if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) then BS_T_grp(i_T_g)%dipoles_dic(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) endif endif @@ -228,7 +231,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! or the right R residual associated to (eps_c\dn-eps_v\up) ! S- for |v\dn> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) ! S+ for |v\up> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) - if (BS_K_coupling.and.l_BS_ares_from_res) then ! This is the right A residual associated to (eps_v\up-eps_c\dn) + if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) then! This is the right A residual associated to (eps_v\up-eps_c\dn) BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) endif From 0aee943db94cb97272733ed9a6368fe44fa04148 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 8 Sep 2025 14:35:04 +0200 Subject: [PATCH 1105/1367] Added option to just load ndb.BSS_diago and recompute the spectrum, even if the ndb.BS_PAR file is not present. This must be triggered from input --- src/bse/K_diago_driver.F | 5 ++++- src/bse/K_kernel.F | 9 +++++++-- src/bse/K_observables.F | 5 ++++- src/bse/K_solvers.F | 16 ++++++++++------ src/modules/mod_BS_solvers.F | 1 + 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 3357d52fa8..61241d6873 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -31,7 +31,8 @@ subroutine K_diago_driver(iq,W,X_static) & BS_res_ares_n_mat,l_BS_abs,l_BS_dichroism,l_BS_ares_from_res !,BS_Blocks_symmetrize_K,& use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize,BSS_n_eig_Input, & & BSS_write_eig_2_db,BSS_eh_W,BSS_n_eig,BS_E,BSS_slepc_pseudo_herm,write_bs_ev_par,& -& BSS_ldiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition +& BSS_ldiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition,& +& load_Diago use X_m, ONLY:X_t,X_OUTPUT_driver use electrons, ONLY:n_sp_pol,n_spinor use frequency, ONLY:w_samp @@ -191,6 +192,8 @@ subroutine K_diago_driver(iq,W,X_static) ! Kernel and/or BSS components loading !====================================== if (io_err<0) then + ! + if (load_Diago) call error("Loading of ndb.BS_diago failed in load diago mode") ! call K_components_folded_in_serial_arrays(iq) ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 39bae14f05..d521ebddac 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -31,7 +31,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use X_m, ONLY:X_t use interfaces, ONLY:el_density_and_current use QP_m, ONLY:QP_ng_Vxc - use BS_solvers, ONLY:BSS_kernel_last_stored_block + use BS_solvers, ONLY:BSS_kernel_last_stored_block,load_Diago use BS, ONLY:BS_bands,BS_res_K_corr,BS_W,BS_W_is_diagonal,BS_ID,& & BS_res_K_exchange,BS_Block_size,l_BSE_kernel_full,BS_n_g_W,& & O_ng,BS_n_g_exch,BS_n_g_fxc,BS_identifier,BS_LiveTiming_steps,& @@ -130,6 +130,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call k_build_up_BZ_tables(Xk) ! + if (load_Diago) then + call msg('s','[BSE] Kernel calculation skipped, trying to load ndb.BS_diago directly ') + return + endif + ! ! Titles !======== ! @@ -217,7 +222,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ID =BS_ID(2) ID_compr=BS_ID(3) ! - if( l_BSE_kernel_complete ) return + if( l_BSE_kernel_complete) return ! io_QINDX_err=0 if (l_bs_corr) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 636e7bbc4a..9510896c2b 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -15,7 +15,7 @@ subroutine K_observables(W,Xk) use X_m, ONLY:global_gauge use R_lattice, ONLY:bz_samp use com, ONLY:exp_user - use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,BSS_mode + use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,load_Diago,BSS_mode use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& & l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,& & l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum,l_BS_kerr_asymm,l_BS_esort_indx @@ -111,6 +111,9 @@ subroutine K_observables(W,Xk) #if defined _SLEPC && !defined _NL run_Slepc = STRING_match(BSS_mode,'s') #endif + ! + load_Diago = STRING_match(BSS_mode,'l').and.run_Diago + ! if (l_BS_photolum.and.run_Haydock) then call warning('PL currently implemented only using the diagonalization/inversion solver') run_Haydock =.false. diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index dba242f76c..977cd6a46d 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -16,7 +16,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use electrons, ONLY:levels use R_lattice, ONLY:bz_samp use X_m, ONLY:X_t - use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& + use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,load_Diago,& & run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,BS_perturbative_SOC,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_jdos @@ -41,11 +41,15 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) if ( (run_Haydock.or.run_inversion) .and. BS_perturbative_SOC) & & call error("Perturbative SOC requires eigenvectors. Use diago or slec solver") ! - ! If the BS database was not loaded in memory, call K_restart - ! - if (.not. BS_K_has_been_calculated_loaded ) call K_restart(iq,X_static,BS_ID(1),BS_ID(2),BS_ID(3),l_partial_kernel_loaded) - ! - if (.not. BS_K_has_been_calculated_loaded ) call error("Something went wrong in K_restart, cannot proceed with solver") + if (.not. load_Diago) then + ! + ! If the BS database was not loaded in memory, call K_restart + ! + if (.not. BS_K_has_been_calculated_loaded ) call K_restart(iq,X_static,BS_ID(1),BS_ID(2),BS_ID(3),l_partial_kernel_loaded) + ! + if (.not. BS_K_has_been_calculated_loaded ) call error("Something went wrong in K_restart, cannot proceed with solver") + ! + endif ! call section('-','BSE solver(s) @q'//trim(intc(iq))) ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index b9d6f0c16a..da1df63cfd 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -85,6 +85,7 @@ module BS_solvers logical :: run_Haydock=.FALSE. logical :: run_inversion=.FALSE. logical :: run_Diago=.FALSE. + logical :: load_Diago=.FALSE. logical :: run_Slepc=.FALSE. ! ! Solvers (Diago) From 308f9d355e291242f1113c3d6e5d01e01e770a12 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 9 Sep 2025 16:56:46 +0200 Subject: [PATCH 1106/1367] Small fix --- ypp/excitons/excitons_sort_and_report.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ypp/excitons/excitons_sort_and_report.F b/ypp/excitons/excitons_sort_and_report.F index 536923642d..d7b3a6789a 100644 --- a/ypp/excitons/excitons_sort_and_report.F +++ b/ypp/excitons/excitons_sort_and_report.F @@ -174,7 +174,7 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) enddo endif if (write_soc_corr) then - if (.not.any((/EXCITONS_user_indexes==j2/))) cycle + !if (.not.any((/EXCITONS_user_indexes==j2/))) cycle n_elements=n_elements+2 rv(n_elements-1:n_elements)=(/BS_E_SOC_corr(1,j2),BS_E_SOC_corr(2,j2)/)*HA2EV*1000._SP endif From 031e1e1cac66ba0388cac0f006467acc8346204c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 12 Sep 2025 10:00:42 +0200 Subject: [PATCH 1107/1367] Added reference to equations --- src/output/K_OUTPUT.F | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 1ef7fe85b9..fdf3910011 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -111,7 +111,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) endif enddo ! - ! Eq.(1.12) PRB 48, 11705 (1993) + ! Eqs.(23a) and (48a) in PRB 95, 155203 (2017), + ! from Eq.(1.12) PRB 48, 11705 (1993) ! A_drude=para_term_w0-diam_term_exact ! From 1653719499520bbd31aa6a7f03ca987f46295903 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 16 Sep 2025 08:51:03 +0200 Subject: [PATCH 1108/1367] Fixed compilation issue --- src/nloptics/NL_initialize.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index ba12bf4ebb..f5b836b894 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -523,7 +523,7 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) enddo - call msg( 'r', 'Efield T_0 ',T_0*AUTFS,"[fs]") + call msg( 'r', 'Efield T_0 ',T_0*AUT2FS,"[fs]") if (.not.l_pump_and_probe) then call msg( 'r', 'Frequencies range ',NL_er*HA2EV) call msg( 'sr','Frequencies steps ',n_frequencies) From c87f0a1f99d0384f9700049115ce5ce04f132230 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 16 Sep 2025 10:22:21 +0200 Subject: [PATCH 1109/1367] Version 5.3.0, Revision 25069, Hash 1653719499 MODIFIED * configure include/version/version.m4 driver/title.c Bugs: - Additions: - Changes: -Start changing logo... work in progress Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/driver/title.c | 18 +++++++----------- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/configure b/configure index 56f06cd74a..c9cf7f0dbb 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25035 h.77ee34b3c3. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25069 h.1653719499. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25035 h.77ee34b3c3' -PACKAGE_STRING='Yambo 5.3.0 r.25035 h.77ee34b3c3' +PACKAGE_VERSION='5.3.0 r.25069 h.1653719499' +PACKAGE_STRING='Yambo 5.3.0 r.25069 h.1653719499' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25035 h.77ee34b3c3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25069 h.1653719499 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25035 h.77ee34b3c3:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25069 h.1653719499:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25035 h.77ee34b3c3 +Yambo configure 5.3.0 r.25069 h.1653719499 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25035 h.77ee34b3c3, which was +It was created by Yambo $as_me 5.3.0 r.25069 h.1653719499, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25035" -SHASH="77ee34b3c3" +SREVISION="25069" +SHASH="1653719499" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25035 h.77ee34b3c3, which was +This file was extended by Yambo $as_me 5.3.0 r.25069 h.1653719499, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25035 h.77ee34b3c3 +Yambo config.status 5.3.0 r.25069 h.1653719499 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 53b614a377..94ce0a1984 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25035 h.77ee34b3c3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25069 h.1653719499, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25035" -SHASH="77ee34b3c3" +SREVISION="25069" +SHASH="1653719499" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/driver/title.c b/src/driver/title.c index d250e45de6..106c6f3ac7 100644 --- a/src/driver/title.c +++ b/src/driver/title.c @@ -15,17 +15,13 @@ void title(FILE *file_name, char *cmnt, struct tool_struct t) char *tool = running_tool(); char *pj = running_project(); char *libs = running_libraries(); - fprintf(file_name, "%s%s\n", cmnt, " ___ __ _____ __ __ _____ _____ "); - fprintf(file_name, "%s%s\n", cmnt, - "| Y || _ || Y || _ \\ | _ |"); - fprintf(file_name, "%s%s\n", cmnt, "| | ||. | ||. ||. | / |. | |"); - fprintf(file_name, "%s%s\n", cmnt, - " \\ _/ |. _ ||.\\ / ||. _ \\ |. | |"); - fprintf(file_name, "%s%s\n", cmnt, - " |: | |: | ||: | ||: | \\|: | |"); - fprintf(file_name, "%s%s\n", cmnt, " |::| |:.|:.||:.|:.||::. /|::. |"); - fprintf(file_name, "%s%s\n", cmnt, - " `--\" `-- --\"`-- --\"`-----\" `-----\""); + fprintf(file_name, "%s%s\n", cmnt, " _ "); + fprintf(file_name, "%s%s\n", cmnt, "| |"); + fprintf(file_name, "%s%s\n", cmnt, "| | _ _ _ ______ ____ ___"); + fprintf(file_name, "%s%s\n", cmnt, "| | | | | | '_ \\/ _ \\ _` \\"); + fprintf(file_name, "%s%s\n", cmnt, "| | | | | | | | | | | ___/ | | |"); + fprintf(file_name, "%s%s\n", cmnt, "| |___ | |_| | | | | | | _ | | |"); + fprintf(file_name, "%s%s\n", cmnt, "\\____/ \\__,__|_| |_| |_/\\___|_| |_|"); fprintf(file_name, "%s '%s' \n", cmnt, t.desc); if (strlen(pj) > 0) { From 0db203eec186d703321c11280c7add678cfe9fa3 Mon Sep 17 00:00:00 2001 From: thge123 Date: Fri, 19 Sep 2025 10:32:45 +0200 Subject: [PATCH 1110/1367] first commit --- .gitignore | 5 +++ make_clean+core.sh | 16 ++++++++ make_clean+yambo.sh | 8 ++++ make_core.sh | 15 +++++++ make_distclean+core.sh | 11 +++++ symlink_modules.sh | 7 ++++ ...o_intel_single_precission_omp_configure.sh | 41 +++++++++++++++++++ 7 files changed, 103 insertions(+) create mode 100755 make_clean+core.sh create mode 100755 make_clean+yambo.sh create mode 100755 make_core.sh create mode 100755 make_distclean+core.sh create mode 100755 symlink_modules.sh create mode 100755 yambo_intel_single_precission_omp_configure.sh diff --git a/.gitignore b/.gitignore index 99a2db6bbc..de6dd8ef8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# Personal # +############ +./make_*.sh +./symlink_modules*.sh + # DEPS # ######## modulesdep.list diff --git a/make_clean+core.sh b/make_clean+core.sh new file mode 100755 index 0000000000..7ccd473c19 --- /dev/null +++ b/make_clean+core.sh @@ -0,0 +1,16 @@ +#/bin/zsh -l + +make clean +make core + +rm /home/tgeirsson/apps/lumen-fork/bin/yambo +rm /home/tgeirsson/apps/lumen-fork/bin/p2y +rm /home/tgeirsson/apps/lumen-fork/bin/a2y +rm /home/tgeirsson/apps/lumen-fork/bin/c2y +rm /home/tgeirsson/apps/lumen-fork/bin/ypp + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/make_clean+yambo.sh b/make_clean+yambo.sh new file mode 100755 index 0000000000..ffd9ac2777 --- /dev/null +++ b/make_clean+yambo.sh @@ -0,0 +1,8 @@ +#/bin/zsh -l + +make clean +make core + +rm /home/tgeirsson/apps/lumen-fork/bin/yambo + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo diff --git a/make_core.sh b/make_core.sh new file mode 100755 index 0000000000..77f2c84817 --- /dev/null +++ b/make_core.sh @@ -0,0 +1,15 @@ +#/bin/zsh -l + +make core + +rm /home/tgeirsson/apps/lumen-fork/bin/yambo +rm /home/tgeirsson/apps/lumen-fork/bin/p2y +rm /home/tgeirsson/apps/lumen-fork/bin/a2y +rm /home/tgeirsson/apps/lumen-fork/bin/c2y +rm /home/tgeirsson/apps/lumen-fork/bin/ypp + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/make_distclean+core.sh b/make_distclean+core.sh new file mode 100755 index 0000000000..3d7d9d2164 --- /dev/null +++ b/make_distclean+core.sh @@ -0,0 +1,11 @@ +#/bin/zsh -l + +make distclean +./yambo_intel_single_precission_omp_configure.sh +make core + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/symlink_modules.sh b/symlink_modules.sh new file mode 100755 index 0000000000..dda5817ff8 --- /dev/null +++ b/symlink_modules.sh @@ -0,0 +1,7 @@ +#/bin/zsh -l + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumen-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumen-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumen-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumen-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumen-fork/bin/ypp diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh new file mode 100755 index 0000000000..fb355395bc --- /dev/null +++ b/yambo_intel_single_precission_omp_configure.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 + +NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" +NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" +HDF5_ROOT="/apps/software/hdf5/1.12.1" +LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" +PETSC_ROOT="/apps/software/petsc/3.16.3" +SLEPC_ROOT="/apps/software/slepc/3.16.1" +YAMBO_LIBS_ROOT="${HOME}/yambo-libs" + +./configure \ +FC=ifort \ +CC=icc \ +MPICC=mpiicc \ +MPIFC=mpiifort \ +--enable-msgs-comps \ +--enable-time-profile \ +--enable-mpi \ +--enable-open-mp \ +--enable-iotk \ +--without-editor \ +--enable-memory-profile \ +--enable-keep-src \ +--enable-hdf5-par-io \ +--with-mpi-path="${I_MPI_ROOT}" \ +--with-netcdf-path=${NETCDF_ROOT} \ +--with-netcdff-path=${NETCDFF_ROOT} \ +--with-hdf5-path=${HDF5_ROOT} \ +--with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blacs-libs="mkl" \ +--with-scalapack-libs="mkl" \ +--with-extlibs-path="${YAMBO_LIBS_ROOT}" + +#--enable-slepc-linalg \ +#--with-petsc-path="${PETSC_ROOT}" \ +#--with-slepc-path="${SLEPC_ROOT}" \ +#--with-libxc-path="${LIBXC_ROOT}" \ From a515ae95ec72f70f246888b7dc9f4d4b1fc29da2 Mon Sep 17 00:00:00 2001 From: thge123 Date: Fri, 19 Sep 2025 10:36:57 +0200 Subject: [PATCH 1111/1367] .gitignore fix --- make_clean+core.sh | 16 ---------------- make_clean+yambo.sh | 8 -------- make_core.sh | 15 --------------- make_distclean+core.sh | 11 ----------- symlink_modules.sh | 7 ------- 5 files changed, 57 deletions(-) delete mode 100755 make_clean+core.sh delete mode 100755 make_clean+yambo.sh delete mode 100755 make_core.sh delete mode 100755 make_distclean+core.sh delete mode 100755 symlink_modules.sh diff --git a/make_clean+core.sh b/make_clean+core.sh deleted file mode 100755 index 7ccd473c19..0000000000 --- a/make_clean+core.sh +++ /dev/null @@ -1,16 +0,0 @@ -#/bin/zsh -l - -make clean -make core - -rm /home/tgeirsson/apps/lumen-fork/bin/yambo -rm /home/tgeirsson/apps/lumen-fork/bin/p2y -rm /home/tgeirsson/apps/lumen-fork/bin/a2y -rm /home/tgeirsson/apps/lumen-fork/bin/c2y -rm /home/tgeirsson/apps/lumen-fork/bin/ypp - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/make_clean+yambo.sh b/make_clean+yambo.sh deleted file mode 100755 index ffd9ac2777..0000000000 --- a/make_clean+yambo.sh +++ /dev/null @@ -1,8 +0,0 @@ -#/bin/zsh -l - -make clean -make core - -rm /home/tgeirsson/apps/lumen-fork/bin/yambo - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo diff --git a/make_core.sh b/make_core.sh deleted file mode 100755 index 77f2c84817..0000000000 --- a/make_core.sh +++ /dev/null @@ -1,15 +0,0 @@ -#/bin/zsh -l - -make core - -rm /home/tgeirsson/apps/lumen-fork/bin/yambo -rm /home/tgeirsson/apps/lumen-fork/bin/p2y -rm /home/tgeirsson/apps/lumen-fork/bin/a2y -rm /home/tgeirsson/apps/lumen-fork/bin/c2y -rm /home/tgeirsson/apps/lumen-fork/bin/ypp - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/make_distclean+core.sh b/make_distclean+core.sh deleted file mode 100755 index 3d7d9d2164..0000000000 --- a/make_distclean+core.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/zsh -l - -make distclean -./yambo_intel_single_precission_omp_configure.sh -make core - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/symlink_modules.sh b/symlink_modules.sh deleted file mode 100755 index dda5817ff8..0000000000 --- a/symlink_modules.sh +++ /dev/null @@ -1,7 +0,0 @@ -#/bin/zsh -l - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumen-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumen-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumen-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumen-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumen-fork/bin/ypp From 0b8dff91b7ad8c8428b6e3e3ad29766c8b3c0e07 Mon Sep 17 00:00:00 2001 From: thge123 Date: Fri, 19 Sep 2025 10:38:08 +0200 Subject: [PATCH 1112/1367] second fix... --- ...o_intel_single_precission_omp_configure.sh | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100755 yambo_intel_single_precission_omp_configure.sh diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh deleted file mode 100755 index fb355395bc..0000000000 --- a/yambo_intel_single_precission_omp_configure.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 - -NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" -NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" -HDF5_ROOT="/apps/software/hdf5/1.12.1" -LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" -PETSC_ROOT="/apps/software/petsc/3.16.3" -SLEPC_ROOT="/apps/software/slepc/3.16.1" -YAMBO_LIBS_ROOT="${HOME}/yambo-libs" - -./configure \ -FC=ifort \ -CC=icc \ -MPICC=mpiicc \ -MPIFC=mpiifort \ ---enable-msgs-comps \ ---enable-time-profile \ ---enable-mpi \ ---enable-open-mp \ ---enable-iotk \ ---without-editor \ ---enable-memory-profile \ ---enable-keep-src \ ---enable-hdf5-par-io \ ---with-mpi-path="${I_MPI_ROOT}" \ ---with-netcdf-path=${NETCDF_ROOT} \ ---with-netcdff-path=${NETCDFF_ROOT} \ ---with-hdf5-path=${HDF5_ROOT} \ ---with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blacs-libs="mkl" \ ---with-scalapack-libs="mkl" \ ---with-extlibs-path="${YAMBO_LIBS_ROOT}" - -#--enable-slepc-linalg \ -#--with-petsc-path="${PETSC_ROOT}" \ -#--with-slepc-path="${SLEPC_ROOT}" \ -#--with-libxc-path="${LIBXC_ROOT}" \ From 29affc51855916dbeb11e8ed90edd044bbc131bc Mon Sep 17 00:00:00 2001 From: thge123 Date: Fri, 19 Sep 2025 15:56:00 +0200 Subject: [PATCH 1113/1367] eps=ME attempt --- .gitignore | 1 + make_clean+core.sh | 16 +++++ make_clean+yambo.sh | 8 +++ make_core.sh | 15 +++++ make_distclean+core.sh | 11 +++ src/allocations/X_ALLOC_elemental.F | 6 +- src/allocations/X_ALLOC_global.F | 7 +- src/bse/K_IP.F | 35 ++++++++-- src/bse/K_dipoles.F | 5 +- src/bse/K_observables.F | 43 ++++++------ src/interface/INIT_load.F | 2 +- src/modules/mod_BS.F | 1 + src/modules/mod_X.F | 1 + src/output/K_OUTPUT.F | 67 ++++++++++++++++++- src/output/X_OUTPUT_driver.F | 19 +++++- symlink_modules.sh | 11 +++ ...o_intel_single_precission_omp_configure.sh | 41 ++++++++++++ 17 files changed, 254 insertions(+), 35 deletions(-) create mode 100755 make_clean+core.sh create mode 100755 make_clean+yambo.sh create mode 100755 make_core.sh create mode 100755 make_distclean+core.sh create mode 100755 symlink_modules.sh create mode 100755 yambo_intel_single_precission_omp_configure.sh diff --git a/.gitignore b/.gitignore index de6dd8ef8d..93b3b2fa76 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ ############ ./make_*.sh ./symlink_modules*.sh +./yambo_intel_single_precission_omp_configure.sh # DEPS # ######## diff --git a/make_clean+core.sh b/make_clean+core.sh new file mode 100755 index 0000000000..4d878ac503 --- /dev/null +++ b/make_clean+core.sh @@ -0,0 +1,16 @@ +#/bin/zsh -l + +make clean +make core + +rm /home/tgeirsson/apps/lumen-fork/bin/yambo +rm /home/tgeirsson/apps/lumen-fork/bin/p2y +rm /home/tgeirsson/apps/lumen-fork/bin/a2y +rm /home/tgeirsson/apps/lumen-fork/bin/c2y +rm /home/tgeirsson/apps/lumen-fork/bin/ypp + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumen-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumen-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumen-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumen-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumen-fork/bin/ypp diff --git a/make_clean+yambo.sh b/make_clean+yambo.sh new file mode 100755 index 0000000000..ffd9ac2777 --- /dev/null +++ b/make_clean+yambo.sh @@ -0,0 +1,8 @@ +#/bin/zsh -l + +make clean +make core + +rm /home/tgeirsson/apps/lumen-fork/bin/yambo + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo diff --git a/make_core.sh b/make_core.sh new file mode 100755 index 0000000000..77f2c84817 --- /dev/null +++ b/make_core.sh @@ -0,0 +1,15 @@ +#/bin/zsh -l + +make core + +rm /home/tgeirsson/apps/lumen-fork/bin/yambo +rm /home/tgeirsson/apps/lumen-fork/bin/p2y +rm /home/tgeirsson/apps/lumen-fork/bin/a2y +rm /home/tgeirsson/apps/lumen-fork/bin/c2y +rm /home/tgeirsson/apps/lumen-fork/bin/ypp + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/make_distclean+core.sh b/make_distclean+core.sh new file mode 100755 index 0000000000..3d7d9d2164 --- /dev/null +++ b/make_distclean+core.sh @@ -0,0 +1,11 @@ +#/bin/zsh -l + +make distclean +./yambo_intel_single_precission_omp_configure.sh +make core + +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 635f83e512..dcd31df47c 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -15,7 +15,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) ! use pars, ONLY:rZERO,cZERO use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Joint_DOS,BS_E_sorted,BS_E_sorted_indx, & -& Epsilon_ij,X_magnons,X_dichroism, & +& Epsilon_ij,X_magnons,X_dichroism,ME_ii, & & X_fxc,EEL,Alpha,X_mat,DEV_VAR(X_mat),X_drude_term,X_RLcomp_ig use PHOTOLUM, ONLY:PL use stderr, ONLY:STRING_match @@ -75,6 +75,10 @@ subroutine X_ALLOC_elemental(WHAT,DIM) if (allocated(X_mat)) return YAMBO_ALLOC(X_mat,(DIM(1),DIM(2),DIM(3))) X_mat=cZERO + case('ME') + if (allocated(ME_ii)) return + YAMBO_ALLOC(ME_ii,(DIM(1),DIM(2))) !2(int)3(nonint)4(n-1 Haydock/inv shifted) + ME_ii = cZERO #ifdef _GPU YAMBO_ALLOC_GPU_SOURCE(DEV_VAR(X_mat),X_mat) #endif diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index 2f2c443eec..cf514f83b1 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -14,7 +14,7 @@ subroutine X_ALLOC_global(WHAT,W) use pars, ONLY:cZERO use ALLOC, ONLY:X_ALLOC_elemental use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Epsilon_ij,& -& Alpha,Joint_DOS,X_magnons,X_dichroism,EEL,X_do_obs +& Alpha,Joint_DOS,X_magnons,X_dichroism,EEL,X_do_obs,ME_ii use frequency, ONLY:w_samp use drivers, ONLY:l_optics use BS_solvers, ONLY:B_Hall @@ -80,6 +80,11 @@ subroutine X_ALLOC_global(WHAT,W) if (X_do_obs("Esort")) call X_ALLOC_elemental("BS_E_SORTED",(/1000,9,2/)) if (X_do_obs("fxc")) call X_ALLOC_elemental("FXC",(/W%n_freqs/)) ! + if (X_do_obs("ME")) then + write(*,*) "(X_ALLOC_global): Called X_ALLOC_elemental(ME)" + call X_ALLOC_elemental("ME",(/W%n_freqs,4/)) + ME_ii(:,1)=W%p(:) + endif else if (WHAT=="FREE") then call X_ALLOC_elemental("FREE ALL") endif diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 7c3bf0f708..3df7a00d18 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -22,12 +22,12 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) use electrons, ONLY:levels,spin_occ,spin,nel,n_sp_pol,n_spinor use X_m, ONLY:Resp_ii,Joint_DOS,alpha_dim,eps_2_alpha,& & X_drude_term,global_gauge,N_BS_E_sorted,i_G_shift,& -& skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism +& skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism,ME_ii use BS_solvers, ONLY:Co_factor,diam_term_exact,para_term_w0,BSS_Wd,BSS_mode,BSS_uses_DbGd,FG_factor use BS, ONLY:BS_T_grp,BS_nkFGbz_in_Tgrp,BS_nT_grps,BS_perturbative_SOC,& & BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_H_dim,l_BS_kerr_asymm,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BS_K_anti_resonant,l_BS_ares_from_res +& BS_K_anti_resonant,l_BS_ares_from_res,l_BS_magnetoelectric use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& & PAR_COM_Xk_ibz_INDEX @@ -56,7 +56,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) integer :: i_ColFG complex(SP), allocatable :: E_DbGd(:) ! - complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich + complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_me integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! @@ -238,8 +238,13 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_magn=res_magn*f_eh*Z_eh if (l_BS_esort.and.i_res_ares==1) then call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(1),vtmpC) - if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) - endif + if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) + endif + endif + if(l_BS_magnetoelectric) then + res_me=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me=res_me*f_eh*Z_eh*E_eh + if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) endif ! if ( abs(real(E_plus_W0)) < Dip%Energy_threshold .and. iq==1 .and. dip_r ) then @@ -247,6 +252,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_kerr=0._SP res_PL =0._SP res_dich=0._SP + res_me =0._SP endif ! ! Response functions and pert SOC loop @@ -317,6 +323,14 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif ! + if (l_BS_magnetoelectric) then + do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_T_g) + ME_ii(:,3)=ME_ii(:,3)-res_me/(W_bss%p(:)-E_plus_W(i_pert_SOC)-E_DbGd(i_ColFG)) + if (BS_K_anti_resonant.and.l_BS_ares_from_res) then + ME_ii(:,3)=ME_ii(:,3)+conjg(res_me)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC)+E_DbGd(i_ColFG))) + endif + enddo + endif enddo ! deallocate(E_DbGd) @@ -330,6 +344,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_abs) Resp_ii(:,3) = Resp_ii(:,3) * FG_factor ! + if (l_BS_magnetoelectric) ME_ii(:,3) = ME_ii(:,3) * FG_factor + ! ! Sorting procedure !=================== if (l_BS_esort) call K_IP_sort("sort",0,nVAR,(/0,0,0,0,0/),vtmpI,cZERO,vtmpC) @@ -370,6 +386,11 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) call PP_redux_wait( X_magnons(:,:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait( X_magnons(:,:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) endif + if(l_BS_magnetoelectric) then + call PP_redux_wait( ME_ii(:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait( ME_ii(:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) + endif + ! ! Factors and more !================== @@ -403,7 +424,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! - if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism") + if (l_BS_magnetoelectric) ME_ii(:,3)=ME_ii(:,3)*Co_factor + ! + if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism magnetoelectric") call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") ! ! Clean diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 3c7d195bca..7d1ba6eca5 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -29,7 +29,8 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) use BS, ONLY:BS_T_grp,BS_K_coupling,BS_nT_grps,BSE_L_kind,BS_bands,& & BS_dip_size,l_BS_trace,BS_n_eh_spaces,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BSE_dipole_geometry,BS_field_direction,l_BS_ares_from_res +& BSE_dipole_geometry,BS_field_direction,l_BS_ares_from_res,& +& l_BS_magnetoelectric use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& & PAR_COM_Xk_ibz_INDEX @@ -157,7 +158,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! *velocity* : DIP(c,v,k) is q_ver* while I need q_ver* = conjg(q_ver*) ! ! Absorption, KERR, PL, Dichroism - if(l_BS_abs.or.l_BS_kerr.or.l_BS_photolum.or.l_BS_dichroism) then + if(l_BS_abs.or.l_BS_kerr.or.l_BS_photolum.or.l_BS_dichroism.or.l_BS_magnetoelectric) then ! if(iq==1.and.i_G_shift==1) then call DIPOLE_rotate(ic,iv,ik_bz,i_sp_pol_c,trim(DIP_kind),Xk,DIP_bare) diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 636e7bbc4a..57984c2007 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -18,7 +18,8 @@ subroutine K_observables(W,Xk) use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,BSS_mode use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& & l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,& -& l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum,l_BS_kerr_asymm,l_BS_esort_indx +& l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum,l_BS_kerr_asymm,l_BS_esort_indx,& +& l_BS_magnetoelectric use parser_m, ONLY:parser use stderr, ONLY:STRING_match use electrons, ONLY:levels,n_sp_pol,n_spin @@ -34,14 +35,15 @@ subroutine K_observables(W,Xk) ! ! What... !========= - l_BS_abs = STRING_match(BSE_prop,'abs') - l_BS_jdos = STRING_match(BSE_prop,'jdos') - l_BS_dichroism = STRING_match(BSE_prop,'dich') - l_BS_kerr = STRING_match(BSE_prop,'kerr') - l_BS_photolum = STRING_match(BSE_prop,'photolum') - l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 - l_BS_kerr_asymm= STRING_match(BSE_prop,'asymm') .and. l_BS_kerr - l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr + l_BS_abs = STRING_match(BSE_prop,'abs') + l_BS_jdos = STRING_match(BSE_prop,'jdos') + l_BS_dichroism = STRING_match(BSE_prop,'dich') + l_BS_kerr = STRING_match(BSE_prop,'kerr') + l_BS_photolum = STRING_match(BSE_prop,'photolum') + l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 + l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') .and. l_BS_kerr + l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr + l_BS_magnetoelectric = STRING_match(BSE_prop,'ME') ! ! How ... !--------- @@ -91,17 +93,18 @@ subroutine K_observables(W,Xk) ! Now fix BSE_prop string ! BSE_prop="" - if(l_BS_abs) BSE_prop=trim(BSE_prop)//' abs' - if(l_BS_jdos) BSE_prop=trim(BSE_prop)//' jdos' - if(l_BS_dichroism) BSE_prop=trim(BSE_prop)//' dich' - if(l_BS_kerr) BSE_prop=trim(BSE_prop)//' kerr' - if(l_BS_kerr_asymm) BSE_prop=trim(BSE_prop)//' asymm' - if(l_BS_anomalous_Hall) BSE_prop=trim(BSE_prop)//' anHall' - if(l_BS_photolum) BSE_prop=trim(BSE_prop)//' photolum' - if(l_BS_magnons) BSE_prop=trim(BSE_prop)//' magn' - if(l_BS_esort) BSE_prop=trim(BSE_prop)//' esrt' - if(l_BS_esort) BSE_prop=trim(BSE_prop)//' indx' - if(l_BS_trace) BSE_prop=trim(BSE_prop)//' trace' + if(l_BS_abs) BSE_prop=trim(BSE_prop)//' abs' + if(l_BS_jdos) BSE_prop=trim(BSE_prop)//' jdos' + if(l_BS_dichroism) BSE_prop=trim(BSE_prop)//' dich' + if(l_BS_kerr) BSE_prop=trim(BSE_prop)//' kerr' + if(l_BS_kerr_asymm) BSE_prop=trim(BSE_prop)//' asymm' + if(l_BS_anomalous_Hall) BSE_prop=trim(BSE_prop)//' anHall' + if(l_BS_photolum) BSE_prop=trim(BSE_prop)//' photolum' + if(l_BS_magnons) BSE_prop=trim(BSE_prop)//' magn' + if(l_BS_esort) BSE_prop=trim(BSE_prop)//' esrt' + if(l_BS_esort) BSE_prop=trim(BSE_prop)//' indx' + if(l_BS_trace) BSE_prop=trim(BSE_prop)//' trace' + if(l_BS_magnetoelectric) BSE_prop=trim(BSE_prop)//' ME' ! ! Solver Logicals !================= diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index edc4e875dd..f7abcdb4c1 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -310,7 +310,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'NoCondSumRule' ,'[BSE/X] Do not impose the conductivity sum rule in velocity gauge',verb_level=V_resp) call it('f',defs,'MetDamp' , '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) - call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt',BSE_prop) + call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt/ME',BSE_prop) call it(defs,'BSEdips', '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry) call it(defs,'BSSldiaLib','[BSS] Library used with ldiago solver `(s)calapack/(e)lpa`',BSS_ldiago_solver) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 4f3d98d90c..4867e51675 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -65,6 +65,7 @@ module BS logical :: l_BS_optics logical :: l_BS_esort logical :: l_BS_esort_indx + logical :: l_BS_magnetoelectric ! ! Dimensions !============= diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 1c8b654d9a..7bebf770c3 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -80,6 +80,7 @@ module X_m complex(SP), allocatable :: X_fxc(:) complex(SP), allocatable :: X_magnons(:,:,:) complex(SP), allocatable :: X_dichroism(:,:) + complex(SP), allocatable :: ME_ii(:,:) ! ! Response function ! diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 1ef7fe85b9..32f5685736 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -19,7 +19,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use X_m, ONLY:Epsilon_ii,eps_2_alpha,X_OUTPUT_driver,Epsilon_ij,& & X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,& & BS_E_sorted_indx,X_magnons,i_G_shift,Q_plus_G_pt,Q_plus_G_sq_modulus,& -& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge +& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge,ME_ii use com, ONLY:msg,com_compose_msg use R_lattice, ONLY:bare_qpg,FineGd_desc,nkbz use electrons, ONLY:spin_occ @@ -135,6 +135,46 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) enddo ! endif + + if (X_do_obs("ME")) then + ! + fac=eps_2_alpha/4._SP/pi + if (l_col_cut) fac=fac*bare_qpg(iq,i_G_shift)**2/Q_plus_G_sq_modulus + ! + ! Resp = -vX + do i_rsp=1,n_resp + spectra(:,i_rsp)=cmplx(ME_ii(:,i_rsp+1),kind=DP) + spectra(:,i_rsp)=cmplx(ME_ii(:,i_rsp+1),kind=DP) + !if (X_do_obs("off").or.X_do_obs("beta")) then + ! spectra_ij(:,i_rsp)=ME_ij(:,i_rsp+1) + ! spectra_ij(:,i_rsp)=ME_ij(:,i_rsp+1) + !endif + enddo + ! + ! Eq.(1.12) PRB 48, 11705 (1993) + ! + A_drude=para_term_w0-diam_term_exact + ! + if (trim(global_gauge)=='velocity') then + ! DS. Note. The sum rule imposition does not work if neq occupations are loaded. Not sure why. + if ( skip_cond_sum_rule) diam_term_used=diam_term_exact + if (.not.skip_cond_sum_rule) diam_term_used=para_term_w0 + spectra(:,1)=spectra(:,1)-diam_term_used(2) + spectra(:,2)=spectra(:,2)-diam_term_used(1) + spectra(:,3)=spectra(:,3)-diam_term_used(3) + endif + ! + do i_rsp=1,n_resp + if(trim(global_gauge)=='length' ) spectra(:,i_rsp)= spectra(:,i_rsp)/bare_qpg(iq,i_G_shift)**2 + if(trim(global_gauge)=='velocity') spectra(:,i_rsp)= spectra(:,i_rsp)/ W%p(:)**2 + ! + if (X_do_obs("off").or.X_do_obs("beta")) then + if(trim(global_gauge)=='length' ) spectra_ij(:,i_rsp)=spectra_ij(:,i_rsp)/bare_qpg(iq,i_G_shift)**2 + if(trim(global_gauge)=='velocity') spectra_ij(:,i_rsp)=spectra_ij(:,i_rsp)/ W%p(:)**2 + endif + enddo + ! + endif ! ! ABSORPTION ! @@ -307,6 +347,31 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) call ELEMENTAL_dump_real("PL",PL(:,2:3)) endif ! + ! MAGNETOELECTRIC + !------------ + if (X_do_obs("ME")) then + ! ME DEBUG + write(*,*) "X_do_obs(ME)=.true." + ! + call get_from_Lbar_or_Lfull_inverted(tmp_var_DP,spectra) + ! + Epsilon_ii(:,2:4)=cmplx(tmp_var_DP,kind=SP) + call add_drude_term(Epsilon_ii(:,2:4)) + ! + nel_diam(:)=real(A_drude(:))/real(nkbz,SP)*spin_occ/Co_factor + ! + ! ... Diamagnetic term + call msg("o eps",com_compose_msg(pre="# ",body="Diamagnetic term")," ",INDENT=0) + call msg("o eps",com_compose_msg(pre="# ",body="Ao"),nel_diam(1),INDENT=0,after_msg="[nel]") + if (.not.STRING_match(WHAT,"IP")) & + &call msg("o eps",com_compose_msg(pre="# ",body="A"),nel_diam(2),INDENT=0,after_msg="[nel]") + if (l_last_col) & + &call msg("o eps",com_compose_msg(pre="# ",body="A'"),nel_diam(3),INDENT=0,after_msg="[nel]") + ! + ! ... Epsilon_ii + call ELEMENTAL_dump("eps",Epsilon_ii(:,2:4)+1._SP) + endif + if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) if (STRING_match(WHAT,"reset")) call X_OUTPUT_driver("reset "//OBS) ! diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index a0f442f9b7..29d3d15e86 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -14,7 +14,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) use electrons, ONLY:n_spinor use PHOTOLUM, ONLY:PL use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_dichroism,BS_K_coupling,& -& l_BS_photolum,l_BS_abs,l_BS_jdos,l_BS_esort_indx,l_BS_esort +& l_BS_photolum,l_BS_abs,l_BS_jdos,l_BS_esort_indx,l_BS_esort,& +& l_BS_magnetoelectric use BS_solvers, ONLY:l_abs_prop_chi_bse,l_eels_can_be_computed use stderr, ONLY:STRING_match,STRING_split,intc,STRING_remove use OUTPUT, ONLY:OUTPUT_driver @@ -35,7 +36,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) ! Work Space integer ::it,itp,ik,ic character(schlen) ::key(10),BASIC_col(7) - character(5) ::obs_with_res(7) + character(5) ::obs_with_res(8) logical ::l_flag,l_print_res ! if (STRING_match(WHAT,"DEF")) then @@ -55,6 +56,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) call ELEMENTAL_init(14,"CD","Dichroism","dichroism") call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") + call ELEMENTAL_init(17,"ME","Magnetoelectric","magnetoelectric") endif ! if (STRING_match(WHAT,"INIT")) then @@ -88,6 +90,17 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_magnons) call X_obs_onoff("+ Spm") if (l_BS_magnons.and.n_spinor==2) call X_obs_onoff("+ Smp") if (l_BS_dichroism) call X_obs_onoff("+ CD") + if (l_BS_magnetoelectric) then + call X_obs_onoff("+ ME") + + ! ME DEBUG + write(*,*) "\n (X_OUTPUT_driver): X_obs_onoff(+ ME) called" + write(*,*) "\n (X_OUTPUT_driver): X_do_obs(ME)=", X_do_obs("ME") + else + write(*,*) "\n (X_OUTPUT_driver): X_obs_onoff(+ ME) NOT called" + endif + + ! ME DEBUG ! !...solvers specific if (present(solver)) then @@ -128,7 +141,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) X_obs(4)%N_columns=3 X_obs(4)%COL_header(1:3) = (/'Re(E)','Im(E)','N_deg'/) endif - obs_with_res=[character(5) :: "eps","alpha","Spm","Smp","off","beta","CD" ] + obs_with_res=[character(5) :: "eps","alpha","Spm","Smp","off","beta","CD","ME" ] do it=1,N_X_obs if (.not.X_do_obs(trim(X_obs(it)%what))) cycle l_print_res=.false. diff --git a/symlink_modules.sh b/symlink_modules.sh new file mode 100755 index 0000000000..7736884333 --- /dev/null +++ b/symlink_modules.sh @@ -0,0 +1,11 @@ +#/bin/zsh -l +rm ~/apps/lumen-fork/bin/yambo +rm ~/apps/lumen-fork/bin/p2y +rm ~/apps/lumen-fork/bin/a2y +rm ~/apps/lumen-fork/bin/c2y +rm ~/apps/lumen-fork/bin/ypp +ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumen-fork/bin/yambo +ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumen-fork/bin/p2y +ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumen-fork/bin/a2y +ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumen-fork/bin/c2y +ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumen-fork/bin/ypp diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh new file mode 100755 index 0000000000..fb355395bc --- /dev/null +++ b/yambo_intel_single_precission_omp_configure.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 + +NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" +NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" +HDF5_ROOT="/apps/software/hdf5/1.12.1" +LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" +PETSC_ROOT="/apps/software/petsc/3.16.3" +SLEPC_ROOT="/apps/software/slepc/3.16.1" +YAMBO_LIBS_ROOT="${HOME}/yambo-libs" + +./configure \ +FC=ifort \ +CC=icc \ +MPICC=mpiicc \ +MPIFC=mpiifort \ +--enable-msgs-comps \ +--enable-time-profile \ +--enable-mpi \ +--enable-open-mp \ +--enable-iotk \ +--without-editor \ +--enable-memory-profile \ +--enable-keep-src \ +--enable-hdf5-par-io \ +--with-mpi-path="${I_MPI_ROOT}" \ +--with-netcdf-path=${NETCDF_ROOT} \ +--with-netcdff-path=${NETCDFF_ROOT} \ +--with-hdf5-path=${HDF5_ROOT} \ +--with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blacs-libs="mkl" \ +--with-scalapack-libs="mkl" \ +--with-extlibs-path="${YAMBO_LIBS_ROOT}" + +#--enable-slepc-linalg \ +#--with-petsc-path="${PETSC_ROOT}" \ +#--with-slepc-path="${SLEPC_ROOT}" \ +#--with-libxc-path="${LIBXC_ROOT}" \ From da1c6f01af466081dd046d03bab5ffbf714f993d Mon Sep 17 00:00:00 2001 From: thge123 Date: Fri, 19 Sep 2025 16:20:04 +0200 Subject: [PATCH 1114/1367] ME output working --- src/modules/mod_X.F | 2 +- src/output/K_OUTPUT.F | 21 ++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 7bebf770c3..fdc18dbd08 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -165,7 +165,7 @@ module X_m integer :: N_messages character(schlen) :: messages(N_MAX_columns) end type - integer, parameter :: N_X_obs=16 + integer, parameter :: N_X_obs=17 type(X_obs_t) :: X_obs(N_X_obs) ! interface diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 32f5685736..6fdfebce34 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -351,25 +351,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) !------------ if (X_do_obs("ME")) then ! ME DEBUG - write(*,*) "X_do_obs(ME)=.true." - ! - call get_from_Lbar_or_Lfull_inverted(tmp_var_DP,spectra) - ! - Epsilon_ii(:,2:4)=cmplx(tmp_var_DP,kind=SP) - call add_drude_term(Epsilon_ii(:,2:4)) - ! - nel_diam(:)=real(A_drude(:))/real(nkbz,SP)*spin_occ/Co_factor - ! - ! ... Diamagnetic term - call msg("o eps",com_compose_msg(pre="# ",body="Diamagnetic term")," ",INDENT=0) - call msg("o eps",com_compose_msg(pre="# ",body="Ao"),nel_diam(1),INDENT=0,after_msg="[nel]") - if (.not.STRING_match(WHAT,"IP")) & - &call msg("o eps",com_compose_msg(pre="# ",body="A"),nel_diam(2),INDENT=0,after_msg="[nel]") - if (l_last_col) & - &call msg("o eps",com_compose_msg(pre="# ",body="A'"),nel_diam(3),INDENT=0,after_msg="[nel]") - ! - ! ... Epsilon_ii - call ELEMENTAL_dump("eps",Epsilon_ii(:,2:4)+1._SP) + write(*,*) "(K_OUTPUT.F): X_do_obs(ME)=.true." + call ELEMENTAL_dump("ME",ME_ii(:,2:4)) endif if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) From f4142b31bf1fdf46f80fbd94b33c2df4a00765bd Mon Sep 17 00:00:00 2001 From: thge123 Date: Fri, 19 Sep 2025 17:31:41 +0200 Subject: [PATCH 1115/1367] sigma*r calc. fix --- src/allocations/X_ALLOC_global.F | 1 - src/bse/K_IP.F | 8 +++- src/bse/K_dipoles.F | 2 +- src/modules/mod_BS.F | 4 +- src/output/K_OUTPUT.F | 73 +++++++++++++------------------- src/output/X_OUTPUT_driver.F | 11 +---- 6 files changed, 41 insertions(+), 58 deletions(-) diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index cf514f83b1..1e82929f09 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -81,7 +81,6 @@ subroutine X_ALLOC_global(WHAT,W) if (X_do_obs("fxc")) call X_ALLOC_elemental("FXC",(/W%n_freqs/)) ! if (X_do_obs("ME")) then - write(*,*) "(X_ALLOC_global): Called X_ALLOC_elemental(ME)" call X_ALLOC_elemental("ME",(/W%n_freqs,4/)) ME_ii(:,1)=W%p(:) endif diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 3df7a00d18..e96f8215b2 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -242,7 +242,12 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif if(l_BS_magnetoelectric) then - res_me=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + ! + ! Gives seg. fault... + res_me=BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1) ! Only Sx + res_me=res_me*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + ! + !res_me=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) res_me=res_me*f_eh*Z_eh*E_eh if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) endif @@ -386,6 +391,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) call PP_redux_wait( X_magnons(:,:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait( X_magnons(:,:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) endif + ! if(l_BS_magnetoelectric) then call PP_redux_wait( ME_ii(:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait( ME_ii(:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 7d1ba6eca5..e561e14b56 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -198,7 +198,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) endif ! ! Magnons - if (l_BS_magnons) then + if (l_BS_magnons.or.l_BS_magnetoelectric) then ! ! notice: ! In optics q=0 requires a special treatment due to the non analytic behaviour diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 4867e51675..1e5e7bbe78 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -318,7 +318,7 @@ subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) ! YAMBO_ALLOC(BS_T_grp(iT)%dipoles_opt,(BS_dip_size,nT,nDIP)) BS_T_grp(iT)%dipoles_opt=cZERO - if(l_BS_magnons) then + if(l_BS_magnons.or.l_BS_magnetoelectric) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_mag,(2,nT,nDIP)) endif if(l_BS_dichroism) then @@ -356,7 +356,7 @@ subroutine BS_Blocks_and_Transitions_free() if (.not.allocated(BS_T_grp(iT)%table)) cycle ! YAMBO_FREE(BS_T_grp(iT)%dipoles_opt) - if (l_BS_magnons) then + if (l_BS_magnons.or.l_BS_magnetoelectric) then YAMBO_FREE(BS_T_grp(iT)%dipoles_mag) endif if (l_BS_dichroism) then diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 6fdfebce34..9ba6ee731f 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -136,46 +136,6 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! endif - if (X_do_obs("ME")) then - ! - fac=eps_2_alpha/4._SP/pi - if (l_col_cut) fac=fac*bare_qpg(iq,i_G_shift)**2/Q_plus_G_sq_modulus - ! - ! Resp = -vX - do i_rsp=1,n_resp - spectra(:,i_rsp)=cmplx(ME_ii(:,i_rsp+1),kind=DP) - spectra(:,i_rsp)=cmplx(ME_ii(:,i_rsp+1),kind=DP) - !if (X_do_obs("off").or.X_do_obs("beta")) then - ! spectra_ij(:,i_rsp)=ME_ij(:,i_rsp+1) - ! spectra_ij(:,i_rsp)=ME_ij(:,i_rsp+1) - !endif - enddo - ! - ! Eq.(1.12) PRB 48, 11705 (1993) - ! - A_drude=para_term_w0-diam_term_exact - ! - if (trim(global_gauge)=='velocity') then - ! DS. Note. The sum rule imposition does not work if neq occupations are loaded. Not sure why. - if ( skip_cond_sum_rule) diam_term_used=diam_term_exact - if (.not.skip_cond_sum_rule) diam_term_used=para_term_w0 - spectra(:,1)=spectra(:,1)-diam_term_used(2) - spectra(:,2)=spectra(:,2)-diam_term_used(1) - spectra(:,3)=spectra(:,3)-diam_term_used(3) - endif - ! - do i_rsp=1,n_resp - if(trim(global_gauge)=='length' ) spectra(:,i_rsp)= spectra(:,i_rsp)/bare_qpg(iq,i_G_shift)**2 - if(trim(global_gauge)=='velocity') spectra(:,i_rsp)= spectra(:,i_rsp)/ W%p(:)**2 - ! - if (X_do_obs("off").or.X_do_obs("beta")) then - if(trim(global_gauge)=='length' ) spectra_ij(:,i_rsp)=spectra_ij(:,i_rsp)/bare_qpg(iq,i_G_shift)**2 - if(trim(global_gauge)=='velocity') spectra_ij(:,i_rsp)=spectra_ij(:,i_rsp)/ W%p(:)**2 - endif - enddo - ! - endif - ! ! ABSORPTION ! ! Epsilon_ii @@ -200,6 +160,16 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! ... Epsilon_ii call ELEMENTAL_dump("eps",Epsilon_ii(:,2:4)+1._SP) endif + + if (X_do_obs("ME")) then + ! + ! Resp = -vX + do i_rsp=1,n_resp + spectra(:,i_rsp)=cmplx(ME_ii(:,i_rsp+1),kind=DP) + enddo + ! + endif + ! ! ! Epsilon_ij !------------ @@ -347,14 +317,31 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) call ELEMENTAL_dump_real("PL",PL(:,2:3)) endif ! + ! MAGNETOELECTRIC !------------ if (X_do_obs("ME")) then - ! ME DEBUG - write(*,*) "(K_OUTPUT.F): X_do_obs(ME)=.true." - call ELEMENTAL_dump("ME",ME_ii(:,2:4)) + ! + call get_from_Lbar_or_Lfull_inverted(tmp_var_DP,spectra) + ! + ME_ii(:,2:4)=cmplx(tmp_var_DP,kind=SP) + call add_drude_term(ME_ii(:,2:4)) + ! + nel_diam(:)=real(A_drude(:))/real(nkbz,SP)*spin_occ/Co_factor + ! + ! ... Diamagnetic term + call msg("o eps",com_compose_msg(pre="# ",body="Diamagnetic term")," ",INDENT=0) + call msg("o eps",com_compose_msg(pre="# ",body="Ao"),nel_diam(1),INDENT=0,after_msg="[nel]") + if (.not.STRING_match(WHAT,"IP")) & + &call msg("o eps",com_compose_msg(pre="# ",body="A"),nel_diam(2),INDENT=0,after_msg="[nel]") + if (l_last_col) & + &call msg("o eps",com_compose_msg(pre="# ",body="A'"),nel_diam(3),INDENT=0,after_msg="[nel]") + ! + ! ... ME_ii + call ELEMENTAL_dump("ME",ME_ii(:,2:4)+1._SP) endif + if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) if (STRING_match(WHAT,"reset")) call X_OUTPUT_driver("reset "//OBS) ! diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 29d3d15e86..7e3106fd6d 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -90,17 +90,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_magnons) call X_obs_onoff("+ Spm") if (l_BS_magnons.and.n_spinor==2) call X_obs_onoff("+ Smp") if (l_BS_dichroism) call X_obs_onoff("+ CD") - if (l_BS_magnetoelectric) then - call X_obs_onoff("+ ME") + if (l_BS_magnetoelectric) call X_obs_onoff("+ ME") - ! ME DEBUG - write(*,*) "\n (X_OUTPUT_driver): X_obs_onoff(+ ME) called" - write(*,*) "\n (X_OUTPUT_driver): X_do_obs(ME)=", X_do_obs("ME") - else - write(*,*) "\n (X_OUTPUT_driver): X_obs_onoff(+ ME) NOT called" - endif - - ! ME DEBUG ! !...solvers specific if (present(solver)) then From f0baabad0f07d1668bfba59469f60818bae8adcc Mon Sep 17 00:00:00 2001 From: thge123 Date: Sat, 20 Sep 2025 10:15:00 +0200 Subject: [PATCH 1116/1367] ME debugging --- src/bse/K_IP.F | 12 ++++-------- src/bse/K_dipoles.F | 2 +- src/output/K_OUTPUT.F | 30 +----------------------------- 3 files changed, 6 insertions(+), 38 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index e96f8215b2..c605924dc6 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -242,13 +242,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif if(l_BS_magnetoelectric) then - ! - ! Gives seg. fault... res_me=BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1) ! Only Sx res_me=res_me*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) - ! - !res_me=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) - res_me=res_me*f_eh*Z_eh*E_eh + res_me=res_me*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) endif ! @@ -330,9 +326,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_magnetoelectric) then do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_T_g) - ME_ii(:,3)=ME_ii(:,3)-res_me/(W_bss%p(:)-E_plus_W(i_pert_SOC)-E_DbGd(i_ColFG)) + ME_ii(:,3)=ME_ii(:,3)-res_me/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - ME_ii(:,3)=ME_ii(:,3)+conjg(res_me)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC)+E_DbGd(i_ColFG))) + ME_ii(:,3)=ME_ii(:,3)+conjg(res_me)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) endif enddo endif @@ -430,7 +426,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! - if (l_BS_magnetoelectric) ME_ii(:,3)=ME_ii(:,3)*Co_factor + if (l_BS_magnetoelectric) ME_ii(:,3)=ME_ii(:,3)*Co_factor/(8._SP*pi) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism magnetoelectric") call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index e561e14b56..fbd2b7820e 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -157,7 +157,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! *length* : DIP(c,v,k) is q_ver* while I need q_ver* = conjg(q_ver*) ! *velocity* : DIP(c,v,k) is q_ver* while I need q_ver* = conjg(q_ver*) ! - ! Absorption, KERR, PL, Dichroism + ! Absorption, KERR, PL, Dichroism, Magnetoelectric if(l_BS_abs.or.l_BS_kerr.or.l_BS_photolum.or.l_BS_dichroism.or.l_BS_magnetoelectric) then ! if(iq==1.and.i_G_shift==1) then diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 9ba6ee731f..384dde31fe 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -161,14 +161,6 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) call ELEMENTAL_dump("eps",Epsilon_ii(:,2:4)+1._SP) endif - if (X_do_obs("ME")) then - ! - ! Resp = -vX - do i_rsp=1,n_resp - spectra(:,i_rsp)=cmplx(ME_ii(:,i_rsp+1),kind=DP) - enddo - ! - endif ! ! ! Epsilon_ij @@ -320,27 +312,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! MAGNETOELECTRIC !------------ - if (X_do_obs("ME")) then - ! - call get_from_Lbar_or_Lfull_inverted(tmp_var_DP,spectra) - ! - ME_ii(:,2:4)=cmplx(tmp_var_DP,kind=SP) - call add_drude_term(ME_ii(:,2:4)) - ! - nel_diam(:)=real(A_drude(:))/real(nkbz,SP)*spin_occ/Co_factor - ! - ! ... Diamagnetic term - call msg("o eps",com_compose_msg(pre="# ",body="Diamagnetic term")," ",INDENT=0) - call msg("o eps",com_compose_msg(pre="# ",body="Ao"),nel_diam(1),INDENT=0,after_msg="[nel]") - if (.not.STRING_match(WHAT,"IP")) & - &call msg("o eps",com_compose_msg(pre="# ",body="A"),nel_diam(2),INDENT=0,after_msg="[nel]") - if (l_last_col) & - &call msg("o eps",com_compose_msg(pre="# ",body="A'"),nel_diam(3),INDENT=0,after_msg="[nel]") - ! - ! ... ME_ii - call ELEMENTAL_dump("ME",ME_ii(:,2:4)+1._SP) - endif - + if (X_do_obs("ME")) call ELEMENTAL_dump("ME",HA2EV*ME_ii(:,2:)) if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) if (STRING_match(WHAT,"reset")) call X_OUTPUT_driver("reset "//OBS) From a41047afc2d09cf1aa1ff9b5b3dfd0ca0fa6af41 Mon Sep 17 00:00:00 2001 From: thge123 Date: Sat, 20 Sep 2025 13:25:48 +0200 Subject: [PATCH 1117/1367] ME dbs and yambo calc. agree --- src/bse/K_IP.F | 20 +++++++++++++++----- src/output/K_OUTPUT.F | 10 +++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index c605924dc6..2866ab96a2 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -242,8 +242,20 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif if(l_BS_magnetoelectric) then - res_me=BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1) ! Only Sx - res_me=res_me*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + + ! TODO: Figure out what's the best way to get sigma_x, sigma_y, and sigma_z + ! Here only Sx and Sy are calculated (hard-coded). Agreement with DIP_spin database + ! when conjg (why?) + + ! Sx + ! res_me=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) + + ! Sy + res_me=-cI*conjg((BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1))) + + ! This made the residuals correct according to the database DIP_spin*conjg(DIP_iR): + !res_me=res_me*conjg(conjg(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))) (why?) + res_me=res_me*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) res_me=res_me*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) endif @@ -325,12 +337,10 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_magnetoelectric) then - do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_T_g) ME_ii(:,3)=ME_ii(:,3)-res_me/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then ME_ii(:,3)=ME_ii(:,3)+conjg(res_me)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) endif - enddo endif enddo ! @@ -426,7 +436,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! - if (l_BS_magnetoelectric) ME_ii(:,3)=ME_ii(:,3)*Co_factor/(8._SP*pi) + if (l_BS_magnetoelectric) ME_ii(:,3)=ME_ii(:,3)*(-1._SP*Co_factor/(8._SP*pi)) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism magnetoelectric") call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 384dde31fe..b51275ca01 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -312,7 +312,15 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! MAGNETOELECTRIC !------------ - if (X_do_obs("ME")) call ELEMENTAL_dump("ME",HA2EV*ME_ii(:,2:)) +if (X_do_obs("ME")) then + !do i_rsp=1,n_resp + !spectra(:,i_rsp) = cmplx(ME_ii(:, i_rsp+1), kind=DP) + !enddo + !call get_from_Lbar_or_Lfull_inverted(tmp_var_DP, spectra) + !ME_ii(:,2:4) = cmplx(tmp_var_DP, kind=SP) + call ELEMENTAL_dump("ME", ME_ii(:,2:)) +endif + if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) if (STRING_match(WHAT,"reset")) call X_OUTPUT_driver("reset "//OBS) From 2d4d4a92728e711572898af769d552466aa6c4c2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 21 Sep 2025 08:43:53 +0200 Subject: [PATCH 1118/1367] DOUBLE_project.dep updated in src/tddft --- src/tddft/DOUBLE_project.dep | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tddft/DOUBLE_project.dep b/src/tddft/DOUBLE_project.dep index 9215373d32..32f2d9b8b7 100644 --- a/src/tddft/DOUBLE_project.dep +++ b/src/tddft/DOUBLE_project.dep @@ -1,5 +1,4 @@ TDDFT_ALDA_G_space.o - TDDFT_ALDA_R_space.o TDDFT_ALDA_eh_space_G_collisions_L.o TDDFT_ALDA_eh_space_G_collisions_R.o TDDFT_ALDA_eh_space_G_kernel.o From 3f9d91c51d433d3bf170d8689620590db3c6577a Mon Sep 17 00:00:00 2001 From: thge123 Date: Sun, 21 Sep 2025 09:11:39 +0200 Subject: [PATCH 1119/1367] Mx My Mz output for give Efield --- src/allocations/X_ALLOC_elemental.F | 8 +++--- src/allocations/X_ALLOC_global.F | 10 ++++--- src/bse/K_IP.F | 42 ++++++++++++++++++----------- src/bse/K_dipoles.F | 7 +++++ src/bse/K_observables.F | 2 +- src/dipoles/DIPOLE_setup.F | 14 ++++++---- src/modules/mod_BS.F | 5 +++- src/modules/mod_X.F | 4 +-- src/output/K_OUTPUT.F | 13 +++------ src/output/X_OUTPUT_driver.F | 15 ++++++++--- 10 files changed, 74 insertions(+), 46 deletions(-) diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index dcd31df47c..b087f4404a 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -15,7 +15,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) ! use pars, ONLY:rZERO,cZERO use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Joint_DOS,BS_E_sorted,BS_E_sorted_indx, & -& Epsilon_ij,X_magnons,X_dichroism,ME_ii, & +& Epsilon_ij,X_magnons,X_dichroism,ME_ij, & & X_fxc,EEL,Alpha,X_mat,DEV_VAR(X_mat),X_drude_term,X_RLcomp_ig use PHOTOLUM, ONLY:PL use stderr, ONLY:STRING_match @@ -76,9 +76,9 @@ subroutine X_ALLOC_elemental(WHAT,DIM) YAMBO_ALLOC(X_mat,(DIM(1),DIM(2),DIM(3))) X_mat=cZERO case('ME') - if (allocated(ME_ii)) return - YAMBO_ALLOC(ME_ii,(DIM(1),DIM(2))) !2(int)3(nonint)4(n-1 Haydock/inv shifted) - ME_ii = cZERO + if (allocated(ME_ij)) return + YAMBO_ALLOC(ME_ij,(DIM(1),DIM(2),DIM(3))) + ME_ij = cZERO #ifdef _GPU YAMBO_ALLOC_GPU_SOURCE(DEV_VAR(X_mat),X_mat) #endif diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index 1e82929f09..ff22f811ae 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -14,7 +14,7 @@ subroutine X_ALLOC_global(WHAT,W) use pars, ONLY:cZERO use ALLOC, ONLY:X_ALLOC_elemental use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Epsilon_ij,& -& Alpha,Joint_DOS,X_magnons,X_dichroism,EEL,X_do_obs,ME_ii +& Alpha,Joint_DOS,X_magnons,X_dichroism,EEL,X_do_obs,ME_ij use frequency, ONLY:w_samp use drivers, ONLY:l_optics use BS_solvers, ONLY:B_Hall @@ -80,9 +80,11 @@ subroutine X_ALLOC_global(WHAT,W) if (X_do_obs("Esort")) call X_ALLOC_elemental("BS_E_SORTED",(/1000,9,2/)) if (X_do_obs("fxc")) call X_ALLOC_elemental("FXC",(/W%n_freqs/)) ! - if (X_do_obs("ME")) then - call X_ALLOC_elemental("ME",(/W%n_freqs,4/)) - ME_ii(:,1)=W%p(:) + if (X_do_obs("magnetoelectric")) then + call X_ALLOC_elemental("ME",(/W%n_freqs,3,4/)) + ME_ij(:,1,1)=W%p(:) + ME_ij(:,2,1)=W%p(:) + ME_ij(:,3,1)=W%p(:) endif else if (WHAT=="FREE") then call X_ALLOC_elemental("FREE ALL") diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 2866ab96a2..8b4c2f8617 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -22,7 +22,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) use electrons, ONLY:levels,spin_occ,spin,nel,n_sp_pol,n_spinor use X_m, ONLY:Resp_ii,Joint_DOS,alpha_dim,eps_2_alpha,& & X_drude_term,global_gauge,N_BS_E_sorted,i_G_shift,& -& skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism,ME_ii +& skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism,ME_ij use BS_solvers, ONLY:Co_factor,diam_term_exact,para_term_w0,BSS_Wd,BSS_mode,BSS_uses_DbGd,FG_factor use BS, ONLY:BS_T_grp,BS_nkFGbz_in_Tgrp,BS_nT_grps,BS_perturbative_SOC,& & BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_H_dim,l_BS_kerr_asymm,& @@ -56,7 +56,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) integer :: i_ColFG complex(SP), allocatable :: E_DbGd(:) ! - complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_me + complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_me(3) integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! @@ -244,19 +244,26 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if(l_BS_magnetoelectric) then ! TODO: Figure out what's the best way to get sigma_x, sigma_y, and sigma_z - ! Here only Sx and Sy are calculated (hard-coded). Agreement with DIP_spin database + ! Here they are hard-coded. Agreement with DIP_spin database ! when conjg (why?) ! Sx - ! res_me=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) + res_me(1)=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+& + BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) + res_me(1)=res_me(1)*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) ! Sy - res_me=-cI*conjg((BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1))) + res_me(2)=-cI*conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& + BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) + res_me(2)=res_me(2)*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) + + ! Sz + res_me(3)=BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1) + res_me(3)=res_me(3)*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) - ! This made the residuals correct according to the database DIP_spin*conjg(DIP_iR): - !res_me=res_me*conjg(conjg(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1))) (why?) - res_me=res_me*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) - res_me=res_me*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) endif ! @@ -265,7 +272,6 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_kerr=0._SP res_PL =0._SP res_dich=0._SP - res_me =0._SP endif ! ! Response functions and pert SOC loop @@ -337,9 +343,13 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_magnetoelectric) then - ME_ii(:,3)=ME_ii(:,3)-res_me/(W_bss%p(:)-E_plus_W(i_pert_SOC)) + ME_ij(:,1,3)=ME_ij(:,1,3)-res_me(1)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) + ME_ij(:,2,3)=ME_ij(:,2,3)-res_me(2)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) + ME_ij(:,3,3)=ME_ij(:,3,3)-res_me(3)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - ME_ii(:,3)=ME_ii(:,3)+conjg(res_me)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) + ME_ij(:,1,3)=ME_ij(:,1,3)+conjg(res_me(1))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) + ME_ij(:,2,3)=ME_ij(:,2,3)+conjg(res_me(2))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) + ME_ij(:,3,3)=ME_ij(:,3,3)+conjg(res_me(3))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) endif endif enddo @@ -355,7 +365,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_abs) Resp_ii(:,3) = Resp_ii(:,3) * FG_factor ! - if (l_BS_magnetoelectric) ME_ii(:,3) = ME_ii(:,3) * FG_factor + ! if (l_BS_magnetoelectric) ME_ij(:,:,3) = ME_ij(:,:,3) * FG_factor ! ! Sorting procedure !=================== @@ -399,8 +409,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if(l_BS_magnetoelectric) then - call PP_redux_wait( ME_ii(:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) - call PP_redux_wait( ME_ii(:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) + call PP_redux_wait( ME_ij(:,:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait( ME_ij(:,:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) endif ! @@ -436,7 +446,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! - if (l_BS_magnetoelectric) ME_ii(:,3)=ME_ii(:,3)*(-1._SP*Co_factor/(8._SP*pi)) + if (l_BS_magnetoelectric) ME_ij(:,:,3)=ME_ij(:,:,3)*(-1._SP*Co_factor/(8._SP*pi)) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism magnetoelectric") call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index fbd2b7820e..68ec0b536e 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -232,6 +232,13 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) if (BS_K_coupling.and.l_BS_ares_from_res) then ! This is the right A residual associated to (eps_v\up-eps_c\dn) BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) + if (l_BS_magnetoelectric) then + BS_T_grp(i_T_g)%dipoles_mag(3,i_T,2)=DIP_expanded(3) + endif + endif + + if (l_BS_magnetoelectric) then + BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)=DIP_expanded(3) endif ! endif diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 57984c2007..bf7aa74ae0 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -43,7 +43,7 @@ subroutine K_observables(W,Xk) l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') .and. l_BS_kerr l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr - l_BS_magnetoelectric = STRING_match(BSE_prop,'ME') + l_BS_magnetoelectric = STRING_match(BSE_prop,'ME') .and.n_spin>1 ! ! How ... !--------- diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 39640e7c3c..6ca1884bb1 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -11,7 +11,8 @@ subroutine DIPOLE_setup(Dip) use DIPOLES, ONLY:DIPOLE_t,x_space_obs,g_space_obs,covariant_obs,shifted_grids_obs,& & der_k_obs,specific_obs,eval_OVERLAPS use IO_m, ONLY:io_DIP - use BS, ONLY:BSE_prop,l_BS_magnons,l_BS_dichroism,l_BS_photolum + use BS, ONLY:BSE_prop,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& +& l_BS_magnetoelectric use electrons, ONLY:n_spin,n_spinor use parser_m, ONLY:parser use stderr, ONLY:STRING_same,STRING_match @@ -43,9 +44,10 @@ subroutine DIPOLE_setup(Dip) ! ! Observables (needed later) !---------------------------- - l_BS_magnons= (index(BSE_prop,'magn')/=0) - l_BS_dichroism= (index(BSE_prop,'dich')/=0) - l_BS_photolum= (index(BSE_prop,'photolum')/=0) + l_BS_magnons= (index(BSE_prop,'magn')/=0) + l_BS_dichroism= (index(BSE_prop,'dich')/=0) + l_BS_photolum= (index(BSE_prop,'photolum')/=0) + l_BS_magnetoelectric= (index(BSE_prop,'ME')/=0) call parser('ImposeAsymBSE',l_flag) if(.not.l_flag) call parser('ImposeFullBSE',l_flag) ! @@ -139,7 +141,9 @@ subroutine DIPOLE_setup(Dip) ! ...M_spin, M_orb (CD or RT version), M_iti specific_obs="" if (n_spin>1) then - if (STRING_match(Dip%computed,"spin").or.l_BS_magnons) specific_obs=" M_spin" + if (STRING_match(Dip%computed,"spin").or.& + l_BS_magnons.or.& + l_BS_magnetoelectric) specific_obs=" M_spin" if (STRING_match(Dip%computed,"orb")) specific_obs=trim(specific_obs)//" M_orbRT M_it" #if defined _RT ! Always force all dipoles in real-time case diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 1e5e7bbe78..84e8412596 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -318,9 +318,12 @@ subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) ! YAMBO_ALLOC(BS_T_grp(iT)%dipoles_opt,(BS_dip_size,nT,nDIP)) BS_T_grp(iT)%dipoles_opt=cZERO - if(l_BS_magnons.or.l_BS_magnetoelectric) then + if(l_BS_magnons) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_mag,(2,nT,nDIP)) endif + if(l_BS_magnetoelectric) then + YAMBO_ALLOC(BS_T_grp(iT)%dipoles_mag,(3,nT,nDIP)) + endif if(l_BS_dichroism) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_dic,(BS_dip_size,nT,nDIP)) endif diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index fdc18dbd08..89d295850b 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -80,7 +80,7 @@ module X_m complex(SP), allocatable :: X_fxc(:) complex(SP), allocatable :: X_magnons(:,:,:) complex(SP), allocatable :: X_dichroism(:,:) - complex(SP), allocatable :: ME_ii(:,:) + complex(SP), allocatable :: ME_ij(:,:,:) ! ! Response function ! @@ -165,7 +165,7 @@ module X_m integer :: N_messages character(schlen) :: messages(N_MAX_columns) end type - integer, parameter :: N_X_obs=17 + integer, parameter :: N_X_obs=19 type(X_obs_t) :: X_obs(N_X_obs) ! interface diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index b51275ca01..d84c8f0435 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -19,7 +19,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use X_m, ONLY:Epsilon_ii,eps_2_alpha,X_OUTPUT_driver,Epsilon_ij,& & X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,& & BS_E_sorted_indx,X_magnons,i_G_shift,Q_plus_G_pt,Q_plus_G_sq_modulus,& -& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge,ME_ii +& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge,ME_ij use com, ONLY:msg,com_compose_msg use R_lattice, ONLY:bare_qpg,FineGd_desc,nkbz use electrons, ONLY:spin_occ @@ -312,14 +312,9 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! MAGNETOELECTRIC !------------ -if (X_do_obs("ME")) then - !do i_rsp=1,n_resp - !spectra(:,i_rsp) = cmplx(ME_ii(:, i_rsp+1), kind=DP) - !enddo - !call get_from_Lbar_or_Lfull_inverted(tmp_var_DP, spectra) - !ME_ii(:,2:4) = cmplx(tmp_var_DP, kind=SP) - call ELEMENTAL_dump("ME", ME_ii(:,2:)) -endif +if (X_do_obs("MEx")) call ELEMENTAL_dump("MEx", ME_ij(:,1,2:)) +if (X_do_obs("MEy")) call ELEMENTAL_dump("MEy", ME_ij(:,2,2:)) +if (X_do_obs("MEz")) call ELEMENTAL_dump("MEz", ME_ij(:,3,2:)) if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 7e3106fd6d..57cb7f2bcf 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -36,7 +36,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) ! Work Space integer ::it,itp,ik,ic character(schlen) ::key(10),BASIC_col(7) - character(5) ::obs_with_res(8) + character(5) ::obs_with_res(7) logical ::l_flag,l_print_res ! if (STRING_match(WHAT,"DEF")) then @@ -56,7 +56,9 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) call ELEMENTAL_init(14,"CD","Dichroism","dichroism") call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") - call ELEMENTAL_init(17,"ME","Magnetoelectric","magnetoelectric") + call ELEMENTAL_init(17,"MEx","Magnetoelectric (Mx)","magnetoelectric") + call ELEMENTAL_init(18,"MEy","Magnetoelectric (My)","magnetoelectric") + call ELEMENTAL_init(19,"MEz","Magnetoelectric (Mz)","magnetoelectric") endif ! if (STRING_match(WHAT,"INIT")) then @@ -90,7 +92,12 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_magnons) call X_obs_onoff("+ Spm") if (l_BS_magnons.and.n_spinor==2) call X_obs_onoff("+ Smp") if (l_BS_dichroism) call X_obs_onoff("+ CD") - if (l_BS_magnetoelectric) call X_obs_onoff("+ ME") + if (l_BS_magnetoelectric) then + call X_obs_onoff("+ MEx") + call X_obs_onoff("+ MEy") + call X_obs_onoff("+ MEz") + endif + ! !...solvers specific @@ -132,7 +139,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) X_obs(4)%N_columns=3 X_obs(4)%COL_header(1:3) = (/'Re(E)','Im(E)','N_deg'/) endif - obs_with_res=[character(5) :: "eps","alpha","Spm","Smp","off","beta","CD","ME" ] + obs_with_res=[character(5) :: "eps","alpha","Spm","Smp","off","beta","CD" ] do it=1,N_X_obs if (.not.X_do_obs(trim(X_obs(it)%what))) cycle l_print_res=.false. From dafd64a5be20f64ec4d381b5d136c3b82896818b Mon Sep 17 00:00:00 2001 From: thge123 Date: Sun, 21 Sep 2025 09:22:04 +0200 Subject: [PATCH 1120/1367] cleanup --- .gitignore | 6 --- make_clean+core.sh | 16 -------- make_clean+yambo.sh | 8 ---- make_core.sh | 15 ------- make_distclean+core.sh | 11 ----- symlink_modules.sh | 11 ----- ...o_intel_single_precission_omp_configure.sh | 41 ------------------- 7 files changed, 108 deletions(-) delete mode 100755 make_clean+core.sh delete mode 100755 make_clean+yambo.sh delete mode 100755 make_core.sh delete mode 100755 make_distclean+core.sh delete mode 100755 symlink_modules.sh delete mode 100755 yambo_intel_single_precission_omp_configure.sh diff --git a/.gitignore b/.gitignore index 93b3b2fa76..99a2db6bbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -# Personal # -############ -./make_*.sh -./symlink_modules*.sh -./yambo_intel_single_precission_omp_configure.sh - # DEPS # ######## modulesdep.list diff --git a/make_clean+core.sh b/make_clean+core.sh deleted file mode 100755 index 4d878ac503..0000000000 --- a/make_clean+core.sh +++ /dev/null @@ -1,16 +0,0 @@ -#/bin/zsh -l - -make clean -make core - -rm /home/tgeirsson/apps/lumen-fork/bin/yambo -rm /home/tgeirsson/apps/lumen-fork/bin/p2y -rm /home/tgeirsson/apps/lumen-fork/bin/a2y -rm /home/tgeirsson/apps/lumen-fork/bin/c2y -rm /home/tgeirsson/apps/lumen-fork/bin/ypp - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumen-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumen-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumen-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumen-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumen-fork/bin/ypp diff --git a/make_clean+yambo.sh b/make_clean+yambo.sh deleted file mode 100755 index ffd9ac2777..0000000000 --- a/make_clean+yambo.sh +++ /dev/null @@ -1,8 +0,0 @@ -#/bin/zsh -l - -make clean -make core - -rm /home/tgeirsson/apps/lumen-fork/bin/yambo - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo diff --git a/make_core.sh b/make_core.sh deleted file mode 100755 index 77f2c84817..0000000000 --- a/make_core.sh +++ /dev/null @@ -1,15 +0,0 @@ -#/bin/zsh -l - -make core - -rm /home/tgeirsson/apps/lumen-fork/bin/yambo -rm /home/tgeirsson/apps/lumen-fork/bin/p2y -rm /home/tgeirsson/apps/lumen-fork/bin/a2y -rm /home/tgeirsson/apps/lumen-fork/bin/c2y -rm /home/tgeirsson/apps/lumen-fork/bin/ypp - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/make_distclean+core.sh b/make_distclean+core.sh deleted file mode 100755 index 3d7d9d2164..0000000000 --- a/make_distclean+core.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/zsh -l - -make distclean -./yambo_intel_single_precission_omp_configure.sh -make core - -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumne-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumne-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumne-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumne-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumne-fork/bin/ypp diff --git a/symlink_modules.sh b/symlink_modules.sh deleted file mode 100755 index 7736884333..0000000000 --- a/symlink_modules.sh +++ /dev/null @@ -1,11 +0,0 @@ -#/bin/zsh -l -rm ~/apps/lumen-fork/bin/yambo -rm ~/apps/lumen-fork/bin/p2y -rm ~/apps/lumen-fork/bin/a2y -rm ~/apps/lumen-fork/bin/c2y -rm ~/apps/lumen-fork/bin/ypp -ln -s /home/tgeirsson/lumen-fork/bin/yambo ~/apps/lumen-fork/bin/yambo -ln -s /home/tgeirsson/lumen-fork/bin/p2y ~/apps/lumen-fork/bin/p2y -ln -s /home/tgeirsson/lumen-fork/bin/a2y ~/apps/lumen-fork/bin/a2y -ln -s /home/tgeirsson/lumen-fork/bin/c2y ~/apps/lumen-fork/bin/c2y -ln -s /home/tgeirsson/lumen-fork/bin/ypp ~/apps/lumen-fork/bin/ypp diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh deleted file mode 100755 index fb355395bc..0000000000 --- a/yambo_intel_single_precission_omp_configure.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 - -NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" -NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" -HDF5_ROOT="/apps/software/hdf5/1.12.1" -LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" -PETSC_ROOT="/apps/software/petsc/3.16.3" -SLEPC_ROOT="/apps/software/slepc/3.16.1" -YAMBO_LIBS_ROOT="${HOME}/yambo-libs" - -./configure \ -FC=ifort \ -CC=icc \ -MPICC=mpiicc \ -MPIFC=mpiifort \ ---enable-msgs-comps \ ---enable-time-profile \ ---enable-mpi \ ---enable-open-mp \ ---enable-iotk \ ---without-editor \ ---enable-memory-profile \ ---enable-keep-src \ ---enable-hdf5-par-io \ ---with-mpi-path="${I_MPI_ROOT}" \ ---with-netcdf-path=${NETCDF_ROOT} \ ---with-netcdff-path=${NETCDFF_ROOT} \ ---with-hdf5-path=${HDF5_ROOT} \ ---with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blacs-libs="mkl" \ ---with-scalapack-libs="mkl" \ ---with-extlibs-path="${YAMBO_LIBS_ROOT}" - -#--enable-slepc-linalg \ -#--with-petsc-path="${PETSC_ROOT}" \ -#--with-slepc-path="${SLEPC_ROOT}" \ -#--with-libxc-path="${LIBXC_ROOT}" \ From fd2434c6242a23f54373da32e05724beee567da2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 21 Sep 2025 14:07:01 +0200 Subject: [PATCH 1121/1367] Some code lines from QP_ppa_cohsex imported into QP_mpa This avoids an error appearing when gfortran is computed with -fcheck=bounds --- src/qp/QP_mpa.F | 94 +++++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 43 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index a6132521ff..712fdaf5b1 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -54,30 +54,30 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! implicit none ! - type(levels) ::E - type(bz_samp) ::Xk,k,q - type(X_t) ::X - type(QP_t) ::qp - type(w_samp) ::Xw - integer ::GW_iter + type(levels) ::E + type(bz_samp)::Xk,k,q + type(X_t) ::X + type(QP_t) ::qp + type(w_samp) ::Xw + integer ::GW_iter ! ! Work Space ! - integer :: i_qp,i_w,iqbz,iqibz,ib,ig1,ig2,iqs,i_qp_to_start,iq_to_start,is,& -& iq_mem,X_range(2),io_err,ID,IO_ACT,timing_steps - ! - complex(SP), allocatable :: W_(:),dc(:) - type(elemental_collision), target :: isc,iscp - ! type(w_samp) :: Sc_W(qp%n_states) - character(schlen):: ch,SECTION_name + integer :: i_qp,i_w,iqbz,iqibz,ib,i_v,i_c,i_k,i_kmq,i_kmq_Go,i_kmq_bz,i_kmq_s,& +& i_sp_pol,ig1,ig2,iqs,i_qp_to_start,iq_to_start,is,iq_mem,& +& X_range(2),io_err,ID,IO_ACT,timing_steps ! + character(schlen):: ch,SECTION_name integer :: X_mpa_npoles,X_ng logical :: X_is_TR_rotated,l_X_ALLOC_elemental,l_RIM_W_g real(SP) :: E_kmq,f_kmq real(DP) :: dp_dummy_r,dp_dummy_i complex(DP) :: dp_dummy,ctmp,W_1,W_i ! + complex(SP), allocatable :: W_(:),dc(:) + type(elemental_collision), target :: isc,iscp + ! complex(SP), pointer DEV_ATTR :: isc_rhotw_p(:) complex(SP), pointer DEV_ATTR :: iscp_rhotw_p(:) complex(SP), pointer DEV_ATTR :: isc_gamp_p(:,:) @@ -111,10 +111,8 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) iq_to_start =1 QP_Sc =cZERO ! - ! for G & Sigma ! Sc Energy points (1 type each QP state !) !------------------------------------------- - ! if (trim(QP_solver)=='n') then ! do i_qp=1,qp%n_states @@ -128,7 +126,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) QP_dSc_steps=QP_Sc_steps do i_qp=1,qp%n_states call W_reset(Sc_W(i_qp)) - Sc_W(i_qp)%n_freqs=QP_Sc_steps + Sc_W(i_qp)%n_freqs =QP_Sc_steps call FREQUENCIES_Green_Function(i_qp,Sc_W(i_qp),E%E,.FALSE.) ! if(Sc_W(i_qp)%grid_type=="ra") then @@ -166,25 +164,25 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! WF distributed & load !======================= ! - if ( .not.l_sc_run ) call PARALLEL_global_indexes(E,k,q,"Self_Energy") + if ( .not.l_sc_run ) then + call PARALLEL_global_indexes(E,k,q,"Self_Energy") + call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_G_b,CLEAN_UP=.TRUE.) + call PARALLEL_WF_distribute(QP_index=PAR_IND_QP) + call PARALLEL_WF_index( ) + endif + ! + ch='-GW' ! ! Redefine iq_to_start to be CPU-dependent ! do iqbz=1,q%nbz - if (PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) then + iqibz=q%sstar(iqbz,1) + if (PAR_IND_Q_ibz%element_1D(iqibz)) then iq_to_start=iqbz exit endif enddo ! - if( .not.l_sc_run ) then - call PARALLEL_WF_distribute(K_index=PAR_IND_Xk_ibz,B_index=PAR_IND_G_b,CLEAN_UP=.TRUE.) - call PARALLEL_WF_distribute(QP_index=PAR_IND_QP) - call PARALLEL_WF_index( ) - endif - ! - ch='-GW' - ! ! wf and collisions dimension !----------------------------- isc%ngrho=X%ng @@ -219,8 +217,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) !------------ ! ! MB: we load X_par and not X_mat (refer to QP_ppa_cohsex) - ! Here deallocate X_mat - ! + ! deallocate X_mat call X_ALLOC_elemental("X") ! if (.not.io_RESPONSE) call error("[MPA] .not. io_RESPONSE untested with MPA") @@ -228,10 +225,10 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) if (.not.allocated(X_par).and.io_RESPONSE) then allocate(X_par(1)) endif - if (io_RESPONSE) call X_ALLOC_parallel(X_par(1),X%ng,2*X%mpa_npoles,"X") ! - YAMBO_ALLOC(W_,(QP_dSc_steps)) - YAMBO_ALLOC(dc,(QP_dSc_steps)) + if (io_RESPONSE) call X_ALLOC_parallel(X_par(1),X%ng,2*X%mpa_npoles,"X") + YAMBO_ALLOC(W_,(QP_dSc_steps)) + YAMBO_ALLOC(dc,(QP_dSc_steps)) ! ! MPA workspace ! @@ -273,13 +270,14 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! call timing('GW(mpa)_init',OPR='stop') ! - Q_loop: do iqbz=iq_to_start,q%nbz + Q_loop: do iqbz=iq_to_start,q%nbz ! - if (.not.PAR_IND_Q_ibz%element_1D(q%sstar(iqbz,1))) cycle + iqs =q%sstar(iqbz,2) + iqibz=q%sstar(iqbz,1) ! - isc%qs(2:)=(/q%sstar(iqbz,1),q%sstar(iqbz,2)/) - iqibz=isc%qs(2) - iqs =isc%qs(3) + if (.not.PAR_IND_Q_ibz%element_1D(iqibz)) cycle + ! + isc%qs(2:3)=(/iqibz,iqs/) ! if (iqibz/=isc%iqref) then ! @@ -438,12 +436,22 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (i_qp==QP_n_states) i_qp_to_start=1 ! + i_v=QP_table(i_qp,1) + i_c=QP_table(i_qp,2) + i_k=QP_table(i_qp,3) + i_sp_pol=spin(QP_table(i_qp,:)) + ! + i_kmq_Go=qindx_S(i_k,iqbz,2) + i_kmq_bz=qindx_S(i_k,iqbz,1) + ! + i_kmq =k%sstar(i_kmq_bz,1) + i_kmq_s=k%sstar(i_kmq_bz,2) ! - isc%is=(/QP_table(i_qp,1),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) - isc%os(2:)=(/k%sstar(qindx_S(isc%is(2),iqbz,1),:),spin(QP_table(i_qp,:))/) - isc%qs(1)=qindx_S(QP_table(i_qp,3),iqbz,2) + isc%is=(/i_v,i_k, 1, i_sp_pol/) + isc%os=(/0, i_kmq,i_kmq_s,i_sp_pol/) + isc%qs(1)=i_kmq_Go ! - iscp%is=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + iscp%is=(/i_c,i_k,1,i_sp_pol/) iscp%qs=isc%qs ! ! DALV: here the grid is centered in E0 @@ -453,15 +461,15 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! if (.not.PAR_IND_G_b%element_1D(ib)) cycle ! - if (q%sstar(iqbz,2)==1) call live_timing(steps=1) + if (iqs==1) call live_timing(steps=1) ! isc%os(1)=ib ! call scatter_Bamp_gpu(isc) iscp%os=isc%os ! - if (any(isc%is/=iscp%is)) then - call scatter_Bamp(iscp) + if (any(isc%is/=iscp%is)) then + call scatter_Bamp_gpu(iscp) else if ( have_gpu) call devxlib_memcpy_d2d(iscp_rhotw_p, isc_rhotw_p) if (.not.have_gpu) iscp_rhotw_p=isc_rhotw_p From 1e3662e231a4d46e8dd3eb5536f886a1ef5c6839 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 21 Sep 2025 14:44:44 +0200 Subject: [PATCH 1122/1367] Also QP_real_axis indexes in loop updated to follow implementation of QP_ppa_cohsex Similarly to the QP_mpa case this avoids out of bounds error when the code is compiled with -fcheck=bounds Otherwise the is(4), which corresponds to i_sp_pol becomes grerater than one in some cases This might be relates to some other bug somewhere else --- src/qp/QP_real_axis.F | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 2e4e40ed3b..28b35fccb2 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -69,6 +69,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) type(elemental_collision) ::scattering_main,scattering_prime type(w_samp) :: Sc_W(qp%n_states),X_life_W(q%nibz) integer :: i1,i2,i3,i4,i_or,iqbz,iqibz,ib,i_err,i_q_to_start,iqs,& +& i_v,i_c,i_k,i_kmq,i_kmq_bz,i_kmq_Go,i_kmq_s,i_sp_pol,& & io_err,X_id,WID,IO_ACT,timing_steps,i_q_mem,X_range(2),i_qp,i_qp_mem,i_q_W_mem,i_b_mem integer :: X_rows1,X_rows2,X_cols1,X_cols2 complex(SP) :: lrhotw(X%ng),W_dummy @@ -387,11 +388,22 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! i_qp_mem=PAR_QP_index(i_qp) ! - scattering_main%is=(/QP_table(i_qp,1),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) - scattering_main%os(2:)=(/k%sstar(qindx_S(scattering_main%is(2),iqbz,1),:),spin(QP_table(i_qp,:))/) - scattering_prime%is=(/QP_table(i_qp,2),QP_table(i_qp,3),1,spin(QP_table(i_qp,:))/) + i_v=QP_table(i_qp,1) + i_c=QP_table(i_qp,2) + i_k=QP_table(i_qp,3) + i_sp_pol=spin(QP_table(i_qp,:)) ! - scattering_main%qs(1)=qindx_S(QP_table(i_qp,3),iqbz,2) + i_kmq_Go=qindx_S(i_k,iqbz,2) + i_kmq_bz=qindx_S(i_k,iqbz,1) + ! + i_kmq =k%sstar(i_kmq_bz,1) + i_kmq_s=k%sstar(i_kmq_bz,2) + ! + scattering_main%is=(/i_v,i_k,1,i_sp_pol/) + scattering_main%os=(/0,i_kmq,i_kmq_s,i_sp_pol/) + scattering_prime%is=(/i_c,i_k,1,i_sp_pol/) + ! + scattering_main%qs(1)=i_kmq_Go scattering_prime%qs=scattering_main%qs ! if (.not.PAR_IND_QP%element_1D(i_qp)) then @@ -402,11 +414,10 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! if (l_life) then do ib=QP_n_G_bands(1),QP_n_G_bands(2) - scattering_main%os(1)=ib - i_or=IOR(e2et((/scattering_main%is(:2),scattering_main%is(4)/), & -& (/scattering_main%os(:2),scattering_main%os(4)/),en,life_Fe),& -& h2ht((/scattering_main%is(:2),scattering_main%is(4)/), & -& (/scattering_main%os(:2),scattering_main%os(4)/),en,life_Fh)) + i_or=IOR(e2et((/i_v,i_k,i_sp_pol/), & +& (/ ib,i_kmq,i_sp_pol/),en,life_Fe),& +& h2ht((/i_v,i_k,i_sp_pol/), & +& (/ ib,i_kmq,i_sp_pol/),en,life_Fh)) QP_n_W_freqs=QP_n_W_freqs+i_or enddo endif @@ -420,10 +431,10 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) i_b_mem=PAR_G_bands_index(ib) ! if (l_life) then - i_or=IOR(e2et((/scattering_main%is(:2),scattering_main%is(4)/), & -& (/scattering_main%os(:2),scattering_main%os(4)/),en,life_Fe),& -& h2ht((/scattering_main%is(:2),scattering_main%is(4)/), & -& (/scattering_main%os(:2),scattering_main%os(4)/),en,life_Fh)) + i_or=IOR(e2et((/i_v,i_k,i_sp_pol/), & +& (/ ib,i_kmq,i_sp_pol/),en,life_Fe),& +& h2ht((/i_v,i_k,i_sp_pol/), & +& (/ ib,i_kmq,i_sp_pol/),en,life_Fh)) QP_n_W_freqs=QP_n_W_freqs+i_or endif ! From a800c1da13c34fd3947924635555f85c09c89d9a Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 22 Sep 2025 11:26:32 +0200 Subject: [PATCH 1123/1367] fixed dipole inconsistency for ME --- src/bse/K_IP.F | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 8b4c2f8617..b5fbbe90a1 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -243,25 +243,27 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif if(l_BS_magnetoelectric) then - ! TODO: Figure out what's the best way to get sigma_x, sigma_y, and sigma_z - ! Here they are hard-coded. Agreement with DIP_spin database - ! when conjg (why?) + ! Dipole residuals: res_me(i) = * + ! BSE dipoles stored according to: + ! BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=/2 + ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=/2 + ! BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)= - ! Sx + ! sigma_x res_me(1)=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+& BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) - res_me(1)=res_me(1)*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(1)=res_me(1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) - ! Sy + ! sigma_y res_me(2)=-cI*conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) - res_me(2)=res_me(2)*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(2)=res_me(2)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) - ! Sz + ! sigma_z res_me(3)=BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1) - res_me(3)=res_me(3)*(-cI*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(3)=res_me(3)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) From 47f28be919689f2b242ebcdc458370b5d152e9a6 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 22 Sep 2025 11:36:57 +0200 Subject: [PATCH 1124/1367] cleanup --- src/bse/K_IP.F | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index b5fbbe90a1..c81d55cee0 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -266,7 +266,12 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_me(3)=res_me(3)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) - if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me,vtmpC) + ! This I'm not so sure about... + if (l_BS_esort.and.i_res_ares==1) then + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(3),vtmpC) + endif endif ! if ( abs(real(E_plus_W0)) < Dip%Energy_threshold .and. iq==1 .and. dip_r ) then @@ -367,8 +372,6 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_abs) Resp_ii(:,3) = Resp_ii(:,3) * FG_factor ! - ! if (l_BS_magnetoelectric) ME_ij(:,:,3) = ME_ij(:,:,3) * FG_factor - ! ! Sorting procedure !=================== if (l_BS_esort) call K_IP_sort("sort",0,nVAR,(/0,0,0,0,0/),vtmpI,cZERO,vtmpC) From 3642f83ff2cb83d8b49a40d099ede55d4d3978d6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 22 Sep 2025 15:35:14 +0200 Subject: [PATCH 1125/1367] Fixed error introduced in some old merge merge --- src/wf_and_fft/.objects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wf_and_fft/.objects b/src/wf_and_fft/.objects index 4e9e32f2cc..c6e7207146 100644 --- a/src/wf_and_fft/.objects +++ b/src/wf_and_fft/.objects @@ -28,7 +28,7 @@ FFT_gpu = fft_3d_cuda.o #if defined _HIP FFT_gpu = fft_3d_hip.o #endif -objs = fft_setup.o fft_free.o $(FFT_object) $(FFT_more) $(FFT_cuda) scatter_Bamp_using_the_gradient.o \ +objs = fft_setup.o fft_free.o $(FFT_object) $(FFT_more) $(FFT_gpu) scatter_Bamp_using_the_gradient.o \ fft_check_size.o WF_free.o WF_alloc.o WF_shift_kpoint.o WF_symm_kpoint_g.o WF_symm_kpoint_incl.o \ scatter_Bamp_spin.o scatter_Bamp_incl.o scatter_Gamp_incl.o WF_spatial_inversion.o \ WF_phase_matrices.o WF_load.o WF_apply_symm_incl.o $(WF_rot_object) \ From bbd4d051d566b97f3d748c9bfbe5188433eac21e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 22 Sep 2025 23:38:03 +0200 Subject: [PATCH 1126/1367] io_kpts switched off --- src/bz_ops/bz_samp_indexes.F | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bz_ops/bz_samp_indexes.F b/src/bz_ops/bz_samp_indexes.F index d5116262e7..7f433ac9fd 100644 --- a/src/bz_ops/bz_samp_indexes.F +++ b/src/bz_ops/bz_samp_indexes.F @@ -128,13 +128,13 @@ subroutine bz_samp_indexes(en,k,Xk,q) ! q%description='q' ! - call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=io_db) - io_err=io_kpts(k,Xk,q,io_db) - ! - if (io_err/=0) then - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) - io_err=io_kpts(k,Xk,q,io_db) - endif + !call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=io_db) + !io_err=io_kpts(k,Xk,q,io_db) + !! + !if (io_err/=0) then + ! call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1,2/),MODE=VERIFY,ID=io_db) + ! io_err=io_kpts(k,Xk,q,io_db) + !endif ! call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1,2,3,4,6/),MODE=VERIFY,ID=io_db) io_err=io_QINDX(Xk,q,io_db,trim(convention)) From 479a6fca296e67aa2eedffde2081dada49bb4780 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 23 Sep 2025 09:17:46 +0200 Subject: [PATCH 1127/1367] Fixed bug in parallel execution of EXC-PH workflow --- src/wf_and_fft/WF_phase_matrices.F | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 55fcc2659c..6847235914 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -33,7 +33,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use matrix_operate, ONLY:m3det!,UP_matrix_index use vec_operate, ONLY:degeneration_finder use parallel_m, ONLY:PAR_IND_WF_k,PAR_IND_WF_b,PAR_IND_B_mat - use parallel_int, ONLY:PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute + use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_WF_index,PARALLEL_WF_distribute use interfaces, ONLY:WF_symm_kpoint_g,WF_load,WF_free,eval_G_minus_G use IO_int, ONLY:io_control use IO_m, ONLY:VERIFY,DUMP,REP,OP_WR,WR,WR_CL,OP_RD_CL @@ -275,6 +275,8 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! YAMBO_FREE(WF_phases_b_map) ! + call PP_wait() + ! call timing("WF_phases",OPR="stop") ! end subroutine WF_phase_matrices From 6a9d89273b1b520a60120ce39d8fbfe0318823ef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 23 Sep 2025 17:09:36 +0200 Subject: [PATCH 1128/1367] - Fixed bug in WF_symm_kpoint_g - Option 1 activated in F_phase_matrices. Logicals to control the switch from option 1 to option 2 added Brief explanation that option 2 is presently buggy and off for n_spinor=2 --- src/wf_and_fft/WF_phase_matrices.F | 60 +++++++++++++++++++----------- src/wf_and_fft/WF_symm_kpoint_g.F | 18 +++++---- 2 files changed, 50 insertions(+), 28 deletions(-) diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 6847235914..f9f71e47fc 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -51,6 +51,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) integer :: first_el(blim(2)-blim(1)+1),n_of_el(blim(2)-blim(1)+1),& & blim_n(2),n_deg_grp,i_grp,g0_idx(3,2),nsz(5),max_igk real(SP) :: g0_length(3) + logical :: opt1,opt2 integer :: ikbz,iRkbz,isk,isloop,isk_c,isk_y,iGk_y,iGk_c,iGk,iGloop,istark,& & iby,ibc,iby_phase,ibc_phase,i_sp_pol,ik,& & ifrag,s_count,i_wf_y,i_wf_c,iGp,ng_tmp,nb,NG_max @@ -67,6 +68,15 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! if (nsym==1) return ! + ! 2025/09/23 + ! At present option 2 is buggy with n_spinor=2. + ! It produces exc-ph couplings which are not + ! fully symmetric. If fixed, this would be more elegant than option 1 + ! An even better fix would be to correctly detect the double point group in the code + ! + opt1=(n_spinor==2) + opt2=.not.opt1 + ! nsz=0 call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) io_err=io_WF_phases(blim,0,0,0,ID,nsz) @@ -149,14 +159,16 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) iGk =minus_G(Xk%g_table(ik,isk)) ! ! OPTION 1: expand from IBZ (WF_k) to BZ (WF_Rk) - call WF_copy(WF_k,WF_Rk) - call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk,iGk,WF_Rk) + if (opt1) then + call WF_copy(WF_k,WF_Rk) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk,iGk,WF_Rk) + endif ! do isloop=1,nsym ! ! symmetry composed isk_c=sop_tab(isloop,isk) - iGk_c =minus_G(Xk%g_table(ik,isk_c)) + iGk_c=minus_G(Xk%g_table(ik,isk_c)) ! iGloop=G_m_G(iGk_c,iGk) ! @@ -164,20 +176,22 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! I need to build the composed spin symmetry operator ! ! OPTION 2 (disabled): directly compute composed spin symmetry - !if(n_spinor==2) then - ! s1=spin_sop(:,:,isk) - ! s2=spin_sop(:,:,isloop) - ! if (isk >nsym/(1+i_time_rev)) s1=conjg(s1) - ! if (isloop>nsym/(1+i_time_rev)) then - ! s2=conjg(s2) - ! s1=conjg(s1) - ! endif - ! spin_sop_composed=matmul(s2,s1) - ! if (isk_c >nsym/(1+i_time_rev)) spin_sop_composed=conjg(spin_sop_composed) -!#f defined _CUDA - ! call dev_memcpy(spin_sop_composed_d,spin_sop_composed) -!#ndif - !endif + if(n_spinor==2.and.opt2) then + ! The following code is probably wrong + s1=spin_sop(:,:,isk) + s2=spin_sop(:,:,isloop) + !if (isloop>nsym/(1+i_time_rev)) s1=conjg(s1) + if (isk >nsym/(1+i_time_rev)) s1=conjg(s1) + if (isloop>nsym/(1+i_time_rev)) then + s2=conjg(s2) + s1=conjg(s1) + endif + spin_sop_composed=matmul(s2,s1) + if (isk_c >nsym/(1+i_time_rev)) spin_sop_composed=conjg(spin_sop_composed) +#if defined _CUDA + call dev_memcpy(spin_sop_composed_d,spin_sop_composed) +#endif + endif ! ! symmetry used by yambo isk_y=Xk%s_table(ik,isk_c) @@ -187,12 +201,16 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! ! OPTION 1: Apply second symmetry operation (WF_Rk_c from isk) ! to the WF already expanded in the BZ (WF_Rk) - call WF_copy(WF_Rk,WF_Rk_c) - call WF_symm_kpoint_g(blim,ik,i_sp_pol,isloop,iGloop,WF_Rk_c,isref=isk,iGref=iGk) + if (opt1) then + call WF_copy(WF_Rk,WF_Rk_c) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isloop,iGloop,WF_Rk_c,isref=isk,iGref=iGk) + endif ! ! OPTION 2 (disabled): Use the composed symmetry, importing the composed spin soc - !call WF_copy(WF_k,WF_Rk_c) - !call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c,ssop=spin_sop_composed) + if (opt2) then + call WF_copy(WF_k,WF_Rk_c) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c,ssop=spin_sop_composed) + endif ! call WF_copy(WF_k,WF_Rk_y) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_y,iGk_y,WF_Rk_y) diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index db3bb12386..8f928afab9 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -35,7 +35,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) complex(SP), pointer DEV_ATTR :: WF_p(:,:) complex(SP) DEV_ATTR :: ssop_loc(2,2) - integer DEV_ATTR :: wf_tab_loc(wf_ng) + integer DEV_ATTR :: wf_tab_loc(wf_ng,2) ! real(SP) :: krot(3),G_cc(3) ! @@ -66,13 +66,15 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) igp=DEV_VAR(g_rot)(ig,isref) igs=DEV_VAR(G_m_G)(igp,igref) igr=DEV_VAR(g_rot)(igs,isymm) - wf_tab_loc(ic)=DEV_VAR(G_m_G)(igr,ig0) + wf_tab_loc(ic,1)=igs + wf_tab_loc(ic,2)=DEV_VAR(G_m_G)(igr,ig0) enddo else do ic=1,wf_nc_k(ik) ig=DEV_VAR(wf_igk)(ic,ik) igr=DEV_VAR(g_rot)(ig,isymm) - wf_tab_loc(ic)=DEV_VAR(G_m_G)(igr,ig0) + wf_tab_loc(ic,1)=ig + wf_tab_loc(ic,2)=DEV_VAR(G_m_G)(igr,ig0) enddo endif ! @@ -86,24 +88,26 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) if (n_spinor==1) then ! !DEV_ACC_DEBUG data present(WF_k_tmp,g_rot,WF_p) - !DEV_ACC parallel loop private(ig,igr,igs) + !DEV_ACC parallel loop private(ig,igs) !DEV_CUF kernel do(1) <<<*,*>>> !DEV_OMPGPU target map(present,alloc:WF_k_tmp,g_rot,WF_p) !DEV_OMPGPU teams loop do ic=1,wf_nc_k(ik) - igs=wf_tab_loc(ic) + ig =wf_tab_loc(ic,1) + igs=wf_tab_loc(ic,2) WF_k_tmp(igs,1)=WF_p(ig,1) enddo ! else ! !DEV_ACC_DEBUG data present(WF_k_tmp,g_rot,WF_p) - !DEV_ACC parallel loop private(ig,igr,igs) + !DEV_ACC parallel loop private(ig,igs) !DEV_CUF kernel do(1) <<<*,*>>> !DEV_OMPGPU target map(present,alloc:WF_k_tmp,g_rot,WF_p) !DEV_OMPGPU teams loop do ic=1,wf_nc_k(ik) - igs=wf_tab_loc(ic) + ig =wf_tab_loc(ic,1) + igs=wf_tab_loc(ic,2) WF_k_tmp(igs,1)=ssop_loc(1,1)*WF_p(ig,1)+ssop_loc(1,2)*WF_p(ig,2) WF_k_tmp(igs,2)=ssop_loc(2,1)*WF_p(ig,1)+ssop_loc(2,2)*WF_p(ig,2) enddo From 99a8dbb34e732196a11a67bfe7aff6a4510040d6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 23 Sep 2025 17:24:23 +0200 Subject: [PATCH 1129/1367] Small change in comment --- src/wf_and_fft/WF_phase_matrices.F | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index f9f71e47fc..a69dc89296 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -175,9 +175,10 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! spin_sop with time-reversal are not a space group ! I need to build the composed spin symmetry operator ! - ! OPTION 2 (disabled): directly compute composed spin symmetry + ! (disabled if n_spinor=2) + ! OPTION 2: directly compute composed spin symmetry if(n_spinor==2.and.opt2) then - ! The following code is probably wrong + ! The following code is probably wrong s1=spin_sop(:,:,isk) s2=spin_sop(:,:,isloop) !if (isloop>nsym/(1+i_time_rev)) s1=conjg(s1) @@ -206,7 +207,8 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isloop,iGloop,WF_Rk_c,isref=isk,iGref=iGk) endif ! - ! OPTION 2 (disabled): Use the composed symmetry, importing the composed spin soc + ! (disabled if n_spinor=2) + ! OPTION 2: Use the composed symmetry, importing the composed spin soc if (opt2) then call WF_copy(WF_k,WF_Rk_c) call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c,ssop=spin_sop_composed) From 0264a0f3f6a8308546ac5e9706f3b74beb3d9cfd Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 24 Sep 2025 10:01:50 +0200 Subject: [PATCH 1130/1367] - Fixed input file generation for excph (EXCTemp variable) - Fixed compilation with nvfortran --- src/interface/INIT_load.F | 5 ++--- src/wf_and_fft/WF_phase_matrices.F | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 7da28210fd..21156d1b9f 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -211,8 +211,8 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #else call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit,verb_level=V_general) #endif - call it(defs,'EXCTemp', '[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) - call it(defs,'BoseCut', '[BOSE] Finite T Bose function cutoff',bose_E_cut,verb_level=V_general) + call it(defs,'EXCTemp', 'Excitonic Temperature (for luminescence spectra and EXCPH)',Boltz_Temp,T_unit) + call it(defs,'BoseCut', 'Finite T Bose function cutoff',bose_E_cut,verb_level=V_general) #if defined _ELPH call it('f',defs,'BSEscatt', '[KPT] Compute extended k/q scatering',verb_level=V_kpt) call it(defs,'ElPhRndNq', '[ELPH] Read random Q-points',elph_nQ_used,verb_level=V_ph) @@ -698,7 +698,6 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states) call it(defs,'ELPhExcSum', '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum) call it(defs,'LoutPath', '[EXCPH] Path of the outgoing L',Lout_path) - call it(defs,'EXCTemp' ,'[EXCPH] Excitonic Temperature (for luminescence spectra)',Boltz_Temp,T_unit) call it(defs,'AlphaQ' ,'[EXCPH] Excitonic band structure 2D distortion',alphaQ) call it(defs,'EXCLongDr' ,'[EXCPH] Electric field versor for the excitons',EXC_q0) ! diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index a69dc89296..71d5464d7e 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -22,7 +22,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use units, ONLY:HA2EV use LIVE_t, ONLY:live_timing use R_lattice, ONLY:bz_samp,G_m_G,minus_G,g_vec,rl_sop - use D_lattice, ONLY:nsym,i_time_rev,sop_tab,DEV_VAR(spin_sop) + use D_lattice, ONLY:nsym,i_time_rev,sop_tab,spin_sop use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k @@ -211,7 +211,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! OPTION 2: Use the composed symmetry, importing the composed spin soc if (opt2) then call WF_copy(WF_k,WF_Rk_c) - call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c,ssop=spin_sop_composed) + call WF_symm_kpoint_g(blim,ik,i_sp_pol,isk_c,iGk_c,WF_Rk_c,ssop=DEV_VAR(spin_sop_composed)) endif ! call WF_copy(WF_k,WF_Rk_y) From 1e2043a3f12cf7260e0b6287e96d86a69e9fd8d5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 24 Sep 2025 16:33:42 +0200 Subject: [PATCH 1131/1367] Reverted some changes w.r.t. develop which are not needed --- src/bse/K_driver_init.F | 7 ------- src/io/io_EXCPH_SE.F | 2 +- src/io/variables_X.F | 2 +- src/pol_function/X_pre_setup.F | 2 +- src/qp/QP_mpa.F | 23 ++++++++++++----------- 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 1a7ab1ad07..9491b0eb80 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -246,13 +246,6 @@ subroutine K_driver_init(what,iq,Ken,Xk) BS_res_K_exchange=.FALSE. BS_cpl_K_exchange=.FALSE. endif -#if defined _ELPH - ! [EXCPH]: Allow code to go back to different Lkind calculations after Ltilde - if ( (.not.STRING_match(BSE_L_kind,"tilde")) .and. (.not.l_bs_fxc).and.(BS_res_K_exchange.eqv..FALSE.) ) then - BS_res_K_exchange=.TRUE. - BS_cpl_K_exchange=BS_res_K_exchange - endif -#endif ! ! CORE Logicals !=============== diff --git a/src/io/io_EXCPH_SE.F b/src/io/io_EXCPH_SE.F index 038674360a..464477c31c 100644 --- a/src/io/io_EXCPH_SE.F +++ b/src/io/io_EXCPH_SE.F @@ -2,7 +2,7 @@ ! Copyright (C) 2000-2019 the YAMBO team ! http://www.yambo-code.org ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): FP ! ! headers ! diff --git a/src/io/variables_X.F b/src/io/variables_X.F index 507939317d..98df33f26d 100644 --- a/src/io/variables_X.F +++ b/src/io/variables_X.F @@ -90,7 +90,7 @@ integer function variables_X(ID,local_desc,X,EM1S_NOSOC) & VAR="[r,Vnl] included",L0=X%Vnl_included,WARN=.true.,OP=(/"=="/),DESCRIPTOR=local_desc) ! call io_variable_elemental(ID,& -& VAR="Field direction",R1=X%q0,WARN=.true.,OP=(/"==","==","=="/),DESCRIPTOR=local_desc) +& VAR="Field direction",R1=X%q0,CHECK=.true.,OP=(/"==","==","=="/),DESCRIPTOR=local_desc) ! if (ver_is_gt_or_eq(ID,(/3,0,1/))) then call io_variable_elemental(ID,& diff --git a/src/pol_function/X_pre_setup.F b/src/pol_function/X_pre_setup.F index 465b814d4a..5ba74f3d3f 100644 --- a/src/pol_function/X_pre_setup.F +++ b/src/pol_function/X_pre_setup.F @@ -48,7 +48,7 @@ subroutine X_pre_setup(Xen,Xk,X) ! Other checks ! if (X%ib(1)<0.or.X%ib(1)>maxval(Xen%nbm).or.X%ib(2)Xen%nb.or.X%ib(2)Xen%nb.or.X%ib(2) Date: Wed, 24 Sep 2025 18:56:21 +0200 Subject: [PATCH 1132/1367] fixed res_me expression --- src/bse/K_IP.F | 21 ++++++++++----------- src/bse/K_dipoles.F | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index c81d55cee0..f18f60d378 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -247,26 +247,25 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! BSE dipoles stored according to: ! BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=/2 ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=/2 - ! BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)= + ! BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)= - ! sigma_x + ! res_me(1)=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+& BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) - res_me(1)=res_me(1)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + res_me(1)=res_me(1)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) - ! sigma_y - res_me(2)=-cI*conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) - res_me(2)=res_me(2)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + ! + res_me(2)=conjg(cI*(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& + BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1))) + res_me(2)=res_me(2)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) - ! sigma_z - res_me(3)=BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1) - res_me(3)=res_me(3)*conjg(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)) + ! + res_me(3)=conjg(BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)) + res_me(3)=res_me(3)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) - ! This I'm not so sure about... if (l_BS_esort.and.i_res_ares==1) then call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 68ec0b536e..fce7ea825e 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -233,7 +233,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) if (l_BS_magnetoelectric) then - BS_T_grp(i_T_g)%dipoles_mag(3,i_T,2)=DIP_expanded(3) + BS_T_grp(i_T_g)%dipoles_mag(3,i_T,2)=conjg(DIP_expanded(3)) endif endif From 940072cd4cbb43b1339f332b4c92cd98cbbe4631 Mon Sep 17 00:00:00 2001 From: thge123 Date: Thu, 25 Sep 2025 17:26:59 +0200 Subject: [PATCH 1133/1367] cleanup --- src/bse/K_IP.F | 2 +- src/bse/K_dipoles.F | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index f18f60d378..564425ef62 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -244,7 +244,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if(l_BS_magnetoelectric) then ! Dipole residuals: res_me(i) = * - ! BSE dipoles stored according to: + ! BSE dipoles_mag: ! BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=/2 ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=/2 ! BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)= diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index fce7ea825e..592e294fd1 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -233,12 +233,12 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) if (l_BS_magnetoelectric) then - BS_T_grp(i_T_g)%dipoles_mag(3,i_T,2)=conjg(DIP_expanded(3)) + BS_T_grp(i_T_g)%dipoles_mag(3,i_T,2)=DIP_expanded(3) endif endif - + ! if (l_BS_magnetoelectric) then - BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)=DIP_expanded(3) + BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)=conjg(DIP_expanded(3)) endif ! endif From 90e3b2e83ea5c028614f11228f29f96762ad9379 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 26 Sep 2025 00:10:48 +0200 Subject: [PATCH 1134/1367] title contains both old yambo and new lumen options --- src/driver/title.c | 30 +++++++++++++++++++++++++++++- src/driver/usage.c | 4 ++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/driver/title.c b/src/driver/title.c index 106c6f3ac7..5e427d108f 100644 --- a/src/driver/title.c +++ b/src/driver/title.c @@ -10,7 +10,35 @@ #include #include -void title(FILE *file_name, char *cmnt, struct tool_struct t) +void title_yambo(FILE *file_name, char *cmnt, struct tool_struct t) +{ + char *tool = running_tool(); + char *pj = running_project(); + char *libs = running_libraries(); + fprintf(file_name, "%s%s\n", cmnt, " ___ __ _____ __ __ _____ _____ "); + fprintf(file_name, "%s%s\n", cmnt, "| Y || _ || Y || _ \\ | _ |"); + fprintf(file_name, "%s%s\n", cmnt, "| | ||. | ||. ||. | / |. | |"); + fprintf(file_name, "%s%s\n", cmnt, " \\ _/ |. _ ||.\\ / ||. _ \\ |. | |"); + fprintf(file_name, "%s%s\n", cmnt, " |: | |: | ||: | ||: | \\|: | |"); + fprintf(file_name, "%s%s\n", cmnt, " |::| |:.|:.||:.|:.||::. /|::. |"); + fprintf(file_name, "%s%s\n", cmnt, " `--\" `-- --\"`-- --\"`-----\" `-----\""); + fprintf(file_name, "%s '%s' \n", cmnt, t.desc); + if (strlen(pj) > 0) + { + fprintf(file_name, "%s\n%s This is : %s(%s)", cmnt, cmnt, tool, + pj); + } + else + { + fprintf(file_name, "%s\n%s This is : %s", cmnt, cmnt, tool); + } + fprintf(file_name, "%s\n%s Version : %s ", cmnt, cmnt, + t.version_string); + fprintf(file_name, "%s\n%s Configuration: %s \n", cmnt, cmnt, libs); +}; + + +void title_lumen(FILE *file_name, char *cmnt, struct tool_struct t) { char *tool = running_tool(); char *pj = running_project(); diff --git a/src/driver/usage.c b/src/driver/usage.c index 1ae9cbe1b5..21c2e28505 100644 --- a/src/driver/usage.c +++ b/src/driver/usage.c @@ -49,7 +49,7 @@ void usage(options_struct *options, struct tool_struct t, char *what, if (strcmp(what, "help") == 0) { - title(stderr, "", t); + title_lumen(stderr, "", t); n_strings = 0; for (i_opt = 0; i_opt < n_options; i_opt++) @@ -181,7 +181,7 @@ void usage(options_struct *options, struct tool_struct t, char *what, fprintf(stderr, "unrecognized option '%s'\n", what); exit(0); } - title(stderr, "", t); + title_lumen(stderr, "", t); fprintf(stderr, "\n"); fprintf(stderr, " Long option: %s\n", options[i_opt].long_opt); if (options[i_opt].short_opt > 57) From 3136dabfe5b81ce4c0a3dea85184763be234a52d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 26 Sep 2025 01:01:34 +0200 Subject: [PATCH 1135/1367] Fixed lumen logo --- src/driver/title.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/driver/title.c b/src/driver/title.c index 5e427d108f..5928ef4bd1 100644 --- a/src/driver/title.c +++ b/src/driver/title.c @@ -43,13 +43,14 @@ void title_lumen(FILE *file_name, char *cmnt, struct tool_struct t) char *tool = running_tool(); char *pj = running_project(); char *libs = running_libraries(); - fprintf(file_name, "%s%s\n", cmnt, " _ "); - fprintf(file_name, "%s%s\n", cmnt, "| |"); - fprintf(file_name, "%s%s\n", cmnt, "| | _ _ _ ______ ____ ___"); - fprintf(file_name, "%s%s\n", cmnt, "| | | | | | '_ \\/ _ \\ _` \\"); - fprintf(file_name, "%s%s\n", cmnt, "| | | | | | | | | | | ___/ | | |"); - fprintf(file_name, "%s%s\n", cmnt, "| |___ | |_| | | | | | | _ | | |"); - fprintf(file_name, "%s%s\n", cmnt, "\\____/ \\__,__|_| |_| |_/\\___|_| |_|"); + fprintf(file_name, "%s%s\n", cmnt, " _ "); + fprintf(file_name, "%s%s\n", cmnt, " | |"); + fprintf(file_name, "%s%s\n", cmnt, " | | _ _ _ __ ___ ____ __ _"); + fprintf(file_name, "%s%s\n", cmnt, " | | | | | | '_ ' _ \\/ _ \\/ _` \\"); + fprintf(file_name, "%s%s\n", cmnt, " | | | | | | | | | | | ___/ | | |"); + fprintf(file_name, "%s%s\n", cmnt, " | |___ | |_| | | | | | | \\__| | | |"); + fprintf(file_name, "%s%s\n", cmnt, " \\_____/\\__,__|_| |_| |_/\\____|_| |_|"); + fprintf(file_name, "%s%s\n", cmnt, " "); fprintf(file_name, "%s '%s' \n", cmnt, t.desc); if (strlen(pj) > 0) { From 65bee5b00143c9d46a0aa407646f0cc87f2cf25b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 26 Sep 2025 09:12:38 +0200 Subject: [PATCH 1136/1367] Fixed wrong dimension argument passed in src/exc-ph/EXCPH_gkkp_driver.F to subroutine EXC_WF_symm_qpoint --- src/exc-ph/EXCPH_gkkp_driver.F | 7 ++++--- src/modules/mod_EXCPH.F | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index 8410e47fa8..e0ce8d9046 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -35,7 +35,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use EXCPH, ONLY:BS_mat_in,BS_mat_out,BSS_eh_table_in,EXCPH_gkkp,EXCPH_gkkp_sq,BS_E_in,BS_E,BSS_eh_table_m1_in,& & EXCPH_states,EXCPH_sum,k_plus_q_table,build_Q_map,EXCPH_q, & & EXCPH_gkkp_alloc,EXCPH_gkkp_free,l_const_elph,l_abs_elph,l_abs_exc,l_elec_only,l_hole_only, & -& n_exc_in,BSE_alloc,BSE_free,BSE_in_alloc,BSE_out_alloc,BSE_in_free +& n_exc_in,n_exc_out,BSE_alloc,BSE_free,BSE_in_alloc,BSE_out_alloc,BSE_in_free use LIVE_t, ONLY:live_timing use timing_m, ONLY:timing use com, ONLY:msg @@ -64,7 +64,8 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Define n_exc_in ! - n_exc_in=EXCPH_states(2)-EXCPH_states(1)+1 + n_exc_in= EXCPH_states(2)-EXCPH_states(1)+1 + n_exc_out=EXCPH_sum(2) -EXCPH_sum(1)+1 ! Sorting index is trivial, no sorting done in exc-ph. do il=EXCPH_states(1),EXCPH_States(2) S_index(il)=il @@ -208,7 +209,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! BS_mat_out=cZERO ! Here we obtain the rotated BS_mat_out at iq_bz - call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_in,iq,iq_s,1,ID_phases,S_index,BS_mat_out,l_min_mem) + call EXC_WF_symm_qpoint(k,q,EXCPH_states(1),n_exc_out,iq,iq_s,1,ID_phases,S_index,BS_mat_out,l_min_mem) ! EXCPH_gkkp =cZERO EXCPH_gkkp_sq =rZERO diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index e0ee67b307..2daab8c1b3 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -45,6 +45,7 @@ module EXCPH complex(SP), allocatable :: EXCPH_Gkkp(:,:,:) real(SP), allocatable :: EXCPH_Gkkp_sq(:,:,:) integer :: n_exc_in + integer :: n_exc_out integer :: EXCPH_states(2) ! External states integer :: EXCPH_sum(2) ! Internal states ("virtual") integer :: EXCPH_interband(2) ! Interband states From d8bdd9fdeafbb8572b819cdb107d2103c31db651 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 26 Sep 2025 18:04:43 +0200 Subject: [PATCH 1137/1367] Added BASED_on_tech_master --- BASED_on_tech_master | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 BASED_on_tech_master diff --git a/BASED_on_tech_master b/BASED_on_tech_master new file mode 100644 index 0000000000..e69de29bb2 From f56afa4f30a97a48fe0546654f4f7fa654190898 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 27 Sep 2025 01:26:18 +0200 Subject: [PATCH 1138/1367] Fixed S_index vector --- src/exc-ph/EXCPH_gkkp_driver.F | 26 +++++++++++--------------- src/exc-ph/EXCPH_gkkp_eval.F | 14 +++++++++++--- src/modules/mod_EXCPH.F | 8 ++++---- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/exc-ph/EXCPH_gkkp_driver.F b/src/exc-ph/EXCPH_gkkp_driver.F index e0ce8d9046..668211dcd4 100644 --- a/src/exc-ph/EXCPH_gkkp_driver.F +++ b/src/exc-ph/EXCPH_gkkp_driver.F @@ -26,7 +26,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) use D_lattice, ONLY:nsym use parser_m, ONLY:parser use X_m, ONLY:X_t - use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_alloc,BSS_free!,BS_H_dim,BSS_n_eig + use BS_solvers, ONLY:BS_mat,BSS_eh_table,BSS_eh_table_m1,BSS_alloc,BSS_free,BSS_n_eig!,BS_H_dim,BSS_n_eig !use BS, ONLY:BSqpts,BS_H_dim,BS_bands use ELPH, ONLY:elph_branches,l_GKKP_expanded_DB_exists!,Q_io_map use IO_m, ONLY:NONE,OP_APP_CL,OP_RD_CL,DUMP,OP_RD,RD_CL_IF_END,OP_WR_CL,deliver_IO_error_message, & @@ -50,8 +50,9 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! ! Work Space ! - integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM - integer :: S_index(EXCPH_states(1):EXCPH_States(2)),ID_phases + integer, external :: io_ELPH,io_EXCPH_gkkp,io_RIM + integer, allocatable :: S_index(:) + integer :: ID_phases integer :: ID_gkkp,ID_exc_gkkp,io_err,io_ID,IO_ACT integer :: il,iq_bz,iq,i_star,iq_s,elph_branches_save(2)!,iq_db logical :: l_min_mem @@ -66,10 +67,6 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) ! n_exc_in= EXCPH_states(2)-EXCPH_states(1)+1 n_exc_out=EXCPH_sum(2) -EXCPH_sum(1)+1 - ! Sorting index is trivial, no sorting done in exc-ph. - do il=EXCPH_states(1),EXCPH_States(2) - S_index(il)=il - enddo ! ! Check if Lout and Lin are present ! and read their kind @@ -143,17 +140,16 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) call BSE_in_alloc(k) ! computed at the BSE step call BSE_out_alloc() ! rotated via unitary transformations ! + ! Sorting index is trivial, no sorting done in exc-ph. + allocate(S_index(BSS_n_eig)) + do il=1,BSS_n_eig + S_index(il)=il + enddo + ! ! Allocate EXCPH_gkkp ! call EXCPH_gkkp_alloc() ! - ! Debug - !call k_ibz2bz(k,"i",.false.) - !do ik=1,k%nbz - !! write (1,*) k%ptbz(ik,:) - !enddo - !close(1) - ! ! K plus q table ! call build_k_plus_q_table() @@ -167,7 +163,7 @@ subroutine EXCPH_gkkp_driver(E,k,q,X) BS_mat_in =BS_mat(:,EXCPH_states(1):EXCPH_states(2)) ! BSS_eh_table_in =BSS_eh_table - BSS_eh_table_m1_in=BSS_eh_table_m1(:,:,:,1,1) + BSS_eh_table_m1_in=BSS_eh_table_m1 BS_E_in =BS_E ! ! Open gkkp_expanded diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index aa66867f83..47174c8d63 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -39,7 +39,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! integer :: io_err,i_H,i_Hp,i_alpha,iq_db,ik_db,& & iv,ic,ik_bz,ivp,icp,i_beta,ik_plus_iq_bz,IO_ACT, & -& iv_in,ic_in,ik_bz_in +& iv_in,ic_in,ik_bz_in,i_sp_c,i_sp_v,i_sp_c_in,i_sp_v_in real(SP) :: ph_E complex(SP) :: elph_gkkp,EXC_out,EXC_in integer, external :: io_ELPH @@ -86,6 +86,8 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ik_bz = BSS_eh_table(i_H,1) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) + i_sp_c= BSS_eh_table(i_H,4) + i_sp_v= BSS_eh_table(i_H,5) ! ! only sum k-points up to the shell with radius EXCPH_kthresh (debug only) if (EXCPH_kthresh>0._SP) then @@ -103,7 +105,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (l_elec_only) exit ! - i_Hp=BSS_eh_table_m1(ik_bz,ivp,ic,1,1) + i_Hp=BSS_eh_table_m1(ik_bz,ivp,ic,i_sp_c,i_sp_v) if (i_Hp==0) cycle ! if (.not.l_const_elph) then @@ -126,7 +128,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! if (l_hole_only) exit ! - i_Hp=BSS_eh_table_m1(ik_plus_iq_bz,iv,icp,1,1) + i_Hp=BSS_eh_table_m1(ik_plus_iq_bz,iv,icp,i_sp_c,i_sp_v) if (i_Hp==0) cycle if (.not.l_const_elph) then ik_db=K_io_map(ik_plus_iq_bz) @@ -155,16 +157,22 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ik_bz = BSS_eh_table(i_H,1) iv = BSS_eh_table(i_H,2) ic = BSS_eh_table(i_H,3) + i_sp_c= BSS_eh_table(i_H,4) + i_sp_v= BSS_eh_table(i_H,5) ! ! K_in = (ik_bz,iv,ic) ! ik_bz_in = BSS_eh_table_in(i_H,1) iv_in = BSS_eh_table_in(i_H,2) ic_in = BSS_eh_table_in(i_H,3) + i_sp_c_in= BSS_eh_table_in(i_H,4) + i_sp_v_in= BSS_eh_table_in(i_H,5) ! if (ik_bz /= ik_bz_in) call error(" Wrong k correspondence") if (iv /= iv_in ) call error(" Wrong iv correspondence") if (ic /= ic_in ) call error(" Wrong ic correspondence") + if (i_sp_c/= i_sp_c_in) call error(" Wrong i_sp_c correspondence") + if (i_sp_v/= i_sp_v_in) call error(" Wrong i_sp_v correspondence") ! ! EXC_IN: "Left" part of exciton-phonon coupling. The "right" part is its conjugate ! diff --git a/src/modules/mod_EXCPH.F b/src/modules/mod_EXCPH.F index 2daab8c1b3..62590a51e6 100644 --- a/src/modules/mod_EXCPH.F +++ b/src/modules/mod_EXCPH.F @@ -65,7 +65,7 @@ module EXCPH ! ExcPH gkkp ! complex(SP), allocatable :: A_rot(:,:),Xi(:,:) - integer, allocatable :: BSS_eh_table_m1_in(:,:,:) + integer, allocatable :: BSS_eh_table_m1_in(:,:,:,:,:) integer, allocatable :: k_plus_q_table(:,:) complex(SP), allocatable :: BS_E_in(:),BS_E(:) real(SP), allocatable :: BS_all_E(:,:) @@ -147,8 +147,8 @@ subroutine BSE_in_alloc(k) ! YAMBO_ALLOC(BS_E_in,(BSS_n_eig)) YAMBO_ALLOC(BS_mat_in,(BS_H_dim,EXCPH_states(1):EXCPH_states(2))) - YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,3+n_sp_pol-1)) - YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2))) + YAMBO_ALLOC(BSS_eh_table_in,(BS_H_dim,5)) + YAMBO_ALLOC(BSS_eh_table_m1_in,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) ! BS_mat_in=cZERO BS_E_in =cZERO @@ -266,7 +266,7 @@ subroutine BSE_alloc(k,q) ! pre-allocs... ! YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) - YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),1,1)) + YAMBO_ALLOC(BSS_eh_table_m1,(k%nbz,BS_bands(1):BS_bands(2),BS_bands(1):BS_bands(2),n_sp_pol,n_sp_pol)) ! if(.not.allocated(BS_E)) then YAMBO_ALLOC(BS_E,(BSS_n_eig)) From 565417afac57caa1c15d6d8dbf5e6db7a1d7e937 Mon Sep 17 00:00:00 2001 From: thge123 Date: Sat, 27 Sep 2025 12:31:27 +0200 Subject: [PATCH 1139/1367] BSE impl. start --- src/allocations/X_ALLOC_global.F | 4 +- src/bse/K_IP.F | 67 +++++++++++++------ .../K_components_folded_in_serial_arrays.F | 35 ++++++---- src/bse/K_diago_driver.F | 26 +++++-- src/bse/K_diago_left_residuals.F | 25 ++++--- src/bse/K_diago_response_functions.F | 43 +++++++++--- src/bse/K_diago_right_residuals.F | 27 ++++---- src/bse/K_dipoles.F | 52 ++++++++------ src/bse/K_observables.F | 6 ++ src/dipoles/DIPOLE_orbital_magnetization_cd.F | 4 ++ src/dipoles/DIPOLE_setup.F | 13 +++- src/modules/mod_BS.F | 12 ++-- src/modules/mod_BS_solvers.F | 6 +- src/modules/mod_MAGNETOELECTRIC.F | 38 +++++++++++ src/modules/mod_interfaces.F | 6 +- src/output/K_OUTPUT.F | 5 +- src/output/X_OUTPUT_driver.F | 10 ++- ...o_intel_single_precission_omp_configure.sh | 42 ++++++++++++ 18 files changed, 308 insertions(+), 113 deletions(-) create mode 100644 src/modules/mod_MAGNETOELECTRIC.F create mode 100755 yambo_intel_single_precission_omp_configure.sh diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index ff22f811ae..9cf6e06ffe 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -81,10 +81,10 @@ subroutine X_ALLOC_global(WHAT,W) if (X_do_obs("fxc")) call X_ALLOC_elemental("FXC",(/W%n_freqs/)) ! if (X_do_obs("magnetoelectric")) then - call X_ALLOC_elemental("ME",(/W%n_freqs,3,4/)) + call X_ALLOC_elemental("ME",(/W%n_freqs,2,4/)) ME_ij(:,1,1)=W%p(:) ME_ij(:,2,1)=W%p(:) - ME_ij(:,3,1)=W%p(:) + ME_ij=cZERO endif else if (WHAT=="FREE") then call X_ALLOC_elemental("FREE ALL") diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 564425ef62..6a947bd38c 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -241,36 +241,63 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) endif endif + ! if(l_BS_magnetoelectric) then + ! Spin part + res_me(1)=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(1,i_T,1)) + if(l_BS_trace) then + ! x*sigma = DIP_x*DIP_spin; + res_me(1)=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(3,i_T,1)))/3._SP + endif + res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) + + ! Orbital part + res_me(2)=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1)) + if(l_BS_trace) then + ! x*L = DIP_x*DIP_orbital; + res_me(2)=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP + endif + res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) + + if (l_BS_esort.and.i_res_ares==1) then + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) + endif + + ! Old part to be deleted... ! Dipole residuals: res_me(i) = * ! BSE dipoles_mag: ! BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=/2 ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=/2 ! BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)= - ! - res_me(1)=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+& - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) - res_me(1)=res_me(1)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) - res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) - ! - res_me(2)=conjg(cI*(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1))) - res_me(2)=res_me(2)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) - res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) + ! res_me(1)=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+& + ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) + ! res_me(1)=res_me(1)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) + ! res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) - ! - res_me(3)=conjg(BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)) - res_me(3)=res_me(3)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) - res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) + ! ! + ! res_me(2)=conjg(cI*(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& + ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1))) + ! res_me(2)=res_me(2)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) + ! res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) - if (l_BS_esort.and.i_res_ares==1) then - call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) - call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) - call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(3),vtmpC) - endif + ! ! + ! res_me(3)=conjg(BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)) + ! res_me(3)=res_me(3)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) + ! res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) + + ! if (l_BS_esort.and.i_res_ares==1) then + ! call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) + ! call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) + ! call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(3),vtmpC) + ! endif endif ! if ( abs(real(E_plus_W0)) < Dip%Energy_threshold .and. iq==1 .and. dip_r ) then @@ -351,11 +378,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (l_BS_magnetoelectric) then ME_ij(:,1,3)=ME_ij(:,1,3)-res_me(1)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) ME_ij(:,2,3)=ME_ij(:,2,3)-res_me(2)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) - ME_ij(:,3,3)=ME_ij(:,3,3)-res_me(3)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then ME_ij(:,1,3)=ME_ij(:,1,3)+conjg(res_me(1))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) ME_ij(:,2,3)=ME_ij(:,2,3)+conjg(res_me(2))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) - ME_ij(:,3,3)=ME_ij(:,3,3)+conjg(res_me(3))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) endif endif enddo diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 51cd59a30f..085431ec28 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -12,19 +12,20 @@ subroutine K_components_folded_in_serial_arrays(iq) ! ! See mod_BS on the K structure ! - use parallel_int, ONLY:PP_redux_wait - use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_IND_T_groups,PAR_COM_Xk_ibz_INDEX - use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& -& BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc - use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& -& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BS_dip_size,BS_H_dim,l_BS_ares_from_res - use timing_m, ONLY:timing - use LIVE_t, ONLY:live_timing - use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc - use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_alloc,BSS_PL_f,PL_weights - use timing_m, ONLY:timing + use parallel_int, ONLY:PP_redux_wait + use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_IND_T_groups,PAR_COM_Xk_ibz_INDEX + use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& +& BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc + use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& +& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_magnetoelectruc +& l_BS_photolum,BS_dip_size,BS_H_dim,l_BS_ares_from_res + use timing_m, ONLY:timing + use LIVE_t, ONLY:live_timing + use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc + use MAGNETOELECTRIC, ONLY:BSS_dipoles_me, BSS_ME_alloc + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_alloc,BSS_PL_f,PL_weights + use timing_m, ONLY:timing ! implicit none ! @@ -49,6 +50,7 @@ subroutine K_components_folded_in_serial_arrays(iq) call BSS_alloc( ) call BSS_MAGN_alloc( ) call BSS_DICH_alloc( ) + call BSS_DICH_alloc( ) call BSS_PL_alloc( ) ! if (BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) @@ -107,6 +109,8 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) ! + if (l_BS_magnetoelectric) BSS_dipoles_me(:,H_pos)=BS_T_grp(i_g)%dipoles_spin(:,i_Tr,i_res_ares_solver) + ! if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:BS_dip_size) ! enddo @@ -156,6 +160,11 @@ subroutine K_components_folded_in_serial_arrays(iq) call PP_redux_wait(BSS_dipoles_dich,COMM=PAR_COM_eh_INDEX%COMM) endif ! + if (l_BS_magnetoelectric) then + call PP_redux_wait(BSS_dipoles_me,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait(BSS_dipoles_me,COMM=PAR_COM_eh_INDEX%COMM) + endif + ! if (l_BS_photolum) then call PP_redux_wait(BSS_dipoles_PL,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) call PP_redux_wait(BSS_dipoles_PL,COMM=PAR_COM_eh_INDEX%COMM) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index f5f0026f63..506836234c 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -29,7 +29,8 @@ subroutine K_diago_driver(iq,W,X_static) use units, ONLY:HA2EV use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& & BS_res_ares_n_mat,l_BS_ares_from_res,& -& l_BS_abs,l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum,l_BS_dichroism +& l_BS_abs,l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum,l_BS_dichroism,& +& l_BS_magnetoelectric use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize_only,BSS_resize_and_save,BSS_n_eig_Input, & & BSS_write_eig_2_db,BSS_eh_W,BSS_n_eig,BS_E,BSS_slepc_pseudo_herm,write_bs_ev_par,& & BSS_ldiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition @@ -104,6 +105,7 @@ subroutine K_diago_driver(iq,W,X_static) complex(SP),pointer :: BS_R_left_kerr(:) => null() complex(SP),pointer :: BS_R_right_kerr(:) => null() complex(SP),pointer :: BS_R_right_dich(:,:) => null() + complex(SP),pointer :: BS_R_right_me(:,:) => null() ! complex(SP),pointer :: BS_R_left_magn(:,:) => null() complex(SP),pointer :: BS_R_right_magn(:,:) => null() @@ -179,7 +181,8 @@ subroutine K_diago_driver(iq,W,X_static) !======================== call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& + & BS_R_right_me,BS_R_PL) ! ! Kernel and/or BSS components loading !====================================== @@ -345,6 +348,13 @@ subroutine K_diago_driver(iq,W,X_static) BS_R_right_dich(:,2) = tmp_res_ptr endif ! + if(l_BS_magnetoelectric) then + call K_diago_R_res("me1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_me(:,1) = tmp_res_ptr + call K_diago_R_res("me2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_me(:,2) = tmp_res_ptr + endif + ! if(l_BS_magnons) then call K_diago_R_res("mag1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) BS_R_right_magn(:,1) = tmp_res_ptr @@ -415,7 +425,8 @@ subroutine K_diago_driver(iq,W,X_static) ! Now I calculate the physical quantities !========================================= call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& + & BS_R_right_me,BS_R_PL) ! ! Diagonalization DB (OUT) !========================== @@ -423,7 +434,8 @@ subroutine K_diago_driver(iq,W,X_static) ! call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL,& + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& + & BS_R_right_me,BS_R_PL,& & BS_mat=BS_V_right,write_ev=.not.l_ldiago) ! call PP_wait() @@ -475,6 +487,9 @@ subroutine local_alloc(what) if (l_BS_dichroism) then YAMBO_ALLOC_P(BS_R_right_dich,(BSS_n_eig,2)) endif + if (l_BS_magnetoelectric) then + YAMBO_ALLOC_P(BS_R_right_me,(BSS_n_eig,2)) + endif if (l_BS_magnons) then YAMBO_ALLOC_P(BS_R_left_magn,(BSS_n_eig,2)) YAMBO_ALLOC_P(BS_R_right_magn,(BSS_n_eig,2)) @@ -519,6 +534,7 @@ subroutine local_free() YAMBO_FREE_P(BS_R_right_kerr) YAMBO_FREE_P(BS_R_left_kerr) YAMBO_FREE_P(BS_R_right_dich) + YAMBO_FREE_P(BS_R_right_me) YAMBO_FREE_P(BS_R_right_magn) YAMBO_FREE_P(BS_R_left_magn) YAMBO_FREE_P(BS_R_PL) @@ -538,6 +554,7 @@ subroutine K_ldiago_resize_variables() if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) + if(associated(BS_R_right_me)) call BSS_resize_only(BS_R_right_me) if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) @@ -560,6 +577,7 @@ subroutine K_slepc_resize_variables() if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) + if(associated(BS_R_right_me)) call BSS_resize_only(BS_R_right_me) if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index e56eeb2113..8f3406d234 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -17,17 +17,18 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & ! ! Remember: 1/(w-H)= \sum_ij |i right>^{-1) ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) ! - use pars, ONLY:SP,cZERO - use stderr, ONLY:intc - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset,ncpu - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use LIVE_t, ONLY:live_timing - use X_m, ONLY:global_gauge - use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_dipoles_opt - use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& - & l_BS_res_from_E,BS_not_const_eh_f - use MAGNONS, ONLY:BSS_dipoles_magn - use DICHROISM, ONLY:BSS_dipoles_dich + use pars, ONLY:SP,cZERO + use stderr, ONLY:intc + use wrapper_omp, ONLY:V_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset,ncpu + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use X_m, ONLY:global_gauge + use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_dipoles_opt + use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& + & l_BS_res_from_E,BS_not_const_eh_f + use MAGNONS, ONLY:BSS_dipoles_magn + use DICHROISM, ONLY:BSS_dipoles_dich + use MAGNETOELECTRIC, ONLY:BSS_dipoles_me ! implicit none ! @@ -101,6 +102,8 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="me1") tmp_res=BSS_dipoles_me(1,res_range(1):res_range(2)) + if(trim(mode)=="me2") tmp_res=BSS_dipoles_me(2,res_range(1):res_range(2)) if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) ! diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 592e294fd1..aebeec0db3 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -182,14 +182,14 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) endif ! ! Dichroism - if (l_BS_dichroism) then + if (l_BS_dichroism.or.l_BS_magnetoelectric) then if(iq==1.and.i_G_shift==1) then call DIPOLE_rotate(ic,iv,ik_bz,i_sp_pol_c,"DIP_L",Xk,DIP_expanded) do i_dip=1,BS_dip_size DIP_projected(i_dip)=dot_product(BS_field_direction(:,i_dip),DIP_expanded) enddo else - call error(' finite q not implemented for dichroism') + call error(' finite q not implemented for dichroism or magnetoelectric effect') endif BS_T_grp(i_T_g)%dipoles_dic(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) if (BS_K_coupling.and.l_BS_ares_from_res) then @@ -197,7 +197,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) endif endif ! - ! Magnons + ! Magnons and Magnetoelectric if (l_BS_magnons.or.l_BS_magnetoelectric) then ! ! notice: @@ -218,29 +218,37 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) DIP_expanded(3)=-conjg(BSE_scatt%rhotw(1)) endif ! - ! DIP_Smins(c,v,k) is (i_sp_pol_c), to get (i_sp_pol_v) = conjg((i_sp_pol_c)) - ! DIP_Splus(c,v,k) is (i_sp_pol_c), to get (i_sp_pol_v) = conjg((i_sp_pol_c)) - ! - DIP_Splus = 0.5_SP*(DIP_expanded(1)+cI*DIP_expanded(2)) ! S+ for c\dn> transitions: - DIP_Smins = 0.5_SP*(DIP_expanded(1)-cI*DIP_expanded(2)) ! S- for c\up> transitions: - ! - BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=conjg(DIP_Splus) ! S- for |c\dn> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=conjg(DIP_Smins) ! S+ for |c\up> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) - ! or the right R residual associated to (eps_c\dn-eps_v\up) - ! S- for |v\dn> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) - ! S+ for |v\up> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) - if (BS_K_coupling.and.l_BS_ares_from_res) then ! This is the right A residual associated to (eps_v\up-eps_c\dn) - BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) - if (l_BS_magnetoelectric) then - BS_T_grp(i_T_g)%dipoles_mag(3,i_T,2)=DIP_expanded(3) + ! Magnons + if (l_BS_magnons) then + ! + ! DIP_Smins(c,v,k) is (i_sp_pol_c), to get (i_sp_pol_v) = conjg((i_sp_pol_c)) + ! DIP_Splus(c,v,k) is (i_sp_pol_c), to get (i_sp_pol_v) = conjg((i_sp_pol_c)) + ! + DIP_Splus = 0.5_SP*(DIP_expanded(1)+cI*DIP_expanded(2)) ! S+ for c\dn> transitions: + DIP_Smins = 0.5_SP*(DIP_expanded(1)-cI*DIP_expanded(2)) ! S- for c\up> transitions: + ! + BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=conjg(DIP_Splus) ! S- for |c\dn> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) + BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=conjg(DIP_Smins) ! S+ for |c\up> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) + ! or the right R residual associated to (eps_c\dn-eps_v\up) + ! S- for |v\dn> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) + ! S+ for |v\up> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) + if (BS_K_coupling.and.l_BS_ares_from_res) then ! This is the right A residual associated to (eps_v\up-eps_c\dn) + BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) + BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) + endif + ! endif - endif ! + ! Magnetoelectric if (l_BS_magnetoelectric) then - BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)=conjg(DIP_expanded(3)) + do i_dip=1,BS_dip_size + DIP_projected(i_dip)=dot_product(BS_field_direction(:,i_dip),DIP_expanded) + enddo + BS_T_grp(i_T_g)%dipoles_spin(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) + if (BS_K_coupling.and.l_BS_ares_from_res) then + BS_T_grp(i_T_g)%dipoles_spin(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) + endif endif - ! endif ! enddo diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index bf7aa74ae0..65d9d70df1 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -84,6 +84,12 @@ subroutine K_observables(W,Xk) call warning(" Natural dichroism without trace. Quadripolar terms are neglected") endif endif + if (l_BS_magnetoelectric) then + if (.not.(l_col_cut.and.Xk%nbz==1) ) then + call warning(" Periodic system detected. Orbital ME tensor coded only for isolated systems") + endif + if (.not.l_BS_trace) BS_dip_size=2 + endif ! if (l_BS_trace ) BS_dip_size = 3 if (l_BS_trace .and. .not.l_rpa_IP) call error(" trace coded only at the IP level") diff --git a/src/dipoles/DIPOLE_orbital_magnetization_cd.F b/src/dipoles/DIPOLE_orbital_magnetization_cd.F index 226e536c52..3177a6cd23 100644 --- a/src/dipoles/DIPOLE_orbital_magnetization_cd.F +++ b/src/dipoles/DIPOLE_orbital_magnetization_cd.F @@ -40,6 +40,7 @@ subroutine Dipole_orbital_magnetization_cd(Xen,Xk,Dip) ! if (n_LT_steps>0) call live_timing('Orbital magnetization (CD)',n_LT_steps) ! + ! ! Main loop over k in IBZ ! do i_sp_pol=1,n_sp_pol @@ -52,6 +53,9 @@ subroutine Dipole_orbital_magnetization_cd(Xen,Xk,Dip) ! ik_mem=PAR_DIPk_ibz_index(ik) ! + !> @var ib(1) lowest valence, ib(2) upper conduction + !> @var ib_lim(1) top valence, ib_lim(2) bottom conduction + ! do iv=Dip%ib(1),Dip%ib_lim(1) ! if(.not.PAR_IND_VAL_BANDS_DIP%element_1D(iv)) cycle diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 6ca1884bb1..77ab538bde 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -53,7 +53,14 @@ subroutine DIPOLE_setup(Dip) ! ! Bands ordering !---------------- - if (l_BS_dichroism.or.l_BS_magnons .or. l_BS_photolum .or. l_flag) Dip%bands_ordered=.false. + if (l_BS_dichroism.or. & +& l_BS_magnons .or. & +& l_BS_photolum .or. & +& l_flag .or. & +& l_BS_magnetoelectric) then + Dip%bands_ordered=.false. +endif + ! #if defined _SLEPC && !defined _NL !if ( index(BSS_mode,'s')/=0 ) Dip%bands_ordered=.false. #endif @@ -150,7 +157,9 @@ subroutine DIPOLE_setup(Dip) if (l_real_time) specific_obs=" M_spin M_orbRT M_it" #endif endif - if (l_BS_dichroism) specific_obs=trim(specific_obs)//" M_orbCD" + if (l_BS_dichroism.or.l_BS_magnetoelectric) then + specific_obs=trim(specific_obs)//" M_orbCD" + endif ! ! Computed components !--------------------- diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 84e8412596..2593065e4c 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -210,6 +210,7 @@ module BS complex(SP), allocatable :: dipoles_opt(:,:,:) ! (/x,y,z ; i_Tr ; 2) complex(SP), allocatable :: dipoles_dic(:,:,:) ! (/x,y,z ; i_Tr ; 2) complex(SP), allocatable :: dipoles_mag(:,:,:) ! (/S+,S-,Sz ; i_Tr; 2) + complex(SP), allocatable :: dipoles_spin(:,:,:) ! (/x,y,z ; i_Tr ; 2) ! ! Exchange Oscillators ! @@ -322,9 +323,9 @@ subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) YAMBO_ALLOC(BS_T_grp(iT)%dipoles_mag,(2,nT,nDIP)) endif if(l_BS_magnetoelectric) then - YAMBO_ALLOC(BS_T_grp(iT)%dipoles_mag,(3,nT,nDIP)) + YAMBO_ALLOC(BS_T_grp(iT)%dipoles_spin,(BS_dip_size,nT,nDIP)) endif - if(l_BS_dichroism) then + if(l_BS_dichroism.or.l_BS_magnetoelectric) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_dic,(BS_dip_size,nT,nDIP)) endif YAMBO_ALLOC(BS_T_grp(iT)%table,(nT,5)) @@ -359,12 +360,15 @@ subroutine BS_Blocks_and_Transitions_free() if (.not.allocated(BS_T_grp(iT)%table)) cycle ! YAMBO_FREE(BS_T_grp(iT)%dipoles_opt) - if (l_BS_magnons.or.l_BS_magnetoelectric) then + if (l_BS_magnons) then YAMBO_FREE(BS_T_grp(iT)%dipoles_mag) endif - if (l_BS_dichroism) then + if (l_BS_dichroism.or.l_BS_magnetoelectric) then YAMBO_FREE(BS_T_grp(iT)%dipoles_dic) endif + if (l_BS_magnetoelectric) then + YAMBO_FREE(BS_T_grp(iT)%dipoles_spin) + endif YAMBO_FREE(BS_T_grp(iT)%table) YAMBO_FREE(BS_T_grp(iT)%E) YAMBO_FREE(BS_T_grp(iT)%f) diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index e14df1dc81..2a00701de3 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -169,8 +169,8 @@ integer function variables_BS(ID,iq,local_desc,CLOSE_the_menu,X) end function ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& - & bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_pl,& - & BS_mat,write_ev) + & bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_me,& + & bsR_pl,BS_mat,write_ev) use pars, ONLY:SP use X_m, ONLY:X_t implicit none @@ -178,7 +178,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) ,optional :: bsE(:) real(SP), pointer,optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_me(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) complex(SP) ,optional :: BS_mat(:,:) logical, optional :: write_ev end function diff --git a/src/modules/mod_MAGNETOELECTRIC.F b/src/modules/mod_MAGNETOELECTRIC.F new file mode 100644 index 0000000000..bd48b9d2c5 --- /dev/null +++ b/src/modules/mod_MAGNETOELECTRIC.F @@ -0,0 +1,38 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2011 The Yambo Team +! +! Authors (see AUTHORS file for details): TG DS +! +! headers +! +#include +! +module MAGNETOELECTRIC + ! + use pars, ONLY:SP + use BS, ONLY:l_BS_magnetoelectric + use y_memory_alloc + ! + implicit none + ! + complex(SP), allocatable :: BSS_dipoles_me(:,:) + ! + contains + ! + subroutine BSS_ME_alloc( ) + use pars, ONLY:cZERO + use BS, ONLY:BS_dip_size,BS_H_dim + if (.not.l_BS_magnetoelectric) return + YAMBO_ALLOC(BSS_dipoles_me,(BS_dip_size,BS_H_dim)) + BSS_dipoles_me = cZERO + end subroutine + ! + subroutine BSS_ME_free( ) + if (.not.l_BS_magnetoelectric) return + YAMBO_FREE(BSS_dipoles_me) + end subroutine + ! +end module + diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 9eb8c60d54..8f55f06425 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -231,7 +231,8 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) end subroutine ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& + & BS_R_right_me,BS_R_PL) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP use frequency, ONLY:w_samp @@ -241,7 +242,8 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) & + & BS_R_right_me(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine ! diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index d84c8f0435..6f1696f1df 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -312,9 +312,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! MAGNETOELECTRIC !------------ -if (X_do_obs("MEx")) call ELEMENTAL_dump("MEx", ME_ij(:,1,2:)) -if (X_do_obs("MEy")) call ELEMENTAL_dump("MEy", ME_ij(:,2,2:)) -if (X_do_obs("MEz")) call ELEMENTAL_dump("MEz", ME_ij(:,3,2:)) +if (X_do_obs("MEspin")) call ELEMENTAL_dump("MEspin", ME_ij(:,1,2:)) +if (X_do_obs("MEorb")) call ELEMENTAL_dump("MEorb", ME_ij(:,2,2:)) if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 57cb7f2bcf..d87b5cad3b 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -56,9 +56,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) call ELEMENTAL_init(14,"CD","Dichroism","dichroism") call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") - call ELEMENTAL_init(17,"MEx","Magnetoelectric (Mx)","magnetoelectric") - call ELEMENTAL_init(18,"MEy","Magnetoelectric (My)","magnetoelectric") - call ELEMENTAL_init(19,"MEz","Magnetoelectric (Mz)","magnetoelectric") + call ELEMENTAL_init(17,"MEspin","Magnetoelectric (spin)","magnetoelectric") + call ELEMENTAL_init(18,"MEorb" ,"Magnetoelectric (orbital)","magnetoelectric") endif ! if (STRING_match(WHAT,"INIT")) then @@ -93,9 +92,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_magnons.and.n_spinor==2) call X_obs_onoff("+ Smp") if (l_BS_dichroism) call X_obs_onoff("+ CD") if (l_BS_magnetoelectric) then - call X_obs_onoff("+ MEx") - call X_obs_onoff("+ MEy") - call X_obs_onoff("+ MEz") + call X_obs_onoff("+ MEspin") + call X_obs_onoff("+ MEorb") endif diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh new file mode 100755 index 0000000000..f735aa6b8c --- /dev/null +++ b/yambo_intel_single_precission_omp_configure.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 + +NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" +NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" +HDF5_ROOT="/apps/software/hdf5/1.12.1" +LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" +PETSC_ROOT="/apps/software/petsc/3.16.3" +SLEPC_ROOT="/apps/software/slepc/3.16.1" +YAMBO_LIBS_ROOT="${HOME}/yambo-libs" + +./configure \ +FC=ifort \ +CC=icc \ +MPICC=mpiicc \ +MPIFC=mpiifort \ +FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ +--enable-msgs-comps \ +--enable-time-profile \ +--enable-mpi \ +--enable-open-mp \ +--enable-iotk \ +--without-editor \ +--enable-memory-profile \ +--enable-keep-src \ +--enable-hdf5-par-io \ +--with-mpi-path="${I_MPI_ROOT}" \ +--with-netcdf-path=${NETCDF_ROOT} \ +--with-netcdff-path=${NETCDFF_ROOT} \ +--with-hdf5-path=${HDF5_ROOT} \ +--with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blacs-libs="mkl" \ +--with-scalapack-libs="mkl" \ +--with-extlibs-path="${YAMBO_LIBS_ROOT}" + +#--enable-slepc-linalg \ +#--with-petsc-path="${PETSC_ROOT}" \ +#--with-slepc-path="${SLEPC_ROOT}" \ +#--with-libxc-path="${LIBXC_ROOT}" \ From 269a67f7c22a78041cbf521a9cf236503f67a732 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 27 Sep 2025 19:27:55 +0200 Subject: [PATCH 1140/1367] Version 5.3.0, Revision 25671, Hash f56afa4f30 MODIFIED * configure include/version/version.m4 bse/ELPH_project.dep common/eval_G_minus_G.F Bugs: -Fixed iusse #223 Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/bse/ELPH_project.dep | 1 - src/common/eval_G_minus_G.F | 8 +++++++- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/configure b/configure index c9cf7f0dbb..03f36debf9 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25069 h.1653719499. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25671 h.f56afa4f30. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25069 h.1653719499' -PACKAGE_STRING='Yambo 5.3.0 r.25069 h.1653719499' +PACKAGE_VERSION='5.3.0 r.25671 h.f56afa4f30' +PACKAGE_STRING='Yambo 5.3.0 r.25671 h.f56afa4f30' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25069 h.1653719499 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25671 h.f56afa4f30 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25069 h.1653719499:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25671 h.f56afa4f30:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25069 h.1653719499 +Yambo configure 5.3.0 r.25671 h.f56afa4f30 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25069 h.1653719499, which was +It was created by Yambo $as_me 5.3.0 r.25671 h.f56afa4f30, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25069" -SHASH="1653719499" +SREVISION="25671" +SHASH="f56afa4f30" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25069 h.1653719499, which was +This file was extended by Yambo $as_me 5.3.0 r.25671 h.f56afa4f30, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25069 h.1653719499 +Yambo config.status 5.3.0 r.25671 h.f56afa4f30 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 94ce0a1984..f4b702c4b7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25069 h.1653719499, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25671 h.f56afa4f30, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25069" -SHASH="1653719499" +SREVISION="25671" +SHASH="f56afa4f30" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/ELPH_project.dep b/src/bse/ELPH_project.dep index bcc9dc9973..42c26df40b 100644 --- a/src/bse/ELPH_project.dep +++ b/src/bse/ELPH_project.dep @@ -1,3 +1,2 @@ - K_driver_init.o K_inversion_Lo.o diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 9ac39a5551..708c26bb26 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -38,7 +38,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! integer :: i1,i2,is integer :: iG_shell,iGo_shell,iG_shell_0,iG_shell_max,iG_,iGo_,iG_alloc,iGo_alloc - integer :: ngx1,ngx2,ngx3, iv1_rlu(3) + integer :: ngx1,ngx2,ngx3, iv1_rlu(3),iG_max real(SP):: E_iG, E_iGo, E_max real(SP):: v1(3),v2(3) real(SP), allocatable :: E_G_m_G(:,:),g_vec_rlu(:,:) @@ -70,6 +70,7 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! ! aux data YAMBO_ALLOC(E_G_m_G,(iG_,iGo_)) + iG_max=iG_ ! ! setup MPI parallelism if required ! @@ -141,6 +142,11 @@ integer function eval_G_minus_G(iG,iGo,COMM) iG_= ng_in_shell(is) if (iGo==0) iGo_=iG_ ! + if(iG_>iG_max) then + iG_shell=is-1 + exit shell2_loop + endif + ! if( maxval(E_G_m_G(1:iG_,1:iGo_)) > E_max ) then iG_shell=is-1 exit shell2_loop From 7c134d8d7c94a60147d46346d95d11fdc5dc504e Mon Sep 17 00:00:00 2001 From: thge123 Date: Sat, 27 Sep 2025 22:31:49 +0200 Subject: [PATCH 1141/1367] me bse --- notes.txt | 32 +++++++++++++++++++ .../K_components_folded_in_serial_arrays.F | 7 ++-- src/bse/K_diago_driver.F | 4 ++- src/bse/K_diago_left_residuals.F | 3 +- src/bse/K_diago_response_functions.F | 6 ++-- src/bse/K_diago_right_residuals.F | 5 ++- src/bse/K_observables.F | 2 +- src/bse/K_solvers.F | 30 ++++++++--------- src/dipoles/RT_project.dep | 1 - src/io/io_BSS_diago.F | 11 +++++-- src/modules/DOUBLE_project.dep | 1 + src/modules/mod_DICHROISM.F | 16 +++++++++- src/modules/mod_MAGNETOELECTRIC.F | 1 - src/modules/mod_interfaces.F | 4 +-- ...o_intel_single_precission_omp_configure.sh | 3 +- 15 files changed, 89 insertions(+), 37 deletions(-) create mode 100644 notes.txt diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000000..c7a2782fb7 --- /dev/null +++ b/notes.txt @@ -0,0 +1,32 @@ +309 & call MEM_count("tmp_res_ptr",tmp_res_ptr) +(gdb) print bs_r_right_abs +$18 = (PTR TO -> ( + COMPLEX(4) (1600) )) 0x7fffa8c6fd80 +(gdb) n +310 if (.not.associated(tmp_res_ptr)) & +(gdb) print bs_r_right_abs +$19 = (PTR TO -> ( + COMPLEX(4) (1600) )) 0x7fffa8c6fd80 +(gdb) n +317 if(l_abs_res) then +(gdb) print bs_r_right_abs +$20 = (PTR TO -> ( + COMPLEX(4) (1600) )) 0x7fffa8c6fd80 +(gdb) print bs_r_right_abs +$21 = (PTR TO -> ( + COMPLEX(4) (1600) )) 0x7fffa8c6fd80 +(gdb) n +318 call K_diago_R_res("opt1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_abs, BS_V_right) +(gdb) print bs_r_right_abs + +$22 = (PTR TO -> ( + COMPLEX(4) (1600) )) 0x7fffa8c6fd80 + +(gdb) n +319 |!!!!!!--> if(l_kerr_rgt) call K_diago_R_res("opt2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_kerr,BS_V_right) + +(gdb) print bs_r_right_abs +$23 = (PTR TO -> ( + COMPLEX(4) (:) )) +(gdb) + diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 085431ec28..4ca90147b7 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -17,13 +17,12 @@ subroutine K_components_folded_in_serial_arrays(iq) use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& & BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& -& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_magnetoelectruc +& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_magnetoelectric,& & l_BS_photolum,BS_dip_size,BS_H_dim,l_BS_ares_from_res use timing_m, ONLY:timing use LIVE_t, ONLY:live_timing use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc - use MAGNETOELECTRIC, ONLY:BSS_dipoles_me, BSS_ME_alloc + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc,BSS_dipoles_me,BSS_ME_alloc use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_alloc,BSS_PL_f,PL_weights use timing_m, ONLY:timing ! @@ -50,7 +49,7 @@ subroutine K_components_folded_in_serial_arrays(iq) call BSS_alloc( ) call BSS_MAGN_alloc( ) call BSS_DICH_alloc( ) - call BSS_DICH_alloc( ) + call BSS_ME_alloc( ) call BSS_PL_alloc( ) ! if (BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 506836234c..f01be1278f 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -117,7 +117,7 @@ subroutine K_diago_driver(iq,W,X_static) integer :: io_err,ID type(X_t),intent(in) :: X_static ! - l_abs_res =l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism + l_abs_res =l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_magnetoelectric l_kerr_lft=l_BS_kerr_asymm.or.l_BS_dichroism l_kerr_rgt=l_BS_kerr .or.l_BS_dichroism ! @@ -336,6 +336,8 @@ subroutine K_diago_driver(iq,W,X_static) !==================================== ! ! Right residuals + write(*,*) "\n(K_diago_driver): l_abs_res= ", l_abs_res + write(*,*) "\n(K_diago_driver): l_kerr_rgt= ", l_kerr_rgt if(l_abs_res) then call K_diago_R_res("opt1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_abs, BS_V_right) if(l_kerr_rgt) call K_diago_R_res("opt2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_kerr,BS_V_right) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index 8f3406d234..24ca0afb00 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -27,8 +27,7 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & & l_BS_res_from_E,BS_not_const_eh_f use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f use MAGNONS, ONLY:BSS_dipoles_magn - use DICHROISM, ONLY:BSS_dipoles_dich - use MAGNETOELECTRiC, ONLY:BSS_dipoles_me + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_me ! implicit none ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 4c0ca49993..5820139c11 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -52,7 +52,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ real(SP), allocatable :: vtmpR(:) complex(SP), allocatable :: BS_E_sorted_tmp(:,:) integer, allocatable :: sort_indx(:),first_exc(:),n_of_exc(:) - complex(SP) :: g_fac,res_kerr,res_dich,res_magn(2),res_pl(2) + complex(SP) :: g_fac,res_kerr,res_dich,res_me(2),res_magn(2),res_pl(2) logical :: l_ADD_the_ARES_using_the_RES ! n_SOC=1 @@ -103,8 +103,8 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ res_dich=res_dich*ares_fac/q0_def_norm/2._SP endif if(l_BS_magnetoelectric) then - res_me(1)=(BS_R_left_abs(i1)*BS_R_right_me(i1,1)*ares_fac/q0_def_norm - res_me(2)=(BS_R_left_abs(i1)*BS_R_right_me(i1,2)*ares_fac/q0_def_norm + res_me(1)=BS_R_left_abs(i1)*BS_R_right_me(i1,1)*ares_fac/q0_def_norm + res_me(2)=BS_R_left_abs(i1)*BS_R_right_me(i1,2)*ares_fac/q0_def_norm endif if(l_BS_magnons) then res_magn(1)=BS_R_left_magn(i1,1)*BS_R_right_magn(i1,1)*ares_fac diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index 044b445429..1ed80bee8c 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -26,15 +26,14 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& & l_BS_res_from_E,BS_not_const_eh_f use MAGNONS, ONLY:BSS_dipoles_magn - use DICHROISM, ONLY:BSS_dipoles_dich - use MAGNETOELECTRIC, ONLY:BSS_dipoles_me + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_me ! implicit none ! character(*),intent(in) :: mode integer, intent(in) :: i_BS_mat, neigs_this_cpu, neig_shift complex(SP), allocatable, intent(in) :: BS_E(:) - complex(SP), pointer, intent(out) :: BS_R_right(:) + complex(SP), pointer, intent(inout) :: BS_R_right(:) complex(SP), target, allocatable, intent(in) :: BS_V_right(:,:) ! ! Workspace diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 65d9d70df1..8aa72ede9c 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -94,7 +94,7 @@ subroutine K_observables(W,Xk) if (l_BS_trace ) BS_dip_size = 3 if (l_BS_trace .and. .not.l_rpa_IP) call error(" trace coded only at the IP level") ! - l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum + l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum.or.l_BS_magnetoelectric ! ! Now fix BSE_prop string ! diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 358da5c3c1..03d83870b7 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -11,21 +11,21 @@ ! subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! - use stderr, ONLY:intc - use frequency, ONLY:w_samp - use electrons, ONLY:levels - use R_lattice, ONLY:bz_samp - use X_m, ONLY:X_t - use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& -& run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly - use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,& -& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_jdos - use parallel_m, ONLY:master_cpu,CPU_structure - use IO_int, ONLY:IO_and_Messaging_switch - use linear_algebra, ONLY:INV,DIAGO - use PHOTOLUM, ONLY:BSS_PL_free - use MAGNONS, ONLY:BSS_MAGN_free - use DICHROISM, ONLY:BSS_DICH_free + use stderr, ONLY:intc + use frequency, ONLY:w_samp + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp + use X_m, ONLY:X_t + use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& +& run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly + use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,& +& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_jdos + use parallel_m, ONLY:master_cpu,CPU_structure + use IO_int, ONLY:IO_and_Messaging_switch + use linear_algebra, ONLY:INV,DIAGO + use PHOTOLUM, ONLY:BSS_PL_free + use MAGNONS, ONLY:BSS_MAGN_free + use DICHROISM, ONLY:BSS_DICH_free,BSS_ME_free use y_memory_alloc ! implicit none diff --git a/src/dipoles/RT_project.dep b/src/dipoles/RT_project.dep index 4a0787872d..d32711168f 100644 --- a/src/dipoles/RT_project.dep +++ b/src/dipoles/RT_project.dep @@ -1,7 +1,6 @@ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_g_space.o - DIPOLE_orbital_magnetization_rt.o DIPOLE_p_matrix_elements.o DIPOLE_setup.o DIPOLE_shifted_grids.o diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index 334105a23f..f6fbb1525b 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -6,7 +6,7 @@ ! Authors (see AUTHORS file for details): AM DS NM ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& -& bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_pl,& +& bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_me,bsR_pl,& & BS_mat,write_ev) ! use pars, ONLY:SP,schlen,IP @@ -26,7 +26,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) , optional :: bsE(:) real(SP) ,pointer, optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_me(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) complex(SP) , optional :: BS_mat(:,:) logical, optional :: write_ev ! @@ -142,6 +142,13 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& endif endif ! + if(present(bsR_me)) then + if(associated(bsR_me)) then + call io_bulk(ID,'BS_ME_Residuals',VAR_SZ=(/2,BSS_n_eig,2/)) + call io_bulk(ID,C2=bsR_me) + endif + endif + ! if(present(bsR_pl)) then if(associated(bsR_pl)) then call io_bulk(ID,'BS_PL_Residuals',VAR_SZ=(/2,BSS_n_eig/)) diff --git a/src/modules/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index bd886c01f9..a42a52ba11 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -14,6 +14,7 @@ mod_IO.o mod_IO_interfaces.o mod_LIVE_t.o + mod_MAGNETOELECTRIC.o mod_MAGNONS.o mod_MPA.o mod_NL_interfaces.o diff --git a/src/modules/mod_DICHROISM.F b/src/modules/mod_DICHROISM.F index d32bf634dd..fb217c603e 100644 --- a/src/modules/mod_DICHROISM.F +++ b/src/modules/mod_DICHROISM.F @@ -12,12 +12,13 @@ module DICHROISM ! use pars, ONLY:SP - use BS, ONLY:l_BS_dichroism + use BS, ONLY:l_BS_dichroism,l_BS_magnetoelectric use y_memory_alloc ! implicit none ! complex(SP), allocatable :: BSS_dipoles_dich(:,:) + complex(SP), allocatable :: BSS_dipoles_me(:,:) ! contains ! @@ -33,5 +34,18 @@ subroutine BSS_DICH_free( ) if (.not.l_BS_dichroism) return YAMBO_FREE(BSS_dipoles_dich) end subroutine + + subroutine BSS_ME_alloc( ) + use pars, ONLY:cZERO + use BS, ONLY:BS_dip_size,BS_H_dim + if (.not.l_BS_magnetoelectric) return + YAMBO_ALLOC(BSS_dipoles_me,(BS_dip_size,BS_H_dim)) + BSS_dipoles_me = cZERO + end subroutine + ! + subroutine BSS_ME_free( ) + if (.not.l_BS_magnetoelectric) return + YAMBO_FREE(BSS_dipoles_me) + end subroutine ! end module diff --git a/src/modules/mod_MAGNETOELECTRIC.F b/src/modules/mod_MAGNETOELECTRIC.F index bd48b9d2c5..829ad13828 100644 --- a/src/modules/mod_MAGNETOELECTRIC.F +++ b/src/modules/mod_MAGNETOELECTRIC.F @@ -35,4 +35,3 @@ subroutine BSS_ME_free( ) end subroutine ! end module - diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 8f55f06425..d8f072d613 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -242,7 +242,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:) & + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:), & & BS_R_right_me(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine @@ -254,7 +254,7 @@ subroutine K_diago_R_res(mode,i_BS_mat,BS_E, & character(*),intent(in) :: mode integer, intent(in) :: i_BS_mat, neigs_this_cpu, neig_shift complex(SP), allocatable, intent(in) :: BS_E(:) - complex(SP), pointer, intent(out) :: BS_R_right(:) + complex(SP), pointer, intent(inout) :: BS_R_right(:) complex(SP), target, allocatable, intent(in) :: BS_V_right(:,:) end subroutine K_diago_R_res ! diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh index f735aa6b8c..c473b38c48 100755 --- a/yambo_intel_single_precission_omp_configure.sh +++ b/yambo_intel_single_precission_omp_configure.sh @@ -15,7 +15,7 @@ FC=ifort \ CC=icc \ MPICC=mpiicc \ MPIFC=mpiifort \ -FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ +FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ --enable-msgs-comps \ --enable-time-profile \ --enable-mpi \ @@ -36,6 +36,7 @@ FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ --with-scalapack-libs="mkl" \ --with-extlibs-path="${YAMBO_LIBS_ROOT}" +#FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ #--enable-slepc-linalg \ #--with-petsc-path="${PETSC_ROOT}" \ #--with-slepc-path="${SLEPC_ROOT}" \ From d38c7028e2ddeebb5308ee1fe85567cac87a8bc6 Mon Sep 17 00:00:00 2001 From: thge123 Date: Sun, 28 Sep 2025 12:22:02 +0200 Subject: [PATCH 1142/1367] cleanup --- src/bse/K_diago_driver.F | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index f01be1278f..f3d119dcd5 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -336,8 +336,6 @@ subroutine K_diago_driver(iq,W,X_static) !==================================== ! ! Right residuals - write(*,*) "\n(K_diago_driver): l_abs_res= ", l_abs_res - write(*,*) "\n(K_diago_driver): l_kerr_rgt= ", l_kerr_rgt if(l_abs_res) then call K_diago_R_res("opt1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_abs, BS_V_right) if(l_kerr_rgt) call K_diago_R_res("opt2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_kerr,BS_V_right) From c5a44250fbee94a68bf004e1fb859fd74e1dd796 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 29 Sep 2025 09:12:59 +0200 Subject: [PATCH 1143/1367] cleanup before merge --- yambo_intel_single_precission_omp_configure.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh index c473b38c48..99de3552f8 100755 --- a/yambo_intel_single_precission_omp_configure.sh +++ b/yambo_intel_single_precission_omp_configure.sh @@ -34,10 +34,10 @@ FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ --with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ --with-blacs-libs="mkl" \ --with-scalapack-libs="mkl" \ ---with-extlibs-path="${YAMBO_LIBS_ROOT}" +--with-extlibs-path="${YAMBO_LIBS_ROOT}" \ +--enable-slepc-linalg \ +--with-petsc-path="${PETSC_ROOT}" \ +--with-slepc-path="${SLEPC_ROOT}" \ +--with-libxc-path="${LIBXC_ROOT}" \ #FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ -#--enable-slepc-linalg \ -#--with-petsc-path="${PETSC_ROOT}" \ -#--with-slepc-path="${SLEPC_ROOT}" \ -#--with-libxc-path="${LIBXC_ROOT}" \ From 2dfc90f18a11e166b13607a86d28b72a35e50882 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 29 Sep 2025 12:27:01 +0200 Subject: [PATCH 1144/1367] Version 5.3.0, Revision 25672, Hash 269a67f7c2 MODIFIED * configure include/version/version.m4 modules/mod_logo.F Bugs: - Additions: - Changes: -Fixed logo and web-site Patch sent by: Claudio Attaccalite --- configure | 22 ++--- include/version/version.m4 | 6 +- src/modules/mod_logo.F | 187 +++---------------------------------- 3 files changed, 28 insertions(+), 187 deletions(-) diff --git a/configure b/configure index 03f36debf9..10950c8d38 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25671 h.f56afa4f30. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25672 h.269a67f7c2. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25671 h.f56afa4f30' -PACKAGE_STRING='Yambo 5.3.0 r.25671 h.f56afa4f30' +PACKAGE_VERSION='5.3.0 r.25672 h.269a67f7c2' +PACKAGE_STRING='Yambo 5.3.0 r.25672 h.269a67f7c2' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25671 h.f56afa4f30 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25672 h.269a67f7c2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25671 h.f56afa4f30:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25672 h.269a67f7c2:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25671 h.f56afa4f30 +Yambo configure 5.3.0 r.25672 h.269a67f7c2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25671 h.f56afa4f30, which was +It was created by Yambo $as_me 5.3.0 r.25672 h.269a67f7c2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25671" -SHASH="f56afa4f30" +SREVISION="25672" +SHASH="269a67f7c2" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25671 h.f56afa4f30, which was +This file was extended by Yambo $as_me 5.3.0 r.25672 h.269a67f7c2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25671 h.f56afa4f30 +Yambo config.status 5.3.0 r.25672 h.269a67f7c2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index f4b702c4b7..61ccdf4e99 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25671 h.f56afa4f30, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25672 h.269a67f7c2, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25671" -SHASH="f56afa4f30" +SREVISION="25672" +SHASH="269a67f7c2" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_logo.F b/src/modules/mod_logo.F index 123f58bc55..d202a30b8c 100644 --- a/src/modules/mod_logo.F +++ b/src/modules/mod_logo.F @@ -2,8 +2,9 @@ ! License-Identifier: GPL ! ! Copyright (C) 2008 The Yambo Team +! Copyright (C) 2025 The Lumen Team ! -! Authors (see AUTHORS file for details): AM +! Authors (see AUTHORS file for details): AM,AC ! module LOGO ! @@ -59,182 +60,22 @@ subroutine pickup_a_logo(unit_) ! comment(3)=trim(code_libraries)//" Build" ! - comment(4)='http://www.yambo-code.eu' + comment(4)='http://www.lumen-code.org' ! - if (ID_logo<0) then - ID_logo=pickup_a_random(10._SP) - ID_logo_stderr=10+pickup_a_random(6._SP) - if (ID_logo==0) ID_logo=1 - if (ID_logo_stderr==0) ID_logo_stderr=1 - endif - ! - if (unit_==6) i1=ID_logo_stderr - if (unit_/=6) i1=ID_logo + ID_logo_stderr=1 + ID_logo =1 ! n_logo_lines=9 ! - select case(i1) - case(1) - logo_line( 1)=' ' - logo_line( 2)=' __ __ ________ ___ __ __ _______ ______ ' - logo_line( 3)='/_/S/_/S /_______/S /__//_//_/S /_______/S /_____/S ' - logo_line( 4)='S S S S SS::: _ S SS::S| S| S SS::: _ S SS:::_ S S ' - logo_line( 5)=' S:S_S S SS::(_) S SS:. S SS::(_) S/_S:S S S S ' - logo_line( 6)=' S::::_S/ S:: __ S SS:.S-/S S SS:: _ S SS:S S S S ' - logo_line( 7)=' S::S S S:.S S S SS. S S S SS::(_) S SS:S_S S S ' - logo_line( 8)=' S__S/ S__S/S__S/ S__S/ S__S/ S_______S/ S_____S/ ' - logo_line( 9)=' ' - case(2) - logo_line( 1)=' ' - logo_line( 2)=' ____ ____ _ ____ ____ ______ ___ ' - logo_line( 3)='|_ _||_ _| / S |_ S / _||_ _ S ." `. ' - logo_line( 4)=' S S / / / _ S | S/ | | |_) | / .-. S ' - logo_line( 5)=' S S/ / / ___ S | |S /| | | __". | | | | ' - logo_line( 6)=' _| |_ _/ / S S_ _| |_S/_| |_ _| |__) |S `-" / ' - logo_line( 7)=' |______||____| |____||_____||_____||_______/ `.___." ' - logo_line( 8)=' ' - logo_line( 9)=' ' - case(3) - logo_line( 1)=' ' - logo_line( 2)=' __ __ _ __ __ ____ U ___ u' - logo_line( 3)=' S S / / U /"S U u |" S/ "| u U | __") u S/"_ S/ ' - logo_line( 4)=' S V / S/ _ S/ S| |S/| |/ S| _ S/ | | | | ' - logo_line( 5)=' U_|"|_u / ___ S | | | | | |_) | .-,_| |_| | ' - logo_line( 6)=' |_| /_/ S_S |_| |_| |____/ S_)-S___/ ' - logo_line( 7)='.-,//|(_ SS >> <<,-,,-. _|| SS_ SS ' - logo_line( 8)=' S_) (__) (__) (__) (./ S.) (__) (__) (__) ' - logo_line( 9)=' ' - case(4) - logo_line( 1)=' ' - logo_line( 2)=' ' - logo_line( 3)='Y88b / e e e 888~~S ,88~-_ ' - logo_line( 4)=' Y88b / d8b d8b d8b 888 | d888 S ' - logo_line( 5)=' Y88b/ /Y88b d888bdY88b 888 _/ 88888 | ' - logo_line( 6)=' Y8Y / Y88b / Y88Y Y888b 888 S 88888 | ' - logo_line( 7)=' Y /____Y88b / YY Y888b 888 | Y888 / ' - logo_line( 8)=' / / Y88b / Y888b 888__/ `88_-~ ' - logo_line( 9)=' ' - case(5) - logo_line( 1)=' ' - logo_line( 2)=' ** ** ** **** **** ****** ******* ' - logo_line( 3)='//** ** **** /**/** **/** /*////** **/////** ' - logo_line( 4)=' //**** **//** /**//** ** /** /* /** ** //**' - logo_line( 5)=' //** ** //** /** //*** /** /****** /** /**' - logo_line( 6)=' /** **********/** //* /** /*//// **/** /**' - logo_line( 7)=' /** /**//////**/** / /** /* /**//** ** ' - logo_line( 8)=' /** /** /**/** /** /******* //******* ' - logo_line( 9)=' // // // // // /////// /////// ' - case(6) - logo_line( 1)=' ' - logo_line( 2)=': ::: ::: :::: :::: ::::::::: :::::::: ' - logo_line( 3)=':+: :+: :+: :+: +:+:+: :+:+:+ :+: :+: :+: :+ ' - logo_line( 4)=' +:+ +:+ +:+ +:+ +:+ +:+:+ +:+ +:+ +:+ +:+ +:+ ' - logo_line( 5)=' +#++: +#++:++#++: +#+ +:+ +#+ +#++:++#+ +#+ +:+ ' - logo_line( 6)=' +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ ' - logo_line( 7)=' #+# #+# #+# #+# #+# #+# #+# #+# #+# ' - logo_line( 8)=' ### ### ### ### ### ######### ######## ' - logo_line( 9)=' ' - case(7) - logo_line( 1)=' ' - logo_line( 2)=' /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$ /$$$$$$ ' - logo_line( 3)='| $$ /$$//$$__ $$| $$$ /$$$| $$__ $$ /$$__ $$' - logo_line( 4)=' S $$ /$$/| $$ S $$| $$$$ /$$$$| $$ S $$| $$ S $$' - logo_line( 5)=' S $$$$/ | $$$$$$$$| $$ $$/$$ $$| $$$$$$$ | $$ | $$' - logo_line( 6)=' S $$/ | $$__ $$| $$ $$$| $$| $$__ $$| $$ | $$' - logo_line( 7)=' | $$ | $$ | $$| $$S $ | $$| $$ S $$| $$ | $$' - logo_line( 8)=' | $$ | $$ | $$| $$ S/ | $$| $$$$$$$/| $$$$$$/' - logo_line( 9)=' |__/ |__/ |__/|__/ |__/|_______/ S______/ ' - case(8) - logo_line( 1)=' __ __ ______ __ __ _______ ______ ' - logo_line( 2)='| S / S / S | S / S| S / S ' - logo_line( 3)=' S$$S / $$| $$$$$$S| $$S / $$| $$$$$$$S| $$$$$$S' - logo_line( 4)=' S$$S/ $$ | $$__| $$| $$$S / $$$| $$__/ $$| $$ | $$' - logo_line( 5)=' S$$ $$ | $$ $$| $$$$S $$$$| $$ $$| $$ | $$' - logo_line( 6)=' S$$$$ | $$$$$$$$| $$S$$ $$ $$| $$$$$$$S| $$ | $$' - logo_line( 7)=' | $$ | $$ | $$| $$ S$$$| $$| $$__/ $$| $$__/ $$' - logo_line( 8)=' | $$ | $$ | $$| $$ S$ | $$| $$ $$ S$$ $$' - logo_line( 9)=' S$$ S$$ S$$ S$$ S$$ S$$$$$$$ S$$$$$$ ' - case(9) - logo_line( 1)=' ' - logo_line( 2)='ooooo oooo .. ooo ooo ooooooooo. .oooo. ' - logo_line( 3)=' `88. .8" .88. `88. .88 `88" `Y8b dP" `Yb ' - logo_line( 4)=' `88. .8" .8"88. 888b d"88 88 888 88 88 ' - logo_line( 5)=' `88.8" .8" `88. 8 Y88. .P 88 88oooo888" 88 88 ' - logo_line( 6)=' `88" .88ooo888. 8 `888" 88 88 `88b 88 88 ' - logo_line( 7)=' 88 .8" `88. 8 Y 88 88 .88P `8b d8" ' - logo_line( 8)=' o88o88o 888o8 88 o88bood8P" `Ybod8P" ' - logo_line( 9)=' ' - case(10) - logo_line( 1)=' ' - logo_line( 2)='____ ____ ___ .___ ___. .______ ______ ' - logo_line( 3)='S S / / / S | S/ | | _ S / __ S ' - logo_line( 4)=' S S/ / / ^ S | S / | | |_) | | | | | ' - logo_line( 5)=' S_ _/ / /_S S | |S/| | | _ < | | | | ' - logo_line( 6)=' | | / _____ S | | | | | |_) | | `--" | ' - logo_line( 7)=' |__| /__/ S__S |__| |__| |______/ S______/ ' - logo_line( 8)=' ' - logo_line( 9)=' ' - case(11) - logo_line( 1)=' ' - logo_line( 2)=' ___ __ _____ __ __ _____ _____ ' - logo_line( 3)='| Y || _ || Y || _ S | _ |' - logo_line( 4)='| | ||. | ||. ||. | / |. | |' - logo_line( 5)=' S_ _/ |. _ ||.S_/ ||. _ S |. | |' - logo_line( 6)=' |: | |: | ||: | ||: | S|: | |' - logo_line( 7)=' |::| |:.|:.||:.|:.||::. /|::. |' - logo_line( 8)=' `--" `-- --"`-- --"`-----" `-----"' - logo_line( 9)=' ' - case(12) - logo_line( 1)=' ' - logo_line( 2)=' ' - logo_line( 3)='_| _| _|_| _| _| _|_|_| _|_| ' - logo_line( 4)=' _| _| _| _| _|_| _|_| _| _| _| _| ' - logo_line( 5)=' _| _|_|_|_| _| _| _| _|_|_| _| _| ' - logo_line( 6)=' _| _| _| _| _| _| _| _| _| ' - logo_line( 7)=' _| _| _| _| _| _|_|_| _|_| ' - logo_line( 8)=' ' - logo_line( 9)=' ' - case(13) - logo_line( 1)=' ' - logo_line( 2)=' __ __ ____ ___ ___ ____ ___ ' - logo_line( 3)=' | | |/ | | | S / S ' - logo_line( 4)=' | | | o | _ _ | o ) | ' - logo_line( 5)=' | ~ | | S_/ | | O | ' - logo_line( 6)=' |___, | _ | | | O | | ' - logo_line( 7)=' | | | | | | | | ' - logo_line( 8)=' |____/|__|__|___|___|_____|S___/ ' - logo_line( 9)=' ' - case(14) - logo_line( 1)=' ' - logo_line( 2)=' __ __ ______ ____ _____ ' - logo_line( 3)='/S S /S SS _ S /"S_/`S/S _`S /S __`S ' - logo_line( 4)='S `S`SS/"/ S SLS S/S S S SLS S S S/S S ' - logo_line( 5)=' `S `S /" S S __ S S S__S S S _ <" S S S S ' - logo_line( 6)=' `S S S S S S/S S S S_/S S S SLS S S S_S S ' - logo_line( 7)=' S S_S S S_S S_S S_SS S_S S____/S S_____S' - logo_line( 8)=' S/_/ S/_/S/_/S/_/ S/_/S/___/ S/_____/' - logo_line( 9)=' ' - case(15) - logo_line( 1)=' ' - logo_line( 2)=' __ __ _______ __ __ _______ _______ ' - logo_line( 3)='| | | || _ || |_| || _ || |' - logo_line( 4)='| |_| || |_| || || |_| || _ |' - logo_line( 5)='| || || || || | | |' - logo_line( 6)='|_ _|| || || _ | | |_| |' - logo_line( 7)=' | | | _ || ||_|| || |_| || |' - logo_line( 8)=' |___| |__| |__||_| |_||_______||_______|' - logo_line( 9)=' ' - case(16) - logo_line( 1)=' ' - logo_line( 2)=' ___ ___ ___ ___ ___ ' - logo_line( 3)=' /S__S /S S /S__S /S S /S S ' - logo_line( 4)=' |::L__L /::S S /::L_L_ /::S S /::S S ' - logo_line( 5)=' |:::S__S/::S:S__S/:/L:S__S/::S:S__S/:/S:S__S' - logo_line( 6)=' /:;;/__/S/S::/ /S/_/:/ /S:S::/ /S:S/:/ /' - logo_line( 7)=' S/__/ /:/ / /:/ / S::/ / S::/ / ' - logo_line( 8)=' S/__/ S/__/ S/__/ S/__/ ' - logo_line( 9)=' ' - end select + logo_line( 1)=' ' + logo_line( 2)='$$\ ' + logo_line( 3)='$$ | ' + logo_line( 4)='$$ | $$\ $$\ $$$$$$\$$$$\ $$$$$$\ $$$$$$$\ ' + logo_line( 5)='$$ | $$ | $$ |$$ _$$ _$$\ $$ __$$\ $$ __$$\ ' + logo_line( 6)='$$ | $$ | $$ |$$ / $$ / $$ |$$$$$$$$ |$$ | $$ |' + logo_line( 7)='$$ | $$ | $$ |$$ | $$ | $$ |$$ ____|$$ | $$ |' + logo_line( 8)='$$$$$$$$\\$$$$$$ |$$ | $$ | $$ |\$$$$$$$\ $$ | $$ |' + logo_line( 9)='\________|\______/ \__| \__| \__| \_______|\__| \__|' ! ! Replace "S" with "\" and find the max length of ! the lines to center the two comments From bfc0fdf8c1ac65ed2b955bb6bbe265d4c64f10b3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 30 Sep 2025 12:04:43 +0200 Subject: [PATCH 1145/1367] Lines of old yambo logo resumed. The code uses the new lumen one. Resumed file "project_dependencies.stamp". Otherwise .dep files are recomputed every time making the compilation very slow. --- .../project_dependencies.stamp | 0 src/communicate/com_utilities_subroutines.F | 4 +- src/modules/mod_logo.F | 234 +++++++++++++++++- 3 files changed, 235 insertions(+), 3 deletions(-) create mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/communicate/com_utilities_subroutines.F b/src/communicate/com_utilities_subroutines.F index 81b460b19f..d5463ecb69 100644 --- a/src/communicate/com_utilities_subroutines.F +++ b/src/communicate/com_utilities_subroutines.F @@ -138,7 +138,7 @@ end subroutine of_open_close subroutine write_the_logo(unit_,comment_) ! use LIVE_t, ONLY:LIVE_message - use LOGO, ONLY:pickup_a_logo,logo_line,n_logo_lines + use LOGO, ONLY:pickup_a_lumen_logo,logo_line,n_logo_lines use pars, ONLY:schlen ! implicit none @@ -148,7 +148,7 @@ subroutine write_the_logo(unit_,comment_) character(schlen)::space_,ch ! Work Space integer ::i1 ! ! - call pickup_a_logo(unit_) + call pickup_a_lumen_logo(unit_) ! if (unit_<0) return ! diff --git a/src/modules/mod_logo.F b/src/modules/mod_logo.F index d202a30b8c..87642a1e7b 100644 --- a/src/modules/mod_logo.F +++ b/src/modules/mod_logo.F @@ -39,7 +39,7 @@ integer function pickup_a_random(rand_range) pickup_a_random=int(dlaran(iseed(4:))*rand_range) end function ! - subroutine pickup_a_logo(unit_) + subroutine pickup_a_lumen_logo(unit_) ! use C_driver, ONLY:code_version,code_revision,code_hash,code_libraries,code_branch use pars, ONLY:SP @@ -110,4 +110,236 @@ subroutine pickup_a_logo(unit_) ! end subroutine ! + ! + subroutine pickup_a_yambo_logo(unit_) + ! + use C_driver, ONLY:code_version,code_revision,code_hash,code_libraries,code_branch + use pars, ONLY:SP + use stderr, ONLY:intc,slash + ! + integer :: unit_ + ! + ! Work Space + ! + character(schlen) :: comment(4),ch + integer :: max_length,i1,left_space,iA,ic + ! + comment(1)='Version '//& +& trim(intc(code_version(1)))//'.'//trim(intc(code_version(2)))//& +& '.'//trim(intc(code_version(3)))//' Revision '//trim(intc(code_revision))//' Hash (prev commit) '//trim(code_hash) + ! + comment(2)="Branch is "//trim(code_branch) + ! + comment(3)=trim(code_libraries)//" Build" + ! + comment(4)='http://www.yambo-code.eu' + ! + if (ID_logo<0) then + ID_logo=pickup_a_random(10._SP) + ID_logo_stderr=10+pickup_a_random(6._SP) + if (ID_logo==0) ID_logo=1 + if (ID_logo_stderr==0) ID_logo_stderr=1 + endif + ! + if (unit_==6) i1=ID_logo_stderr + if (unit_/=6) i1=ID_logo + ! + n_logo_lines=9 + ! + select case(i1) + case(1) + logo_line( 1)=' ' + logo_line( 2)=' __ __ ________ ___ __ __ _______ ______ ' + logo_line( 3)='/_/S/_/S /_______/S /__//_//_/S /_______/S /_____/S ' + logo_line( 4)='S S S S SS::: _ S SS::S| S| S SS::: _ S SS:::_ S S ' + logo_line( 5)=' S:S_S S SS::(_) S SS:. S SS::(_) S/_S:S S S S ' + logo_line( 6)=' S::::_S/ S:: __ S SS:.S-/S S SS:: _ S SS:S S S S ' + logo_line( 7)=' S::S S S:.S S S SS. S S S SS::(_) S SS:S_S S S ' + logo_line( 8)=' S__S/ S__S/S__S/ S__S/ S__S/ S_______S/ S_____S/ ' + logo_line( 9)=' ' + case(2) + logo_line( 1)=' ' + logo_line( 2)=' ____ ____ _ ____ ____ ______ ___ ' + logo_line( 3)='|_ _||_ _| / S |_ S / _||_ _ S ." `. ' + logo_line( 4)=' S S / / / _ S | S/ | | |_) | / .-. S ' + logo_line( 5)=' S S/ / / ___ S | |S /| | | __". | | | | ' + logo_line( 6)=' _| |_ _/ / S S_ _| |_S/_| |_ _| |__) |S `-" / ' + logo_line( 7)=' |______||____| |____||_____||_____||_______/ `.___." ' + logo_line( 8)=' ' + logo_line( 9)=' ' + case(3) + logo_line( 1)=' ' + logo_line( 2)=' __ __ _ __ __ ____ U ___ u' + logo_line( 3)=' S S / / U /"S U u |" S/ "| u U | __") u S/"_ S/ ' + logo_line( 4)=' S V / S/ _ S/ S| |S/| |/ S| _ S/ | | | | ' + logo_line( 5)=' U_|"|_u / ___ S | | | | | |_) | .-,_| |_| | ' + logo_line( 6)=' |_| /_/ S_S |_| |_| |____/ S_)-S___/ ' + logo_line( 7)='.-,//|(_ SS >> <<,-,,-. _|| SS_ SS ' + logo_line( 8)=' S_) (__) (__) (__) (./ S.) (__) (__) (__) ' + logo_line( 9)=' ' + case(4) + logo_line( 1)=' ' + logo_line( 2)=' ' + logo_line( 3)='Y88b / e e e 888~~S ,88~-_ ' + logo_line( 4)=' Y88b / d8b d8b d8b 888 | d888 S ' + logo_line( 5)=' Y88b/ /Y88b d888bdY88b 888 _/ 88888 | ' + logo_line( 6)=' Y8Y / Y88b / Y88Y Y888b 888 S 88888 | ' + logo_line( 7)=' Y /____Y88b / YY Y888b 888 | Y888 / ' + logo_line( 8)=' / / Y88b / Y888b 888__/ `88_-~ ' + logo_line( 9)=' ' + case(5) + logo_line( 1)=' ' + logo_line( 2)=' ** ** ** **** **** ****** ******* ' + logo_line( 3)='//** ** **** /**/** **/** /*////** **/////** ' + logo_line( 4)=' //**** **//** /**//** ** /** /* /** ** //**' + logo_line( 5)=' //** ** //** /** //*** /** /****** /** /**' + logo_line( 6)=' /** **********/** //* /** /*//// **/** /**' + logo_line( 7)=' /** /**//////**/** / /** /* /**//** ** ' + logo_line( 8)=' /** /** /**/** /** /******* //******* ' + logo_line( 9)=' // // // // // /////// /////// ' + case(6) + logo_line( 1)=' ' + logo_line( 2)=': ::: ::: :::: :::: ::::::::: :::::::: ' + logo_line( 3)=':+: :+: :+: :+: +:+:+: :+:+:+ :+: :+: :+: :+ ' + logo_line( 4)=' +:+ +:+ +:+ +:+ +:+ +:+:+ +:+ +:+ +:+ +:+ +:+ ' + logo_line( 5)=' +#++: +#++:++#++: +#+ +:+ +#+ +#++:++#+ +#+ +:+ ' + logo_line( 6)=' +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ ' + logo_line( 7)=' #+# #+# #+# #+# #+# #+# #+# #+# #+# ' + logo_line( 8)=' ### ### ### ### ### ######### ######## ' + logo_line( 9)=' ' + case(7) + logo_line( 1)=' ' + logo_line( 2)=' /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$ /$$$$$$ ' + logo_line( 3)='| $$ /$$//$$__ $$| $$$ /$$$| $$__ $$ /$$__ $$' + logo_line( 4)=' S $$ /$$/| $$ S $$| $$$$ /$$$$| $$ S $$| $$ S $$' + logo_line( 5)=' S $$$$/ | $$$$$$$$| $$ $$/$$ $$| $$$$$$$ | $$ | $$' + logo_line( 6)=' S $$/ | $$__ $$| $$ $$$| $$| $$__ $$| $$ | $$' + logo_line( 7)=' | $$ | $$ | $$| $$S $ | $$| $$ S $$| $$ | $$' + logo_line( 8)=' | $$ | $$ | $$| $$ S/ | $$| $$$$$$$/| $$$$$$/' + logo_line( 9)=' |__/ |__/ |__/|__/ |__/|_______/ S______/ ' + case(8) + logo_line( 1)=' __ __ ______ __ __ _______ ______ ' + logo_line( 2)='| S / S / S | S / S| S / S ' + logo_line( 3)=' S$$S / $$| $$$$$$S| $$S / $$| $$$$$$$S| $$$$$$S' + logo_line( 4)=' S$$S/ $$ | $$__| $$| $$$S / $$$| $$__/ $$| $$ | $$' + logo_line( 5)=' S$$ $$ | $$ $$| $$$$S $$$$| $$ $$| $$ | $$' + logo_line( 6)=' S$$$$ | $$$$$$$$| $$S$$ $$ $$| $$$$$$$S| $$ | $$' + logo_line( 7)=' | $$ | $$ | $$| $$ S$$$| $$| $$__/ $$| $$__/ $$' + logo_line( 8)=' | $$ | $$ | $$| $$ S$ | $$| $$ $$ S$$ $$' + logo_line( 9)=' S$$ S$$ S$$ S$$ S$$ S$$$$$$$ S$$$$$$ ' + case(9) + logo_line( 1)=' ' + logo_line( 2)='ooooo oooo .. ooo ooo ooooooooo. .oooo. ' + logo_line( 3)=' `88. .8" .88. `88. .88 `88" `Y8b dP" `Yb ' + logo_line( 4)=' `88. .8" .8"88. 888b d"88 88 888 88 88 ' + logo_line( 5)=' `88.8" .8" `88. 8 Y88. .P 88 88oooo888" 88 88 ' + logo_line( 6)=' `88" .88ooo888. 8 `888" 88 88 `88b 88 88 ' + logo_line( 7)=' 88 .8" `88. 8 Y 88 88 .88P `8b d8" ' + logo_line( 8)=' o88o88o 888o8 88 o88bood8P" `Ybod8P" ' + logo_line( 9)=' ' + case(10) + logo_line( 1)=' ' + logo_line( 2)='____ ____ ___ .___ ___. .______ ______ ' + logo_line( 3)='S S / / / S | S/ | | _ S / __ S ' + logo_line( 4)=' S S/ / / ^ S | S / | | |_) | | | | | ' + logo_line( 5)=' S_ _/ / /_S S | |S/| | | _ < | | | | ' + logo_line( 6)=' | | / _____ S | | | | | |_) | | `--" | ' + logo_line( 7)=' |__| /__/ S__S |__| |__| |______/ S______/ ' + logo_line( 8)=' ' + logo_line( 9)=' ' + case(11) + logo_line( 1)=' ' + logo_line( 2)=' ___ __ _____ __ __ _____ _____ ' + logo_line( 3)='| Y || _ || Y || _ S | _ |' + logo_line( 4)='| | ||. | ||. ||. | / |. | |' + logo_line( 5)=' S_ _/ |. _ ||.S_/ ||. _ S |. | |' + logo_line( 6)=' |: | |: | ||: | ||: | S|: | |' + logo_line( 7)=' |::| |:.|:.||:.|:.||::. /|::. |' + logo_line( 8)=' `--" `-- --"`-- --"`-----" `-----"' + logo_line( 9)=' ' + case(12) + logo_line( 1)=' ' + logo_line( 2)=' ' + logo_line( 3)='_| _| _|_| _| _| _|_|_| _|_| ' + logo_line( 4)=' _| _| _| _| _|_| _|_| _| _| _| _| ' + logo_line( 5)=' _| _|_|_|_| _| _| _| _|_|_| _| _| ' + logo_line( 6)=' _| _| _| _| _| _| _| _| _| ' + logo_line( 7)=' _| _| _| _| _| _|_|_| _|_| ' + logo_line( 8)=' ' + logo_line( 9)=' ' + case(13) + logo_line( 1)=' ' + logo_line( 2)=' __ __ ____ ___ ___ ____ ___ ' + logo_line( 3)=' | | |/ | | | S / S ' + logo_line( 4)=' | | | o | _ _ | o ) | ' + logo_line( 5)=' | ~ | | S_/ | | O | ' + logo_line( 6)=' |___, | _ | | | O | | ' + logo_line( 7)=' | | | | | | | | ' + logo_line( 8)=' |____/|__|__|___|___|_____|S___/ ' + logo_line( 9)=' ' + case(14) + logo_line( 1)=' ' + logo_line( 2)=' __ __ ______ ____ _____ ' + logo_line( 3)='/S S /S SS _ S /"S_/`S/S _`S /S __`S ' + logo_line( 4)='S `S`SS/"/ S SLS S/S S S SLS S S S/S S ' + logo_line( 5)=' `S `S /" S S __ S S S__S S S _ <" S S S S ' + logo_line( 6)=' `S S S S S S/S S S S_/S S S SLS S S S_S S ' + logo_line( 7)=' S S_S S S_S S_S S_SS S_S S____/S S_____S' + logo_line( 8)=' S/_/ S/_/S/_/S/_/ S/_/S/___/ S/_____/' + logo_line( 9)=' ' + case(15) + logo_line( 1)=' ' + logo_line( 2)=' __ __ _______ __ __ _______ _______ ' + logo_line( 3)='| | | || _ || |_| || _ || |' + logo_line( 4)='| |_| || |_| || || |_| || _ |' + logo_line( 5)='| || || || || | | |' + logo_line( 6)='|_ _|| || || _ | | |_| |' + logo_line( 7)=' | | | _ || ||_|| || |_| || |' + logo_line( 8)=' |___| |__| |__||_| |_||_______||_______|' + logo_line( 9)=' ' + case(16) + logo_line( 1)=' ' + logo_line( 2)=' ___ ___ ___ ___ ___ ' + logo_line( 3)=' /S__S /S S /S__S /S S /S S ' + logo_line( 4)=' |::L__L /::S S /::L_L_ /::S S /::S S ' + logo_line( 5)=' |:::S__S/::S:S__S/:/L:S__S/::S:S__S/:/S:S__S' + logo_line( 6)=' /:;;/__/S/S::/ /S/_/:/ /S:S::/ /S:S/:/ /' + logo_line( 7)=' S/__/ /:/ / /:/ / S::/ / S::/ / ' + logo_line( 8)=' S/__/ S/__/ S/__/ S/__/ ' + logo_line( 9)=' ' + end select + ! + ! Replace "S" with "\" and find the max length of + ! the lines to center the two comments + ! + do i1=1,n_logo_lines + iA=index(logo_line(i1),'S') + if (iA==0) cycle + ch=logo_line(i1) + do while (index(ch,'S')/=0) + iA=index(ch,'S') + ch(iA:iA)=slash + enddo + logo_line(i1)=ch + enddo + ! + max_length=-1 + do i1=1,n_logo_lines + max_length=max( len_trim(logo_line(i1)) , max_length) + enddo + ! + n_logo_lines=n_logo_lines+1 + logo_line(n_logo_lines)=' ' + ! + do ic=1,4 + n_logo_lines=n_logo_lines+1 + logo_line(n_logo_lines)=trim(comment(ic)) + left_space=(max_length-len_trim(comment(ic)))/2+1 + if (left_space>0) then + write (logo_line(n_logo_lines),'(t'//trim(intc(left_space))//',a)') trim(comment(ic)) + endif + enddo + ! + end subroutine + ! end module LOGO From 438c9eb1cc7dda3c2d125da831ae67824859b5ff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 30 Sep 2025 12:07:11 +0200 Subject: [PATCH 1146/1367] Improved comment and slightly simplified implementation inside K_Haydock --- src/bse/K_Haydock.F | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 16bda1a81e..f5e1dd1c5a 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -57,7 +57,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) ! real(SP) ::reached_threshold real(SP) ::Bf(Haydock_iterMAX+1),Af(Haydock_iterMAX) - integer ::ItParity,Cf_size,Haydock_n_converged,Haydock_required_converged + integer ::ItParity,Cf_size,Ares_fac,Haydock_n_converged,Haydock_required_converged complex(SP) ::v0_mod_ character(schlen) ::dumb_ch logical ::impose_pseudo_herm_scheme,use_left_and_right,velocity_correction,tmp_converged @@ -97,8 +97,11 @@ subroutine K_Haydock(iq,W,OBS,Xk) if (isec(2)==0) sec="+" call section(sec,'Haydock Solver in the '//trim(OBS)//' basis @q'//trim(intc(iq))//" using the "//trim(scheme)//" scheme") ! - if ( l_BS_ares_from_res) HAYVEC_size = BS_K_dim(1) - if (.not.l_BS_ares_from_res) then + if (l_BS_ares_from_res) then + Ares_fac=2 + HAYVEC_size = BS_K_dim(1) + else + Ares_fac=1 if(.not.BS_K_coupling) HAYVEC_size = BS_K_dim(1) if( BS_K_coupling) HAYVEC_size = BS_H_dim endif @@ -133,6 +136,10 @@ subroutine K_Haydock(iq,W,OBS,Xk) call BS_HAYVEC_alloc(W0,BS_nkFGbz_in_Tgrp) endif ! + ! For the coupling case if A = -R* (l_BS_ares_from_res=.TRUE.), V0 = (u0, -iu0*) + ! At each iteration however the relation changes V1= (u1, iu1*), + ! this is why the ItParity is needed + ! ItParity=1 it_on_disk=0 reached_threshold=100._SP @@ -308,15 +315,12 @@ subroutine K_Haydock(iq,W,OBS,Xk) ! Cf= cZERO ! + ! First K_multiply_by_V is with parity=-1 in pseudo-hermitian case + ! call K_multiply_by_V(V0,Vnp1,-1,iq,"all") call K_dot_product(v0_mod_,V0,Vnp1,1) ! - ! For the coupling case if A = -R* (l_BS_ares_from_res=.FALSE.), V0 = (u0, -iu0*) - ! At each iteration however the relation changes V1= (u1, iu1*), - ! this is why the ItParity is needed - ! - if( l_BS_ares_from_res) Haydock_v0_mod=sqrt(2*real(v0_mod_)) - if(.not.l_BS_ares_from_res) Haydock_v0_mod=sqrt( real(v0_mod_)) + Haydock_v0_mod=sqrt(Ares_fac*real(v0_mod_)) ! do i_g=1,BS_nT_grps if (.not.PAR_IND_T_Haydock%element_1D(i_g)) cycle @@ -467,8 +471,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) call K_dot_product(v0_mod_,Vn,Vnp1,1) ! = (2*Re())^(1/2) by symmetry, ! where the dot_product is just on eh pair space - if ( l_BS_ares_from_res) Bf(it+1)=sqrt(2*real(v0_mod_,SP)) - if (.not.l_BS_ares_from_res) Bf(it+1)=sqrt( real(v0_mod_,SP)) + Bf(it+1)=sqrt(Ares_fac*real(v0_mod_,SP)) ! Simple test for INF if( Bf(it+1)==(Bf(it+1)+1._SP) ) call error('Bf=INF likely because some eigenvalue of the BSE is negative.') ! Tests for NaN From ef8292034b46c9d6bb9f53116793e78a7de2feb3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 30 Sep 2025 12:10:47 +0200 Subject: [PATCH 1147/1367] DegFix input variable moved to higher verbosity --- src/interface/INIT_load.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 21156d1b9f..9144608028 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -220,7 +220,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) #endif call it('f',defs,'WFbuffIO','[IO] Wave-functions buffered I/O',verb_level=V_io) call it('f',defs,'NoDiagSC','New setup for non-diagonal supercells',verb_level=V_general) - call it('f',defs,'DegFix','Force the code to impose the energy levels to respect their degeneracy') + call it('f',defs,'DegFix','Force the code to impose the energy levels to respect their degeneracy',verb_level=V_general) ! ! Parallel Setup ! From 462944007e9edfa2626c50550b308eb84d783344 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 30 Sep 2025 15:55:30 +0200 Subject: [PATCH 1148/1367] Fixed bug in compilation introduced with change to name of title function --- include/driver/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/driver/driver.h b/include/driver/driver.h index a53a1950b5..d50fb20cad 100644 --- a/include/driver/driver.h +++ b/include/driver/driver.h @@ -24,7 +24,7 @@ struct tool_struct tool_init(); void usage(struct options_struct *options, struct tool_struct t, char *what, int n_options); struct tool_struct versions(); -void title(FILE *file_name, char *cmnt, struct tool_struct t); +void title_lumen(FILE *file_name, char *cmnt, struct tool_struct t); int use_me(struct options_struct *options, struct tool_struct t, int i_opt); char *running_tool(); char *running_project(); From 2a8d0c57880493ca11ff4f99e800388149cedfe7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Oct 2025 07:46:23 +0200 Subject: [PATCH 1149/1367] added also title_yambo, alongside title_lumen in the driver header --- include/driver/driver.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/driver/driver.h b/include/driver/driver.h index d50fb20cad..1083a904bf 100644 --- a/include/driver/driver.h +++ b/include/driver/driver.h @@ -25,6 +25,7 @@ void usage(struct options_struct *options, struct tool_struct t, char *what, int n_options); struct tool_struct versions(); void title_lumen(FILE *file_name, char *cmnt, struct tool_struct t); +void title_yambo(FILE *file_name, char *cmnt, struct tool_struct t); int use_me(struct options_struct *options, struct tool_struct t, int i_opt); char *running_tool(); char *running_project(); From 256e74cb5484ff87a09d95b8bc8b0af2dd39fb73 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Oct 2025 15:24:16 +0200 Subject: [PATCH 1150/1367] - Fix in eval_G_minus_G (see discussion in https://gitlab.com/lumen-code/lumen/-/issues/223) - Interface declaration for eval_G_minus_G contained an optional argument (force_recompute) which did not exist in the subroutine itself - Added opr_in for eval_G_minus_G. If the subroutine is called with opr="+" it actually evaluates G_plus_G --- src/common/eval_G_minus_G.F | 61 ++++++++++++++++++++++++++---------- src/modules/mod_interfaces.F | 4 +-- 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/common/eval_G_minus_G.F b/src/common/eval_G_minus_G.F index 708c26bb26..b3ff740f28 100644 --- a/src/common/eval_G_minus_G.F +++ b/src/common/eval_G_minus_G.F @@ -11,7 +11,7 @@ #include ! ! -integer function eval_G_minus_G(iG,iGo,COMM) +integer function eval_G_minus_G(iG,iGo,opr_in,COMM) ! ! Evaluates the G-G' table : ! @@ -20,6 +20,10 @@ integer function eval_G_minus_G(iG,iGo,COMM) ! and returns the orginal iG that is redefined in output ! in such a way that G_m_G(iG,j) exists for all j ! + ! If operation is "+" fills the table with: + ! + ! g_vec( G_m_G(i,j) ) = g_vec(i)+g_vec(j) + ! use pars, ONLY:SP use vec_operate, ONLY:iku_v_norm, c2a use parallel_m, ONLY:yMPI_comm,PP_indexes,PP_indexes_reset,myid @@ -32,24 +36,31 @@ integer function eval_G_minus_G(iG,iGo,COMM) implicit none ! integer :: iG,iGo + character(1), optional :: opr_in type(yMPI_comm), optional :: COMM ! ! Work Space ! integer :: i1,i2,is - integer :: iG_shell,iGo_shell,iG_shell_0,iG_shell_max,iG_,iGo_,iG_alloc,iGo_alloc + integer :: iG_shell,iGo_shell,iG_shell_0,iG_shell_max,iG_,iGo_,& + & iG_alloc,iGo_alloc,iG_closed,iGo_closed integer :: ngx1,ngx2,ngx3, iv1_rlu(3),iG_max real(SP):: E_iG, E_iGo, E_max real(SP):: v1(3),v2(3) real(SP), allocatable :: E_G_m_G(:,:),g_vec_rlu(:,:) integer, allocatable :: ig_vec_rlu(:,:), imap(:,:,:) integer, allocatable :: G_m_G_maxval_tmp(:) + character(1) :: opr type(PP_indexes) :: PAR_IND_G ! integer, external :: G_index + integer, external :: G2G ! ! Init ! + opr = "-" + if(present(opr_in)) opr=opr_in + ! iG_=iG iGo_=iGo if (iGo==0) iGo_=iG @@ -69,32 +80,43 @@ integer function eval_G_minus_G(iG,iGo,COMM) call timing("eval_G_minus_G",opr="start") ! ! aux data - YAMBO_ALLOC(E_G_m_G,(iG_,iGo_)) - iG_max=iG_ + iG_closed=G2G(iG_) + iGo_closed=G2G(iGo_) + YAMBO_ALLOC(E_G_m_G,(iG_closed,iGo_closed)) + iG_max=iG_closed ! ! setup MPI parallelism if required ! call PP_indexes_reset(PAR_IND_G) if (present(COMM)) then ! - call PARALLEL_index(PAR_IND_G,(/iGo_/),COMM=COMM) + call PARALLEL_index(PAR_IND_G,(/iGo_closed/),COMM=COMM) ! - call PARALLEL_live_message("[G_m_G] G-vectors",LOADED=PAR_IND_G%n_of_elements(myid+1),TOTAL=iGo_) + call PARALLEL_live_message("[G_m_G] G-vectors",LOADED=PAR_IND_G%n_of_elements(myid+1),TOTAL=iGo_closed) ! endif ! !$omp parallel do default(shared), private(i2,i1,v1), schedule(dynamic) - do i2=1,iGo_ + do i2=1,iGo_closed ! if(present(COMM)) then E_G_m_G(:,i2)=0.0_SP if (.not.PAR_IND_G%element_1D(i2)) cycle endif ! - do i1=1,iG_ - v1(:)=g_vec(i1,:)-g_vec(i2,:) - E_G_m_G(i1,i2)=0.5_SP*iku_v_norm(v1)**2 - enddo + if (opr=="-") then + do i1=1,iG_closed + v1(:)=g_vec(i1,:)-g_vec(i2,:) + E_G_m_G(i1,i2)=0.5_SP*iku_v_norm(v1)**2 + enddo + else if (opr=="+") then + do i1=1,iG_closed + v1(:)=g_vec(i1,:)+g_vec(i2,:) + E_G_m_G(i1,i2)=0.5_SP*iku_v_norm(v1)**2 + enddo + else + call error(" eval_g_minus_g: wrong operation in input") + endif enddo !$omp end parallel do ! @@ -231,12 +253,17 @@ integer function eval_G_minus_G(iG,iGo,COMM) if (.not.PAR_IND_G%element_1D(i2)) cycle endif ! - do i1=1,iG_ - ! - iv1_rlu(:)=ig_vec_rlu(i1,:)-ig_vec_rlu(i2,:) - G_m_G(i1,i2)=imap(iv1_rlu(1),iv1_rlu(2),iv1_rlu(3)) - ! - enddo + if (opr=="-") then + do i1=1,iG_ + iv1_rlu(:)=ig_vec_rlu(i1,:)-ig_vec_rlu(i2,:) + G_m_G(i1,i2)=imap(iv1_rlu(1),iv1_rlu(2),iv1_rlu(3)) + enddo + else if (opr=="+") then + do i1=1,iG_ + iv1_rlu(:)=ig_vec_rlu(i1,:)+ig_vec_rlu(i2,:) + G_m_G(i1,i2)=imap(iv1_rlu(1),iv1_rlu(2),iv1_rlu(3)) + enddo + endif ! G_m_G_maxval_tmp(i2)=maxval(G_m_G(:,i2)) ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 3922a6089b..0f84975d31 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -186,10 +186,10 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) end subroutine #endif ! - integer function eval_G_minus_G(iG,iGo,force_recompute,COMM) + integer function eval_G_minus_G(iG,iGo,opr_in,COMM) use parallel_m, ONLY:yMPI_comm integer :: iG,iGo - logical, optional :: force_recompute + character(1), optional :: opr_in type(yMPI_comm), optional :: COMM end function ! From 8fad0a83c062e24e04f752ade14a202468e8bce5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Oct 2025 15:42:27 +0200 Subject: [PATCH 1151/1367] WF_shift_kpoint modified to handle single composed shifft, rather than shifting twice the WF Initial check on dimenions in DIPOLE_overlaps modified accordingly --- src/dipoles/DIPOLE_overlaps.F | 8 ++++- src/wf_and_fft/WF_shift_kpoint.F | 51 +++++++++++++------------------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 3018f8834a..51ed1c24c8 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -65,11 +65,17 @@ subroutine DIPOLE_overlaps(Xk,Dip) DIP_S=cZERO ! call k_find_smallest_g0(g0_idx,g0_length) - iG0=max(maxval(g0_idx(:,1)),maxval(g0_idx(:,2))) + iG0=maxval(g0_idx) ! ! Generate G_m_G of the needed size ! YAMBO_FREE(G_m_G) + ng_tmp=eval_G_minus_G(iG0,iG0,opr_in="+") + ! + ! New iG0 for composed shifts + iG0=maxval(G_m_G) + ! + YAMBO_FREE(G_m_G) ng_tmp=eval_G_minus_G(wf_ng_1st_BZ,iG0) ! wf_ng_save =wf_ng diff --git a/src/wf_and_fft/WF_shift_kpoint.F b/src/wf_and_fft/WF_shift_kpoint.F index bfe5b81f65..1c16ca8934 100644 --- a/src/wf_and_fft/WF_shift_kpoint.F +++ b/src/wf_and_fft/WF_shift_kpoint.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2015 The Yambo Team ! -! Authors (see AUTHORS file for details): MG CA +! Authors (see AUTHORS file for details): MG CA DS ! ! headers ! @@ -16,7 +16,7 @@ subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_ use pars, ONLY: SP,cZERO use electrons, ONLY: n_spinor use R_lattice, ONLY: k_map,bz_samp - use R_lattice, ONLY: DEV_VAR(G_m_G) + use R_lattice, ONLY: DEV_VAR(G_m_G),G_m_G,minus_G use wave_func, ONLY: wf_ng_1st_BZ,wf_ng_overlaps use devxlib, ONLY: devxlib_memcpy_d2d, devxlib_memset_d use gpu_m, ONLY: have_gpu @@ -31,8 +31,7 @@ subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_ ! ! Work space ! - integer :: id,ik,is - complex(SP), allocatable DEV_ATTR :: WF_tmp(:,:,:) + integer :: id,id_loc,ik,is integer :: ig,igp,i_b1,i_b2 integer :: g0_idx(3,2),g0_idx_val integer :: i_spinor,i_b @@ -45,27 +44,31 @@ subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_ ! if (i_b2 /= nb_to_shift) call error("[WF_shift_kpoint] Unexpected error") ! - YAMBO_ALLOC_GPU(WF_tmp,(wf_ng_overlaps,n_spinor,nb_to_shift)) + if (all(WF_shift==0)) then + call devxlib_memset_d(WF_k_out,cZERO) + call devxlib_memcpy_d2d(WF_k_out,WF_k_in, range1=(/1,wf_ng_1st_BZ/)) + return + endif + ! + g0_idx_val=1 + do id=1,3 + if(WF_shift(id)==0) cycle + ig=k_map%g0_idx(id,WF_shift(id)) + igp=minus_G(g0_idx_val) + g0_idx_val=G_m_G(ig,igp) + enddo ! ! dev2dev - call devxlib_memset_d(WF_tmp,cZERO) - call devxlib_memcpy_d2d(WF_tmp,WF_k_in, range1=(/1,wf_ng_1st_BZ/)) + call devxlib_memset_d(WF_k_out,cZERO) ! ! main loop ! - do id=1,3 - ! - WF_k_out=cZERO - ! - if(WF_shift(id)/=0) then ! - g0_idx_val=k_map%g0_idx(id,WF_shift(id)) - ! - !DEV_ACC_DEBUG data present(WF_tmp,G_m_G,WF_k_out) + !DEV_ACC_DEBUG data present(WF_k_in,G_m_G,WF_k_out) !DEV_ACC parallel loop collapse(3) !DEV_CUF kernel do(3) <<<*,*>>> - !DEV_OMPGPU target map(present,alloc:WF_tmp,G_m_G,WF_k_out) + !DEV_OMPGPU target map(present,alloc:WF_k_in,G_m_G,WF_k_out) !DEV_OMPGPU teams loop collapse(3) !DEV_OMP parallel do default(shared), private(i_b,i_spinor,ig,igp),collapse(3) ! @@ -73,10 +76,10 @@ subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_ do i_spinor=1,n_spinor do ig=1,wf_ng_1st_BZ ! - if(WF_tmp(ig,1,i_b1)==cZERO) cycle + if(WF_k_in(ig,1,i_b1)==cZERO) cycle ! igp=DEV_VAR(G_m_G)(ig,g0_idx_val) - WF_k_out(igp,i_spinor,i_b)=WF_tmp(ig,i_spinor,i_b) + WF_k_out(igp,i_spinor,i_b)=WF_k_in(ig,i_spinor,i_b) ! enddo enddo @@ -86,18 +89,6 @@ subroutine WF_shift_kpoint(b_to_shift,nb_to_shift,ikbz,wf_shift,Xk,WF_k_in,WF_k_ !DEV_OMPGPU end target !DEV_ACC_DEBUG end data ! - else - ! dev2dev - call devxlib_memcpy_d2d(WF_k_out,WF_tmp) - endif - ! dev2dev - call devxlib_memset_d(WF_tmp,cZERO) - call devxlib_memcpy_d2d(WF_tmp,WF_k_out) - ! - enddo - ! - YAMBO_FREE_GPU(WF_tmp) - YAMBO_FREE(WF_tmp) ! end subroutine WF_shift_kpoint From 51e5cb459c43ff1a002b3d7016de6139afc3740e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 1 Oct 2025 20:13:12 +0200 Subject: [PATCH 1152/1367] Fix to parser imported from yambo-devel/projects --- include/headers/parser/symbols.h | 2 +- src/parser/PARSER_symbols.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/headers/parser/symbols.h b/include/headers/parser/symbols.h index cf72ca2d3a..78883fc518 100644 --- a/include/headers/parser/symbols.h +++ b/include/headers/parser/symbols.h @@ -53,7 +53,7 @@ typedef struct symrec gsl_complex c; /* value of a VAR */ char *str; /* value of a STRING */ sym_block *block; /* to store blocks */ - gsl_complex (*fnctptr)(); /* value of a FNCT */ + gsl_complex (*fnctptr)(gsl_complex); /* value of a FNCT */ } value; struct symrec *next; /* link field */ diff --git a/src/parser/PARSER_symbols.c b/src/parser/PARSER_symbols.c index 3efe718946..8ad36146f8 100644 --- a/src/parser/PARSER_symbols.c +++ b/src/parser/PARSER_symbols.c @@ -97,7 +97,7 @@ int rmsym(char *sym_name) struct init_fntc { char *fname; - gsl_complex (*fnct)(); + gsl_complex (*fnct)(gsl_complex); }; static struct init_fntc arith_fncts[] = {{"sqrt", gsl_complex_sqrt}, From 8bd61a9c6d0b0aabda714e30f504d1a74fd65448 Mon Sep 17 00:00:00 2001 From: thge123 Date: Thu, 2 Oct 2025 16:01:18 +0200 Subject: [PATCH 1153/1367] haydock + orbital conjg fix --- src/bse/K_Haydock.F | 14 ++++++++------ src/bse/K_Haydock_response.F | 7 ++++++- src/bse/K_solvers.F | 4 +++- src/dipoles/DIPOLE_orbital_magnetization_cd.F | 7 ++++--- src/dipoles/DIPOLE_setup.F | 5 ++++- yambo_intel_single_precission_omp_configure.sh | 11 ++++++----- 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 16bda1a81e..71c59676b5 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -90,7 +90,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) use_left_and_right=.false. scheme="hermitian" if(BS_K_Coupling.or.impose_pseudo_herm_scheme) scheme="pseudo-herm" - use_left_and_right=trim(OBS)=="kerr".or.trim(OBS)=="dichroism" + use_left_and_right=trim(OBS)=="kerr".or.trim(OBS)=="dichroism".or.trim(OBS)=="magnetoelectric" velocity_correction= trim(global_gauge)=="velocity" .and. (trim(OBS)=="optics" .or. trim(OBS)=="kerr") ! if (isec(2)/=0) sec="=" @@ -232,11 +232,12 @@ subroutine K_Haydock(iq,W,OBS,Xk) do i_g=1,BS_nT_grps if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) - if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP - if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) - if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) - if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) - if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) + if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP + if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) + if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) + if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) + if (trim(OBS)=="magnetoelectric") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_spin(1,:,1) + if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) V0(i_g)%fragment(:,i_ColFG) = V0(i_g)%fragment(:,i_ColFG)*sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP)) enddo ! @@ -275,6 +276,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) if (trim(OBS)=="kerr") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) if (trim(OBS)=="dichroism") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm + if (trim(OBS)=="magnetoelectric") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm W0(i_g)%fragment(:,i_ColFG) = W0(i_g)%fragment(:,i_ColFG)*(sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP))) enddo if(velocity_correction) V_tmp(i_g)%fragment = W0(i_g)%fragment/BS_T_grp(i_g)%E diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index 8d59e1c6a0..7c72c56303 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -10,7 +10,7 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh use pars, ONLY:SP,cZERO,cONE,cI,pi use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Resp_ii,Joint_DOS,global_gauge, & -& X_magnons,Resp_ij,X_dichroism,i_G_shift +& X_magnons,Resp_ij,X_dichroism,ME_ij,i_G_shift use R_lattice, ONLY:bare_qpg use frequency, ONLY:w_samp use BS, ONLY:BSE_mode @@ -226,6 +226,8 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh X_magnons(iw,1,i_resp(:))=-X_o(1:2,1)*Co/(4._SP*pi) case("dichroism") X_dichroism(iw,i_resp(:))=-X_o(1:2,1)*Co/(4._SP*pi)*(cI/SPEED_OF_LIGHT) + case("magnetoelectric") + ME_ij(iw,1,i_resp(:))=-X_o(1:2,1)*(-1._SP*Co)/(8._SP*pi) end select ! enddo @@ -248,6 +250,9 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh case("dichroism") sums=(X_dichroism(iw,2)+X_dichroism(iw,4))/2._SP diff= X_dichroism(iw,2)-X_dichroism(iw,4) + case("magnetoelectric") + sums=(ME_ij(iw,1,2)+ME_ij(iw,1,4))/2._SP + diff= ME_ij(iw,1,2)-ME_ij(iw,1,4) end select ! update_thresh = abs(real(sums))>0._SP .and. abs(aimag(sums))>0._SP diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 03d83870b7..5faecf0c94 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -19,7 +19,8 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,& & run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,& -& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_jdos +& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,& +& l_BS_magnetoelectric,l_BS_jdos use parallel_m, ONLY:master_cpu,CPU_structure use IO_int, ONLY:IO_and_Messaging_switch use linear_algebra, ONLY:INV,DIAGO @@ -113,6 +114,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) if (l_BS_dichroism) call K_Haydock(iq,W_bss,"dichroism",Xk) + if (l_BS_magnetoelectric) call K_Haydock(iq,W_bss,"magnetoelectric",Xk) ! endif ! diff --git a/src/dipoles/DIPOLE_orbital_magnetization_cd.F b/src/dipoles/DIPOLE_orbital_magnetization_cd.F index 3177a6cd23..7df490e25a 100644 --- a/src/dipoles/DIPOLE_orbital_magnetization_cd.F +++ b/src/dipoles/DIPOLE_orbital_magnetization_cd.F @@ -66,12 +66,13 @@ subroutine Dipole_orbital_magnetization_cd(Xen,Xk,Dip) ! do ib=Dip%ib(1),Dip%ib(2) ! - DIP_x_loc(:)=-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol) + ! conjg because of how cross_product is coded in mod_vec_operate.F + DIP_x_loc(:)=conjg(-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol)) ! DIP_v_loc(:)=DIP_v(:,ic,ib,ik_mem,i_sp_pol) - ! + ! DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)=& -& DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)+cross_product(DIP_x_loc,DIP_v_loc) +& DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)+cross_product(DIP_x_loc,DIP_v_loc) ! ! DEBUG < !write(*,*) "[DIP] writing DIP_orbital(..,ic,iv,ik,,) values" diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 77ab538bde..9f0f260afa 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -151,7 +151,10 @@ subroutine DIPOLE_setup(Dip) if (STRING_match(Dip%computed,"spin").or.& l_BS_magnons.or.& l_BS_magnetoelectric) specific_obs=" M_spin" - if (STRING_match(Dip%computed,"orb")) specific_obs=trim(specific_obs)//" M_orbRT M_it" + !if (STRING_match(Dip%computed,"orb").and..not.l_BS_magnetoelectric) then + if (STRING_match(Dip%computed,"orb")) then + specific_obs=trim(specific_obs)//" M_orbRT M_it" + endif #if defined _RT ! Always force all dipoles in real-time case if (l_real_time) specific_obs=" M_spin M_orbRT M_it" diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh index 99de3552f8..974a2dc8cb 100755 --- a/yambo_intel_single_precission_omp_configure.sh +++ b/yambo_intel_single_precission_omp_configure.sh @@ -34,10 +34,11 @@ FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ --with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ --with-blacs-libs="mkl" \ --with-scalapack-libs="mkl" \ ---with-extlibs-path="${YAMBO_LIBS_ROOT}" \ ---enable-slepc-linalg \ ---with-petsc-path="${PETSC_ROOT}" \ ---with-slepc-path="${SLEPC_ROOT}" \ ---with-libxc-path="${LIBXC_ROOT}" \ +--with-extlibs-path="${YAMBO_LIBS_ROOT}" + +#--enable-slepc-linalg +#--with-petsc-path="${PETSC_ROOT}" \ +#--with-slepc-path="${SLEPC_ROOT}" \ +#--with-libxc-path="${LIBXC_ROOT}" \ #FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ From ca099d3dfbb205ef10eb38ff9b2ae440eb69f9fb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 2 Oct 2025 17:39:06 +0200 Subject: [PATCH 1154/1367] Fixed typo in comment --- src/dipoles/DIPOLE_overlaps.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 51ed1c24c8..4480ce8481 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -177,7 +177,7 @@ subroutine DIPOLE_overlaps(Xk,Dip) ! 2) the orignal points ikbz that corresponds to (k+q) was ! shifted in the opposite direction the two ! shifts cancel out and I get shift==0 ==> WF_shifts==-1 - ! 3) the orignal points ibbz that corresponds to (k+q) was + ! 3) the orignal points ikbz that corresponds to (k+q) was ! already shifted in the right direction I keep this shift ! case WF_shifts==1 ! From 9323daeda6b6a71b6789f9291958aedf8688b71d Mon Sep 17 00:00:00 2001 From: thge123 Date: Thu, 2 Oct 2025 19:06:49 +0200 Subject: [PATCH 1155/1367] start of reconstruction --- src/bse/K_IP.F | 90 ++++++++----------- .../K_components_folded_in_serial_arrays.F | 5 +- src/bse/K_dipoles.F | 21 +++-- src/bse/K_observables.F | 16 ++-- src/bse/K_solvers.F | 5 +- src/dipoles/DIPOLE_setup.F | 16 ++-- src/modules/mod_BS.F | 11 +-- src/modules/mod_DICHROISM.F | 32 +++++-- src/output/X_OUTPUT_driver.F | 11 ++- 9 files changed, 108 insertions(+), 99 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 6a947bd38c..8c66f6f3b2 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -22,12 +22,12 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) use electrons, ONLY:levels,spin_occ,spin,nel,n_sp_pol,n_spinor use X_m, ONLY:Resp_ii,Joint_DOS,alpha_dim,eps_2_alpha,& & X_drude_term,global_gauge,N_BS_E_sorted,i_G_shift,& -& skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism,ME_ij +& skip_cond_sum_rule,X_magnons,Resp_ij,X_dichroism,X_mespin,X_meorb use BS_solvers, ONLY:Co_factor,diam_term_exact,para_term_w0,BSS_Wd,BSS_mode,BSS_uses_DbGd,FG_factor use BS, ONLY:BS_T_grp,BS_nkFGbz_in_Tgrp,BS_nT_grps,BS_perturbative_SOC,& & BS_dip_size,l_BS_jdos,l_BS_esort,l_BS_trace,BS_H_dim,l_BS_kerr_asymm,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& BS_K_anti_resonant,l_BS_ares_from_res,l_BS_magnetoelectric +& BS_K_anti_resonant,l_BS_ares_from_res,l_BS_mespin,l_BS_meorb use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& & PAR_COM_Xk_ibz_INDEX @@ -56,7 +56,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) integer :: i_ColFG complex(SP), allocatable :: E_DbGd(:) ! - complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_me(3) + complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_mespin,res_meorb integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! @@ -242,62 +242,37 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif ! - if(l_BS_magnetoelectric) then + if (l_BS_mespin) then - ! Spin part - res_me(1)=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(1,i_T,1)) + ! Magnetoelectric spin part + res_mespin=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(1,i_T,1)) if(l_BS_trace) then ! x*sigma = DIP_x*DIP_spin; - res_me(1)=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(1,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(2,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(3,i_T,1)))/3._SP + res_mespin=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_spin(3,i_T,1)))/3._SP endif - res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) + res_mespin=res_mespin*f_eh*Z_eh/(q0_def_norm) + if (l_BS_esort.and.i_res_ares==1) then + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_mespin,vtmpC) + endif + endif + if (l_BS_meorb) then ! Orbital part - res_me(2)=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1)) + res_meorb=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1)) if(l_BS_trace) then ! x*L = DIP_x*DIP_orbital; - res_me(2)=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & + res_meorb=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1))+ & & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP endif - res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) + res_meorb=res_meorb*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) then - call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) - call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) + call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_meorb,vtmpC) endif - ! Old part to be deleted... - ! Dipole residuals: res_me(i) = * - ! BSE dipoles_mag: - ! BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=/2 - ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=/2 - ! BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)= - ! - - ! res_me(1)=conjg(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)+& - ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)) - ! res_me(1)=res_me(1)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) - ! res_me(1)=res_me(1)*f_eh*Z_eh/(q0_def_norm) - - ! ! - ! res_me(2)=conjg(cI*(BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)-& - ! BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1))) - ! res_me(2)=res_me(2)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) - ! res_me(2)=res_me(2)*f_eh*Z_eh/(q0_def_norm) - - ! ! - ! res_me(3)=conjg(BS_T_grp(i_T_g)%dipoles_mag(3,i_T,1)) - ! res_me(3)=res_me(3)*BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1) - ! res_me(3)=res_me(3)*f_eh*Z_eh/(q0_def_norm) - - ! if (l_BS_esort.and.i_res_ares==1) then - ! call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(1),vtmpC) - ! call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(2),vtmpC) - ! call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_me(3),vtmpC) - ! endif endif ! if ( abs(real(E_plus_W0)) < Dip%Energy_threshold .and. iq==1 .and. dip_r ) then @@ -375,12 +350,17 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif endif ! - if (l_BS_magnetoelectric) then - ME_ij(:,1,3)=ME_ij(:,1,3)-res_me(1)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) - ME_ij(:,2,3)=ME_ij(:,2,3)-res_me(2)/(W_bss%p(:)-E_plus_W(i_pert_SOC)) + if (l_BS_mespin) then + X_mespin(:,3)=X_mespin(:,3)-res_mespin/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - ME_ij(:,1,3)=ME_ij(:,1,3)+conjg(res_me(1))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) - ME_ij(:,2,3)=ME_ij(:,2,3)+conjg(res_me(2))/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) + X_mespin(:,3)=X_mespin(:,3)+conjg(res_mespin)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) + endif + endif + ! + if (l_BS_meorb) then + X_meorb(:,3)=X_meorb(:,3)-res_meorb/(W_bss%p(:)-E_plus_W(i_pert_SOC)) + if (BS_K_anti_resonant.and.l_BS_ares_from_res) then + X_meorb(:,3)=X_meorb(:,2,3)+conjg(res_meorb)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) endif endif enddo @@ -437,9 +417,11 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) call PP_redux_wait( X_magnons(:,:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) endif ! - if(l_BS_magnetoelectric) then - call PP_redux_wait( ME_ij(:,:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) - call PP_redux_wait( ME_ij(:,:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) + if(l_BS_mespin) then + call PP_redux_wait( X_mespin(:,3) ,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + endif + if(l_BS_meorb) then + call PP_redux_wait( X_meorb(:,3) ,COMM=PAR_COM_eh_INDEX%COMM ) endif ! @@ -475,7 +457,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_magnons) X_magnons(:,:,3)=X_magnons(:,:,3)*Co_factor/(4._SP*pi) ! - if (l_BS_magnetoelectric) ME_ij(:,:,3)=ME_ij(:,:,3)*(-1._SP*Co_factor/(8._SP*pi)) + if (l_BS_mespin) X_mespin(:,3)=X_mespin(:,3)*(-1._SP*Co_factor/(8._SP*pi)) + ! + if (l_BS_meorb) X_meorb(:,3)=X_meorb(:,3)*(-1._SP*Co_factor/(8._SP*pi)) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism magnetoelectric") call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 4ca90147b7..983b157b74 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -108,7 +108,10 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) ! - if (l_BS_magnetoelectric) BSS_dipoles_me(:,H_pos)=BS_T_grp(i_g)%dipoles_spin(:,i_Tr,i_res_ares_solver) + if (l_BS_magnetoelectric) then + BSS_dipoles_me(1,H_pos)=BS_T_grp(i_g)%dipoles_spin(1,i_Tr,i_res_ares_solver) + BSS_dipoles_me(2,H_pos)=BS_T_grp(i_g)%dipoles_dic(1,i_Tr,i_res_ares_solver) + endif ! if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:BS_dip_size) ! diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index aebeec0db3..3931396b1d 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -30,7 +30,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) & BS_dip_size,l_BS_trace,BS_n_eh_spaces,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& & BSE_dipole_geometry,BS_field_direction,l_BS_ares_from_res,& -& l_BS_magnetoelectric +& l_BS_mespin,l_BS_meorb use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& & PAR_COM_Xk_ibz_INDEX @@ -158,7 +158,8 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! *velocity* : DIP(c,v,k) is q_ver* while I need q_ver* = conjg(q_ver*) ! ! Absorption, KERR, PL, Dichroism, Magnetoelectric - if(l_BS_abs.or.l_BS_kerr.or.l_BS_photolum.or.l_BS_dichroism.or.l_BS_magnetoelectric) then + if(l_BS_abs.or.l_BS_kerr.or.l_BS_photolum.or.& +& l_BS_dichroism.or.l_BS_meorb.or.l_BS_mespin) then ! if(iq==1.and.i_G_shift==1) then call DIPOLE_rotate(ic,iv,ik_bz,i_sp_pol_c,trim(DIP_kind),Xk,DIP_bare) @@ -181,15 +182,16 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! endif ! - ! Dichroism - if (l_BS_dichroism.or.l_BS_magnetoelectric) then + ! Dichroism or orbital magnetoelectric part + if (l_BS_dichroism.or.l_BS_meorb) then if(iq==1.and.i_G_shift==1) then call DIPOLE_rotate(ic,iv,ik_bz,i_sp_pol_c,"DIP_L",Xk,DIP_expanded) do i_dip=1,BS_dip_size DIP_projected(i_dip)=dot_product(BS_field_direction(:,i_dip),DIP_expanded) enddo else - call error(' finite q not implemented for dichroism or magnetoelectric effect') + if (l_BS_dichroism) call error(' finite q not implemented for dichroism effect') + if (l_BS_meorb) call error(' finite q not implemented for magnetoelectric effect') endif BS_T_grp(i_T_g)%dipoles_dic(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) if (BS_K_coupling.and.l_BS_ares_from_res) then @@ -197,8 +199,8 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) endif endif ! - ! Magnons and Magnetoelectric - if (l_BS_magnons.or.l_BS_magnetoelectric) then + ! Magnons and Magnetoelectric spin part + if (l_BS_magnons.or.l_BS_mespin) then ! ! notice: ! In optics q=0 requires a special treatment due to the non analytic behaviour @@ -209,6 +211,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) if(iq==1.and.i_G_shift==1) then call DIPOLE_rotate(ic,iv,ik_bz,i_sp_pol_c,"DIP_S",Xk,DIP_expanded) else + if (l_BS_mespin) call error(' finite q not implemented for magnetoelectric effect') call scatter_Bamp_spin(BSE_scatt,'x') DIP_expanded(1)=-conjg(BSE_scatt%rhotw(1)) call scatter_Bamp_spin(BSE_scatt,'y') @@ -239,8 +242,8 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! endif ! - ! Magnetoelectric - if (l_BS_magnetoelectric) then + ! Magnetoelectric spin part + if (l_BS_mespin) then do i_dip=1,BS_dip_size DIP_projected(i_dip)=dot_product(BS_field_direction(:,i_dip),DIP_expanded) enddo diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 8aa72ede9c..b07f652c27 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -19,7 +19,7 @@ subroutine K_observables(W,Xk) use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& & l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,& & l_BS_optics,BS_dip_size,l_BS_magnons,l_BS_photolum,l_BS_kerr_asymm,l_BS_esort_indx,& -& l_BS_magnetoelectric +& l_BS_mespin,l_BS_meorb use parser_m, ONLY:parser use stderr, ONLY:STRING_match use electrons, ONLY:levels,n_sp_pol,n_spin @@ -40,10 +40,11 @@ subroutine K_observables(W,Xk) l_BS_dichroism = STRING_match(BSE_prop,'dich') l_BS_kerr = STRING_match(BSE_prop,'kerr') l_BS_photolum = STRING_match(BSE_prop,'photolum') - l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 - l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') .and. l_BS_kerr + l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') .and. l_BS_kerr l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr - l_BS_magnetoelectric = STRING_match(BSE_prop,'ME') .and.n_spin>1 + l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 + l_BS_MEspin = STRING_match(BSE_prop,'MEspin') .and.n_spin>1 + l_BS_MEorb = STRING_match(BSE_prop,'MEorb') .and.n_spin>1 ! ! How ... !--------- @@ -84,7 +85,7 @@ subroutine K_observables(W,Xk) call warning(" Natural dichroism without trace. Quadripolar terms are neglected") endif endif - if (l_BS_magnetoelectric) then + if (l_BS_meorb) then if (.not.(l_col_cut.and.Xk%nbz==1) ) then call warning(" Periodic system detected. Orbital ME tensor coded only for isolated systems") endif @@ -94,7 +95,7 @@ subroutine K_observables(W,Xk) if (l_BS_trace ) BS_dip_size = 3 if (l_BS_trace .and. .not.l_rpa_IP) call error(" trace coded only at the IP level") ! - l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum.or.l_BS_magnetoelectric + l_BS_optics=l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_photolum.or.l_BS_mespin.or.l_BS_meorb ! ! Now fix BSE_prop string ! @@ -110,7 +111,8 @@ subroutine K_observables(W,Xk) if(l_BS_esort) BSE_prop=trim(BSE_prop)//' esrt' if(l_BS_esort) BSE_prop=trim(BSE_prop)//' indx' if(l_BS_trace) BSE_prop=trim(BSE_prop)//' trace' - if(l_BS_magnetoelectric) BSE_prop=trim(BSE_prop)//' ME' + if(l_BS_mespin) BSE_prop=trim(BSE_prop)//' MEspin' + if(l_BS_meorb) BSE_prop=trim(BSE_prop)//' MEorb' ! ! Solver Logicals !================= diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 5faecf0c94..1c63805ecf 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -20,7 +20,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) & run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,& -& l_BS_magnetoelectric,l_BS_jdos +& l_BS_mespin,l_BS_meorb,l_BS_jdos use parallel_m, ONLY:master_cpu,CPU_structure use IO_int, ONLY:IO_and_Messaging_switch use linear_algebra, ONLY:INV,DIAGO @@ -114,7 +114,8 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) if (l_BS_dichroism) call K_Haydock(iq,W_bss,"dichroism",Xk) - if (l_BS_magnetoelectric) call K_Haydock(iq,W_bss,"magnetoelectric",Xk) + if (l_BS_mespin) call K_Haydock(iq,W_bss,"magnetoelectric_spin",Xk) + if (l_BS_meorb) call K_Haydock(iq,W_bss,"magnetoelectric_orbital",Xk) ! endif ! diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 9f0f260afa..487c344e75 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -12,7 +12,7 @@ subroutine DIPOLE_setup(Dip) & der_k_obs,specific_obs,eval_OVERLAPS use IO_m, ONLY:io_DIP use BS, ONLY:BSE_prop,l_BS_magnons,l_BS_dichroism,l_BS_photolum,& -& l_BS_magnetoelectric +& l_BS_mespin,l_BS_meorb use electrons, ONLY:n_spin,n_spinor use parser_m, ONLY:parser use stderr, ONLY:STRING_same,STRING_match @@ -47,7 +47,8 @@ subroutine DIPOLE_setup(Dip) l_BS_magnons= (index(BSE_prop,'magn')/=0) l_BS_dichroism= (index(BSE_prop,'dich')/=0) l_BS_photolum= (index(BSE_prop,'photolum')/=0) - l_BS_magnetoelectric= (index(BSE_prop,'ME')/=0) + l_BS_mespin= (index(BSE_prop,'MEspin')/=0) + l_BS_meorb= (index(BSE_prop,'MEorb')/=0) call parser('ImposeAsymBSE',l_flag) if(.not.l_flag) call parser('ImposeFullBSE',l_flag) ! @@ -57,7 +58,8 @@ subroutine DIPOLE_setup(Dip) & l_BS_magnons .or. & & l_BS_photolum .or. & & l_flag .or. & -& l_BS_magnetoelectric) then +& l_BS_mespin .or. & +& l_BS_meorb) then Dip%bands_ordered=.false. endif ! @@ -150,9 +152,9 @@ subroutine DIPOLE_setup(Dip) if (n_spin>1) then if (STRING_match(Dip%computed,"spin").or.& l_BS_magnons.or.& - l_BS_magnetoelectric) specific_obs=" M_spin" - !if (STRING_match(Dip%computed,"orb").and..not.l_BS_magnetoelectric) then - if (STRING_match(Dip%computed,"orb")) then + l_BS_mespin) specific_obs=" M_spin" + !if (STRING_match(Dip%computed,"orb")) then + if (STRING_match(Dip%computed,"orb").and..not.l_BS_meorb) then specific_obs=trim(specific_obs)//" M_orbRT M_it" endif #if defined _RT @@ -160,7 +162,7 @@ subroutine DIPOLE_setup(Dip) if (l_real_time) specific_obs=" M_spin M_orbRT M_it" #endif endif - if (l_BS_dichroism.or.l_BS_magnetoelectric) then + if (l_BS_dichroism.or.l_BS_meorb) then specific_obs=trim(specific_obs)//" M_orbCD" endif ! diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index 2593065e4c..fcc67a307c 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -65,7 +65,8 @@ module BS logical :: l_BS_optics logical :: l_BS_esort logical :: l_BS_esort_indx - logical :: l_BS_magnetoelectric + logical :: l_BS_mespin + logical :: l_BS_meorb ! ! Dimensions !============= @@ -322,10 +323,10 @@ subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) if(l_BS_magnons) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_mag,(2,nT,nDIP)) endif - if(l_BS_magnetoelectric) then + if(l_BS_mespin) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_spin,(BS_dip_size,nT,nDIP)) endif - if(l_BS_dichroism.or.l_BS_magnetoelectric) then + if(l_BS_dichroism.or.l_BS_meorb) then YAMBO_ALLOC(BS_T_grp(iT)%dipoles_dic,(BS_dip_size,nT,nDIP)) endif YAMBO_ALLOC(BS_T_grp(iT)%table,(nT,5)) @@ -363,10 +364,10 @@ subroutine BS_Blocks_and_Transitions_free() if (l_BS_magnons) then YAMBO_FREE(BS_T_grp(iT)%dipoles_mag) endif - if (l_BS_dichroism.or.l_BS_magnetoelectric) then + if (l_BS_dichroism.or.l_BS_meorb) then YAMBO_FREE(BS_T_grp(iT)%dipoles_dic) endif - if (l_BS_magnetoelectric) then + if (l_BS_mespin) then YAMBO_FREE(BS_T_grp(iT)%dipoles_spin) endif YAMBO_FREE(BS_T_grp(iT)%table) diff --git a/src/modules/mod_DICHROISM.F b/src/modules/mod_DICHROISM.F index fb217c603e..fa86538e88 100644 --- a/src/modules/mod_DICHROISM.F +++ b/src/modules/mod_DICHROISM.F @@ -12,13 +12,14 @@ module DICHROISM ! use pars, ONLY:SP - use BS, ONLY:l_BS_dichroism,l_BS_magnetoelectric + use BS, ONLY:l_BS_dichroism,l_BS_mespin,l_BS_meorb use y_memory_alloc ! implicit none ! complex(SP), allocatable :: BSS_dipoles_dich(:,:) - complex(SP), allocatable :: BSS_dipoles_me(:,:) + complex(SP), allocatable :: BSS_dipoles_mespin(:,:) + complex(SP), allocatable :: BSS_dipoles_meorb(:,:) ! contains ! @@ -35,17 +36,30 @@ subroutine BSS_DICH_free( ) YAMBO_FREE(BSS_dipoles_dich) end subroutine - subroutine BSS_ME_alloc( ) + subroutine BSS_MEspin_alloc( ) use pars, ONLY:cZERO use BS, ONLY:BS_dip_size,BS_H_dim - if (.not.l_BS_magnetoelectric) return - YAMBO_ALLOC(BSS_dipoles_me,(BS_dip_size,BS_H_dim)) - BSS_dipoles_me = cZERO + if (.not.l_BS_mespin) return + YAMBO_ALLOC(BSS_dipoles_mespin,(BS_dip_size,BS_H_dim)) + BSS_dipoles_mespin = cZERO end subroutine ! - subroutine BSS_ME_free( ) - if (.not.l_BS_magnetoelectric) return - YAMBO_FREE(BSS_dipoles_me) + subroutine BSS_MEspin_free( ) + if (.not.l_BS_mespin) return + YAMBO_FREE(BSS_dipoles_mespin) + end subroutine + ! + subroutine BSS_MEorb_alloc( ) + use pars, ONLY:cZERO + use BS, ONLY:BS_dip_size,BS_H_dim + if (.not.l_BS_meorb) return + YAMBO_ALLOC(BSS_dipoles_meorb,(BS_dip_size,BS_H_dim)) + BSS_dipoles_meorb = cZERO + end subroutine + ! + subroutine BSS_MEorb_free( ) + if (.not.l_BS_meorb) return + YAMBO_FREE(BSS_dipoles_meorb) end subroutine ! end module diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index d87b5cad3b..4735eeec48 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -15,7 +15,7 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) use PHOTOLUM, ONLY:PL use BS, ONLY:l_BS_kerr,l_BS_magnons,l_BS_dichroism,BS_K_coupling,& & l_BS_photolum,l_BS_abs,l_BS_jdos,l_BS_esort_indx,l_BS_esort,& -& l_BS_magnetoelectric +& l_BS_mespin,l_BS_meorb use BS_solvers, ONLY:l_abs_prop_chi_bse,l_eels_can_be_computed use stderr, ONLY:STRING_match,STRING_split,intc,STRING_remove use OUTPUT, ONLY:OUTPUT_driver @@ -56,8 +56,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) call ELEMENTAL_init(14,"CD","Dichroism","dichroism") call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") - call ELEMENTAL_init(17,"MEspin","Magnetoelectric (spin)","magnetoelectric") - call ELEMENTAL_init(18,"MEorb" ,"Magnetoelectric (orbital)","magnetoelectric") + call ELEMENTAL_init(17,"MEspin","Magnetoelectric (spin)", "magnetoelectric_spin") + call ELEMENTAL_init(18,"MEorb" ,"Magnetoelectric (orbital)","magnetoelectric_orbital") endif ! if (STRING_match(WHAT,"INIT")) then @@ -91,9 +91,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_magnons) call X_obs_onoff("+ Spm") if (l_BS_magnons.and.n_spinor==2) call X_obs_onoff("+ Smp") if (l_BS_dichroism) call X_obs_onoff("+ CD") - if (l_BS_magnetoelectric) then - call X_obs_onoff("+ MEspin") - call X_obs_onoff("+ MEorb") + if (l_BS_mespin) call X_obs_onoff("+ MEspin") + if (l_BS_meorb) call X_obs_onoff("+ MEorb") endif From 62dd292bda2ea248f3136b4a59c5c7353da3f757 Mon Sep 17 00:00:00 2001 From: thge123 Date: Thu, 2 Oct 2025 22:33:31 +0200 Subject: [PATCH 1156/1367] MEspin MEorb seperation --- src/allocations/X_ALLOC_elemental.F | 14 ++-- src/allocations/X_ALLOC_global.F | 15 ++-- src/bse/K_Haydock.F | 25 ++++--- src/bse/K_Haydock_response.F | 17 +++-- src/bse/K_IP.F | 5 +- .../K_components_folded_in_serial_arrays.F | 25 ++++--- src/bse/K_diago_driver.F | 70 +++++++++++-------- src/bse/K_diago_left_residuals.F | 20 +++--- src/bse/K_diago_response_functions.F | 61 ++++++++++------ src/bse/K_diago_right_residuals.F | 20 +++--- src/bse/K_solvers.F | 6 +- src/interface/INIT_load.F | 2 +- src/io/io_BSS_diago.F | 21 ++++-- src/modules/mod_BS_solvers.F | 6 +- src/modules/mod_MAGNETOELECTRIC.F | 37 ---------- src/modules/mod_X.F | 3 +- src/modules/mod_interfaces.F | 4 +- src/output/K_OUTPUT.F | 7 +- src/output/X_OUTPUT_driver.F | 5 +- 19 files changed, 198 insertions(+), 165 deletions(-) delete mode 100644 src/modules/mod_MAGNETOELECTRIC.F diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index b087f4404a..640ce9aaff 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -15,7 +15,7 @@ subroutine X_ALLOC_elemental(WHAT,DIM) ! use pars, ONLY:rZERO,cZERO use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Joint_DOS,BS_E_sorted,BS_E_sorted_indx, & -& Epsilon_ij,X_magnons,X_dichroism,ME_ij, & +& Epsilon_ij,X_magnons,X_dichroism,X_mespin,X_meorb,& & X_fxc,EEL,Alpha,X_mat,DEV_VAR(X_mat),X_drude_term,X_RLcomp_ig use PHOTOLUM, ONLY:PL use stderr, ONLY:STRING_match @@ -75,10 +75,14 @@ subroutine X_ALLOC_elemental(WHAT,DIM) if (allocated(X_mat)) return YAMBO_ALLOC(X_mat,(DIM(1),DIM(2),DIM(3))) X_mat=cZERO - case('ME') - if (allocated(ME_ij)) return - YAMBO_ALLOC(ME_ij,(DIM(1),DIM(2),DIM(3))) - ME_ij = cZERO + case('MEspin') + if (allocated(X_mespin)) return + YAMBO_ALLOC(X_mespin,(DIM(1),DIM(2))) + X_mespin = cZERO + case('MEorb') + if (allocated(X_meorb)) return + YAMBO_ALLOC(X_meorb,(DIM(1),DIM(2))) + X_meorb = cZERO #ifdef _GPU YAMBO_ALLOC_GPU_SOURCE(DEV_VAR(X_mat),X_mat) #endif diff --git a/src/allocations/X_ALLOC_global.F b/src/allocations/X_ALLOC_global.F index 9cf6e06ffe..85fffef618 100644 --- a/src/allocations/X_ALLOC_global.F +++ b/src/allocations/X_ALLOC_global.F @@ -14,7 +14,8 @@ subroutine X_ALLOC_global(WHAT,W) use pars, ONLY:cZERO use ALLOC, ONLY:X_ALLOC_elemental use X_m, ONLY:Resp_ii,Resp_ij,Epsilon_ii,Epsilon_ij,& -& Alpha,Joint_DOS,X_magnons,X_dichroism,EEL,X_do_obs,ME_ij +& Alpha,Joint_DOS,X_magnons,X_dichroism,EEL,X_do_obs,& +& X_mespin,X_meorb use frequency, ONLY:w_samp use drivers, ONLY:l_optics use BS_solvers, ONLY:B_Hall @@ -80,11 +81,13 @@ subroutine X_ALLOC_global(WHAT,W) if (X_do_obs("Esort")) call X_ALLOC_elemental("BS_E_SORTED",(/1000,9,2/)) if (X_do_obs("fxc")) call X_ALLOC_elemental("FXC",(/W%n_freqs/)) ! - if (X_do_obs("magnetoelectric")) then - call X_ALLOC_elemental("ME",(/W%n_freqs,2,4/)) - ME_ij(:,1,1)=W%p(:) - ME_ij(:,2,1)=W%p(:) - ME_ij=cZERO + if (X_do_obs("MEspin")) then + call X_ALLOC_elemental("MEspin",(/W%n_freqs,4/)) + X_mespin(:,1)=W%p(:) + endif + if (X_do_obs("MEorb")) then + call X_ALLOC_elemental("MEorb",(/W%n_freqs,4/)) + X_meorb(:,1)=W%p(:) endif else if (WHAT=="FREE") then call X_ALLOC_elemental("FREE ALL") diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 71c59676b5..dc363dd8f1 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -90,7 +90,10 @@ subroutine K_Haydock(iq,W,OBS,Xk) use_left_and_right=.false. scheme="hermitian" if(BS_K_Coupling.or.impose_pseudo_herm_scheme) scheme="pseudo-herm" - use_left_and_right=trim(OBS)=="kerr".or.trim(OBS)=="dichroism".or.trim(OBS)=="magnetoelectric" + use_left_and_right=trim(OBS)=="kerr".or.& +& trim(OBS)=="dichroism".or.& +& trim(OBS)=="mespin".or.& +& trim(OBS)=="meorb" velocity_correction= trim(global_gauge)=="velocity" .and. (trim(OBS)=="optics" .or. trim(OBS)=="kerr") ! if (isec(2)/=0) sec="=" @@ -232,12 +235,13 @@ subroutine K_Haydock(iq,W,OBS,Xk) do i_g=1,BS_nT_grps if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) - if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP - if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) - if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) - if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) - if (trim(OBS)=="magnetoelectric") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_spin(1,:,1) - if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) + if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP + if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) + if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) + if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) + if (trim(OBS)=="mespin") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_spin(1,:,1) + if (trim(OBS)=="meorb") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) + if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) V0(i_g)%fragment(:,i_ColFG) = V0(i_g)%fragment(:,i_ColFG)*sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP)) enddo ! @@ -275,8 +279,11 @@ subroutine K_Haydock(iq,W,OBS,Xk) if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) if (trim(OBS)=="kerr") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) - if (trim(OBS)=="dichroism") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm - if (trim(OBS)=="magnetoelectric") W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm + if (trim(OBS)=="dichroism".or.& +& trim(OBS)=="mespin".or.& +& trim(OBS)=="meorb") then + W0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1)/q0_def_norm + endif W0(i_g)%fragment(:,i_ColFG) = W0(i_g)%fragment(:,i_ColFG)*(sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP))) enddo if(velocity_correction) V_tmp(i_g)%fragment = W0(i_g)%fragment/BS_T_grp(i_g)%E diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index 7c72c56303..97a0423253 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -10,7 +10,7 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh use pars, ONLY:SP,cZERO,cONE,cI,pi use units, ONLY:SPEED_OF_LIGHT use X_m, ONLY:Resp_ii,Joint_DOS,global_gauge, & -& X_magnons,Resp_ij,X_dichroism,ME_ij,i_G_shift +& X_magnons,Resp_ij,X_dichroism,X_mespin,X_meorb,i_G_shift use R_lattice, ONLY:bare_qpg use frequency, ONLY:w_samp use BS, ONLY:BSE_mode @@ -226,8 +226,10 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh X_magnons(iw,1,i_resp(:))=-X_o(1:2,1)*Co/(4._SP*pi) case("dichroism") X_dichroism(iw,i_resp(:))=-X_o(1:2,1)*Co/(4._SP*pi)*(cI/SPEED_OF_LIGHT) - case("magnetoelectric") - ME_ij(iw,1,i_resp(:))=-X_o(1:2,1)*(-1._SP*Co)/(8._SP*pi) + case("mespin") + X_mespin(iw,i_resp(:))=-X_o(1:2,1)*(-1._SP*Co)/(8._SP*pi) + case("meorb") + X_mespin(iw,i_resp(:))=-X_o(1:2,1)*(-1._SP*Co)/(8._SP*pi) end select ! enddo @@ -250,9 +252,12 @@ subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_thresh case("dichroism") sums=(X_dichroism(iw,2)+X_dichroism(iw,4))/2._SP diff= X_dichroism(iw,2)-X_dichroism(iw,4) - case("magnetoelectric") - sums=(ME_ij(iw,1,2)+ME_ij(iw,1,4))/2._SP - diff= ME_ij(iw,1,2)-ME_ij(iw,1,4) + case("mespin") + sums=(X_mespin(iw,2)+X_mespin(iw,4))/2._SP + diff= X_mespin(iw,2)-X_mespin(iw,4) + case("meorb") + sums=(X_meorb(iw,2)+X_meorb(iw,4))/2._SP + diff= X_meorb(iw,2)-X_meorb(iw,4) end select ! update_thresh = abs(real(sums))>0._SP .and. abs(aimag(sums))>0._SP diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 8c66f6f3b2..06ff941ae2 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -360,7 +360,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (l_BS_meorb) then X_meorb(:,3)=X_meorb(:,3)-res_meorb/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then - X_meorb(:,3)=X_meorb(:,2,3)+conjg(res_meorb)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) + X_meorb(:,3)=X_meorb(:,3)+conjg(res_meorb)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) endif endif enddo @@ -461,7 +461,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if (l_BS_meorb) X_meorb(:,3)=X_meorb(:,3)*(-1._SP*Co_factor/(8._SP*pi)) ! - if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism magnetoelectric") + if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism & +& mespin meorb") call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") ! ! Clean diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 983b157b74..2fe69409ad 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -17,12 +17,12 @@ subroutine K_components_folded_in_serial_arrays(iq) use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& & BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& -& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_magnetoelectric,& +& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_mespin,l_BS_meorb,& & l_BS_photolum,BS_dip_size,BS_H_dim,l_BS_ares_from_res use timing_m, ONLY:timing use LIVE_t, ONLY:live_timing use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc,BSS_dipoles_me,BSS_ME_alloc + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc,BSS_dipoles_mespin,BSS_MEspin_alloc,BSS_dipoles_meorb,BSS_MEorb_alloc use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_alloc,BSS_PL_f,PL_weights use timing_m, ONLY:timing ! @@ -49,7 +49,8 @@ subroutine K_components_folded_in_serial_arrays(iq) call BSS_alloc( ) call BSS_MAGN_alloc( ) call BSS_DICH_alloc( ) - call BSS_ME_alloc( ) + call BSS_MEspin_alloc( ) + call BSS_MEorb_alloc( ) call BSS_PL_alloc( ) ! if (BS_nT_grps>0) call live_timing("Unfolding BSE components",PAR_IND_T_groups%n_of_elements(PAR_COM_eh_INDEX%CPU_id+1)) @@ -108,10 +109,9 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) ! - if (l_BS_magnetoelectric) then - BSS_dipoles_me(1,H_pos)=BS_T_grp(i_g)%dipoles_spin(1,i_Tr,i_res_ares_solver) - BSS_dipoles_me(2,H_pos)=BS_T_grp(i_g)%dipoles_dic(1,i_Tr,i_res_ares_solver) - endif + if (l_BS_mespin) BSS_dipoles_mespin(:,H_pos)=BS_T_grp(i_g)%dipoles_spin(:,i_Tr,i_res_ares_solver) + ! + if (l_BS_meorb) BSS_dipoles_meorb(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) ! if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:BS_dip_size) ! @@ -162,9 +162,14 @@ subroutine K_components_folded_in_serial_arrays(iq) call PP_redux_wait(BSS_dipoles_dich,COMM=PAR_COM_eh_INDEX%COMM) endif ! - if (l_BS_magnetoelectric) then - call PP_redux_wait(BSS_dipoles_me,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) - call PP_redux_wait(BSS_dipoles_me,COMM=PAR_COM_eh_INDEX%COMM) + if (l_BS_mespin) then + call PP_redux_wait(BSS_dipoles_mespin,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait(BSS_dipoles_mespin,COMM=PAR_COM_eh_INDEX%COMM) + endif + ! + if (l_BS_meorb) then + call PP_redux_wait(BSS_dipoles_meorb,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) + call PP_redux_wait(BSS_dipoles_meorb,COMM=PAR_COM_eh_INDEX%COMM) endif ! if (l_BS_photolum) then diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index f3d119dcd5..828437cc2c 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -30,7 +30,7 @@ subroutine K_diago_driver(iq,W,X_static) use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& & BS_res_ares_n_mat,l_BS_ares_from_res,& & l_BS_abs,l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum,l_BS_dichroism,& -& l_BS_magnetoelectric +& l_BS_mespin,l_BS_meorb use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize_only,BSS_resize_and_save,BSS_n_eig_Input, & & BSS_write_eig_2_db,BSS_eh_W,BSS_n_eig,BS_E,BSS_slepc_pseudo_herm,write_bs_ev_par,& & BSS_ldiago_solver,BSS_first_eig,BSS_target_E,BSS_trange_E,BSS_er,BSS_slepc_precondition @@ -102,10 +102,11 @@ subroutine K_diago_driver(iq,W,X_static) ! real(SP), pointer :: BS_R_PL(:,:) => null() ! - complex(SP),pointer :: BS_R_left_kerr(:) => null() - complex(SP),pointer :: BS_R_right_kerr(:) => null() - complex(SP),pointer :: BS_R_right_dich(:,:) => null() - complex(SP),pointer :: BS_R_right_me(:,:) => null() + complex(SP),pointer :: BS_R_left_kerr(:) => null() + complex(SP),pointer :: BS_R_right_kerr(:) => null() + complex(SP),pointer :: BS_R_right_dich(:,:) => null() + complex(SP),pointer :: BS_R_right_mespin(:,:) => null() + complex(SP),pointer :: BS_R_right_meorb(:,:) => null() ! complex(SP),pointer :: BS_R_left_magn(:,:) => null() complex(SP),pointer :: BS_R_right_magn(:,:) => null() @@ -117,7 +118,7 @@ subroutine K_diago_driver(iq,W,X_static) integer :: io_err,ID type(X_t),intent(in) :: X_static ! - l_abs_res =l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_magnetoelectric + l_abs_res =l_BS_abs.or.l_BS_kerr.or.l_BS_dichroism.or.l_BS_mespin.or.l_BS_meorb l_kerr_lft=l_BS_kerr_asymm.or.l_BS_dichroism l_kerr_rgt=l_BS_kerr .or.l_BS_dichroism ! @@ -182,7 +183,7 @@ subroutine K_diago_driver(iq,W,X_static) call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/1,2/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& - & BS_R_right_me,BS_R_PL) + & BS_R_right_mespin,BS_R_right_meorb,BS_R_PL) ! ! Kernel and/or BSS components loading !====================================== @@ -348,11 +349,18 @@ subroutine K_diago_driver(iq,W,X_static) BS_R_right_dich(:,2) = tmp_res_ptr endif ! - if(l_BS_magnetoelectric) then - call K_diago_R_res("me1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) - BS_R_right_me(:,1) = tmp_res_ptr - call K_diago_R_res("me2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) - BS_R_right_me(:,2) = tmp_res_ptr + if(l_BS_mespin) then + call K_diago_R_res("mespin1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_mespin(:,1) = tmp_res_ptr + call K_diago_R_res("mespin2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_mespin(:,2) = tmp_res_ptr + endif + ! + if(l_BS_meorb) then + call K_diago_R_res("meorb1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_meorb(:,1) = tmp_res_ptr + call K_diago_R_res("meorb2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,tmp_res_ptr,BS_V_right) + BS_R_right_meorb(:,2) = tmp_res_ptr endif ! if(l_BS_magnons) then @@ -426,7 +434,7 @@ subroutine K_diago_driver(iq,W,X_static) !========================================= call K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& - & BS_R_right_me,BS_R_PL) + & BS_R_right_mespin,BS_R_right_meorb,BS_R_PL) ! ! Diagonalization DB (OUT) !========================== @@ -435,7 +443,7 @@ subroutine K_diago_driver(iq,W,X_static) call io_control(ACTION=OP_WR_CL,COM=REP,MODE=VERIFY,SEC=(/1,2,3/),ID=ID) io_err=io_BSS_diago(iq,i_BS_mat,ID,X_static,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& - & BS_R_right_me,BS_R_PL,& + & BS_R_right_mespin,BS_R_right_meorb,BS_R_PL,& & BS_mat=BS_V_right,write_ev=.not.l_ldiago) ! call PP_wait() @@ -487,8 +495,11 @@ subroutine local_alloc(what) if (l_BS_dichroism) then YAMBO_ALLOC_P(BS_R_right_dich,(BSS_n_eig,2)) endif - if (l_BS_magnetoelectric) then - YAMBO_ALLOC_P(BS_R_right_me,(BSS_n_eig,2)) + if (l_BS_mespin) then + YAMBO_ALLOC_P(BS_R_right_mespin,(BSS_n_eig,2)) + endif + if (l_BS_meorb) then + YAMBO_ALLOC_P(BS_R_right_meorb,(BSS_n_eig,2)) endif if (l_BS_magnons) then YAMBO_ALLOC_P(BS_R_left_magn,(BSS_n_eig,2)) @@ -534,7 +545,8 @@ subroutine local_free() YAMBO_FREE_P(BS_R_right_kerr) YAMBO_FREE_P(BS_R_left_kerr) YAMBO_FREE_P(BS_R_right_dich) - YAMBO_FREE_P(BS_R_right_me) + YAMBO_FREE_P(BS_R_right_mespin) + YAMBO_FREE_P(BS_R_right_meorb) YAMBO_FREE_P(BS_R_right_magn) YAMBO_FREE_P(BS_R_left_magn) YAMBO_FREE_P(BS_R_PL) @@ -551,10 +563,11 @@ subroutine K_ldiago_resize_variables() if(associated(BS_R_left_abs) ) call BSS_resize_only(BS_R_left_abs) if(associated(BS_R_right_abs)) call BSS_resize_only(BS_R_right_abs) ! - if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) - if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) - if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) - if(associated(BS_R_right_me)) call BSS_resize_only(BS_R_right_me) + if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) + if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) + if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) + if(associated(BS_R_right_mespin)) call BSS_resize_only(BS_R_right_mespin) + if(associated(BS_R_right_meorb)) call BSS_resize_only(BS_R_right_meorb) if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) @@ -574,13 +587,14 @@ subroutine K_slepc_resize_variables() if(associated(BS_R_left_abs) ) call BSS_resize_only(BS_R_left_abs) if(associated(BS_R_right_abs)) call BSS_resize_only(BS_R_right_abs) ! - if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) - if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) - if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) - if(associated(BS_R_right_me)) call BSS_resize_only(BS_R_right_me) - if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) - if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) - if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) + if(associated(BS_R_left_kerr) ) call BSS_resize_only(BS_R_left_kerr) + if(associated(BS_R_right_kerr)) call BSS_resize_only(BS_R_right_kerr) + if(associated(BS_R_right_dich)) call BSS_resize_only(BS_R_right_dich) + if(associated(BS_R_right_mespin)) call BSS_resize_only(BS_R_right_mespin) + if(associated(BS_R_right_meorb)) call BSS_resize_only(BS_R_right_meorb) + if(associated(BS_R_left_magn) ) call BSS_resize_only(BS_R_left_magn) + if(associated(BS_R_right_magn)) call BSS_resize_only(BS_R_right_magn) + if(associated(BS_R_PL) ) call BSS_resize_only(BS_R_PL) ! if(allocated(BS_V_left)) call BSS_resize_and_save(BS_V_left) if(allocated(BS_V_right)) call BSS_resize_and_save(BS_V_right) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index 24ca0afb00..ca89832a8c 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -27,7 +27,7 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & & l_BS_res_from_E,BS_not_const_eh_f use BS_solvers, ONLY:BSS_dipoles_opt,BSS_eh_E,BSS_eh_Z,BSS_eh_f use MAGNONS, ONLY:BSS_dipoles_magn - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_me + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_mespin,BSS_dipoles_meorb ! implicit none ! @@ -108,14 +108,16 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & ! call live_timing(trim(mode)//' residuals ',n_steps) ! - if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) - if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) - if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) - if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) - if(trim(mode)=="me1") tmp_res=BSS_dipoles_me(1,res_range(1):res_range(2)) - if(trim(mode)=="me2") tmp_res=BSS_dipoles_me(2,res_range(1):res_range(2)) - if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) - if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="mespin1") tmp_res=BSS_dipoles_mespin(1,res_range(1):res_range(2)) + if(trim(mode)=="mespin2") tmp_res=BSS_dipoles_mespin(2,res_range(1):res_range(2)) + if(trim(mode)=="meorb1") tmp_res=BSS_dipoles_mespin(1,res_range(1):res_range(2)) + if(trim(mode)=="meorb2") tmp_res=BSS_dipoles_mespin(2,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) ! tmp_res = tmp_res*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 5820139c11..c4b0febdbd 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -6,8 +6,8 @@ ! Authors (see AUTHORS file for details): DS AM MG ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& - & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich, & - & BS_R_right_me,BS_R_PL) + & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& + & BS_R_right_mespin,BS_R_right_meorb,BS_R_PL) ! ! eps2(iw)= 1 - Sum [BS_R_left(i)*BS_R_right(i)] / [w+i*eta - E(i)] ! @@ -27,10 +27,10 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ use units, ONLY:HA2EV use vec_operate, ONLY:degeneration_finder,sort use BS_solvers, ONLY:B_Hall,para_term_w0 - use X_m, ONLY:Resp_ij,X_magnons,X_dichroism,ME_ij + use X_m, ONLY:Resp_ij,X_magnons,X_dichroism,X_mespin,X_meorb use PHOTOLUM, ONLY:PL,PL_prefactor use BS, ONLY:l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum,& -& l_BS_dichroism,l_BS_magnetoelectric +& l_BS_dichroism,l_BS_mespin,l_BS_meorb ! implicit none ! @@ -40,8 +40,9 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ complex(SP), pointer, intent(in) :: BS_R_left_abs(:),BS_R_right_abs(:) real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) - complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),& - & BS_R_right_dich(:,:),BS_R_right_me(:,:) + complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),& + & BS_R_right_kerr(:),BS_R_right_dich(:,:),& + & BS_R_right_mespin(:,:),BS_R_right_meorb(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) ! ! Work space @@ -52,7 +53,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ real(SP), allocatable :: vtmpR(:) complex(SP), allocatable :: BS_E_sorted_tmp(:,:) integer, allocatable :: sort_indx(:),first_exc(:),n_of_exc(:) - complex(SP) :: g_fac,res_kerr,res_dich,res_me(2),res_magn(2),res_pl(2) + complex(SP) :: g_fac,res_kerr,res_dich,res_mespin,res_meorb,res_magn(2),res_pl(2) logical :: l_ADD_the_ARES_using_the_RES ! n_SOC=1 @@ -70,7 +71,8 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ if(l_BS_abs) nVAR=nVAR+1 if(l_BS_kerr) nVAR=nVAR+1 if(l_BS_dichroism) nVAR=nVAR+1 - if(l_BS_magnetoelectric) nVAR=nVAR+2 + if(l_BS_mespin) nVAR=nVAR+1 + if(l_BS_meorb) nVAR=nVAR+1 if(l_BS_magnons) nVAR=nVAR+n_spinor allocate(BS_E_sorted_tmp(EDIM,nVAR)) BS_E_sorted_tmp=cZERO @@ -102,9 +104,11 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ res_dich=(BS_R_left_abs(i1)*BS_R_right_dich(i1,1)+BS_R_left_kerr(i1)*BS_R_right_dich(i1,2)) res_dich=res_dich*ares_fac/q0_def_norm/2._SP endif - if(l_BS_magnetoelectric) then - res_me(1)=BS_R_left_abs(i1)*BS_R_right_me(i1,1)*ares_fac/q0_def_norm - res_me(2)=BS_R_left_abs(i1)*BS_R_right_me(i1,2)*ares_fac/q0_def_norm + if(l_BS_mespin) then + res_mespin=BS_R_left_abs(i1)*BS_R_right_mespin(i1,1)*ares_fac/q0_def_norm + endif + if(l_BS_meorb) then + res_meorb=BS_R_left_abs(i1)*BS_R_right_meorb(i1,1)*ares_fac/q0_def_norm endif if(l_BS_magnons) then res_magn(1)=BS_R_left_magn(i1,1)*BS_R_right_magn(i1,1)*ares_fac @@ -166,16 +170,25 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ endif endif ! - if(l_BS_magnetoelectric) then + if(l_BS_mespin) then + if(l_BS_esort.and.i_BS_mat==1) then + BS_E_sorted_tmp(i1,nVAR+2:nVAR+2)=res_mespin + nVAR=nVAR+1 + endif + X_mespin(:,2)=X_mespin(:,2)-res_mespin/(W%p(:)-EXC_E(i_pert_SOC)) + if (l_ADD_the_ARES_using_the_RES) then + X_mespin(:,2)=X_mespin(:,2)+conjg(res_mespin)/(W%p(:)+conjg(EXC_E(i_pert_SOC))) + endif + endif + ! + if(l_BS_meorb) then if(l_BS_esort.and.i_BS_mat==1) then - BS_E_sorted_tmp(i1,nVAR+2:nVAR+2)=res_me(:2) - nVAR=nVAR+2 + BS_E_sorted_tmp(i1,nVAR+2:nVAR+2)=res_mespin + nVAR=nVAR+1 endif - ME_ij(:,1,2)=ME_ij(:,1,2)-res_me(1)/(W%p(:)-EXC_E(i_pert_SOC)) - ME_ij(:,2,2)=ME_ij(:,2,2)-res_me(2)/(W%p(:)-EXC_E(i_pert_SOC)) + X_meorb(:,2)=X_meorb(:,2)-res_meorb/(W%p(:)-EXC_E(i_pert_SOC)) if (l_ADD_the_ARES_using_the_RES) then - ME_ij(:,1,2)=ME_ij(:,1,2)+conjg(res_me(1))/(W%p(:)+conjg(EXC_E(i_pert_SOC))) - ME_ij(:,2,2)=ME_ij(:,2,2)+conjg(res_me(2))/(W%p(:)+conjg(EXC_E(i_pert_SOC))) + X_meorb(:,2)=X_meorb(:,2)+conjg(res_meorb)/(W%p(:)+conjg(EXC_E(i_pert_SOC))) endif endif ! @@ -262,8 +275,12 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ call PP_redux_wait(X_dichroism(:,2)) endif ! - if(l_BS_magnetoelectric) then - call PP_redux_wait(ME_ij(:,:,2)) + if(l_BS_mespin) then + call PP_redux_wait(X_mespin(:,2)) + endif + ! + if(l_BS_meorb) then + call PP_redux_wait(X_meorb(:,2)) endif ! if(l_BS_magnons) then @@ -289,7 +306,9 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ ! Factors to be fixed if (l_BS_dichroism) X_dichroism(:,2)=X_dichroism(:,2)*(cI/SPEED_OF_LIGHT)*Co_factor/(4._SP*pi) ! - if (l_BS_magnetoelectric) ME_ij(:,:,2)=ME_ij(:,:,2)*(-1._SP*Co_factor/(8._SP*pi)) + if (l_BS_mespin) X_mespin(:,2)=X_mespin(:,2)*(-1._SP*Co_factor/(8._SP*pi)) + ! + if (l_BS_meorb) X_meorb(:,2)=X_meorb(:,2)*(-1._SP*Co_factor/(8._SP*pi)) ! if (l_BS_magnons) X_magnons(:,:,2)=X_magnons(:,:,2)*Co_factor/(4._SP*pi) ! diff --git a/src/bse/K_diago_right_residuals.F b/src/bse/K_diago_right_residuals.F index 1ed80bee8c..1f83031b34 100644 --- a/src/bse/K_diago_right_residuals.F +++ b/src/bse/K_diago_right_residuals.F @@ -26,7 +26,7 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& & l_BS_res_from_E,BS_not_const_eh_f use MAGNONS, ONLY:BSS_dipoles_magn - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_me + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_mespin,BSS_dipoles_meorb ! implicit none ! @@ -97,14 +97,16 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! call live_timing(trim(mode)//' residuals ',n_steps) ! - if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) - if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) - if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) - if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) - if(trim(mode)=="me1") tmp_res=BSS_dipoles_me(1,res_range(1):res_range(2)) - if(trim(mode)=="me2") tmp_res=BSS_dipoles_me(2,res_range(1):res_range(2)) - if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) - if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="mespin1") tmp_res=BSS_dipoles_mespin(1,res_range(1):res_range(2)) + if(trim(mode)=="mespin2") tmp_res=BSS_dipoles_mespin(2,res_range(1):res_range(2)) + if(trim(mode)=="meorb1") tmp_res=BSS_dipoles_meorb(1,res_range(1):res_range(2)) + if(trim(mode)=="meorb2") tmp_res=BSS_dipoles_meorb(2,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) ! tmp_res = conjg(tmp_res)*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 1c63805ecf..9a2f3eb23e 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -26,7 +26,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use linear_algebra, ONLY:INV,DIAGO use PHOTOLUM, ONLY:BSS_PL_free use MAGNONS, ONLY:BSS_MAGN_free - use DICHROISM, ONLY:BSS_DICH_free,BSS_ME_free + use DICHROISM, ONLY:BSS_DICH_free,BSS_MEspin_free,BSS_MEorb_free use y_memory_alloc ! implicit none @@ -114,8 +114,8 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) if (l_BS_kerr) call K_Haydock(iq,W_bss,"kerr",Xk) if (l_BS_magnons) call K_Haydock(iq,W_bss,"magnons",Xk) if (l_BS_dichroism) call K_Haydock(iq,W_bss,"dichroism",Xk) - if (l_BS_mespin) call K_Haydock(iq,W_bss,"magnetoelectric_spin",Xk) - if (l_BS_meorb) call K_Haydock(iq,W_bss,"magnetoelectric_orbital",Xk) + if (l_BS_mespin) call K_Haydock(iq,W_bss,"mespin",Xk) + if (l_BS_meorb) call K_Haydock(iq,W_bss,"meorb",Xk) ! endif ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index f7abcdb4c1..d4342b6d5c 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -310,7 +310,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'NoCondSumRule' ,'[BSE/X] Do not impose the conductivity sum rule in velocity gauge',verb_level=V_resp) call it('f',defs,'MetDamp' , '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp) call it(defs,'BSSmod', '[BSS] (h)aydock/(d)iagonalization/(s)lepc/(i)nversion/(t)ddft`',BSS_mode,protect=.FALSE.) - call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt/ME',BSE_prop) + call it(defs,'BSEprop', '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt/MEspin/MEorb',BSE_prop) call it(defs,'BSEdips', '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry) call it(defs,'BSSldiaLib','[BSS] Library used with ldiago solver `(s)calapack/(e)lpa`',BSS_ldiago_solver) call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode) diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index f6fbb1525b..d774cca5bf 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -6,8 +6,8 @@ ! Authors (see AUTHORS file for details): AM DS NM ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& -& bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_me,bsR_pl,& -& BS_mat,write_ev) +& bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,& +& bsR_mespin,bsR_meorb,bsR_pl,BS_mat,write_ev) ! use pars, ONLY:SP,schlen,IP use stderr, ONLY:intc @@ -26,7 +26,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) , optional :: bsE(:) real(SP) ,pointer, optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_me(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_mespin(:,:),bsR_meorb(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) complex(SP) , optional :: BS_mat(:,:) logical, optional :: write_ev ! @@ -142,10 +142,17 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& endif endif ! - if(present(bsR_me)) then - if(associated(bsR_me)) then - call io_bulk(ID,'BS_ME_Residuals',VAR_SZ=(/2,BSS_n_eig,2/)) - call io_bulk(ID,C2=bsR_me) + if(present(bsR_mespin)) then + if(associated(bsR_mespin)) then + call io_bulk(ID,'BS_MEspin_Residuals',VAR_SZ=(/2,BSS_n_eig,2/)) + call io_bulk(ID,C2=bsR_mespin) + endif + endif + ! + if(present(bsR_meorb)) then + if(associated(bsR_meorb)) then + call io_bulk(ID,'BS_MEorb_Residuals',VAR_SZ=(/2,BSS_n_eig,2/)) + call io_bulk(ID,C2=bsR_meorb) endif endif ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 2a00701de3..850aba8dda 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -169,8 +169,8 @@ integer function variables_BS(ID,iq,local_desc,CLOSE_the_menu,X) end function ! integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& - & bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,bsR_me,& - & bsR_pl,BS_mat,write_ev) + & bsL_magn,bsR_magn,bsL_kerr,bsR_kerr,bsR_dich,& + & bsR_mespin,bsR_meorb,bsR_pl,BS_mat,write_ev) use pars, ONLY:SP use X_m, ONLY:X_t implicit none @@ -178,7 +178,7 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) ,optional :: bsE(:) real(SP), pointer,optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_me(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_mespin(:,:),bsR_meorb(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) complex(SP) ,optional :: BS_mat(:,:) logical, optional :: write_ev end function diff --git a/src/modules/mod_MAGNETOELECTRIC.F b/src/modules/mod_MAGNETOELECTRIC.F deleted file mode 100644 index 829ad13828..0000000000 --- a/src/modules/mod_MAGNETOELECTRIC.F +++ /dev/null @@ -1,37 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2011 The Yambo Team -! -! Authors (see AUTHORS file for details): TG DS -! -! headers -! -#include -! -module MAGNETOELECTRIC - ! - use pars, ONLY:SP - use BS, ONLY:l_BS_magnetoelectric - use y_memory_alloc - ! - implicit none - ! - complex(SP), allocatable :: BSS_dipoles_me(:,:) - ! - contains - ! - subroutine BSS_ME_alloc( ) - use pars, ONLY:cZERO - use BS, ONLY:BS_dip_size,BS_H_dim - if (.not.l_BS_magnetoelectric) return - YAMBO_ALLOC(BSS_dipoles_me,(BS_dip_size,BS_H_dim)) - BSS_dipoles_me = cZERO - end subroutine - ! - subroutine BSS_ME_free( ) - if (.not.l_BS_magnetoelectric) return - YAMBO_FREE(BSS_dipoles_me) - end subroutine - ! -end module diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index 89d295850b..a6282b25bc 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -80,7 +80,8 @@ module X_m complex(SP), allocatable :: X_fxc(:) complex(SP), allocatable :: X_magnons(:,:,:) complex(SP), allocatable :: X_dichroism(:,:) - complex(SP), allocatable :: ME_ij(:,:,:) + complex(SP), allocatable :: X_mespin(:,:) + complex(SP), allocatable :: X_meorb(:,:) ! ! Response function ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index d8f072d613..d3c254a88e 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -232,7 +232,7 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,N_f,N_m,I_dir,E_k_dir,E_k_ind) ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& - & BS_R_right_me,BS_R_PL) + & BS_R_right_mespin,BS_R_right_meorb,BS_R_PL) use BS_solvers, ONLY:BSS_n_eig use pars, ONLY:SP use frequency, ONLY:w_samp @@ -243,7 +243,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ real(SP), pointer, intent(in) :: BS_E_SOC_corr(:,:) complex(SP), pointer, intent(in) :: BS_R_left_magn(:,:),BS_R_right_magn(:,:) complex(SP), pointer, intent(in) :: BS_R_left_kerr(:),BS_R_right_kerr(:),BS_R_right_dich(:,:), & - & BS_R_right_me(:,:) + & BS_R_right_mespin(:,:),BS_R_right_meorb(:,:) real(SP), pointer, intent(in) :: BS_R_PL(:,:) end subroutine ! diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 6f1696f1df..b46a68f7a5 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -19,7 +19,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) use X_m, ONLY:Epsilon_ii,eps_2_alpha,X_OUTPUT_driver,Epsilon_ij,& & X_do_obs,X_OUTPUT_messages,X_dichroism,Joint_DOS,BS_E_sorted,N_BS_E_sorted,& & BS_E_sorted_indx,X_magnons,i_G_shift,Q_plus_G_pt,Q_plus_G_sq_modulus,& -& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge,ME_ij +& Resp_ii,Resp_ij,l_drude,skip_cond_sum_rule,X_drude_term,global_gauge,& +& X_mespin,X_meorb use com, ONLY:msg,com_compose_msg use R_lattice, ONLY:bare_qpg,FineGd_desc,nkbz use electrons, ONLY:spin_occ @@ -312,8 +313,8 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! MAGNETOELECTRIC !------------ -if (X_do_obs("MEspin")) call ELEMENTAL_dump("MEspin", ME_ij(:,1,2:)) -if (X_do_obs("MEorb")) call ELEMENTAL_dump("MEorb", ME_ij(:,2,2:)) +if (X_do_obs("MEspin")) call ELEMENTAL_dump("MEspin", X_mespin(:,2:)) +if (X_do_obs("MEorb")) call ELEMENTAL_dump("MEorb", X_meorb(:,2:)) if (STRING_match(WHAT,"close")) call X_OUTPUT_driver("close "//OBS) diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 4735eeec48..0dfe8a73e4 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -56,8 +56,8 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) call ELEMENTAL_init(14,"CD","Dichroism","dichroism") call ELEMENTAL_init(15,"Spm","Magnons (S+-)","magnons") call ELEMENTAL_init(16,"Smp","Magnons (S-p)","magnons") - call ELEMENTAL_init(17,"MEspin","Magnetoelectric (spin)", "magnetoelectric_spin") - call ELEMENTAL_init(18,"MEorb" ,"Magnetoelectric (orbital)","magnetoelectric_orbital") + call ELEMENTAL_init(17,"MEspin","Magnetoelectric (spin)", "mespin") + call ELEMENTAL_init(18,"MEorb" ,"Magnetoelectric (orbital)","meorb") endif ! if (STRING_match(WHAT,"INIT")) then @@ -93,7 +93,6 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_dichroism) call X_obs_onoff("+ CD") if (l_BS_mespin) call X_obs_onoff("+ MEspin") if (l_BS_meorb) call X_obs_onoff("+ MEorb") - endif ! From cd5a87362d167453687428a71c279fef8d875e3b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 3 Oct 2025 13:04:46 +0200 Subject: [PATCH 1157/1367] Version 5.3.0, Revision 25684, Hash ca099d3df MODIFIED * configure include/version/version.m4 lib/petsc/Makefile.loc lib/slepc/Makefile.loc Bugs: - Additions: - Changes: -Also slepc and petsc compile in parallel if -j$n flag is present Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 2 +- lib/slepc/Makefile.loc | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 10950c8d38..09a198cc10 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25672 h.269a67f7c2. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25685 h.ca099d3df. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25672 h.269a67f7c2' -PACKAGE_STRING='Yambo 5.3.0 r.25672 h.269a67f7c2' +PACKAGE_VERSION='5.3.0 r.25685 h.ca099d3df' +PACKAGE_STRING='Yambo 5.3.0 r.25685 h.ca099d3df' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25672 h.269a67f7c2 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25685 h.ca099d3df to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25672 h.269a67f7c2:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25685 h.ca099d3df:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25672 h.269a67f7c2 +Yambo configure 5.3.0 r.25685 h.ca099d3df generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25672 h.269a67f7c2, which was +It was created by Yambo $as_me 5.3.0 r.25685 h.ca099d3df, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25672" -SHASH="269a67f7c2" +SREVISION="25685" +SHASH="ca099d3df" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25672 h.269a67f7c2, which was +This file was extended by Yambo $as_me 5.3.0 r.25685 h.ca099d3df, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25672 h.269a67f7c2 +Yambo config.status 5.3.0 r.25685 h.ca099d3df configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 61ccdf4e99..4664883ad5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25672 h.269a67f7c2, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25685 h.ca099d3df, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25672" -SHASH="269a67f7c2" +SREVISION="25685" +SHASH="ca099d3df" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 6604c44ef2..5ca6a5eb25 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -62,7 +62,7 @@ configure: uncompress compile: uncompress configure @if test -d $(PACKAGE) && ! test -f compiled.stamp ; then \ echo "\t[$(PACKAGE)] compilation"; \ - ( cd $(PACKAGE); $(make) -j1 PETSC_DIR=$(PWD)/$(PACKAGE) PETSC_ARCH=$(PETSC_ARCH) >> ${compdir}/log/compile_$(PACKAGE).log 2>&1 ) ; \ + ( cd $(PACKAGE); $(make) $(MAKEFLAGS) PETSC_DIR=$(PWD)/$(PACKAGE) PETSC_ARCH=$(PETSC_ARCH) >> ${compdir}/log/compile_$(PACKAGE).log 2>&1 ) ; \ touch compiled.stamp; \ fi diff --git a/lib/slepc/Makefile.loc b/lib/slepc/Makefile.loc index 1bca1a5f14..307af6a873 100644 --- a/lib/slepc/Makefile.loc +++ b/lib/slepc/Makefile.loc @@ -50,14 +50,14 @@ configure: uncompress compile: uncompress configure @if test -e $(PACKAGE) && ! test -f compiled.stamp ; then \ echo "\t[$(PACKAGE)] compilation"; \ - ( cd $(PACKAGE); $(make) -j1 SLEPC_DIR=$(PWD)/$(PACKAGE) PETSC_DIR=$(LIBPATH) >> ${compdir}/log/compile_$(PACKAGE).log 2>&1 ) ; \ + ( cd $(PACKAGE); $(make) $(MAKEFLAGS) SLEPC_DIR=$(PWD)/$(PACKAGE) PETSC_DIR=$(LIBPATH) >> ${compdir}/log/compile_$(PACKAGE).log 2>&1 ) ; \ touch compiled.stamp; \ fi install: uncompress configure compile @if ! test -f installed.stamp ; then \ echo "\t[$(PACKAGE)] installation"; \ - ( cd $(PACKAGE); $(make) -j1 SLEPC_DIR=$(PWD)/$(PACKAGE) PETSC_DIR=$(LIBPATH) install >> ${compdir}/log/install_$(PACKAGE).log 2>&1 ); \ + ( cd $(PACKAGE); $(make) $(MAKEFLAGS) SLEPC_DIR=$(PWD)/$(PACKAGE) PETSC_DIR=$(LIBPATH) install >> ${compdir}/log/install_$(PACKAGE).log 2>&1 ); \ touch installed.stamp; \ fi From 89fb8268967840b29b74bcf03ded48b90075f77f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 3 Oct 2025 14:11:06 +0200 Subject: [PATCH 1158/1367] Fix to issue reported in #214 due to change in fortran interfaces --- src/linear_algebra/MATRIX_slepc.F | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index 335f884426..5ed32d62dd 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -376,12 +376,21 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterEnd(vs,xup,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs2,xdown,vout2,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr,ierr) V_right(1:Nsize/2, i_eig+1) = cmplx(xsr,kind=SP) call VecRestoreArrayReadF90(vout,xsr,ierr) call VecGetArrayReadF90(vout2,xsr,ierr) V_right(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr,kind=SP) call VecRestoreArrayReadF90(vout2,xsr,ierr) +#else + call VecGetArrayRead(vout,xsr,ierr) + V_right(1:Nsize/2, i_eig+1) = cmplx(xsr,kind=SP) + call VecRestoreArrayRead(vout,xsr,ierr) + call VecGetArrayRead(vout2,xsr,ierr) + V_right(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr,kind=SP) + call VecRestoreArrayRead(vout2,xsr,ierr) +#endif ! call VecRestoreSubVector(xr,is(1),xup,ierr) call VecRestoreSubVector(xr,is(2),xdown,ierr) @@ -396,12 +405,21 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterEnd(vs,xup,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs2,xdown,vout2,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr_left,ierr) V_left(1:Nsize/2, i_eig+1) = cmplx(xsr_left,kind=SP) call VecRestoreArrayReadF90(vout,xsr_left,ierr) call VecGetArrayReadF90(vout2,xsr_left,ierr) V_left(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr_left,kind=SP) call VecRestoreArrayReadF90(vout2,xsr_left,ierr) +#else + call VecGetArrayRead(vout,xsr_left,ierr) + V_left(1:Nsize/2, i_eig+1) = cmplx(xsr_left,kind=SP) + call VecRestoreArrayRead(vout,xsr_left,ierr) + call VecGetArrayRead(vout2,xsr_left,ierr) + V_left(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr_left,kind=SP) + call VecRestoreArrayRead(vout2,xsr_left,ierr) +#endif ! call VecRestoreSubVector(xr_left,is(1),xup,ierr) call VecRestoreSubVector(xr_left,is(2),xdown,ierr) @@ -412,10 +430,17 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterBegin(vs,xr,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs,xr,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr,ierr) V_right(:, i_eig+1) = cmplx(xsr,kind=SP) !if (BSS_slepc_double_grp) V_right(BS_K_dim(1)+1:,i_eig+1)=cI*V_right(BS_K_dim(1)+1:,i_eig+1) call VecRestoreArrayReadF90(vout,xsr,ierr) +#else + call VecGetArrayRead(vout,xsr,ierr) + V_right(:, i_eig+1) = cmplx(xsr,kind=SP) + !if (BSS_slepc_double_grp) V_right(BS_K_dim(1)+1:,i_eig+1)=cI*V_right(BS_K_dim(1)+1:,i_eig+1) + call VecRestoreArrayRead(vout,xsr,ierr) +#endif ! if (present(V_left)) then !save the left eigenvectors @@ -423,10 +448,17 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterBegin(vs,xr_left,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs,xr_left,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr_left,ierr) V_left(:, i_eig+1) = cmplx(xsr_left,kind=SP) !if (BSS_slepc_double_grp) V_left(BS_K_dim(1)+1:,i_eig+1) =cI*V_left(BS_K_dim(1)+1:,i_eig+1) call VecRestoreArrayReadF90(vout,xsr_left,ierr) +#else + call VecGetArrayRead(vout,xsr_left,ierr) + V_left(:, i_eig+1) = cmplx(xsr_left,kind=SP) + !if (BSS_slepc_double_grp) V_left(BS_K_dim(1)+1:,i_eig+1) =cI*V_left(BS_K_dim(1)+1:,i_eig+1) + call VecRestoreArrayRead(vout,xsr_left,ierr) +#endif endif endif ! From e75de1feae916d318fa395edb550f603a3eb5ac3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 3 Oct 2025 15:01:22 +0200 Subject: [PATCH 1159/1367] Fixed compilation when linking slepc version < 3.22 (see issue #214) --- src/bse/K_diago_driver.F | 4 ++++ src/bse/K_driver_init.F | 12 ++++++++++++ src/bse/K_shell_matrix.F | 2 ++ src/bse/K_stored_in_a_nest_matrix.F | 2 ++ src/linear_algebra/MATRIX_slepc.F | 6 ++++++ 5 files changed, 26 insertions(+) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 61241d6873..4d4d9d8f7a 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -231,13 +231,17 @@ subroutine K_diago_driver(iq,W,X_static) ! 2. Here we create a distributed PETSC matrix from the BS_blks ! There are 2 cases ! control of hermitian / pseudo-hermitian / non hermitian is in part explicit here +#if PETSC_VERSION_GE(3,22,0) if (BSS_slepc_pseudo_herm) then ! 2.1. Nest matrix uses pseudo-hermitian structure of BSE, only for the coupling case call K_stored_in_a_nest_matrix(i_BS_mat,iq,slepc_mat) else +#endif ! 2.2. Single PETSc matrix, for resonant case or non-hermitian coupling call K_stored_in_a_slepc_matrix(i_BS_mat,iq,slepc_mat) +#if PETSC_VERSION_GE(3,22,0) endif +#endif endif endif #endif diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 9491b0eb80..6e80f90eea 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -5,6 +5,12 @@ ! ! Authors (see AUTHORS file for details): AM DS ! +! headers +! +#if defined _SLEPC && !defined _NL +#include +#endif +! subroutine K_driver_init(what,iq,Ken,Xk) ! use pars, ONLY:SP,schlen @@ -278,6 +284,12 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! BSS_slepc_pseudo_herm=BS_K_coupling .and. l_BS_ares_from_res .and. & & (.not.BSS_slepc_double_grp) .and. index(BSS_slepc_approach,"NonHerm")==0 +#if PETSC_VERSION_LT(3,22,0) + if (BSS_slepc_pseudo_herm) then + call warning(" Pseudo hermitian case. Link slepc >= 3.22 to improve solver efficiency") + BSS_slepc_pseudo_herm=.false. + endif +#endif ! #endif ! diff --git a/src/bse/K_shell_matrix.F b/src/bse/K_shell_matrix.F index 2a31dc7507..9c54e6e2cc 100644 --- a/src/bse/K_shell_matrix.F +++ b/src/bse/K_shell_matrix.F @@ -72,6 +72,7 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) ! if(BS_K_coupling) then if (BSS_slepc_pseudo_herm) then +#if PETSC_VERSION_GE(3,22,0) call MatCreateShell(PETSC_COMM_WORLD,PETSC_DECIDE,PETSC_DECIDE,SL_H_dim/2,SL_H_dim/2,0,slepc_mat_R,ierr) call MatSetOption(slepc_mat_R,MAT_HERMITIAN,PETSC_TRUE,ierr) call MatCreateShell(PETSC_COMM_WORLD,PETSC_DECIDE,PETSC_DECIDE,SL_H_dim/2,SL_H_dim/2,0,slepc_mat_C,ierr) @@ -81,6 +82,7 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) call MatCreateBSE(slepc_mat_R,slepc_mat_C,slepc_mat,ierr) call MatDestroy(slepc_mat_R,ierr) call MatDestroy(slepc_mat_C,ierr) +#endif else call MatCreateShell(PETSC_COMM_WORLD,PETSC_DECIDE,PETSC_DECIDE,SL_H_dim,SL_H_dim,0,slepc_mat,ierr) call MatShellSetOperation(slepc_mat,MATOP_MULT,K_multiply_by_V_slepc,ierr) diff --git a/src/bse/K_stored_in_a_nest_matrix.F b/src/bse/K_stored_in_a_nest_matrix.F index 9769143c8d..d8aab2b722 100644 --- a/src/bse/K_stored_in_a_nest_matrix.F +++ b/src/bse/K_stored_in_a_nest_matrix.F @@ -50,6 +50,7 @@ subroutine K_stored_in_a_nest_matrix(i_BS_mat,iq,slepc_mat) PetscInt :: H_pos(2),SL_K_dim(2),SL_H_dim PetscErrorCode :: ierr ! +#if PETSC_VERSION_GE(3,22,0) call timing('BSE mat slepc redist',OPR='start') ! SL_H_dim=BS_H_dim @@ -164,5 +165,6 @@ subroutine K_stored_in_a_nest_matrix(i_BS_mat,iq,slepc_mat) call MatCreateBSE(R,C,slepc_mat,ierr); ! call timing('BSE mat slepc redist',OPR='stop') +#endif ! end subroutine K_stored_in_a_nest_matrix diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index 5ed32d62dd..bc73b8f1a1 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -269,6 +269,7 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) !Set monitor call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) ! +#if PETSC_VERSION_GE(3,22,0) if(present(V_left).and.BSS_slepc_pseudo_herm.and.epskind==EPSKRYLOVSCHUR) then ! Default Shao used in case input is mispelled or not set epsbsetype=EPS_KRYLOVSCHUR_BSE_SHAO @@ -283,15 +284,20 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) ! ! Fix the BSS_slepc_approach string if (epskind==EPSKRYLOVSCHUR) BSS_slepc_approach="Krylov-Schur" +#endif ! if(present(V_left)) then +#if PETSC_VERSION_GE(3,22,0) if(BSS_slepc_pseudo_herm.and.epskind==EPSKRYLOVSCHUR) then if(epsbsetype==EPS_KRYLOVSCHUR_BSE_SHAO) BSS_slepc_approach=trim(BSS_slepc_approach)//"+Shao" if(epsbsetype==EPS_KRYLOVSCHUR_BSE_GRUNING) BSS_slepc_approach=trim(BSS_slepc_approach)//"+Gruning" if(epsbsetype==EPS_KRYLOVSCHUR_BSE_PROJECTEDBSE) BSS_slepc_approach=trim(BSS_slepc_approach)//"+ProjectedBSE" else +#endif BSS_slepc_approach=trim(BSS_slepc_approach)//"+NonHermitian" +#if PETSC_VERSION_GE(3,22,0) endif +#endif endif ! call msg( 'sr', '[SLEPC] Approach ',BSS_slepc_approach) From 2c1ab37c5505c2f8d701a9a93cd78f2dec5fbed9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 3 Oct 2025 15:07:13 +0200 Subject: [PATCH 1160/1367] Slepc and Petsc internal version updated to 3.24.0 --- lib/archive/package.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/archive/package.list b/lib/archive/package.list index 7d16fa43cb..74619a4665 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -40,8 +40,8 @@ version_scalapack=2.2.1 #version_elpa=release_2024_05_001 # This was neeeded for gitlab version_elpa=2024.05.001 version_magma=2.8.0 -version_slepc=3.22.2 -version_petsc=3.22.2 +version_slepc=3.24.0 +version_petsc=3.24.0 version_fftw=3.3.10 version_fftqe=missing version_yaml=0.2.2 From cc765857fb11cbec735b781e9fce9328f40ef139 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 5 Oct 2025 22:37:48 +0200 Subject: [PATCH 1161/1367] Version 5.3.0, Revision 25688, Hash 2c1ab37c5 MODIFIED * configure include/version/version.m4 nloptics/NL_Berry_current.F Bugs: -Fixed small bug in openmp parallelization Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_Berry_current.F | 10 +++------- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 09a198cc10..37f9cc14d3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25685 h.ca099d3df. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25688 h.2c1ab37c5. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25685 h.ca099d3df' -PACKAGE_STRING='Yambo 5.3.0 r.25685 h.ca099d3df' +PACKAGE_VERSION='5.3.0 r.25688 h.2c1ab37c5' +PACKAGE_STRING='Yambo 5.3.0 r.25688 h.2c1ab37c5' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25685 h.ca099d3df to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25688 h.2c1ab37c5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25685 h.ca099d3df:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25688 h.2c1ab37c5:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25685 h.ca099d3df +Yambo configure 5.3.0 r.25688 h.2c1ab37c5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25685 h.ca099d3df, which was +It was created by Yambo $as_me 5.3.0 r.25688 h.2c1ab37c5, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25685" -SHASH="ca099d3df" +SREVISION="25688" +SHASH="2c1ab37c5" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25685 h.ca099d3df, which was +This file was extended by Yambo $as_me 5.3.0 r.25688 h.2c1ab37c5, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25685 h.ca099d3df +Yambo config.status 5.3.0 r.25688 h.2c1ab37c5 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 4664883ad5..7778915a92 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25685 h.ca099d3df, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25688 h.2c1ab37c5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25685" -SHASH="ca099d3df" +SREVISION="25688" +SHASH="2c1ab37c5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index f87cc0e7a2..b436f16435 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -84,12 +84,8 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) Nperpend=k_map%max_kdir(id2)*k_map%max_kdir(id3) ! max_step=1 -! -! Using higher order for the k-derivative gives a worst result -! when compared with dP/dt for this reason this line is commented -! -! if(k_map%max_kdir(id_red)>=6.and..not.l_force_SndOrd) max_step=2 -! + ! + ! Using higher order for the k-derivative gives a worst result ! do ikbz=1,nXkbz ! @@ -127,7 +123,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! ! Transform in cartesian coordinates ! -!$omp parallel do default(shared), private(i1) +!$omp parallel do default(shared), private(id) do id=1,3 NL_J(id)=sum(NL_J_red(:)*a(:,id))/(4.0_SP*pi) enddo From 554ec44513560824ac28a1096535adc9de57b7c8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 7 Oct 2025 10:19:09 +0200 Subject: [PATCH 1162/1367] compute_rho_map moved outside el_density_and_current subroutine --- configure | 23 +++++++ src/bse/K_diago_driver.F | 1 + src/bse/K_kernel.F | 9 ++- src/modules/mod_interfaces.F | 3 +- src/xc_functionals/el_density_and_current.F | 73 ++++++++++++--------- 5 files changed, 72 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 09a198cc10..6db1dab141 100755 --- a/configure +++ b/configure @@ -730,6 +730,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check internal_magma compile_magma_fmodules @@ -955,6 +956,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -1014,6 +1017,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1779,6 +1783,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -3560,6 +3565,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -17152,6 +17171,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -17367,6 +17389,7 @@ fi + # diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 0c59bf9b38..648a3710a9 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -49,6 +49,7 @@ subroutine K_diago_driver(iq,W,X_static) use timing_m, ONLY:timing use parallel_int, ONLY:PP_wait #if defined _SLEPC && !defined _NL + use petscsys use slepceps, ONLY:SlepcInitialize use petscmat, ONLY:PETSC_NULL_CHARACTER use petscmatdef, ONLY:tMat diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index ab9ae01cd9..33a9dfe416 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -341,19 +341,18 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ALDA !====== if (iHxc==2) then + ! + call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) ! ! This part could be done just by the master bypassing the PAR_IND_WF_linear ... ! if(rho_map_thresh>0._SP) then - call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) YAMBO_ALLOC(rho,(fft_size)) - call el_density_and_current(Ken,Xk,rho=rho,compute_rho_map=.true.) + call el_density_and_current(Ken,Xk,rho=rho) + call compute_rho_map(rho) YAMBO_FREE(rho) - call WF_free(WF,keep_states_to_load=.true.) endif ! - call WF_load(WF,NG(1),NG(2),(/1,Ken%nbm/),(/1,Xk%nibz/),space='R',title="-TDDFT",keep_states_to_load=.true.) - ! QP_ng_Vxc=BS_n_g_fxc ! if (l_tddft_rsum) then diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 2e420b4492..0f84975d31 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -129,7 +129,7 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & complex(SP),pointer,optional :: BS_overlap(:,:) end subroutine LDIAGO_driver - subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,compute_rho_map) + subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) use pars, ONLY:SP use electrons, ONLY:levels use R_lattice, ONLY:bz_samp @@ -141,7 +141,6 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c real(SP), optional ::J(fft_size,3) integer, optional, intent(in) ::bands(2) logical, optional, intent(in) ::force_spatial_inversion - logical, optional, intent(in) ::compute_rho_map end subroutine el_density_and_current ! subroutine el_magnetization(en,Xk,magn,bands) diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index 7444dc942e..c136168675 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -9,7 +9,7 @@ ! #include ! -subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,compute_rho_map) +subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) ! ! Electronic density (and current). ! @@ -43,15 +43,15 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c ! use pars, ONLY:SP,DP use com, ONLY:msg - use stderr, ONLY:real2ch,intc + use stderr, ONLY:real2ch use electrons, ONLY:levels,n_spinor,n_sp_pol use R_lattice, ONLY:bz_samp - use D_lattice, ONLY:nsym,i_time_rev,mag_syms,dl_sop,DL_vol + use D_lattice, ONLY:nsym,i_time_rev,mag_syms,dl_sop use FFT_m, ONLY:fft_size,fft_dim,fft_rot_r,fft_rot_r_inv,fft_g_table #if defined _FFTW use FFT_m, ONLY:fftw_plan #endif - use wave_func, ONLY:WF,rho_map,rho_map_inv,rho_map_thresh,rho_map_size + use wave_func, ONLY:WF,rho_map,rho_map_size use parallel_m, ONLY:PAR_IND_WF_linear,PAR_COM_density use parallel_int, ONLY:PP_redux_wait use pseudo, ONLY:pp_is_uspp,qe_pseudo_alloc,becp,pp_has_nlcc @@ -75,7 +75,6 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c real(SP), optional ::J(fft_size,3) integer, optional, intent(in) ::bands(2) logical, optional, intent(in) ::force_spatial_inversion - logical, optional, intent(in) ::compute_rho_map ! ! Work Space ! @@ -85,9 +84,8 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c integer :: ib,ik,i_sp_pol,i_spinor,rho_syms,i_symm,i_wf,bands_range(2),wf_rspace_size integer :: i_r,ig,i_dir,ifft real(SP) :: f_occ,raux,kw - logical :: warn_done,l_si,l_rho,l_drho,l_J,l_rho_map + logical :: warn_done,l_si,l_rho,l_drho,l_J ! - integer, allocatable :: rho_map_tmp(:) real(SP), allocatable :: rho_no_sym(:),drho_no_sym(:,:),J_no_sym(:,:) complex(SP), allocatable :: WF_der(:,:,:) complex(DP), allocatable :: rhog_aug_DP(:,:), aux_DP(:) @@ -102,9 +100,7 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c l_drho =present(drho) l_J =present(J) l_si =.false. - l_rho_map =.false. if (present(force_spatial_inversion)) l_si =force_spatial_inversion - if (present(compute_rho_map) ) l_rho_map=compute_rho_map ! ! if (l_rho) then @@ -325,27 +321,6 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion,c endif endif ! - if(l_rho_map) then - ! - allocate(rho_map_tmp(fft_size)) - allocate(rho_map_inv(fft_size)) - rho_map_inv=-1 - ! - rho_map_size=0 - do ifft=1,fft_size - if(rho(ifft)*real(fft_size,SP)/real(DL_vol,SP) Date: Tue, 7 Oct 2025 20:52:24 +0200 Subject: [PATCH 1163/1367] ndb.full_sysm promoted to DB of kind 1, same as WFs and energies --- src/io/io_full_SYMMs.F | 2 +- ypp/symmetries/symmetries_driver.F | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/io/io_full_SYMMs.F b/src/io/io_full_SYMMs.F index 2bd4c31d11..6cb36cc1db 100644 --- a/src/io/io_full_SYMMs.F +++ b/src/io/io_full_SYMMs.F @@ -36,7 +36,7 @@ integer function io_full_SYMMs(k,ID) ! io_extension(ID)="full_SYMMs" ! - io_full_SYMMs=io_connect(desc=trim(io_extension(ID)),type=2,ID=ID) + io_full_SYMMs=io_connect(desc=trim(io_extension(ID)),type=1,ID=ID) if (io_full_SYMMs/=0) goto 1 ! if (any((/io_sec(ID,:)==1/))) then diff --git a/ypp/symmetries/symmetries_driver.F b/ypp/symmetries/symmetries_driver.F index 7b582a2afa..c192ccab17 100644 --- a/ypp/symmetries/symmetries_driver.F +++ b/ypp/symmetries/symmetries_driver.F @@ -43,6 +43,7 @@ subroutine symmetries_driver(E,Xk) logical :: l_keep_k_grid ! integer :: old_nkpt,ID,io_old_SYMMs + character(lchlen) :: core_io_path_save integer, external :: io_full_SYMMs ! #if defined _YPP_ELPH @@ -138,8 +139,11 @@ subroutine symmetries_driver(E,Xk) ! ! Savel old symmetries on file ! ============================ + core_io_path_save=core_io_path + core_io_path=more_io_path call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) io_old_SYMMs=io_full_SYMMs(Xk,ID) + core_io_path=core_io_path_save ! #if defined _YPP_ELPH ! From 6c1acd476a37905cb7c6309e244ca104b19508f9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 8 Oct 2025 22:38:58 +0200 Subject: [PATCH 1164/1367] Removed unused variables --- src/modules/mod_pseudo.F | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/modules/mod_pseudo.F b/src/modules/mod_pseudo.F index 5450edd065..3e06f4843a 100644 --- a/src/modules/mod_pseudo.F +++ b/src/modules/mod_pseudo.F @@ -43,12 +43,6 @@ module pseudo real(SP), allocatable:: pp_factor(:,:,:,:,:) ! - ! ABINIT (old) KB - !===================== - real(SP), allocatable:: pp_kbs_old(:,:) - real(SP), allocatable:: pp_kb_old(:,:,:,:) - real(SP), allocatable:: pp_kbd_old(:,:,:,:) - ! ! ABINIT and PWSCF KB !===================== real(SP), allocatable:: pp_kbs(:,:) @@ -71,17 +65,6 @@ module pseudo type(bec_type), allocatable:: becp(:,:) ! contains - ! - ! Abinit (OLD) - subroutine PP_alloc_abinit_old() - use R_lattice, ONLY:ng_vec - YAMBO_ALLOC(pp_kbs_old,(n_atomic_species,pp_n_l_times_proj_max)) - YAMBO_ALLOC(pp_kb_old,(ng_vec,n_atomic_species,pp_n_l_times_proj_max,n_sp_pol)) - YAMBO_ALLOC(pp_kbd_old,(ng_vec,n_atomic_species,pp_n_l_times_proj_max,n_sp_pol)) - pp_kbs_old =0._SP - pp_kb_old =0._SP - pp_kbd_old =0._SP - end subroutine ! ! Abinit subroutine PP_alloc_abinit() @@ -105,12 +88,6 @@ subroutine PP_alloc_pwscf() pp_kbd =0._SP end subroutine ! - subroutine PP_free_old() - YAMBO_FREE(pp_kbs_old) - YAMBO_FREE(pp_kb_old) - YAMBO_FREE(pp_kbd_old) - end subroutine - ! subroutine PP_free() YAMBO_FREE(pp_kbs) YAMBO_FREE(pp_kb) From 4c763172805c8ecfaff572ddf1106733b8b7d290 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 12 Oct 2025 08:46:29 +0200 Subject: [PATCH 1165/1367] Version 5.3.0, Revision 25694, Hash 6c1acd476 MODIFIED * configure include/version/version.m4 interface/INIT_activate.F interface/INIT_load.F modules/mod_electric.F modules/mod_nl_optics.F nloptics/NL_Berry_current.F nloptics/NL_Hamiltonian.F nloptics/NL_driver.F nloptics/NL_initialize.F Bugs: - Additions: -Added symmetrization of current and polariazation with residual symms by default Changes: -Removed useless symmetrization part Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_activate.F | 2 +- src/interface/INIT_load.F | 2 +- src/modules/mod_electric.F | 2 +- src/modules/mod_nl_optics.F | 11 +---------- src/nloptics/NL_Berry_current.F | 4 ++-- src/nloptics/NL_Hamiltonian.F | 13 ++----------- src/nloptics/NL_driver.F | 22 +--------------------- src/nloptics/NL_initialize.F | 5 +++-- 10 files changed, 26 insertions(+), 63 deletions(-) diff --git a/configure b/configure index 37f9cc14d3..403e3a1fc6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25688 h.2c1ab37c5. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25694 h.6c1acd476. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25688 h.2c1ab37c5' -PACKAGE_STRING='Yambo 5.3.0 r.25688 h.2c1ab37c5' +PACKAGE_VERSION='5.3.0 r.25694 h.6c1acd476' +PACKAGE_STRING='Yambo 5.3.0 r.25694 h.6c1acd476' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25688 h.2c1ab37c5 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25694 h.6c1acd476 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25688 h.2c1ab37c5:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25694 h.6c1acd476:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25688 h.2c1ab37c5 +Yambo configure 5.3.0 r.25694 h.6c1acd476 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25688 h.2c1ab37c5, which was +It was created by Yambo $as_me 5.3.0 r.25694 h.6c1acd476, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25688" -SHASH="2c1ab37c5" +SREVISION="25694" +SHASH="6c1acd476" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25688 h.2c1ab37c5, which was +This file was extended by Yambo $as_me 5.3.0 r.25694 h.6c1acd476, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25688 h.2c1ab37c5 +Yambo config.status 5.3.0 r.25694 h.6c1acd476 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7778915a92..37e8b078b0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25688 h.2c1ab37c5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25694 h.6c1acd476, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25688" -SHASH="2c1ab37c5" +SREVISION="25694" +SHASH="6c1acd476" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 682731c86e..8d0907ccc4 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -575,7 +575,7 @@ subroutine INIT_activate() #if defined _NL if (l_nl_optics) then call initactivate(1,'FFTGvecs NLBands NLHoleBands NLElecBands NLverbosity NLstep NLtime NLintegrator NLCorrelation NLLrcAlpha') - call initactivate(1,'TestOSCLL UseSymm VelGaugeNoDiam') + call initactivate(1,'TestOSCLL NoUseSymm VelGaugeNoDiam') if(.not.l_nl_p_and_p) call initactivate(1,'NLEnRange NLEnSteps NLrotaxis NLAngSteps NLMaxAng') if( l_nl_p_and_p) call initactivate(1,'IOtime IOCachetime SaveVbhistory') call initactivate(1,'NLDamping RADLifeTime UseDipoles FrSndOrd NoComprCOLL COLLCut EvalCurrent InducedField') diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 9144608028..0f94f3b50c 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -564,7 +564,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_nl_optics) call it('f',defs,'NoComprCOLL','[NL] Load collisions in double-precision and do not remove small elements (default false)',& & verb_level=V_nl_optics) - call it('f',defs,'UseSymm','[NL] Use full-symms for dipoles and residual-symms for polar/current (def false)', & + call it('f',defs,'NoUseSymm','[NL] Do not use residual-symms for polar/current (def false)', & & verb_level=V_nl_optics) call it('f',defs,'EvalCurrent','[NL] Evaluate the current') call it('f',defs,'SaveVbhistory', '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics) diff --git a/src/modules/mod_electric.F b/src/modules/mod_electric.F index e819524b8e..e7760acf31 100644 --- a/src/modules/mod_electric.F +++ b/src/modules/mod_electric.F @@ -33,7 +33,7 @@ module electric ! ! Polarization ! - logical :: l_res_symms=.FALSE. ! Do not use resisual symmetries (default False) + logical :: l_no_res_symms=.FALSE. ! Do not use resisual symmetries (default False) ! contains ! diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index 075fab2cf7..d752252b8c 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -155,10 +155,6 @@ module nl_optics logical :: l_eval_CURRENT ! Evaluate current using the commutator v=[H,r] and the IP formulation logical :: l_test_OSCLL ! Test collisions built using OSCLLs vs standard Collisions ! - ! Wk operator at equilibrium - ! - complex(SP), allocatable :: Wk_EQ(:,:,:,:,:) - ! ! IO variables ! real(SP), allocatable :: NL_P_t(:,:) @@ -249,8 +245,6 @@ subroutine NL_alloc_k_distributed(en) YAMBO_ALLOC(Sigma_SEX_EQ,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),n_sp_pol,PAR_Xk_nibz)) endif ! - YAMBO_ALLOC(Wk_EQ,(3,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),n_sp_pol,PAR_Xk_nibz)) - ! end subroutine NL_alloc_k_distributed ! subroutine NL_free @@ -274,10 +268,7 @@ subroutine NL_free YAMBO_FREE(V_xc_0) YAMBO_FREE(VAL_BANDS) ! - if(.not.l_use_DIPOLES) then - call ELECTRIC_free() - YAMBO_FREE(Wk_EQ) - endif + if(.not.l_use_DIPOLES) call ELECTRIC_free() ! YAMBO_FREE(NL_P_t) YAMBO_FREE(NL_J_t) diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index b436f16435..f78b6bf1e0 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -28,7 +28,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) use parallel_int, ONLY:PP_redux_wait use QP_m, ONLY:QP_nk use nl_optics, ONLY:NL_bands - use electric, ONLY:l_res_symms,l_force_SndOrd + use electric, ONLY:l_no_res_symms,l_force_SndOrd ! implicit none ! @@ -131,7 +131,7 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! ! Apply residual symmetries ! - if(nsym>1.and.l_res_symms) then + if(nsym/=1.and..not.l_no_res_symms) then NL_J_symm=cZERO do is=1,nsym/(i_time_rev+1) ! Time-reversal is never present NL_J_symm(:)=NL_J_symm(:)+matmul(dl_sop(:,:,is),NL_J) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 418f27b573..d6bd82f8b1 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -27,7 +27,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) use xc_functionals, ONLY:V_xc,XC_potential_driver use nl_optics, ONLY:Correlation,V_xc_0,full_rho,IPA,E_full,LRC,JGM,LRCW,l_use_DIPOLES,NL_LRC_alpha, & & NL_initial_P,E_tot,E_ext,E_ks,E_xc_0,I_relax,Alpha_ED,eval_dG, & -& NL_bands,VAL_BANDS,NL_P,LSEX,LHF,Wk_EQ +& NL_bands,VAL_BANDS,NL_P,LSEX,LHF use global_XC, ONLY:WF_xc_functional,WF_kind use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index use wrapper_omp, ONLY:M_plus_alpha_M_omp @@ -217,18 +217,9 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) else ! ! Use Sm1_plus, Sm1_minus and V_bands to build the W operator - ! I split the W(E)*E operator as: - ! W(0)*E+[W(E)-W(0)]*E - ! becasue W(0) is at Equilibrium and can by symmetrized easily ! call Build_W_operator(E,k,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),:,i_sp_pol),Wk) - if(allocated(Wk_EQ)) then - ! This part of the operator is symmetriezed before the dynamics - call Apply_W_field(A_tot,Wk-Wk_EQ(:,:,:,i_sp_pol,ik_mem),H_nl_sc) - call RT_Apply_field(ik,i_sp_pol,H_nl_sc,A_tot) - else - call Apply_W_field(A_tot,Wk,H_nl_sc) - endif + call Apply_W_field(A_tot,Wk,H_nl_sc) ! endif ! diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 603723d153..1ab0e3de65 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -34,7 +34,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) & NL_estep,NL_er,Integrator,l_use_DIPOLES,NL_P_t,JGM,TDDFT,NL_P,loop_on_angles,n_angles,& & E_ext_t,E_tot_t,E_ks_t,E_ks,E_tot,E_ext,runs_done,n_runs_todo,l_eval_CURRENT,NL_rot_axis,& & HF,SEX,NL_bands,NL_nbands,NL_alloc_k_distributed,NL_J_t,n_runs,loop_on_frequencies, & -& l_pump_and_probe,eval_OSCLL,l_test_OSCLL,LSEX,LHF,Sigma_SEX_EQ,Wk_EQ +& l_pump_and_probe,eval_OSCLL,l_test_OSCLL,LSEX,LHF,Sigma_SEX_EQ use real_time, ONLY:RT_step,NE_steps,NE_i_time,NE_time,RT_nbands,RT_bands, & eval_DFT,eval_HARTREE,RT_P,RT_ind_J,l_velocity_gauge_diam use RT_control, ONLY:RT_NAN_found @@ -43,7 +43,6 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) use parallel_m, ONLY:PAR_IND_freqs,PAR_IND_freqs_ID,PAR_IND_Xk_ibz,PAR_Xk_ibz_index use collision_ext, ONLY:COLLISIONS_have_HARTREE use collision_ext, ONLY:ng_oscll,OSCLL,W - use electric, ONLY:l_res_symms use y_memory_alloc ! implicit none @@ -109,10 +108,6 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) call OVERLAPS_IO(k,E,Dip,'read',io_err,'NL') if(io_err/=0) call error("Error in Overlaps I/O") ! - ! Symmetrize dipoles if old-symmetries are present - ! ================================================= - if(l_res_symms) call DIPOLE_symmetrize(k) - ! ! Generate bare_qpg if required !============================= if(eval_HARTREE.or.CORRELATION==JGM.or.CORRELATION==LSEX.or.CORRELATION==LHF) & @@ -243,21 +238,6 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! endif ! - ! Store Equilibrium Wk - if(.not.l_use_DIPOLES.and..not.trim(global_gauge)=='velocity'.and.l_res_symms) then - do ik=1,QP_nk - if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle - ik_mem=PAR_Xk_ibz_index(ik) - do i_sp_pol=1,n_sp_pol - call Build_W_operator(E,k,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),:,i_sp_pol), & -& Wk_EQ(:,:,:,i_sp_pol,ik_mem)) - enddo - enddo - else - YAMBO_FREE(Wk_EQ) - endif - ! - ! ! Check if calculation was already done ! ===================================== if(n_runs_todo==0) return diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index f5b836b894..441382f661 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -38,7 +38,7 @@ subroutine NL_initialize(E,k) & LRCW,SEX,HF,eval_dG,eval_COLLISIONS,NL_bands,NL_verb_name,VERB_HIGH,VERB_LOW,NL_verbosity,LSEX,& & l_eval_CURRENT,l_pump_and_probe,DephMult,l_velocity_IPA,n_angles,l_test_OSCLL,LHF,eval_OSCLL, & & NL_ang_step,n_runs,NL_rot_axis,loop_on_frequencies,loop_on_angles,NL_initial_versor,max_angle - use electric, ONLY:l_force_SndOrd,l_res_symms + use electric, ONLY:l_force_SndOrd,l_no_res_symms use parser_m, ONLY:parser use stderr, ONLY:intc use y_memory_alloc @@ -64,7 +64,7 @@ subroutine NL_initialize(E,k) call parser('EvalCurrent' , l_eval_CURRENT) call parser('TestOSCLL', l_test_OSCLL) call parser('NoComprCOLL', l_no_compress_COLL) - call parser('UseSymm', l_res_symms) + call parser('NoUseSymm', l_no_res_symms) call parser('SaveVbhistory', SAVE_Vb_history) call parser('VelGaugeNoDiam', l_velocity_gauge_tmp) call parser('UseDipoles', l_use_DIPOLES) @@ -538,5 +538,6 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Induced Field ',l_RT_induced_field) call msg( 'r', 'Force Snd Order Dipoles ',l_force_SndOrd) call msg( 'r', 'Evaluate Current ',l_eval_CURRENT) + call msg( 'r', 'Symmetrize current and pol ',.not.l_no_res_symms) ! end subroutine NL_initialize From 2cd509e49dcff204ae60b583e9ecdb107f8c3b8d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sun, 12 Oct 2025 08:49:17 +0200 Subject: [PATCH 1166/1367] Version 5.3.0, Revision 25695, Hash 4c7631728 MODIFIED * configure include/version/version.m4 hamiltonian/Berry_polarization_NEQ.F nloptics/.objects Bugs: - Additions: -Missing files Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/hamiltonian/Berry_polarization_NEQ.F | 4 ++-- src/nloptics/.objects | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 403e3a1fc6..4338168aa4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25694 h.6c1acd476. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25695 h.4c7631728. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25694 h.6c1acd476' -PACKAGE_STRING='Yambo 5.3.0 r.25694 h.6c1acd476' +PACKAGE_VERSION='5.3.0 r.25695 h.4c7631728' +PACKAGE_STRING='Yambo 5.3.0 r.25695 h.4c7631728' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25694 h.6c1acd476 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25695 h.4c7631728 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25694 h.6c1acd476:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25695 h.4c7631728:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25694 h.6c1acd476 +Yambo configure 5.3.0 r.25695 h.4c7631728 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25694 h.6c1acd476, which was +It was created by Yambo $as_me 5.3.0 r.25695 h.4c7631728, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25694" -SHASH="6c1acd476" +SREVISION="25695" +SHASH="4c7631728" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25694 h.6c1acd476, which was +This file was extended by Yambo $as_me 5.3.0 r.25695 h.4c7631728, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25694 h.6c1acd476 +Yambo config.status 5.3.0 r.25695 h.4c7631728 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 37e8b078b0..d94de79886 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25694 h.6c1acd476, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25695 h.4c7631728, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25694" -SHASH="6c1acd476" +SREVISION="25695" +SHASH="4c7631728" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/hamiltonian/Berry_polarization_NEQ.F b/src/hamiltonian/Berry_polarization_NEQ.F index a70e42f3d8..ebf0e35fc5 100644 --- a/src/hamiltonian/Berry_polarization_NEQ.F +++ b/src/hamiltonian/Berry_polarization_NEQ.F @@ -13,7 +13,7 @@ subroutine Berry_polarization_NEQ(Xen,Xk,i_sp_pol,V_bands,Polarization) use R_lattice, ONLY:bz_samp,k_map,nXkbz use hamiltonian, ONLY:H_ref_bands use QP_m, ONLY:QP_nk - use electric, ONLY:All_S_det,Sm1_plus,Sm1_minus,l_res_symms + use electric, ONLY:All_S_det,Sm1_plus,Sm1_minus,l_no_res_symms use parallel_m, ONLY:PAR_IND_Xk_bz,PAR_COM_Xk_ibz_INDEX use parallel_int, ONLY:PP_redux_wait #if defined _TIMING @@ -72,7 +72,7 @@ subroutine Berry_polarization_NEQ(Xen,Xk,i_sp_pol,V_bands,Polarization) ! ! Apply residual symmetries ! - if(nsym>1.and.l_res_symms) then + if(nsym/=1.and..not.l_no_res_symms) then Pol_symm=cZERO do is=1,nsym/(i_time_rev+1) ! Time reversal is not present Pol_symm(:)=Pol_symm(:)+matmul(dl_sop(:,:,is),Polarization) diff --git a/src/nloptics/.objects b/src/nloptics/.objects index b02552966d..d67e16b2e1 100644 --- a/src/nloptics/.objects +++ b/src/nloptics/.objects @@ -1,6 +1,6 @@ #if defined _NL objs = NL_driver.o NL_initialize.o NL_start_and_restart.o el_density_vbands.o NL_Integrator.o \ - NL_damping.o NL_test_collisions.o DIPOLE_symmetrize.o \ + NL_damping.o NL_test_collisions.o \ NL_Hamiltonian.o NL_output.o DIP_polarization.o NL_average_operator.o EXC_macroscopic_JGM.o \ NL_databases_IO.o NL_build_dG_lesser.o NL_build_valence_bands.o EXP_step.o \ NL_average_operator.o NL_current.o NL_Berry_current.o EXP_op.o INVINT_step.o RK_basestep.o \ From fb5d433a62bd06440a15f118e810f0cd6240b3bc Mon Sep 17 00:00:00 2001 From: thge123 Date: Sun, 12 Oct 2025 09:44:14 +0200 Subject: [PATCH 1167/1367] cleanup --- AUTHORS | 1 + src/bse/K_IP.F | 7 +++++-- src/dipoles/DIPOLE_setup.F | 4 +--- yambo_intel_single_precission_omp_configure.sh | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index 890d3bdc4b..8fc7a96d11 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,6 +22,7 @@ ACTIVE DEVELOPERS * Riccardo Reho (RR) (2022) * Giacomo Sesti (GS) (2022) * Nalabothula Muralidhar (NM) (2024) + * Torsten Geirsson (TG) (2025) FORMER DEVELOPERS ================== diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 06ff941ae2..8dd2a26b4a 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2012 The Yambo Team ! -! Authors (see AUTHORS file for details): DS AM IMA +! Authors (see AUTHORS file for details): DS AM IMA TG ! ! headers ! @@ -56,7 +56,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) integer :: i_ColFG complex(SP), allocatable :: E_DbGd(:) ! - complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_mespin,res_meorb + complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_mespin,res_meorb,res_mespin_tot integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! @@ -99,6 +99,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) dip_r=.false. dip_v=.true. endif + res_mespin_tot=0._SP ! ! Sorting pre-setup !------------------- @@ -351,6 +352,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_mespin) then + res_mespin_tot = res_mespin_tot - real(res_mespin)/E_plus_W(i_pert_SOC) X_mespin(:,3)=X_mespin(:,3)-res_mespin/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then X_mespin(:,3)=X_mespin(:,3)+conjg(res_mespin)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) @@ -463,6 +465,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism & & mespin meorb") + write(*,*) "\n(K_IP): res_mespin_tot= ", res_mespin_tot*Co_factor/(4._SP*pi) call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") ! ! Clean diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 487c344e75..8a92b983a0 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -58,7 +58,6 @@ subroutine DIPOLE_setup(Dip) & l_BS_magnons .or. & & l_BS_photolum .or. & & l_flag .or. & -& l_BS_mespin .or. & & l_BS_meorb) then Dip%bands_ordered=.false. endif @@ -153,8 +152,7 @@ subroutine DIPOLE_setup(Dip) if (STRING_match(Dip%computed,"spin").or.& l_BS_magnons.or.& l_BS_mespin) specific_obs=" M_spin" - !if (STRING_match(Dip%computed,"orb")) then - if (STRING_match(Dip%computed,"orb").and..not.l_BS_meorb) then + if (STRING_match(Dip%computed,"orb")) then specific_obs=trim(specific_obs)//" M_orbRT M_it" endif #if defined _RT diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh index 974a2dc8cb..c291c96c3f 100755 --- a/yambo_intel_single_precission_omp_configure.sh +++ b/yambo_intel_single_precission_omp_configure.sh @@ -10,12 +10,14 @@ PETSC_ROOT="/apps/software/petsc/3.16.3" SLEPC_ROOT="/apps/software/slepc/3.16.1" YAMBO_LIBS_ROOT="${HOME}/yambo-libs" +# Debug flags +#FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ + ./configure \ FC=ifort \ CC=icc \ MPICC=mpiicc \ MPIFC=mpiifort \ -FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ --enable-msgs-comps \ --enable-time-profile \ --enable-mpi \ From 4a0a1c45e8c96b6deb5f8b8852f6d60acd1fb466 Mon Sep 17 00:00:00 2001 From: thge123 Date: Sun, 12 Oct 2025 15:57:10 +0200 Subject: [PATCH 1168/1367] meorb now uses rt_orb --- src/bse/K_Haydock.F | 4 ++-- src/bse/K_IP.F | 23 ++++++++----------- .../K_components_folded_in_serial_arrays.F | 4 ++-- src/bse/K_dipoles.F | 4 ++-- src/dipoles/DIPOLE_orbital_magnetization_rt.F | 4 +++- src/dipoles/DIPOLE_setup.F | 5 ++-- src/modules/mod_BS.F | 6 ++--- 7 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index dc363dd8f1..92c1640774 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -238,9 +238,9 @@ subroutine K_Haydock(iq,W,OBS,Xk) if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) - if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) + if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_orb(1,:,1) if (trim(OBS)=="mespin") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_spin(1,:,1) - if (trim(OBS)=="meorb") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_dic(1,:,1) + if (trim(OBS)=="meorb") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_orb(1,:,1) if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) V0(i_g)%fragment(:,i_ColFG) = V0(i_g)%fragment(:,i_ColFG)*sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP)) enddo diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 8dd2a26b4a..51baec849b 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -56,7 +56,7 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) integer :: i_ColFG complex(SP), allocatable :: E_DbGd(:) ! - complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_mespin,res_meorb,res_mespin_tot + complex(SP) ::P_weighted(3),res_kerr,res_magn(2),res_dich,res_mespin,res_meorb integer, allocatable :: vtmpI(:,:) complex(SP), allocatable :: vtmpC(:,:) ! @@ -99,7 +99,6 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) dip_r=.false. dip_v=.true. endif - res_mespin_tot=0._SP ! ! Sorting pre-setup !------------------- @@ -217,13 +216,13 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Dichroism ! if(l_BS_dichroism) then - res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1)))/2._SP + res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(2,i_T,1)))/2._SP if(l_BS_trace) then ! x*L = DIP_x*DIP_orbital; - res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP + res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(3,i_T,1)))/3._SP endif res_dich=res_dich*f_eh*Z_eh/(q0_def_norm) if (l_BS_esort.and.i_res_ares==1) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_dich,vtmpC) @@ -261,12 +260,12 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) if (l_BS_meorb) then ! Orbital part - res_meorb=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1)) + res_meorb=BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(1,i_T,1)) if(l_BS_trace) then ! x*L = DIP_x*DIP_orbital; - res_meorb=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(1,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(2,i_T,1))+ & - & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_dic(3,i_T,1)))/3._SP + res_meorb=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(1,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(2,i_T,1))+ & + & BS_T_grp(i_T_g)%dipoles_opt(3,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(3,i_T,1)))/3._SP endif res_meorb=res_meorb*f_eh*Z_eh/(q0_def_norm) @@ -352,7 +351,6 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_mespin) then - res_mespin_tot = res_mespin_tot - real(res_mespin)/E_plus_W(i_pert_SOC) X_mespin(:,3)=X_mespin(:,3)-res_mespin/(W_bss%p(:)-E_plus_W(i_pert_SOC)) if (BS_K_anti_resonant.and.l_BS_ares_from_res) then X_mespin(:,3)=X_mespin(:,3)+conjg(res_mespin)/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))) @@ -465,7 +463,6 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! if ( l_rpa_IP) call K_OUTPUT(iq,W_bss,"open dump IP close reset","optics kerr magnons PL dichroism & & mespin meorb") - write(*,*) "\n(K_IP): res_mespin_tot= ", res_mespin_tot*Co_factor/(4._SP*pi) call K_OUTPUT(iq,W_bss,"open dump close reset bare","E_IP E_INDX_IP") ! ! Clean diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 2fe69409ad..e13e430947 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -107,11 +107,11 @@ subroutine K_components_folded_in_serial_arrays(iq) ! if (l_BS_magnons) BSS_dipoles_magn(:,H_pos)=BS_T_grp(i_g)%dipoles_mag(:,i_Tr,i_res_ares_solver) ! - if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) + if (l_BS_dichroism) BSS_dipoles_dich(:,H_pos)=BS_T_grp(i_g)%dipoles_orb(:,i_Tr,i_res_ares_solver) ! if (l_BS_mespin) BSS_dipoles_mespin(:,H_pos)=BS_T_grp(i_g)%dipoles_spin(:,i_Tr,i_res_ares_solver) ! - if (l_BS_meorb) BSS_dipoles_meorb(:,H_pos)=BS_T_grp(i_g)%dipoles_dic(:,i_Tr,i_res_ares_solver) + if (l_BS_meorb) BSS_dipoles_meorb(:,H_pos)=BS_T_grp(i_g)%dipoles_orb(:,i_Tr,i_res_ares_solver) ! if (l_BS_photolum) BSS_dipoles_PL(:,H_pos)=BS_T_grp(i_g)%dipoles_opt(:,i_Tr,i_res_ares_solver)*PL_weights(:BS_dip_size) ! diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 3931396b1d..a0052684df 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -193,9 +193,9 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) if (l_BS_dichroism) call error(' finite q not implemented for dichroism effect') if (l_BS_meorb) call error(' finite q not implemented for magnetoelectric effect') endif - BS_T_grp(i_T_g)%dipoles_dic(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) + BS_T_grp(i_T_g)%dipoles_orb(:BS_dip_size,i_T,1)=conjg(DIP_projected(:BS_dip_size)) if (BS_K_coupling.and.l_BS_ares_from_res) then - BS_T_grp(i_T_g)%dipoles_dic(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) + BS_T_grp(i_T_g)%dipoles_orb(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) endif endif ! diff --git a/src/dipoles/DIPOLE_orbital_magnetization_rt.F b/src/dipoles/DIPOLE_orbital_magnetization_rt.F index 962ec7cb02..50d36c42c7 100644 --- a/src/dipoles/DIPOLE_orbital_magnetization_rt.F +++ b/src/dipoles/DIPOLE_orbital_magnetization_rt.F @@ -77,7 +77,9 @@ subroutine Dipole_orbital_magnetization_rt(Xen,Xk,Dip) !if (iv>=ib) DIP_pos(:,1)= -cI*DIP_iR(:,iv,ib,ik_mem,i_sp_pol) !if (ic< ib) DIP_pos(:,2)=conjg(-cI*DIP_iR(:,ib,ic,ik_mem,i_sp_pol)) !if (ic>=ib) DIP_pos(:,2)= -cI*DIP_iR(:,ic,ib,ik_mem,i_sp_pol) - DIP_pos(:,1)= -cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol) + + ! conjg for first r because of how cross_product is coded in mod_vec_operate.F + DIP_pos(:,1)= conjg(-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol)) DIP_pos(:,2)= -cI*DIP_iR(:,ic,ib,ik_mem,i_sp_pol) ! !DIP_tmp=-cI*cross_product(DIP_pos(:,1),DIP_pos(:,2)) diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 8a92b983a0..5eade49f72 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -160,9 +160,8 @@ subroutine DIPOLE_setup(Dip) if (l_real_time) specific_obs=" M_spin M_orbRT M_it" #endif endif - if (l_BS_dichroism.or.l_BS_meorb) then - specific_obs=trim(specific_obs)//" M_orbCD" - endif + if (l_BS_dichroism) specific_obs=trim(specific_obs)//" M_orbCD" + if (l_BS_meorb) specific_obs=trim(specific_obs)//" M_orbRT M_it" ! ! Computed components !--------------------- diff --git a/src/modules/mod_BS.F b/src/modules/mod_BS.F index fcc67a307c..2f3af8f513 100644 --- a/src/modules/mod_BS.F +++ b/src/modules/mod_BS.F @@ -209,7 +209,7 @@ module BS complex(SP), allocatable :: Z(:) ! For dipoles the anti-resonant component is always stored complex(SP), allocatable :: dipoles_opt(:,:,:) ! (/x,y,z ; i_Tr ; 2) - complex(SP), allocatable :: dipoles_dic(:,:,:) ! (/x,y,z ; i_Tr ; 2) + complex(SP), allocatable :: dipoles_orb(:,:,:) ! (/x,y,z ; i_Tr ; 2) complex(SP), allocatable :: dipoles_mag(:,:,:) ! (/S+,S-,Sz ; i_Tr; 2) complex(SP), allocatable :: dipoles_spin(:,:,:) ! (/x,y,z ; i_Tr ; 2) ! @@ -327,7 +327,7 @@ subroutine BS_Blocks_and_Transitions_alloc(E,iT,dom_k_T_group) YAMBO_ALLOC(BS_T_grp(iT)%dipoles_spin,(BS_dip_size,nT,nDIP)) endif if(l_BS_dichroism.or.l_BS_meorb) then - YAMBO_ALLOC(BS_T_grp(iT)%dipoles_dic,(BS_dip_size,nT,nDIP)) + YAMBO_ALLOC(BS_T_grp(iT)%dipoles_orb,(BS_dip_size,nT,nDIP)) endif YAMBO_ALLOC(BS_T_grp(iT)%table,(nT,5)) YAMBO_ALLOC(BS_T_grp(iT)%E,(nT,dom_k_T_group)) @@ -365,7 +365,7 @@ subroutine BS_Blocks_and_Transitions_free() YAMBO_FREE(BS_T_grp(iT)%dipoles_mag) endif if (l_BS_dichroism.or.l_BS_meorb) then - YAMBO_FREE(BS_T_grp(iT)%dipoles_dic) + YAMBO_FREE(BS_T_grp(iT)%dipoles_orb) endif if (l_BS_mespin) then YAMBO_FREE(BS_T_grp(iT)%dipoles_spin) From 448c264f11ca56d2b70badbee29b012ee6e71d5a Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 08:18:28 +0200 Subject: [PATCH 1169/1367] added author --- src/bse/K_Haydock_response.F | 2 +- src/bse/K_diago_response_functions.F | 2 +- src/bse/K_observables.F | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bse/K_Haydock_response.F b/src/bse/K_Haydock_response.F index 97a0423253..9e1eb18dcb 100644 --- a/src/bse/K_Haydock_response.F +++ b/src/bse/K_Haydock_response.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2020 The Yambo Team ! -! Authors (see AUTHORS file for details): AM MG DS IMA +! Authors (see AUTHORS file for details): AM MG DS IMA TG ! subroutine K_Haydock_response(iq,it,Cf_size,OBS,scheme,W,Af,Bf,Cf,reached_threshold,FG_factor) ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index c4b0febdbd..e607d4603e 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -3,7 +3,7 @@ ! ! Copyright (C) 2015 The Yambo Team ! -! Authors (see AUTHORS file for details): DS AM MG +! Authors (see AUTHORS file for details): DS AM MG TG ! subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_right_abs,BS_E_SOC_corr,& & BS_R_left_magn,BS_R_right_magn,BS_R_left_kerr,BS_R_right_kerr,BS_R_right_dich,& diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index b07f652c27..7ad4678041 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -87,7 +87,9 @@ subroutine K_observables(W,Xk) endif if (l_BS_meorb) then if (.not.(l_col_cut.and.Xk%nbz==1) ) then - call warning(" Periodic system detected. Orbital ME tensor coded only for isolated systems") + call warning(" Periodic system detected. Orbital ME tensor not fully implemented.") + else + call warning(" Non-periodic system detected. Orbital ME tensor assumes periodic system.") endif if (.not.l_BS_trace) BS_dip_size=2 endif From 5a60a9253377620eb560758c56b229209d5eaea4 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 08:22:21 +0200 Subject: [PATCH 1170/1367] removed personal files --- notes.txt | 32 ------------- ...o_intel_single_precission_omp_configure.sh | 46 ------------------- 2 files changed, 78 deletions(-) delete mode 100644 notes.txt delete mode 100755 yambo_intel_single_precission_omp_configure.sh diff --git a/notes.txt b/notes.txt deleted file mode 100644 index c7a2782fb7..0000000000 --- a/notes.txt +++ /dev/null @@ -1,32 +0,0 @@ -309 & call MEM_count("tmp_res_ptr",tmp_res_ptr) -(gdb) print bs_r_right_abs -$18 = (PTR TO -> ( - COMPLEX(4) (1600) )) 0x7fffa8c6fd80 -(gdb) n -310 if (.not.associated(tmp_res_ptr)) & -(gdb) print bs_r_right_abs -$19 = (PTR TO -> ( - COMPLEX(4) (1600) )) 0x7fffa8c6fd80 -(gdb) n -317 if(l_abs_res) then -(gdb) print bs_r_right_abs -$20 = (PTR TO -> ( - COMPLEX(4) (1600) )) 0x7fffa8c6fd80 -(gdb) print bs_r_right_abs -$21 = (PTR TO -> ( - COMPLEX(4) (1600) )) 0x7fffa8c6fd80 -(gdb) n -318 call K_diago_R_res("opt1",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_abs, BS_V_right) -(gdb) print bs_r_right_abs - -$22 = (PTR TO -> ( - COMPLEX(4) (1600) )) 0x7fffa8c6fd80 - -(gdb) n -319 |!!!!!!--> if(l_kerr_rgt) call K_diago_R_res("opt2",i_BS_mat,BS_E,neigs_this_cpu,neig_shift,BS_R_right_kerr,BS_V_right) - -(gdb) print bs_r_right_abs -$23 = (PTR TO -> ( - COMPLEX(4) (:) )) -(gdb) - diff --git a/yambo_intel_single_precission_omp_configure.sh b/yambo_intel_single_precission_omp_configure.sh deleted file mode 100755 index c291c96c3f..0000000000 --- a/yambo_intel_single_precission_omp_configure.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 - -NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" -NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" -HDF5_ROOT="/apps/software/hdf5/1.12.1" -LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" -PETSC_ROOT="/apps/software/petsc/3.16.3" -SLEPC_ROOT="/apps/software/slepc/3.16.1" -YAMBO_LIBS_ROOT="${HOME}/yambo-libs" - -# Debug flags -#FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ - -./configure \ -FC=ifort \ -CC=icc \ -MPICC=mpiicc \ -MPIFC=mpiifort \ ---enable-msgs-comps \ ---enable-time-profile \ ---enable-mpi \ ---enable-open-mp \ ---enable-iotk \ ---without-editor \ ---enable-memory-profile \ ---enable-keep-src \ ---enable-hdf5-par-io \ ---with-mpi-path="${I_MPI_ROOT}" \ ---with-netcdf-path=${NETCDF_ROOT} \ ---with-netcdff-path=${NETCDFF_ROOT} \ ---with-hdf5-path=${HDF5_ROOT} \ ---with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blacs-libs="mkl" \ ---with-scalapack-libs="mkl" \ ---with-extlibs-path="${YAMBO_LIBS_ROOT}" - -#--enable-slepc-linalg -#--with-petsc-path="${PETSC_ROOT}" \ -#--with-slepc-path="${SLEPC_ROOT}" \ -#--with-libxc-path="${LIBXC_ROOT}" \ - -#FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ From e3b8c66213039c11bf48091de39ec77216070e8f Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 08:40:42 +0200 Subject: [PATCH 1171/1367] small fixes --- src/bse/K_diago_left_residuals.F | 4 ++-- src/dipoles/RT_project.dep | 1 + src/modules/DOUBLE_project.dep | 1 - src/modules/mod_X.F | 2 +- src/output/K_OUTPUT.F | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index ca89832a8c..ccbd05d7bb 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -114,8 +114,8 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) if(trim(mode)=="mespin1") tmp_res=BSS_dipoles_mespin(1,res_range(1):res_range(2)) if(trim(mode)=="mespin2") tmp_res=BSS_dipoles_mespin(2,res_range(1):res_range(2)) - if(trim(mode)=="meorb1") tmp_res=BSS_dipoles_mespin(1,res_range(1):res_range(2)) - if(trim(mode)=="meorb2") tmp_res=BSS_dipoles_mespin(2,res_range(1):res_range(2)) + if(trim(mode)=="meorb1") tmp_res=BSS_dipoles_meorb(1,res_range(1):res_range(2)) + if(trim(mode)=="meorb2") tmp_res=BSS_dipoles_meorb(2,res_range(1):res_range(2)) if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) ! diff --git a/src/dipoles/RT_project.dep b/src/dipoles/RT_project.dep index d32711168f..4a0787872d 100644 --- a/src/dipoles/RT_project.dep +++ b/src/dipoles/RT_project.dep @@ -1,6 +1,7 @@ DIPOLE_IO.o DIPOLE_driver.o DIPOLE_g_space.o + DIPOLE_orbital_magnetization_rt.o DIPOLE_p_matrix_elements.o DIPOLE_setup.o DIPOLE_shifted_grids.o diff --git a/src/modules/DOUBLE_project.dep b/src/modules/DOUBLE_project.dep index a42a52ba11..bd886c01f9 100644 --- a/src/modules/DOUBLE_project.dep +++ b/src/modules/DOUBLE_project.dep @@ -14,7 +14,6 @@ mod_IO.o mod_IO_interfaces.o mod_LIVE_t.o - mod_MAGNETOELECTRIC.o mod_MAGNONS.o mod_MPA.o mod_NL_interfaces.o diff --git a/src/modules/mod_X.F b/src/modules/mod_X.F index a6282b25bc..c97d7bc3f6 100644 --- a/src/modules/mod_X.F +++ b/src/modules/mod_X.F @@ -166,7 +166,7 @@ module X_m integer :: N_messages character(schlen) :: messages(N_MAX_columns) end type - integer, parameter :: N_X_obs=19 + integer, parameter :: N_X_obs=18 type(X_obs_t) :: X_obs(N_X_obs) ! interface diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index b46a68f7a5..3f12aad359 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -136,7 +136,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) enddo ! endif - + ! ! ABSORPTION ! ! Epsilon_ii From 79e5953ba9167d0d4ca4a41a37fc7de07953ba82 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 14:18:43 +0200 Subject: [PATCH 1172/1367] cleanup --- src/io/io_BSS_diago.F | 4 +- src/modules/mod_BS_solvers.F | 4 +- ...l_single_precission_omp_configure_debug.sh | 46 +++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100755 yambo_intel_single_precission_omp_configure_debug.sh diff --git a/src/io/io_BSS_diago.F b/src/io/io_BSS_diago.F index b3037f172a..6b42ee726d 100644 --- a/src/io/io_BSS_diago.F +++ b/src/io/io_BSS_diago.F @@ -26,7 +26,9 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,bsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) , optional :: bsE(:) real(SP) ,pointer, optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_mespin(:,:),bsR_meorb(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer, optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),& +& bsR_mespin(:,:),bsR_meorb(:,:),bsL_magn(:,:),& +& bsR_magn(:,:),bsRl(:),bsRr(:) complex(SP) , optional :: BS_mat(:,:) logical, optional :: write_ev ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 212d9f6038..00b4c6a4b7 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -179,7 +179,9 @@ integer function io_BSS_diago(iq,i_BS_mat,ID,X_static,bsE,bsRl,BsRr,BsE_corr,& integer :: iq,ID,i_BS_mat complex(SP) ,optional :: bsE(:) real(SP), pointer,optional :: BsE_corr(:,:),bsR_pl(:,:) - complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),bsR_mespin(:,:),bsR_meorb(:,:),bsL_magn(:,:),bsR_magn(:,:),bsRl(:),bsRr(:) + complex(SP),pointer,optional :: bsL_kerr(:),bsR_kerr(:),bsR_dich(:,:),& +& bsR_mespin(:,:),bsR_meorb(:,:),bsL_magn(:,:),& +& bsR_magn(:,:),bsRl(:),bsRr(:) complex(SP) ,optional :: BS_mat(:,:) logical, optional :: write_ev end function diff --git a/yambo_intel_single_precission_omp_configure_debug.sh b/yambo_intel_single_precission_omp_configure_debug.sh new file mode 100755 index 0000000000..c291c96c3f --- /dev/null +++ b/yambo_intel_single_precission_omp_configure_debug.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 + +NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" +NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" +HDF5_ROOT="/apps/software/hdf5/1.12.1" +LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" +PETSC_ROOT="/apps/software/petsc/3.16.3" +SLEPC_ROOT="/apps/software/slepc/3.16.1" +YAMBO_LIBS_ROOT="${HOME}/yambo-libs" + +# Debug flags +#FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ + +./configure \ +FC=ifort \ +CC=icc \ +MPICC=mpiicc \ +MPIFC=mpiifort \ +--enable-msgs-comps \ +--enable-time-profile \ +--enable-mpi \ +--enable-open-mp \ +--enable-iotk \ +--without-editor \ +--enable-memory-profile \ +--enable-keep-src \ +--enable-hdf5-par-io \ +--with-mpi-path="${I_MPI_ROOT}" \ +--with-netcdf-path=${NETCDF_ROOT} \ +--with-netcdff-path=${NETCDFF_ROOT} \ +--with-hdf5-path=${HDF5_ROOT} \ +--with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ +--with-blacs-libs="mkl" \ +--with-scalapack-libs="mkl" \ +--with-extlibs-path="${YAMBO_LIBS_ROOT}" + +#--enable-slepc-linalg +#--with-petsc-path="${PETSC_ROOT}" \ +#--with-slepc-path="${SLEPC_ROOT}" \ +#--with-libxc-path="${LIBXC_ROOT}" \ + +#FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ From bc2c6b9d4710de93fadbdf979dd8bc9ca96f6730 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 15:51:45 +0200 Subject: [PATCH 1173/1367] fixed compilation issue --- src/bse/K_solvers.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 6845da5865..f21ff2e898 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -18,7 +18,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use X_m, ONLY:X_t use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,load_Diago,& & run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly - use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,& + use BS, ONLY:BS_perturbative_SOC,BS_K_has_been_calculated_loaded,BS_ID,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,& & l_BS_mespin,l_BS_meorb,l_BS_jdos use parallel_m, ONLY:master_cpu,CPU_structure From 6a3c27a9a926ffa78c93865fa14b6664ef167d23 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 16:03:30 +0200 Subject: [PATCH 1174/1367] K_solver fix --- src/bse/K_solvers.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index f21ff2e898..218f342348 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -18,7 +18,7 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) use X_m, ONLY:X_t use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,load_Diago,& & run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly - use BS, ONLY:BS_perturbative_SOC,BS_K_has_been_calculated_loaded,BS_ID,& + use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,BS_perturbative_SOC,& & l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,& & l_BS_mespin,l_BS_meorb,l_BS_jdos use parallel_m, ONLY:master_cpu,CPU_structure From eba53979685742915c407fb02eea14e99ecd7b65 Mon Sep 17 00:00:00 2001 From: thge123 Date: Mon, 13 Oct 2025 16:19:50 +0200 Subject: [PATCH 1175/1367] removed whitespaces --- .../K_components_folded_in_serial_arrays.F | 26 +++++------ src/bse/K_diago_left_residuals.F | 38 +++++++-------- src/bse/K_diago_response_functions.F | 12 ++--- src/bse/K_diago_right_residuals.F | 40 ++++++++-------- src/bse/K_dipoles.F | 1 + src/bse/K_observables.F | 20 ++++---- src/bse/K_solvers.F | 32 ++++++------- src/dipoles/DIPOLE_orbital_magnetization_cd.F | 3 +- src/dipoles/DIPOLE_setup.F | 10 ++-- src/output/K_OUTPUT.F | 2 - src/output/X_OUTPUT_driver.F | 2 - ...l_single_precission_omp_configure_debug.sh | 46 ------------------- 12 files changed, 91 insertions(+), 141 deletions(-) delete mode 100755 yambo_intel_single_precission_omp_configure_debug.sh diff --git a/src/bse/K_components_folded_in_serial_arrays.F b/src/bse/K_components_folded_in_serial_arrays.F index 514d947e85..148b5dfcbf 100644 --- a/src/bse/K_components_folded_in_serial_arrays.F +++ b/src/bse/K_components_folded_in_serial_arrays.F @@ -12,19 +12,19 @@ subroutine K_components_folded_in_serial_arrays(iq) ! ! See mod_BS on the K structure ! - use parallel_int, ONLY:PP_redux_wait - use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_IND_T_groups,PAR_COM_Xk_ibz_INDEX - use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& -& BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc - use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& -& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_mespin,l_BS_meorb,& -& l_BS_photolum,BS_dip_size,BS_H_dim,l_BS_ares_from_res - use timing_m, ONLY:timing - use LIVE_t, ONLY:live_timing - use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc,BSS_dipoles_mespin,BSS_MEspin_alloc,BSS_dipoles_meorb,BSS_MEorb_alloc - use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_alloc,BSS_PL_f,PL_weights - use timing_m, ONLY:timing + use parallel_int, ONLY:PP_redux_wait + use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_IND_T_groups,PAR_COM_Xk_ibz_INDEX + use BS_solvers, ONLY:BSS_eh_E_SOC_corr,& +& BSS_dipoles_opt,BSS_eh_table,BSS_eh_E,BSS_eh_f,BSS_eh_f_RES,BSS_eh_W,BSS_eh_Z,BSS_alloc + use BS, ONLY:BS_K_dim,BS_nT_grps,BS_T_grp,BS_K_coupling,BS_perturbative_SOC,& +& BS_n_eh_spaces,l_BS_optics,l_BS_magnons,l_BS_dichroism,l_BS_mespin,l_BS_meorb,& +& l_BS_photolum,BS_dip_size,BS_H_dim,l_BS_ares_from_res + use timing_m, ONLY:timing + use LIVE_t, ONLY:live_timing + use MAGNONS, ONLY:BSS_dipoles_magn,BSS_MAGN_alloc + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_DICH_alloc,BSS_dipoles_mespin,BSS_MEspin_alloc,BSS_dipoles_meorb,BSS_MEorb_alloc + use PHOTOLUM, ONLY:BSS_dipoles_PL,BSS_PL_alloc,BSS_PL_f,PL_weights + use timing_m, ONLY:timing ! implicit none ! diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index ccbd05d7bb..1aed445f86 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -17,17 +17,17 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & ! ! Remember: 1/(w-H)= \sum_ij |i right>^{-1) ! =conjg(BSS_dipoles(j))*BS_V_right(j,i) ! - use pars, ONLY:SP,cZERO - use stderr, ONLY:intc - use wrapper_omp, ONLY:V_dot_V_omp - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset,ncpu - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use LIVE_t, ONLY:live_timing - use X_m, ONLY:global_gauge - use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_dipoles_opt - use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& - & l_BS_res_from_E,BS_not_const_eh_f - use MAGNONS, ONLY:BSS_dipoles_magn - use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_mespin,BSS_dipoles_meorb + use pars, ONLY:SP,cZERO + use stderr, ONLY:intc + use wrapper_omp, ONLY:V_dot_V_omp + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset,ncpu + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing + use X_m, ONLY:global_gauge + use BS_solvers, ONLY:BSS_eh_E,BSS_eh_Z,BSS_eh_f,BSS_dipoles_opt + use BS, ONLY:BS_H_dim,BS_K_dim,BS_K_coupling,& + & l_BS_res_from_E,BS_not_const_eh_f + use MAGNONS, ONLY:BSS_dipoles_magn + use DICHROISM, ONLY:BSS_dipoles_dich,BSS_dipoles_mespin,BSS_dipoles_meorb ! implicit none ! @@ -97,16 +97,16 @@ subroutine K_diago_R_res(mode, i_BS_mat, BS_E, & ! call live_timing(trim(mode)//' residuals ',n_steps) ! - if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) - if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) - if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) - if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="opt1") tmp_res=BSS_dipoles_opt(1,res_range(1):res_range(2)) + if(trim(mode)=="opt2") tmp_res=BSS_dipoles_opt(2,res_range(1):res_range(2)) + if(trim(mode)=="dic1") tmp_res=BSS_dipoles_dich(1,res_range(1):res_range(2)) + if(trim(mode)=="dic2") tmp_res=BSS_dipoles_dich(2,res_range(1):res_range(2)) + if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) + if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) if(trim(mode)=="mespin1") tmp_res=BSS_dipoles_mespin(1,res_range(1):res_range(2)) if(trim(mode)=="mespin2") tmp_res=BSS_dipoles_mespin(2,res_range(1):res_range(2)) - if(trim(mode)=="meorb1") tmp_res=BSS_dipoles_meorb(1,res_range(1):res_range(2)) - if(trim(mode)=="meorb2") tmp_res=BSS_dipoles_meorb(2,res_range(1):res_range(2)) - if(trim(mode)=="mag1") tmp_res=BSS_dipoles_magn(1,res_range(1):res_range(2)) - if(trim(mode)=="mag2") tmp_res=BSS_dipoles_magn(2,res_range(1):res_range(2)) + if(trim(mode)=="meorb1") tmp_res=BSS_dipoles_meorb(1,res_range(1):res_range(2)) + if(trim(mode)=="meorb2") tmp_res=BSS_dipoles_meorb(2,res_range(1):res_range(2)) ! tmp_res = conjg(tmp_res)*sqrt(cmplx(BSS_eh_f(res_range(1):res_range(2)),kind=SP)) if (allocated(BSS_eh_Z)) tmp_res=tmp_res*sqrt(BSS_eh_Z(res_range(1):res_range(2))) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index dee8cf04d2..99cf575f43 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -255,6 +255,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) BS_T_grp(i_T_g)%dipoles_spin(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) endif endif + ! endif ! enddo diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index 3e134231b6..a1c0d98102 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -35,16 +35,16 @@ subroutine K_observables(W,Xk) ! ! What... !========= - l_BS_abs = STRING_match(BSE_prop,'abs') - l_BS_jdos = STRING_match(BSE_prop,'jdos') - l_BS_dichroism = STRING_match(BSE_prop,'dich') - l_BS_kerr = STRING_match(BSE_prop,'kerr') - l_BS_photolum = STRING_match(BSE_prop,'photolum') - l_BS_kerr_asymm = STRING_match(BSE_prop,'asymm') .and. l_BS_kerr - l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr - l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 - l_BS_MEspin = STRING_match(BSE_prop,'MEspin') .and.n_spin>1 - l_BS_MEorb = STRING_match(BSE_prop,'MEorb') .and.n_spin>1 + l_BS_abs = STRING_match(BSE_prop,'abs') + l_BS_jdos = STRING_match(BSE_prop,'jdos') + l_BS_dichroism = STRING_match(BSE_prop,'dich') + l_BS_kerr = STRING_match(BSE_prop,'kerr') + l_BS_photolum = STRING_match(BSE_prop,'photolum') + l_BS_kerr_asymm= STRING_match(BSE_prop,'asymm') .and. l_BS_kerr + l_BS_anomalous_Hall = STRING_match(BSE_prop,'anHall') .and. l_BS_kerr + l_BS_magnons = STRING_match(BSE_prop,'magn') .and.n_spin>1 + l_BS_MEspin = STRING_match(BSE_prop,'MEspin') .and.n_spin>1 + l_BS_MEorb = STRING_match(BSE_prop,'MEorb') .and.n_spin>1 ! ! How ... !--------- diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 218f342348..94371fa38c 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -11,22 +11,22 @@ ! subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! - use stderr, ONLY:intc - use frequency, ONLY:w_samp - use electrons, ONLY:levels - use R_lattice, ONLY:bz_samp - use X_m, ONLY:X_t - use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,load_Diago,& -& run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly - use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,BS_perturbative_SOC,& -& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,& -& l_BS_mespin,l_BS_meorb,l_BS_jdos - use parallel_m, ONLY:master_cpu,CPU_structure - use IO_int, ONLY:IO_and_Messaging_switch - use linear_algebra, ONLY:INV,DIAGO - use PHOTOLUM, ONLY:BSS_PL_free - use MAGNONS, ONLY:BSS_MAGN_free - use DICHROISM, ONLY:BSS_DICH_free,BSS_MEspin_free,BSS_MEorb_free + use stderr, ONLY:intc + use frequency, ONLY:w_samp + use electrons, ONLY:levels + use R_lattice, ONLY:bz_samp + use X_m, ONLY:X_t + use BS_solvers, ONLY:BSS_desc,BSS_free,BS_mat,run_Haydock,load_Diago,& +& run_inversion,run_Diago,run_Slepc,BSS_kernel_IO_on_the_fly + use BS, ONLY:BS_K_has_been_calculated_loaded,BS_ID,BS_perturbative_SOC,& +& l_BS_abs,l_BS_kerr,l_BS_magnons,l_BS_dichroism,& +& l_BS_mespin,l_BS_meorb,l_BS_jdos + use parallel_m, ONLY:master_cpu,CPU_structure + use IO_int, ONLY:IO_and_Messaging_switch + use linear_algebra, ONLY:INV,DIAGO + use PHOTOLUM, ONLY:BSS_PL_free + use MAGNONS, ONLY:BSS_MAGN_free + use DICHROISM, ONLY:BSS_DICH_free,BSS_MEspin_free,BSS_MEorb_free use y_memory_alloc ! implicit none diff --git a/src/dipoles/DIPOLE_orbital_magnetization_cd.F b/src/dipoles/DIPOLE_orbital_magnetization_cd.F index 7df490e25a..fc0d0871b0 100644 --- a/src/dipoles/DIPOLE_orbital_magnetization_cd.F +++ b/src/dipoles/DIPOLE_orbital_magnetization_cd.F @@ -40,7 +40,6 @@ subroutine Dipole_orbital_magnetization_cd(Xen,Xk,Dip) ! if (n_LT_steps>0) call live_timing('Orbital magnetization (CD)',n_LT_steps) ! - ! ! Main loop over k in IBZ ! do i_sp_pol=1,n_sp_pol @@ -70,7 +69,7 @@ subroutine Dipole_orbital_magnetization_cd(Xen,Xk,Dip) DIP_x_loc(:)=conjg(-cI*DIP_iR(:,ib,iv,ik_mem,i_sp_pol)) ! DIP_v_loc(:)=DIP_v(:,ic,ib,ik_mem,i_sp_pol) - ! + ! DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)=& & DIP_orbital(:,ic,iv,ik_mem,i_sp_pol,1)+cross_product(DIP_x_loc,DIP_v_loc) ! diff --git a/src/dipoles/DIPOLE_setup.F b/src/dipoles/DIPOLE_setup.F index 5eade49f72..ba67952e67 100644 --- a/src/dipoles/DIPOLE_setup.F +++ b/src/dipoles/DIPOLE_setup.F @@ -44,11 +44,11 @@ subroutine DIPOLE_setup(Dip) ! ! Observables (needed later) !---------------------------- - l_BS_magnons= (index(BSE_prop,'magn')/=0) - l_BS_dichroism= (index(BSE_prop,'dich')/=0) - l_BS_photolum= (index(BSE_prop,'photolum')/=0) - l_BS_mespin= (index(BSE_prop,'MEspin')/=0) - l_BS_meorb= (index(BSE_prop,'MEorb')/=0) + l_BS_magnons= (index(BSE_prop,'magn')/=0) + l_BS_dichroism= (index(BSE_prop,'dich')/=0) + l_BS_photolum= (index(BSE_prop,'photolum')/=0) + l_BS_mespin= (index(BSE_prop,'MEspin')/=0) + l_BS_meorb= (index(BSE_prop,'MEorb')/=0) call parser('ImposeAsymBSE',l_flag) if(.not.l_flag) call parser('ImposeFullBSE',l_flag) ! diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index a553bf2ca9..943ceb10d4 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -162,8 +162,6 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) ! ... Epsilon_ii call ELEMENTAL_dump("eps",Epsilon_ii(:,2:4)+1._SP) endif - - ! ! ! Epsilon_ij !------------ diff --git a/src/output/X_OUTPUT_driver.F b/src/output/X_OUTPUT_driver.F index 0dfe8a73e4..c8e75e0e39 100644 --- a/src/output/X_OUTPUT_driver.F +++ b/src/output/X_OUTPUT_driver.F @@ -93,8 +93,6 @@ subroutine X_OUTPUT_driver(WHAT,keys,solver,IQ,IG,DESC,data,indexes) if (l_BS_dichroism) call X_obs_onoff("+ CD") if (l_BS_mespin) call X_obs_onoff("+ MEspin") if (l_BS_meorb) call X_obs_onoff("+ MEorb") - - ! !...solvers specific if (present(solver)) then diff --git a/yambo_intel_single_precission_omp_configure_debug.sh b/yambo_intel_single_precission_omp_configure_debug.sh deleted file mode 100755 index c291c96c3f..0000000000 --- a/yambo_intel_single_precission_omp_configure_debug.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -module load netcdf-c/4.8.1-intelmpi netcdf-fortran/4.5.4-intelmpi hdf5/intel/1.12.1 libxc/intel/6.2.2-no-fhc petsc/3.16.3-intelmpi slepc/3.16.1-intelmpi intel/icc/2022.0.1 intel/mkl/2022.0.1 - -NETCDF_ROOT="/apps/software/netCDF-C/4.8.1" -NETCDFF_ROOT="/apps/software/netCDF-Fortran/4.5.4" -HDF5_ROOT="/apps/software/hdf5/1.12.1" -LIBXC_ROOT="/apps/software/libxc/intel/6.2.2-no-fhc" -PETSC_ROOT="/apps/software/petsc/3.16.3" -SLEPC_ROOT="/apps/software/slepc/3.16.1" -YAMBO_LIBS_ROOT="${HOME}/yambo-libs" - -# Debug flags -#FCFLAGS="-O0 -g -traceback -check bounds -fpe0" \ - -./configure \ -FC=ifort \ -CC=icc \ -MPICC=mpiicc \ -MPIFC=mpiifort \ ---enable-msgs-comps \ ---enable-time-profile \ ---enable-mpi \ ---enable-open-mp \ ---enable-iotk \ ---without-editor \ ---enable-memory-profile \ ---enable-keep-src \ ---enable-hdf5-par-io \ ---with-mpi-path="${I_MPI_ROOT}" \ ---with-netcdf-path=${NETCDF_ROOT} \ ---with-netcdff-path=${NETCDFF_ROOT} \ ---with-hdf5-path=${HDF5_ROOT} \ ---with-fft-libs=" -L${MKLROOT}/lib/intel64 -lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blas-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-lapack-libs="-L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" \ ---with-blacs-libs="mkl" \ ---with-scalapack-libs="mkl" \ ---with-extlibs-path="${YAMBO_LIBS_ROOT}" - -#--enable-slepc-linalg -#--with-petsc-path="${PETSC_ROOT}" \ -#--with-slepc-path="${SLEPC_ROOT}" \ -#--with-libxc-path="${LIBXC_ROOT}" \ - -#FCFLAGS="-O2 -g -traceback -check bounds -fpe0" \ From 878d6809b3f2081b00431c4104d687ace3daeb36 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 14 Oct 2025 10:28:29 +0200 Subject: [PATCH 1176/1367] Version 5.3.0, Revision 25701, Hash 1dcbb4bb1 MODIFIED * configure include/version/version.m4 io/io_RT_components.F Bugs: -Fixed bug with gfortran compiler Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/io/io_RT_components.F | 3 ++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 37f9cc14d3..1a68e77734 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25688 h.2c1ab37c5. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25701 h.1dcbb4bb1. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25688 h.2c1ab37c5' -PACKAGE_STRING='Yambo 5.3.0 r.25688 h.2c1ab37c5' +PACKAGE_VERSION='5.3.0 r.25701 h.1dcbb4bb1' +PACKAGE_STRING='Yambo 5.3.0 r.25701 h.1dcbb4bb1' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25688 h.2c1ab37c5 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25701 h.1dcbb4bb1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25688 h.2c1ab37c5:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25701 h.1dcbb4bb1:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25688 h.2c1ab37c5 +Yambo configure 5.3.0 r.25701 h.1dcbb4bb1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25688 h.2c1ab37c5, which was +It was created by Yambo $as_me 5.3.0 r.25701 h.1dcbb4bb1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25688" -SHASH="2c1ab37c5" +SREVISION="25701" +SHASH="1dcbb4bb1" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25688 h.2c1ab37c5, which was +This file was extended by Yambo $as_me 5.3.0 r.25701 h.1dcbb4bb1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25688 h.2c1ab37c5 +Yambo config.status 5.3.0 r.25701 h.1dcbb4bb1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7778915a92..39b351b9bb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25688 h.2c1ab37c5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25701 h.1dcbb4bb1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25688" -SHASH="2c1ab37c5" +SREVISION="25701" +SHASH="1dcbb4bb1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_RT_components.F b/src/io/io_RT_components.F index 52a41ec903..3c24f900a6 100644 --- a/src/io/io_RT_components.F +++ b/src/io/io_RT_components.F @@ -150,7 +150,8 @@ integer function io_RT_components(what,ID) if (io_RT_components/=0) goto 1 endif ! - if (RT_do_IO("V_bands")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,(SAVE_Vb_history.or.SAVE_Vb_floquet),Vbands_RT_IO_t) + if (RT_do_IO("V_bands")) & +& call io_RT_components_TIME_points(ID,T_size,.FALSE.,(SAVE_Vb_history.or.SAVE_Vb_floquet),Vbands_RT_IO_t) ! if (RT_do_IO("G_lesser")) call io_RT_components_TIME_points(ID,T_size,.FALSE.,.TRUE.,Gless_RT_IO_t) ! From 8c61d8dd7478c2a710d7796fa3ecfca3e329979b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 14 Oct 2025 23:47:37 +0200 Subject: [PATCH 1177/1367] Just adding some comments for dichroism --- src/bse/K_IP.F | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 51baec849b..9fd8077e16 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -216,8 +216,18 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) ! Dichroism ! if(l_BS_dichroism) then + ! The dicroism for an oriented sample (DD contribution only) should be + ! 1/2 (beta_xx + beta_yy) = 1/2 (x*m_x + y*m_y) + ! with + ! m_x = r_y*p_z-r_z*p_y + ! This follows from PhD thesis ... res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(1,i_T,1))+ & & BS_T_grp(i_T_g)%dipoles_opt(2,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(2,i_T,1)))/2._SP + ! The quadripolar term would be similar, but involving terms of the form + ! Q_yz = r_y*p_z+r_z*p_y + ! See eq. (45) of PRB 107, 224430 (2025) + ! To check why (i) the equations are "hermitianized", and + ! (ii) with "mixed gauge" r*p in place of r*r if(l_BS_trace) then ! x*L = DIP_x*DIP_orbital; res_dich=(BS_T_grp(i_T_g)%dipoles_opt(1,i_T,1)*conjg(BS_T_grp(i_T_g)%dipoles_orb(1,i_T,1))+ & From 0223cbefa48c8dd5d98d76449035c024ebf6279e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 09:01:51 +0200 Subject: [PATCH 1178/1367] Version 5.3.0, Revision 25706, Hash c57fa7f30 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: -Fix bug for WF-IO with velocity gauge Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 4 +++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 1a68e77734..872eb33745 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25701 h.1dcbb4bb1. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25706 h.c57fa7f30. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25701 h.1dcbb4bb1' -PACKAGE_STRING='Yambo 5.3.0 r.25701 h.1dcbb4bb1' +PACKAGE_VERSION='5.3.0 r.25706 h.c57fa7f30' +PACKAGE_STRING='Yambo 5.3.0 r.25706 h.c57fa7f30' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25701 h.1dcbb4bb1 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25706 h.c57fa7f30 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25701 h.1dcbb4bb1:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25706 h.c57fa7f30:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25701 h.1dcbb4bb1 +Yambo configure 5.3.0 r.25706 h.c57fa7f30 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25701 h.1dcbb4bb1, which was +It was created by Yambo $as_me 5.3.0 r.25706 h.c57fa7f30, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25701" -SHASH="1dcbb4bb1" +SREVISION="25706" +SHASH="c57fa7f30" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25701 h.1dcbb4bb1, which was +This file was extended by Yambo $as_me 5.3.0 r.25706 h.c57fa7f30, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25701 h.1dcbb4bb1 +Yambo config.status 5.3.0 r.25706 h.c57fa7f30 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 39b351b9bb..c1d0554fe0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25701 h.1dcbb4bb1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25706 h.c57fa7f30, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25701" -SHASH="1dcbb4bb1" +SREVISION="25706" +SHASH="c57fa7f30" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index ab31695dc9..8fc850647a 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -104,8 +104,10 @@ subroutine NL_initialize(E,k) call warning('Berry phase turned off in velocity gauge') ! ! Improve parallelization in the IPA case (each k-point is independent) + ! This parallelization is not compatible with wavefunction-IO for + ! this reason I turn it off in pump-probe setup ! - if(trim(NL_Correlation)=='IPA') then + if(trim(NL_Correlation)=='IPA'.and..not.l_pump_and_probe) then l_velocity_IPA=.TRUE. call msg('rs','Fast parallelization: velocity gauge + IPA ') endif From 2a74ac659645028889050741f4dab50d17748148 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 11:13:39 +0200 Subject: [PATCH 1179/1367] Version 5.3.0, Revision 25707, Hash 0223cbefa MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: - Additions: -Added better message Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 11 ++++++----- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 872eb33745..477b2d603c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25706 h.c57fa7f30. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25707 h.0223cbefa. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25706 h.c57fa7f30' -PACKAGE_STRING='Yambo 5.3.0 r.25706 h.c57fa7f30' +PACKAGE_VERSION='5.3.0 r.25707 h.0223cbefa' +PACKAGE_STRING='Yambo 5.3.0 r.25707 h.0223cbefa' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25706 h.c57fa7f30 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25707 h.0223cbefa to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25706 h.c57fa7f30:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25707 h.0223cbefa:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25706 h.c57fa7f30 +Yambo configure 5.3.0 r.25707 h.0223cbefa generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25706 h.c57fa7f30, which was +It was created by Yambo $as_me 5.3.0 r.25707 h.0223cbefa, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25706" -SHASH="c57fa7f30" +SREVISION="25707" +SHASH="0223cbefa" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25706 h.c57fa7f30, which was +This file was extended by Yambo $as_me 5.3.0 r.25707 h.0223cbefa, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25706 h.c57fa7f30 +Yambo config.status 5.3.0 r.25707 h.0223cbefa configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c1d0554fe0..ae09a13090 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25706 h.c57fa7f30, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25707 h.0223cbefa, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25706" -SHASH="c57fa7f30" +SREVISION="25707" +SHASH="0223cbefa" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 8fc850647a..1a20928fb4 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -571,10 +571,11 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Rotation axis ',NL_rot_axis) endif endif - call msg( 'r', 'Use Dipoles ',l_use_DIPOLES) - call msg( 'r', 'Induced Field ',l_RT_induced_field) - call msg( 'r', 'Force Snd Order Dipoles ',l_force_SndOrd) - call msg( 'r', 'Evaluate Current ',l_eval_CURRENT) - call msg( 'r', 'Symmetrize current and pol ',.not.l_no_res_symms) + call msg( 'r', 'Use Dipoles ',l_use_DIPOLES) + call msg( 'r', 'Induced Field ',l_RT_induced_field) + call msg( 'r', 'Force Snd Order Dipoles ',l_force_SndOrd) + call msg( 'r', 'Evaluate Current ',l_eval_CURRENT) + call msg( 'r', 'Symmetrize current and pol ',.not.l_no_res_symms) + call msg( 'r', 'Fast parallelization (vel-IPA)',l_velocity_IPA) ! end subroutine NL_initialize From 1eedc4b4e42267125577f9fac85c1e876e963aa4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 12:33:09 +0200 Subject: [PATCH 1180/1367] Version 5.3.0, Revision 25708, Hash 2a74ac659 MODIFIED * configure include/version/version.m4 interface/INIT_fields.F nloptics/NL_project.dep Bugs: - Additions: -Cleaned input file of NL Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_fields.F | 16 ++++++++++++++-- src/nloptics/NL_project.dep | 1 - 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 477b2d603c..3d3aabe464 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25707 h.0223cbefa. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25708 h.2a74ac659. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25707 h.0223cbefa' -PACKAGE_STRING='Yambo 5.3.0 r.25707 h.0223cbefa' +PACKAGE_VERSION='5.3.0 r.25708 h.2a74ac659' +PACKAGE_STRING='Yambo 5.3.0 r.25708 h.2a74ac659' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25707 h.0223cbefa to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25708 h.2a74ac659 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25707 h.0223cbefa:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25708 h.2a74ac659:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25707 h.0223cbefa +Yambo configure 5.3.0 r.25708 h.2a74ac659 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25707 h.0223cbefa, which was +It was created by Yambo $as_me 5.3.0 r.25708 h.2a74ac659, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25707" -SHASH="0223cbefa" +SREVISION="25708" +SHASH="2a74ac659" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25707 h.0223cbefa, which was +This file was extended by Yambo $as_me 5.3.0 r.25708 h.2a74ac659, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25707 h.0223cbefa +Yambo config.status 5.3.0 r.25708 h.2a74ac659 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index ae09a13090..7730c7fa3b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25707 h.0223cbefa, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25708 h.2a74ac659, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25707" -SHASH="0223cbefa" +SREVISION="25708" +SHASH="2a74ac659" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 8c1746e242..c2395e8ec0 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -25,6 +25,7 @@ ! subroutine Afield_activate(i1) use stderr, ONLY:intc +& use drivers, ONLY:l_nl_p_and_p ! implicit none ! @@ -32,8 +33,14 @@ subroutine Afield_activate(i1) ! character(6)::field field='Field'//trim(intc(i1)) - call initactivate(1,field//'_Freq') - call initactivate(1,field//'_NFreqs') + #if defined _NL + if(l_nl_p_and_p) then + #endif + call initactivate(1,field//'_Freq') + call initactivate(1,field//'_NFreqs') + #if defined _NL + endif + #endif call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') @@ -74,8 +81,13 @@ subroutine Afield(defs,i_field) ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%frequency,unit=E_unit) +#if defined _NL + call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%n_frequencies,verb_level=V_real_time) +#else call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%n_frequencies) +#endif call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& & Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& diff --git a/src/nloptics/NL_project.dep b/src/nloptics/NL_project.dep index 6fa71a60f3..68b0c91045 100644 --- a/src/nloptics/NL_project.dep +++ b/src/nloptics/NL_project.dep @@ -1,4 +1,3 @@ - DIPOLE_symmetrize.o DIP_polarization.o EXC_macroscopic_JGM.o EXP_op.o From f4dd7e2cce19b3fb04c23d23ee7cce73618707b2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 13:54:18 +0200 Subject: [PATCH 1181/1367] Version 5.3.0, Revision 25709, Hash 1eedc4b4e MODIFIED * configure include/version/version.m4 interface/INIT_fields.F interface/INIT_load.F Bugs: - Additions: -Improved input files Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 ++++++++++---------- include/version/version.m4 | 6 +++--- src/interface/INIT_fields.F | 40 ++++++++++++++++++++++++------------- src/interface/INIT_load.F | 2 +- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 3d3aabe464..495e27ef37 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25708 h.2a74ac659. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25709 h.1eedc4b4e. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25708 h.2a74ac659' -PACKAGE_STRING='Yambo 5.3.0 r.25708 h.2a74ac659' +PACKAGE_VERSION='5.3.0 r.25709 h.1eedc4b4e' +PACKAGE_STRING='Yambo 5.3.0 r.25709 h.1eedc4b4e' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25708 h.2a74ac659 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25709 h.1eedc4b4e to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25708 h.2a74ac659:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25709 h.1eedc4b4e:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25708 h.2a74ac659 +Yambo configure 5.3.0 r.25709 h.1eedc4b4e generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25708 h.2a74ac659, which was +It was created by Yambo $as_me 5.3.0 r.25709 h.1eedc4b4e, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25708" -SHASH="2a74ac659" +SREVISION="25709" +SHASH="1eedc4b4e" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25708 h.2a74ac659, which was +This file was extended by Yambo $as_me 5.3.0 r.25709 h.1eedc4b4e, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25708 h.2a74ac659 +Yambo config.status 5.3.0 r.25709 h.1eedc4b4e configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7730c7fa3b..d7e96a9ef8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25708 h.2a74ac659, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25709 h.1eedc4b4e, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25708" -SHASH="2a74ac659" +SREVISION="25709" +SHASH="1eedc4b4e" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index c2395e8ec0..1bcc1426f9 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -25,7 +25,7 @@ ! subroutine Afield_activate(i1) use stderr, ONLY:intc -& use drivers, ONLY:l_nl_p_and_p + use drivers, ONLY:l_nl_p_and_p ! implicit none ! @@ -33,14 +33,14 @@ subroutine Afield_activate(i1) ! character(6)::field field='Field'//trim(intc(i1)) - #if defined _NL +#if defined _NL if(l_nl_p_and_p) then - #endif +#endif call initactivate(1,field//'_Freq') call initactivate(1,field//'_NFreqs') - #if defined _NL +#if defined _NL endif - #endif +#endif call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') @@ -65,7 +65,7 @@ subroutine Afield(defs,i_field) use parser_m, ONLY:parser use stderr, ONLY:intc use it_m, ONLY:E_unit,I_unit,Time_unit,V_real_time, & - & initmode,initdefs + & initmode,initdefs,V_nl_optics ! implicit none ! @@ -76,38 +76,50 @@ subroutine Afield(defs,i_field) ! character(10) :: name logical :: is_def + integer :: V_field ! name='Field'//trim(intc(i_field)) + ! + V_field=0 ! no verbosity +#if defined _NL + if(i_field==3) V_field=V_nl_optics +#endif + ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%frequency,unit=E_unit) +& Efield(i_field)%frequency,unit=E_unit,verb_level=V_field) #if defined _NL call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%n_frequencies,verb_level=V_real_time) #else call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies) +& Efield(i_field)%n_frequencies,verb_level=V_field) #endif call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& & Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& -& Efield(i_field)%intensity,unit=I_unit) +& Efield(i_field)%intensity,unit=I_unit,verb_level=V_field) call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& -& Efield(i_field)%width,unit=Time_unit(1)) +& Efield(i_field)%width,unit=Time_unit(1),verb_level=V_field) call it(defs,trim(name)//'_Chirp', '[RT '//trim(name)//'] Width',& & Efield(i_field)%chirp,unit=Time_unit(1),verb_level=V_real_time) call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& & Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& -& Efield(i_field)%ef_name) +& Efield(i_field)%ef_name,verb_level=V_field) call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& -& Efield(i_field)%ef_pol) +& Efield(i_field)%ef_pol,verb_level=V_field) call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& -& Efield(i_field)%versor) +& Efield(i_field)%versor,verb_level=V_field) call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& & Efield(i_field)%versor_circ,verb_level=V_real_time) +#if defined _NL call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& -& Efield(i_field)%t_initial,unit=Time_unit(1)) +& Efield(i_field)%t_initial,unit=Time_unit(1),verb_level=V_real_time) +#else + call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& +& Efield(i_field)%t_initial,unit=Time_unit(1),verb_level=V_field) +#endif ! if (initmode==4.and..not.infile_editing) then ! diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index a79cce2c61..c5f479df40 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -444,7 +444,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'TwoAlpha', '[RT] C_nk ~ alpha*Gamma_nk^2 ',two_alpha,Verb_level=V_real_time) call it(defs,'GrKind', '[RT] G-ret kind: Lorentzian (QP)/ Hyperbolic QP_secant (HS)',Gr_kind,Verb_level=V_real_time) call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative RADLifeTime=Phase_LifeTime)', & -& RAD_LifeTime,unit=Time_unit(1)) +& RAD_LifeTime,unit=Time_unit(1),verb_level=V_nl_optics) call it(defs,'RADmagnific','[RT] Radiative life-time magnification',RAD_magnification,Verb_level=V_real_time) call it(defs,'PhLifeTime', '[RT] Constant Dephasing Time',Phase_LifeTime,unit=Time_unit(1)) call it(defs,'DephTRange', '[RT] Time range in which Dephasing is applied',RT_deph_range,unit=Time_unit(1),Verb_level=V_real_time) From 5cef78d6c6db1fb29a6d34810e15b80c837531a3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 22:15:11 +0200 Subject: [PATCH 1182/1367] Version 5.3.0, Revision 25710, Hash f4dd7e2cc MODIFIED * configure include/version/version.m4 interface/INIT_fields.F io/io_NL.F io/variables_NL.F io/variables_RT_static.F modules/mod_fields.F nloptics/NL_Hamiltonian.F nloptics/NL_initialize.F real_time_control/RT_Rabi_frequency.F real_time_control/RT_Rabi_frequency_ALL_and_print.F real_time_control/RT_small_a.F real_time_initialize/.objects real_time_initialize/RT_initialize.F ypp/real_time/NL_ypp_driver.F ypp/real_time/RT_1D_Fourier_Transform.F ypp/real_time/RT_OBSERVABLES_IO_path.F ypp/real_time/RT_X_LRR_real_field.F DELETED * real_time_initialize/RT_Field_Commensurable_Frequencies.F Bugs: - Additions: - Changes: -Removed n_frequencies from fields Patch sent by: Claudio Attaccalite --- configure | 22 +- include/version/version.m4 | 6 +- src/interface/INIT_fields.F | 8 - src/io/io_NL.F | 8 +- src/io/variables_NL.F | 10 +- src/io/variables_RT_static.F | 3 +- src/modules/mod_fields.F | 16 +- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/NL_initialize.F | 17 +- src/real_time_control/RT_Rabi_frequency.F | 10 +- .../RT_Rabi_frequency_ALL_and_print.F | 10 +- src/real_time_control/RT_small_a.F | 346 +++++++++--------- src/real_time_initialize/.objects | 3 +- .../RT_Field_Commensurable_Frequencies.F | 70 ---- src/real_time_initialize/RT_initialize.F | 15 +- ypp/real_time/NL_ypp_driver.F | 2 +- ypp/real_time/RT_1D_Fourier_Transform.F | 2 +- ypp/real_time/RT_OBSERVABLES_IO_path.F | 11 +- ypp/real_time/RT_X_LRR_real_field.F | 1 - 19 files changed, 217 insertions(+), 345 deletions(-) delete mode 100644 src/real_time_initialize/RT_Field_Commensurable_Frequencies.F diff --git a/configure b/configure index 495e27ef37..0da1ca5374 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25709 h.1eedc4b4e. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25710 h.f4dd7e2cc. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25709 h.1eedc4b4e' -PACKAGE_STRING='Yambo 5.3.0 r.25709 h.1eedc4b4e' +PACKAGE_VERSION='5.3.0 r.25710 h.f4dd7e2cc' +PACKAGE_STRING='Yambo 5.3.0 r.25710 h.f4dd7e2cc' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25709 h.1eedc4b4e to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25710 h.f4dd7e2cc to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25709 h.1eedc4b4e:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25710 h.f4dd7e2cc:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25709 h.1eedc4b4e +Yambo configure 5.3.0 r.25710 h.f4dd7e2cc generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25709 h.1eedc4b4e, which was +It was created by Yambo $as_me 5.3.0 r.25710 h.f4dd7e2cc, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25709" -SHASH="1eedc4b4e" +SREVISION="25710" +SHASH="f4dd7e2cc" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25709 h.1eedc4b4e, which was +This file was extended by Yambo $as_me 5.3.0 r.25710 h.f4dd7e2cc, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25709 h.1eedc4b4e +Yambo config.status 5.3.0 r.25710 h.f4dd7e2cc configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d7e96a9ef8..35c0bc4f4e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25709 h.1eedc4b4e, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25710 h.f4dd7e2cc, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25709" -SHASH="1eedc4b4e" +SREVISION="25710" +SHASH="f4dd7e2cc" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 1bcc1426f9..69df78cc1c 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -37,7 +37,6 @@ subroutine Afield_activate(i1) if(l_nl_p_and_p) then #endif call initactivate(1,field//'_Freq') - call initactivate(1,field//'_NFreqs') #if defined _NL endif #endif @@ -88,13 +87,6 @@ subroutine Afield(defs,i_field) ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%frequency,unit=E_unit,verb_level=V_field) -#if defined _NL - call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies,verb_level=V_real_time) -#else - call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies,verb_level=V_field) -#endif call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& & Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& diff --git a/src/io/io_NL.F b/src/io/io_NL.F index 26ba727350..c08e4f834a 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -131,13 +131,9 @@ integer function io_NL(what,ID) call io_variable_elemental(ID_frag,VAR="[FIELDs] Damping ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/)) - call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) + call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& -& R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV) - - call def_variable_elemental(ID_frag,"Field_Freq_steps_"//trim(intc(i_Prb)),1,IP_YIO,0) - call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency steps", & -& I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/)) +& R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) call def_variable_elemental(ID_frag,"Field_Freq_step_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency step ",TERMINATOR="[eV]",& diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index cea489bec6..4ef09f9fc6 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -135,13 +135,9 @@ integer function variables_NL(ID) & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=NL_desc) - call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) - call io_variable_elemental(ID,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& -& R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV,& -& DESCRIPTOR=NL_desc) - - call def_variable_elemental(ID,"Field_Freq_steps_"//trim(intc(i_Prb)),1,IP_YIO,0) - call io_variable_elemental(ID,VAR="[FIELDs] Frequency steps",I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/),& + call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID,VAR="[FIELDs] Frequency ",TERMINATOR="[eV]",& +& R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV,& & DESCRIPTOR=NL_desc) call def_variable_elemental(ID,"Field_Freq_step_"//trim(intc(i_Prb)),1,SP,0) diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index 316c11940e..47bd08e792 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -166,9 +166,8 @@ integer function variables_RT_static(ID) & DESCRIPTOR=RT_desc,UNIT=AU2KWCMm2,TERMINATOR="[kWCMm2]") call io_variable_elemental(ID,VAR=" [FIELDs] Width ",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") call io_variable_elemental(ID,VAR=" [FIELDs] Chirp ",R0=Efield(i1)%chirp,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") - call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R1=Efield(i1)%frequency,& + call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R0=Efield(i1)%frequency,& & DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") - call io_variable_elemental(ID,VAR=" [FIELDs] Frequency steps",I0=Efield(i1)%n_frequencies,DESCRIPTOR=RT_desc) call io_variable_elemental(ID,VAR=" [FIELDs] Frequency step",R0=Efield(i1)%W_step,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") call io_variable_elemental(ID,R0=Efield(i1)%t_initial,VAR=' [FIELDs] Initial time',& diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 45c3b61c8d..25ebe3196d 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -38,8 +38,7 @@ module fields integer :: t_initial_indx ! time index of extern field switch on (input variable) real(SP) :: t_final integer :: t_final_indx ! time index of extern field switch off (computed in RT_Fluence) - integer :: n_frequencies - real(SP) :: frequency(2) + real(SP) :: frequency real(SP) :: width real(SP) :: chirp real(SP) :: FWHM @@ -106,15 +105,6 @@ real(SP) function EtoT(E,T) if (present(E)) EtoT=2._SP*pi*Time_of(E,"fs")*FS2AUT end function ! - real(SP) function field_frequency(E_field,i_f) - integer ::i_f - type(ext_field) ::E_field - field_frequency=E_field%frequency(1) - if (i_f<=1.or.E_field%n_frequencies<=1) return - field_frequency=E_field%frequency(1)+& -& (E_field%frequency(2)-E_field%frequency(1))/(E_field%n_frequencies-1)*(i_f-1) - end function - ! integer function get_field_file_index(filename) character(*) ::filename integer ::i1 @@ -133,7 +123,6 @@ subroutine Efield_duplicate(E1,E2) E2%t_final=E1%t_final E2%t_final_indx=E1%t_final_indx E2%frequency=E1%frequency - E2%n_frequencies=E1%n_frequencies E2%W_step=E1%W_step E2%width=E1%width E2%chirp=E1%chirp @@ -155,7 +144,6 @@ subroutine Efield_reset(E) E%t_final =0._SP E%t_final_indx =0 E%frequency =0._SP - E%n_frequencies=1 E%W_step =0._SP E%amplitude =0._SP E%intensity =0._SP @@ -212,7 +200,7 @@ complex(SP) function Divide_by_Field(Field,order) if (order==0) Divide_by_Field = 4._SP*cONE/Field%amplitude**2 case('QSSIN') !Approximate relations/does not work yet sigma=Field%width - W_0=Field%frequency(1) + W_0=Field%frequency T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) T = 2._SP*pi/W_0 E_w= sqrt(pi/2._SP)*Field%amplitude*sigma*exp(-cI*W_0*T_0)*& diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index d6bd82f8b1..37a520c16d 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -140,7 +140,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) !This can be calculated once for each frequency, but I did not want to mess up NL_driver (MG) alpha_ = NL_LRC_alpha if (Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN') & - & alpha_ = Alpha_ED(E,Efield(1)%frequency(1)) + & alpha_ = Alpha_ED(E,Efield(1)%frequency) E_vec_pot=E_vec_pot + alpha_*NL_P(1:3) ! elseif(Correlation==LRC) then diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1a20928fb4..57b17552c2 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -229,7 +229,7 @@ subroutine NL_initialize(E,k) ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) ! calcualte the T_0 ! - W_0=Efield(1)%frequency(1) + W_0=Efield(1)%frequency sigma=Efield(1)%width T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) if(Efield(1)%ef_name=='SPULSE') T_0=sigma @@ -297,10 +297,10 @@ subroutine NL_initialize(E,k) Sampling_Time=EtoT(E=NL_er(1))+5._SP*RT_step ! if(n_active_fields>1) then - if((Efield(2)%ef_name/='none').and.Efield(2)%frequency(1)>0._SP) & -& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(2)%frequency(1))+5._SP*RT_step/)) - if((Efield(3)%ef_name/='none').and.Efield(3)%frequency(1)>0._SP) & -& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency(1))+5._SP*RT_step/)) + if((Efield(2)%ef_name/='none').and.Efield(2)%frequency>0._SP) & +& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(2)%frequency)+5._SP*RT_step/)) + if((Efield(3)%ef_name/='none').and.Efield(3)%frequency>0._SP) & +& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency)+5._SP*RT_step/)) endif ! if (SAVE_Vb_floquet) then @@ -553,12 +553,13 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Damping ',NL_damping*HA2EV,"[eV]") call msg( 'r', 'Dephasing ',Phase_LifeTime*AUT2FS,"[fs]") call msg( 'r', 'Radiative LifeTime ',RAD_LifeTime*AUT2FS,"[fs]") - do i1=1,n_ext_fields + do i1=1,n_active_fields call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") + call msg( 'r', 'Efield Freq ',Efield(i1)%frequency*HA2EV,"[eV]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) - call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) - call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) + call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2*HA2EV) + call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**3) enddo call msg( 'r', 'Efield T_0 ',T_0*AUT2FS,"[fs]") if (.not.l_pump_and_probe) then diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index 5c6688ab4c..0eb4f21bac 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -15,7 +15,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) use R_lattice, ONLY:nkibz use electrons, ONLY:n_sp_pol,levels use X_m, ONLY:global_gauge - use fields, ONLY:Efield,field_frequency + use fields, ONLY:Efield use real_time, ONLY:RT_bands,RT_nbands use dipoles, ONLY:DIP_iR,DIP_v use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -31,7 +31,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) ! ! Workspace ! - integer :: i_fr,i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & + integer :: i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & & first_el(RT_nbands),n_of_el(RT_nbands),n_deg_grp,n_deg_states(2) logical :: vel_gauge,len_gauge real(SP) :: effective_frequency,E_trans,E_dist,delta_E @@ -40,11 +40,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) len_gauge=trim(global_gauge)=="length" vel_gauge=trim(global_gauge)=="velocity" ! - effective_frequency=0._SP - do i_fr=1,Efield(i_field)%n_frequencies - effective_frequency=effective_frequency+field_frequency(Efield(i_field),i_fr) - enddo - effective_frequency=effective_frequency/real(Efield(i_field)%n_frequencies,SP) + effective_frequency=Efield(i_field)%frequency ! RT_Rabi_frequency=rZERO E_dist=0.1_SP diff --git a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F index 4d93e55f52..cff908a246 100644 --- a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F +++ b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F @@ -15,7 +15,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) use R_lattice, ONLY:nkibz use electrons, ONLY:n_sp_pol,levels use X_m, ONLY:global_gauge - use fields, ONLY:Efield,field_frequency + use fields, ONLY:Efield use real_time, ONLY:RT_bands,RT_nbands use dipoles, ONLY:DIP_iR,DIP_v use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -30,7 +30,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! Workspace ! real(SP) :: Rabi_frequency - integer :: i_fr,i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & + integer :: i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & & first_el(RT_nbands),n_of_el(RT_nbands),n_deg_grp,n_deg_states(2) logical :: vel_gauge,len_gauge real(SP) :: effective_frequency,E_trans,E_dist,delta_E @@ -41,11 +41,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! call OUTPUT_driver('rabi_frequencies',action="append") ! - effective_frequency=0._SP - do i_fr=1,Efield(i_field)%n_frequencies - effective_frequency=effective_frequency+field_frequency(Efield(i_field),i_fr) - enddo - effective_frequency=effective_frequency/real(Efield(i_field)%n_frequencies,SP) + effective_frequency=effective_frequency+Efield(i_field)%frequency ! do i_sp_pol=1,n_sp_pol do ik=1,nkibz diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index 165bf3ba83..bb600035b7 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -57,8 +57,7 @@ function small_a(T,dt,E_field,order,envelop_only) use stderr, ONLY:STRING_split use wrapper, ONLY:FADEVA use functions, ONLY:theta_function - use fields, ONLY:ext_field,get_field_file_index,field_frequency,& - & field_from_file,n_fields_defs_max + use fields, ONLY:ext_field,get_field_file_index,field_from_file,n_fields_defs_max ! implicit none ! @@ -108,7 +107,7 @@ function small_a(T,dt,E_field,order,envelop_only) ! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) ! - n_freqs=max(1,E_field%n_frequencies) + n_freqs=1 ! field_defs="" call STRING_split(trim(E_field%ef_name),field_defs) @@ -147,7 +146,7 @@ function small_a(T,dt,E_field,order,envelop_only) if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') ! Fields which need T_0 - W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP + W_0=E_field%frequency T_0_fac=3._SP*sigma_eff if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff @@ -175,175 +174,173 @@ function small_a(T,dt,E_field,order,envelop_only) E_field%To=T_0 ! do i_field=1,n_fields - do i_fr=1,n_freqs + ! + W_field=E_field%frequency + W_field_m1=1._SP/W_field + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and + WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase + if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 + ! + if (envelop_only_) then + f0t=cONE ; f1t=cONE + else + ! CONTROL RES / ANTIRES case + cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt + ! f1t=-f0t' + f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) + if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif + if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif + endif + ! + EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) + ! + select case( trim(field_defs(1)) ) + case('FROM_FILE') + i_T=nint((T-T_0)/(dT/2._SP))+1 + if (i_T<=0.or.envelop_only_) then + f_now=0 + else + if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) + if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) + if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) + endif ! - W_field=field_frequency(E_field,i_fr) - W_field_m1=1._SP/W_field - if(W_field> 0._SP) W_field_m1=1._SP/W_field - if(W_field==0._SP) W_field_m1=0._SP - der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + case('STATIC') + if (order==0 ) f_now=T + if (order==1 ) f_now=1._SP + if (order==2 ) f_now=0._SP + ! + case('RECT') + if (order==0 ) f_now= Tloc + if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function + ! + case('RECTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function + &+theta_function(sigma-T,dT,0)*f0t*der_fac + ! + case('SIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now=+damp_func* f1t + if (order==2 ) f_now=+damp_func* f0t *der_fac ! - ! The frequency shift is applied in two cases - ! (i n_fields=2) to have a circular polarized pulse, and - WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) - ! each frequency has a different initial phase - if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) - if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 + case('SOFTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==-1) f_now=-2 + if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order== 1) f_now=+damp_func* f1t + if (order== 2) f_now=+damp_func* f0t *der_fac ! - if (envelop_only_) then - f0t=cONE ; f1t=cONE + case('THETA') + if (order==0 ) f_now=damp_func*T + if (order==1 ) f_now=damp_func + if (order==2 ) f_now=0._SP + ! + case('DELTA') + if (order==-1) f_now=1._SP + if (order==0 ) f_now=1._SP + if (order> 0 ) f_now=0._SP + ! + case('PHHG') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + sarg=pi*(T-T_0)/sigma + WT =W_field*T + if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then + f_now=0.0 + elseif(T-T_0>=sigma.and.order==0) then + Tl=sigma+T_0 + WT =W_field*Tl + f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) else - ! CONTROL RES / ANTIRES case - cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt - ! f1t=-f0t' - f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) - if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif - if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif + if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + if (order==1 ) f_now=sin(sarg)**2*cos(WT) + if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 endif ! - EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) + case('GAUSS') + if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) + if (order==1 ) f_now= Expf + if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 + ! + case('QSSIN') + ! + ! W =FADEVA function + ! W(-z)=exp(-z^2)*(1- erf (i*z)) + ! =exp(-z^2)*(1-i*erfi( z )) + ! + ! ERFI(z)=i*(exp(z^2)*W(-z)-1) + ! + if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & + & call error("chirp not implemented with QSSIN and velocity gauge") ! - select case( trim(field_defs(1)) ) - case('FROM_FILE') - i_T=nint((T-T_0)/(dT/2._SP))+1 - if (i_T<=0.or.envelop_only_) then - f_now=0 - else - if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) - if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) - if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) - endif - ! - case('STATIC') - if (order==0 ) f_now=T - if (order==1 ) f_now=1._SP - if (order==2 ) f_now=0._SP - ! - case('RECT') - if (order==0 ) f_now= Tloc - if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function - ! - case('RECTSIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function - &+theta_function(sigma-T,dT,0)*f0t*der_fac - ! - case('SIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now=+damp_func* f1t - if (order==2 ) f_now=+damp_func* f0t *der_fac - ! - case('SOFTSIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==-1) f_now=-2 - if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order== 1) f_now=+damp_func* f1t - if (order== 2) f_now=+damp_func* f0t *der_fac - ! - case('THETA') - if (order==0 ) f_now=damp_func*T - if (order==1 ) f_now=damp_func - if (order==2 ) f_now=0._SP - ! - case('DELTA') - if (order==-1) f_now=1._SP - if (order==0 ) f_now=1._SP - if (order> 0 ) f_now=0._SP - ! - case('PHHG') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - sarg=pi*(T-T_0)/sigma - WT =W_field*T - if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then - f_now=0.0 - elseif(T-T_0>=sigma.and.order==0) then - Tl=sigma+T_0 - WT =W_field*Tl - f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & - & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - else - if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & - & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - if (order==1 ) f_now=sin(sarg)**2*cos(WT) - if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 - endif - ! - case('GAUSS') - if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) - if (order==1 ) f_now= Expf - if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 - ! - case('QSSIN') - ! - ! W =FADEVA function - ! W(-z)=exp(-z^2)*(1- erf (i*z)) - ! =exp(-z^2)*(1-i*erfi( z )) - ! - ! ERFI(z)=i*(exp(z^2)*W(-z)-1) - ! - if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & - & call error("chirp not implemented with QSSIN and velocity gauge") - ! - cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) - cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) - ! - if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & - & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & - & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) - if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO - ! - if (order==0 ) f_now= erfi_z - if (order==1 ) f_now= f1t *EXPf - if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf - ! - case('QSFIELD') - ! - if (order==0 ) f_now= f1t *EXPf - if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf - if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & - & -der_fac*(T-T_0)*f1t/sigma**2 & - & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf - f_now=f_now/der_fac - ! - case('PULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - ! - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now= 0._SP - if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t - if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & - & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t - endif - ! - case('SPULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - T_0=sigma - W_0=W_field - f_now=cZERO - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & - & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & - & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & - & W_0**2*sigma**2+24))/W_0**5/sigma**4) - if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t - if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & - & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & - & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t - endif - end select + cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) + cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) + ! + if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & + & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & + & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) + if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO ! - f_t(i_field)=f_t(i_field)+f_now + if (order==0 ) f_now= erfi_z + if (order==1 ) f_now= f1t *EXPf + if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf ! - enddo + case('QSFIELD') + ! + if (order==0 ) f_now= f1t *EXPf + if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf + if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & + & -der_fac*(T-T_0)*f1t/sigma**2 & + & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf + f_now=f_now/der_fac + ! + case('PULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + ! + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now= 0._SP + if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t + if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & + & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t + endif + ! + case('SPULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + T_0=sigma + W_0=W_field + f_now=cZERO + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & + & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & + & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & + & W_0**2*sigma**2+24))/W_0**5/sigma**4) + if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t + if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & + & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & + & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t + endif + end select + ! + f_t(i_field)=f_t(i_field)+f_now + ! enddo ! - small_a=f_t/real(n_freqs,SP) + small_a=f_t ! end function small_a ! @@ -351,7 +348,7 @@ function small_a_frequency(W_i,E_field,iErr) ! use pars, ONLY:SP,cZERO,cI,pi,schlen use stderr, ONLY:STRING_split - use fields, ONLY:ext_field,n_fields_defs_max,field_frequency + use fields, ONLY:ext_field,n_fields_defs_max ! implicit none ! @@ -361,7 +358,6 @@ function small_a_frequency(W_i,E_field,iErr) complex(SP) :: W_i integer :: iErr ! - integer ::i_f real(SP) ::W_0 complex(SP) ::local_a(2) character(schlen) ::field_defs(n_fields_defs_max) @@ -372,18 +368,16 @@ function small_a_frequency(W_i,E_field,iErr) field_defs="" call STRING_split(trim(E_field%ef_name),field_defs) ! - do i_f=1,E_field%n_frequencies - W_0=field_frequency(E_field,i_f) - select case( trim(field_defs(1)) ) - case('SIN') - iErr=0 - local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES - local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES - case('DELTA') - iErr=0 - local_a=1._SP/2._SP - end select - enddo + W_0=E_field%frequency + select case( trim(field_defs(1)) ) + case('SIN') + iErr=0 + local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES + local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES + case('DELTA') + iErr=0 + local_a=1._SP/2._SP + end select ! if(trim(field_defs(2))== 'RES') local_a(2)=0._SP if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index 6bc8c2d39e..1bc86ebb73 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -3,7 +3,6 @@ ELPH_objs = RT_ELPH_initialize.o #endif #if defined _RT RT_head_objs = RT_initialize.o RT_start_and_restart.o -RT_foot_objs = RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o \ - RT_occupations_update.o +RT_foot_objs = RT_Dephasing_Matrix.o RT_G_lesser_init.o RT_occupations_update.o #endif objs = $(RT_head_objs) RT_occupations_and_levels_init.o $(RT_foot_objs) $(ELPH_objs) diff --git a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F deleted file mode 100644 index 0f4d3a79a1..0000000000 --- a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F +++ /dev/null @@ -1,70 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2011 The Yambo Team -! -! Authors (see AUTHORS file for details): AM -! -subroutine RT_Field_Commensurable_Frequencies() - ! - ! Check on the PROBE/PUMP frequencies. To be possible to find, in ypp_rt, the coefficients of the - ! Fourier series I need ALL the frequencies to be Wn=n deltaW. Therefore frequency(1) and - ! frequency(2) must be choosed accordingly. - ! - ! Moreover to extract the Fourier coefficients I need to integrate over aa Time range - ! equal to 2*pi/deltaW. This must be not larger then NE_tot_time - ! - use pars, ONLY:SP,schlen,n_fields_defs_max - use stderr, ONLY:STRING_split - use fields, ONLY:Efield,n_ext_fields,EtoT - use real_time, ONLY:NE_tot_time - ! - implicit none - ! - integer :: i_master_field,i_f,i_Pump,i_Probe - real(SP) :: W_step,T_treshold,T_step - real(SP), parameter :: treshold=0.8 - character(schlen) :: pump_defs(n_fields_defs_max),probe_defs(n_fields_defs_max) - ! - if (n_ext_fields<2) return - ! - i_Probe=1 - i_Pump =2 - ! - call STRING_split(trim(Efield(i_Pump)%ef_name),pump_defs) - call STRING_split(trim(Efield(i_Probe)%ef_name),probe_defs) - ! - if ( .not.any((/pump_defs(1)=='SIN',probe_defs(1)=='SIN'/)) ) return - ! - i_master_field=0 - if ( abs( Efield(i_Pump)%frequency(2) -Efield(i_Pump)%frequency(1) ) > epsilon(1._SP) ) i_master_field=i_Pump - if ( abs( Efield(i_Probe)%frequency(2)-Efield(i_Probe)%frequency(1)) >& -& abs( Efield(i_Pump)%frequency(2) -Efield(i_Pump)%frequency(1) ) ) i_master_field=i_Probe - ! - if (i_master_field==0) return - ! - W_step=Efield(i_master_field)%W_step - ! - T_step=EtoT(E=W_step) - T_treshold=treshold*NE_tot_time - if (T_step > treshold*NE_tot_time) then - T_step=T_treshold - W_step=EtoT(T=T_step) - endif - ! - Efield(i_master_field)%W_step=W_step - ! - do i_f=1,n_ext_fields - ! - Efield(i_f)%frequency(1)=nint(Efield(i_f)%frequency(1)/W_step)*W_step - Efield(i_f)%frequency(2)=nint(Efield(i_f)%frequency(2)/W_step)*W_step - ! - if ( abs(Efield(i_f)%frequency(1)) < 1.E-5 ) Efield(i_f)%frequency(1)=W_step - ! - Efield(i_f)%n_frequencies=nint((Efield(i_f)%frequency(2)-Efield(i_f)%frequency(1))/W_step)+1 - ! - if ( Efield(i_f)%n_frequencies == 1) Efield(i_f)%W_step=0. - ! - enddo - ! -end subroutine RT_Field_Commensurable_Frequencies diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index a12955d6a3..9688148def 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -257,7 +257,7 @@ subroutine RT_initialize(E,k,q,Dip) ! if( (field_defs(1)/='DELTA'.and.field_defs(1)/='GAUSS'.and. & & field_defs(1)/='RECT' .and.field_defs(1)/='FROM_FILE') & -& .and. Efield(i1)%frequency(1)==0._SP) & +& .and. Efield(i1)%frequency==0._SP) & & call error(trim(MSG_ch)//" field has zero frequency.") ! if(Efield(i1)%intensity==0._SP) & @@ -302,10 +302,6 @@ subroutine RT_initialize(E,k,q,Dip) ! l_NE_dynamics= l_NE_with_fields .or. l_rt_carriers_in_use ! - ! Check on the PROBE/PUMP frequencies - !==================================== - call RT_Field_Commensurable_Frequencies() - ! if ( .not. l_NE_dynamics ) call error('No external fields nor manual pumping provided') ! ! Number of K-points @@ -478,21 +474,18 @@ subroutine RT_initialize(E,k,q,Dip) MSG_ch="Field#"//trim(intc(i1)) call msg('r', trim(MSG_ch)//' field ',trim(Efield(i1)%ef_name)) call msg('r', trim(MSG_ch)//' polarization ',trim(Efield(i1)%ef_pol)) - call msg('r', trim(MSG_ch)//' frequency range ',(/Efield(i1)%frequency*HA2EV,& + call msg('r', trim(MSG_ch)//' frequency ',(/Efield(i1)%frequency*HA2EV,& & 2._SP*pi*HBAR_evfs/(Efield(i1)%frequency*HA2EV)/),'[eV/fs]') - call msg('r', trim(MSG_ch)//' elemental oscillation ',EtoT(E=Efield(i1)%frequency(2)-& -& Efield(i1)%frequency(1))*AUT2FS,'[fs]') sigma_eff=sqrt((Efield(i1)%width**4+Efield(i1)%chirp**4)/Efield(i1)%width**2) call msg('r', trim(MSG_ch)//' Fourier limited width ',Efield(i1)%width*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' Real time width ',sigma_eff*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' start time ',Efield(i1)%t_initial*AUT2FS,'[fs]') - call msg('r', trim(MSG_ch)//' energy steps ',Efield(i1)%n_frequencies) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! - U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 + U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2 call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') - call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') + call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency,'[1/mu]') ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index 9a1e0a6dec..c134bb65c7 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -124,7 +124,7 @@ subroutine NL_ypp_driver(en,k) RT_P_probe(:,i_f,i_d)=NL_P_t(:,i_d) enddo ! - Probe_frequency(i_f)=Efield(i_Probe)%frequency(1) + Probe_frequency(i_f)=Efield(i_Probe)%frequency if(loop_on_angles) Probe_versors(:,i_f)=Efield(i_Probe)%versor(:) ! if(io_Nonlinear_REF==0) then diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 0108478fba..86160f9359 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -131,7 +131,7 @@ subroutine RT_1D_Fourier_Chirp(FT,RT) FT%F_t=cZERO_DP dw=(FT%W(2)-FT%W(1)) do i_w = 1, RT%W_n_steps - chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency(1))**2) + chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency)**2) enddo ! if (l_live_timing) call live_timing('FT-CHIRP@'//trim(FT%title)//'',RT%T_n_steps*FT%N) diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index e7739aace2..1f88b67845 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -113,7 +113,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) call IO_temporary_jobdir_and_strings("JOBSTR",Pump_path) call RT_OBSERVABLES_IO(what=what,IO_error=IO_error,first_sec_only=.TRUE.,COM_=NONE) if (.not.IO_error) then - N_pump_frequencies= Efield(i_Pump)%n_frequencies + N_pump_frequencies= 1 call IO_desc_reset(Pump_RT_desc) call IO_desc_duplicate(RT_desc,Pump_RT_desc) if (N_pump_frequencies>1) call error('Pumps with multiple frequencies still not supported') @@ -129,7 +129,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) if (.not.STRING_same(Probe_path(i_f),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(i_f)) if ( STRING_same(Probe_path(i_f),"default")) call IO_temporary_jobdir_and_strings("ALL","RESTORE") call RT_OBSERVABLES_IO(what=what,IO_error=IO_error,first_sec_only=.TRUE.,COM_=NONE) - N_probe_frequencies= Efield(i_Probe)%n_frequencies + N_probe_frequencies= 1 enddo ! ! Pump & Probe comparison @@ -168,13 +168,6 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! I can use ANTIRES/RES probes with multiple frequencies only by using ! ProbeKey in the input file. This is because of the procedures defined in X_effective/X_inversion. ! - if (Efield(i_Probe)%n_frequencies>1) then - if (X_order==1) call warning("Using multi-frequency probe") - if (X_order/=1) then - call warning("Multi-frequency probe not supported for NL optics") - IO_error=.TRUE. - endif - endif if (.not.IO_error) N_probes=1 ! ! If no Probes using the Keyword try using jobstr diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index f49ffb211b..64b83823bb 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -55,7 +55,6 @@ subroutine RT_X_LRR_real_field(en) n_freqs=1 n_fields=1 if(trim(Efield(i_Probe)%ef_pol)=="circular") n_fields=2 - if( Efield(i_Probe)%n_frequencies > 1 ) n_freqs=Efield(i_Probe)%n_frequencies ! ! 1D FFT setup !-------------- From 21dd9685d010b4d0dbae0e96a40b6cd394b1cbb6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 22:17:49 +0200 Subject: [PATCH 1183/1367] Version 5.3.0, Revision 25711, Hash 5cef78d6c MODIFIED * configure include/version/version.m4 interface/INIT_fields.F Bugs: - Additions: - Changes: -Removed DFreq Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_fields.F | 3 --- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 0da1ca5374..0f34b303c2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25710 h.f4dd7e2cc. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25711 h.5cef78d6c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25710 h.f4dd7e2cc' -PACKAGE_STRING='Yambo 5.3.0 r.25710 h.f4dd7e2cc' +PACKAGE_VERSION='5.3.0 r.25711 h.5cef78d6c' +PACKAGE_STRING='Yambo 5.3.0 r.25711 h.5cef78d6c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25710 h.f4dd7e2cc to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25711 h.5cef78d6c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25710 h.f4dd7e2cc:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25711 h.5cef78d6c:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25710 h.f4dd7e2cc +Yambo configure 5.3.0 r.25711 h.5cef78d6c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25710 h.f4dd7e2cc, which was +It was created by Yambo $as_me 5.3.0 r.25711 h.5cef78d6c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25710" -SHASH="f4dd7e2cc" +SREVISION="25711" +SHASH="5cef78d6c" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25710 h.f4dd7e2cc, which was +This file was extended by Yambo $as_me 5.3.0 r.25711 h.5cef78d6c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25710 h.f4dd7e2cc +Yambo config.status 5.3.0 r.25711 h.5cef78d6c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 35c0bc4f4e..11ef6c7897 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25710 h.f4dd7e2cc, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25711 h.5cef78d6c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25710" -SHASH="f4dd7e2cc" +SREVISION="25711" +SHASH="5cef78d6c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 69df78cc1c..df064f92f5 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -40,7 +40,6 @@ subroutine Afield_activate(i1) #if defined _NL endif #endif - call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') call initactivate(1,field//'_Chirp') @@ -87,8 +86,6 @@ subroutine Afield(defs,i_field) ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%frequency,unit=E_unit,verb_level=V_field) - call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& -& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& & Efield(i_field)%intensity,unit=I_unit,verb_level=V_field) call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& From e9d442bff617804e203d65c6c8d7a6687ff9be77 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 15 Oct 2025 22:26:58 +0200 Subject: [PATCH 1184/1367] Version 5.3.0, Revision 25712, Hash 21dd9685d MODIFIED * configure include/version/version.m4 real_time_control/.objects RENAMED * real_time_control/RT_small_a.F -> real_time_control/small_a.F Bugs: - Additions: - Changes: -Better file name Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/real_time_control/.objects | 2 +- .../{RT_small_a.F => small_a.F} | 0 4 files changed, 15 insertions(+), 15 deletions(-) rename src/real_time_control/{RT_small_a.F => small_a.F} (100%) diff --git a/configure b/configure index 0f34b303c2..c28ba1d248 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25711 h.5cef78d6c. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25712 h.21dd9685d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25711 h.5cef78d6c' -PACKAGE_STRING='Yambo 5.3.0 r.25711 h.5cef78d6c' +PACKAGE_VERSION='5.3.0 r.25712 h.21dd9685d' +PACKAGE_STRING='Yambo 5.3.0 r.25712 h.21dd9685d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25711 h.5cef78d6c to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25712 h.21dd9685d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25711 h.5cef78d6c:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25712 h.21dd9685d:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25711 h.5cef78d6c +Yambo configure 5.3.0 r.25712 h.21dd9685d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25711 h.5cef78d6c, which was +It was created by Yambo $as_me 5.3.0 r.25712 h.21dd9685d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25711" -SHASH="5cef78d6c" +SREVISION="25712" +SHASH="21dd9685d" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25711 h.5cef78d6c, which was +This file was extended by Yambo $as_me 5.3.0 r.25712 h.21dd9685d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25711 h.5cef78d6c +Yambo config.status 5.3.0 r.25712 h.21dd9685d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 11ef6c7897..576520f946 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25711 h.5cef78d6c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25712 h.21dd9685d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25711" -SHASH="5cef78d6c" +SREVISION="25712" +SHASH="21dd9685d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index e46d6cdb05..dd0365ff03 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o RT_small_a.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/small_a.F similarity index 100% rename from src/real_time_control/RT_small_a.F rename to src/real_time_control/small_a.F From 39551935fe9e04be15078cc1e503d30ba651559b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 11:47:12 +0200 Subject: [PATCH 1185/1367] Version 5.3.0, Revision 25713, Hash e9d442bff MODIFIED * configure include/version/version.m4 real_time_control/.objects real_time_control/DOUBLE_project.dep real_time_control/RT_project.dep real_time_control/small_a.F real_time_initialize/DOUBLE_project.dep real_time_initialize/RT_project.dep NEW * real_time_control/small_a_frequency.F Bugs: - Additions: - Changes: -File split in two Patch sent by: Claudio Attaccalite --- configure | 22 +++--- include/version/version.m4 | 6 +- src/real_time_control/.objects | 2 +- src/real_time_control/DOUBLE_project.dep | 2 +- src/real_time_control/RT_project.dep | 2 +- src/real_time_control/small_a.F | 41 ----------- src/real_time_control/small_a_frequency.F | 81 +++++++++++++++++++++ src/real_time_initialize/DOUBLE_project.dep | 1 - src/real_time_initialize/RT_project.dep | 1 - 9 files changed, 98 insertions(+), 60 deletions(-) create mode 100644 src/real_time_control/small_a_frequency.F diff --git a/configure b/configure index c28ba1d248..f820c32791 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25712 h.21dd9685d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25713 h.e9d442bff. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25712 h.21dd9685d' -PACKAGE_STRING='Yambo 5.3.0 r.25712 h.21dd9685d' +PACKAGE_VERSION='5.3.0 r.25713 h.e9d442bff' +PACKAGE_STRING='Yambo 5.3.0 r.25713 h.e9d442bff' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25712 h.21dd9685d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25713 h.e9d442bff to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25712 h.21dd9685d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25713 h.e9d442bff:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25712 h.21dd9685d +Yambo configure 5.3.0 r.25713 h.e9d442bff generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25712 h.21dd9685d, which was +It was created by Yambo $as_me 5.3.0 r.25713 h.e9d442bff, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25712" -SHASH="21dd9685d" +SREVISION="25713" +SHASH="e9d442bff" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25712 h.21dd9685d, which was +This file was extended by Yambo $as_me 5.3.0 r.25713 h.e9d442bff, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25712 h.21dd9685d +Yambo config.status 5.3.0 r.25713 h.e9d442bff configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 576520f946..a9f66f5421 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25712 h.21dd9685d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25713 h.e9d442bff, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25712" -SHASH="21dd9685d" +SREVISION="25713" +SHASH="e9d442bff" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index dd0365ff03..f56b6080b5 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.a \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/DOUBLE_project.dep b/src/real_time_control/DOUBLE_project.dep index 07a445dff3..f1eb13de43 100644 --- a/src/real_time_control/DOUBLE_project.dep +++ b/src/real_time_control/DOUBLE_project.dep @@ -28,6 +28,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o - RT_small_a.o RT_update_TIME_CONF_descriptions.o + small_a.o diff --git a/src/real_time_control/RT_project.dep b/src/real_time_control/RT_project.dep index 07a445dff3..f1eb13de43 100644 --- a/src/real_time_control/RT_project.dep +++ b/src/real_time_control/RT_project.dep @@ -28,6 +28,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o - RT_small_a.o RT_update_TIME_CONF_descriptions.o + small_a.o diff --git a/src/real_time_control/small_a.F b/src/real_time_control/small_a.F index bb600035b7..466d2032ed 100644 --- a/src/real_time_control/small_a.F +++ b/src/real_time_control/small_a.F @@ -344,44 +344,3 @@ function small_a(T,dt,E_field,order,envelop_only) ! end function small_a ! -function small_a_frequency(W_i,E_field,iErr) - ! - use pars, ONLY:SP,cZERO,cI,pi,schlen - use stderr, ONLY:STRING_split - use fields, ONLY:ext_field,n_fields_defs_max - ! - implicit none - ! - complex(SP) :: small_a_frequency - ! - type(ext_field) :: E_field - complex(SP) :: W_i - integer :: iErr - ! - real(SP) ::W_0 - complex(SP) ::local_a(2) - character(schlen) ::field_defs(n_fields_defs_max) - ! - iErr=-1 - local_a=cZERO - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - W_0=E_field%frequency - select case( trim(field_defs(1)) ) - case('SIN') - iErr=0 - local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES - local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES - case('DELTA') - iErr=0 - local_a=1._SP/2._SP - end select - ! - if(trim(field_defs(2))== 'RES') local_a(2)=0._SP - if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP - ! - small_a_frequency=local_a(1)+local_a(2) - ! -end function small_a_frequency diff --git a/src/real_time_control/small_a_frequency.F b/src/real_time_control/small_a_frequency.F new file mode 100644 index 0000000000..cfbb5e3d2c --- /dev/null +++ b/src/real_time_control/small_a_frequency.F @@ -0,0 +1,81 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM CA DS +! +! External fields: +! +! SIN: E(t)=\theta(t) * sin(t) +! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 +! DELTA: E(t)= \delta(t) +! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) +! THETA: E(t)= \theta(t) +! RES: E(t)= \theta(t)*exp(-i\omega t) +! ANTIRES: E(t)= \theta(t)*exp(i\omega t) +! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) +! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) +! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) +! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) +! QSFIELD: see below +! FROMFILE: shape of the electric field from file +! +! Linear frequency chirp coded for QSSIN pulse: +! (see also https://www.rp-photonics.com/chirp.html) +! +! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) +! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) +! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) +! +! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! +! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) +! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] +! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! +! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) +! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] +! +! +function small_a_frequency(W_i,E_field,iErr) + ! + use pars, ONLY:SP,cZERO,cI,pi,schlen + use stderr, ONLY:STRING_split + use fields, ONLY:ext_field,n_fields_defs_max + ! + implicit none + ! + complex(SP) :: small_a_frequency + ! + type(ext_field) :: E_field + complex(SP) :: W_i + integer :: iErr + ! + real(SP) ::W_0 + complex(SP) ::local_a(2) + character(schlen) ::field_defs(n_fields_defs_max) + ! + iErr=-1 + local_a=cZERO + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + W_0=E_field%frequency + select case( trim(field_defs(1)) ) + case('SIN') + iErr=0 + local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES + local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES + case('DELTA') + iErr=0 + local_a=1._SP/2._SP + end select + ! + if(trim(field_defs(2))== 'RES') local_a(2)=0._SP + if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP + ! + small_a_frequency=local_a(1)+local_a(2) + ! +end function small_a_frequency diff --git a/src/real_time_initialize/DOUBLE_project.dep b/src/real_time_initialize/DOUBLE_project.dep index c350f2f4de..aa30fd3003 100644 --- a/src/real_time_initialize/DOUBLE_project.dep +++ b/src/real_time_initialize/DOUBLE_project.dep @@ -1,6 +1,5 @@ RT_Dephasing_Matrix.o RT_ELPH_initialize.o - RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_initialize.o RT_occupations_and_levels_init.o diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index 7d13d8b4e4..6ff0d7b761 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,5 +1,4 @@ RT_Dephasing_Matrix.o - RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_initialize.o RT_occupations_and_levels_init.o From 6539a727bffd1ec4f33995d3f066702d04f73f50 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 12:07:30 +0200 Subject: [PATCH 1186/1367] Fixed names Version 5.3.0, Revision 25714, Hash 39551935f MODIFIED * configure include/version/version.m4 real_time_control/.objects Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/real_time_control/.objects | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f820c32791..c24e7ad80b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25713 h.e9d442bff. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25714 h.39551935f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25713 h.e9d442bff' -PACKAGE_STRING='Yambo 5.3.0 r.25713 h.e9d442bff' +PACKAGE_VERSION='5.3.0 r.25714 h.39551935f' +PACKAGE_STRING='Yambo 5.3.0 r.25714 h.39551935f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25713 h.e9d442bff to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25714 h.39551935f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25713 h.e9d442bff:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25714 h.39551935f:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25713 h.e9d442bff +Yambo configure 5.3.0 r.25714 h.39551935f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25713 h.e9d442bff, which was +It was created by Yambo $as_me 5.3.0 r.25714 h.39551935f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25713" -SHASH="e9d442bff" +SREVISION="25714" +SHASH="39551935f" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25713 h.e9d442bff, which was +This file was extended by Yambo $as_me 5.3.0 r.25714 h.39551935f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25713 h.e9d442bff +Yambo config.status 5.3.0 r.25714 h.39551935f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a9f66f5421..e65cce1d0e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25713 h.e9d442bff, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25714 h.39551935f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25713" -SHASH="e9d442bff" +SREVISION="25714" +SHASH="39551935f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index f56b6080b5..89e2211be4 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.a \ + RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ From bbf2c910b096e34ec59417b2ac5c726a91d2d5a8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 13:31:18 +0200 Subject: [PATCH 1187/1367] Revert "Version 5.3.0, Revision 25709, Hash 1eedc4b4e" This reverts commit f4dd7e2cce19b3fb04c23d23ee7cce73618707b2. --- configure | 22 +++---- include/version/version.m4 | 6 +- src/interface/INIT_fields.F | 125 ------------------------------------ src/interface/INIT_load.F | 2 +- 4 files changed, 15 insertions(+), 140 deletions(-) delete mode 100644 src/interface/INIT_fields.F diff --git a/configure b/configure index c24e7ad80b..a81feae821 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25714 h.39551935f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25715 h.6539a727b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25714 h.39551935f' -PACKAGE_STRING='Yambo 5.3.0 r.25714 h.39551935f' +PACKAGE_VERSION='5.3.0 r.25715 h.6539a727b' +PACKAGE_STRING='Yambo 5.3.0 r.25715 h.6539a727b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25714 h.39551935f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25715 h.6539a727b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25714 h.39551935f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25715 h.6539a727b:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25714 h.39551935f +Yambo configure 5.3.0 r.25715 h.6539a727b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25714 h.39551935f, which was +It was created by Yambo $as_me 5.3.0 r.25715 h.6539a727b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25714" -SHASH="39551935f" +SREVISION="25715" +SHASH="6539a727b" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25714 h.39551935f, which was +This file was extended by Yambo $as_me 5.3.0 r.25715 h.6539a727b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25714 h.39551935f +Yambo config.status 5.3.0 r.25715 h.6539a727b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index e65cce1d0e..7254b62090 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25714 h.39551935f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25715 h.6539a727b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25714" -SHASH="39551935f" +SREVISION="25715" +SHASH="6539a727b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F deleted file mode 100644 index df064f92f5..0000000000 --- a/src/interface/INIT_fields.F +++ /dev/null @@ -1,125 +0,0 @@ -! -! Copyright (C) 2000-2022 the YAMBO team -! http://www.yambo-code.org -! -! Authors (see AUTHORS file for details): AM DS -! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! -#if defined _RT || defined _NL -! -subroutine Afield_activate(i1) - use stderr, ONLY:intc - use drivers, ONLY:l_nl_p_and_p - ! - implicit none - ! - integer, intent(in) ::i1 - ! - character(6)::field - field='Field'//trim(intc(i1)) -#if defined _NL - if(l_nl_p_and_p) then -#endif - call initactivate(1,field//'_Freq') -#if defined _NL - endif -#endif - call initactivate(1,field//'_Int') - call initactivate(1,field//'_Width') - call initactivate(1,field//'_Chirp') - call initactivate(1,field//'_FWHM') - call initactivate(1,field//'_kind') - call initactivate(1,field//'_pol') - call initactivate(1,field//'_Dir') - call initactivate(1,field//'_Dir_circ') - call initactivate(1,field//'_Tstart') -end subroutine -! -! -subroutine Afield(defs,i_field) - ! - use it_tools, ONLY:it - use pars, ONLY:SP - use drivers, ONLY:infile_editing - use C_driver, ONLY:code_bin - use fields, ONLY:Efield,n_ext_fields - use units, ONLY:AU2KWCMm2 - use parser_m, ONLY:parser - use stderr, ONLY:intc - use it_m, ONLY:E_unit,I_unit,Time_unit,V_real_time, & - & initmode,initdefs,V_nl_optics - ! - implicit none - ! - integer, intent(in):: i_field - type(initdefs) :: defs - ! - ! Workspace - ! - character(10) :: name - logical :: is_def - integer :: V_field - ! - name='Field'//trim(intc(i_field)) - ! - V_field=0 ! no verbosity -#if defined _NL - if(i_field==3) V_field=V_nl_optics -#endif - - ! - call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%frequency,unit=E_unit,verb_level=V_field) - call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& -& Efield(i_field)%intensity,unit=I_unit,verb_level=V_field) - call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& -& Efield(i_field)%width,unit=Time_unit(1),verb_level=V_field) - call it(defs,trim(name)//'_Chirp', '[RT '//trim(name)//'] Width',& -& Efield(i_field)%chirp,unit=Time_unit(1),verb_level=V_real_time) - call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& -& Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) - call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& -& Efield(i_field)%ef_name,verb_level=V_field) - call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& -& Efield(i_field)%ef_pol,verb_level=V_field) - call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& -& Efield(i_field)%versor,verb_level=V_field) - call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& -& Efield(i_field)%versor_circ,verb_level=V_real_time) -#if defined _NL - call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& -& Efield(i_field)%t_initial,unit=Time_unit(1),verb_level=V_real_time) -#else - call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& -& Efield(i_field)%t_initial,unit=Time_unit(1),verb_level=V_field) -#endif - ! - if (initmode==4.and..not.infile_editing) then - ! - call parser(trim(name)//'_FWHM',is_def) - if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) - if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) - ! - if (trim(Efield(i_field)%ef_name)/='none'.and.index(code_bin,'ypp')==0) n_ext_fields=n_ext_fields+1 - ! - endif - ! -end subroutine -! -#endif diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index c5f479df40..a79cce2c61 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -444,7 +444,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'TwoAlpha', '[RT] C_nk ~ alpha*Gamma_nk^2 ',two_alpha,Verb_level=V_real_time) call it(defs,'GrKind', '[RT] G-ret kind: Lorentzian (QP)/ Hyperbolic QP_secant (HS)',Gr_kind,Verb_level=V_real_time) call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative RADLifeTime=Phase_LifeTime)', & -& RAD_LifeTime,unit=Time_unit(1),verb_level=V_nl_optics) +& RAD_LifeTime,unit=Time_unit(1)) call it(defs,'RADmagnific','[RT] Radiative life-time magnification',RAD_magnification,Verb_level=V_real_time) call it(defs,'PhLifeTime', '[RT] Constant Dephasing Time',Phase_LifeTime,unit=Time_unit(1)) call it(defs,'DephTRange', '[RT] Time range in which Dephasing is applied',RT_deph_range,unit=Time_unit(1),Verb_level=V_real_time) From 120ee26a3fb176d53df8f4fa2cadc409c307cbf0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 13:34:06 +0200 Subject: [PATCH 1188/1367] Version 5.3.0, Revision 25716, Hash bbf2c910b MODIFIED * configure include/version/version.m4 NEW * interface/INIT_fields.F Bugs: - Additions: -Missing file Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++---- include/version/version.m4 | 6 +- src/interface/INIT_fields.F | 112 ++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 14 deletions(-) create mode 100644 src/interface/INIT_fields.F diff --git a/configure b/configure index a81feae821..b06241bd3f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25715 h.6539a727b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25716 h.bbf2c910b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25715 h.6539a727b' -PACKAGE_STRING='Yambo 5.3.0 r.25715 h.6539a727b' +PACKAGE_VERSION='5.3.0 r.25716 h.bbf2c910b' +PACKAGE_STRING='Yambo 5.3.0 r.25716 h.bbf2c910b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25715 h.6539a727b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25716 h.bbf2c910b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25715 h.6539a727b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25716 h.bbf2c910b:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25715 h.6539a727b +Yambo configure 5.3.0 r.25716 h.bbf2c910b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25715 h.6539a727b, which was +It was created by Yambo $as_me 5.3.0 r.25716 h.bbf2c910b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25715" -SHASH="6539a727b" +SREVISION="25716" +SHASH="bbf2c910b" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25715 h.6539a727b, which was +This file was extended by Yambo $as_me 5.3.0 r.25716 h.bbf2c910b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25715 h.6539a727b +Yambo config.status 5.3.0 r.25716 h.bbf2c910b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7254b62090..746dcb3c39 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25715 h.6539a727b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25716 h.bbf2c910b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25715" -SHASH="6539a727b" +SREVISION="25716" +SHASH="bbf2c910b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F new file mode 100644 index 0000000000..8c1746e242 --- /dev/null +++ b/src/interface/INIT_fields.F @@ -0,0 +1,112 @@ +! +! Copyright (C) 2000-2022 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +#if defined _RT || defined _NL +! +subroutine Afield_activate(i1) + use stderr, ONLY:intc + ! + implicit none + ! + integer, intent(in) ::i1 + ! + character(6)::field + field='Field'//trim(intc(i1)) + call initactivate(1,field//'_Freq') + call initactivate(1,field//'_NFreqs') + call initactivate(1,field//'_DFreq') + call initactivate(1,field//'_Int') + call initactivate(1,field//'_Width') + call initactivate(1,field//'_Chirp') + call initactivate(1,field//'_FWHM') + call initactivate(1,field//'_kind') + call initactivate(1,field//'_pol') + call initactivate(1,field//'_Dir') + call initactivate(1,field//'_Dir_circ') + call initactivate(1,field//'_Tstart') +end subroutine +! +! +subroutine Afield(defs,i_field) + ! + use it_tools, ONLY:it + use pars, ONLY:SP + use drivers, ONLY:infile_editing + use C_driver, ONLY:code_bin + use fields, ONLY:Efield,n_ext_fields + use units, ONLY:AU2KWCMm2 + use parser_m, ONLY:parser + use stderr, ONLY:intc + use it_m, ONLY:E_unit,I_unit,Time_unit,V_real_time, & + & initmode,initdefs + ! + implicit none + ! + integer, intent(in):: i_field + type(initdefs) :: defs + ! + ! Workspace + ! + character(10) :: name + logical :: is_def + ! + name='Field'//trim(intc(i_field)) + ! + call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%frequency,unit=E_unit) + call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%n_frequencies) + call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& +& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) + call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& +& Efield(i_field)%intensity,unit=I_unit) + call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& +& Efield(i_field)%width,unit=Time_unit(1)) + call it(defs,trim(name)//'_Chirp', '[RT '//trim(name)//'] Width',& +& Efield(i_field)%chirp,unit=Time_unit(1),verb_level=V_real_time) + call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& +& Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) + call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& +& Efield(i_field)%ef_name) + call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& +& Efield(i_field)%ef_pol) + call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& +& Efield(i_field)%versor) + call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& +& Efield(i_field)%versor_circ,verb_level=V_real_time) + call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& +& Efield(i_field)%t_initial,unit=Time_unit(1)) + ! + if (initmode==4.and..not.infile_editing) then + ! + call parser(trim(name)//'_FWHM',is_def) + if ( is_def) Efield(i_field)%width=Efield(i_field)%FWHM/(2._SP*sqrt(2._SP*log(2._SP))) + if (.not.is_def) Efield(i_field)%FWHM=Efield(i_field)%width*(2._SP*sqrt(2._SP*log(2._SP))) + ! + if (trim(Efield(i_field)%ef_name)/='none'.and.index(code_bin,'ypp')==0) n_ext_fields=n_ext_fields+1 + ! + endif + ! +end subroutine +! +#endif From 85f6680c3038e7f016e8af6b13b6b1ae6ae7873b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 13:39:21 +0200 Subject: [PATCH 1189/1367] Revert "Version 5.3.0, Revision 25709, Hash 1eedc4b4e" This reverts commit f4dd7e2cce19b3fb04c23d23ee7cce73618707b2. --- configure | 22 +- include/version/version.m4 | 6 +- src/interface/INIT_fields.F | 16 +- src/io/io_NL.F | 8 +- src/io/variables_NL.F | 10 +- src/io/variables_RT_static.F | 3 +- src/modules/mod_fields.F | 16 +- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/NL_initialize.F | 17 +- src/real_time_control/.objects | 2 +- src/real_time_control/DOUBLE_project.dep | 2 +- src/real_time_control/RT_Rabi_frequency.F | 10 +- .../RT_Rabi_frequency_ALL_and_print.F | 10 +- src/real_time_control/RT_project.dep | 2 +- src/real_time_control/RT_small_a.F | 393 ++++++++++++++++++ src/real_time_control/small_a.F | 346 --------------- src/real_time_control/small_a_frequency.F | 81 ---- src/real_time_initialize/.objects | 3 +- src/real_time_initialize/DOUBLE_project.dep | 1 + .../RT_Field_Commensurable_Frequencies.F | 70 ++++ src/real_time_initialize/RT_initialize.F | 15 +- src/real_time_initialize/RT_project.dep | 1 + ypp/real_time/NL_ypp_driver.F | 2 +- ypp/real_time/RT_1D_Fourier_Transform.F | 2 +- ypp/real_time/RT_OBSERVABLES_IO_path.F | 11 +- ypp/real_time/RT_X_LRR_real_field.F | 1 + 26 files changed, 573 insertions(+), 479 deletions(-) create mode 100644 src/real_time_control/RT_small_a.F delete mode 100644 src/real_time_control/small_a.F delete mode 100644 src/real_time_control/small_a_frequency.F create mode 100644 src/real_time_initialize/RT_Field_Commensurable_Frequencies.F diff --git a/configure b/configure index b06241bd3f..72dd60243d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25716 h.bbf2c910b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25717 h.120ee26a3. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25716 h.bbf2c910b' -PACKAGE_STRING='Yambo 5.3.0 r.25716 h.bbf2c910b' +PACKAGE_VERSION='5.3.0 r.25717 h.120ee26a3' +PACKAGE_STRING='Yambo 5.3.0 r.25717 h.120ee26a3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25716 h.bbf2c910b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25717 h.120ee26a3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25716 h.bbf2c910b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25717 h.120ee26a3:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25716 h.bbf2c910b +Yambo configure 5.3.0 r.25717 h.120ee26a3 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25716 h.bbf2c910b, which was +It was created by Yambo $as_me 5.3.0 r.25717 h.120ee26a3, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25716" -SHASH="bbf2c910b" +SREVISION="25717" +SHASH="120ee26a3" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25716 h.bbf2c910b, which was +This file was extended by Yambo $as_me 5.3.0 r.25717 h.120ee26a3, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25716 h.bbf2c910b +Yambo config.status 5.3.0 r.25717 h.120ee26a3 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 746dcb3c39..c07f9d0ba0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25716 h.bbf2c910b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25717 h.120ee26a3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25716" -SHASH="bbf2c910b" +SREVISION="25717" +SHASH="120ee26a3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 8c1746e242..c2395e8ec0 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -25,6 +25,7 @@ ! subroutine Afield_activate(i1) use stderr, ONLY:intc +& use drivers, ONLY:l_nl_p_and_p ! implicit none ! @@ -32,8 +33,14 @@ subroutine Afield_activate(i1) ! character(6)::field field='Field'//trim(intc(i1)) - call initactivate(1,field//'_Freq') - call initactivate(1,field//'_NFreqs') + #if defined _NL + if(l_nl_p_and_p) then + #endif + call initactivate(1,field//'_Freq') + call initactivate(1,field//'_NFreqs') + #if defined _NL + endif + #endif call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') @@ -74,8 +81,13 @@ subroutine Afield(defs,i_field) ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%frequency,unit=E_unit) +#if defined _NL + call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& +& Efield(i_field)%n_frequencies,verb_level=V_real_time) +#else call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%n_frequencies) +#endif call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& & Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& diff --git a/src/io/io_NL.F b/src/io/io_NL.F index c08e4f834a..26ba727350 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -131,9 +131,13 @@ integer function io_NL(what,ID) call io_variable_elemental(ID_frag,VAR="[FIELDs] Damping ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/)) - call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) + call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& -& R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) +& R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV) + + call def_variable_elemental(ID_frag,"Field_Freq_steps_"//trim(intc(i_Prb)),1,IP_YIO,0) + call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency steps", & +& I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/)) call def_variable_elemental(ID_frag,"Field_Freq_step_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency step ",TERMINATOR="[eV]",& diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 4ef09f9fc6..cea489bec6 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -135,9 +135,13 @@ integer function variables_NL(ID) & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=NL_desc) - call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) - call io_variable_elemental(ID,VAR="[FIELDs] Frequency ",TERMINATOR="[eV]",& -& R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV,& + call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) + call io_variable_elemental(ID,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& +& R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV,& +& DESCRIPTOR=NL_desc) + + call def_variable_elemental(ID,"Field_Freq_steps_"//trim(intc(i_Prb)),1,IP_YIO,0) + call io_variable_elemental(ID,VAR="[FIELDs] Frequency steps",I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=NL_desc) call def_variable_elemental(ID,"Field_Freq_step_"//trim(intc(i_Prb)),1,SP,0) diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index 47bd08e792..316c11940e 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -166,8 +166,9 @@ integer function variables_RT_static(ID) & DESCRIPTOR=RT_desc,UNIT=AU2KWCMm2,TERMINATOR="[kWCMm2]") call io_variable_elemental(ID,VAR=" [FIELDs] Width ",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") call io_variable_elemental(ID,VAR=" [FIELDs] Chirp ",R0=Efield(i1)%chirp,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") - call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R0=Efield(i1)%frequency,& + call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R1=Efield(i1)%frequency,& & DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") + call io_variable_elemental(ID,VAR=" [FIELDs] Frequency steps",I0=Efield(i1)%n_frequencies,DESCRIPTOR=RT_desc) call io_variable_elemental(ID,VAR=" [FIELDs] Frequency step",R0=Efield(i1)%W_step,& & CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") call io_variable_elemental(ID,R0=Efield(i1)%t_initial,VAR=' [FIELDs] Initial time',& diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 25ebe3196d..45c3b61c8d 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -38,7 +38,8 @@ module fields integer :: t_initial_indx ! time index of extern field switch on (input variable) real(SP) :: t_final integer :: t_final_indx ! time index of extern field switch off (computed in RT_Fluence) - real(SP) :: frequency + integer :: n_frequencies + real(SP) :: frequency(2) real(SP) :: width real(SP) :: chirp real(SP) :: FWHM @@ -105,6 +106,15 @@ real(SP) function EtoT(E,T) if (present(E)) EtoT=2._SP*pi*Time_of(E,"fs")*FS2AUT end function ! + real(SP) function field_frequency(E_field,i_f) + integer ::i_f + type(ext_field) ::E_field + field_frequency=E_field%frequency(1) + if (i_f<=1.or.E_field%n_frequencies<=1) return + field_frequency=E_field%frequency(1)+& +& (E_field%frequency(2)-E_field%frequency(1))/(E_field%n_frequencies-1)*(i_f-1) + end function + ! integer function get_field_file_index(filename) character(*) ::filename integer ::i1 @@ -123,6 +133,7 @@ subroutine Efield_duplicate(E1,E2) E2%t_final=E1%t_final E2%t_final_indx=E1%t_final_indx E2%frequency=E1%frequency + E2%n_frequencies=E1%n_frequencies E2%W_step=E1%W_step E2%width=E1%width E2%chirp=E1%chirp @@ -144,6 +155,7 @@ subroutine Efield_reset(E) E%t_final =0._SP E%t_final_indx =0 E%frequency =0._SP + E%n_frequencies=1 E%W_step =0._SP E%amplitude =0._SP E%intensity =0._SP @@ -200,7 +212,7 @@ complex(SP) function Divide_by_Field(Field,order) if (order==0) Divide_by_Field = 4._SP*cONE/Field%amplitude**2 case('QSSIN') !Approximate relations/does not work yet sigma=Field%width - W_0=Field%frequency + W_0=Field%frequency(1) T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) T = 2._SP*pi/W_0 E_w= sqrt(pi/2._SP)*Field%amplitude*sigma*exp(-cI*W_0*T_0)*& diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 37a520c16d..d6bd82f8b1 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -140,7 +140,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) !This can be calculated once for each frequency, but I did not want to mess up NL_driver (MG) alpha_ = NL_LRC_alpha if (Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN') & - & alpha_ = Alpha_ED(E,Efield(1)%frequency) + & alpha_ = Alpha_ED(E,Efield(1)%frequency(1)) E_vec_pot=E_vec_pot + alpha_*NL_P(1:3) ! elseif(Correlation==LRC) then diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 57b17552c2..1a20928fb4 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -229,7 +229,7 @@ subroutine NL_initialize(E,k) ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) ! calcualte the T_0 ! - W_0=Efield(1)%frequency + W_0=Efield(1)%frequency(1) sigma=Efield(1)%width T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) if(Efield(1)%ef_name=='SPULSE') T_0=sigma @@ -297,10 +297,10 @@ subroutine NL_initialize(E,k) Sampling_Time=EtoT(E=NL_er(1))+5._SP*RT_step ! if(n_active_fields>1) then - if((Efield(2)%ef_name/='none').and.Efield(2)%frequency>0._SP) & -& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(2)%frequency)+5._SP*RT_step/)) - if((Efield(3)%ef_name/='none').and.Efield(3)%frequency>0._SP) & -& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency)+5._SP*RT_step/)) + if((Efield(2)%ef_name/='none').and.Efield(2)%frequency(1)>0._SP) & +& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(2)%frequency(1))+5._SP*RT_step/)) + if((Efield(3)%ef_name/='none').and.Efield(3)%frequency(1)>0._SP) & +& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency(1))+5._SP*RT_step/)) endif ! if (SAVE_Vb_floquet) then @@ -553,13 +553,12 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Damping ',NL_damping*HA2EV,"[eV]") call msg( 'r', 'Dephasing ',Phase_LifeTime*AUT2FS,"[fs]") call msg( 'r', 'Radiative LifeTime ',RAD_LifeTime*AUT2FS,"[fs]") - do i1=1,n_active_fields + do i1=1,n_ext_fields call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") - call msg( 'r', 'Efield Freq ',Efield(i1)%frequency*HA2EV,"[eV]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) - call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2*HA2EV) - call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**3) + call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) + call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) enddo call msg( 'r', 'Efield T_0 ',T_0*AUT2FS,"[fs]") if (.not.l_pump_and_probe) then diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index 89e2211be4..e46d6cdb05 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o RT_small_a.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/DOUBLE_project.dep b/src/real_time_control/DOUBLE_project.dep index f1eb13de43..07a445dff3 100644 --- a/src/real_time_control/DOUBLE_project.dep +++ b/src/real_time_control/DOUBLE_project.dep @@ -28,6 +28,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o + RT_small_a.o RT_update_TIME_CONF_descriptions.o - small_a.o diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index 0eb4f21bac..5c6688ab4c 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -15,7 +15,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) use R_lattice, ONLY:nkibz use electrons, ONLY:n_sp_pol,levels use X_m, ONLY:global_gauge - use fields, ONLY:Efield + use fields, ONLY:Efield,field_frequency use real_time, ONLY:RT_bands,RT_nbands use dipoles, ONLY:DIP_iR,DIP_v use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -31,7 +31,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) ! ! Workspace ! - integer :: i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & + integer :: i_fr,i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & & first_el(RT_nbands),n_of_el(RT_nbands),n_deg_grp,n_deg_states(2) logical :: vel_gauge,len_gauge real(SP) :: effective_frequency,E_trans,E_dist,delta_E @@ -40,7 +40,11 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) len_gauge=trim(global_gauge)=="length" vel_gauge=trim(global_gauge)=="velocity" ! - effective_frequency=Efield(i_field)%frequency + effective_frequency=0._SP + do i_fr=1,Efield(i_field)%n_frequencies + effective_frequency=effective_frequency+field_frequency(Efield(i_field),i_fr) + enddo + effective_frequency=effective_frequency/real(Efield(i_field)%n_frequencies,SP) ! RT_Rabi_frequency=rZERO E_dist=0.1_SP diff --git a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F index cff908a246..4d93e55f52 100644 --- a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F +++ b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F @@ -15,7 +15,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) use R_lattice, ONLY:nkibz use electrons, ONLY:n_sp_pol,levels use X_m, ONLY:global_gauge - use fields, ONLY:Efield + use fields, ONLY:Efield,field_frequency use real_time, ONLY:RT_bands,RT_nbands use dipoles, ONLY:DIP_iR,DIP_v use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -30,7 +30,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! Workspace ! real(SP) :: Rabi_frequency - integer :: i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & + integer :: i_fr,i_sp_pol,ik,ik_mem,ib1,ib2,i_grp1,i_grp2,i_sp_pol_ref,ik_ref,ib1_ref,ib2_ref, & & first_el(RT_nbands),n_of_el(RT_nbands),n_deg_grp,n_deg_states(2) logical :: vel_gauge,len_gauge real(SP) :: effective_frequency,E_trans,E_dist,delta_E @@ -41,7 +41,11 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! call OUTPUT_driver('rabi_frequencies',action="append") ! - effective_frequency=effective_frequency+Efield(i_field)%frequency + effective_frequency=0._SP + do i_fr=1,Efield(i_field)%n_frequencies + effective_frequency=effective_frequency+field_frequency(Efield(i_field),i_fr) + enddo + effective_frequency=effective_frequency/real(Efield(i_field)%n_frequencies,SP) ! do i_sp_pol=1,n_sp_pol do ik=1,nkibz diff --git a/src/real_time_control/RT_project.dep b/src/real_time_control/RT_project.dep index f1eb13de43..07a445dff3 100644 --- a/src/real_time_control/RT_project.dep +++ b/src/real_time_control/RT_project.dep @@ -28,6 +28,6 @@ RT_output.o RT_output_INIT.o RT_output_and_IO_driver.o + RT_small_a.o RT_update_TIME_CONF_descriptions.o - small_a.o diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F new file mode 100644 index 0000000000..165bf3ba83 --- /dev/null +++ b/src/real_time_control/RT_small_a.F @@ -0,0 +1,393 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM CA DS +! +! External fields: +! +! SIN: E(t)=\theta(t) * sin(t) +! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 +! DELTA: E(t)= \delta(t) +! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) +! THETA: E(t)= \theta(t) +! RES: E(t)= \theta(t)*exp(-i\omega t) +! ANTIRES: E(t)= \theta(t)*exp(i\omega t) +! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) +! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) +! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) +! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) +! QSFIELD: see below +! FROMFILE: shape of the electric field from file +! +! Linear frequency chirp coded for QSSIN pulse: +! (see also https://www.rp-photonics.com/chirp.html) +! +! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) +! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) +! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) +! +! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! +! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) +! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] +! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! +! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) +! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] +! +! +function small_a(T,dt,E_field,order,envelop_only) + ! + ! The vector potential is generally written as + ! + ! order=0 A (t)=-cEo a (t) theta(t) + ! order=1 A'(t)=-cEo (a'(t) theta(t)+a (t) delta(t)) + ! order=2 A"(t)=-cEo (a"(t) theta(t)+a'(t) delta(t)-a(t) sign(t)) + ! + ! the functions theta,delta and sign can be the standard distributions + ! or more fancy functions that can mimic the distributions. + ! + ! Note that A is evolved using A''(t) starting from A(0) and A'(0). + ! + use X_m, ONLY:global_gauge + use pars, ONLY:SP,cI,cONE,cZERO,pi,schlen + use units, ONLY:FS2AUT + use stderr, ONLY:STRING_split + use wrapper, ONLY:FADEVA + use functions, ONLY:theta_function + use fields, ONLY:ext_field,get_field_file_index,field_frequency,& + & field_from_file,n_fields_defs_max + ! + implicit none + ! + complex(SP), dimension(2) :: small_a + ! + type(ext_field), intent(inout) ::E_field + ! + real(SP), intent(in) ::T,dt + integer, intent(in) ::order + logical, intent(in), optional :: envelop_only + ! + ! Workspace + ! + real(SP) ::damp_func,a,b,c,sarg,WT,Tl + ! + integer ::i1,i_fr,i_T,i_field,i_file,n_fields,n_freqs + real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & + & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt + complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z + character(schlen) ::field_defs(n_fields_defs_max) + logical ::l_multi_phase,envelop_only_ + ! + ! Zeroing + ! + small_a=cZERO + f_t=cZERO + damp_func=1._SP + ! + envelop_only_=.false. + if(present(envelop_only)) envelop_only_=envelop_only + ! + if(trim(E_field%ef_pol)=="linear" ) n_fields=1 + if(trim(E_field%ef_pol)=="circular") n_fields=2 + ! + ! Field parameters + ! + sigma=E_field%width + chirp=E_field%chirp + ! + s_sigma_chirp=cZERO + c_sigma_chirp=cZERO + ! + if (abs(sigma)>0._SP .or. abs(chirp)>0._SP) then + s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) + c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) + endif + ! + sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) + ! + n_freqs=max(1,E_field%n_frequencies) + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + Tloc=T + if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma + ! + select case( trim(field_defs(1)) ) + case('STATIC','RECT','RECTSIN','SIN','DELTA') + ! Fields which do not need T_0 + W_0=0._SP + T_0=0._SP + damp_func=1._SP + ! DEBUG < + ! damping for sin + !if (sigma>0._SP) then + ! T_0=5*sigma + ! damp_func=1._SP + ! if (TNE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) + !endif + ! DEBUG > + case('FROM_FILE') + i_file=get_field_file_index(field_defs(2)) + T_0=field_from_file(1,1,i_file)*FS2AUT + W_0=0._SP + damp_func=1._SP + case('SOFTSIN','THETA') + ! Fields which do not need T_0 and with damp_func + W_0=0._SP + T_0=0._SP + a = 3._SP/sigma**4 + b = -8._SP/sigma**3 + c = 6._SP/sigma**2 + damp_func=1._SP + if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) + case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') + ! Fields which need T_0 + W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP + T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff + if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff + if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff + if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff + T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) + if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac + end select + ! + ! Initial and relative phases control + l_multi_phase=.false. + fr_shift(1)=0._SP + fr_shift(2)=pi/2._SP + do i1=1,n_fields_defs_max + if( trim(field_defs(i1))=="PHPI180") fr_shift(:)=fr_shift(:)+pi ! 180 deg + if( trim(field_defs(i1))=="PHPI120") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 120 deg + if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi/2._SP ! 90 deg + if( trim(field_defs(i1))=="PHPI60") fr_shift(:)=fr_shift(:)+pi/3._SP ! 60 deg + if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/6._SP ! 30 deg + if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi/9._SP ! 20 deg + if( trim(field_defs(i1))=="PHMULT" .and. n_freqs>1) l_multi_phase=.true. + enddo + ! + E_field%To=T_0 + ! + do i_field=1,n_fields + do i_fr=1,n_freqs + ! + W_field=field_frequency(E_field,i_fr) + W_field_m1=1._SP/W_field + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and + WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase + if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 + ! + if (envelop_only_) then + f0t=cONE ; f1t=cONE + else + ! CONTROL RES / ANTIRES case + cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt + ! f1t=-f0t' + f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) + if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif + if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif + endif + ! + EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) + ! + select case( trim(field_defs(1)) ) + case('FROM_FILE') + i_T=nint((T-T_0)/(dT/2._SP))+1 + if (i_T<=0.or.envelop_only_) then + f_now=0 + else + if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) + if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) + if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) + endif + ! + case('STATIC') + if (order==0 ) f_now=T + if (order==1 ) f_now=1._SP + if (order==2 ) f_now=0._SP + ! + case('RECT') + if (order==0 ) f_now= Tloc + if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function + ! + case('RECTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function + &+theta_function(sigma-T,dT,0)*f0t*der_fac + ! + case('SIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now=+damp_func* f1t + if (order==2 ) f_now=+damp_func* f0t *der_fac + ! + case('SOFTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==-1) f_now=-2 + if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order== 1) f_now=+damp_func* f1t + if (order== 2) f_now=+damp_func* f0t *der_fac + ! + case('THETA') + if (order==0 ) f_now=damp_func*T + if (order==1 ) f_now=damp_func + if (order==2 ) f_now=0._SP + ! + case('DELTA') + if (order==-1) f_now=1._SP + if (order==0 ) f_now=1._SP + if (order> 0 ) f_now=0._SP + ! + case('PHHG') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + sarg=pi*(T-T_0)/sigma + WT =W_field*T + if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then + f_now=0.0 + elseif(T-T_0>=sigma.and.order==0) then + Tl=sigma+T_0 + WT =W_field*Tl + f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + else + if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + if (order==1 ) f_now=sin(sarg)**2*cos(WT) + if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 + endif + ! + case('GAUSS') + if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) + if (order==1 ) f_now= Expf + if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 + ! + case('QSSIN') + ! + ! W =FADEVA function + ! W(-z)=exp(-z^2)*(1- erf (i*z)) + ! =exp(-z^2)*(1-i*erfi( z )) + ! + ! ERFI(z)=i*(exp(z^2)*W(-z)-1) + ! + if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & + & call error("chirp not implemented with QSSIN and velocity gauge") + ! + cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) + cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) + ! + if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & + & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & + & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) + if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO + ! + if (order==0 ) f_now= erfi_z + if (order==1 ) f_now= f1t *EXPf + if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf + ! + case('QSFIELD') + ! + if (order==0 ) f_now= f1t *EXPf + if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf + if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & + & -der_fac*(T-T_0)*f1t/sigma**2 & + & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf + f_now=f_now/der_fac + ! + case('PULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + ! + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now= 0._SP + if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t + if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & + & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t + endif + ! + case('SPULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + T_0=sigma + W_0=W_field + f_now=cZERO + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & + & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & + & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & + & W_0**2*sigma**2+24))/W_0**5/sigma**4) + if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t + if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & + & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & + & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t + endif + end select + ! + f_t(i_field)=f_t(i_field)+f_now + ! + enddo + enddo + ! + small_a=f_t/real(n_freqs,SP) + ! +end function small_a +! +function small_a_frequency(W_i,E_field,iErr) + ! + use pars, ONLY:SP,cZERO,cI,pi,schlen + use stderr, ONLY:STRING_split + use fields, ONLY:ext_field,n_fields_defs_max,field_frequency + ! + implicit none + ! + complex(SP) :: small_a_frequency + ! + type(ext_field) :: E_field + complex(SP) :: W_i + integer :: iErr + ! + integer ::i_f + real(SP) ::W_0 + complex(SP) ::local_a(2) + character(schlen) ::field_defs(n_fields_defs_max) + ! + iErr=-1 + local_a=cZERO + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + do i_f=1,E_field%n_frequencies + W_0=field_frequency(E_field,i_f) + select case( trim(field_defs(1)) ) + case('SIN') + iErr=0 + local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES + local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES + case('DELTA') + iErr=0 + local_a=1._SP/2._SP + end select + enddo + ! + if(trim(field_defs(2))== 'RES') local_a(2)=0._SP + if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP + ! + small_a_frequency=local_a(1)+local_a(2) + ! +end function small_a_frequency diff --git a/src/real_time_control/small_a.F b/src/real_time_control/small_a.F deleted file mode 100644 index 466d2032ed..0000000000 --- a/src/real_time_control/small_a.F +++ /dev/null @@ -1,346 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2006 The Yambo Team -! -! Authors (see AUTHORS file for details): AM CA DS -! -! External fields: -! -! SIN: E(t)=\theta(t) * sin(t) -! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 -! DELTA: E(t)= \delta(t) -! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) -! THETA: E(t)= \theta(t) -! RES: E(t)= \theta(t)*exp(-i\omega t) -! ANTIRES: E(t)= \theta(t)*exp(i\omega t) -! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) -! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) -! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) -! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) -! QSFIELD: see below -! FROMFILE: shape of the electric field from file -! -! Linear frequency chirp coded for QSSIN pulse: -! (see also https://www.rp-photonics.com/chirp.html) -! -! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) -! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) -! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) -! -! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) -! -! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) -! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] -! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. -! -! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) -! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] -! -! -function small_a(T,dt,E_field,order,envelop_only) - ! - ! The vector potential is generally written as - ! - ! order=0 A (t)=-cEo a (t) theta(t) - ! order=1 A'(t)=-cEo (a'(t) theta(t)+a (t) delta(t)) - ! order=2 A"(t)=-cEo (a"(t) theta(t)+a'(t) delta(t)-a(t) sign(t)) - ! - ! the functions theta,delta and sign can be the standard distributions - ! or more fancy functions that can mimic the distributions. - ! - ! Note that A is evolved using A''(t) starting from A(0) and A'(0). - ! - use X_m, ONLY:global_gauge - use pars, ONLY:SP,cI,cONE,cZERO,pi,schlen - use units, ONLY:FS2AUT - use stderr, ONLY:STRING_split - use wrapper, ONLY:FADEVA - use functions, ONLY:theta_function - use fields, ONLY:ext_field,get_field_file_index,field_from_file,n_fields_defs_max - ! - implicit none - ! - complex(SP), dimension(2) :: small_a - ! - type(ext_field), intent(inout) ::E_field - ! - real(SP), intent(in) ::T,dt - integer, intent(in) ::order - logical, intent(in), optional :: envelop_only - ! - ! Workspace - ! - real(SP) ::damp_func,a,b,c,sarg,WT,Tl - ! - integer ::i1,i_fr,i_T,i_field,i_file,n_fields,n_freqs - real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & - & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt - complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z - character(schlen) ::field_defs(n_fields_defs_max) - logical ::l_multi_phase,envelop_only_ - ! - ! Zeroing - ! - small_a=cZERO - f_t=cZERO - damp_func=1._SP - ! - envelop_only_=.false. - if(present(envelop_only)) envelop_only_=envelop_only - ! - if(trim(E_field%ef_pol)=="linear" ) n_fields=1 - if(trim(E_field%ef_pol)=="circular") n_fields=2 - ! - ! Field parameters - ! - sigma=E_field%width - chirp=E_field%chirp - ! - s_sigma_chirp=cZERO - c_sigma_chirp=cZERO - ! - if (abs(sigma)>0._SP .or. abs(chirp)>0._SP) then - s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) - c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) - endif - ! - sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) - ! - n_freqs=1 - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - Tloc=T - if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma - ! - select case( trim(field_defs(1)) ) - case('STATIC','RECT','RECTSIN','SIN','DELTA') - ! Fields which do not need T_0 - W_0=0._SP - T_0=0._SP - damp_func=1._SP - ! DEBUG < - ! damping for sin - !if (sigma>0._SP) then - ! T_0=5*sigma - ! damp_func=1._SP - ! if (TNE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) - !endif - ! DEBUG > - case('FROM_FILE') - i_file=get_field_file_index(field_defs(2)) - T_0=field_from_file(1,1,i_file)*FS2AUT - W_0=0._SP - damp_func=1._SP - case('SOFTSIN','THETA') - ! Fields which do not need T_0 and with damp_func - W_0=0._SP - T_0=0._SP - a = 3._SP/sigma**4 - b = -8._SP/sigma**3 - c = 6._SP/sigma**2 - damp_func=1._SP - if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) - case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') - ! Fields which need T_0 - W_0=E_field%frequency - T_0_fac=3._SP*sigma_eff - if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff - if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff - if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff - if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff - if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff - T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) - if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac - end select - ! - ! Initial and relative phases control - l_multi_phase=.false. - fr_shift(1)=0._SP - fr_shift(2)=pi/2._SP - do i1=1,n_fields_defs_max - if( trim(field_defs(i1))=="PHPI180") fr_shift(:)=fr_shift(:)+pi ! 180 deg - if( trim(field_defs(i1))=="PHPI120") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 120 deg - if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi/2._SP ! 90 deg - if( trim(field_defs(i1))=="PHPI60") fr_shift(:)=fr_shift(:)+pi/3._SP ! 60 deg - if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/6._SP ! 30 deg - if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi/9._SP ! 20 deg - if( trim(field_defs(i1))=="PHMULT" .and. n_freqs>1) l_multi_phase=.true. - enddo - ! - E_field%To=T_0 - ! - do i_field=1,n_fields - ! - W_field=E_field%frequency - W_field_m1=1._SP/W_field - if(W_field> 0._SP) W_field_m1=1._SP/W_field - if(W_field==0._SP) W_field_m1=0._SP - der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) - ! - ! The frequency shift is applied in two cases - ! (i n_fields=2) to have a circular polarized pulse, and - WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) - ! each frequency has a different initial phase - if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) - if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 - ! - if (envelop_only_) then - f0t=cONE ; f1t=cONE - else - ! CONTROL RES / ANTIRES case - cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt - ! f1t=-f0t' - f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) - if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif - if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif - endif - ! - EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) - ! - select case( trim(field_defs(1)) ) - case('FROM_FILE') - i_T=nint((T-T_0)/(dT/2._SP))+1 - if (i_T<=0.or.envelop_only_) then - f_now=0 - else - if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) - if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) - if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) - endif - ! - case('STATIC') - if (order==0 ) f_now=T - if (order==1 ) f_now=1._SP - if (order==2 ) f_now=0._SP - ! - case('RECT') - if (order==0 ) f_now= Tloc - if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function - ! - case('RECTSIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function - &+theta_function(sigma-T,dT,0)*f0t*der_fac - ! - case('SIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now=+damp_func* f1t - if (order==2 ) f_now=+damp_func* f0t *der_fac - ! - case('SOFTSIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==-1) f_now=-2 - if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order== 1) f_now=+damp_func* f1t - if (order== 2) f_now=+damp_func* f0t *der_fac - ! - case('THETA') - if (order==0 ) f_now=damp_func*T - if (order==1 ) f_now=damp_func - if (order==2 ) f_now=0._SP - ! - case('DELTA') - if (order==-1) f_now=1._SP - if (order==0 ) f_now=1._SP - if (order> 0 ) f_now=0._SP - ! - case('PHHG') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - sarg=pi*(T-T_0)/sigma - WT =W_field*T - if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then - f_now=0.0 - elseif(T-T_0>=sigma.and.order==0) then - Tl=sigma+T_0 - WT =W_field*Tl - f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & - & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - else - if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & - & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - if (order==1 ) f_now=sin(sarg)**2*cos(WT) - if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 - endif - ! - case('GAUSS') - if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) - if (order==1 ) f_now= Expf - if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 - ! - case('QSSIN') - ! - ! W =FADEVA function - ! W(-z)=exp(-z^2)*(1- erf (i*z)) - ! =exp(-z^2)*(1-i*erfi( z )) - ! - ! ERFI(z)=i*(exp(z^2)*W(-z)-1) - ! - if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & - & call error("chirp not implemented with QSSIN and velocity gauge") - ! - cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) - cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) - ! - if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & - & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & - & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) - if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO - ! - if (order==0 ) f_now= erfi_z - if (order==1 ) f_now= f1t *EXPf - if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf - ! - case('QSFIELD') - ! - if (order==0 ) f_now= f1t *EXPf - if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf - if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & - & -der_fac*(T-T_0)*f1t/sigma**2 & - & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf - f_now=f_now/der_fac - ! - case('PULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - ! - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now= 0._SP - if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t - if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & - & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t - endif - ! - case('SPULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - T_0=sigma - W_0=W_field - f_now=cZERO - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & - & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & - & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & - & W_0**2*sigma**2+24))/W_0**5/sigma**4) - if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t - if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & - & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & - & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t - endif - end select - ! - f_t(i_field)=f_t(i_field)+f_now - ! - enddo - ! - small_a=f_t - ! -end function small_a -! diff --git a/src/real_time_control/small_a_frequency.F b/src/real_time_control/small_a_frequency.F deleted file mode 100644 index cfbb5e3d2c..0000000000 --- a/src/real_time_control/small_a_frequency.F +++ /dev/null @@ -1,81 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2006 The Yambo Team -! -! Authors (see AUTHORS file for details): AM CA DS -! -! External fields: -! -! SIN: E(t)=\theta(t) * sin(t) -! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 -! DELTA: E(t)= \delta(t) -! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) -! THETA: E(t)= \theta(t) -! RES: E(t)= \theta(t)*exp(-i\omega t) -! ANTIRES: E(t)= \theta(t)*exp(i\omega t) -! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) -! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) -! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) -! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) -! QSFIELD: see below -! FROMFILE: shape of the electric field from file -! -! Linear frequency chirp coded for QSSIN pulse: -! (see also https://www.rp-photonics.com/chirp.html) -! -! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) -! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) -! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) -! -! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) -! -! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) -! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] -! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. -! -! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) -! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] -! -! -function small_a_frequency(W_i,E_field,iErr) - ! - use pars, ONLY:SP,cZERO,cI,pi,schlen - use stderr, ONLY:STRING_split - use fields, ONLY:ext_field,n_fields_defs_max - ! - implicit none - ! - complex(SP) :: small_a_frequency - ! - type(ext_field) :: E_field - complex(SP) :: W_i - integer :: iErr - ! - real(SP) ::W_0 - complex(SP) ::local_a(2) - character(schlen) ::field_defs(n_fields_defs_max) - ! - iErr=-1 - local_a=cZERO - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - W_0=E_field%frequency - select case( trim(field_defs(1)) ) - case('SIN') - iErr=0 - local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES - local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES - case('DELTA') - iErr=0 - local_a=1._SP/2._SP - end select - ! - if(trim(field_defs(2))== 'RES') local_a(2)=0._SP - if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP - ! - small_a_frequency=local_a(1)+local_a(2) - ! -end function small_a_frequency diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index 1bc86ebb73..6bc8c2d39e 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -3,6 +3,7 @@ ELPH_objs = RT_ELPH_initialize.o #endif #if defined _RT RT_head_objs = RT_initialize.o RT_start_and_restart.o -RT_foot_objs = RT_Dephasing_Matrix.o RT_G_lesser_init.o RT_occupations_update.o +RT_foot_objs = RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o \ + RT_occupations_update.o #endif objs = $(RT_head_objs) RT_occupations_and_levels_init.o $(RT_foot_objs) $(ELPH_objs) diff --git a/src/real_time_initialize/DOUBLE_project.dep b/src/real_time_initialize/DOUBLE_project.dep index aa30fd3003..c350f2f4de 100644 --- a/src/real_time_initialize/DOUBLE_project.dep +++ b/src/real_time_initialize/DOUBLE_project.dep @@ -1,5 +1,6 @@ RT_Dephasing_Matrix.o RT_ELPH_initialize.o + RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_initialize.o RT_occupations_and_levels_init.o diff --git a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F new file mode 100644 index 0000000000..0f4d3a79a1 --- /dev/null +++ b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F @@ -0,0 +1,70 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2011 The Yambo Team +! +! Authors (see AUTHORS file for details): AM +! +subroutine RT_Field_Commensurable_Frequencies() + ! + ! Check on the PROBE/PUMP frequencies. To be possible to find, in ypp_rt, the coefficients of the + ! Fourier series I need ALL the frequencies to be Wn=n deltaW. Therefore frequency(1) and + ! frequency(2) must be choosed accordingly. + ! + ! Moreover to extract the Fourier coefficients I need to integrate over aa Time range + ! equal to 2*pi/deltaW. This must be not larger then NE_tot_time + ! + use pars, ONLY:SP,schlen,n_fields_defs_max + use stderr, ONLY:STRING_split + use fields, ONLY:Efield,n_ext_fields,EtoT + use real_time, ONLY:NE_tot_time + ! + implicit none + ! + integer :: i_master_field,i_f,i_Pump,i_Probe + real(SP) :: W_step,T_treshold,T_step + real(SP), parameter :: treshold=0.8 + character(schlen) :: pump_defs(n_fields_defs_max),probe_defs(n_fields_defs_max) + ! + if (n_ext_fields<2) return + ! + i_Probe=1 + i_Pump =2 + ! + call STRING_split(trim(Efield(i_Pump)%ef_name),pump_defs) + call STRING_split(trim(Efield(i_Probe)%ef_name),probe_defs) + ! + if ( .not.any((/pump_defs(1)=='SIN',probe_defs(1)=='SIN'/)) ) return + ! + i_master_field=0 + if ( abs( Efield(i_Pump)%frequency(2) -Efield(i_Pump)%frequency(1) ) > epsilon(1._SP) ) i_master_field=i_Pump + if ( abs( Efield(i_Probe)%frequency(2)-Efield(i_Probe)%frequency(1)) >& +& abs( Efield(i_Pump)%frequency(2) -Efield(i_Pump)%frequency(1) ) ) i_master_field=i_Probe + ! + if (i_master_field==0) return + ! + W_step=Efield(i_master_field)%W_step + ! + T_step=EtoT(E=W_step) + T_treshold=treshold*NE_tot_time + if (T_step > treshold*NE_tot_time) then + T_step=T_treshold + W_step=EtoT(T=T_step) + endif + ! + Efield(i_master_field)%W_step=W_step + ! + do i_f=1,n_ext_fields + ! + Efield(i_f)%frequency(1)=nint(Efield(i_f)%frequency(1)/W_step)*W_step + Efield(i_f)%frequency(2)=nint(Efield(i_f)%frequency(2)/W_step)*W_step + ! + if ( abs(Efield(i_f)%frequency(1)) < 1.E-5 ) Efield(i_f)%frequency(1)=W_step + ! + Efield(i_f)%n_frequencies=nint((Efield(i_f)%frequency(2)-Efield(i_f)%frequency(1))/W_step)+1 + ! + if ( Efield(i_f)%n_frequencies == 1) Efield(i_f)%W_step=0. + ! + enddo + ! +end subroutine RT_Field_Commensurable_Frequencies diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 9688148def..a12955d6a3 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -257,7 +257,7 @@ subroutine RT_initialize(E,k,q,Dip) ! if( (field_defs(1)/='DELTA'.and.field_defs(1)/='GAUSS'.and. & & field_defs(1)/='RECT' .and.field_defs(1)/='FROM_FILE') & -& .and. Efield(i1)%frequency==0._SP) & +& .and. Efield(i1)%frequency(1)==0._SP) & & call error(trim(MSG_ch)//" field has zero frequency.") ! if(Efield(i1)%intensity==0._SP) & @@ -302,6 +302,10 @@ subroutine RT_initialize(E,k,q,Dip) ! l_NE_dynamics= l_NE_with_fields .or. l_rt_carriers_in_use ! + ! Check on the PROBE/PUMP frequencies + !==================================== + call RT_Field_Commensurable_Frequencies() + ! if ( .not. l_NE_dynamics ) call error('No external fields nor manual pumping provided') ! ! Number of K-points @@ -474,18 +478,21 @@ subroutine RT_initialize(E,k,q,Dip) MSG_ch="Field#"//trim(intc(i1)) call msg('r', trim(MSG_ch)//' field ',trim(Efield(i1)%ef_name)) call msg('r', trim(MSG_ch)//' polarization ',trim(Efield(i1)%ef_pol)) - call msg('r', trim(MSG_ch)//' frequency ',(/Efield(i1)%frequency*HA2EV,& + call msg('r', trim(MSG_ch)//' frequency range ',(/Efield(i1)%frequency*HA2EV,& & 2._SP*pi*HBAR_evfs/(Efield(i1)%frequency*HA2EV)/),'[eV/fs]') + call msg('r', trim(MSG_ch)//' elemental oscillation ',EtoT(E=Efield(i1)%frequency(2)-& +& Efield(i1)%frequency(1))*AUT2FS,'[fs]') sigma_eff=sqrt((Efield(i1)%width**4+Efield(i1)%chirp**4)/Efield(i1)%width**2) call msg('r', trim(MSG_ch)//' Fourier limited width ',Efield(i1)%width*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' Real time width ',sigma_eff*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' start time ',Efield(i1)%t_initial*AUT2FS,'[fs]') + call msg('r', trim(MSG_ch)//' energy steps ',Efield(i1)%n_frequencies) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! - U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2 + U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') - call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency,'[1/mu]') + call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index 6ff0d7b761..7d13d8b4e4 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,4 +1,5 @@ RT_Dephasing_Matrix.o + RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_initialize.o RT_occupations_and_levels_init.o diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index c134bb65c7..9a1e0a6dec 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -124,7 +124,7 @@ subroutine NL_ypp_driver(en,k) RT_P_probe(:,i_f,i_d)=NL_P_t(:,i_d) enddo ! - Probe_frequency(i_f)=Efield(i_Probe)%frequency + Probe_frequency(i_f)=Efield(i_Probe)%frequency(1) if(loop_on_angles) Probe_versors(:,i_f)=Efield(i_Probe)%versor(:) ! if(io_Nonlinear_REF==0) then diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 86160f9359..0108478fba 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -131,7 +131,7 @@ subroutine RT_1D_Fourier_Chirp(FT,RT) FT%F_t=cZERO_DP dw=(FT%W(2)-FT%W(1)) do i_w = 1, RT%W_n_steps - chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency)**2) + chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency(1))**2) enddo ! if (l_live_timing) call live_timing('FT-CHIRP@'//trim(FT%title)//'',RT%T_n_steps*FT%N) diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index 1f88b67845..e7739aace2 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -113,7 +113,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) call IO_temporary_jobdir_and_strings("JOBSTR",Pump_path) call RT_OBSERVABLES_IO(what=what,IO_error=IO_error,first_sec_only=.TRUE.,COM_=NONE) if (.not.IO_error) then - N_pump_frequencies= 1 + N_pump_frequencies= Efield(i_Pump)%n_frequencies call IO_desc_reset(Pump_RT_desc) call IO_desc_duplicate(RT_desc,Pump_RT_desc) if (N_pump_frequencies>1) call error('Pumps with multiple frequencies still not supported') @@ -129,7 +129,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) if (.not.STRING_same(Probe_path(i_f),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(i_f)) if ( STRING_same(Probe_path(i_f),"default")) call IO_temporary_jobdir_and_strings("ALL","RESTORE") call RT_OBSERVABLES_IO(what=what,IO_error=IO_error,first_sec_only=.TRUE.,COM_=NONE) - N_probe_frequencies= 1 + N_probe_frequencies= Efield(i_Probe)%n_frequencies enddo ! ! Pump & Probe comparison @@ -168,6 +168,13 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! I can use ANTIRES/RES probes with multiple frequencies only by using ! ProbeKey in the input file. This is because of the procedures defined in X_effective/X_inversion. ! + if (Efield(i_Probe)%n_frequencies>1) then + if (X_order==1) call warning("Using multi-frequency probe") + if (X_order/=1) then + call warning("Multi-frequency probe not supported for NL optics") + IO_error=.TRUE. + endif + endif if (.not.IO_error) N_probes=1 ! ! If no Probes using the Keyword try using jobstr diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index 64b83823bb..f49ffb211b 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -55,6 +55,7 @@ subroutine RT_X_LRR_real_field(en) n_freqs=1 n_fields=1 if(trim(Efield(i_Probe)%ef_pol)=="circular") n_fields=2 + if( Efield(i_Probe)%n_frequencies > 1 ) n_freqs=Efield(i_Probe)%n_frequencies ! ! 1D FFT setup !-------------- From 57f5e3de62d011c36b4f5fb6c3b369d3040e32c1 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 13:57:59 +0200 Subject: [PATCH 1190/1367] Version 5.3.0, Revision 25718, Hash 85f6680c3 MODIFIED * configure include/version/version.m4 interface/INIT_fields.F real_time_control/.objects DELETED * real_time_control/RT_small_a.F Bugs: - Additions: - Changes: -File name changed Patch sent by: Claudio Attaccalite --- configure | 22 +- include/version/version.m4 | 6 +- src/interface/INIT_fields.F | 10 +- src/real_time_control/.objects | 2 +- src/real_time_control/RT_small_a.F | 393 ----------------------------- 5 files changed, 20 insertions(+), 413 deletions(-) delete mode 100644 src/real_time_control/RT_small_a.F diff --git a/configure b/configure index 72dd60243d..220c0300fd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25717 h.120ee26a3. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25718 h.85f6680c3. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25717 h.120ee26a3' -PACKAGE_STRING='Yambo 5.3.0 r.25717 h.120ee26a3' +PACKAGE_VERSION='5.3.0 r.25718 h.85f6680c3' +PACKAGE_STRING='Yambo 5.3.0 r.25718 h.85f6680c3' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25717 h.120ee26a3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25718 h.85f6680c3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25717 h.120ee26a3:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25718 h.85f6680c3:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25717 h.120ee26a3 +Yambo configure 5.3.0 r.25718 h.85f6680c3 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25717 h.120ee26a3, which was +It was created by Yambo $as_me 5.3.0 r.25718 h.85f6680c3, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25717" -SHASH="120ee26a3" +SREVISION="25718" +SHASH="85f6680c3" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25717 h.120ee26a3, which was +This file was extended by Yambo $as_me 5.3.0 r.25718 h.85f6680c3, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25717 h.120ee26a3 +Yambo config.status 5.3.0 r.25718 h.85f6680c3 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index c07f9d0ba0..06e9c78e7b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25717 h.120ee26a3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25718 h.85f6680c3, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25717" -SHASH="120ee26a3" +SREVISION="25718" +SHASH="85f6680c3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index c2395e8ec0..1eea70ad70 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -25,7 +25,7 @@ ! subroutine Afield_activate(i1) use stderr, ONLY:intc -& use drivers, ONLY:l_nl_p_and_p + use drivers, ONLY:l_nl_p_and_p ! implicit none ! @@ -33,14 +33,14 @@ subroutine Afield_activate(i1) ! character(6)::field field='Field'//trim(intc(i1)) - #if defined _NL +#if defined _NL if(l_nl_p_and_p) then - #endif +#endif call initactivate(1,field//'_Freq') call initactivate(1,field//'_NFreqs') - #if defined _NL +#if defined _NL endif - #endif +#endif call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index e46d6cdb05..f56b6080b5 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o RT_small_a.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.a \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F deleted file mode 100644 index 165bf3ba83..0000000000 --- a/src/real_time_control/RT_small_a.F +++ /dev/null @@ -1,393 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2006 The Yambo Team -! -! Authors (see AUTHORS file for details): AM CA DS -! -! External fields: -! -! SIN: E(t)=\theta(t) * sin(t) -! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 -! DELTA: E(t)= \delta(t) -! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) -! THETA: E(t)= \theta(t) -! RES: E(t)= \theta(t)*exp(-i\omega t) -! ANTIRES: E(t)= \theta(t)*exp(i\omega t) -! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) -! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) -! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) -! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) -! QSFIELD: see below -! FROMFILE: shape of the electric field from file -! -! Linear frequency chirp coded for QSSIN pulse: -! (see also https://www.rp-photonics.com/chirp.html) -! -! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) -! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) -! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) -! -! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) -! -! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) -! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] -! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. -! -! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) -! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] -! -! -function small_a(T,dt,E_field,order,envelop_only) - ! - ! The vector potential is generally written as - ! - ! order=0 A (t)=-cEo a (t) theta(t) - ! order=1 A'(t)=-cEo (a'(t) theta(t)+a (t) delta(t)) - ! order=2 A"(t)=-cEo (a"(t) theta(t)+a'(t) delta(t)-a(t) sign(t)) - ! - ! the functions theta,delta and sign can be the standard distributions - ! or more fancy functions that can mimic the distributions. - ! - ! Note that A is evolved using A''(t) starting from A(0) and A'(0). - ! - use X_m, ONLY:global_gauge - use pars, ONLY:SP,cI,cONE,cZERO,pi,schlen - use units, ONLY:FS2AUT - use stderr, ONLY:STRING_split - use wrapper, ONLY:FADEVA - use functions, ONLY:theta_function - use fields, ONLY:ext_field,get_field_file_index,field_frequency,& - & field_from_file,n_fields_defs_max - ! - implicit none - ! - complex(SP), dimension(2) :: small_a - ! - type(ext_field), intent(inout) ::E_field - ! - real(SP), intent(in) ::T,dt - integer, intent(in) ::order - logical, intent(in), optional :: envelop_only - ! - ! Workspace - ! - real(SP) ::damp_func,a,b,c,sarg,WT,Tl - ! - integer ::i1,i_fr,i_T,i_field,i_file,n_fields,n_freqs - real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & - & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt - complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z - character(schlen) ::field_defs(n_fields_defs_max) - logical ::l_multi_phase,envelop_only_ - ! - ! Zeroing - ! - small_a=cZERO - f_t=cZERO - damp_func=1._SP - ! - envelop_only_=.false. - if(present(envelop_only)) envelop_only_=envelop_only - ! - if(trim(E_field%ef_pol)=="linear" ) n_fields=1 - if(trim(E_field%ef_pol)=="circular") n_fields=2 - ! - ! Field parameters - ! - sigma=E_field%width - chirp=E_field%chirp - ! - s_sigma_chirp=cZERO - c_sigma_chirp=cZERO - ! - if (abs(sigma)>0._SP .or. abs(chirp)>0._SP) then - s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) - c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) - endif - ! - sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) - ! - n_freqs=max(1,E_field%n_frequencies) - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - Tloc=T - if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma - ! - select case( trim(field_defs(1)) ) - case('STATIC','RECT','RECTSIN','SIN','DELTA') - ! Fields which do not need T_0 - W_0=0._SP - T_0=0._SP - damp_func=1._SP - ! DEBUG < - ! damping for sin - !if (sigma>0._SP) then - ! T_0=5*sigma - ! damp_func=1._SP - ! if (TNE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) - !endif - ! DEBUG > - case('FROM_FILE') - i_file=get_field_file_index(field_defs(2)) - T_0=field_from_file(1,1,i_file)*FS2AUT - W_0=0._SP - damp_func=1._SP - case('SOFTSIN','THETA') - ! Fields which do not need T_0 and with damp_func - W_0=0._SP - T_0=0._SP - a = 3._SP/sigma**4 - b = -8._SP/sigma**3 - c = 6._SP/sigma**2 - damp_func=1._SP - if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) - case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') - ! Fields which need T_0 - W_0=(field_frequency(E_field,1)+field_frequency(E_field,n_freqs))/2._SP - T_0_fac=3._SP*sigma_eff - if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff - if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff - if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff - if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff - if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff - T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) - if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac - end select - ! - ! Initial and relative phases control - l_multi_phase=.false. - fr_shift(1)=0._SP - fr_shift(2)=pi/2._SP - do i1=1,n_fields_defs_max - if( trim(field_defs(i1))=="PHPI180") fr_shift(:)=fr_shift(:)+pi ! 180 deg - if( trim(field_defs(i1))=="PHPI120") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 120 deg - if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi/2._SP ! 90 deg - if( trim(field_defs(i1))=="PHPI60") fr_shift(:)=fr_shift(:)+pi/3._SP ! 60 deg - if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/6._SP ! 30 deg - if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi/9._SP ! 20 deg - if( trim(field_defs(i1))=="PHMULT" .and. n_freqs>1) l_multi_phase=.true. - enddo - ! - E_field%To=T_0 - ! - do i_field=1,n_fields - do i_fr=1,n_freqs - ! - W_field=field_frequency(E_field,i_fr) - W_field_m1=1._SP/W_field - if(W_field> 0._SP) W_field_m1=1._SP/W_field - if(W_field==0._SP) W_field_m1=0._SP - der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) - ! - ! The frequency shift is applied in two cases - ! (i n_fields=2) to have a circular polarized pulse, and - WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) - ! each frequency has a different initial phase - if(l_multi_phase) WtimesT=WtimesT+(i_fr-1)/real(n_freqs-1,SP)*(fr_shift(mod(i_field,2)+1)-fr_shift(i_field)) - if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 - ! - if (envelop_only_) then - f0t=cONE ; f1t=cONE - else - ! CONTROL RES / ANTIRES case - cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt - ! f1t=-f0t' - f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) - if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif - if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif - endif - ! - EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) - ! - select case( trim(field_defs(1)) ) - case('FROM_FILE') - i_T=nint((T-T_0)/(dT/2._SP))+1 - if (i_T<=0.or.envelop_only_) then - f_now=0 - else - if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) - if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) - if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) - endif - ! - case('STATIC') - if (order==0 ) f_now=T - if (order==1 ) f_now=1._SP - if (order==2 ) f_now=0._SP - ! - case('RECT') - if (order==0 ) f_now= Tloc - if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function - ! - case('RECTSIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function - if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function - &+theta_function(sigma-T,dT,0)*f0t*der_fac - ! - case('SIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order==1 ) f_now=+damp_func* f1t - if (order==2 ) f_now=+damp_func* f0t *der_fac - ! - case('SOFTSIN') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - if (order==-1) f_now=-2 - if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 - if (order== 1) f_now=+damp_func* f1t - if (order== 2) f_now=+damp_func* f0t *der_fac - ! - case('THETA') - if (order==0 ) f_now=damp_func*T - if (order==1 ) f_now=damp_func - if (order==2 ) f_now=0._SP - ! - case('DELTA') - if (order==-1) f_now=1._SP - if (order==0 ) f_now=1._SP - if (order> 0 ) f_now=0._SP - ! - case('PHHG') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - sarg=pi*(T-T_0)/sigma - WT =W_field*T - if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then - f_now=0.0 - elseif(T-T_0>=sigma.and.order==0) then - Tl=sigma+T_0 - WT =W_field*Tl - f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & - & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - else - if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & - & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) - if (order==1 ) f_now=sin(sarg)**2*cos(WT) - if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 - endif - ! - case('GAUSS') - if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) - if (order==1 ) f_now= Expf - if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 - ! - case('QSSIN') - ! - ! W =FADEVA function - ! W(-z)=exp(-z^2)*(1- erf (i*z)) - ! =exp(-z^2)*(1-i*erfi( z )) - ! - ! ERFI(z)=i*(exp(z^2)*W(-z)-1) - ! - if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & - & call error("chirp not implemented with QSSIN and velocity gauge") - ! - cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) - cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) - ! - if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & - & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & - & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) - if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO - ! - if (order==0 ) f_now= erfi_z - if (order==1 ) f_now= f1t *EXPf - if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf - ! - case('QSFIELD') - ! - if (order==0 ) f_now= f1t *EXPf - if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf - if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & - & -der_fac*(T-T_0)*f1t/sigma**2 & - & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf - f_now=f_now/der_fac - ! - case('PULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - ! - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now= 0._SP - if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t - if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & - & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t - endif - ! - case('SPULSE') - if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) - T_0=sigma - W_0=W_field - f_now=cZERO - if(abs((T-T_0))< sigma) then - if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & - & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & - & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & - &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & - & W_0**2*sigma**2+24))/W_0**5/sigma**4) - if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t - if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & - & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & - & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t - endif - end select - ! - f_t(i_field)=f_t(i_field)+f_now - ! - enddo - enddo - ! - small_a=f_t/real(n_freqs,SP) - ! -end function small_a -! -function small_a_frequency(W_i,E_field,iErr) - ! - use pars, ONLY:SP,cZERO,cI,pi,schlen - use stderr, ONLY:STRING_split - use fields, ONLY:ext_field,n_fields_defs_max,field_frequency - ! - implicit none - ! - complex(SP) :: small_a_frequency - ! - type(ext_field) :: E_field - complex(SP) :: W_i - integer :: iErr - ! - integer ::i_f - real(SP) ::W_0 - complex(SP) ::local_a(2) - character(schlen) ::field_defs(n_fields_defs_max) - ! - iErr=-1 - local_a=cZERO - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - do i_f=1,E_field%n_frequencies - W_0=field_frequency(E_field,i_f) - select case( trim(field_defs(1)) ) - case('SIN') - iErr=0 - local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES - local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES - case('DELTA') - iErr=0 - local_a=1._SP/2._SP - end select - enddo - ! - if(trim(field_defs(2))== 'RES') local_a(2)=0._SP - if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP - ! - small_a_frequency=local_a(1)+local_a(2) - ! -end function small_a_frequency From 6a1f3be7b310520a5c2d0772f8e95445f4ef469f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 14:17:48 +0200 Subject: [PATCH 1191/1367] Version 5.3.0, Revision 25719, Hash 57f5e3de6 MODIFIED * configure include/version/version.m4 interface/INIT_fields.F io/io_NL.F io/variables_NL.F io/variables_RT_static.F modules/mod_fields.F real_time_control/.objects real_time_control/RT_Rabi_frequency.F real_time_control/RT_Rabi_frequency_ALL_and_print.F real_time_initialize/RT_initialize.F Bugs: - Additions: - Changes: -Removed n_freq and freq_step Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/interface/INIT_fields.F | 9 -------- src/io/io_NL.F | 8 ------- src/io/variables_NL.F | 9 -------- src/io/variables_RT_static.F | 3 --- src/modules/mod_fields.F | 9 -------- src/real_time_control/.objects | 2 +- src/real_time_control/RT_Rabi_frequency.F | 6 +---- .../RT_Rabi_frequency_ALL_and_print.F | 6 +---- src/real_time_initialize/RT_initialize.F | 6 ----- 11 files changed, 17 insertions(+), 69 deletions(-) diff --git a/configure b/configure index 220c0300fd..4a6c2371b6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25718 h.85f6680c3. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25719 h.57f5e3de6. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25718 h.85f6680c3' -PACKAGE_STRING='Yambo 5.3.0 r.25718 h.85f6680c3' +PACKAGE_VERSION='5.3.0 r.25719 h.57f5e3de6' +PACKAGE_STRING='Yambo 5.3.0 r.25719 h.57f5e3de6' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25718 h.85f6680c3 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25719 h.57f5e3de6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25718 h.85f6680c3:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25719 h.57f5e3de6:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25718 h.85f6680c3 +Yambo configure 5.3.0 r.25719 h.57f5e3de6 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25718 h.85f6680c3, which was +It was created by Yambo $as_me 5.3.0 r.25719 h.57f5e3de6, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25718" -SHASH="85f6680c3" +SREVISION="25719" +SHASH="57f5e3de6" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25718 h.85f6680c3, which was +This file was extended by Yambo $as_me 5.3.0 r.25719 h.57f5e3de6, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25718 h.85f6680c3 +Yambo config.status 5.3.0 r.25719 h.57f5e3de6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 06e9c78e7b..7954602edc 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25718 h.85f6680c3, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25719 h.57f5e3de6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25718" -SHASH="85f6680c3" +SREVISION="25719" +SHASH="57f5e3de6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 1eea70ad70..59b5f14e4c 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -81,15 +81,6 @@ subroutine Afield(defs,i_field) ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& & Efield(i_field)%frequency,unit=E_unit) -#if defined _NL - call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies,verb_level=V_real_time) -#else - call it(defs,trim(name)//'_NFreqs', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%n_frequencies) -#endif - call it(defs,trim(name)//'_DFreq', '[RT '//trim(name)//'] Frequency step',& -& Efield(i_field)%W_step,unit=E_unit,verb_level=V_real_time) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& & Efield(i_field)%intensity,unit=I_unit) call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& diff --git a/src/io/io_NL.F b/src/io/io_NL.F index 26ba727350..a6035fbc50 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -135,14 +135,6 @@ integer function io_NL(what,ID) call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& & R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV) - call def_variable_elemental(ID_frag,"Field_Freq_steps_"//trim(intc(i_Prb)),1,IP_YIO,0) - call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency steps", & -& I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/)) - - call def_variable_elemental(ID_frag,"Field_Freq_step_"//trim(intc(i_Prb)),1,SP,0) - call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency step ",TERMINATOR="[eV]",& -& R0=Efield(i_Prb)%W_step,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) - call def_variable_elemental(ID_frag,"Field_Initial_time_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID_frag,VAR=" [FIELDs] Initial time ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%t_initial,CHECK=.true.,OP=(/"=="/),UNIT=AUT2FS) diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index cea489bec6..54b6096d67 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -138,15 +138,6 @@ integer function variables_NL(ID) call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) call io_variable_elemental(ID,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& & R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV,& -& DESCRIPTOR=NL_desc) - - call def_variable_elemental(ID,"Field_Freq_steps_"//trim(intc(i_Prb)),1,IP_YIO,0) - call io_variable_elemental(ID,VAR="[FIELDs] Frequency steps",I0=Efield(i_Prb)%n_frequencies,CHECK=.true.,OP=(/"=="/),& -& DESCRIPTOR=NL_desc) - - call def_variable_elemental(ID,"Field_Freq_step_"//trim(intc(i_Prb)),1,SP,0) - call io_variable_elemental(ID,VAR="[FIELDs] Frequency step ",TERMINATOR="[eV]",& -& R0=Efield(i_Prb)%W_step,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV,& & DESCRIPTOR=NL_desc) call def_variable_elemental(ID,"Field_Initial_time_"//trim(intc(i_Prb)),1,SP,0) diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index 316c11940e..f2c70e87fe 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -168,9 +168,6 @@ integer function variables_RT_static(ID) call io_variable_elemental(ID,VAR=" [FIELDs] Chirp ",R0=Efield(i1)%chirp,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R1=Efield(i1)%frequency,& & DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") - call io_variable_elemental(ID,VAR=" [FIELDs] Frequency steps",I0=Efield(i1)%n_frequencies,DESCRIPTOR=RT_desc) - call io_variable_elemental(ID,VAR=" [FIELDs] Frequency step",R0=Efield(i1)%W_step,& -& CHECK=.true.,OP=(/"=="/),DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") call io_variable_elemental(ID,R0=Efield(i1)%t_initial,VAR=' [FIELDs] Initial time',& & DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") ! diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index 45c3b61c8d..e363a19910 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -38,7 +38,6 @@ module fields integer :: t_initial_indx ! time index of extern field switch on (input variable) real(SP) :: t_final integer :: t_final_indx ! time index of extern field switch off (computed in RT_Fluence) - integer :: n_frequencies real(SP) :: frequency(2) real(SP) :: width real(SP) :: chirp @@ -47,7 +46,6 @@ module fields real(SP) :: pi_kind real(SP) :: intensity real(SP) :: amplitude - real(SP) :: W_step real(SP) :: versor(3) real(SP) :: versor_circ(3) end type ext_field @@ -110,9 +108,6 @@ real(SP) function field_frequency(E_field,i_f) integer ::i_f type(ext_field) ::E_field field_frequency=E_field%frequency(1) - if (i_f<=1.or.E_field%n_frequencies<=1) return - field_frequency=E_field%frequency(1)+& -& (E_field%frequency(2)-E_field%frequency(1))/(E_field%n_frequencies-1)*(i_f-1) end function ! integer function get_field_file_index(filename) @@ -133,8 +128,6 @@ subroutine Efield_duplicate(E1,E2) E2%t_final=E1%t_final E2%t_final_indx=E1%t_final_indx E2%frequency=E1%frequency - E2%n_frequencies=E1%n_frequencies - E2%W_step=E1%W_step E2%width=E1%width E2%chirp=E1%chirp E2%FWHM=E1%FWHM @@ -155,8 +148,6 @@ subroutine Efield_reset(E) E%t_final =0._SP E%t_final_indx =0 E%frequency =0._SP - E%n_frequencies=1 - E%W_step =0._SP E%amplitude =0._SP E%intensity =0._SP E%fluence =0._SP diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index f56b6080b5..89e2211be4 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.a \ + RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index 5c6688ab4c..dd02b36640 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -40,11 +40,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) len_gauge=trim(global_gauge)=="length" vel_gauge=trim(global_gauge)=="velocity" ! - effective_frequency=0._SP - do i_fr=1,Efield(i_field)%n_frequencies - effective_frequency=effective_frequency+field_frequency(Efield(i_field),i_fr) - enddo - effective_frequency=effective_frequency/real(Efield(i_field)%n_frequencies,SP) + effective_frequency=Efield(i_field)%frequency(1) ! RT_Rabi_frequency=rZERO E_dist=0.1_SP diff --git a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F index 4d93e55f52..7d886501a7 100644 --- a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F +++ b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F @@ -41,11 +41,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! call OUTPUT_driver('rabi_frequencies',action="append") ! - effective_frequency=0._SP - do i_fr=1,Efield(i_field)%n_frequencies - effective_frequency=effective_frequency+field_frequency(Efield(i_field),i_fr) - enddo - effective_frequency=effective_frequency/real(Efield(i_field)%n_frequencies,SP) + effective_frequency=Efield(i_field)%frequency(1) ! do i_sp_pol=1,n_sp_pol do ik=1,nkibz diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index a12955d6a3..52fa4387a9 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -469,11 +469,6 @@ subroutine RT_initialize(E,k,q,Dip) call msg( 'nr','---Fields---') call msg('r','Gauge ',trim(global_gauge)) ! - if (any(Efield(:)%W_step>0)) then - call msg('r','Pump/Probe periodicity',EtoT(E=maxval(Efield(:)%W_step))*AUT2FS,'[fs]') - call msg('r','Pump/Probe energy step',maxval(Efield(:)%W_step)*HA2EV,'[eV]') - endif - ! do i1=1,n_ext_fields MSG_ch="Field#"//trim(intc(i1)) call msg('r', trim(MSG_ch)//' field ',trim(Efield(i1)%ef_name)) @@ -486,7 +481,6 @@ subroutine RT_initialize(E,k,q,Dip) call msg('r', trim(MSG_ch)//' Fourier limited width ',Efield(i1)%width*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' Real time width ',sigma_eff*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' start time ',Efield(i1)%t_initial*AUT2FS,'[fs]') - call msg('r', trim(MSG_ch)//' energy steps ',Efield(i1)%n_frequencies) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! From 56c4c1066f8fd0742812b2baa014760b43c63d24 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 14:45:59 +0200 Subject: [PATCH 1192/1367] Version 5.3.0, Revision 25720, Hash 6a1f3be7b MODIFIED * configure include/version/version.m4 interface/INIT_fields.F io/io_NL.F io/variables_NL.F io/variables_RT_static.F modules/mod_fields.F nloptics/NL_Hamiltonian.F nloptics/NL_initialize.F real_time_control/RT_Rabi_frequency.F real_time_control/RT_Rabi_frequency_ALL_and_print.F real_time_initialize/.objects real_time_initialize/RT_initialize.F ypp/real_time/NL_ypp_driver.F ypp/real_time/RT_1D_Fourier_Transform.F ypp/real_time/RT_OBSERVABLES_IO_path.F ypp/real_time/RT_X_LRR_real_field.F Bugs: - Additions: -Fixed single freq for the efield Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++---------- include/version/version.m4 | 6 ++--- src/interface/INIT_fields.F | 2 -- src/io/io_NL.F | 4 ++-- src/io/variables_NL.F | 4 ++-- src/io/variables_RT_static.F | 2 +- src/modules/mod_fields.F | 10 ++------- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/NL_initialize.F | 14 ++++++------ src/real_time_control/RT_Rabi_frequency.F | 4 ++-- .../RT_Rabi_frequency_ALL_and_print.F | 4 ++-- src/real_time_initialize/.objects | 2 +- src/real_time_initialize/RT_initialize.F | 12 +++++----- ypp/real_time/NL_ypp_driver.F | 2 +- ypp/real_time/RT_1D_Fourier_Transform.F | 2 +- ypp/real_time/RT_OBSERVABLES_IO_path.F | 11 ++-------- ypp/real_time/RT_X_LRR_real_field.F | 1 - 17 files changed, 43 insertions(+), 61 deletions(-) diff --git a/configure b/configure index 4a6c2371b6..96d8efdea4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25719 h.57f5e3de6. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25720 h.6a1f3be7b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25719 h.57f5e3de6' -PACKAGE_STRING='Yambo 5.3.0 r.25719 h.57f5e3de6' +PACKAGE_VERSION='5.3.0 r.25720 h.6a1f3be7b' +PACKAGE_STRING='Yambo 5.3.0 r.25720 h.6a1f3be7b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25719 h.57f5e3de6 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25720 h.6a1f3be7b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25719 h.57f5e3de6:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25720 h.6a1f3be7b:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25719 h.57f5e3de6 +Yambo configure 5.3.0 r.25720 h.6a1f3be7b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25719 h.57f5e3de6, which was +It was created by Yambo $as_me 5.3.0 r.25720 h.6a1f3be7b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25719" -SHASH="57f5e3de6" +SREVISION="25720" +SHASH="6a1f3be7b" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25719 h.57f5e3de6, which was +This file was extended by Yambo $as_me 5.3.0 r.25720 h.6a1f3be7b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25719 h.57f5e3de6 +Yambo config.status 5.3.0 r.25720 h.6a1f3be7b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7954602edc..3f641ce9b8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25719 h.57f5e3de6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25720 h.6a1f3be7b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25719" -SHASH="57f5e3de6" +SREVISION="25720" +SHASH="6a1f3be7b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index 59b5f14e4c..b74ca6bed4 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -37,11 +37,9 @@ subroutine Afield_activate(i1) if(l_nl_p_and_p) then #endif call initactivate(1,field//'_Freq') - call initactivate(1,field//'_NFreqs') #if defined _NL endif #endif - call initactivate(1,field//'_DFreq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') call initactivate(1,field//'_Chirp') diff --git a/src/io/io_NL.F b/src/io/io_NL.F index a6035fbc50..b91b2db077 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -131,9 +131,9 @@ integer function io_NL(what,ID) call io_variable_elemental(ID_frag,VAR="[FIELDs] Damping ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/)) - call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) + call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& -& R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV) +& R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) call def_variable_elemental(ID_frag,"Field_Initial_time_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID_frag,VAR=" [FIELDs] Initial time ",TERMINATOR="[fs]",& diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 54b6096d67..1a603b4c77 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -135,9 +135,9 @@ integer function variables_NL(ID) & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=NL_desc) - call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),2,SP,0) + call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) call io_variable_elemental(ID,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& -& R1=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"==","=="/),UNIT=HA2EV,& +& R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV,& & DESCRIPTOR=NL_desc) call def_variable_elemental(ID,"Field_Initial_time_"//trim(intc(i_Prb)),1,SP,0) diff --git a/src/io/variables_RT_static.F b/src/io/variables_RT_static.F index f2c70e87fe..d2f4519da9 100644 --- a/src/io/variables_RT_static.F +++ b/src/io/variables_RT_static.F @@ -166,7 +166,7 @@ integer function variables_RT_static(ID) & DESCRIPTOR=RT_desc,UNIT=AU2KWCMm2,TERMINATOR="[kWCMm2]") call io_variable_elemental(ID,VAR=" [FIELDs] Width ",R0=Efield(i1)%width,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") call io_variable_elemental(ID,VAR=" [FIELDs] Chirp ",R0=Efield(i1)%chirp,DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") - call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R1=Efield(i1)%frequency,& + call io_variable_elemental(ID,VAR=" [FIELDs] Frequency range",R0=Efield(i1)%frequency,& & DESCRIPTOR=RT_desc,UNIT=HA2EV,TERMINATOR="[eV]") call io_variable_elemental(ID,R0=Efield(i1)%t_initial,VAR=' [FIELDs] Initial time',& & DESCRIPTOR=RT_desc,UNIT=AUT2FS,TERMINATOR="[fs]") diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index e363a19910..ee82bcefbc 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -38,7 +38,7 @@ module fields integer :: t_initial_indx ! time index of extern field switch on (input variable) real(SP) :: t_final integer :: t_final_indx ! time index of extern field switch off (computed in RT_Fluence) - real(SP) :: frequency(2) + real(SP) :: frequency real(SP) :: width real(SP) :: chirp real(SP) :: FWHM @@ -104,12 +104,6 @@ real(SP) function EtoT(E,T) if (present(E)) EtoT=2._SP*pi*Time_of(E,"fs")*FS2AUT end function ! - real(SP) function field_frequency(E_field,i_f) - integer ::i_f - type(ext_field) ::E_field - field_frequency=E_field%frequency(1) - end function - ! integer function get_field_file_index(filename) character(*) ::filename integer ::i1 @@ -203,7 +197,7 @@ complex(SP) function Divide_by_Field(Field,order) if (order==0) Divide_by_Field = 4._SP*cONE/Field%amplitude**2 case('QSSIN') !Approximate relations/does not work yet sigma=Field%width - W_0=Field%frequency(1) + W_0=Field%frequency T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) T = 2._SP*pi/W_0 E_w= sqrt(pi/2._SP)*Field%amplitude*sigma*exp(-cI*W_0*T_0)*& diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index d6bd82f8b1..37a520c16d 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -140,7 +140,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) !This can be calculated once for each frequency, but I did not want to mess up NL_driver (MG) alpha_ = NL_LRC_alpha if (Efield(1)%ef_name=='SOFTSIN'.or.Efield(1)%ef_name=='SIN') & - & alpha_ = Alpha_ED(E,Efield(1)%frequency(1)) + & alpha_ = Alpha_ED(E,Efield(1)%frequency) E_vec_pot=E_vec_pot + alpha_*NL_P(1:3) ! elseif(Correlation==LRC) then diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1a20928fb4..de3319d6bb 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -229,7 +229,7 @@ subroutine NL_initialize(E,k) ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) ! calcualte the T_0 ! - W_0=Efield(1)%frequency(1) + W_0=Efield(1)%frequency sigma=Efield(1)%width T_0=pi/W_0*(real(nint(W_0/pi*3._SP*sigma),SP)) if(Efield(1)%ef_name=='SPULSE') T_0=sigma @@ -297,10 +297,10 @@ subroutine NL_initialize(E,k) Sampling_Time=EtoT(E=NL_er(1))+5._SP*RT_step ! if(n_active_fields>1) then - if((Efield(2)%ef_name/='none').and.Efield(2)%frequency(1)>0._SP) & -& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(2)%frequency(1))+5._SP*RT_step/)) - if((Efield(3)%ef_name/='none').and.Efield(3)%frequency(1)>0._SP) & -& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency(1))+5._SP*RT_step/)) + if((Efield(2)%ef_name/='none').and.Efield(2)%frequency>0._SP) & +& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(2)%frequency)+5._SP*RT_step/)) + if((Efield(3)%ef_name/='none').and.Efield(3)%frequency>0._SP) & +& Sampling_Time=maxval((/Sampling_Time,EtoT(E=Efield(3)%frequency)+5._SP*RT_step/)) endif ! if (SAVE_Vb_floquet) then @@ -557,8 +557,8 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) - call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2*HA2EV) - call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**3) + call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2*HA2EV) + call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**3) enddo call msg( 'r', 'Efield T_0 ',T_0*AUT2FS,"[fs]") if (.not.l_pump_and_probe) then diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index dd02b36640..88b21c1661 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -15,7 +15,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) use R_lattice, ONLY:nkibz use electrons, ONLY:n_sp_pol,levels use X_m, ONLY:global_gauge - use fields, ONLY:Efield,field_frequency + use fields, ONLY:Efield use real_time, ONLY:RT_bands,RT_nbands use dipoles, ONLY:DIP_iR,DIP_v use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -40,7 +40,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) len_gauge=trim(global_gauge)=="length" vel_gauge=trim(global_gauge)=="velocity" ! - effective_frequency=Efield(i_field)%frequency(1) + effective_frequency=Efield(i_field)%frequency ! RT_Rabi_frequency=rZERO E_dist=0.1_SP diff --git a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F index 7d886501a7..96c98a3886 100644 --- a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F +++ b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F @@ -15,7 +15,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) use R_lattice, ONLY:nkibz use electrons, ONLY:n_sp_pol,levels use X_m, ONLY:global_gauge - use fields, ONLY:Efield,field_frequency + use fields, ONLY:Efield use real_time, ONLY:RT_bands,RT_nbands use dipoles, ONLY:DIP_iR,DIP_v use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index @@ -41,7 +41,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) ! call OUTPUT_driver('rabi_frequencies',action="append") ! - effective_frequency=Efield(i_field)%frequency(1) + effective_frequency=Efield(i_field)%frequency ! do i_sp_pol=1,n_sp_pol do ik=1,nkibz diff --git a/src/real_time_initialize/.objects b/src/real_time_initialize/.objects index 6bc8c2d39e..11d0e4a376 100644 --- a/src/real_time_initialize/.objects +++ b/src/real_time_initialize/.objects @@ -3,7 +3,7 @@ ELPH_objs = RT_ELPH_initialize.o #endif #if defined _RT RT_head_objs = RT_initialize.o RT_start_and_restart.o -RT_foot_objs = RT_Field_Commensurable_Frequencies.o RT_Dephasing_Matrix.o RT_G_lesser_init.o \ +RT_foot_objs = RT_Dephasing_Matrix.o RT_G_lesser_init.o \ RT_occupations_update.o #endif objs = $(RT_head_objs) RT_occupations_and_levels_init.o $(RT_foot_objs) $(ELPH_objs) diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 52fa4387a9..32c03a1d0a 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -257,7 +257,7 @@ subroutine RT_initialize(E,k,q,Dip) ! if( (field_defs(1)/='DELTA'.and.field_defs(1)/='GAUSS'.and. & & field_defs(1)/='RECT' .and.field_defs(1)/='FROM_FILE') & -& .and. Efield(i1)%frequency(1)==0._SP) & +& .and. Efield(i1)%frequency==0._SP) & & call error(trim(MSG_ch)//" field has zero frequency.") ! if(Efield(i1)%intensity==0._SP) & @@ -304,7 +304,7 @@ subroutine RT_initialize(E,k,q,Dip) ! ! Check on the PROBE/PUMP frequencies !==================================== - call RT_Field_Commensurable_Frequencies() +! call RT_Field_Commensurable_Frequencies() ! if ( .not. l_NE_dynamics ) call error('No external fields nor manual pumping provided') ! @@ -473,10 +473,8 @@ subroutine RT_initialize(E,k,q,Dip) MSG_ch="Field#"//trim(intc(i1)) call msg('r', trim(MSG_ch)//' field ',trim(Efield(i1)%ef_name)) call msg('r', trim(MSG_ch)//' polarization ',trim(Efield(i1)%ef_pol)) - call msg('r', trim(MSG_ch)//' frequency range ',(/Efield(i1)%frequency*HA2EV,& + call msg('r', trim(MSG_ch)//' frequency ',(/Efield(i1)%frequency*HA2EV,& & 2._SP*pi*HBAR_evfs/(Efield(i1)%frequency*HA2EV)/),'[eV/fs]') - call msg('r', trim(MSG_ch)//' elemental oscillation ',EtoT(E=Efield(i1)%frequency(2)-& -& Efield(i1)%frequency(1))*AUT2FS,'[fs]') sigma_eff=sqrt((Efield(i1)%width**4+Efield(i1)%chirp**4)/Efield(i1)%width**2) call msg('r', trim(MSG_ch)//' Fourier limited width ',Efield(i1)%width*AUT2FS,'[fs]') call msg('r', trim(MSG_ch)//' Real time width ',sigma_eff*AUT2FS,'[fs]') @@ -484,9 +482,9 @@ subroutine RT_initialize(E,k,q,Dip) call msg('r', trim(MSG_ch)//' electric field ',Efield(i1)%amplitude*AU2VMm1,'[V/m]') call msg('r', trim(MSG_ch)//' max intensity ',Efield(i1)%intensity*AU2KWCMm2,'[kW/cm^2]') ! - U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency(1)**2 + U_pond=Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2 call msg('r', trim(MSG_ch)//' ponderomotive energy ',U_pond*HA2EV,'[eV/mu]') - call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency(1),'[1/mu]') + call msg('r', trim(MSG_ch)//' Adiabatic parameter ',U_pond/Efield(i1)%frequency,'[1/mu]') ! if( (field_defs(1)=='QSSIN') .or. (field_defs(1)=='GAUSS') .or. (field_defs(1)=='DELTA') ) then call msg('r', trim(MSG_ch)//' max fluence ',Efield(i1)%fluence*AU2KWCMm2,'[nJ/cm^2]') diff --git a/ypp/real_time/NL_ypp_driver.F b/ypp/real_time/NL_ypp_driver.F index 9a1e0a6dec..c134bb65c7 100644 --- a/ypp/real_time/NL_ypp_driver.F +++ b/ypp/real_time/NL_ypp_driver.F @@ -124,7 +124,7 @@ subroutine NL_ypp_driver(en,k) RT_P_probe(:,i_f,i_d)=NL_P_t(:,i_d) enddo ! - Probe_frequency(i_f)=Efield(i_Probe)%frequency(1) + Probe_frequency(i_f)=Efield(i_Probe)%frequency if(loop_on_angles) Probe_versors(:,i_f)=Efield(i_Probe)%versor(:) ! if(io_Nonlinear_REF==0) then diff --git a/ypp/real_time/RT_1D_Fourier_Transform.F b/ypp/real_time/RT_1D_Fourier_Transform.F index 0108478fba..86160f9359 100644 --- a/ypp/real_time/RT_1D_Fourier_Transform.F +++ b/ypp/real_time/RT_1D_Fourier_Transform.F @@ -131,7 +131,7 @@ subroutine RT_1D_Fourier_Chirp(FT,RT) FT%F_t=cZERO_DP dw=(FT%W(2)-FT%W(1)) do i_w = 1, RT%W_n_steps - chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency(1))**2) + chirp_phase(i_w)=exp(-cI*ypp_chirp**2*(FT%W(i_w)-Efield(1)%frequency)**2) enddo ! if (l_live_timing) call live_timing('FT-CHIRP@'//trim(FT%title)//'',RT%T_n_steps*FT%N) diff --git a/ypp/real_time/RT_OBSERVABLES_IO_path.F b/ypp/real_time/RT_OBSERVABLES_IO_path.F index e7739aace2..5e9aad6e7d 100644 --- a/ypp/real_time/RT_OBSERVABLES_IO_path.F +++ b/ypp/real_time/RT_OBSERVABLES_IO_path.F @@ -113,7 +113,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) call IO_temporary_jobdir_and_strings("JOBSTR",Pump_path) call RT_OBSERVABLES_IO(what=what,IO_error=IO_error,first_sec_only=.TRUE.,COM_=NONE) if (.not.IO_error) then - N_pump_frequencies= Efield(i_Pump)%n_frequencies + N_pump_frequencies=1 call IO_desc_reset(Pump_RT_desc) call IO_desc_duplicate(RT_desc,Pump_RT_desc) if (N_pump_frequencies>1) call error('Pumps with multiple frequencies still not supported') @@ -129,7 +129,7 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) if (.not.STRING_same(Probe_path(i_f),"default")) call IO_temporary_jobdir_and_strings("JOBSTR",Probe_path(i_f)) if ( STRING_same(Probe_path(i_f),"default")) call IO_temporary_jobdir_and_strings("ALL","RESTORE") call RT_OBSERVABLES_IO(what=what,IO_error=IO_error,first_sec_only=.TRUE.,COM_=NONE) - N_probe_frequencies= Efield(i_Probe)%n_frequencies + N_probe_frequencies=1 enddo ! ! Pump & Probe comparison @@ -168,13 +168,6 @@ subroutine RT_OBSERVABLES_IO_paths(what,en) ! I can use ANTIRES/RES probes with multiple frequencies only by using ! ProbeKey in the input file. This is because of the procedures defined in X_effective/X_inversion. ! - if (Efield(i_Probe)%n_frequencies>1) then - if (X_order==1) call warning("Using multi-frequency probe") - if (X_order/=1) then - call warning("Multi-frequency probe not supported for NL optics") - IO_error=.TRUE. - endif - endif if (.not.IO_error) N_probes=1 ! ! If no Probes using the Keyword try using jobstr diff --git a/ypp/real_time/RT_X_LRR_real_field.F b/ypp/real_time/RT_X_LRR_real_field.F index f49ffb211b..64b83823bb 100644 --- a/ypp/real_time/RT_X_LRR_real_field.F +++ b/ypp/real_time/RT_X_LRR_real_field.F @@ -55,7 +55,6 @@ subroutine RT_X_LRR_real_field(en) n_freqs=1 n_fields=1 if(trim(Efield(i_Probe)%ef_pol)=="circular") n_fields=2 - if( Efield(i_Probe)%n_frequencies > 1 ) n_freqs=Efield(i_Probe)%n_frequencies ! ! 1D FFT setup !-------------- From 852023f32dc7323374cc336f7fbd028756c574b2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 15:11:11 +0200 Subject: [PATCH 1193/1367] Missing files --- src/real_time_control/small_a.F | 343 ++++++++++++++++++++++ src/real_time_control/small_a_frequency.F | 81 +++++ 2 files changed, 424 insertions(+) create mode 100644 src/real_time_control/small_a.F create mode 100644 src/real_time_control/small_a_frequency.F diff --git a/src/real_time_control/small_a.F b/src/real_time_control/small_a.F new file mode 100644 index 0000000000..fb3fd0228c --- /dev/null +++ b/src/real_time_control/small_a.F @@ -0,0 +1,343 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM CA DS +! +! External fields: +! +! SIN: E(t)=\theta(t) * sin(t) +! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 +! DELTA: E(t)= \delta(t) +! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) +! THETA: E(t)= \theta(t) +! RES: E(t)= \theta(t)*exp(-i\omega t) +! ANTIRES: E(t)= \theta(t)*exp(i\omega t) +! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) +! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) +! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) +! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) +! QSFIELD: see below +! FROMFILE: shape of the electric field from file +! +! Linear frequency chirp coded for QSSIN pulse: +! (see also https://www.rp-photonics.com/chirp.html) +! +! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) +! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) +! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) +! +! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! +! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) +! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] +! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! +! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) +! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] +! +! +function small_a(T,dt,E_field,order,envelop_only) + ! + ! The vector potential is generally written as + ! + ! order=0 A (t)=-cEo a (t) theta(t) + ! order=1 A'(t)=-cEo (a'(t) theta(t)+a (t) delta(t)) + ! order=2 A"(t)=-cEo (a"(t) theta(t)+a'(t) delta(t)-a(t) sign(t)) + ! + ! the functions theta,delta and sign can be the standard distributions + ! or more fancy functions that can mimic the distributions. + ! + ! Note that A is evolved using A''(t) starting from A(0) and A'(0). + ! + use X_m, ONLY:global_gauge + use pars, ONLY:SP,cI,cONE,cZERO,pi,schlen + use units, ONLY:FS2AUT + use stderr, ONLY:STRING_split + use wrapper, ONLY:FADEVA + use functions, ONLY:theta_function + use fields, ONLY:ext_field,get_field_file_index,& + & field_from_file,n_fields_defs_max + ! + implicit none + ! + complex(SP), dimension(2) :: small_a + ! + type(ext_field), intent(inout) ::E_field + ! + real(SP), intent(in) ::T,dt + integer, intent(in) ::order + logical, intent(in), optional :: envelop_only + ! + ! Workspace + ! + real(SP) ::damp_func,a,b,c,sarg,WT,Tl + ! + integer ::i1,i_T,i_field,i_file,n_fields + real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & + & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt + complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z + character(schlen) ::field_defs(n_fields_defs_max) + logical ::l_multi_phase,envelop_only_ + ! + ! Zeroing + ! + small_a=cZERO + f_t=cZERO + damp_func=1._SP + ! + envelop_only_=.false. + if(present(envelop_only)) envelop_only_=envelop_only + ! + if(trim(E_field%ef_pol)=="linear" ) n_fields=1 + if(trim(E_field%ef_pol)=="circular") n_fields=2 + ! + ! Field parameters + ! + sigma=E_field%width + chirp=E_field%chirp + ! + s_sigma_chirp=cZERO + c_sigma_chirp=cZERO + ! + if (abs(sigma)>0._SP .or. abs(chirp)>0._SP) then + s_sigma_chirp=sigma**2/(2._SP*(sigma**4+chirp**4)) + c_sigma_chirp=chirp**2/(2._SP*(sigma**4+chirp**4)) + endif + ! + sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2) + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + Tloc=T + if( index(field_defs(1),"RECT")>0 .and. order==0 .and. abs(T)>=sigma) Tloc=sigma + ! + select case( trim(field_defs(1)) ) + case('STATIC','RECT','RECTSIN','SIN','DELTA') + ! Fields which do not need T_0 + W_0=0._SP + T_0=0._SP + damp_func=1._SP + ! DEBUG < + ! damping for sin + !if (sigma>0._SP) then + ! T_0=5*sigma + ! damp_func=1._SP + ! if (TNE_tot_time-T_0) damp_func=exp(-(T-NE_tot_time+T_0)/sigma) + !endif + ! DEBUG > + case('FROM_FILE') + i_file=get_field_file_index(field_defs(2)) + T_0=field_from_file(1,1,i_file)*FS2AUT + W_0=0._SP + damp_func=1._SP + case('SOFTSIN','THETA') + ! Fields which do not need T_0 and with damp_func + W_0=0._SP + T_0=0._SP + a = 3._SP/sigma**4 + b = -8._SP/sigma**3 + c = 6._SP/sigma**2 + damp_func=1._SP + if(real(T)0._SP) damp_func=(a*T**4 + b*T**3 + c*T**2) + case('GAUSS','QSSIN','QSFIELD','PULSE','SPULSE') + ! Fields which need T_0 + W_0=E_field%frequency + T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="1SIGMA" .or. trim(field_defs(3))=="1SIGMA") T_0_fac=1._SP*sigma_eff + if(trim(field_defs(2))=="2SIGMA" .or. trim(field_defs(3))=="2SIGMA") T_0_fac=2._SP*sigma_eff + if(trim(field_defs(2))=="3SIGMA" .or. trim(field_defs(3))=="3SIGMA") T_0_fac=3._SP*sigma_eff + if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff + if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff + T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) + if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac + end select + ! + ! Initial and relative phases control + l_multi_phase=.false. + fr_shift(1)=0._SP + fr_shift(2)=pi/2._SP + do i1=1,n_fields_defs_max + if( trim(field_defs(i1))=="PHPI180") fr_shift(:)=fr_shift(:)+pi ! 180 deg + if( trim(field_defs(i1))=="PHPI120") fr_shift(:)=fr_shift(:)+pi*2._SP/3._SP ! 120 deg + if( trim(field_defs(i1))=="PHPI90") fr_shift(:)=fr_shift(:)+pi/2._SP ! 90 deg + if( trim(field_defs(i1))=="PHPI60") fr_shift(:)=fr_shift(:)+pi/3._SP ! 60 deg + if( trim(field_defs(i1))=="PHPI30") fr_shift(:)=fr_shift(:)+pi/6._SP ! 30 deg + if( trim(field_defs(i1))=="PHPI20") fr_shift(:)=fr_shift(:)+pi/9._SP ! 20 deg + enddo + ! + E_field%To=T_0 + ! + do i_field=1,n_fields + ! + W_field=E_field%frequency + W_field_m1=1._SP/W_field + if(W_field> 0._SP) W_field_m1=1._SP/W_field + if(W_field==0._SP) W_field_m1=0._SP + der_fac=W_field+2._SP*c_sigma_chirp*(Tloc-T_0) + ! + ! The frequency shift is applied in two cases + ! (i n_fields=2) to have a circular polarized pulse, and + WtimesT=W_field*(Tloc-T_0)+fr_shift(i_field) + ! each frequency has a different initial phase + if(chirp>0._SP) WtimesT=WtimesT+c_sigma_chirp*(Tloc-T_0)**2 + ! + if (envelop_only_) then + f0t=cONE ; f1t=cONE + else + ! CONTROL RES / ANTIRES case + cos_wt=cos(WtimesT) ; sin_wt=sin(WtimesT); exp_iwt=cos_wt+cI*sin_wt + ! f1t=-f0t' + f0t=cmplx(cos_wt,0._SP) ; f1t=cmplx(sin_wt,0._SP) + if(trim(field_defs(2))=="ANTIRES") then ; f0t= 0.5_SP* exp_iwt ; f1t=-cI*0.5_SP* exp_iwt ; endif + if(trim(field_defs(2))=="RES") then ; f0t= 0.5_SP*conjg(exp_iwt) ; f1t= cI*0.5_SP*conjg(exp_iwt) ; endif + endif + ! + EXPf=exp(-(T-T_0)**2/(2._SP*sigma_eff**2) ) + ! + select case( trim(field_defs(1)) ) + case('FROM_FILE') + i_T=nint((T-T_0)/(dT/2._SP))+1 + if (i_T<=0.or.envelop_only_) then + f_now=0 + else + if (order==0 ) f_now=field_from_file(i_T,2+(i_field-1),i_file) + if (order==1 ) f_now=field_from_file(i_T,4+(i_field-1),i_file) + if (order==2 ) f_now=field_from_file(i_T,6+(i_field-1),i_file) + endif + ! + case('STATIC') + if (order==0 ) f_now=T + if (order==1 ) f_now=1._SP + if (order==2 ) f_now=0._SP + ! + case('RECT') + if (order==0 ) f_now= Tloc + if (order==1 ) f_now= theta_function(sigma-T,dT,0) ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1) ! delta function + ! + case('RECTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now= theta_function(sigma-T,dT,0)*f1t ! theta function + if (order==2 ) f_now=-theta_function(sigma-T,dT,1)*f1t & ! delta function + &+theta_function(sigma-T,dT,0)*f0t*der_fac + ! + case('SIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==0 ) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order==1 ) f_now=+damp_func* f1t + if (order==2 ) f_now=+damp_func* f0t *der_fac + ! + case('SOFTSIN') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + if (order==-1) f_now=-2 + if (order== 0) f_now=-damp_func*(f0t-1._SP)*W_field_m1 + if (order== 1) f_now=+damp_func* f1t + if (order== 2) f_now=+damp_func* f0t *der_fac + ! + case('THETA') + if (order==0 ) f_now=damp_func*T + if (order==1 ) f_now=damp_func + if (order==2 ) f_now=0._SP + ! + case('DELTA') + if (order==-1) f_now=1._SP + if (order==0 ) f_now=1._SP + if (order> 0 ) f_now=0._SP + ! + case('PHHG') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + sarg=pi*(T-T_0)/sigma + WT =W_field*T + if(T-T_0<=0.0.or.T-T_0>=sigma.and.order>0) then + f_now=0.0 + elseif(T-T_0>=sigma.and.order==0) then + Tl=sigma+T_0 + WT =W_field*Tl + f_now=-(sigma*sin(((sigma*W_field+2*pi)*Tl-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*Tl+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + else + if (order==0 ) f_now=-(sigma*sin(((sigma*W_field+2*pi)*T-2*pi*T_0)/sigma))/(4*(sigma*W_field+2*pi)) & + & -(sigma*sin(((sigma*W_field-2*pi)*T+2*pi*T_0)/sigma))/(4*(sigma*W_field-2*pi))+sin(WT)/(2*W_field) + if (order==1 ) f_now=sin(sarg)**2*cos(WT) + if (order==2 ) f_now=(2*pi*cos(WT)*cos(sarg)*sin(sarg))/sigma-W_field*sin(WT)*sin(sarg)**2 + endif + ! + case('GAUSS') + if (order==0 ) f_now= sigma_eff*sqrt(pi/2._SP)* ( erf( (T-T_0)/(sigma_eff*sqrt(2._SP)) )+1._SP ) + if (order==1 ) f_now= Expf + if (order==2 ) f_now=-Expf*(T-T_0)/sigma_eff**2 + ! + case('QSSIN') + ! + ! W =FADEVA function + ! W(-z)=exp(-z^2)*(1- erf (i*z)) + ! =exp(-z^2)*(1-i*erfi( z )) + ! + ! ERFI(z)=i*(exp(z^2)*W(-z)-1) + ! + if (trim(global_gauge)=="velocity" .and. chirp>0._SP) & + & call error("chirp not implemented with QSSIN and velocity gauge") + ! + cZ=(sigma**2*W_field-cI*(T-T_0))/(sigma*sqrt(2._SP)) + cS=cmplx(W_field**2*sigma**2/2._SP,fr_shift(i_field),SP) + ! + if (order==0 .and. trim(global_gauge)=="velocity" ) erfi_z=-sqrt(pi/2._SP)*sigma/2._SP* & + & cI*( (exp( cZ **2- cS )*FADEVA(- cZ )-exp(- cS )) + & + & (exp(conjg(cZ)**2-conjg(cS))*FADEVA(-conjg(cZ))-exp(-conjg(cS))) ) + if (order==0 .and. trim(global_gauge)=="length" ) erfi_z=cZERO + ! + if (order==0 ) f_now= erfi_z + if (order==1 ) f_now= f1t *EXPf + if (order==2 ) f_now=(der_fac*f0t-(T-T_0)*f1t/sigma_eff**2)*EXPf + ! + case('QSFIELD') + ! + if (order==0 ) f_now= f1t *EXPf + if (order==1 ) f_now=( der_fac*f0t-(T-T_0)*f1t/sigma**2)*EXPf + if (order==2 ) f_now=(-der_fac*f1t-f1t/sigma**2 & + & -der_fac*(T-T_0)*f1t/sigma**2 & + & -(T-T_0)*(der_fac*f0t-(T-T_0)*f1t/sigma**2)/sigma**2)*EXPf + f_now=f_now/der_fac + ! + case('PULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + ! + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now= 0._SP + if (order==1 ) f_now= (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *f0t + if (order==2 ) f_now=(4._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4)*f0t & + & -(1._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4)*W_field*f1t + endif + ! + case('SPULSE') + if (chirp>0._SP) call error("chirp not implemented with "//trim(field_defs(1))) + T_0=sigma + W_0=W_field + f_now=cZERO + if(abs((T-T_0))< sigma) then + if (order==0 ) f_now=(4.0*W_0*(T-T_0)*f0t*(-sigma**2*W_0**2+W_0**2*(T-T_0)**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*(T-T_0)**2-2.0)+W_0**4*(T-T_0)**4-12.0* & + & W_0**2*(T -T_0)**2+24))/W_0**5/sigma**4+ & + & ((4.0*W_0*sigma*f0t*(-sigma**2*W_0**2+W_0**2*sigma**2-6.0) & + &+f1t*(sigma**4*W_0**4-2.0*sigma**2*W_0**2*(W_0**2*sigma**2-2.0)+W_0**4*sigma**4-12.0* & + & W_0**2*sigma**2+24))/W_0**5/sigma**4) + if (order==1 ) f_now=((T-T_0)**2 - sigma**2)**2/sigma**4*f0t + if (order==2 ) f_now=(2._SP*(T-T_0 + sigma) *(T-T_0 -sigma)**2/sigma**4 & + & +2._SP*(T-T_0 + sigma)**2 *(T-T_0 -sigma) /sigma**4 ) *f0t & + & - (T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 *W_0*f1t + endif + end select + ! + f_t(i_field)=f_t(i_field)+f_now + ! + eno + ! + small_a=f_t + ! +end function small_a +! diff --git a/src/real_time_control/small_a_frequency.F b/src/real_time_control/small_a_frequency.F new file mode 100644 index 0000000000..cfbb5e3d2c --- /dev/null +++ b/src/real_time_control/small_a_frequency.F @@ -0,0 +1,81 @@ +! +! License-Identifier: GPL +! +! Copyright (C) 2006 The Yambo Team +! +! Authors (see AUTHORS file for details): AM CA DS +! +! External fields: +! +! SIN: E(t)=\theta(t) * sin(t) +! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 +! DELTA: E(t)= \delta(t) +! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) +! THETA: E(t)= \theta(t) +! RES: E(t)= \theta(t)*exp(-i\omega t) +! ANTIRES: E(t)= \theta(t)*exp(i\omega t) +! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) +! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) +! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) +! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) +! QSFIELD: see below +! FROMFILE: shape of the electric field from file +! +! Linear frequency chirp coded for QSSIN pulse: +! (see also https://www.rp-photonics.com/chirp.html) +! +! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) +! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) +! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) +! +! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) +! +! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) +! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] +! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. +! +! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) +! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] +! +! +function small_a_frequency(W_i,E_field,iErr) + ! + use pars, ONLY:SP,cZERO,cI,pi,schlen + use stderr, ONLY:STRING_split + use fields, ONLY:ext_field,n_fields_defs_max + ! + implicit none + ! + complex(SP) :: small_a_frequency + ! + type(ext_field) :: E_field + complex(SP) :: W_i + integer :: iErr + ! + real(SP) ::W_0 + complex(SP) ::local_a(2) + character(schlen) ::field_defs(n_fields_defs_max) + ! + iErr=-1 + local_a=cZERO + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + W_0=E_field%frequency + select case( trim(field_defs(1)) ) + case('SIN') + iErr=0 + local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES + local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES + case('DELTA') + iErr=0 + local_a=1._SP/2._SP + end select + ! + if(trim(field_defs(2))== 'RES') local_a(2)=0._SP + if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP + ! + small_a_frequency=local_a(1)+local_a(2) + ! +end function small_a_frequency From a60c6cf5bdf03132487116d7467e8f6105148ea7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 15:59:23 +0200 Subject: [PATCH 1194/1367] Version 5.3.0, Revision 25722, Hash 852023f32 MODIFIED * configure include/version/version.m4 real_time_control/small_a.F Bugs: - Additions: -Fixed compilation Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/real_time_control/small_a.F | 8 +++----- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 96d8efdea4..7a88add6df 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25720 h.6a1f3be7b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25722 h.852023f32. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25720 h.6a1f3be7b' -PACKAGE_STRING='Yambo 5.3.0 r.25720 h.6a1f3be7b' +PACKAGE_VERSION='5.3.0 r.25722 h.852023f32' +PACKAGE_STRING='Yambo 5.3.0 r.25722 h.852023f32' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25720 h.6a1f3be7b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25722 h.852023f32 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25720 h.6a1f3be7b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25722 h.852023f32:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25720 h.6a1f3be7b +Yambo configure 5.3.0 r.25722 h.852023f32 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25720 h.6a1f3be7b, which was +It was created by Yambo $as_me 5.3.0 r.25722 h.852023f32, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25720" -SHASH="6a1f3be7b" +SREVISION="25722" +SHASH="852023f32" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25720 h.6a1f3be7b, which was +This file was extended by Yambo $as_me 5.3.0 r.25722 h.852023f32, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25720 h.6a1f3be7b +Yambo config.status 5.3.0 r.25722 h.852023f32 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3f641ce9b8..37541003df 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25720 h.6a1f3be7b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25722 h.852023f32, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25720" -SHASH="6a1f3be7b" +SREVISION="25722" +SHASH="852023f32" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/small_a.F b/src/real_time_control/small_a.F index fb3fd0228c..8ff12fafbd 100644 --- a/src/real_time_control/small_a.F +++ b/src/real_time_control/small_a.F @@ -74,12 +74,12 @@ function small_a(T,dt,E_field,order,envelop_only) ! real(SP) ::damp_func,a,b,c,sarg,WT,Tl ! - integer ::i1,i_T,i_field,i_file,n_fields + integer ::i1,i_fr,i_T,i_field,i_file,n_fields real(SP) ::Tloc,T_0_fac,T_0,W_0,sigma,chirp,sigma_eff,s_sigma_chirp,c_sigma_chirp,der_fac, & & WtimesT,EXPf,fr_shift(2),W_field,W_field_m1,cos_wt,sin_wt complex(SP) ::f_now,f_t(2),f0t,f1t,cZ,cS,exp_iwt,erfi_z character(schlen) ::field_defs(n_fields_defs_max) - logical ::l_multi_phase,envelop_only_ + logical ::envelop_only_ ! ! Zeroing ! @@ -157,7 +157,6 @@ function small_a(T,dt,E_field,order,envelop_only) end select ! ! Initial and relative phases control - l_multi_phase=.false. fr_shift(1)=0._SP fr_shift(2)=pi/2._SP do i1=1,n_fields_defs_max @@ -335,9 +334,8 @@ function small_a(T,dt,E_field,order,envelop_only) ! f_t(i_field)=f_t(i_field)+f_now ! - eno + enddo ! small_a=f_t ! end function small_a -! From a248abde1be5012cd3b77cc4a6801e8e1987fbd7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 16:42:29 +0200 Subject: [PATCH 1195/1367] Version 5.3.0, Revision 25723, Hash a60c6cf5b MODIFIED * configure include/version/version.m4 real_time_control/.objects real_time_initialize/RT_project.dep DELETED * real_time_control/small_a_frequency.F RENAMED * real_time_control/small_a.F -> real_time_control/RT_small_a.F Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 ++--- include/version/version.m4 | 6 +- src/real_time_control/.objects | 2 +- .../{small_a.F => RT_small_a.F} | 42 ++++++++++ src/real_time_control/small_a_frequency.F | 81 ------------------- src/real_time_initialize/RT_project.dep | 1 - 6 files changed, 57 insertions(+), 97 deletions(-) rename src/real_time_control/{small_a.F => RT_small_a.F} (92%) delete mode 100644 src/real_time_control/small_a_frequency.F diff --git a/configure b/configure index 7a88add6df..52c05a44fc 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25722 h.852023f32. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25724 h.a60c6cf5b. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25722 h.852023f32' -PACKAGE_STRING='Yambo 5.3.0 r.25722 h.852023f32' +PACKAGE_VERSION='5.3.0 r.25724 h.a60c6cf5b' +PACKAGE_STRING='Yambo 5.3.0 r.25724 h.a60c6cf5b' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25722 h.852023f32 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25724 h.a60c6cf5b to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25722 h.852023f32:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25724 h.a60c6cf5b:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25722 h.852023f32 +Yambo configure 5.3.0 r.25724 h.a60c6cf5b generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25722 h.852023f32, which was +It was created by Yambo $as_me 5.3.0 r.25724 h.a60c6cf5b, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25722" -SHASH="852023f32" +SREVISION="25724" +SHASH="a60c6cf5b" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25722 h.852023f32, which was +This file was extended by Yambo $as_me 5.3.0 r.25724 h.a60c6cf5b, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25722 h.852023f32 +Yambo config.status 5.3.0 r.25724 h.a60c6cf5b configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 37541003df..51eb469441 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25722 h.852023f32, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25724 h.a60c6cf5b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25722" -SHASH="852023f32" +SREVISION="25724" +SHASH="a60c6cf5b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/.objects b/src/real_time_control/.objects index 89e2211be4..e46d6cdb05 100644 --- a/src/real_time_control/.objects +++ b/src/real_time_control/.objects @@ -3,7 +3,7 @@ objs = RT_alloc.o RT_free.o RT_Dynamics_is_over.o RT_RESTART_database_copy.o $(d RT_Lifetimes_merge_intra_k.o RT_Lifetimes_merge_inter_k.o RT_Lifetimes_merge_driver.o \ RT_output_INIT.o RT_output.o RT_databases_IO.o \ RT_Observables.o RT_mean_lifetimes_and_temperatures.o RT_average_operator.o RT_occupations_FIT.o \ - RT_carriers_object.o RT_k_grid.o RT_apply.o small_a.o small_a_frequency.o \ + RT_carriers_object.o RT_k_grid.o RT_apply.o RT_small_a.o \ RT_interpolation_driver.o RT_interpolation_doit_and_transfer.o \ RT_update_TIME_CONF_descriptions.o \ RT_entropy.o RT_carriers_number.o RT_carriers_temperature.o RT_energy_components.o RT_output_and_IO_driver.o \ diff --git a/src/real_time_control/small_a.F b/src/real_time_control/RT_small_a.F similarity index 92% rename from src/real_time_control/small_a.F rename to src/real_time_control/RT_small_a.F index 8ff12fafbd..cd4a4b6f25 100644 --- a/src/real_time_control/small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -339,3 +339,45 @@ function small_a(T,dt,E_field,order,envelop_only) small_a=f_t ! end function small_a +! +function small_a_frequency(W_i,E_field,iErr) + ! + use pars, ONLY:SP,cZERO,cI,pi,schlen + use stderr, ONLY:STRING_split + use fields, ONLY:ext_field,n_fields_defs_max + ! + implicit none + ! + complex(SP) :: small_a_frequency + ! + type(ext_field) :: E_field + complex(SP) :: W_i + integer :: iErr + ! + real(SP) ::W_0 + complex(SP) ::local_a(2) + character(schlen) ::field_defs(n_fields_defs_max) + ! + iErr=-1 + local_a=cZERO + ! + field_defs="" + call STRING_split(trim(E_field%ef_name),field_defs) + ! + W_0=E_field%frequency + select case( trim(field_defs(1)) ) + case('SIN') + iErr=0 + local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES + local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES + case('DELTA') + iErr=0 + local_a=1._SP/2._SP + end select + ! + if(trim(field_defs(2))== 'RES') local_a(2)=0._SP + if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP + ! + small_a_frequency=local_a(1)+local_a(2) + ! +end function small_a_frequency diff --git a/src/real_time_control/small_a_frequency.F b/src/real_time_control/small_a_frequency.F deleted file mode 100644 index cfbb5e3d2c..0000000000 --- a/src/real_time_control/small_a_frequency.F +++ /dev/null @@ -1,81 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2006 The Yambo Team -! -! Authors (see AUTHORS file for details): AM CA DS -! -! External fields: -! -! SIN: E(t)=\theta(t) * sin(t) -! SOFTSIN: E(t)= (c*t^2 + b*t^3 + a*t^4 )* sin(t) and 0 for t<=0 -! DELTA: E(t)= \delta(t) -! GAUSS: E(t)= exp((t-t_o)^2/(2*sigma^2)) -! THETA: E(t)= \theta(t) -! RES: E(t)= \theta(t)*exp(-i\omega t) -! ANTIRES: E(t)= \theta(t)*exp(i\omega t) -! PULSE: E(t)=(T-T_0 + sigma)**2 *(T-T_0 -sigma)**2/sigma**4 * cos(w t) -! QSSIN: E(t)= exp((t-t_o)^2/(2*sigma^2))*sin(w t) -! SPULSE: E(t)=((T-T_0)**2 - sigma**2)**2/sigma**4*cos(w t) -! PHHG: E(t)=sin^2(\pi*(T-T_0)/sigma)*cos( w * t) -! QSFIELD: see below -! FROMFILE: shape of the electric field from file -! -! Linear frequency chirp coded for QSSIN pulse: -! (see also https://www.rp-photonics.com/chirp.html) -! -! s_sigma_chirp=sigma**2/(2.*(sigma**4+chirp**4)) -! c_sigma_chirp=chirp**2/(2.*(sigma**4+chirp**4)) -! sigma_eff=sqrt((sigma**4+chirp**4)/sigma**2)=sqrt(1./(2.*s_sigma_chirp)) -! -! sin(omega*(T-T0)+c_sigma_chirp*(T-T_0)**2) * exp(-(T-T_0)**2/(2.*sigma_eff**2) ) -! -! = [ exp( cI*(omega*(T-T0))*exp( cI*c_sigma_chirp*(T-T_0)**2) -! -exp(-cI*(omega*(T-T0))*exp(-cI*c_sigma_chirp*(T-T_0)**2) ] -! * exp(-(T-T_0)**2 * s_sigma_chirp ) / 2. -! -! = [ exp( cI*(omega*(T-T0))* exp( (s_sigma_chirp+cI*c_sigma_chirp) *(T-T_0)**2) -! - exp(-cI*(omega*(T-T0))* exp( (s_sigma_chirp-cI*c_sigma_chirp) *(T-T_0)**2) ] -! -! -function small_a_frequency(W_i,E_field,iErr) - ! - use pars, ONLY:SP,cZERO,cI,pi,schlen - use stderr, ONLY:STRING_split - use fields, ONLY:ext_field,n_fields_defs_max - ! - implicit none - ! - complex(SP) :: small_a_frequency - ! - type(ext_field) :: E_field - complex(SP) :: W_i - integer :: iErr - ! - real(SP) ::W_0 - complex(SP) ::local_a(2) - character(schlen) ::field_defs(n_fields_defs_max) - ! - iErr=-1 - local_a=cZERO - ! - field_defs="" - call STRING_split(trim(E_field%ef_name),field_defs) - ! - W_0=E_field%frequency - select case( trim(field_defs(1)) ) - case('SIN') - iErr=0 - local_a(1)=local_a(1)+(1._SP/(W_i-W_0) -1._SP/W_0)/2._SP ! RES - local_a(2)=local_a(2)+( -1._SP/(W_i+W_0) -1._SP/W_0)/2._SP ! ARES - case('DELTA') - iErr=0 - local_a=1._SP/2._SP - end select - ! - if(trim(field_defs(2))== 'RES') local_a(2)=0._SP - if(trim(field_defs(2))=='ANTIRES') local_a(1)=0._SP - ! - small_a_frequency=local_a(1)+local_a(2) - ! -end function small_a_frequency diff --git a/src/real_time_initialize/RT_project.dep b/src/real_time_initialize/RT_project.dep index 7d13d8b4e4..6ff0d7b761 100644 --- a/src/real_time_initialize/RT_project.dep +++ b/src/real_time_initialize/RT_project.dep @@ -1,5 +1,4 @@ RT_Dephasing_Matrix.o - RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_initialize.o RT_occupations_and_levels_init.o From ccd57e6323bd8acc4387f3be8809a0d6d2b1a20c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 18:43:09 +0200 Subject: [PATCH 1196/1367] Version 5.3.0, Revision 25724, Hash a248abde1 MODIFIED * configure include/version/version.m4 interface/INIT_fields.F Bugs: - Additions: -Better input Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_fields.F | 28 ++++++++++++++++++++-------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/configure b/configure index 52c05a44fc..787b8cd942 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25724 h.a60c6cf5b. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25725 h.a248abde1. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25724 h.a60c6cf5b' -PACKAGE_STRING='Yambo 5.3.0 r.25724 h.a60c6cf5b' +PACKAGE_VERSION='5.3.0 r.25725 h.a248abde1' +PACKAGE_STRING='Yambo 5.3.0 r.25725 h.a248abde1' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25724 h.a60c6cf5b to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25725 h.a248abde1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25724 h.a60c6cf5b:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25725 h.a248abde1:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25724 h.a60c6cf5b +Yambo configure 5.3.0 r.25725 h.a248abde1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25724 h.a60c6cf5b, which was +It was created by Yambo $as_me 5.3.0 r.25725 h.a248abde1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25724" -SHASH="a60c6cf5b" +SREVISION="25725" +SHASH="a248abde1" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25724 h.a60c6cf5b, which was +This file was extended by Yambo $as_me 5.3.0 r.25725 h.a248abde1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25724 h.a60c6cf5b +Yambo config.status 5.3.0 r.25725 h.a248abde1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 51eb469441..4935f3258d 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25724 h.a60c6cf5b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25725 h.a248abde1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25724" -SHASH="a60c6cf5b" +SREVISION="25725" +SHASH="a248abde1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index b74ca6bed4..df064f92f5 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -63,7 +63,7 @@ subroutine Afield(defs,i_field) use parser_m, ONLY:parser use stderr, ONLY:intc use it_m, ONLY:E_unit,I_unit,Time_unit,V_real_time, & - & initmode,initdefs + & initmode,initdefs,V_nl_optics ! implicit none ! @@ -74,29 +74,41 @@ subroutine Afield(defs,i_field) ! character(10) :: name logical :: is_def + integer :: V_field ! name='Field'//trim(intc(i_field)) + ! + V_field=0 ! no verbosity +#if defined _NL + if(i_field==3) V_field=V_nl_optics +#endif + ! call it(defs,trim(name)//'_Freq', '[RT '//trim(name)//'] Frequency',& -& Efield(i_field)%frequency,unit=E_unit) +& Efield(i_field)%frequency,unit=E_unit,verb_level=V_field) call it(defs,trim(name)//'_Int', '[RT '//trim(name)//'] Intensity',& -& Efield(i_field)%intensity,unit=I_unit) +& Efield(i_field)%intensity,unit=I_unit,verb_level=V_field) call it(defs,trim(name)//'_Width', '[RT '//trim(name)//'] Width',& -& Efield(i_field)%width,unit=Time_unit(1)) +& Efield(i_field)%width,unit=Time_unit(1),verb_level=V_field) call it(defs,trim(name)//'_Chirp', '[RT '//trim(name)//'] Width',& & Efield(i_field)%chirp,unit=Time_unit(1),verb_level=V_real_time) call it(defs,trim(name)//'_FWHM', '[RT '//trim(name)//'] Full Width at Half Maximum (overwrite width if set)',& & Efield(i_field)%FWHM,unit=Time_unit(1),verb_level=V_real_time) call it(defs,trim(name)//'_kind', '[RT '//trim(name)//'] Kind(SIN|COS|RES|ANTIRES|GAUSS|DELTA|QSSIN)',& -& Efield(i_field)%ef_name) +& Efield(i_field)%ef_name,verb_level=V_field) call it(defs,trim(name)//'_pol', '[RT '//trim(name)//'] Pol(linear|circular)',& -& Efield(i_field)%ef_pol) +& Efield(i_field)%ef_pol,verb_level=V_field) call it(defs,trim(name)//'_Dir', '[RT '//trim(name)//'] Versor',& -& Efield(i_field)%versor) +& Efield(i_field)%versor,verb_level=V_field) call it(defs,trim(name)//'_Dir_circ', '[RT '//trim(name)//'] Versor_circ',& & Efield(i_field)%versor_circ,verb_level=V_real_time) +#if defined _NL + call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& +& Efield(i_field)%t_initial,unit=Time_unit(1),verb_level=V_real_time) +#else call it(defs,trim(name)//'_Tstart', '[RT '//trim(name)//'] Initial Time',& -& Efield(i_field)%t_initial,unit=Time_unit(1)) +& Efield(i_field)%t_initial,unit=Time_unit(1),verb_level=V_field) +#endif ! if (initmode==4.and..not.infile_editing) then ! From cddf714dbfbad9bbff4c434d216e4252661ee837 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 21:43:10 +0200 Subject: [PATCH 1197/1367] Version 5.3.0, Revision 25725, Hash ccd57e632 MODIFIED * configure include/version/version.m4 io/io_NL.F io/variables_NL.F Bugs: - Additions: - Changes: -Fixed field name Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/io/io_NL.F | 4 ++-- src/io/variables_NL.F | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 787b8cd942..0c1d119194 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25725 h.a248abde1. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25726 h.ccd57e632. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25725 h.a248abde1' -PACKAGE_STRING='Yambo 5.3.0 r.25725 h.a248abde1' +PACKAGE_VERSION='5.3.0 r.25726 h.ccd57e632' +PACKAGE_STRING='Yambo 5.3.0 r.25726 h.ccd57e632' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25725 h.a248abde1 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25726 h.ccd57e632 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25725 h.a248abde1:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25726 h.ccd57e632:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25725 h.a248abde1 +Yambo configure 5.3.0 r.25726 h.ccd57e632 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25725 h.a248abde1, which was +It was created by Yambo $as_me 5.3.0 r.25726 h.ccd57e632, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25725" -SHASH="a248abde1" +SREVISION="25726" +SHASH="ccd57e632" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25725 h.a248abde1, which was +This file was extended by Yambo $as_me 5.3.0 r.25726 h.ccd57e632, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25725 h.a248abde1 +Yambo config.status 5.3.0 r.25726 h.ccd57e632 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 4935f3258d..3506af45a8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25725 h.a248abde1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25726 h.ccd57e632, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25725" -SHASH="a248abde1" +SREVISION="25726" +SHASH="ccd57e632" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/io/io_NL.F b/src/io/io_NL.F index b91b2db077..60a7cba86d 100644 --- a/src/io/io_NL.F +++ b/src/io/io_NL.F @@ -131,8 +131,8 @@ integer function io_NL(what,ID) call io_variable_elemental(ID_frag,VAR="[FIELDs] Damping ",TERMINATOR="[fs]",& & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/)) - call def_variable_elemental(ID_frag,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) - call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& + call def_variable_elemental(ID_frag,"Field_Freq_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID_frag,VAR="[FIELDs] Frequency ",TERMINATOR="[eV]",& & R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV) call def_variable_elemental(ID_frag,"Field_Initial_time_"//trim(intc(i_Prb)),1,SP,0) diff --git a/src/io/variables_NL.F b/src/io/variables_NL.F index 1a603b4c77..cb49c85cb7 100644 --- a/src/io/variables_NL.F +++ b/src/io/variables_NL.F @@ -135,8 +135,8 @@ integer function variables_NL(ID) & R0=Efield(i_Prb)%FWHM,CHECK=.true.,OP=(/"=="/),& & DESCRIPTOR=NL_desc) - call def_variable_elemental(ID,"Field_Freq_range_"//trim(intc(i_Prb)),1,SP,0) - call io_variable_elemental(ID,VAR="[FIELDs] Frequency range ",TERMINATOR="[eV]",& + call def_variable_elemental(ID,"Field_Freq_"//trim(intc(i_Prb)),1,SP,0) + call io_variable_elemental(ID,VAR="[FIELDs] Frequency ",TERMINATOR="[eV]",& & R0=Efield(i_Prb)%frequency,CHECK=.true.,OP=(/"=="/),UNIT=HA2EV,& & DESCRIPTOR=NL_desc) From dcb64b7c29c0aa39bdacb80a79a6023bcf6c35b0 Mon Sep 17 00:00:00 2001 From: Giacomo Sesti Date: Thu, 16 Oct 2025 18:20:16 +0200 Subject: [PATCH 1198/1367] Found bug in K_kernel.F if running TDDFT-ALDA calculation. tddft_wf variables not allocated inside the OMP loop. --- src/bse/K_kernel.F | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 73aec31cdd..3c6f167924 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -569,6 +569,16 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call timing('X T_space Kernel sum',OPR='start') ! + ! GS Free variables, they are later allocated within each OMP loop + YAMBO_FREE(tddft_wf%WF_symm1) + YAMBO_FREE(tddft_wf%WF_symm2) + if (l_tddft_rsum) then + YAMBO_FREE(tddft_wf%rhotwr1) + YAMBO_FREE(tddft_wf%rhotwr2) + else if (l_tddft_gsum) then + YAMBO_FREE(tddft_wf%rhotwr_DP) + endif + ! ! Transition Loops !------------------ ! @@ -583,7 +593,19 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !DEV_OMP & iq_W_bz_last,ig_W_last,iq_W_bz_mq_last,ig_W_mq_last, & !DEV_OMP & i_k_bz_mem,i_kmq_bz_mem,qindx_tmp,BS_mat_tmp,tddft_wf ) ! - call OPENMP_update(master_thread) + call OPENMP_update(master_thread) + ! + ! + ! Allocate variables tddft_wf variables neeeded within the OMP loop + YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) + if (l_tddft_rsum) then + YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) + YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size*n_spinor*n_spinor)) + else if (l_tddft_gsum) then + YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) + endif + ! ! i_p_bz_last=0 ; i_k_bz_last=0 i_pmq_bz_last=0 ; i_kmq_bz_last=0 From a191c4fbec98a049b76811121ced110ddde85512 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 22:21:28 +0200 Subject: [PATCH 1199/1367] Version 5.3.0, Revision 25726, Hash cddf714db MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Fixed output Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 3 ++- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 0c1d119194..1c1b76dbf9 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25726 h.ccd57e632. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25727 h.cddf714db. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25726 h.ccd57e632' -PACKAGE_STRING='Yambo 5.3.0 r.25726 h.ccd57e632' +PACKAGE_VERSION='5.3.0 r.25727 h.cddf714db' +PACKAGE_STRING='Yambo 5.3.0 r.25727 h.cddf714db' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25726 h.ccd57e632 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25727 h.cddf714db to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25726 h.ccd57e632:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25727 h.cddf714db:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25726 h.ccd57e632 +Yambo configure 5.3.0 r.25727 h.cddf714db generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25726 h.ccd57e632, which was +It was created by Yambo $as_me 5.3.0 r.25727 h.cddf714db, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25726" -SHASH="ccd57e632" +SREVISION="25727" +SHASH="cddf714db" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25726 h.ccd57e632, which was +This file was extended by Yambo $as_me 5.3.0 r.25727 h.cddf714db, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25726 h.ccd57e632 +Yambo config.status 5.3.0 r.25727 h.cddf714db configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 3506af45a8..a3594a333c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25726 h.ccd57e632, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25727 h.cddf714db, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25726" -SHASH="ccd57e632" +SREVISION="25727" +SHASH="cddf714db" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index de3319d6bb..e6b5e29fe6 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -553,9 +553,10 @@ subroutine NL_initialize(E,k) call msg( 'r', 'Damping ',NL_damping*HA2EV,"[eV]") call msg( 'r', 'Dephasing ',Phase_LifeTime*AUT2FS,"[fs]") call msg( 'r', 'Radiative LifeTime ',RAD_LifeTime*AUT2FS,"[fs]") - do i1=1,n_ext_fields + do i1=1,n_active_fields call msg( 'r', 'Efield '//trim(Efield(i1)%ef_name)) call msg( 'r', 'Efield width ',Efield(i1)%width*AUT2FS,"[fs]") + call msg( 'r', 'Efield frequency ',Efield(i1)%frequency*HA2EV,"[eV]") call msg( 'r', 'Efield Amplitude [V/m]',Efield(i1)%amplitude*AU2VMm1) call msg( 'r', 'Pond. Energy [eV/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**2*HA2EV) call msg( 'r', 'Adiabatic param [1/mu]',Efield(i1)%amplitude**2/4._SP/Efield(i1)%frequency**3) From 7ed07f62fcdb6639869c49d321618d1b1b7aed8c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 16 Oct 2025 22:28:34 +0200 Subject: [PATCH 1200/1367] More proper fix of tddft allocations --- src/bse/K_kernel.F | 53 +++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 3c6f167924..001ccb5e0d 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -346,16 +346,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! QP_ng_Vxc=BS_n_g_fxc ! - if (l_tddft_rsum) then - YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) - YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size*n_spinor*n_spinor)) - else if (l_tddft_gsum) then - YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) - endif - ! - YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) - YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) - ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then YAMBO_ALLOC(V_xc,(fft_size,n_spin)) @@ -378,6 +368,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call TDDFT_ALDA_lower_cutoff(FXC_mode) ! + if (l_tddft_gsum) then + YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) + endif + ! call WF_free(WF,keep_states_to_load=.true.) ! endif @@ -569,16 +565,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call timing('X T_space Kernel sum',OPR='start') ! - ! GS Free variables, they are later allocated within each OMP loop - YAMBO_FREE(tddft_wf%WF_symm1) - YAMBO_FREE(tddft_wf%WF_symm2) - if (l_tddft_rsum) then - YAMBO_FREE(tddft_wf%rhotwr1) - YAMBO_FREE(tddft_wf%rhotwr2) - else if (l_tddft_gsum) then - YAMBO_FREE(tddft_wf%rhotwr_DP) - endif - ! ! Transition Loops !------------------ ! @@ -597,15 +583,12 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! ! Allocate variables tddft_wf variables neeeded within the OMP loop - YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) - YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) if (l_tddft_rsum) then + YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) YAMBO_ALLOC(tddft_wf%rhotwr1,(fft_size*n_spinor*n_spinor)) YAMBO_ALLOC(tddft_wf%rhotwr2,(fft_size*n_spinor*n_spinor)) - else if (l_tddft_gsum) then - YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) endif - ! ! i_p_bz_last=0 ; i_k_bz_last=0 i_pmq_bz_last=0 ; i_kmq_bz_last=0 @@ -874,6 +857,17 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! !DEV_OMP end do ! + if(iHxc==2) then + ! + if (l_tddft_rsum) then + YAMBO_FREE(tddft_wf%rhotwr1) + YAMBO_FREE(tddft_wf%rhotwr2) + YAMBO_FREE(tddft_wf%WF_symm1) + YAMBO_FREE(tddft_wf%WF_symm2) + endif + ! + endif + ! if (iHxc==3) then YAMBO_FREE_GPU(O1) YAMBO_FREE_GPU(O2) @@ -926,16 +920,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if(iHxc==2) then ! - if (l_tddft_rsum) then - YAMBO_FREE(tddft_wf%rhotwr1) - YAMBO_FREE(tddft_wf%rhotwr2) - else if (l_tddft_gsum) then + if (l_tddft_gsum) then call TDDFT_oscillators_free_L(BS_nT_grps) call TDDFT_oscillators_free_R(BS_nT_grps) YAMBO_FREE(tddft_wf%rhotwr_DP) + YAMBO_FREE(tddft_wf%WF_symm1) + YAMBO_FREE(tddft_wf%WF_symm2) endif - YAMBO_FREE(tddft_wf%WF_symm1) - YAMBO_FREE(tddft_wf%WF_symm2) ! if (l_bs_fxc) then YAMBO_FREE(F_xc_gspace) From 6f282ec69910fe4ebce31d4c63748163462243cc Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 16 Oct 2025 22:33:32 +0200 Subject: [PATCH 1201/1367] Version 5.3.0, Revision 25727, Hash a191c4fbe MODIFIED * configure include/version/version.m4 interface/INIT_fields.F Bugs: - Additions: - Changes: -Fixed output Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/interface/INIT_fields.F | 8 +------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 1c1b76dbf9..30c695b675 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25727 h.cddf714db. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25728 h.a191c4fbe. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25727 h.cddf714db' -PACKAGE_STRING='Yambo 5.3.0 r.25727 h.cddf714db' +PACKAGE_VERSION='5.3.0 r.25728 h.a191c4fbe' +PACKAGE_STRING='Yambo 5.3.0 r.25728 h.a191c4fbe' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25727 h.cddf714db to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25728 h.a191c4fbe to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25727 h.cddf714db:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25728 h.a191c4fbe:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25727 h.cddf714db +Yambo configure 5.3.0 r.25728 h.a191c4fbe generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25727 h.cddf714db, which was +It was created by Yambo $as_me 5.3.0 r.25728 h.a191c4fbe, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25727" -SHASH="cddf714db" +SREVISION="25728" +SHASH="a191c4fbe" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25727 h.cddf714db, which was +This file was extended by Yambo $as_me 5.3.0 r.25728 h.a191c4fbe, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25727 h.cddf714db +Yambo config.status 5.3.0 r.25728 h.a191c4fbe configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index a3594a333c..4a9edca092 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25727 h.cddf714db, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25728 h.a191c4fbe, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25727" -SHASH="cddf714db" +SREVISION="25728" +SHASH="a191c4fbe" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/interface/INIT_fields.F b/src/interface/INIT_fields.F index df064f92f5..9fa24580ea 100644 --- a/src/interface/INIT_fields.F +++ b/src/interface/INIT_fields.F @@ -33,13 +33,7 @@ subroutine Afield_activate(i1) ! character(6)::field field='Field'//trim(intc(i1)) -#if defined _NL - if(l_nl_p_and_p) then -#endif - call initactivate(1,field//'_Freq') -#if defined _NL - endif -#endif + call initactivate(1,field//'_Freq') call initactivate(1,field//'_Int') call initactivate(1,field//'_Width') call initactivate(1,field//'_Chirp') From 250daf363137ba1dae20235fe8c93145cf6907a3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 16 Oct 2025 23:06:15 +0200 Subject: [PATCH 1202/1367] Improvement over previous fix (less memory used) --- src/bse/K_kernel.F | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 001ccb5e0d..6b5b3343b0 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -100,7 +100,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) complex(SP), external :: TDDFT_ALDA_eh_space_G_kernel,TDDFT_ALDA_eh_space_G_kernel_coupling complex(SP), external :: K_exchange_kernel,K_exchange_kernel_coupling ! - logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,BS_blk_todo,& + logical :: l_bs_exch,l_bs_corr,l_bs_exch_wf_in_loop,l_bs_tddft_wf_in_loop,l_matrix_init,BS_blk_todo,l_tddft_comp,& & l_load_kernel,l_write_kernel,l_write_kernel_step,l_skip_phases,l_std_alg,l_dir_alg,l_tddft_gsum,l_tddft_rsum ! ! I/O @@ -368,12 +368,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call TDDFT_ALDA_lower_cutoff(FXC_mode) ! - if (l_tddft_gsum) then - YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) - YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) - YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) - endif - ! call WF_free(WF,keep_states_to_load=.true.) ! endif @@ -546,6 +540,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! TDDFT oscillators !---------------------- if(iHxc==2 .and. l_tddft_gsum) then + ! + l_tddft_comp = .not.(allocated(BS_T_grp(i_Tgrp_k)%O_tddft_L).and.allocated(BS_T_grp(i_Tgrp_k)%O_tddft_R)) + ! + if (l_tddft_comp) then + YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%WF_symm2,(fft_size,n_spinor)) + YAMBO_ALLOC(tddft_wf%rhotwr_DP,(fft_size)) + endif + ! if (.not.allocated( BS_T_grp(i_Tgrp_k)%O_tddft_L) ) then call TDDFT_oscillators_alloc_L(i_Tgrp_k) call TDDFT_ALDA_eh_space_G_collisions_L(iq,Xk,i_Tgrp_k,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) @@ -554,6 +557,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call TDDFT_oscillators_alloc_R(i_Tgrp_p) call TDDFT_ALDA_eh_space_G_collisions_R(iq,Xk,i_Tgrp_p,NG,l_bs_tddft_wf_in_loop,tddft_wf,mode_now) endif + ! + if (l_tddft_comp) then + YAMBO_FREE(tddft_wf%WF_symm1) + YAMBO_FREE(tddft_wf%WF_symm2) + YAMBO_FREE(tddft_wf%rhotwr_DP) + endif + ! endif ! ! Correlation oscillators @@ -923,9 +933,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (l_tddft_gsum) then call TDDFT_oscillators_free_L(BS_nT_grps) call TDDFT_oscillators_free_R(BS_nT_grps) - YAMBO_FREE(tddft_wf%rhotwr_DP) - YAMBO_FREE(tddft_wf%WF_symm1) - YAMBO_FREE(tddft_wf%WF_symm2) endif ! if (l_bs_fxc) then From cc14a2e7432f62b39c55f9ff48dafca132c1e149 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 17 Oct 2025 08:55:21 +0200 Subject: [PATCH 1203/1367] Fixed maxchvars for yambo_rt and yambo_nl --- src/parser/mod_itm.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/mod_itm.F b/src/parser/mod_itm.F index fd1509a016..ae3ad4eb2f 100644 --- a/src/parser/mod_itm.F +++ b/src/parser/mod_itm.F @@ -50,7 +50,7 @@ module it_m integer, parameter :: maxr3vars=100 integer, parameter :: maxr4vars=50 integer, parameter :: maxc1vars=50 - integer, parameter :: maxchvars=100 + integer, parameter :: maxchvars=150 integer, parameter :: nvars=(maxi1vars+2*maxi2vars+2*maxi3vars+& & maxr1vars+2*maxr2vars+2*maxr3vars+4*maxr4vars+& & maxc1vars+maxchvars) From 142d9e1a76b020f22d2ea155d95ad8cd4877e1e0 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 17 Oct 2025 10:17:42 +0200 Subject: [PATCH 1204/1367] Version 5.3.0, Revision 25697, Hash f38eb19ac MODIFIED * configure include/version/version.m4 nloptics/NL_project.dep nloptics/NL_start_and_restart.F Bugs: - Additions: -Better message Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_project.dep | 1 - src/nloptics/NL_start_and_restart.F | 2 ++ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 4338168aa4..ff067d7be6 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25695 h.4c7631728. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25697 h.f38eb19ac. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25695 h.4c7631728' -PACKAGE_STRING='Yambo 5.3.0 r.25695 h.4c7631728' +PACKAGE_VERSION='5.3.0 r.25697 h.f38eb19ac' +PACKAGE_STRING='Yambo 5.3.0 r.25697 h.f38eb19ac' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25695 h.4c7631728 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25697 h.f38eb19ac to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25695 h.4c7631728:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25697 h.f38eb19ac:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25695 h.4c7631728 +Yambo configure 5.3.0 r.25697 h.f38eb19ac generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25695 h.4c7631728, which was +It was created by Yambo $as_me 5.3.0 r.25697 h.f38eb19ac, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25695" -SHASH="4c7631728" +SREVISION="25697" +SHASH="f38eb19ac" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25695 h.4c7631728, which was +This file was extended by Yambo $as_me 5.3.0 r.25697 h.f38eb19ac, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25695 h.4c7631728 +Yambo config.status 5.3.0 r.25697 h.f38eb19ac configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d94de79886..86a64e9e4c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25695 h.4c7631728, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25697 h.f38eb19ac, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25695" -SHASH="4c7631728" +SREVISION="25697" +SHASH="f38eb19ac" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_project.dep b/src/nloptics/NL_project.dep index 6fa71a60f3..68b0c91045 100644 --- a/src/nloptics/NL_project.dep +++ b/src/nloptics/NL_project.dep @@ -1,4 +1,3 @@ - DIPOLE_symmetrize.o DIP_polarization.o EXC_macroscopic_JGM.o EXP_op.o diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index c1c70797ca..1b04654e34 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -204,6 +204,8 @@ subroutine NL_start_and_restart(E,k,Dip) RESTART = io_err(RT_return_db_ID("V_bands"))==0.and.io_err(RT_return_db_ID("OBSERVABLES"))==0 ! endif + if(l_pump_and_probe.and..not.RESTART) & +& call msg('s','RESTART point not found') ! n_runs_todo=n_runs-count(runs_done) if(n_runs_todo/=n_runs) call msg('s','RESTART, remaining frequencies/angles ',n_runs_todo) From 2f41769b19617a0c19791731a3c088cdff6c20f2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 17 Oct 2025 10:32:53 +0200 Subject: [PATCH 1205/1367] Version 5.3.0, Revision 25698, Hash 142d9e1a7 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: -Fixed bug with velocity guage Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 5 +++++ 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/configure b/configure index ff067d7be6..596c98fd39 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25697 h.f38eb19ac. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25698 h.142d9e1a7. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25697 h.f38eb19ac' -PACKAGE_STRING='Yambo 5.3.0 r.25697 h.f38eb19ac' +PACKAGE_VERSION='5.3.0 r.25698 h.142d9e1a7' +PACKAGE_STRING='Yambo 5.3.0 r.25698 h.142d9e1a7' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25697 h.f38eb19ac to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25698 h.142d9e1a7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25697 h.f38eb19ac:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25698 h.142d9e1a7:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25697 h.f38eb19ac +Yambo configure 5.3.0 r.25698 h.142d9e1a7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25697 h.f38eb19ac, which was +It was created by Yambo $as_me 5.3.0 r.25698 h.142d9e1a7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25697" -SHASH="f38eb19ac" +SREVISION="25698" +SHASH="142d9e1a7" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25697 h.f38eb19ac, which was +This file was extended by Yambo $as_me 5.3.0 r.25698 h.142d9e1a7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25697 h.f38eb19ac +Yambo config.status 5.3.0 r.25698 h.142d9e1a7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 86a64e9e4c..d8449f0279 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25697 h.f38eb19ac, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25698 h.142d9e1a7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25697" -SHASH="f38eb19ac" +SREVISION="25698" +SHASH="142d9e1a7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 441382f661..edaaa226ee 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -220,6 +220,11 @@ subroutine NL_initialize(E,k) if(.not.l_pump_and_probe.and.Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') & call warning(' Non-linear optics properties can be obtained with SOFTSIN/SIN fields only') ! + if(l_velocity_IPA.and.l_pump_and_probe) then + call warning('Fast parallelization in vel-gauge not compatible with p&p, turned off') + l_velocity_IPA=.false. + endif + ! ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) ! calcualte the T_0 ! From 9924488c5ff771a6e97a811cc35c53773b2b226b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 17 Oct 2025 17:11:38 +0200 Subject: [PATCH 1206/1367] Version 5.3.0, Revision 25728, Hash 6f282ec69 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: -Fixed RT-IO vs Fast-parallelization in velocity+IPA Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 17 +++++++++++++---- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 30c695b675..fdfbab971b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25728 h.a191c4fbe. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25729 h.6f282ec69. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25728 h.a191c4fbe' -PACKAGE_STRING='Yambo 5.3.0 r.25728 h.a191c4fbe' +PACKAGE_VERSION='5.3.0 r.25729 h.6f282ec69' +PACKAGE_STRING='Yambo 5.3.0 r.25729 h.6f282ec69' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25728 h.a191c4fbe to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25729 h.6f282ec69 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25728 h.a191c4fbe:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25729 h.6f282ec69:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25728 h.a191c4fbe +Yambo configure 5.3.0 r.25729 h.6f282ec69 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25728 h.a191c4fbe, which was +It was created by Yambo $as_me 5.3.0 r.25729 h.6f282ec69, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25728" -SHASH="a191c4fbe" +SREVISION="25729" +SHASH="6f282ec69" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25728 h.a191c4fbe, which was +This file was extended by Yambo $as_me 5.3.0 r.25729 h.6f282ec69, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25728 h.a191c4fbe +Yambo config.status 5.3.0 r.25729 h.6f282ec69 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 4a9edca092..2305ffcdd7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25728 h.a191c4fbe, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25729 h.6f282ec69, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25728" -SHASH="a191c4fbe" +SREVISION="25729" +SHASH="6f282ec69" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index e6b5e29fe6..1ceace8204 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -107,10 +107,7 @@ subroutine NL_initialize(E,k) ! This parallelization is not compatible with wavefunction-IO for ! this reason I turn it off in pump-probe setup ! - if(trim(NL_Correlation)=='IPA'.and..not.l_pump_and_probe) then - l_velocity_IPA=.TRUE. - call msg('rs','Fast parallelization: velocity gauge + IPA ') - endif + if(trim(NL_Correlation)=='IPA') l_velocity_IPA=.TRUE. ! endif ! @@ -226,6 +223,18 @@ subroutine NL_initialize(E,k) if(.not.l_pump_and_probe.and.Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') & call warning(' Non-linear optics properties can be obtained with SOFTSIN/SIN fields only') ! + if(l_pump_and_probe.and.l_velocity_IPA) then + ! + ! Fast parallelization not compatible with RT-IO + ! + l_velocity_IPA=.false. + ! + elseif(.not.l_pump_and_probe.and.l_velocity_IPA) then + ! + call msg('s','Fast parallelization for velociy-gauge + IPA') + ! + endif + ! ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) ! calcualte the T_0 ! From 3742921361ebe88b813ee6e3de73035d96af3898 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 17 Oct 2025 17:23:13 +0200 Subject: [PATCH 1207/1367] Fixed bug due to non initialized n_threads_X when running yambo_sc --- src/parallel/PARALLEL_global_Self_Energy.F | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parallel/PARALLEL_global_Self_Energy.F b/src/parallel/PARALLEL_global_Self_Energy.F index 6af94fc569..f565cf2f79 100644 --- a/src/parallel/PARALLEL_global_Self_Energy.F +++ b/src/parallel/PARALLEL_global_Self_Energy.F @@ -320,6 +320,7 @@ subroutine PARALLEL_global_Self_Energy(E,Xk,q,ENVIRONMENT) ! if ( trim(ENVIRONMENT)=="Self_Energy" ) then call OPENMP_set_threads(n_threads_in=n_threads_SE) + n_threads_SX=n_threads_SE else if ( trim(ENVIRONMENT)=="Sigma_X" ) then call OPENMP_set_threads(n_threads_in=n_threads_SX) endif From 3bb3414b95b490ef16c7a671dd030d9f2375b01a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 17 Oct 2025 17:28:42 +0200 Subject: [PATCH 1208/1367] Version 5.3.0, Revision 25699, Hash 2f41769b1 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F nloptics/NL_start_and_restart.F Bugs: - Additions: - Changes: -Reverted the two previous commit made by mistake in this branch Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 5 ----- src/nloptics/NL_start_and_restart.F | 2 -- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/configure b/configure index 596c98fd39..7d539ec6f9 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25698 h.142d9e1a7. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25699 h.2f41769b1. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25698 h.142d9e1a7' -PACKAGE_STRING='Yambo 5.3.0 r.25698 h.142d9e1a7' +PACKAGE_VERSION='5.3.0 r.25699 h.2f41769b1' +PACKAGE_STRING='Yambo 5.3.0 r.25699 h.2f41769b1' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25698 h.142d9e1a7 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25699 h.2f41769b1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25698 h.142d9e1a7:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25699 h.2f41769b1:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25698 h.142d9e1a7 +Yambo configure 5.3.0 r.25699 h.2f41769b1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25698 h.142d9e1a7, which was +It was created by Yambo $as_me 5.3.0 r.25699 h.2f41769b1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25698" -SHASH="142d9e1a7" +SREVISION="25699" +SHASH="2f41769b1" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25698 h.142d9e1a7, which was +This file was extended by Yambo $as_me 5.3.0 r.25699 h.2f41769b1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25698 h.142d9e1a7 +Yambo config.status 5.3.0 r.25699 h.2f41769b1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index d8449f0279..e10f5f9b51 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25698 h.142d9e1a7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25699 h.2f41769b1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25698" -SHASH="142d9e1a7" +SREVISION="25699" +SHASH="2f41769b1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index edaaa226ee..441382f661 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -220,11 +220,6 @@ subroutine NL_initialize(E,k) if(.not.l_pump_and_probe.and.Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') & call warning(' Non-linear optics properties can be obtained with SOFTSIN/SIN fields only') ! - if(l_velocity_IPA.and.l_pump_and_probe) then - call warning('Fast parallelization in vel-gauge not compatible with p&p, turned off') - l_velocity_IPA=.false. - endif - ! ! For short pulses field (PULSE, QSSIN, QSFIELD, SPULSE) ! calcualte the T_0 ! diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index 1b04654e34..c1c70797ca 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -204,8 +204,6 @@ subroutine NL_start_and_restart(E,k,Dip) RESTART = io_err(RT_return_db_ID("V_bands"))==0.and.io_err(RT_return_db_ID("OBSERVABLES"))==0 ! endif - if(l_pump_and_probe.and..not.RESTART) & -& call msg('s','RESTART point not found') ! n_runs_todo=n_runs-count(runs_done) if(n_runs_todo/=n_runs) call msg('s','RESTART, remaining frequencies/angles ',n_runs_todo) From 1a8845257c16cc26f5381f22b7bf5e05df12b9e6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 17 Oct 2025 23:24:00 +0200 Subject: [PATCH 1209/1367] Fixed wrong allocation in QP_mpa --- src/qp/QP_mpa.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index a0ff97271e..f436ad0a2f 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -252,7 +252,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) if (.not.allocated(MPA_E_par)) allocate(MPA_E_par(1)) if (.not.allocated(MPA_R_par)) allocate(MPA_R_par(1)) ! - call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,X%mpa_npoles,"CPU_ONLY") + call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"CPU_ONLY") ! ! setting up a MPA-specific MPI parallelism From 4fccede7f6ec90cdb53a5a84ed2190a8ec339947 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 18 Oct 2025 09:51:27 +0200 Subject: [PATCH 1210/1367] Version 5.3.0, Revision 25733, Hash f0ef37872 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Density matrix is calculated if NL_dephasing>0 Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 3 +++ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 7d539ec6f9..a041f2de3b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25699 h.2f41769b1. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25733 h.f0ef37872. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25699 h.2f41769b1' -PACKAGE_STRING='Yambo 5.3.0 r.25699 h.2f41769b1' +PACKAGE_VERSION='5.3.0 r.25733 h.f0ef37872' +PACKAGE_STRING='Yambo 5.3.0 r.25733 h.f0ef37872' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25699 h.2f41769b1 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25733 h.f0ef37872 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25699 h.2f41769b1:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25733 h.f0ef37872:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25699 h.2f41769b1 +Yambo configure 5.3.0 r.25733 h.f0ef37872 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25699 h.2f41769b1, which was +It was created by Yambo $as_me 5.3.0 r.25733 h.f0ef37872, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25699" -SHASH="2f41769b1" +SREVISION="25733" +SHASH="f0ef37872" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25699 h.2f41769b1, which was +This file was extended by Yambo $as_me 5.3.0 r.25733 h.f0ef37872, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25699 h.2f41769b1 +Yambo config.status 5.3.0 r.25733 h.f0ef37872 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index e10f5f9b51..bd07891859 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25699 h.2f41769b1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25733 h.f0ef37872, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25699" -SHASH="2f41769b1" +SREVISION="25733" +SHASH="f0ef37872" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1ceace8204..1d77e02df4 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -446,6 +446,9 @@ subroutine NL_initialize(E,k) ! if (l_pump_and_probe) eval_dG=.true. ! + ! I use density matrix for the dephasing + if(NL_damping>0._SP.or.Phase_LifeTime>0._SP) eval_dG=.true. + ! if(eval_COLLISIONS) then COLLISIONS_load_SP =.not.l_no_compress_COLL COLLISIONS_compr =.not.l_no_compress_COLL From 2897391feca324813738f49da4da9e06f1c0ba46 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 18 Oct 2025 09:54:05 +0200 Subject: [PATCH 1211/1367] Version 5.3.0, Revision 25734, Hash 4fccede7f MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Commit in the wrong branch Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 3 --- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/configure b/configure index a041f2de3b..190e83a5f5 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25733 h.f0ef37872. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25734 h.4fccede7f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25733 h.f0ef37872' -PACKAGE_STRING='Yambo 5.3.0 r.25733 h.f0ef37872' +PACKAGE_VERSION='5.3.0 r.25734 h.4fccede7f' +PACKAGE_STRING='Yambo 5.3.0 r.25734 h.4fccede7f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25733 h.f0ef37872 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25734 h.4fccede7f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25733 h.f0ef37872:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25734 h.4fccede7f:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25733 h.f0ef37872 +Yambo configure 5.3.0 r.25734 h.4fccede7f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25733 h.f0ef37872, which was +It was created by Yambo $as_me 5.3.0 r.25734 h.4fccede7f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25733" -SHASH="f0ef37872" +SREVISION="25734" +SHASH="4fccede7f" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25733 h.f0ef37872, which was +This file was extended by Yambo $as_me 5.3.0 r.25734 h.4fccede7f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25733 h.f0ef37872 +Yambo config.status 5.3.0 r.25734 h.4fccede7f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index bd07891859..58cda02625 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25733 h.f0ef37872, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25734 h.4fccede7f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25733" -SHASH="f0ef37872" +SREVISION="25734" +SHASH="4fccede7f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1d77e02df4..1ceace8204 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -446,9 +446,6 @@ subroutine NL_initialize(E,k) ! if (l_pump_and_probe) eval_dG=.true. ! - ! I use density matrix for the dephasing - if(NL_damping>0._SP.or.Phase_LifeTime>0._SP) eval_dG=.true. - ! if(eval_COLLISIONS) then COLLISIONS_load_SP =.not.l_no_compress_COLL COLLISIONS_compr =.not.l_no_compress_COLL From c3cb429cf2ceb60fd1c82d28be11f9f0f84123ab Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 19 Oct 2025 11:20:30 +0200 Subject: [PATCH 1212/1367] Switched off local parallelism in QP_mpa --- src/qp/QP_mpa.F | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index f436ad0a2f..ece04ab747 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -259,11 +259,13 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) ! for the fitting of poles and residues, aimed at distributing ! G vectors. This parallelism is incompatible at present with the ! global G_parallelism of the self-energy - ! - call PP_indexes_reset(px) - l_para_G_MPA=.not.(PAR_COM_RL_INDEX%n_cpu>1) + ! + ! 2025/10/19 DS: This is buggy. Switchin it off + !l_para_G_MPA=.not.(PAR_COM_RL_INDEX%n_cpu>1) + l_para_G_MPA=.false. ! if (l_para_G_MPA) then + call PP_indexes_reset(px) call PARALLEL_index(px,uplim=X_cols(2:2),low_range=X_cols(1:1),& & COMM=PAR_COM_X_WORLD,CONSECUTIVE=.true.) ig_first=px%first_of_1D(PAR_COM_X_WORLD%cpu_id+1) @@ -295,7 +297,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) endif ! if(io_MULTIPOLE) then - call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),ID=ID2,COMM=local_yMPI_COMM,DO_IT=condition) + call io_control(ACTION=OP_WR_CL,COM=REP,SEC=(/1/),ID=ID2,COMM=LOCAL_yMPI_COMM,DO_IT=condition) io_err=io_MPA(X,Xw,ID2) call IO_and_Messaging_switch("SAVE") call IO_and_Messaging_switch("+io_out",CONDITION=condition) @@ -441,7 +443,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) MP_Qerr=MP_Qerr/X%ng**2 cond_numQ(:)=cond_numQ(:)/X%ng**2 ! - call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iqibz,2*iqibz+1/),ID=ID2,COMM=local_yMPI_COMM,DO_IT=condition) + call io_control(ACTION=OP_APP_CL,COM=REP,SEC=(/2*iqibz,2*iqibz+1/),ID=ID2,COMM=LOCAL_yMPI_COMM,DO_IT=condition) io_err=io_MPA(X,Xw,ID2) call msg('r',' :: PP cond fix/tot ',PPcond_Qrate) call msg('r',' :: Mean np reduction ',MPred_rate) From 0f7010ac8b2d8eedcaf7144885a9c162f07a7f83 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 20 Oct 2025 12:04:57 +0200 Subject: [PATCH 1213/1367] Few more fixes to MPA (following discussion with AndreaF) --- src/io/io_MPA.F | 61 ++++++++++++++++--------------------------------- src/qp/QP_mpa.F | 2 +- 2 files changed, 21 insertions(+), 42 deletions(-) diff --git a/src/io/io_MPA.F b/src/io/io_MPA.F index 97ab247b3e..d76d4fde2b 100644 --- a/src/io/io_MPA.F +++ b/src/io/io_MPA.F @@ -11,7 +11,7 @@ ! integer function io_MPA(X,Xw,ID) ! - use pars, ONLY:SP,schlen + use pars, ONLY:SP,IP_YIO,schlen use X_m, ONLY:X_t,X_mat,X_RLcomp_ig,MPA_desc use frequency, ONLY:w_samp use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_header,io_fragment,& @@ -32,7 +32,7 @@ integer function io_MPA(X,Xw,ID) ! !Work Space ! - integer :: sec_size,i1,iq,io_com_save,io_err,ID_frag + integer :: i1,iq,io_com_save,io_err,ID_frag logical :: different_db_RL_order character(schlen) :: ch complex(SP),allocatable :: X_on_disk(:,:) @@ -97,20 +97,18 @@ integer function io_MPA(X,Xw,ID) ! type(X_t) ::X(5) x s d p m ! if (any((/io_sec(ID,:)==2*iq/)) ) then - ! - sec_size=6 - ! - ch="FREQ_PARS_sec_iq"//trim(intc(iq)) ! ! Important: once the file has been opend in PAR mode all the CPUs belonging to the COMM ! must go through the definitions of the variables although only one is writing ! io_com_save=io_com(ID_frag) if (iq>2) io_com(ID_frag)=NONE - call def_variable_elemental(ID_frag,trim(ch),sec_size,SP,1,par_io_kind='independent') ! + call def_variable_elemental(ID_frag,"Qpt_index",1,IP_YIO,1,par_io_kind='independent') call io_variable_elemental(ID_frag, VAR=" :: Current Q-pt index :",I0=iq) - call io_variable_elemental(ID_frag, VAR=" :: Number of poles :",I0=Xw%n_freqs/2,CHECK=.true.,OP=(/"=="/)) + ! + call def_variable_elemental(ID_frag,"N_freqs",1,IP_YIO,1,par_io_kind='independent') + call io_variable_elemental(ID_frag, VAR=" :: Number of frequencies :",I0=Xw%n_freqs,CHECK=.true.,OP=(/"=="/)) ! call def_variable_elemental(ID_frag,"",0,0,1) io_MPA=io_status(ID_frag) @@ -134,35 +132,15 @@ integer function io_MPA(X,Xw,ID) ! ch="MPA_E_Q_"//trim(intc(iq)) ! - if(write_is_on(ID)) then -#if defined _PAR_IO - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') -#else - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='independent') -#endif - call io_variable_bulk(ID_frag,1,C3=MPA_E_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,MPA_E_par(1)%rows(1),MPA_E_par(1)%cols(1),1/)) - ! - else if(read_is_on(ID)) then - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) - call io_variable_bulk(ID_frag,1,C3=MPA_E_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,MPA_E_par(1)%rows(1),MPA_E_par(1)%cols(1),1/)) - endif + call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,X%mpa_npoles/),SP,par_io_kind='collective') + call io_variable_bulk(ID_frag,1,C3=MPA_E_par(1)%blc(:,:,:X%mpa_npoles),IPOS=(/1,MPA_E_par(1)%rows(1),MPA_E_par(1)%cols(1),1/)) ! ! residues @iq ! ch="MPA_R_Q_"//trim(intc(iq)) ! - if(write_is_on(ID)) then -#if defined _PAR_IO - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='collective') -#else - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP,par_io_kind='independent') -#endif - call io_variable_bulk(ID_frag,1,C3=MPA_R_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,MPA_R_par(1)%rows(1),MPA_R_par(1)%cols(1),1/)) - ! - else if(read_is_on(ID)) then - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) - call io_variable_bulk(ID_frag,1,C3=MPA_R_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,MPA_R_par(1)%rows(1),MPA_R_par(1)%cols(1),1/)) - endif + call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,X%mpa_npoles/),SP,par_io_kind='collective') + call io_variable_bulk(ID_frag,1,C3=MPA_R_par(1)%blc(:,:,:X%mpa_npoles),IPOS=(/1,MPA_R_par(1)%rows(1),MPA_R_par(1)%cols(1),1/)) ! if (read_is_on(ID) .and. different_db_RL_order) then call error('[io_MPA] different_db_RL_order not implemented') @@ -194,12 +172,13 @@ integer function io_MPA(X,Xw,ID) ! integer function variables_MPA(ID,local_desc,X) ! - use pars, ONLY:schlen + use pars, ONLY:schlen,IP_YIO use descriptors, ONLY:IO_desc,IO_desc_reset use X_m, ONLY:X_t - use IO_int, ONLY:io_elemental + use IO_int, ONLY:def_variable_elemental,io_variable_elemental use IO_m, ONLY:io_status - implicit none + ! + implicit none ! integer ::ID type(IO_desc) ::local_desc @@ -210,13 +189,13 @@ integer function variables_MPA(ID,local_desc,X) character(schlen) ::MPA_label ! call IO_desc_reset(local_desc) - MPA_label='MPA_' ! - call io_elemental(ID,VAR=trim(MPA_label)//"PARS_1",VAR_SZ=2,MENU=0) - call io_elemental(ID,DB_I0=X%ng_db,& -& VAR="X matrix size :",I0=X%ng,CHECK=.true.,OP=(/"<="/),DESCRIPTOR=local_desc) - call io_elemental(ID,& -& VAR="MPA npoles :",I0=X%mpa_npoles,MENU=0,DESCRIPTOR=local_desc) + call def_variable_elemental(ID,"X_ng",1,IP_YIO,1) + call io_variable_elemental(ID,DB_I0=X%ng_db,VAR="X matrix size :",I0=X%ng,& + & CHECK=.true.,OP=(/"<="/),DESCRIPTOR=local_desc) + ! + call def_variable_elemental(ID,"MPA_npoles",1,IP_YIO,1) + call io_variable_elemental(ID,VAR="MPA number of npoles :",I0=X%mpa_npoles,DESCRIPTOR=local_desc) ! variables_MPA=io_status(ID) ! diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index ece04ab747..a09f59f85d 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -252,7 +252,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) if (.not.allocated(MPA_E_par)) allocate(MPA_E_par(1)) if (.not.allocated(MPA_R_par)) allocate(MPA_R_par(1)) ! - call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,2*X%mpa_npoles,"CPU_ONLY") + call MPA_ALLOC_parallel(MPA_E_par(1),MPA_R_par(1),X%ng,X%mpa_npoles,"CPU_ONLY") ! ! setting up a MPA-specific MPI parallelism From ed8d6ca2f4db2400383e3231d3ad9d634a991a64 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 13:16:07 +0200 Subject: [PATCH 1214/1367] Version 5.3.0, Revision 25736, Hash 8976ab828 MODIFIED * configure include/version/version.m4 nloptics/NL_Hamiltonian.F nloptics/NL_build_dG_lesser.F Bugs: -Fixed spin-polarization for the density matrix Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_Hamiltonian.F | 6 +++--- src/nloptics/NL_build_dG_lesser.F | 12 +++++++----- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/configure b/configure index 190e83a5f5..1f128b9334 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25734 h.4fccede7f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25736 h.8976ab828. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25734 h.4fccede7f' -PACKAGE_STRING='Yambo 5.3.0 r.25734 h.4fccede7f' +PACKAGE_VERSION='5.3.0 r.25736 h.8976ab828' +PACKAGE_STRING='Yambo 5.3.0 r.25736 h.8976ab828' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25734 h.4fccede7f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25736 h.8976ab828 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25734 h.4fccede7f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25736 h.8976ab828:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25734 h.4fccede7f +Yambo configure 5.3.0 r.25736 h.8976ab828 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25734 h.4fccede7f, which was +It was created by Yambo $as_me 5.3.0 r.25736 h.8976ab828, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25734" -SHASH="4fccede7f" +SREVISION="25736" +SHASH="8976ab828" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25734 h.4fccede7f, which was +This file was extended by Yambo $as_me 5.3.0 r.25736 h.8976ab828, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25734 h.4fccede7f +Yambo config.status 5.3.0 r.25736 h.8976ab828 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 58cda02625..500db9165f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25734 h.4fccede7f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25736 h.8976ab828, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25734" -SHASH="4fccede7f" +SREVISION="25736" +SHASH="8976ab828" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 37a520c16d..7d861ed27c 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -89,7 +89,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Evaluate the G_lesser for current/polarization and collisions ! ====================================================== - if(eval_dG) call NL_build_dG_lesser(E,V_bands,dG_lesser(:,:,:,:,1)) + if(eval_dG) call NL_build_dG_lesser(E,V_bands,dG_lesser) ! ! Evaluate the Polarization ! =================================================================== @@ -167,7 +167,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Calculate collisions if doing TD-SEX or TD-HF ! ============================================= - if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG_lesser(:,:,:,:,1)) + if(l_use_Hxc_collisions) call COLLISIONS_compose_nl(dG_lesser) ! ! Build the Hamiltonian ! ===================== @@ -223,7 +223,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! endif ! -! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG_lesser(:,:,:,:,1),H_nl_sc,k,q,E,ik,i_sp_pol) +! if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_nl(dG_lesser,H_nl_sc,k,q,E,ik,i_sp_pol) if(Correlation==LSEX.or.Correlation==LHF) call OSCLL_compose_vbands(V_bands,H_nl_sc,k,q,E,ik,i_sp_pol) ! if(l_use_Hxc_collisions) then diff --git a/src/nloptics/NL_build_dG_lesser.F b/src/nloptics/NL_build_dG_lesser.F index 02d5426fb8..fcd0d58883 100644 --- a/src/nloptics/NL_build_dG_lesser.F +++ b/src/nloptics/NL_build_dG_lesser.F @@ -34,11 +34,11 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) ! type(levels), intent(in) :: en complex(SP), intent(in) :: V_bands(NL_bands(2),maxval(en%nbf),QP_nk,n_sp_pol) - complex(SP), intent(out) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk) + complex(SP), intent(out) :: dG(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) ! ! Work Space ! - integer :: i1,i2 + integer :: i1,i2,is integer :: ik ! if (n_sp_pol==2) call error(" NL_build_dG not coded for n_sp_pol==2") @@ -49,17 +49,19 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) ! dG=cZERO ! + do is=1,n_sp_pol do ik=1,QP_nk if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle do i1=NL_bands(1),NL_bands(2) !$omp parallel do default(shared), private(i2) do i2=i1,NL_bands(2) - dG(i1,i2,ik)=Vstar_dot_V_omp(en%nbf(1),V_bands(i2,:,ik,1),V_bands(i1,:,ik,1)) - dG(i2,i1,ik)=conjg(dG(i1,i2,ik)) + dG(i1,i2,ik,is)=Vstar_dot_V_omp(en%nbf(1),V_bands(i2,:,ik,is),V_bands(i1,:,ik,is)) + dG(i2,i1,ik,is)=conjg(dG(i1,i2,ik,is)) enddo !$omp end parallel do enddo enddo + enddo ! dG=cI*spin_occ*dG ! @@ -67,7 +69,7 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) ! !$omp parallel do default(shared), private(i1) do i1=NL_bands(1),en%nbf(1) - dG(i1,i1,:)=dG(i1,i1,:)-cI*spin_occ + dG(i1,i1,:,:)=dG(i1,i1,:,:)-cI*spin_occ enddo !$omp end parallel do ! From 6c3ef978ce065fc582a2cb3eaef12fcc34ada27c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 13:26:39 +0200 Subject: [PATCH 1215/1367] Version 5.3.0, Revision 25737, Hash ed8d6ca2f MODIFIED * configure include/version/version.m4 nloptics/NL_Hamiltonian.F nloptics/NL_damping.F Bugs: - Additions: - Changes: -Changed sub NL_damping.F Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/NL_damping.F | 29 +++++++++++++++++------------ 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 1f128b9334..1ddde4b564 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25736 h.8976ab828. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25737 h.ed8d6ca2f. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25736 h.8976ab828' -PACKAGE_STRING='Yambo 5.3.0 r.25736 h.8976ab828' +PACKAGE_VERSION='5.3.0 r.25737 h.ed8d6ca2f' +PACKAGE_STRING='Yambo 5.3.0 r.25737 h.ed8d6ca2f' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25736 h.8976ab828 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25737 h.ed8d6ca2f to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25736 h.8976ab828:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25737 h.ed8d6ca2f:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25736 h.8976ab828 +Yambo configure 5.3.0 r.25737 h.ed8d6ca2f generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25736 h.8976ab828, which was +It was created by Yambo $as_me 5.3.0 r.25737 h.ed8d6ca2f, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25736" -SHASH="8976ab828" +SREVISION="25737" +SHASH="ed8d6ca2f" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25736 h.8976ab828, which was +This file was extended by Yambo $as_me 5.3.0 r.25737 h.ed8d6ca2f, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25736 h.8976ab828 +Yambo config.status 5.3.0 r.25737 h.ed8d6ca2f configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 500db9165f..ace18f528e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25736 h.8976ab828, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25737 h.ed8d6ca2f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25736" -SHASH="8976ab828" +SREVISION="25737" +SHASH="ed8d6ca2f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 7d861ed27c..a8055dee06 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -233,7 +233,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Damping: NL_damping fills the I_relax matrix ! ================================================ - call NL_damping(E,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),ik,i_sp_pol)) + call NL_damping(E,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),ik,i_sp_pol),I_relax) ! ! Store the Hamiltonian ! ===================== diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index 0a00b066db..534229f8a3 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -15,23 +15,25 @@ !! @param[out] I_relax relaxation matrix (distributed on k-points) ! ! -subroutine NL_damping(E,ik,i_sp_pol,V_bands) +subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) ! ! Output: I_relax ! use pars, ONLY:SP,cI use zeros, ONLY:zero_dfl - use electrons, ONLY:levels + use parallel_m, ONLY:PAR_Xk_nibz + use electrons, ONLY:levels,n_sp_pol use real_time, ONLY:Phase_LifeTime,RAD_LifeTime - use nl_optics, ONLY:I_relax,NL_bands + use nl_optics, ONLY:NL_bands use parallel_m, ONLY:PAR_Xk_ibz_index use real_time, ONLY:RT_deph_deg_thresh ! implicit none ! - type(levels), intent(in) :: E - integer, intent(in) :: ik,i_sp_pol - complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf(i_sp_pol)) + type(levels), intent(in) :: E + integer, intent(in) :: ik,i_sp_pol + complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf(i_sp_pol)) + complex(SP), intent(out) :: I_relax(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),maxval(E%nbf),PAR_Xk_nibz,n_sp_pol) ! ! Working Space ! @@ -68,9 +70,10 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands) if(Phase_LifeTime>zero_dfl) Gamma_ij=Gamma_ij+2._SP/Phase_LifeTime ! do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i2,ib,ik_mem,i_sp_pol) = -cI*Gamma_ij*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) - I_relax(i2,i1,ib,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ib,ik_mem,i_sp_pol)) + I_relax(i1,i2,:,ik_mem,i_sp_pol) = I_relax(i1,i2,:,ik_mem,i_sp_pol) & +& -cI*Gamma_ij*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) enddo + I_relax(i2,i1,:,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,:,ik_mem,i_sp_pol)) ! enddo enddo @@ -82,7 +85,8 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands) do i1=NL_bands(1),NL_bands(2) ! do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i1,ib,ik_mem,i_sp_pol)=-cI*2._SP/RAD_LifeTime*(conjg(V_bands(i1,ib))*V_bands(i1,ib)) + I_relax(i1,i1,:,ik_mem,i_sp_pol)=I_relax(i1,i1,:,ik_mem,i_sp_pol) & +& -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i1,ib))*V_bands(i1,ib)) enddo ! ! I need this additional part for the degenerate states @@ -90,9 +94,10 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands) do i2=i1+1,NL_bands(2) if ( abs(E%E(i1,ik,1)-E%E(i2,ik,1))>=RT_deph_deg_thresh ) cycle do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i2,ib,ik_mem,i_sp_pol) = -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) - I_relax(i2,i1,ib,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ib,ik_mem,i_sp_pol)) + I_relax(i1,i2,:,ik_mem,i_sp_pol) = I_relax(i1,i2,:,ik_mem,i_sp_pol) & +& -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) enddo + I_relax(i2,i1,:,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,:,ik_mem,i_sp_pol)) enddo ! enddo @@ -102,7 +107,7 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands) ! !$omp parallel do default(shared), private(ib) do ib=NL_bands(1),E%nbf(i_sp_pol) - I_relax(ib,ib,ib,ik_mem,i_sp_pol)=I_relax(ib,ib,ib,ik_mem,i_sp_pol)+cI*2._SP/RAD_LifeTime + I_relax(ib,ib,:,ik_mem,i_sp_pol)=I_relax(ib,ib,:,ik_mem,i_sp_pol)+cI*2._SP/RAD_LifeTime enddo !$omp end parallel do ! From d3c2053e1a532d7343c1262e762e12721e91edaf Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 13:38:12 +0200 Subject: [PATCH 1216/1367] Version 5.3.0, Revision 25738, Hash 6c3ef978c MODIFIED * configure include/version/version.m4 modules/mod_nl_optics.F nloptics/EXP_step.F nloptics/INVINT_step.F nloptics/NL_Integrator.F nloptics/NL_damping.F nloptics/RK_basestep.F Bugs: - Additions: - Changes: -Reduced dimension of I_relax Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++--------- include/version/version.m4 | 6 ++--- src/modules/mod_nl_optics.F | 4 ++-- src/nloptics/EXP_step.F | 4 ++-- src/nloptics/INVINT_step.F | 6 ++--- src/nloptics/NL_Integrator.F | 44 ++++++++++++++++++------------------ src/nloptics/NL_damping.F | 14 ++++++------ src/nloptics/RK_basestep.F | 4 ++-- 8 files changed, 52 insertions(+), 52 deletions(-) diff --git a/configure b/configure index 1ddde4b564..05c968398b 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25737 h.ed8d6ca2f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25738 h.6c3ef978c. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25737 h.ed8d6ca2f' -PACKAGE_STRING='Yambo 5.3.0 r.25737 h.ed8d6ca2f' +PACKAGE_VERSION='5.3.0 r.25738 h.6c3ef978c' +PACKAGE_STRING='Yambo 5.3.0 r.25738 h.6c3ef978c' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25737 h.ed8d6ca2f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25738 h.6c3ef978c to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25737 h.ed8d6ca2f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25738 h.6c3ef978c:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25737 h.ed8d6ca2f +Yambo configure 5.3.0 r.25738 h.6c3ef978c generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25737 h.ed8d6ca2f, which was +It was created by Yambo $as_me 5.3.0 r.25738 h.6c3ef978c, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25737" -SHASH="ed8d6ca2f" +SREVISION="25738" +SHASH="6c3ef978c" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25737 h.ed8d6ca2f, which was +This file was extended by Yambo $as_me 5.3.0 r.25738 h.6c3ef978c, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25737 h.ed8d6ca2f +Yambo config.status 5.3.0 r.25738 h.6c3ef978c configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index ace18f528e..7cb8b578f1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25737 h.ed8d6ca2f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25738 h.6c3ef978c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25737" -SHASH="ed8d6ca2f" +SREVISION="25738" +SHASH="6c3ef978c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_nl_optics.F b/src/modules/mod_nl_optics.F index d752252b8c..446b6a3d49 100644 --- a/src/modules/mod_nl_optics.F +++ b/src/modules/mod_nl_optics.F @@ -45,7 +45,7 @@ module nl_optics ! ! Initial Energies and Damping !------------ - complex(SP), allocatable :: I_relax(:,:,:,:,:) + complex(SP), allocatable :: I_relax(:,:,:,:) real(SP), allocatable :: E_full(:,:,:) ! ! For TDDFT, V_xc_0 stores the V_xc at equilibrium @@ -238,7 +238,7 @@ subroutine NL_alloc_k_distributed(en) if(fft_size>0) then YAMBO_ALLOC(VAL_BANDS,(fft_size,maxval(en%nbf),PAR_Xk_nibz,n_sp_pol)) endif - YAMBO_ALLOC(I_relax,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),maxval(en%nbf),PAR_Xk_nibz,n_sp_pol)) + YAMBO_ALLOC(I_relax,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),PAR_Xk_nibz,n_sp_pol)) YAMBO_ALLOC(Ho_plus_Sigma,(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),PAR_Xk_nibz,n_sp_pol)) ! if(Correlation==LSEX.or.Correlation==LHF) then diff --git a/src/nloptics/EXP_step.F b/src/nloptics/EXP_step.F index 2bda482b36..9cb1d90527 100644 --- a/src/nloptics/EXP_step.F +++ b/src/nloptics/EXP_step.F @@ -13,7 +13,7 @@ subroutine EXP_step(K_out,V_in,H_in,I_in,nbf,dT) complex(SP), intent(in) :: V_in(NL_bands(2),nbf) complex(SP), intent(out) :: K_out(NL_bands(2),nbf) complex(SP), intent(in) :: H_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) - complex(SP), intent(in) :: I_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nbf) + complex(SP), intent(in) :: I_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) real(SP), intent(in) :: dT ! ! Work Space @@ -27,7 +27,7 @@ subroutine EXP_step(K_out,V_in,H_in,I_in,nbf,dT) !$omp parallel do default(shared), private(ib,U,H) do ib=1,nbf ! - H=H_in+I_in(:,:,ib) + H=H_in+I_in ! call EXP_op(U,H,dT) ! diff --git a/src/nloptics/INVINT_step.F b/src/nloptics/INVINT_step.F index e9a0898438..83dadbe978 100644 --- a/src/nloptics/INVINT_step.F +++ b/src/nloptics/INVINT_step.F @@ -18,7 +18,7 @@ subroutine INVINT_step(V_out,V_in,H_in,I_in,nbf,dT) complex(SP), intent(in) :: V_in(NL_bands(2),nbf) complex(SP), intent(out) :: V_out(NL_bands(2),nbf) complex(SP), intent(in) :: H_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) - complex(SP), intent(in) :: I_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nbf) + complex(SP), intent(in) :: I_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) real(SP), intent(in) :: dT ! ! Workspace @@ -41,8 +41,8 @@ subroutine INVINT_step(V_out,V_in,H_in,I_in,nbf,dT) forall(i1=NL_bands(1):NL_bands(2)) Hp(i1,i1)=cONE Hm=Hp ! - Hm=Hm-cI*dT/2._SP*(H_in+I_in(:,:,ib)) - Hp=Hp+cI*dT/2._SP*(H_in+I_in(:,:,ib)) + Hm=Hm-cI*dT/2._SP*(H_in+I_in) + Hp=Hp+cI*dT/2._SP*(H_in+I_in) ! if (l_use_inv) then ! diff --git a/src/nloptics/NL_Integrator.F b/src/nloptics/NL_Integrator.F index 23a69c4cc0..cb8c6643d4 100644 --- a/src/nloptics/NL_Integrator.F +++ b/src/nloptics/NL_Integrator.F @@ -86,7 +86,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) do is=1,n_sp_pol nb=E%nbf(is) Ktmp=cZERO - call EXP_step(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb,RT_step) + call EXP_step(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb,RT_step) V_bands(:,:nb,ik,is) = V_bands(:,:nb,ik,is) + Ktmp(:,:nb) enddo enddo @@ -104,7 +104,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) nb=E%nbf(is) Ktmp=cZERO Ktmp(:,:nb)=V_bands(:,:nb,ik,is) - call INVINT_step(V_bands(:,:nb,ik,is),Ktmp(:,:nb),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb,RT_step) + call INVINT_step(V_bands(:,:nb,ik,is),Ktmp(:,:nb),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb,RT_step) enddo enddo if(.not.l_velocity_IPA) call PP_redux_wait(V_bands,COMM=PAR_COM_Xk_ibz_INDEX%COMM) @@ -119,7 +119,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol call INVINT_step(K_all(:,:E%nbf(is),ik,is),V_bands(:,:E%nbf(is),ik,is),Ho_plus_Sigma(:,:,ik_mem,is), & -& I_relax(:,:,:E%nbf(is),ik_mem,is),E%nbf(is),RT_step/2._SP) +& I_relax(:,:,ik_mem,is),E%nbf(is),RT_step/2._SP) enddo enddo if(.not.l_velocity_IPA) call PP_redux_wait(K_all,COMM=PAR_COM_Xk_ibz_INDEX%COMM) @@ -146,7 +146,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol call INVINT_step(V_bands(:,:E%nbf(is),ik,is),K_all(:,:E%nbf(is),ik,is),Ho_plus_Sigma(:,:,ik_mem,is), & -& I_relax(:,:,:E%nbf(is),ik_mem,is),E%nbf(is),RT_step) +& I_relax(:,:,ik_mem,is),E%nbf(is),RT_step) enddo enddo if(.not.l_velocity_IPA) call PP_redux_wait(V_bands,COMM=PAR_COM_Xk_ibz_INDEX%COMM) @@ -161,7 +161,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call EXP_step(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb,RT_step/2._SP) + call EXP_step(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb,RT_step/2._SP) K_all(:,:E%nbf(is),ik,is) = V_bands(:,:E%nbf(is),ik,is) + Ktmp(:,:E%nbf(is)) enddo enddo @@ -187,7 +187,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:nb),K_all(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),E%nbf(is)) + call RK_basestep(Ktmp(:,:nb),K_all(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),E%nbf(is)) V_bands(:,:nb,ik,is) = V_bands(:,:nb,ik,is) + RK2_bpar*RT_step*Ktmp(:,:nb) enddo enddo @@ -203,7 +203,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) K_all(:,:nb,ik,is) = V_bands(:,:nb,ik,is) + RK2_apar*RT_step*Ktmp(:,:nb) enddo enddo @@ -229,7 +229,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:nb),K_all(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:nb),K_all(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) V_bands(:,:nb,ik,is) = V_bands(:,:nb,ik,is) + RK2_bpar*RT_step*Ktmp(:,:nb) enddo enddo @@ -250,7 +250,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:nb),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) V_tmp(:,:nb,ik,is) = V_bands(:,:nb,ik,is) + Heun_apar(1)*RT_step*Ktmp(:,:nb) K_all(:,:nb,ik,is) = Heun_bpar(1)*Ktmp(:,:nb) enddo @@ -277,7 +277,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:nb),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:nb),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) V_tmp(:,:nb,ik,is) = V_bands(:,:nb,ik,is) + Heun_apar(2)*RT_step*Ktmp(:,:nb) enddo enddo @@ -298,7 +298,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:nb),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:nb),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) K_all(:,:E%nbf(is),ik,is) = K_all(:,:E%nbf(is),ik,is) + Heun_bpar(2)*Ktmp(:,:nb) V_bands(:,:E%nbf(is),ik,is) = V_bands(:,:E%nbf(is),ik,is) + RT_step*K_all(:,:E%nbf(is),ik,is) enddo @@ -323,9 +323,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol do ib=1,E%nbf(is) - call EXP_op(U_tmp(:,:),Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:E%nbf(is),ib,ik_mem,is),RT_step*RK4_apar(1)) + call EXP_op(U_tmp(:,:),Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is),RT_step*RK4_apar(1)) V_tmp(NL_bands(1):,ib,ik,is)=matmul(U_tmp,V_bands(NL_bands(1):,ib,ik,is)) - U_tot(:,:,ib,ik,is) =RK4_bpar(1)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ib,ik_mem,is)) + U_tot(:,:,ib,ik,is) =RK4_bpar(1)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is)) enddo enddo enddo @@ -350,9 +350,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol do ib=1,E%nbf(is) - call EXP_op(U_tmp(:,:),Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ib,ik_mem,is),RT_step*RK4_apar(2)) + call EXP_op(U_tmp(:,:),Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is),RT_step*RK4_apar(2)) V_tmp(NL_bands(1):,ib,ik,is)=matmul(U_tmp,V_bands(NL_bands(1):,ib,ik,is)) - U_tot(:,:,ib,ik,is) = U_tot(:,:,ib,ik,is) + RK4_bpar(2)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ib,ik_mem,is)) + U_tot(:,:,ib,ik,is) = U_tot(:,:,ib,ik,is) + RK4_bpar(2)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is)) enddo enddo enddo @@ -377,9 +377,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol do ib=1,E%nbf(is) - call EXP_op(U_tmp(:,:),Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ib,ik_mem,is),RT_step*RK4_apar(3)) + call EXP_op(U_tmp(:,:),Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is),RT_step*RK4_apar(3)) V_tmp(NL_bands(1):,ib,ik,is)=matmul(U_tmp,V_bands(NL_bands(1):,ib,ik,is)) - U_tot(:,:,ib,ik,is) = U_tot(:,:,ib,ik,is) + RK4_bpar(3)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ib,ik_mem,is)) + U_tot(:,:,ib,ik,is) = U_tot(:,:,ib,ik,is) + RK4_bpar(3)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is)) enddo enddo enddo @@ -408,7 +408,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol do ib=1,E%nbf(is) - U_tot(:,:,ib,ik,is) = U_tot(:,:,ib,ik,is) + RK4_bpar(4)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ib,ik_mem,is)) + U_tot(:,:,ib,ik,is) = U_tot(:,:,ib,ik,is) + RK4_bpar(4)*(Ho_plus_Sigma(:,:,ik_mem,is)+I_relax(:,:,ik_mem,is)) call EXP_op(U_tmp(:,:),U_tot(:,:,ib,ik,is),RT_step) V_bands(NL_bands(1):,ib,ik,is)=matmul(U_tmp,V_tmp(NL_bands(1):,ib,ik,is)) enddo @@ -431,7 +431,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:E%nbf(is)),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:E%nbf(is)),V_bands(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) V_tmp(:,:E%nbf(is),ik,is) = V_bands(:,:E%nbf(is),ik,is) + RK4_apar(1)*RT_step*Ktmp(:,:E%nbf(is)) K_all(:,:E%nbf(is),ik,is) = RK4_bpar(1)*Ktmp(:,:E%nbf(is)) enddo @@ -458,7 +458,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:E%nbf(is)),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:E%nbf(is)),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) V_tmp(:,:E%nbf(is),ik,is) = V_bands(:,:E%nbf(is),ik,is) + RK4_apar(2)*RT_step*Ktmp(:,:E%nbf(is)) K_all(:,:E%nbf(is),ik,is) = K_all(:,:E%nbf(is),ik,is) + RK4_bpar(2)*Ktmp(:,:E%nbf(is)) enddo @@ -485,7 +485,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:E%nbf(is)),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:E%nbf(is)),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) V_tmp(:,:E%nbf(is),ik,is) = V_bands(:,:E%nbf(is),ik,is) + RK4_apar(3)*RT_step*Ktmp(:,:E%nbf(is)) K_all(:,:E%nbf(is),ik,is) = K_all(:,:E%nbf(is),ik,is) + RK4_bpar(3)*Ktmp(:,:E%nbf(is)) enddo @@ -512,7 +512,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) - call RK_basestep(Ktmp(:,:E%nbf(is)),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,:nb,ik_mem,is),nb) + call RK_basestep(Ktmp(:,:E%nbf(is)),V_tmp(:,:nb,ik,is),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb) K_all(:,:E%nbf(is),ik,is) = K_all(:,:E%nbf(is),ik,is) + RK4_bpar(4)*Ktmp(:,:E%nbf(is)) V_bands(:,:E%nbf(is),ik,is) = V_bands(:,:E%nbf(is),ik,is) + RT_step*K_all(:,:E%nbf(is),ik,is) enddo diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index 534229f8a3..664a4f31dd 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -33,7 +33,7 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) type(levels), intent(in) :: E integer, intent(in) :: ik,i_sp_pol complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf(i_sp_pol)) - complex(SP), intent(out) :: I_relax(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),maxval(E%nbf),PAR_Xk_nibz,n_sp_pol) + complex(SP), intent(out) :: I_relax(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),PAR_Xk_nibz,n_sp_pol) ! ! Working Space ! @@ -70,10 +70,10 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) if(Phase_LifeTime>zero_dfl) Gamma_ij=Gamma_ij+2._SP/Phase_LifeTime ! do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i2,:,ik_mem,i_sp_pol) = I_relax(i1,i2,:,ik_mem,i_sp_pol) & + I_relax(i1,i2,ik_mem,i_sp_pol) = I_relax(i1,i2,ik_mem,i_sp_pol) & & -cI*Gamma_ij*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) enddo - I_relax(i2,i1,:,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,:,ik_mem,i_sp_pol)) + I_relax(i2,i1,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ik_mem,i_sp_pol)) ! enddo enddo @@ -85,7 +85,7 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) do i1=NL_bands(1),NL_bands(2) ! do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i1,:,ik_mem,i_sp_pol)=I_relax(i1,i1,:,ik_mem,i_sp_pol) & + I_relax(i1,i1,ik_mem,i_sp_pol)=I_relax(i1,i1,ik_mem,i_sp_pol) & & -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i1,ib))*V_bands(i1,ib)) enddo ! @@ -94,10 +94,10 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) do i2=i1+1,NL_bands(2) if ( abs(E%E(i1,ik,1)-E%E(i2,ik,1))>=RT_deph_deg_thresh ) cycle do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i2,:,ik_mem,i_sp_pol) = I_relax(i1,i2,:,ik_mem,i_sp_pol) & + I_relax(i1,i2,ik_mem,i_sp_pol) = I_relax(i1,i2,ik_mem,i_sp_pol) & & -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) enddo - I_relax(i2,i1,:,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,:,ik_mem,i_sp_pol)) + I_relax(i2,i1,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ik_mem,i_sp_pol)) enddo ! enddo @@ -107,7 +107,7 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) ! !$omp parallel do default(shared), private(ib) do ib=NL_bands(1),E%nbf(i_sp_pol) - I_relax(ib,ib,:,ik_mem,i_sp_pol)=I_relax(ib,ib,:,ik_mem,i_sp_pol)+cI*2._SP/RAD_LifeTime + I_relax(ib,ib,ik_mem,i_sp_pol)=I_relax(ib,ib,ik_mem,i_sp_pol)+cI*2._SP/RAD_LifeTime enddo !$omp end parallel do ! diff --git a/src/nloptics/RK_basestep.F b/src/nloptics/RK_basestep.F index 33f799bb77..2e2c153c71 100644 --- a/src/nloptics/RK_basestep.F +++ b/src/nloptics/RK_basestep.F @@ -13,7 +13,7 @@ subroutine RK_basestep(K_out,V_in,H_in,I_in,nbf) complex(SP), intent(in) :: V_in(NL_bands(2),nbf) complex(SP), intent(out) :: K_out(NL_bands(2),nbf) complex(SP), intent(in) :: H_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) - complex(SP), intent(in) :: I_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),nbf) + complex(SP), intent(in) :: I_in(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2)) ! ! Workspace ! @@ -24,7 +24,7 @@ subroutine RK_basestep(K_out,V_in,H_in,I_in,nbf) ! !$omp parallel do default(shared), private(ib,H) do ib=1,nbf - H = H_in + I_in(:,:,ib) + H = H_in + I_in K_out(NL_bands(1):,ib)=-cI*matmul(H,V_in(NL_bands(1):,ib)) enddo !$omp end parallel do From 51bd7de73dbb5e243a98ace057c76c5c8e503b59 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 13:49:58 +0200 Subject: [PATCH 1217/1367] Version 5.3.0, Revision 25739, Hash d3c2053e1 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: -Fixed bug in RK4EXP when PhaseLifeTime>0.0 Additions: - Changes: -Density matrix is always calculated when PhaseLifeTime>0._SP Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 3 +++ 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 05c968398b..79b0bc9b9f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25738 h.6c3ef978c. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25739 h.d3c2053e1. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25738 h.6c3ef978c' -PACKAGE_STRING='Yambo 5.3.0 r.25738 h.6c3ef978c' +PACKAGE_VERSION='5.3.0 r.25739 h.d3c2053e1' +PACKAGE_STRING='Yambo 5.3.0 r.25739 h.d3c2053e1' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25738 h.6c3ef978c to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25739 h.d3c2053e1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25738 h.6c3ef978c:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25739 h.d3c2053e1:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25738 h.6c3ef978c +Yambo configure 5.3.0 r.25739 h.d3c2053e1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25738 h.6c3ef978c, which was +It was created by Yambo $as_me 5.3.0 r.25739 h.d3c2053e1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25738" -SHASH="6c3ef978c" +SREVISION="25739" +SHASH="d3c2053e1" @@ -18447,7 +18447,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25738 h.6c3ef978c, which was +This file was extended by Yambo $as_me 5.3.0 r.25739 h.d3c2053e1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18511,7 +18511,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25738 h.6c3ef978c +Yambo config.status 5.3.0 r.25739 h.d3c2053e1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 7cb8b578f1..54bf1e1170 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25738 h.6c3ef978c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25739 h.d3c2053e1, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25738" -SHASH="6c3ef978c" +SREVISION="25739" +SHASH="d3c2053e1" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 1ceace8204..72e9238011 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -446,6 +446,9 @@ subroutine NL_initialize(E,k) ! if (l_pump_and_probe) eval_dG=.true. ! + ! The new dephasing is based on density matrix + if (Phase_LifeTime>0._SP) eval_dG=.true. + ! if(eval_COLLISIONS) then COLLISIONS_load_SP =.not.l_no_compress_COLL COLLISIONS_compr =.not.l_no_compress_COLL From 590613c147eb87b92bebab69c335b641056d35f4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 Oct 2025 14:21:50 +0200 Subject: [PATCH 1218/1367] Deleted empty file BASED_on_tech_master --- BASED_on_tech_master | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 BASED_on_tech_master diff --git a/BASED_on_tech_master b/BASED_on_tech_master deleted file mode 100644 index e69de29bb2..0000000000 From d49cd62fffa903f3afefbed33e5047aca204db1b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 21 Oct 2025 14:23:15 +0200 Subject: [PATCH 1219/1367] Comment fixed --- src/pol_function/X_irredux_residuals.F | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pol_function/X_irredux_residuals.F b/src/pol_function/X_irredux_residuals.F index d4fd170f9f..ba54a9eb3d 100644 --- a/src/pol_function/X_irredux_residuals.F +++ b/src/pol_function/X_irredux_residuals.F @@ -207,10 +207,7 @@ subroutine X_irredux_residuals(Xen,Xk,X,Dip,i_cg,iq,Xo_res,Xo_scatt,& ! endif ! - ! Filling the upper triangular part of the residual here ! - !-------------^^^^^--------------------------------------- - ! - ! AF: in this implementation we just store the data in rhotw_mp + ! AF: Here we store the data in rhotw_mp ! Later on, we multiply rhotw_mp*rhotw_mp^dag to build ! the whole residue matrix (both upper and lower parts) ! From a0acf7a82608124467a6627ffcc1d1e189394aaa Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 14:23:39 +0200 Subject: [PATCH 1220/1367] Version 5.3.0, Revision 25812, Hash 366a9053b MODIFIED * include/version/version.m4 nloptics/NL_Hamiltonian.F nloptics/NL_damping.F Bugs: - Additions: - Changes: -dG_lesser passed to NL_damping.F Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/NL_damping.F | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 54bf1e1170..0bb47634d9 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25739 h.d3c2053e1, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25812 h.366a9053b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25739" -SHASH="d3c2053e1" +SREVISION="25812" +SHASH="366a9053b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index a8055dee06..b536f02b07 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -233,7 +233,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Damping: NL_damping fills the I_relax matrix ! ================================================ - call NL_damping(E,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),ik,i_sp_pol),I_relax) + call NL_damping(E,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),ik,i_sp_pol),dG_lesser,I_relax) ! ! Store the Hamiltonian ! ===================== diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index 664a4f31dd..cca1a5426e 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -15,7 +15,7 @@ !! @param[out] I_relax relaxation matrix (distributed on k-points) ! ! -subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) +subroutine NL_damping(E,ik,i_sp_pol,V_bands,dG_lesser,I_relax) ! ! Output: I_relax ! @@ -26,6 +26,7 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) use real_time, ONLY:Phase_LifeTime,RAD_LifeTime use nl_optics, ONLY:NL_bands use parallel_m, ONLY:PAR_Xk_ibz_index + use QP_m, ONLY:QP_nk use real_time, ONLY:RT_deph_deg_thresh ! implicit none @@ -33,6 +34,7 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,I_relax) type(levels), intent(in) :: E integer, intent(in) :: ik,i_sp_pol complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf(i_sp_pol)) + complex(SP), intent(in) :: dG_lesser(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) complex(SP), intent(out) :: I_relax(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),PAR_Xk_nibz,n_sp_pol) ! ! Working Space From 161cc3d7942f275aeb2b6232faff656f0551a864 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 14:52:08 +0200 Subject: [PATCH 1221/1367] Version 5.3.0, Revision 25813, Hash a0acf7a82 MODIFIED * include/version/version.m4 nloptics/NL_Hamiltonian.F nloptics/NL_damping.F Bugs: - Additions: - Changes: -Dephasing in term of density matrix DONE Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 ++--- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/NL_damping.F | 41 ++++++++--------------------------- 3 files changed, 13 insertions(+), 36 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0bb47634d9..3899ba1f34 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25812 h.366a9053b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25813 h.a0acf7a82, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25812" -SHASH="366a9053b" +SREVISION="25813" +SHASH="a0acf7a82" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index b536f02b07..db82d123af 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -233,7 +233,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) ! ! Damping: NL_damping fills the I_relax matrix ! ================================================ - call NL_damping(E,ik,i_sp_pol,V_bands(:,:E%nbf(i_sp_pol),ik,i_sp_pol),dG_lesser,I_relax) + call NL_damping(E,ik,i_sp_pol,dG_lesser,I_relax) ! ! Store the Hamiltonian ! ===================== diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index cca1a5426e..d1e0a19faa 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -15,17 +15,16 @@ !! @param[out] I_relax relaxation matrix (distributed on k-points) ! ! -subroutine NL_damping(E,ik,i_sp_pol,V_bands,dG_lesser,I_relax) +subroutine NL_damping(E,ik,i_sp_pol,dG_lesser,I_relax) ! ! Output: I_relax ! use pars, ONLY:SP,cI use zeros, ONLY:zero_dfl - use parallel_m, ONLY:PAR_Xk_nibz + use parallel_m, ONLY:PAR_Xk_nibz,PAR_Xk_ibz_index use electrons, ONLY:levels,n_sp_pol use real_time, ONLY:Phase_LifeTime,RAD_LifeTime use nl_optics, ONLY:NL_bands - use parallel_m, ONLY:PAR_Xk_ibz_index use QP_m, ONLY:QP_nk use real_time, ONLY:RT_deph_deg_thresh ! @@ -33,7 +32,6 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,dG_lesser,I_relax) ! type(levels), intent(in) :: E integer, intent(in) :: ik,i_sp_pol - complex(SP), intent(in) :: V_bands(NL_bands(2),E%nbf(i_sp_pol)) complex(SP), intent(in) :: dG_lesser(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),QP_nk,n_sp_pol) complex(SP), intent(out) :: I_relax(NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),PAR_Xk_nibz,n_sp_pol) ! @@ -48,13 +46,9 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,dG_lesser,I_relax) ik_mem=PAR_Xk_ibz_index(ik) ! ! Fictitious lifetime equivalent to the broadening - ! in linear optics + ! in linear optics in term of density matrix ! - ! In the 2013 version this term was: - ! - ! I = 2*cI/Phase_LifeTime ( (|V_b(t=0)>zero_dfl) Gamma_ij=Gamma_ij+2._SP/Phase_LifeTime + if(Phase_LifeTime>zero_dfl) Gamma_ij=Gamma_ij+1._SP/Phase_LifeTime ! - do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i2,ik_mem,i_sp_pol) = I_relax(i1,i2,ik_mem,i_sp_pol) & -& -cI*Gamma_ij*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) - enddo + I_relax(i1,i2,ik_mem,i_sp_pol) = -Gamma_ij*dG_lesser(i1,i2,ik,i_sp_pol) I_relax(i2,i1,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ik_mem,i_sp_pol)) ! enddo @@ -86,31 +77,17 @@ subroutine NL_damping(E,ik,i_sp_pol,V_bands,dG_lesser,I_relax) !$omp parallel do default(shared), private(i1,i2,ib) do i1=NL_bands(1),NL_bands(2) ! - do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i1,ik_mem,i_sp_pol)=I_relax(i1,i1,ik_mem,i_sp_pol) & -& -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i1,ib))*V_bands(i1,ib)) - enddo + I_relax(i1,i1,ik_mem,i_sp_pol)=I_relax(i1,i1,ik_mem,i_sp_pol)-1._SP/RAD_LifeTime*dG_lesser(i1,i1,ik,i_sp_pol) ! ! I need this additional part for the degenerate states ! do i2=i1+1,NL_bands(2) if ( abs(E%E(i1,ik,1)-E%E(i2,ik,1))>=RT_deph_deg_thresh ) cycle - do ib=1,E%nbf(i_sp_pol) - I_relax(i1,i2,ik_mem,i_sp_pol) = I_relax(i1,i2,ik_mem,i_sp_pol) & -& -cI*2._SP/RAD_LifeTime*(conjg(V_bands(i2,ib))*V_bands(i1,ib)) - enddo - I_relax(i2,i1,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ik_mem,i_sp_pol)) + I_relax(i1,i2,ik_mem,i_sp_pol) = I_relax(i1,i2,ik_mem,i_sp_pol)-1._SP/RAD_LifeTime*dG_lesser(i1,i2,ik,i_sp_pol) + I_relax(i2,i1,ik_mem,i_sp_pol) = -conjg(I_relax(i1,i2,ik_mem,i_sp_pol)) enddo ! enddo -!$omp end parallel do - ! - ! Remove the equilibrium contribution - ! -!$omp parallel do default(shared), private(ib) - do ib=NL_bands(1),E%nbf(i_sp_pol) - I_relax(ib,ib,ik_mem,i_sp_pol)=I_relax(ib,ib,ik_mem,i_sp_pol)+cI*2._SP/RAD_LifeTime - enddo !$omp end parallel do ! endif From 5e2dae4b71b5e8f4cd7c75d1a94fbf9d0cc4caca Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 14:55:53 +0200 Subject: [PATCH 1222/1367] Version 5.3.0, Revision 25814, Hash 161cc3d79 MODIFIED * include/version/version.m4 nloptics/NL_damping.F Bugs: - Additions: - Changes: -added a comment Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_damping.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 3899ba1f34..d8950c78a1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25813 h.a0acf7a82, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25814 h.161cc3d79, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25813" -SHASH="a0acf7a82" +SREVISION="25814" +SHASH="161cc3d79" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index d1e0a19faa..9e79759654 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -7,7 +7,7 @@ ! !> @brief Dephasing for the real-time dynamics !! -!! @param[in] V_bands time-dependent valence bands +!! @param[in] dG_lesser variation of the G_lesser = G(t) - G^0 !! @param[in] ik k-point index !! @param[in] i_sp_pol spin-polarization index !! @param[in] E energies and life-time array From b38b001f74be480cd9944b28b9734b1126347c8a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Tue, 21 Oct 2025 17:03:12 +0200 Subject: [PATCH 1223/1367] Version 5.3.0, Revision 25815, Hash 5e2dae4b7 MODIFIED * include/version/version.m4 nloptics/NL_damping.F Bugs: - Additions: - Changes: -Removed unused variables Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_damping.F | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d8950c78a1..9389c0accb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25814 h.161cc3d79, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25815 h.5e2dae4b7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25814" -SHASH="161cc3d79" +SREVISION="25815" +SHASH="5e2dae4b7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_damping.F b/src/nloptics/NL_damping.F index 9e79759654..5ac0dd60d8 100644 --- a/src/nloptics/NL_damping.F +++ b/src/nloptics/NL_damping.F @@ -37,7 +37,7 @@ subroutine NL_damping(E,ik,i_sp_pol,dG_lesser,I_relax) ! ! Working Space ! - integer :: ib,i1,i2,ik_mem + integer :: i1,i2,ik_mem real(SP) :: Gamma_ij ! ! Damping @@ -74,7 +74,7 @@ subroutine NL_damping(E,ik,i_sp_pol,dG_lesser,I_relax) ! if(RAD_LifeTime>zero_dfl) then ! -!$omp parallel do default(shared), private(i1,i2,ib) +!$omp parallel do default(shared), private(i1,i2) do i1=NL_bands(1),NL_bands(2) ! I_relax(i1,i1,ik_mem,i_sp_pol)=I_relax(i1,i1,ik_mem,i_sp_pol)-1._SP/RAD_LifeTime*dG_lesser(i1,i1,ik,i_sp_pol) From 41a04ee8db41777afd4e484cb07091d685859ada Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 22 Oct 2025 10:43:34 +0200 Subject: [PATCH 1224/1367] Version 5.3.0, Revision 25816, Hash b38b001f7 MODIFIED * include/version/version.m4 nloptics/NL_build_dG_lesser.F Bugs: - Additions: - Changes: -Forgot to remove if Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_build_dG_lesser.F | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9389c0accb..1ab2708a5e 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25815 h.5e2dae4b7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25816 h.b38b001f7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25815" -SHASH="5e2dae4b7" +SREVISION="25816" +SHASH="b38b001f7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_build_dG_lesser.F b/src/nloptics/NL_build_dG_lesser.F index fcd0d58883..2dd71a4dfc 100644 --- a/src/nloptics/NL_build_dG_lesser.F +++ b/src/nloptics/NL_build_dG_lesser.F @@ -41,8 +41,6 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) integer :: i1,i2,is integer :: ik ! - if (n_sp_pol==2) call error(" NL_build_dG not coded for n_sp_pol==2") - ! #if defined _TIMING call timing('NL build_dG',OPR='start') #endif From 97b1b925bd4513d49ce59861d3ede9793fc09cdd Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 22 Oct 2025 10:44:02 +0200 Subject: [PATCH 1225/1367] Version 5.3.0, Revision 25817, Hash 41a04ee8d MODIFIED * include/version/version.m4 DELETED * nloptics/DIPOLE_symmetrize.F Bugs: - Additions: - Changes: -Removed unused file Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +-- src/nloptics/DIPOLE_symmetrize.F | 85 -------------------------------- 2 files changed, 3 insertions(+), 88 deletions(-) delete mode 100644 src/nloptics/DIPOLE_symmetrize.F diff --git a/include/version/version.m4 b/include/version/version.m4 index 1ab2708a5e..4b480427f4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25816 h.b38b001f7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25817 h.41a04ee8d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25816" -SHASH="b38b001f7" +SREVISION="25817" +SHASH="41a04ee8d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/DIPOLE_symmetrize.F b/src/nloptics/DIPOLE_symmetrize.F deleted file mode 100644 index 645deb5c50..0000000000 --- a/src/nloptics/DIPOLE_symmetrize.F +++ /dev/null @@ -1,85 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2025 The Yambo Team -! -! Authors (see AUTHORS file for details): CA -! -! headers -! -#include -! -subroutine DIPOLE_symmetrize(k) - ! - use pars, ONLY:SP,cI,cZERO - use nl_optics, ONLY:NL_bands - use R_lattice, ONLY:bz_samp - use electrons, ONLY:n_sp_pol - use D_lattice, ONLY:kpoints_map,old_dl_sop,old_S_contains_TR - use DIPOLES, ONLY:DIP_iR - use IO_int, ONLY:io_control - use IO_m, ONLY:REP,OP_RD_CL,DUMP - use com, ONLY:msg - use parallel_m, ONLY:PAR_IND_Xk_ibz,PAR_Xk_ibz_index,PAR_COM_Xk_ibz_INDEX - use parallel_int, ONLY:PP_redux_wait - use y_memory_alloc - ! - implicit none - ! - type(bz_samp), intent(in) :: k - ! - ! Work space - ! - integer, external :: io_full_SYMMs - integer :: io_old_SYMMs,ID - integer :: ik,ib1,ib2,i_sp,ik_old,is,ik_mem - complex(SP),allocatable :: DIP_tmp(:,:,:,:,:) - ! - ! Load old full symmetries if present - ! - call io_control(ACTION=OP_RD_CL,COM=REP,MODE=DUMP,SEC=(/1/),ID=ID) - io_old_SYMMs=io_full_SYMMs(k,ID) - ! - if(io_old_SYMMs/=0) return - ! - YAMBO_ALLOC(DIP_tmp,(3,NL_bands(1):NL_bands(2),NL_bands(1):NL_bands(2),k%nibz,n_sp_pol)) - ! - ! I need dipoles in all cores - ! - DIP_tmp=cZERO - do ik=1,k%nibz - if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle - ik_mem=PAR_Xk_ibz_index(ik) - DIP_tmp(:,:,:,ik,:)=DIP_iR(:,:,:,ik_mem,:) - enddo - call PP_redux_wait(DIP_tmp,COMM=PAR_COM_Xk_ibz_INDEX%COMM) - ! - ! Loop on k-points and application of symmetries to the dipole - ! - call msg('rs','Dipoles symmetrized with full symmetries of the system') - ! - do ik=1,k%nibz - ! - if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle - ik_mem=PAR_Xk_ibz_index(ik) - ik_old=kpoints_map(1,ik) - is=kpoints_map(2,ik) - ! - if(is==1) continue - ! - do i_sp=1,n_sp_pol - do ib2=NL_bands(1),NL_bands(2) - do ib1=NL_bands(1),NL_bands(2) - DIP_iR(:,ib1,ib2,ik_mem,i_sp)=matmul(old_dl_sop(:,:,is),DIP_tmp(:,ib1,ib2,ik_old,i_sp)) - enddo - enddo - if(old_S_contains_TR(is)==1) DIP_iR(:,:,:,ik_mem,i_sp)=conjg(DIP_iR(:,:,:,ik_mem,i_sp)) - enddo - ! - enddo - ! - YAMBO_FREE(kpoints_map) - YAMBO_FREE(old_dl_sop) - YAMBO_FREE(DIP_tmp) - ! -end subroutine DIPOLE_symmetrize From 1076d3791be6f63952654a8183087246f8c18951 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 23 Oct 2025 18:10:13 +0200 Subject: [PATCH 1226/1367] Version 5.3.0, Revision 25827, Hash bd75a116f MODIFIED * include/version/version.m4 DELETED * real_time_initialize/RT_Field_Commensurable_Frequencies.F Bugs: - Additions: - Changes: -Removed unused file Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +- .../RT_Field_Commensurable_Frequencies.F | 70 ------------------- 2 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 src/real_time_initialize/RT_Field_Commensurable_Frequencies.F diff --git a/include/version/version.m4 b/include/version/version.m4 index 4b480427f4..a1879b7864 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25817 h.41a04ee8d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25827 h.bd75a116f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25817" -SHASH="41a04ee8d" +SREVISION="25827" +SHASH="bd75a116f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F b/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F deleted file mode 100644 index 0f4d3a79a1..0000000000 --- a/src/real_time_initialize/RT_Field_Commensurable_Frequencies.F +++ /dev/null @@ -1,70 +0,0 @@ -! -! License-Identifier: GPL -! -! Copyright (C) 2011 The Yambo Team -! -! Authors (see AUTHORS file for details): AM -! -subroutine RT_Field_Commensurable_Frequencies() - ! - ! Check on the PROBE/PUMP frequencies. To be possible to find, in ypp_rt, the coefficients of the - ! Fourier series I need ALL the frequencies to be Wn=n deltaW. Therefore frequency(1) and - ! frequency(2) must be choosed accordingly. - ! - ! Moreover to extract the Fourier coefficients I need to integrate over aa Time range - ! equal to 2*pi/deltaW. This must be not larger then NE_tot_time - ! - use pars, ONLY:SP,schlen,n_fields_defs_max - use stderr, ONLY:STRING_split - use fields, ONLY:Efield,n_ext_fields,EtoT - use real_time, ONLY:NE_tot_time - ! - implicit none - ! - integer :: i_master_field,i_f,i_Pump,i_Probe - real(SP) :: W_step,T_treshold,T_step - real(SP), parameter :: treshold=0.8 - character(schlen) :: pump_defs(n_fields_defs_max),probe_defs(n_fields_defs_max) - ! - if (n_ext_fields<2) return - ! - i_Probe=1 - i_Pump =2 - ! - call STRING_split(trim(Efield(i_Pump)%ef_name),pump_defs) - call STRING_split(trim(Efield(i_Probe)%ef_name),probe_defs) - ! - if ( .not.any((/pump_defs(1)=='SIN',probe_defs(1)=='SIN'/)) ) return - ! - i_master_field=0 - if ( abs( Efield(i_Pump)%frequency(2) -Efield(i_Pump)%frequency(1) ) > epsilon(1._SP) ) i_master_field=i_Pump - if ( abs( Efield(i_Probe)%frequency(2)-Efield(i_Probe)%frequency(1)) >& -& abs( Efield(i_Pump)%frequency(2) -Efield(i_Pump)%frequency(1) ) ) i_master_field=i_Probe - ! - if (i_master_field==0) return - ! - W_step=Efield(i_master_field)%W_step - ! - T_step=EtoT(E=W_step) - T_treshold=treshold*NE_tot_time - if (T_step > treshold*NE_tot_time) then - T_step=T_treshold - W_step=EtoT(T=T_step) - endif - ! - Efield(i_master_field)%W_step=W_step - ! - do i_f=1,n_ext_fields - ! - Efield(i_f)%frequency(1)=nint(Efield(i_f)%frequency(1)/W_step)*W_step - Efield(i_f)%frequency(2)=nint(Efield(i_f)%frequency(2)/W_step)*W_step - ! - if ( abs(Efield(i_f)%frequency(1)) < 1.E-5 ) Efield(i_f)%frequency(1)=W_step - ! - Efield(i_f)%n_frequencies=nint((Efield(i_f)%frequency(2)-Efield(i_f)%frequency(1))/W_step)+1 - ! - if ( Efield(i_f)%n_frequencies == 1) Efield(i_f)%W_step=0. - ! - enddo - ! -end subroutine RT_Field_Commensurable_Frequencies From b4722f9707a54e1240c4ec82575ad6116e33328a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 10:10:02 +0200 Subject: [PATCH 1227/1367] Version 5.3.0, Revision 25828, Hash 1076d3791b MODIFIED * include/version/version.m4 lib/archive/package.list nloptics/DOUBLE_project.dep real_time_initialize/DOUBLE_project.dep Bugs: - Additions: -Fixed compilation with intel 2025.3 Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/archive/package.list | 2 +- src/nloptics/DOUBLE_project.dep | 1 - src/real_time_initialize/DOUBLE_project.dep | 1 - 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index a1879b7864..0a007f95f4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25827 h.bd75a116f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25828 h.1076d3791b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25827" -SHASH="bd75a116f" +SREVISION="25828" +SHASH="1076d3791b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/archive/package.list b/lib/archive/package.list index 74619a4665..872ad5d097 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -76,7 +76,7 @@ tarball_Ldiago=$(version_Ldiago).tar.gz tarball_iotk=$(pkgname_iotk).tar.gz tarball_netcdf=v$(version_netcdf).tar.gz tarball_netcdff=v$(version_netcdff).tar.gz -tarball_hdf5=hdf5-1_12_2.tar.gz +tarball_hdf5=hdf5-1.14.6.tar.gz tarball_etsf_io=$(pkgname_etsf_io).tar.gz tarball_libxc=$(pkgname_libxc).tar.gz tarball_lapack=v$(version_lapack).tar.gz diff --git a/src/nloptics/DOUBLE_project.dep b/src/nloptics/DOUBLE_project.dep index 6fa71a60f3..68b0c91045 100644 --- a/src/nloptics/DOUBLE_project.dep +++ b/src/nloptics/DOUBLE_project.dep @@ -1,4 +1,3 @@ - DIPOLE_symmetrize.o DIP_polarization.o EXC_macroscopic_JGM.o EXP_op.o diff --git a/src/real_time_initialize/DOUBLE_project.dep b/src/real_time_initialize/DOUBLE_project.dep index c350f2f4de..aa30fd3003 100644 --- a/src/real_time_initialize/DOUBLE_project.dep +++ b/src/real_time_initialize/DOUBLE_project.dep @@ -1,6 +1,5 @@ RT_Dephasing_Matrix.o RT_ELPH_initialize.o - RT_Field_Commensurable_Frequencies.o RT_G_lesser_init.o RT_initialize.o RT_occupations_and_levels_init.o From cad2b9e257af57a41751da0cc07e9b7c96cc9708 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 10:15:04 +0200 Subject: [PATCH 1228/1367] Version 5.3.0, Revision 25829, Hash b4722f9707 MODIFIED * include/version/version.m4 lib/archive/package.list Bugs: -Fixed package list Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/archive/package.list | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0a007f95f4..550aa4be5c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25828 h.1076d3791b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25830 h.b4722f9707, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25828" -SHASH="1076d3791b" +SREVISION="25830" +SHASH="b4722f9707" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/archive/package.list b/lib/archive/package.list index 872ad5d097..48a7d191ac 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -31,7 +31,7 @@ version_Ldiago=0.5.0 version_iotk=y1.2.2 version_netcdf=4.9.0 version_netcdff=4.6.0 -version_hdf5=1.12.2 +version_hdf5=1.14.6 version_etsf_io=1.0.4 version_libxc=5.2.3 version_lapack=3.12.0 From 2221cf5b9a3c04795ff3662854d16522b5fd5bd4 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 10:27:19 +0200 Subject: [PATCH 1229/1367] Version 5.3.0, Revision 25830, Hash cad2b9e257 MODIFIED * include/version/version.m4 lib/petsc/Makefile.loc Bugs: -Fixed compilation for PETSC Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 550aa4be5c..73798a36f4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25830 h.b4722f9707, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25831 h.cad2b9e257, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25830" -SHASH="b4722f9707" +SREVISION="25831" +SHASH="cad2b9e257" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 5ca6a5eb25..fe2e577a89 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -19,7 +19,7 @@ include ../config/external_libs_defs.mk # PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ - FOPTFLAGS="-O1" COPTFLAGS="-O2" \ + FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ --PETSC_ARCH=${PETSC_ARCH} \ --with-ssl=0 \ --with-x=0 \ @@ -27,8 +27,8 @@ CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ --with-shared-libraries=$(spetsc) \ --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ - --with-precision="${yprecision}" \ - --with-mpi-dir=$(mpipath) + --with-precision="${yprecision}" +# --with-mpi-dir=$(mpipath) # # MAIN target # From 5340d46cbe48bcc860e50253e971d52c23738f58 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 10:47:04 +0200 Subject: [PATCH 1230/1367] Version 5.3.0, Revision 25831, Hash 2221cf5b9a MODIFIED * include/version/version.m4 lib/petsc/Makefile.loc DELETED * config/stamps_and_lists/project_dependencies.stamp Bugs: -Fixing compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- config/stamps_and_lists/project_dependencies.stamp | 0 include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/version/version.m4 b/include/version/version.m4 index 73798a36f4..ef29c54c02 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25831 h.cad2b9e257, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25832 h.2221cf5b9a, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25831" -SHASH="cad2b9e257" +SREVISION="25832" +SHASH="2221cf5b9a" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index fe2e577a89..e5e29b8304 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -27,8 +27,8 @@ CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ --with-shared-libraries=$(spetsc) \ --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ - --with-precision="${yprecision}" -# --with-mpi-dir=$(mpipath) + --with-precision="${yprecision}" \ + --with-mpi-dir=$(mpipath) # # MAIN target # From 3b81b154762a812f23c7113585018cedd267b268 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 11:05:51 +0200 Subject: [PATCH 1231/1367] Version 5.3.0, Revision 25832, Hash 5340d46cbe MODIFIED * include/version/version.m4 lib/petsc/Makefile.loc Bugs: -Try to fix compilation Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index ef29c54c02..d47ac813a5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25832 h.2221cf5b9a, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25833 h.5340d46cbe, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25832" -SHASH="2221cf5b9a" +SREVISION="25833" +SHASH="5340d46cbe" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index e5e29b8304..1db31dc253 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -19,7 +19,7 @@ include ../config/external_libs_defs.mk # PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ - FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ + FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" CC=$(cc) FC=$(cc) \ --PETSC_ARCH=${PETSC_ARCH} \ --with-ssl=0 \ --with-x=0 \ From b2eed68e4d151dd8bc2746478e1ec03fd15b652b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 11:10:26 +0200 Subject: [PATCH 1232/1367] Version 5.3.0, Revision 25833, Hash 3b81b15476 MODIFIED * include/version/version.m4 lib/petsc/Makefile.loc Bugs: -Try again Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d47ac813a5..6d09686032 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25833 h.5340d46cbe, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25834 h.3b81b15476, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25833" -SHASH="5340d46cbe" +SREVISION="25834" +SHASH="3b81b15476" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 1db31dc253..04c03bdf41 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -27,8 +27,8 @@ CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ --with-shared-libraries=$(spetsc) \ --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ - --with-precision="${yprecision}" \ - --with-mpi-dir=$(mpipath) + --with-precision="${yprecision}" +# --with-mpi-dir=$(mpipath) # # MAIN target # From 714522b418ce9f5a4dd1b2a7854aad24355583f6 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 11:12:20 +0200 Subject: [PATCH 1233/1367] Version 5.3.0, Revision 25834, Hash b2eed68e4d MODIFIED * include/version/version.m4 lib/petsc/Makefile.loc Bugs: - Additions: -Restored old Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 6d09686032..5549653607 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25834 h.3b81b15476, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25835 h.b2eed68e4d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25834" -SHASH="3b81b15476" +SREVISION="25835" +SHASH="b2eed68e4d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 04c03bdf41..47c68a3512 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -19,7 +19,7 @@ include ../config/external_libs_defs.mk # PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ - FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" CC=$(cc) FC=$(cc) \ + FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ --PETSC_ARCH=${PETSC_ARCH} \ --with-ssl=0 \ --with-x=0 \ @@ -27,8 +27,8 @@ CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ --with-shared-libraries=$(spetsc) \ --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ - --with-precision="${yprecision}" -# --with-mpi-dir=$(mpipath) + --with-precision="${yprecision}" \ + --with-mpi-dir=$(mpipath) # # MAIN target # From 8d8973485ddbc5f73348eb828a5cb7659566c4c9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 14:19:29 +0200 Subject: [PATCH 1234/1367] Version 5.3.0, Revision 25835, Hash 714522b418 MODIFIED * config/m4/acx_fortran_flags.m4 configure include/version/version.m4 Bugs: -Fixed compilation flags for Intel 2025 Additions: - Changes: - Patch sent by: Claudio Attaccalite --- config/m4/acx_fortran_flags.m4 | 15 ++++++++++++-- configure | 37 ++++++++++++++++++++++------------ include/version/version.m4 | 6 +++--- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/config/m4/acx_fortran_flags.m4 b/config/m4/acx_fortran_flags.m4 index 37797187dd..289a794e80 100644 --- a/config/m4/acx_fortran_flags.m4 +++ b/config/m4/acx_fortran_flags.m4 @@ -88,7 +88,12 @@ i?86*linux*) CPU_FLAG="-xHost" #CPU_FLAG=" " ;; - *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + ;; + *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" @@ -338,7 +343,13 @@ aarch*linux* | arm*linux* ) #CPU_FLAG="-xHost" CPU_FLAG=" " ;; - *2020* | *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + CFLAGS="-O2 -std=gnu99" + ;; + *2020* | *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" diff --git a/configure b/configure index 900e524c64..879382e3cc 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25734 h.4fccede7f. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25836 h.714522b418. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25734 h.4fccede7f' -PACKAGE_STRING='Yambo 5.3.0 r.25734 h.4fccede7f' +PACKAGE_VERSION='5.3.0 r.25836 h.714522b418' +PACKAGE_STRING='Yambo 5.3.0 r.25836 h.714522b418' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25734 h.4fccede7f to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25836 h.714522b418 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25734 h.4fccede7f:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25836 h.714522b418:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25734 h.4fccede7f +Yambo configure 5.3.0 r.25836 h.714522b418 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25734 h.4fccede7f, which was +It was created by Yambo $as_me 5.3.0 r.25836 h.714522b418, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25734" -SHASH="4fccede7f" +SREVISION="25836" +SHASH="714522b418" @@ -7384,7 +7384,12 @@ i?86*linux*) CPU_FLAG="-xHost" #CPU_FLAG=" " ;; - *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + ;; + *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" @@ -7634,7 +7639,13 @@ aarch*linux* | arm*linux* ) #CPU_FLAG="-xHost" CPU_FLAG=" " ;; - *2020* | *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + CFLAGS="-O2 -std=gnu99" + ;; + *2020* | *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" @@ -18448,7 +18459,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25734 h.4fccede7f, which was +This file was extended by Yambo $as_me 5.3.0 r.25836 h.714522b418, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18512,7 +18523,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25734 h.4fccede7f +Yambo config.status 5.3.0 r.25836 h.714522b418 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5549653607..12bc5ac690 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25835 h.b2eed68e4d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25836 h.714522b418, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25835" -SHASH="b2eed68e4d" +SREVISION="25836" +SHASH="714522b418" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) From 7622ecbfc9ea28bd97e99d60a6fca8822e918839 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 14:58:14 +0200 Subject: [PATCH 1235/1367] Version 5.3.0, Revision 25836, Hash 8d8973485d MODIFIED * config/m4/libxc.m4 configure include/version/version.m4 lib/petsc/Makefile.loc Bugs: -Fixed linking libxc new versions > 6.0 Additions: - Changes: - Patch sent by: Claudio Attaccalite --- config/m4/libxc.m4 | 4 +++- configure | 26 ++++++++++++++------------ include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 1 - 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/config/m4/libxc.m4 b/config/m4/libxc.m4 index 56919791e5..dabf52d0fe 100644 --- a/config/m4/libxc.m4 +++ b/config/m4/libxc.m4 @@ -69,12 +69,14 @@ if test x"$acx_libxc_ok" = xno ; then if test -d "$with_libxc_path"; then libxc_incdir="$with_libxc_path/include" libxc_libdir="$with_libxc_path/lib" + libxc_lib64dir="$with_libxc_path/lib64" fi if test -d "$with_libxc_includedir"; then libxc_incdir="$with_libxc_includedir" ; fi if test -d "$with_libxc_libdir"; then libxc_libdir="$with_libxc_libdir" ; fi # # dynamic linkage, separate Fortran interface - if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_lib64dir"; then LIBXC_LIBS="-L$libxc_lib64dir $LIBXC_LIBS"; fi if test ! -z "$libxc_incdir"; then LIBXC_INCS="$IFLAG$libxc_incdir"; fi # if test ! -z "$with_libxc_libs" ; then LIBXC_LIBS="$with_libxc_libs" ; fi diff --git a/configure b/configure index 879382e3cc..2c2a656738 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25836 h.714522b418. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25837 h.8d8973485d. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25836 h.714522b418' -PACKAGE_STRING='Yambo 5.3.0 r.25836 h.714522b418' +PACKAGE_VERSION='5.3.0 r.25837 h.8d8973485d' +PACKAGE_STRING='Yambo 5.3.0 r.25837 h.8d8973485d' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25836 h.714522b418 to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25837 h.8d8973485d to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25836 h.714522b418:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25837 h.8d8973485d:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25836 h.714522b418 +Yambo configure 5.3.0 r.25837 h.8d8973485d generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25836 h.714522b418, which was +It was created by Yambo $as_me 5.3.0 r.25837 h.8d8973485d, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25836" -SHASH="714522b418" +SREVISION="25837" +SHASH="8d8973485d" @@ -15729,12 +15729,14 @@ if test x"$acx_libxc_ok" = xno ; then if test -d "$with_libxc_path"; then libxc_incdir="$with_libxc_path/include" libxc_libdir="$with_libxc_path/lib" + libxc_lib64dir="$with_libxc_path/lib64" fi if test -d "$with_libxc_includedir"; then libxc_incdir="$with_libxc_includedir" ; fi if test -d "$with_libxc_libdir"; then libxc_libdir="$with_libxc_libdir" ; fi # # dynamic linkage, separate Fortran interface - if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_lib64dir"; then LIBXC_LIBS="-L$libxc_lib64dir $LIBXC_LIBS"; fi if test ! -z "$libxc_incdir"; then LIBXC_INCS="$IFLAG$libxc_incdir"; fi # if test ! -z "$with_libxc_libs" ; then LIBXC_LIBS="$with_libxc_libs" ; fi @@ -18459,7 +18461,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25836 h.714522b418, which was +This file was extended by Yambo $as_me 5.3.0 r.25837 h.8d8973485d, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18523,7 +18525,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25836 h.714522b418 +Yambo config.status 5.3.0 r.25837 h.8d8973485d configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index 12bc5ac690..f4876bc306 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25836 h.714522b418, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25837 h.8d8973485d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25836" -SHASH="714522b418" +SREVISION="25837" +SHASH="8d8973485d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 47c68a3512..e2144ce3e1 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -21,7 +21,6 @@ PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ --PETSC_ARCH=${PETSC_ARCH} \ - --with-ssl=0 \ --with-x=0 \ --with-debugging=no \ --with-shared-libraries=$(spetsc) \ From 396c289aebf51607ea3d7cc35d1163f38fe7baa7 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 24 Oct 2025 15:24:33 +0200 Subject: [PATCH 1236/1367] Version 5.3.0, Revision 25837, Hash 7622ecbfc9 MODIFIED * configure include/version/version.m4 lib/petsc/Makefile.loc Bugs: - Additions: -Restored old file Changes: - Patch sent by: Claudio Attaccalite --- configure | 22 +++++++++++----------- include/version/version.m4 | 6 +++--- lib/petsc/Makefile.loc | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 2c2a656738..917e06bfa4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25837 h.8d8973485d. +# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25838 h.7622ecbfc9. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Yambo' PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25837 h.8d8973485d' -PACKAGE_STRING='Yambo 5.3.0 r.25837 h.8d8973485d' +PACKAGE_VERSION='5.3.0 r.25838 h.7622ecbfc9' +PACKAGE_STRING='Yambo 5.3.0 r.25838 h.7622ecbfc9' PACKAGE_BUGREPORT='yambo@yambo-code.org' PACKAGE_URL='' @@ -1700,7 +1700,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25837 h.8d8973485d to adapt to many kinds of systems. +\`configure' configures Yambo 5.3.0 r.25838 h.7622ecbfc9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1766,7 +1766,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25837 h.8d8973485d:";; + short | recursive ) echo "Configuration of Yambo 5.3.0 r.25838 h.7622ecbfc9:";; esac cat <<\_ACEOF @@ -2020,7 +2020,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25837 h.8d8973485d +Yambo configure 5.3.0 r.25838 h.7622ecbfc9 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2649,7 +2649,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25837 h.8d8973485d, which was +It was created by Yambo $as_me 5.3.0 r.25838 h.7622ecbfc9, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3407,8 +3407,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25837" -SHASH="8d8973485d" +SREVISION="25838" +SHASH="7622ecbfc9" @@ -18461,7 +18461,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25837 h.8d8973485d, which was +This file was extended by Yambo $as_me 5.3.0 r.25838 h.7622ecbfc9, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18525,7 +18525,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25837 h.8d8973485d +Yambo config.status 5.3.0 r.25838 h.7622ecbfc9 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/version/version.m4 b/include/version/version.m4 index f4876bc306..a12e7fdab6 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25837 h.8d8973485d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25838 h.7622ecbfc9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25837" -SHASH="8d8973485d" +SREVISION="25838" +SHASH="7622ecbfc9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index e2144ce3e1..47c68a3512 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -21,6 +21,7 @@ PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ --PETSC_ARCH=${PETSC_ARCH} \ + --with-ssl=0 \ --with-x=0 \ --with-debugging=no \ --with-shared-libraries=$(spetsc) \ From 49cd719ca5462e4ee602ce510bc57ce36ee8903f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 25 Oct 2025 14:10:15 +0200 Subject: [PATCH 1237/1367] Version 5.3.0, Revision 25828, Hash 1076d3791 MODIFIED * include/version/version.m4 wf_and_fft/WF_symm_kpoint.F Bugs: -Fixed segmentation fault in overlaps Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/wf_and_fft/WF_symm_kpoint.F | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index a1879b7864..d6580f0ccd 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25827 h.bd75a116f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25828 h.1076d3791, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25827" -SHASH="bd75a116f" +SREVISION="25828" +SHASH="1076d3791" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/wf_and_fft/WF_symm_kpoint.F b/src/wf_and_fft/WF_symm_kpoint.F index 397c0bc2aa..a3b4274739 100644 --- a/src/wf_and_fft/WF_symm_kpoint.F +++ b/src/wf_and_fft/WF_symm_kpoint.F @@ -26,7 +26,7 @@ subroutine DEV_SUB(WF_symm_kpoint)(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) ! complex(SP), pointer DEV_ATTR :: WF_p(:,:,:) integer :: ik,is,ib,ibl,iwf - integer :: i_g,i_spinor + integer :: i_g,i_spinor,min_ng ! ik = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -37,6 +37,7 @@ subroutine DEV_SUB(WF_symm_kpoint)(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) WF_k_out=cZERO #endif WF_p => DEV_VAR(WF%c) + min_ng=minval((/wf_ng,wf_ng_1st_BZ/)) ! if(is==idt_index) then ! @@ -47,9 +48,9 @@ subroutine DEV_SUB(WF_symm_kpoint)(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) ! #if defined _GPU_LOC ! dev2dev - call devxlib_memcpy_d2d(WF_k_out(:wf_ng,:,ibl),DEV_VAR(WF%c)(:,:,iwf)) + call devxlib_memcpy_d2d(WF_k_out(:min_ng,:,ibl),DEV_VAR(WF%c)(:min_ng,:,iwf)) #else - WF_k_out(:wf_ng,:,ibl)=WF_p(:,:,iwf) + WF_k_out(:min_ng,:,ibl)=WF_p(:min_ng,:,iwf) #endif ! enddo From 919aed905f00cbfd45d209ee399c1523f6cfc0b3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 26 Oct 2025 00:41:28 +0200 Subject: [PATCH 1238/1367] Reverted previous fix and added a more proper one in INIT_load It is still a workaround. The handling of the cutoff in the code should be revised --- src/interface/INIT_load.F | 31 ++++++++++++++++++++++++------- src/wf_and_fft/WF_symm_kpoint.F | 7 +++---- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 358f0c67b6..8a4a58b26a 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -27,11 +27,11 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) & QP_G_er,QP_G_ir,QP_G_dr,QP_Sc_steps,QP_G_solver,& & QP_dSc_delta,QP_G_Zoom_treshold,GF_energy_range_mode use LIVE_t, ONLY:nhash - use wave_func, ONLY:wf_ng,WF_load_mode + use wave_func, ONLY:wf_ng,wf_ng_1st_BZ,WF_load_mode use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use D_lattice, ONLY:Boltz_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& -& bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& +& bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,g_rot,& & RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_bands_frozen_ch,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry @@ -124,6 +124,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) ! ! Work Space ! + integer :: wf_ng_closed #if defined _RT integer :: i_field #endif @@ -186,16 +187,32 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call CPU_structure_load( ) #endif ! - !================ - ! GPL VARIABLES - !================ + ! Cutoff on the density + ! ng_closed (cutoff on the density) should never be lower than wf_ng (cutoff on the WFs) + ! Indeed, the two cutofff should be correlated. However, it is not in the code + ! Here there is a simple check, just in case + call it(defs,'MaxGvecs','[INI] Max number of G-vectors planned to use',ng_closed,unit=G_unit,verb_level=V_RL) + if (ng_closed DEV_VAR(WF%c) - min_ng=minval((/wf_ng,wf_ng_1st_BZ/)) ! if(is==idt_index) then ! @@ -48,9 +47,9 @@ subroutine DEV_SUB(WF_symm_kpoint)(b_to_load,ikbz,i_sp_pol,Xk,WF_k_out) ! #if defined _GPU_LOC ! dev2dev - call devxlib_memcpy_d2d(WF_k_out(:min_ng,:,ibl),DEV_VAR(WF%c)(:min_ng,:,iwf)) + call devxlib_memcpy_d2d(WF_k_out(:wf_ng,:,ibl),DEV_VAR(WF%c)(:,:,iwf)) #else - WF_k_out(:min_ng,:,ibl)=WF_p(:min_ng,:,iwf) + WF_k_out(:wf_ng,:,ibl)=WF_p(:,:,iwf) #endif ! enddo From e6c0a294ae0f8bf2d1686c4bcca25a5390fef188 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 27 Oct 2025 11:42:54 +0100 Subject: [PATCH 1239/1367] Version 5.3.0, Revision 25842, Hash 1a75870310 MODIFIED * include/version/version.m4 nloptics/NL_Hamiltonian.F nloptics/NL_Integrator.F nloptics/NL_driver.F nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Removed unused variable Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_Hamiltonian.F | 3 +-- src/nloptics/NL_Integrator.F | 22 +++++++++++----------- src/nloptics/NL_driver.F | 2 +- src/nloptics/NL_initialize.F | 22 ++++++++++++++++++---- 5 files changed, 34 insertions(+), 21 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d6580f0ccd..41bda90a43 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25828 h.1076d3791, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25842 h.1a75870310, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25828" -SHASH="1076d3791" +SREVISION="25842" +SHASH="1a75870310" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index db82d123af..93b4452416 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -5,7 +5,7 @@ ! ! Authors (see AUTHORS file for details): MG CA ! -subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) +subroutine NL_Hamiltonian(E,k,q,X,Time,V_bands) ! ! The subroutine calculate Ho + V + Sigma and the fields E_tot, E_ext, E_ks ! @@ -44,7 +44,6 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,i_time,V_bands) real(SP), intent(in) :: Time type(X_t), intent(in) :: X complex(SP), intent(in) :: V_bands(NL_bands(2),maxval(E%nbf),QP_nk,n_sp_pol) - integer, intent(in) :: i_time ! ! Working Space ! diff --git a/src/nloptics/NL_Integrator.F b/src/nloptics/NL_Integrator.F index cb8c6643d4..2333f15297 100644 --- a/src/nloptics/NL_Integrator.F +++ b/src/nloptics/NL_Integrator.F @@ -129,7 +129,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step/2._SP,i_time,K_all) + call NL_Hamiltonian(E,k,q,X,Time+RT_step/2._SP,K_all) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -172,7 +172,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step/2._SP,i_time,K_all) + call NL_Hamiltonian(E,k,q,X,Time+RT_step/2._SP,K_all) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -214,7 +214,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step/2._SP,i_time,K_all) + call NL_Hamiltonian(E,k,q,X,Time+RT_step/2._SP,K_all) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -261,7 +261,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*Heun_apar(1),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*Heun_apar(1),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -285,7 +285,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ! ! Recalculate H(t) using V(t+2dt/3) ! - call NL_Hamiltonian(E,k,q,X,Time+RT_step*Heun_apar(2),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*Heun_apar(2),V_tmp) ! ! final step |V(t+dt)> ! @@ -337,7 +337,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(1),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(1),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -364,7 +364,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(2),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(2),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -391,7 +391,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(3),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(3),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -443,7 +443,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(1),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(1),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -470,7 +470,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(2),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(2),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif @@ -497,7 +497,7 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) #if defined _TIMING call timing('NL Integrator',OPR='stop') #endif - call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(3),i_time,V_tmp) + call NL_Hamiltonian(E,k,q,X,Time+RT_step*RK4_apar(3),V_tmp) #if defined _TIMING call timing('NL Integrator',OPR='start') #endif diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 1ab0e3de65..ccd02876ea 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -308,7 +308,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) NE_i_time=NE_i_time+1 NE_time=real(NE_i_time-1,SP)*RT_step ! - call NL_Hamiltonian(E,k,q,X(1),NE_time,NE_i_time,V_bands) + call NL_Hamiltonian(E,k,q,X(1),NE_time,V_bands) ! ! I evaluate current after the Hamiltonian because I need ! time-dependent overlaps Sm1_plus, and Sm1_mins diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 72e9238011..de132a5a89 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -11,7 +11,7 @@ ! subroutine NL_initialize(E,k) ! - use pars, ONLY:SP,DP,pi + use pars, ONLY:SP,DP,pi,n_fields_defs_max,schlen use drivers, ONLY:l_sc_fock,l_sc_coh,l_sc_sex,l_sc_hartree use vec_operate, ONLY:normalize_v,v_norm,cross_product use collision_ext, ONLY:COLLISIONS_CV_only,COLL_bands_frozen,COLLISIONS_load_SP,COLLISIONS_compr @@ -26,12 +26,13 @@ subroutine NL_initialize(E,k) use collision_ext, ONLY:ng_oscll,COLLISIONS_cutoff use R_lattice, ONLY:bz_samp,k_map use IO_m, ONLY:io_GF + use stderr, ONLY:STRING_split use X_m, ONLY:global_gauge - use fields, ONLY:Efield,Efield_strength,n_ext_fields,n_ext_fields_max,EtoT + use fields, ONLY:Efield,Efield_strength,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now - use RT_control, ONLY:OBS_RT_IO_t, NE_i_start_time, RT_control_alloc,RT_control_free,l_NE_with_fields,Vbands_RT_IO_t,& + use RT_control, ONLY:OBS_RT_IO_t, RT_control_alloc,RT_control_free,l_NE_with_fields,Vbands_RT_IO_t,& & SAVE_Vb_history,SAVE_G_history, SAVE_Vb_floquet, Vbands_IO_time, Floquet_order use nl_optics, ONLY:l_use_DIPOLES,EULER,EULEREXP,RK2,RK4,RK2EXP,RK4EXP,HEUN,INVINT,Integrator,CRANK_NICOLSON, & & NL_damping,NL_correlation,Correlation,NL_er,NL_estep,n_frequencies,IPA,TDDFT,HARTREE,LRC,JGM, & @@ -55,6 +56,7 @@ subroutine NL_initialize(E,k) logical :: l_velocity_gauge_tmp real(SP) :: Sampling_Time logical :: l_no_compress_COLL + character(schlen) :: field_defs(n_fields_defs_max) ! ! Parser ! ============ @@ -166,7 +168,14 @@ subroutine NL_initialize(E,k) ! Check Field ! ========================= ! - ! This part of the code works with only one field + ! Initial check for fields defined from file + do i1=1,n_ext_fields_max + field_defs="" + Efield(i1)%ef_name=trim(Efield(i1)%ef_name) + call STRING_split(Efield(i1)%ef_name,field_defs) + if ( field_defs(1)/='FROM_FILE') cycle + call RT_load_field_from_file_init(field_defs(2),field_defs(3)) + enddo ! n_active_fields=0 ! @@ -174,6 +183,7 @@ subroutine NL_initialize(E,k) ! Efield(i1)%ef_name=trim(Efield(i1)%ef_name) if((Efield(i1)%ef_name=='none')) cycle + call STRING_split(Efield(i1)%ef_name,field_defs) ! if(all(abs(Efield(i1)%versor(:)) Date: Mon, 27 Oct 2025 11:55:12 +0100 Subject: [PATCH 1240/1367] Version 5.3.0, Revision 25843, Hash e6c0a294ae MODIFIED * include/version/version.m4 nloptics/NL_initialize.F real_time_control/RT_small_a.F Bugs: - Additions: -Added comment Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 3 +++ src/real_time_control/RT_small_a.F | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 41bda90a43..976b34e7b2 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25842 h.1a75870310, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25843 h.e6c0a294ae, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25842" -SHASH="1a75870310" +SREVISION="25843" +SHASH="e6c0a294ae" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index de132a5a89..b6a6de6cd9 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -175,6 +175,9 @@ subroutine NL_initialize(E,k) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle call RT_load_field_from_file_init(field_defs(2),field_defs(3)) + if(Integrator/=INVINT) then + call error("External field from file compatible only with INVINT integrator!") + endif enddo ! n_active_fields=0 diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index cd4a4b6f25..dc06247f71 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -199,7 +199,14 @@ function small_a(T,dt,E_field,order,envelop_only) ! select case( trim(field_defs(1)) ) case('FROM_FILE') +#if defined _NL + ! External field from file is compatible only with single-step integrator + ! like INVINT. For two-steps integrators CRANKNIC,RK2 etc. it has to be + ! interpolated (TO BE FONE) + i_T=nint((T-T_0)/dT)+1 +#else i_T=nint((T-T_0)/(dT/2._SP))+1 +#endif if (i_T<=0.or.envelop_only_) then f_now=0 else From d65dbae10bc1ecae3c9a6afafb87a7e5d7f5ac47 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 27 Oct 2025 16:54:08 +0100 Subject: [PATCH 1241/1367] Version 5.3.0, Revision 25842, Hash 1a75870310 MODIFIED * include/version/version.m4 real_time_control/RT_small_a.F Bugs: -Bug in GAUSS field the width should not depend from the frequency (that is not required) Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/real_time_control/RT_small_a.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d6580f0ccd..41bda90a43 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25828 h.1076d3791, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25842 h.1a75870310, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25828" -SHASH="1076d3791" +SREVISION="25842" +SHASH="1a75870310" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index cd4a4b6f25..46b9088781 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -153,7 +153,7 @@ function small_a(T,dt,E_field,order,envelop_only) if(trim(field_defs(2))=="4SIGMA" .or. trim(field_defs(3))=="4SIGMA") T_0_fac=4._SP*sigma_eff if(trim(field_defs(2))=="5SIGMA" .or. trim(field_defs(3))=="5SIGMA") T_0_fac=5._SP*sigma_eff T_0=pi/W_0*(real(nint(W_0/pi*T_0_fac),SP)) - if( index(field_defs(1),"PULSE")>0 ) T_0=T_0_fac + if( index(field_defs(1),"PULSE")>0.or.index(field_defs(1),"GAUSS")>0 ) T_0=T_0_fac end select ! ! Initial and relative phases control From c46294251f5ede5ff0a6e087e63793ac0c24a272 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 29 Oct 2025 12:25:51 +0100 Subject: [PATCH 1242/1367] Fixed 2 bugs: - one introduced in K_kernel for TDDFT - one introduced in cutoff handling --- src/bse/K_kernel.F | 2 +- src/interface/INIT_load.F | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 6b5b3343b0..7ca3c9b7dd 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -541,7 +541,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !---------------------- if(iHxc==2 .and. l_tddft_gsum) then ! - l_tddft_comp = .not.(allocated(BS_T_grp(i_Tgrp_k)%O_tddft_L).and.allocated(BS_T_grp(i_Tgrp_k)%O_tddft_R)) + l_tddft_comp = .not.(allocated(BS_T_grp(i_Tgrp_k)%O_tddft_L).and.allocated(BS_T_grp(i_Tgrp_p)%O_tddft_R)) ! if (l_tddft_comp) then YAMBO_ALLOC(tddft_wf%WF_symm1,(fft_size,n_spinor)) diff --git a/src/interface/INIT_load.F b/src/interface/INIT_load.F index 8a4a58b26a..0b6f6ec38c 100644 --- a/src/interface/INIT_load.F +++ b/src/interface/INIT_load.F @@ -31,7 +31,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) use D_lattice, ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp use D_lattice, ONLY:Boltz_Temp use R_lattice, ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,& -& bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,g_rot,& +& bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,& & RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cut_geometry,ws_cutoff use BS, ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_bands_frozen_ch,& & BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry @@ -194,7 +194,7 @@ subroutine INIT_load(defs,en,q,k,X,Xw,Dip) call it(defs,'MaxGvecs','[INI] Max number of G-vectors planned to use',ng_closed,unit=G_unit,verb_level=V_RL) if (ng_closed Date: Wed, 29 Oct 2025 16:59:17 +0100 Subject: [PATCH 1243/1367] Fixed another bug introduced via a previous fix --- src/wf_and_fft/WF_phase_matrices.F | 10 +++++++--- src/wf_and_fft/WF_symm_kpoint_g.F | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 71d5464d7e..4bab8fa51f 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -25,7 +25,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use D_lattice, ONLY:nsym,i_time_rev,sop_tab,spin_sop use electrons, ONLY:levels,n_max_deg use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map - use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,WF_copy,wf_nc_k + use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,wf_ng,WF_copy,wf_nc_k use stderr, ONLY:intc use electrons, ONLY:n_spinor,n_sp_pol use wrapper, ONLY:Vstar_dot_V @@ -90,6 +90,10 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) iGp=2*maxval(Xk%g_table) ng_tmp=eval_G_minus_G(wf_ng_1st_BZ,iGp) ! + ! Here I need to set wf_ng to a larger value, to allocate WFs + ! Of a size large enough to accomodate all possibile g-vectors + wf_ng=maxval(G_m_G) + ! nb=blim(2)-blim(1)+1 ! !call PARALLEL_WF_distribute(K_index=PAR_IND_WF_k,B_index=PAR_IND_WF_b,CLEAN_UP=.TRUE.) @@ -229,7 +233,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) i_wf_c=WF_k%index(ibc,ik,i_sp_pol) ! WF_phases(iby_phase,ibc_phase,i_grp,isloop,istark)= & - & Vstar_dot_V(wf_ng_1st_BZ*n_spinor,WF_Rk_y%c(:,:,i_wf_y),WF_Rk_c%c(:,:,i_wf_c)) + & Vstar_dot_V(wf_ng*n_spinor,WF_Rk_y%c(:,:,i_wf_y),WF_Rk_c%c(:,:,i_wf_c)) ! enddo charac(i_grp,isloop)=charac(i_grp,isloop)+WF_phases(iby_phase,iby_phase,i_grp,isloop,istark) @@ -244,7 +248,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) ! !if (.not.PAR_IND_B_mat_ordered%element_1D( UP_matrix_index(ib,ibp)-1 )) cycle ! !if (.not.PAR_IND_B_mat%element_1D( B_mat_index(ib,ibp,(/1,En%blim/))-1 )) cycle ! WF_phases(ibk,ibp,s_count,k_count,i_sp_pol)= & - ! & Vstar_dot_V(wf_ng_1st_BZ*n_spinor,WF_k%c(:,:,i_wf_k),WF_p_tmp%c(:,:,i_wf_p)) + ! & Vstar_dot_V(wf_ng*n_spinor,WF_k%c(:,:,i_wf_k),WF_p_tmp%c(:,:,i_wf_p)) ! enddo ! ibp !enddo ! ibk ! diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 8f928afab9..7de111fd9f 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -15,7 +15,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) use pars, ONLY:SP,cZERO use electrons, ONLY:n_spinor use wave_func, ONLY:WAVEs,wf_nc_k,DEV_VAR(wf_igk) - use wave_func, ONLY:wf_ng,wf_ng_1st_BZ + use wave_func, ONLY:wf_ng use vec_operate, ONLY:c2a use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(G_m_G),& & k_pt,rl_sop,g_vec @@ -32,7 +32,7 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) ! ! Work space ! - complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng_1st_BZ,n_spinor) + complex(SP) DEV_ATTR :: WF_k_tmp(wf_ng,n_spinor) complex(SP), pointer DEV_ATTR :: WF_p(:,:) complex(SP) DEV_ATTR :: ssop_loc(2,2) integer DEV_ATTR :: wf_tab_loc(wf_ng,2) From 5b57e317092c777bd470a8a31f7a6893d51f4227 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 30 Oct 2025 08:58:32 +0100 Subject: [PATCH 1244/1367] Version 5.3.0, Revision 25845, Hash e768ad906 MODIFIED * include/version/version.m4 lib/archive/package.list lib/netcdf/Makefile.loc Bugs: - Additions: - Changes: -NetCDF and NetCDFF updated to a new version to be compatible with new HDF5 Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- lib/archive/package.list | 4 ++-- lib/netcdf/Makefile.loc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 41bda90a43..2a4d2a7ce3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25842 h.1a75870310, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25845 h.e768ad906, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25842" -SHASH="1a75870310" +SREVISION="25845" +SHASH="e768ad906" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/lib/archive/package.list b/lib/archive/package.list index 48a7d191ac..96b916a747 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -29,8 +29,8 @@ keep_hdf5=no # version_Ldiago=0.5.0 version_iotk=y1.2.2 -version_netcdf=4.9.0 -version_netcdff=4.6.0 +version_netcdf=4.9.3 +version_netcdff=4.6.2 version_hdf5=1.14.6 version_etsf_io=1.0.4 version_libxc=5.2.3 diff --git a/lib/netcdf/Makefile.loc b/lib/netcdf/Makefile.loc index 0818370133..99be560019 100644 --- a/lib/netcdf/Makefile.loc +++ b/lib/netcdf/Makefile.loc @@ -19,7 +19,7 @@ include ../config/external_libs_defs.mk # Configure flags # CONFFLAGS=--prefix=$(LIBPATH) --libdir=$(LIBPATH)/lib \ - --without-pic --enable-static --disable-shared --disable-dap $(netcdf_opt) \ + --without-pic --enable-static --disable-shared --disable-dap $(netcdf_opt) --disable-libxml2 \ CC="$(cc)" \ CPP="$(cpp)" \ CFLAGS="$(cflags)" \ From 7cb974d18d08e6b1d225710d5e1faefee347dd2e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 30 Oct 2025 10:06:43 +0100 Subject: [PATCH 1245/1367] fft_setup imported from branch fix-cutoff --- src/wf_and_fft/fft_setup.F | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index 353b896dcf..6ddac4bf15 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -11,12 +11,13 @@ #include ! ! -subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) +subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) ! use pars, ONLY:SP,pi use D_lattice, ONLY:a,nsym,dl_sop,sop_inv,i_time_rev,alat - use R_lattice, ONLY:b,g_vec,ng_vec + use R_lattice, ONLY:b,g_vec,ng_closed use matrix_operate, ONLY:m3inv + use wave_func, ONLY:wf_ng use FFT_m, ONLY:fft_dim,fft_size,fft_rot_r,fft_rot_r_inv,& & fft_norm,fft_g_table,fft_multiplier,modx,& & DEV_VAR(fft_g_table),DEV_VAR(fft_rot_r),DEV_VAR(fft_rot_r_inv) @@ -24,7 +25,6 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) #if defined _FFTQE use fft_base, ONLY:dffts #endif - use wave_func, ONLY:wf_ng use timing_m, ONLY:timing use gpu_m, ONLY:have_gpu,gpu_devsync use devxlib, ONLY:devxlib_memcpy_h2d,devxlib_memcpy_d2h,devxlib_memset_d @@ -37,15 +37,18 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) ! implicit none ! - integer :: iG_max,iGo_max,ierr + integer :: iG_max_in,iGo_max,ierr logical :: ONLY_SIZE + ! + ! External function + ! #if defined _FFTQE integer, external :: fft_setmap #endif ! ! Work Space ! - integer :: i1,i2,i3,i4,iv(3),ln(3),is,space_inv(3,3) + integer :: i1,i2,i3,i4,iG_max,iv(3),ln(3),is,space_inv(3,3) real(SP) :: v1(3),M1(3,3),M2(3,3),mat(3,3),scal(3) real(SP), allocatable :: g_vec_rot(:,:) real(SP), allocatable DEV_ATTR :: g_vec_rot_d(:,:) @@ -70,6 +73,12 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) YAMBO_ALLOC_MOLD(g_vec_rot,g_vec) g_vec_rot=transpose(matmul(mat,transpose(g_vec))) ! + iG_max=iG_max_in + ! To check. Do I want a default up to ng_closed? + !if (iG_max<=0) iG_max=ng_closed + iG_max=max(iG_max,wf_ng) + ! + ! #ifdef _GPU YAMBO_ALLOC_GPU_SOURCE(DEV_VAR(g_vec_rot),g_vec_rot) #endif @@ -79,11 +88,11 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) YAMBO_FREE_GPU(DEV_VAR(fft_g_table)) YAMBO_FREE(fft_g_table) ! - YAMBO_ALLOC(fft_g_table,(max(iG_max,wf_ng),iGo_max)) + YAMBO_ALLOC(fft_g_table,(iG_max,iGo_max)) fft_g_table=0 ! if (have_gpu) then - YAMBO_ALLOC_GPU(DEV_VAR(fft_g_table),(max(iG_max,wf_ng),iGo_max)) + YAMBO_ALLOC_GPU(DEV_VAR(fft_g_table),(iG_max,iGo_max)) call devxlib_memset_d(DEV_VAR(fft_g_table),val=0) endif ! @@ -109,7 +118,7 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) fft_dim_1 = fft_dim(1) fft_dim_2 = fft_dim(2) fft_dim_3 = fft_dim(3) - i1_max = min(max(iG_max,wf_ng),ng_vec) + i1_max = min(iG_max,ng_closed) ! YAMBO_ALLOC(ivec_GmG,(iGo_max,i1_max,3)) YAMBO_ALLOC_GPU(DEV_VAR(ivec_GmG),(iGo_max,i1_max,3)) @@ -128,7 +137,7 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) iv_2 = nint(DEV_VAR(g_vec_rot)(i1,2) - DEV_VAR(g_vec_rot)(i2,2)) iv_3 = nint(DEV_VAR(g_vec_rot)(i1,3) - DEV_VAR(g_vec_rot)(i2,3)) ! - if (i2==1.or.i1<=iG_max) then + if (i2==1.or.i1<=iG_max_in) then DEV_VAR(ivec_GmG)(i2,i1,1)=iv_1 DEV_VAR(ivec_GmG)(i2,i1,2)=iv_2 DEV_VAR(ivec_GmG)(i2,i1,3)=iv_3 @@ -172,13 +181,13 @@ subroutine fft_setup(iG_max,iGo_max,ONLY_SIZE) YAMBO_FREE(ivec_GmG) ! #else - do i1=1,min(max(iG_max,wf_ng),ng_vec) + do i1=1,min(iG_max,ng_closed) do i2=1,iGo_max ! v1=(g_vec_rot(i1,:)-g_vec_rot(i2,:)) iv=nint(v1) ! - if (i2==1.or.i1<=iG_max) forall(i3=1:3) ln(i3)=max(ln(i3),iv(i3)) + if (i2==1.or.i1<=iG_max_in) forall(i3=1:3) ln(i3)=max(ln(i3),iv(i3)) # if defined _FFTQE if (i4>0.and..not.ONLY_SIZE) fft_g_table(i1,i2)=fft_setmap(iv,dffts) # else From b21f3d301eaf1402fbcdce2aa715ffbbfbec9b21 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 30 Oct 2025 10:19:23 +0100 Subject: [PATCH 1246/1367] Lower bound for fft_size is connected to wf_ng_closed, as it was in the past when wf_ng was automatically closed --- src/wf_and_fft/fft_setup.F | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index 6ddac4bf15..136dc960f3 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -48,7 +48,7 @@ subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) ! ! Work Space ! - integer :: i1,i2,i3,i4,iG_max,iv(3),ln(3),is,space_inv(3,3) + integer :: i1,i2,i3,i4,iG_max,iv(3),ln(3),is,space_inv(3,3),wf_ng_closed real(SP) :: v1(3),M1(3,3),M2(3,3),mat(3,3),scal(3) real(SP), allocatable :: g_vec_rot(:,:) real(SP), allocatable DEV_ATTR :: g_vec_rot_d(:,:) @@ -74,9 +74,15 @@ subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) g_vec_rot=transpose(matmul(mat,transpose(g_vec))) ! iG_max=iG_max_in - ! To check. Do I want a default up to ng_closed? - !if (iG_max<=0) iG_max=ng_closed - iG_max=max(iG_max,wf_ng) + ! 2025/10730: + ! I set a lower bound to wf_ng_closed which is defined here + ! We should discuss why we have a lower bound, and if we really need it + wf_ng_closed=wf_ng + call PARSER_close_G(wf_ng_closed,'tRL') + if (iG_max Date: Thu, 30 Oct 2025 22:03:31 +0100 Subject: [PATCH 1247/1367] Fixed space in AUTHORS file --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 8fc7a96d11..a5dfc102ae 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,7 +22,7 @@ ACTIVE DEVELOPERS * Riccardo Reho (RR) (2022) * Giacomo Sesti (GS) (2022) * Nalabothula Muralidhar (NM) (2024) - * Torsten Geirsson (TG) (2025) + * Torsten Geirsson (TG) (2025) FORMER DEVELOPERS ================== From bc88ce5e51ecd2876c7a775e2d154c618afe47a9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 30 Oct 2025 22:06:51 +0100 Subject: [PATCH 1248/1367] Fixed indentation --- src/bse/K_Haydock.F | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index a35755db97..91507db5e1 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -242,13 +242,13 @@ subroutine K_Haydock(iq,W,OBS,Xk) do i_g=1,BS_nT_grps if (.not.PAR_IND_T_groups%element_1D(i_g)) cycle do i_ColFG=1,BS_nkFGbz_in_Tgrp(i_g) - if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP - if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) - if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) - if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_orb(1,:,1) - if (trim(OBS)=="mespin") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_spin(1,:,1) - if (trim(OBS)=="meorb") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_orb(1,:,1) - if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) + if (trim(OBS)=="jdos") V0(i_g)%fragment(:,i_ColFG) = 1._SP + if (trim(OBS)=="optics") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(1,:,1) + if (trim(OBS)=="kerr") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_opt(2,:,1) + if (trim(OBS)=="dichroism") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_orb(1,:,1) + if (trim(OBS)=="mespin") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_spin(1,:,1) + if (trim(OBS)=="meorb") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_orb(1,:,1) + if (trim(OBS)=="magnons") V0(i_g)%fragment(:,i_ColFG) = BS_T_grp(i_g)%dipoles_mag(1,:,1) V0(i_g)%fragment(:,i_ColFG) = V0(i_g)%fragment(:,i_ColFG)*sqrt(cmplx(BS_T_grp(i_g)%f_RES,kind=SP)) enddo ! From 28aefe879017403ee222ca54278c7d3e73b29219 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 30 Oct 2025 22:14:22 +0100 Subject: [PATCH 1249/1367] Fixed some spacing --- src/bse/K_IP.F | 10 +++++----- src/bse/K_dipoles.F | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bse/K_IP.F b/src/bse/K_IP.F index 9fd8077e16..6884cf8efb 100644 --- a/src/bse/K_IP.F +++ b/src/bse/K_IP.F @@ -248,8 +248,8 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) res_magn=res_magn*f_eh*Z_eh if (l_BS_esort.and.i_res_ares==1) then call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(1),vtmpC) - if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) - endif + if(n_spinor==2) call K_IP_sort("add",i_sort,nVAR,Indexes,vtmpI,res_magn(2),vtmpC) + endif endif ! if (l_BS_mespin) then @@ -335,9 +335,9 @@ subroutine K_IP(iq,Ken,Xk,Dip,W_bss) endif ! if (l_BS_photolum) then - ! - ! I^PL = L< - ! + ! + ! I^PL = L< + ! PL(:,3)=PL(:,3) + PL_prefactor*res_PL(1)*aimag(-1._SP/(W_bss%p(:)-E_plus_W(i_pert_SOC)))/pi if (BS_K_anti_resonant.and.l_BS_ares_from_res) then PL(:,3)=PL(:,3) + PL_prefactor*res_PL(2)*aimag(-1._SP/(W_bss%p(:)+conjg(E_plus_W(i_pert_SOC))))/pi diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 99cf575f43..b563076982 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -179,7 +179,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) if (BS_K_coupling.and.l_BS_ares_from_res.and.iq==1) then ! In the coulping case at q=1 when there are 2 blocks per group ! See also src/bse/K_blocks.F and K_components_folded_in_serial_arrays.F - ! Possibly to be extended also to i_G_shift==1 + ! Possibly to be extended also to i_G_shift==1 BS_T_grp(i_T_g)%dipoles_opt(:BS_dip_size,i_T,2)=DIP_projected(:BS_dip_size) endif ! From 5d2ad91c91a9a8db80758085598e1e964f2f6846 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 31 Oct 2025 15:04:42 +0100 Subject: [PATCH 1250/1367] Added check on field on file time step --- src/modules/SET_defaults.F | 5 ++- src/modules/mod_fields.F | 1 + src/real_time_control/NL_project.dep | 1 + src/real_time_control/RT_field_from_file.F | 41 +++++++++++++++------- src/real_time_control/RT_small_a.F | 11 ++---- ypp/real_time/RT_fields.F | 8 ++--- 6 files changed, 40 insertions(+), 27 deletions(-) diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index f598d4801f..5424f6fafc 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -101,7 +101,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & NE_time_step_update_last_point,NE_time_step_update_jump,NE_time_step_update_jump_INPUT, & & NE_initial_time_step_update,NE_step_update_treshold use fields, ONLY:Efield,Efield_reset,n_ext_fields_max,n_ext_fields,A_vecpot_reset, & -& A_tot,A_ind,A_ext,field_from_file_fname,field_from_file_steps +& A_tot,A_ind,A_ext,field_from_file_fname,field_from_file_steps, & +& field_from_file_dt use plasma, ONLY:PLASMA_redux_percent #endif #if defined _NL @@ -617,6 +618,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! field_from_file_fname="" field_from_file_steps=0 + field_from_file_dt=0._SP n_ext_fields=0 do i1=1,n_ext_fields_max call Efield_reset(Efield(i1)) @@ -735,6 +737,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) ! field_from_file_fname="" field_from_file_steps=0 + field_from_file_dt=0._SP do i1=1,n_ext_fields_max call Efield_reset(Efield(i1)) Efield(i1)%t_initial=RT_step diff --git a/src/modules/mod_fields.F b/src/modules/mod_fields.F index ee82bcefbc..11f4f99ab3 100644 --- a/src/modules/mod_fields.F +++ b/src/modules/mod_fields.F @@ -55,6 +55,7 @@ module fields ! real(SP), allocatable :: field_from_file(:,:,:) character(schlen) :: field_from_file_fname(n_ext_fields_max) + real(SP) :: field_from_file_dt integer :: field_from_file_steps ! ! Vector potential diff --git a/src/real_time_control/NL_project.dep b/src/real_time_control/NL_project.dep index bbbad1cf24..2a2d84986b 100644 --- a/src/real_time_control/NL_project.dep +++ b/src/real_time_control/NL_project.dep @@ -1,2 +1,3 @@ RT_databases_IO.o + RT_small_a.o diff --git a/src/real_time_control/RT_field_from_file.F b/src/real_time_control/RT_field_from_file.F index ae4719df4a..47cc862567 100644 --- a/src/real_time_control/RT_field_from_file.F +++ b/src/real_time_control/RT_field_from_file.F @@ -23,27 +23,35 @@ ! subroutine RT_load_field_from_file_init(filename1,filename2) ! + use pars, ONLY:SP use com, ONLY:com_path - use fields, ONLY:field_from_file_steps + use fields, ONLY:field_from_file_steps,field_from_file_dt + use real_time, ONLY:RT_step ! implicit none ! character(*), intent(in) :: filename1,filename2 ! - integer :: n_time_steps1,n_time_steps2 + integer :: n_time_steps1,n_time_steps2,ndt1 + real(SP):: dt1,dt2 ! - call warning(" Loading Field from file"//trim(filename1)//" [experimental]") + call warning(" Loading Field from file: "//trim(filename1)//" [experimental]") ! open(unit=99,file=trim(filename1)) - read(99,*) n_time_steps1 + read(99,*) n_time_steps1,dt1 close(99) if (filename2/="") then open(unit=99,file=trim(filename2)) - read(99,*) n_time_steps2 + read(99,*) n_time_steps2,dt2 close(99) if(n_time_steps1/=n_time_steps2) call error(" Field from file, polarizations with different dimensions") + if(abs(dt1-dt2)/(dt1+dt2)>1.E-4) call error(" Field from file, polarizations with different time step") endif field_from_file_steps=max(field_from_file_steps,n_time_steps1) + field_from_file_dt=max(field_from_file_dt,dt1) + ! + dt1=RT_step/field_from_file_dt + if (abs(dt1-real(nint(dt1),SP))>1.E-5) call error(" Field time step non consistent with time step") ! end subroutine RT_load_field_from_file_init ! @@ -53,7 +61,8 @@ subroutine RT_load_field_from_file(filename1,filename2,i_field) use real_time, ONLY:RT_step use com, ONLY:com_path use pars, ONLY:n_ext_fields_max,SP - use fields, ONLY:Efield,field_from_file,field_from_file_fname,field_from_file_steps + use fields, ONLY:Efield,field_from_file,field_from_file_fname, & + & field_from_file_steps,field_from_file_dt ! implicit none ! @@ -61,7 +70,7 @@ subroutine RT_load_field_from_file(filename1,filename2,i_field) integer, intent(in) :: i_field ! integer :: i1,i_field_file,n_time_steps1,n_time_steps2,idata,i_pol1_data,i_pol2_data - real(SP) :: tmp_data(4,2) + real(SP) :: tmp_data(4,2),dt1,dt2 ! i_field_file=-1 do i1=1,n_ext_fields_max @@ -78,10 +87,10 @@ subroutine RT_load_field_from_file(filename1,filename2,i_field) field_from_file=0._SP endif open(unit= 99,file=trim(filename1)) - read( 99,*) n_time_steps1 + read( 99,*) n_time_steps1,dt1 if (filename2/="") then open(unit=100,file=trim(filename2)) - read(100,*) n_time_steps2 + read(100,*) n_time_steps2,dt2 endif do i1=1,n_time_steps1 read( 99,*) tmp_data(:,1) @@ -97,17 +106,20 @@ subroutine RT_load_field_from_file(filename1,filename2,i_field) close( 99) if (filename2/="") close(100) ! - Efield(i_field)%t_final_indx=(n_time_steps1-8)/2+Efield(i_field)%t_initial_indx-1 + i1=nint(RT_step/field_from_file_dt) + Efield(i_field)%t_final_indx=(n_time_steps1/i1-4)+Efield(i_field)%t_initial_indx-1 Efield(i_field)%t_final=RT_step*(Efield(i_field)%t_final_indx-1) ! end subroutine RT_load_field_from_file ! ! subroutine RT_print_field_to_file_init(i_field) + ! + ! I think this subroutine is not used ! use stderr, ONLY:intc use com, ONLY:com_path - use pars, ONLY:schlen + use pars, ONLY:schlen,SP use fields, ONLY:Efield ! implicit none @@ -115,6 +127,7 @@ subroutine RT_print_field_to_file_init(i_field) integer, intent(in) :: i_field ! integer :: n_time_steps + real(SP):: dt character(schlen) :: filename1,filename2 ! filename1="RT_EXTFIELD"//trim(intc(i_field))//"_P1.time" @@ -122,13 +135,15 @@ subroutine RT_print_field_to_file_init(i_field) if ( trim(Efield(i_field)%ef_pol) == "circular" ) filename2="RT_EXTFIELD"//trim(intc(i_field))//"_P2.time" ! n_time_steps=(Efield(i_field)%t_final_indx-Efield(i_field)%t_initial_indx+1)*2+8 + ! To be fixed ! + dt=0._SP ! open(unit=100+i_field,file=trim(com_path)//"/"//trim(filename1)) - write(100+i_field,*) n_time_steps + write(100+i_field,*) n_time_steps,dt ! if (filename2/="") then open(unit=200+i_field,file=trim(com_path)//"/"//trim(filename2)) - write(200+i_field,*) n_time_steps + write(200+i_field,*) n_time_steps,dt endif ! end subroutine RT_print_field_to_file_init diff --git a/src/real_time_control/RT_small_a.F b/src/real_time_control/RT_small_a.F index 8acd0eaf8d..c2f761ca78 100644 --- a/src/real_time_control/RT_small_a.F +++ b/src/real_time_control/RT_small_a.F @@ -57,7 +57,7 @@ function small_a(T,dt,E_field,order,envelop_only) use stderr, ONLY:STRING_split use wrapper, ONLY:FADEVA use functions, ONLY:theta_function - use fields, ONLY:ext_field,get_field_file_index,& + use fields, ONLY:ext_field,get_field_file_index,field_from_file_dt,& & field_from_file,n_fields_defs_max ! implicit none @@ -199,14 +199,7 @@ function small_a(T,dt,E_field,order,envelop_only) ! select case( trim(field_defs(1)) ) case('FROM_FILE') -#if defined _NL - ! External field from file is compatible only with single-step integrator - ! like INVINT. For two-steps integrators CRANKNIC,RK2 etc. it has to be - ! interpolated (TO BE FONE) - i_T=nint((T-T_0)/dT)+1 -#else - i_T=nint((T-T_0)/(dT/2._SP))+1 -#endif + i_T=nint((T-T_0)/field_from_file_dt)+1 if (i_T<=0.or.envelop_only_) then f_now=0 else diff --git a/ypp/real_time/RT_fields.F b/ypp/real_time/RT_fields.F index 691c8f75ee..e4abf2f4c0 100644 --- a/ypp/real_time/RT_fields.F +++ b/ypp/real_time/RT_fields.F @@ -173,8 +173,8 @@ subroutine RT_print_Elfield(i_field,mode,Elfield) ! if (index(mode,"time")>0) then ! - write(100+i_field,*) RT_conf%T_n_steps - write(200+i_field,*) RT_conf%T_n_steps + write(100+i_field,*) RT_conf%T_n_steps,RT_conf%delta_t + write(200+i_field,*) RT_conf%T_n_steps,RT_conf%delta_t ! do i_t=1,RT_conf%T_n_steps Field_t=RT_conf%T_range(1)+(i_t-1)*RT_conf%delta_t !-Efield%t_initial @@ -193,8 +193,8 @@ subroutine RT_print_Elfield(i_field,mode,Elfield) ! else if (index(mode,"freq")>0) then ! - write(100+i_field,*) RT_conf%W_n_steps - write(200+i_field,*) RT_conf%W_n_steps + write(100+i_field,*) RT_conf%W_n_steps,RT_conf%delta_W + write(200+i_field,*) RT_conf%W_n_steps,RT_conf%delta_W ! do i_w=1,RT_conf%W_n_steps Field_w=RT_conf%X_w_range(1)+(i_w-1)*RT_conf%delta_W From 28d5351cb829b68c28a1ee12a1e52b289db0c3d8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 31 Oct 2025 18:37:32 +0100 Subject: [PATCH 1251/1367] Version 5.3.0, Revision 25857, Hash 5d2ad91c9 MODIFIED * include/version/version.m4 nloptics/NL_initialize.F real_time_control/NL_project.dep Bugs: - Additions: -Added check of external field from file vs all integrators -Added error message for external field from file in non-linear Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 21 +++++++++++++++++---- src/real_time_control/NL_project.dep | 1 - 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 2a4d2a7ce3..ec9fad96ca 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25845 h.e768ad906, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25857 h.5d2ad91c9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25845" -SHASH="e768ad906" +SREVISION="25857" +SHASH="5d2ad91c9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index b6a6de6cd9..e305b5aa4b 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -28,7 +28,7 @@ subroutine NL_initialize(E,k) use IO_m, ONLY:io_GF use stderr, ONLY:STRING_split use X_m, ONLY:global_gauge - use fields, ONLY:Efield,Efield_strength,n_ext_fields_max,EtoT + use fields, ONLY:Efield,Efield_strength,n_ext_fields_max,EtoT,field_from_file_dt use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now @@ -52,7 +52,7 @@ subroutine NL_initialize(E,k) ! Working space ! real(SP) :: Time,W_0,T_0,sigma,E_dot_rot_axis - integer :: i1,n_active_fields + integer :: i1,n_active_fields,Integr_steps logical :: l_velocity_gauge_tmp real(SP) :: Sampling_Time logical :: l_no_compress_COLL @@ -133,23 +133,32 @@ subroutine NL_initialize(E,k) select case (trim(Integrator_name)) case('EULER') Integrator=EULER + Integr_steps=1 case('EULEREXP') Integrator=EULEREXP + Integr_steps=1 case('RK2') Integrator=RK2 + Integr_steps=2 case('RK4') Integrator=RK4 + Integr_steps=4 case('RK2EXP') Integrator=RK2EXP + Integr_steps=2 case('RK4EXP') Integrator=RK4EXP + Integr_steps=4 case('HEUN') Integrator=HEUN + Integr_steps=4 call error("HEUN integrator not yet available") case('INVINT') Integrator=INVINT + Integr_steps=1 case('CRANKNIC') Integrator=CRANK_NICOLSON + Integr_steps=2 case default call error("Unknow integrator") end select @@ -175,8 +184,8 @@ subroutine NL_initialize(E,k) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle call RT_load_field_from_file_init(field_defs(2),field_defs(3)) - if(Integrator/=INVINT) then - call error("External field from file compatible only with INVINT integrator!") + if(nint(field_from_file_dt/RT_step)/=Integr_steps) then + call error("Integrator not compatible with external field from file, change time-step!") endif enddo ! @@ -240,6 +249,10 @@ subroutine NL_initialize(E,k) if(.not.l_pump_and_probe.and.Efield(1)%ef_name/='SOFTSIN'.and.Efield(1)%ef_name/='SIN') & call warning(' Non-linear optics properties can be obtained with SOFTSIN/SIN fields only') ! + call STRING_split(Efield(1)%ef_name,field_defs) + if( field_defs(1)=='FROM_FILE'.and.l_pump_and_probe) & + & call error("Field from file only work in pump and probe") + if(l_pump_and_probe.and.l_velocity_IPA) then ! ! Fast parallelization not compatible with RT-IO diff --git a/src/real_time_control/NL_project.dep b/src/real_time_control/NL_project.dep index 2a2d84986b..bbbad1cf24 100644 --- a/src/real_time_control/NL_project.dep +++ b/src/real_time_control/NL_project.dep @@ -1,3 +1,2 @@ RT_databases_IO.o - RT_small_a.o From 61ab53cec511773c46e1f3c484695c85897aac41 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 31 Oct 2025 21:06:06 +0100 Subject: [PATCH 1252/1367] Check on consistency between integrator nstep and time step moved inside RT_field_from_file and fixed using mod function. Also check is not performed also in yambo_rt Note on RK4. The check for RK4 is that the time step is a multiple of dt/4 However RK4 uses dt/2, dt/3. Accordingly, one should check that dt/6 is possible --- src/nloptics/NL_initialize.F | 6 ++---- src/real_time_control/RT_field_from_file.F | 10 ++++++++-- src/real_time_initialize/RT_initialize.F | 4 ++-- ypp/real_time/RT_X_response.F | 4 ++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index e305b5aa4b..8b20535c27 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -28,7 +28,7 @@ subroutine NL_initialize(E,k) use IO_m, ONLY:io_GF use stderr, ONLY:STRING_split use X_m, ONLY:global_gauge - use fields, ONLY:Efield,Efield_strength,n_ext_fields_max,EtoT,field_from_file_dt + use fields, ONLY:Efield,Efield_strength,n_ext_fields_max,EtoT use real_time, ONLY:RT_step,NE_steps,NE_tot_time,eval_HARTREE,eval_DFT,l_RT_induced_field,l_NE_with_fields, & & Phase_LifeTime,Integrator_name,RT_dyn_step,NE_i_time,RT_potential,RAD_LifeTime,& & l_velocity_gauge_corr,l_velocity_gauge_diam,G_MEM_steps,RT_nk,i_MEM_now @@ -183,9 +183,7 @@ subroutine NL_initialize(E,k) Efield(i1)%ef_name=trim(Efield(i1)%ef_name) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle - call RT_load_field_from_file_init(field_defs(2),field_defs(3)) - if(nint(field_from_file_dt/RT_step)/=Integr_steps) then - call error("Integrator not compatible with external field from file, change time-step!") + call RT_load_field_from_file_init(field_defs(2),field_defs(3),Integr_steps) endif enddo ! diff --git a/src/real_time_control/RT_field_from_file.F b/src/real_time_control/RT_field_from_file.F index 47cc862567..d256eac894 100644 --- a/src/real_time_control/RT_field_from_file.F +++ b/src/real_time_control/RT_field_from_file.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine RT_load_field_from_file_init(filename1,filename2) +subroutine RT_load_field_from_file_init(filename1,filename2,Integr_nsteps) ! use pars, ONLY:SP use com, ONLY:com_path @@ -31,6 +31,7 @@ subroutine RT_load_field_from_file_init(filename1,filename2) implicit none ! character(*), intent(in) :: filename1,filename2 + integer, intent(in) :: Integr_nsteps ! integer :: n_time_steps1,n_time_steps2,ndt1 real(SP):: dt1,dt2 @@ -48,10 +49,15 @@ subroutine RT_load_field_from_file_init(filename1,filename2) if(abs(dt1-dt2)/(dt1+dt2)>1.E-4) call error(" Field from file, polarizations with different time step") endif field_from_file_steps=max(field_from_file_steps,n_time_steps1) - field_from_file_dt=max(field_from_file_dt,dt1) + if (field_from_file_dt> 0._SP) then + if(abs(field_from_file_dt-dt1)/(field_from_file_dt+dt1)>1.E-5) & + & call error(" Multiple fields from file must have the same time step") + endif + if (field_from_file_dt==0._SP) field_from_file_dt=dt1 ! dt1=RT_step/field_from_file_dt if (abs(dt1-real(nint(dt1),SP))>1.E-5) call error(" Field time step non consistent with time step") + if (mod(nint(dt1),Integr_nsteps)/=0) call error("Field time step not consistent with integrator") ! end subroutine RT_load_field_from_file_init ! diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 32c03a1d0a..0c3211b558 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -40,7 +40,7 @@ subroutine RT_initialize(E,k,q,Dip) & l_RT_impose_N_dN,Integrator_name,l_RT_impose_E,DbGd_EE_percent, & & l_RT_update_Energies,eval_HARTREE,eval_DFT,l_NE_dynamics, & & NE_time_step_update_jump,NE_initial_time_step_update,NE_i_time, & -& RAD_magnification,NE_step_update_treshold, & +& RAD_magnification,NE_step_update_treshold,Integrator_nsteps, & & NE_time_step_update_jump_INPUT,NE_initial_time_step_update, & & RT_is_dynamically_dephased,RT_is_statically_dephased,RT_MAX_step, & & eval_energy,eval_entropy,l_RT_is_WFfree,l_update_SOC, & @@ -236,7 +236,7 @@ subroutine RT_initialize(E,k,q,Dip) Efield(i1)%ef_name=trim(Efield(i1)%ef_name) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle - call RT_load_field_from_file_init(field_defs(2),field_defs(3)) + call RT_load_field_from_file_init(field_defs(2),field_defs(3),Integrator_nsteps) enddo ! NE_i_last_field=0 diff --git a/ypp/real_time/RT_X_response.F b/ypp/real_time/RT_X_response.F index 26bec762d7..fb9a78ed0a 100644 --- a/ypp/real_time/RT_X_response.F +++ b/ypp/real_time/RT_X_response.F @@ -42,8 +42,8 @@ subroutine RT_X_response(en,k,q) call STRING_split(Efield(1)%ef_name,probe_defs,n_non_empty_strings=Ndefs) ! if ( trim(probe_defs(1))=='FROM_FILE') then - call RT_load_field_from_file_init(trim(probe_defs(2))) - call RT_load_field_from_file(trim(probe_defs(2)),1) + call RT_load_field_from_file_init(probe_defs(2),probe_defs(3),1) + call RT_load_field_from_file(probe_defs(2),probe_defs(3),1) endif ! l_RT_LRR_real_field= all( (/ N_pumps<=1, N_probes==1, X_order==1/) ) From 8dcdf84de36c00963aa35cd98c8ae8d59298b935 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 31 Oct 2025 22:25:26 +0100 Subject: [PATCH 1253/1367] Fixed compatibility check for RK4 and loading of field from file --- src/modules/mod_real_time.F | 1 + src/nloptics/NL_initialize.F | 7 ++++--- src/real_time_control/RT_field_from_file.F | 6 +++--- src/real_time_initialize/RT_initialize.F | 6 +++--- src/real_time_propagation/RT_Integrator_init.F | 7 ++++++- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/modules/mod_real_time.F b/src/modules/mod_real_time.F index 58ca905920..060b18f247 100644 --- a/src/modules/mod_real_time.F +++ b/src/modules/mod_real_time.F @@ -231,6 +231,7 @@ module real_time ! integer :: Integrator_step integer :: Integrator_nsteps + integer :: Integrator_nfrac integer :: Integrator_exp_order ! real(SP) :: a_tableau(4) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 8b20535c27..d6d13ec9ad 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -142,16 +142,17 @@ subroutine NL_initialize(E,k) Integr_steps=2 case('RK4') Integrator=RK4 - Integr_steps=4 + ! RT4 uses dt/2 and dt/3. So I need a factor 6 + Integr_steps=6 case('RK2EXP') Integrator=RK2EXP Integr_steps=2 case('RK4EXP') Integrator=RK4EXP - Integr_steps=4 + Integr_steps=6 case('HEUN') Integrator=HEUN - Integr_steps=4 + Integr_steps=0 call error("HEUN integrator not yet available") case('INVINT') Integrator=INVINT diff --git a/src/real_time_control/RT_field_from_file.F b/src/real_time_control/RT_field_from_file.F index d256eac894..d5a83a9bcc 100644 --- a/src/real_time_control/RT_field_from_file.F +++ b/src/real_time_control/RT_field_from_file.F @@ -21,7 +21,7 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, ! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. ! -subroutine RT_load_field_from_file_init(filename1,filename2,Integr_nsteps) +subroutine RT_load_field_from_file_init(filename1,filename2,Integr_nfrac) ! use pars, ONLY:SP use com, ONLY:com_path @@ -31,7 +31,7 @@ subroutine RT_load_field_from_file_init(filename1,filename2,Integr_nsteps) implicit none ! character(*), intent(in) :: filename1,filename2 - integer, intent(in) :: Integr_nsteps + integer, intent(in) :: Integr_nfrac ! integer :: n_time_steps1,n_time_steps2,ndt1 real(SP):: dt1,dt2 @@ -57,7 +57,7 @@ subroutine RT_load_field_from_file_init(filename1,filename2,Integr_nsteps) ! dt1=RT_step/field_from_file_dt if (abs(dt1-real(nint(dt1),SP))>1.E-5) call error(" Field time step non consistent with time step") - if (mod(nint(dt1),Integr_nsteps)/=0) call error("Field time step not consistent with integrator") + if (mod(nint(dt1),Integr_nfrac)/=0) call error("Field time step not consistent with integrator") ! end subroutine RT_load_field_from_file_init ! diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 0c3211b558..4022b9e040 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -40,8 +40,8 @@ subroutine RT_initialize(E,k,q,Dip) & l_RT_impose_N_dN,Integrator_name,l_RT_impose_E,DbGd_EE_percent, & & l_RT_update_Energies,eval_HARTREE,eval_DFT,l_NE_dynamics, & & NE_time_step_update_jump,NE_initial_time_step_update,NE_i_time, & -& RAD_magnification,NE_step_update_treshold,Integrator_nsteps, & -& NE_time_step_update_jump_INPUT,NE_initial_time_step_update, & +& RAD_magnification,NE_step_update_treshold,Integrator_nfrac, & +& NE_time_step_update_jump_INPUT,NE_initial_time_step_update, & & RT_is_dynamically_dephased,RT_is_statically_dephased,RT_MAX_step, & & eval_energy,eval_entropy,l_RT_is_WFfree,l_update_SOC, & & l_RT_eq_is_zero_temp,l_RT_include_eq_scatt, & @@ -236,7 +236,7 @@ subroutine RT_initialize(E,k,q,Dip) Efield(i1)%ef_name=trim(Efield(i1)%ef_name) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle - call RT_load_field_from_file_init(field_defs(2),field_defs(3),Integrator_nsteps) + call RT_load_field_from_file_init(field_defs(2),field_defs(3),Integrator_nfrac) enddo ! NE_i_last_field=0 diff --git a/src/real_time_propagation/RT_Integrator_init.F b/src/real_time_propagation/RT_Integrator_init.F index 09a7008f0f..deeadd0552 100644 --- a/src/real_time_propagation/RT_Integrator_init.F +++ b/src/real_time_propagation/RT_Integrator_init.F @@ -19,7 +19,8 @@ subroutine RT_Integrator_init() & l_RT_HEUN,l_RT_RK2,l_RT_RK4,l_RT_SIMPLE, & & Integrator_name,integrator_exp_order, & & a_tableau,b_tableau,c_tableau,RWA_table, & -& I1_matrix,Integrator_nsteps,RT_bands +& I1_matrix,Integrator_nsteps,RT_bands, & +& Integrator_nfrac use y_memory_alloc ! implicit none @@ -100,6 +101,7 @@ subroutine RT_Integrator_init() ! if (l_RT_SIMPLE) then Integrator_nsteps = 1 + Integrator_nfrac = 1 b_tableau(1) = 1._SP c_tableau(2) = 1._SP RWA_table(2) = 1._SP @@ -107,6 +109,7 @@ subroutine RT_Integrator_init() ! if (l_RT_RK2 ) then Integrator_nsteps = 2 + Integrator_nfrac = 2 c_tableau(2) = 1._SP/2._SP a_tableau(2) = 1._SP/2._SP b_tableau(1:2) = (/0._SP ,1._SP /) @@ -115,6 +118,7 @@ subroutine RT_Integrator_init() ! if (l_RT_HEUN ) then Integrator_nsteps = 2 + Integrator_nfrac = 2 c_tableau(2) = 1._SP a_tableau(2) = 1._SP b_tableau(1:2) = (/1._SP/2._SP,1._SP/2._SP/) @@ -123,6 +127,7 @@ subroutine RT_Integrator_init() ! if (l_RT_RK4 ) then Integrator_nsteps = 4 + Integrator_nfrac = 6 c_tableau(2:4) = (/1._SP/2._SP,1._SP/2._SP,1._SP /) a_tableau(2:4) = (/1._SP/2._SP,1._SP/2._SP,1._SP /) b_tableau(1:4) = (/1._SP/6._SP,1._SP/3._SP,1._SP/3._SP,1._SP/6._SP/) From 3c69117a37a0827c84eafbfbd189c86557eb24ee Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 1 Nov 2025 08:21:27 +0100 Subject: [PATCH 1254/1367] Version 5.3.0, Revision 25860, Hash 8dcdf84de MODIFIED * include/version/version.m4 nloptics/NL_initialize.F Bugs: -Fixed typos Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index ec9fad96ca..361129c9f4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25857 h.5d2ad91c9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25860 h.8dcdf84de, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25857" -SHASH="5d2ad91c9" +SREVISION="25860" +SHASH="8dcdf84de" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index d6d13ec9ad..f7d3f94daf 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -142,12 +142,13 @@ subroutine NL_initialize(E,k) Integr_steps=2 case('RK4') Integrator=RK4 - ! RT4 uses dt/2 and dt/3. So I need a factor 6 + ! RK4 uses dt/2 and dt/3. So I need a factor 6 Integr_steps=6 case('RK2EXP') Integrator=RK2EXP Integr_steps=2 case('RK4EXP') + ! RK4EXP uses dt/2 and dt/3. So I need a factor 6 Integrator=RK4EXP Integr_steps=6 case('HEUN') @@ -250,7 +251,7 @@ subroutine NL_initialize(E,k) ! call STRING_split(Efield(1)%ef_name,field_defs) if( field_defs(1)=='FROM_FILE'.and.l_pump_and_probe) & - & call error("Field from file only work in pump and probe") + & call error("Field from file only works in pump and probe mode") if(l_pump_and_probe.and.l_velocity_IPA) then ! From d213fa51413636f40814f3509b68cddfc1199768 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Sat, 1 Nov 2025 15:30:25 +0100 Subject: [PATCH 1255/1367] Version 5.3.0, Revision 25862, Hash 5b4d65cb5 MODIFIED * include/version/version.m4 nloptics/NL_initialize.F Bugs: -Typos in last commit of ext_field Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_initialize.F | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 361129c9f4..6de3030ded 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25860 h.8dcdf84de, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.25862 h.5b4d65cb5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25860" -SHASH="8dcdf84de" +SREVISION="25862" +SHASH="5b4d65cb5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index f7d3f94daf..81dfd651ff 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -186,7 +186,6 @@ subroutine NL_initialize(E,k) call STRING_split(Efield(i1)%ef_name,field_defs) if ( field_defs(1)/='FROM_FILE') cycle call RT_load_field_from_file_init(field_defs(2),field_defs(3),Integr_steps) - endif enddo ! n_active_fields=0 From 116935e711f837d2153ece903845979d49ee2681 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 2 Nov 2025 20:25:01 +0100 Subject: [PATCH 1256/1367] Added description in compute_rho_map subroutine --- src/xc_functionals/el_density_and_current.F | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/xc_functionals/el_density_and_current.F b/src/xc_functionals/el_density_and_current.F index c136168675..7951dad4fe 100644 --- a/src/xc_functionals/el_density_and_current.F +++ b/src/xc_functionals/el_density_and_current.F @@ -350,6 +350,20 @@ subroutine el_density_and_current(E,k,rho,drho,J,bands,force_spatial_inversion) subroutine compute_rho_map(rho) + ! + ! This subroutine defines a grid of sub-points in the whole fft_size + ! where the density is bigger than a threshold rho_map_thresh. + ! rho_map_thresh has a default 1.e-7 and can be tuned from input. + ! The resulting grid has size rho_map_size << fft_size. + ! + ! Doing a loop i1=1,rho_map_size the table rho_map(i1) gives the point + ! in the fft_size. + ! + ! This can be useful for isolated systems, where there are region of space + ! which are empty. Accordingly, when performing real-space integrals involving + ! the wave-functions, only the points in the rho_map_size can be used, with + ! a significant speed-up. This was tested in TD-DFT calculations on isolated + ! molecules. ! use pars, ONLY:SP use com, ONLY:msg From 1f8696aaef41fa72e694f6b286b4984e2c1e9da8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 3 Nov 2025 11:01:59 +0100 Subject: [PATCH 1257/1367] aestheic change: header moved in the header section of the file --- src/wf_and_fft/WF_apply_symm.F | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index b1598078b3..3b2d4d51e3 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): DS AF ! +! headers +! +#include +! subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) ! ! INCLUDED in: WF_apply_symm_incl.F @@ -18,8 +22,6 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) use D_lattice, ONLY:nsym,DEV_VAR(spin_sop),i_time_rev,idt_index use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_conjg_d ! -#include - ! implicit none ! integer, intent(in) :: isc(4) From 75d8df547ff52353767aa1072d07cd15d6081895 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 3 Nov 2025 11:43:57 +0100 Subject: [PATCH 1258/1367] Imported developments related to magnons from my personal fork. Everything in a single commit. Phys-magnons in my personal fork contains extra ongoing developments. --- driver/ypp.F | 4 +- include/headers/common/parallel_memory.h | 20 +-- interfaces/a2y/a2y_db1.F | 35 ++++- interfaces/int_modules/mod_com2y.F | 5 +- src/bse/K_IP_sort.F | 5 +- src/bse/K_Transitions_setup.F | 11 +- src/bse/K_blocks.F | 6 +- src/bse/K_diago_driver.F | 8 +- src/bse/K_diago_response_functions.F | 3 +- src/bse/K_dipoles.F | 13 +- src/bse/K_driver_init.F | 13 +- src/bse/K_inversion_Lo.F | 4 +- src/bse/K_kernel.F | 12 +- src/common/G_index_energy_factor.F | 7 +- src/common/LEVELS_respect_degenerations.F | 2 +- src/common/Lorentzian_FT.F | 16 ++- src/dipoles/DIPOLE_build_der_k.F | 8 +- src/dipoles/DIPOLE_shifted_grids.F | 8 +- src/driver/options_interfaces.c | 9 ++ src/driver/options_ypp.c | 9 ++ src/el-ph/ELPH_databases_symmetrize.F | 9 +- src/exc-ph/EXCPH_lifetime.F | 10 +- src/memory/MEM_global_mesg.F | 20 ++- src/memory/MEM_manager_messages.F | 12 +- src/memory/MEM_report.F | 18 +-- src/modules/SET_defaults.F | 5 +- src/modules/mod_electrons.F | 20 +++ src/modules/mod_memory.F | 12 +- src/modules/mod_parallel_interface.F | 3 + src/modules/mod_vec_operate.F | 50 +++++-- src/modules/mod_wave_func.F | 2 + src/output/K_OUTPUT.F | 2 +- src/qp/QP_states_simmetrize.F | 2 +- src/real_time_control/RT_Rabi_frequency.F | 4 +- .../RT_Rabi_frequency_ALL_and_print.F | 4 +- .../RT_gradk_rho_times_E.F | 6 +- src/sc/SC_driver.F | 4 +- src/setup/G_shells_finder.F | 7 +- src/setup/setup.F | 28 +++- src/tddft/TDDFT_ALDA_eh_space_R_kernel.F | 24 ++-- src/wf_and_fft/WF_apply_symm.F | 77 +++++++---- src/wf_and_fft/WF_phase_matrices.F | 4 +- src/xc_functionals/el_magnetization.F | 49 +++++-- ypp/YPPmodules/YPP_SET_defaults.F | 10 +- ypp/YPPmodules/mod_YPP.F | 22 ++- ypp/YPPmodules/mod_YPP_interfaces.F | 5 +- ypp/bits/WF_map_perturbative_SOC.F | 4 +- ypp/el-ph/ELPH_eliashberg_dos.F | 4 +- ypp/excitons/.objects | 2 +- ypp/excitons/DOUBLE_project.dep | 1 + ypp/excitons/excitons_WFs.F | 81 ++++++++--- ypp/excitons/excitons_amplitudes.F | 11 +- ypp/excitons/excitons_bands.F | 20 +-- ypp/excitons/excitons_driver.F | 122 +++-------------- ypp/excitons/excitons_find_degeneracies.F | 16 +-- ypp/excitons/excitons_get_user_states.F | 129 ++++++++++++++++++ ypp/excitons/excitons_interpolate_setup.F | 37 +++-- ypp/excitons/excitons_read.F | 20 ++- ypp/excitons/excitons_sort_and_report.F | 11 +- ypp/excitons/excitons_spin.F | 7 +- ypp/interface/INIT_load_ypp.F | 10 +- ypp/interface/INIT_ypp.F | 30 ++-- ypp/plotting/plot_cube.F | 4 +- ypp/plotting/plot_gnuplot.F | 4 +- ypp/plotting/plot_xcrysden.F | 4 +- 65 files changed, 732 insertions(+), 392 deletions(-) create mode 100644 ypp/excitons/excitons_get_user_states.F diff --git a/driver/ypp.F b/driver/ypp.F index 5791e46e97..bb0cd52ae9 100644 --- a/driver/ypp.F +++ b/driver/ypp.F @@ -24,7 +24,7 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir use YPPm, ONLY:l_bz_grids,l_dos,l_electrons,l_fix_syms,l_map_kpts,l_SOC_map,& & l_QP_DBs_create_and_modify,l_QP_DBs_manipulate,l_excitons,l_wannier,& & alat_used_for_output,l_QP_DB_expand,coo_out,coo_in,l_dipoles,& -& DIPs_kind,l_sp_wf,l_mean_potential +& DIPs_kind,l_sp_wf,l_mean_potential,l_magnons #if defined _YPP_RT use YPP_real_time, ONLY:l_RealTime,l_RT_DBs,l_NL_X,l_NL_exc,l_RT_abs #endif @@ -237,7 +237,7 @@ integer function ypp(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_dir ! #endif ! - l_flag=l_excitons.or.(l_dipoles.and.trim(DIPs_kind)=="EXCITONIC") + l_flag=l_excitons.or.l_magnons.or.(l_dipoles.and.trim(DIPs_kind)=="EXCITONIC") #if defined _YPP_RT l_flag=l_flag.or.l_RT_abs #endif diff --git a/include/headers/common/parallel_memory.h b/include/headers/common/parallel_memory.h index 9a76bd8ba8..14cd22a7c6 100644 --- a/include/headers/common/parallel_memory.h +++ b/include/headers/common/parallel_memory.h @@ -7,15 +7,17 @@ */ - #if defined _MPI /* With MPI */ #define CHECK_ALLOC_A(SIZE) \ - LOCAL_SIZE=SIZE NEWLINE \ - HOST_SIZE=SIZE NEWLINE \ + HOST_SIZE=0 NEWLINE \ + HOST_SIZE(1)=product(SIZE) NEWLINE \ call PP_redux_wait(HOST_SIZE,COMM=PAR_COM_HOST%COMM) NEWLINE \ + do isize_mem=2,size(HOST_size) NEWLINE \ + HOST_size(isize_mem)=1 NEWLINE \ + enddo NEWLINE \ if (PAR_COM_HOST%CPU_id==0 ) then #define CHECK_ALLOC_B(x,HOST_SIZE) \ @@ -89,22 +91,22 @@ #define YAMBO_PAR_ALLOC1(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK1(x,SIZE) NEWLINE \ - YAMBO_ALLOC1(x,LOCAL_SIZE) + YAMBO_ALLOC1(x,SIZE) #define YAMBO_PAR_ALLOC2(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK2(x,SIZE) NEWLINE \ - YAMBO_ALLOC2(x,LOCAL_SIZE) + YAMBO_ALLOC2(x,SIZE) #define YAMBO_PAR_ALLOC3(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK3(x,SIZE) NEWLINE \ - YAMBO_ALLOC3(x,LOCAL_SIZE) + YAMBO_ALLOC3(x,SIZE) #define YAMBO_PAR_ALLOC4(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK4(x,SIZE) NEWLINE \ - YAMBO_ALLOC4(x,LOCAL_SIZE) + YAMBO_ALLOC4(x,SIZE) #define YAMBO_PAR_ALLOC5(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK5(x,SIZE) NEWLINE \ - YAMBO_ALLOC5(x,LOCAL_SIZE) + YAMBO_ALLOC5(x,SIZE) #define YAMBO_PAR_ALLOC6(x,SIZE) \ YAMBO_PAR_ALLOC_CHECK6(x,SIZE) NEWLINE \ - YAMBO_ALLOC6(x,LOCAL_SIZE) + YAMBO_ALLOC6(x,SIZE) #define SIMPLE_ALLOC(x,SIZE) \ allocate(x SIZE, &NEWLINE& stat=MEM_err,errmsg=MEM_msg) diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 8b8d523dfe..0ac65d6f34 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -342,14 +342,15 @@ subroutine import_basisdata_group_wfk use R_lattice, only : g_vec, b, ng_vec use D_lattice, only : alat, i_space_inv, i_time_rev use wave_func, only : wf_nc_k, wf_igk, wf_ncx, wf_ng + use mod_com2y, only : ecut_mult_factor ! implicit none ! - integer :: i1,i2,i3,n1,n2,n3,max_nx,max_ny,max_nz,npw,igv(3),igv_shift(3),max_size + integer :: i1,i2,i3,n1,n2,n3,max_nx,max_ny,max_nz,max_n(3),npw,igv(3),igv_shift(3),max_size integer :: g_lim(6), ig_wf, ng_vec_old, ig, ic, ik, varid integer, allocatable :: igk(:,:), igk_tmp(:,:), istwfk(:), inv_map_k(:,:), map_gamma(:,:,:) integer, allocatable :: G_mod_indx(:) - logical :: gamma_only,l_new + logical :: gamma_only,l_new,found_max_n(3) real(SP) :: ecut, ecut_low, ecut_max, norm_2, max_norm_2, b_transpose(3,3), g_vec_tmp1(3), k_shift(3) real(SP), allocatable :: G_mod(:), g_vec_tmp(:,:) integer, allocatable, target :: reduced_coordinates_of_plane_waves(:,:,:) @@ -424,6 +425,8 @@ subroutine import_basisdata_group_wfk ! ecut=(ecut_low+ecut_max)/2._SP ! + call msg("s","Starting generation of g-vectors up to",(/ecut*ecut_mult_factor/),"Ha") + ! max_nx = 0 max_ny = 0 max_nz = 0 @@ -435,9 +438,29 @@ subroutine import_basisdata_group_wfk end do !write(*,*) max_nx, max_ny, max_nz !write(*,*) max_nx, max_ny, max_nz - n1 = 5*max_nx+10 - n2 = 5*max_ny+10 - n3 = 5*max_nz+10 + ! + !look for maximum needed n_i + max_n(1)=max_nx + max_n(2)=max_ny + max_n(3)=max_nz + found_max_n=.false. + ! + do i1=1,3 + do while(.not.found_max_n(i1)) + max_n(i1)=max_n(i1)+1 + if(i1==1) igv = [max_n(i1),0,0] + if(i1==2) igv = [0,max_n(i1),0] + if(i1==3) igv = [0,0,max_n(i1)] + g_vec_tmp1 = matmul(b_transpose,igv) + norm_2 = (g_vec_tmp1(1)**2 + g_vec_tmp1(2)**2 + g_vec_tmp1(3)**2)/2._SP + if (norm_2 > ecut*ecut_mult_factor) found_max_n(i1)=.true. + enddo + enddo + ! + ! For safety increase by 10% and add 10 + n1 = nint(1.1_SP*real(max_n(1),SP))+10 + n2 = nint(1.1_SP*real(max_n(2),SP))+10 + n3 = nint(1.1_SP*real(max_n(3),SP))+10 ! max_size = (2*n1+1)*(2*n2+1)*(2*n3+1) !max possible number of components YAMBO_ALLOC( g_vec_tmp, (max_size,3) ) @@ -450,7 +473,7 @@ subroutine import_basisdata_group_wfk igv = [i1,i2,i3] g_vec_tmp1 = matmul(b_transpose,igv) norm_2 = (g_vec_tmp1(1)**2 + g_vec_tmp1(2)**2 + g_vec_tmp1(3)**2)/2._SP - if (norm_2 > ecut*4._SP) cycle + if (norm_2 > ecut*ecut_mult_factor) cycle max_norm_2=max(norm_2,max_norm_2) npw = npw+1 igk_tmp(:,npw) = igv diff --git a/interfaces/int_modules/mod_com2y.F b/interfaces/int_modules/mod_com2y.F index ac2eb85308..dd8acde21a 100644 --- a/interfaces/int_modules/mod_com2y.F +++ b/interfaces/int_modules/mod_com2y.F @@ -20,6 +20,7 @@ module mod_com2y integer :: ng_vec_abinit, wf_nb_io_user ! real(SP):: alat_mult_factor + real(SP):: ecut_mult_factor ! contains ! @@ -48,10 +49,12 @@ subroutine interface_presets(in_string) artificial_spin_pol =index(in_string,'dupl')>0 verboseIO =index(in_string,'verb')>0 ! - alat_mult_factor=1. + alat_mult_factor=1._SP + ecut_mult_factor=4._SP wf_nb_io_user=0 do i1=1,100 if ( trim(str_piece(i1))=='alat_f') read(str_piece(i1+1),*) alat_mult_factor + if ( trim(str_piece(i1))=='ecut_f') read(str_piece(i1+1),*) ecut_mult_factor if ( trim(str_piece(i1))=='fragnb') read(str_piece(i1+1),*) wf_nb_io_user enddo ! diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index cb20f3311d..b11ed6a924 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -60,7 +60,10 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) allocate(n_of_el(EDIM)) ! ! Threshold is 1meV - call degeneration_finder(vR(:EDIM),EDIM,first_el,n_of_el,n_deg_grp,0.001_SP/HA2EV,Include_single_values=.TRUE.) + call degeneration_finder(EDIM,first_el,n_of_el,n_deg_grp,& + & Er=vR(:EDIM),deg_accuracy=0.001_SP/HA2EV,Include_single_values=.TRUE.) + ! + if (any(n_of_el(:)>18)) call warning("More than 18 degenerate transitions detected. Printing only first 18") ! l_print_warning=.false. ! diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 6778b86449..4581bb5c0e 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -33,7 +33,7 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) use DIPOLES, ONLY:DIPOLE_t use parallel_m, ONLY:PAR_IND_WF_b_and_k,PAR_IND_T_ordered,PAR_IND_T_groups,& & PAR_IND_T_Haydock,PP_indexes_reset - use electrons, ONLY:levels,n_sp_pol + use electrons, ONLY:levels,n_sp_pol,i_spin_majority use com, ONLY:msg use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:l_BS_magnons,l_BS_photolum @@ -88,9 +88,6 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) ! nColFG_in_T_group_now=1 ! - ! DS: WARNING - ! I cannot revert ik and i_sp_pol loop here ... - ! do i_res_ares=1,BS_n_eh_spaces ! i_T_group_start=i_T_group_now+1 @@ -124,7 +121,7 @@ subroutine K_Transitions_setup(iq,Ken,Xk,Dip,V_bands,C_bands) i_sp_v=i_sp_c ! if (l_BS_magnons.and.n_sp_pol==2) then - if(i_sp_c==1) cycle + if(i_sp_c==i_spin_majority) cycle i_sp_v=mod(i_sp_c,n_sp_pol)+1 endif ! @@ -248,7 +245,7 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) & l_BS_ares_from_res,BS_res_ares_n_mat,BS_bands,& & BS_n_eh_spaces,BS_bands_frozen use DIPOLES, ONLY:DIPOLE_t - use electrons, ONLY:levels,n_sp_pol + use electrons, ONLY:levels,n_sp_pol,i_spin_majority use com, ONLY:msg use R_lattice, ONLY:qindx_X,bz_samp use BS, ONLY:l_BS_magnons @@ -305,7 +302,7 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) i_sp_v=i_sp_c ! if (l_BS_magnons.and.n_sp_pol==2) then - if(i_sp_c==1) cycle + if(i_sp_c==i_spin_majority) cycle i_sp_v=mod(i_sp_c,n_sp_pol)+1 endif ! diff --git a/src/bse/K_blocks.F b/src/bse/K_blocks.F index da0252320b..ec5593a868 100644 --- a/src/bse/K_blocks.F +++ b/src/bse/K_blocks.F @@ -42,7 +42,7 @@ subroutine K_blocks(iq) ! ! Work Space ! - integer(IPL) :: HOST_SIZE(1),TMP_SIZE,LOCAL_SIZE(1) + integer(IPL) :: TMP_SIZE(1) integer :: i_T,j_T,i_T_start,j_T_start,i_block,diag_size,iB integer :: i_res_ares,j_res_ares,n_blocks_per_grp,n_BS_blks_CPUs(ncpu) integer(IPL) :: local_steps @@ -145,7 +145,7 @@ subroutine K_blocks(iq) ! ! Allocate the blocks ! - YAMBO_PAR_ALLOC_CHECK1(BS_MAT,(/TMP_SIZE/)) + YAMBO_PAR_ALLOC_CHECK1(BS_MAT,TMP_SIZE) ! ! Live Timing Blocks !==================== @@ -173,7 +173,7 @@ subroutine K_blocks(iq) ! call PARALLEL_live_message("Kernel matrix elements",ENVIRONMENT="Response_T_space",LOADED_r=N_Ts_local,TOTAL_r=N_Ts_total) ! -end subroutine +end subroutine K_blocks ! ! subroutine K_block_alloc( iB, mode ) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 85b7d802d1..3aafbbb977 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -21,8 +21,6 @@ subroutine K_diago_driver(iq,W,X_static) ! ! Generic diagonalization method to solve resonant and non resonant Hamiltonians. ! - ! 10/06/2015 Added by HM: Generic slepc method to solve - ! use pars, ONLY:SP use com, ONLY:msg use stderr, ONLY:intc @@ -126,8 +124,8 @@ subroutine K_diago_driver(iq,W,X_static) ! l_slepc = index(BSS_mode,'s')/=0 #if defined _SCALAPACK - l_diago = index(BSS_mode,'o')/=0.or. l_BS_photolum ! old diago - l_ldiago = index(BSS_mode,'d')/=0.and..not.l_BS_photolum + l_diago = index(BSS_mode,'o')/=0.or. ( (l_BS_photolum.or.l_BS_magnons).and.(index(BSS_mode,'d')/=0)) + l_ldiago = index(BSS_mode,'d')/=0.and. .not.(l_BS_photolum.or.l_BS_magnons) #else l_diago = index(BSS_mode,'o')/=0 .or. index(BSS_mode,'d')/=0 #endif @@ -144,10 +142,10 @@ subroutine K_diago_driver(iq,W,X_static) #endif ! if(l_diago) Solver="Diago" + if(l_ldiago) Solver="Ldiago" #if defined _SLEPC && !defined _NL if(l_slepc) Solver="Slepc" #endif - if(l_ldiago) Solver="Ldiago" ! call timing(trim(Solver)//' Solver',OPR='start') ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 2797ec0142..9651208349 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -234,7 +234,8 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ allocate(first_exc(EDIM)) allocate(n_of_exc(EDIM)) ! Threshold is 1meV - call degeneration_finder(vtmpR(i1:i1-1+EDIM),EDIM,first_exc,n_of_exc,n_deg_grp,0.001_SP/HA2EV,Include_single_values=.TRUE.) + call degeneration_finder(EDIM,first_exc,n_of_exc,n_deg_grp,& + & Er=vtmpR(i1:i1-1+EDIM),deg_accuracy=0.001_SP/HA2EV,Include_single_values=.TRUE.) EDIM=min(BSS_n_eig-i1+1,1000) do i_VAR=1,nVAR BS_E_sorted(:,i_VAR,2)=cZERO diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index b563076982..18523c53b0 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -22,7 +22,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) use ALLOC, ONLY:DIPOLE_ALLOC_global use stderr, ONLY:STRING_match use interfaces, ONLY:WF_load,WF_free - use electrons, ONLY:levels,spin + use electrons, ONLY:levels,spin,i_spin_majority,i_spin_minority use X_m, ONLY:X_t,global_gauge,i_G_shift use DIPOLES, ONLY:DIPOLE_t use BS_solvers, ONLY:BSS_Vnl_included,BSS_Q_dir,BSS_E_dir,BSS_P_dir @@ -233,17 +233,18 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) DIP_Splus = 0.5_SP*(DIP_expanded(1)+cI*DIP_expanded(2)) ! S+ for c\dn> transitions: DIP_Smins = 0.5_SP*(DIP_expanded(1)-cI*DIP_expanded(2)) ! S- for c\up> transitions: ! - BS_T_grp(i_T_g)%dipoles_mag(1,i_T,1)=conjg(DIP_Splus) ! S- for |c\dn> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,1)=conjg(DIP_Smins) ! S+ for |c\up> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) + BS_T_grp(i_T_g)%dipoles_mag(i_spin_majority,i_T,1)=conjg(DIP_Splus) ! S- for |c\dn> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) + BS_T_grp(i_T_g)%dipoles_mag(i_spin_minority,i_T,1)=conjg(DIP_Smins) ! S+ for |c\up> trans: (i_sp_pol_v) = conjg((i_sp_pol_c)) ! or the right R residual associated to (eps_c\dn-eps_v\up) ! S- for |v\dn> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) ! S+ for |v\up> trans: (i_sp_pol_c) = conjg((i_sp_pol_v)) if (BS_K_coupling.and.l_BS_ares_from_res) then ! This is the right A residual associated to (eps_v\up-eps_c\dn) - BS_T_grp(i_T_g)%dipoles_mag(1,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) - BS_T_grp(i_T_g)%dipoles_mag(2,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) + BS_T_grp(i_T_g)%dipoles_mag(i_spin_majority,i_T,2)=DIP_Smins ! S- for |v\dn> trans: (i_sp_pol_c) + BS_T_grp(i_T_g)%dipoles_mag(i_spin_minority,i_T,2)=DIP_Splus ! S+ for |v\up> trans: (i_sp_pol_c) endif ! - endif + endif + ! ! ! Magnetoelectric spin part if (l_BS_mespin) then diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 6e80f90eea..10c3f5377b 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -15,7 +15,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! use pars, ONLY:SP,schlen use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels,n_sp_pol,n_spin + use electrons, ONLY:levels,n_sp_pol,n_spin,get_spin_majority use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode use stderr, ONLY:STRING_match,STRING_split @@ -26,6 +26,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) use BS, ONLY:BSE_L_kind,BSE_mode,BS_K_is_ALDA,BS_dip_size,l_BSE_minimize_memory,BS_perturbative_SOC,& & BS_perturbative_SOC,l_BS_magnons,l_BS_photolum,BSK_IO_mode,l_BSE_kernel_full,& & BS_cpl_K_exchange,BS_n_g_exch,BS_res_K_exchange,BS_K_coupling,BS_res_ares_n_mat,& +& BS_cpl_K_corr,BS_res_K_corr,& & BS_n_eh_spaces,l_BS_ares_from_res,BS_bands,BS_K_anti_resonant,l_BS_res_from_E use TDDFT, ONLY:FXC_is_retarded,FXC_n_g_corr,l_Fxc_from_Vxc use drivers, ONLY:l_col_cut,l_rpa_IP,l_alda_fxc,l_bs_fxc @@ -182,6 +183,8 @@ subroutine K_driver_init(what,iq,Ken,Xk) if (.not.BS_K_coupling) BS_res_ares_n_mat=2 endif ! + call get_spin_majority(Ken) + ! ! In this case the anti-resonant space is used to build the coupling matrix if (BS_K_coupling.and.iq/=1) BS_n_eh_spaces=2 ! @@ -257,6 +260,14 @@ subroutine K_driver_init(what,iq,Ken,Xk) !=============== if (l_rpa_IP.and.STRING_match(BSE_mode,'coupling')) BSE_mode='retarded' ! + if (any((/BS_res_K_corr,BS_cpl_K_corr,BS_K_is_ALDA/)) ) then + if(l_BS_magnons.and.n_sp_pol==2) then + BS_res_K_exchange=.FALSE. + BS_cpl_K_exchange=.FALSE. + BS_n_g_exch=0 + endif + endif + ! ! TR-ABS logicals !----------------- #if defined _RT diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index fdad1c472c..8625b99241 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -46,7 +46,7 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) ! type(w_samp) :: W_mins,W_plus integer :: iw_ref,i_bsk,i_res,i_cpl,i_Lo_trans,ik_bz,iv,ic,iw,i_sp_c,i_sp_v,ik_ibz,& - & i_res_ares,i_para,i_loop,n_loop,i_eps,i_Lo,transition(4) + & i_res_ares,i_para,i_loop,n_loop,i_eps,i_Lo,transition(5) complex(SP) :: E_plus_W,residual complex(SP) :: SF(W%n_freqs,2) character(schlen):: LT_title @@ -125,7 +125,7 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) ! i_Lo_trans=i_res i_Lo =1 - transition=(/ik_bz,iv,ic,i_sp_c/) + transition=(/ik_bz,iv,ic,i_sp_c,i_sp_v/) ! if (BS_n_eh_spaces==2) then if ( i_res_ares==1) i_Lo =1 diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index e537676024..6fd444697a 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -217,6 +217,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call msg('r','[BSE] Correlation components ',(/BS_n_g_W,O_ng/)) endif ! + if (BS_K_is_ALDA) call msg('r','[BSE] ALDA components ',BS_n_g_fxc) + ! call K_restart(iq,X,BS_ID(1),BS_ID(2),BS_ID(3),l_partial_kernel_loaded) ID_head =BS_ID(1) ID =BS_ID(2) @@ -353,8 +355,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) YAMBO_FREE(rho) endif ! - QP_ng_Vxc=BS_n_g_fxc - ! YAMBO_ALLOC(F_xc,(fft_size,n_spin,n_spin)) if(l_BS_magnons .or. n_spinor==2 .or. l_Fxc_from_Vxc) then YAMBO_ALLOC(V_xc,(fft_size,n_spin)) @@ -364,7 +364,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if(n_spin>1) then YAMBO_ALLOC(magn,(fft_size,3)) endif + ! + ! In principle here there is a factor 4 between the energy cutoff on the potential and the one of the kernel + ! The following line, or something similar, should be used here and before + !QP_nG=G_index_energy_factor(BS_n_g_fxc,0.25_SP) + ! However in practice the one on the kernel is never set 4 the potential, i.e. 16 times the one onf the WFs + ! + QP_ng_Vxc=BS_n_g_fxc call XC_potential_driver(Ken,Xk,WF_kind,WF_xc_functional,2) + ! YAMBO_ALLOC(F_xc_mat,(fft_size,n_spin,n_spin,n_spin,n_spin)) call Build_F_xc_mat(V_xc,F_xc,F_xc_mat) YAMBO_FREE(F_xc) diff --git a/src/common/G_index_energy_factor.F b/src/common/G_index_energy_factor.F index d3923740d4..95ca8a7bf7 100644 --- a/src/common/G_index_energy_factor.F +++ b/src/common/G_index_energy_factor.F @@ -8,6 +8,7 @@ integer function G_index_energy_factor(ig_in,factor) ! use pars, ONLY:SP + use stderr, ONLY:real2ch use vec_operate, ONLY:iku_v_norm use R_lattice, ONLY:g_vec,ng_in_shell,n_g_shells,E_of_shell ! @@ -25,13 +26,15 @@ integer function G_index_energy_factor(ig_in,factor) ig_out=0 do i_shell=2,n_g_shells delta1=(E_of_shell(i_shell)-E_of_shell(i_shell-1))/2._SP - delta2=(E_of_shell(i_shell+1)-E_of_shell(i_shell))/2._SP + if (i_shell< n_g_shells) delta2=(E_of_shell(i_shell+1)-E_of_shell(i_shell))/2._SP + if (i_shell==n_g_shells) delta2=delta1 if( .not. ( (E_of_shell(i_shell)-delta1)0 + ! AM,01/08/16. Note that aimag(pole)<0, while aimag(W)>0 ! - ! DS,31/10/18. Note that the present structure uses the relation e_{n,k}=e_{n,-k}, + ! DS,31/10/18. Note that the present structure, at finite q, uses the relation e_{n,k}=e_{n,-k}, ! See Fetter-Walecka, p.158 from Eq.(12.29) to (12.30) - ! Such relation is always true. However it - ! implies that f_{n,k}=f_{n,-k} and rho_{n,k}=rho_{n,-k} (eventually with a star) - ! when the occupations and the oscillators are used. - ! Here "n" is a generalized index for the transition when speaking about oscillators + ! Such relation is not always true. See for example magnetic systems with SOC and no SI. + ! See also finite-q BSE where resonant and anti-resonant block are explicitly computed if needed + ! via the flag l_BS_res_from_ares + ! + ! Moreover, as used in Xo, it implies + ! - f_{n,k}=f_{n,-k} (occupations) + ! - R_{nm,k}=R_{nm,-k} (residuals, eventually with a star) + ! For chi_rr, R_{nmk}=rho_{nm,k} ! There are two cases where this is not true: ! a) with SOC rho_{n,k}/=rho_{n,-k} if SI is not a symmetry of the system ! b) in NEQ f_{n,k}=f_{n,-k} may not be true diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 1058ae1ef3..1b7ffcf5c5 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -96,8 +96,8 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) ! ikbz=Xk%k_table(ik,1) ! - call degeneration_finder(Xen%E(1:Dip%ib(2),ik,i_sp_pol),Dip%ib(2),& - & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + call degeneration_finder(Dip%ib(2),first_el_k,n_of_el_k,n_deg_grp_k,& + & Er=Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),deg_accuracy=deg_thresh,Include_single_values=.true.) ! deg_table_k=.false. do i_grp=1,n_deg_grp_k @@ -269,8 +269,8 @@ subroutine zeroing_disconnected_blocks(Xen,Xk,nb,ikpbz,i_sp_pol,deg_table_k,deg_ integer :: ib,ibp,i_grp,first_el_k(nb(2)-nb(1)+1),n_of_el_k(nb(2)-nb(1)+1),n_deg_grp_k logical :: deg_table_kp(nb(1):nb(2),nb(1):nb(2)) ! - call degeneration_finder(Xen%E(nb(1):nb(2),Xk%sstar(ikpbz,1),i_sp_pol),nb(2)-nb(1)+1,& - & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + call degeneration_finder(nb(2)-nb(1)+1,first_el_k,n_of_el_k,n_deg_grp_k,& + & Er=Xen%E(nb(1):nb(2),Xk%sstar(ikpbz,1),i_sp_pol),deg_accuracy=deg_thresh,Include_single_values=.true.) ! deg_table_kp=.false. do i_grp=1,n_deg_grp_k diff --git a/src/dipoles/DIPOLE_shifted_grids.F b/src/dipoles/DIPOLE_shifted_grids.F index 2cb00b9dc4..22ba8c41f9 100644 --- a/src/dipoles/DIPOLE_shifted_grids.F +++ b/src/dipoles/DIPOLE_shifted_grids.F @@ -167,8 +167,8 @@ subroutine DIPOLE_shifted_grids(Xen,Xk,Dip) ! wf_ng_eff = min(wf_ng_save,wf_ng_shifted) ! - call degeneration_finder(Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),Dip%ib_lim(1)-Dip%ib(1)+1,& - & first_el,n_of_el,n_deg_grp,Dip%Energy_threshold,Include_single_values=.true.) + call degeneration_finder(Dip%ib_lim(1)-Dip%ib(1)+1,first_el,n_of_el,n_deg_grp,& + & Er=Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),deg_accuracy=Dip%Energy_threshold,Include_single_values=.true.) ! ! Notice that here I sum over the shifted subspace, assuming that it has equal or less degeneracies than the non shifted subspace ! @@ -534,8 +534,8 @@ subroutine DIPOLE_shifted_grids_as_derk(Xen,Xk,Dip) call WF_load(WF,0,1,Dip%ib,(/ik,ik/),sp_pol_to_load=(/i_sp_pol,i_sp_pol/),space='G',& & title='-Oscillators/G space/Shifted',force_WFo=l_sc_run,keep_states_to_load=.TRUE.) ! - call degeneration_finder(Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),Dip%ib_lim(1)-Dip%ib(1)+1,& - & first_el,n_of_el,n_deg_grp,Dip%Energy_threshold,Include_single_values=.true.) + call degeneration_finder(Dip%ib_lim(1)-Dip%ib(1)+1,first_el,n_of_el,n_deg_grp,& + & Er=Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),deg_accuracy=Dip%Energy_threshold,Include_single_values=.true.) ! deg_table_k=.false. do i_grp=1,n_deg_grp diff --git a/src/driver/options_interfaces.c b/src/driver/options_interfaces.c index a881bb42ac..1c559d921f 100644 --- a/src/driver/options_interfaces.c +++ b/src/driver/options_interfaces.c @@ -36,6 +36,15 @@ void options_interfaces(struct options_struct *options, int *i_opt) options[*i_opt].bin = "p2y a2y c2y"; options[*i_opt].yambo_string = "alat_f"; options[*i_opt].section = "Interface"; + *i_opt=*i_opt+1; + options[*i_opt].short_desc = + "Multiply cutoff on wave--function for maximum number of g-vectors"; + options[*i_opt].long_opt= "ecut_factor"; + options[*i_opt].short_opt='e'; + options[*i_opt].float_var=1; + options[*i_opt].bin="a2y"; + options[*i_opt].yambo_string="ecut_f"; + options[*i_opt].section="Interface"; *i_opt = *i_opt + 1; options[*i_opt].short_desc = "Force use of spatial Inv. instead of Time Rev."; diff --git a/src/driver/options_ypp.c b/src/driver/options_ypp.c index bc29718a16..7876d920fd 100644 --- a/src/driver/options_ypp.c +++ b/src/driver/options_ypp.c @@ -143,6 +143,15 @@ void options_ypp(struct options_struct *options, int *i_opt) options[*i_opt].yambo_string = "excitons"; options[*i_opt].section = "Plots"; options[*i_opt].char_var = 1; + *i_opt=*i_opt+1; + options[*i_opt].short_desc="Magnonic properties"; + options[*i_opt].long_opt="magnon"; + options[*i_opt].short_opt='z'; + options[*i_opt].bin="ypp"; + strcpy(options[*i_opt].long_desc[0],"=(s)ort,(sp)in,(a)mplitude,(w)ave,(i)nterpolate"); + options[*i_opt].yambo_string="magnons"; + options[*i_opt].section="Plots"; + options[*i_opt].char_var=1; *i_opt = *i_opt + 1; options[*i_opt].short_desc = "Dipole properties"; options[*i_opt].long_opt = "dipoles"; diff --git a/src/el-ph/ELPH_databases_symmetrize.F b/src/el-ph/ELPH_databases_symmetrize.F index ea8497255f..e2fd19cf67 100644 --- a/src/el-ph/ELPH_databases_symmetrize.F +++ b/src/el-ph/ELPH_databases_symmetrize.F @@ -38,8 +38,10 @@ subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) ik =k%sstar(ik_bz,1) ik_m_q =k%sstar(qindx_S(ik,iq,1),1) ! - call degeneration_finder(E%E(:n_bands(2),ik,1), n_bands(2),first_el(1,:),n_of_el(1,:),n_deg_grp(1),0.0001/HA2EV) - call degeneration_finder(E%E(:n_bands(2),ik_m_q,1),n_bands(2),first_el(2,:),n_of_el(2,:),n_deg_grp(2),0.0001/HA2EV) + call degeneration_finder(n_bands(2),first_el(1,:),n_of_el(1,:),n_deg_grp(1),& + & Er=E%E(:n_bands(2),ik,1), deg_accuracy=0.0001/HA2EV) + call degeneration_finder(n_bands(2),first_el(2,:),n_of_el(2,:),n_deg_grp(2),& + & Er=E%E(:n_bands(2),ik_m_q,1),deg_accuracy=0.0001/HA2EV) ! do i_g=1,n_deg_grp(1) do i_np=n_bands(1),n_bands(2) @@ -72,7 +74,8 @@ subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) ph_E(il)=sqrt(PH_freqs_sq(iq,il)) enddo ! - call degeneration_finder(ph_E,ph_modes,first_el(1,:ph_modes),n_of_el(1,:ph_modes),n_deg_grp(1),0.0001/HA2EV) + call degeneration_finder(ph_modes,first_el(1,:ph_modes),n_of_el(1,:ph_modes),n_deg_grp(1),& + & Er=ph_E,deg_accuracy=0.0001/HA2EV) ! do i_g=1,n_deg_grp(1) do i_c=1,2 diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 732a18f63d..b052464c17 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -106,8 +106,9 @@ subroutine EXCPH_lifetime(k,q,X) ! improve the quality of the interpolation at gamma in the case of double grid ! (try to avoid unphysical splitting of degenerate states) ! - call degeneration_finder(BS_all_E(EXCPH_states(1):EXCPH_states(2),1),n_exc_in,first_exc_grp,& - & n_of_exc_grp,n_deg_grp,0.001/HA2EV,Include_single_values=.true.) + call degeneration_finder(n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& + & Er=BS_all_E(EXCPH_states(1):EXCPH_states(2),1),& + & deg_accuracy=0.001/HA2EV,Include_single_values=.true.) ! do igrp=1,n_deg_grp j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 @@ -241,8 +242,9 @@ subroutine EXCPH_lifetime(k,q,X) ! ! Perform average ! - call degeneration_finder(real(BS_E_in(EXCPH_states(1):EXCPH_states(2))),n_exc_in,first_exc_grp, & - & n_of_exc_grp,n_deg_grp,0.001/HA2EV,Include_single_values=.true.) + call degeneration_finder(n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& + & Er=real(BS_E_in(EXCPH_states(1):EXCPH_states(2))),& + & deg_accuracy=0.001/HA2EV,Include_single_values=.true.) ! do igrp=1,n_deg_grp j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 diff --git a/src/memory/MEM_global_mesg.F b/src/memory/MEM_global_mesg.F index 82c421d303..cadef0d283 100644 --- a/src/memory/MEM_global_mesg.F +++ b/src/memory/MEM_global_mesg.F @@ -12,6 +12,7 @@ subroutine MEM_global_mesg(what,xkind,HOST_SIZE) use stderr, ONLY:real2ch use units, ONLY:Kilobyte use LIVE_t, ONLY:LIVE_message + use y_memory, ONLY:mem_string ! implicit none ! @@ -20,23 +21,18 @@ subroutine MEM_global_mesg(what,xkind,HOST_SIZE) integer(IPL), intent(in) :: HOST_SIZE(:) ! integer :: i1 - real(DP) :: MEM_size + real(SP) :: MEM_size ! - MEM_size=0 - do i1=1,size(HOST_SIZE) - MEM_size=MEM_size+real(HOST_SIZE(i1),DP) + MEM_size=real(HOST_SIZE(1),SP) + do i1=2,size(HOST_SIZE) + MEM_size=MEM_size*real(HOST_SIZE(i1),SP) enddo - MEM_size=MEM_size*real(xkind,DP)/real(Kilobyte,DP)/real(1000,DP) + MEM_size=MEM_size*real(xkind,SP)/Kilobyte ! ! Error Message !=============== - call LIVE_message("[MEMORY] Parallel distribution of "//what//" on HOST "//trim(host_name)//& -& " with size "//trim(real2ch(real(MEM_size,SP)))//" [Mb] ") - ! - ! 2020/05/20: Here I do not use mem_string since it wants an integer in input - ! It is not a good solution since integers are limited to their maximum value - ! A real would be much better for the size in Kb ... -!& " with size "//trim(mem_string(real(MEM_size,SP)))) + call LIVE_message("[PAR-MEMORY] Parallel distribution of "//what//" on HOST "//trim(host_name)//& +& " with total size "//trim(mem_string(MEM_size))) ! call MEM_error("GLOBAL_"//what) ! diff --git a/src/memory/MEM_manager_messages.F b/src/memory/MEM_manager_messages.F index c566b2a4e8..f28156b31c 100644 --- a/src/memory/MEM_manager_messages.F +++ b/src/memory/MEM_manager_messages.F @@ -7,7 +7,7 @@ ! subroutine MEM_manager_messages(what,adding,MEM_now_Kb,where) ! - use pars, ONLY:lchlen + use pars, ONLY:SP,lchlen use com, ONLY:msg,fat_log use y_memory, ONLY:TOT_MEM_Kb,TOT_MEM_Kb_MEMSTAT,TOT_MEM_Kb_SAVE,MEM_treshold,& & MEM_jump_treshold,mem_string,HOST_,DEV_ @@ -42,10 +42,10 @@ subroutine MEM_manager_messages(what,adding,MEM_now_Kb,where) msg_="[MEMORY]" if ( adding) msg_=trim(msg_)//" Alloc "//what if (.not.adding) msg_=trim(msg_)//" Free "//what - msg_=trim(msg_)//"("//trim(mem_string(MEM_now_Kb))//")" - msg_=trim(msg_)//trim(label)//" TOTAL: "//trim(mem_string(TOT_MEM_Kb(where)))//" (traced)" + msg_=trim(msg_)//"("//trim(mem_string(real(MEM_now_Kb,SP)))//")" + msg_=trim(msg_)//trim(label)//" TOTAL: "//trim(mem_string(real(TOT_MEM_Kb(where),SP)))//" (traced)" if (TOT_MEM_Kb_MEMSTAT(where)>0) then - msg_=trim(msg_)//" "//trim(mem_string(TOT_MEM_Kb_MEMSTAT(where)))//" (memstat)" + msg_=trim(msg_)//" "//trim(mem_string(real(TOT_MEM_Kb_MEMSTAT(where),SP)))//" (memstat)" endif call msg("s",trim(msg_)) endif @@ -54,9 +54,9 @@ subroutine MEM_manager_messages(what,adding,MEM_now_Kb,where) if (deliver_a_msg) then call MEM_STAT_update( ) msg_="[MEMORY] In use: " - msg_=trim(msg_)//trim(label)//" TOTAL: "//trim(mem_string(TOT_MEM_Kb(where)))//" (traced)" + msg_=trim(msg_)//trim(label)//" TOTAL: "//trim(mem_string(real(TOT_MEM_Kb(where),SP)))//" (traced)" if (TOT_MEM_Kb_MEMSTAT(where)>0) then - msg_=trim(msg_)//" "//trim(mem_string(TOT_MEM_Kb_MEMSTAT(where)))//" (memstat)" + msg_=trim(msg_)//" "//trim(mem_string(real(TOT_MEM_Kb_MEMSTAT(where),SP)))//" (memstat)" endif call msg("s",trim(msg_)) TOT_MEM_Kb_SAVE(where)=TOT_MEM_Kb(where) diff --git a/src/memory/MEM_report.F b/src/memory/MEM_report.F index 634db2febc..51322a8b97 100644 --- a/src/memory/MEM_report.F +++ b/src/memory/MEM_report.F @@ -7,7 +7,7 @@ ! subroutine MEM_report( REPORT ) ! - use pars, ONLY:lchlen + use pars, ONLY:SP,lchlen use y_memory, ONLY:MEMs,N_MEM_elements,mem_string,MEM_element,MAX_MEM_Kb,N_MEM_SAVE_elements,& & LARGE_MEMs,MEM_treshold,MEM_SAVE_treshold,HOST_,DEV_ use units, ONLY:Kilobyte @@ -28,8 +28,8 @@ subroutine MEM_report( REPORT ) PREFIX=" " loc="r" call msg("r" ,"Memory Usage: global (Only MASTER cpu here). [O] stands for group 'O'") - call msg("rn","Memory treshold are:"//trim(mem_string(MEM_treshold))//" (basic treshold) "//& -& trim(mem_string(MEM_SAVE_treshold))//" (SAVEs treshold) ") + call msg("rn","Memory treshold are:"//trim(mem_string(real(MEM_treshold,SP)))//" (basic treshold) "//& +& trim(mem_string(real(MEM_SAVE_treshold,SP)))//" (SAVEs treshold) ") endif ! ORPHAN_TOT=0 @@ -48,7 +48,7 @@ subroutine MEM_report( REPORT ) ! if (ORPHAN_TOT>0.and.fat_log) then if (loc=="r") call msg(loc,"") - WRITE(msg_,'(a8,a," : ",a,3x)') trim(PREFIX),"TOTAL not deallocated",trim(mem_string(ORPHAN_TOT)) + WRITE(msg_,'(a8,a," : ",a,3x)') trim(PREFIX),"TOTAL not deallocated",trim(mem_string(real(ORPHAN_TOT,SP))) call msg(loc,msg_(1:len_trim(msg_))) endif ! @@ -62,12 +62,12 @@ subroutine MEM_report( REPORT ) endif ! #ifdef _GPU - write(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used (HOST) ",trim(mem_string(MAX_MEM_Kb(HOST_))) + write(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used (HOST) ",trim(mem_string(real(MAX_MEM_Kb(HOST_),SP))) call msg("nr",msg_(1:len_trim(msg_))) - write(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used (DEV) ",trim(mem_string(MAX_MEM_Kb(DEV_))) + write(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used (DEV) ",trim(mem_string(real(MAX_MEM_Kb(DEV_),SP))) call msg("r",msg_(1:len_trim(msg_))) #else - write(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used ",trim(mem_string(MAX_MEM_Kb(HOST_))) + write(msg_,'(a8,a," : ",a,3x)') trim(PREFIX), "Max memory used ",trim(mem_string(real(MAX_MEM_Kb(HOST_),SP))) call msg("nr",msg_(1:len_trim(msg_))) #endif ! @@ -90,7 +90,7 @@ subroutine plot_the_element(M,what) i_title=1 ! if (REPORT=="check") then - WRITE(msg_,'(a,1x,a," : ",a)') trim(PREFIX),trim(mem_string(MEM_now_kb,where)) + WRITE(msg_,'(a,1x,a," : ",a)') trim(PREFIX),trim(mem_string(real(MEM_now_kb,SP),where)) if (M%N>1.or.(M%N==1.and.trim(M%shelf)/=trim(M%name(1)))) then WRITE(msg_,'(2a)') trim(msg_),trim(M%name(i_el))//" "//trim(M%shelf) else @@ -105,7 +105,7 @@ subroutine plot_the_element(M,what) else WRITE(msg_,'(a8,a27)') trim(PREFIX),trim(M%name(i_el)) endif - WRITE(msg_,'(a," : ",a)') trim(msg_),trim(mem_string(MEM_now_kb,where)) + WRITE(msg_,'(a," : ",a)') trim(msg_),trim(mem_string(real(MEM_now_kb,SP),where)) if (len_trim(M%desc(i_el))>0) then WRITE(msg_,'(a,a)') trim(msg_)," ("//trim(M%desc(i_el))//")" endif diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index d893755e08..340c224216 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -35,7 +35,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & Xk_grid_is_uniform,RIM_id_epsm1_reference,RIM_epsm1,& & RIM_anisotropy,RIM_ng,RIM_W_ng,RIM_n_rand_pts,RIM_sphe_n_rand_pts,nqibz,q0_def_norm,& & cutoff_presets,k_map,qindx_S_max_Go,RIMW_type,eps_env - use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,eval_magn,nel_cond + use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,& +& i_spin_majority,i_spin_minority,eval_magn,nel_cond use parallel_m, ONLY:ncpu,CPU_str_reset,CREATE_hosts_COMM use com, ONLY:isec,depth,secnm,previous_secmode,of_name,n_ofs_defined,of_opened,of_unit,max_open_ofs,& & more_io_path,core_io_path,com_path,repfile,grid_paths,fat_log,exp_user @@ -318,6 +319,8 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) n_sp_pol=1 n_spinor=1 n_spin_den=1 + i_spin_majority=1 + i_spin_minority=n_sp_pol l_spin_orbit = .FALSE. filled_tresh = 0.00001_SP nel_cond=rZERO diff --git a/src/modules/mod_electrons.F b/src/modules/mod_electrons.F index 924666de73..ef79f7ede0 100644 --- a/src/modules/mod_electrons.F +++ b/src/modules/mod_electrons.F @@ -42,6 +42,9 @@ module electrons integer :: n_spin_den logical :: l_spin_orbit ! + integer :: i_spin_majority + integer :: i_spin_minority + ! integer, parameter :: n_max_deg=4 ! ! Average magnetization density @@ -268,6 +271,23 @@ subroutine FineGd_E_components_reset(E,FULL_RESET) ! end subroutine ! + subroutine get_spin_majority(E) + ! + type(levels),intent(in) ::E + integer :: nb_ref + ! + nb_ref=maxval(E%nbm) + ! + i_spin_majority=1 + i_spin_minority=n_spin + if(n_sp_pol==2) then + if(E%E(nb_ref,1,1)<=E%E(nb_ref,1,2)) i_spin_majority=1 + if(E%E(nb_ref,1,1)> E%E(nb_ref,1,2)) i_spin_majority=2 + i_spin_minority=mod(i_spin_majority,n_sp_pol)+1 + endif + ! + end subroutine + ! integer function spin(v) integer :: v(:) ! diff --git a/src/modules/mod_memory.F b/src/modules/mod_memory.F index 2f8523a62a..a8053957fe 100644 --- a/src/modules/mod_memory.F +++ b/src/modules/mod_memory.F @@ -159,7 +159,7 @@ subroutine MEM_element_init(MEM_element_to_init,size_) ! character(schlen) function mem_string(MEM,where) use stderr, ONLY:intc,real2ch - integer :: MEM !in Kb + real(SP) :: MEM !in Kb integer, optional :: where ! character(64) :: where_str @@ -170,12 +170,12 @@ character(schlen) function mem_string(MEM,where) if (where==DEV_) where_str=" Dev" endif ! - if (MEM<1000) then - mem_string=trim(real2ch(real(MEM,SP)))//" [Kb]" - else if (MEM<1000000) then - mem_string=trim(real2ch(real(MEM,SP)/1000))//" [Mb]" + if (MEM<1000._SP) then + mem_string=trim(real2ch(MEM))//" [Kb]" + else if (MEM<1000000._SP) then + mem_string=trim(real2ch(MEM/1000._SP))//" [Mb]" else - mem_string=trim(real2ch(real(MEM,SP)/1000000))//" [Gb]" + mem_string=trim(real2ch(MEM/1000000._SP))//" [Gb]" endif mem_string=trim(mem_string)//trim(where_str) end function diff --git a/src/modules/mod_parallel_interface.F b/src/modules/mod_parallel_interface.F index eb08238c33..ad06f50767 100644 --- a/src/modules/mod_parallel_interface.F +++ b/src/modules/mod_parallel_interface.F @@ -1293,6 +1293,9 @@ end module parallel_int module y_memory_alloc_par + use pars, ONLY:IPL use parallel_m, ONLY:PAR_COM_HOST use parallel_int, ONLY:PP_redux_wait,PP_wait + integer :: isize_mem + integer(IPL) :: HOST_SIZE(1),LOCAL_SIZE(1) end module y_memory_alloc_par diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index e9dfa32b73..0db2d53fa4 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -692,8 +692,8 @@ subroutine i_sort(arrin,arrout,indx,indx_m1) deallocate(l_indx,l_arrout) end subroutine i_sort ! - subroutine degeneration_finder(E,n,first_deg_el,deg_elmnts,deg_grps,& -& deg_accuracy,Include_single_values) + subroutine degeneration_finder(n,first_deg_el,deg_elmnts,deg_grps,& +& Ei,Er,deg_accuracy,Include_single_values) ! ! Assumes energy are sorted ! @@ -706,14 +706,15 @@ subroutine degeneration_finder(E,n,first_deg_el,deg_elmnts,deg_grps,& ! integer, intent(in) :: n integer, intent(out) :: first_deg_el(n),deg_elmnts(n),deg_grps - real(SP),intent(in) :: E(n),deg_accuracy + integer, intent(in),optional :: Ei(n) + real(SP),intent(in),optional :: Er(n),deg_accuracy logical, optional :: Include_single_values ! ! Work Space ! - integer :: iref,i1 + integer :: iref,i1,E_diff_i(2) real(SP):: E_diff(2) - logical :: l_flag,l_singles + logical :: l_flag,l_singles,l_check ! deg_grps=0 first_deg_el=0 @@ -722,18 +723,37 @@ subroutine degeneration_finder(E,n,first_deg_el,deg_elmnts,deg_grps,& l_singles=.FALSE. if (present(Include_single_values)) l_singles=Include_single_values ! + if( (.not.(present(deg_accuracy).and.present(Er))) .and. .not. present(Ei) ) then + call error(" deg finder called without Er nor Ei") + endif + ! iref=1 ! do while (iref < n ) ! if (l_singles) then ! - E_diff=2._SP*deg_accuracy - ! - if (deg_grps>0) E_diff(1)=abs(E(iref)-E(first_deg_el(deg_grps))) - if (iref0) E_diff(1)=abs(Er(iref)-Er(first_deg_el(deg_grps))) + if (iref=deg_accuracy) + ! + else if( present(Ei) ) then + ! + E_diff=-1 + ! + if (deg_grps>0) E_diff_i(1)=Ei(iref)-Ei(first_deg_el(deg_grps)) + if (iref=deg_accuracy)) then + if (l_check) then deg_grps=deg_grps+1 first_deg_el(deg_grps)=iref deg_elmnts(deg_grps)=1 @@ -745,7 +765,10 @@ subroutine degeneration_finder(E,n,first_deg_el,deg_elmnts,deg_grps,& ! do i1=iref+1,n ! - if (abs(E(iref)-E(i1)) 0) i1=first_deg_el(deg_grps) if(deg_grps==0) i1=1 ! - if(l_singles .and. abs(E(n)-E(i1))>deg_accuracy) then + if(present(deg_accuracy).and.present(Er)) l_check=abs(Er(n)-Er(i1)) > deg_accuracy + if( present(Ei)) l_check= Ei(n)-Ei(i1) /=0 + ! + if(l_singles .and. l_check) then deg_grps=deg_grps+1 first_deg_el(deg_grps)=n deg_elmnts(deg_grps)=1 diff --git a/src/modules/mod_wave_func.F b/src/modules/mod_wave_func.F index 04f67d4e7f..d4b5e75a8b 100644 --- a/src/modules/mod_wave_func.F +++ b/src/modules/mod_wave_func.F @@ -74,6 +74,8 @@ module wave_func integer :: wf_ng_overlaps ! For WFs shifted used by the overlaps integer :: cutoff_ng ! For G-vectors used in cutoff (if read, may be different from wf_ng) ! + real(SP) :: E_of_WFs + ! ! Wave function derivatives ! complex(SP), allocatable :: wf_x(:,:,:) diff --git a/src/output/K_OUTPUT.F b/src/output/K_OUTPUT.F index 943ceb10d4..154aa4b8a4 100644 --- a/src/output/K_OUTPUT.F +++ b/src/output/K_OUTPUT.F @@ -60,7 +60,7 @@ subroutine K_OUTPUT(iq,W,WHAT,OBS) if (.not.STRING_match(WHAT,"IP").and..not.BS_K_is_ALDA) out_string=trim(solver)//' bse' if ( BS_K_is_ALDA) out_string=trim(solver)//' alda bse' endif - call X_OUTPUT_driver(WHAT="keys"//OBS,IQ=iq,IG=i_G_shift,keys=trim(out_string)) + call X_OUTPUT_driver(WHAT="keys "//OBS,IQ=iq,IG=i_G_shift,keys=trim(out_string)) ! call X_OUTPUT_driver("open "//OBS) ! diff --git a/src/qp/QP_states_simmetrize.F b/src/qp/QP_states_simmetrize.F index f7bc4cbe5f..b9753e5353 100644 --- a/src/qp/QP_states_simmetrize.F +++ b/src/qp/QP_states_simmetrize.F @@ -45,7 +45,7 @@ subroutine QP_states_simmetrize(en,what,V_real,V_complex,state_is_2do,warn_me) enddo ! call sort(Eo_sorted,indx=Eo_sorted_index) - call degeneration_finder(Eo_sorted,QP_n_states,first_el,n_of_el,n_deg_grp,E_deg_treshold) + call degeneration_finder(QP_n_states,first_el,n_of_el,n_deg_grp,Er=Eo_sorted,deg_accuracy=E_deg_treshold) ! if (present(state_is_2do)) then state_is_2do=.TRUE. diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index 88b21c1661..68b6c58b8d 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -70,8 +70,8 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) do ik=1,nkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) - call degeneration_finder(En%E(RT_bands(1):RT_bands(2),ik,i_sp_pol),RT_nbands,first_el,n_of_el,n_deg_grp, & - & 0.0001_SP/HA2EV,Include_single_values=.true.) + call degeneration_finder(RT_nbands,first_el,n_of_el,n_deg_grp,Er=En%E(RT_bands(1):RT_bands(2),ik,i_sp_pol), & + & deg_accuracy=0.0001_SP/HA2EV,Include_single_values=.true.) do i_grp1=1,n_deg_grp ib1=first_el(i_grp1)+RT_bands(1)-1 do i_grp2=i_grp1+1,n_deg_grp diff --git a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F index 96c98a3886..4a5b2e1db3 100644 --- a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F +++ b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F @@ -47,8 +47,8 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) do ik=1,nkibz if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) - call degeneration_finder(En%E(RT_bands(1):RT_bands(2),ik,i_sp_pol),RT_nbands,first_el,n_of_el,n_deg_grp, & - & 0.0001_SP/HA2EV,Include_single_values=.true.) + call degeneration_finder(RT_nbands,first_el,n_of_el,n_deg_grp,Er=En%E(RT_bands(1):RT_bands(2),ik,i_sp_pol), & + & deg_accuracy=0.0001_SP/HA2EV,Include_single_values=.true.) do i_grp1=1,n_deg_grp ib1=first_el(i_grp1)+RT_bands(1)-1 do i_grp2=i_grp1+1,n_deg_grp diff --git a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F index 7145d8ebe3..9c9666f56b 100644 --- a/src/real_time_hamiltonian/RT_gradk_rho_times_E.F +++ b/src/real_time_hamiltonian/RT_gradk_rho_times_E.F @@ -21,7 +21,7 @@ subroutine RT_gradk_rho_times_E_wrong(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) use real_time, ONLY:l_length_grad_k,RT_bands use fields, ONLY:gauge_field use real_time, ONLY:RT_bands,NE_i_time,NE_i_last_field - use vec_operate, ONLY:k_periodic_idx,degeneration_finder + use vec_operate, ONLY:k_periodic_idx use matrix_operate, ONLY:hermitian use DIPOLES, ONLY:DIP_S,DIP_iR,l_force_SndOrd use electrons, ONLY:levels,n_sp_pol @@ -282,8 +282,8 @@ subroutine RT_gradk_rho_times_E(ik,i_sp_pol,H_nl_sc,dG_in,A_input,Xk,Xen) ! ! define degeneration table at ik ! - call degeneration_finder(Xen%E(nb(1):nb(2),ik,i_sp_pol),nb(2)-nb(1)+1,& - & first_el_k,n_of_el_k,n_deg_grp_k,deg_thresh,Include_single_values=.true.) + call degeneration_finder(nb(2)-nb(1)+1,first_el_k,n_of_el_k,n_deg_grp_k,& + & Er=Xen%E(nb(1):nb(2),ik,i_sp_pol),deg_accuracy=deg_thresh,Include_single_values=.true.) ! deg_table_k=.false. do i_grp=1,n_deg_grp_k diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index ef779c4f72..eba1455553 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -827,8 +827,8 @@ subroutine SC_report() ! ! Check for degenerate bands in the bare energies ! - call degeneration_finder(E_reference%E(SC_bands(1):SC_bands(2),ik,i_sp_pol),& - & SC_nbands,first_el,n_of_el,n_deg_grp,0.0001/HA2EV) + call degeneration_finder(SC_nbands,first_el,n_of_el,n_deg_grp,& + & Er=E_reference%E(SC_bands(1):SC_bands(2),ik,i_sp_pol),deg_accuracy=0.0001/HA2EV) ! do ib=SC_bands(1),SC_bands(2) ! diff --git a/src/setup/G_shells_finder.F b/src/setup/G_shells_finder.F index 3229a73a3f..219c571176 100644 --- a/src/setup/G_shells_finder.F +++ b/src/setup/G_shells_finder.F @@ -25,6 +25,7 @@ subroutine G_shells_finder() & g_vec,g_rot,E_of_shell,rl_sop,minus_G use R_lattice, ONLY:DEV_VAR(g_rot),DEV_VAR(minus_G) use vec_operate, ONLY:iku_v_norm,v_is_zero,sort,degeneration_finder + use wave_func, ONLY:wf_nc_k,E_of_WFs use IO_int, ONLY:io_control use IO_m, ONLY:OP_RD_CL,OP_WR_CL,VERIFY use zeros, ONLY:G_iku_zero,G_mod_zero @@ -46,6 +47,8 @@ subroutine G_shells_finder() integer :: ID,io_err integer, external :: io_GROT ! + E_of_WFs=iku_v_norm(g_vec(wf_nc_k(1),:))**2/2._SP + ! ! I/O (read) !============ ! @@ -95,8 +98,8 @@ subroutine G_shells_finder() ! if(G_mod_zero/=1.E-5) call msg('r','Shells accuracy on Gmod is ',G_mod_zero) ! - call degeneration_finder(G_mod,ng_closed,first_G_in_shell,ng_in_shell_TMP,n_g_shells,& -& G_mod_zero,Include_single_values=.TRUE.) + call degeneration_finder(ng_closed,first_G_in_shell,ng_in_shell_TMP,n_g_shells,& +& Er=G_mod,deg_accuracy=G_mod_zero,Include_single_values=.TRUE.) ! ! Init ! diff --git a/src/setup/setup.F b/src/setup/setup.F index 6f73c5a6e4..9e132e71ae 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -17,7 +17,7 @@ subroutine setup(en,q,Xen,Ken,k,Xk) use drivers, ONLY:l_setup use C_driver, ONLY:code_bin use parser_m, ONLY:parser - use wave_func, ONLY:wf_ng,wf_ncx,wf_igk + use wave_func, ONLY:wf_ng,wf_ncx,wf_igk,wf_nc_k,E_of_WFs use electrons, ONLY:levels,n_met_bands,n_full_bands,E_duplicate,E_reset use D_lattice, ONLY:a,alat,nsym,i_time_rev,DL_vol,Tel,dl_sop,atom_mass,atom_pos,atoms_map,& & atoms_spatial_inversion,i_space_inv,input_Tel_is_negative,& @@ -254,8 +254,8 @@ subroutine setup(en,q,Xen,Ken,k,Xk) ! call msg('r','nG shells ',n_g_shells) call msg('r','nG charge ',ng_closed) - call msg('r','nG WFs ',wf_ng) - call msg('r','nC WFs ',wf_ncx) + call msg('r','nG WFs ',(/wf_ng,wf_nc_k(1)/)) + call msg('rn','nC WFs ',wf_ncx) ! ! Indexes of -G. minus_G_index(iG)| G_{minus_G_index(iG)}=-G. When there is no Spatial inversion ! the map is built in G_shells_finder @@ -264,18 +264,32 @@ subroutine setup(en,q,Xen,Ken,k,Xk) ! n_to_print=min(800,n_g_shells) if (.not.fat_log) n_to_print=n_to_print/10 + if (n_to_print>n_g_shells/2) n_to_print=n_g_shells ! - call msg('r','G-vecs. in first '//trim(intc(n_to_print))//' shells',' [ Number ] ') + call msg('r','G-vecs. in first (and last) '//trim(intc(n_to_print))//' shells',' [ Number ] ') do i1=1,n_to_print,9 call msg('r',' ',ng_in_shell(i1:min(i1+8,n_to_print)) ) enddo - if (n_to_print>> - !DEV_OMPGPU target map(present,alloc:WF_p,WF_symm,fft_rot_r) - !DEV_OMPGPU teams loop - !DEV_OMP parallel do default(shared), private(ifft,ifftp) - do ifft = 1, fft_size - ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) - WF_symm(ifft,1)=cmplx(WF_p(ifftp,1),kind=SP) - enddo - !DEV_OMPGPU end target - !DEV_ACC_DEBUG end data + if (allocated(rho_map)) then + !$omp parallel do default(shared), private(ifft,ifftp) + do ifft = 1, rho_map_size + ifftp=rho_map_inv(DEV_VAR(fft_rot_r)(rho_map(ifft),isymm)) + WF_symm(ifft,1)=cmplx(WF_p(ifftp,1),kind=SP) + enddo + else + !DEV_ACC_DEBUG data present(WF_p,WF_symm,fft_rot_r) + !DEV_ACC parallel loop + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMPGPU target map(present,alloc:WF_p,WF_symm,fft_rot_r) + !DEV_OMPGPU teams loop + !DEV_OMP parallel do default(shared), private(ifft,ifftp) + do ifft = 1, fft_size + ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) + WF_symm(ifft,1)=cmplx(WF_p(ifftp,1),kind=SP) + enddo + !DEV_OMPGPU end target + !DEV_ACC_DEBUG end data + endif ! endif ! if (n_spinor==2) then ! - !DEV_ACC_DEBUG data present(WF_p,WF_symm,fft_rot_r,spin_sop) - !DEV_ACC parallel loop - !DEV_CUF kernel do(1) <<<*,*>>> - !DEV_OMPGPU target map(present,alloc:WF_p,WF_symm,fft_rot_r,spin_sop) - !DEV_OMPGPU teams loop - !DEV_OMP parallel do default(shared), private(ifft,ifftp) - do ifft = 1, fft_size - ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) - WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & - DEV_VAR(spin_sop)(1,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) - WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & + if (allocated(rho_map)) then + !$omp parallel do default(shared), private(ifft,ifftp) + do ifft = 1, rho_map_size + ifftp=rho_map_inv(DEV_VAR(fft_rot_r)(rho_map(ifft),isymm)) + WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & + DEV_VAR(spin_sop)(1,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) + WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & + DEV_VAR(spin_sop)(2,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) + enddo + else + !DEV_ACC_DEBUG data present(WF_p,WF_symm,fft_rot_r,spin_sop) + !DEV_ACC parallel loop + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMPGPU target map(present,alloc:WF_p,WF_symm,fft_rot_r,spin_sop) + !DEV_OMPGPU teams loop + !DEV_OMP parallel do default(shared), private(ifft,ifftp) + do ifft = 1, fft_size + ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) + WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & + DEV_VAR(spin_sop)(1,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) + WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & DEV_VAR(spin_sop)(2,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) - enddo - !DEV_OMPGPU end target - !DEV_ACC_DEBUG end data + enddo + !DEV_OMPGPU end target + !DEV_ACC_DEBUG end data + endif ! endif ! diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index 4bab8fa51f..a93c3e0c2a 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -128,8 +128,8 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) call WF_load(WF_k,0,1,blim,(/ik,ik/),(/i_sp_pol,i_sp_pol/),& & space='G',title='-WF_phases',quiet=ifrag>1,keep_states_to_load=.true.) ! - call degeneration_finder(En%E(blim(1):blim(2),ik,i_sp_pol),nb,& - & first_el,n_of_el,n_deg_grp,0.0001/HA2EV,Include_single_values=.true.) + call degeneration_finder(nb,first_el,n_of_el,n_deg_grp,Er=En%E(blim(1):blim(2),ik,i_sp_pol),& + & deg_accuracy=0.0001/HA2EV,Include_single_values=.true.) ! do i_grp=1,n_deg_grp do iby_phase=1,n_of_el(i_grp) diff --git a/src/xc_functionals/el_magnetization.F b/src/xc_functionals/el_magnetization.F index 695cf7c83e..449851b54e 100644 --- a/src/xc_functionals/el_magnetization.F +++ b/src/xc_functionals/el_magnetization.F @@ -19,7 +19,7 @@ subroutine el_magnetization(en,Xk,magn,bands) use electrons, ONLY:levels,n_spin,n_spinor,n_sp_pol use D_lattice, ONLY:nsym,dl_sop,i_time_rev use FFT_m, ONLY:fft_size,fft_rot_r - use wave_func, ONLY:WF + use wave_func, ONLY:WF,rho_map,rho_map_size use interfaces, ONLY:WF_load,WF_free use hamiltonian, ONLY:WF_G_max,WF_Go_indx use electrons, ONLY:Spin_magn @@ -43,7 +43,7 @@ subroutine el_magnetization(en,Xk,magn,bands) ! Work Space ! logical :: l_WFs_on_the_fly - integer :: isym,ifft,ib,ik,i_sp_pol,i_wf,bands_range(2) + integer :: isym,ifft,ib,ik,i_sp_pol,i_wf,bands_range(2),wf_rspace_size real(SP):: cv(fft_size,3),tmp_sop(3,3),f_occ ! #if defined _RT @@ -57,6 +57,8 @@ subroutine el_magnetization(en,Xk,magn,bands) ! if (n_spin==1) return ! + wf_rspace_size=size(WF%r(:,1,1)) + ! l_WFs_on_the_fly=.not.allocated(WF%r) ! do i_sp_pol=1,n_sp_pol @@ -67,6 +69,7 @@ subroutine el_magnetization(en,Xk,magn,bands) if (l_WFs_on_the_fly) then call WF_load(WF,WF_G_max,WF_Go_indx,bands_range,(/ik,ik/),(/i_sp_pol,i_sp_pol/),& & space='R',title='-mang',keep_states_to_load=.true.) + wf_rspace_size=size(WF%r(:,1,1)) endif ! do ib=bands_range(1),bands_range(2) @@ -92,28 +95,50 @@ subroutine el_magnetization(en,Xk,magn,bands) ! ! mz ! - cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*f_occ*real(wfconjg(WF%r(:,1,i_wf))*WF%r(:,1,i_wf)) + if (wf_rspace_size null() + complex(SP),pointer :: BS_R_right(:) => null() + ! + real(SP), pointer :: BS_R_PL(:,:) => null() + ! + complex(SP),pointer :: BS_R_left_kerr(:) => null() + complex(SP),pointer :: BS_R_right_kerr(:) => null() + complex(SP),pointer :: BS_R_right_dich(:,:) => null() + ! + complex(SP),pointer :: BS_R_left_magn(:,:) => null() + complex(SP),pointer :: BS_R_right_magn(:,:) => null() + ! complex(SP), allocatable ::BS_E(:) real(SP), pointer ::BS_E_SOC_corr(:,:) => null() - real(SP), pointer ::BS_R_PL(:,:) => null() - complex(SP), pointer ::BS_R_kerr(:) => null() type(X_t) ::Xbsk ! ! NL diff --git a/ypp/YPPmodules/mod_YPP_interfaces.F b/ypp/YPPmodules/mod_YPP_interfaces.F index 203d73a5ae..54517bcd40 100644 --- a/ypp/YPPmodules/mod_YPP_interfaces.F +++ b/ypp/YPPmodules/mod_YPP_interfaces.F @@ -42,13 +42,14 @@ subroutine electrons_dos_elemental(k,E,bands,el_dos,dos_E,spin_fac,pdos_fac,USE_ logical, optional,intent(in) :: USE_the_DbGd,QUIET,FORCE_occ end subroutine electrons_dos_elemental ! - subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) + subroutine excitons_sort_and_report(iq,Res,BS_E,BS_E_SOC_corr,EXC_spin) use pars, ONLY:SP use BS_solvers, ONLY:BSS_n_eig use YPPm, ONLY:EXCITON_spin implicit none integer :: iq - complex(SP) :: BS_R(BSS_n_eig),BS_E(BSS_n_eig) + real(SP) :: Res(BSS_n_eig) + complex(SP) :: BS_E(BSS_n_eig) real(SP), optional, pointer :: BS_E_SOC_corr(:,:) type(EXCITON_spin),optional :: EXC_spin end subroutine diff --git a/ypp/bits/WF_map_perturbative_SOC.F b/ypp/bits/WF_map_perturbative_SOC.F index ebfa19de2f..7d8f884a70 100644 --- a/ypp/bits/WF_map_perturbative_SOC.F +++ b/ypp/bits/WF_map_perturbative_SOC.F @@ -183,8 +183,8 @@ subroutine WF_map_perturbative_SOC(kpt,En) ! call sort(E_sorted,indx=E_sort_map) ! - call degeneration_finder(E_sorted,NB_to_map,first_el,n_of_el,n_deg_grp,& -& SOC_split,Include_single_values=.true.) + call degeneration_finder(NB_to_map,first_el,n_of_el,n_deg_grp,& +& Er=E_sorted,deg_accuracy=SOC_split,Include_single_values=.true.) ! group_already_mapped=.false. ! diff --git a/ypp/el-ph/ELPH_eliashberg_dos.F b/ypp/el-ph/ELPH_eliashberg_dos.F index f420803b41..1e1c5c7851 100644 --- a/ypp/el-ph/ELPH_eliashberg_dos.F +++ b/ypp/el-ph/ELPH_eliashberg_dos.F @@ -318,8 +318,8 @@ subroutine elph_gamma(iq) ! ! Gamma factors symmetrization ! - call degeneration_finder(abs(PH_freqs_sq(iq,:)),ph_modes,first_el,n_of_el,& -& n_deg_grp,1.E-10_SP) + call degeneration_finder(ph_modes,first_el,n_of_el,n_deg_grp,& +& Er=abs(PH_freqs_sq(iq,:)),deg_accuracy=1.E-10_SP) do i1=1,n_deg_grp ! sym_gamma=0._SP diff --git a/ypp/excitons/.objects b/ypp/excitons/.objects index 1476b77067..20b75329f7 100644 --- a/ypp/excitons/.objects +++ b/ypp/excitons/.objects @@ -1,6 +1,6 @@ #if defined _YPP_ELPH ELPH_objs=excitons_ph_ass_dos.o #endif -objs = excitons_driver.o excitons_sort_and_report.o excitons_find_degeneracies.o \ +objs = excitons_driver.o excitons_get_user_states.o excitons_sort_and_report.o excitons_find_degeneracies.o \ excitons_spin.o excitons_read.o excitons_interpolate_setup.o excitons_bands.o $(ELPH_objs) \ excitons_amplitudes.o excitons_WFs.o excitons_degeneracy_average.o excitons_kinematics.o diff --git a/ypp/excitons/DOUBLE_project.dep b/ypp/excitons/DOUBLE_project.dep index 8c341417f7..970c87bfee 100644 --- a/ypp/excitons/DOUBLE_project.dep +++ b/ypp/excitons/DOUBLE_project.dep @@ -4,6 +4,7 @@ excitons_degeneracy_average.o excitons_driver.o excitons_find_degeneracies.o + excitons_get_user_states.o excitons_interpolate_setup.o excitons_kinematics.o excitons_ph_ass_dos.o diff --git a/ypp/excitons/excitons_WFs.F b/ypp/excitons/excitons_WFs.F index 3ef09dfa2c..35ac2122b8 100644 --- a/ypp/excitons/excitons_WFs.F +++ b/ypp/excitons/excitons_WFs.F @@ -19,7 +19,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) use FFT_m, ONLY:fft_dim,fft_size use com, ONLY:msg,of_open_close use electrons, ONLY:n_spinor,n_sp_pol - use YPPm, ONLY:v2plot,ncell,r_hole,l_free_hole,AVE_exc,& + use YPPm, ONLY:v2plot,ncell,r_fixed,l_free_hole,AVE_exc,center_kind,& & nr,nr_tot,output_fname,l_average_eh,elec_spin,hole_spin,& & use_xcrysden,use_gnuplot,use_cube,plot_dim,& & EXCITONS_user_indexes,EXCITONS_n_user_states @@ -43,12 +43,13 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! Workspace ! type(PP_indexes) :: px - integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_lambda,j_lambda,i_sp_c,i_sp_v,ir,ir_hole,j1,& + logical :: fixed_elec_plot,fixed_hole_plot + integer :: iv,ic,ikbz,ikibz,is,neh,i1,i2,i_lambda,j_lambda,i_sp_c,i_sp_v,ir,ir_fixed,j1,& & n_lambda_deg,BS_E_deg_done,neh1,iv1,ic1,ikbz1,ikibz1,i_sp_c1,i_sp_v1,is1,& & i_spin_hole,i_spin_elec,n1_lambda,n2_lambda - integer :: ikpbz,ikp,isp,i_spinor,j_spinor,rh_size,ir_hole_rlu(3) + integer :: ikpbz,ikp,isp,i_spinor,j_spinor,rh_size,ir_fixed_rlu(3) character(schlen) :: exc_index_msg - real(SP) :: r_hole_rlu(3),k1(3),k2(3) + real(SP) :: r_fixed_rlu(3),k1(3),k2(3) complex(SP) :: B_coeff ! integer, allocatable :: rindex(:) @@ -67,6 +68,11 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! if (l_free_hole.or.l_average_eh) ncell=1 ! + fixed_hole_plot=trim(center_kind)=="Hole" + fixed_elec_plot=trim(center_kind)=="Electron" + ! + if (.not.(fixed_hole_plot.or.fixed_elec_plot)) call error("Wrong CenterKind in input") + ! call WF_load(WF,wf_ng,1,BS_bands,(/1,Xk%nibz/),space='R',title='-EXCWF') ! call expand_grid() @@ -80,20 +86,20 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! ! [1] Bare position pushed in the smallest cell ! - call c2a(b_in=a,v_in=r_hole,v_out=r_hole_rlu,mode='kc2a') + call c2a(b_in=a,v_in=r_fixed,v_out=r_fixed_rlu,mode='kc2a') do j1=1,3 - r_hole_rlu(j1)=r_hole_rlu(j1)-int(r_hole_rlu(j1)) + r_fixed_rlu(j1)=r_fixed_rlu(j1)-int(r_fixed_rlu(j1)) enddo - call c2a(b_in=a,v_in=r_hole_rlu,v_out=r_hole,mode='ka2c') - call msg('s',' Hole position in the DL cell ',r_hole,"[c.c.]") + call c2a(b_in=a,v_in=r_fixed_rlu,v_out=r_fixed,mode='ka2c') + call msg('s',' '//center_kind(1:4)//' position in the DL cell ',r_fixed,"[c.c.]") ! ! [2] Bare position in the FFT grid ! - call c2a(b_in=a,v_in=r_hole,v_out=r_hole_rlu,mode='kc2a') - ir_hole_rlu(:)=nint(r_hole_rlu(:)*fft_dim(:)) - ir_hole=1+ir_hole_rlu(1)+ ir_hole_rlu(2)*nr(1)+ ir_hole_rlu(3)*nr(1)*nr(2) - if (ir_hole.lt.0) call error(' Hole coordinates in input must be positive') - call msg('s',' position in the FFT grid ',r_cell_cc(ir_hole,:),"[c.c.]") + call c2a(b_in=a,v_in=r_fixed,v_out=r_fixed_rlu,mode='kc2a') + ir_fixed_rlu(:)=nint(r_fixed_rlu(:)*fft_dim(:)) + ir_fixed=1+r_fixed_rlu(1)+ r_fixed_rlu(2)*nr(1)+ r_fixed_rlu(3)*nr(1)*nr(2) + if (ir_fixed.lt.0) call error(' Fixed '//trim(center_kind)//' coordinates in input must be positive') + call msg('s',' position in the FFT grid ',r_cell_cc(ir_fixed,:),"[c.c.]") ! ! [3] Translation in the center of the Big grid ! @@ -103,14 +109,14 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) ! The number of cells is always odd so that the hole can ! be placed in the middle. ! - ir_hole_rlu(j1)=ir_hole_rlu(j1)+ncell(j1)/2*fft_dim(j1) + ir_fixed_rlu(j1)=ir_fixed_rlu(j1)+ncell(j1)/2*fft_dim(j1) ! enddo - ir_hole=1+ir_hole_rlu(1)+ir_hole_rlu(2)*nr(1)+ir_hole_rlu(3)*nr(1)*nr(2) - r_hole=r_cell_cc(ir_hole,:) + ir_fixed=1+ir_fixed_rlu(1)+ ir_fixed_rlu(2)*nr(1)+ ir_fixed_rlu(3)*nr(1)*nr(2) + r_fixed=r_cell_cc(ir_fixed,:) ! - call msg('s',' translated position ',r_hole,"[c.c.]") - call msg('s',' ',r_hole*BO2ANG,"[A]") + call msg('s',' translated position ',r_fixed,"[c.c.]") + call msg('s',' ',r_fixed*BO2ANG,"[A]") ! endif ! @@ -296,6 +302,7 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) call PP_redux_wait(v2plot) ! else + ! ! call live_timing('ExcWF@'//trim(intc(j_lambda)),px%n_of_elements(myid+1)) ! @@ -354,14 +361,24 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle wf_vc(:,i_spinor,1) = wf_vc(:,i_spinor,1) + conjg(WF1(:,i_spinor))*WF2(:,i_spinor) enddo - else + else if (fixed_hole_plot) then + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle + if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle + wf_vc(:,i_spinor,j_spinor) = wf_vc(:,i_spinor,j_spinor) + & + & conjg(WF1(rindex(ir_fixed),i_spinor))*WF2(:,j_spinor) + enddo + enddo + else if (fixed_elec_plot) then do i_spinor=1,n_spinor if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle do j_spinor=1,n_spinor if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle wf_vc(:,i_spinor,j_spinor) = wf_vc(:,i_spinor,j_spinor) + & - & conjg(WF1(rindex(ir_hole),i_spinor))*WF2(:,j_spinor) + & conjg(WF1(:,i_spinor))*WF2(rindex(ir_fixed),j_spinor) enddo enddo endif @@ -410,9 +427,9 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) enddo enddo ! - else + else if (fixed_hole_plot) then ! - kp_dot_r_h(1) = dot_product(r_cell_cc(ir_hole,:),k2(:)) + kp_dot_r_h(1) = dot_product(r_cell_cc(ir_fixed,:),k2(:)) ! do i_spinor=1,n_spinor if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle @@ -430,6 +447,26 @@ subroutine exciton_WFs(Xk,BS_E_degs,iq) enddo enddo ! + else if (fixed_elec_plot) then + ! + k_dot_r_e(1) = dot_product(r_cell_cc(ir_fixed,:),k1(:)) + ! + do i_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_hole>0 .and. i_spinor /= i_spin_hole) cycle + do j_spinor=1,n_spinor + if (n_spinor==2 .and. i_spin_elec>0 .and. j_spinor /= i_spin_elec) cycle + if (n_spinor==2 .and. i_spin_elec==-10 .and. i_spinor/= j_spinor) cycle + !$omp do + do ir=1,nr_tot + kp_dot_r_h(ir) =r_cell_cc(ir,1)*k2(1)+r_cell_cc(ir,2)*k2(2)+r_cell_cc(ir,3)*k2(3) + alpha(ir)=k_dot_r_e(1)-kp_dot_r_h(ir) + phase(ir)=cmplx(cos(alpha(ir)),sin(alpha(ir)),kind=SP) + wf_tmp(ir,i_spinor,j_spinor) = wf_tmp(ir,i_spinor,j_spinor)+& + & BS_mat(neh,j_lambda)*wf_vc(rindex(ir),i_spinor,j_spinor)*phase(ir) + enddo + enddo + enddo + ! endif ! if (master_thread.and.Xk%nbz>1) call live_timing(steps=1) diff --git a/ypp/excitons/excitons_amplitudes.F b/ypp/excitons/excitons_amplitudes.F index 709186d26f..93bebb453f 100644 --- a/ypp/excitons/excitons_amplitudes.F +++ b/ypp/excitons/excitons_amplitudes.F @@ -29,7 +29,7 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) ! type(bz_samp) :: Xk,q type(levels) :: Xen - integer :: BS_E_degs(BSS_n_eig),iq + integer :: BS_E_degs(BSS_n_eig),iq,i_sp_v,i_sp_c ! ! Workspace integer :: j1,j2,i_l,i_l_grp,i_lambda,neh,i_spin,iv,ic,ikbz,ikibz,is,n_lambda_deg,S_indx(BS_H_dim),& @@ -156,9 +156,10 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) ikbz = BSS_eh_table(S_indx(neh),1) iv = BSS_eh_table(S_indx(neh),2) ic = BSS_eh_table(S_indx(neh),3) - i_spin= spin(BSS_eh_table(S_indx(neh),:)) - if (i_spin==1) j1= 1 - if (i_spin==2) j1=-1 + i_sp_c=BSS_eh_table(S_indx(neh),4) + i_sp_v=BSS_eh_table(S_indx(neh),5) + if (i_sp_c==1) j1= 1 + if (i_sp_v==2) j1=-1 ! ikibz = Xk%sstar(ikbz,1) is = Xk%sstar(ikbz,2) @@ -168,7 +169,7 @@ subroutine excitons_amplitudes(Xk,Xen,q,BS_E_degs,iq) isp = Xk%sstar(ikpbz,2) ! amp_n_trans=amp_n_trans+1 - amp_trans(amp_n_trans,1)=Xen%E(ic,ikibz,i_spin)-Xen%E(iv,ikp,i_spin) + amp_trans(amp_n_trans,1)=Xen%E(ic,ikibz,i_sp_c)-Xen%E(iv,ikp,i_sp_v) amp_trans(amp_n_trans,2)=A_weight(neh) ! if (A_weight(neh)0.and.BANDS_steps>0) then ! - call msg('s','Exciton bands') + call msg('s',exc_kind//' bands') ! YAMBO_ALLOC(BSE_interp_E,(EXCITONS_n_user_states,CIRCUIT_k%nibz)) call INTERPOLATION_BZ(K=CIRCUIT_k,NK=CIRCUIT_k%nbz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) @@ -128,7 +128,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! if (GRID_interpolate) then ! - call msg('s','Exciton Grid') + call msg('s',exc_kind//' Grid') ! GRID_q%description="INTERP" call INTERPOLATION_grid(GRID_q,'i',INTERP_grid) @@ -145,7 +145,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) ! if(l_prt_dos) then ! - call msg('s','Exciton Density of States') + call msg('s',exc_kind//' Density of States') ! call electrons_dos_setup(BSE_interp_E, dos_E, (/1,EXCITONS_n_user_states/)) ! @@ -182,7 +182,7 @@ subroutine excitons_bands(k,Xk,en,Xen,q) subroutine print_DOS() implicit none ! - file_name="excitons_dos" + file_name=trim(exc_kind)//"s_dos" call of_open_close(trim(file_name),'ot') headings(1)=" E [eV] " headings(2)=" Dos " @@ -209,7 +209,7 @@ subroutine print_interpolated_BANDS() headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& & (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) ! - file_name="excitons_interpolated" + file_name=trim(exc_kind)//"s_interpolated" call of_open_close(trim(file_name),'ot') call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) call msg('o '//trim(file_name),"#") @@ -271,7 +271,7 @@ subroutine print_built_in_BANDS() headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& & (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) ! - file_name="excitons_built_in" + file_name=trim(exc_kind)//"s_built_in" call of_open_close(trim(file_name),'ot') call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) call msg('o '//trim(file_name),"#") @@ -324,7 +324,7 @@ subroutine print_INTERP_GRID() headings(EXCITONS_n_user_states+2:EXCITONS_n_user_states+4)=& & (/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) ! - file_name="excitons_interpolated_IBZ" + file_name=trim(exc_kind)//"s_interpolated_IBZ" call of_open_close(trim(file_name),'ot') call msg('o '//trim(file_name),"#",headings,INDENT=0,USE_TABS=.true.) call msg('o '//trim(file_name),"#") diff --git a/ypp/excitons/excitons_driver.F b/ypp/excitons/excitons_driver.F index 226d0c426f..69ed4e38d5 100644 --- a/ypp/excitons/excitons_driver.F +++ b/ypp/excitons/excitons_driver.F @@ -16,8 +16,10 @@ subroutine excitons_driver(k,Xk,en,Xen,q) use stderr, ONLY:intc use electrons, ONLY:levels,spin use YPP_interfaces,ONLY:excitons_sort_and_report - use YPPm, ONLY:l_sort,l_exc_wf,l_spin,l_amplitude,EXCITONS_user_indexes,BSiq, & -& BS_R_right,BS_E,BS_E_SOC_corr,l_interp,l_dipoles + use YPPm, ONLY:l_magnons,l_sort,l_exc_wf,l_spin,l_amplitude,exc_kind,& + & EXCITONS_n_user_states,EXCITONS_user_indexes,BSiq, & + & BS_R_left,BS_R_right,BS_R_left_magn,BS_R_right_magn,& + & BS_E,BS_E_SOC_corr,l_interp,l_dipoles,MAGNON_Res_threshold use BS_solvers, ONLY:BSS_n_eig #if defined _YPP_ELPH use YPP_ELPH, ONLY:l_eliashberg,l_gkkp,l_ph_ass_dos @@ -36,6 +38,7 @@ subroutine excitons_driver(k,Xk,en,Xen,q) ! logical :: l_flag integer ,allocatable :: BS_E_degs(:) + real(SP),allocatable :: Res(:) !... I/0 integer :: iq,io_err ! @@ -49,10 +52,16 @@ subroutine excitons_driver(k,Xk,en,Xen,q) ! if(.not.l_flag) return ! - if(.not.l_interp) call section('*','Excitonic Properties @ Q-index #'//trim(intc(BSiq))) - if( l_interp) call section('*','Excitonic Properties') + exc_kind="exciton" + if (l_magnons) exc_kind="magnon " ! - iq = BSiq + if(.not.l_interp) then + call section('*',exc_kind//'ic Properties @ Q-index #'//trim(intc(BSiq))) + iq= BSiq + else if(l_interp) then + call section('*',exc_kind//'ic Properties') + iq = 1 + endif ! call excitons_read(k,Xk,en,Xen,BSiq,"check",io_err) ! @@ -66,9 +75,13 @@ subroutine excitons_driver(k,Xk,en,Xen,q) return endif ! + YAMBO_ALLOC(Res,(BSS_n_eig)) + if (l_magnons) Res(:)=real(BS_R_left_magn(:,1)*BS_R_right_magn(:,1),SP) + if (.not.l_magnons) Res(:)=real(BS_R_left(:)*BS_R_right(:),SP) + ! ! Sort energies and write to output !=================================== - if (l_sort) call excitons_sort_and_report(iq,BS_R_right,BS_E,BS_E_SOC_corr=BS_E_SOC_corr) + if (l_sort) call excitons_sort_and_report(iq,Res,BS_E,BS_E_SOC_corr=BS_E_SOC_corr) ! #if defined _YPP_RT if (.not.l_RT_abs) then @@ -77,11 +90,11 @@ subroutine excitons_driver(k,Xk,en,Xen,q) ! Sort energies to find degenerate states !======================================== YAMBO_ALLOC(BS_E_degs,(BSS_n_eig)) - call excitons_find_degeneracies(BS_E,BS_E_degs) + call excitons_find_degeneracies(BS_E,BS_E_degs,BSS_n_eig) ! ! Define the USER set of excitonic states !========================================= - if(.not.l_sort) call get_user_excitonic_states( ) + if(.not.l_sort) call excitons_get_user_states(BS_E_degs,Res,BSS_n_eig,.false.) ! #if defined _YPP_RT endif @@ -107,7 +120,7 @@ subroutine excitons_driver(k,Xk,en,Xen,q) ! ! Exciton's spin !===================== - if (l_spin) call excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) + if (l_spin) call excitons_spin(Xk,Res,BS_E,BS_E_degs) ! ! Exciton's Amplitude !===================== @@ -141,95 +154,4 @@ subroutine excitons_driver(k,Xk,en,Xen,q) ! YAMBO_FREE(EXCITONS_user_indexes) ! - contains - ! - subroutine get_user_excitonic_states( ) - ! - use pars, ONLY:schlen - use stderr, ONLY:STRING_split,intc - use YPPm, ONLY:state_ctl,EXCITONS_user_indexes,EXCITONS_n_user_states,EXCITON_E_treshold,EXCITON_Res_treshold - use com, ONLY:msg - ! - implicit none - ! - integer ::i_start,i_end,i_str,i_st,TMP_index(BSS_n_eig),n_user - real(SP) ::Residuals(BSS_n_eig) - character(schlen)::str_piece(50) - ! - call STRING_split(state_ctl,str_piece) - ! - EXCITONS_n_user_states=0 - n_user =0 - TMP_index =0 - ! - ! 1. Using the "States" variable - !-------------------------------- - i_str =1 - do while (i_str<50) - ! - if (len_trim(str_piece(i_str))==0) exit - ! - if (trim(str_piece(i_str+1))=="-") then - read(str_piece(i_str ),*) i_start - read(str_piece(i_str+2),*) i_end - i_str=i_str+3 - else - read(str_piece(i_str),*) i_start - i_end=i_start - i_str=i_str+1 - endif - ! - do i_st=i_start,i_end - ! - n_user=n_user+1 - ! - call ADD_me_to_the_list(i_st,TMP_index) - ! - enddo - enddo - ! - ! 2. Using the "En_treshold" variable - !------------------------------------ - if (EXCITON_E_treshold>0.) then - do i_st=1,BSS_n_eig - if (real(BS_E(i_st))0.) then - Residuals(:) = BS_R_right(:)*conjg(BS_R_right(:)) - do i_st=1,BSS_n_eig - if (real(Residuals(i_st))>EXCITON_Res_treshold*maxval(Residuals)) call ADD_me_to_the_list(i_st,TMP_index) - enddo - endif - ! - if (EXCITONS_n_user_states==0) return - ! - if (EXCITONS_n_user_states>n_user) call warning(" "//trim(intc(EXCITONS_n_user_states-n_user))//& -& " excitonic states added to the USER selection to preserve degeneracy") - call msg("s"," "//trim(intc(EXCITONS_n_user_states))//" excitonic states selected") - ! - YAMBO_ALLOC(EXCITONS_user_indexes,(EXCITONS_n_user_states)) - EXCITONS_user_indexes=TMP_index(:EXCITONS_n_user_states) - ! - end subroutine - ! - subroutine ADD_me_to_the_list(i_state,TMP_index) - ! - use YPPm, ONLY:EXCITONS_n_user_states - ! - integer i_st_p,i_state,TMP_index(BSS_n_eig) - ! - do i_st_p=1,BSS_n_eig - if (BS_E_degs(i_st_p)==BS_E_degs(i_state)) then - if (.not.any(TMP_index==i_st_p)) then - EXCITONS_n_user_states=EXCITONS_n_user_states+1 - TMP_index(EXCITONS_n_user_states)=i_st_p - endif - endif - enddo - end subroutine - ! end subroutine diff --git a/ypp/excitons/excitons_find_degeneracies.F b/ypp/excitons/excitons_find_degeneracies.F index 420343116c..7fd5e84e0c 100644 --- a/ypp/excitons/excitons_find_degeneracies.F +++ b/ypp/excitons/excitons_find_degeneracies.F @@ -5,24 +5,24 @@ ! ! Authors (see AUTHORS file for details): AM DV ! -subroutine excitons_find_degeneracies(BS_E,BS_E_degs) +subroutine excitons_find_degeneracies(BS_E,BS_E_degs,n_eig) ! use pars, ONLY:SP use com, ONLY:msg use vec_operate, ONLY:sort - use BS_solvers, ONLY:BSS_n_eig use YPPm, ONLY:deg_energy ! implicit none ! - complex(SP) :: BS_E(BSS_n_eig) - integer :: BS_E_degs(BSS_n_eig) + integer, intent(in) :: n_eig + complex(SP) :: BS_E(n_eig) + integer :: BS_E_degs(n_eig) ! ! Work space ! integer :: j1,j2 - integer :: S_indx(BSS_n_eig) - real(SP):: v2sort(BSS_n_eig) + integer :: S_indx(n_eig) + real(SP):: v2sort(n_eig) ! call msg('s',' Sorting energies') !================================== @@ -32,13 +32,13 @@ subroutine excitons_find_degeneracies(BS_E,BS_E_degs) ! BS_E_degs=0 ! - do j1=1,BSS_n_eig + do j1=1,n_eig ! if (BS_E_degs(S_indx(j1))>0) cycle ! BS_E_degs(S_indx(j1))=S_indx(j1) ! - do j2=j1+1,BSS_n_eig + do j2=j1+1,n_eig if ( abs( real(BS_E(S_indx(j1)))-real(BS_E(S_indx(j2))) )>deg_energy) exit BS_E_degs(S_indx(j2))=S_indx(j1) enddo diff --git a/ypp/excitons/excitons_get_user_states.F b/ypp/excitons/excitons_get_user_states.F new file mode 100644 index 0000000000..255bb223bd --- /dev/null +++ b/ypp/excitons/excitons_get_user_states.F @@ -0,0 +1,129 @@ +! +! Copyright (C) 2000-2021 the YAMBO team +! http://www.yambo-code.org +! +! Authors (see AUTHORS file for details): AM DV DS +! +! This file is distributed under the terms of the GNU +! General Public License. You can redistribute it and/or +! modify it under the terms of the GNU General Public +! License as published by the Free Software Foundation; +! either version 2, or (at your option) any later version. +! +! This program is distributed in the hope that it will +! be useful, but WITHOUT ANY WARRANTY; without even the +! implied warranty of MERCHANTABILITY or FITNESS FOR A +! PARTICULAR PURPOSE. See the GNU General Public License +! for more details. +! +! You should have received a copy of the GNU General Public +! License along with this program; if not, write to the Free +! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, +! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. +! +subroutine excitons_get_user_states(BS_E_degs,Res,n_eig,recompute) + ! + use pars, ONLY:SP,schlen + use com, ONLY:msg + use stderr, ONLY:STRING_split,intc + use YPPm, ONLY:EXCITONS_user_indexes,EXCITONS_n_user_states,EXCITON_E_treshold,& + EXCITON_Res_treshold,MAGNON_Res_threshold,state_ctl,BS_E,exc_kind + ! + implicit none + ! + integer, intent(in) :: n_eig + integer, intent(inout) :: BS_E_degs(n_eig) + real(SP),intent(in) :: Res(n_eig) + logical, intent(in) :: recompute + ! + integer ::i_start,i_end,i_str,i_st,TMP_index(n_eig),n_user + character(schlen)::str_piece(50) + ! + ! Sort energies to find degenerate states + !======================================== + if(recompute) call excitons_find_degeneracies(BS_E,BS_E_degs,n_eig) + ! + call STRING_split(state_ctl,str_piece) + ! + EXCITONS_n_user_states=0 + n_user =0 + TMP_index =0 + ! + ! 1. Using the "States" variable + !-------------------------------- + i_str =1 + do while (i_str<50) + ! + if (len_trim(str_piece(i_str))==0) exit + ! + if (trim(str_piece(i_str+1))=="-") then + read(str_piece(i_str ),*) i_start + read(str_piece(i_str+2),*) i_end + i_str=i_str+3 + else + read(str_piece(i_str),*) i_start + i_end=i_start + i_str=i_str+1 + endif + ! + do i_st=i_start,i_end + ! + n_user=n_user+1 + ! + call ADD_me_to_the_list(i_st,TMP_index) + ! + enddo + enddo + ! + if (EXCITONS_n_user_states>n_user) & + & call warning(" "//trim(intc(EXCITONS_n_user_states-n_user))//& + & ""//exc_kind//"ic states added to the USER selection to preserve degeneracy") + ! + ! 2. Using the "En_treshold" variable + !------------------------------------ + if (EXCITON_E_treshold>0.) then + do i_st=1,n_eig + if (real(BS_E(i_st))0.) then + do i_st=1,n_eig + if (real(Res(i_st))>EXCITON_Res_treshold*maxval(Res)) call ADD_me_to_the_list(i_st,TMP_index) + enddo + endif + ! + if (MAGNON_Res_threshold>0.) then + do i_st=1,n_eig + if (real(Res(i_st))>MAGNON_Res_threshold*maxval(Res)) call ADD_me_to_the_list(i_st,TMP_index) + enddo + endif + ! + if (EXCITONS_n_user_states==0) return + call msg("s"," "//trim(intc(EXCITONS_n_user_states))//" "//exc_kind//"ic states selected") + ! + if(allocated(EXCITONS_user_indexes)) deallocate(EXCITONS_user_indexes) + allocate(EXCITONS_user_indexes(EXCITONS_n_user_states)) + EXCITONS_user_indexes=TMP_index(:EXCITONS_n_user_states) + ! + contains + ! + subroutine ADD_me_to_the_list(i_state,TMP_index) + ! + use YPPm, ONLY:EXCITONS_n_user_states + ! + integer i_st_p,i_state,TMP_index(n_eig) + ! + do i_st_p=1,n_eig + if (BS_E_degs(i_st_p)==BS_E_degs(i_state)) then + if (.not.any(TMP_index==i_st_p)) then + EXCITONS_n_user_states=EXCITONS_n_user_states+1 + TMP_index(EXCITONS_n_user_states)=i_st_p + endif + endif + enddo + end subroutine ADD_me_to_the_list + ! +end subroutine diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 21fdaf0e69..c9db00caf3 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -19,7 +19,9 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN use electrons, ONLY:levels,nel_cond,E_reset use interpolate, ONLY:INTERPOLATION_BZ,INTERP_obj,INTERPOLATION_coefficients use YPPm, ONLY:BS_E,EXCITONS_user_indexes,EXCITONS_n_user_states,coo_out,K_transform,& -& l_exc_occ_interp,EXCITONS_user_indexes,EXCITONS_n_user_states + & l_exc_occ_interp,EXCITONS_n_user_states,& + & l_magnons,BS_R_left,BS_R_right,BS_R_left_magn,BS_R_right_magn,exc_kind + use BS_solvers, ONLY:BSS_n_eig use com, ONLY:msg use IO_int, ONLY:io_control use IO_m, ONLY:OP_APP_CL,REP,OP_RD_CL @@ -37,16 +39,23 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN ! Work space ! type(levels) ::E_QF - integer :: iq,i_c,i_l,io_err,ID + integer :: iq,i_c,i_l,io_err,ID,EXC_n_states_ref,BSS_n_eig_ref,n_eig real(SP), allocatable :: EXC_occ(:,:) real(SP), allocatable :: values(:) + real(SP) :: Res(BSS_n_eig),BS_E_degs(BSS_n_eig) real(SP) :: tmp_q(3),E_fermi_h,E_fermi_e character(schlen), allocatable :: headings(:) integer, external ::io_QINDX ! - ! Allocate arrays for all eigenvalues/eigenvectors + EXC_n_states_ref=EXCITONS_n_user_states + BSS_n_eig_ref=BSS_n_eig ! - call section('*','Excitons Interpolation') + do i_c=1,EXC_n_states_ref + i_l=EXCITONS_user_indexes(i_c) + BS_all_E(i_c,1)=BS_E(i_l) + enddo + ! + call section('*',exc_kind//'s Interpolation') ! if(nel_cond/=rZERO) then call msg('rs','Excitonic quasi-fermi distribution interpolation') @@ -74,20 +83,25 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN ! ! Read all eigenvalues and eigenvectors ! - do iq=1,q%nibz - call msg('s','Reading excitons at @ Q-index #',iq) + n_eig=BSS_n_eig + do iq=2,q%nibz + call msg('s','Reading '//exc_kind//'s at @ Q-index #',iq) call excitons_read(k,Xk,en,Xen,iq,"check",io_err) ! if(l_exc_occ_interp) then call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) #if defined _YPP_ELPH - call EXC_occupations(E_QF,Xk,q,iq,EXCITONS_n_user_states,EXCITONS_user_indexes,EXC_occ(:,iq)) + call EXC_occupations(E_QF,Xk,q,iq,EXC_n_states_ref,EXCITONS_user_indexes,EXC_occ(:,iq)) #endif else call excitons_read(k,Xk,en,Xen,iq,"eigenvalues",io_err) endif ! - do i_c=1,EXCITONS_n_user_states + n_eig=min(n_eig,BSS_n_eig) + if ( l_magnons) Res(:n_eig)=real(BS_R_left_magn(:n_eig,1)*BS_R_right_magn(:n_eig,1),SP) + if (.not.l_magnons) Res(:n_eig)=real(BS_R_left(:n_eig)*BS_R_right(:n_eig),SP) + call excitons_get_user_states(BS_E_degs(:n_eig),Res(:n_eig),n_eig,.true.) + do i_c=1,EXC_n_states_ref i_l=EXCITONS_user_indexes(i_c) BS_all_E(i_c,iq)=BS_E(i_l) enddo @@ -96,6 +110,9 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN ! enddo ! + EXCITONS_n_user_states=EXC_n_states_ref + BSS_n_eig=BSS_n_eig_ref + ! if(report.eqv..true.) then ! ! Write in the report the exciton energies @@ -103,7 +120,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN YAMBO_ALLOC(values,(EXCITONS_n_user_states+4)) allocate(headings(EXCITONS_n_user_states+4)) ! - call msg('nr','Excitons Energies:') + call msg('nr',exc_kind//'s Energies:') headings(1:3)=(/"q_x ("//trim(coo_out)//")","q_y ("//trim(coo_out)//")","q_z ("//trim(coo_out)//")"/) ! do i_c=1,EXCITONS_n_user_states @@ -130,7 +147,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN ! Fourier interpolation of exciton dispersion ! call INTERPOLATION_BZ_setup(q) - INTERP_obj(ID_INTERP_EXC)%what="excitons" + INTERP_obj(ID_INTERP_EXC)%what=exc_kind//"s" call INTERPOLATION_coefficients(R1D=BS_all_E,k=q,NK=q%nibz,ID=ID_INTERP_EXC,ID_obj=ID_INTERP_EXC) ! if(l_exc_occ_interp) then diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index 43e77d97ea..8ee9b6ed17 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -11,7 +11,7 @@ ! subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) ! - use pars, ONLY:pi + use pars, ONLY:SP,pi use R_lattice, ONLY:bz_samp use stderr, ONLY:intc use X_m, ONLY:X_reset @@ -21,7 +21,10 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) use IO_m, ONLY:OP_RD_CL,DUMP,NONE,REP,VERIFY use BS_solvers, ONLY:BSS_eh_table,BSS_write_eig_2_db,io_BSS_diago,BS_mat,BSS_n_eig use BS, ONLY:BS_H_dim,BS_K_dim,BS_bands,BS_K_coupling,BSqpts - use YPPm, ONLY:BS_R_left,BS_R_right,BS_E,BS_E_SOC_corr,BS_R_PL,BS_R_kerr,Xbsk + use YPPm, ONLY:BS_R_left,BS_R_right,BS_R_left_kerr,BS_R_right_kerr,& + & BS_R_left_magn,BS_R_right_magn,BS_R_right_dich,& + & BS_E,BS_E_SOC_corr,BS_R_PL,Xbsk,MAGNON_Res_threshold,& + & l_magnons use y_memory_alloc ! implicit none @@ -89,13 +92,19 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) YAMBO_ALLOC_P(BS_R_right,(BSS_n_eig)) YAMBO_ALLOC_P(BS_R_left,(BSS_n_eig)) YAMBO_ALLOC(BS_E,(BSS_n_eig)) + if (l_magnons) then + YAMBO_ALLOC_P(BS_R_right_magn,(BSS_n_eig,2)) + YAMBO_ALLOC_P(BS_R_left_magn,(BSS_n_eig,2)) + endif if(en%nb_SOC/=0) then YAMBO_ALLOC_P(BS_E_SOC_corr,(2/n_sp_pol,BSS_n_eig)) endif ! do i_sec=1,2 call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/i_sec/),ID=io_ID) - io_err=io_BSS_diago(iq,1,io_ID,Xbsk,BS_E,BS_R_left,BS_R_right,BsE_corr=BS_E_SOC_corr,bsR_kerr=BS_R_kerr,bsR_pl=BS_R_PL) + io_err=io_BSS_diago(iq,1,io_ID,Xbsk,bsE=BS_E,bsRl=BS_R_left,bsRr=BS_R_right,BsE_corr=BS_E_SOC_corr,& + & bsL_kerr=BS_R_left_kerr,bsR_kerr=BS_R_right_kerr,bsR_dich=BS_R_right_dich, & + bsL_magn=BS_R_left_magn,bsR_magn=BS_R_right_magn,bsR_pl=BS_R_PL) if (io_err/=0) then if(i_sec==1) then call warning('Error reading SEC1 in ndb.BSS_diago, this can be due to the missing ndb.dipoles or ndb.ems1') @@ -123,8 +132,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) YAMBO_ALLOC(BS_mat,(BS_H_dim,BSS_n_eig)) ! call io_control(ACTION=OP_RD_CL,COM=REP,MODE=VERIFY,SEC=(/3/),ID=io_ID) - io_err=io_BSS_diago(iq,1,io_ID,Xbsk,BS_E,BS_R_left,BS_R_right,& - & BsE_corr=BS_E_SOC_corr,bsR_kerr=BS_R_kerr,bsR_pl=BS_R_PL,BS_mat=BS_mat) + io_err=io_BSS_diago(iq,1,io_ID,Xbsk,BS_mat=BS_mat) if (io_err/=0) call error(' ndb.BSS_diago, SEC 3, not compatible with ypp input') ! ! Create the anti-resonant part of the eh_table @@ -150,6 +158,8 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) ! YAMBO_FREE_P(BS_R_left) YAMBO_FREE_P(BS_R_right) + YAMBO_FREE_P(BS_R_left_magn) + YAMBO_FREE_P(BS_R_right_magn) YAMBO_FREE(BS_E) YAMBO_FREE(BSS_eh_table) YAMBO_FREE(BS_mat) diff --git a/ypp/excitons/excitons_sort_and_report.F b/ypp/excitons/excitons_sort_and_report.F index d7b3a6789a..ef3ab5f248 100644 --- a/ypp/excitons/excitons_sort_and_report.F +++ b/ypp/excitons/excitons_sort_and_report.F @@ -3,9 +3,9 @@ ! ! Copyright (C) 2015 The Yambo Team ! -! Authors (see AUTHORS file for details): AM DV +! Authors (see AUTHORS file for details): AM DV DS ! -subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) +subroutine excitons_sort_and_report(iq,Res,BS_E,BS_E_SOC_corr,EXC_spin) ! use pars, ONLY:SP,schlen,pi,zero_dfl use units, ONLY:HA2EV @@ -23,7 +23,8 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) implicit none ! integer :: iq - complex(SP) :: BS_R(BSS_n_eig),BS_E(BSS_n_eig) + real(SP) :: Res(BSS_n_eig) + complex(SP) :: BS_E(BSS_n_eig) real(SP), optional, pointer :: BS_E_SOC_corr(:,:) type(EXCITON_spin),optional :: EXC_spin ! @@ -107,8 +108,8 @@ subroutine excitons_sort_and_report(iq,BS_R,BS_E,BS_E_SOC_corr,EXC_spin) titles(n_elements )='dE(2)[meV]' endif ! - Residuals(:) = real(BS_R(:)*conjg(BS_R(:)),SP) - if (write_widths) Residuals(:) = abs(BS_R(:)) + Residuals(:) = Res(:) + if (write_widths) Residuals(:) = sqrt(Res(:)) if(iq==1) q_norm=q0_def_norm**2 if(iq> 1) q_norm=iku_v_norm(BSqpts(:,iq))**2 Residuals(:) = Residuals(:)*real(spin_occ,SP)/(2._SP*pi)**3*d3k_factor*4._SP*pi/q_norm*HA2EV diff --git a/ypp/excitons/excitons_spin.F b/ypp/excitons/excitons_spin.F index 1cb5bc4895..af616d10ed 100644 --- a/ypp/excitons/excitons_spin.F +++ b/ypp/excitons/excitons_spin.F @@ -9,7 +9,7 @@ ! #include ! -subroutine excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) +subroutine excitons_spin(Xk,Res,BS_E,BS_E_degs) ! use pars, ONLY:SP,cZERO,rZERO use BS, ONLY:BS_bands @@ -32,7 +32,8 @@ subroutine excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) ! type(bz_samp) :: Xk integer :: BS_E_degs(BSS_n_eig) - complex(SP) :: BS_R_right(BSS_n_eig),BS_E(BSS_n_eig) + real(SP) :: Res(BSS_n_eig) + complex(SP) :: BS_E(BSS_n_eig) ! ! Work Space ! @@ -163,7 +164,7 @@ subroutine excitons_spin(Xk,BS_R_right,BS_E,BS_E_degs) ! Sorting & reporting' !===================== ! - call excitons_sort_and_report(BSiq,BS_R_right,BS_E,EXC_spin=EXC_spin) + call excitons_sort_and_report(BSiq,Res,BS_E,EXC_spin=EXC_spin) ! do i_c=1,EXCITONS_n_user_states ! diff --git a/ypp/interface/INIT_load_ypp.F b/ypp/interface/INIT_load_ypp.F index d5ec242a71..4ca306caf7 100644 --- a/ypp/interface/INIT_load_ypp.F +++ b/ypp/interface/INIT_load_ypp.F @@ -21,10 +21,10 @@ subroutine INIT_ypp_load(defs) & deg_energy,BANDS_steps,DOS_bands,DOS_broadening,PROJECT_path,QP_DB_to_expand,& & DOS_E_range,DOS_E_steps,EXCITON_E_treshold,EXCITON_Res_treshold,EXCITON_weight_treshold,& & INTERP_grid,mag_dir,N_path_pts,ncell,p_dir,p_format,PDOS_atoms,elec_spin,hole_spin,EXC_min,& -& PDOS_j,PDOS_wfcs,PDOS_kinds,PDOS_l,PDOS_m,perturbative_SOC_path,PtsPath,r_hole,seed_name,& +& PDOS_j,PDOS_wfcs,PDOS_kinds,PDOS_l,PDOS_m,perturbative_SOC_path,PtsPath,r_fixed,seed_name,& & SOC_bands_buffer,SOC_bands_to_map,SOC_split,state_ctl,AVE_exc,BSiq_via_command_line,& & WF_multiplier,WF_ref,what_to_write,BSiq,PROJECT_mode,PROJECT_N_perp,PROJECT_steps,PROJECT_threshold,& -& DIPs_direction,DIPs_E_range,DIPs_C_bands,DIPs_V_bands,DIPs_kind +& DIPs_direction,DIPs_E_range,DIPs_C_bands,DIPs_V_bands,DIPs_kind,center_kind,MAGNON_Res_threshold use YPP_symm, ONLY:wf_ng_cut #if defined _YPP_RT use YPPm, ONLY:Nel_fac @@ -257,6 +257,8 @@ subroutine INIT_ypp_load(defs) ! call it(defs,'Res_treshold', 'Select states above this optical strength treshold (max normalized to 1.)',& & EXCITON_Res_treshold,verb_level=V_general) + call it(defs,'MRes_threshold', 'Select states above this X+- strength treshold (max normalized to 1.)',& +& MAGNON_Res_threshold,verb_level=V_general) call it(defs,'En_treshold', 'Select states below this energy treshold',& & EXCITON_E_treshold,verb_level=V_general,unit=E_unit) call it(defs,'Weight_treshold', 'Print transitions above this weight treshold (max normalized to 1.)',& @@ -264,7 +266,9 @@ subroutine INIT_ypp_load(defs) call it(defs,'States','Index of the BS state(s)',state_ctl) call it(defs,'EHdensity', 'Calculate (h)ole/(e)lectron density from BSE wave-function',AVE_exc,case="a") call it(defs,'Cells', 'Number of cell repetitions in each direction (odd or 1)',ncell) - call it(defs,'Hole', '[cc] Hole position in unit cell (positive)',r_hole) + call it(defs,'Hole', '[cc] Hole/Elec position in unit cell (positive)',r_fixed) + !call it(defs,'PlotCenter', '[cc] Hole/Elec position in unit cell (positive)',r_fixed) + call it(defs,'CenterKind', 'Hole or Electron center is used ',center_kind) call it(defs,'HoleSpin', '[cc] The spin of the hole can be "up" "dn" "average" "diag"',hole_spin) call it(defs,'ElecSpin', '[cc] The spin of the elec can be "up" "dn" "average" "diag"',elec_spin) call it('f',defs,'PrtDOS', 'Print Exciton Density of States') diff --git a/ypp/interface/INIT_ypp.F b/ypp/interface/INIT_ypp.F index ad31cc8f71..78b1e8c4d7 100644 --- a/ypp/interface/INIT_ypp.F +++ b/ypp/interface/INIT_ypp.F @@ -13,7 +13,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) ! use units, ONLY:FS2AUT use YPPm, ONLY:l_plot,l_SOC_map,l_map_kpts,l_mag,l_k_grid,l_high_sym_pts,BSiq,& -& l_free_hole,l_fix_syms,l_excitons,l_dipoles,l_exc_wf,DIPs_kind,& +& l_free_hole,l_fix_syms,l_excitons,l_magnons,l_dipoles,l_exc_wf,DIPs_kind,& & l_amplitude,l_bands,l_bz_grids,l_current,BANDS_bands,BSiq_via_command_line,& & l_density,l_dos,l_electrons,l_q_grid,l_QP_DBs_create_and_modify,& & l_QP_DBs_manipulate,l_random_grid,l_shifted_grid,l_sort,l_sp_wf,l_spin,& @@ -263,7 +263,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) BSiq_via_command_line=.TRUE. if (l_sort) infile_editing=.false. endif - if ( trim(rstr_piece(i1)) == 'excitons') then + if ( trim(rstr_piece(i1)) == 'excitons' .or. trim(rstr_piece(i1)) == 'magnons') then l_wavefunction =STRING_match(rstr_piece(i1+1),'w') l_sort =STRING_match(rstr_piece(i1+1),'s').and..not.STRING_match(rstr_piece(i1+1),'sp') l_amplitude =STRING_match(rstr_piece(i1+1),'a') @@ -449,7 +449,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) l_gkkp_sngl =runlevel_is_on('gkkp_sngl') l_gkkp_dg =runlevel_is_on('gkkp_dg') l_gkkp_plot =runlevel_is_on('gkkp_plot') - l_ph_ass_dos=runlevel_is_on('ph_ass_dos').and.runlevel_is_on('excitons') + l_ph_ass_dos=runlevel_is_on('ph_ass_dos').and.(runlevel_is_on('excitons').or.runlevel_is_on('magnons')) #endif #if defined _YPP_RT ! @@ -484,6 +484,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif l_dipoles =runlevel_is_on('dipoles') l_excitons =runlevel_is_on('excitons') + l_magnons =runlevel_is_on('magnons') l_electrons=runlevel_is_on('electrons') l_plot=any((/runlevel_is_on('wavefunction'),runlevel_is_on('magnetization'),& & runlevel_is_on('density'),runlevel_is_on('current')/)) @@ -492,13 +493,13 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif #if defined _YPP_RT l_plot=l_plot .or. runlevel_is_on('RTdeltaRho') -#endif +#endif l_free_hole =runlevel_is_on('freehole') l_average_eh=runlevel_is_on('avehole') l_amplitude=runlevel_is_on('amplitude') - l_exc_wf =runlevel_is_on('wavefunction').and.runlevel_is_on('excitons') - l_interp =runlevel_is_on('interpolate').and.runlevel_is_on('excitons') - l_sp_wf =runlevel_is_on('wavefunction').and.runlevel_is_on('electrons') + l_exc_wf =runlevel_is_on('wavefunction').and.(runlevel_is_on('excitons').or.runlevel_is_on('magnons')) + l_interp =runlevel_is_on('interpolate').and.(runlevel_is_on('excitons').or.runlevel_is_on('magnons')) + l_sp_wf =runlevel_is_on('wavefunction').and. runlevel_is_on('electrons') l_density =runlevel_is_on('density').and.runlevel_is_on('electrons') l_current =runlevel_is_on('current').and.runlevel_is_on('electrons') l_mag =runlevel_is_on('magnetization') @@ -562,7 +563,8 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif ! ! Interpolation - l_flag=(l_dipoles.and.trim(DIPs_kind)=="IP").or.(l_electrons.and.l_dos).or.l_bands.or.(l_excitons.and.l_interp) + l_flag=(l_dipoles.and.trim(DIPs_kind)=="IP").or.(l_electrons.and.l_dos)& + & .or.l_bands.or.(l_excitons.and.l_interp).or.(l_magnons.and.l_interp) #if defined _YPP_RT l_flag=l_flag.or.(l_RealTime.and.(l_RT_bands.or.l_RT_dos.or.l_RT_G_two_times)) #endif @@ -574,7 +576,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) #endif if (l_flag) call initactivate(1,"INTERP_Grid") ! - if (l_excitons.and.l_interp) call initactivate(1,"BANDS_steps cooIn cooOut") + if ((l_excitons.or.l_magnons).and.l_interp) call initactivate(1,"BANDS_steps cooIn cooOut") l_flag=l_bands #if defined _YPP_RT l_flag=l_bands.or.l_RT_bands.or.l_RT_G_two_times @@ -690,13 +692,15 @@ subroutine INIT_ypp(E,instr,FINALIZE) if (l_current) call initactivate(1,'CurrentDir') endif ! - if (l_spin.and..not.l_excitons) call initactivate(1,"FFTGvecs") + if (l_spin.and..not.(l_excitons.or.l_magnons)) call initactivate(1,"FFTGvecs") ! - if (l_excitons) then + if (l_excitons.or.l_magnons) then call initactivate(1,"States En_treshold Res_treshold BSQindex") if (l_amplitude) call INIT_QP_ctl_switch('G') if (l_exc_wf.or.l_amplitude) call initactivate(1,"Degen_Step Weight_treshold") - if (l_exc_wf.and.(.not.l_free_hole.and..not.l_average_eh)) call initactivate(1,"Cells Hole Dimension") + if (l_exc_wf.and.(.not.l_free_hole.and..not.l_average_eh)) & + & call initactivate(1,"Cells Hole CenterKind Dimension") + !& call initactivate(1,"Cells PlotCenter CenterKind Dimension") if (l_exc_wf.and.(l_free_hole.or.l_average_eh)) call initactivate(1,"WFMult") if (l_exc_wf.and.l_average_eh) call initactivate(1,"EHdensity") if (l_exc_wf.and.n_spin>1) call initactivate(1,"ElecSpin HoleSpin") @@ -730,7 +734,7 @@ subroutine INIT_ypp(E,instr,FINALIZE) if (l_gkkp_dg) call initactivate(1,"FineGd_mode SkipBorderPts EkplusQmode TestPHDGrid") if (l_gkkp_plot) call initactivate(1,"Degen_Step cooOut") if (l_phonons.and.l_eliashberg) call initactivate(1,"EE_Fermi EfGbroad") - if ( ((l_excitons.or.l_electrons).and.l_eliashberg) .or. (l_phonons.and.l_dos) ) call initactivate(1,"PhBroad PhStps") + if ( ((l_excitons.or.l_magnons.or.l_electrons).and.l_eliashberg) .or. (l_phonons.and.l_dos) ) call initactivate(1,"PhBroad PhStps") #endif ! ! Check for existing QP control fields to be proposed in the new input files diff --git a/ypp/plotting/plot_cube.F b/ypp/plotting/plot_cube.F index b8eb9862be..85837fca94 100644 --- a/ypp/plotting/plot_cube.F +++ b/ypp/plotting/plot_cube.F @@ -11,7 +11,7 @@ subroutine plot_cube() use FFT_m, ONLY:fft_dim use C_driver, ONLY:code_version use com, ONLY:msg - use YPPm, ONLY:nr,v2plot,ncell,r_hole,l_free_hole,l_average_eh,& + use YPPm, ONLY:nr,v2plot,ncell,r_fixed,l_free_hole,l_average_eh,& & l_norm_to_one,WF_multiplier,l_exc_wf,plot_title,output_string use D_lattice, ONLY:n_atomic_species,n_atoms_species,a,atom_pos,Z_species,n_atoms use LIVE_t, ONLY:live_timing @@ -40,7 +40,7 @@ subroutine plot_cube() ! write the atoms position ! if ((.not.l_free_hole.and..not.l_average_eh).and.l_exc_wf) then - write(ch,'(2i5,3f10.5)') -1,-1,r_hole + write(ch,'(2i5,3f10.5)') -1,-1,r_fixed call msg(output_string,'',ch,INDENT=0,USE_TABS=.FALSE.) endif diff --git a/ypp/plotting/plot_gnuplot.F b/ypp/plotting/plot_gnuplot.F index ed59b09983..82dc84d447 100644 --- a/ypp/plotting/plot_gnuplot.F +++ b/ypp/plotting/plot_gnuplot.F @@ -14,7 +14,7 @@ subroutine plot_gnuplot(eval_only) use pars, ONLY:SP,schlen use units, ONLY:BO2ANG use com, ONLY:msg - use YPPm, ONLY:nr,v2plot,r_hole,v2plot2D,l_norm_to_one,WF_multiplier,plot_dim,& + use YPPm, ONLY:nr,v2plot,r_fixed,v2plot2D,l_norm_to_one,WF_multiplier,plot_dim,& & plot_title,output_string,l_wavefunction,l_current,use_xcrysden,& & plot_is_1D,plot_is_2D,l_free_hole,l_average_eh use LIVE_t, ONLY:live_timing @@ -50,7 +50,7 @@ subroutine plot_gnuplot(eval_only) ! SET CENTER OF THE PLOT ! r_plot_center=0. - if (.not.l_free_hole.and..not.l_average_eh) r_plot_center=r_hole + if (.not.l_free_hole.and..not.l_average_eh) r_plot_center=r_fixed ! ! DIMENSIONs ! diff --git a/ypp/plotting/plot_xcrysden.F b/ypp/plotting/plot_xcrysden.F index f57bc06c55..ec30db2181 100644 --- a/ypp/plotting/plot_xcrysden.F +++ b/ypp/plotting/plot_xcrysden.F @@ -15,7 +15,7 @@ subroutine plot_xcrysden() use units, ONLY:BO2ANG use C_driver, ONLY:code_version use com, ONLY:msg - use YPPm, ONLY:nr,v2plot,ncell,v2plot2D,r_hole,plot_dim,l_free_hole,l_average_eh,& + use YPPm, ONLY:nr,v2plot,ncell,v2plot2D,r_fixed,plot_dim,l_free_hole,l_average_eh,& & l_norm_to_one,WF_multiplier,l_exc_wf,plot_title,output_string,plot_is_2D use D_lattice, ONLY:n_atomic_species,n_atoms_species,a,atom_pos,Z_species,n_atoms use LIVE_t, ONLY:live_timing @@ -49,7 +49,7 @@ subroutine plot_xcrysden() ! ! write Hole position ! - write(ch,'(i2,f10.5,f10.5,f10.5)') -1,r_hole*BO2ANG + write(ch,'(i2,f10.5,f10.5,f10.5)') -1,r_fixed*BO2ANG call msg(output_string,'',ch,INDENT=0,USE_TABS=.FALSE.) else call msg(output_string,'',(/n_atoms*ncell(1)*ncell(2)*ncell(3),1/)) From 1d643b69eea6f7c42512ac9d9a632214fd070690 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 3 Nov 2025 22:58:45 +0100 Subject: [PATCH 1259/1367] aesthetic fix --- src/bse/K_kernel.F | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 6fd444697a..8487c92928 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -199,7 +199,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) endif l_bs_tddft_wf_in_loop= ((iq==1) .and. (Xk%nbz>=1).and.(.not.trim(PARALLEL_default_mode)=="workload") ) .or. & & ((iq> 1) .and. trim(PARALLEL_default_mode)=="KQmemory" ) - call msg('r','[BSE] ALDA components ',BS_n_g_fxc) + call msg('r','[BSE] ALDA components ',BS_n_g_fxc) endif ! if (l_bs_corr) then @@ -217,8 +217,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) call msg('r','[BSE] Correlation components ',(/BS_n_g_W,O_ng/)) endif ! - if (BS_K_is_ALDA) call msg('r','[BSE] ALDA components ',BS_n_g_fxc) - ! call K_restart(iq,X,BS_ID(1),BS_ID(2),BS_ID(3),l_partial_kernel_loaded) ID_head =BS_ID(1) ID =BS_ID(2) From 7d152e686cbcb6367284429b24e936d1a67d3677 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 4 Nov 2025 10:45:32 +0100 Subject: [PATCH 1260/1367] Fixed compilation with cuda fortran --- src/wf_and_fft/WF_apply_symm.F | 27 ++++++++++++++++++++------- src/wf_and_fft/WF_load.F | 32 +++++++++++++++++--------------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index 3b2d4d51e3..af6f63cdee 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -20,7 +20,7 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) use parallel_m, ONLY:myid use electrons, ONLY:n_spinor use D_lattice, ONLY:nsym,DEV_VAR(spin_sop),i_time_rev,idt_index - use devxlib, ONLY:devxlib_memcpy_d2d,devxlib_conjg_d + use devxlib, ONLY:devxlib_conjg_d !,devxlib_memcpy_d2d ! implicit none ! @@ -44,12 +44,25 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) ! if(isc(3)==idt_index) then ! - ! dev2dev copy -#ifdef _GPU_LOC - call devxlib_memcpy_d2d(WF_symm,cmplx(WF_p,kind=SP)) -#else - WF_symm=cmplx(WF_p,kind=SP) -#endif + ! 2025/11/04 + ! In GAMMA ONLY mode WF_p is real and I cannot use the casting + ! inside the call to dexlib_memcpy_d2d. + ! To simplify the code (i.e. to avoid defined _GAMMA & _CUDA nested if) + ! I do an explicit loop. To check the efficiency compared to + ! call devxlib_memcpy_d2d(WF_symm,WF_p) + ! + !DEV_ACC_DEBUG data present(WF_p,WF_symm) + !DEV_ACC parallel loop + !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_OMPGPU target map(present,alloc:WF_p,WF_symm) + !DEV_OMPGPU teams loop + !DEV_OMP parallel do default(shared), private(ifft) + do ifft = 1, fft_size + WF_symm(ifft,1)=cmplx(WF_p(ifft,1),kind=SP) + enddo + !DEV_OMPGPU end target + !DEV_ACC_DEBUG end data + ! return ! endif diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index c35d50ce6c..7234dec75c 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -45,7 +45,7 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! use FFT_m, ONLY:fft_dim_loaded,fft_dim,fft_norm,fft_g_table,fft_size,& !& fftw_plan,cufft_plan,hipfft_plan,mklgpu_desc,DEV_VAR(fft_g_table) use wave_func, ONLY:wf_nc_k,wf_igk,DEV_VAR(wf_igk),WF_buffer,rho_map,& -& wf_ng,wf_norm_test,wf_ncx,io_WF,wf_b_indx,& +& wf_ng,wf_norm_test,wf_ncx,io_WF,wf_b_indx,rho_map_size,& & wf_nb_io,wf_nb_to_load,wf_nb_io_groups,WAVEs,states_to_load use IO_int, ONLY:io_control,IO_and_Messaging_switch use IO_m, ONLY:OP_RD,NONE,VERIFY,RD,RD_CL,DUMP @@ -430,18 +430,18 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load #endif WF_N = WF%N ! - if(allocated(rho_map)) then - !DEV_ACC_DEBUG data present(wfc_p,wf_DP) - !DEV_ACC parallel loop - !DEV_CUF kernel do(1) - !DEV_OMPGPU target map(present,alloc:wfc_p,wf_DP) - !DEV_OMPGPU teams loop - do ic=1,rho_map_size - wfr_p(ic,i_spinor,WF_N)=cmplx(DEV_VAR(wf_DP)(rho_map(ic)),kind=SP)*fft_norm - enddo - !DEV_OMPGPU end target - !DEV_ACC_DEBUG end data - else + !if(allocated(rho_map)) then + ! !DEV_ACC_DEBUG data present(wfc_p,wf_DP) + ! !DEV_ACC parallel loop + ! !DEV_CUF kernel do(1) + ! !DEV_OMPGPU target map(present,alloc:wfc_p,wf_DP) + ! !DEV_OMPGPU teams loop + ! do ic=1,rho_map_size + ! wfr_p(ic,i_spinor,WF_N)=cmplx(DEV_VAR(wf_DP)(rho_map(ic)),kind=SP)*fft_norm + ! enddo + ! !DEV_OMPGPU end target + ! !DEV_ACC_DEBUG end data + !else !DEV_ACC_DEBUG data present(wfc_p,wf_DP) !DEV_ACC parallel loop !DEV_CUF kernel do(1) @@ -452,8 +452,8 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load enddo !DEV_OMPGPU end target !DEV_ACC_DEBUG end data - endif - ! + !endif + ! enddo ! i_spinor ! else @@ -488,7 +488,9 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! call fft_3d(wf_DP,fft_dim,+2) #endif +#if !defined _GPU if( allocated(rho_map)) WF%r(:,i_spinor,WF%N)=wfcmplx(wf_DP(rho_map(:)),kind=SP)*fft_norm +#endif if(.not.allocated(rho_map)) WF%r(:,i_spinor,WF%N)=wfcmplx(wf_DP(:) ,kind=SP)*fft_norm ! enddo ! i_spinor From 17fb1812b3820655852db6057d1c8728c6eba748 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 4 Nov 2025 10:55:40 +0100 Subject: [PATCH 1261/1367] Added error message for GPU ported compilation combined with --enable-gamma-only option --- driver/yambo.F | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/driver/yambo.F b/driver/yambo.F index 22cc1d7871..a4656de8e0 100644 --- a/driver/yambo.F +++ b/driver/yambo.F @@ -72,7 +72,11 @@ integer function yambo(np,pid,lnstr,iinf,iind,iod,icd,ijs,instr,inf,ind,od,com_d myid = pid infile = inf yambo = 0 - iinf = 0 + iinf = 0 + ! +#if defined _GPU && defined _GAMMA_ONLY + call error("Gamma only mode is not compatible with GPU porting") +#endif ! ! ... Internal Defaults ! From 97935e3445a62381e7ccb7bfd8d0997449c07a1a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 12:27:10 +0100 Subject: [PATCH 1262/1367] Version 5.3.0, Revision 26221, Hash 9c3e5321b6 MODIFIED * include/version/version.m4 acfdt/acfdt_tot_energy.F bse/K_inversion_Lo.F bse/K_screened_interaction.F collisions/COLLISIONS_NEQ_GW_static.F collisions/LSEX_potential.F collisions/OSCLL_compose_collision.F collisions/OSCLL_compose_vbands.F common/FREQUENCIES_coarse_grid.F common/FREQUENCIES_setup.F common/G_rot_grid.F common/OBS_rotate.F common/eval_Gradient.F coulomb/cutoff_cylinder.F coulomb/cutoff_ws.F dipoles/DIPOLE_kb_sum.F el-ph/ELPH_gsqF_to_Sigma.F exc-ph/EXCPH_gkkp_eval.F hamiltonian/V_real_space_to_H.F io/io_DB1_selective_scan.F io/io_SC_components.F modules/mod_global_XC.F modules/mod_vec_operate.F modules/mod_zeros.F nloptics/INVINT_step.F nloptics/NL_driver.F nloptics/NL_start_and_restart.F pol_function/X_delta_part.F qp/QP_mpa.F Bugs: - Additions: - Changes: -First file changed from FORALL to DO CONCURRENT Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/acfdt/acfdt_tot_energy.F | 4 +++- src/bse/K_inversion_Lo.F | 6 ++++-- src/bse/K_screened_interaction.F | 4 +++- src/collisions/COLLISIONS_NEQ_GW_static.F | 4 +++- src/collisions/LSEX_potential.F | 14 +++++--------- src/collisions/OSCLL_compose_collision.F | 12 ++++-------- src/collisions/OSCLL_compose_vbands.F | 12 ++++-------- src/common/FREQUENCIES_coarse_grid.F | 10 +++++++--- src/common/FREQUENCIES_setup.F | 4 +++- src/common/G_rot_grid.F | 12 ++++++++++-- src/common/OBS_rotate.F | 6 +++++- src/common/eval_Gradient.F | 4 +++- src/coulomb/cutoff_cylinder.F | 4 +++- src/coulomb/cutoff_ws.F | 4 +++- src/dipoles/DIPOLE_kb_sum.F | 4 +++- src/el-ph/ELPH_gsqF_to_Sigma.F | 4 +++- src/exc-ph/EXCPH_gkkp_eval.F | 6 +++--- src/hamiltonian/V_real_space_to_H.F | 4 +++- src/io/io_DB1_selective_scan.F | 4 +++- src/io/io_SC_components.F | 5 +++-- src/modules/mod_global_XC.F | 4 +++- src/modules/mod_vec_operate.F | 18 ++++++++++++++---- src/modules/mod_zeros.F | 8 ++++++-- src/nloptics/INVINT_step.F | 4 +++- src/nloptics/NL_driver.F | 4 +++- src/nloptics/NL_start_and_restart.F | 4 +++- src/pol_function/X_delta_part.F | 16 ++++++++++------ src/qp/QP_mpa.F | 8 ++++++-- 29 files changed, 129 insertions(+), 70 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 6de3030ded..7d685d1426 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.25862 h.5b4d65cb5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26221 h.9c3e5321b6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25862" -SHASH="5b4d65cb5" +SREVISION="26221" +SHASH="9c3e5321b6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/acfdt/acfdt_tot_energy.F b/src/acfdt/acfdt_tot_energy.F index 314074d1b0..b6edd5be0b 100644 --- a/src/acfdt/acfdt_tot_energy.F +++ b/src/acfdt/acfdt_tot_energy.F @@ -227,7 +227,9 @@ subroutine acfdt_tot_energy(Xen,Xk,En,k,q,X,Dip) enddo call LINEAR_ALGEBRA_driver(INV,M=tddftk,lib_in=USE_LK) X_s=matmul(tddftk,X_mat(:,:,iw)) - forall(i1=1:X%ng) dX(i1)=(X_s(i1,i1)-X_mat(i1,i1,iw))*4.*pi*isc%gamp(i1,1) + do concurrent (i1=1:X%ng) + dX(i1)=(X_s(i1,i1)-X_mat(i1,i1,iw))*4.*pi*isc%gamp(i1,1) + enddo ACFDT_Ec=ACFDT_Ec-q%nstar(iqibz)*lambda_weight(il)*freq_weight(iw)*sum(dX) call live_timing(steps=1) enddo diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index fdad1c472c..4565a53f6d 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -144,8 +144,10 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) if ( allocated(BSS_eh_W)) E_plus_W=BSS_eh_E(i_res)-cI*BSS_eh_W(i_res) ! if(i_loop==2) then - forall(iw=1:W%n_freqs) W_mins%p(iw)=W%p(iw)-BS_diagonal(i_res)*BSS_eh_f(i_res) - forall(iw=1:W%n_freqs) W_plus%p(iw)=W%p(iw)+BS_diagonal(i_res)*BSS_eh_f(i_res) + do concurrent (iw=1:W%n_freqs) + W_mins%p(iw)=W%p(iw)-BS_diagonal(i_res)*BSS_eh_f(i_res) + W_plus%p(iw)=W%p(iw)+BS_diagonal(i_res)*BSS_eh_f(i_res) + enddo endif ! if ( .not.allocated(E%GreenF) ) then diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index d71737cb8f..eaa075515f 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -147,7 +147,9 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) return endif ! - forall(i_g2=1:X%ng) X_mat(i_g2,i_g2,1)=X_mat(i_g2,i_g2,1)+1._SP + do concurrent (i_g2=1:X%ng) + X_mat(i_g2,i_g2,1)=X_mat(i_g2,i_g2,1)+1._SP + enddo ! ! device <- host transfer if (have_gpu) call devxlib_memcpy_h2d(X_mat_p,X_mat) diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index dd9b17e869..2232d79928 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -157,7 +157,9 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! ! Poles and Residuals ! - forall(i1=1:X%ng) X_mat(i1,i1,1)=X_mat(i1,i1,1)+1._SP + do concurrent (i1=1:X%ng) + X_mat(i1,i1,1)=X_mat(i1,i1,1)+1._SP + enddo ! #if defined _OPENMP !$omp parallel do default(shared), private(i1,i2) diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index 588c3b8459..7e0f8b402e 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -85,11 +85,9 @@ subroutine LSEX_potential(q,X,Xw) ! ! The bare exchange v ! -!$OMP WORKSHARE - forall(ig1=1:X%ng) + do concurrent (ig1=1:X%ng) W(iqbz,ig1,ig1)=-4._SP/spin_occ*pi*isc%gamp(ig1,ig1) - end forall -!$OMP END WORKSHARE + enddo ! if(Correlation==LSEX) then ! @@ -108,11 +106,9 @@ subroutine LSEX_potential(q,X,Xw) ! ! Screened part of the exchange \tilde W = W - v ! -!$OMP WORKSHARE - forall(ig1=1:X%ng,ig2=1:X%ng) - W(iqbz,ig1,ig2)=W(iqbz,ig1,ig2)-4._SP/spin_occ*pi*X_mat(ig1,ig2,1)*isc%gamp(ig1,ig2) - end forall -!$OMP END WORKSHARE + do concurrent (ig1=1:X%ng,ig2=1:X%ng) + W(iqbz,ig1,ig2)=W(iqbz,ig1,ig2)-4._SP/spin_occ*pi*X_mat(ig1,ig2,1)*isc%gamp(ig1,ig2) + enddo ! endif ! diff --git a/src/collisions/OSCLL_compose_collision.F b/src/collisions/OSCLL_compose_collision.F index c223dce761..43b8262257 100644 --- a/src/collisions/OSCLL_compose_collision.F +++ b/src/collisions/OSCLL_compose_collision.F @@ -75,23 +75,19 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,i_sp,COLL) ! do ig1=1,ng_oscll do ig2=1,ng_oscll -!$OMP WORKSHARE - forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) + do concurrent (ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib ,ik_mem,i_sp,iqbz,ig2)* & & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig2,ig1) - end forall -!$OMP END WORKSHARE + enddo enddo enddo ! elseif(Correlation==LHF) then do ig1=1,ng_oscll -!$OMP WORKSHARE - forall(ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) + do concurrent (ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib,ik_mem,i_sp,iqbz,ig1)* & & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig1,ig1) - end forall -!$OMP END WORKSHARE + enddo enddo endif ! diff --git a/src/collisions/OSCLL_compose_vbands.F b/src/collisions/OSCLL_compose_vbands.F index 3245d7a292..aa001cc07a 100644 --- a/src/collisions/OSCLL_compose_vbands.F +++ b/src/collisions/OSCLL_compose_vbands.F @@ -75,11 +75,9 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) ! ! Build Oscillators for the time-dependent valence bands ! -!$OMP WORKSHARE -forall(iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) + do concurrent (iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,i_sp_pol,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) - end forall -!$OMP END WORKSHARE + enddo ! ! Remove equilibrium Sigma-sex ! @@ -90,11 +88,9 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) do i_n=NL_bands(1),NL_bands(2) do i_m=i_n,NL_bands(2) ! -!$OMP WORKSHARE - forall(iqbz=1:q%nbz,ig1=1:ng_oscll,ig2=1:ng_oscll) + do concurrent (iqbz=1:q%nbz,ig1=1:ng_oscll,ig2=1:ng_oscll) OSCLL_sum(iqbz,ig1,ig2)=dot_product(OSCLL_val(:,i_m,ig2,iqbz),OSCLL_val(:,i_n,ig2,iqbz)) - end forall -!$OMP END WORKSHARE + enddo ! #if defined _DOUBLE H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)+spin_occ*ZDOTU(q%nbz*ng_oscll**2,OSCLL_sum,1,W,1) diff --git a/src/common/FREQUENCIES_coarse_grid.F b/src/common/FREQUENCIES_coarse_grid.F index dc4a83cda2..4ec2bf60f7 100644 --- a/src/common/FREQUENCIES_coarse_grid.F +++ b/src/common/FREQUENCIES_coarse_grid.F @@ -83,8 +83,10 @@ subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) coarse_grid_N=npts bare_grid_N=1 coarse_grid_Pt=bg_pt - forall ( i_bg=1:npts) ordered_grid_index(i_bg)=i_bg - forall ( i_bg=1:npts) coarse_grid_index(i_bg)=i_bg + do concurrent ( i_bg=1:npts) + ordered_grid_index(i_bg)=i_bg + coarse_grid_index(i_bg) =i_bg + enddo return endif ! @@ -177,7 +179,9 @@ subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) i_vec(i_bg)=i_cg enddo enddo - forall(i_bg=1:npts) coarse_grid_index(i_bg)=i_vec( ordered_grid_index(i_bg) ) + do concurrent (i_bg=1:npts) + coarse_grid_index(i_bg)=i_vec( ordered_grid_index(i_bg) ) + enddo YAMBO_FREE(i_vec) ! if(.not.trim(title)=='COLL') then diff --git a/src/common/FREQUENCIES_setup.F b/src/common/FREQUENCIES_setup.F index df5d4fcdb6..90c09ed026 100644 --- a/src/common/FREQUENCIES_setup.F +++ b/src/common/FREQUENCIES_setup.F @@ -74,7 +74,9 @@ subroutine FREQUENCIES_setup(W) ! delta_w=(W%er(2)-W%er(1))/(W%n_freqs-1) ! - forall(i1=1:W%n_freqs-1) W%p(i1+1)=cmplx(W%er(1)+delta_w*real(i1,SP),0.,SP) + do concurrent (i1=1:W%n_freqs-1) + W%p(i1+1)=cmplx(W%er(1)+delta_w*real(i1,SP),0.,SP) + enddo ! do i1=1,W%n_freqs W%p(i1)=real(W%p(i1))+FREQUENCIES_damping(W,real(W%p(i1)))*cI diff --git a/src/common/G_rot_grid.F b/src/common/G_rot_grid.F index a5a694ddc9..a2d469f978 100644 --- a/src/common/G_rot_grid.F +++ b/src/common/G_rot_grid.F @@ -38,8 +38,16 @@ subroutine G_rot_grid(is,call_kind) ! identity=reshape((/ 1._SP, 0._SP, 0._SP, 0._SP, 1._SP, 0._SP, 0._SP, 0._SP, 1._SP/),(/3,3/)) ! - if(is>0) forall (i2=1:3,i3=1:3) rl_sop_local(i2,i3)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) - if(is<0) forall (i2=1:3,i3=1:3) rl_sop_local(i2,i3)=-identity(i2,i3)*alat(i2)/alat(i3) + if(is>0) then + do concurrent (i2=1:3,i3=1:3) + rl_sop_local(i2,i3)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) + enddo + endif + if(is<0) then + do concurrent (i2=1:3,i3=1:3) + rl_sop_local(i2,i3)=-identity(i2,i3)*alat(i2)/alat(i3) + enddo + endif ! rl_sop_square=matmul(rl_sop_local,rl_sop_local) ! diff --git a/src/common/OBS_rotate.F b/src/common/OBS_rotate.F index 6c5756ba97..186183c341 100644 --- a/src/common/OBS_rotate.F +++ b/src/common/OBS_rotate.F @@ -37,7 +37,11 @@ subroutine OBS_rotate(R,O,N,direction) complex(SP) :: O_rot(N,N),R_(N,N) ! if (direction == 1) R_=R - if (direction == -1) forall(i=1:N,j=1:N) R_(i,j)=conjg(R(j,i)) + if (direction == -1) then + do concurrent (i=1:N,j=1:N) + R_(i,j)=conjg(R(j,i)) + enddo + endif ! ! [1] O_rot = (R_^{\dagger}) O ! diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index 1d9fae06c9..c9115948e8 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -54,7 +54,9 @@ subroutine eval_Gradient(f,f_gradient,ng_) call fft_3d(Vr,fft_dim,-1) #endif ! - forall (ic=1:3,ig=1:ng_) V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) + do concurrent (ic=1:3,ig=1:ng_) + V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) + enddo ! do ic = 1,3 Vr = cZERO_DP diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index 1a5de6b031..ef58528b02 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -125,7 +125,9 @@ subroutine cutoff_cylinder(q,is_cut) ! call live_timing() ! - forall (iq=1:q%nibz,ig=1:wf_ng) bare_qpg(iq,ig)=sqrt(1./V_cut(iq,ig)) + do concurrent (iq=1:q%nibz,ig=1:wf_ng) + bare_qpg(iq,ig)=sqrt(1._SP/V_cut(iq,ig)) + enddo ! ! cleanup call PP_indexes_reset(px) diff --git a/src/coulomb/cutoff_ws.F b/src/coulomb/cutoff_ws.F index d4b862cdbc..4448216c79 100644 --- a/src/coulomb/cutoff_ws.F +++ b/src/coulomb/cutoff_ws.F @@ -97,7 +97,9 @@ subroutine cutoff_ws(q) ! call PP_redux_wait(V_cut) ! - forall (iq=1:q%nibz,ig=1:wf_ng) bare_qpg(iq,ig)=sqrt(1.0_SP/V_cut(iq,ig)) + do concurrent (iq=1:q%nibz,ig=1:wf_ng) + bare_qpg(iq,ig)=sqrt(1.0_SP/V_cut(iq,ig)) + enddo ! ! cleanup ! diff --git a/src/dipoles/DIPOLE_kb_sum.F b/src/dipoles/DIPOLE_kb_sum.F index 4e3d63b68f..ea4b01f79e 100644 --- a/src/dipoles/DIPOLE_kb_sum.F +++ b/src/dipoles/DIPOLE_kb_sum.F @@ -108,7 +108,9 @@ subroutine DIPOLE_kb_sum(rho,pp_dim_yambo,ib_range,iv,ic,XX) !DEV_ACC_DEBUG end data ! call devxlib_memcpy_d2h(drho_loc,drho) - forall(i1=1:3) rho(i1)=rho(i1)+sum(drho_loc(:,i1,:)) + do concurrent (i1=1:3) + rho(i1)=rho(i1)+sum(drho_loc(:,i1,:)) + enddo ! end subroutine DIPOLE_kb_sum diff --git a/src/el-ph/ELPH_gsqF_to_Sigma.F b/src/el-ph/ELPH_gsqF_to_Sigma.F index 4d00dcfdf6..0f882cce4d 100644 --- a/src/el-ph/ELPH_gsqF_to_Sigma.F +++ b/src/el-ph/ELPH_gsqF_to_Sigma.F @@ -72,7 +72,9 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! ! Overwrites the damping defined in FREQUENCIES_Green_Function ! - forall(iw=1:QP_Sc_steps) Sc_local_W%p(iw)= real( Sc_local_W%p(iw)) + cmplx(0._SP,0.00001_SP/HA2EV) + do concurrent (iw=1:QP_Sc_steps) + Sc_local_W%p(iw)= real( Sc_local_W%p(iw)) + cmplx(0._SP,0.00001_SP/HA2EV) + enddo endif ! ib =QP_table(i_qp,1) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index 47174c8d63..aa24c601b5 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -190,8 +190,8 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! Compute the squared couplings (to be removed) ! - forall(i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) - EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 - end forall + do concurrent (i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) + EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha),SP)**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 + enddo ! end subroutine diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index 776ff82ae7..7ceb999453 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -53,8 +53,10 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) V_mat=cZERO if(index(V_kind,"xc") >0) call Build_V_xc_mat(Vxc,V_mat) if(index(V_kind,"def")>0) then - forall(i_spinor=1:n_spinor) V_mat(:,i_sp_pol+i_spinor-1,i_sp_pol+i_spinor-1)= & + do concurrent (i_spinor=1:n_spinor) + V_mat(:,i_sp_pol+i_spinor-1,i_sp_pol+i_spinor-1)= & & V_mat(:,i_sp_pol+i_spinor-1,i_sp_pol+i_spinor-1)+V(:,i_sp_pol+i_spinor-1) + enddo endif ! PAR_IND_local=.true. diff --git a/src/io/io_DB1_selective_scan.F b/src/io/io_DB1_selective_scan.F index c16d360b3a..4cf2fef795 100644 --- a/src/io/io_DB1_selective_scan.F +++ b/src/io/io_DB1_selective_scan.F @@ -133,7 +133,9 @@ integer function io_DB1_selective_scan(what,DB1_path,E,k,db1_alat,db1_a,COM_mode ! if (what=='all'.and.io_DB1_selective_scan>=0) then YAMBO_ALLOC(rl_sop,(3,3,nsym)) - forall (i1=1:3,i2=1:3,is=1:nsym) rl_sop(i1,i2,is)=dl_sop(i1,i2,is)*alat(i1)/alat(i2) + do concurrent (i1=1:3,i2=1:3,is=1:nsym) + rl_sop(i1,i2,is)=dl_sop(i1,i2,is)*alat(i1)/alat(i2) + enddo endif ! core_io_path=core_io_path_save diff --git a/src/io/io_SC_components.F b/src/io/io_SC_components.F index cb4fa2181c..c0227e060d 100644 --- a/src/io/io_SC_components.F +++ b/src/io/io_SC_components.F @@ -168,8 +168,9 @@ integer function io_SC_components(what,E_sc,ID) ! E_tmp=E_tmp+E_sc%E(SC_bands(2),:,:) ! - forall (ib=SC_bands(2)+1:bands_to_load) & - & E_sc%E(ib,:,:)=E_sc%E(ib,:,:)+ E_tmp(:,:) + do concurrent (ib=SC_bands(2)+1:bands_to_load) + E_sc%E(ib,:,:)=E_sc%E(ib,:,:)+ E_tmp(:,:) + enddo ! YAMBO_FREE(E_tmp) ! diff --git a/src/modules/mod_global_XC.F b/src/modules/mod_global_XC.F index f6f65f7241..510ca2ddbd 100644 --- a/src/modules/mod_global_XC.F +++ b/src/modules/mod_global_XC.F @@ -186,7 +186,9 @@ subroutine correct_global_XC(what,STRING) ! if (what=='E'.or.what=='G') G_E_xc_string= trim(G_E_xc_string)//"+"//STRING if (what=='X') then - forall(i_X=1:size(X_E_xc_string)) X_E_xc_string(i_X)= trim(X_E_xc_string(i_X))//"+"//STRING + do concurrent (i_X=1:size(X_E_xc_string)) + X_E_xc_string(i_X)= trim(X_E_xc_string(i_X))//"+"//STRING + enddo endif if (what=='K') K_E_xc_string= trim(K_E_xc_string)//"+"//STRING if (what=='WF') loaded_WF_xc_string=trim(loaded_WF_xc_string)//"+"//STRING diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index e9dfa32b73..075cfee232 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -213,8 +213,10 @@ function axis_rotation(axis, vec, angle) ! Cross product ! U_cross=rZERO - forall (i=1:3,j=1:3) U_cross(i,j) = axis(i)*axis(j) - R=R+(1.0-cos(angle))*U_cross + do concurrent (i=1:3,j=1:3) + U_cross(i,j) = axis(i)*axis(j) + enddo + R=R+(1.0_SP-cos(angle))*U_cross ! axis_rotation=matmul(R,vec) ! @@ -589,7 +591,11 @@ subroutine r_sort(arrin,arrout,indx,indx_m1,r_zero) if (present(arrout)) arrout=l_arrout if (.not.present(arrout)) arrin=l_arrout if (present(indx)) indx=l_indx - if (present(indx_m1)) forall( i=1:n) indx_m1(l_indx(i))=i + if (present(indx_m1)) then + do concurrent ( i=1:n) + indx_m1(l_indx(i))=i + enddo + endif deallocate(l_indx,l_arrout) end subroutine r_sort ! @@ -688,7 +694,11 @@ subroutine i_sort(arrin,arrout,indx,indx_m1) if ( present(arrout) ) arrout=l_arrout if (.not.present(arrout) ) arrin =l_arrout if ( present(indx) ) indx =l_indx - if ( present(indx_m1)) forall( i=1:n) indx_m1(l_indx(i))=i + if ( present(indx_m1)) then + do concurrent ( i=1:n) + indx_m1(l_indx(i))=i + enddo + endif deallocate(l_indx,l_arrout) end subroutine i_sort ! diff --git a/src/modules/mod_zeros.F b/src/modules/mod_zeros.F index 1a98a1755b..82e426a1e2 100644 --- a/src/modules/mod_zeros.F +++ b/src/modules/mod_zeros.F @@ -55,9 +55,13 @@ subroutine define_zeros(vector_,ref_value,zero_,RLU) allocate(tmp_arr(size(vector_,1))) do ic=1,3 if (allocated(vector_rlu)) then - forall(i1=1:nv) tmp_arr(i1)=abs(vector_rlu(i1,ic)) + do concurrent (i1=1:nv) + tmp_arr(i1)=abs(vector_rlu(i1,ic)) + enddo else - forall(i1=1:nv) tmp_arr(i1)=abs(vector_(i1,ic)) + do concurrent (i1=1:nv) + tmp_arr(i1)=abs(vector_(i1,ic)) + enddo endif call sort(tmp_arr) zero_(ic)=zero_dfl diff --git a/src/nloptics/INVINT_step.F b/src/nloptics/INVINT_step.F index 83dadbe978..66e34470db 100644 --- a/src/nloptics/INVINT_step.F +++ b/src/nloptics/INVINT_step.F @@ -38,7 +38,9 @@ subroutine INVINT_step(V_out,V_in,H_in,I_in,nbf,dT) do ib=1,nbf ! Hp=cZERO - forall(i1=NL_bands(1):NL_bands(2)) Hp(i1,i1)=cONE + do concurrent (i1=NL_bands(1):NL_bands(2)) + Hp(i1,i1)=cONE + end do Hm=Hp ! Hm=Hm-cI*dT/2._SP*(H_in+I_in) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index ccd02876ea..13265e642b 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -286,7 +286,9 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ================ V_bands=cZERO do i_sp_pol=1,n_sp_pol - forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE + do concurrent (i1=1:E%nbf(n_sp_pol)) + V_bands(i1,i1,:,i_sp_pol)=cONE + end do enddo ! endif diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index c1c70797ca..6a55794274 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -79,7 +79,9 @@ subroutine NL_start_and_restart(E,k,Dip) & call error(" Wrong bands range!") ! do i_sp_pol=1,n_sp_pol - forall(i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE + do concurrent (i1=1:E%nbf(n_sp_pol)) + V_bands(i1,i1,:,i_sp_pol)=cONE + end do enddo ! if(Correlation/=IPA.and..not.COLLISIONS_have_HARTREE.and.(eval_HARTREE.or.eval_DFT)) then diff --git a/src/pol_function/X_delta_part.F b/src/pol_function/X_delta_part.F index 675aae8ba4..6fb12870ef 100644 --- a/src/pol_function/X_delta_part.F +++ b/src/pol_function/X_delta_part.F @@ -52,14 +52,18 @@ subroutine X_delta_part(NG,NW,X,Gamp) complex(SP):: Xt(NG,NG) ! if (i_space_inv==1) then - forall(i1=1:NG,i2=1:NG,i3=1:NW) & -& X(i1,i2,i3)=aimag(X(i1,i2,i3))*Gamp(i1,i2) + do concurrent (i1=1:NG,i2=1:NG,i3=1:NW) + X(i1,i2,i3)=aimag(X(i1,i2,i3))*Gamp(i1,i2) + enddo else do i3=1,NW - forall(i1=1:NG,i2=1:NG) Xt(i1,i2) =X(i1,i2,i3)*Gamp(i1,i2) - forall(i1=1:NG,i2=1:NG) X(i1,i2,i3)=& -& 0.5*aimag(Xt(i1,i2)+Xt(i2,i1))-& -& (0.,0.5)* real(Xt(i1,i2)-Xt(i2,i1)) + do concurrent (i1=1:NG,i2=1:NG) + Xt(i1,i2) =X(i1,i2,i3)*Gamp(i1,i2) + enddo + do concurrent (i1=1:NG,i2=1:NG) + X(i1,i2,i3)=0.5_SP*aimag(Xt(i1,i2)+Xt(i2,i1))-& +& (0._SP,0.5_SP)* real(Xt(i1,i2)-Xt(i2,i1)) + enddo enddo endif ! diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index a09f59f85d..f1d4e57937 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -126,7 +126,9 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - forall (i_w=1:QP_dSc_steps) Sc_W(i_qp)%p(i_w)=qp%E_bare(i_qp)+(i_w-1)*QP_dSc_delta + do concurrent (i_w=1:QP_dSc_steps) + Sc_W(i_qp)%p(i_w)=qp%E_bare(i_qp)+(i_w-1)*QP_dSc_delta + enddo enddo ! else if (trim(QP_solver)=='g') then @@ -519,7 +521,9 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) iscp%qs=isc%qs ! ! DALV: here the grid is centered in E0 - forall (i_w=1:QP_dSc_steps) W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp + do concurrent (i_w=1:QP_dSc_steps) + W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp + enddo ! do ib=QP_n_G_bands(1),QP_n_G_bands(2) ! From f00212041d037cb3853f6ce8209db14cbbb7d4e8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 15:02:11 +0100 Subject: [PATCH 1263/1367] Version 5.3.0, Revision 26222, Hash 97935e3445 MODIFIED * include/version/version.m4 wf_and_fft/WF_spatial_inversion.F wf_and_fft/eval_GradOperator.F wf_and_fft/fft_setup.F xc_functionals/XC_eval_gga_potential.F xc_functionals/XC_eval_lda_kernel.F xc_functionals/el_magnetization.F xc_functionals/el_magnetization_matrix.F Bugs: - Additions: - Changes: -More do concurrent Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/wf_and_fft/WF_spatial_inversion.F | 4 +++- src/wf_and_fft/eval_GradOperator.F | 4 +++- src/wf_and_fft/fft_setup.F | 10 ++++++++-- src/xc_functionals/XC_eval_gga_potential.F | 4 +++- src/xc_functionals/XC_eval_lda_kernel.F | 8 ++++++-- src/xc_functionals/el_magnetization.F | 4 +++- src/xc_functionals/el_magnetization_matrix.F | 4 +++- 8 files changed, 32 insertions(+), 12 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 7d685d1426..adda8585f0 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26221 h.9c3e5321b6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26222 h.97935e3445, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26221" -SHASH="9c3e5321b6" +SREVISION="26222" +SHASH="97935e3445" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/wf_and_fft/WF_spatial_inversion.F b/src/wf_and_fft/WF_spatial_inversion.F index 14a24c48cf..ec8b0cddcf 100644 --- a/src/wf_and_fft/WF_spatial_inversion.F +++ b/src/wf_and_fft/WF_spatial_inversion.F @@ -63,7 +63,9 @@ subroutine WF_spatial_inversion(en,Xk) ! #if !defined _OPENMP ! - forall(i1=1:fft_size) cv(i1)=wfconjg(cmplx(WF%r(i1,i_spinor,1),kind=SP))*WF%r(i1,i_spinor,1) + do concurrent (i1=1:fft_size) + cv(i1)=wfconjg(cmplx(WF%r(i1,i_spinor,1),kind=SP))*WF%r(i1,i_spinor,1) + enddo mv(1)=sum(rho_nsi(:)*cv(:)) mv(2)=sum(rho_si(:)*cv(:)) ! diff --git a/src/wf_and_fft/eval_GradOperator.F b/src/wf_and_fft/eval_GradOperator.F index d19c4439c2..e01d323666 100644 --- a/src/wf_and_fft/eval_GradOperator.F +++ b/src/wf_and_fft/eval_GradOperator.F @@ -53,7 +53,9 @@ subroutine eval_GradOperator() #else call fft_3d(v,fft_dim,1) #endif - forall(i1=1:fft_size,i2=1:fft_size) Grad_R(i1,i2,ii) = v(R_m_R(i1,i2))/fft_size + do concurrent (i1=1:fft_size,i2=1:fft_size) + Grad_R(i1,i2,ii) = v(R_m_R(i1,i2))/fft_size + enddo v = (0._DP,0._DP) end do ! diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index 4070e0fec4..dde6807d96 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -193,7 +193,11 @@ subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) v1=(g_vec_rot(i1,:)-g_vec_rot(i2,:)) iv=nint(v1) ! - if (i2==1.or.i1<=iG_max_in) forall(i3=1:3) ln(i3)=max(ln(i3),iv(i3)) + if (i2==1.or.i1<=iG_max_in) then + do concurrent (i3=1:3) + ln(i3)=max(ln(i3),iv(i3)) + enddo + endif # if defined _FFTQE if (i4>0.and..not.ONLY_SIZE) fft_g_table(i1,i2)=fft_setmap(iv,dffts) # else @@ -263,7 +267,9 @@ subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) if( is> nsym/(1+i_time_rev) .and. is<=nsym ) M1=matmul(-dl_sop(:,:,sop_inv(is)),transpose(a)) if( is==nsym+1 ) M1=matmul( space_inv,transpose(a)) M2=matmul(b,M1)/2.0_SP/pi - forall (i1=1:3,i2=1:3) M2(i1,i2)=M2(i1,i2)*fft_dim(i1)/fft_dim(i2) + do concurrent (i1=1:3,i2=1:3) + M2(i1,i2)=M2(i1,i2)*fft_dim(i1)/fft_dim(i2) + enddo ! do i1=0,fft_dim(1)-1 do i2=0,fft_dim(2)-1 diff --git a/src/xc_functionals/XC_eval_gga_potential.F b/src/xc_functionals/XC_eval_gga_potential.F index b9aac272db..d42041a8ef 100644 --- a/src/xc_functionals/XC_eval_gga_potential.F +++ b/src/xc_functionals/XC_eval_gga_potential.F @@ -50,8 +50,10 @@ subroutine XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) ! thus I set fac to 2._SP to remove the extra 2 if (is_xc/=2) fac=1._SP if (is_xc==2) fac=2._SP - forall(ic=1:3,ifft=1:fft_size) v_drho(ifft,ic) = v_drho(ifft,ic) + & + do concurrent (ic=1:3,ifft=1:fft_size) + v_drho(ifft,ic) = v_drho(ifft,ic) + & & 2._SP/fac*real(v1sigma(is_xc,ifft),SP)*drho(ifft,is2,ic) + enddo end do ! ! 1. this is done by FFTing, by doing the scalar diff --git a/src/xc_functionals/XC_eval_lda_kernel.F b/src/xc_functionals/XC_eval_lda_kernel.F index 799dee880b..2a61f4459a 100644 --- a/src/xc_functionals/XC_eval_lda_kernel.F +++ b/src/xc_functionals/XC_eval_lda_kernel.F @@ -33,7 +33,9 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) do is1 = 1,n_sp_pol do is2 = 1,n_sp_pol is_xc = xc_spin_map1(is1,is2) - forall(ifft=1:fft_size) F_xc(ifft,is1,is2) = F_xc(ifft,is1,is2) + real(v2rho2(is_xc,ifft),SP) + do concurrent (ifft=1:fft_size) + F_xc(ifft,is1,is2) = F_xc(ifft,is1,is2) + real(v2rho2(is_xc,ifft),SP) + enddo enddo enddo else @@ -55,7 +57,9 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) do is1 = 1,n_spinor do is2 = 1,n_spinor is_xc = xc_spin_map1(is1,is2) - forall(ifft=1:fft_size) F_xc(ifft,is1,is2) = F_xc(ifft,is1,is2) + real(v2rho2(is_xc,ifft),SP) + do concurrent (ifft=1:fft_size) + F_xc(ifft,is1,is2) = F_xc(ifft,is1,is2) + real(v2rho2(is_xc,ifft),SP) + enddo enddo enddo endif diff --git a/src/xc_functionals/el_magnetization.F b/src/xc_functionals/el_magnetization.F index 695cf7c83e..eae5c253f2 100644 --- a/src/xc_functionals/el_magnetization.F +++ b/src/xc_functionals/el_magnetization.F @@ -136,8 +136,10 @@ subroutine el_magnetization(en,Xk,magn,bands) if (n_spinor==2) then tmp_sop(:,:)=dl_sop(:,:,isym)*m3det(dl_sop(:,:,isym)) if( isym> nsym/(1+i_time_rev) ) tmp_sop(:,:)=-tmp_sop(:,:) - forall(ifft=1:fft_size) magn(ifft,:)=magn(ifft,:)+ & + do concurrent (ifft=1:fft_size) + magn(ifft,:)=magn(ifft,:)+ & & matmul(tmp_sop, cv(fft_rot_r(ifft,isym),:)/real(nsym,SP)) + enddo else magn(:,3)=magn(:,3)+cv(fft_rot_r(:,isym),3)/real(nsym,SP) endif diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index 2f566d7b76..be1c7224c8 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -181,8 +181,10 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) if (n_spinor==2) then tmp_sop(:,:)=dl_sop(:,:,isym)*m3det(dl_sop(:,:,isym)) if( isym> nsym/(1+i_time_rev) ) tmp_sop(:,:)=-tmp_sop(:,:) - forall(ifft=1:fft_size) magn(ifft,:)=magn(ifft,:)+ & + do concurrent (ifft=1:fft_size) + magn(ifft,:)=magn(ifft,:)+ & & matmul(tmp_sop, cv(fft_rot_r(ifft,isym),:)/real(nsym,SP) ) + enddo else magn(:,3)=magn(:,3)+cv(fft_rot_r(:,isym),3)/real(nsym,SP) endif From 7b941efd12fc948b327bebd9bfba27ef59f45f5f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 15:04:20 +0100 Subject: [PATCH 1264/1367] Version 5.3.0, Revision 26223, Hash f00212041d MODIFIED * include/version/version.m4 setup/setup.F Bugs: - Additions: -More do concurrent Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/setup/setup.F | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index adda8585f0..485c5b5c8b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26222 h.97935e3445, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26223 h.f00212041d, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26222" -SHASH="97935e3445" +SREVISION="26223" +SHASH="f00212041d" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/setup/setup.F b/src/setup/setup.F index 6f73c5a6e4..21a7b0e525 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -187,7 +187,9 @@ subroutine setup(en,q,Xen,Ken,k,Xk) YAMBO_ALLOC(rl_sop,(3,3,nsym)) ! do is=1,nsym - forall (i2=1:3,i3=1:3) rl_sop(i2,i3,is)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) + do concurrent (i2=1:3,i3=1:3) + rl_sop(i2,i3,is)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) + enddo enddo ! ! Indentity index From 2dc5074fee37935e047656cab8273570fa0ef80f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 15:10:49 +0100 Subject: [PATCH 1265/1367] Version 5.3.0, Revision 26224, Hash 7b941efd12 MODIFIED * include/version/version.m4 el-ph/ELPH_Sigma_c.F qp/QP_ppa_cohsex.F qp/QP_real_axis.F qp/QP_secant_driver.F Bugs: - Additions: - Changes: -More changes Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/el-ph/ELPH_Sigma_c.F | 4 +++- src/qp/QP_ppa_cohsex.F | 12 +++++++++--- src/qp/QP_real_axis.F | 4 +++- src/qp/QP_secant_driver.F | 12 ++++++++---- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 485c5b5c8b..8d395bfe37 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26223 h.f00212041d, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26224 h.7b941efd12, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26223" -SHASH="f00212041d" +SREVISION="26224" +SHASH="7b941efd12" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index ca36a1483f..a0c7ec483e 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -155,9 +155,11 @@ subroutine ELPH_Sigma_c(en,k,q,qp) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - forall (i2=1:QP_dSc_steps) Sc_W(i_qp)%p(i2)=& + do concurrent (i2=1:QP_dSc_steps) + Sc_W(i_qp)%p(i2)=& & en%E(QP_table(i_qp,1),QP_table(i_qp,3),1)+(i2-1)*QP_dSc_delta+& & cmplx(0.,QP_G_damp,SP) + enddo enddo ! gsqF_energy_steps=QP_dSc_steps diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 1bd5f391e0..116331bea5 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -137,7 +137,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - forall (i_w=1:QP_dSc_steps) Sc_W(i_qp)%p(i_w)=qp%E_bare(i_qp)+(i_w-1)*QP_dSc_delta + do concurrent (i_w=1:QP_dSc_steps) + Sc_W(i_qp)%p(i_w)=qp%E_bare(i_qp)+(i_w-1)*QP_dSc_delta + enddo enddo ! else if (trim(QP_solver)=='g') then @@ -698,7 +700,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif ! ! DALV: here the grid is center in E0 - forall (i_w=1:QP_dSc_steps) W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp + do concurrent (i_w=1:QP_dSc_steps) + W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp + enddo ! E_kmq=E%E(ib,i_kmq,i_sp_pol) f_kmq=E%f(ib,i_kmq,i_sp_pol) @@ -806,7 +810,9 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if(l_ppa.and.l_GW_terminator) then ! ! DALV: here the grid is center in E0 - forall (i_w=1:QP_dSc_steps) W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp + do concurrent (i_w=1:QP_dSc_steps) + W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp + enddo ! do i_w=1,QP_dSc_steps ! diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index e2d20d49e1..074d155224 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -112,7 +112,9 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - forall (i2=1:QP_dSc_steps) Sc_W(i_qp)%p(i2)=qp%E_bare(i_qp)+(i2-1)*QP_dSc_delta + do concurrent (i2=1:QP_dSc_steps) + Sc_W(i_qp)%p(i2)=qp%E_bare(i_qp)+(i2-1)*QP_dSc_delta + enddo enddo else if (trim(QP_solver)=='g') then ! diff --git a/src/qp/QP_secant_driver.F b/src/qp/QP_secant_driver.F index e2e7cfc3da..f74717e6f9 100644 --- a/src/qp/QP_secant_driver.F +++ b/src/qp/QP_secant_driver.F @@ -95,8 +95,10 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! !Brackets ! - forall(i1=1:qp%n_states) Eqp_raxis(i1,1)=qp%E_bare(i1) - forall(i1=1:qp%n_states) Eqp_raxis(i1,2)=Eqp_raxis(i1,1)+1./HA2EV + do concurrent (i1=1:qp%n_states) + Eqp_raxis(i1,1)=qp%E_bare(i1) + Eqp_raxis(i1,2)=Eqp_raxis(i1,1)+1./HA2EV + enddo ! QP_solver_state=1 call W2Sc_local_call() @@ -162,7 +164,9 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) call W_reset(Sc_W(i1)) Sc_W(i1)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i1)%p,(QP_dSc_steps)) - forall (i2=1:QP_dSc_steps) Sc_W(i1)%p(i2)=Eqp_raxis(i1,1)+(i2-1)*QP_dSc_delta + do concurrent (i2=1:QP_dSc_steps) + Sc_W(i1)%p(i2)=Eqp_raxis(i1,1)+(i2-1)*QP_dSc_delta + enddo enddo YAMBO_FREE(QP_solver_state) ! @@ -171,7 +175,7 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) do i1=1,QP_n_states do i2=1,QP_dSc_steps-1 QP_dSc(i1,i2)=(QP_Sc(i1,i2+1)-QP_Sc(i1,i2))/QP_dSc_delta - Z(i2)=1./(1.-QP_dSc(i1,i2)) + Z(i2)=1._SP/(1._SP-QP_dSc(i1,i2)) Eqp(i2)=Eqp_raxis(i1,1)+cmplx(0.,real(Z(i2))*aimag(QP_Sc(i1,1)),SP) enddo qp%E(i1)=Eqp(1) From cc513351e56a593ac22fd5b797653fe53872f93c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 15:16:18 +0100 Subject: [PATCH 1266/1367] Version 5.3.0, Revision 26225, Hash 2dc5074fee MODIFIED * include/version/version.m4 qp/QP_W2Sc.F real_time_hamiltonian/RT_Hamiltonian.F sc/OEP_ApplySigmaCSX.F sc/OEP_app_inversion.F Bugs: - Additions: - Changes: -More do-concurrent Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/qp/QP_W2Sc.F | 12 +++++++++--- src/real_time_hamiltonian/RT_Hamiltonian.F | 4 +++- src/sc/OEP_ApplySigmaCSX.F | 8 ++++++-- src/sc/OEP_app_inversion.F | 4 +++- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 8d395bfe37..2d9cceb48c 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26224 h.7b941efd12, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26225 h.2dc5074fee, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26224" -SHASH="7b941efd12" +SREVISION="26225" +SHASH="2dc5074fee" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/qp/QP_W2Sc.F b/src/qp/QP_W2Sc.F index ef05a41b47..2f632beb78 100644 --- a/src/qp/QP_W2Sc.F +++ b/src/qp/QP_W2Sc.F @@ -62,9 +62,11 @@ subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! ! 1st term: (spin_occ-f_os+fbose) ! - forall(i_w=1:Xw%n_freqs) QP_W_here(i_w)=QP_W(i_qp_mem,i_q_mem,i_b_mem,i_w)* & + do concurrent (i_w=1:Xw%n_freqs) + QP_W_here(i_w)=QP_W(i_qp_mem,i_q_mem,i_b_mem,i_w)* & & (spin_occ-E%f(os(1),os(2),os(3))+bose_f(real(Xw%p(i_w))))* & & bose_decay(real(Xw%p(i_w))) + enddo ! call Kramers_Kronig(QP_W_here,real(Xw%p(:)),QP_n_W_freqs,dSc, & & real(Sc_W(i_qp)%p(:))-QP_time_order_sign*cI*aimag(Sc_W(i_qp)%p(:)), & @@ -72,9 +74,11 @@ subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! ! 2nd term: (f_os+fbose) ! - forall(i_w=1:Xw%n_freqs) QP_W_here(i_w)=QP_W(i_qp_mem,i_q_mem,i_b_mem,i_w)* & + do concurrent (i_w=1:Xw%n_freqs) + QP_W_here(i_w)=QP_W(i_qp_mem,i_q_mem,i_b_mem,i_w)* & & (E%f(os(1),os(2),os(3))+bose_f(real(Xw%p(i_w))))* & & bose_decay(real(Xw%p(i_w))) + enddo ! call Kramers_Kronig(-QP_W_here,real(Xw%p(:)),QP_n_W_freqs,dSc, & & -real(Sc_W(i_qp)%p(:))+cI*aimag(Sc_W(i_qp)%p(:)), & @@ -82,7 +86,9 @@ subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! enddo ! - forall(i_w=1:Sc_W(i_qp)%n_freqs) QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+dSc(i_w) + do concurrent (i_w=1:Sc_W(i_qp)%n_freqs) + QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+dSc(i_w) + enddo ! deallocate(dSc) ! diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 866c86de09..d4a50306ed 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -153,7 +153,9 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! call PP_redux_wait(H_nl_sc,COMM=PAR_COM_Xk_ibz_A2A%COMM) ! - forall(ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=H_nl_sc + do concurrent (ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) + Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=H_nl_sc + enddo ! enddo enddo diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 66d38ba693..4a32146f03 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -109,7 +109,9 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/2*iqibz,2*iqibz+1/),ID=ID) io_err=io_X(X,Xw,ID) ! - forall(i1=1:X%ng,i2=1:X%ng) PPaR(i1,i2)=X_mat(i1,i2,1)*isc%gamp(i1,i2) ! Poles and Residuals + do concurrent (i1=1:X%ng,i2=1:X%ng) + PPaR(i1,i2)=X_mat(i1,i2,1)*isc%gamp(i1,i2) ! Poles and Residuals + enddo ! PPaR_is_TR_rotated=.false. ! @@ -117,7 +119,9 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) ! if (iqs>nsym/(i_time_rev+1) .and. i_space_inv == 0 .and..not.PPaR_is_TR_rotated) then PPaR_is_TR_rotated=.true. - forall(i1=1:X%ng,i2=1:X%ng) PPaR_ws(i2,i1)=PPaR(i1,i2) + do concurrent (i1=1:X%ng,i2=1:X%ng) + PPaR_ws(i2,i1)=PPaR(i1,i2) + enddo PPaR(:,:)=PPaR_ws(:,:) endif ! diff --git a/src/sc/OEP_app_inversion.F b/src/sc/OEP_app_inversion.F index 121f550148..5b72a8fef5 100644 --- a/src/sc/OEP_app_inversion.F +++ b/src/sc/OEP_app_inversion.F @@ -153,8 +153,10 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) rhotw_rs(1:QP_ng_Sx) = rhotw_ds(fft_g_table(1:QP_ng_Sx,1)) !forall(ig1=2:QP_ng_Sx,ig2=2:QP_ng_Sx) rhotw_prd(ig1,ig2) = rhotw_prd(ig1,ig2) + & ! & Prefactor*E%f(iv1,ik,1)*conjg(rhotw_rs(ig1))*isc%rhotw(ig2) - forall(ig1=2:QP_ng_Sx,ig2=2:QP_ng_Sx) rhotw_prd(ig1,ig2) = rhotw_prd(ig1,ig2) + & + do concurrent (ig1=2:QP_ng_Sx,ig2=2:QP_ng_Sx) + rhotw_prd(ig1,ig2) = rhotw_prd(ig1,ig2) + & & Prefactor*E%f(iv1,ik,1)*rhotw_rs(ig1)*isc%rhotw(ig2) + enddo ! if (l_is_TR) then !rhotw_sum_TR(1:QP_ng_Sx-1)=rhotw_sum_TR(1:QP_ng_Sx-1)+rhotw_rs(2:QP_ng_Sx) From 988310e555f275696894b754222c7404cbebad00 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 15:36:53 +0100 Subject: [PATCH 1267/1367] Version 5.3.0, Revision 26226, Hash cc513351e5 MODIFIED * include/version/version.m4 sc/SC_add_XC.F Bugs: - Additions: - Changes: -More do-concurrent Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/sc/SC_add_XC.F | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 2d9cceb48c..fa5a760df6 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26225 h.2dc5074fee, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26226 h.cc513351e5, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26225" -SHASH="2dc5074fee" +SREVISION="26226" +SHASH="cc513351e5" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/sc/SC_add_XC.F b/src/sc/SC_add_XC.F index 294707f11a..1e90a6151e 100644 --- a/src/sc/SC_add_XC.F +++ b/src/sc/SC_add_XC.F @@ -57,12 +57,16 @@ subroutine SC_add_XC(X,Xw,Xk,E,k,q,iteration,V_xc_nm1,ELEC,HOLE,DELTA) if (l_use_Hxc_collisions.or.l_use_COH_collisions) then ! G_sex=cZERO - forall(ib=SC_bands(1):SC_bands(2),ik=1:E%nk) G_sex(ib,ib,ik)=cI*E%f(ib,ik,1) + do concurrent (ib=SC_bands(1):SC_bands(2),ik=1:E%nk) + G_sex(ib,ib,ik)=cI*E%f(ib,ik,1) + enddo G_coh=cZERO - forall(ib=SC_bands(1):SC_bands(2),ik=1:E%nk) G_coh(ib,ib,ik)=cI + do concurrent (ib=SC_bands(1):SC_bands(2),ik=1:E%nk) + G_coh(ib,ib,ik)=cI + enddo ! ! Now I build the G_collisions rotating the non interaction one - ! G_collisions(ib,ib,ik)=(0.,1)*en%f(ib,ik) + ! G_collisions(ib,ib,ik)=(0._SP,1._SP)*en%f(ib,ik) ! do ik=1,E%nk call OBS_rotate(H_rotation(:,:,ik,1),G_sex(:,:,ik),SC_nbands,-1) From a9385e2234ca50b3015b8b080b2ba0150ecd0e54 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 5 Nov 2025 15:51:32 +0100 Subject: [PATCH 1268/1367] Version 5.3.0, Revision 26227, Hash 988310e555 MODIFIED * include/version/version.m4 sc/SC_driver.F tddft/TDDFT_BSK_2_FXC.F xc_functionals/XC_libxc_driver.F Bugs: - Additions: - Changes: -Finished Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +-- src/sc/SC_driver.F | 16 ++++-- src/tddft/TDDFT_BSK_2_FXC.F | 73 ++++++++++++++++++++-------- src/xc_functionals/XC_libxc_driver.F | 24 ++++++--- 4 files changed, 86 insertions(+), 33 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index fa5a760df6..729595bf49 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26226 h.cc513351e5, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26227 h.988310e555, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26226" -SHASH="cc513351e5" +SREVISION="26227" +SHASH="988310e555" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index ef779c4f72..7539728733 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -162,9 +162,9 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) if(.not.l_SC_RESTART.and.l_use_collisions) then ! H_rotation=cZERO - forall(i1=SC_bands(1):SC_bands(2)) + do concurrent (i1=SC_bands(1):SC_bands(2)) H_rotation(i1,i1,:,:)=1._SP - end forall + enddo ! else if (.not.l_SC_cycle.and.l_SC_RESTART) then ! @@ -489,8 +489,12 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! if(.not.l_sc_electric) then ! - forall (ib=SC_bands(2)+1:E%nb) E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(2),:,:)-E_previous(SC_bands(2),:,:) - forall (ib=1:SC_bands(1)-1) E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(1),:,:)-E_previous(SC_bands(1),:,:) + do concurrent (ib=SC_bands(2)+1:E%nb) + E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(2),:,:)-E_previous(SC_bands(2),:,:) + enddo + do concurrent (ib=1:SC_bands(1)-1) + E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(1),:,:)-E_previous(SC_bands(1),:,:) + enddo ! endif ! @@ -848,7 +852,9 @@ subroutine SC_report() ! ! simmetrize the spreads summing over all possible degenerate bands ! - forall (ibp=SC_bands(1):SC_bands(2)) WS_spread(ibp)=abs(H_rotation(ibp,ib,ik,i_sp_pol))**2*100._SP/HA2EV + do concurrent (ibp=SC_bands(1):SC_bands(2)) + WS_spread(ibp)=abs(H_rotation(ibp,ib,ik,i_sp_pol))**2*100._SP/HA2EV + enddo ! ibp=b_of_max_proj(ib,ik,i_sp_pol) spread(ib,ik,i_sp_pol)=WS_spread( ibp ) diff --git a/src/tddft/TDDFT_BSK_2_FXC.F b/src/tddft/TDDFT_BSK_2_FXC.F index f995f71a75..4ecc917eab 100644 --- a/src/tddft/TDDFT_BSK_2_FXC.F +++ b/src/tddft/TDDFT_BSK_2_FXC.F @@ -110,14 +110,22 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) YAMBO_ALLOC(O2x_qpg,(BS_nT_at_k(ik2),FXC_n_g_corr)) YAMBO_ALLOC(blk_Eo,(2,O_x_dim)) ! - forall(i1=1:FXC_n_g_corr) conjg_O1x_qpg(i1,:BS_nT_at_k(ik1))=conjg(O1x(i1,:BS_nT_at_k(ik1)))*bare_qpg(iq,i1) - forall(i2=1:FXC_n_g_corr) O2x_qpg(:BS_nT_at_k(ik2),i2)=O2x(i2,:BS_nT_at_k(ik2))*bare_qpg(iq,i2) + do concurrent (i1=1:FXC_n_g_corr) + conjg_O1x_qpg(i1,:BS_nT_at_k(ik1))=conjg(O1x(i1,:BS_nT_at_k(ik1)))*bare_qpg(iq,i1) + enddo + do concurrent (i2=1:FXC_n_g_corr) + O2x_qpg(:BS_nT_at_k(ik2),i2)=O2x(i2,:BS_nT_at_k(ik2))*bare_qpg(iq,i2) + enddo ! ! Kernel diagonal and simmetrization ! if (ik1==ik2) then - forall(i1=1:BS_nT_at_k(ik1)) FXC_K_diagonal(blk_pos(1)+i1)=real(BS_mat(i1,i1)) - forall(i1=1:BS_nT_at_k(ik1)) BS_mat(i1,i1)=(0.,0.) + do concurrent (i1=1:BS_nT_at_k(ik1)) + FXC_K_diagonal(blk_pos(1)+i1)=real(BS_mat(i1,i1)) + enddo + do concurrent (i1=1:BS_nT_at_k(ik1)) + BS_mat(i1,i1)=(0._SP,0._SP) + enddo do i1=1,BS_nT_at_k(ik1) do i2=i1+1,BS_nT_at_k(ik1) BS_mat(i2,i1)=conjg(BS_mat(i1,i2)) @@ -127,20 +135,29 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! ! BS diagonal + Non interacting energies and widths ! - forall(i1=1:BS_nT_at_k(ik1)) blk_Eo(1,i1)=BSS_eh_E(blk_pos(1)+i1)+& + do concurrent (i1=1:BS_nT_at_k(ik1)) + blk_Eo(1,i1)=BSS_eh_E(blk_pos(1)+i1)+& & FXC_K_diagonal(blk_pos(1)+i1) - forall(i2=1:BS_nT_at_k(ik2)) blk_Eo(2,i2)=BSS_eh_E(blk_pos(2)+i2)+& + enddo + do concurrent (i2=1:BS_nT_at_k(ik2)) + blk_Eo(2,i2)=BSS_eh_E(blk_pos(2)+i2)+& & FXC_K_diagonal(blk_pos(2)+i2) + enddo ! if (allocated(BSS_eh_W)) then - forall(i1=1:BS_nT_at_k(ik1)) blk_Eo(1,i1)=blk_Eo(1,i1)+(0.,1.)*BSS_eh_W(blk_pos(1)+i1) - forall(i2=1:BS_nT_at_k(ik2)) blk_Eo(1,i2)=blk_Eo(1,i2)+(0.,1.)*BSS_eh_W(blk_pos(2)+i2) + do concurrent (i1=1:BS_nT_at_k(ik1)) + blk_Eo(1,i1)=blk_Eo(1,i1)+(0.,1.)*BSS_eh_W(blk_pos(1)+i1) + enddo + do concurrent (i2=1:BS_nT_at_k(ik2)) + blk_Eo(1,i2)=blk_Eo(1,i2)+(0.,1.)*BSS_eh_W(blk_pos(2)+i2) + enddo endif ! ! Projectors ! - forall(i1=1:BS_nT_at_k(ik1),i2=1:BS_nT_at_k(ik2)) & -& BS_mat(i1,i2)=BS_mat(i1,i2)*Fb2x1(blk_Eo(1,i1),blk_Eo(2,i2),E_same_treshold) + do concurrent (i1=1:BS_nT_at_k(ik1),i2=1:BS_nT_at_k(ik2)) + BS_mat(i1,i2)=BS_mat(i1,i2)*Fb2x1(blk_Eo(1,i1),blk_Eo(2,i2),E_same_treshold) + enddo ! ! Degenerations: ! @@ -221,13 +238,21 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! Upper diagonal block contribution ! if (FXC_is_retarded) then - forall(i1=1:BS_nT_at_k(ik1)) wk1(i1,:)=right_R(i1,:)*(& + do concurrent (i1=1:BS_nT_at_k(ik1)) + wk1(i1,:)=right_R(i1,:)*(& & 1._SP/(W%p(iw)-blk_Eo(1,i1))+1._SP/(-W%p(iw)-blk_Eo(1,i1)) ) - forall(i2=1:BS_nT_at_k(ik2)) wk2(:,i2)= left_R(:,i2)*(& + enddo + do concurrent (i2=1:BS_nT_at_k(ik2)) + wk2(:,i2)= left_R(:,i2)*(& & 1._SP/(W%p(iw)-blk_Eo(2,i2))+1._SP/(-W%p(iw)-blk_Eo(2,i2)) ) + enddo else - forall(i1=1:BS_nT_at_k(ik1)) wk1(i1,:)=right_R(i1,:)/(W%p(iw)-blk_Eo(1,i1)) - forall(i2=1:BS_nT_at_k(ik2)) wk2(:,i2)= left_R(:,i2)/(W%p(iw)-blk_Eo(2,i2)) + do concurrent (i1=1:BS_nT_at_k(ik1)) + wk1(i1,:)=right_R(i1,:)/(W%p(iw)-blk_Eo(1,i1)) + enddo + do concurrent (i2=1:BS_nT_at_k(ik2)) + wk2(:,i2)= left_R(:,i2)/(W%p(iw)-blk_Eo(2,i2)) + enddo endif ! F_xc_gspace(:,:,iw)=F_xc_gspace(:,:,iw)+Co*(matmul(conjg_O1x_qpg,wk1)+matmul(wk2,O2x_qpg)) @@ -236,18 +261,28 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! if (ik1/=ik2) then if (FXC_is_retarded) then - forall(i1=1:BS_nT_at_k(ik1)) wk1(i1,:)=right_R(i1,:)*(& + do concurrent (i1=1:BS_nT_at_k(ik1)) + wk1(i1,:)=right_R(i1,:)*(& & 1._SP/(-conjg(W%p(iw))-blk_Eo(1,i1))+1._SP/(conjg(W%p(iw))-blk_Eo(1,i1)) ) - forall(i2=1:BS_nT_at_k(ik2)) wk2(:,i2)= left_R(:,i2)*(& + enddo + do concurrent (i2=1:BS_nT_at_k(ik2)) + wk2(:,i2)= left_R(:,i2)*(& & 1._SP/(-conjg(W%p(iw))-blk_Eo(2,i2))+1._SP/(conjg(W%p(iw))-blk_Eo(2,i2)) ) + enddo else - forall(i1=1:BS_nT_at_k(ik1)) wk1(i1,:)=right_R(i1,:)/(conjg(W%p(iw))-blk_Eo(1,i1)) - forall(i2=1:BS_nT_at_k(ik2)) wk2(:,i2)= left_R(:,i2)/(conjg(W%p(iw))-blk_Eo(2,i2)) + do concurrent (i1=1:BS_nT_at_k(ik1)) + wk1(i1,:)=right_R(i1,:)/(conjg(W%p(iw))-blk_Eo(1,i1)) + enddo + do concurrent (i2=1:BS_nT_at_k(ik2)) + wk2(:,i2)= left_R(:,i2)/(conjg(W%p(iw))-blk_Eo(2,i2)) + enddo endif ! FXC_temp=Co*(matmul(conjg_O1x_qpg,wk1)+matmul(wk2,O2x_qpg)) ! - forall(i1=1:FXC_n_g_corr,i2=1:FXC_n_g_corr) F_xc_gspace(i1,i2,iw)=F_xc_gspace(i1,i2,iw)+conjg(FXC_temp(i2,i1)) + do concurrent (i1=1:FXC_n_g_corr,i2=1:FXC_n_g_corr) + F_xc_gspace(i1,i2,iw)=F_xc_gspace(i1,i2,iw)+conjg(FXC_temp(i2,i1)) + enddo endif ! call PP_redux_wait(F_xc_gspace(:,:,iw)) diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 41d3331ce1..4e746ea3b0 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -217,7 +217,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) YAMBO_FREE(drho_tmp) endif ! - forall (is1=1:n_spin,i1=1:fft_size) drho(i1,is1,:) = drho(i1,is1,:)*fft_size/DL_vol*2._SP*pi/alat(:) + do concurrent (is1=1:n_spin,i1=1:fft_size) + drho(i1,is1,:) = drho(i1,is1,:)*fft_size/DL_vol*2._SP*pi/alat(:) + enddo ! do i1 = 1,fft_size do is1 = 1,n_spin @@ -241,7 +243,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if (FUNCTIONAL == XC_LDA_C_KP) then ! Special case, XC_LDA_C_KP not available from libxc select case(ORDER) case(0) - forall (i1=1:fft_size) rspts(i1)=(3._DP/4._DP/pi_DP/real(spin_rho_SP(i1,1)/DL_vol,DP))**(1._DP/3._DP) + do concurrent (i1=1:fft_size) + rspts(i1)=(3._DP/4._DP/pi_DP/real(spin_rho_SP(i1,1)/DL_vol,DP))**(1._DP/3._DP) + enddo call xc_rpa_kp(rspts,v1rho) E_xc = real(tmp_exc,SP) E_xc_val = V_dot_V(fft_size,rho,E_xc(:)) @@ -272,12 +276,16 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) E_xc = E_xc + real(tmp_exc,SP) case(1) call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) - forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + do concurrent (i1=1:fft_size,i2=1:n_spin) + V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + enddo ! Needed to build F_xc from functional derivative for n_spin=1 if (l_Fxc_from_Vxc.and.ORDER==2) then spin_rho_DP=spin_rho_DP*PERT_FAC call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) - forall(i1=1:fft_size,i2=1:n_spin) V_xc_pert(i1,i2) = V_xc_pert(i1,i2) + real(v1rho(i2,i1),SP) + do concurrent (i1=1:fft_size,i2=1:n_spin) + V_xc_pert(i1,i2) = V_xc_pert(i1,i2) + real(v1rho(i2,i1),SP) + enddo spin_rho_DP=spin_rho_DP/PERT_FAC endif case(2) @@ -288,7 +296,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, ! avoiding the call to XC_eval_lda_kernel ! Howerver, the latter is more precise, since it works with DP quantities - forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + do concurrent (i1=1:fft_size,i2=1:n_spin) + V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + enddo endif ! Needed to build Fxc unless in magnons case with n_sp_pol==2 if( .not.( l_BS_magnons.and.n_sp_pol==2) ) & @@ -333,7 +343,9 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! avoiding the call to XC_eval_gga_kernel ! Howerver but the latter is more precise, since it works with DP quantities !call XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) - forall(i1=1:fft_size,i2=1:n_spin) V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + do concurrent (i1=1:fft_size,i2=1:n_spin) + V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + enddo endif ! Needed to build Fxc unless in magnons case with n_sp_pol==2 if( .not.(l_BS_magnons.and.n_sp_pol==2) ) & From d7aec35b8483d26981ac31cab0885f917188141a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 5 Nov 2025 23:17:08 +0100 Subject: [PATCH 1269/1367] header moved before beginning of the file --- src/wf_and_fft/WF_spatial_inversion.F | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wf_and_fft/WF_spatial_inversion.F b/src/wf_and_fft/WF_spatial_inversion.F index 14a24c48cf..f843674f44 100644 --- a/src/wf_and_fft/WF_spatial_inversion.F +++ b/src/wf_and_fft/WF_spatial_inversion.F @@ -5,6 +5,10 @@ ! ! Authors (see AUTHORS file for details): AM ! +! headers +! +#include +! subroutine WF_spatial_inversion(en,Xk) ! ! Check if the Inversion is a DL symmetry operation either @@ -24,8 +28,6 @@ subroutine WF_spatial_inversion(en,Xk) ! implicit none ! -#include - ! type(levels) ::en type(bz_samp)::Xk ! From 0a1317cb2f949f892c55e844993db754bc29b1ce Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 6 Nov 2025 01:00:15 +0100 Subject: [PATCH 1270/1367] Fixed bug introduced in X_ALLOC_elemental --> X_mat_d was not allocated on GPU Fixed non needed allocation in K_kernel --- src/allocations/X_ALLOC_elemental.F | 6 +++--- src/bse/K_kernel.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index 640ce9aaff..b5ddbb42e3 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -75,6 +75,9 @@ subroutine X_ALLOC_elemental(WHAT,DIM) if (allocated(X_mat)) return YAMBO_ALLOC(X_mat,(DIM(1),DIM(2),DIM(3))) X_mat=cZERO +#ifdef _GPU + YAMBO_ALLOC_GPU_SOURCE(DEV_VAR(X_mat),X_mat) +#endif case('MEspin') if (allocated(X_mespin)) return YAMBO_ALLOC(X_mespin,(DIM(1),DIM(2))) @@ -83,9 +86,6 @@ subroutine X_ALLOC_elemental(WHAT,DIM) if (allocated(X_meorb)) return YAMBO_ALLOC(X_meorb,(DIM(1),DIM(2))) X_meorb = cZERO -#ifdef _GPU - YAMBO_ALLOC_GPU_SOURCE(DEV_VAR(X_mat),X_mat) -#endif end select return endif diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index e537676024..4fae988d89 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -602,7 +602,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! ! Allocate variables tddft_wf variables neeeded within the OMP loop - if (l_tddft_rsum) then + if (l_tddft_rsum.and.iHxc==2) then YAMBO_ALLOC(tddft_wf%WF_symm1,(rho_map_size,n_spinor)) YAMBO_ALLOC(tddft_wf%WF_symm2,(rho_map_size,n_spinor)) YAMBO_ALLOC(tddft_wf%rhotwr1,(rho_map_size*n_spinor*n_spinor)) From 8cae25dc6f1ff0f0f27d1889a6be79b787d1348f Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 6 Nov 2025 09:47:32 +0100 Subject: [PATCH 1271/1367] Version 5.3.0, Revision 26228, Hash a9385e2234 MODIFIED * include/version/version.m4 hamiltonian/Berry_polarization_NEQ.F hamiltonian/Build_W_operator.F nloptics/NL_Berry_current.F nloptics/NL_build_dG_lesser.F Bugs: - Additions: -Improved openMP parallelization Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/hamiltonian/Berry_polarization_NEQ.F | 2 ++ src/hamiltonian/Build_W_operator.F | 4 ++++ src/nloptics/NL_Berry_current.F | 4 ++++ src/nloptics/NL_build_dG_lesser.F | 4 ++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 729595bf49..1b55c3eb34 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26227 h.988310e555, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26228 h.a9385e2234, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26227" -SHASH="988310e555" +SREVISION="26228" +SHASH="a9385e2234" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/hamiltonian/Berry_polarization_NEQ.F b/src/hamiltonian/Berry_polarization_NEQ.F index ebf0e35fc5..cb1c6884d8 100644 --- a/src/hamiltonian/Berry_polarization_NEQ.F +++ b/src/hamiltonian/Berry_polarization_NEQ.F @@ -37,9 +37,11 @@ subroutine Berry_polarization_NEQ(Xen,Xk,i_sp_pol,V_bands,Polarization) call timing('NL Berry Pol NEQ',OPR='start') #endif ! +!$OMP WORKSHARE Sm1_minus=cZERO Sm1_plus =cZERO All_S_det=cZERO +!$OMP END WORKSHARE ! if (i_sp_pol==1) Polarization=cZERO ! diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index 8721648f2f..efc3ab3abd 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -41,7 +41,9 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) complex(SP) :: V_tmp(H_ref_bands(1):H_ref_bands(2),en%nbf(i_sp)) complex(SP) :: alpha ! +!$OMP WORKSHARE Wk=cZERO +!$OMP END WORKSHARE ! ikbz=Xk%k_table(ik,1) ! @@ -84,7 +86,9 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) ! <\phi_i | e^{iGr} | \phi_j > ! It works in principle but it requires big supercells ! +!$OMP WORKSHARE Wop(:,:,:)=cZERO !DIP_S(H_ref_bands(1):,H_ref_bands(1):,id_red,ik,i_sp)*cI/(4._SP*pi) +!$OMP END WORKSHARE ! endif ! diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index f78b6bf1e0..c4abe38120 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -99,14 +99,18 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ik = Xk%sstar(ikbz,1) ! if(max_step==1) then +!$omp parallel do default(shared), private(iv), reduction(+:NL_J_red) do iv=1,en%nbf(isp) NL_J_red(id_red)=NL_J_red(id_red)+sum(VH_bands(:,iv,ik,isp)*delta_V_tilde(iv,:,1)) enddo +!$omp end parallel do elseif(max_step==2) then +!$omp parallel do default(shared), private(iv), reduction(+:NL_J_red) do iv=1,en%nbf(isp) NL_J_red(id_red)=NL_J_red(id_red)+sum(VH_bands(:,iv,ik,isp) & & *(4._SP*delta_V_tilde(iv,:,1)-delta_V_tilde(iv,:,2)))/3._SP enddo +!$omp end parallel do endif ! enddo diff --git a/src/nloptics/NL_build_dG_lesser.F b/src/nloptics/NL_build_dG_lesser.F index 2dd71a4dfc..ec18134134 100644 --- a/src/nloptics/NL_build_dG_lesser.F +++ b/src/nloptics/NL_build_dG_lesser.F @@ -45,7 +45,9 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) call timing('NL build_dG',OPR='start') #endif ! +!$OMP WORKSHARE dG=cZERO +!$OMP END WORKSHARE ! do is=1,n_sp_pol do ik=1,QP_nk @@ -61,7 +63,9 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) enddo enddo ! +!$OMP WORKSHARE dG=cI*spin_occ*dG +!$OMP END WORKSHARE ! call PP_redux_wait(dG,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) ! From 4b3328c3fdb018af4ec9674634b6fe3c3852e17b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 6 Nov 2025 09:58:08 +0100 Subject: [PATCH 1272/1367] Version 5.3.0, Revision 26229, Hash 8cae25dc6f MODIFIED * include/version/version.m4 nloptics/NL_Berry_current.F Bugs: - Additions: -More OpenMP Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_Berry_current.F | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 1b55c3eb34..43c7c9119f 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26228 h.a9385e2234, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26229 h.8cae25dc6f, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26228" -SHASH="a9385e2234" +SREVISION="26229" +SHASH="8cae25dc6f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index c4abe38120..68ec811b34 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -93,7 +93,9 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! do istep=1,max_step call Build_tilde_vbands(en,Xk,ikbz,isp,istep,id_red,V_bands(:,:en%nbf(isp),:,isp),V_tilde) +!$OMP WORKSHARE delta_V_tilde(:,:,istep)=(V_tilde(:,:,1)-V_tilde(:,:,2))/dble(istep) +!$OMP END WORKSHARE enddo ! ik = Xk%sstar(ikbz,1) From b2d872a34834e0a68a927c9e26602a760efd232d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 6 Nov 2025 10:18:32 +0100 Subject: [PATCH 1273/1367] Version 5.3.0, Revision 26230, Hash 4b3328c3fd MODIFIED * include/version/version.m4 collisions/COLLISIONS_compose_nl.F Bugs: - Additions: -More OpenMP Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_compose_nl.F | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 43c7c9119f..5254103e06 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26229 h.8cae25dc6f, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26230 h.4b3328c3fd, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26229" -SHASH="8cae25dc6f" +SREVISION="26230" +SHASH="4b3328c3fd" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index ab683cf436..567bb6df66 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -54,7 +54,9 @@ subroutine COLLISIONS_compose_nl(G_in) enddo enddo ! +!$OMP WORKSHARE RT_Vnl_xc=cZERO +!$OMP END WORKSHARE ! do i_coll=1,HXC_collisions%N ! From da6b6562e9a85845416ba5df101f43939fe6b2ce Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 6 Nov 2025 12:42:39 +0100 Subject: [PATCH 1274/1367] Version 5.3.0, Revision 26231, Hash b2d872a348 MODIFIED * include/version/version.m4 nloptics/NL_Integrator.F Bugs: - Additions: -More openMP Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_Integrator.F | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 5254103e06..0d06d54ed7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26230 h.4b3328c3fd, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26231 h.b2d872a348, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26230" -SHASH="4b3328c3fd" +SREVISION="26231" +SHASH="b2d872a348" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Integrator.F b/src/nloptics/NL_Integrator.F index 2333f15297..35f98eab43 100644 --- a/src/nloptics/NL_Integrator.F +++ b/src/nloptics/NL_Integrator.F @@ -96,14 +96,18 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ! do ik=1,QP_nk if(.not.PAR_IND_Xk_ibz%element_1D(ik)) then +!$OMP WORKSHARE V_bands(:,:,ik,:)=cZERO +!$OMP END WORKSHARE cycle endif ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) +!$OMP WORKSHARE Ktmp=cZERO Ktmp(:,:nb)=V_bands(:,:nb,ik,is) +!$OMP END WORKSHARE call INVINT_step(V_bands(:,:nb,ik,is),Ktmp(:,:nb),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb,RT_step) enddo enddo @@ -113,7 +117,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ! ! Evaluate V(t+dt/2) ! +!$OMP WORKSHARE K_all=cZERO +!$OMP END WORKSHARE do ik=1,QP_nk if(.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) @@ -140,7 +146,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) K_all=V_bands do ik=1,QP_nk if(.not.PAR_IND_Xk_ibz%element_1D(ik)) then +!$OMP WORKSHARE V_bands(:,:,ik,:)=cZERO +!$OMP END WORKSHARE cycle endif ik_mem=PAR_Xk_ibz_index(ik) From 11249168c6fb05451466fdfaae0aa3faf37d1bb8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 6 Nov 2025 13:32:58 +0100 Subject: [PATCH 1275/1367] Few small fixes --- src/allocations/X_ALLOC_elemental.F | 6 ++++++ src/bse/K_solvers.F | 2 ++ src/bse/LDIAGO_driver.F | 8 +++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/allocations/X_ALLOC_elemental.F b/src/allocations/X_ALLOC_elemental.F index b5ddbb42e3..b1fac2e70f 100644 --- a/src/allocations/X_ALLOC_elemental.F +++ b/src/allocations/X_ALLOC_elemental.F @@ -116,6 +116,12 @@ subroutine X_ALLOC_elemental(WHAT,DIM) if (STRING_match(WHAT,"JDOS").or.STRING_match(WHAT,"ALL")) then YAMBO_FREE(Joint_DOS) endif + if (STRING_match(WHAT,"MEspin").or.STRING_match(WHAT,"ALL")) then + YAMBO_FREE(X_mespin) + endif + if (STRING_match(WHAT,"MEorb").or.STRING_match(WHAT,"ALL")) then + YAMBO_FREE(X_meorb) + endif if (STRING_match(WHAT,"BS_E_SORTED").or.STRING_match(WHAT,"ALL")) then YAMBO_FREE(BS_E_sorted) YAMBO_FREE(BS_E_sorted_indx) diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index 94371fa38c..bff29a7860 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -95,6 +95,8 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) call BSS_MAGN_free( ) call BSS_DICH_free( ) call BSS_PL_free( ) + call BSS_MEspin_free() + call BSS_MEorb_free() ! ! CLEAN: BS_mat ! diff --git a/src/bse/LDIAGO_driver.F b/src/bse/LDIAGO_driver.F index 0fb05b5f7c..ba5421934a 100644 --- a/src/bse/LDIAGO_driver.F +++ b/src/bse/LDIAGO_driver.F @@ -157,6 +157,7 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & ! ! Allocate the 2D block cyclic matrix ! +#if defined _MPI ! First create a blacs grid call MPI_COMM_SIZE(MPI_COMM_WORLD, nProcs, ierr) call MPI_COMM_RANK(MPI_COMM_WORLD, my_rank, ierr) @@ -182,8 +183,13 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & ProcX = 1 ProcY = 1 endif - + call msg("s","BLACS grid",(/ProcX,ProcY/)) +#else + ProcX=1 + ProcY=1 + blacs_blk_size = 1 +#endif mpi_comm = MPI_COMM_WORLD From 05ae06564c49617470b974b63c0fc8e07a71eda4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 6 Nov 2025 13:48:24 +0100 Subject: [PATCH 1276/1367] Fixed compilation issue --- config/stamps_and_lists/project_dependencies.stamp | 0 sbin/compilation/dependencies_project.sh | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sbin/compilation/dependencies_project.sh b/sbin/compilation/dependencies_project.sh index 0ebb517cbe..b6b585fd56 100755 --- a/sbin/compilation/dependencies_project.sh +++ b/sbin/compilation/dependencies_project.sh @@ -32,8 +32,15 @@ if [ ${#sources} -eq 2 ]; then continue fi # +if [ ! -f .objects ] ; then + #this is needed to avoid stc/tools where .objects.in exist in place of .objects + cd $BASE + continue +fi + cp .objects objects.c $cpp $cppflags $precomp_flags objects.c > no_pj.mk + # # Projects #========== From 284ae6a53b428ed9de2b149cab4083b450a100ef Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 6 Nov 2025 13:53:45 +0100 Subject: [PATCH 1277/1367] Fixed compilation with LDIAGO --- config/configure.ac | 2 +- config/m4/acx_fortran_flags.m4 | 15 +- config/m4/acx_get_fc_kind.m4 | 1 + config/m4/acx_report.m4 | 32 ++-- config/m4/acx_version.m4 | 1 + config/m4/hdf5_f90.m4 | 2 +- config/m4/libxc.m4 | 4 +- config/m4/netcdf_f90.m4 | 2 +- config/m4/yambo_diago.m4 | 52 ++++--- config/m4/yambo_folders.m4 | 9 ++ config/m4/yambo_specific.m4 | 9 ++ .../actions/compile_external_libraries.mk | 4 +- .../actions/download_external_libraries.mk | 6 +- config/mk/global/defs.mk.in | 2 +- config/mk/local/makefile | 2 +- config/report.in | 9 +- config/setup.in | 6 +- configure | 146 +++++++++++++----- lib/archive/Makefile.loc | 6 +- lib/archive/git.list.in | 2 +- lib/archive/package.list | 16 +- lib/{ydiago => ldiago}/Makefile.loc | 32 ++-- .../make_ldiago.inc.in} | 8 +- sbin/compilation/libraries.sh | 2 +- src/bse/.objects | 4 +- src/bse/K_fill_block_cyclic.F | 2 +- src/bse/YDIAGO_driver.F | 2 +- 27 files changed, 249 insertions(+), 129 deletions(-) rename lib/{ydiago => ldiago}/Makefile.loc (50%) rename lib/{ydiago/make_ydiago.inc.in => ldiago/make_ldiago.inc.in} (88%) diff --git a/config/configure.ac b/config/configure.ac index 8b42acb9e1..b9bc675a45 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -305,7 +305,7 @@ ACX_LIBCUDA AC_SET_GPU # ============================================================================ # Diago library -AC_YDIAGO +AC_LDIAGO # ============================================================================ # Device XLIB ACX_DEVXLIB diff --git a/config/m4/acx_fortran_flags.m4 b/config/m4/acx_fortran_flags.m4 index 37797187dd..289a794e80 100644 --- a/config/m4/acx_fortran_flags.m4 +++ b/config/m4/acx_fortran_flags.m4 @@ -88,7 +88,12 @@ i?86*linux*) CPU_FLAG="-xHost" #CPU_FLAG=" " ;; - *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + ;; + *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" @@ -338,7 +343,13 @@ aarch*linux* | arm*linux* ) #CPU_FLAG="-xHost" CPU_FLAG=" " ;; - *2020* | *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + CFLAGS="-O2 -std=gnu99" + ;; + *2020* | *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" diff --git a/config/m4/acx_get_fc_kind.m4 b/config/m4/acx_get_fc_kind.m4 index b337d15845..2758761782 100644 --- a/config/m4/acx_get_fc_kind.m4 +++ b/config/m4/acx_get_fc_kind.m4 @@ -11,6 +11,7 @@ INTELVERSION="unknown" FCKIND="unknown" case "${FC}" in *ftn*) + FCKIND="cray" FCVERSION=`$FC --version` ;; *abf90*) diff --git a/config/m4/acx_report.m4 b/config/m4/acx_report.m4 index e61bbe0291..6495066baf 100644 --- a/config/m4/acx_report.m4 +++ b/config/m4/acx_report.m4 @@ -13,6 +13,9 @@ AC_DEFUN([ACX_REPORT], DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -124,10 +127,14 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # -if test x"$with_ydiago_branch" = "xnone"; then - YDIAGO_check="I"; +if test "$compile_ldiago" = "yes"; then + if test x"$with_ldiago_branch" = "xnone"; then + LDIAGO_check="I"; + else + LDIAGO_check="G"; + fi else - YDIAGO_check="G"; + LDIAGO_check="-"; fi # PETSC_check="-" @@ -221,6 +228,7 @@ if test "$hdf5" = "yes" ; then fi # AC_SUBST(DP_check) +AC_SUBST(GAMMA_ONLY_check) AC_SUBST(KEEP_OBJS_check) AC_SUBST(TIME_profile_check) AC_SUBST(MEM_profile_check) @@ -246,7 +254,7 @@ AC_SUBST(LAPACK_check) AC_SUBST(BLACS_check) AC_SUBST(SLK_check) AC_SUBST(ELPA_check) -AC_SUBST(YDIAGO_check) +AC_SUBST(LDIAGO_check) AC_SUBST(PETSC_check) AC_SUBST(SLEPC_check) AC_SUBST(PETSC_info) @@ -264,14 +272,14 @@ AC_SUBST(MPI_info) # # STRIPE [LIB] from paths # -ACX_STRIPE_SUBPATH($YDIAGO_LIBS,"LIB") -#ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") -YDIAGO_LIBS_R=$STRIPE -ACX_STRIPE_SUBPATH($YDIAGO_INCS,"INC") -#ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") -YDIAGO_INCS_R=$STRIPE -AC_SUBST(YDIAGO_LIBS_R) -AC_SUBST(YDIAGO_INCS_R) +ACX_STRIPE_SUBPATH($LDIAGO_LIBS,"LIB") +#ACX_STRIPE_SUBPATH2($LDIAGO_LIBS,"LIB") +LDIAGO_LIBS_R=$STRIPE +ACX_STRIPE_SUBPATH($LDIAGO_INCS,"INC") +#ACX_STRIPE_SUBPATH2($LDIAGO_INCS,"INC") +LDIAGO_INCS_R=$STRIPE +AC_SUBST(LDIAGO_LIBS_R) +AC_SUBST(LDIAGO_INCS_R) # ACX_STRIPE_SUBPATH($IOTK_LIBS,"LIB") IOTK_LIBS_R=$STRIPE diff --git a/config/m4/acx_version.m4 b/config/m4/acx_version.m4 index 77de35ea64..162731196b 100644 --- a/config/m4/acx_version.m4 +++ b/config/m4/acx_version.m4 @@ -8,6 +8,7 @@ AC_DEFUN([ACX_VERSION], [ cat << EOF > include/version/version.h +#pragma once #define YAMBO_VERSION $SVERSION #define YAMBO_SUBVERSION $SSUBVERSION #define YAMBO_PATCHLEVEL $SPATCHLEVEL diff --git a/config/m4/hdf5_f90.m4 b/config/m4/hdf5_f90.m4 index 95d2ff5934..7f1b4793b8 100644 --- a/config/m4/hdf5_f90.m4 +++ b/config/m4/hdf5_f90.m4 @@ -256,7 +256,7 @@ if test x"$enable_hdf5" = "xyes"; then compile_hdf5="no" ; AC_MSG_RESULT([already compiled]) ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; IO_LIB_VER="parallel"; diff --git a/config/m4/libxc.m4 b/config/m4/libxc.m4 index 56919791e5..dabf52d0fe 100644 --- a/config/m4/libxc.m4 +++ b/config/m4/libxc.m4 @@ -69,12 +69,14 @@ if test x"$acx_libxc_ok" = xno ; then if test -d "$with_libxc_path"; then libxc_incdir="$with_libxc_path/include" libxc_libdir="$with_libxc_path/lib" + libxc_lib64dir="$with_libxc_path/lib64" fi if test -d "$with_libxc_includedir"; then libxc_incdir="$with_libxc_includedir" ; fi if test -d "$with_libxc_libdir"; then libxc_libdir="$with_libxc_libdir" ; fi # # dynamic linkage, separate Fortran interface - if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_lib64dir"; then LIBXC_LIBS="-L$libxc_lib64dir $LIBXC_LIBS"; fi if test ! -z "$libxc_incdir"; then LIBXC_INCS="$IFLAG$libxc_incdir"; fi # if test ! -z "$with_libxc_libs" ; then LIBXC_LIBS="$with_libxc_libs" ; fi diff --git a/config/m4/netcdf_f90.m4 b/config/m4/netcdf_f90.m4 index 7e1cb7b1cd..57393cc4de 100644 --- a/config/m4/netcdf_f90.m4 +++ b/config/m4/netcdf_f90.m4 @@ -263,7 +263,7 @@ if test x"$enable_hdf5" = "xyes"; then compile_netcdf="no" ; AC_MSG_RESULT([already compiled]) ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_netcdf="no" ; IO_LIB_VER="parallel"; diff --git a/config/m4/yambo_diago.m4 b/config/m4/yambo_diago.m4 index 51d45979d8..952a32e3ba 100644 --- a/config/m4/yambo_diago.m4 +++ b/config/m4/yambo_diago.m4 @@ -5,32 +5,46 @@ # # Authors (see AUTHORS file for details): AM # -AC_DEFUN([AC_YDIAGO],[ +AC_DEFUN([AC_LDIAGO],[ # -AC_ARG_WITH(ydiago-branch,[AS_HELP_STRING([--with-ydiago-branch=],[Use the of the ydiago repository.],[32])],,[with_ydiago_branch=none]) +AC_ARG_WITH(ldiago-branch,[AS_HELP_STRING([--with-ldiago-branch=],[Use the of the ldiago repository.],[32])],,[with_ldiago_branch=none]) # -AC_CONFIG_FILES([lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in]) +AC_CONFIG_FILES([lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in]) + +if test "$def_scalapack" = "-D_SCALAPACK" ; then + + compile_ldiago="yes" + + # GPU flags are passed to ldiago compilation only if elpa library is available + if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then + ldiago_opt="$def_gpu $def_elpa" + LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" + else + ldiago_opt="$def_elpa" + LDIAGO_GPU_SUPPORT="no_gpu" + fi + + LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" + LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" + #LDIAGO_LIBS="${compdir}/lib/libldiago.a" + #LDIAGO_INCS="$IFLAG${compdir}/include/" -# GPU flags are passed to ydiago compilation only if elpa library is available -if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then - ydiago_opt="$def_gpu $def_elpa" - YDIAGO_GPU_SUPPORT="$GPU_SUPPORT" else - ydiago_opt="$def_elpa" - YDIAGO_GPU_SUPPORT="no_gpu" -fi -YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib/libydiago.a" -YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include/" -#YDIAGO_LIBS="${compdir}/lib/libydiago.a" -#YDIAGO_INCS="$IFLAG${compdir}/include/" + compile_ldiago="no" + ldiago_opt="" + LDIAGO_LIBS="" + LDIAGO_INCS="" + +fi -AC_SUBST(YDIAGO_LIBS) -AC_SUBST(YDIAGO_INCS) -AC_SUBST(YDIAGO_GPU_SUPPORT) +AC_SUBST(LDIAGO_LIBS) +AC_SUBST(LDIAGO_INCS) +AC_SUBST(LDIAGO_GPU_SUPPORT) -AC_SUBST(ydiago_opt) -AC_SUBST(with_ydiago_branch) +AC_SUBST(compile_ldiago) +AC_SUBST(ldiago_opt) +AC_SUBST(with_ldiago_branch) ]) diff --git a/config/m4/yambo_folders.m4 b/config/m4/yambo_folders.m4 index 227d601075..80b39b6002 100644 --- a/config/m4/yambo_folders.m4 +++ b/config/m4/yambo_folders.m4 @@ -107,6 +107,15 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/lib"; then mkdir "$extlibs_pa if ! test -d "$extlibs_path/${FCKIND}/${FC}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/include"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_path/${FCKIND}/${FC}/bin"; fi # +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi +# +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; fi +# if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; BIN_NETCDF=$extlibs_path/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}/bin/* ; diff --git a/config/m4/yambo_specific.m4 b/config/m4/yambo_specific.m4 index c251bac812..61cfc63612 100644 --- a/config/m4/yambo_specific.m4 +++ b/config/m4/yambo_specific.m4 @@ -57,6 +57,15 @@ AC_SUBST(def_dp) AC_SUBST(build_precision) # # ============================================================================ +# VERSION for gamma only case +AC_ARG_ENABLE(gamma_only, AC_HELP_STRING([--enable-gamma-only], [Gamma only build. Default is no.])) +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi +AC_SUBST(enable_gamma_only) +AC_SUBST(def_gamma_only) +# +# ============================================================================ # # Time Profiling (mod_timing) # diff --git a/config/mk/global/actions/compile_external_libraries.mk b/config/mk/global/actions/compile_external_libraries.mk index d00ed979f5..8b1e56f08d 100644 --- a/config/mk/global/actions/compile_external_libraries.mk +++ b/config/mk/global/actions/compile_external_libraries.mk @@ -47,5 +47,5 @@ petsc: @if test "$(do_petsc)" = yes ; then LIBS="petsc" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) petsc-dl; $(mk_external_lib); fi slepc: petsc @if test "$(do_slepc)" = yes ; then LIBS="slepc" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) slepc-dl; $(mk_external_lib); fi -ydiago: scalapack blacs elpa - @if test "$(do_ydiago)" = yes ; then LIBS="ydiago" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) ydiago-dl; $(mk_external_lib); fi +ldiago: scalapack blacs elpa + @if test "$(do_ldiago)" = yes ; then LIBS="ldiago" ; BASE="lib"; $(MAKE) $(MAKEFLAGS) ldiago-dl; $(mk_external_lib); fi diff --git a/config/mk/global/actions/download_external_libraries.mk b/config/mk/global/actions/download_external_libraries.mk index aa3db7e69c..2abbe356c8 100644 --- a/config/mk/global/actions/download_external_libraries.mk +++ b/config/mk/global/actions/download_external_libraries.mk @@ -18,7 +18,7 @@ fftw-dl: fftqe-dl: @LIB2DO="fftqe"; $(get_external_libraries) yaml-dl: - @LIB2DO="fftqe"; $(get_external_libraries) + @LIB2DO="yaml"; $(get_external_libraries) futile-dl: @LIB2DO="futile"; $(get_external_libraries) iotk-dl: @@ -43,5 +43,5 @@ petsc-dl: @LIB2DO="petsc"; $(get_external_libraries) slepc-dl: @LIB2DO="slepc"; $(get_external_libraries) -ydiago-dl: - @LIB2DO="ydiago"; $(get_external_libraries) +ldiago-dl: + @LIB2DO="ldiago"; $(get_external_libraries) diff --git a/config/mk/global/defs.mk.in b/config/mk/global/defs.mk.in index 21949539e0..f093ea3670 100644 --- a/config/mk/global/defs.mk.in +++ b/config/mk/global/defs.mk.in @@ -36,7 +36,7 @@ do_libxc = @compile_libxc@ do_devxlib = @compile_devxlib@ do_petsc = @compile_petsc@ do_slepc = @compile_slepc@ -do_ydiago = yes +do_ldiago = @compile_ldiago@ do_magma = @compile_magma@ do_magma_fmodules = @compile_magma_fmodules@ shell = @SHELL@ diff --git a/config/mk/local/makefile b/config/mk/local/makefile index 99d642fb8e..380c96b00a 100644 --- a/config/mk/local/makefile +++ b/config/mk/local/makefile @@ -24,7 +24,7 @@ include $(compdir)/config/setup # idriver=$(IFLAG)$(includedir)/driver $(IFLAG)$(includedir)/version lf90include=$(IFLAG)$(includedir) $(IFLAG)$(includedir)/headers/common $(IFLAG)$(includedir)/headers/parser $(idriver) -lf90libinclude=$(iiotk) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(imagma) $(ihdf5) $(ilibxc) $(idevxlib) $(icudalib) $(ifft) $(ifutile) $(iyaml) $(idriver) +lf90libinclude=$(iiotk) $(inetcdff) $(inetcdf) $(ipetsc) $(islepc) $(imagma) $(ielpa) $(ildiago) $(ihdf5) $(ilibxc) $(idevxlib) $(icudalib) $(ifft) $(ifutile) $(iyaml) $(idriver) mfiles=find . -maxdepth 1 -name '*.mod' # # OBJECTS diff --git a/config/report.in b/config/report.in index 1842c5777b..95b232b663 100644 --- a/config/report.in +++ b/config/report.in @@ -16,6 +16,7 @@ # [EDITOR] @editor@ # [ MAKE ] @MAKE@ # +# [@GAMMA_ONLY_check@] Gamma-only version of the code # [@DP_check@] Double precision # [@KEEP_OBJS_check@] Keep object files # [@TIME_profile_check@] Run-Time timing profile @@ -72,8 +73,8 @@ # # > OTHERs: @DEVXLIB_info@ # -# [@YDIAGO_check@] Ydiago : @YDIAGO_LIBS_R@ -# @YDIAGO_INCS_R@ +# [@LDIAGO_check@] Ldiago : @LDIAGO_LIBS_R@ +# @LDIAGO_INCS_R@ # [@LIBXC_check@] LibXC : @LIBXC_LIBS_R@ # @LIBXC_INCS_R@ # [@DEVXLIB_check@] DevXlib : @DEVXLIB_LIBS_R@ @@ -88,8 +89,8 @@ # FC kind = @FCKIND@ @FCVERSION@ # MPI kind= @MPIKIND@ # -# [ CPP ] @CPP@ @CPPFLAGS_yambo@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_elpa@ @def_magma@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_gpu@ @def_yaml@ @PW_CPP@ -# [ FPP ] @FPP@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_elpa@ @def_magma@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_gpu@ @def_yaml@ +# [ CPP ] @CPP@ @CPPFLAGS_yambo@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_elpa@ @def_magma@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_gpu@ @def_yaml@ @def_gamma_only@ @PW_CPP@ +# [ FPP ] @FPP@ @def_netcdf@ @def_mpi@ @def_fft@ @def_slepc@ @def_scalapack@ @def_elpa@ @def_magma@ @def_compiler@ @def_dp@ @def_openmp@ @def_time_profile@ @def_uspp@ @def_gpu@ @def_yaml@ @def_gamma_only@ # [ CC ] @CC@ @CFLAGS@ # [ FC ] @FC@ @FCFLAGS@ @OPENMPLIBS@ @GPU_FLAGS@ # [ FCUF] @FCUFLAGS@ @GPU_FLAGS@ diff --git a/config/setup.in b/config/setup.in index 01350b7271..dbcd32c25a 100644 --- a/config/setup.in +++ b/config/setup.in @@ -94,7 +94,7 @@ drocmlib = @LIBROCM_PATH@ devxlib_flgs= @DEVXLIB_FLAGS@ devxlib_clib= @DEVXLIB_CUDALIBS@ gpu_support = @GPU_SUPPORT@ -ydiago_gpu_support = @YDIAGO_GPU_SUPPORT@ +ldiago_gpu_support = @LDIAGO_GPU_SUPPORT@ lfft = @FFT_LIBS@ ifft = @FFT_INCS@ liotk = @IOTK_LIBS@ @@ -105,8 +105,8 @@ lfutile = @FUTILE_LIBS@ ifutile = @FUTILE_INCS@ letsf = @ETSF_LIBS@ ietsf = @ETSF_INCS@ -lydiago = @YDIAGO_LIBS@ -iydiago = @YDIAGO_INCS@ +lldiago = @LDIAGO_LIBS@ +ildiago = @LDIAGO_INCS@ lmagma = @MAGMA_LIBS@ imagma = @MAGMA_INCS@ mpipath = @MPI_PATH@ diff --git a/configure b/configure index 52beea8ec3..ea519b896e 100755 --- a/configure +++ b/configure @@ -693,8 +693,8 @@ YAML_INCS_R YAML_LIBS_R IOTK_INCS_R IOTK_LIBS_R -YDIAGO_INCS_R -YDIAGO_LIBS_R +LDIAGO_INCS_R +LDIAGO_LIBS_R MPI_info MPI_check LIBCUDA_check @@ -707,7 +707,7 @@ SLEPC_info PETSC_info SLEPC_check PETSC_check -YDIAGO_check +LDIAGO_check ELPA_check SLK_check BLACS_check @@ -730,6 +730,7 @@ CUDA_check MEM_profile_check TIME_profile_check KEEP_OBJS_check +GAMMA_ONLY_check DP_check internal_magma compile_magma_fmodules @@ -745,11 +746,12 @@ internal_devxlib compile_devxlib DEVXLIB_INCS DEVXLIB_LIBS -with_ydiago_branch -ydiago_opt -YDIAGO_GPU_SUPPORT -YDIAGO_INCS -YDIAGO_LIBS +with_ldiago_branch +ldiago_opt +compile_ldiago +LDIAGO_GPU_SUPPORT +LDIAGO_INCS +LDIAGO_LIBS MKLGPU_LIBS LIBROCM_PATH LIBROCM_INCS @@ -954,6 +956,8 @@ MKMF_PREFIX def_memory_profile def_uspp def_time_profile +def_gamma_only +enable_gamma_only build_precision def_dp enable_dp @@ -1013,6 +1017,7 @@ enable_keep_objects enable_keep_src enable_keep_extlibs enable_dp +enable_gamma_only enable_time_profile enable_uspp enable_memory_profile @@ -1120,7 +1125,7 @@ with_rocm_libdir with_rocm_includedir with_rocm_path with_mklgpu_libs -with_ydiago_branch +with_ldiago_branch with_devxlib_libs with_devxlib_path with_devxlib_libdir @@ -1778,6 +1783,7 @@ Optional Features: --enable-keep-src Keep preprocessed.f90 file. Default is yes. --enable-keep-extlibs Keep downloaded packages as tar.gz . Default is yes. --enable-dp Double-precision build. Default is no. + --enable-gamma-only Gamma only build. Default is no. --enable-time-profile Extended timing profile of specific sections. Default is yes. --enable-uspp Enable Ultrasoft PP support @@ -1918,7 +1924,7 @@ Optional Packages: --with-rocm-includedir= Path to the rocm include directory --with-rocm-path= Path to rocm install directory --with-mklgpu-libs= Use the MKLGPU library - --with-ydiago-branch= Use the of the ydiago repository. + --with-ldiago-branch= Use the of the ldiago repository. --with-devxlib-libs= Use devxlib libraries --with-devxlib-path= Path to devxlib install directory --with-devxlib-libdir= Path to the devxlib lib directory @@ -3559,6 +3565,20 @@ if test x"$build_precision" = "x"; then as_fn_error $? "Non correct specificatio +# +# ============================================================================ +# VERSION for gamma only case +# Check whether --enable-gamma_only was given. +if test ${enable_gamma_only+y} +then : + enableval=$enable_gamma_only; +fi + +def_gamma_only="" +if test x"$enable_gamma_only" = "x"; then enable_gamma_only="no"; fi +if test x"$enable_gamma_only" = "xyes"; then def_gamma_only="-D_GAMMA_ONLY"; fi + + # # ============================================================================ # @@ -5081,6 +5101,7 @@ fi # version.m4 -> version.h cat << EOF > include/version/version.h +#pragma once #define YAMBO_VERSION $SVERSION #define YAMBO_SUBVERSION $SSUBVERSION #define YAMBO_PATCHLEVEL $SPATCHLEVEL @@ -7215,6 +7236,7 @@ INTELVERSION="unknown" FCKIND="unknown" case "${FC}" in *ftn*) + FCKIND="cray" FCVERSION=`$FC --version` ;; *abf90*) @@ -7381,7 +7403,12 @@ i?86*linux*) CPU_FLAG="-xHost" #CPU_FLAG=" " ;; - *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + ;; + *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" @@ -7631,7 +7658,13 @@ aarch*linux* | arm*linux* ) #CPU_FLAG="-xHost" CPU_FLAG=" " ;; - *2020* | *2021* | *2022* | *2023* | *2024* | *2025* ) + *2025* ) + CPU_FLAG=" " + OMPFLAGS="-qopenmp" + FCMFLAG="-nofor-main" + CFLAGS="-O2 -std=gnu99" + ;; + *2020* | *2021* | *2022* | *2023* | *2024* ) CPU_FLAG=" " OMPFLAGS="-qopenmp -parallel" FCMFLAG="-nofor-main" @@ -14520,7 +14553,7 @@ printf %s "checking for internal HDF5 library... " >&6; }; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 printf "%s\n" "already compiled" >&6; } ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_hdf5="no" ; IO_LIB_VER="parallel"; @@ -14964,7 +14997,7 @@ printf %s "checking for internal NETCDF library... " >&6; }; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: already compiled" >&5 printf "%s\n" "already compiled" >&6; } ; # - elif test "$IO_LIB_VER" = "serial" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then + elif test "$IO_LIB_VER" = "serial" && test "$mpibuild" = "yes" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdf.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libnetcdff.a" && test -e "${NETCDF_HDF5_PAR_PATH}/lib/libhdf5.a"; then # compile_netcdf="no" ; IO_LIB_VER="parallel"; @@ -15715,12 +15748,14 @@ if test x"$acx_libxc_ok" = xno ; then if test -d "$with_libxc_path"; then libxc_incdir="$with_libxc_path/include" libxc_libdir="$with_libxc_path/lib" + libxc_lib64dir="$with_libxc_path/lib64" fi if test -d "$with_libxc_includedir"; then libxc_incdir="$with_libxc_includedir" ; fi if test -d "$with_libxc_libdir"; then libxc_libdir="$with_libxc_libdir" ; fi # # dynamic linkage, separate Fortran interface - if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_libdir"; then LIBXC_LIBS="-L$libxc_libdir -lxcf90 -lxcf03 -lxc"; fi + if test ! -z "$libxc_lib64dir"; then LIBXC_LIBS="-L$libxc_lib64dir $LIBXC_LIBS"; fi if test ! -z "$libxc_incdir"; then LIBXC_INCS="$IFLAG$libxc_incdir"; fi # if test ! -z "$with_libxc_libs" ; then LIBXC_LIBS="$with_libxc_libs" ; fi @@ -16625,31 +16660,45 @@ fi # -# Check whether --with-ydiago-branch was given. -if test ${with_ydiago_branch+y} +# Check whether --with-ldiago-branch was given. +if test ${with_ldiago_branch+y} then : - withval=$with_ydiago_branch; + withval=$with_ldiago_branch; else $as_nop - with_ydiago_branch=none + with_ldiago_branch=none fi # -ac_config_files="$ac_config_files lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" +ac_config_files="$ac_config_files lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in" + + +if test "$def_scalapack" = "-D_SCALAPACK" ; then + + compile_ldiago="yes" + # GPU flags are passed to ldiago compilation only if elpa library is available + if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then + ldiago_opt="$def_gpu $def_elpa" + LDIAGO_GPU_SUPPORT="$GPU_SUPPORT" + else + ldiago_opt="$def_elpa" + LDIAGO_GPU_SUPPORT="no_gpu" + fi + + LDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib/libldiago.a" + LDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include/" + #LDIAGO_LIBS="${compdir}/lib/libldiago.a" + #LDIAGO_INCS="$IFLAG${compdir}/include/" -# GPU flags are passed to ydiago compilation only if elpa library is available -if test ! x"$def_gpu" = "x" && test "$def_elpa" = "-D_ELPA" ; then - ydiago_opt="$def_gpu $def_elpa" - YDIAGO_GPU_SUPPORT="$GPU_SUPPORT" else - ydiago_opt="$def_elpa" - YDIAGO_GPU_SUPPORT="no_gpu" + + compile_ldiago="no" + ldiago_opt="" + LDIAGO_LIBS="" + LDIAGO_INCS="" + fi -YDIAGO_LIBS="${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/lib/libydiago.a" -YDIAGO_INCS="$IFLAG${extlibs_path}/${FCKIND}/${FC}/${YDIAGO_GPU_SUPPORT}/include/" -#YDIAGO_LIBS="${compdir}/lib/libydiago.a" -#YDIAGO_INCS="$IFLAG${compdir}/include/" @@ -17136,6 +17185,9 @@ fi DP_check="-" if test "$enable_dp" = "yes" ; then DP_check="X"; fi # +GAMMA_ONLY_check="-" +if test "$enable_gamma_only" = "yes" ; then GAMMA_ONLY_check="X"; fi +# KEEP_OBJS_check="-" if test "$enable_keep_objects" = "yes" ; then KEEP_OBJS_check="X"; fi # @@ -17247,10 +17299,14 @@ if test "$internal_blacs" = "yes" ; then if test "$compile_blacs" = "no" ; then BLACS_check="I"; fi fi # -if test x"$with_ydiago_branch" = "xnone"; then - YDIAGO_check="I"; +if test "$compile_ldiago" = "yes"; then + if test x"$with_ldiago_branch" = "xnone"; then + LDIAGO_check="I"; + else + LDIAGO_check="G"; + fi else - YDIAGO_check="G"; + LDIAGO_check="-"; fi # PETSC_check="-" @@ -17347,6 +17403,7 @@ fi + # @@ -17388,7 +17445,7 @@ fi # STRIPE [LIB] from paths # -TMP1=`echo $YDIAGO_LIBS | sed 's/\//+/g'` +TMP1=`echo $LDIAGO_LIBS | sed 's/\//+/g'` TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` STRIPE=`echo $TMP3 | sed 's/+/\//g'` @@ -17396,10 +17453,10 @@ if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi -#ACX_STRIPE_SUBPATH2($YDIAGO_LIBS,"LIB") -YDIAGO_LIBS_R=$STRIPE +#ACX_STRIPE_SUBPATH2($LDIAGO_LIBS,"LIB") +LDIAGO_LIBS_R=$STRIPE -TMP1=`echo $YDIAGO_INCS | sed 's/\//+/g'` +TMP1=`echo $LDIAGO_INCS | sed 's/\//+/g'` TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` STRIPE=`echo $TMP3 | sed 's/+/\//g'` @@ -17407,8 +17464,8 @@ if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi -#ACX_STRIPE_SUBPATH2($YDIAGO_INCS,"INC") -YDIAGO_INCS_R=$STRIPE +#ACX_STRIPE_SUBPATH2($LDIAGO_INCS,"INC") +LDIAGO_INCS_R=$STRIPE # @@ -18615,7 +18672,7 @@ do "lib/fftqe/c_defs.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/fftqe/c_defs.h:lib/fftqe/c_defs.h.in" ;; "lib/fftqe/fftqe_defs.h") CONFIG_FILES="$CONFIG_FILES lib/fftqe/fftqe_defs.h:lib/fftqe/fftqe_defs.h.in" ;; "lib/iotk/make_iotk.inc") CONFIG_FILES="$CONFIG_FILES lib/iotk/make_iotk.inc:lib/iotk/make_iotk.inc.in" ;; - "lib/ydiago/make_ydiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ydiago/make_ydiago.inc:lib/ydiago/make_ydiago.inc.in" ;; + "lib/ldiago/make_ldiago.inc") CONFIG_FILES="$CONFIG_FILES lib/ldiago/make_ldiago.inc:lib/ldiago/make_ldiago.inc.in" ;; "lib/magma/make_magma.inc") CONFIG_FILES="$CONFIG_FILES lib/magma/make_magma.inc:lib/magma/make_magma.inc.in" ;; "include/headers/common/have_malloc.h") CONFIG_HEADERS="$CONFIG_HEADERS include/headers/common/have_malloc.h:include/headers/common/have_malloc.h.in" ;; "config/setup") CONFIG_FILES="$CONFIG_FILES config/setup" ;; @@ -19323,6 +19380,15 @@ if ! test -d "$extlibs_path/${FCKIND}/${FC}/lib"; then mkdir "$extlibs_pa if ! test -d "$extlibs_path/${FCKIND}/${FC}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/include"; fi if ! test -d "$extlibs_path/${FCKIND}/${FC}/bin"; then mkdir "$extlibs_path/${FCKIND}/${FC}/bin"; fi # +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/${GPU_SUPPORT}/include"; fi +# +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/lib"; fi +if ! test -d "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; then mkdir "$extlibs_path/${FCKIND}/${FC}/diago/${LDIAGO_GPU_SUPPORT}/include"; fi +# if test -d "$extlibs_path/${FCKIND}/${FC}" ; then BIN_LIBRARIES=$extlibs_path/${FCKIND}/${FC}/bin/* ; BIN_NETCDF=$extlibs_path/${FCKIND}/${FC}/${NETCDF_VER}/${IO_LIB_VER}/bin/* ; diff --git a/lib/archive/Makefile.loc b/lib/archive/Makefile.loc index 7887c0dc95..64588f97dd 100644 --- a/lib/archive/Makefile.loc +++ b/lib/archive/Makefile.loc @@ -14,8 +14,8 @@ all: $(EXT_LIBS) # # Libraries (GIT + archives) # -ydiago: - @+URL="$(url_Ydiago)" ; GBRANCH="$(branch_Ydiago)" ; GIT="$(git_Ydiago)"; LIB="$(pkgname_Ydiago)"; $(call getsrc_git,"Ydiago"); +ldiago: + @+URL="$(url_Ldiago)" ; GBRANCH="$(branch_Ldiago)" ; GIT="$(git_Ldiago)"; LIB="$(pkgname_Ldiago)"; $(call getsrc_git,"Ldiago"); devxlib: @+URL="$(url_devxlib)" ; GBRANCH="$(branch_devxlib)" ; GIT="$(git_devxlib)"; LIB="$(pkgname_devxlib)" ; $(call getsrc_git,"devxlib") # @@ -67,7 +67,7 @@ clean_git_folders: # clean_tgz: if test ! -e keep-extlibs-stamp ; then \ - if test -s $(tarball_Ydiago) && test "$(keep_Ydiago)" != "yes" ; then rm $(tarball_Ydiago) ; fi ; \ + if test -s $(tarball_Ldiago) && test "$(keep_Ldiago)" != "yes" ; then rm $(tarball_Ldiago) ; fi ; \ if test -s $(tarball_libxc) && test "$(keep_libxc)" != "yes" ; then rm $(tarball_libxc) ; fi ; \ if test -s $(tarball_iotk) && test "$(keep_iotk)" != "yes" ; then rm $(tarball_iotk) ; fi ; \ if test -s $(tarball_netcdf) && test "$(keep_netcdf)" != "yes" ; then rm $(tarball_netcdf) ; fi ; \ diff --git a/lib/archive/git.list.in b/lib/archive/git.list.in index 5701bc7844..57e46b27be 100644 --- a/lib/archive/git.list.in +++ b/lib/archive/git.list.in @@ -5,7 +5,7 @@ # # Authors (see AUTHORS file for details): AM, DS # -branch_Ydiago=@with_ydiago_branch@ +branch_Ldiago=@with_ldiago_branch@ branch_devxlib=@with_devxlib_branch@ branch_slepc=@with_slepc_branch@ branch_petsc=@with_petsc_branch@ diff --git a/lib/archive/package.list b/lib/archive/package.list index 4863b193b5..7d16fa43cb 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -1,11 +1,11 @@ # # Libs list # -EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack elpa magma petsc slepc fftw fftqe ydiago devxlib +EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack elpa magma petsc slepc fftw fftqe ldiago devxlib # # storing options # -keep_Ydiago=yes +keep_Ldiago=yes keep_iotk=yes keep_netcdf=no keep_netcdff=no @@ -27,7 +27,7 @@ keep_hdf5=no # # package versions # -version_Ydiago=0.4.0 +version_Ldiago=0.5.0 version_iotk=y1.2.2 version_netcdf=4.9.0 version_netcdff=4.6.0 @@ -50,7 +50,7 @@ version_devxlib=0.8.5 # # package names # -pkgname_Ydiago=Ydiago-$(version_Ydiago) +pkgname_Ldiago=Ldiago-$(version_Ldiago) pkgname_iotk=iotk-$(version_iotk) pkgname_netcdf=netcdf-c-$(version_netcdf) pkgname_netcdff=netcdf-fortran-$(version_netcdff) @@ -72,7 +72,7 @@ pkgname_devxlib=devicexlib-$(version_devxlib) # # tarball names # -tarball_Ydiago=$(version_Ydiago).tar.gz +tarball_Ldiago=$(version_Ldiago).tar.gz tarball_iotk=$(pkgname_iotk).tar.gz tarball_netcdf=v$(version_netcdf).tar.gz tarball_netcdff=v$(version_netcdff).tar.gz @@ -94,7 +94,6 @@ tarball_devxlib=$(pkgname_devxlib).tar.gz # # External URL's on Github # -url_Ydiago=https://github.com/yambo-code/Ydiago/archive/refs/tags/$(tarball_Ydiago) url_lapack=https://github.com/Reference-LAPACK/lapack/archive/refs/tags/$(tarball_lapack) url_scalapack=https://github.com/Reference-ScaLAPACK/scalapack/archive/refs/tags/$(tarball_scalapack) url_hdf5=https://github.com/HDFGroup/hdf5/archive/refs/tags/$(tarball_hdf5) @@ -103,6 +102,7 @@ url_netcdff=https://github.com/Unidata/netcdf-fortran/archive/refs/tags/$(tarbal # # External URL's on Gitlab # +url_Ldiago=https://gitlab.com/lumen-code/Ldiago/-/archive/$(version_Ldiago)/$(tarball_Ldiago) url_slepc=https://gitlab.com/slepc/slepc/-/archive/v$(version_slepc)/$(tarball_slepc) url_petsc=https://gitlab.com/petsc/petsc/-/archive/v$(version_petsc)/$(tarball_petsc) url_devxlib=https://gitlab.com/max-centre/components/devicexlib/-/archive/$(version_devxlib)/$(tarball_devxlib) @@ -130,14 +130,14 @@ url_futile=$(url_base)/$(tarball_futile) # # git repositories # -git_Ydiago=git@github.com:yambo-code/Ydiago.git +git_Ldiago=git@gitlab.com:lumen-code/Ldiago.git git_devxlib=git@gitlab.com:max-centre/components/devicexlib.git git_slepc=git@gitlab.com:slepc/slepc.git git_petsc=git@gitlab.com:petsc/petsc.git # # git default branches # -branch_Ydiago=none +branch_Ldiago=none branch_devxlib=none branch_slepc=none branch_petsc=none diff --git a/lib/ydiago/Makefile.loc b/lib/ldiago/Makefile.loc similarity index 50% rename from lib/ydiago/Makefile.loc rename to lib/ldiago/Makefile.loc index 4e950a235a..7545f0528e 100644 --- a/lib/ydiago/Makefile.loc +++ b/lib/ldiago/Makefile.loc @@ -6,12 +6,12 @@ include ../../config/setup include ../archive/package.list # -LIBNAME=libydiago.a -LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/$(ydiago_gpu_support) +LIBNAME=libldiago.a +LIBPATH=$(libs_prefix)/$(fc_kind)/${fc}/diago/$(ldiago_gpu_support) #LIBPATH=$(compdir) LIBRARY=$(LIBPATH)/lib/$(LIBNAME) # -PACKAGE=$(pkgname_Ydiago) +PACKAGE=$(pkgname_Ldiago) # include ../config/external_libs_commons.mk include ../config/external_libs_defs.mk @@ -28,30 +28,30 @@ configure: uncompress @if ! test -e configured.stamp; then \ rm -f ${compdir}/log/config_$(PACKAGE).log; \ echo "\t[$(PACKAGE)] configuration"; \ - if test -e ${compdir}/lib/ydiago/make_ydiago.inc ; then \ - echo "cp ${compdir}/lib/ydiago/make_ydiago.inc ${compdir}/lib/ydiago/$(PACKAGE)/src/make.inc" >> ${compdir}/log/config_$(PACKAGE).log ; \ - cp ${compdir}/lib/ydiago/make_ydiago.inc ${compdir}/lib/ydiago/$(PACKAGE)/src/make.inc ; \ + if test -e ${compdir}/lib/ldiago/make_ldiago.inc ; then \ + echo "cp ${compdir}/lib/ldiago/make_ldiago.inc ${compdir}/lib/ldiago/$(PACKAGE)/src/make.inc" >> ${compdir}/log/config_$(PACKAGE).log ; \ + cp ${compdir}/lib/ldiago/make_ldiago.inc ${compdir}/lib/ldiago/$(PACKAGE)/src/make.inc ; \ fi ; \ touch configured.stamp;\ fi # compile: uncompress configure @if ! test -e compiled.stamp ; then \ - cd ${compdir}/lib/ydiago/$(PACKAGE)/src ; make ; \ - cd ${compdir}/lib/ydiago/ ; touch compiled.stamp; \ + cd ${compdir}/lib/ldiago/$(PACKAGE)/src ; make ; \ + cd ${compdir}/lib/ldiago/ ; touch compiled.stamp; \ fi install: uncompress configure compile @if ! test -e installed.stamp ; then \ echo "\t[$(PACKAGE)] installation"; \ - echo "cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libydiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - echo "cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ - echo "chmod +x $(LIBPATH)/lib/libydiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ - cp ${compdir}/lib/ydiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libydiago.a ;\ - cp ${compdir}/lib/ydiago/$(PACKAGE)/src/ydiago_interface.mod $(LIBPATH)/include/ ;\ - chmod +x $(LIBPATH)/lib/libydiago.a ; \ - touch ${compdir}/config/stamps_and_lists/libydiago.a.stamp;\ - echo ydiago_interface >> ${compdir}/src/bse/modules.list;\ + echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ + echo "cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/" >> ${compdir}/log/install_$(PACKAGE).log ; \ + echo "chmod +x $(LIBPATH)/lib/libldiago.a" >> ${compdir}/log/install_$(PACKAGE).log ; \ + cp ${compdir}/lib/ldiago/$(PACKAGE)/src/libdiago.a $(LIBPATH)/lib/libldiago.a ;\ + cp ${compdir}/lib/ldiago/$(PACKAGE)/src/ldiago_interface.mod $(LIBPATH)/include/ ;\ + chmod +x $(LIBPATH)/lib/libldiago.a ; \ + touch ${compdir}/config/stamps_and_lists/libldiago.a.stamp;\ + echo ldiago_interface >> ${compdir}/src/bse/modules.list;\ touch installed.stamp;\ fi # diff --git a/lib/ydiago/make_ydiago.inc.in b/lib/ldiago/make_ldiago.inc.in similarity index 88% rename from lib/ydiago/make_ydiago.inc.in rename to lib/ldiago/make_ldiago.inc.in index 9df1c17724..135562bae1 100644 --- a/lib/ydiago/make_ydiago.inc.in +++ b/lib/ldiago/make_ldiago.inc.in @@ -5,7 +5,7 @@ # # Authors (see AUTHORS file for details): DS -# make.inc from Ydiago repository +# make.inc from Ldiago repository CC = @CC@ FC = @FC@ @@ -13,7 +13,7 @@ AR = @AR@ CPP = @CPP@ CFLAGS = -O3 #@CFLAGS@ #-g -fsanitize=address -fno-omit-frame-pointer -YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @ydiago_opt@ +YAMBO_FLAGS = @def_mpi@ @def_scalapack@ @def_compiler@ @def_dp@ @def_openmp@ @ldiago_opt@ ELPA_INC = @ELPA_INCS@ @LIBCUDA_INCS@ @GPU_INCS@ @LIBROCM_INCS@ # @@ -60,6 +60,6 @@ RANLIB = echo # libraries # -#LIBS = $(extlibs_prefix)/$(fc_kind)/$(f90)/$(ydiago_gpu_support)/lib/libydiago.a -LIBS = ./libydiago.a +#LIBS = $(extlibs_prefix)/$(fc_kind)/$(f90)/$(ldiago_gpu_support)/lib/libldiago.a +LIBS = ./libldiago.a IFLAGS = -I./ -I../ -I../include diff --git a/sbin/compilation/libraries.sh b/sbin/compilation/libraries.sh index 30db21d6dd..c68584aa79 100755 --- a/sbin/compilation/libraries.sh +++ b/sbin/compilation/libraries.sh @@ -17,7 +17,7 @@ do done # llocal="-lqe_pseudo -lmath77 -lslatec -llocal" -lPLA="\$(lydiago) \$(lelpa) \$(lscalapack) \$(lblacs) \$(lmagma) \$(llapack) \$(lblas)" +lPLA="\$(lldiago) \$(lelpa) \$(lscalapack) \$(lblacs) \$(lmagma) \$(llapack) \$(lblas)" lSL="\$(lslepc) \$(lpetsc)" lIO="\$(liotk) \$(lnetcdff) \$(lnetcdf) \$(lhdf5)" lextlibs="\$(llibxc) \$(lfft) \$(lfutile) \$(lyaml) \$(ldevxlib) \$(llapack) \$(lblas) \$(lcudalib)" diff --git a/src/bse/.objects b/src/bse/.objects index 0dba187efd..841a0cf163 100644 --- a/src/bse/.objects +++ b/src/bse/.objects @@ -6,13 +6,11 @@ SLEPC_objects = K_stored_in_a_slepc_matrix.o K_shell_matrix.o K_stored_in_a_nest PARIO_objects = K_compress.o #endif #if defined _SCALAPACK -SLK_objects = K_inversion_do_it_SLK.o +SLK_objects = K_inversion_do_it_SLK.o YDIAGO_driver.o K_fill_block_cyclic.o #endif objs = K_blocks.o K_driver_init.o K_dipoles.o K_IP.o K_IP_sort.o \ K_Transitions_setup.o K_Transition_check.o \ K_driver.o BSE_utilities.o K_WF_phases.o \ - K_fill_block_cyclic.o \ - YDIAGO_driver.o \ K_kernel.o $(PARIO_objects) K_correlation_collisions_dir.o K_correlation_collisions_std.o K_exchange_collisions.o \ K_correlation_kernel_dir.o K_correlation_kernel_std.o K_exchange_kernel.o \ K_restart.o K_solvers.o K_Haydock.o K_Haydock_response.o K_Haydock_gather.o K_Haydock_scatter.o K_screened_interaction.o \ diff --git a/src/bse/K_fill_block_cyclic.F b/src/bse/K_fill_block_cyclic.F index 8946339b97..155c368145 100644 --- a/src/bse/K_fill_block_cyclic.F +++ b/src/bse/K_fill_block_cyclic.F @@ -19,7 +19,7 @@ subroutine K_fill_block_cyclic(i_BS_mat, diago_mat) use gpu_m, ONLY:have_cuda ! !use, intrinsic :: iso_c_binding, only: c_ptr - use ydiago_interface + use ldiago_interface ! implicit none ! diff --git a/src/bse/YDIAGO_driver.F b/src/bse/YDIAGO_driver.F index ad7d437c5f..ca6ca9b1ef 100644 --- a/src/bse/YDIAGO_driver.F +++ b/src/bse/YDIAGO_driver.F @@ -30,7 +30,7 @@ subroutine YDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & use openmp, ONLY:n_threads_K use LIVE_t, ONLY:live_timing use com, ONLY:msg - use ydiago_interface + use ldiago_interface ! implicit none ! From 1421dcdcce3b91ec5274afaa4d53facc2d8e8e13 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 6 Nov 2025 14:08:32 +0100 Subject: [PATCH 1278/1367] Fixed linking with different versions of slepc --- src/linear_algebra/MATRIX_slepc.F | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index 335f884426..bc73b8f1a1 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -269,6 +269,7 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) !Set monitor call EPSMonitorSet(eps,MyEPSMonitor,0,PETSC_NULL_FUNCTION,ierr) ! +#if PETSC_VERSION_GE(3,22,0) if(present(V_left).and.BSS_slepc_pseudo_herm.and.epskind==EPSKRYLOVSCHUR) then ! Default Shao used in case input is mispelled or not set epsbsetype=EPS_KRYLOVSCHUR_BSE_SHAO @@ -283,15 +284,20 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) ! ! Fix the BSS_slepc_approach string if (epskind==EPSKRYLOVSCHUR) BSS_slepc_approach="Krylov-Schur" +#endif ! if(present(V_left)) then +#if PETSC_VERSION_GE(3,22,0) if(BSS_slepc_pseudo_herm.and.epskind==EPSKRYLOVSCHUR) then if(epsbsetype==EPS_KRYLOVSCHUR_BSE_SHAO) BSS_slepc_approach=trim(BSS_slepc_approach)//"+Shao" if(epsbsetype==EPS_KRYLOVSCHUR_BSE_GRUNING) BSS_slepc_approach=trim(BSS_slepc_approach)//"+Gruning" if(epsbsetype==EPS_KRYLOVSCHUR_BSE_PROJECTEDBSE) BSS_slepc_approach=trim(BSS_slepc_approach)//"+ProjectedBSE" else +#endif BSS_slepc_approach=trim(BSS_slepc_approach)//"+NonHermitian" +#if PETSC_VERSION_GE(3,22,0) endif +#endif endif ! call msg( 'sr', '[SLEPC] Approach ',BSS_slepc_approach) @@ -376,12 +382,21 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterEnd(vs,xup,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs2,xdown,vout2,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr,ierr) V_right(1:Nsize/2, i_eig+1) = cmplx(xsr,kind=SP) call VecRestoreArrayReadF90(vout,xsr,ierr) call VecGetArrayReadF90(vout2,xsr,ierr) V_right(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr,kind=SP) call VecRestoreArrayReadF90(vout2,xsr,ierr) +#else + call VecGetArrayRead(vout,xsr,ierr) + V_right(1:Nsize/2, i_eig+1) = cmplx(xsr,kind=SP) + call VecRestoreArrayRead(vout,xsr,ierr) + call VecGetArrayRead(vout2,xsr,ierr) + V_right(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr,kind=SP) + call VecRestoreArrayRead(vout2,xsr,ierr) +#endif ! call VecRestoreSubVector(xr,is(1),xup,ierr) call VecRestoreSubVector(xr,is(2),xdown,ierr) @@ -396,12 +411,21 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterEnd(vs,xup,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs2,xdown,vout2,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr_left,ierr) V_left(1:Nsize/2, i_eig+1) = cmplx(xsr_left,kind=SP) call VecRestoreArrayReadF90(vout,xsr_left,ierr) call VecGetArrayReadF90(vout2,xsr_left,ierr) V_left(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr_left,kind=SP) call VecRestoreArrayReadF90(vout2,xsr_left,ierr) +#else + call VecGetArrayRead(vout,xsr_left,ierr) + V_left(1:Nsize/2, i_eig+1) = cmplx(xsr_left,kind=SP) + call VecRestoreArrayRead(vout,xsr_left,ierr) + call VecGetArrayRead(vout2,xsr_left,ierr) + V_left(Nsize/2+1:Nsize, i_eig+1) = cmplx(xsr_left,kind=SP) + call VecRestoreArrayRead(vout2,xsr_left,ierr) +#endif ! call VecRestoreSubVector(xr_left,is(1),xup,ierr) call VecRestoreSubVector(xr_left,is(2),xdown,ierr) @@ -412,10 +436,17 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterBegin(vs,xr,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs,xr,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr,ierr) V_right(:, i_eig+1) = cmplx(xsr,kind=SP) !if (BSS_slepc_double_grp) V_right(BS_K_dim(1)+1:,i_eig+1)=cI*V_right(BS_K_dim(1)+1:,i_eig+1) call VecRestoreArrayReadF90(vout,xsr,ierr) +#else + call VecGetArrayRead(vout,xsr,ierr) + V_right(:, i_eig+1) = cmplx(xsr,kind=SP) + !if (BSS_slepc_double_grp) V_right(BS_K_dim(1)+1:,i_eig+1)=cI*V_right(BS_K_dim(1)+1:,i_eig+1) + call VecRestoreArrayRead(vout,xsr,ierr) +#endif ! if (present(V_left)) then !save the left eigenvectors @@ -423,10 +454,17 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) call VecScatterBegin(vs,xr_left,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) call VecScatterEnd(vs,xr_left,vout,INSERT_VALUES,SCATTER_FORWARD,ierr) ! +#if PETSC_VERSION_LT(3,23,0) call VecGetArrayReadF90(vout,xsr_left,ierr) V_left(:, i_eig+1) = cmplx(xsr_left,kind=SP) !if (BSS_slepc_double_grp) V_left(BS_K_dim(1)+1:,i_eig+1) =cI*V_left(BS_K_dim(1)+1:,i_eig+1) call VecRestoreArrayReadF90(vout,xsr_left,ierr) +#else + call VecGetArrayRead(vout,xsr_left,ierr) + V_left(:, i_eig+1) = cmplx(xsr_left,kind=SP) + !if (BSS_slepc_double_grp) V_left(BS_K_dim(1)+1:,i_eig+1) =cI*V_left(BS_K_dim(1)+1:,i_eig+1) + call VecRestoreArrayRead(vout,xsr_left,ierr) +#endif endif endif ! From 714f8bd00bd9808d25bdda17c700275d71d862eb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 6 Nov 2025 15:14:20 +0100 Subject: [PATCH 1279/1367] Fixed bug introduced when fixing compilation with nvfortran --- src/bse/K_Haydock.F | 2 +- src/wf_and_fft/WF_apply_symm.F | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bse/K_Haydock.F b/src/bse/K_Haydock.F index 91507db5e1..7a227eb2df 100644 --- a/src/bse/K_Haydock.F +++ b/src/bse/K_Haydock.F @@ -329,7 +329,7 @@ subroutine K_Haydock(iq,W,OBS,Xk) call K_multiply_by_V(V0,Vnp1,-1,iq,"all") call K_dot_product(v0_mod_,V0,Vnp1,1) ! - Haydock_v0_mod=sqrt(Ares_fac*real(v0_mod_)) + Haydock_v0_mod=sqrt(Ares_fac*real(v0_mod_,SP)) ! do i_g=1,BS_nT_grps if (.not.PAR_IND_T_Haydock%element_1D(i_g)) cycle diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index af6f63cdee..38814248f8 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -29,7 +29,7 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) ! WF_RSPACE(SP), pointer DEV_ATTR :: WF_p(:,:) integer :: i_wf - integer :: ifft,ifftp,isymm + integer :: ifft,ifftp,isymm,i_spinor ! i_wf=WF%index(isc(1),isc(2),isc(4)) ! @@ -53,12 +53,14 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) ! !DEV_ACC_DEBUG data present(WF_p,WF_symm) !DEV_ACC parallel loop - !DEV_CUF kernel do(1) <<<*,*>>> + !DEV_CUF kernel do(2) <<<*,*>>> !DEV_OMPGPU target map(present,alloc:WF_p,WF_symm) !DEV_OMPGPU teams loop - !DEV_OMP parallel do default(shared), private(ifft) - do ifft = 1, fft_size - WF_symm(ifft,1)=cmplx(WF_p(ifft,1),kind=SP) + !DEV_OMP parallel do default(shared), private(ifft,i_spinor) + do i_spinor = 1, n_spinor + do ifft = 1, fft_size + WF_symm(ifft,i_spinor)=cmplx(WF_p(ifft,i_spinor),kind=SP) + enddo enddo !DEV_OMPGPU end target !DEV_ACC_DEBUG end data From 57b1b290e99bd739620dd94a25b842aecbc1c060 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 6 Nov 2025 20:07:46 +0100 Subject: [PATCH 1280/1367] Version 5.3.0, Revision 26232, Hash da6b6562e9 MODIFIED * include/version/version.m4 nloptics/NL_Hamiltonian.F nloptics/el_density_vbands.F Bugs: - Additions: -More openMP Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/nloptics/NL_Hamiltonian.F | 2 +- src/nloptics/el_density_vbands.F | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 0d06d54ed7..06bddbeda1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26231 h.b2d872a348, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26232 h.da6b6562e9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26231" -SHASH="b2d872a348" +SREVISION="26232" +SHASH="da6b6562e9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index 93b4452416..b0cb40ff94 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -9,7 +9,7 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,V_bands) ! ! The subroutine calculate Ho + V + Sigma and the fields E_tot, E_ext, E_ks ! - ! H_k=Ho_k+U_k+ V_k^H-V_k^H[rho_ref]+V_xc[rho] + ! H_k=Ho_k+U_k+ V_k^H[rho]-V_k^H[rho_ref]+V_xc[rho] ! use pars, ONLY:SP,cZERO,pi,cONE use units, ONLY:SPEED_OF_LIGHT diff --git a/src/nloptics/el_density_vbands.F b/src/nloptics/el_density_vbands.F index c76d295d16..f2b84181b6 100644 --- a/src/nloptics/el_density_vbands.F +++ b/src/nloptics/el_density_vbands.F @@ -47,7 +47,9 @@ subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) integer :: i1,ik,is,rho_syms,ir,ik_mem real(SP) :: rho_no_sym(fft_size) ! +!$OMP WORKSHARE rho_no_sym=rZERO +!$OMP END WORKSHARE ! do ik=1,Xk%nibz ! @@ -70,7 +72,9 @@ subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) ! Simmetrization ! rho_syms=nsym/(i_time_rev+1) +!$OMP WORKSHARE rho(:)=rZERO +!$OMP END WORKSHARE ! !$omp parallel do default(shared), private(ir), reduction(+:rho) do ir=1,fft_size From 591c2644ce0e4f96ffc210a9aa258651a6125b89 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 6 Nov 2025 20:09:48 +0100 Subject: [PATCH 1281/1367] Version 5.3.0, Revision 26233, Hash 57b1b290e9 MODIFIED * include/version/version.m4 hamiltonian/V_Hartree.F Bugs: - Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/hamiltonian/V_Hartree.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 06bddbeda1..c89f1093d7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26232 h.da6b6562e9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26233 h.57b1b290e9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26232" -SHASH="da6b6562e9" +SREVISION="26233" +SHASH="57b1b290e9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/hamiltonian/V_Hartree.F b/src/hamiltonian/V_Hartree.F index 37e5c6c9f8..a057423262 100644 --- a/src/hamiltonian/V_Hartree.F +++ b/src/hamiltonian/V_Hartree.F @@ -75,7 +75,7 @@ subroutine V_Hartree(rho,vhr) ! !$OMP WORKSHARE vhr(:,1) = real(vhtmp,SP) - !$OMP END WORKSHARE +!$OMP END WORKSHARE if(n_spin==2) vhr(:,2)=vhr(:,1) ! call timing('V_Hartree',OPR='stop') From dd1c0eac2b4194fad98ace4f598709253292f46c Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 7 Nov 2025 09:17:33 +0100 Subject: [PATCH 1282/1367] Version 5.3.0, Revision 26244, Hash 17f453eaa6 MODIFIED * include/version/version.m4 collisions/COLLISIONS_compose_nl.F collisions/LSEX_potential.F collisions/OSCLL_compose_vbands.F dipoles/DIPOLE_overlaps.F hamiltonian/Build_W_operator.F hamiltonian/V_Hartree.F nloptics/NL_Berry_current.F nloptics/NL_Hamiltonian.F nloptics/NL_Integrator.F nloptics/NL_build_dG_lesser.F nloptics/el_density_vbands.F Bugs: - Additions: -Fixed good parallelization for WORKSHARE Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/collisions/COLLISIONS_compose_nl.F | 4 ++-- src/collisions/LSEX_potential.F | 4 ++-- src/collisions/OSCLL_compose_vbands.F | 4 ++-- src/dipoles/DIPOLE_overlaps.F | 4 ++-- src/hamiltonian/Build_W_operator.F | 8 ++++---- src/hamiltonian/V_Hartree.F | 8 ++++---- src/nloptics/NL_Berry_current.F | 4 ++-- src/nloptics/NL_Hamiltonian.F | 4 ++-- src/nloptics/NL_Integrator.F | 16 ++++++++-------- src/nloptics/NL_build_dG_lesser.F | 8 ++++---- src/nloptics/el_density_vbands.F | 8 ++++---- 12 files changed, 39 insertions(+), 39 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index c89f1093d7..b9edc138fc 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26233 h.57b1b290e9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26244 h.17f453eaa6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26233" -SHASH="57b1b290e9" +SREVISION="26244" +SHASH="17f453eaa6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/COLLISIONS_compose_nl.F b/src/collisions/COLLISIONS_compose_nl.F index 567bb6df66..a75c7f611a 100644 --- a/src/collisions/COLLISIONS_compose_nl.F +++ b/src/collisions/COLLISIONS_compose_nl.F @@ -54,9 +54,9 @@ subroutine COLLISIONS_compose_nl(G_in) enddo enddo ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE RT_Vnl_xc=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! do i_coll=1,HXC_collisions%N ! diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index 7e0f8b402e..35574068f6 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -71,9 +71,9 @@ subroutine LSEX_potential(q,X,Xw) YAMBO_ALLOC(W,(q%nbz,ng_oscll,ng_oscll)) iqref=0 ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE W=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! do iqbz=1,q%nbz ! diff --git a/src/collisions/OSCLL_compose_vbands.F b/src/collisions/OSCLL_compose_vbands.F index aa001cc07a..20c62cae78 100644 --- a/src/collisions/OSCLL_compose_vbands.F +++ b/src/collisions/OSCLL_compose_vbands.F @@ -81,9 +81,9 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) ! ! Remove equilibrium Sigma-sex ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE H_nl_sc=H_nl_sc-Sigma_SEX_EQ(:,:,i_sp_pol,ik_mem) -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! do i_n=NL_bands(1),NL_bands(2) do i_m=i_n,NL_bands(2) diff --git a/src/dipoles/DIPOLE_overlaps.F b/src/dipoles/DIPOLE_overlaps.F index 4480ce8481..3b1b7cfca5 100644 --- a/src/dipoles/DIPOLE_overlaps.F +++ b/src/dipoles/DIPOLE_overlaps.F @@ -102,9 +102,9 @@ subroutine DIPOLE_overlaps(Xk,Dip) YAMBO_ALLOC_GPU(WF_ikp, (wf_ng_overlaps,n_spinor,1)) YAMBO_ALLOC_GPU(WF_ik, (wf_ng_overlaps,n_spinor,Dip%ib(2))) ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE DIP_S=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! call live_timing("Overlaps",PAR_IND_DIPk_bz%n_of_elements(PAR_IND_DIPk_bz_ID+1)*n_sp_pol) ! diff --git a/src/hamiltonian/Build_W_operator.F b/src/hamiltonian/Build_W_operator.F index efc3ab3abd..4b358c0a78 100644 --- a/src/hamiltonian/Build_W_operator.F +++ b/src/hamiltonian/Build_W_operator.F @@ -41,9 +41,9 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) complex(SP) :: V_tmp(H_ref_bands(1):H_ref_bands(2),en%nbf(i_sp)) complex(SP) :: alpha ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE Wk=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! ikbz=Xk%k_table(ik,1) ! @@ -86,9 +86,9 @@ subroutine Build_W_operator(en,Xk,ik,i_sp,V_bands,Wk) ! <\phi_i | e^{iGr} | \phi_j > ! It works in principle but it requires big supercells ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE Wop(:,:,:)=cZERO !DIP_S(H_ref_bands(1):,H_ref_bands(1):,id_red,ik,i_sp)*cI/(4._SP*pi) -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! endif ! diff --git a/src/hamiltonian/V_Hartree.F b/src/hamiltonian/V_Hartree.F index a057423262..a3ff103f71 100644 --- a/src/hamiltonian/V_Hartree.F +++ b/src/hamiltonian/V_Hartree.F @@ -35,11 +35,11 @@ subroutine V_Hartree(rho,vhr) ! call timing('V_Hartree',OPR='start') ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE vhg = (0._DP,0._DP) vhtmp = (0._DP,0._DP) rhog = rho -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! ! FFT call: rho in reciprocal space ! @@ -73,9 +73,9 @@ subroutine V_Hartree(rho,vhr) call fft_3d(vhtmp,fft_dim,1) #endif ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE vhr(:,1) = real(vhtmp,SP) -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE if(n_spin==2) vhr(:,2)=vhr(:,1) ! call timing('V_Hartree',OPR='stop') diff --git a/src/nloptics/NL_Berry_current.F b/src/nloptics/NL_Berry_current.F index 68ec811b34..2312b6dbe6 100644 --- a/src/nloptics/NL_Berry_current.F +++ b/src/nloptics/NL_Berry_current.F @@ -93,9 +93,9 @@ subroutine NL_Berry_current(en,Xk,k_map,V_bands,NL_J) ! do istep=1,max_step call Build_tilde_vbands(en,Xk,ikbz,isp,istep,id_red,V_bands(:,:en%nbf(isp),:,isp),V_tilde) -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE delta_V_tilde(:,:,istep)=(V_tilde(:,:,1)-V_tilde(:,:,2))/dble(istep) -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE enddo ! ik = Xk%sstar(ikbz,1) diff --git a/src/nloptics/NL_Hamiltonian.F b/src/nloptics/NL_Hamiltonian.F index b0cb40ff94..bbe16e5a4d 100644 --- a/src/nloptics/NL_Hamiltonian.F +++ b/src/nloptics/NL_Hamiltonian.F @@ -171,10 +171,10 @@ subroutine NL_Hamiltonian(E,k,q,X,Time,V_bands) ! Build the Hamiltonian ! ===================== ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE Ho_plus_Sigma=cZERO I_relax =cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! do i_sp_pol=1,n_sp_pol do ik=1,QP_nk diff --git a/src/nloptics/NL_Integrator.F b/src/nloptics/NL_Integrator.F index 35f98eab43..e12b026450 100644 --- a/src/nloptics/NL_Integrator.F +++ b/src/nloptics/NL_Integrator.F @@ -96,18 +96,18 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ! do ik=1,QP_nk if(.not.PAR_IND_Xk_ibz%element_1D(ik)) then -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE V_bands(:,:,ik,:)=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE cycle endif ik_mem=PAR_Xk_ibz_index(ik) do is=1,n_sp_pol nb=E%nbf(is) -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE Ktmp=cZERO Ktmp(:,:nb)=V_bands(:,:nb,ik,is) -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE call INVINT_step(V_bands(:,:nb,ik,is),Ktmp(:,:nb),Ho_plus_Sigma(:,:,ik_mem,is),I_relax(:,:,ik_mem,is),nb,RT_step) enddo enddo @@ -117,9 +117,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) ! ! Evaluate V(t+dt/2) ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE K_all=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE do ik=1,QP_nk if(.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) @@ -146,9 +146,9 @@ subroutine NL_Integrator(E,k,q,X,Integrator,i_time,V_bands) K_all=V_bands do ik=1,QP_nk if(.not.PAR_IND_Xk_ibz%element_1D(ik)) then -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE V_bands(:,:,ik,:)=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE cycle endif ik_mem=PAR_Xk_ibz_index(ik) diff --git a/src/nloptics/NL_build_dG_lesser.F b/src/nloptics/NL_build_dG_lesser.F index ec18134134..5ab2708162 100644 --- a/src/nloptics/NL_build_dG_lesser.F +++ b/src/nloptics/NL_build_dG_lesser.F @@ -45,9 +45,9 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) call timing('NL build_dG',OPR='start') #endif ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE dG=cZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! do is=1,n_sp_pol do ik=1,QP_nk @@ -63,9 +63,9 @@ subroutine NL_build_dG_lesser(en,V_bands,dG) enddo enddo ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE dG=cI*spin_occ*dG -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! call PP_redux_wait(dG,COMM=PAR_COM_Xk_ibz_INDEX%COMM ) ! diff --git a/src/nloptics/el_density_vbands.F b/src/nloptics/el_density_vbands.F index f2b84181b6..daf1046431 100644 --- a/src/nloptics/el_density_vbands.F +++ b/src/nloptics/el_density_vbands.F @@ -47,9 +47,9 @@ subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) integer :: i1,ik,is,rho_syms,ir,ik_mem real(SP) :: rho_no_sym(fft_size) ! -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE rho_no_sym=rZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! do ik=1,Xk%nibz ! @@ -72,9 +72,9 @@ subroutine el_density_vbands(en,Xk,rho,VAL_BANDS) ! Simmetrization ! rho_syms=nsym/(i_time_rev+1) -!$OMP WORKSHARE +!$OMP PARALLEL WORKSHARE rho(:)=rZERO -!$OMP END WORKSHARE +!$OMP END PARALLEL WORKSHARE ! !$omp parallel do default(shared), private(ir), reduction(+:rho) do ir=1,fft_size From 3fef7c039d5a0f4b70e7acf86a3a5169ccb496bc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Nov 2025 14:29:36 +0100 Subject: [PATCH 1283/1367] - Introduced check on numer of bands - Defined exp_user_warning function to simplify coding --- src/bse/K_Transitions_setup.F | 10 ++++++++++ src/bse/K_observables.F | 4 +--- src/bse/K_screened_interaction.F | 6 +----- src/communicate/com_utilities_subroutines.F | 21 +++++++++++++++++++++ 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/bse/K_Transitions_setup.F b/src/bse/K_Transitions_setup.F index 6778b86449..079615276e 100644 --- a/src/bse/K_Transitions_setup.F +++ b/src/bse/K_Transitions_setup.F @@ -297,6 +297,16 @@ subroutine K_Transitions_dimensions(iq,Ken,Xk,Dip,V_bands,C_bands) ! C_bands=BS_bands !endif #endif + ! + if (BS_bands(2) < V_bands(2) ) then + call exp_user_warning("BS_bands(2) lower then number of metallic bands") + V_bands(2)=BS_bands(2) + endif + ! + if (BS_bands(1) > C_bands(1) ) then + call exp_user_warning("BS_bands(1) greater then number of filled bands") + C_bands(1)=BS_bands(1) + endif ! do i_res_ares=1,BS_n_eh_spaces ! diff --git a/src/bse/K_observables.F b/src/bse/K_observables.F index a1c0d98102..0888cd0903 100644 --- a/src/bse/K_observables.F +++ b/src/bse/K_observables.F @@ -14,7 +14,6 @@ subroutine K_observables(W,Xk) use frequency, ONLY:w_samp use X_m, ONLY:global_gauge use R_lattice, ONLY:bz_samp - use com, ONLY:exp_user use BS_solvers, ONLY:run_Haydock,run_inversion,run_Diago,load_Diago,BSS_mode use BS, ONLY:BS_dip_size,l_BS_anomalous_Hall,l_BS_abs,l_BS_jdos,l_BS_trace,BSE_prop,& & l_BS_esort,l_BS_kerr,l_BS_magnons,l_BS_dichroism,l_BS_anomalous_Hall,l_BS_photolum,& @@ -75,8 +74,7 @@ subroutine K_observables(W,Xk) endif if (l_BS_dichroism) then if (.not.(l_col_cut.and.Xk%nbz==1) ) then - if(.not.exp_user) call error(" Periodic system detected. Natural dichroism coded only for isolated systems") - if( exp_user) call warning(" Periodic system detected. Natural dichroism coded only for isolated systems") + call exp_user_warning(" Periodic system detected. Natural dichroism coded only for isolated systems") endif if (.not.l_BS_trace) then ! NB: in the case without trace the quadripolar terms should be taken into account, diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index d71737cb8f..cfb5824a1e 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -15,7 +15,6 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) ! use pars, ONLY:SP use stderr, ONLY:intc - use com, ONLY:exp_user use frequency, ONLY:w_samp use drivers, ONLY:l_td_hf,l_tddft,l_rim_w use collision_el, ONLY:elemental_collision,elemental_collision_free @@ -70,10 +69,7 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) if( l_rim_w) call section('=','Screened interaction header I/O') !=================================================== ! - if (X%ng Date: Wed, 12 Nov 2025 20:08:53 +0100 Subject: [PATCH 1284/1367] Removed a2y implementation with generation of extra g-vectors --- interfaces/a2y/a2y_db1.F | 35 +++++------------------------- interfaces/int_modules/mod_com2y.F | 5 +---- src/driver/options_interfaces.c | 9 -------- 3 files changed, 7 insertions(+), 42 deletions(-) diff --git a/interfaces/a2y/a2y_db1.F b/interfaces/a2y/a2y_db1.F index 0ac65d6f34..8b8d523dfe 100644 --- a/interfaces/a2y/a2y_db1.F +++ b/interfaces/a2y/a2y_db1.F @@ -342,15 +342,14 @@ subroutine import_basisdata_group_wfk use R_lattice, only : g_vec, b, ng_vec use D_lattice, only : alat, i_space_inv, i_time_rev use wave_func, only : wf_nc_k, wf_igk, wf_ncx, wf_ng - use mod_com2y, only : ecut_mult_factor ! implicit none ! - integer :: i1,i2,i3,n1,n2,n3,max_nx,max_ny,max_nz,max_n(3),npw,igv(3),igv_shift(3),max_size + integer :: i1,i2,i3,n1,n2,n3,max_nx,max_ny,max_nz,npw,igv(3),igv_shift(3),max_size integer :: g_lim(6), ig_wf, ng_vec_old, ig, ic, ik, varid integer, allocatable :: igk(:,:), igk_tmp(:,:), istwfk(:), inv_map_k(:,:), map_gamma(:,:,:) integer, allocatable :: G_mod_indx(:) - logical :: gamma_only,l_new,found_max_n(3) + logical :: gamma_only,l_new real(SP) :: ecut, ecut_low, ecut_max, norm_2, max_norm_2, b_transpose(3,3), g_vec_tmp1(3), k_shift(3) real(SP), allocatable :: G_mod(:), g_vec_tmp(:,:) integer, allocatable, target :: reduced_coordinates_of_plane_waves(:,:,:) @@ -425,8 +424,6 @@ subroutine import_basisdata_group_wfk ! ecut=(ecut_low+ecut_max)/2._SP ! - call msg("s","Starting generation of g-vectors up to",(/ecut*ecut_mult_factor/),"Ha") - ! max_nx = 0 max_ny = 0 max_nz = 0 @@ -438,29 +435,9 @@ subroutine import_basisdata_group_wfk end do !write(*,*) max_nx, max_ny, max_nz !write(*,*) max_nx, max_ny, max_nz - ! - !look for maximum needed n_i - max_n(1)=max_nx - max_n(2)=max_ny - max_n(3)=max_nz - found_max_n=.false. - ! - do i1=1,3 - do while(.not.found_max_n(i1)) - max_n(i1)=max_n(i1)+1 - if(i1==1) igv = [max_n(i1),0,0] - if(i1==2) igv = [0,max_n(i1),0] - if(i1==3) igv = [0,0,max_n(i1)] - g_vec_tmp1 = matmul(b_transpose,igv) - norm_2 = (g_vec_tmp1(1)**2 + g_vec_tmp1(2)**2 + g_vec_tmp1(3)**2)/2._SP - if (norm_2 > ecut*ecut_mult_factor) found_max_n(i1)=.true. - enddo - enddo - ! - ! For safety increase by 10% and add 10 - n1 = nint(1.1_SP*real(max_n(1),SP))+10 - n2 = nint(1.1_SP*real(max_n(2),SP))+10 - n3 = nint(1.1_SP*real(max_n(3),SP))+10 + n1 = 5*max_nx+10 + n2 = 5*max_ny+10 + n3 = 5*max_nz+10 ! max_size = (2*n1+1)*(2*n2+1)*(2*n3+1) !max possible number of components YAMBO_ALLOC( g_vec_tmp, (max_size,3) ) @@ -473,7 +450,7 @@ subroutine import_basisdata_group_wfk igv = [i1,i2,i3] g_vec_tmp1 = matmul(b_transpose,igv) norm_2 = (g_vec_tmp1(1)**2 + g_vec_tmp1(2)**2 + g_vec_tmp1(3)**2)/2._SP - if (norm_2 > ecut*ecut_mult_factor) cycle + if (norm_2 > ecut*4._SP) cycle max_norm_2=max(norm_2,max_norm_2) npw = npw+1 igk_tmp(:,npw) = igv diff --git a/interfaces/int_modules/mod_com2y.F b/interfaces/int_modules/mod_com2y.F index dd8acde21a..ac2eb85308 100644 --- a/interfaces/int_modules/mod_com2y.F +++ b/interfaces/int_modules/mod_com2y.F @@ -20,7 +20,6 @@ module mod_com2y integer :: ng_vec_abinit, wf_nb_io_user ! real(SP):: alat_mult_factor - real(SP):: ecut_mult_factor ! contains ! @@ -49,12 +48,10 @@ subroutine interface_presets(in_string) artificial_spin_pol =index(in_string,'dupl')>0 verboseIO =index(in_string,'verb')>0 ! - alat_mult_factor=1._SP - ecut_mult_factor=4._SP + alat_mult_factor=1. wf_nb_io_user=0 do i1=1,100 if ( trim(str_piece(i1))=='alat_f') read(str_piece(i1+1),*) alat_mult_factor - if ( trim(str_piece(i1))=='ecut_f') read(str_piece(i1+1),*) ecut_mult_factor if ( trim(str_piece(i1))=='fragnb') read(str_piece(i1+1),*) wf_nb_io_user enddo ! diff --git a/src/driver/options_interfaces.c b/src/driver/options_interfaces.c index 1c559d921f..a881bb42ac 100644 --- a/src/driver/options_interfaces.c +++ b/src/driver/options_interfaces.c @@ -36,15 +36,6 @@ void options_interfaces(struct options_struct *options, int *i_opt) options[*i_opt].bin = "p2y a2y c2y"; options[*i_opt].yambo_string = "alat_f"; options[*i_opt].section = "Interface"; - *i_opt=*i_opt+1; - options[*i_opt].short_desc = - "Multiply cutoff on wave--function for maximum number of g-vectors"; - options[*i_opt].long_opt= "ecut_factor"; - options[*i_opt].short_opt='e'; - options[*i_opt].float_var=1; - options[*i_opt].bin="a2y"; - options[*i_opt].yambo_string="ecut_f"; - options[*i_opt].section="Interface"; *i_opt = *i_opt + 1; options[*i_opt].short_desc = "Force use of spatial Inv. instead of Time Rev."; From 9031fa449dcfec662e8da15fa90ca45f7064b7ff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Nov 2025 21:09:25 +0100 Subject: [PATCH 1285/1367] Fixing bug introduced in DIPOLE_build_der_k.F due to change in sort interface --- src/dipoles/DIPOLE_build_der_k.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dipoles/DIPOLE_build_der_k.F b/src/dipoles/DIPOLE_build_der_k.F index 1b7ffcf5c5..5a874fdef2 100644 --- a/src/dipoles/DIPOLE_build_der_k.F +++ b/src/dipoles/DIPOLE_build_der_k.F @@ -97,7 +97,7 @@ subroutine DIPOLE_build_der_k(Xen,Xk,Dip,direction_is_todo) ikbz=Xk%k_table(ik,1) ! call degeneration_finder(Dip%ib(2),first_el_k,n_of_el_k,n_deg_grp_k,& - & Er=Xen%E(Dip%ib(1):Dip%ib_lim(1),ik,i_sp_pol),deg_accuracy=deg_thresh,Include_single_values=.true.) + & Er=Xen%E(1:Dip%ib(2),ik,i_sp_pol),deg_accuracy=deg_thresh,Include_single_values=.true.) ! deg_table_k=.false. do i_grp=1,n_deg_grp_k From 97543c46c199b9009033375552863bce5df9e6ee Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Nov 2025 21:47:58 +0100 Subject: [PATCH 1286/1367] Fixed HAydock restart with i_G_shift --- src/io/io_BSS_Haydock.F | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/io/io_BSS_Haydock.F b/src/io/io_BSS_Haydock.F index e3319e7aa3..2c92c2f389 100644 --- a/src/io/io_BSS_Haydock.F +++ b/src/io/io_BSS_Haydock.F @@ -15,6 +15,7 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, use stderr, ONLY:intc use BS, ONLY:BS_identifier use BS_solvers, ONLY:BSS_q0,Haydock_v0_mod,HAYVEC_size + use X_m, ONLY:i_G_shift use IO_m, ONLY:io_status,io_sec use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header use timing_m, ONLY:timing @@ -42,7 +43,7 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, io_BSS_Haydock=io_header(ID,XC_KIND="K_E force",GAUGE=.TRUE.,IMPOSE_GAUGE=.TRUE.) if (io_BSS_Haydock<0) goto 1 ! - call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + call io_elemental(ID,VAR="PARS",VAR_SZ=7,MENU=0) call io_elemental(ID,VAR=& & " BSK Identifier ",I0=BS_identifier,CHECK=.TRUE.,OP=(/"=="/)) call io_elemental(ID,VAR=& @@ -51,6 +52,8 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, & " Haydock reached Treshold ",R0=reached_treshold,DB_R0=reached_treshold) call io_elemental(ID,VAR=& & " Field direction ",R1=BSS_q0,CHECK=.true.,OP=(/"==","==","=="/)) + call io_elemental(ID,VAR=& +& " G-shift ",I0=i_G_shift,CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) io_BSS_Haydock=io_status(ID) From c6031d3b5d2e2ede5f27c923184d1cd47f5d1fcb Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Nov 2025 21:52:59 +0100 Subject: [PATCH 1287/1367] Further fix to Haydock restart --- src/io/io_BSS_Haydock.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/io_BSS_Haydock.F b/src/io/io_BSS_Haydock.F index 2c92c2f389..499886d47e 100644 --- a/src/io/io_BSS_Haydock.F +++ b/src/io/io_BSS_Haydock.F @@ -59,7 +59,7 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, io_BSS_Haydock=io_status(ID) ! if (io_BSS_Haydock<0) then - reached_treshold=0._SP + reached_treshold=100._SP goto 1 endif ! From 25b2eabc598ed4fdfad4f267ad31d796d15fccf3 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Nov 2025 21:53:41 +0100 Subject: [PATCH 1288/1367] Haydock restart fixed --- src/io/io_BSS_Haydock.F | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/io/io_BSS_Haydock.F b/src/io/io_BSS_Haydock.F index e3319e7aa3..499886d47e 100644 --- a/src/io/io_BSS_Haydock.F +++ b/src/io/io_BSS_Haydock.F @@ -15,6 +15,7 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, use stderr, ONLY:intc use BS, ONLY:BS_identifier use BS_solvers, ONLY:BSS_q0,Haydock_v0_mod,HAYVEC_size + use X_m, ONLY:i_G_shift use IO_m, ONLY:io_status,io_sec use IO_int, ONLY:io_connect,io_disconnect,io_elemental,io_bulk,io_header use timing_m, ONLY:timing @@ -42,7 +43,7 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, io_BSS_Haydock=io_header(ID,XC_KIND="K_E force",GAUGE=.TRUE.,IMPOSE_GAUGE=.TRUE.) if (io_BSS_Haydock<0) goto 1 ! - call io_elemental(ID,VAR="PARS",VAR_SZ=6,MENU=0) + call io_elemental(ID,VAR="PARS",VAR_SZ=7,MENU=0) call io_elemental(ID,VAR=& & " BSK Identifier ",I0=BS_identifier,CHECK=.TRUE.,OP=(/"=="/)) call io_elemental(ID,VAR=& @@ -51,12 +52,14 @@ integer function io_BSS_Haydock(ID,iq,it,reached_treshold,mode,Af,Bf,Cf,Vnm1,Vn, & " Haydock reached Treshold ",R0=reached_treshold,DB_R0=reached_treshold) call io_elemental(ID,VAR=& & " Field direction ",R1=BSS_q0,CHECK=.true.,OP=(/"==","==","=="/)) + call io_elemental(ID,VAR=& +& " G-shift ",I0=i_G_shift,CHECK=.true.,OP=(/"=="/)) ! call io_elemental(ID,VAR="",VAR_SZ=0,MENU=1) io_BSS_Haydock=io_status(ID) ! if (io_BSS_Haydock<0) then - reached_treshold=0._SP + reached_treshold=100._SP goto 1 endif ! From 834178e436b61aad18715e6a51b4b942197d484a Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 12 Nov 2025 23:58:07 +0100 Subject: [PATCH 1289/1367] - get_spin_majority moved inside OCCUPATIONS_gap - ldiago solver used also for magnons --- src/bse/K_diago_driver.F | 4 ++-- src/bse/K_driver_init.F | 4 +--- src/common/OCCUPATIONS_Gaps.F | 6 +++++- src/communicate/REPORT_Occupations.F | 5 ++++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 3aafbbb977..28259fa0ec 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -124,8 +124,8 @@ subroutine K_diago_driver(iq,W,X_static) ! l_slepc = index(BSS_mode,'s')/=0 #if defined _SCALAPACK - l_diago = index(BSS_mode,'o')/=0.or. ( (l_BS_photolum.or.l_BS_magnons).and.(index(BSS_mode,'d')/=0)) - l_ldiago = index(BSS_mode,'d')/=0.and. .not.(l_BS_photolum.or.l_BS_magnons) + l_diago = index(BSS_mode,'o')/=0.or. ( l_BS_photolum.and.(index(BSS_mode,'d')/=0)) + l_ldiago = index(BSS_mode,'d')/=0.and. .not.l_BS_photolum #else l_diago = index(BSS_mode,'o')/=0 .or. index(BSS_mode,'d')/=0 #endif diff --git a/src/bse/K_driver_init.F b/src/bse/K_driver_init.F index 10c3f5377b..1f482cd88d 100644 --- a/src/bse/K_driver_init.F +++ b/src/bse/K_driver_init.F @@ -15,7 +15,7 @@ subroutine K_driver_init(what,iq,Ken,Xk) ! use pars, ONLY:SP,schlen use R_lattice, ONLY:bz_samp - use electrons, ONLY:levels,n_sp_pol,n_spin,get_spin_majority + use electrons, ONLY:levels,n_sp_pol,n_spin use parser_m, ONLY:parser use parallel_m, ONLY:PARALLEL_default_mode use stderr, ONLY:STRING_match,STRING_split @@ -183,8 +183,6 @@ subroutine K_driver_init(what,iq,Ken,Xk) if (.not.BS_K_coupling) BS_res_ares_n_mat=2 endif ! - call get_spin_majority(Ken) - ! ! In this case the anti-resonant space is used to build the coupling matrix if (BS_K_coupling.and.iq/=1) BS_n_eh_spaces=2 ! diff --git a/src/common/OCCUPATIONS_Gaps.F b/src/common/OCCUPATIONS_Gaps.F index 25f9137220..4a5fca5a39 100644 --- a/src/common/OCCUPATIONS_Gaps.F +++ b/src/common/OCCUPATIONS_Gaps.F @@ -8,7 +8,8 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,Nbf,Nbm,I_dir,E_k_dir,E_k_ind) ! use pars, ONLY:SP - use electrons, ONLY:levels,n_sp_pol,filled_tresh,spin_occ + use electrons, ONLY:levels,n_sp_pol,filled_tresh,spin_occ,& +& get_spin_majority ! implicit none ! @@ -75,6 +76,9 @@ subroutine OCCUPATIONS_Gaps(E,E_g_dir,E_g_ind,Nbf,Nbm,I_dir,E_k_dir,E_k_ind) ! E%nbf=Nbf_ E%nbm=Nbm_ + ! + call get_spin_majority(E) + ! #if defined _RT if(all(E%nbc/=0)) then do i_sp_pol=1,n_sp_pol diff --git a/src/communicate/REPORT_Occupations.F b/src/communicate/REPORT_Occupations.F index dd3d8a7cc6..9d0a3d9bf6 100644 --- a/src/communicate/REPORT_Occupations.F +++ b/src/communicate/REPORT_Occupations.F @@ -12,7 +12,8 @@ subroutine REPORT_Occupations(what,E) use D_lattice, ONLY:Tel,T_holes,T_elecs,Bose_Temp,DL_vol use drivers, ONLY:Finite_Tel use com, ONLY:msg,COMPOSE_spin_msg - use electrons, ONLY:levels,n_sp_pol,nel,spin_string,spin_occ + use electrons, ONLY:levels,n_sp_pol,nel,spin_string,spin_occ,& + & i_spin_majority use interfaces, ONLY:OCCUPATIONS_Gaps ! implicit none @@ -55,6 +56,8 @@ subroutine REPORT_Occupations(what,E) call msg('r',COMPOSE_spin_msg(title,title_len,'El. density',0),(/nel/(DL_vol*BO2ANG**3*1.E-24)/),'[cm-3]') call msg('rn',COMPOSE_spin_msg(title,title_len,'Fermi Level',0),E%E_Fermi*HA2EV,'[eV]') ! + if (n_sp_pol==2) call msg('rn','Spin majority [UP] channel is ',i_spin_majority) + ! do i_sp_pol=1,n_sp_pol ! if (n_sp_pol==2) then From e246008a4d689c99ee4dae6f08154fd2dd4a0ae8 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Nov 2025 13:19:13 +0100 Subject: [PATCH 1290/1367] Fixed issue #235 . Slepc preconditioner was updated at the end of MATRIX_slepc --- src/linear_algebra/MATRIX_slepc.F | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/linear_algebra/MATRIX_slepc.F b/src/linear_algebra/MATRIX_slepc.F index bc73b8f1a1..1b9fe53970 100644 --- a/src/linear_algebra/MATRIX_slepc.F +++ b/src/linear_algebra/MATRIX_slepc.F @@ -21,7 +21,7 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) ! This routine can be called from within Matrix_driver.F but should be kept in ! a separate source file for clarity. ! - use pars, ONLY : SP,cI + use pars, ONLY : SP,cI,schlen use units, ONLY : HA2EV use com, ONLY : msg use stderr, ONLY : intc @@ -87,6 +87,7 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) ! logical :: l_precondition character(len=30) :: rowfmt + character(schlen) :: BSS_slepc_precondition_out ! ! call MatGetSize(M_slepc,Nsize,Msize,ierr) @@ -223,7 +224,7 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) !if (l_precondition) call PCSetType(pc,pckind,ierr) endif ! - BSS_slepc_precondition=trim(stkind)//"+"//trim(kspkind)//"+"//trim(pckind) + BSS_slepc_precondition_out=trim(stkind)//"+"//trim(kspkind)//"+"//trim(pckind) ! if (BSS_slepc_extraction == 'ritz') extr = EPS_RITZ if (BSS_slepc_extraction == 'harmonic') extr = EPS_HARMONIC @@ -302,7 +303,7 @@ subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) ! call msg( 'sr', '[SLEPC] Approach ',BSS_slepc_approach) ! - call msg( 'sr', '[SLEPC] Precondition method ',BSS_slepc_precondition) + call msg( 'sr', '[SLEPC] Precondition method ',BSS_slepc_precondition_out) call msg( 'sr', '[SLEPC] Extraction method ',BSS_slepc_extraction) call msg( 'sr', '[SLEPC] Number of requested eigenvalues ', n_eig ) ! From dada78b7ca713612abd5d9098124d0b51077e9dc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 13 Nov 2025 21:09:26 +0100 Subject: [PATCH 1291/1367] Small improvement in yambo -h --- src/driver/options_yambo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/driver/options_yambo.c b/src/driver/options_yambo.c index 17e7ec7570..b0e1b82d46 100644 --- a/src/driver/options_yambo.c +++ b/src/driver/options_yambo.c @@ -134,15 +134,17 @@ void options_yambo(struct options_struct *options, int *i_opt) *i_opt = *i_opt + 1; options[*i_opt].short_desc = "BSE solver"; #if defined _SLEPC && !defined _NL - strcpy(options[*i_opt].long_desc[0], "=h/d/s/(p/f)i"); + strcpy(options[*i_opt].long_desc[0], "=h/d/o/s/(p/f)i"); #else - strcpy(options[*i_opt].long_desc[0], "=h/d/(p/f)i"); + strcpy(options[*i_opt].long_desc[0], "=h/d/o/(p/f)i"); #endif - strcpy(options[*i_opt].long_desc[1], "(h)aydock/(d)iagonalization"); + strcpy(options[*i_opt].long_desc[1], "(h)aydock"); strcpy(options[*i_opt].long_desc[2], + "(d)iagonalization/(o)ld-diagonalization"); + strcpy(options[*i_opt].long_desc[3], "(pi) perturbative inversion/ (fi) full inversion"); #if defined _SLEPC && !defined _NL - strcpy(options[*i_opt].long_desc[2], "(s)lepc partial diagonalization"); + strcpy(options[*i_opt].long_desc[4], "(s)lepc partial diagonalization"); #endif options[*i_opt].long_opt = "Ksolver"; options[*i_opt].short_opt = 'y'; From c3c813fe7b296a9837ec422b709e55fe2697eac5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Nov 2025 15:15:54 +0100 Subject: [PATCH 1292/1367] Version 5.3.0, Revision 26258, Hash dada78b7ca MODIFIED * include/version/version.m4 bse/K_diago_driver.F common/LEVELS_respect_degenerations.F el-ph/ELPH_databases_symmetrize.F modules/SET_defaults.F modules/mod_electrons.F qp/QP_states_simmetrize.F real_time_control/RT_Rabi_frequency.F real_time_control/RT_Rabi_frequency_ALL_and_print.F sc/SC_driver.F wf_and_fft/WF_phase_matrices.F Bugs: - Additions: - Changes: -Introduced a single threshold for level degeneracy in the code Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/bse/K_diago_driver.F | 2 +- src/common/LEVELS_respect_degenerations.F | 4 ++-- src/el-ph/ELPH_databases_symmetrize.F | 4 ++-- src/modules/SET_defaults.F | 3 ++- src/modules/mod_electrons.F | 1 + src/qp/QP_states_simmetrize.F | 6 +++--- src/real_time_control/RT_Rabi_frequency.F | 4 ++-- src/real_time_control/RT_Rabi_frequency_ALL_and_print.F | 4 ++-- src/sc/SC_driver.F | 4 ++-- src/wf_and_fft/WF_phase_matrices.F | 4 ++-- 11 files changed, 22 insertions(+), 20 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index b9edc138fc..42523dad35 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26244 h.17f453eaa6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26258 h.dada78b7ca, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26244" -SHASH="17f453eaa6" +SREVISION="26258" +SHASH="dada78b7ca" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 28259fa0ec..e49ba441fa 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -133,7 +133,7 @@ subroutine K_diago_driver(iq,W,X_static) #if defined _NL if (l_ldiago) then ! The issue is present if yambo was configured in single precision - ! If the coufingure was done in double precision, the issue is not present + ! If the confingure was done in double precision, the issue is not present ! However, at this stage, it is not possible to know how the user configured yambo call warning("non-linear optics forces DP compilation and breaks Ldiago library interface in SP") l_ldiago = .false. diff --git a/src/common/LEVELS_respect_degenerations.F b/src/common/LEVELS_respect_degenerations.F index 214cfcf58a..ca519255af 100644 --- a/src/common/LEVELS_respect_degenerations.F +++ b/src/common/LEVELS_respect_degenerations.F @@ -7,7 +7,7 @@ ! subroutine LEVELS_respect_degenerations(E,Dip,X) ! - use electrons, ONLY:levels + use electrons, ONLY:levels,deg_threshold use stderr, ONLY:intc use vec_operate, ONLY:degeneration_finder use BS, ONLY:BS_bands,BS_bands_frozen @@ -129,7 +129,7 @@ subroutine levels_check(Ein,Bin) ! do ik=1,nkibz ! - call degeneration_finder(n_bands,first_el,n_of_el,n_deg_grp,Er=E%E(:n_bands,ik,1),deg_accuracy=0.0001/HA2EV) + call degeneration_finder(n_bands,first_el,n_of_el,n_deg_grp,Er=E%E(:n_bands,ik,1),deg_accuracy=deg_threshold) ! do i_g=1,n_deg_grp do i_c=1,2 diff --git a/src/el-ph/ELPH_databases_symmetrize.F b/src/el-ph/ELPH_databases_symmetrize.F index e2fd19cf67..ee54f45eb1 100644 --- a/src/el-ph/ELPH_databases_symmetrize.F +++ b/src/el-ph/ELPH_databases_symmetrize.F @@ -9,7 +9,7 @@ subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) ! use pars, ONLY:SP use units, ONLY:HA2EV - use electrons, ONLY:levels + use electrons, ONLY:levels,deg_threshold use R_lattice, ONLY:qindx_S,bz_samp use ELPH, ONLY:ph_modes,PH_freqs_sq use vec_operate, ONLY:degeneration_finder @@ -39,7 +39,7 @@ subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) ik_m_q =k%sstar(qindx_S(ik,iq,1),1) ! call degeneration_finder(n_bands(2),first_el(1,:),n_of_el(1,:),n_deg_grp(1),& - & Er=E%E(:n_bands(2),ik,1), deg_accuracy=0.0001/HA2EV) + & Er=E%E(:n_bands(2),ik,1), deg_accuracy=deg_threshold) call degeneration_finder(n_bands(2),first_el(2,:),n_of_el(2,:),n_deg_grp(2),& & Er=E%E(:n_bands(2),ik_m_q,1),deg_accuracy=0.0001/HA2EV) ! diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index 340c224216..f98d58686d 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -36,7 +36,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & RIM_anisotropy,RIM_ng,RIM_W_ng,RIM_n_rand_pts,RIM_sphe_n_rand_pts,nqibz,q0_def_norm,& & cutoff_presets,k_map,qindx_S_max_Go,RIMW_type,eps_env use electrons, ONLY:n_spin,n_sp_pol,n_spinor,filled_tresh,l_spin_orbit,n_spin_den,& -& i_spin_majority,i_spin_minority,eval_magn,nel_cond +& i_spin_majority,i_spin_minority,eval_magn,nel_cond,deg_threshold use parallel_m, ONLY:ncpu,CPU_str_reset,CREATE_hosts_COMM use com, ONLY:isec,depth,secnm,previous_secmode,of_name,n_ofs_defined,of_opened,of_unit,max_open_ofs,& & more_io_path,core_io_path,com_path,repfile,grid_paths,fat_log,exp_user @@ -324,6 +324,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) l_spin_orbit = .FALSE. filled_tresh = 0.00001_SP nel_cond=rZERO + deg_threshold =0.0001_SP/HA2EV ! ! Magnetization and density ! diff --git a/src/modules/mod_electrons.F b/src/modules/mod_electrons.F index ef79f7ede0..6d4d472d81 100644 --- a/src/modules/mod_electrons.F +++ b/src/modules/mod_electrons.F @@ -24,6 +24,7 @@ module electrons integer :: n_bands integer :: n_met_bands(2) integer :: n_full_bands(2) + real(SP) :: deg_threshold ! Threshold for degenerate levels ! ! Spin support ! diff --git a/src/qp/QP_states_simmetrize.F b/src/qp/QP_states_simmetrize.F index b9753e5353..3295b862af 100644 --- a/src/qp/QP_states_simmetrize.F +++ b/src/qp/QP_states_simmetrize.F @@ -14,7 +14,7 @@ subroutine QP_states_simmetrize(en,what,V_real,V_complex,state_is_2do,warn_me) use QP_m, ONLY:QP_n_states,QP_table use units, ONLY:HA2EV use vec_operate, ONLY:sort,degeneration_finder - use electrons, ONLY:levels,spin,n_sp_pol + use electrons, ONLY:levels,spin,n_sp_pol,deg_threshold use stderr, ONLY:real2ch,intc ! implicit none @@ -33,7 +33,7 @@ subroutine QP_states_simmetrize(en,what,V_real,V_complex,state_is_2do,warn_me) & first_el(QP_n_states),n_of_el(QP_n_states),n_deg_grp character(schlen) :: title=" ",states_ch=" " logical :: check_the_diffs=.FALSE. - real(SP), parameter :: E_deg_treshold=0.0001_SP/HA2EV,V_deg_percentual_treshold=0.01 + real(SP), parameter :: V_deg_percentual_treshold=0.01 ! if (present(what)) title=what if (present(warn_me)) check_the_diffs=warn_me @@ -45,7 +45,7 @@ subroutine QP_states_simmetrize(en,what,V_real,V_complex,state_is_2do,warn_me) enddo ! call sort(Eo_sorted,indx=Eo_sorted_index) - call degeneration_finder(QP_n_states,first_el,n_of_el,n_deg_grp,Er=Eo_sorted,deg_accuracy=E_deg_treshold) + call degeneration_finder(QP_n_states,first_el,n_of_el,n_deg_grp,Er=Eo_sorted,deg_accuracy=deg_threshold) ! if (present(state_is_2do)) then state_is_2do=.TRUE. diff --git a/src/real_time_control/RT_Rabi_frequency.F b/src/real_time_control/RT_Rabi_frequency.F index 68b6c58b8d..8e5f5d8eb7 100644 --- a/src/real_time_control/RT_Rabi_frequency.F +++ b/src/real_time_control/RT_Rabi_frequency.F @@ -13,7 +13,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) use pars, ONLY:SP,rZERO,cZERO,cI use units, ONLY:HA2EV,PS2AUT use R_lattice, ONLY:nkibz - use electrons, ONLY:n_sp_pol,levels + use electrons, ONLY:n_sp_pol,levels,deg_threshold use X_m, ONLY:global_gauge use fields, ONLY:Efield use real_time, ONLY:RT_bands,RT_nbands @@ -71,7 +71,7 @@ function RT_Rabi_frequency(En,i_field,l_print_rabi) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) call degeneration_finder(RT_nbands,first_el,n_of_el,n_deg_grp,Er=En%E(RT_bands(1):RT_bands(2),ik,i_sp_pol), & - & deg_accuracy=0.0001_SP/HA2EV,Include_single_values=.true.) + & deg_accuracy=deg_threshold,Include_single_values=.true.) do i_grp1=1,n_deg_grp ib1=first_el(i_grp1)+RT_bands(1)-1 do i_grp2=i_grp1+1,n_deg_grp diff --git a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F index 4a5b2e1db3..c3344b4d50 100644 --- a/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F +++ b/src/real_time_control/RT_Rabi_frequency_ALL_and_print.F @@ -13,7 +13,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) use pars, ONLY:SP,cZERO,cI use units, ONLY:HA2EV,PS2AUT use R_lattice, ONLY:nkibz - use electrons, ONLY:n_sp_pol,levels + use electrons, ONLY:n_sp_pol,levels,deg_threshold use X_m, ONLY:global_gauge use fields, ONLY:Efield use real_time, ONLY:RT_bands,RT_nbands @@ -48,7 +48,7 @@ subroutine RT_Rabi_frequency_ALL_and_print(En,i_field) if (.not.PAR_IND_Xk_ibz%element_1D(ik)) cycle ik_mem=PAR_Xk_ibz_index(ik) call degeneration_finder(RT_nbands,first_el,n_of_el,n_deg_grp,Er=En%E(RT_bands(1):RT_bands(2),ik,i_sp_pol), & - & deg_accuracy=0.0001_SP/HA2EV,Include_single_values=.true.) + & deg_accuracy=deg_threshold,Include_single_values=.true.) do i_grp1=1,n_deg_grp ib1=first_el(i_grp1)+RT_bands(1)-1 do i_grp2=i_grp1+1,n_deg_grp diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index 1d0055de7e..b363d60de6 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -15,7 +15,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) use units, ONLY:HA2EV use drivers, ONLY:l_sc_coh,l_sc_sex,l_sc_is_libDFT,l_eval_collisions,l_sc_hartree,& & l_sc_exx,l_sc_electric,l_sc_fock,l_use_collisions - use electrons, ONLY:levels,nel,n_met_bands,n_sp_pol,n_spin,spin,n_spinor + use electrons, ONLY:levels,nel,n_met_bands,n_sp_pol,n_spin,spin,n_spinor,deg_threshold use R_lattice, ONLY:bz_samp,nkibz use QP_m, ONLY:QP_nk,QP_Sc,QP_n_states,QP_Vnl_xc,SC_E_threshold use SC, ONLY:SC_bands,SC_iterations,SC_rho_threshold,E_convergence, & @@ -832,7 +832,7 @@ subroutine SC_report() ! Check for degenerate bands in the bare energies ! call degeneration_finder(SC_nbands,first_el,n_of_el,n_deg_grp,& - & Er=E_reference%E(SC_bands(1):SC_bands(2),ik,i_sp_pol),deg_accuracy=0.0001/HA2EV) + & Er=E_reference%E(SC_bands(1):SC_bands(2),ik,i_sp_pol),deg_accuracy=deg_threshold) ! do ib=SC_bands(1),SC_bands(2) ! diff --git a/src/wf_and_fft/WF_phase_matrices.F b/src/wf_and_fft/WF_phase_matrices.F index a93c3e0c2a..cb8bbe1d87 100644 --- a/src/wf_and_fft/WF_phase_matrices.F +++ b/src/wf_and_fft/WF_phase_matrices.F @@ -23,7 +23,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) use LIVE_t, ONLY:live_timing use R_lattice, ONLY:bz_samp,G_m_G,minus_G,g_vec,rl_sop use D_lattice, ONLY:nsym,i_time_rev,sop_tab,spin_sop - use electrons, ONLY:levels,n_max_deg + use electrons, ONLY:levels,n_max_deg,deg_threshold use wave_func, ONLY:WAVEs,io_WF_phases,WF_phases_b_map use wave_func, ONLY:wf_ng_overlaps,wf_ng_1st_BZ,wf_ng,WF_copy,wf_nc_k use stderr, ONLY:intc @@ -129,7 +129,7 @@ subroutine WF_phase_matrices(En,Xk,blim,klim) & space='G',title='-WF_phases',quiet=ifrag>1,keep_states_to_load=.true.) ! call degeneration_finder(nb,first_el,n_of_el,n_deg_grp,Er=En%E(blim(1):blim(2),ik,i_sp_pol),& - & deg_accuracy=0.0001/HA2EV,Include_single_values=.true.) + & deg_accuracy=deg_threshold,Include_single_values=.true.) ! do i_grp=1,n_deg_grp do iby_phase=1,n_of_el(i_grp) From b1db14afbaf08834f3e70a692fb97c916fdfb8e5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 14 Nov 2025 15:21:01 +0100 Subject: [PATCH 1293/1367] Version 5.3.0, Revision 26259, Hash c3c813fe7b MODIFIED * include/version/version.m4 el-ph/ELPH_databases_symmetrize.F Bugs: - Additions: -Forgot two points Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/el-ph/ELPH_databases_symmetrize.F | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 42523dad35..d57bfb8efa 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26258 h.dada78b7ca, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26259 h.c3c813fe7b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26258" -SHASH="dada78b7ca" +SREVISION="26259" +SHASH="c3c813fe7b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/el-ph/ELPH_databases_symmetrize.F b/src/el-ph/ELPH_databases_symmetrize.F index ee54f45eb1..8aa0e3eff3 100644 --- a/src/el-ph/ELPH_databases_symmetrize.F +++ b/src/el-ph/ELPH_databases_symmetrize.F @@ -41,7 +41,7 @@ subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) call degeneration_finder(n_bands(2),first_el(1,:),n_of_el(1,:),n_deg_grp(1),& & Er=E%E(:n_bands(2),ik,1), deg_accuracy=deg_threshold) call degeneration_finder(n_bands(2),first_el(2,:),n_of_el(2,:),n_deg_grp(2),& - & Er=E%E(:n_bands(2),ik_m_q,1),deg_accuracy=0.0001/HA2EV) + & Er=E%E(:n_bands(2),ik_m_q,1),deg_accuracy=deg_threshold) ! do i_g=1,n_deg_grp(1) do i_np=n_bands(1),n_bands(2) @@ -75,7 +75,7 @@ subroutine ELPH_databases_symmetrize(mode,E,k,q,ik_bz,iq,n_bands,GKKP) enddo ! call degeneration_finder(ph_modes,first_el(1,:ph_modes),n_of_el(1,:ph_modes),n_deg_grp(1),& - & Er=ph_E,deg_accuracy=0.0001/HA2EV) + & Er=ph_E,deg_accuracy=deg_threshold) ! do i_g=1,n_deg_grp(1) do i_c=1,2 From 5b15d22df39c092b111a1fd966438b88061fd634 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 14 Nov 2025 22:23:26 +0100 Subject: [PATCH 1294/1367] Two small fixes for yambo_rt with n_sp_pol=2 --- src/xc_functionals/el_density_matrix.F | 2 +- src/xc_functionals/el_magnetization_matrix.F | 22 +++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/xc_functionals/el_density_matrix.F b/src/xc_functionals/el_density_matrix.F index 2de3ca4ba3..380a492845 100644 --- a/src/xc_functionals/el_density_matrix.F +++ b/src/xc_functionals/el_density_matrix.F @@ -57,7 +57,7 @@ subroutine el_density_matrix(G_lesser,en,Xk,rho,lowest_band) ! if (.not.PAR_IND_WF_linear%element_2D(ib1,ik)) cycle ! - f_occ=en%f(ib1,ik,1) + f_occ=en%f(ib1,ik,i_sp_pol) ! i_wf1=WF_tmp%index(ib1,ik,i_sp_pol) do i_spinor=1,n_spinor diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index be1c7224c8..c0ed00d119 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -54,8 +54,6 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! if (n_spin==1) return ! - if (n_sp_pol==2) call error(' case n_sp_pol=2 not yet coded in yambo_rt') - ! l_WFs_on_the_fly=.not.allocated(WF%r) ! if(lowest_band Date: Fri, 14 Nov 2025 22:46:53 +0100 Subject: [PATCH 1295/1367] cleanup macros in driver headers --- include/driver/driver.h | 7 +------ include/driver/fortran_driver.h | 33 ++++++++++++++------------------- include/driver/yambo_driver.h | 16 +++++++++++----- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/include/driver/driver.h b/include/driver/driver.h index 1083a904bf..91d866fead 100644 --- a/include/driver/driver.h +++ b/include/driver/driver.h @@ -10,6 +10,7 @@ #include #include "kind.h" +#include "yambo_driver.h" struct yambo_seed_struct command_line(int argc, char *argv[], struct options_struct *options, @@ -31,9 +32,3 @@ char *running_tool(); char *running_project(); char *running_libraries(); char *runlevel(int *runid, int *id); -void options_help(struct options_struct *options, int *i_opt); -void options_control(struct options_struct *options, int *i_opt); -void options_ypp(struct options_struct *options, int *i_opt); -void options_yambo(struct options_struct *options, int *i_opt); -void options_projects(struct options_struct *options, int *i_opt); -void options_interfaces(struct options_struct *options, int *i_opt); diff --git a/include/driver/fortran_driver.h b/include/driver/fortran_driver.h index ca5dc859e1..28fa698edc 100644 --- a/include/driver/fortran_driver.h +++ b/include/driver/fortran_driver.h @@ -11,24 +11,19 @@ /* YAMBO */ #pragma once +#include "wrapper.h" -#if defined _FORTRAN_US -#define FORTRAN_DRIVER_MACRO(X) \ - int X##_(int *, int *, int *, int *, int *, int *, int *, int *, \ - char *string, char *in_file, char *in_dir, char *out_dir, \ - char *com_dir, char *job, int string_N, int in_file_N, \ - int in_dir_N, int out_dir_N, int com_dir_N, int job_N); -#else -#define FORTRAN_DRIVER_MACRO(X) \ - int X(int *, int *, int *, int *, int *, int *, int *, int *, \ - char *string, char *in_file, char *in_dir, char *out_dir, \ - char *com_dir, char *job, int string_N, int in_file_N, int in_dir_N, \ - int out_dir_N, int com_dir_N, int job_N); -#endif +// Common prototype for all FORTRAN driver entry points +typedef int FortranDriverFn(int *, int *, int *, int *, int *, int *, int *, + int *, char *string, char *in_file, char *in_dir, + char *out_dir, char *com_dir, char *job, + int string_N, int in_file_N, int in_dir_N, + int out_dir_N, int com_dir_N, int job_N); -FORTRAN_DRIVER_MACRO(yambo); -FORTRAN_DRIVER_MACRO(ypp); -FORTRAN_DRIVER_MACRO(a2y); -FORTRAN_DRIVER_MACRO(p2y); -FORTRAN_DRIVER_MACRO(c2y); -FORTRAN_DRIVER_MACRO(e2y); +// Declare driver functions +extern FortranDriverFn F90_FUNC(yambo); +extern FortranDriverFn F90_FUNC(ypp); +extern FortranDriverFn F90_FUNC(a2y); +extern FortranDriverFn F90_FUNC(p2y); +extern FortranDriverFn F90_FUNC(c2y); +extern FortranDriverFn F90_FUNC(e2y); diff --git a/include/driver/yambo_driver.h b/include/driver/yambo_driver.h index 154bdbb2eb..9f5d970ae4 100644 --- a/include/driver/yambo_driver.h +++ b/include/driver/yambo_driver.h @@ -10,8 +10,14 @@ #include "kind.h" int load_environments(char *file_name); -void options_control(struct options_struct *options, int *i_opt); -void options_yambo(struct options_struct *options, int *i_opt); -void options_projects(struct options_struct *options, int *i_opt); -void options_interfaces(struct options_struct *options, int *i_opt); -void options_ypp(struct options_struct *options, int *i_opt); + +typedef void OptionsFn(struct options_struct *options, int *i_opt); + +// Declare all option handler functions +extern OptionsFn options_control; +extern OptionsFn options_yambo; +extern OptionsFn options_projects; +extern OptionsFn options_interfaces; +extern OptionsFn options_ypp; +extern OptionsFn options_help; + From f1b0855eafd215cbfab6d860b15f7fbc6ac45376 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 14 Nov 2025 23:29:13 +0100 Subject: [PATCH 1296/1367] Few more fixes to tddft --- src/collisions/COLLISIONS_load.F | 4 ++- src/real_time_initialize/RT_initialize.F | 26 +++++++++++--------- src/xc_functionals/el_magnetization_matrix.F | 3 ++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/collisions/COLLISIONS_load.F b/src/collisions/COLLISIONS_load.F index be7f7df13b..93a7758f5e 100644 --- a/src/collisions/COLLISIONS_load.F +++ b/src/collisions/COLLISIONS_load.F @@ -26,6 +26,7 @@ subroutine COLLISIONS_load(CHECK_EXISTENCE_ONLY) use electrons, ONLY:n_sp_pol use plasma, ONLY:N_plasma_poles_global use hamiltonian, ONLY:H_kind + use xc_functionals, ONLY:GS_xc_kind use global_XC, ONLY:H_SE_FOCK,H_SE_COH,H_SE_SEX,QP_SE_GW_NEQ,H_SE_HARTREE use collision_ext, ONLY:HXC_COLL_element,COH_COLL_element,COLLISIONS_have_HARTREE,& & COH_collisions,HXC_collisions,COLLISIONS_group,COLLISIONS_naming, & @@ -179,7 +180,8 @@ subroutine local_IO( COLL ) call live_timing(trim(COLL%name)//' collisions I/O',COLL%PAR_N) ! l_COH=(COLL%kind==H_SE_COH) - l_HXC=(COLL%kind==H_SE_FOCK.or.COLL%kind==H_SE_SEX.or.COLL%kind>=H_SE_HARTREE) + l_HXC=(COLL%kind==H_SE_FOCK.or.COLL%kind==H_SE_SEX.or.& + & COLL%kind==GS_xc_KIND.or.COLL%kind>=H_SE_HARTREE) #if defined _QED l_QED=(COLL%kind==QP_SE_GW_QED) #endif diff --git a/src/real_time_initialize/RT_initialize.F b/src/real_time_initialize/RT_initialize.F index 4022b9e040..8770264100 100644 --- a/src/real_time_initialize/RT_initialize.F +++ b/src/real_time_initialize/RT_initialize.F @@ -505,7 +505,7 @@ subroutine RT_adjust_equilibrium() ! use electrons, ONLY:spin_occ,n_sp_pol ! - integer :: ik,ik_RT_DbGd,ik_E_fg,ib + integer :: i_sp_pol,ik,ik_RT_DbGd,ik_E_fg,ib ! if(.not.l_RT_eq_is_zero_temp) return ! @@ -528,30 +528,32 @@ subroutine RT_adjust_equilibrium() ! In case RT_apply has been used the reference is ! defined from the %fo occupations ! - do ib=RT_bands(1),RT_bands(2) - do ik=1,k%nibz - do ik_RT_DbGd=RTibz%k_range(ik,1),RTibz%k_range(ik,2) + do i_sp_pol=1,n_sp_pol + do ik=1,k%nibz + do ik_RT_DbGd=RTibz%k_range(ik,1),RTibz%k_range(ik,2) + do ib=RT_bands(1),RT_bands(2) ! if (l_RT_uses_E_FineGd) then ik_E_fg=RTibz%E_map(ik_RT_DbGd) - if(E%FG%E(ib,ik_E_fg,1)<=E%E_Fermi) then - E%FG%df(ib,ik_E_fg,1)=(E%FG%f(ib,ik_E_fg,1)-spin_occ) + if(E%FG%E(ib,ik_E_fg,i_sp_pol)<=E%E_Fermi) then + E%FG%df(ib,ik_E_fg,i_sp_pol)=(E%FG%f(ib,ik_E_fg,i_sp_pol)-spin_occ) else - E%FG%df(ib,ik_E_fg,1)= E%FG%f(ib,ik_E_fg,1) + E%FG%df(ib,ik_E_fg,i_sp_pol)= E%FG%f(ib,ik_E_fg,i_sp_pol) endif else - if(E%E(ib,ik,1)<=E%E_Fermi) then - E%df(ib,ik,1)=(E%f(ib,ik,1)-spin_occ) - E%fo(ib,ik,1)= spin_occ + if(E%E(ib,ik,i_sp_pol)<=E%E_Fermi) then + E%df(ib,ik,i_sp_pol)=(E%f(ib,ik,i_sp_pol)-spin_occ) + E%fo(ib,ik,i_sp_pol)= spin_occ else - E%df(ib,ik,1)= E%f(ib,ik,1) - E%fo(ib,ik,1)= 0._SP + E%df(ib,ik,i_sp_pol)= E%f(ib,ik,i_sp_pol) + E%fo(ib,ik,i_sp_pol)= 0._SP endif endif ! enddo enddo enddo + enddo ! end subroutine RT_adjust_equilibrium ! diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index c0ed00d119..f436f6af71 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -77,7 +77,8 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) ! ! mz ! - cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*real(f_occ)*real(wfconjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1)) + cv(:,3)=cv(:,3)+Xk%weights(ik)*(-1)**(i_sp_pol-1)*real(f_occ)*& +& real(wfconjg(WF_tmp%r(:,1,i_wf1))*WF_tmp%r(:,1,i_wf1)) ! else if(n_spinor==2) then ! From 54c3c995ce5364bd44938d2f20231c2b6d4f24b6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 15 Nov 2025 00:06:19 +0100 Subject: [PATCH 1297/1367] Fixed tddft with hartree free collisions --- src/real_time_hamiltonian/RT_Hamiltonian.F | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index d4a50306ed..25df4e50ca 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -106,7 +106,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! deallocate(delta_rho) ! - if(n_spin>1 .and. eval_DFT) then + if(n_spin>1 .and. eval_DFT.and..not.l_use_Hxc_collisions) then allocate(delta_magn(fft_size,3)) call el_magnetization_matrix(dG_in,E,k,delta_magn,RT_bands(1)) magn_n=magn_reference+delta_magn @@ -115,7 +115,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! ! The Vxc term !-------------- - if (eval_DFT) then + if (eval_DFT.and..not.l_use_Hxc_collisions) then call XC_potential_driver(E,k,WF_kind,WF_xc_functional,1) V_xc_sc=V_xc-REF_V_xc_sc endif @@ -127,7 +127,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) allocate(V_scf(fft_size)) V_scf=cZERO if(eval_HARTREE) V_scf=V_scf+V_Hartree_sc(:,1) - if(eval_DFT) then + if(eval_DFT.and..not.l_use_Hxc_collisions) then allocate(V_xc_mat(fft_size,n_spinor,n_spinor)) call Build_V_xc_mat(V_xc_sc,V_xc_mat) V_scf=V_scf+V_xc_mat(:,1,1)+V_xc_mat(:,2,2) @@ -172,6 +172,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) call Build_dG_avg(dG_in,dG_avg) call COLLISIONS_compose_rt(dG_avg) ! + ! ! Add RT_Vnl_xc to Ho_plus_Sigma !--------------------------------- do i_sp_pol=1,n_sp_pol From 83328b49e64c919c417440618d47ae4b2d4e662d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 15 Nov 2025 09:36:52 +0100 Subject: [PATCH 1298/1367] Fixed comment on numerical derivtive of vxc (it is a standard derivative, not a functional derivative) Re-inserted threshold for evaluating numerical functional derivative --- src/xc_functionals/XC_libxc_driver.F | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 4e746ea3b0..6ee67895ca 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -261,7 +261,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! ORDER_NOW=ORDER if (l_Fxc_from_Vxc.and.ORDER==2) then - call msg('s',' Evaluating Fxc as numerical functional derivative of Vxc') + call msg('s',' Evaluating Fxc as numerical derivative of Vxc') PERT_FAC=1.000001_DP ORDER_NOW=1 YAMBO_ALLOC(V_xc_pert,(fft_size,n_spin)) @@ -364,7 +364,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! if (l_Fxc_from_Vxc.and.ORDER==2) then do ifft=1,fft_size - if (abs(spin_rho_DP(1,ifft)) Date: Sat, 15 Nov 2025 11:24:05 +0100 Subject: [PATCH 1299/1367] Fixed compilation with cuda fortran --- src/wf_and_fft/WF_apply_symm.F | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/wf_and_fft/WF_apply_symm.F b/src/wf_and_fft/WF_apply_symm.F index b91b0cce9d..ce0e182321 100644 --- a/src/wf_and_fft/WF_apply_symm.F +++ b/src/wf_and_fft/WF_apply_symm.F @@ -69,19 +69,21 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) ! endif ! -#ifdef _CUDA_LOC +#ifdef _GPU_LOC if (allocated(rho_map)) call error(" rho map procedure not implemented with symmetries and cuda") #endif ! if(n_spinor==1) then ! +#if !defined _GPU_LOC if (allocated(rho_map)) then !$omp parallel do default(shared), private(ifft,ifftp) do ifft = 1, rho_map_size ifftp=rho_map_inv(DEV_VAR(fft_rot_r)(rho_map(ifft),isymm)) WF_symm(ifft,1)=cmplx(WF_p(ifftp,1),kind=SP) enddo - else + else +#endif !DEV_ACC_DEBUG data present(WF_p,WF_symm,fft_rot_r) !DEV_ACC parallel loop !DEV_CUF kernel do(1) <<<*,*>>> @@ -94,22 +96,26 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) enddo !DEV_OMPGPU end target !DEV_ACC_DEBUG end data +#if !defined _GPU_LOC endif +#endif ! endif ! if (n_spinor==2) then ! +#if !defined _GPU_LOC if (allocated(rho_map)) then !$omp parallel do default(shared), private(ifft,ifftp) do ifft = 1, rho_map_size ifftp=rho_map_inv(DEV_VAR(fft_rot_r)(rho_map(ifft),isymm)) - WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & - DEV_VAR(spin_sop)(1,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) - WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & - DEV_VAR(spin_sop)(2,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) + WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ifftp,1)+ & + DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ifftp,2) + WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ifftp,1)+ & + DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ifftp,2) enddo else +#endif !DEV_ACC_DEBUG data present(WF_p,WF_symm,fft_rot_r,spin_sop) !DEV_ACC parallel loop !DEV_CUF kernel do(1) <<<*,*>>> @@ -118,14 +124,16 @@ subroutine DEV_SUB(WF_apply_symm)(isc,WF_symm) !DEV_OMP parallel do default(shared), private(ifft,ifftp) do ifft = 1, fft_size ifftp=DEV_VAR(fft_rot_r)(ifft,isymm) - WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & - DEV_VAR(spin_sop)(1,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) - WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*cmplx(WF_p(ifftp,1),kind=SP)+ & - DEV_VAR(spin_sop)(2,2,isymm)*cmplx(WF_p(ifftp,2),kind=SP) + WF_symm(ifft,1)=DEV_VAR(spin_sop)(1,1,isymm)*WF_p(ifftp,1)+ & + DEV_VAR(spin_sop)(1,2,isymm)*WF_p(ifftp,2) + WF_symm(ifft,2)=DEV_VAR(spin_sop)(2,1,isymm)*WF_p(ifftp,1)+ & + DEV_VAR(spin_sop)(2,2,isymm)*WF_p(ifftp,2) enddo !DEV_OMPGPU end target !DEV_ACC_DEBUG end data +#if !defined _GPU_LOC endif +#endif ! endif ! From 1b825ebf82409c55c3d5118d655219c05fbbd75c Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 16 Nov 2025 21:32:28 +0100 Subject: [PATCH 1300/1367] F_xc is always set to zero in low density reagions Small aestethic fix imported from tech-gga Fixed indentation in RT_start_and_restart --- src/hamiltonian/V_real_space_to_H.F | 6 +++--- src/real_time_initialize/RT_start_and_restart.F | 2 +- src/xc_functionals/XC_libxc_driver.F | 14 +++++++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index 7ceb999453..d26feadb23 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -53,9 +53,9 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) V_mat=cZERO if(index(V_kind,"xc") >0) call Build_V_xc_mat(Vxc,V_mat) if(index(V_kind,"def")>0) then - do concurrent (i_spinor=1:n_spinor) - V_mat(:,i_sp_pol+i_spinor-1,i_sp_pol+i_spinor-1)= & -& V_mat(:,i_sp_pol+i_spinor-1,i_sp_pol+i_spinor-1)+V(:,i_sp_pol+i_spinor-1) + do concurrent (i_spinor=1:n_spinor) + i_spin=i_sp_pol+i_spinor-1 + V_mat(:,i_spin,i_spin)=V_mat(:,i_spin,i_spin)+V(:,i_spin) enddo endif ! diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 86592f4747..251b04f884 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -97,7 +97,7 @@ subroutine RT_start_and_restart(E,k,q) ! if(.not.l_RT_is_WFfree) then ! - call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) + call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,magn_reference,1) ! call Bare_Hamiltonian(E,k,k) diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 6ee67895ca..1c4435fb0e 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -362,10 +362,18 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if (FUNCTIONAL==XC_HYB_GGA_XC_GAUPBE*XC_FACTOR) E_xc_val= E_xc_val-EXX_FRACTION*real(exsr,SP) endif ! - if (l_Fxc_from_Vxc.and.ORDER==2) then + if (ORDER==2) then + if (l_Fxc_from_Vxc) then + ! Compute the functional derivative + do ifft=1,fft_size + if (abs(spin_rho_DP(1,ifft))max(rho_map_thresh,1.E-8)) cycle + F_xc(ifft,1,1)=0._SP enddo endif ! From 1129c6614e7b17d9b4aef430f5173dd80c7a14b6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 16 Nov 2025 22:18:58 +0100 Subject: [PATCH 1301/1367] Fixed bug in RT_EULER_step --- src/real_time_propagation/RT_EULER_step.F | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index a6c98d6644..a07cb3d47c 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -14,7 +14,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! implicit none ! - integer, intent(in) :: ik,i_sp_pol,nbf + integer, intent(in) :: ik,i_sp_pol,nbf(2) real(SP), intent(in) :: dT complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -31,7 +31,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"def") ! return ! @@ -47,7 +47,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! G_k=G_lesser_reference(:,:,ik,i_sp_pol) ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"def") ! ! Then the rho1 term. This gives rho2. ! @@ -62,14 +62,14 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! Take in input only the cv channel ! G_k=cZERO - do ib1=RT_bands(1),nbf - do ib2=nbf+1,RT_bands(2) + do ib1=RT_bands(1),nbf(i_sp_pol) + do ib2=nbf(i_sp_pol)+1,RT_bands(2) G_k(ib1,ib2)=dG_in(ib1,ib2) G_k(ib2,ib1)=dG_in(ib2,ib1) enddo enddo ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"pop") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"pop") ! if( l_RT_RWA .and. (.not.l_RT_FRES) ) return ! @@ -80,7 +80,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,i_sp_pol) G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"add") ! end subroutine RT_EULER_step ! From 04cf26ee6efc5b8f81ad710ca87d68a8d747a0d1 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Nov 2025 00:25:22 +0100 Subject: [PATCH 1302/1367] Improving OCCUPATIONS_Fermi. Fermi level is set half-way between VBM and CBm --- src/common/OCCUPATIONS_Fermi.F | 47 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index 0cac67b854..05f45e304d 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -60,7 +60,7 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! 2 1 2 1 non collinear ! 2 2 1 1 collinear ! - spin_occ=2.0_SP/real(n_spin) + spin_occ=2.0_SP/real(n_spin,SP) ! ! All energies are stored in E_sorted... ! @@ -85,8 +85,6 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! ! First guess ! - ! real(nel)/2.0_SP*real(n_spinor) is last occupied state - ! ! n_b_full_guess not set when the system is metallic ... ! ! n_b_full_guess is used to avoid spurious oscillations @@ -99,6 +97,12 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! n_b_full_guess= nint( real(nel)/2.0_SP*real(n_spinor)+.1) ! + ! When there is a odd number of electrons (n_spin>1). + ! + if (mod(nel,2._SP)/=0._SP) then + n_b_full_guess=nint( real(nel-1._SP)/2.0_SP*real(n_spinor)+.1) + endif + ! if (n_b_full_guess > 0 ) then if (n_b_full_guess+1 > nb_here ) then call error(' Not enough states to accomodate all electrons. Include more states in the DFT run.') @@ -115,11 +119,6 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) endif endif ! - ! ... or when there is a odd number of electrons (when n_sp_pol>1 - ! the system can be semiconductive in the two channels). - ! - if (mod(nel,2._SP)/=0._SP) n_b_full_guess=0 - ! ! Start Loop ! i_trials=1 @@ -128,7 +127,7 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) nel_diff_zero=1.E-5 Fermi_is_converged=.false. ! - ! BUG-fix [Andrea 1/6/2012]: when the system is semiconductive it may happen the + ! When the system is semiconductive it may happen the ! Efermi falls below or above the CBM/VBM of the Double Grid energy levels. To avoid this ! a very small temperature is imposed forcing the Fermi level to fall within the ! gap. @@ -145,11 +144,9 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) group_size=max(1,int(n_total_states/500)) E_save=E_sorted(1) LOOP1: do i1=1,n_total_states,group_size - if (i1>1) then - if (abs(E_sorted(i1)-E_save)Tel_step) E_save=E_sorted(i1) - endif - call ef2nel(Tel,E_sorted(i1),n_of_el_from_zero(1),'both ') + E_save=E_sorted(i1) + if (i1 nel_diff_zero) then i_Ef(2)=i1 @@ -165,11 +162,9 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! E_save=E_sorted(i_Ef(1)) LOOP2: do i1=i_Ef(1),i_Ef(2) - if (i1>1) then - if (abs(E_sorted(i1)-E_save)Tel_step) E_save=E_sorted(i1) - endif - call ef2nel(Tel,E_sorted(i1),n_of_el_from_zero(1),'both ') + E_save=E_sorted(i1) + if (i1 nel_diff_zero) then i_Ef_fine(2)=i1 @@ -184,15 +179,17 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! 3. Is any level in the Ef_fine range ok? ! do i1=i_Ef_fine(1),i_Ef_fine(2) - call ef2nel(Tel,E_sorted(i1),n_of_el_from_zero(1),'both ') + E_save=E_sorted(i1) + if (i1Tel_step) then - E%E_Fermi=E_sorted(i1) - ! To Code! - !E%E_Fermi=(E_sorted(i1)+E_sorted(i1+1))/2. + E%E_Fermi=(E_sorted(i1)+E_sorted(i1+1))/2._SP + Fermi_is_converged=.true. exit FERMI_LOOP endif enddo ! + ! ! 4. extend i_Ef_fine to include degenerate states ! i_Ef=i_Ef_fine @@ -230,14 +227,14 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) exit FERMI_LOOP endif if (abs(Ef(1)-Ef(2))<1.E-8) exit FERMI_LOOP - E%E_Fermi=(Ef(1)+Ef(2))/2. + E%E_Fermi=(Ef(1)+Ef(2))/2._SP i_trials(2)=i_trials(2)+1 enddo ! if (Fermi_is_converged) exit FERMI_LOOP ! Tel=Tel+Tel_step - if (i_trials(1)>100) nel_diff_zero=nel_diff_zero*10. + if (i_trials(1)>100) nel_diff_zero=nel_diff_zero*10._SP if (i_trials(1)==1000) call error('Impossible to converge the Fermi Level') ! enddo FERMI_LOOP From e7b7f14bfa34960e45b456b3f9f07cc4fc7a59e6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Nov 2025 00:38:56 +0100 Subject: [PATCH 1303/1367] Improved occupations report --- src/communicate/REPORT_Occupations.F | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/communicate/REPORT_Occupations.F b/src/communicate/REPORT_Occupations.F index 9d0a3d9bf6..7aeea0c9bb 100644 --- a/src/communicate/REPORT_Occupations.F +++ b/src/communicate/REPORT_Occupations.F @@ -45,8 +45,7 @@ subroutine REPORT_Occupations(what,E) ! ! Initial Report ! - if (n_sp_pol==1) call msg('r',title(1:title_len)//"=== General ===") - if (n_sp_pol==2) call msg('r',title(1:title_len)//"=== Spin Independent ===") + call msg('r',title(1:title_len)//"=== General ===") if (T_elecs==T_holes) call msg('r',COMPOSE_spin_msg(title,title_len,'Electronic Temperature',0),& & (/Tel*HA2EV,Tel*HA2KEL/),'[eV K]') if (T_elecs/=T_holes) call msg('r',COMPOSE_spin_msg(title,title_len,'Holes / Elecs Temp',0), & @@ -56,12 +55,10 @@ subroutine REPORT_Occupations(what,E) call msg('r',COMPOSE_spin_msg(title,title_len,'El. density',0),(/nel/(DL_vol*BO2ANG**3*1.E-24)/),'[cm-3]') call msg('rn',COMPOSE_spin_msg(title,title_len,'Fermi Level',0),E%E_Fermi*HA2EV,'[eV]') ! - if (n_sp_pol==2) call msg('rn','Spin majority [UP] channel is ',i_spin_majority) - ! do i_sp_pol=1,n_sp_pol ! if (n_sp_pol==2) then - call msg('r',title(1:title_len)//"=== Spin "//spin_string(i_sp_pol)//" channel ===") + call msg('r',title(1:title_len)//"=== Gaps and Widths in "//spin_string(i_sp_pol)//" channel ===") else call msg('r',title(1:title_len)//"=== Gaps and Widths ===") endif @@ -98,6 +95,8 @@ subroutine REPORT_Occupations(what,E) ! enddo ! + if (n_sp_pol==2) call msg('rn','Spin majority channel is '//spin_string(i_spin_majority)//" channel") + ! if (n_sp_pol==2) then if (all(Nbf==Nbm).and.all(Nbf>0)) then call msg('r',title(1:title_len)//"=== Overall gap ===") From 2e26b19f621754d2470d7ceb222f36d8b02c7fb0 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 17 Nov 2025 08:56:07 +0100 Subject: [PATCH 1304/1367] OCCUPATIONS_Fermi reverted to develop version. Changes moved in a dedicated branch --- src/common/OCCUPATIONS_Fermi.F | 47 +++++++++++++++------------- src/xc_functionals/XC_libxc_driver.F | 8 ++--- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/common/OCCUPATIONS_Fermi.F b/src/common/OCCUPATIONS_Fermi.F index 05f45e304d..0cac67b854 100644 --- a/src/common/OCCUPATIONS_Fermi.F +++ b/src/common/OCCUPATIONS_Fermi.F @@ -60,7 +60,7 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! 2 1 2 1 non collinear ! 2 2 1 1 collinear ! - spin_occ=2.0_SP/real(n_spin,SP) + spin_occ=2.0_SP/real(n_spin) ! ! All energies are stored in E_sorted... ! @@ -85,6 +85,8 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! ! First guess ! + ! real(nel)/2.0_SP*real(n_spinor) is last occupied state + ! ! n_b_full_guess not set when the system is metallic ... ! ! n_b_full_guess is used to avoid spurious oscillations @@ -97,12 +99,6 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! n_b_full_guess= nint( real(nel)/2.0_SP*real(n_spinor)+.1) ! - ! When there is a odd number of electrons (n_spin>1). - ! - if (mod(nel,2._SP)/=0._SP) then - n_b_full_guess=nint( real(nel-1._SP)/2.0_SP*real(n_spinor)+.1) - endif - ! if (n_b_full_guess > 0 ) then if (n_b_full_guess+1 > nb_here ) then call error(' Not enough states to accomodate all electrons. Include more states in the DFT run.') @@ -119,6 +115,11 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) endif endif ! + ! ... or when there is a odd number of electrons (when n_sp_pol>1 + ! the system can be semiconductive in the two channels). + ! + if (mod(nel,2._SP)/=0._SP) n_b_full_guess=0 + ! ! Start Loop ! i_trials=1 @@ -127,7 +128,7 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) nel_diff_zero=1.E-5 Fermi_is_converged=.false. ! - ! When the system is semiconductive it may happen the + ! BUG-fix [Andrea 1/6/2012]: when the system is semiconductive it may happen the ! Efermi falls below or above the CBM/VBM of the Double Grid energy levels. To avoid this ! a very small temperature is imposed forcing the Fermi level to fall within the ! gap. @@ -144,9 +145,11 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) group_size=max(1,int(n_total_states/500)) E_save=E_sorted(1) LOOP1: do i1=1,n_total_states,group_size - E_save=E_sorted(i1) - if (i11) then + if (abs(E_sorted(i1)-E_save)Tel_step) E_save=E_sorted(i1) + endif + call ef2nel(Tel,E_sorted(i1),n_of_el_from_zero(1),'both ') if (n_of_el_from_zero(1)<-nel_diff_zero) i_Ef(1)=i1 if (n_of_el_from_zero(1)> nel_diff_zero) then i_Ef(2)=i1 @@ -162,9 +165,11 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! E_save=E_sorted(i_Ef(1)) LOOP2: do i1=i_Ef(1),i_Ef(2) - E_save=E_sorted(i1) - if (i11) then + if (abs(E_sorted(i1)-E_save)Tel_step) E_save=E_sorted(i1) + endif + call ef2nel(Tel,E_sorted(i1),n_of_el_from_zero(1),'both ') if (n_of_el_from_zero(1)<-nel_diff_zero) i_Ef_fine(1)=i1 if (n_of_el_from_zero(1)> nel_diff_zero) then i_Ef_fine(2)=i1 @@ -179,17 +184,15 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) ! 3. Is any level in the Ef_fine range ok? ! do i1=i_Ef_fine(1),i_Ef_fine(2) - E_save=E_sorted(i1) - if (i1Tel_step) then - E%E_Fermi=(E_sorted(i1)+E_sorted(i1+1))/2._SP - Fermi_is_converged=.true. + E%E_Fermi=E_sorted(i1) + ! To Code! + !E%E_Fermi=(E_sorted(i1)+E_sorted(i1+1))/2. exit FERMI_LOOP endif enddo ! - ! ! 4. extend i_Ef_fine to include degenerate states ! i_Ef=i_Ef_fine @@ -227,14 +230,14 @@ subroutine OCCUPATIONS_Fermi(E,K,OBJ,mode,n_bands,impose_balance) exit FERMI_LOOP endif if (abs(Ef(1)-Ef(2))<1.E-8) exit FERMI_LOOP - E%E_Fermi=(Ef(1)+Ef(2))/2._SP + E%E_Fermi=(Ef(1)+Ef(2))/2. i_trials(2)=i_trials(2)+1 enddo ! if (Fermi_is_converged) exit FERMI_LOOP ! Tel=Tel+Tel_step - if (i_trials(1)>100) nel_diff_zero=nel_diff_zero*10._SP + if (i_trials(1)>100) nel_diff_zero=nel_diff_zero*10. if (i_trials(1)==1000) call error('Impossible to converge the Fermi Level') ! enddo FERMI_LOOP diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 1c4435fb0e..0587f19655 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -371,10 +371,10 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) enddo endif ! Remove low density points - do ifft=1,fft_size - if (abs(spin_rho_DP(1,ifft))>max(rho_map_thresh,1.E-8)) cycle - F_xc(ifft,1,1)=0._SP - enddo + !do ifft=1,fft_size + ! if (abs(spin_rho_DP(1,ifft))>max(rho_map_thresh,1.E-8)) cycle + ! F_xc(ifft,1,1)=0._SP + !enddo endif ! if (EvaluateDGradient) then From 836f6858b0adccaba6fff14c39b0207795dafe6e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Nov 2025 09:53:15 +0100 Subject: [PATCH 1305/1367] Fixed exc-ph dipole --- src/exc-ph/EXC_dipole.F | 43 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index bfcc200fef..5d2bdbbcac 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -1,30 +1,14 @@ ! -! Copyright (C) 2000-2021 the YAMBO team -! http://www.yambo-code.org +! License-Identifier: GPL ! -! Authors (see AUTHORS file for details): AM FP AC +! Copyright (C) 2021 the YAMBO team +! +! Authors (see AUTHORS file for details): AM FP AC DS ! ! headers ! #include ! -! This file is distributed under the terms of the GNU -! General Public License. You can redistribute it and/or -! modify it under the terms of the GNU General Public -! License as published by the Free Software Foundation; -! either version 2, or (at your option) any later version. -! -! This program is distributed in the hope that it will -! be useful, but WITHOUT ANY WARRANTY; without even the -! implied warranty of MERCHANTABILITY or FITNESS FOR A -! PARTICULAR PURPOSE. See the GNU General Public License -! for more details. -! -! You should have received a copy of the GNU General Public -! License along with this program; if not, write to the Free -! Software Foundation, Inc., 59 Temple Place - Suite 330,Boston, -! MA 02111-1307, USA or visit http://www.gnu.org/copyleft/gpl.txt. -! !> @brief Calculate exciton-dipole !! subroutine EXC_dipole(Xk,E,q,X) @@ -42,7 +26,6 @@ subroutine EXC_dipole(Xk,E,q,X) use BS_solvers, ONLY:BS_mat,BS_H_dim,BSS_Vnl_included,BSS_alloc,BSS_free use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_WF_b_and_k - ! use y_memory_alloc ! implicit none @@ -51,14 +34,12 @@ subroutine EXC_dipole(Xk,E,q,X) type(bz_samp), intent(in) :: Xk,q type(X_t), intent(in) :: X ! - ! ! Work Space ! - integer :: i_alpha,i_BS_mat + integer :: i_alpha,i_BS_mat,VB(2),CB(2) type(DIPOLE_t) :: DIPs ! if(any(abs(EXC_q0(:))>epsilon(1.))) then - ! ! call DIPOLES_reset(DIPs) ! @@ -68,10 +49,10 @@ subroutine EXC_dipole(Xk,E,q,X) DIPs%ib =BS_bands(1:2) DIPs%ib_lim(1) =E%nbf(1) DIPs%ib_lim(2) =E%nbf(1)+1 -! -! Unfortunatelly BSS_Vnl_included and DIPs%computed -! are not saved by the BS_solves I assume .TRUE. and 'R V P' -! + ! + ! Unfortunatelly BSS_Vnl_included and DIPs%computed + ! are not saved by the BS_solves I assume .TRUE. and 'R V P' + ! DIPs%Vnl_included=.TRUE. DIPs%computed ='R V P' ! @@ -84,13 +65,13 @@ subroutine EXC_dipole(Xk,E,q,X) call PARALLEL_global_indexes(E,Xk,q,"Response_T_space",X=X) ! ! ... EH space (no parallelization) - call K_Transitions_setup("K",1,E,Xk,DIPs) - ! + call K_Transitions_dimensions(1,E,Xk,DIPs,VB,CB) + ! !... Parallel distribution call PARALLEL_global_Response_T_transitions(Xk) ! ! ... EH space (with parallelization) and Transition groups build-up - call K_Transitions_setup("T",1,E,Xk,DIPs) + call K_Transitions_setup(1,E,Xk,DIPs,VB,CB) ! !... Blocks build-up call K_blocks() From 0a47566bdb4d4bae712dd71282547701c0b6c2ff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Nov 2025 10:07:28 +0100 Subject: [PATCH 1306/1367] Further fix to excph subroutine --- src/exc-ph/EXC_dipole.F | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/exc-ph/EXC_dipole.F b/src/exc-ph/EXC_dipole.F index 5d2bdbbcac..4f9038e5fe 100644 --- a/src/exc-ph/EXC_dipole.F +++ b/src/exc-ph/EXC_dipole.F @@ -23,7 +23,7 @@ subroutine EXC_dipole(Xk,E,q,X) use vec_operate, ONLY:v_norm use X_m, ONLY:X_t use BS, ONLY:BS_bands,BS_T_grp,BSE_prop,BS_dip_size,BS_nT_grps - use BS_solvers, ONLY:BS_mat,BS_H_dim,BSS_Vnl_included,BSS_alloc,BSS_free + use BS_solvers, ONLY:BS_mat,BS_H_dim,BSS_n_eig,BSS_Vnl_included,BSS_alloc,BSS_free use parallel_int, ONLY:PARALLEL_global_indexes,PP_redux_wait,PARALLEL_index,PARALLEL_WF_distribute,PARALLEL_WF_index use parallel_m, ONLY:PAR_IND_WF_b_and_k use y_memory_alloc @@ -89,8 +89,7 @@ subroutine EXC_dipole(Xk,E,q,X) ! Recalculate the residuals ! i_BS_mat=1 - call K_diago_R_res("opt1", i_BS_mat,BS_E_in,BS_R_right,BS_mat) - !call K_diago_hermitian_residuals(i_BS_mat,BS_E_in,BS_R_left,BS_R_right) + call K_diago_R_res("opt1",i_BS_mat,BS_E_in,BSS_n_eig,0,BS_R_right,BS_mat) BS_R_left =conjg(BS_R_right) ! else From ebddf72006e4364977f991f0141f34ea17830114 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 18 Nov 2025 22:08:37 +0100 Subject: [PATCH 1307/1367] Fixed OpenAcc bug in WF_free --- src/wf_and_fft/WF_free.F | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wf_and_fft/WF_free.F b/src/wf_and_fft/WF_free.F index af1aac8a1a..97bcb9b747 100644 --- a/src/wf_and_fft/WF_free.F +++ b/src/wf_and_fft/WF_free.F @@ -39,10 +39,10 @@ subroutine WF_free(WF,keep_fft,keep_states_to_load) if (pp_is_uspp) call PP_uspp_free() ! if (have_gpu) then - if (.not. ( allocated(WF%c) .eqv. allocated(WF%c_d) ) ) & -& call error("[WF] inconsistent alloc of GPU wfcs in G/C sapce") - if (.not. ( allocated(WF%r) .eqv. allocated(WF%r_d) ) ) & -& call error("[WF] inconsistent alloc of GPU wfcs in R sapce") + if (.not. ( allocated(WF%c) .eqv. devxlib_mapped(DEV_VAR(WF%c)) ) ) & +& call error("[WF] inconsistent alloc of GPU wfcs in G/C space") + if (.not. ( allocated(WF%r) .eqv. devxlib_mapped(DEV_VAR(WF%r)) ) ) & +& call error("[WF] inconsistent alloc of GPU wfcs in R space") endif ! if (.not.(allocated(WF%c).or.allocated(WF%r))) return From b7f0b70335cee6dfcde7216e60867d0173f27ae4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 Nov 2025 00:44:35 +0100 Subject: [PATCH 1308/1367] code cleaning, while trying to fix OpenAcc --- src/allocations/MPA_ALLOC_parallel.F | 1 - src/allocations/X_ALLOC_parallel.F | 15 +++------- src/matrices/MATRIX_init.F | 39 ++------------------------ src/matrices/MATRIX_transfer.F | 10 ------- src/modules/mod_gpu.F | 4 +++ src/modules/mod_matrix.F | 2 +- src/pol_function/X_dielectric_matrix.F | 27 ------------------ src/pol_function/X_redux.F | 2 +- 8 files changed, 12 insertions(+), 88 deletions(-) diff --git a/src/allocations/MPA_ALLOC_parallel.F b/src/allocations/MPA_ALLOC_parallel.F index d42aab9c60..3ee3336d79 100644 --- a/src/allocations/MPA_ALLOC_parallel.F +++ b/src/allocations/MPA_ALLOC_parallel.F @@ -35,7 +35,6 @@ subroutine MPA_ALLOC_parallel(MPA_E_par,MPA_R_par,NG,NW,mode) ! ! Type of allocation.... ! - !l_XUP = index(mode,"XUP")>0 l_CPU_ONLY = index(mode,"CPU_ONLY")>0 ! ! Initialization diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 2ac4ad18a5..04b3173670 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -29,24 +29,17 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) ! ! Work Space ! - logical :: l_XUP,l_PAR,l_CPU_ONLY - ! - ! Reset... - ! - call MATRIX_reset(X_par) + logical :: l_PAR,l_CPU_ONLY ! ! Type of allocation.... ! - l_XUP = index(mode,"XUP")>0 - l_PAR = index(mode,"X")>0.and.index(mode,"XUP")==0 + l_PAR = index(mode,"X")>0 l_CPU_ONLY = index(mode,"CPU_ONLY")>0 ! ! Initialization ! - if (l_XUP) then - call MATRIX_init( "XUP", X_par, NG, NW ) - else if (l_PAR) then - call MATRIX_init( "X" , X_par, NG, NW ) + if (l_PAR) then + call MATRIX_init( "X", X_par, NG, NW ) endif ! X_rows = X_par%rows diff --git a/src/matrices/MATRIX_init.F b/src/matrices/MATRIX_init.F index 61a5fec13f..c240856f89 100644 --- a/src/matrices/MATRIX_init.F +++ b/src/matrices/MATRIX_init.F @@ -37,9 +37,7 @@ subroutine MATRIX_init( what, M_par, N, Nb) ! Work Space ! integer :: M,i_c,N_rows - integer, allocatable :: rows(:,:),cols(:,:) ! - call MATRIX_reset(M_par) !DEV_ACC enter data copyin(M_par) ! ! COMMs @@ -47,7 +45,7 @@ subroutine MATRIX_init( what, M_par, N, Nb) if (what=="SLK") then call COMM_copy(PAR_COM_SLK_INDEX_local, M_par%INTRA_comm) call COMM_copy(PAR_COM_SLK, M_par%INTER_comm) - else if (what=="XUP".or.what=="XDN".or.what=="X".or.what=="MPA") then + else if (what=="X".or.what=="MPA") then call COMM_copy(PAR_COM_RL_A2A, M_par%INTRA_comm) call COMM_copy(PAR_COM_RL_INDEX, M_par%INTER_comm) endif @@ -74,34 +72,7 @@ subroutine MATRIX_init( what, M_par, N, Nb) endif #endif ! - ! Response function. Only upper triangle is distributed. - ! - if (what=="XUP") then - ! - allocate(rows(M_par%INTER_comm%n_CPU,2)) - allocate(cols(M_par%INTER_comm%n_CPU,2)) - M_par%kind="XUP" - M= ( (N**2-N)/2 + N )/M_par%INTER_comm%n_CPU - cols(1,:)=(/1,N/) - rows(1,:)=(/1,UPPER_solver(N)/) - do i_c=2,M_par%INTER_comm%n_CPU - cols(i_c,:)=(/rows(i_c-1,2)+1,N/) - N_rows=UPPER_solver( cols(i_c,2)- cols(i_c,1)+1 ) - rows(i_c,:)=rows(i_c-1,2)+(/1,N_rows/) - if (N_rows==0) rows(i_c,2)=N - enddo - M_par%I = 1 - M_par%Nb = Nb - M_par%N = N - M_par%rows = rows(M_par%INTER_comm%CPU_id+1,:) - M_par%cols = cols(M_par%INTER_comm%CPU_id+1,:) - call rows_and_cols_setup() - deallocate(rows,cols) - return - ! - endif - ! - ! Entire Matrix + ! Response function. Entire Matrix ! if (what=="X".or.what=="PAR".or.what=="MPA") then ! @@ -129,10 +100,4 @@ subroutine rows_and_cols_setup() M_par%BLCcols = M_par%cols end subroutine ! - integer function UPPER_solver(N) - integer :: N - UPPER_solver=nint( (real(N,SP)+.5_SP)-sqrt( (real(N)+0.5_SP)**2 - 2._SP*real(M,SP) ) )+1 - if ( (real(N,SP)+.5_SP)**2 - 2._SP*real(M,SP) < 0 ) UPPER_solver=0 - end function - ! end subroutine diff --git a/src/matrices/MATRIX_transfer.F b/src/matrices/MATRIX_transfer.F index fbfe29abb3..b1007ee71f 100644 --- a/src/matrices/MATRIX_transfer.F +++ b/src/matrices/MATRIX_transfer.F @@ -122,16 +122,6 @@ subroutine MATRIX_transfer( M_in, M_bse, M, M_out, INDEX_in, INDEX_out, SND, RCV ! endif ! - if (M_in_kind=="XUP".and.X_FILL_UP_matrix_only) then - if (i_space_inv==0) call MATRIX_duplicate("+TC",M_in=M_in,INDEX_in=M_in%I,M_out=M_Xdn) - if (i_space_inv==1) call MATRIX_duplicate("+T" ,M_in=M_in,INDEX_in=M_in%I,M_out=M_Xdn) - call MATRIX_PAR_to_from_PAR(M_Xdn%blc(M_Xdn%rows(1):M_Xdn%rows(2),M_Xdn%cols(1):M_Xdn%cols(2),M_Xdn%I) ,& -& M_Xdn%rows, M_Xdn%cols,& -& M_out%blc(M_out%rows(1):M_out%rows(2),M_out%cols(1):M_out%cols(2),M_out%I),& -& M_out%rows,M_out%cols) - call MATRIX_duplicate("free",M_out=M_Xdn) - endif - ! call COMM_reset(TRANSFER_world) ! call timing('MATRIX transfer ('//trim(PAR_to_PAR_comm_NAME)//')',OPR='stop') diff --git a/src/modules/mod_gpu.F b/src/modules/mod_gpu.F index 51bea8d72a..76b997270a 100644 --- a/src/modules/mod_gpu.F +++ b/src/modules/mod_gpu.F @@ -15,7 +15,11 @@ module gpu_m use devxlib_linalg use devxlib_async, ONLY:devxlib_async2stream #if defined _GPU && defined _CUDA +# if defined __GFORTRAN__ + use cusolverdn_y +# else use cusolverdn +# endif #endif #if defined _CUDAF use cufft diff --git a/src/modules/mod_matrix.F b/src/modules/mod_matrix.F index 4f5f54e7e4..086e6884a4 100644 --- a/src/modules/mod_matrix.F +++ b/src/modules/mod_matrix.F @@ -36,7 +36,7 @@ module matrix ! type PAR_matrix ! - character(3) :: kind ! "PAR" "SLK" "XUP" "XDN" "SER" + character(3) :: kind ! "PAR" "SLK" "SER" ! ! Dimensions integer :: I ! Block element diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 05502bd07e..21695d7a27 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -212,9 +212,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) if (.not.io_RESPONSE) X_MEM_n_tot_freqs=X_MEM_n_freqs*PAR_nQ_ibz if (.not.allocated(X_par)) then if ( io_RESPONSE) allocate(X_par(1)) -!#if !defined _PAR_IO -! if ( io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,X_MEM_n_tot_freqs/)) -!#endif if (.not.io_RESPONSE) allocate(X_par(PAR_nQ_ibz)) if (.not.io_RESPONSE) call X_ALLOC_elemental('X',(/X%ng,X%ng,X_MEM_n_tot_freqs/)) endif @@ -332,33 +329,12 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) call X_AVERAGE_setup("CLOSE",iq,X%q0) endif ! - ! DS MERGE < - ! The following lines were after the call to X_redux and before the call to io_X before the merge - ! I moved them here after the merge - ! - ! allocation of X_mat - if (io_RESPONSE.and..not.allocated(X_mat)) then -#if ! defined _PAR_IO - call X_ALLOC_elemental('X',(/X%ng,X%ng,Xw%n_freqs/)) -#endif - endif - ! - ! DS MERGE > - ! ! X_par => X_mat ! call X_mat_filling(iq_mem,X,Xw,X_MEM_n_freqs,X_MEM_n_tot_freqs,X_mat) ! call elemental_IO( iq , .FALSE. ) ! - ! X_mat (and other few quantities) deallocate - ! - if (io_RESPONSE.and.allocated(X_mat)) then -#if ! defined _PAR_IO - call X_ALLOC_elemental('X') -#endif - endif - ! ! CLEAN (1) ! Frequencies must not be cleaned in the case of lifetimes calculations when the EM1d ! database is not written on disk @@ -384,9 +360,6 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) ! CLEAN (3) ! if (io_RESPONSE) then -#if !defined _PAR_IO - YAMBO_FREE(X_mat) -#endif deallocate(X_par) endif if (allocated(F_xc_gspace)) then diff --git a/src/pol_function/X_redux.F b/src/pol_function/X_redux.F index e05a6aec55..f70b834f17 100644 --- a/src/pol_function/X_redux.F +++ b/src/pol_function/X_redux.F @@ -17,7 +17,7 @@ subroutine X_redux(iq,what,X_par,Xw,X) ! ! More precisely the routine handles: ! - ! 1. Xo(XUP/XDN/SER): INPUT + ! 1. Xo(SER) : INPUT ! 2. Dyson(SER/SLK) : SOLVER ! 3. X(PAR/SER) : OUTPUT ! From 7dfdfd6554d746f04ac4b20d1bf87ad27d996cb9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 Nov 2025 13:19:00 +0100 Subject: [PATCH 1309/1367] Further changes introduced to address issue #239 Main change: DEV_ACC_DEBUG has beem re-activated in include/headers/common/dev_defs.h --- include/headers/common/dev_defs.h | 2 +- src/wf_and_fft/WF_load.F | 8 ++++---- src/wf_and_fft/WF_symm_kpoint_g.F | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/headers/common/dev_defs.h b/include/headers/common/dev_defs.h index 6189f408f1..49ff306286 100644 --- a/include/headers/common/dev_defs.h +++ b/include/headers/common/dev_defs.h @@ -44,7 +44,7 @@ #if defined _OPENACC # define DEV_ACC $acc -# define DEV_ACC_DEBUG !!!! +# define DEV_ACC_DEBUG $acc #else # define DEV_ACC !!!! # define DEV_ACC_DEBUG !!!! diff --git a/src/wf_and_fft/WF_load.F b/src/wf_and_fft/WF_load.F index 7234dec75c..20ec0aba27 100644 --- a/src/wf_and_fft/WF_load.F +++ b/src/wf_and_fft/WF_load.F @@ -431,10 +431,10 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load WF_N = WF%N ! !if(allocated(rho_map)) then - ! !DEV_ACC_DEBUG data present(wfc_p,wf_DP) + ! !DEV_ACC_DEBUG data present(wfr_p,wf_DP) ! !DEV_ACC parallel loop ! !DEV_CUF kernel do(1) - ! !DEV_OMPGPU target map(present,alloc:wfc_p,wf_DP) + ! !DEV_OMPGPU target map(present,alloc:wfr_p,wf_DP) ! !DEV_OMPGPU teams loop ! do ic=1,rho_map_size ! wfr_p(ic,i_spinor,WF_N)=cmplx(DEV_VAR(wf_DP)(rho_map(ic)),kind=SP)*fft_norm @@ -442,10 +442,10 @@ subroutine WF_load(WF,iG_in,iGo_max_in,bands_to_load,kpts_to_load,sp_pol_to_load ! !DEV_OMPGPU end target ! !DEV_ACC_DEBUG end data !else - !DEV_ACC_DEBUG data present(wfc_p,wf_DP) + !DEV_ACC_DEBUG data present(wfr_p,wf_DP) !DEV_ACC parallel loop !DEV_CUF kernel do(1) - !DEV_OMPGPU target map(present,alloc:wfc_p,wf_DP) + !DEV_OMPGPU target map(present,alloc:wfr_p,wf_DP) !DEV_OMPGPU teams loop do ic=1,fft_size wfr_p(ic,i_spinor,WF_N)=cmplx(DEV_VAR(wf_DP)(ic),kind=SP)*fft_norm diff --git a/src/wf_and_fft/WF_symm_kpoint_g.F b/src/wf_and_fft/WF_symm_kpoint_g.F index 7de111fd9f..82febc73df 100644 --- a/src/wf_and_fft/WF_symm_kpoint_g.F +++ b/src/wf_and_fft/WF_symm_kpoint_g.F @@ -97,6 +97,8 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) igs=wf_tab_loc(ic,2) WF_k_tmp(igs,1)=WF_p(ig,1) enddo + !DEV_OMPGPU end target + !DEV_ACC_DEBUG end data ! else ! @@ -111,6 +113,8 @@ subroutine WF_symm_kpoint_g(b_to_load,ik,i_sp_pol,isymm,ig0,WF,ssop,isref,igref) WF_k_tmp(igs,1)=ssop_loc(1,1)*WF_p(ig,1)+ssop_loc(1,2)*WF_p(ig,2) WF_k_tmp(igs,2)=ssop_loc(2,1)*WF_p(ig,1)+ssop_loc(2,2)*WF_p(ig,2) enddo + !DEV_OMPGPU end target + !DEV_ACC_DEBUG end data endif ! ! take care of time reversal if needed From c3f0937df627a230ad50b2890d7e56edb555cd09 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 Nov 2025 18:54:30 +0100 Subject: [PATCH 1310/1367] Fixed two fails seen in the test-suite --- src/pol_function/X_dielectric_matrix.F | 12 +++++------- src/qp/QP_real_axis.F | 26 +++++++++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 21695d7a27..435db2fd6d 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -312,16 +312,13 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) ! call X_irredux(iq,"Xo"//trim(X_what),X_par(iq_mem),Xen,Xk,Xw,X,Dip) ! - if (l_write_disk_Xo.and.n_OPTICAL_dir_to_eval==1) then - call X_mat_filling(iq_mem,X,Xw,X_MEM_n_freqs,X_MEM_n_tot_freqs,X_mat) - call elemental_IO( iq , .TRUE. ) - endif - ! if (.not.l_rpa_IP) call X_redux(iq,"X"//trim(X_what),X_par(iq_mem),Xw,X) ! if (n_OPTICAL_dir_to_eval>1.and.iq_dir==1) call MATRIX_copy(X_par(iq_mem),X_par_average,.TRUE.) if (n_OPTICAL_dir_to_eval>1) call X_AVERAGE_do_it("ACCUMULATE",X_par(iq_mem)) ! + if (iq_dir1) then @@ -329,11 +326,12 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) call X_AVERAGE_setup("CLOSE",iq,X%q0) endif ! - ! X_par => X_mat + ! X_par => X_mat : this is needed when the I/O is off ! call X_mat_filling(iq_mem,X,Xw,X_MEM_n_freqs,X_MEM_n_tot_freqs,X_mat) ! call elemental_IO( iq , .FALSE. ) + call elemental_IO( iq , .TRUE. ) ! ! CLEAN (1) ! Frequencies must not be cleaned in the case of lifetimes calculations when the EM1d @@ -346,7 +344,7 @@ integer function X_dielectric_matrix(Xen,Xk,q,X,Xw,Dip,SILENT_MODE,CHILD) endif ! ! CLEAN (2) - if (io_RESPONSE) call MATRIX_reset(X_par(iq_mem)) + if (io_RESPONSE) call MATRIX_reset(X_par(1)) ! if (use_X_DbGd) then YAMBO_FREE(X_DbGd_nkpt_at_q) diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 074d155224..f117a1c645 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -272,7 +272,10 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! ! ALLOCATION (scattering_main) ! - call X_ALLOC_elemental('X',(/X%ng,X%ng,QP_n_W_freqs_redux/)) + if (io_RESPONSE) then + call X_ALLOC_elemental('X',(/X%ng,X%ng,QP_n_W_freqs_redux/)) + allocate(X_par(1)) + endif ! call elemental_collision_alloc(scattering_main,NG=X%ng,GAMP_NG=(/X%ng,X%ng/),TITLE="GW") call elemental_collision_alloc(scattering_prime,NG=X%ng,TITLE="GW") @@ -302,6 +305,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) io_err=io_X(X,Xw,X_id) endif ! + ! do iqbz=i_q_to_start,q%nbz ! if (.not.l_life.and.io_SCREEN) QP_W=cZERO @@ -367,11 +371,16 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) X_is_TR_rotated=.true. endif ! - ! mapping of X_par from X_mat - ! TO BE completed (avoiding reference to X_mat in the following) - ! - if (.not. allocated(X_par) ) allocate(X_par(1)) - call X_ALLOC_parallel(X_par(1),X%ng,Xw%n_freqs,"X") + if (io_RESPONSE) then + ! + ! mapping of X_par from X_mat + ! TO BE completed (avoiding reference to X_mat in the following) + ! At present X_par is allocated but not used ! + ! + call X_ALLOC_parallel(X_par(1),X%ng,Xw%n_freqs,"X") + ! + ! + endif ! ! Useful when GPU porting will be introduced ! X_blc_p=> DEV_VAR(X_par%blc) @@ -509,8 +518,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo bands_loop enddo qp_loop ! - call MATRIX_reset(X_par(1)) - deallocate(X_par) + if (io_RESPONSE) call MATRIX_reset(X_par(1)) ! if (.not.l_life) then ! @@ -573,7 +581,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo endif ! - if (allocated(X_par)) deallocate(X_par) + deallocate(X_par) ! call X_ALLOC_elemental('X') call WF_free(WF) From d1a49d336277c65f5f73cfcaaccf90727d19149f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 19 Nov 2025 22:43:49 +0100 Subject: [PATCH 1311/1367] Improving handling of allocations in QP_real_axis and io_X --- src/allocations/X_ALLOC_parallel.F | 5 ++++- src/io/io_X.F | 8 +++++-- src/qp/QP_real_axis.F | 36 +++++++++++++----------------- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/allocations/X_ALLOC_parallel.F b/src/allocations/X_ALLOC_parallel.F index 04b3173670..1c5df7bf05 100644 --- a/src/allocations/X_ALLOC_parallel.F +++ b/src/allocations/X_ALLOC_parallel.F @@ -29,12 +29,13 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) ! ! Work Space ! - logical :: l_PAR,l_CPU_ONLY + logical :: l_PAR,l_CPU_ONLY,l_INI_ONLY ! ! Type of allocation.... ! l_PAR = index(mode,"X")>0 l_CPU_ONLY = index(mode,"CPU_ONLY")>0 + l_INI_ONLY = index(mode,"INIT_ONLY")>0 ! ! Initialization ! @@ -47,6 +48,8 @@ subroutine X_ALLOC_parallel(X_par,NG,NW,mode) X_cols = X_par%cols !DEV_ACC update device(X_cols) ! + if (l_INI_ONLY) return + ! YAMBO_ALLOC(X_par%blc,(X_par%rows(1):X_par%rows(2),X_par%cols(1):X_par%cols(2),NW)) X_par%blc=cZERO if (have_gpu.and..not.l_CPU_ONLY) then diff --git a/src/io/io_X.F b/src/io/io_X.F index b06d8f1db7..84bd3d6218 100644 --- a/src/io/io_X.F +++ b/src/io/io_X.F @@ -229,8 +229,10 @@ integer function io_X(X,Xw,ID) endif ! if (allocated(X_par)) then - call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) - call io_variable_bulk(ID_frag,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) + if(allocated(X_par(1)%blc)) then + call def_variable_bulk(ID_frag,trim(ch),1,(/2,X%ng_db,X%ng_db,Xw%n_freqs/),SP) + call io_variable_bulk(ID_frag,1,C3=X_par(1)%blc(:,:,:Xw%n_freqs),IPOS=(/1,X_par(1)%rows(1),X_par(1)%cols(1),1/)) + endif endif ! endif @@ -248,6 +250,7 @@ integer function io_X(X,Xw,ID) endif ! if (allocated(X_par)) then + if(allocated(X_par(1)%blc)) then YAMBO_ALLOC(X_on_disk,(X_par(1)%rows(1):X_par(1)%rows(2),X_par(1)%cols(1):X_par(1)%cols(2))) do i1=1,Xw%n_freqs ! @@ -263,6 +266,7 @@ integer function io_X(X,Xw,ID) endif ! YAMBO_FREE(X_on_disk) + endif endif ! endif diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index f117a1c645..25af498e76 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -71,7 +71,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) integer :: i1,i2,i3,i4,i_or,iqbz,iqibz,ib,i_err,i_q_to_start,iqs,& & i_v,i_c,i_k,i_kmq,i_kmq_bz,i_kmq_Go,i_kmq_s,i_sp_pol,& & io_err,X_id,WID,IO_ACT,timing_steps,i_q_mem,X_range(2),i_qp,i_qp_mem,i_q_W_mem,i_b_mem - integer :: X_rows1,X_rows2,X_cols1,X_cols2 + integer :: X_rows1,X_rows2,X_cols1,X_cols2,n_freqs complex(SP) :: lrhotw(X%ng),W_dummy real(SP) ::life_Fe,life_Fh integer, allocatable::life_W_table(:,:) @@ -273,8 +273,16 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! ALLOCATION (scattering_main) ! if (io_RESPONSE) then + ! call X_ALLOC_elemental('X',(/X%ng,X%ng,QP_n_W_freqs_redux/)) + ! + ! Replace X_mat with X_mat TO BE completed + ! At present X_par is not used + ! Here X_par is allocated just to define X_par(1)%rows + ! allocate(X_par(1)) + call X_ALLOC_parallel(X_par(1),X%ng,Xw%n_freqs,"X INIT_ONLY") + ! endif ! call elemental_collision_alloc(scattering_main,NG=X%ng,GAMP_NG=(/X%ng,X%ng/),TITLE="GW") @@ -351,11 +359,9 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) ! endif ! - if (l_life) then - call X_delta_part(X%ng,X_life_W(iqibz)%n_freqs,X_mat(:,:,X_range(1):X_range(2)),scattering_main%gamp) - else - call X_delta_part(X%ng,Xw%n_freqs,X_mat(:,:,X_range(1):X_range(2)),scattering_main%gamp) - endif + n_freqs=Xw%n_freqs + if (l_life) n_freqs=X_life_W(iqibz)%n_freqs + call X_delta_part(X%ng,n_freqs,X_mat(:,:,X_range(1):X_range(2)),scattering_main%gamp) ! if (l_life) QP_n_W_freqs=0 ! @@ -371,17 +377,6 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) X_is_TR_rotated=.true. endif ! - if (io_RESPONSE) then - ! - ! mapping of X_par from X_mat - ! TO BE completed (avoiding reference to X_mat in the following) - ! At present X_par is allocated but not used ! - ! - call X_ALLOC_parallel(X_par(1),X%ng,Xw%n_freqs,"X") - ! - ! - endif - ! ! Useful when GPU porting will be introduced ! X_blc_p=> DEV_VAR(X_par%blc) ! @@ -518,8 +513,6 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo bands_loop enddo qp_loop ! - if (io_RESPONSE) call MATRIX_reset(X_par(1)) - ! if (.not.l_life) then ! QP_W_er(iqbz,:)=Xw%er @@ -581,7 +574,10 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) enddo endif ! - deallocate(X_par) + if (io_RESPONSE) then + call MATRIX_reset(X_par(1)) + deallocate(X_par) + endif ! call X_ALLOC_elemental('X') call WF_free(WF) From 96aa7bcf31b5fa2658c39863af26db597f46f428 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 20 Nov 2025 10:31:06 +0100 Subject: [PATCH 1312/1367] Version 5.3.0, Revision 26279, Hash 184ac89e50 MODIFIED * include/version/version.m4 ypp/k-points/k_map_fine_to_coarse_driver.F Bugs: - Additions: - Changes: -Removed call k_build_up_BZ_tables in DB-grid map. Notice that k/s_table are never used in this part. Removing this call allow the code to read SAVE folders without wave-functions (p2y -nowf) Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/k-points/k_map_fine_to_coarse_driver.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d57bfb8efa..9dc09f0b3b 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26259 h.c3c813fe7b, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26279 h.184ac89e50, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26259" -SHASH="c3c813fe7b" +SREVISION="26279" +SHASH="184ac89e50" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/k-points/k_map_fine_to_coarse_driver.F b/ypp/k-points/k_map_fine_to_coarse_driver.F index 0f8f618fe1..f9a1322273 100644 --- a/ypp/k-points/k_map_fine_to_coarse_driver.F +++ b/ypp/k-points/k_map_fine_to_coarse_driver.F @@ -56,7 +56,7 @@ subroutine k_map_fine_to_coarse_driver(Xk,Xen) ! ! Expand the Coarse Grid !======================== - call k_build_up_BZ_tables(Xk) + ! call k_build_up_BZ_tables(Xk) call k_ibz2bz(Xk,'i',.true.) ! ! FineGd E to IBZ map From 7f2890870314e8acc171fdd133d6026567bd34d2 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 20 Nov 2025 10:43:23 +0100 Subject: [PATCH 1313/1367] Version 5.3.0, Revision 26280, Hash 96aa7bcf31 MODIFIED * include/version/version.m4 ypp/k-points/k_map_fine_to_coarse_reduce.F Bugs: - Additions: -More parallelization Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/k-points/k_map_fine_to_coarse_reduce.F | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 9dc09f0b3b..048a4fbba8 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26279 h.184ac89e50, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26280 h.96aa7bcf31, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26279" -SHASH="184ac89e50" +SREVISION="26280" +SHASH="96aa7bcf31" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/k-points/k_map_fine_to_coarse_reduce.F b/ypp/k-points/k_map_fine_to_coarse_reduce.F index 58c80d3eb6..667834fe78 100644 --- a/ypp/k-points/k_map_fine_to_coarse_reduce.F +++ b/ypp/k-points/k_map_fine_to_coarse_reduce.F @@ -14,6 +14,8 @@ logical function k_map_fine_to_coarse_reduce(FineGd_k) use zeros, ONLY:k_rlu_zero use pars, ONLY:SP use vec_operate, ONLY:c2a,rlu_v_is_zero + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index use R_lattice, ONLY:bz_samp use LIVE_t, ONLY:live_timing use y_memory_alloc @@ -25,13 +27,19 @@ logical function k_map_fine_to_coarse_reduce(FineGd_k) ! Work Space ! integer :: ik,ip,unique(FineGd_k%nbz) + type(PP_indexes) :: px real(SP):: v(3) ! unique=1 ! - call live_timing('Map Fine Grid to Reduced Coarse one',FineGd_k%nbz) + call PP_indexes_reset(px) + call PARALLEL_index(px,(/FineGd_k%nbz/)) + call PP_wait() + ! + call live_timing('Map Fine Grid to Reduced Coarse one',px%n_of_elements(myid+1)) ! do ik=1,FineGd_k%nbz + if (.not.px%element_1D(ik)) cycle call live_timing(steps=1) if (unique(ik)==0) cycle do ip=ik+1,FineGd_k%nbz @@ -42,6 +50,8 @@ logical function k_map_fine_to_coarse_reduce(FineGd_k) enddo enddo ! + call PP_redux_wait(unique,imode=2) + ! call live_timing( ) ! k_map_fine_to_coarse_reduce=count(unique==1)==FineGd_k%nbz From 89883be9993e52cfc0413ce39b93a0d896f586de Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 20 Nov 2025 11:02:30 +0100 Subject: [PATCH 1314/1367] Version 5.3.0, Revision 26281, Hash 7f28908703 MODIFIED * include/version/version.m4 driver/options_yambo.c Bugs: - Additions: -Better message Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/driver/options_yambo.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 048a4fbba8..cce6d1b980 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26280 h.96aa7bcf31, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26282 h.7f28908703, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26280" -SHASH="96aa7bcf31" +SREVISION="26282" +SHASH="7f28908703" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/driver/options_yambo.c b/src/driver/options_yambo.c index b0e1b82d46..d3523c797c 100644 --- a/src/driver/options_yambo.c +++ b/src/driver/options_yambo.c @@ -120,7 +120,7 @@ void options_yambo(struct options_struct *options, int *i_opt) *i_opt = *i_opt + 1; options[*i_opt].short_desc = "Kernel"; strcpy(options[*i_opt].long_desc[0], - "=hartree/alda/lrc/hf/sex/bsfxc"); + "=hartree/alda/lrc/hf/sex/bsfxc/ip"); strcpy(options[*i_opt].long_desc[1], "hf/sex only eh-space; lrc only G-space"); options[*i_opt].long_opt = "kernel"; From 3a62e67c6f753efdf532328e159b0d0ae43db236 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 20 Nov 2025 17:51:55 +0100 Subject: [PATCH 1315/1367] Small change to allow compilation --- src/bse/K_diago_driver.F | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index d1fe953344..01d4e3bf77 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -249,6 +249,7 @@ subroutine K_diago_driver(iq,W,X_static) ! if (K_is_not_hermitian) then ! +#if defined _SCALAPACK if (l_ydiago) then ! BS_V_left are only referenced in non-hermitian case ! In coupling case, if the user requested n values, @@ -260,6 +261,7 @@ subroutine K_diago_driver(iq,W,X_static) & solver_type=BSS_ydiago_solver, elpasolver=elpa_solver) BSS_n_eig = size(BS_E) endif +#endif ! if(l_diago) then ! call LINEAR_ALGEBRA_driver(DIAGO,M=BS_V_right,E_cmpl=BS_E,V_left=BS_V_left) @@ -278,12 +280,14 @@ subroutine K_diago_driver(iq,W,X_static) ! else ! +#if defined _SCALAPACK if (l_ydiago) then call YDIAGO_driver(i_BS_mat, BS_E, BS_V_right, neigs_this_cpu, neig_shift, & & neigs_range=neigs_range, eigvals_range=eigvals_range, & & solver_type=BSS_ydiago_solver, elpasolver=elpa_solver) BSS_n_eig = size(BS_E) endif +#endif ! if(l_diago) then call LINEAR_ALGEBRA_driver(DIAGO,M=BS_V_right,E_real=BS_E_real) From 58774046023561c06c4a9a1164aab8366fd90182 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 21 Nov 2025 10:33:53 +0100 Subject: [PATCH 1316/1367] Version 5.3.0, Revision 26290, Hash b6d5985a0 MODIFIED * include/version/version.m4 ypp/k-points/k_map_fine_to_coarse_driver.F Bugs: - Additions: - Changes: -Restored call to k-table, used to find border points Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/k-points/k_map_fine_to_coarse_driver.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index cce6d1b980..cc021b0545 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26282 h.7f28908703, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26290 h.b6d5985a0, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26282" -SHASH="7f28908703" +SREVISION="26290" +SHASH="b6d5985a0" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/k-points/k_map_fine_to_coarse_driver.F b/ypp/k-points/k_map_fine_to_coarse_driver.F index f9a1322273..0f8f618fe1 100644 --- a/ypp/k-points/k_map_fine_to_coarse_driver.F +++ b/ypp/k-points/k_map_fine_to_coarse_driver.F @@ -56,7 +56,7 @@ subroutine k_map_fine_to_coarse_driver(Xk,Xen) ! ! Expand the Coarse Grid !======================== - ! call k_build_up_BZ_tables(Xk) + call k_build_up_BZ_tables(Xk) call k_ibz2bz(Xk,'i',.true.) ! ! FineGd E to IBZ map From 211269a5839daef604cb935a04c1ab28f17bf7a5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 21 Nov 2025 16:08:48 +0100 Subject: [PATCH 1317/1367] Version 5.3.0, Revision 26291, Hash 587740460 MODIFIED * include/version/version.m4 bse/DOUBLE_project.dep bse/NL_project.dep modules/mod_zeros.F Bugs: -Fixed compilation bug with INTEL 2025 Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/bse/DOUBLE_project.dep | 1 + src/bse/NL_project.dep | 1 + src/modules/mod_zeros.F | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index cc021b0545..b3cffc4fe4 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26290 h.b6d5985a0, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26291 h.587740460, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26290" -SHASH="b6d5985a0" +SREVISION="26291" +SHASH="587740460" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 274f365e98..5de70908f0 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -54,4 +54,5 @@ LDIAGO_driver.o PL_diago_residual.o PL_via_perturbative_inversion.o + objects.o diff --git a/src/bse/NL_project.dep b/src/bse/NL_project.dep index 7bef4cdefd..ea7b3d87f8 100644 --- a/src/bse/NL_project.dep +++ b/src/bse/NL_project.dep @@ -1,4 +1,5 @@ K_diago_driver.o K_driver_init.o K_observables.o + objects.o diff --git a/src/modules/mod_zeros.F b/src/modules/mod_zeros.F index 82e426a1e2..3149160078 100644 --- a/src/modules/mod_zeros.F +++ b/src/modules/mod_zeros.F @@ -55,11 +55,11 @@ subroutine define_zeros(vector_,ref_value,zero_,RLU) allocate(tmp_arr(size(vector_,1))) do ic=1,3 if (allocated(vector_rlu)) then - do concurrent (i1=1:nv) + do i1=1,nv tmp_arr(i1)=abs(vector_rlu(i1,ic)) enddo else - do concurrent (i1=1:nv) + do i1=1,nv tmp_arr(i1)=abs(vector_(i1,ic)) enddo endif From 056cbf3aebe049c66f0e3f518fd6668010e5f0b9 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Fri, 21 Nov 2025 16:37:46 +0100 Subject: [PATCH 1318/1367] Version 5.3.0, Revision 26292, Hash 211269a58 MODIFIED * include/version/version.m4 collisions/LSEX_potential.F collisions/OSCLL_compose_collision.F pol_function/X_delta_part.F qp/QP_W2Sc.F qp/QP_mpa.F qp/QP_ppa_cohsex.F qp/QP_secant_driver.F tddft/TDDFT_BSK_2_FXC.F xc_functionals/XC_eval_lda_kernel.F xc_functionals/XC_libxc_driver.F Bugs: -Fixed compilation with Intel 2025. Do-concurrent is not compatible with intel-2025 it gives interal compiler error Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 ++-- src/collisions/LSEX_potential.F | 6 ++-- src/collisions/OSCLL_compose_collision.F | 8 ++--- src/pol_function/X_delta_part.F | 12 +++---- src/qp/QP_W2Sc.F | 6 ++-- src/qp/QP_mpa.F | 2 +- src/qp/QP_ppa_cohsex.F | 6 ++-- src/qp/QP_secant_driver.F | 4 +-- src/tddft/TDDFT_BSK_2_FXC.F | 44 +++++++++++++----------- src/xc_functionals/XC_eval_lda_kernel.F | 4 +-- src/xc_functionals/XC_libxc_driver.F | 32 +++++++++++------ 11 files changed, 72 insertions(+), 58 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index b3cffc4fe4..d4234e9974 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26291 h.587740460, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26292 h.211269a58, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26291" -SHASH="587740460" +SREVISION="26292" +SHASH="211269a58" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/collisions/LSEX_potential.F b/src/collisions/LSEX_potential.F index 35574068f6..c9f2a2f825 100644 --- a/src/collisions/LSEX_potential.F +++ b/src/collisions/LSEX_potential.F @@ -85,7 +85,7 @@ subroutine LSEX_potential(q,X,Xw) ! ! The bare exchange v ! - do concurrent (ig1=1:X%ng) + do ig1=1,X%ng W(iqbz,ig1,ig1)=-4._SP/spin_occ*pi*isc%gamp(ig1,ig1) enddo ! @@ -106,9 +106,9 @@ subroutine LSEX_potential(q,X,Xw) ! ! Screened part of the exchange \tilde W = W - v ! - do concurrent (ig1=1:X%ng,ig2=1:X%ng) + forall(ig1=1:X%ng,ig2=1:X%ng) W(iqbz,ig1,ig2)=W(iqbz,ig1,ig2)-4._SP/spin_occ*pi*X_mat(ig1,ig2,1)*isc%gamp(ig1,ig2) - enddo + end forall ! endif ! diff --git a/src/collisions/OSCLL_compose_collision.F b/src/collisions/OSCLL_compose_collision.F index 43b8262257..8bdf6735c7 100644 --- a/src/collisions/OSCLL_compose_collision.F +++ b/src/collisions/OSCLL_compose_collision.F @@ -75,19 +75,19 @@ subroutine OSCLL_compose_collision(k,q,i_n,i_m,i_k,i_sp,COLL) ! do ig1=1,ng_oscll do ig2=1,ng_oscll - do concurrent (ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) + forall (ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib ,ik_mem,i_sp,iqbz,ig2)* & & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig2,ig1) - enddo + end forall enddo enddo ! elseif(Correlation==LHF) then do ig1=1,ng_oscll - do concurrent (ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) + forall (ibp=NL_bands(1):NL_bands(2),ib=NL_bands(1):NL_bands(2)) COLL(ib,ibp,i_kmq,i_sp)=COLL(ib,ibp,i_kmq,i_sp)+OSCLL(i_n,ib,ik_mem,i_sp,iqbz,ig1)* & & conjg(OSCLL(i_m,ibp,ik_mem,i_sp,iqbz,ig1))*W(iqbz,ig1,ig1) - enddo + end forall enddo endif ! diff --git a/src/pol_function/X_delta_part.F b/src/pol_function/X_delta_part.F index 6fb12870ef..5eae9ff7ea 100644 --- a/src/pol_function/X_delta_part.F +++ b/src/pol_function/X_delta_part.F @@ -52,18 +52,18 @@ subroutine X_delta_part(NG,NW,X,Gamp) complex(SP):: Xt(NG,NG) ! if (i_space_inv==1) then - do concurrent (i1=1:NG,i2=1:NG,i3=1:NW) + forall(i1=1:NG,i2=1:NG,i3=1:NW) X(i1,i2,i3)=aimag(X(i1,i2,i3))*Gamp(i1,i2) - enddo + end forall else do i3=1,NW - do concurrent (i1=1:NG,i2=1:NG) + forall(i1=1:NG,i2=1:NG) Xt(i1,i2) =X(i1,i2,i3)*Gamp(i1,i2) - enddo - do concurrent (i1=1:NG,i2=1:NG) + end forall + forall(i1=1:NG,i2=1:NG) X(i1,i2,i3)=0.5_SP*aimag(Xt(i1,i2)+Xt(i2,i1))-& & (0._SP,0.5_SP)* real(Xt(i1,i2)-Xt(i2,i1)) - enddo + end forall enddo endif ! diff --git a/src/qp/QP_W2Sc.F b/src/qp/QP_W2Sc.F index 2f632beb78..145ce620d5 100644 --- a/src/qp/QP_W2Sc.F +++ b/src/qp/QP_W2Sc.F @@ -62,7 +62,7 @@ subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! ! 1st term: (spin_occ-f_os+fbose) ! - do concurrent (i_w=1:Xw%n_freqs) + do i_w=1,Xw%n_freqs QP_W_here(i_w)=QP_W(i_qp_mem,i_q_mem,i_b_mem,i_w)* & & (spin_occ-E%f(os(1),os(2),os(3))+bose_f(real(Xw%p(i_w))))* & & bose_decay(real(Xw%p(i_w))) @@ -74,7 +74,7 @@ subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! ! 2nd term: (f_os+fbose) ! - do concurrent (i_w=1:Xw%n_freqs) + do i_w=1,Xw%n_freqs QP_W_here(i_w)=QP_W(i_qp_mem,i_q_mem,i_b_mem,i_w)* & & (E%f(os(1),os(2),os(3))+bose_f(real(Xw%p(i_w))))* & & bose_decay(real(Xw%p(i_w))) @@ -86,7 +86,7 @@ subroutine QP_W2Sc(iqbz,k,E,Xw,Sc_W) ! enddo ! - do concurrent (i_w=1:Sc_W(i_qp)%n_freqs) + do i_w=1,Sc_W(i_qp)%n_freqs QP_Sc(i_qp,i_w)=QP_Sc(i_qp,i_w)+dSc(i_w) enddo ! diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index f1d4e57937..d375aaba36 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -126,7 +126,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - do concurrent (i_w=1:QP_dSc_steps) + do i_w=1,QP_dSc_steps Sc_W(i_qp)%p(i_w)=qp%E_bare(i_qp)+(i_w-1)*QP_dSc_delta enddo enddo diff --git a/src/qp/QP_ppa_cohsex.F b/src/qp/QP_ppa_cohsex.F index 116331bea5..462f4f684b 100644 --- a/src/qp/QP_ppa_cohsex.F +++ b/src/qp/QP_ppa_cohsex.F @@ -137,7 +137,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - do concurrent (i_w=1:QP_dSc_steps) + do i_w=1,QP_dSc_steps Sc_W(i_qp)%p(i_w)=qp%E_bare(i_qp)+(i_w-1)*QP_dSc_delta enddo enddo @@ -700,7 +700,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) endif ! ! DALV: here the grid is center in E0 - do concurrent (i_w=1:QP_dSc_steps) + do i_w=1,QP_dSc_steps W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp enddo ! @@ -810,7 +810,7 @@ subroutine QP_ppa_cohsex(X,Xk,E,k,q,qp,Xw,GW_iter) if(l_ppa.and.l_GW_terminator) then ! ! DALV: here the grid is center in E0 - do concurrent (i_w=1:QP_dSc_steps) + do i_w=1,QP_dSc_steps W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp enddo ! diff --git a/src/qp/QP_secant_driver.F b/src/qp/QP_secant_driver.F index f74717e6f9..703921838d 100644 --- a/src/qp/QP_secant_driver.F +++ b/src/qp/QP_secant_driver.F @@ -95,7 +95,7 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) ! !Brackets ! - do concurrent (i1=1:qp%n_states) + do i1=1,qp%n_states Eqp_raxis(i1,1)=qp%E_bare(i1) Eqp_raxis(i1,2)=Eqp_raxis(i1,1)+1./HA2EV enddo @@ -164,7 +164,7 @@ subroutine QP_secant_driver(X,Xen,Xk,en,k,q,qp,Xw,Dip) call W_reset(Sc_W(i1)) Sc_W(i1)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i1)%p,(QP_dSc_steps)) - do concurrent (i2=1:QP_dSc_steps) + do i2=1,QP_dSc_steps Sc_W(i1)%p(i2)=Eqp_raxis(i1,1)+(i2-1)*QP_dSc_delta enddo enddo diff --git a/src/tddft/TDDFT_BSK_2_FXC.F b/src/tddft/TDDFT_BSK_2_FXC.F index 4ecc917eab..9ad1d7c652 100644 --- a/src/tddft/TDDFT_BSK_2_FXC.F +++ b/src/tddft/TDDFT_BSK_2_FXC.F @@ -110,20 +110,20 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) YAMBO_ALLOC(O2x_qpg,(BS_nT_at_k(ik2),FXC_n_g_corr)) YAMBO_ALLOC(blk_Eo,(2,O_x_dim)) ! - do concurrent (i1=1:FXC_n_g_corr) + do i1=1,FXC_n_g_corr conjg_O1x_qpg(i1,:BS_nT_at_k(ik1))=conjg(O1x(i1,:BS_nT_at_k(ik1)))*bare_qpg(iq,i1) enddo - do concurrent (i2=1:FXC_n_g_corr) + do i2=1,FXC_n_g_corr O2x_qpg(:BS_nT_at_k(ik2),i2)=O2x(i2,:BS_nT_at_k(ik2))*bare_qpg(iq,i2) enddo ! ! Kernel diagonal and simmetrization ! if (ik1==ik2) then - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) FXC_K_diagonal(blk_pos(1)+i1)=real(BS_mat(i1,i1)) enddo - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) BS_mat(i1,i1)=(0._SP,0._SP) enddo do i1=1,BS_nT_at_k(ik1) @@ -135,28 +135,30 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! ! BS diagonal + Non interacting energies and widths ! - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) blk_Eo(1,i1)=BSS_eh_E(blk_pos(1)+i1)+& & FXC_K_diagonal(blk_pos(1)+i1) enddo - do concurrent (i2=1:BS_nT_at_k(ik2)) + do i2=1,BS_nT_at_k(ik2) blk_Eo(2,i2)=BSS_eh_E(blk_pos(2)+i2)+& & FXC_K_diagonal(blk_pos(2)+i2) enddo ! if (allocated(BSS_eh_W)) then - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) blk_Eo(1,i1)=blk_Eo(1,i1)+(0.,1.)*BSS_eh_W(blk_pos(1)+i1) enddo - do concurrent (i2=1:BS_nT_at_k(ik2)) + do i2=1,BS_nT_at_k(ik2) blk_Eo(1,i2)=blk_Eo(1,i2)+(0.,1.)*BSS_eh_W(blk_pos(2)+i2) enddo endif ! ! Projectors ! - do concurrent (i1=1:BS_nT_at_k(ik1),i2=1:BS_nT_at_k(ik2)) - BS_mat(i1,i2)=BS_mat(i1,i2)*Fb2x1(blk_Eo(1,i1),blk_Eo(2,i2),E_same_treshold) + do i1=1,BS_nT_at_k(ik1) + do i2=1,BS_nT_at_k(ik2) + BS_mat(i1,i2)=BS_mat(i1,i2)*Fb2x1(blk_Eo(1,i1),blk_Eo(2,i2),E_same_treshold) + enddo enddo ! ! Degenerations: @@ -238,19 +240,19 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! Upper diagonal block contribution ! if (FXC_is_retarded) then - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) wk1(i1,:)=right_R(i1,:)*(& & 1._SP/(W%p(iw)-blk_Eo(1,i1))+1._SP/(-W%p(iw)-blk_Eo(1,i1)) ) enddo - do concurrent (i2=1:BS_nT_at_k(ik2)) + do i2=1,BS_nT_at_k(ik2) wk2(:,i2)= left_R(:,i2)*(& & 1._SP/(W%p(iw)-blk_Eo(2,i2))+1._SP/(-W%p(iw)-blk_Eo(2,i2)) ) enddo else - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) wk1(i1,:)=right_R(i1,:)/(W%p(iw)-blk_Eo(1,i1)) enddo - do concurrent (i2=1:BS_nT_at_k(ik2)) + do i2=1,BS_nT_at_k(ik2) wk2(:,i2)= left_R(:,i2)/(W%p(iw)-blk_Eo(2,i2)) enddo endif @@ -261,27 +263,29 @@ subroutine TDDFT_BSK_2_FXC(iq,ik1,ik2,O1x,O2x,O_x_dim,W,X_static) ! if (ik1/=ik2) then if (FXC_is_retarded) then - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) wk1(i1,:)=right_R(i1,:)*(& & 1._SP/(-conjg(W%p(iw))-blk_Eo(1,i1))+1._SP/(conjg(W%p(iw))-blk_Eo(1,i1)) ) enddo - do concurrent (i2=1:BS_nT_at_k(ik2)) + do i2=1,BS_nT_at_k(ik2) wk2(:,i2)= left_R(:,i2)*(& & 1._SP/(-conjg(W%p(iw))-blk_Eo(2,i2))+1._SP/(conjg(W%p(iw))-blk_Eo(2,i2)) ) enddo else - do concurrent (i1=1:BS_nT_at_k(ik1)) + do i1=1,BS_nT_at_k(ik1) wk1(i1,:)=right_R(i1,:)/(conjg(W%p(iw))-blk_Eo(1,i1)) enddo - do concurrent (i2=1:BS_nT_at_k(ik2)) + do i2=1,BS_nT_at_k(ik2) wk2(:,i2)= left_R(:,i2)/(conjg(W%p(iw))-blk_Eo(2,i2)) enddo endif ! FXC_temp=Co*(matmul(conjg_O1x_qpg,wk1)+matmul(wk2,O2x_qpg)) ! - do concurrent (i1=1:FXC_n_g_corr,i2=1:FXC_n_g_corr) - F_xc_gspace(i1,i2,iw)=F_xc_gspace(i1,i2,iw)+conjg(FXC_temp(i2,i1)) + do i1=1,FXC_n_g_corr + do i2=1,FXC_n_g_corr + F_xc_gspace(i1,i2,iw)=F_xc_gspace(i1,i2,iw)+conjg(FXC_temp(i2,i1)) + enddo enddo endif ! diff --git a/src/xc_functionals/XC_eval_lda_kernel.F b/src/xc_functionals/XC_eval_lda_kernel.F index 2a61f4459a..7b3d766ffa 100644 --- a/src/xc_functionals/XC_eval_lda_kernel.F +++ b/src/xc_functionals/XC_eval_lda_kernel.F @@ -33,7 +33,7 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) do is1 = 1,n_sp_pol do is2 = 1,n_sp_pol is_xc = xc_spin_map1(is1,is2) - do concurrent (ifft=1:fft_size) + do ifft=1,fft_size F_xc(ifft,is1,is2) = F_xc(ifft,is1,is2) + real(v2rho2(is_xc,ifft),SP) enddo enddo @@ -57,7 +57,7 @@ subroutine XC_eval_lda_kernel(v1rho,v2rho2) do is1 = 1,n_spinor do is2 = 1,n_spinor is_xc = xc_spin_map1(is1,is2) - do concurrent (ifft=1:fft_size) + do ifft=1,fft_size F_xc(ifft,is1,is2) = F_xc(ifft,is1,is2) + real(v2rho2(is_xc,ifft),SP) enddo enddo diff --git a/src/xc_functionals/XC_libxc_driver.F b/src/xc_functionals/XC_libxc_driver.F index 0587f19655..04d020fff0 100644 --- a/src/xc_functionals/XC_libxc_driver.F +++ b/src/xc_functionals/XC_libxc_driver.F @@ -217,8 +217,10 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) YAMBO_FREE(drho_tmp) endif ! - do concurrent (is1=1:n_spin,i1=1:fft_size) - drho(i1,is1,:) = drho(i1,is1,:)*fft_size/DL_vol*2._SP*pi/alat(:) + do is1=1,n_spin + do i1=1,fft_size + drho(i1,is1,:) = drho(i1,is1,:)*fft_size/DL_vol*2._SP*pi/alat(:) + enddo enddo ! do i1 = 1,fft_size @@ -243,7 +245,7 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) if (FUNCTIONAL == XC_LDA_C_KP) then ! Special case, XC_LDA_C_KP not available from libxc select case(ORDER) case(0) - do concurrent (i1=1:fft_size) + do i1=1,fft_size rspts(i1)=(3._DP/4._DP/pi_DP/real(spin_rho_SP(i1,1)/DL_vol,DP))**(1._DP/3._DP) enddo call xc_rpa_kp(rspts,v1rho) @@ -276,15 +278,19 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) E_xc = E_xc + real(tmp_exc,SP) case(1) call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) - do concurrent (i1=1:fft_size,i2=1:n_spin) - V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + do i1=1,fft_size + do i2=1,n_spin + V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + enddo enddo ! Needed to build F_xc from functional derivative for n_spin=1 if (l_Fxc_from_Vxc.and.ORDER==2) then spin_rho_DP=spin_rho_DP*PERT_FAC call xc_f03_lda_vxc(fnctl(ixc)%conf, size_IPL, spin_rho_DP(1,1), v1rho(1,1)) - do concurrent (i1=1:fft_size,i2=1:n_spin) - V_xc_pert(i1,i2) = V_xc_pert(i1,i2) + real(v1rho(i2,i1),SP) + do i1=1,fft_size + do i2=1,n_spin + V_xc_pert(i1,i2) = V_xc_pert(i1,i2) + real(v1rho(i2,i1),SP) + enddo enddo spin_rho_DP=spin_rho_DP/PERT_FAC endif @@ -296,8 +302,10 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! In the magnons case, I could use it also for F_xc_mat with n_sp_pol==2, ! avoiding the call to XC_eval_lda_kernel ! Howerver, the latter is more precise, since it works with DP quantities - do concurrent (i1=1:fft_size,i2=1:n_spin) - V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + do i1=1,fft_size + do i2=1,n_spin + V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + enddo enddo endif ! Needed to build Fxc unless in magnons case with n_sp_pol==2 @@ -343,8 +351,10 @@ subroutine XC_libxc_driver(en,Xk,FUNCTIONAL,ORDER,EXX_FRACTION,EXX_SCREENING) ! avoiding the call to XC_eval_gga_kernel ! Howerver but the latter is more precise, since it works with DP quantities !call XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) - do concurrent (i1=1:fft_size,i2=1:n_spin) - V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + do i1=1,fft_size + do i2=1,n_spin + V_xc(i1,i2) = V_xc(i1,i2) + real(v1rho(i2,i1),SP) + enddo enddo endif ! Needed to build Fxc unless in magnons case with n_sp_pol==2 From 9948c79ba1cf178d747e811aa8c6a7481c0be6ed Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Mon, 24 Nov 2025 11:19:58 +0100 Subject: [PATCH 1319/1367] Version 5.3.0, Revision 26293, Hash 056cbf3ae MODIFIED * include/version/version.m4 bse/K_diago_left_residuals.F modules/mod_interfaces.F Bugs: -Fixed bug with intent for Intel compiler 2025 Additions: - Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/bse/K_diago_left_residuals.F | 2 +- src/modules/mod_interfaces.F | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d4234e9974..3574b85bea 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26292 h.211269a58, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26293 h.056cbf3ae, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26292" -SHASH="211269a58" +SREVISION="26293" +SHASH="056cbf3ae" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_diago_left_residuals.F b/src/bse/K_diago_left_residuals.F index 1aed445f86..38825837f8 100644 --- a/src/bse/K_diago_left_residuals.F +++ b/src/bse/K_diago_left_residuals.F @@ -34,7 +34,7 @@ subroutine K_diago_L_res(mode, i_BS_mat, BS_E, & character(*),intent(in) :: mode integer, intent(in) :: i_BS_mat, neigs_this_cpu, neig_shift complex(SP), allocatable, intent(in) :: BS_E(:) - complex(SP), pointer, intent(out) :: BS_R_left(:) + complex(SP), pointer, intent(inout) :: BS_R_left(:) complex(SP), target, allocatable, intent(in) :: BS_V_left(:,:) complex(SP), pointer, optional, intent(in) :: BS_Overlap(:,:) ! diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index 99d9e6274f..a175af1407 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -264,7 +264,7 @@ subroutine K_diago_L_res(mode,i_BS_mat,BS_E, & character(*),intent(in) :: mode integer, intent(in) :: i_BS_mat, neigs_this_cpu, neig_shift complex(SP), allocatable, intent(in) :: BS_E(:) - complex(SP), pointer, intent(out) :: BS_R_left(:) + complex(SP), pointer, intent(inout) :: BS_R_left(:) complex(SP), target, allocatable, intent(in) :: BS_V_left(:,:) complex(SP), pointer, optional, intent(in) :: BS_Overlap(:,:) end subroutine K_diago_L_res From 458714026a18fc1e952bb38790311e4e8ebdbd2e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 24 Nov 2025 21:10:01 +0100 Subject: [PATCH 1320/1367] Fixes to real_time propagation for: - tddft with hartree not in collisions - Eulero step with n_sp_pol=2 --- src/real_time_hamiltonian/RT_Hamiltonian.F | 7 +++---- src/real_time_initialize/RT_start_and_restart.F | 2 +- src/real_time_propagation/RT_EULER_step.F | 14 +++++++------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 25df4e50ca..d4a50306ed 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -106,7 +106,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! deallocate(delta_rho) ! - if(n_spin>1 .and. eval_DFT.and..not.l_use_Hxc_collisions) then + if(n_spin>1 .and. eval_DFT) then allocate(delta_magn(fft_size,3)) call el_magnetization_matrix(dG_in,E,k,delta_magn,RT_bands(1)) magn_n=magn_reference+delta_magn @@ -115,7 +115,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! ! The Vxc term !-------------- - if (eval_DFT.and..not.l_use_Hxc_collisions) then + if (eval_DFT) then call XC_potential_driver(E,k,WF_kind,WF_xc_functional,1) V_xc_sc=V_xc-REF_V_xc_sc endif @@ -127,7 +127,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) allocate(V_scf(fft_size)) V_scf=cZERO if(eval_HARTREE) V_scf=V_scf+V_Hartree_sc(:,1) - if(eval_DFT.and..not.l_use_Hxc_collisions) then + if(eval_DFT) then allocate(V_xc_mat(fft_size,n_spinor,n_spinor)) call Build_V_xc_mat(V_xc_sc,V_xc_mat) V_scf=V_scf+V_xc_mat(:,1,1)+V_xc_mat(:,2,2) @@ -172,7 +172,6 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) call Build_dG_avg(dG_in,dG_avg) call COLLISIONS_compose_rt(dG_avg) ! - ! ! Add RT_Vnl_xc to Ho_plus_Sigma !--------------------------------- do i_sp_pol=1,n_sp_pol diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 251b04f884..86592f4747 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -97,7 +97,7 @@ subroutine RT_start_and_restart(E,k,q) ! if(.not.l_RT_is_WFfree) then ! - call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) + call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,magn_reference,1) ! call Bare_Hamiltonian(E,k,k) diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index a07cb3d47c..a6c98d6644 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -14,7 +14,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! implicit none ! - integer, intent(in) :: ik,i_sp_pol,nbf(2) + integer, intent(in) :: ik,i_sp_pol,nbf real(SP), intent(in) :: dT complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -31,7 +31,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"def") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") ! return ! @@ -47,7 +47,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! G_k=G_lesser_reference(:,:,ik,i_sp_pol) ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"def") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") ! ! Then the rho1 term. This gives rho2. ! @@ -62,14 +62,14 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! Take in input only the cv channel ! G_k=cZERO - do ib1=RT_bands(1),nbf(i_sp_pol) - do ib2=nbf(i_sp_pol)+1,RT_bands(2) + do ib1=RT_bands(1),nbf + do ib2=nbf+1,RT_bands(2) G_k(ib1,ib2)=dG_in(ib1,ib2) G_k(ib2,ib1)=dG_in(ib2,ib1) enddo enddo ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"pop") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"pop") ! if( l_RT_RWA .and. (.not.l_RT_FRES) ) return ! @@ -80,7 +80,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,i_sp_pol) G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"add") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") ! end subroutine RT_EULER_step ! From a89523f5214ff9bebbb143862ba1cde37429d6ca Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Nov 2025 14:37:09 +0100 Subject: [PATCH 1321/1367] Fuxed hugly alignement --- src/real_time_initialize/RT_start_and_restart.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/real_time_initialize/RT_start_and_restart.F b/src/real_time_initialize/RT_start_and_restart.F index 86592f4747..251b04f884 100644 --- a/src/real_time_initialize/RT_start_and_restart.F +++ b/src/real_time_initialize/RT_start_and_restart.F @@ -97,7 +97,7 @@ subroutine RT_start_and_restart(E,k,q) ! if(.not.l_RT_is_WFfree) then ! - call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) + call el_density_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,rho_reference,1) if(n_spin>1) call el_magnetization_matrix(G_lesser_reference(:,:,PAR_G_k_range(1):PAR_G_k_range(2),:),E,k,magn_reference,1) ! call Bare_Hamiltonian(E,k,k) From c6c18b10a63aafd6617bd3940683002650c3aa42 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 25 Nov 2025 14:40:18 +0100 Subject: [PATCH 1322/1367] Restored to fixes removed by mistake --- src/real_time_hamiltonian/RT_Hamiltonian.F | 7 ++++--- src/real_time_propagation/RT_EULER_step.F | 14 +++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index d4a50306ed..25df4e50ca 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -106,7 +106,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! deallocate(delta_rho) ! - if(n_spin>1 .and. eval_DFT) then + if(n_spin>1 .and. eval_DFT.and..not.l_use_Hxc_collisions) then allocate(delta_magn(fft_size,3)) call el_magnetization_matrix(dG_in,E,k,delta_magn,RT_bands(1)) magn_n=magn_reference+delta_magn @@ -115,7 +115,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! ! The Vxc term !-------------- - if (eval_DFT) then + if (eval_DFT.and..not.l_use_Hxc_collisions) then call XC_potential_driver(E,k,WF_kind,WF_xc_functional,1) V_xc_sc=V_xc-REF_V_xc_sc endif @@ -127,7 +127,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) allocate(V_scf(fft_size)) V_scf=cZERO if(eval_HARTREE) V_scf=V_scf+V_Hartree_sc(:,1) - if(eval_DFT) then + if(eval_DFT.and..not.l_use_Hxc_collisions) then allocate(V_xc_mat(fft_size,n_spinor,n_spinor)) call Build_V_xc_mat(V_xc_sc,V_xc_mat) V_scf=V_scf+V_xc_mat(:,1,1)+V_xc_mat(:,2,2) @@ -172,6 +172,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) call Build_dG_avg(dG_in,dG_avg) call COLLISIONS_compose_rt(dG_avg) ! + ! ! Add RT_Vnl_xc to Ho_plus_Sigma !--------------------------------- do i_sp_pol=1,n_sp_pol diff --git a/src/real_time_propagation/RT_EULER_step.F b/src/real_time_propagation/RT_EULER_step.F index a6c98d6644..a07cb3d47c 100644 --- a/src/real_time_propagation/RT_EULER_step.F +++ b/src/real_time_propagation/RT_EULER_step.F @@ -14,7 +14,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! implicit none ! - integer, intent(in) :: ik,i_sp_pol,nbf + integer, intent(in) :: ik,i_sp_pol,nbf(2) real(SP), intent(in) :: dT complex(SP), intent(in) :: dG_in(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) complex(SP), intent(out) :: dG_out(RT_bands(1):RT_bands(2),RT_bands(1):RT_bands(2)) @@ -31,7 +31,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) H_k=Ho_plus_Sigma(:,:,ik,i_sp_pol) - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"def") ! return ! @@ -47,7 +47,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! G_k=G_lesser_reference(:,:,ik,i_sp_pol) ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"def") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"def") ! ! Then the rho1 term. This gives rho2. ! @@ -62,14 +62,14 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) ! Take in input only the cv channel ! G_k=cZERO - do ib1=RT_bands(1),nbf - do ib2=nbf+1,RT_bands(2) + do ib1=RT_bands(1),nbf(i_sp_pol) + do ib2=nbf(i_sp_pol)+1,RT_bands(2) G_k(ib1,ib2)=dG_in(ib1,ib2) G_k(ib2,ib1)=dG_in(ib2,ib1) enddo enddo ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"pop") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"pop") ! if( l_RT_RWA .and. (.not.l_RT_FRES) ) return ! @@ -80,7 +80,7 @@ subroutine RT_EULER_step(dG_in,dG_out,ik,i_sp_pol,nbf,dT) if( l_RT_FRES ) H_k=H_k+H_field(:,:,ik,i_sp_pol) G_k=dG_in+G_lesser_reference(:,:,ik,i_sp_pol) ! - call RT_EULER_step_apply(G_k,H_k,dG_out,nbf,dT,"add") + call RT_EULER_step_apply(G_k,H_k,dG_out,nbf(i_sp_pol),dT,"add") ! end subroutine RT_EULER_step ! From 12d46ef0d7eb241ba040d1fdb1f5c69731576d18 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Nov 2025 15:05:35 +0100 Subject: [PATCH 1323/1367] Version 5.3.0, Revision 26297, Hash c6c18b10a6 MODIFIED * include/version/version.m4 exc-ph/EXCPH_lifetime.F DELETED * config/stamps_and_lists/project_dependencies.stamp Bugs: - Additions: - Changes: -Better coding Patch sent by: Claudio Attaccalite --- config/stamps_and_lists/project_dependencies.stamp | 0 include/version/version.m4 | 6 +++--- src/exc-ph/EXCPH_lifetime.F | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/version/version.m4 b/include/version/version.m4 index 3574b85bea..d507559dd5 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26293 h.056cbf3ae, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26297 h.c6c18b10a6, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26293" -SHASH="056cbf3ae" +SREVISION="26297" +SHASH="c6c18b10a6" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index b052464c17..9f84283168 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -41,6 +41,8 @@ subroutine EXCPH_lifetime(k,q,X) type(bz_samp) ::k,q type(X_t) ::X ! + real(SP), parameter :: deg_exc_thrs = 0.001/HA2EV + ! ! Work space ! integer :: ID_exc_gkkp,ID_gkkp,io_err,IO_ACT @@ -108,7 +110,7 @@ subroutine EXCPH_lifetime(k,q,X) ! call degeneration_finder(n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& & Er=BS_all_E(EXCPH_states(1):EXCPH_states(2),1),& - & deg_accuracy=0.001/HA2EV,Include_single_values=.true.) + & deg_accuracy=deg_exc_thrs,Include_single_values=.true.) ! do igrp=1,n_deg_grp j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 From 7613b31c67f5c03d3d6dbddb4d79bc4333affcec Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Nov 2025 15:10:09 +0100 Subject: [PATCH 1324/1367] Version 5.3.0, Revision 26298, Hash 12d46ef0d7 MODIFIED * include/version/version.m4 parallel/PARALLEL_global_defaults.F Bugs: - Additions: - Changes: -Too many cores in SCALAPACK generate crashed, default decreased Users can increase it if the want Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/parallel/PARALLEL_global_defaults.F | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index d507559dd5..5b8e1ba0ad 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26297 h.c6c18b10a6, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26298 h.12d46ef0d7, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26297" -SHASH="c6c18b10a6" +SREVISION="26298" +SHASH="12d46ef0d7" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/parallel/PARALLEL_global_defaults.F b/src/parallel/PARALLEL_global_defaults.F index e8d6d49b08..3ec97a5de9 100644 --- a/src/parallel/PARALLEL_global_defaults.F +++ b/src/parallel/PARALLEL_global_defaults.F @@ -35,7 +35,7 @@ subroutine PARALLEL_global_defaults(ENVIRONMENT) ! if (ncpu>=8 ) n_par_la=4 if (ncpu>=32) n_par_la=16 - if (ncpu>=64) n_par_la=36 +!if (ncpu>=64) n_par_la=36 ! #endif ! From 7e71a6dff9299a05c385d6c66ab9cf3cdc28d224 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Nov 2025 16:00:12 +0100 Subject: [PATCH 1325/1367] Version 5.3.0, Revision 26299, Hash 7613b31c67 MODIFIED * include/version/version.m4 bse/DOUBLE_project.dep bse/K_diago_driver.F bse/NL_project.dep Bugs: -Fixed bug lumen#241 Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/bse/DOUBLE_project.dep | 1 - src/bse/K_diago_driver.F | 12 +++++++----- src/bse/NL_project.dep | 1 - 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 5b8e1ba0ad..3b5d464277 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26298 h.12d46ef0d7, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26301 h.7613b31c67, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26298" -SHASH="12d46ef0d7" +SREVISION="26301" +SHASH="7613b31c67" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/DOUBLE_project.dep b/src/bse/DOUBLE_project.dep index 5de70908f0..274f365e98 100644 --- a/src/bse/DOUBLE_project.dep +++ b/src/bse/DOUBLE_project.dep @@ -54,5 +54,4 @@ LDIAGO_driver.o PL_diago_residual.o PL_via_perturbative_inversion.o - objects.o diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index e49ba441fa..6d92a68856 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -783,11 +783,13 @@ end subroutine BSS_n_eig_init subroutine K_slepc_local_free() ! if (BSS_slepc_matrix_format=='shell') then - call BS_HAYVEC_free(Slepc_v%Vi) - call BS_HAYVEC_free(Slepc_v%Vo) - deallocate(Slepc_v%Vi) - deallocate(Slepc_v%Vo) - call PARALLEL_Haydock_VEC_COMMs('reset') + if(allocated(Slepc_v%Vi).and.allocated(Slepc_v%Vo)) then + call BS_HAYVEC_free(Slepc_v%Vi) + call BS_HAYVEC_free(Slepc_v%Vo) + deallocate(Slepc_v%Vi) + deallocate(Slepc_v%Vo) + call PARALLEL_Haydock_VEC_COMMs('reset') + endif endif ! call SlepcFinalize(ierr) diff --git a/src/bse/NL_project.dep b/src/bse/NL_project.dep index ea7b3d87f8..7bef4cdefd 100644 --- a/src/bse/NL_project.dep +++ b/src/bse/NL_project.dep @@ -1,5 +1,4 @@ K_diago_driver.o K_driver_init.o K_observables.o - objects.o From 37381d299c47d7adc7910c887a747bda9f55523b Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Nov 2025 16:41:16 +0100 Subject: [PATCH 1326/1367] Version 5.3.0, Revision 26300, Hash 7e71a6dff9 MODIFIED * include/version/version.m4 bse/K_IP_sort.F bse/K_diago_response_functions.F exc-ph/EXCPH_lifetime.F modules/SET_defaults.F modules/mod_BS_solvers.F Bugs: - Additions: - Changes: -Better coding, a single threasold for exicton degeneracy Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/bse/K_IP_sort.F | 4 ++-- src/bse/K_diago_response_functions.F | 4 ++-- src/exc-ph/EXCPH_lifetime.F | 11 +++++------ src/modules/SET_defaults.F | 3 ++- src/modules/mod_BS_solvers.F | 3 +++ 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 3b5d464277..c757615099 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26301 h.7613b31c67, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26302 h.7e71a6dff9, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26301" -SHASH="7613b31c67" +SREVISION="26302" +SHASH="7e71a6dff9" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/bse/K_IP_sort.F b/src/bse/K_IP_sort.F index b11ed6a924..1ac252e070 100644 --- a/src/bse/K_IP_sort.F +++ b/src/bse/K_IP_sort.F @@ -15,8 +15,8 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) use parallel_m, ONLY:PAR_COM_eh_INDEX,PAR_COM_Xk_ibz_INDEX use X_m, ONLY:BS_E_sorted,N_BS_E_sorted,BS_E_sorted_indx use BS, ONLY:BS_H_dim,l_BS_esort_indx + use BS_solvers, ONLY:deg_exc_thrshld use vec_operate, ONLY:sort,degeneration_finder - use units, ONLY:HA2EV use parallel_int, ONLY:PP_redux_wait use y_memory_alloc ! @@ -61,7 +61,7 @@ subroutine K_IP_sort(what,I,N,Indexes,vI,El,vC) ! ! Threshold is 1meV call degeneration_finder(EDIM,first_el,n_of_el,n_deg_grp,& - & Er=vR(:EDIM),deg_accuracy=0.001_SP/HA2EV,Include_single_values=.TRUE.) + & Er=vR(:EDIM),deg_accuracy=deg_exc_thrshld,Include_single_values=.TRUE.) ! if (any(n_of_el(:)>18)) call warning("More than 18 degenerate transitions detected. Printing only first 18") ! diff --git a/src/bse/K_diago_response_functions.F b/src/bse/K_diago_response_functions.F index 9651208349..421ac07e27 100644 --- a/src/bse/K_diago_response_functions.F +++ b/src/bse/K_diago_response_functions.F @@ -22,7 +22,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ use LIVE_t, ONLY:live_timing use BS, ONLY:BS_perturbative_SOC,BS_res_ares_n_mat,l_BS_abs,l_BS_jdos,l_BS_esort,& & BS_K_anti_resonant,l_BS_ares_from_res,BS_K_coupling - use BS_solvers, ONLY:BSS_n_eig,Co_factor + use BS_solvers, ONLY:BSS_n_eig,Co_factor,deg_exc_thrshld use R_lattice, ONLY:bare_qpg,q0_def_norm use units, ONLY:HA2EV use vec_operate, ONLY:degeneration_finder,sort @@ -235,7 +235,7 @@ subroutine K_diago_response_functions(iq,i_BS_mat,W,BS_E,BS_R_left_abs,BS_R_righ allocate(n_of_exc(EDIM)) ! Threshold is 1meV call degeneration_finder(EDIM,first_exc,n_of_exc,n_deg_grp,& - & Er=vtmpR(i1:i1-1+EDIM),deg_accuracy=0.001_SP/HA2EV,Include_single_values=.TRUE.) + & Er=vtmpR(i1:i1-1+EDIM),deg_accuracy=deg_exc_thrshld,Include_single_values=.TRUE.) EDIM=min(BSS_n_eig-i1+1,1000) do i_VAR=1,nVAR BS_E_sorted(:,i_VAR,2)=cZERO diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 9f84283168..98f403f302 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -26,12 +26,13 @@ subroutine EXCPH_lifetime(k,q,X) & RESIDUALS_and_EIGENVALUES_alloc,RESIDUALS_and_EIGENVALUES_free,alphaQ, & & l_EXCPH_offdiago,EXCPH_Gkkp,EXC_LineWidth use ELPH, ONLY:use_PH_DbGd,elph_branches,FAN_deltaE_treshold,Q_io_map + use BS_solvers, ONLY:deg_exc_thrshld use vec_operate, ONLY:degeneration_finder,iku_v_norm,iku_v_2D_norm use frequency, ONLY:w_samp use stderr, ONLY:intc - use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset - use parallel_int, ONLY:PP_redux_wait,PARALLEL_index - use LIVE_t, ONLY:live_timing + use parallel_m, ONLY:PP_indexes,myid,PP_indexes_reset + use parallel_int, ONLY:PP_redux_wait,PARALLEL_index + use LIVE_t, ONLY:live_timing ! use y_memory_alloc ! @@ -41,8 +42,6 @@ subroutine EXCPH_lifetime(k,q,X) type(bz_samp) ::k,q type(X_t) ::X ! - real(SP), parameter :: deg_exc_thrs = 0.001/HA2EV - ! ! Work space ! integer :: ID_exc_gkkp,ID_gkkp,io_err,IO_ACT @@ -110,7 +109,7 @@ subroutine EXCPH_lifetime(k,q,X) ! call degeneration_finder(n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& & Er=BS_all_E(EXCPH_states(1):EXCPH_states(2),1),& - & deg_accuracy=deg_exc_thrs,Include_single_values=.true.) + & deg_accuracy=deg_exc_thrshld,Include_single_values=.true.) ! do igrp=1,n_deg_grp j_alpha=first_exc_grp(igrp)+EXCPH_states(1)-1 diff --git a/src/modules/SET_defaults.F b/src/modules/SET_defaults.F index f98d58686d..c943a557d3 100644 --- a/src/modules/SET_defaults.F +++ b/src/modules/SET_defaults.F @@ -49,7 +49,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) & Haydock_threshold,Haydock_iterIO,Haydock_iterMAX,BSS_uses_DbGd,BSS_Wd,BSS_n_eig,BSS_n_eig_Input,& & BSS_damp_reference,BSS_Vnl_included,BSS_uses_GreenF,BSS_inversion_mode,BSS_target_E,& & BSS_perturbative_width,K_INV_EPS,K_INV_PL,K_INV_PI_PH,BSS_desc,BSS_ldiago_solver,BSS_trange_E,& -& BSS_kernel_IO_on_the_fly,BSS_kernel_stored_size,BSS_kernel_last_stored_block +& BSS_kernel_IO_on_the_fly,BSS_kernel_stored_size,BSS_kernel_last_stored_block,deg_exc_thrshld use descriptors,ONLY:IO_desc_reset #if defined _SLEPC && !defined _NL use BS_solvers, ONLY:BSS_slepc_extraction,BSS_slepc_ncv,BSS_slepc_tol,BSS_slepc_maxit,& @@ -492,6 +492,7 @@ subroutine SET_defaults(INSTR,IND,OD,COM_DIR) BSS_target_E=0._SP BSS_trange_E=-1._SP/HA2EV MAX_BSK_LIN_size=45000*45000 ! 46341 is the sqare root of the maximum integer in IP: 2147483647 + deg_exc_thrshld=0.001_SP/HA2EV ! call IO_desc_reset(BSS_desc) ! diff --git a/src/modules/mod_BS_solvers.F b/src/modules/mod_BS_solvers.F index 00b4c6a4b7..9bcfbaacf1 100644 --- a/src/modules/mod_BS_solvers.F +++ b/src/modules/mod_BS_solvers.F @@ -156,6 +156,9 @@ module BS_solvers complex(SP), allocatable :: BS_diagonal(:) complex(SP), allocatable :: BS_mat(:,:) ! + ! Eigenvalues degeneracy treshold + real(SP) :: deg_exc_thrshld + ! interface ! integer function variables_BS(ID,iq,local_desc,CLOSE_the_menu,X) From 0f2d6b8b8c3210d925b4baeaef6833fde7340e92 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 26 Nov 2025 19:05:31 +0100 Subject: [PATCH 1327/1367] Version 5.3.0, Revision 26301, Hash 37381d299 MODIFIED * include/version/version.m4 modules/mod_functions.F Bugs: - Additions: -Lorentzian double precision, improve excph-tests Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/modules/mod_functions.F | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index c757615099..694743e76a 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26302 h.7e71a6dff9, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26303 h.37381d299, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26302" -SHASH="7e71a6dff9" +SREVISION="26303" +SHASH="37381d299" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/modules/mod_functions.F b/src/modules/mod_functions.F index 65f64f7e6d..f1f080d3d8 100644 --- a/src/modules/mod_functions.F +++ b/src/modules/mod_functions.F @@ -106,13 +106,21 @@ pure function Lorentzian_func(x, damp) ! From Mathworld ! https://mathworld.wolfram.com/LorentzianFunction.html ! - use pars, ONLY:pi + use pars, ONLY:DP,pi real(SP), intent(in) :: x,damp real(SP) :: Lorentzian_func ! - Lorentzian_func=1.0/pi*(0.5*damp)/(x**2+(0.5*damp)**2) + ! Double-precision temporaries + real(DP) :: xd, dd, val ! - end + xd = real(x, DP) + dd = real(damp, DP) + ! + val = (0.5_DP * dd) / (xd*xd + (0.5_DP*dd)**2) / real(pi, DP) + ! + Lorentzian_func = real(val, SP) + ! + end function Lorentzian_func ! ! Fermi functions !----------------- From 642bdfbc0fb3de63f9b7d9caaed74a29c9dd87ce Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 27 Nov 2025 01:24:10 +0100 Subject: [PATCH 1328/1367] More proper fix to issue #241 : handling of allocations and parallelization init made more symmetric in slepc solver Initialization of LA with scalapack called only when old diago solver is used in BSE. New diago solver has his own parallelization. --- src/bse/K_diago_driver.F | 50 ++++++++++++++++++++++++------------ src/bse/K_inversion_driver.F | 6 ++++- src/bse/K_shell_matrix.F | 19 ++++---------- src/bse/K_solvers.F | 19 ++------------ 4 files changed, 45 insertions(+), 49 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 6d92a68856..c6bb502904 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -26,7 +26,7 @@ subroutine K_diago_driver(iq,W,X_static) use stderr, ONLY:intc use units, ONLY:HA2EV use BS, ONLY:BS_K_coupling,BS_H_dim,BS_K_dim,BS_perturbative_SOC,& -& BS_res_ares_n_mat,l_BS_ares_from_res,& +& BS_res_ares_n_mat,l_BS_ares_from_res,BS_nT_grps,& & l_BS_abs,l_BS_kerr,l_BS_kerr_asymm,l_BS_magnons,l_BS_photolum,l_BS_dichroism,& & l_BS_mespin,l_BS_meorb use BS_solvers, ONLY:io_BSS_diago,BSS_perturbative_width,BSS_mode,BSS_resize_only,BSS_resize_and_save,BSS_n_eig_Input, & @@ -46,6 +46,7 @@ subroutine K_diago_driver(iq,W,X_static) use IO_m, ONLY:REP,VERIFY,OP_WR_CL,OP_RD_CL use parser_m, ONLY:parser use timing_m, ONLY:timing + use parallel_m, ONLY:CPU_structure use parallel_int, ONLY:PP_wait #if defined _SLEPC && !defined _NL use petscsys @@ -55,7 +56,7 @@ subroutine K_diago_driver(iq,W,X_static) ! use interfaces, ONLY:MATRIX_slepc use BS_solvers, ONLY:BSS_slepc_approach,BSS_slepc_matrix_format,& -& Slepc_v,BS_HAYVEC_free +& Slepc_v,BS_HAYVEC_free,BS_HAYVEC_alloc #endif use y_memory_alloc ! @@ -217,6 +218,8 @@ subroutine K_diago_driver(iq,W,X_static) ! #if defined _SLEPC && !defined _NL if(l_slepc) then + ! + call K_slepc_local_init() ! if (index(BSS_slepc_matrix_format,"shell")>0) then ! 1. Here we will define a PetscShell matrix and define the matrix-vector multiplication @@ -318,10 +321,9 @@ subroutine K_diago_driver(iq,W,X_static) #if defined _SLEPC && !defined _NL ! if (l_slepc) then + call K_slepc_local_free() ! BSS_n_eig could be lowered by MATRIX_slepc if (BSS_n_eig_before_solver>BSS_n_eig) call K_slepc_resize_variables() - ! Destroy the matrix - call MatDestroy(slepc_mat,ierr) endif ! #endif @@ -459,6 +461,8 @@ subroutine K_diago_driver(iq,W,X_static) #endif endif ! + ! CLEAN + ! YAMBO_FREE(BS_E) call local_free( ) ! @@ -467,12 +471,6 @@ subroutine K_diago_driver(iq,W,X_static) ! Initialize & write the output file !==================================== call K_OUTPUT(iq,W,"open dump close "//trim(Solver),"ALL") - ! - ! CLEAN - ! -#if defined _SLEPC && !defined _NL - if(l_slepc) call K_slepc_local_free() -#endif ! call timing(trim(Solver)//' Solver',OPR='stop') ! @@ -708,6 +706,9 @@ subroutine K_local_init() endif #endif ! + ! LA for old diago solver + if (l_diago) call PARALLEL_assign_LA_COMMs("Response_T_space",DIAGO,CPU_structure(4)%nCPU_lin_algebra_DIAGO) + ! end subroutine K_local_init ! subroutine BSS_n_eig_init() @@ -779,20 +780,35 @@ subroutine BSS_n_eig_init() end subroutine BSS_n_eig_init ! #if defined _SLEPC && !defined _NL + ! + subroutine K_slepc_local_init() + integer :: domk(BS_nT_grps) + ! + if (BSS_slepc_matrix_format=='shell') then + call PARALLEL_Haydock_VEC_COMMs('assign') + allocate(Slepc_v%Vi(BS_nT_grps)) + allocate(Slepc_v%Vo(BS_nT_grps)) + domk=1 + call BS_HAYVEC_alloc(Slepc_v%Vi,domk) + call BS_HAYVEC_alloc(Slepc_v%Vo,domk) + endif + ! + end subroutine K_slepc_local_init ! subroutine K_slepc_local_free() ! if (BSS_slepc_matrix_format=='shell') then - if(allocated(Slepc_v%Vi).and.allocated(Slepc_v%Vo)) then - call BS_HAYVEC_free(Slepc_v%Vi) - call BS_HAYVEC_free(Slepc_v%Vo) - deallocate(Slepc_v%Vi) - deallocate(Slepc_v%Vo) - call PARALLEL_Haydock_VEC_COMMs('reset') - endif + call BS_HAYVEC_free(Slepc_v%Vi) + call BS_HAYVEC_free(Slepc_v%Vo) + deallocate(Slepc_v%Vi) + deallocate(Slepc_v%Vo) + call PARALLEL_Haydock_VEC_COMMs('reset') endif ! + ! Destroy the matrix + call MatDestroy(slepc_mat,ierr) call SlepcFinalize(ierr) + ! end subroutine K_slepc_local_free #endif ! diff --git a/src/bse/K_inversion_driver.F b/src/bse/K_inversion_driver.F index bca34dbdfc..f1c8fa270f 100644 --- a/src/bse/K_inversion_driver.F +++ b/src/bse/K_inversion_driver.F @@ -23,7 +23,9 @@ subroutine K_inversion_driver(iq,W,E,k,q) use com, ONLY:isec,msg use LIVE_t, ONLY:live_timing use parallel_int, ONLY:PP_wait,PP_redux_wait,PARALLEL_index,PARALLEL_live_message - use parallel_m, ONLY:PP_indexes,PP_indexes_reset,PAR_COM_SLK_INDEX_local,PAR_COM_SLK_INDEX_local + use parallel_m, ONLY:PP_indexes,PP_indexes_reset,PAR_COM_SLK_INDEX_local,PAR_COM_SLK_INDEX_local,& +& CPU_structure + use linear_algebra, ONLY:INV use IO_int, ONLY:io_control use IO_m, ONLY:REP,NONE,OP_WR_CL use matrix, ONLY:MATRIX_reset @@ -77,6 +79,8 @@ subroutine K_inversion_driver(iq,W,E,k,q) ! call timing('Inversion Solver',OPR='start') ! + call PARALLEL_assign_LA_COMMs("Response_T_space",INV,CPU_structure(4)%nCPU_lin_algebra_INV) + ! ! Sectioning !============ if (isec(2)/=0) sec="=" diff --git a/src/bse/K_shell_matrix.F b/src/bse/K_shell_matrix.F index 9c54e6e2cc..0fec7d9b8e 100644 --- a/src/bse/K_shell_matrix.F +++ b/src/bse/K_shell_matrix.F @@ -19,17 +19,14 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) ! Create a PETSC ShellMatrix and define the matrix-vector product ! function using the routine K_multiply_by_V ! - use BS, ONLY:BS_H_dim, BS_nT_grps,BS_res_ares_n_mat,BS_K_coupling,& -& BS_Blocks_symmetrize_K,l_BS_ares_from_res - use BS_solvers, ONLY:BSS_kernel_IO_on_the_fly,BSS_slepc_pseudo_herm - ! ! | (K_r) (cI*K_c) | ! K = | | ! | (-cI*K_c^*) (-K_r^*) | ! - use BS_solvers, ONLY:Slepc_v,BS_HAYVEC_alloc - ! - ! + use BS, ONLY:BS_H_dim,BS_res_ares_n_mat,BS_K_coupling,& +& BS_Blocks_symmetrize_K,l_BS_ares_from_res + use BS_solvers, ONLY:BSS_kernel_IO_on_the_fly,BSS_slepc_pseudo_herm + use BS_solvers, ONLY:Slepc_v use petscmat use slepceps use petscmatdef @@ -42,7 +39,7 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) Mat, intent(out) :: slepc_mat Mat :: slepc_mat_R,slepc_mat_C ! - integer :: i_B,domk(BS_nT_grps) + integer :: i_B PetscInt :: SL_H_dim,SL_K_dim PetscErrorCode :: ierr external K_multiply_by_V_slepc @@ -56,13 +53,7 @@ subroutine K_shell_matrix(i_BS_mat,slepc_mat) ! ! Allocate haydock vectors ! - call PARALLEL_Haydock_VEC_COMMs('assign') Slepc_v%it=1 - allocate(Slepc_v%Vi(BS_nT_grps)) - allocate(Slepc_v%Vo(BS_nT_grps)) - domk=1 - call BS_HAYVEC_alloc(Slepc_v%Vi,domk) - call BS_HAYVEC_alloc(Slepc_v%Vo,domk) ! ! Allocate slepc shell matrix ! diff --git a/src/bse/K_solvers.F b/src/bse/K_solvers.F index bff29a7860..374217ea55 100644 --- a/src/bse/K_solvers.F +++ b/src/bse/K_solvers.F @@ -23,7 +23,6 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) & l_BS_mespin,l_BS_meorb,l_BS_jdos use parallel_m, ONLY:master_cpu,CPU_structure use IO_int, ONLY:IO_and_Messaging_switch - use linear_algebra, ONLY:INV,DIAGO use PHOTOLUM, ONLY:BSS_PL_free use MAGNONS, ONLY:BSS_MAGN_free use DICHROISM, ONLY:BSS_DICH_free,BSS_MEspin_free,BSS_MEorb_free @@ -69,25 +68,11 @@ subroutine K_solvers(iq,Ken,Xk,q,X_static,W_bss) ! ! Diagonalization ! - if (run_Diago) then - ! - call PARALLEL_assign_LA_COMMs("Response_T_space",DIAGO,CPU_structure(4)%nCPU_lin_algebra_DIAGO) - ! - call K_diago_driver(iq,W_bss,X_static) - ! - endif - ! - if (run_Slepc) call K_diago_driver(iq,W_bss,X_static) + if (run_Diago .or. run_Slepc) call K_diago_driver(iq,W_bss,X_static) ! ! Inversion ! - if (run_inversion) then - ! - call PARALLEL_assign_LA_COMMs("Response_T_space",INV,CPU_structure(4)%nCPU_lin_algebra_INV) - ! - call K_inversion_driver(iq,W_bss,Ken,Xk,q) - ! - endif + if (run_inversion) call K_inversion_driver(iq,W_bss,Ken,Xk,q) ! ! CLEAN: diago/invertion workspace ! From c0d7ce97c677aa993ce99dde97df4c1ef489060e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 27 Nov 2025 01:51:47 +0100 Subject: [PATCH 1329/1367] Ldiago version updated to 0.5.1 --- lib/archive/package.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/archive/package.list b/lib/archive/package.list index 96b916a747..0545af825e 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -27,7 +27,7 @@ keep_hdf5=no # # package versions # -version_Ldiago=0.5.0 +version_Ldiago=0.5.1 version_iotk=y1.2.2 version_netcdf=4.9.3 version_netcdff=4.6.2 From 7ab30e025bba21fa1d871ea37fbe6bab81819abb Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 27 Nov 2025 09:55:51 +0100 Subject: [PATCH 1330/1367] Version 5.3.0, Revision 26304, Hash c0d7ce97c MODIFIED * include/version/version.m4 exc-ph/EXCPH_lifetime.F Bugs: - Additions: -Just additional comments Changes: - Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- src/exc-ph/EXCPH_lifetime.F | 19 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 694743e76a..8255305cd1 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26303 h.37381d299, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26304 h.c0d7ce97c, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26303" -SHASH="37381d299" +SREVISION="26304" +SHASH="c0d7ce97c" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/exc-ph/EXCPH_lifetime.F b/src/exc-ph/EXCPH_lifetime.F index 98f403f302..57407c1afe 100644 --- a/src/exc-ph/EXCPH_lifetime.F +++ b/src/exc-ph/EXCPH_lifetime.F @@ -55,6 +55,7 @@ subroutine EXCPH_lifetime(k,q,X) real(SP) , allocatable :: EXC_life_of_q(:,:),EXC_pole_of_q(:,:) type(PP_indexes)::px ! + ! Initialization call parser('NoMatrxEl',l_no_matrix_elements) call parser('KeepDeg', l_keep_deg) call parser('ExtendOutput', l_extend_output) @@ -89,17 +90,14 @@ subroutine EXCPH_lifetime(k,q,X) do iq=1,q%nibz call EXCPH_load_L(iq,X,'eigenvalues','Lout') BS_all_E(:,iq)=real(BS_E(:)) ! I suppose the BSE eigenvalues are real - !write(*,*) iq,BS_all_E(:,iq) enddo ! + ! Apply 2D stretching if requested if(alphaQ/=rZERO) then - ! call msg('rs','Excitonic bands 2D stretching :',alphaQ) - ! do iq=1,q%nibz BS_all_E(:,iq)=BS_all_E(:,iq)+alphaQ*iku_v_2D_norm(q%pt(iq,:3)) enddo - ! endif ! ! Here we find the degenerations of the first n_exc_in values of BS_all_E at gamma @@ -217,16 +215,16 @@ subroutine EXCPH_lifetime(k,q,X) ! write(100+i_alpha,*) i_alpha,EXC_LifeTime(i_alpha) ! DS Debug > ! - enddo + enddo ! i_l ! - enddo + enddo ! i_beta ! - enddo + enddo ! i_alpha ! call live_timing(steps=1) ! - enddo - enddo + enddo ! i_start + enddo ! iq ! call live_timing( ) ! @@ -241,7 +239,7 @@ subroutine EXCPH_lifetime(k,q,X) ! call PP_indexes_reset(px) ! - ! Perform average + ! Average lifetimes over degenerate groups (use input energies BS_E_in) ! call degeneration_finder(n_exc_in,first_exc_grp,n_of_exc_grp,n_deg_grp,& & Er=real(BS_E_in(EXCPH_states(1):EXCPH_states(2))),& @@ -258,6 +256,7 @@ subroutine EXCPH_lifetime(k,q,X) endif enddo ! + ! Convert to final units EXC_LifeTime=EXC_LifeTime*2._SP*pi/real(q%nbz,SP) if (l_EXCPH_offdiago) EXC_LineWidth=EXC_LineWidth*2._SP*pi/real(q%nbz,SP) ! From b5fc3ce221079db7322ecc4adf7a9ac087109bd3 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 27 Nov 2025 17:27:53 +0100 Subject: [PATCH 1331/1367] Version 5.3.0, Revision 26305, Hash 7ab30e025b MODIFIED * include/version/version.m4 ypp/excitons/excitons_interpolate_setup.F Bugs: - Additions: - Changes: -Fixed segmentation fault in exciton interpolation issue #242 Patch sent by: Claudio Attaccalite --- include/version/version.m4 | 6 +++--- ypp/excitons/excitons_interpolate_setup.F | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/version/version.m4 b/include/version/version.m4 index 8255305cd1..2c1ebd0801 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,9 +1,9 @@ -AC_INIT(Yambo, 5.3.0 r.26304 h.c0d7ce97c, yambo@yambo-code.org) +AC_INIT(Yambo, 5.3.0 r.26305 h.7ab30e025b, yambo@yambo-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26304" -SHASH="c0d7ce97c" +SREVISION="26305" +SHASH="7ab30e025b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index c9db00caf3..8f5745732e 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -101,6 +101,9 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN if ( l_magnons) Res(:n_eig)=real(BS_R_left_magn(:n_eig,1)*BS_R_right_magn(:n_eig,1),SP) if (.not.l_magnons) Res(:n_eig)=real(BS_R_left(:n_eig)*BS_R_right(:n_eig),SP) call excitons_get_user_states(BS_E_degs(:n_eig),Res(:n_eig),n_eig,.true.) + if(EXC_n_states_ref>size(EXCITONS_user_indexes)) then + call error("Degenerate excitons please increase the State range to : 1-"//intc(EXC_n_states_ref)) + endif do i_c=1,EXC_n_states_ref i_l=EXCITONS_user_indexes(i_c) BS_all_E(i_c,iq)=BS_E(i_l) From 6c94ca5ce11b47875c79bedc5e9d2f11ef3abfe5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 28 Nov 2025 13:22:44 +0100 Subject: [PATCH 1332/1367] SlepcFinalize is called after the loop on i_BS_mat, since SlepcInitialize is called before the loop --- src/bse/K_diago_driver.F | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index c6bb502904..1b7a0ef83b 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -468,6 +468,10 @@ subroutine K_diago_driver(iq,W,X_static) ! enddo ! +#if defined _SLEPC && !defined _NL + if (l_slepc) call SlepcFinalize(ierr) +#endif + ! ! Initialize & write the output file !==================================== call K_OUTPUT(iq,W,"open dump close "//trim(Solver),"ALL") @@ -807,7 +811,6 @@ subroutine K_slepc_local_free() ! ! Destroy the matrix call MatDestroy(slepc_mat,ierr) - call SlepcFinalize(ierr) ! end subroutine K_slepc_local_free #endif From c873270335f1fa9fe82846f700c1ce7ad2084dff Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 28 Nov 2025 14:32:19 +0100 Subject: [PATCH 1333/1367] Error messangin improved when loading BSE kernel for computing collisions --- src/collisions/COLLISIONS_eval.F | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/collisions/COLLISIONS_eval.F b/src/collisions/COLLISIONS_eval.F index 4d92dfda37..5972a252e1 100644 --- a/src/collisions/COLLISIONS_eval.F +++ b/src/collisions/COLLISIONS_eval.F @@ -59,7 +59,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! WorkSpace ! logical :: l_collisions_from_bse,l_tmp - integer :: ID,IO_err,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr,& + integer :: ID,IO_err_COLL,IO_err_BS,IO_ACT,ID_head,ID_mat,ID_cmpr,& & BS_nk_bz,BS_nk_ibz character(20) :: PAR_ch,FREE_ch ! @@ -149,7 +149,10 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) call io_control(ACTION=RD_CL,COM=NONE,MODE=DUMP,ID=ID_head) IO_err_BS=io_BS_header(1,X(2),ID_head,"full") ! - if (IO_err_BS==0) then + if (IO_err_BS/=0) then + call error("Collisions from BSE, error while reading io_BS_header") + else + !if (IO_err_BS==0) then call set_BS_blks(Xk) call io_control(ACTION=OP_RD,COM=REP,MODE=DUMP,ID=ID_mat) IO_err_BS=io_BS_PAR_init(1,ID_mat,"full") @@ -160,9 +163,11 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) deallocate(BS_kpt_bz) deallocate(BS_kpt_ibz) ! + if (IO_err_BS/=0) call error("Collisions from BSE, error while reading io_BS_PAR") + ! endif ! - if (IO_err/=0) then + if (IO_err_COLL/=0) then ! call COLLISIONS_HXC(X(2),Xk,E,k,q,Xw(2),IO_err_BS,ID_mat) ! @@ -191,7 +196,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! call CHECK_and_ALLOC(P_collisions) ! - if (IO_err/=0) then + if (IO_err_COLL/=0) then ! call COLLISIONS_momentum(E,k,q) ! @@ -223,7 +228,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! call CHECK_and_ALLOC(GW_NEQ_collisions) ! - if (IO_err/=0) then + if (IO_err_COLL/=0) then ! call COLLISIONS_NEQ_GW_static(X(2),Xk,E,k,q,Xw(2)) ! @@ -258,7 +263,7 @@ subroutine COLLISIONS_eval(E,X,k,xk,q,Xw) ! endif ! - if (IO_err==0) return + if (IO_err_COLL==0) return ! FREE_ch="all" ! @@ -288,25 +293,25 @@ subroutine CHECK_and_ALLOC(COLL_grp) ! type(COLLISIONS_group) :: COLL_grp ! - IO_err=-1 + IO_err_COLL=-1 ! if (io_COLLs) then COLL_grp%IO_status=-1 call io_control(ACTION=OP_RD_CL,COM=REP,SEC=(/1/),MODE=VERIFY,ID=ID) - IO_err=io_COLLs_header(ID,COLL_grp) + IO_err_COLL=io_COLLs_header(ID,COLL_grp) #if defined _PAR_IO call io_control(ACTION=OP_RD,COM=REP,SEC=(/1/),ID=ID) - io_err=io_COLLISIONS(ID,COLL_grp) - if(io_err==0) then + io_err_COLL=io_COLLISIONS(ID,COLL_grp) + if(io_err_COLL==0) then call warning(" Restarting from previous database") do i_coll=1,COLL_grp%N IO_ACT=manage_action(RD_CL_IF_END,i_coll,1,COLL_grp%N) call io_control(ACTION=IO_ACT,COM=REP,SEC=(/4/),ID=ID) - io_err=io_COLLISIONS(ID,COLL_grp,i_coll=i_coll) + io_err_COLL=io_COLLISIONS(ID,COLL_grp,i_coll=i_coll) enddo endif #endif - if (any(COLL_grp%IO_status/=1)) IO_err=-1 + if (any(COLL_grp%IO_status/=1)) IO_err_COLL=-1 endif ! ! In case io_Colls is /=0 all CPU have to sincronize before starting @@ -314,7 +319,7 @@ subroutine CHECK_and_ALLOC(COLL_grp) ! call PP_wait() ! - if (IO_err==0) return + if (IO_err_COLL==0) return ! if (io_COLLs) then call COLLISIONS_alloc_and_free(trim(COLL_grp%name),"collision","alloc",1) From 4f6dfb8cd1d02f717f3fb6afc68684571080b66e Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 1 Dec 2025 00:28:11 +0100 Subject: [PATCH 1334/1367] - nullify of pointers moved inside i_BS_mat loop in K_diago_driver - mpi_comm_diago renamed mpi_comm_diago in LDIAGO_driver --- src/bse/K_diago_driver.F | 40 +++++++++++++++++++++++++++------------- src/bse/LDIAGO_driver.F | 6 +++--- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/bse/K_diago_driver.F b/src/bse/K_diago_driver.F index 1b7a0ef83b..6f4a8419a3 100644 --- a/src/bse/K_diago_driver.F +++ b/src/bse/K_diago_driver.F @@ -87,33 +87,33 @@ subroutine K_diago_driver(iq,W,X_static) ! Excitonic hamiltonian, residuals independent !============================================== real(SP),allocatable :: BS_E_real(:) - real(SP) ,pointer :: BS_E_SOC_corr(:,:) => null() + real(SP) ,pointer :: BS_E_SOC_corr(:,:) complex(SP),allocatable :: BS_corrections(:,:) ! ! Coupling complex(SP),allocatable :: BS_mat(:,:) complex(SP),allocatable, target :: BS_V_left(:,:) complex(SP),allocatable, target :: BS_V_right(:,:) - complex(SP),pointer :: BS_overlap(:,:) => null() + complex(SP),pointer :: BS_overlap(:,:) ! ! Residuals, different for each response function !================================================= - complex(SP),pointer :: BS_R_left_abs(:) => null() - complex(SP),pointer :: BS_R_right_abs(:) => null() + complex(SP),pointer :: BS_R_left_abs(:) + complex(SP),pointer :: BS_R_right_abs(:) ! - real(SP), pointer :: BS_R_PL(:,:) => null() + real(SP), pointer :: BS_R_PL(:,:) ! - complex(SP),pointer :: BS_R_left_kerr(:) => null() - complex(SP),pointer :: BS_R_right_kerr(:) => null() - complex(SP),pointer :: BS_R_right_dich(:,:) => null() - complex(SP),pointer :: BS_R_right_mespin(:,:) => null() - complex(SP),pointer :: BS_R_right_meorb(:,:) => null() + complex(SP),pointer :: BS_R_left_kerr(:) + complex(SP),pointer :: BS_R_right_kerr(:) + complex(SP),pointer :: BS_R_right_dich(:,:) + complex(SP),pointer :: BS_R_right_mespin(:,:) + complex(SP),pointer :: BS_R_right_meorb(:,:) ! - complex(SP),pointer :: BS_R_left_magn(:,:) => null() - complex(SP),pointer :: BS_R_right_magn(:,:) => null() + complex(SP),pointer :: BS_R_left_magn(:,:) + complex(SP),pointer :: BS_R_right_magn(:,:) ! ! Temporary pointer - complex(SP),pointer :: tmp_res_ptr(:) => null() + complex(SP),pointer :: tmp_res_ptr(:) ! ! I/O integer :: io_err,ID @@ -722,6 +722,20 @@ subroutine BSS_n_eig_init() ! BSS_n_eig=BSS_n_eig_Input ! + nullify(BS_overlap) + nullify(BS_E_SOC_corr) + nullify(BS_R_right_abs) + nullify(BS_R_left_abs) + nullify(BS_R_right_kerr) + nullify(BS_R_left_kerr) + nullify(BS_R_right_dich) + nullify(BS_R_right_mespin) + nullify(BS_R_right_meorb) + nullify(BS_R_right_magn) + nullify(BS_R_left_magn) + nullify(BS_R_PL) + nullify(tmp_res_ptr) + ! if (l_slepc) then ! if (BSS_n_eig<1) then diff --git a/src/bse/LDIAGO_driver.F b/src/bse/LDIAGO_driver.F index ba5421934a..d0cabe4976 100644 --- a/src/bse/LDIAGO_driver.F +++ b/src/bse/LDIAGO_driver.F @@ -66,7 +66,7 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & ! Local variables type(c_ptr) :: mpicxt, diago_mat, evecs integer :: nProcs, my_rank, neig_tmp - integer(YDIAGO_INT) :: SL_H_dim, ProcX, ProcY, elpa_nthreads, mpi_comm + integer(YDIAGO_INT) :: SL_H_dim, ProcX, ProcY, elpa_nthreads, mpi_comm_diago integer(ERROR_INT) :: error_diago ! diagonalization error code integer :: ierr !! mpi error code integer(YDIAGO_INT) :: neig_found, i_c, i_r, blacs_blk_size @@ -191,9 +191,9 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & blacs_blk_size = 1 #endif - mpi_comm = MPI_COMM_WORLD + mpi_comm_diago = MPI_COMM_WORLD - mpicxt = BLACScxtInit_Fortran('R', mpi_comm, ProcX, ProcY) + mpicxt = BLACScxtInit_Fortran('R', mpi_comm_diago, ProcX, ProcY) if (.not. c_associated(mpicxt)) then call error("Failed to initiate BLACS context") end if From 5e00c2f530f8f68d237feb779b9615b3d063d3d9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 1 Dec 2025 15:11:17 +0100 Subject: [PATCH 1335/1367] Added use mpi to LDIAGO_driver --- src/bse/LDIAGO_driver.F | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bse/LDIAGO_driver.F b/src/bse/LDIAGO_driver.F index d0cabe4976..c3ff5d06ee 100644 --- a/src/bse/LDIAGO_driver.F +++ b/src/bse/LDIAGO_driver.F @@ -31,6 +31,9 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & use LIVE_t, ONLY:live_timing use com, ONLY:msg use ldiago_interface +#if defined _MPI + USE mpi +#endif ! implicit none ! From 3ec622384845e2282dd13d5ba8205c40c7cc83ea Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 2 Dec 2025 18:45:16 +0100 Subject: [PATCH 1336/1367] Lumen version for external user fixed --- config/m4/acx_version.m4 | 1 + config/mk/global/functions/help.mk | 21 +++++-------- config/report.in | 2 +- configure | 49 ++++++++++++++++-------------- include/driver/kind.h | 1 + include/version/version.m4 | 2 +- src/driver/C_driver_transfer.F | 5 +-- src/driver/get_version.c | 12 ++++++-- src/driver/mod_C_driver.F | 4 ++- src/driver/tool_init.c | 3 ++ src/driver/usage.c | 4 +-- src/modules/mod_logo.F | 7 ++--- 12 files changed, 61 insertions(+), 50 deletions(-) diff --git a/config/m4/acx_version.m4 b/config/m4/acx_version.m4 index 162731196b..a1fd71bce1 100644 --- a/config/m4/acx_version.m4 +++ b/config/m4/acx_version.m4 @@ -9,6 +9,7 @@ AC_DEFUN([ACX_VERSION], [ cat << EOF > include/version/version.h #pragma once +#define LUMEN_VERSION "$PACKAGE_STRING" #define YAMBO_VERSION $SVERSION #define YAMBO_SUBVERSION $SSUBVERSION #define YAMBO_PATCHLEVEL $SPATCHLEVEL diff --git a/config/mk/global/functions/help.mk b/config/mk/global/functions/help.mk index df65dec470..3966e210b3 100644 --- a/config/mk/global/functions/help.mk +++ b/config/mk/global/functions/help.mk @@ -46,20 +46,15 @@ define yambo_help fi if [ "$(1)" = "intro" ] ; then \ $(ECHO) "\n *** Interfaces ***\n " ; \ - $(ECHO) " a2y = ABINIT to Yambo interface ";\ - $(ECHO) " p2y = QuantumEspresso to Yambo interface ";\ - $(ECHO) " http://www.yambo-code.eu/wiki/index.php?title=Bulk_material:_h-BN ";\ - $(ECHO) " c2y = CPMD to Yambo interface";\ + $(ECHO) " a2y = Interface with ABINIT ";\ + $(ECHO) " p2y = Interface with QuantumEspresso ";\ $(ECHO) "\n *** Main Components***\n" ;\ - $(ECHO) " yambo = main Yambo code ";\ - $(ECHO) " ypp = Yambo Post Processing utility ";\ + $(ECHO) " yambo = Main executable for GW and BSE ";\ + $(ECHO) " ypp = Post Processing utility ";\ $(ECHO) "\n *** Other projects ***\n" ;\ - $(ECHO) " yambo_sc = Self-consistent (COHSEX, HF, DFT) project";\ - $(ECHO) " yambo_rt = Real-time dynamics project";\ - $(ECHO) " http://www.yambo-code.eu/wiki/index.php?title=Linear_response_from_real_time_simulations";\ - $(ECHO) " yambo_nl = Non-linear optics project ";\ - $(ECHO) " http://www.yambo-code.eu/wiki/index.php?title=Tutorials#Non_linear_response";\ - $(ECHO) " yambo_ph = Electron-phonon coupling project ";\ - $(ECHO) " http://www.yambo-code.eu/wiki/index.php?title=Tutorials#Electron_phonon_coupling\n";\ + $(ECHO) " yambo_sc = Self-consistent module ";\ + $(ECHO) " yambo_rt = Real-time dynamics module ";\ + $(ECHO) " yambo_nl = Non-linear optics module ";\ + $(ECHO) " yambo_ph = Electron-phonon coupling module ";\ fi endef diff --git a/config/report.in b/config/report.in index 95b232b663..06799571a4 100644 --- a/config/report.in +++ b/config/report.in @@ -1,5 +1,5 @@ # -# [VER] @SVERSION@.@SSUBVERSION@ +# Yambo Fork: @PACKAGE_STRING@ # # Legend: [E]=external library [C]=internal lib to be compiled [I]=internal lib already compiled [X]=used [-]=not used # diff --git a/configure b/configure index 788540e1ad..2735b0c6fd 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Yambo 5.3.0 r.25838 h.7622ecbfc9. +# Generated by GNU Autoconf 2.71 for Lumen 2.0.0. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -267,10 +267,10 @@ then : printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and -$0: yambo@yambo-code.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." +$0: https://gitlab.com/lumen-code/lumen/-/issues about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi exit 1 fi @@ -608,12 +608,12 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME='Yambo' -PACKAGE_TARNAME='yambo' -PACKAGE_VERSION='5.3.0 r.25838 h.7622ecbfc9' -PACKAGE_STRING='Yambo 5.3.0 r.25838 h.7622ecbfc9' -PACKAGE_BUGREPORT='yambo@yambo-code.org' -PACKAGE_URL='' +PACKAGE_NAME='Lumen' +PACKAGE_TARNAME='lumen' +PACKAGE_VERSION='2.0.0' +PACKAGE_STRING='Lumen 2.0.0' +PACKAGE_BUGREPORT='https://gitlab.com/lumen-code/lumen/-/issues' +PACKAGE_URL='www.lumen-code.org' ac_default_prefix=$PWD ac_unique_file="driver/yambo.F" @@ -1704,7 +1704,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Yambo 5.3.0 r.25838 h.7622ecbfc9 to adapt to many kinds of systems. +\`configure' configures Lumen 2.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1753,7 +1753,7 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/yambo] + --docdir=DIR documentation root [DATAROOTDIR/doc/lumen] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1770,7 +1770,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Yambo 5.3.0 r.25838 h.7622ecbfc9:";; + short | recursive ) echo "Configuration of Lumen 2.0.0:";; esac cat <<\_ACEOF @@ -1961,7 +1961,8 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . +Lumen home page: . _ACEOF ac_status=$? fi @@ -2025,7 +2026,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Yambo configure 5.3.0 r.25838 h.7622ecbfc9 +Lumen configure 2.0.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2654,7 +2655,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Yambo $as_me 5.3.0 r.25838 h.7622ecbfc9, which was +It was created by Lumen $as_me 2.0.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3412,8 +3413,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="25838" -SHASH="7622ecbfc9" +SREVISION="26305" +SHASH="7ab30e025b" @@ -5102,6 +5103,7 @@ fi cat << EOF > include/version/version.h #pragma once +#define LUMEN_VERSION "$PACKAGE_STRING" #define YAMBO_VERSION $SVERSION #define YAMBO_SUBVERSION $SSUBVERSION #define YAMBO_PATCHLEVEL $SPATCHLEVEL @@ -18484,7 +18486,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Yambo $as_me 5.3.0 r.25838 h.7622ecbfc9, which was +This file was extended by Lumen $as_me 2.0.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18540,7 +18542,8 @@ $config_files Configuration headers: $config_headers -Report bugs to ." +Report bugs to . +Lumen home page: ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` @@ -18548,7 +18551,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Yambo config.status 5.3.0 r.25838 h.7622ecbfc9 +Lumen config.status 2.0.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/include/driver/kind.h b/include/driver/kind.h index bba12f44b0..cf6bb3fc67 100644 --- a/include/driver/kind.h +++ b/include/driver/kind.h @@ -16,6 +16,7 @@ typedef struct tool_struct char *bin; char *desc; char version_string[500]; + char lumenver[500]; char hash[500]; char *pj; int version; diff --git a/include/version/version.m4 b/include/version/version.m4 index 2c1ebd0801..84943b99bb 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -1,4 +1,4 @@ -AC_INIT(Yambo, 5.3.0 r.26305 h.7ab30e025b, yambo@yambo-code.org) +AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.lumen-code.org) SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" diff --git a/src/driver/C_driver_transfer.F b/src/driver/C_driver_transfer.F index 5480f5fa26..94e5bfeae7 100644 --- a/src/driver/C_driver_transfer.F +++ b/src/driver/C_driver_transfer.F @@ -7,7 +7,7 @@ ! subroutine C_driver_transfer() ! - use C_driver, ONLY:code_version,code_revision,code_hash,& + use C_driver, ONLY:code_version,code_revision,code_hash,lumen_version,& & code_libraries,get_version,get_libraries,get_running_tool,& & get_running_project,code_bin,code_tool,code_project ! @@ -22,6 +22,7 @@ subroutine C_driver_transfer() code_libraries=" " call get_libraries(code_libraries) code_hash=" " - call get_version(code_version(1),code_version(2),code_version(3),code_revision,code_hash) + lumen_version=" " + call get_version(lumen_version,code_version(1),code_version(2),code_version(3),code_revision,code_hash) ! end subroutine diff --git a/src/driver/get_version.c b/src/driver/get_version.c index ff48ab494e..da9913af06 100644 --- a/src/driver/get_version.c +++ b/src/driver/get_version.c @@ -21,9 +21,10 @@ struct tool_struct versions() t.patchlevel = YAMBO_PATCHLEVEL; t.revision = YAMBO_REVISION; sprintf(t.hash, "%s", YAMBO_HASH); + sprintf(t.lumenver, "%s", LUMEN_VERSION); return (t); } -void C_FUNC(get_version, GET_VERSION)(int *version, int *subversion, +void C_FUNC(get_version, GET_VERSION)(char *lumenver, int *version, int *subversion, int *patchlevel, int *revision, char *hash) { @@ -33,7 +34,12 @@ void C_FUNC(get_version, GET_VERSION)(int *version, int *subversion, *subversion = t.subversion; *patchlevel = t.patchlevel; *revision = t.revision; + strcpy(hash, t.hash); - int len = strlen(t.hash); - hash[len] = hash[len + 1]; + int ylen = strlen(t.hash); + hash[ylen] = hash[ylen + 1]; + + strcpy(lumenver, t.lumenver); + int llen = strlen(t.lumenver); + lumenver[llen] = lumenver[llen + 1]; } diff --git a/src/driver/mod_C_driver.F b/src/driver/mod_C_driver.F index 33a039e78a..64ff428a21 100644 --- a/src/driver/mod_C_driver.F +++ b/src/driver/mod_C_driver.F @@ -18,10 +18,12 @@ module C_driver character(50):: code_hash character(50):: code_libraries character(50):: code_branch + character(50):: lumen_version ! interface ! - subroutine get_version(version,subversion,patchlevel,revision,hash) + subroutine get_version(lumenver,version,subversion,patchlevel,revision,hash) + character(*), intent(out):: lumenver integer , intent(out):: version integer , intent(out):: subversion integer , intent(out):: patchlevel diff --git a/src/driver/tool_init.c b/src/driver/tool_init.c index 778ea978ab..7081d8b227 100644 --- a/src/driver/tool_init.c +++ b/src/driver/tool_init.c @@ -93,7 +93,10 @@ struct tool_struct tool_init() { pj = " "; } + /* sprintf(t.version_string, "%i.%i.%i Revision %i Hash %s", t.version, t.subversion, t.patchlevel, t.revision, t.hash); + */ + sprintf(t.version_string, "Fork %s", t.lumenver); return (t); }; diff --git a/src/driver/usage.c b/src/driver/usage.c index 21c2e28505..b16f00d0c2 100644 --- a/src/driver/usage.c +++ b/src/driver/usage.c @@ -148,7 +148,7 @@ void usage(options_struct *options, struct tool_struct t, char *what, fprintf(stderr, "\n"); fprintf(stderr, "%s\n\n", - " YAMBO developers group (http://www.yambo-code.eu)"); + " Lumen developers group (http://www.lumen-code.org)"); } else if (strcmp(what, "version") == 0) { @@ -222,6 +222,6 @@ void usage(options_struct *options, struct tool_struct t, char *what, } fprintf(stderr, "\n\n"); fprintf(stderr, "%s\n\n", - " YAMBO developers group (http://www.yambo-code.eu)"); + " Lumen developers group (http://www.lumen-code.org)"); } }; diff --git a/src/modules/mod_logo.F b/src/modules/mod_logo.F index 87642a1e7b..099057e4ec 100644 --- a/src/modules/mod_logo.F +++ b/src/modules/mod_logo.F @@ -41,7 +41,8 @@ integer function pickup_a_random(rand_range) ! subroutine pickup_a_lumen_logo(unit_) ! - use C_driver, ONLY:code_version,code_revision,code_hash,code_libraries,code_branch + use C_driver, ONLY:code_version,code_revision,code_hash,code_libraries,code_branch,& + & lumen_version use pars, ONLY:SP use stderr, ONLY:intc,slash ! @@ -52,9 +53,7 @@ subroutine pickup_a_lumen_logo(unit_) character(schlen) :: comment(4),ch integer :: max_length,i1,left_space,iA,ic ! - comment(1)='Version '//& -& trim(intc(code_version(1)))//'.'//trim(intc(code_version(2)))//& -& '.'//trim(intc(code_version(3)))//' Revision '//trim(intc(code_revision))//' Hash (prev commit) '//trim(code_hash) + comment(1)="Fork "//trim(lumen_version) ! comment(2)="Branch is "//trim(code_branch) ! From eefe56678327f02ba167c7d638608736776d2e25 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 2 Dec 2025 18:45:41 +0100 Subject: [PATCH 1337/1367] aesthetic fix: all LOCAL_yCOMM are written in capital --- src/pol_function/X_dielectric_matrix.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pol_function/X_dielectric_matrix.F b/src/pol_function/X_dielectric_matrix.F index 435db2fd6d..f0043e109a 100644 --- a/src/pol_function/X_dielectric_matrix.F +++ b/src/pol_function/X_dielectric_matrix.F @@ -418,7 +418,7 @@ subroutine elemental_IO(iq_,this_is_Xo) SEC =(/1,1/) if (iq_>0) SEC=(/2*iq_,2*iq_+1/) ! - call io_control(ACTION=OP_APP_CL,COM=COM,SEC=SEC,ID=ID(idb),COMM=local_yMPI_COMM,DO_IT=condition) + call io_control(ACTION=OP_APP_CL,COM=COM,SEC=SEC,ID=ID(idb),COMM=LOCAL_yMPI_COMM,DO_IT=condition) i_err=io_X(X,Xw,ID(idb)) ! if (this_is_Xo) then From 4d974df49115d1b3979a68d297b3f48a6feef999 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 3 Dec 2025 00:28:08 +0100 Subject: [PATCH 1338/1367] AUTHORS file updated --- AUTHORS | 71 +++++++++++++++++++++++++++------------------------------ 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/AUTHORS b/AUTHORS index a5dfc102ae..481c5d36d0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,48 +1,45 @@ -ACTIVE DEVELOPERS -================== - - NAME SURNAME (INITIALS) (since year) - ------------ ---------- ------------ - * Myrta Gruening (MG) (2004) - * Daniele Varsano (DV) (2004) - * Conor Hogan (CH) (2005) - * Maurizia Palummo (MP) (2005) - * Claudio Attaccalite (CA) (2009) - * Davide Sangalli (DS) (2009) - * Elena Cannuccia (EC) (2011) - * Andrea Ferretti (AF) (2013) - * Alejandro Molina-Sánchez (AMS) (2015) - * Miki Bonacci (MB) (2018) - * Dario Alejandro Leon-Valido (DALV) (2018) - * Fulvio Paleari (FP) (2018) - * Nicola Spallanzani (NS) (2019) - * Pino D’Amico (PDA) (2020) - * Alberto Guandalini (AG) (2020) - * Riccardo Reho (RR) (2022) - * Giacomo Sesti (GS) (2022) - * Nalabothula Muralidhar (NM) (2024) - * Torsten Geirsson (TG) (2025) - -FORMER DEVELOPERS -================== +DEVELOPERS +=========== NAME SURNAME (INITIALS) (period of activity) ------------ ---------- -------------------- + * Davide Sangalli (DS) (2009-NOW) * Andrea Marini (AM) (2001-2025) - * David Kammerlader (DK) (2010-2012) - * Fabio Affinito (FA) (2013-2019) - * Pedro Melo (PM) (2013-2022) - * Ivan Marri (IM) (2014-2018) - * Margherita Marsili (MM) (2014-2022) - * Mike Atambo (MA) (2015-2018) - * Pietro Bonfa’ (PB) (2015-2018) - * Ryan McMillan (RM) (2015-2017) - * Antimo Marrazzo (AR) (2016-2020) + * Claudio Attaccalite (CA) (2009-NOW) + * Andrea Ferretti (AF) (2013-NOW) * Henrique Miranda (HM) (2016-2018) - * Elena Molteni (EM) (2019-2021) + * Daniele Varsano (DV) (2004-NOW) + * Fulvio Paleari (FP) (2018-NOW) + * Conor Hogan (CH) (2005-2015) + * Nalabothula Muralidhar (NM) (2024-NOW) + * Alberto Guandalini (AG) (2020-2023) + * Myrta Gruening (MG) (2004-NOW) + * Nicola Spallanzani (NS) (2019-NOW) + * Miki Bonacci (MB) (2018-2020) + * Dario Alejandro Leon-Valido (DALV) (2018-2024) + * Riccardo Reho (RR) (2022-NOW) * Ignacio Martin Alliati (IMA) (2020-2024) + * Pedro Melo (PM) (2013-2022) * Blanca Mellado Pinto (BM) (2023-2025) + * Elena Molteni (EM) (2019-2021) + * Alejandro Molina-Sánchez (AMS) (2015-2022) + * Ivan Marri (IM) (2014-2019) + * Pietro Bonfa’ (PB) (2018-2018) + * Giacomo Rossi (GR) (2023-NOW) + * Ryan McMillan (RM) (2015-2015) + * Antimo Marrazzo (AR) (2016-2020) + * Laura Bellentani (LB) (2024-NOW) + * Giacomo Sesti (GS) (2022-NOW) + * Petru Milev (PMI) (2025-NOW) + * Torsten Geirsson (TG) (2025-NOW) + * Margherita Marsili (MM) (2014-2022) + * Pino D’Amico (PDA) (2020-2021) + * Maurizia Palummo (MP) (2005-2020) + * Elena Cannuccia (EC) (2011-2020) + * Fabio Affinito (FA) (2013-2019) + * Mike Atambo (MA) (2015-2018) + * David Kammerlader (DK) (2010-2012) ACKNOWLEDGEMENTS ================= From c0d959e4c50fc3022bd44a281cbdc6000b5b8a4e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 3 Dec 2025 10:20:00 +0100 Subject: [PATCH 1339/1367] Version 5.3.0, Revision 26318, Hash 4d974df491 MODIFIED * configure include/version/version.m4 nloptics/NL_initialize.F Bugs: - Additions: - Changes: -Empty commit just to make a test Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/nloptics/NL_initialize.F | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 2735b0c6fd..dd9db7d5f7 100755 --- a/configure +++ b/configure @@ -3413,8 +3413,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26305" -SHASH="7ab30e025b" +SREVISION="26318" +SHASH="4d974df491" diff --git a/include/version/version.m4 b/include/version/version.m4 index 84943b99bb..0fe718e5df 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26305" -SHASH="7ab30e025b" +SREVISION="26318" +SHASH="4d974df491" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_initialize.F b/src/nloptics/NL_initialize.F index 81dfd651ff..17b6bcf18a 100644 --- a/src/nloptics/NL_initialize.F +++ b/src/nloptics/NL_initialize.F @@ -1,4 +1,4 @@ -! +! ! License-Identifier: GPL ! ! Copyright (C) 2016 The Yambo Team @@ -91,6 +91,7 @@ subroutine NL_initialize(E,k) ! Velocity gauge mode ! ======================================= l_velocity_IPA=.FALSE. + ! if(trim(global_gauge)=='velocity') then ! ! Turn on current From e52343d2d4044ea05b73c72e37f41313207f93e5 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 3 Dec 2025 21:06:06 +0100 Subject: [PATCH 1340/1367] Workaround for issue #244 --- src/dipoles/DIPOLE_kb_sum.F | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dipoles/DIPOLE_kb_sum.F b/src/dipoles/DIPOLE_kb_sum.F index ea4b01f79e..a092032597 100644 --- a/src/dipoles/DIPOLE_kb_sum.F +++ b/src/dipoles/DIPOLE_kb_sum.F @@ -108,9 +108,13 @@ subroutine DIPOLE_kb_sum(rho,pp_dim_yambo,ib_range,iv,ic,XX) !DEV_ACC_DEBUG end data ! call devxlib_memcpy_d2h(drho_loc,drho) - do concurrent (i1=1:3) - rho(i1)=rho(i1)+sum(drho_loc(:,i1,:)) - enddo + ! + ! Code commented due to fail with intel compiler + ! See issue https://gitlab.com/lumen-code/lumen/-/issues/244 + !do concurrent (i1=1:3) + ! rho(i1)=rho(i1)+sum(drho_loc(:,i1,:)) + !enddo + forall (i1=1:3) rho(i1)=rho(i1)+sum(drho_loc(:,i1,:)) ! end subroutine DIPOLE_kb_sum From c772d3f92fca07a4b760c5e22a4aaad7ae3f2d30 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 4 Dec 2025 12:30:29 +0100 Subject: [PATCH 1341/1367] do concurrent removed. This is a revert of Merge !267 --- src/acfdt/acfdt_tot_energy.F | 4 +--- src/bse/K_inversion_Lo.F | 6 ++---- src/bse/K_multiply_by_V.F | 4 +--- src/bse/K_multiply_by_V_transpose.F | 4 +--- src/bse/K_screened_interaction.F | 4 +--- src/collisions/COLLISIONS_NEQ_GW_static.F | 4 +--- src/collisions/OSCLL_compose_vbands.F | 10 ++++------ src/common/FREQUENCIES_coarse_grid.F | 4 ++-- src/common/FREQUENCIES_setup.F | 4 +--- src/common/G_rot_grid.F | 8 ++------ src/common/OBS_rotate.F | 4 +--- src/common/eval_Gradient.F | 4 +--- src/coulomb/cutoff_cylinder.F | 4 +--- src/coulomb/cutoff_ws.F | 4 +--- src/dipoles/DIPOLE_kb_sum.F | 1 + src/el-ph/ELPH_Sigma_c.F | 8 +++----- src/el-ph/ELPH_gsqF_to_Sigma.F | 4 +--- src/exc-ph/EXCPH_gkkp_eval.F | 5 ++--- src/hamiltonian/V_real_space_to_H.F | 2 +- src/io/io_DB1_selective_scan.F | 4 +--- src/io/io_SC_components.F | 4 +--- src/modules/mod_global_XC.F | 4 +--- src/modules/mod_vec_operate.F | 12 +++--------- src/nloptics/INVINT_step.F | 4 +--- src/nloptics/NL_driver.F | 4 +--- src/nloptics/NL_start_and_restart.F | 4 +--- src/qp/QP_mpa.F | 4 +--- src/qp/QP_real_axis.F | 4 +--- src/real_time_hamiltonian/RT_Hamiltonian.F | 4 +--- src/sc/OEP_ApplySigmaCSX.F | 8 ++------ src/sc/OEP_app_inversion.F | 4 +--- src/sc/SC_add_XC.F | 8 ++------ src/sc/SC_driver.F | 16 ++++------------ src/setup/setup.F | 4 +--- src/wf_and_fft/WF_spatial_inversion.F | 5 ++--- src/wf_and_fft/eval_GradOperator.F | 4 +--- src/wf_and_fft/fft_setup.F | 10 ++-------- src/xc_functionals/XC_eval_gga_potential.F | 7 +++---- src/xc_functionals/el_magnetization.F | 7 +++---- src/xc_functionals/el_magnetization_matrix.F | 6 ++---- 40 files changed, 63 insertions(+), 152 deletions(-) diff --git a/src/acfdt/acfdt_tot_energy.F b/src/acfdt/acfdt_tot_energy.F index b6edd5be0b..c262898f04 100644 --- a/src/acfdt/acfdt_tot_energy.F +++ b/src/acfdt/acfdt_tot_energy.F @@ -227,9 +227,7 @@ subroutine acfdt_tot_energy(Xen,Xk,En,k,q,X,Dip) enddo call LINEAR_ALGEBRA_driver(INV,M=tddftk,lib_in=USE_LK) X_s=matmul(tddftk,X_mat(:,:,iw)) - do concurrent (i1=1:X%ng) - dX(i1)=(X_s(i1,i1)-X_mat(i1,i1,iw))*4.*pi*isc%gamp(i1,1) - enddo + forall (i1=1:X%ng) dX(i1)=(X_s(i1,i1)-X_mat(i1,i1,iw))*4.*pi*isc%gamp(i1,1) ACFDT_Ec=ACFDT_Ec-q%nstar(iqibz)*lambda_weight(il)*freq_weight(iw)*sum(dX) call live_timing(steps=1) enddo diff --git a/src/bse/K_inversion_Lo.F b/src/bse/K_inversion_Lo.F index f7a85ad537..73c2f1c724 100644 --- a/src/bse/K_inversion_Lo.F +++ b/src/bse/K_inversion_Lo.F @@ -144,10 +144,8 @@ subroutine K_inversion_Lo(iq,W,E,k,Lo_dim,Lo) if ( allocated(BSS_eh_W)) E_plus_W=BSS_eh_E(i_res)-cI*BSS_eh_W(i_res) ! if(i_loop==2) then - do concurrent (iw=1:W%n_freqs) - W_mins%p(iw)=W%p(iw)-BS_diagonal(i_res)*BSS_eh_f(i_res) - W_plus%p(iw)=W%p(iw)+BS_diagonal(i_res)*BSS_eh_f(i_res) - enddo + forall (iw=1:W%n_freqs) W_mins%p(iw)=W%p(iw)-BS_diagonal(i_res)*BSS_eh_f(i_res) + forall (iw=1:W%n_freqs) W_plus%p(iw)=W%p(iw)+BS_diagonal(i_res)*BSS_eh_f(i_res) endif ! if ( .not.allocated(E%GreenF) ) then diff --git a/src/bse/K_multiply_by_V.F b/src/bse/K_multiply_by_V.F index 234f010900..957f19120a 100644 --- a/src/bse/K_multiply_by_V.F +++ b/src/bse/K_multiply_by_V.F @@ -46,9 +46,7 @@ subroutine K_multiply_by_V(Vi,Vo,iter_par,iq,mode) ! if(BSS_uses_FKE) FG_factor_c = cmplx(FG_factor,0._SP) ! - do concurrent (i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) - Vo(i_g)%fragment = cZERO - enddo + forall (i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) Vo(i_g)%fragment = cZERO ! do i_B=1,n_BS_blks ! diff --git a/src/bse/K_multiply_by_V_transpose.F b/src/bse/K_multiply_by_V_transpose.F index c5a8b7fcbe..1ade25480c 100644 --- a/src/bse/K_multiply_by_V_transpose.F +++ b/src/bse/K_multiply_by_V_transpose.F @@ -40,9 +40,7 @@ subroutine K_multiply_by_V_transpose(Vi,Vo,iter_par,iq) if(.not.BSS_Slepc_double_grp) alpha=-real(iter_par,SP)*cI if( BSS_Slepc_double_grp) alpha=-real(iter_par,SP) ! - do concurrent (i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) - Vo(i_g)%fragment = cZERO - enddo + forall (i_g=1:BS_nT_grps,PAR_IND_T_Haydock%element_1D(i_g)) Vo(i_g)%fragment = cZERO ! do i_B=1,n_BS_blks ! diff --git a/src/bse/K_screened_interaction.F b/src/bse/K_screened_interaction.F index d54101ed70..6ddcd94b38 100644 --- a/src/bse/K_screened_interaction.F +++ b/src/bse/K_screened_interaction.F @@ -143,9 +143,7 @@ subroutine K_screened_interaction(X,Xw,q,io_X_err) return endif ! - do concurrent (i_g2=1:X%ng) - X_mat(i_g2,i_g2,1)=X_mat(i_g2,i_g2,1)+1._SP - enddo + forall (i_g2=1:X%ng) X_mat(i_g2,i_g2,1)=X_mat(i_g2,i_g2,1)+1._SP ! ! device <- host transfer if (have_gpu) call devxlib_memcpy_h2d(X_mat_p,X_mat) diff --git a/src/collisions/COLLISIONS_NEQ_GW_static.F b/src/collisions/COLLISIONS_NEQ_GW_static.F index 2232d79928..822acb5b2c 100644 --- a/src/collisions/COLLISIONS_NEQ_GW_static.F +++ b/src/collisions/COLLISIONS_NEQ_GW_static.F @@ -157,9 +157,7 @@ subroutine COLLISIONS_NEQ_GW_static(X,Xk,E,k,q,Xw) ! ! Poles and Residuals ! - do concurrent (i1=1:X%ng) - X_mat(i1,i1,1)=X_mat(i1,i1,1)+1._SP - enddo + forall (i1=1:X%ng) X_mat(i1,i1,1)=X_mat(i1,i1,1)+1._SP ! #if defined _OPENMP !$omp parallel do default(shared), private(i1,i2) diff --git a/src/collisions/OSCLL_compose_vbands.F b/src/collisions/OSCLL_compose_vbands.F index 20c62cae78..90be8f2242 100644 --- a/src/collisions/OSCLL_compose_vbands.F +++ b/src/collisions/OSCLL_compose_vbands.F @@ -75,9 +75,8 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) ! ! Build Oscillators for the time-dependent valence bands ! - do concurrent (iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) - OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,i_sp_pol,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) - enddo + forall (iv=1:E%nbf(i_sp_pol),iqbz=1:q%nbz,i_n=NL_bands(1):NL_bands(2),ig1=1:ng_oscll) & + & OSCLL_val(iv,i_n,ig1,iqbz)=sum(OSCLL(i_n,:,ik_mem,i_sp_pol,iqbz,ig1)*V_kmq(NL_bands(1):,iv,iqbz)) ! ! Remove equilibrium Sigma-sex ! @@ -88,9 +87,8 @@ subroutine OSCLL_compose_vbands(V_input,H_nl_sc,k,q,E,i_k,i_sp_pol) do i_n=NL_bands(1),NL_bands(2) do i_m=i_n,NL_bands(2) ! - do concurrent (iqbz=1:q%nbz,ig1=1:ng_oscll,ig2=1:ng_oscll) - OSCLL_sum(iqbz,ig1,ig2)=dot_product(OSCLL_val(:,i_m,ig2,iqbz),OSCLL_val(:,i_n,ig2,iqbz)) - enddo + forall (iqbz=1:q%nbz,ig1=1:ng_oscll,ig2=1:ng_oscll) & + & OSCLL_sum(iqbz,ig1,ig2)=dot_product(OSCLL_val(:,i_m,ig2,iqbz),OSCLL_val(:,i_n,ig2,iqbz)) ! #if defined _DOUBLE H_nl_sc(i_n,i_m)=H_nl_sc(i_n,i_m)+spin_occ*ZDOTU(q%nbz*ng_oscll**2,OSCLL_sum,1,W,1) diff --git a/src/common/FREQUENCIES_coarse_grid.F b/src/common/FREQUENCIES_coarse_grid.F index 4ec2bf60f7..033c03207a 100644 --- a/src/common/FREQUENCIES_coarse_grid.F +++ b/src/common/FREQUENCIES_coarse_grid.F @@ -83,7 +83,7 @@ subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) coarse_grid_N=npts bare_grid_N=1 coarse_grid_Pt=bg_pt - do concurrent ( i_bg=1:npts) + do i_bg=1,npts ordered_grid_index(i_bg)=i_bg coarse_grid_index(i_bg) =i_bg enddo @@ -179,7 +179,7 @@ subroutine FREQUENCIES_coarse_grid(title,bg_pt,npts,cg_percentual,in_pt,lterm) i_vec(i_bg)=i_cg enddo enddo - do concurrent (i_bg=1:npts) + do i_bg=1,npts coarse_grid_index(i_bg)=i_vec( ordered_grid_index(i_bg) ) enddo YAMBO_FREE(i_vec) diff --git a/src/common/FREQUENCIES_setup.F b/src/common/FREQUENCIES_setup.F index 90c09ed026..99ba7c5eed 100644 --- a/src/common/FREQUENCIES_setup.F +++ b/src/common/FREQUENCIES_setup.F @@ -74,9 +74,7 @@ subroutine FREQUENCIES_setup(W) ! delta_w=(W%er(2)-W%er(1))/(W%n_freqs-1) ! - do concurrent (i1=1:W%n_freqs-1) - W%p(i1+1)=cmplx(W%er(1)+delta_w*real(i1,SP),0.,SP) - enddo + forall (i1=1:W%n_freqs-1) W%p(i1+1)=cmplx(W%er(1)+delta_w*real(i1,SP),0.,SP) ! do i1=1,W%n_freqs W%p(i1)=real(W%p(i1))+FREQUENCIES_damping(W,real(W%p(i1)))*cI diff --git a/src/common/G_rot_grid.F b/src/common/G_rot_grid.F index a2d469f978..9b2da9f175 100644 --- a/src/common/G_rot_grid.F +++ b/src/common/G_rot_grid.F @@ -39,14 +39,10 @@ subroutine G_rot_grid(is,call_kind) identity=reshape((/ 1._SP, 0._SP, 0._SP, 0._SP, 1._SP, 0._SP, 0._SP, 0._SP, 1._SP/),(/3,3/)) ! if(is>0) then - do concurrent (i2=1:3,i3=1:3) - rl_sop_local(i2,i3)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) - enddo + forall (i2=1:3,i3=1:3) rl_sop_local(i2,i3)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) endif if(is<0) then - do concurrent (i2=1:3,i3=1:3) - rl_sop_local(i2,i3)=-identity(i2,i3)*alat(i2)/alat(i3) - enddo + forall (i2=1:3,i3=1:3) rl_sop_local(i2,i3)=-identity(i2,i3)*alat(i2)/alat(i3) endif ! rl_sop_square=matmul(rl_sop_local,rl_sop_local) diff --git a/src/common/OBS_rotate.F b/src/common/OBS_rotate.F index 186183c341..e01ad7e0dd 100644 --- a/src/common/OBS_rotate.F +++ b/src/common/OBS_rotate.F @@ -38,9 +38,7 @@ subroutine OBS_rotate(R,O,N,direction) ! if (direction == 1) R_=R if (direction == -1) then - do concurrent (i=1:N,j=1:N) - R_(i,j)=conjg(R(j,i)) - enddo + forall (i=1:N,j=1:N) R_(i,j)=conjg(R(j,i)) endif ! ! [1] O_rot = (R_^{\dagger}) O diff --git a/src/common/eval_Gradient.F b/src/common/eval_Gradient.F index c9115948e8..1d9fae06c9 100644 --- a/src/common/eval_Gradient.F +++ b/src/common/eval_Gradient.F @@ -54,9 +54,7 @@ subroutine eval_Gradient(f,f_gradient,ng_) call fft_3d(Vr,fft_dim,-1) #endif ! - do concurrent (ic=1:3,ig=1:ng_) - V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) - enddo + forall (ic=1:3,ig=1:ng_) V3g(ig,ic)=cI*real(g_vec(ig,ic),DP)*Vr(fft_g_table(ig,1))/real(fft_size,DP) ! do ic = 1,3 Vr = cZERO_DP diff --git a/src/coulomb/cutoff_cylinder.F b/src/coulomb/cutoff_cylinder.F index ef58528b02..9ce8b03853 100644 --- a/src/coulomb/cutoff_cylinder.F +++ b/src/coulomb/cutoff_cylinder.F @@ -125,9 +125,7 @@ subroutine cutoff_cylinder(q,is_cut) ! call live_timing() ! - do concurrent (iq=1:q%nibz,ig=1:wf_ng) - bare_qpg(iq,ig)=sqrt(1._SP/V_cut(iq,ig)) - enddo + forall (iq=1:q%nibz,ig=1:wf_ng) bare_qpg(iq,ig)=sqrt(1._SP/V_cut(iq,ig)) ! ! cleanup call PP_indexes_reset(px) diff --git a/src/coulomb/cutoff_ws.F b/src/coulomb/cutoff_ws.F index 4448216c79..d4b862cdbc 100644 --- a/src/coulomb/cutoff_ws.F +++ b/src/coulomb/cutoff_ws.F @@ -97,9 +97,7 @@ subroutine cutoff_ws(q) ! call PP_redux_wait(V_cut) ! - do concurrent (iq=1:q%nibz,ig=1:wf_ng) - bare_qpg(iq,ig)=sqrt(1.0_SP/V_cut(iq,ig)) - enddo + forall (iq=1:q%nibz,ig=1:wf_ng) bare_qpg(iq,ig)=sqrt(1.0_SP/V_cut(iq,ig)) ! ! cleanup ! diff --git a/src/dipoles/DIPOLE_kb_sum.F b/src/dipoles/DIPOLE_kb_sum.F index a092032597..e742077bd4 100644 --- a/src/dipoles/DIPOLE_kb_sum.F +++ b/src/dipoles/DIPOLE_kb_sum.F @@ -111,6 +111,7 @@ subroutine DIPOLE_kb_sum(rho,pp_dim_yambo,ib_range,iv,ic,XX) ! ! Code commented due to fail with intel compiler ! See issue https://gitlab.com/lumen-code/lumen/-/issues/244 + ! Also many other do concurrent reverted to forall. Only one left is here !do concurrent (i1=1:3) ! rho(i1)=rho(i1)+sum(drho_loc(:,i1,:)) !enddo diff --git a/src/el-ph/ELPH_Sigma_c.F b/src/el-ph/ELPH_Sigma_c.F index a0c7ec483e..99934cca3b 100644 --- a/src/el-ph/ELPH_Sigma_c.F +++ b/src/el-ph/ELPH_Sigma_c.F @@ -155,11 +155,9 @@ subroutine ELPH_Sigma_c(en,k,q,qp) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - do concurrent (i2=1:QP_dSc_steps) - Sc_W(i_qp)%p(i2)=& -& en%E(QP_table(i_qp,1),QP_table(i_qp,3),1)+(i2-1)*QP_dSc_delta+& -& cmplx(0.,QP_G_damp,SP) - enddo + forall (i2=1:QP_dSc_steps) Sc_W(i_qp)%p(i2)= & + & en%E(QP_table(i_qp,1),QP_table(i_qp,3),1)+ & + & (i2-1)*QP_dSc_delta+cmplx(0.,QP_G_damp,SP) enddo ! gsqF_energy_steps=QP_dSc_steps diff --git a/src/el-ph/ELPH_gsqF_to_Sigma.F b/src/el-ph/ELPH_gsqF_to_Sigma.F index 0f882cce4d..338d5c875d 100644 --- a/src/el-ph/ELPH_gsqF_to_Sigma.F +++ b/src/el-ph/ELPH_gsqF_to_Sigma.F @@ -72,9 +72,7 @@ subroutine ELPH_gsqF_to_Sigma(en,q,l_GF_from_CA,Sc_W) ! ! Overwrites the damping defined in FREQUENCIES_Green_Function ! - do concurrent (iw=1:QP_Sc_steps) - Sc_local_W%p(iw)= real( Sc_local_W%p(iw)) + cmplx(0._SP,0.00001_SP/HA2EV) - enddo + forall (iw=1:QP_Sc_steps) Sc_local_W%p(iw)= real( Sc_local_W%p(iw)) + cmplx(0._SP,0.00001_SP/HA2EV) endif ! ib =QP_table(i_qp,1) diff --git a/src/exc-ph/EXCPH_gkkp_eval.F b/src/exc-ph/EXCPH_gkkp_eval.F index aa24c601b5..6ae058379b 100644 --- a/src/exc-ph/EXCPH_gkkp_eval.F +++ b/src/exc-ph/EXCPH_gkkp_eval.F @@ -190,8 +190,7 @@ subroutine EXCPH_gkkp_eval(iq_s,iq_bz,il,k,q,ID_gkkp) ! ! Compute the squared couplings (to be removed) ! - do concurrent (i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) - EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha),SP)**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 - enddo + forall (i_alpha=EXCPH_states(1):EXCPH_states(2),i_beta=EXCPH_sum(1):EXCPH_sum(2)) & + & EXCPH_Gkkp_sq(il,i_beta,i_alpha)=REAL(EXCPH_Gkkp(il,i_beta,i_alpha),SP)**2 + AIMAG(EXCPH_Gkkp(il,i_beta,i_alpha))**2 ! end subroutine diff --git a/src/hamiltonian/V_real_space_to_H.F b/src/hamiltonian/V_real_space_to_H.F index d26feadb23..845e9ab01f 100644 --- a/src/hamiltonian/V_real_space_to_H.F +++ b/src/hamiltonian/V_real_space_to_H.F @@ -53,7 +53,7 @@ subroutine V_real_space_to_H(ik,i_sp_pol,H,WF,V_kind,V,Vxc) V_mat=cZERO if(index(V_kind,"xc") >0) call Build_V_xc_mat(Vxc,V_mat) if(index(V_kind,"def")>0) then - do concurrent (i_spinor=1:n_spinor) + do i_spinor=1,n_spinor i_spin=i_sp_pol+i_spinor-1 V_mat(:,i_spin,i_spin)=V_mat(:,i_spin,i_spin)+V(:,i_spin) enddo diff --git a/src/io/io_DB1_selective_scan.F b/src/io/io_DB1_selective_scan.F index 4cf2fef795..c16d360b3a 100644 --- a/src/io/io_DB1_selective_scan.F +++ b/src/io/io_DB1_selective_scan.F @@ -133,9 +133,7 @@ integer function io_DB1_selective_scan(what,DB1_path,E,k,db1_alat,db1_a,COM_mode ! if (what=='all'.and.io_DB1_selective_scan>=0) then YAMBO_ALLOC(rl_sop,(3,3,nsym)) - do concurrent (i1=1:3,i2=1:3,is=1:nsym) - rl_sop(i1,i2,is)=dl_sop(i1,i2,is)*alat(i1)/alat(i2) - enddo + forall (i1=1:3,i2=1:3,is=1:nsym) rl_sop(i1,i2,is)=dl_sop(i1,i2,is)*alat(i1)/alat(i2) endif ! core_io_path=core_io_path_save diff --git a/src/io/io_SC_components.F b/src/io/io_SC_components.F index c0227e060d..f5244c7bc4 100644 --- a/src/io/io_SC_components.F +++ b/src/io/io_SC_components.F @@ -168,9 +168,7 @@ integer function io_SC_components(what,E_sc,ID) ! E_tmp=E_tmp+E_sc%E(SC_bands(2),:,:) ! - do concurrent (ib=SC_bands(2)+1:bands_to_load) - E_sc%E(ib,:,:)=E_sc%E(ib,:,:)+ E_tmp(:,:) - enddo + forall (ib=SC_bands(2)+1:bands_to_load) E_sc%E(ib,:,:)=E_sc%E(ib,:,:)+ E_tmp(:,:) ! YAMBO_FREE(E_tmp) ! diff --git a/src/modules/mod_global_XC.F b/src/modules/mod_global_XC.F index 510ca2ddbd..78520da335 100644 --- a/src/modules/mod_global_XC.F +++ b/src/modules/mod_global_XC.F @@ -186,9 +186,7 @@ subroutine correct_global_XC(what,STRING) ! if (what=='E'.or.what=='G') G_E_xc_string= trim(G_E_xc_string)//"+"//STRING if (what=='X') then - do concurrent (i_X=1:size(X_E_xc_string)) - X_E_xc_string(i_X)= trim(X_E_xc_string(i_X))//"+"//STRING - enddo + forall (i_X=1:size(X_E_xc_string)) X_E_xc_string(i_X)= trim(X_E_xc_string(i_X))//"+"//STRING endif if (what=='K') K_E_xc_string= trim(K_E_xc_string)//"+"//STRING if (what=='WF') loaded_WF_xc_string=trim(loaded_WF_xc_string)//"+"//STRING diff --git a/src/modules/mod_vec_operate.F b/src/modules/mod_vec_operate.F index 93ca9b7f93..4647b164ed 100644 --- a/src/modules/mod_vec_operate.F +++ b/src/modules/mod_vec_operate.F @@ -213,9 +213,7 @@ function axis_rotation(axis, vec, angle) ! Cross product ! U_cross=rZERO - do concurrent (i=1:3,j=1:3) - U_cross(i,j) = axis(i)*axis(j) - enddo + forall (i=1:3,j=1:3) U_cross(i,j) = axis(i)*axis(j) R=R+(1.0_SP-cos(angle))*U_cross ! axis_rotation=matmul(R,vec) @@ -592,9 +590,7 @@ subroutine r_sort(arrin,arrout,indx,indx_m1,r_zero) if (.not.present(arrout)) arrin=l_arrout if (present(indx)) indx=l_indx if (present(indx_m1)) then - do concurrent ( i=1:n) - indx_m1(l_indx(i))=i - enddo + forall (i=1:n) indx_m1(l_indx(i))=i endif deallocate(l_indx,l_arrout) end subroutine r_sort @@ -695,9 +691,7 @@ subroutine i_sort(arrin,arrout,indx,indx_m1) if (.not.present(arrout) ) arrin =l_arrout if ( present(indx) ) indx =l_indx if ( present(indx_m1)) then - do concurrent ( i=1:n) - indx_m1(l_indx(i))=i - enddo + forall ( i=1:n) indx_m1(l_indx(i))=i endif deallocate(l_indx,l_arrout) end subroutine i_sort diff --git a/src/nloptics/INVINT_step.F b/src/nloptics/INVINT_step.F index 66e34470db..65d002f8fd 100644 --- a/src/nloptics/INVINT_step.F +++ b/src/nloptics/INVINT_step.F @@ -38,9 +38,7 @@ subroutine INVINT_step(V_out,V_in,H_in,I_in,nbf,dT) do ib=1,nbf ! Hp=cZERO - do concurrent (i1=NL_bands(1):NL_bands(2)) - Hp(i1,i1)=cONE - end do + forall (i1=NL_bands(1):NL_bands(2)) Hp(i1,i1)=cONE Hm=Hp ! Hm=Hm-cI*dT/2._SP*(H_in+I_in) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 13265e642b..0ebc3fb958 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -286,9 +286,7 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) ! ================ V_bands=cZERO do i_sp_pol=1,n_sp_pol - do concurrent (i1=1:E%nbf(n_sp_pol)) - V_bands(i1,i1,:,i_sp_pol)=cONE - end do + forall (i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE enddo ! endif diff --git a/src/nloptics/NL_start_and_restart.F b/src/nloptics/NL_start_and_restart.F index 6a55794274..45b46a69d4 100644 --- a/src/nloptics/NL_start_and_restart.F +++ b/src/nloptics/NL_start_and_restart.F @@ -79,9 +79,7 @@ subroutine NL_start_and_restart(E,k,Dip) & call error(" Wrong bands range!") ! do i_sp_pol=1,n_sp_pol - do concurrent (i1=1:E%nbf(n_sp_pol)) - V_bands(i1,i1,:,i_sp_pol)=cONE - end do + forall (i1=1:E%nbf(n_sp_pol)) V_bands(i1,i1,:,i_sp_pol)=cONE enddo ! if(Correlation/=IPA.and..not.COLLISIONS_have_HARTREE.and.(eval_HARTREE.or.eval_DFT)) then diff --git a/src/qp/QP_mpa.F b/src/qp/QP_mpa.F index d375aaba36..358a097e8b 100644 --- a/src/qp/QP_mpa.F +++ b/src/qp/QP_mpa.F @@ -521,9 +521,7 @@ subroutine QP_mpa(X,Xk,E,k,q,qp,Xw,GW_iter) iscp%qs=isc%qs ! ! DALV: here the grid is centered in E0 - do concurrent (i_w=1:QP_dSc_steps) - W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp - enddo + forall (i_w=1:QP_dSc_steps) W_(i_w)=Sc_W(i_qp)%p(i_w)+cI*QP_G_damp ! do ib=QP_n_G_bands(1),QP_n_G_bands(2) ! diff --git a/src/qp/QP_real_axis.F b/src/qp/QP_real_axis.F index 25af498e76..4f3e4aee2c 100644 --- a/src/qp/QP_real_axis.F +++ b/src/qp/QP_real_axis.F @@ -112,9 +112,7 @@ subroutine QP_real_axis(X,Xen,Xk,en,k,q,qp,Xw,Dip,GW_iter) do i_qp=1,qp%n_states Sc_W(i_qp)%n_freqs=QP_dSc_steps YAMBO_ALLOC(Sc_W(i_qp)%p,(Sc_W(i_qp)%n_freqs)) - do concurrent (i2=1:QP_dSc_steps) - Sc_W(i_qp)%p(i2)=qp%E_bare(i_qp)+(i2-1)*QP_dSc_delta - enddo + forall (i2=1:QP_dSc_steps) Sc_W(i_qp)%p(i2)=qp%E_bare(i_qp)+(i2-1)*QP_dSc_delta enddo else if (trim(QP_solver)=='g') then ! diff --git a/src/real_time_hamiltonian/RT_Hamiltonian.F b/src/real_time_hamiltonian/RT_Hamiltonian.F index 25df4e50ca..cf049586d5 100644 --- a/src/real_time_hamiltonian/RT_Hamiltonian.F +++ b/src/real_time_hamiltonian/RT_Hamiltonian.F @@ -153,9 +153,7 @@ subroutine RT_Hamiltonian(dG_in,A_input,E,k) ! call PP_redux_wait(H_nl_sc,COMM=PAR_COM_Xk_ibz_A2A%COMM) ! - do concurrent (ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) - Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=H_nl_sc - enddo + forall (ik_RT=RTibz%k_range(ik,1):RTibz%k_range(ik,2)) Ho_plus_Sigma(:,:,ik_RT,i_sp_pol)=H_nl_sc ! enddo enddo diff --git a/src/sc/OEP_ApplySigmaCSX.F b/src/sc/OEP_ApplySigmaCSX.F index 4a32146f03..d361602f03 100644 --- a/src/sc/OEP_ApplySigmaCSX.F +++ b/src/sc/OEP_ApplySigmaCSX.F @@ -109,9 +109,7 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) call io_control(ACTION=IO_ACT,COM=NONE,SEC=(/2*iqibz,2*iqibz+1/),ID=ID) io_err=io_X(X,Xw,ID) ! - do concurrent (i1=1:X%ng,i2=1:X%ng) - PPaR(i1,i2)=X_mat(i1,i2,1)*isc%gamp(i1,i2) ! Poles and Residuals - enddo + forall (i1=1:X%ng,i2=1:X%ng) PPaR(i1,i2)=X_mat(i1,i2,1)*isc%gamp(i1,i2) ! Poles and Residuals ! PPaR_is_TR_rotated=.false. ! @@ -119,9 +117,7 @@ subroutine OEP_ApplySigmaCSX(X,Xw,E,k,q,U_csx) ! if (iqs>nsym/(i_time_rev+1) .and. i_space_inv == 0 .and..not.PPaR_is_TR_rotated) then PPaR_is_TR_rotated=.true. - do concurrent (i1=1:X%ng,i2=1:X%ng) - PPaR_ws(i2,i1)=PPaR(i1,i2) - enddo + forall (i1=1:X%ng,i2=1:X%ng) PPaR_ws(i2,i1)=PPaR(i1,i2) PPaR(:,:)=PPaR_ws(:,:) endif ! diff --git a/src/sc/OEP_app_inversion.F b/src/sc/OEP_app_inversion.F index 5b72a8fef5..221014e782 100644 --- a/src/sc/OEP_app_inversion.F +++ b/src/sc/OEP_app_inversion.F @@ -153,10 +153,8 @@ subroutine OEP_app_inversion(E,k,Vkli,Vslt,U,rho) rhotw_rs(1:QP_ng_Sx) = rhotw_ds(fft_g_table(1:QP_ng_Sx,1)) !forall(ig1=2:QP_ng_Sx,ig2=2:QP_ng_Sx) rhotw_prd(ig1,ig2) = rhotw_prd(ig1,ig2) + & ! & Prefactor*E%f(iv1,ik,1)*conjg(rhotw_rs(ig1))*isc%rhotw(ig2) - do concurrent (ig1=2:QP_ng_Sx,ig2=2:QP_ng_Sx) - rhotw_prd(ig1,ig2) = rhotw_prd(ig1,ig2) + & + forall (ig1=2:QP_ng_Sx,ig2=2:QP_ng_Sx) rhotw_prd(ig1,ig2) = rhotw_prd(ig1,ig2) + & & Prefactor*E%f(iv1,ik,1)*rhotw_rs(ig1)*isc%rhotw(ig2) - enddo ! if (l_is_TR) then !rhotw_sum_TR(1:QP_ng_Sx-1)=rhotw_sum_TR(1:QP_ng_Sx-1)+rhotw_rs(2:QP_ng_Sx) diff --git a/src/sc/SC_add_XC.F b/src/sc/SC_add_XC.F index 1e90a6151e..327f825fb4 100644 --- a/src/sc/SC_add_XC.F +++ b/src/sc/SC_add_XC.F @@ -57,13 +57,9 @@ subroutine SC_add_XC(X,Xw,Xk,E,k,q,iteration,V_xc_nm1,ELEC,HOLE,DELTA) if (l_use_Hxc_collisions.or.l_use_COH_collisions) then ! G_sex=cZERO - do concurrent (ib=SC_bands(1):SC_bands(2),ik=1:E%nk) - G_sex(ib,ib,ik)=cI*E%f(ib,ik,1) - enddo + forall (ib=SC_bands(1):SC_bands(2),ik=1:E%nk) G_sex(ib,ib,ik)=cI*E%f(ib,ik,1) G_coh=cZERO - do concurrent (ib=SC_bands(1):SC_bands(2),ik=1:E%nk) - G_coh(ib,ib,ik)=cI - enddo + forall (ib=SC_bands(1):SC_bands(2),ik=1:E%nk) G_coh(ib,ib,ik)=cI ! ! Now I build the G_collisions rotating the non interaction one ! G_collisions(ib,ib,ik)=(0._SP,1._SP)*en%f(ib,ik) diff --git a/src/sc/SC_driver.F b/src/sc/SC_driver.F index b363d60de6..43dc99fc0a 100644 --- a/src/sc/SC_driver.F +++ b/src/sc/SC_driver.F @@ -162,9 +162,7 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) if(.not.l_SC_RESTART.and.l_use_collisions) then ! H_rotation=cZERO - do concurrent (i1=SC_bands(1):SC_bands(2)) - H_rotation(i1,i1,:,:)=1._SP - enddo + forall (i1=SC_bands(1):SC_bands(2)) H_rotation(i1,i1,:,:)=1._SP ! else if (.not.l_SC_cycle.and.l_SC_RESTART) then ! @@ -489,12 +487,8 @@ subroutine SC_driver(X,Xw,Xk,E,k,q,Dip) ! if(.not.l_sc_electric) then ! - do concurrent (ib=SC_bands(2)+1:E%nb) - E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(2),:,:)-E_previous(SC_bands(2),:,:) - enddo - do concurrent (ib=1:SC_bands(1)-1) - E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(1),:,:)-E_previous(SC_bands(1),:,:) - enddo + forall (ib=SC_bands(2)+1:E%nb) E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(2),:,:)-E_previous(SC_bands(2),:,:) + forall (ib=1:SC_bands(1)-1) E%E(ib,:,:)=E%E(ib,:,:)+E%E(SC_bands(1),:,:)-E_previous(SC_bands(1),:,:) ! endif ! @@ -852,9 +846,7 @@ subroutine SC_report() ! ! simmetrize the spreads summing over all possible degenerate bands ! - do concurrent (ibp=SC_bands(1):SC_bands(2)) - WS_spread(ibp)=abs(H_rotation(ibp,ib,ik,i_sp_pol))**2*100._SP/HA2EV - enddo + forall (ibp=SC_bands(1):SC_bands(2)) WS_spread(ibp)=abs(H_rotation(ibp,ib,ik,i_sp_pol))**2*100._SP/HA2EV ! ibp=b_of_max_proj(ib,ik,i_sp_pol) spread(ib,ik,i_sp_pol)=WS_spread( ibp ) diff --git a/src/setup/setup.F b/src/setup/setup.F index b796d15bf0..9e132e71ae 100644 --- a/src/setup/setup.F +++ b/src/setup/setup.F @@ -187,9 +187,7 @@ subroutine setup(en,q,Xen,Ken,k,Xk) YAMBO_ALLOC(rl_sop,(3,3,nsym)) ! do is=1,nsym - do concurrent (i2=1:3,i3=1:3) - rl_sop(i2,i3,is)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) - enddo + forall (i2=1:3,i3=1:3) rl_sop(i2,i3,is)=dl_sop(i2,i3,is)*alat(i2)/alat(i3) enddo ! ! Indentity index diff --git a/src/wf_and_fft/WF_spatial_inversion.F b/src/wf_and_fft/WF_spatial_inversion.F index bd6505ad9f..7186c13ddf 100644 --- a/src/wf_and_fft/WF_spatial_inversion.F +++ b/src/wf_and_fft/WF_spatial_inversion.F @@ -65,9 +65,8 @@ subroutine WF_spatial_inversion(en,Xk) ! #if !defined _OPENMP ! - do concurrent (i1=1:fft_size) - cv(i1)=wfconjg(cmplx(WF%r(i1,i_spinor,1),kind=SP))*WF%r(i1,i_spinor,1) - enddo + forall (i1=1:fft_size) & + & cv(i1)=wfconjg(cmplx(WF%r(i1,i_spinor,1),kind=SP))*WF%r(i1,i_spinor,1) mv(1)=sum(rho_nsi(:)*cv(:)) mv(2)=sum(rho_si(:)*cv(:)) ! diff --git a/src/wf_and_fft/eval_GradOperator.F b/src/wf_and_fft/eval_GradOperator.F index e01d323666..f4d3cb49df 100644 --- a/src/wf_and_fft/eval_GradOperator.F +++ b/src/wf_and_fft/eval_GradOperator.F @@ -53,9 +53,7 @@ subroutine eval_GradOperator() #else call fft_3d(v,fft_dim,1) #endif - do concurrent (i1=1:fft_size,i2=1:fft_size) - Grad_R(i1,i2,ii) = v(R_m_R(i1,i2))/fft_size - enddo + forall (i1=1:fft_size,i2=1:fft_size) Grad_R(i1,i2,ii) = v(R_m_R(i1,i2))/fft_size v = (0._DP,0._DP) end do ! diff --git a/src/wf_and_fft/fft_setup.F b/src/wf_and_fft/fft_setup.F index dde6807d96..f43ef453b5 100644 --- a/src/wf_and_fft/fft_setup.F +++ b/src/wf_and_fft/fft_setup.F @@ -193,11 +193,7 @@ subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) v1=(g_vec_rot(i1,:)-g_vec_rot(i2,:)) iv=nint(v1) ! - if (i2==1.or.i1<=iG_max_in) then - do concurrent (i3=1:3) - ln(i3)=max(ln(i3),iv(i3)) - enddo - endif + if (i2==1.or.i1<=iG_max_in) forall (i3=1:3) ln(i3)=max(ln(i3),iv(i3)) # if defined _FFTQE if (i4>0.and..not.ONLY_SIZE) fft_g_table(i1,i2)=fft_setmap(iv,dffts) # else @@ -267,9 +263,7 @@ subroutine fft_setup(iG_max_in,iGo_max,ONLY_SIZE) if( is> nsym/(1+i_time_rev) .and. is<=nsym ) M1=matmul(-dl_sop(:,:,sop_inv(is)),transpose(a)) if( is==nsym+1 ) M1=matmul( space_inv,transpose(a)) M2=matmul(b,M1)/2.0_SP/pi - do concurrent (i1=1:3,i2=1:3) - M2(i1,i2)=M2(i1,i2)*fft_dim(i1)/fft_dim(i2) - enddo + forall (i1=1:3,i2=1:3) M2(i1,i2)=M2(i1,i2)*fft_dim(i1)/fft_dim(i2) ! do i1=0,fft_dim(1)-1 do i2=0,fft_dim(2)-1 diff --git a/src/xc_functionals/XC_eval_gga_potential.F b/src/xc_functionals/XC_eval_gga_potential.F index d42041a8ef..cdc37a0d6c 100644 --- a/src/xc_functionals/XC_eval_gga_potential.F +++ b/src/xc_functionals/XC_eval_gga_potential.F @@ -50,10 +50,9 @@ subroutine XC_eval_gga_potential(v1rho,v1sigma,drho,V_xc) ! thus I set fac to 2._SP to remove the extra 2 if (is_xc/=2) fac=1._SP if (is_xc==2) fac=2._SP - do concurrent (ic=1:3,ifft=1:fft_size) - v_drho(ifft,ic) = v_drho(ifft,ic) + & -& 2._SP/fac*real(v1sigma(is_xc,ifft),SP)*drho(ifft,is2,ic) - enddo + forall (ic=1:3,ifft=1:fft_size) & + & v_drho(ifft,ic) = v_drho(ifft,ic) + & + & 2._SP/fac*real(v1sigma(is_xc,ifft),SP)*drho(ifft,is2,ic) end do ! ! 1. this is done by FFTing, by doing the scalar diff --git a/src/xc_functionals/el_magnetization.F b/src/xc_functionals/el_magnetization.F index f6e192dd73..218715bfe3 100644 --- a/src/xc_functionals/el_magnetization.F +++ b/src/xc_functionals/el_magnetization.F @@ -161,10 +161,9 @@ subroutine el_magnetization(en,Xk,magn,bands) if (n_spinor==2) then tmp_sop(:,:)=dl_sop(:,:,isym)*m3det(dl_sop(:,:,isym)) if( isym> nsym/(1+i_time_rev) ) tmp_sop(:,:)=-tmp_sop(:,:) - do concurrent (ifft=1:fft_size) - magn(ifft,:)=magn(ifft,:)+ & -& matmul(tmp_sop, cv(fft_rot_r(ifft,isym),:)/real(nsym,SP)) - enddo + forall (ifft=1:fft_size) & + & magn(ifft,:)=magn(ifft,:)+ & + & matmul(tmp_sop, cv(fft_rot_r(ifft,isym),:)/real(nsym,SP)) else magn(:,3)=magn(:,3)+cv(fft_rot_r(:,isym),3)/real(nsym,SP) endif diff --git a/src/xc_functionals/el_magnetization_matrix.F b/src/xc_functionals/el_magnetization_matrix.F index f436f6af71..a036f7610a 100644 --- a/src/xc_functionals/el_magnetization_matrix.F +++ b/src/xc_functionals/el_magnetization_matrix.F @@ -188,10 +188,8 @@ subroutine el_magnetization_matrix(G_lesser,en,Xk,magn,lowest_band) if (n_spinor==2) then tmp_sop(:,:)=dl_sop(:,:,isym)*m3det(dl_sop(:,:,isym)) if( isym> nsym/(1+i_time_rev) ) tmp_sop(:,:)=-tmp_sop(:,:) - do concurrent (ifft=1:fft_size) - magn(ifft,:)=magn(ifft,:)+ & -& matmul(tmp_sop, cv(fft_rot_r(ifft,isym),:)/real(nsym,SP) ) - enddo + forall (ifft=1:fft_size) magn(ifft,:)=magn(ifft,:)+ & + & matmul(tmp_sop, cv(fft_rot_r(ifft,isym),:)/real(nsym,SP) ) else magn(:,3)=magn(:,3)+cv(fft_rot_r(:,isym),3)/real(nsym,SP) endif From fb0a51ed9ec741cdf2c6da9b3dc2285255f7b8cc Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Thu, 4 Dec 2025 14:06:26 +0100 Subject: [PATCH 1342/1367] Reoved repeated header --- src/linear_algebra/PARALLEL_inversion.F | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/linear_algebra/PARALLEL_inversion.F b/src/linear_algebra/PARALLEL_inversion.F index 11b5a8d2f5..a658157747 100644 --- a/src/linear_algebra/PARALLEL_inversion.F +++ b/src/linear_algebra/PARALLEL_inversion.F @@ -9,21 +9,6 @@ ! #include ! -! Copyright (C) 2004 WanT Group -! -! This file is distributed under the terms of the -! GNU General Public License. See the file `License' -! in the root directory of the present distribution, -! License-Identifier: GPL -! -! Copyright (C) 2016 The Yambo Team -! -! Authors (see AUTHORS file for details): AM AF -! -! headers -! -#include -! subroutine PARALLEL_inversion(M,N) ! ! perform the inversion by using scalapack From d30c19fb3a8750fda744aa1a3ffea8e18525d64e Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 4 Dec 2025 14:47:23 +0100 Subject: [PATCH 1343/1367] Version 5.3.0, Revision 26321, Hash fb0a51ed9 NEW * doc/RELEASE_NOTES Bugs: - Additions: -Added release notes file Changes: - Patch sent by: Claudio Attaccalite --- doc/RELEASE_NOTES | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/RELEASE_NOTES diff --git a/doc/RELEASE_NOTES b/doc/RELEASE_NOTES new file mode 100644 index 0000000000..ccda43fa80 --- /dev/null +++ b/doc/RELEASE_NOTES @@ -0,0 +1,8 @@ +Lumen 2.0 (04/12/2025) +---------------------- +https://www.lumen-code.org/wiki/index.php?title=Lumen_2.0 + +Lumen 1.x (2018) +--------------------- +https://www.attaccalite.com/lumen/ + From 713674e05792021096817c768981086f96eddd48 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Tue, 9 Dec 2025 19:00:22 +0100 Subject: [PATCH 1344/1367] Fix for issue #247 --- src/bse/K_dipoles.F | 8 +++++--- src/interface/INIT_activate.F | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bse/K_dipoles.F b/src/bse/K_dipoles.F index 18523c53b0..473721e1f4 100644 --- a/src/bse/K_dipoles.F +++ b/src/bse/K_dipoles.F @@ -33,7 +33,7 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) & l_BS_mespin,l_BS_meorb use parallel_int, ONLY:PP_redux_wait use parallel_m, ONLY:PAR_BS_nT_col_grps,PAR_COM_eh_INDEX,PAR_IND_T_groups,& -& PAR_COM_Xk_ibz_INDEX +& PAR_COM_Xk_ibz_INDEX,PARALLEL_default_mode use collision_el, ONLY:elemental_collision,elemental_collision_free,elemental_collision_alloc use timing_m, ONLY:timing use vec_operate, ONLY:v_rotate,cross_product @@ -284,8 +284,10 @@ subroutine K_dipoles(iq,Ken,Xk,q,X_oscillators,Dip) ! call DIPOLE_ALLOC_global( ) ! - ! Here I need the distribution over k - call PARALLEL_SETUP_K_scheme("Kdef") + ! The call to DIPOLE_IO might have changed the PAR_K_scheme. + ! Here I reset it to the previous value + if( trim(PARALLEL_default_mode)=="KQmemory") call PARALLEL_SETUP_K_scheme("K") + if(.not.trim(PARALLEL_default_mode)=="KQmemory") call PARALLEL_SETUP_K_scheme("Kdef") ! endif ! diff --git a/src/interface/INIT_activate.F b/src/interface/INIT_activate.F index 2a03943056..d9baeb2131 100644 --- a/src/interface/INIT_activate.F +++ b/src/interface/INIT_activate.F @@ -97,6 +97,10 @@ subroutine INIT_activate() !call CPU_activate("SLK") endif ! +#if defined _PAR_IO + call CPU_activate("BZINDX") +#endif + ! #if defined _SC if (l_eval_collisions .or. l_sc_run) then call CPU_activate("SE") From fe0a3b0e475ce7bcf1e5611ff325db0a1878171d Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 10 Dec 2025 09:02:42 +0100 Subject: [PATCH 1345/1367] Version 5.3.0, Revision 26325, Hash 6e1dedaf86 MODIFIED * configure include/version/version.m4 hamiltonian/Build_tilde_vbands.F Bugs: - Additions: -Just a comment Changes: - Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/hamiltonian/Build_tilde_vbands.F | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure b/configure index dd9db7d5f7..958617eade 100755 --- a/configure +++ b/configure @@ -3413,8 +3413,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26318" -SHASH="4d974df491" +SREVISION="26325" +SHASH="6e1dedaf86" diff --git a/include/version/version.m4 b/include/version/version.m4 index 0fe718e5df..55af7da998 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26318" -SHASH="4d974df491" +SREVISION="26325" +SHASH="6e1dedaf86" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/hamiltonian/Build_tilde_vbands.F b/src/hamiltonian/Build_tilde_vbands.F index 844b626e9a..1ee9160b77 100644 --- a/src/hamiltonian/Build_tilde_vbands.F +++ b/src/hamiltonian/Build_tilde_vbands.F @@ -5,6 +5,9 @@ ! ! Authors (see AUTHORS file for details): MG CA ! +! V_tilde(:,:,1) is calculated at q+delta +! V_tilde(:,:,2) is calculated at q-delta +! subroutine Build_tilde_vbands(en,Xk,ikbz,i_sp,istep,id_red,V_bands,V_tilde) ! ! Build the \tilde Valence bands as defined in Eq. 53 of From ce59c79a021622c1f333b44de46f9f15fc0fa0a2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 10 Dec 2025 10:44:18 +0100 Subject: [PATCH 1346/1367] Use of qindx_B_load removed from K_kernel. Replaced by MPI_Get. In practice buffering is done in memory, instead of doing it on disk --- src/bse/K_correlation_collisions_dir.F | 24 ++++++--- src/bse/K_correlation_collisions_std.F | 24 ++++++--- src/bse/K_kernel.F | 74 +++++++++++++++++++------- src/modules/mod_parallel.F | 1 + src/parallel/PARALLEL_SETUP_K_scheme.F | 25 +++++++-- 5 files changed, 113 insertions(+), 35 deletions(-) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 8a7a24294d..8fae3b4f7e 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -10,7 +10,7 @@ #include #include ! -subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) +subroutine K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) ! ! This routine evaluates the correlation collisions: ! @@ -29,7 +29,9 @@ subroutine K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) ! implicit none ! - integer, intent(in) :: iq,i_block,qindx_ID_frag + integer, intent(in) :: iq,i_block + integer, intent(in) :: win1_ID + integer, intent(in) :: win2_ID type(bz_samp), intent(in) :: Xk,q ! ! Work Space @@ -286,9 +288,10 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & & j_v_k,j_c_k,j_k_sp_pol_v,j_k_sp_pol_c,j_k_s, & & j_p_bz_last,j_k_bz_last,j_q_W,j_q_W_bz_last,j_g_W_last) ! - use R_lattice, ONLY:qindx_B,qindx_B_load + use R_lattice, ONLY:qindx_B use D_lattice, ONLY:sop_inv,sop_tab use parallel_m, ONLY:PAR_K_scheme + use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Get ! implicit none ! @@ -305,6 +308,12 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & & j_kmq_s_m1,j_k_bz_mem,qindx_tmp(2), & & j_q_W_bz,j_q_W_s,j_g_W ! + ! MPI window + ! + integer(kind=MPI_ADDRESS_KIND) :: get_index + integer :: mpi_err + integer :: remote_id + ! j_k_bz = BS_T_grp(j_Tgrp_k)%table(j_Tk,1) j_p_bz = BS_T_grp(j_Tgrp_p)%table(j_Tp,1) ! @@ -333,12 +342,13 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & if (j_p_bz_last/=j_p_bz.or.j_k_bz_last/=j_k_bz) then j_p_bz_last=j_p_bz j_k_bz_last=j_k_bz - if (j_k_bz_mem==0) then - !DEV_OMP critical - qindx_tmp=qindx_B_load(j_p_bz,j_k_bz,qindx_ID_frag) + if (j_k_bz_mem<0) then + get_index = (-j_k_bz_mem-1)*Xk%nbz+j_p_bz-1 + remote_id=PAR_K_scheme%bz_id(i_k_bz) + call MPI_Get(qindx_tmp(1), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win1_ID, mpi_err) + call MPI_Get(qindx_tmp(2), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win2_ID, mpi_err) j_q_W_bz=qindx_tmp(1) j_g_W =qindx_tmp(2) - !DEV_OMP end critical else j_q_W_bz=qindx_B(j_p_bz,j_k_bz_mem,1) j_g_W =qindx_B(j_p_bz,j_k_bz_mem,2) diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index bab7806e80..b53d9b0d8f 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -19,7 +19,7 @@ !* iq/=1 and spin_orbit is present. * !************************************************************ ! -subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) +subroutine K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) ! ! This routine evaluates the correlation collisions: ! @@ -51,7 +51,9 @@ subroutine K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) ! implicit none ! - integer, intent(in) :: iq,i_block,qindx_ID_frag + integer, intent(in) :: iq,i_block + integer, intent(in) :: win1_ID + integer, intent(in) :: win2_ID type(bz_samp), intent(in) :: Xk,q ! ! Work Space @@ -326,9 +328,10 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & & j_v_k,j_c_k,j_k_sp_pol_v,j_k_sp_pol_c, & & j_p_bz_last,j_k_bz_last,j_q_W,j_q_W_bz_last,j_g_W_last) ! - use R_lattice, ONLY:qindx_B,qindx_B_load + use R_lattice, ONLY:qindx_B use D_lattice, ONLY:sop_inv,sop_tab use parallel_m, ONLY:PAR_K_scheme + use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Get ! implicit none ! @@ -345,6 +348,12 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & & j_kmq_s,j_pmq_s,j_kmq_s_m1,j_k_bz_mem,qindx_tmp(2), & & j_q_W_bz,j_q_W_s,j_g_W ! + ! MPI window + ! + integer(kind=MPI_ADDRESS_KIND) :: get_index + integer :: mpi_err + integer :: remote_id + ! j_k_bz = BS_T_grp(j_Tgrp_k)%table(j_Tk,1) j_p_bz = BS_T_grp(j_Tgrp_p)%table(j_Tp,1) ! @@ -373,12 +382,13 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & if (j_p_bz_last/=j_p_bz.or.j_k_bz_last/=j_k_bz) then j_p_bz_last=j_p_bz j_k_bz_last=j_k_bz - if (j_k_bz_mem==0) then - !DEV_OMP critical - qindx_tmp=qindx_B_load(j_p_bz,j_k_bz,qindx_ID_frag) + if (j_k_bz_mem<0) then + get_index = (-j_k_bz_mem-1)*Xk%nbz+j_p_bz-1 + remote_id=PAR_K_scheme%bz_id(i_k_bz) + call MPI_Get(qindx_tmp(1), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win1_ID, mpi_err) + call MPI_Get(qindx_tmp(2), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win2_ID, mpi_err) j_q_W_bz=qindx_tmp(1) j_g_W =qindx_tmp(2) - !DEV_OMP end critical else j_q_W_bz=qindx_B(j_p_bz,j_k_bz_mem,1) j_g_W =qindx_B(j_p_bz,j_k_bz_mem,2) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index a806312305..00564dc8cc 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -23,7 +23,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use interfaces, ONLY:WF_load,WF_free,eval_G_minus_G,TDDFT_ALDA_eh_space_R_kernel use D_lattice, ONLY:nsym,DL_vol,i_time_rev,i_space_inv,sop_inv,sop_tab use R_lattice, ONLY:qindx_X,bz_samp,& -& qindx_B,qindx_B_max,qindx_B_load,RIM_W,RIM_W_d,& +& qindx_B,qindx_B_max,RIM_W,RIM_W_d,& & RIM_ng,RIM_W_is_diagonal,RIM_W_ng use com, ONLY:msg use stderr, ONLY:intc @@ -52,11 +52,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use wave_func, ONLY:WF,rho_map,rho_map_thresh,rho_map_size use openmp, ONLY:OPENMP_update,master_thread use timing_m, ONLY:timing - use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,PARALLEL_default_mode,master_cpu + use parallel_m, ONLY:myid,ncpu,PAR_K_scheme,PARALLEL_default_mode,& + & master_cpu,mpi_comm_world use parallel_int, ONLY:PP_redux_wait use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free use parser_m, ONLY:parser + use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Win_create,MPI_Win_fence,MPI_Get,& + & MPI_Info_create,MPI_Info_set,MPI_info_free use y_memory_alloc ! implicit none @@ -105,11 +108,20 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! ! I/O ! - integer ::io_X_err,io_BS_Fxc_err,io_BS_err,qindx_ID,qindx_ID_frag,ID,ID_head,ID_compr,io_QINDX_err + integer ::io_X_err,io_BS_Fxc_err,io_BS_err,ID,ID_head,ID_compr,io_QINDX_err integer, external ::io_BS,io_BS_header - integer, external ::qindx_B_init,qindx_B_close integer, external ::io_BS_PAR_init ! + ! MPI window + ! + integer(kind=MPI_ADDRESS_KIND) :: mpi_size + integer(kind=MPI_ADDRESS_KIND) :: get_index + integer :: mpi_info_nolocks + integer :: mpi_err + integer :: win1_ID,win2_ID + integer :: N2 + integer :: remote_id + ! ! Timing and restart ! logical :: BS_blk_done(n_BS_blks),l_partial_kernel_loaded @@ -224,9 +236,25 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if( l_BSE_kernel_complete) return ! - io_QINDX_err=0 - if (l_bs_corr) io_QINDX_err=qindx_B_init(qindx_ID,qindx_ID_frag,"minus_q") - if(io_QINDX_err/=0) call error('Error reading qindx_B database ') + if(trim(PARALLEL_default_mode)=="KQmemory") then + ! + call MPI_Info_create(mpi_info_nolocks, mpi_err) + call MPI_Info_set(mpi_info_nolocks, "no_locks", "true", mpi_err) ! Disable locking + call MPI_Info_set(mpi_info_nolocks, "read_only", "true", mpi_err) ! Read_only_mode + ! + ! MPI_Win_create will duplicate in memory qindx_B + ! If I want to avoid this, I need to use MPI_Win_Alloc ... + mpi_size=size(qindx_B(:,:,1)) + N2=sizeof(qindx_B(1,1,1)) + call MPI_Win_create(qindx_B(:,:,1), mpi_size*N2, N2, mpi_info_nolocks, mpi_comm_world, win1_ID, mpi_err) + call MPI_Win_create(qindx_B(:,:,2), mpi_size*N2, N2, mpi_info_nolocks, mpi_comm_world, win2_ID, mpi_err) + call MPI_Win_fence(0, win1_ID, mpi_err) + call MPI_Win_fence(0, win2_ID, mpi_err) + ! + ! Free the MPI_Info object as it's no longer needed + call MPI_Info_free(mpi_info_nolocks, mpi_err) + ! + endif ! ! Screened interaction !====================== @@ -584,8 +612,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! Correlation oscillators !---------------------- if(iHxc==3) then - if (l_std_alg) call K_correlation_collisions_std(iq,i_block,qindx_ID_frag,Xk,q) - if (l_dir_alg) call K_correlation_collisions_dir(iq,i_block,qindx_ID_frag,Xk,q) + if (l_std_alg) call K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) + if (l_dir_alg) call K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) endif ! call timing('X T_space Kernel sum',OPR='start') @@ -686,12 +714,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (i_p_bz_last/=i_p_bz.or.i_k_bz_last/=i_k_bz) then i_p_bz_last=i_p_bz i_k_bz_last=i_k_bz - if (i_k_bz_mem==0) then - !DEV_OMP critical - qindx_tmp=qindx_B_load(i_p_bz,i_k_bz,qindx_ID_frag) + if (i_k_bz_mem<0) then + get_index = (-i_k_bz_mem-1)*Xk%nbz+i_p_bz-1 + remote_id=PAR_K_scheme%bz_id(i_k_bz) + call MPI_Get(qindx_tmp(1), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win1_ID, mpi_err) + call MPI_Get(qindx_tmp(2), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win2_ID, mpi_err) iq_W_bz=qindx_tmp(1) ig_W =qindx_tmp(2) - !DEV_OMP end critical else iq_W_bz=qindx_B(i_p_bz,i_k_bz_mem,1) ig_W =qindx_B(i_p_bz,i_k_bz_mem,2) @@ -725,12 +754,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (i_pmq_bz_last/=i_pmq_bz.or.i_kmq_bz_last/=i_kmq_bz) then i_pmq_bz_last=i_pmq_bz i_kmq_bz_last=i_kmq_bz - if (i_kmq_bz_mem==0) then - !DEV_OMP critical - qindx_tmp=qindx_B_load(i_pmq_bz,i_kmq_bz,qindx_ID_frag) + if (i_kmq_bz_mem<0) then + get_index = (-i_kmq_bz_mem-1)*Xk%nbz+i_pmq_bz-1 + remote_id=PAR_K_scheme%bz_id(i_kmq_bz) + call MPI_Get(qindx_tmp(1), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win1_ID, mpi_err) + call MPI_Get(qindx_tmp(2), 1, MPI_INTEGER, remote_id, get_index, 1, MPI_INTEGER, win2_ID, mpi_err) iq_W_bz_mq=qindx_tmp(1) ig_W_mq =qindx_tmp(2) - !DEV_OMP end critical else iq_W_bz_mq=qindx_B(i_pmq_bz,i_kmq_bz_mem,1) ig_W_mq =qindx_B(i_pmq_bz,i_kmq_bz_mem,2) @@ -965,7 +995,15 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (l_std_alg) then YAMBO_FREE(WF_phase) endif - qindx_tmp=qindx_B_close(qindx_ID,qindx_ID_frag) + + if(trim(PARALLEL_default_mode)=="KQmemory") then + ! + ! Free the window + call MPI_Win_free(win1_ID, mpi_err) + call MPI_Win_free(win2_ID, mpi_err) + ! + endif + YAMBO_FREE_GPU(BS_W) YAMBO_FREE(BS_W) ! diff --git a/src/modules/mod_parallel.F b/src/modules/mod_parallel.F index b4a243b066..22332583ff 100644 --- a/src/modules/mod_parallel.F +++ b/src/modules/mod_parallel.F @@ -203,6 +203,7 @@ module parallel_m type(PP_indexes) :: IND_bz integer,allocatable :: ibz_index(:) integer,allocatable :: bz_index(:) + integer,allocatable :: bz_id(:) integer :: nibz integer :: nbz integer :: comm_world diff --git a/src/parallel/PARALLEL_SETUP_K_scheme.F b/src/parallel/PARALLEL_SETUP_K_scheme.F index 6a5086c823..93beb30dc5 100644 --- a/src/parallel/PARALLEL_SETUP_K_scheme.F +++ b/src/parallel/PARALLEL_SETUP_K_scheme.F @@ -8,7 +8,8 @@ subroutine PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) ! use R_lattice, ONLY:nXkibz,nXkbz - use parallel_m, ONLY:COMM_copy,PAR_INDEX_copy,COMM_reset,PP_indexes_reset,PAR_K_scheme + use parallel_int, ONLY:PP_redux_wait + use parallel_m, ONLY:COMM_copy,PAR_INDEX_copy,COMM_reset,PP_indexes_reset,PAR_K_scheme,myid ! DIP use parallel_m, ONLY:PAR_COM_DIPk_ibz_INDEX,PAR_COM_DIPk_ibz_A2A,PAR_IND_DIPk_ibz,PAR_IND_DIPk_bz,& & PAR_DIPk_ibz_index,PAR_DIPk_bz_index,PAR_DIPk_nibz,PAR_DIPk_nbz, & @@ -24,7 +25,8 @@ subroutine PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) ! character(*), intent(in) :: PAR_K_scheme_kind ! - integer :: i1 + integer :: i1,N + integer, allocatable :: tmp_vec(:) ! call COMM_reset(PAR_K_scheme%COM_ibz_INDEX) call COMM_reset(PAR_K_scheme%COM_ibz_A2A) @@ -32,6 +34,7 @@ subroutine PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) call PP_indexes_reset(PAR_K_scheme%IND_bz) if (allocated(PAR_K_scheme%ibz_index)) deallocate(PAR_K_scheme%ibz_index) if (allocated(PAR_K_scheme%bz_index)) deallocate(PAR_K_scheme%bz_index) + if (allocated(PAR_K_scheme%bz_id)) deallocate(PAR_K_scheme%bz_id) ! select case(trim(PAR_K_scheme_kind)) case ("BZINDX") @@ -94,8 +97,24 @@ subroutine PARALLEL_SETUP_K_scheme(PAR_K_scheme_kind) PAR_K_scheme%ibz_index=PAR_Xk_ibz_index endif if (allocated(PAR_Xk_bz_index)) then - allocate(PAR_K_scheme%bz_index(size(PAR_Xk_bz_index))) + N=size(PAR_Xk_bz_index) + allocate(PAR_K_scheme%bz_index(N)) + allocate(PAR_K_scheme%bz_id(N)) PAR_K_scheme%bz_index=PAR_Xk_bz_index + PAR_K_scheme%bz_id=0 + do i1=1,N + if(PAR_Xk_bz_index(i1)==0) cycle + PAR_K_scheme%bz_id(i1)=myid + enddo + call PP_redux_wait(PAR_K_scheme%bz_id) + allocate(tmp_vec(N)) + tmp_vec=-PAR_Xk_bz_index + call PP_redux_wait(tmp_vec) + do i1=1,N + if(PAR_Xk_bz_index(i1)/=0) cycle + PAR_K_scheme%bz_index(i1)=tmp_vec(i1) + enddo + deallocate(tmp_vec) endif PAR_K_scheme%comm_world=mpi_comm_world case ("Kdef") From 097a876c10c883f3a268364ab954680335000f2f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 10 Dec 2025 12:09:10 +0100 Subject: [PATCH 1347/1367] Added more clocks to inspect BSE performances --- src/bse/K_kernel.F | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 00564dc8cc..4699330d05 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -237,6 +237,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if( l_BSE_kernel_complete) return ! if(trim(PARALLEL_default_mode)=="KQmemory") then + ! + call msg("s","Buffering qindx_B in memory via MPI_Win_create ") ! call MPI_Info_create(mpi_info_nolocks, mpi_err) call MPI_Info_set(mpi_info_nolocks, "no_locks", "true", mpi_err) ! Disable locking @@ -522,6 +524,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! - The anti-resonant "A" and anti-coupling "Q" blocks are expliciltly needed only when l_BS_ares_from_res=.false. ! also in this case the code switches to mode_now="F"(ull) and standard relations are used ! + call timing('X T_space Kernel more',OPR='start') + ! mode_now=BS_blk(i_block)%mode if (BS_n_eh_spaces==2) mode_now="F" ! @@ -609,6 +613,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! + call timing('X T_space Kernel more',OPR='stop') + ! ! Correlation oscillators !---------------------- if(iHxc==3) then @@ -936,6 +942,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call timing('X T_space Kernel sum',OPR='stop') ! + call timing('X T_space Kernel more',OPR='start') + ! if(BS_K_cutoff>0._SP.and.l_write_kernel) & & BS_max_val_CPU(myid+1)=maxval( (/BS_max_val_CPU(myid+1),abs(BS_blk(i_block)%mat(:,:))/) ) ! @@ -964,6 +972,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! call live_timing(steps=i_steps) ! + call timing('X T_space Kernel more',OPR='stop') + ! enddo block_loop ! if (m_steps>0) call live_timing( ) From 9d1916555b36ebd5dd016acdc10034233c17b62f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 10 Dec 2025 13:18:21 +0100 Subject: [PATCH 1348/1367] Avoiding same operation to be re-done many times --- src/bse/K_correlation_collisions_dir.F | 32 +++++++++++--------------- src/bse/K_correlation_collisions_std.F | 31 +++++++++++-------------- src/bse/K_kernel.F | 23 ++++++++++-------- 3 files changed, 41 insertions(+), 45 deletions(-) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 8fae3b4f7e..1778152a91 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -40,7 +40,7 @@ subroutine K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) ! integer :: i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& & i_kmq_bz,i_pmq_bz,i_kmq,i_pmq,i_pmq_s,i_kp_mq_s,i_p_s,i_kmq_s,i_k_s,& -& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),& +& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),H_pos_start(2),& & i_v_k,i_v_p,i_c_k,i_c_p,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v,iq_W,& & i_kmq_t,i_pmq_t ! OMP LAST DEF @@ -114,16 +114,19 @@ subroutine K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! + H_pos_start(1)=sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+& + & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) + H_pos_start(2)=sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+& + & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + ! select case (mode_now) case("R","A","F") ! do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2)) cycle ! @@ -152,11 +155,8 @@ subroutine K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2)) cycle ! @@ -205,10 +205,8 @@ subroutine K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2)) cycle ! @@ -241,10 +239,8 @@ subroutine K_correlation_collisions_dir(iq,i_block,win1_ID,win2_ID,Xk,q) do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2)) cycle ! diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index b53d9b0d8f..1951d411dd 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -62,7 +62,7 @@ subroutine K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) ! integer :: i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& & i_kmq_bz,i_pmq_bz,i_kmq,i_pmq,i_kp_mq_s,& -& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),& +& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),H_pos_start(2),& & i_v_k,i_v_p,i_c_k,i_c_p,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v,iq_W,& & i_kmq_t,i_pmq_t ! OMP LAST DEF @@ -136,16 +136,19 @@ subroutine K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) mode_now=BS_blk(i_block)%mode if (.not.l_BS_ares_from_res) mode_now="F" ! + H_pos_start(1)=sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+& + & (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) + H_pos_start(2)=sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+& + & (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + ! select case (mode_now) case("R","A","F") ! do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! @@ -177,10 +180,8 @@ subroutine K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! @@ -231,10 +232,8 @@ subroutine K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! @@ -269,10 +268,8 @@ subroutine K_correlation_collisions_std(iq,i_block,win1_ID,win2_ID,Xk,q) do i_Tk=1,BS_T_grp(i_Tgrp_k)%size do i_Tp=1,BS_T_grp(i_Tgrp_p)%size ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk+& -& (BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp+& -& (BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! if (H_pos(1)>H_pos(2) .and. .not. l_BSE_kernel_full) cycle ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 4699330d05..99db3bece2 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -82,7 +82,7 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! integer :: i_k_s,i_k_s_m1,i_p_s,i_k_bz,i_p_bz,i_k,i_p,i_kp_s,& & i_kmq_s,i_kmq_s_m1,i_pmq_s,i_kmq_bz,i_pmq_bz,i_kmq,i_pmq,i_kp_mq_s,& -& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),& +& i_Tk,i_Tp,i_Tgrp_k,i_Tgrp_p,I_Tgrp_k_st,I_Tgrp_p_st,H_pos(2),H_pos_start(2),& & i_v_k,i_v_p,i_c_k,i_c_p,i_k_sp_pol_c,i_p_sp_pol_c,i_k_sp_pol_v,i_p_sp_pol_v,iq_W,iq_W_bz,iq_W_s,ig_W,& & i_kmq_t,i_pmq_t,i_k_bz_mem,i_kmq_bz_mem,qindx_tmp(2) ! OMP LAST DEF @@ -571,6 +571,14 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) i_k =BS_blk(i_block)%ik i_p =BS_blk(i_block)%ip ! + H_pos_start(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size) + H_pos_start(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size) + ! + if (.not.l_BS_ares_from_res) then + H_pos_start(1) = H_pos_start(1)+(BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) + H_pos_start(2) = H_pos_start(2)+(BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) + endif + ! ! Exchange oscillators !---------------------- if(iHxc==1) then @@ -628,8 +636,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) !------------------ ! !DEV_OMP parallel default(shared), & - !DEV_OMP private(i_Tk,i_Tp, O1,O2,O_times_W, & - !DEV_OMP & sqrt_f_itk,i_k_bz,i_v_k,i_c_k,i_k_sp_pol_c,i_k_sp_pol_v,i_k_s,is_k,os_k,i_k_s_m1,H_pos, & + !DEV_OMP private(i_Tk,i_Tp, O1,O2,O_times_W,H_pos, & + !DEV_OMP & sqrt_f_itk,i_k_bz,i_v_k,i_c_k,i_k_sp_pol_c,i_k_sp_pol_v,i_k_s,is_k,os_k,i_k_s_m1,& !DEV_OMP & sqrt_f_itp,i_p_bz,i_v_p,i_c_p,i_p_sp_pol_c,i_p_sp_pol_v,i_p_s,is_p,os_p,i_kp_s, & !DEV_OMP & i_kmq_bz,ig_kmq,i_kmq,i_kmq_s,i_kmq_t,i_kmq_s_m1,i_kp_mq_s, & !DEV_OMP & i_pmq_bz,ig_pmq,i_pmq,i_pmq_s,i_pmq_t,ig_W_final, & @@ -674,13 +682,8 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! H_pos defines the position inside the full bse matrix when ! l_BS_ares_from_res. Otherwise it defines the position inside the R/C blocks ! - H_pos(1) = sum(BS_T_grp(I_Tgrp_k_st:I_Tgrp_k-1)%size)+i_Tk - H_pos(2) = sum(BS_T_grp(I_Tgrp_p_st:I_Tgrp_p-1)%size)+i_Tp - ! - if (.not.l_BS_ares_from_res) then - H_pos(1) = H_pos(1)+(BS_T_grp(I_Tgrp_k)%i_res_ares-1)*BS_K_dim(1) - H_pos(2) = H_pos(2)+(BS_T_grp(I_Tgrp_p)%i_res_ares-1)*BS_K_dim(1) - endif + H_pos(1) = H_pos_start(1)+i_Tk + H_pos(2) = H_pos_start(2)+i_Tp ! ! When l_BS_ares_from_res=.false., the full coupling block, and ! the upper part of the anti-resonant blocks are also computed From 0cae0ed41bfe73c4bf2c68c48f926b0bb510f775 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 10 Dec 2025 13:52:15 +0100 Subject: [PATCH 1349/1367] Version 5.3.0, Revision 26330, Hash 9d1916555b MODIFIED * configure include/version/version.m4 nloptics/NL_driver.F Bugs: - Additions: - Changes: -Removed a useless IO Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- src/nloptics/NL_driver.F | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 958617eade..156bb83e94 100755 --- a/configure +++ b/configure @@ -3413,8 +3413,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26325" -SHASH="6e1dedaf86" +SREVISION="26330" +SHASH="9d1916555b" diff --git a/include/version/version.m4 b/include/version/version.m4 index 55af7da998..5fc41640d7 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26325" -SHASH="6e1dedaf86" +SREVISION="26330" +SHASH="9d1916555b" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/src/nloptics/NL_driver.F b/src/nloptics/NL_driver.F index 0ebc3fb958..031ec3666d 100644 --- a/src/nloptics/NL_driver.F +++ b/src/nloptics/NL_driver.F @@ -105,8 +105,10 @@ subroutine NL_driver(E,X,Xw,k,q,Dip) call DIPOLE_dimensions(E,Dip,NL_bands,(/0._SP,0._SP,0._SP/)) call DIPOLE_IO(k,E,Dip,'read ',io_err,'NL') if(io_err/=0) call error("Error in Dipoles I/O") - call OVERLAPS_IO(k,E,Dip,'read',io_err,'NL') - if(io_err/=0) call error("Error in Overlaps I/O") + if(.not.l_use_DIPOLES) then + call OVERLAPS_IO(k,E,Dip,'read',io_err,'NL') + if(io_err/=0) call error("Error in Overlaps I/O") + endif ! ! Generate bare_qpg if required !============================= From 9f709e5e4ce8d981b803e5159fc18f049587870b Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 10 Dec 2025 14:49:21 +0100 Subject: [PATCH 1350/1367] qindx_B MPI_Win_create moved inside iHxc loop for iHxc==3 --- src/bse/K_kernel.F | 50 ++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index 99db3bece2..ba96fff3f8 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -236,28 +236,6 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! if( l_BSE_kernel_complete) return ! - if(trim(PARALLEL_default_mode)=="KQmemory") then - ! - call msg("s","Buffering qindx_B in memory via MPI_Win_create ") - ! - call MPI_Info_create(mpi_info_nolocks, mpi_err) - call MPI_Info_set(mpi_info_nolocks, "no_locks", "true", mpi_err) ! Disable locking - call MPI_Info_set(mpi_info_nolocks, "read_only", "true", mpi_err) ! Read_only_mode - ! - ! MPI_Win_create will duplicate in memory qindx_B - ! If I want to avoid this, I need to use MPI_Win_Alloc ... - mpi_size=size(qindx_B(:,:,1)) - N2=sizeof(qindx_B(1,1,1)) - call MPI_Win_create(qindx_B(:,:,1), mpi_size*N2, N2, mpi_info_nolocks, mpi_comm_world, win1_ID, mpi_err) - call MPI_Win_create(qindx_B(:,:,2), mpi_size*N2, N2, mpi_info_nolocks, mpi_comm_world, win2_ID, mpi_err) - call MPI_Win_fence(0, win1_ID, mpi_err) - call MPI_Win_fence(0, win2_ID, mpi_err) - ! - ! Free the MPI_Info object as it's no longer needed - call MPI_Info_free(mpi_info_nolocks, mpi_err) - ! - endif - ! ! Screened interaction !====================== ! @@ -417,6 +395,28 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) ! endif ! + if(iHxc==3 .and. trim(PARALLEL_default_mode)=="KQmemory") then + ! + call msg("s","Buffering qindx_B in memory via MPI_Win_create ") + ! + call MPI_Info_create(mpi_info_nolocks, mpi_err) + call MPI_Info_set(mpi_info_nolocks, "no_locks", "true", mpi_err) ! Disable locking + call MPI_Info_set(mpi_info_nolocks, "read_only", "true", mpi_err) ! Read_only_mode + ! + ! MPI_Win_create will duplicate in memory qindx_B + ! If I want to avoid this, I need to use MPI_Win_Alloc ... + mpi_size=size(qindx_B(:,:,1)) + N2=sizeof(qindx_B(1,1,1)) + call MPI_Win_create(qindx_B(:,:,1), mpi_size*N2, N2, mpi_info_nolocks, mpi_comm_world, win1_ID, mpi_err) + call MPI_Win_create(qindx_B(:,:,2), mpi_size*N2, N2, mpi_info_nolocks, mpi_comm_world, win2_ID, mpi_err) + call MPI_Win_fence(0, win1_ID, mpi_err) + call MPI_Win_fence(0, win2_ID, mpi_err) + ! + ! Free the MPI_Info object as it's no longer needed + call MPI_Info_free(mpi_info_nolocks, mpi_err) + ! + endif + ! ! Timing !======== ! @@ -1008,15 +1008,13 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) if (l_std_alg) then YAMBO_FREE(WF_phase) endif - + ! if(trim(PARALLEL_default_mode)=="KQmemory") then - ! ! Free the window call MPI_Win_free(win1_ID, mpi_err) call MPI_Win_free(win2_ID, mpi_err) - ! endif - + ! YAMBO_FREE_GPU(BS_W) YAMBO_FREE(BS_W) ! From b6c5b5a5e0ddeac394dc5a0ea5833b7d0075a40d Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 12 Dec 2025 12:19:05 +0100 Subject: [PATCH 1351/1367] scalapack version updated to 2.2.2 This sould be complainat with new gnu standard, which are used in gfortran-15 --- lib/archive/package.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/archive/package.list b/lib/archive/package.list index 0545af825e..f138b58251 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -36,7 +36,7 @@ version_etsf_io=1.0.4 version_libxc=5.2.3 version_lapack=3.12.0 version_blacs=missing -version_scalapack=2.2.1 +version_scalapack=2.2.2 #version_elpa=release_2024_05_001 # This was neeeded for gitlab version_elpa=2024.05.001 version_magma=2.8.0 From bb6bc1700ab771f6a2dce420f150d6466038d4c7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Fri, 12 Dec 2025 13:18:54 +0100 Subject: [PATCH 1352/1367] Adderessed issus #250. Blacs removed --- config/m4/scalapack.m4 | 64 +- config/report.in | 1 - config/setup.in | 1 - configure | 2347 +++++++++++++++++++++----------------- lib/archive/package.list | 7 +- lib/blacs/Bmake.inc_lib | 215 ---- lib/blacs/Makefile.lib | 57 - lib/blacs/Makefile.loc | 51 - 8 files changed, 1313 insertions(+), 1430 deletions(-) delete mode 100644 lib/blacs/Bmake.inc_lib delete mode 100644 lib/blacs/Makefile.lib delete mode 100644 lib/blacs/Makefile.loc diff --git a/config/m4/scalapack.m4 b/config/m4/scalapack.m4 index fbbab4780d..942520a099 100644 --- a/config/m4/scalapack.m4 +++ b/config/m4/scalapack.m4 @@ -9,34 +9,28 @@ AC_DEFUN([AC_SLK_SETUP],[ AC_ARG_ENABLE(par_linalg, AS_HELP_STRING([--enable-par-linalg],[Use parallel linear algebra. Default is no])) -AC_ARG_WITH(blacs_libs, [AS_HELP_STRING([--with-blacs-libs=(libs|mkl)],[Use BLACS libraries or setup MKL],[32])]) AC_ARG_WITH(scalapack_libs,[AS_HELP_STRING([--with-scalapack-libs=(libs|mkl)],[Use SCALAPACK libraries or setup MKL],[32])]) AC_ARG_WITH(elpa_libs, [AS_HELP_STRING([--with-elpa-libs=(libs)],[Use ELPA libraries ],[32])]) AC_ARG_WITH(elpa_includedir,AS_HELP_STRING([--with-elpa-includedir=],[Path to the elpa include directory],[32])) SCALAPACK_LIBS="" -BLACS_LIBS="" ELPA_LIBS="" ELPA_INCS="" reset_LIBS="$LIBS" enable_scalapack="no" -enable_blacs="no" enable_elpa="no" internal_slk="no" -internal_blacs="no" internal_elpa="no" compile_slk="no" -compile_blacs="no" compile_elpa="no" # -# Set fortran linker names of BLACS/SCALAPACK functions to check for. +# Set fortran linker names of SCALAPACK functions to check for. # -blacs_routine="blacs_set" scalapack_routine="pcheev" elpa_routine="elpa_init" mpi_routine=MPI_Init @@ -78,23 +72,9 @@ fi # Parse configure options # if test "$enable_par_linalg" = "yes" ; then - enable_blacs="internal" ; enable_scalapack="internal" ; fi # -case $with_blacs_libs in - yes) enable_blacs="internal" ;; - no) enable_blacs="no" ; enable_par_linalg="no" ;; - mkl) - if test "$try_mkl_scalapack" = "no" ; then - enable_blacs="no" ; enable_par_linalg="no" - else - enable_blacs="check"; BLACS_LIBS="$try_mkl_scalapack" - fi - ;; - *) enable_blacs="check"; BLACS_LIBS="$with_blacs_libs" ;; -esac -# case $with_scalapack_libs in yes) enable_scalapack="internal" ;; no) enable_scalapack="no" ; enable_par_linalg="no" ;; @@ -116,27 +96,10 @@ esac # if test "$mpibuild" = "yes"; then # - if test "$enable_blacs" = "check" ; then - # - acx_blacs_save_LIBS="$BLACS_LIBS" - LIBS="$LIBS $FLIBS $LAPACK_LIBS $BLAS_LIBS" - # First, check BLACS_LIBS environment variable - if test "x$BLACS_LIBS" != x; then - save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - AC_MSG_CHECKING([for $blacs_routine in $BLACS_LIBS]) - AC_TRY_LINK_FUNC($blacs_routine, [enable_blacs="yes"], [enable_blacs="internal"; BLACS_LIBS=""]) - AC_MSG_RESULT($enable_blacs) - BLACS_LIBS="$acx_blacs_save_LIBS" - LIBS="$save_LIBS" - else - enable_blacs="no"; - fi - # - fi # if test "$enable_scalapack" = "check" ; then acx_scalapack_save_LIBS="$SCALAPACK_LIBS" - LIBS="$LIBS $FLIBS $LAPACK_LIBS $BLAS_LIBS $BLACS_LIBS" + LIBS="$LIBS $FLIBS $LAPACK_LIBS $BLAS_LIBS" # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" @@ -152,7 +115,7 @@ if test "$mpibuild" = "yes"; then # if test "$enable_elpa" = "check" ; then acx_elpa_save_LIBS="$ELPA_LIBS" - LIBS="$LIBS $FLIBS $SCALAPACK_LIBS $LAPACK_LIBS $BLAS_LIBS $BLACS_LIBS" + LIBS="$LIBS $FLIBS $SCALAPACK_LIBS $LAPACK_LIBS $BLAS_LIBS" # First, check ELPA_LIBS environment variable if test "x$ELPA_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$ELPA_LIBS $LIBS" @@ -173,10 +136,8 @@ if test "$mpibuild" = "yes"; then # if test x"$enable_par_linalg" = "xyes"; then if test x"$enable_int_linalg" = "xyes"; then - enable_blacs="internal"; enable_scalapack="internal"; else - if test "$enable_blacs" = "no"; then enable_blacs="internal" ; fi if test "$enable_scalapack" = "no"; then enable_scalapack="internal"; fi fi fi @@ -189,16 +150,6 @@ if test "$mpibuild" = "yes"; then # fi #fi # - if test "$mpif_found" = "yes" && test "$enable_blacs" = "internal"; then - enable_blacs="yes"; - internal_blacs="yes"; - BLACS_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_C_init.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; - if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; then - compile_blacs="no" - else - compile_blacs="yes" - fi - fi # if test "$mpif_found" = "yes" && test "$enable_scalapack" = "internal"; then enable_scalapack="yes" @@ -225,7 +176,7 @@ if test "$mpibuild" = "yes"; then # fi # -if test "$enable_blacs" = "yes" && test "$enable_scalapack" = "yes" ; then +if test "$enable_scalapack" = "yes" ; then def_scalapack="-D_SCALAPACK" if test "$enable_elpa" = "yes" ; then def_elpa="-D_ELPA" @@ -239,25 +190,20 @@ if test "$enable_blacs" = "yes" && test "$enable_scalapack" = "yes" ; then fi else enable_scalapack="no" - enable_blacs="no" enable_elpa="no" def_scalapack="" def_elpa="" - BLACS_LIBS="" SCALAPACK_LIBS="" ELPA_LIBS="" ELPA_INCS="" - compile_blacs="no" compile_slk="no" compile_elpa="no" - internal_blacs="no" internal_slk="no" internal_elpa="no" fi # LIBS="$reset_LIBS" # -AC_SUBST(BLACS_LIBS) AC_SUBST(SCALAPACK_LIBS) AC_SUBST(ELPA_LIBS) AC_SUBST(ELPA_INCS) @@ -267,8 +213,6 @@ AC_SUBST(def_scalapack) AC_SUBST(def_elpa) AC_SUBST(compile_slk) AC_SUBST(internal_slk) -AC_SUBST(compile_blacs) -AC_SUBST(internal_blacs) AC_SUBST(compile_elpa) AC_SUBST(internal_elpa) diff --git a/config/report.in b/config/report.in index 06799571a4..5d81566b77 100644 --- a/config/report.in +++ b/config/report.in @@ -61,7 +61,6 @@ # [@SLK_check@] SCALAPACK : @SCALAPACK_LIBS_R@ # [@ELPA_check@] ELPA : @ELPA_LIBS_R@ # @ELPA_INCS_R@ -# [@BLACS_check@] BLACS : @BLACS_LIBS_R@ # [@FFT_check@] FFT : @FFT_LIBS_R@ # @FFT_INCS_R@ # [@PETSC_check@] PETSC : @PETSC_LIBS_R@ @PETSC_info@ diff --git a/config/setup.in b/config/setup.in index dbcd32c25a..f0bbf04e78 100644 --- a/config/setup.in +++ b/config/setup.in @@ -53,7 +53,6 @@ llapack = @LAPACK_LIBS@ lblaspetsc = @BLAS_PETSC_LIBS@ llapackpetsc= @LAPACK_PETSC_LIBS@ petsc_flgs = @PETSC_FLAGS@ -lblacs = @BLACS_LIBS@ lscalapack = @SCALAPACK_LIBS@ lelpa = @ELPA_LIBS@ ielpa = @ELPA_INCS@ diff --git a/configure b/configure index 156bb83e94..d00f7687ae 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Lumen 2.0.0. +# Generated by GNU Autoconf 2.72 for Lumen 2.0.0. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -186,14 +187,15 @@ test -x / || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -226,12 +228,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -253,7 +256,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -273,7 +276,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -312,14 +316,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -388,11 +384,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -406,21 +403,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -494,6 +484,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -542,7 +534,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -554,9 +545,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -581,10 +572,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1290,7 +1279,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1503,7 +1492,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1519,7 +1508,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1549,8 +1538,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1558,7 +1547,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1608,7 +1597,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1676,7 +1665,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1704,7 +1693,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Lumen 2.0.0 to adapt to many kinds of systems. +'configure' configures Lumen 2.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1718,11 +1707,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1730,10 +1719,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -1863,7 +1852,6 @@ Optional Packages: Path to the Petsc include directory --with-slepc-branch= Use the of the slepc repository. --with-petsc-branch= Use the of the petsc repository. - --with-blacs-libs=(libs|mkl) Use BLACS libraries or setup MKL --with-scalapack-libs=(libs|mkl) Use SCALAPACK libraries or setup MKL --with-elpa-libs=(libs) Use ELPA libraries @@ -1958,7 +1946,7 @@ Some influential environment variables: MPIF77 Parallel Fortran 77 compiler command MPICC Parallel C compiler command -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -2027,9 +2015,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Lumen configure 2.0.0 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2068,11 +2056,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2091,8 +2080,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -2100,10 +2089,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2124,8 +2115,8 @@ printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2141,8 +2132,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2158,12 +2149,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2184,8 +2178,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2215,12 +2209,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2260,11 +2256,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -2306,12 +2303,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2347,11 +2345,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2389,11 +2388,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -2432,11 +2432,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2471,11 +2472,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2513,11 +2515,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -2540,15 +2543,15 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -2559,7 +2562,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2586,11 +2589,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2610,8 +2615,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF program main call $2 end @@ -2619,11 +2624,13 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2656,7 +2663,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Lumen $as_me 2.0.0, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2902,10 +2909,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -2941,9 +2948,7 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -2957,6 +2962,21 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -2984,16 +3004,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); +extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -3043,7 +3066,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -3109,6 +3131,8 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); // Check named initializers. struct named_init ni = { @@ -3130,7 +3154,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3322,8 +3346,9 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac fi @@ -3351,12 +3376,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3365,18 +3390,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3392,11 +3417,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3498,8 +3523,9 @@ fi if test ${with_extlibs_path+y} then : withval=$with_extlibs_path; extlibs_path="$with_extlibs_path" -else $as_nop - extlibs_path="${PWD}/lib/external" +else case e in #( + e) extlibs_path="${PWD}/lib/external" ;; +esac fi if test x"$extlibs_path" = "xyes"; then extlibs_path="${PWD}/lib/external"; fi @@ -3659,8 +3685,9 @@ fi if test ${with_editor+y} then : withval=$with_editor; -else $as_nop - with_editor="vim vi pico" +else case e in #( + e) with_editor="vim vi pico" ;; +esac fi for ac_prog in $with_editor @@ -3672,8 +3699,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_editor+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$editor"; then +else case e in #( + e) if test -n "$editor"; then ac_cv_prog_editor="$editor" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3695,7 +3722,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi editor=$ac_cv_prog_editor if test -n "$editor"; then @@ -3721,8 +3749,9 @@ test -n "$editor" || editor="none" if test ${with_echo+y} then : withval=$with_echo; -else $as_nop - with_echo="echo" +else case e in #( + e) with_echo="echo" ;; +esac fi if test x"$with_echo" = "x"; then AC_PROG_ECHO; fi @@ -3756,8 +3785,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3779,7 +3808,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3801,8 +3831,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3824,7 +3854,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -3859,8 +3890,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3882,7 +3913,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3904,8 +3936,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -3944,7 +3976,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -3968,8 +4001,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3991,7 +4024,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4017,8 +4051,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4040,7 +4074,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4078,8 +4113,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4101,7 +4136,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4123,8 +4159,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4146,7 +4182,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4175,10 +4212,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -4250,8 +4287,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -4271,7 +4308,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -4282,8 +4319,9 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi if test -z "$ac_file" then : @@ -4292,13 +4330,14 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -4322,10 +4361,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -4335,11 +4374,12 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -4355,6 +4395,8 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -4394,26 +4436,27 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4445,16 +4488,18 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -4465,8 +4510,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -4483,12 +4528,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -4506,8 +4553,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -4525,8 +4572,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4541,8 +4588,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4559,12 +4606,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -4591,8 +4641,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4609,25 +4659,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4637,8 +4690,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4655,25 +4708,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -4683,8 +4739,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4701,25 +4757,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -4763,8 +4822,9 @@ ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_i if test "x$ac_cv_header_malloc_h" = xyes then : have_malloc_h=1 -else $as_nop - have_malloc_h=0 +else case e in #( + e) have_malloc_h=0 ;; +esac fi CFLAGS=$SAVE @@ -5123,8 +5183,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GIT_CHECK+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$GIT_CHECK"; then +else case e in #( + e) if test -n "$GIT_CHECK"; then ac_cv_prog_GIT_CHECK="$GIT_CHECK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5146,7 +5206,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi GIT_CHECK=$ac_cv_prog_GIT_CHECK if test -n "$GIT_CHECK"; then @@ -5203,10 +5264,11 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h - + ;; +esac fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works @@ -5216,8 +5278,8 @@ printf %s "checking for working alloca.h... " >&6; } if test ${ac_cv_working_alloca_h+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -5232,11 +5294,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_working_alloca_h=yes -else $as_nop - ac_cv_working_alloca_h=no +else case e in #( + e) ac_cv_working_alloca_h=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 printf "%s\n" "$ac_cv_working_alloca_h" >&6; } @@ -5251,10 +5315,10 @@ printf %s "checking for alloca... " >&6; } if test ${ac_cv_func_alloca_works+y} then : printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes -else +else case e in #( + e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h +if test "$ac_cv_func_alloca_works" != yes +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5285,15 +5349,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_alloca_works=yes -else $as_nop - ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi if test $ac_cv_func_alloca_works = yes; then @@ -5315,12 +5378,12 @@ printf %s "checking stack direction for C alloca... " >&6; } if test ${ac_cv_c_stack_direction+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_c_stack_direction=0 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -5343,13 +5406,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_stack_direction=1 -else $as_nop - ac_cv_c_stack_direction=-1 +else case e in #( + e) ac_cv_c_stack_direction=-1 ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 printf "%s\n" "$ac_cv_c_stack_direction" >&6; } @@ -5363,8 +5429,8 @@ printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5428,10 +5494,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes -else $as_nop - ac_cv_c_const=no +else case e in #( + e) ac_cv_c_const=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } @@ -5446,8 +5514,8 @@ printf %s "checking for inline... " >&6; } if test ${ac_cv_c_inline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_inline=no +else case e in #( + e) ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5465,7 +5533,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test "$ac_cv_c_inline" != no && break done - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 printf "%s\n" "$ac_cv_c_inline" >&6; } @@ -5497,15 +5566,16 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias +else case e in #( + e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -5532,14 +5602,15 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then +else case e in #( + e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -5566,19 +5637,19 @@ printf %s "checking for GNU libc compatible malloc... " >&6; } if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) + | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5596,13 +5667,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_malloc_0_nonnull=yes -else $as_nop - ac_cv_func_malloc_0_nonnull=no +else case e in #( + e) ac_cv_func_malloc_0_nonnull=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } @@ -5611,8 +5685,8 @@ then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h +else case e in #( + e) printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; @@ -5622,7 +5696,8 @@ esac printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h - + ;; +esac fi @@ -5631,19 +5706,19 @@ printf %s "checking for GNU libc compatible realloc... " >&6; } if test ${ac_cv_func_realloc_0_nonnull+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ - | hpux* | solaris* | cygwin* | mingw* | msys* ) + | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_realloc_0_nonnull=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5661,13 +5736,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_realloc_0_nonnull=yes -else $as_nop - ac_cv_func_realloc_0_nonnull=no +else case e in #( + e) ac_cv_func_realloc_0_nonnull=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } @@ -5676,8 +5754,8 @@ then : printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h -else $as_nop - printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h +else case e in #( + e) printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; @@ -5687,7 +5765,8 @@ esac printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h - + ;; +esac fi @@ -5696,8 +5775,8 @@ printf %s "checking whether lstat correctly handles trailing slash... " >&6; } if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} then : printf %s "(cached) " >&6 -else $as_nop - rm -f conftest.sym conftest.file +else case e in #( + e) rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes @@ -5708,8 +5787,8 @@ then : # If we don't know, assume the worst. *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; esac -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -5727,20 +5806,23 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_lstat_dereferences_slashed_symlink=yes -else $as_nop - ac_cv_func_lstat_dereferences_slashed_symlink=no +else case e in #( + e) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi else - # If the `ln -s' command failed, then we probably don't even + # If the 'ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } @@ -5764,12 +5846,12 @@ printf %s "checking whether stat accepts an empty string... " >&6; } if test ${ac_cv_func_stat_empty_string_bug+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_func_stat_empty_string_bug=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -5784,13 +5866,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_stat_empty_string_bug=no -else $as_nop - ac_cv_func_stat_empty_string_bug=yes +else case e in #( + e) ac_cv_func_stat_empty_string_bug=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } @@ -5813,8 +5898,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 -else $as_nop - cat >conftest.make <<\_ACEOF +else case e in #( + e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' @@ -5826,7 +5911,8 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in *) eval ac_cv_prog_make_${ac_make}_set=no;; esac -rm -f conftest.make +rm -f conftest.make ;; +esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -5892,8 +5978,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5915,7 +6001,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5937,8 +6024,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5960,7 +6047,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5995,8 +6083,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6018,7 +6106,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -6040,8 +6129,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -6080,7 +6169,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -6104,8 +6194,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6127,7 +6217,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -6153,8 +6244,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6176,7 +6267,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -6214,8 +6306,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6237,7 +6329,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -6259,8 +6352,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6282,7 +6375,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -6311,10 +6405,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -6346,8 +6440,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6364,12 +6458,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -6387,8 +6483,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -6406,8 +6502,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6422,8 +6518,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6440,12 +6536,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -6472,8 +6571,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6490,25 +6589,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -6518,8 +6620,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6536,25 +6638,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -6564,8 +6669,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6582,25 +6687,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -6622,8 +6730,8 @@ printf %s "checking for GNU make... " >&6; } if test ${_cv_gnu_make_command+y} then : printf %s "(cached) " >&6 -else $as_nop - _cv_gnu_make_command='' ; +else case e in #( + e) _cv_gnu_make_command='' ; for a in "$MAKE" make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then @@ -6631,7 +6739,8 @@ else $as_nop break; fi done ; - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5 printf "%s\n" "$_cv_gnu_make_command" >&6; } ; @@ -6667,8 +6776,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then +else case e in #( + e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6690,7 +6799,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then @@ -6712,8 +6822,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then +else case e in #( + e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6735,7 +6845,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then @@ -6800,8 +6911,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$FC"; then +else case e in #( + e) if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6823,7 +6934,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi FC=$ac_cv_prog_FC if test -n "$FC"; then @@ -6849,8 +6961,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_FC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_FC"; then +else case e in #( + e) if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6872,7 +6984,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then @@ -6927,7 +7040,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 done rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the +# If we don't use '.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F @@ -6936,8 +7049,8 @@ printf %s "checking whether the compiler supports GNU Fortran... " >&6; } if test ${ac_cv_fc_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me @@ -6948,12 +7061,14 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5 printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; } @@ -6968,8 +7083,8 @@ printf %s "checking whether $FC accepts -g... " >&6; } if test ${ac_cv_prog_fc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - FCFLAGS=-g +else case e in #( + e) FCFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main @@ -6978,11 +7093,13 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : ac_cv_prog_fc_g=yes -else $as_nop - ac_cv_prog_fc_g=no +else case e in #( + e) ac_cv_prog_fc_g=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5 printf "%s\n" "$ac_cv_prog_fc_g" >&6; } @@ -7123,8 +7240,8 @@ printf %s "checking for Fortran flag to compile .f90 files... " >&6; } if test ${ac_cv_fc_srcext_f90+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_ext=f90 +else case e in #( + e) ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= ac_cv_fc_srcext_f90=unknown @@ -7147,7 +7264,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } @@ -7181,8 +7299,8 @@ printf %s "checking for Fortran flag to compile .f files... " >&6; } if test ${ac_cv_fc_srcext_f+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_ext=f +else case e in #( + e) ac_ext=f ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= ac_cv_fc_srcext_f=unknown @@ -7205,7 +7323,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f ac_fcflags_srcext=$ac_fcflags_srcext_save - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f" >&5 printf "%s\n" "$ac_cv_fc_srcext_f" >&6; } @@ -7849,24 +7968,27 @@ GPU_SUPPORT="no_gpu" if test ${enable_cuda_fortran+y} then : enableval=$enable_cuda_fortran; -else $as_nop - enable_cuda_fortran="no" +else case e in #( + e) enable_cuda_fortran="no" ;; +esac fi # Check whether --enable-openacc was given. if test ${enable_openacc+y} then : enableval=$enable_openacc; -else $as_nop - enable_openacc="no" +else case e in #( + e) enable_openacc="no" ;; +esac fi # Check whether --enable-openmp5 was given. if test ${enable_openmp5+y} then : enableval=$enable_openmp5; -else $as_nop - enable_openmp5="no" +else case e in #( + e) enable_openmp5="no" ;; +esac fi # @@ -7912,8 +8034,8 @@ printf %s "checking how to get verbose linking output from $FC... " >&6; } if test ${ac_cv_prog_fc_v+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF program main end @@ -8013,12 +8135,14 @@ if test -z "$ac_cv_prog_fc_v"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5 printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5 printf "%s\n" "$ac_cv_prog_fc_v" >&6; } @@ -8027,8 +8151,8 @@ printf %s "checking for Fortran libraries of $FC... " >&6; } if test ${ac_cv_fc_libs+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$FCLIBS" != "x"; then +else case e in #( + e) if test "x$FCLIBS" != "x"; then ac_cv_fc_libs="$FCLIBS" # Let the user override the test. else @@ -8132,8 +8256,9 @@ while test $# != 1; do if test x"$ac_exists" = xtrue then : -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +else case e in #( + e) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; +esac fi ;; -bI:*) @@ -8148,24 +8273,25 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - if test "$ac_compiler_gnu" = yes; then +else case e in #( + e) if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt" done else ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" -fi +fi ;; +esac fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ |-LANG:=* | -LIST:* | -LNO:* | -link) ;; - -lkernel32) + -lkernel32 | -lmingw* | -lmoldname) # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; + cygwin* | msys* | mingw* | windows*) ;; *) ac_exists=false for ac_i in $ac_cv_fc_libs; do @@ -8178,8 +8304,9 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +else case e in #( + e) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; +esac fi ;; esac @@ -8210,9 +8337,10 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - ac_arg="$ac_arg $ac_j" - ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" +else case e in #( + e) ac_arg="$ac_arg $ac_j" + ac_cv_fc_libs="$ac_cv_fc_libs $ac_j" ;; +esac fi done ;; @@ -8228,8 +8356,9 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" +else case e in #( + e) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" ;; +esac fi ;; -zallextract*| -zdefaultextract) @@ -8260,7 +8389,8 @@ fi ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5 printf "%s\n" "$ac_cv_fc_libs" >&6; } @@ -8283,8 +8413,8 @@ printf %s "checking for dummy main to link with Fortran libraries... " >&6; } if test ${ac_cv_fc_dummy_main+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_fc_dm_save_LIBS=$LIBS +else case e in #( + e) ac_fc_dm_save_LIBS=$LIBS LIBS="$LIBS $FCLIBS" ac_fortran_dm_var=FC_DUMMY_MAIN ac_ext=c @@ -8316,8 +8446,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_fortran_dummy_main=none -else $as_nop - ac_cv_fortran_dummy_main=unknown +else case e in #( + e) ac_cv_fortran_dummy_main=unknown ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -8358,7 +8489,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main rm -rf conftest* LIBS=$ac_fc_dm_save_LIBS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5 printf "%s\n" "$ac_cv_fc_dummy_main" >&6; } @@ -8375,11 +8507,12 @@ printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -8397,8 +8530,8 @@ printf %s "checking for Fortran name-mangling scheme... " >&6; } if test ${ac_cv_fc_mangling+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return end @@ -8427,8 +8560,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char $ac_func (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (void); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -8483,8 +8622,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char $ac_func (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (void); #ifdef FC_DUMMY_MAIN #ifndef FC_DUMMY_MAIN_EQ_F77 # ifdef __cplusplus @@ -8535,14 +8680,16 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5 printf "%s\n" "$ac_cv_fc_mangling" >&6; } @@ -8756,8 +8903,8 @@ printf %s "checking for Fortran flag needed to accept free-form source... " >&6; if test ${ac_cv_fc_freeform+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_fc_freeform=unknown +else case e in #( + e) ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ -freeform "-f free" -8 +source=free -nfix --nfix -Free @@ -8779,7 +8926,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 printf "%s\n" "$ac_cv_fc_freeform" >&6; } @@ -8812,8 +8960,8 @@ printf %s "checking fortran 90 modules inclusion flag... " >&6; } if test ${ax_cv_f90_modflag+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_ext=${ac_fc_srcext-f} +else case e in #( + e) ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu @@ -8873,7 +9021,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5 printf "%s\n" "$ax_cv_f90_modflag" >&6; } @@ -8898,8 +9047,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded +else case e in #( + e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -8917,9 +9066,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -8933,15 +9083,16 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -8950,7 +9101,8 @@ fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else @@ -8973,9 +9125,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -8989,24 +9142,26 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -9101,8 +9256,9 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : acx_C_ok=yes -else $as_nop - CPP_TESTS_PASSED=no +else case e in #( + e) CPP_TESTS_PASSED=no ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acx_C_ok" >&5 @@ -9230,8 +9386,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_F77+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$F77"; then +else case e in #( + e) if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9253,7 +9409,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi F77=$ac_cv_prog_F77 if test -n "$F77"; then @@ -9279,8 +9436,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_F77+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_F77"; then +else case e in #( + e) if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9302,7 +9459,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then @@ -9357,7 +9515,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 done rm -f a.out -# If we don't use `.F' as extension, the preprocessor is not run on the +# If we don't use '.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F @@ -9366,8 +9524,8 @@ printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; } if test ${ac_cv_f77_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me @@ -9378,12 +9536,14 @@ _ACEOF if ac_fn_f77_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; } @@ -9398,8 +9558,8 @@ printf %s "checking whether $F77 accepts -g... " >&6; } if test ${ac_cv_prog_f77_g+y} then : printf %s "(cached) " >&6 -else $as_nop - FFLAGS=-g +else case e in #( + e) FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main @@ -9408,11 +9568,13 @@ _ACEOF if ac_fn_f77_try_compile "$LINENO" then : ac_cv_prog_f77_g=yes -else $as_nop - ac_cv_prog_f77_g=no +else case e in #( + e) ac_cv_prog_f77_g=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 printf "%s\n" "$ac_cv_prog_f77_g" >&6; } @@ -9454,10 +9616,11 @@ if ac_fn_f77_try_compile "$LINENO" then : acx_f77_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else case e in #( + e) acx_f77_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }; -as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 +as_fn_error $? "Fortran 77 compiler does not work. Impossible to continue." "$LINENO" 5 ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_ext=c @@ -9531,8 +9694,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPIFC_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPIFC_test"; then +else case e in #( + e) if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9554,7 +9717,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then @@ -9571,20 +9735,21 @@ done test -n "$MPIFC_test" || MPIFC_test="$FC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 printf %s "checking for $MPIFC... " >&6; } if eval test \${$as_ac_File+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" -fi +fi ;; +esac fi eval ac_res=\$$as_ac_File { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -9592,8 +9757,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes" then : MPIFC_test=$MPIFC -else $as_nop - for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpiifx mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r +else case e in #( + e) for ac_prog in $MPIFC mpipgifort mpiifort mpifort mpiifx mpif90 mpxlf90 mpxlf mpf90 mpxlf95 mpxlf_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -9602,8 +9767,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPIFC_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPIFC_test"; then +else case e in #( + e) if test -n "$MPIFC_test"; then ac_cv_prog_MPIFC_test="$MPIFC_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9625,7 +9790,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPIFC_test=$ac_cv_prog_MPIFC_test if test -n "$MPIFC_test"; then @@ -9640,7 +9806,8 @@ fi test -n "$MPIFC_test" && break done test -n "$MPIFC_test" || MPIFC_test="$FC" - + ;; +esac fi fi @@ -9661,9 +9828,10 @@ then : acx_mpi_ok="yes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -9704,9 +9872,10 @@ if ac_fn_fc_try_compile "$LINENO" then : HAVE_MPIF_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) HAVE_MPIF_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -9731,9 +9900,10 @@ if ac_fn_fc_try_compile "$LINENO" then : HAVE_MPI_H=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) HAVE_MPI_H=0; acx_mpi_ok="no" ; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi @@ -9757,9 +9927,10 @@ if ac_fn_fc_try_compile "$LINENO" then : HAVE_MPI_MOD=1; acx_mpi_ok="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) HAVE_MPI_MOD=0; acx_mpi_ok="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext;fi @@ -9809,20 +9980,21 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if ! test x"$MPIF77" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | $as_tr_sh` + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIF77" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIF77" >&5 printf %s "checking for $MPIF77... " >&6; } if eval test \${$as_ac_File+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIF77"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" -fi +fi ;; +esac fi eval ac_res=\$$as_ac_File { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -9830,8 +10002,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes" then : MPIF77_test=$MPIF77 -else $as_nop - for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c +else case e in #( + e) for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -9840,8 +10012,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPIF77_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPIF77_test"; then +else case e in #( + e) if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9863,7 +10035,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then @@ -9878,24 +10051,26 @@ fi test -n "$MPIF77_test" && break done test -n "$MPIF77_test" || MPIF77_test="$F77" - + ;; +esac fi elif ! test x"$MPIFC" = "x" ; then - as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | $as_tr_sh` + as_ac_File=`printf "%s\n" "ac_cv_file_$MPIFC" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPIFC" >&5 printf %s "checking for $MPIFC... " >&6; } if eval test \${$as_ac_File+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPIFC"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" -fi +fi ;; +esac fi eval ac_res=\$$as_ac_File { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -9903,8 +10078,8 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes" then : MPIF77_test=$MPIFC -else $as_nop - for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c +else case e in #( + e) for ac_prog in $MPIF77 $MPIFC mpipgifort mpiifort mpifort mpiifx mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -9913,8 +10088,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPIF77_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPIF77_test"; then +else case e in #( + e) if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9936,7 +10111,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then @@ -9951,7 +10127,8 @@ fi test -n "$MPIF77_test" && break done test -n "$MPIF77_test" || MPIF77_test="$F77" - + ;; +esac fi else @@ -9964,8 +10141,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPIF77_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPIF77_test"; then +else case e in #( + e) if test -n "$MPIF77_test"; then ac_cv_prog_MPIF77_test="$MPIF77_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9987,7 +10164,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPIF77_test=$ac_cv_prog_MPIF77_test if test -n "$MPIF77_test"; then @@ -10021,9 +10199,10 @@ then : ac_mpi_ok="yes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -10107,8 +10286,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPICC_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPICC_test"; then +else case e in #( + e) if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10130,7 +10309,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then @@ -10147,20 +10327,21 @@ done test -n "$MPICC_test" || MPICC_test="$CC" else - as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | $as_tr_sh` + as_ac_File=`printf "%s\n" "ac_cv_file_$MPICC" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPICC" >&5 printf %s "checking for $MPICC... " >&6; } if eval test \${$as_ac_File+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPICC"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" -fi +fi ;; +esac fi eval ac_res=\$$as_ac_File { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -10169,11 +10350,11 @@ if eval test \"x\$"$as_ac_File"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$MPICC" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$MPICC" | sed "$as_sed_cpp"` 1 _ACEOF MPICC_test=$MPICC -else $as_nop - for ac_prog in $MPICC mpipgicc mpiicc mpicc mpiicpx hcc mpcc mpcc_r mpxlc cmpicc +else case e in #( + e) for ac_prog in $MPICC mpipgicc mpiicc mpicc mpiicpx hcc mpcc mpcc_r mpxlc cmpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -10182,8 +10363,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MPICC_test+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$MPICC_test"; then +else case e in #( + e) if test -n "$MPICC_test"; then ac_cv_prog_MPICC_test="$MPICC_test" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10205,7 +10386,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi MPICC_test=$ac_cv_prog_MPICC_test if test -n "$MPICC_test"; then @@ -10220,7 +10402,8 @@ fi test -n "$MPICC_test" && break done test -n "$MPICC_test" || MPICC_test="$CC" - + ;; +esac fi fi @@ -10271,9 +10454,10 @@ if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; };acx_mpi_ok="yes" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;acx_mpi_ok="no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -10471,20 +10655,21 @@ if test "$mpibuild" = "yes"; then if test x"$MPI_INC_DIR" = "x" ; then for MPI_INC_DIR in $MPI_INC_DIRS_LIST; do if ! test -e "$MPI_INC_DIR"; then continue; fi - as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | $as_tr_sh` + as_ac_File=`printf "%s\n" "ac_cv_file_$MPI_INC_DIR/mpif.h" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $MPI_INC_DIR/mpif.h" >&5 printf %s "checking for $MPI_INC_DIR/mpif.h... " >&6; } if eval test \${$as_ac_File+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$MPI_INC_DIR/mpif.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" -fi +fi ;; +esac fi eval ac_res=\$$as_ac_File { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -10492,8 +10677,9 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes" then : mpif_found_tmp="yes" -else $as_nop - mpif_found_tmp="no" +else case e in #( + e) mpif_found_tmp="no" ;; +esac fi if test "$mpif_found_tmp" = "yes" ; then @@ -10753,8 +10939,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GIT+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$GIT"; then +else case e in #( + e) if test -n "$GIT"; then ac_cv_prog_GIT="$GIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10776,7 +10962,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi GIT=$ac_cv_prog_GIT if test -n "$GIT"; then @@ -10798,8 +10985,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_GIT+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_GIT"; then +else case e in #( + e) if test -n "$ac_ct_GIT"; then ac_cv_prog_ac_ct_GIT="$ac_ct_GIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10821,7 +11008,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_GIT=$ac_cv_prog_ac_ct_GIT if test -n "$ac_ct_GIT"; then @@ -10887,8 +11075,8 @@ printf %s "checking how to get verbose linking output from $F77... " >&6; } if test ${ac_cv_prog_f77_v+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF program main end @@ -10988,12 +11176,14 @@ if test -z "$ac_cv_prog_f77_v"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5 printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 -printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5 +printf "%s\n" "$as_me: WARNING: compilation failed" >&2;} ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5 printf "%s\n" "$ac_cv_prog_f77_v" >&6; } @@ -11002,8 +11192,8 @@ printf %s "checking for Fortran 77 libraries of $F77... " >&6; } if test ${ac_cv_f77_libs+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$FLIBS" != "x"; then +else case e in #( + e) if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. else @@ -11107,8 +11297,9 @@ while test $# != 1; do if test x"$ac_exists" = xtrue then : -else $as_nop - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +else case e in #( + e) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; +esac fi ;; -bI:*) @@ -11123,24 +11314,25 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - if test "$ac_compiler_gnu" = yes; then +else case e in #( + e) if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $ac_arg; do ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" done else ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" -fi +fi ;; +esac fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ |-LANG:=* | -LIST:* | -LNO:* | -link) ;; - -lkernel32) + -lkernel32 | -lmingw* | -lmoldname) # Ignore this library only on Windows-like systems. case $host_os in - cygwin* | msys* ) ;; + cygwin* | msys* | mingw* | windows*) ;; *) ac_exists=false for ac_i in $ac_cv_f77_libs; do @@ -11153,8 +11345,9 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +else case e in #( + e) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; +esac fi ;; esac @@ -11185,9 +11378,10 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - ac_arg="$ac_arg $ac_j" - ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" +else case e in #( + e) ac_arg="$ac_arg $ac_j" + ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" ;; +esac fi done ;; @@ -11203,8 +11397,9 @@ fi if test x"$ac_exists" = xtrue then : -else $as_nop - ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +else case e in #( + e) ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" ;; +esac fi ;; -zallextract*| -zdefaultextract) @@ -11235,7 +11430,8 @@ fi ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5 printf "%s\n" "$ac_cv_f77_libs" >&6; } @@ -11311,8 +11507,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : acx_blas_ok=yes -else $as_nop - BLAS_LIBS="" +else case e in #( + e) BLAS_LIBS="" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -11326,7 +11523,7 @@ fi # BLAS linked to by default? (happens on some supercomputers) if test $acx_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$caxpy" | sed "$as_sed_sh"` ac_fn_fc_check_func "$LINENO" "$caxpy" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : @@ -11343,8 +11540,8 @@ printf %s "checking for ATL_xerbla in -latlas... " >&6; } if test ${ac_cv_lib_atlas_ATL_xerbla+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11354,25 +11551,27 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : ac_cv_lib_atlas_ATL_xerbla=yes -else $as_nop - ac_cv_lib_atlas_ATL_xerbla=no +else case e in #( + e) ac_cv_lib_atlas_ATL_xerbla=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 printf "%s\n" "$ac_cv_lib_atlas_ATL_xerbla" >&6; } if test "x$ac_cv_lib_atlas_ATL_xerbla" = xyes then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_f77blas_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lf77blas" >&5 printf %s "checking for $caxpy in -lf77blas... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11382,12 +11581,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11399,8 +11600,8 @@ printf %s "checking for cblas_daxpy in -lcblas... " >&6; } if test ${ac_cv_lib_cblas_cblas_daxpy+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11410,12 +11611,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : ac_cv_lib_cblas_cblas_daxpy=yes -else $as_nop - ac_cv_lib_cblas_cblas_daxpy=no +else case e in #( + e) ac_cv_lib_cblas_cblas_daxpy=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_daxpy" >&5 printf "%s\n" "$ac_cv_lib_cblas_cblas_daxpy" >&6; } @@ -11433,14 +11636,14 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 printf %s "checking for $caxpy in -lblas... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11450,26 +11653,28 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_daxpy_$daxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $daxpy in -ldaxpy" >&5 printf %s "checking for $daxpy in -ldaxpy... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11479,26 +11684,28 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_caxpy_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcaxpy" >&5 printf %s "checking for $caxpy in -lcaxpy... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcaxpy -lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11508,12 +11715,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11531,14 +11740,14 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_cxml_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcxml" >&5 printf %s "checking for $caxpy in -lcxml... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11548,12 +11757,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11567,14 +11778,14 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_dxml_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -ldxml" >&5 printf %s "checking for $caxpy in -ldxml... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11584,12 +11795,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11609,8 +11822,8 @@ printf %s "checking for acosp in -lsunmath... " >&6; } if test ${ac_cv_lib_sunmath_acosp+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11620,25 +11833,27 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : ac_cv_lib_sunmath_acosp=yes -else $as_nop - ac_cv_lib_sunmath_acosp=no +else case e in #( + e) ac_cv_lib_sunmath_acosp=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sunmath_acosp" >&5 printf "%s\n" "$ac_cv_lib_sunmath_acosp" >&6; } if test "x$ac_cv_lib_sunmath_acosp" = xyes then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_sunperf_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lsunperf" >&5 printf %s "checking for $caxpy in -lsunperf... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11648,12 +11863,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11671,14 +11888,14 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_scs_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lscs" >&5 printf %s "checking for $caxpy in -lscs... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11688,12 +11905,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11707,14 +11926,14 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_complib.sgimath_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lcomplib.sgimath" >&5 printf %s "checking for $caxpy in -lcomplib.sgimath... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11724,12 +11943,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11743,14 +11964,14 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 printf %s "checking for $caxpy in -lblas... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11760,26 +11981,28 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : - as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_essl_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lessl" >&5 printf %s "checking for $caxpy in -lessl... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11789,12 +12012,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11816,14 +12041,14 @@ if test $acx_blas_ok = no && test -d "${MKLROOT}" ; then *gfortran* ) case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_lp64_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf_lp64" >&5 printf %s "checking for $caxpy in -lmkl_gf_lp64... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf_lp64 -L${mkl_libdir} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11833,12 +12058,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11850,14 +12077,14 @@ fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_gf_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_gf" >&5 printf %s "checking for $caxpy in -lmkl_gf... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_gf -L${mkl_libdir} -lmkl_gf -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11867,12 +12094,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11890,14 +12119,14 @@ fi # 64 bit case "${host}" in *x86*64*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_lp64_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel_lp64" >&5 printf %s "checking for $caxpy in -lmkl_intel_lp64... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel_lp64 -L${mkl_libdir} -lmkl_intel_lp64 -lmkl_core -lmkl_sequential -lpthread -lm $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11907,12 +12136,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11924,14 +12155,14 @@ fi ;; i?86*linux*) - as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_mkl_intel_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lmkl_intel" >&5 printf %s "checking for $caxpy in -lmkl_intel... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmkl_intel -L${mkl_libdir} -lmkl_intel -lmkl_sequential -lmkl_core -lpthread $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11941,12 +12172,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11963,14 +12196,14 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_blas_$caxpy" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $caxpy in -lblas" >&5 printf %s "checking for $caxpy in -lblas... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -11980,12 +12213,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -12087,8 +12322,8 @@ printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; } if test ${ac_cv_f77_dummy_main+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_f77_dm_save_LIBS=$LIBS +else case e in #( + e) ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" ac_fortran_dm_var=F77_DUMMY_MAIN ac_ext=c @@ -12128,8 +12363,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_fortran_dummy_main=none -else $as_nop - ac_cv_fortran_dummy_main=unknown +else case e in #( + e) ac_cv_fortran_dummy_main=unknown ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -12178,7 +12414,8 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main rm -rf conftest* LIBS=$ac_f77_dm_save_LIBS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5 printf "%s\n" "$ac_cv_f77_dummy_main" >&6; } @@ -12195,11 +12432,12 @@ printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h fi fi -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "linking to Fortran libraries from C fails -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=${ac_fc_srcext-f} @@ -12216,8 +12454,8 @@ printf %s "checking for Fortran 77 name-mangling scheme... " >&6; } if test ${ac_cv_f77_mangling+y} then : printf %s "(cached) " >&6 -else $as_nop - cat > conftest.$ac_ext <<_ACEOF +else case e in #( + e) cat > conftest.$ac_ext <<_ACEOF subroutine foobar() return end @@ -12246,8 +12484,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char $ac_func (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -12310,8 +12554,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char $ac_func (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -12370,14 +12620,16 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu LIBS=$ac_save_LIBS rm -rf conftest* rm -f cfortran_test* -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compile a simple Fortran program -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5 printf "%s\n" "$ac_cv_f77_mangling" >&6; } @@ -12431,8 +12683,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : acx_lapack_ok=yes -else $as_nop - LAPACK_LIBS="" +else case e in #( + e) LAPACK_LIBS="" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -12447,7 +12700,7 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$cheev" | sed "$as_sed_sh"` ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : @@ -12461,14 +12714,14 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | $as_tr_sh` + as_ac_Lib=`printf "%s\n" "ac_cv_lib_$lapack""_$cheev" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $cheev in -l$lapack" >&5 printf %s "checking for $cheev in -l$lapack... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" cat > conftest.$ac_ext <<_ACEOF program main @@ -12478,12 +12731,14 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -12531,8 +12786,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : acx_dlaran_ok=yes -else $as_nop - acx_dlaran_ok=no +else case e in #( + e) acx_dlaran_ok=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -12643,16 +12899,18 @@ fi if test ${enable_internal_fftqe+y} then : enableval=$enable_internal_fftqe; -else $as_nop - enable_internal_fftqe=no +else case e in #( + e) enable_internal_fftqe=no ;; +esac fi # Check whether --enable-internal_fftsg was given. if test ${enable_internal_fftsg+y} then : enableval=$enable_internal_fftsg; -else $as_nop - enable_internal_fftsg=no +else case e in #( + e) enable_internal_fftsg=no ;; +esac fi # Check whether --enable-3d_fft was given. @@ -12784,8 +13042,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : HAVE_FFTW="yes"; -else $as_nop - HAVE_FFTW="no"; +else case e in #( + e) HAVE_FFTW="no"; ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -12795,8 +13054,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : HAVE_FFTW_OMP="yes"; -else $as_nop - HAVE_FFTW_OMP="no"; +else case e in #( + e) HAVE_FFTW_OMP="no"; ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -12868,8 +13128,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : HAVE_ESSL=yes -else $as_nop - HAVE_ESSL=no +else case e in #( + e) HAVE_ESSL=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -13161,8 +13422,9 @@ fi if test ${with_slepc_branch+y} then : withval=$with_slepc_branch; -else $as_nop - with_slepc_branch=none +else case e in #( + e) with_slepc_branch=none ;; +esac fi @@ -13170,8 +13432,9 @@ fi if test ${with_petsc_branch+y} then : withval=$with_petsc_branch; -else $as_nop - with_petsc_branch=none +else case e in #( + e) with_petsc_branch=none ;; +esac fi # @@ -13198,16 +13461,22 @@ printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -13235,20 +13504,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : use_libdl="yes"; -else $as_nop - use_libdl="no"; +else case e in #( + e) use_libdl="no"; ;; +esac fi ac_ext=${ac_fc_srcext-f} @@ -13333,8 +13605,9 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : petsc=yes -else $as_nop - petsc=no +else case e in #( + e) petsc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # @@ -13478,8 +13751,9 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : slepc=yes -else $as_nop - slepc=no +else case e in #( + e) slepc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # @@ -13581,13 +13855,6 @@ then : fi -# Check whether --with-blacs_libs was given. -if test ${with_blacs_libs+y} -then : - withval=$with_blacs_libs; -fi - - # Check whether --with-scalapack_libs was given. if test ${with_scalapack_libs+y} then : @@ -13610,28 +13877,23 @@ fi SCALAPACK_LIBS="" -BLACS_LIBS="" ELPA_LIBS="" ELPA_INCS="" reset_LIBS="$LIBS" enable_scalapack="no" -enable_blacs="no" enable_elpa="no" internal_slk="no" -internal_blacs="no" internal_elpa="no" compile_slk="no" -compile_blacs="no" compile_elpa="no" # -# Set fortran linker names of BLACS/SCALAPACK functions to check for. +# Set fortran linker names of SCALAPACK functions to check for. # -blacs_routine="blacs_set" scalapack_routine="pcheev" elpa_routine="elpa_init" mpi_routine=MPI_Init @@ -13679,23 +13941,9 @@ fi # Parse configure options # if test "$enable_par_linalg" = "yes" ; then - enable_blacs="internal" ; enable_scalapack="internal" ; fi # -case $with_blacs_libs in - yes) enable_blacs="internal" ;; - no) enable_blacs="no" ; enable_par_linalg="no" ;; - mkl) - if test "$try_mkl_scalapack" = "no" ; then - enable_blacs="no" ; enable_par_linalg="no" - else - enable_blacs="check"; BLACS_LIBS="$try_mkl_scalapack" - fi - ;; - *) enable_blacs="check"; BLACS_LIBS="$with_blacs_libs" ;; -esac -# case $with_scalapack_libs in yes) enable_scalapack="internal" ;; no) enable_scalapack="no" ; enable_par_linalg="no" ;; @@ -13717,41 +13965,10 @@ esac # if test "$mpibuild" = "yes"; then # - if test "$enable_blacs" = "check" ; then - # - acx_blacs_save_LIBS="$BLACS_LIBS" - LIBS="$LIBS $FLIBS $LAPACK_LIBS $BLAS_LIBS" - # First, check BLACS_LIBS environment variable - if test "x$BLACS_LIBS" != x; then - save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $blacs_routine in $BLACS_LIBS" >&5 -printf %s "checking for $blacs_routine in $BLACS_LIBS... " >&6; } - cat > conftest.$ac_ext <<_ACEOF - program main - call $blacs_routine - end -_ACEOF -if ac_fn_fc_try_link "$LINENO" -then : - enable_blacs="yes" -else $as_nop - enable_blacs="internal"; BLACS_LIBS="" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_blacs" >&5 -printf "%s\n" "$enable_blacs" >&6; } - BLACS_LIBS="$acx_blacs_save_LIBS" - LIBS="$save_LIBS" - else - enable_blacs="no"; - fi - # - fi # if test "$enable_scalapack" = "check" ; then acx_scalapack_save_LIBS="$SCALAPACK_LIBS" - LIBS="$LIBS $FLIBS $LAPACK_LIBS $BLAS_LIBS $BLACS_LIBS" + LIBS="$LIBS $FLIBS $LAPACK_LIBS $BLAS_LIBS" # First, check SCALAPACK_LIBS environment variable if test "x$SCALAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$SCALAPACK_LIBS $LIBS" @@ -13765,8 +13982,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : enable_scalapack="yes" -else $as_nop - enable_scalapack="internal"; SCALAPACK_LIBS="" +else case e in #( + e) enable_scalapack="internal"; SCALAPACK_LIBS="" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -13781,7 +13999,7 @@ printf "%s\n" "$enable_scalapack" >&6; } # if test "$enable_elpa" = "check" ; then acx_elpa_save_LIBS="$ELPA_LIBS" - LIBS="$LIBS $FLIBS $SCALAPACK_LIBS $LAPACK_LIBS $BLAS_LIBS $BLACS_LIBS" + LIBS="$LIBS $FLIBS $SCALAPACK_LIBS $LAPACK_LIBS $BLAS_LIBS" # First, check ELPA_LIBS environment variable if test "x$ELPA_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$ELPA_LIBS $LIBS" @@ -13797,8 +14015,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : enable_elpa="yes"; elpa_msg="yes" -else $as_nop - enable_elpa="internal"; elpa_msg="not working, fallback to internal"; ELPA_LIBS="" +else case e in #( + e) enable_elpa="internal"; elpa_msg="not working, fallback to internal"; ELPA_LIBS="" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -13814,10 +14033,8 @@ printf "%s\n" "$enable_elpa" >&6; } # if test x"$enable_par_linalg" = "xyes"; then if test x"$enable_int_linalg" = "xyes"; then - enable_blacs="internal"; enable_scalapack="internal"; else - if test "$enable_blacs" = "no"; then enable_blacs="internal" ; fi if test "$enable_scalapack" = "no"; then enable_scalapack="internal"; fi fi fi @@ -13830,16 +14047,6 @@ printf "%s\n" "$enable_elpa" >&6; } # fi #fi # - if test "$mpif_found" = "yes" && test "$enable_blacs" = "internal"; then - enable_blacs="yes"; - internal_blacs="yes"; - BLACS_LIBS="${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_C_init.a ${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; - if test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs.a" && test -e "${extlibs_path}/${FCKIND}/${FC}/lib/libblacs_init.a"; then - compile_blacs="no" - else - compile_blacs="yes" - fi - fi # if test "$mpif_found" = "yes" && test "$enable_scalapack" = "internal"; then enable_scalapack="yes" @@ -13866,7 +14073,7 @@ printf "%s\n" "$enable_elpa" >&6; } # fi # -if test "$enable_blacs" = "yes" && test "$enable_scalapack" = "yes" ; then +if test "$enable_scalapack" = "yes" ; then def_scalapack="-D_SCALAPACK" if test "$enable_elpa" = "yes" ; then def_elpa="-D_ELPA" @@ -13880,18 +14087,14 @@ if test "$enable_blacs" = "yes" && test "$enable_scalapack" = "yes" ; then fi else enable_scalapack="no" - enable_blacs="no" enable_elpa="no" def_scalapack="" def_elpa="" - BLACS_LIBS="" SCALAPACK_LIBS="" ELPA_LIBS="" ELPA_INCS="" - compile_blacs="no" compile_slk="no" compile_elpa="no" - internal_blacs="no" internal_slk="no" internal_elpa="no" fi @@ -13911,9 +14114,6 @@ LIBS="$reset_LIBS" - - - # ============================================================================ # HDF5 @@ -13962,8 +14162,9 @@ fi if test ${enable_hdf5_par_io+y} then : enableval=$enable_hdf5_par_io; -else $as_nop - enable_hdf5_par_io="yes" +else case e in #( + e) enable_hdf5_par_io="yes" ;; +esac fi # @@ -14002,22 +14203,28 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | $as_tr_sh` +as_ac_Lib=`printf "%s\n" "ac_cv_lib_z ""_deflate" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz " >&5 printf %s "checking for deflate in -lz ... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char deflate (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char deflate (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -14045,12 +14252,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" -else $as_nop - eval "$as_ac_Lib=no" +else case e in #( + e) eval "$as_ac_Lib=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -14058,8 +14267,9 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes" then : use_libz="yes"; -else $as_nop - use_libz="no"; +else case e in #( + e) use_libz="no"; ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lsz" >&5 @@ -14067,16 +14277,22 @@ printf %s "checking for deflate in -lsz... " >&6; } if test ${ac_cv_lib_sz_deflate+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char deflate (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char deflate (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -14104,20 +14320,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sz_deflate=yes -else $as_nop - ac_cv_lib_sz_deflate=no +else case e in #( + e) ac_cv_lib_sz_deflate=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sz_deflate" >&5 printf "%s\n" "$ac_cv_lib_sz_deflate" >&6; } if test "x$ac_cv_lib_sz_deflate" = xyes then : use_libsz="yes"; -else $as_nop - use_libsz="no"; +else case e in #( + e) use_libsz="no"; ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 @@ -14125,16 +14344,22 @@ printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -14162,20 +14387,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : use_libdl="yes"; -else $as_nop - use_libdl="no"; +else case e in #( + e) use_libdl="no"; ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for curl_version in -lcurl" >&5 @@ -14183,16 +14411,22 @@ printf %s "checking for curl_version in -lcurl... " >&6; } if test ${ac_cv_lib_curl_curl_version+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcurl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char curl_version (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char curl_version (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -14220,20 +14454,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_curl_curl_version=yes -else $as_nop - ac_cv_lib_curl_curl_version=no +else case e in #( + e) ac_cv_lib_curl_curl_version=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_version" >&5 printf "%s\n" "$ac_cv_lib_curl_curl_version" >&6; } if test "x$ac_cv_lib_curl_curl_version" = xyes then : use_libcurl="yes"; -else $as_nop - use_libcurl="no"; +else case e in #( + e) use_libcurl="no"; ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 @@ -14241,16 +14478,22 @@ printf %s "checking for cos in -lm... " >&6; } if test ${ac_cv_lib_m_cos+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char cos (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char cos (void); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus @@ -14278,20 +14521,23 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_cos=yes -else $as_nop - ac_cv_lib_m_cos=no +else case e in #( + e) ac_cv_lib_m_cos=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 printf "%s\n" "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes then : use_libm="yes"; -else $as_nop - use_libm="no"; +else case e in #( + e) use_libm="no"; ;; +esac fi ac_ext=${ac_fc_srcext-f} @@ -14370,8 +14616,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : hdf5=yes -else $as_nop - hdf5=no +else case e in #( + e) hdf5=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; @@ -14437,8 +14684,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : hdf5=yes -else $as_nop - hdf5=no +else case e in #( + e) hdf5=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; @@ -14495,8 +14743,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : hdf5=yes -else $as_nop - hdf5=no +else case e in #( + e) hdf5=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; @@ -14846,8 +15095,9 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : netcdf=yes -else $as_nop - netcdf=no +else case e in #( + e) netcdf=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # @@ -14951,8 +15201,9 @@ _ACEOF if ac_fn_fc_try_link "$LINENO" then : netcdf=yes -else $as_nop - netcdf=no +else case e in #( + e) netcdf=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; @@ -15378,8 +15629,9 @@ fi if test ${enable_iotk+y} then : enableval=$enable_iotk; -else $as_nop - enable_iotk="yes" +else case e in #( + e) enable_iotk="yes" ;; +esac fi @@ -15541,8 +15793,9 @@ fi if test ${enable_etsf_io+y} then : enableval=$enable_etsf_io; -else $as_nop - enable_etsf_io="no" +else case e in #( + e) enable_etsf_io="no" ;; +esac fi @@ -16013,8 +16266,9 @@ fi if test ${enable_cuda_libs_check+y} then : enableval=$enable_cuda_libs_check; -else $as_nop - enable_cuda_libs_check=yes +else case e in #( + e) enable_cuda_libs_check=yes ;; +esac fi # @@ -16213,8 +16467,9 @@ LIBS="$acx_libcuda_save_LIBS" if test ${with_cuda_cc+y} then : withval=$with_cuda_cc; -else $as_nop - with_cuda_cc=70 +else case e in #( + e) with_cuda_cc=70 ;; +esac fi # @@ -16295,8 +16550,9 @@ fi if test ${with_cuda_runtime+y} then : withval=$with_cuda_runtime; -else $as_nop - with_cuda_runtime=none +else case e in #( + e) with_cuda_runtime=none ;; +esac fi # @@ -16305,8 +16561,9 @@ fi if test ${with_cuda_int_libs+y} then : withval=$with_cuda_int_libs; -else $as_nop - with_cuda_int_libs=cufft,cublas,cusolver +else case e in #( + e) with_cuda_int_libs=cufft,cublas,cusolver ;; +esac fi # @@ -16314,8 +16571,9 @@ fi if test ${enable_nvtx+y} then : enableval=$enable_nvtx; -else $as_nop - enable_nvtx="no" +else case e in #( + e) enable_nvtx="no" ;; +esac fi # @@ -16483,8 +16741,8 @@ printf %s "checking for Fortran flag to compile .f90 files... " >&6; } if test ${ac_cv_fc_srcext_f90+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_ext=f90 +else case e in #( + e) ac_ext=f90 ac_fcflags_srcext_save=$ac_fcflags_srcext ac_fcflags_srcext= ac_cv_fc_srcext_f90=unknown @@ -16507,7 +16765,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done rm -f conftest.$ac_objext conftest.f90 ac_fcflags_srcext=$ac_fcflags_srcext_save - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 printf "%s\n" "$ac_cv_fc_srcext_f90" >&6; } @@ -16530,14 +16789,14 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu - as_CACHEVAR=`printf "%s\n" "ax_cv_check_fcflags__$GPU_FLAGS" | $as_tr_sh` + as_CACHEVAR=`printf "%s\n" "ax_cv_check_fcflags__$GPU_FLAGS" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Fortran compiler accepts $GPU_FLAGS" >&5 printf %s "checking whether Fortran compiler accepts $GPU_FLAGS... " >&6; } if eval test \${$as_CACHEVAR+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$FCFLAGS FCFLAGS="$FCFLAGS $GPU_FLAGS" cat > conftest.$ac_ext <<_ACEOF @@ -16546,11 +16805,13 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : eval "$as_CACHEVAR=yes" -else $as_nop - eval "$as_CACHEVAR=no" +else case e in #( + e) eval "$as_CACHEVAR=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - FCFLAGS=$ax_check_save_flags + FCFLAGS=$ax_check_save_flags ;; +esac fi eval ac_res=\$$as_CACHEVAR { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -16558,8 +16819,9 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_CACHEVAR"\" = x"yes" then : have_cudafor=yes -else $as_nop - have_cudafor=no +else case e in #( + e) have_cudafor=no ;; +esac fi ac_ext=${ac_fc_srcext-f} @@ -16666,8 +16928,9 @@ fi if test ${with_ldiago_branch+y} then : withval=$with_ldiago_branch; -else $as_nop - with_ldiago_branch=none +else case e in #( + e) with_ldiago_branch=none ;; +esac fi # @@ -16749,8 +17012,9 @@ fi if test ${with_devxlib_branch+y} then : withval=$with_devxlib_branch; -else $as_nop - with_devxlib_branch=none +else case e in #( + e) with_devxlib_branch=none ;; +esac fi @@ -17049,8 +17313,9 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : magmaf=yes -else $as_nop - magmaf=no +else case e in #( + e) magmaf=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # @@ -17064,8 +17329,9 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO" then : magmac=yes -else $as_nop - magmac=no +else case e in #( + e) magmac=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext; # @@ -17997,8 +18263,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -18028,14 +18294,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -18125,7 +18391,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -18134,12 +18399,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -18211,7 +18477,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -18240,7 +18506,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -18280,11 +18545,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -18298,11 +18564,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -18385,9 +18652,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -18468,10 +18735,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -18487,7 +18756,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Lumen $as_me 2.0.0, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18518,7 +18787,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -18552,10 +18821,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ Lumen config.status 2.0.0 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18614,8 +18883,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + as_fn_error $? "ambiguous option: '$1' +Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -18623,8 +18892,8 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -18691,7 +18960,7 @@ do "include/driver/editor.h") CONFIG_FILES="$CONFIG_FILES include/driver/editor.h" ;; "lib/archive/git.list") CONFIG_FILES="$CONFIG_FILES lib/archive/git.list" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -18710,7 +18979,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -18734,7 +19003,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -18892,13 +19161,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -19008,7 +19277,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -19030,19 +19299,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -19166,7 +19435,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -19195,9 +19464,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" diff --git a/lib/archive/package.list b/lib/archive/package.list index f138b58251..8d7db23608 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -1,7 +1,7 @@ # # Libs list # -EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack blacs scalapack elpa magma petsc slepc fftw fftqe ldiago devxlib +EXT_LIBS= yaml futile iotk hdf5 netcdf netcdff etsf_io libxc lapack scalapack elpa magma petsc slepc fftw fftqe ldiago devxlib # # storing options # @@ -12,7 +12,6 @@ keep_netcdff=no keep_etsf_io=no keep_libxc=no keep_lapack=no -keep_blacs=no keep_scalapack=no keep_elpa=no keep_magma=no @@ -35,7 +34,6 @@ version_hdf5=1.14.6 version_etsf_io=1.0.4 version_libxc=5.2.3 version_lapack=3.12.0 -version_blacs=missing version_scalapack=2.2.2 #version_elpa=release_2024_05_001 # This was neeeded for gitlab version_elpa=2024.05.001 @@ -58,7 +56,6 @@ pkgname_hdf5=hdf5-$(version_hdf5) pkgname_etsf_io=etsf_io-$(version_etsf_io) pkgname_libxc=libxc-$(version_libxc) pkgname_lapack=lapack-$(version_lapack) -pkgname_blacs=blacs pkgname_scalapack=scalapack-$(version_scalapack) pkgname_elpa=elpa-$(version_elpa) pkgname_magma=magma-$(version_magma) @@ -83,7 +80,6 @@ tarball_lapack=v$(version_lapack).tar.gz tarball_scalapack=v$(version_scalapack).tar.gz tarball_elpa=$(pkgname_elpa).tar.gz tarball_magma=$(pkgname_magma).tar.gz -tarball_blacs=$(pkgname_blacs).tar.gz tarball_slepc=slepc-v$(version_slepc).tar.gz tarball_petsc=petsc-v$(version_petsc).tar.gz tarball_fftw=$(pkgname_fftw).tar.gz @@ -123,7 +119,6 @@ url_base=https://github.com/yambo-code/yambo-libraries/raw/master/external/ # url_iotk=$(url_base)/$(tarball_iotk) url_etsf_io=$(url_base)/$(tarball_etsf_io) -url_blacs=$(url_base)/$(tarball_blacs) url_fftqe=$(url_base)/$(tarball_fftqe) url_yaml=$(url_base)/$(tarball_yaml) url_futile=$(url_base)/$(tarball_futile) diff --git a/lib/blacs/Bmake.inc_lib b/lib/blacs/Bmake.inc_lib deleted file mode 100644 index d653a75a71..0000000000 --- a/lib/blacs/Bmake.inc_lib +++ /dev/null @@ -1,215 +0,0 @@ -#============================================================================= -#====================== SECTION 1: PATHS AND LIBRARIES ======================= -#============================================================================= -# The following macros specify the name and location of libraries required by -# the BLACS and its tester. -#============================================================================= - -# -------------------------------------- -# Make sure we've got a consistent shell -# -------------------------------------- - SHELL = $(shell) - -# ----------------------------- -# The top level BLACS directory -# ----------------------------- - BTOPdir = $(prefix)/lib/blacs/blacs - -# --------------------------------------------------------------------------- -# The communication library your BLACS have been written for. -# Known choices (and the machines they run on) are: -# -# COMMLIB MACHINE -# ....... .............................................................. -# CMMD Thinking Machine's CM-5 -# MPI Wide variety of systems -# MPL IBM's SP series (SP1 and SP2) -# NX Intel's supercomputer series (iPSC2, iPSC/860, DELTA, PARAGON) -# PVM Most unix machines; See PVM User's Guide for details -# --------------------------------------------------------------------------- - COMMLIB = MPI - -# ------------------------------------------------------------- -# The platform identifier to suffix to the end of library names -# ------------------------------------------------------------- - PLAT = LINUX -# ---------------------------------------------------------- -# Name and location of the BLACS library. See section 2 for -# details on BLACS debug level (BLACSDBGLVL). -# ---------------------------------------------------------- - BLACSdir = $(BTOPdir) - BLACSDBGLVL = 0 - BLACSFINIT = $(BLACSdir)/libblacs_init.a - BLACSCINIT = $(BLACSdir)/libblacs_C_init.a - BLACSLIB = $(BLACSdir)/libblacs.a - -# Name and location of the MPI library. -# ------------------------------------- -# MPIdir = $(mpidir) - MPILIBdir = $(mpildir) - MPIINCdir = $(mpiidir) - -# ------------------------------------- -# All libraries required by the tester. -# ------------------------------------- - BTLIBS = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT) $(MPI_LIBS) - -# ---------------------------------------------------------------- -# The directory to put the installation help routines' executables -# ---------------------------------------------------------------- - INSTdir = $(BTOPdir)/INSTALL/EXE - -# ------------------------------------------------ -# The name and location of the tester's executable -# ------------------------------------------------ - TESTdir = $(BTOPdir)/TESTING/EXE - FTESTexe = $(TESTdir)/xFbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL) - CTESTexe = $(TESTdir)/xCbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL) -#============================================================================= -#=============================== End SECTION 1 =============================== -#============================================================================= - - -#============================================================================= -#========================= SECTION 2: BLACS INTERNALS ======================== -#============================================================================= -# The following macro definitions set preprocessor values for the BLACS. -# The file Bconfig.h sets these values if they are not set by the makefile. -# User's compiling only the tester can skip this entire section. -# NOTE: The MPI defaults have been set for MPICH. -#============================================================================= - -# ----------------------------------------------------------------------- -# The directory to find the required communication library include files, -# if they are required by your system. -# ----------------------------------------------------------------------- - SYSINC = $(impi) -I$(libdir)/blacs/blacs/SRC/MPI - -# --------------------------------------------------------------------------- -# The Fortran 77 to C interface to be used. If you are unsure of the correct -# setting for your platform, compile and run BLACS/INSTALL/xintface. -# Choices are: Add_, NoChange, UpCase, or f77IsF2C. -# --------------------------------------------------------------------------- - INTFACE =-DAdd_ - -# ------------------------------------------------------------------------ -# Allows the user to vary the topologies that the BLACS default topologies -# (TOP = ' ') correspond to. If you wish to use a particular topology -# (as opposed to letting the BLACS make the choice), uncomment the -# following macros, and replace the character in single quotes with the -# topology of your choice. -# ------------------------------------------------------------------------ -# DEFBSTOP = -DDefBSTop="'1'" -# DEFCOMBTOP = -DDefCombTop="'1'" - -# ------------------------------------------------------------------- -# If your MPI_Send is locally-blocking, substitute the following line -# for the empty macro definition below. -# SENDIS = -DSndIsLocBlk -# ------------------------------------------------------------------- - SENDIS = - -# -------------------------------------------------------------------- -# If your MPI handles packing of non-contiguous messages by copying to -# another buffer or sending extra bytes, better performance may be -# obtained by replacing the empty macro definition below with the -# macro definition on the following line. -# BUFF = -DNoMpiBuff -# -------------------------------------------------------------------- - BUFF = - -# ----------------------------------------------------------------------- -# If you know something about your system, you may make it easier for the -# BLACS to translate between C and fortran communicators. If the empty -# macro defininition is left alone, this translation will cause the C -# BLACS to globally block for MPI_COMM_WORLD on calls to BLACS_GRIDINIT -# and BLACS_GRIDMAP. If you choose one of the options for translating -# the context, neither the C or fortran calls will globally block. -# If you are using MPICH, or a derivitive system, you can replace the -# empty macro definition below with the following (note that if you let -# MPICH do the translation between C and fortran, you must also indicate -# here if your system has pointers that are longer than integers. If so, -# define -DPOINTER_64_BITS=1.) For help on setting TRANSCOMM, you can -# run BLACS/INSTALL/xtc_CsameF77 and BLACS/INSTALL/xtc_UseMpich as -# explained in BLACS/INSTALL/README. -# TRANSCOMM = -DUseMpich -# -# If you know that your MPI uses the same handles for fortran and C -# communicators, you can replace the empty macro definition below with -# the macro definition on the following line. -# TRANSCOMM = -DCSameF77 -# ----------------------------------------------------------------------- -# TRANSCOMM = - -# -------------------------------------------------------------------------- -# You may choose to have the BLACS internally call either the C or Fortran77 -# interface to MPI by varying the following macro. If TRANSCOMM is left -# empty, the C interface BLACS_GRIDMAP/BLACS_GRIDINIT will globally-block if -# you choose to use the fortran internals, and the fortran interface will -# block if you choose to use the C internals. It is recommended that the -# user leave this macro definition blank, unless there is a strong reason -# to prefer one MPI interface over the other. -# WHATMPI = -DUseF77Mpi -# WHATMPI = -DUseCMpi -# -------------------------------------------------------------------------- - WHATMPI = - -# --------------------------------------------------------------------------- -# Some early versions of MPICH and its derivatives cannot handle user defined -# zero byte data types. If your system has this problem (compile and run -# BLACS/INSTALL/xsyserrors to check if unsure), replace the empty macro -# definition below with the macro definition on the following line. -# SYSERRORS = -DZeroByteTypeBug -# --------------------------------------------------------------------------- - SYSERRORS = - -# ------------------------------------------------------------------ -# These macros set the debug level for the BLACS. The fastest -# code is produced by BlacsDebugLvl 0. Higher levels provide -# more debug information at the cost of performance. Present levels -# of debug are: -# 0 : No debug information -# 1 : Mainly parameter checking. -# ------------------------------------------------------------------ - DEBUGLVL = -DBlacsDebugLvl=$(BLACSDBGLVL) - -# ------------------------------------------------------------------------- -# All BLACS definitions needed for compile (DEFS1 contains definitions used -# by all BLACS versions). -# ------------------------------------------------------------------------- - DEFS1 = -DSYSINC $(SYSINC) $(INTFACE) $(DEFBSTOP) $(DEFCOMBTOP) $(DEBUGLVL) - BLACSDEFS = $(DEFS1) $(SENDIS) $(BUFF) $(TRANSCOMM) $(WHATMPI) $(SYSERRORS) -#============================================================================= -#=============================== End SECTION 2 =============================== -#============================================================================= - - -#============================================================================= -#=========================== SECTION 3: COMPILERS ============================ -#============================================================================= -# The following macros specify compilers, linker/loaders, the archiver, -# and their options. Some of the fortran files need to be compiled with no -# optimization. This is the F77NO_OPTFLAG. The usage of the remaining -# macros should be obvious from the names. -#============================================================================= - F77 = $(fc) - F77NO_OPTFLAGS = $(fcuflags) - F77FLAGS = $(fcflags) - F77LOADER = $(fc) - F77LOADFLAGS = $(fcflags) - CC = $(cc) - CCFLAGS = $(cflags) - CCLOADER = $(cc) - CCLOADFLAGS = $(cflags) - -# -------------------------------------------------------------------------- -# The archiver and the flag(s) to use when building an archive (library). -# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo. -# -------------------------------------------------------------------------- - ARCH = $(ar) - ARCHFLAGS = $(arflags) - RANLIB = ranlib - -#============================================================================= -#=============================== End SECTION 3 =============================== -#============================================================================= diff --git a/lib/blacs/Makefile.lib b/lib/blacs/Makefile.lib deleted file mode 100644 index 6111b18f19..0000000000 --- a/lib/blacs/Makefile.lib +++ /dev/null @@ -1,57 +0,0 @@ -help : - @ echo - @ echo "Make sure you are using the correct Bmake.inc for your system." - @ echo "At this level, assuming you have downloaded the necessary files," - @ echo "you may make the BLACS tester (make tester), or one of the BLACS" - @ echo "versions (make cmmd, make mpl, make nx, or make pvm)" - @ echo "You can define the make macro 'what' to perform a specific action." - @ echo "(eg., make tester what=clean)" - @ echo "There are short README files in TESTING/ and SRC/." - @ echo - -all : mpi - -clean: cleanall - -cleanall: - ( cd SRC/MPI ; make clean ) -# ( cd TESTING ; make clean ) -# ( cd SRC/CMMD ; make clean ) -# ( cd SRC/MPL ; make clean ) -# ( cd SRC/NX ; make clean ) -# ( cd SRC/PVM ; make clean ) - -testing: tester -xbtest : tester -test : tester -tester : - ( cd TESTING ; make $(what) ) - -CM5 : CMMD -cmmd : CMMD -CMMD : - ( cd SRC/CMMD ; make $(what) ) - -SP1 : MPL -SP2 : MPL -mpl : MPL -MPL : - ( cd SRC/MPL ; make $(what) ) - -intel : NX -ipsc2 : NX -i860 : NX -delta : NX -gamma : NX -paragon : NX -nx : NX -NX : - ( cd SRC/NX ; make $(what) ) - -pvm : PVM -PVM : - ( cd SRC/PVM ; make $(what) ) - -mpi : MPI -MPI : - ( cd SRC/MPI ; make $(what) ) diff --git a/lib/blacs/Makefile.loc b/lib/blacs/Makefile.loc deleted file mode 100644 index 164bc2eaa5..0000000000 --- a/lib/blacs/Makefile.loc +++ /dev/null @@ -1,51 +0,0 @@ -# -#=============================== -# Yambo package -#=============================== -# -include ../../config/setup -include ../archive/package.list - -LIBNAME=libblacs.a -LIBPATH=$(libs_prefix)/$(fc_kind)/${fc} -LIBRARY=$(LIBPATH)/lib/$(LIBNAME) -# -PACKAGE=$(pkgname_blacs) -# -include ../config/external_libs_commons.mk -include ../config/external_libs_defs.mk -# -all: $(LIBRARY) -# -uncompress: - @$(uncompress) - -configure: uncompress - @if test -d $(PACKAGE) && ! test -f configured.stamp ; then \ - echo "\t[$(PACKAGE)] configuration"; \ - cd $(PACKAGE); \ - cat $(compdir)/config/setup $(srcdir)/lib/blacs/Bmake.inc_lib > Bmake.inc ; \ - cp $(srcdir)/lib/blacs/Makefile.lib Makefile ; \ - touch ../configured.stamp;\ - fi - -compile: uncompress configure - @$(call compile,mpi) - -install: uncompress configure compile - @if ! test -e installed.stamp ; then \ - echo "\t[$(PACKAGE)] installation"; \ - cd $(PACKAGE); cp *.a $(LIBPATH)/lib ; \ - chmod +x $(LIBPATH)/lib/*blacs*.a; \ - touch ../installed.stamp;\ - fi - -$(LIBRARY): uncompress configure compile install -# -# cleaning -# -clean: - @$(clean_the_lib) - -clean_all: clean - @$(rm_the_lib) From d8ae8210eb1498cd793726510c25022f0c404125 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Dec 2025 11:03:49 +0100 Subject: [PATCH 1353/1367] Updated elpa, slepc and petsc version Removed fortran petsc flags. --- lib/archive/package.list | 8 +++++--- lib/petsc/Makefile.loc | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/archive/package.list b/lib/archive/package.list index 8d7db23608..85c3f27250 100644 --- a/lib/archive/package.list +++ b/lib/archive/package.list @@ -36,10 +36,12 @@ version_libxc=5.2.3 version_lapack=3.12.0 version_scalapack=2.2.2 #version_elpa=release_2024_05_001 # This was neeeded for gitlab -version_elpa=2024.05.001 +version_elpa=2025.06.002 version_magma=2.8.0 -version_slepc=3.24.0 -version_petsc=3.24.0 +#version_slepc=3.22.2 # This is the latest version which does not require fortran 2018 +#version_petsc=3.22.2 # It is needed to compile with intel compilers +version_slepc=3.24.1 +version_petsc=3.24.1 version_fftw=3.3.10 version_fftqe=missing version_yaml=0.2.2 diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 47c68a3512..3c676d83c0 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -16,10 +16,10 @@ TARBALL=$(tarball_petsc) include ../config/external_libs_commons.mk include ../config/external_libs_defs.mk # FOPTFLAGS="$(fcflags)" COPTFLAGS="$(cflags)" \ +# FOPTFLAGS="-O1 -std=f2008 " COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ # PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ - FOPTFLAGS="-O1" COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ --PETSC_ARCH=${PETSC_ARCH} \ --with-ssl=0 \ --with-x=0 \ From 2786fe90268e518c54a7db0c0c2e3144b8b5cee7 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Dec 2025 11:06:22 +0100 Subject: [PATCH 1354/1367] Updated git ignore --- .gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 873a210d6e..f08047acfb 100644 --- a/.gitignore +++ b/.gitignore @@ -138,9 +138,9 @@ autom4te.cache #Scripts compile_yambo_gcc -gfortran*.sh -pgi*.sh -nvidia*.sh +gfortran*.sh* +nvfortran*.sh* +ifx*.sh* git_nmd.sh #Configuation files From 2c62ce817ddddf6c95e1d00a52d676de7d928a04 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Dec 2025 17:16:53 +0100 Subject: [PATCH 1355/1367] aesthetic fix --- src/modules/mod_interfaces.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/mod_interfaces.F b/src/modules/mod_interfaces.F index a175af1407..8bd539dee4 100644 --- a/src/modules/mod_interfaces.F +++ b/src/modules/mod_interfaces.F @@ -175,7 +175,7 @@ end subroutine el_density_of_states subroutine MATRIX_slepc(M_slepc,n_eig,V_right,V_left,E_real,E_cmpl) ! use pars, ONLY:SP,schlen - use petscmatdef, ONLY:tmat + use petscmatdef, ONLY:tMat Mat :: M_slepc ! matrix to diagonalize of stype from slepc integer :: n_eig ! number of eigenvalues to compute complex(SP) :: V_right(:,:) ! right eigenvalues From 8637b891e11352685e1836ce0e7658d9d77fc8c4 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sun, 14 Dec 2025 17:58:17 +0100 Subject: [PATCH 1356/1367] Fixed compilation issue with intel mpi --- src/bse/K_correlation_collisions_dir.F | 5 ++++- src/bse/K_correlation_collisions_std.F | 5 ++++- src/bse/K_kernel.F | 7 +++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/bse/K_correlation_collisions_dir.F b/src/bse/K_correlation_collisions_dir.F index 1778152a91..6ee05f8770 100644 --- a/src/bse/K_correlation_collisions_dir.F +++ b/src/bse/K_correlation_collisions_dir.F @@ -287,7 +287,10 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & use R_lattice, ONLY:qindx_B use D_lattice, ONLY:sop_inv,sop_tab use parallel_m, ONLY:PAR_K_scheme - use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Get + use mpi + ! Using the following line instead of the general use mpi + ! Gives compilation error with impi due to MPI_Get + !use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Get ! implicit none ! diff --git a/src/bse/K_correlation_collisions_std.F b/src/bse/K_correlation_collisions_std.F index 1951d411dd..cc088fe55c 100644 --- a/src/bse/K_correlation_collisions_std.F +++ b/src/bse/K_correlation_collisions_std.F @@ -328,7 +328,10 @@ subroutine fill_indexes(j_Tk,j_Tp,j_Tgrp_k,j_Tgrp_p,j_block,j_q, & use R_lattice, ONLY:qindx_B use D_lattice, ONLY:sop_inv,sop_tab use parallel_m, ONLY:PAR_K_scheme - use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Get + use mpi + ! Using the following line instead of the general use mpi + ! Gives compilation error with impi due to MPI_Get + !use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Get ! implicit none ! diff --git a/src/bse/K_kernel.F b/src/bse/K_kernel.F index ba96fff3f8..926fcf97b3 100644 --- a/src/bse/K_kernel.F +++ b/src/bse/K_kernel.F @@ -58,8 +58,11 @@ subroutine K_kernel(iq,Ken,Xk,q,X,Xw,W_bss) use MAGNONS, ONLY:BSS_MAGN_free use PHOTOLUM, ONLY:BSS_PL_free use parser_m, ONLY:parser - use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Win_create,MPI_Win_fence,MPI_Get,& - & MPI_Info_create,MPI_Info_set,MPI_info_free + use mpi + ! Using the following line instead of the general use mpi + ! Gives compilation error with impi due to MPI_Get and MPI_Win_create + !use mpi, ONLY:MPI_INTEGER,MPI_ADDRESS_KIND,MPI_Win_create,MPI_Win_fence,MPI_Get,& + !& MPI_Info_create,MPI_Info_set,MPI_info_free use y_memory_alloc ! implicit none From 504dccb64655dc5f8c43d43883f93ea9bc7d71c6 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 15 Dec 2025 02:01:10 +0100 Subject: [PATCH 1357/1367] Fixed linking of internal petsc with mkl --- config/m4/lapack.m4 | 2 +- config/m4/petsc_slepc.m4 | 4 ++-- configure | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/m4/lapack.m4 b/config/m4/lapack.m4 index 949c41d927..27d17889d1 100644 --- a/config/m4/lapack.m4 +++ b/config/m4/lapack.m4 @@ -43,7 +43,7 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - AC_CHECK_FUNC($cheev, [acx_lapack_ok=yes]) + AC_CHECK_FUNC($cheev, [acx_lapack_ok=yes LAPACK_LIBS="$BLAS_LIBS"]) LIBS="$save_LIBS" fi diff --git a/config/m4/petsc_slepc.m4 b/config/m4/petsc_slepc.m4 index e8fe9d485d..ee658f53d3 100644 --- a/config/m4/petsc_slepc.m4 +++ b/config/m4/petsc_slepc.m4 @@ -137,11 +137,10 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then fi PETSC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi - # petsc=yes if test -e "$PETSC_LIBS_DN" ; then PETSC_LIBS="$PETSC_LIBS_DN" ; + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then AC_MSG_RESULT([dynamic already compiled]) ; @@ -151,6 +150,7 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then AC_MSG_RESULT([static found, despite dynamic lapack.]) ; diff --git a/configure b/configure index d00f7687ae..e0c55e3774 100755 --- a/configure +++ b/configure @@ -12704,7 +12704,7 @@ if test $acx_lapack_ok = no; then ac_fn_fc_check_func "$LINENO" "$cheev" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : - acx_lapack_ok=yes + acx_lapack_ok=yes LAPACK_LIBS="$BLAS_LIBS" fi LIBS="$save_LIBS" @@ -13647,11 +13647,10 @@ printf %s "checking for internal Petsc library... " >&6; } fi PETSC_INCS="${IFLAG}${extlibs_path}/${FCKIND}/${FC}/${build_precision}/include" ; # - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi - # petsc=yes if test -e "$PETSC_LIBS_DN" ; then PETSC_LIBS="$PETSC_LIBS_DN" ; + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 @@ -13664,6 +13663,7 @@ printf "%s\n" "The compilation may fail. In case remove the dynamic petsc libs." fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 From 94f096699c59c8eed260afe843b998f6d8ebe486 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Mon, 15 Dec 2025 15:37:54 +0100 Subject: [PATCH 1358/1367] Small upgrade of the AUTHOR file --- AUTHORS | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 481c5d36d0..d494f63c98 100644 --- a/AUTHORS +++ b/AUTHORS @@ -46,16 +46,16 @@ ACKNOWLEDGEMENTS In all source files the developers are included with their initials. -Andrea Marini is the original developer of the Yambo code - Davide Sangallli and Claudio Attaccalite are the founders of the Lumen fork -For aknowledging the developers Team please refer to the following published articles: +Andrea Marini is the original developer of the Yambo code -- A Marini, et al. "Yambo: an ab initio tool for excited state calculations", - Computer Physics Communications 180 (8), 1392 (2009) +For aknowledging the developers Team please refer to the following published articles: - D Sangalli, et al. "Many-body perturbation theory calculations using the yambo code", Journal of physics: Condensed matter 31 (32), 325902 (2019) +- A Marini, et al. "Yambo: an ab initio tool for excited state calculations", + Computer Physics Communications 180 (8), 1392 (2009) + For more info please refer to the README file From b75a08ac8104691f63e35a51c886bf8d83f015b9 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Dec 2025 09:39:28 +0100 Subject: [PATCH 1359/1367] Restored project dependencies stamp --- config/stamps_and_lists/project_dependencies.stamp | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 config/stamps_and_lists/project_dependencies.stamp diff --git a/config/stamps_and_lists/project_dependencies.stamp b/config/stamps_and_lists/project_dependencies.stamp new file mode 100644 index 0000000000..e69de29bb2 From 29b669db0f01b8add6f650fc73cea1bb5264bd47 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 17 Dec 2025 10:46:09 +0100 Subject: [PATCH 1360/1367] - Added check on existence of libstdc++ in petsc before linking them. - Modified acx_stripe_subpath to use "#" as tmp character in place of "+" This is just for the final reporting and ensures that -lstdc++ is correctly reported --- config/m4/acx_stripe_subpath.m4 | 12 +- config/m4/petsc_slepc.m4 | 10 +- configure | 343 +++++++++++++++++++------------- lib/petsc/Makefile.loc | 5 +- 4 files changed, 218 insertions(+), 152 deletions(-) diff --git a/config/m4/acx_stripe_subpath.m4 b/config/m4/acx_stripe_subpath.m4 index 65180dadd0..e5fe3d7287 100644 --- a/config/m4/acx_stripe_subpath.m4 +++ b/config/m4/acx_stripe_subpath.m4 @@ -7,10 +7,10 @@ # AC_DEFUN([ACX_STRIPE_SUBPATH], [ -TMP1=`echo $1 | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $1 | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [[ -z "${1// }" ]]; then STRIPE="$STRIPE ($2)" fi @@ -18,10 +18,10 @@ fi AC_DEFUN([ACX_STRIPE_SUBPATH2], [ -TMP1=`echo $1 | sed 's/\//+/g'` -TMP2=`echo $compdir | sed 's/\//+/g'` +TMP1=`echo $1 | sed 's/\//\#/g'` +TMP2=`echo $compdir | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(CMP\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [[ -z "${1// }" ]]; then STRIPE="$STRIPE ($2)" fi diff --git a/config/m4/petsc_slepc.m4 b/config/m4/petsc_slepc.m4 index ee658f53d3..6740b27be9 100644 --- a/config/m4/petsc_slepc.m4 +++ b/config/m4/petsc_slepc.m4 @@ -38,6 +38,7 @@ compile_slepc="no" # AC_LANG_PUSH(C) AC_CHECK_LIB(dl, dlopen, [use_libdl="yes"; ],[use_libdl="no"; ],[]) +AC_CHECK_LIB(stdc++, main, [use_libstdc="yes";], [use_libstdc="no";], []) AC_LANG_POP(C) # if test x"$enable_slepc_linalg" = "xyes"; then @@ -81,7 +82,8 @@ if test -d "$with_petsc_path" || test -d "$with_petsc_libdir" || test x"$with_pe try_PETSC_INCS="$IFLAG$try_petsc_incdir" ; try_PETSC_LIBS="-L$try_petsc_libdir -lpetsc" ; # - if test "$use_libdl" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -ldl -lstdc++" ; fi + if test "$use_libdl" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -ldl" ; fi + if test "$use_libstdc" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -lstdc++" ; fi # if test x"$with_petsc_libs" != "x" ; then try_PETSC_LIBS="$with_petsc_libs" ; fi if test x"$with_petsc_incs" != "x" ; then try_PETSC_INCS="$with_petsc_incs" ; fi @@ -140,7 +142,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then petsc=yes if test -e "$PETSC_LIBS_DN" ; then PETSC_LIBS="$PETSC_LIBS_DN" ; - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi + if test "$use_libstdc" = "yes"; then PETSC_LIBS="$PETSC_LIBS -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then AC_MSG_RESULT([dynamic already compiled]) ; @@ -150,7 +153,8 @@ if test "x$enable_petsc" = "xyes" && test "x$petsc" = "xno" ; then fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi + if test "$use_libstdc" = "yes"; then PETSC_LIBS="$PETSC_LIBS -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then AC_MSG_RESULT([static found, despite dynamic lapack.]) ; diff --git a/configure b/configure index e0c55e3774..f277d7ec52 100755 --- a/configure +++ b/configure @@ -13523,6 +13523,64 @@ else case e in #( esac fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5 +printf %s "checking for main in -lstdc++... " >&6; } +if test ${ac_cv_lib_stdcpp_main+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS +LIBS="-lstdc++ $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main (void) +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_stdcpp_main=yes +else case e in #( + e) ac_cv_lib_stdcpp_main=no ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5 +printf "%s\n" "$ac_cv_lib_stdcpp_main" >&6; } +if test "x$ac_cv_lib_stdcpp_main" = xyes +then : + use_libstdc="yes"; +else case e in #( + e) use_libstdc="no"; ;; +esac +fi + ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -13573,7 +13631,8 @@ printf %s "checking for Petsc in $with_petsc_path... " >&6; } ; try_PETSC_INCS="$IFLAG$try_petsc_incdir" ; try_PETSC_LIBS="-L$try_petsc_libdir -lpetsc" ; # - if test "$use_libdl" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -ldl -lstdc++" ; fi + if test "$use_libdl" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -ldl" ; fi + if test "$use_libstdc" = "yes"; then try_PETSC_LIBS="$try_PETSC_LIBS -lstdc++" ; fi # if test x"$with_petsc_libs" != "x" ; then try_PETSC_LIBS="$with_petsc_libs" ; fi if test x"$with_petsc_incs" != "x" ; then try_PETSC_INCS="$with_petsc_incs" ; fi @@ -13650,7 +13709,8 @@ printf %s "checking for internal Petsc library... " >&6; } petsc=yes if test -e "$PETSC_LIBS_DN" ; then PETSC_LIBS="$PETSC_LIBS_DN" ; - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi + if test "$use_libstdc" = "yes"; then PETSC_LIBS="$PETSC_LIBS -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: dynamic already compiled" >&5 @@ -13663,7 +13723,8 @@ printf "%s\n" "The compilation may fail. In case remove the dynamic petsc libs." fi elif test -e "$PETSC_LIBS_ST" ; then PETSC_LIBS="$PETSC_LIBS_ST" ; - if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl -lstdc++" ; fi + if test "$use_libdl" = "yes"; then PETSC_LIBS="$PETSC_LIBS -ldl" ; fi + if test "$use_libstdc" = "yes"; then PETSC_LIBS="$PETSC_LIBS -lstdc++" ; fi compile_petsc="no" ; if test "x$lapack_shared" = "x1" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static found, despite dynamic lapack." >&5 @@ -17713,10 +17774,10 @@ fi # STRIPE [LIB] from paths # -TMP1=`echo $LDIAGO_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LDIAGO_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi @@ -17724,10 +17785,10 @@ fi #ACX_STRIPE_SUBPATH2($LDIAGO_LIBS,"LIB") LDIAGO_LIBS_R=$STRIPE -TMP1=`echo $LDIAGO_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LDIAGO_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17738,20 +17799,20 @@ LDIAGO_INCS_R=$STRIPE # -TMP1=`echo $IOTK_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $IOTK_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi IOTK_LIBS_R=$STRIPE -TMP1=`echo $IOTK_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $IOTK_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17761,20 +17822,20 @@ IOTK_INCS_R=$STRIPE # -TMP1=`echo $YAML_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $YAML_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi YAML_LIBS_R=$STRIPE -TMP1=`echo $YAML_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $YAML_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17784,20 +17845,20 @@ YAML_INCS_R=$STRIPE # -TMP1=`echo $FUTILE_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $FUTILE_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi FUTILE_LIBS_R=$STRIPE -TMP1=`echo $FUTILE_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $FUTILE_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17807,20 +17868,20 @@ FUTILE_INCS_R=$STRIPE # -TMP1=`echo $ETSF_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $ETSF_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi ETSF_LIBS_R=$STRIPE -TMP1=`echo $ETSF_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $ETSF_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17830,20 +17891,20 @@ ETSF_INCS_R=$STRIPE # -TMP1=`echo $NETCDFF_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $NETCDFF_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi NETCDFF_LIBS_R=$STRIPE -TMP1=`echo $NETCDFF_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $NETCDFF_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17853,20 +17914,20 @@ NETCDFF_INCS_R=$STRIPE # -TMP1=`echo $NETCDF_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $NETCDF_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi NETCDF_LIBS_R=$STRIPE -TMP1=`echo $NETCDF_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $NETCDF_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17876,20 +17937,20 @@ NETCDF_INCS_R=$STRIPE # -TMP1=`echo $HDF5_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $HDF5_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi HDF5_LIBS_R=$STRIPE -TMP1=`echo $HDF5_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $HDF5_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17899,20 +17960,20 @@ HDF5_INCS_R=$STRIPE # -TMP1=`echo $FFT_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $FFT_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi FFT_LIBS_R=$STRIPE -TMP1=`echo $FFT_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $FFT_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17922,20 +17983,20 @@ FFT_INCS_R=$STRIPE # -TMP1=`echo $BLAS_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $BLAS_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi BLAS_LIBS_R=$STRIPE -TMP1=`echo $BLAS_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $BLAS_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17945,20 +18006,20 @@ BLAS_INCS_R=$STRIPE # -TMP1=`echo $LAPACK_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LAPACK_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi LAPACK_LIBS_R=$STRIPE -TMP1=`echo $LAPACK_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LAPACK_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17968,20 +18029,20 @@ LAPACK_INCS_R=$STRIPE # -TMP1=`echo $SCALAPACK_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $SCALAPACK_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi SCALAPACK_LIBS_R=$STRIPE -TMP1=`echo $SCALAPACK_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $SCALAPACK_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -17991,20 +18052,20 @@ SCALAPACK_INCS_R=$STRIPE # -TMP1=`echo $ELPA_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $ELPA_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi ELPA_LIBS_R=$STRIPE -TMP1=`echo $ELPA_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $ELPA_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18014,20 +18075,20 @@ ELPA_INCS_R=$STRIPE # -TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $MAGMA_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi MAGMA_LIBS_R=$STRIPE -TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $MAGMA_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18037,20 +18098,20 @@ MAGMA_INCS_R=$STRIPE # -TMP1=`echo $BLACS_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $BLACS_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi BLACS_LIBS_R=$STRIPE -TMP1=`echo $BLACS_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $BLACS_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18060,20 +18121,20 @@ BLACS_INCS_R=$STRIPE # -TMP1=`echo $PETSC_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $PETSC_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi PETSC_LIBS_R=$STRIPE -TMP1=`echo $PETSC_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $PETSC_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18083,20 +18144,20 @@ PETSC_INCS_R=$STRIPE # -TMP1=`echo $SLEPC_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $SLEPC_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi SLEPC_LIBS_R=$STRIPE -TMP1=`echo $SLEPC_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $SLEPC_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18106,20 +18167,20 @@ SLEPC_INCS_R=$STRIPE # -TMP1=`echo $MAGMA_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $MAGMA_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi MAGMA_LIBS_R=$STRIPE -TMP1=`echo $MAGMA_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $MAGMA_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18129,20 +18190,20 @@ MAGMA_INCS_R=$STRIPE # -TMP1=`echo $LIBXC_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LIBXC_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi LIBXC_LIBS_R=$STRIPE -TMP1=`echo $LIBXC_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LIBXC_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18152,20 +18213,20 @@ LIBXC_INCS_R=$STRIPE # -TMP1=`echo $DEVXLIB_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $DEVXLIB_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi DEVXLIB_LIBS_R=$STRIPE -TMP1=`echo $DEVXLIB_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $DEVXLIB_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18175,20 +18236,20 @@ DEVXLIB_INCS_R=$STRIPE # -TMP1=`echo $LIBCUDA_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LIBCUDA_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi LIBCUDA_LIBS_R=$STRIPE -TMP1=`echo $LIBCUDA_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LIBCUDA_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18198,20 +18259,20 @@ LIBCUDA_INCS_R=$STRIPE # -TMP1=`echo $BLAS_PETSC_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $BLAS_PETSC_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi BLAS_PETSC_LIBS_R=$STRIPE -TMP1=`echo $BLAS_PETSC_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $BLAS_PETSC_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi @@ -18221,20 +18282,20 @@ BLAS_PETSC_INCS_R=$STRIPE # -TMP1=`echo $LAPACK_PETSC_LIBS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LAPACK_PETSC_LIBS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("LIB")" fi LAPACK_PETSC_LIBS_R=$STRIPE -TMP1=`echo $LAPACK_PETSC_INCS | sed 's/\//+/g'` -TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//+/g'` +TMP1=`echo $LAPACK_PETSC_INCS | sed 's/\//\#/g'` +TMP2=`echo $extlibs_path/${FCKIND}/${FC} | sed 's/\//\#/g'` TMP3=`echo $TMP1 | sed "s/$TMP2/\(LIB\)/g"` -STRIPE=`echo $TMP3 | sed 's/+/\//g'` +STRIPE=`echo $TMP3 | sed 's/\#/\//g'` if [ -z "${1// }" ]; then STRIPE="$STRIPE ("INC")" fi diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 3c676d83c0..253553fdca 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -20,6 +20,7 @@ include ../config/external_libs_defs.mk # PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ + CC=mpiicx CXX=mpiicx FC=mpiifx \ --PETSC_ARCH=${PETSC_ARCH} \ --with-ssl=0 \ --with-x=0 \ @@ -27,8 +28,8 @@ CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ --with-shared-libraries=$(spetsc) \ --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ - --with-precision="${yprecision}" \ - --with-mpi-dir=$(mpipath) + --with-precision="${yprecision}" #\ +# --with-mpi-dir=$(mpipath) # # MAIN target # From 908b7d72844d183fca68274ddbf44f2d334b9655 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 17 Dec 2025 13:32:30 +0100 Subject: [PATCH 1361/1367] Version 5.3.0, Revision 26342, Hash 29b669db0f MODIFIED * configure include/version/version.m4 ypp/excitons/excitons_interpolate_setup.F Bugs: -If excitons eigenvalues are not found the code stops (before it produced random numbers) Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- ypp/excitons/excitons_interpolate_setup.F | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f277d7ec52..13d9f09fd7 100755 --- a/configure +++ b/configure @@ -3438,8 +3438,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26330" -SHASH="9d1916555b" +SREVISION="26342" +SHASH="29b669db0f" diff --git a/include/version/version.m4 b/include/version/version.m4 index 5fc41640d7..e25f18eecf 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26330" -SHASH="9d1916555b" +SREVISION="26342" +SHASH="29b669db0f" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index 8f5745732e..d5350da3b8 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -80,6 +80,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN endif ! call excitons_read(k,Xk,en,Xen,1,"clean",io_err) + if(io_err/=0) call error("Error reading exciton at q = "//intc(iq)) ! ! Read all eigenvalues and eigenvectors ! From d40d7430a3c9388a96e4f2d565698c5d4723271a Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Wed, 17 Dec 2025 13:36:01 +0100 Subject: [PATCH 1362/1367] Version 5.3.0, Revision 26343, Hash 908b7d7284 MODIFIED * configure include/version/version.m4 ypp/excitons/excitons_interpolate_setup.F Bugs: -Small typos in previous commit Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- ypp/excitons/excitons_interpolate_setup.F | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 13d9f09fd7..12dc350a89 100755 --- a/configure +++ b/configure @@ -3438,8 +3438,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26342" -SHASH="29b669db0f" +SREVISION="26343" +SHASH="908b7d7284" diff --git a/include/version/version.m4 b/include/version/version.m4 index e25f18eecf..bebafcabe3 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26342" -SHASH="29b669db0f" +SREVISION="26343" +SHASH="908b7d7284" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/excitons/excitons_interpolate_setup.F b/ypp/excitons/excitons_interpolate_setup.F index d5350da3b8..7a4b73d072 100644 --- a/ypp/excitons/excitons_interpolate_setup.F +++ b/ypp/excitons/excitons_interpolate_setup.F @@ -80,7 +80,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN endif ! call excitons_read(k,Xk,en,Xen,1,"clean",io_err) - if(io_err/=0) call error("Error reading exciton at q = "//intc(iq)) + if(io_err/=0) call error("Error reading exciton at q = "//intc(1)) ! ! Read all eigenvalues and eigenvectors ! @@ -88,6 +88,7 @@ subroutine excitons_interpolate_setup(k,Xk,en,Xen,q,BS_all_E,ID_INTERP_EXC,ID_IN do iq=2,q%nibz call msg('s','Reading '//exc_kind//'s at @ Q-index #',iq) call excitons_read(k,Xk,en,Xen,iq,"check",io_err) + if(io_err/=0) call error("Error reading exciton at q = "//intc(iq)) ! if(l_exc_occ_interp) then call excitons_read(k,Xk,en,Xen,iq,"eigenvectors eigenvalues",io_err) From 5d014f95da37338272a7160d0b841540643f7ac5 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 18 Dec 2025 14:47:02 +0100 Subject: [PATCH 1363/1367] Version 5.3.0, Revision 26344, Hash d40d7430a3 MODIFIED * configure include/version/version.m4 ypp/el-ph/ELPH_double_grid.F Bugs: -Fixed wrong message Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- ypp/el-ph/ELPH_double_grid.F | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 12dc350a89..fea990e77c 100755 --- a/configure +++ b/configure @@ -3438,8 +3438,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26343" -SHASH="908b7d7284" +SREVISION="26344" +SHASH="d40d7430a3" diff --git a/include/version/version.m4 b/include/version/version.m4 index bebafcabe3..b73104d4ac 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26343" -SHASH="908b7d7284" +SREVISION="26344" +SHASH="d40d7430a3" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/el-ph/ELPH_double_grid.F b/ypp/el-ph/ELPH_double_grid.F index af10f9c6c2..53f1daf10a 100644 --- a/ypp/el-ph/ELPH_double_grid.F +++ b/ypp/el-ph/ELPH_double_grid.F @@ -85,7 +85,7 @@ subroutine ELPH_double_grid(k,E,q) if(.not.elph_use_q_grid) call error('Random q-grid not implemented yet ') ! if(elph_bands(1)/=1 .or. elph_bands(2)/=E%nb) & -& call warning('ypp/el-ph/ELPH_double_grid.F: umber of bands in the GKKP different from the total number of bands') +& call warning('Number of bands in the GKKP different from the total number of bands') ! call E_reset(PH_freqs) PH_freqs%nb=ph_modes From c1678ff67036579e7db4864151d0c05e0aac2dd8 Mon Sep 17 00:00:00 2001 From: Claudio Attaccalite Date: Thu, 18 Dec 2025 16:06:33 +0100 Subject: [PATCH 1364/1367] Version 5.3.0, Revision 26345, Hash 5d014f95da MODIFIED * configure include/version/version.m4 ypp/excitons/excitons_ph_ass_dos.F ypp/excitons/excitons_read.F Bugs: -io_err was not initialized in exciton_read.F -Wrong call to exciton_interpolate_setup.F in excitons_ph_ass_dos.F Additions: - Changes: - Patch sent by: Claudio Attaccalite --- configure | 4 ++-- include/version/version.m4 | 4 ++-- ypp/excitons/excitons_ph_ass_dos.F | 6 ++++-- ypp/excitons/excitons_read.F | 3 +++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/configure b/configure index fea990e77c..b8db5f37c2 100755 --- a/configure +++ b/configure @@ -3438,8 +3438,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26344" -SHASH="d40d7430a3" +SREVISION="26345" +SHASH="5d014f95da" diff --git a/include/version/version.m4 b/include/version/version.m4 index b73104d4ac..55a41fef90 100644 --- a/include/version/version.m4 +++ b/include/version/version.m4 @@ -2,8 +2,8 @@ AC_INIT(Lumen, 2.0.0, https://gitlab.com/lumen-code/lumen/-/issues, lumen ,www.l SVERSION="5" SSUBVERSION="3" SPATCHLEVEL="0" -SREVISION="26344" -SHASH="d40d7430a3" +SREVISION="26345" +SHASH="5d014f95da" AC_SUBST(SVERSION) AC_SUBST(SSUBVERSION) AC_SUBST(SPATCHLEVEL) diff --git a/ypp/excitons/excitons_ph_ass_dos.F b/ypp/excitons/excitons_ph_ass_dos.F index 60d9ffd4f5..684ca93362 100644 --- a/ypp/excitons/excitons_ph_ass_dos.F +++ b/ypp/excitons/excitons_ph_ass_dos.F @@ -37,13 +37,14 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) ! logical, external :: file_exists integer :: i_q,i_c,i_E,ph_modes,i_idx,i_l - integer :: ID_INTERP_EXC,n_full_q + integer :: ID_INTERP_EXC,n_full_q,ID_INTERP_OCC type(bz_samp) :: q_matdyn real(SP), allocatable :: ph_freqs(:,:) integer, allocatable :: iq_indx(:) real(SP), allocatable :: BSE_interp_E(:,:) real(SP) :: dos_E(DOS_E_steps),exc_ph_DOS(DOS_E_steps),exc_OCC,Boltz_F_exc,Bose_F_ph,min_E real(SP) :: occ_threshold=1E-5 + real(SP) :: BS_all_E(EXCITONS_n_user_states,q_exc%nibz) type(PP_indexes) :: px complex(SP), allocatable :: ph_pol(:,:,:,:) ! @@ -93,7 +94,8 @@ subroutine excitons_ph_ass_dos(k,Xk,en,Xen,q_exc) ! Read and interpolate excitons dispersion ! ID_INTERP_EXC=1 - call excitons_interpolate_setup(k,Xk,en,Xen,q_exc,ID_INTERP_EXC,.TRUE.) + ID_INTERP_OCC=2 + call excitons_interpolate_setup(k,Xk,en,Xen,q_exc,BS_all_E,ID_INTERP_EXC,ID_INTERP_OCC,.TRUE.) YAMBO_ALLOC(BSE_interp_E,(EXCITONS_n_user_states,q_matdyn%nibz)) call INTERPOLATION_BZ(K=q_matdyn,NK=q_matdyn%nibz,R1D=BSE_interp_E,ID=ID_INTERP_EXC) ! diff --git a/ypp/excitons/excitons_read.F b/ypp/excitons/excitons_read.F index 8ee9b6ed17..82eb5447dd 100644 --- a/ypp/excitons/excitons_read.F +++ b/ypp/excitons/excitons_read.F @@ -51,6 +51,8 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) l_eigenvec=index(what,"eigenvectors") >0 l_clean =index(what,"clean") >0 ! + io_err=0 + ! if(l_check) then ! ! E SOC perturbative @@ -168,6 +170,7 @@ subroutine excitons_read(k,Xk,en,Xen,iq,what,io_err) YAMBO_FREE_P(BS_E_SOC_corr) endif call X_reset(Xbsk) + io_err=0 ! endif ! From 74a8bced99568b619fb7c1a8f5f2b2f7af8d4d53 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 24 Dec 2025 18:31:14 +0100 Subject: [PATCH 1365/1367] Added barrier to LDIAGO_driver when MPI is not present --- src/bse/LDIAGO_driver.F | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bse/LDIAGO_driver.F b/src/bse/LDIAGO_driver.F index c3ff5d06ee..61830121fb 100644 --- a/src/bse/LDIAGO_driver.F +++ b/src/bse/LDIAGO_driver.F @@ -95,6 +95,10 @@ subroutine LDIAGO_driver(i_BS_mat, BS_energies, BS_VR, & integer :: evec_fac = 1 ! evec_fac = 2 if bse_solver function was used to diagonalize else 1 +#if !defined _MPI + call error("LDIAGO implementation needs MPI. Do not use LDIAGO solver.") +#endif + if(PRESENT(neigs_range)) then if(neigs_range(1)>0) then neig_tmp=neigs_range(2)-neigs_range(1)+1 From 62e6166e80d85b7c6b6973cf6b20b71f32ae8fc2 Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Wed, 24 Dec 2025 21:11:36 +0100 Subject: [PATCH 1366/1367] Updated Makefile.loc for petsc --- lib/petsc/Makefile.loc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/petsc/Makefile.loc b/lib/petsc/Makefile.loc index 253553fdca..8f76e0bbb9 100644 --- a/lib/petsc/Makefile.loc +++ b/lib/petsc/Makefile.loc @@ -17,10 +17,11 @@ include ../config/external_libs_commons.mk include ../config/external_libs_defs.mk # FOPTFLAGS="$(fcflags)" COPTFLAGS="$(cflags)" \ # FOPTFLAGS="-O1 -std=f2008 " COPTFLAGS="-O2" CXXOPTFLAGS="-O2" \ +# CC=mpiicx CXX=mpiicx FC=mpiifx \ # PETSC_ARCH=yambo_${yprecision}_complex CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ - CC=mpiicx CXX=mpiicx FC=mpiifx \ + CC=$(cc) FC=$(fc) \ --PETSC_ARCH=${PETSC_ARCH} \ --with-ssl=0 \ --with-x=0 \ @@ -28,7 +29,7 @@ CONFFLAGS=--prefix="$(LIBPATH)" $(petsc_flgs) \ --with-shared-libraries=$(spetsc) \ --with-blaslapack-lib="$(llapackpetsc) $(lblaspetsc)" \ --with-scalar-type="complex" \ - --with-precision="${yprecision}" #\ + --with-precision="${yprecision}" # --with-mpi-dir=$(mpipath) # # MAIN target From 2792a61b05254c73b445c98ee368925daf3b055f Mon Sep 17 00:00:00 2001 From: Davide Sangalli Date: Sat, 27 Dec 2025 17:55:31 +0100 Subject: [PATCH 1367/1367] Fix to compile scalapack with gfortran-15 --- lib/scalapack/SLmake.inc_lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scalapack/SLmake.inc_lib b/lib/scalapack/SLmake.inc_lib index b004170124..1cde9fb4ec 100644 --- a/lib/scalapack/SLmake.inc_lib +++ b/lib/scalapack/SLmake.inc_lib @@ -32,7 +32,7 @@ FC = $(fc) CC = $(cc) NOOPT = $(fcuflags) FCFLAGS = $(fcflags) $(slkfcflags) -CCFLAGS = $(cflags) +CCFLAGS = $(cflags) -std=gnu90 FCLOADER = $(fc) CCLOADER = $(cc) FCLOADFLAGS = $(fcflags)